RE: [PATCH 1/2] riscv: defconfig: enable spi nor on Hifive Unleashed A00 board.

2020-05-10 Thread Sagar Kadam
Hi,

> -Original Message-
> From: Andreas Schwab 
> Sent: Wednesday, May 6, 2020 12:57 PM
> To: Anup Patel 
> Cc: Sagar Kadam ; Palmer Dabbelt
> ; vigne...@ti.com; tudor.amba...@microchip.com;
> rich...@nod.at; Paul Walmsley ; linux-
> ker...@vger.kernel.org; linux-...@lists.infradead.org;
> miquel.ray...@bootlin.com; linux-ri...@lists.infradead.org
> Subject: Re: [PATCH 1/2] riscv: defconfig: enable spi nor on Hifive Unleashed
> A00 board.
>
> [External Email] Do not click links or attachments unless you recognize the
> sender and know the content is safe
>
> On Mai 06 2020, Anup Patel wrote:
>

Thanks for suggestions Anup and Andreas.
I missed to reply, sorry for that.

> > We had build issues in past by selecting major driver subsystems
> > in Kconfig.socs
> >

Please let me know if I am wrong, are you stating about the build issues, fixed 
in
commit bd6f20333c67 ("RISC-V: Only select essential drivers for SOC_VIRT 
config")
which was due to all platform dependent and independent driver's enabled in 
Kconfig.soc
for virtual platform.
Kconfig.socs as meant for platform drivers we can guard SPI_SIFIVE with a guard 
"if SPI"
so that come across " WARNING: unmet direct dependencies detected for 
SPI_SIFIVE"
--- a/arch/riscv/Kconfig.socs
+++ b/arch/riscv/Kconfig.socs
@@ -7,6 +7,7 @@ config SOC_SIFIVE
select CLK_SIFIVE
select CLK_SIFIVE_FU540_PRCI
select SIFIVE_PLIC
+   imply SPI_SIFIVE if SPI
help
  This enables support for SiFive SoC platform hardware.

> > I suggest to select SPI_SIFIVE from Kconfig.socs
>
> SPI_SIFIVE can be m, don't override that.
>
> Andreas.
>
Currently SPI and SPI_SIFIVE are default enabled via defconfig.
In Kconfig.socs if we force the config  option using "select" SPI_SIFIVE will 
lose its configurable option.
So I was thinking of using the weak dependency using "imply" as above, so that 
SPI_SIFIVE can
still be modular if required i.e 'm'.
We can then have other platform independent driver's ( SPI, MTD and 
MTD_SPI_NOR) required for
enabling SPI_NOR flash into the defconfig.
This way we can have SPI_SIFIVE in Kconfig.soc's and SPI_SIFIVE will also be 
modular
Please let me know your views on this, or if I am missing something.

Thanks & BR,
Sagar Kadam

> --
> Andreas Schwab, sch...@linux-m68k.org
> GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA
> AEC1
> "And now for something completely different."


Re: [PATCH 1/2] riscv: defconfig: enable spi nor on Hifive Unleashed A00 board.

2020-05-06 Thread Andreas Schwab
On Mai 06 2020, Anup Patel wrote:

> We had build issues in past by selecting major driver subsystems
> in Kconfig.socs
>
> I suggest to select SPI_SIFIVE from Kconfig.socs

SPI_SIFIVE can be m, don't override that.

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH 1/2] riscv: defconfig: enable spi nor on Hifive Unleashed A00 board.

2020-05-05 Thread Anup Patel
On Wed, May 6, 2020 at 9:26 AM Sagar Kadam  wrote:
>
> Hi Palmer,
>
> > -Original Message-
> > From: Palmer Dabbelt 
> > Sent: Wednesday, May 6, 2020 4:54 AM
> > To: Sagar Kadam 
> > Cc: tudor.amba...@microchip.com; miquel.ray...@bootlin.com;
> > rich...@nod.at; vigne...@ti.com; Paul Walmsley
> > ; linux-ri...@lists.infradead.org; linux-
> > ker...@vger.kernel.org; linux-...@lists.infradead.org
> > Subject: RE: [PATCH 1/2] riscv: defconfig: enable spi nor on Hifive 
> > Unleashed
> > A00 board.
> >
> > [External Email] Do not click links or attachments unless you recognize the
> > sender and know the content is safe
> >
> > On Tue, 05 May 2020 00:18:45 PDT (-0700), sagar.ka...@sifive.com wrote:
> > > Hello Palmer,
> > >
> > >> -Original Message-
> > >> From: Palmer Dabbelt 
> > >> Sent: Tuesday, May 5, 2020 3:40 AM
> > >> To: Sagar Kadam 
> > >> Cc: tudor.amba...@microchip.com; miquel.ray...@bootlin.com;
> > >> rich...@nod.at; vigne...@ti.com; Paul Walmsley
> > >> ; linux-ri...@lists.infradead.org; linux-
> > >> ker...@vger.kernel.org; linux-...@lists.infradead.org; Sagar Kadam
> > >> 
> > >> Subject: Re: [PATCH 1/2] riscv: defconfig: enable spi nor on Hifive
> > Unleashed
> > >> A00 board.
> > >>
> > >> [External Email] Do not click links or attachments unless you recognize
> > the
> > >> sender and know the content is safe
> > >>
> > >> On Thu, 30 Apr 2020 02:58:51 PDT (-0700), sagar.ka...@sifive.com
> > wrote:
> > >> > Enable MTD based SPI-NOR framework in order to use spi flash
> > available
> > >> > on HiFive Unleashed A00 board.
> > >> >
> > >> > Signed-off-by: Sagar Shrikant Kadam 
> > >> > ---
> > >> >  arch/riscv/configs/defconfig | 2 ++
> > >> >  1 file changed, 2 insertions(+)
> > >> >
> > >> > diff --git a/arch/riscv/configs/defconfig
> > >> > b/arch/riscv/configs/defconfig index 4da4886..970580b 100644
> > >> > --- a/arch/riscv/configs/defconfig
> > >> > +++ b/arch/riscv/configs/defconfig
> > >> > @@ -80,6 +80,8 @@ CONFIG_USB_STORAGE=y  CONFIG_USB_UAS=y
> > >> CONFIG_MMC=y
> > >> > CONFIG_MMC_SPI=y
> > >> > +CONFIG_MTD=y
> > >> > +CONFIG_MTD_SPI_NOR=y
> > >> >  CONFIG_RTC_CLASS=y
> > >> >  CONFIG_VIRTIO_PCI=y
> > >> >  CONFIG_VIRTIO_BALLOON=y
> > >>
> > >> From the second patch's description I'm assuming that MTD still
> > functions
> > >> correctly without that change?
> > >
> > > Yes Palmer, the second patch is to enable QUAD write to nor flash..
> > > MTD  function's correctly without second patch.
> > >
> > > Using the character interface (/dev/mtd0) mtd_utils (mtd_debug :
> > erase/read/write) work fine.
> > > We might require CONFIG_MTD_BLOCK, CONFIG_MTD_CMDLINE_PARTS
> > in order to use MTD partitioning.
> > > IMHO it can be at user's choice weather to use flash partitions or not, 
> > > so I
> > have not enabled. Please let me
> > > know if I should enable these features as well.
> >
> > Looks like arm64 has these:
> >
> > arch/arm64/configs/defconfig:CONFIG_MTD=y
> > arch/arm64/configs/defconfig:CONFIG_MTD_BLOCK=y
> > arch/arm64/configs/defconfig:CONFIG_MTD_CFI=y
> > arch/arm64/configs/defconfig:CONFIG_MTD_CFI_ADV_OPTIONS=y
> > arch/arm64/configs/defconfig:CONFIG_MTD_CFI_INTELEXT=y
> > arch/arm64/configs/defconfig:CONFIG_MTD_CFI_AMDSTD=y
> > arch/arm64/configs/defconfig:CONFIG_MTD_CFI_STAA=y
> > arch/arm64/configs/defconfig:CONFIG_MTD_PHYSMAP=y
> > arch/arm64/configs/defconfig:CONFIG_MTD_PHYSMAP_OF=y
> > arch/arm64/configs/defconfig:CONFIG_MTD_DATAFLASH=y
> > arch/arm64/configs/defconfig:CONFIG_MTD_SST25L=y
> > arch/arm64/configs/defconfig:CONFIG_MTD_RAW_NAND=y
> > arch/arm64/configs/defconfig:CONFIG_MTD_NAND_DENALI_DT=y
> > arch/arm64/configs/defconfig:CONFIG_MTD_NAND_MARVELL=y
> > arch/arm64/configs/defconfig:CONFIG_MTD_NAND_FSL_IFC=y
> > arch/arm64/configs/defconfig:CONFIG_MTD_NAND_QCOM=y
> > arch/arm64/configs/defconfig:CONFIG_MTD_SPI_NOR=y
> >
> > so I think we're good with just what you have here: MTD_BLOCK doesn't
> > seem that
> > useful, and the rest are drivers.  That said, these (along with SPI and
> > SPI_SIFIVE) should really be in Kconfig.socs

RE: [PATCH 1/2] riscv: defconfig: enable spi nor on Hifive Unleashed A00 board.

2020-05-05 Thread Sagar Kadam
Hi Palmer,

> -Original Message-
> From: Palmer Dabbelt 
> Sent: Wednesday, May 6, 2020 4:54 AM
> To: Sagar Kadam 
> Cc: tudor.amba...@microchip.com; miquel.ray...@bootlin.com;
> rich...@nod.at; vigne...@ti.com; Paul Walmsley
> ; linux-ri...@lists.infradead.org; linux-
> ker...@vger.kernel.org; linux-...@lists.infradead.org
> Subject: RE: [PATCH 1/2] riscv: defconfig: enable spi nor on Hifive Unleashed
> A00 board.
> 
> [External Email] Do not click links or attachments unless you recognize the
> sender and know the content is safe
> 
> On Tue, 05 May 2020 00:18:45 PDT (-0700), sagar.ka...@sifive.com wrote:
> > Hello Palmer,
> >
> >> -Original Message-
> >> From: Palmer Dabbelt 
> >> Sent: Tuesday, May 5, 2020 3:40 AM
> >> To: Sagar Kadam 
> >> Cc: tudor.amba...@microchip.com; miquel.ray...@bootlin.com;
> >> rich...@nod.at; vigne...@ti.com; Paul Walmsley
> >> ; linux-ri...@lists.infradead.org; linux-
> >> ker...@vger.kernel.org; linux-...@lists.infradead.org; Sagar Kadam
> >> 
> >> Subject: Re: [PATCH 1/2] riscv: defconfig: enable spi nor on Hifive
> Unleashed
> >> A00 board.
> >>
> >> [External Email] Do not click links or attachments unless you recognize
> the
> >> sender and know the content is safe
> >>
> >> On Thu, 30 Apr 2020 02:58:51 PDT (-0700), sagar.ka...@sifive.com
> wrote:
> >> > Enable MTD based SPI-NOR framework in order to use spi flash
> available
> >> > on HiFive Unleashed A00 board.
> >> >
> >> > Signed-off-by: Sagar Shrikant Kadam 
> >> > ---
> >> >  arch/riscv/configs/defconfig | 2 ++
> >> >  1 file changed, 2 insertions(+)
> >> >
> >> > diff --git a/arch/riscv/configs/defconfig
> >> > b/arch/riscv/configs/defconfig index 4da4886..970580b 100644
> >> > --- a/arch/riscv/configs/defconfig
> >> > +++ b/arch/riscv/configs/defconfig
> >> > @@ -80,6 +80,8 @@ CONFIG_USB_STORAGE=y  CONFIG_USB_UAS=y
> >> CONFIG_MMC=y
> >> > CONFIG_MMC_SPI=y
> >> > +CONFIG_MTD=y
> >> > +CONFIG_MTD_SPI_NOR=y
> >> >  CONFIG_RTC_CLASS=y
> >> >  CONFIG_VIRTIO_PCI=y
> >> >  CONFIG_VIRTIO_BALLOON=y
> >>
> >> From the second patch's description I'm assuming that MTD still
> functions
> >> correctly without that change?
> >
> > Yes Palmer, the second patch is to enable QUAD write to nor flash..
> > MTD  function's correctly without second patch.
> >
> > Using the character interface (/dev/mtd0) mtd_utils (mtd_debug :
> erase/read/write) work fine.
> > We might require CONFIG_MTD_BLOCK, CONFIG_MTD_CMDLINE_PARTS
> in order to use MTD partitioning.
> > IMHO it can be at user's choice weather to use flash partitions or not, so I
> have not enabled. Please let me
> > know if I should enable these features as well.
> 
> Looks like arm64 has these:
> 
> arch/arm64/configs/defconfig:CONFIG_MTD=y
> arch/arm64/configs/defconfig:CONFIG_MTD_BLOCK=y
> arch/arm64/configs/defconfig:CONFIG_MTD_CFI=y
> arch/arm64/configs/defconfig:CONFIG_MTD_CFI_ADV_OPTIONS=y
> arch/arm64/configs/defconfig:CONFIG_MTD_CFI_INTELEXT=y
> arch/arm64/configs/defconfig:CONFIG_MTD_CFI_AMDSTD=y
> arch/arm64/configs/defconfig:CONFIG_MTD_CFI_STAA=y
> arch/arm64/configs/defconfig:CONFIG_MTD_PHYSMAP=y
> arch/arm64/configs/defconfig:CONFIG_MTD_PHYSMAP_OF=y
> arch/arm64/configs/defconfig:CONFIG_MTD_DATAFLASH=y
> arch/arm64/configs/defconfig:CONFIG_MTD_SST25L=y
> arch/arm64/configs/defconfig:CONFIG_MTD_RAW_NAND=y
> arch/arm64/configs/defconfig:CONFIG_MTD_NAND_DENALI_DT=y
> arch/arm64/configs/defconfig:CONFIG_MTD_NAND_MARVELL=y
> arch/arm64/configs/defconfig:CONFIG_MTD_NAND_FSL_IFC=y
> arch/arm64/configs/defconfig:CONFIG_MTD_NAND_QCOM=y
> arch/arm64/configs/defconfig:CONFIG_MTD_SPI_NOR=y
> 
> so I think we're good with just what you have here: MTD_BLOCK doesn't
> seem that
> useful, and the rest are drivers.  That said, these (along with SPI and
> SPI_SIFIVE) should really be in Kconfig.socs rather than defconfig.  Can you
> send a patch that does that?
> 

Yes sure, I will send a V2 series, where SPI,  SPI_SIFIVE,  MTD, 
and MTD_SPI_NOR will be a part of Kconfig.socs.

Thanks & BR,
Sagar Kadam

> >
> > To demonstrate a bit more with linux 5.7-rc3
> >
> > Specify on U-boot prompt:
> > # setenv bootargs "root=/dev/ram rw console=ttySIF0
> mtdparts=spi0.0:1024k(loader1),4096K(loader2),26M(rootfs)"
> >
> > After booting linux will enumerate mtd partitions:
> > # cat /proc/mtd
> &g

RE: [PATCH 1/2] riscv: defconfig: enable spi nor on Hifive Unleashed A00 board.

2020-05-05 Thread Palmer Dabbelt

On Tue, 05 May 2020 00:18:45 PDT (-0700), sagar.ka...@sifive.com wrote:

Hello Palmer,


-Original Message-
From: Palmer Dabbelt 
Sent: Tuesday, May 5, 2020 3:40 AM
To: Sagar Kadam 
Cc: tudor.amba...@microchip.com; miquel.ray...@bootlin.com;
rich...@nod.at; vigne...@ti.com; Paul Walmsley
; linux-ri...@lists.infradead.org; linux-
ker...@vger.kernel.org; linux-...@lists.infradead.org; Sagar Kadam

Subject: Re: [PATCH 1/2] riscv: defconfig: enable spi nor on Hifive Unleashed
A00 board.

[External Email] Do not click links or attachments unless you recognize the
sender and know the content is safe

On Thu, 30 Apr 2020 02:58:51 PDT (-0700), sagar.ka...@sifive.com wrote:
> Enable MTD based SPI-NOR framework in order to use spi flash available
> on HiFive Unleashed A00 board.
>
> Signed-off-by: Sagar Shrikant Kadam 
> ---
>  arch/riscv/configs/defconfig | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/riscv/configs/defconfig
> b/arch/riscv/configs/defconfig index 4da4886..970580b 100644
> --- a/arch/riscv/configs/defconfig
> +++ b/arch/riscv/configs/defconfig
> @@ -80,6 +80,8 @@ CONFIG_USB_STORAGE=y  CONFIG_USB_UAS=y
CONFIG_MMC=y
> CONFIG_MMC_SPI=y
> +CONFIG_MTD=y
> +CONFIG_MTD_SPI_NOR=y
>  CONFIG_RTC_CLASS=y
>  CONFIG_VIRTIO_PCI=y
>  CONFIG_VIRTIO_BALLOON=y

From the second patch's description I'm assuming that MTD still functions
correctly without that change?


Yes Palmer, the second patch is to enable QUAD write to nor flash..
MTD  function's correctly without second patch.

Using the character interface (/dev/mtd0) mtd_utils (mtd_debug : 
erase/read/write) work fine.
We might require CONFIG_MTD_BLOCK, CONFIG_MTD_CMDLINE_PARTS  in order to use 
MTD partitioning.
IMHO it can be at user's choice weather to use flash partitions or not, so I have not enabled. Please let me 
know if I should enable these features as well.


Looks like arm64 has these:

arch/arm64/configs/defconfig:CONFIG_MTD=y
arch/arm64/configs/defconfig:CONFIG_MTD_BLOCK=y
arch/arm64/configs/defconfig:CONFIG_MTD_CFI=y
arch/arm64/configs/defconfig:CONFIG_MTD_CFI_ADV_OPTIONS=y
arch/arm64/configs/defconfig:CONFIG_MTD_CFI_INTELEXT=y
arch/arm64/configs/defconfig:CONFIG_MTD_CFI_AMDSTD=y
arch/arm64/configs/defconfig:CONFIG_MTD_CFI_STAA=y
arch/arm64/configs/defconfig:CONFIG_MTD_PHYSMAP=y
arch/arm64/configs/defconfig:CONFIG_MTD_PHYSMAP_OF=y
arch/arm64/configs/defconfig:CONFIG_MTD_DATAFLASH=y
arch/arm64/configs/defconfig:CONFIG_MTD_SST25L=y
arch/arm64/configs/defconfig:CONFIG_MTD_RAW_NAND=y
arch/arm64/configs/defconfig:CONFIG_MTD_NAND_DENALI_DT=y
arch/arm64/configs/defconfig:CONFIG_MTD_NAND_MARVELL=y
arch/arm64/configs/defconfig:CONFIG_MTD_NAND_FSL_IFC=y
arch/arm64/configs/defconfig:CONFIG_MTD_NAND_QCOM=y
arch/arm64/configs/defconfig:CONFIG_MTD_SPI_NOR=y

so I think we're good with just what you have here: MTD_BLOCK doesn't seem that
useful, and the rest are drivers.  That said, these (along with SPI and
SPI_SIFIVE) should really be in Kconfig.socs rather than defconfig.  Can you
send a patch that does that?



To demonstrate a bit more with linux 5.7-rc3 


Specify on U-boot prompt:
# setenv bootargs "root=/dev/ram rw console=ttySIF0 
mtdparts=spi0.0:1024k(loader1),4096K(loader2),26M(rootfs)"

After booting linux will enumerate mtd partitions:
# cat /proc/mtd
dev:size   erasesize  name
mtd0: 0010 1000 "loader1"
mtd1: 0040 1000 "loader2"
mtd2: 01a0 1000 "rootfs"

# cat /proc/partitions
major minor  #blocks  name
  310   1024 mtdblock0
  311   4096 mtdblock1
  312  26624 mtdblock2

#Format mtdblock2 with mkfs.ext3/4 and mount results in
# mkfs.ext3 /dev/mtdblock2
mke2fs 1.44.5 (15-Dec-2018)
/dev/mtdblock2 contains a ext3 file system
last mounted on /mnt on Thu Jan  1 00:00:14 1970
Proceed anyway? (y,N) y
Creating filesystem with 26624 1k blocks and 6656 inodes
Filesystem UUID: 1b09252d-e313-430c-9ecb-79b0cef003ca
Superblock backups stored on blocks:
8193, 24577

Allocating group tables: done
Writing inode tables: done
Creating journal (1024 blocks): done
Writing superblocks and filesystem accounting information: done

# mount
none on / type rootfs (rw)
proc on /proc type proc (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=666)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /tmp type tmpfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
sysfs on /sys type sysfs (rw,relatime)
/dev/mtdblock2 on /mnt type ext3 (rw,relatime)

Thanks & BR,
Sagar Kadam




RE: [PATCH 1/2] riscv: defconfig: enable spi nor on Hifive Unleashed A00 board.

2020-05-05 Thread Sagar Kadam
Hello Palmer,

> -Original Message-
> From: Palmer Dabbelt 
> Sent: Tuesday, May 5, 2020 3:40 AM
> To: Sagar Kadam 
> Cc: tudor.amba...@microchip.com; miquel.ray...@bootlin.com;
> rich...@nod.at; vigne...@ti.com; Paul Walmsley
> ; linux-ri...@lists.infradead.org; linux-
> ker...@vger.kernel.org; linux-...@lists.infradead.org; Sagar Kadam
> 
> Subject: Re: [PATCH 1/2] riscv: defconfig: enable spi nor on Hifive Unleashed
> A00 board.
> 
> [External Email] Do not click links or attachments unless you recognize the
> sender and know the content is safe
> 
> On Thu, 30 Apr 2020 02:58:51 PDT (-0700), sagar.ka...@sifive.com wrote:
> > Enable MTD based SPI-NOR framework in order to use spi flash available
> > on HiFive Unleashed A00 board.
> >
> > Signed-off-by: Sagar Shrikant Kadam 
> > ---
> >  arch/riscv/configs/defconfig | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/arch/riscv/configs/defconfig
> > b/arch/riscv/configs/defconfig index 4da4886..970580b 100644
> > --- a/arch/riscv/configs/defconfig
> > +++ b/arch/riscv/configs/defconfig
> > @@ -80,6 +80,8 @@ CONFIG_USB_STORAGE=y  CONFIG_USB_UAS=y
> CONFIG_MMC=y
> > CONFIG_MMC_SPI=y
> > +CONFIG_MTD=y
> > +CONFIG_MTD_SPI_NOR=y
> >  CONFIG_RTC_CLASS=y
> >  CONFIG_VIRTIO_PCI=y
> >  CONFIG_VIRTIO_BALLOON=y
> 
> From the second patch's description I'm assuming that MTD still functions
> correctly without that change?

Yes Palmer, the second patch is to enable QUAD write to nor flash..
MTD  function's correctly without second patch.

Using the character interface (/dev/mtd0) mtd_utils (mtd_debug : 
erase/read/write) work fine.
We might require CONFIG_MTD_BLOCK, CONFIG_MTD_CMDLINE_PARTS  in order to use 
MTD partitioning.
IMHO it can be at user's choice weather to use flash partitions or not, so I 
have not enabled. Please let me 
know if I should enable these features as well.

To demonstrate a bit more with linux 5.7-rc3 

Specify on U-boot prompt:
# setenv bootargs "root=/dev/ram rw console=ttySIF0 
mtdparts=spi0.0:1024k(loader1),4096K(loader2),26M(rootfs)"

After booting linux will enumerate mtd partitions:
# cat /proc/mtd
dev:size   erasesize  name
mtd0: 0010 1000 "loader1"
mtd1: 0040 1000 "loader2"
mtd2: 01a0 1000 "rootfs"

# cat /proc/partitions
major minor  #blocks  name
  310   1024 mtdblock0
  311   4096 mtdblock1
  312  26624 mtdblock2

#Format mtdblock2 with mkfs.ext3/4 and mount results in
# mkfs.ext3 /dev/mtdblock2
mke2fs 1.44.5 (15-Dec-2018)
/dev/mtdblock2 contains a ext3 file system
last mounted on /mnt on Thu Jan  1 00:00:14 1970
Proceed anyway? (y,N) y
Creating filesystem with 26624 1k blocks and 6656 inodes
Filesystem UUID: 1b09252d-e313-430c-9ecb-79b0cef003ca
Superblock backups stored on blocks:
8193, 24577

Allocating group tables: done
Writing inode tables: done
Creating journal (1024 blocks): done
Writing superblocks and filesystem accounting information: done

# mount
none on / type rootfs (rw)
proc on /proc type proc (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=666)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /tmp type tmpfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
sysfs on /sys type sysfs (rw,relatime)
/dev/mtdblock2 on /mnt type ext3 (rw,relatime)

Thanks & BR,
Sagar Kadam


Re: [PATCH 1/2] riscv: defconfig: enable spi nor on Hifive Unleashed A00 board.

2020-05-04 Thread Palmer Dabbelt

On Thu, 30 Apr 2020 02:58:51 PDT (-0700), sagar.ka...@sifive.com wrote:

Enable MTD based SPI-NOR framework in order to use spi flash
available on HiFive Unleashed A00 board.

Signed-off-by: Sagar Shrikant Kadam 
---
 arch/riscv/configs/defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
index 4da4886..970580b 100644
--- a/arch/riscv/configs/defconfig
+++ b/arch/riscv/configs/defconfig
@@ -80,6 +80,8 @@ CONFIG_USB_STORAGE=y
 CONFIG_USB_UAS=y
 CONFIG_MMC=y
 CONFIG_MMC_SPI=y
+CONFIG_MTD=y
+CONFIG_MTD_SPI_NOR=y
 CONFIG_RTC_CLASS=y
 CONFIG_VIRTIO_PCI=y
 CONFIG_VIRTIO_BALLOON=y



From the second patch's description I'm assuming that MTD still functions

correctly without that change?


[PATCH 1/2] riscv: defconfig: enable spi nor on Hifive Unleashed A00 board.

2020-04-30 Thread Sagar Shrikant Kadam
Enable MTD based SPI-NOR framework in order to use spi flash
available on HiFive Unleashed A00 board.

Signed-off-by: Sagar Shrikant Kadam 
---
 arch/riscv/configs/defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
index 4da4886..970580b 100644
--- a/arch/riscv/configs/defconfig
+++ b/arch/riscv/configs/defconfig
@@ -80,6 +80,8 @@ CONFIG_USB_STORAGE=y
 CONFIG_USB_UAS=y
 CONFIG_MMC=y
 CONFIG_MMC_SPI=y
+CONFIG_MTD=y
+CONFIG_MTD_SPI_NOR=y
 CONFIG_RTC_CLASS=y
 CONFIG_VIRTIO_PCI=y
 CONFIG_VIRTIO_BALLOON=y
-- 
2.7.4