serial: sh-sci: Handle the general UPF_IOREMAP case.

Presently we don't do much with UPF_IOREMAP other than special case it
for SH-5's onchip_remap() on the early console. Tie this in generically
for platforms that need the remap.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
Paul Mundt
2008-10-01 15:46:58 +09:00
parent 62429e0364
commit 7ff731aeba
2 changed files with 37 additions and 18 deletions

View File

@ -320,18 +320,16 @@
#define SCI_EVENT_WRITE_WAKEUP 0
#define SCI_IN(size, offset) \
unsigned int addr = port->mapbase + (offset); \
if ((size) == 8) { \
return ctrl_inb(addr); \
return ioread8(port->membase + (offset)); \
} else { \
return ctrl_inw(addr); \
return ioread16(port->membase + (offset)); \
}
#define SCI_OUT(size, offset, value) \
unsigned int addr = port->mapbase + (offset); \
if ((size) == 8) { \
ctrl_outb(value, addr); \
iowrite8(value, port->membase + (offset)); \
} else if ((size) == 16) { \
ctrl_outw(value, addr); \
iowrite16(value, port->membase + (offset)); \
}
#define CPU_SCIx_FNS(name, sci_offset, sci_size, scif_offset, scif_size)\