diff options
author | Alexander Aring <alex.aring@gmail.com> | 2015-12-19 19:34:04 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-01-07 12:35:25 +0100 |
commit | 3a0f397e9c381ab9071754b6dbb44cb1cd39f55a (patch) | |
tree | 207655d9f8a50d47c472b5243a905b14a1e0c6f6 /arch/arm/mach-bcm283x/include | |
parent | 7e613c84cf01349f572e7a6a5e3b8f6633822ff7 (diff) | |
download | barebox-3a0f397e9c381ab9071754b6dbb44cb1cd39f55a.tar.gz barebox-3a0f397e9c381ab9071754b6dbb44cb1cd39f55a.tar.xz |
arm: bcm283x: add rpi2 support
This patch adds Raspberry Pi 2 support in barebox. The features should
be the same like the current RPi status in barebox.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-bcm283x/include')
-rw-r--r-- | arch/arm/mach-bcm283x/include/mach/mbox.h | 9 | ||||
-rw-r--r-- | arch/arm/mach-bcm283x/include/mach/platform.h | 9 |
2 files changed, 15 insertions, 3 deletions
diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h index 09b31f2e62..cd9ee1f434 100644 --- a/arch/arm/mach-bcm283x/include/mach/mbox.h +++ b/arch/arm/mach-bcm283x/include/mach/mbox.h @@ -11,6 +11,8 @@ #include <common.h> +#include <mach/platform.h> + /* * The BCM2835 SoC contains (at least) two CPUs; the VideoCore (a/k/a "GPU") * and the ARM CPU. The ARM CPU is often thought of as the main CPU. @@ -40,7 +42,7 @@ /* Raw mailbox HW */ -#define BCM2835_MBOX_PHYSADDR 0x2000b880 +#define BCM2835_MBOX_PHYSADDR (BCM2835_ARM_BASE + 0x880) struct bcm2835_mbox_regs { u32 read; @@ -73,8 +75,6 @@ struct bcm2835_mbox_hdr { #define BCM2835_MBOX_REQ_CODE 0 #define BCM2835_MBOX_RESP_CODE_SUCCESS 0x80000000 -#define BCM2835_CACHELINE_SIZE 32 - #define BCM2835_MBOX_STACK_ALIGN(type, name) \ STACK_ALIGN_ARRAY(type, name, 1, BCM2835_CACHELINE_SIZE) @@ -128,6 +128,9 @@ struct bcm2835_mbox_tag_hdr { #define BCM2835_MBOX_TAG_GET_BOARD_REV 0x00010002 +/* RPi 2 */ +#define BCM2836_BOARD_REV_2_B 0x4 + /* * 0x2..0xf from: * http://raspberryalphaomega.org.uk/2013/02/06/automatic-raspberry-pi-board-revision-detection-model-a-b1-and-b2/ diff --git a/arch/arm/mach-bcm283x/include/mach/platform.h b/arch/arm/mach-bcm283x/include/mach/platform.h index e55085a75b..3b73831aa5 100644 --- a/arch/arm/mach-bcm283x/include/mach/platform.h +++ b/arch/arm/mach-bcm283x/include/mach/platform.h @@ -28,7 +28,16 @@ * This file is manually generated. */ +#ifdef CONFIG_ARCH_BCM2835 #define BCM2835_PERI_BASE 0x20000000 +#define BCM2835_CACHELINE_SIZE 32 +#elif defined CONFIG_ARCH_BCM2836 +#define BCM2835_PERI_BASE 0x3f000000 +#define BCM2835_CACHELINE_SIZE 64 +#else +#error "no CONFIG_ARCH_BCM283X defined" +#endif + #define BCM2835_ST_BASE (BCM2835_PERI_BASE + 0x3000) /* System Timer */ #define BCM2835_DMA_BASE (BCM2835_PERI_BASE + 0x7000) /* DMA controller */ #define BCM2835_ARM_BASE (BCM2835_PERI_BASE + 0xB000) /* BCM2708 ARM control block */ |