History

Merge tag 'char-misc-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver updates from Greg KH: "Here is the large set of char and misc and other driver subsystem patches for 5.9-rc1. Lots of new driver submissions in here, and cleanups and features for existing drivers. Highlights are: - habanalabs driver updates - coresight driver updates - nvmem driver updates - huge number of "W=1" build warning cleanups from Lee Jones - dyndbg updates - virtbox driver fixes and updates - soundwire driver updates - mei driver updates - phy driver updates - fpga driver updates - lots of smaller individual misc/char driver cleanups and fixes Full details are in the shortlog. All of these have been in linux-next with no reported issues" * tag 'char-misc-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (322 commits) habanalabs: remove unused but set variable 'ctx_asid' nvmem: qcom-spmi-sdam: Enable multiple devices dt-bindings: nvmem: SID: add binding for A100's SID controller nvmem: update Kconfig description nvmem: qfprom: Add fuse blowing support dt-bindings: nvmem: Add properties needed for blowing fuses dt-bindings: nvmem: qfprom: Convert to yaml nvmem: qfprom: use NVMEM_DEVID_AUTO for multiple instances nvmem: core: add support to auto devid nvmem: core: Add nvmem_cell_read_u8() nvmem: core: Grammar fixes for help text nvmem: sc27xx: add sc2730 efuse support nvmem: Enforce nvmem stride in the sysfs interface MAINTAINERS: Add git tree for NVMEM FRAMEWORK nvmem: sprd: Fix return value of sprd_efuse_probe() drivers: android: Fix the SPDX comment style drivers: android: Fix a variable declaration coding style issue drivers: android: Remove braces for a single statement if-else block drivers: android: Remove the use of else after return drivers: android: Fix a variable declaration coding style issue ...

Linus Torvalds committed 6 years ago

Commit 1785d112 parents 060a72a 22362aa291 files · +10369 −4128Browse files

Showing the changes to include/linux (16 of 291 files). Show all

Unified · Split

16 files
  1. include/linux/coresight.h +5 −1
  2. include/linux/dynamic_debug.h +2 −2
  3. include/linux/firmware/intel/stratix10-smc.h +43 −0
  4. include/linux/firmware/intel/stratix10-svc-client.h +12 −5
  5. include/linux/fsl/mc.h +31 −1
  6. include/linux/interconnect-provider.h +12 −4
  7. include/linux/mic_bus.h +1 −1
  8. include/linux/mod_devicetable.h +2 −0
  9. include/linux/nvmem-consumer.h +1 −0
  10. include/linux/nvmem-provider.h +3 −0
  11. include/linux/rtsx_pci.h +11 −22
  12. include/linux/soundwire/sdw.h +19 −14
  13. include/linux/soundwire/sdw_intel.h +2 −0
  14. include/linux/soundwire/sdw_registers.h +116 −1
  15. include/linux/vbox_utils.h +1 −0
  16. include/linux/vmw_vmci_defs.h +1 −1
include/linux/coresight.h+5−1
@@ -48,6 +48,7 @@ enum coresight_dev_subtype_sink { · 47 unmodified lines
4848 CORESIGHT_DEV_SUBTYPE_SINK_NONE,
4949 CORESIGHT_DEV_SUBTYPE_SINK_PORT,
5050 CORESIGHT_DEV_SUBTYPE_SINK_BUFFER,
51+ CORESIGHT_DEV_SUBTYPE_SINK_SYSMEM,
5152 };
5253
5354 enum coresight_dev_subtype_link {
@@ -179,8 +180,10 @@ struct coresight_sysfs_link { · 125 unmodified lines
179180 * @enable: 'true' if component is currently part of an active path.
180181 * @activated: 'true' only if a _sink_ has been activated. A sink can be
181182 * activated but not yet enabled. Enabling for a _sink_
182− * appens when a source has been selected for that it.
183+ * happens when a source has been selected and a path is enabled
184+ * from source to that sink.
183185 * @ea: Device attribute for sink representation under PMU directory.
186+ * @def_sink: cached reference to default sink found for this device.
184187 * @ect_dev: Associated cross trigger device. Not part of the trace data
185188 * path or connections.
186189 * @nr_links: number of sysfs links created to other components from this
@@ -199,6 +202,7 @@ struct coresight_device { · 12 unmodified lines
199202 /* sink specific fields */
200203 bool activated; /* true only if a sink is part of a path */
201204 struct dev_ext_attribute *ea;
205+ struct coresight_device *def_sink;
202206 /* cross trigger handling */
203207 struct coresight_device *ect_dev;
204208 /* sysfs links between components */
include/linux/dynamic_debug.h+2−2
@@ -80,7 +80,7 @@ void __dynamic_ibdev_dbg(struct _ddebug *descriptor, · 79 unmodified lines
8080
8181 #define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \
8282 static struct _ddebug __aligned(8) \
83− __attribute__((section("__verbose"))) name = { \
83+ __section(__dyndbg) name = { \
8484 .modname = KBUILD_MODNAME, \
8585 .function = __func__, \
8686 .filename = __FILE__, \
@@ -133,7 +133,7 @@ void __dynamic_ibdev_dbg(struct _ddebug *descriptor, · 46 unmodified lines
133133
134134 /*
135135 * "Factory macro" for generating a call to func, guarded by a
136− * DYNAMIC_DEBUG_BRANCH. The dynamic debug decriptor will be
136+ * DYNAMIC_DEBUG_BRANCH. The dynamic debug descriptor will be
137137 * initialized using the fmt argument. The function will be called with
138138 * the address of the descriptor as first argument, followed by all
139139 * the varargs. Note that fmt is repeated in invocations of this
include/linux/firmware/intel/stratix10-smc.h+43−0
@@ -361,3 +361,46 @@ INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_FPGA_CONFIG_COMPLETED_WRITE) · 360 unmodified lines
361361 #define INTEL_SIP_SMC_FUNCID_RSU_RETRY_COUNTER 15
362362 #define INTEL_SIP_SMC_RSU_RETRY_COUNTER \
363363 INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_RETRY_COUNTER)
364+
365+/**
366+ * Request INTEL_SIP_SMC_RSU_DCMF_VERSION
367+ *
368+ * Sync call used by service driver at EL1 to query DCMF (Decision
369+ * Configuration Management Firmware) version from FW
370+ *
371+ * Call register usage:
372+ * a0 INTEL_SIP_SMC_RSU_DCMF_VERSION
373+ * a1-7 not used
374+ *
375+ * Return status
376+ * a0 INTEL_SIP_SMC_STATUS_OK
377+ * a1 dcmf1 | dcmf0
378+ * a2 dcmf3 | dcmf2
379+ *
380+ * Or
381+ *
382+ * a0 INTEL_SIP_SMC_RSU_ERROR
383+ */
384+#define INTEL_SIP_SMC_FUNCID_RSU_DCMF_VERSION 16
385+#define INTEL_SIP_SMC_RSU_DCMF_VERSION \
386+ INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_DCMF_VERSION)
387+
388+/**
389+ * Request INTEL_SIP_SMC_RSU_MAX_RETRY
390+ *
391+ * Sync call used by service driver at EL1 to query max retry value from FW
392+ *
393+ * Call register usage:
394+ * a0 INTEL_SIP_SMC_RSU_MAX_RETRY
395+ * a1-7 not used
396+ *
397+ * Return status
398+ * a0 INTEL_SIP_SMC_STATUS_OK
399+ * a1 max retry value
400+ *
401+ * Or
402+ * a0 INTEL_SIP_SMC_RSU_ERROR
403+ */
404+#define INTEL_SIP_SMC_FUNCID_RSU_MAX_RETRY 18
405+#define INTEL_SIP_SMC_RSU_MAX_RETRY \
406+ INTEL_SIP_SMC_FAST_CALL_VAL(INTEL_SIP_SMC_FUNCID_RSU_MAX_RETRY)
include/linux/firmware/intel/stratix10-svc-client.h+12−5
@@ -54,18 +54,17 @@ · 53 unmodified lines
5454 * Flag bit for COMMAND_RECONFIG
5555 *
5656 * COMMAND_RECONFIG_FLAG_PARTIAL:
57− * Set to FPGA configuration type (full or partial), the default
58− * is full reconfig.
57+ * Set to FPGA configuration type (full or partial).
5958 */
60−#define COMMAND_RECONFIG_FLAG_PARTIAL 0
59+#define COMMAND_RECONFIG_FLAG_PARTIAL 1
6160
6261 /**
6362 * Timeout settings for service clients:
6463 * timeout value used in Stratix10 FPGA manager driver.
6564 * timeout value used in RSU driver
6665 */
67−#define SVC_RECONFIG_REQUEST_TIMEOUT_MS 100
68−#define SVC_RECONFIG_BUFFER_TIMEOUT_MS 240
66+#define SVC_RECONFIG_REQUEST_TIMEOUT_MS 300
67+#define SVC_RECONFIG_BUFFER_TIMEOUT_MS 720
6968 #define SVC_RSU_REQUEST_TIMEOUT_MS 300
7069
7170 struct stratix10_svc_chan;
@@ -99,6 +98,12 @@ struct stratix10_svc_chan; · 27 unmodified lines
9998 *
10099 * @COMMAND_RSU_RETRY: query firmware for the current image's retry counter,
101100 * return status is SVC_STATUS_OK or SVC_STATUS_ERROR
101+ *
102+ * @COMMAND_RSU_MAX_RETRY: query firmware for the max retry value,
103+ * return status is SVC_STATUS_OK or SVC_STATUS_ERROR
104+ *
105+ * @COMMAND_RSU_DCMF_VERSION: query firmware for the DCMF version, return status
106+ * is SVC_STATUS_OK or SVC_STATUS_ERROR
102107 */
103108 enum stratix10_svc_command_code {
104109 COMMAND_NOOP = 0,
@@ -110,6 +115,8 @@ enum stratix10_svc_command_code { · 5 unmodified lines
110115 COMMAND_RSU_UPDATE,
111116 COMMAND_RSU_NOTIFY,
112117 COMMAND_RSU_RETRY,
118+ COMMAND_RSU_MAX_RETRY,
119+ COMMAND_RSU_DCMF_VERSION,
113120 };
114121
115122 /**
include/linux/fsl/mc.h+31−1
@@ -339,7 +339,7 @@ struct fsl_mc_io { · 338 unmodified lines
339339 * This field is only meaningful if the
340340 * FSL_MC_IO_ATOMIC_CONTEXT_PORTAL flag is set
341341 */
342− spinlock_t spinlock; /* serializes mc_send_command() */
342+ raw_spinlock_t spinlock; /* serializes mc_send_command() */
343343 };
344344 };
345345
@@ -433,6 +433,11 @@ extern struct device_type fsl_mc_bus_dpmcp_type; · 87 unmodified lines
433433 extern struct device_type fsl_mc_bus_dpmac_type;
434434 extern struct device_type fsl_mc_bus_dprtc_type;
435435 extern struct device_type fsl_mc_bus_dpseci_type;
436+extern struct device_type fsl_mc_bus_dpdmux_type;
437+extern struct device_type fsl_mc_bus_dpdcei_type;
438+extern struct device_type fsl_mc_bus_dpaiop_type;
439+extern struct device_type fsl_mc_bus_dpci_type;
440+extern struct device_type fsl_mc_bus_dpdmai_type;
436441
437442 static inline bool is_fsl_mc_bus_dprc(const struct fsl_mc_device *mc_dev)
438443 {
@@ -454,6 +459,11 @@ static inline bool is_fsl_mc_bus_dpsw(const struct fsl_mc_device *mc_dev) · 15 unmodified lines
454459 return mc_dev->dev.type == &fsl_mc_bus_dpsw_type;
455460 }
456461
462+static inline bool is_fsl_mc_bus_dpdmux(const struct fsl_mc_device *mc_dev)
463+{
464+ return mc_dev->dev.type == &fsl_mc_bus_dpdmux_type;
465+}
466+
457467 static inline bool is_fsl_mc_bus_dpbp(const struct fsl_mc_device *mc_dev)
458468 {
459469 return mc_dev->dev.type == &fsl_mc_bus_dpbp_type;
@@ -484,6 +494,26 @@ static inline bool is_fsl_mc_bus_dpseci(const struct fsl_mc_device *mc_dev) · 24 unmodified lines
484494 return mc_dev->dev.type == &fsl_mc_bus_dpseci_type;
485495 }
486496
497+static inline bool is_fsl_mc_bus_dpdcei(const struct fsl_mc_device *mc_dev)
498+{
499+ return mc_dev->dev.type == &fsl_mc_bus_dpdcei_type;
500+}
501+
502+static inline bool is_fsl_mc_bus_dpaiop(const struct fsl_mc_device *mc_dev)
503+{
504+ return mc_dev->dev.type == &fsl_mc_bus_dpaiop_type;
505+}
506+
507+static inline bool is_fsl_mc_bus_dpci(const struct fsl_mc_device *mc_dev)
508+{
509+ return mc_dev->dev.type == &fsl_mc_bus_dpci_type;
510+}
511+
512+static inline bool is_fsl_mc_bus_dpdmai(const struct fsl_mc_device *mc_dev)
513+{
514+ return mc_dev->dev.type == &fsl_mc_bus_dpdmai_type;
515+}
516+
487517 /*
488518 * Data Path Buffer Pool (DPBP) API
489519 * Contains initialization APIs and runtime control APIs for DPBP
include/linux/interconnect-provider.h+12−4
@@ -41,6 +41,7 @@ struct icc_node *of_icc_xlate_onecell(struct of_phandle_args *spec, · 40 unmodified lines
4141 * @xlate: provider-specific callback for mapping nodes from phandle arguments
4242 * @dev: the device this interconnect provider belongs to
4343 * @users: count of active users
44+ * @inter_set: whether inter-provider pairs will be configured with @set
4445 * @data: pointer to private data
4546 */
4647 struct icc_provider {
@@ -53,6 +54,7 @@ struct icc_provider { · 6 unmodified lines
5354 struct icc_node* (*xlate)(struct of_phandle_args *spec, void *data);
5455 struct device *dev;
5556 int users;
57+ bool inter_set;
5658 void *data;
5759 };
5860
@@ -103,6 +105,7 @@ void icc_node_del(struct icc_node *node); · 44 unmodified lines
103105 int icc_nodes_remove(struct icc_provider *provider);
104106 int icc_provider_add(struct icc_provider *provider);
105107 int icc_provider_del(struct icc_provider *provider);
108+struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec);
106109
107110 #else
108111
@@ -117,7 +120,7 @@ static inline struct icc_node *icc_node_create(int id) · 8 unmodified lines
117120 return ERR_PTR(-ENOTSUPP);
118121 }
119122
120−void icc_node_destroy(int id)
123+static inline void icc_node_destroy(int id)
121124 {
122125 }
123126
@@ -126,16 +129,16 @@ static inline int icc_link_create(struct icc_node *node, const int dst_id) · 2 unmodified lines
126129 return -ENOTSUPP;
127130 }
128131
129−int icc_link_destroy(struct icc_node *src, struct icc_node *dst)
132+static inline int icc_link_destroy(struct icc_node *src, struct icc_node *dst)
130133 {
131134 return -ENOTSUPP;
132135 }
133136
134−void icc_node_add(struct icc_node *node, struct icc_provider *provider)
137+static inline void icc_node_add(struct icc_node *node, struct icc_provider *provider)
135138 {
136139 }
137140
138−void icc_node_del(struct icc_node *node)
141+static inline void icc_node_del(struct icc_node *node)
139142 {
140143 }
141144
@@ -154,6 +157,11 @@ static inline int icc_provider_del(struct icc_provider *provider) · 12 unmodified lines
154157 return -ENOTSUPP;
155158 }
156159
160+static inline struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
161+{
162+ return ERR_PTR(-ENOTSUPP);
163+}
164+
157165 #endif /* CONFIG_INTERCONNECT */
158166
159167 #endif /* __LINUX_INTERCONNECT_PROVIDER_H */
include/linux/mic_bus.h+1−1
@@ -6,7 +6,7 @@ · 5 unmodified lines
66 *
77 * Intel MIC Bus driver.
88 *
9− * This implementation is very similar to the the virtio bus driver
9+ * This implementation is very similar to the virtio bus driver
1010 * implementation @ include/linux/virtio.h.
1111 */
1212 #ifndef _MIC_BUS_H_
include/linux/mod_devicetable.h+2−0
@@ -251,6 +251,8 @@ struct hda_device_id { · 250 unmodified lines
251251 struct sdw_device_id {
252252 __u16 mfg_id;
253253 __u16 part_id;
254+ __u8 sdw_version;
255+ __u8 class_id;
254256 kernel_ulong_t driver_data;
255257 };
256258
include/linux/nvmem-consumer.h+1−0
@@ -61,6 +61,7 @@ void nvmem_cell_put(struct nvmem_cell *cell); · 60 unmodified lines
6161 void devm_nvmem_cell_put(struct device *dev, struct nvmem_cell *cell);
6262 void *nvmem_cell_read(struct nvmem_cell *cell, size_t *len);
6363 int nvmem_cell_write(struct nvmem_cell *cell, void *buf, size_t len);
64+int nvmem_cell_read_u8(struct device *dev, const char *cell_id, u8 *val);
6465 int nvmem_cell_read_u16(struct device *dev, const char *cell_id, u16 *val);
6566 int nvmem_cell_read_u32(struct device *dev, const char *cell_id, u32 *val);
6667 int nvmem_cell_read_u64(struct device *dev, const char *cell_id, u64 *val);
include/linux/nvmem-provider.h+3−0
@@ -27,6 +27,9 @@ enum nvmem_type { · 26 unmodified lines
2727 NVMEM_TYPE_BATTERY_BACKED,
2828 };
2929
30+#define NVMEM_DEVID_NONE (-1)
31+#define NVMEM_DEVID_AUTO (-2)
32+
3033 /**
3134 * struct nvmem_config - NVMEM device configuration
3235 *
include/linux/rtsx_pci.h+11−22
@@ -99,18 +99,6 @@ · 98 unmodified lines
9999 #define rtsx_pci_readb(pcr, reg) \
100100 ioread8((pcr)->remap_addr + reg)
101101
102−#define rtsx_pci_read_config_byte(pcr, where, val) \
103− pci_read_config_byte((pcr)->pci, where, val)
104−
105−#define rtsx_pci_write_config_byte(pcr, where, val) \
106− pci_write_config_byte((pcr)->pci, where, val)
107−
108−#define rtsx_pci_read_config_dword(pcr, where, val) \
109− pci_read_config_dword((pcr)->pci, where, val)
110−
111−#define rtsx_pci_write_config_dword(pcr, where, val) \
112− pci_write_config_dword((pcr)->pci, where, val)
113−
114102 #define STATE_TRANS_NONE 0
115103 #define STATE_TRANS_CMD 1
116104 #define STATE_TRANS_BUF 2
@@ -305,6 +293,8 @@ · 188 unmodified lines
305293 #define SD30_CLK_STOP_CFG0 0x01
306294 #define REG_PRE_RW_MODE 0xFD70
307295 #define EN_INFINITE_MODE 0x01
296+#define REG_CRC_DUMMY_0 0xFD71
297+#define CFG_SD_POW_AUTO_PD (1<<0)
308298
309299 #define SRCTL 0xFC13
310300
@@ -599,6 +589,7 @@ · 288 unmodified lines
599589
600590 #define ASPM_FORCE_CTL 0xFE57
601591 #define FORCE_ASPM_CTL0 0x10
592+#define FORCE_ASPM_CTL1 0x20
602593 #define FORCE_ASPM_VAL_MASK 0x03
603594 #define FORCE_ASPM_L1_EN 0x02
604595 #define FORCE_ASPM_L0_EN 0x01
@@ -667,6 +658,11 @@ · 62 unmodified lines
667658 #define PM_WAKE_EN 0x01
668659 #define PM_CTRL4 0xFF47
669660
661+#define REG_CFG_OOBS_OFF_TIMER 0xFEA6
662+#define REG_CFG_OOBS_ON_TIMER 0xFEA7
663+#define REG_CFG_VCM_ON_TIMER 0xFEA8
664+#define REG_CFG_OOBS_POLLING 0xFEA9
665+
670666 /* Memory mapping */
671667 #define SRAM_BASE 0xE600
672668 #define RBUF_BASE 0xF400
@@ -1041,10 +1037,6 @@ · 368 unmodified lines
10411037 #define PHY_DIG1E_RX_EN_KEEP 0x0001
10421038 #define PHY_DUM_REG 0x1F
10431039
1044−#define PCR_ASPM_SETTING_REG1 0x160
1045−#define PCR_ASPM_SETTING_REG2 0x168
1046−#define PCR_ASPM_SETTING_5260 0x178
1047−
10481040 #define PCR_SETTING_REG1 0x724
10491041 #define PCR_SETTING_REG2 0x814
10501042 #define PCR_SETTING_REG3 0x747
@@ -1091,11 +1083,6 @@ struct pcr_ops { · 40 unmodified lines
10911083
10921084 enum PDEV_STAT {PDEV_STAT_IDLE, PDEV_STAT_RUN};
10931085
1094−#define ASPM_L1_1_EN_MASK BIT(3)
1095−#define ASPM_L1_2_EN_MASK BIT(2)
1096−#define PM_L1_1_EN_MASK BIT(1)
1097−#define PM_L1_2_EN_MASK BIT(0)
1098−
10991086 #define ASPM_L1_1_EN BIT(0)
11001087 #define ASPM_L1_2_EN BIT(1)
11011088 #define PM_L1_1_EN BIT(2)
@@ -1158,7 +1145,6 @@ struct rtsx_hw_param { · 56 unmodified lines
11581145 struct rtsx_pcr {
11591146 struct pci_dev *pci;
11601147 unsigned int id;
1161− int pcie_cap;
11621148 struct rtsx_cr_option option;
11631149 struct rtsx_hw_param hw_param;
11641150
@@ -1204,6 +1190,7 @@ struct rtsx_pcr { · 39 unmodified lines
12041190 #define EXTRA_CAPS_MMC_HSDDR (1 << 3)
12051191 #define EXTRA_CAPS_MMC_HS200 (1 << 4)
12061192 #define EXTRA_CAPS_MMC_8BIT (1 << 5)
1193+#define EXTRA_CAPS_NO_MMC (1 << 7)
12071194 u32 extra_caps;
12081195
12091196 #define IC_VER_A 0
@@ -1242,6 +1229,7 @@ struct rtsx_pcr { · 32 unmodified lines
12421229 u8 dma_error_count;
12431230 u8 ocp_stat;
12441231 u8 ocp_stat2;
1232+ u8 rtd3_en;
12451233 };
12461234
12471235 #define PID_524A 0x524A
@@ -1250,6 +1238,7 @@ struct rtsx_pcr { · 2 unmodified lines
12501238 #define PID_525A 0x525A
12511239 #define PID_5260 0x5260
12521240 #define PID_5261 0x5261
1241+#define PID_5228 0x5228
12531242
12541243 #define CHK_PCI_PID(pcr, pid) ((pcr)->pci->device == (pid))
12551244 #define PCI_VID(pcr) ((pcr)->pci->vendor)
include/linux/soundwire/sdw.h+19−14
@@ -88,10 +88,10 @@ enum sdw_slave_status { · 87 unmodified lines
8888 * @SDW_CLK_POST_DEPREPARE: post clock stop de-prepare
8989 */
9090 enum sdw_clk_stop_type {
91− SDW_CLK_PRE_PREPARE = 0,
92− SDW_CLK_POST_PREPARE,
93− SDW_CLK_PRE_DEPREPARE,
94− SDW_CLK_POST_DEPREPARE,
91+ SDW_CLK_PRE_PREPARE = 0,
92+ SDW_CLK_POST_PREPARE,
93+ SDW_CLK_PRE_DEPREPARE,
94+ SDW_CLK_POST_DEPREPARE,
9595 };
9696
9797 /**
@@ -152,19 +152,19 @@ enum sdw_data_direction { · 54 unmodified lines
152152 *
153153 * @SDW_PORT_DATA_MODE_NORMAL: Normal data mode where audio data is received
154154 * and transmitted.
155+ * @SDW_PORT_DATA_MODE_PRBS: Test mode which uses a PRBS generator to produce
156+ * a pseudo random data pattern that is transferred
157+ * @SDW_PORT_DATA_MODE_STATIC_0: Simple test mode which uses static value of
158+ * logic 0. The encoding will result in no signal transitions
155159 * @SDW_PORT_DATA_MODE_STATIC_1: Simple test mode which uses static value of
156160 * logic 1. The encoding will result in signal transitions at every bitslot
157161 * owned by this Port
158− * @SDW_PORT_DATA_MODE_STATIC_0: Simple test mode which uses static value of
159− * logic 0. The encoding will result in no signal transitions
160− * @SDW_PORT_DATA_MODE_PRBS: Test mode which uses a PRBS generator to produce
161− * a pseudo random data pattern that is transferred
162162 */
163163 enum sdw_port_data_mode {
164164 SDW_PORT_DATA_MODE_NORMAL = 0,
165− SDW_PORT_DATA_MODE_STATIC_1 = 1,
165+ SDW_PORT_DATA_MODE_PRBS = 1,
166166 SDW_PORT_DATA_MODE_STATIC_0 = 2,
167− SDW_PORT_DATA_MODE_PRBS = 3,
167+ SDW_PORT_DATA_MODE_STATIC_1 = 3,
168168 };
169169
170170 /*
@@ -426,8 +426,7 @@ int sdw_slave_read_prop(struct sdw_slave *slave); · 255 unmodified lines
426426 * struct sdw_slave_id - Slave ID
427427 * @mfg_id: MIPI Manufacturer ID
428428 * @part_id: Device Part ID
429− * @class_id: MIPI Class ID, unused now.
430− * Currently a placeholder in MIPI SoundWire Spec
429+ * @class_id: MIPI Class ID (defined starting with SoundWire 1.2 spec)
431430 * @unique_id: Device unique ID
432431 * @sdw_version: SDW version implemented
433432 *
@@ -659,10 +658,14 @@ struct sdw_driver { · 225 unmodified lines
659658 struct device_driver driver;
660659 };
661660
662−#define SDW_SLAVE_ENTRY(_mfg_id, _part_id, _drv_data) \
663− { .mfg_id = (_mfg_id), .part_id = (_part_id), \
661+#define SDW_SLAVE_ENTRY_EXT(_mfg_id, _part_id, _version, _c_id, _drv_data) \
662+ { .mfg_id = (_mfg_id), .part_id = (_part_id), \
663+ .sdw_version = (_version), .class_id = (_c_id), \
664664 .driver_data = (unsigned long)(_drv_data) }
665665
666+#define SDW_SLAVE_ENTRY(_mfg_id, _part_id, _drv_data) \
667+ SDW_SLAVE_ENTRY_EXT((_mfg_id), (_part_id), 0, 0, (_drv_data))
668+
666669 int sdw_handle_slave_status(struct sdw_bus *bus,
667670 enum sdw_slave_status status[]);
668671
@@ -952,10 +955,12 @@ int sdw_stream_remove_master(struct sdw_bus *bus, · 283 unmodified lines
952955 struct sdw_stream_runtime *stream);
953956 int sdw_stream_remove_slave(struct sdw_slave *slave,
954957 struct sdw_stream_runtime *stream);
958+int sdw_startup_stream(void *sdw_substream);
955959 int sdw_prepare_stream(struct sdw_stream_runtime *stream);
956960 int sdw_enable_stream(struct sdw_stream_runtime *stream);
957961 int sdw_disable_stream(struct sdw_stream_runtime *stream);
958962 int sdw_deprepare_stream(struct sdw_stream_runtime *stream);
963+void sdw_shutdown_stream(void *sdw_substream);
959964 int sdw_bus_prep_clk_stop(struct sdw_bus *bus);
960965 int sdw_bus_clk_stop(struct sdw_bus *bus);
961966 int sdw_bus_exit_clk_stop(struct sdw_bus *bus);
include/linux/soundwire/sdw_intel.h+2−0
@@ -115,6 +115,7 @@ struct sdw_intel_slave_id { · 114 unmodified lines
115115 * links
116116 * @link_list: list to handle interrupts across all links
117117 * @shim_lock: mutex to handle concurrent rmw access to shared SHIM registers.
118+ * @shim_mask: flags to track initialization of SHIM shared registers
118119 */
119120 struct sdw_intel_ctx {
120121 int count;
@@ -126,6 +127,7 @@ struct sdw_intel_ctx { · 5 unmodified lines
126127 struct sdw_intel_slave_id *ids;
127128 struct list_head link_list;
128129 struct mutex shim_lock; /* lock for access to shared SHIM registers */
130+ u32 shim_mask;
129131 };
130132
131133 /**
include/linux/soundwire/sdw_registers.h+116−1
@@ -12,7 +12,7 @@ · 11 unmodified lines
1212 #define SDW_REG_SHIFT(n) (ffs(n) - 1)
1313
1414 /*
15− * SDW registers as defined by MIPI 1.1 Spec
15+ * SDW registers as defined by MIPI 1.2 Spec
1616 */
1717 #define SDW_REGADDR GENMASK(14, 0)
1818 #define SDW_SCP_ADDRPAGE2_MASK GENMASK(22, 15)
@@ -43,6 +43,8 @@ · 24 unmodified lines
4343 #define SDW_DP0_INT_TEST_FAIL BIT(0)
4444 #define SDW_DP0_INT_PORT_READY BIT(1)
4545 #define SDW_DP0_INT_BRA_FAILURE BIT(2)
46+#define SDW_DP0_SDCA_CASCADE BIT(3)
47+/* BIT(4) not allocated in SoundWire specification 1.2 */
4648 #define SDW_DP0_INT_IMPDEF1 BIT(5)
4749 #define SDW_DP0_INT_IMPDEF2 BIT(6)
4850 #define SDW_DP0_INT_IMPDEF3 BIT(7)
@@ -106,6 +108,20 @@ · 57 unmodified lines
106108 #define SDW_SCP_ADDRPAGE2 0x49
107109 #define SDW_SCP_KEEPEREN 0x4A
108110 #define SDW_SCP_BANKDELAY 0x4B
111+#define SDW_SCP_COMMIT 0x4C
112+
113+#define SDW_SCP_BUS_CLOCK_BASE 0x4D
114+#define SDW_SCP_BASE_CLOCK_FREQ GENMASK(2, 0)
115+#define SDW_SCP_BASE_CLOCK_UNKNOWN 0x0
116+#define SDW_SCP_BASE_CLOCK_19200000_HZ 0x1
117+#define SDW_SCP_BASE_CLOCK_24000000_HZ 0x2
118+#define SDW_SCP_BASE_CLOCK_24576000_HZ 0x3
119+#define SDW_SCP_BASE_CLOCK_22579200_HZ 0x4
120+#define SDW_SCP_BASE_CLOCK_32000000_HZ 0x5
121+#define SDW_SCP_BASE_CLOCK_RESERVED 0x6
122+#define SDW_SCP_BASE_CLOCK_IMP_DEF 0x7
123+
124+/* 0x4E is not allocated in SoundWire specification 1.2 */
109125 #define SDW_SCP_TESTMODE 0x4F
110126 #define SDW_SCP_DEVID_0 0x50
111127 #define SDW_SCP_DEVID_1 0x51
@@ -114,12 +130,111 @@ · 2 unmodified lines
114130 #define SDW_SCP_DEVID_4 0x54
115131 #define SDW_SCP_DEVID_5 0x55
116132
133+/* Both INT and STATUS register are same */
134+#define SDW_SCP_SDCA_INT1 0x58
135+#define SDW_SCP_SDCA_INT_SDCA_0 BIT(0)
136+#define SDW_SCP_SDCA_INT_SDCA_1 BIT(1)
137+#define SDW_SCP_SDCA_INT_SDCA_2 BIT(2)
138+#define SDW_SCP_SDCA_INT_SDCA_3 BIT(3)
139+#define SDW_SCP_SDCA_INT_SDCA_4 BIT(4)
140+#define SDW_SCP_SDCA_INT_SDCA_5 BIT(5)
141+#define SDW_SCP_SDCA_INT_SDCA_6 BIT(6)
142+#define SDW_SCP_SDCA_INT_SDCA_7 BIT(7)
143+
144+#define SDW_SCP_SDCA_INT2 0x59
145+#define SDW_SCP_SDCA_INT_SDCA_8 BIT(0)
146+#define SDW_SCP_SDCA_INT_SDCA_9 BIT(1)
147+#define SDW_SCP_SDCA_INT_SDCA_10 BIT(2)
148+#define SDW_SCP_SDCA_INT_SDCA_11 BIT(3)
149+#define SDW_SCP_SDCA_INT_SDCA_12 BIT(4)
150+#define SDW_SCP_SDCA_INT_SDCA_13 BIT(5)
151+#define SDW_SCP_SDCA_INT_SDCA_14 BIT(6)
152+#define SDW_SCP_SDCA_INT_SDCA_15 BIT(7)
153+
154+#define SDW_SCP_SDCA_INT3 0x5A
155+#define SDW_SCP_SDCA_INT_SDCA_16 BIT(0)
156+#define SDW_SCP_SDCA_INT_SDCA_17 BIT(1)
157+#define SDW_SCP_SDCA_INT_SDCA_18 BIT(2)
158+#define SDW_SCP_SDCA_INT_SDCA_19 BIT(3)
159+#define SDW_SCP_SDCA_INT_SDCA_20 BIT(4)
160+#define SDW_SCP_SDCA_INT_SDCA_21 BIT(5)
161+#define SDW_SCP_SDCA_INT_SDCA_22 BIT(6)
162+#define SDW_SCP_SDCA_INT_SDCA_23 BIT(7)
163+
164+#define SDW_SCP_SDCA_INT4 0x5B
165+#define SDW_SCP_SDCA_INT_SDCA_24 BIT(0)
166+#define SDW_SCP_SDCA_INT_SDCA_25 BIT(1)
167+#define SDW_SCP_SDCA_INT_SDCA_26 BIT(2)
168+#define SDW_SCP_SDCA_INT_SDCA_27 BIT(3)
169+#define SDW_SCP_SDCA_INT_SDCA_28 BIT(4)
170+#define SDW_SCP_SDCA_INT_SDCA_29 BIT(5)
171+#define SDW_SCP_SDCA_INT_SDCA_30 BIT(6)
172+/* BIT(7) not allocated in SoundWire 1.2 specification */
173+
174+#define SDW_SCP_SDCA_INTMASK1 0x5C
175+#define SDW_SCP_SDCA_INTMASK_SDCA_0 BIT(0)
176+#define SDW_SCP_SDCA_INTMASK_SDCA_1 BIT(1)
177+#define SDW_SCP_SDCA_INTMASK_SDCA_2 BIT(2)
178+#define SDW_SCP_SDCA_INTMASK_SDCA_3 BIT(3)
179+#define SDW_SCP_SDCA_INTMASK_SDCA_4 BIT(4)
180+#define SDW_SCP_SDCA_INTMASK_SDCA_5 BIT(5)
181+#define SDW_SCP_SDCA_INTMASK_SDCA_6 BIT(6)
182+#define SDW_SCP_SDCA_INTMASK_SDCA_7 BIT(7)
183+
184+#define SDW_SCP_SDCA_INTMASK2 0x5D
185+#define SDW_SCP_SDCA_INTMASK_SDCA_8 BIT(0)
186+#define SDW_SCP_SDCA_INTMASK_SDCA_9 BIT(1)
187+#define SDW_SCP_SDCA_INTMASK_SDCA_10 BIT(2)
188+#define SDW_SCP_SDCA_INTMASK_SDCA_11 BIT(3)
189+#define SDW_SCP_SDCA_INTMASK_SDCA_12 BIT(4)
190+#define SDW_SCP_SDCA_INTMASK_SDCA_13 BIT(5)
191+#define SDW_SCP_SDCA_INTMASK_SDCA_14 BIT(6)
192+#define SDW_SCP_SDCA_INTMASK_SDCA_15 BIT(7)
193+
194+#define SDW_SCP_SDCA_INTMASK3 0x5E
195+#define SDW_SCP_SDCA_INTMASK_SDCA_16 BIT(0)
196+#define SDW_SCP_SDCA_INTMASK_SDCA_17 BIT(1)
197+#define SDW_SCP_SDCA_INTMASK_SDCA_18 BIT(2)
198+#define SDW_SCP_SDCA_INTMASK_SDCA_19 BIT(3)
199+#define SDW_SCP_SDCA_INTMASK_SDCA_20 BIT(4)
200+#define SDW_SCP_SDCA_INTMASK_SDCA_21 BIT(5)
201+#define SDW_SCP_SDCA_INTMASK_SDCA_22 BIT(6)
202+#define SDW_SCP_SDCA_INTMASK_SDCA_23 BIT(7)
203+
204+#define SDW_SCP_SDCA_INTMASK4 0x5F
205+#define SDW_SCP_SDCA_INTMASK_SDCA_24 BIT(0)
206+#define SDW_SCP_SDCA_INTMASK_SDCA_25 BIT(1)
207+#define SDW_SCP_SDCA_INTMASK_SDCA_26 BIT(2)
208+#define SDW_SCP_SDCA_INTMASK_SDCA_27 BIT(3)
209+#define SDW_SCP_SDCA_INTMASK_SDCA_28 BIT(4)
210+#define SDW_SCP_SDCA_INTMASK_SDCA_29 BIT(5)
211+#define SDW_SCP_SDCA_INTMASK_SDCA_30 BIT(6)
212+/* BIT(7) not allocated in SoundWire 1.2 specification */
213+
117214 /* Banked Registers */
118215 #define SDW_SCP_FRAMECTRL_B0 0x60
119216 #define SDW_SCP_FRAMECTRL_B1 (0x60 + SDW_BANK1_OFFSET)
120217 #define SDW_SCP_NEXTFRAME_B0 0x61
121218 #define SDW_SCP_NEXTFRAME_B1 (0x61 + SDW_BANK1_OFFSET)
122219
220+#define SDW_SCP_BUSCLOCK_SCALE_B0 0x62
221+#define SDW_SCP_BUSCLOCK_SCALE_B1 (0x62 + SDW_BANK1_OFFSET)
222+#define SDW_SCP_CLOCK_SCALE GENMASK(3, 0)
223+
224+/* PHY registers - CTRL and STAT are the same address */
225+#define SDW_SCP_PHY_OUT_CTRL_0 0x80
226+#define SDW_SCP_PHY_OUT_CTRL_1 0x81
227+#define SDW_SCP_PHY_OUT_CTRL_2 0x82
228+#define SDW_SCP_PHY_OUT_CTRL_3 0x83
229+#define SDW_SCP_PHY_OUT_CTRL_4 0x84
230+#define SDW_SCP_PHY_OUT_CTRL_5 0x85
231+#define SDW_SCP_PHY_OUT_CTRL_6 0x86
232+#define SDW_SCP_PHY_OUT_CTRL_7 0x87
233+
234+#define SDW_SCP_CAP_LOAD_CTRL GENMASK(2, 0)
235+#define SDW_SCP_DRIVE_STRENGTH_CTRL GENMASK(5, 3)
236+#define SDW_SCP_SLEW_TIME_CTRL GENMASK(7, 6)
237+
123238 /* Both INT and STATUS register is same */
124239 #define SDW_DPN_INT(n) (0x0 + SDW_DPN_SIZE * (n))
125240 #define SDW_DPN_INTMASK(n) (0x1 + SDW_DPN_SIZE * (n))
include/linux/vbox_utils.h+1−0
@@ -16,6 +16,7 @@ struct vbg_dev; · 15 unmodified lines
1616 __printf(1, 2) void vbg_info(const char *fmt, ...);
1717 __printf(1, 2) void vbg_warn(const char *fmt, ...);
1818 __printf(1, 2) void vbg_err(const char *fmt, ...);
19+__printf(1, 2) void vbg_err_ratelimited(const char *fmt, ...);
1920
2021 /* Only use backdoor logging for non-dynamic debug builds */
2122 #if defined(DEBUG) && !defined(CONFIG_DYNAMIC_DEBUG)
include/linux/vmw_vmci_defs.h+1−1
@@ -159,7 +159,7 @@ static inline bool vmci_handle_is_invalid(struct vmci_handle h) · 158 unmodified lines
159159 */
160160 #define VMCI_ANON_SRC_CONTEXT_ID VMCI_INVALID_ID
161161 #define VMCI_ANON_SRC_RESOURCE_ID VMCI_INVALID_ID
162−static const struct vmci_handle VMCI_ANON_SRC_HANDLE = {
162+static const struct vmci_handle __maybe_unused VMCI_ANON_SRC_HANDLE = {
163163 .context = VMCI_ANON_SRC_CONTEXT_ID,
164164 .resource = VMCI_ANON_SRC_RESOURCE_ID
165165 };