aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2011-09-28 17:19:48 -0400
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-10-04 21:10:12 -0400
commitb715f9f04c85382e9ac824ba49465fc15cf67418 (patch)
treed9efafa42cf6f766a9735f70199c52e524a7b463
parent36b0b1d41541fc3b25faf38aa53c34cede357421 (diff)
drivers/video: fsl-diu-fb: move some definitions out of the header file
Move several macros and structures from the Freescale DIU driver's header file into the source file, because they're only used by that file. Also delete a few unused macros. The diu and diu_ad structures cannot be moved because they're being used by the MPC5121 platform file. A future patch eliminate the need for the platform file to access these structs, so they'll be moved also. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
-rw-r--r--drivers/video/fsl-diu-fb.c39
-rw-r--r--include/linux/fsl-diu-fb.h47
2 files changed, 39 insertions, 47 deletions
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index 9a1f6d276ee3..9b3891a6a187 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -30,11 +30,50 @@
30#include <linux/clk.h> 30#include <linux/clk.h>
31#include <linux/uaccess.h> 31#include <linux/uaccess.h>
32#include <linux/vmalloc.h> 32#include <linux/vmalloc.h>
33#include <linux/spinlock.h>
33 34
34#include <sysdev/fsl_soc.h> 35#include <sysdev/fsl_soc.h>
35#include <linux/fsl-diu-fb.h> 36#include <linux/fsl-diu-fb.h>
36#include "edid.h" 37#include "edid.h"
37 38
39#define FSL_AOI_NUM 6 /* 5 AOIs and one dummy AOI */
40 /* 1 for plane 0, 2 for plane 1&2 each */
41
42/* HW cursor parameters */
43#define MAX_CURS 32
44
45/* INT_STATUS/INT_MASK field descriptions */
46#define INT_VSYNC 0x01 /* Vsync interrupt */
47#define INT_VSYNC_WB 0x02 /* Vsync interrupt for write back operation */
48#define INT_UNDRUN 0x04 /* Under run exception interrupt */
49#define INT_PARERR 0x08 /* Display parameters error interrupt */
50#define INT_LS_BF_VS 0x10 /* Lines before vsync. interrupt */
51
52/* Panels'operation modes */
53#define MFB_TYPE_OUTPUT 0 /* Panel output to display */
54#define MFB_TYPE_OFF 1 /* Panel off */
55#define MFB_TYPE_WB 2 /* Panel written back to memory */
56#define MFB_TYPE_TEST 3 /* Panel generate color bar */
57
58struct diu_hw {
59 struct diu __iomem *diu_reg;
60 spinlock_t reg_lock;
61 unsigned int mode; /* DIU operation mode */
62};
63
64struct diu_addr {
65 void *vaddr; /* Virtual address */
66 dma_addr_t paddr; /* Physical address */
67 __u32 offset;
68};
69
70struct diu_pool {
71 struct diu_addr ad;
72 struct diu_addr gamma;
73 struct diu_addr pallete;
74 struct diu_addr cursor;
75};
76
38/* 77/*
39 * List of supported video modes 78 * List of supported video modes
40 * 79 *
diff --git a/include/linux/fsl-diu-fb.h b/include/linux/fsl-diu-fb.h
index e19c531be065..363d5e290cad 100644
--- a/include/linux/fsl-diu-fb.h
+++ b/include/linux/fsl-diu-fb.h
@@ -56,7 +56,6 @@ struct aoi_display_offset {
56#define MFB_GET_PIXFMT_OLD 0x40014d08 56#define MFB_GET_PIXFMT_OLD 0x40014d08
57 57
58#ifdef __KERNEL__ 58#ifdef __KERNEL__
59#include <linux/spinlock.h>
60 59
61/* 60/*
62 * These are the fields of area descriptor(in DDR memory) for every plane 61 * These are the fields of area descriptor(in DDR memory) for every plane
@@ -154,39 +153,6 @@ struct diu {
154 __be32 plut; 153 __be32 plut;
155} __attribute__ ((packed)); 154} __attribute__ ((packed));
156 155
157struct diu_hw {
158 struct diu *diu_reg;
159 spinlock_t reg_lock;
160
161 __u32 mode; /* DIU operation mode */
162};
163
164struct diu_addr {
165 void *vaddr; /* Virtual address */
166 dma_addr_t paddr; /* Physical address */
167 __u32 offset;
168};
169
170struct diu_pool {
171 struct diu_addr ad;
172 struct diu_addr gamma;
173 struct diu_addr pallete;
174 struct diu_addr cursor;
175};
176
177#define FSL_DIU_BASE_OFFSET 0x2C000 /* Offset of DIU */
178#define INT_LCDC 64 /* DIU interrupt number */
179
180#define FSL_AOI_NUM 6 /* 5 AOIs and one dummy AOI */
181 /* 1 for plane 0, 2 for plane 1&2 each */
182
183/* Minimum X and Y resolutions */
184#define MIN_XRES 64
185#define MIN_YRES 64
186
187/* HW cursor parameters */
188#define MAX_CURS 32
189
190/* Modes of operation of DIU */ 156/* Modes of operation of DIU */
191#define MFB_MODE0 0 /* DIU off */ 157#define MFB_MODE0 0 /* DIU off */
192#define MFB_MODE1 1 /* All three planes output to display */ 158#define MFB_MODE1 1 /* All three planes output to display */
@@ -194,18 +160,5 @@ struct diu_pool {
194#define MFB_MODE3 3 /* All three planes written back to memory */ 160#define MFB_MODE3 3 /* All three planes written back to memory */
195#define MFB_MODE4 4 /* Color bar generation */ 161#define MFB_MODE4 4 /* Color bar generation */
196 162
197/* INT_STATUS/INT_MASK field descriptions */
198#define INT_VSYNC 0x01 /* Vsync interrupt */
199#define INT_VSYNC_WB 0x02 /* Vsync interrupt for write back operation */
200#define INT_UNDRUN 0x04 /* Under run exception interrupt */
201#define INT_PARERR 0x08 /* Display parameters error interrupt */
202#define INT_LS_BF_VS 0x10 /* Lines before vsync. interrupt */
203
204/* Panels'operation modes */
205#define MFB_TYPE_OUTPUT 0 /* Panel output to display */
206#define MFB_TYPE_OFF 1 /* Panel off */
207#define MFB_TYPE_WB 2 /* Panel written back to memory */
208#define MFB_TYPE_TEST 3 /* Panel generate color bar */
209
210#endif /* __KERNEL__ */ 163#endif /* __KERNEL__ */
211#endif /* __FSL_DIU_FB_H__ */ 164#endif /* __FSL_DIU_FB_H__ */