All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vignesh R <vigneshr@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 00/11] SF: Migrate to Linux SPI NOR framework
Date: Wed, 9 Jan 2019 14:56:20 +0530	[thread overview]
Message-ID: <693ec92f-5bb6-aa83-30cd-877c9fa74117@ti.com> (raw)
In-Reply-To: <0f29b6fe-7e20-ab03-29a3-9262760d760c@gmail.com>



On 22/12/18 1:13 PM, Simon Goldschmidt wrote:
> Am 21.12.2018 um 14:29 schrieb Simon Goldschmidt:
>> Am 21.12.2018 um 12:11 schrieb Vignesh R:
>>> Hi Simon,
>>> [...]
>>>>
>>>> Hi Vignesh,
>>>>
>>>> I just did a quick test on this but it fails to boot. I guess this could
>>>> be a size problem.
>>>
>>> I guess. SPL_SPI_FLASH_TINY would help with SPL size issue here.
>>
>> Yes, after enabling that it works. With the tiny framework, I get
>> ~1.5KiB reduction compared to current mainline.
>>
>>>
>>>> Unfortunately, the socfpga gen5 config does not
>>>> correctly check SPL size currently. I'll have to work on that. I'll test
>>>> your patch with a more limited config when I find the time.
>>>>
>>> Okay, thanks!
>>
>> I can successfully boot with your v2 patch applied with the standard and
>> the tiny framework. However, allow me some more time to check SFDP (and
>> maybe BAR) and also to check that the correct opcodes are used
>> (stateless 4-byte opcodes should be used).
> 
> After testing different configs with SPL and U-Boot:
> 
> Tested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> 
> However, two suggestions:
> - I would recommend to enable SPL_SPI_FLASH_TINY by default to prevent 
> SPL size increasement for any board

I am fine with doing this if there are no objections on "[PATCH v2
10/11] configs: Don't use SPI_FLASH_BAR as default"

> - SPL_SPI_FLASH_TINY does not provide BAR support and the Kconfig option 
> does not reflect this. This should probably be fixed before making 
> SPL_SPI_FLASH_TINY the default.
> 

Ok, I will make SPI_FLASH_BAR depend on !SPL_SPI_FLASH_TINY


Thanks for the suggestions!

> Regards,
> Simon
> 
>>
>> Regards,
>> Simon
>>
>>>
>>> Regards
>>> Vignesh
>>>
>>>> Regards,
>>>> Simon
>>>>
>>>>
>>>>       Change log:
>>>>       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/
>>>>
>>>>       Vignesh R (11):
>>>>         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: Switch to new SPI NOR framework
>>>>         mtd: spi: Remove unused files
>>>>         mtd: spi: Add lightweight SPI flash stack for SPL
>>>>         configs: Enable SPI_FLASH_TINY for resource constrained boards
>>>>         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                            |   21 +-
>>>>        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/axm_defconfig                         |    1 +
>>>>        configs/axs101_defconfig                      |    1 -
>>>>        configs/axs103_defconfig                      |    1 -
>>>>        configs/bg0900_defconfig                      |    1 -
>>>>        configs/blanche_defconfig                     |    1 -
>>>>        configs/cl-som-am57x_defconfig                |    1 -
>>>>        configs/clearfog_defconfig                    |    1 -
>>>>        configs/cm_t43_defconfig                      |    1 -
>>>>        configs/da850_am18xxevm_defconfig             |    1 +
>>>>        configs/da850evm_nand_defconfig               |    2 +-
>>>>        configs/db-88f6820-amc_defconfig              |    1 -
>>>>        configs/db-88f6820-gp_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                       |    1 -
>>>>        configs/ds414_defconfig                       |    1 -
>>>>        configs/evb-rv1108_defconfig                  |    1 -
>>>>        configs/gose_defconfig                        |    1 -
>>>>        configs/helios4_defconfig                     |    1 -
>>>>        configs/k2g_evm_defconfig                     |    1 -
>>>>        configs/k2g_hs_evm_defconfig                  |    1 -
>>>>        configs/koelsch_defconfig                     |    1 -
>>>>        configs/lager_defconfig                       |    1 -
>>>>        configs/maxbcm_defconfig                      |    1 -
>>>>        configs/mt7629_rfb_defconfig                  |    1 -
>>>>        configs/mx6sxsabreauto_defconfig              |    1 -
>>>>        configs/mx6sxsabresd_defconfig                |    1 -
>>>>        configs/mx6ul_14x14_evk_defconfig             |    1 -
>>>>        configs/mx6ul_9x9_evk_defconfig               |    1 -
>>>>        configs/mx6ull_14x14_evk_defconfig            |    1 -
>>>>        configs/mx6ull_14x14_evk_plugin_defconfig     |    1 -
>>>>        configs/mx7dsabresd_qspi_defconfig            |    1 -
>>>>        configs/porter_defconfig                      |    2 +-
>>>>        configs/r8a77970_eagle_defconfig              |    1 -
>>>>        configs/silk_defconfig                        |    1 -
>>>>        configs/socfpga_arria5_defconfig              |    1 -
>>>>        configs/socfpga_cyclone5_defconfig            |    1 -
>>>>        configs/socfpga_is1_defconfig                 |    1 -
>>>>        configs/socfpga_sockit_defconfig              |    1 -
>>>>        configs/socfpga_socrates_defconfig            |    1 -
>>>>        configs/socfpga_sr1500_defconfig              |    1 -
>>>>        configs/socfpga_stratix10_defconfig           |    1 -
>>>>        configs/stout_defconfig                       |    2 +-
>>>>        configs/taurus_defconfig                      |    3 +-
>>>>        configs/topic_miami_defconfig                 |    1 -
>>>>        configs/topic_miamilite_defconfig             |    2 -
>>>>        configs/topic_miamiplus_defconfig             |    2 -
>>>>        configs/turris_omnia_defconfig                |    2 +-
>>>>        configs/xilinx_versal_virt_defconfig          |    1 -
>>>>        configs/xilinx_zynqmp_mini_qspi_defconfig     |    2 -
>>>>        configs/xilinx_zynqmp_zc1232_revA_defconfig   |    2 -
>>>>        configs/xilinx_zynqmp_zc1254_revA_defconfig   |    2 -
>>>>        configs/xilinx_zynqmp_zc1275_revA_defconfig   |    2 -
>>>>        configs/xilinx_zynqmp_zc1275_revB_defconfig   |    2 -
>>>>        .../xilinx_zynqmp_zc1751_xm015_dc1_defconfig  |    1 -
>>>>        .../xilinx_zynqmp_zc1751_xm016_dc2_defconfig  |    1 -
>>>>        .../xilinx_zynqmp_zc1751_xm018_dc4_defconfig  |    1 -
>>>>        configs/xilinx_zynqmp_zcu100_revC_defconfig   |    1 -
>>>>        configs/xilinx_zynqmp_zcu102_rev1_0_defconfig |    1 -
>>>>        configs/xilinx_zynqmp_zcu102_revA_defconfig   |    1 -
>>>>        configs/xilinx_zynqmp_zcu102_revB_defconfig   |    1 -
>>>>        configs/xilinx_zynqmp_zcu104_revA_defconfig   |    2 -
>>>>        configs/xilinx_zynqmp_zcu104_revC_defconfig   |    2 -
>>>>        configs/xilinx_zynqmp_zcu106_revA_defconfig   |    2 -
>>>>        configs/xilinx_zynqmp_zcu111_revA_defconfig   |    1 -
>>>>        configs/zynq_cc108_defconfig                  |    1 -
>>>>        configs/zynq_cse_qspi_defconfig               |    1 -
>>>>        configs/zynq_dlc20_rev1_0_defconfig           |    1 -
>>>>        configs/zynq_microzed_defconfig               |    1 -
>>>>        configs/zynq_minized_defconfig                |    1 -
>>>>        configs/zynq_z_turn_defconfig                 |    1 -
>>>>        configs/zynq_zc702_defconfig                  |    1 -
>>>>        configs/zynq_zc706_defconfig                  |    1 -
>>>>        configs/zynq_zc770_xm010_defconfig            |    1 -
>>>>        configs/zynq_zc770_xm013_defconfig            |    1 -
>>>>        configs/zynq_zed_defconfig                    |    1 -
>>>>        configs/zynq_zybo_defconfig                   |    1 -
>>>>        configs/zynq_zybo_z7_defconfig                |    1 -
>>>>        doc/SPI/README.dual-flash                     |   92 -
>>>>        doc/SPI/README.ti_qspi_dra_test               |    1 -
>>>>        drivers/mtd/spi/Kconfig                       |   16 +-
>>>>        drivers/mtd/spi/Makefile                      |   12 +-
>>>>        drivers/mtd/spi/sandbox.c                     |   36 +-
>>>>        drivers/mtd/spi/sf_dataflash.c                |   11 +-
>>>>        drivers/mtd/spi/sf_internal.h                 |  225 +-
>>>>        drivers/mtd/spi/sf_probe.c                    |   33 +-
>>>>        drivers/mtd/spi/spi-nor-core.c                | 2432 +++++++++++++++++
>>>>        drivers/mtd/spi/spi-nor-ids.c                 |  297 ++
>>>>        drivers/mtd/spi/spi-nor-tiny.c                |  810 ++++++
>>>>        drivers/mtd/spi/spi_flash.c                   | 1337 ---------
>>>>        drivers/mtd/spi/spi_flash_ids.c               |  211 --
>>>>        drivers/spi/Kconfig                           |    9 +-
>>>>        drivers/spi/Makefile                          |    1 +
>>>>        drivers/spi/spi-mem-nodm.c                    |   89 +
>>>>        drivers/spi/spi-mem.c                         |    6 +
>>>>        drivers/spi/stm32_qspi.c                      |    4 +-
>>>>        include/configs/T102xQDS.h                    |    1 -
>>>>        include/configs/T102xRDB.h                    |    1 -
>>>>        include/configs/T104xRDB.h                    |    1 -
>>>>        include/configs/T208xQDS.h                    |    1 -
>>>>        include/configs/T208xRDB.h                    |    1 -
>>>>        include/configs/gw_ventana.h                  |    1 -
>>>>        include/configs/km/kmp204x-common.h           |    1 -
>>>>        include/configs/ls1021aiot.h                  |    1 -
>>>>        include/configs/socfpga_stratix10_socdk.h     |    1 -
>>>>        include/linux/mtd/cfi.h                       |   32 +
>>>>        include/linux/mtd/spi-nor.h                   |  419 +++
>>>>        include/spi_flash.h                           |  105 +-
>>>>        120 files changed, 4266 insertions(+), 2058 deletions(-)
>>>>        delete mode 100644 doc/SPI/README.dual-flash
>>>>        create mode 100644 drivers/mtd/spi/spi-nor-core.c
>>>>        create mode 100644 drivers/mtd/spi/spi-nor-ids.c
>>>>        create mode 100644 drivers/mtd/spi/spi-nor-tiny.c
>>>>        delete mode 100644 drivers/mtd/spi/spi_flash.c
>>>>        delete mode 100644 drivers/mtd/spi/spi_flash_ids.c
>>>>        create mode 100644 drivers/spi/spi-mem-nodm.c
>>>>        create mode 100644 include/linux/mtd/cfi.h
>>>>        create mode 100644 include/linux/mtd/spi-nor.h
>>>>
>>>>       --
>>>>       2.20.1
>>>>
>>>
>>
> 

-- 
Regards
Vignesh

  reply	other threads:[~2019-01-09  9:26 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-21  6:38 [U-Boot] [PATCH v2 00/11] SF: Migrate to Linux SPI NOR framework Vignesh R
2018-12-21  6:38 ` [U-Boot] [PATCH v2 01/11] spi-mem: Claim SPI bus before spi mem access Vignesh R
2019-01-28  6:54   ` Jagan Teki
2019-01-28  9:44     ` Vignesh R
2018-12-21  6:38 ` [U-Boot] [PATCH v2 02/11] spi: Add non DM version of SPI_MEM Vignesh R
2018-12-21  6:38 ` [U-Boot] [PATCH v2 03/11] sh: bitops: add hweight*() macros Vignesh R
2018-12-21  6:38 ` [U-Boot] [PATCH v2 04/11] mtd: spi: Port SPI NOR framework from Linux Vignesh R
2019-01-27 18:48   ` Jagan Teki
2019-01-28 11:43     ` Vignesh R
2018-12-21  6:38 ` [U-Boot] [PATCH v2 05/11] mtd: spi: Switch to new SPI NOR framework Vignesh R
2018-12-21  6:38 ` [U-Boot] [PATCH v2 06/11] mtd: spi: Remove unused files Vignesh R
2018-12-21  6:38 ` [U-Boot] [PATCH v2 07/11] mtd: spi: Add lightweight SPI flash stack for SPL Vignesh R
2018-12-21  6:38 ` [U-Boot] [PATCH v2 08/11] configs: Enable SPI_FLASH_TINY for resource constrained boards Vignesh R
2018-12-21  6:38 ` [U-Boot] [PATCH v2 09/11] configs: Remove SF_DUAL_FLASH Vignesh R
2019-01-25 14:47   ` Jagan Teki
2019-01-25 15:01     ` Vignesh R
2019-01-28  6:36       ` Jagan Teki
2018-12-21  6:38 ` [U-Boot] [PATCH v2 10/11] configs: Don't use SPI_FLASH_BAR as default Vignesh R
2018-12-21  6:38 ` [U-Boot] [PATCH v2 11/11] MAINTAINERS: Add an entry for SPI NOR Vignesh R
2018-12-21  7:26 ` [U-Boot] [PATCH v2 00/11] SF: Migrate to Linux SPI NOR framework Stefan Roese
2018-12-21 10:33 ` Simon Goldschmidt
2018-12-21 11:11   ` Vignesh R
2018-12-21 13:29     ` Simon Goldschmidt
2018-12-22  7:43       ` Simon Goldschmidt
2019-01-09  9:26         ` Vignesh R [this message]
2019-01-14 15:02 ` Vignesh R
2019-01-14 15:05   ` Tom Rini
2019-01-21 11:58   ` Vignesh R
2019-01-21 12:10     ` Jagan Teki
2019-01-21 14:47       ` Vignesh R
2019-01-21 17:08         ` Tom Rini
2019-01-22  6:25           ` Stefan Roese
2019-01-21 17:14 ` Horatiu Vultur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=693ec92f-5bb6-aa83-30cd-877c9fa74117@ti.com \
    --to=vigneshr@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.