diff options
Diffstat (limited to 'arch/powerpc/platforms/85xx/mpc8536_ds.c')
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc8536_ds.c | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/arch/powerpc/platforms/85xx/mpc8536_ds.c b/arch/powerpc/platforms/85xx/mpc8536_ds.c index 767c7cf18a9c..15ce4b55f117 100644 --- a/arch/powerpc/platforms/85xx/mpc8536_ds.c +++ b/arch/powerpc/platforms/85xx/mpc8536_ds.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/seq_file.h> | 17 | #include <linux/seq_file.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/of_platform.h> | 19 | #include <linux/of_platform.h> |
20 | #include <linux/memblock.h> | ||
21 | 20 | ||
22 | #include <asm/time.h> | 21 | #include <asm/time.h> |
23 | #include <asm/machdep.h> | 22 | #include <asm/machdep.h> |
@@ -46,46 +45,17 @@ void __init mpc8536_ds_pic_init(void) | |||
46 | */ | 45 | */ |
47 | static void __init mpc8536_ds_setup_arch(void) | 46 | static void __init mpc8536_ds_setup_arch(void) |
48 | { | 47 | { |
49 | #ifdef CONFIG_PCI | ||
50 | struct device_node *np; | ||
51 | struct pci_controller *hose; | ||
52 | #endif | ||
53 | dma_addr_t max = 0xffffffff; | ||
54 | |||
55 | if (ppc_md.progress) | 48 | if (ppc_md.progress) |
56 | ppc_md.progress("mpc8536_ds_setup_arch()", 0); | 49 | ppc_md.progress("mpc8536_ds_setup_arch()", 0); |
57 | 50 | ||
58 | #ifdef CONFIG_PCI | 51 | fsl_pci_assign_primary(); |
59 | for_each_node_by_type(np, "pci") { | ||
60 | if (of_device_is_compatible(np, "fsl,mpc8540-pci") || | ||
61 | of_device_is_compatible(np, "fsl,mpc8548-pcie")) { | ||
62 | struct resource rsrc; | ||
63 | of_address_to_resource(np, 0, &rsrc); | ||
64 | if ((rsrc.start & 0xfffff) == 0x8000) | ||
65 | fsl_add_bridge(np, 1); | ||
66 | else | ||
67 | fsl_add_bridge(np, 0); | ||
68 | |||
69 | hose = pci_find_hose_for_OF_device(np); | ||
70 | max = min(max, hose->dma_window_base_cur + | ||
71 | hose->dma_window_size); | ||
72 | } | ||
73 | } | ||
74 | |||
75 | #endif | ||
76 | 52 | ||
77 | #ifdef CONFIG_SWIOTLB | 53 | swiotlb_detect_4g(); |
78 | if ((memblock_end_of_DRAM() - 1) > max) { | ||
79 | ppc_swiotlb_enable = 1; | ||
80 | set_pci_dma_ops(&swiotlb_dma_ops); | ||
81 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; | ||
82 | } | ||
83 | #endif | ||
84 | 54 | ||
85 | printk("MPC8536 DS board from Freescale Semiconductor\n"); | 55 | printk("MPC8536 DS board from Freescale Semiconductor\n"); |
86 | } | 56 | } |
87 | 57 | ||
88 | machine_device_initcall(mpc8536_ds, mpc85xx_common_publish_devices); | 58 | machine_arch_initcall(mpc8536_ds, mpc85xx_common_publish_devices); |
89 | 59 | ||
90 | machine_arch_initcall(mpc8536_ds, swiotlb_setup_bus_notifier); | 60 | machine_arch_initcall(mpc8536_ds, swiotlb_setup_bus_notifier); |
91 | 61 | ||