diff mbox

[U-Boot] usb: dwc3: Correct datatype of base to unsigned long

Message ID 874d86306a79b7f5d4b26de4dd2b8d795255eae8.1463036229.git.michal.simek@xilinx.com
State Accepted
Commit 4835c737ff8ca65aa2bf206dcddd6407f4bc40cf
Delegated to: Marek Vasut
Headers show

Commit Message

Michal Simek May 12, 2016, 6:57 a.m. UTC
From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>

Correct type of varibale base to unsigned long as
keeping it as int causes usb failures if MSB of
the base address is set.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 include/dwc3-uboot.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexander Graf May 12, 2016, 8:14 a.m. UTC | #1
On 12.05.16 08:57, Michal Simek wrote:
> From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
> 
> Correct type of varibale base to unsigned long as
> keeping it as int causes usb failures if MSB of
> the base address is set.
> 
> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

I can verify that with this patch the "usb start" doesn't crash the
system anymore and it seems to start doing something intelligible (I
don't have usb devices plugged in, so can't verify whether they also work).

Tested-by: Alexander Graf <agraf@suse.de>


Alex
Michal Simek June 2, 2016, 10:59 a.m. UTC | #2
Hi Marek,

On 12.5.2016 10:14, Alexander Graf wrote:
> 
> 
> On 12.05.16 08:57, Michal Simek wrote:
>> From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
>>
>> Correct type of varibale base to unsigned long as
>> keeping it as int causes usb failures if MSB of
>> the base address is set.
>>
>> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> 
> I can verify that with this patch the "usb start" doesn't crash the
> system anymore and it seems to start doing something intelligible (I
> don't have usb devices plugged in, so can't verify whether they also work).
> 
> Tested-by: Alexander Graf <agraf@suse.de>

Can you please look at it?

Thanks,
Michal
Marek Vasut June 2, 2016, 12:27 p.m. UTC | #3
On 06/02/2016 12:59 PM, Michal Simek wrote:
> Hi Marek,

Hi,

> On 12.5.2016 10:14, Alexander Graf wrote:
>>
>>
>> On 12.05.16 08:57, Michal Simek wrote:
>>> From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
>>>
>>> Correct type of varibale base to unsigned long as
>>> keeping it as int causes usb failures if MSB of
>>> the base address is set.
>>>
>>> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>
>> I can verify that with this patch the "usb start" doesn't crash the
>> system anymore and it seems to start doing something intelligible (I
>> don't have usb devices plugged in, so can't verify whether they also work).
>>
>> Tested-by: Alexander Graf <agraf@suse.de>
> 
> Can you please look at it?

It's in u-boot-usb, PR is coming
Michal Simek June 2, 2016, 1:17 p.m. UTC | #4
On 2.6.2016 14:27, Marek Vasut wrote:
> On 06/02/2016 12:59 PM, Michal Simek wrote:
>> Hi Marek,
> 
> Hi,
> 
>> On 12.5.2016 10:14, Alexander Graf wrote:
>>>
>>>
>>> On 12.05.16 08:57, Michal Simek wrote:
>>>> From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
>>>>
>>>> Correct type of varibale base to unsigned long as
>>>> keeping it as int causes usb failures if MSB of
>>>> the base address is set.
>>>>
>>>> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>
>>> I can verify that with this patch the "usb start" doesn't crash the
>>> system anymore and it seems to start doing something intelligible (I
>>> don't have usb devices plugged in, so can't verify whether they also work).
>>>
>>> Tested-by: Alexander Graf <agraf@suse.de>
>>
>> Can you please look at it?
> 
> It's in u-boot-usb, PR is coming
> 

Thanks,
Michal
diff mbox

Patch

diff --git a/include/dwc3-uboot.h b/include/dwc3-uboot.h
index 09ff8a74d669..7af2ad11e4ed 100644
--- a/include/dwc3-uboot.h
+++ b/include/dwc3-uboot.h
@@ -13,7 +13,7 @@ 
 #include <linux/usb/otg.h>
 
 struct dwc3_device {
-	int base;
+	unsigned long base;
 	enum usb_dr_mode dr_mode;
 	u32 maximum_speed;
 	unsigned tx_fifo_resize:1;