mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 01:24:12 +08:00
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. -----BEGIN PGP SIGNATURE----- iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmQxG6sUHHNoYXduZ3Vv QGtlcm5lbC5vcmcACgkQUFdYWoewfM5k3gf/QJR0kN9aj9AYrkMFYQoIMPGEmBek 2f72o4APQU96hM9bHKcpoEz7lPRlZH6WLip6pZCCEr9SExc2teOsyGEVB33NtNqd u8AipscSF3Snl2ZCYYwc8hd1RlXdIv/mM0R8CyURjdyE06rW3DN0rTjyf5GH2sYn HXFgUL5ks5xclINZFyL3tMatuSNGfpB2iGFl10b1BES0jiDYNN1QXNoUbwsKsyQE FRjRQJXpIo4gJj5hFufxWFODAnk6BZh7CVMM6Ec0J+kLVAzX7X2T3hh6R4TABDGF yX/M+hH6HpGxhDlOg7To97iMXCS3CR51CDDn+VHtJ9TL1t6pI49aB4un0A== =UfBF -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmQ5R4QACgkQYKtH/8kJ UieoyhAA0qqgu8lMLmbx4pehuzuwEmm9Wf0L9xqOi11YZscBQX1NbNg4HwaCOJ1j 4YSXZRcyMuIC05DP6AnM6UAsSjczIU/u2bhjNveg6BJMNcL8nAF69wfKC2VBvsnD gqt/fwa+P6HZ4k7yJT+U7zfrZOokPrc6/CbnUr3BMuczGPI92H8zYa+SH45Vnjza ZGm8sQwu6jzQJ5ti+igBiq8xzpJbzVszSeIvIE3Ivrlew3SfcHbZXn6oO8hb/TNu 1UmBM7Sczg7c55iAnFI95Hj0ZanHDB5RJdrWPJfqnItAR7kjzfbtvHGi/EXNE76s 64LGfvrv5nCZwnpom69WmMCY2NUpF2DDb2X8bsuLQWgmjjm3sJJ4zcyeVeiPf7ff CMyC9UwixVWl/3335NOkVGAxMI4Kq7WA30TI/KF9M7Gbvxhp78Sk1Mi41qOUxgM5 lvoENn7rHiCbPF8kvzk3RIO3IXJpKMSKXf24Bl20lNrpffUEkYHEVUy37IotAHZY W4CC3z+Wb161NiaOCxZd9XoD0Jp58zbEKEMF2AbycmGV5q/DVwgELCIDfBB3LsGc FBsYGYgKyTCeP7wQIDRojrISea3Y47e7cj5RKo/tGDhWfbZPz8cWwBc53I2Y+BHG Cdqsk+PjNO3cl4jsHZ0jbjBqNyPALu8ISePKXCeb3PXvxEUfMMg= =FNEr -----END PGP SIGNATURE----- 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>
This commit is contained in:
commit
e4fa3c7fc7
@ -10,6 +10,7 @@
|
|||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
|
#include <linux/of_address.h>
|
||||||
#include <linux/of_device.h>
|
#include <linux/of_device.h>
|
||||||
#include <linux/mfd/syscon.h>
|
#include <linux/mfd/syscon.h>
|
||||||
#include <linux/mfd/syscon/imx6q-iomuxc-gpr.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)
|
static int imx_weim_gpr_setup(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct device_node *np = pdev->dev.of_node;
|
struct device_node *np = pdev->dev.of_node;
|
||||||
struct property *prop;
|
struct of_range_parser parser;
|
||||||
const __be32 *p;
|
struct of_range range;
|
||||||
struct regmap *gpr;
|
struct regmap *gpr;
|
||||||
u32 gprvals[4] = {
|
u32 gprvals[4] = {
|
||||||
05, /* CS0(128M) CS1(0M) CS2(0M) CS3(0M) */
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
of_property_for_each_u32(np, "ranges", prop, p, val) {
|
if (of_range_parser_init(&parser, np))
|
||||||
if (i % 4 == 0) {
|
goto err;
|
||||||
cs = val;
|
|
||||||
} else if (i % 4 == 3 && val) {
|
for_each_of_range(&parser, &range) {
|
||||||
val = (val / SZ_32M) | 1;
|
cs = range.bus_addr >> 32;
|
||||||
gprval |= val << cs * 3;
|
val = (range.size / SZ_32M) | 1;
|
||||||
}
|
gprval |= val << cs * 3;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,9 +310,8 @@ static int imx_scu_probe(struct platform_device *pdev)
|
|||||||
sc_chan->ch = mbox_request_channel_byname(cl, chan_name);
|
sc_chan->ch = mbox_request_channel_byname(cl, chan_name);
|
||||||
if (IS_ERR(sc_chan->ch)) {
|
if (IS_ERR(sc_chan->ch)) {
|
||||||
ret = PTR_ERR(sc_chan->ch);
|
ret = PTR_ERR(sc_chan->ch);
|
||||||
if (ret != -EPROBE_DEFER)
|
dev_err_probe(dev, ret, "Failed to request mbox chan %s\n",
|
||||||
dev_err(dev, "Failed to request mbox chan %s ret %d\n",
|
chan_name);
|
||||||
chan_name, ret);
|
|
||||||
kfree(chan_name);
|
kfree(chan_name);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -180,7 +180,11 @@ static const struct imx_sc_pd_range imx8qxp_scu_pd_ranges[] = {
|
|||||||
|
|
||||||
/* LVDS SS */
|
/* LVDS SS */
|
||||||
{ "lvds0", IMX_SC_R_LVDS_0, 1, false, 0 },
|
{ "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", 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 */
|
/* DC SS */
|
||||||
{ "dc0", IMX_SC_R_DC_0, 1, false, 0 },
|
{ "dc0", IMX_SC_R_DC_0, 1, false, 0 },
|
||||||
|
@ -10,7 +10,7 @@ config IMX_GPCV2_PM_DOMAINS
|
|||||||
default y if SOC_IMX7D
|
default y if SOC_IMX7D
|
||||||
|
|
||||||
config SOC_IMX8M
|
config SOC_IMX8M
|
||||||
bool "i.MX8M SoC family support"
|
tristate "i.MX8M SoC family support"
|
||||||
depends on ARCH_MXC || COMPILE_TEST
|
depends on ARCH_MXC || COMPILE_TEST
|
||||||
default ARCH_MXC && ARM64
|
default ARCH_MXC && ARM64
|
||||||
select SOC_BUS
|
select SOC_BUS
|
||||||
|
@ -38,10 +38,10 @@ struct imx8m_blk_ctrl {
|
|||||||
struct imx8m_blk_ctrl_domain_data {
|
struct imx8m_blk_ctrl_domain_data {
|
||||||
const char *name;
|
const char *name;
|
||||||
const char * const *clk_names;
|
const char * const *clk_names;
|
||||||
int num_clks;
|
|
||||||
const char * const *path_names;
|
const char * const *path_names;
|
||||||
int num_paths;
|
|
||||||
const char *gpc_name;
|
const char *gpc_name;
|
||||||
|
int num_clks;
|
||||||
|
int num_paths;
|
||||||
u32 rst_mask;
|
u32 rst_mask;
|
||||||
u32 clk_mask;
|
u32 clk_mask;
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
|
|||||||
if (!bc->onecell_data.domains)
|
if (!bc->onecell_data.domains)
|
||||||
return -ENOMEM;
|
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 (IS_ERR(bc->bus_power_dev)) {
|
||||||
if (PTR_ERR(bc->bus_power_dev) == -ENODEV)
|
if (PTR_ERR(bc->bus_power_dev) == -ENODEV)
|
||||||
return dev_err_probe(dev, -EPROBE_DEFER,
|
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);
|
dev_set_drvdata(dev, bc);
|
||||||
|
|
||||||
|
ret = devm_of_platform_populate(dev);
|
||||||
|
if (ret)
|
||||||
|
goto cleanup_provider;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
cleanup_provider:
|
cleanup_provider:
|
||||||
@ -891,3 +895,4 @@ static struct platform_driver imx8m_blk_ctrl_driver = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
module_platform_driver(imx8m_blk_ctrl_driver);
|
module_platform_driver(imx8m_blk_ctrl_driver);
|
||||||
|
MODULE_LICENSE("GPL");
|
||||||
|
@ -642,7 +642,7 @@ static int imx8mp_blk_ctrl_probe(struct platform_device *pdev)
|
|||||||
if (!bc->onecell_data.domains)
|
if (!bc->onecell_data.domains)
|
||||||
return -ENOMEM;
|
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 (IS_ERR(bc->bus_power_dev))
|
||||||
return dev_err_probe(dev, PTR_ERR(bc->bus_power_dev),
|
return dev_err_probe(dev, PTR_ERR(bc->bus_power_dev),
|
||||||
"failed to attach bus power domain\n");
|
"failed to attach bus power domain\n");
|
||||||
@ -852,7 +852,7 @@ static const struct of_device_id imx8mp_blk_ctrl_of_match[] = {
|
|||||||
/* Sentinel */
|
/* Sentinel */
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, imx8m_blk_ctrl_of_match);
|
MODULE_DEVICE_TABLE(of, imx8mp_blk_ctrl_of_match);
|
||||||
|
|
||||||
static struct platform_driver imx8mp_blk_ctrl_driver = {
|
static struct platform_driver imx8mp_blk_ctrl_driver = {
|
||||||
.probe = imx8mp_blk_ctrl_probe,
|
.probe = imx8mp_blk_ctrl_probe,
|
||||||
@ -864,3 +864,4 @@ static struct platform_driver imx8mp_blk_ctrl_driver = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
module_platform_driver(imx8mp_blk_ctrl_driver);
|
module_platform_driver(imx8mp_blk_ctrl_driver);
|
||||||
|
MODULE_LICENSE("GPL");
|
||||||
|
@ -242,3 +242,4 @@ free_soc:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
device_initcall(imx8_soc_init);
|
device_initcall(imx8_soc_init);
|
||||||
|
MODULE_LICENSE("GPL");
|
||||||
|
Loading…
Reference in New Issue
Block a user