Commit ebdf982a authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Russell King

[ARM] 5028/1: pxafb: fix broken "backward compatibility way" in framebuffer

 configuration

Commit 84f43c30 "pxafb: introduce register
independent LCD connection type for pxafb" implements compatibility mode
for old style pxafb_mach_info initialization data wrongly, causing the
system to Oops repeatedly - first during probe, then when drawing. Fix it
and make pxafb_decode_mach_info void.
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: default avatarEric Miao <eric.miao@marvell.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent bdd0f5f0
...@@ -1301,8 +1301,8 @@ static void pxafb_decode_mode_info(struct pxafb_info *fbi, ...@@ -1301,8 +1301,8 @@ static void pxafb_decode_mode_info(struct pxafb_info *fbi,
} }
} }
static int pxafb_decode_mach_info(struct pxafb_info *fbi, static void pxafb_decode_mach_info(struct pxafb_info *fbi,
struct pxafb_mach_info *inf) struct pxafb_mach_info *inf)
{ {
unsigned int lcd_conn = inf->lcd_conn; unsigned int lcd_conn = inf->lcd_conn;
...@@ -1333,7 +1333,7 @@ static int pxafb_decode_mach_info(struct pxafb_info *fbi, ...@@ -1333,7 +1333,7 @@ static int pxafb_decode_mach_info(struct pxafb_info *fbi,
fbi->lccr0 = inf->lccr0; fbi->lccr0 = inf->lccr0;
fbi->lccr3 = inf->lccr3; fbi->lccr3 = inf->lccr3;
fbi->lccr4 = inf->lccr4; fbi->lccr4 = inf->lccr4;
return -EINVAL; goto decode_mode;
} }
if (lcd_conn == LCD_MONO_STN_8BPP) if (lcd_conn == LCD_MONO_STN_8BPP)
...@@ -1343,8 +1343,8 @@ static int pxafb_decode_mach_info(struct pxafb_info *fbi, ...@@ -1343,8 +1343,8 @@ static int pxafb_decode_mach_info(struct pxafb_info *fbi,
fbi->lccr3 |= (lcd_conn & LCD_BIAS_ACTIVE_LOW) ? LCCR3_OEP : 0; fbi->lccr3 |= (lcd_conn & LCD_BIAS_ACTIVE_LOW) ? LCCR3_OEP : 0;
fbi->lccr3 |= (lcd_conn & LCD_PCLK_EDGE_FALL) ? LCCR3_PCP : 0; fbi->lccr3 |= (lcd_conn & LCD_PCLK_EDGE_FALL) ? LCCR3_PCP : 0;
decode_mode:
pxafb_decode_mode_info(fbi, inf->modes, inf->num_modes); pxafb_decode_mode_info(fbi, inf->modes, inf->num_modes);
return 0;
} }
static struct pxafb_info * __init pxafb_init_fbinfo(struct device *dev) static struct pxafb_info * __init pxafb_init_fbinfo(struct device *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment