diff options
-rw-r--r-- | arch/powerpc/boot/dts/lite5200.dts | 2 | ||||
-rw-r--r-- | arch/powerpc/boot/dts/lite5200b.dts | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/Kconfig | 27 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/Makefile | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/52xx/mpc5200_simple.c | 85 |
5 files changed, 112 insertions, 5 deletions
diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts index 23eeeb1fc61e..e1d6f441532f 100644 --- a/arch/powerpc/boot/dts/lite5200.dts +++ b/arch/powerpc/boot/dts/lite5200.dts | |||
@@ -19,7 +19,7 @@ | |||
19 | / { | 19 | / { |
20 | model = "fsl,lite5200"; | 20 | model = "fsl,lite5200"; |
21 | // revision = "1.0"; | 21 | // revision = "1.0"; |
22 | compatible = "fsl,lite5200","generic-mpc5200"; | 22 | compatible = "fsl,lite5200"; |
23 | #address-cells = <1>; | 23 | #address-cells = <1>; |
24 | #size-cells = <1>; | 24 | #size-cells = <1>; |
25 | 25 | ||
diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts index f94e073de9a7..3e06f58a0a71 100644 --- a/arch/powerpc/boot/dts/lite5200b.dts +++ b/arch/powerpc/boot/dts/lite5200b.dts | |||
@@ -19,7 +19,7 @@ | |||
19 | / { | 19 | / { |
20 | model = "fsl,lite5200b"; | 20 | model = "fsl,lite5200b"; |
21 | // revision = "1.0"; | 21 | // revision = "1.0"; |
22 | compatible = "fsl,lite5200b","generic-mpc5200"; | 22 | compatible = "fsl,lite5200b"; |
23 | #address-cells = <1>; | 23 | #address-cells = <1>; |
24 | #size-cells = <1>; | 24 | #size-cells = <1>; |
25 | 25 | ||
diff --git a/arch/powerpc/platforms/52xx/Kconfig b/arch/powerpc/platforms/52xx/Kconfig index 2938d4927b83..733a8063d400 100644 --- a/arch/powerpc/platforms/52xx/Kconfig +++ b/arch/powerpc/platforms/52xx/Kconfig | |||
@@ -19,6 +19,28 @@ config PPC_MPC5200_BUGFIX | |||
19 | 19 | ||
20 | It is safe to say 'Y' here | 20 | It is safe to say 'Y' here |
21 | 21 | ||
22 | config PPC_MPC5200_SIMPLE | ||
23 | bool "Generic support for simple MPC5200 based boards" | ||
24 | depends on PPC_MULTIPLATFORM && PPC32 | ||
25 | select PPC_MPC5200 | ||
26 | select DEFAULT_UIMAGE | ||
27 | select WANT_DEVICE_TREE | ||
28 | default n | ||
29 | help | ||
30 | This option enables support for a simple MPC52xx based boards which | ||
31 | do not need a custom platform specific setup. Such boards are | ||
32 | supported assuming the following: | ||
33 | |||
34 | - GPIO pins are configured by the firmware, | ||
35 | - CDM configuration (clocking) is setup correctly by firmware, | ||
36 | - if the 'fsl,has-wdt' property is present in one of the | ||
37 | gpt nodes, then it is safe to use such gpt to reset the board, | ||
38 | - PCI is supported if enabled in the kernel configuration | ||
39 | and if there is a PCI bus node defined in the device tree. | ||
40 | |||
41 | Boards that are compatible with this generic platform support | ||
42 | are: 'tqc,tqm5200', 'promess,motionpro', 'schindler,cm5200'. | ||
43 | |||
22 | config PPC_EFIKA | 44 | config PPC_EFIKA |
23 | bool "bPlan Efika 5k2. MPC5200B based computer" | 45 | bool "bPlan Efika 5k2. MPC5200B based computer" |
24 | depends on PPC_MULTIPLATFORM && PPC32 | 46 | depends on PPC_MULTIPLATFORM && PPC32 |
@@ -31,8 +53,7 @@ config PPC_EFIKA | |||
31 | config PPC_LITE5200 | 53 | config PPC_LITE5200 |
32 | bool "Freescale Lite5200 Eval Board" | 54 | bool "Freescale Lite5200 Eval Board" |
33 | depends on PPC_MULTIPLATFORM && PPC32 | 55 | depends on PPC_MULTIPLATFORM && PPC32 |
34 | select WANT_DEVICE_TREE | ||
35 | select PPC_MPC5200 | 56 | select PPC_MPC5200 |
57 | select DEFAULT_UIMAGE | ||
58 | select WANT_DEVICE_TREE | ||
36 | default n | 59 | default n |
37 | |||
38 | |||
diff --git a/arch/powerpc/platforms/52xx/Makefile b/arch/powerpc/platforms/52xx/Makefile index 307dbc178091..fe1b81bb5224 100644 --- a/arch/powerpc/platforms/52xx/Makefile +++ b/arch/powerpc/platforms/52xx/Makefile | |||
@@ -6,6 +6,7 @@ obj-y += mpc52xx_pic.o mpc52xx_common.o | |||
6 | obj-$(CONFIG_PCI) += mpc52xx_pci.o | 6 | obj-$(CONFIG_PCI) += mpc52xx_pci.o |
7 | endif | 7 | endif |
8 | 8 | ||
9 | obj-$(CONFIG_PPC_MPC5200_SIMPLE) += mpc5200_simple.o | ||
9 | obj-$(CONFIG_PPC_EFIKA) += efika.o | 10 | obj-$(CONFIG_PPC_EFIKA) += efika.o |
10 | obj-$(CONFIG_PPC_LITE5200) += lite5200.o | 11 | obj-$(CONFIG_PPC_LITE5200) += lite5200.o |
11 | 12 | ||
diff --git a/arch/powerpc/platforms/52xx/mpc5200_simple.c b/arch/powerpc/platforms/52xx/mpc5200_simple.c new file mode 100644 index 000000000000..754aa932f595 --- /dev/null +++ b/arch/powerpc/platforms/52xx/mpc5200_simple.c | |||
@@ -0,0 +1,85 @@ | |||
1 | /* | ||
2 | * Support for 'mpc5200-simple-platform' compatible boards. | ||
3 | * | ||
4 | * Written by Marian Balakowicz <m8@semihalf.com> | ||
5 | * Copyright (C) 2007 Semihalf | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | * | ||
12 | * Description: | ||
13 | * This code implements support for a simple MPC52xx based boards which | ||
14 | * do not need a custom platform specific setup. Such boards are | ||
15 | * supported assuming the following: | ||
16 | * | ||
17 | * - GPIO pins are configured by the firmware, | ||
18 | * - CDM configuration (clocking) is setup correctly by firmware, | ||
19 | * - if the 'fsl,has-wdt' property is present in one of the | ||
20 | * gpt nodes, then it is safe to use such gpt to reset the board, | ||
21 | * - PCI is supported if enabled in the kernel configuration | ||
22 | * and if there is a PCI bus node defined in the device tree. | ||
23 | * | ||
24 | * Boards that are compatible with this generic platform support | ||
25 | * are listed in a 'board' table. | ||
26 | */ | ||
27 | |||
28 | #undef DEBUG | ||
29 | #include <asm/time.h> | ||
30 | #include <asm/prom.h> | ||
31 | #include <asm/machdep.h> | ||
32 | #include <asm/mpc52xx.h> | ||
33 | |||
34 | /* | ||
35 | * Setup the architecture | ||
36 | */ | ||
37 | static void __init mpc5200_simple_setup_arch(void) | ||
38 | { | ||
39 | if (ppc_md.progress) | ||
40 | ppc_md.progress("mpc5200_simple_setup_arch()", 0); | ||
41 | |||
42 | /* Some mpc5200 & mpc5200b related configuration */ | ||
43 | mpc5200_setup_xlb_arbiter(); | ||
44 | |||
45 | /* Map wdt for mpc52xx_restart() */ | ||
46 | mpc52xx_map_wdt(); | ||
47 | |||
48 | mpc52xx_setup_pci(); | ||
49 | } | ||
50 | |||
51 | /* list of the supported boards */ | ||
52 | static char *board[] __initdata = { | ||
53 | "promess,motionpro", | ||
54 | "schindler,cm5200", | ||
55 | "tqc,tqm5200", | ||
56 | NULL | ||
57 | }; | ||
58 | |||
59 | /* | ||
60 | * Called very early, MMU is off, device-tree isn't unflattened | ||
61 | */ | ||
62 | static int __init mpc5200_simple_probe(void) | ||
63 | { | ||
64 | unsigned long node = of_get_flat_dt_root(); | ||
65 | int i = 0; | ||
66 | |||
67 | while (board[i]) { | ||
68 | if (of_flat_dt_is_compatible(node, board[i])) | ||
69 | break; | ||
70 | i++; | ||
71 | } | ||
72 | |||
73 | return (board[i] != NULL); | ||
74 | } | ||
75 | |||
76 | define_machine(mpc5200_simple_platform) { | ||
77 | .name = "mpc5200-simple-platform", | ||
78 | .probe = mpc5200_simple_probe, | ||
79 | .setup_arch = mpc5200_simple_setup_arch, | ||
80 | .init = mpc52xx_declare_of_platform_devices, | ||
81 | .init_IRQ = mpc52xx_init_irq, | ||
82 | .get_irq = mpc52xx_get_irq, | ||
83 | .restart = mpc52xx_restart, | ||
84 | .calibrate_decr = generic_calibrate_decr, | ||
85 | }; | ||