fsl: esdhc: consolidate fsl_esdhc_cfg structure
PATCH v2 1/1 fsl: esdhc: consolidate fsl_esdhc_cfg structure
We can use phys_addr_to for esdhc_base to discard
the #ifdef.
---
V2:
Split this patch from the V1 patch set.
include/fsl_esdhc.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
include/fsl_esdhc.h +1 -5
@@ -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;
Signature · 1 line
2.6.2
PATCH v2 1/1 fsl: esdhc: consolidate fsl_esdhc_cfg structure
Quoted 10 lines · Peng Fan
We can use
phys_addr_toforesdhc_baseto discard
the #ifdef.Signed-off-by Peng Fan <[email protected]>Cc York Sun <[email protected]>Cc Yangbo Lu <[email protected]>Cc Eric Nelson <[email protected]>Cc Fabio Estevam <[email protected]>Cc Pantelis Antoniou <[email protected]>Cc Tom Rini <[email protected]>
Signature · 8 lines
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>
PATCH v2 1/1 fsl: esdhc: consolidate fsl_esdhc_cfg structure
In reply to Peng FanQuoted 26 lines · Peng Fan
We can use
phys_addr_toforesdhc_baseto discard
the #ifdef.Signed-off-by Peng Fan <[email protected]>Cc York Sun <[email protected]>Cc Yangbo Lu <[email protected]>Cc Eric Nelson <[email protected]>Cc Fabio Estevam <[email protected]>Cc Pantelis Antoniou <[email protected]>Cc Tom Rini <[email protected]>---
V2:
Split this patch from the V1 patch set.include/fsl_esdhc.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)include/fsl_esdhc.h +0
-0@@ -168,11 +168,7 @@#define ESDHC_VENDORSPEC_VSELECT 0x00000002/* Use 1.8V */
include/fsl_esdhc.h line 174
Quoted 10 lines
include/fsl_esdhc.h +1
-5struct 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
PATCH v2 1/1 fsl: esdhc: consolidate fsl_esdhc_cfg structure
Hi York,
Quoted 40 lines · york sun
Quoted 26 lines · Peng Fan
We can use
phys_addr_toforesdhc_baseto discard
the #ifdef.Signed-off-by Peng Fan <[email protected]>Cc York Sun <[email protected]>Cc Yangbo Lu <[email protected]>Cc Eric Nelson <[email protected]>Cc Fabio Estevam <[email protected]>Cc Pantelis Antoniou <[email protected]>Cc Tom Rini <[email protected]>---
V2:
Split this patch from the V1 patch set.include/fsl_esdhc.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)include/fsl_esdhc.h +0
-0@@ -168,11 +168,7 @@#define ESDHC_VENDORSPEC_VSELECT 0x00000002/* Use 1.8V */ include/fsl_esdhc.h line 174
Quoted 10 lines
include/fsl_esdhc.h +1
-5struct 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,
Quoted 5 lines
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.
Quoted 9 lines
For assignment like this
struct
fsl_esdhc*regs = (structfsl_esdhc*)cfg->esdhc_base;The
phys_addris not u32 for many targets.York
PATCH v2 1/1 fsl: esdhc: consolidate fsl_esdhc_cfg structure
Quoted 49 lines · Peng Fan
Hi York,
Quoted 40 lines · york sun
Quoted 26 lines · Peng Fan
We can use
phys_addr_toforesdhc_baseto discard
the #ifdef.Signed-off-by Peng Fan <[email protected]>Cc York Sun <[email protected]>Cc Yangbo Lu <[email protected]>Cc Eric Nelson <[email protected]>Cc Fabio Estevam <[email protected]>Cc Pantelis Antoniou <[email protected]>Cc Tom Rini <[email protected]>---
V2:
Split this patch from the V1 patch set.include/fsl_esdhc.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)include/fsl_esdhc.h +0
-0@@ -168,11 +168,7 @@#define ESDHC_VENDORSPEC_VSELECT 0x00000002/* Use 1.8V */ include/fsl_esdhc.h line 174
Quoted 10 lines
include/fsl_esdhc.h +1
-5struct 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,
Quoted 5 lines
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]
Quoted 8 lines
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= (structfsl_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
PATCH v2 1/1 fsl: esdhc: consolidate fsl_esdhc_cfg structure
Hi York,
Quoted 55 lines · york sun
Quoted 54 lines · Peng Fan
Hi York,
Quoted 40 lines · york sun
Quoted 26 lines · Peng Fan
We can use
phys_addr_toforesdhc_baseto discard
the #ifdef.Signed-off-by Peng Fan <[email protected]>Cc York Sun <[email protected]>Cc Yangbo Lu <[email protected]>Cc Eric Nelson <[email protected]>Cc Fabio Estevam <[email protected]>Cc Pantelis Antoniou <[email protected]>Cc Tom Rini <[email protected]>---
V2:
Split this patch from the V1 patch set.include/fsl_esdhc.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)include/fsl_esdhc.h +0
-0@@ -168,11 +168,7 @@#define ESDHC_VENDORSPEC_VSELECT 0x00000002/* Use 1.8V */ include/fsl_esdhc.h line 174
Quoted 10 lines
include/fsl_esdhc.h +1
-5struct 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,
Quoted 5 lines
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= (structfsl_esdhc*)(unsigned long)(cfg->esdhc_base);" can fix it.
Quoted 6 lines
Quoted 3 lines
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.
Quoted 4 lines
York
PATCH v2 1/1 fsl: esdhc: consolidate fsl_esdhc_cfg structure
Quoted 65 lines · Peng Fan
Hi York,
Quoted 55 lines · york sun
Quoted 54 lines · Peng Fan
Hi York,
Quoted 40 lines · york sun
Quoted 26 lines · Peng Fan
We can use
phys_addr_toforesdhc_baseto discard
the #ifdef.Signed-off-by Peng Fan <[email protected]>Cc York Sun <[email protected]>Cc Yangbo Lu <[email protected]>Cc Eric Nelson <[email protected]>Cc Fabio Estevam <[email protected]>Cc Pantelis Antoniou <[email protected]>Cc Tom Rini <[email protected]>---
V2:
Split this patch from the V1 patch set.include/fsl_esdhc.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)include/fsl_esdhc.h +0
-0@@ -168,11 +168,7 @@#define ESDHC_VENDORSPEC_VSELECT 0x00000002/* Use 1.8V */ include/fsl_esdhc.h line 174
Quoted 10 lines
include/fsl_esdhc.h +1
-5struct 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,
Quoted 5 lines
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= (structfsl_esdhc*)(unsigned long)(cfg->esdhc_base);" can fix it.Quoted 6 lines
Quoted 3 lines
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.
Quoted 8 lines
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= (structfsl_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
PATCH v2 1/1 fsl: esdhc: consolidate fsl_esdhc_cfg structure
Hi York,
Quoted 72 lines · York Sun
Quoted 71 lines · Peng Fan
Hi York,
Quoted 55 lines · york sun
Quoted 54 lines · Peng Fan
Hi York,
Quoted 40 lines · york sun
Quoted 26 lines · Peng Fan
We can use
phys_addr_toforesdhc_baseto discard
the #ifdef.Signed-off-by Peng Fan <[email protected]>Cc York Sun <[email protected]>Cc Yangbo Lu <[email protected]>Cc Eric Nelson <[email protected]>Cc Fabio Estevam <[email protected]>Cc Pantelis Antoniou <[email protected]>Cc Tom Rini <[email protected]>---
V2:
Split this patch from the V1 patch set.include/fsl_esdhc.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)include/fsl_esdhc.h +0
-0@@ -168,11 +168,7 @@#define ESDHC_VENDORSPEC_VSELECT 0x00000002/* Use 1.8V */ include/fsl_esdhc.h line 174
Quoted 10 lines
include/fsl_esdhc.h +1
-5struct 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,
Quoted 5 lines
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= (structfsl_esdhc*)(unsigned long)(cfg->esdhc_base);" can fix it.Quoted 6 lines
Quoted 3 lines
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= (structfsl_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.
Quoted 4 lines
Quoted 2 lines
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.
Quoted 4 lines
York
PATCH v2 1/1 fsl: esdhc: consolidate fsl_esdhc_cfg structure
Yes they are good. They are in my test queue.
York
-------- Original Message --------
From: Peng Fan <[email protected]>
Sent: Monday, April 4, 2016 08:05 PM
To: york sun <[email protected]>
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 <[email protected]>,Eric Nelson <[email protected]>,Fabio Estevam <[email protected]>,Pantelis Antoniou <[email protected]>
Hi York,
Quoted 72 lines · York Sun
Quoted 71 lines · Peng Fan
Hi York,
Quoted 55 lines · york sun
Quoted 54 lines · Peng Fan
Hi York,
Quoted 40 lines · york sun
Quoted 26 lines · Peng Fan
We can use
phys_addr_toforesdhc_baseto discard
the #ifdef.Signed-off-by Peng Fan <[email protected]>Cc York Sun <[email protected]>Cc Yangbo Lu <[email protected]>Cc Eric Nelson <[email protected]>Cc Fabio Estevam <[email protected]>Cc Pantelis Antoniou <[email protected]>Cc Tom Rini <[email protected]>---
V2:
Split this patch from the V1 patch set.include/fsl_esdhc.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)include/fsl_esdhc.h +0
-0@@ -168,11 +168,7 @@#define ESDHC_VENDORSPEC_VSELECT 0x00000002/* Use 1.8V */ include/fsl_esdhc.h line 174
Quoted 10 lines
include/fsl_esdhc.h +1
-5struct 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,
Quoted 5 lines
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= (structfsl_esdhc*)(unsigned long)(cfg->esdhc_base);" can fix it.Quoted 6 lines
Quoted 3 lines
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= (structfsl_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.
Quoted 4 lines
Quoted 2 lines
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.
Quoted 4 lines
York
PATCH v2 1/1 fsl: esdhc: consolidate fsl_esdhc_cfg structure
In reply to Peng FanQuoted 10 lines · Peng Fan
We can use
phys_addr_toforesdhc_baseto discard
the #ifdef.Signed-off-by Peng Fan <[email protected]>Cc York Sun <[email protected]>Cc Yangbo Lu <[email protected]>Cc Eric Nelson <[email protected]>Cc Fabio Estevam <[email protected]>Cc Pantelis Antoniou <[email protected]>Cc Tom Rini <[email protected]>
Quoted 8 lines
---
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