diff options
author | Jonathan Gray <jsg@jsg.id.au> | 2018-03-17 16:15:48 +1100 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2018-04-05 13:17:43 +0200 |
commit | 8ae1f8298820a19380bafc07ad554bd629cc27be (patch) | |
tree | 3273708813ed59db52cdbd6c29904509c80eae44 /drivers | |
parent | 79153ff0c4383ff45d11be1e52ad94a1d24240f8 (diff) | |
download | u-boot-8ae1f8298820a19380bafc07ad554bd629cc27be.tar.gz u-boot-8ae1f8298820a19380bafc07ad554bd629cc27be.tar.xz u-boot-8ae1f8298820a19380bafc07ad554bd629cc27be.zip |
mmc: use core clock frequency in bcm2835 sdhost
In raspberrypi-firmware 7fdcd00e00a42a1c91e8bd6f5eb8352fe9358557 and
later start.elf now sets the EMMC clock to 200 MHz.
According to Phil Elwell in
https://github.com/raspberrypi/firmware/issues/953
the SDHost controller shares the core/VPU clock and doesn't use
the EMMC clock.
Use the core clock id when determining the frequency to allow
U-Boot to work with recent versions of raspberrypi-firmware.
Otherwise U-Boot hangs at:
U-Boot 2018.03 (Mar 14 2018 - 20:36:00 +1100)
DRAM: 948 MiB
RPI 3 Model B (0xa02082)
MMC: mmc@7e202000: 0, sdhci@7e300000: 1
Loading Environment from FAT...
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/bcm2835_sdhci.c | 2 | ||||
-rw-r--r-- | drivers/mmc/bcm2835_sdhost.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c index 3157354d2a..08bddd410e 100644 --- a/drivers/mmc/bcm2835_sdhci.c +++ b/drivers/mmc/bcm2835_sdhci.c @@ -183,7 +183,7 @@ static int bcm2835_sdhci_probe(struct udevice *dev) if (base == FDT_ADDR_T_NONE) return -EINVAL; - ret = bcm2835_get_mmc_clock(); + ret = bcm2835_get_mmc_clock(BCM2835_MBOX_CLOCK_ID_EMMC); if (ret < 0) { debug("%s: Failed to set MMC clock (err=%d)\n", __func__, ret); return ret; diff --git a/drivers/mmc/bcm2835_sdhost.c b/drivers/mmc/bcm2835_sdhost.c index 1bf52a3019..bccd182e50 100644 --- a/drivers/mmc/bcm2835_sdhost.c +++ b/drivers/mmc/bcm2835_sdhost.c @@ -35,6 +35,7 @@ #include <dm.h> #include <mmc.h> #include <asm/arch/msg.h> +#include <asm/arch/mbox.h> #include <asm/unaligned.h> #include <linux/compat.h> #include <linux/io.h> @@ -941,7 +942,7 @@ static int bcm2835_probe(struct udevice *dev) if (!host->ioaddr) return -ENOMEM; - host->max_clk = bcm2835_get_mmc_clock(); + host->max_clk = bcm2835_get_mmc_clock(BCM2835_MBOX_CLOCK_ID_CORE); bcm2835_add_host(host); |