Skip to contentSkip to conversation

at91: Add boards with OF_CONTROL/DM/DM_SPI

PATCH New Jagan Teki 3 participants 37 messages Mar 14, 2018 – Apr 7, 2018

Subsystems (4)
lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

cover at91: Add boards with OF_CONTROL/DM/DM_SPI

This series add support for missing at91 board with
- OF_CONTROL
- DM
- DM_SPI
- Drop non-dm code from atmel_spi

Boards like taurus, vinco and ma5d4evk need move GPIO code into drivers instead of configuring them in board file. request to board maintainers to do this job.

Jagan Teki (14):
spi: atmel: Add ifdef for DM_GPIO code
at91: gurnard: Enable DM_SPI
configs: gurnard: Move CONFIG_ATMEL_SPI to defconfigs
at91: taurus: Enable DM_SPI
at91: vinco: Enable DM
at91: vinco: Add FDT support
at91: vinco: Enable DM_SPI
at91: ma5d4evk: Enable DM
at91: ma5d4evk: Add FDT support
at91: ma5d4evk: Enable DM_SPI
at91: ma5d4evk: Enable SPL_DM and SPL_OF_CONTROL
spi: atmel: Drop non-dm code
spi: atmel: Drop atmel_spi.h
spi: atmel: default y if DM_SPI && ARCH_AT91

 arch/arm/dts/Makefile                          |   6 +
 arch/arm/dts/at91-sama5d4_ma5d4.dtsi           | 142 +++++++++++
 arch/arm/dts/at91-sama5d4_ma5d4evk.dts         | 149 ++++++++++++
 arch/arm/dts/at91-vinco.dts                    | 246 +++++++++++++++++++
 arch/arm/mach-at91/Kconfig                     |   6 +
 board/aries/ma5d4evk/ma5d4evk.c                |   9 +-
 board/bluewater/gurnard/gurnard.c              |  20 --
 board/l+g/vinco/vinco.c                        |   5 +-
 board/siemens/taurus/taurus.c                  |   3 +
 configs/at91sam9260ek_dataflash_cs0_defconfig  |   1 -
 configs/at91sam9260ek_dataflash_cs1_defconfig  |   1 -
 configs/at91sam9260ek_nandflash_defconfig      |   1 -
 configs/at91sam9261ek_dataflash_cs0_defconfig  |   1 -
 configs/at91sam9261ek_dataflash_cs3_defconfig  |   1 -
 configs/at91sam9261ek_nandflash_defconfig      |   1 -
 configs/at91sam9263ek_dataflash_cs0_defconfig  |   1 -
 configs/at91sam9263ek_dataflash_defconfig      |   1 -
 configs/at91sam9263ek_nandflash_defconfig      |   1 -
 configs/at91sam9263ek_norflash_boot_defconfig  |   1 -
 configs/at91sam9263ek_norflash_defconfig       |   1 -
 configs/at91sam9g10ek_dataflash_cs0_defconfig  |   1 -
 configs/at91sam9g10ek_dataflash_cs3_defconfig  |   1 -
 configs/at91sam9g10ek_nandflash_defconfig      |   1 -
 configs/at91sam9g20ek_2mmc_defconfig           |   1 -
 configs/at91sam9g20ek_2mmc_nandflash_defconfig |   1 -
 configs/at91sam9g20ek_dataflash_cs0_defconfig  |   1 -
 configs/at91sam9g20ek_dataflash_cs1_defconfig  |   1 -
 configs/at91sam9g20ek_nandflash_defconfig      |   1 -
 configs/at91sam9n12ek_mmc_defconfig            |   1 -
 configs/at91sam9n12ek_nandflash_defconfig      |   1 -
 configs/at91sam9n12ek_spiflash_defconfig       |   1 -
 configs/at91sam9rlek_dataflash_defconfig       |   1 -
 configs/at91sam9rlek_mmc_defconfig             |   1 -
 configs/at91sam9rlek_nandflash_defconfig       |   1 -
 configs/at91sam9x5ek_dataflash_defconfig       |   1 -
 configs/at91sam9x5ek_mmc_defconfig             |   1 -
 configs/at91sam9x5ek_nandflash_defconfig       |   1 -
 configs/at91sam9x5ek_spiflash_defconfig        |   1 -
 configs/at91sam9xeek_dataflash_cs0_defconfig   |   1 -
 configs/at91sam9xeek_dataflash_cs1_defconfig   |   1 -
 configs/at91sam9xeek_nandflash_defconfig       |   1 -
 configs/ethernut5_defconfig                    |   1 -
 configs/ma5d4evk_defconfig                     |   4 +
 configs/meesc_dataflash_defconfig              |   1 -
 configs/meesc_defconfig                        |   1 -
 configs/pm9261_defconfig                       |   1 -
 configs/pm9263_defconfig                       |   1 -
 configs/sama5d27_som1_ek_mmc_defconfig         |   1 -
 configs/sama5d2_xplained_mmc_defconfig         |   1 -
 configs/sama5d2_xplained_spiflash_defconfig    |   1 -
 configs/sama5d36ek_cmp_mmc_defconfig           |   1 -
 configs/sama5d36ek_cmp_nandflash_defconfig     |   1 -
 configs/sama5d36ek_cmp_spiflash_defconfig      |   1 -
 configs/sama5d3xek_mmc_defconfig               |   1 -
 configs/sama5d3xek_nandflash_defconfig         |   1 -
 configs/sama5d3xek_spiflash_defconfig          |   1 -
 configs/sama5d4_xplained_mmc_defconfig         |   1 -
 configs/sama5d4_xplained_nandflash_defconfig   |   1 -
 configs/sama5d4_xplained_spiflash_defconfig    |   1 -
 configs/sama5d4ek_mmc_defconfig                |   1 -
 configs/sama5d4ek_nandflash_defconfig          |   1 -
 configs/sama5d4ek_spiflash_defconfig           |   1 -
 configs/usb_a9263_dataflash_defconfig          |   1 -
 configs/vinco_defconfig                        |   2 +
 drivers/spi/Kconfig                            |   2 +-
 drivers/spi/atmel_spi.c                        | 312 ++++++++-----------------
 drivers/spi/atmel_spi.h                        | 100 --------
 include/configs/ma5d4evk.h                     |   2 -
 include/configs/snapper9g45.h                  |   2 -
 include/configs/taurus.h                       |   1 -
 include/configs/vinco.h                        |   2 -
 scripts/config_whitelist.txt                   |   1 -
 72 files changed, 667 insertions(+), 400 deletions(-)
 create mode 100644 arch/arm/dts/at91-sama5d4_ma5d4.dtsi
 create mode 100644 arch/arm/dts/at91-sama5d4_ma5d4evk.dts
 create mode 100644 arch/arm/dts/at91-vinco.dts
 delete mode 100644 drivers/spi/atmel_spi.h
Signature · 1 line
2.14.3
author
#1 lore raw

PATCH 1/14 spi: atmel: Add ifdef for DM_GPIO code

Few boards are configuring gpio directly from board instead using drivers/gpio so add ifdef for DM_GPIO to compatible for both the cases.

---
 drivers/spi/atmel_spi.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/spi/atmel_spi.c +12 -2
index 8010ab434c..3cdfd366ab 100644
@@ -236,7 +236,9 @@ struct atmel_spi_priv {
 	unsigned int freq;		/* Default frequency */
 	unsigned int mode;
 	ulong bus_clk_rate;
+#ifdef CONFIG_DM_GPIO
 	struct gpio_desc cs_gpios[MAX_CS_COUNT];
+#endif
 };
 
 static int atmel_spi_claim_bus(struct udevice *dev)
@@ -291,6 +293,7 @@ static int atmel_spi_release_bus(struct udevice *dev)
 
 static void atmel_spi_cs_activate(struct udevice *dev)
 {
+#ifdef CONFIG_DM_GPIO
 	struct udevice *bus = dev_get_parent(dev);
 	struct atmel_spi_priv *priv = dev_get_priv(bus);
 	struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
@@ -300,10 +303,12 @@ static void atmel_spi_cs_activate(struct udevice *dev)
 		return;
 
 	dm_gpio_set_value(&priv->cs_gpios[cs], 0);
+#endif
 }
 
 static void atmel_spi_cs_deactivate(struct udevice *dev)
 {
+#ifdef CONFIG_DM_GPIO
 	struct udevice *bus = dev_get_parent(dev);
 	struct atmel_spi_priv *priv = dev_get_priv(bus);
 	struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
@@ -313,6 +318,7 @@ static void atmel_spi_cs_deactivate(struct udevice *dev)
 		return;
 
 	dm_gpio_set_value(&priv->cs_gpios[cs], 1);
+#endif
 }
 
 static int atmel_spi_xfer(struct udevice *dev, unsigned int bitlen,
@@ -462,8 +468,7 @@ static int atmel_spi_enable_clk(struct udevice *bus)
 static int atmel_spi_probe(struct udevice *bus)
 {
 	struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus);
-	struct atmel_spi_priv *priv = dev_get_priv(bus);
-	int i, ret;
+	int ret;
 
 	ret = atmel_spi_enable_clk(bus);
 	if (ret)
@@ -471,6 +476,10 @@ static int atmel_spi_probe(struct udevice *bus)
 
 	bus_plat->regs = (struct at91_spi *)devfdt_get_addr(bus);
 
+#ifdef CONFIG_DM_GPIO
+	struct atmel_spi_priv *priv = dev_get_priv(bus);
+	int i;
+
 	ret = gpio_request_list_by_name(bus, "cs-gpios", priv->cs_gpios,
 					ARRAY_SIZE(priv->cs_gpios), 0);
 	if (ret < 0) {
@@ -485,6 +494,7 @@ static int atmel_spi_probe(struct udevice *bus)
 		dm_gpio_set_dir_flags(&priv->cs_gpios[i],
 				      GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE);
 	}
+#endif
 
 	writel(ATMEL_SPI_CR_SWRST, &bus_plat->regs->cr);
 
Signature · 1 line
2.14.3
#2 lore raw

PATCH 1/14 spi: atmel: Add ifdef for DM_GPIO code

Quoted 5 lines · Jagan Teki

Few boards are configuring gpio directly from board instead using drivers/gpio so add ifdef for DM_GPIO to compatible for both the cases.

It is okay for me.

Quoted 76 lines
---
  drivers/spi/atmel_spi.c | 14 ++++++++++++--
  1 file changed, 12 insertions(+), 2 deletions(-)
drivers/spi/atmel_spi.c +12 -2
index 8010ab434c..3cdfd366ab 100644
@@ -236,7 +236,9 @@ struct atmel_spi_priv {
  	unsigned int freq;		/* Default frequency */
  	unsigned int mode;
  	ulong bus_clk_rate;
+#ifdef CONFIG_DM_GPIO
  	struct gpio_desc cs_gpios[MAX_CS_COUNT];
+#endif
  };
 
  static int atmel_spi_claim_bus(struct udevice *dev)
@@ -291,6 +293,7 @@ static int atmel_spi_release_bus(struct udevice *dev)
 
  static void atmel_spi_cs_activate(struct udevice *dev)
  {
+#ifdef CONFIG_DM_GPIO
  	struct udevice *bus = dev_get_parent(dev);
  	struct atmel_spi_priv *priv = dev_get_priv(bus);
  	struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
@@ -300,10 +303,12 @@ static void atmel_spi_cs_activate(struct udevice *dev)
  		return;
 
  	dm_gpio_set_value(&priv->cs_gpios[cs], 0);
+#endif
  }
 
  static void atmel_spi_cs_deactivate(struct udevice *dev)
  {
+#ifdef CONFIG_DM_GPIO
  	struct udevice *bus = dev_get_parent(dev);
  	struct atmel_spi_priv *priv = dev_get_priv(bus);
  	struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
@@ -313,6 +318,7 @@ static void atmel_spi_cs_deactivate(struct udevice *dev)
  		return;
 
  	dm_gpio_set_value(&priv->cs_gpios[cs], 1);
+#endif
  }
 
  static int atmel_spi_xfer(struct udevice *dev, unsigned int bitlen,
@@ -462,8 +468,7 @@ static int atmel_spi_enable_clk(struct udevice *bus)
  static int atmel_spi_probe(struct udevice *bus)
  {
  	struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus);
-	struct atmel_spi_priv *priv = dev_get_priv(bus);
-	int i, ret;
+	int ret;
 
  	ret = atmel_spi_enable_clk(bus);
  	if (ret)
@@ -471,6 +476,10 @@ static int atmel_spi_probe(struct udevice *bus)
 
  	bus_plat->regs = (struct at91_spi *)devfdt_get_addr(bus);
 
+#ifdef CONFIG_DM_GPIO
+	struct atmel_spi_priv *priv = dev_get_priv(bus);
+	int i;
+
  	ret = gpio_request_list_by_name(bus, "cs-gpios", priv->cs_gpios,
  					ARRAY_SIZE(priv->cs_gpios), 0);
  	if (ret < 0) {
@@ -485,6 +494,7 @@ static int atmel_spi_probe(struct udevice *bus)
  		dm_gpio_set_dir_flags(&priv->cs_gpios[i],
  				      GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE);
  	}
+#endif
 
  	writel(ATMEL_SPI_CR_SWRST, &bus_plat->regs->cr);
 
#3 lore raw

PATCH 1/14 spi: atmel: Add ifdef for DM_GPIO code

In reply to Jagan Teki
Quoted 6 lines · Jagan Teki

Few boards are configuring gpio directly from board instead using drivers/gpio so add ifdef for DM_GPIO to compatible for both the cases.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/b2ed72ca/attachment.sig>
author
#4 lore raw

PATCH 2/14 at91: gurnard: Enable DM_SPI

In reply to Jagan Teki

Enable DM_SPI for atmel SPI driver on gurnard board.

---
 arch/arm/mach-at91/Kconfig        |  1 +
 board/bluewater/gurnard/gurnard.c | 20 --------------------
 2 files changed, 1 insertion(+), 20 deletions(-)
arch/arm/mach-at91/Kconfig +1 -0
index 6907263539..d73adf3723 100644
@@ -85,6 +85,7 @@ config TARGET_GURNARD
 	select BOARD_LATE_INIT
 	select DM
 	select DM_SERIAL
+	select DM_SPI
 	select DM_GPIO
 	select DM_ETH
 
board/bluewater/gurnard/gurnard.c +0 -20
index 8733a9af16..d8e92b1196 100644
@@ -18,7 +18,6 @@
 #ifndef CONFIG_DM_ETH
 #include <netdev.h>
 #endif
-#include <spi.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/mach-types.h>
@@ -415,25 +414,6 @@ void reset_phy(void)
 {
 }
 
-/* SPI chip select control - only used for FPGA programming */
-#ifdef CONFIG_ATMEL_SPI
-
-int spi_cs_is_valid(unsigned int bus, unsigned int cs)
-{
-	return bus == 0 && cs == 0;
-}
-
-void spi_cs_activate(struct spi_slave *slave)
-{
-	/* We don't use chipselects for FPGA programming */
-}
-
-void spi_cs_deactivate(struct spi_slave *slave)
-{
-	/* We don't use chipselects for FPGA programming */
-}
-#endif /* CONFIG_ATMEL_SPI */
-
 static struct atmel_serial_platdata at91sam9260_serial_plat = {
 	.base_addr = ATMEL_BASE_DBGU,
 };
Signature · 1 line
2.14.3
#5 lore raw

PATCH 2/14 at91: gurnard: Enable DM_SPI

Quoted 4 lines · Jagan Teki

Enable DM_SPI for atmel SPI driver on gurnard board.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/730811ff/attachment.sig>
author
#6 lore raw

PATCH 3/14 configs: gurnard: Move CONFIG_ATMEL_SPI to defconfigs

In reply to Jagan Teki

Now CONFIG_ATMEL_SPI is defined in Kconfig, so move the same into defconfig file.

---
 configs/gurnard_defconfig     | 1 +
 include/configs/snapper9g45.h | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)
configs/gurnard_defconfig +1 -0
index 95ccbdefea..ce51a0348f 100644
@@ -27,6 +27,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_BOOTP_BOOTPATH=y
 CONFIG_BOOTP_GATEWAY=y
 CONFIG_BOOTP_HOSTNAME=y
+CONFIG_ATMEL_SPI=y
 CONFIG_PHYLIB=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
include/configs/snapper9g45.h +0 -2
index a3b1773059..0da3b3b055 100644
@@ -64,8 +64,6 @@
 #define CONFIG_ATMEL_LCD
 #define CONFIG_GURNARD_SPLASH
 
-#define CONFIG_ATMEL_SPI
-
 /* GPIOs and IO expander */
 #define CONFIG_ATMEL_LEGACY
 #define CONFIG_AT91_GPIO
Signature · 1 line
2.14.3
#7 lore raw

PATCH 3/14 configs: gurnard: Move CONFIG_ATMEL_SPI to defconfigs

Quoted 5 lines · Jagan Teki

Now CONFIG_ATMEL_SPI is defined in Kconfig, so move the same into defconfig file.

Quoted 30 lines
---
  configs/gurnard_defconfig     | 1 +
  include/configs/snapper9g45.h | 2 --
  2 files changed, 1 insertion(+), 2 deletions(-)
configs/gurnard_defconfig +1 -0
index 95ccbdefea..ce51a0348f 100644
@@ -27,6 +27,7 @@ CONFIG_ENV_IS_IN_NAND=y
  CONFIG_BOOTP_BOOTPATH=y
  CONFIG_BOOTP_GATEWAY=y
  CONFIG_BOOTP_HOSTNAME=y
+CONFIG_ATMEL_SPI=y
  CONFIG_PHYLIB=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
include/configs/snapper9g45.h +0 -2
index a3b1773059..0da3b3b055 100644
@@ -64,8 +64,6 @@
  #define CONFIG_ATMEL_LCD
  #define CONFIG_GURNARD_SPLASH
 
-#define CONFIG_ATMEL_SPI
-
  /* GPIOs and IO expander */
  #define CONFIG_ATMEL_LEGACY
  #define CONFIG_AT91_GPIO
#8 lore raw

PATCH 3/14 configs: gurnard: Move CONFIG_ATMEL_SPI to defconfigs

In reply to Jagan Teki
Quoted 6 lines · Jagan Teki

Now CONFIG_ATMEL_SPI is defined in Kconfig, so move the same into defconfig file.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/e41a35d2/attachment.sig>
author
#9 lore raw

PATCH 4/14 at91: taurus: Enable DM_SPI

In reply to Jagan Teki

Enable DM_SPI for atmel SPI driver on taurus board.

Kept few functions related to non-dm and gpio on board files for reference and will be remove once code moved to relevant drivers.

Cc Heiko Schocher <[email protected]>
---
 arch/arm/mach-at91/Kconfig    | 1 +
 board/siemens/taurus/taurus.c | 3 +++
 2 files changed, 4 insertions(+)
arch/arm/mach-at91/Kconfig +1 -0
index d73adf3723..5de914a2eb 100644
@@ -220,6 +220,7 @@ config TARGET_TAURUS
 	select SUPPORT_SPL
 	select DM
 	select DM_SERIAL
+	select DM_SPI
 	select DM_GPIO
 	select DM_ETH
 
board/siemens/taurus/taurus.c +3 -0
index 71541ba3a4..3534b2a7bf 100644
@@ -283,6 +283,8 @@ int board_early_init_f(void)
 	return 0;
 }
 
+/* FIXME gpio code here need to handle through DM_GPIO */
+#ifndef CONFIG_DM_SPI
 int spi_cs_is_valid(unsigned int bus, unsigned int cs)
 {
 	return bus == 0 && cs == 0;
@@ -297,6 +299,7 @@ void spi_cs_deactivate(struct spi_slave *slave)
 {
 	at91_set_gpio_value(TAURUS_SPI_CS_PIN, 1);
 }
+#endif
 
 #ifdef CONFIG_USB_GADGET_AT91
 #include <linux/usb/at91_udc.h>
Signature · 1 line
2.14.3
#10 lore raw

PATCH 4/14 at91: taurus: Enable DM_SPI

Quoted 8 lines · Jagan Teki

Enable DM_SPI for atmel SPI driver on taurus board.

Kept few functions related to non-dm and gpio on board files for reference and will be remove once code moved to relevant drivers.

Cc Heiko Schocher <[email protected]>

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/8265eb2b/attachment.sig>
author
#11 lore raw

PATCH 5/14 at91: vinco: Enable DM

In reply to Jagan Teki

Enable Driver model for AT91 Vinco boards.

Cc Gregory CLEMENT <[email protected]>
---
 arch/arm/mach-at91/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-at91/Kconfig +1 -0
index 5de914a2eb..b9e6946f72 100644
@@ -237,6 +237,7 @@ config TARGET_VINCO
 	bool "Support VINCO"
 	select SAMA5D4
 	select SUPPORT_SPL
+	select DM
 
 config TARGET_WB45N
 	bool "Support Laird WB45N"
Signature · 1 line
2.14.3
#12 lore raw

PATCH 5/14 at91: vinco: Enable DM

Quoted 4 lines · Jagan Teki

Enable Driver model for AT91 Vinco boards.

Cc Gregory CLEMENT <[email protected]>

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/2fbf72d0/attachment.sig>
author
#13 lore raw

PATCH 6/14 at91: vinco: Add FDT support

In reply to Jagan Teki

Sync DTS from Linux and add FDT support for AT91 vinco board.

usb0, usb1, and usb2 nodes removed, since there is no support it.

Cc Gregory CLEMENT <[email protected]>
---
 arch/arm/dts/Makefile       |   3 +
 arch/arm/dts/at91-vinco.dts | 246 ++++++++++++++++++++++++++++++++++++++++++++
 configs/vinco_defconfig     |   2 +
 3 files changed, 251 insertions(+)
 create mode 100644 arch/arm/dts/at91-vinco.dts
arch/arm/dts/Makefile +3 -0
index 20a4c37d48..1dde68ec66 100644
@@ -484,6 +484,9 @@ dtb-$(CONFIG_TARGET_SAMA5D4EK) += \
 dtb-$(CONFIG_TARGET_SAMA5D4_XPLAINED) += \
 	at91-sama5d4_xplained.dtb
 
+dtb-$(CONFIG_TARGET_VINCO) += \
+	at91-vinco.dtb
+
 dtb-$(CONFIG_ARCH_BCM283X) += \
 	bcm2835-rpi-a-plus.dtb \
 	bcm2835-rpi-a.dtb \
arch/arm/dts/at91-vinco.dts new file +246 -0

246 lines not on this page · raw message

configs/vinco_defconfig +2 -0
index 0d8744108b..e8dad4468b 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_SYS_TEXT_BASE=0x20f00000
 CONFIG_TARGET_VINCO=y
+CONFIG_DEFAULT_DEVICE_TREE="at91-vinco"
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_SPI_BOOT=y
 CONFIG_BOOTDELAY=3
@@ -23,6 +24,7 @@ CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_BOOTP_BOOTPATH=y
 CONFIG_BOOTP_GATEWAY=y
Signature · 1 line
2.14.3
#14 lore raw

PATCH 6/14 at91: vinco: Add FDT support

Quoted 6 lines · Jagan Teki

Sync DTS from Linux and add FDT support for AT91 vinco board.

usb0, usb1, and usb2 nodes removed, since there is no support it.

Cc Gregory CLEMENT <[email protected]>

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/10985aaa/attachment.sig>
author
#15 lore raw

PATCH 7/14 at91: vinco: Enable DM_SPI

In reply to Jagan Teki

AT91 Vinco board uses atmel spi driver, enable DM_SPI to use dm functionality.

Cc Gregory CLEMENT <[email protected]>
---
 arch/arm/mach-at91/Kconfig | 1 +
 board/l+g/vinco/vinco.c    | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/mach-at91/Kconfig +1 -0
index b9e6946f72..17d60d0dbe 100644
@@ -238,6 +238,7 @@ config TARGET_VINCO
 	select SAMA5D4
 	select SUPPORT_SPL
 	select DM
+	select DM_SPI
 
 config TARGET_WB45N
 	bool "Support Laird WB45N"
board/l+g/vinco/vinco.c +3 -2
index a938a2c2e1..f427abf6c1 100644
@@ -33,7 +33,8 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#ifdef CONFIG_ATMEL_SPI
+/* FIXME gpio code here need to handle through DM_GPIO */
+#ifndef CONFIG_DM_SPI
 int spi_cs_is_valid(unsigned int bus, unsigned int cs)
 {
 	return bus == 0 && cs == 0;
@@ -166,7 +167,7 @@ int board_init(void)
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
-#ifdef CONFIG_ATMEL_SPI
+#ifndef CONFIG_DM_SPI
 	vinco_spi0_hw_init();
 #endif
 
Signature · 1 line
2.14.3
#16 lore raw

PATCH 7/14 at91: vinco: Enable DM_SPI

Quoted 5 lines · Jagan Teki

AT91 Vinco board uses atmel spi driver, enable DM_SPI to use dm functionality.

Cc Gregory CLEMENT <[email protected]>

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/19ca437c/attachment.sig>
author
#17 lore raw

PATCH 8/14 at91: ma5d4evk: Enable DM

In reply to Jagan Teki

Enable Driver model for AT91 ma5d4evk boards.

---
 arch/arm/mach-at91/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/mach-at91/Kconfig +1 -0
index 17d60d0dbe..4dfddcc287 100644
@@ -200,6 +200,7 @@ config TARGET_MA5D4EVK
 	bool "Aries MA5D4EVK Evaluation Kit"
 	select SAMA5D4
 	select SUPPORT_SPL
+	select DM
 
 config TARGET_MEESC
 	bool "Support meesc"
Signature · 1 line
2.14.3
#18 lore raw

PATCH 8/14 at91: ma5d4evk: Enable DM

Quoted 3 lines · Jagan Teki

Enable Driver model for AT91 ma5d4evk boards.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/1a4d3b89/attachment.sig>
author
#19 lore raw

PATCH 9/14 at91: ma5d4evk: Add FDT support

In reply to Jagan Teki

Sync DTS from Linux and add FDT support for AT91 ma5d4evk board.

usb0, usb1, usb2 and hlcdc_pwm nodes removed, since there is no support it.

---
 arch/arm/dts/Makefile                  |   3 +
 arch/arm/dts/at91-sama5d4_ma5d4.dtsi   | 142 +++++++++++++++++++++++++++++++
 arch/arm/dts/at91-sama5d4_ma5d4evk.dts | 149 +++++++++++++++++++++++++++++++++
 configs/ma5d4evk_defconfig             |   2 +
 4 files changed, 296 insertions(+)
 create mode 100644 arch/arm/dts/at91-sama5d4_ma5d4.dtsi
 create mode 100644 arch/arm/dts/at91-sama5d4_ma5d4evk.dts
arch/arm/dts/Makefile +3 -0
index 1dde68ec66..af1f84306a 100644
@@ -478,6 +478,9 @@ dtb-$(CONFIG_TARGET_SAMA5D3XEK) += \
 dtb-$(CONFIG_TARGET_SAMA5D3_XPLAINED) += \
 	at91-sama5d3_xplained.dtb
 
+dtb-$(CONFIG_TARGET_MA5D4EK) += \
+	at91-sama5d4_ma5d4evk.dts.dtb
+
 dtb-$(CONFIG_TARGET_SAMA5D4EK) += \
 	at91-sama5d4ek.dtb
 
arch/arm/dts/at91-sama5d4_ma5d4.dtsi new file +142 -0

142 lines not on this page · raw message

arch/arm/dts/at91-sama5d4_ma5d4evk.dts new file +149 -0

149 lines not on this page · raw message

configs/ma5d4evk_defconfig +2 -0
index 8322ed72da..cdea7dc123 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_AT91=y
 CONFIG_SYS_TEXT_BASE=0x26f00000
 CONFIG_TARGET_MA5D4EVK=y
+CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d4_ma5d4evk"
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
@@ -36,6 +37,7 @@ CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
+CONFIG_OF_CONTROL=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_NET_RANDOM_ETHADDR=y
Signature · 1 line
2.14.3
#20 lore raw

PATCH 9/14 at91: ma5d4evk: Add FDT support

Quoted 5 lines · Jagan Teki

Sync DTS from Linux and add FDT support for AT91 ma5d4evk board.

usb0, usb1, usb2 and hlcdc_pwm nodes removed, since there is no support it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/504f3601/attachment.sig>
author
#21 lore raw

PATCH 10/14 at91: ma5d4evk: Enable DM_SPI

In reply to Jagan Teki

AT91 ma5d4evk board uses atmel spi driver, enable DM_SPI to use dm functionality.

Kept few functions related to non-dm and gpio on board files for reference and will be remove once code moved to relevant drivers.

---
 arch/arm/mach-at91/Kconfig      | 1 +
 board/aries/ma5d4evk/ma5d4evk.c | 7 ++++---
 2 files changed, 5 insertions(+), 3 deletions(-)
arch/arm/mach-at91/Kconfig +1 -0
index 4dfddcc287..3621dfa760 100644
@@ -201,6 +201,7 @@ config TARGET_MA5D4EVK
 	select SAMA5D4
 	select SUPPORT_SPL
 	select DM
+	select DM_SPI
 
 config TARGET_MEESC
 	bool "Support meesc"
board/aries/ma5d4evk/ma5d4evk.c +4 -3
index 956c297e72..46c11d1a12 100644
@@ -30,7 +30,8 @@ DECLARE_GLOBAL_DATA_PTR;
 
 static u8 boot_mode_sf;
 
-#ifdef CONFIG_ATMEL_SPI
+/* FIXME gpio code here need to handle through DM_GPIO */
+#ifndef CONFIG_DM_SPI
 int spi_cs_is_valid(unsigned int bus, unsigned int cs)
 {
 	return bus == 0 && cs == 0;
@@ -57,7 +58,7 @@ static void ma5d4evk_spi0_hw_init(void)
 	/* Enable clock */
 	at91_periph_clk_enable(ATMEL_ID_SPI0);
 }
-#endif /* CONFIG_ATMEL_SPI */
+#endif /* CONFIG_DM_SPI */
 
 #ifdef CONFIG_CMD_USB
 static void ma5d4evk_usb_hw_init(void)
@@ -292,7 +293,7 @@ int board_init(void)
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
-#ifdef CONFIG_ATMEL_SPI
+#ifndef CONFIG_DM_SPI
 	ma5d4evk_spi0_hw_init();
 #endif
 #ifdef CONFIG_GENERIC_ATMEL_MCI
Signature · 1 line
2.14.3
#22 lore raw

PATCH 10/14 at91: ma5d4evk: Enable DM_SPI

Quoted 8 lines · Jagan Teki

AT91 ma5d4evk board uses atmel spi driver, enable DM_SPI to use dm functionality.

Kept few functions related to non-dm and gpio on board files for reference and will be remove once code moved to relevant drivers.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/eeabc4c6/attachment.sig>
author
#23 lore raw

PATCH 11/14 at91: ma5d4evk: Enable SPL_DM and SPL_OF_CONTROL

In reply to Jagan Teki

Enable SPL Driver model and FDT support for AT91 ma5d4evk boards.

---
 board/aries/ma5d4evk/ma5d4evk.c | 2 +-
 configs/ma5d4evk_defconfig      | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
board/aries/ma5d4evk/ma5d4evk.c +1 -1
index 46c11d1a12..9f8b8dc154 100644
@@ -359,7 +359,7 @@ int board_eth_init(bd_t *bis)
 #ifdef CONFIG_SPL_BUILD
 void spl_board_init(void)
 {
-#ifdef CONFIG_ATMEL_SPI
+#ifndef CONFIG_DM_SPI
 	ma5d4evk_spi0_hw_init();
 #endif
 #ifdef CONFIG_GENERIC_ATMEL_MCI
configs/ma5d4evk_defconfig +2 -0
index cdea7dc123..57f896d630 100644
@@ -9,6 +9,8 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
+CONFIG_SPL_DM=y
+CONFIG_SPL_OF_CONTROL=y
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_FIT=y
 CONFIG_BOOTDELAY=3
Signature · 1 line
2.14.3
#24 lore raw

PATCH 11/14 at91: ma5d4evk: Enable SPL_DM and SPL_OF_CONTROL

Quoted 3 lines · Jagan Teki

Enable SPL Driver model and FDT support for AT91 ma5d4evk boards.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/54a0e8e8/attachment.sig>
author
#25 lore raw

PATCH 12/14 spi: atmel: Drop non-dm code

In reply to Jagan Teki

All board configs are now enabled DM_SPI for SPL and U-Boot proper, so now its time to drop non-dm code.

---
 drivers/spi/atmel_spi.c      | 201 -------------------------------------------
 drivers/spi/atmel_spi.h      |  16 ----
 include/configs/ma5d4evk.h   |   1 -
 include/configs/vinco.h      |   1 -
 scripts/config_whitelist.txt |   1 -
 5 files changed, 220 deletions(-)
drivers/spi/atmel_spi.c +0 -201
index 3cdfd366ab..122c6d107d 100644
@@ -26,206 +26,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#ifndef CONFIG_DM_SPI
-
-static int spi_has_wdrbt(struct atmel_spi_slave *slave)
-{
-	unsigned int ver;
-
-	ver = spi_readl(slave, VERSION);
-
-	return (ATMEL_SPI_VERSION_REV(ver) >= 0x210);
-}
-
-void spi_init()
-{
-
-}
-
-struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
-			unsigned int max_hz, unsigned int mode)
-{
-	struct atmel_spi_slave	*as;
-	unsigned int		scbr;
-	u32			csrx;
-	void			*regs;
-
-	if (!spi_cs_is_valid(bus, cs))
-		return NULL;
-
-	switch (bus) {
-	case 0:
-		regs = (void *)ATMEL_BASE_SPI0;
-		break;
-#ifdef ATMEL_BASE_SPI1
-	case 1:
-		regs = (void *)ATMEL_BASE_SPI1;
-		break;
-#endif
-#ifdef ATMEL_BASE_SPI2
-	case 2:
-		regs = (void *)ATMEL_BASE_SPI2;
-		break;
-#endif
-#ifdef ATMEL_BASE_SPI3
-	case 3:
-		regs = (void *)ATMEL_BASE_SPI3;
-		break;
-#endif
-	default:
-		return NULL;
-	}
-
-
-	scbr = (get_spi_clk_rate(bus) + max_hz - 1) / max_hz;
-	if (scbr > ATMEL_SPI_CSRx_SCBR_MAX)
-		/* Too low max SCK rate */
-		return NULL;
-	if (scbr < 1)
-		scbr = 1;
-
-	csrx = ATMEL_SPI_CSRx_SCBR(scbr);
-	csrx |= ATMEL_SPI_CSRx_BITS(ATMEL_SPI_BITS_8);
-	if (!(mode & SPI_CPHA))
-		csrx |= ATMEL_SPI_CSRx_NCPHA;
-	if (mode & SPI_CPOL)
-		csrx |= ATMEL_SPI_CSRx_CPOL;
-
-	as = spi_alloc_slave(struct atmel_spi_slave, bus, cs);
-	if (!as)
-		return NULL;
-
-	as->regs = regs;
-	as->mr = ATMEL_SPI_MR_MSTR | ATMEL_SPI_MR_MODFDIS
-			| ATMEL_SPI_MR_PCS(~(1 << cs) & 0xf);
-	if (spi_has_wdrbt(as))
-		as->mr |= ATMEL_SPI_MR_WDRBT;
-
-	spi_writel(as, CSR(cs), csrx);
-
-	return &as->slave;
-}
-
-void spi_free_slave(struct spi_slave *slave)
-{
-	struct atmel_spi_slave *as = to_atmel_spi(slave);
-
-	free(as);
-}
-
-int spi_claim_bus(struct spi_slave *slave)
-{
-	struct atmel_spi_slave *as = to_atmel_spi(slave);
-
-	/* Enable the SPI hardware */
-	spi_writel(as, CR, ATMEL_SPI_CR_SPIEN);
-
-	/*
-	 * Select the slave. This should set SCK to the correct
-	 * initial state, etc.
-	 */
-	spi_writel(as, MR, as->mr);
-
-	return 0;
-}
-
-void spi_release_bus(struct spi_slave *slave)
-{
-	struct atmel_spi_slave *as = to_atmel_spi(slave);
-
-	/* Disable the SPI hardware */
-	spi_writel(as, CR, ATMEL_SPI_CR_SPIDIS);
-}
-
-int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
-		const void *dout, void *din, unsigned long flags)
-{
-	struct atmel_spi_slave *as = to_atmel_spi(slave);
-	unsigned int	len_tx;
-	unsigned int	len_rx;
-	unsigned int	len;
-	u32		status;
-	const u8	*txp = dout;
-	u8		*rxp = din;
-	u8		value;
-
-	if (bitlen == 0)
-		/* Finish any previously submitted transfers */
-		goto out;
-
-	/*
-	 * TODO: The controller can do non-multiple-of-8 bit
-	 * transfers, but this driver currently doesn't support it.
-	 *
-	 * It's also not clear how such transfers are supposed to be
-	 * represented as a stream of bytes...this is a limitation of
-	 * the current SPI interface.
-	 */
-	if (bitlen % 8) {
-		/* Errors always terminate an ongoing transfer */
-		flags |= SPI_XFER_END;
-		goto out;
-	}
-
-	len = bitlen / 8;
-
-	/*
-	 * The controller can do automatic CS control, but it is
-	 * somewhat quirky, and it doesn't really buy us much anyway
-	 * in the context of U-Boot.
-	 */
-	if (flags & SPI_XFER_BEGIN) {
-		spi_cs_activate(slave);
-		/*
-		 * sometimes the RDR is not empty when we get here,
-		 * in theory that should not happen, but it DOES happen.
-		 * Read it here to be on the safe side.
-		 * That also clears the OVRES flag. Required if the
-		 * following loop exits due to OVRES!
-		 */
-		spi_readl(as, RDR);
-	}
-
-	for (len_tx = 0, len_rx = 0; len_rx < len; ) {
-		status = spi_readl(as, SR);
-
-		if (status & ATMEL_SPI_SR_OVRES)
-			return -1;
-
-		if (len_tx < len && (status & ATMEL_SPI_SR_TDRE)) {
-			if (txp)
-				value = *txp++;
-			else
-				value = 0;
-			spi_writel(as, TDR, value);
-			len_tx++;
-		}
-		if (status & ATMEL_SPI_SR_RDRF) {
-			value = spi_readl(as, RDR);
-			if (rxp)
-				*rxp++ = value;
-			len_rx++;
-		}
-	}
-
-out:
-	if (flags & SPI_XFER_END) {
-		/*
-		 * Wait until the transfer is completely done before
-		 * we deactivate CS.
-		 */
-		do {
-			status = spi_readl(as, SR);
-		} while (!(status & ATMEL_SPI_SR_TXEMPTY));
-
-		spi_cs_deactivate(slave);
-	}
-
-	return 0;
-}
-
-#else
-
 #define MAX_CS_COUNT	4
 
 struct atmel_spi_platdata {
@@ -515,4 +315,3 @@ U_BOOT_DRIVER(atmel_spi) = {
 	.priv_auto_alloc_size = sizeof(struct atmel_spi_priv),
 	.probe	= atmel_spi_probe,
 };
-#endif
drivers/spi/atmel_spi.h +0 -16
index 76b8556c98..685eeed99e 100644
@@ -79,22 +79,6 @@
 #define ATMEL_SPI_BITS_16		8
 
 struct atmel_spi_slave {
-	struct spi_slave slave;
 	void		*regs;
 	u32		mr;
 };
-
-static inline struct atmel_spi_slave *to_atmel_spi(struct spi_slave *slave)
-{
-	return container_of(slave, struct atmel_spi_slave, slave);
-}
-
-/* Register access macros */
-#define spi_readl(as, reg)					\
-	readl(as->regs + ATMEL_SPI_##reg)
-#define spi_writel(as, reg, value)				\
-	writel(value, as->regs + ATMEL_SPI_##reg)
-
-#if !defined(CONFIG_SYS_SPI_WRITE_TOUT)
-#define CONFIG_SYS_SPI_WRITE_TOUT	(5 * CONFIG_SYS_HZ)
-#endif
include/configs/ma5d4evk.h +0 -1
index ed95e580c0..4cba7580a2 100644
@@ -87,7 +87,6 @@
  */
 #ifdef CONFIG_CMD_SF
 #define CONFIG_ATMEL_SPI
-#define CONFIG_ATMEL_SPI0
 #define CONFIG_SPI_FLASH_ATMEL
 #define CONFIG_SF_DEFAULT_BUS		0
 #define CONFIG_SF_DEFAULT_CS		0
include/configs/vinco.h +0 -1
index ca3958986b..3ae7e9e75b 100644
@@ -39,7 +39,6 @@
 
 #ifdef CONFIG_CMD_SF
 #define CONFIG_ATMEL_SPI
-#define CONFIG_ATMEL_SPI0
 #define CONFIG_SPI_FLASH_STMICRO
 #define CONFIG_SF_DEFAULT_BUS		0
 #define CONFIG_SF_DEFAULT_CS		0
scripts/config_whitelist.txt +0 -1
index 3606585c05..a5f8e3591f 100644
@@ -103,7 +103,6 @@ CONFIG_ATMEL_LEGACY
 CONFIG_ATMEL_MCI_8BIT
 CONFIG_ATMEL_NAND_HWECC
 CONFIG_ATMEL_NAND_HW_PMECC
-CONFIG_ATMEL_SPI0
 CONFIG_AT_TRANS
 CONFIG_AUTO_ZRELADDR
 CONFIG_BACKSIDE_L2_CACHE
Signature · 1 line
2.14.3
#26 lore raw

PATCH 12/14 spi: atmel: Drop non-dm code

Quoted 4 lines · Jagan Teki

All board configs are now enabled DM_SPI for SPL and U-Boot proper, so now its time to drop non-dm code.

It is okay for me.

Quoted 287 lines
---
  drivers/spi/atmel_spi.c      | 201 -------------------------------------------
  drivers/spi/atmel_spi.h      |  16 ----
  include/configs/ma5d4evk.h   |   1 -
  include/configs/vinco.h      |   1 -
  scripts/config_whitelist.txt |   1 -
  5 files changed, 220 deletions(-)
drivers/spi/atmel_spi.c +0 -201
index 3cdfd366ab..122c6d107d 100644
@@ -26,206 +26,6 @@
 
  DECLARE_GLOBAL_DATA_PTR;
 
-#ifndef CONFIG_DM_SPI
-
-static int spi_has_wdrbt(struct atmel_spi_slave *slave)
-{
-	unsigned int ver;
-
-	ver = spi_readl(slave, VERSION);
-
-	return (ATMEL_SPI_VERSION_REV(ver) >= 0x210);
-}
-
-void spi_init()
-{
-
-}
-
-struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
-			unsigned int max_hz, unsigned int mode)
-{
-	struct atmel_spi_slave	*as;
-	unsigned int		scbr;
-	u32			csrx;
-	void			*regs;
-
-	if (!spi_cs_is_valid(bus, cs))
-		return NULL;
-
-	switch (bus) {
-	case 0:
-		regs = (void *)ATMEL_BASE_SPI0;
-		break;
-#ifdef ATMEL_BASE_SPI1
-	case 1:
-		regs = (void *)ATMEL_BASE_SPI1;
-		break;
-#endif
-#ifdef ATMEL_BASE_SPI2
-	case 2:
-		regs = (void *)ATMEL_BASE_SPI2;
-		break;
-#endif
-#ifdef ATMEL_BASE_SPI3
-	case 3:
-		regs = (void *)ATMEL_BASE_SPI3;
-		break;
-#endif
-	default:
-		return NULL;
-	}
-
-
-	scbr = (get_spi_clk_rate(bus) + max_hz - 1) / max_hz;
-	if (scbr > ATMEL_SPI_CSRx_SCBR_MAX)
-		/* Too low max SCK rate */
-		return NULL;
-	if (scbr < 1)
-		scbr = 1;
-
-	csrx = ATMEL_SPI_CSRx_SCBR(scbr);
-	csrx |= ATMEL_SPI_CSRx_BITS(ATMEL_SPI_BITS_8);
-	if (!(mode & SPI_CPHA))
-		csrx |= ATMEL_SPI_CSRx_NCPHA;
-	if (mode & SPI_CPOL)
-		csrx |= ATMEL_SPI_CSRx_CPOL;
-
-	as = spi_alloc_slave(struct atmel_spi_slave, bus, cs);
-	if (!as)
-		return NULL;
-
-	as->regs = regs;
-	as->mr = ATMEL_SPI_MR_MSTR | ATMEL_SPI_MR_MODFDIS
-			| ATMEL_SPI_MR_PCS(~(1 << cs) & 0xf);
-	if (spi_has_wdrbt(as))
-		as->mr |= ATMEL_SPI_MR_WDRBT;
-
-	spi_writel(as, CSR(cs), csrx);
-
-	return &as->slave;
-}
-
-void spi_free_slave(struct spi_slave *slave)
-{
-	struct atmel_spi_slave *as = to_atmel_spi(slave);
-
-	free(as);
-}
-
-int spi_claim_bus(struct spi_slave *slave)
-{
-	struct atmel_spi_slave *as = to_atmel_spi(slave);
-
-	/* Enable the SPI hardware */
-	spi_writel(as, CR, ATMEL_SPI_CR_SPIEN);
-
-	/*
-	 * Select the slave. This should set SCK to the correct
-	 * initial state, etc.
-	 */
-	spi_writel(as, MR, as->mr);
-
-	return 0;
-}
-
-void spi_release_bus(struct spi_slave *slave)
-{
-	struct atmel_spi_slave *as = to_atmel_spi(slave);
-
-	/* Disable the SPI hardware */
-	spi_writel(as, CR, ATMEL_SPI_CR_SPIDIS);
-}
-
-int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
-		const void *dout, void *din, unsigned long flags)
-{
-	struct atmel_spi_slave *as = to_atmel_spi(slave);
-	unsigned int	len_tx;
-	unsigned int	len_rx;
-	unsigned int	len;
-	u32		status;
-	const u8	*txp = dout;
-	u8		*rxp = din;
-	u8		value;
-
-	if (bitlen == 0)
-		/* Finish any previously submitted transfers */
-		goto out;
-
-	/*
-	 * TODO: The controller can do non-multiple-of-8 bit
-	 * transfers, but this driver currently doesn't support it.
-	 *
-	 * It's also not clear how such transfers are supposed to be
-	 * represented as a stream of bytes...this is a limitation of
-	 * the current SPI interface.
-	 */
-	if (bitlen % 8) {
-		/* Errors always terminate an ongoing transfer */
-		flags |= SPI_XFER_END;
-		goto out;
-	}
-
-	len = bitlen / 8;
-
-	/*
-	 * The controller can do automatic CS control, but it is
-	 * somewhat quirky, and it doesn't really buy us much anyway
-	 * in the context of U-Boot.
-	 */
-	if (flags & SPI_XFER_BEGIN) {
-		spi_cs_activate(slave);
-		/*
-		 * sometimes the RDR is not empty when we get here,
-		 * in theory that should not happen, but it DOES happen.
-		 * Read it here to be on the safe side.
-		 * That also clears the OVRES flag. Required if the
-		 * following loop exits due to OVRES!
-		 */
-		spi_readl(as, RDR);
-	}
-
-	for (len_tx = 0, len_rx = 0; len_rx < len; ) {
-		status = spi_readl(as, SR);
-
-		if (status & ATMEL_SPI_SR_OVRES)
-			return -1;
-
-		if (len_tx < len && (status & ATMEL_SPI_SR_TDRE)) {
-			if (txp)
-				value = *txp++;
-			else
-				value = 0;
-			spi_writel(as, TDR, value);
-			len_tx++;
-		}
-		if (status & ATMEL_SPI_SR_RDRF) {
-			value = spi_readl(as, RDR);
-			if (rxp)
-				*rxp++ = value;
-			len_rx++;
-		}
-	}
-
-out:
-	if (flags & SPI_XFER_END) {
-		/*
-		 * Wait until the transfer is completely done before
-		 * we deactivate CS.
-		 */
-		do {
-			status = spi_readl(as, SR);
-		} while (!(status & ATMEL_SPI_SR_TXEMPTY));
-
-		spi_cs_deactivate(slave);
-	}
-
-	return 0;
-}
-
-#else
-
  #define MAX_CS_COUNT	4
 
  struct atmel_spi_platdata {
@@ -515,4 +315,3 @@ U_BOOT_DRIVER(atmel_spi) = {
  	.priv_auto_alloc_size = sizeof(struct atmel_spi_priv),
  	.probe	= atmel_spi_probe,
  };
-#endif
drivers/spi/atmel_spi.h +0 -16
index 76b8556c98..685eeed99e 100644
@@ -79,22 +79,6 @@
  #define ATMEL_SPI_BITS_16		8
 
  struct atmel_spi_slave {
-	struct spi_slave slave;
  	void		*regs;
  	u32		mr;
  };
-
-static inline struct atmel_spi_slave *to_atmel_spi(struct spi_slave *slave)
-{
-	return container_of(slave, struct atmel_spi_slave, slave);
-}
-
-/* Register access macros */
-#define spi_readl(as, reg)					\
-	readl(as->regs + ATMEL_SPI_##reg)
-#define spi_writel(as, reg, value)				\
-	writel(value, as->regs + ATMEL_SPI_##reg)
-
-#if !defined(CONFIG_SYS_SPI_WRITE_TOUT)
-#define CONFIG_SYS_SPI_WRITE_TOUT	(5 * CONFIG_SYS_HZ)
-#endif
include/configs/ma5d4evk.h +0 -1
index ed95e580c0..4cba7580a2 100644
@@ -87,7 +87,6 @@
   */
  #ifdef CONFIG_CMD_SF
  #define CONFIG_ATMEL_SPI
-#define CONFIG_ATMEL_SPI0
  #define CONFIG_SPI_FLASH_ATMEL
  #define CONFIG_SF_DEFAULT_BUS		0
  #define CONFIG_SF_DEFAULT_CS		0
include/configs/vinco.h +0 -1
index ca3958986b..3ae7e9e75b 100644
@@ -39,7 +39,6 @@
 
  #ifdef CONFIG_CMD_SF
  #define CONFIG_ATMEL_SPI
-#define CONFIG_ATMEL_SPI0
  #define CONFIG_SPI_FLASH_STMICRO
  #define CONFIG_SF_DEFAULT_BUS		0
  #define CONFIG_SF_DEFAULT_CS		0
scripts/config_whitelist.txt +0 -1
index 3606585c05..a5f8e3591f 100644
@@ -103,7 +103,6 @@ CONFIG_ATMEL_LEGACY
  CONFIG_ATMEL_MCI_8BIT
  CONFIG_ATMEL_NAND_HWECC
  CONFIG_ATMEL_NAND_HW_PMECC
-CONFIG_ATMEL_SPI0
  CONFIG_AT_TRANS
  CONFIG_AUTO_ZRELADDR
  CONFIG_BACKSIDE_L2_CACHE
#27 lore raw

PATCH 12/14 spi: atmel: Drop non-dm code

In reply to Jagan Teki
Quoted 5 lines · Jagan Teki

All board configs are now enabled DM_SPI for SPL and U-Boot proper, so now its time to drop non-dm code.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/1f8d89a2/attachment.sig>
#28 lore raw

PATCH 12/14 spi: atmel: Drop non-dm code

Quoted 9 lines · Tom Rini
Quoted 5 lines · Jagan Teki

All board configs are now enabled DM_SPI for SPL and U-Boot proper, so now its time to drop non-dm code.

Applied to u-boot/master, thanks!

Ah, oops, until we sort out how to handle the taurus boards, this was premature, sorry, reverting.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180407/453dd705/attachment.sig>
author
#29 lore raw

PATCH 13/14 spi: atmel: Drop atmel_spi.h

In reply to Jagan Teki

atmel_spi.h has register offsets, and atmel_spi_slave structure, move it into .c file for better readability and drop atmel_spi.h

---
 drivers/spi/atmel_spi.c | 97 ++++++++++++++++++++++++++++++++++++++++++++-----
 drivers/spi/atmel_spi.h | 84 ------------------------------------------
 2 files changed, 88 insertions(+), 93 deletions(-)
 delete mode 100644 drivers/spi/atmel_spi.h
drivers/spi/atmel_spi.c +88 -9
index 122c6d107d..bb2262cc1f 100644
@@ -22,11 +22,90 @@
 #include <asm/gpio.h>
 #endif
 
-#include "atmel_spi.h"
-
 DECLARE_GLOBAL_DATA_PTR;
 
-#define MAX_CS_COUNT	4
+/* Register offsets */
+#define ATMEL_SPI_CR			0x0000
+#define ATMEL_SPI_MR			0x0004
+#define ATMEL_SPI_RDR			0x0008
+#define ATMEL_SPI_TDR			0x000c
+#define ATMEL_SPI_SR			0x0010
+#define ATMEL_SPI_IER			0x0014
+#define ATMEL_SPI_IDR			0x0018
+#define ATMEL_SPI_IMR			0x001c
+#define ATMEL_SPI_CSR(x)		(0x0030 + 4 * (x))
+#define ATMEL_SPI_VERSION		0x00fc
+
+/* Bits in CR */
+#define ATMEL_SPI_CR_SPIEN		BIT(0)
+#define ATMEL_SPI_CR_SPIDIS		BIT(1)
+#define ATMEL_SPI_CR_SWRST		BIT(7)
+#define ATMEL_SPI_CR_LASTXFER		BIT(24)
+
+/* Bits in MR */
+#define ATMEL_SPI_MR_MSTR		BIT(0)
+#define ATMEL_SPI_MR_PS			BIT(1)
+#define ATMEL_SPI_MR_PCSDEC		BIT(2)
+#define ATMEL_SPI_MR_FDIV		BIT(3)
+#define ATMEL_SPI_MR_MODFDIS		BIT(4)
+#define ATMEL_SPI_MR_WDRBT		BIT(5)
+#define ATMEL_SPI_MR_LLB		BIT(7)
+#define ATMEL_SPI_MR_PCS(x)		(((x) & 15) << 16)
+#define ATMEL_SPI_MR_DLYBCS(x)		((x) << 24)
+
+/* Bits in RDR */
+#define ATMEL_SPI_RDR_RD(x)		(x)
+#define ATMEL_SPI_RDR_PCS(x)		((x) << 16)
+
+/* Bits in TDR */
+#define ATMEL_SPI_TDR_TD(x)		(x)
+#define ATMEL_SPI_TDR_PCS(x)		((x) << 16)
+#define ATMEL_SPI_TDR_LASTXFER		BIT(24)
+
+/* Bits in SR/IER/IDR/IMR */
+#define ATMEL_SPI_SR_RDRF		BIT(0)
+#define ATMEL_SPI_SR_TDRE		BIT(1)
+#define ATMEL_SPI_SR_MODF		BIT(2)
+#define ATMEL_SPI_SR_OVRES		BIT(3)
+#define ATMEL_SPI_SR_ENDRX		BIT(4)
+#define ATMEL_SPI_SR_ENDTX		BIT(5)
+#define ATMEL_SPI_SR_RXBUFF		BIT(6)
+#define ATMEL_SPI_SR_TXBUFE		BIT(7)
+#define ATMEL_SPI_SR_NSSR		BIT(8)
+#define ATMEL_SPI_SR_TXEMPTY		BIT(9)
+#define ATMEL_SPI_SR_SPIENS		BIT(16)
+
+/* Bits in CSRx */
+#define ATMEL_SPI_CSR_CPOL		BIT(0)
+#define ATMEL_SPI_CSR_NCPHA		BIT(1)
+#define ATMEL_SPI_CSR_CSAAT		BIT(3)
+#define ATMEL_SPI_CSR_BITS(x)		((x) << 4)
+#define ATMEL_SPI_CSR_SCBR(x)		((x) << 8)
+#define ATMEL_SPI_CSR_SCBR_MAX		GENMASK(7, 0)
+#define ATMEL_SPI_CSR_DLYBS(x)		((x) << 16)
+#define ATMEL_SPI_CSR_DLYBCT(x)		((x) << 24)
+
+/* Bits in VERSION */
+#define ATMEL_SPI_VERSION_REV(x)	((x) & 0xfff)
+#define ATMEL_SPI_VERSION_MFN(x)	((x) << 16)
+
+/* Constants for CSRx:BITS */
+#define ATMEL_SPI_BITS_8		0
+#define ATMEL_SPI_BITS_9		1
+#define ATMEL_SPI_BITS_10		2
+#define ATMEL_SPI_BITS_11		3
+#define ATMEL_SPI_BITS_12		4
+#define ATMEL_SPI_BITS_13		5
+#define ATMEL_SPI_BITS_14		6
+#define ATMEL_SPI_BITS_15		7
+#define ATMEL_SPI_BITS_16		8
+
+#define MAX_CS_COUNT			4
+
+struct atmel_spi_slave {
+	void		*regs;
+	u32		mr;
+};
 
 struct atmel_spi_platdata {
 	struct at91_spi *regs;
@@ -53,19 +132,19 @@ static int atmel_spi_claim_bus(struct udevice *dev)
 	u32 scbr, csrx, mode;
 
 	scbr = (priv->bus_clk_rate + freq - 1) / freq;
-	if (scbr > ATMEL_SPI_CSRx_SCBR_MAX)
+	if (scbr > ATMEL_SPI_CSR_SCBR_MAX)
 		return -EINVAL;
 
 	if (scbr < 1)
 		scbr = 1;
 
-	csrx = ATMEL_SPI_CSRx_SCBR(scbr);
-	csrx |= ATMEL_SPI_CSRx_BITS(ATMEL_SPI_BITS_8);
+	csrx = ATMEL_SPI_CSR_SCBR(scbr);
+	csrx |= ATMEL_SPI_CSR_BITS(ATMEL_SPI_BITS_8);
 
 	if (!(priv->mode & SPI_CPHA))
-		csrx |= ATMEL_SPI_CSRx_NCPHA;
+		csrx |= ATMEL_SPI_CSR_NCPHA;
 	if (priv->mode & SPI_CPOL)
-		csrx |= ATMEL_SPI_CSRx_CPOL;
+		csrx |= ATMEL_SPI_CSR_CPOL;
 
 	writel(csrx, &reg_base->csr[cs]);
 
@@ -287,7 +366,7 @@ static int atmel_spi_probe(struct udevice *bus)
 		return ret;
 	}
 
-	for(i = 0; i < ARRAY_SIZE(priv->cs_gpios); i++) {
+	for (i = 0; i < ARRAY_SIZE(priv->cs_gpios); i++) {
 		if (!dm_gpio_is_valid(&priv->cs_gpios[i]))
 			continue;
 
drivers/spi/atmel_spi.h deleted +0 -84

84 lines not on this page · raw message

Signature · 1 line
2.14.3
#30 lore raw

PATCH 13/14 spi: atmel: Drop atmel_spi.h

Quoted 5 lines · Jagan Teki

atmel_spi.h has register offsets, and atmel_spi_slave structure, move it into .c file for better readability and drop atmel_spi.h

Indeed.

Quoted 228 lines
---
  drivers/spi/atmel_spi.c | 97 ++++++++++++++++++++++++++++++++++++++++++++-----
  drivers/spi/atmel_spi.h | 84 ------------------------------------------
  2 files changed, 88 insertions(+), 93 deletions(-)

delete mode 100644 drivers/spi/atmel_spi.h

drivers/spi/atmel_spi.c +88 -9
index 122c6d107d..bb2262cc1f 100644
@@ -22,11 +22,90 @@
  #include <asm/gpio.h>
  #endif
 
-#include "atmel_spi.h"
-
  DECLARE_GLOBAL_DATA_PTR;
 
-#define MAX_CS_COUNT	4
+/* Register offsets */
+#define ATMEL_SPI_CR			0x0000
+#define ATMEL_SPI_MR			0x0004
+#define ATMEL_SPI_RDR			0x0008
+#define ATMEL_SPI_TDR			0x000c
+#define ATMEL_SPI_SR			0x0010
+#define ATMEL_SPI_IER			0x0014
+#define ATMEL_SPI_IDR			0x0018
+#define ATMEL_SPI_IMR			0x001c
+#define ATMEL_SPI_CSR(x)		(0x0030 + 4 * (x))
+#define ATMEL_SPI_VERSION		0x00fc
+
+/* Bits in CR */
+#define ATMEL_SPI_CR_SPIEN		BIT(0)
+#define ATMEL_SPI_CR_SPIDIS		BIT(1)
+#define ATMEL_SPI_CR_SWRST		BIT(7)
+#define ATMEL_SPI_CR_LASTXFER		BIT(24)
+
+/* Bits in MR */
+#define ATMEL_SPI_MR_MSTR		BIT(0)
+#define ATMEL_SPI_MR_PS			BIT(1)
+#define ATMEL_SPI_MR_PCSDEC		BIT(2)
+#define ATMEL_SPI_MR_FDIV		BIT(3)
+#define ATMEL_SPI_MR_MODFDIS		BIT(4)
+#define ATMEL_SPI_MR_WDRBT		BIT(5)
+#define ATMEL_SPI_MR_LLB		BIT(7)
+#define ATMEL_SPI_MR_PCS(x)		(((x) & 15) << 16)
+#define ATMEL_SPI_MR_DLYBCS(x)		((x) << 24)
+
+/* Bits in RDR */
+#define ATMEL_SPI_RDR_RD(x)		(x)
+#define ATMEL_SPI_RDR_PCS(x)		((x) << 16)
+
+/* Bits in TDR */
+#define ATMEL_SPI_TDR_TD(x)		(x)
+#define ATMEL_SPI_TDR_PCS(x)		((x) << 16)
+#define ATMEL_SPI_TDR_LASTXFER		BIT(24)
+
+/* Bits in SR/IER/IDR/IMR */
+#define ATMEL_SPI_SR_RDRF		BIT(0)
+#define ATMEL_SPI_SR_TDRE		BIT(1)
+#define ATMEL_SPI_SR_MODF		BIT(2)
+#define ATMEL_SPI_SR_OVRES		BIT(3)
+#define ATMEL_SPI_SR_ENDRX		BIT(4)
+#define ATMEL_SPI_SR_ENDTX		BIT(5)
+#define ATMEL_SPI_SR_RXBUFF		BIT(6)
+#define ATMEL_SPI_SR_TXBUFE		BIT(7)
+#define ATMEL_SPI_SR_NSSR		BIT(8)
+#define ATMEL_SPI_SR_TXEMPTY		BIT(9)
+#define ATMEL_SPI_SR_SPIENS		BIT(16)
+
+/* Bits in CSRx */
+#define ATMEL_SPI_CSR_CPOL		BIT(0)
+#define ATMEL_SPI_CSR_NCPHA		BIT(1)
+#define ATMEL_SPI_CSR_CSAAT		BIT(3)
+#define ATMEL_SPI_CSR_BITS(x)		((x) << 4)
+#define ATMEL_SPI_CSR_SCBR(x)		((x) << 8)
+#define ATMEL_SPI_CSR_SCBR_MAX		GENMASK(7, 0)
+#define ATMEL_SPI_CSR_DLYBS(x)		((x) << 16)
+#define ATMEL_SPI_CSR_DLYBCT(x)		((x) << 24)
+
+/* Bits in VERSION */
+#define ATMEL_SPI_VERSION_REV(x)	((x) & 0xfff)
+#define ATMEL_SPI_VERSION_MFN(x)	((x) << 16)
+
+/* Constants for CSRx:BITS */
+#define ATMEL_SPI_BITS_8		0
+#define ATMEL_SPI_BITS_9		1
+#define ATMEL_SPI_BITS_10		2
+#define ATMEL_SPI_BITS_11		3
+#define ATMEL_SPI_BITS_12		4
+#define ATMEL_SPI_BITS_13		5
+#define ATMEL_SPI_BITS_14		6
+#define ATMEL_SPI_BITS_15		7
+#define ATMEL_SPI_BITS_16		8
+
+#define MAX_CS_COUNT			4
+
+struct atmel_spi_slave {
+	void		*regs;
+	u32		mr;
+};
 
  struct atmel_spi_platdata {
  	struct at91_spi *regs;
@@ -53,19 +132,19 @@ static int atmel_spi_claim_bus(struct udevice *dev)
  	u32 scbr, csrx, mode;
 
  	scbr = (priv->bus_clk_rate + freq - 1) / freq;
-	if (scbr > ATMEL_SPI_CSRx_SCBR_MAX)
+	if (scbr > ATMEL_SPI_CSR_SCBR_MAX)
  		return -EINVAL;
 
  	if (scbr < 1)
  		scbr = 1;
 
-	csrx = ATMEL_SPI_CSRx_SCBR(scbr);
-	csrx |= ATMEL_SPI_CSRx_BITS(ATMEL_SPI_BITS_8);
+	csrx = ATMEL_SPI_CSR_SCBR(scbr);
+	csrx |= ATMEL_SPI_CSR_BITS(ATMEL_SPI_BITS_8);
 
  	if (!(priv->mode & SPI_CPHA))
-		csrx |= ATMEL_SPI_CSRx_NCPHA;
+		csrx |= ATMEL_SPI_CSR_NCPHA;
  	if (priv->mode & SPI_CPOL)
-		csrx |= ATMEL_SPI_CSRx_CPOL;
+		csrx |= ATMEL_SPI_CSR_CPOL;
 
  	writel(csrx, &reg_base->csr[cs]);
 
@@ -287,7 +366,7 @@ static int atmel_spi_probe(struct udevice *bus)
  		return ret;
  	}
 
-	for(i = 0; i < ARRAY_SIZE(priv->cs_gpios); i++) {
+	for (i = 0; i < ARRAY_SIZE(priv->cs_gpios); i++) {
  		if (!dm_gpio_is_valid(&priv->cs_gpios[i]))
  			continue;
 
drivers/spi/atmel_spi.h deleted +0 -84
deleted file mode 100644
index 685eeed99e..0000000000
@@ -1,84 +0,0 @@
-/*
- * Register definitions for the Atmel AT32/AT91 SPI Controller
- */
-
-/* Register offsets */
-#define ATMEL_SPI_CR			0x0000
-#define ATMEL_SPI_MR			0x0004
-#define ATMEL_SPI_RDR			0x0008
-#define ATMEL_SPI_TDR			0x000c
-#define ATMEL_SPI_SR			0x0010
-#define ATMEL_SPI_IER			0x0014
-#define ATMEL_SPI_IDR			0x0018
-#define ATMEL_SPI_IMR			0x001c
-#define ATMEL_SPI_CSR(x)		(0x0030 + 4 * (x))
-#define ATMEL_SPI_VERSION		0x00fc
-
-/* Bits in CR */
-#define ATMEL_SPI_CR_SPIEN		BIT(0)
-#define ATMEL_SPI_CR_SPIDIS		BIT(1)
-#define ATMEL_SPI_CR_SWRST		BIT(7)
-#define ATMEL_SPI_CR_LASTXFER		BIT(24)
-
-/* Bits in MR */
-#define ATMEL_SPI_MR_MSTR		BIT(0)
-#define ATMEL_SPI_MR_PS			BIT(1)
-#define ATMEL_SPI_MR_PCSDEC		BIT(2)
-#define ATMEL_SPI_MR_FDIV		BIT(3)
-#define ATMEL_SPI_MR_MODFDIS		BIT(4)
-#define ATMEL_SPI_MR_WDRBT		BIT(5)
-#define ATMEL_SPI_MR_LLB		BIT(7)
-#define ATMEL_SPI_MR_PCS(x)		(((x) & 15) << 16)
-#define ATMEL_SPI_MR_DLYBCS(x)		((x) << 24)
-
-/* Bits in RDR */
-#define ATMEL_SPI_RDR_RD(x)		(x)
-#define ATMEL_SPI_RDR_PCS(x)		((x) << 16)
-
-/* Bits in TDR */
-#define ATMEL_SPI_TDR_TD(x)		(x)
-#define ATMEL_SPI_TDR_PCS(x)		((x) << 16)
-#define ATMEL_SPI_TDR_LASTXFER		BIT(24)
-
-/* Bits in SR/IER/IDR/IMR */
-#define ATMEL_SPI_SR_RDRF		BIT(0)
-#define ATMEL_SPI_SR_TDRE		BIT(1)
-#define ATMEL_SPI_SR_MODF		BIT(2)
-#define ATMEL_SPI_SR_OVRES		BIT(3)
-#define ATMEL_SPI_SR_ENDRX		BIT(4)
-#define ATMEL_SPI_SR_ENDTX		BIT(5)
-#define ATMEL_SPI_SR_RXBUFF		BIT(6)
-#define ATMEL_SPI_SR_TXBUFE		BIT(7)
-#define ATMEL_SPI_SR_NSSR		BIT(8)
-#define ATMEL_SPI_SR_TXEMPTY		BIT(9)
-#define ATMEL_SPI_SR_SPIENS		BIT(16)
-
-/* Bits in CSRx */
-#define ATMEL_SPI_CSRx_CPOL		BIT(0)
-#define ATMEL_SPI_CSRx_NCPHA		BIT(1)
-#define ATMEL_SPI_CSRx_CSAAT		BIT(3)
-#define ATMEL_SPI_CSRx_BITS(x)		((x) << 4)
-#define ATMEL_SPI_CSRx_SCBR(x)		((x) << 8)
-#define ATMEL_SPI_CSRx_SCBR_MAX		GENMASK(7, 0)
-#define ATMEL_SPI_CSRx_DLYBS(x)		((x) << 16)
-#define ATMEL_SPI_CSRx_DLYBCT(x)	((x) << 24)
-
-/* Bits in VERSION */
-#define ATMEL_SPI_VERSION_REV(x)	((x) & 0xfff)
-#define ATMEL_SPI_VERSION_MFN(x)	((x) << 16)
-
-/* Constants for CSRx:BITS */
-#define ATMEL_SPI_BITS_8		0
-#define ATMEL_SPI_BITS_9		1
-#define ATMEL_SPI_BITS_10		2
-#define ATMEL_SPI_BITS_11		3
-#define ATMEL_SPI_BITS_12		4
-#define ATMEL_SPI_BITS_13		5
-#define ATMEL_SPI_BITS_14		6
-#define ATMEL_SPI_BITS_15		7
-#define ATMEL_SPI_BITS_16		8
-
-struct atmel_spi_slave {
-	void		*regs;
-	u32		mr;
-};
#31 lore raw

PATCH 13/14 spi: atmel: Drop atmel_spi.h

In reply to Jagan Teki
Quoted 6 lines · Jagan Teki

atmel_spi.h has register offsets, and atmel_spi_slave structure, move it into .c file for better readability and drop atmel_spi.h

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/efd3940e/attachment.sig>
#32 lore raw

PATCH 13/14 spi: atmel: Drop atmel_spi.h

Quoted 10 lines · Tom Rini
Quoted 6 lines · Jagan Teki

atmel_spi.h has register offsets, and atmel_spi_slave structure, move it into .c file for better readability and drop atmel_spi.h

Applied to u-boot/master, thanks!

Ah, oops, until we sort out how to handle the taurus boards, this was premature, sorry, reverting.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180407/79c3432b/attachment.sig>
author
#33 lore raw

PATCH 14/14 spi: atmel: default y if DM_SPI && ARCH_AT91

In reply to Jagan Teki

ATMEL_SPI is now fully converted to driver-model and respective boards switch to DM_SPI as well, so make default y for ARCH_AT91

---
 configs/at91sam9260ek_dataflash_cs0_defconfig  | 1 -
 configs/at91sam9260ek_dataflash_cs1_defconfig  | 1 -
 configs/at91sam9260ek_nandflash_defconfig      | 1 -
 configs/at91sam9261ek_dataflash_cs0_defconfig  | 1 -
 configs/at91sam9261ek_dataflash_cs3_defconfig  | 1 -
 configs/at91sam9261ek_nandflash_defconfig      | 1 -
 configs/at91sam9263ek_dataflash_cs0_defconfig  | 1 -
 configs/at91sam9263ek_dataflash_defconfig      | 1 -
 configs/at91sam9263ek_nandflash_defconfig      | 1 -
 configs/at91sam9263ek_norflash_boot_defconfig  | 1 -
 configs/at91sam9263ek_norflash_defconfig       | 1 -
 configs/at91sam9g10ek_dataflash_cs0_defconfig  | 1 -
 configs/at91sam9g10ek_dataflash_cs3_defconfig  | 1 -
 configs/at91sam9g10ek_nandflash_defconfig      | 1 -
 configs/at91sam9g20ek_2mmc_defconfig           | 1 -
 configs/at91sam9g20ek_2mmc_nandflash_defconfig | 1 -
 configs/at91sam9g20ek_dataflash_cs0_defconfig  | 1 -
 configs/at91sam9g20ek_dataflash_cs1_defconfig  | 1 -
 configs/at91sam9g20ek_nandflash_defconfig      | 1 -
 configs/at91sam9n12ek_mmc_defconfig            | 1 -
 configs/at91sam9n12ek_nandflash_defconfig      | 1 -
 configs/at91sam9n12ek_spiflash_defconfig       | 1 -
 configs/at91sam9rlek_dataflash_defconfig       | 1 -
 configs/at91sam9rlek_mmc_defconfig             | 1 -
 configs/at91sam9rlek_nandflash_defconfig       | 1 -
 configs/at91sam9x5ek_dataflash_defconfig       | 1 -
 configs/at91sam9x5ek_mmc_defconfig             | 1 -
 configs/at91sam9x5ek_nandflash_defconfig       | 1 -
 configs/at91sam9x5ek_spiflash_defconfig        | 1 -
 configs/at91sam9xeek_dataflash_cs0_defconfig   | 1 -
 configs/at91sam9xeek_dataflash_cs1_defconfig   | 1 -
 configs/at91sam9xeek_nandflash_defconfig       | 1 -
 configs/ethernut5_defconfig                    | 1 -
 configs/gurnard_defconfig                      | 1 -
 configs/meesc_dataflash_defconfig              | 1 -
 configs/meesc_defconfig                        | 1 -
 configs/pm9261_defconfig                       | 1 -
 configs/pm9263_defconfig                       | 1 -
 configs/sama5d27_som1_ek_mmc_defconfig         | 1 -
 configs/sama5d2_xplained_mmc_defconfig         | 1 -
 configs/sama5d2_xplained_spiflash_defconfig    | 1 -
 configs/sama5d36ek_cmp_mmc_defconfig           | 1 -
 configs/sama5d36ek_cmp_nandflash_defconfig     | 1 -
 configs/sama5d36ek_cmp_spiflash_defconfig      | 1 -
 configs/sama5d3xek_mmc_defconfig               | 1 -
 configs/sama5d3xek_nandflash_defconfig         | 1 -
 configs/sama5d3xek_spiflash_defconfig          | 1 -
 configs/sama5d4_xplained_mmc_defconfig         | 1 -
 configs/sama5d4_xplained_nandflash_defconfig   | 1 -
 configs/sama5d4_xplained_spiflash_defconfig    | 1 -
 configs/sama5d4ek_mmc_defconfig                | 1 -
 configs/sama5d4ek_nandflash_defconfig          | 1 -
 configs/sama5d4ek_spiflash_defconfig           | 1 -
 configs/usb_a9263_dataflash_defconfig          | 1 -
 drivers/spi/Kconfig                            | 2 +-
 include/configs/ma5d4evk.h                     | 1 -
 include/configs/taurus.h                       | 1 -
 include/configs/vinco.h                        | 1 -
 58 files changed, 1 insertion(+), 58 deletions(-)
configs/at91sam9260ek_dataflash_cs0_defconfig +0 -1
index b41fe5b5fe..ae2293db3e 100644
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9260ek_dataflash_cs1_defconfig +0 -1
index a30a4f6f73..93f76126a6 100644
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9260ek_nandflash_defconfig +0 -1
index 58a3431019..f7585d0565 100644
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9261ek_dataflash_cs0_defconfig +0 -1
index 575e217f3a..bf06d32f55 100644
@@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9261ek_dataflash_cs3_defconfig +0 -1
index 7be7becb1f..ad7791ac45 100644
@@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9261ek_nandflash_defconfig +0 -1
index 353dc0dc7f..079c6955b0 100644
@@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9263ek_dataflash_cs0_defconfig +0 -1
index 418bbfc9e1..06390dce6b 100644
@@ -55,7 +55,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9263ek_dataflash_defconfig +0 -1
index 418bbfc9e1..06390dce6b 100644
@@ -55,7 +55,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9263ek_nandflash_defconfig +0 -1
index 1b3ef9b47c..5c3959e24b 100644
@@ -55,7 +55,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9263ek_norflash_boot_defconfig +0 -1
index 39abe2db76..a26da0064a 100644
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9263ek_norflash_defconfig +0 -1
index 04267354ff..4f08450384 100644
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9g10ek_dataflash_cs0_defconfig +0 -1
index 2382b25cf3..c6cc752728 100644
@@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
configs/at91sam9g10ek_dataflash_cs3_defconfig +0 -1
index 531dde84a4..81b291efab 100644
@@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
configs/at91sam9g10ek_nandflash_defconfig +0 -1
index 4973519da6..9a539315bd 100644
@@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
configs/at91sam9g20ek_2mmc_defconfig +0 -1
index c9ef79b6ff..5f8824ca42 100644
@@ -52,7 +52,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9g20ek_2mmc_nandflash_defconfig +0 -1
index 982ddfd9e7..324f3acf57 100644
@@ -52,7 +52,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9g20ek_dataflash_cs0_defconfig +0 -1
index 36bb9905f4..25bd456e65 100644
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9g20ek_dataflash_cs1_defconfig +0 -1
index de6d39d703..c8cb0af1a4 100644
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9g20ek_nandflash_defconfig +0 -1
index f8d9107025..b4ddf9cdd0 100644
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9n12ek_mmc_defconfig +0 -1
index f1fc70b41e..a253d448e5 100644
@@ -51,7 +51,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9n12ek_nandflash_defconfig +0 -1
index 966d54475f..dc9514592e 100644
@@ -51,7 +51,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9n12ek_spiflash_defconfig +0 -1
index 634e3de83c..acd4a89e2c 100644
@@ -51,7 +51,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9rlek_dataflash_defconfig +0 -1
index e80d43c79d..7f3fd4d2f0 100644
@@ -48,7 +48,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_LCD=y
configs/at91sam9rlek_mmc_defconfig +0 -1
index b18f2d42b0..84c9fa597f 100644
@@ -48,7 +48,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_LCD=y
configs/at91sam9rlek_nandflash_defconfig +0 -1
index 5e8c97d6f7..21b19587af 100644
@@ -48,7 +48,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_LCD=y
configs/at91sam9x5ek_dataflash_defconfig +0 -1
index b4b25022ab..069cd2a6ae 100644
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9x5ek_mmc_defconfig +0 -1
index c8c027e94b..b7e050feb1 100644
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9x5ek_nandflash_defconfig +0 -1
index 1fb3ff4f4e..3ad4729160 100644
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9x5ek_spiflash_defconfig +0 -1
index 6848bccf29..fa400c898a 100644
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9xeek_dataflash_cs0_defconfig +0 -1
index c935a0ce7c..216ef83d94 100644
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9xeek_dataflash_cs1_defconfig +0 -1
index db34a9247f..42ff46ca5c 100644
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/at91sam9xeek_nandflash_defconfig +0 -1
index 179ab02e26..0e2b544b08 100644
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_USB=y
configs/ethernut5_defconfig +0 -1
index 888bed9b00..80ca4acfd7 100644
@@ -61,6 +61,5 @@ CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
configs/gurnard_defconfig +0 -1
index ce51a0348f..95ccbdefea 100644
@@ -27,7 +27,6 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_BOOTP_BOOTPATH=y
 CONFIG_BOOTP_GATEWAY=y
 CONFIG_BOOTP_HOSTNAME=y
-CONFIG_ATMEL_SPI=y
 CONFIG_PHYLIB=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
configs/meesc_dataflash_defconfig +0 -1
index f4b20fbf6a..4aa9602900 100644
@@ -36,4 +36,3 @@ CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
configs/meesc_defconfig +0 -1
index e1e549693b..9d38247221 100644
@@ -37,4 +37,3 @@ CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
configs/pm9261_defconfig +0 -1
index 9570438aba..cd11aec4f5 100644
@@ -47,7 +47,6 @@ CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
configs/pm9263_defconfig +0 -1
index 38102dcb0d..7d9b3d235c 100644
@@ -45,7 +45,6 @@ CONFIG_SPI_FLASH_DATAFLASH=y
 CONFIG_DM_SERIAL=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
 CONFIG_LCD=y
configs/sama5d27_som1_ek_mmc_defconfig +0 -1
index b90a10c7d3..f0cbba06e8 100644
@@ -77,7 +77,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d2_xplained_mmc_defconfig +0 -1
index e112c31532..a6aa683e6a 100644
@@ -75,7 +75,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d2_xplained_spiflash_defconfig +0 -1
index 232b6bfc6a..c9e0a2746e 100644
@@ -72,7 +72,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d36ek_cmp_mmc_defconfig +0 -1
index 5377f6da49..186f9f4bdb 100644
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_DM_VIDEO=y
configs/sama5d36ek_cmp_nandflash_defconfig +0 -1
index be75fb35b1..83bea11571 100644
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_DM_VIDEO=y
configs/sama5d36ek_cmp_spiflash_defconfig +0 -1
index fd9bf0c549..4d3b83c4f8 100644
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
 CONFIG_DM_VIDEO=y
configs/sama5d3xek_mmc_defconfig +0 -1
index f9aff19e0c..e643eb39e6 100644
@@ -76,7 +76,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d3xek_nandflash_defconfig +0 -1
index 49b229ca08..775fbb51d9 100644
@@ -71,7 +71,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d3xek_spiflash_defconfig +0 -1
index 607e997f79..1f0dbc3c22 100644
@@ -70,7 +70,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d4_xplained_mmc_defconfig +0 -1
index e850a2dd43..ece2b449c6 100644
@@ -71,7 +71,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d4_xplained_nandflash_defconfig +0 -1
index 9c8eedfbaa..b9a4930680 100644
@@ -68,7 +68,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d4_xplained_spiflash_defconfig +0 -1
index a2411abe7d..e96bc73dfb 100644
@@ -70,7 +70,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d4ek_mmc_defconfig +0 -1
index 12b73138c0..7dc1a7ae35 100644
@@ -71,7 +71,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d4ek_nandflash_defconfig +0 -1
index ed24e1724a..8e845586a2 100644
@@ -68,7 +68,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d4ek_spiflash_defconfig +0 -1
index 9e63c4fb25..e533fd6ef2 100644
@@ -67,7 +67,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
 CONFIG_TIMER=y
 CONFIG_SPL_TIMER=y
 CONFIG_ATMEL_PIT_TIMER=y
configs/usb_a9263_dataflash_defconfig +0 -1
index fc0ed319f2..ac3f3e2e58 100644
@@ -42,4 +42,3 @@ CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
 CONFIG_ATMEL_USART=y
 CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
drivers/spi/Kconfig +1 -1
index a3b4a0b2f0..12dde8fb95 100644
@@ -41,7 +41,7 @@ config ATH79_SPI
 
 config ATMEL_SPI
 	bool "Atmel SPI driver"
-	depends on ARCH_AT91
+	default y if ARCH_AT91
 	help
 	  This enables driver for the Atmel SPI Controller, present on
 	  many AT91 (ARM) chips. This driver can be used to access
include/configs/ma5d4evk.h +0 -1
index 4cba7580a2..68fe3bd67f 100644
@@ -86,7 +86,6 @@
  * SPI NOR (boot memory)
  */
 #ifdef CONFIG_CMD_SF
-#define CONFIG_ATMEL_SPI
 #define CONFIG_SPI_FLASH_ATMEL
 #define CONFIG_SF_DEFAULT_BUS		0
 #define CONFIG_SF_DEFAULT_CS		0
include/configs/taurus.h +0 -1
index 51e3987ab3..f138bd2238 100644
@@ -118,7 +118,6 @@
 
 /* SPI EEPROM */
 #define CONFIG_SPI
-#define CONFIG_ATMEL_SPI
 #define TAURUS_SPI_MASK (1 << 4)
 #define TAURUS_SPI_CS_PIN	AT91_PIN_PA3
 
include/configs/vinco.h +0 -1
index 3ae7e9e75b..d1b56ac037 100644
@@ -38,7 +38,6 @@
 /* SerialFlash */
 
 #ifdef CONFIG_CMD_SF
-#define CONFIG_ATMEL_SPI
 #define CONFIG_SPI_FLASH_STMICRO
 #define CONFIG_SF_DEFAULT_BUS		0
 #define CONFIG_SF_DEFAULT_CS		0
Signature · 1 line
2.14.3
#34 lore raw

PATCH 14/14 spi: atmel: default y if DM_SPI && ARCH_AT91

Quoted 5 lines · Jagan Teki

ATMEL_SPI is now fully converted to driver-model and respective boards switch to DM_SPI as well, so make default y for ARCH_AT91

Quoted 748 lines
---
  configs/at91sam9260ek_dataflash_cs0_defconfig  | 1 -
  configs/at91sam9260ek_dataflash_cs1_defconfig  | 1 -
  configs/at91sam9260ek_nandflash_defconfig      | 1 -
  configs/at91sam9261ek_dataflash_cs0_defconfig  | 1 -
  configs/at91sam9261ek_dataflash_cs3_defconfig  | 1 -
  configs/at91sam9261ek_nandflash_defconfig      | 1 -
  configs/at91sam9263ek_dataflash_cs0_defconfig  | 1 -
  configs/at91sam9263ek_dataflash_defconfig      | 1 -
  configs/at91sam9263ek_nandflash_defconfig      | 1 -
  configs/at91sam9263ek_norflash_boot_defconfig  | 1 -
  configs/at91sam9263ek_norflash_defconfig       | 1 -
  configs/at91sam9g10ek_dataflash_cs0_defconfig  | 1 -
  configs/at91sam9g10ek_dataflash_cs3_defconfig  | 1 -
  configs/at91sam9g10ek_nandflash_defconfig      | 1 -
  configs/at91sam9g20ek_2mmc_defconfig           | 1 -
  configs/at91sam9g20ek_2mmc_nandflash_defconfig | 1 -
  configs/at91sam9g20ek_dataflash_cs0_defconfig  | 1 -
  configs/at91sam9g20ek_dataflash_cs1_defconfig  | 1 -
  configs/at91sam9g20ek_nandflash_defconfig      | 1 -
  configs/at91sam9n12ek_mmc_defconfig            | 1 -
  configs/at91sam9n12ek_nandflash_defconfig      | 1 -
  configs/at91sam9n12ek_spiflash_defconfig       | 1 -
  configs/at91sam9rlek_dataflash_defconfig       | 1 -
  configs/at91sam9rlek_mmc_defconfig             | 1 -
  configs/at91sam9rlek_nandflash_defconfig       | 1 -
  configs/at91sam9x5ek_dataflash_defconfig       | 1 -
  configs/at91sam9x5ek_mmc_defconfig             | 1 -
  configs/at91sam9x5ek_nandflash_defconfig       | 1 -
  configs/at91sam9x5ek_spiflash_defconfig        | 1 -
  configs/at91sam9xeek_dataflash_cs0_defconfig   | 1 -
  configs/at91sam9xeek_dataflash_cs1_defconfig   | 1 -
  configs/at91sam9xeek_nandflash_defconfig       | 1 -
  configs/ethernut5_defconfig                    | 1 -
  configs/gurnard_defconfig                      | 1 -
  configs/meesc_dataflash_defconfig              | 1 -
  configs/meesc_defconfig                        | 1 -
  configs/pm9261_defconfig                       | 1 -
  configs/pm9263_defconfig                       | 1 -
  configs/sama5d27_som1_ek_mmc_defconfig         | 1 -
  configs/sama5d2_xplained_mmc_defconfig         | 1 -
  configs/sama5d2_xplained_spiflash_defconfig    | 1 -
  configs/sama5d36ek_cmp_mmc_defconfig           | 1 -
  configs/sama5d36ek_cmp_nandflash_defconfig     | 1 -
  configs/sama5d36ek_cmp_spiflash_defconfig      | 1 -
  configs/sama5d3xek_mmc_defconfig               | 1 -
  configs/sama5d3xek_nandflash_defconfig         | 1 -
  configs/sama5d3xek_spiflash_defconfig          | 1 -
  configs/sama5d4_xplained_mmc_defconfig         | 1 -
  configs/sama5d4_xplained_nandflash_defconfig   | 1 -
  configs/sama5d4_xplained_spiflash_defconfig    | 1 -
  configs/sama5d4ek_mmc_defconfig                | 1 -
  configs/sama5d4ek_nandflash_defconfig          | 1 -
  configs/sama5d4ek_spiflash_defconfig           | 1 -
  configs/usb_a9263_dataflash_defconfig          | 1 -
  drivers/spi/Kconfig                            | 2 +-
  include/configs/ma5d4evk.h                     | 1 -
  include/configs/taurus.h                       | 1 -
  include/configs/vinco.h                        | 1 -
  58 files changed, 1 insertion(+), 58 deletions(-)
configs/at91sam9260ek_dataflash_cs0_defconfig +0 -1
index b41fe5b5fe..ae2293db3e 100644
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9260ek_dataflash_cs1_defconfig +0 -1
index a30a4f6f73..93f76126a6 100644
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9260ek_nandflash_defconfig +0 -1
index 58a3431019..f7585d0565 100644
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9261ek_dataflash_cs0_defconfig +0 -1
index 575e217f3a..bf06d32f55 100644
@@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9261ek_dataflash_cs3_defconfig +0 -1
index 7be7becb1f..ad7791ac45 100644
@@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9261ek_nandflash_defconfig +0 -1
index 353dc0dc7f..079c6955b0 100644
@@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9263ek_dataflash_cs0_defconfig +0 -1
index 418bbfc9e1..06390dce6b 100644
@@ -55,7 +55,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9263ek_dataflash_defconfig +0 -1
index 418bbfc9e1..06390dce6b 100644
@@ -55,7 +55,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9263ek_nandflash_defconfig +0 -1
index 1b3ef9b47c..5c3959e24b 100644
@@ -55,7 +55,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9263ek_norflash_boot_defconfig +0 -1
index 39abe2db76..a26da0064a 100644
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9263ek_norflash_defconfig +0 -1
index 04267354ff..4f08450384 100644
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9g10ek_dataflash_cs0_defconfig +0 -1
index 2382b25cf3..c6cc752728 100644
@@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_USB=y
  CONFIG_USB_STORAGE=y
  CONFIG_LCD=y
configs/at91sam9g10ek_dataflash_cs3_defconfig +0 -1
index 531dde84a4..81b291efab 100644
@@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_USB=y
  CONFIG_USB_STORAGE=y
  CONFIG_LCD=y
configs/at91sam9g10ek_nandflash_defconfig +0 -1
index 4973519da6..9a539315bd 100644
@@ -49,7 +49,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_USB=y
  CONFIG_USB_STORAGE=y
  CONFIG_LCD=y
configs/at91sam9g20ek_2mmc_defconfig +0 -1
index c9ef79b6ff..5f8824ca42 100644
@@ -52,7 +52,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9g20ek_2mmc_nandflash_defconfig +0 -1
index 982ddfd9e7..324f3acf57 100644
@@ -52,7 +52,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9g20ek_dataflash_cs0_defconfig +0 -1
index 36bb9905f4..25bd456e65 100644
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9g20ek_dataflash_cs1_defconfig +0 -1
index de6d39d703..c8cb0af1a4 100644
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9g20ek_nandflash_defconfig +0 -1
index f8d9107025..b4ddf9cdd0 100644
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9n12ek_mmc_defconfig +0 -1
index f1fc70b41e..a253d448e5 100644
@@ -51,7 +51,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9n12ek_nandflash_defconfig +0 -1
index 966d54475f..dc9514592e 100644
@@ -51,7 +51,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9n12ek_spiflash_defconfig +0 -1
index 634e3de83c..acd4a89e2c 100644
@@ -51,7 +51,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9rlek_dataflash_defconfig +0 -1
index e80d43c79d..7f3fd4d2f0 100644
@@ -48,7 +48,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_LCD=y
configs/at91sam9rlek_mmc_defconfig +0 -1
index b18f2d42b0..84c9fa597f 100644
@@ -48,7 +48,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_LCD=y
configs/at91sam9rlek_nandflash_defconfig +0 -1
index 5e8c97d6f7..21b19587af 100644
@@ -48,7 +48,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_LCD=y
configs/at91sam9x5ek_dataflash_defconfig +0 -1
index b4b25022ab..069cd2a6ae 100644
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9x5ek_mmc_defconfig +0 -1
index c8c027e94b..b7e050feb1 100644
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9x5ek_nandflash_defconfig +0 -1
index 1fb3ff4f4e..3ad4729160 100644
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9x5ek_spiflash_defconfig +0 -1
index 6848bccf29..fa400c898a 100644
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9xeek_dataflash_cs0_defconfig +0 -1
index c935a0ce7c..216ef83d94 100644
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9xeek_dataflash_cs1_defconfig +0 -1
index db34a9247f..42ff46ca5c 100644
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/at91sam9xeek_nandflash_defconfig +0 -1
index 179ab02e26..0e2b544b08 100644
@@ -50,7 +50,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_USB=y
configs/ethernut5_defconfig +0 -1
index 888bed9b00..80ca4acfd7 100644
@@ -61,6 +61,5 @@ CONFIG_PINCTRL_AT91=y
  CONFIG_DM_SERIAL=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_USB=y
  CONFIG_USB_STORAGE=y
configs/gurnard_defconfig +0 -1
index ce51a0348f..95ccbdefea 100644
@@ -27,7 +27,6 @@ CONFIG_ENV_IS_IN_NAND=y
  CONFIG_BOOTP_BOOTPATH=y
  CONFIG_BOOTP_GATEWAY=y
  CONFIG_BOOTP_HOSTNAME=y
-CONFIG_ATMEL_SPI=y
  CONFIG_PHYLIB=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
configs/meesc_dataflash_defconfig +0 -1
index f4b20fbf6a..4aa9602900 100644
@@ -36,4 +36,3 @@ CONFIG_PINCTRL_AT91=y
  CONFIG_DM_SERIAL=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
configs/meesc_defconfig +0 -1
index e1e549693b..9d38247221 100644
@@ -37,4 +37,3 @@ CONFIG_PINCTRL_AT91=y
  CONFIG_DM_SERIAL=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
configs/pm9261_defconfig +0 -1
index 9570438aba..cd11aec4f5 100644
@@ -47,7 +47,6 @@ CONFIG_PINCTRL_AT91=y
  CONFIG_DM_SERIAL=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_USB=y
  CONFIG_USB_STORAGE=y
  CONFIG_LCD=y
configs/pm9263_defconfig +0 -1
index 38102dcb0d..7d9b3d235c 100644
@@ -45,7 +45,6 @@ CONFIG_SPI_FLASH_DATAFLASH=y
  CONFIG_DM_SERIAL=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_USB=y
  CONFIG_USB_STORAGE=y
  CONFIG_LCD=y
configs/sama5d27_som1_ek_mmc_defconfig +0 -1
index b90a10c7d3..f0cbba06e8 100644
@@ -77,7 +77,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_SPL_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d2_xplained_mmc_defconfig +0 -1
index e112c31532..a6aa683e6a 100644
@@ -75,7 +75,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_SPL_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d2_xplained_spiflash_defconfig +0 -1
index 232b6bfc6a..c9e0a2746e 100644
@@ -72,7 +72,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_SPL_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d36ek_cmp_mmc_defconfig +0 -1
index 5377f6da49..186f9f4bdb 100644
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_DM_VIDEO=y
configs/sama5d36ek_cmp_nandflash_defconfig +0 -1
index be75fb35b1..83bea11571 100644
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_DM_VIDEO=y
configs/sama5d36ek_cmp_spiflash_defconfig +0 -1
index fd9bf0c549..4d3b83c4f8 100644
@@ -54,7 +54,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
  CONFIG_DM_VIDEO=y
configs/sama5d3xek_mmc_defconfig +0 -1
index f9aff19e0c..e643eb39e6 100644
@@ -76,7 +76,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_SPL_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d3xek_nandflash_defconfig +0 -1
index 49b229ca08..775fbb51d9 100644
@@ -71,7 +71,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_SPL_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d3xek_spiflash_defconfig +0 -1
index 607e997f79..1f0dbc3c22 100644
@@ -70,7 +70,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_SPL_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d4_xplained_mmc_defconfig +0 -1
index e850a2dd43..ece2b449c6 100644
@@ -71,7 +71,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_SPL_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d4_xplained_nandflash_defconfig +0 -1
index 9c8eedfbaa..b9a4930680 100644
@@ -68,7 +68,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_SPL_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d4_xplained_spiflash_defconfig +0 -1
index a2411abe7d..e96bc73dfb 100644
@@ -70,7 +70,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_SPL_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d4ek_mmc_defconfig +0 -1
index 12b73138c0..7dc1a7ae35 100644
@@ -71,7 +71,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_SPL_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d4ek_nandflash_defconfig +0 -1
index ed24e1724a..8e845586a2 100644
@@ -68,7 +68,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_SPL_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
configs/sama5d4ek_spiflash_defconfig +0 -1
index 9e63c4fb25..e533fd6ef2 100644
@@ -67,7 +67,6 @@ CONFIG_DEBUG_UART_BOARD_INIT=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
  CONFIG_TIMER=y
  CONFIG_SPL_TIMER=y
  CONFIG_ATMEL_PIT_TIMER=y
configs/usb_a9263_dataflash_defconfig +0 -1
index fc0ed319f2..ac3f3e2e58 100644
@@ -42,4 +42,3 @@ CONFIG_PINCTRL_AT91=y
  CONFIG_DM_SERIAL=y
  CONFIG_ATMEL_USART=y
  CONFIG_DM_SPI=y
-CONFIG_ATMEL_SPI=y
drivers/spi/Kconfig +1 -1
index a3b4a0b2f0..12dde8fb95 100644
@@ -41,7 +41,7 @@ config ATH79_SPI
 
  config ATMEL_SPI
  	bool "Atmel SPI driver"
-	depends on ARCH_AT91
+	default y if ARCH_AT91
  	help
  	  This enables driver for the Atmel SPI Controller, present on
  	  many AT91 (ARM) chips. This driver can be used to access
include/configs/ma5d4evk.h +0 -1
index 4cba7580a2..68fe3bd67f 100644
@@ -86,7 +86,6 @@
   * SPI NOR (boot memory)
   */
  #ifdef CONFIG_CMD_SF
-#define CONFIG_ATMEL_SPI
  #define CONFIG_SPI_FLASH_ATMEL
  #define CONFIG_SF_DEFAULT_BUS		0
  #define CONFIG_SF_DEFAULT_CS		0
include/configs/taurus.h +0 -1
index 51e3987ab3..f138bd2238 100644
@@ -118,7 +118,6 @@
 
  /* SPI EEPROM */
  #define CONFIG_SPI
-#define CONFIG_ATMEL_SPI
  #define TAURUS_SPI_MASK (1 << 4)
  #define TAURUS_SPI_CS_PIN	AT91_PIN_PA3
 
include/configs/vinco.h +0 -1
index 3ae7e9e75b..d1b56ac037 100644
@@ -38,7 +38,6 @@
  /* SerialFlash */
 
  #ifdef CONFIG_CMD_SF
-#define CONFIG_ATMEL_SPI
  #define CONFIG_SPI_FLASH_STMICRO
  #define CONFIG_SF_DEFAULT_BUS		0
  #define CONFIG_SF_DEFAULT_CS		0
#35 lore raw

PATCH 14/14 spi: atmel: default y if DM_SPI && ARCH_AT91

In reply to Jagan Teki
Quoted 6 lines · Jagan Teki

ATMEL_SPI is now fully converted to driver-model and respective boards switch to DM_SPI as well, so make default y for ARCH_AT91

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180406/81e865ae/attachment.sig>
author
#36 lore raw

cover at91: Add boards with OF_CONTROL/DM/DM_SPI

In reply to Jagan Teki

Hi Heiko,

Quoted 10 lines · Jagan Teki

This series add support for missing at91 board with
- OF_CONTROL
- DM
- DM_SPI
- Drop non-dm code from atmel_spi

Boards like taurus, vinco and ma5d4evk need move GPIO code into drivers instead of configuring them in board file. request to board maintainers to do this job.

Quoted 15 lines

Jagan Teki (14):
spi: atmel: Add ifdef for DM_GPIO code
at91: gurnard: Enable DM_SPI
configs: gurnard: Move CONFIG_ATMEL_SPI to defconfigs
at91: taurus: Enable DM_SPI
at91: vinco: Enable DM
at91: vinco: Add FDT support
at91: vinco: Enable DM_SPI
at91: ma5d4evk: Enable DM
at91: ma5d4evk: Add FDT support
at91: ma5d4evk: Enable DM_SPI
at91: ma5d4evk: Enable SPL_DM and SPL_OF_CONTROL
spi: atmel: Drop non-dm code
spi: atmel: Drop atmel_spi.h
spi: atmel: default y if DM_SPI && ARCH_AT91

axm_defconfig and taurus_defconfig showing in an issue of SPL size, if we enable DM_SPL and PLATDATA with resulting size increased by 12.5K. Can you do anything with this? I see the defconfig build both SPI_FLASH and NAND flash in SPL, does this board support both boot modes if so better separating this defconfig into spi_flash and nand would may reduce the size? what do you think.

Jagan.