i.MX fixes for 5.15, round 3:
- Add platform device for i.MX System Reset Controller (SRC) to fix a regression caused by fw_devlink change. -----BEGIN PGP SIGNATURE----- iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmFpJFIUHHNoYXduZ3Vv QGtlcm5lbC5vcmcACgkQUFdYWoewfM67qwgApC/jIgISGcX4vv7C7VKlxriwVuJh UcThxgUy2si3HVRh6hqVgpnQiUip5NY8g9j6HoOyAijHEvkF3Seo7gy2oi62ZBwi 6aC9RnMtsHmNsNKhvvf89lF8dN2lujG9B+kmaAh6zcMtVHWukHauVJ5EM8I+sbSK JF+5JHg5/3T360RlJQE3VElSnQVcdlIdGNW5JSt5I4JXsW02/h9C7ZHjMBzvJ3J4 9d9rR3/vxie7bNh+XyeMYal8hD74iol08RiQ5kaFKqUJNTMmIxsDi3kzqjwIDdls x8hqM0+mneVDgdpuXsJqm9rL87UQUkaCkwclbY2HP3s4YnMyW9hrwzFW9g== =8qZN -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmFpzOgACgkQmmx57+YA GNkJsA/+LmO+Uek+/h9s0rAUhN1oml34evA/vJOok82tlj9jmjwhDBxuzA6iPrtX 5OLaLKpBmgOXkBNM3aEva+qoMoUC1gRFcUEcmyPYMLyPWV+6m1QYx1xlPUPihTrM 3UA/JUMu8bd5ktOblTaQ7g7O5WoKjYpiif4xs620Y/6PheVZlKqxignecIux6oCs BlzhcV+AONRK5ezjHoiGf30gWM3Pjn4869Ad00sVhIEwFKLmNBEvgr49YRzV1JN/ xKlwDvnlP96szUxyFrAVvmdgKcp/Tj+2kJOhr6VuASfhD7VdbtI4Hs+FfLPq5dvb Y9rf1Y3iuqgeerONfE5xm8v1FqdU3KWIj5wyU86ltBYjT3HMCUoBlKiO6kb+fvsr ID69AOmbbzyrgQQqV2RlVnUFhBuzq1BgeAacZD+6LT4v6w4N70ddMeAOEwyGVKEg Lh8421XZJ2yRdKs/iQ5smJBoxzT6k1cht9crD8B9xmK/dzLuoQi44LJ8F6sNIQnR /dwbVZzKdTEAynyA1FdmAe7io6u0eGbcXbyfUJAo86UkqK3QJNdnuSN6mxZH13mq cCCuYML8z31k3xHf/fO6Hl03UwuSXpWkX6itoUL3zcMx90tlCDNZ/MCQCveMdzmg jiRnXJyP/RRyJXHNutCEAqPR6Ip3fBUBp+i3giV8YqVIJNe0hUw= =oxqg -----END PGP SIGNATURE----- Merge tag 'imx-fixes-5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.15, round 3: - Add platform device for i.MX System Reset Controller (SRC) to fix a regression caused by fw_devlink change. * tag 'imx-fixes-5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: register reset controller from a platform driver Link: https://lore.kernel.org/r/20211015070017.GI22881@dragon Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
011ace4a7f
@ -9,6 +9,7 @@
|
||||
#include <linux/iopoll.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/reset-controller.h>
|
||||
#include <linux/smp.h>
|
||||
#include <asm/smp_plat.h>
|
||||
@ -81,11 +82,6 @@ static const struct reset_control_ops imx_src_ops = {
|
||||
.reset = imx_src_reset_module,
|
||||
};
|
||||
|
||||
static struct reset_controller_dev imx_reset_controller = {
|
||||
.ops = &imx_src_ops,
|
||||
.nr_resets = ARRAY_SIZE(sw_reset_bits),
|
||||
};
|
||||
|
||||
static void imx_gpcv2_set_m_core_pgc(bool enable, u32 offset)
|
||||
{
|
||||
writel_relaxed(enable, gpc_base + offset);
|
||||
@ -177,10 +173,6 @@ void __init imx_src_init(void)
|
||||
src_base = of_iomap(np, 0);
|
||||
WARN_ON(!src_base);
|
||||
|
||||
imx_reset_controller.of_node = np;
|
||||
if (IS_ENABLED(CONFIG_RESET_CONTROLLER))
|
||||
reset_controller_register(&imx_reset_controller);
|
||||
|
||||
/*
|
||||
* force warm reset sources to generate cold reset
|
||||
* for a more reliable restart
|
||||
@ -214,3 +206,33 @@ void __init imx7_src_init(void)
|
||||
if (!gpc_base)
|
||||
return;
|
||||
}
|
||||
|
||||
static const struct of_device_id imx_src_dt_ids[] = {
|
||||
{ .compatible = "fsl,imx51-src" },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
|
||||
static int imx_src_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct reset_controller_dev *rcdev;
|
||||
|
||||
rcdev = devm_kzalloc(&pdev->dev, sizeof(*rcdev), GFP_KERNEL);
|
||||
if (!rcdev)
|
||||
return -ENOMEM;
|
||||
|
||||
rcdev->ops = &imx_src_ops;
|
||||
rcdev->dev = &pdev->dev;
|
||||
rcdev->of_node = pdev->dev.of_node;
|
||||
rcdev->nr_resets = ARRAY_SIZE(sw_reset_bits);
|
||||
|
||||
return devm_reset_controller_register(&pdev->dev, rcdev);
|
||||
}
|
||||
|
||||
static struct platform_driver imx_src_driver = {
|
||||
.driver = {
|
||||
.name = "imx-src",
|
||||
.of_match_table = imx_src_dt_ids,
|
||||
},
|
||||
.probe = imx_src_probe,
|
||||
};
|
||||
builtin_platform_driver(imx_src_driver);
|
||||
|
Loading…
Reference in New Issue
Block a user