Skip to content

Commit be18cd1

Browse files
committed
Merge tag 'mmc-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull MMC and MEMSTICK updates from Ulf Hansson: "MMC core: - Fix hanging on I/O during system suspend for removable cards - Set read only for SD cards with permanent write protect bit - Power cycle the SD/SDIO card if CMD11 fails for UHS voltage - Issue a cache flush for eMMC only when it's enabled - Adopt to updated cache ctrl settings for eMMC from MMC ioctls - Use use device property API when parsing voltages - Don't retry eMMC sanitize cmds - Use the timeout from the MMC ioctl for eMMC santize cmds MMC host: - mmc_spi: Make of_mmc_spi.c resource provider agnostic - mmc_spi: Use polling for card detect even without voltage-ranges - sdhci: Check for reset prior to DMA address unmap - sdhci-acpi: Add support for the AMDI0041 eMMC controller variant - sdhci-esdhc-imx: Depending on OF Kconfig and cleanup code - sdhci-pci: Add PCI IDs for Intel LKF - sdhci-pci: Fix initialization of some SD cards for Intel BYT - sdhci-pci-gli: Various improvements for GL97xx variants - sdhci-of-dwcmshc: Enable support for MMC_CAP_WAIT_WHILE_BUSY - sdhci-of-dwcmshc: Add ACPI support for BlueField-3 SoC - sdhci-of-dwcmshc: Add Rockchip platform support - tmio/renesas_sdhi: Extend support for reset and use a reset controller - tmio/renesas_sdhi: Enable support for MMC_CAP_WAIT_WHILE_BUSY - tmio/renesas_sdhi: Various improvements MEMSTICK: - Minor improvements/cleanups" * tag 'mmc-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (79 commits) mmc: block: Issue a cache flush only when it's enabled memstick: r592: ignore kfifo_out() return code again mmc: block: Update ext_csd.cache_ctrl if it was written mmc: mmc_spi: Make of_mmc_spi.c resource provider agnostic mmc: mmc_spi: Use already parsed IRQ mmc: mmc_spi: Drop unused NO_IRQ definition mmc: mmc_spi: Set up polling even if voltage-ranges is not present mmc: core: Convert mmc_of_parse_voltage() to use device property API mmc: core: Correct descriptions in mmc_of_parse() mmc: dw_mmc-rockchip: Just set default sample value for legacy mode mmc: sdhci-s3c: constify uses of driver/match data mmc: sdhci-s3c: correct kerneldoc of sdhci_s3c_drv_data mmc: sdhci-s3c: simplify getting of_device_id match data mmc: tmio: always restore irq register mmc: sdhci-pci-gli: Enlarge ASPM L1 entry delay of GL975x mmc: core: Let eMMC sanitize not retry in case of timeout/failure mmc: core: Add a retries parameter to __mmc_switch function memstick: r592: remove unused variable mmc: sdhci-st: Remove unnecessary error log mmc: sdhci-msm: Remove unnecessary error log ...
2 parents 6fa09d3 + 97fce12 commit be18cd1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1010
-642
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mmc/brcm,iproc-sdhci.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Broadcom IPROC SDHCI controller
8+
9+
maintainers:
10+
- Ray Jui <[email protected]>
11+
- Scott Branden <[email protected]>
12+
- Nicolas Saenz Julienne <[email protected]>
13+
14+
allOf:
15+
- $ref: mmc-controller.yaml#
16+
17+
properties:
18+
compatible:
19+
enum:
20+
- brcm,bcm2835-sdhci
21+
- brcm,bcm2711-emmc2
22+
- brcm,sdhci-iproc-cygnus
23+
- brcm,sdhci-iproc
24+
25+
reg:
26+
minItems: 1
27+
28+
interrupts:
29+
maxItems: 1
30+
31+
clocks:
32+
maxItems: 1
33+
description:
34+
Handle to core clock for the sdhci controller.
35+
36+
sdhci,auto-cmd12:
37+
type: boolean
38+
description: Specifies that controller should use auto CMD12
39+
40+
required:
41+
- compatible
42+
- reg
43+
- interrupts
44+
- clocks
45+
46+
unevaluatedProperties: false
47+
48+
examples:
49+
- |
50+
#include <dt-bindings/interrupt-controller/irq.h>
51+
#include <dt-bindings/interrupt-controller/arm-gic.h>
52+
#include <dt-bindings/clock/bcm-cygnus.h>
53+
54+
mmc@18041000 {
55+
compatible = "brcm,sdhci-iproc-cygnus";
56+
reg = <0x18041000 0x100>;
57+
interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>;
58+
clocks = <&lcpll0_clks BCM_CYGNUS_LCPLL0_SDIO_CLK>;
59+
bus-width = <4>;
60+
sdhci,auto-cmd12;
61+
no-1-8-v;
62+
};
63+
...

Documentation/devicetree/bindings/mmc/brcm,sdhci-iproc.txt

Lines changed: 0 additions & 37 deletions
This file was deleted.

Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,26 @@ properties:
103103
Only eMMC HS400 mode need to take care of this property.
104104
default: 0
105105

106+
clocks:
107+
maxItems: 3
108+
description:
109+
Handle clocks for the sdhc controller.
110+
111+
clock-names:
112+
items:
113+
- const: ipg
114+
- const: ahb
115+
- const: per
116+
117+
pinctrl-names:
118+
minItems: 1
119+
maxItems: 4
120+
items:
121+
- const: default
122+
- const: state_100mhz
123+
- const: state_200mhz
124+
- const: sleep
125+
106126
required:
107127
- compatible
108128
- reg

Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ by mmc.txt and the properties used by the mmc_spi driver.
55

66
Required properties:
77
- spi-max-frequency : maximum frequency for this device (Hz).
8-
- voltage-ranges : two cells are required, first cell specifies minimum
9-
slot voltage (mV), second cell specifies maximum slot voltage (mV).
10-
Several ranges could be specified.
118

129
Optional properties:
10+
- voltage-ranges : two cells are required, first cell specifies minimum
11+
slot voltage (mV), second cell specifies maximum slot voltage (mV).
12+
Several ranges could be specified. If not provided, 3.2v..3.4v is assumed.
1313
- gpios : may specify GPIOs in this order: Card-Detect GPIO,
1414
Write-Protect GPIO. Note that this does not follow the
1515
binding from mmc.txt, for historical reasons.

Documentation/devicetree/bindings/mmc/mtk-sd.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ properties:
3131
- const: mediatek,mt2701-mmc
3232
- items:
3333
- const: mediatek,mt8192-mmc
34+
- const: mediatek,mt8195-mmc
3435
- const: mediatek,mt8183-mmc
3536

3637
clocks:

Documentation/devicetree/bindings/mmc/sdhci-of-dwcmshc.txt

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mmc/snps,dwcmshc-sdhci.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Synopsys Designware Mobile Storage Host Controller Binding
8+
9+
maintainers:
10+
- Ulf Hansson <[email protected]>
11+
- Jisheng Zhang <[email protected]>
12+
13+
allOf:
14+
- $ref: mmc-controller.yaml#
15+
16+
properties:
17+
compatible:
18+
enum:
19+
- rockchip,rk3568-dwcmshc
20+
- snps,dwcmshc-sdhci
21+
22+
reg:
23+
minItems: 1
24+
items:
25+
- description: Offset and length of the register set for the device
26+
27+
interrupts:
28+
maxItems: 1
29+
30+
clocks:
31+
minItems: 1
32+
items:
33+
- description: core clock
34+
- description: bus clock for optional
35+
- description: axi clock for rockchip specified
36+
- description: block clock for rockchip specified
37+
- description: timer clock for rockchip specified
38+
39+
40+
clock-names:
41+
minItems: 1
42+
items:
43+
- const: core
44+
- const: bus
45+
- const: axi
46+
- const: block
47+
- const: timer
48+
49+
rockchip,txclk-tapnum:
50+
description: Specify the number of delay for tx sampling.
51+
$ref: /schemas/types.yaml#/definitions/uint8
52+
53+
54+
required:
55+
- compatible
56+
- reg
57+
- interrupts
58+
- clocks
59+
- clock-names
60+
61+
unevaluatedProperties: false
62+
63+
examples:
64+
- |
65+
mmc@fe310000 {
66+
compatible = "rockchip,rk3568-dwcmshc";
67+
reg = <0xfe310000 0x10000>;
68+
interrupts = <0 25 0x4>;
69+
clocks = <&cru 17>, <&cru 18>, <&cru 19>, <&cru 20>, <&cru 21>;
70+
clock-names = "core", "bus", "axi", "block", "timer";
71+
bus-width = <8>;
72+
#address-cells = <1>;
73+
#size-cells = <0>;
74+
};
75+
- |
76+
mmc@aa0000 {
77+
compatible = "snps,dwcmshc-sdhci";
78+
reg = <0xaa000 0x1000>;
79+
interrupts = <0 25 0x4>;
80+
clocks = <&cru 17>, <&cru 18>;
81+
clock-names = "core", "bus";
82+
bus-width = <8>;
83+
#address-cells = <1>;
84+
#size-cells = <0>;
85+
};
86+
87+
...

drivers/memstick/core/memstick.c

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -331,18 +331,17 @@ static int h_memstick_read_dev_id(struct memstick_dev *card,
331331
sizeof(struct ms_id_register));
332332
*mrq = &card->current_mrq;
333333
return 0;
334-
} else {
335-
if (!(*mrq)->error) {
336-
memcpy(&id_reg, (*mrq)->data, sizeof(id_reg));
337-
card->id.match_flags = MEMSTICK_MATCH_ALL;
338-
card->id.type = id_reg.type;
339-
card->id.category = id_reg.category;
340-
card->id.class = id_reg.class;
341-
dev_dbg(&card->dev, "if_mode = %02x\n", id_reg.if_mode);
342-
}
343-
complete(&card->mrq_complete);
344-
return -EAGAIN;
345334
}
335+
if (!(*mrq)->error) {
336+
memcpy(&id_reg, (*mrq)->data, sizeof(id_reg));
337+
card->id.match_flags = MEMSTICK_MATCH_ALL;
338+
card->id.type = id_reg.type;
339+
card->id.category = id_reg.category;
340+
card->id.class = id_reg.class;
341+
dev_dbg(&card->dev, "if_mode = %02x\n", id_reg.if_mode);
342+
}
343+
complete(&card->mrq_complete);
344+
return -EAGAIN;
346345
}
347346

348347
static int h_memstick_set_rw_addr(struct memstick_dev *card,

drivers/memstick/core/mspro_block.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,8 @@ static int mspro_block_resume(struct memstick_dev *card)
13821382

13831383
new_msb->card = card;
13841384
memstick_set_drvdata(card, new_msb);
1385-
if (mspro_block_init_card(card))
1385+
rc = mspro_block_init_card(card);
1386+
if (rc)
13861387
goto out_free;
13871388

13881389
for (cnt = 0; new_msb->attr_group.attrs[cnt]

drivers/memstick/host/r592.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,13 +359,15 @@ static void r592_write_fifo_pio(struct r592_device *dev,
359359
/* Flushes the temporary FIFO used to make aligned DWORD writes */
360360
static void r592_flush_fifo_write(struct r592_device *dev)
361361
{
362+
int ret;
362363
u8 buffer[4] = { 0 };
363-
int len;
364364

365365
if (kfifo_is_empty(&dev->pio_fifo))
366366
return;
367367

368-
len = kfifo_out(&dev->pio_fifo, buffer, 4);
368+
ret = kfifo_out(&dev->pio_fifo, buffer, 4);
369+
/* intentionally ignore __must_check return code */
370+
(void)ret;
369371
r592_write_reg_raw_be(dev, R592_FIFO_PIO, *(u32 *)buffer);
370372
}
371373

0 commit comments

Comments
 (0)