* [U-Boot] [PATCH V2] fsl: esdhc: consolidate fsl_esdhc_cfg structure
@ 2016-03-15 9:57 Peng Fan
2016-03-15 13:58 ` Tom Rini
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Peng Fan @ 2016-03-15 9:57 UTC (permalink / raw)
To: u-boot
We can use phys_addr_to for esdhc_base to discard
the #ifdef.
Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Yangbo Lu <yangbo.lu@nxp.com>
Cc: Eric Nelson <eric@nelint.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Tom Rini <trini@konsulko.com>
---
V2:
Split this patch from the V1 patch set.
include/fsl_esdhc.h | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h
index 073048f..fa760a5 100644
--- a/include/fsl_esdhc.h
+++ b/include/fsl_esdhc.h
@@ -168,11 +168,7 @@
#define ESDHC_VENDORSPEC_VSELECT 0x00000002 /* Use 1.8V */
struct fsl_esdhc_cfg {
-#ifdef CONFIG_FSL_LAYERSCAPE
- u64 esdhc_base;
-#else
- u32 esdhc_base;
-#endif
+ phys_addr_t esdhc_base;
u32 sdhc_clk;
u8 max_bus_width;
struct mmc_config cfg;
--
2.6.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH V2] fsl: esdhc: consolidate fsl_esdhc_cfg structure
2016-03-15 9:57 [U-Boot] [PATCH V2] fsl: esdhc: consolidate fsl_esdhc_cfg structure Peng Fan
@ 2016-03-15 13:58 ` Tom Rini
2016-03-29 0:33 ` york sun
2016-04-06 17:22 ` York Sun
2 siblings, 0 replies; 10+ messages in thread
From: Tom Rini @ 2016-03-15 13:58 UTC (permalink / raw)
To: u-boot
On Tue, Mar 15, 2016 at 05:57:50PM +0800, Peng Fan wrote:
> We can use phys_addr_to for esdhc_base to discard
> the #ifdef.
>
> Signed-off-by: Peng Fan <van.freenix@gmail.com>
> Cc: York Sun <york.sun@nxp.com>
> Cc: Yangbo Lu <yangbo.lu@nxp.com>
> Cc: Eric Nelson <eric@nelint.com>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
> Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160315/d38ec529/attachment.sig>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH V2] fsl: esdhc: consolidate fsl_esdhc_cfg structure
2016-03-15 9:57 [U-Boot] [PATCH V2] fsl: esdhc: consolidate fsl_esdhc_cfg structure Peng Fan
2016-03-15 13:58 ` Tom Rini
@ 2016-03-29 0:33 ` york sun
2016-03-29 1:22 ` Peng Fan
2016-04-06 17:22 ` York Sun
2 siblings, 1 reply; 10+ messages in thread
From: york sun @ 2016-03-29 0:33 UTC (permalink / raw)
To: u-boot
On 03/15/2016 03:14 AM, Peng Fan wrote:
> We can use phys_addr_to for esdhc_base to discard
> the #ifdef.
>
> Signed-off-by: Peng Fan <van.freenix@gmail.com>
> Cc: York Sun <york.sun@nxp.com>
> Cc: Yangbo Lu <yangbo.lu@nxp.com>
> Cc: Eric Nelson <eric@nelint.com>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>
> V2:
> Split this patch from the V1 patch set.
>
> include/fsl_esdhc.h | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h
> index 073048f..fa760a5 100644
> --- a/include/fsl_esdhc.h
> +++ b/include/fsl_esdhc.h
> @@ -168,11 +168,7 @@
> #define ESDHC_VENDORSPEC_VSELECT 0x00000002 /* Use 1.8V */
>
> struct fsl_esdhc_cfg {
> -#ifdef CONFIG_FSL_LAYERSCAPE
> - u64 esdhc_base;
> -#else
> - u32 esdhc_base;
> -#endif
> + phys_addr_t esdhc_base;
> u32 sdhc_clk;
> u8 max_bus_width;
> struct mmc_config cfg;
>
Peng,
I thought this change is trivial and should be OK. But it turns out this change
brings comping warning to many PPC boards
drivers/mmc/fsl_esdhc.c:184:27: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
For assignment like this
struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base;
The phys_addr is not u32 for many targets.
York
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH V2] fsl: esdhc: consolidate fsl_esdhc_cfg structure
2016-03-29 0:33 ` york sun
@ 2016-03-29 1:22 ` Peng Fan
2016-03-29 1:35 ` york sun
0 siblings, 1 reply; 10+ messages in thread
From: Peng Fan @ 2016-03-29 1:22 UTC (permalink / raw)
To: u-boot
Hi York,
On Tue, Mar 29, 2016 at 12:33:42AM +0000, york sun wrote:
>On 03/15/2016 03:14 AM, Peng Fan wrote:
>> We can use phys_addr_to for esdhc_base to discard
>> the #ifdef.
>>
>> Signed-off-by: Peng Fan <van.freenix@gmail.com>
>> Cc: York Sun <york.sun@nxp.com>
>> Cc: Yangbo Lu <yangbo.lu@nxp.com>
>> Cc: Eric Nelson <eric@nelint.com>
>> Cc: Fabio Estevam <fabio.estevam@nxp.com>
>> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
>> Cc: Tom Rini <trini@konsulko.com>
>> ---
>>
>> V2:
>> Split this patch from the V1 patch set.
>>
>> include/fsl_esdhc.h | 6 +-----
>> 1 file changed, 1 insertion(+), 5 deletions(-)
>>
>> diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h
>> index 073048f..fa760a5 100644
>> --- a/include/fsl_esdhc.h
>> +++ b/include/fsl_esdhc.h
>> @@ -168,11 +168,7 @@
>> #define ESDHC_VENDORSPEC_VSELECT 0x00000002 /* Use 1.8V */
>>
>> struct fsl_esdhc_cfg {
>> -#ifdef CONFIG_FSL_LAYERSCAPE
>> - u64 esdhc_base;
>> -#else
>> - u32 esdhc_base;
>> -#endif
>> + phys_addr_t esdhc_base;
>> u32 sdhc_clk;
>> u8 max_bus_width;
>> struct mmc_config cfg;
>>
>
>Peng,
>
>I thought this change is trivial and should be OK. But it turns out this change
>brings comping warning to many PPC boards
>
>drivers/mmc/fsl_esdhc.c:184:27: warning: cast to pointer from integer of
>different size [-Wint-to-pointer-cast]
You can apply https://patchwork.ozlabs.org/patch/601919/ and retest.
I think the reason is that to PPC 64bit, "typedef unsigned long long phys_addr_t"
I think "esdhc_regs = (struct fsl_esdhc *)(unsigned long)(cfg->esdhc_base);"
can fix it.
Do I need to send a single V3 patch to fix the warning, or you apply the
driver model V3 patch, if the driver model V3 can fix it?
Regards,
Peng.
>
>For assignment like this
>
>struct fsl_esdhc *regs = (struct fsl_esdhc *)cfg->esdhc_base;
>
>The phys_addr is not u32 for many targets.
>
>York
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH V2] fsl: esdhc: consolidate fsl_esdhc_cfg structure
2016-03-29 1:22 ` Peng Fan
@ 2016-03-29 1:35 ` york sun
2016-03-29 4:37 ` Peng Fan
0 siblings, 1 reply; 10+ messages in thread
From: york sun @ 2016-03-29 1:35 UTC (permalink / raw)
To: u-boot
On 03/28/2016 06:23 PM, Peng Fan wrote:
> Hi York,
>
> On Tue, Mar 29, 2016 at 12:33:42AM +0000, york sun wrote:
>> On 03/15/2016 03:14 AM, Peng Fan wrote:
>>> We can use phys_addr_to for esdhc_base to discard
>>> the #ifdef.
>>>
>>> Signed-off-by: Peng Fan <van.freenix@gmail.com>
>>> Cc: York Sun <york.sun@nxp.com>
>>> Cc: Yangbo Lu <yangbo.lu@nxp.com>
>>> Cc: Eric Nelson <eric@nelint.com>
>>> Cc: Fabio Estevam <fabio.estevam@nxp.com>
>>> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
>>> Cc: Tom Rini <trini@konsulko.com>
>>> ---
>>>
>>> V2:
>>> Split this patch from the V1 patch set.
>>>
>>> include/fsl_esdhc.h | 6 +-----
>>> 1 file changed, 1 insertion(+), 5 deletions(-)
>>>
>>> diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h
>>> index 073048f..fa760a5 100644
>>> --- a/include/fsl_esdhc.h
>>> +++ b/include/fsl_esdhc.h
>>> @@ -168,11 +168,7 @@
>>> #define ESDHC_VENDORSPEC_VSELECT 0x00000002 /* Use 1.8V */
>>>
>>> struct fsl_esdhc_cfg {
>>> -#ifdef CONFIG_FSL_LAYERSCAPE
>>> - u64 esdhc_base;
>>> -#else
>>> - u32 esdhc_base;
>>> -#endif
>>> + phys_addr_t esdhc_base;
>>> u32 sdhc_clk;
>>> u8 max_bus_width;
>>> struct mmc_config cfg;
>>>
>>
>> Peng,
>>
>> I thought this change is trivial and should be OK. But it turns out this change
>> brings comping warning to many PPC boards
>>
>> drivers/mmc/fsl_esdhc.c:184:27: warning: cast to pointer from integer of
>> different size [-Wint-to-pointer-cast]
>
> You can apply https://patchwork.ozlabs.org/patch/601919/ and retest.
> I think the reason is that to PPC 64bit, "typedef unsigned long long phys_addr_t"
> I think "esdhc_regs = (struct fsl_esdhc *)(unsigned long)(cfg->esdhc_base);"
> can fix it.
>
> Do I need to send a single V3 patch to fix the warning, or you apply the
> driver model V3 patch, if the driver model V3 can fix it?
>
I am concerned about git bisect. It is not good to have a patch with compiling
warning. I prefer you fix it.
York
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH V2] fsl: esdhc: consolidate fsl_esdhc_cfg structure
2016-03-29 1:35 ` york sun
@ 2016-03-29 4:37 ` Peng Fan
2016-03-29 4:49 ` York Sun
0 siblings, 1 reply; 10+ messages in thread
From: Peng Fan @ 2016-03-29 4:37 UTC (permalink / raw)
To: u-boot
Hi York,
On Tue, Mar 29, 2016 at 01:35:09AM +0000, york sun wrote:
>On 03/28/2016 06:23 PM, Peng Fan wrote:
>> Hi York,
>>
>> On Tue, Mar 29, 2016 at 12:33:42AM +0000, york sun wrote:
>>> On 03/15/2016 03:14 AM, Peng Fan wrote:
>>>> We can use phys_addr_to for esdhc_base to discard
>>>> the #ifdef.
>>>>
>>>> Signed-off-by: Peng Fan <van.freenix@gmail.com>
>>>> Cc: York Sun <york.sun@nxp.com>
>>>> Cc: Yangbo Lu <yangbo.lu@nxp.com>
>>>> Cc: Eric Nelson <eric@nelint.com>
>>>> Cc: Fabio Estevam <fabio.estevam@nxp.com>
>>>> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
>>>> Cc: Tom Rini <trini@konsulko.com>
>>>> ---
>>>>
>>>> V2:
>>>> Split this patch from the V1 patch set.
>>>>
>>>> include/fsl_esdhc.h | 6 +-----
>>>> 1 file changed, 1 insertion(+), 5 deletions(-)
>>>>
>>>> diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h
>>>> index 073048f..fa760a5 100644
>>>> --- a/include/fsl_esdhc.h
>>>> +++ b/include/fsl_esdhc.h
>>>> @@ -168,11 +168,7 @@
>>>> #define ESDHC_VENDORSPEC_VSELECT 0x00000002 /* Use 1.8V */
>>>>
>>>> struct fsl_esdhc_cfg {
>>>> -#ifdef CONFIG_FSL_LAYERSCAPE
>>>> - u64 esdhc_base;
>>>> -#else
>>>> - u32 esdhc_base;
>>>> -#endif
>>>> + phys_addr_t esdhc_base;
>>>> u32 sdhc_clk;
>>>> u8 max_bus_width;
>>>> struct mmc_config cfg;
>>>>
>>>
>>> Peng,
>>>
>>> I thought this change is trivial and should be OK. But it turns out this change
>>> brings comping warning to many PPC boards
>>>
>>> drivers/mmc/fsl_esdhc.c:184:27: warning: cast to pointer from integer of
>>> different size [-Wint-to-pointer-cast]
>>
>> You can apply https://patchwork.ozlabs.org/patch/601919/ and retest.
>> I think the reason is that to PPC 64bit, "typedef unsigned long long phys_addr_t"
>> I think "esdhc_regs = (struct fsl_esdhc *)(unsigned long)(cfg->esdhc_base);"
>> can fix it.
>>
>> Do I need to send a single V3 patch to fix the warning, or you apply the
>> driver model V3 patch, if the driver model V3 can fix it?
>>
>
>I am concerned about git bisect. It is not good to have a patch with compiling
>warning. I prefer you fix it.
You can first apply https://patchwork.ozlabs.org/patch/601919/ V3 version
for driver model patch. In this patch I have such code:
"esdhc_regs = (struct fsl_esdhc *)(unsigned long)(cfg->esdhc_base);"
If you think this line code is ok, then you can apply this current patch.
If not, I think I may also fix this.
If this is ok for you, no need for me to send V3 :)
Thanks,
Peng.
>
>York
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH V2] fsl: esdhc: consolidate fsl_esdhc_cfg structure
2016-03-29 4:37 ` Peng Fan
@ 2016-03-29 4:49 ` York Sun
2016-04-05 3:01 ` Peng Fan
0 siblings, 1 reply; 10+ messages in thread
From: York Sun @ 2016-03-29 4:49 UTC (permalink / raw)
To: u-boot
On 03/28/2016 09:44 PM, Peng Fan wrote:
> Hi York,
>
> On Tue, Mar 29, 2016 at 01:35:09AM +0000, york sun wrote:
>> On 03/28/2016 06:23 PM, Peng Fan wrote:
>>> Hi York,
>>>
>>> On Tue, Mar 29, 2016 at 12:33:42AM +0000, york sun wrote:
>>>> On 03/15/2016 03:14 AM, Peng Fan wrote:
>>>>> We can use phys_addr_to for esdhc_base to discard
>>>>> the #ifdef.
>>>>>
>>>>> Signed-off-by: Peng Fan <van.freenix@gmail.com>
>>>>> Cc: York Sun <york.sun@nxp.com>
>>>>> Cc: Yangbo Lu <yangbo.lu@nxp.com>
>>>>> Cc: Eric Nelson <eric@nelint.com>
>>>>> Cc: Fabio Estevam <fabio.estevam@nxp.com>
>>>>> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
>>>>> Cc: Tom Rini <trini@konsulko.com>
>>>>> ---
>>>>>
>>>>> V2:
>>>>> Split this patch from the V1 patch set.
>>>>>
>>>>> include/fsl_esdhc.h | 6 +-----
>>>>> 1 file changed, 1 insertion(+), 5 deletions(-)
>>>>>
>>>>> diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h
>>>>> index 073048f..fa760a5 100644
>>>>> --- a/include/fsl_esdhc.h
>>>>> +++ b/include/fsl_esdhc.h
>>>>> @@ -168,11 +168,7 @@
>>>>> #define ESDHC_VENDORSPEC_VSELECT 0x00000002 /* Use 1.8V */
>>>>>
>>>>> struct fsl_esdhc_cfg {
>>>>> -#ifdef CONFIG_FSL_LAYERSCAPE
>>>>> - u64 esdhc_base;
>>>>> -#else
>>>>> - u32 esdhc_base;
>>>>> -#endif
>>>>> + phys_addr_t esdhc_base;
>>>>> u32 sdhc_clk;
>>>>> u8 max_bus_width;
>>>>> struct mmc_config cfg;
>>>>>
>>>>
>>>> Peng,
>>>>
>>>> I thought this change is trivial and should be OK. But it turns out this change
>>>> brings comping warning to many PPC boards
>>>>
>>>> drivers/mmc/fsl_esdhc.c:184:27: warning: cast to pointer from integer of
>>>> different size [-Wint-to-pointer-cast]
>>>
>>> You can apply https://patchwork.ozlabs.org/patch/601919/ and retest.
>>> I think the reason is that to PPC 64bit, "typedef unsigned long long phys_addr_t"
>>> I think "esdhc_regs = (struct fsl_esdhc *)(unsigned long)(cfg->esdhc_base);"
>>> can fix it.
>>>
>>> Do I need to send a single V3 patch to fix the warning, or you apply the
>>> driver model V3 patch, if the driver model V3 can fix it?
>>>
>>
>> I am concerned about git bisect. It is not good to have a patch with compiling
>> warning. I prefer you fix it.
>
> You can first apply https://patchwork.ozlabs.org/patch/601919/ V3 version
> for driver model patch. In this patch I have such code:
> "esdhc_regs = (struct fsl_esdhc *)(unsigned long)(cfg->esdhc_base);"
> If you think this line code is ok, then you can apply this current patch.
> If not, I think I may also fix this.
>
> If this is ok for you, no need for me to send V3 :)
>
Will try tomorrow.
York
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH V2] fsl: esdhc: consolidate fsl_esdhc_cfg structure
2016-03-29 4:49 ` York Sun
@ 2016-04-05 3:01 ` Peng Fan
2016-04-05 3:20 ` york sun
0 siblings, 1 reply; 10+ messages in thread
From: Peng Fan @ 2016-04-05 3:01 UTC (permalink / raw)
To: u-boot
Hi York,
On Mon, Mar 28, 2016 at 09:49:12PM -0700, York Sun wrote:
>On 03/28/2016 09:44 PM, Peng Fan wrote:
>> Hi York,
>>
>> On Tue, Mar 29, 2016 at 01:35:09AM +0000, york sun wrote:
>>> On 03/28/2016 06:23 PM, Peng Fan wrote:
>>>> Hi York,
>>>>
>>>> On Tue, Mar 29, 2016 at 12:33:42AM +0000, york sun wrote:
>>>>> On 03/15/2016 03:14 AM, Peng Fan wrote:
>>>>>> We can use phys_addr_to for esdhc_base to discard
>>>>>> the #ifdef.
>>>>>>
>>>>>> Signed-off-by: Peng Fan <van.freenix@gmail.com>
>>>>>> Cc: York Sun <york.sun@nxp.com>
>>>>>> Cc: Yangbo Lu <yangbo.lu@nxp.com>
>>>>>> Cc: Eric Nelson <eric@nelint.com>
>>>>>> Cc: Fabio Estevam <fabio.estevam@nxp.com>
>>>>>> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
>>>>>> Cc: Tom Rini <trini@konsulko.com>
>>>>>> ---
>>>>>>
>>>>>> V2:
>>>>>> Split this patch from the V1 patch set.
>>>>>>
>>>>>> include/fsl_esdhc.h | 6 +-----
>>>>>> 1 file changed, 1 insertion(+), 5 deletions(-)
>>>>>>
>>>>>> diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h
>>>>>> index 073048f..fa760a5 100644
>>>>>> --- a/include/fsl_esdhc.h
>>>>>> +++ b/include/fsl_esdhc.h
>>>>>> @@ -168,11 +168,7 @@
>>>>>> #define ESDHC_VENDORSPEC_VSELECT 0x00000002 /* Use 1.8V */
>>>>>>
>>>>>> struct fsl_esdhc_cfg {
>>>>>> -#ifdef CONFIG_FSL_LAYERSCAPE
>>>>>> - u64 esdhc_base;
>>>>>> -#else
>>>>>> - u32 esdhc_base;
>>>>>> -#endif
>>>>>> + phys_addr_t esdhc_base;
>>>>>> u32 sdhc_clk;
>>>>>> u8 max_bus_width;
>>>>>> struct mmc_config cfg;
>>>>>>
>>>>>
>>>>> Peng,
>>>>>
>>>>> I thought this change is trivial and should be OK. But it turns out this change
>>>>> brings comping warning to many PPC boards
>>>>>
>>>>> drivers/mmc/fsl_esdhc.c:184:27: warning: cast to pointer from integer of
>>>>> different size [-Wint-to-pointer-cast]
>>>>
>>>> You can apply https://patchwork.ozlabs.org/patch/601919/ and retest.
>>>> I think the reason is that to PPC 64bit, "typedef unsigned long long phys_addr_t"
>>>> I think "esdhc_regs = (struct fsl_esdhc *)(unsigned long)(cfg->esdhc_base);"
>>>> can fix it.
>>>>
>>>> Do I need to send a single V3 patch to fix the warning, or you apply the
>>>> driver model V3 patch, if the driver model V3 can fix it?
>>>>
>>>
>>> I am concerned about git bisect. It is not good to have a patch with compiling
>>> warning. I prefer you fix it.
>>
>> You can first apply https://patchwork.ozlabs.org/patch/601919/ V3 version
>> for driver model patch. In this patch I have such code:
>> "esdhc_regs = (struct fsl_esdhc *)(unsigned long)(cfg->esdhc_base);"
>> If you think this line code is ok, then you can apply this current patch.
>> If not, I think I may also fix this.
>>
>> If this is ok for you, no need for me to send V3 :)
>>
>
>Will try tomorrow.
Is there any update on this? If this patch with the driver model patch are
ok in your side, will you pick the two patches?
Thanks,
Peng.
>
>York
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH V2] fsl: esdhc: consolidate fsl_esdhc_cfg structure
2016-04-05 3:01 ` Peng Fan
@ 2016-04-05 3:20 ` york sun
0 siblings, 0 replies; 10+ messages in thread
From: york sun @ 2016-04-05 3:20 UTC (permalink / raw)
To: u-boot
Yes they are good. They are in my test queue.
York
-------- Original Message --------
From: Peng Fan <van.freenix@gmail.com>
Sent: Monday, April 4, 2016 08:05 PM
To: york sun <york.sun@nxp.com>
Subject: Re: [PATCH V2] fsl: esdhc: consolidate fsl_esdhc_cfg structure
CC: sbabic at denx.de,trini at konsulko.com,u-boot at lists.denx.de,Yangbo Lu <yangbo.lu@nxp.com>,Eric Nelson <eric@nelint.com>,Fabio Estevam <fabio.estevam@nxp.com>,Pantelis Antoniou <panto@antoniou-consulting.com>
Hi York,
On Mon, Mar 28, 2016 at 09:49:12PM -0700, York Sun wrote:
>On 03/28/2016 09:44 PM, Peng Fan wrote:
>> Hi York,
>>
>> On Tue, Mar 29, 2016 at 01:35:09AM +0000, york sun wrote:
>>> On 03/28/2016 06:23 PM, Peng Fan wrote:
>>>> Hi York,
>>>>
>>>> On Tue, Mar 29, 2016 at 12:33:42AM +0000, york sun wrote:
>>>>> On 03/15/2016 03:14 AM, Peng Fan wrote:
>>>>>> We can use phys_addr_to for esdhc_base to discard
>>>>>> the #ifdef.
>>>>>>
>>>>>> Signed-off-by: Peng Fan <van.freenix@gmail.com>
>>>>>> Cc: York Sun <york.sun@nxp.com>
>>>>>> Cc: Yangbo Lu <yangbo.lu@nxp.com>
>>>>>> Cc: Eric Nelson <eric@nelint.com>
>>>>>> Cc: Fabio Estevam <fabio.estevam@nxp.com>
>>>>>> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
>>>>>> Cc: Tom Rini <trini@konsulko.com>
>>>>>> ---
>>>>>>
>>>>>> V2:
>>>>>> Split this patch from the V1 patch set.
>>>>>>
>>>>>> include/fsl_esdhc.h | 6 +-----
>>>>>> 1 file changed, 1 insertion(+), 5 deletions(-)
>>>>>>
>>>>>> diff --git a/include/fsl_esdhc.h b/include/fsl_esdhc.h
>>>>>> index 073048f..fa760a5 100644
>>>>>> --- a/include/fsl_esdhc.h
>>>>>> +++ b/include/fsl_esdhc.h
>>>>>> @@ -168,11 +168,7 @@
>>>>>> #define ESDHC_VENDORSPEC_VSELECT 0x00000002 /* Use 1.8V */
>>>>>>
>>>>>> struct fsl_esdhc_cfg {
>>>>>> -#ifdef CONFIG_FSL_LAYERSCAPE
>>>>>> - u64 esdhc_base;
>>>>>> -#else
>>>>>> - u32 esdhc_base;
>>>>>> -#endif
>>>>>> + phys_addr_t esdhc_base;
>>>>>> u32 sdhc_clk;
>>>>>> u8 max_bus_width;
>>>>>> struct mmc_config cfg;
>>>>>>
>>>>>
>>>>> Peng,
>>>>>
>>>>> I thought this change is trivial and should be OK. But it turns out this change
>>>>> brings comping warning to many PPC boards
>>>>>
>>>>> drivers/mmc/fsl_esdhc.c:184:27: warning: cast to pointer from integer of
>>>>> different size [-Wint-to-pointer-cast]
>>>>
>>>> You can apply https://patchwork.ozlabs.org/patch/601919/ and retest.
>>>> I think the reason is that to PPC 64bit, "typedef unsigned long long phys_addr_t"
>>>> I think "esdhc_regs = (struct fsl_esdhc *)(unsigned long)(cfg->esdhc_base);"
>>>> can fix it.
>>>>
>>>> Do I need to send a single V3 patch to fix the warning, or you apply the
>>>> driver model V3 patch, if the driver model V3 can fix it?
>>>>
>>>
>>> I am concerned about git bisect. It is not good to have a patch with compiling
>>> warning. I prefer you fix it.
>>
>> You can first apply https://patchwork.ozlabs.org/patch/601919/ V3 version
>> for driver model patch. In this patch I have such code:
>> "esdhc_regs = (struct fsl_esdhc *)(unsigned long)(cfg->esdhc_base);"
>> If you think this line code is ok, then you can apply this current patch.
>> If not, I think I may also fix this.
>>
>> If this is ok for you, no need for me to send V3 :)
>>
>
>Will try tomorrow.
Is there any update on this? If this patch with the driver model patch are
ok in your side, will you pick the two patches?
Thanks,
Peng.
>
>York
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH V2] fsl: esdhc: consolidate fsl_esdhc_cfg structure
2016-03-15 9:57 [U-Boot] [PATCH V2] fsl: esdhc: consolidate fsl_esdhc_cfg structure Peng Fan
2016-03-15 13:58 ` Tom Rini
2016-03-29 0:33 ` york sun
@ 2016-04-06 17:22 ` York Sun
2 siblings, 0 replies; 10+ messages in thread
From: York Sun @ 2016-04-06 17:22 UTC (permalink / raw)
To: u-boot
On 03/15/2016 03:14 AM, Peng Fan wrote:
> We can use phys_addr_to for esdhc_base to discard
> the #ifdef.
>
> Signed-off-by: Peng Fan <van.freenix@gmail.com>
> Cc: York Sun <york.sun@nxp.com>
> Cc: Yangbo Lu <yangbo.lu@nxp.com>
> Cc: Eric Nelson <eric@nelint.com>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>
> V2:
> Split this patch from the V1 patch set.
>
> include/fsl_esdhc.h | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
Applied to u-boot-fsl-qoriq master. Awaiting upstream.
Thanks.
York
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-04-06 17:22 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-15 9:57 [U-Boot] [PATCH V2] fsl: esdhc: consolidate fsl_esdhc_cfg structure Peng Fan
2016-03-15 13:58 ` Tom Rini
2016-03-29 0:33 ` york sun
2016-03-29 1:22 ` Peng Fan
2016-03-29 1:35 ` york sun
2016-03-29 4:37 ` Peng Fan
2016-03-29 4:49 ` York Sun
2016-04-05 3:01 ` Peng Fan
2016-04-05 3:20 ` york sun
2016-04-06 17:22 ` York Sun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.