summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2023-12-22 13:39:02 +0300
committerArnd Bergmann <arnd@arndb.de>2023-12-22 13:39:03 +0300
commitfe0a6cebe9f3556e811ae46b20ac573a280c5064 (patch)
tree51f3aee40cfa5d1258104559be52c3988a7b3eaf /arch/arm
parent6248b4095f4044fc7c10db1058b197414815df50 (diff)
parentc8705471b94d0d869e2e3ac80c0d960f0215474f (diff)
downloadlinux-fe0a6cebe9f3556e811ae46b20ac573a280c5064.tar.xz
Merge tag 'imx-soc-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/arm
i.MX SoC change for 6.8: - Update mach-imx MMDC driver to use device_get_match_data(). - Drop the use of "fsl,clkctrl" from mach-mxs platform code, as it's an undocumented compatible. * tag 'imx-soc-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: mxs: Do not search for "fsl,clkctrl" ARM: imx: Use device_get_match_data() Link: https://lore.kernel.org/r/20231216064605.876196-2-shawnguo@kernel.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-imx/mmdc.c9
-rw-r--r--arch/arm/mach-mxs/mach-mxs.c4
2 files changed, 7 insertions, 6 deletions
diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
index 2157493b78a9..897e6def59ee 100644
--- a/arch/arm/mach-imx/mmdc.c
+++ b/arch/arm/mach-imx/mmdc.c
@@ -13,7 +13,8 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
-#include <linux/of_device.h>
+#include <linux/platform_device.h>
+#include <linux/property.h>
#include <linux/perf_event.h>
#include <linux/slab.h>
@@ -103,7 +104,7 @@ struct mmdc_pmu {
struct device *dev;
struct perf_event *mmdc_events[MMDC_NUM_COUNTERS];
struct hlist_node node;
- struct fsl_mmdc_devtype_data *devtype_data;
+ const struct fsl_mmdc_devtype_data *devtype_data;
struct clk *mmdc_ipg_clk;
};
@@ -474,8 +475,6 @@ static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_b
struct mmdc_pmu *pmu_mmdc;
char *name;
int ret;
- const struct of_device_id *of_id =
- of_match_device(imx_mmdc_dt_ids, &pdev->dev);
pmu_mmdc = kzalloc(sizeof(*pmu_mmdc), GFP_KERNEL);
if (!pmu_mmdc) {
@@ -503,7 +502,7 @@ static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_b
GFP_KERNEL, "mmdc%d", ret);
pmu_mmdc->mmdc_ipg_clk = mmdc_ipg_clk;
- pmu_mmdc->devtype_data = (struct fsl_mmdc_devtype_data *)of_id->data;
+ pmu_mmdc->devtype_data = device_get_match_data(&pdev->dev);
hrtimer_init(&pmu_mmdc->hrtimer, CLOCK_MONOTONIC,
HRTIMER_MODE_REL);
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index 3faf9a1e3e36..6e017fa306c8 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -356,7 +356,9 @@ static int __init mxs_restart_init(void)
{
struct device_node *np;
- np = of_find_compatible_node(NULL, NULL, "fsl,clkctrl");
+ np = of_find_compatible_node(NULL, NULL, "fsl,imx23-clkctrl");
+ if (!np)
+ np = of_find_compatible_node(NULL, NULL, "fsl,imx28-clkctrl");
reset_addr = of_iomap(np, 0);
if (!reset_addr)
return -ENODEV;