123859465SPierre-Louis Bossart /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ 223859465SPierre-Louis Bossart /* Copyright(c) 2015-17 Intel Corporation. */ 371bb8a1bSVinod Koul 471bb8a1bSVinod Koul #ifndef __SDW_INTEL_LOCAL_H 571bb8a1bSVinod Koul #define __SDW_INTEL_LOCAL_H 671bb8a1bSVinod Koul 771bb8a1bSVinod Koul /** 8f98f690fSPierre-Louis Bossart * struct sdw_intel_link_res - Soundwire Intel link resource structure, 9f98f690fSPierre-Louis Bossart * typically populated by the controller driver. 10f98f690fSPierre-Louis Bossart * @pdev: platform_device 11f98f690fSPierre-Louis Bossart * @mmio_base: mmio base of SoundWire registers 1271bb8a1bSVinod Koul * @registers: Link IO registers base 1371bb8a1bSVinod Koul * @shim: Audio shim pointer 1471bb8a1bSVinod Koul * @alh: ALH (Audio Link Hub) pointer 1571bb8a1bSVinod Koul * @irq: Interrupt line 16c46302ecSVinod Koul * @ops: Shim callback ops 174b206d34SRander Wang * @dev: device implementing hw_params and free callbacks 184a17c441SPierre-Louis Bossart * @shim_lock: mutex to handle access to shared SHIM registers 194a17c441SPierre-Louis Bossart * @shim_mask: global pointer to check SHIM register initialization 2071bb8a1bSVinod Koul */ 2171bb8a1bSVinod Koul struct sdw_intel_link_res { 22f98f690fSPierre-Louis Bossart struct platform_device *pdev; 23f98f690fSPierre-Louis Bossart void __iomem *mmio_base; /* not strictly needed, useful for debug */ 2471bb8a1bSVinod Koul void __iomem *registers; 2571bb8a1bSVinod Koul void __iomem *shim; 2671bb8a1bSVinod Koul void __iomem *alh; 2771bb8a1bSVinod Koul int irq; 28c46302ecSVinod Koul const struct sdw_intel_ops *ops; 294b206d34SRander Wang struct device *dev; 304a17c441SPierre-Louis Bossart struct mutex *shim_lock; /* protect shared registers */ 314a17c441SPierre-Louis Bossart u32 *shim_mask; 3271bb8a1bSVinod Koul }; 3371bb8a1bSVinod Koul 34b6109dd6SPierre-Louis Bossart struct sdw_intel { 35b6109dd6SPierre-Louis Bossart struct sdw_cdns cdns; 36b6109dd6SPierre-Louis Bossart int instance; 37b6109dd6SPierre-Louis Bossart struct sdw_intel_link_res *link_res; 38b6109dd6SPierre-Louis Bossart #ifdef CONFIG_DEBUG_FS 39b6109dd6SPierre-Louis Bossart struct dentry *debugfs; 40b6109dd6SPierre-Louis Bossart #endif 41b6109dd6SPierre-Louis Bossart }; 42b6109dd6SPierre-Louis Bossart 43b6109dd6SPierre-Louis Bossart #define SDW_INTEL_QUIRK_MASK_BUS_DISABLE BIT(1) 44b6109dd6SPierre-Louis Bossart 456d2c6669SPierre-Louis Bossart int intel_master_startup(struct platform_device *pdev); 466d2c6669SPierre-Louis Bossart 4771bb8a1bSVinod Koul #endif /* __SDW_INTEL_LOCAL_H */ 48