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