mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
usb-s3c6400: use more complete functions from usb-drv-as3525v2
update copyright git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31508 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
18bee1bafb
commit
fd5cb720c4
2 changed files with 25 additions and 34 deletions
|
|
@ -366,23 +366,6 @@ void INT_USB(void)
|
|||
GINTSTS = sts;
|
||||
}
|
||||
|
||||
int usb_drv_port_speed(void)
|
||||
{
|
||||
static const uint8_t speed[4] = {
|
||||
[DSTS_ENUMSPD_HS_PHY_30MHZ_OR_60MHZ] = 1,
|
||||
[DSTS_ENUMSPD_FS_PHY_30MHZ_OR_60MHZ] = 0,
|
||||
[DSTS_ENUMSPD_FS_PHY_48MHZ] = 0,
|
||||
[DSTS_ENUMSPD_LS_PHY_6MHZ] = 0,
|
||||
};
|
||||
|
||||
unsigned enumspd = extract(DSTS, enumspd);
|
||||
|
||||
if(enumspd == DSTS_ENUMSPD_LS_PHY_6MHZ)
|
||||
panicf("usb-drv: LS is not supported");
|
||||
|
||||
return speed[enumspd & 3];
|
||||
}
|
||||
|
||||
int usb_drv_request_endpoint(int type, int dir)
|
||||
{
|
||||
bool out = dir == USB_DIR_OUT;
|
||||
|
|
@ -456,10 +439,3 @@ int usb_drv_send(int ep, void *ptr, int len)
|
|||
semaphore_wait(&endpoint->complete, TIMEOUT_BLOCK);
|
||||
return endpoint->status;
|
||||
}
|
||||
|
||||
void usb_drv_set_test_mode(int mode)
|
||||
{
|
||||
/* there is a perfect matching between usb test mode code
|
||||
* and the register field value */
|
||||
DCTL = (DCTL & ~bitm(DCTL, tstctl)) | (mode << DCTL_tstctl_bitp);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue