aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-10-01 03:24:32 -0400
committerPaul Mundt <lethal@linux-sh.org>2008-10-01 03:24:32 -0400
commit225c9a8d1da274bf23efec43ec28b1c9e45e12f8 (patch)
treee47838be04074980744be0f289e274d24d2bb31a
parentbbfbd8b151fe35c9a1180a7f5254c5d6b8387cc0 (diff)
video: sh_mobile_lcdcfb: Support HAVE_CLK=n configurations.
This provides a workaround for users of sh_mobile_lcdcfb that don't define HAVE_CLK and have otherwise sane clock initialization. At the same time, move the sh_mobile_lcdc.h header to include/video/. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/boards/board-ap325rxa.c2
-rw-r--r--arch/sh/boards/mach-migor/lcd_qvga.c2
-rw-r--r--arch/sh/boards/mach-migor/setup.c2
-rw-r--r--arch/sh/include/asm/migor.h2
-rw-r--r--drivers/video/sh_mobile_lcdcfb.c8
-rw-r--r--include/video/sh_mobile_lcdc.h (renamed from arch/sh/include/asm/sh_mobile_lcdc.h)0
6 files changed, 11 insertions, 5 deletions
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c
index 00e632fc0688..7ae8dcddfeb4 100644
--- a/arch/sh/boards/board-ap325rxa.c
+++ b/arch/sh/boards/board-ap325rxa.c
@@ -20,7 +20,7 @@
20#include <linux/smc911x.h> 20#include <linux/smc911x.h>
21#include <media/soc_camera_platform.h> 21#include <media/soc_camera_platform.h>
22#include <media/sh_mobile_ceu.h> 22#include <media/sh_mobile_ceu.h>
23#include <asm/sh_mobile_lcdc.h> 23#include <video/sh_mobile_lcdc.h>
24#include <asm/io.h> 24#include <asm/io.h>
25#include <asm/clock.h> 25#include <asm/clock.h>
26 26
diff --git a/arch/sh/boards/mach-migor/lcd_qvga.c b/arch/sh/boards/mach-migor/lcd_qvga.c
index 6e9609596448..735326c04497 100644
--- a/arch/sh/boards/mach-migor/lcd_qvga.c
+++ b/arch/sh/boards/mach-migor/lcd_qvga.c
@@ -17,7 +17,7 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/module.h> 19#include <linux/module.h>
20#include <asm/sh_mobile_lcdc.h> 20#include <video/sh_mobile_lcdc.h>
21#include <asm/migor.h> 21#include <asm/migor.h>
22 22
23/* LCD Module is a PH240320T according to board schematics. This module 23/* LCD Module is a PH240320T according to board schematics. This module
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index 714dce91cc9b..f27475d2fa0c 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -19,11 +19,11 @@
19#include <linux/clk.h> 19#include <linux/clk.h>
20#include <media/soc_camera_platform.h> 20#include <media/soc_camera_platform.h>
21#include <media/sh_mobile_ceu.h> 21#include <media/sh_mobile_ceu.h>
22#include <video/sh_mobile_lcdc.h>
22#include <asm/clock.h> 23#include <asm/clock.h>
23#include <asm/machvec.h> 24#include <asm/machvec.h>
24#include <asm/io.h> 25#include <asm/io.h>
25#include <asm/sh_keysc.h> 26#include <asm/sh_keysc.h>
26#include <asm/sh_mobile_lcdc.h>
27#include <asm/migor.h> 27#include <asm/migor.h>
28 28
29/* Address IRQ Size Bus Description 29/* Address IRQ Size Bus Description
diff --git a/arch/sh/include/asm/migor.h b/arch/sh/include/asm/migor.h
index c12b632c540b..70596d38fd67 100644
--- a/arch/sh/include/asm/migor.h
+++ b/arch/sh/include/asm/migor.h
@@ -54,7 +54,7 @@
54 54
55#define BSC_CS6ABCR 0xfec1001c 55#define BSC_CS6ABCR 0xfec1001c
56 56
57#include <asm/sh_mobile_lcdc.h> 57#include <video/sh_mobile_lcdc.h>
58 58
59int migor_lcd_qvga_setup(void *board_data, void *sys_ops_handle, 59int migor_lcd_qvga_setup(void *board_data, void *sys_ops_handle,
60 struct sh_mobile_lcdc_sys_bus_ops *sys_ops); 60 struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 4c32c06579a0..b7468bacce80 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -16,7 +16,7 @@
16#include <linux/clk.h> 16#include <linux/clk.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/dma-mapping.h> 18#include <linux/dma-mapping.h>
19#include <asm/sh_mobile_lcdc.h> 19#include <video/sh_mobile_lcdc.h>
20 20
21#define PALETTE_NR 16 21#define PALETTE_NR 16
22 22
@@ -34,7 +34,9 @@ struct sh_mobile_lcdc_chan {
34 34
35struct sh_mobile_lcdc_priv { 35struct sh_mobile_lcdc_priv {
36 void __iomem *base; 36 void __iomem *base;
37#ifdef CONFIG_HAVE_CLK
37 struct clk *clk; 38 struct clk *clk;
39#endif
38 unsigned long lddckr; 40 unsigned long lddckr;
39 struct sh_mobile_lcdc_chan ch[2]; 41 struct sh_mobile_lcdc_chan ch[2];
40}; 42};
@@ -422,6 +424,7 @@ static int sh_mobile_lcdc_setup_clocks(struct device *dev, int clock_source,
422 424
423 priv->lddckr = icksel << 16; 425 priv->lddckr = icksel << 16;
424 426
427#ifdef CONFIG_HAVE_CLK
425 if (str) { 428 if (str) {
426 priv->clk = clk_get(dev, str); 429 priv->clk = clk_get(dev, str);
427 if (IS_ERR(priv->clk)) { 430 if (IS_ERR(priv->clk)) {
@@ -431,6 +434,7 @@ static int sh_mobile_lcdc_setup_clocks(struct device *dev, int clock_source,
431 434
432 clk_enable(priv->clk); 435 clk_enable(priv->clk);
433 } 436 }
437#endif
434 438
435 return 0; 439 return 0;
436} 440}
@@ -688,10 +692,12 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev)
688 fb_dealloc_cmap(&info->cmap); 692 fb_dealloc_cmap(&info->cmap);
689 } 693 }
690 694
695#ifdef CONFIG_HAVE_CLK
691 if (priv->clk) { 696 if (priv->clk) {
692 clk_disable(priv->clk); 697 clk_disable(priv->clk);
693 clk_put(priv->clk); 698 clk_put(priv->clk);
694 } 699 }
700#endif
695 701
696 if (priv->base) 702 if (priv->base)
697 iounmap(priv->base); 703 iounmap(priv->base);
diff --git a/arch/sh/include/asm/sh_mobile_lcdc.h b/include/video/sh_mobile_lcdc.h
index 130102f663f5..130102f663f5 100644
--- a/arch/sh/include/asm/sh_mobile_lcdc.h
+++ b/include/video/sh_mobile_lcdc.h