summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2022-04-18rockchip: timer: dw-apb-timer: fix whitespace in U_BOOT_DRIVER structureJohan Jonker
The line with .of_to_plat in the U_BOOT_DRIVER structure of dw-apb-timer.c is not aligned with the rest. Add an extra TAB to fix the whitespace. Signed-off-by: Johan Jonker <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2022-04-18rockchip: timer: add OF_PLATDATA support for dw-apb-timerJohan Jonker
The Rockchip rk3066 SoC has 3 dw-apb-timer nodes. U-boot is compiled with OF_PLATDATA TPL/SPL options, so add OF_PLATDATA support for the dw-apb-timer. Also change driver name to be able to compile with U-boot scripts. No reset OF_PLATDATA support was added, because the rk3066 nodes don't need/have them. Signed-off-by: Johan Jonker <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2022-04-18rockchip: clk: add clocks to px30_clk_enableChris Morgan
Add the HCLK_OTG, HCLK_SFC, and SCLK_SFC clocks to px30_clk_enable. Without this change U-Boot reports an error of "Enable clock-controller@ff2b0000 failed" on boot when using the SFC or USB in U-Boot. Signed-off-by: Chris Morgan <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2022-04-18spi: rockchip_sfc: Add missing include for dm/device_compat.hChris Morgan
Add missing include for dm/device_compat.h. Without this include the SFC driver fails to compile because dev_err and dev_dbg are not defined. Signed-off-by: Chris Morgan <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2022-04-18adc: rockchip-saradc: add support for getting reference voltage valuePeter Cai
Mirroring commit 97ab802aa36f ("adc: meson-saradc: add support for getting reference voltage value") for meson-saradc, this adds support for getting the "vref-supply" regulator and register it as the ADC's reference voltage regulator, so clients can translate sampled ADC values to voltage. Signed-off-by: Peter Cai <[email protected]> Reviewed-by: John Keeping <[email protected]> Tested-by: John Keeping <[email protected]> Cc: Simon Glass <[email protected]> Cc: Philipp Tomsich <[email protected]> Cc: Kever Yang <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2022-04-18mmc: rockchip_sdhci: Correct error checkingHaolin Li
A pointer can not be negative. Use macro IS_ERR_OR_NULL() for checking. Signed-off-by: Haolin Li <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Kever Yang <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]>
2022-04-15Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-netTom Rini
- DM9000 DM support - tftp server bug fix - mdio ofnode support functions - Various phy fixes and improvements. [trini: Fixup merge conflicts in drivers/net/phy/ethernet_id.c drivers/net/phy/phy.c include/phy.h]
2022-04-14Remove duplication of table_compute_checksum functionTom Rini
It seems like there was some merge error when first cleaning up and sharing this function. We have both an inline version of the function in include/tables_csum.h and a non-inline version in lib/tables_csum.c. Rework things so that we only have the non-inline version (due to number of calls, we should not inline this). Fixes: 1befb38b8682 ("x86: Move table csum into separate file") Fixes: 2b445e4d3194 ("x86: Move table csum into separate header") Cc: Alexander Graf <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2022-04-14serial: smh: Implement puts for DMSean Anderson
This adds an implementation of puts for DM. The implementation is not as clean as for the non-DM puts because we have to handle non-nul-terminated string. We also handle short writes (though these are probably very unusual). Signed-off-by: Sean Anderson <[email protected]>
2022-04-14test: serial: Add test for putc/putsSean Anderson
This adds a test to ensure that puts is equivalent to putc called in a loop. We don't verify the contents of the message to avoid having to record console output a second time (though that could be added in the future). The globals are initialized to non-zero values to avoid a warning; in particular, the character count is off-by-one (but we always make relative measurements). Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-04-14serial: sandbox: Implement putsSean Anderson
This implements puts for sandbox. It is fairly straightforward, except that we break out the shared color printing functionality into its own function. Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-04-14serial: Fix _serial_puts using \n\r instead of \r\nSean Anderson
A string like "test\n" would be broken up into the following sequence of prints by _serial_puts: puts("test\n") putc('\r') Although functionally this is the same as \r\n, it is not the standard sequence and caused tests to fail. Fix this by excluding the '\n' from the initial print. The above string will now be broken up like puts("test") puts("\r\n") Since we may now need to call ops->puts twice (with the associated retry logic), break that part of the function off into a helper. Fixes: 7a76347189 ("serial: dm: Add support for puts") Signed-off-by: Sean Anderson <[email protected]>
2022-04-14led: Configure LED default-state on bootMarek Vasut
In case the DT LED subnode contains "default-state" property set to either "on" or "off", probe the LED driver and configure the LED state automatically. Signed-off-by: Marek Vasut <[email protected]> Cc: Alex Nemirovsky <[email protected]> Cc: Patrick Delaunay <[email protected]> Cc: Philippe Reynes <[email protected]> Cc: Sean Anderson <[email protected]> Cc: Simon Glass <[email protected]> Cc: Steven Lawrance <[email protected]> [trini: Update the relevant test now that we have support] Signed-off-by: Tom Rini <[email protected]>
2022-04-14led: gpio: Drop duplicate OF "label" property parsingMarek Vasut
The OF "label" property parsing is now handled in LED core, drop the duplicate implementation from this driver. Signed-off-by: Marek Vasut <[email protected]> Cc: Alex Nemirovsky <[email protected]> Cc: Patrick Delaunay <[email protected]> Cc: Philippe Reynes <[email protected]> Cc: Sean Anderson <[email protected]> Cc: Simon Glass <[email protected]> Cc: Steven Lawrance <[email protected]>
2022-04-14led: pwm: Drop duplicate OF "label" property parsingTom Rini
The OF "label" property parsing is now handled in LED core, drop the duplicate implementation from this driver. Signed-off-by: Tom Rini <[email protected]>
2022-04-14led: bcm6753: Drop duplicate OF "label" property parsingTom Rini
The OF "label" property parsing is now handled in LED core, drop the duplicate implementation from this driver. Signed-off-by: Tom Rini <[email protected]>
2022-04-14led: cortina: Drop duplicate OF "label" property parsingMarek Vasut
The OF "label" property parsing is now handled in LED core, drop the duplicate implementation from this driver. Signed-off-by: Marek Vasut <[email protected]> Cc: Alex Nemirovsky <[email protected]> Cc: Patrick Delaunay <[email protected]> Cc: Philippe Reynes <[email protected]> Cc: Sean Anderson <[email protected]> Cc: Simon Glass <[email protected]> Cc: Steven Lawrance <[email protected]>
2022-04-14led: bcm6858: Drop duplicate OF "label" property parsingMarek Vasut
The OF "label" property parsing is now handled in LED core, drop the duplicate implementation from this driver. Signed-off-by: Marek Vasut <[email protected]> Cc: Alex Nemirovsky <[email protected]> Cc: Patrick Delaunay <[email protected]> Cc: Philippe Reynes <[email protected]> Cc: Sean Anderson <[email protected]> Cc: Simon Glass <[email protected]> Cc: Steven Lawrance <[email protected]>
2022-04-14led: bcm6358: Drop duplicate OF "label" property parsingMarek Vasut
The OF "label" property parsing is now handled in LED core, drop the duplicate implementation from this driver. Signed-off-by: Marek Vasut <[email protected]> Cc: Alex Nemirovsky <[email protected]> Cc: Patrick Delaunay <[email protected]> Cc: Philippe Reynes <[email protected]> Cc: Sean Anderson <[email protected]> Cc: Simon Glass <[email protected]> Cc: Steven Lawrance <[email protected]>
2022-04-14led: bcm6328: Drop duplicate OF "label" property parsingMarek Vasut
The OF "label" property parsing is now handled in LED core, drop the duplicate implementation from this driver. Signed-off-by: Marek Vasut <[email protected]> Cc: Alex Nemirovsky <[email protected]> Cc: Patrick Delaunay <[email protected]> Cc: Philippe Reynes <[email protected]> Cc: Sean Anderson <[email protected]> Cc: Simon Glass <[email protected]> Cc: Steven Lawrance <[email protected]>
2022-04-14led: Move OF "label" property parsing to coreMarek Vasut
Every driver in drivers/led/ currently does some form of "label" OF property parsing in its bind() callback. Move this label parsing to LED core, since this "label" OF property is a generic property. This permits code deduplication in subseuqent patches. Signed-off-by: Marek Vasut <[email protected]> Cc: Alex Nemirovsky <[email protected]> Cc: Patrick Delaunay <[email protected]> Cc: Philippe Reynes <[email protected]> Cc: Sean Anderson <[email protected]> Cc: Simon Glass <[email protected]> Cc: Steven Lawrance <[email protected]>
2022-04-14misc: atsha204a: Fix big endian supportPali Rohár
Callers of function atsha204a_crc16() expect to return value in host cpu endianity. So remove cpu_to_le16() conversion. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Reviewed-by: Marek Behún <[email protected]>
2022-04-14power: domain: ti: Extend use of PTCMD and PTSTAT registers for high PDsDave Gerlach
It is possible for power domain IDs to be great than 31. If this happens, the PTCMD and PTSTAT registers must overflow into adjacent corresponding PTCMD_H and PTSTAT_H registers for each. Update the driver to account for this. Signed-off-by: Dave Gerlach <[email protected]>
2022-04-13net: dm9000: Add Kconfig entryMarek Vasut
Add Kconfig entry for the DM9000 MAC. Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Ramon Fried <[email protected]>
2022-04-13net: dm9000: Add DM supportMarek Vasut
Add support for U-Boot DM and DT probing. Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Ramon Fried <[email protected]>
2022-04-13net: dm9000: Receive one packet per recv callMarek Vasut
Instead of reading out the entire FIFO and possibly overwriting U-Boot memory, read out one packet per recv call, pass it to U-Boot network stack, and repeat. Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Ramon Fried <[email protected]>
2022-04-13net: dm9000: Split non-DM specific bits from common codeMarek Vasut
Split network handling functions into non-DM specific parts and common code in preparation for conversion to DM. Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Ramon Fried <[email protected]>
2022-04-13net: dm9000: Pass private data around for IOMarek Vasut
Pass private data into IO accessors and use the base addresses of IO and DATA window from the private data instead of using the hard coded macros DM9000_IO/DM9000_DATA. Currently both the DM9000_IO and DM9000_DATA are assigned to the respecive private data fields for the non-DM case backward compatibility. Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Ramon Fried <[email protected]>
2022-04-13net: dm9000: Drop dm9000.h and staticize SROM accessMarek Vasut
Dispose of dm9000.h because none of the function prototypes declared in it are called anywhere in the codebase. Staticize dm9000_read_srom_word() because it is now called only from within the dm9000 driver. Drop dm9000_write_srom_word() because it is no longer used. Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Ramon Fried <[email protected]>
2022-04-13net: dm9000: Drop static device private dataMarek Vasut
Allocate driver private data dynamically in its init function and drop the static driver private data variable. Pass the dynamic private data throughout the driver. This is done in preparation for DM conversion. Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Ramon Fried <[email protected]>
2022-04-13net: dm9000: Rename board_info to dm9000_privMarek Vasut
Rename board_info structure to dm9000_priv to make it clear what this structure really contains, the driver private data. No functional change. Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Ramon Fried <[email protected]>
2022-04-13net: dm9000: Reorder and staticizeMarek Vasut
Reorder the driver functions to get rid of forward declarations. Staticize whatever is possible. No functional change. Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Ramon Fried <[email protected]>
2022-04-13net: dm9000: Checkpatch cleanupMarek Vasut
Fix checkpatch errors and warnings. No functional change. Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Ramon Fried <[email protected]>
2022-04-13net: dm9000: Drop volatilesMarek Vasut
Remove volatile keyword usage from arrays, they are not really volatile in any way, so this keyword is misused here. No functional change. Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Ramon Fried <[email protected]>
2022-04-13net: dm9000: Turn DM9000_DMP_PACKET() into a functionMarek Vasut
Rework DM9000_DMP_PACKET() into dm9000_dump_packet() function, this brings better type checking. No functional change. Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Ramon Fried <[email protected]>
2022-04-13net: dm9000: Drop unused dump_regs()Marek Vasut
Drop unused function dump_regs() because it is unused. No functional change. Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Ramon Fried <[email protected]>
2022-04-13net: dm9000: Make RxLen and RxStatus lowercaseMarek Vasut
Rename variables to lowercase to be consistent with coding style. No functional change. Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Ramon Fried <[email protected]>
2022-04-13net: dm9000: Replace DM9000_DBG() with debug()Marek Vasut
Use standard debug() macro to print debug messages instead of reinventing driver-specific macro again. No functional change. Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Ramon Fried <[email protected]>
2022-04-13net: dm9000: Make accessor names lowercaseMarek Vasut
Make accessor names lowercase to be consistent with coding style. No functional change. Reviewed-by: Ramon Fried <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Cc: Joe Hershberger <[email protected]> Cc: Ramon Fried <[email protected]>
2022-04-13driver: net: ti: keystone_net: Change priv member typeMarek Behún
Change type of private struct member mdio_base from void * to phys_addr_t. This allows us to drop 2 casts. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2022-04-13driver: net: ti: keystone_net: Convert to ofnode functionsMarek Behún
Convert fdt parsing functions to ofnode parsing functions. Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2022-04-13driver: net: ti: keystone_net: Deduplicate codeMarek Behún
Deduplicate common code in ks2_eth_bind_slaves(). Signed-off-by: Marek Behún <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2022-04-13Merge tag 'u-boot-imx-20220413' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx u-boot-imx-20220413 i.MX patches for 2022.07 CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/11710
2022-04-13clk: imx8mp: Fix 24M and 32k clockMarek Vasut
Fix registration of 24M and 32k clock, those got applied or rebased incorrectly, so fill in the correct code. Fixes: 7a2c3be95a5 ("clk: imx8mp: Fill in DWC3 USB, USB PHY, HSIOMIX clock") Signed-off-by: Marek Vasut <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Peng Fan <[email protected]> Cc: Stefano Babic <[email protected]> Cc: Ye Li <[email protected]>
2022-04-12clk: imx8mp: Add ECSPI clocksElmar Albert
Add clock tables required for bing up ECSPI interfaces Signed-off-by: Elmar Albert <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Peng Fan <[email protected]> Cc: Stefano Babic <[email protected]> Cc: uboot-imx <[email protected]> Signed-off-by: Elmar Albert <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2022-04-12clk: imxrt: Use dts for anatop base addressJesse Taube
In Linux IMX and IMXRT use the device tree to hold the anatop address. The anatop is used in clock drivers as it controls the internal PLLs This will move the macro from asm/arch-imxrt to the device tree. This presumably should also be done with the other IMX boards as well. Signed-off-by: Jesse Taube <[email protected]>
2022-04-12mmc: fsl_esdhc_imx: Add i.MX8MP compatible stringMarek Vasut
Add compatible string for i.MX8MP, which permits i.MX8MP to use HS400ES mode, just like all the other i.MX8M. Signed-off-by: Marek Vasut <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Haibo Chen <[email protected]> Cc: Peng Fan <[email protected]> Cc: Stefano Babic <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2022-04-12spi: nxp_fspi: Add i.MX8MP compatible stringMarek Vasut
The i.MX8M Mini and i.MX8M Plus flexspi IPs are compatible with one another, however the linux kernel DT uses separate compatible string for each SoC. Add the missing i.MX8MP compatible into this driver. Signed-off-by: Marek Vasut <[email protected]> Cc: Fabio Estevam <[email protected]> Cc: Peng Fan <[email protected]> Cc: Stefano Babic <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2022-04-12net: phy: nxp-tja11xx: Add NXP TJA11xx PHY driverMichael Trimarchi
Add driver for the NXP TJA1100 and TJA1101 PHYs. These PHYs are special BroadRReach 100BaseT1 PHYs used in automotive. Signed-off-by: Michael Trimarchi <[email protected]> Signed-off-by: Ariel D'Alessandro <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2022-04-12net: phy: Add phy_modify() accessorAriel D'Alessandro
Add read-modify-write unlocked accessor for accessing a PHY register. Signed-off-by: Ariel D'Alessandro <[email protected]> Reviewed-by: Ramon Fried <[email protected]>