]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
ARM: bcm283x: don't always define CONFIG_BCM2835
authorStephen Warren <swarren@wwwdotorg.org>
Thu, 17 Mar 2016 03:40:56 +0000 (21:40 -0600)
committerTom Rini <trini@konsulko.com>
Sun, 27 Mar 2016 13:12:20 +0000 (09:12 -0400)
Currently, CONFIG_BCM2835 is defined for all BCM283x builds and _BCM2836
is defined when building for that SoC. That means there isn't a single
define that means "exactly BCM2835". This will complicate future patches
where BCM2835-vs-anything-else needs to be determined simply.

Modify the code to define one or the other of CONFIG_BCM2835/BCM2836 so
future patches are simpler.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/arm/mach-bcm283x/include/mach/gpio.h
arch/arm/mach-bcm283x/include/mach/mbox.h
arch/arm/mach-bcm283x/include/mach/sdhci.h
arch/arm/mach-bcm283x/include/mach/timer.h
arch/arm/mach-bcm283x/include/mach/wdog.h
arch/arm/mach-bcm283x/phys2bus.c
board/raspberrypi/rpi/rpi.c
include/configs/rpi-common.h
include/configs/rpi.h

index c8ef8f528a21f1a23f4211f0d806fb22baf68a0c..e6e5d1605d0a317168342e2364e72374cda522ad 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef _BCM2835_GPIO_H_
 #define _BCM2835_GPIO_H_
 
-#ifdef CONFIG_BCM2836
+#ifndef CONFIG_BCM2835
 #define BCM2835_GPIO_BASE              0x3f200000
 #else
 #define BCM2835_GPIO_BASE              0x20200000
index 4a143917f0f8ed4a7b53345dfe4b040ad635abb5..627acb85dc8c6fe47eae25a8b3e6498dab1ab7a2 100644 (file)
@@ -38,7 +38,7 @@
 
 /* Raw mailbox HW */
 
-#ifdef CONFIG_BCM2836
+#ifndef CONFIG_BCM2835
 #define BCM2835_MBOX_PHYSADDR  0x3f00b880
 #else
 #define BCM2835_MBOX_PHYSADDR  0x2000b880
index 2a21ccbf66baea64fb58b5be9d8ba9c46c0d9029..64e582c114f5401d59b7b2f3efdcecbc008f4466 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef _BCM2835_SDHCI_H_
 #define _BCM2835_SDHCI_H_
 
-#ifdef CONFIG_BCM2836
+#ifndef CONFIG_BCM2835
 #define BCM2835_SDHCI_BASE 0x3f300000
 #else
 #define BCM2835_SDHCI_BASE 0x20300000
index 004c24be365a4721c8952e0cf542c013191b6bbf..2a85f230e86d53f96315f7665d8042bbce57f572 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef _BCM2835_TIMER_H
 #define _BCM2835_TIMER_H
 
-#ifdef CONFIG_BCM2836
+#ifndef CONFIG_BCM2835
 #define BCM2835_TIMER_PHYSADDR 0x3f003000
 #else
 #define BCM2835_TIMER_PHYSADDR 0x20003000
index cbc350e84b902ff1a80e7441692bef13f67acbbc..7741d7ba15584197baa22750e18e1afbb2a87c29 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef _BCM2835_WDOG_H
 #define _BCM2835_WDOG_H
 
-#ifdef CONFIG_BCM2836
+#ifndef CONFIG_BCM2835
 #define BCM2835_WDOG_PHYSADDR                  0x3f100000
 #else
 #define BCM2835_WDOG_PHYSADDR                  0x20100000
index fc1c29905de39db7aa34d3b81258c460ac49e188..8e9f49240ff7eab5a7527819841ddfa5fbc03840 100644 (file)
@@ -9,7 +9,7 @@
 
 unsigned long phys_to_bus(unsigned long phys)
 {
-#ifdef CONFIG_BCM2836
+#ifndef CONFIG_BCM2835
        return 0xc0000000 | phys;
 #else
        return 0x40000000 | phys;
index da4b6ff234d6ce2199a24d737d8687cd28b817ba..1fd7591f3325d9192923aff972dec85812c32ec1 100644 (file)
@@ -31,7 +31,7 @@ U_BOOT_DEVICE(bcm2835_gpios) = {
 };
 
 static const struct pl01x_serial_platdata serial_platdata = {
-#ifdef CONFIG_BCM2836
+#ifndef CONFIG_BCM2835
        .base = 0x3f201000,
 #else
        .base = 0x20201000,
index 7250e37a351724618112d36f3c1674b92563e4a4..89aee0a85b406b1c9dc6a42df06f07573736aa4b 100644 (file)
@@ -11,7 +11,6 @@
 #include <asm/arch/timer.h>
 
 /* Architecture, CPU, etc.*/
-#define CONFIG_BCM2835
 #define CONFIG_ARCH_CPU_INIT
 
 #define CONFIG_SYS_TIMER_RATE          1000000
@@ -26,7 +25,7 @@
  * chose to use someone else's previously registered machine ID (3139, MX51_GGC)
  * rather than obtaining a valid ID:-/
  */
-#ifndef CONFIG_BCM2836
+#ifdef CONFIG_BCM2835
 #define CONFIG_MACH_TYPE               MACH_TYPE_BCM2708
 #endif
 
@@ -80,7 +79,7 @@
 #define CONFIG_CMD_USB
 #ifdef CONFIG_CMD_USB
 #define CONFIG_USB_DWC2
-#ifdef CONFIG_BCM2836
+#ifndef CONFIG_BCM2835
 #define CONFIG_USB_DWC2_REG_ADDR 0x3f980000
 #else
 #define CONFIG_USB_DWC2_REG_ADDR 0x20980000
index 86422e390da2d966a15cf4b993c56f7e7966aa72..a788ce42e44c386b4eed71b0ac6a84e4a138bb44 100644 (file)
@@ -7,6 +7,7 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_BCM2835
 #define CONFIG_SYS_CACHELINE_SIZE              32
 
 #include "rpi-common.h"