.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * linux/include/amba/bus.h |
---|
3 | 4 | * |
---|
.. | .. |
---|
6 | 7 | * region or that is derived from a PrimeCell. |
---|
7 | 8 | * |
---|
8 | 9 | * 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. |
---|
13 | 10 | */ |
---|
14 | 11 | #ifndef ASMARM_AMBA_H |
---|
15 | 12 | #define ASMARM_AMBA_H |
---|
.. | .. |
---|
20 | 17 | #include <linux/err.h> |
---|
21 | 18 | #include <linux/resource.h> |
---|
22 | 19 | #include <linux/regulator/consumer.h> |
---|
| 20 | +#include <linux/android_kabi.h> |
---|
23 | 21 | |
---|
24 | 22 | #define AMBA_NR_IRQS 9 |
---|
25 | 23 | #define AMBA_CID 0xb105f00d |
---|
26 | 24 | #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 |
---|
27 | 62 | |
---|
28 | 63 | struct clk; |
---|
29 | 64 | |
---|
.. | .. |
---|
31 | 66 | struct device dev; |
---|
32 | 67 | struct resource res; |
---|
33 | 68 | struct clk *pclk; |
---|
| 69 | + struct device_dma_parameters dma_parms; |
---|
34 | 70 | unsigned int periphid; |
---|
| 71 | + unsigned int cid; |
---|
| 72 | + struct amba_cs_uci_id uci; |
---|
35 | 73 | unsigned int irq[AMBA_NR_IRQS]; |
---|
36 | 74 | char *driver_override; |
---|
| 75 | + |
---|
| 76 | + ANDROID_KABI_RESERVE(1); |
---|
37 | 77 | }; |
---|
38 | 78 | |
---|
39 | 79 | struct amba_driver { |
---|
40 | 80 | struct device_driver drv; |
---|
41 | 81 | int (*probe)(struct amba_device *, const struct amba_id *); |
---|
42 | | - int (*remove)(struct amba_device *); |
---|
| 82 | + void (*remove)(struct amba_device *); |
---|
43 | 83 | void (*shutdown)(struct amba_device *); |
---|
44 | 84 | const struct amba_id *id_table; |
---|
| 85 | + |
---|
| 86 | + ANDROID_KABI_RESERVE(1); |
---|
45 | 87 | }; |
---|
46 | 88 | |
---|
47 | 89 | /* |
---|