From 6ea4b7418dfd07dc76d20a3c3bf632ee7b59a2c4 Mon Sep 17 00:00:00 2001 From: Hartley Sweeten Date: Wed, 9 Jun 2010 21:15:12 +0100 Subject: ARM: 6167/1: ep93xx: register backlight driver Add the platform registration for the ep93xx backlight driver that is now merged. Since the pwm BRIGHT signal only functions if the video system is operating, register the backlight when the framebuffer device is registered. Signed-off-by: H Hartley Sweeten Acked-by: Ryan Mallon Signed-off-by: Russell King --- arch/arm/mach-ep93xx/core.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/arm/mach-ep93xx/core.c') diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 9092677f63eb..ac6aeeb974d6 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -620,6 +620,11 @@ static struct platform_device ep93xx_fb_device = { .resource = ep93xx_fb_resource, }; +static struct platform_device ep93xx_bl_device = { + .name = "ep93xx-bl", + .id = -1, +}; + /** * ep93xx_register_fb - Register the framebuffer platform device. * @data: platform specific framebuffer configuration (__initdata) @@ -628,6 +633,7 @@ void __init ep93xx_register_fb(struct ep93xxfb_mach_info *data) { ep93xxfb_data = *data; platform_device_register(&ep93xx_fb_device); + platform_device_register(&ep93xx_bl_device); } -- cgit v1.2.1 From 16bcf78f8cac9cc3057c6ce3800490cb6e684ce8 Mon Sep 17 00:00:00 2001 From: Hartley Sweeten Date: Thu, 10 Jun 2010 16:19:08 +0100 Subject: ARM: 6168/1: ep93xx: move physmap flash registration into core.c Create a core.c __init function to handle the physmap flash registration for all the ep93xx platforms. Also, modify all the ep93xx platforms to use this new function. This simplifies all the ep93xx platform init code and reduces the size of the kernel when including multiple ep93xx boards. Signed-off-by: H Hartley Sweeten Acked-by: Ryan Mallon Acked-by: Martin Guy Acked-by: Hubert Feurstein Signed-off-by: Russell King --- arch/arm/mach-ep93xx/core.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'arch/arm/mach-ep93xx/core.c') diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index ac6aeeb974d6..f4b25bf00b64 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -347,6 +348,43 @@ static struct platform_device ep93xx_ohci_device = { }; +/************************************************************************* + * EP93xx physmap'ed flash + *************************************************************************/ +static struct physmap_flash_data ep93xx_flash_data; + +static struct resource ep93xx_flash_resource = { + .flags = IORESOURCE_MEM, +}; + +static struct platform_device ep93xx_flash = { + .name = "physmap-flash", + .id = 0, + .dev = { + .platform_data = &ep93xx_flash_data, + }, + .num_resources = 1, + .resource = &ep93xx_flash_resource, +}; + +/** + * ep93xx_register_flash() - Register the external flash device. + * @width: bank width in octets + * @start: resource start address + * @size: resource size + */ +void __init ep93xx_register_flash(unsigned int width, + resource_size_t start, resource_size_t size) +{ + ep93xx_flash_data.width = width; + + ep93xx_flash_resource.start = start; + ep93xx_flash_resource.end = start + size - 1; + + platform_device_register(&ep93xx_flash); +} + + /************************************************************************* * EP93xx ethernet peripheral handling *************************************************************************/ -- cgit v1.2.1 From a0fb007bf0c7de9ae361a9ad3821df4c69d4d2d9 Mon Sep 17 00:00:00 2001 From: Hartley Sweeten Date: Mon, 14 Jun 2010 16:54:16 +0100 Subject: ARM: 6174/1: ep93xx: clear devcfg bits before setting them The ep93xx core helper function ep93xx_devcfg_set_clear should mask the clear_bits before setting the new set_bits in case the clear_bits are a mask value that also includes the set_bits. Signed-off-by: H Hartley Sweeten Acked-by: Ryan Mallon Signed-off-by: Russell King --- arch/arm/mach-ep93xx/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-ep93xx/core.c') diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index f4b25bf00b64..8e37a045188c 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -216,8 +216,8 @@ void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits) spin_lock_irqsave(&syscon_swlock, flags); val = __raw_readl(EP93XX_SYSCON_DEVCFG); - val |= set_bits; val &= ~clear_bits; + val |= set_bits; __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); __raw_writel(val, EP93XX_SYSCON_DEVCFG); -- cgit v1.2.1