aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/sa1100fb.c6
-rw-r--r--drivers/video/sa1100fb.h42
-rw-r--r--include/video/sa1100fb.h59
3 files changed, 64 insertions, 43 deletions
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c
index a905e20404fd..8f5557a12ff8 100644
--- a/drivers/video/sa1100fb.c
+++ b/drivers/video/sa1100fb.c
@@ -178,6 +178,8 @@
178#include <linux/mutex.h> 178#include <linux/mutex.h>
179#include <linux/io.h> 179#include <linux/io.h>
180 180
181#include <video/sa1100fb.h>
182
181#include <mach/hardware.h> 183#include <mach/hardware.h>
182#include <asm/mach-types.h> 184#include <asm/mach-types.h>
183#include <mach/assabet.h> 185#include <mach/assabet.h>
@@ -1388,7 +1390,9 @@ static struct sa1100fb_info * __devinit sa1100fb_init_fbinfo(struct device *dev)
1388 fbi->rgb[RGB_8] = &rgb_8; 1390 fbi->rgb[RGB_8] = &rgb_8;
1389 fbi->rgb[RGB_16] = &def_rgb_16; 1391 fbi->rgb[RGB_16] = &def_rgb_16;
1390 1392
1391 inf = sa1100fb_get_machine_info(fbi); 1393 inf = dev->platform_data;
1394 if (!inf)
1395 inf = sa1100fb_get_machine_info(fbi);
1392 1396
1393 /* 1397 /*
1394 * People just don't seem to get this. We don't support 1398 * People just don't seem to get this. We don't support
diff --git a/drivers/video/sa1100fb.h b/drivers/video/sa1100fb.h
index 77239b766e56..9ff9ba9a281a 100644
--- a/drivers/video/sa1100fb.h
+++ b/drivers/video/sa1100fb.h
@@ -10,48 +10,6 @@
10 * for more details. 10 * for more details.
11 */ 11 */
12 12
13#define RGB_4 0
14#define RGB_8 1
15#define RGB_16 2
16#define NR_RGB 3
17
18/* These are the bitfields for each display depth that we support. */
19struct sa1100fb_rgb {
20 struct fb_bitfield red;
21 struct fb_bitfield green;
22 struct fb_bitfield blue;
23 struct fb_bitfield transp;
24};
25
26/* This structure describes the machine which we are running on. */
27struct sa1100fb_mach_info {
28 u_long pixclock;
29
30 u_short xres;
31 u_short yres;
32
33 u_char bpp;
34 u_char hsync_len;
35 u_char left_margin;
36 u_char right_margin;
37
38 u_char vsync_len;
39 u_char upper_margin;
40 u_char lower_margin;
41 u_char sync;
42
43 u_int cmap_greyscale:1,
44 cmap_inverse:1,
45 cmap_static:1,
46 unused:29;
47
48 u_int lccr0;
49 u_int lccr3;
50
51 /* Overrides for the default RGB maps */
52 const struct sa1100fb_rgb *rgb[NR_RGB];
53};
54
55/* Shadows for LCD controller registers */ 13/* Shadows for LCD controller registers */
56struct sa1100fb_lcd_reg { 14struct sa1100fb_lcd_reg {
57 unsigned long lccr0; 15 unsigned long lccr0;
diff --git a/include/video/sa1100fb.h b/include/video/sa1100fb.h
new file mode 100644
index 000000000000..e73c813c87f0
--- /dev/null
+++ b/include/video/sa1100fb.h
@@ -0,0 +1,59 @@
1/*
2 * StrongARM 1100 LCD Controller Frame Buffer Device
3 *
4 * Copyright (C) 1999 Eric A. Thomas
5 * Based on acornfb.c Copyright (C) Russell King.
6 *
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file COPYING in the main directory of this archive
9 * for more details.
10 */
11#ifndef _VIDEO_SA1100FB_H
12#define _VIDEO_SA1100FB_H
13
14#include <linux/fb.h>
15#include <linux/types.h>
16
17#define RGB_4 0
18#define RGB_8 1
19#define RGB_16 2
20#define NR_RGB 3
21
22/* These are the bitfields for each display depth that we support. */
23struct sa1100fb_rgb {
24 struct fb_bitfield red;
25 struct fb_bitfield green;
26 struct fb_bitfield blue;
27 struct fb_bitfield transp;
28};
29
30/* This structure describes the machine which we are running on. */
31struct sa1100fb_mach_info {
32 u_long pixclock;
33
34 u_short xres;
35 u_short yres;
36
37 u_char bpp;
38 u_char hsync_len;
39 u_char left_margin;
40 u_char right_margin;
41
42 u_char vsync_len;
43 u_char upper_margin;
44 u_char lower_margin;
45 u_char sync;
46
47 u_int cmap_greyscale:1,
48 cmap_inverse:1,
49 cmap_static:1,
50 unused:29;
51
52 u_int lccr0;
53 u_int lccr3;
54
55 /* Overrides for the default RGB maps */
56 const struct sa1100fb_rgb *rgb[NR_RGB];
57};
58
59#endif