public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] usb: r8a66597: Fix initialization hub that using, R8A66597_MAX_ROOT_HUB
@ 2014-04-17  7:48 yasuhisa umano
  2014-04-17 10:47 ` Marek Vasut
  2014-04-17 14:07 ` Marek Vasut
  0 siblings, 2 replies; 6+ messages in thread
From: yasuhisa umano @ 2014-04-17  7:48 UTC (permalink / raw)
  To: u-boot

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 |    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));

 	r8a66597_bset(r8a66597, CONFIG_R8A66597_ENDIAN & BIGEND, CFIFOSEL);
 	r8a66597_bset(r8a66597, CONFIG_R8A66597_ENDIAN & BIGEND, D0FIFOSEL);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/2] usb: r8a66597: Fix initialization hub that using, R8A66597_MAX_ROOT_HUB
  2014-04-17  7:48 [U-Boot] [PATCH 1/2] usb: r8a66597: Fix initialization hub that using, R8A66597_MAX_ROOT_HUB yasuhisa umano
@ 2014-04-17 10:47 ` Marek Vasut
  2014-04-18  2:25   ` Yasuhisa Umano
  2014-04-17 14:07 ` Marek Vasut
  1 sibling, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2014-04-17 10:47 UTC (permalink / raw)
  To: u-boot

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 <yasuhisa.umano.zc@renesas.com>

Is there any reason why those two patches were sent twice please ? They seem the 
same in both cases.

Otherwise, I'm fine with those patches.

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/2] usb: r8a66597: Fix initialization hub that using, R8A66597_MAX_ROOT_HUB
  2014-04-17  7:48 [U-Boot] [PATCH 1/2] usb: r8a66597: Fix initialization hub that using, R8A66597_MAX_ROOT_HUB yasuhisa umano
  2014-04-17 10:47 ` Marek Vasut
@ 2014-04-17 14:07 ` Marek Vasut
  2014-04-18  2:25   ` Yasuhisa Umano
  1 sibling, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2014-04-17 14:07 UTC (permalink / raw)
  To: u-boot

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 <yasuhisa.umano.zc@renesas.com>
> ---
>  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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/2] usb: r8a66597: Fix initialization hub that using, R8A66597_MAX_ROOT_HUB
  2014-04-17 10:47 ` Marek Vasut
@ 2014-04-18  2:25   ` Yasuhisa Umano
  0 siblings, 0 replies; 6+ messages in thread
From: Yasuhisa Umano @ 2014-04-18  2:25 UTC (permalink / raw)
  To: u-boot

Hi

Sorry.
I failed to send patchs to ML by setting of MUA.

Best regards,
Yasuhisa

(2014/04/17 19:47), Marek Vasut wrote:
> 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 <yasuhisa.umano.zc@renesas.com>
>
> Is there any reason why those two patches were sent twice please ? They seem the
> same in both cases.
>
> Otherwise, I'm fine with those patches.
>
> Best regards,
> Marek Vasut
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/2] usb: r8a66597: Fix initialization hub that using, R8A66597_MAX_ROOT_HUB
  2014-04-17 14:07 ` Marek Vasut
@ 2014-04-18  2:25   ` Yasuhisa Umano
  2014-04-18 13:57     ` Marek Vasut
  0 siblings, 1 reply; 6+ messages in thread
From: Yasuhisa Umano @ 2014-04-18  2:25 UTC (permalink / raw)
  To: u-boot

Hi,
Thanks for your comment.

(2014/04/17 23:07), Marek Vasut wrote:
> 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 <yasuhisa.umano.zc@renesas.com>
>> ---
>>   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.

I understood your point.
Certainly, current?device drivers support only the initialization of 1 or 2 
interrupt for hub.
If this driver has a hub of more future, I will send the patch.

>
> Anyway, I will apply this and if you feel my rant is valid, submit subsequent
> patch.

Thank you.
>
> Best regards,
> Marek Vasut
>

Best regards,
Yasuhisa

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/2] usb: r8a66597: Fix initialization hub that using, R8A66597_MAX_ROOT_HUB
  2014-04-18  2:25   ` Yasuhisa Umano
@ 2014-04-18 13:57     ` Marek Vasut
  0 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2014-04-18 13:57 UTC (permalink / raw)
  To: u-boot

On Friday, April 18, 2014 at 04:25:41 AM, Yasuhisa Umano wrote:
> Hi,
> Thanks for your comment.
> 
> (2014/04/17 23:07), Marek Vasut wrote:
> > 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 <yasuhisa.umano.zc@renesas.com>
> >> ---
> >> 
> >>   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.
> 
> I understood your point.
> Certainly, current?device drivers support only the initialization of 1 or 2
> interrupt for hub.
> If this driver has a hub of more future, I will send the patch.

Thanks

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-18 13:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-17  7:48 [U-Boot] [PATCH 1/2] usb: r8a66597: Fix initialization hub that using, R8A66597_MAX_ROOT_HUB yasuhisa umano
2014-04-17 10:47 ` Marek Vasut
2014-04-18  2:25   ` Yasuhisa Umano
2014-04-17 14:07 ` Marek Vasut
2014-04-18  2:25   ` Yasuhisa Umano
2014-04-18 13:57     ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox