From 0d04f34a357d004364b58159b64aad354e65137e Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Sun, 5 Aug 2012 16:07:22 +0000 Subject: ARM: add Raspberry Pi model B board, using BCM2835 SoC The Raspberry Pi model B uses the BCM2835 SoC, has 256MB of RAM, contains an SMSC 9512 USB LAN/Hub chip, and various IO connectors. For more details, see http://www.raspberrypi.org/. Various portions (cache enable, MACH_TYPE setup, RAM size limit, stack relocation to top of RAM) extracted from work by: Oleksandr Tymoshenko . GPIO driver enablement by Vikram Narayanan . Signed-off-by: Stephen Warren Acked-by: Tom Rini --- board/raspberrypi/rpi_b/Makefile | 34 ++++++++++++++++++++++++++++++++++ board/raspberrypi/rpi_b/rpi_b.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 board/raspberrypi/rpi_b/Makefile create mode 100644 board/raspberrypi/rpi_b/rpi_b.c (limited to 'board/raspberrypi/rpi_b') diff --git a/board/raspberrypi/rpi_b/Makefile b/board/raspberrypi/rpi_b/Makefile new file mode 100644 index 00000000000..9d0c377c1b0 --- /dev/null +++ b/board/raspberrypi/rpi_b/Makefile @@ -0,0 +1,34 @@ +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# 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 $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS := $(BOARD).o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +######################################################################### diff --git a/board/raspberrypi/rpi_b/rpi_b.c b/board/raspberrypi/rpi_b/rpi_b.c new file mode 100644 index 00000000000..688b0aade13 --- /dev/null +++ b/board/raspberrypi/rpi_b/rpi_b.c @@ -0,0 +1,34 @@ +/* + * (C) Copyright 2012 Stephen Warren + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * 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 +#include + +DECLARE_GLOBAL_DATA_PTR; + +int dram_init(void) +{ + gd->ram_size = CONFIG_SYS_SDRAM_SIZE; + + return 0; +} + +int board_init(void) +{ + gd->bd->bi_boot_params = 0x100; + + return 0; +} -- cgit v1.2.3