summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2017-07-11dm: ahci: Unwind the confusing init codeSimon Glass
Two AHCI drivers use SCSI with CONFIG_DM_SCSI. The SCSI uclass calls scsi_low_level_init() which is implemented by ahci.c. If CONFIG_SCSI_AHCI_PLAT is defined it does one thing and if it is not it does something else. We don't need to call through scsi_low_level_init() to get the init completed. Instead, adjust the two drivers to call into AHCI directly. Drop the post-probe init in the SCSI uclass. This means that driver model doesn't need to use scsi_low_level_init(). It is a legacy function and driver model should use a driver's probe() method instead. While we are here, add a comment to the top of the file explaining what ahci.c does. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11dm: ahci: Move common code for starting ports into a functionSimon Glass
This code is duplicated. Create a ahci_start_ports() function to handle this and call it from both places. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11dm: scsi: Indent the confusing #ifdefsSimon Glass
These are very confusing without some sort of indentation. At some point we will be able to remove them, but for now, indent them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11dm: ahci: Refactor to avoid static variablesSimon Glass
With driver model we need each device to have its own state. As a step towards this, restrict use of the global 'probe_ent' to just a few places in the file. This will allow us to add driver-model functions which can pass the correct data around. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11dm: sata: Move ataid into struct ahci_uc_privSimon Glass
This array relates to the AHCI controller so should be exist out on its own in the file. Move it into the structure. Adjust functions that need access to this to take the structure as a parameter. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11dm: ahci: Rename struct ahci_probe_entSimon Glass
This is not a very useful name since once it is probed it still hangs around. With driver model we will use uclass data for this, so rename the struct. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11dm: scsi: Use the uclass platform dataSimon Glass
At present the two driver-model SCSI drivers use device platform data to store information that relates to the uclass. It is better to use uclass platform data in this situation. Update the code to do this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11dm: scsi: Drop the ccb typedefSimon Glass
We should not be using typedefs in U-Boot and 'ccb' is a pretty short name. It is also used with variables. Drop the typedef and use 'struct' instead. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11dm: scsi: Rename struct SCSI_cmd_block to struct scsi_cmdSimon Glass
This name should be lower case. Also the _block suffix is superfluous. Rename it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11scsi: Move drivers into new drivers/scsi directorySimon Glass
At present we have the SCSI drivers in the drivers/block and common/ directories. It is better to split them out into their own place. Use drivers/scsi which is what Linux does. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11sata: Move drivers into new drivers/ata directorySimon Glass
At present we have the SATA and PATA drivers mixed up in the drivers/block directory. It is better to split them out into their own place. Use drivers/ata which is what Linux does. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11Kconfig: Add CONFIG_SATA to enable SATASimon Glass
At present CONFIG_CMD_SATA enables the 'sata' command which also brings in SATA support. Some boards may wish to enable SATA without the command. Add a separate CONFIG to permit this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11scsi: Drop scsi_print_error()Simon Glass
This function is only defined by one driver and is empty. Move it into the SCSI implementation itself. We could remove it, but it should be useful for debugging. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11scsi: Drop sym53c8xx driverSimon Glass
This driver is for a PowerPC board that will likely be removed soon. Rather than converting it to driver model, drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11Convert CONFIG_SCSI to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_SCSI Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11dm: core: Add uclass_first/next_device_check()Simon Glass
Sometimes it is useful to iterate through all devices in a uclass and skip over those which do not work correctly (e.g fail to probe). Add two new functions to provide this feature. The caller must check the return value each time to make sure that the device is valid. But the device pointer is always returned. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-11dm: core: Clarify uclass_first/next_device() commentsSimon Glass
These are not as clear as they could be. Tidy them up a bit. Also fix a tiny code-style nit. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-10pipe3: Fix broken dependencyJean-Jacques Hiblot
ARCH_OMAP2 has been renamed ARCH_OMAP2PLUS in commit a93fbf4a7892 ("ARM: omap2+: rename config to ARCH_OMAP2PLUS and consolidate Kconfig") Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-07-10mtd: stm32: use parameter instead of default valuePatrice Chotard
To set wait state, a hard coded value is used instead of using latency parameter. stm32_flash_latency_cfg() is currently used in arch/arm/mach-stm32/stm32f4/clock.c and in drivers/clk/clk_stm32f7.c with, in both case, "5" as parameter. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-07-10driver: mmc: update debug infoJorge Ramirez-Ortiz
This driver is used in another board; remove board information from the driver debug log. Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-10pinctrl: stm32: add set_state opsChristophe Kerello
set_state_ops is kept under PINCTRL_FULL flag in order to decrease memory footprint in some configuration. PINCTRL_FULL can be enabled for debug purpose. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-07-10pinctrl: stm32: handle a configuration listChristophe Kerello
This patch handles a configuration list behind pinctrl-0 like pinctrl-0 = <&qspi_clk_a &qspi_bk1_a &qspi_bk2_a>; Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
2017-07-08powerpc, 8xx: Add support for MCR3000 board from CSSIChristophe Leroy
CS Systemes d'Information (CSSI) manufactures two boards, named MCR3000 and CMPC885 which are respectively based on MPC866 and MPC885 processors. This patch adds support for the first board. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-08powerpc, 8xx: move Serial driver to drivers/serial/Christophe Leroy
At the same time, move to Kconfig Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-08powerpc, 8xx: move SPI driver to drivers/spi/Christophe Leroy
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-08powerpc, 8xx: move FEC Ethernet driver in drivers/netChristophe Leroy
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-08powerpc, 8xx: Migrate to KconfigChristophe Leroy
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Heiko Schocher <hs@denx.de>
2017-07-07wdt: Unify option of timeout valueAndy Shevchenko
There is no need to duplicate same option with different name. Kill HW_WATCHDOG_TIMEOUT_MS in favor of WATCHDOG_TIMEOUT_MSECS. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2017-07-07wdt: Fix spelling Resettting -> ResettingAndy Shevchenko
Fix spelling Resettting -> Resetting. No functional change intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2017-07-06avr32: Retire AVR32 for goodAndy Shevchenko
AVR32 is gone. It's already more than two years for no support in Buildroot, even longer there is no support in GCC (last version is heavily patched 4.2.4). Linux kernel v4.12 got rid of it (and v4.11 didn't build successfully). There is no good point to keep this support in U-Boot either. Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-07-06gpio: add static to get_function()Masahiro Yamada
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-06serial: make serial_stub_* to static functionsMasahiro Yamada
Add missing static to serial_stub_puts(). Unexport serial_stub_{getc,tstc} because they are used locally. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-03powerpc: remove 4xx supportHeiko Schocher
There was for long time no activity in the 4xx area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in 4xx, so remove it. Signed-off-by: Heiko Schocher <hs@denx.de>
2017-07-03drivers, block: remove sil680 driverHeiko Schocher
driver is not used anymore, so remove it. Signed-off-by: Heiko Schocher <hs@denx.de>
2017-06-29drivers, usb, gadget: fix compiler warnings for at91_udc.cHeiko Schocher
fix warnings: drivers/usb/gadget/at91_udc.c:1344:12: warning: 'at91rm9200_udc_init' defined but not used [-Wunused-function] drivers/usb/gadget/at91_udc.c:1379:13: warning: 'at91rm9200_udc_pullup' defined but not used [-Wunused-function] drivers/usb/gadget/at91_udc.c:1476:12: warning: 'at91sam9263_udc_init' defined but not used [-Wunused-function] Signed-off-by: Heiko Schocher <hs@denx.de>
2017-06-29usb: gadget: Call g_dnl_bind_fixup() before testing g_dnl_serial lengthLukasz Majewski
After the commit SHA1: 842778a091 - the serial number descriptor is only visible when we have non zero length of g_dnl_serial. However, on some platforms (e.g. Siemens) the serial number is set at g_dnl_bind_fixup(), so with the current code we will always omit the serial (since it is not set). This commit moves the g_dnl_bind_fixup() call before the g_dnl_serial length test. Signed-off-by: Lukasz Majewski <lukma@denx.de> Acked-by: Heiko Schocher <hs@denx.de> Tested-by: Heiko Schocher <hs@denx.de>
2017-06-28ti816x: Enable ethernet supportTom Rini
The ti816x SoC revision of the ethernet IP block is handled by the "davinci_emac" driver, rather than the "cpsw" driver as done by later members of the family. Enable the relevant plumbing. Signed-off-by: Sriramakrishnan <srk@ti.com> Signed-off-by: Vitaly Wool <vitaly.wool@konsulko.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-06-27Merge git://git.denx.de/u-boot-x86Tom Rini
2017-06-27Merge git://www.denx.de/git/u-boot-imxTom Rini
Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: include/configs/imx6qdl_icore_rqs.h include/configs/imx6ul_geam.h include/configs/imx6ul_isiot.h
2017-06-27Revert "x86: Convert MMC to driver model"Bin Meng
This reverts commit ddb3ac3c716f56cead695444e65a7ba7b0946555. With MMC converted to driver model, SCSI driver is broken due to zero address access at (ops->read) in block_dread() function. The fix (SCSI driver converted to DM) is ready in u-boot-dm branch, but it is too late for this relese to get that in. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-26Merge branch 'master' of git://git.denx.de/u-boot-i2cTom Rini
2017-06-26i2c_eeprom: add static to i2c_eeprom_std_ops/probeMasahiro Yamada
These are only used in drivers/mis/i2c_eeprom.c Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-06-24Merge git://git.denx.de/u-boot-uniphierTom Rini
- fix sparse warnings - sync DT with Linux - add new board support (LD11/LD20 global)
2017-06-24ARM: uniphier: fix various sparse warningsMasahiro Yamada
Fix warnings reported by sparse: - ... was not declared. Should it be static?" - cast to restricted __be32 While fixing those, the type conflict of cci500_init() was found. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-06-23Merge branch 'master' of git://git.denx.de/u-boot-rockchipTom Rini
2017-06-23rockchip: clk: rk3036: correct setting for pll integer modeKever Yang
According to rk3036 TRM, pll_con1[12] should be set to '1' for the pll integer mode, while the '0' means the frac mode. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-06-23serial, kconfig: fix menutextHeiko Schocher
fix menutext for the options SPL_DM_SERIAL and TPL_DM_SERIAL. Both have the same text as DM_SERIAL, which is confusing. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Stefan Roese <sr@denx.de>
2017-06-23mtd: OneNAND: Fix onenand_block_markbadLadislav Michl
commit dfe64e2c89731a3f9950d7acd8681b68df2bae03 Author: Sergey Lapin <slapin@ossfans.org> Date: Mon Jan 14 03:46:50 2013 +0000 mtd: resync with Linux-3.7.1 modified onenand_block_markbad to call mtd_block_markbad, but as _block_markbad function pointer used by mtd_block_markbad to do actual job is by default pointing back to onenand_block_markbad there is no way this function ever finishes its job. Fix it by changing function body according current (4.12-rc6) linux implementation. Tested on IGEPv2 board with Muxed OneNAND(DDP) 512MB containing several unerasable blocks this function marked bad. Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
2017-06-23onenand_spl_simple: Add DDP OneNAND supportLadislav Michl
Current implementation is unable to access second half of DDP OneNAND flash (reads first half mirrored). Use block and bufferram address calculations from onenand_base to fix this. Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
2017-06-23onenand_spl_simple: Call onenand_spl_get_geometry() only onceLadislav Michl
Do not call onenand_spl_get_geometry() for each block read. Signed-off-by: Ladislav Michl <ladis@linux-mips.org>