Skip to content

Commit bd6b7df

Browse files
committed
Merge branch 'fixes' into next
2 parents 61840ed + 92b1825 commit bd6b7df

File tree

3 files changed

+26
-9
lines changed

3 files changed

+26
-9
lines changed

drivers/mmc/host/cqhci-core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,9 @@ static void __cqhci_enable(struct cqhci_host *cq_host)
282282

283283
cqhci_writel(cq_host, cqcfg, CQHCI_CFG);
284284

285+
if (cqhci_readl(cq_host, CQHCI_CTL) & CQHCI_HALT)
286+
cqhci_writel(cq_host, 0, CQHCI_CTL);
287+
285288
mmc->cqe_on = true;
286289

287290
if (cq_host->ops->enable)

drivers/mmc/host/dw_mmc-exynos.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,18 @@ static s8 dw_mci_exynos_get_best_clksmpl(u8 candiates)
464464
}
465465
}
466466

467+
/*
468+
* If there is no cadiates value, then it needs to return -EIO.
469+
* If there are candiates values and don't find bset clk sample value,
470+
* then use a first candiates clock sample value.
471+
*/
472+
for (i = 0; i < iter; i++) {
473+
__c = ror8(candiates, i);
474+
if ((__c & 0x1) == 0x1) {
475+
loc = i;
476+
goto out;
477+
}
478+
}
467479
out:
468480
return loc;
469481
}
@@ -494,6 +506,8 @@ static int dw_mci_exynos_execute_tuning(struct dw_mci_slot *slot, u32 opcode)
494506
priv->tuned_sample = found;
495507
} else {
496508
ret = -EIO;
509+
dev_warn(&mmc->class_dev,
510+
"There is no candiates value about clksmpl!\n");
497511
}
498512

499513
return ret;

drivers/mmc/host/vub300.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ static void check_vub300_port_status(struct vub300_mmc_host *vub300)
576576
GET_SYSTEM_PORT_STATUS,
577577
USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
578578
0x0000, 0x0000, &vub300->system_port_status,
579-
sizeof(vub300->system_port_status), HZ);
579+
sizeof(vub300->system_port_status), 1000);
580580
if (sizeof(vub300->system_port_status) == retval)
581581
new_system_port_status(vub300);
582582
}
@@ -1241,7 +1241,7 @@ static void __download_offload_pseudocode(struct vub300_mmc_host *vub300,
12411241
SET_INTERRUPT_PSEUDOCODE,
12421242
USB_DIR_OUT | USB_TYPE_VENDOR |
12431243
USB_RECIP_DEVICE, 0x0000, 0x0000,
1244-
xfer_buffer, xfer_length, HZ);
1244+
xfer_buffer, xfer_length, 1000);
12451245
kfree(xfer_buffer);
12461246
if (retval < 0)
12471247
goto copy_error_message;
@@ -1284,7 +1284,7 @@ static void __download_offload_pseudocode(struct vub300_mmc_host *vub300,
12841284
SET_TRANSFER_PSEUDOCODE,
12851285
USB_DIR_OUT | USB_TYPE_VENDOR |
12861286
USB_RECIP_DEVICE, 0x0000, 0x0000,
1287-
xfer_buffer, xfer_length, HZ);
1287+
xfer_buffer, xfer_length, 1000);
12881288
kfree(xfer_buffer);
12891289
if (retval < 0)
12901290
goto copy_error_message;
@@ -1991,7 +1991,7 @@ static void __set_clock_speed(struct vub300_mmc_host *vub300, u8 buf[8],
19911991
usb_control_msg(vub300->udev, usb_sndctrlpipe(vub300->udev, 0),
19921992
SET_CLOCK_SPEED,
19931993
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
1994-
0x00, 0x00, buf, buf_array_size, HZ);
1994+
0x00, 0x00, buf, buf_array_size, 1000);
19951995
if (retval != 8) {
19961996
dev_err(&vub300->udev->dev, "SET_CLOCK_SPEED"
19971997
" %dkHz failed with retval=%d\n", kHzClock, retval);
@@ -2013,14 +2013,14 @@ static void vub300_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
20132013
usb_control_msg(vub300->udev, usb_sndctrlpipe(vub300->udev, 0),
20142014
SET_SD_POWER,
20152015
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
2016-
0x0000, 0x0000, NULL, 0, HZ);
2016+
0x0000, 0x0000, NULL, 0, 1000);
20172017
/* must wait for the VUB300 u-proc to boot up */
20182018
msleep(600);
20192019
} else if ((ios->power_mode == MMC_POWER_UP) && !vub300->card_powered) {
20202020
usb_control_msg(vub300->udev, usb_sndctrlpipe(vub300->udev, 0),
20212021
SET_SD_POWER,
20222022
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
2023-
0x0001, 0x0000, NULL, 0, HZ);
2023+
0x0001, 0x0000, NULL, 0, 1000);
20242024
msleep(600);
20252025
vub300->card_powered = 1;
20262026
} else if (ios->power_mode == MMC_POWER_ON) {
@@ -2275,14 +2275,14 @@ static int vub300_probe(struct usb_interface *interface,
22752275
GET_HC_INF0,
22762276
USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
22772277
0x0000, 0x0000, &vub300->hc_info,
2278-
sizeof(vub300->hc_info), HZ);
2278+
sizeof(vub300->hc_info), 1000);
22792279
if (retval < 0)
22802280
goto error5;
22812281
retval =
22822282
usb_control_msg(vub300->udev, usb_sndctrlpipe(vub300->udev, 0),
22832283
SET_ROM_WAIT_STATES,
22842284
USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
2285-
firmware_rom_wait_states, 0x0000, NULL, 0, HZ);
2285+
firmware_rom_wait_states, 0x0000, NULL, 0, 1000);
22862286
if (retval < 0)
22872287
goto error5;
22882288
dev_info(&vub300->udev->dev,
@@ -2297,7 +2297,7 @@ static int vub300_probe(struct usb_interface *interface,
22972297
GET_SYSTEM_PORT_STATUS,
22982298
USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
22992299
0x0000, 0x0000, &vub300->system_port_status,
2300-
sizeof(vub300->system_port_status), HZ);
2300+
sizeof(vub300->system_port_status), 1000);
23012301
if (retval < 0) {
23022302
goto error4;
23032303
} else if (sizeof(vub300->system_port_status) == retval) {

0 commit comments

Comments
 (0)