Re: [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek

2010-12-09 Thread zzs213

I just clone the git repos. and build at91rm9200ek with eldk4.1,the error 
message is same.

I change start.S let it check whether the main osc of at91rm9200 is work, So I 
know need relocate the code or not. Use this method I boot u-boot in NOR flash 
successful
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCHv3] pca953x: support 16-pin devices

2010-12-09 Thread Chris Packham
This adds support for for the PCA9535/PCA9539 family of gpio devices which
have 16 output pins.

To let the driver know which devices are 16-pin it is necessary to define
CONFIG_SYS_I2C_PCA953X_WIDTH in your board config file. This is used to
create an array of {chip, ngpio} tuples that are used to determine the
width of a particular chip. For backwards compatibility it is assumed that
any chip not defined in CONFIG_SYS_I2C_PCA953X_WIDTH has 8 pins.

Signed-off-by: Chris Packham chris.pack...@alliedtelesis.co.nz
---
Changes since v2:
- I've addressed Peters style comments.
- I've added a blurb to README describing the new config option

 README |4 ++
 drivers/gpio/pca953x.c |  111 ++--
 2 files changed, 92 insertions(+), 23 deletions(-)

diff --git a/README b/README
index 68f5fb0..831c5af 100644
--- a/README
+++ b/README
@@ -746,6 +746,10 @@ The following options need to be configured:
CONFIG_PCA953X  - use NXP's PCA953X series I2C GPIO
CONFIG_PCA953X_INFO - enable pca953x info command

+   The CONFIG_SYS_I2C_PCA953X_WIDTH option specifies a list of
+   chip-ngpio pairs that tell the PCA953X driver the number of
+   pins supported by a particular chip.
+
Note that if the GPIO device uses I2C, then the I2C interface
must also be configured. See I2C Support, below.

diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c
index 6e82bd6..c8f5403 100644
--- a/drivers/gpio/pca953x.c
+++ b/drivers/gpio/pca953x.c
@@ -17,8 +17,8 @@
  */

 /*
- * Driver for NXP's 4 and 8 bit I2C gpio expanders (eg pca9537, pca9557, etc)
- * TODO: support additional devices with more than 8-bits GPIO
+ * Driver for NXP's 4, 8 and 16 bit I2C gpio expanders (eg pca9537, pca9557,
+ * pca9539, etc)
  */

 #include common.h
@@ -38,20 +38,78 @@ enum {
PCA953X_CMD_INVERT,
 };

+#ifdef CONFIG_SYS_I2C_PCA953X_WIDTH
+struct pca953x_chip_ngpio {
+   uint8_t chip;
+   uint8_t ngpio;
+};
+
+static struct pca953x_chip_ngpio pca953x_chip_ngpios[] =
+CONFIG_SYS_I2C_PCA953X_WIDTH;
+
+#define NUM_CHIP_GPIOS (sizeof(pca953x_chip_ngpios) / \
+   sizeof(struct pca953x_chip_ngpio))
+
+/*
+ * Determine the number of GPIO pins supported. If we don't know we assume
+ * 8 pins.
+ */
+static int pca953x_ngpio(uint8_t chip)
+{
+   int i;
+
+   for (i = 0; i  NUM_CHIP_GPIOS; i++)
+   if (pca953x_chip_ngpios[i].chip == chip)
+   return pca953x_chip_ngpios[i].ngpio;
+
+   return 8;
+}
+#else
+#define pca953x_ngpio(chip)8
+#endif
+
 /*
  * Modify masked bits in register
  */
 static int pca953x_reg_write(uint8_t chip, uint addr, uint mask, uint data)
 {
-   uint8_t val;
+   uint8_t valb;
+   uint16_t valw;

-   if (i2c_read(chip, addr, 1, val, 1))
-   return -1;
+   if (pca953x_ngpio(chip) = 8) {
+   if (i2c_read(chip, addr, 1, valb, 1))
+   return -1;
+
+   valb = ~mask;
+   valb |= data;
+
+   return i2c_write(chip, addr, 1, valb, 1);
+   } else {
+   if (i2c_read(chip, addr  1, 1, (u8*)valw, 2))
+   return -1;
+
+   valw = ~mask;
+   valw |= data;
+
+   return i2c_write(chip, addr  1, 1, (u8*)valw, 2);
+   }
+}

-   val = ~mask;
-   val |= data;
+static int pca953x_reg_read(uint8_t chip, uint addr, uint *data)
+{
+   uint8_t valb;
+   uint16_t valw;

-   return i2c_write(chip, addr, 1, val, 1);
+   if (pca953x_ngpio(chip) = 8) {
+   if (i2c_read(chip, addr, 1, valb, 1))
+   return -1;
+   *data = (int)valb;
+   } else {
+   if (i2c_read(chip, addr  1, 1, (u8*)valw, 2))
+   return -1;
+   *data = (int)valw;
+   }
+   return 0;
 }

 /*
@@ -86,9 +144,9 @@ int pca953x_set_dir(uint8_t chip, uint mask, uint data)
  */
 int pca953x_get_val(uint8_t chip)
 {
-   uint8_t val;
+   uint val;

-   if (i2c_read(chip, 0, 1, val, 1))
+   if (pca953x_reg_read(chip, PCA953X_IN, val)  0)
return -1;

return (int)val;
@@ -102,37 +160,44 @@ int pca953x_get_val(uint8_t chip)
 static int pca953x_info(uint8_t chip)
 {
int i;
-   uint8_t data;
+   uint data;
+   int nr_gpio = pca953x_ngpio(chip);
+   int msb = nr_gpio - 1;

-   printf(pca953x@ 0x%x:\n\n, chip);
-   printf(gpio pins: 76543210\n);
-   printf(---\n);
+   printf(pca953x@ 0x%x (%d pins):\n\n, chip, nr_gpio);
+   printf(gpio pins: );
+   for (i = msb; i = 0; i--)
+   printf(%x, i);
+   printf(\n);
+   for (i = 11 + nr_gpio; i  0; i--)
+   printf(-);
+   printf(\n);

-   if (i2c_read(chip, PCA953X_CONF, 1, data, 1))
+   if 

Re: [U-Boot] [PATCH v4 2/7] gpio: Add Multi-Function-Pin configuration driver for Marvell SoCs

2010-12-09 Thread Prafulla Wadaskar


 -Original Message-
 From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de]
 On Behalf Of Albert ARIBAUD
 Sent: Thursday, December 09, 2010 12:29 PM
 To: Chris Moore
 Cc: u-boot@lists.denx.de
 Subject: Re: [U-Boot] [PATCH v4 2/7] gpio: Add Multi-Function-Pin
 configuration driver for Marvell SoCs
 
 Hi Chris,
 
 Le 09/12/2010 07:11, Chris Moore a écrit :
  Hi,
 
  Le 07/12/2010 18:39, Albert ARIBAUD a écrit :
  Le 07/12/2010 18:10, Prafulla Wadaskar a écrit :
 
  + val= ~MFP_AF_MASK;
  Do we need to do this here? For val is only 0 here...
  This can be removed.
  OTOH, with the, this line makes no assumption about val, and thus will
  work regardless of it. If the is removed, and if later val is set to
  non-zero before reaching this instruction, it will cause a bug.
 
  IOW, the makes the statement more resilient.
 
 
  If val really is zero then the result will always be zero :(
  Simply removing the  would give a different result.
  It would be better to remove the whole bloody line ;-)
 
  I haven't followed this thread but I suspect the original code was
 wrong.
 
 Good point as to the removal if the removal must be done :)
 
 I still think that the original is functionally more correct *if we are
 not sure that val will always be zero.

The earlier code was using read-modify-write strategy for mfpr programming.
It is changed to create-write.
So removing 'and' operation makes more sense, I will post v4.1 for this since I 
do not want to post entire patch series.

Regards..
Prafulla . .

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ppc4xx: 460SX Eegier board support

2010-12-09 Thread Stefan Roese
Hi Marri,

On Thursday 09 December 2010 02:12:07 tma...@apm.com wrote:
 From: Tirumala Marri tma...@apm.com
 
 Adding Eiger board support for 460SX SoC.

Thanks. Some mostly nitpicking comments below.

First typo in the subject: s/Eeigier/Eiger.

snip
 
 b/include/configs/eiger.h
 new file mode 100644
 index 000..bc082a6
 --- /dev/null
 +++ b/include/configs/eiger.h
 @@ -0,0 +1,192 @@
 +/*
 + * eiger.h - configuration for Eiger(460SX) Board.
 + *
 + * Copyright (c) 2010, Applied Micro Circuits Corporation
 + * Author: Tirumala R Marri tma...@apm.com
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License as
 + * published by the Free Software Foundation; either version 2 of
 + * the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 + * MA 02111-1307 USA
 + */
 +#ifndef __CONFIG_H
 +#define __CONFIG_H
 +
 +/*
 + * High Level Configuration Options
 + */
 +#define CONFIG_4xx   1   /* ... PPC4xx family*/
 +#define CONFIG_440   1   /* ... PPC460 family*/
 +#define CONFIG_460SX 1   /* ... PPC460 family*/
 +#define CONFIG_BOARD_EARLY_INIT_F1   /* Call board_pre_init  */
 +
 +#define  CONFIG_SYS_TEXT_BASE0xfffb

Please use space instead of tab after #define.

 +
 +/*
 + * Include common defines/options for all AMCC boards
 + */
 +#define CONFIG_HOSTNAME  eiger
 +
 +#include amcc-common.h
 +
 +#define CONFIG_SYS_CLK_FREQ  /* external freq to pll */
 +
 +/*
 + * Base addresses -- Note these are effective addresses where the
 + * actual resources get mapped (not physical addresses)
 + */
 +#define  CONFIG_SYS_BOOT_BASE_ADDR   0xFF00
 +#define CONFIG_SYS_FLASH_BASE0xfff0  /* start of 
FLASH   */

Again, space after #define. And use lower- or upper-case hex values 
consistently in this file. I personally prefer lower-case.

 +#define CONFIG_SYS_ISRAM_BASE0x9000  /* internal 
SRAM*/
 +
 +#define CONFIG_SYS_PCI_BASE  0xd000  /* internal PCI regs
*/
 +
 +#define CONFIG_SYS_PCIE_MEMBASE  0x9000  /* mapped PCIe 
memory  */
 +#define CONFIG_SYS_PCIE0_MEMBASE 0x9000  /* mapped PCIe memory   
*/
 +#define CONFIG_SYS_PCIE1_MEMBASE 0xa000  /* mapped PCIe memory   
*/
 +#define CONFIG_SYS_PCIE_MEMSIZE  0x0100
 +
 +#define CONFIG_SYS_PCIE0_XCFGBASE0xb000
 +#define CONFIG_SYS_PCIE1_XCFGBASE0xb200
 +#define CONFIG_SYS_PCIE2_XCFGBASE0xb400
 +#define CONFIG_SYS_PCIE0_CFGBASE 0xb600
 +#define CONFIG_SYS_PCIE1_CFGBASE 0xb800
 +#define CONFIG_SYS_PCIE2_CFGBASE 0xba00
 +
 +/* PCIe mapped UTL registers */
 +#define CONFIG_SYS_PCIE0_REGBASE   0xd000
 +#define CONFIG_SYS_PCIE1_REGBASE   0xd001
 +#define CONFIG_SYS_PCIE2_REGBASE   0xd002
 +
 +/* System RAM mapped to PCI space */
 +#define CONFIG_PCI_SYS_MEM_BUS   CONFIG_SYS_SDRAM_BASE
 +#define CONFIG_PCI_SYS_MEM_PHYS  CONFIG_SYS_SDRAM_BASE
 +#define CONFIG_PCI_SYS_MEM_SIZE  (1024 * 1024 * 1024)
 +
 +#define CONFIG_SYS_OPER_FLASH0xe700  /* SRAM - OPER 
Flash   */

What is this OPER Flash? Is it used at all in this code? If not you should 
better remove it.

 +/*
 + * Serial Port
 + */
 +#define CONFIG_CONS_INDEX1   /* Use UART0*/
 +
 +/*
 + * Initial RAM  stack pointer (placed in internal SRAM)
 + */
 +#define CONFIG_SYS_TEMP_STACK_OCM1
 +#define CONFIG_SYS_OCM_DATA_ADDR CONFIG_SYS_ISRAM_BASE
 +#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_ISRAM_BASE   /* Initial RAM
 address   */ +#define CONFIG_SYS_INIT_RAM_SIZE0x2000  /* 
Size of used area
 in RAM */ +
 +#define CONFIG_SYS_GBL_DATA_OFFSET   (CONFIG_SYS_INIT_RAM_SIZE -
 GENERATED_GBL_DATA_SIZE) +#define
 CONFIG_SYS_INIT_SP_OFFSET (CONFIG_SYS_GBL_DATA_OFFSET - 0x4) +
 +/*
 + * DDR SDRAM
 + */
 +#define CONFIG_SPD_EEPROM1   /* Use SPD EEPROM for setup */
 +#define CONFIG_DDR_ECC   1   /* with ECC support 
*/
 +
 +#define CONFIG_SYS_SPD_MAX_DIMMS 2
 +
 +/* SPD i2c spd addresses */
 +#define SPD_EEPROM_ADDRESS {IIC0_DIMM0_ADDR, IIC0_DIMM1_ADDR}

Indentation with tabs please. And please add space after {. Otherwise 
checkpatch will complain:

#define SPD_EEPROM_ADDRESS  { IIC0_DIMM0_ADDR, IIC0_DIMM1_ADDR }

Thanks.

Cheers,
Stefan

--
DENX Software 

Re: [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek

2010-12-09 Thread Andreas Bießmann
Dear zzs213,

Am 09.12.2010 09:39, schrieb zzs213:
 
 I just clone the git repos. and build at91rm9200ek with eldk4.1,the error 
 message is same.

Ok, so ELDK 4.1 is not working. How about ELDK 4.2, CodeSourcery
2009q{1,3}, 2010q1, 2010.09?

 I change start.S let it check whether the main osc of at91rm9200 is work, So 
 I know need relocate the code or not. Use this method I boot u-boot in NOR 
 flash successful

So you added some at91 related stuff to arm920t/cpu/start.S to
conditionally branch to lowlevel_init()? You check if the
CKGR_MOR.MOSCEN is set or not and decide whether you branch to
lowlevel_init() or not.
I guess this is wrong.

First, if your u-boot is started from SDRAM you need correct initialised
clocks (main oscillator or not, you know you can leave the main
oscillator disabled and bypass it!), CS0 timing and SDRAM. In that case
you need to compile your u-boot with CONFIG_SKIP_LOWLEVEL_INIT and
therefore we do never branch to lowlevel_init() cause it just do not exist.
If you boot from NOR flash (BMS set to low during reset) the internal
ROM code is never executed and you need to switch on and configure the
clocks, setup CS0 timing and SDRAM configuration. This is done in
lowlevel_init() and therefore we do not set CONFIG_SKIP_LOWLEVEL_INIT in
that case. That case is currently broken in head of u-boot-arm/master
(not in u-boot/master currently, but will for v2010.12)!

You may use the board in some way suggested by atmel in some of their
documents. In that case you do have a preloader in NOR flash followed by
an u-boot blob. But that is also the first case! Your u-boot will be
copied to SDRAM by preloader!
- set CONFIG_SKIP_LOWLEVEL_INIT, set another CONFIG_TEXT_BASE cause.
You may use the at91rm9200ek_ram_config and set the target address of
your preloader copy to 0x2010. In that case NOR flash booting is
supported! But it is _not_ the case I meant with 'NOR flash booting does
not work a.t.m.'.

In any case you need to relocate if your CONFIG_TEXT_BASE is not set to
the location of u-boot at the end of board_init_f()! You can not know
the location in any case cause this can be influenced by some
environment variables. Therefore it is completely wrong to decide on the
setting of CKGR_MOR.MOSCEN if we need relocation or not.

regards

Andreas Bießmann

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2 ] [NEXT] Remove redundant config.mk files

2010-12-09 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1290975538-18561-1-git-send-email...@denx.de you wrote:
 Recent cleanup actions resulted in a number of config.mk files that
 contained only redundant entries like
 
   PLATFORM_CPPFLAGS += -I$(TOPDIR)
 
 or settings of variables that were not used anywhere in the code, like
 
   TEXT_END  = 0xfe08
 
 Remove these unnecessary files.
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Scott McNutt smcn...@psyent.com
 Cc: Wolfgang Wegner w.weg...@astro-kom.de
 Cc: Josef Wagner wag...@microsys.de
 Cc: Tolunay Orkun tor...@nextio.com
 Cc: Frank Panno fpa...@delphintech.com
 Cc: Heiko Schocher h...@denx.de
 Cc: Brad Kemp brad.k...@seranoa.com
 ---
  arch/nios2/cpu/config.mk   |   24 
  board/astro/mcf5373l/config.mk |   25 -
  board/atc/config.mk|   28 
  board/cmi/config.mk|   28 
  board/cpc45/config.mk  |   28 
  board/cpu86/config.mk  |   28 
  board/cpu87/config.mk  |   28 
  board/csb272/config.mk |   31 ---
  board/csb472/config.mk |   31 ---
  board/ep8260/config.mk |   28 
  board/genietv/config.mk|   24 
  board/icu862/config.mk |   28 
  board/ids8247/config.mk|   27 ---
  board/mpl/pati/config.mk   |   24 
  board/pm826/config.mk  |   27 ---
  board/pm828/config.mk  |   27 ---
  board/ppmc7xx/config.mk|   26 --
  board/ppmc8260/config.mk   |   32 
  board/siemens/SCM/config.mk|   27 ---
  board/tqc/tqm8260/config.mk|   27 ---
  board/tqc/tqm8272/config.mk|   27 ---
  board/westel/amx860/config.mk  |   24 
  22 files changed, 0 insertions(+), 599 deletions(-)
  delete mode 100644 arch/nios2/cpu/config.mk
  delete mode 100644 board/astro/mcf5373l/config.mk
  delete mode 100644 board/atc/config.mk
  delete mode 100644 board/cmi/config.mk
  delete mode 100644 board/cpc45/config.mk
  delete mode 100644 board/cpu86/config.mk
  delete mode 100644 board/cpu87/config.mk
  delete mode 100644 board/csb272/config.mk
  delete mode 100644 board/csb472/config.mk
  delete mode 100644 board/ep8260/config.mk
  delete mode 100644 board/genietv/config.mk
  delete mode 100644 board/icu862/config.mk
  delete mode 100644 board/ids8247/config.mk
  delete mode 100644 board/mpl/pati/config.mk
  delete mode 100644 board/pm826/config.mk
  delete mode 100644 board/pm828/config.mk
  delete mode 100644 board/ppmc7xx/config.mk
  delete mode 100644 board/ppmc8260/config.mk
  delete mode 100644 board/siemens/SCM/config.mk
  delete mode 100644 board/tqc/tqm8260/config.mk
  delete mode 100644 board/tqc/tqm8272/config.mk
  delete mode 100644 board/westel/amx860/config.mk

Applied to next.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
If you'll excuse me a minute, I'm going to have a cup of coffee.
- broadcast from Apollo 11's LEM, Eagle, to Johnson  Space  Center,
Houston July 20, 1969, 7:27 P.M.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] [NEXT] Move LDSCRIPT definitions to board config files.

2010-12-09 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 1290975538-18561-2-git-send-email...@denx.de you wrote:
 Recent cleanup actions resulted in a number of config.mk files that
 contained only LDSCRIPT definitions.  Move these into th respective
 board config files and remove the now empty config.mk files.
 
 Signed-off-by: Wolfgang Denk w...@denx.de
 Cc: Matthias Fuchs matthias.fu...@esd-electronics.com
 Cc: Detlev Zundel d...@denx.de
 Cc: Heiko Schocher h...@denx.de
 Cc: Andre Schwarz andre.schw...@matrix-vision.de
 Cc: Peter De Schrijver p...@mind.be
 ---
  board/amirix/ap1000/config.mk   |   25 -
  board/esd/dasa_sim/config.mk|   25 -
  board/inka4x0/config.mk |   27 ---
  board/manroland/uc101/config.mk |   24 
  board/matrix_vision/mvsmr/config.mk |   24 
  board/ml2/config.mk |   25 -
  board/mousse/config.mk  |   27 ---
  board/rsdproto/config.mk|   28 
  include/configs/AP1000.h|1 +
  include/configs/DASA_SIM.h  |1 +
  include/configs/ML2.h   |1 +
  include/configs/MOUSSE.h|1 +
  include/configs/MVSMR.h |1 +
  include/configs/inka4x0.h   |1 +
  include/configs/rsdproto.h  |1 +
  include/configs/uc101.h |1 +
  16 files changed, 8 insertions(+), 205 deletions(-)
  delete mode 100644 board/amirix/ap1000/config.mk
  delete mode 100644 board/esd/dasa_sim/config.mk
  delete mode 100644 board/inka4x0/config.mk
  delete mode 100644 board/manroland/uc101/config.mk
  delete mode 100644 board/matrix_vision/mvsmr/config.mk
  delete mode 100644 board/ml2/config.mk
  delete mode 100644 board/mousse/config.mk
  delete mode 100644 board/rsdproto/config.mk

Applied to next.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Our way is peace.
-- Septimus, the Son Worshiper, Bread and Circuses,
   stardate 4040.7.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/2] AT91: fix TOP9000 built issues

2010-12-09 Thread Reinhard Meyer
Since I originally made and checked the TOP9000 support patch some changes
to mainline broke the built. This small patch fixes this.

Signed-off-by: Reinhard Meyer u-b...@emk-elektronik.de
---
 board/emk/top9000/Makefile  |6 +++---
 board/emk/top9000/top9000.c |2 +-
 include/configs/top9000.h   |8 ++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/board/emk/top9000/Makefile b/board/emk/top9000/Makefile
index 9b28048..3ac6f14 100644
--- a/board/emk/top9000/Makefile
+++ b/board/emk/top9000/Makefile
@@ -26,9 +26,9 @@
 
 include $(TOPDIR)/config.mk
 
-LIB= $(obj)lib$(BOARD).a
+LIB= $(obj)lib$(BOARD).o
 
-COBJS-y+= top9000.o
+COBJS-y+= $(BOARD).o
 COBJS-$(CONFIG_ATMEL_SPI)  += spi.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
@@ -36,7 +36,7 @@ OBJS  := $(addprefix $(obj),$(COBJS-y))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
 
 $(LIB):$(obj).depend $(OBJS) $(SOBJS)
-   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+   $(call cmd_link_o_target, $(OBJS) $(SOBJS))
 
 clean:
rm -f $(SOBJS) $(OBJS)
diff --git a/board/emk/top9000/top9000.c b/board/emk/top9000/top9000.c
index b0fe2d6..73dd706 100644
--- a/board/emk/top9000/top9000.c
+++ b/board/emk/top9000/top9000.c
@@ -120,7 +120,7 @@ int board_mmc_getcd(u8 *cd, struct mmc *mmc)
 
 int board_early_init_f(void)
 {
-   at91_shdwn_t *shdwn = (at91_shdwn_t *)AT91_SHDWN_BASE;
+   struct at91_shdwn *shdwn = (struct at91_shdwn *)AT91_SHDWN_BASE;
 
/*
 * make sure the board can be powered on by
diff --git a/include/configs/top9000.h b/include/configs/top9000.h
index ff3933b..814fb6c 100644
--- a/include/configs/top9000.h
+++ b/include/configs/top9000.h
@@ -40,9 +40,13 @@
 
 /*
  * Warning: changing CONFIG_SYS_TEXT_BASE requires
- * adapting the initial boot program
+ * adapting the initial boot program.
+ * Guard it since the definition finds its way to the command-line and
+ * causes warnings when this file is included
  */
-#define CONFIG_SYS_TEXT_BASE   0x21f0  /* 31 MB into RAM */
+#ifndef CONFIG_SYS_TEXT_BASE
+# define CONFIG_SYS_TEXT_BASE  0x21f0  /* 31 MB into RAM */
+#endif
 
 /* Command line configuration */
 #include config_cmd_default.h
-- 
1.7.3.3.398.g0b0cd

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] davinci: Rewrite timer.c to use tbl/tbu emulation variables in gd

2010-12-09 Thread Nick Thompson
On 09/12/10 09:32, Nick Thompson wrote:
 This change allows the davinci timer functions to be used before
 relocation since it avoids using static variables prior to BSS being
 made available.
 
 The code is based on that used in the at91 timers, modified to use
 a davinci specific hardware timer. It also maintains reset_timer()
 to allow deprecated timer usage to continue to work (for example,
 in nand_base.c)
 
 Signed-off-by: Nick Thompson nick.thomp...@ge.com

Also:

Tested-by: Ben Gardiner bengardi...@nanometrics.ca
Tested-by: Sudhakar Rajashekhara sudhakar@ti.com

(see: v1 patch @ http://patchwork.ozlabs.org/patch/73973/)

Nick.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/4] arm920t: fix linker skript for -pie linking

2010-12-09 Thread Wolfgang Denk
Dear Albert ARIBAUD,

In message 4d008638.4060...@aribaud.net you wrote:

  This patch is not needed, if no undefined weak symbol is available.
  This patch adds .plt/.rel.plt section which has R_ARM_JUMP_SLOT which is 
  not handled in code. Therefore we do not really know what this patch does 
  to the code, it was mostly a patch to handle the linker segfault described 
  several times.
 
 Thanks for pointing this out. My bad: I did not relate the two series 
 when going through patchwork.
 
 Wolfgang, I was about to send out a revert but after pulling u-boot.git 
 and u-boot-arm.git I don't see Andreas' patch in there. If you haven't 
 committed it yet, maybe you can fix this yourself?

Hm... strange...

I am absolutely sure that I did apply these patches last night, and
then I even pushed them out... ... but now I see no trace of this
either.

Don't know what happened (I should learn this lesson - this is what I
get when _not_ having a beer ;-)

Ummm... now I have a problem, because I have marked all these patches
as applied, both in patchwork and in my mail reader. This actually
means that I have completely lost track of what is missing and which
patches should be applied :-(

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
You can do this in a number of ways. IBM chose to do all of them.
Why do you find that funny?-- D. Taylor, Computer Science 350
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] hwmon init

2010-12-09 Thread Detlev Zundel
Hello Heiko,

 Is there a reason why the dtt sensors are initialized and accessed on
 u-boot startup?

Historical reasons?

 The U-Boot Design Principles[1] clearly say:

   Initialize devices only when they are needed within U-Boot, i.e. don't
   initialize the Ethernet interface(s) unless U-Boot performs a download
   over Ethernet; don't initialize any IDE or USB devices unless U-Boot
   actually tries to load files from these, etc. (and don't forget to
   shut down these devices after using them - otherwise nasty things may
   happen when you try to boot your OS).


 Should that be changed?

Yes indeed, the current situation is not consistent with the design
principles and thus should be changed.  Patches welcome!

Best wishes
  Detlev

-- 
LISP is the most powerful programming language, and if you want an inter-
preter, LISP is the best.  None of the other languages come anywhere near
LISP in their power.  The most exciting things about LISP are read, eval,
and print.  If you look at other languages,  they have no equivalent for
any of those. -- Richard Stallman
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [STATUS] next rebased / ARM help needed / release delayed

2010-12-09 Thread Wolfgang Denk
Hello,

here is some news.  Not exactly good news it seems:

1) I had to rebase the next branch to remove a commit which
   incorrectly changed behaviour of some commands.

2) By some stupid accident I lost track of some / most / all
   ARM related patches that are supposed to go into the current
   release and/or next; unfortunately I also maked these as applied'
   in patchwork.

   If you have any outstanding ARM patches that should go in, please
   drop me a note (ideally including the respective link into
   patchwork).

   Thanks, and sorry again.

3) We will have a delay in the release. I will try to get a -rc3 out by
   the weekend; new target for 2010.12 is December 20 (but don't hold
   your breath).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
If that makes any sense to you, you have a big problem.
  -- C. Durance, Computer Science 234
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek

2010-12-09 Thread zzs213
you are right, I use that method on u-boot-2010.09 for my own board(slightly 
different from at91rm9200ek)

eldk4.1 is ok for 2010.09, eldk4.2 ok too

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek

2010-12-09 Thread Andreas Bießmann
Dear zzs213,

can you please leave some context when you answering to the list?

Am 09.12.2010 10:52, schrieb zzs213:
 you are right, I use that method on u-boot-2010.09 for my own board(slightly 
 different from at91rm9200ek)

I guess you mean you are using a preloader on your NOR flash, is that right?

 eldk4.1 is ok for 2010.09, eldk4.2 ok too

So do you have no problem left?

regards

Andreas Bießmann

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Honor /memory/reg node in DTB files

2010-12-09 Thread Wolfgang Denk
Dear Dan,

In message 750641c9-dc97-4923-b337-05a2f1bc9...@digitaldans.com you wrote:
 
 Yes, I'm sometimes pleased  :-)

Good :-)

  My current thinking is to introduce something like  .
 
 Well, that is pretty cool.
 
  dt_skip=memory,mac-address
 
 Do we have to write a parser now, or is there something
 that currently exists to help out? :-)

We use the same format already to implement the hwconfig feature. It
just needs to be moved to common code.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The only way you could make a happy  marriage  is  by  cuttin'  their
heads  off  as  soon  as  they say `I do', yes? You can't make happi-
ness...   - Terry Pratchett, _Witches Abroad_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [GIT PULL] Pull request: u-boot-imx

2010-12-09 Thread stefano babic
Hi Wolfgang,

I sent on 24/11 a pull request, but I can't find it in the ML archive
and you have not yet merged, so it seems it was lost. I resubmit it as
it is. Drop this mail if you have already seen it.

The following changes since commit 8ad25bf8d9233eb7d0b614612108622a59069354:

  Net: clarify board/cpu_eth_init calls (2010-11-15 00:01:15 +0100)

are available in the git repository at:
  git://www.denx.de/git/u-boot-imx.git master

Jason Liu (1):
  mx51evk: savenv or env save command does not work

Liu Hui-R64343 (1):
  imx: Get fec mac address from fuse

 arch/arm/cpu/arm926ejs/mx25/generic.c |   12 ++
 arch/arm/cpu/arm926ejs/mx27/generic.c |   12 ++
 arch/arm/cpu/armv7/mx5/soc.c  |   14 
 arch/arm/include/asm/arch-mx25/imx-regs.h |   19 +--
 arch/arm/include/asm/arch-mx27/imx-regs.h |   20 +++--
 arch/arm/include/asm/arch-mx5/imx-regs.h  |   34
+
 drivers/net/fec_mxc.c |   17 +
 include/configs/mx51evk.h |7 +++--
 8 files changed, 102 insertions(+), 33 deletions(-)


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: off...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 2/7] [REV-1] gpio: Add Multi-Function-Pin configuration driver for Marvell SoCs

2010-12-09 Thread Prafulla Wadaskar
Most of the Marvell SoCs has Multi Function Pin (MFP) configuration registers
For ex. ARMADA100.

These registers are programmed to expose the specific functionality
associated with respective SoC Pins

This driver provides configuration APIs,
using them, configuration need to be done in board specific code

for ex- following code configures MFPs 107 and 108 for UART_TX/RX functionality

int board_early_init_f(void)
{
u32 mfp_cfg[] = {
/* Console on UART1 */
MFP107_UART1_RXD,
MFP108_UART1_TXD,
MFP_EOC /*End of configureation*/
};
/* configure MFP's */
mfp_config(mfp_cfg);
return 0;
}

Signed-off-by: Prafulla Wadaskar prafu...@marvell.com
---
Changelog v4:
1. Driver renamed as mvmfp
2. Re-architected mvmfp driver as per review feedback

Changelog v4 (REV-1):
1. MFPR_BASE renamed as MV_MFPR_BASE and defination moved to board config file
2. val= removed from config-write logic

 drivers/gpio/Makefile |1 +
 drivers/gpio/mvmfp.c  |   87 ++
 include/mvmfp.h   |  100 +
 3 files changed, 188 insertions(+), 0 deletions(-)
 create mode 100644 drivers/gpio/mvmfp.c
 create mode 100644 include/mvmfp.h

diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index 398024c..a5fa2b5 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -27,6 +27,7 @@ LIB   := $(obj)libgpio.o
 
 COBJS-$(CONFIG_AT91_GPIO)  += at91_gpio.o
 COBJS-$(CONFIG_KIRKWOOD_GPIO)  += kw_gpio.o
+COBJS-$(CONFIG_MARVELL_MFP)+= mvmfp.o
 COBJS-$(CONFIG_MXC_GPIO)   += mxc_gpio.o
 COBJS-$(CONFIG_PCA953X)+= pca953x.o
 COBJS-$(CONFIG_S5P)+= s5p_gpio.o
diff --git a/drivers/gpio/mvmfp.c b/drivers/gpio/mvmfp.c
new file mode 100644
index 000..5646ed4
--- /dev/null
+++ b/drivers/gpio/mvmfp.c
@@ -0,0 +1,87 @@
+/*
+ * (C) Copyright 2010
+ * Marvell Semiconductor www.marvell.com
+ * Written-by: Prafulla Wadaskar prafu...@marvell.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 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., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include common.h
+#include asm/io.h
+#include mvmfp.h
+#include asm/arch/mfp.h
+#ifdef CONFIG_ARMADA100
+#include asm/arch/armada100.h
+#else
+#error Unsupported SoC...
+#endif
+
+/*
+ * mfp_config
+ *
+ * On most of Marvell SoCs (ex. ARMADA100) there is Multi-Funtion-Pin
+ * configuration registers to configure each GPIO/Function pin on the
+ * SoC.
+ *
+ * This function reads the array of values for
+ * MFPR_X registers and programms them into respective
+ * Multi-Function Pin registers.
+ * It supports - Alternate Function Selection programming.
+ *
+ * Whereas,
+ * The Configureation value is constructed using MFP()
+ * array consists of 32bit values as defined in MFP(xx,xx..) macro
+ */
+void mfp_config(u32 *mfp_cfgs)
+{
+   u32 *p_mfpr = NULL;
+   u32 cfg_val, val;
+
+   do {
+   cfg_val = *mfp_cfgs++;
+   /* exit if End of configuration table detected */
+   if (cfg_val == MFP_EOC)
+   break;
+
+   p_mfpr = (u32 *)(MV_MFPR_BASE
+   + MFP_REG_GET_OFFSET(cfg_val));
+
+   /* Write a mfg register as per configuration */
+   val = 0;
+   if (cfg_val  MFP_AF_FLAG)
+   /* Abstract and program Afternate-Func Selection */
+   val |= cfg_val  MFP_AF_MASK;
+   if (cfg_val  MFP_EDGE_FLAG)
+   /* Abstract and program Edge configuration */
+   val |= cfg_val  MFP_LPM_EDGE_MASK;
+   if (cfg_val  MFP_DRIVE_FLAG)
+   /* Abstract and program Drive configuration */
+   val |= cfg_val  MFP_DRIVE_MASK;
+   if (cfg_val  MFP_PULL_FLAG)
+   /* Abstract and program Pullup/down configuration */
+   val |= cfg_val  MFP_PULL_MASK;
+
+   writel(val, p_mfpr);
+   } while (1);
+   /*
+* perform a read-back of any MFPR register to make sure the
+* previous writings are finished
+*/
+   readl(p_mfpr);
+}
diff 

[U-Boot] [PATCH v4 6/7] [REV-1] mv-common.h: Add support for ARMADA100 Platforms

2010-12-09 Thread Prafulla Wadaskar
This patch adds commonly used macros for ARMADA100 based
baords, Also some code reshuffled and updated for typos and comments

Signed-off-by: Prafulla Wadaskar prafu...@marvell.com
---
Changelog v3:
CONFIG_ARCH_CPU_INIT moved out of #ifdef

Changelog v4:
CONFIG_MFP change to CONFIG_MARVELL_MFP
some whitespaces removed

Changelog v4(REV-1)
MV_MFPR_BASE configuration added

 include/configs/mv-common.h |   66 --
 1 files changed, 50 insertions(+), 16 deletions(-)

diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h
index 0a76163..97b6971 100644
--- a/include/configs/mv-common.h
+++ b/include/configs/mv-common.h
@@ -39,6 +39,7 @@
 #define CONFIG_MARVELL 1
 #define CONFIG_ARM926EJS   1   /* Basic Architecture */
 
+/*  Kirkwood Platform Common Definations */
 #if defined(CONFIG_KIRKWOOD)
 #define CONFIG_MD5 /* get_random_hex on krikwood needs MD5 support */
 #define CONFIG_KIRKWOOD_EGIGA_INIT /* Enable GbePort0/1 for kernel */
@@ -54,27 +55,46 @@
 #defineCONFIG_SYS_KWD_CONFIG   
$(SRCTREE)/$(CONFIG_BOARDDIR)/kwbimage.cfg
 #endif /* CONFIG_SYS_KWD_CONFIG */
 
-/*
- * CONFIG_SYS_TEXT_BASE can be defined in board specific header file, if needed
- */
-#ifndef CONFIG_SYS_TEXT_BASE
-#defineCONFIG_SYS_TEXT_BASE0x0060
-#endif /* CONFIG_SYS_TEXT_BASE */
+/* Kirkwood has 2k of Security SRAM, use it for SP */
+#define CONFIG_SYS_INIT_SP_ADDR0xC8012000
+#define CONFIG_NR_DRAM_BANKS_MAX   2
 
 #define CONFIG_I2C_MVTWSI_BASE KW_TWSI_BASE
-#define MV_UART0_BASE  KW_UART0_BASE
+#define MV_UART_CONSOLE_BASE   KW_UART0_BASE
 #define MV_SATA_BASE   KW_SATA_BASE
 #define MV_SATA_PORT0_OFFSET   KW_SATA_PORT0_OFFSET
 #define MV_SATA_PORT1_OFFSET   KW_SATA_PORT1_OFFSET
 
+/*  ARMADA100 Platform Common Definations */
+#elif defined (CONFIG_ARMADA100)
+
+#define CONFIG_SYS_TCLK(14745600)  /* NS16550 clk config */
+#define CONFIG_SYS_HZ_CLOCK(325)   /* Timer Freq. 3.25MHZ */
+#define CONFIG_MARVELL_MFP /* Enable mvmfp driver */
+#define MV_MFPR_BASE   ARMD1_MFPR_BASE
+#define MV_UART_CONSOLE_BASE   ARMD1_UART1_BASE
+#define CONFIG_SYS_NS16550_IER (1  6)/* Bit 6 in UART_IER register
+   represents UART Unit Enable */
+/*
+ * There is no internal RAM in ARMADA100, using DRAM
+ * TBD: dcache to be used for this
+ */
+#define CONFIG_SYS_INIT_SP_ADDR(CONFIG_SYS_TEXT_BASE - 
0x0020)
+#define CONFIG_NR_DRAM_BANKS_MAX   2
+
 #else
-#error Unsupported SoC
+#error Unsupported SoC Platform...
 #endif
 
+/*
+ * Custom CONFIG_SYS_TEXT_BASE can be done in board.h
+ */
+#ifndef CONFIG_SYS_TEXT_BASE
+#defineCONFIG_SYS_TEXT_BASE0x0060
+#endif /* CONFIG_SYS_TEXT_BASE */
+
 /* additions for new ARM relocation support */
-#define CONFIG_SYS_SDRAM_BASE  0x
-/* Kirkwood has 2k of Security SRAM, use it for SP */
-#define CONFIG_SYS_INIT_SP_ADDR0xC8012000
+#define CONFIG_SYS_SDRAM_BASE  0x
 
 /*
  * CLKs configurations
@@ -88,7 +108,7 @@
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE(-4)
 #define CONFIG_SYS_NS16550_CLK CONFIG_SYS_TCLK
-#define CONFIG_SYS_NS16550_COM1MV_UART0_BASE
+#define CONFIG_SYS_NS16550_COM1MV_UART_CONSOLE_BASE
 
 /*
  * Serial Port configuration
@@ -156,25 +176,37 @@
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_CONSOLE_INFO_QUIET  /* some code reduction */
 #define CONFIG_ARCH_CPU_INIT   /* call arch_cpu_init() */
+#ifndef CONFIG_ARMADA100   /* will be removed latter */
 #define CONFIG_ARCH_MISC_INIT  /* call arch_misc_init() */
+#endif /* CONFIG_ARMADA100 */
 #define CONFIG_BOARD_EARLY_INIT_F /* call board_init_f for early inits */
 #define CONFIG_DISPLAY_CPUINFO /* Display cpu info */
-#define CONFIG_NR_DRAM_BANKS   4
 #define CONFIG_STACKSIZE   0x0010  /* regular stack- 1M */
 #define CONFIG_SYS_LOAD_ADDR   0x0080  /* default load adr- 8M */
-#define CONFIG_SYS_MEMTEST_START 0x0040/* 4M */
-#define CONFIG_SYS_MEMTEST_END 0x007f  /*(_8M -1) */
+#define CONFIG_SYS_MEMTEST_START 0x0080/* 8M */
+#define CONFIG_SYS_MEMTEST_END 0x00ff  /*(_16M -1) */
 #define CONFIG_SYS_RESET_ADDRESS 0x/* Rst Vector Adr */
 #define CONFIG_SYS_MAXARGS 16  /* max number of command args */
 
 /*
+ * DRAM Banks configuration, Custom config can be done in board.h
+ */
+#ifndef CONFIG_NR_DRAM_BANKS
+#define CONFIG_NR_DRAM_BANKS   CONFIG_NR_DRAM_BANKS_MAX
+#else
+#if (CONFIG_NR_DRAM_BANKS  CONFIG_NR_DRAM_BANKS_MAX)
+#error CONFIG_NR_DRAM_BANKS Configurated more than available
+#endif
+#endif /* CONFIG_NR_DRAM_BANKS */
+
+/*
  * Ethernet Driver configuration
  */
 #ifdef CONFIG_CMD_NET
 #define CONFIG_CMD_MII
 #define CONFIG_NETCONSOLE  /* include NetConsole support   */
 

Re: [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek

2010-12-09 Thread zzs213

Dear zzs213,

can you please leave some context when you answering to the list?

Am 09.12.2010 10:52, schrieb zzs213:
 you are right, I use that method on u-boot-2010.09 for my own board(slightly 
 different from at91rm9200ek)

I guess you mean you are using a preloader on your NOR flash, is that right?

yes

 eldk4.1 is ok for 2010.09, eldk4.2 ok too

So do you have no problem left?

yes

regards

Andreas Bießmann



___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ppc4xx: 460SX Eegier board support

2010-12-09 Thread Wolfgang Denk
Dear tma...@apm.com,

In message 1291857127-3265-1-git-send-email-tma...@apm.com you wrote:
 
 Adding Eiger board support for 460SX SoC.

I understand the Eegier in the Subject: is a typo?  That shouldbe
Eiger as well?

 +
 diff --git a/board/amcc/eiger/config.mk b/board/amcc/eiger/config.mk
 new file mode 100644
 index 000..aa6cbda
 --- /dev/null
 +++ b/board/amcc/eiger/config.mk
...
 +PLATFORM_CPPFLAGS += -DCONFIG_440=1
 +
 +ifeq ($(debug),1)
 +PLATFORM_CPPFLAGS += -DDEBUG
 +endif
 +
 +ifeq ($(dbcr),1)
 +PLATFORM_CPPFLAGS += -DCONFIG_SYS_INIT_DBCR=0x8cff
 +endif

I don't think any of this is needed.  Please get rid of the consif.mk
file.

 --- /dev/null
 +++ b/board/amcc/eiger/init.S
 @@ -0,0 +1,67 @@
...
 + /*
 +  * BOOT_CS (FLASH) must be first. Before relocation SA_I can be off to 
 use the
 +  * speed up boot process. It is patched after relocation to enable SA_I
 +  */

Lines too long. Please fix globally.

 --- a/boards.cfg
 +++ b/boards.cfg
 @@ -641,6 +641,7 @@ bubinga  powerpc ppc4xx  -
amcc
  canyonlands  powerpc ppc4xx  canyonlands 
 amcc   -   canyonlands:CANYONLANDS
  canyonlands_nand powerpc ppc4xx  canyonlands 
 amcc   -   
 canyonlands:CANYONLANDS,NAND_U_BOOT,SYS_TEXT_BASE=0x0100
  ebonypowerpc ppc4xx  -   amcc
 +eigerpowerpc ppc4xx  -   amcc

Could you please use the same vertical alignment as the ebony board
above?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
There are things that are so serious that you can  only  joke  about
them- Heisenberg
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 02/10] make the hwconfig buffer deeper

2010-12-09 Thread Wolfgang Denk
Dear York Sun,

In message 1291863340-4354-2-git-send-email-york...@freescale.com you wrote:
 To temporarily fix buffer issue when running at flash, use bigger buffer
 to push down the stack deeper.

What does this mean? temporarily fix ? Do you have another,
permanent fix in the works

 Signed-off-by: York Sun york...@freescale.com
 ---
  common/hwconfig.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/common/hwconfig.c b/common/hwconfig.c
 index 3c9759f..1b33d95 100644
 --- a/common/hwconfig.c
 +++ b/common/hwconfig.c
 @@ -71,7 +71,7 @@ next:
  const char *cpu_hwconfig __attribute__((weak));
  const char *board_hwconfig __attribute__((weak));
  
 -#define HWCONFIG_PRE_RELOC_BUF_SIZE  128
 +#define HWCONFIG_PRE_RELOC_BUF_SIZE  256

Is this really, really necessary?  Memory is a scarce resource
pre relocation.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
If it happens once, it's a bug.
If it happens twice, it's a feature.
If it happens more than twice, it's a design philosophy.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/2] sf: winbond: add support for W25Q16/32/128 parts

2010-12-09 Thread Mike Frysinger
From: Wojtek Skulski skul...@pas.rochester.edu

While we're here, cut out the useless id defines too.

Signed-off-by: Wojtek Skulski skul...@pas.rochester.edu
Signed-off-by: Mike Frysinger vap...@gentoo.org
---
 drivers/mtd/spi/winbond.c |   39 +--
 1 files changed, 29 insertions(+), 10 deletions(-)

diff --git a/drivers/mtd/spi/winbond.c b/drivers/mtd/spi/winbond.c
index de3aeb8..4452355 100644
--- a/drivers/mtd/spi/winbond.c
+++ b/drivers/mtd/spi/winbond.c
@@ -24,11 +24,6 @@
 #define CMD_W25_DP 0xb9/* Deep Power-down */
 #define CMD_W25_RES0xab/* Release from DP, and Read Signature 
*/
 
-#define WINBOND_ID_W25X16  0x3015
-#define WINBOND_ID_W25X32  0x3016
-#define WINBOND_ID_W25X64  0x3017
-#define WINBOND_ID_W25Q64  0x4017
-
 #define WINBOND_SR_WIP (1  0)/* Write-in-Progress */
 
 struct winbond_spi_flash_params {
@@ -37,7 +32,7 @@ struct winbond_spi_flash_params {
uint8_t l2_page_size;
uint16_tpages_per_sector;
uint16_tsectors_per_block;
-   uint8_t nr_blocks;
+   uint16_tnr_blocks;
const char  *name;
 };
 
@@ -55,7 +50,7 @@ to_winbond_spi_flash(struct spi_flash *flash)
 
 static const struct winbond_spi_flash_params winbond_spi_flash_table[] = {
{
-   .id = WINBOND_ID_W25X16,
+   .id = 0x3015,
.l2_page_size   = 8,
.pages_per_sector   = 16,
.sectors_per_block  = 16,
@@ -63,7 +58,7 @@ static const struct winbond_spi_flash_params 
winbond_spi_flash_table[] = {
.name   = W25X16,
},
{
-   .id = WINBOND_ID_W25X32,
+   .id = 0x3016,
.l2_page_size   = 8,
.pages_per_sector   = 16,
.sectors_per_block  = 16,
@@ -71,7 +66,7 @@ static const struct winbond_spi_flash_params 
winbond_spi_flash_table[] = {
.name   = W25X32,
},
{
-   .id = WINBOND_ID_W25X64,
+   .id = 0x3017,
.l2_page_size   = 8,
.pages_per_sector   = 16,
.sectors_per_block  = 16,
@@ -79,13 +74,37 @@ static const struct winbond_spi_flash_params 
winbond_spi_flash_table[] = {
.name   = W25X64,
},
{
-   .id = WINBOND_ID_W25Q64,
+   .id = 0x4015,
+   .l2_page_size   = 8,
+   .pages_per_sector   = 16,
+   .sectors_per_block  = 16,
+   .nr_blocks  = 32,
+   .name   = W25Q16,
+   },
+   {
+   .id = 0x4016,
+   .l2_page_size   = 8,
+   .pages_per_sector   = 16,
+   .sectors_per_block  = 16,
+   .nr_blocks  = 64,
+   .name   = W25Q32,
+   },
+   {
+   .id = 0x4017,
.l2_page_size   = 8,
.pages_per_sector   = 16,
.sectors_per_block  = 16,
.nr_blocks  = 128,
.name   = W25Q64,
},
+   {
+   .id = 0x4018,
+   .l2_page_size   = 8,
+   .pages_per_sector   = 16,
+   .sectors_per_block  = 16,
+   .nr_blocks  = 256,
+   .name   = W25Q128,
+   },
 };
 
 static int winbond_wait_ready(struct spi_flash *flash, unsigned long timeout)
-- 
1.7.3.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/2] sf: new driver for EON devices

2010-12-09 Thread Mike Frysinger
From: Chong Huang chu...@ucrobotics.com

Signed-off-by: Chong Huang chu...@ucrobotics.com
Signed-off-by: Haitao Zhang minipa...@linuxrobot.org
Signed-off-by: Mike Frysinger vap...@gentoo.org
---
 drivers/mtd/spi/Makefile |1 +
 drivers/mtd/spi/eon.c|  275 ++
 drivers/mtd/spi/spi_flash.c  |3 +
 drivers/mtd/spi/spi_flash_internal.h |1 +
 4 files changed, 280 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mtd/spi/eon.c

diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile
index 3d607c0..57112af 100644
--- a/drivers/mtd/spi/Makefile
+++ b/drivers/mtd/spi/Makefile
@@ -27,6 +27,7 @@ LIB   := $(obj)libspi_flash.o
 
 COBJS-$(CONFIG_SPI_FLASH)  += spi_flash.o
 COBJS-$(CONFIG_SPI_FLASH_ATMEL)+= atmel.o
+COBJS-$(CONFIG_SPI_FLASH_EON)  += eon.o
 COBJS-$(CONFIG_SPI_FLASH_MACRONIX) += macronix.o
 COBJS-$(CONFIG_SPI_FLASH_SPANSION) += spansion.o
 COBJS-$(CONFIG_SPI_FLASH_SST)  += sst.o
diff --git a/drivers/mtd/spi/eon.c b/drivers/mtd/spi/eon.c
new file mode 100644
index 000..02c3bb9
--- /dev/null
+++ b/drivers/mtd/spi/eon.c
@@ -0,0 +1,275 @@
+/*
+ * (C) Copyright 2010, ucRobotics Inc.
+ * Author: Chong Huang chu...@ucrobotics.com
+ * Licensed under the GPL-2 or later.
+ */
+
+#include common.h
+#include malloc.h
+#include spi_flash.h
+
+#include spi_flash_internal.h
+
+/* EN25Q128-specific commands */
+#define CMD_EN25Q128_WREN  0x06/* Write Enable */
+#define CMD_EN25Q128_WRDI  0x04/* Write Disable */
+#define CMD_EN25Q128_RDSR  0x05/* Read Status Register */
+#define CMD_EN25Q128_WRSR  0x01/* Write Status Register */
+#define CMD_EN25Q128_READ  0x03/* Read Data Bytes */
+#define CMD_EN25Q128_FAST_READ 0x0b/* Read Data Bytes at Higher Speed */
+#define CMD_EN25Q128_PP0x02/* Page Program */
+#define CMD_EN25Q128_SE0x20/* Sector Erase */
+#define CMD_EN25Q128_BE0xd8/* Block Erase */
+#define CMD_EN25Q128_DP0xb9/* Deep Power-down */
+#define CMD_EN25Q128_RES   0xab/* Release from DP, and Read Signature 
*/
+
+#define EON_ID_EN25Q1280x18
+
+#define EON_SR_WIP (1  0)/* Write-in-Progress */
+
+struct eon_spi_flash_params {
+   u8 idcode1;
+   u16 page_size;
+   u16 pages_per_sector;
+   u16 sectors_per_block;
+   u16 nr_sectors;
+   const char *name;
+};
+
+/* spi_flash needs to be first so upper layers can free() it */
+struct eon_spi_flash {
+   struct spi_flash flash;
+   const struct eon_spi_flash_params *params;
+};
+
+static inline struct eon_spi_flash *to_eon_spi_flash(struct spi_flash *flash)
+{
+   return container_of(flash, struct eon_spi_flash, flash);
+}
+
+static const struct eon_spi_flash_params eon_spi_flash_table[] = {
+   {
+   .idcode1 = EON_ID_EN25Q128,
+   .page_size = 256,
+   .pages_per_sector = 16,
+   .sectors_per_block = 16,
+   .nr_sectors = 4096,
+   .name = EN25Q128,
+   },
+};
+
+static int eon_wait_ready(struct spi_flash *flash, unsigned long timeout)
+{
+   struct spi_slave *spi = flash-spi;
+   unsigned long timebase;
+   int ret;
+   u8 cmd = CMD_EN25Q128_RDSR;
+   u8 status;
+
+   ret = spi_xfer(spi, 8, cmd, NULL, SPI_XFER_BEGIN);
+   if (ret) {
+   debug(SF: Failed to send command %02x: %d\n, cmd, ret);
+   return ret;
+   }
+
+   timebase = get_timer(0);
+   do {
+   ret = spi_xfer(spi, 8, NULL, status, 0);
+   if (ret)
+   return -1;
+
+   if ((status  EON_SR_WIP) == 0)
+   break;
+
+   } while (get_timer(timebase)  timeout);
+
+   spi_xfer(spi, 0, NULL, NULL, SPI_XFER_END);
+
+   if ((status  EON_SR_WIP) == 0)
+   return 0;
+
+   /* Timed out */
+   return -1;
+}
+
+static int eon_read_fast(struct spi_flash *flash,
+u32 offset, size_t len, void *buf)
+{
+   struct eon_spi_flash *eon = to_eon_spi_flash(flash);
+   unsigned long page_addr;
+   unsigned long page_size;
+   u8 cmd[5];
+
+   page_size = eon-params-page_size;
+   page_addr = offset / page_size;
+
+   cmd[0] = CMD_READ_ARRAY_FAST;
+   cmd[1] = page_addr  8;
+   cmd[2] = page_addr;
+   cmd[3] = offset % page_size;
+   cmd[4] = 0x00;
+
+   return spi_flash_read_common(flash, cmd, sizeof(cmd), buf, len);
+}
+
+static int eon_write(struct spi_flash *flash,
+u32 offset, size_t len, const void *buf)
+{
+   struct eon_spi_flash *eon = to_eon_spi_flash(flash);
+   unsigned long page_addr;
+   unsigned long byte_addr;
+   unsigned long page_size;
+   size_t chunk_len;
+   size_t actual;
+   int ret;
+   u8 cmd[4];
+
+   page_size = 

Re: [U-Boot] hwmon init

2010-12-09 Thread Wolfgang Denk
Dear Heiko Schocher,

In message 4d007f37.3010...@denx.de you wrote:
 
 Is there a reason why the dtt sensors are initialized and accessed on
 u-boot startup?

Someone once thought it was a good idea, and nobody fixed it since.

 Should that be changed?

Yes.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
All your people must learn before you can reach for the stars.
-- Kirk, The Gamesters of Triskelion, stardate 3259.2
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek

2010-12-09 Thread Wolfgang Denk
Dear Albert ARIBAUD,

In message 4d007227.7020...@free.fr you wrote:

  start.S:251: Error: bad arguments to instruction -- `add r1,r9'
 
  It looks a illegal instruction in start.S
 
  my toolchain is eldk4.1

 ELDK 4.1 seems a bit old -- 4.2 has been available for some time now and
 does not have the issue with this instruction.

 If you really cannot use 4.2, then you can rewrite the instruction in
 its canonical form: 'add r1,r1,r9'.

Well, we should actually do that.

Patch following.



Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
You see things; and you say ``Why?'' But I dream  things  that  never
were; and I say ``Why not?''
   - George Bernard Shaw _Back to Methuselah_ (1921) pt. 1, act 1
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ARM: */start.S: use canonical asm syntax

2010-12-09 Thread Wolfgang Denk
Make code build with older tool chains.

Signed-off-by: Wolfgang Denk w...@denx.de
---
 arch/arm/cpu/arm1136/start.S   |2 +-
 arch/arm/cpu/arm1176/start.S   |2 +-
 arch/arm/cpu/arm720t/start.S   |2 +-
 arch/arm/cpu/arm920t/start.S   |2 +-
 arch/arm/cpu/arm925t/start.S   |2 +-
 arch/arm/cpu/arm926ejs/start.S |2 +-
 arch/arm/cpu/arm946es/start.S  |2 +-
 arch/arm/cpu/arm_intcm/start.S |2 +-
 arch/arm/cpu/armv7/start.S |2 +-
 arch/arm/cpu/ixp/start.S   |2 +-
 arch/arm/cpu/lh7a40x/start.S   |2 +-
 arch/arm/cpu/pxa/start.S   |2 +-
 arch/arm/cpu/s3c44b0/start.S   |2 +-
 arch/arm/cpu/sa1100/start.S|2 +-
 14 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S
index d14a7bb..9a6f6cb 100644
--- a/arch/arm/cpu/arm1136/start.S
+++ b/arch/arm/cpu/arm1136/start.S
@@ -234,7 +234,7 @@ fixabs:
mov r1, r1, LSR #4  /* r1 - symbol index in .dynsym */
add r1, r10, r1 /* r1 - address of symbol in table */
ldr r1, [r1, #4]/* r1 - symbol value */
-   add r1, r9  /* r1 - relocated sym addr */
+   add r1, r1, r9  /* r1 - relocated sym addr */
b   fixnext
 fixrel:
/* relative fix: increase location by offset */
diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S
index dc692ed..237dcfe 100644
--- a/arch/arm/cpu/arm1176/start.S
+++ b/arch/arm/cpu/arm1176/start.S
@@ -288,7 +288,7 @@ fixabs:
mov r1, r1, LSR #4  /* r1 - symbol index in .dynsym */
add r1, r10, r1 /* r1 - address of symbol in table */
ldr r1, [r1, #4]/* r1 - symbol value */
-   add r1, r9  /* r1 - relocated sym addr */
+   add r1, r1, r9  /* r1 - relocated sym addr */
b   fixnext
 fixrel:
/* relative fix: increase location by offset */
diff --git a/arch/arm/cpu/arm720t/start.S b/arch/arm/cpu/arm720t/start.S
index f048bad..abfa124 100644
--- a/arch/arm/cpu/arm720t/start.S
+++ b/arch/arm/cpu/arm720t/start.S
@@ -203,7 +203,7 @@ fixabs:
mov r1, r1, LSR #4  /* r1 - symbol index in .dynsym */
add r1, r10, r1 /* r1 - address of symbol in table */
ldr r1, [r1, #4]/* r1 - symbol value */
-   add r1, r9  /* r1 - relocated sym addr */
+   add r1, r1, r9  /* r1 - relocated sym addr */
b   fixnext
 fixrel:
/* relative fix: increase location by offset */
diff --git a/arch/arm/cpu/arm920t/start.S b/arch/arm/cpu/arm920t/start.S
index aa014d0..08f178d 100644
--- a/arch/arm/cpu/arm920t/start.S
+++ b/arch/arm/cpu/arm920t/start.S
@@ -249,7 +249,7 @@ fixabs:
mov r1, r1, LSR #4  /* r1 - symbol index in .dynsym */
add r1, r10, r1 /* r1 - address of symbol in table */
ldr r1, [r1, #4]/* r1 - symbol value */
-   add r1, r9  /* r1 - relocated sym addr */
+   add r1, r1, r9  /* r1 - relocated sym addr */
b   fixnext
 fixrel:
/* relative fix: increase location by offset */
diff --git a/arch/arm/cpu/arm925t/start.S b/arch/arm/cpu/arm925t/start.S
index 67e706b..2c0c869 100644
--- a/arch/arm/cpu/arm925t/start.S
+++ b/arch/arm/cpu/arm925t/start.S
@@ -240,7 +240,7 @@ fixabs:
mov r1, r1, LSR #4  /* r1 - symbol index in .dynsym */
add r1, r10, r1 /* r1 - address of symbol in table */
ldr r1, [r1, #4]/* r1 - symbol value */
-   add r1, r9  /* r1 - relocated sym addr */
+   add r1, r1, r9  /* r1 - relocated sym addr */
b   fixnext
 fixrel:
/* relative fix: increase location by offset */
diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S
index 6c49c83..5519252 100644
--- a/arch/arm/cpu/arm926ejs/start.S
+++ b/arch/arm/cpu/arm926ejs/start.S
@@ -239,7 +239,7 @@ fixabs:
mov r1, r1, LSR #4  /* r1 - symbol index in .dynsym */
add r1, r10, r1 /* r1 - address of symbol in table */
ldr r1, [r1, #4]/* r1 - symbol value */
-   add r1, r9  /* r1 - relocated sym addr */
+   add r1, r1, r9  /* r1 - relocated sym addr */
b   fixnext
 fixrel:
/* relative fix: increase location by offset */
diff --git a/arch/arm/cpu/arm946es/start.S b/arch/arm/cpu/arm946es/start.S
index 4e75109..f9c9470 100644
--- a/arch/arm/cpu/arm946es/start.S
+++ b/arch/arm/cpu/arm946es/start.S
@@ -211,7 +211,7 @@ fixabs:
mov r1, r1, LSR #4  /* r1 - symbol index in .dynsym */
add r1, r10, r1 /* r1 - address of symbol in table */
ldr r1, 

Re: [U-Boot] [PATCH 3/4] arm920t: fix linker skript for -pie linking

2010-12-09 Thread Wolfgang Denk
Dear Wolfgang Denk,

In message 20101209094538.7b9bbd08...@gemini.denx.de you wrote:

 Hm... strange...
 
 I am absolutely sure that I did apply these patches last night, and
 then I even pushed them out... ... but now I see no trace of this
 either.
 
 Don't know what happened (I should learn this lesson - this is what I
 get when _not_ having a beer ;-)
 
 Ummm... now I have a problem, because I have marked all these patches
 as applied, both in patchwork and in my mail reader. This actually
 means that I have completely lost track of what is missing and which
 patches should be applied :-(

OK, I found the stuff. I have applied to my working copy of the master
branch instesd of ARM.

So only the -pie commit needs to be removed?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
We don't care.  We don't have to.  We're the Phone Company.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] Blackfin: bf518f-ezbrd: don't require SPI logic all the time

2010-12-09 Thread Mike Frysinger
Only the first run of boards had a ksz switch on it, so if building for a
newer silicon rev or SPI is disabled, don't bother checking for the ksz.

Signed-off-by: Mike Frysinger vap...@gentoo.org
---
 board/bf518f-ezbrd/bf518f-ezbrd.c |   30 ++
 1 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/board/bf518f-ezbrd/bf518f-ezbrd.c 
b/board/bf518f-ezbrd/bf518f-ezbrd.c
index ff1ac4c..4bd02ee 100644
--- a/board/bf518f-ezbrd/bf518f-ezbrd.c
+++ b/board/bf518f-ezbrd/bf518f-ezbrd.c
@@ -57,6 +57,13 @@ static void board_init_enetaddr(uchar *mac_addr)
eth_setenv_enetaddr(ethaddr, mac_addr);
 }
 
+/* Only the first run of boards had a KSZ switch */
+#if defined(CONFIG_BFIN_SPI)  __SILICON_REVISION__ == 0
+# define KSZ_POSSIBLE 1
+#else
+# define KSZ_POSSIBLE 0
+#endif
+
 #define KSZ_MAX_HZ500
 
 #define KSZ_WRITE 0x02
@@ -109,17 +116,16 @@ static int ksz8893m_reset(struct spi_slave *slave)
return ret;
 }
 
-int board_eth_init(bd_t *bis)
+static int board_ksz_init(void)
 {
-   static bool switch_is_alive = false, phy_is_ksz = true;
-   int ret;
+   static bool switch_is_alive = false;
 
if (!switch_is_alive) {
struct spi_slave *slave = spi_setup_slave(0, 1, KSZ_MAX_HZ, 
SPI_MODE_3);
if (slave) {
if (!spi_claim_bus(slave)) {
-   phy_is_ksz = (ksz8893m_reg_read(slave, 
KSZ_REG_CHID) == 0x88);
-   ret = phy_is_ksz ? ksz8893m_reset(slave) : 0;
+   bool phy_is_ksz = (ksz8893m_reg_read(slave, 
KSZ_REG_CHID) == 0x88);
+   int ret = phy_is_ksz ? ksz8893m_reset(slave) : 
0;
switch_is_alive = (ret == 0);
spi_release_bus(slave);
}
@@ -127,10 +133,18 @@ int board_eth_init(bd_t *bis)
}
}
 
-   if (switch_is_alive)
-   return bfin_EMAC_initialize(bis);
-   else
+   if (!switch_is_alive)
return -1;
+   else
+   return 0;
+}
+
+int board_eth_init(bd_t *bis)
+{
+   if (KSZ_POSSIBLE)
+   if (board_ksz_init() == -1)
+   return 0;
+   return bfin_EMAC_initialize(bis);
 }
 #endif
 
-- 
1.7.3.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] Blackfin: dnp5370: new board port

2010-12-09 Thread Mike Frysinger
From: Andreas Schallenberg andreas.schallenb...@3alitydigital.de

Info about the hardware can be found here:
http://www.dilnetpc.com/dnp0086.htm

Signed-off-by: Andreas Schallenberg andreas.schallenb...@3alitydigital.de
Signed-off-by: Mike Frysinger vap...@gentoo.org
---
v2
- update to latest mainline
- add MAINTAINERS entry

 MAINTAINERS   |4 ++
 board/dnp5370/Makefile|   54 ++
 board/dnp5370/config.mk   |   29 ++
 board/dnp5370/dnp5370.c   |  104 +++
 boards.cfg|1 +
 doc/README.dnp5370|   67 +++
 include/configs/dnp5370.h |  131 +
 7 files changed, 390 insertions(+), 0 deletions(-)
 create mode 100644 board/dnp5370/Makefile
 create mode 100644 board/dnp5370/config.mk
 create mode 100644 board/dnp5370/dnp5370.c
 create mode 100644 doc/README.dnp5370
 create mode 100644 include/configs/dnp5370.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 986e0dc..059155b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1090,6 +1090,10 @@ Peter Meerwald de...@bct-electronic.com
 
bct-brettl2 BF536
 
+M.Hasewinkel (MHA) i...@ssv-embedded.de
+
+   dnp5370 BF537
+
 #
 # End of MAINTAINERS list  #
 #
diff --git a/board/dnp5370/Makefile b/board/dnp5370/Makefile
new file mode 100644
index 000..6651f3c
--- /dev/null
+++ b/board/dnp5370/Makefile
@@ -0,0 +1,54 @@
+#
+# U-boot - Makefile
+#
+# Copyright (c) 2005-2007 Analog Device Inc.
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 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 $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS-y:= $(BOARD).o
+
+SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+SOBJS  := $(addprefix $(obj),$(SOBJS-y))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/dnp5370/config.mk b/board/dnp5370/config.mk
new file mode 100644
index 000..8227506
--- /dev/null
+++ b/board/dnp5370/config.mk
@@ -0,0 +1,29 @@
+#
+# Copyright (c) 2005-2008 Analog Device Inc.
+#
+# (C) Copyright 2001
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 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
+#
+
+# This is not actually used for Blackfin boards so do not change it
+#TEXT_BASE = do-not-use-me
+
+CONFIG_BFIN_CPU = bf537-0.3
diff --git a/board/dnp5370/dnp5370.c b/board/dnp5370/dnp5370.c
new file mode 100644
index 000..da9eb5f
--- /dev/null
+++ b/board/dnp5370/dnp5370.c
@@ -0,0 +1,104 @@
+/*
+ * U-boot - main board file
+ *
+ * (C) Copyright 2010 3ality Digital Systems
+ *
+ * Copyright (c) 2005-2008 Analog Devices Inc.
+ *
+ * (C) Copyright 2000-2004
+ * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * 

[U-Boot] [PATCH] Blackfin: bf525-ucr2: new board port

2010-12-09 Thread Mike Frysinger
From: Chong Huang chu...@ucrobotics.com

Signed-off-by: Chong Huang chu...@ucrobotics.com
Signed-off-by: Haitao Zhang minipa...@linuxrobot.org
Signed-off-by: Mike Frysinger vap...@gentoo.org
---
 MAINTAINERS   |5 ++
 board/bf525-ucr2/Makefile |   54 ++
 board/bf525-ucr2/bf525-ucr2.c |   16 +++
 board/bf525-ucr2/config.mk|   32 +
 boards.cfg|1 +
 include/configs/bf525-ucr2.h  |  101 +
 6 files changed, 209 insertions(+), 0 deletions(-)
 create mode 100644 board/bf525-ucr2/Makefile
 create mode 100644 board/bf525-ucr2/bf525-ucr2.c
 create mode 100644 board/bf525-ucr2/config.mk
 create mode 100644 include/configs/bf525-ucr2.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 059155b..a0bb25e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1094,6 +1094,11 @@ M.Hasewinkel (MHA) i...@ssv-embedded.de
 
dnp5370 BF537
 
+Haitao Zhang hzh...@ucrobotics.com
+Chong Huang chu...@ucrobotics.com
+
+   bf525-ucr2  BF525
+
 #
 # End of MAINTAINERS list  #
 #
diff --git a/board/bf525-ucr2/Makefile b/board/bf525-ucr2/Makefile
new file mode 100644
index 000..5c1f1ec
--- /dev/null
+++ b/board/bf525-ucr2/Makefile
@@ -0,0 +1,54 @@
+#
+# U-boot - Makefile
+#
+# Copyright (c) 2005-2008 Analog Device Inc.
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 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 $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS-y:= $(BOARD).o
+
+SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+SOBJS  := $(addprefix $(obj),$(SOBJS-y))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/bf525-ucr2/bf525-ucr2.c b/board/bf525-ucr2/bf525-ucr2.c
new file mode 100644
index 000..3e6df1f
--- /dev/null
+++ b/board/bf525-ucr2/bf525-ucr2.c
@@ -0,0 +1,16 @@
+/* U-boot - bf525-ucr2.c  board specific routines
+ *
+ * (C) Copyright 2000-2004
+ * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#include common.h
+
+int checkboard(void)
+{
+   printf(Board: bf525-ucr2\n);
+   printf(Support: http://www.ucrobotics.com/\n;);
+   return 0;
+}
diff --git a/board/bf525-ucr2/config.mk b/board/bf525-ucr2/config.mk
new file mode 100644
index 000..428390f
--- /dev/null
+++ b/board/bf525-ucr2/config.mk
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2005-2008 Analog Device Inc.
+#
+# (C) Copyright 2001
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 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
+#
+
+# This is not actually used for Blackfin boards so do not change it
+#TEXT_BASE = do-not-use-me
+
+CONFIG_BFIN_CPU = bf525-0.2
+
+# Set some default LDR flags based on boot mode.
+LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git 

Re: [U-Boot] [PATCH 3/4] arm920t: fix linker skript for -pie linking

2010-12-09 Thread Andreas Bießmann
Dear Wolfgang Denk,

Am 09.12.2010 11:32, schrieb Wolfgang Denk:
 Dear Wolfgang Denk,
 
 In message 20101209094538.7b9bbd08...@gemini.denx.de you wrote:

 
 OK, I found the stuff. I have applied to my working copy of the master
 branch instesd of ARM.
 
 So only the -pie commit needs to be removed?

All of this series should not be applied. Two of them already upstream
in u-boot-arm/master.
Namely:
 - 0a41edaabb74f2ccfde62a232165088098763e3e MAKEALL: fix AT91
 - 3a4ff8b3cd719372cb3b3a8432e68015d84f1fc2 at91rm9200ek: add configure
target for RAM boot

One of them is modified already in upstream u-boot-arm/master:
 - a429db7e3ce6136f80f22584588247926ba60b05 arm920t/at91/timer: replace
bss variables by gd

And last one of them (-pie) is superseeded by another one also already
in u-boot-arm/master:
 - 305bf489d1e7dd70f45720720ae0066fcce3acb1
arm920t/at91/reset: board_reset: define weak symbol


BTW: All the mentioned hashes miss Signed-off of custodians. Is that
correct?

regards

Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] hwmon init

2010-12-09 Thread Heiko Schocher
Hello Wolfgang,

Wolfgang Denk wrote:
 Dear Heiko Schocher,
 
 In message 4d007f37.3010...@denx.de you wrote:
 Is there a reason why the dtt sensors are initialized and accessed on
 u-boot startup?
 
 Someone once thought it was a good idea, and nobody fixed it since.
 
 Should that be changed?
 
 Yes.

Ok, I prepare a patch.

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek

2010-12-09 Thread Andreas Bießmann
Dear Wolfgang Denk,
Dear Albert Aribaud,

Am 09.12.2010 11:26, schrieb Wolfgang Denk:
 Dear Albert ARIBAUD,
 
 In message 4d007227.7020...@free.fr you wrote:

 start.S:251: Error: bad arguments to instruction -- `add r1,r9'

 It looks a illegal instruction in start.S

 my toolchain is eldk4.1

 ELDK 4.1 seems a bit old -- 4.2 has been available for some time now and
 does not have the issue with this instruction.

 If you really cannot use 4.2, then you can rewrite the instruction in
 its canonical form: 'add r1,r1,r9'.
 
 Well, we should actually do that.
 
 Patch following.

So you need to fix _all_ of the arch/arm/cpu/*/start.S cause this was
copied from one relocation code to the other.

Another cause to introduce a relocate.S in near future ;)

regards

Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] warning: CONFIG_SYS_TEXT_BASE redefined, was Re: [PATCH 1/2] AT91: fix TOP9000 built issues

2010-12-09 Thread Reinhard Meyer
I wrote:

  /*
   * Warning: changing CONFIG_SYS_TEXT_BASE requires
 - * adapting the initial boot program
 + * adapting the initial boot program.
 + * Guard it since the definition finds its way to the command-line and
 + * causes warnings when this file is included
   */
 -#define CONFIG_SYS_TEXT_BASE 0x21f0  /* 31 MB into RAM */
 +#ifndef CONFIG_SYS_TEXT_BASE
 +# define CONFIG_SYS_TEXT_BASE0x21f0  /* 31 MB into 
 RAM */
 +#endif

Because I had this warning when building u-boot:

*** make u-boot.bin
In file included from 
/home/reinhard/embedded/top9000/build/u-boot/include/config.h:5,
 from include/common.h:37:
/home/reinhard/embedded/u-boot-atmel/include/configs/top9000.h:45:1: warning: 
CONFIG_SYS_TEXT_BASE redefined
command-line: warning: this is the location of the previous definition

Since I found guarding the define a bit ugly, I removed it again, trying to 
investigate
where exactly the definition in the command line came from.

Surprisingly, further builds did not ever again show that warning. I can only 
assume some
stuff in the out-of-tree build was dormant and got removed when I did a make 
clean.

A new patch without the guarding will follow soon.

Best Regards,
Reinhard

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] can't build u-boot-2010.12-rc2 for at91rm9200ek

2010-12-09 Thread Reinhard Meyer
Dear Andreas Bießmann,
 Dear Wolfgang Denk,
 Dear Albert Aribaud,
 
 Am 09.12.2010 11:26, schrieb Wolfgang Denk:
 Dear Albert ARIBAUD,

 In message 4d007227.7020...@free.fr you wrote:
 start.S:251: Error: bad arguments to instruction -- `add r1,r9'

 It looks a illegal instruction in start.S

 my toolchain is eldk4.1
 ELDK 4.1 seems a bit old -- 4.2 has been available for some time now and
 does not have the issue with this instruction.

 If you really cannot use 4.2, then you can rewrite the instruction in
 its canonical form: 'add r1,r1,r9'.
 Well, we should actually do that.

 Patch following.
 
 So you need to fix _all_ of the arch/arm/cpu/*/start.S cause this was
 copied from one relocation code to the other.
 
 Another cause to introduce a relocate.S in near future ;)

Certainly you are referring to relocate.c, or even better adding the C
relocation to the arm generic board.c on the path to an u-boot generic
board.c :)

We should only need a small stub in assembly for stack and pc switching.

Patches welcome :)

Best Regards,
Reinhard

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [STATUS] next rebased / ARM help needed / release delayed

2010-12-09 Thread Andreas Bießmann
Dear Wolfgang Denk,

Am 09.12.2010 10:52, schrieb Wolfgang Denk:

 2) By some stupid accident I lost track of some / most / all
ARM related patches that are supposed to go into the current
release and/or next; unfortunately I also maked these as applied'
in patchwork.
 
If you have any outstanding ARM patches that should go in, please
drop me a note (ideally including the respective link into
patchwork).

Apart from the ones already in u-boot-arm/master I have four other
patches for v2010.12:
 - http://patchwork.ozlabs.org/patch/73686/  [U-Boot,4/4] armv7: fix
relocation skip
 - http://patchwork.ozlabs.org/patch/73685/  [U-Boot,3/4] arm:
fixloop(): do not use r8 for relocation
 - http://patchwork.ozlabs.org/patch/73683/  [U-Boot,2/4] arm:
relocate_code(): do not set register useless
 - http://patchwork.ozlabs.org/patch/73684/ [U-Boot,1/4] arm:
copy_loop(): use scratch register

All of them are 'accepted' by 'wd' and I can not find them in
u-boot-arm/master

But I have never seen a concrete 'Acked-by' nor 'Tested-by' for those
patches. Albert can you please do so?
I think they are correct and really needed but my understanding of that
multi eyes principles is to have more than one to sign a patch.

Thanks, and sorry again.

No problem for me.

 3) We will have a delay in the release. I will try to get a -rc3 out by
the weekend; new target for 2010.12 is December 20 (but don't hold
your breath).

So we may get a christmas release ;)

regards

Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [STATUS] next rebased / ARM help needed / release delayed

2010-12-09 Thread Andreas Bießmann
Dear Wolfgang Denk,

Am 09.12.2010 13:08, schrieb Andreas Bießmann:
 Dear Wolfgang Denk,
 
 Am 09.12.2010 10:52, schrieb Wolfgang Denk:
 
 2) By some stupid accident I lost track of some / most / all
ARM related patches that are supposed to go into the current
release and/or next; unfortunately I also maked these as applied'
in patchwork.

If you have any outstanding ARM patches that should go in, please
drop me a note (ideally including the respective link into
patchwork).

can you please mark http://patchwork.ozlabs.org/patch/73563/ as superseeded?

This is the patch which should not go into mainline but has 'accepted'
state.

regards

Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Full Arm emulator to run under x86

2010-12-09 Thread Toan Pham
Hi

I am new to uboot and I would like to learn it under an emulator
instead of a remote target.  For instance, I'd like to experiment it
with the Android operating system.  So far, I have tried qemu (utility
qemu-system-arm) to boot the kernel or an arm+uboot bootable sd flash
image on x86 architecture and the result was unsuccessful.  My purpose
is not to run for example Android on an x86 architecture, because i
know that there's Android for i386.  However, more of a full Arm
system emulator that should be able to boot U-boot bootloader and then
the Linux kernel, and also a bootable block device or image.


thank you,

-toan
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] arm: copy_loop(): use scratch register

2010-12-09 Thread Albert ARIBAUD
Le 01/12/2010 00:58, Andreas Bießmann a écrit :
 This patch uses r1 as scratch register for copy_loop(). Therefore we do
 not longer need r7 for the storage of relocate_code()'s 'addr_moni' (the
 destination address of relocation).
 Therefore r7 can be used later on for other purposes.

 Signed-off-by: Andreas Bießmannandreas.de...@googlemail.com

Acked-By: Albert ARIBAUD albertarib...@free.fr

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/4] arm: fixloop(): do not use r8 for relocation

2010-12-09 Thread Albert ARIBAUD
Le 01/12/2010 00:58, Andreas Bießmann a écrit :
 r8 is used for global_data and should therefore be left alone!

 For C code the compiler flag --fixed-r8 does the job, but in assembler
 we need to be aware of that fact.

 Signed-off-by: Andreas Bießmannandreas.de...@googlemail.com

Acked-By: Albert ARIBAUD albertarib...@free.fr

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] armv7: fix relocation skip

2010-12-09 Thread Albert ARIBAUD
Le 01/12/2010 00:58, Andreas Bießmann a écrit :
 I doubt the stack_setup() was defective before:
   we load the current location of _start and compare against destination
   of relocate_code(). If we are already there we shoud skip the
   relocation and jump over to clear_bss. Before the clear_bss was also 
 skipped.

 Signed-off-by: Andreas Bießmannandreas.de...@googlemail.com

Acked-by: Albert ARIBAUD albertarib...@free.fr

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/4] arm: relocate_code(): do not set register useless

2010-12-09 Thread Albert ARIBAUD
Le 01/12/2010 00:58, Andreas Bießmann a écrit :
 In case we are still at relocation target address before relocation we
 do not need to load the registers needed for relocation. We should
 instead skip the whole relocation part and jump over to clear_bss
 immediately.

 Signed-off-by: Andreas Bießmannandreas.de...@googlemail.com

Acked-by: Albert ARIBAUD albert.arib...@free.fr

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/4] arm: relocate_code(): do not set register useless

2010-12-09 Thread Albert ARIBAUD
Le 01/12/2010 00:58, Andreas Bießmann a écrit :
 In case we are still at relocation target address before relocation we
 do not need to load the registers needed for relocation. We should
 instead skip the whole relocation part and jump over to clear_bss
 immediately.

 Signed-off-by: Andreas Bießmannandreas.de...@googlemail.com

Acked-by: Albert ARIBAUD albert.arib...@free.fr

(note: other patches in the series have a typo in my e-mail address -- 
missing dot between my name and surname. In my case, lack not of beer 
but of coffee.)

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [STATUS] next rebased / ARM help needed / release delayed

2010-12-09 Thread Wolfgang Denk
Dear =?ISO-8859-1?Q?Andreas_Bie=DFmann?=,

In message 4d00c813.2010...@gmail.com you wrote:
 
 can you please mark http://patchwork.ozlabs.org/patch/73563/ as superseeded?
 
 This is the patch which should not go into mainline but has 'accepted'
 state.

Done.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
While money can't buy happiness, it certainly lets  you  choose  your
own form of misery.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [STATUS] next rebased / ARM help needed / release delayed

2010-12-09 Thread Wolfgang Denk
Dear =?ISO-8859-1?Q?Andreas_Bie=DFmann?=,

In message 4d00c6a5.9010...@gmail.com you wrote:
 Dear Wolfgang Denk,
 
 Am 09.12.2010 10:52, schrieb Wolfgang Denk:
 
  2) By some stupid accident I lost track of some / most / all
 ARM related patches that are supposed to go into the current
 release and/or next; unfortunately I also maked these as applied'
 in patchwork.
  
 If you have any outstanding ARM patches that should go in, please
 drop me a note (ideally including the respective link into
 patchwork).
 
 Apart from the ones already in u-boot-arm/master I have four other
 patches for v2010.12:
  - http://patchwork.ozlabs.org/patch/73686/  [U-Boot,4/4] armv7: fix
 relocation skip
  - http://patchwork.ozlabs.org/patch/73685/  [U-Boot,3/4] arm:
 fixloop(): do not use r8 for relocation
  - http://patchwork.ozlabs.org/patch/73683/  [U-Boot,2/4] arm:
 relocate_code(): do not set register useless
  - http://patchwork.ozlabs.org/patch/73684/ [U-Boot,1/4] arm:
 copy_loop(): use scratch register
 
 All of them are 'accepted' by 'wd' and I can not find them in
 u-boot-arm/master

Found them, and pushed them out to master now.


  3) We will have a delay in the release. I will try to get a -rc3 out by
 the weekend; new target for 2010.12 is December 20 (but don't hold
 your breath).
 
 So we may get a christmas release ;)

No. If I don't get this out by Dec 22, it will not be released before
Dec 28 either.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
I didn't know it was impossible when I did it.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH][NEXT] hwmon: do not init sensors on startup

2010-12-09 Thread Heiko Schocher
The U-Boot Design Principles[1] clearly say:

  Initialize devices only when they are needed within U-Boot, i.e. don't
  initialize the Ethernet interface(s) unless U-Boot performs a download
  over Ethernet; don't initialize any IDE or USB devices unless U-Boot
  actually tries to load files from these, etc. (and don't forget to
  shut down these devices after using them - otherwise nasty things may
  happen when you try to boot your OS).

So, do not initialize and read the sensors on startup.

Signed-off-by: Heiko Schocher h...@denx.de
---
 arch/powerpc/lib/board.c |3 ---
 common/cmd_dtt.c |   14 --
 drivers/hwmon/adm1021.c  |   27 +++
 drivers/hwmon/adt7460.c  |2 +-
 drivers/hwmon/ds1621.c   |   19 +--
 drivers/hwmon/ds1775.c   |   19 +--
 drivers/hwmon/lm63.c |   19 +--
 drivers/hwmon/lm73.c |   20 ++--
 drivers/hwmon/lm75.c |   29 ++---
 drivers/hwmon/lm81.c |   21 ++---
 include/dtt.h|2 +-
 11 files changed, 26 insertions(+), 149 deletions(-)

diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c
index b21c1d6..f9412a9 100644
--- a/arch/powerpc/lib/board.c
+++ b/arch/powerpc/lib/board.c
@@ -917,9 +917,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
 
WATCHDOG_RESET ();
 
-#if defined(CONFIG_DTT)/* Digital Thermometers and Thermostats 
*/
-   dtt_init ();
-#endif
 #if defined(CONFIG_CMD_SCSI)
WATCHDOG_RESET ();
puts (SCSI:  );
diff --git a/common/cmd_dtt.c b/common/cmd_dtt.c
index 3388e43..37ce4df 100644
--- a/common/cmd_dtt.c
+++ b/common/cmd_dtt.c
@@ -28,6 +28,8 @@
 #include dtt.h
 #include i2c.h
 
+static unsigned long sensors_init_done = 0;
+
 int do_dtt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 {
int i;
@@ -42,8 +44,16 @@ int do_dtt (cmd_tbl_t * cmdtp, int flag, int argc, char * 
const argv[])
 * Loop through sensors, read
 * temperature, and output it.
 */
-   for (i = 0; i  sizeof (sensors); i++)
-   printf (DTT%d: %i C\n, i + 1, dtt_get_temp (sensors[i]));
+   for (i = 0; i  sizeof (sensors); i++) {
+   if ((sensors_init_done  (1  i)) != (1  i)) {
+   if (dtt_init_one(sensors[i]) == 0)
+   sensors_init_done |= (1  i);
+   else
+   printf(DTT%d: Failed init!\n, i);
+   }
+   if ((sensors_init_done  (1  i)) == (1  i))
+   printf (DTT%d: %i C\n, i + 1, 
dtt_get_temp(sensors[i]));
+   }
 
/* switch back to original I2C bus */
I2C_SET_BUS(old_bus);
diff --git a/drivers/hwmon/adm1021.c b/drivers/hwmon/adm1021.c
index d753e9a..3ef80af 100644
--- a/drivers/hwmon/adm1021.c
+++ b/drivers/hwmon/adm1021.c
@@ -109,8 +109,8 @@ dtt_write (int sensor, int reg, int val)
return 0;
 } /* dtt_write() */
 
-static int
-_dtt_init (int sensor)
+int
+dtt_init_one (int sensor)
 {
dtt_cfg_t *dcp = dttcfg[sensor  1];
int reg, val;
@@ -164,28 +164,7 @@ _dtt_init (int sensor)
return 1;
 
return 0;
-} /* _dtt_init() */
-
-int
-dtt_init (void)
-{
-   int i;
-   unsigned char sensors[] = CONFIG_DTT_SENSORS;
-   const char *const header = DTT:   ;
-
-   /* switch to correct I2C bus */
-   I2C_SET_BUS(CONFIG_SYS_DTT_BUS_NUM);
-
-   for (i = 0; i  sizeof(sensors); i++) {
-   if (_dtt_init(sensors[i]) != 0)
-   printf (%s%d FAILED INIT\n, header, i+1);
-   else
-   printf (%s%d is %i C\n, header, i+1,
-   dtt_get_temp(sensors[i]));
-   }
-
-   return (0);
-} /* dtt_init() */
+} /* dtt_init_one() */
 
 int
 dtt_get_temp (int sensor)
diff --git a/drivers/hwmon/adt7460.c b/drivers/hwmon/adt7460.c
index caef70a..b7e36fe 100644
--- a/drivers/hwmon/adt7460.c
+++ b/drivers/hwmon/adt7460.c
@@ -50,7 +50,7 @@ int dtt_write(int sensor, int reg, int val)
return 0;
 }
 
-int dtt_init(void)
+int dtt_init_one(int sensor)
 {
printf(ADT7460 at I2C address 0x%2x\n, ADT7460_ADDRESS);
 
diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c
index 5a2ea62..4e1db6d 100644
--- a/drivers/hwmon/ds1621.c
+++ b/drivers/hwmon/ds1621.c
@@ -126,7 +126,7 @@ int dtt_write(int sensor, int reg, int val)
 }
 
 
-static int _dtt_init(int sensor)
+int dtt_init_one(int sensor)
 {
int val;
 
@@ -155,23 +155,6 @@ static int _dtt_init(int sensor)
return 0;
 }
 
-
-int dtt_init (void)
-{
-   int i;
-   unsigned char sensors[] = CONFIG_DTT_SENSORS;
-
-   for (i = 0; i  sizeof(sensors); i++) {
-   if (_dtt_init(sensors[i]) != 0)
-   printf(DTT%d:  FAILED\n, i + 1);
-   else
-   printf(DTT%d:  %i C\n, i + 1, 

Re: [U-Boot] [PATCH][NEXT] hwmon: do not init sensors on startup

2010-12-09 Thread Wolfgang Denk
Dear Heiko Schocher,

In message 1291903238-29071-1-git-send-email...@denx.de you wrote:

 --- a/common/cmd_dtt.c
 +++ b/common/cmd_dtt.c
 @@ -28,6 +28,8 @@
  #include dtt.h
  #include i2c.h
  
 +static unsigned long sensors_init_done = 0;

What if there are more then 32 sensors?

  int do_dtt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
  {
   int i;
 @@ -42,8 +44,16 @@ int do_dtt (cmd_tbl_t * cmdtp, int flag, int argc, char * 
 const argv[])
* Loop through sensors, read
* temperature, and output it.
*/
 - for (i = 0; i  sizeof (sensors); i++)
 - printf (DTT%d: %i C\n, i + 1, dtt_get_temp (sensors[i]));
 + for (i = 0; i  sizeof (sensors); i++) {
 + if ((sensors_init_done  (1  i)) != (1  i)) {
 + if (dtt_init_one(sensors[i]) == 0)
 + sensors_init_done |= (1  i);
 + else
 + printf(DTT%d: Failed init!\n, i);
 + }
 + if ((sensors_init_done  (1  i)) == (1  i))
 + printf (DTT%d: %i C\n, i + 1, 
 dtt_get_temp(sensors[i]));
 + }

This is overly complicated, it seems.  Why not:

for (i = 0; i  sizeof(sensors); i++) {
if ((sensors_init_done  (1  i)) == 0) {
if (dtt_init_one(sensors[i]) != 0) {
printf(DTT%d: init failed\n, i);
continue;
}
sensors_init_done |= (1  i);
}

printf(DTT%d: %i C\n, i + 1, dtt_get_temp(sensors[i]));
}


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
We don't have to protect the environment -- the Second Coming is  at
hand.   - James Watt
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH][NEXT] hwmon: do not init sensors on startup

2010-12-09 Thread Heiko Schocher
Hello Wolfgang,

Wolfgang Denk wrote:
 In message 1291903238-29071-1-git-send-email...@denx.de you wrote:
 --- a/common/cmd_dtt.c
 +++ b/common/cmd_dtt.c
 @@ -28,6 +28,8 @@
  #include dtt.h
  #include i2c.h
  
 +static unsigned long sensors_init_done = 0;
 
 What if there are more then 32 sensors?

Ok, that would not work ... Hmm.. I can get the number of DTTs on a board
with ARRAY_SIZE(CONFIG_DTT_SENSORS) ... should I use this info to allocate
an array, which stores the info, if the DTTs are initialized?

  int do_dtt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
  {
  int i;
 @@ -42,8 +44,16 @@ int do_dtt (cmd_tbl_t * cmdtp, int flag, int argc, char * 
 const argv[])
   * Loop through sensors, read
   * temperature, and output it.
   */
 -for (i = 0; i  sizeof (sensors); i++)
 -printf (DTT%d: %i C\n, i + 1, dtt_get_temp (sensors[i]));
 +for (i = 0; i  sizeof (sensors); i++) {
 +if ((sensors_init_done  (1  i)) != (1  i)) {
 +if (dtt_init_one(sensors[i]) == 0)
 +sensors_init_done |= (1  i);
 +else
 +printf(DTT%d: Failed init!\n, i);
 +}
 +if ((sensors_init_done  (1  i)) == (1  i))
 +printf (DTT%d: %i C\n, i + 1, 
 dtt_get_temp(sensors[i]));
 +}
 
 This is overly complicated, it seems.  Why not:
 
   for (i = 0; i  sizeof(sensors); i++) {
   if ((sensors_init_done  (1  i)) == 0) {
   if (dtt_init_one(sensors[i]) != 0) {
   printf(DTT%d: init failed\n, i);
   continue;
   }
   sensors_init_done |= (1  i);
   }
 
   printf(DTT%d: %i C\n, i + 1, dtt_get_temp(sensors[i]));
   }

Yep, that looks better, change this in v2.

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] tsec: Revert to setting TBICR_ANEG_ENABLE by default for SGMII

2010-12-09 Thread Kumar Gala
The following commit:

commit 46e91674fb4b6d06c6a4984c0b5ac7d9a16923f4
Author: Peter Tyser pty...@xes-inc.com
Date:   Tue Nov 3 17:52:07 2009 -0600

tsec: Force TBI PHY to 1000Mbps full duplex in SGMII mode

Removed setting Auto-Neg by default, however this is believed to be
proper default configuration for initialization of the TBI interface.

Instead we explicitly set CONFIG_TSEC_TBICR_SETTINGS for the
XPedite5370  XPedite5500 boards that use a Broadcomm PHY which require
Auto-Neg to be disabled to function properly.

This addresses a breakage on the P2020 DS  MPC8572 DS boards when used
with an SGMII riser card.  We also remove setting
CONFIG_TSEC_TBICR_SETTINGS on the P1_P2_RDB family of boards as now the
default setting is sufficient for them.

Additionally, we clean up the code a bit to remove an unnecessary second
define.

Signed-off-by: Kumar Gala ga...@kernel.crashing.org
Acked-by: Peter Tyser pty...@xes-inc.com
Tested-by: Peter Tyser pty...@xes-inc.com
---
* Added comments per Peter T's request

 drivers/net/tsec.c|9 -
 include/configs/P1_P2_RDB.h   |8 
 include/configs/xpedite537x.h |   10 ++
 include/configs/xpedite550x.h |   10 ++
 4 files changed, 24 insertions(+), 13 deletions(-)

diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index 9b5dd92..77908d1 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -5,7 +5,7 @@
  * terms of the GNU Public License, Version 2, incorporated
  * herein by reference.
  *
- * Copyright 2004-2009 Freescale Semiconductor, Inc.
+ * Copyright 2004-2010 Freescale Semiconductor, Inc.
  * (C) Copyright 2003, Motorola, Inc.
  * author Andy Fleming
  *
@@ -292,13 +292,12 @@ static uint tsec_local_mdio_read(volatile tsec_mdio_t 
*phyregs,
 
 /* By default force the TBI PHY into 1000Mbps full duplex when in SGMII mode */
 #ifndef CONFIG_TSEC_TBICR_SETTINGS
-#define TBICR_SETTINGS ( \
+#define CONFIG_TSEC_TBICR_SETTINGS ( \
TBICR_PHY_RESET \
+   | TBICR_ANEG_ENABLE \
| TBICR_FULL_DUPLEX \
| TBICR_SPEED1_SET \
)
-#else
-#define TBICR_SETTINGS CONFIG_TSEC_TBICR_SETTINGS
 #endif /* CONFIG_TSEC_TBICR_SETTINGS */
 
 /* Configure the TBI for SGMII operation */
@@ -311,7 +310,7 @@ static void tsec_configure_serdes(struct tsec_private *priv)
tsec_local_mdio_write(priv-phyregs_sgmii, priv-regs-tbipa, 
TBI_TBICON,
TBICON_CLK_SELECT);
tsec_local_mdio_write(priv-phyregs_sgmii, priv-regs-tbipa, TBI_CR,
-   TBICR_SETTINGS);
+   CONFIG_TSEC_TBICR_SETTINGS);
 }
 
 /* Discover which PHY is attached to the device, and configure it
diff --git a/include/configs/P1_P2_RDB.h b/include/configs/P1_P2_RDB.h
index a21afb7..2dfee3d 100644
--- a/include/configs/P1_P2_RDB.h
+++ b/include/configs/P1_P2_RDB.h
@@ -437,14 +437,6 @@ extern unsigned long get_board_sys_clk(unsigned long 
dummy);
 
 #define CONFIG_PHY_GIGE1   /* Include GbE speed/duplex 
detection */
 
-/* TBI PHY configuration for SGMII mode */
-#define CONFIG_TSEC_TBICR_SETTINGS ( \
-   TBICR_PHY_RESET \
-   | TBICR_ANEG_ENABLE \
-   | TBICR_FULL_DUPLEX \
-   | TBICR_SPEED1_SET \
-   )
-
 #endif /* CONFIG_TSEC_ENET */
 
 /*
diff --git a/include/configs/xpedite537x.h b/include/configs/xpedite537x.h
index e0a1fa4..a74766d 100644
--- a/include/configs/xpedite537x.h
+++ b/include/configs/xpedite537x.h
@@ -375,6 +375,16 @@ extern unsigned long get_board_ddr_clk(unsigned long 
dummy);
 #define CONFIG_MII_DEFAULT_TSEC1   /* Allow unregistered phys */
 #define CONFIG_ETHPRIMEeTSEC2
 
+/*
+ * In-band SGMII auto-negotiation between TBI and BCM5482S PHY fails, force
+ * 1000mbps SGMII link
+ */
+#define CONFIG_TSEC_TBICR_SETTINGS ( \
+   TBICR_PHY_RESET \
+   | TBICR_FULL_DUPLEX \
+   | TBICR_SPEED1_SET \
+   )
+
 #define CONFIG_TSEC1   1
 #define CONFIG_TSEC1_NAME  eTSEC1
 #define TSEC1_FLAGS(TSEC_GIGABIT | TSEC_REDUCED)
diff --git a/include/configs/xpedite550x.h b/include/configs/xpedite550x.h
index 42d1f69..a051913 100644
--- a/include/configs/xpedite550x.h
+++ b/include/configs/xpedite550x.h
@@ -345,6 +345,16 @@ extern unsigned long get_board_ddr_clk(unsigned long 
dummy);
 #define CONFIG_MII_DEFAULT_TSEC1   /* Allow unregistered phys */
 #define CONFIG_ETHPRIMEeTSEC2
 
+/*
+ * In-band SGMII auto-negotiation between TBI and BCM5482S PHY fails, force
+ * 1000mbps SGMII link
+ */
+#define CONFIG_TSEC_TBICR_SETTINGS ( \
+   TBICR_PHY_RESET \
+   | TBICR_FULL_DUPLEX \
+   | TBICR_SPEED1_SET \
+   )
+
 #define CONFIG_TSEC1   1
 #define CONFIG_TSEC1_NAME  eTSEC1
 #define TSEC1_FLAGS(TSEC_GIGABIT | TSEC_REDUCED)
-- 
1.7.2.3


Re: [U-Boot] [PATCH] fsl_upm: Add MxMR/MDR synchronization

2010-12-09 Thread Kumar Gala

On Dec 2, 2010, at 11:43 AM, Peter Tyser wrote:

 From: John Schmoller jschmol...@xes-inc.com
 
 According to Freescale reference manuals (eg section 13.4.4.2
 Programming the UPMs of the P4080 Reference Manual):
 
 Since the result of any update to the MxMR/MDR register must be in
 effect before the dummy read or write to the UPM region, a write to
 MxMR/MDR should be followed immediately by a read of MxMR/MDR.
 
 The UPM on a custom P4080-based board did not work without performing
 a read of MxMR/MDR after a write.
 
 Signed-off-by: John Schmoller jschmol...@xes-inc.com
 Signed-off-by: Peter Tyser pty...@xes-inc.com
 ---
 drivers/mtd/nand/fsl_upm.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

applied to 85xx

- k
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Memset 0 in heap initialization?

2010-12-09 Thread Dirk Behme

In common/dlmalloc.c in the heap initialization mem_malloc_init() [1] 
it looks like the whole heap is initialized with zero:

memset((void *)mem_malloc_start, 0, size);

What's the reason for doing this? I know that the .bss segment has to 
be zeroed at system start up, but why doing this for the heap, too? It 
was my understanding that one could make no assumption about the 
initial content of memory returned by malloc() (?).

Sorry if I miss the obvious ;)

Thanks

Dirk

[1] 
http://git.denx.de/?p=u-boot.git;a=blob;f=common/dlmalloc.c;h=e9bab09b8eac7c0ec4900a3685f15a807b448c31;hb=refs/heads/master#l1529
 

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [RFC PATCH] OMAP: Timer: Replace bss variable by gd

2010-12-09 Thread Dirk Behme
Reuse the gd-tbl value for timestamp and add gd-lastinc for lastinc bss
values in the OMAP timer driver.

The usage of bss values in drivers before initialisation of bss is forbidden.
In that special case some data in .rel.dyn gets corrupted.

Signed-off-by: Dirk Behme dirk.be...@gmail.com

---

Note: This is compile tested only (therefore the RFC). Please *test*
  on real OMAP HW, e.g. Beagle.

This is change is inspired by

http://git.denx.de/u-boot.git/?p=u-boot.git;a=commitdiff;h=a429db7e3ce6136f80f22584588247926ba60b05

 arch/arm/cpu/armv7/omap-common/timer.c |   22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

Index: u-boot.git/arch/arm/cpu/armv7/omap-common/timer.c
===
--- u-boot.git.orig/arch/arm/cpu/armv7/omap-common/timer.c
+++ u-boot.git/arch/arm/cpu/armv7/omap-common/timer.c
@@ -35,8 +35,8 @@
 #include common.h
 #include asm/io.h
 
-static ulong timestamp;
-static ulong lastinc;
+DECLARE_GLOBAL_DATA_PTR;
+
 static struct gptimer *timer_base = (struct gptimer *)CONFIG_SYS_TIMERBASE;
 
 /*
@@ -74,7 +74,7 @@ ulong get_timer(ulong base)
 
 void set_timer(ulong t)
 {
-   timestamp = t;
+   gd-tbl = t;
 }
 
 /* delay x useconds */
@@ -96,8 +96,8 @@ void __udelay(unsigned long usec)
 void reset_timer_masked(void)
 {
/* reset time, capture current incrementer value time */
-   lastinc = readl(timer_base-tcrr) / (TIMER_CLOCK / CONFIG_SYS_HZ);
-   timestamp = 0;  /* start advancing time stamp from 0 */
+   gd-lastinc = readl(timer_base-tcrr) / (TIMER_CLOCK / CONFIG_SYS_HZ);
+   gd-tbl = 0;/* start advancing time stamp from 0 */
 }
 
 ulong get_timer_masked(void)
@@ -105,14 +105,14 @@ ulong get_timer_masked(void)
/* current tick value */
ulong now = readl(timer_base-tcrr) / (TIMER_CLOCK / CONFIG_SYS_HZ);
 
-   if (now = lastinc) /* normal mode (non roll) */
+   if (now = gd-lastinc) /* normal mode (non roll) */
/* move stamp fordward with absoulte diff ticks */
-   timestamp += (now - lastinc);
+   gd-tbl += (now - gd-lastinc);
else/* we have rollover of incrementer */
-   timestamp += ((TIMER_LOAD_VAL / (TIMER_CLOCK / CONFIG_SYS_HZ))
-   - lastinc) + now;
-   lastinc = now;
-   return timestamp;
+   gd-tbl += ((TIMER_LOAD_VAL / (TIMER_CLOCK / CONFIG_SYS_HZ))
+- gd-lastinc) + now;
+   gd-lastinc = now;
+   return gd-tbl;
 }
 
 /*
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] OMAP: Hang after memory init

2010-12-09 Thread Dirk Behme
On 04.12.2010 11:48, Albert ARIBAUD wrote:
 Le 04/12/2010 10:33, Dirk Behme a écrit :

 Also make sure that the r8 register is not trashed by the relocation
 code in the start.S used for this board. See Andreas' patch for that.

 Thanks for the hint! Most probably you mean

 http://lists.denx.de/pipermail/u-boot/2010-December/082807.html

 ?

 Yes.

 This does mean that for Beagle we need at least

 http://lists.denx.de/pipermail/u-boot/2010-December/082806.html
 http://lists.denx.de/pipermail/u-boot/2010-December/082805.html
 http://lists.denx.de/pipermail/u-boot/2010-December/082807.html
 http://lists.denx.de/pipermail/u-boot/2010-December/082808.html
 http://lists.denx.de/pipermail/u-boot/2010-December/082834.html

 Yes - note that ...806 and ...805 are useful but not required to get
 the board working, IIUC.

After all above patches are in mainline now ...

 plus something like

 http://lists.denx.de/pipermail/u-boot/2010-December/082965.html

 for OMAP (still to be written)?

... does anybody like to test

http://lists.denx.de/pipermail/u-boot/2010-December/083449.html

on top of recent U-Boot master? Does this fix the OMAP hang?

Thanks

Dirk
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [u-boot-atmel] Undefined Symbols with AT91RM9200DK_CONFIG

2010-12-09 Thread James Kosin
With the latest from the u-boot-atmel area, the symbols below don't seem
to be defined.

Thanks,
James

--- error
arm-eabi-gcc  -g  -Os   -fno-common -ffixed-r8 -msoft-float 
-D__KERNEL__ -DCONF
IG_SYS_TEXT_BASE=0x21f0 -I/home/jkosin/git/u-boot-atmel/include
-fno-builtin
 -ffreestanding -nostdinc -isystem
/home/jkosin/opt/armThumb-4.5.0/lib/gcc/arm-e
abi/4.5.1/include -pipe  -DCONFIG_ARM -D__ARM__ -marm  -mabi=aapcs-linux
-mno-th
umb-interwork -march=armv4 -Wall -Wstrict-prototypes
-fno-stack-protector   \
-o board.o board.c -c
board.c: In function `__dram_init_banksize':
board.c:233:29: error: `CONFIG_SYS_SDRAM_BASE' undeclared (first use in
this fun
ction)
board.c:233:29: note: each undeclared identifier is reported only once
for each
function it appears in
board.c: In function `board_init_f':
board.c:279:17: error: `CONFIG_SYS_INIT_SP_ADDR' undeclared (first use
in this f
unction)
board.c:312:9: error: `CONFIG_SYS_SDRAM_BASE' undeclared (first use in
this func
tion)
make[1]: *** [board.o] Error 1
make[1]: Leaving directory `/home/jkosin/git/u-boot-atmel/arch/arm/lib'
make: *** [arch/arm/lib/libarm.o] Error 2
--- end

-- 
James Kosin
Senior Software Engineer

International Communications Group, Inc.
230 Pickett's Line
Newport News, Virginia  23603

Phone: +1 (757) 947-1030 x 122
Fax:   +1 (757) 947-1035

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [u-boot-atmel] Undefined Symbols with AT91RM9200DK_CONFIG

2010-12-09 Thread Andreas Bießmann
Dear James Kosin,

Am 09.12.2010 17:49, schrieb James Kosin:
 With the latest from the u-boot-atmel area, the symbols below don't seem
 to be defined.

at91rm9200dk is orphaned. We had a lot of changes for arm devices and a
lot of them do not work now. Please see git history what I did for
at91rm9200ek to get at91rm9200dk working.

Maybe ask Rick Bronson to to take over that board cause he did not
provide patches for that board til now.

When you compare the changes to at91rm9200ek to your board you may get
it working very fast.

Remove of at91rm9200 boards which do _not_ use at91 will be removed
soon. That was announced some time ago, but there is no real dead line
for that. I think it would be a good idea to remove at91rm9200 boards
when we remove other unsupported arm boards which will be done some day
in 2011.

regards

Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCHv3] pca953x: support 16-pin devices

2010-12-09 Thread Peter Tyser
On Thu, 2010-12-09 at 22:11 +1300, Chris Packham wrote:
 This adds support for for the PCA9535/PCA9539 family of gpio devices which
 have 16 output pins.
 
 To let the driver know which devices are 16-pin it is necessary to define
 CONFIG_SYS_I2C_PCA953X_WIDTH in your board config file. This is used to
 create an array of {chip, ngpio} tuples that are used to determine the
 width of a particular chip. For backwards compatibility it is assumed that
 any chip not defined in CONFIG_SYS_I2C_PCA953X_WIDTH has 8 pins.
 
 Signed-off-by: Chris Packham chris.pack...@alliedtelesis.co.nz

Looks good to me and works as advertised.

Acked-by: Peter Tyser pty...@xes-inc.com
Tested-by: Peter Tyser pty...@xes-inc.com

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [u-boot-atmel] Undefined Symbols with AT91RM9200DK_CONFIG

2010-12-09 Thread James Kosin
On 12/9/2010 12:08 PM, Andreas Bießmann wrote:
 Dear James Kosin,

 Am 09.12.2010 17:49, schrieb James Kosin:
 With the latest from the u-boot-atmel area, the symbols below don't seem
 to be defined.
 at91rm9200dk is orphaned. We had a lot of changes for arm devices and a
 lot of them do not work now. Please see git history what I did for
 at91rm9200ek to get at91rm9200dk working.

 Maybe ask Rick Bronson to to take over that board cause he did not
 provide patches for that board til now.

 When you compare the changes to at91rm9200ek to your board you may get
 it working very fast.

 Remove of at91rm9200 boards which do _not_ use at91 will be removed
 soon. That was announced some time ago, but there is no real dead line
 for that. I think it would be a good idea to remove at91rm9200 boards
 when we remove other unsupported arm boards which will be done some day
 in 2011.

 regards

 Andreas Bießmann

Thanks for the details.

James Kosin
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] PowerPC: Add relocation support for -fpic

2010-12-09 Thread Joakim Tjernlund

 By rearranging the linker script we get support for
 relocation of -fpic for free.

 Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se

Ping?

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] PowerPC, nand_spl: Add relocation support for -fpic

2010-12-09 Thread Joakim Tjernlund

 By rearranging the linker script we get support for
 relocation of -fpic for free.
 Move __got2_entries outside _GOT2_TABLE_ defining scope
 matching the rest of PowerPC

 Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se

Ping?

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] usb reset issue with some pen drives which work well in Linux/Windows

2010-12-09 Thread Remy Bohmer
Hi,

2010/11/29 Debashish Rath debashish.r...@tridentmicro.com:
 Dear Mr. Wolfgang,
 Please find the patch for the same. This is ok or I have to prepare  a 
 different mail and send the patch as an attachment.

No, please not post it as attachment.

 Regards
 Debashish Rath


 --PATCH START--

Missing proper patch description.
Missing Signed-off-by.

Please fix.

As Wolfgang already suggested, please see
http://www.denx.de/wiki/U-Boot/Patches for how to post patches.

Kind regards,

Remy
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH][NEXT] hwmon: do not init sensors on startup

2010-12-09 Thread Wolfgang Denk
Dear Heiko Schocher,

In message 4d00f98b.1010...@denx.de you wrote:
 
  +static unsigned long sensors_init_done = 0;
  
  What if there are more then 32 sensors?
 
 Ok, that would not work ... Hmm.. I can get the number of DTTs on a board
 with ARRAY_SIZE(CONFIG_DTT_SENSORS) ... should I use this info to allocate
 an array, which stores the info, if the DTTs are initialized?

No - it's only a theoretical case. But I think you should add a
compile-time test to catch such errors.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
... bacteriological warfare ... hard to believe we were once foolish
enough to play around with that.
-- McCoy, The Omega Glory, stardate unknown
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] PowerPC, nand_spl: Add relocation support for -fpic

2010-12-09 Thread Scott Wood
On Fri, 3 Dec 2010 10:30:38 -0600
Joakim Tjernlund joakim.tjernl...@transmode.se wrote:

 By rearranging the linker script we get support for
 relocation of -fpic for free.
 Move __got2_entries outside _GOT2_TABLE_ defining scope
 matching the rest of PowerPC
 
 Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se
 ---
  nand_spl/board/freescale/mpc8313erdb/u-boot.lds |4 +++-
  nand_spl/board/freescale/mpc8315erdb/u-boot.lds |4 +++-
  nand_spl/board/sheldon/simpc8313/u-boot.lds |4 +++-
  3 files changed, 9 insertions(+), 3 deletions(-)
 


Were you able to boot test it on at least one of the boards?

If so:
Acked-by: Scott Wood scottw...@freescale.com
if Kim wants to take both of them.

If not, is there anything special I need to test it (specific
toolchain?) besides these two patches?

-Scott

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] usb_ether: register usb ethernet gadget at each eth init

2010-12-09 Thread Remy Bohmer
Hi,

2010/12/1 Lei Wen lei...@marvell.com:
 Since the ether may not be the only one usb gadget would be used
 in the uboot, it is neccessary to do the register each time the
 eth begin to work to make usb gadget driver less confussed when
 we want to use two different usb gadget at the same time.

 Usb gadget driver could simple ignore the register operation, if
 it find the driver has been registered already.

 Signed-off-by: Lei Wen lei...@marvell.com
 ---
 V1: delete the usb_gadget_register_driver in usb_eth_initialize,
    and judge whether gadget is registered at eth_halt.

  drivers/usb/gadget/ether.c |   12 
  1 files changed, 8 insertions(+), 4 deletions(-)


Applied to u-boot-usb.
Thanks.

Remy
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [GIT PULL] Pull request: u-boot-imx

2010-12-09 Thread Wolfgang Denk
Dear stefano babic,

In message 4d00a9dd.5030...@denx.de you wrote:
 
 I sent on 24/11 a pull request, but I can't find it in the ML archive
 and you have not yet merged, so it seems it was lost. I resubmit it as
 it is. Drop this mail if you have already seen it.

Sorry, seems I really missed that.

 The following changes since commit 8ad25bf8d9233eb7d0b614612108622a59069354:
 
   Net: clarify board/cpu_eth_init calls (2010-11-15 00:01:15 +0100)
 
 are available in the git repository at:
   git://www.denx.de/git/u-boot-imx.git master
 
 Jason Liu (1):
   mx51evk: savenv or env save command does not work
 
 Liu Hui-R64343 (1):
   imx: Get fec mac address from fuse
 
  arch/arm/cpu/arm926ejs/mx25/generic.c |   12 ++
  arch/arm/cpu/arm926ejs/mx27/generic.c |   12 ++
  arch/arm/cpu/armv7/mx5/soc.c  |   14 
  arch/arm/include/asm/arch-mx25/imx-regs.h |   19 +--
  arch/arm/include/asm/arch-mx27/imx-regs.h |   20 +++--
  arch/arm/include/asm/arch-mx5/imx-regs.h  |   34
 +
  drivers/net/fec_mxc.c |   17 +
  include/configs/mx51evk.h |7 +++--
  8 files changed, 102 insertions(+), 33 deletions(-)

Apllied (directly to master).  Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The IQ of the group is the lowest IQ of a member of the group divided
by the number of people in the group.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] PowerPC, nand_spl: Add relocation support for -fpic

2010-12-09 Thread Joakim Tjernlund


 On Fri, 3 Dec 2010 10:30:38 -0600
 Joakim Tjernlund joakim.tjernl...@transmode.se wrote:

  By rearranging the linker script we get support for
  relocation of -fpic for free.
  Move __got2_entries outside _GOT2_TABLE_ defining scope
  matching the rest of PowerPC
 
  Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se
  ---
   nand_spl/board/freescale/mpc8313erdb/u-boot.lds |4 +++-
   nand_spl/board/freescale/mpc8315erdb/u-boot.lds |4 +++-
   nand_spl/board/sheldon/simpc8313/u-boot.lds |4 +++-
   3 files changed, 9 insertions(+), 3 deletions(-)
 


 Were you able to boot test it on at least one of the boards?

nope, I don't have any of them. Just my own 8321 board.


 If so:
 Acked-by: Scott Wood scottw...@freescale.com
 if Kim wants to take both of them.

 If not, is there anything special I need to test it (specific
 toolchain?) besides these two patches?

No, not yet. The real benefit comes in later patches. Just
makes sure it works as before.

 Jocke

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] PowerPC, nand_spl: Add relocation support for -fpic

2010-12-09 Thread Joakim Tjernlund


 
  On Fri, 3 Dec 2010 10:30:38 -0600
  Joakim Tjernlund joakim.tjernl...@transmode.se wrote:
 
   By rearranging the linker script we get support for
   relocation of -fpic for free.
   Move __got2_entries outside _GOT2_TABLE_ defining scope
   matching the rest of PowerPC
  
   Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se
   ---
nand_spl/board/freescale/mpc8313erdb/u-boot.lds |4 +++-
nand_spl/board/freescale/mpc8315erdb/u-boot.lds |4 +++-
nand_spl/board/sheldon/simpc8313/u-boot.lds |4 +++-
3 files changed, 9 insertions(+), 3 deletions(-)
  
 
 
  Were you able to boot test it on at least one of the boards?

 nope, I don't have any of them. Just my own 8321 board.

 
  If so:
  Acked-by: Scott Wood scottw...@freescale.com
  if Kim wants to take both of them.
 
  If not, is there anything special I need to test it (specific
  toolchain?) besides these two patches?

 No, not yet. The real benefit comes in later patches. Just
 makes sure it works as before.

Well, one thing should work now. nand_spl does not use fixups
so you should be able to remove -mrelocatable and just use -fpic.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] RE

2010-12-09 Thread M Benz


Your Email Id Won £950,000.00 In Mercedes Benz Xmas Promo. For Claims Send

Name.

Address..

Tel...___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC PATCH] OMAP: Timer: Replace bss variable by gd

2010-12-09 Thread John Rigby
On Thu, Dec 9, 2010 at 9:31 AM, Dirk Behme dirk.be...@googlemail.com wrote:
 Reuse the gd-tbl value for timestamp and add gd-lastinc for lastinc bss
 values in the OMAP timer driver.

 The usage of bss values in drivers before initialisation of bss is forbidden.
 In that special case some data in .rel.dyn gets corrupted.

 Signed-off-by: Dirk Behme dirk.be...@gmail.com

Works for me on Beagle xM Rev A

Tested-by: John Rigby john.ri...@linaro.org
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC PATCH] OMAP: Timer: Replace bss variable by gd

2010-12-09 Thread Nishanth Menon
On Thu, Dec 9, 2010 at 10:31 AM, Dirk Behme dirk.be...@googlemail.com wrote:
 Reuse the gd-tbl value for timestamp and add gd-lastinc for lastinc bss
 values in the OMAP timer driver.

 The usage of bss values in drivers before initialisation of bss is forbidden.
 In that special case some data in .rel.dyn gets corrupted.

 Signed-off-by: Dirk Behme dirk.be...@gmail.com

 ---

 Note: This is compile tested only (therefore the RFC). Please *test*
      on real OMAP HW, e.g. Beagle.

 This is change is inspired by

 http://git.denx.de/u-boot.git/?p=u-boot.git;a=commitdiff;h=a429db7e3ce6136f80f22584588247926ba60b05

  arch/arm/cpu/armv7/omap-common/timer.c |   22 +++---
  1 file changed, 11 insertions(+), 11 deletions(-)

 Index: u-boot.git/arch/arm/cpu/armv7/omap-common/timer.c
 ===
 --- u-boot.git.orig/arch/arm/cpu/armv7/omap-common/timer.c
 +++ u-boot.git/arch/arm/cpu/armv7/omap-common/timer.c
 @@ -35,8 +35,8 @@
  #include common.h
  #include asm/io.h

 -static ulong timestamp;
 -static ulong lastinc;
 +DECLARE_GLOBAL_DATA_PTR;
 +
  static struct gptimer *timer_base = (struct gptimer *)CONFIG_SYS_TIMERBASE;


[...]

Tested-by: Nishanth Menon n...@ti.com
Acked-by: Nishanth Menon n...@ti.com

Tested on OMAP4 pandaboard with codesourcery 2010.09 gcc 4.5.1 and is
seen to fix the issue I reported on
http://groups.google.com/group/pandaboard/browse_thread/thread/d59461353a5e693f

Tests:
on u-boot prompt:
sleep 5 (test if time delays are still functional) - Pass
mmc boot to MeeGo filesystem - Pass

Thanks a bunch Dirk - just had started to debug this and steve pointed this out.


Regards,
Nishanth Menon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] Fix to make U-Boot work with more USB sticks

2010-12-09 Thread Simon Glass
I am sending this to the list looking for comments. Testing has been
confined to just a few USB sticks - no USB hard drives, USB card
readers, etc. But there are reports on the mailing list of problems
with U-Boot's detection of USB mass storage devices.



We have had a lot of problems with different USB sticks, specifically
the faster bulk storage devices. Two of these sticks have
a problem where they do not respond to a USB descriptor submission
within the allowed U-Boot timeout. This seems to only happen when a
REQUEST SENSE is submitted immediately after a TEST UNIT READY fails.

There is also some oddness with reset, where some devices need more
than one reset. This appears to be due to faulty reset code in U-Boot.

USB sticks where this this problem has been noticed are:

ID 13fe:3800 Kingston Technology Company Inc.
ID 0930:6545 Toshiba Corp. Kingston DataTraveler 2.0 Stick (4GB)
/ PNY Attache 4GB Stick

This problem has been reproduced on the Tegra 20 Seaboard, but it is
TBD whether it happens on other ARM platforms with HS USB also.

This patch:

1. Increases the USB descriptor submission timeout to 3 seconds since the
original 1 second timeout seems arbitrary

2. Replaces the delay-based reset logic with logic which waits until it
sees the reset is successful, rather than blindly continuing

3. Resets and retries a USB mass storage device after it fails once, in
case even 3 seconds is not enough

BUG=chromiumos-6780
TEST=tried with four different USB sticks, including two which previously
failed
Change-Id: I5bd8891bff67a74b758e349f2a3b3575806eed59

Signed-off-by: Simon Glass s...@chromium.org
---
 common/usb.c|  176 ---
 common/usb_storage.c|   55 +++---
 drivers/usb/host/ehci-hcd.c |   20 -
 include/usb.h   |   11 +++
 4 files changed, 217 insertions(+), 45 deletions(-)

diff --git a/common/usb.c b/common/usb.c
index 9896f46..3265d5d 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -222,10 +222,14 @@ int usb_control_msg(struct usb_device *dev, unsigned int 
pipe,
 int usb_bulk_msg(struct usb_device *dev, unsigned int pipe,
void *data, int len, int *actual_length, int timeout)
 {
+   int err;
+
if (len  0)
return -1;
dev-status = USB_ST_NOT_PROC; /*not yet processed */
-   submit_bulk_msg(dev, pipe, data, len);
+   err = submit_bulk_msg(dev, pipe, data, len);
+   if (err  0)
+   return err;
while (timeout--) {
if (!((volatile unsigned long)dev-status  USB_ST_NOT_PROC))
break;
@@ -758,6 +762,39 @@ struct usb_device *usb_alloc_new_device(void)
return usb_dev[dev_index - 1];
 }

+/* find a device's parent hub, and reset this device's port on that hub */
+
+int usb_reset_device_on_hub(struct usb_device *dev)
+{
+   struct usb_device *parent = dev-parent;
+   unsigned short portstatus;
+   int port = -1;
+   int err;
+
+   /* find the port number we're at */
+   if (parent) {
+   int j;
+
+   for (j = 0; j  parent-maxchild; j++) {
+   if (parent-children[j] == dev) {
+   port = j;
+   break;
+   }
+   }
+   if (port  0) {
+   printf(usb_new_device:cannot locate device's port.\n);
+   return 1;
+   }
+
+   err = hub_port_reset(dev-parent, port, portstatus);
+   if (err  0) {
+   printf(\n Couldn't reset port %i\n, port);
+   return 1;
+   }
+   }
+   return 0;
+}
+
 /*
  * Free the newly created device node.
  * Called in error cases where configuring a newly attached
@@ -941,6 +978,14 @@ int usb_new_device(struct usb_device *dev)
return 0;
 }

+/* reset and restart a device that is misbehaving */
+
+int usb_restart_device(struct usb_device *dev)
+{
+   usb_reset_device_on_hub(dev);  /* ignore return value */
+   return usb_new_device(dev);
+}
+
 /* build device Tree  */
 void usb_scan_devices(void)
 {
@@ -1069,45 +1114,123 @@ static inline char *portspeed(int portstatus)
return 12 Mb/s;
 }

-static int hub_port_reset(struct usb_device *dev, int port,
-   unsigned short *portstat)
+/* brought this in from kernel 2.6.36 as it is a problem area. Some USB
+sticks do not operate properly with the previous reset code */
+#define PORT_RESET_TRIES   5
+#define SET_ADDRESS_TRIES  2
+#define GET_DESCRIPTOR_TRIES   2
+#define SET_CONFIG_TRIES   (2 * (use_both_schemes + 1))
+#define USE_NEW_SCHEME(i)  ((i) / 2 == old_scheme_first)
+
+#define HUB_ROOT_RESET_TIME50  /* times are in msec */
+#define HUB_SHORT_RESET_TIME   10
+#define HUB_LONG_RESET_TIME200
+#define HUB_RESET_TIMEOUT  500
+

[U-Boot] Loan Offer at 3%

2010-12-09 Thread leticia-rivas


Loan Offer at 3% Low Interest Rate Contact Us Now Name: loan Amount:Phone 
Number.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Help required for scanf function in Uboot

2010-12-09 Thread saurabh narang
Hi

I am not able to implement scanf function in standalone application in Uboot
OR implement scanf in POST

Please help in this regard

Saurabh Kumar narang
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC PATCH] OMAP: Timer: Replace bss variable by gd

2010-12-09 Thread Dirk Behme
On 09.12.2010 17:31, Dirk Behme wrote:
 Reuse the gd-tbl value for timestamp and add gd-lastinc for lastinc bss
 values in the OMAP timer driver.

 The usage of bss values in drivers before initialisation of bss is forbidden.
 In that special case some data in .rel.dyn gets corrupted.

 Signed-off-by: Dirk Behmedirk.be...@gmail.com

Tested-by: John Rigby john.ri...@linaro.org
Tested-by: Nishanth Menon n...@ti.com
Acked-by: Nishanth Menon n...@ti.com

 Note: This is compile tested only (therefore the RFC). Please *test*
on real OMAP HW, e.g. Beagle.

To the custodian who has to apply this: Regarding the RFC in the 
subject: Now that this patch is confirmed to work, will you apply this 
patch as is? Or do I have to resend it without 'RFC'?

Many tanks for testing!

Dirk

 This is change is inspired by

 http://git.denx.de/u-boot.git/?p=u-boot.git;a=commitdiff;h=a429db7e3ce6136f80f22584588247926ba60b05

   arch/arm/cpu/armv7/omap-common/timer.c |   22 +++---
   1 file changed, 11 insertions(+), 11 deletions(-)

 Index: u-boot.git/arch/arm/cpu/armv7/omap-common/timer.c
 ===
 --- u-boot.git.orig/arch/arm/cpu/armv7/omap-common/timer.c
 +++ u-boot.git/arch/arm/cpu/armv7/omap-common/timer.c
 @@ -35,8 +35,8 @@
   #includecommon.h
   #includeasm/io.h

 -static ulong timestamp;
 -static ulong lastinc;
 +DECLARE_GLOBAL_DATA_PTR;
 +
   static struct gptimer *timer_base = (struct gptimer *)CONFIG_SYS_TIMERBASE;

   /*
 @@ -74,7 +74,7 @@ ulong get_timer(ulong base)

   void set_timer(ulong t)
   {
 - timestamp = t;
 + gd-tbl = t;
   }

   /* delay x useconds */
 @@ -96,8 +96,8 @@ void __udelay(unsigned long usec)
   void reset_timer_masked(void)
   {
   /* reset time, capture current incrementer value time */
 - lastinc = readl(timer_base-tcrr) / (TIMER_CLOCK / CONFIG_SYS_HZ);
 - timestamp = 0;  /* start advancing time stamp from 0 */
 + gd-lastinc = readl(timer_base-tcrr) / (TIMER_CLOCK / CONFIG_SYS_HZ);
 + gd-tbl = 0;/* start advancing time stamp from 0 */
   }

   ulong get_timer_masked(void)
 @@ -105,14 +105,14 @@ ulong get_timer_masked(void)
   /* current tick value */
   ulong now = readl(timer_base-tcrr) / (TIMER_CLOCK / CONFIG_SYS_HZ);

 - if (now= lastinc)  /* normal mode (non roll) */
 + if (now= gd-lastinc)  /* normal mode (non roll) */
   /* move stamp fordward with absoulte diff ticks */
 - timestamp += (now - lastinc);
 + gd-tbl += (now - gd-lastinc);
   else/* we have rollover of incrementer */
 - timestamp += ((TIMER_LOAD_VAL / (TIMER_CLOCK / CONFIG_SYS_HZ))
 - - lastinc) + now;
 - lastinc = now;
 - return timestamp;
 + gd-tbl += ((TIMER_LOAD_VAL / (TIMER_CLOCK / CONFIG_SYS_HZ))
 +  - gd-lastinc) + now;
 + gd-lastinc = now;
 + return gd-tbl;
   }

   /*


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC PATCH] OMAP: Timer: Replace bss variable by gd

2010-12-09 Thread Heiko Schocher
Hello Dirk,

Dirk Behme wrote:
 Reuse the gd-tbl value for timestamp and add gd-lastinc for lastinc bss
 values in the OMAP timer driver.
 
 The usage of bss values in drivers before initialisation of bss is forbidden.
 In that special case some data in .rel.dyn gets corrupted.
 
 Signed-off-by: Dirk Behme dirk.be...@gmail.com
 
 ---
 
 Note: This is compile tested only (therefore the RFC). Please *test*
   on real OMAP HW, e.g. Beagle.

Works for me on:

U-Boot 2010.12-rc2-00245-g13e984c (Dec 10 2010 - 08:28:22)
OMAP3530-GP ES3.0, CPU-OPP2, L3-165MHz, Max CPU Clock 600 mHz
OMAP3 Beagle board + LPDDR/NAND

Thanks!

Tested-by: Heiko Schocherh...@denx.de

But mmc does not longer work on my beagle board... searching for it

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Help required for scanf function in Uboot

2010-12-09 Thread Albert ARIBAUD
Le 10/12/2010 05:32, saurabh narang a écrit :
 Hi

 I am not able to implement scanf function in standalone application in Uboot
 OR implement scanf in POST

 Please help in this regard

 Saurabh Kumar narang

Hum... Implementing a function you need should be your own lookout.

However, if you have issues with an existing function (e.g. it does not 
behave as you think it should), then please indicate:

- which board you are trying this on,

- which commit or label or branch you are building,

- what your issue is in detail (build error message or console trace or 
description of the intended and actuall behavior).

If any additional patches or source code is needed, please provide them 
too, at least extracts sufficient to reproduce your issue.

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC PATCH] OMAP: Timer: Replace bss variable by gd

2010-12-09 Thread Heiko Schocher
Hello Dirk,

Heiko Schocher wrote:
 Dirk Behme wrote:
 Reuse the gd-tbl value for timestamp and add gd-lastinc for lastinc bss
 values in the OMAP timer driver.

 The usage of bss values in drivers before initialisation of bss is forbidden.
 In that special case some data in .rel.dyn gets corrupted.

 Signed-off-by: Dirk Behme dirk.be...@gmail.com

 ---

 Note: This is compile tested only (therefore the RFC). Please *test*
   on real OMAP HW, e.g. Beagle.
 
 Works for me on:
 
 U-Boot 2010.12-rc2-00245-g13e984c (Dec 10 2010 - 08:28:22)
 OMAP3530-GP ES3.0, CPU-OPP2, L3-165MHz, Max CPU Clock 600 mHz
 OMAP3 Beagle board + LPDDR/NAND
 
 Thanks!
 
 Tested-by: Heiko Schocherh...@denx.de
 
 But mmc does not longer work on my beagle board... searching for it

User error, mmc works fine, sorry for the noise.

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC PATCH] OMAP: Timer: Replace bss variable by gd

2010-12-09 Thread Wolfgang Denk
Dear Dirk Behme,

In message 4d01b92e.8050...@googlemail.com you wrote:

  Note: This is compile tested only (therefore the RFC). Please *test*
 on real OMAP HW, e.g. Beagle.
 
 To the custodian who has to apply this: Regarding the RFC in the 
 subject: Now that this patch is confirmed to work, will you apply this 
 patch as is? Or do I have to resend it without 'RFC'?

If Sandeep agrees, I wil pull this directly, as this fixes a real
problem for many of us.

Thanks!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The moral of the story is: Don't stop to  tighten  your  shoe  laces
during the Olympics 100m finals.
 - Kevin Jones in dejo68@bri.hp.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot