aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorHolger Brunck <holger.brunck@keymile.com>2011-03-11 02:02:44 -0500
committerKumar Gala <galak@kernel.crashing.org>2011-03-15 11:06:37 -0400
commit93e2b95c81042da479656b213acc92f7542c6c39 (patch)
tree288e5ce19e7d5699877c6173bc0e091c690d99d7 /arch/powerpc/platforms
parentac6f120369ffe66058518fabf90cdd53b2503a82 (diff)
powerpc/83xx: rename and update kmeter1
Beside the MPC 8360 based board kmeter1 other km83xx boards from keymile will follow. Therefore the board specific naming kmeter1 for functions and files were replaced with km83xx. Additionally some updates were made: - update defconfig for 2.6.38 - rework flash partitioning in dts file - add gpio controller for qe_pio_c in dts Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Acked-by: Heiko Schocher <hs@denx.de> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: Heiko Schocher <hs@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/83xx/Makefile2
-rw-r--r--arch/powerpc/platforms/83xx/km83xx.c (renamed from arch/powerpc/platforms/83xx/kmeter1.c)46
2 files changed, 32 insertions, 16 deletions
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile
index 6e8bbbbcfdf..ed95bfcbcbf 100644
--- a/arch/powerpc/platforms/83xx/Makefile
+++ b/arch/powerpc/platforms/83xx/Makefile
@@ -16,4 +16,4 @@ obj-$(CONFIG_MPC837x_MDS) += mpc837x_mds.o
16obj-$(CONFIG_SBC834x) += sbc834x.o 16obj-$(CONFIG_SBC834x) += sbc834x.o
17obj-$(CONFIG_MPC837x_RDB) += mpc837x_rdb.o 17obj-$(CONFIG_MPC837x_RDB) += mpc837x_rdb.o
18obj-$(CONFIG_ASP834x) += asp834x.o 18obj-$(CONFIG_ASP834x) += asp834x.o
19obj-$(CONFIG_KMETER1) += kmeter1.o 19obj-$(CONFIG_KMETER1) += km83xx.o
diff --git a/arch/powerpc/platforms/83xx/kmeter1.c b/arch/powerpc/platforms/83xx/km83xx.c
index 903acfd851a..a2b9b9ef124 100644
--- a/arch/powerpc/platforms/83xx/kmeter1.c
+++ b/arch/powerpc/platforms/83xx/km83xx.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright 2008 DENX Software Engineering GmbH 2 * Copyright 2008-2011 DENX Software Engineering GmbH
3 * Author: Heiko Schocher <hs@denx.de> 3 * Author: Heiko Schocher <hs@denx.de>
4 * 4 *
5 * Description: 5 * Description:
@@ -49,12 +49,12 @@
49 * Setup the architecture 49 * Setup the architecture
50 * 50 *
51 */ 51 */
52static void __init kmeter1_setup_arch(void) 52static void __init mpc83xx_km_setup_arch(void)
53{ 53{
54 struct device_node *np; 54 struct device_node *np;
55 55
56 if (ppc_md.progress) 56 if (ppc_md.progress)
57 ppc_md.progress("kmeter1_setup_arch()", 0); 57 ppc_md.progress("kmpbec83xx_setup_arch()", 0);
58 58
59#ifdef CONFIG_PCI 59#ifdef CONFIG_PCI
60 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci") 60 for_each_compatible_node(np, "pci", "fsl,mpc8349-pci")
@@ -69,6 +69,9 @@ static void __init kmeter1_setup_arch(void)
69 par_io_init(np); 69 par_io_init(np);
70 of_node_put(np); 70 of_node_put(np);
71 71
72 for_each_node_by_name(np, "spi")
73 par_io_of_config(np);
74
72 for (np = NULL; (np = of_find_node_by_name(np, "ucc")) != NULL;) 75 for (np = NULL; (np = of_find_node_by_name(np, "ucc")) != NULL;)
73 par_io_of_config(np); 76 par_io_of_config(np);
74 } 77 }
@@ -119,7 +122,7 @@ static void __init kmeter1_setup_arch(void)
119#endif /* CONFIG_QUICC_ENGINE */ 122#endif /* CONFIG_QUICC_ENGINE */
120} 123}
121 124
122static struct of_device_id kmeter_ids[] = { 125static struct of_device_id kmpbec83xx_ids[] = {
123 { .type = "soc", }, 126 { .type = "soc", },
124 { .compatible = "soc", }, 127 { .compatible = "soc", },
125 { .compatible = "simple-bus", }, 128 { .compatible = "simple-bus", },
@@ -131,13 +134,13 @@ static struct of_device_id kmeter_ids[] = {
131static int __init kmeter_declare_of_platform_devices(void) 134static int __init kmeter_declare_of_platform_devices(void)
132{ 135{
133 /* Publish the QE devices */ 136 /* Publish the QE devices */
134 of_platform_bus_probe(NULL, kmeter_ids, NULL); 137 of_platform_bus_probe(NULL, kmpbec83xx_ids, NULL);
135 138
136 return 0; 139 return 0;
137} 140}
138machine_device_initcall(kmeter1, kmeter_declare_of_platform_devices); 141machine_device_initcall(mpc83xx_km, kmeter_declare_of_platform_devices);
139 142
140static void __init kmeter1_init_IRQ(void) 143static void __init mpc83xx_km_init_IRQ(void)
141{ 144{
142 struct device_node *np; 145 struct device_node *np;
143 146
@@ -168,21 +171,34 @@ static void __init kmeter1_init_IRQ(void)
168#endif /* CONFIG_QUICC_ENGINE */ 171#endif /* CONFIG_QUICC_ENGINE */
169} 172}
170 173
174/* list of the supported boards */
175static char *board[] __initdata = {
176 "Keymile,KMETER1",
177 "Keymile,kmpbec8321",
178 NULL
179};
180
171/* 181/*
172 * Called very early, MMU is off, device-tree isn't unflattened 182 * Called very early, MMU is off, device-tree isn't unflattened
173 */ 183 */
174static int __init kmeter1_probe(void) 184static int __init mpc83xx_km_probe(void)
175{ 185{
176 unsigned long root = of_get_flat_dt_root(); 186 unsigned long node = of_get_flat_dt_root();
187 int i = 0;
177 188
178 return of_flat_dt_is_compatible(root, "keymile,KMETER1"); 189 while (board[i]) {
190 if (of_flat_dt_is_compatible(node, board[i]))
191 break;
192 i++;
193 }
194 return (board[i] != NULL);
179} 195}
180 196
181define_machine(kmeter1) { 197define_machine(mpc83xx_km) {
182 .name = "KMETER1", 198 .name = "mpc83xx-km-platform",
183 .probe = kmeter1_probe, 199 .probe = mpc83xx_km_probe,
184 .setup_arch = kmeter1_setup_arch, 200 .setup_arch = mpc83xx_km_setup_arch,
185 .init_IRQ = kmeter1_init_IRQ, 201 .init_IRQ = mpc83xx_km_init_IRQ,
186 .get_irq = ipic_get_irq, 202 .get_irq = ipic_get_irq,
187 .restart = mpc83xx_restart, 203 .restart = mpc83xx_restart,
188 .time_init = mpc83xx_time_init, 204 .time_init = mpc83xx_time_init,