From: Steve Birtles <arm_kernel_development@micromark.net.cn>
Date:   Tue Jan 1 10:17:54 2008 +0800

     The YL-9200 board switches a transistor to provide pullup, as a result the usb code is incorrect in that it assumes
     all boards use 'active' high on a pin to pull up the USB state.
     This modification adds a field to allow the state of the pin
level to be specified

Signed-off-by: Steve Birtles <arm_kernel_development@micromark.net.cn>

    The YL-9200 board switches a transistor to provide pullup, as a result the usb code is incorrect in that it assumes
    all boards use 'active' high on a pin to pull up the USB state
    This modification adds a field to allow the state of the pin level to be specified


diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
old mode 100755
new mode 100644
index 4a682dc..8cc6b20
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -881,11 +881,6 @@ static void clk_off(struct at91_udc *udc)
  */
 static void pullup(struct at91_udc *udc, int is_on)
 {
-int pullup_state = 1;  /*The 'normal case*/
-	if (udc->board.pullup_active_level)
-	 /* we pass in the state of the signal used to pullup the usb*/
-		pullup_state = udc->pullup_active_level;
-
 	if (!udc->enabled || !udc->vbus)
 		is_on = 0;
 	DBG("%sactive\n", is_on ? "" : "in");
@@ -894,7 +889,7 @@ int pullup_state = 1;  /*The 'normal case*/
 		clk_on(udc);
 		at91_udp_write(udc, AT91_UDP_TXVC, 0);
 		if (cpu_is_at91rm9200())
-			at91_set_gpio_value(udc->board.pullup_pin, (pullup_state & 1));
+			at91_set_gpio_value(udc->board.pullup_pin, 1);
 		else if (cpu_is_at91sam9260() || cpu_is_at91sam9263()) {
 			u32	txvc = at91_udp_read(udc, AT91_UDP_TXVC);
 
@@ -911,7 +906,7 @@ int pullup_state = 1;  /*The 'normal case*/
 		stop_activity(udc);
 		at91_udp_write(udc, AT91_UDP_TXVC, AT91_UDP_TXVC_TXVDIS);
 		if (cpu_is_at91rm9200())
-			at91_set_gpio_value(udc->board.pullup_pin,  ~(pullup_state & 1));
+			at91_set_gpio_value(udc->board.pullup_pin, 0);
 		else if (cpu_is_at91sam9260() || cpu_is_at91sam9263()) {
 			u32	txvc = at91_udp_read(udc, AT91_UDP_TXVC);
 
diff --git a/include/asm-arm/arch-at91/board.h b/include/asm-arm/arch-at91/board.h
old mode 100755
new mode 100644
index cdd6ed6..6fa195a
--- a/include/asm-arm/arch-at91/board.h
+++ b/include/asm-arm/arch-at91/board.h
@@ -51,7 +51,6 @@ struct at91_cf_data {
 	u8	vcc_pin;		/* power switching */
 	u8	rst_pin;		/* card reset */
 	u8	chipselect;		/* EBI Chip Select number */
-	u8  pullup_active_level; /* not all boards pull up active high on the I/O pin*/
 };
 extern void __init at91_add_device_cf(struct at91_cf_data *data);
 
