i.MX23/28 Framebuffer support
Sascha Hauer
maintainerPATCH v3 1/1 i.MX23/28 Framebuffer support
Third and hopefully last iteration of these patches.
Sascha
Sascha Hauer (2):
video: Add i.MX23/28 framebuffer driver ARM i.MX23/28: Add framebuffer device support
arch/arm/mach-mxs/clock-mx23.c | 1 + arch/arm/mach-mxs/clock-mx28.c | 1 + arch/arm/mach-mxs/devices-mx23.h | 4 + arch/arm/mach-mxs/devices-mx28.h | 4 + arch/arm/mach-mxs/devices/Kconfig | 4 + arch/arm/mach-mxs/devices/Makefile | 1 + arch/arm/mach-mxs/devices/platform-mxsfb.c | 46 ++ arch/arm/mach-mxs/include/mach/mxsfb.h | 48 ++ drivers/video/Kconfig | 9 + drivers/video/Makefile | 1 + drivers/video/mxsfb.c | 914 ++++++++++++++++++++++++++++ 11 files changed, 1033 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-mxs/devices/platform-mxsfb.c create mode 100644 arch/arm/mach-mxs/include/mach/mxsfb.h create mode 100644 drivers/video/mxsfb.c
Sascha Hauer
maintainerPATCH 1/2 video: Add i.MX23/28 framebuffer driver
changes since v2:
- use v3 and v4 for specifying the ip version instead of i.MX23/28. This is a better namespace when future versions are added.
- rename mach/fb.h to mach/mxsfb.h
changes since v1:
- Add a LCDC_ prefix to the register names.
- use set/clear registers where appropriate
- protect call to mxsfb_disable_controller() in mxsfb_remove() with a (host->enabled) as suggested by Lothar Wassmann
--- arch/arm/mach-mxs/include/mach/mxsfb.h | 48 ++ drivers/video/Kconfig | 9 + drivers/video/Makefile | 1 + drivers/video/mxsfb.c | 914 ++++++++++++++++++++++++++++++++ 4 files changed, 972 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-mxs/include/mach/mxsfb.h create mode 100644 drivers/video/mxsfb.c
arch/arm/mach-mxs/include/mach/mxsfb.h new file +48 -0
@@ -0,0 +1,48 @@ +/* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +* MA 02110-1301, USA. +*/ + +#ifndef __MACH_FB_H +#define __MACH_FB_H + +#include <linux/fb.h> + +#define STMLCDIF_8BIT 1/** pixel data bus to the display is of 8 bit width */ +#define STMLCDIF_16BIT 0/** pixel data bus to the display is of 16 bit width */ +#define STMLCDIF_18BIT 2/** pixel data bus to the display is of 18 bit width */ +#define STMLCDIF_24BIT 3/** pixel data bus to the display is of 24 bit width */ + +#define FB_SYNC_DATA_ENABLE_HIGH_ACT 64 + +struct mxsfb_platform_data { +struct fb_videomode *mode_list; +unsigned mode_count; + +unsigned default_bpp; + +unsigned dotclk_delay;/* refer manual HW_LCDIF_VDCTRL4 register */ +unsigned ld_intf_width;/* refer STMLCDIF_* macros */ + +unsigned fb_size;/* Size of the video memory. If zero a +* default will be used +*/ +unsigned long fb_phys;/* physical address for the video memory. If +* zero the framebuffer memory will be dynamically +* allocated. If specified,fb_size must also be specified. +* fb_phys must be unused by Linux. +*/ +}; + +#endif /* __MACH_FB_H */
drivers/video/Kconfig +9 -0
@@ -2365,6 +2365,15 @@ config FB_JZ4740 help Framebuffer support for the JZ4740 SoC. +config FB_MXS + tristate "MXS LCD framebuffer support" + depends on FB && ARCH_MXS + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + Framebuffer support for the MXS SoC. + source "drivers/video/omap/Kconfig" source "drivers/video/omap2/Kconfig"
drivers/video/Makefile +1 -0
@@ -153,6 +153,7 @@ obj-$(CONFIG_FB_BFIN_T350MCQB) += bfin-t350mcqb-fb.o obj-$(CONFIG_FB_BFIN_7393) += bfin_adv7393fb.o obj-$(CONFIG_FB_MX3) += mx3fb.o obj-$(CONFIG_FB_DA8XX) += da8xx-fb.o +obj-$(CONFIG_FB_MXS) += mxsfb.o # the test framebuffer is last obj-$(CONFIG_FB_VIRTUAL) += vfb.o
drivers/video/mxsfb.c new file +914 -0
914 lines not on this page · raw message
Signature · 1 line
1.7.2.3
Sascha Hauer
maintainerPATCH 2/2 ARM i.MX23/28: Add framebuffer device support
In reply to Sascha Hauer--- arch/arm/mach-mxs/clock-mx23.c | 1 + arch/arm/mach-mxs/clock-mx28.c | 1 + arch/arm/mach-mxs/devices-mx23.h | 4 ++ arch/arm/mach-mxs/devices-mx28.h | 4 ++ arch/arm/mach-mxs/devices/Kconfig | 4 ++ arch/arm/mach-mxs/devices/Makefile | 1 + arch/arm/mach-mxs/devices/platform-mxsfb.c | 46 ++++++++++++++++++++++++++++ 7 files changed, 61 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-mxs/devices/platform-mxsfb.c
arch/arm/mach-mxs/clock-mx23.c +1 -0
@@ -447,6 +447,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK(NULL, "usb", usb_clk) _REGISTER_CLOCK(NULL, "audio", audio_clk) _REGISTER_CLOCK(NULL, "pwm", pwm_clk) + _REGISTER_CLOCK("imx23-fb", NULL, lcdif_clk) };static int clk_misc_init (void )
arch/arm/mach-mxs/clock-mx28.c +1 -0
@@ -620,6 +620,7 @@ static struct clk_lookup lookups[] = { _REGISTER_CLOCK(NULL, "pwm", pwm_clk) _REGISTER_CLOCK(NULL, "lradc", lradc_clk) _REGISTER_CLOCK(NULL, "spdif", spdif_clk) + _REGISTER_CLOCK("imx28-fb", NULL, lcdif_clk) };static int clk_misc_init (void )
arch/arm/mach-mxs/devices-mx23.h +4 -0
@@ -10,7 +10,11 @@*/ #include <mach/mx23.h> #include <mach/devices-common.h> +#include <mach/mxsfb.h> extern const struct amba_device mx23_duart_device__initconst ;#define mx23_add_duart () \ mxs_add_duart(&mx23_duart_device) + +struct platform_device *__init mx23_add_mxsfb ( +const struct mxsfb_platform_data *pdata);
arch/arm/mach-mxs/devices-mx28.h +4 -0
@@ -10,6 +10,7 @@*/ #include <mach/mx28.h> #include <mach/devices-common.h> +#include <mach/mxsfb.h> extern const struct amba_device mx28_duart_device__initconst ;#define mx28_add_duart () \
@@ -18,3 +19,6 @@ extern const struct amba_device mx28_duart_device __initconst;extern const struct mxs_fec_data mx28_fec_data[]__initconst ;#define mx28_add_fec (id, pdata) \ mxs_add_fec(&mx28_fec_data[id], pdata) + +struct platform_device *__init mx28_add_mxsfb ( +const struct mxsfb_platform_data *pdata);
arch/arm/mach-mxs/devices/Kconfig +4 -0
@@ -4,3 +4,7 @@ config MXS_HAVE_AMBA_DUART config MXS_HAVE_PLATFORM_FEC bool + +config MXS_HAVE_PLATFORM_MXSFB + bool +
arch/arm/mach-mxs/devices/Makefile +1 -0
@@ -1,2 +1,3 @@ obj-$(CONFIG_MXS_HAVE_AMBA_DUART) += amba-duart.o obj-$(CONFIG_MXS_HAVE_PLATFORM_FEC) += platform-fec.o +obj-$(CONFIG_MXS_HAVE_PLATFORM_MXSFB) += platform-mxsfb.o
arch/arm/mach-mxs/devices/platform-mxsfb.c new file +46 -0
46 lines not on this page · raw message
Signature · 1 line
1.7.2.3