diff options
author | Teresa Gámez <t.gamez@phytec.de> | 2012-12-20 15:22:34 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-12-21 08:31:19 +0100 |
commit | c0e211426033c0cd6d12639743b2eee0f302a5ca (patch) | |
tree | 93f90479484bdabe7997b8716ab6c70a77c65645 /arch/arm/boards/pcm051 | |
parent | 8eb8f4f77edc5724fe5a2d761e79fc1eee875bfb (diff) | |
download | barebox-c0e211426033c0cd6d12639743b2eee0f302a5ca.tar.gz barebox-c0e211426033c0cd6d12639743b2eee0f302a5ca.tar.xz |
pcm051: Add inital support
Added initial support for Phytec phyCORE-AM335x.
Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/pcm051')
-rw-r--r-- | arch/arm/boards/pcm051/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/boards/pcm051/board.c | 64 | ||||
-rw-r--r-- | arch/arm/boards/pcm051/config.h | 21 | ||||
-rw-r--r-- | arch/arm/boards/pcm051/env/boot/sd | 10 | ||||
-rw-r--r-- | arch/arm/boards/pcm051/env/config | 22 |
5 files changed, 118 insertions, 0 deletions
diff --git a/arch/arm/boards/pcm051/Makefile b/arch/arm/boards/pcm051/Makefile new file mode 100644 index 0000000000..dcfc2937d3 --- /dev/null +++ b/arch/arm/boards/pcm051/Makefile @@ -0,0 +1 @@ +obj-y += board.o diff --git a/arch/arm/boards/pcm051/board.c b/arch/arm/boards/pcm051/board.c new file mode 100644 index 0000000000..9739a2cb9e --- /dev/null +++ b/arch/arm/boards/pcm051/board.c @@ -0,0 +1,64 @@ +/* + * pcm051 - phyCORE-AM335x Board Initalization Code + * + * Copyright (C) 2012 Teresa Gámez, Phytec Messtechnik GmbH + * + * Based on arch/arm/boards/omap/board-beagle.c + * + * 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 <sizes.h> +#include <ns16550.h> +#include <asm/armlinux.h> +#include <generated/mach-types.h> +#include <mach/am33xx-devices.h> +#include <mach/am33xx-mux.h> +#include <mach/am33xx-silicon.h> + +/** + * @brief UART serial port initialization + * arch + * + * @return result of device registration + */ +static int pcm051_console_init(void) +{ + /* Register the serial port */ + am33xx_add_uart0(); + + return 0; +} +console_initcall(pcm051_console_init); + +static int pcm051_mem_init(void) +{ + omap_add_ram0(SZ_512M); + + return 0; +} +mem_initcall(pcm051_mem_init); + +static int pcm051_devices_init(void) +{ + enable_mmc0_pin_mux(); + + am33xx_add_mmc0(NULL); + + armlinux_set_bootparams((void *)(AM33XX_DRAM_ADDR_SPACE_START + 0x100)); + armlinux_set_architecture(MACH_TYPE_PCM051); + + return 0; +} +device_initcall(pcm051_devices_init); diff --git a/arch/arm/boards/pcm051/config.h b/arch/arm/boards/pcm051/config.h new file mode 100644 index 0000000000..8b2b87642e --- /dev/null +++ b/arch/arm/boards/pcm051/config.h @@ -0,0 +1,21 @@ +/** + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#endif /* __CONFIG_H */ diff --git a/arch/arm/boards/pcm051/env/boot/sd b/arch/arm/boards/pcm051/env/boot/sd new file mode 100644 index 0000000000..f303c104dc --- /dev/null +++ b/arch/arm/boards/pcm051/env/boot/sd @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ "$1" = menu ]; then + boot-menu-add-entry "$0" "kernel & rootfs on SD card" + exit +fi + +global.bootm.image=/boot/uImage +global.bootm.oftree=/boot/oftree +global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext3 rootwait" diff --git a/arch/arm/boards/pcm051/env/config b/arch/arm/boards/pcm051/env/config new file mode 100644 index 0000000000..dd35ff4cc0 --- /dev/null +++ b/arch/arm/boards/pcm051/env/config @@ -0,0 +1,22 @@ +#!/bin/sh + +# change network settings in /env/network/eth0 +# change mtd partition settings and automountpoints in /env/init/* + +global.hostname=pcm051 + +# set to false if you do not want to have colors +global.allow_color=true + +# user (used for network filenames) +global.user=none + +# timeout in seconds before the default boot entry is started +global.autoboot_timeout=3 + +# default boot entry (one of /env/boot/*) +global.boot.default=sd + +# base bootargs +global.linux.bootargs.base="console=ttyO0,115200n8" + |