ec9653b847
The BCM2835 is an ARM SoC from Broadcom. This patch adds very basic support for this SoC. http://www.broadcom.com/products/BCM2835 http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf Note that the documentation in the latter .pdf assumes the MMU setup that's used on the "VideoCore" companion processor, and does not document physical peripheral addresses. Subtract 0x5e000000 to obtain the physical addresses. This is accounted for by the ranges property in the /soc node in the device tree. The BCM2835 SoC is used in the Raspberry Pi. This patch also adds a minimal device tree for this board; enough to see some very early kernel boot messages through earlyprintk. However, this patch does not yet provide a useful booting system. http://www.raspberrypi.org/. This patch was extracted from git://github.com/lp0/linux.git branch rpi-split from 3-4 months ago, and significantly stripped down and modified since. Signed-off-by: Chris Boot <bootc@bootc.net> Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Dom Cobley <popcornmix@gmail.com> Signed-off-by: Dom Cobley <dc4@broadcom.com> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: Arnd Bergmann <arnd@arndb.de>
46 lines
1.2 KiB
C
46 lines
1.2 KiB
C
/*
|
|
* Copyright (C) 2010 Broadcom
|
|
* Copyright (C) 2003 ARM Limited
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#include <linux/io.h>
|
|
#include <linux/amba/serial.h>
|
|
#include <mach/bcm2835_soc.h>
|
|
|
|
#define UART0_BASE BCM2835_DEBUG_PHYS
|
|
|
|
#define BCM2835_UART_DR IOMEM(UART0_BASE + UART01x_DR)
|
|
#define BCM2835_UART_FR IOMEM(UART0_BASE + UART01x_FR)
|
|
#define BCM2835_UART_CR IOMEM(UART0_BASE + UART011_CR)
|
|
|
|
static inline void putc(int c)
|
|
{
|
|
while (__raw_readl(BCM2835_UART_FR) & UART01x_FR_TXFF)
|
|
barrier();
|
|
|
|
__raw_writel(c, BCM2835_UART_DR);
|
|
}
|
|
|
|
static inline void flush(void)
|
|
{
|
|
int fr;
|
|
|
|
do {
|
|
fr = __raw_readl(BCM2835_UART_FR);
|
|
barrier();
|
|
} while ((fr & (UART011_FR_TXFE | UART01x_FR_BUSY)) != UART011_FR_TXFE);
|
|
}
|
|
|
|
#define arch_decomp_setup()
|
|
#define arch_decomp_wdog()
|