openwrt/target/linux/bcm27xx/patches-4.19/950-0462-mmc-bcm2835-sdhost-Support-64-bit-physical-addresses.patch
Adrian Schmutzler 7d7aa2fd92 brcm2708: rename target to bcm27xx
This change makes the names of Broadcom targets consistent by using
the common notation based on SoC/CPU ID (which is used internally
anyway), bcmXXXX instead of brcmXXXX.
This is even used for target TITLE in make menuconfig already,
only the short target name used brcm so far.

Despite, since subtargets range from bcm2708 to bcm2711, it seems
appropriate to use bcm27xx instead of bcm2708 (again, as already done
for BOARDNAME).

This also renames the packages brcm2708-userland and brcm2708-gpu-fw.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Álvaro Fernández Rojas <noltari@gmail.com>
2020-02-14 14:10:51 +01:00

57 lines
1.7 KiB
Diff

From 8a58288d710a817b5dc7747f0bec1fb167368e7e Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Wed, 29 Aug 2018 09:05:15 +0100
Subject: [PATCH] mmc: bcm2835-sdhost: Support 64-bit physical
addresses
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
---
drivers/mmc/host/bcm2835-sdhost.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
--- a/drivers/mmc/host/bcm2835-sdhost.c
+++ b/drivers/mmc/host/bcm2835-sdhost.c
@@ -148,7 +148,7 @@ struct bcm2835_host {
spinlock_t lock;
void __iomem *ioaddr;
- u32 bus_addr;
+ phys_addr_t bus_addr;
struct mmc_host *mmc;
@@ -246,8 +246,8 @@ static void log_init(struct device *dev,
sdhost_log_buf = dma_zalloc_coherent(dev, LOG_SIZE, &sdhost_log_addr,
GFP_KERNEL);
if (sdhost_log_buf) {
- pr_info("sdhost: log_buf @ %p (%x)\n",
- sdhost_log_buf, (u32)sdhost_log_addr);
+ pr_info("sdhost: log_buf @ %p (%llx)\n",
+ sdhost_log_buf, (u64)sdhost_log_addr);
timer_base = ioremap_nocache(bus_to_phys + 0x7e003000, SZ_4K);
if (!timer_base)
pr_err("sdhost: failed to remap timer\n");
@@ -2024,6 +2024,7 @@ static int bcm2835_sdhost_probe(struct p
struct mmc_host *mmc;
const __be32 *addr;
u32 msg[3];
+ int na;
int ret;
pr_debug("bcm2835_sdhost_probe\n");
@@ -2047,12 +2048,13 @@ static int bcm2835_sdhost_probe(struct p
goto err;
}
+ na = of_n_addr_cells(node);
addr = of_get_address(node, 0, NULL, NULL);
if (!addr) {
dev_err(dev, "could not get DMA-register address\n");
return -ENODEV;
}
- host->bus_addr = be32_to_cpup(addr);
+ host->bus_addr = (phys_addr_t)of_read_number(addr, na);
pr_debug(" - ioaddr %lx, iomem->start %lx, bus_addr %lx\n",
(unsigned long)host->ioaddr,
(unsigned long)iomem->start,