diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-19 20:40:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-19 20:40:40 -0400 |
commit | 773d7a09e1a1349a5319ac8665e9c612c6aa27d8 (patch) | |
tree | 3b2272bb3cfcab04ba6459cba116e577278c9392 /arch/powerpc/platforms/86xx | |
parent | 17fad5209e6b55148dbd20156cdaf2c7e67faa40 (diff) | |
parent | b71a107c66ad952c9d35ec046a803efc89a80556 (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (35 commits)
powerpc/5121: make clock debug output more readable
powerpc/5xxx: Add common mpc5xxx_get_bus_frequency() function
powerpc/5200: Update pcm030.dts to add i2c eeprom and delete cruft
powerpc/5200: convert mpc52xx_psc_spi to use cs_control callback
fbdev/xilinxfb: Fix improper casting and tighen up probe path
usb/ps3: Add missing annotations
powerpc: Add memory clobber to mtspr()
powerpc: Fix invalid construct in our CPU selection Kconfig
ps3rom: Use ps3_system_bus_[gs]et_drvdata() instead of direct access
powerpc: Add configurable -Werror for arch/powerpc
of_serial: Add UPF_FIXED_TYPE flag
drivers/hvc: Add missing __devexit_p()
net/ps3: gelic - Add missing annotations
powerpc: Introduce macro spin_event_timeout()
powerpc/warp: Fix ISA_DMA_THRESHOLD default
powerpc/bootwrapper: Custom build options for XPedite52xx targets
powerpc/85xx: Add defconfig for X-ES MPC85xx boards
powerpc/85xx: Add dts files for X-ES MPC85xx boards
powerpc/85xx: Add platform support for X-ES MPC85xx boards
83xx: add support for the kmeter1 board.
...
Diffstat (limited to 'arch/powerpc/platforms/86xx')
-rw-r--r-- | arch/powerpc/platforms/86xx/Kconfig | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig index fdaf4ddaa955..9c7b64a3402b 100644 --- a/arch/powerpc/platforms/86xx/Kconfig +++ b/arch/powerpc/platforms/86xx/Kconfig | |||
@@ -15,6 +15,7 @@ config MPC8641_HPCN | |||
15 | select DEFAULT_UIMAGE | 15 | select DEFAULT_UIMAGE |
16 | select FSL_ULI1575 | 16 | select FSL_ULI1575 |
17 | select HAS_RAPIDIO | 17 | select HAS_RAPIDIO |
18 | select SWIOTLB | ||
18 | help | 19 | help |
19 | This option enables support for the MPC8641 HPCN board. | 20 | This option enables support for the MPC8641 HPCN board. |
20 | 21 | ||
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c index 7e9e83c04a8a..66327024a6a6 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/seq_file.h> | 20 | #include <linux/seq_file.h> |
21 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
22 | #include <linux/lmb.h> | ||
22 | 23 | ||
23 | #include <asm/system.h> | 24 | #include <asm/system.h> |
24 | #include <asm/time.h> | 25 | #include <asm/time.h> |
@@ -27,6 +28,7 @@ | |||
27 | #include <asm/prom.h> | 28 | #include <asm/prom.h> |
28 | #include <mm/mmu_decl.h> | 29 | #include <mm/mmu_decl.h> |
29 | #include <asm/udbg.h> | 30 | #include <asm/udbg.h> |
31 | #include <asm/swiotlb.h> | ||
30 | 32 | ||
31 | #include <asm/mpic.h> | 33 | #include <asm/mpic.h> |
32 | 34 | ||
@@ -70,7 +72,9 @@ mpc86xx_hpcn_setup_arch(void) | |||
70 | { | 72 | { |
71 | #ifdef CONFIG_PCI | 73 | #ifdef CONFIG_PCI |
72 | struct device_node *np; | 74 | struct device_node *np; |
75 | struct pci_controller *hose; | ||
73 | #endif | 76 | #endif |
77 | dma_addr_t max = 0xffffffff; | ||
74 | 78 | ||
75 | if (ppc_md.progress) | 79 | if (ppc_md.progress) |
76 | ppc_md.progress("mpc86xx_hpcn_setup_arch()", 0); | 80 | ppc_md.progress("mpc86xx_hpcn_setup_arch()", 0); |
@@ -83,6 +87,9 @@ mpc86xx_hpcn_setup_arch(void) | |||
83 | fsl_add_bridge(np, 1); | 87 | fsl_add_bridge(np, 1); |
84 | else | 88 | else |
85 | fsl_add_bridge(np, 0); | 89 | fsl_add_bridge(np, 0); |
90 | hose = pci_find_hose_for_OF_device(np); | ||
91 | max = min(max, hose->dma_window_base_cur + | ||
92 | hose->dma_window_size); | ||
86 | } | 93 | } |
87 | 94 | ||
88 | ppc_md.pci_exclude_device = mpc86xx_exclude_device; | 95 | ppc_md.pci_exclude_device = mpc86xx_exclude_device; |
@@ -94,6 +101,13 @@ mpc86xx_hpcn_setup_arch(void) | |||
94 | #ifdef CONFIG_SMP | 101 | #ifdef CONFIG_SMP |
95 | mpc86xx_smp_init(); | 102 | mpc86xx_smp_init(); |
96 | #endif | 103 | #endif |
104 | |||
105 | #ifdef CONFIG_SWIOTLB | ||
106 | if (lmb_end_of_DRAM() > max) { | ||
107 | ppc_swiotlb_enable = 1; | ||
108 | set_pci_dma_ops(&swiotlb_pci_dma_ops); | ||
109 | } | ||
110 | #endif | ||
97 | } | 111 | } |
98 | 112 | ||
99 | 113 | ||
@@ -158,6 +172,7 @@ static int __init declare_of_platform_devices(void) | |||
158 | return 0; | 172 | return 0; |
159 | } | 173 | } |
160 | machine_device_initcall(mpc86xx_hpcn, declare_of_platform_devices); | 174 | machine_device_initcall(mpc86xx_hpcn, declare_of_platform_devices); |
175 | machine_arch_initcall(mpc86xx_hpcn, swiotlb_setup_bus_notifier); | ||
161 | 176 | ||
162 | define_machine(mpc86xx_hpcn) { | 177 | define_machine(mpc86xx_hpcn) { |
163 | .name = "MPC86xx HPCN", | 178 | .name = "MPC86xx HPCN", |