]> git.sur5r.net Git - u-boot/commitdiff
rockchip: use dummy byte only enable OF_PLATDATA
authorXu Ziyuan <xzy.xu@rock-chips.com>
Fri, 12 Aug 2016 07:43:48 +0000 (15:43 +0800)
committerSimon Glass <sjg@chromium.org>
Thu, 22 Sep 2016 13:32:22 +0000 (07:32 -0600)
Add a condition to determine the rk3288_sdram_channel size.

This patch fixes read sdram_channel property failed from DT on rk3288
boards, which not enable OF_PLATDATA.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
arch/arm/include/asm/arch-rockchip/sdram.h

index e08e28f4f0c5c9e9e81c3f77db85972162512e46..82c3d07cbbd800f88b2d56b0d1e2b937eeaad64f 100644 (file)
@@ -24,12 +24,16 @@ struct rk3288_sdram_channel {
        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.
+        *
+        * If OF_PLATDATA enabled, need to add a dummy byte in dts.(i.e 0xff)
         */
        u8 dummy;
+#endif
 };
 
 struct rk3288_sdram_pctl_timing {