Skip to content

Commit ee84cbd

Browse files
committed
ARM: pxa: move regs-lcd.h into driver
Only the pxafb driver uses this header, so move it into the same directory. The SMART_* macros are required by some platform data definitions and can go into the linux/platform_data/video-pxafb.h header. Acked-by: Bartlomiej Zolnierkiewicz <[email protected]> Acked-by: Robert Jarzmik <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 22f0866 commit ee84cbd

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed

arch/arm/mach-pxa/include/mach/regs-lcd.h renamed to drivers/video/fbdev/pxa3xx-regs.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -177,23 +177,4 @@
177177
#define PRSR_ST_OK (1 << 9) /* Status OK */
178178
#define PRSR_CON_NT (1 << 10) /* Continue to Next Command */
179179

180-
#define SMART_CMD_A0 (0x1 << 8)
181-
#define SMART_CMD_READ_STATUS_REG (0x0 << 9)
182-
#define SMART_CMD_READ_FRAME_BUFFER ((0x0 << 9) | SMART_CMD_A0)
183-
#define SMART_CMD_WRITE_COMMAND (0x1 << 9)
184-
#define SMART_CMD_WRITE_DATA ((0x1 << 9) | SMART_CMD_A0)
185-
#define SMART_CMD_WRITE_FRAME ((0x2 << 9) | SMART_CMD_A0)
186-
#define SMART_CMD_WAIT_FOR_VSYNC (0x3 << 9)
187-
#define SMART_CMD_NOOP (0x4 << 9)
188-
#define SMART_CMD_INTERRUPT (0x5 << 9)
189-
190-
#define SMART_CMD(x) (SMART_CMD_WRITE_COMMAND | ((x) & 0xff))
191-
#define SMART_DAT(x) (SMART_CMD_WRITE_DATA | ((x) & 0xff))
192-
193-
/* SMART_DELAY() is introduced for software controlled delay primitive which
194-
* can be inserted between command sequences, unused command 0x6 is used here
195-
* and delay ranges from 0ms ~ 255ms
196-
*/
197-
#define SMART_CMD_DELAY (0x6 << 9)
198-
#define SMART_DELAY(ms) (SMART_CMD_DELAY | ((ms) & 0xff))
199180
#endif /* __ASM_ARCH_REGS_LCD_H */

drivers/video/fbdev/pxafb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
#define DEBUG_VAR 1
7373

7474
#include "pxafb.h"
75+
#include "pxa3xx-regs.h"
7576

7677
/* Bits which should not be set in machine configuration structures */
7778
#define LCCR0_INVALID_CONFIG_MASK (LCCR0_OUM | LCCR0_BM | LCCR0_QDM |\

include/linux/platform_data/video-pxafb.h

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
*/
99

1010
#include <linux/fb.h>
11-
#include <mach/regs-lcd.h>
1211

1312
/*
1413
* Supported LCD connections
@@ -153,6 +152,27 @@ struct pxafb_mach_info {
153152
void pxa_set_fb_info(struct device *, struct pxafb_mach_info *);
154153
unsigned long pxafb_get_hsync_time(struct device *dev);
155154

155+
/* smartpanel related */
156+
#define SMART_CMD_A0 (0x1 << 8)
157+
#define SMART_CMD_READ_STATUS_REG (0x0 << 9)
158+
#define SMART_CMD_READ_FRAME_BUFFER ((0x0 << 9) | SMART_CMD_A0)
159+
#define SMART_CMD_WRITE_COMMAND (0x1 << 9)
160+
#define SMART_CMD_WRITE_DATA ((0x1 << 9) | SMART_CMD_A0)
161+
#define SMART_CMD_WRITE_FRAME ((0x2 << 9) | SMART_CMD_A0)
162+
#define SMART_CMD_WAIT_FOR_VSYNC (0x3 << 9)
163+
#define SMART_CMD_NOOP (0x4 << 9)
164+
#define SMART_CMD_INTERRUPT (0x5 << 9)
165+
166+
#define SMART_CMD(x) (SMART_CMD_WRITE_COMMAND | ((x) & 0xff))
167+
#define SMART_DAT(x) (SMART_CMD_WRITE_DATA | ((x) & 0xff))
168+
169+
/* SMART_DELAY() is introduced for software controlled delay primitive which
170+
* can be inserted between command sequences, unused command 0x6 is used here
171+
* and delay ranges from 0ms ~ 255ms
172+
*/
173+
#define SMART_CMD_DELAY (0x6 << 9)
174+
#define SMART_DELAY(ms) (SMART_CMD_DELAY | ((ms) & 0xff))
175+
156176
#ifdef CONFIG_FB_PXA_SMARTPANEL
157177
extern int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int);
158178
extern int pxafb_smart_flush(struct fb_info *info);

0 commit comments

Comments
 (0)