From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 17 Apr 2014 16:07:21 +0200 Subject: [U-Boot] [PATCH 1/2] usb: r8a66597: Fix initialization hub that using, R8A66597_MAX_ROOT_HUB In-Reply-To: <534F8750.70201@renesas.com> References: <534F8750.70201@renesas.com> Message-ID: <201404171607.21190.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday, April 17, 2014 at 09:48:32 AM, yasuhisa umano wrote: > 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 > --- > drivers/usb/host/r8a66597-hcd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/host/r8a66597-hcd.c > b/drivers/usb/host/r8a66597-hcd.c index dfe5423..c58d2a9 100644 > --- a/drivers/usb/host/r8a66597-hcd.c > +++ b/drivers/usb/host/r8a66597-hcd.c > @@ -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)); Hmm, looking at get_intenb_reg(), this is slightly dangerous, but I will trust you you know what you are doing . I am a bit worried someone might set R8A66597_MAX_ROOT_HUB to value >2 and will wonder why doesn't it work. Anyway, I will apply this and if you feel my rant is valid, submit subsequent patch. Best regards, Marek Vasut