meson64-6.12: Update meson-gx-socinfo patchset for 6.12
Signed-off-by: Viacheslav Bocharov <adeep@lexina.in>
This commit is contained in:
parent
98a8823ba7
commit
d76427e85c
@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Viacheslav Bocharov <adeep@lexina.in>
|
||||
Date: Tue, 4 Jun 2024 17:18:08 +0300
|
||||
Date: Mon, 18 Nov 2024 15:36:06 +0300
|
||||
Subject: soc: amlogic: meson-gx-socinfo: move common code to header file
|
||||
|
||||
Move common constants and inline functions from meson-gx-socinfo driver
|
||||
@ -8,16 +8,16 @@ to header file. Create new structures for store meson64 cpu_id and chip_id.
|
||||
|
||||
Signed-off-by: Viacheslav Bocharov <adeep@lexina.in>
|
||||
---
|
||||
drivers/soc/amlogic/meson-gx-socinfo-internal.h | 122 ++++++++
|
||||
drivers/soc/amlogic/meson-gx-socinfo.c | 140 +---------
|
||||
2 files changed, 137 insertions(+), 125 deletions(-)
|
||||
drivers/soc/amlogic/meson-gx-socinfo-internal.h | 132 ++++++++
|
||||
drivers/soc/amlogic/meson-gx-socinfo.c | 150 +---------
|
||||
2 files changed, 147 insertions(+), 135 deletions(-)
|
||||
|
||||
diff --git a/drivers/soc/amlogic/meson-gx-socinfo-internal.h b/drivers/soc/amlogic/meson-gx-socinfo-internal.h
|
||||
new file mode 100644
|
||||
index 000000000000..111111111111
|
||||
--- /dev/null
|
||||
+++ b/drivers/soc/amlogic/meson-gx-socinfo-internal.h
|
||||
@@ -0,0 +1,122 @@
|
||||
@@ -0,0 +1,132 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
+/*
|
||||
+ * Copyright (c) 2017 BayLibre, SAS
|
||||
@ -76,6 +76,11 @@ index 000000000000..111111111111
|
||||
+ { "G12B", 0x29 },
|
||||
+ { "SM1", 0x2b },
|
||||
+ { "A1", 0x2c },
|
||||
+ { "T7", 0x36 },
|
||||
+ { "S4", 0x37 },
|
||||
+ { "A5", 0x3c },
|
||||
+ { "C3", 0x3d },
|
||||
+ { "A4", 0x40 },
|
||||
+};
|
||||
+
|
||||
+static const struct meson_gx_package_id {
|
||||
@ -111,6 +116,11 @@ index 000000000000..111111111111
|
||||
+ { "S905X3", 0x2b, 0x10, 0x3f },
|
||||
+ { "S905D3", 0x2b, 0x30, 0x3f },
|
||||
+ { "A113L", 0x2c, 0x0, 0xf8 },
|
||||
+ { "S805X2", 0x37, 0x2, 0xf },
|
||||
+ { "C308L", 0x3d, 0x1, 0xf },
|
||||
+ { "A311D2", 0x36, 0x1, 0xf },
|
||||
+ { "A113X2", 0x3c, 0x1, 0xf },
|
||||
+ { "A113L2", 0x40, 0x1, 0xf },
|
||||
+};
|
||||
+
|
||||
+static inline const char *socinfo_v1_to_package_id(union meson_cpu_id socinfo)
|
||||
@ -154,7 +164,7 @@ index 111111111111..222222222222 100644
|
||||
*/
|
||||
|
||||
#include <linux/io.h>
|
||||
@@ -12,120 +12,10 @@
|
||||
@@ -12,130 +12,10 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/sys_soc.h>
|
||||
@ -187,6 +197,11 @@ index 111111111111..222222222222 100644
|
||||
- { "G12B", 0x29 },
|
||||
- { "SM1", 0x2b },
|
||||
- { "A1", 0x2c },
|
||||
- { "T7", 0x36 },
|
||||
- { "S4", 0x37 },
|
||||
- { "A5", 0x3c },
|
||||
- { "C3", 0x3d },
|
||||
- { "A4", 0x40 },
|
||||
-};
|
||||
-
|
||||
-static const struct meson_gx_package_id {
|
||||
@ -222,6 +237,11 @@ index 111111111111..222222222222 100644
|
||||
- { "S905X3", 0x2b, 0x10, 0x3f },
|
||||
- { "S905D3", 0x2b, 0x30, 0x3f },
|
||||
- { "A113L", 0x2c, 0x0, 0xf8 },
|
||||
- { "S805X2", 0x37, 0x2, 0xf },
|
||||
- { "C308L", 0x3d, 0x1, 0xf },
|
||||
- { "A311D2", 0x36, 0x1, 0xf },
|
||||
- { "A113X2", 0x3c, 0x1, 0xf },
|
||||
- { "A113L2", 0x40, 0x1, 0xf },
|
||||
-};
|
||||
-
|
||||
-static inline unsigned int socinfo_to_major(u32 socinfo)
|
||||
@ -276,7 +296,7 @@ index 111111111111..222222222222 100644
|
||||
|
||||
static int __init meson_gx_socinfo_init(void)
|
||||
{
|
||||
@@ -133,7 +23,7 @@ static int __init meson_gx_socinfo_init(void)
|
||||
@@ -143,7 +23,7 @@ static int __init meson_gx_socinfo_init(void)
|
||||
struct soc_device *soc_dev;
|
||||
struct device_node *np;
|
||||
struct regmap *regmap;
|
||||
@ -285,7 +305,7 @@ index 111111111111..222222222222 100644
|
||||
struct device *dev;
|
||||
int ret;
|
||||
|
||||
@@ -162,11 +52,11 @@ static int __init meson_gx_socinfo_init(void)
|
||||
@@ -172,11 +52,11 @@ static int __init meson_gx_socinfo_init(void)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@ -299,7 +319,7 @@ index 111111111111..222222222222 100644
|
||||
pr_err("%s: invalid chipid value\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -177,13 +67,13 @@ static int __init meson_gx_socinfo_init(void)
|
||||
@@ -187,13 +67,13 @@ static int __init meson_gx_socinfo_init(void)
|
||||
|
||||
soc_dev_attr->family = "Amlogic Meson";
|
||||
soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%x:%x - %x:%x",
|
||||
@ -319,7 +339,7 @@ index 111111111111..222222222222 100644
|
||||
|
||||
soc_dev = soc_device_register(soc_dev_attr);
|
||||
if (IS_ERR(soc_dev)) {
|
||||
@@ -196,10 +86,10 @@ static int __init meson_gx_socinfo_init(void)
|
||||
@@ -206,10 +86,10 @@ static int __init meson_gx_socinfo_init(void)
|
||||
|
||||
dev_info(dev, "Amlogic Meson %s Revision %x:%x (%x:%x) Detected\n",
|
||||
soc_dev_attr->soc_id,
|
||||
@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Viacheslav Bocharov <adeep@lexina.in>
|
||||
Date: Wed, 21 Feb 2024 16:41:30 +0300
|
||||
Date: Mon, 18 Nov 2024 15:36:49 +0300
|
||||
Subject: soc: amlogic: meson-gx-socinfo-sm: Add Amlogic secure-monitor SoC
|
||||
Information driver
|
||||
|
||||
@ -10,8 +10,6 @@ This patchs adds support for secure-monitor call decoding and exposing
|
||||
with the SoC bus infrastructure in addition to the previous SoC
|
||||
Information driver.
|
||||
|
||||
- rpardini: hack to fix "initialization of 'void (*)(struct platform_device *)' from incompatible pointer type 'int (*)(struct platform_device *)'"
|
||||
|
||||
Signed-off-by: Viacheslav Bocharov <adeep@lexina.in>
|
||||
---
|
||||
drivers/soc/amlogic/Kconfig | 10 +
|
||||
@ -71,7 +69,7 @@ index 111111111111..222222222222 100644
|
||||
+ } v2;
|
||||
+ struct { // raw
|
||||
+ u32 version;
|
||||
+ u8 buf[12+sizeof(union meson_cpu_id)];
|
||||
+ u8 buf[12 + sizeof(union meson_cpu_id)];
|
||||
+ } raw;
|
||||
};
|
||||
|
||||
@ -243,12 +241,12 @@ index 000000000000..111111111111
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void meson_gx_socinfo_sm_remove(struct platform_device *pdev)
|
||||
+static int meson_gx_socinfo_sm_remove(struct platform_device *pdev)
|
||||
+{
|
||||
+ struct soc_device *soc_dev = platform_get_drvdata(pdev);
|
||||
+
|
||||
+ soc_device_unregister(soc_dev);
|
||||
+ // return 0;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id meson_gx_socinfo_match[] = {
|
||||
@ -15,7 +15,7 @@ diff --git a/Documentation/devicetree/bindings/arm/amlogic/amlogic,meson-gx-ao-s
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/amlogic/amlogic,meson-gx-ao-secure.yaml
|
||||
+++ b/Documentation/devicetree/bindings/arm/amlogic/amlogic,meson-gx-ao-secure.yaml
|
||||
@@ -32,6 +32,10 @@ properties:
|
||||
@@ -40,6 +40,10 @@ properties:
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user