diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2011-09-11 16:59:04 -0400 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-03-12 17:40:50 -0400 |
commit | afaad83b9c0d24eac88535cc5a8c6019f0c45bcb (patch) | |
tree | 8f96bd7ac14c07f89178372782c7707f625bb193 /drivers/video/sh_mobile_lcdcfb.c | |
parent | 43059b0f46f814b4152f327c701d079253904540 (diff) |
fbdev: sh_mobile_lcdc: Merge board_cfg and lcd_size_cfg into panel_cfg
Update board code accordingly.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/video/sh_mobile_lcdcfb.c')
-rw-r--r-- | drivers/video/sh_mobile_lcdcfb.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index adfffd6b7ec1..9e44988155a4 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c | |||
@@ -289,7 +289,7 @@ static void sh_mobile_lcdc_deferred_io(struct fb_info *info, | |||
289 | struct list_head *pagelist) | 289 | struct list_head *pagelist) |
290 | { | 290 | { |
291 | struct sh_mobile_lcdc_chan *ch = info->par; | 291 | struct sh_mobile_lcdc_chan *ch = info->par; |
292 | struct sh_mobile_lcdc_board_cfg *bcfg = &ch->cfg.board_cfg; | 292 | struct sh_mobile_lcdc_panel_cfg *panel = &ch->cfg.panel_cfg; |
293 | 293 | ||
294 | /* enable clocks before accessing hardware */ | 294 | /* enable clocks before accessing hardware */ |
295 | sh_mobile_lcdc_clk_on(ch->lcdc); | 295 | sh_mobile_lcdc_clk_on(ch->lcdc); |
@@ -314,13 +314,13 @@ static void sh_mobile_lcdc_deferred_io(struct fb_info *info, | |||
314 | 314 | ||
315 | /* trigger panel update */ | 315 | /* trigger panel update */ |
316 | dma_map_sg(info->dev, ch->sglist, nr_pages, DMA_TO_DEVICE); | 316 | dma_map_sg(info->dev, ch->sglist, nr_pages, DMA_TO_DEVICE); |
317 | if (bcfg->start_transfer) | 317 | if (panel->start_transfer) |
318 | bcfg->start_transfer(ch, &sh_mobile_lcdc_sys_bus_ops); | 318 | panel->start_transfer(ch, &sh_mobile_lcdc_sys_bus_ops); |
319 | lcdc_write_chan(ch, LDSM2R, LDSM2R_OSTRG); | 319 | lcdc_write_chan(ch, LDSM2R, LDSM2R_OSTRG); |
320 | dma_unmap_sg(info->dev, ch->sglist, nr_pages, DMA_TO_DEVICE); | 320 | dma_unmap_sg(info->dev, ch->sglist, nr_pages, DMA_TO_DEVICE); |
321 | } else { | 321 | } else { |
322 | if (bcfg->start_transfer) | 322 | if (panel->start_transfer) |
323 | bcfg->start_transfer(ch, &sh_mobile_lcdc_sys_bus_ops); | 323 | panel->start_transfer(ch, &sh_mobile_lcdc_sys_bus_ops); |
324 | lcdc_write_chan(ch, LDSM2R, LDSM2R_OSTRG); | 324 | lcdc_write_chan(ch, LDSM2R, LDSM2R_OSTRG); |
325 | } | 325 | } |
326 | } | 326 | } |
@@ -335,7 +335,7 @@ static void sh_mobile_lcdc_deferred_io_touch(struct fb_info *info) | |||
335 | 335 | ||
336 | static void sh_mobile_lcdc_display_on(struct sh_mobile_lcdc_chan *ch) | 336 | static void sh_mobile_lcdc_display_on(struct sh_mobile_lcdc_chan *ch) |
337 | { | 337 | { |
338 | struct sh_mobile_lcdc_board_cfg *board_cfg = &ch->cfg.board_cfg; | 338 | struct sh_mobile_lcdc_panel_cfg *panel = &ch->cfg.panel_cfg; |
339 | 339 | ||
340 | if (ch->tx_dev) { | 340 | if (ch->tx_dev) { |
341 | if (ch->tx_dev->ops->display_on(ch->tx_dev, ch->info) < 0) | 341 | if (ch->tx_dev->ops->display_on(ch->tx_dev, ch->info) < 0) |
@@ -343,16 +343,16 @@ static void sh_mobile_lcdc_display_on(struct sh_mobile_lcdc_chan *ch) | |||
343 | } | 343 | } |
344 | 344 | ||
345 | /* HDMI must be enabled before LCDC configuration */ | 345 | /* HDMI must be enabled before LCDC configuration */ |
346 | if (board_cfg->display_on) | 346 | if (panel->display_on) |
347 | board_cfg->display_on(); | 347 | panel->display_on(); |
348 | } | 348 | } |
349 | 349 | ||
350 | static void sh_mobile_lcdc_display_off(struct sh_mobile_lcdc_chan *ch) | 350 | static void sh_mobile_lcdc_display_off(struct sh_mobile_lcdc_chan *ch) |
351 | { | 351 | { |
352 | struct sh_mobile_lcdc_board_cfg *board_cfg = &ch->cfg.board_cfg; | 352 | struct sh_mobile_lcdc_panel_cfg *panel = &ch->cfg.panel_cfg; |
353 | 353 | ||
354 | if (board_cfg->display_off) | 354 | if (panel->display_off) |
355 | board_cfg->display_off(); | 355 | panel->display_off(); |
356 | 356 | ||
357 | if (ch->tx_dev) | 357 | if (ch->tx_dev) |
358 | ch->tx_dev->ops->display_off(ch->tx_dev); | 358 | ch->tx_dev->ops->display_off(ch->tx_dev); |
@@ -687,16 +687,15 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv) | |||
687 | lcdc_wait_bit(priv, _LDCNT2R, LDCNT2R_BR, 0); | 687 | lcdc_wait_bit(priv, _LDCNT2R, LDCNT2R_BR, 0); |
688 | 688 | ||
689 | for (k = 0; k < ARRAY_SIZE(priv->ch); k++) { | 689 | for (k = 0; k < ARRAY_SIZE(priv->ch); k++) { |
690 | struct sh_mobile_lcdc_board_cfg *board_cfg; | 690 | struct sh_mobile_lcdc_panel_cfg *panel; |
691 | 691 | ||
692 | ch = &priv->ch[k]; | 692 | ch = &priv->ch[k]; |
693 | if (!ch->enabled) | 693 | if (!ch->enabled) |
694 | continue; | 694 | continue; |
695 | 695 | ||
696 | board_cfg = &ch->cfg.board_cfg; | 696 | panel = &ch->cfg.panel_cfg; |
697 | if (board_cfg->setup_sys) { | 697 | if (panel->setup_sys) { |
698 | ret = board_cfg->setup_sys(ch, | 698 | ret = panel->setup_sys(ch, &sh_mobile_lcdc_sys_bus_ops); |
699 | &sh_mobile_lcdc_sys_bus_ops); | ||
700 | if (ret) | 699 | if (ret) |
701 | return ret; | 700 | return ret; |
702 | } | 701 | } |
@@ -1654,8 +1653,8 @@ sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_priv *priv, | |||
1654 | */ | 1653 | */ |
1655 | var = &info->var; | 1654 | var = &info->var; |
1656 | fb_videomode_to_var(var, mode); | 1655 | fb_videomode_to_var(var, mode); |
1657 | var->width = cfg->lcd_size_cfg.width; | 1656 | var->width = cfg->panel_cfg.width; |
1658 | var->height = cfg->lcd_size_cfg.height; | 1657 | var->height = cfg->panel_cfg.height; |
1659 | var->yres_virtual = var->yres * 2; | 1658 | var->yres_virtual = var->yres * 2; |
1660 | var->activate = FB_ACTIVATE_NOW; | 1659 | var->activate = FB_ACTIVATE_NOW; |
1661 | 1660 | ||