Ajay Kumar Gupta wrote:
setup_usb() has been modified to pass board specific data so updating
this function call from all Davinci based boards.
Added "struct device;" to fix below compilation warning for Davinci boards.
"musb.h: struct device, defined within parameter list"
You should fix the missing #include in the musb.h, not band-aid it here...
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@xxxxxx>
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
index 77e8067..31c5741 100644
--- a/arch/arm/mach-davinci/board-dm355-evm.c
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
@@ -24,6 +24,7 @@
#include <media/tvp514x.h>
#include <linux/spi/spi.h>
#include <linux/spi/eeprom.h>
+#include <linux/usb/musb.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
@@ -317,6 +318,12 @@ static struct spi_board_info dm355_evm_spi_info[] __initconst = {
},
};
+/* musb board specific data */
+static struct musb_hdrc_board_data musb_bdata __initdata = {
+ .power = 250, /* (power in mA)/2 */
+ .potpgt = 4, /* (potpgt in msec)/2 */
+};
+
static __init void dm355_evm_init(void)
{
struct clk *aemif;
@@ -344,7 +351,7 @@ static __init void dm355_evm_init(void)
gpio_request(2, "usb_id_toggle");
gpio_direction_output(2, USB_ID_VALUE);
/* irlml6401 switches over 1A in under 8 msec */
- setup_usb(500, 8);
+ setup_usb(&musb_bdata);
Unfortunately, this will conflict with a patch queued for 2.6.33 in
linux-davinci. Though in fact, it will render the part of this patch
useless... :-/
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h
index 1fd3917..dab784c 100644
--- a/arch/arm/mach-davinci/include/mach/common.h
+++ b/arch/arm/mach-davinci/include/mach/common.h
@@ -20,11 +20,14 @@ extern void davinci_irq_init(void);
extern void __iomem *davinci_intc_base;
extern int davinci_intc_type;
+struct device;
NAK. <linux/usb/musb.h> should be fixed instead.
+#include <linux/usb/musb.h>
+
/* parameters describe VBUS sourcing for host mode */
-extern void setup_usb(unsigned mA, unsigned potpgt_msec);
+extern void setup_usb(struct musb_hdrc_board_data *board_data);
/* parameters describe VBUS sourcing for host mode */
-extern void setup_usb(unsigned mA, unsigned potpgt_msec);
+extern void setup_usb(struct musb_hdrc_board_data *board_data);
Don't you see -- these are duplicate? You could kill the second one. :-)
BTW, the mentioned linux-davinci patch moved the declaration to
<mach/usb.h> (and renamed the function too).
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html