1 From 1f42758fe69648340cfae6cae98e667b88923cf6 Mon Sep 17 00:00:00 2001
2 From: Matthias Brugger <mbrugger@suse.com>
3 Date: Wed, 10 Jul 2019 13:24:36 +0200
4 Subject: [PATCH 6/7] mmc: bcm2835_sdhci: Add support for bcm2711 device
6 The bcm2711 has two emmc controller. The difference is the clocks
7 they use. Add support for the second emmc contoller.
9 Signed-off-by: Matthias Brugger <mbrugger@suse.com>
10 Signed-off-by: Andrei Gherzan <andrei@balena.io>
11 Upstream-status: Pending
13 drivers/mmc/bcm2835_sdhci.c | 12 ++++++++++--
14 1 file changed, 10 insertions(+), 2 deletions(-)
16 diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
17 index 08bddd410e..e68dec3be7 100644
18 --- a/drivers/mmc/bcm2835_sdhci.c
19 +++ b/drivers/mmc/bcm2835_sdhci.c
20 @@ -178,12 +178,13 @@ static int bcm2835_sdhci_probe(struct udevice *dev)
24 + int clock_id = (int)dev_get_driver_data(dev);
26 base = devfdt_get_addr(dev);
27 if (base == FDT_ADDR_T_NONE)
30 - ret = bcm2835_get_mmc_clock(BCM2835_MBOX_CLOCK_ID_EMMC);
31 + ret = bcm2835_get_mmc_clock(clock_id);
33 debug("%s: Failed to set MMC clock (err=%d)\n", __func__, ret);
35 @@ -228,7 +229,14 @@ static int bcm2835_sdhci_probe(struct udevice *dev)
38 static const struct udevice_id bcm2835_sdhci_match[] = {
39 - { .compatible = "brcm,bcm2835-sdhci" },
41 + .compatible = "brcm,bcm2835-sdhci",
42 + .data = BCM2835_MBOX_CLOCK_ID_EMMC
45 + .compatible = "brcm,bcm2711-emmc2",
46 + .data = BCM2835_MBOX_CLOCK_ID_EMMC2