diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-01-25 22:58:40 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-01-25 22:58:40 -0500 |
commit | 9d56dd3b083a3bec56e9da35ce07baca81030b03 (patch) | |
tree | a9df9d514fbc32defc1ca8a6d7c2795f15b8a128 /arch/sh/drivers/pci | |
parent | a077e91690fb32a1453423b2cf1df3492fd30c3a (diff) |
sh: Mass ctrl_in/outX to __raw_read/writeX conversion.
The old ctrl in/out routines are non-portable and unsuitable for
cross-platform use. While drivers/sh has already been sanitized, there
is still quite a lot of code that is not. This converts the arch/sh/ bits
over, which permits us to flag the routines as deprecated whilst still
building with -Werror for the architecture code, and to ensure that
future users are not added.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/drivers/pci')
-rw-r--r-- | arch/sh/drivers/pci/fixups-rts7751r2d.c | 4 | ||||
-rw-r--r-- | arch/sh/drivers/pci/pci-sh4.h | 4 | ||||
-rw-r--r-- | arch/sh/drivers/pci/pci-sh5.h | 12 | ||||
-rw-r--r-- | arch/sh/drivers/pci/pci-sh7751.c | 12 |
4 files changed, 16 insertions, 16 deletions
diff --git a/arch/sh/drivers/pci/fixups-rts7751r2d.c b/arch/sh/drivers/pci/fixups-rts7751r2d.c index 7898f14d6641..e248516118a9 100644 --- a/arch/sh/drivers/pci/fixups-rts7751r2d.c +++ b/arch/sh/drivers/pci/fixups-rts7751r2d.c | |||
@@ -43,7 +43,7 @@ int pci_fixup_pcic(struct pci_channel *chan) | |||
43 | { | 43 | { |
44 | unsigned long bcr1, mcr; | 44 | unsigned long bcr1, mcr; |
45 | 45 | ||
46 | bcr1 = ctrl_inl(SH7751_BCR1); | 46 | bcr1 = __raw_readl(SH7751_BCR1); |
47 | bcr1 |= 0x40080000; /* Enable Bit 19 BREQEN, set PCIC to slave */ | 47 | bcr1 |= 0x40080000; /* Enable Bit 19 BREQEN, set PCIC to slave */ |
48 | pci_write_reg(chan, bcr1, SH4_PCIBCR1); | 48 | pci_write_reg(chan, bcr1, SH4_PCIBCR1); |
49 | 49 | ||
@@ -54,7 +54,7 @@ int pci_fixup_pcic(struct pci_channel *chan) | |||
54 | pci_write_reg(chan, 0xfb900047, SH7751_PCICONF1); | 54 | pci_write_reg(chan, 0xfb900047, SH7751_PCICONF1); |
55 | pci_write_reg(chan, 0xab000001, SH7751_PCICONF4); | 55 | pci_write_reg(chan, 0xab000001, SH7751_PCICONF4); |
56 | 56 | ||
57 | mcr = ctrl_inl(SH7751_MCR); | 57 | mcr = __raw_readl(SH7751_MCR); |
58 | mcr = (mcr & PCIMCR_MRSET_OFF) & PCIMCR_RFSH_OFF; | 58 | mcr = (mcr & PCIMCR_MRSET_OFF) & PCIMCR_RFSH_OFF; |
59 | pci_write_reg(chan, mcr, SH4_PCIMCR); | 59 | pci_write_reg(chan, mcr, SH4_PCIMCR); |
60 | 60 | ||
diff --git a/arch/sh/drivers/pci/pci-sh4.h b/arch/sh/drivers/pci/pci-sh4.h index 3d5296cde622..4744a7dede0c 100644 --- a/arch/sh/drivers/pci/pci-sh4.h +++ b/arch/sh/drivers/pci/pci-sh4.h | |||
@@ -167,13 +167,13 @@ struct sh4_pci_address_map { | |||
167 | static inline void pci_write_reg(struct pci_channel *chan, | 167 | static inline void pci_write_reg(struct pci_channel *chan, |
168 | unsigned long val, unsigned long reg) | 168 | unsigned long val, unsigned long reg) |
169 | { | 169 | { |
170 | ctrl_outl(val, chan->reg_base + reg); | 170 | __raw_writel(val, chan->reg_base + reg); |
171 | } | 171 | } |
172 | 172 | ||
173 | static inline unsigned long pci_read_reg(struct pci_channel *chan, | 173 | static inline unsigned long pci_read_reg(struct pci_channel *chan, |
174 | unsigned long reg) | 174 | unsigned long reg) |
175 | { | 175 | { |
176 | return ctrl_inl(chan->reg_base + reg); | 176 | return __raw_readl(chan->reg_base + reg); |
177 | } | 177 | } |
178 | 178 | ||
179 | #endif /* __PCI_SH4_H */ | 179 | #endif /* __PCI_SH4_H */ |
diff --git a/arch/sh/drivers/pci/pci-sh5.h b/arch/sh/drivers/pci/pci-sh5.h index f277628221f3..3f01decb4307 100644 --- a/arch/sh/drivers/pci/pci-sh5.h +++ b/arch/sh/drivers/pci/pci-sh5.h | |||
@@ -86,14 +86,14 @@ extern unsigned long pcicr_virt; | |||
86 | /* #define PCISH5_VCR_REG(x) ( SH5PCI_VCR_BASE (PCISH5_VCR_##x)) */ | 86 | /* #define PCISH5_VCR_REG(x) ( SH5PCI_VCR_BASE (PCISH5_VCR_##x)) */ |
87 | 87 | ||
88 | /* Write I/O functions */ | 88 | /* Write I/O functions */ |
89 | #define SH5PCI_WRITE(reg,val) ctrl_outl((u32)(val),PCISH5_ICR_REG(reg)) | 89 | #define SH5PCI_WRITE(reg,val) __raw_writel((u32)(val),PCISH5_ICR_REG(reg)) |
90 | #define SH5PCI_WRITE_SHORT(reg,val) ctrl_outw((u16)(val),PCISH5_ICR_REG(reg)) | 90 | #define SH5PCI_WRITE_SHORT(reg,val) __raw_writew((u16)(val),PCISH5_ICR_REG(reg)) |
91 | #define SH5PCI_WRITE_BYTE(reg,val) ctrl_outb((u8)(val),PCISH5_ICR_REG(reg)) | 91 | #define SH5PCI_WRITE_BYTE(reg,val) __raw_writeb((u8)(val),PCISH5_ICR_REG(reg)) |
92 | 92 | ||
93 | /* Read I/O functions */ | 93 | /* Read I/O functions */ |
94 | #define SH5PCI_READ(reg) ctrl_inl(PCISH5_ICR_REG(reg)) | 94 | #define SH5PCI_READ(reg) __raw_readl(PCISH5_ICR_REG(reg)) |
95 | #define SH5PCI_READ_SHORT(reg) ctrl_inw(PCISH5_ICR_REG(reg)) | 95 | #define SH5PCI_READ_SHORT(reg) __raw_readw(PCISH5_ICR_REG(reg)) |
96 | #define SH5PCI_READ_BYTE(reg) ctrl_inb(PCISH5_ICR_REG(reg)) | 96 | #define SH5PCI_READ_BYTE(reg) __raw_readb(PCISH5_ICR_REG(reg)) |
97 | 97 | ||
98 | /* Set PCI config bits */ | 98 | /* Set PCI config bits */ |
99 | #define SET_CONFIG_BITS(bus,devfn,where) ((((bus) << 16) | ((devfn) << 8) | ((where) & ~3)) | 0x80000000) | 99 | #define SET_CONFIG_BITS(bus,devfn,where) ((((bus) << 16) | ((devfn) << 8) | ((where) & ~3)) | 0x80000000) |
diff --git a/arch/sh/drivers/pci/pci-sh7751.c b/arch/sh/drivers/pci/pci-sh7751.c index 70c1999a0ec4..2455cf32db5a 100644 --- a/arch/sh/drivers/pci/pci-sh7751.c +++ b/arch/sh/drivers/pci/pci-sh7751.c | |||
@@ -97,9 +97,9 @@ static int __init sh7751_pci_init(void) | |||
97 | return ret; | 97 | return ret; |
98 | 98 | ||
99 | /* Set the BCR's to enable PCI access */ | 99 | /* Set the BCR's to enable PCI access */ |
100 | reg = ctrl_inl(SH7751_BCR1); | 100 | reg = __raw_readl(SH7751_BCR1); |
101 | reg |= 0x80000; | 101 | reg |= 0x80000; |
102 | ctrl_outl(reg, SH7751_BCR1); | 102 | __raw_writel(reg, SH7751_BCR1); |
103 | 103 | ||
104 | /* Turn the clocks back on (not done in reset)*/ | 104 | /* Turn the clocks back on (not done in reset)*/ |
105 | pci_write_reg(chan, 0, SH4_PCICLKR); | 105 | pci_write_reg(chan, 0, SH4_PCICLKR); |
@@ -159,13 +159,13 @@ static int __init sh7751_pci_init(void) | |||
159 | return -1; | 159 | return -1; |
160 | 160 | ||
161 | /* configure the wait control registers */ | 161 | /* configure the wait control registers */ |
162 | word = ctrl_inl(SH7751_WCR1); | 162 | word = __raw_readl(SH7751_WCR1); |
163 | pci_write_reg(chan, word, SH4_PCIWCR1); | 163 | pci_write_reg(chan, word, SH4_PCIWCR1); |
164 | word = ctrl_inl(SH7751_WCR2); | 164 | word = __raw_readl(SH7751_WCR2); |
165 | pci_write_reg(chan, word, SH4_PCIWCR2); | 165 | pci_write_reg(chan, word, SH4_PCIWCR2); |
166 | word = ctrl_inl(SH7751_WCR3); | 166 | word = __raw_readl(SH7751_WCR3); |
167 | pci_write_reg(chan, word, SH4_PCIWCR3); | 167 | pci_write_reg(chan, word, SH4_PCIWCR3); |
168 | word = ctrl_inl(SH7751_MCR); | 168 | word = __raw_readl(SH7751_MCR); |
169 | pci_write_reg(chan, word, SH4_PCIMCR); | 169 | pci_write_reg(chan, word, SH4_PCIMCR); |
170 | 170 | ||
171 | /* NOTE: I'm ignoring the PCI error IRQs for now.. | 171 | /* NOTE: I'm ignoring the PCI error IRQs for now.. |