aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pv210
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2010-05-20 02:13:04 -0400
committerBen Dooks <ben-linux@fluff.org>2010-05-20 05:14:52 -0400
commit5b696a67c327f21fc67b60a1518f65e4e7f2749f (patch)
treeaffc6d719e5d729bc410a88a142c6b358fb0fb2f /arch/arm/mach-s5pv210
parentb315032f530c58b973ade659f3b880fcc7017e92 (diff)
ARM: S5PV210: add framebuffer platform helpers for s5pv210 based machines
This patch adds common framebuffer device helpers and register defines for S5PV210 based machines. 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/Kconfig5
-rw-r--r--arch/arm/mach-s5pv210/Makefile1
-rw-r--r--arch/arm/mach-s5pv210/include/mach/irqs.h5
-rw-r--r--arch/arm/mach-s5pv210/include/mach/map.h3
-rw-r--r--arch/arm/mach-s5pv210/include/mach/regs-clock.h1
-rw-r--r--arch/arm/mach-s5pv210/setup-fb-24bpp.c62
6 files changed, 77 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
index 430055b88f92..7d8d93feb63b 100644
--- a/arch/arm/mach-s5pv210/Kconfig
+++ b/arch/arm/mach-s5pv210/Kconfig
@@ -25,6 +25,11 @@ config MACH_AQUILA
25 help 25 help
26 Machine support for the Samsung Aquila target based on S5PC110 SoC 26 Machine support for the Samsung Aquila target based on S5PC110 SoC
27 27
28config S5PV210_SETUP_FB_24BPP
29 bool
30 help
31 Common setup code for S5PV210 with an 24bpp RGB display helper.
32
28config MACH_SMDKV210 33config MACH_SMDKV210
29 bool "SMDKV210" 34 bool "SMDKV210"
30 select CPU_S5PV210 35 select CPU_S5PV210
diff --git a/arch/arm/mach-s5pv210/Makefile b/arch/arm/mach-s5pv210/Makefile
index ed3cb6c1b5df..2b061a0292e5 100644
--- a/arch/arm/mach-s5pv210/Makefile
+++ b/arch/arm/mach-s5pv210/Makefile
@@ -24,3 +24,4 @@ obj-$(CONFIG_MACH_SMDKC110) += mach-smdkc110.o
24# device support 24# device support
25 25
26obj-y += dev-audio.o 26obj-y += dev-audio.o
27obj-$(CONFIG_S5PV210_SETUP_FB_24BPP) += setup-fb-24bpp.o
diff --git a/arch/arm/mach-s5pv210/include/mach/irqs.h b/arch/arm/mach-s5pv210/include/mach/irqs.h
index 62c5175ef291..ee6e07b5ae8a 100644
--- a/arch/arm/mach-s5pv210/include/mach/irqs.h
+++ b/arch/arm/mach-s5pv210/include/mach/irqs.h
@@ -143,4 +143,9 @@
143 143
144#define NR_IRQS (IRQ_EINT(31) + 1) 144#define NR_IRQS (IRQ_EINT(31) + 1)
145 145
146/* Compatibility */
147#define IRQ_LCD_FIFO IRQ_LCD0
148#define IRQ_LCD_VSYNC IRQ_LCD1
149#define IRQ_LCD_SYSTEM IRQ_LCD2
150
146#endif /* ASM_ARCH_IRQS_H */ 151#endif /* ASM_ARCH_IRQS_H */
diff --git a/arch/arm/mach-s5pv210/include/mach/map.h b/arch/arm/mach-s5pv210/include/mach/map.h
index 5adcb9f26e44..e6bb12c17901 100644
--- a/arch/arm/mach-s5pv210/include/mach/map.h
+++ b/arch/arm/mach-s5pv210/include/mach/map.h
@@ -47,6 +47,8 @@
47#define S5PV210_PA_PDMA0 0xE0900000 47#define S5PV210_PA_PDMA0 0xE0900000
48#define S5PV210_PA_PDMA1 0xE0A00000 48#define S5PV210_PA_PDMA1 0xE0A00000
49 49
50#define S5PV210_PA_FB (0xF8000000)
51
50#define S5PV210_PA_VIC0 (0xF2000000) 52#define S5PV210_PA_VIC0 (0xF2000000)
51#define S5P_PA_VIC0 S5PV210_PA_VIC0 53#define S5P_PA_VIC0 S5PV210_PA_VIC0
52 54
@@ -78,5 +80,6 @@
78/* compatibiltiy defines. */ 80/* compatibiltiy defines. */
79#define S3C_PA_UART S5PV210_PA_UART 81#define S3C_PA_UART S5PV210_PA_UART
80#define S3C_PA_IIC S5PV210_PA_IIC0 82#define S3C_PA_IIC S5PV210_PA_IIC0
83#define S3C_PA_FB S5PV210_PA_FB
81 84
82#endif /* __ASM_ARCH_MAP_H */ 85#endif /* __ASM_ARCH_MAP_H */
diff --git a/arch/arm/mach-s5pv210/include/mach/regs-clock.h b/arch/arm/mach-s5pv210/include/mach/regs-clock.h
index e56e0e4673ed..2a25ab40c863 100644
--- a/arch/arm/mach-s5pv210/include/mach/regs-clock.h
+++ b/arch/arm/mach-s5pv210/include/mach/regs-clock.h
@@ -126,6 +126,7 @@
126 126
127#define S5P_RST_STAT S5P_CLKREG(0xA000) 127#define S5P_RST_STAT S5P_CLKREG(0xA000)
128#define S5P_OSC_CON S5P_CLKREG(0x8000) 128#define S5P_OSC_CON S5P_CLKREG(0x8000)
129#define S5P_MDNIE_SEL S5P_CLKREG(0x7008)
129#define S5P_MIPI_PHY_CON0 S5P_CLKREG(0x7200) 130#define S5P_MIPI_PHY_CON0 S5P_CLKREG(0x7200)
130#define S5P_MIPI_PHY_CON1 S5P_CLKREG(0x7204) 131#define S5P_MIPI_PHY_CON1 S5P_CLKREG(0x7204)
131#define S5P_MIPI_CONTROL S5P_CLKREG(0xE814) 132#define S5P_MIPI_CONTROL S5P_CLKREG(0xE814)
diff --git a/arch/arm/mach-s5pv210/setup-fb-24bpp.c b/arch/arm/mach-s5pv210/setup-fb-24bpp.c
new file mode 100644
index 000000000000..a50cbac8720d
--- /dev/null
+++ b/arch/arm/mach-s5pv210/setup-fb-24bpp.c
@@ -0,0 +1,62 @@
1/* linux/arch/arm/plat-s5pv210/setup-fb-24bpp.c
2 *
3 * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
5 *
6 * Base s5pv210 setup information for 24bpp LCD framebuffer
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#include <linux/kernel.h>
14#include <linux/types.h>
15#include <linux/fb.h>
16
17#include <mach/regs-fb.h>
18#include <mach/gpio.h>
19#include <mach/map.h>
20#include <plat/fb.h>
21#include <mach/regs-clock.h>
22#include <plat/gpio-cfg.h>
23
24void s5pv210_fb_gpio_setup_24bpp(void)
25{
26 unsigned int gpio = 0;
27
28 for (gpio = S5PV210_GPF0(0); gpio <= S5PV210_GPF0(7); gpio++) {
29 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
30 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
31 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
32 }
33
34 for (gpio = S5PV210_GPF1(0); gpio <= S5PV210_GPF1(7); gpio++) {
35 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
36 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
37 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
38 }
39
40 for (gpio = S5PV210_GPF2(0); gpio <= S5PV210_GPF2(7); gpio++) {
41 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
42 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
43 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
44 }
45
46 for (gpio = S5PV210_GPF3(0); gpio <= S5PV210_GPF3(3); gpio++) {
47 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
48 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
49 s5p_gpio_set_drvstr(gpio, S5P_GPIO_DRVSTR_LV4);
50 }
51
52 /* Set DISPLAY_CONTROL register for Display path selection.
53 *
54 * ouput | RGB | I80 | ITU
55 * -----------------------------------
56 * 00 | MIE | FIMD | FIMD
57 * 01 | MDNIE | MDNIE | FIMD
58 * 10 | FIMD | FIMD | FIMD
59 * 11 | FIMD | FIMD | FIMD
60 */
61 writel(0x2, S5P_MDNIE_SEL);
62}