Skip to content
Snippets Groups Projects
  1. Jan 31, 2020
    • Masahiro Yamada's avatar
      ARM: uniphier: remove adhoc reset deassertion for the NAND controller · 5bacb440
      Masahiro Yamada authored
      
      Now that the reset controlling of the Denali NAND driver (denali_dt.c)
      works for this platform, remove the adhoc reset deassert code.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      5bacb440
    • Masahiro Yamada's avatar
      mtd: rawnand: denali: set SPARE_AREA_SKIP_BYTES based on DT compatible · 80924cc1
      Masahiro Yamada authored
      
      Currently, the denali NAND driver in U-Boot configures the
      SPARE_AREA_SKIP_BYTES based on the CONFIG option.
      
      Recently, Linux kernel merged a patch that associates the proper
      value for this register with the DT compatible string.
      
      Do likewise in U-Boot too.
      
      The denali_spl.c still uses CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      80924cc1
    • Masahiro Yamada's avatar
      mtd: rawnand: denali_dt: insert udelay() after reset deassert · 21d4a3ca
      Masahiro Yamada authored
      
      When the reset signal is de-asserted, the HW-controlled bootstrap
      starts running unless it is disabled in the SoC integration.
      It issues some commands to detect a NAND chip, and sets up registers
      automatically. Until this process finishes, software should avoid
      any register access.
      
      Without this delay function, some of UniPhier boards hangs up while
      executing nand_scan_ident(). (denali_read_byte() is blocked)
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      21d4a3ca
    • Marek Vasut's avatar
      mtd: rawnand: denali: Do not reset the block before booting the kernel · 9925df05
      Marek Vasut authored
      
      The Denali NAND driver in mainline Linux currently cannot deassert the
      reset. The upcoming Linux 5.6 will support the reset controlling, and
      also set up SPARE_AREA_SKIP_BYTES correctly. So, the Denali driver in
      the future kernel will work without relying on any bootloader or firmware.
      However, we still need to take care of stable kernel versions for a while.
      U-boot should not assert the reset of this controller.
      
      Fixes: ed784ac3 ("mtd: rawnand: denali: add reset handling")
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      [yamada.masahiro: reword the commit description]
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      9925df05
    • Masahiro Yamada's avatar
      mtd: rawnand: denali_dt: make the core clock optional · 11bcc584
      Masahiro Yamada authored
      
      The "nand_x" and "ecc" clocks are currently optional. Make the core
      clock optional in the same way. This will allow platforms with no clock
      driver support to use this driver.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Tested-by: Marek Vasut <marex@denx.de> # On SoCFPGA Arria V
      11bcc584
    • Marek Vasut's avatar
      mtd: rawnand: denali-spl: Add missing hardware init on SoCFPGA · 33672c97
      Marek Vasut authored
      
      On Altera SoCFPGA, upon either cold-boot or power-on reset, the
      Denali NAND IP is initialized by the BootROM ; upon warm-reset,
      the Denali NAND IP is NOT initialized by BootROM. In fact, upon
      warm-reset, the SoCFPGA BootROM checks whether the SPL image in
      on-chip RAM is valid and if so, completely skips re-loading the
      SPL from the boot media.
      
      This does sometimes lead to problems where the software left
      the boot media in inconsistent state before warm-reset, and
      because the BootROM does not reset the boot media, the boot
      media is left in this inconsistent state, often until another
      component attempts to access the boot media and fails with an
      difficult to debug failure. To mitigate this problem, the SPL
      on Altera SoCFPGA always resets all the IPs on the SoC early
      on boot.
      
      This results in a couple of register values, pre-programmed by
      the BootROM, to be lost during this reset. To restore correct
      operation of the IP on SoCFPGA, these values must be programmed
      back into the controller by the driver. Note that on other SoCs
      which do not use the HW-controlled bootstrap, more registers
      may have to be programmed.
      
      This also aligns the SPL behavior with the full Denali NAND
      driver, which sets these values in denali_hw_init().
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      33672c97
  2. Jan 28, 2020
  3. Jan 27, 2020
  4. Jan 26, 2020
Loading