|
|
@ -10,6 +10,7 @@ |
|
|
|
#include <console.h> |
|
|
|
#include <console.h> |
|
|
|
#include <usb.h> |
|
|
|
#include <usb.h> |
|
|
|
#include <asm/io.h> |
|
|
|
#include <asm/io.h> |
|
|
|
|
|
|
|
#include <linux/iopoll.h> |
|
|
|
|
|
|
|
|
|
|
|
#include "r8a66597.h" |
|
|
|
#include "r8a66597.h" |
|
|
|
|
|
|
|
|
|
|
@ -297,7 +298,6 @@ static int send_setup_packet(struct r8a66597 *r8a66597, struct usb_device *dev, |
|
|
|
int timeout = 3000; |
|
|
|
int timeout = 3000; |
|
|
|
#if defined(CONFIG_RZA_USB) |
|
|
|
#if defined(CONFIG_RZA_USB) |
|
|
|
u16 dcpctr; |
|
|
|
u16 dcpctr; |
|
|
|
int timeout2 = 10000; |
|
|
|
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|
u16 devsel = setup->request == USB_REQ_SET_ADDRESS ? 0 : dev->devnum; |
|
|
|
u16 devsel = setup->request == USB_REQ_SET_ADDRESS ? 0 : dev->devnum; |
|
|
|
|
|
|
|
|
|
|
@ -308,13 +308,10 @@ static int send_setup_packet(struct r8a66597 *r8a66597, struct usb_device *dev, |
|
|
|
#if defined(CONFIG_RZA_USB) |
|
|
|
#if defined(CONFIG_RZA_USB) |
|
|
|
dcpctr = r8a66597_read(r8a66597, DCPCTR); |
|
|
|
dcpctr = r8a66597_read(r8a66597, DCPCTR); |
|
|
|
if ((dcpctr & PID) == PID_BUF) { |
|
|
|
if ((dcpctr & PID) == PID_BUF) { |
|
|
|
timeout2 = 10000; |
|
|
|
if (readw_poll_timeout(r8a66597->reg + DCPCTR, dcpctr, |
|
|
|
while (!(dcpctr & BSTS)) { |
|
|
|
dcpctr & BSTS, 1000) < 0) { |
|
|
|
dcpctr = r8a66597_read(r8a66597, DCPCTR); |
|
|
|
printf("DCPCTR BSTS timeout!\n"); |
|
|
|
if (timeout2-- < 0) { |
|
|
|
return -ETIMEDOUT; |
|
|
|
printf("DCPCTR clear timeout!\n"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|