From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 2/4] amba: drop unused hepers for creating AMBA devices outside OF
Date: Tue, 18 Mar 2025 09:25:05 +0100 [thread overview]
Message-ID: <20250318082507.419785-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20250318082507.419785-1-a.fatoum@pengutronix.de>
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@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
next prev parent reply other threads:[~2025-03-18 8:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 8:25 [PATCH 1/4] scripts/make_fit: factor dtb file name into configuration name Ahmad Fatoum
2025-03-18 8:25 ` Ahmad Fatoum [this message]
2025-03-18 10:53 ` [PATCH 2/4] amba: drop unused hepers for creating AMBA devices outside OF Uwe Kleine-König
2025-03-18 8:25 ` [PATCH 3/4] amba: support masking data abort during identification Ahmad Fatoum
2025-03-18 11:04 ` Sascha Hauer
2025-03-18 11:24 ` Ahmad Fatoum
2025-03-18 8:25 ` [PATCH 4/4] ARM: qemu: mask data aborts during AMBA identification Ahmad Fatoum
2025-03-18 11:07 ` Sascha Hauer
2025-03-18 11:03 ` [PATCH 1/4] scripts/make_fit: factor dtb file name into configuration name Uwe Kleine-König
2025-03-18 11:27 ` Ahmad Fatoum
2025-03-18 11:33 ` Uwe Kleine-König
2025-03-18 11:07 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250318082507.419785-2-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox