diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 18:18:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 18:18:06 -0400 |
commit | d973664992d814d93db161b28c0cc9a4c7e68f42 (patch) | |
tree | 03de3a9ef1f8f0d5dcd2e3c217c4fdf334f6691e /arch/arm/mach-orion5x | |
parent | 2d5e3e8d28a7820de1eb7b18a7c15d645bb26992 (diff) | |
parent | 9d87dd97ffcd3b5eb2bbaf0d5d93f4bfcaed3f04 (diff) |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: (26 commits)
[ARM] pxa: fix 1c104e0e4f6ab396960c058e95e18bdedcac945b
[ARM] serial: s3c2410: platform_get_irq() may return signed unnoticed
[ARM] am79c961a: platform_get_irq() may return signed unnoticed
[ARM] Feroceon: Feroceon-specific WA-cache compatible {copy,clear}_user_page()
[ARM] Feroceon: fix function alignment in proc-feroceon.S
[ARM] Orion: catch a couple more alternative spellings of PCIe
[ARM] Orion: fix orion-ehci platform resource end addresses
[ARM] Orion: fix ->map_irq() PCIe bus number check
[ARM] Orion: fix ioremap() optimization
[ARM] feroceon: remove CONFIG_CPU_CACHE_ROUND_ROBIN check
[ARM] feroceon: remove CONFIG_CPU_DCACHE_WRITETHROUGH check
kprobes/arm: fix decoding of arithmetic immediate instructions
kprobes/arm: fix cache flush address for instruction stub
[ARM] 5022/1: Race in ARM MMCI PL18x driver, V2
[ARM] 5021/1: at91: buildfix for sam9263 + PM
[ARM] 5018/1: RealView: Fix the ARM11MPCore Oprofile compilation
[ARM] 5016/1: AT91: typo in mci configuration for at91cap at91sam9263
[ARM] 5017/1: pxa3xx: Report unsupported wakeup sources in pxa3xx_set_wake()
[ARM] 5020/1: magician: remove __devinit marker from pasic3_leds_info
[ARM] 5014/1: Cleanup reset state before entering suspend or resetting.
...
Diffstat (limited to 'arch/arm/mach-orion5x')
-rw-r--r-- | arch/arm/mach-orion5x/addr-map.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/common.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/common.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/db88f5281-setup.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/dns323-setup.c | 17 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/kurobox_pro-setup.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/pci.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/rd88f5182-setup.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/ts209-setup.c | 13 |
9 files changed, 64 insertions, 37 deletions
diff --git a/arch/arm/mach-orion5x/addr-map.c b/arch/arm/mach-orion5x/addr-map.c index 6b179371e0a2..9608503d67f5 100644 --- a/arch/arm/mach-orion5x/addr-map.c +++ b/arch/arm/mach-orion5x/addr-map.c | |||
@@ -19,14 +19,14 @@ | |||
19 | 19 | ||
20 | /* | 20 | /* |
21 | * The Orion has fully programable address map. There's a separate address | 21 | * The Orion has fully programable address map. There's a separate address |
22 | * map for each of the device _master_ interfaces, e.g. CPU, PCI, PCIE, USB, | 22 | * map for each of the device _master_ interfaces, e.g. CPU, PCI, PCIe, USB, |
23 | * Gigabit Ethernet, DMA/XOR engines, etc. Each interface has its own | 23 | * Gigabit Ethernet, DMA/XOR engines, etc. Each interface has its own |
24 | * address decode windows that allow it to access any of the Orion resources. | 24 | * address decode windows that allow it to access any of the Orion resources. |
25 | * | 25 | * |
26 | * CPU address decoding -- | 26 | * CPU address decoding -- |
27 | * Linux assumes that it is the boot loader that already setup the access to | 27 | * Linux assumes that it is the boot loader that already setup the access to |
28 | * DDR and internal registers. | 28 | * DDR and internal registers. |
29 | * Setup access to PCI and PCI-E IO/MEM space is issued by this file. | 29 | * Setup access to PCI and PCIe IO/MEM space is issued by this file. |
30 | * Setup access to various devices located on the device bus interface (e.g. | 30 | * Setup access to various devices located on the device bus interface (e.g. |
31 | * flashes, RTC, etc) should be issued by machine-setup.c according to | 31 | * flashes, RTC, etc) should be issued by machine-setup.c according to |
32 | * specific board population (by using orion5x_setup_*_win()). | 32 | * specific board population (by using orion5x_setup_*_win()). |
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 439c7784af02..968deb58be01 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -132,7 +132,7 @@ static struct platform_device orion5x_uart = { | |||
132 | static struct resource orion5x_ehci0_resources[] = { | 132 | static struct resource orion5x_ehci0_resources[] = { |
133 | { | 133 | { |
134 | .start = ORION5X_USB0_PHYS_BASE, | 134 | .start = ORION5X_USB0_PHYS_BASE, |
135 | .end = ORION5X_USB0_PHYS_BASE + SZ_4K, | 135 | .end = ORION5X_USB0_PHYS_BASE + SZ_4K - 1, |
136 | .flags = IORESOURCE_MEM, | 136 | .flags = IORESOURCE_MEM, |
137 | }, | 137 | }, |
138 | { | 138 | { |
@@ -145,7 +145,7 @@ static struct resource orion5x_ehci0_resources[] = { | |||
145 | static struct resource orion5x_ehci1_resources[] = { | 145 | static struct resource orion5x_ehci1_resources[] = { |
146 | { | 146 | { |
147 | .start = ORION5X_USB1_PHYS_BASE, | 147 | .start = ORION5X_USB1_PHYS_BASE, |
148 | .end = ORION5X_USB1_PHYS_BASE + SZ_4K, | 148 | .end = ORION5X_USB1_PHYS_BASE + SZ_4K - 1, |
149 | .flags = IORESOURCE_MEM, | 149 | .flags = IORESOURCE_MEM, |
150 | }, | 150 | }, |
151 | { | 151 | { |
@@ -317,7 +317,7 @@ struct sys_timer orion5x_timer = { | |||
317 | ****************************************************************************/ | 317 | ****************************************************************************/ |
318 | 318 | ||
319 | /* | 319 | /* |
320 | * Identify device ID and rev from PCIE configuration header space '0'. | 320 | * Identify device ID and rev from PCIe configuration header space '0'. |
321 | */ | 321 | */ |
322 | static void __init orion5x_id(u32 *dev, u32 *rev, char **dev_name) | 322 | static void __init orion5x_id(u32 *dev, u32 *rev, char **dev_name) |
323 | { | 323 | { |
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h index f4c4c9a72a7c..14adf8d1a54a 100644 --- a/arch/arm/mach-orion5x/common.h +++ b/arch/arm/mach-orion5x/common.h | |||
@@ -33,10 +33,9 @@ struct pci_sys_data; | |||
33 | struct pci_bus; | 33 | struct pci_bus; |
34 | 34 | ||
35 | void orion5x_pcie_id(u32 *dev, u32 *rev); | 35 | void orion5x_pcie_id(u32 *dev, u32 *rev); |
36 | int orion5x_pcie_local_bus_nr(void); | ||
37 | int orion5x_pci_local_bus_nr(void); | ||
38 | int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys); | 36 | int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys); |
39 | struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); | 37 | struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); |
38 | int orion5x_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin); | ||
40 | 39 | ||
41 | /* | 40 | /* |
42 | * Valid GPIO pins according to MPP setup, used by machine-setup. | 41 | * Valid GPIO pins according to MPP setup, used by machine-setup. |
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c index ea3141e3e3c0..44c64342dacb 100644 --- a/arch/arm/mach-orion5x/db88f5281-setup.c +++ b/arch/arm/mach-orion5x/db88f5281-setup.c | |||
@@ -241,14 +241,17 @@ void __init db88f5281_pci_preinit(void) | |||
241 | 241 | ||
242 | static int __init db88f5281_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 242 | static int __init db88f5281_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) |
243 | { | 243 | { |
244 | int irq; | ||
245 | |||
244 | /* | 246 | /* |
245 | * PCIE IRQ is connected internally (not GPIO) | 247 | * Check for devices with hard-wired IRQs. |
246 | */ | 248 | */ |
247 | if (dev->bus->number == orion5x_pcie_local_bus_nr()) | 249 | irq = orion5x_pci_map_irq(dev, slot, pin); |
248 | return IRQ_ORION5X_PCIE0_INT; | 250 | if (irq != -1) |
251 | return irq; | ||
249 | 252 | ||
250 | /* | 253 | /* |
251 | * PCI IRQs are connected via GPIOs | 254 | * PCI IRQs are connected via GPIOs. |
252 | */ | 255 | */ |
253 | switch (slot - DB88F5281_PCI_SLOT0_OFFS) { | 256 | switch (slot - DB88F5281_PCI_SLOT0_OFFS) { |
254 | case 0: | 257 | case 0: |
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index 058a525c2ab6..f9430f5ca9a8 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c | |||
@@ -43,11 +43,16 @@ | |||
43 | 43 | ||
44 | static int __init dns323_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 44 | static int __init dns323_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) |
45 | { | 45 | { |
46 | /* PCI-E */ | 46 | int irq; |
47 | if (dev->bus->number == orion5x_pcie_local_bus_nr()) | ||
48 | return IRQ_ORION5X_PCIE0_INT; | ||
49 | 47 | ||
50 | pr_err("%s: requested mapping for unknown bus\n", __func__); | 48 | /* |
49 | * Check for devices with hard-wired IRQs. | ||
50 | */ | ||
51 | irq = orion5x_pci_map_irq(dev, slot, pin); | ||
52 | if (irq != -1) | ||
53 | return irq; | ||
54 | |||
55 | pr_err("%s: requested mapping for unknown device\n", __func__); | ||
51 | 56 | ||
52 | return -1; | 57 | return -1; |
53 | } | 58 | } |
@@ -250,9 +255,9 @@ static void __init dns323_init(void) | |||
250 | */ | 255 | */ |
251 | orion5x_setup_dev_boot_win(DNS323_NOR_BOOT_BASE, DNS323_NOR_BOOT_SIZE); | 256 | orion5x_setup_dev_boot_win(DNS323_NOR_BOOT_BASE, DNS323_NOR_BOOT_SIZE); |
252 | 257 | ||
253 | /* DNS-323 has a Marvell 88X7042 SATA controller attached via PCIE | 258 | /* DNS-323 has a Marvell 88X7042 SATA controller attached via PCIe |
254 | * | 259 | * |
255 | * Open a special address decode windows for the PCIE WA. | 260 | * Open a special address decode windows for the PCIe WA. |
256 | */ | 261 | */ |
257 | orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, | 262 | orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, |
258 | ORION5X_PCIE_WA_SIZE); | 263 | ORION5X_PCIE_WA_SIZE); |
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c index 707db4be74a6..88410862feef 100644 --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c | |||
@@ -120,13 +120,19 @@ static struct platform_device kurobox_pro_nor_flash = { | |||
120 | 120 | ||
121 | static int __init kurobox_pro_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 121 | static int __init kurobox_pro_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) |
122 | { | 122 | { |
123 | int irq; | ||
124 | |||
125 | /* | ||
126 | * Check for devices with hard-wired IRQs. | ||
127 | */ | ||
128 | irq = orion5x_pci_map_irq(dev, slot, pin); | ||
129 | if (irq != -1) | ||
130 | return irq; | ||
131 | |||
123 | /* | 132 | /* |
124 | * PCI isn't used on the Kuro | 133 | * PCI isn't used on the Kuro |
125 | */ | 134 | */ |
126 | if (dev->bus->number == orion5x_pcie_local_bus_nr()) | 135 | printk(KERN_ERR "kurobox_pro_pci_map_irq failed, unknown bus\n"); |
127 | return IRQ_ORION5X_PCIE0_INT; | ||
128 | else | ||
129 | printk(KERN_ERR "kurobox_pro_pci_map_irq failed, unknown bus\n"); | ||
130 | 136 | ||
131 | return -1; | 137 | return -1; |
132 | } | 138 | } |
@@ -191,7 +197,7 @@ static void __init kurobox_pro_init(void) | |||
191 | orion5x_setup_dev0_win(KUROBOX_PRO_NAND_BASE, KUROBOX_PRO_NAND_SIZE); | 197 | orion5x_setup_dev0_win(KUROBOX_PRO_NAND_BASE, KUROBOX_PRO_NAND_SIZE); |
192 | 198 | ||
193 | /* | 199 | /* |
194 | * Open a special address decode windows for the PCIE WA. | 200 | * Open a special address decode windows for the PCIe WA. |
195 | */ | 201 | */ |
196 | orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, | 202 | orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, |
197 | ORION5X_PCIE_WA_SIZE); | 203 | ORION5X_PCIE_WA_SIZE); |
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index fdf99fca85b3..9d5d39fa19c3 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c | |||
@@ -41,11 +41,6 @@ void __init orion5x_pcie_id(u32 *dev, u32 *rev) | |||
41 | *rev = orion_pcie_rev(PCIE_BASE); | 41 | *rev = orion_pcie_rev(PCIE_BASE); |
42 | } | 42 | } |
43 | 43 | ||
44 | int __init orion5x_pcie_local_bus_nr(void) | ||
45 | { | ||
46 | return orion_pcie_get_local_bus_nr(PCIE_BASE); | ||
47 | } | ||
48 | |||
49 | static int pcie_valid_config(int bus, int dev) | 44 | static int pcie_valid_config(int bus, int dev) |
50 | { | 45 | { |
51 | /* | 46 | /* |
@@ -269,7 +264,7 @@ static int __init pcie_setup(struct pci_sys_data *sys) | |||
269 | */ | 264 | */ |
270 | static DEFINE_SPINLOCK(orion5x_pci_lock); | 265 | static DEFINE_SPINLOCK(orion5x_pci_lock); |
271 | 266 | ||
272 | int orion5x_pci_local_bus_nr(void) | 267 | static int orion5x_pci_local_bus_nr(void) |
273 | { | 268 | { |
274 | u32 conf = orion5x_read(PCI_P2P_CONF); | 269 | u32 conf = orion5x_read(PCI_P2P_CONF); |
275 | return((conf & PCI_P2P_BUS_MASK) >> PCI_P2P_BUS_OFFS); | 270 | return((conf & PCI_P2P_BUS_MASK) >> PCI_P2P_BUS_OFFS); |
@@ -557,3 +552,16 @@ struct pci_bus __init *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys | |||
557 | 552 | ||
558 | return bus; | 553 | return bus; |
559 | } | 554 | } |
555 | |||
556 | int __init orion5x_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | ||
557 | { | ||
558 | int bus = dev->bus->number; | ||
559 | |||
560 | /* | ||
561 | * PCIe endpoint? | ||
562 | */ | ||
563 | if (bus < orion5x_pci_local_bus_nr()) | ||
564 | return IRQ_ORION5X_PCIE0_INT; | ||
565 | |||
566 | return -1; | ||
567 | } | ||
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c index 7082fe8f83b1..81abc1003aae 100644 --- a/arch/arm/mach-orion5x/rd88f5182-setup.c +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c | |||
@@ -172,11 +172,14 @@ void __init rd88f5182_pci_preinit(void) | |||
172 | 172 | ||
173 | static int __init rd88f5182_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 173 | static int __init rd88f5182_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) |
174 | { | 174 | { |
175 | int irq; | ||
176 | |||
175 | /* | 177 | /* |
176 | * PCI-E isn't used on the RD2 | 178 | * Check for devices with hard-wired IRQs. |
177 | */ | 179 | */ |
178 | if (dev->bus->number == orion5x_pcie_local_bus_nr()) | 180 | irq = orion5x_pci_map_irq(dev, slot, pin); |
179 | return IRQ_ORION5X_PCIE0_INT; | 181 | if (irq != -1) |
182 | return irq; | ||
180 | 183 | ||
181 | /* | 184 | /* |
182 | * PCI IRQs are connected via GPIOs | 185 | * PCI IRQs are connected via GPIOs |
@@ -257,7 +260,7 @@ static void __init rd88f5182_init(void) | |||
257 | orion5x_setup_dev1_win(RD88F5182_NOR_BASE, RD88F5182_NOR_SIZE); | 260 | orion5x_setup_dev1_win(RD88F5182_NOR_BASE, RD88F5182_NOR_SIZE); |
258 | 261 | ||
259 | /* | 262 | /* |
260 | * Open a special address decode windows for the PCIE WA. | 263 | * Open a special address decode windows for the PCIe WA. |
261 | */ | 264 | */ |
262 | orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, | 265 | orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, |
263 | ORION5X_PCIE_WA_SIZE); | 266 | ORION5X_PCIE_WA_SIZE); |
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c index 6f93668b0ed5..9afb41ee6e07 100644 --- a/arch/arm/mach-orion5x/ts209-setup.c +++ b/arch/arm/mach-orion5x/ts209-setup.c | |||
@@ -141,14 +141,17 @@ void __init qnap_ts209_pci_preinit(void) | |||
141 | 141 | ||
142 | static int __init qnap_ts209_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 142 | static int __init qnap_ts209_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) |
143 | { | 143 | { |
144 | int irq; | ||
145 | |||
144 | /* | 146 | /* |
145 | * PCIE IRQ is connected internally (not GPIO) | 147 | * Check for devices with hard-wired IRQs. |
146 | */ | 148 | */ |
147 | if (dev->bus->number == orion5x_pcie_local_bus_nr()) | 149 | irq = orion5x_pci_map_irq(dev, slot, pin); |
148 | return IRQ_ORION5X_PCIE0_INT; | 150 | if (irq != -1) |
151 | return irq; | ||
149 | 152 | ||
150 | /* | 153 | /* |
151 | * PCI IRQs are connected via GPIOs | 154 | * PCI IRQs are connected via GPIOs. |
152 | */ | 155 | */ |
153 | switch (slot - QNAP_TS209_PCI_SLOT0_OFFS) { | 156 | switch (slot - QNAP_TS209_PCI_SLOT0_OFFS) { |
154 | case 0: | 157 | case 0: |
@@ -372,7 +375,7 @@ static void __init qnap_ts209_init(void) | |||
372 | QNAP_TS209_NOR_BOOT_SIZE); | 375 | QNAP_TS209_NOR_BOOT_SIZE); |
373 | 376 | ||
374 | /* | 377 | /* |
375 | * Open a special address decode windows for the PCIE WA. | 378 | * Open a special address decode windows for the PCIe WA. |
376 | */ | 379 | */ |
377 | orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, | 380 | orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, |
378 | ORION5X_PCIE_WA_SIZE); | 381 | ORION5X_PCIE_WA_SIZE); |