summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/rockchip' into nextnextSascha Hauer4 hours1-0/+10
|\
| * clk: rk3568: sync PLL rates with LinuxAhmad Fatoum9 days1-0/+10
| | | | | | | | | | | | | | | | | | The Linux driver has gained additional PLL rates since we last synchronized. Add their parameters to barebox as well. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240415053154.368546-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/pwm' into nextSascha Hauer4 hours11-66/+440
|\ \
| * | PWM: rockchip: add driver supportAhmad Fatoum9 days3-0/+356
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import the Linux v6.8 state of the driver to enable barebox control of PWM LEDs and other peripherals. This has been tested on the RK3566. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240415053600.370622-7-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PWM: core: add definition for PWM_POLARITY_INVERSEDAhmad Fatoum9 days1-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PWM_POLARITY_INVERTED is the macro used in the DT binding, while PWM_POLARITY_INVERSED is the Linux driver macro that it is translated to. They are the same value, but Linux PWM chip drivers will use the latter, so define it as well. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240415053600.370622-6-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PWM: align struct pwm_state member names with LinuxAhmad Fatoum9 days8-51/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces no functional change, but removes some churn of porting Linux drivers by aligning the naming of the frequently used struct pwm_state. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240415053600.370622-5-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PWM: core: adopt Linux prototype for struct pwm_ops::applyAhmad Fatoum9 days6-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Linux, a pwm_chip can have more one pwm_device, one for each channel. Therefore, pwm_apply takes a pwm_device as argument to identify, which channel is the one being operated on. In barebox, there's a 1:1 relationship between the two, but let's add pwm_device as extra, so far unused, parameter to make porting kernel code slightly easier. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240415053600.370622-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PWM: core: add struct pwm_chip::devAhmad Fatoum9 days6-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | For compatibility with Linux, let's add a dev member into struct pwm_chip instead of passing it as argument to pwmchip_add Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240415053600.370622-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | PWM: core: check that struct pwm_chip::devname is setAhmad Fatoum9 days1-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | There's no equivalent to devname in the Linux API, but it's required for barebox and not populating the pointer in struct pwm_chip will lead to a crash inside pwmchip_add. Check that the pointer is non-NULL to catch this case. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240415053600.370622-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/pci' into nextSascha Hauer4 hours19-131/+798
|\ \
| * | pci: ignore BAR when it doesn't fit into bus resourceSascha Hauer2024-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can happen that a BAR doesn't fit into the bus resource. In this case just ignore the BAR instead of failing the device. This is what Linux does as well. This helps me on the Protonic MECSBC where a NVME drive offers a 1GiB BAR which doesn't seem to be needed to make the driver work. Link: https://lore.barebox.org/20240403080703.4098404-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | phy: rockchip: add pcie3 phy driverSascha Hauer2024-04-043-0/+323
| | | | | | | | | | | | | | | | | | | | | | | | This adds support for the Rockchip PCIe3 phy found on RK35x8 SoCs. The code is taken from Linux as of Linux-6.9-rc2. Link: https://lore.barebox.org/20240403080703.4098404-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | of: add of_property_read_variable_uxx_array()Sascha Hauer2024-04-041-16/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds of_property_read_variable_uxx_array() which allow to read arrays from properties with min/max size boundaries. Code is directly taken from Linux. We already had of_property_read_variable_u64_array(), but without min/max arguments. This one is updated to match the Kernel code. Link: https://lore.barebox.org/20240403080703.4098404-1-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pci: pcie-designware: iterate over windowsSascha Hauer2024-04-041-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | The ranges property has already been parsed in pci_controller_init(), so instead of iterating over the ranges again, use the result stored in the resource_entry list to initialize the controller base addresses. Link: https://lore.barebox.org/20240326100746.471532-16-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pci: pcie-designware: remove dra7xx quirksSascha Hauer2024-04-042-35/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pcie-designware driver has several quirks needed only for dra7xx which we currently do not support in barebox. In Linux these quirks have been moved to the dra7xx glue code over time. Remove the quirks to cleanup the driver a bit. See these Linux commits for more explanations: 9cdce1cdc0c4 ("Revert "PCI: designware: Program ATU with untranslated address"") 883cc17cb193 ("PCI: designware: Move calculation of bus addresses to DRA7xx") Link: https://lore.barebox.org/20240326100746.471532-15-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pci: pcie-designware: drop duplicate resource assigningSascha Hauer2024-04-041-11/+2
| | | | | | | | | | | | | | | | | | | | | The resources in the pci_controller are already assigned in Link: https://lore.barebox.org/20240326100746.471532-14-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pci: add of_pci_bridge_init()Sascha Hauer2024-04-043-0/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we assume a 1:1 mapping between the CPU and bus address space. This is not always the case and different mappings are described in the ranges device tree property. Parse the property and call pci_add_resource_offset() accordingly. The code is based on the corresponding Kernel code. Link: https://lore.barebox.org/20240326100746.471532-13-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pci: drop resources from struct pci_busSascha Hauer2024-04-021-21/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | struct pci_bus has resources attached to it. They pointers are copied from the pci_controller to the pci_bus and from there to the child buses. Drop them and use the resources from the pci_controller directly. Link: https://lore.barebox.org/20240326100746.471532-12-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pci: pcie-dw-rockchip: wait for linkSascha Hauer2024-04-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Wait for the link to be established before continuing the probe. While in some configurations the link might come up fast enough, on a RK3568 no device was found without it. Link: https://lore.barebox.org/20240326100746.471532-11-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pci: pcie-designware: Speed up waiting for linkSascha Hauer2024-04-022-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the link is not up the first time we test for it, then we wait for 100ms before trying again. This adds unnecessary delays when the link is up considerably faster than 100ms. As we do not have anything useful to do with our CPU time during polling for link we can equally well poll as fast as we can. Link: https://lore.barebox.org/20240326100746.471532-10-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pci: support non 1:1 mappingsSascha Hauer2024-04-024-3/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we assume that the addresses on the PCI bus are mapped 1:1 to the host CPU. This is not always true. Specifically on Rockchip RK3568 and RK3588 we have ranges properties in the device tree which introduce a different mapping. We already worked around this by changing the ranges property to a 1:1 mapping in b10ee53 ("ARM: rockchip: rock-5a: Disable non working devices"). To get rid of the workaround this patch introduces support for non 1:1 mappings. We do this by porting the bare minimum from Linux drivers/pci/host-bridge.c over to barebox. Link: https://lore.barebox.org/20240326100746.471532-9-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pci: add pci_controller_init()Sascha Hauer2024-04-026-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upcoming patches will add a list to struct pci_controller. To make sure we have a single point to initialize the list introduce a pci_controller_init() and call it from all drivers which use register_pci_controller(). Make sure host->parent is set correctly before calling register_pci_controller() as that will be needed for device tree parsing later. Link: https://lore.barebox.org/20240326100746.471532-8-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pci: dwc: Drop support for config space in 'ranges'Sascha Hauer2024-04-022-15/+2
| | | | | | | | | | | | | | | | | | | | | | | | Following Linux commit 2f5ab5afe018 ("PCI: dwc: Drop support for config space in 'ranges'") let's do the same for barebox. Link: https://lore.barebox.org/20240326100746.471532-7-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pci: pcie-designware: remove unused variableSascha Hauer2024-04-022-3/+0
| | | | | | | | | | | | | | | | | | | | | struct pcie_port::mem_base is set but not used. Remove it. Link: https://lore.barebox.org/20240326100746.471532-6-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pci: rename parent_bus to parentSascha Hauer2024-04-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | In Linux struct pci_bus has a pointer to its parent bus named 'parent'. Rename parent_bus to parent to be more conform with Linux. Link: https://lore.barebox.org/20240326100746.471532-4-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | pci: add 'self' member to struct pci_busSascha Hauer2024-04-021-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Linux struct pci_bus has a 'parent' member which is a pointer to the parent pci_bus. In barebox we also have a 'parent' member, but it is of type struct device *. To be closer to Linux remove the parent member and replace its usage with a struct pci_dev *self member (which also exists in Linux). Link: https://lore.barebox.org/20240326100746.471532-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | net: phy: realtek: add phy for RTL8168 internal phySascha Hauer2024-04-021-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The integrated PHY's of later RTL8168 network chips report the generic PHYID 0x001cc800 (Realtek OUI, model and revision number both set to zero) and therefore currently the genphy driver is used. To be able to use the paged version of e.g. phy_write() we need a PHY driver with the read_page and write_page callbacks implemented. Link: https://lore.barebox.org/20240326100746.471532-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/net' into nextSascha Hauer4 hours2-40/+35
|\ \ \
| * | | net: usb: smsc95xx: disable HW checksumming in driverAhmad Fatoum2024-04-051-29/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently enable hardware checksumming, which means the NIC will add two bytes of checksum after each packet with the computed checksum. We don't use those two bytes however and will recompute the checksum anyway. Because we also don't adjust the size reported to the network stack to be 2 bytes shorter, we trigger the newly introduced WARN_ON_ONCE when DEBUG is #define'd that checks this condition, so let's just disable the checksumming altogether and remove left-over dead code associated with it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240404184001.1532897-11-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: usb: smsc95xx: fix handling of multiple packets per urbAhmad Fatoum2024-04-051-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | len is the actual length of the USB bulk transfer, while size is the length of the current packet, which may be different if we have multiple packets per transfer. We don't seem to run into this in barebox, perhaps because of our MTU, but let's fix it anyway. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240404184001.1532897-10-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: usb: smsc95xx: don't blindly trust hardware sizeAhmad Fatoum2024-04-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a port of Linux commit ff821092cf02a70c2bccd2d19269f01e29aa52cf: | Author: Szymon Heidrich <szymon.heidrich@gmail.com> | AuthorDate: Thu Mar 16 11:19:54 2023 +0100 | | net: usb: smsc95xx: Limit packet length to skb->len | | Packet length retrieved from descriptor may be larger than | the actual socket buffer length. In such case the cloned | skb passed up the network stack will leak kernel memory | contents. | | Fixes: 2f7ca802bdae ("net: Add SMSC LAN9500 USB2.0 10/100 ethernet adapter driver") | Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com> | Reviewed-by: Jakub Kicinski <kuba@kernel.org> | Link: https://lore.kernel.org/r/20230316101954.75836-1-szymon.heidrich@gmail.com | Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240404184001.1532897-9-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: usb: smsc95xx: don't opencode get/put_aligned_le32Ahmad Fatoum2024-04-051-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces no functional change, but makes code easier to read and aligns us some more with the current Linux state of the driver. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240404184001.1532897-8-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: cpsw: report correct frame size to network stackAhmad Fatoum2024-04-051-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the NIC reports that there is a computed CRC appended to the frame content, we need to subtract its size from the total length before passing that further down the network stack. This fixes a WARN_ON_ONCE reported by the network stack when built with #define DEBUG, because the expected size as indicated by the IP header is not the same as what's reported by the driver. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240404184001.1532897-7-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/nand' into nextSascha Hauer4 hours55-2634/+5437
|\ \ \ \
| * | | | mtd: nand: mxc_nand: disable subpage readsSascha Hauer4 hours1-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NAND core enabled subpage reads when a largepage NAND is used with SOFT_ECC. The i.MX NAND controller doesn't support subpage reads, so clear the flag again. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | mtd: nand: mxc_nand: support software ECCSascha Hauer4 hours1-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support software ECC we still need the driver provided read_oob, read_page_raw and write_page_raw ops, so set them unconditionally no matter which engine_type we use. The OOB layout on the other hand represents the layout the i.MX ECC hardware uses, so set this only when NAND_ECC_ENGINE_TYPE_ON_HOST is in use. With these changes the driver can be used with software BCH ECC which is useful for NAND chips that require a stronger ECC than the i.MX hardware supports. Link: https://lore.barebox.org/20240416095313.1977242-9-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | mtd: nand: mxc_nand: implement exec_opSascha Hauer4 hours1-294/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts the driver to the more modern exec_op which gets us rid of a bunch of legacy code. Tested on i.MX27 and i.MX25. Link: https://lore.barebox.org/20240416095313.1977242-8-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | mtd: nand: mxc_nand: separate page read from ecc calcSascha Hauer4 hours1-54/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our read_page hook currently reads out a page and also counts and returns the number of bitflips. In upcoming exec_op conversion we'll need to read the page data in exec_op, but the bitflip information will be needed in mxc_nand_read_page(). To ease exec_op conversion separate the page read out from the bitflip evaluation. For the v2/v3 controllers we can leave the bitflip information in the status register for later evaluation. For the v1 controller this is not possible, because the status register is overwritten with each subpage read. We therefore store the bitflip information in the private data. Link: https://lore.barebox.org/20240416095313.1977242-7-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | mtd: nand: replace nand_imx driver with kernel driverSascha Hauer4 hours3-1484/+1881
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The barebox nand_imx driver has diverged a lot from the corresponding Kernel driver. To reduce maintenance effort replace the driver with the Kernel driver. The driver is mostly taken from the Kernel and only adjusted to compile with barebox. The only significant change is that the driver creates the flash BBT if none exists, like our old driver did. Link: https://lore.barebox.org/20240416095313.1977242-6-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | mtd: nand: update to Linux-6.9-rc2Sascha Hauer4 hours30-972/+3482
| | | | | | | | | | | | | | | | | | | | | | | | | Link: https://lore.barebox.org/20240416095313.1977242-5-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | mtd: update _lock/_unlock prototypeSascha Hauer4 hours6-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Linux the _lock/_unlock hooks now take a uint64_t as length argument. Follow suit to be more consistent with Linux. Link: https://lore.barebox.org/20240416095313.1977242-4-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | mtd: nand: move to drivers/mtd/nand/raw/Sascha Hauer4 hours43-183/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux moved the raw NAND drivers from drivers/mtd/nand/ to drivers/mtd/nand/raw/ years ago. Follow suit and do the same for barebox to be more consistent with Linux. Link: https://lore.barebox.org/20240416095313.1977242-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | bch: update from KernelSascha Hauer9 days2-9/+9
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates BCH support from Linux as of Linux-6.9-rc2. Among other things in Linux the bch function names changed from a _bch suffix to a bch_ prefix. Link: https://lore.barebox.org/20240416062147.1337233-1-s.hauer@pengutronix.de Link: https://lore.barebox.org/20240416095313.1977242-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/misc' into nextSascha Hauer4 hours24-63/+689
|\ \ \ \
| * | | | ddr: imx: hide config prompt unless COMPILE_TESTAhmad Fatoum2 days1-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DDR drivers are called into by low-level code for DRAM init. The Kconfig options for them are selected by the SOC symbols, e.g. ARCH_IMX8M and there's no point in asking for user decision: either it's required and already selected or it will be unused and subject to linker garbage collection. Therefore, hide the prompts by default. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240423060046.1513717-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | commands: clk_dump: add json output optionAhmad Fatoum3 days1-9/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This formats the clock tree and the enable_count and rate of each clock into the JSON format. This is useful to run validation scripts against it that were originally written for Linux' /sys/kernel/debug/clk/clk_dump. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240419060759.2590652-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | clk: add flags parameter to clk_dump(_one)Ahmad Fatoum3 days1-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently customize dumping by means of a single verbose argument. Follow-up commit will want to customize the dumping further, so turn the verbose parameter into a general flags parameter. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240419060759.2590652-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | file-list: remove unused variableSascha Hauer3 days1-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | struct file_list::num_entries is only ever used to check if a file list is empty. Do this check with list_empty() instead and remove the unused member. Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20240417061936.3104764-1-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | gpio: Add Intel gpio controller supportTomas Marek9 days3-0/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Tomas Marek <tomas.marek@elrest.cz> Link: https://lore.barebox.org/20240410163446.14401-1-tomas.marek@elrest.cz Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | gpiolib: implement gpiod_slice_acquiredAhmad Fatoum9 days1-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For use by poller code that makes use of GPIO descriptors instead of the unstable indices, add a gpiod variant of the existing gpiod_slice_acquird. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240415052850.366859-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>