From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peng Fan Date: Tue, 5 Apr 2016 11:01:51 +0800 Subject: [U-Boot] [PATCH V2] fsl: esdhc: consolidate fsl_esdhc_cfg structure In-Reply-To: <56FA0948.5060303@nxp.com> References: <1458035870-770-1-git-send-email-van.freenix@gmail.com> <20160329012211.GA11150@linux-7smt.suse> <20160329043724.GA27378@linux-7smt.suse> <56FA0948.5060303@nxp.com> Message-ID: <20160405030149.GA18820@linux-7smt.suse> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 >>>>>> Cc: York Sun >>>>>> Cc: Yangbo Lu >>>>>> Cc: Eric Nelson >>>>>> Cc: Fabio Estevam >>>>>> Cc: Pantelis Antoniou >>>>>> Cc: Tom Rini >>>>>> --- >>>>>> >>>>>> 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 > >