aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ep93xx/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ep93xx/core.c')
-rw-r--r--arch/arm/mach-ep93xx/core.c35
1 files changed, 33 insertions, 2 deletions
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 41f0d680c5e..8d258958871 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -46,6 +46,7 @@
46 46
47#include <asm/hardware/vic.h> 47#include <asm/hardware/vic.h>
48 48
49#include "soc.h"
49 50
50/************************************************************************* 51/*************************************************************************
51 * Static I/O mappings that are needed for all EP93xx platforms 52 * Static I/O mappings that are needed for all EP93xx platforms
@@ -204,7 +205,6 @@ void ep93xx_syscon_swlocked_write(unsigned int val, void __iomem *reg)
204 205
205 spin_unlock_irqrestore(&syscon_swlock, flags); 206 spin_unlock_irqrestore(&syscon_swlock, flags);
206} 207}
207EXPORT_SYMBOL(ep93xx_syscon_swlocked_write);
208 208
209void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits) 209void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits)
210{ 210{
@@ -221,7 +221,6 @@ void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits)
221 221
222 spin_unlock_irqrestore(&syscon_swlock, flags); 222 spin_unlock_irqrestore(&syscon_swlock, flags);
223} 223}
224EXPORT_SYMBOL(ep93xx_devcfg_set_clear);
225 224
226/** 225/**
227 * ep93xx_chip_revision() - returns the EP93xx chip revision 226 * ep93xx_chip_revision() - returns the EP93xx chip revision
@@ -648,9 +647,19 @@ static struct platform_device ep93xx_fb_device = {
648 .resource = ep93xx_fb_resource, 647 .resource = ep93xx_fb_resource,
649}; 648};
650 649
650/* The backlight use a single register in the framebuffer's register space */
651#define EP93XX_RASTER_REG_BRIGHTNESS 0x20
652
653static struct resource ep93xx_bl_resources[] = {
654 DEFINE_RES_MEM(EP93XX_RASTER_PHYS_BASE +
655 EP93XX_RASTER_REG_BRIGHTNESS, 0x04),
656};
657
651static struct platform_device ep93xx_bl_device = { 658static struct platform_device ep93xx_bl_device = {
652 .name = "ep93xx-bl", 659 .name = "ep93xx-bl",
653 .id = -1, 660 .id = -1,
661 .num_resources = ARRAY_SIZE(ep93xx_bl_resources),
662 .resource = ep93xx_bl_resources,
654}; 663};
655 664
656/** 665/**
@@ -845,11 +854,32 @@ void __init ep93xx_register_ac97(void)
845 platform_device_register(&ep93xx_pcm_device); 854 platform_device_register(&ep93xx_pcm_device);
846} 855}
847 856
857/*************************************************************************
858 * EP93xx Watchdog
859 *************************************************************************/
860static struct resource ep93xx_wdt_resources[] = {
861 DEFINE_RES_MEM(EP93XX_WATCHDOG_PHYS_BASE, 0x08),
862};
863
864static struct platform_device ep93xx_wdt_device = {
865 .name = "ep93xx-wdt",
866 .id = -1,
867 .num_resources = ARRAY_SIZE(ep93xx_wdt_resources),
868 .resource = ep93xx_wdt_resources,
869};
870
848void __init ep93xx_init_devices(void) 871void __init ep93xx_init_devices(void)
849{ 872{
850 /* Disallow access to MaverickCrunch initially */ 873 /* Disallow access to MaverickCrunch initially */
851 ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_CPENA); 874 ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_CPENA);
852 875
876 /* Default all ports to GPIO */
877 ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_KEYS |
878 EP93XX_SYSCON_DEVCFG_GONK |
879 EP93XX_SYSCON_DEVCFG_EONIDE |
880 EP93XX_SYSCON_DEVCFG_GONIDE |
881 EP93XX_SYSCON_DEVCFG_HONIDE);
882
853 /* Get the GPIO working early, other devices need it */ 883 /* Get the GPIO working early, other devices need it */
854 platform_device_register(&ep93xx_gpio_device); 884 platform_device_register(&ep93xx_gpio_device);
855 885
@@ -860,6 +890,7 @@ void __init ep93xx_init_devices(void)
860 platform_device_register(&ep93xx_rtc_device); 890 platform_device_register(&ep93xx_rtc_device);
861 platform_device_register(&ep93xx_ohci_device); 891 platform_device_register(&ep93xx_ohci_device);
862 platform_device_register(&ep93xx_leds); 892 platform_device_register(&ep93xx_leds);
893 platform_device_register(&ep93xx_wdt_device);
863} 894}
864 895
865void ep93xx_restart(char mode, const char *cmd) 896void ep93xx_restart(char mode, const char *cmd)