[U-Boot] [PATCH] rockchip: rockchip, sdram-channel 0xff fix remaining dts

Simon Glass sjg at chromium.org
Mon Aug 1 04:21:15 CEST 2016


Hi Ziyuan,

On 31 July 2016 at 20:13, Ziyuan Xu <xzy.xu at rock-chips.com> wrote:
> Hi Simon,
>
>
> On 2016年08月01日 09:51, Simon Glass wrote:
>>
>> Hi Sandy,
>>
>> On 28 July 2016 at 07:49, Sandy Patterson <apatterson at sightlogix.com>
>> wrote:
>>>
>>> Add an extra byte so that this data is not byteswapped.
>>>
>>> Signed-off-by: Sandy Patterson <apatterson at sightlogix.com>
>>> ---
>>>
>>>   arch/arm/dts/rk3288-rock2-square.dts | 2 +-
>>>   arch/arm/dts/rk3288-veyron.dtsi      | 2 +-
>>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> Acked-by: Simon Glass <sjg at chromium.org>
>>
>> Do these board use OF_PLATDATA? I thought not.
>
> Yes, only firefly-rk3288 board use OF_PLATDATA. But driver get
> rk3288_sdram_channel via fdtdec_get_byte_array with the size which is
> sizeof(struct rk3288_sdram_channel).
> In commit 9ca7e67 rockchip: Update the sdram-channel property to support
> of-platdata, you add dummy element in struct rk3288_sdram_channel and size
> was changed to 9.
> Without this fix, driver get rk3288_sdram_channel failed.
>
> Maybe add CONFIG_IS_ENABLED(OF_PLATDATA) for distinction is better, how
> about?
>
> struct rk3288_sdram_channel {
>     u8 rank;
>     u8 col;
>     u8 bk;
>     u8 bw;
>     u8 dbw;
>     u8 row_3_4;
>     u8 cs0_row;
>     u8 cs1_row;
> #if CONFIG_IS_ENABLED(OF_PLATDATA)
>     /*
>      * For of-platdata, which would otherwise convert this into two
>      * byte-swapped integers. With a size of 9 bytes, this struct will
>      * appear in of-platdata as a byte array.
>      */
>     u8 dummy;
> #endif
> };
>
>

Yes, but I'm happy with either solution. Your one may be a little
easier to understand, but if someone switches a board over to
OF_PLATDATA then it will be confusing... Please let me know which you
prefer.

Regards,
Simon


More information about the U-Boot mailing list