mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] AM33xx devicetree support
@ 2013-11-26 16:45 Sascha Hauer
  2013-11-26 16:45 ` [PATCH 01/17] ARM: Make multi images startup process simpler Sascha Hauer
                   ` (16 more replies)
  0 siblings, 17 replies; 24+ messages in thread
From: Sascha Hauer @ 2013-11-26 16:45 UTC (permalink / raw)
  To: barebox

The following series based on the previous patches switch the am33xx based boards
(Phytec phyCORE and Beaglebone(black)) over to devicetree and multi image support.

I've tested this on both boards in both MLO and regular builds. They start, the
devices come up and things seem to work, but more testing would be welcomed.
Wait, I just realized that the network on Beaglebone black stopped working, I'll
have a look.

Sascha

The following changes since commit 9df02e05f5fff6dafab5c140ce92dc33c196e5f9:

  Merge branch 'for-next/x86' into next (2013-11-26 17:22:06 +0100)

are available in the git repository at:


  git://git.pengutronix.de/git/barebox.git work/am335x

for you to fetch changes up to 82f44858223a2e61cb825ea6f68b6d2f77975e6e:

  ARM: OMAP: consolidate am335x mlo defconfigs (2013-11-26 17:37:36 +0100)

----------------------------------------------------------------
Sascha Hauer (17):
      ARM: Make multi images startup process simpler
      ARM: Make ENTRY_FUNCTION more robust
      ARM: Add base am335x-phytec-phycore devicetree file
      ARM: am335x phytec phyCORE: Switch to devicetree probe support
      ARM: am33xx Phytec phyCORE: initialize debug UART
      ARM: am33xx Phytec phyCORE: Switch to multiimage support
      ARM: am33xx Phytec phyCORE: update defconfig
      ARM: dts: Add am33xx beaglebone(black) dts files
      ARM: am33xx: beaglebone: remove mlo_large_defconfig
      ARM: beaglebone: Add memory to devicetrees
      ARM: beaglebone: Switch to devicetree and multiimage
      ARM: am335x Phytec phyCORE: Move partition descriptions to devicetree
      ARM: OMAP: Safe boot info in fixed SRAM address
      ARM: am335x Phytec phyCORE: configure environment from devicetree
      ARM: beaglebone: configure console from devicetree
      ARM: OMAP: introduce multiboard support and move am33xx boards to it
      ARM: OMAP: consolidate am335x mlo defconfigs

 arch/arm/boards/beaglebone/beaglebone.h            |   2 +
 arch/arm/boards/beaglebone/board.c                 | 121 +-------
 arch/arm/boards/beaglebone/lowlevel.c              |  67 ++++-
 arch/arm/boards/dfi-fs700-m60/lowlevel.c           |   8 +-
 arch/arm/boards/dmo-mx6-realq7/lowlevel.c          |   4 +-
 arch/arm/boards/ebv-socrates/lowlevel.c            |   6 +-
 arch/arm/boards/efika-mx-smartbook/lowlevel.c      |   4 +-
 arch/arm/boards/freescale-mx51-pdk/lowlevel.c      |   4 +-
 arch/arm/boards/freescale-mx53-loco/lowlevel.c     |   4 +-
 arch/arm/boards/freescale-mx53-vmx53/lowlevel.c    |   4 +-
 arch/arm/boards/freescale-mx6-sabrelite/lowlevel.c |   4 +-
 arch/arm/boards/gk802/lowlevel.c                   |   4 +-
 arch/arm/boards/pcm051/Makefile                    |   2 +-
 arch/arm/boards/pcm051/board.c                     | 166 +----------
 arch/arm/boards/pcm051/env/init/mtdparts-nand      |  11 -
 arch/arm/boards/pcm051/env/init/mtdparts-nor       |  12 -
 arch/arm/boards/pcm051/lowlevel.c                  |  44 ++-
 arch/arm/boards/pcm051/mux.c                       |  65 -----
 arch/arm/boards/pcm051/mux.h                       |   4 -
 arch/arm/boards/phytec-pfla02/lowlevel.c           |   8 +-
 arch/arm/boards/solidrun-cubox/lowlevel.c          |   4 +-
 arch/arm/boards/terasic-sockit/lowlevel.c          |   8 +-
 arch/arm/boards/toradex-colibri-t20-iris/entry.c   |   4 +-
 arch/arm/boards/toshiba-ac100/entry.c              |   4 +-
 arch/arm/boards/tqma6x/lowlevel.c                  |   8 +-
 arch/arm/configs/am335x_beaglebone_defconfig       |   8 +-
 .../configs/am335x_beaglebone_mlo_large_defconfig  |  55 ----
 .../configs/am335x_beaglebone_mlo_small_defconfig  |  29 --
 .../{pcm051_mlo_defconfig => am335x_mlo_defconfig} |  27 +-
 arch/arm/configs/pcm051_defconfig                  |  34 ++-
 arch/arm/cpu/Makefile                              |   2 +-
 arch/arm/cpu/start-images.c                        |  49 ----
 arch/arm/cpu/uncompress.c                          |   9 +-
 arch/arm/dts/Makefile                              |   6 +
 arch/arm/dts/am335x-bone-common.dtsi               | 300 ++++++++++++++++++++
 arch/arm/dts/am335x-bone.dts                       |  39 +++
 arch/arm/dts/am335x-boneblack.dts                  |  88 ++++++
 arch/arm/dts/am335x-phytec-phycore.dts             | 304 +++++++++++++++++++++
 arch/arm/dts/tps65217.dtsi                         |  56 ++++
 arch/arm/include/asm/barebox-arm.h                 |  16 +-
 arch/arm/mach-omap/Kconfig                         |  34 ++-
 arch/arm/mach-omap/Makefile                        |   4 +-
 arch/arm/mach-omap/am33xx_generic.c                |   3 +-
 arch/arm/mach-omap/include/mach/am33xx-generic.h   |   3 +-
 arch/arm/mach-omap/include/mach/am33xx-silicon.h   |   1 +
 arch/arm/mach-omap/include/mach/generic.h          |   2 -
 arch/arm/mach-omap/include/mach/omap3-generic.h    |   2 +-
 arch/arm/mach-omap/include/mach/omap3-silicon.h    |   1 +
 arch/arm/mach-omap/include/mach/omap4-generic.h    |   2 +-
 arch/arm/mach-omap/include/mach/omap4-silicon.h    |   3 +-
 arch/arm/mach-omap/omap3_generic.c                 |   3 +-
 arch/arm/mach-omap/omap4_generic.c                 |   3 +-
 arch/arm/mach-omap/omap_bootinfo.S                 |  25 --
 arch/arm/mach-omap/omap_generic.c                  |  17 +-
 images/Makefile                                    |  15 +-
 images/Makefile.am33xx                             |  30 ++
 56 files changed, 1077 insertions(+), 665 deletions(-)
 delete mode 100644 arch/arm/boards/pcm051/env/init/mtdparts-nand
 delete mode 100644 arch/arm/boards/pcm051/env/init/mtdparts-nor
 delete mode 100644 arch/arm/boards/pcm051/mux.c
 delete mode 100644 arch/arm/boards/pcm051/mux.h
 delete mode 100644 arch/arm/configs/am335x_beaglebone_mlo_large_defconfig
 delete mode 100644 arch/arm/configs/am335x_beaglebone_mlo_small_defconfig
 rename arch/arm/configs/{pcm051_mlo_defconfig => am335x_mlo_defconfig} (54%)
 delete mode 100644 arch/arm/cpu/start-images.c
 create mode 100644 arch/arm/dts/am335x-bone-common.dtsi
 create mode 100644 arch/arm/dts/am335x-bone.dts
 create mode 100644 arch/arm/dts/am335x-boneblack.dts
 create mode 100644 arch/arm/dts/am335x-phytec-phycore.dts
 create mode 100644 arch/arm/dts/tps65217.dtsi
 delete mode 100644 arch/arm/mach-omap/omap_bootinfo.S
 create mode 100644 images/Makefile.am33xx

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

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

* [PATCH 01/17] ARM: Make multi images startup process simpler
  2013-11-26 16:45 [PATCH] AM33xx devicetree support Sascha Hauer
@ 2013-11-26 16:45 ` Sascha Hauer
  2013-11-26 16:45 ` [PATCH 02/17] ARM: Make ENTRY_FUNCTION more robust Sascha Hauer
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 24+ messages in thread
From: Sascha Hauer @ 2013-11-26 16:45 UTC (permalink / raw)
  To: barebox

The multi image startup process used to have three binaries involved:
- The lowlevel board code to initialize SDRAM
- the uncompressor
- the regular (compressed) barebox binary
Drop the uncompressor and put the uncompress code into the lowlevel
board code binary. This makes the startup process easier.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/cpu/Makefile       |  2 +-
 arch/arm/cpu/start-images.c | 49 ---------------------------------------------
 arch/arm/cpu/uncompress.c   |  9 +++++----
 images/Makefile             | 12 +++--------
 4 files changed, 9 insertions(+), 63 deletions(-)
 delete mode 100644 arch/arm/cpu/start-images.c

diff --git a/arch/arm/cpu/Makefile b/arch/arm/cpu/Makefile
index aba201b..c29d030 100644
--- a/arch/arm/cpu/Makefile
+++ b/arch/arm/cpu/Makefile
@@ -23,7 +23,7 @@ obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
 
 pbl-y += setupc.o
 pbl-$(CONFIG_PBL_SINGLE_IMAGE) += start-pbl.o
-pbl-$(CONFIG_PBL_MULTI_IMAGES) += start-images.o uncompress.o
+pbl-$(CONFIG_PBL_MULTI_IMAGES) += uncompress.o
 
 obj-y += common.o cache.o
 pbl-y += common.o cache.o
diff --git a/arch/arm/cpu/start-images.c b/arch/arm/cpu/start-images.c
deleted file mode 100644
index d48d245..0000000
--- a/arch/arm/cpu/start-images.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * start-pbl.c
- *
- * Copyright (c) 2010-2012 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
- * Copyright (c) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
- *
- * 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.
- *
- * 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 <pbl.h>
-#include <asm/barebox-arm.h>
-#include <asm/barebox-arm-head.h>
-#include <asm-generic/memory_layout.h>
-#include <asm/sections.h>
-#include <asm/pgtable.h>
-#include <debug_ll.h>
-
-void __naked __noreturn barebox_arm_entry(uint32_t membase, uint32_t memsize,
-		uint32_t boarddata)
-{
-	unsigned long barebox_base;
-	void __noreturn (*barebox)(uint32_t, uint32_t, uint32_t);
-
-	barebox_base = ld_var(__image_end) - get_runtime_offset() + 4;
-
-	if (IS_ENABLED(CONFIG_THUMB2_BAREBOX))
-		barebox = (void *)(barebox_base + 1);
-	else
-		barebox = (void *)barebox_base;
-
-	barebox(membase, memsize, boarddata);
-}
diff --git a/arch/arm/cpu/uncompress.c b/arch/arm/cpu/uncompress.c
index b0819c7..6d3302a 100644
--- a/arch/arm/cpu/uncompress.c
+++ b/arch/arm/cpu/uncompress.c
@@ -43,7 +43,7 @@ static int __attribute__((__used__))
 	__attribute__((__section__(".image_end")))
 	__image_end_dummy = 0xdeadbeef;
 
-static void noinline uncompress(uint32_t membase,
+static void __noreturn noinline uncompress_start_payload(uint32_t membase,
 		uint32_t memsize, uint32_t boarddata)
 {
 	uint32_t offset;
@@ -99,12 +99,13 @@ static void noinline uncompress(uint32_t membase,
 }
 
 /*
- * Generic second stage pbl uncompressor entry
+ * For the multi images startup process board code jumps here. We will uncompress
+ * the attached barebox image and start it.
  */
-ENTRY_FUNCTION(start_uncompress)(uint32_t membase, uint32_t memsize,
+void __naked __noreturn barebox_arm_entry(uint32_t membase, uint32_t memsize,
 		uint32_t boarddata)
 {
 	arm_setup_stack(membase + memsize - 16);
 
-	uncompress(membase, memsize, boarddata);
+	uncompress_start_payload(membase, memsize, boarddata);
 }
diff --git a/images/Makefile b/images/Makefile
index ec033ab..b080a8c 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -69,10 +69,10 @@ $(obj)/%.pblb: $(obj)/%.pbl FORCE
 
 quiet_cmd_pblx ?= PBLX    $@
       cmd_pblx ?= cat $(obj)/$(patsubst %.pblx,%.pblb,$(2)) > $@; \
-		  $(call size_append, $(obj)/barebox.x) >> $@; \
-		  cat $(obj)/barebox.x >> $@
+		  $(call size_append, $(obj)/barebox.z) >> $@; \
+		  cat $(obj)/barebox.z >> $@
 
-$(obj)/%.pblx: $(obj)/%.pblb $(obj)/barebox.x FORCE
+$(obj)/%.pblx: $(obj)/%.pblb $(obj)/barebox.z FORCE
 	$(call if_changed,pblx,$(@F))
 
 $(obj)/%.s: $(obj)/% FORCE
@@ -93,12 +93,6 @@ quiet_cmd_selfextract = COMP    $@
 			$(call size_append, $<) >> $@; \
 			cat $< >> $@
 
-pblx-y += start_uncompress
-# barebox.x - self extracting barebox binary
-# ----------------------------------------------------------------
-$(obj)/barebox.x: $(obj)/barebox.z $(obj)/start_uncompress.pblb FORCE
-	$(call if_changed,selfextract)
-
 # %.img - create a copy from another file
 # ----------------------------------------------------------------
 .SECONDEXPANSION:
-- 
1.8.4.2


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

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

* [PATCH 02/17] ARM: Make ENTRY_FUNCTION more robust
  2013-11-26 16:45 [PATCH] AM33xx devicetree support Sascha Hauer
  2013-11-26 16:45 ` [PATCH 01/17] ARM: Make multi images startup process simpler Sascha Hauer
@ 2013-11-26 16:45 ` Sascha Hauer
  2013-11-26 16:45 ` [PATCH 03/17] ARM: Add base am335x-phytec-phycore devicetree file Sascha Hauer
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 24+ messages in thread
From: Sascha Hauer @ 2013-11-26 16:45 UTC (permalink / raw)
  To: barebox

An entry function should begin with a exception header. For this to work
properly the entry function should not contain any code which gcc might
put before the header. To make this sure change the ENTRY_FUNCTION macro
so that it generates one function which only contains the exception header
and a second function which contains the original body of the entry function.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/dfi-fs700-m60/lowlevel.c           |  8 ++------
 arch/arm/boards/dmo-mx6-realq7/lowlevel.c          |  4 +---
 arch/arm/boards/ebv-socrates/lowlevel.c            |  6 ++----
 arch/arm/boards/efika-mx-smartbook/lowlevel.c      |  4 +---
 arch/arm/boards/freescale-mx51-pdk/lowlevel.c      |  4 +---
 arch/arm/boards/freescale-mx53-loco/lowlevel.c     |  4 +---
 arch/arm/boards/freescale-mx53-vmx53/lowlevel.c    |  4 +---
 arch/arm/boards/freescale-mx6-sabrelite/lowlevel.c |  4 +---
 arch/arm/boards/gk802/lowlevel.c                   |  4 +---
 arch/arm/boards/phytec-pfla02/lowlevel.c           |  8 ++------
 arch/arm/boards/solidrun-cubox/lowlevel.c          |  4 +---
 arch/arm/boards/terasic-sockit/lowlevel.c          |  8 ++------
 arch/arm/boards/toradex-colibri-t20-iris/entry.c   |  4 +---
 arch/arm/boards/toshiba-ac100/entry.c              |  4 +---
 arch/arm/boards/tqma6x/lowlevel.c                  |  8 ++------
 arch/arm/include/asm/barebox-arm.h                 | 16 +++++++++++++---
 16 files changed, 33 insertions(+), 61 deletions(-)

diff --git a/arch/arm/boards/dfi-fs700-m60/lowlevel.c b/arch/arm/boards/dfi-fs700-m60/lowlevel.c
index 725c58d..2995bd4 100644
--- a/arch/arm/boards/dfi-fs700-m60/lowlevel.c
+++ b/arch/arm/boards/dfi-fs700-m60/lowlevel.c
@@ -61,12 +61,10 @@ static inline void early_uart_init_6s(void)
 
 extern char __dtb_imx6q_dfi_fs700_m60_6q_start[];
 
-ENTRY_FUNCTION(start_imx6q_dfi_fs700_m60_6q)(void)
+ENTRY_FUNCTION(start_imx6q_dfi_fs700_m60_6q, r0, r1, r2)
 {
 	uint32_t fdt;
 
-	__barebox_arm_head();
-
 	arm_cpu_lowlevel_init();
 
 	arm_setup_stack(0x00940000 - 8);
@@ -80,13 +78,11 @@ ENTRY_FUNCTION(start_imx6q_dfi_fs700_m60_6q)(void)
 
 extern char __dtb_imx6dl_dfi_fs700_m60_6s_start[];
 
-ENTRY_FUNCTION(start_imx6dl_dfi_fs700_m60_6s)(void)
+ENTRY_FUNCTION(start_imx6dl_dfi_fs700_m60_6s, r0, r1, r2)
 {
 	uint32_t fdt;
 	int i;
 
-	__barebox_arm_head();
-
 	arm_cpu_lowlevel_init();
 
 	arm_setup_stack(0x00920000 - 8);
diff --git a/arch/arm/boards/dmo-mx6-realq7/lowlevel.c b/arch/arm/boards/dmo-mx6-realq7/lowlevel.c
index 240116d..f47575e 100644
--- a/arch/arm/boards/dmo-mx6-realq7/lowlevel.c
+++ b/arch/arm/boards/dmo-mx6-realq7/lowlevel.c
@@ -140,12 +140,10 @@ static void sdram_init(void)
 
 extern char __dtb_imx6q_dmo_realq7_start[];
 
-ENTRY_FUNCTION(start_imx6_realq7)(void)
+ENTRY_FUNCTION(start_imx6_realq7, r0, r1, r2)
 {
 	uint32_t fdt;
 
-	__barebox_arm_head();
-
 	arm_cpu_lowlevel_init();
 
 	arm_setup_stack(0x00940000 - 8);
diff --git a/arch/arm/boards/ebv-socrates/lowlevel.c b/arch/arm/boards/ebv-socrates/lowlevel.c
index d2f02e0..e93ae38 100644
--- a/arch/arm/boards/ebv-socrates/lowlevel.c
+++ b/arch/arm/boards/ebv-socrates/lowlevel.c
@@ -45,7 +45,7 @@ static inline void ledoff(void)
 
 extern char __dtb_socfpga_cyclone5_socrates_start[];
 
-ENTRY_FUNCTION(start_socfpga_socrates)(void)
+ENTRY_FUNCTION(start_socfpga_socrates, r0, r1, r2)
 {
 	uint32_t fdt;
 
@@ -87,10 +87,8 @@ static noinline void socrates_entry(void)
 	barebox_arm_entry(0x0, SZ_1G, 0);
 }
 
-ENTRY_FUNCTION(start_socfpga_socrates_xload)(void)
+ENTRY_FUNCTION(start_socfpga_socrates_xload, r0, r1, r2)
 {
-	__barebox_arm_head();
-
 	arm_cpu_lowlevel_init();
 
 	arm_setup_stack(0xffff0000 + SZ_64K - SZ_4K - 16);
diff --git a/arch/arm/boards/efika-mx-smartbook/lowlevel.c b/arch/arm/boards/efika-mx-smartbook/lowlevel.c
index 5a56861..72c8b00 100644
--- a/arch/arm/boards/efika-mx-smartbook/lowlevel.c
+++ b/arch/arm/boards/efika-mx-smartbook/lowlevel.c
@@ -6,12 +6,10 @@
 
 extern char __dtb_imx51_genesi_efika_sb_start[];
 
-ENTRY_FUNCTION(start_imx51_genesi_efikasb)(void)
+ENTRY_FUNCTION(start_imx51_genesi_efikasb, r0, r1, r2)
 {
 	uint32_t fdt;
 
-	__barebox_arm_head();
-
 	arm_cpu_lowlevel_init();
 	arm_setup_stack(0x20000000 - 16);
 	imx51_init_lowlevel(800);
diff --git a/arch/arm/boards/freescale-mx51-pdk/lowlevel.c b/arch/arm/boards/freescale-mx51-pdk/lowlevel.c
index 8c1acb4..f606011 100644
--- a/arch/arm/boards/freescale-mx51-pdk/lowlevel.c
+++ b/arch/arm/boards/freescale-mx51-pdk/lowlevel.c
@@ -5,12 +5,10 @@
 
 extern char __dtb_imx51_babbage_start[];
 
-ENTRY_FUNCTION(start_imx51_babbage)(void)
+ENTRY_FUNCTION(start_imx51_babbage, r0, r1, r2)
 {
 	uint32_t fdt;
 
-	__barebox_arm_head();
-
 	arm_cpu_lowlevel_init();
 
 	fdt = (uint32_t)__dtb_imx51_babbage_start - get_runtime_offset();
diff --git a/arch/arm/boards/freescale-mx53-loco/lowlevel.c b/arch/arm/boards/freescale-mx53-loco/lowlevel.c
index d920524..7556a2e 100644
--- a/arch/arm/boards/freescale-mx53-loco/lowlevel.c
+++ b/arch/arm/boards/freescale-mx53-loco/lowlevel.c
@@ -5,12 +5,10 @@
 
 extern char __dtb_imx53_qsb_start[];
 
-ENTRY_FUNCTION(start_imx53_loco)(void)
+ENTRY_FUNCTION(start_imx53_loco, r0, r1, r2)
 {
 	uint32_t fdt;
 
-	__barebox_arm_head();
-
 	arm_cpu_lowlevel_init();
 
 	fdt = (uint32_t)__dtb_imx53_qsb_start - get_runtime_offset();
diff --git a/arch/arm/boards/freescale-mx53-vmx53/lowlevel.c b/arch/arm/boards/freescale-mx53-vmx53/lowlevel.c
index 5dc23fd..ba356cd 100644
--- a/arch/arm/boards/freescale-mx53-vmx53/lowlevel.c
+++ b/arch/arm/boards/freescale-mx53-vmx53/lowlevel.c
@@ -5,12 +5,10 @@
 
 extern char __dtb_imx53_voipac_bsb_start[];
 
-ENTRY_FUNCTION(start_imx53_vmx53)(void)
+ENTRY_FUNCTION(start_imx53_vmx53, r0, r1, r2)
 {
 	uint32_t fdt;
 
-	__barebox_arm_head();
-
 	arm_cpu_lowlevel_init();
 
 	fdt = (uint32_t)__dtb_imx53_voipac_bsb_start - get_runtime_offset();
diff --git a/arch/arm/boards/freescale-mx6-sabrelite/lowlevel.c b/arch/arm/boards/freescale-mx6-sabrelite/lowlevel.c
index a68e09a..b36a39c 100644
--- a/arch/arm/boards/freescale-mx6-sabrelite/lowlevel.c
+++ b/arch/arm/boards/freescale-mx6-sabrelite/lowlevel.c
@@ -5,12 +5,10 @@
 
 extern char __dtb_imx6q_sabrelite_start[];
 
-ENTRY_FUNCTION(start_imx6_sabrelite)(void)
+ENTRY_FUNCTION(start_imx6_sabrelite, r0, r1, r2)
 {
 	uint32_t fdt;
 
-	__barebox_arm_head();
-
 	arm_cpu_lowlevel_init();
 
 	fdt = (uint32_t)__dtb_imx6q_sabrelite_start - get_runtime_offset();
diff --git a/arch/arm/boards/gk802/lowlevel.c b/arch/arm/boards/gk802/lowlevel.c
index 95b218d..e159ddb 100644
--- a/arch/arm/boards/gk802/lowlevel.c
+++ b/arch/arm/boards/gk802/lowlevel.c
@@ -5,12 +5,10 @@
 
 extern char __dtb_imx6q_gk802_start[];
 
-ENTRY_FUNCTION(start_imx6_gk802)(void)
+ENTRY_FUNCTION(start_imx6_gk802, r0, r1, r2)
 {
 	uint32_t fdt;
 
-	__barebox_arm_head();
-
 	arm_cpu_lowlevel_init();
 
 	fdt = (uint32_t)__dtb_imx6q_gk802_start - get_runtime_offset();
diff --git a/arch/arm/boards/phytec-pfla02/lowlevel.c b/arch/arm/boards/phytec-pfla02/lowlevel.c
index 6596e92..6422bc4 100644
--- a/arch/arm/boards/phytec-pfla02/lowlevel.c
+++ b/arch/arm/boards/phytec-pfla02/lowlevel.c
@@ -55,12 +55,10 @@ static inline void setup_uart(void)
 
 extern char __dtb_imx6q_phytec_pbab01_start[];
 
-ENTRY_FUNCTION(start_phytec_pbab01_1gib)(void)
+ENTRY_FUNCTION(start_phytec_pbab01_1gib, r0, r1, r2)
 {
 	uint32_t fdt;
 
-	__barebox_arm_head();
-
 	arm_cpu_lowlevel_init();
 
 	arm_setup_stack(0x00920000 - 8);
@@ -73,12 +71,10 @@ ENTRY_FUNCTION(start_phytec_pbab01_1gib)(void)
 	barebox_arm_entry(0x10000000, SZ_1G, fdt);
 }
 
-ENTRY_FUNCTION(start_phytec_pbab01_2gib)(void)
+ENTRY_FUNCTION(start_phytec_pbab01_2gib, r0, r1, r2)
 {
 	uint32_t fdt;
 
-	__barebox_arm_head();
-
 	arm_cpu_lowlevel_init();
 
 	arm_setup_stack(0x00920000 - 8);
diff --git a/arch/arm/boards/solidrun-cubox/lowlevel.c b/arch/arm/boards/solidrun-cubox/lowlevel.c
index fdf5a7e..1fcecb5 100644
--- a/arch/arm/boards/solidrun-cubox/lowlevel.c
+++ b/arch/arm/boards/solidrun-cubox/lowlevel.c
@@ -23,12 +23,10 @@
 
 extern char __dtb_dove_cubox_start[];
 
-ENTRY_FUNCTION(start_solidrun_cubox)(void)
+ENTRY_FUNCTION(start_solidrun_cubox, r0, r1, r2)
 {
 	uint32_t fdt;
 
-	__barebox_arm_head();
-
 	arm_cpu_lowlevel_init();
 
 	fdt = (uint32_t)__dtb_dove_cubox_start - get_runtime_offset();
diff --git a/arch/arm/boards/terasic-sockit/lowlevel.c b/arch/arm/boards/terasic-sockit/lowlevel.c
index 8a1e0ce..0a4a923 100644
--- a/arch/arm/boards/terasic-sockit/lowlevel.c
+++ b/arch/arm/boards/terasic-sockit/lowlevel.c
@@ -45,12 +45,10 @@ static inline void ledoff(int led)
 
 extern char __dtb_socfpga_cyclone5_sockit_start[];
 
-ENTRY_FUNCTION(start_socfpga_sockit)(void)
+ENTRY_FUNCTION(start_socfpga_sockit, r0, r1, r2)
 {
 	uint32_t fdt;
 
-	__barebox_arm_head();
-
 	arm_cpu_lowlevel_init();
 
 	fdt = (uint32_t)__dtb_socfpga_cyclone5_sockit_start - get_runtime_offset();
@@ -87,10 +85,8 @@ static noinline void sockit_entry(void)
 	barebox_arm_entry(0x0, SZ_1G, 0);
 }
 
-ENTRY_FUNCTION(start_socfpga_sockit_xload)(void)
+ENTRY_FUNCTION(start_socfpga_sockit_xload, r0, r1, r2)
 {
-	__barebox_arm_head();
-
 	arm_cpu_lowlevel_init();
 
 	arm_setup_stack(0xffff0000 + SZ_64K - SZ_4K - 16);
diff --git a/arch/arm/boards/toradex-colibri-t20-iris/entry.c b/arch/arm/boards/toradex-colibri-t20-iris/entry.c
index 30a13e0..886613f 100644
--- a/arch/arm/boards/toradex-colibri-t20-iris/entry.c
+++ b/arch/arm/boards/toradex-colibri-t20-iris/entry.c
@@ -22,12 +22,10 @@
 
 extern char __dtb_tegra20_colibri_iris_start[];
 
-ENTRY_FUNCTION(start_toradex_colibri_t20_iris)(void)
+ENTRY_FUNCTION(start_toradex_colibri_t20_iris, r0, r1, r2)
 {
 	uint32_t fdt;
 
-	__barebox_arm_head();
-
 	tegra_cpu_lowlevel_setup();
 
 	fdt = (uint32_t)__dtb_tegra20_colibri_iris_start - get_runtime_offset();
diff --git a/arch/arm/boards/toshiba-ac100/entry.c b/arch/arm/boards/toshiba-ac100/entry.c
index 372d596..45fa56a 100644
--- a/arch/arm/boards/toshiba-ac100/entry.c
+++ b/arch/arm/boards/toshiba-ac100/entry.c
@@ -22,12 +22,10 @@
 
 extern char __dtb_tegra20_paz00_start[];
 
-ENTRY_FUNCTION(start_toshiba_ac100)(void)
+ENTRY_FUNCTION(start_toshiba_ac100, r0, r1, r2)
 {
 	uint32_t fdt;
 
-	__barebox_arm_head();
-
 	tegra_cpu_lowlevel_setup();
 
 	fdt = (uint32_t)__dtb_tegra20_paz00_start - get_runtime_offset();
diff --git a/arch/arm/boards/tqma6x/lowlevel.c b/arch/arm/boards/tqma6x/lowlevel.c
index 8a16abb..a09a2f5 100644
--- a/arch/arm/boards/tqma6x/lowlevel.c
+++ b/arch/arm/boards/tqma6x/lowlevel.c
@@ -41,12 +41,10 @@ static inline void setup_uart(void)
 extern char __dtb_imx6q_mba6x_start[];
 extern char __dtb_imx6dl_mba6x_start[];
 
-ENTRY_FUNCTION(start_imx6q_mba6x)(void)
+ENTRY_FUNCTION(start_imx6q_mba6x, r0, r1, r2)
 {
 	uint32_t fdt;
 
-	__barebox_arm_head();
-
 	arm_cpu_lowlevel_init();
 
 	arm_setup_stack(0x00920000 - 8);
@@ -64,12 +62,10 @@ ENTRY_FUNCTION(start_imx6q_mba6x)(void)
 	barebox_arm_entry(0x10000000, SZ_1G, fdt);
 }
 
-ENTRY_FUNCTION(start_imx6dl_mba6x)(void)
+ENTRY_FUNCTION(start_imx6dl_mba6x, r0, r1, r2)
 {
 	uint32_t fdt;
 
-	__barebox_arm_head();
-
 	arm_cpu_lowlevel_init();
 
 	arm_setup_stack(0x00920000 - 8);
diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
index 622bd13..faf9afa 100644
--- a/arch/arm/include/asm/barebox-arm.h
+++ b/arch/arm/include/asm/barebox-arm.h
@@ -79,8 +79,18 @@ static inline unsigned long arm_barebox_image_place(unsigned long endmem)
 	return endmem;
 }
 
-#define ENTRY_FUNCTION(name)  \
-	void __naked __section(.text_head_entry_##name) \
-		name
+#define ENTRY_FUNCTION(name, arg0, arg1, arg2)				\
+	static void __##name(uint32_t, uint32_t, uint32_t);		\
+									\
+	void __naked __section(.text_head_entry_##name)	name		\
+				(uint32_t r0, uint32_t r1, uint32_t r2)	\
+		{							\
+			__barebox_arm_head();				\
+			__##name(r0, r1, r2);				\
+		}							\
+		static void __naked noinline __##name			\
+			(uint32_t arg0, uint32_t arg1, uint32_t arg2)
+
+
 
 #endif	/* _BAREBOX_ARM_H_ */
-- 
1.8.4.2


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

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

* [PATCH 03/17] ARM: Add base am335x-phytec-phycore devicetree file
  2013-11-26 16:45 [PATCH] AM33xx devicetree support Sascha Hauer
  2013-11-26 16:45 ` [PATCH 01/17] ARM: Make multi images startup process simpler Sascha Hauer
  2013-11-26 16:45 ` [PATCH 02/17] ARM: Make ENTRY_FUNCTION more robust Sascha Hauer
@ 2013-11-26 16:45 ` Sascha Hauer
  2013-11-26 16:45 ` [PATCH 04/17] ARM: am335x phytec phyCORE: Switch to devicetree probe support Sascha Hauer
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 24+ messages in thread
From: Sascha Hauer @ 2013-11-26 16:45 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/dts/Makefile                  |   2 +
 arch/arm/dts/am335x-phytec-phycore.dts | 233 +++++++++++++++++++++++++++++++++
 2 files changed, 235 insertions(+)
 create mode 100644 arch/arm/dts/am335x-phytec-phycore.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index e2ef0b3..9e85d5a 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -1,3 +1,5 @@
+dtb-$(CONFIG_ARCH_AM33XX) += \
+	am335x-phytec-phycore.dtb
 dtb-$(CONFIG_ARCH_IMX51) += imx51-babbage.dtb \
 	imx51-genesi-efika-sb.dtb
 dtb-$(CONFIG_ARCH_IMX53) += imx53-qsb.dtb \
diff --git a/arch/arm/dts/am335x-phytec-phycore.dts b/arch/arm/dts/am335x-phytec-phycore.dts
new file mode 100644
index 0000000..3888c67
--- /dev/null
+++ b/arch/arm/dts/am335x-phytec-phycore.dts
@@ -0,0 +1,233 @@
+/dts-v1/;
+
+#include "am33xx.dtsi"
+
+/ {
+	model = "Phytec phyCORE AM335x";
+	compatible = "phytec,phycore-am335x", "ti,am33xx";
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x20000000>; /* 512 MB */
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pcm051_led_pins>;
+
+		led-green {
+			label = "green";
+			gpios = <&gpio1 30 0>;
+			linux,default-trigger = "heartbeat";
+		};
+
+		led-amber {
+			label = "amber";
+			gpios = <&gpio1 31 1>;
+		};
+	};
+};
+
+&am33xx_pinmux {
+	i2c0_pins: pinmux_i2c0_pins {
+			pinctrl-single,pins = <
+			0x188 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_sda.i2c0_sda */
+			0x18c (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_scl.i2c0_scl */
+		>;
+	};
+
+	spi0_pins: pinmux_spi0_pins {
+		pinctrl-single,pins = <
+			0x150 (INPUT_EN | MUX_MODE0)
+			0x154 (PULL_UP | INPUT_EN | MUX_MODE0)
+			0x158 (INPUT_EN | MUX_MODE0)
+			0x15c (PULL_UP | INPUT_EN | MUX_MODE0)
+		>;
+	};
+
+	uart0_pins: pinmux_uart0_pins {
+		pinctrl-single,pins = <
+			0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
+			0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
+		>;
+	};
+
+	mmc1_pins: pinmux_mmc1_pins {
+		pinctrl-single,pins = <
+			0xf0 (MUX_MODE0 | INPUT_EN | PULL_UP)	/* mmc0_dat3.mmc0_dat3 */
+			0xf4 (MUX_MODE0 | INPUT_EN | PULL_UP)	/* mmc0_dat2.mmc0_dat2 */
+			0xf8 (MUX_MODE0 | INPUT_EN | PULL_UP)	/* mmc0_dat1.mmc0_dat1 */
+			0xfc (MUX_MODE0 | INPUT_EN | PULL_UP)	/* mmc0_dat0.mmc0_dat0 */
+			0x100 (MUX_MODE0 | INPUT_EN | PULL_UP)	/* mmc0_clk.mmc0_clk */
+			0x104 (MUX_MODE0 | INPUT_EN | PULL_UP)	/* mmc0_cmd.mmc0_cmd */
+			0x160 (MUX_MODE7 | INPUT_EN | PULL_UP)	/* spi0_cs1.??, card detect */
+		>;
+	};
+
+	emac_rmii1_pins: pinmux_emac_rmii1_pins {
+		pinctrl-single,pins = <
+			0x10c (INPUT_EN | MUX_MODE1)
+			0x110 (INPUT_EN | MUX_MODE1)
+			0x114 MUX_MODE1
+			0x124 MUX_MODE1
+			0x128 MUX_MODE1
+			0x13c (INPUT_EN | MUX_MODE1)
+			0x140 (INPUT_EN | MUX_MODE1)
+			0x148 (PULL_UP | INPUT_EN | MUX_MODE0)
+			0x14c (PULL_UP | MUX_MODE0)
+			0x144 (INPUT_EN | MUX_MODE0)
+
+			/* Slave 2 */
+			0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a0.rgmii2_tctl */
+			0x44 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a1.rgmii2_rctl */
+			0x48 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a2.rgmii2_td3 */
+			0x4c (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a3.rgmii2_td2 */
+			0x50 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a4.rgmii2_td1 */
+			0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a5.rgmii2_td0 */
+			0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)  /* gpmc_a6.rgmii2_tclk */
+			0x5c (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a7.rgmii2_rclk */
+			0x60 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a8.rgmii2_rd3 */
+			0x64 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a9.rgmii2_rd2 */
+			0x68 (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a10.rgmii2_rd1 */
+			0x6c (PIN_INPUT_PULLDOWN | MUX_MODE2)   /* gpmc_a11.rgmii2_rd0 */
+		>;
+	};
+
+	nandflash_pins_s0: nandflash_pins_s0 {
+		pinctrl-single,pins = <
+			0x0 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad0.gpmc_ad0 */
+			0x4 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad1.gpmc_ad1 */
+			0x8 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad2.gpmc_ad2 */
+			0xc (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad3.gpmc_ad3 */
+			0x10 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad4.gpmc_ad4 */
+			0x14 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad5.gpmc_ad5 */
+			0x18 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad6.gpmc_ad6 */
+			0x1c (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad7.gpmc_ad7 */
+			0x70 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_wait0.gpmc_wait0 */
+			0x74 (PIN_INPUT_PULLUP | MUX_MODE7)	/* gpmc_wpn.gpio0_30 */
+			0x7c (PIN_OUTPUT | MUX_MODE0)		/* gpmc_csn0.gpmc_csn0  */
+			0x90 (PIN_OUTPUT | MUX_MODE0)		/* gpmc_advn_ale.gpmc_advn_ale */
+			0x94 (PIN_OUTPUT | MUX_MODE0)		/* gpmc_oen_ren.gpmc_oen_ren */
+			0x98 (PIN_OUTPUT | MUX_MODE0)		/* gpmc_wen.gpmc_wen */
+			0x9c (PIN_OUTPUT | MUX_MODE0)		/* gpmc_be0n_cle.gpmc_be0n_cle */
+		>;
+	};
+
+	pcm051_led_pins: pinmux_pcm051_led_pins {
+		pinctrl-single,pins = <
+			0x80 (MUX_MODE7)
+			0x84 (MUX_MODE7)
+		>;
+	};
+
+	pcm051_user_pins: pinmux_pcm051_user_pins {
+		pinctrl-single,pins = <
+			0x1e4 (PULL_UP |INPUT_EN |MUX_MODE7)
+			0x1e8 (PULL_UP |INPUT_EN |MUX_MODE7)
+		>;
+	};
+};
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins>;
+
+	status = "okay";
+	clock-frequency = <400000>;
+
+	eeprom: 24c32@52 {
+		compatible = "atmel,24c32";
+		reg = <0x52>;
+	};
+};
+
+&mmc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pins>;
+	status = "okay";
+};
+
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_pins>;
+	status = "okay";
+
+	flash: m25p80 {
+		compatible = "sst,sst25vf032b", "m25p80";
+		spi-max-frequency = <15000000>;
+		reg = <1>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition@0 {
+			label = "barebox-environment";
+			reg = <0x80000 0x80000>;
+		};
+	};
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins>;
+	status = "okay";
+};
+
+&cpsw_emac0 {
+	phy_id = <&davinci_mdio>, <0>;
+	phy-mode = "rmii";
+	dual_emac_res_vlan = <1>;
+};
+
+&cpsw_emac1 {
+	phy_id = <&davinci_mdio>, <2>;
+	phy-mode = "rgmii";
+	dual_emac_res_vlan = <2>;
+};
+
+&mac {
+	pinctrl-names = "default";
+	pinctrl-0 = <&emac_rmii1_pins>;
+	dual_emac = <1>;
+};
+
+&gpmc {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&nandflash_pins_s0>;
+	ranges = <0 0 0x08000000 0x10000000>;	/* CS0: NAND */
+	nand@0,0 {
+		reg = <0 0 0>; /* CS0, offset 0 */
+		nand-bus-width = <8>;
+		ti,nand-ecc-opt = "bch8-romcode";
+		gpmc,device-nand = "true";
+		gpmc,device-width = <1>;
+		gpmc,sync-clk-ps = <0>;
+		gpmc,cs-on-ns = <0>;
+		gpmc,cs-rd-off-ns = <30>;
+		gpmc,cs-wr-off-ns = <30>;
+		gpmc,adv-on-ns = <0>;
+		gpmc,adv-rd-off-ns = <30>;
+		gpmc,adv-wr-off-ns = <30>;
+		gpmc,we-on-ns = <0>;
+		gpmc,we-off-ns = <20>;
+		gpmc,oe-on-ns = <10>;
+		gpmc,oe-off-ns = <30>;
+		gpmc,access-ns = <30>;
+		gpmc,rd-cycle-ns = <30>;
+		gpmc,wr-cycle-ns = <30>;
+		gpmc,wait-pin = <1>;
+		gpmc,wait-on-read = "true";
+		gpmc,wait-on-write = "true";
+		gpmc,bus-turnaround-ns = <0>;
+		gpmc,cycle2cycle-delay-ns = <50>;
+		gpmc,clk-activation-ns = <0>;
+		gpmc,wait-monitoring-ns = <0>;
+		gpmc,wr-access-ns = <0>;
+		gpmc,wr-data-mux-bus-ns = <0>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+		elm_id = <&elm>;
+	};
+};
-- 
1.8.4.2


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

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

* [PATCH 04/17] ARM: am335x phytec phyCORE: Switch to devicetree probe support
  2013-11-26 16:45 [PATCH] AM33xx devicetree support Sascha Hauer
                   ` (2 preceding siblings ...)
  2013-11-26 16:45 ` [PATCH 03/17] ARM: Add base am335x-phytec-phycore devicetree file Sascha Hauer
@ 2013-11-26 16:45 ` Sascha Hauer
  2013-11-27  3:20   ` Alexander Aring
  2013-12-10 14:22   ` Jan Weitzel
  2013-11-26 16:45 ` [PATCH 05/17] ARM: am33xx Phytec phyCORE: initialize debug UART Sascha Hauer
                   ` (12 subsequent siblings)
  16 siblings, 2 replies; 24+ messages in thread
From: Sascha Hauer @ 2013-11-26 16:45 UTC (permalink / raw)
  To: barebox

This switches the am335x Phytec phyCORE to devicetree probe support.
For now we use a linked in dtb.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/pcm051/Makefile       |   2 +-
 arch/arm/boards/pcm051/board.c        | 149 ++--------------------------------
 arch/arm/boards/pcm051/mux.c          |  65 ---------------
 arch/arm/boards/pcm051/mux.h          |   4 -
 arch/arm/configs/pcm051_defconfig     |  26 ++++--
 arch/arm/configs/pcm051_mlo_defconfig |   8 +-
 6 files changed, 32 insertions(+), 222 deletions(-)
 delete mode 100644 arch/arm/boards/pcm051/mux.c
 delete mode 100644 arch/arm/boards/pcm051/mux.h

diff --git a/arch/arm/boards/pcm051/Makefile b/arch/arm/boards/pcm051/Makefile
index 69d48e1..092c31d 100644
--- a/arch/arm/boards/pcm051/Makefile
+++ b/arch/arm/boards/pcm051/Makefile
@@ -1,2 +1,2 @@
 lwl-y += lowlevel.o
-obj-y += board.o mux.o
+obj-y += board.o
diff --git a/arch/arm/boards/pcm051/board.c b/arch/arm/boards/pcm051/board.c
index e7a7b79..4b76f4c 100644
--- a/arch/arm/boards/pcm051/board.c
+++ b/arch/arm/boards/pcm051/board.c
@@ -19,107 +19,17 @@
 
 #include <bootsource.h>
 #include <common.h>
+#include <nand.h>
 #include <init.h>
 #include <io.h>
-#include <nand.h>
 #include <sizes.h>
-#include <ns16550.h>
 #include <asm/armlinux.h>
 #include <generated/mach-types.h>
 #include <linux/phy.h>
-#include <mach/am33xx-devices.h>
 #include <mach/am33xx-generic.h>
-#include <mach/am33xx-mux.h>
 #include <mach/am33xx-silicon.h>
-#include <mach/cpsw.h>
-#include <mach/generic.h>
-#include <mach/gpmc.h>
-#include <mach/gpmc_nand.h>
-#include <spi/spi.h>
-#include <spi/flash.h>
-#include <i2c/i2c.h>
-#include <i2c/at24.h>
 #include <mach/bbu.h>
 
-#include "mux.h"
-
-/**
- * @brief UART serial port initialization
- * arch
- *
- * @return result of device registration
- */
-static int pcm051_console_init(void)
-{
-	barebox_set_model("Phytec phyCORE-AM335x");
-	barebox_set_hostname("phycore-am335x");
-
-	am33xx_enable_uart0_pin_mux();
-	/* 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);
-
-/*
-* SPI Flash works at 80Mhz however the SPI controller runs with 48MHz.
-* So setup Max speed to be less than the controller speed.
-*/
-static struct spi_board_info pcm051_spi_board_info[] = {
-	{
-		.name		= "m25p80",
-		.max_speed_hz	= 24000000,
-		.bus_num	= 0,
-		.chip_select	= 0,
-	},
-};
-
-static struct cpsw_slave_data cpsw_slaves[] = {
-	{
-		.phy_id		= 0,
-		.phy_if		= PHY_INTERFACE_MODE_RMII,
-	},
-};
-
-static struct cpsw_platform_data cpsw_data = {
-	.slave_data	= cpsw_slaves,
-	.num_slaves	= ARRAY_SIZE(cpsw_slaves),
-};
-
-static struct i2c_board_info i2c0_devices[] = {
-	{
-		I2C_BOARD_INFO("24c32", 0x52),
-	},
-};
-
-static struct gpmc_config pcm051_nand_cfg = {
-	.cfg = {
-		0x00000800,	/* CONF1 */
-		0x00030300,	/* CONF2 */
-		0x00030300,	/* CONF3 */
-		0x02000311,	/* CONF4 */
-		0x00030303,	/* CONF5 */
-		0x03000540,	/* CONF6 */
-	},
-	.base = 0x08000000,
-	.size = GPMC_SIZE_16M,
-};
-
-static struct gpmc_nand_platform_data nand_plat = {
-	.wait_mon_pin = 1,
-	.ecc_mode = OMAP_ECC_BCH8_CODE_HW,
-	.nand_cfg = &pcm051_nand_cfg,
-};
-
 static struct omap_barebox_part pcm051_barebox_part = {
 	.nand_offset = SZ_512K,
 	.nand_size = SZ_512K,
@@ -127,59 +37,13 @@ static struct omap_barebox_part pcm051_barebox_part = {
 	.nor_size = SZ_512K,
 };
 
-static void pcm051_spi_init(void)
-{
-	int ret;
-
-	am33xx_enable_spi0_pin_mux();
-
-	ret = spi_register_board_info(pcm051_spi_board_info,
-					ARRAY_SIZE(pcm051_spi_board_info));
-	am33xx_add_spi0();
-}
-
-static void pcm051_eth_init(void)
-{
-	am33xx_register_ethaddr(0, 0);
-
-	writel(0x49, AM33XX_MAC_MII_SEL);
-
-	am33xx_enable_rmii1_pin_mux();
-
-	am33xx_add_cpsw(&cpsw_data);
-}
-
-static void pcm051_i2c_init(void)
-{
-	am33xx_enable_i2c0_pin_mux();
-
-	i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices));
-
-	am33xx_add_i2c0(NULL);
-}
-
-static void pcm051_nand_init(void)
-{
-	pcm051_enable_nand_pin_mux();
-
-	gpmc_generic_init(0x12);
-
-	omap_add_gpmc_nand_device(&nand_plat);
-}
-
 static int pcm051_devices_init(void)
 {
-	pcm051_enable_mmc0_pin_mux();
-
-	am33xx_add_mmc0(NULL);
+	if (!of_machine_is_compatible("phytec,phycore-am335x"))
+		return 0;
 
-	pcm051_spi_init();
-	pcm051_eth_init();
-	pcm051_i2c_init();
-	pcm051_nand_init();
-
-	pcm051_enable_user_led_pin_mux();
-	pcm051_enable_user_btn_pin_mux();
+	am33xx_register_ethaddr(0, 0);
+	writel(0x69, AM33XX_MAC_MII_SEL);
 
 	switch (bootsource_get()) {
 	case BOOTSOURCE_SPI:
@@ -190,6 +54,9 @@ static int pcm051_devices_init(void)
 		devfs_add_partition("m25p0", SZ_128K + SZ_512K, SZ_128K,
 					DEVFS_PARTITION_FIXED, "env0");
 		break;
+	case BOOTSOURCE_MMC:
+		omap_set_bootmmc_devname("mmc0");
+		break;
 	default:
 		devfs_add_partition("nand0", 0x00000, SZ_128K,
 					DEVFS_PARTITION_FIXED, "xload_raw");
diff --git a/arch/arm/boards/pcm051/mux.c b/arch/arm/boards/pcm051/mux.c
deleted file mode 100644
index e1127ac..0000000
--- a/arch/arm/boards/pcm051/mux.c
+++ /dev/null
@@ -1,65 +0,0 @@
-#include <common.h>
-#include <config.h>
-#include <asm/io.h>
-#include <mach/am33xx-mux.h>
-
-static const struct module_pin_mux mmc0_pin_mux[] = {
-	{OFFSET(mmc0_dat3), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT3 */
-	{OFFSET(mmc0_dat2), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT2 */
-	{OFFSET(mmc0_dat1), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT1 */
-	{OFFSET(mmc0_dat0), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT0 */
-	{OFFSET(mmc0_clk), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_CLK */
-	{OFFSET(mmc0_cmd), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_CMD */
-	{OFFSET(spi0_cs1), (MODE(7) | RXACTIVE | PULLUP_EN)},	/* MMC0_CD */
-	{-1},
-};
-
-static const struct module_pin_mux nand_pin_mux[] = {
-	{OFFSET(gpmc_ad0), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD0 */
-	{OFFSET(gpmc_ad1), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD1 */
-	{OFFSET(gpmc_ad2), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD2 */
-	{OFFSET(gpmc_ad3), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD3 */
-	{OFFSET(gpmc_ad4), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD4 */
-	{OFFSET(gpmc_ad5), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD5 */
-	{OFFSET(gpmc_ad6), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD6 */
-	{OFFSET(gpmc_ad7), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* NAND AD7 */
-	{OFFSET(gpmc_wait0), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* NAND WAIT */
-	{OFFSET(gpmc_csn0), (MODE(0) | PULLUDEN)},	/* NAND_CS0 */
-	{OFFSET(gpmc_advn_ale), (MODE(0) | PULLUDEN)},	/* NAND_ADV_ALE */
-	{OFFSET(gpmc_oen_ren), (MODE(0) | PULLUDEN)},	/* NAND_OE */
-	{OFFSET(gpmc_wen), (MODE(0) | PULLUDEN)},	/* NAND_WEN */
-	{OFFSET(gpmc_be0n_cle), (MODE(0) | PULLUDEN)},	/* NAND_BE_CLE */
-	{-1},
-};
-
-static const struct module_pin_mux user_led_pin_mux[] = {
-	{OFFSET(gpmc_csn1), MODE(7) | PULLUDEN}, /* USER LED1 */
-	{OFFSET(gpmc_csn2), MODE(7) | PULLUDEN}, /* USER LED2 */
-	{-1},
-};
-
-static const struct module_pin_mux user_btn_pin_mux[] = {
-	{OFFSET(emu0), MODE(7) | RXACTIVE | PULLUP_EN},
-	{OFFSET(emu1), MODE(7) | RXACTIVE | PULLUP_EN},
-	{-1},
-};
-
-void pcm051_enable_mmc0_pin_mux(void)
-{
-	configure_module_pin_mux(mmc0_pin_mux);
-}
-
-void pcm051_enable_nand_pin_mux(void)
-{
-	configure_module_pin_mux(nand_pin_mux);
-}
-
-void pcm051_enable_user_led_pin_mux(void)
-{
-	configure_module_pin_mux(user_led_pin_mux);
-}
-
-void pcm051_enable_user_btn_pin_mux(void)
-{
-	configure_module_pin_mux(user_btn_pin_mux);
-}
diff --git a/arch/arm/boards/pcm051/mux.h b/arch/arm/boards/pcm051/mux.h
deleted file mode 100644
index 5cdbe0c..0000000
--- a/arch/arm/boards/pcm051/mux.h
+++ /dev/null
@@ -1,4 +0,0 @@
-extern void pcm051_enable_mmc0_pin_mux(void);
-extern void pcm051_enable_nand_pin_mux(void);
-extern void pcm051_enable_user_led_pin_mux(void);
-extern void pcm051_enable_user_btn_pin_mux(void);
diff --git a/arch/arm/configs/pcm051_defconfig b/arch/arm/configs/pcm051_defconfig
index 97e0940..e55ac47 100644
--- a/arch/arm/configs/pcm051_defconfig
+++ b/arch/arm/configs/pcm051_defconfig
@@ -1,16 +1,21 @@
+CONFIG_BUILTIN_DTB=y
+CONFIG_BUILTIN_DTB_NAME="am335x-phytec-phycore"
 CONFIG_ARCH_OMAP=y
-CONFIG_ARCH_AM33XX=y
 CONFIG_BAREBOX_UPDATE_AM33XX_SPI_NOR_MLO=y
 CONFIG_MACH_PCM051=y
-CONFIG_OMAP_UART1=y
-CONFIG_AEABI=y
+CONFIG_THUMB2_BAREBOX=y
 CONFIG_ARM_BOARD_APPEND_ATAG=y
 CONFIG_CMD_ARM_MMUINFO=y
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
 CONFIG_ARM_UNWIND=y
+CONFIG_PBL_IMAGE=y
+CONFIG_PBL_RELOCATABLE=y
 CONFIG_MMU=y
-CONFIG_TEXT_BASE=0x8f000000
-CONFIG_MALLOC_SIZE=0x2000000
+CONFIG_TEXT_BASE=0x0
+CONFIG_MALLOC_SIZE=0x0
+CONFIG_MALLOC_TLSF=y
+CONFIG_KALLSYMS=y
+CONFIG_RELOCATABLE=y
 CONFIG_PROMPT="barebox@pcm051>"
 CONFIG_LONGHELP=y
 CONFIG_HUSH_FANCY_PROMPT=y
@@ -21,9 +26,6 @@ CONFIG_MENU=y
 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
@@ -44,6 +46,7 @@ CONFIG_CMD_UBIFORMAT=y
 CONFIG_CMD_BOOTM_SHOW_TYPE=y
 CONFIG_CMD_UIMAGE=y
 CONFIG_CMD_BOOTZ=y
+# CONFIG_CMD_BOOTU is not set
 CONFIG_CMD_RESET=y
 CONFIG_CMD_GO=y
 CONFIG_CMD_BAREBOX_UPDATE=y
@@ -57,6 +60,8 @@ CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
 CONFIG_NET_PING=y
+CONFIG_OFDEVICE=y
+CONFIG_OF_BAREBOX_DRIVERS=y
 CONFIG_DRIVER_SERIAL_NS16550=y
 CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
 CONFIG_DRIVER_NET_CPSW=y
@@ -67,13 +72,16 @@ CONFIG_MTD=y
 CONFIG_MTD_M25P80=y
 CONFIG_NAND=y
 CONFIG_NAND_OMAP_GPMC=y
-CONFIG_UBI=y
+CONFIG_MTD_UBI=y
 CONFIG_USB=y
 CONFIG_MCI=y
 CONFIG_MCI_STARTUP=y
 CONFIG_MCI_OMAP_HSMMC=y
 CONFIG_EEPROM_AT24=y
 CONFIG_GPIO_GENERIC_PLATFORM=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_SINGLE=y
+CONFIG_BUS_OMAP_GPMC=y
 CONFIG_FS_TFTP=y
 CONFIG_FS_NFS=y
 CONFIG_FS_FAT=y
diff --git a/arch/arm/configs/pcm051_mlo_defconfig b/arch/arm/configs/pcm051_mlo_defconfig
index ea65979..4f6a7b1 100644
--- a/arch/arm/configs/pcm051_mlo_defconfig
+++ b/arch/arm/configs/pcm051_mlo_defconfig
@@ -1,8 +1,8 @@
+CONFIG_BUILTIN_DTB=y
+CONFIG_BUILTIN_DTB_NAME="am335x-phytec-phycore"
 CONFIG_ARCH_OMAP=y
-CONFIG_ARCH_AM33XX=y
 CONFIG_OMAP_BUILD_IFT=y
 CONFIG_MACH_PCM051=y
-CONFIG_OMAP_UART1=y
 CONFIG_THUMB2_BAREBOX=y
 # CONFIG_CMD_ARM_CPUINFO is not set
 # CONFIG_MEMINFO is not set
@@ -17,6 +17,7 @@ CONFIG_SHELL_NONE=y
 # CONFIG_TIMESTAMP is not set
 CONFIG_CONSOLE_SIMPLE=y
 # CONFIG_DEFAULT_ENVIRONMENT is not set
+CONFIG_OFDEVICE=y
 CONFIG_DRIVER_SERIAL_NS16550=y
 CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
 CONFIG_DRIVER_SPI_OMAP3=y
@@ -27,6 +28,9 @@ CONFIG_NAND_OMAP_GPMC=y
 CONFIG_MCI=y
 CONFIG_MCI_STARTUP=y
 CONFIG_MCI_OMAP_HSMMC=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_SINGLE=y
+CONFIG_BUS_OMAP_GPMC=y
 # CONFIG_FS_RAMFS is not set
 # CONFIG_FS_DEVFS is not set
 CONFIG_FS_FAT=y
-- 
1.8.4.2


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

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

* [PATCH 05/17] ARM: am33xx Phytec phyCORE: initialize debug UART
  2013-11-26 16:45 [PATCH] AM33xx devicetree support Sascha Hauer
                   ` (3 preceding siblings ...)
  2013-11-26 16:45 ` [PATCH 04/17] ARM: am335x phytec phyCORE: Switch to devicetree probe support Sascha Hauer
@ 2013-11-26 16:45 ` Sascha Hauer
  2013-11-26 16:45 ` [PATCH 06/17] ARM: am33xx Phytec phyCORE: Switch to multiimage support Sascha Hauer
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 24+ messages in thread
From: Sascha Hauer @ 2013-11-26 16:45 UTC (permalink / raw)
  To: barebox

Add debug UART initialization to lowlevel init and print a '>'. Helps
debugging lowlevel code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/pcm051/lowlevel.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/boards/pcm051/lowlevel.c b/arch/arm/boards/pcm051/lowlevel.c
index ded108e..08f36ec 100644
--- a/arch/arm/boards/pcm051/lowlevel.c
+++ b/arch/arm/boards/pcm051/lowlevel.c
@@ -13,6 +13,7 @@
 #include <mach/am33xx-mux.h>
 #include <mach/am33xx-generic.h>
 #include <mach/wdt.h>
+#include <debug_ll.h>
 
 static const struct am33xx_cmd_control MT41J256M8HX15E_2x256M8_cmd = {
 	.slave_ratio0 = 0x40,
@@ -76,6 +77,8 @@ static int pcm051_board_init(void)
 
 	am33xx_uart0_soft_reset();
 	am33xx_enable_uart0_pin_mux();
+	omap_uart_lowlevel_init((void *)AM33XX_UART0_BASE);
+	putc_ll('>');
 
 	return 0;
 }
-- 
1.8.4.2


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

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

* [PATCH 06/17] ARM: am33xx Phytec phyCORE: Switch to multiimage support
  2013-11-26 16:45 [PATCH] AM33xx devicetree support Sascha Hauer
                   ` (4 preceding siblings ...)
  2013-11-26 16:45 ` [PATCH 05/17] ARM: am33xx Phytec phyCORE: initialize debug UART Sascha Hauer
@ 2013-11-26 16:45 ` Sascha Hauer
  2013-11-26 16:45 ` [PATCH 07/17] ARM: am33xx Phytec phyCORE: update defconfig Sascha Hauer
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 24+ messages in thread
From: Sascha Hauer @ 2013-11-26 16:45 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/pcm051/lowlevel.c     | 41 ++++++++++++++++++++++++++++-------
 arch/arm/configs/pcm051_defconfig     |  4 ----
 arch/arm/configs/pcm051_mlo_defconfig |  9 ++++----
 arch/arm/dts/Makefile                 |  1 +
 arch/arm/mach-omap/Kconfig            |  1 +
 images/Makefile                       |  3 ++-
 images/Makefile.am33xx                | 22 +++++++++++++++++++
 7 files changed, 63 insertions(+), 18 deletions(-)
 create mode 100644 images/Makefile.am33xx

diff --git a/arch/arm/boards/pcm051/lowlevel.c b/arch/arm/boards/pcm051/lowlevel.c
index 08f36ec..d3cac68 100644
--- a/arch/arm/boards/pcm051/lowlevel.c
+++ b/arch/arm/boards/pcm051/lowlevel.c
@@ -46,6 +46,9 @@ static const struct am33xx_ddr_data MT41J256M8HX15E_2x256M8_data = {
 	.dll_lock_diff0		= 0x0,
 };
 
+extern char __dtb_am335x_phytec_phycore_start[];
+extern char __dtb_am335x_phytec_phycore_end[];
+
 /**
  * @brief The basic entry point for board initialization.
  *
@@ -55,8 +58,10 @@ static const struct am33xx_ddr_data MT41J256M8HX15E_2x256M8_data = {
  *
  * @return void
  */
-static int pcm051_board_init(void)
+static noinline void pcm051_board_init(void)
 {
+	unsigned long sdram = 0x80000000, fdt;
+
 	/* WDT1 is already running when the bootloader gets control
 	 * Disable it to avoid "random" resets
 	 */
@@ -66,9 +71,6 @@ static int pcm051_board_init(void)
 	writel(WDT_DISABLE_CODE2, AM33XX_WDT_REG(WSPR));
 	while (readl(AM33XX_WDT_REG(WWPS)) != 0x0);
 
-	if (am33xx_running_in_sdram())
-		return 0;
-
 	am33xx_pll_init(MPUPLL_M_600, 25, DDRPLL_M_303);
 
 	am335x_sdram_init(0x18B, &MT41J256M8HX15E_2x256M8_cmd,
@@ -80,16 +82,39 @@ static int pcm051_board_init(void)
 	omap_uart_lowlevel_init((void *)AM33XX_UART0_BASE);
 	putc_ll('>');
 
-	return 0;
+	/*
+	 * Copy the devicetree blob to sdram so that the barebox code finds it
+	 * inside valid SDRAM instead of SRAM.
+	 */
+	memcpy((void *)sdram, __dtb_am335x_phytec_phycore_start,
+			__dtb_am335x_phytec_phycore_end -
+			__dtb_am335x_phytec_phycore_start);
+	fdt = sdram;
+
+	barebox_arm_entry(sdram, SZ_512M, fdt);
 }
 
-void __naked __bare_init barebox_arm_reset_vector(uint32_t *data)
+ENTRY_FUNCTION(start_am33xx_phytec_phycore_sram, bootinfo, r1, r2)
 {
-	am33xx_save_bootinfo(data);
+	am33xx_save_bootinfo((void *)bootinfo);
 
 	arm_cpu_lowlevel_init();
 
+	/*
+	 * Setup C environment, the board init code uses global variables.
+	 * Stackpointer has already been initialized by the ROM code.
+	 */
+	relocate_to_current_adr();
+	setup_c();
+
 	pcm051_board_init();
+}
+
+ENTRY_FUNCTION(start_am33xx_phytec_phycore_sdram, r0, r1, r2)
+{
+	uint32_t fdt;
+
+	fdt = (uint32_t)__dtb_am335x_phytec_phycore_start - get_runtime_offset();
 
-	barebox_arm_entry(0x80000000, SZ_512M, 0);
+	barebox_arm_entry(0x80000000, SZ_512M, fdt);
 }
diff --git a/arch/arm/configs/pcm051_defconfig b/arch/arm/configs/pcm051_defconfig
index e55ac47..482329a 100644
--- a/arch/arm/configs/pcm051_defconfig
+++ b/arch/arm/configs/pcm051_defconfig
@@ -1,5 +1,3 @@
-CONFIG_BUILTIN_DTB=y
-CONFIG_BUILTIN_DTB_NAME="am335x-phytec-phycore"
 CONFIG_ARCH_OMAP=y
 CONFIG_BAREBOX_UPDATE_AM33XX_SPI_NOR_MLO=y
 CONFIG_MACH_PCM051=y
@@ -8,8 +6,6 @@ CONFIG_ARM_BOARD_APPEND_ATAG=y
 CONFIG_CMD_ARM_MMUINFO=y
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
 CONFIG_ARM_UNWIND=y
-CONFIG_PBL_IMAGE=y
-CONFIG_PBL_RELOCATABLE=y
 CONFIG_MMU=y
 CONFIG_TEXT_BASE=0x0
 CONFIG_MALLOC_SIZE=0x0
diff --git a/arch/arm/configs/pcm051_mlo_defconfig b/arch/arm/configs/pcm051_mlo_defconfig
index 4f6a7b1..dc4165a 100644
--- a/arch/arm/configs/pcm051_mlo_defconfig
+++ b/arch/arm/configs/pcm051_mlo_defconfig
@@ -1,5 +1,3 @@
-CONFIG_BUILTIN_DTB=y
-CONFIG_BUILTIN_DTB_NAME="am335x-phytec-phycore"
 CONFIG_ARCH_OMAP=y
 CONFIG_OMAP_BUILD_IFT=y
 CONFIG_MACH_PCM051=y
@@ -8,9 +6,10 @@ CONFIG_THUMB2_BAREBOX=y
 # CONFIG_MEMINFO is not set
 CONFIG_ENVIRONMENT_VARIABLES=y
 CONFIG_MMU=y
-CONFIG_TEXT_BASE=0x402F0400
-CONFIG_STACK_SIZE=0x1600
-CONFIG_MALLOC_SIZE=0x1000000
+CONFIG_TEXT_BASE=0x0
+CONFIG_MALLOC_SIZE=0x0
+CONFIG_MALLOC_TLSF=y
+CONFIG_RELOCATABLE=y
 CONFIG_PROMPT="MLO>"
 CONFIG_SHELL_NONE=y
 # CONFIG_ERRNO_MESSAGES is not set
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 9e85d5a..6618660 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -28,6 +28,7 @@ pbl-$(CONFIG_MACH_FREESCALE_MX51_PDK) += imx51-babbage.dtb.o
 pbl-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += imx53-qsb.dtb.o
 pbl-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += imx53-voipac-bsb.dtb.o
 pbl-$(CONFIG_MACH_DFI_FS700_M60) += imx6q-dfi-fs700-m60-6q.dtb.o imx6dl-dfi-fs700-m60-6s.dtb.o
+pbl-$(CONFIG_MACH_PCM051) += am335x-phytec-phycore.dtb.o
 pbl-$(CONFIG_MACH_PHYTEC_PFLA02) += imx6q-phytec-pbab01.dtb.o
 pbl-$(CONFIG_MACH_REALQ7) += imx6q-dmo-realq7.dtb.o
 pbl-$(CONFIG_MACH_SOLIDRUN_CUBOX) += dove-cubox.dtb.o
diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
index 7cd7f89..1cfc22f 100644
--- a/arch/arm/mach-omap/Kconfig
+++ b/arch/arm/mach-omap/Kconfig
@@ -178,6 +178,7 @@ config MACH_PCM051
 	bool "Phytec phyCORE pcm051"
 	select HAVE_DEFAULT_ENVIRONMENT_NEW
 	select ARCH_AM33XX
+	select HAVE_PBL_MULTI_IMAGES
 	help
 	  Say Y here if you are using Phytecs phyCORE pcm051 board
 
diff --git a/images/Makefile b/images/Makefile
index b080a8c..4ff0602 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -100,6 +100,7 @@ $(obj)/%.img: $(obj)/$$(FILE_$$(@F))
 	$(Q)if [ -z $(FILE_$(@F)) ]; then echo "FILE_$(@F) empty!"; false; fi
 	$(call if_changed,shipped)
 
+include $(srctree)/images/Makefile.am33xx
 include $(srctree)/images/Makefile.imx
 include $(srctree)/images/Makefile.mvebu
 include $(srctree)/images/Makefile.socfpga
@@ -119,5 +120,5 @@ images: $(addprefix $(obj)/, $(image-y)) FORCE
 	@for i in $(image-y); do echo $$i; done
 
 clean-files := *.pbl *.pblb *.pblx *.map start_*.imximg *.img barebox.z start_*.kwbimg \
-	start_*.kwbuartimg *.socfpgaimg
+	start_*.kwbuartimg *.socfpgaimg *.mlo
 clean-files += pbl.lds
diff --git a/images/Makefile.am33xx b/images/Makefile.am33xx
new file mode 100644
index 0000000..8efef2a
--- /dev/null
+++ b/images/Makefile.am33xx
@@ -0,0 +1,22 @@
+
+# %.mlo - convert into mlo image
+# ----------------------------------------------------------------
+quiet_cmd_mlo_image = MLO     $@
+      cmd_mlo_image = scripts/omap_signGP -o $@ -l 0x402f0400 -c $<
+
+$(obj)/%.mlo: $(obj)/% FORCE
+	$(call if_changed,mlo_image)
+
+pblx-$(CONFIG_MACH_PCM051) += start_am33xx_phytec_phycore_sdram
+FILE_barebox-am33xx-phytec-phycore.img = start_am33xx_phytec_phycore_sdram.pblx
+am33xx-barebox-$(CONFIG_MACH_PCM051) += barebox-am33xx-phytec-phycore.img
+
+pblx-$(CONFIG_MACH_PCM051) += start_am33xx_phytec_phycore_sram
+FILE_barebox-am33xx-phytec-phycore-mlo.img = start_am33xx_phytec_phycore_sram.pblx.mlo
+am33xx-mlo-$(CONFIG_MACH_PCM051) += barebox-am33xx-phytec-phycore-mlo.img
+
+ifdef CONFIG_OMAP_BUILD_IFT
+image-y += $(am33xx-mlo-y)
+else
+image-y += $(am33xx-barebox-y)
+endif
-- 
1.8.4.2


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

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

* [PATCH 07/17] ARM: am33xx Phytec phyCORE: update defconfig
  2013-11-26 16:45 [PATCH] AM33xx devicetree support Sascha Hauer
                   ` (5 preceding siblings ...)
  2013-11-26 16:45 ` [PATCH 06/17] ARM: am33xx Phytec phyCORE: Switch to multiimage support Sascha Hauer
@ 2013-11-26 16:45 ` Sascha Hauer
  2013-11-26 16:45 ` [PATCH 08/17] ARM: dts: Add am33xx beaglebone(black) dts files Sascha Hauer
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 24+ messages in thread
From: Sascha Hauer @ 2013-11-26 16:45 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/configs/pcm051_defconfig | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/configs/pcm051_defconfig b/arch/arm/configs/pcm051_defconfig
index 482329a..949c82f 100644
--- a/arch/arm/configs/pcm051_defconfig
+++ b/arch/arm/configs/pcm051_defconfig
@@ -19,6 +19,7 @@ CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_MENU=y
 # CONFIG_TIMESTAMP is not set
+CONFIG_BLSPEC=y
 CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
 CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/pcm051/env"
 CONFIG_DEBUG_INFO=y
@@ -34,6 +35,8 @@ CONFIG_CMD_TIME=y
 CONFIG_CMD_TFTP=y
 CONFIG_CMD_ECHO_E=y
 CONFIG_CMD_LOADB=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_IOMEM=y
 CONFIG_CMD_CRC=y
 CONFIG_CMD_CRC_CMP=y
 CONFIG_CMD_MD5SUM=y
@@ -52,6 +55,10 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_UNCOMPRESS=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_SPI=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LED_TRIGGER=y
+CONFIG_CMD_MIITOOL=y
+CONFIG_CMD_DETECT=y
 CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_NFS=y
@@ -73,6 +80,10 @@ CONFIG_USB=y
 CONFIG_MCI=y
 CONFIG_MCI_STARTUP=y
 CONFIG_MCI_OMAP_HSMMC=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_GPIO_OF=y
+CONFIG_LED_TRIGGERS=y
 CONFIG_EEPROM_AT24=y
 CONFIG_GPIO_GENERIC_PLATFORM=y
 CONFIG_PINCTRL=y
-- 
1.8.4.2


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

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

* [PATCH 08/17] ARM: dts: Add am33xx beaglebone(black) dts files
  2013-11-26 16:45 [PATCH] AM33xx devicetree support Sascha Hauer
                   ` (6 preceding siblings ...)
  2013-11-26 16:45 ` [PATCH 07/17] ARM: am33xx Phytec phyCORE: update defconfig Sascha Hauer
@ 2013-11-26 16:45 ` Sascha Hauer
  2013-11-26 16:45 ` [PATCH 09/17] ARM: am33xx: beaglebone: remove mlo_large_defconfig Sascha Hauer
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 24+ messages in thread
From: Sascha Hauer @ 2013-11-26 16:45 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/dts/Makefile                |   2 +
 arch/arm/dts/am335x-bone-common.dtsi | 299 +++++++++++++++++++++++++++++++++++
 arch/arm/dts/am335x-bone.dts         |  29 ++++
 arch/arm/dts/am335x-boneblack.dts    |  78 +++++++++
 arch/arm/dts/tps65217.dtsi           |  56 +++++++
 5 files changed, 464 insertions(+)
 create mode 100644 arch/arm/dts/am335x-bone-common.dtsi
 create mode 100644 arch/arm/dts/am335x-bone.dts
 create mode 100644 arch/arm/dts/am335x-boneblack.dts
 create mode 100644 arch/arm/dts/tps65217.dtsi

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 6618660..cff294b 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -1,4 +1,6 @@
 dtb-$(CONFIG_ARCH_AM33XX) += \
+	am335x-bone.dtb \
+	am335x-boneblack.dtb \
 	am335x-phytec-phycore.dtb
 dtb-$(CONFIG_ARCH_IMX51) += imx51-babbage.dtb \
 	imx51-genesi-efika-sb.dtb
diff --git a/arch/arm/dts/am335x-bone-common.dtsi b/arch/arm/dts/am335x-bone-common.dtsi
new file mode 100644
index 0000000..e3f27ec
--- /dev/null
+++ b/arch/arm/dts/am335x-bone-common.dtsi
@@ -0,0 +1,299 @@
+/*
+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * 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.
+ */
+
+/ {
+	model = "TI AM335x BeagleBone";
+	compatible = "ti,am335x-bone", "ti,am33xx";
+
+	cpus {
+		cpu@0 {
+			cpu0-supply = <&dcdc2_reg>;
+		};
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x10000000>; /* 256 MB */
+	};
+
+	leds {
+		pinctrl-names = "default";
+		pinctrl-0 = <&user_leds_s0>;
+
+		compatible = "gpio-leds";
+
+		led@2 {
+			label = "beaglebone:green:heartbeat";
+			gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "heartbeat";
+			default-state = "off";
+		};
+
+		led@3 {
+			label = "beaglebone:green:mmc0";
+			gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "mmc0";
+			default-state = "off";
+		};
+
+		led@4 {
+			label = "beaglebone:green:usr2";
+			gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "cpu0";
+			default-state = "off";
+		};
+
+		led@5 {
+			label = "beaglebone:green:usr3";
+			gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "mmc1";
+			default-state = "off";
+		};
+	};
+
+	vmmcsd_fixed: fixedregulator@0 {
+		compatible = "regulator-fixed";
+		regulator-name = "vmmcsd_fixed";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+	};
+};
+
+&am33xx_pinmux {
+	pinctrl-names = "default";
+	pinctrl-0 = <&clkout2_pin>;
+
+	user_leds_s0: user_leds_s0 {
+		pinctrl-single,pins = <
+			0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a5.gpio1_21 */
+			0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7)	/* gpmc_a6.gpio1_22 */
+			0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a7.gpio1_23 */
+			0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7)	/* gpmc_a8.gpio1_24 */
+		>;
+	};
+
+	i2c0_pins: pinmux_i2c0_pins {
+		pinctrl-single,pins = <
+			0x188 (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c0_sda.i2c0_sda */
+			0x18c (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c0_scl.i2c0_scl */
+		>;
+	};
+
+	uart0_pins: pinmux_uart0_pins {
+		pinctrl-single,pins = <
+			0x170 (PIN_INPUT_PULLUP | MUX_MODE0)	/* uart0_rxd.uart0_rxd */
+			0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* uart0_txd.uart0_txd */
+		>;
+	};
+
+	clkout2_pin: pinmux_clkout2_pin {
+		pinctrl-single,pins = <
+			0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)	/* xdma_event_intr1.clkout2 */
+		>;
+	};
+
+	cpsw_default: cpsw_default {
+		pinctrl-single,pins = <
+			/* Slave 1 */
+			0x110 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxerr.mii1_rxerr */
+			0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txen.mii1_txen */
+			0x118 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxdv.mii1_rxdv */
+			0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txd3.mii1_txd3 */
+			0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txd2.mii1_txd2 */
+			0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txd1.mii1_txd1 */
+			0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txd0.mii1_txd0 */
+			0x12c (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_txclk.mii1_txclk */
+			0x130 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxclk.mii1_rxclk */
+			0x134 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxd3.mii1_rxd3 */
+			0x138 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxd2.mii1_rxd2 */
+			0x13c (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxd1.mii1_rxd1 */
+			0x140 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxd0.mii1_rxd0 */
+		>;
+	};
+
+	cpsw_sleep: cpsw_sleep {
+		pinctrl-single,pins = <
+			/* Slave 1 reset value */
+			0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+		>;
+	};
+
+	davinci_mdio_default: davinci_mdio_default {
+		pinctrl-single,pins = <
+			/* MDIO */
+			0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)	/* mdio_data.mdio_data */
+			0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)			/* mdio_clk.mdio_clk */
+		>;
+	};
+
+	davinci_mdio_sleep: davinci_mdio_sleep {
+		pinctrl-single,pins = <
+			/* MDIO reset value */
+			0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+		>;
+	};
+
+	mmc1_pins: pinmux_mmc1_pins {
+		pinctrl-single,pins = <
+			0x160 (PIN_INPUT | MUX_MODE7) /* GPIO0_6 */
+		>;
+	};
+
+	emmc_pins: pinmux_emmc_pins {
+		pinctrl-single,pins = <
+			0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
+			0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
+			0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
+			0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
+			0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
+			0x0c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
+			0x10 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */
+			0x14 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */
+			0x18 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */
+			0x1c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
+		>;
+	};
+};
+
+&uart0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart0_pins>;
+
+	status = "okay";
+};
+
+&usb {
+	status = "okay";
+
+	control@44e10000 {
+		status = "okay";
+	};
+
+	usb-phy@47401300 {
+		status = "okay";
+	};
+
+	usb-phy@47401b00 {
+		status = "okay";
+	};
+
+	usb@47401000 {
+		status = "okay";
+	};
+
+	usb@47401800 {
+		status = "okay";
+		dr_mode = "host";
+	};
+
+	dma-controller@07402000  {
+		status = "okay";
+	};
+};
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins>;
+
+	status = "okay";
+	clock-frequency = <400000>;
+
+	tps: tps@24 {
+		reg = <0x24>;
+	};
+
+};
+
+/include/ "tps65217.dtsi"
+
+&tps {
+	regulators {
+		dcdc1_reg: regulator@0 {
+			regulator-always-on;
+		};
+
+		dcdc2_reg: regulator@1 {
+			/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
+			regulator-name = "vdd_mpu";
+			regulator-min-microvolt = <925000>;
+			regulator-max-microvolt = <1325000>;
+			regulator-boot-on;
+			regulator-always-on;
+		};
+
+		dcdc3_reg: regulator@2 {
+			/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
+			regulator-name = "vdd_core";
+			regulator-min-microvolt = <925000>;
+			regulator-max-microvolt = <1150000>;
+			regulator-boot-on;
+			regulator-always-on;
+		};
+
+		ldo1_reg: regulator@3 {
+			regulator-always-on;
+		};
+
+		ldo2_reg: regulator@4 {
+			regulator-always-on;
+		};
+
+		ldo3_reg: regulator@5 {
+			regulator-always-on;
+		};
+
+		ldo4_reg: regulator@6 {
+			regulator-always-on;
+		};
+	};
+};
+
+&cpsw_emac0 {
+	phy_id = <&davinci_mdio>, <0>;
+	phy-mode = "mii";
+};
+
+&cpsw_emac1 {
+	phy_id = <&davinci_mdio>, <1>;
+	phy-mode = "mii";
+};
+
+&mac {
+	pinctrl-names = "default", "sleep";
+	pinctrl-0 = <&cpsw_default>;
+	pinctrl-1 = <&cpsw_sleep>;
+
+};
+
+&davinci_mdio {
+	pinctrl-names = "default", "sleep";
+	pinctrl-0 = <&davinci_mdio_default>;
+	pinctrl-1 = <&davinci_mdio_sleep>;
+};
+
+&mmc1 {
+	status = "okay";
+	bus-width = <0x4>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pins>;
+	cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
+	cd-inverted;
+};
diff --git a/arch/arm/dts/am335x-bone.dts b/arch/arm/dts/am335x-bone.dts
new file mode 100644
index 0000000..94ee427
--- /dev/null
+++ b/arch/arm/dts/am335x-bone.dts
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * 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.
+ */
+/dts-v1/;
+
+#include "am33xx.dtsi"
+#include "am335x-bone-common.dtsi"
+
+&ldo3_reg {
+	regulator-min-microvolt = <1800000>;
+	regulator-max-microvolt = <3300000>;
+	regulator-always-on;
+};
+
+&mmc1 {
+	vmmc-supply = <&ldo3_reg>;
+};
+
+&sham {
+	status = "okay";
+};
+
+&aes {
+	status = "okay";
+};
diff --git a/arch/arm/dts/am335x-boneblack.dts b/arch/arm/dts/am335x-boneblack.dts
new file mode 100644
index 0000000..6b71ad9
--- /dev/null
+++ b/arch/arm/dts/am335x-boneblack.dts
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * 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.
+ */
+/dts-v1/;
+
+#include "am33xx.dtsi"
+#include "am335x-bone-common.dtsi"
+
+&ldo3_reg {
+	regulator-min-microvolt = <1800000>;
+	regulator-max-microvolt = <1800000>;
+	regulator-always-on;
+};
+
+&mmc1 {
+	vmmc-supply = <&vmmcsd_fixed>;
+};
+
+&mmc2 {
+	vmmc-supply = <&vmmcsd_fixed>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&emmc_pins>;
+	bus-width = <8>;
+	status = "okay";
+	ti,vcc-aux-disable-is-sleep;
+};
+
+&am33xx_pinmux {
+	nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins {
+		pinctrl-single,pins = <
+			0x1b0 0x03      /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */
+			0xa0 0x08       /* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+			0xa4 0x08       /* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+			0xa8 0x08       /* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+			0xac 0x08       /* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+			0xb0 0x08       /* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+			0xb4 0x08       /* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+			0xb8 0x08       /* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+			0xbc 0x08       /* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+			0xc0 0x08       /* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+			0xc4 0x08       /* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+			0xc8 0x08       /* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+			0xcc 0x08       /* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+			0xd0 0x08       /* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+			0xd4 0x08       /* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+			0xd8 0x08       /* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+			0xdc 0x08       /* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
+			0xe0 0x00       /* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
+			0xe4 0x00       /* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
+			0xe8 0x00       /* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
+			0xec 0x00       /* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
+		>;
+	};
+	nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins {
+		pinctrl-single,pins = <
+			0x1b0 0x03      /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */
+		>;
+	};
+};
+
+&lcdc {
+	status = "okay";
+};
+
+/ {
+	hdmi {
+		compatible = "ti,tilcdc,slave";
+		i2c = <&i2c0>;
+		pinctrl-names = "default", "off";
+		pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
+		pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;
+		status = "okay";
+	};
+};
diff --git a/arch/arm/dts/tps65217.dtsi b/arch/arm/dts/tps65217.dtsi
new file mode 100644
index 0000000..a632724
--- /dev/null
+++ b/arch/arm/dts/tps65217.dtsi
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * 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.
+ */
+
+/*
+ * Integrated Power Management Chip
+ * http://www.ti.com/lit/ds/symlink/tps65217.pdf
+ */
+
+&tps {
+	compatible = "ti,tps65217";
+
+	regulators {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		dcdc1_reg: regulator@0 {
+			reg = <0>;
+			regulator-compatible = "dcdc1";
+		};
+
+		dcdc2_reg: regulator@1 {
+			reg = <1>;
+			regulator-compatible = "dcdc2";
+		};
+
+		dcdc3_reg: regulator@2 {
+			reg = <2>;
+			regulator-compatible = "dcdc3";
+		};
+
+		ldo1_reg: regulator@3 {
+			reg = <3>;
+			regulator-compatible = "ldo1";
+		};
+
+		ldo2_reg: regulator@4 {
+			reg = <4>;
+			regulator-compatible = "ldo2";
+		};
+
+		ldo3_reg: regulator@5 {
+			reg = <5>;
+			regulator-compatible = "ldo3";
+		};
+
+		ldo4_reg: regulator@6 {
+			reg = <6>;
+			regulator-compatible = "ldo4";
+		};
+	};
+};
-- 
1.8.4.2


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

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

* [PATCH 09/17] ARM: am33xx: beaglebone: remove mlo_large_defconfig
  2013-11-26 16:45 [PATCH] AM33xx devicetree support Sascha Hauer
                   ` (7 preceding siblings ...)
  2013-11-26 16:45 ` [PATCH 08/17] ARM: dts: Add am33xx beaglebone(black) dts files Sascha Hauer
@ 2013-11-26 16:45 ` Sascha Hauer
  2013-11-26 16:46 ` [PATCH 10/17] ARM: beaglebone: Add memory to devicetrees Sascha Hauer
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 24+ messages in thread
From: Sascha Hauer @ 2013-11-26 16:45 UTC (permalink / raw)
  To: barebox

As with devicetree support the binary will get too large for the
SRAM drop the configuration. It was mainly meant for debugging purposes
anyway.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/configs/am335x_beaglebone_mlo_defconfig   | 29 ++++++++++++
 .../configs/am335x_beaglebone_mlo_large_defconfig  | 55 ----------------------
 .../configs/am335x_beaglebone_mlo_small_defconfig  | 29 ------------
 3 files changed, 29 insertions(+), 84 deletions(-)
 create mode 100644 arch/arm/configs/am335x_beaglebone_mlo_defconfig
 delete mode 100644 arch/arm/configs/am335x_beaglebone_mlo_large_defconfig
 delete mode 100644 arch/arm/configs/am335x_beaglebone_mlo_small_defconfig

diff --git a/arch/arm/configs/am335x_beaglebone_mlo_defconfig b/arch/arm/configs/am335x_beaglebone_mlo_defconfig
new file mode 100644
index 0000000..ea29c24
--- /dev/null
+++ b/arch/arm/configs/am335x_beaglebone_mlo_defconfig
@@ -0,0 +1,29 @@
+CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_AM33XX=y
+# CONFIG_OMAP_GPMC is not set
+CONFIG_OMAP_BUILD_IFT=y
+CONFIG_THUMB2_BAREBOX=y
+# CONFIG_CMD_ARM_CPUINFO is not set
+# CONFIG_BANNER is not set
+# CONFIG_MEMINFO is not set
+CONFIG_ENVIRONMENT_VARIABLES=y
+CONFIG_MMU=y
+CONFIG_TEXT_BASE=0x402F0400
+CONFIG_STACK_SIZE=0x1600
+CONFIG_MALLOC_SIZE=0x1000000
+CONFIG_MALLOC_TLSF=y
+CONFIG_PROMPT="MLO>"
+CONFIG_SHELL_NONE=y
+# CONFIG_ERRNO_MESSAGES is not set
+# CONFIG_TIMESTAMP is not set
+# CONFIG_DEFAULT_ENVIRONMENT is not set
+CONFIG_DRIVER_SERIAL_NS16550=y
+CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
+# CONFIG_SPI is not set
+CONFIG_MCI=y
+# CONFIG_MCI_WRITE is not set
+CONFIG_MCI_OMAP_HSMMC=y
+# CONFIG_FS_RAMFS is not set
+# CONFIG_FS_DEVFS is not set
+CONFIG_FS_FAT=y
+CONFIG_FS_FAT_LFN=y
diff --git a/arch/arm/configs/am335x_beaglebone_mlo_large_defconfig b/arch/arm/configs/am335x_beaglebone_mlo_large_defconfig
deleted file mode 100644
index d90f581..0000000
--- a/arch/arm/configs/am335x_beaglebone_mlo_large_defconfig
+++ /dev/null
@@ -1,55 +0,0 @@
-CONFIG_ARCH_OMAP=y
-CONFIG_ARCH_AM33XX=y
-# CONFIG_OMAP_GPMC is not set
-CONFIG_OMAP_BUILD_IFT=y
-CONFIG_THUMB2_BAREBOX=y
-# CONFIG_CMD_ARM_CPUINFO is not set
-CONFIG_MMU=y
-CONFIG_TEXT_BASE=0x402F0400
-CONFIG_MEMORY_LAYOUT_FIXED=y
-CONFIG_STACK_BASE=0x4030B800
-CONFIG_STACK_SIZE=0x1600
-CONFIG_MALLOC_BASE=0x8F000000
-CONFIG_MALLOC_SIZE=0x1000000
-CONFIG_PROMPT="barebox> "
-CONFIG_HUSH_FANCY_PROMPT=y
-CONFIG_CMDLINE_EDITING=y
-CONFIG_AUTO_COMPLETE=y
-# CONFIG_TIMESTAMP is not set
-CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/beaglebone/env"
-CONFIG_BAREBOXENV_TARGET=y
-CONFIG_CMD_EDIT=y
-CONFIG_CMD_SLEEP=y
-CONFIG_CMD_EXPORT=y
-CONFIG_CMD_PRINTENV=y
-CONFIG_CMD_READLINE=y
-# CONFIG_CMD_UMOUNT is not set
-# CONFIG_CMD_CLEAR is not set
-CONFIG_CMD_ECHO_E=y
-CONFIG_CMD_IOMEM=y
-CONFIG_CMD_CRC=y
-CONFIG_CMD_CRC_CMP=y
-CONFIG_CMD_BOOTM_SHOW_TYPE=y
-CONFIG_CMD_BOOTM_VERBOSE=y
-CONFIG_CMD_BOOTM_INITRD=y
-CONFIG_CMD_BOOTM_OFTREE=y
-CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y
-# CONFIG_CMD_BOOTU is not set
-CONFIG_CMD_RESET=y
-CONFIG_CMD_GO=y
-CONFIG_CMD_OFTREE=y
-CONFIG_CMD_TIMEOUT=y
-# CONFIG_CMD_VERSION is not set
-CONFIG_CMD_MAGICVAR=y
-CONFIG_CMD_MAGICVAR_HELP=y
-CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
-# CONFIG_SPI is not set
-CONFIG_MCI=y
-CONFIG_MCI_STARTUP=y
-# CONFIG_MCI_INFO is not set
-# CONFIG_MCI_WRITE is not set
-CONFIG_MCI_OMAP_HSMMC=y
-CONFIG_FS_FAT=y
-CONFIG_FS_FAT_LFN=y
diff --git a/arch/arm/configs/am335x_beaglebone_mlo_small_defconfig b/arch/arm/configs/am335x_beaglebone_mlo_small_defconfig
deleted file mode 100644
index ea29c24..0000000
--- a/arch/arm/configs/am335x_beaglebone_mlo_small_defconfig
+++ /dev/null
@@ -1,29 +0,0 @@
-CONFIG_ARCH_OMAP=y
-CONFIG_ARCH_AM33XX=y
-# CONFIG_OMAP_GPMC is not set
-CONFIG_OMAP_BUILD_IFT=y
-CONFIG_THUMB2_BAREBOX=y
-# CONFIG_CMD_ARM_CPUINFO is not set
-# CONFIG_BANNER is not set
-# CONFIG_MEMINFO is not set
-CONFIG_ENVIRONMENT_VARIABLES=y
-CONFIG_MMU=y
-CONFIG_TEXT_BASE=0x402F0400
-CONFIG_STACK_SIZE=0x1600
-CONFIG_MALLOC_SIZE=0x1000000
-CONFIG_MALLOC_TLSF=y
-CONFIG_PROMPT="MLO>"
-CONFIG_SHELL_NONE=y
-# CONFIG_ERRNO_MESSAGES is not set
-# CONFIG_TIMESTAMP is not set
-# CONFIG_DEFAULT_ENVIRONMENT is not set
-CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
-# CONFIG_SPI is not set
-CONFIG_MCI=y
-# CONFIG_MCI_WRITE is not set
-CONFIG_MCI_OMAP_HSMMC=y
-# CONFIG_FS_RAMFS is not set
-# CONFIG_FS_DEVFS is not set
-CONFIG_FS_FAT=y
-CONFIG_FS_FAT_LFN=y
-- 
1.8.4.2


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

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

* [PATCH 10/17] ARM: beaglebone: Add memory to devicetrees
  2013-11-26 16:45 [PATCH] AM33xx devicetree support Sascha Hauer
                   ` (8 preceding siblings ...)
  2013-11-26 16:45 ` [PATCH 09/17] ARM: am33xx: beaglebone: remove mlo_large_defconfig Sascha Hauer
@ 2013-11-26 16:46 ` Sascha Hauer
  2013-11-26 16:46 ` [PATCH 11/17] ARM: beaglebone: Switch to devicetree and multiimage Sascha Hauer
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 24+ messages in thread
From: Sascha Hauer @ 2013-11-26 16:46 UTC (permalink / raw)
  To: barebox

barebox needs it to initialize the memory. While at it, give the
beabglebone black another name than the original beaglebone has.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/dts/am335x-bone-common.dtsi |  3 ---
 arch/arm/dts/am335x-bone.dts         | 10 ++++++++++
 arch/arm/dts/am335x-boneblack.dts    | 10 ++++++++++
 3 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/arch/arm/dts/am335x-bone-common.dtsi b/arch/arm/dts/am335x-bone-common.dtsi
index e3f27ec..1ecf0b3 100644
--- a/arch/arm/dts/am335x-bone-common.dtsi
+++ b/arch/arm/dts/am335x-bone-common.dtsi
@@ -7,9 +7,6 @@
  */
 
 / {
-	model = "TI AM335x BeagleBone";
-	compatible = "ti,am335x-bone", "ti,am33xx";
-
 	cpus {
 		cpu@0 {
 			cpu0-supply = <&dcdc2_reg>;
diff --git a/arch/arm/dts/am335x-bone.dts b/arch/arm/dts/am335x-bone.dts
index 94ee427..a2e62a3 100644
--- a/arch/arm/dts/am335x-bone.dts
+++ b/arch/arm/dts/am335x-bone.dts
@@ -10,6 +10,16 @@
 #include "am33xx.dtsi"
 #include "am335x-bone-common.dtsi"
 
+/ {
+	model = "TI AM335x BeagleBone";
+	compatible = "ti,am335x-bone", "ti,am33xx";
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x10000000>; /* 256 MB */
+	};
+};
+
 &ldo3_reg {
 	regulator-min-microvolt = <1800000>;
 	regulator-max-microvolt = <3300000>;
diff --git a/arch/arm/dts/am335x-boneblack.dts b/arch/arm/dts/am335x-boneblack.dts
index 6b71ad9..f79a6bc 100644
--- a/arch/arm/dts/am335x-boneblack.dts
+++ b/arch/arm/dts/am335x-boneblack.dts
@@ -10,6 +10,16 @@
 #include "am33xx.dtsi"
 #include "am335x-bone-common.dtsi"
 
+/ {
+	model = "TI AM335x BeagleBone black";
+	compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
+
+	memory {
+		device_type = "memory";
+		reg = <0x80000000 0x20000000>; /* 512 MB */
+	};
+};
+
 &ldo3_reg {
 	regulator-min-microvolt = <1800000>;
 	regulator-max-microvolt = <1800000>;
-- 
1.8.4.2


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

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

* [PATCH 11/17] ARM: beaglebone: Switch to devicetree and multiimage
  2013-11-26 16:45 [PATCH] AM33xx devicetree support Sascha Hauer
                   ` (9 preceding siblings ...)
  2013-11-26 16:46 ` [PATCH 10/17] ARM: beaglebone: Add memory to devicetrees Sascha Hauer
@ 2013-11-26 16:46 ` Sascha Hauer
  2013-11-26 16:46 ` [PATCH 12/17] ARM: am335x Phytec phyCORE: Move partition descriptions to devicetree Sascha Hauer
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 24+ messages in thread
From: Sascha Hauer @ 2013-11-26 16:46 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/beaglebone/beaglebone.h          |   2 +
 arch/arm/boards/beaglebone/board.c               | 121 ++---------------------
 arch/arm/boards/beaglebone/lowlevel.c            |  67 ++++++++++---
 arch/arm/configs/am335x_beaglebone_defconfig     |   7 +-
 arch/arm/configs/am335x_beaglebone_mlo_defconfig |  11 ++-
 arch/arm/dts/Makefile                            |   1 +
 arch/arm/mach-omap/Kconfig                       |   1 +
 images/Makefile.am33xx                           |   8 ++
 8 files changed, 86 insertions(+), 132 deletions(-)

diff --git a/arch/arm/boards/beaglebone/beaglebone.h b/arch/arm/boards/beaglebone/beaglebone.h
index 25c5b0e..a4f48e5 100644
--- a/arch/arm/boards/beaglebone/beaglebone.h
+++ b/arch/arm/boards/beaglebone/beaglebone.h
@@ -1,6 +1,8 @@
 #ifndef __BOARD_BEAGLEBONE_H
 #define __BOARD_BEAGLEBONE_H
 
+#include <mach/am33xx-generic.h>
+
 static inline int is_beaglebone_black(void)
 {
 	return am33xx_get_cpu_rev() != AM335X_ES1_0;
diff --git a/arch/arm/boards/beaglebone/board.c b/arch/arm/boards/beaglebone/board.c
index dfeb47c..66e8438 100644
--- a/arch/arm/boards/beaglebone/board.c
+++ b/arch/arm/boards/beaglebone/board.c
@@ -22,142 +22,34 @@
  */
 
 #include <common.h>
-#include <console.h>
 #include <init.h>
 #include <driver.h>
 #include <envfs.h>
 #include <environment.h>
 #include <globalvar.h>
 #include <sizes.h>
-#include <io.h>
-#include <ns16550.h>
 #include <net.h>
 #include <bootsource.h>
 #include <asm/armlinux.h>
 #include <generated/mach-types.h>
 #include <mach/am33xx-silicon.h>
-#include <mach/am33xx-clock.h>
-#include <mach/sdrc.h>
 #include <mach/sys_info.h>
 #include <mach/syslib.h>
 #include <mach/gpmc.h>
-#include <mach/ehci.h>
-#include <i2c/i2c.h>
 #include <linux/err.h>
-#include <linux/phy.h>
-#include <usb/ehci.h>
-#include <mach/am33xx-devices.h>
-#include <mach/am33xx-mux.h>
-#include <mach/wdt.h>
-#include <mach/am33xx-generic.h>
-#include <mach/cpsw.h>
 
 #include "beaglebone.h"
 
-#ifdef CONFIG_DRIVER_SERIAL_NS16550
-
-/**
- * @brief UART serial port initialization - remember to enable COM clocks in
- * arch
- *
- * @return result of device registration
- */
-static int beaglebone_console_init(void)
-{
-	barebox_set_model("Texas Instruments beaglebone");
-	barebox_set_hostname("beaglebone");
-
-	am33xx_add_uart0();
-
-	return 0;
-}
-console_initcall(beaglebone_console_init);
-#endif /* CONFIG_DRIVER_SERIAL_NS16550 */
-
-static int beaglebone_mem_init(void)
-{
-	if (is_beaglebone_black())
-		omap_add_ram0(SZ_512M);
-	else
-		omap_add_ram0(SZ_256M);
-
-	return 0;
-}
-mem_initcall(beaglebone_mem_init);
-
-static struct cpsw_slave_data cpsw_slaves[] = {
-	{
-		.phy_id		= 0,
-		.phy_if		= PHY_INTERFACE_MODE_MII,
-	},
-};
-
-static struct cpsw_platform_data cpsw_data = {
-	.slave_data		= cpsw_slaves,
-	.num_slaves		= ARRAY_SIZE(cpsw_slaves),
-};
-
-static void beaglebone_eth_init(void)
-{
-	am33xx_register_ethaddr(0, 0);
-
-	writel(0, AM33XX_MAC_MII_SEL);
-
-	am33xx_enable_mii1_pin_mux();
-
-	am33xx_add_cpsw(&cpsw_data);
-}
-
-static struct i2c_board_info i2c0_devices[] = {
-	{
-		I2C_BOARD_INFO("24c256", 0x50)
-	},
-};
-
-static const __maybe_unused struct module_pin_mux mmc1_pin_mux[] = {
-	{OFFSET(gpmc_ad0), (MODE(1) | RXACTIVE)},	/* MMC1_DAT0 */
-	{OFFSET(gpmc_ad1), (MODE(1) | RXACTIVE)},	/* MMC1_DAT1 */
-	{OFFSET(gpmc_ad2), (MODE(1) | RXACTIVE)},	/* MMC1_DAT2 */
-	{OFFSET(gpmc_ad3), (MODE(1) | RXACTIVE)},	/* MMC1_DAT3 */
-	{OFFSET(gpmc_ad4), (MODE(1) | RXACTIVE)},	/* MMC1_DAT4 */
-	{OFFSET(gpmc_ad5), (MODE(1) | RXACTIVE)},	/* MMC1_DAT5 */
-	{OFFSET(gpmc_ad6), (MODE(1) | RXACTIVE)},	/* MMC1_DAT6 */
-	{OFFSET(gpmc_ad7), (MODE(1) | RXACTIVE)},	/* MMC1_DAT7 */
-	{OFFSET(gpmc_csn1), (MODE(2) | RXACTIVE | PULLUP_EN)},	/* MMC1_CLK */
-	{OFFSET(gpmc_csn2), (MODE(2) | RXACTIVE | PULLUP_EN)},	/* MMC1_CMD */
-	{-1},
-};
-
-static struct omap_hsmmc_platform_data beaglebone_sd = {
-	.devname = "sd",
-};
-
-static struct omap_hsmmc_platform_data beaglebone_emmc = {
-	.devname = "emmc",
-};
-
 static int beaglebone_devices_init(void)
 {
-	am33xx_enable_mmc0_pin_mux();
-	am33xx_add_mmc0(&beaglebone_sd);
-
-	if (is_beaglebone_black()) {
-		configure_module_pin_mux(mmc1_pin_mux);
-		am33xx_add_mmc1(&beaglebone_emmc);
-	}
-
 	if (bootsource_get() == BOOTSOURCE_MMC) {
 		if (bootsource_get_instance() == 0)
-			omap_set_bootmmc_devname("sd");
+			omap_set_bootmmc_devname("mmc0");
 		else
-			omap_set_bootmmc_devname("emmc");
+			omap_set_bootmmc_devname("mmc1");
 	}
 
-	am33xx_enable_i2c0_pin_mux();
-	i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices));
-	am33xx_add_i2c0(NULL);
-
-	beaglebone_eth_init();
+	am33xx_register_ethaddr(0, 0);
 
 	return 0;
 }
@@ -165,7 +57,12 @@ device_initcall(beaglebone_devices_init);
 
 static int beaglebone_env_init(void)
 {
-	int black = is_beaglebone_black();
+	int black;
+
+	if (!of_machine_is_compatible("ti,am335x-bone"))
+		return 0;
+
+	black = is_beaglebone_black();
 
 	globalvar_add_simple("board.variant", black ? "boneblack" : "bone");
 
diff --git a/arch/arm/boards/beaglebone/lowlevel.c b/arch/arm/boards/beaglebone/lowlevel.c
index 992e3e4..92389a9 100644
--- a/arch/arm/boards/beaglebone/lowlevel.c
+++ b/arch/arm/boards/beaglebone/lowlevel.c
@@ -1,6 +1,7 @@
 #include <init.h>
 #include <sizes.h>
 #include <io.h>
+#include <linux/string.h>
 #include <debug_ll.h>
 #include <asm/barebox-arm-head.h>
 #include <asm/barebox-arm.h>
@@ -102,6 +103,11 @@ static const struct am33xx_emif_regs ddr3_regs = {
 	.sdram_ref_ctrl		= 0xC30,
 };
 
+extern char __dtb_am335x_boneblack_start[];
+extern char __dtb_am335x_boneblack_end[];
+extern char __dtb_am335x_bone_start[];
+extern char __dtb_am335x_bone_end[];
+
 /**
  * @brief The basic entry point for board initialization.
  *
@@ -111,8 +117,22 @@ static const struct am33xx_emif_regs ddr3_regs = {
  *
  * @return void
  */
-static int beaglebone_board_init(void)
+static noinline int beaglebone_sram_init(void)
 {
+	uint32_t fdt, fdt_end, sdram_start, sdram_size;
+
+	sdram_start = 0x80000000;
+
+	if (is_beaglebone_black()) {
+		sdram_size = SZ_512M;
+		fdt = (uint32_t)__dtb_am335x_boneblack_start;
+		fdt_end = (uint32_t)__dtb_am335x_boneblack_end;
+	} else {
+		sdram_size = SZ_256M;
+		fdt = (uint32_t)__dtb_am335x_bone_start;
+		fdt_end = (uint32_t)__dtb_am335x_bone_end;
+	}
+
 	/* WDT1 is already running when the bootloader gets control
 	 * Disable it to avoid "random" resets
 	 */
@@ -121,9 +141,6 @@ static int beaglebone_board_init(void)
 	__raw_writel(WDT_DISABLE_CODE2, AM33XX_WDT_REG(WSPR));
 	while(__raw_readl(AM33XX_WDT_REG(WWPS)) != 0x0);
 
-	if (am33xx_running_in_sdram())
-		return 0;
-
 	/* Setup the PLLs and the clocks for the peripherals */
 	if (is_beaglebone_black()) {
 		am33xx_pll_init(MPUPLL_M_500, 24, DDRPLL_M_400);
@@ -140,23 +157,43 @@ static int beaglebone_board_init(void)
 	omap_uart_lowlevel_init((void *)AM33XX_UART0_BASE);
 	putc_ll('>');
 
-	return 0;
+	/*
+	 * Copy the devicetree blob to sdram so that the barebox code finds it
+	 * inside valid SDRAM instead of SRAM.
+	 */
+	memcpy((void *)sdram_start, (void *)fdt, fdt_end - fdt);
+	fdt = sdram_start;
+
+	barebox_arm_entry(sdram_start, sdram_size, fdt);
 }
 
-void __bare_init __naked barebox_arm_reset_vector(uint32_t *data)
+ENTRY_FUNCTION(start_am33xx_beaglebone_sram, bootinfo, r1, r2)
 {
-	unsigned sdram;
+	am33xx_save_bootinfo((void *)bootinfo);
+
+	/*
+	 * Setup C environment, the board init code uses global variables.
+	 * Stackpointer has already been initialized by the ROM code.
+	 */
+	relocate_to_current_adr();
+	setup_c();
 
-	am33xx_save_bootinfo(data);
+	beaglebone_sram_init();
+}
 
-	arm_cpu_lowlevel_init();
+ENTRY_FUNCTION(start_am33xx_beaglebone_sdram, r0, r1, r2)
+{
+	uint32_t fdt, sdram_size;
 
-	beaglebone_board_init();
+	if (is_beaglebone_black()) {
+		sdram_size = SZ_512M;
+		fdt = (uint32_t)__dtb_am335x_boneblack_start;
+	} else {
+		sdram_size = SZ_256M;
+		fdt = (uint32_t)__dtb_am335x_bone_start;
+	}
 
-	if (is_beaglebone_black())
-		sdram = SZ_512M;
-	else
-		sdram = SZ_256M;
+	fdt -= get_runtime_offset();
 
-	barebox_arm_entry(0x80000000, sdram, 0);
+	barebox_arm_entry(0x80000000, sdram_size, fdt);
 }
diff --git a/arch/arm/configs/am335x_beaglebone_defconfig b/arch/arm/configs/am335x_beaglebone_defconfig
index 4bcee24..c80adc9 100644
--- a/arch/arm/configs/am335x_beaglebone_defconfig
+++ b/arch/arm/configs/am335x_beaglebone_defconfig
@@ -1,5 +1,6 @@
 CONFIG_ARCH_OMAP=y
-CONFIG_ARCH_AM33XX=y
+CONFIG_OMAP_MULTI_BOARDS=y
+CONFIG_MACH_BEAGLEBONE=y
 CONFIG_THUMB2_BAREBOX=y
 CONFIG_CMD_ARM_MMUINFO=y
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
@@ -63,6 +64,8 @@ CONFIG_NET_DHCP=y
 CONFIG_NET_PING=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
+CONFIG_OFDEVICE=y
+CONFIG_OF_BAREBOX_DRIVERS=y
 CONFIG_DRIVER_SERIAL_NS16550=y
 CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
 CONFIG_DRIVER_NET_CPSW=y
@@ -71,6 +74,8 @@ CONFIG_I2C=y
 CONFIG_I2C_OMAP=y
 CONFIG_MCI=y
 CONFIG_MCI_OMAP_HSMMC=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_SINGLE=y
 CONFIG_FS_TFTP=y
 CONFIG_FS_NFS=y
 CONFIG_FS_FAT=y
diff --git a/arch/arm/configs/am335x_beaglebone_mlo_defconfig b/arch/arm/configs/am335x_beaglebone_mlo_defconfig
index ea29c24..ac682cc 100644
--- a/arch/arm/configs/am335x_beaglebone_mlo_defconfig
+++ b/arch/arm/configs/am335x_beaglebone_mlo_defconfig
@@ -1,28 +1,31 @@
 CONFIG_ARCH_OMAP=y
-CONFIG_ARCH_AM33XX=y
 # CONFIG_OMAP_GPMC is not set
 CONFIG_OMAP_BUILD_IFT=y
+CONFIG_MACH_BEAGLEBONE=y
 CONFIG_THUMB2_BAREBOX=y
 # CONFIG_CMD_ARM_CPUINFO is not set
 # CONFIG_BANNER is not set
 # CONFIG_MEMINFO is not set
 CONFIG_ENVIRONMENT_VARIABLES=y
 CONFIG_MMU=y
-CONFIG_TEXT_BASE=0x402F0400
-CONFIG_STACK_SIZE=0x1600
-CONFIG_MALLOC_SIZE=0x1000000
+CONFIG_TEXT_BASE=0x0
+CONFIG_MALLOC_SIZE=0x0
 CONFIG_MALLOC_TLSF=y
+CONFIG_RELOCATABLE=y
 CONFIG_PROMPT="MLO>"
 CONFIG_SHELL_NONE=y
 # CONFIG_ERRNO_MESSAGES is not set
 # CONFIG_TIMESTAMP is not set
 # CONFIG_DEFAULT_ENVIRONMENT is not set
+CONFIG_OFDEVICE=y
 CONFIG_DRIVER_SERIAL_NS16550=y
 CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
 # CONFIG_SPI is not set
 CONFIG_MCI=y
 # CONFIG_MCI_WRITE is not set
 CONFIG_MCI_OMAP_HSMMC=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_SINGLE=y
 # CONFIG_FS_RAMFS is not set
 # CONFIG_FS_DEVFS is not set
 CONFIG_FS_FAT=y
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index cff294b..ec75b5b 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -25,6 +25,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += \
 BUILTIN_DTB := $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_NAME))
 obj-$(CONFIG_BUILTIN_DTB) += $(BUILTIN_DTB).dtb.o
 
+pbl-$(CONFIG_MACH_BEAGLEBONE) += am335x-bone.dtb.o am335x-boneblack.dtb.o
 pbl-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += imx51-genesi-efika-sb.dtb.o
 pbl-$(CONFIG_MACH_FREESCALE_MX51_PDK) += imx51-babbage.dtb.o
 pbl-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += imx53-qsb.dtb.o
diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
index 1cfc22f..3a53333 100644
--- a/arch/arm/mach-omap/Kconfig
+++ b/arch/arm/mach-omap/Kconfig
@@ -133,6 +133,7 @@ config MACH_BEAGLE
 config MACH_BEAGLEBONE
 	bool "Texas Instrument's Beagle Bone"
 	select ARCH_AM33XX
+	select HAVE_PBL_MULTI_IMAGES
 	help
 	  Say Y here if you are using Beagle Bone
 
diff --git a/images/Makefile.am33xx b/images/Makefile.am33xx
index 8efef2a..dacc2d1 100644
--- a/images/Makefile.am33xx
+++ b/images/Makefile.am33xx
@@ -15,6 +15,14 @@ pblx-$(CONFIG_MACH_PCM051) += start_am33xx_phytec_phycore_sram
 FILE_barebox-am33xx-phytec-phycore-mlo.img = start_am33xx_phytec_phycore_sram.pblx.mlo
 am33xx-mlo-$(CONFIG_MACH_PCM051) += barebox-am33xx-phytec-phycore-mlo.img
 
+pblx-$(CONFIG_MACH_BEAGLEBONE) += start_am33xx_beaglebone_sdram
+FILE_barebox-am33xx-beaglebone.img = start_am33xx_beaglebone_sdram.pblx
+am33xx-barebox-$(CONFIG_MACH_BEAGLEBONE) += barebox-am33xx-beaglebone.img
+
+pblx-$(CONFIG_MACH_BEAGLEBONE) += start_am33xx_beaglebone_sram
+FILE_barebox-am33xx-beaglebone-mlo.img = start_am33xx_beaglebone_sram.pblx.mlo
+am33xx-mlo-$(CONFIG_MACH_BEAGLEBONE) += barebox-am33xx-beaglebone-mlo.img
+
 ifdef CONFIG_OMAP_BUILD_IFT
 image-y += $(am33xx-mlo-y)
 else
-- 
1.8.4.2


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

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

* [PATCH 12/17] ARM: am335x Phytec phyCORE: Move partition descriptions to devicetree
  2013-11-26 16:45 [PATCH] AM33xx devicetree support Sascha Hauer
                   ` (10 preceding siblings ...)
  2013-11-26 16:46 ` [PATCH 11/17] ARM: beaglebone: Switch to devicetree and multiimage Sascha Hauer
@ 2013-11-26 16:46 ` Sascha Hauer
  2013-11-26 16:46 ` [PATCH 13/17] ARM: OMAP: Safe boot info in fixed SRAM address Sascha Hauer
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 24+ messages in thread
From: Sascha Hauer @ 2013-11-26 16:46 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/pcm051/env/init/mtdparts-nand | 11 -----
 arch/arm/boards/pcm051/env/init/mtdparts-nor  | 12 ------
 arch/arm/dts/am335x-phytec-phycore.dts        | 59 ++++++++++++++++++++++++++-
 3 files changed, 57 insertions(+), 25 deletions(-)
 delete mode 100644 arch/arm/boards/pcm051/env/init/mtdparts-nand
 delete mode 100644 arch/arm/boards/pcm051/env/init/mtdparts-nor

diff --git a/arch/arm/boards/pcm051/env/init/mtdparts-nand b/arch/arm/boards/pcm051/env/init/mtdparts-nand
deleted file mode 100644
index 12f0ffd..0000000
--- a/arch/arm/boards/pcm051/env/init/mtdparts-nand
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "NAND partitions"
-	exit
-fi
-
-mtdparts="128k(nand0.xload),128k(nand0.xload_backup1),128k(nand0.xload_backup2),128k(nand0.xload_backup3),512k(nand0.barebox)ro,128k(nand0.bareboxenv),8M(nand0.kernel),-(nand0.root)"
-kernelname="omap2-nand.0"
-
-mtdparts-add -b -d nand0 -k ${kernelname} -p ${mtdparts}
diff --git a/arch/arm/boards/pcm051/env/init/mtdparts-nor b/arch/arm/boards/pcm051/env/init/mtdparts-nor
deleted file mode 100644
index 5c762ad..0000000
--- a/arch/arm/boards/pcm051/env/init/mtdparts-nor
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	init-menu-add-entry "$0" "NOR partitions"
-	exit
-fi
-
-mtdparts="128k(m25p0.xload),512k(m25p0.barebox),128k(m25p0.bareboxenv),4M(m25p0.kernel),-(m25p0.root)"
-kernelname="spi_flash"
-
-mtdparts-add -d m25p0 -k ${kernelname} -p ${mtdparts}
-
diff --git a/arch/arm/dts/am335x-phytec-phycore.dts b/arch/arm/dts/am335x-phytec-phycore.dts
index 3888c67..8fbfae6 100644
--- a/arch/arm/dts/am335x-phytec-phycore.dts
+++ b/arch/arm/dts/am335x-phytec-phycore.dts
@@ -161,8 +161,23 @@
 		#size-cells = <1>;
 
 		partition@0 {
-			label = "barebox-environment";
-			reg = <0x80000 0x80000>;
+			label = "xload";
+			reg = <0x0 0x20000>;
+		};
+
+		partition@1 {
+			label = "barebox";
+			reg = <0x20000 0x80000>;
+		};
+
+		partition@2 {
+			label = "bareboxenv";
+			reg = <0xa0000 0x20000>;
+		};
+
+		partition@3 {
+			label = "kernel";
+			reg = <0xc0000 0x400000>;
 		};
 	};
 };
@@ -229,5 +244,45 @@
 		#address-cells = <1>;
 		#size-cells = <1>;
 		elm_id = <&elm>;
+
+		partition@0 {
+			label = "xload";
+			reg = <0x0 0x20000>;
+		};
+
+		partition@1 {
+			label = "xload_backup1";
+			reg = <0x20000 0x20000>;
+		};
+
+		partition@2 {
+			label = "xload_backup2";
+			reg = <0x40000 0x20000>;
+		};
+
+		partition@3 {
+			label = "xload_backup3";
+			reg = <0x60000 0x20000>;
+		};
+
+		partition@4 {
+			label = "barebox";
+			reg = <0x80000 0x80000>;
+		};
+
+		partition@5 {
+			label = "bareboxenv";
+			reg = <0x100000 0x20000>;
+		};
+
+		partition@6 {
+			label = "kernel";
+			reg = <0x120000 0x800000>;
+		};
+
+		partition@7 {
+			label = "root";
+			reg = <0x920000 0x1f6e0000>;
+		};
 	};
 };
-- 
1.8.4.2


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

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

* [PATCH 13/17] ARM: OMAP: Safe boot info in fixed SRAM address
  2013-11-26 16:45 [PATCH] AM33xx devicetree support Sascha Hauer
                   ` (11 preceding siblings ...)
  2013-11-26 16:46 ` [PATCH 12/17] ARM: am335x Phytec phyCORE: Move partition descriptions to devicetree Sascha Hauer
@ 2013-11-26 16:46 ` Sascha Hauer
  2013-11-26 16:46 ` [PATCH 14/17] ARM: am335x Phytec phyCORE: configure environment from devicetree Sascha Hauer
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 24+ messages in thread
From: Sascha Hauer @ 2013-11-26 16:46 UTC (permalink / raw)
  To: barebox

Storing the boot information in the image itself and passing a pointer
around between images is cumbersome and doesn't fit well with multiimage
support where the pointer we pass around is already occupied by the
devicetree.
Do the same as U-Boot does and store the boot information at the bottom
of the SRAM public stack.
To maintain the compatibility between new xloaders and older barebox
binaries we still pass the boot information to the next stage via pointer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-omap/Makefile                      |  4 ++--
 arch/arm/mach-omap/am33xx_generic.c              |  3 ++-
 arch/arm/mach-omap/include/mach/am33xx-generic.h |  3 ++-
 arch/arm/mach-omap/include/mach/am33xx-silicon.h |  1 +
 arch/arm/mach-omap/include/mach/generic.h        |  2 --
 arch/arm/mach-omap/include/mach/omap3-generic.h  |  2 +-
 arch/arm/mach-omap/include/mach/omap3-silicon.h  |  1 +
 arch/arm/mach-omap/include/mach/omap4-generic.h  |  2 +-
 arch/arm/mach-omap/include/mach/omap4-silicon.h  |  3 +--
 arch/arm/mach-omap/omap3_generic.c               |  3 ++-
 arch/arm/mach-omap/omap4_generic.c               |  3 ++-
 arch/arm/mach-omap/omap_bootinfo.S               | 25 ------------------------
 arch/arm/mach-omap/omap_generic.c                | 17 ++++++++++++----
 13 files changed, 28 insertions(+), 41 deletions(-)
 delete mode 100644 arch/arm/mach-omap/omap_bootinfo.S

diff --git a/arch/arm/mach-omap/Makefile b/arch/arm/mach-omap/Makefile
index 0d5428d..81a771e 100644
--- a/arch/arm/mach-omap/Makefile
+++ b/arch/arm/mach-omap/Makefile
@@ -15,8 +15,8 @@
 # GNU General Public License for more details.
 #
 #
-obj-$(CONFIG_ARCH_OMAP) += syslib.o omap_devices.o omap_generic.o omap_fb.o omap_bootinfo.o
-pbl-$(CONFIG_ARCH_OMAP) += syslib.o omap_bootinfo.o
+obj-$(CONFIG_ARCH_OMAP) += syslib.o omap_devices.o omap_generic.o omap_fb.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_generic.o auxcr.o
diff --git a/arch/arm/mach-omap/am33xx_generic.c b/arch/arm/mach-omap/am33xx_generic.c
index 68dc933..c227918 100644
--- a/arch/arm/mach-omap/am33xx_generic.c
+++ b/arch/arm/mach-omap/am33xx_generic.c
@@ -124,8 +124,9 @@ static int am33xx_bootsource(void)
 {
 	enum bootsource src;
 	int instance = 0;
+	uint32_t *am33xx_bootinfo = (void *)AM33XX_SRAM_SCRATCH_SPACE;
 
-	switch (omap_bootinfo[2] & 0xFF) {
+	switch (am33xx_bootinfo[2] & 0xFF) {
 	case 0x05:
 		src = BOOTSOURCE_NAND;
 		break;
diff --git a/arch/arm/mach-omap/include/mach/am33xx-generic.h b/arch/arm/mach-omap/include/mach/am33xx-generic.h
index e74a666..8472d07 100644
--- a/arch/arm/mach-omap/include/mach/am33xx-generic.h
+++ b/arch/arm/mach-omap/include/mach/am33xx-generic.h
@@ -11,6 +11,7 @@ u32 am33xx_get_cpu_rev(void);
 static inline void am33xx_save_bootinfo(uint32_t *info)
 {
 	unsigned long i = (unsigned long)info;
+	uint32_t *scratch = (void *)AM33XX_SRAM_SCRATCH_SPACE;
 
 	if (i & 0x3)
 		return;
@@ -19,7 +20,7 @@ static inline void am33xx_save_bootinfo(uint32_t *info)
 	if (i > AM33XX_SRAM0_START + AM33XX_SRAM0_SIZE)
 		return;
 
-	omap_save_bootinfo(info);
+	memcpy(scratch, info, 3 * sizeof(uint32_t));
 }
 
 u32 am33xx_running_in_flash(void);
diff --git a/arch/arm/mach-omap/include/mach/am33xx-silicon.h b/arch/arm/mach-omap/include/mach/am33xx-silicon.h
index 30b605a..16e665f 100644
--- a/arch/arm/mach-omap/include/mach/am33xx-silicon.h
+++ b/arch/arm/mach-omap/include/mach/am33xx-silicon.h
@@ -120,6 +120,7 @@
 /* OCMC */
 #define AM33XX_SRAM0_START			0x402f0400
 #define AM33XX_SRAM0_SIZE			(SZ_128K - SZ_1K)
+#define AM33XX_SRAM_SCRATCH_SPACE		0x4030b800 /* start of public stack */
 #define AM33XX_SRAM_GPMC_STACK_SIZE		(0x40)
 
 /* DDR offsets */
diff --git a/arch/arm/mach-omap/include/mach/generic.h b/arch/arm/mach-omap/include/mach/generic.h
index f4e18f3..a2a48cc 100644
--- a/arch/arm/mach-omap/include/mach/generic.h
+++ b/arch/arm/mach-omap/include/mach/generic.h
@@ -73,8 +73,6 @@ static inline int omap_set_mmc_dev(const char *mmcdev)
 }
 #endif
 
-extern uint32_t omap_bootinfo[3];
-void omap_save_bootinfo(void *data);
 void __noreturn omap_start_barebox(void *barebox);
 
 void omap_set_bootmmc_devname(const char *devname);
diff --git a/arch/arm/mach-omap/include/mach/omap3-generic.h b/arch/arm/mach-omap/include/mach/omap3-generic.h
index 2210d87..5e29bac 100644
--- a/arch/arm/mach-omap/include/mach/omap3-generic.h
+++ b/arch/arm/mach-omap/include/mach/omap3-generic.h
@@ -16,7 +16,7 @@ static inline void omap3_save_bootinfo(uint32_t *info)
 	if (i > OMAP3_SRAM_BASE + SZ_64K)
 		return;
 
-	omap_save_bootinfo(info);
+	memcpy((void *)OMAP3_SRAM_SCRATCH_SPACE, info, 3 * sizeof(uint32_t));
 }
 
 u32 omap3_running_in_flash(void);
diff --git a/arch/arm/mach-omap/include/mach/omap3-silicon.h b/arch/arm/mach-omap/include/mach/omap3-silicon.h
index 9138057..b4de045 100644
--- a/arch/arm/mach-omap/include/mach/omap3-silicon.h
+++ b/arch/arm/mach-omap/include/mach/omap3-silicon.h
@@ -100,6 +100,7 @@
 
 /** Interrupt Vector base address */
 #define OMAP3_SRAM_BASE		0x40200000
+#define OMAP3_SRAM_SCRATCH_SPACE	0x4020f000 /* start of public stack */
 #define OMAP3_SRAM_INTVECT	0x4020F800
 #define OMAP3_SRAM_INTVECT_COPYSIZE	0x64
 
diff --git a/arch/arm/mach-omap/include/mach/omap4-generic.h b/arch/arm/mach-omap/include/mach/omap4-generic.h
index 85c92e1..e246e36 100644
--- a/arch/arm/mach-omap/include/mach/omap4-generic.h
+++ b/arch/arm/mach-omap/include/mach/omap4-generic.h
@@ -15,7 +15,7 @@ static inline void omap4_save_bootinfo(uint32_t *info)
 	if (i > OMAP44XX_SRAM_BASE + SZ_64K)
 		return;
 
-	omap_save_bootinfo(info);
+	memcpy((void *)OMAP44XX_SRAM_SCRATCH_SPACE, info, 3 * sizeof(uint32_t));
 }
 
 void __noreturn omap4_reset_cpu(unsigned long addr);
diff --git a/arch/arm/mach-omap/include/mach/omap4-silicon.h b/arch/arm/mach-omap/include/mach/omap4-silicon.h
index 336415c..202da93 100644
--- a/arch/arm/mach-omap/include/mach/omap4-silicon.h
+++ b/arch/arm/mach-omap/include/mach/omap4-silicon.h
@@ -40,8 +40,7 @@
 #define OMAP44XX_L4_PER_BASE		0x48000000
 
 #define OMAP44XX_SRAM_BASE		0x40300000
-
-#define OMAP44XX_SRAM_BASE		0x40300000
+#define OMAP44XX_SRAM_SCRATCH_SPACE	0x4030c000 /* start of public stack */
 
 /* EMIF and DMM registers */
 #define OMAP44XX_EMIF1_BASE		0x4c000000
diff --git a/arch/arm/mach-omap/omap3_generic.c b/arch/arm/mach-omap/omap3_generic.c
index d36d63b..dbb0b5f 100644
--- a/arch/arm/mach-omap/omap3_generic.c
+++ b/arch/arm/mach-omap/omap3_generic.c
@@ -469,8 +469,9 @@ void omap3_core_init(void)
 static int omap3_bootsource(void)
 {
 	enum bootsource src = BOOTSOURCE_UNKNOWN;
+	uint32_t *omap3_bootinfo = (void *)OMAP3_SRAM_SCRATCH_SPACE;
 
-	switch (omap_bootinfo[1] & 0xFF) {
+	switch (omap3_bootinfo[1] & 0xFF) {
 	case 0x02:
 		src = BOOTSOURCE_NAND;
 		break;
diff --git a/arch/arm/mach-omap/omap4_generic.c b/arch/arm/mach-omap/omap4_generic.c
index 5dde51a..0b683da 100644
--- a/arch/arm/mach-omap/omap4_generic.c
+++ b/arch/arm/mach-omap/omap4_generic.c
@@ -505,8 +505,9 @@ static int omap_vector_init(void)
 static int omap4_bootsource(void)
 {
 	enum bootsource src;
+	uint32_t *omap4_bootinfo = (void *)OMAP44XX_SRAM_SCRATCH_SPACE;
 
-	switch (omap_bootinfo[2] & 0xFF) {
+	switch (omap4_bootinfo[2] & 0xFF) {
 	case OMAP44XX_SAR_BOOT_NAND:
 		src = BOOTSOURCE_NAND;
 		break;
diff --git a/arch/arm/mach-omap/omap_bootinfo.S b/arch/arm/mach-omap/omap_bootinfo.S
deleted file mode 100644
index ffd0a3d..0000000
--- a/arch/arm/mach-omap/omap_bootinfo.S
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <config.h>
-#include <linux/linkage.h>
-#include <asm/assembler.h>
-
-.section ".text_bare_init","ax"
-.globl omap_bootinfo
-omap_bootinfo:
-	.word 0x0
-	.word 0x0
-	.word 0x0
-
-.section ".text_bare_init","ax"
-ENTRY(omap_save_bootinfo)
-	/*
-	* save data from rom boot loader
-	*/
-	adr     r2, omap_bootinfo
-	ldr     r1, [r0, #0x00]
-	str     r1, [r2, #0x00]
-	ldr     r1, [r0, #0x04]
-	str     r1, [r2, #0x04]
-	ldr     r1, [r0, #0x08]
-	str     r1, [r2, #0x08]
-	mov	pc, lr
-ENDPROC(omap_save_bootinfo)
diff --git a/arch/arm/mach-omap/omap_generic.c b/arch/arm/mach-omap/omap_generic.c
index 47fa9ba..3d302f3 100644
--- a/arch/arm/mach-omap/omap_generic.c
+++ b/arch/arm/mach-omap/omap_generic.c
@@ -45,15 +45,24 @@ static void *omap_sram_start(void)
 	return NULL;
 }
 
+static void *omap_scratch_space_start(void)
+{
+	if (cpu_is_am33xx())
+		return (void *)AM33XX_SRAM_SCRATCH_SPACE;
+	if (cpu_is_omap3())
+		return (void *)OMAP3_SRAM_SCRATCH_SPACE;
+	if (cpu_is_omap4())
+		return (void *)OMAP44XX_SRAM_SCRATCH_SPACE;
+	return NULL;
+}
+
 void __noreturn omap_start_barebox(void *barebox)
 {
 	int (*func)(void *) = barebox;
-	uint32_t *arg;
 	void *sramadr = omap_sram_start();
+	void *scratch = omap_scratch_space_start();
 
-	arg = (uint32_t *)&omap_bootinfo;
-
-	memcpy(sramadr, &omap_bootinfo, sizeof(uint32_t) * 3);
+	memcpy(sramadr, scratch, sizeof(uint32_t) * 3);
 
 	shutdown_barebox();
 	func(sramadr);
-- 
1.8.4.2


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

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

* [PATCH 14/17] ARM: am335x Phytec phyCORE: configure environment from devicetree
  2013-11-26 16:45 [PATCH] AM33xx devicetree support Sascha Hauer
                   ` (12 preceding siblings ...)
  2013-11-26 16:46 ` [PATCH 13/17] ARM: OMAP: Safe boot info in fixed SRAM address Sascha Hauer
@ 2013-11-26 16:46 ` Sascha Hauer
  2013-11-26 16:46 ` [PATCH 15/17] ARM: beaglebone: configure console " Sascha Hauer
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 24+ messages in thread
From: Sascha Hauer @ 2013-11-26 16:46 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/pcm051/board.c         | 17 ++---------------
 arch/arm/dts/am335x-phytec-phycore.dts | 18 +++++++++++++++++-
 2 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/arch/arm/boards/pcm051/board.c b/arch/arm/boards/pcm051/board.c
index 4b76f4c..a64d219 100644
--- a/arch/arm/boards/pcm051/board.c
+++ b/arch/arm/boards/pcm051/board.c
@@ -47,26 +47,13 @@ static int pcm051_devices_init(void)
 
 	switch (bootsource_get()) {
 	case BOOTSOURCE_SPI:
-		devfs_add_partition("m25p0", 0x00000, SZ_128K,
-					DEVFS_PARTITION_FIXED, "xload");
-		devfs_add_partition("m25p0", SZ_128K, SZ_512K,
-					DEVFS_PARTITION_FIXED, "self0");
-		devfs_add_partition("m25p0", SZ_128K + SZ_512K, SZ_128K,
-					DEVFS_PARTITION_FIXED, "env0");
+		of_device_enable_path("/chosen/environment-spi");
 		break;
 	case BOOTSOURCE_MMC:
 		omap_set_bootmmc_devname("mmc0");
 		break;
 	default:
-		devfs_add_partition("nand0", 0x00000, SZ_128K,
-					DEVFS_PARTITION_FIXED, "xload_raw");
-		dev_add_bb_dev("xload_raw", "xload");
-		devfs_add_partition("nand0", SZ_512K, SZ_512K,
-					DEVFS_PARTITION_FIXED, "self_raw");
-		dev_add_bb_dev("self_raw", "self0");
-		devfs_add_partition("nand0", SZ_512K + SZ_512K, SZ_128K,
-					DEVFS_PARTITION_FIXED, "env_raw");
-		dev_add_bb_dev("env_raw", "env0");
+		of_device_enable_path("/chosen/environment-nand");
 		break;
 	}
 
diff --git a/arch/arm/dts/am335x-phytec-phycore.dts b/arch/arm/dts/am335x-phytec-phycore.dts
index 8fbfae6..81c08fd 100644
--- a/arch/arm/dts/am335x-phytec-phycore.dts
+++ b/arch/arm/dts/am335x-phytec-phycore.dts
@@ -6,6 +6,22 @@
 	model = "Phytec phyCORE AM335x";
 	compatible = "phytec,phycore-am335x", "ti,am33xx";
 
+	chosen {
+		linux,stdout-path = &uart0;
+
+		environment-spi {
+			compatible = "barebox,environment";
+			device-path = &flash, "partname:bareboxenv";
+			status = "disabled";
+		};
+
+		environment-nand {
+			compatible = "barebox,environment";
+			device-path = &nand, "partname:bareboxenv";
+			status = "disabled";
+		};
+	};
+
 	memory {
 		device_type = "memory";
 		reg = <0x80000000 0x20000000>; /* 512 MB */
@@ -211,7 +227,7 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&nandflash_pins_s0>;
 	ranges = <0 0 0x08000000 0x10000000>;	/* CS0: NAND */
-	nand@0,0 {
+	nand: nand@0,0 {
 		reg = <0 0 0>; /* CS0, offset 0 */
 		nand-bus-width = <8>;
 		ti,nand-ecc-opt = "bch8-romcode";
-- 
1.8.4.2


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

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

* [PATCH 15/17] ARM: beaglebone: configure console from devicetree
  2013-11-26 16:45 [PATCH] AM33xx devicetree support Sascha Hauer
                   ` (13 preceding siblings ...)
  2013-11-26 16:46 ` [PATCH 14/17] ARM: am335x Phytec phyCORE: configure environment from devicetree Sascha Hauer
@ 2013-11-26 16:46 ` Sascha Hauer
  2013-11-26 16:46 ` [PATCH 16/17] ARM: OMAP: introduce multiboard support and move am33xx boards to it Sascha Hauer
  2013-11-26 16:46 ` [PATCH 17/17] ARM: OMAP: consolidate am335x mlo defconfigs Sascha Hauer
  16 siblings, 0 replies; 24+ messages in thread
From: Sascha Hauer @ 2013-11-26 16:46 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/configs/am335x_beaglebone_defconfig | 2 +-
 arch/arm/dts/am335x-bone-common.dtsi         | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/configs/am335x_beaglebone_defconfig b/arch/arm/configs/am335x_beaglebone_defconfig
index c80adc9..38e19ef 100644
--- a/arch/arm/configs/am335x_beaglebone_defconfig
+++ b/arch/arm/configs/am335x_beaglebone_defconfig
@@ -1,5 +1,4 @@
 CONFIG_ARCH_OMAP=y
-CONFIG_OMAP_MULTI_BOARDS=y
 CONFIG_MACH_BEAGLEBONE=y
 CONFIG_THUMB2_BAREBOX=y
 CONFIG_CMD_ARM_MMUINFO=y
@@ -17,6 +16,7 @@ CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_MENU=y
 # CONFIG_TIMESTAMP is not set
+CONFIG_CONSOLE_ACTIVATE_NONE=y
 CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
 CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/beaglebone/env"
 CONFIG_CMD_EDIT=y
diff --git a/arch/arm/dts/am335x-bone-common.dtsi b/arch/arm/dts/am335x-bone-common.dtsi
index 1ecf0b3..00271c4 100644
--- a/arch/arm/dts/am335x-bone-common.dtsi
+++ b/arch/arm/dts/am335x-bone-common.dtsi
@@ -7,6 +7,10 @@
  */
 
 / {
+	chosen {
+		linux,stdout-path = &uart0;
+	};
+
 	cpus {
 		cpu@0 {
 			cpu0-supply = <&dcdc2_reg>;
-- 
1.8.4.2


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

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

* [PATCH 16/17] ARM: OMAP: introduce multiboard support and move am33xx boards to it
  2013-11-26 16:45 [PATCH] AM33xx devicetree support Sascha Hauer
                   ` (14 preceding siblings ...)
  2013-11-26 16:46 ` [PATCH 15/17] ARM: beaglebone: configure console " Sascha Hauer
@ 2013-11-26 16:46 ` Sascha Hauer
  2013-11-26 16:46 ` [PATCH 17/17] ARM: OMAP: consolidate am335x mlo defconfigs Sascha Hauer
  16 siblings, 0 replies; 24+ messages in thread
From: Sascha Hauer @ 2013-11-26 16:46 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/configs/am335x_beaglebone_defconfig     |  1 +
 arch/arm/configs/am335x_beaglebone_mlo_defconfig |  1 +
 arch/arm/configs/pcm051_defconfig                |  1 +
 arch/arm/configs/pcm051_mlo_defconfig            |  1 +
 arch/arm/mach-omap/Kconfig                       | 36 ++++++++++++++----------
 5 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/arch/arm/configs/am335x_beaglebone_defconfig b/arch/arm/configs/am335x_beaglebone_defconfig
index 38e19ef..857b89c 100644
--- a/arch/arm/configs/am335x_beaglebone_defconfig
+++ b/arch/arm/configs/am335x_beaglebone_defconfig
@@ -1,4 +1,5 @@
 CONFIG_ARCH_OMAP=y
+CONFIG_OMAP_MULTI_BOARDS=y
 CONFIG_MACH_BEAGLEBONE=y
 CONFIG_THUMB2_BAREBOX=y
 CONFIG_CMD_ARM_MMUINFO=y
diff --git a/arch/arm/configs/am335x_beaglebone_mlo_defconfig b/arch/arm/configs/am335x_beaglebone_mlo_defconfig
index ac682cc..905cc6d 100644
--- a/arch/arm/configs/am335x_beaglebone_mlo_defconfig
+++ b/arch/arm/configs/am335x_beaglebone_mlo_defconfig
@@ -1,6 +1,7 @@
 CONFIG_ARCH_OMAP=y
 # CONFIG_OMAP_GPMC is not set
 CONFIG_OMAP_BUILD_IFT=y
+CONFIG_OMAP_MULTI_BOARDS=y
 CONFIG_MACH_BEAGLEBONE=y
 CONFIG_THUMB2_BAREBOX=y
 # CONFIG_CMD_ARM_CPUINFO is not set
diff --git a/arch/arm/configs/pcm051_defconfig b/arch/arm/configs/pcm051_defconfig
index 949c82f..d7e510b 100644
--- a/arch/arm/configs/pcm051_defconfig
+++ b/arch/arm/configs/pcm051_defconfig
@@ -1,5 +1,6 @@
 CONFIG_ARCH_OMAP=y
 CONFIG_BAREBOX_UPDATE_AM33XX_SPI_NOR_MLO=y
+CONFIG_OMAP_MULTI_BOARDS=y
 CONFIG_MACH_PCM051=y
 CONFIG_THUMB2_BAREBOX=y
 CONFIG_ARM_BOARD_APPEND_ATAG=y
diff --git a/arch/arm/configs/pcm051_mlo_defconfig b/arch/arm/configs/pcm051_mlo_defconfig
index dc4165a..ae5764b 100644
--- a/arch/arm/configs/pcm051_mlo_defconfig
+++ b/arch/arm/configs/pcm051_mlo_defconfig
@@ -1,5 +1,6 @@
 CONFIG_ARCH_OMAP=y
 CONFIG_OMAP_BUILD_IFT=y
+CONFIG_OMAP_MULTI_BOARDS=y
 CONFIG_MACH_PCM051=y
 CONFIG_THUMB2_BAREBOX=y
 # CONFIG_CMD_ARM_CPUINFO is not set
diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
index 3a53333..12b9c1f 100644
--- a/arch/arm/mach-omap/Kconfig
+++ b/arch/arm/mach-omap/Kconfig
@@ -114,8 +114,29 @@ config CMD_BOOT_ORDER
 	help
 	  A command to choose the next boot device on a warm reset.
 
+config OMAP_MULTI_BOARDS
+	bool "Allow multiple boards to be selected"
+	select HAVE_DEFAULT_ENVIRONMENT_NEW
+	select HAVE_PBL_MULTI_IMAGES
+
+if OMAP_MULTI_BOARDS
+
+config MACH_BEAGLEBONE
+	bool "Texas Instrument's Beagle Bone"
+	select ARCH_AM33XX
+	help
+	  Say Y here if you are using Beagle Bone
+
+config MACH_PCM051
+	bool "Phytec phyCORE pcm051"
+	select ARCH_AM33XX
+	help
+	  Say Y here if you are using Phytecs phyCORE pcm051 board
+endif
+
 choice
 	prompt "Select OMAP board"
+	depends on !OMAP_MULTI_BOARDS
 
 config MACH_OMAP343xSDP
 	bool "Texas Instrument's SDP343x"
@@ -130,13 +151,6 @@ config MACH_BEAGLE
 	help
 	  Say Y here if you are using Beagle Board
 
-config MACH_BEAGLEBONE
-	bool "Texas Instrument's Beagle Bone"
-	select ARCH_AM33XX
-	select HAVE_PBL_MULTI_IMAGES
-	help
-	  Say Y here if you are using Beagle Bone
-
 config MACH_OMAP3EVM
 	bool "Texas Instrument's OMAP3 EVM"
 	select ARCH_OMAP3
@@ -175,14 +189,6 @@ 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 HAVE_DEFAULT_ENVIRONMENT_NEW
-	select ARCH_AM33XX
-	select HAVE_PBL_MULTI_IMAGES
-	help
-	  Say Y here if you are using Phytecs phyCORE pcm051 board
-
 endchoice
 
 if ARCH_OMAP
-- 
1.8.4.2


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

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

* [PATCH 17/17] ARM: OMAP: consolidate am335x mlo defconfigs
  2013-11-26 16:45 [PATCH] AM33xx devicetree support Sascha Hauer
                   ` (15 preceding siblings ...)
  2013-11-26 16:46 ` [PATCH 16/17] ARM: OMAP: introduce multiboard support and move am33xx boards to it Sascha Hauer
@ 2013-11-26 16:46 ` Sascha Hauer
  2014-02-25 11:12   ` Carlos Fernández
  16 siblings, 1 reply; 24+ messages in thread
From: Sascha Hauer @ 2013-11-26 16:46 UTC (permalink / raw)
  To: barebox

The Beaglebone and the AM335x Phytec phyCORE can be compiled
together, so merge the configs into a am335x_mlo_defconfig.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/configs/am335x_beaglebone_mlo_defconfig | 33 ------------------
 arch/arm/configs/am335x_mlo_defconfig            | 44 ++++++++++++++++++++++++
 arch/arm/configs/pcm051_mlo_defconfig            | 37 --------------------
 3 files changed, 44 insertions(+), 70 deletions(-)
 delete mode 100644 arch/arm/configs/am335x_beaglebone_mlo_defconfig
 create mode 100644 arch/arm/configs/am335x_mlo_defconfig
 delete mode 100644 arch/arm/configs/pcm051_mlo_defconfig

diff --git a/arch/arm/configs/am335x_beaglebone_mlo_defconfig b/arch/arm/configs/am335x_beaglebone_mlo_defconfig
deleted file mode 100644
index 905cc6d..0000000
--- a/arch/arm/configs/am335x_beaglebone_mlo_defconfig
+++ /dev/null
@@ -1,33 +0,0 @@
-CONFIG_ARCH_OMAP=y
-# CONFIG_OMAP_GPMC is not set
-CONFIG_OMAP_BUILD_IFT=y
-CONFIG_OMAP_MULTI_BOARDS=y
-CONFIG_MACH_BEAGLEBONE=y
-CONFIG_THUMB2_BAREBOX=y
-# CONFIG_CMD_ARM_CPUINFO is not set
-# CONFIG_BANNER is not set
-# CONFIG_MEMINFO is not set
-CONFIG_ENVIRONMENT_VARIABLES=y
-CONFIG_MMU=y
-CONFIG_TEXT_BASE=0x0
-CONFIG_MALLOC_SIZE=0x0
-CONFIG_MALLOC_TLSF=y
-CONFIG_RELOCATABLE=y
-CONFIG_PROMPT="MLO>"
-CONFIG_SHELL_NONE=y
-# CONFIG_ERRNO_MESSAGES is not set
-# CONFIG_TIMESTAMP is not set
-# CONFIG_DEFAULT_ENVIRONMENT is not set
-CONFIG_OFDEVICE=y
-CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
-# CONFIG_SPI is not set
-CONFIG_MCI=y
-# CONFIG_MCI_WRITE is not set
-CONFIG_MCI_OMAP_HSMMC=y
-CONFIG_PINCTRL=y
-CONFIG_PINCTRL_SINGLE=y
-# CONFIG_FS_RAMFS is not set
-# CONFIG_FS_DEVFS is not set
-CONFIG_FS_FAT=y
-CONFIG_FS_FAT_LFN=y
diff --git a/arch/arm/configs/am335x_mlo_defconfig b/arch/arm/configs/am335x_mlo_defconfig
new file mode 100644
index 0000000..19f78d0
--- /dev/null
+++ b/arch/arm/configs/am335x_mlo_defconfig
@@ -0,0 +1,44 @@
+CONFIG_ARCH_OMAP=y
+CONFIG_OMAP_BUILD_IFT=y
+CONFIG_OMAP_MULTI_BOARDS=y
+CONFIG_MACH_BEAGLEBONE=y
+CONFIG_MACH_PCM051=y
+CONFIG_THUMB2_BAREBOX=y
+# CONFIG_CMD_ARM_CPUINFO is not set
+# CONFIG_MEMINFO is not set
+CONFIG_MMU=y
+CONFIG_TEXT_BASE=0x0
+CONFIG_MALLOC_SIZE=0x0
+CONFIG_MALLOC_TLSF=y
+CONFIG_RELOCATABLE=y
+CONFIG_PROMPT="MLO>"
+CONFIG_SHELL_NONE=y
+# CONFIG_ERRNO_MESSAGES is not set
+# CONFIG_TIMESTAMP is not set
+CONFIG_CONSOLE_ACTIVATE_NONE=y
+# CONFIG_DEFAULT_ENVIRONMENT is not set
+CONFIG_OFDEVICE=y
+CONFIG_DRIVER_SERIAL_NS16550=y
+CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
+CONFIG_DRIVER_SPI_OMAP3=y
+CONFIG_MTD=y
+# CONFIG_MTD_WRITE is not set
+# CONFIG_MTD_OOB_DEVICE is not set
+CONFIG_MTD_M25P80=y
+CONFIG_NAND=y
+# CONFIG_NAND_ECC_SOFT is not set
+# CONFIG_NAND_ECC_HW_SYNDROME is not set
+# CONFIG_NAND_ECC_HW_NONE is not set
+# CONFIG_NAND_INFO is not set
+# CONFIG_NAND_BBT is not set
+CONFIG_NAND_OMAP_GPMC=y
+CONFIG_MCI=y
+# CONFIG_MCI_WRITE is not set
+CONFIG_MCI_OMAP_HSMMC=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_SINGLE=y
+CONFIG_BUS_OMAP_GPMC=y
+# CONFIG_FS_RAMFS is not set
+# CONFIG_FS_DEVFS is not set
+CONFIG_FS_FAT=y
+CONFIG_FS_FAT_LFN=y
diff --git a/arch/arm/configs/pcm051_mlo_defconfig b/arch/arm/configs/pcm051_mlo_defconfig
deleted file mode 100644
index ae5764b..0000000
--- a/arch/arm/configs/pcm051_mlo_defconfig
+++ /dev/null
@@ -1,37 +0,0 @@
-CONFIG_ARCH_OMAP=y
-CONFIG_OMAP_BUILD_IFT=y
-CONFIG_OMAP_MULTI_BOARDS=y
-CONFIG_MACH_PCM051=y
-CONFIG_THUMB2_BAREBOX=y
-# CONFIG_CMD_ARM_CPUINFO is not set
-# CONFIG_MEMINFO is not set
-CONFIG_ENVIRONMENT_VARIABLES=y
-CONFIG_MMU=y
-CONFIG_TEXT_BASE=0x0
-CONFIG_MALLOC_SIZE=0x0
-CONFIG_MALLOC_TLSF=y
-CONFIG_RELOCATABLE=y
-CONFIG_PROMPT="MLO>"
-CONFIG_SHELL_NONE=y
-# CONFIG_ERRNO_MESSAGES is not set
-# CONFIG_TIMESTAMP is not set
-CONFIG_CONSOLE_SIMPLE=y
-# CONFIG_DEFAULT_ENVIRONMENT is not set
-CONFIG_OFDEVICE=y
-CONFIG_DRIVER_SERIAL_NS16550=y
-CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
-CONFIG_DRIVER_SPI_OMAP3=y
-CONFIG_MTD=y
-CONFIG_MTD_M25P80=y
-CONFIG_NAND=y
-CONFIG_NAND_OMAP_GPMC=y
-CONFIG_MCI=y
-CONFIG_MCI_STARTUP=y
-CONFIG_MCI_OMAP_HSMMC=y
-CONFIG_PINCTRL=y
-CONFIG_PINCTRL_SINGLE=y
-CONFIG_BUS_OMAP_GPMC=y
-# CONFIG_FS_RAMFS is not set
-# CONFIG_FS_DEVFS is not set
-CONFIG_FS_FAT=y
-CONFIG_FS_FAT_LFN=y
-- 
1.8.4.2


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

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

* Re: [PATCH 04/17] ARM: am335x phytec phyCORE: Switch to devicetree probe support
  2013-11-26 16:45 ` [PATCH 04/17] ARM: am335x phytec phyCORE: Switch to devicetree probe support Sascha Hauer
@ 2013-11-27  3:20   ` Alexander Aring
  2013-11-27  7:43     ` Sascha Hauer
  2013-12-10 14:22   ` Jan Weitzel
  1 sibling, 1 reply; 24+ messages in thread
From: Alexander Aring @ 2013-11-27  3:20 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi Sascha,

nice patchstack.

On Tue, Nov 26, 2013 at 05:45:54PM +0100, Sascha Hauer wrote:
> This switches the am335x Phytec phyCORE to devicetree probe support.
> For now we use a linked in dtb.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  arch/arm/boards/pcm051/Makefile       |   2 +-
>  arch/arm/boards/pcm051/board.c        | 149 ++--------------------------------
>  arch/arm/boards/pcm051/mux.c          |  65 ---------------
>  arch/arm/boards/pcm051/mux.h          |   4 -
>  arch/arm/configs/pcm051_defconfig     |  26 ++++--
>  arch/arm/configs/pcm051_mlo_defconfig |   8 +-
>  6 files changed, 32 insertions(+), 222 deletions(-)
>  delete mode 100644 arch/arm/boards/pcm051/mux.c
>  delete mode 100644 arch/arm/boards/pcm051/mux.h
> 
> diff --git a/arch/arm/boards/pcm051/Makefile b/arch/arm/boards/pcm051/Makefile
> index 69d48e1..092c31d 100644
> --- a/arch/arm/boards/pcm051/Makefile
> +++ b/arch/arm/boards/pcm051/Makefile
> @@ -1,2 +1,2 @@
>  lwl-y += lowlevel.o
> -obj-y += board.o mux.o
> +obj-y += board.o
> diff --git a/arch/arm/boards/pcm051/board.c b/arch/arm/boards/pcm051/board.c
...
> -CONFIG_ARCH_AM33XX=y
>  CONFIG_BAREBOX_UPDATE_AM33XX_SPI_NOR_MLO=y
>  CONFIG_MACH_PCM051=y
> -CONFIG_OMAP_UART1=y
> -CONFIG_AEABI=y
> +CONFIG_THUMB2_BAREBOX=y
>  CONFIG_ARM_BOARD_APPEND_ATAG=y
>  CONFIG_CMD_ARM_MMUINFO=y
>  CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
>  CONFIG_ARM_UNWIND=y
> +CONFIG_PBL_IMAGE=y
> +CONFIG_PBL_RELOCATABLE=y
>  CONFIG_MMU=y
> -CONFIG_TEXT_BASE=0x8f000000
> -CONFIG_MALLOC_SIZE=0x2000000
> +CONFIG_TEXT_BASE=0x0
> +CONFIG_MALLOC_SIZE=0x0
Why is this zero now? Are these things defined in the dts file?

- Alex

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

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

* Re: [PATCH 04/17] ARM: am335x phytec phyCORE: Switch to devicetree probe support
  2013-11-27  3:20   ` Alexander Aring
@ 2013-11-27  7:43     ` Sascha Hauer
  0 siblings, 0 replies; 24+ messages in thread
From: Sascha Hauer @ 2013-11-27  7:43 UTC (permalink / raw)
  To: Alexander Aring; +Cc: barebox

On Wed, Nov 27, 2013 at 04:20:11AM +0100, Alexander Aring wrote:
> Hi Sascha,
> 
> nice patchstack.
> 
> On Tue, Nov 26, 2013 at 05:45:54PM +0100, Sascha Hauer wrote:
> > This switches the am335x Phytec phyCORE to devicetree probe support.
> > For now we use a linked in dtb.
> > 
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> >  arch/arm/boards/pcm051/Makefile       |   2 +-
> >  arch/arm/boards/pcm051/board.c        | 149 ++--------------------------------
> >  arch/arm/boards/pcm051/mux.c          |  65 ---------------
> >  arch/arm/boards/pcm051/mux.h          |   4 -
> >  arch/arm/configs/pcm051_defconfig     |  26 ++++--
> >  arch/arm/configs/pcm051_mlo_defconfig |   8 +-
> >  6 files changed, 32 insertions(+), 222 deletions(-)
> >  delete mode 100644 arch/arm/boards/pcm051/mux.c
> >  delete mode 100644 arch/arm/boards/pcm051/mux.h
> > 
> > diff --git a/arch/arm/boards/pcm051/Makefile b/arch/arm/boards/pcm051/Makefile
> > index 69d48e1..092c31d 100644
> > --- a/arch/arm/boards/pcm051/Makefile
> > +++ b/arch/arm/boards/pcm051/Makefile
> > @@ -1,2 +1,2 @@
> >  lwl-y += lowlevel.o
> > -obj-y += board.o mux.o
> > +obj-y += board.o
> > diff --git a/arch/arm/boards/pcm051/board.c b/arch/arm/boards/pcm051/board.c
> ...
> > -CONFIG_ARCH_AM33XX=y
> >  CONFIG_BAREBOX_UPDATE_AM33XX_SPI_NOR_MLO=y
> >  CONFIG_MACH_PCM051=y
> > -CONFIG_OMAP_UART1=y
> > -CONFIG_AEABI=y
> > +CONFIG_THUMB2_BAREBOX=y
> >  CONFIG_ARM_BOARD_APPEND_ATAG=y
> >  CONFIG_CMD_ARM_MMUINFO=y
> >  CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
> >  CONFIG_ARM_UNWIND=y
> > +CONFIG_PBL_IMAGE=y
> > +CONFIG_PBL_RELOCATABLE=y
> >  CONFIG_MMU=y
> > -CONFIG_TEXT_BASE=0x8f000000
> > -CONFIG_MALLOC_SIZE=0x2000000
> > +CONFIG_TEXT_BASE=0x0
> > +CONFIG_MALLOC_SIZE=0x0
> Why is this zero now? Are these things defined in the dts file?

It's a relocatable binary which gets relocated during runtime. The
address doesn't matter anymore, but setting it to zero helps translating
the addresses from the objdump to the running binary.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

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

* Re: [PATCH 04/17] ARM: am335x phytec phyCORE: Switch to devicetree probe support
  2013-11-26 16:45 ` [PATCH 04/17] ARM: am335x phytec phyCORE: Switch to devicetree probe support Sascha Hauer
  2013-11-27  3:20   ` Alexander Aring
@ 2013-12-10 14:22   ` Jan Weitzel
  2013-12-10 14:24     ` Sascha Hauer
  1 sibling, 1 reply; 24+ messages in thread
From: Jan Weitzel @ 2013-12-10 14:22 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Am Dienstag, den 26.11.2013, 17:45 +0100 schrieb Sascha Hauer:
> This switches the am335x Phytec phyCORE to devicetree probe support.
> For now we use a linked in dtb.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  arch/arm/boards/pcm051/Makefile       |   2 +-
>  arch/arm/boards/pcm051/board.c        | 149 ++--------------------------------
>  arch/arm/boards/pcm051/mux.c          |  65 ---------------
>  arch/arm/boards/pcm051/mux.h          |   4 -
>  arch/arm/configs/pcm051_defconfig     |  26 ++++--
>  arch/arm/configs/pcm051_mlo_defconfig |   8 +-
>  6 files changed, 32 insertions(+), 222 deletions(-)
>  delete mode 100644 arch/arm/boards/pcm051/mux.c
>  delete mode 100644 arch/arm/boards/pcm051/mux.h
> 
> ...
> diff --git a/arch/arm/configs/pcm051_defconfig b/arch/arm/configs/pcm051_defconfig
> index 97e0940..e55ac47 100644
> --- a/arch/arm/configs/pcm051_defconfig
> +++ b/arch/arm/configs/pcm051_defconfig
> @@ -1,16 +1,21 @@
> +CONFIG_BUILTIN_DTB=y
> +CONFIG_BUILTIN_DTB_NAME="am335x-phytec-phycore"
>  CONFIG_ARCH_OMAP=y
> -CONFIG_ARCH_AM33XX=y
>  CONFIG_BAREBOX_UPDATE_AM33XX_SPI_NOR_MLO=y
>  CONFIG_MACH_PCM051=y
> -CONFIG_OMAP_UART1=y
> -CONFIG_AEABI=y
> +CONFIG_THUMB2_BAREBOX=y

Is there a reason to use thumb2 now?

Jan
>  CONFIG_ARM_BOARD_APPEND_ATAG=y
>  CONFIG_CMD_ARM_MMUINFO=y
>  CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
>  CONFIG_ARM_UNWIND=y
> +CONFIG_PBL_IMAGE=y
> +CONFIG_PBL_RELOCATABLE=y
>  CONFIG_MMU=y
> -CONFIG_TEXT_BASE=0x8f000000
> -CONFIG_MALLOC_SIZE=0x2000000
> +CONFIG_TEXT_BASE=0x0
> +CONFIG_MALLOC_SIZE=0x0
> +CONFIG_MALLOC_TLSF=y
> +CONFIG_KALLSYMS=y
> +CONFIG_RELOCATABLE=y
>  CONFIG_PROMPT="barebox@pcm051>"
>  CONFIG_LONGHELP=y
>  CONFIG_HUSH_FANCY_PROMPT=y
> @@ -21,9 +26,6 @@ CONFIG_MENU=y
>  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
> @@ -44,6 +46,7 @@ CONFIG_CMD_UBIFORMAT=y
>  CONFIG_CMD_BOOTM_SHOW_TYPE=y
>  CONFIG_CMD_UIMAGE=y
>  CONFIG_CMD_BOOTZ=y
> +# CONFIG_CMD_BOOTU is not set
>  CONFIG_CMD_RESET=y
>  CONFIG_CMD_GO=y
>  CONFIG_CMD_BAREBOX_UPDATE=y
> @@ -57,6 +60,8 @@ CONFIG_NET=y
>  CONFIG_NET_DHCP=y
>  CONFIG_NET_NFS=y
>  CONFIG_NET_PING=y
> +CONFIG_OFDEVICE=y
> +CONFIG_OF_BAREBOX_DRIVERS=y
>  CONFIG_DRIVER_SERIAL_NS16550=y
>  CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
>  CONFIG_DRIVER_NET_CPSW=y
> @@ -67,13 +72,16 @@ CONFIG_MTD=y
>  CONFIG_MTD_M25P80=y
>  CONFIG_NAND=y
>  CONFIG_NAND_OMAP_GPMC=y
> -CONFIG_UBI=y
> +CONFIG_MTD_UBI=y
>  CONFIG_USB=y
>  CONFIG_MCI=y
>  CONFIG_MCI_STARTUP=y
>  CONFIG_MCI_OMAP_HSMMC=y
>  CONFIG_EEPROM_AT24=y
>  CONFIG_GPIO_GENERIC_PLATFORM=y
> +CONFIG_PINCTRL=y
> +CONFIG_PINCTRL_SINGLE=y
> +CONFIG_BUS_OMAP_GPMC=y
>  CONFIG_FS_TFTP=y
>  CONFIG_FS_NFS=y
>  CONFIG_FS_FAT=y
> diff --git a/arch/arm/configs/pcm051_mlo_defconfig b/arch/arm/configs/pcm051_mlo_defconfig
> index ea65979..4f6a7b1 100644
> --- a/arch/arm/configs/pcm051_mlo_defconfig
> +++ b/arch/arm/configs/pcm051_mlo_defconfig
> @@ -1,8 +1,8 @@
> +CONFIG_BUILTIN_DTB=y
> +CONFIG_BUILTIN_DTB_NAME="am335x-phytec-phycore"
>  CONFIG_ARCH_OMAP=y
> -CONFIG_ARCH_AM33XX=y
>  CONFIG_OMAP_BUILD_IFT=y
>  CONFIG_MACH_PCM051=y
> -CONFIG_OMAP_UART1=y
>  CONFIG_THUMB2_BAREBOX=y
>  # CONFIG_CMD_ARM_CPUINFO is not set
>  # CONFIG_MEMINFO is not set
> @@ -17,6 +17,7 @@ CONFIG_SHELL_NONE=y
>  # CONFIG_TIMESTAMP is not set
>  CONFIG_CONSOLE_SIMPLE=y
>  # CONFIG_DEFAULT_ENVIRONMENT is not set
> +CONFIG_OFDEVICE=y
>  CONFIG_DRIVER_SERIAL_NS16550=y
>  CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
>  CONFIG_DRIVER_SPI_OMAP3=y
> @@ -27,6 +28,9 @@ CONFIG_NAND_OMAP_GPMC=y
>  CONFIG_MCI=y
>  CONFIG_MCI_STARTUP=y
>  CONFIG_MCI_OMAP_HSMMC=y
> +CONFIG_PINCTRL=y
> +CONFIG_PINCTRL_SINGLE=y
> +CONFIG_BUS_OMAP_GPMC=y
>  # CONFIG_FS_RAMFS is not set
>  # CONFIG_FS_DEVFS is not set
>  CONFIG_FS_FAT=y



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

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

* Re: [PATCH 04/17] ARM: am335x phytec phyCORE: Switch to devicetree probe support
  2013-12-10 14:22   ` Jan Weitzel
@ 2013-12-10 14:24     ` Sascha Hauer
  2013-12-11  8:33       ` Jan Weitzel
  0 siblings, 1 reply; 24+ messages in thread
From: Sascha Hauer @ 2013-12-10 14:24 UTC (permalink / raw)
  To: Jan Weitzel; +Cc: barebox

On Tue, Dec 10, 2013 at 03:22:12PM +0100, Jan Weitzel wrote:
> Am Dienstag, den 26.11.2013, 17:45 +0100 schrieb Sascha Hauer:
> > This switches the am335x Phytec phyCORE to devicetree probe support.
> > For now we use a linked in dtb.
> > 
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> >  arch/arm/boards/pcm051/Makefile       |   2 +-
> >  arch/arm/boards/pcm051/board.c        | 149 ++--------------------------------
> >  arch/arm/boards/pcm051/mux.c          |  65 ---------------
> >  arch/arm/boards/pcm051/mux.h          |   4 -
> >  arch/arm/configs/pcm051_defconfig     |  26 ++++--
> >  arch/arm/configs/pcm051_mlo_defconfig |   8 +-
> >  6 files changed, 32 insertions(+), 222 deletions(-)
> >  delete mode 100644 arch/arm/boards/pcm051/mux.c
> >  delete mode 100644 arch/arm/boards/pcm051/mux.h
> > 
> > ...
> > diff --git a/arch/arm/configs/pcm051_defconfig b/arch/arm/configs/pcm051_defconfig
> > index 97e0940..e55ac47 100644
> > --- a/arch/arm/configs/pcm051_defconfig
> > +++ b/arch/arm/configs/pcm051_defconfig
> > @@ -1,16 +1,21 @@
> > +CONFIG_BUILTIN_DTB=y
> > +CONFIG_BUILTIN_DTB_NAME="am335x-phytec-phycore"
> >  CONFIG_ARCH_OMAP=y
> > -CONFIG_ARCH_AM33XX=y
> >  CONFIG_BAREBOX_UPDATE_AM33XX_SPI_NOR_MLO=y
> >  CONFIG_MACH_PCM051=y
> > -CONFIG_OMAP_UART1=y
> > -CONFIG_AEABI=y
> > +CONFIG_THUMB2_BAREBOX=y
> 
> Is there a reason to use thumb2 now?

It generates smaller binaries. Does this cause trouble?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

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

* Re: [PATCH 04/17] ARM: am335x phytec phyCORE: Switch to devicetree probe support
  2013-12-10 14:24     ` Sascha Hauer
@ 2013-12-11  8:33       ` Jan Weitzel
  0 siblings, 0 replies; 24+ messages in thread
From: Jan Weitzel @ 2013-12-11  8:33 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Am Dienstag, den 10.12.2013, 15:24 +0100 schrieb Sascha Hauer:
> On Tue, Dec 10, 2013 at 03:22:12PM +0100, Jan Weitzel wrote:
> > Am Dienstag, den 26.11.2013, 17:45 +0100 schrieb Sascha Hauer:
> > > This switches the am335x Phytec phyCORE to devicetree probe support.
> > > For now we use a linked in dtb.
> > > 
> > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > > ---
> > >  arch/arm/boards/pcm051/Makefile       |   2 +-
> > >  arch/arm/boards/pcm051/board.c        | 149 ++--------------------------------
> > >  arch/arm/boards/pcm051/mux.c          |  65 ---------------
> > >  arch/arm/boards/pcm051/mux.h          |   4 -
> > >  arch/arm/configs/pcm051_defconfig     |  26 ++++--
> > >  arch/arm/configs/pcm051_mlo_defconfig |   8 +-
> > >  6 files changed, 32 insertions(+), 222 deletions(-)
> > >  delete mode 100644 arch/arm/boards/pcm051/mux.c
> > >  delete mode 100644 arch/arm/boards/pcm051/mux.h
> > > 
> > > ...
> > > diff --git a/arch/arm/configs/pcm051_defconfig b/arch/arm/configs/pcm051_defconfig
> > > index 97e0940..e55ac47 100644
> > > --- a/arch/arm/configs/pcm051_defconfig
> > > +++ b/arch/arm/configs/pcm051_defconfig
> > > @@ -1,16 +1,21 @@
> > > +CONFIG_BUILTIN_DTB=y
> > > +CONFIG_BUILTIN_DTB_NAME="am335x-phytec-phycore"
> > >  CONFIG_ARCH_OMAP=y
> > > -CONFIG_ARCH_AM33XX=y
> > >  CONFIG_BAREBOX_UPDATE_AM33XX_SPI_NOR_MLO=y
> > >  CONFIG_MACH_PCM051=y
> > > -CONFIG_OMAP_UART1=y
> > > -CONFIG_AEABI=y
> > > +CONFIG_THUMB2_BAREBOX=y
> > 
> > Is there a reason to use thumb2 now?
> 
> It generates smaller binaries. Does this cause trouble?
No I didn't see any problems. I used it only for MLO/xload builds by
now.

Jan 
> 
> Sascha
> 



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

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

* Re: Re: [PATCH 17/17] ARM: OMAP: consolidate am335x mlo defconfigs
  2013-11-26 16:46 ` [PATCH 17/17] ARM: OMAP: consolidate am335x mlo defconfigs Sascha Hauer
@ 2014-02-25 11:12   ` Carlos Fernández
  0 siblings, 0 replies; 24+ messages in thread
From: Carlos Fernández @ 2014-02-25 11:12 UTC (permalink / raw)
  To: barebox

Hello Sascha,

I need some help about the booting from NAND flash. I have created the
MLO file with the pcm051_mlo_defconfig but I cant boot from NAND. I dont
know if i need more configuration.

This is the content of pcm051_mlo_defconfig:

CONFIG_ARCH_OMAP=y
CONFIG_ARCH_AM33XX=y
CONFIG_OMAP_BUILD_IFT=y
CONFIG_MACH_PCM051=y
CONFIG_OMAP_UART1=y
CONFIG_THUMB2_BAREBOX=y
# CONFIG_CMD_ARM_CPUINFO is not set
# CONFIG_MEMINFO is not set
CONFIG_ENVIRONMENT_VARIABLES=y
CONFIG_MMU=y
CONFIG_TEXT_BASE=0x402F0400
CONFIG_STACK_SIZE=0x1600
CONFIG_MALLOC_SIZE=0x1000000
CONFIG_PROMPT="MLO>"
CONFIG_SHELL_NONE=y
# CONFIG_ERRNO_MESSAGES is not set
# CONFIG_TIMESTAMP is not set
CONFIG_CONSOLE_SIMPLE=y
# CONFIG_DEFAULT_ENVIRONMENT is not set
CONFIG_DRIVER_SERIAL_NS16550=y
CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
CONFIG_DRIVER_SPI_OMAP3=y
CONFIG_MTD=y
CONFIG_MTD_M25P80=y
CONFIG_NAND=y
CONFIG_NAND_OMAP_GPMC=y
CONFIG_MCI=y
CONFIG_MCI_STARTUP=y
CONFIG_MCI_OMAP_HSMMC=y
# CONFIG_FS_RAMFS is not set
# CONFIG_FS_DEVFS is not set
CONFIG_FS_FAT=y
CONFIG_FS_FAT_LFN=y

Do you have any idea??


Thank you in advance.
Best Regards.
Carlos





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

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

end of thread, other threads:[~2014-02-25 11:13 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-26 16:45 [PATCH] AM33xx devicetree support Sascha Hauer
2013-11-26 16:45 ` [PATCH 01/17] ARM: Make multi images startup process simpler Sascha Hauer
2013-11-26 16:45 ` [PATCH 02/17] ARM: Make ENTRY_FUNCTION more robust Sascha Hauer
2013-11-26 16:45 ` [PATCH 03/17] ARM: Add base am335x-phytec-phycore devicetree file Sascha Hauer
2013-11-26 16:45 ` [PATCH 04/17] ARM: am335x phytec phyCORE: Switch to devicetree probe support Sascha Hauer
2013-11-27  3:20   ` Alexander Aring
2013-11-27  7:43     ` Sascha Hauer
2013-12-10 14:22   ` Jan Weitzel
2013-12-10 14:24     ` Sascha Hauer
2013-12-11  8:33       ` Jan Weitzel
2013-11-26 16:45 ` [PATCH 05/17] ARM: am33xx Phytec phyCORE: initialize debug UART Sascha Hauer
2013-11-26 16:45 ` [PATCH 06/17] ARM: am33xx Phytec phyCORE: Switch to multiimage support Sascha Hauer
2013-11-26 16:45 ` [PATCH 07/17] ARM: am33xx Phytec phyCORE: update defconfig Sascha Hauer
2013-11-26 16:45 ` [PATCH 08/17] ARM: dts: Add am33xx beaglebone(black) dts files Sascha Hauer
2013-11-26 16:45 ` [PATCH 09/17] ARM: am33xx: beaglebone: remove mlo_large_defconfig Sascha Hauer
2013-11-26 16:46 ` [PATCH 10/17] ARM: beaglebone: Add memory to devicetrees Sascha Hauer
2013-11-26 16:46 ` [PATCH 11/17] ARM: beaglebone: Switch to devicetree and multiimage Sascha Hauer
2013-11-26 16:46 ` [PATCH 12/17] ARM: am335x Phytec phyCORE: Move partition descriptions to devicetree Sascha Hauer
2013-11-26 16:46 ` [PATCH 13/17] ARM: OMAP: Safe boot info in fixed SRAM address Sascha Hauer
2013-11-26 16:46 ` [PATCH 14/17] ARM: am335x Phytec phyCORE: configure environment from devicetree Sascha Hauer
2013-11-26 16:46 ` [PATCH 15/17] ARM: beaglebone: configure console " Sascha Hauer
2013-11-26 16:46 ` [PATCH 16/17] ARM: OMAP: introduce multiboard support and move am33xx boards to it Sascha Hauer
2013-11-26 16:46 ` [PATCH 17/17] ARM: OMAP: consolidate am335x mlo defconfigs Sascha Hauer
2014-02-25 11:12   ` Carlos Fernández

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