aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/amba/bus.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-04-03 06:58:42 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-04-19 14:31:33 -0400
commit6026aa907b16677d32593c5b7dea134380f51f7f (patch)
tree89506b4f6d409e498886410bbf4f8518fb6a1d63 /include/linux/amba/bus.h
parente816b57a337ea3b755de72bec38c10c864f23015 (diff)
ARM: 7369/1: amba: add functions to add devices dynamically
Add two functions to add APB and AHB devices to the amba (PrimeCell) bus dynamically. This is modeled after the static definition macros recently introduced into <linux/amba/bus.h> and can help us in factoring out a bunch of code across the kernel. Since a lot of call sites seem to be using a returned struct amba device* pointer, let's use that. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/linux/amba/bus.h')
-rw-r--r--include/linux/amba/bus.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h
index 8d54f79457ba..d36417158d8f 100644
--- a/include/linux/amba/bus.h
+++ b/include/linux/amba/bus.h
@@ -63,6 +63,14 @@ struct amba_device *amba_device_alloc(const char *, resource_size_t, size_t);
63void amba_device_put(struct amba_device *); 63void amba_device_put(struct amba_device *);
64int amba_device_add(struct amba_device *, struct resource *); 64int amba_device_add(struct amba_device *, struct resource *);
65int amba_device_register(struct amba_device *, struct resource *); 65int amba_device_register(struct amba_device *, struct resource *);
66struct amba_device *amba_apb_device_add(struct device *parent, const char *name,
67 resource_size_t base, size_t size,
68 int irq1, int irq2, void *pdata,
69 unsigned int periphid);
70struct amba_device *amba_ahb_device_add(struct device *parent, const char *name,
71 resource_size_t base, size_t size,
72 int irq1, int irq2, void *pdata,
73 unsigned int periphid);
66void amba_device_unregister(struct amba_device *); 74void amba_device_unregister(struct amba_device *);
67struct amba_device *amba_find_device(const char *, struct device *, unsigned int, unsigned int); 75struct amba_device *amba_find_device(const char *, struct device *, unsigned int, unsigned int);
68int amba_request_regions(struct amba_device *, const char *); 76int amba_request_regions(struct amba_device *, const char *);