mbox series

[U-Boot,v5,0/4] SiFive SPI MMC Support

Message ID 20190717035006.16634-1-anup.patel@wdc.com
Headers show
Series SiFive SPI MMC Support | expand

Message

Anup Patel July 17, 2019, 3:50 a.m. UTC
This patchset adds:
1. SiFive SPI driver
2. New MMC SPI driver based on DM_MMC and DM_SPI
3. Enables SiFive SPI driver and MMC SPI driver for SiFive Unleashed board

With this patch series, we can now load files from SD card on SiFive
Unleashed board. Many thanks to Bhargav for porting SiFive SPI driver
and updating MMC SPI driver for us.

These patches can be also found in riscv_unleashed_mmc_spi_v5 branch of:
https//github.com/avpatel/u-boot.git

Changes since v4:
- Renamed kconfig option from SIFIVE_SPI to SPI_SIFIVE for consistency
- Added dummy claim_bus() and release_bus() callbacks

Changes since v3:
- Removed PATCH2, PATCH3, and PATCH4 because these are already merged
- Added separate patch to use SPI_XFER_xyz flags in MMC_SPI driver
- Use readl/writel directly instead of sifive_spi_read/sifi_spi_write
- Use SPI_XFER_xyz flags to enable/disable chipselect
- Remove unused callback sifive_spi_cs_info()

Changes since v2:
- Minor fixes in PATCH1 which adds SiFive SPI driver
- Removed CONFIG_MMC_SPI_xyz from scripts/config_whitelist.txt
- Removed cmd/mmc_spi and all its refrences as separate patch
- Removed DM_SPI and DM_MMC from SiFive FU540 Kconfig

Changes since v1:
- Make response matching part belongs to mmc_spi_sendcmd()
- Match response to zero for SEND_STATUS (CMD13)
- Add separate patch for updating SiFive FU540 Documentation

Anup Patel (2):
  mmc: mmc_spi: Use SPI_XFER_BEGIN and SPI_XFER_END flags
  doc: sifive-fu540: Update README for SiFive SPI and MMC SPI drivers

Bhargav Shah (2):
  spi: Add SiFive SPI driver
  riscv: sifive: fu540: Enable SiFive SPI and MMC SPI drivers

 board/sifive/fu540/Kconfig |   6 +
 doc/README.sifive-fu540    |   4 +-
 drivers/mmc/mmc_spi.c      |   4 +-
 drivers/spi/Kconfig        |   8 +
 drivers/spi/Makefile       |   1 +
 drivers/spi/spi-sifive.c   | 375 +++++++++++++++++++++++++++++++++++++
 6 files changed, 394 insertions(+), 4 deletions(-)
 create mode 100644 drivers/spi/spi-sifive.c

--
2.17.1

Comments

Jagan Teki July 17, 2019, 4:08 a.m. UTC | #1
On Wed, Jul 17, 2019 at 9:20 AM Anup Patel <Anup.Patel@wdc.com> wrote:
>
> This patchset adds:
> 1. SiFive SPI driver
> 2. New MMC SPI driver based on DM_MMC and DM_SPI
> 3. Enables SiFive SPI driver and MMC SPI driver for SiFive Unleashed board
>
> With this patch series, we can now load files from SD card on SiFive
> Unleashed board. Many thanks to Bhargav for porting SiFive SPI driver
> and updating MMC SPI driver for us.
>
> These patches can be also found in riscv_unleashed_mmc_spi_v5 branch of:
> https//github.com/avpatel/u-boot.git
>
> Changes since v4:
> - Renamed kconfig option from SIFIVE_SPI to SPI_SIFIVE for consistency
> - Added dummy claim_bus() and release_bus() callbacks
>
> Changes since v3:
> - Removed PATCH2, PATCH3, and PATCH4 because these are already merged
> - Added separate patch to use SPI_XFER_xyz flags in MMC_SPI driver
> - Use readl/writel directly instead of sifive_spi_read/sifi_spi_write
> - Use SPI_XFER_xyz flags to enable/disable chipselect
> - Remove unused callback sifive_spi_cs_info()
>
> Changes since v2:
> - Minor fixes in PATCH1 which adds SiFive SPI driver
> - Removed CONFIG_MMC_SPI_xyz from scripts/config_whitelist.txt
> - Removed cmd/mmc_spi and all its refrences as separate patch
> - Removed DM_SPI and DM_MMC from SiFive FU540 Kconfig
>
> Changes since v1:
> - Make response matching part belongs to mmc_spi_sendcmd()
> - Match response to zero for SEND_STATUS (CMD13)
> - Add separate patch for updating SiFive FU540 Documentation
>
> Anup Patel (2):
>   mmc: mmc_spi: Use SPI_XFER_BEGIN and SPI_XFER_END flags
>   doc: sifive-fu540: Update README for SiFive SPI and MMC SPI drivers
>
> Bhargav Shah (2):
>   spi: Add SiFive SPI driver
>   riscv: sifive: fu540: Enable SiFive SPI and MMC SPI drivers
>
>  board/sifive/fu540/Kconfig |   6 +
>  doc/README.sifive-fu540    |   4 +-
>  drivers/mmc/mmc_spi.c      |   4 +-
>  drivers/spi/Kconfig        |   8 +
>  drivers/spi/Makefile       |   1 +
>  drivers/spi/spi-sifive.c   | 375 +++++++++++++++++++++++++++++++++++++
>  6 files changed, 394 insertions(+), 4 deletions(-)
>  create mode 100644 drivers/spi/spi-sifive.c

I would like to pick entire series on spi tree, but it has some boards
changes so I would like to ask the board maintainers to give a
permissions to do so, if not possible I can take only spi changes.

Jagan.
Anup Patel July 17, 2019, 4:30 a.m. UTC | #2
On Wed, Jul 17, 2019 at 9:38 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> On Wed, Jul 17, 2019 at 9:20 AM Anup Patel <Anup.Patel@wdc.com> wrote:
> >
> > This patchset adds:
> > 1. SiFive SPI driver
> > 2. New MMC SPI driver based on DM_MMC and DM_SPI
> > 3. Enables SiFive SPI driver and MMC SPI driver for SiFive Unleashed board
> >
> > With this patch series, we can now load files from SD card on SiFive
> > Unleashed board. Many thanks to Bhargav for porting SiFive SPI driver
> > and updating MMC SPI driver for us.
> >
> > These patches can be also found in riscv_unleashed_mmc_spi_v5 branch of:
> > https//github.com/avpatel/u-boot.git
> >
> > Changes since v4:
> > - Renamed kconfig option from SIFIVE_SPI to SPI_SIFIVE for consistency
> > - Added dummy claim_bus() and release_bus() callbacks
> >
> > Changes since v3:
> > - Removed PATCH2, PATCH3, and PATCH4 because these are already merged
> > - Added separate patch to use SPI_XFER_xyz flags in MMC_SPI driver
> > - Use readl/writel directly instead of sifive_spi_read/sifi_spi_write
> > - Use SPI_XFER_xyz flags to enable/disable chipselect
> > - Remove unused callback sifive_spi_cs_info()
> >
> > Changes since v2:
> > - Minor fixes in PATCH1 which adds SiFive SPI driver
> > - Removed CONFIG_MMC_SPI_xyz from scripts/config_whitelist.txt
> > - Removed cmd/mmc_spi and all its refrences as separate patch
> > - Removed DM_SPI and DM_MMC from SiFive FU540 Kconfig
> >
> > Changes since v1:
> > - Make response matching part belongs to mmc_spi_sendcmd()
> > - Match response to zero for SEND_STATUS (CMD13)
> > - Add separate patch for updating SiFive FU540 Documentation
> >
> > Anup Patel (2):
> >   mmc: mmc_spi: Use SPI_XFER_BEGIN and SPI_XFER_END flags
> >   doc: sifive-fu540: Update README for SiFive SPI and MMC SPI drivers
> >
> > Bhargav Shah (2):
> >   spi: Add SiFive SPI driver
> >   riscv: sifive: fu540: Enable SiFive SPI and MMC SPI drivers
> >
> >  board/sifive/fu540/Kconfig |   6 +
> >  doc/README.sifive-fu540    |   4 +-
> >  drivers/mmc/mmc_spi.c      |   4 +-
> >  drivers/spi/Kconfig        |   8 +
> >  drivers/spi/Makefile       |   1 +
> >  drivers/spi/spi-sifive.c   | 375 +++++++++++++++++++++++++++++++++++++
> >  6 files changed, 394 insertions(+), 4 deletions(-)
> >  create mode 100644 drivers/spi/spi-sifive.c
>
> I would like to pick entire series on spi tree, but it has some boards
> changes so I would like to ask the board maintainers to give a
> permissions to do so, if not possible I can take only spi changes.

Last 2 patches depend on below mentioned series so won't apply
for you. I guess you can pickup SPI driver and MMC_SPI change.

Refer, https://www.mail-archive.com/u-boot@lists.denx.de/msg331405.html

Regards,
Anup
Jagan Teki July 17, 2019, 5:16 a.m. UTC | #3
On Wed, Jul 17, 2019 at 10:00 AM Anup Patel <anup@brainfault.org> wrote:
>
> On Wed, Jul 17, 2019 at 9:38 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> >
> > On Wed, Jul 17, 2019 at 9:20 AM Anup Patel <Anup.Patel@wdc.com> wrote:
> > >
> > > This patchset adds:
> > > 1. SiFive SPI driver
> > > 2. New MMC SPI driver based on DM_MMC and DM_SPI
> > > 3. Enables SiFive SPI driver and MMC SPI driver for SiFive Unleashed board
> > >
> > > With this patch series, we can now load files from SD card on SiFive
> > > Unleashed board. Many thanks to Bhargav for porting SiFive SPI driver
> > > and updating MMC SPI driver for us.
> > >
> > > These patches can be also found in riscv_unleashed_mmc_spi_v5 branch of:
> > > https//github.com/avpatel/u-boot.git
> > >
> > > Changes since v4:
> > > - Renamed kconfig option from SIFIVE_SPI to SPI_SIFIVE for consistency
> > > - Added dummy claim_bus() and release_bus() callbacks
> > >
> > > Changes since v3:
> > > - Removed PATCH2, PATCH3, and PATCH4 because these are already merged
> > > - Added separate patch to use SPI_XFER_xyz flags in MMC_SPI driver
> > > - Use readl/writel directly instead of sifive_spi_read/sifi_spi_write
> > > - Use SPI_XFER_xyz flags to enable/disable chipselect
> > > - Remove unused callback sifive_spi_cs_info()
> > >
> > > Changes since v2:
> > > - Minor fixes in PATCH1 which adds SiFive SPI driver
> > > - Removed CONFIG_MMC_SPI_xyz from scripts/config_whitelist.txt
> > > - Removed cmd/mmc_spi and all its refrences as separate patch
> > > - Removed DM_SPI and DM_MMC from SiFive FU540 Kconfig
> > >
> > > Changes since v1:
> > > - Make response matching part belongs to mmc_spi_sendcmd()
> > > - Match response to zero for SEND_STATUS (CMD13)
> > > - Add separate patch for updating SiFive FU540 Documentation
> > >
> > > Anup Patel (2):
> > >   mmc: mmc_spi: Use SPI_XFER_BEGIN and SPI_XFER_END flags
> > >   doc: sifive-fu540: Update README for SiFive SPI and MMC SPI drivers
> > >
> > > Bhargav Shah (2):
> > >   spi: Add SiFive SPI driver
> > >   riscv: sifive: fu540: Enable SiFive SPI and MMC SPI drivers
> > >
> > >  board/sifive/fu540/Kconfig |   6 +
> > >  doc/README.sifive-fu540    |   4 +-
> > >  drivers/mmc/mmc_spi.c      |   4 +-
> > >  drivers/spi/Kconfig        |   8 +
> > >  drivers/spi/Makefile       |   1 +
> > >  drivers/spi/spi-sifive.c   | 375 +++++++++++++++++++++++++++++++++++++
> > >  6 files changed, 394 insertions(+), 4 deletions(-)
> > >  create mode 100644 drivers/spi/spi-sifive.c
> >
> > I would like to pick entire series on spi tree, but it has some boards
> > changes so I would like to ask the board maintainers to give a
> > permissions to do so, if not possible I can take only spi changes.
>
> Last 2 patches depend on below mentioned series so won't apply
> for you. I guess you can pickup SPI driver and MMC_SPI change.

Haa., only SPI driver rest has dependencies on respective trees so I
picked spi driver only.
Anup Patel July 17, 2019, 5:17 a.m. UTC | #4
On Wed, Jul 17, 2019 at 10:46 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> On Wed, Jul 17, 2019 at 10:00 AM Anup Patel <anup@brainfault.org> wrote:
> >
> > On Wed, Jul 17, 2019 at 9:38 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > >
> > > On Wed, Jul 17, 2019 at 9:20 AM Anup Patel <Anup.Patel@wdc.com> wrote:
> > > >
> > > > This patchset adds:
> > > > 1. SiFive SPI driver
> > > > 2. New MMC SPI driver based on DM_MMC and DM_SPI
> > > > 3. Enables SiFive SPI driver and MMC SPI driver for SiFive Unleashed board
> > > >
> > > > With this patch series, we can now load files from SD card on SiFive
> > > > Unleashed board. Many thanks to Bhargav for porting SiFive SPI driver
> > > > and updating MMC SPI driver for us.
> > > >
> > > > These patches can be also found in riscv_unleashed_mmc_spi_v5 branch of:
> > > > https//github.com/avpatel/u-boot.git
> > > >
> > > > Changes since v4:
> > > > - Renamed kconfig option from SIFIVE_SPI to SPI_SIFIVE for consistency
> > > > - Added dummy claim_bus() and release_bus() callbacks
> > > >
> > > > Changes since v3:
> > > > - Removed PATCH2, PATCH3, and PATCH4 because these are already merged
> > > > - Added separate patch to use SPI_XFER_xyz flags in MMC_SPI driver
> > > > - Use readl/writel directly instead of sifive_spi_read/sifi_spi_write
> > > > - Use SPI_XFER_xyz flags to enable/disable chipselect
> > > > - Remove unused callback sifive_spi_cs_info()
> > > >
> > > > Changes since v2:
> > > > - Minor fixes in PATCH1 which adds SiFive SPI driver
> > > > - Removed CONFIG_MMC_SPI_xyz from scripts/config_whitelist.txt
> > > > - Removed cmd/mmc_spi and all its refrences as separate patch
> > > > - Removed DM_SPI and DM_MMC from SiFive FU540 Kconfig
> > > >
> > > > Changes since v1:
> > > > - Make response matching part belongs to mmc_spi_sendcmd()
> > > > - Match response to zero for SEND_STATUS (CMD13)
> > > > - Add separate patch for updating SiFive FU540 Documentation
> > > >
> > > > Anup Patel (2):
> > > >   mmc: mmc_spi: Use SPI_XFER_BEGIN and SPI_XFER_END flags
> > > >   doc: sifive-fu540: Update README for SiFive SPI and MMC SPI drivers
> > > >
> > > > Bhargav Shah (2):
> > > >   spi: Add SiFive SPI driver
> > > >   riscv: sifive: fu540: Enable SiFive SPI and MMC SPI drivers
> > > >
> > > >  board/sifive/fu540/Kconfig |   6 +
> > > >  doc/README.sifive-fu540    |   4 +-
> > > >  drivers/mmc/mmc_spi.c      |   4 +-
> > > >  drivers/spi/Kconfig        |   8 +
> > > >  drivers/spi/Makefile       |   1 +
> > > >  drivers/spi/spi-sifive.c   | 375 +++++++++++++++++++++++++++++++++++++
> > > >  6 files changed, 394 insertions(+), 4 deletions(-)
> > > >  create mode 100644 drivers/spi/spi-sifive.c
> > >
> > > I would like to pick entire series on spi tree, but it has some boards
> > > changes so I would like to ask the board maintainers to give a
> > > permissions to do so, if not possible I can take only spi changes.
> >
> > Last 2 patches depend on below mentioned series so won't apply
> > for you. I guess you can pickup SPI driver and MMC_SPI change.
>
> Haa., only SPI driver rest has dependencies on respective trees so I
> picked spi driver only.

Thanks Jagan.

Regards,
Anup