[Armadeus-commitlog] armadeus branch, master, updated. release-3.3-179-g07ed948
Brought to you by:
sszy
|
From: Fabien M <fa...@us...> - 2010-12-21 13:25:22
|
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 07ed9485bdc112a0e01b1ae8b80dbfda7bbdd4c1 (commit)
from 4d6a3c36c47b62b77ba893b4174e97082c55fa0e (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 07ed9485bdc112a0e01b1ae8b80dbfda7bbdd4c1
Author: Fabien Marteau <fab...@ar...>
Date: Tue Dec 21 14:24:53 2010 +0100
[u-boot] cleaning apf51 patch, suppressing trailling white space and replace multiple space by TAB
-----------------------------------------------------------------------
Summary of changes:
.../target/u-boot/u-boot-2010.03-401-apf51.patch | 456 ++++++++++----------
1 files changed, 228 insertions(+), 228 deletions(-)
diff --git a/buildroot/target/u-boot/u-boot-2010.03-401-apf51.patch b/buildroot/target/u-boot/u-boot-2010.03-401-apf51.patch
index 1c6e715..2d05d0f 100644
--- a/buildroot/target/u-boot/u-boot-2010.03-401-apf51.patch
+++ b/buildroot/target/u-boot/u-boot-2010.03-401-apf51.patch
@@ -1296,7 +1296,7 @@ Index: u-boot-2010.03/Makefile
Index: u-boot-2010.03/board/armadeus/apf51/fpga.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot-2010.03/board/armadeus/apf51/fpga.h 2010-12-20 17:49:14.000000000 +0100
++++ u-boot-2010.03/board/armadeus/apf51/fpga.h 2010-12-21 14:20:49.000000000 +0100
@@ -0,0 +1,39 @@
+/*
+ * (C) Copyright 2002-2010
@@ -1336,100 +1336,100 @@ Index: u-boot-2010.03/board/armadeus/apf51/fpga.h
+extern int fpga_wdata_fn ( unsigned char data, int cookie );
+extern int fpga_abort_fn (int cookie);
+extern int fpga_post_fn (int cookie);
-+extern int fpga_busy_fn (int cookie);
++extern int fpga_busy_fn (int cookie);
Index: u-boot-2010.03/board/armadeus/apf51/fpga.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot-2010.03/board/armadeus/apf51/fpga.c 2010-12-21 12:42:04.000000000 +0100
++++ u-boot-2010.03/board/armadeus/apf51/fpga.c 2010-12-21 14:14:55.000000000 +0100
@@ -0,0 +1,270 @@
-+ /*
-+ * (C) Copyright 2002-2010
-+ * Nicolas Colombain <nic...@ar...>
-+ * Rich Ireland, Enterasys Networks, rir...@en....
-+ * Keith Outwater, kei...@mv....
-+ *
-+ * 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 as
-+ * published by the Free Software Foundation; either version 2 of
-+ * the License, or (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-+ * MA 02111-1307 USA
-+ *
-+ */
-+ #include <common.h>
-+
-+ #if defined(CONFIG_FPGA)
-+
-+ #include <asm/arch/imx-regs.h>
-+ #include <asm/arch/asm-offsets.h>
-+ #include <asm/io.h>
-+ #include <command.h>
-+ #include <config.h>
-+ #include <asm/arch/iomux.h>
-+ #include "fpga.h"
-+ #include <spartan3.h>
-+
-+ #ifdef FPGA_DEBUG
-+ #define PRINTF(fmt,args...) printf (fmt ,##args)
-+ #else
-+ #define PRINTF(fmt,args...)
-+ #endif
-+
-+ extern void imx_gpio_pin_set(unsigned int pin, int value);
-+ extern void imx_gpio_pin_cfg_dir(unsigned int pin, int dir);
-+ extern int imx_gpio_pin_get(unsigned int pin);
-+
-+ u32 temp_clk; /* use to restore the emi_clk_sel after donwload */
-+ u32 temp_rcr1;
-+ u32 temp_wcr1;
-+
-+ /* Note that these are pointers to code that is in Flash. They will be
-+ * relocated at runtime.
-+ * Spartan2 code is used to download our Spartan 6 :) code is compatible.
-+ * Just take care about the file size
++/*
++ * (C) Copyright 2002-2010
++ * Nicolas Colombain <nic...@ar...>
++ * Rich Ireland, Enterasys Networks, rir...@en....
++ * Keith Outwater, kei...@mv....
++ *
++ * 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 as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ */
++#include <common.h>
++
++#if defined(CONFIG_FPGA)
++
++#include <asm/arch/imx-regs.h>
++#include <asm/arch/asm-offsets.h>
++#include <asm/io.h>
++#include <command.h>
++#include <config.h>
++#include <asm/arch/iomux.h>
++#include "fpga.h"
++#include <spartan3.h>
++
++#ifdef FPGA_DEBUG
++#define PRINTF(fmt,args...) printf (fmt ,##args)
++#else
++#define PRINTF(fmt,args...)
++#endif
++
++extern void imx_gpio_pin_set(unsigned int pin, int value);
++extern void imx_gpio_pin_cfg_dir(unsigned int pin, int dir);
++extern int imx_gpio_pin_get(unsigned int pin);
++
++u32 temp_clk; /* use to restore the emi_clk_sel after donwload */
++u32 temp_rcr1;
++u32 temp_wcr1;
++
++/* Note that these are pointers to code that is in Flash. They will be
++ * relocated at runtime.
++ * Spartan2 code is used to download our Spartan 6 :) code is compatible.
++ * Just take care about the file size
++*/
++Xilinx_Spartan3_Slave_Parallel_fns fpga_fns = {
++ fpga_pre_fn,
++ fpga_pgm_fn,
++ fpga_init_fn,
++ NULL,
++ fpga_done_fn,
++ fpga_clk_fn,
++ fpga_cs_fn,
++ fpga_wr_fn,
++ fpga_rdata_fn,
++ fpga_wdata_fn,
++ fpga_busy_fn,
++ fpga_abort_fn,
++ fpga_post_fn,
++};
++
++Xilinx_desc fpga[CONFIG_FPGA_COUNT] = {
++ {Xilinx_Spartan3,
++ slave_parallel,
++ 3713568l/8,
++ (void *) &fpga_fns,
++ 0}
++};
++
++/*
++ *
+ */
-+ Xilinx_Spartan3_Slave_Parallel_fns fpga_fns = {
-+ fpga_pre_fn,
-+ fpga_pgm_fn,
-+ fpga_init_fn,
-+ NULL,
-+ fpga_done_fn,
-+ fpga_clk_fn,
-+ fpga_cs_fn,
-+ fpga_wr_fn,
-+ fpga_rdata_fn,
-+ fpga_wdata_fn,
-+ fpga_busy_fn,
-+ fpga_abort_fn,
-+ fpga_post_fn,
-+ };
-+
-+ Xilinx_desc fpga[CONFIG_FPGA_COUNT] = {
-+ {Xilinx_Spartan3,
-+ slave_parallel,
-+ 3713568l/8,
-+ (void *) &fpga_fns,
-+ 0}
-+ };
-+
-+ /*
-+ *
-+ */
-+ int
-+ fpga_pre_fn (int cookie)
-+ {
-+ #define EMI_CLK_SEL 1<<26
++int
++fpga_pre_fn (int cookie)
++{
++#define EMI_CLK_SEL 1<<26
+
+ /* change emi_clk_sel to ensure blck smaller than 50MHz */
+ temp_clk = __REG(CCM_BASE_ADDR + CLKCTL_CBCDR);
@@ -1441,174 +1441,174 @@ Index: u-boot-2010.03/board/armadeus/apf51/fpga.c
+ temp_wcr1 = __REG(CONFIG_CS1WCR1_ADDR);
+ __REG(CONFIG_CS1WCR1_ADDR) = 0x01000008;
+
-+ /* FPGA PROG */
-+ imx_gpio_pin_set(CONFIG_SYS_FPGA_PRG, 1);
-+ imx_gpio_pin_cfg_dir(CONFIG_SYS_FPGA_PRG, 1);
++ /* FPGA PROG */
++ imx_gpio_pin_set(CONFIG_SYS_FPGA_PRG, 1);
++ imx_gpio_pin_cfg_dir(CONFIG_SYS_FPGA_PRG, 1);
+
+ /* FPGA PWR */
-+ imx_gpio_pin_set(CONFIG_SYS_FPGA_PWR, 1);
++ imx_gpio_pin_set(CONFIG_SYS_FPGA_PWR, 1);
+ imx_gpio_pin_cfg_dir(CONFIG_SYS_FPGA_PWR, 1);
+
+ printf("Enable fpga power\n");
+
+ /* FPGA SUSPEND */
-+ imx_gpio_pin_set(CONFIG_SYS_FPGA_SUSPEND, 1);
-+ imx_gpio_pin_cfg_dir(CONFIG_SYS_FPGA_SUSPEND, 1);
++ imx_gpio_pin_set(CONFIG_SYS_FPGA_SUSPEND, 1);
++ imx_gpio_pin_cfg_dir(CONFIG_SYS_FPGA_SUSPEND, 1);
+
+ /* FPGA DONE */
+ imx_gpio_pin_cfg_dir(CONFIG_SYS_FPGA_DONE, 0);
+
+ /* FPGA INIT# */
-+ imx_gpio_pin_cfg_dir(CONFIG_SYS_FPGA_INIT, 0);
++ imx_gpio_pin_cfg_dir(CONFIG_SYS_FPGA_INIT, 0);
+
+ return cookie;
-+ }
-+
-+ /*
-+ * Set the FPGA's active-low program line to the specified level
-+ */
-+ int
-+ fpga_pgm_fn (int assert, int flush, int cookie)
-+ {
-+ PRINTF ("%s:%d: FPGA PROGRAM %s\n", __FUNCTION__, __LINE__,
-+ assert?"high":"low");
-+ imx_gpio_pin_set( CONFIG_SYS_FPGA_PRG, !assert);
-+ return assert;
-+ }
-+
-+ /*
-+ * Set the FPGA's active-high clock line to the specified level
-+ */
-+ int
-+ fpga_clk_fn (int assert_clk, int flush, int cookie)
-+ {
-+ return assert_clk;
-+ }
-+
-+ /*
-+ * Test the state of the active-low FPGA INIT line. Return 1 on INIT
-+ * asserted (low).
-+ */
-+ int
-+ fpga_init_fn (int cookie)
-+ {
-+ int value;
-+ PRINTF ("%s:%d: INIT check... \n", __FUNCTION__, __LINE__);
-+ value = imx_gpio_pin_get(CONFIG_SYS_FPGA_INIT);
-+ PRINTF ("init value read %x\n",value);
++}
++
++/*
++ * Set the FPGA's active-low program line to the specified level
++ */
++int
++fpga_pgm_fn (int assert, int flush, int cookie)
++{
++ PRINTF ("%s:%d: FPGA PROGRAM %s\n", __FUNCTION__, __LINE__,
++ assert?"high":"low");
++ imx_gpio_pin_set( CONFIG_SYS_FPGA_PRG, !assert);
++ return assert;
++}
++
++/*
++ * Set the FPGA's active-high clock line to the specified level
++ */
++int
++fpga_clk_fn (int assert_clk, int flush, int cookie)
++{
++ return assert_clk;
++}
++
++/*
++ * Test the state of the active-low FPGA INIT line. Return 1 on INIT
++ * asserted (low).
++ */
++int
++fpga_init_fn (int cookie)
++{
++ int value;
++ PRINTF ("%s:%d: INIT check... \n", __FUNCTION__, __LINE__);
++ value = imx_gpio_pin_get(CONFIG_SYS_FPGA_INIT);
++ PRINTF ("init value read %x\n",value);
+ if (value)
+ return 0;
+ return 1;
-+ }
-+
-+ /*
-+ * Test the state of the active-high FPGA DONE pin
-+ */
-+ int
-+ fpga_done_fn (int cookie)
-+ {
++}
++
++/*
++ * Test the state of the active-high FPGA DONE pin
++ */
++int
++fpga_done_fn (int cookie)
++{
+ int value;
+ value = imx_gpio_pin_get(CONFIG_SYS_FPGA_DONE);
-+ PRINTF ("%s:%d: DONE check... %s", __FUNCTION__, __LINE__,
-+ value?"high":"low");
-+ return(value?FPGA_SUCCESS:FPGA_FAIL);
-+ }
-+
-+ /*
-+ * Set the FPGA's wr line to the specified level
-+ */
-+ int
-+ fpga_wr_fn (int assert_write, int flush, int cookie)
-+ {
-+ return assert_write;
-+ }
-+
-+ int
-+ fpga_cs_fn (int assert_cs, int flush, int cookie)
-+ {
-+ return assert_cs;
-+ }
-+
-+ int
-+ fpga_rdata_fn ( unsigned char *data, int cookie )
-+ {
-+ PRINTF ("%s:%d: FPGA READ DATA %02X \n", __FUNCTION__, __LINE__,
-+ *((char*)CONFIG_SYS_FPGA_RDATA));
-+ *data = (unsigned char)((*((unsigned short*)CONFIG_SYS_FPGA_RDATA))&0x00FF);
-+ return *data;
-+ }
-+
-+ int
-+ fpga_wdata_fn ( unsigned char data, int cookie )
-+ {
-+ PRINTF ("%s:%d: FPGA WRITE DATA %02X \n", __FUNCTION__, __LINE__,
-+ data);
++ PRINTF ("%s:%d: DONE check... %s", __FUNCTION__, __LINE__,
++ value?"high":"low");
++ return(value?FPGA_SUCCESS:FPGA_FAIL);
++}
++
++/*
++ * Set the FPGA's wr line to the specified level
++ */
++int
++fpga_wr_fn (int assert_write, int flush, int cookie)
++{
++ return assert_write;
++}
++
++int
++fpga_cs_fn (int assert_cs, int flush, int cookie)
++{
++ return assert_cs;
++}
++
++int
++fpga_rdata_fn ( unsigned char *data, int cookie )
++{
++ PRINTF ("%s:%d: FPGA READ DATA %02X \n", __FUNCTION__, __LINE__,
++ *((char*)CONFIG_SYS_FPGA_RDATA));
++ *data = (unsigned char)((*((unsigned short*)CONFIG_SYS_FPGA_RDATA))&0x00FF);
++ return *data;
++}
++
++int
++fpga_wdata_fn ( unsigned char data, int cookie )
++{
++ PRINTF ("%s:%d: FPGA WRITE DATA %02X \n", __FUNCTION__, __LINE__,
++ data);
+ static u32 temp;
+ static u32 index = 0;
+
+ switch( index++ ){
+ case 0: temp = data << 8; break;
+ case 1: temp = temp + data; break;
-+ case 2: temp = temp + (data << 24); break;
-+ default:
-+ *((volatile unsigned long*)CONFIG_SYS_FPGA_WDATA) = temp + (data << 16);
-+ index = 0;
++ case 2: temp = temp + (data << 24); break;
++ default:
++ *((volatile unsigned long*)CONFIG_SYS_FPGA_WDATA) = temp + (data << 16);
++ index = 0;
+ break;
+ }
+
-+ return data;
-+ }
-+
-+ int
-+ fpga_abort_fn ( int cookie )
-+ {
-+ return cookie;
-+ }
-+
-+
-+ int
-+ fpga_busy_fn ( int cookie )
-+ {
-+ return 1;
-+ }
-+
-+ int
-+ fpga_post_fn (int cookie)
-+ {
-+ PRINTF ("%s:%d: FPGA POST \n", __FUNCTION__, __LINE__);
++ return data;
++}
++
++int
++fpga_abort_fn ( int cookie )
++{
++ return cookie;
++}
++
++
++int
++fpga_busy_fn ( int cookie )
++{
++ return 1;
++}
++
++int
++fpga_post_fn (int cookie)
++{
++ PRINTF ("%s:%d: FPGA POST \n", __FUNCTION__, __LINE__);
+ /* restore emi_clk_sel */
+ __REG(CCM_BASE_ADDR + CLKCTL_CBCDR) = temp_clk;
+ __REG(CONFIG_CS1RCR1_ADDR) = temp_rcr1;
+ __REG(CONFIG_CS1WCR1_ADDR) = temp_wcr1;
-+ return cookie;
-+ }
-+
-+ /*
-+ * Initialize the fpga. Return 1 on success, 0 on failure.
-+ */
-+ int
-+ APF51_init_fpga (u_char * buffer, size_t size)
-+ {
-+ char *autoload = getenv ("firmware_autoload");
-+
-+ int i,lout=0;
-+
++ return cookie;
++}
++
++/*
++ * Initialize the fpga. Return 1 on success, 0 on failure.
++ */
++int
++APF51_init_fpga (u_char * buffer, size_t size)
++{
++ char *autoload = getenv ("firmware_autoload");
++
++ int i,lout=0;
++
+ fpga_init();
-+
-+ for (i = 0; i < CONFIG_FPGA_COUNT; i++) {
-+ PRINTF ("%s:%d: Adding fpga %d\n", __FUNCTION__, __LINE__, i);
-+ fpga_add (fpga_xilinx, &fpga[i]);
-+ }
-+
-+ if ((size >= fpga[0].size) && ( autoload ) && (0 == strcmp(autoload, "1"))) {
-+ if (FPGA_SUCCESS != fpga_load( 0, (void *)buffer, size )) {
-+ lout = 1;
-+ printf("Firmware download failed!\n");
-+ }
-+ else
-+ printf("Firmware successfully programmed\n");
-+ }
-+ return lout;
-+ }
-+
-+ #endif /* CONFIG_FPGA */
++
++ for (i = 0; i < CONFIG_FPGA_COUNT; i++) {
++ PRINTF ("%s:%d: Adding fpga %d\n", __FUNCTION__, __LINE__, i);
++ fpga_add (fpga_xilinx, &fpga[i]);
++ }
++
++ if ((size >= fpga[0].size) && ( autoload ) && (0 == strcmp(autoload, "1"))) {
++ if (FPGA_SUCCESS != fpga_load( 0, (void *)buffer, size )) {
++ lout = 1;
++ printf("Firmware download failed!\n");
++ }
++ else
++ printf("Firmware successfully programmed\n");
++ }
++ return lout;
++}
++
++#endif /* CONFIG_FPGA */
hooks/post-receive
--
armadeus
|