diff options
author | Timur Tabi <timur@freescale.com> | 2012-10-15 05:52:20 -0400 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2012-12-03 16:13:34 -0500 |
commit | 6baf11906e7687ad517567f6b93b94a90f0db3f9 (patch) | |
tree | 3f817362bdc3e43eab3202fd3ddd17b5ca69e8c4 | |
parent | 6c27b20395d21235b73771a2bcf5325ece94c4c8 (diff) |
powerpc/512x: don't compile any platform DIU code if the DIU is not enabled
If the DIU framebuffer driver is not enabled, then there's no point in
compiling any platform DIU code, because it will never be used. Most of
the platform code was protected in the appropriate #ifdef, but not all.
This caused a break in some randconfig builds.
This is only a problem on the 512x platforms. The P1022DS and MPC8610HPCD
platforms are already correct.
This patch reverts commit 12e36309f8774f4ccc769d5e3ff11ef092e524bc ("powerpc:
Option FB_FSL_DIU is not really optional for mpc512x") and restores the
ability to configure DIU support.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
-rw-r--r-- | arch/powerpc/platforms/512x/Kconfig | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/mpc5121_ads.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/mpc512x.h | 11 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/mpc512x_shared.c | 25 |
4 files changed, 16 insertions, 24 deletions
diff --git a/arch/powerpc/platforms/512x/Kconfig b/arch/powerpc/platforms/512x/Kconfig index b62508b113db..c16999802ecf 100644 --- a/arch/powerpc/platforms/512x/Kconfig +++ b/arch/powerpc/platforms/512x/Kconfig | |||
@@ -2,7 +2,6 @@ config PPC_MPC512x | |||
2 | bool "512x-based boards" | 2 | bool "512x-based boards" |
3 | depends on 6xx | 3 | depends on 6xx |
4 | select FSL_SOC | 4 | select FSL_SOC |
5 | select FB_FSL_DIU | ||
6 | select IPIC | 5 | select IPIC |
7 | select PPC_CLOCK | 6 | select PPC_CLOCK |
8 | select PPC_PCI_CHOICE | 7 | select PPC_PCI_CHOICE |
diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.c b/arch/powerpc/platforms/512x/mpc5121_ads.c index dcef6ade48e1..0a134e0469ef 100644 --- a/arch/powerpc/platforms/512x/mpc5121_ads.c +++ b/arch/powerpc/platforms/512x/mpc5121_ads.c | |||
@@ -42,7 +42,10 @@ static void __init mpc5121_ads_setup_arch(void) | |||
42 | for_each_compatible_node(np, "pci", "fsl,mpc5121-pci") | 42 | for_each_compatible_node(np, "pci", "fsl,mpc5121-pci") |
43 | mpc83xx_add_bridge(np); | 43 | mpc83xx_add_bridge(np); |
44 | #endif | 44 | #endif |
45 | |||
46 | #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) | ||
45 | mpc512x_setup_diu(); | 47 | mpc512x_setup_diu(); |
48 | #endif | ||
46 | } | 49 | } |
47 | 50 | ||
48 | static void __init mpc5121_ads_init_IRQ(void) | 51 | static void __init mpc5121_ads_init_IRQ(void) |
diff --git a/arch/powerpc/platforms/512x/mpc512x.h b/arch/powerpc/platforms/512x/mpc512x.h index 1ab6d11d0b19..c32b399eb952 100644 --- a/arch/powerpc/platforms/512x/mpc512x.h +++ b/arch/powerpc/platforms/512x/mpc512x.h | |||
@@ -16,6 +16,13 @@ extern void __init mpc512x_init(void); | |||
16 | extern int __init mpc5121_clk_init(void); | 16 | extern int __init mpc5121_clk_init(void); |
17 | void __init mpc512x_declare_of_platform_devices(void); | 17 | void __init mpc512x_declare_of_platform_devices(void); |
18 | extern void mpc512x_restart(char *cmd); | 18 | extern void mpc512x_restart(char *cmd); |
19 | extern void mpc512x_init_diu(void); | 19 | |
20 | extern void mpc512x_setup_diu(void); | 20 | #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) |
21 | void mpc512x_init_diu(void); | ||
22 | void mpc512x_setup_diu(void); | ||
23 | #else | ||
24 | #define mpc512x_init_diu NULL | ||
25 | #define mpc512x_setup_diu NULL | ||
26 | #endif | ||
27 | |||
21 | #endif /* __MPC512X_H__ */ | 28 | #endif /* __MPC512X_H__ */ |
diff --git a/arch/powerpc/platforms/512x/mpc512x_shared.c b/arch/powerpc/platforms/512x/mpc512x_shared.c index 1650e090ef3a..35f14fda108a 100644 --- a/arch/powerpc/platforms/512x/mpc512x_shared.c +++ b/arch/powerpc/platforms/512x/mpc512x_shared.c | |||
@@ -58,6 +58,8 @@ void mpc512x_restart(char *cmd) | |||
58 | ; | 58 | ; |
59 | } | 59 | } |
60 | 60 | ||
61 | #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) | ||
62 | |||
61 | struct fsl_diu_shared_fb { | 63 | struct fsl_diu_shared_fb { |
62 | u8 gamma[0x300]; /* 32-bit aligned! */ | 64 | u8 gamma[0x300]; /* 32-bit aligned! */ |
63 | struct diu_ad ad0; /* 32-bit aligned! */ | 65 | struct diu_ad ad0; /* 32-bit aligned! */ |
@@ -66,25 +68,6 @@ struct fsl_diu_shared_fb { | |||
66 | bool in_use; | 68 | bool in_use; |
67 | }; | 69 | }; |
68 | 70 | ||
69 | u32 mpc512x_get_pixel_format(enum fsl_diu_monitor_port port, | ||
70 | unsigned int bits_per_pixel) | ||
71 | { | ||
72 | switch (bits_per_pixel) { | ||
73 | case 32: | ||
74 | return 0x88883316; | ||
75 | case 24: | ||
76 | return 0x88082219; | ||
77 | case 16: | ||
78 | return 0x65053118; | ||
79 | } | ||
80 | return 0x00000400; | ||
81 | } | ||
82 | |||
83 | void mpc512x_set_gamma_table(enum fsl_diu_monitor_port port, | ||
84 | char *gamma_table_base) | ||
85 | { | ||
86 | } | ||
87 | |||
88 | void mpc512x_set_monitor_port(enum fsl_diu_monitor_port port) | 71 | void mpc512x_set_monitor_port(enum fsl_diu_monitor_port port) |
89 | { | 72 | { |
90 | } | 73 | } |
@@ -320,14 +303,14 @@ void __init mpc512x_setup_diu(void) | |||
320 | } | 303 | } |
321 | } | 304 | } |
322 | 305 | ||
323 | diu_ops.get_pixel_format = mpc512x_get_pixel_format; | ||
324 | diu_ops.set_gamma_table = mpc512x_set_gamma_table; | ||
325 | diu_ops.set_monitor_port = mpc512x_set_monitor_port; | 306 | diu_ops.set_monitor_port = mpc512x_set_monitor_port; |
326 | diu_ops.set_pixel_clock = mpc512x_set_pixel_clock; | 307 | diu_ops.set_pixel_clock = mpc512x_set_pixel_clock; |
327 | diu_ops.valid_monitor_port = mpc512x_valid_monitor_port; | 308 | diu_ops.valid_monitor_port = mpc512x_valid_monitor_port; |
328 | diu_ops.release_bootmem = mpc512x_release_bootmem; | 309 | diu_ops.release_bootmem = mpc512x_release_bootmem; |
329 | } | 310 | } |
330 | 311 | ||
312 | #endif | ||
313 | |||
331 | void __init mpc512x_init_IRQ(void) | 314 | void __init mpc512x_init_IRQ(void) |
332 | { | 315 | { |
333 | struct device_node *np; | 316 | struct device_node *np; |