Re: [PATCH] mtd: spi-nor: stm32: remove the driver as it was replaced by spi-stm32-qspi.c

2019-06-06 Thread Tudor.Ambarus


On 05/07/2019 12:16 PM, Ludovic Barre wrote:
> From: Ludovic Barre 
> 
> There's a new driver using the SPI memory interface of the
> SPI framework at spi/spi-stm32-qspi.c, which can be used
> together with m25p80.c to replace the functionality of
> this SPI NOR driver.
> 
> The "new" driver uses the same dt properties and not affects
> the legacy compatibility.
> 
> Signed-off-by: Ludovic Barre 
> ---
>  .../devicetree/bindings/mtd/stm32-quadspi.txt  |  43 --
>  drivers/mtd/spi-nor/Kconfig|   7 -
>  drivers/mtd/spi-nor/Makefile   |   1 -
>  drivers/mtd/spi-nor/stm32-quadspi.c| 720 
> -
>  4 files changed, 771 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mtd/stm32-quadspi.txt
>  delete mode 100644 drivers/mtd/spi-nor/stm32-quadspi.c

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git,
spi-nor/next branch.

Thanks,
ta


[PATCH] mtd: spi-nor: stm32: remove the driver as it was replaced by spi-stm32-qspi.c

2019-05-07 Thread Ludovic Barre
From: Ludovic Barre 

There's a new driver using the SPI memory interface of the
SPI framework at spi/spi-stm32-qspi.c, which can be used
together with m25p80.c to replace the functionality of
this SPI NOR driver.

The "new" driver uses the same dt properties and not affects
the legacy compatibility.

Signed-off-by: Ludovic Barre 
---
 .../devicetree/bindings/mtd/stm32-quadspi.txt  |  43 --
 drivers/mtd/spi-nor/Kconfig|   7 -
 drivers/mtd/spi-nor/Makefile   |   1 -
 drivers/mtd/spi-nor/stm32-quadspi.c| 720 -
 4 files changed, 771 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mtd/stm32-quadspi.txt
 delete mode 100644 drivers/mtd/spi-nor/stm32-quadspi.c

diff --git a/Documentation/devicetree/bindings/mtd/stm32-quadspi.txt 
b/Documentation/devicetree/bindings/mtd/stm32-quadspi.txt
deleted file mode 100644
index ddd18c1..000
--- a/Documentation/devicetree/bindings/mtd/stm32-quadspi.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-* STMicroelectronics Quad Serial Peripheral Interface(QuadSPI)
-
-Required properties:
-- compatible: should be "st,stm32f469-qspi"
-- reg: the first contains the register location and length.
-   the second contains the memory mapping address and length
-- reg-names: should contain the reg names "qspi" "qspi_mm"
-- interrupts: should contain the interrupt for the device
-- clocks: the phandle of the clock needed by the QSPI controller
-- A pinctrl must be defined to set pins in mode of operation for QSPI transfer
-
-Optional properties:
-- resets: must contain the phandle to the reset controller.
-
-A spi flash must be a child of the nor_flash node and could have some
-properties. Also see jedec,spi-nor.txt.
-
-Required properties:
-- reg: chip-Select number (QSPI controller may connect 2 nor flashes)
-- spi-max-frequency: max frequency of spi bus
-
-Optional property:
-- spi-rx-bus-width: see ../spi/spi-bus.txt for the description
-
-Example:
-
-qspi: spi@a0001000 {
-   compatible = "st,stm32f469-qspi";
-   reg = <0xa0001000 0x1000>, <0x9000 0x1000>;
-   reg-names = "qspi", "qspi_mm";
-   interrupts = <91>;
-   resets = < STM32F4_AHB3_RESET(QSPI)>;
-   clocks = < 0 STM32F4_AHB3_CLOCK(QSPI)>;
-   pinctrl-names = "default";
-   pinctrl-0 = <_qspi0>;
-
-   flash@0 {
-   reg = <0>;
-   spi-rx-bus-width = <4>;
-   spi-max-frequency = <10800>;
-   ...
-   };
-};
diff --git a/drivers/mtd/spi-nor/Kconfig b/drivers/mtd/spi-nor/Kconfig
index dab9866..54b5da0 100644
--- a/drivers/mtd/spi-nor/Kconfig
+++ b/drivers/mtd/spi-nor/Kconfig
@@ -104,11 +104,4 @@ config SPI_INTEL_SPI_PLATFORM
  To compile this driver as a module, choose M here: the module
  will be called intel-spi-platform.
 
-config SPI_STM32_QUADSPI
-   tristate "STM32 Quad SPI controller"
-   depends on ARCH_STM32 || COMPILE_TEST
-   help
- This enables support for the STM32 Quad SPI controller.
- We only connect the NOR to this controller.
-
 endif # MTD_SPI_NOR
diff --git a/drivers/mtd/spi-nor/Makefile b/drivers/mtd/spi-nor/Makefile
index 189a15c..9c5ed03 100644
--- a/drivers/mtd/spi-nor/Makefile
+++ b/drivers/mtd/spi-nor/Makefile
@@ -8,4 +8,3 @@ obj-$(CONFIG_SPI_NXP_SPIFI) += nxp-spifi.o
 obj-$(CONFIG_SPI_INTEL_SPI)+= intel-spi.o
 obj-$(CONFIG_SPI_INTEL_SPI_PCI)+= intel-spi-pci.o
 obj-$(CONFIG_SPI_INTEL_SPI_PLATFORM)   += intel-spi-platform.o
-obj-$(CONFIG_SPI_STM32_QUADSPI)+= stm32-quadspi.o
diff --git a/drivers/mtd/spi-nor/stm32-quadspi.c 
b/drivers/mtd/spi-nor/stm32-quadspi.c
deleted file mode 100644
index 13e9fc9..000
--- a/drivers/mtd/spi-nor/stm32-quadspi.c
+++ /dev/null
@@ -1,720 +0,0 @@
-/*
- * Driver for stm32 quadspi controller
- *
- * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
- * Author(s): Ludovic Barre author .
- *
- * License terms: GPL V2.0.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by
- * the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 
more
- * details.
- *
- * You should have received a copy of the GNU General Public License along with
- * This program. If not, see .
- */
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#define QUADSPI_CR 0x00
-#define CR_EN  BIT(0)
-#define CR_ABORT   BIT(1)
-#define CR_DMAEN   BIT(2)
-#define CR_TCENBIT(3)
-#define CR_SSHIFT