summaryrefslogtreecommitdiffstats
path: root/drivers/video/stm.c
Commit message (Collapse)AuthorAgeFilesLines
* driver: replace dev_request_mem_region with dev_request_mem_resourceSascha Hauer2016-03-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_request_mem_region doesn't work properly one some SoCs on which PTR_ERR() values clash with valid return values from dev_request_mem_region. Replace them with dev_request_mem_resource where possible. This patch has been generated with the following semantic patch: // <smpl> @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { ... - return PTR_ERR(io); -} + return PTR_ERR(iores); +} +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) - return PTR_ERR(io); -} + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { - ret = PTR_ERR(io); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { + ret = PTR_ERR(iores); ... } +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ identifier func; @@ func(...) { <+... struct resource *iores; -struct resource *iores; ...+> } // </smpl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rework remap_rangeSascha Hauer2015-11-031-3/+2
| | | | | | | | | | | | | | | | | | remap_range is for remapping regions with different cache attributes. It is implemented for ARM and PowerPC only, the other architectures only provide stubs. Currently the new cache attributes are passed in an architecture specific way and the attributes have to be retrieved by calls to mmu_get_pte_cached_flags() and mmu_get_pte_uncached_flags(). Make this simpler by providing architecture independent flags which can be directly passed to remap_range() Also provide a MAP_ARCH_DEFAULT flag and a arch_can_remap() function. The MAP_ARCH_DEFAULT defaults to whatever caching type the architecture has as default. the arch_can_remap() function returns true if the architecture can change the cache attributes, false otherwise. This allows the memtest code to better find out what it has to do. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: stm: reserve framebuffer memory for LinuxSascha Hauer2015-07-061-0/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: stm: honor display_flagsSascha Hauer2015-07-061-2/+4
| | | | | | | stmfb uses custom flags FB_SYNC_DE_HIGH_ACT and FB_SYNC_CLK_INVERT. These have generic counterparts in display_flags. Honor them aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: stm: read bits-per-pixel from device treeSascha Hauer2015-07-061-0/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: stm: read interface width from device treeSascha Hauer2015-07-061-0/+6
| | | | | | | The interface width has not been initialized when probed from device tree. Fix that. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: stm: use uncached memorySascha Hauer2015-07-061-1/+8
| | | | | | To avoid caching effects on the display use uncached memory. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: stm: code buswidth in platform data as decimalSascha Hauer2015-07-061-6/+26
| | | | | | | | | Instead of putting hardware specific bit masks in platform_data just use the decimal interface width and encode this in the driver. This makes it easier to create the platform_data and helps device tree based implementations. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: stm: copy platform_data to driver dataSascha Hauer2015-07-061-16/+26
| | | | | | | | | Copy the individual fields of struct imx_fb_platformdata to the driver data rather than keeping a pointer to platform_data. This works better with device tree where no platform_data * is available. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: stm: remove unnecessary info functionSascha Hauer2015-07-061-13/+0
| | | | | | devinfo will show the information without the help of the driver anyway. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: stmfb: Add device tree supportSascha Hauer2015-06-121-10/+42
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: remove unnecessary mach/imx-regs.h includeSascha Hauer2015-01-051-1/+0
| | | | | | And replace the ones needed with the SoC specific header. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: introduce struct display_timingsSascha Hauer2014-03-291-3/+3
| | | | | | | And use it inside struct fb_info. This struct has the advantage that the supported modes can be passed around in a single pointer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video/stm: enable clock to get the display workingEric Bénard2013-09-101-0/+1
| | | | | | | | | | | | | | else the clock is not enabled : ref_pix (rate 270000000, disabled) lcdif_sel (rate 270000000, disabled) lcdif_div (rate 33750000, disabled) lcdif (rate 33750000, disabled) lcdif_comp (rate 33750000, disabled) tested on i.MX28EVK. Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video/stm: don't fail when the pixel clock is properly setEric Bénard2013-09-101-1/+1
| | | | | | | | the check is wrong as when the clock rate is correctly set the function will return 0. Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: MXS: introduce stmp device supportSascha Hauer2013-07-231-5/+6
| | | | | | | | | | | | MXS specific devices have some common infrastructure in the kernel known as STMP devices. We have the same in barebox, but with a mxs_ prefix instead of a stmp_ prefix. As some STMP devices are also found on i.MX6 move the common infrastructure out of MXS specific files and use the stmp_ prefix. This is done in preparation for i.MX6 NAND support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video: stm: switch to clk supportSascha Hauer2013-06-201-2/+7
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: Attach info callback to device, not to driverSascha Hauer2013-05-301-1/+2
| | | | | | | | Since the info is device specific and not driver specific, attach the callback to the device. This makes it possible to have a info callback for a device which does not have a driver attached. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Use new device_platform_driver() macro for driversAlexander Shiyan2013-02-131-7/+1
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* switch all platform_bus device/driver registering to ↵Jean-Christophe PLAGNIOL-VILLARD2012-10-041-1/+1
| | | | | | | | platform_driver/device_register now register_driver and register_device are for bus only usage. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* introduce io.hSascha Hauer2011-09-221-1/+1
| | | | | | | To allow for some generic io accessors introduce io.h and use this instead of asm/io.h throughout the tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fb: switch to "struct resource"Jean-Christophe PLAGNIOL-VILLARD2011-07-301-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* fb i.MX23/28: Add the reset control of LCDGregory CLEMENT2011-01-211-0/+11
| | | | | | | | | | Video controller of STM allow to control the reset bit of an external LCD controller. When reset_lcd is set, CTRL1_RESET bit is used to enable and disable LCD. Handle USE_LCD_RESET as a flag in imx_fb_platformdata. Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM STM/i.MX: Add possibility to choose the bit per pixel for STM video driverGregory CLEMENT2011-01-211-1/+4
| | | | | | | | When describing an new video interface, it is now possible to select the bit per pixel. If nothing is chosen 16bpp is selected by default. Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fb i.MX23/28: rename imx_fb_videomode to imx_fb_platformdataSascha Hauer2011-01-201-6/+6
| | | | | | | It's not a video mode, it contains video modes, so rename the struct to what it actually is. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fb i.MX23/28: add platform data hook to enable backlightSascha Hauer2011-01-201-0/+6
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video stm/mx2x: allow to pass in fb memory from platform dataSascha Hauer2011-01-191-2/+9
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* video stm/mx2x: simplify memory allocationSascha Hauer2011-01-191-24/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM STM/i.MX: Add video driver for i.MX23/i.MX28Juergen Beisert2010-12-211-0/+540
Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>