aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/52xx/lite5200.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/52xx/lite5200.c')
-rw-r--r--arch/powerpc/platforms/52xx/lite5200.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/arch/powerpc/platforms/52xx/lite5200.c b/arch/powerpc/platforms/52xx/lite5200.c
index 5a8d190f53e4..956f459e175c 100644
--- a/arch/powerpc/platforms/52xx/lite5200.c
+++ b/arch/powerpc/platforms/52xx/lite5200.c
@@ -32,6 +32,19 @@
32 * 32 *
33 */ 33 */
34 34
35/* mpc5200 device tree match tables */
36static struct of_device_id mpc5200_cdm_ids[] __initdata = {
37 { .compatible = "fsl,mpc5200-cdm", },
38 { .compatible = "mpc5200-cdm", },
39 {}
40};
41
42static struct of_device_id mpc5200_gpio_ids[] __initdata = {
43 { .compatible = "fsl,mpc5200-gpio", },
44 { .compatible = "mpc5200-gpio", },
45 {}
46};
47
35/* 48/*
36 * Fix clock configuration. 49 * Fix clock configuration.
37 * 50 *
@@ -44,9 +57,8 @@ lite5200_fix_clock_config(void)
44{ 57{
45 struct device_node *np; 58 struct device_node *np;
46 struct mpc52xx_cdm __iomem *cdm; 59 struct mpc52xx_cdm __iomem *cdm;
47
48 /* Map zones */ 60 /* Map zones */
49 np = of_find_compatible_node(NULL, NULL, "mpc5200-cdm"); 61 np = of_find_matching_node(NULL, mpc5200_cdm_ids);
50 cdm = of_iomap(np, 0); 62 cdm = of_iomap(np, 0);
51 of_node_put(np); 63 of_node_put(np);
52 if (!cdm) { 64 if (!cdm) {
@@ -81,7 +93,7 @@ lite5200_fix_port_config(void)
81 struct mpc52xx_gpio __iomem *gpio; 93 struct mpc52xx_gpio __iomem *gpio;
82 u32 port_config; 94 u32 port_config;
83 95
84 np = of_find_compatible_node(NULL, NULL, "mpc5200-gpio"); 96 np = of_find_matching_node(NULL, mpc5200_gpio_ids);
85 gpio = of_iomap(np, 0); 97 gpio = of_iomap(np, 0);
86 of_node_put(np); 98 of_node_put(np);
87 if (!gpio) { 99 if (!gpio) {
@@ -140,15 +152,15 @@ static void __init lite5200_setup_arch(void)
140 if (ppc_md.progress) 152 if (ppc_md.progress)
141 ppc_md.progress("lite5200_setup_arch()", 0); 153 ppc_md.progress("lite5200_setup_arch()", 0);
142 154
143 /* Fix things that firmware should have done. */ 155 /* Map important registers from the internal memory map */
144 lite5200_fix_clock_config(); 156 mpc52xx_map_common_devices();
145 lite5200_fix_port_config();
146 157
147 /* Some mpc5200 & mpc5200b related configuration */ 158 /* Some mpc5200 & mpc5200b related configuration */
148 mpc5200_setup_xlb_arbiter(); 159 mpc5200_setup_xlb_arbiter();
149 160
150 /* Map wdt for mpc52xx_restart() */ 161 /* Fix things that firmware should have done. */
151 mpc52xx_map_wdt(); 162 lite5200_fix_clock_config();
163 lite5200_fix_port_config();
152 164
153#ifdef CONFIG_PM 165#ifdef CONFIG_PM
154 mpc52xx_suspend.board_suspend_prepare = lite5200_suspend_prepare; 166 mpc52xx_suspend.board_suspend_prepare = lite5200_suspend_prepare;