clk: Remove DM_FLAG_PRE_RELOC flag in various driversWhen a driver declares DM_FLAG_PRE_RELOC flag, it wishes to bebound before relocation. However due to a bug in the DM core,the flag only takes
clk: Remove DM_FLAG_PRE_RELOC flag in various driversWhen a driver declares DM_FLAG_PRE_RELOC flag, it wishes to bebound before relocation. However due to a bug in the DM core,the flag only takes effect when devices are statically declaredvia U_BOOT_DEVICE(). This bug has been fixed recently by commit"dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag inlists_bind_fdt()", but with the fix, it has a side effect thatall existing drivers that declared DM_FLAG_PRE_RELOC flag willbe bound before relocation now. This may expose potential bootfailure on some boards due to insufficient memory during thepre-relocation stage.To mitigate this potential impact, the following changes areimplemented:- Remove DM_FLAG_PRE_RELOC flag in the driver, if the driver only supports configuration from device tree (OF_CONTROL)- Keep DM_FLAG_PRE_RELOC flag in the driver only if the device is statically declared via U_BOOT_DEVICE()- Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for drivers that support both statically declared devices and configuration from device treeSigned-off-by: Bin Meng <bmeng.cn@gmail.com>Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
SPDX: Convert all of our single license tags to Linux Kernel styleWhen U-Boot started using SPDX tags we were among the early adopters andthere weren't a lot of other examples to borrow from. So
SPDX: Convert all of our single license tags to Linux Kernel styleWhen U-Boot started using SPDX tags we were among the early adopters andthere weren't a lot of other examples to borrow from. So we picked thearea of the file that usually had a full license text and replaced itwith an appropriate SPDX-License-Identifier: entry. Since then, theLinux Kernel has adopted SPDX tags and they place it as the very firstline in a file (except where shebangs are used, then it's second line)and with slightly different comment styles than us.In part due to community overlap, in part due to better tag visibilityand in part for other minor reasons, switch over to that style.This commit changes all instances where we have a single declaredlicense in the tag as both the before and after are identical in tagcontents. There's also a few places where I found we did not have a tagand have introduced one.Signed-off-by: Tom Rini <trini@konsulko.com>
Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTRWe have a large number of places where while we historically referencedgd in the code we no longer do, as well as cases where the code added
Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTRWe have a large number of places where while we historically referencedgd in the code we no longer do, as well as cases where the code addedthat line "just in case" during development and never dropped it.Signed-off-by: Tom Rini <trini@konsulko.com>
dm: Rename dev_addr..() functionsThese support the flat device tree. We want to use the dev_read_..()prefix for functions that support both flat tree and live tree. So renamethe existing function
dm: Rename dev_addr..() functionsThese support the flat device tree. We want to use the dev_read_..()prefix for functions that support both flat tree and live tree. So renamethe existing functions to avoid confusion.In the end we will have: 1. dev_read_addr...() - works on devices, supports flat/live tree 2. devfdt_get_addr...() - current functions, flat tree only 3. of_get_address() etc. - new functions, live tree onlyAll drivers will be written to use 1. That function will in turn calleither 2 or 3 depending on whether the flat or live tree is in use.Note this involves changing some dead code - the imx_lpi2c.c file.Signed-off-by: Simon Glass <sjg@chromium.org>
clk: convert API to match reset/mailbox styleThe following changes are made to the clock API:* The concept of "clocks" and "peripheral clocks" are unified; each clock provider now implements a s
clk: convert API to match reset/mailbox styleThe following changes are made to the clock API:* The concept of "clocks" and "peripheral clocks" are unified; each clock provider now implements a single set of clocks. This provides a simpler conceptual interface to clients, and better aligns with device tree clock bindings.* Clocks are now identified with a single "struct clk", rather than requiring clients to store the clock provider device and clock identity values separately. For simple clock consumers, this isolates clients from internal details of the clock API.* clk.h is split so it only contains the client/consumer API, whereas clk-uclass.h contains the provider API. This aligns with the recently added reset and mailbox APIs.* clk_ops .of_xlate(), .request(), and .free() are added so providers can customize these operations if needed. This also aligns with the recently added reset and mailbox APIs.* clk_disable() is added.* All users of the current clock APIs are updated.* Sandbox clock tests are updated to exercise clock lookup via DT, and clock enable/disable.* rkclk_get_clk() is removed and replaced with standard APIs.Buildman shows no clock-related errors for any board for which buildmancan download a toolchain.test/py passes for sandbox (which invokes the dm clk test amongstothers).Signed-off-by: Stephen Warren <swarren@nvidia.com>Acked-by: Simon Glass <sjg@chromium.org>
clk: exynos: add clock driver for Exynos7420 SocAdd a clock driver for Exynos7420 SoC. There are about 25 clock controllerblocks in Exynos7420 out of which support for topc, top0 and peric1 blocks
clk: exynos: add clock driver for Exynos7420 SocAdd a clock driver for Exynos7420 SoC. There are about 25 clock controllerblocks in Exynos7420 out of which support for topc, top0 and peric1 blocksare added in this initial version of the driver.Cc: Minkyu Kang <mk7.kang@samsung.com>Cc: Simon Glass <sjg@chromium.org>Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>Reviewed-by: Simon Glass <sjg@chromium.org>Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>