aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-04-10 20:04:55 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-04-11 07:49:20 -0400
commitbbfce37b3ea11d13a984063a162c898a5fb23b1e (patch)
tree59d44d8ea1df46eb55a2790589762a5771a696f5
parent015623819b44a3b25347c9de3efd9ad01d475259 (diff)
video/s3c: move platform_data out of arch/arm
The s3c-fb driver requires header files from the samsung platforms to find its platform_data definition, but this no longer works on multiplatform kernels, so let's move the data into a new header file under include/linux/platform_data. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: linux-fbdev@vger.kernel.org Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--arch/arm/plat-samsung/include/plat/fb.h50
-rw-r--r--drivers/video/s3c-fb.c3
-rw-r--r--include/linux/platform_data/video_s3c.h54
3 files changed, 56 insertions, 51 deletions
diff --git a/arch/arm/plat-samsung/include/plat/fb.h b/arch/arm/plat-samsung/include/plat/fb.h
index b885322717a1..9ae507270785 100644
--- a/arch/arm/plat-samsung/include/plat/fb.h
+++ b/arch/arm/plat-samsung/include/plat/fb.h
@@ -15,55 +15,7 @@
15#ifndef __PLAT_S3C_FB_H 15#ifndef __PLAT_S3C_FB_H
16#define __PLAT_S3C_FB_H __FILE__ 16#define __PLAT_S3C_FB_H __FILE__
17 17
18/* S3C_FB_MAX_WIN 18#include <linux/platform_data/video_s3c.h>
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 */
32struct 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 * @vidcon0: The base vidcon0 values to control the panel data format.
47 * @vidcon1: The base vidcon1 values to control the panel data output.
48 * @vtiming: Video timing when connected to a RGB type panel.
49 * @win: The setup data for each hardware window, or NULL for unused.
50 * @display_mode: The LCD output display mode.
51 *
52 * The platform data supplies the video driver with all the information
53 * it requires to work with the display(s) attached to the machine. It
54 * controls the initial mode, the number of display windows (0 is always
55 * the base framebuffer) that are initialised etc.
56 *
57 */
58struct s3c_fb_platdata {
59 void (*setup_gpio)(void);
60
61 struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
62 struct fb_videomode *vtiming;
63
64 u32 vidcon0;
65 u32 vidcon1;
66};
67 19
68/** 20/**
69 * s3c_fb_set_platdata() - Setup the FB device with platform data. 21 * s3c_fb_set_platdata() - Setup the FB device with platform data.
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index 968a62571df7..2e7991c7ca08 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -24,10 +24,9 @@
24#include <linux/uaccess.h> 24#include <linux/uaccess.h>
25#include <linux/interrupt.h> 25#include <linux/interrupt.h>
26#include <linux/pm_runtime.h> 26#include <linux/pm_runtime.h>
27#include <linux/platform_data/video_s3c.h>
27 28
28#include <video/samsung_fimd.h> 29#include <video/samsung_fimd.h>
29#include <mach/map.h>
30#include <plat/fb.h>
31 30
32/* This driver will export a number of framebuffer interfaces depending 31/* This driver will export a number of framebuffer interfaces depending
33 * on the configuration passed in via the platform data. Each fb instance 32 * on the configuration passed in via the platform data. Each fb instance
diff --git a/include/linux/platform_data/video_s3c.h b/include/linux/platform_data/video_s3c.h
new file mode 100644
index 000000000000..48883995f47f
--- /dev/null
+++ b/include/linux/platform_data/video_s3c.h
@@ -0,0 +1,54 @@
1#ifndef __PLATFORM_DATA_VIDEO_S3C
2#define __PLATFORM_DATA_VIDEO_S3C
3
4/* S3C_FB_MAX_WIN
5 * Set to the maximum number of windows that any of the supported hardware
6 * can use. Since the platform data uses this for an array size, having it
7 * set to the maximum of any version of the hardware can do is safe.
8 */
9#define S3C_FB_MAX_WIN (5)
10
11/**
12 * struct s3c_fb_pd_win - per window setup data
13 * @xres : The window X size.
14 * @yres : The window Y size.
15 * @virtual_x: The virtual X size.
16 * @virtual_y: The virtual Y size.
17 */
18struct s3c_fb_pd_win {
19 unsigned short default_bpp;
20 unsigned short max_bpp;
21 unsigned short xres;
22 unsigned short yres;
23 unsigned short virtual_x;
24 unsigned short virtual_y;
25};
26
27/**
28 * struct s3c_fb_platdata - S3C driver platform specific information
29 * @setup_gpio: Setup the external GPIO pins to the right state to transfer
30 * the data from the display system to the connected display
31 * device.
32 * @vidcon0: The base vidcon0 values to control the panel data format.
33 * @vidcon1: The base vidcon1 values to control the panel data output.
34 * @vtiming: Video timing when connected to a RGB type panel.
35 * @win: The setup data for each hardware window, or NULL for unused.
36 * @display_mode: The LCD output display mode.
37 *
38 * The platform data supplies the video driver with all the information
39 * it requires to work with the display(s) attached to the machine. It
40 * controls the initial mode, the number of display windows (0 is always
41 * the base framebuffer) that are initialised etc.
42 *
43 */
44struct s3c_fb_platdata {
45 void (*setup_gpio)(void);
46
47 struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN];
48 struct fb_videomode *vtiming;
49
50 u32 vidcon0;
51 u32 vidcon1;
52};
53
54#endif