[PATCH 7/7] pcm051: Add inital support

Teresa Gámez t.gamez at phytec.de
Tue Dec 18 09:13:25 EST 2012


Added initial support for Phytec phyCORE-AM335x.

Signed-off-by: Teresa Gámez <t.gamez at phytec.de>
---
 arch/arm/Makefile                  |    1 +
 arch/arm/boards/pcm051/Makefile    |    1 +
 arch/arm/boards/pcm051/board.c     |   64 ++++++++++++++++++++++++++++++++++++
 arch/arm/boards/pcm051/config.h    |   21 ++++++++++++
 arch/arm/boards/pcm051/env/boot/sd |   10 ++++++
 arch/arm/boards/pcm051/env/config  |   22 ++++++++++++
 arch/arm/configs/pcm051_defconfig  |   56 +++++++++++++++++++++++++++++++
 arch/arm/mach-omap/Kconfig         |   10 ++++++
 8 files changed, 185 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/boards/pcm051/Makefile
 create mode 100644 arch/arm/boards/pcm051/board.c
 create mode 100644 arch/arm/boards/pcm051/config.h
 create mode 100644 arch/arm/boards/pcm051/env/boot/sd
 create mode 100644 arch/arm/boards/pcm051/env/config
 create mode 100644 arch/arm/configs/pcm051_defconfig

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 5082a13..487cc64 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -115,6 +115,7 @@ board-$(CONFIG_MACH_PCM027)			:= pcm027
 board-$(CONFIG_MACH_PCM037)			:= pcm037
 board-$(CONFIG_MACH_PCM038)			:= pcm038
 board-$(CONFIG_MACH_PCM043)			:= pcm043
+board-$(CONFIG_MACH_PCM051)			:= pcm051
 board-$(CONFIG_MACH_PM9261)			:= pm9261
 board-$(CONFIG_MACH_PM9263)			:= pm9263
 board-$(CONFIG_MACH_PM9G45)			:= pm9g45
diff --git a/arch/arm/boards/pcm051/Makefile b/arch/arm/boards/pcm051/Makefile
new file mode 100644
index 0000000..dcfc293
--- /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 0000000..ad76dc5
--- /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_ns16550_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 0000000..8b2b876
--- /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 0000000..f303c10
--- /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 0000000..dd35ff4
--- /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"
+
diff --git a/arch/arm/configs/pcm051_defconfig b/arch/arm/configs/pcm051_defconfig
new file mode 100644
index 0000000..4da0ed4
--- /dev/null
+++ b/arch/arm/configs/pcm051_defconfig
@@ -0,0 +1,56 @@
+CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_AM33XX=y
+CONFIG_OMAP_BUILD_IFT=y
+CONFIG_MACH_PCM051=y
+CONFIG_AEABI=y
+CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_ARM_UNWIND=y
+CONFIG_TEXT_BASE=0x81000000
+CONFIG_PROMPT="barebox at pcm051>"
+CONFIG_LONGHELP=y
+CONFIG_HUSH_FANCY_PROMPT=y
+CONFIG_CMDLINE_EDITING=y
+CONFIG_AUTO_COMPLETE=y
+CONFIG_MENU=y
+# CONFIG_TIMESTAMP is not set
+CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
+CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/pcm051/env"
+CONFIG_DEBUG_INFO=y
+CONFIG_ENABLE_FLASH_NOISE=y
+CONFIG_ENABLE_PARTITION_NOISE=y
+CONFIG_ENABLE_DEVICE_NOISE=y
+CONFIG_CMD_EDIT=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_SAVEENV=y
+CONFIG_CMD_EXPORT=y
+CONFIG_CMD_PRINTENV=y
+CONFIG_CMD_READLINE=y
+CONFIG_CMD_MENU=y
+CONFIG_CMD_MENU_MANAGEMENT=y
+CONFIG_CMD_ECHO_E=y
+CONFIG_CMD_LOADB=y
+CONFIG_CMD_CRC=y
+CONFIG_CMD_CRC_CMP=y
+CONFIG_CMD_MD5SUM=y
+CONFIG_CMD_FLASH=y
+CONFIG_CMD_BOOTM_SHOW_TYPE=y
+CONFIG_CMD_UIMAGE=y
+CONFIG_CMD_BOOTZ=y
+CONFIG_CMD_RESET=y
+CONFIG_CMD_GO=y
+CONFIG_CMD_TIMEOUT=y
+CONFIG_CMD_PARTITION=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_UNCOMPRESS=y
+CONFIG_DRIVER_SERIAL_NS16550=y
+CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
+# CONFIG_SPI is not set
+CONFIG_MTD=y
+CONFIG_NAND=y
+CONFIG_USB=y
+CONFIG_MCI=y
+CONFIG_MCI_STARTUP=y
+CONFIG_MCI_OMAP_HSMMC=y
+CONFIG_FS_FAT=y
+CONFIG_FS_FAT_WRITE=y
+CONFIG_FS_FAT_LFN=y
diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
index ae1e07e..c5bb3a3 100644
--- a/arch/arm/mach-omap/Kconfig
+++ b/arch/arm/mach-omap/Kconfig
@@ -112,6 +112,7 @@ config BOARDINFO
 	default "Phytec phyCORE pcm049" if MACH_PCM049
 	default "Phytec phyCARD-A-L1" if MACH_PCAAL1
 	default "Phytec phyCARD-A-XL2" if MACH_PCAAXL2
+	default "Phytec phyCORE-AM335x" if MACH_PCM051
 
 choice
 	prompt "Select OMAP board"
@@ -186,6 +187,15 @@ config MACH_PCAAXL2
 	help
 	  Say Y here if you are using a phyCARD-A-XL1 PCA-A-XL1
 
+config MACH_PCM051
+	bool "Phytec phyCORE pcm051"
+	select OMAP_CLOCK_ALL
+	select HAVE_NOSHELL
+	select HAVE_DEFAULT_ENVIRONMENT_NEW
+	depends on ARCH_AM33XX
+	help
+	  Say Y here if you are using Phytecs phyCORE pcm051 board
+
 endchoice
 
 if MACH_OMAP3EVM
-- 
1.7.0.4




More information about the barebox mailing list