aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2019-12-09Merge tag 'u-boot-imx-20191209' of ↵Tom Rini1-1/+1
https://gitlab.denx.de/u-boot/custodians/u-boot-imx Fixes for 2020.01 ----------------- - imx8qxp_mek: increase buffer sizes and args number - Fixes for imx7ulp - imx8mm: Fix the first root clock in imx8mm_ahb_sels[] - colibri_imx7: reserve DDR memory for Cortex-M4 - vining2000: fixes and convert to ethernet DM - imx8m: fix rom version check to unbreak some B0 chips - tbs2910: Disable VxWorks image booting support
2019-12-06rtc: move date.c from drivers/rtc/ to lib/AKASHI Takahiro3-101/+1
In the next commit, rtc_mktime(), for compatibility with linux, will be implemented using rtc_mktime(), which is no longer drivers/rtc specific. So move this file under lib/. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2019-12-06Merge tag 'u-boot-rockchip-20191206' of ↵Tom Rini6-20/+652
https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip - rockchip pwm driver update to support all the SoCs - RK3308 GMAC and pinctrl support - More UART interface support on PX30 and pmugrf reg fix - Fixup on misc for eth_addr/serial# - Other updates on variant SoCs
2019-12-06clk: imx: imx8mm: Fix the first root clock in imx8mm_ahb_sels[]Frieder Schrempf1-1/+1
The 24MHz oscillator clock is referenced by "clock-osc-24m" and not "osc_24m". Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-12-06pinctrl: rockchip: Add pinctrl support for rk3308David Wu4-1/+468
An iomux register contains 8 pins, each of which is represented by 2 bits, but the register offset is 0x8. For example, GRF_GPIO0A_IOMUX offset is 0x0, but GRF_GPIO0B_IOMUX offset is 0x8, the offset 0x4 is reserved. So add a type IOMUX_8WIDTH_2BIT to calculate offset. Signed-off-by: David Wu <david.wu@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-12-06pwm: rk_pwm: Make PWM driver to support all Rockchip SocsDavid Wu1-19/+119
This PWM driver can be used to support pwm functions for on all Rockchip Socs. The previous chips than RK3288 did not support polarity, and register layout was different from the RK3288 PWM. The RK3288 keep the current functions. RK3328 and the chips after it, which can support hardware lock, configure duty, period and polarity at next same period, to prevent the intermediate temporary state. Signed-off-by: David Wu <david.wu@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-12-06net: gmac_rockchip: Add support for rk3308David Wu1-0/+65
Add the glue code to allow the rk3308 variant of the Rockchip gmac to provide network functionality. Signed-off-by: David Wu <david.wu@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-12-05Fix typo in macros, "FIRMEWARE" -> "FIRMWARE"Thomas Hebb1-2/+2
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
2019-12-05drivers: optee: rpmb: fix returning CID to TEEJorge Ramirez-Ortiz1-1/+4
The mmc CID value is one of the input parameters used to provision the RPMB key. The trusted execution environment expects this value to be specified in big endian format. Before this fix, on little endian systems, the value returned by the linux kernel mmc driver differed from the one returned by u-boot. This meant that if linux provisioned the RPMB key, u-boot would not have access to the partition (and the other way around). Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
2019-12-05drivers: pci: ignore disabled devicesMichael Walle1-0/+5
PCI devices may be disabled in the device tree. Devices which are probed by the device tree handle the "status" property and are skipped if disabled. Devices which are probed by the PCI enumeration don't check that property. Fix it. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Alex Marginean <alexandru.marginean@nxp.com> Tested-by: Alex Marginean <alexandru.marginean@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-12-04mtd: Makefile: deep cleanupMiquel Raynal3-21/+43
Move MTD-related lines out of the root Makefile. Put them in their respective directories. Enclose some of these new lines to skip them when building the SPL. MTD core files and some MTD device drivers are compiled in a mtd.o object and included in the final object only if MTD support is required (there are two different symbols for that, one for U-Boot and one for the SPL). Now that all defconfigs have been fixed, we can stop the logic where enabling a command selects the core files to compile. This logic is broken since selecting a symbol with a 'depends on' will not enforce this secondary dependency. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-12-04cmd: nand/sf: isolate legacy codeMiquel Raynal2-95/+1
The 'sf' command is not supposed to rely on the MTD stack, but both 'sf' and 'nand' commands use helpers located in mtd_uboot.c. Despite their location, these functions do not depend at all on the MTD stack. This file (drivers/mtd/mtd_uboot.c) is only compiled if CONFIG_MTD is selected, which is inconsistent with the current situation. Solve this by moving these three functions (which are only used by the above two commands) out of mtd_uboot.c and put them in a C file only compiled with cmd/sf.c and cmd/nand.c. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> [trini: Don't export get_part function now] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-04mtd: spi: SPI_FLASH_MTD depends on MTDMiquel Raynal1-1/+1
It is already the case that all defconfigs with SPI_FLASH_MTD also declare using MTD, but let's make this consistent and enforce it in Kconfig. Most of the time SPI_FLASH_MTD is used in conjunction with UBI, which already depends on MTD. Suggested-by: Vignesh R <vigneshr@ti.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-12-04dfu: add dependency on the raw NAND coreMiquel Raynal1-0/+1
CONFIG_DFU_NAND needs the raw NAND core being compiled. Also fix the colibri_vf defconfig to reflect this dependency. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04mtd: nand: add includes in NAND core to avoid warningsMiquel Raynal2-0/+2
Because of the include's game, when some files are compiled for a SPI NAND device, no warning appears. But when it is for a raw NAND device, GCC complains. Fix these warning by including <common.h>. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-03mtd: rename CONFIG_MTD_DEVICE -> CONFIG_MTDMiquel Raynal4-9/+9
Like in Linux, just use CONFIG_MTD to compile the MTD stack. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-03mtd: rename CONFIG_MTD -> CONFIG_DM_MTDMiquel Raynal6-12/+12
CONFIG_MTD must be reserved for the MTD core. Like any other subsystem, prefix the symbol by DM when it comes to DM support. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> [trini: Add Kconfig files] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-03mtd: rename CONFIG_NAND -> CONFIG_MTD_RAW_NANDMiquel Raynal2-4/+4
Add more clarity by changing the Kconfig entry name. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> [trini: Re-run migration, update a few more cases] Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-03Merge tag 'dm-pull-3dec19' of https://gitlab.denx.de/u-boot/custodians/u-boot-dmTom Rini1-17/+19
Fix stdout-path handling
2019-12-03pinctrl: add driver for MT8518mingming lee3-0/+416
Add Pinctrl driver for MediaTek MT8518 SoC. Signed-off-by: mingming lee <mingming.lee@mediatek.com>
2019-12-03mmc: mtk-sd: Adjust the mmc tuning flowmingming lee1-16/+193
1.Support cmd response and data tuning together. 2.Support hs400 cmd responese tuning. Signed-off-by: mingming lee <mingming.lee@mediatek.com>
2019-12-03clk: mediatek: add driver for MT8518mingming lee2-0/+1559
Add clock driver for MediaTek MT8518 SoC. Signed-off-by: mingming lee <mingming.lee@mediatek.com>
2019-12-03regmap: Fix potential memory leaksFaiz Abbas1-4/+12
Free allocated memory in case of an error in regmap_init_mem() and regmap_init_mem_index(). Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2019-12-03net: cpsw: Add NULL pointer checkFaiz Abbas1-0/+3
Add null pointer check to take care of out of memory errors. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
2019-12-03mmc: davinci: fix mmc boot in SPLBartosz Golaszewski1-0/+17
The MMC boot is currently broken on omapl138-lcdk after enabling the driver model in SPL. The main problem is the driver's bind callback not being called after probe in SPL (even with the DM_FLAG_PRE_RELOC flag specified). While a proper fix is still being worked on, this hacky changeset at least fixes the MMC boot on this platform by calling mmc_bind() manually from probe(). Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-12-03mmc: davinci: drop struct davinci_mmc_platBartosz Golaszewski1-10/+4
struct mmc_config & struct mmc don't need to be exported over platform data, but can instead be private in the driver. Remove struct davinci_mmc_plat. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-12-03mmc: davinci: drop support for ti,dm6441-mmcBartosz Golaszewski1-37/+5
The DM family of DaVinci SoCs is no longer supported. Drop the irrelevant code from the driver. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-12-03blk: Make use of CONFIG_HAVE_BLOCK_DEVICE moreTom Rini1-1/+1
When we do not have CONFIG_BLK (or SPL/TPL) enabled there are very few cases where we need the blk_legacy code linked in. To catch these, build when we have CONFIG_HAVE_BLOCK_DEVICE set. In addition, we only need cmd/blk_common.o to be linked in when we have CONFIG_HAVE_BLOCK_DEVICE set, so make use of that directly. Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-03mtd: mtdcore: Drop unused mtd_tableTom Rini1-2/+0
The array 'mtd_table' is unused in the code. Remove this as gcc doesn't always discard unused global variables. Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-03pci: Only link pci_rom.o in some casesTom Rini1-2/+2
The content of pci_rom.c is only used in a few cases. Only build and link in these cases to avoid a global variable as gcc doesn't always discard those when they are unused. Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-03Convert CONFIG_SYS_CORTINA_FW_IN_MMC et al to KconfigTom Rini1-0/+22
This converts the following to Kconfig: CONFIG_SYS_CORTINA_FW_IN_MMC CONFIG_SYS_CORTINA_FW_IN_NAND CONFIG_SYS_CORTINA_FW_IN_NOR CONFIG_SYS_CORTINA_FW_IN_REMOTE CONFIG_SYS_CORTINA_FW_IN_SPIFLASH Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-03Kconfig: make TPL_DM_SERIAL depend on TPL_DMThomas Hebb1-1/+1
This missing dependency seems like an oversight, since all other TPL_DM_* options have it. Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
2019-12-02common: Move old EEPROM functions into a new headerSimon Glass3-0/+3
These functions do not use driver model but are still used. Move them to a new eeprom.h header file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move pci_init_board() out of common.hSimon Glass2-0/+2
This function can be dropped when all boards use driver model for PCI. For now, move it into init.h with a comment. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move board_get_usable_ram_top() out of common.hSimon Glass2-0/+2
Move this function into init.h which seems to be designed for this sort of thing. Also update the header to declare struct global_data so that it can be included without global_data.h being needed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move command functions out of common.hSimon Glass6-0/+6
Move these functions into the command.h header file which is a better fit. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move enable/disable_interrupts out of common.hSimon Glass2-0/+2
Move these two functions into the irq_funcs.h header file. Also move interrupt_handler_t as this is used by the irq_install_handler() function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move interrupt functions into a new headerSimon Glass2-0/+2
These functions do not use driver model but are fairly widely used in U-Boot. But it is not clear that they will use driver model anytime soon, so we don't want to label them as 'legacy'. Move them to a new irq_func.h header file. Avoid the name 'irq.h' since it is widely used in U-Boot already. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move ARM cache operations out of common.hSimon Glass87-0/+89
These functions are CPU-related and do not use driver model. Move them to cpu_func.h Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move some cache and MMU functions out of common.hSimon Glass4-0/+4
These functions belong in cpu_func.h. Another option would be cache.h but that code uses driver model and we have not moved these cache functions to use driver model. Since they are CPU-related it seems reasonable to put them here. Move them over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move mii_init() function out of common.hSimon Glass7-0/+7
This function belongs in mii.h so move it over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move get_ticks() function out of common.hSimon Glass21-0/+21
This function belongs in time.h so move it over and add a comment. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move wait_ticks functions out of common.hSimon Glass1-0/+1
This function belongs in time.h so move it over and add a comment. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move some time functions out of common.hSimon Glass2-0/+2
These functions belong in time.h so move them over and add comments. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move serial_printf() to the serial headerSimon Glass6-1/+7
Move this function header to serial.h since this function is clearly related to serial. The function itself stays in console.c since we don't have a single serial file. DM and non-DM each has a separate file so we would have to either create a new common serial file, or repeat the function in both serial.c and serial-uclass.c, neither of which seem worthwhile. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02serial: usb: Correct the usbtty_...() prototypesSimon Glass1-0/+1
The function declarations in serial.h are not in sync with what is currently used in usbtty. Fix this by updating the header and including it, to help catch future such problems. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02Move strtomhz() to vsprintf.hSimon Glass3-0/+3
At present this function sits in its own file but it does not really justify it. There are similar string functions in vsprintf.h, so move it there. Also add the missing function comment. Use the vsprintf.h include file explicitly where needed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02crc32: Use the crc.h header for crc functionsSimon Glass11-0/+11
Drop inclusion of crc.h in common.h and use the correct header directly instead. With this we can drop the conflicting definition in fw_env.h and rely on the crc.h header, which is already included. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Drop linux/crc8.hSimon Glass2-2/+2
We have an existing U-Boot header for the one function that this defines. Use that instead of the linux/ one. Move over the nice comment. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02status_led: Tidy up the code styleSimon Glass1-4/+4
There are a few whitespace problems with this code. Tidy them up. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>