Unverified Commit e4fa3c7f authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'imx-drivers-6.4' of...

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: default avatarArnd Bergmann <arnd@arndb.de>
parents 3d3b32a6 816aec03
Loading
Loading
Loading
Loading
+10 −9
Original line number Diff line number Diff line
@@ -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;
	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++;
	}

+2 −3
Original line number Diff line number Diff line
@@ -310,9 +310,8 @@ static int imx_scu_probe(struct platform_device *pdev)
		sc_chan->ch = mbox_request_channel_byname(cl, chan_name);
		if (IS_ERR(sc_chan->ch)) {
			ret = PTR_ERR(sc_chan->ch);
			if (ret != -EPROBE_DEFER)
				dev_err(dev, "Failed to request mbox chan %s ret %d\n",
					chan_name, ret);
			dev_err_probe(dev, ret, "Failed to request mbox chan %s\n",
				      chan_name);
			kfree(chan_name);
			return ret;
		}
+4 −0
Original line number Diff line number Diff line
@@ -180,7 +180,11 @@ static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = {

	/* LVDS SS */
	{ "lvds0", IMX_SC_R_LVDS_0, 1, false, 0 },
	{ "lvds0-pwm", IMX_SC_R_LVDS_0_PWM_0, 1, false, 0 },
	{ "lvds0-lpi2c", IMX_SC_R_LVDS_0_I2C_0, 2, true, 0 },
	{ "lvds1", IMX_SC_R_LVDS_1, 1, false, 0 },
	{ "lvds1-pwm", IMX_SC_R_LVDS_1_PWM_0, 1, false, 0 },
	{ "lvds1-lpi2c", IMX_SC_R_LVDS_1_I2C_0, 2, true, 0 },

	/* DC SS */
	{ "dc0", IMX_SC_R_DC_0, 1, false, 0 },
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ config IMX_GPCV2_PM_DOMAINS
	default y if SOC_IMX7D

config SOC_IMX8M
	bool "i.MX8M SoC family support"
	tristate "i.MX8M SoC family support"
	depends on ARCH_MXC || COMPILE_TEST
	default ARCH_MXC && ARM64
	select SOC_BUS
+8 −3
Original line number Diff line number Diff line
@@ -38,10 +38,10 @@ struct imx8m_blk_ctrl {
struct imx8m_blk_ctrl_domain_data {
	const char *name;
	const char * const *clk_names;
	int num_clks;
	const char * const *path_names;
	int num_paths;
	const char *gpc_name;
	int num_clks;
	int num_paths;
	u32 rst_mask;
	u32 clk_mask;

@@ -210,7 +210,7 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
	if (!bc->onecell_data.domains)
		return -ENOMEM;

	bc->bus_power_dev = genpd_dev_pm_attach_by_name(dev, "bus");
	bc->bus_power_dev = dev_pm_domain_attach_by_name(dev, "bus");
	if (IS_ERR(bc->bus_power_dev)) {
		if (PTR_ERR(bc->bus_power_dev) == -ENODEV)
			return dev_err_probe(dev, -EPROBE_DEFER,
@@ -310,6 +310,10 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)

	dev_set_drvdata(dev, bc);

	ret = devm_of_platform_populate(dev);
	if (ret)
		goto cleanup_provider;

	return 0;

cleanup_provider:
@@ -891,3 +895,4 @@ static struct platform_driver imx8m_blk_ctrl_driver = {
	},
};
module_platform_driver(imx8m_blk_ctrl_driver);
MODULE_LICENSE("GPL");
Loading