[Armadeus-commitlog] armadeus branch, master, updated. armadeus-4.1-311-g1960e43
Brought to you by:
sszy
|
From: jorasse <jo...@us...> - 2012-05-20 22:10:11
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 1960e430c13619b09305107c0a1e391f89880c57 (commit)
from 4bad4aa07b100eddef973d8e3ba2c0168d1bbf0f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1960e430c13619b09305107c0a1e391f89880c57
Author: Eric Jarrige <eri...@ar...>
Date: Mon May 21 00:10:00 2012 +0200
[UBOOT] apf51: fix FPGA autoload issue on boot
-----------------------------------------------------------------------
Summary of changes:
patches/u-boot/2011.12/401-apf51.patch | 49 ++++++++-----------------------
1 files changed, 13 insertions(+), 36 deletions(-)
diff --git a/patches/u-boot/2011.12/401-apf51.patch b/patches/u-boot/2011.12/401-apf51.patch
index 75036b8..b752760 100644
--- a/patches/u-boot/2011.12/401-apf51.patch
+++ b/patches/u-boot/2011.12/401-apf51.patch
@@ -2,7 +2,7 @@ Index: u-boot-2011.12/board/armadeus/apf51/apf51.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ u-boot-custom/board/armadeus/apf51/apf51.c 2012-01-12 17:19:58.434303119 +0100
-@@ -0,0 +1,1244 @@
+@@ -0,0 +1,1221 @@
+/*
+ * (C) Copyright 2010-2012 Eric Jarrige, Armadeus Project
+ *
@@ -39,6 +39,7 @@ Index: u-boot-2011.12/board/armadeus/apf51/apf51.c
+#include <asm/gpio.h>
+#include <asm/errno.h>
+#include <i2c.h>
++#include <jffs2/jffs2.h>
+#include <asm/arch/mxc_nand.h>
+#include "fpga.h"
+#include <nand.h>
@@ -47,31 +48,6 @@ Index: u-boot-2011.12/board/armadeus/apf51/apf51.c
+
+unsigned long boot_verb = 0;
+
-+static int read_firmware(size_t offset, size_t end, u_char * buf)
-+{
-+ size_t amount_loaded = 0;
-+ size_t blocksize;
-+
-+ u_char *char_ptr;
-+
-+ blocksize = nand_info[0].erasesize;
-+
-+ while (offset < end) {
-+ if (nand_block_isbad(&nand_info[0], offset)) {
-+ offset += blocksize;
-+ } else {
-+ char_ptr = &buf[amount_loaded];
-+ if (nand_read
-+ (&nand_info[0], offset, &blocksize, char_ptr))
-+ return 1;
-+ offset += blocksize;
-+ amount_loaded += blocksize;
-+ }
-+ }
-+
-+ return amount_loaded;
-+}
-+
+u32 get_board_rev(void)
+{
+
@@ -961,24 +937,25 @@ Index: u-boot-2011.12/board/armadeus/apf51/apf51.c
+ char *s;
+ u_char *firmware_buffer =
+ (u_char *) (CONFIG_SYS_LOAD_ADDR + CONFIG_SYS_MONITOR_LEN);
-+ size_t end = 0;
+ size_t size = 0;
-+ size_t offset = -1;
+ char *autoload = getenv("firmware_autoload");
++ u8 pnum;
++ struct mtd_device *dev;
++ struct part_info *part;
+
+#if defined(CONFIG_FPGA)
+ /* init and download fpga */
+ if ((autoload) && (0 == strcmp(autoload, "1"))) {
-+ if ((s = getenv("firmware_offset")) != NULL) {
-+ offset = simple_strtoul(s, NULL, 16);
-+ }
-+ if ((s = getenv("firmware_len")) != NULL) {
-+ end = offset + simple_strtoul(s, NULL, 16);
++ if (mtdparts_init() == 0)
++ if (find_dev_and_part("firmware", &dev, &pnum, &part) == 0) {
++ size = part->size;
++ if (nand_read_skip_bad(&nand_info[0], part->offset,
++ &size, firmware_buffer))
++ size = 0;
+ }
+ if (ctrlc()) {
-+ printf("Firmware download stopped!\n");
-+ } else if ((-1 != offset) && (offset != end)) {
-+ size = read_firmware(offset, end, firmware_buffer);
++ printf("Firmware download stopped!\n");
++ size = 0;
+ }
+ }
+ APF51_init_fpga(firmware_buffer, size);
hooks/post-receive
--
armadeus
|