summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2017-08-02fpga: xilinx: Avoid using local intermediate bufferSiva Durga Prasad Paladugu
Dont use local temporary buffer for printing out the info instead use directly from memroy. This fixes the issue of stack corruprion due to local buffer overflow. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-08-02clk: zynqmp: Remove unused macros/variablesMichal Simek
These macros and one variable is not used anywhere that's why they should be removed. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-02clk: zynqmp: Dont panic incase of mmio write/read failuresSiva Durga Prasad Paladugu
Dont panic incase of mmio write/read failures instead return error and let the peripheral driver take care of clock get and set failures. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-02clk: zynqmp: Add support for CCF driverSiva Durga Prasad Paladugu
Add support for CCF, this CCF reads the ref clocks from dt and checks all the required clock control registers for its source , divisors and calculates the clock from them. This supports clock and set functions. Panic when read/write fails. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-01Merge git://git.denx.de/u-boot-x86Tom Rini
2017-08-01soc/fsl-layerscape: Update SVR number for LS2081A and LS2041ASantan Kumar
Update SVR as per the SOC document. -LS2081A: 0x870919 -> 0x870918 -LS2041A: 0x870915 -> 0x870914 Signed-off-by: Santan Kumar <santan.kumar@nxp.com> Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com> Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
2017-08-01fsl/usb: enable errata-a010151 for ls2088a and ls2081aSantan Kumar
Signed-off-by: Santan Kumar <santan.kumar@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
2017-08-01spi: fsl_qspi: Pet watchdog even moreAlexander Stein
Pet the watchdog once upon each command call (qspi_xfer) and during each loop iteration in several commands. This fixes a watchdog reset especially during erase command. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Reviewed-by: York Sun <york.sun@nxp.com>
2017-08-01x86: Convert MMC to driver modelSimon Glass
Convert the pci_mmc driver over to driver model and migrate all x86 boards that use it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: remove DM_MMC from edison_defconfig] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-01block: ide: Fix build error when CONFIG_BLK is onBin Meng
Add missing #ifndef CONFIG_BLK to wrap dev_desc->block_read. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-01dm: scsi: Add a generic PCI-based AHCI driverBin Meng
This adds support for PCI-based AHCI controller based on DM SCSI. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2017-08-01x86: Convert INTEL_ICH6_GPIO to KconfigBin Meng
This converts Intel ICH6 GPIO driver to Kconfig, and add it to the imply list of platform drivers. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-01x86: kconfig: Select PCI and DM_PCIBin Meng
PCI is the de facto interconnect bus in an x86 system. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-01x86: kconfig: Select TIMER and X86_TSC_TIMERBin Meng
Without a timer, U-Boot just doesn't boot. This is not something we can turn off. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-01x86: tsc: Rename try_msr_calibrate_tsc() to cpu_mhz_from_msr()Bin Meng
Rename try_msr_calibrate_tsc() to cpu_mhz_from_msr(), as that better describes what the routine does. This keeps in sync with Linux kernel commit: 02c0cd2: x86/tsc_msr: Remove irqoff around MSR-based TSC enumeration Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-01x86: tsc: Correct Silvermont reference clock valuesBin Meng
Atom processors use a 19.2 MHz crystal oscillator. Early processors generate 100 MHz via 19.2 MHz * 26 / 5 = 99.84 MHz. Later processors generate 100 MHz via 19.2 MHz * 125 / 24 = 100 MHz. Update the Silvermont-based tables accordingly, matching the Software Developers Manual. Also, correct a 166 MHz entry that should have been 116 MHz, and add a missing 80 MHz entry for VLV2. This keeps in sync with Linux kernel commit: 05680e7: x86/tsc_msr: Correct Silvermont reference clock values Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-01x86: tsc: Update comments and expand definitions in freq_desc_tables[]Bin Meng
Some processor abbreviations in the comments of freq_desc_tables[] are obscure. This updates part of these to mention processors that are known to us. Also expand frequency definitions. This keeps in sync with Linux kernel commit: 9e0cae9: x86/tsc_msr: Update comments, expand definitions Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-01x86: tsc: Remove the fail handling in try_msr_calibrate_tsc()Bin Meng
If either ratio or freq is zero, the return value is zero. There is no need to create a fail branch and return zero there. This keeps in sync with Linux kernel commit: 14bb4e3: x86/tsc_msr: Remove debugging messages Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-01x86: tsc: Identify Intel-specific codeBin Meng
try_msr_calibrate_tsc() is currently Intel-specific, and should not execute on any other vendor's parts. This keeps in sync with Linux kernel commit: ba82683: x86/tsc_msr: Identify Intel-specific code Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-01x86: tsc: Read all ratio bits from MSR_PLATFORM_INFOBin Meng
Currently we read the tsc radio like this: ratio = (MSR_PLATFORM_INFO >> 8) & 0x1f; Thus we get bit 8-12 of MSR_PLATFORM_INFO, however according to the Intel manual, the ratio bits are bit 8-15. Fix this problem by masking 0xff instead. This keeps in sync with Linux kernel commit: 886123f: x86/tsc: Read all ratio bits from MSR_PLATFORM_INFO Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-08-01regulator: palmas: disable bypass when the LDO is enabledJean-Jacques Hiblot
Some LDOs have a bypass capability. Make sure that the bypass is disabled when is the LDO is enabled (otherwise the voltage can't be changed). Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-01regulator: palmas: Add support for LDO1 regulator to provide 1.8VKishon Vijay Abraham I
Modify palmas_mmc1_poweron_ldo() API to set the voltage based on the voltage parameter passed as argument instead of always setting it to 3.0V. This allows MMC1 to set the LDO1 regulator voltage to 3.3V or 1.8V. 1.8V is required to add support for UHS mode. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-01dm: mmc: sunxi: Add support for driver modelSimon Glass
Add a driver-model version of this driver which mostly uses the existing code. The old code can be removed once all boards are switched over. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-01dm: mmc: sunxi: Drop mmc_clk_io_on()Simon Glass
This function has #ifdefs in it which we want to avoid for driver model. Instead we should use different compatible strings and the .data field. It also uses the MMC device number which is not available in driver model except through aliases. Move the function's into its caller so that the driver-model version can do things its own way. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-08-01dm: mmc: sunxi: Pass private data around explicitlySimon Glass
At present the driver-private data is obtained in various functions by various means. With driver model this is provided automatically. Without driver model it comes from a C array declared at the top of the file. Adjust internal functions so that they are passed the private data as a parameter, allowing the caller to obtain it using either means. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-08-01dm: mmc: sunxi: Rename mmchost to privSimon Glass
Use the driver-model naming convention for this structure. It is data private to the driver so the local variable should be called 'priv'. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-08-01dm: mmc: sunxi: Rename struct sunxi_mmc_host to sunxi_mmc_privSimon Glass
Use the driver-model naming convention for this structure. It is data private to the driver. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-08-01dm: ahci: Correct uclass private dataSimon Glass
This is expected to be attached to the uclass and the code operates that way, but the uclass has not been updated. Fix it to avoid using memory at address 0. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 47fc61a (dm: ahci: Drop use of probe_ent)
2017-08-01dm: scsi: Drop duplicate SCSI and DM_SCSI optionsSimon Glass
When the SATA code was moved into drivers/ata these Kconfig options were added to that directory. They already exist in drivers/scsi. Remove them from drivers/ata to fix the duplication. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 7f2b5f4 (sata: Move drivers into new drivers/ata directory)
2017-08-01dm: mmc: Allow disabling driver model in SPLSimon Glass
At present if U-Boot proper uses driver model for MMC, then SPL has to also. While this is desirable, it places a significant barrier to moving to driver model in some cases. For example, with a space-constrained SPL it may be necessary to enable CONFIG_SPL_OF_PLATDATA which involves adjusting some drivers. Add new SPL versions of the options for DM_MMC, DM_MMC_OPS and BLK. By default these follow their non-SPL versions, but this can be changed by boards which need it. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-01ahci: Support non-PCI controllersSimon Glass
At present the AHCI SCSI driver only supports PCI with driver model. Rename the existing function to indicate this and add support for adding a non-PCI controller . Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-31configs: Migrate CMD_NAND*Tom Rini
Migrate all remaining instances of CMD_NAND, CMD_NAND_TRIMFFS CMD_NAND_LOCK_UNLOCK and CMD_NAND_TORTURE from the headers into the defconfig files. Tested-by: Adam Ford <aford173@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-31dm: console: Check for serial devices properlySimon Glass
With driver model the serial device is often not called "serial". Mark driver-model stdio devices so that they can be detected and we can look up the uclass. This is a more reliable way of finding out whether the console is connected to a serial device or not. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-31serial: stm32x7: Convert CONFIG_STM32X7_SERIAL to KconfigPatrice Chotard
Add CONFIG_STM32X7_SERIAL as a Kconfig option. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
2017-07-31dm: Kconfig: fix typo in help for SPL_PINCTRLPhilipp Tomsich
Changes 'controlloers' to 'controllers' in the help-text for SPL_PINCTRL. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-07-30watchdog: Introduce watchdog driver for Intel TangierFelipe Balbi
Add watchdog driver for Intel Tangier based platforms. Signed-off-by: Vincent Tinelli <vincent.tinelli@intel.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-29Merge git://git.denx.de/u-boot-socfpgaTom Rini
2017-07-29Merge git://git.denx.de/u-boot-usbTom Rini
2017-07-28clk: fix compilation errors for poplar platformPatrice Chotard
Move clk_release_all() prototype and definition inside OF_CONTROL flag to avoid following compilation error for poplar platform: aarch64: + poplar +drivers/usb/host/built-in.o: In function `ehci_usb_remove': +drivers/usb/host/ehci-generic.c:159: undefined reference to `clk_release_all' +drivers/usb/host/built-in.o: In function `ehci_usb_probe': +drivers/usb/host/ehci-generic.c:133: undefined reference to `clk_release_all' +make[1]: *** [u-boot] Error 139 +make: *** [sub-make] Error 2 Introduced by 4e542c4 clk: add clk_release_all() Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-07-28usb: host: xhci-dxc3: fix compilation warningsPatrice Chotard
Fix following warnings encountered with platforms dra7xx_evm and dra7xx_hs_evm : arm: + dra7xx_evm + hccr = (struct xhci_hccr *)devfdt_get_addr(dev); + ^ + hcor = (struct xhci_hcor *)((phys_addr_t)hccr + + ^ w+drivers/usb/host/xhci-dwc3.c: In function 'xhci_dwc3_probe': w+drivers/usb/host/xhci-dwc3.c:124:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] w+drivers/usb/host/xhci-dwc3.c:125:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] w+drivers/usb/host/xhci-dwc3.c:125:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] arm: + dra7xx_hs_evm + hccr = (struct xhci_hccr *)devfdt_get_addr(dev); + ^ + hcor = (struct xhci_hcor *)((phys_addr_t)hccr + + ^ w+drivers/usb/host/xhci-dwc3.c: In function 'xhci_dwc3_probe': w+drivers/usb/host/xhci-dwc3.c:124:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] w+drivers/usb/host/xhci-dwc3.c:125:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] w+drivers/usb/host/xhci-dwc3.c:125:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Introduced by 7e65e84 usb: host: xhci-dwc3: Convert driver to DM Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-07-28phy: add a NO-OP phy driverJean-Jacques Hiblot
This driver is used to stub PHY operations in a driver (USB, SATA). This is useful when the 'client' driver (USB, SATA, ...) uses the PHY framework and there is no actual PHY harwdare to drive. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2017-07-28usb: host: ohci-generic: initialize PHY only when foundPatrice Chotard
Call generic_phy_init() only when a PHY was found. This will avoid a crash if no "phys" property is found in DT. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reported-by: Patrick Delaunay <patrick.delaunay@st.com>
2017-07-28usb: host: ehci-generic: initialize PHY only when foundPatrice Chotard
Call generic_phy_init() only when a PHY was found. This will avoid a crash if no "phys" property is found in DT. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reported-by: Patrick Delaunay <patrick.delaunay@st.com>
2017-07-28dm: usb: host: xhci-dwc3: add missing #ifdef CONFIG_DM_USBPatrice Chotard
Add CONFIG_DM_USB flag to avoid following compilation errors detected by buildman : +drivers/usb/host/built-in.o: In function `xhci_dwc3_remove': +drivers/usb/host/xhci-dwc3.c:168: undefined reference to `xhci_deregister' +drivers/usb/host/built-in.o: In function `xhci_dwc3_probe': +drivers/usb/host/xhci-dwc3.c:145: undefined reference to `usb_get_dr_mode' +drivers/usb/host/xhci-dwc3.c:152: undefined reference to `xhci_register' introduced by patch d5c3f014da3 "usb: host: xhci-dwc3: Convert driver to DM" Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reported-by: Ran Wang <ran.wang_1@nxp.com>
2017-07-28dfu: add common function to initiate transactionPatrick Delaunay
- factorize code between read and write transaction - always use dfu_transaction_cleanup() to initialize the internal variable: easy maintenance - replace direct access by dfu_get_buf() and dfu_get_buf_size() Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2017-07-28dfu: factorize transaction cleanupPatrick Delaunay
rename cleanup function, as now called by read Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2017-07-28dfu: remove limitation on partition sizePatrick Delaunay
Change long (32 bits on arm) to u64 (same type than offset) for size and read offset r_left So partition and device used for DFU can be greater than 4GB Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2017-07-28dfu: allow dfu read on partition greater than 2GBPatrick Delaunay
solve issue on get_medium_size() function the detection of error is a simple test < 0 but for ARM platform, long is 32bits and 2GB = 0x80000000 is seen as error. I solve the issue by changing the prototype fo the function to separate size and result. This patch prepare the next patch with size change to u64. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2017-07-28usb: gadget: f_thor: Free the allocated out request bufferSiva Durga Prasad Paladugu
Fix the memory leak by freeing the allocated out request buffer Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-07-28usb: xhci: Enable TT to support LS/FS devices behind a HS hubBin Meng
So far LS/FS devices directly attached to xHC root port can be successfully enumerated by xHCI driver, but if they are connected behind a hub, the enumeration process fails to address the device. It turns out xHCI driver still misses a part that in the device's input slot context, all Transaction Translator (TT) related fields are not programmed. The xHCI spec defines how to enable TT. Now LS/FS devices like USB keyboard/mouse can be enumerated behind a high speed hub. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>