diff options
author | Magnus Damm <damm@opensource.se> | 2009-12-07 09:20:06 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-12-08 22:40:44 -0500 |
commit | ef61aae4ddf1dbd0e9b6ad21e2e57632a8fe76f6 (patch) | |
tree | 8e21c38842ffa6e5b05246376f68acb81f8294b0 | |
parent | b25b9758466bb8bc837f1863389015820f7cb11d (diff) |
sh: add a start_transfer() callback to the LCDC driver
This patch adds a ->start_transfer() callback to the
driver sh_mobile_lcdcfb.c. The callback is used to
program the LCDC panel in the case of one-shot mode.
Needed by the LCD controller used on the KFR2R09 board.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | drivers/video/sh_mobile_lcdcfb.c | 10 | ||||
-rw-r--r-- | include/video/sh_mobile_lcdc.h | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index b4b5de930cf5..d346bbab6cad 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c | |||
@@ -281,6 +281,7 @@ static void sh_mobile_lcdc_deferred_io(struct fb_info *info, | |||
281 | struct list_head *pagelist) | 281 | struct list_head *pagelist) |
282 | { | 282 | { |
283 | struct sh_mobile_lcdc_chan *ch = info->par; | 283 | struct sh_mobile_lcdc_chan *ch = info->par; |
284 | struct sh_mobile_lcdc_board_cfg *bcfg = &ch->cfg.board_cfg; | ||
284 | 285 | ||
285 | /* enable clocks before accessing hardware */ | 286 | /* enable clocks before accessing hardware */ |
286 | sh_mobile_lcdc_clk_on(ch->lcdc); | 287 | sh_mobile_lcdc_clk_on(ch->lcdc); |
@@ -305,10 +306,17 @@ static void sh_mobile_lcdc_deferred_io(struct fb_info *info, | |||
305 | 306 | ||
306 | /* trigger panel update */ | 307 | /* trigger panel update */ |
307 | dma_map_sg(info->dev, ch->sglist, nr_pages, DMA_TO_DEVICE); | 308 | dma_map_sg(info->dev, ch->sglist, nr_pages, DMA_TO_DEVICE); |
309 | if (bcfg->start_transfer) | ||
310 | bcfg->start_transfer(bcfg->board_data, ch, | ||
311 | &sh_mobile_lcdc_sys_bus_ops); | ||
308 | lcdc_write_chan(ch, LDSM2R, 1); | 312 | lcdc_write_chan(ch, LDSM2R, 1); |
309 | dma_unmap_sg(info->dev, ch->sglist, nr_pages, DMA_TO_DEVICE); | 313 | dma_unmap_sg(info->dev, ch->sglist, nr_pages, DMA_TO_DEVICE); |
310 | } else | 314 | } else { |
315 | if (bcfg->start_transfer) | ||
316 | bcfg->start_transfer(bcfg->board_data, ch, | ||
317 | &sh_mobile_lcdc_sys_bus_ops); | ||
311 | lcdc_write_chan(ch, LDSM2R, 1); | 318 | lcdc_write_chan(ch, LDSM2R, 1); |
319 | } | ||
312 | } | 320 | } |
313 | 321 | ||
314 | static void sh_mobile_lcdc_deferred_io_touch(struct fb_info *info) | 322 | static void sh_mobile_lcdc_deferred_io_touch(struct fb_info *info) |
diff --git a/include/video/sh_mobile_lcdc.h b/include/video/sh_mobile_lcdc.h index 25144ab22b95..288205457713 100644 --- a/include/video/sh_mobile_lcdc.h +++ b/include/video/sh_mobile_lcdc.h | |||
@@ -50,6 +50,8 @@ struct sh_mobile_lcdc_board_cfg { | |||
50 | void *board_data; | 50 | void *board_data; |
51 | int (*setup_sys)(void *board_data, void *sys_ops_handle, | 51 | int (*setup_sys)(void *board_data, void *sys_ops_handle, |
52 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops); | 52 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops); |
53 | void (*start_transfer)(void *board_data, void *sys_ops_handle, | ||
54 | struct sh_mobile_lcdc_sys_bus_ops *sys_ops); | ||
53 | void (*display_on)(void *board_data); | 55 | void (*display_on)(void *board_data); |
54 | void (*display_off)(void *board_data); | 56 | void (*display_off)(void *board_data); |
55 | }; | 57 | }; |