linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RISC-V: defconfig: enable MMC & SPI for RISC-V
@ 2019-06-25 22:56 Atish Patra
  2019-06-25 23:58 ` Troy Benjegerdes
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Atish Patra @ 2019-06-25 22:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Atish Patra, Albert Ou, Alistair Francis, Anup Patel,
	linux-riscv, Olof Johansson, Palmer Dabbelt, Thomas Gleixner

Currently, riscv upstream defconfig doesn't let you boot
through userspace if rootfs is on the SD card.

Let's enable MMC & SPI drivers as well so that one can boot
to the user space using default config in upstream kernel.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
---
 arch/riscv/configs/defconfig | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
index 4f02967e55de..04944fb4fa7a 100644
--- a/arch/riscv/configs/defconfig
+++ b/arch/riscv/configs/defconfig
@@ -69,6 +69,7 @@ CONFIG_VIRTIO_MMIO=y
 CONFIG_CLK_SIFIVE=y
 CONFIG_CLK_SIFIVE_FU540_PRCI=y
 CONFIG_SIFIVE_PLIC=y
+CONFIG_SPI_SIFIVE=y
 CONFIG_EXT4_FS=y
 CONFIG_EXT4_FS_POSIX_ACL=y
 CONFIG_AUTOFS4_FS=y
@@ -84,4 +85,8 @@ CONFIG_ROOT_NFS=y
 CONFIG_CRYPTO_USER_API_HASH=y
 CONFIG_CRYPTO_DEV_VIRTIO=y
 CONFIG_PRINTK_TIME=y
+CONFIG_SPI=y
+CONFIG_MMC_SPI=y
+CONFIG_MMC=y
+CONFIG_DEVTMPFS_MOUNT=y
 # CONFIG_RCU_TRACE is not set
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] RISC-V: defconfig: enable MMC & SPI for RISC-V
  2019-06-25 22:56 [PATCH] RISC-V: defconfig: enable MMC & SPI for RISC-V Atish Patra
@ 2019-06-25 23:58 ` Troy Benjegerdes
  2019-06-27  9:15   ` Andreas Schwab
  2019-06-26  7:58 ` Palmer Dabbelt
  2019-06-26 16:00 ` Paul Walmsley
  2 siblings, 1 reply; 6+ messages in thread
From: Troy Benjegerdes @ 2019-06-25 23:58 UTC (permalink / raw)
  To: Atish Patra
  Cc: Linux Kernel Mailing List, Albert Ou, Anup Patel, Palmer Dabbelt,
	Alistair Francis, Olof Johansson, linux-riscv, Thomas Gleixner



> On Jun 25, 2019, at 5:56 PM, Atish Patra <atish.patra@wdc.com> wrote:
> 
> Currently, riscv upstream defconfig doesn't let you boot
> through userspace if rootfs is on the SD card.
> 
> Let's enable MMC & SPI drivers as well so that one can boot
> to the user space using default config in upstream kernel.
> 
> Signed-off-by: Atish Patra <atish.patra@wdc.com>
> ---
> arch/riscv/configs/defconfig | 5 +++++
> 1 file changed, 5 insertions(+)
> 
> diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
> index 4f02967e55de..04944fb4fa7a 100644
> --- a/arch/riscv/configs/defconfig
> +++ b/arch/riscv/configs/defconfig
> @@ -69,6 +69,7 @@ CONFIG_VIRTIO_MMIO=y
> CONFIG_CLK_SIFIVE=y
> CONFIG_CLK_SIFIVE_FU540_PRCI=y
> CONFIG_SIFIVE_PLIC=y
> +CONFIG_SPI_SIFIVE=y
> CONFIG_EXT4_FS=y
> CONFIG_EXT4_FS_POSIX_ACL=y
> CONFIG_AUTOFS4_FS=y
> @@ -84,4 +85,8 @@ CONFIG_ROOT_NFS=y
> CONFIG_CRYPTO_USER_API_HASH=y
> CONFIG_CRYPTO_DEV_VIRTIO=y
> CONFIG_PRINTK_TIME=y
> +CONFIG_SPI=y
> +CONFIG_MMC_SPI=y
> +CONFIG_MMC=y
> +CONFIG_DEVTMPFS_MOUNT=y
> # CONFIG_RCU_TRACE is not set
> -- 
> 2.21.0

While we are doing this, can we add and test the /dev/mtd device?

I tried adding the following but I am missing something

CONFIG_MTD=y
CONFIG_MTD_OF_PARTS=y
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_BLOCK_RO=y
CONFIG_MTD_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
CONFIG_MTD_M25P80=y
CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y

and I see this in the log

[    1.106626] m25p80 spi0.0: unrecognized JEDEC id bytes: 9d 70 19 9d 70 19



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] RISC-V: defconfig: enable MMC & SPI for RISC-V
  2019-06-25 22:56 [PATCH] RISC-V: defconfig: enable MMC & SPI for RISC-V Atish Patra
  2019-06-25 23:58 ` Troy Benjegerdes
@ 2019-06-26  7:58 ` Palmer Dabbelt
  2019-06-26 16:00 ` Paul Walmsley
  2 siblings, 0 replies; 6+ messages in thread
From: Palmer Dabbelt @ 2019-06-26  7:58 UTC (permalink / raw)
  To: Atish Patra
  Cc: linux-kernel, Atish Patra, aou, Alistair Francis, anup,
	linux-riscv, Olof Johansson, tglx

On Tue, 25 Jun 2019 15:56:36 PDT (-0700), Atish Patra wrote:
> Currently, riscv upstream defconfig doesn't let you boot
> through userspace if rootfs is on the SD card.
>
> Let's enable MMC & SPI drivers as well so that one can boot
> to the user space using default config in upstream kernel.
>
> Signed-off-by: Atish Patra <atish.patra@wdc.com>
> ---
>  arch/riscv/configs/defconfig | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
> index 4f02967e55de..04944fb4fa7a 100644
> --- a/arch/riscv/configs/defconfig
> +++ b/arch/riscv/configs/defconfig
> @@ -69,6 +69,7 @@ CONFIG_VIRTIO_MMIO=y
>  CONFIG_CLK_SIFIVE=y
>  CONFIG_CLK_SIFIVE_FU540_PRCI=y
>  CONFIG_SIFIVE_PLIC=y
> +CONFIG_SPI_SIFIVE=y
>  CONFIG_EXT4_FS=y
>  CONFIG_EXT4_FS_POSIX_ACL=y
>  CONFIG_AUTOFS4_FS=y
> @@ -84,4 +85,8 @@ CONFIG_ROOT_NFS=y
>  CONFIG_CRYPTO_USER_API_HASH=y
>  CONFIG_CRYPTO_DEV_VIRTIO=y
>  CONFIG_PRINTK_TIME=y
> +CONFIG_SPI=y
> +CONFIG_MMC_SPI=y
> +CONFIG_MMC=y
> +CONFIG_DEVTMPFS_MOUNT=y
>  # CONFIG_RCU_TRACE is not set

Reviewed-by: Palmer Dabbelt <palmer@sifive.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] RISC-V: defconfig: enable MMC & SPI for RISC-V
  2019-06-25 22:56 [PATCH] RISC-V: defconfig: enable MMC & SPI for RISC-V Atish Patra
  2019-06-25 23:58 ` Troy Benjegerdes
  2019-06-26  7:58 ` Palmer Dabbelt
@ 2019-06-26 16:00 ` Paul Walmsley
  2019-06-26 17:19   ` Atish Patra
  2 siblings, 1 reply; 6+ messages in thread
From: Paul Walmsley @ 2019-06-26 16:00 UTC (permalink / raw)
  To: Atish Patra
  Cc: linux-kernel, Albert Ou, Anup Patel, Palmer Dabbelt,
	Alistair Francis, Olof Johansson, linux-riscv, Thomas Gleixner

On Tue, 25 Jun 2019, Atish Patra wrote:

> Currently, riscv upstream defconfig doesn't let you boot
> through userspace if rootfs is on the SD card.
> 
> Let's enable MMC & SPI drivers as well so that one can boot
> to the user space using default config in upstream kernel.
> 
> Signed-off-by: Atish Patra <atish.patra@wdc.com>

Thanks.  The patch also enables CONFIG_DEVTMPFS_MOUNT, but doesn't mention 
it, so the following is what I've queued for v5.2-rc.  Let me know if you 
object to it.


- Paul


From: Atish Patra <atish.patra@wdc.com>
Date: Tue, 25 Jun 2019 15:56:36 -0700
Subject: [PATCH] RISC-V: defconfig: enable MMC & SPI for RISC-V

Currently, riscv upstream defconfig doesn't let you boot
through userspace if rootfs is on the SD card.

Let's enable MMC & SPI drivers as well so that one can boot
to the user space using default config in upstream kernel.

While here, enable automatic mounting of devtmpfs to simplify
kernel testing with minimal root filesystems. (pjw)

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
[paul.walmsley@sifive.com: mention the DEVTMPFS_MOUNT change in the
 patch description]
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
---
 arch/riscv/configs/defconfig | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
index 4f02967e55de..04944fb4fa7a 100644
--- a/arch/riscv/configs/defconfig
+++ b/arch/riscv/configs/defconfig
@@ -69,6 +69,7 @@ CONFIG_VIRTIO_MMIO=y
 CONFIG_CLK_SIFIVE=y
 CONFIG_CLK_SIFIVE_FU540_PRCI=y
 CONFIG_SIFIVE_PLIC=y
+CONFIG_SPI_SIFIVE=y
 CONFIG_EXT4_FS=y
 CONFIG_EXT4_FS_POSIX_ACL=y
 CONFIG_AUTOFS4_FS=y
@@ -84,4 +85,8 @@ CONFIG_ROOT_NFS=y
 CONFIG_CRYPTO_USER_API_HASH=y
 CONFIG_CRYPTO_DEV_VIRTIO=y
 CONFIG_PRINTK_TIME=y
+CONFIG_SPI=y
+CONFIG_MMC_SPI=y
+CONFIG_MMC=y
+CONFIG_DEVTMPFS_MOUNT=y
 # CONFIG_RCU_TRACE is not set
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] RISC-V: defconfig: enable MMC & SPI for RISC-V
  2019-06-26 16:00 ` Paul Walmsley
@ 2019-06-26 17:19   ` Atish Patra
  0 siblings, 0 replies; 6+ messages in thread
From: Atish Patra @ 2019-06-26 17:19 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: linux-kernel, Albert Ou, Anup Patel, Palmer Dabbelt,
	Alistair Francis, Olof Johansson, linux-riscv, Thomas Gleixner

On 6/26/19 9:00 AM, Paul Walmsley wrote:
> On Tue, 25 Jun 2019, Atish Patra wrote:
> 
>> Currently, riscv upstream defconfig doesn't let you boot
>> through userspace if rootfs is on the SD card.
>>
>> Let's enable MMC & SPI drivers as well so that one can boot
>> to the user space using default config in upstream kernel.
>>
>> Signed-off-by: Atish Patra <atish.patra@wdc.com>
> 
> Thanks.  The patch also enables CONFIG_DEVTMPFS_MOUNT, but doesn't mention
> it, so the following is what I've queued for v5.2-rc.  Let me know if you
> object to it.
> 

Apologies for forgetting about CONFIG_DEVTMPFS_MOUNT in the commit text. 
Thanks for the update.

> 
> - Paul
> 
> 
> From: Atish Patra <atish.patra@wdc.com>
> Date: Tue, 25 Jun 2019 15:56:36 -0700
> Subject: [PATCH] RISC-V: defconfig: enable MMC & SPI for RISC-V
> 
> Currently, riscv upstream defconfig doesn't let you boot
> through userspace if rootfs is on the SD card.
> 
> Let's enable MMC & SPI drivers as well so that one can boot
> to the user space using default config in upstream kernel.
> 
> While here, enable automatic mounting of devtmpfs to simplify
> kernel testing with minimal root filesystems. (pjw)
> 
> Signed-off-by: Atish Patra <atish.patra@wdc.com>
> Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
> [paul.walmsley@sifive.com: mention the DEVTMPFS_MOUNT change in the
>   patch description]
> Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
> ---
>   arch/riscv/configs/defconfig | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
> index 4f02967e55de..04944fb4fa7a 100644
> --- a/arch/riscv/configs/defconfig
> +++ b/arch/riscv/configs/defconfig
> @@ -69,6 +69,7 @@ CONFIG_VIRTIO_MMIO=y
>   CONFIG_CLK_SIFIVE=y
>   CONFIG_CLK_SIFIVE_FU540_PRCI=y
>   CONFIG_SIFIVE_PLIC=y
> +CONFIG_SPI_SIFIVE=y
>   CONFIG_EXT4_FS=y
>   CONFIG_EXT4_FS_POSIX_ACL=y
>   CONFIG_AUTOFS4_FS=y
> @@ -84,4 +85,8 @@ CONFIG_ROOT_NFS=y
>   CONFIG_CRYPTO_USER_API_HASH=y
>   CONFIG_CRYPTO_DEV_VIRTIO=y
>   CONFIG_PRINTK_TIME=y
> +CONFIG_SPI=y
> +CONFIG_MMC_SPI=y
> +CONFIG_MMC=y
> +CONFIG_DEVTMPFS_MOUNT=y
>   # CONFIG_RCU_TRACE is not set
> 


-- 
Regards,
Atish

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] RISC-V: defconfig: enable MMC & SPI for RISC-V
  2019-06-25 23:58 ` Troy Benjegerdes
@ 2019-06-27  9:15   ` Andreas Schwab
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Schwab @ 2019-06-27  9:15 UTC (permalink / raw)
  To: Troy Benjegerdes
  Cc: Atish Patra, Linux Kernel Mailing List, Albert Ou, Anup Patel,
	Palmer Dabbelt, Alistair Francis, Olof Johansson, linux-riscv,
	Thomas Gleixner

On Jun 25 2019, Troy Benjegerdes <troy.benjegerdes@sifive.com> wrote:

> and I see this in the log
>
> [    1.106626] m25p80 spi0.0: unrecognized JEDEC id bytes: 9d 70 19 9d 70 19

You need the patchset "mtd: spi-nor: add support for is25wp256 spi-nor
flash".

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-06-27  9:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25 22:56 [PATCH] RISC-V: defconfig: enable MMC & SPI for RISC-V Atish Patra
2019-06-25 23:58 ` Troy Benjegerdes
2019-06-27  9:15   ` Andreas Schwab
2019-06-26  7:58 ` Palmer Dabbelt
2019-06-26 16:00 ` Paul Walmsley
2019-06-26 17:19   ` Atish Patra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).