blob: 694117370ac30db3da0f42508b330c3e06b7f1d7 [file] [log] [blame]
Pierre-Louis Bossart23859462019-05-01 10:57:25 -05001/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2/* Copyright(c) 2015-17 Intel Corporation. */
Vinod Koul71bb8a12017-12-14 11:19:43 +05303
4#ifndef __SDW_INTEL_LOCAL_H
5#define __SDW_INTEL_LOCAL_H
6
7/**
Pierre-Louis Bossartf98f6902019-12-11 19:45:01 -06008 * 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 Koul71bb8a12017-12-14 11:19:43 +053012 * @registers: Link IO registers base
13 * @shim: Audio shim pointer
14 * @alh: ALH (Audio Link Hub) pointer
15 * @irq: Interrupt line
Vinod Koulc46302e2018-04-26 18:39:05 +053016 * @ops: Shim callback ops
Rander Wang4b206d32019-12-11 19:45:02 -060017 * @dev: device implementing hw_params and free callbacks
Vinod Koul71bb8a12017-12-14 11:19:43 +053018 */
19struct sdw_intel_link_res {
Pierre-Louis Bossartf98f6902019-12-11 19:45:01 -060020 struct platform_device *pdev;
21 void __iomem *mmio_base; /* not strictly needed, useful for debug */
Vinod Koul71bb8a12017-12-14 11:19:43 +053022 void __iomem *registers;
23 void __iomem *shim;
24 void __iomem *alh;
25 int irq;
Vinod Koulc46302e2018-04-26 18:39:05 +053026 const struct sdw_intel_ops *ops;
Rander Wang4b206d32019-12-11 19:45:02 -060027 struct device *dev;
Vinod Koul71bb8a12017-12-14 11:19:43 +053028};
29
Pierre-Louis Bossartb6109dd2020-06-01 02:20:57 +080030struct 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 Bossart6d2c6662020-06-01 02:21:02 +080041int intel_master_startup(struct platform_device *pdev);
42
Vinod Koul71bb8a12017-12-14 11:19:43 +053043#endif /* __SDW_INTEL_LOCAL_H */