]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
bcm2836 SoC support (used in Raspberry Pi 2 model B)
authorStephen Warren <swarren@wwwdotorg.org>
Mon, 16 Feb 2015 19:16:14 +0000 (12:16 -0700)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 11:53:55 +0000 (13:53 +0200)
The bcm2835 and bcm2836 are essentially identical, except:
- The CPU is an ARM1176 v.s. a quad-core Cortex-A7.
- The physical address of many IO controllers has moved.

Rather than introducing a whole new bcm2836 value for $(SOC) or $(ARCH),
update the existing bcm2835 code to handle the minor differences, and
plumb it into the ARMv7 CPU architecture.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
arch/arm/cpu/armv7/Makefile
arch/arm/cpu/armv7/bcm2835/Makefile [new file with mode: 0644]
arch/arm/include/asm/arch-bcm2835/gpio.h
arch/arm/include/asm/arch-bcm2835/mbox.h
arch/arm/include/asm/arch-bcm2835/sdhci.h
arch/arm/include/asm/arch-bcm2835/timer.h
arch/arm/include/asm/arch-bcm2835/wdog.h

index 16be7a608b2d63580f1df09fa779c274c0145577..234f3f9ed807fbf49c145643a85ce7b5ddc50f1f 100644 (file)
@@ -39,6 +39,7 @@ endif
 
 obj-$(if $(filter am33xx,$(SOC)),y) += am33xx/
 obj-$(if $(filter armada-xp,$(SOC)),y) += armada-xp/
+obj-$(CONFIG_BCM2835) += bcm2835/
 obj-$(if $(filter bcm281xx,$(SOC)),y) += bcm281xx/
 obj-$(if $(filter bcmcygnus,$(SOC)),y) += bcmcygnus/
 obj-$(if $(filter bcmnsp,$(SOC)),y) += bcmnsp/
diff --git a/arch/arm/cpu/armv7/bcm2835/Makefile b/arch/arm/cpu/armv7/bcm2835/Makefile
new file mode 100644 (file)
index 0000000..ed1ee47
--- /dev/null
@@ -0,0 +1,13 @@
+#
+# (C) Copyright 2012 Stephen Warren
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+src_dir := ../../arm1176/bcm2835/
+
+obj-y  :=
+obj-y  += $(src_dir)/init.o
+obj-y  += $(src_dir)/reset.o
+obj-y  += $(src_dir)/timer.o
+obj-y  += $(src_dir)/mbox.o
index db42896201b321fb623af79c78a22addddf9de34..c8ef8f528a21f1a23f4211f0d806fb22baf68a0c 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2012 Vikram Narayananan
  * <vikram186@gmail.com>
+ * (C) Copyright 2012,2015 Stephen Warren
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
@@ -8,7 +9,11 @@
 #ifndef _BCM2835_GPIO_H_
 #define _BCM2835_GPIO_H_
 
+#ifdef CONFIG_BCM2836
+#define BCM2835_GPIO_BASE              0x3f200000
+#else
 #define BCM2835_GPIO_BASE              0x20200000
+#endif
 #define BCM2835_GPIO_COUNT             54
 
 #define BCM2835_GPIO_FSEL_MASK         0x7
index 88d2ec11a7c204e9f538f14d24edc60b5aa41fb1..c4bbacaf3c3fdcb3fc64bf85597db7aa3945a899 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2012 Stephen Warren
+ * (C) Copyright 2012,2015 Stephen Warren
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /* Raw mailbox HW */
 
+#ifdef CONFIG_BCM2836
+#define BCM2835_MBOX_PHYSADDR  0x3f00b880
+#else
 #define BCM2835_MBOX_PHYSADDR  0x2000b880
+#endif
 
 struct bcm2835_mbox_regs {
        u32 read;
index da4d5cd5a88f88a75ce729ae2c821a633bc9353e..2a21ccbf66baea64fb58b5be9d8ba9c46c0d9029 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2012 Stephen Warren
+ * (C) Copyright 2012,2015 Stephen Warren
  *
  * SPDX-License-Identifier:    GPL-2.0
  */
@@ -7,7 +7,11 @@
 #ifndef _BCM2835_SDHCI_H_
 #define _BCM2835_SDHCI_H_
 
+#ifdef CONFIG_BCM2836
+#define BCM2835_SDHCI_BASE 0x3f300000
+#else
 #define BCM2835_SDHCI_BASE 0x20300000
+#endif
 
 int bcm2835_sdhci_init(u32 regbase, u32 emmc_freq);
 
index 2d7cfe5c56f8f62e6aaa61c73f6296a0e579d350..fc7aec7b7c592f94adebbd58664cdf642f7e7919 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2012 Stephen Warren
+ * (C) Copyright 2012,2015 Stephen Warren
  *
  * SPDX-License-Identifier:    GPL-2.0
  */
@@ -7,7 +7,11 @@
 #ifndef _BCM2835_TIMER_H
 #define _BCM2835_TIMER_H
 
+#ifdef CONFIG_BCM2836
+#define BCM2835_TIMER_PHYSADDR 0x3f003000
+#else
 #define BCM2835_TIMER_PHYSADDR 0x20003000
+#endif
 
 struct bcm2835_timer_regs {
        u32 cs;
index f369ab589c9a64c77009bfbefc070bcdc3a4cc61..beb6a082060151590c3c9872a3f0ff3accf59c01 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2012 Stephen Warren
+ * (C) Copyright 2012,2015 Stephen Warren
  *
  * SPDX-License-Identifier:    GPL-2.0
  */
@@ -7,7 +7,11 @@
 #ifndef _BCM2835_TIMER_H
 #define _BCM2835_TIMER_H
 
+#ifdef CONFIG_BCM2836
+#define BCM2835_WDOG_PHYSADDR                  0x3f100000
+#else
 #define BCM2835_WDOG_PHYSADDR                  0x20100000
+#endif
 
 struct bcm2835_wdog_regs {
        u32 unknown0[7];