First set of u-boot-atmel fixes for 2020.01 cycle
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJd77jyAAoJEB6zHgIOrC/IyYUH/iAUH4wo5qnOBiQU+MJluaiu D8tMiJH13eW4gWnAqdGrOE9Q763asHIMshQpLK+4eXe4f4mZQ7re4CRNcYJrULeY 2StsJzl4sn/H4P5EiRuUWjkB7wnGRDD6ArH3j1uMJN4lpwCB0ZbqMQZpjt3wI2H4 KuE42d/ll08Aj0AvwdusffLIxlw5M1Z94uQSHoC3UTkPYN4VD5zXgdxv5eH6PZWe paWmHQ0g7fL4UnYGWa0Jpx10SZpcut06dTeVGpsGiEOhaJHvpjYd4JAs/TTUxhFx d5ZRjo1fStYmBXQIblhPNlJQkW4cqa/B+81f5aZbN/1yCijJWS2G8anGtY2ikPs= =f0dF -----END PGP SIGNATURE----- Merge tag 'u-boot-atmel-fixes-2020.01-a' of https://gitlab.denx.de/u-boot/custodians/u-boot-atmel - First set of u-boot-atmel fixes for 2020.01 cycle: This set includes a small fix for gpio bank names, one for removing unused headers (also touches some other boards), and a fix for the QSPI env read on one of the boards.
This commit is contained in:
commit
addb1d9f5d
@ -15,8 +15,6 @@
|
||||
#include <debug_uart.h>
|
||||
#include <env.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <phy.h>
|
||||
#include <micrel.h>
|
||||
#include <spl.h>
|
||||
#include <asm/arch/atmel_mpddrc.h>
|
||||
#include <asm/arch/at91_wdt.h>
|
||||
|
@ -34,8 +34,6 @@
|
||||
#include <linux/fb.h>
|
||||
#include <linux/input.h>
|
||||
#include <malloc.h>
|
||||
#include <micrel.h>
|
||||
#include <miiphy.h>
|
||||
#include <mmc.h>
|
||||
#include <netdev.h>
|
||||
#include <power/pmic.h>
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include <ipu_pixfmt.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/arch/sys_proto.h>
|
||||
#include <micrel.h>
|
||||
#include <asm/mach-imx/mxc_i2c.h>
|
||||
#include <i2c.h>
|
||||
|
||||
|
@ -28,7 +28,6 @@
|
||||
#include <dm/platform_data/serial_mxc.h>
|
||||
#include <fsl_esdhc_imx.h>
|
||||
#include <imx_thermal.h>
|
||||
#include <micrel.h>
|
||||
#include <miiphy.h>
|
||||
#include <netdev.h>
|
||||
#include <cpu.h>
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include <linux/libfdt.h>
|
||||
#include <malloc.h>
|
||||
#include <i2c.h>
|
||||
#include <micrel.h>
|
||||
#include <miiphy.h>
|
||||
#include <mmc.h>
|
||||
#include <netdev.h>
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user