aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/s1d13xxxfb.c
diff options
context:
space:
mode:
authorHirokazu Takata <takata@linux-m32r.org>2005-07-07 20:59:32 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 21:24:11 -0400
commit316240f66a64c95e373d52dc401d882d77a594ee (patch)
tree1d04cba74cd2455bb6b886ed4b85b7bbb73b8544 /drivers/video/s1d13xxxfb.c
parente34ac862ee6644378bfe6ea65c2e0dda4545513d (diff)
[PATCH] m32r: framebuffer device support
This patch is for supporting Epson s1d13xxx framebuffer device for m32r. # Sorry, a little bigger. The Epson s1d13806 is already supported by 2.6.12 kernel, and its driver is placed as drivers/video/s1d13xxxfb.c. For the m32r, a header file include/asm-m32r/s1d13806.h was prepared for several m32r target platforms. It was originally generated by an Epson tool S1D13806CFG.EXE, and modified manually for the m32r platforms. Signed-off-by: Hayato Fujiwara <fujiwara@linux-m32r.org> Signed-off-by: Hirokazu Takata <takata@linux-m32r.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/s1d13xxxfb.c')
-rw-r--r--drivers/video/s1d13xxxfb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/video/s1d13xxxfb.c b/drivers/video/s1d13xxxfb.c
index 789de13f461f..3848be2b9d2d 100644
--- a/drivers/video/s1d13xxxfb.c
+++ b/drivers/video/s1d13xxxfb.c
@@ -67,12 +67,18 @@ static struct fb_fix_screeninfo __devinitdata s1d13xxxfb_fix = {
67static inline u8 67static inline u8
68s1d13xxxfb_readreg(struct s1d13xxxfb_par *par, u16 regno) 68s1d13xxxfb_readreg(struct s1d13xxxfb_par *par, u16 regno)
69{ 69{
70#if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_OPSPUT) || defined(CONFIG_PLAT_MAPPI3)
71 regno=((regno & 1) ? (regno & ~1L) : (regno + 1));
72#endif
70 return readb(par->regs + regno); 73 return readb(par->regs + regno);
71} 74}
72 75
73static inline void 76static inline void
74s1d13xxxfb_writereg(struct s1d13xxxfb_par *par, u16 regno, u8 value) 77s1d13xxxfb_writereg(struct s1d13xxxfb_par *par, u16 regno, u8 value)
75{ 78{
79#if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_OPSPUT) || defined(CONFIG_PLAT_MAPPI3)
80 regno=((regno & 1) ? (regno & ~1L) : (regno + 1));
81#endif
76 writeb(value, par->regs + regno); 82 writeb(value, par->regs + regno);
77} 83}
78 84
@@ -259,7 +265,11 @@ s1d13xxxfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
259 dbg("s1d13xxxfb_setcolreg: pseudo %d, val %08x\n", 265 dbg("s1d13xxxfb_setcolreg: pseudo %d, val %08x\n",
260 regno, pseudo_val); 266 regno, pseudo_val);
261 267
268#if defined(CONFIG_PLAT_MAPPI)
269 ((u32 *)info->pseudo_palette)[regno] = cpu_to_le16(pseudo_val);
270#else
262 ((u32 *)info->pseudo_palette)[regno] = pseudo_val; 271 ((u32 *)info->pseudo_palette)[regno] = pseudo_val;
272#endif
263 273
264 break; 274 break;
265 case FB_VISUAL_PSEUDOCOLOR: 275 case FB_VISUAL_PSEUDOCOLOR: