From 5c1a87de58092b5a17c20b6debfccaa6cf677fde Mon Sep 17 00:00:00 2001 From: Stefan Mavrodiev Date: Wed, 5 Dec 2018 14:27:57 +0200 Subject: [PATCH 1/4] spi: sun4i: Add rx_buf NULL pointer check Current driver doesn't check if the destination pointer is NULL. This cause the data from the FIFO to be stored inside the internal SDRAM ( address 0 ). The patch add simple check if the destination pointer is NULL. Signed-off-by: Stefan Mavrodiev Acked-by: Jagan Teki [jagan: fix commit message] Signed-off-by: Jagan Teki --- drivers/spi/sun4i_spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/sun4i_spi.c b/drivers/spi/sun4i_spi.c index b86b5a00ad..38cc743c61 100644 --- a/drivers/spi/sun4i_spi.c +++ b/drivers/spi/sun4i_spi.c @@ -129,7 +129,8 @@ static inline void sun4i_spi_drain_fifo(struct sun4i_spi_priv *priv, int len) while (len--) { byte = readb(&priv->regs->rxdata); - *priv->rx_buf++ = byte; + if (priv->rx_buf) + *priv->rx_buf++ = byte; } } From cdf72c188c62b8ac20e5a2e1abbd45bc721e2ff9 Mon Sep 17 00:00:00 2001 From: Nikolai Zhubr Date: Wed, 2 Jan 2019 00:56:13 +0530 Subject: [PATCH 2/4] mtd: nand: raw: Add Hynix H27UBG8T2BTR id table This patch adds Hynix H27UBG8T2BTR id table as part of raw nand, these chips were available in some A20-olinuxino-micro boards. Signed-off-by: Nikolai Zhubr [jagan: add proper commit message] Signed-off-by: Jagan Teki --- drivers/mtd/nand/raw/nand_ids.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/mtd/nand/raw/nand_ids.c b/drivers/mtd/nand/raw/nand_ids.c index 4009d64123..3104f879f6 100644 --- a/drivers/mtd/nand/raw/nand_ids.c +++ b/drivers/mtd/nand/raw/nand_ids.c @@ -61,6 +61,10 @@ struct nand_flash_dev nand_flash_ids[] = { {"SDTNRGAMA 64G 3.3V 8-bit", { .id = {0x45, 0xde, 0x94, 0x93, 0x76, 0x50} }, SZ_16K, SZ_8K, SZ_4M, 0, 6, 1280, NAND_ECC_INFO(40, SZ_1K) }, + {"H27UBG8T2BTR-BC 32G 3.3V 8-bit", + { .id = {0xad, 0xd7, 0x94, 0xda, 0x74, 0xc3} }, + SZ_8K, SZ_4K, SZ_2M, NAND_NEED_SCRAMBLING, 6, 640, + NAND_ECC_INFO(40, SZ_1K), 0 }, {"H27UCG8T2ATR-BC 64G 3.3V 8-bit", { .id = {0xad, 0xde, 0x94, 0xda, 0x74, 0xc4} }, SZ_8K, SZ_8K, SZ_2M, NAND_NEED_SCRAMBLING, 6, 640, From 99a17dd53d685ebe1c092830aa89915132f86195 Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Fri, 14 Dec 2018 22:04:12 +0530 Subject: [PATCH 3/4] dm: MIGRATION: Update migration plan for SPI - v2019.04 for no dm conversion drivers - v2019.07 for partially converted drivers. Note: there were many updates on this deadline, so better not update this again. Signed-off-by: Jagan Teki --- Makefile | 11 +++++++++++ doc/driver-model/MIGRATION.txt | 10 +++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a8461dd611..c4d827f259 100644 --- a/Makefile +++ b/Makefile @@ -953,6 +953,17 @@ ifeq ($(CONFIG_OF_EMBED),y) @echo >&2 "CONFIG_OF_SEPARATE for boards in mainline." @echo >&2 "See doc/README.fdt-control for more info." @echo >&2 "====================================================" +endif +ifeq ($(CONFIG_SPI),y) +ifneq ($(CONFIG_DM_SPI)$(CONFIG_OF_CONTROL),yy) + @echo >&2 "===================== WARNING ======================" + @echo >&2 "This board does not use CONFIG_DM_SPI. Please update" + @echo >&2 "the board before v2019.04 for no dm conversion" + @echo >&2 "and v2019.07 for partially dm converted drivers." + @echo >&2 "Failure to update can lead to driver/board removal" + @echo >&2 "See doc/driver-model/MIGRATION.txt for more info." + @echo >&2 "====================================================" +endif endif @# Check that this build does not use CONFIG options that we do not @# know about unless they are in Kconfig. All the existing CONFIG diff --git a/doc/driver-model/MIGRATION.txt b/doc/driver-model/MIGRATION.txt index dce4aa3e1d..183d7f5293 100644 --- a/doc/driver-model/MIGRATION.txt +++ b/doc/driver-model/MIGRATION.txt @@ -55,9 +55,6 @@ CONFIG_DM_SPI_FLASH Board Maintainers should submit the patches for enabling DM_SPI and DM_SPI_FLASH to move the migration with in the deadline. -Status: In progress -Deadline: 2018.09 - No dm conversion yet: drivers/spi/cf_spi.c drivers/spi/fsl_espi.c @@ -69,6 +66,9 @@ No dm conversion yet: drivers/spi/sh_spi.c drivers/spi/soft_spi_legacy.c + Status: In progress + Deadline: 2019.04 + Partially converted: drivers/spi/atcspi200_spi.c drivers/spi/davinci_spi.c @@ -79,6 +79,10 @@ Partially converted: drivers/spi/omap3_spi.c drivers/spi/ti_qspi.c + Status: In progress + Deadline: 2019.07 + -- Jagan Teki +12/24/2018 03/14/2018 From 689795242b1cb7de5a3d8c8bf1a9582a8924ff69 Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Mon, 24 Dec 2018 03:22:25 +0530 Subject: [PATCH 4/4] dm: MIGRATION: Update migration plan for DM_SPI_FLASH Migration plan for DM_SPI_FLASH is v2019.07 since it depends on DM_SPI migration. Signed-off-by: Jagan Teki --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index c4d827f259..3e926d839f 100644 --- a/Makefile +++ b/Makefile @@ -964,6 +964,16 @@ ifneq ($(CONFIG_DM_SPI)$(CONFIG_OF_CONTROL),yy) @echo >&2 "See doc/driver-model/MIGRATION.txt for more info." @echo >&2 "====================================================" endif +endif +ifeq ($(CONFIG_SPI_FLASH),y) +ifneq ($(CONFIG_DM_SPI_FLASH)$(CONFIG_OF_CONTROL),yy) + @echo >&2 "===================== WARNING ======================" + @echo >&2 "This board does not use CONFIG_DM_SPI_FLASH. Please update" + @echo >&2 "the board to use CONFIG_SPI_FLASH before the v2019.07 release." + @echo >&2 "Failure to update by the deadline may result in board removal." + @echo >&2 "See doc/driver-model/MIGRATION.txt for more info." + @echo >&2 "====================================================" +endif endif @# Check that this build does not use CONFIG options that we do not @# know about unless they are in Kconfig. All the existing CONFIG