Skip to content
Snippets Groups Projects
Select Git revision
4 results

fsl_qspi.c

Blame
  • Forked from Reform / reform-boundary-uboot
    Loading
    • Peng Fan's avatar
      a2358783
      spi:fsl-quadspi support bank register read write · a2358783
      Peng Fan authored
      
      To support bigger than 16MB size qspi flashes, spi framework uses bank
      switch to access higher bank or lower bank.
      
      In this patch, QSPI_CMD_BRRD, QSPI_CMD_BRWR, QSPI_CMD_WREAR, QSPI_CMD_RDEAR
      is initialized in LUT register with related pad and length configuration.
      qspi_op_pp is originally for page programming, this patch reuses this function
      for bank register switch and renamed it with qspi_op_write.
      
      Since bank or EAR register is only 1 byte length, however original qspi_op_pp
      or now renamed qspi_op_write only support 4 bytes lenght as the access unit,
      this will trigger data abort exception when access EAR or bank register.
      This is because upper framework passes a 1 bytes pointer to qspi_op_write,
      however qspi_op_write treat it as an int pointer. This patch fixes this for
      accessing EAR or bank register.
      
      Signed-off-by: default avatarPeng Fan <Peng.Fan@freescale.com>
      Reviewed-by: default avatarJagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
      a2358783
      History
      spi:fsl-quadspi support bank register read write
      Peng Fan authored
      
      To support bigger than 16MB size qspi flashes, spi framework uses bank
      switch to access higher bank or lower bank.
      
      In this patch, QSPI_CMD_BRRD, QSPI_CMD_BRWR, QSPI_CMD_WREAR, QSPI_CMD_RDEAR
      is initialized in LUT register with related pad and length configuration.
      qspi_op_pp is originally for page programming, this patch reuses this function
      for bank register switch and renamed it with qspi_op_write.
      
      Since bank or EAR register is only 1 byte length, however original qspi_op_pp
      or now renamed qspi_op_write only support 4 bytes lenght as the access unit,
      this will trigger data abort exception when access EAR or bank register.
      This is because upper framework passes a 1 bytes pointer to qspi_op_write,
      however qspi_op_write treat it as an int pointer. This patch fixes this for
      accessing EAR or bank register.
      
      Signed-off-by: default avatarPeng Fan <Peng.Fan@freescale.com>
      Reviewed-by: default avatarJagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>