diff options
author | Matteo Facchinetti <matteo.facchinetti@sirius-es.it> | 2013-06-10 04:13:52 -0400 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2013-06-24 15:36:49 -0400 |
commit | 0875a88e8569c2ca306f321018238bd1a3d7fd86 (patch) | |
tree | 1839dcc50869a9570bf14cf0b6e41be526f0b3e2 /arch/powerpc/platforms | |
parent | a4f4124cf308275b4a2219d1e332dfc01d8bd6b7 (diff) |
powerpc/mpc512x: add MPC5125 reset module support for system restart
Only part of MPC5125 reset module is like as MPC5121.
In detail, RCWH register doesn't contain informations about:
- PCI arbiter
- NAND flash page size
- NAND flash port size
For this reason, in device tree, this module has a different name then
MPC5121 reset module but use the same "struct mpc512x_reset_module"
register definition and the same restart procedure.
Signed-off-by: Matteo Facchinetti <engineering@sirius-es.it>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/512x/mpc512x.h | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/mpc512x_shared.c | 15 |
2 files changed, 15 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/512x/mpc512x.h b/arch/powerpc/platforms/512x/mpc512x.h index fdb4303246a0..cc97f022d028 100644 --- a/arch/powerpc/platforms/512x/mpc512x.h +++ b/arch/powerpc/platforms/512x/mpc512x.h | |||
@@ -17,6 +17,7 @@ extern void __init mpc512x_init(void); | |||
17 | extern void __init mpc512x_setup_arch(void); | 17 | extern void __init mpc512x_setup_arch(void); |
18 | extern int __init mpc5121_clk_init(void); | 18 | extern int __init mpc5121_clk_init(void); |
19 | extern const char *mpc512x_select_psc_compat(void); | 19 | extern const char *mpc512x_select_psc_compat(void); |
20 | extern const char *mpc512x_select_reset_compat(void); | ||
20 | extern void mpc512x_restart(char *cmd); | 21 | extern void mpc512x_restart(char *cmd); |
21 | 22 | ||
22 | #endif /* __MPC512X_H__ */ | 23 | #endif /* __MPC512X_H__ */ |
diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerpc/platforms/512x/mpc512x_shared.c index a8b5110eb298..a82a41b4fd91 100644 --- a/arch/powerpc/platforms/512x/mpc512x_shared.c +++ b/arch/powerpc/platforms/512x/mpc512x_shared.c | |||
@@ -35,8 +35,10 @@ static struct mpc512x_reset_module __iomem *reset_module_base; | |||
35 | static void __init mpc512x_restart_init(void) | 35 | static void __init mpc512x_restart_init(void) |
36 | { | 36 | { |
37 | struct device_node *np; | 37 | struct device_node *np; |
38 | const char *reset_compat; | ||
38 | 39 | ||
39 | np = of_find_compatible_node(NULL, NULL, "fsl,mpc5121-reset"); | 40 | reset_compat = mpc512x_select_reset_compat(); |
41 | np = of_find_compatible_node(NULL, NULL, reset_compat); | ||
40 | if (!np) | 42 | if (!np) |
41 | return; | 43 | return; |
42 | 44 | ||
@@ -355,6 +357,17 @@ const char *mpc512x_select_psc_compat(void) | |||
355 | return NULL; | 357 | return NULL; |
356 | } | 358 | } |
357 | 359 | ||
360 | const char *mpc512x_select_reset_compat(void) | ||
361 | { | ||
362 | if (of_machine_is_compatible("fsl,mpc5121")) | ||
363 | return "fsl,mpc5121-reset"; | ||
364 | |||
365 | if (of_machine_is_compatible("fsl,mpc5125")) | ||
366 | return "fsl,mpc5125-reset"; | ||
367 | |||
368 | return NULL; | ||
369 | } | ||
370 | |||
358 | static unsigned int __init get_fifo_size(struct device_node *np, | 371 | static unsigned int __init get_fifo_size(struct device_node *np, |
359 | char *prop_name) | 372 | char *prop_name) |
360 | { | 373 | { |