aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/boot/dts/kmeter1.dts69
-rw-r--r--arch/powerpc/configs/83xx/kmeter1_defconfig7
-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
4 files changed, 71 insertions, 53 deletions
diff --git a/arch/powerpc/boot/dts/kmeter1.dts b/arch/powerpc/boot/dts/kmeter1.dts
index d8b5d12fb663..d16bae1230f7 100644
--- a/arch/powerpc/boot/dts/kmeter1.dts
+++ b/arch/powerpc/boot/dts/kmeter1.dts
@@ -1,7 +1,7 @@
1/* 1/*
2 * Keymile KMETER1 Device Tree Source 2 * Keymile KMETER1 Device Tree Source
3 * 3 *
4 * 2008 DENX Software Engineering GmbH 4 * 2008-2011 DENX Software Engineering GmbH
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 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 7 * under the terms of the GNU General Public License as published by the
@@ -70,11 +70,11 @@
70 #address-cells = <1>; 70 #address-cells = <1>;
71 #size-cells = <0>; 71 #size-cells = <0>;
72 cell-index = <0>; 72 cell-index = <0>;
73 compatible = "fsl-i2c"; 73 compatible = "fsl,mpc8313-i2c","fsl-i2c";
74 reg = <0x3000 0x100>; 74 reg = <0x3000 0x100>;
75 interrupts = <14 0x8>; 75 interrupts = <14 0x8>;
76 interrupt-parent = <&ipic>; 76 interrupt-parent = <&ipic>;
77 dfsrr; 77 clock-frequency = <400000>;
78 }; 78 };
79 79
80 serial0: serial@4500 { 80 serial0: serial@4500 {
@@ -137,6 +137,13 @@
137 compatible = "fsl,mpc8360-par_io"; 137 compatible = "fsl,mpc8360-par_io";
138 num-ports = <7>; 138 num-ports = <7>;
139 139
140 qe_pio_c: gpio-controller@30 {
141 #gpio-cells = <2>;
142 compatible = "fsl,mpc8360-qe-pario-bank",
143 "fsl,mpc8323-qe-pario-bank";
144 reg = <0x1430 0x18>;
145 gpio-controller;
146 };
140 pio_ucc1: ucc_pin@0 { 147 pio_ucc1: ucc_pin@0 {
141 reg = <0>; 148 reg = <0>;
142 149
@@ -472,7 +479,17 @@
472 #address-cells = <0>; 479 #address-cells = <0>;
473 #interrupt-cells = <1>; 480 #interrupt-cells = <1>;
474 reg = <0x80 0x80>; 481 reg = <0x80 0x80>;
475 interrupts = <32 8 33 8>; 482 big-endian;
483 interrupts = <
484 32 0x8
485 33 0x8
486 34 0x8
487 35 0x8
488 40 0x8
489 41 0x8
490 42 0x8
491 43 0x8
492 >;
476 interrupt-parent = <&ipic>; 493 interrupt-parent = <&ipic>;
477 }; 494 };
478 }; 495 };
@@ -484,43 +501,31 @@
484 compatible = "fsl,mpc8360-localbus", "fsl,pq2pro-localbus", 501 compatible = "fsl,mpc8360-localbus", "fsl,pq2pro-localbus",
485 "simple-bus"; 502 "simple-bus";
486 reg = <0xe0005000 0xd8>; 503 reg = <0xe0005000 0xd8>;
487 ranges = <0 0 0xf0000000 0x04000000>; /* Filled in by U-Boot */ 504 ranges = <0 0 0xf0000000 0x04000000 /* LB 0 */
505 1 0 0xe8000000 0x01000000 /* LB 1 */
506 3 0 0xa0000000 0x10000000>; /* LB 3 */
488 507
489 flash@f0000000,0 { 508 flash@0,0 {
490 compatible = "cfi-flash"; 509 compatible = "cfi-flash";
491 /* 510 reg = <0 0 0x04000000>;
492 * The Intel P30 chip has 2 non-identical chips on
493 * one die, so we need to define 2 separate regions
494 * that are scanned by physmap_of independantly.
495 */
496 reg = <0 0x00000000 0x02000000
497 0 0x02000000 0x02000000>; /* Filled in by U-Boot */
498 bank-width = <2>;
499 #address-cells = <1>; 511 #address-cells = <1>;
500 #size-cells = <1>; 512 #size-cells = <1>;
501 partition@0 { 513 bank-width = <2>;
514 partition@0 { /* 768KB */
502 label = "u-boot"; 515 label = "u-boot";
503 reg = <0 0x40000>; 516 reg = <0 0xC0000>;
504 }; 517 };
505 partition@40000 { 518 partition@c0000 { /* 128KB */
506 label = "env"; 519 label = "env";
507 reg = <0x40000 0x40000>; 520 reg = <0xC0000 0x20000>;
508 };
509 partition@80000 {
510 label = "dtb";
511 reg = <0x80000 0x20000>;
512 };
513 partition@a0000 {
514 label = "kernel";
515 reg = <0xa0000 0x300000>;
516 }; 521 };
517 partition@3a0000 { 522 partition@e0000 { /* 128KB */
518 label = "ramdisk"; 523 label = "envred";
519 reg = <0x3a0000 0x800000>; 524 reg = <0xE0000 0x20000>;
520 }; 525 };
521 partition@ba0000 { 526 partition@100000 { /* 64512KB */
522 label = "user"; 527 label = "ubi0";
523 reg = <0xba0000 0x3460000>; 528 reg = <0x100000 0x3F00000>;
524 }; 529 };
525 }; 530 };
526 }; 531 };
diff --git a/arch/powerpc/configs/83xx/kmeter1_defconfig b/arch/powerpc/configs/83xx/kmeter1_defconfig
index 7a7b731c5735..07e1bbadebfe 100644
--- a/arch/powerpc/configs/83xx/kmeter1_defconfig
+++ b/arch/powerpc/configs/83xx/kmeter1_defconfig
@@ -2,6 +2,7 @@ CONFIG_EXPERIMENTAL=y
2# CONFIG_SWAP is not set 2# CONFIG_SWAP is not set
3CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
4CONFIG_POSIX_MQUEUE=y 4CONFIG_POSIX_MQUEUE=y
5CONFIG_SPARSE_IRQ=y
5CONFIG_LOG_BUF_SHIFT=14 6CONFIG_LOG_BUF_SHIFT=14
6CONFIG_EXPERT=y 7CONFIG_EXPERT=y
7# CONFIG_HOTPLUG is not set 8# CONFIG_HOTPLUG is not set
@@ -18,7 +19,6 @@ CONFIG_KMETER1=y
18CONFIG_NO_HZ=y 19CONFIG_NO_HZ=y
19CONFIG_HIGH_RES_TIMERS=y 20CONFIG_HIGH_RES_TIMERS=y
20CONFIG_PREEMPT=y 21CONFIG_PREEMPT=y
21CONFIG_SPARSE_IRQ=y
22# CONFIG_SECCOMP is not set 22# CONFIG_SECCOMP is not set
23CONFIG_NET=y 23CONFIG_NET=y
24CONFIG_PACKET=y 24CONFIG_PACKET=y
@@ -37,7 +37,6 @@ CONFIG_MTD=y
37CONFIG_MTD_CONCAT=y 37CONFIG_MTD_CONCAT=y
38CONFIG_MTD_PARTITIONS=y 38CONFIG_MTD_PARTITIONS=y
39CONFIG_MTD_CMDLINE_PARTS=y 39CONFIG_MTD_CMDLINE_PARTS=y
40CONFIG_MTD_OF_PARTS=y
41CONFIG_MTD_CHAR=y 40CONFIG_MTD_CHAR=y
42CONFIG_MTD_BLOCK=y 41CONFIG_MTD_BLOCK=y
43CONFIG_MTD_CFI=y 42CONFIG_MTD_CFI=y
@@ -49,13 +48,12 @@ CONFIG_MTD_UBI=y
49CONFIG_MTD_UBI_GLUEBI=y 48CONFIG_MTD_UBI_GLUEBI=y
50CONFIG_MTD_UBI_DEBUG=y 49CONFIG_MTD_UBI_DEBUG=y
51CONFIG_PROC_DEVICETREE=y 50CONFIG_PROC_DEVICETREE=y
52# CONFIG_MISC_DEVICES is not set
53CONFIG_NETDEVICES=y 51CONFIG_NETDEVICES=y
54CONFIG_DUMMY=y 52CONFIG_DUMMY=y
55CONFIG_TUN=y 53CONFIG_TUN=y
54CONFIG_MII=y
56CONFIG_MARVELL_PHY=y 55CONFIG_MARVELL_PHY=y
57CONFIG_NET_ETHERNET=y 56CONFIG_NET_ETHERNET=y
58CONFIG_MII=y
59CONFIG_UCC_GETH=y 57CONFIG_UCC_GETH=y
60# CONFIG_NETDEV_10000 is not set 58# CONFIG_NETDEV_10000 is not set
61CONFIG_WAN=y 59CONFIG_WAN=y
@@ -77,7 +75,6 @@ CONFIG_I2C_MPC=y
77# CONFIG_USB_SUPPORT is not set 75# CONFIG_USB_SUPPORT is not set
78CONFIG_UIO=y 76CONFIG_UIO=y
79# CONFIG_DNOTIFY is not set 77# CONFIG_DNOTIFY is not set
80CONFIG_INOTIFY=y
81CONFIG_TMPFS=y 78CONFIG_TMPFS=y
82CONFIG_JFFS2_FS=y 79CONFIG_JFFS2_FS=y
83CONFIG_NFS_FS=y 80CONFIG_NFS_FS=y
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile
index 6e8bbbbcfdf8..ed95bfcbcbff 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 903acfd851ac..a2b9b9ef1240 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,