31 Mar, 2020

2 commits

  • Add save_boot_params() to save reset status value from bootrom.

    Bootrom will clear the status register in reset manager and stores the
    reset status value in shared memory. Bootrom stores shared data at last
    2KB of onchip RAM.

    This function save reset status provided by bootrom to rst_mgr_status.
    More information about reset status register value can be found in reset
    manager register description.

    When running in debugger without bootrom, r0 to r3 are random values.
    So, skip save the value when r0 is not bootrom shared data address.

    Signed-off-by: Ley Foon Tan

    Ley Foon Tan
     
  • Add OCRAM size macro for Gen5 and Arria 10.

    Signed-off-by: Ley Foon Tan

    Ley Foon Tan
     

04 Mar, 2020

1 commit


11 Feb, 2020

1 commit


06 Feb, 2020

1 commit

  • 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
     

05 Feb, 2020

1 commit

  • Add DDR2 support to Gen5 DRAM driver. As the DDR2 macro names generated
    by Quartus are named differently than the DDR3 ones, use anon unions to
    store them in the same structures, without growing their size.

    Signed-off-by: Marek Vasut
    Cc: Ley Foon Tan
    Cc: Simon Goldschmidt

    Marek Vasut
     

03 Feb, 2020

1 commit

  • This particular chunk of code was not updated, likely due to the order
    in which the patches were posted and applied. Fix this missing part.

    Fixes: bb25aca13433 ("arm: socfpga: Convert reset manager from struct to defines")
    Signed-off-by: Marek Vasut
    Cc: Chin Liang See
    Cc: Dalon Westergreen
    Cc: Dinh Nguyen
    Cc: Ley Foon Tan
    Cc: Simon Goldschmidt
    Cc: Tien Fong Chee

    Marek Vasut
     

18 Jan, 2020

2 commits


07 Jan, 2020

17 commits


03 Dec, 2019

2 commits


25 Nov, 2019

4 commits

  • In case the SPL on Gen5 loads U-Boot from NAND, unreset the NAND IP
    explicitly in the platform code as the denali-spl driver is not aware
    of DM at all.

    Signed-off-by: Marek Vasut
    Cc: Chin Liang See
    Cc: Dalon Westergreen
    Cc: Dinh Nguyen
    Cc: Ley Foon Tan
    Cc: Simon Goldschmidt
    Cc: Tien Fong Chee
    Reviewed-by: Ley Foon Tan

    Marek Vasut
     
  • Add new FPGA ID for ArriaV ST/D3 or SX/B3 .

    Signed-off-by: Marek Vasut
    Cc: Chin Liang See
    Cc: Dalon Westergreen
    Cc: Dinh Nguyen
    Cc: Ley Foon Tan
    Cc: Simon Goldschmidt
    Cc: Tien Fong Chee
    Reviewed-by: Ley Foon Tan

    Marek Vasut
     
  • On Gen5, when the FPGA is loaded and there was some prior interaction
    between the HPS and the FPGA via bridges (e.g. Linux was running and
    using some of the IPs in the FPGA) followed by warm reset, it has been
    observed that there might be outstanding unfinished transactions. This
    leads to an obscure misbehavior of the bridge.

    When the bridge is enabled again in U-Boot and there are outstanding
    transactions, a read from within the bridge address range would return
    a result of the previous read instead. Example:
    => bridge enable ; md 0xff200000 1
    ff200000: 1234abcd
    => bridge enable ; md 0xff200010 1
    ff200010: 5678dcba bridge enable ; md 0xff200000 1
    ff200000: 90effe09
    Cc: Chin Liang See
    Cc: Dalon Westergreen
    Cc: Dinh Nguyen
    Cc: Ley Foon Tan
    Cc: Simon Goldschmidt
    Cc: Tien Fong Chee
    Reviewed-by: Ley Foon Tan

    Marek Vasut
     
  • On Gen5, the 'bridge disable' command write 0x0 to brgmodrst register,
    which releases all bridges from reset, instead of putting all bridges
    into reset. Fix this by inverting the mask and actually putting the
    bridges into reset.

    Signed-off-by: Marek Vasut
    Cc: Chin Liang See
    Cc: Dalon Westergreen
    Cc: Dinh Nguyen
    Cc: Ley Foon Tan
    Cc: Simon Goldschmidt
    Cc: Tien Fong Chee
    Reviewed-by: Ley Foon Tan
    Reviewed-by: Simon Goldschmidt

    Marek Vasut
     

21 Nov, 2019

1 commit


08 Nov, 2019

1 commit

  • The default implementation of ERR_PTR/PTR_ERR maps errno values at the
    and of the address range (e.g. -EINVAL/-22 gets 0xFFFFFFEA).

    For socfpga gen5 SPL, this doesn't really work, as the heap is nearly
    at the end of the 32 bit address range.

    This patch adjusts the ERR_PTR_OFFSET to map errno values into the range
    of the Boot ROM, which should not be used for valid pointers.

    Signed-off-by: Simon Goldschmidt

    Simon Goldschmidt
     

10 Oct, 2019

1 commit


08 Oct, 2019

2 commits

  • This is currently a decimal value which is not as convenient or
    meaningful. Also U-Boot tends to use hex everywhere.

    Convert this option to hex and add a comment for the size_check macro.

    Signed-off-by: Simon Glass
    Reviewed-by: Simon Goldschmidt
    Acked-by: Bin Meng
    [bmeng: correct the typo in the commit title]
    Signed-off-by: Bin Meng

    Simon Glass
     
  • At present there is only one control for this and it is used for both SPL
    and TPL. But SPL might have a lot more space than TPL so the extra cost of
    a full printf() might be acceptable.

    Split the option into two, providing separate SPL and TPL controls. The
    TPL setting defaults to the same as SPL.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     

15 Aug, 2019

1 commit

  • The socfpga gen5 SPL manually zeroed bss in board_init_f(). Now that the
    DDR driver does not use bss any more, bss is not used before board_init_r()
    and we can remove this hack.

    bss is normally zeroed by crt0.S, but after board_init_f(), before
    board_init_r(). socfpga just had this double-zeroing because it invalidly
    used bss in board_init_f() already (during DDR initialization).

    Signed-off-by: Simon Goldschmidt

    Simon Goldschmidt
     

12 Aug, 2019

1 commit


21 Jul, 2019

1 commit