diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2010-05-17 02:53:13 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-05-20 02:09:38 -0400 |
commit | b315032f530c58b973ade659f3b880fcc7017e92 (patch) | |
tree | 41573e03e2fd83ea65a56edf3530e5431b853059 /arch/arm/mach-s5pv210 | |
parent | d947e79249a165100527dd7c6b0159970d1cbc4b (diff) |
ARM: S5PV210: add support for s3c-fb driver on Aquila machine
This patch adds required platform definitions to enable s3c-fb
driver. Two framebuffer windows in 480x800x16bpp mode are defined.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s5pv210')
-rw-r--r-- | arch/arm/mach-s5pv210/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-s5pv210/mach-aquila.c | 49 |
2 files changed, 51 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig index 11da9c022d38..430055b88f92 100644 --- a/arch/arm/mach-s5pv210/Kconfig +++ b/arch/arm/mach-s5pv210/Kconfig | |||
@@ -20,6 +20,8 @@ config MACH_AQUILA | |||
20 | bool "Samsung Aquila" | 20 | bool "Samsung Aquila" |
21 | select CPU_S5PV210 | 21 | select CPU_S5PV210 |
22 | select ARCH_SPARSEMEM_ENABLE | 22 | select ARCH_SPARSEMEM_ENABLE |
23 | select S5PV210_SETUP_FB_24BPP | ||
24 | select S3C_DEV_FB | ||
23 | help | 25 | help |
24 | Machine support for the Samsung Aquila target based on S5PC110 SoC | 26 | Machine support for the Samsung Aquila target based on S5PC110 SoC |
25 | 27 | ||
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c index 6a1db39d931e..10bc76ec4025 100644 --- a/arch/arm/mach-s5pv210/mach-aquila.c +++ b/arch/arm/mach-s5pv210/mach-aquila.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/serial_core.h> | 14 | #include <linux/serial_core.h> |
15 | #include <linux/fb.h> | ||
15 | 16 | ||
16 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
17 | #include <asm/mach/map.h> | 18 | #include <asm/mach/map.h> |
@@ -20,11 +21,13 @@ | |||
20 | 21 | ||
21 | #include <mach/map.h> | 22 | #include <mach/map.h> |
22 | #include <mach/regs-clock.h> | 23 | #include <mach/regs-clock.h> |
24 | #include <mach/regs-fb.h> | ||
23 | 25 | ||
24 | #include <plat/regs-serial.h> | 26 | #include <plat/regs-serial.h> |
25 | #include <plat/s5pv210.h> | 27 | #include <plat/s5pv210.h> |
26 | #include <plat/devs.h> | 28 | #include <plat/devs.h> |
27 | #include <plat/cpu.h> | 29 | #include <plat/cpu.h> |
30 | #include <plat/fb.h> | ||
28 | 31 | ||
29 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | 32 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
30 | #define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 33 | #define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
@@ -71,7 +74,50 @@ static struct s3c2410_uartcfg smdkv210_uartcfgs[] __initdata = { | |||
71 | }, | 74 | }, |
72 | }; | 75 | }; |
73 | 76 | ||
77 | /* Frame Buffer */ | ||
78 | static struct s3c_fb_pd_win aquila_fb_win0 = { | ||
79 | .win_mode = { | ||
80 | .pixclock = 1000000000000ULL / ((16+16+2+480)*(28+3+2+800)*60), | ||
81 | .left_margin = 16, | ||
82 | .right_margin = 16, | ||
83 | .upper_margin = 3, | ||
84 | .lower_margin = 28, | ||
85 | .hsync_len = 2, | ||
86 | .vsync_len = 2, | ||
87 | .xres = 480, | ||
88 | .yres = 800, | ||
89 | }, | ||
90 | .max_bpp = 32, | ||
91 | .default_bpp = 16, | ||
92 | }; | ||
93 | |||
94 | static struct s3c_fb_pd_win aquila_fb_win1 = { | ||
95 | .win_mode = { | ||
96 | .pixclock = 1000000000000ULL / ((16+16+2+480)*(28+3+2+800)*60), | ||
97 | .left_margin = 16, | ||
98 | .right_margin = 16, | ||
99 | .upper_margin = 3, | ||
100 | .lower_margin = 28, | ||
101 | .hsync_len = 2, | ||
102 | .vsync_len = 2, | ||
103 | .xres = 480, | ||
104 | .yres = 800, | ||
105 | }, | ||
106 | .max_bpp = 32, | ||
107 | .default_bpp = 16, | ||
108 | }; | ||
109 | |||
110 | static struct s3c_fb_platdata aquila_lcd_pdata __initdata = { | ||
111 | .win[0] = &aquila_fb_win0, | ||
112 | .win[1] = &aquila_fb_win1, | ||
113 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, | ||
114 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC | | ||
115 | VIDCON1_INV_VCLK | VIDCON1_INV_VDEN, | ||
116 | .setup_gpio = s5pv210_fb_gpio_setup_24bpp, | ||
117 | }; | ||
118 | |||
74 | static struct platform_device *aquila_devices[] __initdata = { | 119 | static struct platform_device *aquila_devices[] __initdata = { |
120 | &s3c_device_fb, | ||
75 | }; | 121 | }; |
76 | 122 | ||
77 | static void __init aquila_map_io(void) | 123 | static void __init aquila_map_io(void) |
@@ -83,6 +129,9 @@ static void __init aquila_map_io(void) | |||
83 | 129 | ||
84 | static void __init aquila_machine_init(void) | 130 | static void __init aquila_machine_init(void) |
85 | { | 131 | { |
132 | /* FB */ | ||
133 | s3c_fb_set_platdata(&aquila_lcd_pdata); | ||
134 | |||
86 | platform_add_devices(aquila_devices, ARRAY_SIZE(aquila_devices)); | 135 | platform_add_devices(aquila_devices, ARRAY_SIZE(aquila_devices)); |
87 | } | 136 | } |
88 | 137 | ||