diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-04-17 04:21:36 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-04-17 04:21:36 -0400 |
commit | 4c7a47de897e89c25a40e228ac5319cbac7257fe (patch) | |
tree | c5fe696011112d42f3ae279de4b679e7d4d140fa /arch/sh/drivers/pci/pci-sh7780.c | |
parent | ab1363a8929f32cc163cd3f50ca72f20d901b00c (diff) |
sh: pci: Kill off platform-specific multi-window mappings.
Commit 68b42d1b548be1840aff7122fdebeb804daf0fa3 ("sh: sh7785lcr: Map
whole PCI address space.") changed around the semantics of how various
chip-selects are made accessible to PCI. Now that there is a single
large mapping covering from CS0-CS6, there is no longer any need to
do multi-window mapping. Subsequently, all of the differing
implementations can be consolidated in to pci-sh7780.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/drivers/pci/pci-sh7780.c')
-rw-r--r-- | arch/sh/drivers/pci/pci-sh7780.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/arch/sh/drivers/pci/pci-sh7780.c b/arch/sh/drivers/pci/pci-sh7780.c index eb217ddf025f..07c5529a273b 100644 --- a/arch/sh/drivers/pci/pci-sh7780.c +++ b/arch/sh/drivers/pci/pci-sh7780.c | |||
@@ -90,7 +90,19 @@ struct pci_channel board_pci_channels[] = { | |||
90 | { NULL, NULL, NULL, 0, 0 }, | 90 | { NULL, NULL, NULL, 0, 0 }, |
91 | }; | 91 | }; |
92 | 92 | ||
93 | int __init sh7780_pcic_init(struct sh4_pci_address_map *map) | 93 | static struct sh4_pci_address_map sh7780_pci_map = { |
94 | .window0 = { | ||
95 | #if defined(CONFIG_32BIT) | ||
96 | .base = SH7780_32BIT_DDR_BASE_ADDR, | ||
97 | .size = 0x40000000, | ||
98 | #else | ||
99 | .base = SH7780_CS0_BASE_ADDR, | ||
100 | .size = 0x20000000, | ||
101 | #endif | ||
102 | }, | ||
103 | }; | ||
104 | |||
105 | int __init pcibios_init_platform(void) | ||
94 | { | 106 | { |
95 | struct pci_channel *chan = &board_pci_channels[0]; | 107 | struct pci_channel *chan = &board_pci_channels[0]; |
96 | u32 word; | 108 | u32 word; |
@@ -114,14 +126,10 @@ int __init sh7780_pcic_init(struct sh4_pci_address_map *map) | |||
114 | /* Set IO and Mem windows to local address | 126 | /* Set IO and Mem windows to local address |
115 | * Make PCI and local address the same for easy 1 to 1 mapping | 127 | * Make PCI and local address the same for easy 1 to 1 mapping |
116 | */ | 128 | */ |
117 | pci_write_reg(chan, map->window0.size - 0xfffff, SH4_PCILSR0); | 129 | pci_write_reg(chan, sh7780_pci_map.window0.size - 0xfffff, SH4_PCILSR0); |
118 | pci_write_reg(chan, map->window1.size - 0xfffff, SH4_PCILSR1); | ||
119 | /* Set the values on window 0 PCI config registers */ | 130 | /* Set the values on window 0 PCI config registers */ |
120 | pci_write_reg(chan, map->window0.base, SH4_PCILAR0); | 131 | pci_write_reg(chan, sh7780_pci_map.window0.base, SH4_PCILAR0); |
121 | pci_write_reg(chan, map->window0.base, SH7780_PCIMBAR0); | 132 | pci_write_reg(chan, sh7780_pci_map.window0.base, SH7780_PCIMBAR0); |
122 | /* Set the values on window 1 PCI config registers */ | ||
123 | pci_write_reg(chan, map->window1.base, SH4_PCILAR1); | ||
124 | pci_write_reg(chan, map->window1.base, SH7780_PCIMBAR1); | ||
125 | 133 | ||
126 | /* Apply any last-minute PCIC fixups */ | 134 | /* Apply any last-minute PCIC fixups */ |
127 | pci_fixup_pcic(chan); | 135 | pci_fixup_pcic(chan); |