[PATCH 6/7] ddr: altera: arria10: Change %i to %u for printf

Tom Rini trini at konsulko.com
Wed Apr 15 16:56:47 CEST 2020


On Wed, Apr 15, 2020 at 02:45:08PM +0200, Marek Vasut wrote:
> On 4/15/20 11:00 AM, Ley Foon Tan wrote:
> > Tiny printf doesn't support %i, change to %u.
> > 
> > Signed-off-by: Ley Foon Tan <ley.foon.tan at intel.com>
> > ---
> >  drivers/ddr/altera/sdram_arria10.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/ddr/altera/sdram_arria10.c b/drivers/ddr/altera/sdram_arria10.c
> > index e3f11984a978..8acf324117af 100644
> > --- a/drivers/ddr/altera/sdram_arria10.c
> > +++ b/drivers/ddr/altera/sdram_arria10.c
> > @@ -195,7 +195,7 @@ static void sdram_init_ecc_bits(u32 size)
> >  
> >  	dcache_enable();
> >  
> > -	printf("DDRCAL: Scrubbing ECC RAM (%i MiB).\n", size >> 20);
> > +	printf("DDRCAL: Scrubbing ECC RAM (%u MiB).\n", size >> 20);
> >  	memset((void *)0x8000, 0, size - 0x8000);
> >  	flush_dcache_all();
> >  	printf("DDRCAL: Scrubbing ECC RAM done.\n");
> 
> Yes, sadly, tiny printf is broken so we need to patch code to work
> around that breakage.

Yes, limited by design, thanks for changing.

Reviewed-by: Tom Rini <trini at konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200415/574b3cf1/attachment.sig>


More information about the U-Boot mailing list