* Backport USB PCIe/XHCI patches to U-Boot 2020.07 Backport relevant patches required to make PCIe/USB XHCI work. * Backport/integrate PCIe device tree changes from upstream Linux U-Boot uses the device tree provided by upstream Linux. Make sure the device tree has the relevant chanages to make VL805 USB controller reset work. * Document RPi 4 USB mass storage support (#746)
77 lines
2.5 KiB
Diff
77 lines
2.5 KiB
Diff
From a326f58940f16b2dc3740fd9e87eb485da939ae5 Mon Sep 17 00:00:00 2001
|
|
Message-Id: <a326f58940f16b2dc3740fd9e87eb485da939ae5.1595101389.git.stefan@agner.ch>
|
|
In-Reply-To: <040a141f84f2f84bf8be18f85b4cdb34bf066df0.1595101389.git.stefan@agner.ch>
|
|
References: <040a141f84f2f84bf8be18f85b4cdb34bf066df0.1595101389.git.stefan@agner.ch>
|
|
From: Marek Szyprowski <m.szyprowski@samsung.com>
|
|
Date: Mon, 25 May 2020 13:39:55 +0200
|
|
Subject: [PATCH 06/20] rpi4: add a mapping for the PCIe XHCI controller MMIO
|
|
registers (ARM 64bit)
|
|
|
|
Create a non-cacheable mapping for the 0x600000000 physical memory region,
|
|
where MMIO registers for the PCIe XHCI controller are instantiated by the
|
|
PCIe bridge.
|
|
|
|
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
|
|
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
|
|
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
|
|
---
|
|
arch/arm/mach-bcm283x/init.c | 18 +++++++++++++++---
|
|
1 file changed, 15 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c
|
|
index f9a5209480..cf4c5b245d 100644
|
|
--- a/arch/arm/mach-bcm283x/init.c
|
|
+++ b/arch/arm/mach-bcm283x/init.c
|
|
@@ -12,10 +12,15 @@
|
|
#include <dm/device.h>
|
|
#include <fdt_support.h>
|
|
|
|
+#define BCM2711_RPI4_PCIE_XHCI_MMIO_PHYS 0x600000000UL
|
|
+#define BCM2711_RPI4_PCIE_XHCI_MMIO_SIZE 0x800000UL
|
|
+
|
|
#ifdef CONFIG_ARM64
|
|
#include <asm/armv8/mmu.h>
|
|
|
|
-static struct mm_region bcm283x_mem_map[] = {
|
|
+#define MEM_MAP_MAX_ENTRIES (4)
|
|
+
|
|
+static struct mm_region bcm283x_mem_map[MEM_MAP_MAX_ENTRIES] = {
|
|
{
|
|
.virt = 0x00000000UL,
|
|
.phys = 0x00000000UL,
|
|
@@ -35,7 +40,7 @@ static struct mm_region bcm283x_mem_map[] = {
|
|
}
|
|
};
|
|
|
|
-static struct mm_region bcm2711_mem_map[] = {
|
|
+static struct mm_region bcm2711_mem_map[MEM_MAP_MAX_ENTRIES] = {
|
|
{
|
|
.virt = 0x00000000UL,
|
|
.phys = 0x00000000UL,
|
|
@@ -49,6 +54,13 @@ static struct mm_region bcm2711_mem_map[] = {
|
|
.attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
|
PTE_BLOCK_NON_SHARE |
|
|
PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
|
+ }, {
|
|
+ .virt = BCM2711_RPI4_PCIE_XHCI_MMIO_PHYS,
|
|
+ .phys = BCM2711_RPI4_PCIE_XHCI_MMIO_PHYS,
|
|
+ .size = BCM2711_RPI4_PCIE_XHCI_MMIO_SIZE,
|
|
+ .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
|
|
+ PTE_BLOCK_NON_SHARE |
|
|
+ PTE_BLOCK_PXN | PTE_BLOCK_UXN
|
|
}, {
|
|
/* List terminator */
|
|
0,
|
|
@@ -72,7 +84,7 @@ static void _rpi_update_mem_map(struct mm_region *pd)
|
|
{
|
|
int i;
|
|
|
|
- for (i = 0; i < 2; i++) {
|
|
+ for (i = 0; i < MEM_MAP_MAX_ENTRIES; i++) {
|
|
mem_map[i].virt = pd[i].virt;
|
|
mem_map[i].phys = pd[i].phys;
|
|
mem_map[i].size = pd[i].size;
|
|
--
|
|
2.27.0
|
|
|