9
0
Fork 0

Raspberry-Pi: add support (board)

Tested-By: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Carlo Caione <carlo.caione@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Carlo Caione 2012-10-18 21:42:43 +02:00 committed by Sascha Hauer
parent 0a4762880d
commit 33f59d8a81
8 changed files with 122 additions and 0 deletions

View File

@ -113,6 +113,7 @@ board-$(CONFIG_MACH_PCM043) := pcm043
board-$(CONFIG_MACH_PM9261) := pm9261
board-$(CONFIG_MACH_PM9263) := pm9263
board-$(CONFIG_MACH_PM9G45) := pm9g45
board-$(CONFIG_MACH_RPI) := raspberry-pi
board-$(CONFIG_MACH_SCB9328) := scb9328
board-$(CONFIG_MACH_NESO) := guf-neso
board-$(CONFIG_MACH_MX23EVK) := freescale-mx23-evk

View File

@ -0,0 +1 @@
obj-$(CONFIG_MACH_RPI) += rpi.o

View File

@ -0,0 +1,4 @@
#ifndef __CONFIG_H
#define __CONFIG_H
#endif /* __CONFIG_H */

View File

@ -0,0 +1,8 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "Base bootargs"
exit
fi
global.linux.bootargs.base="console=ttymxc0,115200"

View File

@ -0,0 +1,8 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "hostname"
exit
fi
global.hostname=Raspberry-Pi

View File

@ -0,0 +1,44 @@
/*
* Copyright (C) 2009 Carlo Caione <carlo@carlocaione.org>
*
* 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 <common.h>
#include <init.h>
#include <asm/armlinux.h>
#include <generated/mach-types.h>
#include <mach/core.h>
static int rpi_mem_init(void)
{
bcm2835_add_device_sdram(0);
return 0;
}
mem_initcall(rpi_mem_init);
static int rpi_console_init(void)
{
bcm2835_register_uart();
return 0;
}
console_initcall(rpi_console_init);
static int rpi_devices_init(void)
{
armlinux_set_architecture(MACH_TYPE_BCM2708);
armlinux_set_bootparams((void *)(0x00000100));
return 0;
}
device_initcall(rpi_devices_init);

View File

@ -0,0 +1,41 @@
CONFIG_ARCH_BCM2835=y
CONFIG_GPIO_BCM2835=y
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
CONFIG_PROMPT="R-Pi> "
CONFIG_LONGHELP=y
CONFIG_GLOB=y
CONFIG_HUSH_FANCY_PROMPT=y
CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
CONFIG_MENU=y
CONFIG_PARTITION=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/raspberry-pi/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
CONFIG_CMD_LOADENV=y
CONFIG_CMD_EXPORT=y
CONFIG_CMD_PRINTENV=y
CONFIG_CMD_READLINE=y
CONFIG_CMD_MENU=y
CONFIG_CMD_MENU_MANAGEMENT=y
CONFIG_CMD_PASSWD=y
CONFIG_CMD_ECHO_E=y
CONFIG_CMD_LOADB=y
CONFIG_CMD_MEMINFO=y
CONFIG_CMD_MTEST=y
CONFIG_CMD_MTEST_ALTERNATIVE=y
CONFIG_CMD_BOOTM_ZLIB=y
CONFIG_CMD_BOOTM_BZLIB=y
CONFIG_CMD_BOOTM_SHOW_TYPE=y
CONFIG_CMD_RESET=y
CONFIG_CMD_CLK=y
CONFIG_CMD_GO=y
CONFIG_CMD_TIMEOUT=y
CONFIG_CMD_PARTITION=y
CONFIG_CMD_UNCOMPRESS=y
CONFIG_CMD_GPIO=y
CONFIG_SERIAL_AMBA_PL011=y
CONFIG_SHA1=y
CONFIG_SHA256=y

View File

@ -1,3 +1,18 @@
if ARCH_BCM2835
config ARCH_TEXT_BASE
hex
default 0x04000000 if MACH_RPI
config BOARDINFO
default "RaspberryPi (BCM2835/ARM1176JZF-S)" if MACH_RPI
choice
prompt "Broadcom Board type"
config MACH_RPI
bool "RaspberryPi (BCM2835/ARM1176JZF-S)"
endchoice
endif