diff options
Diffstat (limited to 'arch/powerpc/platforms/85xx')
-rw-r--r-- | arch/powerpc/platforms/85xx/Kconfig | 14 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/Makefile | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc8536_ds.c | 125 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ads.c | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_cds.c | 14 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_ds.c | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/tqm85xx.c | 23 |
7 files changed, 183 insertions, 14 deletions
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index ecbe580c3f32..cebea5cadbc1 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig | |||
@@ -38,6 +38,12 @@ config MPC85xx_MDS | |||
38 | help | 38 | help |
39 | This option enables support for the MPC85xx MDS board | 39 | This option enables support for the MPC85xx MDS board |
40 | 40 | ||
41 | config MPC8536_DS | ||
42 | bool "Freescale MPC8536 DS" | ||
43 | select DEFAULT_UIMAGE | ||
44 | help | ||
45 | This option enables support for the MPC8536 DS board | ||
46 | |||
41 | config MPC85xx_DS | 47 | config MPC85xx_DS |
42 | bool "Freescale MPC85xx DS" | 48 | bool "Freescale MPC85xx DS" |
43 | select PPC_I8259 | 49 | select PPC_I8259 |
@@ -75,6 +81,14 @@ config TQM8541 | |||
75 | select TQM85xx | 81 | select TQM85xx |
76 | select CPM2 | 82 | select CPM2 |
77 | 83 | ||
84 | config TQM8548 | ||
85 | bool "TQ Components TQM8548" | ||
86 | help | ||
87 | This option enables support for the TQ Components TQM8548 board. | ||
88 | select DEFAULT_UIMAGE | ||
89 | select PPC_CPM_NEW_BINDING | ||
90 | select TQM85xx | ||
91 | |||
78 | config TQM8555 | 92 | config TQM8555 |
79 | bool "TQ Components TQM8555" | 93 | bool "TQ Components TQM8555" |
80 | help | 94 | help |
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile index 6cea185f62b2..cb3054e1001d 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile | |||
@@ -4,6 +4,7 @@ | |||
4 | obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o | 4 | obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o |
5 | obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o | 5 | obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o |
6 | obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o | 6 | obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o |
7 | obj-$(CONFIG_MPC8536_DS) += mpc8536_ds.o | ||
7 | obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o | 8 | obj-$(CONFIG_MPC85xx_DS) += mpc85xx_ds.o |
8 | obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o | 9 | obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o |
9 | obj-$(CONFIG_STX_GP3) += stx_gp3.o | 10 | obj-$(CONFIG_STX_GP3) += stx_gp3.o |
diff --git a/arch/powerpc/platforms/85xx/mpc8536_ds.c b/arch/powerpc/platforms/85xx/mpc8536_ds.c new file mode 100644 index 000000000000..6b846aa1ced9 --- /dev/null +++ b/arch/powerpc/platforms/85xx/mpc8536_ds.c | |||
@@ -0,0 +1,125 @@ | |||
1 | /* | ||
2 | * MPC8536 DS Board Setup | ||
3 | * | ||
4 | * Copyright 2008 Freescale Semiconductor, Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/stddef.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/pci.h> | ||
15 | #include <linux/kdev_t.h> | ||
16 | #include <linux/delay.h> | ||
17 | #include <linux/seq_file.h> | ||
18 | #include <linux/interrupt.h> | ||
19 | #include <linux/of_platform.h> | ||
20 | |||
21 | #include <asm/system.h> | ||
22 | #include <asm/time.h> | ||
23 | #include <asm/machdep.h> | ||
24 | #include <asm/pci-bridge.h> | ||
25 | #include <mm/mmu_decl.h> | ||
26 | #include <asm/prom.h> | ||
27 | #include <asm/udbg.h> | ||
28 | #include <asm/mpic.h> | ||
29 | |||
30 | #include <sysdev/fsl_soc.h> | ||
31 | #include <sysdev/fsl_pci.h> | ||
32 | |||
33 | void __init mpc8536_ds_pic_init(void) | ||
34 | { | ||
35 | struct mpic *mpic; | ||
36 | struct resource r; | ||
37 | struct device_node *np; | ||
38 | |||
39 | np = of_find_node_by_type(NULL, "open-pic"); | ||
40 | if (np == NULL) { | ||
41 | printk(KERN_ERR "Could not find open-pic node\n"); | ||
42 | return; | ||
43 | } | ||
44 | |||
45 | if (of_address_to_resource(np, 0, &r)) { | ||
46 | printk(KERN_ERR "Failed to map mpic register space\n"); | ||
47 | of_node_put(np); | ||
48 | return; | ||
49 | } | ||
50 | |||
51 | mpic = mpic_alloc(np, r.start, | ||
52 | MPIC_PRIMARY | MPIC_WANTS_RESET | | ||
53 | MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS, | ||
54 | 0, 256, " OpenPIC "); | ||
55 | BUG_ON(mpic == NULL); | ||
56 | of_node_put(np); | ||
57 | |||
58 | mpic_init(mpic); | ||
59 | } | ||
60 | |||
61 | /* | ||
62 | * Setup the architecture | ||
63 | */ | ||
64 | static void __init mpc8536_ds_setup_arch(void) | ||
65 | { | ||
66 | #ifdef CONFIG_PCI | ||
67 | struct device_node *np; | ||
68 | #endif | ||
69 | |||
70 | if (ppc_md.progress) | ||
71 | ppc_md.progress("mpc8536_ds_setup_arch()", 0); | ||
72 | |||
73 | #ifdef CONFIG_PCI | ||
74 | for_each_node_by_type(np, "pci") { | ||
75 | if (of_device_is_compatible(np, "fsl,mpc8540-pci") || | ||
76 | of_device_is_compatible(np, "fsl,mpc8548-pcie")) { | ||
77 | struct resource rsrc; | ||
78 | of_address_to_resource(np, 0, &rsrc); | ||
79 | if ((rsrc.start & 0xfffff) == 0x8000) | ||
80 | fsl_add_bridge(np, 1); | ||
81 | else | ||
82 | fsl_add_bridge(np, 0); | ||
83 | } | ||
84 | } | ||
85 | |||
86 | #endif | ||
87 | |||
88 | printk("MPC8536 DS board from Freescale Semiconductor\n"); | ||
89 | } | ||
90 | |||
91 | static struct of_device_id __initdata mpc8536_ds_ids[] = { | ||
92 | { .type = "soc", }, | ||
93 | { .compatible = "soc", }, | ||
94 | {}, | ||
95 | }; | ||
96 | |||
97 | static int __init mpc8536_ds_publish_devices(void) | ||
98 | { | ||
99 | return of_platform_bus_probe(NULL, mpc8536_ds_ids, NULL); | ||
100 | } | ||
101 | machine_device_initcall(mpc8536_ds, mpc8536_ds_publish_devices); | ||
102 | |||
103 | /* | ||
104 | * Called very early, device-tree isn't unflattened | ||
105 | */ | ||
106 | static int __init mpc8536_ds_probe(void) | ||
107 | { | ||
108 | unsigned long root = of_get_flat_dt_root(); | ||
109 | |||
110 | return of_flat_dt_is_compatible(root, "fsl,mpc8536ds"); | ||
111 | } | ||
112 | |||
113 | define_machine(mpc8536_ds) { | ||
114 | .name = "MPC8536 DS", | ||
115 | .probe = mpc8536_ds_probe, | ||
116 | .setup_arch = mpc8536_ds_setup_arch, | ||
117 | .init_IRQ = mpc8536_ds_pic_init, | ||
118 | #ifdef CONFIG_PCI | ||
119 | .pcibios_fixup_bus = fsl_pcibios_fixup_bus, | ||
120 | #endif | ||
121 | .get_irq = mpic_get_irq, | ||
122 | .restart = fsl_rstcr_restart, | ||
123 | .calibrate_decr = generic_calibrate_decr, | ||
124 | .progress = udbg_progress, | ||
125 | }; | ||
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c index 3582c841844b..ba498d6f2d02 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c | |||
@@ -119,6 +119,8 @@ static const struct cpm_pin mpc8560_ads_pins[] = { | |||
119 | {3, 31, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 119 | {3, 31, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
120 | 120 | ||
121 | /* SCC2 */ | 121 | /* SCC2 */ |
122 | {2, 12, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
123 | {2, 13, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | ||
122 | {3, 26, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | 124 | {3, 26, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, |
123 | {3, 27, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | 125 | {3, 27, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, |
124 | {3, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 126 | {3, 28, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
@@ -145,7 +147,6 @@ static const struct cpm_pin mpc8560_ads_pins[] = { | |||
145 | {1, 4, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | 147 | {1, 4, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, |
146 | {1, 5, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | 148 | {1, 5, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, |
147 | {1, 6, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | 149 | {1, 6, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, |
148 | {1, 7, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
149 | {1, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 150 | {1, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
150 | {1, 9, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 151 | {1, 9, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
151 | {1, 10, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 152 | {1, 10, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
@@ -156,8 +157,9 @@ static const struct cpm_pin mpc8560_ads_pins[] = { | |||
156 | {1, 15, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | 157 | {1, 15, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, |
157 | {1, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 158 | {1, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
158 | {1, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, | 159 | {1, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, |
159 | {2, 16, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* CLK16 */ | 160 | {2, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK16 */ |
160 | {2, 17, CPM_PIN_INPUT | CPM_PIN_SECONDARY}, /* CLK15 */ | 161 | {2, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* CLK15 */ |
162 | {2, 27, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, | ||
161 | }; | 163 | }; |
162 | 164 | ||
163 | static void __init init_ioports(void) | 165 | static void __init init_ioports(void) |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c index 8b1de7884be6..50d7ea8f922b 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <linux/fsl_devices.h> | 28 | #include <linux/fsl_devices.h> |
29 | #include <linux/of_platform.h> | ||
29 | 30 | ||
30 | #include <asm/system.h> | 31 | #include <asm/system.h> |
31 | #include <asm/pgtable.h> | 32 | #include <asm/pgtable.h> |
@@ -335,6 +336,19 @@ static int __init mpc85xx_cds_probe(void) | |||
335 | return of_flat_dt_is_compatible(root, "MPC85xxCDS"); | 336 | return of_flat_dt_is_compatible(root, "MPC85xxCDS"); |
336 | } | 337 | } |
337 | 338 | ||
339 | static struct of_device_id __initdata of_bus_ids[] = { | ||
340 | { .type = "soc", }, | ||
341 | { .compatible = "soc", }, | ||
342 | { .compatible = "simple-bus", }, | ||
343 | {}, | ||
344 | }; | ||
345 | |||
346 | static int __init declare_of_platform_devices(void) | ||
347 | { | ||
348 | return of_platform_bus_probe(NULL, of_bus_ids, NULL); | ||
349 | } | ||
350 | machine_device_initcall(mpc85xx_cds, declare_of_platform_devices); | ||
351 | |||
338 | define_machine(mpc85xx_cds) { | 352 | define_machine(mpc85xx_cds) { |
339 | .name = "MPC85xx CDS", | 353 | .name = "MPC85xx CDS", |
340 | .probe = mpc85xx_cds_probe, | 354 | .probe = mpc85xx_cds_probe, |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index dfd8b4ad9b28..25f41cd2d33a 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c | |||
@@ -58,14 +58,13 @@ void __init mpc85xx_ds_pic_init(void) | |||
58 | { | 58 | { |
59 | struct mpic *mpic; | 59 | struct mpic *mpic; |
60 | struct resource r; | 60 | struct resource r; |
61 | struct device_node *np = NULL; | 61 | struct device_node *np; |
62 | #ifdef CONFIG_PPC_I8259 | 62 | #ifdef CONFIG_PPC_I8259 |
63 | struct device_node *cascade_node = NULL; | 63 | struct device_node *cascade_node = NULL; |
64 | int cascade_irq; | 64 | int cascade_irq; |
65 | #endif | 65 | #endif |
66 | 66 | ||
67 | np = of_find_node_by_type(np, "open-pic"); | 67 | np = of_find_node_by_type(NULL, "open-pic"); |
68 | |||
69 | if (np == NULL) { | 68 | if (np == NULL) { |
70 | printk(KERN_ERR "Could not find open-pic node\n"); | 69 | printk(KERN_ERR "Could not find open-pic node\n"); |
71 | return; | 70 | return; |
@@ -78,9 +77,11 @@ void __init mpc85xx_ds_pic_init(void) | |||
78 | } | 77 | } |
79 | 78 | ||
80 | mpic = mpic_alloc(np, r.start, | 79 | mpic = mpic_alloc(np, r.start, |
81 | MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, | 80 | MPIC_PRIMARY | MPIC_WANTS_RESET | |
81 | MPIC_BIG_ENDIAN | MPIC_BROKEN_FRR_NIRQS, | ||
82 | 0, 256, " OpenPIC "); | 82 | 0, 256, " OpenPIC "); |
83 | BUG_ON(mpic == NULL); | 83 | BUG_ON(mpic == NULL); |
84 | of_node_put(np); | ||
84 | 85 | ||
85 | mpic_init(mpic); | 86 | mpic_init(mpic); |
86 | 87 | ||
@@ -184,7 +185,7 @@ static int __init mpc8544_ds_probe(void) | |||
184 | } | 185 | } |
185 | } | 186 | } |
186 | 187 | ||
187 | static struct of_device_id mpc85xxds_ids[] = { | 188 | static struct of_device_id __initdata mpc85xxds_ids[] = { |
188 | { .type = "soc", }, | 189 | { .type = "soc", }, |
189 | { .compatible = "soc", }, | 190 | { .compatible = "soc", }, |
190 | {}, | 191 | {}, |
@@ -195,6 +196,7 @@ static int __init mpc85xxds_publish_devices(void) | |||
195 | return of_platform_bus_probe(NULL, mpc85xxds_ids, NULL); | 196 | return of_platform_bus_probe(NULL, mpc85xxds_ids, NULL); |
196 | } | 197 | } |
197 | machine_device_initcall(mpc8544_ds, mpc85xxds_publish_devices); | 198 | machine_device_initcall(mpc8544_ds, mpc85xxds_publish_devices); |
199 | machine_device_initcall(mpc8572_ds, mpc85xxds_publish_devices); | ||
198 | 200 | ||
199 | /* | 201 | /* |
200 | * Called very early, device-tree isn't unflattened | 202 | * Called very early, device-tree isn't unflattened |
diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c index 77681acf1bae..d850880d6964 100644 --- a/arch/powerpc/platforms/85xx/tqm85xx.c +++ b/arch/powerpc/platforms/85xx/tqm85xx.c | |||
@@ -120,8 +120,18 @@ static void __init tqm85xx_setup_arch(void) | |||
120 | #endif | 120 | #endif |
121 | 121 | ||
122 | #ifdef CONFIG_PCI | 122 | #ifdef CONFIG_PCI |
123 | for_each_compatible_node(np, "pci", "fsl,mpc8540-pci") | 123 | for_each_node_by_type(np, "pci") { |
124 | fsl_add_bridge(np, 1); | 124 | if (of_device_is_compatible(np, "fsl,mpc8540-pci") || |
125 | of_device_is_compatible(np, "fsl,mpc8548-pcie")) { | ||
126 | struct resource rsrc; | ||
127 | if (!of_address_to_resource(np, 0, &rsrc)) { | ||
128 | if ((rsrc.start & 0xfffff) == 0x8000) | ||
129 | fsl_add_bridge(np, 1); | ||
130 | else | ||
131 | fsl_add_bridge(np, 0); | ||
132 | } | ||
133 | } | ||
134 | } | ||
125 | #endif | 135 | #endif |
126 | } | 136 | } |
127 | 137 | ||
@@ -165,10 +175,11 @@ static int __init tqm85xx_probe(void) | |||
165 | { | 175 | { |
166 | unsigned long root = of_get_flat_dt_root(); | 176 | unsigned long root = of_get_flat_dt_root(); |
167 | 177 | ||
168 | if ((of_flat_dt_is_compatible(root, "tqm,8540")) || | 178 | if ((of_flat_dt_is_compatible(root, "tqc,tqm8540")) || |
169 | (of_flat_dt_is_compatible(root, "tqm,8541")) || | 179 | (of_flat_dt_is_compatible(root, "tqc,tqm8541")) || |
170 | (of_flat_dt_is_compatible(root, "tqm,8555")) || | 180 | (of_flat_dt_is_compatible(root, "tqc,tqm8548")) || |
171 | (of_flat_dt_is_compatible(root, "tqm,8560"))) | 181 | (of_flat_dt_is_compatible(root, "tqc,tqm8555")) || |
182 | (of_flat_dt_is_compatible(root, "tqc,tqm8560"))) | ||
172 | return 1; | 183 | return 1; |
173 | 184 | ||
174 | return 0; | 185 | return 0; |