]> git.karo-electronics.de Git - karo-tx-linux.git/blob - arch/arm/plat-samsung/include/plat/fb.h
video: s3c-fb: move video interface timing out of window setup data
[karo-tx-linux.git] / arch / arm / plat-samsung / include / plat / fb.h
1 /* arch/arm/plat-samsung/include/plat/fb.h
2  *
3  * Copyright 2008 Openmoko, Inc.
4  * Copyright 2008 Simtec Electronics
5  *      http://armlinux.simtec.co.uk/
6  *      Ben Dooks <ben@simtec.co.uk>
7  *
8  * S3C - FB platform data definitions
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License version 2 as
12  * published by the Free Software Foundation.
13 */
14
15 #ifndef __PLAT_S3C_FB_H
16 #define __PLAT_S3C_FB_H __FILE__
17
18 /* S3C_FB_MAX_WIN
19  * Set to the maximum number of windows that any of the supported hardware
20  * can use. Since the platform data uses this for an array size, having it
21  * set to the maximum of any version of the hardware can do is safe.
22  */
23 #define S3C_FB_MAX_WIN  (5)
24
25 /**
26  * struct s3c_fb_pd_win - per window setup data
27  * @xres     : The window X size.
28  * @yres     : The window Y size.
29  * @virtual_x: The virtual X size.
30  * @virtual_y: The virtual Y size.
31  */
32 struct s3c_fb_pd_win {
33         unsigned short          default_bpp;
34         unsigned short          max_bpp;
35         unsigned short          xres;
36         unsigned short          yres;
37         unsigned short          virtual_x;
38         unsigned short          virtual_y;
39 };
40
41 /**
42  * struct s3c_fb_platdata -  S3C driver platform specific information
43  * @setup_gpio: Setup the external GPIO pins to the right state to transfer
44  *              the data from the display system to the connected display
45  *              device.
46  * @default_win: default window layer number to be used for UI layer.
47  * @vidcon0: The base vidcon0 values to control the panel data format.
48  * @vidcon1: The base vidcon1 values to control the panel data output.
49  * @vtiming: Video timing when connected to a RGB type panel.
50  * @win: The setup data for each hardware window, or NULL for unused.
51  * @display_mode: The LCD output display mode.
52  *
53  * The platform data supplies the video driver with all the information
54  * it requires to work with the display(s) attached to the machine. It
55  * controls the initial mode, the number of display windows (0 is always
56  * the base framebuffer) that are initialised etc.
57  *
58  */
59 struct s3c_fb_platdata {
60         void    (*setup_gpio)(void);
61
62         struct s3c_fb_pd_win    *win[S3C_FB_MAX_WIN];
63         struct fb_videomode     *vtiming;
64
65         u32                      default_win;
66
67         u32                      vidcon0;
68         u32                      vidcon1;
69 };
70
71 /**
72  * s3c_fb_set_platdata() - Setup the FB device with platform data.
73  * @pd: The platform data to set. The data is copied from the passed structure
74  *      so the machine data can mark the data __initdata so that any unused
75  *      machines will end up dumping their data at runtime.
76  */
77 extern void s3c_fb_set_platdata(struct s3c_fb_platdata *pd);
78
79 /**
80  * s5p_fimd0_set_platdata() - Setup the FB device with platform data.
81  * @pd: The platform data to set. The data is copied from the passed structure
82  *      so the machine data can mark the data __initdata so that any unused
83  *      machines will end up dumping their data at runtime.
84  */
85 extern void s5p_fimd0_set_platdata(struct s3c_fb_platdata *pd);
86
87 /**
88  * s3c64xx_fb_gpio_setup_24bpp() - S3C64XX setup function for 24bpp LCD
89  *
90  * Initialise the GPIO for an 24bpp LCD display on the RGB interface.
91  */
92 extern void s3c64xx_fb_gpio_setup_24bpp(void);
93
94 /**
95  * s5pc100_fb_gpio_setup_24bpp() - S5PC100 setup function for 24bpp LCD
96  *
97  * Initialise the GPIO for an 24bpp LCD display on the RGB interface.
98  */
99 extern void s5pc100_fb_gpio_setup_24bpp(void);
100
101 /**
102  * s5pv210_fb_gpio_setup_24bpp() - S5PV210/S5PC110 setup function for 24bpp LCD
103  *
104  * Initialise the GPIO for an 24bpp LCD display on the RGB interface.
105  */
106 extern void s5pv210_fb_gpio_setup_24bpp(void);
107
108 /**
109  * exynos4_fimd0_gpio_setup_24bpp() - Exynos4 setup function for 24bpp LCD0
110  *
111  * Initialise the GPIO for an 24bpp LCD display on the RGB interface 0.
112  */
113 extern void exynos4_fimd0_gpio_setup_24bpp(void);
114
115 /**
116  * s5p64x0_fb_gpio_setup_24bpp() - S5P6440/S5P6450 setup function for 24bpp LCD
117  *
118  * Initialise the GPIO for an 24bpp LCD display on the RGB interface.
119  */
120 extern void s5p64x0_fb_gpio_setup_24bpp(void);
121
122 #endif /* __PLAT_S3C_FB_H */