aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/s1d13xxxfb.c
diff options
context:
space:
mode:
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: