mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
M:Robe 500: Start of interrupt support.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21913 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8eba69f91b
commit
c97a3bf180
2 changed files with 28 additions and 15 deletions
|
|
@ -238,7 +238,7 @@ static int mxx_transmit_receive(int endpoint) {
|
||||||
|
|
||||||
/* Start sending data in 16-bit words */
|
/* Start sending data in 16-bit words */
|
||||||
for (i = 0; i < (length>>1); i++) {
|
for (i = 0; i < (length>>1); i++) {
|
||||||
/* This wait is dangerous in the event htat something happens to
|
/* This wait is dangerous in the event that something happens to
|
||||||
* the PHY pipe where it never becomes ready again, should probably
|
* the PHY pipe where it never becomes ready again, should probably
|
||||||
* add a timeout, and ideally completely remove.
|
* add a timeout, and ideally completely remove.
|
||||||
*/
|
*/
|
||||||
|
|
@ -550,17 +550,30 @@ void usb_drv_set_test_mode(int mode) {
|
||||||
int usb_drv_request_endpoint(int type, int dir) {
|
int usb_drv_request_endpoint(int type, int dir) {
|
||||||
int ep;
|
int ep;
|
||||||
int pipecfg = 0;
|
int pipecfg = 0;
|
||||||
|
|
||||||
if (type != USB_ENDPOINT_XFER_BULK)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
/* The endpoint/pipes are hard coded: This could be more flexible */
|
/* The endpoint/pipes are hard coded: This could be more flexible */
|
||||||
if (dir == USB_DIR_IN) {
|
if (type == USB_ENDPOINT_XFER_BULK) {
|
||||||
pipecfg |= (1<<4);
|
/* Enalbe double buffer mode */
|
||||||
ep = 2;
|
pipecfg |= 1<<9;
|
||||||
|
|
||||||
|
if (dir == USB_DIR_IN) {
|
||||||
|
pipecfg |= (1<<4);
|
||||||
|
ep = 2;
|
||||||
|
} else {
|
||||||
|
ep = 1;
|
||||||
|
}
|
||||||
|
} else if (type == USB_ENDPOINT_XFER_INT) {
|
||||||
|
if (dir == USB_DIR_IN) {
|
||||||
|
pipecfg |= (1<<4);
|
||||||
|
ep = 6;
|
||||||
|
} else {
|
||||||
|
ep = 5;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ep = 1;
|
/* Not a supported type */
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!M66591_eps[ep].busy) {
|
if (!M66591_eps[ep].busy) {
|
||||||
M66591_eps[ep].busy = true;
|
M66591_eps[ep].busy = true;
|
||||||
|
|
@ -572,11 +585,12 @@ int usb_drv_request_endpoint(int type, int dir) {
|
||||||
|
|
||||||
M66591_PIPE_CFGSEL=ep;
|
M66591_PIPE_CFGSEL=ep;
|
||||||
|
|
||||||
pipecfg |= 1<<15 | 1<<9 | 1<<8;
|
/* Enable pipe (15) and continuous transfer mode (8) */
|
||||||
|
pipecfg |= 1<<15 | 1<<8;
|
||||||
|
|
||||||
pipe_handshake(ep, PIPE_SHAKE_NAK);
|
pipe_handshake(ep, PIPE_SHAKE_NAK);
|
||||||
|
|
||||||
// Setup the flags
|
/* Setup the flags */
|
||||||
M66591_PIPE_CFGWND=pipecfg;
|
M66591_PIPE_CFGWND=pipecfg;
|
||||||
|
|
||||||
logf("mxx: ep req ep#: %d config: 0x%04x", ep, M66591_PIPE_CFGWND);
|
logf("mxx: ep req ep#: %d config: 0x%04x", ep, M66591_PIPE_CFGWND);
|
||||||
|
|
|
||||||
|
|
@ -788,13 +788,12 @@ Lyre prototype 1*/
|
||||||
/* Define the implemented USB transport classes */
|
/* Define the implemented USB transport classes */
|
||||||
#if CONFIG_USBOTG == USBOTG_ISP1583
|
#if CONFIG_USBOTG == USBOTG_ISP1583
|
||||||
#define USB_HAS_BULK
|
#define USB_HAS_BULK
|
||||||
#elif CONFIG_USBOTG == USBOTG_ARC
|
#elif (CONFIG_USBOTG == USBOTG_ARC) || \
|
||||||
|
(CONFIG_USBOTG == USBOTG_JZ4740) || \
|
||||||
|
(CONFIG_USBOTG == USBOTG_M66591)
|
||||||
#define USB_HAS_BULK
|
#define USB_HAS_BULK
|
||||||
#define USB_HAS_INTERRUPT
|
#define USB_HAS_INTERRUPT
|
||||||
#elif CONFIG_USBOTG == USBOTG_JZ4740
|
#elif defined(CPU_TCC780X) || defined(CPU_TCC77X)
|
||||||
#define USB_HAS_BULK
|
|
||||||
#define USB_HAS_INTERRUPT
|
|
||||||
#elif defined(CPU_TCC780X) || defined(CPU_TCC77X) || defined(MROBE_500)
|
|
||||||
#define USB_HAS_BULK
|
#define USB_HAS_BULK
|
||||||
#endif /* CONFIG_USBOTG */
|
#endif /* CONFIG_USBOTG */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue