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>
#ifndef _BCM2835_GPIO_H_
#define _BCM2835_GPIO_H_
#ifndef _BCM2835_GPIO_H_
#define _BCM2835_GPIO_H_
#define BCM2835_GPIO_BASE 0x3f200000
#else
#define BCM2835_GPIO_BASE 0x20200000
#define BCM2835_GPIO_BASE 0x3f200000
#else
#define BCM2835_GPIO_BASE 0x20200000
#define BCM2835_MBOX_PHYSADDR 0x3f00b880
#else
#define BCM2835_MBOX_PHYSADDR 0x2000b880
#define BCM2835_MBOX_PHYSADDR 0x3f00b880
#else
#define BCM2835_MBOX_PHYSADDR 0x2000b880
#ifndef _BCM2835_SDHCI_H_
#define _BCM2835_SDHCI_H_
#ifndef _BCM2835_SDHCI_H_
#define _BCM2835_SDHCI_H_
#define BCM2835_SDHCI_BASE 0x3f300000
#else
#define BCM2835_SDHCI_BASE 0x20300000
#define BCM2835_SDHCI_BASE 0x3f300000
#else
#define BCM2835_SDHCI_BASE 0x20300000
#ifndef _BCM2835_TIMER_H
#define _BCM2835_TIMER_H
#ifndef _BCM2835_TIMER_H
#define _BCM2835_TIMER_H
#define BCM2835_TIMER_PHYSADDR 0x3f003000
#else
#define BCM2835_TIMER_PHYSADDR 0x20003000
#define BCM2835_TIMER_PHYSADDR 0x3f003000
#else
#define BCM2835_TIMER_PHYSADDR 0x20003000
#ifndef _BCM2835_WDOG_H
#define _BCM2835_WDOG_H
#ifndef _BCM2835_WDOG_H
#define _BCM2835_WDOG_H
#define BCM2835_WDOG_PHYSADDR 0x3f100000
#else
#define BCM2835_WDOG_PHYSADDR 0x20100000
#define BCM2835_WDOG_PHYSADDR 0x3f100000
#else
#define BCM2835_WDOG_PHYSADDR 0x20100000
unsigned long phys_to_bus(unsigned long phys)
{
unsigned long phys_to_bus(unsigned long phys)
{
return 0xc0000000 | phys;
#else
return 0x40000000 | phys;
return 0xc0000000 | phys;
#else
return 0x40000000 | phys;
};
static const struct pl01x_serial_platdata serial_platdata = {
};
static const struct pl01x_serial_platdata serial_platdata = {
.base = 0x3f201000,
#else
.base = 0x20201000,
.base = 0x3f201000,
#else
.base = 0x20201000,
#include <asm/arch/timer.h>
/* Architecture, CPU, etc.*/
#include <asm/arch/timer.h>
/* Architecture, CPU, etc.*/
#define CONFIG_ARCH_CPU_INIT
#define CONFIG_SYS_TIMER_RATE 1000000
#define CONFIG_ARCH_CPU_INIT
#define CONFIG_SYS_TIMER_RATE 1000000
* chose to use someone else's previously registered machine ID (3139, MX51_GGC)
* rather than obtaining a valid ID:-/
*/
* chose to use someone else's previously registered machine ID (3139, MX51_GGC)
* rather than obtaining a valid ID:-/
*/
#define CONFIG_MACH_TYPE MACH_TYPE_BCM2708
#endif
#define CONFIG_MACH_TYPE MACH_TYPE_BCM2708
#endif
#define CONFIG_CMD_USB
#ifdef CONFIG_CMD_USB
#define CONFIG_USB_DWC2
#define CONFIG_CMD_USB
#ifdef CONFIG_CMD_USB
#define CONFIG_USB_DWC2
#define CONFIG_USB_DWC2_REG_ADDR 0x3f980000
#else
#define CONFIG_USB_DWC2_REG_ADDR 0x20980000
#define CONFIG_USB_DWC2_REG_ADDR 0x3f980000
#else
#define CONFIG_USB_DWC2_REG_ADDR 0x20980000
#ifndef __CONFIG_H
#define __CONFIG_H
#ifndef __CONFIG_H
#define __CONFIG_H
#define CONFIG_SYS_CACHELINE_SIZE 32
#include "rpi-common.h"
#define CONFIG_SYS_CACHELINE_SIZE 32
#include "rpi-common.h"