summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2017-10-20Convert CONFIG_NAND_OMAP_GPMC et al and CONFIG_NAND_MXC to KconfigAdam Ford
This converts the following to Kconfig: CONFIG_NAND_MXC CONFIG_NAND_OMAP_GPMC CONFIG_NAND_OMAP_GPMC_PREFETCH CONFIG_NAND_OMAP_ELM CONFIG_SPL_NAND_AM33XX_BCH CONFIG_SPL_NAND_SIMPLE CONFIG_SYS_NAND_BUSWIDTH_16BIT Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> [trini: Finish migration of CONFIG_SPL_NAND_SIMPLE, fix some build issues, add CONFIG_NAND_MXC so we can do CONFIG_SYS_NAND_BUSWIDTH_16BIT] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-18Merge git://git.denx.de/u-boot-i2cTom Rini
2017-10-18Merge git://git.denx.de/u-boot-spiTom Rini
2017-10-17i2c: stm32f7_i2c: fix usage of useless local variablePatrice Chotard
Remove useless local variable "s" and use directly function's parameter "output" Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-17i2c: stm32f7_i2c: fix data abortChristophe Kerello
As "v" is a local variable in stm32_i2c_choose_solution() "v" has to be copied into "s" to avoid data abort in stm32_i2c_compute_timing(). Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Reviewed-by: Patrick DELAUNAY <patrick.delaunay@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-17i2c: remove DECLARE_GLOBAL_DATA_PTR from i2c-uclassMasahiro Yamada
No global pointer is used in this file. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2017-10-16usbtty: fix typosHeinrich Schuchardt
Fix typos in USB tty driver. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2017-10-16Drop CONFIG_HAS_DATAFLASHTuomas Tynkkynen
Last user of this option went away in commit: fdc7718999 ("board: usb_a9263: Update to support DT and DM") Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-10-16spi: Drop CONFIG_ATMEL_DATAFLASH_SPITuomas Tynkkynen
Last user of this option went away in commit: fdc7718999 ("board: usb_a9263: Update to support DT and DM") Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Acked-by: Wenyou Yang <wenyou.yang@microchip.com>
2017-10-16mmc: stm32_sdmmc2: increase polling status register delayChristophe Kerello
MMC commands like MMC_CMD_ALL_SEND_CID or MMC_CMD_SEND_CSD can reach 500 us. This patch increases the polling status register delay to avoid a timeout on a command. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-16dm: clk: fix PWR_CR3 register's bit 2 namePatrice Chotard
Fix bit 2 name of PWR_CR3 register to match with the last STM32H7 reference manual available here : http://www.st.com/content/st_com/en/support/resources/ resource-selector.html?querycriteria=productId=SS1951$$ resourceCategory=technical_literature$$resourceType=reference_manual Update also comment about voltage scaling 1 values Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2017-10-16dm: clk: remove CLK() macro for clk_stm32h7Patrice Chotard
CLK() macro is a residue of a previously reworked patch, remove it. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2017-10-15clk: uniphier: add NAND controller clockMasahiro Yamada
This allows the NAND driver to enable clock and get its clock rate. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15mtd: nand: denali_dt: add clock supportMasahiro Yamada
Enable clock in the probe hook. The clock rate will be necessary when setup_data_interface hook is supported. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15reset: uniphier: fix the first argument passed to dev_err()Masahiro Yamada
priv->dev does not exist. Pass the correct pointer to udevice. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15clk: uniphier: add PXs3 clock dataMasahiro Yamada
Add basic clock data for Socionext's new SoC PXs3. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15clk: uniphier: rework for better clock tree structureMasahiro Yamada
U-Boot does not support fancy clock tree structures like the Linux common clock framework. Implement a simple clock tree model at the driver level. With this, the clock data will be simplified. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15i2c: uniphier-f: replace debug() with dev_dbg()Masahiro Yamada
Use dev_dbg() functions. It will be helpful to prefix log messages with the corresponding device name when the core framework is ready. While I am here, I renamed "dev", which was actually private data, into "priv" because dev->dev looks confusing. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15i2c: uniphier: replace debug() with dev_dbg()Masahiro Yamada
Use dev_dbg() functions. It will be helpful to prefix log messages with the corresponding device name when the core framework is ready. While I am here, I renamed "dev", which was actually private data, into "priv" because dev->dev looks confusing. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15usb: dwc3-uniphier: replace <common.h> with <linux/bitops.h>Masahiro Yamada
Including <common.h> pulls in a lot of bloat. What this driver needs is BIT(), so replace it with <linux/bitops.h> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Marek Vasut <marex@denx.de>
2017-10-15pinctrl: uniphier: simplify input enable and delete pin arraysMasahiro Yamada
The pin data are implemented for old SoCs to specify the bit shift of the IECTRL register. They are not wortwhile given the required memory footprint. Delete all the pin data and enable all bits of the IECTRL register. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15pinctrl: uniphier: set PUPD_SIMPLE cap flag for PXs3Masahiro Yamada
Like other recenct UniPhier SoCs, the pupdctrl number of PXs3 matches to the pin number. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15gpio: uniphier: rework single device node modelMasahiro Yamada
First, I implemented this driver as per-bank model, but it was a design mistake. - There are 31 banks in the maximum case. It is painful to add so many nodes to DT. - The IRQ control registers are shared between banks. Per-bank design is a problem for Linux. The counterpart for Linux turned around to the single node model. Rework based on the driver for Linux. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-15mtd: nand: do not check R/B# for CMD_SET_FEATURES in nand_command(_lp)Masahiro Yamada
Set Features (0xEF) command toggles the R/B# pin after 4 sub feature parameters are written. Currently, nand_command(_lp) calls chip->dev_ready immediately after the address cycle because NAND_CMD_SET_FEATURES falls into default: label. No wait is needed at this point. If you see nand_onfi_set_features(), R/B# is already cared by the chip->waitfunc call. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [ Linux commit: c5d664aa5a4c4b257a54eb35045031630d105f49 ]
2017-10-15mtd: nand: do not check R/B# for CMD_READID in nand_command(_lp)Masahiro Yamada
Read ID (0x90) command does not toggle the R/B# pin. Without this patch, NAND_CMD_READID falls into the default: label, then R/B# is checked by chip->dev_ready(). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [ Linux commit: 3158fa0e739615769cc047d2428f30f4c3b6640e ]
2017-10-12drivers: pci: imx: fix imx_pcie_remove functionSven-Ola Tuecke
We have at least a minor count of boards, that failed to re-initialize PCI express in the Linux kernel. Typical failure rate is 20% on affected boards. This is mitigated by commit 6ecbe1375671 ("drivers: pci: imx: add imx_pcie_remove function"). However, at least on some i.MX6 custom boards, when calling assert_core_reset() as part of the first-time PCIe init, read access to PCIE_PL_PFLR simply hangs. Surround this readl() with imx_pcie_fix_dabt_handler() does not help. For this reason, the forced LTSSM detection is only used on the second assert_core_reset() that is called shorly before starting the Linux kernel. Signed-off-by: Sven-Ola Tuecke <sven-ola.tuecke@numberfour.eu> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Tested-by: David Müller <d.mueller@elsoft.ch>
2017-10-11Merge git://git.denx.de/u-boot-i2cTom Rini
2017-10-11i2c: muxes: pca954x: look up width from chip_descChris Packham
Commit 8e6eda7cda6c ("drivers/i2c/muxes/pca954x: Add pca9547 I2C mux support") introduced a chip_desc for the pca954x devices but failed to update pca954x_ofdata_to_platdata() to be aware of it. Make pca954x_ofdata_to_platdata() lookup the chip_desc to validate the device width. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Marek Behun <marek.behun@nic.cz>
2017-10-10Merge branch 'rmobile' of git://git.denx.de/u-boot-shTom Rini
2017-10-09Merge git://git.denx.de/u-boot-dmTom Rini
2017-10-09Merge git://git.denx.de/u-boot-videoTom Rini
2017-10-08dm: ofnode: query correct property in livetree ofnode_get_addr_sizeKlaus Goger
The livetree codepath of ofnode_get_addr_size always used the "reg" property for of_get_property. Use the property parameter of the function call instead and check the return value if the property exists. Otherwise return FDT_ADDR_T_NONE. This was discoverd while using SPI NOR with livetree. spi_flash_decode_fdt checks for memory-map and will not fail with livetree even if the property does not exist. Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-08dm: core: Round up size when allocating so that it is cache line alignedFaiz Abbas
The size variable may not be always be a mulitple of ARCH_DMA_MINALIGN and using it to flush cache leads to cache misaligned warnings. Therefore, round up the size to a multiple of ARCH_DMA_MINLAIGN when allocating private data. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-08dm: gpio: pca953x: Drop pointless data structure checksSimon Glass
These checks cannot fail since driver model will not call a driver's method if it cannot fully create the driver data structures. It is confusing to have these checks and others might copy them. Drop this code. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-10-08dm: gpio: Correct use of -ENODEV in driversSimon Glass
In U-Boot -ENODEV means that there is no device. When there is a problem with the device, drivers should return an error like -ENXIO or -EREMOTEIO. When the device tree properties cannot be read correct , they should return -EINVAL. Update various GPIO drivers to follow this rule, to help with consistency for future driver writers. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Adam Ford <aford173@gmail.com>
2017-10-08dm: gpio: Add a comment about not copying some driversSimon Glass
These three drivers all use U_BOOT_DEVICE rather than device tree to create devices, so have to do manual allocation of platform data. This is not true for new platforms. Add a more explicit comment so that people do not copy this approach with new boards. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Adam Ford <aford173@gmail.com>
2017-10-08dm: gpio: vybrid_gpio: Correct driver's use of bind() methodSimon Glass
It does not look like this driver needs to use a bind() method. It does not manually create devices with device_bind() nor does it create devices using U_BOOT_DEVICE(). It seems to only use device tree. Therefore the manual allocation of platform data is not needed and is confusing. Also platform data should be set up by the ofdata_to_platdata() method, not bind(). Update the driver in case others use it as a model in future. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Adam Ford <aford173@gmail.com>
2017-10-08dm: mmc: remove DM_MMC_OPS for STM32_SDMMCPatrice Chotard
Since e7881d85 "dm: mmc: Drop CONFIG_DM_MMC_OPS" DM_MMC_OPS is no more used, remove it from STM32_SDMMC2 dependencies Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08serial: stm32x7: remove useless CONFIG_CLK and OF_CONTROL flagPatrice Chotard
This driver is currently used by STM32F7 and STM32H7 SoCs. As CONFIG_CLK and OF_CONTROL flags are set by default for these 2 SoCs, this flag becomes useless in this driver, so remove it. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08serial: stm32x7: add STM32F4 supportPatrice Chotard
stm32f4 doesn't support FIFO and OVERRUN feature. The enable bit is not at the same location in CR1 register than for STM32F7 and STM32H7. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08serial: stm32x7: add fifo support for STM32H7Patrice Chotard
Add fifo mode support for rx and tx. As only STM32H7 supports this feature, add has_fifo flag to uart configuration to use fifo only when possible. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08serial: stm32x7: prepare the ground to STM32F4 supportPatrice Chotard
STM32F4 serial IP is similar to F7 and H7, but registers are not located at the same offset and some feature are only supported by F7 and H7 version. Registers offset must be added for each version and also some flags indicated the supported feature. Update registers name to match with datasheet (sr to isr, rx_dr to rdr and tx_dr to tdr) and remove unused regs (cr2, gtpr, rtor, and rqr). Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-10-08serial: stm32x7: remove stm32f7-usart and stm32h7-usart compatiblePatrice Chotard
This patch remove the extra compatibility string "st,stm32h7-usart" and "st,stm32f7-usart" to avoid confusion, save some time & space. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2017-10-08serial: stm32x7: cleanup codePatrice Chotard
Use BIT() macro and GENMASK() macro Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2017-10-06PCI: Add driver for a 'pci-host-ecam-generic' host controllerTuomas Tynkkynen
QEMU emulates such a device with '-machine virt,highmem=off' on ARM. The 'highmem=off' part is required for things to work as the PCI code in U-Boot doesn't seem to support 64-bit BARs. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-10-06pci: layerscape: Use pci_generic_mmap_{read, write}_configTuomas Tynkkynen
Use the new helpers to avoid boilerplate in the driver. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-10-06pci: xilinx: Use pci_generic_mmap_{read, write}_config()Tuomas Tynkkynen
Use the new helper function to avoid boilerplate in the driver. Note that this changes __raw_writel et al. to writel. AFAICT this is no problem because: - The Linux driver for the same hardware uses the non-__raw variants as well (via pci_generic_config_write()). - This driver seems to be used only on MIPS so far, where the __raw and non-__raw accessors are the same. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-10-06pci: Add helper for implementing memory-mapped config space accessesTuomas Tynkkynen
This sort of pattern for implementing memory-mapped PCI config space accesses appears in U-Boot twice already, and a third user is coming up. So add helper functions to avoid code duplication, similar to how Linux has pci_generic_config_write and pci_generic_config_read. Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-10-05Merge git://git.denx.de/u-boot-sunxiTom Rini
2017-10-04dm: replace dm_dbg() with pr_debug()Masahiro Yamada
As we discussed before in ML, dm_dbg() causes undefined reference error if #define DEBUG is added to users, but not drivers/core/util.c We do not need this macro because we can use pr_debug() instead, and it is pretty easy to enable it for the DM core by using ccflags-y. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>