mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-16 07:27:09 -04:00
Merge branch 'master' of git://git.denx.de/u-boot-usb
This commit is contained in:
commit
952a6bdd77
@ -878,7 +878,6 @@ static int usb_inquiry(ccb *srb, struct us_data *ss)
|
|||||||
do {
|
do {
|
||||||
memset(&srb->cmd[0], 0, 12);
|
memset(&srb->cmd[0], 0, 12);
|
||||||
srb->cmd[0] = SCSI_INQUIRY;
|
srb->cmd[0] = SCSI_INQUIRY;
|
||||||
srb->cmd[1] = srb->lun<<5;
|
|
||||||
srb->cmd[4] = 36;
|
srb->cmd[4] = 36;
|
||||||
srb->datalen = 36;
|
srb->datalen = 36;
|
||||||
srb->cmdlen = 12;
|
srb->cmdlen = 12;
|
||||||
@ -902,7 +901,6 @@ static int usb_request_sense(ccb *srb, struct us_data *ss)
|
|||||||
ptr = (char *)srb->pdata;
|
ptr = (char *)srb->pdata;
|
||||||
memset(&srb->cmd[0], 0, 12);
|
memset(&srb->cmd[0], 0, 12);
|
||||||
srb->cmd[0] = SCSI_REQ_SENSE;
|
srb->cmd[0] = SCSI_REQ_SENSE;
|
||||||
srb->cmd[1] = srb->lun << 5;
|
|
||||||
srb->cmd[4] = 18;
|
srb->cmd[4] = 18;
|
||||||
srb->datalen = 18;
|
srb->datalen = 18;
|
||||||
srb->pdata = &srb->sense_buf[0];
|
srb->pdata = &srb->sense_buf[0];
|
||||||
@ -922,7 +920,6 @@ static int usb_test_unit_ready(ccb *srb, struct us_data *ss)
|
|||||||
do {
|
do {
|
||||||
memset(&srb->cmd[0], 0, 12);
|
memset(&srb->cmd[0], 0, 12);
|
||||||
srb->cmd[0] = SCSI_TST_U_RDY;
|
srb->cmd[0] = SCSI_TST_U_RDY;
|
||||||
srb->cmd[1] = srb->lun << 5;
|
|
||||||
srb->datalen = 0;
|
srb->datalen = 0;
|
||||||
srb->cmdlen = 12;
|
srb->cmdlen = 12;
|
||||||
if (ss->transport(srb, ss) == USB_STOR_TRANSPORT_GOOD)
|
if (ss->transport(srb, ss) == USB_STOR_TRANSPORT_GOOD)
|
||||||
@ -942,7 +939,6 @@ static int usb_read_capacity(ccb *srb, struct us_data *ss)
|
|||||||
do {
|
do {
|
||||||
memset(&srb->cmd[0], 0, 12);
|
memset(&srb->cmd[0], 0, 12);
|
||||||
srb->cmd[0] = SCSI_RD_CAPAC;
|
srb->cmd[0] = SCSI_RD_CAPAC;
|
||||||
srb->cmd[1] = srb->lun << 5;
|
|
||||||
srb->datalen = 8;
|
srb->datalen = 8;
|
||||||
srb->cmdlen = 12;
|
srb->cmdlen = 12;
|
||||||
if (ss->transport(srb, ss) == USB_STOR_TRANSPORT_GOOD)
|
if (ss->transport(srb, ss) == USB_STOR_TRANSPORT_GOOD)
|
||||||
@ -957,7 +953,6 @@ static int usb_read_10(ccb *srb, struct us_data *ss, unsigned long start,
|
|||||||
{
|
{
|
||||||
memset(&srb->cmd[0], 0, 12);
|
memset(&srb->cmd[0], 0, 12);
|
||||||
srb->cmd[0] = SCSI_READ10;
|
srb->cmd[0] = SCSI_READ10;
|
||||||
srb->cmd[1] = srb->lun << 5;
|
|
||||||
srb->cmd[2] = ((unsigned char) (start >> 24)) & 0xff;
|
srb->cmd[2] = ((unsigned char) (start >> 24)) & 0xff;
|
||||||
srb->cmd[3] = ((unsigned char) (start >> 16)) & 0xff;
|
srb->cmd[3] = ((unsigned char) (start >> 16)) & 0xff;
|
||||||
srb->cmd[4] = ((unsigned char) (start >> 8)) & 0xff;
|
srb->cmd[4] = ((unsigned char) (start >> 8)) & 0xff;
|
||||||
|
@ -150,8 +150,7 @@ struct acm_config_desc {
|
|||||||
|
|
||||||
/* Slave Interface */
|
/* Slave Interface */
|
||||||
struct usb_interface_descriptor data_class_interface;
|
struct usb_interface_descriptor data_class_interface;
|
||||||
struct usb_endpoint_descriptor
|
struct usb_endpoint_descriptor data_endpoints[NUM_ENDPOINTS-1];
|
||||||
data_endpoints[NUM_ENDPOINTS-1] __attribute__((packed));
|
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
static struct acm_config_desc acm_configuration_descriptors[NUM_CONFIGS] = {
|
static struct acm_config_desc acm_configuration_descriptors[NUM_CONFIGS] = {
|
||||||
@ -280,10 +279,8 @@ static struct rs232_emu rs232_desc={
|
|||||||
struct gserial_config_desc {
|
struct gserial_config_desc {
|
||||||
|
|
||||||
struct usb_configuration_descriptor configuration_desc;
|
struct usb_configuration_descriptor configuration_desc;
|
||||||
struct usb_interface_descriptor
|
struct usb_interface_descriptor interface_desc[NUM_GSERIAL_INTERFACES];
|
||||||
interface_desc[NUM_GSERIAL_INTERFACES] __attribute__((packed));
|
struct usb_endpoint_descriptor data_endpoints[NUM_ENDPOINTS];
|
||||||
struct usb_endpoint_descriptor
|
|
||||||
data_endpoints[NUM_ENDPOINTS] __attribute__((packed));
|
|
||||||
|
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
@ -433,6 +430,9 @@ int usbtty_getc (void)
|
|||||||
*/
|
*/
|
||||||
void usbtty_putc (const char c)
|
void usbtty_putc (const char c)
|
||||||
{
|
{
|
||||||
|
if (!usbtty_configured ())
|
||||||
|
return;
|
||||||
|
|
||||||
buf_push (&usbtty_output, &c, 1);
|
buf_push (&usbtty_output, &c, 1);
|
||||||
/* If \n, also do \r */
|
/* If \n, also do \r */
|
||||||
if (c == '\n')
|
if (c == '\n')
|
||||||
@ -486,8 +486,12 @@ static void __usbtty_puts (const char *str, int len)
|
|||||||
void usbtty_puts (const char *str)
|
void usbtty_puts (const char *str)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
int len = strlen (str);
|
int len;
|
||||||
|
|
||||||
|
if (!usbtty_configured ())
|
||||||
|
return;
|
||||||
|
|
||||||
|
len = strlen (str);
|
||||||
/* add '\r' for each '\n' */
|
/* add '\r' for each '\n' */
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
n = next_nl_pos (str);
|
n = next_nl_pos (str);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user