diff options
author | Ryan Mallon <rmallon@gmail.com> | 2012-01-22 20:31:32 +1100 |
---|---|---|
committer | Ryan Mallon <rmallon@gmail.com> | 2012-03-14 11:41:10 +1100 |
commit | 0fd1958050e92c859152e775e548284582335d25 (patch) | |
tree | dd457bc43e459ff65aa0dba5034ec52de5d43364 /drivers/video/ep93xx-fb.c | |
parent | 2ae18b471d91f7622e54f18ed3a4b5b20e9bf871 (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.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/video/ep93xx-fb.c b/drivers/video/ep93xx-fb.c index 2e830ec52a5..f8babbeee27 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) goto failed; } - res = request_mem_region(res->start, resource_size(res), pdev->name); - if (!res) { - err = -EBUSY; - goto failed; - } - + /* + * FIXME - We don't do a request_mem_region here because we are + * sharing the register space with the backlight driver (see + * drivers/video/backlight/ep93xx_bl.c) and doing so will cause + * the second loaded driver to return -EBUSY. + * + * NOTE: No locking is required; the backlight does not touch + * any of the framebuffer registers. + */ fbi->res = res; fbi->mmio_base = ioremap(res->start, resource_size(res)); if (!fbi->mmio_base) { @@ -586,8 +589,6 @@ failed: clk_put(fbi->clk); if (fbi->mmio_base) iounmap(fbi->mmio_base); - if (fbi->res) - release_mem_region(fbi->res->start, resource_size(fbi->res)); ep93xxfb_dealloc_videomem(info); if (&info->cmap) fb_dealloc_cmap(&info->cmap); @@ -608,7 +609,6 @@ static int __devexit ep93xxfb_remove(struct platform_device *pdev) clk_disable(fbi->clk); clk_put(fbi->clk); iounmap(fbi->mmio_base); - release_mem_region(fbi->res->start, resource_size(fbi->res)); ep93xxfb_dealloc_videomem(info); fb_dealloc_cmap(&info->cmap); |