diff options
author | Magnus Damm <magnus.damm@gmail.com> | 2008-02-13 23:52:43 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-02-14 00:25:32 -0500 |
commit | e036eaa681a17f71b64f6d9040fe605555623919 (patch) | |
tree | 6fe462fe6106e830f39abd25f0e1a4f8aff3cb5c /arch/sh/drivers/pci/pci-sh7751.c | |
parent | f99cb7a43c5cca1813a97312487acf7a0f88ee2a (diff) |
sh: use ctrl_in/out for on chip pci access
This patch makes sure ctrl_inN/outN are used instead of inN/outN for on chip
pci registers. Without this patch addresses may be adjusted using the value
in generic_io_base. This patch makes it possible to set generic_io_base and
have pci without reading and writing all over the place.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: Katsuya MATSUBARA <matsu@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/drivers/pci/pci-sh7751.c')
-rw-r--r-- | arch/sh/drivers/pci/pci-sh7751.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/sh/drivers/pci/pci-sh7751.c b/arch/sh/drivers/pci/pci-sh7751.c index 1aca7fe5783b..3065eb184f01 100644 --- a/arch/sh/drivers/pci/pci-sh7751.c +++ b/arch/sh/drivers/pci/pci-sh7751.c | |||
@@ -58,7 +58,7 @@ static int __init __area_sdram_check(unsigned int area) | |||
58 | { | 58 | { |
59 | u32 word; | 59 | u32 word; |
60 | 60 | ||
61 | word = inl(SH7751_BCR1); | 61 | word = ctrl_inl(SH7751_BCR1); |
62 | /* check BCR for SDRAM in area */ | 62 | /* check BCR for SDRAM in area */ |
63 | if (((word >> area) & 1) == 0) { | 63 | if (((word >> area) & 1) == 0) { |
64 | printk("PCI: Area %d is not configured for SDRAM. BCR1=0x%x\n", | 64 | printk("PCI: Area %d is not configured for SDRAM. BCR1=0x%x\n", |
@@ -67,7 +67,7 @@ static int __init __area_sdram_check(unsigned int area) | |||
67 | } | 67 | } |
68 | pci_write_reg(word, SH4_PCIBCR1); | 68 | pci_write_reg(word, SH4_PCIBCR1); |
69 | 69 | ||
70 | word = (u16)inw(SH7751_BCR2); | 70 | word = (u16)ctrl_inw(SH7751_BCR2); |
71 | /* check BCR2 for 32bit SDRAM interface*/ | 71 | /* check BCR2 for 32bit SDRAM interface*/ |
72 | if (((word >> (area << 1)) & 0x3) != 0x3) { | 72 | if (((word >> (area << 1)) & 0x3) != 0x3) { |
73 | printk("PCI: Area %d is not 32 bit SDRAM. BCR2=0x%x\n", | 73 | printk("PCI: Area %d is not 32 bit SDRAM. BCR2=0x%x\n", |
@@ -85,9 +85,9 @@ int __init sh7751_pcic_init(struct sh4_pci_address_map *map) | |||
85 | u32 word; | 85 | u32 word; |
86 | 86 | ||
87 | /* Set the BCR's to enable PCI access */ | 87 | /* Set the BCR's to enable PCI access */ |
88 | reg = inl(SH7751_BCR1); | 88 | reg = ctrl_inl(SH7751_BCR1); |
89 | reg |= 0x80000; | 89 | reg |= 0x80000; |
90 | outl(reg, SH7751_BCR1); | 90 | ctrl_outl(reg, SH7751_BCR1); |
91 | 91 | ||
92 | /* Turn the clocks back on (not done in reset)*/ | 92 | /* Turn the clocks back on (not done in reset)*/ |
93 | pci_write_reg(0, SH4_PCICLKR); | 93 | pci_write_reg(0, SH4_PCICLKR); |
@@ -179,13 +179,13 @@ int __init sh7751_pcic_init(struct sh4_pci_address_map *map) | |||
179 | return 0; | 179 | return 0; |
180 | 180 | ||
181 | /* configure the wait control registers */ | 181 | /* configure the wait control registers */ |
182 | word = inl(SH7751_WCR1); | 182 | word = ctrl_inl(SH7751_WCR1); |
183 | pci_write_reg(word, SH4_PCIWCR1); | 183 | pci_write_reg(word, SH4_PCIWCR1); |
184 | word = inl(SH7751_WCR2); | 184 | word = ctrl_inl(SH7751_WCR2); |
185 | pci_write_reg(word, SH4_PCIWCR2); | 185 | pci_write_reg(word, SH4_PCIWCR2); |
186 | word = inl(SH7751_WCR3); | 186 | word = ctrl_inl(SH7751_WCR3); |
187 | pci_write_reg(word, SH4_PCIWCR3); | 187 | pci_write_reg(word, SH4_PCIWCR3); |
188 | word = inl(SH7751_MCR); | 188 | word = ctrl_inl(SH7751_MCR); |
189 | pci_write_reg(word, SH4_PCIMCR); | 189 | pci_write_reg(word, SH4_PCIMCR); |
190 | 190 | ||
191 | /* NOTE: I'm ignoring the PCI error IRQs for now.. | 191 | /* NOTE: I'm ignoring the PCI error IRQs for now.. |