Re: [U-Boot] [PATCH v4 00/20] SF: Migrate to Linux SPI NOR framework

2019-02-13 Thread Boris Brezillon
[PM]
Hi Vignesh,

On Fri, 8 Feb 2019 18:36:05 +0530
Vignesh R  wrote:

> On 07/02/19 6:13 PM, Jagan Teki wrote:
> > On Tue, Feb 5, 2019 at 11:29 AM Vignesh R  wrote:  
> [...]
> >>
> >> Vignesh R (20):
> >>   configs: Move CONFIG_SPI_FLASH into defconfigs
> >>   bitops: Fix GENMASK definition for Sandbox
> >>   spi: spi-mem: Allow use of spi_mem_exec_op for all SPI modes
> >>   spi: spi-mem: Extend spi_mem_adjust_op_size() to honor max xfer size
> >>   spi: spi-mem: Claim SPI bus before spi mem access
> >>   spi: Add non DM version of SPI_MEM
> >>   sh: bitops: add hweight*() macros
> >>   mtd: spi: Port SPI NOR framework from Linux
> >>   mtd: spi: spi-nor-core: Add SPI MEM support
> >>   mtd: spi: spi-nor-core: Add 4 Byte addressing support
> >>   mtd: spi: spi-nor-core: Add SFDP support
> >>   mtd: spi: spi-nor-core: Add back U-Boot specific features
> >>   mtd: spi: sf_probe: Add "jedec,spi-nor" compatible string
> >>   mtd: spi: Switch to new SPI NOR framework
> >>   mtd: spi: Remove unused files
> >>   mtd: spi: Add lightweight SPI flash stack for SPL
> >>   spl: Kconfig: Enable SPI_FLASH_TINY by default for SPL
> >>   configs: Remove SF_DUAL_FLASH
> >>   configs: Don't use SPI_FLASH_BAR as default
> >>   MAINTAINERS: Add an entry for SPI NOR  
> > 
> > Update trivial change on this patch.
> > 
> > Applied to u-boot-spi/master, thanks for the big changes and welcome aboard!
> >   
> 
> Thanks Jagan! Thanks all for testing out this series
> 

Kudos for getting this spi-nor port merged in u-boot!
I hope you'll continue contributing to the Linux stack even though
you're now the maintainer of the uboot version ;-).

Regards,

Boris
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v4 00/20] SF: Migrate to Linux SPI NOR framework

2019-02-13 Thread Boris Brezillon
On Wed, 13 Feb 2019 14:42:57 +0100
Boris Brezillon  wrote:

> [PM]

Not so private actually :D.

> Hi Vignesh,
> 
> On Fri, 8 Feb 2019 18:36:05 +0530
> Vignesh R  wrote:
> 
> > On 07/02/19 6:13 PM, Jagan Teki wrote:  
> > > On Tue, Feb 5, 2019 at 11:29 AM Vignesh R  wrote:
> > [...]  
> > >>
> > >> Vignesh R (20):
> > >>   configs: Move CONFIG_SPI_FLASH into defconfigs
> > >>   bitops: Fix GENMASK definition for Sandbox
> > >>   spi: spi-mem: Allow use of spi_mem_exec_op for all SPI modes
> > >>   spi: spi-mem: Extend spi_mem_adjust_op_size() to honor max xfer size
> > >>   spi: spi-mem: Claim SPI bus before spi mem access
> > >>   spi: Add non DM version of SPI_MEM
> > >>   sh: bitops: add hweight*() macros
> > >>   mtd: spi: Port SPI NOR framework from Linux
> > >>   mtd: spi: spi-nor-core: Add SPI MEM support
> > >>   mtd: spi: spi-nor-core: Add 4 Byte addressing support
> > >>   mtd: spi: spi-nor-core: Add SFDP support
> > >>   mtd: spi: spi-nor-core: Add back U-Boot specific features
> > >>   mtd: spi: sf_probe: Add "jedec,spi-nor" compatible string
> > >>   mtd: spi: Switch to new SPI NOR framework
> > >>   mtd: spi: Remove unused files
> > >>   mtd: spi: Add lightweight SPI flash stack for SPL
> > >>   spl: Kconfig: Enable SPI_FLASH_TINY by default for SPL
> > >>   configs: Remove SF_DUAL_FLASH
> > >>   configs: Don't use SPI_FLASH_BAR as default
> > >>   MAINTAINERS: Add an entry for SPI NOR
> > > 
> > > Update trivial change on this patch.
> > > 
> > > Applied to u-boot-spi/master, thanks for the big changes and welcome 
> > > aboard!
> > > 
> > 
> > Thanks Jagan! Thanks all for testing out this series
> >   
> 
> Kudos for getting this spi-nor port merged in u-boot!
> I hope you'll continue contributing to the Linux stack even though
> you're now the maintainer of the uboot version ;-).
> 
> Regards,
> 
> Boris

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v4 00/20] SF: Migrate to Linux SPI NOR framework

2019-02-08 Thread Vignesh R


On 07/02/19 6:13 PM, Jagan Teki wrote:
> On Tue, Feb 5, 2019 at 11:29 AM Vignesh R  wrote:
[...]
>>
>> Vignesh R (20):
>>   configs: Move CONFIG_SPI_FLASH into defconfigs
>>   bitops: Fix GENMASK definition for Sandbox
>>   spi: spi-mem: Allow use of spi_mem_exec_op for all SPI modes
>>   spi: spi-mem: Extend spi_mem_adjust_op_size() to honor max xfer size
>>   spi: spi-mem: Claim SPI bus before spi mem access
>>   spi: Add non DM version of SPI_MEM
>>   sh: bitops: add hweight*() macros
>>   mtd: spi: Port SPI NOR framework from Linux
>>   mtd: spi: spi-nor-core: Add SPI MEM support
>>   mtd: spi: spi-nor-core: Add 4 Byte addressing support
>>   mtd: spi: spi-nor-core: Add SFDP support
>>   mtd: spi: spi-nor-core: Add back U-Boot specific features
>>   mtd: spi: sf_probe: Add "jedec,spi-nor" compatible string
>>   mtd: spi: Switch to new SPI NOR framework
>>   mtd: spi: Remove unused files
>>   mtd: spi: Add lightweight SPI flash stack for SPL
>>   spl: Kconfig: Enable SPI_FLASH_TINY by default for SPL
>>   configs: Remove SF_DUAL_FLASH
>>   configs: Don't use SPI_FLASH_BAR as default
>>   MAINTAINERS: Add an entry for SPI NOR
> 
> Update trivial change on this patch.
> 
> Applied to u-boot-spi/master, thanks for the big changes and welcome aboard!
> 

Thanks Jagan! Thanks all for testing out this series

-- 
Regards
Vignesh
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v4 00/20] SF: Migrate to Linux SPI NOR framework

2019-02-07 Thread Jagan Teki
On Tue, Feb 5, 2019 at 11:29 AM Vignesh R  wrote:
>
> Here is the v4 of SPI NOR migration(github branch at [1]) with minor
> cleanups
>
> Travis ci report:
> https://travis-ci.org/r-vignesh/u-boot/builds/488868207
>
> Change log:
> Since v3:
> Rebase on to the latest u-boot/master
> Drop MODULE_LICENSE, EXPORT_SYMBOL_GPL macros
> Make SPI_FLASH_BAR default for ZYNQ_QSPI as suggested by Jagan.
>
> Since v2:
> Split sync up patches into smaller versions so that its easier for review.
> Address comments by Jagan and Simon Goldschmidt on v2.
> Make SPI_FLASH_TINY(read only SF stack)  as default for SPL build to
> offset against size increase due to new code.
>
> Since v1:
> Remove #ifindef __UBOOT__
> Add back BAR support, but dont enable as default for all platform (see
> 10/11 for more details)
> Enable SPI_FLASH_TINY on boards where there is SPL size constraint as
> seen on travis ci builds.
> Drop sf_mtd changes for now as it seems to cause issues.
> v1: https://patchwork.ozlabs.org/cover/1012146/
>
> Since RFC v2:
> Fix issues reported by Simon Goldschmidt wrt 4 use of byte addressing opcode
> Fix issues in compiling SFDP code
> Re organize file names and Makefile to simply spi-nor-tiny inclusion
> Remove SPI_FLASH_BAR and SF_DUAL_FLASH as these are no longer used
> RFC v2: https://patchwork.ozlabs.org/cover/1007589/
>
> Since RFC v1:
> Add lightweight SPI flash stack for boards with SPL size constraints
> Provide non DM version of spi-mem
> Fix build issues on different platforms as reported by travis-ci on v1
>
> RFC v1: https://patchwork.ozlabs.org/cover/1004689/
>
> Background:
>
> U-Boot SPI NOR support (sf layer) is quite outdated as it does not
> support 4 byte addressing opcodes, SFDP table parsing and different types of
> quad mode enable sequences. Many newer flashes no longer support BANK
> registers used by sf layer to a access >16MB space.
> Also, many SPI controllers have special MMIO interfaces which provide
> accelerated read/write access but require knowledge of flash parameters
> to make use of it. Recent spi-mem layer provides a way to support such
> flashes but sf layer isn't using that.
> This patch series syncs SPI NOR framework from Linux v4.19. It also adds
> spi-mem support on top.
> So, we gain 4byte addressing support and SFDP support. This makes
> migrating to U-Boot MTD framework easier.
>
> Tested with few Spansion, micron and macronix flashes with TI's dra7xx,
> k2g, am43xx EVMs. I dont have access to flashes from other vendors. So,
> I would greatly appreciate testing on other platforms. Complete series
> with dependencies here[1]
>
> [1] https://github.com/r-vignesh/u-boot.git  branch: spi-nor-mig-patch-v4
>
> Vignesh R (20):
>   configs: Move CONFIG_SPI_FLASH into defconfigs
>   bitops: Fix GENMASK definition for Sandbox
>   spi: spi-mem: Allow use of spi_mem_exec_op for all SPI modes
>   spi: spi-mem: Extend spi_mem_adjust_op_size() to honor max xfer size
>   spi: spi-mem: Claim SPI bus before spi mem access
>   spi: Add non DM version of SPI_MEM
>   sh: bitops: add hweight*() macros
>   mtd: spi: Port SPI NOR framework from Linux
>   mtd: spi: spi-nor-core: Add SPI MEM support
>   mtd: spi: spi-nor-core: Add 4 Byte addressing support
>   mtd: spi: spi-nor-core: Add SFDP support
>   mtd: spi: spi-nor-core: Add back U-Boot specific features
>   mtd: spi: sf_probe: Add "jedec,spi-nor" compatible string
>   mtd: spi: Switch to new SPI NOR framework
>   mtd: spi: Remove unused files
>   mtd: spi: Add lightweight SPI flash stack for SPL
>   spl: Kconfig: Enable SPI_FLASH_TINY by default for SPL
>   configs: Remove SF_DUAL_FLASH
>   configs: Don't use SPI_FLASH_BAR as default
>   MAINTAINERS: Add an entry for SPI NOR

Update trivial change on this patch.

Applied to u-boot-spi/master, thanks for the big changes and welcome aboard!

Jagan.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v4 00/20] SF: Migrate to Linux SPI NOR framework

2019-02-06 Thread Tom Rini
On Wed, Feb 06, 2019 at 11:02:25PM +0530, Vignesh R wrote:
> 
> 
> On 06-Feb-19 1:43 PM, Simon Goldschmidt wrote:
> > On Tue, Feb 5, 2019 at 6:58 AM Vignesh R  wrote:
> >>
> >> Here is the v4 of SPI NOR migration(github branch at [1]) with minor
> >> cleanups
> > 
> > I've just sanity-checked this again on socfpga_socrates: Everything
> > still works and SPL is ~1.8 KiB smaller than without this patch.
> > 
> 
> Thanks again for testing!
> 
> Jagan,
> 
> This is based on top of latest u-boot/master. Could this series be
> queued now? Thanks!

Yes please, thanks!

-- 
Tom


signature.asc
Description: PGP signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v4 00/20] SF: Migrate to Linux SPI NOR framework

2019-02-06 Thread Vignesh R


On 06-Feb-19 1:43 PM, Simon Goldschmidt wrote:
> On Tue, Feb 5, 2019 at 6:58 AM Vignesh R  wrote:
>>
>> Here is the v4 of SPI NOR migration(github branch at [1]) with minor
>> cleanups
> 
> I've just sanity-checked this again on socfpga_socrates: Everything
> still works and SPL is ~1.8 KiB smaller than without this patch.
> 

Thanks again for testing!

Jagan,

This is based on top of latest u-boot/master. Could this series be
queued now? Thanks!

Regards
Vignesh


>>
>> Travis ci report:
>> https://travis-ci.org/r-vignesh/u-boot/builds/488868207
>>
>> Change log:
>> Since v3:
>> Rebase on to the latest u-boot/master
>> Drop MODULE_LICENSE, EXPORT_SYMBOL_GPL macros
>> Make SPI_FLASH_BAR default for ZYNQ_QSPI as suggested by Jagan.
>>
>> Since v2:
>> Split sync up patches into smaller versions so that its easier for review.
>> Address comments by Jagan and Simon Goldschmidt on v2.
>> Make SPI_FLASH_TINY(read only SF stack)  as default for SPL build to
>> offset against size increase due to new code.
>>
>> Since v1:
>> Remove #ifindef __UBOOT__
>> Add back BAR support, but dont enable as default for all platform (see
>> 10/11 for more details)
>> Enable SPI_FLASH_TINY on boards where there is SPL size constraint as
>> seen on travis ci builds.
>> Drop sf_mtd changes for now as it seems to cause issues.
>> v1: https://patchwork.ozlabs.org/cover/1012146/
>>
>> Since RFC v2:
>> Fix issues reported by Simon Goldschmidt wrt 4 use of byte addressing opcode
>> Fix issues in compiling SFDP code
>> Re organize file names and Makefile to simply spi-nor-tiny inclusion
>> Remove SPI_FLASH_BAR and SF_DUAL_FLASH as these are no longer used
>> RFC v2: https://patchwork.ozlabs.org/cover/1007589/
>>
>> Since RFC v1:
>> Add lightweight SPI flash stack for boards with SPL size constraints
>> Provide non DM version of spi-mem
>> Fix build issues on different platforms as reported by travis-ci on v1
>>
>> RFC v1: https://patchwork.ozlabs.org/cover/1004689/
>>
>> Background:
>>
>> U-Boot SPI NOR support (sf layer) is quite outdated as it does not
>> support 4 byte addressing opcodes, SFDP table parsing and different types of
>> quad mode enable sequences. Many newer flashes no longer support BANK
>> registers used by sf layer to a access >16MB space.
>> Also, many SPI controllers have special MMIO interfaces which provide
>> accelerated read/write access but require knowledge of flash parameters
>> to make use of it. Recent spi-mem layer provides a way to support such
>> flashes but sf layer isn't using that.
>> This patch series syncs SPI NOR framework from Linux v4.19. It also adds
>> spi-mem support on top.
>> So, we gain 4byte addressing support and SFDP support. This makes
>> migrating to U-Boot MTD framework easier.
>>
>> Tested with few Spansion, micron and macronix flashes with TI's dra7xx,
>> k2g, am43xx EVMs. I dont have access to flashes from other vendors. So,
>> I would greatly appreciate testing on other platforms. Complete series
>> with dependencies here[1]
>>
>> [1] https://github.com/r-vignesh/u-boot.git  branch: spi-nor-mig-patch-v4
>>
>> Vignesh R (20):
>>   configs: Move CONFIG_SPI_FLASH into defconfigs
>>   bitops: Fix GENMASK definition for Sandbox
>>   spi: spi-mem: Allow use of spi_mem_exec_op for all SPI modes
>>   spi: spi-mem: Extend spi_mem_adjust_op_size() to honor max xfer size
>>   spi: spi-mem: Claim SPI bus before spi mem access
>>   spi: Add non DM version of SPI_MEM
>>   sh: bitops: add hweight*() macros
>>   mtd: spi: Port SPI NOR framework from Linux
>>   mtd: spi: spi-nor-core: Add SPI MEM support
>>   mtd: spi: spi-nor-core: Add 4 Byte addressing support
>>   mtd: spi: spi-nor-core: Add SFDP support
>>   mtd: spi: spi-nor-core: Add back U-Boot specific features
>>   mtd: spi: sf_probe: Add "jedec,spi-nor" compatible string
>>   mtd: spi: Switch to new SPI NOR framework
>>   mtd: spi: Remove unused files
>>   mtd: spi: Add lightweight SPI flash stack for SPL
>>   spl: Kconfig: Enable SPI_FLASH_TINY by default for SPL
>>   configs: Remove SF_DUAL_FLASH
>>   configs: Don't use SPI_FLASH_BAR as default
>>   MAINTAINERS: Add an entry for SPI NOR
>>
>>  MAINTAINERS   |9 +
>>  arch/arm/mach-omap2/am33xx/Kconfig|1 -
>>  arch/sh/include/asm/bitops.h  |4 +
>>  common/spl/Kconfig|   23 +-
>>  configs/alt_defconfig |1 -
>>  configs/am57xx_evm_defconfig  |1 -
>>  configs/am57xx_hs_evm_defconfig   |1 -
>>  configs/ap121_defconfig   |1 -
>>  configs/ap143_defconfig   |1 -
>>  configs/avnet_ultra96_rev1_defconfig  |1 -
>>  configs/axs101_defconfig  |1 -
>>  configs/axs103_defconfig  |1 -
>>  configs/bg0900_defconfig  |1 -
>>  configs/blanche_defconfig |1 -
>>  configs/cgtqmx6eval_defconfig 

Re: [U-Boot] [PATCH v4 00/20] SF: Migrate to Linux SPI NOR framework

2019-02-06 Thread Simon Goldschmidt
On Tue, Feb 5, 2019 at 6:58 AM Vignesh R  wrote:
>
> Here is the v4 of SPI NOR migration(github branch at [1]) with minor
> cleanups

I've just sanity-checked this again on socfpga_socrates: Everything
still works and SPL is ~1.8 KiB smaller than without this patch.

Regargds,
Simon

>
> Travis ci report:
> https://travis-ci.org/r-vignesh/u-boot/builds/488868207
>
> Change log:
> Since v3:
> Rebase on to the latest u-boot/master
> Drop MODULE_LICENSE, EXPORT_SYMBOL_GPL macros
> Make SPI_FLASH_BAR default for ZYNQ_QSPI as suggested by Jagan.
>
> Since v2:
> Split sync up patches into smaller versions so that its easier for review.
> Address comments by Jagan and Simon Goldschmidt on v2.
> Make SPI_FLASH_TINY(read only SF stack)  as default for SPL build to
> offset against size increase due to new code.
>
> Since v1:
> Remove #ifindef __UBOOT__
> Add back BAR support, but dont enable as default for all platform (see
> 10/11 for more details)
> Enable SPI_FLASH_TINY on boards where there is SPL size constraint as
> seen on travis ci builds.
> Drop sf_mtd changes for now as it seems to cause issues.
> v1: https://patchwork.ozlabs.org/cover/1012146/
>
> Since RFC v2:
> Fix issues reported by Simon Goldschmidt wrt 4 use of byte addressing opcode
> Fix issues in compiling SFDP code
> Re organize file names and Makefile to simply spi-nor-tiny inclusion
> Remove SPI_FLASH_BAR and SF_DUAL_FLASH as these are no longer used
> RFC v2: https://patchwork.ozlabs.org/cover/1007589/
>
> Since RFC v1:
> Add lightweight SPI flash stack for boards with SPL size constraints
> Provide non DM version of spi-mem
> Fix build issues on different platforms as reported by travis-ci on v1
>
> RFC v1: https://patchwork.ozlabs.org/cover/1004689/
>
> Background:
>
> U-Boot SPI NOR support (sf layer) is quite outdated as it does not
> support 4 byte addressing opcodes, SFDP table parsing and different types of
> quad mode enable sequences. Many newer flashes no longer support BANK
> registers used by sf layer to a access >16MB space.
> Also, many SPI controllers have special MMIO interfaces which provide
> accelerated read/write access but require knowledge of flash parameters
> to make use of it. Recent spi-mem layer provides a way to support such
> flashes but sf layer isn't using that.
> This patch series syncs SPI NOR framework from Linux v4.19. It also adds
> spi-mem support on top.
> So, we gain 4byte addressing support and SFDP support. This makes
> migrating to U-Boot MTD framework easier.
>
> Tested with few Spansion, micron and macronix flashes with TI's dra7xx,
> k2g, am43xx EVMs. I dont have access to flashes from other vendors. So,
> I would greatly appreciate testing on other platforms. Complete series
> with dependencies here[1]
>
> [1] https://github.com/r-vignesh/u-boot.git  branch: spi-nor-mig-patch-v4
>
> Vignesh R (20):
>   configs: Move CONFIG_SPI_FLASH into defconfigs
>   bitops: Fix GENMASK definition for Sandbox
>   spi: spi-mem: Allow use of spi_mem_exec_op for all SPI modes
>   spi: spi-mem: Extend spi_mem_adjust_op_size() to honor max xfer size
>   spi: spi-mem: Claim SPI bus before spi mem access
>   spi: Add non DM version of SPI_MEM
>   sh: bitops: add hweight*() macros
>   mtd: spi: Port SPI NOR framework from Linux
>   mtd: spi: spi-nor-core: Add SPI MEM support
>   mtd: spi: spi-nor-core: Add 4 Byte addressing support
>   mtd: spi: spi-nor-core: Add SFDP support
>   mtd: spi: spi-nor-core: Add back U-Boot specific features
>   mtd: spi: sf_probe: Add "jedec,spi-nor" compatible string
>   mtd: spi: Switch to new SPI NOR framework
>   mtd: spi: Remove unused files
>   mtd: spi: Add lightweight SPI flash stack for SPL
>   spl: Kconfig: Enable SPI_FLASH_TINY by default for SPL
>   configs: Remove SF_DUAL_FLASH
>   configs: Don't use SPI_FLASH_BAR as default
>   MAINTAINERS: Add an entry for SPI NOR
>
>  MAINTAINERS   |9 +
>  arch/arm/mach-omap2/am33xx/Kconfig|1 -
>  arch/sh/include/asm/bitops.h  |4 +
>  common/spl/Kconfig|   23 +-
>  configs/alt_defconfig |1 -
>  configs/am57xx_evm_defconfig  |1 -
>  configs/am57xx_hs_evm_defconfig   |1 -
>  configs/ap121_defconfig   |1 -
>  configs/ap143_defconfig   |1 -
>  configs/avnet_ultra96_rev1_defconfig  |1 -
>  configs/axs101_defconfig  |1 -
>  configs/axs103_defconfig  |1 -
>  configs/bg0900_defconfig  |1 -
>  configs/blanche_defconfig |1 -
>  configs/cgtqmx6eval_defconfig |1 +
>  configs/chromebit_mickey_defconfig|1 +
>  configs/chromebook_jerry_defconfig|1 +
>  configs/chromebook_minnie_defconfig   |1 +
>  configs/cl-som-am57x_defconfig|1 -
>  configs/clearfog_defconfi

[U-Boot] [PATCH v4 00/20] SF: Migrate to Linux SPI NOR framework

2019-02-04 Thread Vignesh R
Here is the v4 of SPI NOR migration(github branch at [1]) with minor
cleanups

Travis ci report:
https://travis-ci.org/r-vignesh/u-boot/builds/488868207

Change log:
Since v3:
Rebase on to the latest u-boot/master
Drop MODULE_LICENSE, EXPORT_SYMBOL_GPL macros
Make SPI_FLASH_BAR default for ZYNQ_QSPI as suggested by Jagan.

Since v2:
Split sync up patches into smaller versions so that its easier for review.
Address comments by Jagan and Simon Goldschmidt on v2.
Make SPI_FLASH_TINY(read only SF stack)  as default for SPL build to
offset against size increase due to new code.

Since v1:
Remove #ifindef __UBOOT__
Add back BAR support, but dont enable as default for all platform (see
10/11 for more details)
Enable SPI_FLASH_TINY on boards where there is SPL size constraint as
seen on travis ci builds.
Drop sf_mtd changes for now as it seems to cause issues.
v1: https://patchwork.ozlabs.org/cover/1012146/

Since RFC v2:
Fix issues reported by Simon Goldschmidt wrt 4 use of byte addressing opcode
Fix issues in compiling SFDP code
Re organize file names and Makefile to simply spi-nor-tiny inclusion
Remove SPI_FLASH_BAR and SF_DUAL_FLASH as these are no longer used
RFC v2: https://patchwork.ozlabs.org/cover/1007589/

Since RFC v1:
Add lightweight SPI flash stack for boards with SPL size constraints
Provide non DM version of spi-mem
Fix build issues on different platforms as reported by travis-ci on v1

RFC v1: https://patchwork.ozlabs.org/cover/1004689/

Background:

U-Boot SPI NOR support (sf layer) is quite outdated as it does not
support 4 byte addressing opcodes, SFDP table parsing and different types of
quad mode enable sequences. Many newer flashes no longer support BANK
registers used by sf layer to a access >16MB space.
Also, many SPI controllers have special MMIO interfaces which provide
accelerated read/write access but require knowledge of flash parameters
to make use of it. Recent spi-mem layer provides a way to support such
flashes but sf layer isn't using that.
This patch series syncs SPI NOR framework from Linux v4.19. It also adds
spi-mem support on top.
So, we gain 4byte addressing support and SFDP support. This makes
migrating to U-Boot MTD framework easier.

Tested with few Spansion, micron and macronix flashes with TI's dra7xx,
k2g, am43xx EVMs. I dont have access to flashes from other vendors. So,
I would greatly appreciate testing on other platforms. Complete series
with dependencies here[1]

[1] https://github.com/r-vignesh/u-boot.git  branch: spi-nor-mig-patch-v4

Vignesh R (20):
  configs: Move CONFIG_SPI_FLASH into defconfigs
  bitops: Fix GENMASK definition for Sandbox
  spi: spi-mem: Allow use of spi_mem_exec_op for all SPI modes
  spi: spi-mem: Extend spi_mem_adjust_op_size() to honor max xfer size
  spi: spi-mem: Claim SPI bus before spi mem access
  spi: Add non DM version of SPI_MEM
  sh: bitops: add hweight*() macros
  mtd: spi: Port SPI NOR framework from Linux
  mtd: spi: spi-nor-core: Add SPI MEM support
  mtd: spi: spi-nor-core: Add 4 Byte addressing support
  mtd: spi: spi-nor-core: Add SFDP support
  mtd: spi: spi-nor-core: Add back U-Boot specific features
  mtd: spi: sf_probe: Add "jedec,spi-nor" compatible string
  mtd: spi: Switch to new SPI NOR framework
  mtd: spi: Remove unused files
  mtd: spi: Add lightweight SPI flash stack for SPL
  spl: Kconfig: Enable SPI_FLASH_TINY by default for SPL
  configs: Remove SF_DUAL_FLASH
  configs: Don't use SPI_FLASH_BAR as default
  MAINTAINERS: Add an entry for SPI NOR

 MAINTAINERS   |9 +
 arch/arm/mach-omap2/am33xx/Kconfig|1 -
 arch/sh/include/asm/bitops.h  |4 +
 common/spl/Kconfig|   23 +-
 configs/alt_defconfig |1 -
 configs/am57xx_evm_defconfig  |1 -
 configs/am57xx_hs_evm_defconfig   |1 -
 configs/ap121_defconfig   |1 -
 configs/ap143_defconfig   |1 -
 configs/avnet_ultra96_rev1_defconfig  |1 -
 configs/axs101_defconfig  |1 -
 configs/axs103_defconfig  |1 -
 configs/bg0900_defconfig  |1 -
 configs/blanche_defconfig |1 -
 configs/cgtqmx6eval_defconfig |1 +
 configs/chromebit_mickey_defconfig|1 +
 configs/chromebook_jerry_defconfig|1 +
 configs/chromebook_minnie_defconfig   |1 +
 configs/cl-som-am57x_defconfig|1 -
 configs/clearfog_defconfig|1 -
 configs/cm_t43_defconfig  |1 -
 configs/db-88f6820-amc_defconfig  |1 -
 configs/display5_defconfig|1 -
 configs/display5_factory_defconfig|1 -
 configs/dra7xx_evm_defconfig  |1 -
 configs/dra7xx_hs_evm_defconfig   |1 -
 configs/ds109_defconfig