summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/u-boot/u-boot-2019.07/0009-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch
diff options
context:
space:
mode:
authorAndrei Gherzan <andrei@gherzan.ro>2019-07-18 13:30:32 +0100
committerAndrei Gherzan <andrei@gherzan.ro>2019-07-18 15:20:46 +0100
commitfb6ec0aabf272eca1cf57e910cebe3532f1cafd8 (patch)
tree95a06d0a1b8d3aed9be2c6be20c20c92c5898de2 /recipes-bsp/u-boot/u-boot-2019.07/0009-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch
parent570bed8acfbaf2dfd99469909a6f01e5b9b3caed (diff)
downloadmeta-raspberrypi-ag/rpi4-misc.tar.gz
u-boot: Replace custom fork by patchesag/rpi4-misc
The upstream branch might suffer rebases due to effort of pushing the patches upstream. To avoid issues, let's have here the patches we need for RPi 4 support. Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-2019.07/0009-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch')
-rw-r--r--recipes-bsp/u-boot/u-boot-2019.07/0009-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0009-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch b/recipes-bsp/u-boot/u-boot-2019.07/0009-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch
new file mode 100644
index 0000000..762cb7e
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-2019.07/0009-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch
@@ -0,0 +1,53 @@
1From 8fd71dfaeab0ae350c8fa56b039eaafd577a1787 Mon Sep 17 00:00:00 2001
2From: Matthias Brugger <mbrugger@suse.com>
3Date: Wed, 10 Jul 2019 13:24:36 +0200
4Subject: [PATCH 09/12] mmc: bcm2835_sdhci: Add support for bcm2711 device
5
6The bcm2711 has two emmc controller. The difference is the clocks
7they use. Add support for the second emmc contoller.
8
9Signed-off-by: Matthias Brugger <mbrugger@suse.com>
10Signed-off-by: Andrei Gherzan <andrei@balena.io>
11Upstream-status: Pending
12---
13 drivers/mmc/bcm2835_sdhci.c | 12 ++++++++++--
14 1 file changed, 10 insertions(+), 2 deletions(-)
15
16diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
17index 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)
21 fdt_addr_t base;
22 int emmc_freq;
23 int ret;
24+ int clock_id = (int)dev_get_driver_data(dev);
25
26 base = devfdt_get_addr(dev);
27 if (base == FDT_ADDR_T_NONE)
28 return -EINVAL;
29
30- ret = bcm2835_get_mmc_clock(BCM2835_MBOX_CLOCK_ID_EMMC);
31+ ret = bcm2835_get_mmc_clock(clock_id);
32 if (ret < 0) {
33 debug("%s: Failed to set MMC clock (err=%d)\n", __func__, ret);
34 return ret;
35@@ -228,7 +229,14 @@ static int bcm2835_sdhci_probe(struct udevice *dev)
36 }
37
38 static const struct udevice_id bcm2835_sdhci_match[] = {
39- { .compatible = "brcm,bcm2835-sdhci" },
40+ {
41+ .compatible = "brcm,bcm2835-sdhci",
42+ .data = BCM2835_MBOX_CLOCK_ID_EMMC
43+ },
44+ {
45+ .compatible = "brcm,bcm2711-emmc2",
46+ .data = BCM2835_MBOX_CLOCK_ID_EMMC2
47+ },
48 { /* sentinel */ }
49 };
50
51--
522.22.0
53