bf0b19b30e682716fef6d3c59f8a17c1e91a4d16
[openwrt/staging/luka.git] /
1 From 8a58288d710a817b5dc7747f0bec1fb167368e7e Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Wed, 29 Aug 2018 09:05:15 +0100
4 Subject: [PATCH 533/806] mmc: bcm2835-sdhost: Support 64-bit physical
5 addresses
6
7 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
8 ---
9 drivers/mmc/host/bcm2835-sdhost.c | 10 ++++++----
10 1 file changed, 6 insertions(+), 4 deletions(-)
11
12 --- a/drivers/mmc/host/bcm2835-sdhost.c
13 +++ b/drivers/mmc/host/bcm2835-sdhost.c
14 @@ -148,7 +148,7 @@ struct bcm2835_host {
15 spinlock_t lock;
16
17 void __iomem *ioaddr;
18 - u32 bus_addr;
19 + phys_addr_t bus_addr;
20
21 struct mmc_host *mmc;
22
23 @@ -246,8 +246,8 @@ static void log_init(struct device *dev,
24 sdhost_log_buf = dma_zalloc_coherent(dev, LOG_SIZE, &sdhost_log_addr,
25 GFP_KERNEL);
26 if (sdhost_log_buf) {
27 - pr_info("sdhost: log_buf @ %p (%x)\n",
28 - sdhost_log_buf, (u32)sdhost_log_addr);
29 + pr_info("sdhost: log_buf @ %p (%llx)\n",
30 + sdhost_log_buf, (u64)sdhost_log_addr);
31 timer_base = ioremap_nocache(bus_to_phys + 0x7e003000, SZ_4K);
32 if (!timer_base)
33 pr_err("sdhost: failed to remap timer\n");
34 @@ -2024,6 +2024,7 @@ static int bcm2835_sdhost_probe(struct p
35 struct mmc_host *mmc;
36 const __be32 *addr;
37 u32 msg[3];
38 + int na;
39 int ret;
40
41 pr_debug("bcm2835_sdhost_probe\n");
42 @@ -2047,12 +2048,13 @@ static int bcm2835_sdhost_probe(struct p
43 goto err;
44 }
45
46 + na = of_n_addr_cells(node);
47 addr = of_get_address(node, 0, NULL, NULL);
48 if (!addr) {
49 dev_err(dev, "could not get DMA-register address\n");
50 return -ENODEV;
51 }
52 - host->bus_addr = be32_to_cpup(addr);
53 + host->bus_addr = (phys_addr_t)of_read_number(addr, na);
54 pr_debug(" - ioaddr %lx, iomem->start %lx, bus_addr %lx\n",
55 (unsigned long)host->ioaddr,
56 (unsigned long)iomem->start,