Early ASPEED driver updates for 6.18

Two small changes, the most interesting being the addition of the silicon IDs
 for ASPEED's AST2700 SoC family.
 -----BEGIN PGP SIGNATURE-----
 
 iJIEABYIADoWIQSoUT1x3bOSX/nAa8ajM9GZTrjhpgUCaKu87RwcYW5kcmV3QGNv
 ZGVjb25zdHJ1Y3QuY29tLmF1AAoJEKMz0ZlOuOGmxAoBAIWvFqHDVHh4qzcnmNeM
 g1a5wEbNo/wS0DcEAX39tr9+AP45dJRQdIyj1lFbp0oyGvoyMK1zzr/cUQUGgdTQ
 5OPgBQ==
 =rg00
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmi1cLoACgkQmmx57+YA
 GNkv+xAAm3l42yMRz7GbMNTRbBOh+On9XlvViXHbOjk4KFaBqEtiIYdbaoM8iIeI
 Pp0wv4yX8Dn7qDd4THTKJ1xnnoe+wGwsYAi5lwR/miJv4U4ZyfWoDKhsNzvbCrL7
 j25FyKMcXMmV1U+fufNUGOAwcjOawP26ud8Fb2xT2yEnaZl0em30hbMaYUu7Uj+0
 /jBtTUf0nrHC7TRFgnM1oKRW41WjZgsD8Tdc/gTW2eWS68bG9XBBSPqWVxH4JcG9
 JwP4yZ2RLRZb8YknVJhT3ue8FvtNklRcyo5O9iZCbDfIYJGsvZJZ3vuHvPlFkB+9
 v/eQ4qDaWoJCJsAdzv1Jqp2Gcb4hTiwsTckwGGjVBe7vgjHYBkFlOPmlp2cqpi0D
 vCLP+4SHlsz8koGRtPgC9sDJO+RvY32il2Kp6eMfWHEQ67h/8ncYQyW663uWJAek
 hpdt6mFhj7k55YusKPH43KKdy12dtO7pnNja0Iio/GQ2cFrXzX1Tr3xdsaZS1L8K
 Ipmjj0zGdJV21aEOCxtWDK4302702+nMKNh9zCgZYC7L8OtL23Pm3gIEqegcVrKV
 IHvQRWnCg8Z0R4C00doDpVZyC38hAU/DigEIDVzbXK/UQZpTfMb8v817Il/5bUXZ
 ONM/i60qW7aLchItfnuy9yNCZEgPtI4+CsJqztBCGDUHjVDnfHQ=
 =mCh9
 -----END PGP SIGNATURE-----

Merge tag 'aspeed-6.18-drivers-0' of https://git.kernel.org/pub/scm/linux/kernel/git/bmc/linux into soc/drivers

Early ASPEED driver updates for 6.18

Two small changes, the most interesting being the addition of the silicon IDs
for ASPEED's AST2700 SoC family.

* tag 'aspeed-6.18-drivers-0' of https://git.kernel.org/pub/scm/linux/kernel/git/bmc/linux:
  soc: aspeed: socinfo: Add AST27xx silicon IDs
  soc: aspeed: Use of_reserved_mem_region_to_resource() for "memory-region"

Link: https://lore.kernel.org/r/2d122b5c4a19261148993b66e4b98371a684ba74.camel@codeconstruct.com.au
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2025-09-01 12:08:58 +02:00
commit fa93213f42
3 changed files with 10 additions and 22 deletions

@ -10,6 +10,7 @@
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/of_reserved_mem.h>
#include <linux/platform_device.h>
#include <linux/poll.h>
#include <linux/regmap.h>
@ -254,17 +255,8 @@ static int aspeed_lpc_ctrl_probe(struct platform_device *pdev)
dev_set_drvdata(&pdev->dev, lpc_ctrl);
/* If memory-region is described in device tree then store */
node = of_parse_phandle(dev->of_node, "memory-region", 0);
if (!node) {
dev_dbg(dev, "Didn't find reserved memory\n");
} else {
rc = of_address_to_resource(node, 0, &resm);
of_node_put(node);
if (rc) {
dev_err(dev, "Couldn't address to resource for reserved memory\n");
return -ENXIO;
}
rc = of_reserved_mem_region_to_resource(dev->of_node, 0, &resm);
if (!rc) {
lpc_ctrl->mem_size = resource_size(&resm);
lpc_ctrl->mem_base = resm.start;

@ -19,7 +19,7 @@
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_reserved_mem.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/slab.h>
@ -334,7 +334,6 @@ static int aspeed_p2a_ctrl_probe(struct platform_device *pdev)
struct aspeed_p2a_ctrl *misc_ctrl;
struct device *dev;
struct resource resm;
struct device_node *node;
int rc = 0;
dev = &pdev->dev;
@ -346,15 +345,8 @@ static int aspeed_p2a_ctrl_probe(struct platform_device *pdev)
mutex_init(&misc_ctrl->tracking);
/* optional. */
node = of_parse_phandle(dev->of_node, "memory-region", 0);
if (node) {
rc = of_address_to_resource(node, 0, &resm);
of_node_put(node);
if (rc) {
dev_err(dev, "Couldn't address to resource for reserved memory\n");
return -ENODEV;
}
rc = of_reserved_mem_region_to_resource(dev->of_node, 0, &resm);
if (!rc) {
misc_ctrl->mem_size = resource_size(&resm);
misc_ctrl->mem_base = resm.start;
}

@ -27,6 +27,10 @@ static struct {
{ "AST2620", 0x05010203 },
{ "AST2605", 0x05030103 },
{ "AST2625", 0x05030403 },
/* AST2700 */
{ "AST2750", 0x06000003 },
{ "AST2700", 0x06000103 },
{ "AST2720", 0x06000203 },
};
static const char *siliconid_to_name(u32 siliconid)