diff options
-rw-r--r-- | arch/powerpc/include/asm/mpc5121.h | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/mpc5121_ads.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/mpc512x.h | 11 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/mpc512x_generic.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/mpc512x_shared.c | 14 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/pdm360ng.c | 4 |
6 files changed, 21 insertions, 19 deletions
diff --git a/arch/powerpc/include/asm/mpc5121.h b/arch/powerpc/include/asm/mpc5121.h index 885c040d6194..8ae133eaf9fa 100644 --- a/arch/powerpc/include/asm/mpc5121.h +++ b/arch/powerpc/include/asm/mpc5121.h | |||
@@ -68,6 +68,5 @@ struct mpc512x_lpc { | |||
68 | }; | 68 | }; |
69 | 69 | ||
70 | int mpc512x_cs_config(unsigned int cs, u32 val); | 70 | int mpc512x_cs_config(unsigned int cs, u32 val); |
71 | int __init mpc5121_clk_init(void); | ||
72 | 71 | ||
73 | #endif /* __ASM_POWERPC_MPC5121_H__ */ | 72 | #endif /* __ASM_POWERPC_MPC5121_H__ */ |
diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.c b/arch/powerpc/platforms/512x/mpc5121_ads.c index 0a134e0469ef..3e90ece10ae9 100644 --- a/arch/powerpc/platforms/512x/mpc5121_ads.c +++ b/arch/powerpc/platforms/512x/mpc5121_ads.c | |||
@@ -43,9 +43,7 @@ static void __init mpc5121_ads_setup_arch(void) | |||
43 | mpc83xx_add_bridge(np); | 43 | mpc83xx_add_bridge(np); |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) | 46 | mpc512x_setup_arch(); |
47 | mpc512x_setup_diu(); | ||
48 | #endif | ||
49 | } | 47 | } |
50 | 48 | ||
51 | static void __init mpc5121_ads_init_IRQ(void) | 49 | static void __init mpc5121_ads_init_IRQ(void) |
@@ -69,7 +67,7 @@ define_machine(mpc5121_ads) { | |||
69 | .probe = mpc5121_ads_probe, | 67 | .probe = mpc5121_ads_probe, |
70 | .setup_arch = mpc5121_ads_setup_arch, | 68 | .setup_arch = mpc5121_ads_setup_arch, |
71 | .init = mpc512x_init, | 69 | .init = mpc512x_init, |
72 | .init_early = mpc512x_init_diu, | 70 | .init_early = mpc512x_init_early, |
73 | .init_IRQ = mpc5121_ads_init_IRQ, | 71 | .init_IRQ = mpc5121_ads_init_IRQ, |
74 | .get_irq = ipic_get_irq, | 72 | .get_irq = ipic_get_irq, |
75 | .calibrate_decr = generic_calibrate_decr, | 73 | .calibrate_decr = generic_calibrate_decr, |
diff --git a/arch/powerpc/platforms/512x/mpc512x.h b/arch/powerpc/platforms/512x/mpc512x.h index 0a8e60023944..fdb4303246a0 100644 --- a/arch/powerpc/platforms/512x/mpc512x.h +++ b/arch/powerpc/platforms/512x/mpc512x.h | |||
@@ -12,18 +12,11 @@ | |||
12 | #ifndef __MPC512X_H__ | 12 | #ifndef __MPC512X_H__ |
13 | #define __MPC512X_H__ | 13 | #define __MPC512X_H__ |
14 | extern void __init mpc512x_init_IRQ(void); | 14 | extern void __init mpc512x_init_IRQ(void); |
15 | extern void __init mpc512x_init_early(void); | ||
15 | extern void __init mpc512x_init(void); | 16 | extern void __init mpc512x_init(void); |
17 | extern void __init mpc512x_setup_arch(void); | ||
16 | extern int __init mpc5121_clk_init(void); | 18 | extern int __init mpc5121_clk_init(void); |
17 | void __init mpc512x_declare_of_platform_devices(void); | ||
18 | extern const char *mpc512x_select_psc_compat(void); | 19 | extern const char *mpc512x_select_psc_compat(void); |
19 | extern void mpc512x_restart(char *cmd); | 20 | extern void mpc512x_restart(char *cmd); |
20 | 21 | ||
21 | #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) | ||
22 | void mpc512x_init_diu(void); | ||
23 | void mpc512x_setup_diu(void); | ||
24 | #else | ||
25 | #define mpc512x_init_diu NULL | ||
26 | #define mpc512x_setup_diu NULL | ||
27 | #endif | ||
28 | |||
29 | #endif /* __MPC512X_H__ */ | 22 | #endif /* __MPC512X_H__ */ |
diff --git a/arch/powerpc/platforms/512x/mpc512x_generic.c b/arch/powerpc/platforms/512x/mpc512x_generic.c index 5fb919b30924..ce71408781a0 100644 --- a/arch/powerpc/platforms/512x/mpc512x_generic.c +++ b/arch/powerpc/platforms/512x/mpc512x_generic.c | |||
@@ -45,8 +45,8 @@ define_machine(mpc512x_generic) { | |||
45 | .name = "MPC512x generic", | 45 | .name = "MPC512x generic", |
46 | .probe = mpc512x_generic_probe, | 46 | .probe = mpc512x_generic_probe, |
47 | .init = mpc512x_init, | 47 | .init = mpc512x_init, |
48 | .init_early = mpc512x_init_diu, | 48 | .init_early = mpc512x_init_early, |
49 | .setup_arch = mpc512x_setup_diu, | 49 | .setup_arch = mpc512x_setup_arch, |
50 | .init_IRQ = mpc512x_init_IRQ, | 50 | .init_IRQ = mpc512x_init_IRQ, |
51 | .get_irq = ipic_get_irq, | 51 | .get_irq = ipic_get_irq, |
52 | .calibrate_decr = generic_calibrate_decr, | 52 | .calibrate_decr = generic_calibrate_decr, |
diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerpc/platforms/512x/mpc512x_shared.c index 6eb94ab99d39..09622d3323d7 100644 --- a/arch/powerpc/platforms/512x/mpc512x_shared.c +++ b/arch/powerpc/platforms/512x/mpc512x_shared.c | |||
@@ -58,7 +58,7 @@ void mpc512x_restart(char *cmd) | |||
58 | ; | 58 | ; |
59 | } | 59 | } |
60 | 60 | ||
61 | #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) | 61 | #if IS_ENABLED(CONFIG_FB_FSL_DIU) |
62 | 62 | ||
63 | struct fsl_diu_shared_fb { | 63 | struct fsl_diu_shared_fb { |
64 | u8 gamma[0x300]; /* 32-bit aligned! */ | 64 | u8 gamma[0x300]; /* 32-bit aligned! */ |
@@ -436,6 +436,12 @@ void __init mpc512x_psc_fifo_init(void) | |||
436 | } | 436 | } |
437 | } | 437 | } |
438 | 438 | ||
439 | void __init mpc512x_init_early(void) | ||
440 | { | ||
441 | if (IS_ENABLED(CONFIG_FB_FSL_DIU)) | ||
442 | mpc512x_init_diu(); | ||
443 | } | ||
444 | |||
439 | void __init mpc512x_init(void) | 445 | void __init mpc512x_init(void) |
440 | { | 446 | { |
441 | mpc5121_clk_init(); | 447 | mpc5121_clk_init(); |
@@ -444,6 +450,12 @@ void __init mpc512x_init(void) | |||
444 | mpc512x_psc_fifo_init(); | 450 | mpc512x_psc_fifo_init(); |
445 | } | 451 | } |
446 | 452 | ||
453 | void __init mpc512x_setup_arch(void) | ||
454 | { | ||
455 | if (IS_ENABLED(CONFIG_FB_FSL_DIU)) | ||
456 | mpc512x_setup_diu(); | ||
457 | } | ||
458 | |||
447 | /** | 459 | /** |
448 | * mpc512x_cs_config - Setup chip select configuration | 460 | * mpc512x_cs_config - Setup chip select configuration |
449 | * @cs: chip select number | 461 | * @cs: chip select number |
diff --git a/arch/powerpc/platforms/512x/pdm360ng.c b/arch/powerpc/platforms/512x/pdm360ng.c index 0575e858291c..24b314d7bd5f 100644 --- a/arch/powerpc/platforms/512x/pdm360ng.c +++ b/arch/powerpc/platforms/512x/pdm360ng.c | |||
@@ -119,9 +119,9 @@ static int __init pdm360ng_probe(void) | |||
119 | define_machine(pdm360ng) { | 119 | define_machine(pdm360ng) { |
120 | .name = "PDM360NG", | 120 | .name = "PDM360NG", |
121 | .probe = pdm360ng_probe, | 121 | .probe = pdm360ng_probe, |
122 | .setup_arch = mpc512x_setup_diu, | 122 | .setup_arch = mpc512x_setup_arch, |
123 | .init = pdm360ng_init, | 123 | .init = pdm360ng_init, |
124 | .init_early = mpc512x_init_diu, | 124 | .init_early = mpc512x_init_early, |
125 | .init_IRQ = mpc512x_init_IRQ, | 125 | .init_IRQ = mpc512x_init_IRQ, |
126 | .get_irq = ipic_get_irq, | 126 | .get_irq = ipic_get_irq, |
127 | .calibrate_decr = generic_calibrate_decr, | 127 | .calibrate_decr = generic_calibrate_decr, |