diff options
author | Alexander Shiyan <eagle.alexander923@gmail.com> | 2022-04-22 10:11:58 +0300 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-04-25 12:25:06 +0200 |
commit | 19db71bb184b5d72d99aac3b0fb00fa6ec01d633 (patch) | |
tree | ebed1c923271e0354798daba1dd5e04f51ea0127 /include/video | |
parent | aaac1c35ed14c81a8ffc93874f8b004deae9e172 (diff) | |
download | barebox-19db71bb184b5d72d99aac3b0fb00fa6ec01d633.tar.gz barebox-19db71bb184b5d72d99aac3b0fb00fa6ec01d633.tar.xz |
video: omap-fb: Rework to enable COMPILE_TEST option
To add a compilation check for the omap-fb driver, move the
omap-fb.h header to a global location.
The "omap_add_display" function is used only for legacy boards,
so we will move it to a common place for such calls (omap_devices.c).
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
Link: https://lore.barebox.org/20220422071158.14631-1-eagle.alexander923@gmail.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/video')
-rw-r--r-- | include/video/omap-fb.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/include/video/omap-fb.h b/include/video/omap-fb.h new file mode 100644 index 0000000000..519460f0d5 --- /dev/null +++ b/include/video/omap-fb.h @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef OMAP_FB_H +#define OMAP_FB_H + +#include <fb.h> + +#define OMAP_DSS_LCD_TFT (1u << 0) +#define OMAP_DSS_LCD_IVS (1u << 1) +#define OMAP_DSS_LCD_IHS (1u << 2) +#define OMAP_DSS_LCD_IPC (1u << 3) +#define OMAP_DSS_LCD_IEO (1u << 4) +#define OMAP_DSS_LCD_RF (1u << 5) +#define OMAP_DSS_LCD_ONOFF (1u << 6) + +#define OMAP_DSS_LCD_DATALINES(_l) ((_l) << 10) +#define OMAP_DSS_LCD_DATALINES_msk OMAP_DSS_LCD_DATALINES(3u) +#define OMAP_DSS_LCD_DATALINES_12 OMAP_DSS_LCD_DATALINES(0u) +#define OMAP_DSS_LCD_DATALINES_16 OMAP_DSS_LCD_DATALINES(1u) +#define OMAP_DSS_LCD_DATALINES_18 OMAP_DSS_LCD_DATALINES(2u) +#define OMAP_DSS_LCD_DATALINES_24 OMAP_DSS_LCD_DATALINES(3u) + +struct omapfb_display { + struct fb_videomode mode; + + unsigned long config; + + unsigned int power_on_delay; + unsigned int power_off_delay; +}; + +struct omapfb_platform_data { + struct omapfb_display const *displays; + size_t num_displays; + + unsigned int dss_clk_hz; + + unsigned int bpp; + + struct resource const *screen; + + void (*enable)(int p); +}; + +#endif /* OMAP_FB_H */ |