22 Sep, 2016

12 commits

  • Moved FSL_QSPI/SPI/SPI-FLASH configs from include/configs
    into respective used defconfigs.
    - CONFIG_FSL_QSPI
    - CONFIG_SPI_FLASH
    - CONFIG_SPI_FLASH_BAR
    - CONFIG_SPI_FLASH_STMICRO

    Cc: Stefano Babic
    Reviewed-by: Peng Fan
    Signed-off-by: Jagan Teki

    Jagan Teki
     
  • Since FSL_QSPI driver still supporting non-dm code
    better to move the Kconfig from DM undefined place.

    Cc: Stefano Babic
    Reviewed-by: Peng Fan
    Signed-off-by: Jagan Teki

    Jagan Teki
     
  • This patch moves flags macro's to respective member position on
    spi_flash_params{}, for better readabilty and finding the
    respective member macro's easily.

    Cc: Simon Glass
    Cc: Bin Meng
    Cc: Michal Simek
    Cc: Siva Durga Prasad Paladugu
    Cc: Vignesh R
    Cc: Mugunthan V N
    Signed-off-by: Jagan Teki

    Jagan Teki
     
  • Add CONFIG_SPI_FLASH_USE_4K_SECTORS in spi_flash code from header file.

    Cc: Simon Glass
    Cc: Bin Meng
    Cc: Michal Simek
    Cc: Siva Durga Prasad Paladugu
    Cc: Vignesh R
    Cc: Mugunthan V N
    Signed-off-by: Jagan Teki

    Jagan Teki
     
  • SECT_32K never used anywhere in the code.

    Cc: Simon Glass
    Cc: Bin Meng
    Cc: Michal Simek
    Cc: Siva Durga Prasad Paladugu
    Cc: Vignesh R
    Cc: Mugunthan V N
    Signed-off-by: Jagan Teki

    Jagan Teki
     
  • Removed SPI_RX_FAST since default read for spi slaves
    are always 1-wire fast read.

    Cc: Simon Glass
    Cc: Bin Meng
    Cc: Michal Simek
    Cc: Siva Durga Prasad Paladugu
    Cc: Vignesh R
    Cc: Mugunthan V N
    Signed-off-by: Jagan Teki

    Jagan Teki
     
  • Make rx mode flags as generic to spi, earlier mode_rx is
    maintained separately because of some flash specific code.

    Cc: Simon Glass
    Cc: Bin Meng
    Cc: Michal Simek
    Cc: Siva Durga Prasad Paladugu
    Cc: Vignesh R
    Cc: Mugunthan V N
    Signed-off-by: Jagan Teki

    Jagan Teki
     
  • e_rd_cmd is maintained separately for fastest read command code,
    since the read commands are computed normally this e_rd_cmd
    is not required in spi_flash_params table.

    Cc: Simon Glass
    Cc: Bin Meng
    Cc: Michal Simek
    Cc: Siva Durga Prasad Paladugu
    Cc: Vignesh R
    Cc: Mugunthan V N
    Signed-off-by: Jagan Teki

    Jagan Teki
     
  • Fastest read command code look for fastest read command
    taking inputs from spi->mode_rx and flags from param table
    and controller mode_rx is always been a priority.

    Since mode_rx is always set from controller side this optimized
    code doesn't require much and this code required exctra overhead like
    1) Maintain e_rx_cmd in param table
    2) Maintain mode_rx in spi_slave {}

    Hence removed this code, and look for read command from normal
    spi->mode from spi_slave{} and params->flags

    Cc: Simon Glass
    Cc: Bin Meng
    Cc: Michal Simek
    Cc: Siva Durga Prasad Paladugu
    Cc: Vignesh R
    Cc: Mugunthan V N
    Signed-off-by: Jagan Teki

    Jagan Teki
     
  • This udelay() was added as an HACK and is no longer required. All
    read/write/erase operations work fine even without this delay. Hence,
    remove the udelay() call.

    Tested read/write/erase operation on AM437x SK. Also tested QSPI Boot.

    Signed-off-by: Vignesh R
    Reviewed-by: Tom Rini
    Reviewed-by: Jagan Teki

    Vignesh R
     
  • TI QSPI has four 32 bit data registers which can be used to transfer 16
    bytes of data at once. The register group QSPI_SPI_DATA_REG_3,
    QSPI_SPI_DATA_REG_2, QSPI_SPI_DATA_REG_1 and QSPI_SPI_DATA_REG is
    treated as a single 128-bit word for shifting data in and out. The bit
    at QSPI_SPI_DATA_REG_3[31] position is the first bit to be shifted out
    in case of 128 bit transfer mode. Therefore the first byte to be written
    to flash should be at QSPI_SPI_DATA_REG_3[31-25] position.
    Instead of writing 1 byte at a time when interacting with SPI NOR flash,
    make use of all the four registers so that 16 bytes can be transferred
    in one go.

    With this patch, the flash write speed increases from ~250KBs/ to
    ~650KB/s on DRA74 EVM.

    Signed-off-by: Vignesh R
    Reviewed-by: Tom Rini
    Reviewed-by: Jagan Teki

    Vignesh R
     
  • During spi transfer, for example:
    sspi 1:1.0 8 ff

    the rx_len values will be:
    rx_len = 0
    rx_len = 4294967295

    This caused a busy looping during xfer, this patch fixes it
    by adding a check while reading the rx fifo

    Signed-off-by: Lad, Prabhakar
    Cc: Michal Simek
    Cc: Siva Durga Prasad Paladugu
    Reviewed-by: Jagan Teki

    Lad, Prabhakar
     

20 Sep, 2016

1 commit

  • This reverts commit 90c08d9e08c7a108ab904f3bbdeb558081757892.

    I took a closer look at this after the commit was applied, and found
    CONFIG_SYS_MALLOC_F_LEN=0x2000 was too much. 8KB memory for SPL is
    actually too big for some boards. Perhaps 0x800 is enough, but the
    situation varies board by board.

    Let's postpone our decision until we come up with a better idea.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Simon Glass

    Masahiro Yamada
     

19 Sep, 2016

4 commits


18 Sep, 2016

20 commits


17 Sep, 2016

3 commits

  • The Linux kernel musb driver expects VBUS to be off while initializing
    musb. Having it on results in a repeating string of warnings, followed
    by an unusable peripheral. The peripheral is only usable after
    physically removing the OTG adapter, letting musb reset its state.

    This partially reverts commit c9f8947e6604 ("sunxi: usb-phy: Never
    power off the usb ports")

    Signed-off-by: Chen-Yu Tsai
    Reviewed-by: Hans de Goede
    Signed-off-by: Hans de Goede

    Chen-Yu Tsai
     
  • When cold-booting the ldoio0/1 regulators are always off / the
    gpios are always at tristate. But when re-booting from android these
    are sometimes on. Disable them at axp_init time (iow as early as possible)
    to remove this difference between a cold boot and a reboot.

    Signed-off-by: Hans de Goede
    Acked-by: Ian Campbell

    Hans de Goede
     
  • New CONFIG options should be added via Kconfig. To help prevent new ad-hoc
    CONFIGs from being added, give a build error when these are detected.

    Signed-off-by: Simon Glass
    Acked-by: Stephen Warren
    Tested-by: Stephen Warren

    Simon Glass