diff options
author | Arnd Bergmann <arnd@arndb.de> | 2023-04-14 14:30:59 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2023-04-14 14:30:59 +0200 |
commit | e4fa3c7fc7b4da52c34c4ad479b61ef4dbccb6a5 (patch) | |
tree | 163620efdf92974f5b11b8139df688e3c6757a24 /drivers/bus | |
parent | 3d3b32a6dd1ebb06668c291f793fa7a34810cfe4 (diff) | |
parent | 816aec03a043af6d0234c3e770bead2c772ef4eb (diff) |
Merge tag 'imx-drivers-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/drivers
i.MX drivers update for 6.4:
- Use dev_err_probe() for imx-scu driver to silences EPROBE_DEFER
messages.
- Add LVDS LPI2C and PWM power domains for scu-pd driver.
- A series from Jindong Yue to support module build of imx8m soc driver.
- Update imx8m-blk-ctrl driver to scan child nodes for binding drivers.
- Reorder structure members in imx8m-blk-ctrl driver by following
clang-analyzer suggestion.
- Update imx-weim bus driver to use helper function for "ranges"
parsing.
* tag 'imx-drivers-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
soc: imx: imx8m-blk-ctrl: reordering the fields
soc: imx8m: Support building imx8m soc driver as module
soc: imx8m: Add MODULE_LICENSE
soc: imx: imx8m-blk-ctrl: Add MODULE_LICENSE
soc: imx: imx8m-blk-ctrl: Use dev_pm_domain_attach_by_name
soc: imx: imx8mp-blk-ctrl: Add MODULE_LICENSE
soc: imx: imx8mp-blk-ctrl: Fix typo of imx8m_blk_ctrl_of_match
soc: imx: imx8mp-blk-ctrl: Use dev_pm_domain_attach_by_name
soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them
firmware: imx: scu-pd: add missed lvds lpi2c and pwm power domains
bus: imx-weim: Remove open coded "ranges" parsing
firmware: imx: scu: use dev_err_probe
Link: https://lore.kernel.org/r/20230408101928.280271-1-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/bus')
-rw-r--r-- | drivers/bus/imx-weim.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c index 2a6b4f676458..a8fd41e8114e 100644 --- a/drivers/bus/imx-weim.c +++ b/drivers/bus/imx-weim.c @@ -10,6 +10,7 @@ #include <linux/module.h> #include <linux/clk.h> #include <linux/io.h> +#include <linux/of_address.h> #include <linux/of_device.h> #include <linux/mfd/syscon.h> #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h> @@ -86,8 +87,8 @@ MODULE_DEVICE_TABLE(of, weim_id_table); static int imx_weim_gpr_setup(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; - struct property *prop; - const __be32 *p; + struct of_range_parser parser; + struct of_range range; struct regmap *gpr; u32 gprvals[4] = { 05, /* CS0(128M) CS1(0M) CS2(0M) CS3(0M) */ @@ -106,13 +107,13 @@ static int imx_weim_gpr_setup(struct platform_device *pdev) return 0; } - of_property_for_each_u32(np, "ranges", prop, p, val) { - if (i % 4 == 0) { - cs = val; - } else if (i % 4 == 3 && val) { - val = (val / SZ_32M) | 1; - gprval |= val << cs * 3; - } + if (of_range_parser_init(&parser, np)) + goto err; + + for_each_of_range(&parser, &range) { + cs = range.bus_addr >> 32; + val = (range.size / SZ_32M) | 1; + gprval |= val << cs * 3; i++; } |