Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH 0/5] defconfigs: add MTD_SPI_NOR (dependency for M25P80)
@ 2014-04-17  7:21 Brian Norris
  2014-04-17  7:21 ` Brian Norris
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Brian Norris @ 2014-04-17  7:21 UTC (permalink / raw)
  To: Linux Kernel
  Cc: Brian Norris, Marek Vasut, linux-mtd, Russell King, Shawn Guo,
	Sascha Hauer, Stephen Warren, Thierry Reding, Olof Johansson,
	linux-arm-kernel, linux-tegra, Steven Miao, adi-buildroot-devel,
	Ralf Baechle, linux-mips, Benjamin Herrenschmidt, Paul Mackerras,
	linuxppc-dev, linux-sh

Hi all,

We are introducing a new SPI-NOR library/framework for MTD, to support various
types of SPI-NOR flash controllers which require (or benefit from) intimate
knowledge of the flash interface, rather than just the relatively dumb SPI
interface. This library borrows much of the m25p80 driver for its abstraction
and moves this code into a spi-nor module.

This means CONFIG_M25P80 now has a dependency on CONFIG_MTD_SPI_NOR, which
should be added to the defconfigs. I'm not sure what is the best process for
doing this. Should each $ARCH maintainer just take their respective patch, even
if the MTD_SPI_NOR Kconfig symbol is not defined for them yet? Or should
maintainers plan on merging the relevant SPI-NOR code into their trees during
the development cycle? Or some third option?

Anyway, the patches are here. Please keep general comments to the cover letter,
so all parties can see.

This series is based on the development repo for MTD, in the 'spinor' branch:

  git://git.infradead.org/l2-mtd.git +spinor

This series is available in the same repo at:

  git://git.infradead.org/l2-mtd.git +defconfigs

I tried locally merging this into linux-next and saw a trivial conflict in
arch/arm/configs/shmobile_defconfig. I can resubmit based on an appropriate
tree, if requested.

Thanks,
Brian

P.S. I was going to purely automatically generate this diff as follows, but
it generated a lot of defconfig noise:

	#!/bin/sh
	for i in arm blackfin mips powerpc sh
	do 
		for j in `git grep -l M25P80 arch/$i/configs`
		do 
			echo $j
			cp $j .config
			echo CONFIG_MTD_SPI_NOR=y >> .config
			make ARCH=$i savedefconfig
			mv defconfig $j
		done
	done

So I did a mixed approach, where I filtered most of the noise out of the diff.

Brian Norris (5):
  ARM: defconfigs: add MTD_SPI_NOR (new dependency for M25P80)
  blackfin: defconfigs: add MTD_SPI_NOR (new dependency for M25P80)
  mips: defconfigs: add MTD_SPI_NOR (new dependency for M25P80)
  powerpc: defconfigs: add MTD_SPI_NOR (new dependency for M25P80)
  sh: defconfig: add MTD_SPI_NOR (new dependency for M25P80)

 arch/arm/configs/bockw_defconfig               | 2 +-
 arch/arm/configs/dove_defconfig                | 2 +-
 arch/arm/configs/imx_v6_v7_defconfig           | 1 +
 arch/arm/configs/keystone_defconfig            | 1 +
 arch/arm/configs/kirkwood_defconfig            | 1 +
 arch/arm/configs/koelsch_defconfig             | 1 +
 arch/arm/configs/lager_defconfig               | 1 +
 arch/arm/configs/lpc32xx_defconfig             | 2 +-
 arch/arm/configs/multi_v5_defconfig            | 1 +
 arch/arm/configs/multi_v7_defconfig            | 1 +
 arch/arm/configs/mvebu_v5_defconfig            | 1 +
 arch/arm/configs/mvebu_v7_defconfig            | 1 +
 arch/arm/configs/mxs_defconfig                 | 1 +
 arch/arm/configs/sama5_defconfig               | 2 +-
 arch/arm/configs/shmobile_defconfig            | 1 +
 arch/arm/configs/tegra_defconfig               | 1 +
 arch/blackfin/configs/BF526-EZBRD_defconfig    | 2 +-
 arch/blackfin/configs/BF527-EZKIT-V2_defconfig | 2 +-
 arch/blackfin/configs/BF527-EZKIT_defconfig    | 2 +-
 arch/blackfin/configs/BF548-EZKIT_defconfig    | 2 +-
 arch/blackfin/configs/BF609-EZKIT_defconfig    | 2 +-
 arch/blackfin/configs/BlackStamp_defconfig     | 3 +--
 arch/blackfin/configs/H8606_defconfig          | 3 +--
 arch/mips/configs/ath79_defconfig              | 3 +--
 arch/mips/configs/db1xxx_defconfig             | 1 +
 arch/mips/configs/rt305x_defconfig             | 2 +-
 arch/powerpc/configs/corenet32_smp_defconfig   | 2 +-
 arch/powerpc/configs/corenet64_smp_defconfig   | 2 +-
 arch/powerpc/configs/mpc85xx_defconfig         | 2 +-
 arch/powerpc/configs/mpc85xx_smp_defconfig     | 2 +-
 arch/sh/configs/sh7757lcr_defconfig            | 2 +-
 31 files changed, 31 insertions(+), 21 deletions(-)

-- 
1.8.3.2

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

* [PATCH 0/5] defconfigs: add MTD_SPI_NOR (dependency for M25P80)
  2014-04-17  7:21 [PATCH 0/5] defconfigs: add MTD_SPI_NOR (dependency for M25P80) Brian Norris
@ 2014-04-17  7:21 ` Brian Norris
  2014-04-17  7:21 ` [PATCH 3/5] mips: defconfigs: add MTD_SPI_NOR (new dependency " Brian Norris
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Brian Norris @ 2014-04-17  7:21 UTC (permalink / raw)
  To: Linux Kernel
  Cc: Brian Norris, Marek Vasut, linux-mtd, Russell King, Shawn Guo,
	Sascha Hauer, Stephen Warren, Thierry Reding, Olof Johansson,
	linux-arm-kernel, linux-tegra, Steven Miao, adi-buildroot-devel,
	Ralf Baechle, linux-mips, Benjamin Herrenschmidt, Paul Mackerras,
	linuxppc-dev, linux-sh

Hi all,

We are introducing a new SPI-NOR library/framework for MTD, to support various
types of SPI-NOR flash controllers which require (or benefit from) intimate
knowledge of the flash interface, rather than just the relatively dumb SPI
interface. This library borrows much of the m25p80 driver for its abstraction
and moves this code into a spi-nor module.

This means CONFIG_M25P80 now has a dependency on CONFIG_MTD_SPI_NOR, which
should be added to the defconfigs. I'm not sure what is the best process for
doing this. Should each $ARCH maintainer just take their respective patch, even
if the MTD_SPI_NOR Kconfig symbol is not defined for them yet? Or should
maintainers plan on merging the relevant SPI-NOR code into their trees during
the development cycle? Or some third option?

Anyway, the patches are here. Please keep general comments to the cover letter,
so all parties can see.

This series is based on the development repo for MTD, in the 'spinor' branch:

  git://git.infradead.org/l2-mtd.git +spinor

This series is available in the same repo at:

  git://git.infradead.org/l2-mtd.git +defconfigs

I tried locally merging this into linux-next and saw a trivial conflict in
arch/arm/configs/shmobile_defconfig. I can resubmit based on an appropriate
tree, if requested.

Thanks,
Brian

P.S. I was going to purely automatically generate this diff as follows, but
it generated a lot of defconfig noise:

	#!/bin/sh
	for i in arm blackfin mips powerpc sh
	do 
		for j in `git grep -l M25P80 arch/$i/configs`
		do 
			echo $j
			cp $j .config
			echo CONFIG_MTD_SPI_NOR=y >> .config
			make ARCH=$i savedefconfig
			mv defconfig $j
		done
	done

So I did a mixed approach, where I filtered most of the noise out of the diff.

Brian Norris (5):
  ARM: defconfigs: add MTD_SPI_NOR (new dependency for M25P80)
  blackfin: defconfigs: add MTD_SPI_NOR (new dependency for M25P80)
  mips: defconfigs: add MTD_SPI_NOR (new dependency for M25P80)
  powerpc: defconfigs: add MTD_SPI_NOR (new dependency for M25P80)
  sh: defconfig: add MTD_SPI_NOR (new dependency for M25P80)

 arch/arm/configs/bockw_defconfig               | 2 +-
 arch/arm/configs/dove_defconfig                | 2 +-
 arch/arm/configs/imx_v6_v7_defconfig           | 1 +
 arch/arm/configs/keystone_defconfig            | 1 +
 arch/arm/configs/kirkwood_defconfig            | 1 +
 arch/arm/configs/koelsch_defconfig             | 1 +
 arch/arm/configs/lager_defconfig               | 1 +
 arch/arm/configs/lpc32xx_defconfig             | 2 +-
 arch/arm/configs/multi_v5_defconfig            | 1 +
 arch/arm/configs/multi_v7_defconfig            | 1 +
 arch/arm/configs/mvebu_v5_defconfig            | 1 +
 arch/arm/configs/mvebu_v7_defconfig            | 1 +
 arch/arm/configs/mxs_defconfig                 | 1 +
 arch/arm/configs/sama5_defconfig               | 2 +-
 arch/arm/configs/shmobile_defconfig            | 1 +
 arch/arm/configs/tegra_defconfig               | 1 +
 arch/blackfin/configs/BF526-EZBRD_defconfig    | 2 +-
 arch/blackfin/configs/BF527-EZKIT-V2_defconfig | 2 +-
 arch/blackfin/configs/BF527-EZKIT_defconfig    | 2 +-
 arch/blackfin/configs/BF548-EZKIT_defconfig    | 2 +-
 arch/blackfin/configs/BF609-EZKIT_defconfig    | 2 +-
 arch/blackfin/configs/BlackStamp_defconfig     | 3 +--
 arch/blackfin/configs/H8606_defconfig          | 3 +--
 arch/mips/configs/ath79_defconfig              | 3 +--
 arch/mips/configs/db1xxx_defconfig             | 1 +
 arch/mips/configs/rt305x_defconfig             | 2 +-
 arch/powerpc/configs/corenet32_smp_defconfig   | 2 +-
 arch/powerpc/configs/corenet64_smp_defconfig   | 2 +-
 arch/powerpc/configs/mpc85xx_defconfig         | 2 +-
 arch/powerpc/configs/mpc85xx_smp_defconfig     | 2 +-
 arch/sh/configs/sh7757lcr_defconfig            | 2 +-
 31 files changed, 31 insertions(+), 21 deletions(-)

-- 
1.8.3.2

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

* [PATCH 3/5] mips: defconfigs: add MTD_SPI_NOR (new dependency for M25P80)
  2014-04-17  7:21 [PATCH 0/5] defconfigs: add MTD_SPI_NOR (dependency for M25P80) Brian Norris
  2014-04-17  7:21 ` Brian Norris
@ 2014-04-17  7:21 ` Brian Norris
  2014-04-17  7:21   ` Brian Norris
  2014-04-19  0:24   ` Florian Fainelli
  2014-04-17 10:53 ` [PATCH 0/5] defconfigs: add MTD_SPI_NOR (dependency " Thierry Reding
  2014-04-17 11:07 ` Marek Vasut
  3 siblings, 2 replies; 10+ messages in thread
From: Brian Norris @ 2014-04-17  7:21 UTC (permalink / raw)
  To: Linux Kernel
  Cc: Brian Norris, Marek Vasut, linux-mtd, Ralf Baechle, linux-mips

These defconfigs contain the CONFIG_M25P80 symbol, which is now
dependent on the MTD_SPI_NOR symbol. Add CONFIG_MTD_SPI_NOR to the
relevant defconfigs.

At the same time, drop the now-nonexistent CONFIG_MTD_CHAR symbol.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
---
This change is based on l2-mtd.git/spinor, which is based on 3.15-rc1:

  git://git.infradead.org/l2-mtd.git +spinor

 arch/mips/configs/ath79_defconfig  | 3 +--
 arch/mips/configs/db1xxx_defconfig | 1 +
 arch/mips/configs/rt305x_defconfig | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/configs/ath79_defconfig b/arch/mips/configs/ath79_defconfig
index e3a3836508ec..134879c1310a 100644
--- a/arch/mips/configs/ath79_defconfig
+++ b/arch/mips/configs/ath79_defconfig
@@ -46,7 +46,6 @@ CONFIG_MTD=y
 CONFIG_MTD_REDBOOT_PARTS=y
 CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-2
 CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=y
 CONFIG_MTD_JEDECPROBE=y
@@ -54,7 +53,7 @@ CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_COMPLEX_MAPPINGS=y
 CONFIG_MTD_PHYSMAP=y
 CONFIG_MTD_M25P80=y
-# CONFIG_M25PXX_USE_FAST_READ is not set
+CONFIG_MTD_SPI_NOR=y
 CONFIG_NETDEVICES=y
 # CONFIG_NET_PACKET_ENGINE is not set
 CONFIG_ATH_COMMON=m
diff --git a/arch/mips/configs/db1xxx_defconfig b/arch/mips/configs/db1xxx_defconfig
index c99b6eeda90b..a64b30b96a0d 100644
--- a/arch/mips/configs/db1xxx_defconfig
+++ b/arch/mips/configs/db1xxx_defconfig
@@ -113,6 +113,7 @@ CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_ECC_BCH=y
 CONFIG_MTD_NAND_AU1550=y
 CONFIG_MTD_NAND_PLATFORM=y
+CONFIG_MTD_SPI_NOR=y
 CONFIG_EEPROM_AT24=y
 CONFIG_EEPROM_AT25=y
 CONFIG_SCSI_TGT=y
diff --git a/arch/mips/configs/rt305x_defconfig b/arch/mips/configs/rt305x_defconfig
index d1741bcf8949..d14ae2fa7d13 100644
--- a/arch/mips/configs/rt305x_defconfig
+++ b/arch/mips/configs/rt305x_defconfig
@@ -81,7 +81,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 # CONFIG_FIRMWARE_IN_KERNEL is not set
 CONFIG_MTD=y
 CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_AMDSTD=y
@@ -89,6 +88,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
 CONFIG_MTD_PHYSMAP=y
 CONFIG_MTD_PHYSMAP_OF=y
 CONFIG_MTD_M25P80=y
+CONFIG_MTD_SPI_NOR=y
 CONFIG_EEPROM_93CX6=m
 CONFIG_SCSI=y
 CONFIG_BLK_DEV_SD=y
-- 
1.8.3.2

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

* [PATCH 3/5] mips: defconfigs: add MTD_SPI_NOR (new dependency for M25P80)
  2014-04-17  7:21 ` [PATCH 3/5] mips: defconfigs: add MTD_SPI_NOR (new dependency " Brian Norris
@ 2014-04-17  7:21   ` Brian Norris
  2014-04-19  0:24   ` Florian Fainelli
  1 sibling, 0 replies; 10+ messages in thread
From: Brian Norris @ 2014-04-17  7:21 UTC (permalink / raw)
  To: Linux Kernel
  Cc: Brian Norris, Marek Vasut, linux-mtd, Ralf Baechle, linux-mips

These defconfigs contain the CONFIG_M25P80 symbol, which is now
dependent on the MTD_SPI_NOR symbol. Add CONFIG_MTD_SPI_NOR to the
relevant defconfigs.

At the same time, drop the now-nonexistent CONFIG_MTD_CHAR symbol.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
---
This change is based on l2-mtd.git/spinor, which is based on 3.15-rc1:

  git://git.infradead.org/l2-mtd.git +spinor

 arch/mips/configs/ath79_defconfig  | 3 +--
 arch/mips/configs/db1xxx_defconfig | 1 +
 arch/mips/configs/rt305x_defconfig | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/configs/ath79_defconfig b/arch/mips/configs/ath79_defconfig
index e3a3836508ec..134879c1310a 100644
--- a/arch/mips/configs/ath79_defconfig
+++ b/arch/mips/configs/ath79_defconfig
@@ -46,7 +46,6 @@ CONFIG_MTD=y
 CONFIG_MTD_REDBOOT_PARTS=y
 CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-2
 CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=y
 CONFIG_MTD_JEDECPROBE=y
@@ -54,7 +53,7 @@ CONFIG_MTD_CFI_AMDSTD=y
 CONFIG_MTD_COMPLEX_MAPPINGS=y
 CONFIG_MTD_PHYSMAP=y
 CONFIG_MTD_M25P80=y
-# CONFIG_M25PXX_USE_FAST_READ is not set
+CONFIG_MTD_SPI_NOR=y
 CONFIG_NETDEVICES=y
 # CONFIG_NET_PACKET_ENGINE is not set
 CONFIG_ATH_COMMON=m
diff --git a/arch/mips/configs/db1xxx_defconfig b/arch/mips/configs/db1xxx_defconfig
index c99b6eeda90b..a64b30b96a0d 100644
--- a/arch/mips/configs/db1xxx_defconfig
+++ b/arch/mips/configs/db1xxx_defconfig
@@ -113,6 +113,7 @@ CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_ECC_BCH=y
 CONFIG_MTD_NAND_AU1550=y
 CONFIG_MTD_NAND_PLATFORM=y
+CONFIG_MTD_SPI_NOR=y
 CONFIG_EEPROM_AT24=y
 CONFIG_EEPROM_AT25=y
 CONFIG_SCSI_TGT=y
diff --git a/arch/mips/configs/rt305x_defconfig b/arch/mips/configs/rt305x_defconfig
index d1741bcf8949..d14ae2fa7d13 100644
--- a/arch/mips/configs/rt305x_defconfig
+++ b/arch/mips/configs/rt305x_defconfig
@@ -81,7 +81,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 # CONFIG_FIRMWARE_IN_KERNEL is not set
 CONFIG_MTD=y
 CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
 CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_AMDSTD=y
@@ -89,6 +88,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
 CONFIG_MTD_PHYSMAP=y
 CONFIG_MTD_PHYSMAP_OF=y
 CONFIG_MTD_M25P80=y
+CONFIG_MTD_SPI_NOR=y
 CONFIG_EEPROM_93CX6=m
 CONFIG_SCSI=y
 CONFIG_BLK_DEV_SD=y
-- 
1.8.3.2

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

* Re: [PATCH 0/5] defconfigs: add MTD_SPI_NOR (dependency for M25P80)
  2014-04-17  7:21 [PATCH 0/5] defconfigs: add MTD_SPI_NOR (dependency for M25P80) Brian Norris
  2014-04-17  7:21 ` Brian Norris
  2014-04-17  7:21 ` [PATCH 3/5] mips: defconfigs: add MTD_SPI_NOR (new dependency " Brian Norris
@ 2014-04-17 10:53 ` Thierry Reding
  2014-04-18  6:30   ` Brian Norris
  2014-04-17 11:07 ` Marek Vasut
  3 siblings, 1 reply; 10+ messages in thread
From: Thierry Reding @ 2014-04-17 10:53 UTC (permalink / raw)
  To: Brian Norris
  Cc: Linux Kernel, Marek Vasut, linux-mtd, Russell King, Shawn Guo,
	Sascha Hauer, Stephen Warren, Olof Johansson, linux-arm-kernel,
	linux-tegra, Steven Miao, adi-buildroot-devel, Ralf Baechle,
	linux-mips, Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev,
	linux-sh

[-- Attachment #1: Type: text/plain, Size: 702 bytes --]

On Thu, Apr 17, 2014 at 12:21:44AM -0700, Brian Norris wrote:
> Hi all,
> 
> We are introducing a new SPI-NOR library/framework for MTD, to support various
> types of SPI-NOR flash controllers which require (or benefit from) intimate
> knowledge of the flash interface, rather than just the relatively dumb SPI
> interface. This library borrows much of the m25p80 driver for its abstraction
> and moves this code into a spi-nor module.

If this is a common library, then the more common approach to solve this
would be to have each driver that uses it to select MTD_SPI_NOR rather
than depend on it. That way you can drop this whole series to update the
default configurations.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH 0/5] defconfigs: add MTD_SPI_NOR (dependency for M25P80)
  2014-04-17  7:21 [PATCH 0/5] defconfigs: add MTD_SPI_NOR (dependency for M25P80) Brian Norris
                   ` (2 preceding siblings ...)
  2014-04-17 10:53 ` [PATCH 0/5] defconfigs: add MTD_SPI_NOR (dependency " Thierry Reding
@ 2014-04-17 11:07 ` Marek Vasut
  3 siblings, 0 replies; 10+ messages in thread
From: Marek Vasut @ 2014-04-17 11:07 UTC (permalink / raw)
  To: Brian Norris
  Cc: Linux Kernel, linux-mtd, Russell King, Shawn Guo, Sascha Hauer,
	Stephen Warren, Thierry Reding, Olof Johansson, linux-arm-kernel,
	linux-tegra, Steven Miao, adi-buildroot-devel, Ralf Baechle,
	linux-mips, Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev,
	linux-sh

On Thursday, April 17, 2014 at 09:21:44 AM, Brian Norris wrote:
> Hi all,
> 
> We are introducing a new SPI-NOR library/framework for MTD, to support
> various types of SPI-NOR flash controllers which require (or benefit from)
> intimate knowledge of the flash interface, rather than just the relatively
> dumb SPI interface. This library borrows much of the m25p80 driver for its
> abstraction and moves this code into a spi-nor module.
> 
> This means CONFIG_M25P80 now has a dependency on CONFIG_MTD_SPI_NOR, which
> should be added to the defconfigs. I'm not sure what is the best process
> for doing this. Should each $ARCH maintainer just take their respective
> patch, even if the MTD_SPI_NOR Kconfig symbol is not defined for them yet?
> Or should maintainers plan on merging the relevant SPI-NOR code into their
> trees during the development cycle? Or some third option?

Shouldn't the M25P80 driver just "select" the SPI NOR framework? Then you won't 
need the adjustment to defconfigs at all I think.

Best regards,
Marek Vasut

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

* Re: [PATCH 0/5] defconfigs: add MTD_SPI_NOR (dependency for M25P80)
  2014-04-17 10:53 ` [PATCH 0/5] defconfigs: add MTD_SPI_NOR (dependency " Thierry Reding
@ 2014-04-18  6:30   ` Brian Norris
  2014-04-21 14:52     ` Marek Vasut
  0 siblings, 1 reply; 10+ messages in thread
From: Brian Norris @ 2014-04-18  6:30 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Linux Kernel, Marek Vasut, linux-mtd, Russell King, Shawn Guo,
	Sascha Hauer, Stephen Warren, Olof Johansson, linux-arm-kernel,
	linux-tegra, Steven Miao, adi-buildroot-devel, Ralf Baechle,
	linux-mips, Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev,
	linux-sh

Hi,

On Thu, Apr 17, 2014 at 12:53:03PM +0200, Thierry Reding wrote:
> On Thu, Apr 17, 2014 at 12:21:44AM -0700, Brian Norris wrote:
> > We are introducing a new SPI-NOR library/framework for MTD, to support various
> > types of SPI-NOR flash controllers which require (or benefit from) intimate
> > knowledge of the flash interface, rather than just the relatively dumb SPI
> > interface. This library borrows much of the m25p80 driver for its abstraction
> > and moves this code into a spi-nor module.
> 
> If this is a common library, then the more common approach to solve this
> would be to have each driver that uses it to select MTD_SPI_NOR rather
> than depend on it. That way you can drop this whole series to update the
> default configurations.

But does MTD_SPI_NOR (and drivers/mtd/spi-nor/) qualify as a "library"
or as a "subsystem"? I thought the latter were typically expected to be
user-selectable options, not automatically-"select"ed.

I would say that, except for its age, MTD_SPI_NOR is very similar in to
MTD_NAND (driver/mtd/nand/), which I'd consider a kind of subsystem, and
which users must select before they are asked about drivers which fall
under its category.

Perhaps my usage of the word "library" in the description was a mistake,
as I don't exactly consider it like a library in the sense of many other
"select"ed libraries.

Brian

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

* Re: [PATCH 3/5] mips: defconfigs: add MTD_SPI_NOR (new dependency for M25P80)
  2014-04-17  7:21 ` [PATCH 3/5] mips: defconfigs: add MTD_SPI_NOR (new dependency " Brian Norris
  2014-04-17  7:21   ` Brian Norris
@ 2014-04-19  0:24   ` Florian Fainelli
  2014-04-19  0:49     ` Brian Norris
  1 sibling, 1 reply; 10+ messages in thread
From: Florian Fainelli @ 2014-04-19  0:24 UTC (permalink / raw)
  To: Brian Norris
  Cc: Linux Kernel, Marek Vasut, linux-mtd@lists.infradead.org,
	Ralf Baechle, Linux-MIPS

2014-04-17 0:21 GMT-07:00 Brian Norris <computersforpeace@gmail.com>:
> These defconfigs contain the CONFIG_M25P80 symbol, which is now
> dependent on the MTD_SPI_NOR symbol. Add CONFIG_MTD_SPI_NOR to the
> relevant defconfigs.

so CONFIG_M25P80 should select CONFIG_MTD_SPI_NOR, right? in that
case, I do not think this is needed at all, as it would be
automatically picked up during the build and if someone refreshes the
defconfigs, although it cannot hurt.

>
> At the same time, drop the now-nonexistent CONFIG_MTD_CHAR symbol.
>
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: linux-mips@linux-mips.org
> Cc: linux-kernel@vger.kernel.org
> ---
> This change is based on l2-mtd.git/spinor, which is based on 3.15-rc1:
>
>   git://git.infradead.org/l2-mtd.git +spinor
>
>  arch/mips/configs/ath79_defconfig  | 3 +--
>  arch/mips/configs/db1xxx_defconfig | 1 +
>  arch/mips/configs/rt305x_defconfig | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/mips/configs/ath79_defconfig b/arch/mips/configs/ath79_defconfig
> index e3a3836508ec..134879c1310a 100644
> --- a/arch/mips/configs/ath79_defconfig
> +++ b/arch/mips/configs/ath79_defconfig
> @@ -46,7 +46,6 @@ CONFIG_MTD=y
>  CONFIG_MTD_REDBOOT_PARTS=y
>  CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-2
>  CONFIG_MTD_CMDLINE_PARTS=y
> -CONFIG_MTD_CHAR=y
>  CONFIG_MTD_BLOCK=y
>  CONFIG_MTD_CFI=y
>  CONFIG_MTD_JEDECPROBE=y
> @@ -54,7 +53,7 @@ CONFIG_MTD_CFI_AMDSTD=y
>  CONFIG_MTD_COMPLEX_MAPPINGS=y
>  CONFIG_MTD_PHYSMAP=y
>  CONFIG_MTD_M25P80=y
> -# CONFIG_M25PXX_USE_FAST_READ is not set
> +CONFIG_MTD_SPI_NOR=y
>  CONFIG_NETDEVICES=y
>  # CONFIG_NET_PACKET_ENGINE is not set
>  CONFIG_ATH_COMMON=m
> diff --git a/arch/mips/configs/db1xxx_defconfig b/arch/mips/configs/db1xxx_defconfig
> index c99b6eeda90b..a64b30b96a0d 100644
> --- a/arch/mips/configs/db1xxx_defconfig
> +++ b/arch/mips/configs/db1xxx_defconfig
> @@ -113,6 +113,7 @@ CONFIG_MTD_NAND=y
>  CONFIG_MTD_NAND_ECC_BCH=y
>  CONFIG_MTD_NAND_AU1550=y
>  CONFIG_MTD_NAND_PLATFORM=y
> +CONFIG_MTD_SPI_NOR=y
>  CONFIG_EEPROM_AT24=y
>  CONFIG_EEPROM_AT25=y
>  CONFIG_SCSI_TGT=y
> diff --git a/arch/mips/configs/rt305x_defconfig b/arch/mips/configs/rt305x_defconfig
> index d1741bcf8949..d14ae2fa7d13 100644
> --- a/arch/mips/configs/rt305x_defconfig
> +++ b/arch/mips/configs/rt305x_defconfig
> @@ -81,7 +81,6 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
>  # CONFIG_FIRMWARE_IN_KERNEL is not set
>  CONFIG_MTD=y
>  CONFIG_MTD_CMDLINE_PARTS=y
> -CONFIG_MTD_CHAR=y
>  CONFIG_MTD_BLOCK=y
>  CONFIG_MTD_CFI=y
>  CONFIG_MTD_CFI_AMDSTD=y
> @@ -89,6 +88,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
>  CONFIG_MTD_PHYSMAP=y
>  CONFIG_MTD_PHYSMAP_OF=y
>  CONFIG_MTD_M25P80=y
> +CONFIG_MTD_SPI_NOR=y
>  CONFIG_EEPROM_93CX6=m
>  CONFIG_SCSI=y
>  CONFIG_BLK_DEV_SD=y
> --
> 1.8.3.2
>
>



-- 
Florian

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

* Re: [PATCH 3/5] mips: defconfigs: add MTD_SPI_NOR (new dependency for M25P80)
  2014-04-19  0:24   ` Florian Fainelli
@ 2014-04-19  0:49     ` Brian Norris
  0 siblings, 0 replies; 10+ messages in thread
From: Brian Norris @ 2014-04-19  0:49 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Linux Kernel, Marek Vasut, linux-mtd@lists.infradead.org,
	Ralf Baechle, Linux-MIPS

On Fri, Apr 18, 2014 at 5:24 PM, Florian Fainelli <f.fainelli@gmail.com> wrote:
> 2014-04-17 0:21 GMT-07:00 Brian Norris <computersforpeace@gmail.com>:
>> These defconfigs contain the CONFIG_M25P80 symbol, which is now
>> dependent on the MTD_SPI_NOR symbol. Add CONFIG_MTD_SPI_NOR to the
>> relevant defconfigs.
>
> so CONFIG_M25P80 should select CONFIG_MTD_SPI_NOR, right? in that
> case, I do not think this is needed at all, as it would be
> automatically picked up during the build and if someone refreshes the
> defconfigs, although it cannot hurt.

Can you reply to the cover letter? 3 people have made the same
comment, and I had a rebuttal that I'm not sure if anyone considered
yet.

(And it wouldn't be picked up by 'savedefconfig', since it saves a
minimal .config; when one symbol 'select's another, the latter is not
needed in the defconfig)

Brian

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

* Re: [PATCH 0/5] defconfigs: add MTD_SPI_NOR (dependency for M25P80)
  2014-04-18  6:30   ` Brian Norris
@ 2014-04-21 14:52     ` Marek Vasut
  0 siblings, 0 replies; 10+ messages in thread
From: Marek Vasut @ 2014-04-21 14:52 UTC (permalink / raw)
  To: Brian Norris
  Cc: Thierry Reding, Linux Kernel, linux-mtd, Russell King, Shawn Guo,
	Sascha Hauer, Stephen Warren, Olof Johansson, linux-arm-kernel,
	linux-tegra, Steven Miao, adi-buildroot-devel, Ralf Baechle,
	linux-mips, Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev,
	linux-sh

On Friday, April 18, 2014 at 08:30:54 AM, Brian Norris wrote:
> Hi,
> 
> On Thu, Apr 17, 2014 at 12:53:03PM +0200, Thierry Reding wrote:
> > On Thu, Apr 17, 2014 at 12:21:44AM -0700, Brian Norris wrote:
> > > We are introducing a new SPI-NOR library/framework for MTD, to support
> > > various types of SPI-NOR flash controllers which require (or benefit
> > > from) intimate knowledge of the flash interface, rather than just the
> > > relatively dumb SPI interface. This library borrows much of the m25p80
> > > driver for its abstraction and moves this code into a spi-nor module.
> > 
> > If this is a common library, then the more common approach to solve this
> > would be to have each driver that uses it to select MTD_SPI_NOR rather
> > than depend on it. That way you can drop this whole series to update the
> > default configurations.
> 
> But does MTD_SPI_NOR (and drivers/mtd/spi-nor/) qualify as a "library"
> or as a "subsystem"? I thought the latter were typically expected to be
> user-selectable options, not automatically-"select"ed.

I agree the "subsystem" is user-selectable while the "library" is to be 
'select'ed .

> I would say that, except for its age, MTD_SPI_NOR is very similar in to
> MTD_NAND (driver/mtd/nand/), which I'd consider a kind of subsystem, and
> which users must select before they are asked about drivers which fall
> under its category.
> 
> Perhaps my usage of the word "library" in the description was a mistake,
> as I don't exactly consider it like a library in the sense of many other
> "select"ed libraries.

It did look like a library to me at first, but it's rather a subsystem that 
contains a small library in it. Thus, I retract my previous comment about using 
'select' and add :

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut

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

end of thread, other threads:[~2014-04-21 21:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-17  7:21 [PATCH 0/5] defconfigs: add MTD_SPI_NOR (dependency for M25P80) Brian Norris
2014-04-17  7:21 ` Brian Norris
2014-04-17  7:21 ` [PATCH 3/5] mips: defconfigs: add MTD_SPI_NOR (new dependency " Brian Norris
2014-04-17  7:21   ` Brian Norris
2014-04-19  0:24   ` Florian Fainelli
2014-04-19  0:49     ` Brian Norris
2014-04-17 10:53 ` [PATCH 0/5] defconfigs: add MTD_SPI_NOR (dependency " Thierry Reding
2014-04-18  6:30   ` Brian Norris
2014-04-21 14:52     ` Marek Vasut
2014-04-17 11:07 ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox