diff options
-rw-r--r-- | Documentation/devicetree/bindings/mmc/ti-omap.txt | 54 | ||||
-rw-r--r-- | drivers/mmc/host/omap.c | 11 |
2 files changed, 64 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/mmc/ti-omap.txt b/Documentation/devicetree/bindings/mmc/ti-omap.txt new file mode 100644 index 000000000000..8de579969763 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/ti-omap.txt | |||
@@ -0,0 +1,54 @@ | |||
1 | * TI MMC host controller for OMAP1 and 2420 | ||
2 | |||
3 | The MMC Host Controller on TI OMAP1 and 2420 family provides | ||
4 | an interface for MMC, SD, and SDIO types of memory cards. | ||
5 | |||
6 | This file documents differences between the core properties described | ||
7 | by mmc.txt and the properties used by the omap mmc driver. | ||
8 | |||
9 | Note that this driver will not work with omap2430 or later omaps, | ||
10 | please see the omap hsmmc driver for the current omaps. | ||
11 | |||
12 | Required properties: | ||
13 | - compatible: Must be "ti,omap2420-mmc", for OMAP2420 controllers | ||
14 | - ti,hwmods: For 2420, must be "msdi<n>", where n is controller | ||
15 | instance starting 1 | ||
16 | |||
17 | Examples: | ||
18 | |||
19 | msdi1: mmc@4809c000 { | ||
20 | compatible = "ti,omap2420-mmc"; | ||
21 | ti,hwmods = "msdi1"; | ||
22 | reg = <0x4809c000 0x80>; | ||
23 | interrupts = <83>; | ||
24 | dmas = <&sdma 61 &sdma 62>; | ||
25 | dma-names = "tx", "rx"; | ||
26 | }; | ||
27 | |||
28 | * TI MMC host controller for OMAP1 and 2420 | ||
29 | |||
30 | The MMC Host Controller on TI OMAP1 and 2420 family provides | ||
31 | an interface for MMC, SD, and SDIO types of memory cards. | ||
32 | |||
33 | This file documents differences between the core properties described | ||
34 | by mmc.txt and the properties used by the omap mmc driver. | ||
35 | |||
36 | Note that this driver will not work with omap2430 or later omaps, | ||
37 | please see the omap hsmmc driver for the current omaps. | ||
38 | |||
39 | Required properties: | ||
40 | - compatible: Must be "ti,omap2420-mmc", for OMAP2420 controllers | ||
41 | - ti,hwmods: For 2420, must be "msdi<n>", where n is controller | ||
42 | instance starting 1 | ||
43 | |||
44 | Examples: | ||
45 | |||
46 | msdi1: mmc@4809c000 { | ||
47 | compatible = "ti,omap2420-mmc"; | ||
48 | ti,hwmods = "msdi1"; | ||
49 | reg = <0x4809c000 0x80>; | ||
50 | interrupts = <83>; | ||
51 | dmas = <&sdma 61 &sdma 62>; | ||
52 | dma-names = "tx", "rx"; | ||
53 | }; | ||
54 | |||
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 22995873f554..98b6b6ef7e5c 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
24 | #include <linux/timer.h> | 24 | #include <linux/timer.h> |
25 | #include <linux/of.h> | ||
25 | #include <linux/omap-dma.h> | 26 | #include <linux/omap-dma.h> |
26 | #include <linux/mmc/host.h> | 27 | #include <linux/mmc/host.h> |
27 | #include <linux/mmc/card.h> | 28 | #include <linux/mmc/card.h> |
@@ -1329,7 +1330,7 @@ static int mmc_omap_probe(struct platform_device *pdev) | |||
1329 | } | 1330 | } |
1330 | if (pdata->nr_slots == 0) { | 1331 | if (pdata->nr_slots == 0) { |
1331 | dev_err(&pdev->dev, "no slots\n"); | 1332 | dev_err(&pdev->dev, "no slots\n"); |
1332 | return -ENXIO; | 1333 | return -EPROBE_DEFER; |
1333 | } | 1334 | } |
1334 | 1335 | ||
1335 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1336 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
@@ -1502,12 +1503,20 @@ static int mmc_omap_remove(struct platform_device *pdev) | |||
1502 | return 0; | 1503 | return 0; |
1503 | } | 1504 | } |
1504 | 1505 | ||
1506 | #if IS_BUILTIN(CONFIG_OF) | ||
1507 | static const struct of_device_id mmc_omap_match[] = { | ||
1508 | { .compatible = "ti,omap2420-mmc", }, | ||
1509 | { }, | ||
1510 | }; | ||
1511 | #endif | ||
1512 | |||
1505 | static struct platform_driver mmc_omap_driver = { | 1513 | static struct platform_driver mmc_omap_driver = { |
1506 | .probe = mmc_omap_probe, | 1514 | .probe = mmc_omap_probe, |
1507 | .remove = mmc_omap_remove, | 1515 | .remove = mmc_omap_remove, |
1508 | .driver = { | 1516 | .driver = { |
1509 | .name = DRIVER_NAME, | 1517 | .name = DRIVER_NAME, |
1510 | .owner = THIS_MODULE, | 1518 | .owner = THIS_MODULE, |
1519 | .of_match_table = of_match_ptr(mmc_omap_match), | ||
1511 | }, | 1520 | }, |
1512 | }; | 1521 | }; |
1513 | 1522 | ||