diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/mxc_gpio.c | 4 | ||||
-rw-r--r-- | drivers/i2c/mxc_i2c.c | 3 | ||||
-rw-r--r-- | drivers/mmc/fsl_esdhc.c | 8 | ||||
-rw-r--r-- | drivers/mtd/spi/Kconfig | 44 | ||||
-rw-r--r-- | drivers/net/fec_mxc.c | 20 | ||||
-rw-r--r-- | drivers/power/pmic/Makefile | 1 | ||||
-rw-r--r-- | drivers/power/pmic/pmic_max77696.c | 32 | ||||
-rw-r--r-- | drivers/thermal/imx_thermal.c | 18 | ||||
-rw-r--r-- | drivers/usb/Kconfig | 29 | ||||
-rw-r--r-- | drivers/usb/host/Kconfig | 7 |
10 files changed, 139 insertions, 27 deletions
diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c index 2012f994c8..57a650f750 100644 --- a/drivers/gpio/mxc_gpio.c +++ b/drivers/gpio/mxc_gpio.c @@ -45,11 +45,15 @@ static unsigned long gpio_ports[] = { #endif #if defined(CONFIG_MX27) || defined(CONFIG_MX53) || defined(CONFIG_MX6) [4] = GPIO5_BASE_ADDR, +#ifndef CONFIG_MX6UL [5] = GPIO6_BASE_ADDR, #endif +#endif #if defined(CONFIG_MX53) || defined(CONFIG_MX6) +#ifndef CONFIG_MX6UL [6] = GPIO7_BASE_ADDR, #endif +#endif }; static int mxc_gpio_direction(unsigned int gpio, diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index b3c50aaf30..f1056e21a2 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -523,7 +523,8 @@ static int bus_i2c_write(struct mxc_i2c_bus *i2c_bus, u8 chip, u32 addr, #endif static struct mxc_i2c_bus mxc_i2c_buses[] = { -#if defined(CONFIG_LS102XA) || defined(CONFIG_FSL_LSCH3) +#if defined(CONFIG_LS102XA) || defined(CONFIG_FSL_LSCH3) || \ + defined(CONFIG_VF610) { 0, I2C1_BASE_ADDR, I2C_QUIRK_FLAG }, { 1, I2C2_BASE_ADDR, I2C_QUIRK_FLAG }, { 2, I2C3_BASE_ADDR, I2C_QUIRK_FLAG }, diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index c4719e6f36..0510bf02f4 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -341,6 +341,9 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) err = esdhc_setup_data(mmc, data); if(err) return err; + + if (data->flags & MMC_DATA_READ) + check_and_invalidate_dcache_range(cmd, data); } /* Figure out the transfer arguments */ @@ -437,6 +440,11 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) } } while ((irqstat & DATA_COMPLETE) != DATA_COMPLETE); + /* + * Need invalidate the dcache here again to avoid any + * cache-fill during the DMA operations such as the + * speculative pre-fetching etc. + */ if (data->flags & MMC_DATA_READ) check_and_invalidate_dcache_range(cmd, data); #endif diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig index 4f0c040214..8b730ff3c5 100644 --- a/drivers/mtd/spi/Kconfig +++ b/drivers/mtd/spi/Kconfig @@ -42,6 +42,50 @@ config SPI_FLASH_BAR Bank/Extended address registers are used to access the flash which has size > 16MiB in 3-byte addressing. +if SPI_FLASH + +config SPI_FLASH_ATMEL + bool "Atmel SPI flash support" + help + Add support for various Atmel SPI flash chips (AT45xxx and AT25xxx) + +config SPI_FLASH_EON + bool "EON SPI flash support" + help + Add support for various EON SPI flash chips (EN25xxx) + +config SPI_FLASH_GIGADEVICE + bool "GigaDevice SPI flash support" + help + Add support for various GigaDevice SPI flash chips (GD25xxx) + +config SPI_FLASH_MACRONIX + bool "Macronix SPI flash support" + help + Add support for various Macronix SPI flash chips (MX25Lxxx) + +config SPI_FLASH_SPANSION + bool "Spansion SPI flash support" + help + Add support for various Spansion SPI flash chips (S25FLxxx) + +config SPI_FLASH_STMICRO + bool "STMicro SPI flash support" + help + Add support for various STMicro SPI flash chips (M25Pxxx and N25Qxxx) + +config SPI_FLASH_SST + bool "SST SPI flash support" + help + Add support for various SST SPI flash chips (SST25xxx) + +config SPI_FLASH_WINBOND + bool "Winbond SPI flash support" + help + Add support for various Winbond SPI flash chips (W25xxx) + +endif + config SPI_FLASH_DATAFLASH bool "AT45xxx DataFlash support" depends on SPI_FLASH && DM_SPI_FLASH diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 9225d37285..c5dcbbbced 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -67,13 +67,6 @@ DECLARE_GLOBAL_DATA_PTR; #undef DEBUG -struct nbuf { - uint8_t data[1500]; /**< actual data */ - int length; /**< actual length */ - int used; /**< buffer in use or not */ - uint8_t head[16]; /**< MAC header(6 + 6 + 2) + 2(aligned) */ -}; - #ifdef CONFIG_FEC_MXC_SWAP_PACKET static void swap_packet(uint32_t *packet, int length) { @@ -775,7 +768,6 @@ static int fec_recv(struct eth_device *dev) struct fec_bd *rbd = &fec->rbd_base[fec->rbd_index]; unsigned long ievent; int frame_length, len = 0; - struct nbuf *frame; uint16_t bd_status; uint32_t addr, size, end; int i; @@ -835,12 +827,11 @@ static int fec_recv(struct eth_device *dev) /* * Get buffer address and size */ - frame = (struct nbuf *)readl(&rbd->data_pointer); + addr = readl(&rbd->data_pointer); frame_length = readw(&rbd->data_length) - 4; /* * Invalidate data cache over the buffer */ - addr = (uint32_t)frame; end = roundup(addr + frame_length, ARCH_DMA_MINALIGN); addr &= ~(ARCH_DMA_MINALIGN - 1); invalidate_dcache_range(addr, end); @@ -849,16 +840,15 @@ static int fec_recv(struct eth_device *dev) * Fill the buffer and pass it to upper layers */ #ifdef CONFIG_FEC_MXC_SWAP_PACKET - swap_packet((uint32_t *)frame->data, frame_length); + swap_packet((uint32_t *)addr, frame_length); #endif - memcpy(buff, frame->data, frame_length); + memcpy(buff, (char *)addr, frame_length); net_process_received_packet(buff, frame_length); len = frame_length; } else { if (bd_status & FEC_RBD_ERR) - printf("error frame: 0x%08lx 0x%08x\n", - (ulong)rbd->data_pointer, - bd_status); + printf("error frame: 0x%08x 0x%08x\n", + addr, bd_status); } /* diff --git a/drivers/power/pmic/Makefile b/drivers/power/pmic/Makefile index ae86f041f3..4ad6df36c2 100644 --- a/drivers/power/pmic/Makefile +++ b/drivers/power/pmic/Makefile @@ -9,6 +9,7 @@ obj-$(CONFIG_DM_PMIC) += pmic-uclass.o obj-$(CONFIG_DM_PMIC_MAX77686) += max77686.o obj-$(CONFIG_DM_PMIC_SANDBOX) += sandbox.o i2c_pmic_emul.o obj-$(CONFIG_POWER_LTC3676) += pmic_ltc3676.o +obj-$(CONFIG_POWER_MAX77696) += pmic_max77696.o obj-$(CONFIG_POWER_MAX8998) += pmic_max8998.o obj-$(CONFIG_POWER_MAX8997) += pmic_max8997.o obj-$(CONFIG_POWER_MUIC_MAX8997) += muic_max8997.o diff --git a/drivers/power/pmic/pmic_max77696.c b/drivers/power/pmic/pmic_max77696.c new file mode 100644 index 0000000000..93d92f5794 --- /dev/null +++ b/drivers/power/pmic/pmic_max77696.c @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2015 Freescale Semiconductor, Inc. + * Fabio Estevam <fabio.estevam@freescale.com> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <common.h> +#include <errno.h> +#include <i2c.h> +#include <power/pmic.h> +#include <power/max77696_pmic.h> + +int power_max77696_init(unsigned char bus) +{ + static const char name[] = "MAX77696"; + struct pmic *p = pmic_alloc(); + + if (!p) { + printf("%s: POWER allocation error!\n", __func__); + return -ENOMEM; + } + + p->name = name; + p->interface = PMIC_I2C; + p->number_of_regs = PMIC_NUM_OF_REGS; + p->hw.i2c.addr = CONFIG_POWER_MAX77696_I2C_ADDR; + p->hw.i2c.tx_num = 1; + p->bus = bus; + + return 0; +} diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index 0d893c9d06..3c6c9679f9 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -115,7 +115,7 @@ static int read_cpu_temperature(struct udevice *dev) writel(TEMPSENSE0_FINISHED, &anatop->tempsense0_clr); /* milli_Tmeas = c2 - Nmeas * c1 */ - temperature = (c2 - n_meas * c1)/1000; + temperature = (long)(c2 - n_meas * c1)/1000; /* power down anatop thermal sensor */ writel(TEMPSENSE0_POWER_DOWN, &anatop->tempsense0_set); @@ -130,16 +130,12 @@ int imx_thermal_get_temp(struct udevice *dev, int *temp) int cpu_tmp = 0; cpu_tmp = read_cpu_temperature(dev); - while (cpu_tmp > priv->minc && cpu_tmp < priv->maxc) { - if (cpu_tmp >= priv->critical) { - printf("CPU Temperature (%dC) too close to max (%dC)", - cpu_tmp, priv->maxc); - puts(" waiting...\n"); - udelay(5000000); - cpu_tmp = read_cpu_temperature(dev); - } else { - break; - } + while (cpu_tmp >= priv->critical) { + printf("CPU Temperature (%dC) too close to max (%dC)", + cpu_tmp, priv->maxc); + puts(" waiting...\n"); + udelay(5000000); + cpu_tmp = read_cpu_temperature(dev); } *temp = cpu_tmp; diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index 3fa5b2e37e..716dad478d 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig @@ -1,3 +1,4 @@ +menu USB config USB_ARCH_HAS_HCD def_bool y @@ -59,4 +60,32 @@ config USB_STORAGE Say Y here if you want to connect USB mass storage devices to your board's USB port. +config USB_KEYBOARD + bool "USB Keyboard support" + ---help--- + Say Y here if you want to use a USB keyboard for U-Boot command line + input. + +if USB_KEYBOARD + +choice + prompt "USB keyboard polling" + optional + ---help--- + Enable a polling mechanism for USB keyboard. + + config SYS_USB_EVENT_POLL + bool "Interrupt polling" + + config SYS_USB_EVENT_POLL_VIA_INT_QUEUE + bool "Poll via interrupt queue" + + config SYS_USB_EVENT_POLL_VIA_CONTROL_EP + bool "Poll via control EP" + +endchoice + +endif + endif +endmenu diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 8705c7c44c..b30b43da3b 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -52,6 +52,13 @@ config USB_EHCI if USB_EHCI_HCD +config USB_EHCI_MX6 + bool "Support for i.MX6 on-chip EHCI USB controller" + depends on ARCH_MX6 + default y + ---help--- + Enables support for the on-chip EHCI controller on i.MX6 SoCs. + config USB_EHCI_UNIPHIER bool "Support for UniPhier on-chip EHCI USB controller" depends on ARCH_UNIPHIER && OF_CONTROL |