diff options
| -rw-r--r-- | arch/sh/boards/board-ap325rxa.c | 4 | ||||
| -rw-r--r-- | arch/sh/boards/mach-migor/setup.c | 8 | ||||
| -rw-r--r-- | arch/sh/include/asm/sh_mobile_lcdc.h | 6 | ||||
| -rw-r--r-- | drivers/video/sh_mobile_lcdcfb.c | 2 |
4 files changed, 20 insertions, 0 deletions
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c index 025d4fe55a58..fd1612590bf4 100644 --- a/arch/sh/boards/board-ap325rxa.c +++ b/arch/sh/boards/board-ap325rxa.c | |||
| @@ -140,6 +140,10 @@ static struct sh_mobile_lcdc_info lcdc_info = { | |||
| 140 | .vsync_len = 1, | 140 | .vsync_len = 1, |
| 141 | .sync = 0, /* hsync and vsync are active low */ | 141 | .sync = 0, /* hsync and vsync are active low */ |
| 142 | }, | 142 | }, |
| 143 | .lcd_size_cfg = { /* 7.0 inch */ | ||
| 144 | .width = 152, | ||
| 145 | .height = 91, | ||
| 146 | }, | ||
| 143 | .board_cfg = { | 147 | .board_cfg = { |
| 144 | .display_on = ap320_wvga_power_on, | 148 | .display_on = ap320_wvga_power_on, |
| 145 | }, | 149 | }, |
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c index e499ee384d58..714dce91cc9b 100644 --- a/arch/sh/boards/mach-migor/setup.c +++ b/arch/sh/boards/mach-migor/setup.c | |||
| @@ -224,6 +224,10 @@ static struct sh_mobile_lcdc_info sh_mobile_lcdc_info = { | |||
| 224 | .vsync_len = 2, | 224 | .vsync_len = 2, |
| 225 | .sync = 0, | 225 | .sync = 0, |
| 226 | }, | 226 | }, |
| 227 | .lcd_size_cfg = { /* 7.0 inch */ | ||
| 228 | .width = 152, | ||
| 229 | .height = 91, | ||
| 230 | }, | ||
| 227 | } | 231 | } |
| 228 | #endif | 232 | #endif |
| 229 | #ifdef CONFIG_SH_MIGOR_QVGA | 233 | #ifdef CONFIG_SH_MIGOR_QVGA |
| @@ -245,6 +249,10 @@ static struct sh_mobile_lcdc_info sh_mobile_lcdc_info = { | |||
| 245 | .vsync_len = 2, | 249 | .vsync_len = 2, |
| 246 | .sync = FB_SYNC_HOR_HIGH_ACT, | 250 | .sync = FB_SYNC_HOR_HIGH_ACT, |
| 247 | }, | 251 | }, |
| 252 | .lcd_size_cfg = { /* 2.4 inch */ | ||
| 253 | .width = 49, | ||
| 254 | .height = 37, | ||
| 255 | }, | ||
| 248 | .board_cfg = { | 256 | .board_cfg = { |
| 249 | .setup_sys = migor_lcd_qvga_setup, | 257 | .setup_sys = migor_lcd_qvga_setup, |
| 250 | }, | 258 | }, |
diff --git a/arch/sh/include/asm/sh_mobile_lcdc.h b/arch/sh/include/asm/sh_mobile_lcdc.h index 27677727df4d..130102f663f5 100644 --- a/arch/sh/include/asm/sh_mobile_lcdc.h +++ b/arch/sh/include/asm/sh_mobile_lcdc.h | |||
| @@ -47,12 +47,18 @@ struct sh_mobile_lcdc_board_cfg { | |||
| 47 | void (*display_off)(void *board_data); | 47 | void (*display_off)(void *board_data); |
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | struct sh_mobile_lcdc_lcd_size_cfg { /* width and height of panel in mm */ | ||
| 51 | unsigned long width; | ||
| 52 | unsigned long height; | ||
| 53 | }; | ||
| 54 | |||
| 50 | struct sh_mobile_lcdc_chan_cfg { | 55 | struct sh_mobile_lcdc_chan_cfg { |
| 51 | int chan; | 56 | int chan; |
| 52 | int bpp; | 57 | int bpp; |
| 53 | int interface_type; /* selects RGBn or SYSn I/F, see above */ | 58 | int interface_type; /* selects RGBn or SYSn I/F, see above */ |
| 54 | int clock_divider; | 59 | int clock_divider; |
| 55 | struct fb_videomode lcd_cfg; | 60 | struct fb_videomode lcd_cfg; |
| 61 | struct sh_mobile_lcdc_lcd_size_cfg lcd_size_cfg; | ||
| 56 | struct sh_mobile_lcdc_board_cfg board_cfg; | 62 | struct sh_mobile_lcdc_board_cfg board_cfg; |
| 57 | struct sh_mobile_lcdc_sys_bus_cfg sys_bus_cfg; /* only for SYSn I/F */ | 63 | struct sh_mobile_lcdc_sys_bus_cfg sys_bus_cfg; /* only for SYSn I/F */ |
| 58 | }; | 64 | }; |
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index f6ef6cca73cd..4c32c06579a0 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c | |||
| @@ -595,6 +595,8 @@ static int __init sh_mobile_lcdc_probe(struct platform_device *pdev) | |||
| 595 | info->fbops = &sh_mobile_lcdc_ops; | 595 | info->fbops = &sh_mobile_lcdc_ops; |
| 596 | info->var.xres = info->var.xres_virtual = cfg->lcd_cfg.xres; | 596 | info->var.xres = info->var.xres_virtual = cfg->lcd_cfg.xres; |
| 597 | info->var.yres = info->var.yres_virtual = cfg->lcd_cfg.yres; | 597 | info->var.yres = info->var.yres_virtual = cfg->lcd_cfg.yres; |
| 598 | info->var.width = cfg->lcd_size_cfg.width; | ||
| 599 | info->var.height = cfg->lcd_size_cfg.height; | ||
| 598 | info->var.activate = FB_ACTIVATE_NOW; | 600 | info->var.activate = FB_ACTIVATE_NOW; |
| 599 | error = sh_mobile_lcdc_set_bpp(&info->var, cfg->bpp); | 601 | error = sh_mobile_lcdc_set_bpp(&info->var, cfg->bpp); |
| 600 | if (error) | 602 | if (error) |
