From 464b50a34302ce56a9f30eb27dcedbf04f233188 Mon Sep 17 00:00:00 2001 From: James Byrne Date: Fri, 15 Nov 2019 17:11:58 +0000 Subject: board: Remove unnecessary inclusion of micrel.h from boards Several boards still unnecessarily included micrel.h but no longer require it since the switch to Device Tree configuration. Signed-off-by: James Byrne --- board/atmel/sama5d3xek/sama5d3xek.c | 2 -- board/kosagi/novena/novena.c | 2 -- board/seco/mx6quq7/mx6quq7.c | 1 - board/toradex/colibri_imx6/colibri_imx6.c | 1 - board/tqc/tqma6/tqma6_wru4.c | 1 - 5 files changed, 7 deletions(-) diff --git a/board/atmel/sama5d3xek/sama5d3xek.c b/board/atmel/sama5d3xek/sama5d3xek.c index 3aa46b1774..7f6a319859 100644 --- a/board/atmel/sama5d3xek/sama5d3xek.c +++ b/board/atmel/sama5d3xek/sama5d3xek.c @@ -15,8 +15,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c index 7eb833cf02..4bec2be43f 100644 --- a/board/kosagi/novena/novena.c +++ b/board/kosagi/novena/novena.c @@ -34,8 +34,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/board/seco/mx6quq7/mx6quq7.c b/board/seco/mx6quq7/mx6quq7.c index c1e36b652e..c0a93175fb 100644 --- a/board/seco/mx6quq7/mx6quq7.c +++ b/board/seco/mx6quq7/mx6quq7.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index 1fd0f2c122..10c595d584 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/board/tqc/tqma6/tqma6_wru4.c b/board/tqc/tqma6/tqma6_wru4.c index 3a5957f760..1320f8ad78 100644 --- a/board/tqc/tqma6/tqma6_wru4.c +++ b/board/tqc/tqma6/tqma6_wru4.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include -- cgit From f3510e9754e1163e74e3606880b5698fcaa08a3a Mon Sep 17 00:00:00 2001 From: James Byrne Date: Tue, 26 Nov 2019 11:52:04 +0000 Subject: gpio: at91_gpio: Add bank names Make the at91_gpio driver set sensible GPIO bank names in the platform data. This makes the 'gpio status' command a lot more useful. Signed-off-by: James Byrne Reviewed-by: Eugen Hristev --- drivers/gpio/at91_gpio.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c index 965becf77a..dbfed72c61 100644 --- a/drivers/gpio/at91_gpio.c +++ b/drivers/gpio/at91_gpio.c @@ -556,6 +556,28 @@ static int at91_gpio_get_function(struct udevice *dev, unsigned offset) return GPIOF_INPUT; } +static const char *at91_get_bank_name(uint32_t base_addr) +{ + switch (base_addr) { + case ATMEL_BASE_PIOA: + return "PIOA"; + case ATMEL_BASE_PIOB: + return "PIOB"; + case ATMEL_BASE_PIOC: + return "PIOC"; +#if (ATMEL_PIO_PORTS > 3) + case ATMEL_BASE_PIOD: + return "PIOD"; +#if (ATMEL_PIO_PORTS > 4) + case ATMEL_BASE_PIOE: + return "PIOE"; +#endif +#endif + } + + return "undefined"; +} + static const struct dm_gpio_ops gpio_at91_ops = { .direction_input = at91_gpio_direction_input, .direction_output = at91_gpio_direction_output, @@ -582,14 +604,15 @@ static int at91_gpio_probe(struct udevice *dev) clk_free(&clk); - uc_priv->bank_name = plat->bank_name; - uc_priv->gpio_count = GPIO_PER_BANK; - #if CONFIG_IS_ENABLED(OF_CONTROL) plat->base_addr = (uint32_t)devfdt_get_addr_ptr(dev); #endif + plat->bank_name = at91_get_bank_name(plat->base_addr); port->regs = (struct at91_port *)plat->base_addr; + uc_priv->bank_name = plat->bank_name; + uc_priv->gpio_count = GPIO_PER_BANK; + return 0; } -- cgit From e50d238a1ce856d3e16bbc279a6e92a0c2b5fb4f Mon Sep 17 00:00:00 2001 From: Swapna Gurumani Date: Mon, 2 Dec 2019 21:06:10 +0000 Subject: configs: sama5d27_som1_ek: Add default config to read ENV from QSPI In the initial SPI flash setup, the default bus mode being used was 3, which is incorrect, causing a CRC error when the ENV was being read from QSPI. Setting the default bus mode to 0 which is the correct mode. Signed-off-by: Swapna Gurumani --- configs/sama5d27_som1_ek_qspiflash_defconfig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configs/sama5d27_som1_ek_qspiflash_defconfig b/configs/sama5d27_som1_ek_qspiflash_defconfig index a77cc9d0e6..7328566797 100644 --- a/configs/sama5d27_som1_ek_qspiflash_defconfig +++ b/configs/sama5d27_som1_ek_qspiflash_defconfig @@ -47,6 +47,14 @@ CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d27_som1_ek" CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dmas dma-names" CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_USE_ENV_SPI_BUS=y +CONFIG_ENV_SPI_BUS=0 +CONFIG_USE_ENV_SPI_CS=y +CONFIG_ENV_SPI_CS=0 +CONFIG_USE_ENV_SPI_MAX_HZ=y +CONFIG_ENV_SPI_MAX_HZ=50000000 +CONFIG_USE_ENV_SPI_MODE=y +CONFIG_ENV_SPI_MODE=0x0 CONFIG_DM=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y -- cgit