summaryrefslogtreecommitdiff
path: root/include/asm-arm
diff options
context:
space:
mode:
authorRussell King <rmk@flint.arm.linux.org.uk>2003-06-19 01:24:31 +0100
committerRussell King <rmk@flint.arm.linux.org.uk>2003-06-19 01:24:31 +0100
commit489e068e39716620b0ffb24f2cce9160609883b1 (patch)
tree32ceae97e9f83032f8f1c30dab494247405885b9 /include/asm-arm
parentf0e8fffb9af9218244a80235ef63b6f26fbcec26 (diff)
[ARM] Add AMBA bus type for ARM PrimeCells on Integrator.
Diffstat (limited to 'include/asm-arm')
-rw-r--r--include/asm-arm/hardware/amba.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/include/asm-arm/hardware/amba.h b/include/asm-arm/hardware/amba.h
new file mode 100644
index 000000000000..b4c839de5471
--- /dev/null
+++ b/include/asm-arm/hardware/amba.h
@@ -0,0 +1,44 @@
+/*
+ * linux/include/asm-arm/hardware/amba.h
+ *
+ * Copyright (C) 2003 Deep Blue Solutions Ltd, All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef ASMARM_AMBA_H
+#define ASMARM_AMBA_H
+
+struct amba_device {
+ struct device dev;
+ struct resource res;
+ unsigned int irq;
+ unsigned int periphid;
+};
+
+struct amba_id {
+ unsigned int id;
+ unsigned int mask;
+ void *data;
+};
+
+struct amba_driver {
+ struct device_driver drv;
+ int (*probe)(struct amba_device *, void *);
+ int (*remove)(struct amba_device *);
+ void (*shutdown)(struct amba_device *);
+ int (*suspend)(struct amba_device *, u32, u32);
+ int (*resume)(struct amba_device *, u32);
+ struct amba_id *id_table;
+};
+
+#define amba_get_drvdata(d) dev_get_drvdata(&d->dev)
+#define amba_set_drvdata(d,p) dev_set_drvdata(&d->dev, p)
+
+int amba_driver_register(struct amba_driver *);
+void amba_driver_unregister(struct amba_driver *);
+int amba_device_register(struct amba_device *, struct resource *);
+void amba_device_unregister(struct amba_device *);
+
+#endif