hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/include/linux/amba/bus.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * linux/include/amba/bus.h
34 *
....@@ -6,10 +7,6 @@
67 * region or that is derived from a PrimeCell.
78 *
89 * Copyright (C) 2003 Deep Blue Solutions Ltd, All Rights Reserved.
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License version 2 as
12
- * published by the Free Software Foundation.
1310 */
1411 #ifndef ASMARM_AMBA_H
1512 #define ASMARM_AMBA_H
....@@ -20,10 +17,48 @@
2017 #include <linux/err.h>
2118 #include <linux/resource.h>
2219 #include <linux/regulator/consumer.h>
20
+#include <linux/android_kabi.h>
2321
2422 #define AMBA_NR_IRQS 9
2523 #define AMBA_CID 0xb105f00d
2624 #define CORESIGHT_CID 0xb105900d
25
+
26
+/*
27
+ * CoreSight Architecture specification updates the ID specification
28
+ * for components on the AMBA bus. (ARM IHI 0029E)
29
+ *
30
+ * Bits 15:12 of the CID are the device class.
31
+ *
32
+ * Class 0xF remains for PrimeCell and legacy components. (AMBA_CID above)
33
+ * Class 0x9 defines the component as CoreSight (CORESIGHT_CID above)
34
+ * Class 0x0, 0x1, 0xB, 0xE define components that do not have driver support
35
+ * at present.
36
+ * Class 0x2-0x8,0xA and 0xD-0xD are presently reserved.
37
+ *
38
+ * Remaining CID bits stay as 0xb105-00d
39
+ */
40
+
41
+/**
42
+ * Class 0x9 components use additional values to form a Unique Component
43
+ * Identifier (UCI), where peripheral ID values are identical for different
44
+ * components. Passed to the amba bus code from the component driver via
45
+ * the amba_id->data pointer.
46
+ * @devarch : coresight devarch register value
47
+ * @devarch_mask: mask bits used for matching. 0 indicates UCI not used.
48
+ * @devtype : coresight device type value
49
+ * @data : additional driver data. As we have usurped the original
50
+ * pointer some devices may still need additional data
51
+ */
52
+struct amba_cs_uci_id {
53
+ unsigned int devarch;
54
+ unsigned int devarch_mask;
55
+ unsigned int devtype;
56
+ void *data;
57
+};
58
+
59
+/* define offsets for registers used by UCI */
60
+#define UCI_REG_DEVTYPE_OFFSET 0xFCC
61
+#define UCI_REG_DEVARCH_OFFSET 0xFBC
2762
2863 struct clk;
2964
....@@ -31,17 +66,24 @@
3166 struct device dev;
3267 struct resource res;
3368 struct clk *pclk;
69
+ struct device_dma_parameters dma_parms;
3470 unsigned int periphid;
71
+ unsigned int cid;
72
+ struct amba_cs_uci_id uci;
3573 unsigned int irq[AMBA_NR_IRQS];
3674 char *driver_override;
75
+
76
+ ANDROID_KABI_RESERVE(1);
3777 };
3878
3979 struct amba_driver {
4080 struct device_driver drv;
4181 int (*probe)(struct amba_device *, const struct amba_id *);
42
- int (*remove)(struct amba_device *);
82
+ void (*remove)(struct amba_device *);
4383 void (*shutdown)(struct amba_device *);
4484 const struct amba_id *id_table;
85
+
86
+ ANDROID_KABI_RESERVE(1);
4587 };
4688
4789 /*