]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
usb: r8a66597: Fix initialization hub that using R8A66597_MAX_ROOT_HUB
authoryasuhisa umano <yasuhisa.umano.zc@renesas.com>
Fri, 18 Apr 2014 02:33:08 +0000 (11:33 +0900)
committerMarek Vasut <marex@denx.de>
Wed, 25 Jun 2014 20:31:41 +0000 (22:31 +0200)
This driver is processed as two USB hub despite one.
The number of root hub is defined in R8A66597_MAX_ROOT_HUB.
This fixes that register is accessed by using the definition
of R8A66597_MAX_ROOT_HUB.

Signed-off-by: Yasuhisa Umano <yasuhisa.umano.zc@renesas.com>
drivers/usb/host/r8a66597-hcd.c

index dfe5423b8ab3c53ef58b814a45dd64305e384c5d..c58d2a9d115d9c7097e36fac6f0f6fe7e02010a6 100644 (file)
@@ -164,8 +164,8 @@ static int enable_controller(struct r8a66597 *r8a66597)
 
        r8a66597_bset(r8a66597, INTL, SOFCFG);
        r8a66597_write(r8a66597, 0, INTENB0);
-       r8a66597_write(r8a66597, 0, INTENB1);
-       r8a66597_write(r8a66597, 0, INTENB2);
+       for (port = 0; port < R8A66597_MAX_ROOT_HUB; port++)
+               r8a66597_write(r8a66597, 0, get_intenb_reg(port));
 
        r8a66597_bset(r8a66597, CONFIG_R8A66597_ENDIAN & BIGEND, CFIFOSEL);
        r8a66597_bset(r8a66597, CONFIG_R8A66597_ENDIAN & BIGEND, D0FIFOSEL);