Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: renesas_usbhs: support byte addressable CFIFO

Some SoC have a CFIFO register that is byte addressable. This means
when the CFIFO access is set to 32-bit, you can write 8-bit values to
addresses CFIFO+0, CFIFO+1, CFIFO+2, CFIFO+3.

Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Chris Brandt and committed by
Greg Kroah-Hartman
f7560669 2195e3af

+8 -2
+7 -2
drivers/usb/renesas_usbhs/fifo.c
··· 543 543 } 544 544 545 545 /* the rest operation */ 546 - for (i = 0; i < len; i++) 547 - iowrite8(buf[i], addr + (0x03 - (i & 0x03))); 546 + if (usbhs_get_dparam(priv, cfifo_byte_addr)) { 547 + for (i = 0; i < len; i++) 548 + iowrite8(buf[i], addr + (i & 0x03)); 549 + } else { 550 + for (i = 0; i < len; i++) 551 + iowrite8(buf[i], addr + (0x03 - (i & 0x03))); 552 + } 548 553 549 554 /* 550 555 * variable update
+1
include/linux/usb/renesas_usbhs.h
··· 191 191 u32 has_usb_dmac:1; /* for USB-DMAC */ 192 192 u32 runtime_pwctrl:1; 193 193 u32 has_cnen:1; 194 + u32 cfifo_byte_addr:1; /* CFIFO is byte addressable */ 194 195 #define USBHS_USB_DMAC_XFER_SIZE 32 /* hardcode the xfer size */ 195 196 }; 196 197