aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/boot/dts/mgcoge.dts47
-rw-r--r--arch/powerpc/configs/mgcoge_defconfig9
-rw-r--r--arch/powerpc/platforms/82xx/Makefile2
-rw-r--r--arch/powerpc/platforms/82xx/km82xx.c (renamed from arch/powerpc/platforms/82xx/mgcoge.c)62
4 files changed, 72 insertions, 48 deletions
diff --git a/arch/powerpc/boot/dts/mgcoge.dts b/arch/powerpc/boot/dts/mgcoge.dts
index 0ce96644176d..1360d2f69024 100644
--- a/arch/powerpc/boot/dts/mgcoge.dts
+++ b/arch/powerpc/boot/dts/mgcoge.dts
@@ -13,7 +13,7 @@
13/dts-v1/; 13/dts-v1/;
14/ { 14/ {
15 model = "MGCOGE"; 15 model = "MGCOGE";
16 compatible = "keymile,mgcoge"; 16 compatible = "keymile,km82xx";
17 #address-cells = <1>; 17 #address-cells = <1>;
18 #size-cells = <1>; 18 #size-cells = <1>;
19 19
@@ -48,8 +48,10 @@
48 reg = <0xf0010100 0x40>; 48 reg = <0xf0010100 0x40>;
49 49
50 ranges = <0 0 0xfe000000 0x00400000 50 ranges = <0 0 0xfe000000 0x00400000
51 5 0 0x50000000 0x20000000 51 1 0 0x30000000 0x00010000
52 >; /* Filled in by U-Boot */ 52 2 0 0x40000000 0x00010000
53 5 0 0x50000000 0x04000000
54 >;
53 55
54 flash@0,0 { 56 flash@0,0 {
55 compatible = "cfi-flash"; 57 compatible = "cfi-flash";
@@ -60,36 +62,32 @@
60 device-width = <1>; 62 device-width = <1>;
61 partition@0 { 63 partition@0 {
62 label = "u-boot"; 64 label = "u-boot";
63 reg = <0 0x40000>; 65 reg = <0x00000 0xC0000>;
64 }; 66 };
65 partition@40000 { 67 partition@1 {
66 label = "env"; 68 label = "env";
67 reg = <0x40000 0x20000>; 69 reg = <0xC0000 0x20000>;
68 }; 70 };
69 partition@60000 { 71 partition@2 {
70 label = "kernel"; 72 label = "envred";
71 reg = <0x60000 0x220000>; 73 reg = <0xE0000 0x20000>;
72 }; 74 };
73 partition@280000 { 75 partition@3 {
74 label = "dtb"; 76 label = "free";
75 reg = <0x280000 0x20000>; 77 reg = <0x100000 0x300000>;
76 }; 78 };
77 }; 79 };
78 80
79 flash@5,0 { 81 flash@5,0 {
80 compatible = "cfi-flash"; 82 compatible = "cfi-flash";
81 reg = <5 0x0 0x2000000>; 83 reg = <5 0x00000000 0x02000000
84 5 0x02000000 0x02000000>;
82 #address-cells = <1>; 85 #address-cells = <1>;
83 #size-cells = <1>; 86 #size-cells = <1>;
84 bank-width = <2>; 87 bank-width = <2>;
85 device-width = <2>; 88 partition@app { /* 64 MBytes */
86 partition@0 { 89 label = "ubi0";
87 label = "ramdisk"; 90 reg = <0x00000000 0x04000000>;
88 reg = <0 0x7a0000>;
89 };
90 partition@7a0000 {
91 label = "user";
92 reg = <0x7a0000 0x1860000>;
93 }; 91 };
94 }; 92 };
95 }; 93 };
@@ -217,6 +215,13 @@
217 }; 215 };
218 }; 216 };
219 217
218 cpm2_pio_c: gpio-controller@10d40 {
219 #gpio-cells = <2>;
220 compatible = "fsl,cpm2-pario-bank";
221 reg = <0x10d40 0x14>;
222 gpio-controller;
223 };
224
220 PIC: interrupt-controller@10c00 { 225 PIC: interrupt-controller@10c00 {
221 #interrupt-cells = <2>; 226 #interrupt-cells = <2>;
222 interrupt-controller; 227 interrupt-controller;
diff --git a/arch/powerpc/configs/mgcoge_defconfig b/arch/powerpc/configs/mgcoge_defconfig
index 39518e91822f..6cb588a7d425 100644
--- a/arch/powerpc/configs/mgcoge_defconfig
+++ b/arch/powerpc/configs/mgcoge_defconfig
@@ -1,4 +1,5 @@
1CONFIG_SYSVIPC=y 1CONFIG_SYSVIPC=y
2CONFIG_SPARSE_IRQ=y
2CONFIG_IKCONFIG=y 3CONFIG_IKCONFIG=y
3CONFIG_IKCONFIG_PROC=y 4CONFIG_IKCONFIG_PROC=y
4CONFIG_LOG_BUF_SHIFT=14 5CONFIG_LOG_BUF_SHIFT=14
@@ -10,7 +11,6 @@ CONFIG_SLAB=y
10CONFIG_PPC_82xx=y 11CONFIG_PPC_82xx=y
11CONFIG_MGCOGE=y 12CONFIG_MGCOGE=y
12CONFIG_BINFMT_MISC=y 13CONFIG_BINFMT_MISC=y
13CONFIG_SPARSE_IRQ=y
14# CONFIG_SECCOMP is not set 14# CONFIG_SECCOMP is not set
15CONFIG_NET=y 15CONFIG_NET=y
16CONFIG_PACKET=y 16CONFIG_PACKET=y
@@ -30,7 +30,6 @@ CONFIG_MTD=y
30CONFIG_MTD_CONCAT=y 30CONFIG_MTD_CONCAT=y
31CONFIG_MTD_PARTITIONS=y 31CONFIG_MTD_PARTITIONS=y
32CONFIG_MTD_CMDLINE_PARTS=y 32CONFIG_MTD_CMDLINE_PARTS=y
33CONFIG_MTD_OF_PARTS=y
34CONFIG_MTD_CHAR=y 33CONFIG_MTD_CHAR=y
35CONFIG_MTD_BLKDEVS=y 34CONFIG_MTD_BLKDEVS=y
36CONFIG_MTD_CFI=y 35CONFIG_MTD_CFI=y
@@ -43,7 +42,6 @@ CONFIG_MTD_PHYSMAP_OF=y
43CONFIG_PROC_DEVICETREE=y 42CONFIG_PROC_DEVICETREE=y
44CONFIG_BLK_DEV_LOOP=y 43CONFIG_BLK_DEV_LOOP=y
45CONFIG_BLK_DEV_RAM=y 44CONFIG_BLK_DEV_RAM=y
46# CONFIG_MISC_DEVICES is not set
47# CONFIG_MACINTOSH_DRIVERS is not set 45# CONFIG_MACINTOSH_DRIVERS is not set
48CONFIG_NETDEVICES=y 46CONFIG_NETDEVICES=y
49CONFIG_FIXED_PHY=y 47CONFIG_FIXED_PHY=y
@@ -67,7 +65,6 @@ CONFIG_EXT2_FS=y
67CONFIG_EXT3_FS=y 65CONFIG_EXT3_FS=y
68# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set 66# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
69# CONFIG_EXT3_FS_XATTR is not set 67# CONFIG_EXT3_FS_XATTR is not set
70CONFIG_INOTIFY=y
71CONFIG_AUTOFS4_FS=y 68CONFIG_AUTOFS4_FS=y
72CONFIG_PROC_KCORE=y 69CONFIG_PROC_KCORE=y
73CONFIG_TMPFS=y 70CONFIG_TMPFS=y
@@ -88,13 +85,9 @@ CONFIG_DEBUG_FS=y
88CONFIG_DEBUG_KERNEL=y 85CONFIG_DEBUG_KERNEL=y
89# CONFIG_SCHED_DEBUG is not set 86# CONFIG_SCHED_DEBUG is not set
90CONFIG_DEBUG_INFO=y 87CONFIG_DEBUG_INFO=y
91# CONFIG_RCU_CPU_STALL_DETECTOR is not set
92CONFIG_SYSCTL_SYSCALL_CHECK=y 88CONFIG_SYSCTL_SYSCALL_CHECK=y
93CONFIG_BDI_SWITCH=y 89CONFIG_BDI_SWITCH=y
94CONFIG_CRYPTO_CBC=y
95CONFIG_CRYPTO_ECB=y 90CONFIG_CRYPTO_ECB=y
96CONFIG_CRYPTO_PCBC=y 91CONFIG_CRYPTO_PCBC=y
97CONFIG_CRYPTO_MD5=y
98CONFIG_CRYPTO_DES=y
99# CONFIG_CRYPTO_ANSI_CPRNG is not set 92# CONFIG_CRYPTO_ANSI_CPRNG is not set
100# CONFIG_CRYPTO_HW is not set 93# CONFIG_CRYPTO_HW is not set
diff --git a/arch/powerpc/platforms/82xx/Makefile b/arch/powerpc/platforms/82xx/Makefile
index d982793f4dbd..455fe21e37c4 100644
--- a/arch/powerpc/platforms/82xx/Makefile
+++ b/arch/powerpc/platforms/82xx/Makefile
@@ -6,4 +6,4 @@ obj-$(CONFIG_CPM2) += pq2.o
6obj-$(CONFIG_PQ2_ADS_PCI_PIC) += pq2ads-pci-pic.o 6obj-$(CONFIG_PQ2_ADS_PCI_PIC) += pq2ads-pci-pic.o
7obj-$(CONFIG_PQ2FADS) += pq2fads.o 7obj-$(CONFIG_PQ2FADS) += pq2fads.o
8obj-$(CONFIG_EP8248E) += ep8248e.o 8obj-$(CONFIG_EP8248E) += ep8248e.o
9obj-$(CONFIG_MGCOGE) += mgcoge.o 9obj-$(CONFIG_MGCOGE) += km82xx.o
diff --git a/arch/powerpc/platforms/82xx/mgcoge.c b/arch/powerpc/platforms/82xx/km82xx.c
index 7a5de9eb3c73..428c5e0a0e75 100644
--- a/arch/powerpc/platforms/82xx/mgcoge.c
+++ b/arch/powerpc/platforms/82xx/km82xx.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * Keymile mgcoge support 2 * Keymile km82xx support
3 * Copyright 2008 DENX Software Engineering GmbH 3 * Copyright 2008-2011 DENX Software Engineering GmbH
4 * Author: Heiko Schocher <hs@denx.de> 4 * Author: Heiko Schocher <hs@denx.de>
5 * 5 *
6 * based on code from: 6 * based on code from:
@@ -31,9 +31,10 @@
31 31
32#include "pq2.h" 32#include "pq2.h"
33 33
34static void __init mgcoge_pic_init(void) 34static void __init km82xx_pic_init(void)
35{ 35{
36 struct device_node *np = of_find_compatible_node(NULL, NULL, "fsl,pq2-pic"); 36 struct device_node *np = of_find_compatible_node(NULL, NULL,
37 "fsl,pq2-pic");
37 if (!np) { 38 if (!np) {
38 printk(KERN_ERR "PIC init: can not find cpm-pic node\n"); 39 printk(KERN_ERR "PIC init: can not find cpm-pic node\n");
39 return; 40 return;
@@ -47,12 +48,18 @@ struct cpm_pin {
47 int port, pin, flags; 48 int port, pin, flags;
48}; 49};
49 50
50static __initdata struct cpm_pin mgcoge_pins[] = { 51static __initdata struct cpm_pin km82xx_pins[] = {
51 52
52 /* SMC2 */ 53 /* SMC2 */
53 {0, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 54 {0, 8, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
54 {0, 9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, 55 {0, 9, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
55 56
57 /* SCC1 */
58 {2, 21, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
59 {2, 15, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
60 {3, 31, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
61 {3, 30, CPM_PIN_OUTPUT | CPM_PIN_SECONDARY},
62
56 /* SCC4 */ 63 /* SCC4 */
57 {2, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 64 {2, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
58 {2, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, 65 {2, 24, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
@@ -107,30 +114,49 @@ static __initdata struct cpm_pin mgcoge_pins[] = {
107 {3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, 114 {3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN},
108 {3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN}, 115 {3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN},
109#endif 116#endif
117
118 /* USB */
119 {0, 10, CPM_PIN_OUTPUT | CPM_PIN_GPIO}, /* FULL_SPEED */
120 {0, 11, CPM_PIN_OUTPUT | CPM_PIN_GPIO}, /*/SLAVE */
121 {2, 10, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* RXN */
122 {2, 11, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* RXP */
123 {2, 20, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, /* /OE */
124 {2, 27, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* RXCLK */
125 {3, 23, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, /* TXP */
126 {3, 24, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY}, /* TXN */
127 {3, 25, CPM_PIN_INPUT | CPM_PIN_PRIMARY}, /* RXD */
110}; 128};
111 129
112static void __init init_ioports(void) 130static void __init init_ioports(void)
113{ 131{
114 int i; 132 int i;
115 133
116 for (i = 0; i < ARRAY_SIZE(mgcoge_pins); i++) { 134 for (i = 0; i < ARRAY_SIZE(km82xx_pins); i++) {
117 const struct cpm_pin *pin = &mgcoge_pins[i]; 135 const struct cpm_pin *pin = &km82xx_pins[i];
118 cpm2_set_pin(pin->port, pin->pin, pin->flags); 136 cpm2_set_pin(pin->port, pin->pin, pin->flags);
119 } 137 }
120 138
121 cpm2_smc_clk_setup(CPM_CLK_SMC2, CPM_BRG8); 139 cpm2_smc_clk_setup(CPM_CLK_SMC2, CPM_BRG8);
140 cpm2_clk_setup(CPM_CLK_SCC1, CPM_CLK11, CPM_CLK_RX);
141 cpm2_clk_setup(CPM_CLK_SCC1, CPM_CLK11, CPM_CLK_TX);
142 cpm2_clk_setup(CPM_CLK_SCC3, CPM_CLK5, CPM_CLK_RTX);
122 cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK7, CPM_CLK_RX); 143 cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK7, CPM_CLK_RX);
123 cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK8, CPM_CLK_TX); 144 cpm2_clk_setup(CPM_CLK_SCC4, CPM_CLK8, CPM_CLK_TX);
124 cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK10, CPM_CLK_RX); 145 cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK10, CPM_CLK_RX);
125 cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK9, CPM_CLK_TX); 146 cpm2_clk_setup(CPM_CLK_FCC1, CPM_CLK9, CPM_CLK_TX);
126 cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK13, CPM_CLK_RX); 147 cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK13, CPM_CLK_RX);
127 cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK14, CPM_CLK_TX); 148 cpm2_clk_setup(CPM_CLK_FCC2, CPM_CLK14, CPM_CLK_TX);
149
150 /* Force USB FULL SPEED bit to '1' */
151 setbits32(&cpm2_immr->im_ioport.iop_pdata, 1 << (31 - 10));
152 /* clear USB_SLAVE */
153 clrbits32(&cpm2_immr->im_ioport.iop_pdata, 1 << (31 - 11));
128} 154}
129 155
130static void __init mgcoge_setup_arch(void) 156static void __init km82xx_setup_arch(void)
131{ 157{
132 if (ppc_md.progress) 158 if (ppc_md.progress)
133 ppc_md.progress("mgcoge_setup_arch()", 0); 159 ppc_md.progress("km82xx_setup_arch()", 0);
134 160
135 cpm2_reset(); 161 cpm2_reset();
136 162
@@ -142,7 +168,7 @@ static void __init mgcoge_setup_arch(void)
142 init_ioports(); 168 init_ioports();
143 169
144 if (ppc_md.progress) 170 if (ppc_md.progress)
145 ppc_md.progress("mgcoge_setup_arch(), finish", 0); 171 ppc_md.progress("km82xx_setup_arch(), finish", 0);
146} 172}
147 173
148static __initdata struct of_device_id of_bus_ids[] = { 174static __initdata struct of_device_id of_bus_ids[] = {
@@ -156,23 +182,23 @@ static int __init declare_of_platform_devices(void)
156 182
157 return 0; 183 return 0;
158} 184}
159machine_device_initcall(mgcoge, declare_of_platform_devices); 185machine_device_initcall(km82xx, declare_of_platform_devices);
160 186
161/* 187/*
162 * Called very early, device-tree isn't unflattened 188 * Called very early, device-tree isn't unflattened
163 */ 189 */
164static int __init mgcoge_probe(void) 190static int __init km82xx_probe(void)
165{ 191{
166 unsigned long root = of_get_flat_dt_root(); 192 unsigned long root = of_get_flat_dt_root();
167 return of_flat_dt_is_compatible(root, "keymile,mgcoge"); 193 return of_flat_dt_is_compatible(root, "keymile,km82xx");
168} 194}
169 195
170define_machine(mgcoge) 196define_machine(km82xx)
171{ 197{
172 .name = "Keymile MGCOGE", 198 .name = "Keymile km82xx",
173 .probe = mgcoge_probe, 199 .probe = km82xx_probe,
174 .setup_arch = mgcoge_setup_arch, 200 .setup_arch = km82xx_setup_arch,
175 .init_IRQ = mgcoge_pic_init, 201 .init_IRQ = km82xx_pic_init,
176 .get_irq = cpm2_get_irq, 202 .get_irq = cpm2_get_irq,
177 .calibrate_decr = generic_calibrate_decr, 203 .calibrate_decr = generic_calibrate_decr,
178 .restart = pq2_restart, 204 .restart = pq2_restart,