summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/stm32'Sascha Hauer2020-05-144-22/+44
|\
| * regulator: stpmic1: move to coredevice levelLucas Stach2020-05-121-1/+1
| | | | | | | | | | | | | | Those regulators are needed by other devices. Probe them early. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mfd: stpmic1: move to coredevice levelLucas Stach2020-05-121-1/+1
| | | | | | | | | | | | | | | | The PMIC provides regulators, which are needed before other devices can probe. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mci: stm32_sdmmc2: move command timeout errors to debug levelLucas Stach2020-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | Command timeouts are sometimes a normal operating condition (for example when probing whether the connected card is SD or MMC), so we don't want to print an error message for all of them. Move those messages to the debug level, the MCI core will print some more meaningful messages on most command errors anyways. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mci: stm32_sdmmc2: don't retry commandsLucas Stach2020-05-121-14/+2
| | | | | | | | | | | | | | | | | | No other MCI does retry failing commands on its own (if at all this should be done by the MCI core). Remove the retry, as we don't want to paper over board level issues. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * nvmem: bsec: remove wrongly named bsec_field typeAhmad Fatoum2020-05-081-1/+1
| | | | | | | | | | | | | | | | | | BSEC_SMC_READ_SHADOW and BSEC_SMC_WRITE_SHADOW aren't fields, but operations to apply on fields. Rename it accordingly and fix up instances where it was used wrongly. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * nvmem: bsec: allow reads at unaligned offsetsAhmad Fatoum2020-05-081-4/+38
| | | | | | | | | | | | | | | | | | | | Setting the NVMEM stride to 4 means we can't have nvmem cells pointing at odd addresses. Linux sets it to 1 instead and handles reads at unaligned addresses by splitting them up to aligned chunks. Copy over the code to do the same. Unaligned writes remain illegal. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/powerpc'Sascha Hauer2020-05-147-0/+653
|\ \
| * \ Merge branch 'for-next/mxs' into nextSascha Hauer2020-04-303-25/+31
| |\ \
| | * | clk: mxs: Use device tree provided clock lookupsSascha Hauer2020-04-281-19/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When probing from the device tree use the device tree provided clock lookups. So far we only used the clock lookups based on the physical base address of the device, but these should go sooner or later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | clk: mxs: Do not enable enet_out clockSascha Hauer2020-04-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The enet_out clock gate is wrongly abstracted. The bit it is controlling is not just a bit to enable the clock, it also controls the direction of the ethernet reference clock. When the bit is cleared, the ethernet reference clock must be fed into the SoC from an external oscillator; when it's set then the ethernet reference clock is generated internally. The correct setting depends on the board, so we must not set the bit unconditionally during probe of the clock driver. Whether or not the clock is enabled can be selected by the board by removing the clock from the FEC in its dts. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | net: fec_imx: Return with an error when mandatory clock is missingSascha Hauer2020-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When a mandatory clock is missing we have to return with an error. Just breaking out of the loop results in ignoring the error. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | net: fec_imx: Make ptp clock optionalSascha Hauer2020-04-282-3/+3
| | |/ | | | | | | | | | | | | | | | | | | The ptp clock doesn't exist on all SoCs, make it optional. In fact it was optional before due to a bug in the driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Merge branch 'for-next/misc' into nextSascha Hauer2020-04-302-1/+9
| |\ \
| * \ \ Merge branch 'for-next/kconfig' into nextSascha Hauer2020-04-308-32/+6
| |\ \ \
| * \ \ \ Merge branch 'for-next/sdhci' into nextSascha Hauer2020-04-287-0/+653
| |\ \ \ \
| | * | | | mci: sdhci: add Atmel SDHCI (sama5d2, sam9x60) supportAhmad Fatoum2020-04-276-0/+627
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already support Ethernet and QSPI on the SAMA5D2, but MMC was so far missing. Port over the at91bootstrap driver to barebox. Some parts are based on the U-Boot and Linux implementations. To support future use in PBL, the driver model and driver implementation parts are split into separate files with the latter being compilable for PBL as well. Registers, which are found in the common Linux sdhci.h have been added to the barebox sdhci.h. Registers which appear to be Atmel specific have been added to atmel-sdhci-common.c instead. The driver still misses some parts, which will follow later: - ADMA is unsupported, PIO only for now - Only the SD/MMC controller already enabled by the first stage bootloader is supported. Further clocking changes appear to be necessary to enable another Both can be retrofitted later on and don't hold us back from booting from MMC. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | | | mci: sdhci: implement sdhci_reset()Ahmad Fatoum2020-04-272-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SDHCI reset is common between many SDHCI variants. Add a library function, so it can be reused. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| | * | | | mci: sdhci: provide sdhci_readx_poll_timeout helpersAhmad Fatoum2020-04-271-0/+12
| | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sdhci_readN accessors don't lend themselves for clean use with readx_poll_timeout because they accept two arguments. Add a sdhci-specific helper, so the sdhci drivers can cut down on the timeout loop boilerplate. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | Merge branch 'for-next/misc' into nextSascha Hauer2020-04-2875-213/+0
| |\ \ \ \
* | \ \ \ \ Merge branch 'for-next/mxs'Sascha Hauer2020-05-1410-45/+119
|\ \ \ \ \ \
| * | | | | | mmc: mxs: implement detect callbackSascha Hauer2020-05-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Needed to automatically detect the SD card when it contains the barebox environment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | serial: mxs auart: Set Linux console nameSascha Hauer2020-05-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MXS AUART is in the kernel known as "ttyAPP". Set the Linux console name to make automatic setting of the console= Kernel parameter work. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | usb: i.MX: Add i.MX28 supportSascha Hauer2020-05-073-18/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing i.MX chipidea support can be used for i.MX28 as well. The main difference is that the i.MX28 doesn't have a usbmisc unit, so the bulk of this patch makes this unit optional in the driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | usb: imx-usb-phy: Add delaySascha Hauer2020-05-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The imx-usb-phy needs a small delay on i.MX28, otherwise the stmp_reset_block() fails. Add this delay unconditionally as it doesn't seem to be worth it to limit the delay on this platform. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | watchdog: i.MX28: Add device tree supportSascha Hauer2020-05-061-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | clk: mxs: Use device tree provided clock lookupsSascha Hauer2020-05-061-19/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When probing from the device tree use the device tree provided clock lookups. So far we only used the clock lookups based on the physical base address of the device, but these should go sooner or later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | clk imx28: Add USB clocksSascha Hauer2020-05-061-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The USB clocks are missing, add them to make USB work as part of the i.MX chipidea driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | clk: mxs: Fix clock numberingSascha Hauer2020-05-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The device tree clock lookups use the position in the clks array, hence they must match. fec_sleep is a barebox specific clock and is in between other clocks. Put the clock at the end of the array. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | clk: mxs: Do not enable enet_out clockSascha Hauer2020-05-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The enet_out clock gate is wrongly abstracted. The bit it is controlling is not just a bit to enable the clock, it also controls the direction of the ethernet reference clock. When the bit is cleared, the ethernet reference clock must be fed into the SoC from an external oscillator; when it's set then the ethernet reference clock is generated internally. The correct setting depends on the board, so we must not set the bit unconditionally during probe of the clock driver. Whether or not the clock is enabled can be selected by the board by removing the clock from the FEC in its dts. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | net: fec_imx: Return with an error when mandatory clock is missingSascha Hauer2020-05-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a mandatory clock is missing we have to return with an error. Just breaking out of the loop results in ignoring the error. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | net: fec_imx: Make ptp clock optionalSascha Hauer2020-05-062-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ptp clock doesn't exist on all SoCs, make it optional. In fact it was optional before due to a bug in the driver. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | | | Merge branch 'for-next/misc'Sascha Hauer2020-05-1479-221/+16
|\ \ \ \ \ \ \
| * | | | | | | net: designware: eqos: attach PHY earlierLucas Stach2020-05-121-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the PHY isn't driving the refclock, the software reset of the controller will time out. Some PHYs need some board specific configuration to properly drive the reflock. Attach the PHY before attempting the software reset, so PHY fixups have a chance to run. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | | video: backlight-pwm: set backlight dev.parent to hardware devAhmad Fatoum2020-05-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | backlight_register allocates a new backlight device. Populating the device's parent field with the hardware device gives us more informational devinfo output. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | | video: backlight-pwm: remove unused struct memberAhmad Fatoum2020-05-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pwm_backlight.max_value is unused anywhere. Drop it. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | | mtd: mtdraw: Fix cdev size calculation for large NANDsStefan Riedmueller2020-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Raw size for large NAND devices (> 4 GB) can exceed 32 bits, so we need 64 bit types as factors. Both factors are of 32 bit types, as such is the return value. At least one factor needs to be 64 bit type when calculating the size. Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Christian Hemp <c.hemp@phytec.de> Signed-off-by: Yunus Bas <y.bas@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | | spi: Kconfig: drop unneeded dependencyAntony Pavlov2020-05-041-1/+0
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'config DRIVER_SPI_MXS' section is already under 'if SPI' so 'depends on SPI' is unneeded. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ubi: Refuse to attach partitioned mtd devicesSascha Hauer2020-04-301-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a mtd device has partitions it is wrong to attach the whole device as this would corrupt the partitions. Refuse to attach it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | ddr: fsl: fix null pointer dereference handling DDR4 memoriesAhmad Fatoum2020-04-291-1/+1
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cppcheck reports: drivers/ddr/fsl/util.c:42:27: error: Null pointer dereference: c [ctunullpointer] unsigned int data_rate = c->ddr_freq; ^ drivers/ddr/fsl/ctrl_regs.c:1114:55: note: Calling function get_memory_clk_period_ps, 1st argument is null const unsigned int mclk_ps = get_memory_clk_period_ps(0); Because get_memory_clk_period_ps expects a valid pointer, but is instead passed NULL. Fix this by passing along the DDR controller handle like all other calls to the function do. This is untested. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | treewide: remove references to CREDITSUwe Kleine-König2020-04-2775-213/+0
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CREDITS file was removed from barebox in 2015 by commit 6570288f2d97 ("Remove the CREDITS file"). Remove references to it from several files. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | | Merge branch 'for-next/kconfig'Sascha Hauer2020-05-147-30/+6
|\ \ \ \ \ | | |_|_|/ | |/| | |
| * | | | net: enc28j60: fix typo in referenced Kconfig optionAhmad Fatoum2020-04-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no ENC28J60_WRITEVERIFY, instead the Kconfig file defines DRIVER_NET_ENC28J60_WRITEVERIFY. This has been this way since the very first commit adding the driver. The option is off by default, so this shouldn't break anything that didn't mess with the option. Fix the typo. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | net: remove unused Kconfig optionsAhmad Fatoum2020-04-292-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both options are used nowhere and can be dropped: - OF_NET code is compiled always and code is discarded at link-time if unreferenced - Designware Ethernet can be enabled in Kconfig and no arch code selects the symbol Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | treewide: Kconfig: remove some unused symbolsAhmad Fatoum2020-04-292-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All these symbols are defined, but unused anywhere in the barebox tree. Remove them. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | reset: fix typo in Kconfig defaultAhmad Fatoum2020-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't have a config SOC_IMX7D, but have an ARCH_IMX7. Fix this. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | phy: freescale: fix typo in Kconfig defaultAhmad Fatoum2020-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't have a config SOC_IMX8MQ, but have an ARCH_IMX8MQ. Fix this. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | crypto: drop select on non-existing Kconfig optionsAhmad Fatoum2020-04-291-2/+0
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | We define neither CRYPTO_BLKCIPHER nor CRYPTO_DES in barebox. Drop the select on them. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/kbuild'Sascha Hauer2020-05-141-2/+0
|\ \ \ \ | | |_|/ | |/| |
| * | | kbuild: support ccflags-y, asflags-y, cppflags-y, and ldflags-yMasahiro Yamada2020-04-271-2/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Some Makefiles use ccflags-y, but it is not actually supported. Support ccflags-y, asflags-y, cppflags-y, and ldflags-y like Linux. Remove the workaround in drivers/pci/Makefile. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>