[U-Boot] [PATCH v2 0/3] cadence-quadspi: Fix issues with non 32bit aligned accesses

Vignesh R vigneshr at ti.com
Tue Jan 23 10:05:22 UTC 2018



On Tuesday 23 January 2018 03:01 PM, Jagan Teki wrote:
[...]
>>>>> u-boot-spi/master throws few warnings when I build for my platform:
>>>>> ~/workspace/u-boot:0f520af57c60:~ make distclean;make
>>>>> k2g_evm_defconfig;make -j4 -s;
>>>>>
>>>>> In file included from drivers/spi/cadence_qspi_apb.c:31:0:
>>>>> include/wait_bit.h: In function 'wait_for_bit_be16':
>>>>> include/wait_bit.h:76:31: warning: implicit declaration of function
>>>>> 'readw_be' [-Wimplicit-function-declaration]
>>>>>   BUILD_WAIT_FOR_BIT(be16, u16, readw_be)
>>>>>                                 ^
>>>>> include/wait_bit.h:48:9: note: in definition of macro
>>>>> 'BUILD_WAIT_FOR_BIT'
>>>>>     val = read(reg);     \
>>>>>           ^~~~
>>>>> include/wait_bit.h: In function 'wait_for_bit_be32':
>>>>> include/wait_bit.h:78:31: warning: implicit declaration of function
>>>>> 'readl_be' [-Wimplicit-function-declaration]
>>>>>   BUILD_WAIT_FOR_BIT(be32, u32, readl_be)
>>>>>                                 ^
>>>>> include/wait_bit.h:48:9: note: in definition of macro
>>>>> 'BUILD_WAIT_FOR_BIT'
>>>>>     val = read(reg);     \
>>>>>           ^~~~
>>>>
>>>> Did you change wait_for_bit function with _le32? [1]
>>>>
>>>> [1]
>>>> http://git.denx.de/?p=u-boot-spi.git;a=commitdiff;h=9a5ff2669ef185d3a4bf73415c531e8d013993d8
>>>>
>>> Yes, I am building plain u-boot-spi/master(HEAD: 0f520af57c60f3baba8
>>> ("spi: kirkwood_spi: implement workaround for FE-9144572")). So, above
>>> commit is part of the tree.
>>>
>>> Problem is above commit adds
>>> BUILD_WAIT_FOR_BIT(be32, u32, read*_be) variants.
>>> But, readl_be and readw_be seems to be undefined for ARM?
>>>
>>>
>>
>> Vignesh, I think there's an ongoing discussion about this on the u-boot list
>> to fix this?
> 
> didn't get what issue Vignesh, pointing at but with new wait_for_bit
> need a fix[2] to resolve warnings.
> 
> [2] https://gist.github.com/Noltari/3e6ed4648b87484c73ca22e2f533f9b0
> 
Yes, above patch should help to get rid of warnings. I will rebase, test
and resend.


-- 
Regards
Vignesh


More information about the U-Boot mailing list