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 /arch/powerpc/platforms/512x/mpc512x_shared.c | |
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>
Diffstat (limited to 'arch/powerpc/platforms/512x/mpc512x_shared.c')
-rw-r--r-- | arch/powerpc/platforms/512x/mpc512x_shared.c | 25 |
1 files changed, 4 insertions, 21 deletions
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; |