diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-01-14 09:32:49 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-03-07 13:29:31 -0500 |
commit | 2e8fd696145819c6c5d6ac08c603af655e7f2298 (patch) | |
tree | 71f9b42f1ecc351131ea45ee9a2c8dd22cb6db02 /arch/arm/mach-mxs | |
parent | f0a523b5e5e2db4e8518ae20f466c0a6be7e145e (diff) |
ARM i.MX23/28: Add framebuffer device support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Shawn Guo <shawn.guo@freescale.com>
Diffstat (limited to 'arch/arm/mach-mxs')
-rw-r--r-- | arch/arm/mach-mxs/clock-mx23.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mxs/clock-mx28.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mxs/devices-mx23.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-mxs/devices-mx28.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-mxs/devices/Kconfig | 3 | ||||
-rw-r--r-- | arch/arm/mach-mxs/devices/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-mxs/devices/platform-mxsfb.c | 46 |
7 files changed, 60 insertions, 0 deletions
diff --git a/arch/arm/mach-mxs/clock-mx23.c b/arch/arm/mach-mxs/clock-mx23.c index 38ee1b17a27d..2415b33d79c0 100644 --- a/arch/arm/mach-mxs/clock-mx23.c +++ b/arch/arm/mach-mxs/clock-mx23.c | |||
@@ -452,6 +452,7 @@ static struct clk_lookup lookups[] = { | |||
452 | _REGISTER_CLOCK("mxs-pwm.2", NULL, pwm_clk) | 452 | _REGISTER_CLOCK("mxs-pwm.2", NULL, pwm_clk) |
453 | _REGISTER_CLOCK("mxs-pwm.3", NULL, pwm_clk) | 453 | _REGISTER_CLOCK("mxs-pwm.3", NULL, pwm_clk) |
454 | _REGISTER_CLOCK("mxs-pwm.4", NULL, pwm_clk) | 454 | _REGISTER_CLOCK("mxs-pwm.4", NULL, pwm_clk) |
455 | _REGISTER_CLOCK("imx23-fb", NULL, lcdif_clk) | ||
455 | }; | 456 | }; |
456 | 457 | ||
457 | static int clk_misc_init(void) | 458 | static int clk_misc_init(void) |
diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c index 40726c70328f..82770568845e 100644 --- a/arch/arm/mach-mxs/clock-mx28.c +++ b/arch/arm/mach-mxs/clock-mx28.c | |||
@@ -632,6 +632,7 @@ static struct clk_lookup lookups[] = { | |||
632 | _REGISTER_CLOCK("mxs-pwm.7", NULL, pwm_clk) | 632 | _REGISTER_CLOCK("mxs-pwm.7", NULL, pwm_clk) |
633 | _REGISTER_CLOCK(NULL, "lradc", lradc_clk) | 633 | _REGISTER_CLOCK(NULL, "lradc", lradc_clk) |
634 | _REGISTER_CLOCK(NULL, "spdif", spdif_clk) | 634 | _REGISTER_CLOCK(NULL, "spdif", spdif_clk) |
635 | _REGISTER_CLOCK("imx28-fb", NULL, lcdif_clk) | ||
635 | }; | 636 | }; |
636 | 637 | ||
637 | static int clk_misc_init(void) | 638 | static int clk_misc_init(void) |
diff --git a/arch/arm/mach-mxs/devices-mx23.h b/arch/arm/mach-mxs/devices-mx23.h index 7fb27b12bea9..c7e14f4e3669 100644 --- a/arch/arm/mach-mxs/devices-mx23.h +++ b/arch/arm/mach-mxs/devices-mx23.h | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #include <mach/mx23.h> | 11 | #include <mach/mx23.h> |
12 | #include <mach/devices-common.h> | 12 | #include <mach/devices-common.h> |
13 | #include <mach/mxsfb.h> | ||
13 | 14 | ||
14 | extern const struct amba_device mx23_duart_device __initconst; | 15 | extern const struct amba_device mx23_duart_device __initconst; |
15 | #define mx23_add_duart() \ | 16 | #define mx23_add_duart() \ |
@@ -21,3 +22,6 @@ extern const struct mxs_auart_data mx23_auart_data[] __initconst; | |||
21 | #define mx23_add_auart1() mx23_add_auart(1) | 22 | #define mx23_add_auart1() mx23_add_auart(1) |
22 | 23 | ||
23 | #define mx23_add_mxs_pwm(id) mxs_add_mxs_pwm(MX23_PWM_BASE_ADDR, id) | 24 | #define mx23_add_mxs_pwm(id) mxs_add_mxs_pwm(MX23_PWM_BASE_ADDR, id) |
25 | |||
26 | struct platform_device *__init mx23_add_mxsfb( | ||
27 | const struct mxsfb_platform_data *pdata); | ||
diff --git a/arch/arm/mach-mxs/devices-mx28.h b/arch/arm/mach-mxs/devices-mx28.h index a9eecdc7e227..9d08555c4cf0 100644 --- a/arch/arm/mach-mxs/devices-mx28.h +++ b/arch/arm/mach-mxs/devices-mx28.h | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #include <mach/mx28.h> | 11 | #include <mach/mx28.h> |
12 | #include <mach/devices-common.h> | 12 | #include <mach/devices-common.h> |
13 | #include <mach/mxsfb.h> | ||
13 | 14 | ||
14 | extern const struct amba_device mx28_duart_device __initconst; | 15 | extern const struct amba_device mx28_duart_device __initconst; |
15 | #define mx28_add_duart() \ | 16 | #define mx28_add_duart() \ |
@@ -37,3 +38,6 @@ extern const struct mxs_i2c_data mx28_mxs_i2c_data[] __initconst; | |||
37 | #define mx28_add_mxs_i2c(id) mxs_add_mxs_i2c(&mx28_mxs_i2c_data[id]) | 38 | #define mx28_add_mxs_i2c(id) mxs_add_mxs_i2c(&mx28_mxs_i2c_data[id]) |
38 | 39 | ||
39 | #define mx28_add_mxs_pwm(id) mxs_add_mxs_pwm(MX28_PWM_BASE_ADDR, id) | 40 | #define mx28_add_mxs_pwm(id) mxs_add_mxs_pwm(MX28_PWM_BASE_ADDR, id) |
41 | |||
42 | struct platform_device *__init mx28_add_mxsfb( | ||
43 | const struct mxsfb_platform_data *pdata); | ||
diff --git a/arch/arm/mach-mxs/devices/Kconfig b/arch/arm/mach-mxs/devices/Kconfig index a878915063ed..1451ad060d82 100644 --- a/arch/arm/mach-mxs/devices/Kconfig +++ b/arch/arm/mach-mxs/devices/Kconfig | |||
@@ -17,3 +17,6 @@ config MXS_HAVE_PLATFORM_MXS_I2C | |||
17 | 17 | ||
18 | config MXS_HAVE_PLATFORM_MXS_PWM | 18 | config MXS_HAVE_PLATFORM_MXS_PWM |
19 | bool | 19 | bool |
20 | |||
21 | config MXS_HAVE_PLATFORM_MXSFB | ||
22 | bool | ||
diff --git a/arch/arm/mach-mxs/devices/Makefile b/arch/arm/mach-mxs/devices/Makefile index 345b8399b80e..39bd77348a42 100644 --- a/arch/arm/mach-mxs/devices/Makefile +++ b/arch/arm/mach-mxs/devices/Makefile | |||
@@ -4,3 +4,4 @@ obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o | |||
4 | obj-$(CONFIG_MXS_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o | 4 | obj-$(CONFIG_MXS_HAVE_PLATFORM_FLEXCAN) += platform-flexcan.o |
5 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_I2C) += platform-mxs-i2c.o | 5 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_I2C) += platform-mxs-i2c.o |
6 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_PWM) += platform-mxs-pwm.o | 6 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXS_PWM) += platform-mxs-pwm.o |
7 | obj-$(CONFIG_MXS_HAVE_PLATFORM_MXSFB) += platform-mxsfb.o | ||
diff --git a/arch/arm/mach-mxs/devices/platform-mxsfb.c b/arch/arm/mach-mxs/devices/platform-mxsfb.c new file mode 100644 index 000000000000..bf72c9b8dbdd --- /dev/null +++ b/arch/arm/mach-mxs/devices/platform-mxsfb.c | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it under | ||
5 | * the terms of the GNU General Public License version 2 as published by the | ||
6 | * Free Software Foundation. | ||
7 | */ | ||
8 | #include <asm/sizes.h> | ||
9 | #include <mach/mx23.h> | ||
10 | #include <mach/mx28.h> | ||
11 | #include <mach/devices-common.h> | ||
12 | #include <mach/mxsfb.h> | ||
13 | |||
14 | #ifdef CONFIG_SOC_IMX23 | ||
15 | struct platform_device *__init mx23_add_mxsfb( | ||
16 | const struct mxsfb_platform_data *pdata) | ||
17 | { | ||
18 | struct resource res[] = { | ||
19 | { | ||
20 | .start = MX23_LCDIF_BASE_ADDR, | ||
21 | .end = MX23_LCDIF_BASE_ADDR + SZ_8K - 1, | ||
22 | .flags = IORESOURCE_MEM, | ||
23 | }, | ||
24 | }; | ||
25 | |||
26 | return mxs_add_platform_device_dmamask("imx23-fb", -1, | ||
27 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | ||
28 | } | ||
29 | #endif /* ifdef CONFIG_SOC_IMX23 */ | ||
30 | |||
31 | #ifdef CONFIG_SOC_IMX28 | ||
32 | struct platform_device *__init mx28_add_mxsfb( | ||
33 | const struct mxsfb_platform_data *pdata) | ||
34 | { | ||
35 | struct resource res[] = { | ||
36 | { | ||
37 | .start = MX28_LCDIF_BASE_ADDR, | ||
38 | .end = MX28_LCDIF_BASE_ADDR + SZ_8K - 1, | ||
39 | .flags = IORESOURCE_MEM, | ||
40 | }, | ||
41 | }; | ||
42 | |||
43 | return mxs_add_platform_device_dmamask("imx28-fb", -1, | ||
44 | res, ARRAY_SIZE(res), pdata, sizeof(*pdata), DMA_BIT_MASK(32)); | ||
45 | } | ||
46 | #endif /* ifdef CONFIG_SOC_IMX28 */ | ||