Commit | Line | Data |
---|---|---|
23859465 PLB |
1 | /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ |
2 | /* Copyright(c) 2015-17 Intel Corporation. */ | |
71bb8a1b VK |
3 | |
4 | #ifndef __SDW_INTEL_LOCAL_H | |
5 | #define __SDW_INTEL_LOCAL_H | |
6 | ||
7 | /** | |
f98f690f PLB |
8 | * struct sdw_intel_link_res - Soundwire Intel link resource structure, |
9 | * typically populated by the controller driver. | |
10 | * @pdev: platform_device | |
11 | * @mmio_base: mmio base of SoundWire registers | |
71bb8a1b VK |
12 | * @registers: Link IO registers base |
13 | * @shim: Audio shim pointer | |
14 | * @alh: ALH (Audio Link Hub) pointer | |
15 | * @irq: Interrupt line | |
c46302ec | 16 | * @ops: Shim callback ops |
4b206d34 | 17 | * @dev: device implementing hw_params and free callbacks |
4a17c441 PLB |
18 | * @shim_lock: mutex to handle access to shared SHIM registers |
19 | * @shim_mask: global pointer to check SHIM register initialization | |
71bb8a1b VK |
20 | */ |
21 | struct sdw_intel_link_res { | |
f98f690f PLB |
22 | struct platform_device *pdev; |
23 | void __iomem *mmio_base; /* not strictly needed, useful for debug */ | |
71bb8a1b VK |
24 | void __iomem *registers; |
25 | void __iomem *shim; | |
26 | void __iomem *alh; | |
27 | int irq; | |
c46302ec | 28 | const struct sdw_intel_ops *ops; |
4b206d34 | 29 | struct device *dev; |
4a17c441 PLB |
30 | struct mutex *shim_lock; /* protect shared registers */ |
31 | u32 *shim_mask; | |
71bb8a1b VK |
32 | }; |
33 | ||
b6109dd6 PLB |
34 | struct sdw_intel { |
35 | struct sdw_cdns cdns; | |
36 | int instance; | |
37 | struct sdw_intel_link_res *link_res; | |
38 | #ifdef CONFIG_DEBUG_FS | |
39 | struct dentry *debugfs; | |
40 | #endif | |
41 | }; | |
42 | ||
43 | #define SDW_INTEL_QUIRK_MASK_BUS_DISABLE BIT(1) | |
44 | ||
6d2c6669 PLB |
45 | int intel_master_startup(struct platform_device *pdev); |
46 | ||
71bb8a1b | 47 | #endif /* __SDW_INTEL_LOCAL_H */ |