13 Feb, 2020

1 commit


06 Feb, 2020

3 commits

  • Most files don't need this header and it pulls in quite of lots of stuff,
    malloc() in particular. Drop it.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present dm/device.h includes the linux-compatible features. This
    requires including linux/compat.h which in turn includes a lot of headers.
    One of these is malloc.h which we thus end up including in every file in
    U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
    which needs to use the system malloc() in some files.

    Move the compatibility features into a separate header file.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present devres.h is included in all files that include dm.h but few
    make use of it. Also this pulls in linux/compat which adds several more
    headers. Drop the automatic inclusion and require files to include devres
    themselves. This provides a good indication of which files use devres.

    Signed-off-by: Simon Glass
    Reviewed-by: Anatolij Gustschin

    Simon Glass
     

30 Jan, 2020

3 commits

  • No need to do twice data training for rk3328 ddr sdram, we re-use the
    setting for both channel. And adjust the sdram_init properly for correct
    init flow.

    Signed-off-by: Kever Yang
    Signed-off-by: YouMin Chen

    Kever Yang
     
  • Few of the rockchip family SoC atleast rk3288,
    rk3399 are sharing some cru register bits so
    adding common code between these SoC families
    would require to include both cru include files
    that indeed resulting function declarations error.

    So, create a common cru include as cru.h then
    include the rk3399 arch cru include file and move
    the common cru register bit definitions into it.

    The rest of rockchip cru files will add it in future.

    Reviewed-by: Kever Yang
    Signed-off-by: Jagan Teki

    Jagan Teki
     
  • In the RK3399 DRAM driver, the function set_ds_odt() supports operating
    in two different modes, selected by the ctl_phy_reg argument: when true,
    the function reads and writes directly from the DRAM registers, accessed
    through "chan->pctl->denali_*"; when false, the function reads and
    writes from an array, accessed through "params->pctl_regs.denali_*",
    which is written to DRAM registers at a later time.

    However, phy_config_io(), which is called by set_ds_odt() to do a subset
    of its register operations, operates directly on DRAM registers at all
    times. This means that it reads incorrect values (and writes new values
    prematurely) when ctl_phy_reg in set_ds_odt() is false. Fix this by
    passing in the address of the registers to work with.

    This prevents an "Invalid DRV value" error in the SPL debug log and
    (presumably) results in a more correct end state. See the following logs
    from a RK3399 NanoPi M4 board (4GB LPDDR3):

    Before:

    sdram_init() Starting SDRAM initialization...
    phy_io_config() Invalid DRV value.
    phy_io_config() Invalid DRV value.
    sdram_init() sdram_init: data trained for rank 2, ch 0
    phy_io_config() Invalid DRV value.
    phy_io_config() Invalid DRV value.
    sdram_init() sdram_init: data trained for rank 2, ch 1
    Channel 0: LPDDR3, 933MHz
    BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
    Channel 1: LPDDR3, 933MHz
    BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
    256B stride
    256B stride
    sdram_init() Finish SDRAM initialization...

    After:

    sdram_init() Starting SDRAM initialization...
    sdram_init() sdram_init: data trained for rank 2, ch 0
    sdram_init() sdram_init: data trained for rank 2, ch 1
    Channel 0: LPDDR3, 933MHz
    BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
    Channel 1: LPDDR3, 933MHz
    BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
    256B stride
    256B stride
    sdram_init() Finish SDRAM initialization...

    Signed-off-by: Thomas Hebb
    Reviewed-by: Kever Yang

    Thomas Hebb
     

18 Jan, 2020

2 commits


15 Jan, 2020

1 commit


17 Nov, 2019

19 commits


10 Nov, 2019

2 commits


26 Oct, 2019

3 commits


19 Sep, 2019

1 commit

  • Few of the rk3288 boards like tinker, vyasa are using
    TPL, SPL bootchain so the dram initialization must needed
    during TPL stage. So add proper ifconstruct to satisfy
    both TPL, SPL and SPL-only bootchain boards.

    This eventually fixing TPL to SPL handoff, otherwise missing
    dram initilaztion at TPL stage would leads to SPL hang.

    Signed-off-by: Jagan Teki
    Reviewed-by: Kever Yang

    Jagan Teki
     

27 Aug, 2019

5 commits