aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/ep93xx-fb.c
diff options
context:
space:
mode:
authorRyan Mallon <rmallon@gmail.com>2012-01-22 04:31:32 -0500
committerRyan Mallon <rmallon@gmail.com>2012-03-13 20:41:10 -0400
commit0fd1958050e92c859152e775e548284582335d25 (patch)
treedd457bc43e459ff65aa0dba5034ec52de5d43364 /drivers/video/ep93xx-fb.c
parent2ae18b471d91f7622e54f18ed3a4b5b20e9bf871 (diff)
ep93xx: Use ioremap for backlight driver
The ep93xx backlight driver uses a single register within the framebuffer's register space. Currently the backlight driver uses a static IO mapping for the register since the memory cannot be requested by both drivers. Convert the static mapping to use ioremap so that we can remove the dependency on mach/hardware.h. To do so, we need remove the request_mem_region from both the backlight and framebuffer drivers, since whichever driver is loaded second will fail with -EBUSY otherwise. A proper fix is still required, and a FIXME comment has been added to both drivers. Signed-off-by: Ryan Mallon <rmallon@gmail.com> Suggested-by: Arnd Bergmann <arnd@arndb.de> Cc: Mika Westerberg <mika.westerberg@iki.fi> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Diffstat (limited to 'drivers/video/ep93xx-fb.c')
-rw-r--r--drivers/video/ep93xx-fb.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/video/ep93xx-fb.c b/drivers/video/ep93xx-fb.c
index 2e830ec52a5a..f8babbeee275 100644
--- a/drivers/video/ep93xx-fb.c
+++ b/drivers/video/ep93xx-fb.c
@@ -519,12 +519,15 @@ static int __devinit ep93xxfb_probe(struct platform_device *pdev)
519 goto failed; 519 goto failed;
520 } 520 }
521 521
522 res = request_mem_region(res->start, resource_size(res), pdev->name); 522 /*
523 if (!res) { 523 * FIXME - We don't do a request_mem_region here because we are
524 err = -EBUSY; 524 * sharing the register space with the backlight driver (see
525 goto failed; 525 * drivers/video/backlight/ep93xx_bl.c) and doing so will cause
526 } 526 * the second loaded driver to return -EBUSY.
527 527 *
528 * NOTE: No locking is required; the backlight does not touch
529 * any of the framebuffer registers.
530 */
528 fbi->res = res; 531 fbi->res = res;
529 fbi->mmio_base = ioremap(res->start, resource_size(res)); 532 fbi->mmio_base = ioremap(res->start, resource_size(res));
530 if (!fbi->mmio_base) { 533 if (!fbi->mmio_base) {
@@ -586,8 +589,6 @@ failed:
586 clk_put(fbi->clk); 589 clk_put(fbi->clk);
587 if (fbi->mmio_base) 590 if (fbi->mmio_base)
588 iounmap(fbi->mmio_base); 591 iounmap(fbi->mmio_base);
589 if (fbi->res)
590 release_mem_region(fbi->res->start, resource_size(fbi->res));
591 ep93xxfb_dealloc_videomem(info); 592 ep93xxfb_dealloc_videomem(info);
592 if (&info->cmap) 593 if (&info->cmap)
593 fb_dealloc_cmap(&info->cmap); 594 fb_dealloc_cmap(&info->cmap);
@@ -608,7 +609,6 @@ static int __devexit ep93xxfb_remove(struct platform_device *pdev)
608 clk_disable(fbi->clk); 609 clk_disable(fbi->clk);
609 clk_put(fbi->clk); 610 clk_put(fbi->clk);
610 iounmap(fbi->mmio_base); 611 iounmap(fbi->mmio_base);
611 release_mem_region(fbi->res->start, resource_size(fbi->res));
612 ep93xxfb_dealloc_videomem(info); 612 ep93xxfb_dealloc_videomem(info);
613 fb_dealloc_cmap(&info->cmap); 613 fb_dealloc_cmap(&info->cmap);
614 614