Pierre-Louis Bossart | 2385946 | 2019-05-01 10:57:25 -0500 | [diff] [blame] | 1 | /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ |
| 2 | /* Copyright(c) 2015-17 Intel Corporation. */ |
Vinod Koul | 71bb8a1 | 2017-12-14 11:19:43 +0530 | [diff] [blame] | 3 | |
| 4 | #ifndef __SDW_INTEL_LOCAL_H |
| 5 | #define __SDW_INTEL_LOCAL_H |
| 6 | |
| 7 | /** |
Pierre-Louis Bossart | f98f690 | 2019-12-11 19:45:01 -0600 | [diff] [blame] | 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 |
Vinod Koul | 71bb8a1 | 2017-12-14 11:19:43 +0530 | [diff] [blame] | 12 | * @registers: Link IO registers base |
| 13 | * @shim: Audio shim pointer |
| 14 | * @alh: ALH (Audio Link Hub) pointer |
| 15 | * @irq: Interrupt line |
Vinod Koul | c46302e | 2018-04-26 18:39:05 +0530 | [diff] [blame] | 16 | * @ops: Shim callback ops |
Rander Wang | 4b206d3 | 2019-12-11 19:45:02 -0600 | [diff] [blame] | 17 | * @dev: device implementing hw_params and free callbacks |
Vinod Koul | 71bb8a1 | 2017-12-14 11:19:43 +0530 | [diff] [blame] | 18 | */ |
| 19 | struct sdw_intel_link_res { |
Pierre-Louis Bossart | f98f690 | 2019-12-11 19:45:01 -0600 | [diff] [blame] | 20 | struct platform_device *pdev; |
| 21 | void __iomem *mmio_base; /* not strictly needed, useful for debug */ |
Vinod Koul | 71bb8a1 | 2017-12-14 11:19:43 +0530 | [diff] [blame] | 22 | void __iomem *registers; |
| 23 | void __iomem *shim; |
| 24 | void __iomem *alh; |
| 25 | int irq; |
Vinod Koul | c46302e | 2018-04-26 18:39:05 +0530 | [diff] [blame] | 26 | const struct sdw_intel_ops *ops; |
Rander Wang | 4b206d3 | 2019-12-11 19:45:02 -0600 | [diff] [blame] | 27 | struct device *dev; |
Vinod Koul | 71bb8a1 | 2017-12-14 11:19:43 +0530 | [diff] [blame] | 28 | }; |
| 29 | |
Pierre-Louis Bossart | b6109dd | 2020-06-01 02:20:57 +0800 | [diff] [blame] | 30 | struct sdw_intel { |
| 31 | struct sdw_cdns cdns; |
| 32 | int instance; |
| 33 | struct sdw_intel_link_res *link_res; |
| 34 | #ifdef CONFIG_DEBUG_FS |
| 35 | struct dentry *debugfs; |
| 36 | #endif |
| 37 | }; |
| 38 | |
| 39 | #define SDW_INTEL_QUIRK_MASK_BUS_DISABLE BIT(1) |
| 40 | |
Pierre-Louis Bossart | 6d2c666 | 2020-06-01 02:21:02 +0800 | [diff] [blame^] | 41 | int intel_master_startup(struct platform_device *pdev); |
| 42 | |
Vinod Koul | 71bb8a1 | 2017-12-14 11:19:43 +0530 | [diff] [blame] | 43 | #endif /* __SDW_INTEL_LOCAL_H */ |