summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/u-boot/u-boot-2019.07/0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch
diff options
context:
space:
mode:
authorAndrei Gherzan <andrei@gherzan.ro>2019-07-19 16:17:38 +0100
committerAndrei Gherzan <andrei@gherzan.ro>2019-07-19 16:19:42 +0100
commit6531d1d0bb23f390066fe7cead2d95ad6ac4db72 (patch)
tree9ff35e976a9ec5f24f46168cd1931e948822e8fe /recipes-bsp/u-boot/u-boot-2019.07/0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch
parent03488c61599ddb8efdecd1a48c211d083ce4ea78 (diff)
downloadmeta-raspberrypi-ag/rpi4-uboot-update.tar.gz
u-boot: Update patches for RPi4ag/rpi4-uboot-update
After a review in upstream, some of the patches were modified. Most notable changes: 1. use directly the dtb passed by the firmware and make sure uboot doesn't tweak memory/reg 2. remove known unimplemented support (usb, eth etc.) 3. drop patches that are not needed anymore with the new firmware update (for example 0012-bcm283x-mbox-Correctly-wait-for-space-to-send.patch) Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-2019.07/0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch')
-rw-r--r--recipes-bsp/u-boot/u-boot-2019.07/0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch105
1 files changed, 105 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-2019.07/0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch b/recipes-bsp/u-boot/u-boot-2019.07/0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch
new file mode 100644
index 0000000..9b91c1b
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-2019.07/0002-ARM-bcm283x-Add-BCM283x_BASE-define.patch
@@ -0,0 +1,105 @@
1From 3908ffc61426fd35c6f917ba01aae2f138791259 Mon Sep 17 00:00:00 2001
2From: Matthias Brugger <mbrugger@suse.com>
3Date: Fri, 12 Jul 2019 18:20:53 +0200
4Subject: [PATCH 2/7] ARM: bcm283x: Add BCM283x_BASE define
5
6Devices of bcm283x have different base address, depending if they are on
7bcm2835 or bcm2836/7. Use BCM283x_BASE depending on the SoC you want to
8build and only add the offset in the header files.
9
10Signed-off-by: Matthias Brugger <mbrugger@suse.com>
11Signed-off-by: Andrei Gherzan <andrei@balena.io>
12Upstream-status: Pending
13---
14 arch/arm/mach-bcm283x/Kconfig | 5 +++++
15 arch/arm/mach-bcm283x/include/mach/mbox.h | 6 +-----
16 arch/arm/mach-bcm283x/include/mach/sdhci.h | 6 +-----
17 arch/arm/mach-bcm283x/include/mach/timer.h | 6 +-----
18 arch/arm/mach-bcm283x/include/mach/wdog.h | 6 +-----
19 5 files changed, 9 insertions(+), 20 deletions(-)
20
21diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig
22index 3eb5a9a897..8e69914a83 100644
23--- a/arch/arm/mach-bcm283x/Kconfig
24+++ b/arch/arm/mach-bcm283x/Kconfig
25@@ -141,4 +141,9 @@ config SYS_SOC
26 config SYS_CONFIG_NAME
27 default "rpi"
28
29+config BCM283x_BASE
30+ hex
31+ default "0x20000000" if BCM2835
32+ default "0x3f000000" if BCM2836 || BCM2837
33+
34 endmenu
35diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h
36index e3a893e49c..e44c7577da 100644
37--- a/arch/arm/mach-bcm283x/include/mach/mbox.h
38+++ b/arch/arm/mach-bcm283x/include/mach/mbox.h
39@@ -37,11 +37,7 @@
40
41 /* Raw mailbox HW */
42
43-#ifndef CONFIG_BCM2835
44-#define BCM2835_MBOX_PHYSADDR 0x3f00b880
45-#else
46-#define BCM2835_MBOX_PHYSADDR 0x2000b880
47-#endif
48+#define BCM2835_MBOX_PHYSADDR (CONFIG_BCM283x_BASE + 0x0000b880)
49
50 struct bcm2835_mbox_regs {
51 u32 read;
52diff --git a/arch/arm/mach-bcm283x/include/mach/sdhci.h b/arch/arm/mach-bcm283x/include/mach/sdhci.h
53index 5cb6ec3340..b443c379d8 100644
54--- a/arch/arm/mach-bcm283x/include/mach/sdhci.h
55+++ b/arch/arm/mach-bcm283x/include/mach/sdhci.h
56@@ -6,11 +6,7 @@
57 #ifndef _BCM2835_SDHCI_H_
58 #define _BCM2835_SDHCI_H_
59
60-#ifndef CONFIG_BCM2835
61-#define BCM2835_SDHCI_BASE 0x3f300000
62-#else
63-#define BCM2835_SDHCI_BASE 0x20300000
64-#endif
65+#define BCM2835_SDHCI_BASE (CONFIG_BCM283x_BASE + 0x00300000)
66
67 int bcm2835_sdhci_init(u32 regbase, u32 emmc_freq);
68
69diff --git a/arch/arm/mach-bcm283x/include/mach/timer.h b/arch/arm/mach-bcm283x/include/mach/timer.h
70index 56b0c356bb..014355e759 100644
71--- a/arch/arm/mach-bcm283x/include/mach/timer.h
72+++ b/arch/arm/mach-bcm283x/include/mach/timer.h
73@@ -6,11 +6,7 @@
74 #ifndef _BCM2835_TIMER_H
75 #define _BCM2835_TIMER_H
76
77-#ifndef CONFIG_BCM2835
78-#define BCM2835_TIMER_PHYSADDR 0x3f003000
79-#else
80-#define BCM2835_TIMER_PHYSADDR 0x20003000
81-#endif
82+#define BCM2835_TIMER_PHYSADDR (CONFIG_BCM283x_BASE + 0x00003000)
83
84 #define BCM2835_TIMER_CS_M3 (1 << 3)
85 #define BCM2835_TIMER_CS_M2 (1 << 2)
86diff --git a/arch/arm/mach-bcm283x/include/mach/wdog.h b/arch/arm/mach-bcm283x/include/mach/wdog.h
87index 99c88e5df7..00b5e06c3a 100644
88--- a/arch/arm/mach-bcm283x/include/mach/wdog.h
89+++ b/arch/arm/mach-bcm283x/include/mach/wdog.h
90@@ -6,11 +6,7 @@
91 #ifndef _BCM2835_WDOG_H
92 #define _BCM2835_WDOG_H
93
94-#ifndef CONFIG_BCM2835
95-#define BCM2835_WDOG_PHYSADDR 0x3f100000
96-#else
97-#define BCM2835_WDOG_PHYSADDR 0x20100000
98-#endif
99+#define BCM2835_WDOG_PHYSADDR (CONFIG_BCM283x_BASE + 0x00100000)
100
101 struct bcm2835_wdog_regs {
102 u32 unknown0[7];
103--
1042.22.0
105