Skip to content

Commit 4334f30

Browse files
committed
Merge tag 'char-misc-5.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver fixes from Greg KH: "Here are some small driver fixes for 5.7-rc5 that resolve a number of minor reported issues: - mhi bus driver fixes found as people actually use the code - phy driver fixes and compat string additions - most driver fix due to link order changing when the core moved out of staging - mei driver fix - interconnect build warning fix All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-5.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: bus: mhi: core: Fix channel device name conflict bus: mhi: core: Fix typo in comment bus: mhi: core: Offload register accesses to the controller bus: mhi: core: Remove link_status() callback bus: mhi: core: Make sure to powerdown if mhi_sync_power_up fails bus: mhi: Fix parsing of mhi_flags mei: me: disable mei interface on LBG servers. phy: qualcomm: usb-hs-28nm: Prepare clocks in init MAINTAINERS: Add Vinod Koul as Generic PHY co-maintainer interconnect: qcom: Move the static keyword to the front of declaration most: core: use function subsys_initcall() bus: mhi: core: Fix a NULL vs IS_ERR check in mhi_create_devices() phy: qcom-qusb2: Re add "qcom,sdm845-qusb2-phy" compat string phy: tegra: Select USB_COMMON for usb_get_maximum_speed()
2 parents c61529f + f0e1d3a commit 4334f30

File tree

14 files changed

+77
-51
lines changed

14 files changed

+77
-51
lines changed

MAINTAINERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7119,9 +7119,10 @@ F: include/uapi/asm-generic/
71197119

71207120
GENERIC PHY FRAMEWORK
71217121
M: Kishon Vijay Abraham I <[email protected]>
7122+
M: Vinod Koul <[email protected]>
71227123
71237124
S: Supported
7124-
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git
7125+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.git
71257126
F: Documentation/devicetree/bindings/phy/
71267127
F: drivers/phy/
71277128
F: include/linux/phy/

drivers/bus/mhi/core/init.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -812,10 +812,9 @@ int mhi_register_controller(struct mhi_controller *mhi_cntrl,
812812
if (!mhi_cntrl)
813813
return -EINVAL;
814814

815-
if (!mhi_cntrl->runtime_get || !mhi_cntrl->runtime_put)
816-
return -EINVAL;
817-
818-
if (!mhi_cntrl->status_cb || !mhi_cntrl->link_status)
815+
if (!mhi_cntrl->runtime_get || !mhi_cntrl->runtime_put ||
816+
!mhi_cntrl->status_cb || !mhi_cntrl->read_reg ||
817+
!mhi_cntrl->write_reg)
819818
return -EINVAL;
820819

821820
ret = parse_config(mhi_cntrl, config);

drivers/bus/mhi/core/internal.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111

1212
extern struct bus_type mhi_bus_type;
1313

14-
/* MHI MMIO register mapping */
15-
#define PCI_INVALID_READ(val) (val == U32_MAX)
16-
1714
#define MHIREGLEN (0x0)
1815
#define MHIREGLEN_MHIREGLEN_MASK (0xFFFFFFFF)
1916
#define MHIREGLEN_MHIREGLEN_SHIFT (0)

drivers/bus/mhi/core/main.c

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,7 @@
1818
int __must_check mhi_read_reg(struct mhi_controller *mhi_cntrl,
1919
void __iomem *base, u32 offset, u32 *out)
2020
{
21-
u32 tmp = readl(base + offset);
22-
23-
/* If there is any unexpected value, query the link status */
24-
if (PCI_INVALID_READ(tmp) &&
25-
mhi_cntrl->link_status(mhi_cntrl))
26-
return -EIO;
27-
28-
*out = tmp;
29-
30-
return 0;
21+
return mhi_cntrl->read_reg(mhi_cntrl, base + offset, out);
3122
}
3223

3324
int __must_check mhi_read_reg_field(struct mhi_controller *mhi_cntrl,
@@ -49,7 +40,7 @@ int __must_check mhi_read_reg_field(struct mhi_controller *mhi_cntrl,
4940
void mhi_write_reg(struct mhi_controller *mhi_cntrl, void __iomem *base,
5041
u32 offset, u32 val)
5142
{
52-
writel(val, base + offset);
43+
mhi_cntrl->write_reg(mhi_cntrl, base + offset, val);
5344
}
5445

5546
void mhi_write_reg_field(struct mhi_controller *mhi_cntrl, void __iomem *base,
@@ -294,7 +285,7 @@ void mhi_create_devices(struct mhi_controller *mhi_cntrl)
294285
!(mhi_chan->ee_mask & BIT(mhi_cntrl->ee)))
295286
continue;
296287
mhi_dev = mhi_alloc_device(mhi_cntrl);
297-
if (!mhi_dev)
288+
if (IS_ERR(mhi_dev))
298289
return;
299290

300291
mhi_dev->dev_type = MHI_DEVICE_XFER;
@@ -336,7 +327,8 @@ void mhi_create_devices(struct mhi_controller *mhi_cntrl)
336327

337328
/* Channel name is same for both UL and DL */
338329
mhi_dev->chan_name = mhi_chan->name;
339-
dev_set_name(&mhi_dev->dev, "%04x_%s", mhi_chan->chan,
330+
dev_set_name(&mhi_dev->dev, "%s_%s",
331+
dev_name(mhi_cntrl->cntrl_dev),
340332
mhi_dev->chan_name);
341333

342334
/* Init wakeup source if available */

drivers/bus/mhi/core/pm.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,11 @@ int mhi_sync_power_up(struct mhi_controller *mhi_cntrl)
902902
MHI_PM_IN_ERROR_STATE(mhi_cntrl->pm_state),
903903
msecs_to_jiffies(mhi_cntrl->timeout_ms));
904904

905-
return (MHI_IN_MISSION_MODE(mhi_cntrl->ee)) ? 0 : -EIO;
905+
ret = (MHI_IN_MISSION_MODE(mhi_cntrl->ee)) ? 0 : -ETIMEDOUT;
906+
if (ret)
907+
mhi_power_down(mhi_cntrl, false);
908+
909+
return ret;
906910
}
907911
EXPORT_SYMBOL(mhi_sync_power_up);
908912

drivers/interconnect/qcom/osm-l3.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static struct qcom_icc_node *sdm845_osm_l3_nodes[] = {
7878
[SLAVE_OSM_L3] = &sdm845_osm_l3,
7979
};
8080

81-
const static struct qcom_icc_desc sdm845_icc_osm_l3 = {
81+
static const struct qcom_icc_desc sdm845_icc_osm_l3 = {
8282
.nodes = sdm845_osm_l3_nodes,
8383
.num_nodes = ARRAY_SIZE(sdm845_osm_l3_nodes),
8484
};
@@ -91,7 +91,7 @@ static struct qcom_icc_node *sc7180_osm_l3_nodes[] = {
9191
[SLAVE_OSM_L3] = &sc7180_osm_l3,
9292
};
9393

94-
const static struct qcom_icc_desc sc7180_icc_osm_l3 = {
94+
static const struct qcom_icc_desc sc7180_icc_osm_l3 = {
9595
.nodes = sc7180_osm_l3_nodes,
9696
.num_nodes = ARRAY_SIZE(sc7180_osm_l3_nodes),
9797
};

drivers/interconnect/qcom/sdm845.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ static struct qcom_icc_node *aggre1_noc_nodes[] = {
192192
[SLAVE_ANOC_PCIE_A1NOC_SNOC] = &qns_pcie_a1noc_snoc,
193193
};
194194

195-
const static struct qcom_icc_desc sdm845_aggre1_noc = {
195+
static const struct qcom_icc_desc sdm845_aggre1_noc = {
196196
.nodes = aggre1_noc_nodes,
197197
.num_nodes = ARRAY_SIZE(aggre1_noc_nodes),
198198
.bcms = aggre1_noc_bcms,
@@ -220,7 +220,7 @@ static struct qcom_icc_node *aggre2_noc_nodes[] = {
220220
[SLAVE_SERVICE_A2NOC] = &srvc_aggre2_noc,
221221
};
222222

223-
const static struct qcom_icc_desc sdm845_aggre2_noc = {
223+
static const struct qcom_icc_desc sdm845_aggre2_noc = {
224224
.nodes = aggre2_noc_nodes,
225225
.num_nodes = ARRAY_SIZE(aggre2_noc_nodes),
226226
.bcms = aggre2_noc_bcms,
@@ -281,7 +281,7 @@ static struct qcom_icc_node *config_noc_nodes[] = {
281281
[SLAVE_SERVICE_CNOC] = &srvc_cnoc,
282282
};
283283

284-
const static struct qcom_icc_desc sdm845_config_noc = {
284+
static const struct qcom_icc_desc sdm845_config_noc = {
285285
.nodes = config_noc_nodes,
286286
.num_nodes = ARRAY_SIZE(config_noc_nodes),
287287
.bcms = config_noc_bcms,
@@ -297,7 +297,7 @@ static struct qcom_icc_node *dc_noc_nodes[] = {
297297
[SLAVE_MEM_NOC_CFG] = &qhs_memnoc,
298298
};
299299

300-
const static struct qcom_icc_desc sdm845_dc_noc = {
300+
static const struct qcom_icc_desc sdm845_dc_noc = {
301301
.nodes = dc_noc_nodes,
302302
.num_nodes = ARRAY_SIZE(dc_noc_nodes),
303303
.bcms = dc_noc_bcms,
@@ -315,7 +315,7 @@ static struct qcom_icc_node *gladiator_noc_nodes[] = {
315315
[SLAVE_SERVICE_GNOC] = &srvc_gnoc,
316316
};
317317

318-
const static struct qcom_icc_desc sdm845_gladiator_noc = {
318+
static const struct qcom_icc_desc sdm845_gladiator_noc = {
319319
.nodes = gladiator_noc_nodes,
320320
.num_nodes = ARRAY_SIZE(gladiator_noc_nodes),
321321
.bcms = gladiator_noc_bcms,
@@ -350,7 +350,7 @@ static struct qcom_icc_node *mem_noc_nodes[] = {
350350
[SLAVE_EBI1] = &ebi,
351351
};
352352

353-
const static struct qcom_icc_desc sdm845_mem_noc = {
353+
static const struct qcom_icc_desc sdm845_mem_noc = {
354354
.nodes = mem_noc_nodes,
355355
.num_nodes = ARRAY_SIZE(mem_noc_nodes),
356356
.bcms = mem_noc_bcms,
@@ -384,7 +384,7 @@ static struct qcom_icc_node *mmss_noc_nodes[] = {
384384
[SLAVE_CAMNOC_UNCOMP] = &qns_camnoc_uncomp,
385385
};
386386

387-
const static struct qcom_icc_desc sdm845_mmss_noc = {
387+
static const struct qcom_icc_desc sdm845_mmss_noc = {
388388
.nodes = mmss_noc_nodes,
389389
.num_nodes = ARRAY_SIZE(mmss_noc_nodes),
390390
.bcms = mmss_noc_bcms,
@@ -430,7 +430,7 @@ static struct qcom_icc_node *system_noc_nodes[] = {
430430
[SLAVE_TCU] = &xs_sys_tcu_cfg,
431431
};
432432

433-
const static struct qcom_icc_desc sdm845_system_noc = {
433+
static const struct qcom_icc_desc sdm845_system_noc = {
434434
.nodes = system_noc_nodes,
435435
.num_nodes = ARRAY_SIZE(system_noc_nodes),
436436
.bcms = system_noc_bcms,

drivers/misc/mei/hw-me.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,6 +1465,13 @@ static const struct mei_cfg mei_me_pch12_cfg = {
14651465
MEI_CFG_DMA_128,
14661466
};
14671467

1468+
/* LBG with quirk for SPS Firmware exclusion */
1469+
static const struct mei_cfg mei_me_pch12_sps_cfg = {
1470+
MEI_CFG_PCH8_HFS,
1471+
MEI_CFG_FW_VER_SUPP,
1472+
MEI_CFG_FW_SPS,
1473+
};
1474+
14681475
/* Tiger Lake and newer devices */
14691476
static const struct mei_cfg mei_me_pch15_cfg = {
14701477
MEI_CFG_PCH8_HFS,
@@ -1487,6 +1494,7 @@ static const struct mei_cfg *const mei_cfg_list[] = {
14871494
[MEI_ME_PCH8_CFG] = &mei_me_pch8_cfg,
14881495
[MEI_ME_PCH8_SPS_CFG] = &mei_me_pch8_sps_cfg,
14891496
[MEI_ME_PCH12_CFG] = &mei_me_pch12_cfg,
1497+
[MEI_ME_PCH12_SPS_CFG] = &mei_me_pch12_sps_cfg,
14901498
[MEI_ME_PCH15_CFG] = &mei_me_pch15_cfg,
14911499
};
14921500

drivers/misc/mei/hw-me.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ struct mei_me_hw {
8080
* servers platforms with quirk for
8181
* SPS firmware exclusion.
8282
* @MEI_ME_PCH12_CFG: Platform Controller Hub Gen12 and newer
83+
* @MEI_ME_PCH12_SPS_CFG: Platform Controller Hub Gen12 and newer
84+
* servers platforms with quirk for
85+
* SPS firmware exclusion.
8386
* @MEI_ME_PCH15_CFG: Platform Controller Hub Gen15 and newer
8487
* @MEI_ME_NUM_CFG: Upper Sentinel.
8588
*/
@@ -93,6 +96,7 @@ enum mei_cfg_idx {
9396
MEI_ME_PCH8_CFG,
9497
MEI_ME_PCH8_SPS_CFG,
9598
MEI_ME_PCH12_CFG,
99+
MEI_ME_PCH12_SPS_CFG,
96100
MEI_ME_PCH15_CFG,
97101
MEI_ME_NUM_CFG,
98102
};

drivers/misc/mei/pci-me.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static const struct pci_device_id mei_me_pci_tbl[] = {
7070
{MEI_PCI_DEVICE(MEI_DEV_ID_SPT_2, MEI_ME_PCH8_CFG)},
7171
{MEI_PCI_DEVICE(MEI_DEV_ID_SPT_H, MEI_ME_PCH8_SPS_CFG)},
7272
{MEI_PCI_DEVICE(MEI_DEV_ID_SPT_H_2, MEI_ME_PCH8_SPS_CFG)},
73-
{MEI_PCI_DEVICE(MEI_DEV_ID_LBG, MEI_ME_PCH12_CFG)},
73+
{MEI_PCI_DEVICE(MEI_DEV_ID_LBG, MEI_ME_PCH12_SPS_CFG)},
7474

7575
{MEI_PCI_DEVICE(MEI_DEV_ID_BXT_M, MEI_ME_PCH8_CFG)},
7676
{MEI_PCI_DEVICE(MEI_DEV_ID_APL_I, MEI_ME_PCH8_CFG)},

0 commit comments

Comments
 (0)