aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-davinci/board-dm355-evm.c4
-rw-r--r--arch/arm/mach-davinci/board-dm355-leopard.c4
-rw-r--r--arch/arm/mach-davinci/board-dm644x-evm.c3
-rw-r--r--arch/arm/mach-davinci/board-sffsdr.c3
-rw-r--r--arch/arm/mach-davinci/include/mach/common.h6
-rw-r--r--arch/arm/mach-davinci/include/mach/usb.h2
-rw-r--r--arch/arm/mach-davinci/usb.c8
7 files changed, 14 insertions, 16 deletions
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
index 42b24a7d46cd..a9b650dcc172 100644
--- a/arch/arm/mach-davinci/board-dm355-evm.c
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
@@ -27,11 +27,11 @@
27#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
28 28
29#include <mach/dm355.h> 29#include <mach/dm355.h>
30#include <mach/common.h>
31#include <mach/i2c.h> 30#include <mach/i2c.h>
32#include <mach/serial.h> 31#include <mach/serial.h>
33#include <mach/nand.h> 32#include <mach/nand.h>
34#include <mach/mmc.h> 33#include <mach/mmc.h>
34#include <mach/usb.h>
35 35
36#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000 36#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000
37#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000 37#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
@@ -338,7 +338,7 @@ static __init void dm355_evm_init(void)
338 gpio_request(2, "usb_id_toggle"); 338 gpio_request(2, "usb_id_toggle");
339 gpio_direction_output(2, USB_ID_VALUE); 339 gpio_direction_output(2, USB_ID_VALUE);
340 /* irlml6401 switches over 1A in under 8 msec */ 340 /* irlml6401 switches over 1A in under 8 msec */
341 setup_usb(500, 8); 341 davinci_setup_usb(1000, 8);
342 342
343 davinci_setup_mmc(0, &dm355evm_mmc_config); 343 davinci_setup_mmc(0, &dm355evm_mmc_config);
344 davinci_setup_mmc(1, &dm355evm_mmc_config); 344 davinci_setup_mmc(1, &dm355evm_mmc_config);
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c
index d9dcc2f3f7de..21f32eb41e8c 100644
--- a/arch/arm/mach-davinci/board-dm355-leopard.c
+++ b/arch/arm/mach-davinci/board-dm355-leopard.c
@@ -24,11 +24,11 @@
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
25 25
26#include <mach/dm355.h> 26#include <mach/dm355.h>
27#include <mach/common.h>
28#include <mach/i2c.h> 27#include <mach/i2c.h>
29#include <mach/serial.h> 28#include <mach/serial.h>
30#include <mach/nand.h> 29#include <mach/nand.h>
31#include <mach/mmc.h> 30#include <mach/mmc.h>
31#include <mach/usb.h>
32 32
33#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000 33#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000
34#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000 34#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
@@ -263,7 +263,7 @@ static __init void dm355_leopard_init(void)
263 gpio_request(2, "usb_id_toggle"); 263 gpio_request(2, "usb_id_toggle");
264 gpio_direction_output(2, USB_ID_VALUE); 264 gpio_direction_output(2, USB_ID_VALUE);
265 /* irlml6401 switches over 1A in under 8 msec */ 265 /* irlml6401 switches over 1A in under 8 msec */
266 setup_usb(500, 8); 266 davinci_setup_usb(1000, 8);
267 267
268 davinci_setup_mmc(0, &dm355leopard_mmc_config); 268 davinci_setup_mmc(0, &dm355leopard_mmc_config);
269 davinci_setup_mmc(1, &dm355leopard_mmc_config); 269 davinci_setup_mmc(1, &dm355leopard_mmc_config);
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index 00a80467b491..fd0398bc6db3 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -36,6 +36,7 @@
36#include <mach/mux.h> 36#include <mach/mux.h>
37#include <mach/nand.h> 37#include <mach/nand.h>
38#include <mach/mmc.h> 38#include <mach/mmc.h>
39#include <mach/usb.h>
39 40
40#define DM644X_EVM_PHY_MASK (0x2) 41#define DM644X_EVM_PHY_MASK (0x2)
41#define DM644X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ 42#define DM644X_EVM_MDIO_FREQUENCY (2200000) /* PHY bus frequency */
@@ -465,7 +466,7 @@ evm_u35_setup(struct i2c_client *client, int gpio, unsigned ngpio, void *c)
465 /* irlml6401 switches over 1A, in under 8 msec; 466 /* irlml6401 switches over 1A, in under 8 msec;
466 * now it can be managed by nDRV_VBUS ... 467 * now it can be managed by nDRV_VBUS ...
467 */ 468 */
468 setup_usb(500, 8); 469 davinci_setup_usb(1000, 8);
469 470
470 return 0; 471 return 0;
471} 472}
diff --git a/arch/arm/mach-davinci/board-sffsdr.c b/arch/arm/mach-davinci/board-sffsdr.c
index e6654877b9cf..ccfd85b135e4 100644
--- a/arch/arm/mach-davinci/board-sffsdr.c
+++ b/arch/arm/mach-davinci/board-sffsdr.c
@@ -40,6 +40,7 @@
40#include <mach/i2c.h> 40#include <mach/i2c.h>
41#include <mach/serial.h> 41#include <mach/serial.h>
42#include <mach/mux.h> 42#include <mach/mux.h>
43#include <mach/usb.h>
43 44
44#define SFFSDR_PHY_MASK (0x2) 45#define SFFSDR_PHY_MASK (0x2)
45#define SFFSDR_MDIO_FREQUENCY (2200000) /* PHY bus frequency */ 46#define SFFSDR_MDIO_FREQUENCY (2200000) /* PHY bus frequency */
@@ -152,7 +153,7 @@ static __init void davinci_sffsdr_init(void)
152 davinci_serial_init(&uart_config); 153 davinci_serial_init(&uart_config);
153 soc_info->emac_pdata->phy_mask = SFFSDR_PHY_MASK; 154 soc_info->emac_pdata->phy_mask = SFFSDR_PHY_MASK;
154 soc_info->emac_pdata->mdio_max_freq = SFFSDR_MDIO_FREQUENCY; 155 soc_info->emac_pdata->mdio_max_freq = SFFSDR_MDIO_FREQUENCY;
155 setup_usb(0, 0); /* We support only peripheral mode. */ 156 davinci_setup_usb(0, 0); /* We support only peripheral mode. */
156 157
157 /* mux VLYNQ pins */ 158 /* mux VLYNQ pins */
158 davinci_cfg_reg(DM644X_VLYNQEN); 159 davinci_cfg_reg(DM644X_VLYNQEN);
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h
index 1fd3917cae4e..6ca2c9a0a482 100644
--- a/arch/arm/mach-davinci/include/mach/common.h
+++ b/arch/arm/mach-davinci/include/mach/common.h
@@ -20,12 +20,6 @@ extern void davinci_irq_init(void);
20extern void __iomem *davinci_intc_base; 20extern void __iomem *davinci_intc_base;
21extern int davinci_intc_type; 21extern int davinci_intc_type;
22 22
23/* parameters describe VBUS sourcing for host mode */
24extern void setup_usb(unsigned mA, unsigned potpgt_msec);
25
26/* parameters describe VBUS sourcing for host mode */
27extern void setup_usb(unsigned mA, unsigned potpgt_msec);
28
29struct davinci_timer_instance { 23struct davinci_timer_instance {
30 void __iomem *base; 24 void __iomem *base;
31 u32 bottom_irq; 25 u32 bottom_irq;
diff --git a/arch/arm/mach-davinci/include/mach/usb.h b/arch/arm/mach-davinci/include/mach/usb.h
index 435f2284238a..e0bc4abe69c2 100644
--- a/arch/arm/mach-davinci/include/mach/usb.h
+++ b/arch/arm/mach-davinci/include/mach/usb.h
@@ -54,4 +54,6 @@ struct da8xx_ohci_root_hub {
54 u8 potpgt; 54 u8 potpgt;
55}; 55};
56 56
57void davinci_setup_usb(unsigned mA, unsigned potpgt_ms);
58
57#endif /* ifndef __ASM_ARCH_USB_H */ 59#endif /* ifndef __ASM_ARCH_USB_H */
diff --git a/arch/arm/mach-davinci/usb.c b/arch/arm/mach-davinci/usb.c
index 31eec87dc78f..fe20cc2e8385 100644
--- a/arch/arm/mach-davinci/usb.c
+++ b/arch/arm/mach-davinci/usb.c
@@ -83,10 +83,10 @@ static struct platform_device usb_dev = {
83 .num_resources = ARRAY_SIZE(usb_resources), 83 .num_resources = ARRAY_SIZE(usb_resources),
84}; 84};
85 85
86void __init setup_usb(unsigned mA, unsigned potpgt_msec) 86void __init davinci_setup_usb(unsigned mA, unsigned potpgt_ms)
87{ 87{
88 usb_data.power = mA / 2; 88 usb_data.power = mA > 510 ? 255 : mA / 2;
89 usb_data.potpgt = potpgt_msec / 2; 89 usb_data.potpgt = (potpgt_ms + 1) / 2;
90 90
91 if (cpu_is_davinci_dm646x()) { 91 if (cpu_is_davinci_dm646x()) {
92 /* Override the defaults as DM6467 uses different IRQs. */ 92 /* Override the defaults as DM6467 uses different IRQs. */
@@ -100,7 +100,7 @@ void __init setup_usb(unsigned mA, unsigned potpgt_msec)
100 100
101#else 101#else
102 102
103void __init setup_usb(unsigned mA, unsigned potpgt_msec) 103void __init davinci_setup_usb(unsigned mA, unsigned potpgt_ms)
104{ 104{
105} 105}
106 106