]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: musb: Read value of PERI_RXCSR to 16bit variable
authorPali Rohár <pali@kernel.org>
Sun, 7 Feb 2021 13:50:06 +0000 (14:50 +0100)
committerMarek Vasut <marex@denx.de>
Wed, 3 Mar 2021 03:12:46 +0000 (04:12 +0100)
PERI_RXCSR is 16bit register so store its value into 16bit local variable.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
drivers/usb/musb/musb_udc.c

index d901f8777c2c4682033d462f99cb472d2dd0f416..67d1c56f9a774246cca0aad18317f1b883cc9e34 100644 (file)
@@ -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)