Nokia RX-51: Fix USB TTY console and enable it
Subsystems (7)
cover Nokia RX-51: Fix USB TTY console and enable it
This series contain resensed patches from two patch series:
* Nokia RX-51: Fix USB TTY console and enable it
* usbtty/musb: Fix file transfers
They are rebased on top of master branch.
This patch series fix usbtty code (serial console via USB peripheral mode), fix underlying musb peripheral code, fix compilation of CONFIG_USB_DEVICE (used by usbtty), remove unused Nokia RX-51 code to decrease size of U-Boot binary and finally enable usbtty serial console for Nokia RX-51.
With this patch series debugging of Nokia RX-51 can be done also via USB serial console.
It fixes also stability of musb code and allows usage of file transfers via Kermit protocol on Nokia RX-51. Kermit file transfer via U-Boot loadb command is stable on Nokia N900 and gives about 52kB/s transfer rate.
On computer this serial console is accessible via /dev/ttyACM0 device.
Pali Roh?r (16):
serial: usbtty: Fix puts function
serial: usbtty: Send urb data in correct order
usb: musb: Fix compilation of gadget code
usb: musb: Always clear the data toggle bit when configuring ep
usb: musb: Fix configuring FIFO for endpoints
usb: musb: Read value of PERI_RXCSR to 16bit variable
usb: musb: Fix transmission of bigger buffers
usb: musb: Fix receiving of bigger buffers
usb: musb: Fix handling interrupts for EP0 and SET ADDRESS commmand
usb: musb: Ensure that we set musb dynamic FIFO buffer for every
endpoint
usb: gadget: Use dbg_ep0() macro instead of serial_printf()
arm: omap3: Compile lowlevel_init() function only when it is used
arm: omap3: Compile s_init() function only when it is used Nokia RX-51: Remove function set_muxconf_regs()
Nokia RX-51: Move content of rx51.h to rx51.c
Nokia RX-51: Enable usbtty serial console by default
Makefile | 1 + arch/arm/mach-omap2/omap3/board.c | 3 + arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +- board/nokia/rx51/rx51.c | 28 +- board/nokia/rx51/rx51.h | 377 ---------------------- configs/nokia_rx51_defconfig | 7 +- doc/README.nokia_rx51 | 15 +- drivers/serial/usbtty.c | 16 +- drivers/usb/gadget/ep0.c | 16 +- drivers/usb/musb/musb_core.c | 12 +- drivers/usb/musb/musb_udc.c | 61 ++-- include/configs/nokia_rx51.h | 21 +- 12 files changed, 82 insertions(+), 481 deletions(-) delete mode 100644 board/nokia/rx51/rx51.h
Signature · 1 line
2.20.1
PATCH RESEND 1/16 serial: usbtty: Fix puts function
This function has incorrect implementation of prepending CR prior LF. Without this patch it prepended CR prior whole string which is going to be written and let LF without leading CR. Fix this issue by inserting CR at correct place to make output on usbtty serial console more readable.
--- drivers/serial/usbtty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/serial/usbtty.c +2 -2
@@ -500,8 +500,8 @@ void usbtty_puts(struct stdio_dev *dev, const char *str) n =next_nl_pos (str);if (str[n] =='\n' ) { -__usbtty_puts ("\r" ,1 ); -__usbtty_puts (str, n +1 ); +__usbtty_puts (str, n); +__usbtty_puts ("\r\n" ,2 ); str += (n +1 ); len -= (n +1 ); }else {
Signature · 1 line
2.20.1
PATCH RESEND 2/16 serial: usbtty: Send urb data in correct order
In reply to Pali RohárFunction next_urb() selects the last urb data buffer from linked list to which next data from usbtty puts should be appended.
But to check if TX data still exists it is needed to look at the first urb data buffer from linked list. So check for endpoint->tx_urb (first from the linked list) instead of current_urb (the last from the linked list).
Successful call to udc_endpoint_write() may invalidate active urb and allocate new in queue which invalidate pointer returned by next_urb() function.
So call next_urb() prior putting data into urb buffer and call it every time after using udc_endpoint_write() function to prevent sending data from usbtty puts in incorrect order.
This patch fixes issue that usbtty code does not transmit data when they are waiting in the tx queue.
--- drivers/serial/usbtty.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
drivers/serial/usbtty.c +3 -9
@@ -849,17 +849,9 @@ static int write_buffer (circbuf_t * buf) &endpoint_instance[tx_endpoint];struct urb *current_urb =NULL ; - current_urb =next_urb (device_instance, endpoint); - -if (!current_urb) { -TTYERR ("current_urb is NULL, buf->size %d\n" , - buf->size); -return 0 ; - } -/* TX data still exists - send it now */ -if (endpoint->sent < current_urb->actual_length){ +if (endpoint->sent < endpoint->tx_urb->actual_length){if (udc_endpoint_write (endpoint)){/* Write pre-empted by RX */ return -1 ;
@@ -878,6 +870,8 @@ static int write_buffer (circbuf_t * buf)*/ while (buf->size >0 ) { + current_urb =next_urb (device_instance, endpoint); + dest = (char *)current_urb->buffer + current_urb->actual_length;
Signature · 1 line
2.20.1
PATCH RESEND 3/16 usb: musb: Fix compilation of gadget code
In reply to Pali Rohármusb udc code depends on usb gadget code provided by CONFIG_USB_DEVICE and defined in drivers/usb/gadget/Makefile. But this Makefile is not included into U-Boot build when CONFIG_USB_GADGET is not set. As CONFIG_USB_DEVICE cannot be enabled together with CONFIG_USB_GADGET it means that dependency for musb udc code is not compiled during build. Fix it by including drivers/usb/gadget dependency also when CONFIG_USB_DEVICE is set.
This patch fixes compile errors:
arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `musb_peri_ep0_rx':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `ep0_recv_setup'
arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `musb_peri_ep0_idle':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `ep0_recv_setup'
arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `musb_peri_ep0_zero_data_request':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq'
arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `musb_peri_ep0_idle':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `ep0_recv_setup'
arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `musb_peri_ep0_rx':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_rcv_complete'
arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `musb_peri_rx_ep':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_rcv_complete'
arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `udc_endpoint_write':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_tx_complete'
arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `udc_irq':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq'
arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to usbd_device_event_irq' arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to usbd_device_event_irq' arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to usbd_device_event_irq' arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to usbd_device_event_irq' arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o:u-boot/drivers/usb/musb/musb_udc.c: more undefined references to usbd_device_event_irq' follow arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function udc_setup_ep':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_alloc_urb'
arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `udc_startup_events':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq'
arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to usbd_device_event_irq' arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to usbd_device_event_irq'
make: *** [Makefile:1762: u-boot] Error 1
--- Makefile | 1 + 1 file changed, 1 insertion(+)
Makefile +1 -0
@@ -792,6 +792,7 @@ libs-y += drivers/usb/dwc3/ libs-y += drivers/usb/common/ libs-y += drivers/usb/emul/ libs-y += drivers/usb/eth/ +libs-$(CONFIG_USB_DEVICE) += drivers/usb/gadget/ libs-$(CONFIG_USB_GADGET) += drivers/usb/gadget/ libs-$(CONFIG_USB_GADGET) += drivers/usb/gadget/udc/ libs-y += drivers/usb/host/
Signature · 1 line
2.20.1
PATCH RESEND 4/16 usb: musb: Always clear the data toggle bit when configuring ep
In reply to Pali RohárWithout this patch it was done only when U-Boot was compiled with MUSB Host Controller. But it is needed also for MUSB Device Controller, otherwise Device Controller does not work.
--- drivers/usb/musb/musb_core.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/usb/musb/musb_core.c +0 -4
@@ -81,10 +81,8 @@ void musb_configure_ep(const struct musb_epinfo *epinfo, u8 cnt)config_fifo (tx, idx, fifoaddr); csr =readw (&musbr->txcsr); -#if defined(CONFIG_USB_MUSB_HCD )/* clear the data toggle bit */ writew (csr |MUSB_TXCSR_CLRDATATOG , &musbr->txcsr); -#endif /* Flush fifo if required */ if (csr &MUSB_TXCSR_TXPKTRDY ) writew(csr | MUSB_TXCSR_FLUSHFIFO,
@@ -94,10 +92,8 @@ void musb_configure_ep(const struct musb_epinfo *epinfo, u8 cnt)config_fifo (rx, idx, fifoaddr); csr =readw (&musbr->rxcsr); -#if defined(CONFIG_USB_MUSB_HCD )/* clear the data toggle bit */ writew (csr |MUSB_RXCSR_CLRDATATOG , &musbr->rxcsr); -#endif /* Flush fifo if required */ if (csr &MUSB_RXCSR_RXPKTRDY ) writew(csr | MUSB_RXCSR_FLUSHFIFO,
Signature · 1 line
2.20.1
PATCH RESEND 5/16 usb: musb: Fix configuring FIFO for endpoints
In reply to Pali RohárThis patch fixes configuring FIFO for one-directional endpoints which have either RX or TX queue and therefore only one FIFO.
Size of FIFO buffer is 2^(idx+3) bytes and starting address is 2^(addr+3). Moreover first 64 bytes are reserved for EP0.
Without this patch if FIFO size specified by caller was zero then idx was incorrectly calculated (expr. ffs(0)-1) and size overflowed in fifosz register. This register uses has only 4 bits for FIFO size. Moreover specifying zero size is not possible.
This patch is fixing calculation of start address and buffer size to minimal value and ensure that it would not overlap with reserved EP0 buffer.
This issue caused loose of packets on USB bus in both directions and basically usbtty was unusable.
---
Changes in v2:
* Correctly calculate minimal buffer size
* Store into fifoaddr address in musb units (8 bytes)
--- drivers/usb/musb/musb_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/usb/musb/musb_core.c +4 -4
@@ -50,7 +50,7 @@ void musb_start(void)# define config_fifo (dir, idx, addr) \ do { \ writeb(idx, &musbr->dir##fifosz); \ - writew(fifoaddr >> 3, &musbr->dir##fifoadd); \ + writew(addr, &musbr->dir##fifoadd); \ } while (0)#endif
@@ -66,14 +66,14 @@ void musb_start(void)void musb_configure_ep (const struct musb_epinfo *epinfo,u8 cnt) {u16 csr; -u16 fifoaddr =64 ;/* First 64 bytes of FIFO reserved for EP0 */ +u16 fifoaddr =64 >>3 ;/* First 64 bytes of FIFO reserved for EP0 */ u32 fifosize;u8 idx;while (cnt--) {/* prepare fifosize to write to register */ fifosize = epinfo->epsize >>3 ; - idx =ffs (fifosize) -1 ; + idx = fifosize ? ((ffs (fifosize) -1 ) &0xF ) :0 ;writeb (epinfo->epnum, &musbr->index);if (epinfo->epdir) {
@@ -99,7 +99,7 @@ void musb_configure_ep(const struct musb_epinfo *epinfo, u8 cnt)writew (csr |MUSB_RXCSR_FLUSHFIFO , &musbr->rxcsr); } - fifoaddr += epinfo->epsize; + fifoaddr +=1 << idx; epinfo++; } }
Signature · 1 line
2.20.1
PATCH RESEND 6/16 usb: musb: Read value of PERI_RXCSR to 16bit variable
In reply to Pali RohárPERI_RXCSR is 16bit register so store its value into 16bit local variable.
--- drivers/usb/musb/musb_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/musb/musb_udc.c +1 -1
@@ -629,7 +629,7 @@ static void musb_peri_ep0(void)static void musb_peri_rx_ep (unsigned int ep) {u16 peri_rxcount; -u8 peri_rxcsr =readw (&musbr->ep[ep].epN.rxcsr); +u16 peri_rxcsr =readw (&musbr->ep[ep].epN.rxcsr);if (!(peri_rxcsr &MUSB_RXCSR_RXPKTRDY )) {if (debug_level >0 )
Signature · 1 line
2.20.1
PATCH RESEND 7/16 usb: musb: Fix transmission of bigger buffers
In reply to Pali RohárIf udc_endpoint_write() was called with bigger payload which does not fit into one USB packet it needs to be transmitted in more USB packets. First packet is transmitted by udc_endpoint_write() call itself and other packets are put into waiting queue.
Implement function musb_peri_tx() which transmit checks when endpoints are ready and continue transmitting of waiting queue.
This patch fixes sending e.g. output of printenv command over usbtty serial console.
--- drivers/usb/musb/musb_udc.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-)
drivers/usb/musb/musb_udc.c +6 -11
@@ -708,21 +708,16 @@ static void musb_peri_rx(u16 intr)static void musb_peri_tx (u16 intr) { +unsigned int ep; +/* Check for EP0 */ if (0x01 & intr)musb_peri_ep0_tx (); -/* -* Use this in the future when handling epN tx -* -* u8 ep; -* -* for (ep = 1; ep < 16; ep++) { -* if ((1 << ep) & intr) { -* / * handle tx for this endpoint * / -* } -* } -*/ +for (ep =1 ; ep <16 ; ep++) { +if ((1 << ep) & intr) +udc_endpoint_write (GET_ENDPOINT (udc_device, ep)); + } }void udc_irq (void )
Signature · 1 line
2.20.1
PATCH RESEND 8/16 usb: musb: Fix receiving of bigger buffers
In reply to Pali RohárIf musb_peri_rx_ep() was called to processed received HW buffer but U-Boot cannot read it yet (e.g. because U-Boot SW buffer is full) then interrupt was marked as processed but HW buffer stayed unprocessed.
U-Boot tried to process this buffer again when it receive interrupt again, but it can receive it only when sender (host) send a new data. As sender (host) is not going to send a new data until U-Boot process current data this issue caused a deadlock in case sender (host) is emitting data faster than U-Boot can process it.
Reading musb intrrx register automatically clears this register and mark interrupt as processed. So to prevent marking interrupt in U-Boot as processed and a new variable pending_intrrx which would contain unprocessed bits of intrrx register.
And as a second step, every time when musb_peri_rx_ep() is called and there are waiting data to be processed (signaled by MUSB_RXCSR_RXPKTRDY) either acknowledge sender (via musb_peri_rx_ack()) that whole HW buffer was processed or set corresponding bit in pending_intrrx that HW buffer was not fully processed yet and next iteration is required after U-Boot allocate space for reading HW buffer.
This patch fixes receiving large usb buffers, e.g. file transfer via Kermit protocol implemented by 'loadb' U-Boot command over usbtty serial console.
--- drivers/usb/musb/musb_udc.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
drivers/usb/musb/musb_udc.c +15 -1
@@ -104,6 +104,8 @@ struct usb_endpoint_instance *ep0_endpoint;static struct usb_device_instance *udc_device;static int enabled; +u16 pending_intrrx; +#ifdef MUSB_DEBUG static void musb_db_regs (void ) {
@@ -664,7 +666,10 @@ static void musb_peri_rx_ep(unsigned int ep)/* The common musb fifo reader */ read_fifo (ep, length, data); -musb_peri_rx_ack (ep); +if (length == peri_rxcount) +musb_peri_rx_ack (ep); +else + pending_intrrx |= (1 << ep);/* * urb's actual_length is updated in
@@ -677,18 +682,24 @@ static void musb_peri_rx_ep(unsigned int ep)serial_printf ("ERROR : %s %d no space " "in rcv buffer\n" , __PRETTY_FUNCTION__, ep); + + pending_intrrx |= (1 << ep); } }else {if (debug_level >0 )serial_printf ("ERROR : %s %d problem with " "endpoint\n" , __PRETTY_FUNCTION__, ep); + + pending_intrrx |= (1 << ep); } }else {if (debug_level >0 )serial_printf ("ERROR : %s %d with nothing to do\n" , __PRETTY_FUNCTION__, ep); + +musb_peri_rx_ack (ep); } }
@@ -770,6 +781,9 @@ void udc_irq(void) intrrx =readw (&musbr->intrrx); intrtx =readw (&musbr->intrtx); + intrrx |= pending_intrrx; + pending_intrrx =0 ; +if (intrrx)musb_peri_rx (intrrx);
Signature · 1 line
2.20.1
PATCH RESEND 9/16 usb: musb: Fix handling interrupts for EP0 and SET ADDRESS commmand
In reply to Pali RohárInterrupt for EP0 is indicated in intrtx register via first bit. It is set for both RX and TX. First bit in intrrx register is reserved and not set.
So remove calling musb_peri_ep0() function at every iteration of udc_irq() and musb_peri_rx() and call it only from musb_peri_tx() when correct interrupt bit in initrtx it set.
Address from SET ADDRESS command must be set to faddr register only after acknowledging SERV_RXPKTRDY followed by received EP0 interrupt. So prior calling musb_peri_ep0_set_address() check for EP0 interrupt instead of (incorrect) MUSB_INTR_SOF interrupt.
This patch fixes issue that host (computer) cannot register U-Boot USB device and failing with errors:
usb 1-1: new full-speed USB device number 86 using xhci_hcd usb 1-1: Device not responding to setup address. usb 1-1: Device not responding to setup address. usb 1-1: device not accepting address 86, error -71
U-Boot was writing address to faddr register too early and did not wait for correct interrupt after which should update address.
--- drivers/usb/musb/musb_udc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
drivers/usb/musb/musb_udc.c +4 -8
@@ -707,9 +707,7 @@ static void musb_peri_rx(u16 intr) {unsigned int ep; -/* Check for EP0 */ -if (0x01 & intr) -musb_peri_ep0 (); +/* First bit is reserved and does not indicate interrupt for EP0 */ for (ep =1 ; ep <16 ; ep++) {if ((1 << ep) & intr)
@@ -721,9 +719,9 @@ static void musb_peri_tx(u16 intr) {unsigned int ep; -/* Check for EP0 */ +/* Check for EP0: first bit indicates interrupt for both RX and TX */ if (0x01 & intr) -musb_peri_ep0_tx (); +musb_peri_ep0 ();for (ep =1 ; ep <16 ; ep++) {if ((1 << ep) & intr)
@@ -750,8 +748,6 @@ void udc_irq(void)musb_peri_resume (); } -musb_peri_ep0 (); -if (MUSB_INTR_RESET & intrusb) {usbd_device_event_irq (udc_device,DEVICE_RESET ,0 );musb_peri_reset ();
@@ -790,7 +786,7 @@ void udc_irq(void)if (intrtx)musb_peri_tx (intrtx); }else { -if (MUSB_INTR_SOF & intrusb) { +if (readw (&musbr->intrtx) &0x1 ) {u8 faddr; faddr =readb (&musbr->faddr);/*
Signature · 1 line
2.20.1
PATCH RESEND 10/16 usb: musb: Ensure that we set musb dynamic FIFO buffer for every endpoint
In reply to Pali RohárIf we do not set FIFO buffer address and size for some endpoint which is in use then default address 0x0 would be used which is in conflict with FIFO buffer for endpoint 0 which is at fixed address 0x0. Sharing address space between more endpoint cause data loss and unexpected errors.
This patch is fixing transmission of characters over usbtty serial console and allow using of usbtty for debugging purposes on Nokia N900.
--- drivers/usb/musb/musb_udc.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)
drivers/usb/musb/musb_udc.c +2 -12
@@ -875,18 +875,8 @@ void udc_setup_ep(struct usb_device_instance *device, unsigned int id, ep0_endpoint->endpoint_address =0xff ; ep0_urb =usbd_alloc_urb (device, endpoint); }else if (MAX_ENDPOINT >= id) { -int ep_addr; - -/* Check the direction */ - ep_addr = endpoint->endpoint_address; -if (USB_DIR_IN == (ep_addr &USB_ENDPOINT_DIR_MASK )) { -/* IN */ - epinfo[(id *2 ) +1 ].epsize = endpoint->tx_packetSize; - }else { -/* OUT */ - epinfo[id *2 ].epsize = endpoint->rcv_packetSize; - } - + epinfo[(id *2 ) +0 ].epsize = endpoint->rcv_packetSize; + epinfo[(id *2 ) +1 ].epsize = endpoint->tx_packetSize;musb_configure_ep (&epinfo[0 ],ARRAY_SIZE (epinfo)); }else {if (debug_level >0 )
Signature · 1 line
2.20.1
PATCH RESEND 11/16 usb: gadget: Use dbg_ep0() macro instead of serial_printf()
In reply to Pali RohárAll debug messages from ep0.c except a few are printed by dbg_ep0() macro. So for remaining few exception use also dbg_ep0() instead of serial_printf().
--- drivers/usb/gadget/ep0.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/usb/gadget/ep0.c +8 -8
@@ -294,7 +294,7 @@ static int ep0_get_descriptor (struct usb_device_instance *device, {struct usb_string_descriptor *string_descriptor;if (!(string_descriptor =usbd_get_string (index))) { -serial_printf ("Invalid string index %d\n" , index); +dbg_ep0 (0 ,"Invalid string index %d\n" , index);return -1 ; }dbg_ep0 (3 ,"string_descriptor: %p length %d" , string_descriptor, string_descriptor->bLength);
@@ -302,14 +302,14 @@ static int ep0_get_descriptor (struct usb_device_instance *device, }break ;case USB_DESCRIPTOR_TYPE_INTERFACE : -serial_printf ("USB_DESCRIPTOR_TYPE_INTERFACE - error not implemented\n" ); +dbg_ep0 (2 ,"USB_DESCRIPTOR_TYPE_INTERFACE - error not implemented\n" );return -1 ;case USB_DESCRIPTOR_TYPE_ENDPOINT : -serial_printf ("USB_DESCRIPTOR_TYPE_ENDPOINT - error not implemented\n" ); +dbg_ep0 (2 ,"USB_DESCRIPTOR_TYPE_ENDPOINT - error not implemented\n" );return -1 ;case USB_DESCRIPTOR_TYPE_HID : { -serial_printf ("USB_DESCRIPTOR_TYPE_HID - error not implemented\n" ); +dbg_ep0 (2 ,"USB_DESCRIPTOR_TYPE_HID - error not implemented\n" );return -1 ;/* unsupported at this time */ #if 0 int bNumInterface =
@@ -338,7 +338,7 @@ static int ep0_get_descriptor (struct usb_device_instance *device,break ;case USB_DESCRIPTOR_TYPE_REPORT : { -serial_printf ("USB_DESCRIPTOR_TYPE_REPORT - error not implemented\n" ); +dbg_ep0 (2 ,"USB_DESCRIPTOR_TYPE_REPORT - error not implemented\n" );return -1 ;/* unsupported at this time */ #if 0 int bNumInterface =
@@ -531,7 +531,7 @@ int ep0_recv_setup (struct urb *urb) le16_to_cpu (request->wValue) & 0xff);case USB_REQ_GET_CONFIGURATION : -serial_printf ("get config %d\n" , device->configuration); +dbg_ep0 (2 ,"get config %d\n" , device->configuration);return ep0_get_one (device, urb, device->configuration);
@@ -621,14 +621,14 @@ int ep0_recv_setup (struct urb *urb) device->interface = device->alternate =0 ;/*dbg_ep0(2, "set configuration: %d", device->configuration); */ -/*serial_printf("DEVICE_CONFIGURED.. event?\n"); */ +/*dbg_ep0(2, "DEVICE_CONFIGURED.. event?\n"); */ return 0 ;case USB_REQ_SET_INTERFACE : device->interface =le16_to_cpu (request->wIndex); device->alternate =le16_to_cpu (request->wValue);/*dbg_ep0(2, "set interface: %d alternate: %d", device->interface, device->alternate); */ -serial_printf ("DEVICE_SET_INTERFACE.. event?\n" ); +dbg_ep0 (2 ,"DEVICE_SET_INTERFACE.. event?\n" );return 0 ;case USB_REQ_GET_STATUS :
Signature · 1 line
2.20.1
PATCH RESEND 12/16 arm: omap3: Compile lowlevel_init() function only when it is used
In reply to Pali RohárFunction lowlevel_init() is called only from cpu_init_crit() and this function is wrapped into #if .. #endif section. So compile also lowlevel_init() function under same #if condition.
--- arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/omap3/lowlevel_init.S +5 -1
@@ -45,7 +45,7 @@ ENDPROC(do_omap3_emu_romcode_call) ENTRY(cpy_clk_code) /* Copy DPLL code into SRAM */ adr r0, go_to_speed /* copy from start of go_to_speed... */ - adr r2, lowlevel_init /* ... up to start of low_level_init */ + adr r2, go_to_speed_end /* ... up to start of go_to_speed_end */ next2: ldmia r0!, {r3 - r10} /* copy from source address [r0] */ stmia r1!, {r3 - r10} /* copy to target address [r1] */
@@ -167,8 +167,11 @@ pll_div_add5: pll_div_val5: .word CLSEL1_EMU_VAL +go_to_speed_end: #endif +#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && \ + !defined(CONFIG_SKIP_LOWLEVEL_INIT_ONLY) ENTRY(lowlevel_init) ldr sp, SRAM_STACK str ip, [sp] /* stash ip register */
@@ -187,6 +190,7 @@ ENTRY(lowlevel_init) b s_init ENDPROC(lowlevel_init) +#endif /* the literal pools origin */ .ltorg
Signature · 1 line
2.20.1
PATCH RESEND 13/16 arm: omap3: Compile s_init() function only when it is used
In reply to Pali RohárFunction s_init() is called only from lowlevel_init(). So compile it only when function lowlevel_init() is compiled.
--- arch/arm/mach-omap2/omap3/board.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-omap2/omap3/board.c +3 -0
@@ -179,6 +179,8 @@ void early_system_init(void)hw_data_init (); } +#if !defined(CONFIG_SKIP_LOWLEVEL_INIT ) && \ + !defined(CONFIG_SKIP_LOWLEVEL_INIT_ONLY )/****************************************************************************** * Routine: s_init * Description: Does early system init of muxing and clocks.
@@ -207,6 +209,7 @@ void s_init(void)ehci_clocks_enable (); #endif } +#endif #ifdef CONFIG_SPL_BUILD void board_init_f (ulong dummy)
Signature · 1 line
2.20.1
PATCH RESEND 14/16 Nokia RX-51: Remove function set_muxconf_regs()
In reply to Pali RohárThis function is not used and was never called.
This board contains '#define CONFIG_SKIP_LOWLEVEL_INIT' because X-Loader set everything up, including MUX configuration.
Also this MUX configuration is incorrect and does not match hardware.
So remove this dead, unused and broken code.
This change will decrease size of U-Boot binary.
--- board/nokia/rx51/rx51.c | 11 -- board/nokia/rx51/rx51.h | 346 ---------------------------------------- 2 files changed, 357 deletions(-)
board/nokia/rx51/rx51.c +0 -11
@@ -467,17 +467,6 @@ int misc_init_r(void)return 0 ; } -/* -* Routine: set_muxconf_regs -* Description: Setting up the configuration Mux registers specific to the -* hardware. Many pins need to be moved from protect to primary -* mode. -*/ -void set_muxconf_regs (void ) -{ -MUX_RX51 (); -} -static unsigned long int twl_wd_time;/* last time of watchdog reset */ static unsigned long int twl_i2c_lock;
board/nokia/rx51/rx51.h +0 -346
352 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH RESEND 15/16 Nokia RX-51: Move content of rx51.h to rx51.c
In reply to Pali RohárAfter removal of MUX configuration there is no need to have extra rx51.h.
--- board/nokia/rx51/rx51.c | 17 ++++++++++++++++- board/nokia/rx51/rx51.h | 31 ------------------------------- 2 files changed, 16 insertions(+), 32 deletions(-) delete mode 100644 board/nokia/rx51/rx51.h
board/nokia/rx51/rx51.c +16 -1
@@ -39,9 +39,24 @@#include <asm/arch/sys_proto.h> #include <asm/arch/mmc_host_def.h> -#include "rx51.h" #include "tag_omap.h" +/* Needed for ROM SMC call */ +struct emu_hal_params_rx51 { +u32 num_params; +u32 param1; +u32 param2; +u32 param3; +u32 param4; +}; + +#define ONENAND_GPMC_CONFIG1_RX51 0xfb001202 +#define ONENAND_GPMC_CONFIG2_RX51 0x00111100 +#define ONENAND_GPMC_CONFIG3_RX51 0x00020200 +#define ONENAND_GPMC_CONFIG4_RX51 0x11001102 +#define ONENAND_GPMC_CONFIG5_RX51 0x03101616 +#define ONENAND_GPMC_CONFIG6_RX51 0x90060000 +DECLARE_GLOBAL_DATA_PTR ;GraphicDevice gdev;
board/nokia/rx51/rx51.h deleted +0 -31
@@ -1,31 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* -* (C) Copyright 2012 -* ?????? ???????? <[email protected]> -* -* (C) Copyright 2011-2012 -* Pali Roh?r <[email protected]> -* -* (C) Copyright 2008 -* Dirk Behme <[email protected]> -*/ -#ifndef _RX51_H_ -#define _RX51_H_ - -/* Needed for ROM SMC call */ -struct emu_hal_params_rx51 { -u32 num_params; -u32 param1; -u32 param2; -u32 param3; -u32 param4; -}; - -#define ONENAND_GPMC_CONFIG1_RX51 0xfb001202 -#define ONENAND_GPMC_CONFIG2_RX51 0x00111100 -#define ONENAND_GPMC_CONFIG3_RX51 0x00020200 -#define ONENAND_GPMC_CONFIG4_RX51 0x11001102 -#define ONENAND_GPMC_CONFIG5_RX51 0x03101616 -#define ONENAND_GPMC_CONFIG6_RX51 0x90060000 - -#endif
Signature · 1 line
2.20.1
PATCH RESEND 16/16 Nokia RX-51: Enable usbtty serial console by default
In reply to Pali RohárNow when usbtty serial console is fixed in U-Boot enable CONFIG_USB_TTY for Nokia RX-51 board by default.
Fix also USB product id as U-Boot ignores CONFIG_USBD_PRODUCTID macro and include U-Boot string into USB product name to indicate usage of U-Boot.
CONFIG_CONSOLE_MUX is already used and U-Boot console is available for all in/out devices. Therefore there is no need to have separate commands 'run sercon', 'run usbcon' and 'run vgacon', so remove them.
As space for U-Boot is limited to 256kB, disable some other unused options so CONFIG_USB_TTY can be enabled.
Nokia RX-51 does not have easily accessible UART serial console so the only option for easy debugging is to use device's keyboard+screen or this usbtty serial console over USB.
--- configs/nokia_rx51_defconfig | 7 ++++--- doc/README.nokia_rx51 | 15 +-------------- include/configs/nokia_rx51.h | 21 +++++++-------------- 3 files changed, 12 insertions(+), 31 deletions(-)
configs/nokia_rx51_defconfig +4 -3
@@ -13,6 +13,7 @@ CONFIG_AUTOBOOT_MENU_SHOW=y CONFIG_USE_PREBOOT=y CONFIG_PREBOOT="run preboot" CONFIG_CONSOLE_MUX=y +# CONFIG_SYS_DEVICE_NULLDEV is not set CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Nokia RX-51 # " # CONFIG_CMD_BDI is not set
@@ -47,9 +48,11 @@ CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y # CONFIG_NET is not set CONFIG_DM=y +# CONFIG_DM_WARN is not set # CONFIG_DM_DEVICE_REMOVE is not set +# CONFIG_DM_SEQ_ALIAS is not set +# CONFIG_BLOCK_CACHE is not set CONFIG_DM_I2C=y -CONFIG_TWL4030_LED=y CONFIG_DM_MMC=y # CONFIG_MMC_HW_PARTITIONING is not set # CONFIG_MMC_VERBOSE is not set
@@ -59,10 +62,8 @@ CONFIG_CONS_INDEX=3 CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_USB=y -CONFIG_USB_MUSB_HCD=y CONFIG_USB_MUSB_UDC=y CONFIG_USB_OMAP3=y -CONFIG_TWL4030_USB=y CONFIG_CFB_CONSOLE=y CONFIG_CFB_CONSOLE_ANSI=y # CONFIG_VGA_AS_SINGLE_DEVICE is not set
doc/README.nokia_rx51 +1 -14
@@ -24,8 +24,7 @@ called u-boot-gen-combined. It is available in following repository: There is support for hardware watchdog. Hardware watchdog is started by NOLO so u-boot must kick watchdog to prevent reboot device (but not very often, max every 2 seconds). There is also support for framebuffer display -output with ANSI escape codes and the N900 HW keyboard input. USB tty works -but is disabled because it prevents the current Maemo kernel from booting. +output with ANSI escape codes and the N900 HW keyboard input. When U-Boot is starting it enable IBE bit in Auxiliary Control Register, which is needed for Thumb-2 ISA support. It is workaround for errata 430973.
@@ -49,10 +48,6 @@ Boot from SD or eMMC in this order: Available additional commands/variables: - * run sercon - Use serial port for control - * run usbcon - Use usbtty for control - * run vgacon - Use framebuffer and HW keyboard for control (default) - * run sdboot - Boot from external SD card (see boot order) * run emmcboot - Boot from internal eMMC memory (see boot order) * run attachboot - Boot attached kernel image (attached to U-Boot binary)
@@ -87,14 +82,6 @@ Additional variables for booting kernel: and u-boot standard output is set to serial then setup_console_atag is automatically set to 1. So output from Maemo kernel would go to serial port. -USB TTY: - - Maemo kernel 2.6.28 will crash if u-boot enable usb tty. So USB TTY is disabled. - For enabling USB TTY just add this line to file include/configs/nokia_rx51.h - - #define CONFIG_USB_TTY - - UBIFS support: UBIFS support is disabled, because U-Boot image is too big and cannot be
include/configs/nokia_rx51.h +7 -14
@@ -70,10 +70,12 @@/* USB device configuration */ #define CONFIG_USB_DEVICE +#define CONFIG_USB_TTY #define CONFIG_USBD_VENDORID 0x0421 -#define CONFIG_USBD_PRODUCTID 0x01c8 +#define CONFIG_USBD_PRODUCTID_CDCACM 0x01c8 +#define CONFIG_USBD_PRODUCTID_GSERIAL 0x01c8#define CONFIG_USBD_MANUFACTURER "Nokia" -#define CONFIG_USBD_PRODUCT_NAME "N900" +#define CONFIG_USBD_PRODUCT_NAME "N900 (U-Boot)"#define GPIO_SLIDE 71
@@ -108,15 +110,9 @@ int rx51_kp_getc(struct stdio_dev *sdev);/* Environment information */ #define CONFIG_EXTRA_ENV_SETTINGS \ "usbtty=cdc_acm\0" \ - "stdin=serial,vga\0" \ - "stdout=serial,vga\0" \ - "stderr=serial,vga\0" \ - "setcon=setenv stdin ${con};" \ - "setenv stdout ${con};" \ - "setenv stderr ${con}\0" \ - "sercon=setenv con serial; run setcon\0" \ - "usbcon=setenv con usbtty; run setcon\0" \ - "vgacon=setenv con vga; run setcon\0" \ + "stdin=usbtty,serial,vga\0" \ + "stdout=usbtty,serial,vga\0" \ + "stderr=usbtty,serial,vga\0" \ "slide=gpio input " __stringify(GPIO_SLIDE) "\0" \ "switchmmc=mmc dev ${mmcnum}\0" \ "kernaddr=0x82008000\0" \
@@ -198,9 +194,6 @@ int rx51_kp_getc(struct stdio_dev *sdev);#define CONFIG_POSTBOOTMENU \ "echo;" \ "echo Extra commands:;" \ - "echo run sercon - Use serial port for control.;" \ - "echo run usbcon - Use usbtty for control.;" \ - "echo run vgacon - Use framebuffer/keyboard.;" \ "echo run sdboot - Boot from SD card slot.;" \ "echo run emmcboot - Boot internal eMMC memory.;" \ "echo run attachboot - Boot attached kernel image.;" \
Signature · 1 line
2.20.1
PATCH RESEND 5/16 usb: musb: Fix configuring FIFO for endpoints
In reply to Pali RohárQuoted 11 lines · Pali Roh?r
This patch fixes configuring FIFO for one-directional endpoints which have either RX or TX queue and therefore only one FIFO.
Size of FIFO buffer is 2^(idx+3) bytes and starting address is 2^(addr+3). Moreover first 64 bytes are reserved for EP0.
Without this patch if FIFO size specified by caller was zero then idx was incorrectly calculated (expr. ffs(0)-1) and size overflowed in fifosz register. This register uses has only 4 bits for FIFO size. Moreover specifying zero size is not possible.
Quoted 8 lines
This patch is fixing calculation of start address and buffer size to minimal value and ensure that it would not overlap with reserved EP0 buffer.
This issue caused loose of packets on USB bus in both directions and basically usbtty was unusable.
Signed-off-by Pali Roh?r <[email protected]>
1-5: Acked-by: Pavel Machek <[email protected]>
Signature · 8 lines
http://www.livejournal.com/~pavelmachek -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/91674213/attachment.sig>
PATCH RESEND 10/16 usb: musb: Ensure that we set musb dynamic FIFO buffer for every endpoint
In reply to Pali RohárQuoted 9 lines · Pali Roh?r
If we do not set FIFO buffer address and size for some endpoint which is in use then default address
0x0would be used which is in conflict with FIFO buffer for endpoint 0 which is at fixed address0x0. Sharing address space between more endpoint cause data loss and unexpected errors.This patch is fixing transmission of characters over usbtty serial console and allow using of usbtty for debugging purposes on Nokia N900.
Signed-off-by Pali Roh?r <[email protected]>
6-10: Acked-by: Pavel Machek <[email protected]>
Regards,
Pavel
Signature · 8 lines
http://www.livejournal.com/~pavelmachek -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/d1dfdd7e/attachment.sig>
PATCH RESEND 16/16 Nokia RX-51: Enable usbtty serial console by default
In reply to Pali RohárHi!
Quoted 10 lines
Now when usbtty serial console is fixed in U-Boot enable
CONFIG_USB_TTYfor Nokia RX-51 board by default.Fix also USB product id as U-Boot ignores
CONFIG_USBD_PRODUCTIDmacro and include U-Boot string into USB product name to indicate usage of U-Boot.
CONFIG_CONSOLE_MUXis already used and U-Boot console is available for all in/out devices. Therefore there is no need to have separate commands 'run sercon', 'run usbcon' and 'run vgacon', so remove them.
Quoted 8 lines
As space for U-Boot is limited to 256kB, disable some other unused options so
CONFIG_USB_TTYcan be enabled.Nokia RX-51 does not have easily accessible UART serial console so the only option for easy debugging is to use device's keyboard+screen or this usbtty serial console over USB.
Signed-off-by Pali Roh?r <[email protected]>
10-16: Acked-by: Pavel Machek <[email protected]>
Thanks for the series.
You may want to avoid cc-ing the Leste list, as it complains about too many recipients and bounces.
Best regards,
Pavel
Signature · 8 lines
http://www.livejournal.com/~pavelmachek -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: Digital signature URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/070108c7/attachment.sig>
PATCH RESEND v2 1/16 serial: usbtty: Fix puts function
In reply to Pali RohárQuoted 16 lines · On Fri, 5 Feb 2021 20:11:57 +0100 Pali Roh?r <[email protected]> wrote:
This function has incorrect implementation of prepending CR prior LF. Without this patch it prepended CR prior whole string which is going to be written and let LF without leading CR. Fix this issue by inserting CR at correct place to make output on usbtty serial console more readable.
Signed-off-by Pali Roh?r <[email protected]>--- drivers/serial/usbtty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/serial/usbtty.c +0
-0
drivers/serial/usbtty.c void usbtty_puts(struct stdio_dev *dev, const · line 507
Quoted 10 lines
drivers/serial/usbtty.c +2
-2@@ -500,8 +500,8 @@ void usbtty_puts(struct stdio_dev *dev, const char *str) n = next_nl_pos (str);if (str[n] =='\n' ) { -__usbtty_puts ("\r" ,1 ); -__usbtty_puts (str, n +1 ); +__usbtty_puts (str, n); +__usbtty_puts ("\r\n" ,2 ); str += (n +1 ); len -= (n +1 ); }else {
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/7d73cab8/attachment.sig>
PATCH RESEND v2 2/16 serial: usbtty: Send urb data in correct order
In reply to Pali RohárQuoted 12 lines · On Fri, 5 Feb 2021 20:11:58 +0100 Pali Roh?r <[email protected]> wrote:
Function
next_urb()selects the last urb data buffer from linked list to which next data from usbtty puts should be appended.But to check if TX data still exists it is needed to look at the first urb data buffer from linked list. So check for
endpoint->tx_urb(first from the linked list) instead ofcurrent_urb(the last from the linked list).Successful call to
udc_endpoint_write()may invalidate active urb and allocate new in queue which invalidate pointer returned bynext_urb()function.
Quoted 6 lines
So call
next_urb()prior putting data into urb buffer and call it every time after usingudc_endpoint_write()function to prevent sending data from usbtty puts in incorrect order.This patch fixes issue that usbtty code does not transmit data when they are waiting in the tx queue.
Quoted 36 lines
Signed-off-by Pali Roh?r <[email protected]>--- drivers/serial/usbtty.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)drivers/serial/usbtty.c +2
-9@@ -849,17 +849,9 @@ static int write_buffer (circbuf_t * buf) &endpoint_instance[tx_endpoint];struct urb *current_urb =NULL ; - current_urb =next_urb (device_instance, endpoint); - -if (!current_urb) { -TTYERR ("current_urb is NULL, buf->size %d\n" , - buf->size); -return 0 ; - } -/* TX data still exists - send it now */ -if (endpoint->sent < current_urb->actual_length){ +if (endpoint->sent < endpoint->tx_urb->actual_length){if (udc_endpoint_write (endpoint)){/* Write pre-empted by RX */ return -1 ;@@ -878,6 +870,8 @@ static int write_buffer (circbuf_t * buf)*/ while (buf->size >0 ) { + current_urb = next_urb (device_instance,endpoint); +
drivers/serial/usbtty.c static int write_buffer (circbuf_t * buf) · line 876
Quoted 2 lines
drivers/serial/usbtty.c +0
-0dest = (char *)current_urb->buffer + current_urb->actual_length;
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/bd0ad962/attachment.sig>
PATCH RESEND v2 3/16 usb: musb: Fix compilation of gadget code
In reply to Pali RohárQuoted 47 lines · On Fri, 5 Feb 2021 20:11:59 +0100 Pali Roh?r <[email protected]> wrote:
musb udc code depends on usb gadget code provided by
CONFIG_USB_DEVICEand defined indrivers/usb/gadget/Makefile. But thisMakefileis not included into U-Boot build whenCONFIG_USB_GADGETis not set. AsCONFIG_USB_DEVICEcannot be enabled together withCONFIG_USB_GADGETit means that dependency for musb udc code is not compiled during build. Fix it by includingdrivers/usb/gadgetdependency also whenCONFIG_USB_DEVICEis set.This patch fixes compile errors:
arm-linux-gnueabi-ld.bfd:
drivers/usb/musb/built-in.o: in functionmusb_peri_ep0_rx': u-boot/drivers/usb/musb/musb_udc.c: undefined reference toep0_recv_setup' arm-linux-gnueabi-ld.bfd:drivers/usb/musb/built-in.o: in function `musb_peri_ep0_idle':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `ep0_recv_setup' arm-linux-gnueabi-ld.bfd:drivers/usb/musb/built-in.o: in function `musb_peri_ep0_zero_data_request':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' arm-linux-gnueabi-ld.bfd:drivers/usb/musb/built-in.o: in function `musb_peri_ep0_idle':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `ep0_recv_setup' arm-linux-gnueabi-ld.bfd:drivers/usb/musb/built-in.o: in function `musb_peri_ep0_rx':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_rcv_complete' arm-linux-gnueabi-ld.bfd:drivers/usb/musb/built-in.o: in function `musb_peri_rx_ep':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_rcv_complete' arm-linux-gnueabi-ld.bfd:drivers/usb/musb/built-in.o: in function `udc_endpoint_write':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_tx_complete' arm-linux-gnueabi-ld.bfd:drivers/usb/musb/built-in.o: in function `udc_irq':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' arm-linux-gnueabi-ld.bfd:u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' arm-linux-gnueabi-ld.bfd:u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' arm-linux-gnueabi-ld.bfd:u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' arm-linux-gnueabi-ld.bfd:u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' arm-linux-gnueabi-ld.bfd:
drivers/usb/musb/built-in.o:u-boot/drivers/usb/musb/musb_udc.c: more undefined references tousbd_device_event_irq' follow arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in functionudc_setup_ep':u-boot/drivers/usb/musb/musb_udc.c: undefined
Quoted 9 lines
reference to `usbd_alloc_urb' arm-linux-gnueabi-ld.bfd:
drivers/usb/musb/built-in.o: in function `udc_startup_events':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' arm-linux-gnueabi-ld.bfd:u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' arm-linux-gnueabi-ld.bfd:u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' make: *** [Makefile:1762: u-boot] Error 1
Quoted 10 lines
Signed-off-by Pali Roh?r <[email protected]>--- Makefile | 1 + 1 file changed, 1 insertion(+)Makefile +0
-0
Makefile libs-y += drivers/usb/dwc3/ · line 798
Quoted 7 lines
Makefile +1
-0@@ -792,6 +792,7 @@ libs-y += drivers/usb/dwc3/ libs-y += drivers/usb/common/ libs-y += drivers/usb/emul/ libs-y += drivers/usb/eth/ +libs-$(CONFIG_USB_DEVICE) += drivers/usb/gadget/ libs-$(CONFIG_USB_GADGET) += drivers/usb/gadget/ libs-$(CONFIG_USB_GADGET) += drivers/usb/gadget/udc/ libs-y += drivers/usb/host/
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/2c008037/attachment.sig>
PATCH RESEND v2 4/16 usb: musb: Always clear the data toggle bit when configuring ep
In reply to Pali RohárQuoted 4 lines · On Fri, 5 Feb 2021 20:12:00 +0100 Pali Roh?r <[email protected]> wrote:
Without this patch it was done only when U-Boot was compiled with MUSB Host Controller. But it is needed also for MUSB Device Controller, otherwise Device Controller does not work.
Quoted 28 lines
Signed-off-by Pali Roh?r <[email protected]>--- drivers/usb/musb/musb_core.c | 4 ---- 1 file changed, 4 deletions(-)(quoted diff) +0
-0
b/drivers/usb/musb/musb_core.cindex147b2eb929..cc6dc3839d100644drivers/usb/musb/musb_core.c +0
-1@@ -81,10 +81,8 @@ void musb_configure_ep(const struct musb_epinfo *epinfo, u8 cnt) config_fifo(tx, idx, fifoaddr); csr =readw (&musbr->txcsr); -#if defined(CONFIG_USB_MUSB_HCD )/* clear the data toggle bit */ writew(csr | MUSB_TXCSR_CLRDATATOG,
&musbr->txcsr); -#endifdrivers/usb/musb/musb_core.c +0
-1/* Flush fifo if required */ if (csr &MUSB_TXCSR_TXPKTRDY ) writew(csr | MUSB_TXCSR_FLUSHFIFO,@@ -94,10 +92,8 @@ void musb_configure_ep(const struct musb_epinfo *epinfo, u8 cnt) config_fifo(rx, idx, fifoaddr); csr =readw (&musbr->rxcsr); -#if defined(CONFIG_USB_MUSB_HCD )/* clear the data toggle bit */ writew(csr | MUSB_RXCSR_CLRDATATOG,
&musbr->rxcsr); -#endif
drivers/usb/musb/musb_core.c void musb_configure_ep(const struct musb_epinfo *epinfo, u8 cnt) · line 99
Quoted 3 lines
drivers/usb/musb/musb_core.c +0
-0/* Flush fifo if required */ if (csr &MUSB_RXCSR_RXPKTRDY ) writew(csr | MUSB_RXCSR_FLUSHFIFO,
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/f1c2c9e6/attachment.sig>
PATCH RESEND v2 5/16 usb: musb: Fix configuring FIFO for endpoints
In reply to Pali RohárQuoted 11 lines · On Fri, 5 Feb 2021 20:12:01 +0100 Pali Roh?r <[email protected]> wrote:
This patch fixes configuring FIFO for one-directional endpoints which have either RX or TX queue and therefore only one FIFO.
Size of FIFO buffer is 2^(idx+3) bytes and starting address is 2^(addr+3). Moreover first 64 bytes are reserved for EP0.
Without this patch if FIFO size specified by caller was zero then idx was incorrectly calculated (expr. ffs(0)-1) and size overflowed in fifosz register. This register uses has only 4 bits for FIFO size. Moreover specifying zero size is not possible.
Quoted 7 lines
This patch is fixing calculation of start address and buffer size to minimal value and ensure that it would not overlap with reserved EP0 buffer.
This issue caused loose of packets on USB bus in both directions and basically usbtty was unusable.
Quoted 42 lines
Signed-off-by Pali Roh?r <[email protected]>---
Changes in v2:
* Correctly calculate minimal buffer size
* Store into fifoaddr address in musb units (8 bytes)--- drivers/usb/musb/musb_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)(quoted diff) +0
-0
b/drivers/usb/musb/musb_core.cindexcc6dc3839d..9651f074a4100644drivers/usb/musb/musb_core.c +1
-2@@ -50,7 +50,7 @@ void musb_start(void)# define config_fifo (dir, idx, addr) \ do { \ writeb(idx, &musbr->dir##fifosz); \ - writew(fifoaddr >> 3, &musbr->dir##fifoadd); \ + writew(addr, &musbr->dir##fifoadd); \ } while (0)#endif @@ -66,14 +66,14 @@ void musb_start(void)void musb_configure_ep (const struct musb_epinfo *epinfo,u8 cnt) {u16 csr; -u16 fifoaddr =64 ;/* First 64 bytes of FIFO reserved for EP0 */
drivers/usb/musb/musb_core.c +1
-0+u16 fifoaddr =64 >>3 ;/* First 64 bytes of FIFO reserved for EP0 */ u32 fifosize;
drivers/usb/musb/musb_core.c +1
-1u8 idx;while (cnt--) {/* prepare fifosize to write to register */ fifosize = epinfo->epsize >>3 ; - idx =ffs (fifosize) -1 ; + idx = fifosize ? ((ffs (fifosize) -1 ) &0xF ) :0 ;writeb (epinfo->epnum, &musbr->index);if (epinfo->epdir) {
drivers/usb/musb/musb_core.c void musb_configure_ep(const struct musb_epinfo · line 105
Quoted 8 lines
drivers/usb/musb/musb_core.c +1
-1@@ -99,7 +99,7 @@ void musb_configure_ep(const struct musb_epinfo *epinfo, u8 cnt) writew(csr | MUSB_RXCSR_FLUSHFIFO, &musbr->rxcsr); } - fifoaddr += epinfo->epsize; + fifoaddr +=1 << idx; epinfo++; } }
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/d5717ab3/attachment.sig>
PATCH RESEND v2 6/16 usb: musb: Read value of PERI_RXCSR to 16bit variable
In reply to Pali RohárQuoted 13 lines · On Fri, 5 Feb 2021 20:12:02 +0100 Pali Roh?r <[email protected]> wrote:
PERI_RXCSRis 16bit register so store its value into 16bit local variable.Signed-off-by Pali Roh?r <[email protected]>--- drivers/usb/musb/musb_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/musb/musb_udc.c +0
-0
drivers/usb/musb/musb_udc.c static void musb_peri_ep0(void) · line 635
Quoted 8 lines
drivers/usb/musb/musb_udc.c +1
-1@@ -629,7 +629,7 @@ static void musb_peri_ep0(void)static void musb_peri_rx_ep (unsigned int ep) {u16 peri_rxcount; -u8 peri_rxcsr =readw (&musbr->ep[ep].epN.rxcsr); +u16 peri_rxcsr =readw (&musbr->ep[ep].epN.rxcsr);if (!(peri_rxcsr &MUSB_RXCSR_RXPKTRDY )) {if (debug_level >0 )
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/195bfb06/attachment.sig>
PATCH RESEND v2 7/16 usb: musb: Fix transmission of bigger buffers
In reply to Pali RohárQuoted 10 lines · On Fri, 5 Feb 2021 20:12:03 +0100 Pali Roh?r <[email protected]> wrote:
If
udc_endpoint_write()was called with bigger payload which does not fit into one USB packet it needs to be transmitted in more USB packets. First packet is transmitted byudc_endpoint_write()call itself and other packets are put into waiting queue.Implement function
musb_peri_tx()which transmit checks when endpoints are ready and continue transmitting of waiting queue.This patch fixes sending e.g. output of printenv command over usbtty serial console.
Quoted 38 lines
Signed-off-by Pali Roh?r <[email protected]>--- drivers/usb/musb/musb_udc.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-)drivers/usb/musb/musb_udc.c +6
-11@@ -708,21 +708,16 @@ static void musb_peri_rx(u16 intr)static void musb_peri_tx (u16 intr) { +unsigned int ep; +/* Check for EP0 */ if (0x01 & intr)musb_peri_ep0_tx (); -/* -* Use this in the future when handling epN tx -* -* u8 ep; -* -* for (ep = 1; ep < 16; ep++) { -* if ((1 << ep) & intr) { -* / * handle tx for this endpoint * / -* } -* } -*/ +for (ep =1 ; ep <16 ; ep++) { +if ((1 << ep) & intr) +udc_endpoint_write (GET_ENDPOINT (udc_device, ep)); + } }
Quoted 1 line
void
udc_irq(void)
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/9a198c6f/attachment.sig>
PATCH RESEND v2 8/16 usb: musb: Fix receiving of bigger buffers
In reply to Pali RohárQuoted 24 lines · On Fri, 5 Feb 2021 20:12:04 +0100 Pali Roh?r <[email protected]> wrote:
If
musb_peri_rx_ep()was called to processed received HW buffer but U-Boot cannot read it yet (e.g. because U-Boot SW buffer is full) then interrupt was marked as processed but HW buffer stayed unprocessed.U-Boot tried to process this buffer again when it receive interrupt again, but it can receive it only when sender (host) send a new data. As sender (host) is not going to send a new data until U-Boot process current data this issue caused a deadlock in case sender (host) is emitting data faster than U-Boot can process it.
Reading musb intrrx register automatically clears this register and mark interrupt as processed. So to prevent marking interrupt in U-Boot as processed and a new variable
pending_intrrxwhich would contain unprocessed bits of intrrx register.And as a second step, every time when
musb_peri_rx_ep()is called and there are waiting data to be processed (signaled byMUSB_RXCSR_RXPKTRDY) either acknowledge sender (viamusb_peri_rx_ack()) that whole HW buffer was processed or set corresponding bit inpending_intrrxthat HW buffer was not fully processed yet and next iteration is required after U-Boot allocate space for reading HW buffer.
Quoted 3 lines
This patch fixes receiving large usb buffers, e.g. file transfer via Kermit protocol implemented by 'loadb' U-Boot command over usbtty serial console.
Quoted 57 lines
Signed-off-by Pali Roh?r <[email protected]>--- drivers/usb/musb/musb_udc.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)drivers/usb/musb/musb_udc.c +6
-1@@ -104,6 +104,8 @@ struct usb_endpoint_instance *ep0_endpoint;static struct usb_device_instance *udc_device;static int enabled; +u16 pending_intrrx; +#ifdef MUSB_DEBUG static void musb_db_regs (void ) {@@ -664,7 +666,10 @@ static void musb_peri_rx_ep(unsigned int ep)/* The common musb fifo reader */ read_fifo (ep, length, data); -musb_peri_rx_ack (ep); +if (length == peri_rxcount) +musb_peri_rx_ack (ep); +else + pending_intrrx |= (1 << ep);/* * urb's actual_length is updated in @@ -677,18 +682,24 @@ static void musb_peri_rx_ep(unsigned int ep) serial_printf("ERROR : %s %d no space " "in rcv buffer\n", __PRETTY_FUNCTION__,ep); +
drivers/usb/musb/musb_udc.c +1
-0+ pending_intrrx |= (1 << ep); } }else {if (debug_level >0 ) serial_printf("ERROR : %s %d problemwith " "endpoint\n",
__PRETTY_FUNCTION__,
ep); +drivers/usb/musb/musb_udc.c +1
-0+ pending_intrrx |= (1 << ep); } }else {if (debug_level >0 ) serial_printf("ERROR : %s %d with nothing todo\n",
__PRETTY_FUNCTION__, ep);drivers/usb/musb/musb_udc.c +2
-0+ +musb_peri_rx_ack (ep); } }
drivers/usb/musb/musb_udc.c void udc_irq(void) · line 789
Quoted 9 lines
drivers/usb/musb/musb_udc.c +3
-0@@ -770,6 +781,9 @@ void udc_irq(void) intrrx =readw (&musbr->intrrx); intrtx =readw (&musbr->intrtx); + intrrx |= pending_intrrx; + pending_intrrx =0 ; +if (intrrx)musb_peri_rx (intrrx);
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/21a623c9/attachment.sig>
PATCH RESEND v2 9/16 usb: musb: Fix handling interrupts for EP0 and SET ADDRESS commmand
In reply to Pali RohárQuoted 16 lines · On Fri, 5 Feb 2021 20:12:05 +0100 Pali Roh?r <[email protected]> wrote:
Interrupt for EP0 is indicated in intrtx register via first bit. It is set for both RX and TX. First bit in intrrx register is reserved and not set.
So remove calling
musb_peri_ep0()function at every iteration ofudc_irq()andmusb_peri_rx()and call it only frommusb_peri_tx()when correct interrupt bit in initrtx it set.Address from SET ADDRESS command must be set to faddr register only after acknowledging
SERV_RXPKTRDYfollowed by received EP0 interrupt. So prior callingmusb_peri_ep0_set_address()check for EP0 interrupt instead of (incorrect)MUSB_INTR_SOFinterrupt.This patch fixes issue that host (computer) cannot register U-Boot USB device and failing with errors:
Quoted 8 lines
usb 1-1: new full-speed USB device number 86 using
xhci_hcdusb 1-1: Device not responding to setup address. usb 1-1: Device not responding to setup address. usb 1-1: device not accepting address 86, error -71U-Boot was writing address to faddr register too early and did not wait for correct interrupt after which should update address.
Quoted 42 lines
Signed-off-by Pali Roh?r <[email protected]>--- drivers/usb/musb/musb_udc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)drivers/usb/musb/musb_udc.c +1
-3@@ -707,9 +707,7 @@ static void musb_peri_rx(u16 intr) {unsigned int ep; -/* Check for EP0 */ -if (0x01 & intr) -musb_peri_ep0 (); +/* First bit is reserved and does not indicate interrupt for EP0 */
drivers/usb/musb/musb_udc.c +2
-4for (ep =1 ; ep <16 ; ep++) {if ((1 << ep) & intr)@@ -721,9 +719,9 @@ static void musb_peri_tx(u16 intr) {unsigned int ep; -/* Check for EP0 */ +/* Check for EP0: first bit indicates interrupt for both RX and TX */ if (0x01 & intr) -musb_peri_ep0_tx (); +musb_peri_ep0 ();for (ep =1 ; ep <16 ; ep++) {if ((1 << ep) & intr)@@ -750,8 +748,6 @@ void udc_irq(void)musb_peri_resume (); } -musb_peri_ep0 (); -if (MUSB_INTR_RESET & intrusb) {usbd_device_event_irq (udc_device,DEVICE_RESET ,0 );musb_peri_reset ();
drivers/usb/musb/musb_udc.c void udc_irq(void) · line 792
Quoted 8 lines
drivers/usb/musb/musb_udc.c +1
-1@@ -790,7 +786,7 @@ void udc_irq(void)if (intrtx)musb_peri_tx (intrtx); }else { -if (MUSB_INTR_SOF & intrusb) { +if (readw (&musbr->intrtx) &0x1 ) {u8 faddr; faddr =readb (&musbr->faddr);/*
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/861e8cfa/attachment.sig>
PATCH RESEND v2 10/16 usb: musb: Ensure that we set musb dynamic FIFO buffer for every endpoint
In reply to Pali RohárQuoted 9 lines · On Fri, 5 Feb 2021 20:12:06 +0100 Pali Roh?r <[email protected]> wrote:
If we do not set FIFO buffer address and size for some endpoint which is in use then default address
0x0would be used which is in conflict with FIFO buffer for endpoint 0 which is at fixed address0x0. Sharing address space between more endpoint cause data loss and unexpected errors.This patch is fixing transmission of characters over usbtty serial console and allow using of usbtty for debugging purposes on Nokia N900.
Quoted 32 lines
Signed-off-by Pali Roh?r <[email protected]>--- drivers/usb/musb/musb_udc.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)drivers/usb/musb/musb_udc.c +1
-12@@ -875,18 +875,8 @@ void udc_setup_ep(struct usb_device_instance *device, unsigned int id, ep0_endpoint->endpoint_address = 0xff; ep0_urb =usbd_alloc_urb (device, endpoint); }else if (MAX_ENDPOINT >= id) { -int ep_addr; - -/* Check the direction */ - ep_addr = endpoint->endpoint_address; -if (USB_DIR_IN == (ep_addr &USB_ENDPOINT_DIR_MASK )) { -/* IN */ - epinfo[(id *2 ) +1 ].epsize = endpoint->tx_packetSize; - }else { -/* OUT */ - epinfo[id *2 ].epsize = endpoint->rcv_packetSize; - } - + epinfo[(id * 2) + 0].epsize =
endpoint->rcv_packetSize;drivers/usb/musb/musb_udc.c +1
-0+ epinfo[(id * 2) + 1].epsize =
Quoted 3 lines
endpoint->tx_packetSize;musb_configure_ep(&epinfo[0], ARRAY_SIZE(epinfo)); } else {
if (debug_level> 0)
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/27ac89da/attachment.sig>
PATCH RESEND v2 11/16 usb: gadget: Use dbg_ep0() macro instead of serial_printf()
In reply to Pali RohárQuoted 3 lines · On Fri, 5 Feb 2021 20:12:07 +0100 Pali Roh?r <[email protected]> wrote:
All debug messages from
ep0.cexcept a few are printed bydbg_ep0()macro. So for remaining few exception use alsodbg_ep0()instead ofserial_printf().
Quoted 82 lines
Signed-off-by Pali Roh?r <[email protected]>--- drivers/usb/gadget/ep0.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)drivers/usb/gadget/ep0.c +1
-1@@ -294,7 +294,7 @@ static int ep0_get_descriptor (struct usb_device_instance *device, { struct usb_string_descriptor *string_descriptor; if (!(string_descriptor = usbd_get_string (index))) { - serial_printf("Invalid string index %d\n", index); + dbg_ep0(0, "Invalid string index %d\n", index); return -1;drivers/usb/gadget/ep0.c +0
-0} dbg_ep0(3, "string_descriptor: %p length%d",
string_descriptor,string_descriptor->bLength); @@ -302,14 +302,14 @@ static intep0_get_descriptor(structusb_device_instance*device, } break;drivers/usb/gadget/ep0.c +0
-1case USB_DESCRIPTOR_TYPE_INTERFACE : - serial_printf("USB_DESCRIPTOR_TYPE_INTERFACE - error notimplemented\n");
drivers/usb/gadget/ep0.c +1
-0+ dbg_ep0(2, "USB_DESCRIPTOR_TYPE_INTERFACE - errornot implemented\n"); return -1;
drivers/usb/gadget/ep0.c +0
-1case USB_DESCRIPTOR_TYPE_ENDPOINT : - serial_printf("USB_DESCRIPTOR_TYPE_ENDPOINT - errornot implemented\n");
drivers/usb/gadget/ep0.c +1
-0+ dbg_ep0(2, "USB_DESCRIPTOR_TYPE_ENDPOINT - error notimplemented\n"); return -1;
drivers/usb/gadget/ep0.c +0
-1case USB_DESCRIPTOR_TYPE_HID : { - serial_printf("USB_DESCRIPTOR_TYPE_HID -error not implemented\n");
drivers/usb/gadget/ep0.c +1
-0+ dbg_ep0(2, "USB_DESCRIPTOR_TYPE_HID - errornot implemented\n"); return -1; /* unsupported at this time */
#if 0drivers/usb/gadget/ep0.c +1
-1int bNumInterface =@@ -338,7 +338,7 @@ static int ep0_get_descriptor (structusb_device_instance *device, break;case USB_DESCRIPTOR_TYPE_REPORT : { - serial_printf("USB_DESCRIPTOR_TYPE_REPORT - error not implemented\n"); + dbg_ep0(2, "USB_DESCRIPTOR_TYPE_REPORT -error not implemented\n"); return -1; /* unsupported at this
time */ #if 0drivers/usb/gadget/ep0.c +1
-1int bNumInterface =@@ -531,7 +531,7 @@ int ep0_recv_setup (struct urb *urb)le16_to_cpu (request->wValue) & 0xff);case USB_REQ_GET_CONFIGURATION : -serial_printf ("get config %d\n" , device->configuration); +dbg_ep0 (2 ,"get config %d\n" , device->configuration);return ep0_get_one (device, urb, device->configuration);@@ -621,14 +621,14 @@ int ep0_recv_setup (struct urb *urb) device->interface = device->alternate =0 ;/*dbg_ep0(2, "set configuration: %d",
device->configuration); */drivers/usb/gadget/ep0.c +0
-1-/*serial_printf("DEVICE_CONFIGURED.. event?\n"); */
drivers/usb/gadget/ep0.c +1
-0+/*dbg_ep0(2, "DEVICE_CONFIGURED.. event?\n"); */ return 0;
drivers/usb/gadget/ep0.c +0
-0case USB_REQ_SET_INTERFACE : device->interface = le16_to_cpu(
request->wIndex);device->alternate=le16_to_cpu(request->wValue);
/*dbg_ep0(2, "set interface: %d alternate:
%d",device->interface,device->alternate); */drivers/usb/gadget/ep0.c +0
-1- serial_printf("DEVICE_SET_INTERFACE..event?\n");
drivers/usb/gadget/ep0.c +1
-0+ dbg_ep0(2, "DEVICE_SET_INTERFACE..event?\n"); return 0;
Quoted 1 line
case
USB_REQ_GET_STATUS:
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/665389e2/attachment.sig>
PATCH RESEND v2 12/16 arm: omap3: Compile lowlevel_init() function only when it is used
In reply to Pali RohárQuoted 37 lines · On Fri, 5 Feb 2021 20:12:08 +0100 Pali Roh?r <[email protected]> wrote:
Function
lowlevel_init()is called only fromcpu_init_crit()and this function is wrapped into #if .. #endif section. So compile alsolowlevel_init()function under same #if condition.Signed-off-by Pali Roh?r <[email protected]>--- arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/arch/arm/mach-omap2/omap3/lowlevel_init.Sindex2a05b5e521..4fa89418a1100644 ---a/arch/arm/mach-omap2/omap3/lowlevel_init.S+++b/arch/arm/mach-omap2/omap3/lowlevel_init.S@@ -45,7 +45,7 @@ENDPROC(do_omap3_emu_romcode_call)ENTRY(cpy_clk_code)(quoted diff) +0
-0/* Copy DPLL code into SRAM */ adr r0, go_to_speed /* copy from startof
go_to_speed... */(quoted diff) +0
-1- adr r2, lowlevel_init /* ... up to start of
low_level_init*/(quoted diff) +1
-0+ adr r2, go_to_speed_end /* ... up to start of
go_to_speed_end*/ next2:
ldmia r0!, {r3 - r10} /* copy from
source address [r0] */ stmia r1!, {r3 - r10} /*
copy to target address [r1] */ @@ -167,8 +167,11 @@pll_div_add5:
pll_div_val5:arch/arm/mach-omap2/omap3/lowlevel_init.S +3
-0.word CLSEL1_EMU_VAL +go_to_speed_end: #endif +#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && \ + !defined(CONFIG_SKIP_LOWLEVEL_INIT_ONLY) ENTRY(lowlevel_init) ldr sp, SRAM_STACK str ip, [sp] /* stash ip register */
arch/arm/mach-omap2/omap3/lowlevel_init.S ENTRY(lowlevel_init) · line 196
Quoted 7 lines
arch/arm/mach-omap2/omap3/lowlevel_init.S +1
-0@@ -187,6 +190,7 @@ ENTRY(lowlevel_init) b s_init ENDPROC(lowlevel_init) +#endif /* the literal pools origin */ .ltorg
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/370935b0/attachment.sig>
PATCH RESEND v2 13/16 arm: omap3: Compile s_init() function only when it is used
In reply to Pali RohárQuoted 3 lines · On Fri, 5 Feb 2021 20:12:09 +0100 Pali Roh?r <[email protected]> wrote:
Function
s_init()is called only fromlowlevel_init(). So compile it only when functionlowlevel_init()is compiled.
Quoted 19 lines
Signed-off-by Pali Roh?r <[email protected]>--- arch/arm/mach-omap2/omap3/board.c | 3 +++ 1 file changed, 3 insertions(+)(quoted diff) +0
-0
b/arch/arm/mach-omap2/omap3/board.cindex4da8df47cc..029bd54595100644 ---a/arch/arm/mach-omap2/omap3/board.c
+++b/arch/arm/mach-omap2/omap3/board.carch/arm/mach-omap2/omap3/board.c +2
-0@@ -179,6 +179,8 @@ void early_system_init(void)hw_data_init (); } +#if !defined(CONFIG_SKIP_LOWLEVEL_INIT ) && \ + !defined(CONFIG_SKIP_LOWLEVEL_INIT_ONLY )/****************************************************************************** * Routine: s_init * Description: Does early system init of muxing and clocks.
arch/arm/mach-omap2/omap3/board.c void s_init(void) · line 215
Quoted 7 lines
arch/arm/mach-omap2/omap3/board.c +1
-0@@ -207,6 +209,7 @@ void s_init(void)ehci_clocks_enable (); #endif } +#endif #ifdef CONFIG_SPL_BUILD void board_init_f (ulong dummy)
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/1fe6ab6b/attachment.sig>
PATCH RESEND v2 14/16 Nokia RX-51: Remove function set_muxconf_regs()
In reply to Pali RohárQuoted 703 lines · On Fri, 5 Feb 2021 20:12:10 +0100 Pali Roh?r <[email protected]> wrote:
This function is not used and was never called.
This board contains '#define
CONFIG_SKIP_LOWLEVEL_INIT' because X-Loader set everything up, including MUX configuration.Also this MUX configuration is incorrect and does not match hardware.
So remove this dead, unused and broken code.
This change will decrease size of U-Boot binary.
Signed-off-by Pali Roh?r <[email protected]>--- board/nokia/rx51/rx51.c | 11 -- board/nokia/rx51/rx51.h | 346---------------------------------------- 2 files changed, 357 deletions(-)
board/nokia/rx51/rx51.c +0
-3@@ -467,17 +467,6 @@ int misc_init_r(void)return 0 ; } -/* -* Routine: set_muxconf_regs -* Description: Setting up the configuration Mux registers specific to the
- * hardware. Many pins need to be moved from protect
to primary
- * mode.
- */board/nokia/rx51/rx51.c +0
-5-void set_muxconf_regs (void ) -{ -MUX_RX51 (); -} -static unsigned long int twl_wd_time;/* last time of watchdog reset */ static unsigned long int
twl_i2c_lock;board/nokia/rx51/rx51.h +0
-9@@ -21,352 +21,6 @@ struct emu_hal_params_rx51 {u32 param4; }; -/* -* IEN - Input Enable -* IDIS - Input Disable -* PTD - Pull type Down -* PTU - Pull type Up -* DIS - Pull type selection is inactive -* EN - Pull type selection is active -* M0 - Mode 0 -* The commented string gives the final mux configuration for that pin
- */board/nokia/rx51/rx51.h +0
-3-#define MUX_RX51 () \ -/* SDRC */ \ - MUX_VAL(CP(SDRC_D0), (IEN | PTD | DIS | M0))/*SDRC_D0*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (SDRC_D1 ), (IEN |PTD |DIS |M0 ))/*SDRC_D1*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (SDRC_D2 ), (IEN |PTD |DIS |M0 ))/*SDRC_D2*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (SDRC_D3 ), (IEN |PTD |DIS |M0 ))/*SDRC_D3*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (SDRC_D4 ), (IEN |PTD |DIS |M0 ))/*SDRC_D4*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (SDRC_D5 ), (IEN |PTD |DIS |M0 ))/*SDRC_D5*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (SDRC_D6 ), (IEN |PTD |DIS |M0 ))/*SDRC_D6*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (SDRC_D7 ), (IEN |PTD |DIS |M0 ))/*SDRC_D7*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (SDRC_D8 ), (IEN |PTD |DIS |M0 ))/*SDRC_D8*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (SDRC_D9 ), (IEN |PTD |DIS |M0 ))/*SDRC_D9*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D10), (IEN | PTD | DIS |M0)) /*SDRC_D10*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D11), (IEN | PTD | DIS |M0)) /*SDRC_D11*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D12), (IEN | PTD | DIS |M0)) /*SDRC_D12*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D13), (IEN | PTD | DIS |M0)) /*SDRC_D13*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D14), (IEN | PTD | DIS |M0)) /*SDRC_D14*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D15), (IEN | PTD | DIS |M0)) /*SDRC_D15*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D16), (IEN | PTD | DIS |M0)) /*SDRC_D16*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D17), (IEN | PTD | DIS |M0)) /*SDRC_D17*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D18), (IEN | PTD | DIS |M0)) /*SDRC_D18*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D19), (IEN | PTD | DIS |M0)) /*SDRC_D19*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D20), (IEN | PTD | DIS |M0)) /*SDRC_D20*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D21), (IEN | PTD | DIS |M0)) /*SDRC_D21*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D22), (IEN | PTD | DIS |M0)) /*SDRC_D22*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D23), (IEN | PTD | DIS |M0)) /*SDRC_D23*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D24), (IEN | PTD | DIS |M0)) /*SDRC_D24*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D25), (IEN | PTD | DIS |M0)) /*SDRC_D25*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D26), (IEN | PTD | DIS |M0)) /*SDRC_D26*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D27), (IEN | PTD | DIS |M0)) /*SDRC_D27*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D28), (IEN | PTD | DIS |M0)) /*SDRC_D28*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D29), (IEN | PTD | DIS |M0)) /*SDRC_D29*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D30), (IEN | PTD | DIS |M0)) /*SDRC_D30*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_D31), (IEN | PTD | DIS |M0)) /*SDRC_D31*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_CLK), (IEN | PTD | DIS |M0)) /*SDRC_CLK*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_DQS0), (IEN | PTD | DIS |M0)) /*SDRC_DQS0*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_DQS1), (IEN | PTD | DIS |M0)) /*SDRC_DQS1*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_DQS2), (IEN | PTD | DIS |M0)) /*SDRC_DQS2*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_DQS3), (IEN | PTD | DIS |M0)) /*SDRC_DQS3*/\ -/* GPMC */\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_A1 ), (IDIS |PTD |DIS |M0 ))/*GPMC_A1*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_A2 ), (IDIS |PTD |DIS |M0 ))/*GPMC_A2*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_A3 ), (IDIS |PTD |DIS |M0 ))/*GPMC_A3*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_A4 ), (IDIS |PTD |DIS |M0 ))/*GPMC_A4*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_A5 ), (IDIS |PTD |DIS |M0 ))/*GPMC_A5*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_A6 ), (IDIS |PTD |DIS |M0 ))/*GPMC_A6*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_A7 ), (IDIS |PTD |DIS |M0 ))/*GPMC_A7*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_A8 ), (IDIS |PTD |DIS |M0 ))/*GPMC_A8*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_A9 ), (IDIS |PTD |DIS |M0 ))/*GPMC_A9*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_A10), (IDIS | PTD | DIS |M0)) /*GPMC_A10*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_D0 ), (IEN |PTD |DIS |M0 ))/*GPMC_D0*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_D1 ), (IEN |PTD |DIS |M0 ))/*GPMC_D1*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_D2 ), (IEN |PTD |DIS |M0 ))/*GPMC_D2*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_D3 ), (IEN |PTD |DIS |M0 ))/*GPMC_D3*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_D4 ), (IEN |PTD |DIS |M0 ))/*GPMC_D4*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_D5 ), (IEN |PTD |DIS |M0 ))/*GPMC_D5*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_D6 ), (IEN |PTD |DIS |M0 ))/*GPMC_D6*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_D7 ), (IEN |PTD |DIS |M0 ))/*GPMC_D7*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_D8 ), (IEN |PTD |DIS |M0 ))/*GPMC_D8*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_D9 ), (IEN |PTD |DIS |M0 ))/*GPMC_D9*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_D10), (IEN | PTD | DIS |M0)) /*GPMC_D10*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_D11), (IEN | PTD | DIS |M0)) /*GPMC_D11*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_D12), (IEN | PTD | DIS |M0)) /*GPMC_D12*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_D13), (IEN | PTD | DIS |M0)) /*GPMC_D13*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_D14), (IEN | PTD | DIS |M0)) /*GPMC_D14*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_D15), (IEN | PTD | DIS |M0)) /*GPMC_D15*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_NCS0), (IDIS | PTU | EN |M0)) /*GPMC_nCS0*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_NCS1), (IDIS | PTU | EN |M0)) /*GPMC_nCS1*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_NCS2), (IDIS | PTU | EN |M0)) /*GPMC_nCS2*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_NCS3), (IDIS | PTU | EN |M0)) /*GPMC_nCS3*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_NCS4), (IDIS | PTU | EN |M0)) /*GPMC_nCS4*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_NCS5), (IDIS | PTD | DIS |M0)) /*GPMC_nCS5*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_NCS6), (IEN | PTD | DIS |M1)) /*nDMA_REQ2*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_NCS7), (IEN | PTU | EN |M1)) /*nDMA_REQ3*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_NBE1), (IEN | PTD | DIS |M0)) /*GPMC_nBE1*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_WAIT2), (IEN | PTU | EN |M0)) /*GPMC_WAIT2*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_WAIT3), (IEN | PTU | EN |M0)) /*GPMC_WAIT3*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_CLK), (IDIS | PTD | DIS |M0)) /*GPMC_CLK*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_NADV_ALE ), (IDIS |PTD |DIS |M0 ))/*GPMC_nADV*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_NOE), (IDIS | PTD | DIS |M0)) /*GPMC_nOE*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_NWE), (IDIS | PTD | DIS |M0)) /*GPMC_nWE*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (GPMC_NBE0_CLE ), (IDIS |PTD |DIS |M0 ))/*GPMC_nBE0*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_NWP), (IEN | PTD | DIS |M0)) /*GPMC_nWP*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_WAIT0), (IEN | PTU | EN |M0)) /*GPMC_WAIT0*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(GPMC_WAIT1), (IEN | PTU | EN |M0)) /*GPMC_WAIT1*/\ -/* DSS */\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_PCLK), (IDIS | PTD | DIS |M0)) /*DSS_PCLK*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_HSYNC), (IDIS | PTD | DIS |M0)) /*DSS_HSYNC*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_VSYNC), (IDIS | PTD | DIS |M0)) /*DSS_VSYNC*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_ACBIAS), (IDIS | PTD | DIS |M0)) /*DSS_ACBIAS*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA0), (IDIS | PTD | DIS |M0)) /*DSS_DATA0*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA1), (IDIS | PTD | DIS |M0)) /*DSS_DATA1*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA2), (IDIS | PTD | DIS |M0)) /*DSS_DATA2*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA3), (IDIS | PTD | DIS |M0)) /*DSS_DATA3*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA4), (IDIS | PTD | DIS |M0)) /*DSS_DATA4*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA5), (IDIS | PTD | DIS |M0)) /*DSS_DATA5*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA6), (IDIS | PTD | DIS |M0)) /*DSS_DATA6*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA7), (IDIS | PTD | DIS |M0)) /*DSS_DATA7*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA8), (IDIS | PTD | DIS |M0)) /*DSS_DATA8*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA9), (IDIS | PTD | DIS |M0)) /*DSS_DATA9*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA10), (IDIS | PTD | DIS |M0)) /*DSS_DATA10*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA11), (IDIS | PTD | DIS |M0)) /*DSS_DATA11*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA12), (IDIS | PTD | DIS |M0)) /*DSS_DATA12*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA13), (IDIS | PTD | DIS |M0)) /*DSS_DATA13*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA14), (IDIS | PTD | DIS |M0)) /*DSS_DATA14*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA15), (IDIS | PTD | DIS |M0)) /*DSS_DATA15*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA16), (IDIS | PTD | DIS |M0)) /*DSS_DATA16*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA17), (IDIS | PTD | DIS |M0)) /*DSS_DATA17*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA18), (IDIS | PTD | DIS |M0)) /*DSS_DATA18*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA19), (IDIS | PTD | DIS |M0)) /*DSS_DATA19*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA20), (IDIS | PTD | DIS |M0)) /*DSS_DATA20*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA21), (IDIS | PTD | DIS |M0)) /*DSS_DATA21*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA22), (IDIS | PTD | DIS |M0)) /*DSS_DATA22*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(DSS_DATA23), (IDIS | PTD | DIS |M0)) /*DSS_DATA23*/\ -/* CAMERA */\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (CAM_HS ), (IEN |PTU |EN |M0 ))/*CAM_HS*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (CAM_VS ), (IEN |PTU |EN |M0 ))/*CAM_VS*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(CAM_XCLKA), (IDIS | PTD | DIS |M0)) /*CAM_XCLKA*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(CAM_PCLK), (IEN | PTU | EN |M0)) /*CAM_PCLK*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (CAM_FLD ), (IDIS |PTD |DIS |M4 ))/*GPIO_98*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (CAM_D0 ), (IEN |PTD |DIS |M0 ))/*CAM_D0*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (CAM_D1 ), (IEN |PTD |DIS |M0 ))/*CAM_D1*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (CAM_D2 ), (IEN |PTD |DIS |M0 ))/*CAM_D2*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (CAM_D3 ), (IEN |PTD |DIS |M0 ))/*CAM_D3*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (CAM_D4 ), (IEN |PTD |DIS |M0 ))/*CAM_D4*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (CAM_D5 ), (IEN |PTD |DIS |M0 ))/*CAM_D5*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (CAM_D6 ), (IEN |PTD |DIS |M0 ))/*CAM_D6*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (CAM_D7 ), (IEN |PTD |DIS |M0 ))/*CAM_D7*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (CAM_D8 ), (IEN |PTD |DIS |M0 ))/*CAM_D8*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (CAM_D9 ), (IEN |PTD |DIS |M0 ))/*CAM_D9*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (CAM_D10 ), (IEN |PTD |DIS |M0 ))/*CAM_D10*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (CAM_D11 ), (IEN |PTD |DIS |M0 ))/*CAM_D11*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(CAM_XCLKB), (IDIS | PTD | DIS |M0)) /*CAM_XCLKB*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (CAM_WEN ), (IEN |PTD |DIS |M4 ))/*GPIO_167*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(CAM_STROBE), (IDIS | PTD | DIS |M0)) /*CAM_STROBE*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(CSI2_DX0), (IEN | PTD | DIS |M0)) /*CSI2_DX0*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(CSI2_DY0), (IEN | PTD | DIS |M0)) /*CSI2_DY0*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(CSI2_DX1), (IEN | PTD | DIS |M0)) /*CSI2_DX1*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(CSI2_DY1), (IEN | PTD | DIS |M0)) /*CSI2_DY1*/\ -/* Audio Interface */\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCBSP2_FSX), (IEN | PTD | DIS |M0)) /*McBSP2_FSX*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (MCBSP2_CLKX ), (IEN |PTD |DIS |M0 ))/*McBSP2_CLK*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCBSP2_DR), (IEN | PTD | DIS |M0)) /*McBSP2_DR*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCBSP2_DX), (IDIS | PTD | DIS |M0)) /*McBSP2_DX*/\ -/* Expansion card */\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC1_CLK), (IDIS | PTU | EN |M0)) /*MMC1_CLK*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC1_CMD), (IEN | PTU | EN |M0)) /*MMC1_CMD*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC1_DAT0), (IEN | PTU | EN |M0)) /*MMC1_DAT0*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC1_DAT1), (IEN | PTU | EN |M0)) /*MMC1_DAT1*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC1_DAT2), (IEN | PTU | EN |M0)) /*MMC1_DAT2*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC1_DAT3), (IEN | PTU | EN |M0)) /*MMC1_DAT3*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC1_DAT4), (IEN | PTU | EN |M0)) /*MMC1_DAT4*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC1_DAT5), (IEN | PTU | EN |M0)) /*MMC1_DAT5*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC1_DAT6), (IEN | PTU | EN |M0)) /*MMC1_DAT6*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC1_DAT7), (IEN | PTU | EN |M0)) /*MMC1_DAT7*/\ -/* Wireless LAN */\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN |M4)) /*GPIO_130*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN |M4)) /*GPIO_131*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN |M4)) /*GPIO_132*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN |M4)) /*GPIO_133*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN |M4)) /*GPIO_134*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN |M4)) /*GPIO_135*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN |M4)) /*GPIO_136*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN |M4)) /*GPIO_137*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN |M4)) /*GPIO_138*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN |M4)) /*GPIO_139*/\ -/* Bluetooth */\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS |M1)) /*UART2_CTS*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCBSP3_DR), (IDIS | PTD | DIS |M1)) /*UART2_RTS*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (MCBSP3_CLKX ), (IDIS |PTD |DIS |M1 ))/*UART2_TX*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCBSP3_FSX), (IEN | PTD | DIS |M1)) /*UART2_RX*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(UART2_CTS), (IEN | PTD | DIS |M4)) /*GPIO_144*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(UART2_RTS), (IEN | PTD | DIS |M4)) /*GPIO_145*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(UART2_TX), (IEN | PTD | DIS |M4)) /*GPIO_146*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(UART2_RX), (IEN | PTD | DIS |M4)) /*GPIO_147*/\ -/* Modem Interface */\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(UART1_TX), (IDIS | PTD | DIS |M0)) /*UART1_TX*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(UART1_RTS), (IDIS | PTD | DIS |M4)) /*GPIO_149*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(UART1_CTS), (IDIS | PTD | DIS |M4)) /*GPIO_150*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(UART1_RX), (IEN | PTD | DIS |M0)) /*UART1_RX*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (MCBSP4_CLKX ), (IEN |PTD |DIS |M1 ))/*SSI1_DAT*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCBSP4_DR), (IEN | PTD | DIS |M1)) /*SSI1_FLAG*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCBSP4_DX), (IEN | PTD | DIS |M1)) /*SSI1_RDY*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCBSP4_FSX), (IEN | PTD | DIS |M1)) /*SSI1_WAKE*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (MCBSP1_CLKR ), (IDIS |PTD |DIS |M4 ))/*GPIO_156*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCBSP1_FSR), (IDIS | PTU | EN |M4)) /*GPIO_157*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCBSP1_DX), (IDIS | PTD | DIS |M4)) /*GPIO_158*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCBSP1_DR), (IDIS | PTD | DIS |M4)) /*GPIO_159*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCBSP_CLKS), (IEN | PTU | DIS |M0)) /*McBSP_CLKS*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCBSP1_FSX), (IDIS | PTD | DIS |M4)) /*GPIO_161*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (MCBSP1_CLKX ), (IDIS |PTD |DIS |M4 ))/*GPIO_162*/\ -/* Serial Interface */\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (UART3_CTS_RCTX ), (IEN |PTD |EN |M0 ))/*UART3_CTS*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (UART3_RTS_SD ), (IDIS |PTD |DIS |M0 ))/*UART3_RTS*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (UART3_RX_IRRX ), (IEN |PTD |DIS |M0 ))/*UART3_RX*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (UART3_TX_IRTX ), (IDIS |PTD |DIS |M0 ))/*UART3_TX*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(HSUSB0_CLK), (IEN | PTD | DIS |M0)) /*HSUSB0_CLK*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(HSUSB0_STP), (IDIS | PTU | EN |M0)) /*HSUSB0_STP*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(HSUSB0_DIR), (IEN | PTD | DIS |M0)) /*HSUSB0_DIR*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(HSUSB0_NXT), (IEN | PTD | DIS |M0)) /*HSUSB0_NXT*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (HSUSB0_DATA0 ), (IEN |PTD |DIS |M0 ))/*HSUSB0_DA0*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (HSUSB0_DATA1 ), (IEN |PTD |DIS |M0 ))/*HSUSB0_DA1*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (HSUSB0_DATA2 ), (IEN |PTD |DIS |M0 ))/*HSUSB0_DA2*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (HSUSB0_DATA3 ), (IEN |PTD |DIS |M0 ))/*HSUSB0_DA3*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (HSUSB0_DATA4 ), (IEN |PTD |DIS |M0 ))/*HSUSB0_DA4*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (HSUSB0_DATA5 ), (IEN |PTD |DIS |M0 ))/*HSUSB0_DA5*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (HSUSB0_DATA6 ), (IEN |PTD |DIS |M0 ))/*HSUSB0_DA6*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (HSUSB0_DATA7 ), (IEN |PTD |DIS |M0 ))/*HSUSB0_DA7*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(I2C1_SCL), (IEN | PTU | EN |M0)) /*I2C1_SCL*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(I2C1_SDA), (IEN | PTU | EN |M0)) /*I2C1_SDA*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(I2C2_SCL), (IEN | PTU | EN |M4)) /*GPIO_168*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(I2C2_SDA), (IEN | PTU | EN |M4)) /*GPIO_183*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(I2C3_SCL), (IEN | PTU | EN |M0)) /*I2C3_SCL*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(I2C3_SDA), (IEN | PTU | EN |M0)) /*I2C3_SDA*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(I2C4_SCL), (IEN | PTU | EN |M0)) /*I2C4_SCL*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(I2C4_SDA), (IEN | PTU | EN |M0)) /*I2C4_SDA*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (HDQ_SIO ), (IDIS |PTU |EN |M4 ))/*GPIO_170*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCSPI1_CLK), (IEN | PTU | EN |M4)) /*GPIO_171*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (MCSPI1_SIMO ), (IEN |PTU |EN |M4 ))/*GPIO_172*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (MCSPI1_SOMI ), (IEN |PTD |DIS |M0 ))/*McSPI1_SOM*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCSPI1_CS0), (IEN | PTD | EN |M0)) /*McSPI1_CS0*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCSPI1_CS1), (IDIS | PTD | EN |M0)) /*McSPI1_CS1*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCSPI1_CS2), (IDIS | PTD | DIS |M4)) /*GPIO_176*/\ -/* USB EHCI (port 2) */\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCSPI1_CS3), (IEN | PTU | DIS |M3)) /*HSUSB2_DA2*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCSPI2_CLK), (IEN | PTU | DIS |M3)) /*HSUSB2_DA7*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (MCSPI2_SIMO ), (IEN |PTU |DIS |M3 ))/*HSUSB2_DA4*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (MCSPI2_SOMI ), (IEN |PTU |DIS |M3 ))/*HSUSB2_DA5*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCSPI2_CS0), (IEN | PTU | DIS |M3)) /*HSUSB2_DA6*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCSPI2_CS1), (IEN | PTU | DIS |M3)) /*HSUSB2_DA3*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (ETK_D10_ES2 ), (IDIS |PTU |DIS |M3 ))/*HSUSB2_CLK*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (ETK_D11_ES2 ), (IDIS |PTU |DIS |M3 ))/*HSUSB2_STP*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (ETK_D12_ES2 ), (IEN |PTU |DIS |M3 ))/*HSUSB2_DIR*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (ETK_D13_ES2 ), (IEN |PTU |DIS |M3 ))/*HSUSB2_NXT*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (ETK_D14_ES2 ), (IEN |PTU |DIS |M3 ))/*HSUSB2_DA0*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (ETK_D15_ES2 ), (IEN |PTU |DIS |M3 ))/*HSUSB2_DA1*/\ -/* Control and debug */\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (SYS_32K ), (IEN |PTD |DIS |M0 ))/*SYS_32K*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SYS_CLKREQ), (IEN | PTD | DIS |M0)) /*SYS_CLKREQ*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SYS_NIRQ), (IEN | PTU | EN |M0)) /*SYS_nIRQ*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SYS_BOOT0), (IEN | PTD | DIS |M4)) /*GPIO_2*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SYS_BOOT1), (IEN | PTD | DIS |M4)) /*GPIO_3*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SYS_BOOT2), (IEN | PTD | DIS |M4)) /*MMC1_WP*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SYS_BOOT3), (IEN | PTD | DIS |M4)) /*GPIO_5*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SYS_BOOT4), (IEN | PTD | DIS |M4)) /*GPIO_6*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SYS_BOOT5), (IEN | PTD | DIS |M4)) /*GPIO_7*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SYS_BOOT6), (IDIS | PTD | DIS |M4)) /*GPIO_8*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (SYS_OFF_MODE ), (IEN |PTD |DIS |M0 ))/*SYS_OFF_MD*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (SYS_CLKOUT1 ), (IEN |PTD |DIS |M0 ))/*SYS_CLKOUT*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (SYS_CLKOUT2 ), (IEN |PTU |EN |M4 ))/*GPIO_186*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (ETK_CLK_ES2 ), (IDIS |PTU |EN |M3 ))/*HSUSB1_STP*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (ETK_CTL_ES2 ), (IDIS |PTU |DIS |M3 ))/*HSUSB1_CLK*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(ETK_D0_ES2), (IEN | PTU | DIS |M3)) /*HSUSB1_DA0*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(ETK_D1_ES2), (IEN | PTU | DIS |M3)) /*HSUSB1_DA1*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(ETK_D2_ES2), (IEN | PTU | DIS |M3)) /*HSUSB1_DA2*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(ETK_D3_ES2), (IEN | PTU | DIS |M3)) /*HSUSB1_DA7*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(ETK_D4_ES2), (IEN | PTU | DIS |M3)) /*HSUSB1_DA4*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(ETK_D5_ES2), (IEN | PTU | DIS |M3)) /*HSUSB1_DA5*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(ETK_D6_ES2), (IEN | PTU | DIS |M3)) /*HSUSB1_DA6*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(ETK_D7_ES2), (IEN | PTU | DIS |M3)) /*HSUSB1_DA3*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(ETK_D8_ES2), (IEN | PTU | DIS |M3)) /*HSUSB1_DIR*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(ETK_D9_ES2), (IEN | PTU | DIS |M3)) /*HSUSB1_NXT*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD1), (IEN | PTD | EN |M0)) /*d2d_mcad1*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD2), (IEN | PTD | EN |M0)) /*d2d_mcad2*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD3), (IEN | PTD | EN |M0)) /*d2d_mcad3*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD4), (IEN | PTD | EN |M0)) /*d2d_mcad4*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD5), (IEN | PTD | EN |M0)) /*d2d_mcad5*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD6), (IEN | PTD | EN |M0)) /*d2d_mcad6*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD7), (IEN | PTD | EN |M0)) /*d2d_mcad7*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD8), (IEN | PTD | EN |M0)) /*d2d_mcad8*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD9), (IEN | PTD | EN |M0)) /*d2d_mcad9*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD10), (IEN | PTD | EN |M0)) /*d2d_mcad10*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD11), (IEN | PTD | EN |M0)) /*d2d_mcad11*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD12), (IEN | PTD | EN |M0)) /*d2d_mcad12*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD13), (IEN | PTD | EN |M0)) /*d2d_mcad13*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD14), (IEN | PTD | EN |M0)) /*d2d_mcad14*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD15), (IEN | PTD | EN |M0)) /*d2d_mcad15*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD16), (IEN | PTD | EN |M0)) /*d2d_mcad16*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD17), (IEN | PTD | EN |M0)) /*d2d_mcad17*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD18), (IEN | PTD | EN |M0)) /*d2d_mcad18*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD19), (IEN | PTD | EN |M0)) /*d2d_mcad19*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD20), (IEN | PTD | EN |M0)) /*d2d_mcad20*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD21), (IEN | PTD | EN |M0)) /*d2d_mcad21*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD22), (IEN | PTD | EN |M0)) /*d2d_mcad22*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD23), (IEN | PTD | EN |M0)) /*d2d_mcad23*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD24), (IEN | PTD | EN |M0)) /*d2d_mcad24*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD25), (IEN | PTD | EN |M0)) /*d2d_mcad25*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD26), (IEN | PTD | EN |M0)) /*d2d_mcad26*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD27), (IEN | PTD | EN |M0)) /*d2d_mcad27*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD28), (IEN | PTD | EN |M0)) /*d2d_mcad28*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD29), (IEN | PTD | EN |M0)) /*d2d_mcad29*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD30), (IEN | PTD | EN |M0)) /*d2d_mcad30*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD31), (IEN | PTD | EN |M0)) /*d2d_mcad31*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD32), (IEN | PTD | EN |M0)) /*d2d_mcad32*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD33), (IEN | PTD | EN |M0)) /*d2d_mcad33*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD34), (IEN | PTD | EN |M0)) /*d2d_mcad34*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD35), (IEN | PTD | EN |M0)) /*d2d_mcad35*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MCAD36), (IEN | PTD | EN |M0)) /*d2d_mcad36*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (D2D_CLK26MI ), (IEN |PTD |DIS |M0 ))/*d2d_clk26m*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (D2D_NRESPWRON ), (IEN |PTD |EN |M0 ))/*d2d_nrespw*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (D2D_NRESWARM ), (IEN |PTU |EN |M0 ))/*d2d_nreswa*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (D2D_ARM9NIRQ ), (IEN |PTD |DIS |M0 ))/*d2d_arm9ni*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (D2D_UMA2P6FIQ ), (IEN |PTD |DIS |M0 ))/*d2d_uma2p6*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_SPINT), (IEN | PTD | EN |M0)) /*d2d_spint*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_FRINT), (IEN | PTD | EN |M0)) /*d2d_frint*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (D2D_DMAREQ0 ), (IEN |PTD |DIS |M0 ))/*d2d_dmare0*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (D2D_DMAREQ1 ), (IEN |PTD |DIS |M0 ))/*d2d_dmare1*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (D2D_DMAREQ2 ), (IEN |PTD |DIS |M0 ))/*d2d_dmare2*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (D2D_DMAREQ3 ), (IEN |PTD |DIS |M0 ))/*d2d_dmare3*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (D2D_N3GTRST ), (IEN |PTD |DIS |M0 ))/*d2d_n3gtrs*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_N3GTDI), (IEN | PTD | DIS |M0)) /*d2d_n3gtdi*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_N3GTDO), (IEN | PTD | DIS |M0)) /*d2d_n3gtdo*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_N3GTMS), (IEN | PTD | DIS |M0)) /*d2d_n3gtms*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_N3GTCK), (IEN | PTD | DIS |M0)) /*d2d_n3gtck*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (D2D_N3GRTCK ), (IEN |PTD |DIS |M0 ))/*d2d_n3grtc*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MSTDBY), (IEN | PTU | EN |M0)) /*d2d_mstdby*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (D2D_SWAKEUP ), (IEN |PTD |EN |M0 ))/*d2d_swakeu*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (D2D_IDLEREQ ), (IEN |PTD |DIS |M0 ))/*d2d_idlere*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (D2D_IDLEACK ), (IEN |PTU |EN |M0 ))/*d2d_idleac*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MWRITE), (IEN | PTD | DIS |M0)) /*d2d_mwrite*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_SWRITE), (IEN | PTD | DIS |M0)) /*d2d_swrite*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_MREAD), (IEN | PTD | DIS |M0)) /*d2d_mread*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(D2D_SREAD), (IEN | PTD | DIS |M0)) /*d2d_sread*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (D2D_MBUSFLAG ), (IEN |PTD |DIS |M0 ))/*d2d_mbusfl*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (D2D_SBUSFLAG ), (IEN |PTD |DIS |M0 ))/*d2d_sbusfl*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_CKE0), (IDIS | PTU | EN |M0)) /*sdrc_cke0*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(SDRC_CKE1), (IDIS | PTU | EN |M0)) /*sdrc_cke1*/ -
board/nokia/rx51/rx51.h +0
-2-#define MUX_RX51_C () \ - MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS |M4)) /*GPIO_140*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS |M4)) /*GPIO_142*/\
board/nokia/rx51/rx51.h +0
-1-MUX_VAL (CP (MCBSP3_CLKX ), (IEN |PTD |DIS |M4 ))/*GPIO_141*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(UART2_CTS), (IEN | PTU | EN |M0)) /*UART2_CTS*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(UART2_RTS), (IDIS | PTD | DIS |M0)) /*UART2_RTS*/\
board/nokia/rx51/rx51.h +0
-1- MUX_VAL(CP(UART2_TX), (IDIS | PTD | DIS |
Quoted 4 lines
M0)) /*UART2_TX*/ -
#defineONENAND_GPMC_CONFIG1_RX510xfb001202
#defineONENAND_GPMC_CONFIG2_RX510x00111100
#defineONENAND_GPMC_CONFIG3_RX510x00020200
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/bb3c0731/attachment.sig>
PATCH RESEND v2 15/16 Nokia RX-51: Move content of rx51.h to rx51.c
In reply to Pali RohárQuoted 67 lines · On Fri, 5 Feb 2021 20:12:11 +0100 Pali Roh?r <[email protected]> wrote:
After removal of MUX configuration there is no need to have extra
rx51.h.Signed-off-by Pali Roh?r <[email protected]>--- board/nokia/rx51/rx51.c | 17 ++++++++++++++++- board/nokia/rx51/rx51.h | 31 ------------------------------- 2 files changed, 16 insertions(+), 32 deletions(-) delete mode 100644 board/nokia/rx51/rx51.hboard/nokia/rx51/rx51.c +16
-1@@ -39,9 +39,24 @@#include <asm/arch/sys_proto.h> #include <asm/arch/mmc_host_def.h> -#include "rx51.h" #include "tag_omap.h" +/* Needed for ROM SMC call */ +struct emu_hal_params_rx51 { +u32 num_params; +u32 param1; +u32 param2; +u32 param3; +u32 param4; +}; + +#define ONENAND_GPMC_CONFIG1_RX51 0xfb001202 +#define ONENAND_GPMC_CONFIG2_RX51 0x00111100 +#define ONENAND_GPMC_CONFIG3_RX51 0x00020200 +#define ONENAND_GPMC_CONFIG4_RX51 0x11001102 +#define ONENAND_GPMC_CONFIG5_RX51 0x03101616 +#define ONENAND_GPMC_CONFIG6_RX51 0x90060000 +DECLARE_GLOBAL_DATA_PTR ;GraphicDevice gdev;board/nokia/rx51/rx51.h deleted +0
-21@@ -1,31 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* -* (C) Copyright 2012 -* ?????? ???????? <[email protected]> -* -* (C) Copyright 2011-2012 -* Pali Roh?r <[email protected]> -* -* (C) Copyright 2008 -* Dirk Behme <[email protected]> -*/ -#ifndef _RX51_H_ -#define _RX51_H_ - -/* Needed for ROM SMC call */ -struct emu_hal_params_rx51 { - u32 num_params; - u32 param1; - u32 param2; - u32 param3; - u32 param4;
board/nokia/rx51/rx51.h line 31
Quoted 10 lines
board/nokia/rx51/rx51.h deleted +0
-10-}; - -#define ONENAND_GPMC_CONFIG1_RX51 0xfb001202 -#define ONENAND_GPMC_CONFIG2_RX51 0x00111100 -#define ONENAND_GPMC_CONFIG3_RX51 0x00020200 -#define ONENAND_GPMC_CONFIG4_RX51 0x11001102 -#define ONENAND_GPMC_CONFIG5_RX51 0x03101616 -#define ONENAND_GPMC_CONFIG6_RX51 0x90060000 - -#endif
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/acbb3bd7/attachment.sig>
PATCH RESEND v2 16/16 Nokia RX-51: Enable usbtty serial console by default
In reply to Pali RohárQuoted 141 lines · On Fri, 5 Feb 2021 20:12:12 +0100 Pali Roh?r <[email protected]> wrote:
Now when usbtty serial console is fixed in U-Boot enable
CONFIG_USB_TTYfor Nokia RX-51 board by default.Fix also USB product id as U-Boot ignores
CONFIG_USBD_PRODUCTIDmacro and include U-Boot string into USB product name to indicate usage of U-Boot.
CONFIG_CONSOLE_MUXis already used and U-Boot console is available for all in/out devices. Therefore there is no need to have separate commands 'run sercon', 'run usbcon' and 'run vgacon', so remove them.As space for U-Boot is limited to 256kB, disable some other unused options so
CONFIG_USB_TTYcan be enabled.Nokia RX-51 does not have easily accessible UART serial console so the only option for easy debugging is to use device's keyboard+screen or this usbtty serial console over USB.
Signed-off-by Pali Roh?r <[email protected]>--- configs/nokia_rx51_defconfig | 7 ++++--- doc/README.nokia_rx51 | 15 +-------------- include/configs/nokia_rx51.h | 21 +++++++-------------- 3 files changed, 12 insertions(+), 31 deletions(-)(quoted diff) +0
-0b/configs/nokia_rx51_defconfig index
3b782715c7..bce55c4fe5100644configs/nokia_rx51_defconfig +4
-3@@ -13,6 +13,7 @@ CONFIG_AUTOBOOT_MENU_SHOW=y CONFIG_USE_PREBOOT=y CONFIG_PREBOOT="run preboot" CONFIG_CONSOLE_MUX=y +# CONFIG_SYS_DEVICE_NULLDEV is not set CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Nokia RX-51 # " # CONFIG_CMD_BDI is not set@@ -47,9 +48,11 @@ CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y # CONFIG_NET is not set CONFIG_DM=y +# CONFIG_DM_WARN is not set # CONFIG_DM_DEVICE_REMOVE is not set +# CONFIG_DM_SEQ_ALIAS is not set +# CONFIG_BLOCK_CACHE is not set CONFIG_DM_I2C=y -CONFIG_TWL4030_LED=y CONFIG_DM_MMC=y # CONFIG_MMC_HW_PARTITIONING is not set # CONFIG_MMC_VERBOSE is not set@@ -59,10 +62,8 @@ CONFIG_CONS_INDEX=3 CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_USB=y -CONFIG_USB_MUSB_HCD=y CONFIG_USB_MUSB_UDC=y CONFIG_USB_OMAP3=y -CONFIG_TWL4030_USB=y CONFIG_CFB_CONSOLE=y CONFIG_CFB_CONSOLE_ANSI=y # CONFIG_VGA_AS_SINGLE_DEVICE is not setdoc/README.nokia_rx51 +0
-0@@ -24,8 +24,7 @@ called u-boot-gen-combined. It is available infollowing repository: There is support for hardware watchdog. Hardware watchdog is started by NOLO so u-boot must kick watchdog to prevent reboot device (but not very often, max every 2 seconds). There is also support for framebuffer display -output with ANSI escape codes and the N900 HW keyboard input. USB tty works -but is disabled because it prevents the current Maemo kernel from booting. +output with ANSI escape codes and the N900 HW keyboard input.
When U-Boot is starting it enable IBE bit in Auxiliary Control
Register, which is needed for Thumb-2 ISA support. It is workaround for errata 430973. @@ -49,10 +48,6 @@ Boot from SD or eMMC in this order:
Available additional commands/variables:- * run sercon - Use serial port for control
- * run usbcon - Use usbtty for control
- * run vgacon - Use framebuffer and HW keyboard for control (default) -
* run sdboot - Boot from external SD card (see boot order)
* run emmcboot - Boot from internal eMMC memory (see boot order)
* run attachboot - Boot attached kernel image (attached to U-Boot
binary) @@ -87,14 +82,6 @@ Additional variables for booting kernel:
and u-boot standard output is set to serial thensetup_console_atag
is automatically set to 1. So output from Maemo kernel would go to serial port.doc/README.nokia_rx51 +0
-3-USB TTY: - - Maemo kernel 2.6.28 will crash if u-boot enable usb tty. So USB TTYis disabled.
- For enabling USB TTY just add this line to fileinclude/configs/nokia_rx51.h-
- #defineCONFIG_USB_TTYdoc/README.nokia_rx51 +0
-2- - UBIFS support: UBIFS support is disabled, because U-Boot image is too big andcannot be diff --git
a/include/configs/nokia_rx51.hb/include/configs/nokia_rx51.hindex3f2700d8e2..23368de624100644include/configs/nokia_rx51.h +7
-11@@ -70,10 +70,12 @@/* USB device configuration */ #define CONFIG_USB_DEVICE +#define CONFIG_USB_TTY #define CONFIG_USBD_VENDORID 0x0421 -#define CONFIG_USBD_PRODUCTID 0x01c8 +#define CONFIG_USBD_PRODUCTID_CDCACM 0x01c8 +#define CONFIG_USBD_PRODUCTID_GSERIAL 0x01c8#define CONFIG_USBD_MANUFACTURER "Nokia" -#define CONFIG_USBD_PRODUCT_NAME "N900" +#define CONFIG_USBD_PRODUCT_NAME "N900 (U-Boot)"#define GPIO_SLIDE 71@@ -108,15 +110,9 @@ int rx51_kp_getc(struct stdio_dev *sdev);/* Environment information */ #define CONFIG_EXTRA_ENV_SETTINGS \ "usbtty=cdc_acm\0" \ - "stdin=serial,vga\0" \ - "stdout=serial,vga\0" \ - "stderr=serial,vga\0" \ - "setcon=setenv stdin ${con};" \ - "setenv stdout ${con};" \ - "setenv stderr ${con}\0" \ - "sercon=setenv con serial; run setcon\0" \ - "usbcon=setenv con usbtty; run setcon\0" \ - "vgacon=setenv con vga; run setcon\0" \ + "stdin=usbtty,serial,vga\0" \ + "stdout=usbtty,serial,vga\0" \ + "stderr=usbtty,serial,vga\0" \ "slide=gpio input " __stringify(GPIO_SLIDE) "\0" \ "switchmmc=mmc dev ${mmcnum}\0" \ "kernaddr=0x82008000\0" \
include/configs/nokia_rx51.h int rx51_kp_getc(struct stdio_dev *sdev); · line 199
Quoted 9 lines
include/configs/nokia_rx51.h +0
-3@@ -198,9 +194,6 @@ int rx51_kp_getc(struct stdio_dev *sdev);#define CONFIG_POSTBOOTMENU \ "echo;" \ "echo Extra commands:;" \ - "echo run sercon - Use serial port for control.;" \ - "echo run usbcon - Use usbtty for control.;" \ - "echo run vgacon - Use framebuffer/keyboard.;" \ "echo run sdboot - Boot from SD card slot.;" \ "echo run emmcboot - Boot internal eMMC memory.;" \ "echo run attachboot - Boot attached kernel image.;" \
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210206/859d7c3f/attachment.sig>
PATCH RESEND v2 12/16 arm: omap3: Compile lowlevel_init() function only when it is used
In reply to Pali RohárQuoted 23 lines · Pali Roh?r
Function
lowlevel_init()is called only fromcpu_init_crit()and this function is wrapped into #if .. #endif section. So compile alsolowlevel_init()function under same #if condition.Signed-off-by Pali Roh?r <[email protected]>--- arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)arch/arm/mach-omap2/omap3/lowlevel_init.S +1
-1@@ -45,7 +45,7 @@ ENDPROC(do_omap3_emu_romcode_call) ENTRY(cpy_clk_code) /* Copy DPLL code into SRAM */ adr r0, go_to_speed /* copy from start of go_to_speed... */ - adr r2, lowlevel_init /* ... up to start of low_level_init */ + adr r2, go_to_speed_end /* ... up to start of go_to_speed_end */ next2: ldmia r0!, {r3 - r10} /* copy from source address [r0] */ stmia r1!, {r3 - r10} /* copy to target address [r1] */
arch/arm/mach-omap2/omap3/lowlevel_init.S pll_div_add5: · line 171
Quoted 5 lines
arch/arm/mach-omap2/omap3/lowlevel_init.S +1
-0@@ -167,8 +167,11 @@ pll_div_add5: pll_div_val5: .word CLSEL1_EMU_VAL +go_to_speed_end: #endif
This hunk above seems like an unrelated change ^ ?
Quoted 14 lines
arch/arm/mach-omap2/omap3/lowlevel_init.S +3
-0+#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && \ + !defined(CONFIG_SKIP_LOWLEVEL_INIT_ONLY) ENTRY(lowlevel_init) ldr sp, SRAM_STACK str ip, [sp] /* stash ip register */@@ -187,6 +190,7 @@ ENTRY(lowlevel_init) b s_init ENDPROC(lowlevel_init) +#endif /* the literal pools origin */ .ltorg
[...]
PATCH RESEND 12/16 arm: omap3: Compile lowlevel_init() function only when it is used
Quoted 22 lines · On Saturday 06 February 2021 16:40:18 Marek Vasut wrote:
Quoted 21 lines · Pali Roh?r
Function
lowlevel_init()is called only fromcpu_init_crit()and this function is wrapped into #if .. #endif section. So compile alsolowlevel_init()function under same #if condition.Signed-off-by Pali Roh?r <[email protected]>--- arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)arch/arm/mach-omap2/omap3/lowlevel_init.S +1
-1@@ -45,7 +45,7 @@ ENDPROC(do_omap3_emu_romcode_call) ENTRY(cpy_clk_code) /* Copy DPLL code into SRAM */ adr r0, go_to_speed /* copy from start of go_to_speed... */ - adr r2, lowlevel_init /* ... up to start of low_level_init */ + adr r2, go_to_speed_end /* ... up to start of go_to_speed_end */ next2: ldmia r0!, {r3 - r10} /* copy from source address [r0] */
Quoted 8 lines
arch/arm/mach-omap2/omap3/lowlevel_init.S pll_div_add5: · line 170
Quoted 6 lines
arch/arm/mach-omap2/omap3/lowlevel_init.S +1
-0stmia r1!, {r3 - r10} /* copy to target address [r1] */@@ -167,8 +167,11 @@ pll_div_add5: pll_div_val5: .word CLSEL1_EMU_VAL +go_to_speed_end: #endifThis hunk above seems like an unrelated change ^ ?
Entry 'lowlevel_init' is defined 3 lines below and is available only when !CONFIG_SKIP_LOWLEVEL_INIT && !CONFIG_SKIP_LOWLEVEL_INIT_ONLY.
Few lines above is code which copies DPLL code into SRAM and this code ends at address where 'lowlevel_init' entry starts.
Entry 'cpy_clk_code' is compiled also when CONFIG_SKIP_LOWLEVEL_INIT is defined, therefore it is required to define label which is outside of the #if code defined below and ends after the 'go_to_speed' code.
So I defined a new 'go_to_speed_end' label to allow compiling 'cpy_clk_code' entry when CONFIG_SKIP_LOWLEVEL_INIT is defined.
Quoted 14 lines
Quoted 12 lines
arch/arm/mach-omap2/omap3/lowlevel_init.S +3
-0+#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && \ + !defined(CONFIG_SKIP_LOWLEVEL_INIT_ONLY) ENTRY(lowlevel_init) ldr sp, SRAM_STACK str ip, [sp] /* stash ip register */@@ -187,6 +190,7 @@ ENTRY(lowlevel_init) b s_init ENDPROC(lowlevel_init) +#endif /* the literal pools origin */ .ltorg[...]
PATCH RESEND v2 12/16 arm: omap3: Compile lowlevel_init() function only when it is used
Quoted 38 lines · Pali Roh?r
Quoted 22 lines · On Saturday 06 February 2021 16:40:18 Marek Vasut wrote:
Quoted 21 lines · Pali Roh?r
Function
lowlevel_init()is called only fromcpu_init_crit()and this function is wrapped into #if .. #endif section. So compile alsolowlevel_init()function under same #if condition.Signed-off-by Pali Roh?r <[email protected]>--- arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)arch/arm/mach-omap2/omap3/lowlevel_init.S +1
-1@@ -45,7 +45,7 @@ ENDPROC(do_omap3_emu_romcode_call) ENTRY(cpy_clk_code) /* Copy DPLL code into SRAM */ adr r0, go_to_speed /* copy from start of go_to_speed... */ - adr r2, lowlevel_init /* ... up to start of low_level_init */ + adr r2, go_to_speed_end /* ... up to start of go_to_speed_end */ next2: ldmia r0!, {r3 - r10} /* copy from source address [r0] */Quoted 8 lines
arch/arm/mach-omap2/omap3/lowlevel_init.S pll_div_add5: · line 170
Quoted 6 lines
arch/arm/mach-omap2/omap3/lowlevel_init.S +1
-0stmia r1!, {r3 - r10} /* copy to target address [r1] */@@ -167,8 +167,11 @@ pll_div_add5: pll_div_val5: .word CLSEL1_EMU_VAL +go_to_speed_end: #endifThis hunk above seems like an unrelated change ^ ?
Entry '
lowlevel_init' is defined 3 lines below and is available only when !CONFIG_SKIP_LOWLEVEL_INIT && !CONFIG_SKIP_LOWLEVEL_INIT_ONLY.Few lines above is code which copies DPLL code into SRAM and this code ends at address where '
lowlevel_init' entry starts.
Quoted 6 lines
Entry '
cpy_clk_code' is compiled also whenCONFIG_SKIP_LOWLEVEL_INITis defined, therefore it is required to define label which is outside of the #if code defined below and ends after the 'go_to_speed' code.So I defined a new '
go_to_speed_end' label to allow compiling 'cpy_clk_code' entry whenCONFIG_SKIP_LOWLEVEL_INITis defined.
Can you add exactly this description to the commit message -- the change isn't immediately obviously, collect the RBs and resend the patchset, so it can be picked ?
Thanks
v2 cover Nokia RX-51: Fix USB TTY console and enable it
In reply to Pali RohárResended v2 patch series with fixed commit messages
This patch series fix usbtty code (serial console via USB peripheral mode), fix underlying musb peripheral code, fix compilation of CONFIG_USB_DEVICE (used by usbtty), remove unused Nokia RX-51 code to decrease size of U-Boot binary and finally enable usbtty serial console for Nokia RX-51.
With this patch series debugging of Nokia RX-51 can be done also via USB serial console.
It fixes also stability of musb code and allows usage of file transfers via Kermit protocol on Nokia RX-51. Kermit file transfer via U-Boot loadb command is stable on Nokia N900 and gives about 52kB/s transfer rate.
On computer this serial console is accessible via /dev/ttyACM0 device.
Pali Roh?r (16):
serial: usbtty: Fix puts function
serial: usbtty: Send urb data in correct order
usb: musb: Fix compilation of gadget code
usb: musb: Always clear the data toggle bit when configuring ep
usb: musb: Fix configuring FIFO for endpoints
usb: musb: Read value of PERI_RXCSR to 16bit variable
usb: musb: Fix transmission of bigger buffers
usb: musb: Fix receiving of bigger buffers
usb: musb: Fix handling interrupts for EP0 and SET ADDRESS commmand
usb: musb: Ensure that we set musb dynamic FIFO buffer for every
endpoint
usb: gadget: Use dbg_ep0() macro instead of serial_printf()
arm: omap3: Compile lowlevel_init() function only when it is used
arm: omap3: Compile s_init() function only when it is used Nokia RX-51: Remove function set_muxconf_regs()
Nokia RX-51: Move content of rx51.h to rx51.c
Nokia RX-51: Enable usbtty serial console by default
Makefile | 1 + arch/arm/mach-omap2/omap3/board.c | 3 + arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +- board/nokia/rx51/rx51.c | 28 +- board/nokia/rx51/rx51.h | 377 ---------------------- configs/nokia_rx51_defconfig | 7 +- doc/README.nokia_rx51 | 15 +- drivers/serial/usbtty.c | 16 +- drivers/usb/gadget/ep0.c | 16 +- drivers/usb/musb/musb_core.c | 12 +- drivers/usb/musb/musb_udc.c | 61 ++-- include/configs/nokia_rx51.h | 21 +- 12 files changed, 82 insertions(+), 481 deletions(-) delete mode 100644 board/nokia/rx51/rx51.h
Signature · 1 line
2.20.1
PATCH RESEND v2 1/16 serial: usbtty: Fix puts function
This function has incorrect implementation of prepending CR prior LF. Without this patch it prepended CR prior whole string which is going to be written and let LF without leading CR. Fix this issue by inserting CR at correct place to make output on usbtty serial console more readable.
--- drivers/serial/usbtty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/serial/usbtty.c +2 -2
@@ -500,8 +500,8 @@ void usbtty_puts(struct stdio_dev *dev, const char *str) n =next_nl_pos (str);if (str[n] =='\n' ) { -__usbtty_puts ("\r" ,1 ); -__usbtty_puts (str, n +1 ); +__usbtty_puts (str, n); +__usbtty_puts ("\r\n" ,2 ); str += (n +1 ); len -= (n +1 ); }else {
Signature · 1 line
2.20.1
PATCH RESEND v2 2/16 serial: usbtty: Send urb data in correct order
In reply to Pali RohárFunction next_urb() selects the last urb data buffer from linked list to which next data from usbtty's puts function should be appended.
But to check if TX data still exists it is needed to look at the first urb data buffer from linked list. So check for endpoint->tx_urb (first from the linked list) instead of current_urb (the last from the linked list).
Successful call to udc_endpoint_write() may invalidate active urb and allocate new urb in queue which invalidates pointer returned by next_urb() function.
So call next_urb() prior putting data into urb buffer and call it every time after using udc_endpoint_write() function to prevent sending data from usbtty's puts function in incorrect order.
This patch fixes issue that usbtty code does not transmit data when they are waiting in the tx queue.
--- drivers/serial/usbtty.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
drivers/serial/usbtty.c +3 -9
@@ -849,17 +849,9 @@ static int write_buffer (circbuf_t * buf) &endpoint_instance[tx_endpoint];struct urb *current_urb =NULL ; - current_urb =next_urb (device_instance, endpoint); - -if (!current_urb) { -TTYERR ("current_urb is NULL, buf->size %d\n" , - buf->size); -return 0 ; - } -/* TX data still exists - send it now */ -if (endpoint->sent < current_urb->actual_length){ +if (endpoint->sent < endpoint->tx_urb->actual_length){if (udc_endpoint_write (endpoint)){/* Write pre-empted by RX */ return -1 ;
@@ -878,6 +870,8 @@ static int write_buffer (circbuf_t * buf)*/ while (buf->size >0 ) { + current_urb =next_urb (device_instance, endpoint); + dest = (char *)current_urb->buffer + current_urb->actual_length;
Signature · 1 line
2.20.1
PATCH RESEND v2 3/16 usb: musb: Fix compilation of gadget code
In reply to Pali Rohármusb udc code depends on usb gadget code provided by CONFIG_USB_DEVICE as defined in drivers/usb/gadget/Makefile. But this Makefile is not included into U-Boot build when CONFIG_USB_GADGET is not set. As CONFIG_USB_DEVICE cannot be enabled together with CONFIG_USB_GADGET it means that dependency for musb udc code is not compiled during build. Fix it by including drivers/usb/gadget dependency also when CONFIG_USB_DEVICE is set.
This patch fixes compile errors:
arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `musb_peri_ep0_rx':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `ep0_recv_setup'
arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `musb_peri_ep0_idle':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `ep0_recv_setup'
arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `musb_peri_ep0_zero_data_request':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq'
arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `musb_peri_ep0_idle':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `ep0_recv_setup'
arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `musb_peri_ep0_rx':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_rcv_complete'
arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `musb_peri_rx_ep':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_rcv_complete'
arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `udc_endpoint_write':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_tx_complete'
arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `udc_irq':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq'
arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to usbd_device_event_irq' arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to usbd_device_event_irq' arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to usbd_device_event_irq' arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to usbd_device_event_irq' arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o:u-boot/drivers/usb/musb/musb_udc.c: more undefined references to usbd_device_event_irq' follow arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function udc_setup_ep':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_alloc_urb'
arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `udc_startup_events':u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq'
arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to usbd_device_event_irq' arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to usbd_device_event_irq'
make: *** [Makefile:1762: u-boot] Error 1
--- Makefile | 1 + 1 file changed, 1 insertion(+)
Makefile +1 -0
@@ -792,6 +792,7 @@ libs-y += drivers/usb/dwc3/ libs-y += drivers/usb/common/ libs-y += drivers/usb/emul/ libs-y += drivers/usb/eth/ +libs-$(CONFIG_USB_DEVICE) += drivers/usb/gadget/ libs-$(CONFIG_USB_GADGET) += drivers/usb/gadget/ libs-$(CONFIG_USB_GADGET) += drivers/usb/gadget/udc/ libs-y += drivers/usb/host/
Signature · 1 line
2.20.1
PATCH RESEND v2 4/16 usb: musb: Always clear the data toggle bit when configuring ep
In reply to Pali RohárWithout this patch clearing was done only when U-Boot was compiled with MUSB Host Controller. But clearing of data toggle bit is needed also for MUSB Device Controller otherwise Device Controller does not work correctly.
--- drivers/usb/musb/musb_core.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/usb/musb/musb_core.c +0 -4
@@ -81,10 +81,8 @@ void musb_configure_ep(const struct musb_epinfo *epinfo, u8 cnt)config_fifo (tx, idx, fifoaddr); csr =readw (&musbr->txcsr); -#if defined(CONFIG_USB_MUSB_HCD )/* clear the data toggle bit */ writew (csr |MUSB_TXCSR_CLRDATATOG , &musbr->txcsr); -#endif /* Flush fifo if required */ if (csr &MUSB_TXCSR_TXPKTRDY ) writew(csr | MUSB_TXCSR_FLUSHFIFO,
@@ -94,10 +92,8 @@ void musb_configure_ep(const struct musb_epinfo *epinfo, u8 cnt)config_fifo (rx, idx, fifoaddr); csr =readw (&musbr->rxcsr); -#if defined(CONFIG_USB_MUSB_HCD )/* clear the data toggle bit */ writew (csr |MUSB_RXCSR_CLRDATATOG , &musbr->rxcsr); -#endif /* Flush fifo if required */ if (csr &MUSB_RXCSR_RXPKTRDY ) writew(csr | MUSB_RXCSR_FLUSHFIFO,
Signature · 1 line
2.20.1
PATCH RESEND v2 5/16 usb: musb: Fix configuring FIFO for endpoints
In reply to Pali RohárThis patch fixes configuring FIFOs for one-directional endpoints which have only one queue (either RX or TX, but noth both).
Size of FIFO buffer is 2^(idx+3) bytes and starting address is 2^(addr+3). Moreover first 64 bytes are reserved for EP0.
Without this patch if FIFO size specified by caller was zero then idx was incorrectly calculated (expr. ffs(0)-1) and size overflowed in fifosz register. This register uses has only 4 bits for FIFO size. Moreover specifying zero buffer size is not possible (with idx=0 is minimal buffer size 8 bytes).
So even for one-directional endpoints we need to correctly specify both (RX and TX) FIFO buffer sizes and its addresses.
This patch is fixing calculation of start address and buffer size to minimal value and ensures that it would not overlap with buffer reserved for EP0.
This issue caused loose of packets on USB bus in both directions and basically usbtty was unusable.
--- drivers/usb/musb/musb_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/usb/musb/musb_core.c +4 -4
@@ -50,7 +50,7 @@ void musb_start(void)# define config_fifo (dir, idx, addr) \ do { \ writeb(idx, &musbr->dir##fifosz); \ - writew(fifoaddr >> 3, &musbr->dir##fifoadd); \ + writew(addr, &musbr->dir##fifoadd); \ } while (0)#endif
@@ -66,14 +66,14 @@ void musb_start(void)void musb_configure_ep (const struct musb_epinfo *epinfo,u8 cnt) {u16 csr; -u16 fifoaddr =64 ;/* First 64 bytes of FIFO reserved for EP0 */ +u16 fifoaddr =64 >>3 ;/* First 64 bytes of FIFO reserved for EP0 */ u32 fifosize;u8 idx;while (cnt--) {/* prepare fifosize to write to register */ fifosize = epinfo->epsize >>3 ; - idx =ffs (fifosize) -1 ; + idx = fifosize ? ((ffs (fifosize) -1 ) &0xF ) :0 ;writeb (epinfo->epnum, &musbr->index);if (epinfo->epdir) {
@@ -99,7 +99,7 @@ void musb_configure_ep(const struct musb_epinfo *epinfo, u8 cnt)writew (csr |MUSB_RXCSR_FLUSHFIFO , &musbr->rxcsr); } - fifoaddr += epinfo->epsize; + fifoaddr +=1 << idx; epinfo++; } }
Signature · 1 line
2.20.1
PATCH RESEND v2 6/16 usb: musb: Read value of PERI_RXCSR to 16bit variable
In reply to Pali RohárPERI_RXCSR is 16bit register so store its value into 16bit local variable.
--- drivers/usb/musb/musb_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/musb/musb_udc.c +1 -1
@@ -629,7 +629,7 @@ static void musb_peri_ep0(void)static void musb_peri_rx_ep (unsigned int ep) {u16 peri_rxcount; -u8 peri_rxcsr =readw (&musbr->ep[ep].epN.rxcsr); +u16 peri_rxcsr =readw (&musbr->ep[ep].epN.rxcsr);if (!(peri_rxcsr &MUSB_RXCSR_RXPKTRDY )) {if (debug_level >0 )
Signature · 1 line
2.20.1
PATCH RESEND v2 7/16 usb: musb: Fix transmission of bigger buffers
In reply to Pali RohárIf udc_endpoint_write() was called with bigger payload which does not fit into one USB packet it is needed to transmit payload in more USB packets. First packet is transmitted by udc_endpoint_write() call itself and other packets are put into waiting queue.
Implement function musb_peri_tx() which checks if endpoints are ready for transmit and continue transmission of waiting queue.
This patch fixes sending big output from printenv command over usbtty serial console.
--- drivers/usb/musb/musb_udc.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-)
drivers/usb/musb/musb_udc.c +6 -11
@@ -708,21 +708,16 @@ static void musb_peri_rx(u16 intr)static void musb_peri_tx (u16 intr) { +unsigned int ep; +/* Check for EP0 */ if (0x01 & intr)musb_peri_ep0_tx (); -/* -* Use this in the future when handling epN tx -* -* u8 ep; -* -* for (ep = 1; ep < 16; ep++) { -* if ((1 << ep) & intr) { -* / * handle tx for this endpoint * / -* } -* } -*/ +for (ep =1 ; ep <16 ; ep++) { +if ((1 << ep) & intr) +udc_endpoint_write (GET_ENDPOINT (udc_device, ep)); + } }void udc_irq (void )
Signature · 1 line
2.20.1
PATCH RESEND v2 8/16 usb: musb: Fix receiving of bigger buffers
In reply to Pali RohárIf musb_peri_rx_ep() was called to process received HW buffer but U-Boot cannot read it yet (e.g. because U-Boot SW buffer is full) then interrupt was marked as processed also when HW buffer stayed unprocessed.
U-Boot tried to process this buffer again when it received interrupt again, but it can receive it only when sender (host) sends a new data. As sender (host) is not going to send a new data until U-Boot process current data this issue caused a deadlock in case sender (host) is emitting data faster than U-Boot can process it.
Reading musb intrrx register automatically clears this register and marks interrupt as processed. So to prevent marking interrupt in U-Boot as processed, adds a new variable pending_intrrx which would contain unprocessed bits of intrrx register.
For a second step, every time when musb_peri_rx_ep() is called and there are waiting data to be processed (signaled by MUSB_RXCSR_RXPKTRDY) either acknowledge sender (via musb_peri_rx_ack()) that whole HW buffer was processed or set corresponding bit in pending_intrrx that HW buffer was not fully processed yet and next iteration is required after U-Boot allocates space for reading HW buffer.
This patch fixes receiving large usb buffers, e.g. file transfer via Kermit protocol implemented by 'loadb' U-Boot command over usbtty serial console.
--- drivers/usb/musb/musb_udc.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
drivers/usb/musb/musb_udc.c +15 -1
@@ -104,6 +104,8 @@ struct usb_endpoint_instance *ep0_endpoint;static struct usb_device_instance *udc_device;static int enabled; +static u16 pending_intrrx; +#ifdef MUSB_DEBUG static void musb_db_regs (void ) {
@@ -664,7 +666,10 @@ static void musb_peri_rx_ep(unsigned int ep)/* The common musb fifo reader */ read_fifo (ep, length, data); -musb_peri_rx_ack (ep); +if (length == peri_rxcount) +musb_peri_rx_ack (ep); +else + pending_intrrx |= (1 << ep);/* * urb's actual_length is updated in
@@ -677,18 +682,24 @@ static void musb_peri_rx_ep(unsigned int ep)serial_printf ("ERROR : %s %d no space " "in rcv buffer\n" , __PRETTY_FUNCTION__, ep); + + pending_intrrx |= (1 << ep); } }else {if (debug_level >0 )serial_printf ("ERROR : %s %d problem with " "endpoint\n" , __PRETTY_FUNCTION__, ep); + + pending_intrrx |= (1 << ep); } }else {if (debug_level >0 )serial_printf ("ERROR : %s %d with nothing to do\n" , __PRETTY_FUNCTION__, ep); + +musb_peri_rx_ack (ep); } }
@@ -770,6 +781,9 @@ void udc_irq(void) intrrx =readw (&musbr->intrrx); intrtx =readw (&musbr->intrtx); + intrrx |= pending_intrrx; + pending_intrrx =0 ; +if (intrrx)musb_peri_rx (intrrx);
Signature · 1 line
2.20.1
PATCH RESEND v2 9/16 usb: musb: Fix handling interrupts for EP0 and SET ADDRESS commmand
In reply to Pali RohárInterrupt for EP0 is indicated in intrtx register via first bit. This bit is set for both RX and TX despite register has only TX in its name. First bit in intrrx register is reserved, not used and never set.
So remove calling musb_peri_ep0() function at every iteration of udc_irq() and musb_peri_rx() and call it only from musb_peri_tx() when correct interrupt bit in initrtx it set.
Address from SET ADDRESS command must be set to faddr register only after acknowledging SERV_RXPKTRDY followed by received EP0 interrupt. So prior calling musb_peri_ep0_set_address() check for EP0 interrupt instead of (incorrect) MUSB_INTR_SOF interrupt.
This patch fixes issue that host (computer) cannot register U-Boot USB device and is failing with errors:
usb 1-1: new full-speed USB device number 86 using xhci_hcd usb 1-1: Device not responding to setup address. usb 1-1: Device not responding to setup address. usb 1-1: device not accepting address 86, error -71
U-Boot was writing address to faddr register too early and did not wait for correct interrupt after which should update address.
--- drivers/usb/musb/musb_udc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
drivers/usb/musb/musb_udc.c +4 -8
@@ -707,9 +707,7 @@ static void musb_peri_rx(u16 intr) {unsigned int ep; -/* Check for EP0 */ -if (0x01 & intr) -musb_peri_ep0 (); +/* First bit is reserved and does not indicate interrupt for EP0 */ for (ep =1 ; ep <16 ; ep++) {if ((1 << ep) & intr)
@@ -721,9 +719,9 @@ static void musb_peri_tx(u16 intr) {unsigned int ep; -/* Check for EP0 */ +/* Check for EP0: first bit indicates interrupt for both RX and TX */ if (0x01 & intr) -musb_peri_ep0_tx (); +musb_peri_ep0 ();for (ep =1 ; ep <16 ; ep++) {if ((1 << ep) & intr)
@@ -750,8 +748,6 @@ void udc_irq(void)musb_peri_resume (); } -musb_peri_ep0 (); -if (MUSB_INTR_RESET & intrusb) {usbd_device_event_irq (udc_device,DEVICE_RESET ,0 );musb_peri_reset ();
@@ -790,7 +786,7 @@ void udc_irq(void)if (intrtx)musb_peri_tx (intrtx); }else { -if (MUSB_INTR_SOF & intrusb) { +if (readw (&musbr->intrtx) &0x1 ) {u8 faddr; faddr =readb (&musbr->faddr);/*
Signature · 1 line
2.20.1
PATCH RESEND v2 10/16 usb: musb: Ensure that we set musb dynamic FIFO buffer for every endpoint
In reply to Pali RohárIf we do not set FIFO buffer address and size for some endpoint which is in use then default programmed address 0x0 would be used which is in conflict with address of FIFO buffer for endpoint 0. Moreover address of FIFO buffer for endpoint 0 cannot be programmed, it is fixed to 0x0. Sharing address space between more endpoints cause data loss and unexpected errors.
This patch is fixing transmission of characters over usbtty serial console and allows using of usbtty for debugging purposes on Nokia N900.
--- drivers/usb/musb/musb_udc.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-)
drivers/usb/musb/musb_udc.c +2 -12
@@ -875,18 +875,8 @@ void udc_setup_ep(struct usb_device_instance *device, unsigned int id, ep0_endpoint->endpoint_address =0xff ; ep0_urb =usbd_alloc_urb (device, endpoint); }else if (MAX_ENDPOINT >= id) { -int ep_addr; - -/* Check the direction */ - ep_addr = endpoint->endpoint_address; -if (USB_DIR_IN == (ep_addr &USB_ENDPOINT_DIR_MASK )) { -/* IN */ - epinfo[(id *2 ) +1 ].epsize = endpoint->tx_packetSize; - }else { -/* OUT */ - epinfo[id *2 ].epsize = endpoint->rcv_packetSize; - } - + epinfo[(id *2 ) +0 ].epsize = endpoint->rcv_packetSize; + epinfo[(id *2 ) +1 ].epsize = endpoint->tx_packetSize;musb_configure_ep (&epinfo[0 ],ARRAY_SIZE (epinfo)); }else {if (debug_level >0 )
Signature · 1 line
2.20.1
PATCH RESEND v2 11/16 usb: gadget: Use dbg_ep0() macro instead of serial_printf()
In reply to Pali RohárAll debug messages from ep0.c except a few are printed by dbg_ep0() macro. So for remaining few exceptions use also dbg_ep0() instead of serial_printf().
--- drivers/usb/gadget/ep0.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/usb/gadget/ep0.c +8 -8
@@ -294,7 +294,7 @@ static int ep0_get_descriptor (struct usb_device_instance *device, {struct usb_string_descriptor *string_descriptor;if (!(string_descriptor =usbd_get_string (index))) { -serial_printf ("Invalid string index %d\n" , index); +dbg_ep0 (0 ,"Invalid string index %d\n" , index);return -1 ; }dbg_ep0 (3 ,"string_descriptor: %p length %d" , string_descriptor, string_descriptor->bLength);
@@ -302,14 +302,14 @@ static int ep0_get_descriptor (struct usb_device_instance *device, }break ;case USB_DESCRIPTOR_TYPE_INTERFACE : -serial_printf ("USB_DESCRIPTOR_TYPE_INTERFACE - error not implemented\n" ); +dbg_ep0 (2 ,"USB_DESCRIPTOR_TYPE_INTERFACE - error not implemented\n" );return -1 ;case USB_DESCRIPTOR_TYPE_ENDPOINT : -serial_printf ("USB_DESCRIPTOR_TYPE_ENDPOINT - error not implemented\n" ); +dbg_ep0 (2 ,"USB_DESCRIPTOR_TYPE_ENDPOINT - error not implemented\n" );return -1 ;case USB_DESCRIPTOR_TYPE_HID : { -serial_printf ("USB_DESCRIPTOR_TYPE_HID - error not implemented\n" ); +dbg_ep0 (2 ,"USB_DESCRIPTOR_TYPE_HID - error not implemented\n" );return -1 ;/* unsupported at this time */ #if 0 int bNumInterface =
@@ -338,7 +338,7 @@ static int ep0_get_descriptor (struct usb_device_instance *device,break ;case USB_DESCRIPTOR_TYPE_REPORT : { -serial_printf ("USB_DESCRIPTOR_TYPE_REPORT - error not implemented\n" ); +dbg_ep0 (2 ,"USB_DESCRIPTOR_TYPE_REPORT - error not implemented\n" );return -1 ;/* unsupported at this time */ #if 0 int bNumInterface =
@@ -531,7 +531,7 @@ int ep0_recv_setup (struct urb *urb) le16_to_cpu (request->wValue) & 0xff);case USB_REQ_GET_CONFIGURATION : -serial_printf ("get config %d\n" , device->configuration); +dbg_ep0 (2 ,"get config %d\n" , device->configuration);return ep0_get_one (device, urb, device->configuration);
@@ -621,14 +621,14 @@ int ep0_recv_setup (struct urb *urb) device->interface = device->alternate =0 ;/*dbg_ep0(2, "set configuration: %d", device->configuration); */ -/*serial_printf("DEVICE_CONFIGURED.. event?\n"); */ +/*dbg_ep0(2, "DEVICE_CONFIGURED.. event?\n"); */ return 0 ;case USB_REQ_SET_INTERFACE : device->interface =le16_to_cpu (request->wIndex); device->alternate =le16_to_cpu (request->wValue);/*dbg_ep0(2, "set interface: %d alternate: %d", device->interface, device->alternate); */ -serial_printf ("DEVICE_SET_INTERFACE.. event?\n" ); +dbg_ep0 (2 ,"DEVICE_SET_INTERFACE.. event?\n" );return 0 ;case USB_REQ_GET_STATUS :
Signature · 1 line
2.20.1
PATCH RESEND v2 12/16 arm: omap3: Compile lowlevel_init() function only when it is used
In reply to Pali RohárFunction lowlevel_init() is called only from cpu_init_crit() and this function is wrapped into #if .. #endif section. So compile also lowlevel_init() function under same #if condition.
Function cpy_clk_code() uses lowlevel_init symbol to get address where go_to_speed code ends. As this symbol is not available anymore when compiling with CONFIG_SKIP_LOWLEVEL_INIT, defines a new label go_to_speed_end at the place where go_to_speed code ends.
--- arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/omap3/lowlevel_init.S +5 -1
@@ -45,7 +45,7 @@ ENDPROC(do_omap3_emu_romcode_call) ENTRY(cpy_clk_code) /* Copy DPLL code into SRAM */ adr r0, go_to_speed /* copy from start of go_to_speed... */ - adr r2, lowlevel_init /* ... up to start of low_level_init */ + adr r2, go_to_speed_end /* ... up to start of go_to_speed_end */ next2: ldmia r0!, {r3 - r10} /* copy from source address [r0] */ stmia r1!, {r3 - r10} /* copy to target address [r1] */
@@ -167,8 +167,11 @@ pll_div_add5: pll_div_val5: .word CLSEL1_EMU_VAL +go_to_speed_end: #endif +#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && \ + !defined(CONFIG_SKIP_LOWLEVEL_INIT_ONLY) ENTRY(lowlevel_init) ldr sp, SRAM_STACK str ip, [sp] /* stash ip register */
@@ -187,6 +190,7 @@ ENTRY(lowlevel_init) b s_init ENDPROC(lowlevel_init) +#endif /* the literal pools origin */ .ltorg
Signature · 1 line
2.20.1
PATCH RESEND v2 13/16 arm: omap3: Compile s_init() function only when it is used
In reply to Pali RohárFunction s_init() is called only from lowlevel_init(). So compile it only when function lowlevel_init() is compiled.
--- arch/arm/mach-omap2/omap3/board.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-omap2/omap3/board.c +3 -0
@@ -179,6 +179,8 @@ void early_system_init(void)hw_data_init (); } +#if !defined(CONFIG_SKIP_LOWLEVEL_INIT ) && \ + !defined(CONFIG_SKIP_LOWLEVEL_INIT_ONLY )/****************************************************************************** * Routine: s_init * Description: Does early system init of muxing and clocks.
@@ -207,6 +209,7 @@ void s_init(void)ehci_clocks_enable (); #endif } +#endif #ifdef CONFIG_SPL_BUILD void board_init_f (ulong dummy)
Signature · 1 line
2.20.1
PATCH RESEND v2 14/16 Nokia RX-51: Remove function set_muxconf_regs()
In reply to Pali RohárThis function is not used and was never called.
This board contains '#define CONFIG_SKIP_LOWLEVEL_INIT' because X-Loader set everything up, including MUX configuration.
Also this MUX configuration is incorrect and does not match hardware.
So remove this dead, unused and broken code.
This change will decrease size of U-Boot binary.
--- board/nokia/rx51/rx51.c | 11 -- board/nokia/rx51/rx51.h | 346 ---------------------------------------- 2 files changed, 357 deletions(-)
board/nokia/rx51/rx51.c +0 -11
@@ -467,17 +467,6 @@ int misc_init_r(void)return 0 ; } -/* -* Routine: set_muxconf_regs -* Description: Setting up the configuration Mux registers specific to the -* hardware. Many pins need to be moved from protect to primary -* mode. -*/ -void set_muxconf_regs (void ) -{ -MUX_RX51 (); -} -static unsigned long int twl_wd_time;/* last time of watchdog reset */ static unsigned long int twl_i2c_lock;
board/nokia/rx51/rx51.h +0 -346
352 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH RESEND v2 15/16 Nokia RX-51: Move content of rx51.h to rx51.c
In reply to Pali RohárAfter removal of MUX configuration there is no need to have extra rx51.h.
--- board/nokia/rx51/rx51.c | 17 ++++++++++++++++- board/nokia/rx51/rx51.h | 31 ------------------------------- 2 files changed, 16 insertions(+), 32 deletions(-) delete mode 100644 board/nokia/rx51/rx51.h
board/nokia/rx51/rx51.c +16 -1
@@ -39,9 +39,24 @@#include <asm/arch/sys_proto.h> #include <asm/arch/mmc_host_def.h> -#include "rx51.h" #include "tag_omap.h" +/* Needed for ROM SMC call */ +struct emu_hal_params_rx51 { +u32 num_params; +u32 param1; +u32 param2; +u32 param3; +u32 param4; +}; + +#define ONENAND_GPMC_CONFIG1_RX51 0xfb001202 +#define ONENAND_GPMC_CONFIG2_RX51 0x00111100 +#define ONENAND_GPMC_CONFIG3_RX51 0x00020200 +#define ONENAND_GPMC_CONFIG4_RX51 0x11001102 +#define ONENAND_GPMC_CONFIG5_RX51 0x03101616 +#define ONENAND_GPMC_CONFIG6_RX51 0x90060000 +DECLARE_GLOBAL_DATA_PTR ;GraphicDevice gdev;
board/nokia/rx51/rx51.h deleted +0 -31
@@ -1,31 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* -* (C) Copyright 2012 -* ?????? ???????? <[email protected]> -* -* (C) Copyright 2011-2012 -* Pali Roh?r <[email protected]> -* -* (C) Copyright 2008 -* Dirk Behme <[email protected]> -*/ -#ifndef _RX51_H_ -#define _RX51_H_ - -/* Needed for ROM SMC call */ -struct emu_hal_params_rx51 { -u32 num_params; -u32 param1; -u32 param2; -u32 param3; -u32 param4; -}; - -#define ONENAND_GPMC_CONFIG1_RX51 0xfb001202 -#define ONENAND_GPMC_CONFIG2_RX51 0x00111100 -#define ONENAND_GPMC_CONFIG3_RX51 0x00020200 -#define ONENAND_GPMC_CONFIG4_RX51 0x11001102 -#define ONENAND_GPMC_CONFIG5_RX51 0x03101616 -#define ONENAND_GPMC_CONFIG6_RX51 0x90060000 - -#endif
Signature · 1 line
2.20.1
PATCH RESEND v2 16/16 Nokia RX-51: Enable usbtty serial console by default
In reply to Pali RohárNow when usbtty serial console is fixed in U-Boot enable CONFIG_USB_TTY for Nokia RX-51 board by default.
Fix also USB product id as U-Boot ignores CONFIG_USBD_PRODUCTID macro and include U-Boot string into USB product name to indicate usage of U-Boot.
CONFIG_CONSOLE_MUX is already used and U-Boot console is available for all in/out devices. Therefore there is no need to have separate commands 'run sercon', 'run usbcon' and 'run vgacon', so remove them.
As space for U-Boot is limited to 256kB, disable some other unused options so CONFIG_USB_TTY can be enabled.
Nokia RX-51 does not have easily accessible UART serial console so the only option for easy debugging is to use device's keyboard+screen or this usbtty serial console over USB.
--- configs/nokia_rx51_defconfig | 7 ++++--- doc/README.nokia_rx51 | 15 +-------------- include/configs/nokia_rx51.h | 21 +++++++-------------- 3 files changed, 12 insertions(+), 31 deletions(-)
configs/nokia_rx51_defconfig +4 -3
@@ -13,6 +13,7 @@ CONFIG_AUTOBOOT_MENU_SHOW=y CONFIG_USE_PREBOOT=y CONFIG_PREBOOT="run preboot" CONFIG_CONSOLE_MUX=y +# CONFIG_SYS_DEVICE_NULLDEV is not set CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Nokia RX-51 # " # CONFIG_CMD_BDI is not set
@@ -47,9 +48,11 @@ CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y # CONFIG_NET is not set CONFIG_DM=y +# CONFIG_DM_WARN is not set # CONFIG_DM_DEVICE_REMOVE is not set +# CONFIG_DM_SEQ_ALIAS is not set +# CONFIG_BLOCK_CACHE is not set CONFIG_DM_I2C=y -CONFIG_TWL4030_LED=y CONFIG_DM_MMC=y # CONFIG_MMC_HW_PARTITIONING is not set # CONFIG_MMC_VERBOSE is not set
@@ -59,10 +62,8 @@ CONFIG_CONS_INDEX=3 CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_USB=y -CONFIG_USB_MUSB_HCD=y CONFIG_USB_MUSB_UDC=y CONFIG_USB_OMAP3=y -CONFIG_TWL4030_USB=y CONFIG_CFB_CONSOLE=y CONFIG_CFB_CONSOLE_ANSI=y # CONFIG_VGA_AS_SINGLE_DEVICE is not set
doc/README.nokia_rx51 +1 -14
@@ -24,8 +24,7 @@ called u-boot-gen-combined. It is available in following repository: There is support for hardware watchdog. Hardware watchdog is started by NOLO so u-boot must kick watchdog to prevent reboot device (but not very often, max every 2 seconds). There is also support for framebuffer display -output with ANSI escape codes and the N900 HW keyboard input. USB tty works -but is disabled because it prevents the current Maemo kernel from booting. +output with ANSI escape codes and the N900 HW keyboard input. When U-Boot is starting it enable IBE bit in Auxiliary Control Register, which is needed for Thumb-2 ISA support. It is workaround for errata 430973.
@@ -49,10 +48,6 @@ Boot from SD or eMMC in this order: Available additional commands/variables: - * run sercon - Use serial port for control - * run usbcon - Use usbtty for control - * run vgacon - Use framebuffer and HW keyboard for control (default) - * run sdboot - Boot from external SD card (see boot order) * run emmcboot - Boot from internal eMMC memory (see boot order) * run attachboot - Boot attached kernel image (attached to U-Boot binary)
@@ -87,14 +82,6 @@ Additional variables for booting kernel: and u-boot standard output is set to serial then setup_console_atag is automatically set to 1. So output from Maemo kernel would go to serial port. -USB TTY: - - Maemo kernel 2.6.28 will crash if u-boot enable usb tty. So USB TTY is disabled. - For enabling USB TTY just add this line to file include/configs/nokia_rx51.h - - #define CONFIG_USB_TTY - - UBIFS support: UBIFS support is disabled, because U-Boot image is too big and cannot be
include/configs/nokia_rx51.h +7 -14
@@ -70,10 +70,12 @@/* USB device configuration */ #define CONFIG_USB_DEVICE +#define CONFIG_USB_TTY #define CONFIG_USBD_VENDORID 0x0421 -#define CONFIG_USBD_PRODUCTID 0x01c8 +#define CONFIG_USBD_PRODUCTID_CDCACM 0x01c8 +#define CONFIG_USBD_PRODUCTID_GSERIAL 0x01c8#define CONFIG_USBD_MANUFACTURER "Nokia" -#define CONFIG_USBD_PRODUCT_NAME "N900" +#define CONFIG_USBD_PRODUCT_NAME "N900 (U-Boot)"#define GPIO_SLIDE 71
@@ -108,15 +110,9 @@ int rx51_kp_getc(struct stdio_dev *sdev);/* Environment information */ #define CONFIG_EXTRA_ENV_SETTINGS \ "usbtty=cdc_acm\0" \ - "stdin=serial,vga\0" \ - "stdout=serial,vga\0" \ - "stderr=serial,vga\0" \ - "setcon=setenv stdin ${con};" \ - "setenv stdout ${con};" \ - "setenv stderr ${con}\0" \ - "sercon=setenv con serial; run setcon\0" \ - "usbcon=setenv con usbtty; run setcon\0" \ - "vgacon=setenv con vga; run setcon\0" \ + "stdin=usbtty,serial,vga\0" \ + "stdout=usbtty,serial,vga\0" \ + "stderr=usbtty,serial,vga\0" \ "slide=gpio input " __stringify(GPIO_SLIDE) "\0" \ "switchmmc=mmc dev ${mmcnum}\0" \ "kernaddr=0x82008000\0" \
@@ -198,9 +194,6 @@ int rx51_kp_getc(struct stdio_dev *sdev);#define CONFIG_POSTBOOTMENU \ "echo;" \ "echo Extra commands:;" \ - "echo run sercon - Use serial port for control.;" \ - "echo run usbcon - Use usbtty for control.;" \ - "echo run vgacon - Use framebuffer/keyboard.;" \ "echo run sdboot - Boot from SD card slot.;" \ "echo run emmcboot - Boot internal eMMC memory.;" \ "echo run attachboot - Boot attached kernel image.;" \
Signature · 1 line
2.20.1
PATCH RESEND 12/16 arm: omap3: Compile lowlevel_init() function only when it is used
In reply to Marek VasutQuoted 43 lines · On Saturday 06 February 2021 17:50:54 Marek Vasut wrote:
Quoted 42 lines · Pali Roh?r
Quoted 22 lines · On Saturday 06 February 2021 16:40:18 Marek Vasut wrote:
Quoted 21 lines · Pali Roh?r
Function
lowlevel_init()is called only fromcpu_init_crit()and this function is wrapped into #if .. #endif section. So compile alsolowlevel_init()function under same #if condition.Signed-off-by Pali Roh?r <[email protected]>--- arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)arch/arm/mach-omap2/omap3/lowlevel_init.S +1
-1@@ -45,7 +45,7 @@ ENDPROC(do_omap3_emu_romcode_call) ENTRY(cpy_clk_code) /* Copy DPLL code into SRAM */ adr r0, go_to_speed /* copy from start of go_to_speed... */ - adr r2, lowlevel_init /* ... up to start of low_level_init */ + adr r2, go_to_speed_end /* ... up to start of go_to_speed_end */ next2: ldmia r0!, {r3 - r10} /* copy from source address [r0] */Quoted 8 lines
arch/arm/mach-omap2/omap3/lowlevel_init.S pll_div_add5: · line 170
Quoted 6 lines
arch/arm/mach-omap2/omap3/lowlevel_init.S +1
-0stmia r1!, {r3 - r10} /* copy to target address [r1] */@@ -167,8 +167,11 @@ pll_div_add5: pll_div_val5: .word CLSEL1_EMU_VAL +go_to_speed_end: #endifThis hunk above seems like an unrelated change ^ ?
Entry '
lowlevel_init' is defined 3 lines below and is available only when !CONFIG_SKIP_LOWLEVEL_INIT && !CONFIG_SKIP_LOWLEVEL_INIT_ONLY.Few lines above is code which copies DPLL code into SRAM and this code ends at address where '
lowlevel_init' entry starts.Entry '
cpy_clk_code' is compiled also whenCONFIG_SKIP_LOWLEVEL_INITis defined, therefore it is required to define label which is outside of the #if code defined below and ends after the 'go_to_speed' code.
Quoted 6 lines
Quoted 2 lines
So I defined a new '
go_to_speed_end' label to allow compiling 'cpy_clk_code' entry whenCONFIG_SKIP_LOWLEVEL_INITis defined.Can you add exactly this description to the commit message -- the change isn't immediately obviously, collect the RBs and resend the patchset, so it can be picked ?
Done! I fixed commit messages and sent all patches again.
PATCH RESEND v2 12/16 arm: omap3: Compile lowlevel_init() function only when it is used
Quoted 44 lines · Pali Roh?r
Quoted 43 lines · On Saturday 06 February 2021 17:50:54 Marek Vasut wrote:
Quoted 42 lines · Pali Roh?r
Quoted 22 lines · On Saturday 06 February 2021 16:40:18 Marek Vasut wrote:
Quoted 21 lines · Pali Roh?r
Function
lowlevel_init()is called only fromcpu_init_crit()and this function is wrapped into #if .. #endif section. So compile alsolowlevel_init()function under same #if condition.Signed-off-by Pali Roh?r <[email protected]>--- arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)arch/arm/mach-omap2/omap3/lowlevel_init.S +1
-1@@ -45,7 +45,7 @@ ENDPROC(do_omap3_emu_romcode_call) ENTRY(cpy_clk_code) /* Copy DPLL code into SRAM */ adr r0, go_to_speed /* copy from start of go_to_speed... */ - adr r2, lowlevel_init /* ... up to start of low_level_init */ + adr r2, go_to_speed_end /* ... up to start of go_to_speed_end */ next2: ldmia r0!, {r3 - r10} /* copy from source address [r0] */Quoted 8 lines
arch/arm/mach-omap2/omap3/lowlevel_init.S pll_div_add5: · line 170
Quoted 6 lines
arch/arm/mach-omap2/omap3/lowlevel_init.S +1
-0stmia r1!, {r3 - r10} /* copy to target address [r1] */@@ -167,8 +167,11 @@ pll_div_add5: pll_div_val5: .word CLSEL1_EMU_VAL +go_to_speed_end: #endifThis hunk above seems like an unrelated change ^ ?
Entry '
lowlevel_init' is defined 3 lines below and is available only when !CONFIG_SKIP_LOWLEVEL_INIT && !CONFIG_SKIP_LOWLEVEL_INIT_ONLY.Few lines above is code which copies DPLL code into SRAM and this code ends at address where '
lowlevel_init' entry starts.Entry '
cpy_clk_code' is compiled also whenCONFIG_SKIP_LOWLEVEL_INITis defined, therefore it is required to define label which is outside of the #if code defined below and ends after the 'go_to_speed' code.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
So I defined a new '
go_to_speed_end' label to allow compiling 'cpy_clk_code' entry whenCONFIG_SKIP_LOWLEVEL_INITis defined.Can you add exactly this description to the commit message -- the change isn't immediately obviously, collect the RBs and resend the patchset, so it can be picked ?
Done! I fixed commit messages and sent all patches again.
Thanks
v2 cover Nokia RX-51: Fix USB TTY console and enable it
In reply to Pali RohárHi Pali,
Quoted 11 lines
Resended v2 patch series with fixed commit messages
This patch series fix usbtty code (serial console via USB peripheral mode), fix underlying musb peripheral code, fix compilation of
CONFIG_USB_DEVICE(used by usbtty), remove unused Nokia RX-51 code to decrease size of U-Boot binary and finally enable usbtty serial console for Nokia RX-51.With this patch series debugging of Nokia RX-51 can be done also via USB serial console.
Quoted 7 lines
It fixes also stability of musb code and allows usage of file transfers via Kermit protocol on Nokia RX-51. Kermit file transfer via U-Boot loadb command is stable on Nokia N900 and gives about 52kB/s transfer rate.
On computer this serial console is accessible via
/dev/ttyACM0device.
I've integrated your patchset and now it turns out that the u-boot size is too big:
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=24&view=results
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=24&view=logs&j=9a06d2a9-1498-5de0-2a01-be581d48ba67&t=f9a6b761-daa3-500f-4840-65a939c5040d
The branch is https://github.com/lmajewski/u-boot-dfu/tree/testing
Have you experienced similar issues?
Quoted 19 lines
Pali Roh?r (16):
serial: usbtty: Fix puts function
serial: usbtty: Send urb data in correct order
usb: musb: Fix compilation of gadget code
usb: musb: Always clear the data toggle bit when configuring ep
usb: musb: Fix configuring FIFO for endpoints
usb: musb: Read value ofPERI_RXCSRto 16bit variable
usb: musb: Fix transmission of bigger buffers
usb: musb: Fix receiving of bigger buffers
usb: musb: Fix handling interrupts for EP0 and SET ADDRESS commmand
usb: musb: Ensure that we set musb dynamic FIFO buffer for every
endpoint
usb: gadget: Usedbg_ep0()macro instead ofserial_printf()
arm: omap3: Compilelowlevel_init()function only when it is used
arm: omap3: Compiles_init()function only when it is used Nokia RX-51: Remove functionset_muxconf_regs()
Nokia RX-51: Move content ofrx51.htorx51.c
Nokia RX-51: Enable usbtty serial console by default
Quoted 15 lines
Makefile | 1 + arch/arm/mach-omap2/omap3/board.c | 3 + arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +- board/nokia/rx51/rx51.c | 28 +- board/nokia/rx51/rx51.h | 377 ---------------------- configs/nokia_rx51_defconfig | 7 +- doc/README.nokia_rx51 | 15 +- drivers/serial/usbtty.c | 16 +- drivers/usb/gadget/ep0.c | 16 +- drivers/usb/musb/musb_core.c | 12 +- drivers/usb/musb/musb_udc.c | 61 ++-- include/configs/nokia_rx51.h | 21 +- 12 files changed, 82 insertions(+), 481 deletions(-) delete mode 100644 board/nokia/rx51/rx51.h
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210208/77437d79/attachment.sig>
v2 cover Nokia RX-51: Fix USB TTY console and enable it
Quoted 18 lines · On Monday 08 February 2021 23:15:33 Lukasz Majewski wrote:
Hi Pali,
Quoted 16 lines
Resended v2 patch series with fixed commit messages
This patch series fix usbtty code (serial console via USB peripheral mode), fix underlying musb peripheral code, fix compilation of
CONFIG_USB_DEVICE(used by usbtty), remove unused Nokia RX-51 code to decrease size of U-Boot binary and finally enable usbtty serial console for Nokia RX-51.With this patch series debugging of Nokia RX-51 can be done also via USB serial console.
It fixes also stability of musb code and allows usage of file transfers via Kermit protocol on Nokia RX-51. Kermit file transfer via U-Boot loadb command is stable on Nokia N900 and gives about 52kB/s transfer rate.
Quoted 7 lines
Quoted 2 lines
On computer this serial console is accessible via
/dev/ttyACM0device.I've integrated your patchset and now it turns out that the u-boot size is too big:
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=24&view=results
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=24&view=logs&j=9a06d2a9-1498-5de0-2a01-be581d48ba67&t=f9a6b761-daa3-500f-4840-65a939c5040d
Ah :-(
In November when I sent these patches, U-Boot binary was smaller.
Quoted 3 lines
The branch is https://github.com/lmajewski/u-boot-dfu/tree/testing
Have you experienced similar issues?
Yes, memory for U-Boot is limited. It is needed to decrease size of U-Boot binary and then it will work.
I will try to look at it later and find some dead code which can be commented or removed to decrease binary size...
If you have an idea what increased U-Boot side it could help.
Quoted 47 lines
Quoted 19 lines
Pali Roh?r (16):
serial: usbtty: Fix puts function
serial: usbtty: Send urb data in correct order
usb: musb: Fix compilation of gadget code
usb: musb: Always clear the data toggle bit when configuring ep
usb: musb: Fix configuring FIFO for endpoints
usb: musb: Read value ofPERI_RXCSRto 16bit variable
usb: musb: Fix transmission of bigger buffers
usb: musb: Fix receiving of bigger buffers
usb: musb: Fix handling interrupts for EP0 and SET ADDRESS commmand
usb: musb: Ensure that we set musb dynamic FIFO buffer for every
endpoint
usb: gadget: Usedbg_ep0()macro instead ofserial_printf()
arm: omap3: Compilelowlevel_init()function only when it is used
arm: omap3: Compiles_init()function only when it is used Nokia RX-51: Remove functionset_muxconf_regs()
Nokia RX-51: Move content ofrx51.htorx51.c
Nokia RX-51: Enable usbtty serial console by defaultQuoted 15 lines
Makefile | 1 + arch/arm/mach-omap2/omap3/board.c | 3 + arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +- board/nokia/rx51/rx51.c | 28 +- board/nokia/rx51/rx51.h | 377 ---------------------- configs/nokia_rx51_defconfig | 7 +- doc/README.nokia_rx51 | 15 +- drivers/serial/usbtty.c | 16 +- drivers/usb/gadget/ep0.c | 16 +- drivers/usb/musb/musb_core.c | 12 +- drivers/usb/musb/musb_udc.c | 61 ++-- include/configs/nokia_rx51.h | 21 +- 12 files changed, 82 insertions(+), 481 deletions(-) delete mode 100644 board/nokia/rx51/rx51.hBest regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
v2 cover Nokia RX-51: Fix USB TTY console and enable it
Quoted 32 lines · On Monday 08 February 2021 23:21:38 Pali Roh?r wrote:
Quoted 18 lines · On Monday 08 February 2021 23:15:33 Lukasz Majewski wrote:
Hi Pali,
Quoted 16 lines
Resended v2 patch series with fixed commit messages
This patch series fix usbtty code (serial console via USB peripheral mode), fix underlying musb peripheral code, fix compilation of
CONFIG_USB_DEVICE(used by usbtty), remove unused Nokia RX-51 code to decrease size of U-Boot binary and finally enable usbtty serial console for Nokia RX-51.With this patch series debugging of Nokia RX-51 can be done also via USB serial console.
It fixes also stability of musb code and allows usage of file transfers via Kermit protocol on Nokia RX-51. Kermit file transfer via U-Boot loadb command is stable on Nokia N900 and gives about 52kB/s transfer rate.
Quoted 7 lines
Quoted 2 lines
On computer this serial console is accessible via
/dev/ttyACM0device.I've integrated your patchset and now it turns out that the u-boot size is too big:
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=24&view=results
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=24&view=logs&j=9a06d2a9-1498-5de0-2a01-be581d48ba67&t=f9a6b761-daa3-500f-4840-65a939c5040dAh :-(
In November when I sent these patches, U-Boot binary was smaller.Quoted 2 lines
The branch is https://github.com/lmajewski/u-boot-dfu/tree/testing
Quoted 7 lines
Quoted 1 line
Have you experienced similar issues?
Yes, memory for U-Boot is limited. It is needed to decrease size of U-Boot binary and then it will work.
I will try to look at it later and find some dead code which can be commented or removed to decrease binary size...
Just a quick test, could you try to add
CONFIG_OPTIMIZE_INLINING=y
into configs/nokia_rx51_defconfig file, if it helps?
Quoted 51 lines
If you have an idea what increased U-Boot side it could help.
Quoted 47 lines
Quoted 19 lines
Pali Roh?r (16):
serial: usbtty: Fix puts function
serial: usbtty: Send urb data in correct order
usb: musb: Fix compilation of gadget code
usb: musb: Always clear the data toggle bit when configuring ep
usb: musb: Fix configuring FIFO for endpoints
usb: musb: Read value ofPERI_RXCSRto 16bit variable
usb: musb: Fix transmission of bigger buffers
usb: musb: Fix receiving of bigger buffers
usb: musb: Fix handling interrupts for EP0 and SET ADDRESS commmand
usb: musb: Ensure that we set musb dynamic FIFO buffer for every
endpoint
usb: gadget: Usedbg_ep0()macro instead ofserial_printf()
arm: omap3: Compilelowlevel_init()function only when it is used
arm: omap3: Compiles_init()function only when it is used Nokia RX-51: Remove functionset_muxconf_regs()
Nokia RX-51: Move content ofrx51.htorx51.c
Nokia RX-51: Enable usbtty serial console by defaultQuoted 15 lines
Makefile | 1 + arch/arm/mach-omap2/omap3/board.c | 3 + arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +- board/nokia/rx51/rx51.c | 28 +- board/nokia/rx51/rx51.h | 377 ---------------------- configs/nokia_rx51_defconfig | 7 +- doc/README.nokia_rx51 | 15 +- drivers/serial/usbtty.c | 16 +- drivers/usb/gadget/ep0.c | 16 +- drivers/usb/musb/musb_core.c | 12 +- drivers/usb/musb/musb_udc.c | 61 ++-- include/configs/nokia_rx51.h | 21 +- 12 files changed, 82 insertions(+), 481 deletions(-) delete mode 100644 board/nokia/rx51/rx51.hBest regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
v2 cover Nokia RX-51: Fix USB TTY console and enable it
Quoted 38 lines · Pali Roh?r
Quoted 37 lines · On Monday 08 February 2021 23:21:38 Pali Roh?r wrote:
Quoted 18 lines · On Monday 08 February 2021 23:15:33 Lukasz Majewski wrote:
Hi Pali,
Quoted 16 lines
Resended v2 patch series with fixed commit messages
This patch series fix usbtty code (serial console via USB peripheral mode), fix underlying musb peripheral code, fix compilation of
CONFIG_USB_DEVICE(used by usbtty), remove unused Nokia RX-51 code to decrease size of U-Boot binary and finally enable usbtty serial console for Nokia RX-51.With this patch series debugging of Nokia RX-51 can be done also via USB serial console.
It fixes also stability of musb code and allows usage of file transfers via Kermit protocol on Nokia RX-51. Kermit file transfer via U-Boot loadb command is stable on Nokia N900 and gives about 52kB/s transfer rate.
Quoted 7 lines
Quoted 2 lines
On computer this serial console is accessible via
/dev/ttyACM0device.I've integrated your patchset and now it turns out that the u-boot size is too big:
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=24&view=results
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=24&view=logs&j=9a06d2a9-1498-5de0-2a01-be581d48ba67&t=f9a6b761-daa3-500f-4840-65a939c5040dAh :-(
In November when I sent these patches, U-Boot binary was smaller.Quoted 3 lines
The branch is https://github.com/lmajewski/u-boot-dfu/tree/testing
Have you experienced similar issues?
Yes, memory for U-Boot is limited. It is needed to decrease size of U-Boot binary and then it will work.
Quoted 8 lines
Quoted 2 lines
I will try to look at it later and find some dead code which can be commented or removed to decrease binary size...
Just a quick test, could you try to add
CONFIG_OPTIMIZE_INLINING=yinto configs/nokia_rx51_defconfig file, if it helps?
Surely you can try build-testing the patches yourself ? :-)
v2 cover Nokia RX-51: Fix USB TTY console and enable it
Quoted 42 lines · On Monday 08 February 2021 23:45:37 Marek Vasut wrote:
Quoted 41 lines · Pali Roh?r
Quoted 39 lines · On Monday 08 February 2021 23:21:38 Pali Roh?r wrote:
Quoted 18 lines · On Monday 08 February 2021 23:15:33 Lukasz Majewski wrote:
Hi Pali,
Quoted 16 lines
Resended v2 patch series with fixed commit messages
This patch series fix usbtty code (serial console via USB peripheral mode), fix underlying musb peripheral code, fix compilation of
CONFIG_USB_DEVICE(used by usbtty), remove unused Nokia RX-51 code to decrease size of U-Boot binary and finally enable usbtty serial console for Nokia RX-51.With this patch series debugging of Nokia RX-51 can be done also via USB serial console.
It fixes also stability of musb code and allows usage of file transfers via Kermit protocol on Nokia RX-51. Kermit file transfer via U-Boot loadb command is stable on Nokia N900 and gives about 52kB/s transfer rate.
Quoted 7 lines
Quoted 2 lines
On computer this serial console is accessible via
/dev/ttyACM0device.I've integrated your patchset and now it turns out that the u-boot size is too big:
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=24&view=results
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=24&view=logs&j=9a06d2a9-1498-5de0-2a01-be581d48ba67&t=f9a6b761-daa3-500f-4840-65a939c5040dAh :-(
In November when I sent these patches, U-Boot binary was smaller.Quoted 3 lines
The branch is https://github.com/lmajewski/u-boot-dfu/tree/testing
Have you experienced similar issues?
Yes, memory for U-Boot is limited. It is needed to decrease size of U-Boot binary and then it will work.
I will try to look at it later and find some dead code which can be commented or removed to decrease binary size...
Quoted 7 lines
Quoted 5 lines
Just a quick test, could you try to add
CONFIG_OPTIMIZE_INLINING=yinto configs/nokia_rx51_defconfig file, if it helps?
Surely you can try build-testing the patches yourself ? :-)
They are working fine on my two testes machines. I do not have this problem which Lukasz described. Otherwise I would not send patches to mailing list for upstream. Also I have tested CONFIG_OPTIMIZE_INLINING and it decreased size of u-boot binary on my machine.
But I already figured out that "working on my machine" does not mean that it would also on other machines... In past I hit compiler bugs which caused that on my machine gcc compiled code correctly but on other machine with older (buggy) gcc code was compiled incorrectly and result of computation was incorrect.
That is why I'm asking if people who triggered mentioned issue can check if proposed fix helps.
Btw, if I understood correctly without CONFIG_OPTIMIZE_INLINING U-Boot redefine "inline" to "always inline". And with CONFIG_OPTIMIZE_INLINING "inline" is "inline". From past I know that gcc is very smart and can decide that it is better to ignore inlining some functions for -Os size optimizations.
v2 cover Nokia RX-51: Fix USB TTY console and enable it
In reply to Pali RohárQuoted 38 lines · On Monday 08 February 2021 23:34:06 Pali Roh?r wrote:
Quoted 37 lines · On Monday 08 February 2021 23:21:38 Pali Roh?r wrote:
Quoted 18 lines · On Monday 08 February 2021 23:15:33 Lukasz Majewski wrote:
Hi Pali,
Quoted 16 lines
Resended v2 patch series with fixed commit messages
This patch series fix usbtty code (serial console via USB peripheral mode), fix underlying musb peripheral code, fix compilation of
CONFIG_USB_DEVICE(used by usbtty), remove unused Nokia RX-51 code to decrease size of U-Boot binary and finally enable usbtty serial console for Nokia RX-51.With this patch series debugging of Nokia RX-51 can be done also via USB serial console.
It fixes also stability of musb code and allows usage of file transfers via Kermit protocol on Nokia RX-51. Kermit file transfer via U-Boot loadb command is stable on Nokia N900 and gives about 52kB/s transfer rate.
Quoted 7 lines
Quoted 2 lines
On computer this serial console is accessible via
/dev/ttyACM0device.I've integrated your patchset and now it turns out that the u-boot size is too big:
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=24&view=results
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=24&view=logs&j=9a06d2a9-1498-5de0-2a01-be581d48ba67&t=f9a6b761-daa3-500f-4840-65a939c5040dAh :-(
In November when I sent these patches, U-Boot binary was smaller.Quoted 3 lines
The branch is https://github.com/lmajewski/u-boot-dfu/tree/testing
Have you experienced similar issues?
Yes, memory for U-Boot is limited. It is needed to decrease size of U-Boot binary and then it will work.
Quoted 8 lines
Quoted 2 lines
I will try to look at it later and find some dead code which can be commented or removed to decrease binary size...
Just a quick test, could you try to add
CONFIG_OPTIMIZE_INLINING=yinto configs/nokia_rx51_defconfig file, if it helps?
Lukasz, is CONFIG_OPTIMIZE_INLINING=y option fixing build for you?
Quoted 51 lines
Quoted 51 lines
If you have an idea what increased U-Boot side it could help.
Quoted 47 lines
Quoted 19 lines
Pali Roh?r (16):
serial: usbtty: Fix puts function
serial: usbtty: Send urb data in correct order
usb: musb: Fix compilation of gadget code
usb: musb: Always clear the data toggle bit when configuring ep
usb: musb: Fix configuring FIFO for endpoints
usb: musb: Read value ofPERI_RXCSRto 16bit variable
usb: musb: Fix transmission of bigger buffers
usb: musb: Fix receiving of bigger buffers
usb: musb: Fix handling interrupts for EP0 and SET ADDRESS commmand
usb: musb: Ensure that we set musb dynamic FIFO buffer for every
endpoint
usb: gadget: Usedbg_ep0()macro instead ofserial_printf()
arm: omap3: Compilelowlevel_init()function only when it is used
arm: omap3: Compiles_init()function only when it is used Nokia RX-51: Remove functionset_muxconf_regs()
Nokia RX-51: Move content ofrx51.htorx51.c
Nokia RX-51: Enable usbtty serial console by defaultQuoted 15 lines
Makefile | 1 + arch/arm/mach-omap2/omap3/board.c | 3 + arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +- board/nokia/rx51/rx51.c | 28 +- board/nokia/rx51/rx51.h | 377 ---------------------- configs/nokia_rx51_defconfig | 7 +- doc/README.nokia_rx51 | 15 +- drivers/serial/usbtty.c | 16 +- drivers/usb/gadget/ep0.c | 16 +- drivers/usb/musb/musb_core.c | 12 +- drivers/usb/musb/musb_udc.c | 61 ++-- include/configs/nokia_rx51.h | 21 +- 12 files changed, 82 insertions(+), 481 deletions(-) delete mode 100644 board/nokia/rx51/rx51.hBest regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
v2 cover Nokia RX-51: Fix USB TTY console and enable it
Hi Pali,
Quoted 44 lines · On Monday 08 February 2021 23:34:06 Pali Roh?r wrote:
Quoted 43 lines · On Monday 08 February 2021 23:21:38 Pali Roh?r wrote:
Quoted 41 lines · On Monday 08 February 2021 23:15:33 Lukasz Majewski wrote:
Quoted 18 lines
Hi Pali,
Quoted 16 lines
Resended v2 patch series with fixed commit messages
This patch series fix usbtty code (serial console via USB peripheral mode), fix underlying musb peripheral code, fix compilation of
CONFIG_USB_DEVICE(used by usbtty), remove unused Nokia RX-51 code to decrease size of U-Boot binary and finally enable usbtty serial console for Nokia RX-51.With this patch series debugging of Nokia RX-51 can be done also via USB serial console.
It fixes also stability of musb code and allows usage of file transfers via Kermit protocol on Nokia RX-51. Kermit file transfer via U-Boot loadb command is stable on Nokia N900 and gives about 52kB/s transfer rate.
Quoted 8 lines
Quoted 2 lines
On computer this serial console is accessible via
/dev/ttyACM0device.I've integrated your patchset and now it turns out that the u-boot size is too big:
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=24&view=results
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=24&view=logs&j=9a06d2a9-1498-5de0-2a01-be581d48ba67&t=f9a6b761-daa3-500f-4840-65a939c5040dAh :-(
In November when I sent these patches, U-Boot binary was smaller.Quoted 4 lines
The branch is
https://github.com/lmajewski/u-boot-dfu/tree/testingHave you experienced similar issues?
Yes, memory for U-Boot is limited. It is needed to decrease size of U-Boot binary and then it will work.
I will try to look at it later and find some dead code which can be commented or removed to decrease binary size...
Quoted 7 lines
Quoted 5 lines
Just a quick test, could you try to add
CONFIG_OPTIMIZE_INLINING=yinto configs/nokia_rx51_defconfig file, if it helps?
Lukasz, is
CONFIG_OPTIMIZE_INLINING=yoption fixing build for you?
Could you setup the CI environment and test your patchset with it?
It is documented in .azure-pipelines.yml.
Azure build takes not more than 3h for the whole test setup.
Quoted 45 lines
Quoted 45 lines
Quoted 45 lines
If you have an idea what increased U-Boot side it could help.
Quoted 42 lines
Quoted 19 lines
Pali Roh?r (16):
serial: usbtty: Fix puts function
serial: usbtty: Send urb data in correct order
usb: musb: Fix compilation of gadget code
usb: musb: Always clear the data toggle bit when
configuring ep usb: musb: Fix configuring FIFO for endpoints
usb: musb: Read value ofPERI_RXCSRto 16bit variable
usb: musb: Fix transmission of bigger buffers
usb: musb: Fix receiving of bigger buffers
usb: musb: Fix handling interrupts for EP0 and SET ADDRESS
commmand usb: musb: Ensure that we set musb dynamic FIFO buffer for every endpoint
usb: gadget: Usedbg_ep0()macro instead ofserial_printf()
arm: omap3: Compilelowlevel_init()function only when it
is used arm: omap3: Compiles_init()function only when it is used Nokia RX-51: Remove functionset_muxconf_regs()
Nokia RX-51: Move content ofrx51.htorx51.cNokia RX-51: Enable usbtty serial console by defaultQuoted 15 lines
Makefile | 1 + arch/arm/mach-omap2/omap3/board.c | 3 + arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +- board/nokia/rx51/rx51.c | 28 +- board/nokia/rx51/rx51.h | 377 ---------------------- configs/nokia_rx51_defconfig | 7 +- doc/README.nokia_rx51 | 15 +- drivers/serial/usbtty.c | 16 +- drivers/usb/gadget/ep0.c | 16 +- drivers/usb/musb/musb_core.c | 12 +- drivers/usb/musb/musb_udc.c | 61 ++-- include/configs/nokia_rx51.h | 21 +- 12 files changed, 82 insertions(+), 481 deletions(-) delete mode 100644 board/nokia/rx51/rx51.hBest regards,
Lukasz Majewski
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
--
DENX Software Engineering GmbH, Managing Director:
Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
(+49)-8142-66989-80 Email: lukma at denx.de
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210216/02f26b45/attachment.sig>
v2 cover Nokia RX-51: Fix USB TTY console and enable it
Quoted 52 lines · On Tuesday 16 February 2021 09:28:06 Lukasz Majewski wrote:
Hi Pali,
Quoted 50 lines · On Monday 08 February 2021 23:34:06 Pali Roh?r wrote:
Quoted 48 lines · On Monday 08 February 2021 23:21:38 Pali Roh?r wrote:
Quoted 34 lines · On Monday 08 February 2021 23:15:33 Lukasz Majewski wrote:
Quoted 18 lines
Hi Pali,
Quoted 16 lines
Resended v2 patch series with fixed commit messages
This patch series fix usbtty code (serial console via USB peripheral mode), fix underlying musb peripheral code, fix compilation of
CONFIG_USB_DEVICE(used by usbtty), remove unused Nokia RX-51 code to decrease size of U-Boot binary and finally enable usbtty serial console for Nokia RX-51.With this patch series debugging of Nokia RX-51 can be done also via USB serial console.
It fixes also stability of musb code and allows usage of file transfers via Kermit protocol on Nokia RX-51. Kermit file transfer via U-Boot loadb command is stable on Nokia N900 and gives about 52kB/s transfer rate.
Quoted 8 lines
Quoted 2 lines
On computer this serial console is accessible via
/dev/ttyACM0device.I've integrated your patchset and now it turns out that the u-boot size is too big:
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=24&view=results
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=24&view=logs&j=9a06d2a9-1498-5de0-2a01-be581d48ba67&t=f9a6b761-daa3-500f-4840-65a939c5040dAh :-(
In November when I sent these patches, U-Boot binary was smaller.Quoted 3 lines
The branch is
https://github.com/lmajewski/u-boot-dfu/tree/testingQuoted 7 lines
Quoted 1 line
Have you experienced similar issues?
Yes, memory for U-Boot is limited. It is needed to decrease size of U-Boot binary and then it will work.
I will try to look at it later and find some dead code which can be commented or removed to decrease binary size...
Just a quick test, could you try to add
CONFIG_OPTIMIZE_INLINING=yinto configs/nokia_rx51_defconfig file, if it helps?
Quoted 7 lines
Quoted 1 line
Lukasz, is
CONFIG_OPTIMIZE_INLINING=yoption fixing build for you?Could you setup the CI environment and test your patchset with it?
It is documented in .azure-pipelines.yml.
Azure build takes not more than 3h for the whole test setup.
It helped!
Quoted 66 lines
Quoted 45 lines
Quoted 45 lines
Quoted 45 lines
If you have an idea what increased U-Boot side it could help.
Quoted 42 lines
Quoted 19 lines
Pali Roh?r (16):
serial: usbtty: Fix puts function
serial: usbtty: Send urb data in correct order
usb: musb: Fix compilation of gadget code
usb: musb: Always clear the data toggle bit when
configuring ep usb: musb: Fix configuring FIFO for endpoints
usb: musb: Read value ofPERI_RXCSRto 16bit variable
usb: musb: Fix transmission of bigger buffers
usb: musb: Fix receiving of bigger buffers
usb: musb: Fix handling interrupts for EP0 and SET ADDRESS
commmand usb: musb: Ensure that we set musb dynamic FIFO buffer for every endpoint
usb: gadget: Usedbg_ep0()macro instead ofserial_printf()
arm: omap3: Compilelowlevel_init()function only when it
is used arm: omap3: Compiles_init()function only when it is used Nokia RX-51: Remove functionset_muxconf_regs()
Nokia RX-51: Move content ofrx51.htorx51.cNokia RX-51: Enable usbtty serial console by defaultQuoted 15 lines
Makefile | 1 + arch/arm/mach-omap2/omap3/board.c | 3 + arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +- board/nokia/rx51/rx51.c | 28 +- board/nokia/rx51/rx51.h | 377 ---------------------- configs/nokia_rx51_defconfig | 7 +- doc/README.nokia_rx51 | 15 +- drivers/serial/usbtty.c | 16 +- drivers/usb/gadget/ep0.c | 16 +- drivers/usb/musb/musb_core.c | 12 +- drivers/usb/musb/musb_udc.c | 61 ++-- include/configs/nokia_rx51.h | 21 +- 12 files changed, 82 insertions(+), 481 deletions(-) delete mode 100644 board/nokia/rx51/rx51.hBest regards,
Lukasz Majewski
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
--
DENX Software Engineering GmbH, Managing Director:
Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
(+49)-8142-66989-80 Email: lukma at denx.deBest regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
v2 cover Nokia RX-51: Fix USB TTY console and enable it
Quoted 58 lines · On Fri, 19 Feb 2021 01:38:14 +0100 Pali Roh?r <[email protected]> wrote:
Quoted 57 lines · On Tuesday 16 February 2021 09:28:06 Lukasz Majewski wrote:
Hi Pali,
Quoted 44 lines · On Monday 08 February 2021 23:34:06 Pali Roh?r wrote:
Quoted 43 lines · On Monday 08 February 2021 23:21:38 Pali Roh?r wrote:
Quoted 41 lines · On Monday 08 February 2021 23:15:33 Lukasz Majewski wrote:
Quoted 18 lines
Hi Pali,
Quoted 16 lines
Resended v2 patch series with fixed commit messages
This patch series fix usbtty code (serial console via USB peripheral mode), fix underlying musb peripheral code, fix compilation of
CONFIG_USB_DEVICE(used by usbtty), remove unused Nokia RX-51 code to decrease size of U-Boot binary and finally enable usbtty serial console for Nokia RX-51.With this patch series debugging of Nokia RX-51 can be done also via USB serial console.
It fixes also stability of musb code and allows usage of file transfers via Kermit protocol on Nokia RX-51. Kermit file transfer via U-Boot loadb command is stable on Nokia N900 and gives about 52kB/s transfer rate.
Quoted 8 lines
Quoted 2 lines
On computer this serial console is accessible via
/dev/ttyACM0device.I've integrated your patchset and now it turns out that the u-boot size is too big:
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=24&view=results
https://dev.azure.com/lukma633/U-Boot/_build/results?buildId=24&view=logs&j=9a06d2a9-1498-5de0-2a01-be581d48ba67&t=f9a6b761-daa3-500f-4840-65a939c5040dAh :-(
In November when I sent these patches, U-Boot binary was smaller.Quoted 4 lines
The branch is
https://github.com/lmajewski/u-boot-dfu/tree/testingHave you experienced similar issues?
Yes, memory for U-Boot is limited. It is needed to decrease size of U-Boot binary and then it will work.
I will try to look at it later and find some dead code which can be commented or removed to decrease binary size...
Quoted 8 lines
Quoted 5 lines
Just a quick test, could you try to add
CONFIG_OPTIMIZE_INLINING=yinto configs/nokia_rx51_defconfig file, if it helps?
Lukasz, is
CONFIG_OPTIMIZE_INLINING=yoption fixing build for you?Could you setup the CI environment and test your patchset with it?
Quoted 7 lines
Quoted 3 lines
It is documented in .azure-pipelines.yml.
Azure build takes not more than 3h for the whole test setup.
It helped!
Great. Please resend the eligible patch (with adding this variable). And I will prepare PR ASAP.
Quoted 61 lines
Quoted 61 lines
Quoted 47 lines
Quoted 47 lines
Quoted 47 lines
If you have an idea what increased U-Boot side it could help.
Quoted 43 lines
Quoted 20 lines
Pali Roh?r (16):
serial: usbtty: Fix puts function
serial: usbtty: Send urb data in correct order
usb: musb: Fix compilation of gadget code
usb: musb: Always clear the data toggle bit when
configuring ep usb: musb: Fix configuring FIFO for endpoints usb: musb: Read value ofPERI_RXCSRto 16bit variable usb: musb: Fix transmission of bigger buffers
usb: musb: Fix receiving of bigger buffers
usb: musb: Fix handling interrupts for EP0 and SET
ADDRESS commmand usb: musb: Ensure that we set musb dynamic FIFO buffer for every endpoint
usb: gadget: Usedbg_ep0()macro instead ofserial_printf()arm: omap3: Compilelowlevel_init()function only when it is used arm: omap3: Compiles_init()function only when it is used Nokia RX-51:
Remove functionset_muxconf_regs()Nokia RX-51: Move content ofrx51.htorx51.cNokia RX-51: Enable usbtty serial console by defaultQuoted 15 lines
Makefile | 1 + arch/arm/mach-omap2/omap3/board.c | 3 + arch/arm/mach-omap2/omap3/lowlevel_init.S | 6 +- board/nokia/rx51/rx51.c | 28 +- board/nokia/rx51/rx51.h | 377 ---------------------- configs/nokia_rx51_defconfig | 7 +- doc/README.nokia_rx51 | 15 +- drivers/serial/usbtty.c | 16 +- drivers/usb/gadget/ep0.c | 16 +- drivers/usb/musb/musb_core.c | 12 +- drivers/usb/musb/musb_udc.c | 61 ++-- include/configs/nokia_rx51.h | 21 +- 12 files changed, 82 insertions(+), 481 deletions(-) delete mode 100644 board/nokia/rx51/rx51.hBest regards,
Lukasz Majewski
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
--
DENX Software Engineering GmbH, Managing Director:
Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax:
(+49)-8142-66989-80 Email: lukma at denx.deBest regards,
Quoted 10 lines
Quoted 8 lines
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang
Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
lukma at denx.de
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210220/4d9f5277/attachment.sig>
PATCH RESEND v2 16/16 Nokia RX-51: Enable usbtty serial console by default
In reply to Pali RohárNow when usbtty serial console is fixed in U-Boot enable CONFIG_USB_TTY for Nokia RX-51 board by default.
Fix also USB product id as U-Boot ignores CONFIG_USBD_PRODUCTID macro and include U-Boot string into USB product name to indicate usage of U-Boot.
CONFIG_CONSOLE_MUX is already used and U-Boot console is available for all in/out devices. Therefore there is no need to have separate commands 'run sercon', 'run usbcon' and 'run vgacon', so remove them.
As space for U-Boot is limited to 256kB, enable CONFIG_OPTIMIZE_INLINING and disable some other unused options so CONFIG_USB_TTY can be enabled.
Nokia RX-51 does not have easily accessible UART serial console so the only option for easy debugging is to use device's keyboard+screen or this usbtty serial console over USB.
--- configs/nokia_rx51_defconfig | 8 +++++--- doc/README.nokia_rx51 | 15 +-------------- include/configs/nokia_rx51.h | 21 +++++++-------------- 3 files changed, 13 insertions(+), 31 deletions(-)
configs/nokia_rx51_defconfig +5 -3
@@ -4,6 +4,7 @@ CONFIG_ARCH_OMAP2PLUS=y CONFIG_SYS_TEXT_BASE=0x80008000 CONFIG_NR_DRAM_BANKS=2 CONFIG_TARGET_NOKIA_RX51=y +CONFIG_OPTIMIZE_INLINING=y # CONFIG_SYS_MALLOC_F is not set # CONFIG_FIT is not set CONFIG_BOOTDELAY=30
@@ -12,6 +13,7 @@ CONFIG_AUTOBOOT_MENU_SHOW=y CONFIG_USE_PREBOOT=y CONFIG_PREBOOT="run preboot" CONFIG_CONSOLE_MUX=y +# CONFIG_SYS_DEVICE_NULLDEV is not set CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="Nokia RX-51 # " # CONFIG_CMD_BDI is not set
@@ -46,9 +48,11 @@ CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y # CONFIG_NET is not set CONFIG_DM=y +# CONFIG_DM_WARN is not set # CONFIG_DM_DEVICE_REMOVE is not set +# CONFIG_DM_SEQ_ALIAS is not set +# CONFIG_BLOCK_CACHE is not set CONFIG_DM_I2C=y -CONFIG_TWL4030_LED=y CONFIG_DM_MMC=y # CONFIG_MMC_HW_PARTITIONING is not set # CONFIG_MMC_VERBOSE is not set
@@ -58,10 +62,8 @@ CONFIG_CONS_INDEX=3 CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_USB=y -CONFIG_USB_MUSB_HCD=y CONFIG_USB_MUSB_UDC=y CONFIG_USB_OMAP3=y -CONFIG_TWL4030_USB=y CONFIG_CFB_CONSOLE=y CONFIG_CFB_CONSOLE_ANSI=y # CONFIG_VGA_AS_SINGLE_DEVICE is not set
doc/README.nokia_rx51 +1 -14
@@ -24,8 +24,7 @@ called u-boot-gen-combined. It is available in following repository: There is support for hardware watchdog. Hardware watchdog is started by NOLO so u-boot must kick watchdog to prevent reboot device (but not very often, max every 2 seconds). There is also support for framebuffer display -output with ANSI escape codes and the N900 HW keyboard input. USB tty works -but is disabled because it prevents the current Maemo kernel from booting. +output with ANSI escape codes and the N900 HW keyboard input. When U-Boot is starting it enable IBE bit in Auxiliary Control Register, which is needed for Thumb-2 ISA support. It is workaround for errata 430973.
@@ -49,10 +48,6 @@ Boot from SD or eMMC in this order: Available additional commands/variables: - * run sercon - Use serial port for control - * run usbcon - Use usbtty for control - * run vgacon - Use framebuffer and HW keyboard for control (default) - * run sdboot - Boot from external SD card (see boot order) * run emmcboot - Boot from internal eMMC memory (see boot order) * run attachboot - Boot attached kernel image (attached to U-Boot binary)
@@ -87,14 +82,6 @@ Additional variables for booting kernel: and u-boot standard output is set to serial then setup_console_atag is automatically set to 1. So output from Maemo kernel would go to serial port. -USB TTY: - - Maemo kernel 2.6.28 will crash if u-boot enable usb tty. So USB TTY is disabled. - For enabling USB TTY just add this line to file include/configs/nokia_rx51.h - - #define CONFIG_USB_TTY - - UBIFS support: UBIFS support is disabled, because U-Boot image is too big and cannot be
include/configs/nokia_rx51.h +7 -14
@@ -70,10 +70,12 @@/* USB device configuration */ #define CONFIG_USB_DEVICE +#define CONFIG_USB_TTY #define CONFIG_USBD_VENDORID 0x0421 -#define CONFIG_USBD_PRODUCTID 0x01c8 +#define CONFIG_USBD_PRODUCTID_CDCACM 0x01c8 +#define CONFIG_USBD_PRODUCTID_GSERIAL 0x01c8#define CONFIG_USBD_MANUFACTURER "Nokia" -#define CONFIG_USBD_PRODUCT_NAME "N900" +#define CONFIG_USBD_PRODUCT_NAME "N900 (U-Boot)"#define GPIO_SLIDE 71
@@ -108,15 +110,9 @@ int rx51_kp_getc(struct stdio_dev *sdev);/* Environment information */ #define CONFIG_EXTRA_ENV_SETTINGS \ "usbtty=cdc_acm\0" \ - "stdin=serial,vga\0" \ - "stdout=serial,vga\0" \ - "stderr=serial,vga\0" \ - "setcon=setenv stdin ${con};" \ - "setenv stdout ${con};" \ - "setenv stderr ${con}\0" \ - "sercon=setenv con serial; run setcon\0" \ - "usbcon=setenv con usbtty; run setcon\0" \ - "vgacon=setenv con vga; run setcon\0" \ + "stdin=usbtty,serial,vga\0" \ + "stdout=usbtty,serial,vga\0" \ + "stderr=usbtty,serial,vga\0" \ "slide=gpio input " __stringify(GPIO_SLIDE) "\0" \ "switchmmc=mmc dev ${mmcnum}\0" \ "kernaddr=0x82008000\0" \
@@ -198,9 +194,6 @@ int rx51_kp_getc(struct stdio_dev *sdev);#define CONFIG_POSTBOOTMENU \ "echo;" \ "echo Extra commands:;" \ - "echo run sercon - Use serial port for control.;" \ - "echo run usbcon - Use usbtty for control.;" \ - "echo run vgacon - Use framebuffer/keyboard.;" \ "echo run sdboot - Boot from SD card slot.;" \ "echo run emmcboot - Boot internal eMMC memory.;" \ "echo run attachboot - Boot attached kernel image.;" \
Signature · 1 line
2.20.1
v2 cover Nokia RX-51: Fix USB TTY console and enable it
In reply to Lukasz MajewskiQuoted 2 lines · On Saturday 20 February 2021 09:20:05 Lukasz Majewski wrote:
Great. Please resend the eligible patch (with adding this variable). And I will prepare PR ASAP.
Done!
http://patchwork.ozlabs.org/project/uboot/patch/20210220105015.26210-1-pali at kernel.org/