1. 27 12月, 2019 2 次提交
    • J
      spi: rk: Limit transfers to (64K - 1) bytes · dbbdc81c
      Jagan Teki 提交于
      The Rockchip SPI controller's length register only supports 16-bits,
      yielding a maximum length of 64KiB (the CTRLR1 register holds "length -
      1"). Trying to transfer more than that (e.g., with a large SPI flash
      read) will cause the driver to hang.
      
      Now, it seems that while theoretically we should be able to program
      CTRLR1 with 0xffff, and get a 64KiB transfer, but that also seems to
      cause the core to choke, so stick with a maximum of 64K - 1 bytes --
      i.e., 0xffff.
      
      Note, that the size is further divided into 'minus 1' while writing
      into CTRLR1.
      
      This change fixed two different read issues,
      
      1. sf read failure when with > 0x10000
      
      2. Boot from SPI flash failed during spi_flash_read call in
         common/spl/spl_spi.c
      
      Observed and Tested in
      - Rockpro64 with Gigadevice flash
      - ROC-RK3399-PC with Winbond flash
      Signed-off-by: NJagan Teki <jagan@amarulasolutions.com>
      Reviewed-by: NKever Yang <kever.yang@rock-chips.com>
      dbbdc81c
    • V
      mtd: spi-nor-core: Fix static checker warnings · cb56caac
      Vignesh Raghavendra 提交于
      Static checker warns 'ret' variable may be used uninitialized in
      spi_nor_erase() and spi_nor_write() in case of zero length requests.
      Fix these warnings by checking for zero length requests and returning
      early.
      Reported-by: NDan Murphy <dmurphy@ti.com>
      Signed-off-by: NVignesh Raghavendra <vigneshr@ti.com>
      cb56caac
  2. 18 12月, 2019 5 次提交
  3. 16 12月, 2019 1 次提交
  4. 14 12月, 2019 8 次提交
  5. 11 12月, 2019 8 次提交
  6. 10 12月, 2019 16 次提交