summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-01-26 14:28:35 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-02-09 16:34:51 +0100
commit3259701cc2969ae16a0018d7e3a89f327fa23a6e (patch)
tree3358d9ceab051cfe25ccf1b7def49078722d26be /arch
parentARM: sa1111: add platform enable/disable functions (diff)
downloadlinux-3259701cc2969ae16a0018d7e3a89f327fa23a6e.tar.xz
linux-3259701cc2969ae16a0018d7e3a89f327fa23a6e.zip
ARM: sa11x0: badge4: move board specific ohci initialization to badge4.c
Move the handling of the 5v supply into badge4.c, removing this board specific detail from the sa1111 ohci driver. Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-sa1100/badge4.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c
index b07a2c024cb7..d84924993bad 100644
--- a/arch/arm/mach-sa1100/badge4.c
+++ b/arch/arm/mach-sa1100/badge4.c
@@ -51,8 +51,23 @@ static struct resource sa1111_resources[] = {
},
};
+static int badge4_sa1111_enable(void *data, unsigned devid)
+{
+ if (devid == SA1111_DEVID_USB)
+ badge4_set_5V(BADGE4_5V_USB, 1);
+ return 0;
+}
+
+static void badge4_sa1111_disable(void *data, unsigned devid)
+{
+ if (devid == SA1111_DEVID_USB)
+ badge4_set_5V(BADGE4_5V_USB, 0);
+}
+
static struct sa1111_platform_data sa1111_info = {
.irq_base = IRQ_BOARD_END,
+ .enable = badge4_sa1111_enable,
+ .disable = badge4_sa1111_disable,
};
static u64 sa1111_dmamask = 0xffffffffUL;