mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCHv2 0/2] Add ARCH for AM33xx and phyCORE-AM335x support
@ 2012-09-25 12:18 Teresa Gámez
  2012-09-25 12:18 ` [PATCHv2 1/2] ARM OMAP AM33XX: create new ARCH for AM33xx Teresa Gámez
  2012-09-25 12:18 ` [PATCHv2 2/2] pcm051: Add inital support Teresa Gámez
  0 siblings, 2 replies; 5+ messages in thread
From: Teresa Gámez @ 2012-09-25 12:18 UTC (permalink / raw)
  To: barebox

This series is based on next-stable tag and tested with Jan Lübbes patch:
Makefile: add target to produce a SPL compatible uImage

v2:
- added generated defconfig
- removed global.boot.default and added boot.d/01 symlink
- created dmtimer0 header
- removed unnecessary cleanup
- use gpiolib

Teresa Gámez (2):
  ARM OMAP AM33XX: create new ARCH for AM33xx
  pcm051: Add inital support

 arch/arm/Makefile                                |    1 +
 arch/arm/boards/pcm051/Makefile                  |    1 +
 arch/arm/boards/pcm051/board.c                   |   72 ++++++++++++++++++++++
 arch/arm/boards/pcm051/config.h                  |   21 ++++++
 arch/arm/boards/pcm051/env/boot.d/01             |    1 +
 arch/arm/boards/pcm051/env/boot/disk             |   10 +++
 arch/arm/boards/pcm051/env/init/automount        |   32 ++++++++++
 arch/arm/boards/pcm051/env/init/bootargs-base    |    9 +++
 arch/arm/boards/pcm051/env/init/general          |   12 ++++
 arch/arm/boards/pcm051/env/init/hostname         |    8 +++
 arch/arm/boards/pcm051/env/network/eth0          |   15 +++++
 arch/arm/configs/pcm051_defconfig                |   56 +++++++++++++++++
 arch/arm/mach-omap/Kconfig                       |   21 ++++++
 arch/arm/mach-omap/Makefile                      |    2 +
 arch/arm/mach-omap/am33xx_generic.c              |   47 ++++++++++++++
 arch/arm/mach-omap/dmtimer0.c                    |   70 +++++++++++++++++++++
 arch/arm/mach-omap/include/mach/am33xx-clock.h   |   26 ++++++++
 arch/arm/mach-omap/include/mach/am33xx-silicon.h |   51 +++++++++++++++
 arch/arm/mach-omap/include/mach/clocks.h         |    3 +
 arch/arm/mach-omap/include/mach/dmtimer0.h       |   36 +++++++++++
 arch/arm/mach-omap/include/mach/silicon.h        |    3 +
 arch/arm/mach-omap/include/mach/timers.h         |    1 -
 drivers/mci/Kconfig                              |    2 +-
 23 files changed, 498 insertions(+), 2 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 120000 arch/arm/boards/pcm051/env/boot.d/01
 create mode 100644 arch/arm/boards/pcm051/env/boot/disk
 create mode 100644 arch/arm/boards/pcm051/env/init/automount
 create mode 100644 arch/arm/boards/pcm051/env/init/bootargs-base
 create mode 100644 arch/arm/boards/pcm051/env/init/general
 create mode 100644 arch/arm/boards/pcm051/env/init/hostname
 create mode 100644 arch/arm/boards/pcm051/env/network/eth0
 create mode 100644 arch/arm/configs/pcm051_defconfig
 create mode 100644 arch/arm/mach-omap/am33xx_generic.c
 create mode 100644 arch/arm/mach-omap/dmtimer0.c
 create mode 100644 arch/arm/mach-omap/include/mach/am33xx-clock.h
 create mode 100644 arch/arm/mach-omap/include/mach/am33xx-silicon.h
 create mode 100644 arch/arm/mach-omap/include/mach/dmtimer0.h


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCHv2 1/2] ARM OMAP AM33XX: create new ARCH for AM33xx
  2012-09-25 12:18 [PATCHv2 0/2] Add ARCH for AM33xx and phyCORE-AM335x support Teresa Gámez
@ 2012-09-25 12:18 ` Teresa Gámez
  2012-09-25 12:42   ` Jean-Christophe PLAGNIOL-VILLARD
  2012-09-25 12:18 ` [PATCHv2 2/2] pcm051: Add inital support Teresa Gámez
  1 sibling, 1 reply; 5+ messages in thread
From: Teresa Gámez @ 2012-09-25 12:18 UTC (permalink / raw)
  To: barebox

Created ARCH for AM33xx boards as second stage bootloader.
This includes:
- Added dmtimer0
- Created basic header files
- Added MMC support for ARCH_AM33XX
- Added reset function

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
---
 arch/arm/mach-omap/Kconfig                       |   11 ++++
 arch/arm/mach-omap/Makefile                      |    2 +
 arch/arm/mach-omap/am33xx_generic.c              |   47 +++++++++++++++
 arch/arm/mach-omap/dmtimer0.c                    |   70 ++++++++++++++++++++++
 arch/arm/mach-omap/include/mach/am33xx-clock.h   |   26 ++++++++
 arch/arm/mach-omap/include/mach/am33xx-silicon.h |   51 ++++++++++++++++
 arch/arm/mach-omap/include/mach/clocks.h         |    3 +
 arch/arm/mach-omap/include/mach/dmtimer0.h       |   36 +++++++++++
 arch/arm/mach-omap/include/mach/silicon.h        |    3 +
 arch/arm/mach-omap/include/mach/timers.h         |    1 -
 drivers/mci/Kconfig                              |    2 +-
 11 files changed, 250 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/mach-omap/am33xx_generic.c
 create mode 100644 arch/arm/mach-omap/dmtimer0.c
 create mode 100644 arch/arm/mach-omap/include/mach/am33xx-clock.h
 create mode 100644 arch/arm/mach-omap/include/mach/am33xx-silicon.h
 create mode 100644 arch/arm/mach-omap/include/mach/dmtimer0.h

diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
index f69a35d..4f5c905 100644
--- a/arch/arm/mach-omap/Kconfig
+++ b/arch/arm/mach-omap/Kconfig
@@ -45,12 +45,23 @@ config ARCH_OMAP4
 	help
 	  Say Y here if you are using Texas Instrument's OMAP4 based platform
 
+config ARCH_AM33XX
+	bool "AM33xx"
+	select CPU_V7
+	select GENERIC_GPIO
+	select OMAP_CLOCK_SOURCE_DMTIMER0
+	help
+	  Say Y here if you are using Texas Instrument's AM33xx based platform
+
 endchoice
 
 # Blind enable all possible clocks.. think twice before you do this.
 config OMAP_CLOCK_SOURCE_S32K
 	bool
 
+config OMAP_CLOCK_SOURCE_DMTIMER0
+	bool
+
 config OMAP3_CLOCK_CONFIG
 	prompt "Clock Configuration"
 	bool
diff --git a/arch/arm/mach-omap/Makefile b/arch/arm/mach-omap/Makefile
index f752bc7..882c7fc 100644
--- a/arch/arm/mach-omap/Makefile
+++ b/arch/arm/mach-omap/Makefile
@@ -18,10 +18,12 @@
 obj-$(CONFIG_ARCH_OMAP) += syslib.o
 pbl-$(CONFIG_ARCH_OMAP) += syslib.o
 obj-$(CONFIG_OMAP_CLOCK_SOURCE_S32K) += s32k_clksource.o
+obj-$(CONFIG_OMAP_CLOCK_SOURCE_DMTIMER0) += dmtimer0.o
 obj-$(CONFIG_ARCH_OMAP3) += omap3_core.o omap3_generic.o auxcr.o
 pbl-$(CONFIG_ARCH_OMAP3) += omap3_core.o omap3_generic.o auxcr.o
 obj-$(CONFIG_ARCH_OMAP4) += omap4_generic.o omap4_clock.o
 pbl-$(CONFIG_ARCH_OMAP4) += omap4_generic.o omap4_clock.o
+obj-$(CONFIG_ARCH_AM33XX) += am33xx_generic.o
 obj-$(CONFIG_OMAP3_CLOCK_CONFIG) += omap3_clock.o
 obj-$(CONFIG_OMAP_GPMC) += gpmc.o devices-gpmc-nand.o
 obj-$(CONFIG_SHELL_NONE) += xload.o
diff --git a/arch/arm/mach-omap/am33xx_generic.c b/arch/arm/mach-omap/am33xx_generic.c
new file mode 100644
index 0000000..12295f5
--- /dev/null
+++ b/arch/arm/mach-omap/am33xx_generic.c
@@ -0,0 +1,47 @@
+/*
+ * (C) Copyright 2012 Teresa Gámez, Phytec Messtechnik GmbH
+ *
+ * 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
+ */
+
+#include <common.h>
+#include <init.h>
+#include <io.h>
+#include <mach/silicon.h>
+#include <mach/clocks.h>
+#include <mach/gpio.h>
+
+void __noreturn reset_cpu(unsigned long addr)
+{
+	writel(PRM_RSTCTRL_RESET, PRM_REG(RSTCTRL));
+
+	while (1);
+}
+
+static int am33xx_gpio_init(void)
+{
+	add_generic_device("omap-gpio", 0, NULL, 0x44e07100,
+				0x1000, IORESOURCE_MEM, NULL);
+	add_generic_device("omap-gpio", 1, NULL, 0x4804c100,
+				0x1000, IORESOURCE_MEM, NULL);
+	add_generic_device("omap-gpio", 2, NULL, 0x481ac100,
+				0x1000, IORESOURCE_MEM, NULL);
+	add_generic_device("omap-gpio", 3, NULL, 0x481ae100,
+				0x1000, IORESOURCE_MEM, NULL);
+
+	return 0;
+}
+coredevice_initcall(am33xx_gpio_init);
diff --git a/arch/arm/mach-omap/dmtimer0.c b/arch/arm/mach-omap/dmtimer0.c
new file mode 100644
index 0000000..d768552
--- /dev/null
+++ b/arch/arm/mach-omap/dmtimer0.c
@@ -0,0 +1,70 @@
+/**
+ * @file
+ * @brief Support DMTimer0 counter
+ *
+ * FileName: arch/arm/mach-omap/dmtimer0.c
+ */
+/*
+ * This File is based on arch/arm/mach-omap/s32k_clksource.c
+ * (C) Copyright 2008
+ * Texas Instruments, <www.ti.com>
+ * Nishanth Menon <x0nishan@ti.com>
+ *
+ * (C) Copyright 2012 Teresa Gámez, Phytec Messtechnik GmbH
+ *
+ * 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
+ */
+
+#include <clock.h>
+#include <init.h>
+#include <io.h>
+#include <mach/silicon.h>
+#include <mach/dmtimer0.h>
+
+/**
+ * @brief Provide a simple counter read
+ *
+ * @return DMTimer0 counter
+ */
+static uint64_t dmtimer0_read(void)
+{
+	return readl(AM33XX_DMTIMER0_BASE + TCRR);
+}
+
+static struct clocksource dmtimer0_cs = {
+	.read	= dmtimer0_read,
+	.mask	= CLOCKSOURCE_MASK(32),
+	.shift	= 10,
+};
+
+/**
+ * @brief Initialize the Clock
+ *
+ * Enable dmtimer0.
+ *
+ * @return result of @ref init_clock
+ */
+static int dmtimer0_init(void)
+{
+	dmtimer0_cs.mult = clocksource_hz2mult(CLK_RC32K, dmtimer0_cs.shift);
+	/* Enable counter */
+	writel(0x3, AM33XX_DMTIMER0_BASE + TCLR);
+
+	return init_clock(&dmtimer0_cs);
+}
+
+/* Run me at boot time */
+core_initcall(dmtimer0_init);
diff --git a/arch/arm/mach-omap/include/mach/am33xx-clock.h b/arch/arm/mach-omap/include/mach/am33xx-clock.h
new file mode 100644
index 0000000..bb22908
--- /dev/null
+++ b/arch/arm/mach-omap/include/mach/am33xx-clock.h
@@ -0,0 +1,26 @@
+/*
+ * (C) Copyright 2012 Teresa Gámez, Phytec Messtechnik GmbH
+ *
+ * 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 _AM33XX_CLOCKS_H_
+#define _AM33XX_CLOCKS_H_
+
+/** PRM Clock Regs */
+#define PRM_REG(REGNAME)	(OMAP_PRM_BASE + PRM_##REGNAME)
+#define PRM_RSTCTRL		0x0f00
+
+#endif  /* endif _AM33XX_CLOCKS_H_ */
diff --git a/arch/arm/mach-omap/include/mach/am33xx-silicon.h b/arch/arm/mach-omap/include/mach/am33xx-silicon.h
new file mode 100644
index 0000000..7b13991
--- /dev/null
+++ b/arch/arm/mach-omap/include/mach/am33xx-silicon.h
@@ -0,0 +1,51 @@
+/*
+ * This file contains the address info for various AM33XX modules.
+ *
+ * Copyright (C) 2012 Teresa Gámez <t.gamez@phytec.de>,
+ *		 Phytec Messtechnik GmbH
+ *
+ * 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 version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __ASM_ARCH_AM33XX_H
+#define __ASM_ARCH_AM33XX_H
+
+/** AM335x Internal Bus Base addresses */
+#define AM33XX_L4_WKUP_BASE		0x44C00000
+#define AM33XX_L4_PER_BASE		0x48000000
+#define AM33XX_L4_FAST_BASE		0x4A000000
+
+/* UART */
+#define AM33XX_UART0_BASE		(AM33XX_L4_WKUP_BASE + 0x209000)
+#define AM33XX_UART1_BASE		(AM33XX_L4_PER_BASE + 0x22000)
+#define AM33XX_UART2_BASE		(AM33XX_L4_PER_BASE + 0x24000)
+
+
+/* EMFI Registers */
+#define AM33XX_EMFI0_BASE		0x4C000000
+
+#define AM33XX_DRAM_ADDR_SPACE_START	0x80000000
+#define AM33XX_DRAM_ADDR_SPACE_END	0xC0000000
+
+/* GPMC */
+#define OMAP_GPMC_BASE			0x50000000
+
+/* MMC */
+#define AM33XX_MMCHS0_BASE		(AM33XX_L4_PER_BASE + 0x60000)
+
+/* DTMTimer0 */
+#define AM33XX_DMTIMER0_BASE		(AM33XX_L4_WKUP_BASE + 0x205000)
+
+/* PRM */
+#define OMAP_PRM_BASE			(AM33XX_L4_WKUP_BASE + 0x200000)
+
+#define PRM_RSTCTRL_RESET		0x1
+
+#endif
diff --git a/arch/arm/mach-omap/include/mach/clocks.h b/arch/arm/mach-omap/include/mach/clocks.h
index b2b0c99..4e50204 100644
--- a/arch/arm/mach-omap/include/mach/clocks.h
+++ b/arch/arm/mach-omap/include/mach/clocks.h
@@ -43,5 +43,8 @@
 #ifdef CONFIG_ARCH_OMAP4
 #include <mach/omap4-clock.h>
 #endif
+#ifdef CONFIG_ARCH_AM33XX
+#include <mach/am33xx-clock.h>
+#endif
 
 #endif /* __OMAP_CLOCKS_H_ */
diff --git a/arch/arm/mach-omap/include/mach/dmtimer0.h b/arch/arm/mach-omap/include/mach/dmtimer0.h
new file mode 100644
index 0000000..3e4d5e7
--- /dev/null
+++ b/arch/arm/mach-omap/include/mach/dmtimer0.h
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ *
+ */
+
+#ifndef __ASM_ARCH_DMTIMER0_H
+#define __ASM_ARCH_DMTIMER0_H
+
+#define TIDR			0x0
+#define TIOCP_CFG		0x10
+#define IRQ_EOI			0x20
+#define IRQSTATUS_RAW		0x24
+#define IRQSTATUS		0x28
+#define IRQSTATUS_SET		0x2c
+#define IRQSTATUS_CLR		0x30
+#define IRQWAKEEN		0x34
+#define TCLR			0x38
+#define TCRR			0x3C
+#define TLDR			0x40
+#define TTGR			0x44
+#define TWPS			0x48
+#define TMAR			0x4C
+#define TCAR1			0x50
+#define TSICR			0x54
+#define TCAR2			0x58
+
+#define CLK_RC32K		32768
+#endif
diff --git a/arch/arm/mach-omap/include/mach/silicon.h b/arch/arm/mach-omap/include/mach/silicon.h
index 5ee1931..ff30ad9 100644
--- a/arch/arm/mach-omap/include/mach/silicon.h
+++ b/arch/arm/mach-omap/include/mach/silicon.h
@@ -24,6 +24,9 @@
 #ifdef CONFIG_ARCH_OMAP4
 #include <mach/omap4-silicon.h>
 #endif
+#ifdef CONFIG_ARCH_AM33XX
+#include <mach/am33xx-silicon.h>
+#endif
 
 /* If Architecture specific init functions are present */
 #ifndef __ASSEMBLY__
diff --git a/arch/arm/mach-omap/include/mach/timers.h b/arch/arm/mach-omap/include/mach/timers.h
index e8dad9a..343be94 100644
--- a/arch/arm/mach-omap/include/mach/timers.h
+++ b/arch/arm/mach-omap/include/mach/timers.h
@@ -52,5 +52,4 @@
 /** Sync 32Khz Timer registers */
 #define S32K_CR			(OMAP_32KTIMER_BASE + 0x10)
 #define S32K_FREQUENCY		32768
-
 #endif /*__ASM_ARCH_GPT_H */
diff --git a/drivers/mci/Kconfig b/drivers/mci/Kconfig
index b1a678e..fb95c1e 100644
--- a/drivers/mci/Kconfig
+++ b/drivers/mci/Kconfig
@@ -67,7 +67,7 @@ config MCI_IMX_ESDHC_PIO
 
 config MCI_OMAP_HSMMC
 	bool "OMAP HSMMC"
-	depends on ARCH_OMAP4 || ARCH_OMAP3
+	depends on ARCH_OMAP4 || ARCH_OMAP3 || ARCH_AM33XX
 	help
 	  Enable this entry to add support to read and write SD cards on
 	  both OMAP3 and OMAP4 based systems.
-- 
1.7.0.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCHv2 2/2] pcm051: Add inital support
  2012-09-25 12:18 [PATCHv2 0/2] Add ARCH for AM33xx and phyCORE-AM335x support Teresa Gámez
  2012-09-25 12:18 ` [PATCHv2 1/2] ARM OMAP AM33XX: create new ARCH for AM33xx Teresa Gámez
@ 2012-09-25 12:18 ` Teresa Gámez
  2012-09-25 12:40   ` Jean-Christophe PLAGNIOL-VILLARD
  1 sibling, 1 reply; 5+ messages in thread
From: Teresa Gámez @ 2012-09-25 12:18 UTC (permalink / raw)
  To: barebox

Added initial support for Phytec phyCORE-AM335x.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
---
 arch/arm/Makefile                             |    1 +
 arch/arm/boards/pcm051/Makefile               |    1 +
 arch/arm/boards/pcm051/board.c                |   72 +++++++++++++++++++++++++
 arch/arm/boards/pcm051/config.h               |   21 +++++++
 arch/arm/boards/pcm051/env/boot.d/01          |    1 +
 arch/arm/boards/pcm051/env/boot/disk          |   10 ++++
 arch/arm/boards/pcm051/env/init/automount     |   32 +++++++++++
 arch/arm/boards/pcm051/env/init/bootargs-base |    9 +++
 arch/arm/boards/pcm051/env/init/general       |   12 ++++
 arch/arm/boards/pcm051/env/init/hostname      |    8 +++
 arch/arm/boards/pcm051/env/network/eth0       |   15 +++++
 arch/arm/configs/pcm051_defconfig             |   56 +++++++++++++++++++
 arch/arm/mach-omap/Kconfig                    |   10 ++++
 13 files changed, 248 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 120000 arch/arm/boards/pcm051/env/boot.d/01
 create mode 100644 arch/arm/boards/pcm051/env/boot/disk
 create mode 100644 arch/arm/boards/pcm051/env/init/automount
 create mode 100644 arch/arm/boards/pcm051/env/init/bootargs-base
 create mode 100644 arch/arm/boards/pcm051/env/init/general
 create mode 100644 arch/arm/boards/pcm051/env/init/hostname
 create mode 100644 arch/arm/boards/pcm051/env/network/eth0
 create mode 100644 arch/arm/configs/pcm051_defconfig

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 208f0f4..821405f 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -109,6 +109,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..7cb85f1
--- /dev/null
+++ b/arch/arm/boards/pcm051/board.c
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ *
+ * 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
+ */
+
+#include <common.h>
+#include <init.h>
+#include <sizes.h>
+#include <ns16550.h>
+#include <asm/armlinux.h>
+#include <generated/mach-types.h>
+#include <mach/silicon.h>
+
+static struct NS16550_plat serial_plat = {
+	.clock = 48000000,      /* 48MHz (APLL96/2) */
+	.shift = 2,
+};
+
+/**
+ * @brief UART serial port initialization
+ * arch
+ *
+ * @return result of device registration
+ */
+static int pcm051_console_init(void)
+{
+	/* Register the serial port */
+	add_ns16550_device(DEVICE_ID_DYNAMIC, AM33XX_UART0_BASE, 1024,
+				IORESOURCE_MEM_8BIT, &serial_plat);
+
+	return 0;
+}
+console_initcall(pcm051_console_init);
+
+static int pcm051_mem_init(void)
+{
+	arm_add_mem_device("ram0", AM33XX_DRAM_ADDR_SPACE_START, SZ_512M);
+
+	return 0;
+}
+mem_initcall(pcm051_mem_init);
+
+static int pcm051_devices_init(void)
+{
+	add_generic_device("omap-hsmmc", DEVICE_ID_DYNAMIC, NULL,
+				(AM33XX_MMCHS0_BASE + 0x100), SZ_4K,
+				IORESOURCE_MEM, 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.d/01 b/arch/arm/boards/pcm051/env/boot.d/01
new file mode 120000
index 0000000..fabd071
--- /dev/null
+++ b/arch/arm/boards/pcm051/env/boot.d/01
@@ -0,0 +1 @@
+../boot/disk
\ No newline at end of file
diff --git a/arch/arm/boards/pcm051/env/boot/disk b/arch/arm/boards/pcm051/env/boot/disk
new file mode 100644
index 0000000..c627991
--- /dev/null
+++ b/arch/arm/boards/pcm051/env/boot/disk
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+	boot-menu-add-entry "$0" "SD Card"
+	exit
+fi
+
+global.bootm.image="/mnt/fat/linuximage"
+#global.bootm.oftree="/env/oftree"
+bootargs-root-disk -p mmcblk0p2 -t ext3
diff --git a/arch/arm/boards/pcm051/env/init/automount b/arch/arm/boards/pcm051/env/init/automount
new file mode 100644
index 0000000..644a793
--- /dev/null
+++ b/arch/arm/boards/pcm051/env/init/automount
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+	init-menu-add-entry "$0" "Automountpoints"
+	exit
+fi
+
+# automount server returned from dhcp server
+
+#mkdir -p /mnt/tftp-dhcp
+#automount /mnt/tftp-dhcp 'ifup eth0 && mount $eth0.serverip tftp /mnt/tftp-dhcp'
+
+# automount nfs server example
+
+#nfshost=somehost
+#mkdir -p /mnt/${nfshost}
+#automount /mnt/$nfshost "ifup eth0 && mount ${nfshost}:/tftpboot nfs /mnt/${nfshost}"
+
+# static tftp server example
+
+#mkdir -p /mnt/tftp
+#automount -d /mnt/tftp 'ifup eth0 && mount $serverip tftp /mnt/tftp'
+
+# FAT on usb disk example
+
+#mkdir -p /mnt/fat
+#automount -d /mnt/fat 'usb && [ -e /dev/disk0.0 ] && mount /dev/disk0.0 /mnt/fat'
+
+# FAT on mmc card
+
+mkdir -p /mnt/fat
+automount -d /mnt/fat '[ -e /dev/disk0.0 ] && mount /dev/disk0.0 /mnt/fat'
diff --git a/arch/arm/boards/pcm051/env/init/bootargs-base b/arch/arm/boards/pcm051/env/init/bootargs-base
new file mode 100644
index 0000000..b3139b9
--- /dev/null
+++ b/arch/arm/boards/pcm051/env/init/bootargs-base
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+	init-menu-add-entry "$0" "Base bootargs"
+	exit
+fi
+
+global.linux.bootargs.base="console=ttyO0,115200"
+bootargs-ip
diff --git a/arch/arm/boards/pcm051/env/init/general b/arch/arm/boards/pcm051/env/init/general
new file mode 100644
index 0000000..4c0d324
--- /dev/null
+++ b/arch/arm/boards/pcm051/env/init/general
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+	init-menu-add-entry "$0" "general config settings"
+	exit
+fi
+
+# user (used for network filenames)
+global.user=
+
+# timeout in seconds before the default boot entry is started
+global.autoboot_timeout=3
diff --git a/arch/arm/boards/pcm051/env/init/hostname b/arch/arm/boards/pcm051/env/init/hostname
new file mode 100644
index 0000000..3ea1e0a
--- /dev/null
+++ b/arch/arm/boards/pcm051/env/init/hostname
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+	init-menu-add-entry "$0" "hostname"
+	exit
+fi
+
+global.hostname=pcm051
diff --git a/arch/arm/boards/pcm051/env/network/eth0 b/arch/arm/boards/pcm051/env/network/eth0
new file mode 100644
index 0000000..818b9f1
--- /dev/null
+++ b/arch/arm/boards/pcm051/env/network/eth0
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# ip setting (static/dhcp)
+ip=dhcp
+
+# static setup used if ip=static
+#ipaddr=
+#netmask=
+#gateway=
+#serverip=
+
+# MAC address if needed
+#ethaddr=xx:xx:xx:xx:xx:xx
+
+# put code to discover eth0 (i.e. 'usb') to /env/network/eth0-discover
diff --git a/arch/arm/configs/pcm051_defconfig b/arch/arm/configs/pcm051_defconfig
new file mode 100644
index 0000000..6c7a950
--- /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_AEABI=y
+CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_ARM_UNWIND=y
+CONFIG_TEXT_BASE=0x81000000
+CONFIG_PROMPT="barebox> "
+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_NANDTEST=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 4f5c905..841a178 100644
--- a/arch/arm/mach-omap/Kconfig
+++ b/arch/arm/mach-omap/Kconfig
@@ -97,6 +97,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"
@@ -153,6 +154,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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCHv2 2/2] pcm051: Add inital support
  2012-09-25 12:18 ` [PATCHv2 2/2] pcm051: Add inital support Teresa Gámez
@ 2012-09-25 12:40   ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 5+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-09-25 12:40 UTC (permalink / raw)
  To: Teresa Gámez; +Cc: barebox

On 14:18 Tue 25 Sep     , Teresa Gámez wrote:
> Added initial support for Phytec phyCORE-AM335x.
> 
> Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
> ---
>  arch/arm/Makefile                             |    1 +
>  arch/arm/boards/pcm051/Makefile               |    1 +
>  arch/arm/boards/pcm051/board.c                |   72 +++++++++++++++++++++++++
>  arch/arm/boards/pcm051/config.h               |   21 +++++++
>  arch/arm/boards/pcm051/env/boot.d/01          |    1 +
>  arch/arm/boards/pcm051/env/boot/disk          |   10 ++++
>  arch/arm/boards/pcm051/env/init/automount     |   32 +++++++++++
>  arch/arm/boards/pcm051/env/init/bootargs-base |    9 +++
>  arch/arm/boards/pcm051/env/init/general       |   12 ++++
>  arch/arm/boards/pcm051/env/init/hostname      |    8 +++
>  arch/arm/boards/pcm051/env/network/eth0       |   15 +++++
>  arch/arm/configs/pcm051_defconfig             |   56 +++++++++++++++++++
>  arch/arm/mach-omap/Kconfig                    |   10 ++++
>  13 files changed, 248 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 120000 arch/arm/boards/pcm051/env/boot.d/01
>  create mode 100644 arch/arm/boards/pcm051/env/boot/disk
>  create mode 100644 arch/arm/boards/pcm051/env/init/automount
>  create mode 100644 arch/arm/boards/pcm051/env/init/bootargs-base
>  create mode 100644 arch/arm/boards/pcm051/env/init/general
>  create mode 100644 arch/arm/boards/pcm051/env/init/hostname
>  create mode 100644 arch/arm/boards/pcm051/env/network/eth0
>  create mode 100644 arch/arm/configs/pcm051_defconfig
> 
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 208f0f4..821405f 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -109,6 +109,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..7cb85f1
> --- /dev/null
> +++ b/arch/arm/boards/pcm051/board.c
> @@ -0,0 +1,72 @@
> +/*
> + * 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.
> + *
> + * 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
> + */
> +
> +#include <common.h>
> +#include <init.h>
> +#include <sizes.h>
> +#include <ns16550.h>
> +#include <asm/armlinux.h>
> +#include <generated/mach-types.h>
> +#include <mach/silicon.h>
> +
> +static struct NS16550_plat serial_plat = {
> +	.clock = 48000000,      /* 48MHz (APLL96/2) */
> +	.shift = 2,
> +};
> +
> +/**
> + * @brief UART serial port initialization
> + * arch
> + *
> + * @return result of device registration
> + */
> +static int pcm051_console_init(void)
> +{
> +	/* Register the serial port */
> +	add_ns16550_device(DEVICE_ID_DYNAMIC, AM33XX_UART0_BASE, 1024,
> +				IORESOURCE_MEM_8BIT, &serial_plat);
can you create inline function as done on imx or at91 to add devices so do not
dupliacte this across boards
> +
> +	return 0;
> +}
> +console_initcall(pcm051_console_init);
> +
> +static int pcm051_mem_init(void)
> +{
> +	arm_add_mem_device("ram0", AM33XX_DRAM_ADDR_SPACE_START, SZ_512M);
ditto

and can we detect the size fo the sdram?
> +
> +	return 0;
> +}
> +mem_initcall(pcm051_mem_init);
> +
> +static int pcm051_devices_init(void)
> +{
> +	add_generic_device("omap-hsmmc", DEVICE_ID_DYNAMIC, NULL,
> +				(AM33XX_MMCHS0_BASE + 0x100), SZ_4K,
> +				IORESOURCE_MEM, NULL);
ditto
> +
> +	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.d/01 b/arch/arm/boards/pcm051/env/boot.d/01
> new file mode 120000
> index 0000000..fabd071
> --- /dev/null
> +++ b/arch/arm/boards/pcm051/env/boot.d/01
> @@ -0,0 +1 @@
> +../boot/disk
> \ No newline at end of file
> diff --git a/arch/arm/boards/pcm051/env/boot/disk b/arch/arm/boards/pcm051/env/boot/disk
> new file mode 100644
> index 0000000..c627991
> --- /dev/null
> +++ b/arch/arm/boards/pcm051/env/boot/disk
> @@ -0,0 +1,10 @@
> +#!/bin/sh
> +
> +if [ "$1" = menu ]; then
> +	boot-menu-add-entry "$0" "SD Card"
> +	exit
> +fi
> +
> +global.bootm.image="/mnt/fat/linuximage"
> +#global.bootm.oftree="/env/oftree"
> +bootargs-root-disk -p mmcblk0p2 -t ext3
> diff --git a/arch/arm/boards/pcm051/env/init/automount b/arch/arm/boards/pcm051/env/init/automount
> new file mode 100644
> index 0000000..644a793
> --- /dev/null
> +++ b/arch/arm/boards/pcm051/env/init/automount
> @@ -0,0 +1,32 @@
> +#!/bin/sh
> +
> +if [ "$1" = menu ]; then
> +	init-menu-add-entry "$0" "Automountpoints"
> +	exit
> +fi
> +
drop the comment stuff if you don't use it
> +# automount server returned from dhcp server
> +
> +#mkdir -p /mnt/tftp-dhcp
> +#automount /mnt/tftp-dhcp 'ifup eth0 && mount $eth0.serverip tftp /mnt/tftp-dhcp'
> +
> +# automount nfs server example
> +
> +#nfshost=somehost
> +#mkdir -p /mnt/${nfshost}
> +#automount /mnt/$nfshost "ifup eth0 && mount ${nfshost}:/tftpboot nfs /mnt/${nfshost}"
> +
> +# static tftp server example
> +
> +#mkdir -p /mnt/tftp
> +#automount -d /mnt/tftp 'ifup eth0 && mount $serverip tftp /mnt/tftp'
> +
> +# FAT on usb disk example
> +
> +#mkdir -p /mnt/fat
> +#automount -d /mnt/fat 'usb && [ -e /dev/disk0.0 ] && mount /dev/disk0.0 /mnt/fat'
> +
> +# FAT on mmc card
> +
> +mkdir -p /mnt/fat
> +automount -d /mnt/fat '[ -e /dev/disk0.0 ] && mount /dev/disk0.0 /mnt/fat'
> diff --git a/arch/arm/boards/pcm051/env/init/bootargs-base b/arch/arm/boards/pcm051/env/init/bootargs-base
> new file mode 100644
> index 0000000..b3139b9
> --- /dev/null
> +++ b/arch/arm/boards/pcm051/env/init/bootargs-base
> @@ -0,0 +1,9 @@
> +#!/bin/sh
> +
> +if [ "$1" = menu ]; then
> +	init-menu-add-entry "$0" "Base bootargs"
> +	exit
> +fi
> +
> +global.linux.bootargs.base="console=ttyO0,115200"
> +bootargs-ip
> diff --git a/arch/arm/boards/pcm051/env/init/general b/arch/arm/boards/pcm051/env/init/general
> new file mode 100644
> index 0000000..4c0d324
> --- /dev/null
> +++ b/arch/arm/boards/pcm051/env/init/general
> @@ -0,0 +1,12 @@
> +#!/bin/sh
> +
> +if [ "$1" = menu ]; then
> +	init-menu-add-entry "$0" "general config settings"
> +	exit
> +fi
> +
> +# user (used for network filenames)
> +global.user=
> +
> +# timeout in seconds before the default boot entry is started
> +global.autoboot_timeout=3
> diff --git a/arch/arm/boards/pcm051/env/init/hostname b/arch/arm/boards/pcm051/env/init/hostname
> new file mode 100644
> index 0000000..3ea1e0a
> --- /dev/null
> +++ b/arch/arm/boards/pcm051/env/init/hostname
> @@ -0,0 +1,8 @@
> +#!/bin/sh
> +
> +if [ "$1" = menu ]; then
> +	init-menu-add-entry "$0" "hostname"
> +	exit
> +fi
> +
> +global.hostname=pcm051
> diff --git a/arch/arm/boards/pcm051/env/network/eth0 b/arch/arm/boards/pcm051/env/network/eth0
> new file mode 100644
> index 0000000..818b9f1
> --- /dev/null
> +++ b/arch/arm/boards/pcm051/env/network/eth0
> @@ -0,0 +1,15 @@
> +#!/bin/sh
> +
> +# ip setting (static/dhcp)
> +ip=dhcp
> +
> +# static setup used if ip=static
> +#ipaddr=
> +#netmask=
> +#gateway=
> +#serverip=
> +
> +# MAC address if needed
> +#ethaddr=xx:xx:xx:xx:xx:xx
> +
> +# put code to discover eth0 (i.e. 'usb') to /env/network/eth0-discover
> diff --git a/arch/arm/configs/pcm051_defconfig b/arch/arm/configs/pcm051_defconfig
> new file mode 100644
> index 0000000..6c7a950
> --- /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_AEABI=y
> +CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
> +CONFIG_ARM_UNWIND=y
> +CONFIG_TEXT_BASE=0x81000000
> +CONFIG_PROMPT="barebox> "
> +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
do not enable debuf stuff by default
> +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_NANDTEST=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
no need this one bootm mamange it

you should enable the oftree boot support

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCHv2 1/2] ARM OMAP AM33XX: create new ARCH for AM33xx
  2012-09-25 12:18 ` [PATCHv2 1/2] ARM OMAP AM33XX: create new ARCH for AM33xx Teresa Gámez
@ 2012-09-25 12:42   ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 5+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-09-25 12:42 UTC (permalink / raw)
  To: Teresa Gámez; +Cc: barebox

On 14:18 Tue 25 Sep     , Teresa Gámez wrote:
> Created ARCH for AM33xx boards as second stage bootloader.
> This includes:
> - Added dmtimer0
> - Created basic header files
> - Added MMC support for ARCH_AM33XX
> - Added reset function
> 
> Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
this on e looks good but please add the inline function to add the devices as
done on at91 or imx

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-09-25 12:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-25 12:18 [PATCHv2 0/2] Add ARCH for AM33xx and phyCORE-AM335x support Teresa Gámez
2012-09-25 12:18 ` [PATCHv2 1/2] ARM OMAP AM33XX: create new ARCH for AM33xx Teresa Gámez
2012-09-25 12:42   ` Jean-Christophe PLAGNIOL-VILLARD
2012-09-25 12:18 ` [PATCHv2 2/2] pcm051: Add inital support Teresa Gámez
2012-09-25 12:40   ` Jean-Christophe PLAGNIOL-VILLARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox