aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pc100
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2010-05-18 06:38:43 -0400
committerBen Dooks <ben-linux@fluff.org>2010-05-19 05:23:27 -0400
commitb884c0e07058478bff82b8edcecff4e2919fa361 (patch)
treea46f312e4f6de9a326e5853e32e147e8c53d86f4 /arch/arm/mach-s5pc100
parentc8bb9635f926aaf15987450c57af05e422874b92 (diff)
ARM: S5PC100: Move frame buffer helpers from plat-s5pc1xx to mach-s5pc100
Move frame buffer helpers from plat-s5pc1xx to mach-s5pc100. 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-s5pc100')
-rw-r--r--arch/arm/mach-s5pc100/Kconfig7
-rw-r--r--arch/arm/mach-s5pc100/Makefile1
-rw-r--r--arch/arm/mach-s5pc100/setup-fb-24bpp.c48
3 files changed, 55 insertions, 1 deletions
diff --git a/arch/arm/mach-s5pc100/Kconfig b/arch/arm/mach-s5pc100/Kconfig
index 27ec167d2808..7d9b68c8fef5 100644
--- a/arch/arm/mach-s5pc100/Kconfig
+++ b/arch/arm/mach-s5pc100/Kconfig
@@ -12,6 +12,11 @@ config CPU_S5PC100
12 help 12 help
13 Enable S5PC100 CPU support 13 Enable S5PC100 CPU support
14 14
15config S5PC100_SETUP_FB_24BPP
16 bool
17 help
18 Common setup code for S5PC1XX with an 24bpp RGB display helper.
19
15config S5PC100_SETUP_SDHCI 20config S5PC100_SETUP_SDHCI
16 bool 21 bool
17 select S5PC1XX_SETUP_SDHCI_GPIO 22 select S5PC1XX_SETUP_SDHCI_GPIO
@@ -28,7 +33,7 @@ config MACH_SMDKC100
28 select S3C_DEV_HSMMC2 33 select S3C_DEV_HSMMC2
29 select S5PC1XX_SETUP_I2C0 34 select S5PC1XX_SETUP_I2C0
30 select S5PC1XX_SETUP_I2C1 35 select S5PC1XX_SETUP_I2C1
31 select S5PC1XX_SETUP_FB_24BPP 36 select S5PC100_SETUP_FB_24BPP
32 select S5PC100_SETUP_SDHCI 37 select S5PC100_SETUP_SDHCI
33 help 38 help
34 Machine support for the Samsung SMDKC100 39 Machine support for the Samsung SMDKC100
diff --git a/arch/arm/mach-s5pc100/Makefile b/arch/arm/mach-s5pc100/Makefile
index 4199ce2b161a..1d1276c29cff 100644
--- a/arch/arm/mach-s5pc100/Makefile
+++ b/arch/arm/mach-s5pc100/Makefile
@@ -15,6 +15,7 @@ obj-$(CONFIG_CPU_S5PC100) += cpu.o gpiolib.o
15 15
16# Helper and device support 16# Helper and device support
17 17
18obj-$(CONFIG_S5PC100_SETUP_FB_24BPP) += setup-fb-24bpp.o
18obj-$(CONFIG_S5PC100_SETUP_SDHCI) += setup-sdhci.o 19obj-$(CONFIG_S5PC100_SETUP_SDHCI) += setup-sdhci.o
19 20
20# machine support 21# machine support
diff --git a/arch/arm/mach-s5pc100/setup-fb-24bpp.c b/arch/arm/mach-s5pc100/setup-fb-24bpp.c
new file mode 100644
index 000000000000..6eba6cb8e2f4
--- /dev/null
+++ b/arch/arm/mach-s5pc100/setup-fb-24bpp.c
@@ -0,0 +1,48 @@
1/*
2 * linux/arch/arm/mach-s5pc100/setup-fb-24bpp.c
3 *
4 * Copyright 2009 Samsung Electronics
5 *
6 * Base S5PC100 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#include <linux/gpio.h>
17
18#include <mach/regs-fb.h>
19#include <mach/map.h>
20#include <plat/fb.h>
21#include <plat/gpio-cfg.h>
22
23#define DISR_OFFSET 0x7008
24
25void s5pc100_fb_gpio_setup_24bpp(void)
26{
27 unsigned int gpio = 0;
28
29 for (gpio = S5PC100_GPF0(0); gpio <= S5PC100_GPF0(7); gpio++) {
30 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
31 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
32 }
33
34 for (gpio = S5PC100_GPF1(0); gpio <= S5PC100_GPF1(7); gpio++) {
35 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
36 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
37 }
38
39 for (gpio = S5PC100_GPF2(0); gpio <= S5PC100_GPF2(7); gpio++) {
40 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
41 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
42 }
43
44 for (gpio = S5PC100_GPF3(0); gpio <= S5PC100_GPF3(3); gpio++) {
45 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
46 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
47 }
48}