History

soundwire: intel: report slave_ids for each link to SOF driver

The existing link_mask flag is no longer sufficient to detect the hardware and identify which topology file and a machine driver to load. By reporting the slave_ids exposed in ACPI tables, the parent SOF driver will be able to compare against a set of static configurations. This patch only adds the interface change, the functionality is added in future patches.

Bard Liao committed 6 years ago

Commit 92f622b1 parent 09f6a721 file · +11 −0Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/soundwire/sdw_intel.h+11−0
@@ -5,6 +5,7 @@ · 4 unmodified lines
5#define __SDW_INTEL_H5#define __SDW_INTEL_H
6 6
7#include <linux/irqreturn.h>7#include <linux/irqreturn.h>
8#include <linux/soundwire/sdw.h>
8 9
9/**10/**
10 * struct sdw_intel_stream_params_data: configuration passed during11 * struct sdw_intel_stream_params_data: configuration passed during
@@ -93,6 +94,11 @@ struct sdw_intel_link_res; · 82 unmodified lines
93 */94 */
94#define SDW_INTEL_CLK_STOP_BUS_RESET BIT(3)95#define SDW_INTEL_CLK_STOP_BUS_RESET BIT(3)
95 96
97struct sdw_intel_slave_id {
98 int link_id;
99 struct sdw_slave_id id;
100};
101
96/**102/**
97 * struct sdw_intel_ctx - context allocated by the controller103 * struct sdw_intel_ctx - context allocated by the controller
98 * driver probe104 * driver probe
@@ -101,9 +107,12 @@ struct sdw_intel_link_res; · 2 unmodified lines
101 * hardware capabilities after all power dependencies are settled.107 * hardware capabilities after all power dependencies are settled.
102 * @link_mask: bit-wise mask listing SoundWire links reported by the108 * @link_mask: bit-wise mask listing SoundWire links reported by the
103 * Controller109 * Controller
110 * @num_slaves: total number of devices exposed across all enabled links
104 * @handle: ACPI parent handle111 * @handle: ACPI parent handle
105 * @links: information for each link (controller-specific and kept112 * @links: information for each link (controller-specific and kept
106 * opaque here)113 * opaque here)
114 * @ids: array of slave_id, representing Slaves exposed across all enabled
115 * links
107 * @link_list: list to handle interrupts across all links116 * @link_list: list to handle interrupts across all links
108 * @shim_lock: mutex to handle concurrent rmw access to shared SHIM registers.117 * @shim_lock: mutex to handle concurrent rmw access to shared SHIM registers.
109 */118 */
@@ -111,8 +120,10 @@ struct sdw_intel_ctx { · 1 unmodified line
111 int count;120 int count;
112 void __iomem *mmio_base;121 void __iomem *mmio_base;
113 u32 link_mask;122 u32 link_mask;
123 int num_slaves;
114 acpi_handle handle;124 acpi_handle handle;
115 struct sdw_intel_link_res *links;125 struct sdw_intel_link_res *links;
126 struct sdw_intel_slave_id *ids;
116 struct list_head link_list;127 struct list_head link_list;
117 struct mutex shim_lock; /* lock for access to shared SHIM registers */128 struct mutex shim_lock; /* lock for access to shared SHIM registers */
118};129};