[PATCH 2/4] amba: drop unused hepers for creating AMBA devices outside OF
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue Mar 18 01:25:05 PDT 2025
All amba devices created for upstream boards are instantiated from
device tree. The headers have functions that can be used from board
code, but are unused, so let's drop them and make AMBA OF-only.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/amba/bus.c | 21 ---------------------
include/linux/amba/bus.h | 23 -----------------------
2 files changed, 44 deletions(-)
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index cf43aaa76ea1..6463366fafc5 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -162,27 +162,6 @@ int amba_device_add(struct amba_device *dev)
return ret;
}
-struct amba_device *
-amba_aphb_device_add(struct device *parent, const char *name, int id,
- resource_size_t base, size_t size,
- void *pdata, unsigned int periphid)
-{
- struct amba_device *dev;
- int ret;
-
- dev = amba_device_alloc(name, id, base, size);
-
- dev->periphid = periphid;
- dev->dev.platform_data = pdata;
- dev->dev.parent = parent;
-
- ret = amba_device_add(dev);
- if (ret)
- return ERR_PTR(ret);
-
- return dev;
-}
-
/**
* amba_device_alloc - allocate an AMBA device
* @name: sysfs name of the AMBA device
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h
index cc24b38e8300..7cbc4e653eac 100644
--- a/include/linux/amba/bus.h
+++ b/include/linux/amba/bus.h
@@ -74,29 +74,6 @@ void amba_device_put(struct amba_device *);
int amba_device_add(struct amba_device *);
int amba_device_register(struct amba_device *, struct resource *);
-struct amba_device *
-amba_aphb_device_add(struct device *parent, const char *name, int id,
- resource_size_t base, size_t size,
- void *pdata, unsigned int periphid);
-
-static inline struct amba_device *
-amba_apb_device_add(struct device *parent, const char *name, int id,
- resource_size_t base, size_t size,
- void *pdata, unsigned int periphid)
-{
- return amba_aphb_device_add(parent, name, id, base, size, pdata,
- periphid);
-}
-
-static inline struct amba_device *
-amba_ahb_device_add(struct device *parent, const char *name, int id,
- resource_size_t base, size_t size,
- void *pdata, unsigned int periphid)
-{
- return amba_aphb_device_add(parent, name, id, base, size, pdata,
- periphid);
-}
-
static inline void __iomem *amba_get_mem_region(struct amba_device *dev)
{
return dev->base;
--
2.39.5
More information about the barebox
mailing list