From 0fd1958050e92c859152e775e548284582335d25 Mon Sep 17 00:00:00 2001 From: Ryan Mallon Date: Sun, 22 Jan 2012 20:31:32 +1100 Subject: 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 Suggested-by: Arnd Bergmann Cc: Mika Westerberg Cc: Richard Purdie Cc: Florian Tobias Schandinat Acked-by: Arnd Bergmann Acked-by: H Hartley Sweeten --- arch/arm/mach-ep93xx/core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/arm/mach-ep93xx') diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index b5c1dae8327f..c73e299b08a5 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -682,9 +682,19 @@ static struct platform_device ep93xx_fb_device = { .resource = ep93xx_fb_resource, }; +/* The backlight use a single register in the framebuffer's register space */ +#define EP93XX_RASTER_REG_BRIGHTNESS 0x20 + +static struct resource ep93xx_bl_resources[] = { + DEFINE_RES_MEM(EP93XX_RASTER_PHYS_BASE + + EP93XX_RASTER_REG_BRIGHTNESS, 0x04), +}; + static struct platform_device ep93xx_bl_device = { .name = "ep93xx-bl", .id = -1, + .num_resources = ARRAY_SIZE(ep93xx_bl_resources), + .resource = ep93xx_bl_resources, }; /** -- cgit v1.2.3