mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* compile patches
@ 2012-01-05  9:23 Sascha Hauer
  2012-01-05  9:23 ` [PATCH 1/3] ARM AT91: Add missing on_flash_bbt in atmel_nand_data Sascha Hauer
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Sascha Hauer @ 2012-01-05  9:23 UTC (permalink / raw)
  To: barebox

Sascha Hauer (3):
      ARM AT91: Add missing on_flash_bbt in atmel_nand_data
      ARM omap beagle xload: update defconfig
      fat fs: Fix compile warning

 arch/arm/configs/omap3530_beagle_xload_defconfig |    4 ++--
 arch/arm/mach-at91/include/mach/board.h          |    1 +
 fs/fat/ff.c                                      |    2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

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

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

* [PATCH 1/3] ARM AT91: Add missing on_flash_bbt in atmel_nand_data
  2012-01-05  9:23 compile patches Sascha Hauer
@ 2012-01-05  9:23 ` Sascha Hauer
  2012-01-05 13:14   ` Jean-Christophe PLAGNIOL-VILLARD
  2012-01-05  9:23 ` [PATCH] ARM: move exception vectors away from start of binary Sascha Hauer
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Sascha Hauer @ 2012-01-05  9:23 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-at91/include/mach/board.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
index 2619234..738af87 100644
--- a/arch/arm/mach-at91/include/mach/board.h
+++ b/arch/arm/mach-at91/include/mach/board.h
@@ -53,6 +53,7 @@ struct atmel_nand_data {
 	u8		cle;		/* address line number connected to CLE */
 	u8		bus_width_16;	/* buswidth is 16 bit */
 	u8		ecc_mode;	/* NAND_ECC_* */
+	u8		on_flash_bbt;	/* Use flash based bbt */
 };
 
 void at91_add_device_nand(struct atmel_nand_data *data);
-- 
1.7.7.3


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

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

* [PATCH] ARM: move exception vectors away from start of binary
  2012-01-05  9:23 compile patches Sascha Hauer
  2012-01-05  9:23 ` [PATCH 1/3] ARM AT91: Add missing on_flash_bbt in atmel_nand_data Sascha Hauer
@ 2012-01-05  9:23 ` Sascha Hauer
  2012-01-05 13:17   ` Jean-Christophe PLAGNIOL-VILLARD
  2012-01-05  9:23 ` [PATCH] video imx: specify num_modes in platform_data Sascha Hauer
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Sascha Hauer @ 2012-01-05  9:23 UTC (permalink / raw)
  To: barebox

Traditionally U-Boot and barebox have the exception vectors at
the start of the binary. There is no real reason in doing so,
because in the majority of cases this data will not be at 0x0
where it could be used as vectors directly anyway.
This patch puts the vectors into a separate linker section and
defines an head function which is placed at the start of the
image instead. Putting this in a separate function also has
the advantage that it can be placed at the start of images
which require an additional header like several Freescale i.MX
images. As the head function contains the barebox arm magic
those images can now also be detected as barebox images.
The header of the image can be customized using
CONFIG_ARM_CUSTOM_HEAD. If this is set the user must specify
a custom barebox_arm_head function in the text_entry section.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/Kconfig                                   |    6 ++++
 arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c  |    3 +-
 arch/arm/boards/eukrea_cpuimx35/flash_header.c     |    3 +-
 arch/arm/boards/eukrea_cpuimx51/flash_header.c     |    3 +-
 arch/arm/boards/freescale-mx25-3-stack/3stack.c    |    3 +-
 .../boards/freescale-mx35-3-stack/flash_header.c   |    3 +-
 arch/arm/boards/freescale-mx51-pdk/flash_header.c  |    3 +-
 arch/arm/boards/freescale-mx53-loco/flash_header.c |    3 +-
 arch/arm/boards/freescale-mx53-smd/flash_header.c  |    3 +-
 arch/arm/cpu/mmu.c                                 |    4 +-
 arch/arm/cpu/start.c                               |   20 ++++++++------
 arch/arm/include/asm/barebox-arm-head.h            |   28 ++++++++++++++++++++
 arch/arm/include/asm/barebox-arm.h                 |    2 +
 arch/arm/lib/barebox.lds.S                         |    5 +++-
 14 files changed, 69 insertions(+), 20 deletions(-)
 create mode 100644 arch/arm/include/asm/barebox-arm-head.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b600179..b0b8f9c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -26,6 +26,12 @@ config ARM_LINUX
 	default y
 	depends on CMD_BOOTZ || CMD_BOOTU || CMD_BOOTM
 
+config ARM_CUSTOM_HEAD
+	bool
+	help
+	  specify a board or architecture specific custom head
+	  function
+
 menu "System Type                   "
 
 choice
diff --git a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
index 162c117..c7b0d2d 100644
--- a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
+++ b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
@@ -46,13 +46,14 @@
 #include <usb/fsl_usb2.h>
 #include <mach/usb.h>
 #include <mach/devices-imx25.h>
+#include <asm/barebox-arm-head.h>
 
 extern unsigned long _stext;
 extern void exception_vectors(void);
 
 void __naked __flash_header_start go(void)
 {
-	__asm__ __volatile__("b exception_vectors\n");
+	barebox_arm_default_head();
 }
 
 struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
diff --git a/arch/arm/boards/eukrea_cpuimx35/flash_header.c b/arch/arm/boards/eukrea_cpuimx35/flash_header.c
index 93c8348..4ded270 100644
--- a/arch/arm/boards/eukrea_cpuimx35/flash_header.c
+++ b/arch/arm/boards/eukrea_cpuimx35/flash_header.c
@@ -1,12 +1,13 @@
 #include <common.h>
 #include <mach/imx-flash-header.h>
 #include <mach/imx-regs.h>
+#include <asm/barebox-arm-head.h>
 
 extern void exception_vectors(void);
 
 void __naked __flash_header_start go(void)
 {
-	__asm__ __volatile__("b exception_vectors\n");
+	barebox_arm_default_head();
 }
 
 struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
diff --git a/arch/arm/boards/eukrea_cpuimx51/flash_header.c b/arch/arm/boards/eukrea_cpuimx51/flash_header.c
index f953b09..4f29dd9 100644
--- a/arch/arm/boards/eukrea_cpuimx51/flash_header.c
+++ b/arch/arm/boards/eukrea_cpuimx51/flash_header.c
@@ -1,11 +1,12 @@
 #include <common.h>
 #include <mach/imx-flash-header.h>
+#include <asm/barebox-arm-head.h>
 
 extern unsigned long _stext;
 
 void __naked __flash_header_start go(void)
 {
-	__asm__ __volatile__("b exception_vectors\n");
+	barebox_arm_default_head();
 }
 
 struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
diff --git a/arch/arm/boards/freescale-mx25-3-stack/3stack.c b/arch/arm/boards/freescale-mx25-3-stack/3stack.c
index 5aa54e4..78b872c 100644
--- a/arch/arm/boards/freescale-mx25-3-stack/3stack.c
+++ b/arch/arm/boards/freescale-mx25-3-stack/3stack.c
@@ -42,13 +42,14 @@
 #include <i2c/i2c.h>
 #include <mfd/mc34704.h>
 #include <mach/devices-imx25.h>
+#include <asm/barebox-arm-head.h>
 
 extern unsigned long _stext;
 extern void exception_vectors(void);
 
 void __naked __flash_header_start go(void)
 {
-	__asm__ __volatile__("b exception_vectors\n");
+	barebox_arm_default_head();
 }
 
 struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
diff --git a/arch/arm/boards/freescale-mx35-3-stack/flash_header.c b/arch/arm/boards/freescale-mx35-3-stack/flash_header.c
index 4bee797..63c1502 100644
--- a/arch/arm/boards/freescale-mx35-3-stack/flash_header.c
+++ b/arch/arm/boards/freescale-mx35-3-stack/flash_header.c
@@ -1,12 +1,13 @@
 #include <common.h>
 #include <mach/imx-flash-header.h>
 #include <mach/imx-regs.h>
+#include <asm/barebox-arm-head.h>
 
 extern void exception_vectors(void);
 
 void __naked __flash_header_start go(void)
 {
-	__asm__ __volatile__("b exception_vectors\n");
+	barebox_arm_default_head();
 }
 
 struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
diff --git a/arch/arm/boards/freescale-mx51-pdk/flash_header.c b/arch/arm/boards/freescale-mx51-pdk/flash_header.c
index 5f94506..d513c8c 100644
--- a/arch/arm/boards/freescale-mx51-pdk/flash_header.c
+++ b/arch/arm/boards/freescale-mx51-pdk/flash_header.c
@@ -1,11 +1,12 @@
 #include <common.h>
 #include <mach/imx-flash-header.h>
+#include <asm/barebox-arm-head.h>
 
 extern unsigned long _stext;
 
 void __naked __flash_header_start go(void)
 {
-	__asm__ __volatile__("b exception_vectors\n");
+	barebox_arm_default_head();
 }
 
 struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
diff --git a/arch/arm/boards/freescale-mx53-loco/flash_header.c b/arch/arm/boards/freescale-mx53-loco/flash_header.c
index 490e223..105f54a 100644
--- a/arch/arm/boards/freescale-mx53-loco/flash_header.c
+++ b/arch/arm/boards/freescale-mx53-loco/flash_header.c
@@ -16,10 +16,11 @@
 #include <common.h>
 #include <asm/byteorder.h>
 #include <mach/imx-flash-header.h>
+#include <asm/barebox-arm-head.h>
 
 void __naked __flash_header_start go(void)
 {
-	__asm__ __volatile__("b exception_vectors\n");
+	barebox_arm_default_head();
 }
 
 struct imx_dcd_v2_entry __dcd_entry_section dcd_entry[] = {
diff --git a/arch/arm/boards/freescale-mx53-smd/flash_header.c b/arch/arm/boards/freescale-mx53-smd/flash_header.c
index 490e223..105f54a 100644
--- a/arch/arm/boards/freescale-mx53-smd/flash_header.c
+++ b/arch/arm/boards/freescale-mx53-smd/flash_header.c
@@ -16,10 +16,11 @@
 #include <common.h>
 #include <asm/byteorder.h>
 #include <mach/imx-flash-header.h>
+#include <asm/barebox-arm-head.h>
 
 void __naked __flash_header_start go(void)
 {
-	__asm__ __volatile__("b exception_vectors\n");
+	barebox_arm_default_head();
 }
 
 struct imx_dcd_v2_entry __dcd_entry_section dcd_entry[] = {
diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c
index c6c91df..e8ff676 100644
--- a/arch/arm/cpu/mmu.c
+++ b/arch/arm/cpu/mmu.c
@@ -4,6 +4,7 @@
 #include <errno.h>
 #include <sizes.h>
 #include <asm/memory.h>
+#include <asm/barebox-arm.h>
 #include <asm/system.h>
 #include <memory.h>
 
@@ -182,7 +183,6 @@ static void vectors_init(void)
 {
 	u32 *exc, *zero = NULL;
 	void *vectors;
-	extern unsigned long exception_vectors;
 	u32 cr;
 
 	cr = get_cr();
@@ -210,7 +210,7 @@ static void vectors_init(void)
 
 	vectors = xmemalign(PAGE_SIZE, PAGE_SIZE);
 	memset(vectors, 0, PAGE_SIZE);
-	memcpy(vectors, &exception_vectors, ARM_VECTORS_SIZE);
+	memcpy(vectors, __exceptions_start, __exceptions_stop - __exceptions_start);
 
 	if (cr & CR_V)
 		exc[256 - 16] = (u32)vectors | PTE_TYPE_SMALL | PTE_FLAGS_CACHED;
diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
index 5e09300..e78d749 100644
--- a/arch/arm/cpu/start.c
+++ b/arch/arm/cpu/start.c
@@ -23,14 +23,22 @@
 #include <common.h>
 #include <init.h>
 #include <asm/barebox-arm.h>
+#include <asm/barebox-arm-head.h>
 #include <asm/system.h>
 #include <asm-generic/memory_layout.h>
 #include <asm/sections.h>
 
-void __naked __section(.text_entry) exception_vectors(void)
+#ifndef CONFIG_ARM_CUSTOM_HEAD
+void __naked __section(.text_entry) barebox_arm_head(void)
+{
+	barebox_arm_default_head();
+}
+#endif
+
+void __naked __section(.text_exceptions) exception_vectors(void)
 {
 	__asm__ __volatile__ (
-		"b reset\n"				/* reset */
+		"b start_arm_barebox\n"			/* reset */
 #ifdef CONFIG_ARM_EXCEPTIONS
 		"ldr pc, =undefined_instruction\n"	/* undefined instruction */
 		"ldr pc, =software_interrupt\n"		/* software interrupt (SWI) */
@@ -48,12 +56,6 @@ void __naked __section(.text_entry) exception_vectors(void)
 		"1: bne 1b\n"				/* irq (interrupt) */
 		"1: bne 1b\n"				/* fiq (fast interrupt) */
 #endif
-		".word 0x65726162\n"			/* 'bare' */
-		".word 0x00786f62\n"			/* 'box' */
-		".word _text\n"				/* text base. If copied there,
-							 * barebox can skip relocation
-							 */
-		".word _barebox_image_size\n"		/* image size to copy */
 	);
 }
 
@@ -61,7 +63,7 @@ void __naked __section(.text_entry) exception_vectors(void)
  * The actual reset vector. This code is position independent and usually
  * does not run at the address it's linked at.
  */
-void __naked __bare_init reset(void)
+void __naked __bare_init start_arm_barebox(void)
 {
 	uint32_t r;
 
diff --git a/arch/arm/include/asm/barebox-arm-head.h b/arch/arm/include/asm/barebox-arm-head.h
new file mode 100644
index 0000000..72ad8ec
--- /dev/null
+++ b/arch/arm/include/asm/barebox-arm-head.h
@@ -0,0 +1,28 @@
+#ifndef __BAREBOX_ARM_HEAD_H
+#define __BAREBOX_ARM_HEAD_H
+
+#ifndef ARM_EXCEPTION_VECTOR_6
+#define ARM_EXCEPTION_VECTOR_6	".word 0x0\n"
+#endif
+
+static inline void barebox_arm_default_head(void)
+{
+	__asm__ __volatile__ (
+		"b start_arm_barebox\n"
+		".word 0x0\n"
+		".word 0x0\n"
+		".word 0x0\n"
+		".word 0x0\n"
+		ARM_EXCEPTION_VECTOR_6
+		".word 0x0\n"
+		".word 0x0\n"
+		".word 0x65726162\n"			/* 'bare' */
+		".word 0x00786f62\n"			/* 'box' */
+		".word _text\n"				/* text base. If copied there,
+							 * barebox can skip relocation
+							 */
+		".word _barebox_image_size\n"		/* image size to copy */
+	);
+}
+
+#endif /* __BAREBOX_ARM_HEAD_H */
diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
index 7bb1af1..3339782 100644
--- a/arch/arm/include/asm/barebox-arm.h
+++ b/arch/arm/include/asm/barebox-arm.h
@@ -36,6 +36,8 @@ int	cleanup_before_linux(void);
 int	board_init(void);
 int	dram_init (void);
 
+extern char __exceptions_start[], __exceptions_stop[];
+
 void board_init_lowlevel(void);
 void board_init_lowlevel_return(void);
 void arch_init_lowlevel(void);
diff --git a/arch/arm/lib/barebox.lds.S b/arch/arm/lib/barebox.lds.S
index f05f345..f0d675b 100644
--- a/arch/arm/lib/barebox.lds.S
+++ b/arch/arm/lib/barebox.lds.S
@@ -26,7 +26,7 @@
 
 OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
 OUTPUT_ARCH(arm)
-ENTRY(exception_vectors)
+ENTRY(barebox_arm_head)
 SECTIONS
 {
 	. = TEXT_BASE;
@@ -45,6 +45,9 @@ SECTIONS
 	  LONG(0x53555243) /* 'CRUS' */
 #endif
 		*(.text_bare_init*)
+		__exceptions_start = .;
+		KEEP(*(.text_exceptions*))
+		__exceptions_stop = .;
 		*(.text*)
 	}
 
-- 
1.7.7.3


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

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

* [PATCH] video imx: specify num_modes in platform_data
  2012-01-05  9:23 compile patches Sascha Hauer
  2012-01-05  9:23 ` [PATCH 1/3] ARM AT91: Add missing on_flash_bbt in atmel_nand_data Sascha Hauer
  2012-01-05  9:23 ` [PATCH] ARM: move exception vectors away from start of binary Sascha Hauer
@ 2012-01-05  9:23 ` Sascha Hauer
  2012-01-05  9:23 ` [PATCH 2/3] ARM omap beagle xload: update defconfig Sascha Hauer
  2012-01-05  9:23 ` [PATCH 3/3] fat fs: Fix compile warning Sascha Hauer
  4 siblings, 0 replies; 13+ messages in thread
From: Sascha Hauer @ 2012-01-05  9:23 UTC (permalink / raw)
  To: barebox

Without num_modes the imx fb driver won't work. Specify this
in the boards and also bail out in the driver when num_modes
is unspecified.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c |    1 +
 arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c |    1 +
 arch/arm/boards/guf-neso/board.c                  |    1 +
 arch/arm/boards/imx21ads/imx21ads.c               |    1 +
 arch/arm/boards/karo-tx25/board.c                 |    1 +
 arch/arm/boards/pcm038/pcm038.c                   |    1 +
 drivers/video/imx.c                               |    5 +++++
 7 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
index 162c117..73e54f2 100644
--- a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
+++ b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
@@ -116,6 +116,7 @@ static struct imx_fb_videomode imxfb_mode = {
 
 static struct imx_fb_platform_data eukrea_cpuimx25_fb_data = {
 	.mode		= &imxfb_mode,
+	.num_modes	= 1,
 	.pwmr		= 0x00A903FF,
 	.lscr1		= 0x00120300,
 	.dmacr		= 0x80040060,
diff --git a/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c b/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c
index c419c73..e2766fb 100644
--- a/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c
+++ b/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c
@@ -116,6 +116,7 @@ static struct imx_fb_videomode imxfb_mode = {
 
 static struct imx_fb_platform_data eukrea_cpuimx27_fb_data = {
 	.mode	= &imxfb_mode,
+	.num_modes = 1,
 	.pwmr	= 0x00A903FF,
 	.lscr1	= 0x00120300,
 	.dmacr	= 0x00020010,
diff --git a/arch/arm/boards/guf-neso/board.c b/arch/arm/boards/guf-neso/board.c
index e524b70..62d82f2 100644
--- a/arch/arm/boards/guf-neso/board.c
+++ b/arch/arm/boards/guf-neso/board.c
@@ -105,6 +105,7 @@ static void neso_fb_enable(int enable)
 
 static struct imx_fb_platform_data neso_fb_data = {
 	.mode	= &imxfb_mode,
+	.num_modes = 1,
 	.pwmr	= 0x00000000,	/* doesn't matter */
 	.lscr1	= 0x00120300,	/* doesn't matter */
 	/* dynamic mode -> using the reset values (as recommended in the datasheet) */
diff --git a/arch/arm/boards/imx21ads/imx21ads.c b/arch/arm/boards/imx21ads/imx21ads.c
index fc34709..fde6774 100644
--- a/arch/arm/boards/imx21ads/imx21ads.c
+++ b/arch/arm/boards/imx21ads/imx21ads.c
@@ -70,6 +70,7 @@ static struct imx_fb_videomode imx_fb_modedata = {
 
 static struct imx_fb_platform_data imx_fb_data = {
 	.mode           = &imx_fb_modedata,
+	.num_modes	= 1,
 	.cmap_greyscale = 0,
 	.cmap_inverse   = 0,
 	.cmap_static    = 0,
diff --git a/arch/arm/boards/karo-tx25/board.c b/arch/arm/boards/karo-tx25/board.c
index 1eece1d..bfccd0c 100644
--- a/arch/arm/boards/karo-tx25/board.c
+++ b/arch/arm/boards/karo-tx25/board.c
@@ -239,6 +239,7 @@ static void tx25_fb_enable(int enable)
 
 static struct imx_fb_platform_data tx25_fb_data = {
 	.mode		= &stk5_fb_mode,
+	.num_modes	= 1,
 	.dmacr		= 0x80040060,
 	.enable		= tx25_fb_enable,
 };
diff --git a/arch/arm/boards/pcm038/pcm038.c b/arch/arm/boards/pcm038/pcm038.c
index 6b8897e..8dd6521 100644
--- a/arch/arm/boards/pcm038/pcm038.c
+++ b/arch/arm/boards/pcm038/pcm038.c
@@ -104,6 +104,7 @@ static struct imx_fb_videomode imxfb_mode = {
 
 static struct imx_fb_platform_data pcm038_fb_data = {
 	.mode	= &imxfb_mode,
+	.num_modes = 1,
 	.pwmr	= 0x00A903FF,
 	.lscr1	= 0x00120300,
 	.dmacr	= 0x00020010,
diff --git a/drivers/video/imx.c b/drivers/video/imx.c
index 78179af..452e558 100644
--- a/drivers/video/imx.c
+++ b/drivers/video/imx.c
@@ -552,6 +552,11 @@ static int imxfb_probe(struct device_d *dev)
 	writel(readl(IMX_CCM_BASE + CCM_CGCR1) & ~(1 << 29),
 		IMX_CCM_BASE + CCM_CGCR1);
 #endif
+	if (!pdata->num_modes) {
+		dev_err(dev, "no modes. bailing out\n");
+		return -EINVAL;
+	}
+
 	mode_list = xzalloc(sizeof(*mode_list) * pdata->num_modes);
 	for (i = 0; i < pdata->num_modes; i++)
 		mode_list[i] = pdata->mode[i].mode;
-- 
1.7.7.3


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

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

* [PATCH 2/3] ARM omap beagle xload: update defconfig
  2012-01-05  9:23 compile patches Sascha Hauer
                   ` (2 preceding siblings ...)
  2012-01-05  9:23 ` [PATCH] video imx: specify num_modes in platform_data Sascha Hauer
@ 2012-01-05  9:23 ` Sascha Hauer
  2012-01-05  9:23 ` [PATCH 3/3] fat fs: Fix compile warning Sascha Hauer
  4 siblings, 0 replies; 13+ messages in thread
From: Sascha Hauer @ 2012-01-05  9:23 UTC (permalink / raw)
  To: barebox

We don't need mtd write support for the xloader config

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/configs/omap3530_beagle_xload_defconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/configs/omap3530_beagle_xload_defconfig b/arch/arm/configs/omap3530_beagle_xload_defconfig
index 58a2309..1069670 100644
--- a/arch/arm/configs/omap3530_beagle_xload_defconfig
+++ b/arch/arm/configs/omap3530_beagle_xload_defconfig
@@ -20,14 +20,14 @@ CONFIG_DRIVER_SERIAL_NS16550=y
 CONFIG_DRIVER_SERIAL_NS16550_OMAP_EXTENSIONS=y
 # CONFIG_SPI is not set
 CONFIG_MTD=y
+# CONFIG_MTD_WRITE is not set
+# CONFIG_MTD_OOB_DEVICE is not set
 CONFIG_NAND=y
-# CONFIG_NAND_WRITE is not set
 # 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_READ_OOB is not set
 CONFIG_NAND_OMAP_GPMC=y
 CONFIG_MCI=y
 CONFIG_MCI_STARTUP=y
-- 
1.7.7.3


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

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

* [PATCH 3/3] fat fs: Fix compile warning
  2012-01-05  9:23 compile patches Sascha Hauer
                   ` (3 preceding siblings ...)
  2012-01-05  9:23 ` [PATCH 2/3] ARM omap beagle xload: update defconfig Sascha Hauer
@ 2012-01-05  9:23 ` Sascha Hauer
  4 siblings, 0 replies; 13+ messages in thread
From: Sascha Hauer @ 2012-01-05  9:23 UTC (permalink / raw)
  To: barebox

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 fs/fat/ff.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/fat/ff.c b/fs/fat/ff.c
index 3ada867..0087e21 100644
--- a/fs/fat/ff.c
+++ b/fs/fat/ff.c
@@ -874,7 +874,7 @@ void fit_lfn (
 /*
  * Create numbered name
  */
-#ifdef CONFIG_FS_FAT_LFN
+#if defined(CONFIG_FS_FAT_LFN) && defined(CONFIG_FS_FAT_WRITE)
 static void gen_numname (
 	BYTE *dst,		/* Pointer to generated SFN */
 	const BYTE *src,	/* Pointer to source SFN to be modified */
-- 
1.7.7.3


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

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

* Re: [PATCH 1/3] ARM AT91: Add missing on_flash_bbt in atmel_nand_data
  2012-01-05  9:23 ` [PATCH 1/3] ARM AT91: Add missing on_flash_bbt in atmel_nand_data Sascha Hauer
@ 2012-01-05 13:14   ` Jean-Christophe PLAGNIOL-VILLARD
  2012-01-06  8:32     ` Sascha Hauer
  0 siblings, 1 reply; 13+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-01-05 13:14 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 10:23 Thu 05 Jan     , Sascha Hauer wrote:
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
no please se use the right patch

atmel_nand: add on_flash_btt option to enable bbt option

Best Regards,
J.

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

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

* Re: [PATCH] ARM: move exception vectors away from start of binary
  2012-01-05  9:23 ` [PATCH] ARM: move exception vectors away from start of binary Sascha Hauer
@ 2012-01-05 13:17   ` Jean-Christophe PLAGNIOL-VILLARD
  2012-01-06  8:34     ` Sascha Hauer
  0 siblings, 1 reply; 13+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-01-05 13:17 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 10:23 Thu 05 Jan     , Sascha Hauer wrote:
> Traditionally U-Boot and barebox have the exception vectors at
> the start of the binary. There is no real reason in doing so,
> because in the majority of cases this data will not be at 0x0
> where it could be used as vectors directly anyway.
> This patch puts the vectors into a separate linker section and
> defines an head function which is placed at the start of the
> image instead. Putting this in a separate function also has
> the advantage that it can be placed at the start of images
> which require an additional header like several Freescale i.MX
> images. As the head function contains the barebox arm magic
> those images can now also be detected as barebox images.
> The header of the image can be customized using
> CONFIG_ARM_CUSTOM_HEAD. If this is set the user must specify
> a custom barebox_arm_head function in the text_entry section.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
Please hold on this one

As I said I work on at91 boot let me check it work before apply this

Best Regards,
J.
>  arch/arm/Kconfig                                   |    6 ++++
>  arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c  |    3 +-
>  arch/arm/boards/eukrea_cpuimx35/flash_header.c     |    3 +-
>  arch/arm/boards/eukrea_cpuimx51/flash_header.c     |    3 +-
>  arch/arm/boards/freescale-mx25-3-stack/3stack.c    |    3 +-
>  .../boards/freescale-mx35-3-stack/flash_header.c   |    3 +-
>  arch/arm/boards/freescale-mx51-pdk/flash_header.c  |    3 +-
>  arch/arm/boards/freescale-mx53-loco/flash_header.c |    3 +-
>  arch/arm/boards/freescale-mx53-smd/flash_header.c  |    3 +-
>  arch/arm/cpu/mmu.c                                 |    4 +-
>  arch/arm/cpu/start.c                               |   20 ++++++++------
>  arch/arm/include/asm/barebox-arm-head.h            |   28 ++++++++++++++++++++
>  arch/arm/include/asm/barebox-arm.h                 |    2 +
>  arch/arm/lib/barebox.lds.S                         |    5 +++-
>  14 files changed, 69 insertions(+), 20 deletions(-)
>  create mode 100644 arch/arm/include/asm/barebox-arm-head.h
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index b600179..b0b8f9c 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -26,6 +26,12 @@ config ARM_LINUX
>  	default y
>  	depends on CMD_BOOTZ || CMD_BOOTU || CMD_BOOTM
>  
> +config ARM_CUSTOM_HEAD
> +	bool
> +	help
> +	  specify a board or architecture specific custom head
> +	  function
> +
>  menu "System Type                   "
>  
>  choice
> diff --git a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
> index 162c117..c7b0d2d 100644
> --- a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
> +++ b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
> @@ -46,13 +46,14 @@
>  #include <usb/fsl_usb2.h>
>  #include <mach/usb.h>
>  #include <mach/devices-imx25.h>
> +#include <asm/barebox-arm-head.h>
>  
>  extern unsigned long _stext;
>  extern void exception_vectors(void);
>  
>  void __naked __flash_header_start go(void)
>  {
> -	__asm__ __volatile__("b exception_vectors\n");
> +	barebox_arm_default_head();
>  }
>  
>  struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
> diff --git a/arch/arm/boards/eukrea_cpuimx35/flash_header.c b/arch/arm/boards/eukrea_cpuimx35/flash_header.c
> index 93c8348..4ded270 100644
> --- a/arch/arm/boards/eukrea_cpuimx35/flash_header.c
> +++ b/arch/arm/boards/eukrea_cpuimx35/flash_header.c
> @@ -1,12 +1,13 @@
>  #include <common.h>
>  #include <mach/imx-flash-header.h>
>  #include <mach/imx-regs.h>
> +#include <asm/barebox-arm-head.h>
>  
>  extern void exception_vectors(void);
>  
>  void __naked __flash_header_start go(void)
>  {
> -	__asm__ __volatile__("b exception_vectors\n");
> +	barebox_arm_default_head();
>  }
>  
>  struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
> diff --git a/arch/arm/boards/eukrea_cpuimx51/flash_header.c b/arch/arm/boards/eukrea_cpuimx51/flash_header.c
> index f953b09..4f29dd9 100644
> --- a/arch/arm/boards/eukrea_cpuimx51/flash_header.c
> +++ b/arch/arm/boards/eukrea_cpuimx51/flash_header.c
> @@ -1,11 +1,12 @@
>  #include <common.h>
>  #include <mach/imx-flash-header.h>
> +#include <asm/barebox-arm-head.h>
>  
>  extern unsigned long _stext;
>  
>  void __naked __flash_header_start go(void)
>  {
> -	__asm__ __volatile__("b exception_vectors\n");
> +	barebox_arm_default_head();
>  }
>  
>  struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
> diff --git a/arch/arm/boards/freescale-mx25-3-stack/3stack.c b/arch/arm/boards/freescale-mx25-3-stack/3stack.c
> index 5aa54e4..78b872c 100644
> --- a/arch/arm/boards/freescale-mx25-3-stack/3stack.c
> +++ b/arch/arm/boards/freescale-mx25-3-stack/3stack.c
> @@ -42,13 +42,14 @@
>  #include <i2c/i2c.h>
>  #include <mfd/mc34704.h>
>  #include <mach/devices-imx25.h>
> +#include <asm/barebox-arm-head.h>
>  
>  extern unsigned long _stext;
>  extern void exception_vectors(void);
>  
>  void __naked __flash_header_start go(void)
>  {
> -	__asm__ __volatile__("b exception_vectors\n");
> +	barebox_arm_default_head();
>  }
>  
>  struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
> diff --git a/arch/arm/boards/freescale-mx35-3-stack/flash_header.c b/arch/arm/boards/freescale-mx35-3-stack/flash_header.c
> index 4bee797..63c1502 100644
> --- a/arch/arm/boards/freescale-mx35-3-stack/flash_header.c
> +++ b/arch/arm/boards/freescale-mx35-3-stack/flash_header.c
> @@ -1,12 +1,13 @@
>  #include <common.h>
>  #include <mach/imx-flash-header.h>
>  #include <mach/imx-regs.h>
> +#include <asm/barebox-arm-head.h>
>  
>  extern void exception_vectors(void);
>  
>  void __naked __flash_header_start go(void)
>  {
> -	__asm__ __volatile__("b exception_vectors\n");
> +	barebox_arm_default_head();
>  }
>  
>  struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
> diff --git a/arch/arm/boards/freescale-mx51-pdk/flash_header.c b/arch/arm/boards/freescale-mx51-pdk/flash_header.c
> index 5f94506..d513c8c 100644
> --- a/arch/arm/boards/freescale-mx51-pdk/flash_header.c
> +++ b/arch/arm/boards/freescale-mx51-pdk/flash_header.c
> @@ -1,11 +1,12 @@
>  #include <common.h>
>  #include <mach/imx-flash-header.h>
> +#include <asm/barebox-arm-head.h>
>  
>  extern unsigned long _stext;
>  
>  void __naked __flash_header_start go(void)
>  {
> -	__asm__ __volatile__("b exception_vectors\n");
> +	barebox_arm_default_head();
>  }
>  
>  struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
> diff --git a/arch/arm/boards/freescale-mx53-loco/flash_header.c b/arch/arm/boards/freescale-mx53-loco/flash_header.c
> index 490e223..105f54a 100644
> --- a/arch/arm/boards/freescale-mx53-loco/flash_header.c
> +++ b/arch/arm/boards/freescale-mx53-loco/flash_header.c
> @@ -16,10 +16,11 @@
>  #include <common.h>
>  #include <asm/byteorder.h>
>  #include <mach/imx-flash-header.h>
> +#include <asm/barebox-arm-head.h>
>  
>  void __naked __flash_header_start go(void)
>  {
> -	__asm__ __volatile__("b exception_vectors\n");
> +	barebox_arm_default_head();
>  }
>  
>  struct imx_dcd_v2_entry __dcd_entry_section dcd_entry[] = {
> diff --git a/arch/arm/boards/freescale-mx53-smd/flash_header.c b/arch/arm/boards/freescale-mx53-smd/flash_header.c
> index 490e223..105f54a 100644
> --- a/arch/arm/boards/freescale-mx53-smd/flash_header.c
> +++ b/arch/arm/boards/freescale-mx53-smd/flash_header.c
> @@ -16,10 +16,11 @@
>  #include <common.h>
>  #include <asm/byteorder.h>
>  #include <mach/imx-flash-header.h>
> +#include <asm/barebox-arm-head.h>
>  
>  void __naked __flash_header_start go(void)
>  {
> -	__asm__ __volatile__("b exception_vectors\n");
> +	barebox_arm_default_head();
>  }
>  
>  struct imx_dcd_v2_entry __dcd_entry_section dcd_entry[] = {
> diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c
> index c6c91df..e8ff676 100644
> --- a/arch/arm/cpu/mmu.c
> +++ b/arch/arm/cpu/mmu.c
> @@ -4,6 +4,7 @@
>  #include <errno.h>
>  #include <sizes.h>
>  #include <asm/memory.h>
> +#include <asm/barebox-arm.h>
>  #include <asm/system.h>
>  #include <memory.h>
>  
> @@ -182,7 +183,6 @@ static void vectors_init(void)
>  {
>  	u32 *exc, *zero = NULL;
>  	void *vectors;
> -	extern unsigned long exception_vectors;
>  	u32 cr;
>  
>  	cr = get_cr();
> @@ -210,7 +210,7 @@ static void vectors_init(void)
>  
>  	vectors = xmemalign(PAGE_SIZE, PAGE_SIZE);
>  	memset(vectors, 0, PAGE_SIZE);
> -	memcpy(vectors, &exception_vectors, ARM_VECTORS_SIZE);
> +	memcpy(vectors, __exceptions_start, __exceptions_stop - __exceptions_start);
>  
>  	if (cr & CR_V)
>  		exc[256 - 16] = (u32)vectors | PTE_TYPE_SMALL | PTE_FLAGS_CACHED;
> diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
> index 5e09300..e78d749 100644
> --- a/arch/arm/cpu/start.c
> +++ b/arch/arm/cpu/start.c
> @@ -23,14 +23,22 @@
>  #include <common.h>
>  #include <init.h>
>  #include <asm/barebox-arm.h>
> +#include <asm/barebox-arm-head.h>
>  #include <asm/system.h>
>  #include <asm-generic/memory_layout.h>
>  #include <asm/sections.h>
>  
> -void __naked __section(.text_entry) exception_vectors(void)
> +#ifndef CONFIG_ARM_CUSTOM_HEAD
> +void __naked __section(.text_entry) barebox_arm_head(void)
> +{
> +	barebox_arm_default_head();
> +}
> +#endif
> +
> +void __naked __section(.text_exceptions) exception_vectors(void)
>  {
>  	__asm__ __volatile__ (
> -		"b reset\n"				/* reset */
> +		"b start_arm_barebox\n"			/* reset */
>  #ifdef CONFIG_ARM_EXCEPTIONS
>  		"ldr pc, =undefined_instruction\n"	/* undefined instruction */
>  		"ldr pc, =software_interrupt\n"		/* software interrupt (SWI) */
> @@ -48,12 +56,6 @@ void __naked __section(.text_entry) exception_vectors(void)
>  		"1: bne 1b\n"				/* irq (interrupt) */
>  		"1: bne 1b\n"				/* fiq (fast interrupt) */
>  #endif
> -		".word 0x65726162\n"			/* 'bare' */
> -		".word 0x00786f62\n"			/* 'box' */
> -		".word _text\n"				/* text base. If copied there,
> -							 * barebox can skip relocation
> -							 */
> -		".word _barebox_image_size\n"		/* image size to copy */
>  	);
>  }
>  
> @@ -61,7 +63,7 @@ void __naked __section(.text_entry) exception_vectors(void)
>   * The actual reset vector. This code is position independent and usually
>   * does not run at the address it's linked at.
>   */
> -void __naked __bare_init reset(void)
> +void __naked __bare_init start_arm_barebox(void)
>  {
>  	uint32_t r;
>  
> diff --git a/arch/arm/include/asm/barebox-arm-head.h b/arch/arm/include/asm/barebox-arm-head.h
> new file mode 100644
> index 0000000..72ad8ec
> --- /dev/null
> +++ b/arch/arm/include/asm/barebox-arm-head.h
> @@ -0,0 +1,28 @@
> +#ifndef __BAREBOX_ARM_HEAD_H
> +#define __BAREBOX_ARM_HEAD_H
> +
> +#ifndef ARM_EXCEPTION_VECTOR_6
> +#define ARM_EXCEPTION_VECTOR_6	".word 0x0\n"
> +#endif
> +
> +static inline void barebox_arm_default_head(void)
> +{
> +	__asm__ __volatile__ (
> +		"b start_arm_barebox\n"
> +		".word 0x0\n"
> +		".word 0x0\n"
> +		".word 0x0\n"
> +		".word 0x0\n"
> +		ARM_EXCEPTION_VECTOR_6
> +		".word 0x0\n"
> +		".word 0x0\n"
> +		".word 0x65726162\n"			/* 'bare' */
> +		".word 0x00786f62\n"			/* 'box' */
> +		".word _text\n"				/* text base. If copied there,
> +							 * barebox can skip relocation
> +							 */
> +		".word _barebox_image_size\n"		/* image size to copy */
> +	);
> +}
> +
> +#endif /* __BAREBOX_ARM_HEAD_H */
> diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
> index 7bb1af1..3339782 100644
> --- a/arch/arm/include/asm/barebox-arm.h
> +++ b/arch/arm/include/asm/barebox-arm.h
> @@ -36,6 +36,8 @@ int	cleanup_before_linux(void);
>  int	board_init(void);
>  int	dram_init (void);
>  
> +extern char __exceptions_start[], __exceptions_stop[];
> +
>  void board_init_lowlevel(void);
>  void board_init_lowlevel_return(void);
>  void arch_init_lowlevel(void);
> diff --git a/arch/arm/lib/barebox.lds.S b/arch/arm/lib/barebox.lds.S
> index f05f345..f0d675b 100644
> --- a/arch/arm/lib/barebox.lds.S
> +++ b/arch/arm/lib/barebox.lds.S
> @@ -26,7 +26,7 @@
>  
>  OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
>  OUTPUT_ARCH(arm)
> -ENTRY(exception_vectors)
> +ENTRY(barebox_arm_head)
>  SECTIONS
>  {
>  	. = TEXT_BASE;
> @@ -45,6 +45,9 @@ SECTIONS
>  	  LONG(0x53555243) /* 'CRUS' */
>  #endif
>  		*(.text_bare_init*)
> +		__exceptions_start = .;
> +		KEEP(*(.text_exceptions*))
> +		__exceptions_stop = .;
>  		*(.text*)
>  	}
>  
> -- 
> 1.7.7.3
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

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

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

* Re: [PATCH 1/3] ARM AT91: Add missing on_flash_bbt in atmel_nand_data
  2012-01-05 13:14   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2012-01-06  8:32     ` Sascha Hauer
  2012-01-06 12:09       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 13+ messages in thread
From: Sascha Hauer @ 2012-01-06  8:32 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

On Thu, Jan 05, 2012 at 02:14:19PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 10:23 Thu 05 Jan     , Sascha Hauer wrote:
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> no please se use the right patch

I would if you had sent it.

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] 13+ messages in thread

* Re: [PATCH] ARM: move exception vectors away from start of binary
  2012-01-05 13:17   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2012-01-06  8:34     ` Sascha Hauer
  0 siblings, 0 replies; 13+ messages in thread
From: Sascha Hauer @ 2012-01-06  8:34 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

On Thu, Jan 05, 2012 at 02:17:12PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 10:23 Thu 05 Jan     , Sascha Hauer wrote:
> > Traditionally U-Boot and barebox have the exception vectors at
> > the start of the binary. There is no real reason in doing so,
> > because in the majority of cases this data will not be at 0x0
> > where it could be used as vectors directly anyway.
> > This patch puts the vectors into a separate linker section and
> > defines an head function which is placed at the start of the
> > image instead. Putting this in a separate function also has
> > the advantage that it can be placed at the start of images
> > which require an additional header like several Freescale i.MX
> > images. As the head function contains the barebox arm magic
> > those images can now also be detected as barebox images.
> > The header of the image can be customized using
> > CONFIG_ARM_CUSTOM_HEAD. If this is set the user must specify
> > a custom barebox_arm_head function in the text_entry section.
> > 
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> Please hold on this one

Sorry, I accidently sent this. It's not part of the posted series.

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] 13+ messages in thread

* Re: [PATCH 1/3] ARM AT91: Add missing on_flash_bbt in atmel_nand_data
  2012-01-06  8:32     ` Sascha Hauer
@ 2012-01-06 12:09       ` Jean-Christophe PLAGNIOL-VILLARD
  2012-01-06 12:44         ` Sascha Hauer
  0 siblings, 1 reply; 13+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-01-06 12:09 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

On 09:32 Fri 06 Jan     , Sascha Hauer wrote:
> On Thu, Jan 05, 2012 at 02:14:19PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 10:23 Thu 05 Jan     , Sascha Hauer wrote:
> > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > > ---
> > no please se use the right patch
> 
> I would if you had sent it.
I did

Best Regards,
J.

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

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

* Re: [PATCH 1/3] ARM AT91: Add missing on_flash_bbt in atmel_nand_data
  2012-01-06 12:09       ` Jean-Christophe PLAGNIOL-VILLARD
@ 2012-01-06 12:44         ` Sascha Hauer
  0 siblings, 0 replies; 13+ messages in thread
From: Sascha Hauer @ 2012-01-06 12:44 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

On Fri, Jan 06, 2012 at 01:09:33PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 09:32 Fri 06 Jan     , Sascha Hauer wrote:
> > On Thu, Jan 05, 2012 at 02:14:19PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > On 10:23 Thu 05 Jan     , Sascha Hauer wrote:
> > > > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > > > ---
> > > no please se use the right patch
> > 
> > I would if you had sent it.
> I did

Sorry, can't find this neither in my inbox nor in the list archives.

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] 13+ messages in thread

* [PATCH] video imx: specify num_modes in platform_data
@ 2012-01-04 14:21 Sascha Hauer
  0 siblings, 0 replies; 13+ messages in thread
From: Sascha Hauer @ 2012-01-04 14:21 UTC (permalink / raw)
  To: barebox

Without num_modes the imx fb driver won't work. Specify this
in the boards and also bail out in the driver when num_modes
is unspecified.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c |    1 +
 arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c |    1 +
 arch/arm/boards/guf-neso/board.c                  |    1 +
 arch/arm/boards/imx21ads/imx21ads.c               |    1 +
 arch/arm/boards/karo-tx25/board.c                 |    1 +
 arch/arm/boards/pcm038/pcm038.c                   |    1 +
 drivers/video/imx.c                               |    5 +++++
 7 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
index 162c117..73e54f2 100644
--- a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
+++ b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
@@ -116,6 +116,7 @@ static struct imx_fb_videomode imxfb_mode = {
 
 static struct imx_fb_platform_data eukrea_cpuimx25_fb_data = {
 	.mode		= &imxfb_mode,
+	.num_modes	= 1,
 	.pwmr		= 0x00A903FF,
 	.lscr1		= 0x00120300,
 	.dmacr		= 0x80040060,
diff --git a/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c b/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c
index c419c73..e2766fb 100644
--- a/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c
+++ b/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c
@@ -116,6 +116,7 @@ static struct imx_fb_videomode imxfb_mode = {
 
 static struct imx_fb_platform_data eukrea_cpuimx27_fb_data = {
 	.mode	= &imxfb_mode,
+	.num_modes = 1,
 	.pwmr	= 0x00A903FF,
 	.lscr1	= 0x00120300,
 	.dmacr	= 0x00020010,
diff --git a/arch/arm/boards/guf-neso/board.c b/arch/arm/boards/guf-neso/board.c
index e524b70..62d82f2 100644
--- a/arch/arm/boards/guf-neso/board.c
+++ b/arch/arm/boards/guf-neso/board.c
@@ -105,6 +105,7 @@ static void neso_fb_enable(int enable)
 
 static struct imx_fb_platform_data neso_fb_data = {
 	.mode	= &imxfb_mode,
+	.num_modes = 1,
 	.pwmr	= 0x00000000,	/* doesn't matter */
 	.lscr1	= 0x00120300,	/* doesn't matter */
 	/* dynamic mode -> using the reset values (as recommended in the datasheet) */
diff --git a/arch/arm/boards/imx21ads/imx21ads.c b/arch/arm/boards/imx21ads/imx21ads.c
index fc34709..fde6774 100644
--- a/arch/arm/boards/imx21ads/imx21ads.c
+++ b/arch/arm/boards/imx21ads/imx21ads.c
@@ -70,6 +70,7 @@ static struct imx_fb_videomode imx_fb_modedata = {
 
 static struct imx_fb_platform_data imx_fb_data = {
 	.mode           = &imx_fb_modedata,
+	.num_modes	= 1,
 	.cmap_greyscale = 0,
 	.cmap_inverse   = 0,
 	.cmap_static    = 0,
diff --git a/arch/arm/boards/karo-tx25/board.c b/arch/arm/boards/karo-tx25/board.c
index 1eece1d..bfccd0c 100644
--- a/arch/arm/boards/karo-tx25/board.c
+++ b/arch/arm/boards/karo-tx25/board.c
@@ -239,6 +239,7 @@ static void tx25_fb_enable(int enable)
 
 static struct imx_fb_platform_data tx25_fb_data = {
 	.mode		= &stk5_fb_mode,
+	.num_modes	= 1,
 	.dmacr		= 0x80040060,
 	.enable		= tx25_fb_enable,
 };
diff --git a/arch/arm/boards/pcm038/pcm038.c b/arch/arm/boards/pcm038/pcm038.c
index 6b8897e..8dd6521 100644
--- a/arch/arm/boards/pcm038/pcm038.c
+++ b/arch/arm/boards/pcm038/pcm038.c
@@ -104,6 +104,7 @@ static struct imx_fb_videomode imxfb_mode = {
 
 static struct imx_fb_platform_data pcm038_fb_data = {
 	.mode	= &imxfb_mode,
+	.num_modes = 1,
 	.pwmr	= 0x00A903FF,
 	.lscr1	= 0x00120300,
 	.dmacr	= 0x00020010,
diff --git a/drivers/video/imx.c b/drivers/video/imx.c
index 78179af..452e558 100644
--- a/drivers/video/imx.c
+++ b/drivers/video/imx.c
@@ -552,6 +552,11 @@ static int imxfb_probe(struct device_d *dev)
 	writel(readl(IMX_CCM_BASE + CCM_CGCR1) & ~(1 << 29),
 		IMX_CCM_BASE + CCM_CGCR1);
 #endif
+	if (!pdata->num_modes) {
+		dev_err(dev, "no modes. bailing out\n");
+		return -EINVAL;
+	}
+
 	mode_list = xzalloc(sizeof(*mode_list) * pdata->num_modes);
 	for (i = 0; i < pdata->num_modes; i++)
 		mode_list[i] = pdata->mode[i].mode;
-- 
1.7.7.3


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

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

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

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-05  9:23 compile patches Sascha Hauer
2012-01-05  9:23 ` [PATCH 1/3] ARM AT91: Add missing on_flash_bbt in atmel_nand_data Sascha Hauer
2012-01-05 13:14   ` Jean-Christophe PLAGNIOL-VILLARD
2012-01-06  8:32     ` Sascha Hauer
2012-01-06 12:09       ` Jean-Christophe PLAGNIOL-VILLARD
2012-01-06 12:44         ` Sascha Hauer
2012-01-05  9:23 ` [PATCH] ARM: move exception vectors away from start of binary Sascha Hauer
2012-01-05 13:17   ` Jean-Christophe PLAGNIOL-VILLARD
2012-01-06  8:34     ` Sascha Hauer
2012-01-05  9:23 ` [PATCH] video imx: specify num_modes in platform_data Sascha Hauer
2012-01-05  9:23 ` [PATCH 2/3] ARM omap beagle xload: update defconfig Sascha Hauer
2012-01-05  9:23 ` [PATCH 3/3] fat fs: Fix compile warning Sascha Hauer
  -- strict thread matches above, loose matches on Subject: below --
2012-01-04 14:21 [PATCH] video imx: specify num_modes in platform_data Sascha Hauer

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