Skip to content

Commit 37b7a97

Browse files
committed
sh: machvec IO death.
This takes a bit of a sledgehammer to the machvec I/O routines. The iomem case requires no special casing and so can just be dropped outright. This only leaves the ioport casing for PCI and SuperIO mangling. With the SuperIO case going through the standard ioport mapping, it's possible to replace everything with generic routines. With this done the standard I/O routines are tidied up and NO_IOPORT now gets default-enabled for the vast majority of boards. Signed-off-by: Paul Mundt <[email protected]>
1 parent e2781ac commit 37b7a97

File tree

11 files changed

+396
-419
lines changed

11 files changed

+396
-419
lines changed

arch/sh/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ config ARCH_HAS_CPU_IDLE_WAIT
161161
def_bool y
162162

163163
config NO_IOPORT
164-
bool
164+
def_bool !PCI
165+
depends on !SH_CAYMAN && !SH_SH4202_MICRODEV
165166

166167
config IO_TRAPPED
167168
bool

arch/sh/boards/board-secureedge5410.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ unsigned short secureedge5410_ioport;
2929
*/
3030
static irqreturn_t eraseconfig_interrupt(int irq, void *dev_id)
3131
{
32-
ctrl_delay(); /* dummy read */
33-
3432
printk("SnapGear: erase switch interrupt!\n");
3533

3634
return IRQ_HANDLED;

arch/sh/drivers/pci/pci.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,14 +382,13 @@ static void __iomem *ioport_map_pci(struct pci_dev *dev,
382382
struct pci_channel *chan = dev->sysdata;
383383

384384
if (unlikely(!chan->io_map_base)) {
385-
chan->io_map_base = generic_io_base;
385+
chan->io_map_base = sh_io_port_base;
386386

387387
if (pci_domains_supported)
388388
panic("To avoid data corruption io_map_base MUST be "
389389
"set with multiple PCI domains.");
390390
}
391391

392-
393392
return (void __iomem *)(chan->io_map_base + port);
394393
}
395394

0 commit comments

Comments
 (0)