From: Miguel Aguilar <miguel.agui...@ridgerun.com>

This patch was tested on a DM365 EVM rev c, in both USB modes: Host
and Gadget.

Signed-off-by: Miguel Aguilar <miguel.agui...@ridgerun.com>
---
 arch/arm/mach-davinci/board-dm365-evm.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-davinci/board-dm365-evm.c 
b/arch/arm/mach-davinci/board-dm365-evm.c
index f6adf79..3a0d404 100644
--- a/arch/arm/mach-davinci/board-dm365-evm.c
+++ b/arch/arm/mach-davinci/board-dm365-evm.c
@@ -38,6 +38,7 @@
 #include <mach/common.h>
 #include <mach/mmc.h>
 #include <mach/nand.h>
+#include <mach/gpio.h>
 
 
 static inline int have_imager(void)
@@ -270,6 +271,14 @@ static void dm365evm_mmc_configure(void)
        davinci_cfg_reg(DM365_SD1_DATA0);
 }
 
+static void dm365evm_usb_configure(void)
+{
+       davinci_cfg_reg(DM365_GPIO33);
+       gpio_request(33, "usb");
+       gpio_direction_output(33, 1);
+       setup_usb(500, 8);
+}
+
 static void __init evm_init_i2c(void)
 {
        davinci_init_i2c(&i2c_pdata);
@@ -471,6 +480,7 @@ static __init void dm365_evm_init(void)
 
        dm365evm_emac_configure();
        dm365evm_mmc_configure();
+       dm365evm_usb_configure();
 
        davinci_setup_mmc(0, &dm365evm_mmc_config);
 
-- 
1.6.0.4


_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to