Re: [U-Boot] [PATCH v2 00/19] updates for keymile arm boards

2012-03-28 Thread Prafulla Wadaskar


> -Original Message-
> From: Valentin Longchamp [mailto:valentin.longch...@keymile.com]
> Sent: 27 March 2012 19:02
> To: Prafulla Wadaskar
> Cc: u-boot@lists.denx.de
> Subject: Re: [PATCH v2 00/19] updates for keymile arm boards
> 
> Prafulla,
> 
> On 03/26/2012 01:34 PM, Valentin Longchamp wrote:
> > This patch series updates keymile boards with Kirkwood CPU and adds
> > two new boards. This new boards are kmnusa and kmcoge5un. Also the
> > existing boards with own config files were migrated to the common
> > header km_kirkwood.h. Some small adaption in generic kirkwood code
> > was needed due to two new features on the new board. First one is
> > that the u-boot environment is in the SPI NOR flash and the second
> one
> > is the direct MAC/MAC connection from the mvgbe interface to an
> > simple switch.
> >
> > Changes for v2:
> > - removed the two patches "spi/kirkwood: add weak functions
> > board_spi_bus_claim/release" and "mvgbe: remove warning for
> > unused methods" from the series as they are were independent from
> > it. The series is however dependent of these two patches.
> >
> > Holger Brunck (13):
> >   arm/km: add board type to boards.cfg
> >   arm/km: add piggy mac adress offset for mgcoge3un
> >   arm/km: rename CONFIG option CONFIG_KM_DEF_ENV_UPDATE
> >   arm/km: use ARRAY_SIZE macro
> >   arm/km: fix wrong comment in SDRAM config for mgcoge3un
> >   arm/km: change maintainer for mgcoge3un
> >   arm/km: remove CONFIG_RESET_PHY_R
> >   km/arm: remove spi toggle command
> >   arm/km: add kmnusa board support
> >   arm/km: add kmcoge5un board support
> >   arm/km: convert mgcoge3un target to km_kirkwood
> >   arm/km: remove portl2.h and use km_kirkwood instead
> >   arm/km: cleanup km_kirkwood boards
> >
> > Valentin Longchamp (6):
> >   arm/km: enable mii cmd
> >   arm/km: use correct kw_gpio function for NAND/SPI switching
> >   arm/km: implement weak function board_spi_clam_bus/release
> >   arm/kirkwood: protect the ENV_SPI #defines
> >   arm/km: correct init of 88e6352 switch in the reset_phy function
> >   arm/km: enable BOCO2 FPGA download support
> >
> >  MAINTAINERS |4 +-
> >  arch/arm/include/asm/arch-kirkwood/config.h |   12 +-
> >  board/keymile/common/common.h   |   12 +
> >  board/keymile/km_arm/128M16-1.cfg   |  290
> ++
> >  board/keymile/km_arm/256M8-1.cfg|  292
> +++
> >  board/keymile/km_arm/Makefile   |8 +
> >  board/keymile/km_arm/fpga_config.c  |  212
> +++
> >  board/keymile/km_arm/km_arm.c   |  119 +++-
> >  board/keymile/km_arm/kwbimage-memphis.cfg   |2 +-
> >  board/keymile/km_arm/managed_switch.c   |  166 +++
> >  boards.cfg  |   10 +-
> >  include/configs/km/km_arm.h |   60 --
> >  include/configs/km_kirkwood.h   |  157 +--
> >  include/configs/mgcoge3un.h |   86 
> >  include/configs/portl2.h|   85 
> >  15 files changed, 1256 insertions(+), 259 deletions(-)
> >  create mode 100644 board/keymile/km_arm/128M16-1.cfg
> >  create mode 100644 board/keymile/km_arm/256M8-1.cfg
> >  create mode 100644 board/keymile/km_arm/fpga_config.c
> >  create mode 100644 board/keymile/km_arm/managed_switch.c
> >  delete mode 100644 include/configs/mgcoge3un.h
> >  delete mode 100644 include/configs/portl2.h
> >
> 
> We would love to get a feedback from you about this series. The merge
> window for
> 2012.06 is soon over and we would like to see these in the marvell
> tree before
> your pull request for this merge window (I guess you have a pull
> request planned
> for the current merge window ?)

Since you have posted patched within/before merge window closure, those are 
eligible to go on master branch.
So don't worry, I will review them.

Regards..
Prafulla . . .
 
> 
> Best Regards
> 
> --
> Valentin Longchamp
> Embedded Software Engineer
> Hardware and Chip Integration
> __
> KEYMILE AG
> Schwarzenburgstr. 73
> CH-3097 Liebefeld
> Phone +41 31 377 1318
> Fax   +41 31 377 1212
> valentin.longch...@keymile.com
> www.keymile.com
> __
> KEYMILE: A Specialist as a Partner
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] net: ll_temac: Add LL TEMAC driver to u-boot

2012-03-28 Thread Michal Simek

Hi Joe,


Stephan Linz wrote:

Xilinx LocalLink Tri-Mode Ether MAC driver can be
used by Xilinx Microblaze or Xilinx ppc405/440 in
SDMA and FIFO mode. DCR or XPS bus can be used.

Joe, Wolfgang: I don't agree with this driver because it is doing the same
things as my origin
version but on 800 lines instead of 1860lines. The next thing is that plb
bus on Xilinx fpgas
is getting obsolete.


Are you meaning that you already have a driver in u-boot that works on
this hardware or do you mean the original version somewhere else, like
Linux?


There is really long history about this u-boot driver. The origin version for 
ppc was sent to mailing list
April 26, 2008 by Yoshio Kashiwagi. I have tried to add it to mainline several 
times
and my latest attempts end with result that I didn't want to follow u-boot 
coding style because
of ppc/microblaze differences (not using offset with structure because of 
ppc/microblaze differences - dcr/plb access).
That driver has 800 lines.
Based on this strict rule I decided not to continue to push this driver to 
mainline
because it is just a lot of work to change it and especially test it. My origin 
driver is used by many our customers
on microblaze and ppc and none reported any problem with it.

After this Stephan decided to change it to be acceptable to mainline submission.



As for plb being near obsolescence, are you recommending a change to
the driver to drop support for that bus option? Or do you mean for
that reason the driver itself should be omitted?


should be obsolete in a year or so and if you add it to mainline it will be 
there
but in 2013 there will be minimal number of users for it.


I am not going to add it to my microblaze custodian tree.
If you like this patch please add it to u-boot-net tree or directly to
mainline.


I was actually going to recommend that it go through the microblaze
branch if it is primarily for microblaze targets.  If you don't want
it, then I think Stephan needs to work to convince you by making
revisions.


None can convince me that 1860 code lines which fulfill all u-boot rules
is better than origin well tested 800 code lines (and commercially used)
which break one u-boot rule.
I agree with rules but none can expect that I will assist and help to add
it to mainline. I don't want to have responsibility for that.

BTW: Target is also ppc because there is DCR support.

Thanks,
Michal

--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] spi/kirkwood: add weak functions board_spi_bus_claim/release

2012-03-28 Thread Prafulla Wadaskar


> -Original Message-
> From: Valentin Longchamp [mailto:valentin.longch...@keymile.com]
> Sent: 27 March 2012 18:58
> To: Prafulla Wadaskar
> Cc: u-boot@lists.denx.de; Gerlando Falauto; Holger Brunck
> Subject: Re: [PATCH v2] spi/kirkwood: add weak functions
> board_spi_bus_claim/release
> 
> Prafulla,
> 
> On 03/26/2012 11:58 AM, Valentin Longchamp wrote:
> > Some kirkwood based boards may need to implement such function due
> to
> > some HW designs.
> 
> I see no feedback from your side on this patch. I think you should go
> through
> the marvell tree:
> 
> - the spi_claim/release_bus function are already implemented in the
> SPI subsystem
> - this patch touches only a kirkwood driver
> - there is no spi u-boot tree from what I see
> 
> Please keep me up to date about the status of this patch

Hi Valentin,
I have gone through this patch and related implementation in your other 
patch_series.
http://lists.denx.de/pipermail/u-boot/2012-March/120716.html

Basically spi_claim_bus and spi_release_bus are not supported in current 
Kirkwood spi driver.
These are needed if someone wish to share the same interface pins with some 
other peripheral (that is your use case)

But this is not board specific whereas, it should be feature enhancement for 
Kirkwood spi driver.

You should add this support very similar to multiple CS pin selection support 
added to the Kirkwood driver, no external (board specific triggers needed)

Here are my suggestions:
1. Configure these mpps in your board specific files as NF pins.
2. Populate below logic for claim/release bus feature in Kirkwood spi driver.
2.a. When spi_claim_bus will be called, backup current mpps status and 
reconfigure these mpps for SPI in Kirkwood_spi driver.
2.b. When spi_release_bus will be called, reconfigure with backed up mfg as SPI 
pins
2.c. Add check for to avoid multiple claim for same bus

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


Re: [U-Boot] [PATCH v5] kirkwood: add support for Cloud Engines Pogoplug E02

2012-03-28 Thread Prafulla Wadaskar


> -Original Message-
> From: Dave Purdy [mailto:david.c.pu...@gmail.com]
> Sent: 28 March 2012 07:31
> To: u-boot@lists.denx.de
> Cc: Dave Purdy; Prafulla Wadaskar; albert.u.b...@aribaud.net
> Subject: [PATCH v5] kirkwood: add support for Cloud Engines Pogoplug
> E02
> 
> This patch adds support for Cloud Engines Pogoplug E02
> 
> Information regarding the CE Pogoplug E02 board can be found at:
> http://archlinuxarm.org/platforms/armv5/pogoplug-v2-pinkgray
> 
> Signed-off-by: Dave Purdy 
> Cc: prafu...@marvell.com
> Cc: albert.u.b...@aribaud.net
> ---
> Changes for v5:
>  - eliminated nonessential code in all files
>  - changed boardname to conform to "pogo_e02" which is already in
> kernel mach-type table
>  - cleaned up GNU license address/URL

Hi Wolfgang
This patch looks okay to me. Do you want to comment on GNU license address/URL 
change?

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


Re: [U-Boot] [PATCH 1/2] FSL/eSDHC: enable the peripheral clock to detect the card

2012-03-28 Thread Stefano Babic
> I.MX6/5 reuse the fsl_esdhc.c driver, and he don't care these reserved field.
> Otherwise he should change this driver. E.g:
> In function esdhc_init:
> esdhc_write32(®s->sysctl, SYSCTL_HCKEN | SYSCTL_IPGEN);
> in function set_sysctl:
> clk = SYSCTL_PEREN | SYSCTL_CKEN;
> esdhc_setbits32(®s->sysctl, clk);
> 
> so I think my code has no any problem.

ok, fine.

Best regards,
Stefano Babic

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


Re: [U-Boot] [PATCH] lzma: fix printf warnings

2012-03-28 Thread Anatolij Gustschin
Hi Mike,

On Sun,  8 Jan 2012 04:14:35 -0500
Mike Frysinger  wrote:

> Fix size_t printf format warnings:
> 
> LzmaTools.c: In function 'lzmaBuffToBuffDecompress':
> LzmaTools.c:110:5: warning: format '%x' expects type 'unsigned int',
> but argument 2 has type 'SizeT'
> LzmaTools.c:111:5: warning: format '%x' expects type 'unsigned int',
> but argument 2 has type 'SizeT'
> 
> Signed-off-by: Mike Frysinger 
> ---
>  lib/lzma/LzmaTools.c |4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Applied to u-boot-staging/ag...@denx.de, thanks.

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


[U-Boot] [PATCH] TRATS: modify the trats's configuration

2012-03-28 Thread Jaehoon Chung
Trats is supported 1GiB memory size.
(Each bank size is 512MB.)
And INITRD is unnecessary. So removed them.

Signed-off-by: Jaehoon Chung 
Signed-off-by: Kyungmin Park 
---
 include/configs/trats.h |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/include/configs/trats.h b/include/configs/trats.h
index 10f11d9..674bc71 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -53,7 +53,6 @@
 
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_CMDLINE_TAG
-#define CONFIG_INITRD_TAG
 #define CONFIG_REVISION_TAG
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_SKIP_LOWLEVEL_INIT
@@ -174,9 +173,9 @@
 /* TRATS has 2 banks of DRAM */
 #define CONFIG_NR_DRAM_BANKS   2
 #define PHYS_SDRAM_1   CONFIG_SYS_SDRAM_BASE   /* LDDDR2 DMC 0 */
-#define PHYS_SDRAM_1_SIZE  (256 << 20) /* 256 MB in CS 0 */
+#define PHYS_SDRAM_1_SIZE  (512 << 20) /* 512 MB in CS 0 */
 #define PHYS_SDRAM_2   0x5000  /* LPDDR2 DMC 1 */
-#define PHYS_SDRAM_2_SIZE  (256 << 20) /* 256 MB in CS 0 */
+#define PHYS_SDRAM_2_SIZE  (512 << 20) /* 512 MB in CS 0 */
 
 #define CONFIG_SYS_MEM_TOP_HIDE(1 << 20)   /* ram console 
*/
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/3] misc:pmic: Support for voltage to register value conversion function

2012-03-28 Thread Lukasz Majewski
Support for voltage (in uV) to proper register value is added.
The function tied to this callback is often PMIC dependent
and shall be defined for each device.

Signed-off-by: Lukasz Majewski 
Signed-off-by: Kyungmin Park 
Cc: Stefano Babic 
---
 drivers/misc/pmic_core.c |   10 ++
 include/pmic.h   |2 ++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/misc/pmic_core.c b/drivers/misc/pmic_core.c
index 5d62a56..4366bf0 100644
--- a/drivers/misc/pmic_core.c
+++ b/drivers/misc/pmic_core.c
@@ -89,6 +89,16 @@ struct pmic *get_pmic(void)
return &pmic;
 }
 
+int pmic_vol_to_reg(struct pmic *p, int uV)
+{
+   if (p->voltage_to_reg_conv == NULL) {
+   puts("PMIC: Voltage to register value function not defined\n");
+   return 0;
+   }
+
+   return p->voltage_to_reg_conv(uV);
+}
+
 int do_pmic(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
u32 ret, reg, val;
diff --git a/include/pmic.h b/include/pmic.h
index 52a1526..f8594a9 100644
--- a/include/pmic.h
+++ b/include/pmic.h
@@ -52,12 +52,14 @@ struct pmic {
struct p_i2c i2c;
struct p_spi spi;
} hw;
+   int (*voltage_to_reg_conv) (int uV);
 };
 
 int pmic_init(void);
 int check_reg(u32 reg);
 struct pmic *get_pmic(void);
 int pmic_probe(struct pmic *p);
+int pmic_vol_to_reg(struct pmic *p, int uV);
 int pmic_reg_read(struct pmic *p, u32 reg, u32 *val);
 int pmic_reg_write(struct pmic *p, u32 reg, u32 val);
 int pmic_set_output(struct pmic *p, u32 reg, int ldo, int on);
-- 
1.7.2.3

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


[U-Boot] [PATCH 2/3] misc:pmic:max8997 MAX8997 support for PMIC driver

2012-03-28 Thread Lukasz Majewski
This commit adds support for MAX8997 PMIC driver.

Signed-off-by: Lukasz Majewski 
Signed-off-by: Kyungmin Park 
Cc: Stefano Babic 
---
 drivers/misc/Makefile   |1 +
 drivers/misc/pmic_max8997.c |   60 ++
 include/max8997_pmic.h  |  190 +++
 3 files changed, 251 insertions(+), 0 deletions(-)
 create mode 100644 drivers/misc/pmic_max8997.c
 create mode 100644 include/max8997_pmic.h

diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index a709707..30c7f8d 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -39,6 +39,7 @@ COBJS-$(CONFIG_PMIC_FSL) += pmic_fsl.o
 COBJS-$(CONFIG_PMIC_I2C) += pmic_i2c.o
 COBJS-$(CONFIG_PMIC_SPI) += pmic_spi.o
 COBJS-$(CONFIG_PMIC_MAX8998) += pmic_max8998.o
+COBJS-$(CONFIG_PMIC_MAX8997) += pmic_max8997.o
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
diff --git a/drivers/misc/pmic_max8997.c b/drivers/misc/pmic_max8997.c
new file mode 100644
index 000..506162f
--- /dev/null
+++ b/drivers/misc/pmic_max8997.c
@@ -0,0 +1,60 @@
+/*
+ *  Copyright (C) 2011 Samsung Electronics
+ *  Lukasz Majewski 
+ *
+ * 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 
+#include 
+#include 
+
+int voltage_to_reg(int uV)
+{
+   unsigned char ret;
+   if (uV <= 80)
+   return 0;
+   if (uV >= 395)
+   return 0x3f;
+   ret = (uV - 80) / 5;
+   if (ret > 0x3f) {
+   printf("MAX8997 LDO SETTING ERROR (%duV) -> %u\n", uV, ret);
+   ret = 0x3f;
+   }
+
+   return ret;
+}
+
+int pmic_init(void)
+{
+   struct pmic *p = get_pmic();
+   static const char name[] = "MAX8997_PMIC";
+
+   puts("Board PMIC init\n");
+
+   p->name = name;
+   p->interface = PMIC_I2C;
+   p->number_of_regs = PMIC_NUM_OF_REGS;
+   p->hw.i2c.addr = MAX8997_I2C_ADDR;
+   p->hw.i2c.tx_num = 1;
+   p->bus = I2C_PMIC;
+   p->voltage_to_reg_conv = voltage_to_reg;
+
+   return 0;
+}
diff --git a/include/max8997_pmic.h b/include/max8997_pmic.h
new file mode 100644
index 000..17ae24e
--- /dev/null
+++ b/include/max8997_pmic.h
@@ -0,0 +1,190 @@
+/*
+ *  Copyright (C) 2011 Samsung Electronics
+ *  Lukasz Majewski 
+ *
+ * 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
+ */
+
+#ifndef __MAX8997_PMIC_H_
+#define __MAX8997_PMIC_H_
+
+/* MAX 8997 registers */
+enum {
+   MAX8997_REG_PMIC_ID0= 0x00,
+   MAX8997_REG_PMIC_ID1= 0x01,
+   MAX8997_REG_INTSRC  = 0x02,
+   MAX8997_REG_INT1= 0x03,
+   MAX8997_REG_INT2= 0x04,
+   MAX8997_REG_INT3= 0x05,
+   MAX8997_REG_INT4= 0x06,
+
+   MAX8997_REG_INT1MSK = 0x08,
+   MAX8997_REG_INT2MSK = 0x09,
+   MAX8997_REG_INT3MSK = 0x0a,
+   MAX8997_REG_INT4MSK = 0x0b,
+
+   MAX8997_REG_STATUS1 = 0x0d,
+   MAX8997_REG_STATUS2 = 0x0e,
+   MAX8997_REG_STATUS3 = 0x0f,
+   MAX8997_REG_STATUS4 = 0x10,
+
+   MAX8997_REG_MAINCON1= 0x13,
+   MAX8997_REG_MAINCON2= 0x14,
+   MAX8997_REG_BUCKRAMP= 0x15,
+
+   MAX8997_REG_BUCK1CTRL   = 0x18,
+   MAX8997_REG_BUCK1DVS1   = 0x19,
+   MAX8997_REG_BUCK1DVS2   = 0x1a,
+   MAX8997_REG_BUCK1DVS3   = 0x1b,
+   MAX8997_REG_BUCK1DVS4   = 0x1c,
+   MAX8997_REG_BUCK1DVS5   = 0x1d,
+   MAX8997_REG_BUCK1DVS6   = 0x1e,
+   MAX8997_REG_BUCK1DVS7   = 0x1f,
+   MAX8997_REG_BUCK1DVS

[U-Boot] [PATCH 3/3] misc:pmic:samsung Convert TRATS target to use MAX8997 instead of MAX8998

2012-03-28 Thread Lukasz Majewski
TRATS target uses MAX8997 PMIC device instead of MAX8998.

Signed-off-by: Lukasz Majewski 
Signed-off-by: Kyungmin Park 
Cc: Minkyu Kang 
Cc: Stefano Babic 
---
 board/samsung/trats/trats.c |   27 ++-
 include/configs/trats.h |2 +-
 2 files changed, 11 insertions(+), 18 deletions(-)

diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index aa4291d..a7b4e4a 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -32,7 +32,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include "setup.h"
 
@@ -216,26 +216,19 @@ static int s5pc210_phy_control(int on)
return -1;
 
if (on) {
-   ret |= pmic_set_output(p,
-  MAX8998_REG_BUCK_ACTIVE_DISCHARGE3,
-  MAX8998_SAFEOUT1, LDO_ON);
-   ret |= pmic_set_output(p, MAX8998_REG_ONOFF1,
- MAX8998_LDO3, LDO_ON);
-   ret |= pmic_set_output(p, MAX8998_REG_ONOFF2,
- MAX8998_LDO8, LDO_ON);
-
+   ret |= pmic_set_output(p, MAX8997_REG_SAFEOUTCTRL,
+ ENSAFEOUT1, LDO_ON);
+   ret |= pmic_reg_write(p, MAX8997_REG_LDO3CTRL, EN_LDO);
+   ret |= pmic_reg_write(p, MAX8997_REG_LDO8CTRL, EN_LDO);
} else {
-   ret |= pmic_set_output(p, MAX8998_REG_ONOFF2,
- MAX8998_LDO8, LDO_OFF);
-   ret |= pmic_set_output(p, MAX8998_REG_ONOFF1,
- MAX8998_LDO3, LDO_OFF);
-   ret |= pmic_set_output(p,
-  MAX8998_REG_BUCK_ACTIVE_DISCHARGE3,
-  MAX8998_SAFEOUT1, LDO_OFF);
+   ret |= pmic_reg_write(p, MAX8997_REG_LDO8CTRL, DIS_LDO);
+   ret |= pmic_reg_write(p, MAX8997_REG_LDO3CTRL, DIS_LDO);
+   ret |= pmic_set_output(p, MAX8997_REG_SAFEOUTCTRL,
+ ENSAFEOUT1, LDO_OFF);
}
 
if (ret) {
-   puts("MAX8998 LDO setting error!\n");
+   puts("MAX8997 LDO setting error!\n");
return -1;
}
 
diff --git a/include/configs/trats.h b/include/configs/trats.h
index 10f11d9..585fd71 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -208,7 +208,7 @@
 
 #define CONFIG_PMIC
 #define CONFIG_PMIC_I2C
-#define CONFIG_PMIC_MAX8998
+#define CONFIG_PMIC_MAX8997
 
 #define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_S3C_UDC_OTG
-- 
1.7.2.3

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


[U-Boot] [PATCH] board/ti/beagle/beagle.c: Fix build warnings

2012-03-28 Thread Anatolij Gustschin
Fix:
beagle.c:257:13: warning: function declaration isn't a prototype
[-Wstrict-prototypes]
beagle.c:257:13: warning: function declaration isn't a prototype
[-Wstrict-prototypes]

Also make beagle_dvi_pup() checkpatch clean, fix:
ERROR: open brace '{' following function declarations go on the
next line

Signed-off-by: Anatolij Gustschin 
Cc: Tom Rini 
---
 board/ti/beagle/beagle.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 114ab7e..8b07eef 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -254,7 +254,8 @@ void beagle_display_init(void)
 /*
  * Enable DVI power
  */
-static void beagle_dvi_pup() {
+static void beagle_dvi_pup(void)
+{
uchar val;
 
switch (get_board_revision()) {
-- 
1.7.7.6

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


[U-Boot] [PATCH] arch/arm/cpu/armv7/omap-common/clocks-common.c: Fix build warnings

2012-03-28 Thread Anatolij Gustschin
Fix:
clocks-common.c: In function 'setup_non_essential_dplls':
clocks-common.c:323:6: warning: variable 'sys_clk_khz' set but not used
[-Wunused-but-set-variable]
clocks-common.c: In function 'setup_non_essential_dplls':
clocks-common.c:323:6: warning: variable 'sys_clk_khz' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin 
Cc: Tom Rini 
---
 arch/arm/cpu/armv7/omap-common/clocks-common.c |4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap-common/clocks-common.c 
b/arch/arm/cpu/armv7/omap-common/clocks-common.c
index 4cfe119..4e74569 100644
--- a/arch/arm/cpu/armv7/omap-common/clocks-common.c
+++ b/arch/arm/cpu/armv7/omap-common/clocks-common.c
@@ -320,11 +320,9 @@ static void setup_dplls(void)
 #ifdef CONFIG_SYS_CLOCKS_ENABLE_ALL
 static void setup_non_essential_dplls(void)
 {
-   u32 sys_clk_khz, abe_ref_clk;
+   u32 abe_ref_clk;
const struct dpll_params *params;
 
-   sys_clk_khz = get_sys_clk_freq() / 1000;
-
/* IVA */
clrsetbits_le32(&prcm->cm_bypclk_dpll_iva,
CM_BYPCLK_DPLL_IVA_CLKSEL_MASK, DPLL_IVA_CLKSEL_CORE_X2_DIV_2);
-- 
1.7.7.6

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


Re: [U-Boot] [PATCH v2 1/2] mx28: Split the README into a common part and a m28 specific part

2012-03-28 Thread Stefano Babic
On 24/03/2012 23:42, Fabio Estevam wrote:
> Split the README into a common part and a m28 specific part.
> 
> This will make things easier when adding new README files for other mx28
> based boards.
> 
> Signed-off-by: Fabio Estevam 
> ---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

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


Re: [U-Boot] [PATCH 2/2] mx28evk: Add a README file

2012-03-28 Thread Stefano Babic
On 24/03/2012 21:58, Fabio Estevam wrote:
> Add a README file for mx28evk board.
> 
> Signed-off-by: Fabio Estevam 
> ---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

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


Re: [U-Boot] [PATCH 3/3] misc:pmic:samsung Convert TRATS target to use MAX8997 instead of MAX8998

2012-03-28 Thread Minkyu Kang
On 28 March 2012 17:45, Lukasz Majewski  wrote:
> TRATS target uses MAX8997 PMIC device instead of MAX8998.
>
> Signed-off-by: Lukasz Majewski 
> Signed-off-by: Kyungmin Park 
> Cc: Minkyu Kang 
> Cc: Stefano Babic 
> ---
>  board/samsung/trats/trats.c |   27 ++-
>  include/configs/trats.h     |    2 +-
>  2 files changed, 11 insertions(+), 18 deletions(-)
>

Acked-by: Minkyu Kang 

-- 
from. prom.
www.promsoft.net
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] misc:pmic: Support for voltage to register value conversion function

2012-03-28 Thread Stefano Babic
On 28/03/2012 10:45, Lukasz Majewski wrote:
> Support for voltage (in uV) to proper register value is added.
> The function tied to this callback is often PMIC dependent
> and shall be defined for each device.
> 
> Signed-off-by: Lukasz Majewski 
> Signed-off-by: Kyungmin Park 
> Cc: Stefano Babic 
> ---

Hi Lukasz,

>  
> +int pmic_vol_to_reg(struct pmic *p, int uV)

You added a new entry point to pmic, but you do not use it...I have not
found in your patchset why it is necessary for you.

I am not sure if we require to add this to the PMIC API or hide in the
pmic specific code. Other PMICs has not a a register for different
voltages, but only a bit inside the same register (this is the case for
the Freescale's PMICs we currently support in u-boot).

Best regards,
Stefano Babic

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


Re: [U-Boot] [PATCH 1/3] misc:pmic: Support for voltage to register value conversion function

2012-03-28 Thread Lukasz Majewski
Hi Stefano,

On Wed, 28 Mar 2012 12:26:46 +0200
Stefano Babic  wrote:

> On 28/03/2012 10:45, Lukasz Majewski wrote:
> > Support for voltage (in uV) to proper register value is added.
> > The function tied to this callback is often PMIC dependent
> > and shall be defined for each device.
> > 
> > Signed-off-by: Lukasz Majewski 
> > Signed-off-by: Kyungmin Park 
> > Cc: Stefano Babic 
> > ---
> 
> Hi Lukasz,
> 
> >  
> > +int pmic_vol_to_reg(struct pmic *p, int uV)
> 
> You added a new entry point to pmic, but you do not use it...I have
> not found in your patchset why it is necessary for you.
> 

Rationale for this change is in commits following this one.
For trats Samsung target it is necessary to change the default voltage.

I think, that providing access to such a function as a pointer is the
best possible solution.

For example the MAX8997 and MAX8998 PMICs have different way of
calculating the value, which represents the LDO output value.


> I am not sure if we require to add this to the PMIC API or hide in the
> pmic specific code. Other PMICs has not a a register for different
> voltages, but only a bit inside the same register (this is the case
> for the Freescale's PMICs we currently support in u-boot).

I think, that it is easier to define function pointer in the pmic
structure, than separate functions and handling them in target platform
data.


> Best regards,
> Stefano Babic
> 


-- 
Best regards,

Lukasz Majewski

Samsung Poland R&D Center
Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] misc:pmic: Support for voltage to register value conversion function

2012-03-28 Thread Stefano Babic
On 28/03/2012 13:26, Lukasz Majewski wrote:

Hi Lukasz,
>>
>>>  
>>> +int pmic_vol_to_reg(struct pmic *p, int uV)
>>
>> You added a new entry point to pmic, but you do not use it...I have
>> not found in your patchset why it is necessary for you.
>>
> 
> Rationale for this change is in commits following this one.
> For trats Samsung target it is necessary to change the default voltage.

Yes, I was expecting that you call pmic_vol_to_reg() in your following
patches, but I cannot find it. Am I missing something ?

> 
> I think, that providing access to such a function as a pointer is the
> best possible solution.
> 
> For example the MAX8997 and MAX8998 PMICs have different way of
> calculating the value, which represents the LDO output value.
> 
> 
>> I am not sure if we require to add this to the PMIC API or hide in the
>> pmic specific code. Other PMICs has not a a register for different
>> voltages, but only a bit inside the same register (this is the case
>> for the Freescale's PMICs we currently support in u-boot).
> 
> I think, that it is easier to define function pointer in the pmic
> structure, than separate functions and handling them in target platform
> data.

Ok, understood.

Best regards,
Stefano Babic

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


Re: [U-Boot] [PATCH 1/3] misc:pmic: Support for voltage to register value conversion function

2012-03-28 Thread Stefano Babic
On 28/03/2012 14:38, Lukasz Majewski wrote:

> Hi Stefano,
> 

Hi Lucasz,

> I've already forwarded those patches to you.
> They are also available on the mailing list, so I don't know what has
> happened.

Really nothing, I got all e-mails, I was only not able to explain my doubt.
I try again:

- In patch 1/3 you add voltage_to_reg to the pmic struct
==> Ok
- in patch 2/3 you add voltage_to_reg to MAX8997.
==> Ok

Everything clear.

The consequence for me is that PATCH 3/3 shows the reason to add
voltage_to_reg(), and calls the new function pmic_vol_to_reg(), because
you need it, as you have already explained. But I see only
pmic_set_output() and pmic_reg_write() in your patch.

What have I not yet understood ? (maybe I need a coffe to wake up my
brain...)

Stefano

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


[U-Boot] [PATCH] nhk8815: fix build errors

2012-03-28 Thread Anatolij Gustschin
Fix:
common/libcommon.o: In function `cread_line':
/home/ag/git/u-boot/common/main.c:695: undefined reference to `get_ticks'
/home/ag/git/u-boot/common/main.c:695: undefined reference to `get_tbclk'
/home/ag/git/u-boot/common/main.c:698: undefined reference to `get_ticks'

Signed-off-by: Anatolij Gustschin 
Cc: Alessandro Rubini 
---
 arch/arm/cpu/arm926ejs/nomadik/timer.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/nomadik/timer.c 
b/arch/arm/cpu/arm926ejs/nomadik/timer.c
index 1cd0e1f..bc2e4d5 100644
--- a/arch/arm/cpu/arm926ejs/nomadik/timer.c
+++ b/arch/arm/cpu/arm926ejs/nomadik/timer.c
@@ -75,3 +75,13 @@ void __udelay(unsigned long usec)
while ((signed)(end - READ_TIMER()) > 0)
;
 }
+
+unsigned long long get_ticks(void)
+{
+   return get_timer(0);
+}
+
+ulong get_tbclk(void)
+{
+   return CONFIG_SYS_HZ;
+}
-- 
1.7.7.6

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


[U-Boot] [PATCH] Sheevaplug: Add Kirkwood watchdog support

2012-03-28 Thread Stathis Voukelatos
Signed-off-by: Stathis Voukelatos 
Cc: Prafulla Wadaskar 
---
 arch/arm/cpu/arm926ejs/kirkwood/timer.c  |   47
+++--
 arch/arm/include/asm/arch-kirkwood/cpu.h |1 +
 board/Marvell/sheevaplug/sheevaplug.c|   23 ++-
 include/configs/sheevaplug.h |3 ++
 4 files changed, 69 insertions(+), 5 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/kirkwood/timer.c
b/arch/arm/cpu/arm926ejs/kirkwood/timer.c
index f5d0160..79994e7 100644
--- a/arch/arm/cpu/arm926ejs/kirkwood/timer.c
+++ b/arch/arm/cpu/arm926ejs/kirkwood/timer.c
@@ -23,9 +23,11 @@
 
 #include 
 #include 
+#include 
 #include 
 
-#define UBOOT_CNTR 0   /* counter to use for uboot timer */
+#define UBOOT_CNTR 0   /* counter to use for uboot timer */
+#define WDT_CNTR   2   /* watchdog timer */
 
 /* Timer reload and current value registers */
 struct kwtmr_val {
@@ -37,9 +39,7 @@ struct kwtmr_val {
 struct kwtmr_registers {
u32 ctrl;   /* Timer control reg */
u32 pad[3];
-   struct kwtmr_val tmr[2];
-   u32 wdt_reload;
-   u32 wdt_val;
+   struct kwtmr_val tmr[3];
 };
 
 struct kwtmr_registers *kwtmr_regs = (struct kwtmr_registers
*)KW_TIMER_BASE;
@@ -89,6 +89,45 @@ DECLARE_GLOBAL_DATA_PTR;
 #define timestamp gd->tbl
 #define lastdec gd->lastinc
 
+
+#ifdef CONFIG_WATCHDOG
+
+#define WDT_TIMEOUT 20
+
+void watchdog_reset(void)
+{
+   writel(WDT_TIMEOUT * CONFIG_SYS_TCLK, CNTMR_VAL_REG(WDT_CNTR));
+}
+
+
+void kw_watchdog_enable(void)
+{
+   struct kwcpu_registers *cpureg =
+   (struct kwcpu_registers
*)KW_CPU_REG_BASE;
+   unsigned int reg;
+
+   /* Set WDT timeout */
+   watchdog_reset();
+
+   /* Clear WDT IRQ */
+   reg = readl(&cpureg->ahb_mbus_cause_irq);
+   reg &= ~(1 << 3);
+   writel(reg, &cpureg->ahb_mbus_cause_irq);
+
+   /* Enable watchdog timer */
+   reg = readl(CNTMR_CTRL_REG);
+   reg |= CTCR_ARM_TIMER_EN(WDT_CNTR);
+   writel(reg, CNTMR_CTRL_REG);
+
+   /* Enable reset on watchdog */
+   reg = readl(&cpureg->rstoutn_mask);
+   reg |= 1 << 1;
+   writel(reg, &cpureg->rstoutn_mask);
+}
+
+#endif
+
+
 ulong get_timer_masked(void)
 {
ulong now = READ_TIMER;
diff --git a/arch/arm/include/asm/arch-kirkwood/cpu.h
b/arch/arm/include/asm/arch-kirkwood/cpu.h
index d28c51a..3397126 100644
--- a/arch/arm/include/asm/arch-kirkwood/cpu.h
+++ b/arch/arm/include/asm/arch-kirkwood/cpu.h
@@ -167,5 +167,6 @@ int kw_config_mpp(unsigned int mpp0_7, unsigned int
mpp8_15,
unsigned int mpp32_39, unsigned int mpp40_47,
unsigned int mpp48_55);
 unsigned int kw_winctrl_calcsize(unsigned int sizeval);
+void kw_watchdog_enable(void);
 #endif /* __ASSEMBLY__ */
 #endif /* _KWCPU_H */
diff --git a/board/Marvell/sheevaplug/sheevaplug.c
b/board/Marvell/sheevaplug/sheevaplug.c
index 71e6793..cea1661 100644
--- a/board/Marvell/sheevaplug/sheevaplug.c
+++ b/board/Marvell/sheevaplug/sheevaplug.c
@@ -107,12 +107,33 @@ int board_init(void)
 */
gd->bd->bi_arch_number = MACH_TYPE_SHEEVAPLUG;
 
-   /* adress of boot parameters */
+   /* address of boot parameters */
gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100;
 
return 0;
 }
 
+#ifdef CONFIG_BOARD_LATE_INIT
+
+int board_late_init(void)
+{
+#ifdef CONFIG_WATCHDOG
+   {
+   char *s = getenv("watchdog");
+   if (s != NULL) {
+   if (strcmp(s, "on") == 0) {
+   kw_watchdog_enable();
+   printf("Kirkwood watchdog enabled\n");
+   }
+   }
+   }
+#endif
+   return 0;
+}
+
+#endif
+
+
 #ifdef CONFIG_RESET_PHY_R
 /* Configure and enable MV88E1116 PHY */
 void reset_phy(void)
diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h
index 83dd8ff..c2bc864 100644
--- a/include/configs/sheevaplug.h
+++ b/include/configs/sheevaplug.h
@@ -56,6 +56,9 @@
  */
 #include "mv-common.h"
 
+#define CONFIG_BOARD_LATE_INIT
+#define CONFIG_WATCHDOG
+
 /*
  *  Environment variables configurations
  */
-- 
1.7.2.5


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


Re: [U-Boot] [PATCH 1/1] MX53: DDR: Fix ZQHWCTRL field TZQ_CS

2012-03-28 Thread Fabio Estevam
On 3/22/12, Troy Kisky  wrote:
> Currently, board files are setting this field to 0x01
> which the manual says is a reserved value. Change to
> use the default of 0x04 - 128 cycles.
>
> Signed-off-by: Troy Kisky 

Confirmed with the design team that your patch is correct.

Thanks for catching this.

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


Re: [U-Boot] [PATCH 1/3] misc:pmic: Support for voltage to register value conversion function

2012-03-28 Thread Lukasz Majewski
On Wed, 28 Mar 2012 14:50:35 +0200
Stefano Babic  wrote:

> On 28/03/2012 14:38, Lukasz Majewski wrote:
> 
> > Hi Stefano,
> > 
> 
> Hi Lucasz,
> 
> > I've already forwarded those patches to you.
> > They are also available on the mailing list, so I don't know what
> > has happened.
> 
> Really nothing, I got all e-mails, I was only not able to explain my
> doubt. I try again:
> 
> - In patch 1/3 you add voltage_to_reg to the pmic struct
>   ==> Ok
> - in patch 2/3 you add voltage_to_reg to MAX8997.
>   ==> Ok
> 
> Everything clear.
> 
> The consequence for me is that PATCH 3/3 shows the reason to add
> voltage_to_reg(), and calls the new function pmic_vol_to_reg(),
> because you need it, as you have already explained. But I see only
> pmic_set_output() and pmic_reg_write() in your patch.
> 

> Stefano
> 

Hi Stefano,

I've looked on patches which I've posted and for patches from 1 do
3 there isn't usage for this function.

However I'm using this functionality in a code on which I'm working on
(Trats), so posting it to the list is only a matter of time.

> What have I not yet understood ? (maybe I need a coffe to wake up my
> brain...)
You understood everything :-), it was my fault.
I thought, that patches 2/3 and 3/3 were missing (or by some mishap I
didn't send them properly).

Now, I think, that everything is clear.
-- 
Best regards,

Lukasz Majewski

Samsung Poland R&D Center
Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] MX53: DDR: Fix ZQHWCTRL field TZQ_CS

2012-03-28 Thread Stefano Babic
On 22/03/2012 23:00, Troy Kisky wrote:
> Currently, board files are setting this field to 0x01
> which the manual says is a reserved value. Change to
> use the default of 0x04 - 128 cycles.
> 
> Signed-off-by: Troy Kisky 
> ---

Thanks everybody to fix / explain this issue.

Applied to u-boot-imx(fix), thanks.

Best regards,
Stefano Babic

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


Re: [U-Boot] [PATCH 1/1] MX53: DDR: Fix ZQHWCTRL field TZQ_CS

2012-03-28 Thread Fabio Estevam
On 3/28/12, Stefano Babic  wrote:
> On 22/03/2012 23:00, Troy Kisky wrote:
>> Currently, board files are setting this field to 0x01
>> which the manual says is a reserved value. Change to
>> use the default of 0x04 - 128 cycles.
>>
>> Signed-off-by: Troy Kisky 
>> ---
>
> Thanks everybody to fix / explain this issue.
>
> Applied to u-boot-imx(fix), thanks.

Just noticed in this thread that Troy reported a typo in his commit
log: it should have said
"default of 0x02 - 128 cycles"
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] drivers/mmc/tegra2_mmc.c: fix GCC 4.6 warning

2012-03-28 Thread Anatolij Gustschin
Fix:
tegra2_mmc.c: In function 'mmc_send_cmd':
tegra2_mmc.c:230:3: warning: 'mask' may be used uninitialized in this
function [-Wuninitialized]

Signed-off-by: Anatolij Gustschin 
Cc: Doug Anderson 
Cc: Tom Warren 
---
gcc is wrong here, I think. But I'd like to have a clean
build log.

Anatolij

 drivers/mmc/tegra2_mmc.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/tegra2_mmc.c b/drivers/mmc/tegra2_mmc.c
index 33cc8fb..fb8a57d 100644
--- a/drivers/mmc/tegra2_mmc.c
+++ b/drivers/mmc/tegra2_mmc.c
@@ -162,7 +162,7 @@ static int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd 
*cmd,
struct mmc_host *host = (struct mmc_host *)mmc->priv;
int flags, i;
int result;
-   unsigned int mask;
+   unsigned int mask = 0;
unsigned int retry = 0x10;
debug(" mmc_send_cmd called\n");
 
-- 
1.7.7.6

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


Re: [U-Boot] [PATCH 1/1] MX53: DDR: Fix ZQHWCTRL field TZQ_CS

2012-03-28 Thread Stefano Babic
On 28/03/2012 15:31, Fabio Estevam wrote:
> On 3/28/12, Stefano Babic  wrote:
>> On 22/03/2012 23:00, Troy Kisky wrote:
>>> Currently, board files are setting this field to 0x01
>>> which the manual says is a reserved value. Change to
>>> use the default of 0x04 - 128 cycles.
>>>
>>> Signed-off-by: Troy Kisky 
>>> ---
>>
>> Thanks everybody to fix / explain this issue.
>>
>> Applied to u-boot-imx(fix), thanks.
> 
> Just noticed in this thread that Troy reported a typo in his commit
> log: it should have said
> "default of 0x02 - 128 cycles"

Right - I have fixed it myself on the tree, thanks.

Stefano

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


Re: [U-Boot] [PATCH] nhk8815: fix build errors

2012-03-28 Thread Marek Vasut
Dear Anatolij Gustschin,

> Fix:
> common/libcommon.o: In function `cread_line':
> /home/ag/git/u-boot/common/main.c:695: undefined reference to `get_ticks'
> /home/ag/git/u-boot/common/main.c:695: undefined reference to `get_tbclk'
> /home/ag/git/u-boot/common/main.c:698: undefined reference to `get_ticks'
> 
> Signed-off-by: Anatolij Gustschin 
> Cc: Alessandro Rubini 
> ---
>  arch/arm/cpu/arm926ejs/nomadik/timer.c |   10 ++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 

Acked-by: Marek Vasut 

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] drivers/mtd/spr_smi.c: Fix build warning

2012-03-28 Thread Anatolij Gustschin
Fix:
spr_smi.c: In function 'smi_write':
spr_smi.c:325:15: warning: variable 'WM' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin 
Cc: Vipin Kumar 
---
 drivers/mtd/spr_smi.c |5 -
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/drivers/mtd/spr_smi.c b/drivers/mtd/spr_smi.c
index 9a70a19..6d4257a 100644
--- a/drivers/mtd/spr_smi.c
+++ b/drivers/mtd/spr_smi.c
@@ -322,24 +322,19 @@ static int smi_write(unsigned int *src_addr, unsigned int 
*dst_addr,
 unsigned int length, ulong bank_addr)
 {
int banknum;
-   unsigned int WM;
 
switch (bank_addr) {
case SMIBANK0_BASE:
banknum = BANK0;
-   WM = WM0;
break;
case SMIBANK1_BASE:
banknum = BANK1;
-   WM = WM1;
break;
case SMIBANK2_BASE:
banknum = BANK2;
-   WM = WM2;
break;
case SMIBANK3_BASE:
banknum = BANK3;
-   WM = WM3;
break;
default:
return -1;
-- 
1.7.7.6

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


Re: [U-Boot] [PATCH V2] Enable high speed support for USB device framework and usbtty

2012-03-28 Thread Marek Vasut
Dear Amit Virdi,

> From: Vipin KUMAR 
> 
> This patch adds the support for high speed in usb device framework and
> usbtty driver. This feature has been kept within a macro CONFIG_USBD_HS,
> so the board configuration files have to define this macro to enable high
> speed support.
> 
> Along with that specific peripheral drivers also need to define a function
> to let the framework know that the enumeration has happened at high speed.
> This function prototype is "int is_usbd_high_speed(void)"
> 
> Signed-off-by: Vipin Kumar 
> Signed-off-by: Amit Virdi 

Applied and pushed,thanks for your good work folks!

Also, please forgive me for my long response time!

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ext2load: increase read speed

2012-03-28 Thread Jason Cooper
This patch dramatically drops the amount of time u-boot needs to read a
file from an ext2 partition.  On a typical 2 to 5 MB file (kernels and
initrds) it goes from tens of seconds to a couple seconds.

All we are doing here is grouping contiguous blocks into one read.

Boot tested on Globalscale Technologies Dreamplug (Kirkwood ARM SoC)
with three different files.  sha1sums were calculated in Linux
userspace, and then confirmed after ext2load.

Signed-off-by: Jason Cooper 
---
 fs/ext2/ext2fs.c |   26 --
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/fs/ext2/ext2fs.c b/fs/ext2/ext2fs.c
index e119e13..8531db5 100644
--- a/fs/ext2/ext2fs.c
+++ b/fs/ext2/ext2fs.c
@@ -414,7 +414,6 @@ int ext2fs_read_file
if (blknr < 0) {
return (-1);
}
-   blknr = blknr << log2blocksize;
 
/* Last block.  */
if (i == blockcnt - 1) {
@@ -432,6 +431,29 @@ int ext2fs_read_file
blockend -= skipfirst;
}
 
+   /* grab middle blocks in one go */
+   if (i != pos / blocksize && i != blockcnt - 1 && blockcnt > 3) {
+   int oldblk = blknr;
+   int blocknxt;
+   while (i < blockcnt - 1) {
+   blocknxt = ext2fs_read_block(node, i + 1);
+   if (blocknxt == (oldblk + 1)) {
+   oldblk = blocknxt;
+   i++;
+   } else {
+   blocknxt = ext2fs_read_block(node, i);
+   break;
+   }
+   }
+
+   if (oldblk == blknr)
+   blockend = blocksize;
+   else
+   blockend = (1 + blocknxt - blknr) * blocksize;
+   }
+
+   blknr = blknr << log2blocksize;
+
/* If the block number is 0 this block is not stored on disk but
   is zero filled instead.  */
if (blknr) {
@@ -444,7 +466,7 @@ int ext2fs_read_file
} else {
memset (buf, 0, blocksize - skipfirst);
}
-   buf += blocksize - skipfirst;
+   buf += blockend - skipfirst;
}
return (len);
 }
-- 
1.7.3.4

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


Re: [U-Boot] [PATCH] nhk8815: fix build errors

2012-03-28 Thread Alessandro Rubini
Acked-by: Alessandro Rubini 

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


Re: [U-Boot] [PATCH 1/3] misc:pmic: Support for voltage to register value conversion function

2012-03-28 Thread Stefano Babic
On 28/03/2012 15:13, Lukasz Majewski wrote:

> Hi Stefano,
> 

Hi Lucasz,

> I've looked on patches which I've posted and for patches from 1 do
> 3 there isn't usage for this function.
> 
> However I'm using this functionality in a code on which I'm working on
> (Trats), so posting it to the list is only a matter of time.

ok, understood. Then I will suggest you resubmit patches 1 and 2 with
your work on Trats, because the patches belong together and they should
be in the same patchset.

And Patch 3 can be already applied as it is, because it has no
dependecies with the other ones.

> Now, I think, that everything is clear.

Yes, everythg clear ;-)

Best regards,
Stefano Babic

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


[U-Boot] mixed case DATA lines in kwbimage.cfg, and other file : cosmetic?

2012-03-28 Thread David Purdy
Hi Prafulla & all,

I understand that lower case hexadecimal for DATA lines is preferred for
kwbimage.cfg (in Kirkwood).   For a mixed-upper-and-lower-case kwbimage.cfg
that is already in U-Boot, should I first submit a [PATCH][cosmetic] to
change it to all lower case DATA?   Or should this sort of change be
considered as 'substantive'?   I checked the  Patches < U-Boot
www.denx.de/wiki/U-Boot/Patches page for a reference to this, as well as
the README.kwbimage file, but saw no reference regarding "case".

I plan to reuse (though not replicate) the same kwbimage.cfg for two newer
Seagate devices.

thanks, regards,

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


[U-Boot] [PATCH] board/vpac270/onenand.c: Fix build errors

2012-03-28 Thread Anatolij Gustschin
Building for vpac270_ond_256 configuration fails:

arch/arm/lib/libarm.o: In function `icache_disable':
/home/ag/git/u-boot/arch/arm/lib/cache-cp15.c:156: multiple
definition of `icache_disable'
board/vpac270/libvpac270.o:/home/ag/git/u-boot/board/vpac270/onenand.c:65:
first defined here
arch/arm/lib/libarm.o: In function `dcache_disable':
/home/ag/git/u-boot/arch/arm/lib/cache-cp15.c:188: multiple
definition of `dcache_disable'
board/vpac270/libvpac270.o:/home/ag/git/u-boot/board/vpac270/onenand.c:66:
first defined here
make[1]: *** [/home/ag/git/u-boot/spl/u-boot-spl] Error 1

Signed-off-by: Anatolij Gustschin 
Cc: Marek Vasut 
---
Hi Marek,

After pulling Albert's u-boot-arm.git master and running
build tests I see this error. Is this fix correct?

Anatolij

 board/vpac270/onenand.c |3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/board/vpac270/onenand.c b/board/vpac270/onenand.c
index c2ae9a7..47f44c3 100644
--- a/board/vpac270/onenand.c
+++ b/board/vpac270/onenand.c
@@ -60,6 +60,3 @@ void __attribute__((noreturn)) hang(void)
for (;;)
;
 }
-
-void icache_disable(void) {}
-void dcache_disable(void) {}
-- 
1.7.7.6

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


Re: [U-Boot] [PATCH] drivers/mmc/tegra2_mmc.c: fix GCC 4.6 warning

2012-03-28 Thread Tom Warren
Anatolij,

> -Original Message-
> From: Anatolij Gustschin [mailto:ag...@denx.de]
> Sent: Wednesday, March 28, 2012 6:40 AM
> To: u-boot@lists.denx.de
> Cc: Doug Anderson; Tom Warren
> Subject: [PATCH] drivers/mmc/tegra2_mmc.c: fix GCC 4.6 warning
> 
> Fix:
> tegra2_mmc.c: In function 'mmc_send_cmd':
> tegra2_mmc.c:230:3: warning: 'mask' may be used uninitialized in this
> function [-Wuninitialized]
> 
> Signed-off-by: Anatolij Gustschin 
> Cc: Doug Anderson 
> Cc: Tom Warren 
> ---
> gcc is wrong here, I think. But I'd like to have a clean build log.
> 
I agree that gcc is being overly paranoid, but thanks for the fix!

Acked-by: Tom Warren 

> Anatolij
> 
>  drivers/mmc/tegra2_mmc.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mmc/tegra2_mmc.c b/drivers/mmc/tegra2_mmc.c index
> 33cc8fb..fb8a57d 100644
> --- a/drivers/mmc/tegra2_mmc.c
> +++ b/drivers/mmc/tegra2_mmc.c
> @@ -162,7 +162,7 @@ static int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd
> *cmd,
>   struct mmc_host *host = (struct mmc_host *)mmc->priv;
>   int flags, i;
>   int result;
> - unsigned int mask;
> + unsigned int mask = 0;
>   unsigned int retry = 0x10;
>   debug(" mmc_send_cmd called\n");
> 
> --
> 1.7.7.6
-- 
nvpublic
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 0/7] PXE parsing fixes and local file support

2012-03-28 Thread Rob Herring
From: Rob Herring 

The first 6 patches are menu file parsing fixes found in testing ubuntu/
debian generated menu files. The menu display is cleaned up to display
the friendly menu label string and boot the default image on timeout as
is typical for a PC bootloader.

The last patch adds support for parsing local disk files on ext2 or fat
filesystems. This is essentially syslinux/extlinux emulation and simply
reuses the existing pxe support.

Rob

Rob Herring (7):
  menu: only timeout when menu is displayed
  pxe: support include files at top-level
  pxe: add support for label menu text
  pxe: support linux entries for labels
  pxe: support absolute paths
  pxe: parse initrd file from append string
  pxe: add support for parsing local syslinux files

 common/cmd_pxe.c |  198 +++---
 common/menu.c|   36 +-
 doc/README.pxe   |3 -
 include/common.h |6 ++
 4 files changed, 184 insertions(+), 59 deletions(-)

-- 
1.7.5.4

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


[U-Boot] [PATCH 2/7] pxe: support include files at top-level

2012-03-28 Thread Rob Herring
From: Rob Herring 

Include files outside of a menu were not getting included and parsed.

Signed-off-by: Rob Herring 
---
 common/cmd_pxe.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 8a68fa1..25054ba 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -1110,6 +1110,11 @@ static int parse_pxefile_top(char *p, struct pxe_menu 
*cfg, int nest_level)
 
break;
 
+   case T_INCLUDE:
+   err = handle_include(&p, b + strlen(b) + 1, cfg,
+   nest_level + 1);
+   break;
+
case T_PROMPT:
err = parse_integer(&p, &cfg->prompt);
break;
-- 
1.7.5.4

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


[U-Boot] [PATCH 1/7] menu: only timeout when menu is displayed

2012-03-28 Thread Rob Herring
From: Rob Herring 

Make the menu timeout apply only when prompt flag is set and after the
menu is displayed. This allows auto boot to work no matter whether prompt
is set or cleared. Use the default selection if the menu times out.

This also fixes the timeout value given to readline_into_buffer to be
seconds instead of 10th of seconds.

Old behavior:

if prompt
  display menu and wait for choice
else
  wait for timeout
  if key pressed
display menu and wait for choice
  else
exit command

New behavior:

if prompt
  display menu
  if key pressed
wait for choice
  else
boot default entry on timeout
else
  boot default entry

Signed-off-by: Rob Herring 
---
 common/menu.c |   36 
 1 files changed, 4 insertions(+), 32 deletions(-)

diff --git a/common/menu.c b/common/menu.c
index aa16c9a..6b2a2db 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -171,32 +171,6 @@ static inline struct menu_item *menu_item_by_key(struct 
menu *m,
 }
 
 /*
- * Wait for the user to hit a key according to the timeout set for the menu.
- * Returns 1 if the user hit a key, or 0 if the timeout expired.
- */
-static inline int menu_interrupted(struct menu *m)
-{
-   if (!m->timeout)
-   return 0;
-
-   if (abortboot(m->timeout/10))
-   return 1;
-
-   return 0;
-}
-
-/*
- * Checks whether or not the default menu item should be used without
- * prompting for a user choice. If the menu is set to always prompt, or the
- * user hits a key during the timeout period, return 0. Otherwise, return 1 to
- * indicate we should use the default menu item.
- */
-static inline int menu_use_default(struct menu *m)
-{
-   return !m->prompt && !menu_interrupted(m);
-}
-
-/*
  * Set *choice to point to the default item's data, if any default item was
  * set, and returns 1. If no default item was set, returns -ENOENT.
  */
@@ -231,7 +205,7 @@ static inline int menu_interactive_choice(struct menu *m, 
void **choice)
menu_display(m);
 
readret = readline_into_buffer("Enter choice: ", cbuf,
-   m->timeout);
+   m->timeout / 10);
 
if (readret >= 0) {
choice_item = menu_item_by_key(m, cbuf);
@@ -240,10 +214,8 @@ static inline int menu_interactive_choice(struct menu *m, 
void **choice)
printf("%s not found\n", cbuf);
m->timeout = 0;
}
-   } else {
-   puts("^C\n");
-   return -EINTR;
-   }
+   } else
+   return menu_default_choice(m, choice);
}
 
*choice = choice_item->data;
@@ -300,7 +272,7 @@ int menu_get_choice(struct menu *m, void **choice)
if (!m || !choice)
return -EINVAL;
 
-   if (menu_use_default(m))
+   if (!m->prompt)
return menu_default_choice(m, choice);
 
return menu_interactive_choice(m, choice);
-- 
1.7.5.4

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


[U-Boot] [PATCH 3/7] pxe: add support for label menu text

2012-03-28 Thread Rob Herring
From: Rob Herring 

Use a menu string if present, otherwise use the kernel string.

Signed-off-by: Rob Herring 
---
 common/cmd_pxe.c |   13 +
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 25054ba..2497b73 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -409,6 +409,7 @@ static int get_relfile_envaddr(char *file_path, char 
*envaddr_name)
  */
 struct pxe_label {
char *name;
+   char *menu;
char *kernel;
char *append;
char *initrd;
@@ -491,17 +492,18 @@ static void label_destroy(struct pxe_label *label)
 static void label_print(void *data)
 {
struct pxe_label *label = data;
+   const char *c = label->menu ? label->menu : label->kernel;
 
-   printf("Label: %s\n", label->name);
+   printf("%s:\t%s\n", label->name, c);
 
if (label->kernel)
-   printf("\tkernel: %s\n", label->kernel);
+   printf("\t\tkernel: %s\n", label->kernel);
 
if (label->append)
-   printf("\tappend: %s\n", label->append);
+   printf("\t\tappend: %s\n", label->append);
 
if (label->initrd)
-   printf("\tinitrd: %s\n", label->initrd);
+   printf("\t\tinitrd: %s\n", label->initrd);
 }
 
 /*
@@ -970,6 +972,9 @@ static int parse_label_menu(char **c, struct pxe_menu *cfg,
return -ENOMEM;
 
break;
+   case T_LABEL:
+   parse_sliteral(c, &label->menu);
+   break;
default:
printf("Ignoring malformed menu command: %.*s\n",
(int)(*c - s), s);
-- 
1.7.5.4

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


[U-Boot] [PATCH 4/7] pxe: support linux entries for labels

2012-03-28 Thread Rob Herring
From: Rob Herring 

Kernels can be specified using "linux" or "kernel" entry. The difference
is kernel is supposed to detect the type of file, but for u-boot both are
treated the same.

Signed-off-by: Rob Herring 
---
 common/cmd_pxe.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 2497b73..b8cb4f3 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -628,6 +628,7 @@ enum token_type {
T_TIMEOUT,
T_LABEL,
T_KERNEL,
+   T_LINUX,
T_APPEND,
T_INITRD,
T_LOCALBOOT,
@@ -656,6 +657,7 @@ static const struct token keywords[] = {
{"prompt", T_PROMPT},
{"label", T_LABEL},
{"kernel", T_KERNEL},
+   {"linux", T_LINUX},
{"localboot", T_LOCALBOOT},
{"append", T_APPEND},
{"initrd", T_INITRD},
@@ -1024,6 +1026,7 @@ static int parse_label(char **c, struct pxe_menu *cfg)
break;
 
case T_KERNEL:
+   case T_LINUX:
err = parse_sliteral(c, &label->kernel);
break;
 
-- 
1.7.5.4

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


[U-Boot] [PATCH 5/7] pxe: support absolute paths

2012-03-28 Thread Rob Herring
From: Rob Herring 

If the file path starts with a '/', then don't pre-pend the bootfile path.
This fixes a problem with running 'pxe boot' multiple times where the
bootfile path gets pre-pended to itself each time.

Signed-off-by: Rob Herring 
---
 common/cmd_pxe.c |   23 ---
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index b8cb4f3..ac1bc56 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -96,24 +96,24 @@ static int format_mac_pxe(char *outbuf, size_t outbuf_len)
  * in. If bootfile isn't defined in the environment, return NULL, which should
  * be interpreted as "don't prepend anything to paths".
  */
-static int get_bootfile_path(char *bootfile_path, size_t bootfile_path_size)
+static int get_bootfile_path(const char *file_path, char *bootfile_path,
+size_t bootfile_path_size)
 {
char *bootfile, *last_slash;
-   size_t path_len;
+   size_t path_len = 0;
+
+   if (file_path[0] == '/')
+   goto ret;
 
bootfile = from_env("bootfile");
 
-   if (!bootfile) {
-   bootfile_path[0] = '\0';
-   return 1;
-   }
+   if (!bootfile)
+   goto ret;
 
last_slash = strrchr(bootfile, '/');
 
-   if (last_slash == NULL) {
-   bootfile_path[0] = '\0';
-   return 1;
-   }
+   if (last_slash == NULL)
+   goto ret;
 
path_len = (last_slash - bootfile) + 1;
 
@@ -126,6 +126,7 @@ static int get_bootfile_path(char *bootfile_path, size_t 
bootfile_path_size)
 
strncpy(bootfile_path, bootfile, path_len);
 
+ ret:
bootfile_path[path_len] = '\0';
 
return 1;
@@ -147,7 +148,7 @@ static int get_relfile(char *file_path, void *file_addr)
char *tftp_argv[] = {"tftp", NULL, NULL, NULL};
int err;
 
-   err = get_bootfile_path(relfile, sizeof(relfile));
+   err = get_bootfile_path(file_path, relfile, sizeof(relfile));
 
if (err < 0)
return err;
-- 
1.7.5.4

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


[U-Boot] [PATCH 7/7] pxe: add support for parsing local syslinux files

2012-03-28 Thread Rob Herring
From: Rob Herring 

Add a new command "sysboot" which parses syslinux menu files and boots
using kernel and initrd specified by menu files. The operation is similar
to "pxe boot" except local files on ext2 or fat filesystem are parsed.

Signed-off-by: Rob Herring 
---
 common/cmd_pxe.c |  139 ++---
 include/common.h |6 ++
 2 files changed, 137 insertions(+), 8 deletions(-)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 4ad067a..82b0a8e 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -132,6 +132,49 @@ static int get_bootfile_path(const char *file_path, char 
*bootfile_path,
return 1;
 }
 
+static int (*do_getfile)(char *file_path, char *file_addr);
+
+static int do_get_tftp(char *file_path, char *file_addr)
+{
+   char *tftp_argv[] = {"tftp", NULL, NULL, NULL};
+
+   tftp_argv[1] = file_addr;
+   tftp_argv[2] = file_path;
+
+   if (do_tftpb(NULL, 0, 3, tftp_argv))
+   return -ENOENT;
+
+   return 1;
+}
+
+static char *fs_argv[5];
+
+static int do_get_ext2(char *file_path, char *file_addr)
+{
+   fs_argv[0] = "ext2load";
+   fs_argv[3] = file_addr;
+   fs_argv[4] = file_path;
+
+   if (do_ext2load(NULL, 0, 5, fs_argv))
+   return -ENOENT;
+
+   return 1;
+}
+
+static int do_get_fat(char *file_path, char *file_addr)
+{
+   fs_argv[0] = "fatload";
+   fs_argv[3] = file_addr;
+   fs_argv[4] = file_path;
+
+   if (do_fat_fsload(NULL, 0, 5, fs_argv))
+   return -ENOENT;
+
+   return 1;
+}
+
+
+
 /*
  * As in pxelinux, paths to files referenced from files we retrieve are
  * relative to the location of bootfile. get_relfile takes such a path and
@@ -145,7 +188,6 @@ static int get_relfile(char *file_path, void *file_addr)
size_t path_len;
char relfile[MAX_TFTP_PATH_LEN+1];
char addr_buf[10];
-   char *tftp_argv[] = {"tftp", NULL, NULL, NULL};
int err;
 
err = get_bootfile_path(file_path, relfile, sizeof(relfile));
@@ -170,13 +212,7 @@ static int get_relfile(char *file_path, void *file_addr)
 
sprintf(addr_buf, "%p", file_addr);
 
-   tftp_argv[1] = addr_buf;
-   tftp_argv[2] = relfile;
-
-   if (do_tftpb(NULL, 0, 3, tftp_argv))
-   return -ENOENT;
-
-   return 1;
+   return do_getfile(relfile, addr_buf);
 }
 
 /*
@@ -322,6 +358,8 @@ do_pxe_get(cmd_tbl_t *cmdtp, int flag, int argc, char * 
const argv[])
void *pxefile_addr_r;
int err;
 
+   do_getfile = do_get_tftp;
+
if (argc != 1)
return CMD_RET_USAGE;
 
@@ -1331,6 +1369,8 @@ do_pxe_boot(cmd_tbl_t *cmdtp, int flag, int argc, char * 
const argv[])
struct pxe_menu *cfg;
char *pxefile_addr_str;
 
+   do_getfile = do_get_tftp;
+
if (argc == 1) {
pxefile_addr_str = from_env("pxefile_addr_r");
if (!pxefile_addr_str)
@@ -1391,3 +1431,86 @@ U_BOOT_CMD(
"get - try to retrieve a pxe file using tftp\npxe "
"boot [pxefile_addr_r] - boot from the pxe file at pxefile_addr_r\n"
 );
+
+/*
+ * Boots a system using a local disk syslinux/extlinux file
+ *
+ * Returns 0 on success, 1 on error.
+ */
+int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+   unsigned long pxefile_addr_r;
+   struct pxe_menu *cfg;
+   char *pxefile_addr_str;
+   char *filename;
+   int prompt = 0;
+
+   if (strstr(argv[1], "-p")) {
+   prompt = 1;
+   argc--;
+   argv++;
+   }
+
+   if (argc < 4)
+   return cmd_usage(cmdtp);
+
+   if (argc < 5) {
+   pxefile_addr_str = from_env("pxefile_addr_r");
+   if (!pxefile_addr_str)
+   return 1;
+   } else {
+   pxefile_addr_str = argv[4];
+   }
+
+   if (argc < 6)
+   filename = getenv("bootfile");
+   else {
+   filename = argv[5];
+   setenv("bootfile", filename);
+   }
+
+   if (strstr(argv[3], "ext2"))
+   do_getfile = do_get_ext2;
+   else if (strstr(argv[3], "fat"))
+   do_getfile = do_get_fat;
+   else {
+   printf("Invalid filesystem: %s\n", argv[3]);
+   return 1;
+   }
+   fs_argv[1] = argv[1];
+   fs_argv[2] = argv[2];
+
+   if (strict_strtoul(pxefile_addr_str, 16, &pxefile_addr_r) < 0) {
+   printf("Invalid pxefile address: %s\n", pxefile_addr_str);
+   return 1;
+   }
+
+   if (get_pxe_file(filename, (void *)pxefile_addr_r) < 0) {
+   printf("Error reading config file\n");
+   return 1;
+   }
+
+   cfg = parse_pxefile((char *)(pxefile_addr_r));
+
+   if (cfg == NULL) {
+   printf("Error parsing config file\n");
+   return 1;
+   }
+
+   if (prompt)
+   cfg->prompt = 1;
+
+   h

[U-Boot] [PATCH 6/7] pxe: parse initrd file from append string

2012-03-28 Thread Rob Herring
From: Rob Herring 

For syslinux, the initrd can be set in the append string as
"initrd=", so try to find it there if we haven't already set the
initrd.

Signed-off-by: Rob Herring 
---
 common/cmd_pxe.c |   15 ++-
 doc/README.pxe   |3 ---
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index ac1bc56..4ad067a 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -999,6 +999,7 @@ static int parse_label_menu(char **c, struct pxe_menu *cfg,
 static int parse_label(char **c, struct pxe_menu *cfg)
 {
struct token t;
+   int len;
char *s = *c;
struct pxe_label *label;
int err;
@@ -1033,10 +1034,22 @@ static int parse_label(char **c, struct pxe_menu *cfg)
 
case T_APPEND:
err = parse_sliteral(c, &label->append);
+   if (label->initrd)
+   break;
+   s = strstr(label->append, "initrd=");
+   if (!s)
+   break;
+   s += 7;
+   len = (int)(strchr(s, ' ') - s);
+   label->initrd = malloc(len + 1);
+   strncpy(label->initrd, s, len);
+   label->initrd[len] = '\0';
+
break;
 
case T_INITRD:
-   err = parse_sliteral(c, &label->initrd);
+   if (!label->initrd)
+   err = parse_sliteral(c, &label->initrd);
break;
 
case T_LOCALBOOT:
diff --git a/doc/README.pxe b/doc/README.pxe
index 95cd9b9..2bbf53d 100644
--- a/doc/README.pxe
+++ b/doc/README.pxe
@@ -224,9 +224,6 @@ PXELINUX and U-boot's pxe support.
 - U-boot's pxe expects U-boot uimg's as kernels.  Anything that would work
   with the 'bootm' command in U-boot could work with the 'pxe boot' command.
 
-- U-boot's pxe doesn't recognize initrd options in the append command - you
-  must specify initrd files using the initrd command.
-
 - U-boot's pxe only recognizes a single file on the initrd command line.  It
   could be extended to support multiple.
 
-- 
1.7.5.4

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


Re: [U-Boot] [PATCH] board/vpac270/onenand.c: Fix build errors

2012-03-28 Thread Marek Vasut
Dear Anatolij Gustschin,

> Building for vpac270_ond_256 configuration fails:
> 
> arch/arm/lib/libarm.o: In function `icache_disable':
> /home/ag/git/u-boot/arch/arm/lib/cache-cp15.c:156: multiple
> definition of `icache_disable'
> board/vpac270/libvpac270.o:/home/ag/git/u-boot/board/vpac270/onenand.c:65:
> first defined here
> arch/arm/lib/libarm.o: In function `dcache_disable':
> /home/ag/git/u-boot/arch/arm/lib/cache-cp15.c:188: multiple
> definition of `dcache_disable'
> board/vpac270/libvpac270.o:/home/ag/git/u-boot/board/vpac270/onenand.c:66:
> first defined here
> make[1]: *** [/home/ag/git/u-boot/spl/u-boot-spl] Error 1

A ... bad, bad maintainer I am. :-(

> 
> Signed-off-by: Anatolij Gustschin 
> Cc: Marek Vasut 
> ---
> Hi Marek,
> 
> After pulling Albert's u-boot-arm.git master and running
> build tests I see this error. Is this fix correct?
> 
> Anatolij
> 
>  board/vpac270/onenand.c |3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
> 
> diff --git a/board/vpac270/onenand.c b/board/vpac270/onenand.c
> index c2ae9a7..47f44c3 100644
> --- a/board/vpac270/onenand.c
> +++ b/board/vpac270/onenand.c
> @@ -60,6 +60,3 @@ void __attribute__((noreturn)) hang(void)
>   for (;;)
>   ;
>  }
> -
> -void icache_disable(void) {}
> -void dcache_disable(void) {}

Looks ok:

Acked-by: Marek Vasut 


Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] POLL: DEVELOPER's MEETING

2012-03-28 Thread Mike Frysinger
On Friday 16 March 2012 06:54:39 Wolfgang Denk wrote:
> thanks for all the feedback regarding a U-Boot Developer's Meeting.
> As I lost track of who said what, I have set up a poll at Doodle.

looks like the poll shows an answer ?  can we make a decision on this ?
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/2] OMAP: Move omap1510inn to Unmaintained / Orphaned

2012-03-28 Thread Tom Rini
After removing omap1610inn for not building, move omap1510inn to
orphaned.  Also update boards.cfg to note it's part of the 'omap' SoC to
make sure the board is built more often and future breakage noticed
quicker.

Signed-off-by: Tom Rini 
---
 MAINTAINERS |7 +++
 boards.cfg  |2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 72f8b64..708ded7 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -669,10 +669,6 @@ Igor Grinberg 
 
cm-t35  ARM ARMV7 (OMAP3xx Soc)
 
-Kshitij Gupta 
-
-   omap1510inn ARM925T
-
 Stefan Herbrechtsmeier 
 
dns325  ARM926EJS (Kirkwood SoC)
@@ -941,6 +937,9 @@ Sughosh Ganu 
 Unknown / orphaned boards:
Board   CPU Last known maintainer / Comment
 .
+
+   omap1510inn ARM925T Kshitij Gupta 
+
lubbock xscale/pxa  Kyle Harris  / 
dead address
 
imx31_phycore_eet i.MX31  Guennadi Liakhovetski  
/ resigned
diff --git a/boards.cfg b/boards.cfg
index 1ea0c9b..3bcaeda 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -63,7 +63,7 @@ cm4008   arm arm920t -
   -
 cm41xx   arm arm920t -   - 
 ks8695
 VCMA9arm arm920t vcma9   mpl   
 s3c24x0
 smdk2410 arm arm920t -   
samsungs3c24x0
-omap1510inn  arm arm925t -   ti
+omap1510inn  arm arm925t -   ti
 omap
 integratorap_cm926ejsarm arm926ejs   integrator  
armltd -   integratorap:CM926EJ_S
 integratorcp_cm926ejsarm arm926ejs   integrator  
armltd -   integratorcp:CM924EJ_S
 aspenite arm arm926ejs   -   
Marvellarmada100
-- 
1.7.0.4

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


[U-Boot] [PATCH 1/2] OMAP: Remove omap1610inn-based boards

2012-03-28 Thread Tom Rini
The CS_AUTOBOOT configurations have been broken for a long time.
Kshitij Gupta is no longer at TI making these broken and orphaned
boards, so remove.

Signed-off-by: Tom Rini 
---
 MAINTAINERS  |1 -
 board/ti/omap1610inn/Makefile|   45 ---
 board/ti/omap1610inn/config.mk   |   26 --
 board/ti/omap1610inn/flash.c |  495 --
 board/ti/omap1610inn/lowlevel_init.S |  452 ---
 board/ti/omap1610inn/omap1610innovator.c |  309 ---
 boards.cfg   |8 -
 include/configs/omap1610h2.h |  197 
 include/configs/omap1610inn.h|  202 
 9 files changed, 0 insertions(+), 1735 deletions(-)
 delete mode 100644 board/ti/omap1610inn/Makefile
 delete mode 100644 board/ti/omap1610inn/config.mk
 delete mode 100644 board/ti/omap1610inn/flash.c
 delete mode 100644 board/ti/omap1610inn/lowlevel_init.S
 delete mode 100644 board/ti/omap1610inn/omap1610innovator.c
 delete mode 100644 include/configs/omap1610h2.h
 delete mode 100644 include/configs/omap1610inn.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 46f63a0..72f8b64 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -672,7 +672,6 @@ Igor Grinberg 
 Kshitij Gupta 
 
omap1510inn ARM925T
-   omap1610inn ARM926EJS
 
 Stefan Herbrechtsmeier 
 
diff --git a/board/ti/omap1610inn/Makefile b/board/ti/omap1610inn/Makefile
deleted file mode 100644
index 2b8641f..000
--- a/board/ti/omap1610inn/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# (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  := omap1610innovator.o flash.o
-SOBJS  := lowlevel_init.o
-
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS))
-SOBJS  := $(addprefix $(obj),$(SOBJS))
-
-$(LIB):$(obj).depend $(OBJS) $(SOBJS)
-   $(call cmd_link_o_target, $(OBJS) $(SOBJS))
-
-#
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#
diff --git a/board/ti/omap1610inn/config.mk b/board/ti/omap1610inn/config.mk
deleted file mode 100644
index ee0aa0a..000
--- a/board/ti/omap1610inn/config.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# (C) Copyright 2002
-# Gary Jennejohn, DENX Software Engineering, 
-# David Mueller, ELSOFT AG, 
-#
-# (C) Copyright 2003
-# Texas Instruments, 
-# Kshitij Gupta 
-#
-# TI Innovator board with OMAP1610 (ARM925EJS) cpu
-# see http://www.ti.com/ for more information on Texas Instruments
-#
-# Innovator has 1 bank of 256 MB SDRAM
-# Physical Address:
-# 1000' to 2000'
-#
-#
-# Linux-Kernel is expected to be at 1000'8000, entry 1000'8000
-# (mem base + reserved)
-#
-# we load ourself to 1108'
-#
-#
-
-
-CONFIG_SYS_TEXT_BASE = 0x1108
diff --git a/board/ti/omap1610inn/flash.c b/board/ti/omap1610inn/flash.c
deleted file mode 100644
index a99a91c..000
--- a/board/ti/omap1610inn/flash.c
+++ /dev/null
@@ -1,495 +0,0 @@
-/*
- * (C) Copyright 2001
- * Kyle Harris, Nexus Technologies, Inc. khar...@nexus-tech.net
- *
- * (C) Copyright 2001-2004
- * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
- *
- * (C) Copyright 2003
- * Texas Instruments, 
- * Kshitij Gupta 
- *
- * 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 

Re: [U-Boot] [PATCH] board/ti/beagle/beagle.c: Fix build warnings

2012-03-28 Thread Tom Rini
On Wed, Mar 28, 2012 at 11:05:07AM +0200, Anatolij Gustschin wrote:

> Fix:
> beagle.c:257:13: warning: function declaration isn't a prototype
> [-Wstrict-prototypes]
> beagle.c:257:13: warning: function declaration isn't a prototype
> [-Wstrict-prototypes]
> 
> Also make beagle_dvi_pup() checkpatch clean, fix:
> ERROR: open brace '{' following function declarations go on the
> next line
> 
> Signed-off-by: Anatolij Gustschin 
> Cc: Tom Rini 

Queued for u-boot-ti/master (Albert hasn't pushed his latest updates
yet), thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH] arch/arm/cpu/armv7/omap-common/clocks-common.c: Fix build warnings

2012-03-28 Thread Tom Rini
On Wed, Mar 28, 2012 at 11:13:43AM +0200, Anatolij Gustschin wrote:
> Fix:
> clocks-common.c: In function 'setup_non_essential_dplls':
> clocks-common.c:323:6: warning: variable 'sys_clk_khz' set but not used
> [-Wunused-but-set-variable]
> clocks-common.c: In function 'setup_non_essential_dplls':
> clocks-common.c:323:6: warning: variable 'sys_clk_khz' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Anatolij Gustschin 
> Cc: Tom Rini 

Queued for u-boot-ti/master (Albert hasn't pushed his latest updates
yet), thanks!

-- 
Tom


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


Re: [U-Boot] Using qemu-system-ppc to boot U-Boot

2012-03-28 Thread Frank Svendsbøe
On Tue, Mar 27, 2012 at 11:55 PM, Tom Rini  wrote:
> On Tue, Mar 27, 2012 at 03:59:48PM -0500, Scott Wood wrote:
>> On 03/27/2012 03:53 PM, Wolfgang Denk wrote:
>> > Dear Frank,
>> >
>> > In message 
>> >  you 
>> > wrote:
>> >>
>> >> I'm trying to figure out if anyone has ported a PPC system to QEMU
>> >> that is capable of booting U-Boot. Similar to the ARM versatilepb
>> >> target, but for PPC instead. I've tried the Bamboo and MPC8544DS but
>> >> it seems they only use stubs to OS calls and parses a DTB for info.
>> >
>> > Did you check which configurations the Yocto project are using?  They
>> > provide qemu based emulations for ARM, MIPS, PPC and x86, and I would
>> > be really surprised if the ARM and PPC configs were not based on
>> > U-Boot ...  [ARM: beagleboard; PPC: mpc8315e-rdb; MIPS:
>> > routerstationpro]
>>
>> I'm not familiar with what Yocto does, but at least for Freescale PPC
>> chips QEMU does not emulate enough of the hardware to run U-Boot (at
>> least, not without significant U-Boot hacking that I'm not aware of
>> anyone having done).  QEMU loads Linux directly.
>
> Putting my OE-guy hat on, the qemu-ppc target used is 'mac99'.  It was
> switched over from prep back in January of this year.  From my own past
> diggings, there's not really a newer machine option as all of the
> support added to qemu from Freescale and IBM has been kvm-oriented
> rather than full machine emulation oriented.  So to run U-Boot under
> qemu on a BE machine, you'd need to port U-Boot over.  Or, build the
> sandbox arch on a BE host, such as Linux running under qemu-ppc.  Then
> it should be BE, yes?
>

KVM would be fine if I wanted to run Linux here, but I don't... Well I
do, but my current employer don't. BE is a requirement yes. In fact,
more so than running than a PPC compatible system.

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


Re: [U-Boot] Using qemu-system-ppc to boot U-Boot

2012-03-28 Thread Frank Svendsbøe
On Wed, Mar 28, 2012 at 12:16 AM, Marek Vasut  wrote:
> Dear Scott Wood,
>
>> On 03/27/2012 03:53 PM, Wolfgang Denk wrote:
>> > Dear Frank,
>> >
>> > In message
>  you 
> wrote:
>> >> I'm trying to figure out if anyone has ported a PPC system to QEMU
>> >> that is capable of booting U-Boot. Similar to the ARM versatilepb
>> >> target, but for PPC instead. I've tried the Bamboo and MPC8544DS but
>> >> it seems they only use stubs to OS calls and parses a DTB for info.
>> >
>> > Did you check which configurations the Yocto project are using?  They
>> > provide qemu based emulations for ARM, MIPS, PPC and x86, and I would
>> > be really surprised if the ARM and PPC configs were not based on
>> > U-Boot ...  [ARM: beagleboard; PPC: mpc8315e-rdb; MIPS:
>> > routerstationpro]
>>
>> I'm not familiar with what Yocto does, but at least for Freescale PPC
>> chips QEMU does not emulate enough of the hardware to run U-Boot (at
>> least, not without significant U-Boot hacking that I'm not aware of
>> anyone having done).  QEMU loads Linux directly.
>>
>> I don't see mpc83xx support in QEMU at all.
>
> Yep, either bamboo or taihu don't boot for me in qemu :-(
>
>>

Hi Marek,
taihu was my next target to test, so thanks for sparing my time. Next
would be to try to dig up a target called Walnut. Check this:
http://lists.denx.de/pipermail/u-boot/2008-November/043400.html

I cannot see that QEMU lists walnut as a target. Maybe the patches wasn't sent?

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


Re: [U-Boot] Any outstanding ARM pull requests?

2012-03-28 Thread Rob Herring
Albert, Wolfgang,

On 03/08/2012 10:07 AM, Rob Herring wrote:
> 
> On 03/08/2012 01:20 AM, Albert ARIBAUD wrote:
>> Hi all,
>>
>> On my working repo where I have all ARM subrepos as remotes, a
>>
>> git branch -r --no-merged | grep '/master'
>>
>> with HEAD set to my master branch gives the following:
>>
>>   u-boot-atmel/master
>>   u-boot-atmel/master-arm
>>   u-boot-imx/master
>>   u-boot-pxa/master
>>   u-boot-samsung/master
>>   u-boot-tegra/master
>>
>> Which means there are commmits on these repo's master branches that are
>> not currently in u-boot-arm.
>>
>> Are there any ARM pull requests pending that I would have missed or are
>> about to be sent?
>>
>> Amicalement,
> 
> The highbank fixes are still not applied. You can get them off the list
> or here's a pull request again:
> 
> The following changes since commit 2acca35ce4604dcef933f07d90aa9c9c930e1049:
> 
>   Merge branch 'master' of git://git.denx.de/u-boot-mmc (2012-02-17
> 23:54:46 +0100)
> 
> are available in the git repository at:
> 
>   git://sources.calxeda.com/u-boot.git fixes
> 
> Rob Herring (4):
>   net: calxedaxgmac: fix build due to missing __aligned definition
>   ARM: highbank: fix warning for calxedaxgmac_initialize
>   ARM: highbank: add missing get_tbclk
>   ARM: highbank: fix us_to_tick calculation
> 
>  arch/arm/cpu/armv7/highbank/timer.c |9 +++--
>  board/highbank/highbank.c   |1 +
>  drivers/net/calxedaxgmac.c  |1 +
>  3 files changed, 9 insertions(+), 2 deletions(-)
> 

Can one of you please apply these fixes for highbank. The build has been
broken for nearly 3 months since this commit. This commit broke things
due to Wolfgang's fixup of aligned attribute. I submitted the fix nearly
2 months ago.

commit efdd731957caff85db619636a972b7f5404ea9b4
Author: Rob Herring 
Date:   Thu Dec 15 11:15:49 2011 +

net: add Calxeda xgmac driver

This adds ethernet driver for Calxeda xgmac found on Highbank SOC.

Signed-off-by: Rob Herring 

Fix: WARNING: __aligned(size) is preferred over
__attribute__((aligned(size)))
Signed-off-by: Wolfgang Denk 


Then it was broken in a second place with this commit due to missing
get_tbclk:

commit 9c3483113de1204118a1b252bf4c81b899dd12b4
Author: Heiko Schocher 
Date:   Mon Jan 16 21:13:05 2012 +

common: add possibility for readline_into_buffer timeout

add possibility to add a timeout when reading a line
into a buffer.

Signed-off-by: Heiko Schocher 
Cc: Mike Frysinger 
Acked-by: Mike Frysinger 



I've rebased the fixes branch again to current master, so here's an
updated pull request:

The following changes since commit 7cb30b13f12077c7eec8ce2419cd96cd65ace8e2:

  Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash
(2012-03-23 21:59:16 +0100)

are available in the git repository at:

  git://sources.calxeda.com/u-boot.git fixes

Rob Herring (4):
  net: calxedaxgmac: fix build due to missing __aligned definition
  ARM: highbank: fix warning for calxedaxgmac_initialize
  ARM: highbank: add missing get_tbclk
  ARM: highbank: fix us_to_tick calculation

 arch/arm/cpu/armv7/highbank/timer.c |9 +++--
 board/highbank/highbank.c   |1 +
 drivers/net/calxedaxgmac.c  |1 +
 3 files changed, 9 insertions(+), 2 deletions(-)

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


[U-Boot] [PATCH] mx6qsabrelite: Fix the serial console port

2012-03-28 Thread Fabio Estevam
On mx6qsabrelite the console is ttymxc1.

Signed-off-by: Fabio Estevam 
---
 include/configs/mx6qsabrelite.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/configs/mx6qsabrelite.h b/include/configs/mx6qsabrelite.h
index 8bc8a83..2643817 100644
--- a/include/configs/mx6qsabrelite.h
+++ b/include/configs/mx6qsabrelite.h
@@ -116,7 +116,7 @@
 #define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
"uimage=uImage\0" \
-   "console=ttymxc3\0" \
+   "console=ttymxc1\0" \
"fdt_high=0x\0"   \
"initrd_high=0x\0" \
"mmcdev=0\0" \
-- 
1.7.1


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


[U-Boot] [PATCH 1/2] fdt: Avoid early panic() when there is no FDT present

2012-03-28 Thread Simon Glass
CONFIG_OF_CONTROL requires a valid device tree. However, we cannot call
panic() before the console is set up since the message does not appear,
and we get a silent failure.

Remove the panic from fdtdec_check_fdt() and provide a new function to
prepare the fdt for use. This will be called after the console is ready.

Signed-off-by: Simon Glass 
---
 include/fdtdec.h |   17 +++--
 lib/fdtdec.c |   24 +++-
 2 files changed, 34 insertions(+), 7 deletions(-)

diff --git a/include/fdtdec.h b/include/fdtdec.h
index 766e0bd..d45acbe 100644
--- a/include/fdtdec.h
+++ b/include/fdtdec.h
@@ -157,8 +157,21 @@ s32 fdtdec_get_int(const void *blob, int node, const char 
*prop_name,
 int fdtdec_get_is_enabled(const void *blob, int node);
 
 /**
- * Checks whether we have a valid fdt available to control U-Boot, and panic
- * if not.
+ * Make sure we have a valid fdt available to control U-Boot.
+ *
+ * If not, a message is printed to the console if the console is ready.
+ *
+ * @return 0 if all ok, -1 if not
+ */
+int fdtdec_prepare_fdt(void);
+
+/**
+ * Checks that we have a valid fdt available to control U-Boot.
+
+ * However, if not then for the moment nothing is done, since this function
+ * is called too early to panic().
+ *
+ * @returns 0
  */
 int fdtdec_check_fdt(void);
 
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 9241d13..0fb6d17 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -276,17 +276,31 @@ int fdtdec_add_aliases_for_id(const void *blob, const 
char *name,
return num_found;
 }
 
+int fdtdec_check_fdt(void)
+{
+   /*
+* We must have an FDT, but we cannot panic() yet since the console
+* is not ready. So for now, just assert(). Boards which need an early
+* FDT (prior to console ready) will need to make their own
+* arrangements and do their own checks.
+*/
+   assert(!fdtdec_prepare_fdt());
+   return 0;
+}
+
 /*
  * This function is a little odd in that it accesses global data. At some
  * point if the architecture board.c files merge this will make more sense.
  * Even now, it is common code.
  */
-int fdtdec_check_fdt(void)
+int fdtdec_prepare_fdt(void)
 {
-   /* We must have an fdt */
-   if (((uintptr_t)gd->fdt_blob & 3) || fdt_check_header(gd->fdt_blob))
-   panic("No valid fdt found - please append one to U-Boot\n"
-   "binary or define CONFIG_OF_EMBED\n");
+   if (((uintptr_t)gd->fdt_blob & 3) || fdt_check_header(gd->fdt_blob)) {
+   printf("No valid FDT found - please append one to U-Boot "
+   "binary, use u-boot-dtb.bin or define "
+   "CONFIG_OF_EMBED\n");
+   return -1;
+   }
return 0;
 }
 
-- 
1.7.7.3

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


[U-Boot] [PATCH 2/2] arm: Check for valid FDT after console is up

2012-03-28 Thread Simon Glass
When using CONFIG_OF_CONTROL, add a check that we have a valid FDT
and panic() if not. This must be done after the console is ready.

Signed-off-by: Simon Glass 
---
 arch/arm/lib/board.c |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 81293c3..ab88e9c 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -291,6 +291,14 @@ void board_init_f(ulong bootflag)
}
}
 
+#ifdef CONFIG_OF_CONTROL
+   /* For now, put this check after the console is ready */
+   if (fdtdec_prepare_fdt()) {
+   panic("** CONFIG_OF_CONTROL defined but no FDT - please see "
+   "doc/README.fdt-control");
+   }
+#endif
+
debug("monitor len: %08lX\n", gd->mon_len);
/*
 * Ram is setup, size stored in gd !!
-- 
1.7.7.3

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


Re: [U-Boot] [PATCH 1/2] fdt: Avoid early panic() when there is no FDT present

2012-03-28 Thread Tom Warren
Simon,

> -Original Message-
> From: Simon Glass [mailto:s...@chromium.org]
> Sent: Wednesday, March 28, 2012 1:08 PM
> To: U-Boot Mailing List
> Cc: Tom Warren; Stephen Warren; Albert Aribaud; Simon Glass; Jerry Van
> Baren; Devicetree Discuss
> Subject: [PATCH 1/2] fdt: Avoid early panic() when there is no FDT present
> 
> CONFIG_OF_CONTROL requires a valid device tree. However, we cannot call
> panic() before the console is set up since the message does not appear, and
> we get a silent failure.
> 
> Remove the panic from fdtdec_check_fdt() and provide a new function to
> prepare the fdt for use. This will be called after the console is ready.
> 
> Signed-off-by: Simon Glass 

Tested-by: Tom Warren 
Acked-by: Tom Warren 

> ---
>  include/fdtdec.h |   17 +++--
>  lib/fdtdec.c |   24 +++-
>  2 files changed, 34 insertions(+), 7 deletions(-)
> 
> diff --git a/include/fdtdec.h b/include/fdtdec.h index 766e0bd..d45acbe
> 100644
> --- a/include/fdtdec.h
> +++ b/include/fdtdec.h
> @@ -157,8 +157,21 @@ s32 fdtdec_get_int(const void *blob, int node, const
> char *prop_name,  int fdtdec_get_is_enabled(const void *blob, int node);
> 
>  /**
> - * Checks whether we have a valid fdt available to control U-Boot, and
> panic
> - * if not.
> + * Make sure we have a valid fdt available to control U-Boot.
> + *
> + * If not, a message is printed to the console if the console is ready.
> + *
> + * @return 0 if all ok, -1 if not
> + */
> +int fdtdec_prepare_fdt(void);
> +
> +/**
> + * Checks that we have a valid fdt available to control U-Boot.
> +
> + * However, if not then for the moment nothing is done, since this
> + function
> + * is called too early to panic().
> + *
> + * @returns 0
>   */
>  int fdtdec_check_fdt(void);
> 
> diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 9241d13..0fb6d17 100644
> --- a/lib/fdtdec.c
> +++ b/lib/fdtdec.c
> @@ -276,17 +276,31 @@ int fdtdec_add_aliases_for_id(const void *blob, const
> char *name,
>   return num_found;
>  }
> 
> +int fdtdec_check_fdt(void)
> +{
> + /*
> +  * We must have an FDT, but we cannot panic() yet since the console
> +  * is not ready. So for now, just assert(). Boards which need an
> early
> +  * FDT (prior to console ready) will need to make their own
> +  * arrangements and do their own checks.
> +  */
> + assert(!fdtdec_prepare_fdt());
> + return 0;
> +}
> +
>  /*
>   * This function is a little odd in that it accesses global data. At some
>   * point if the architecture board.c files merge this will make more sense.
>   * Even now, it is common code.
>   */
> -int fdtdec_check_fdt(void)
> +int fdtdec_prepare_fdt(void)
>  {
> - /* We must have an fdt */
> - if (((uintptr_t)gd->fdt_blob & 3) || fdt_check_header(gd->fdt_blob))
> - panic("No valid fdt found - please append one to U-Boot\n"
> - "binary or define CONFIG_OF_EMBED\n");
> + if (((uintptr_t)gd->fdt_blob & 3) || fdt_check_header(gd->fdt_blob))
> {
> + printf("No valid FDT found - please append one to U-Boot "
> + "binary, use u-boot-dtb.bin or define "
> + "CONFIG_OF_EMBED\n");
> + return -1;
> + }
>   return 0;
>  }
> 
> --
> 1.7.7.3
-- 
nvpublic
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] arm: Check for valid FDT after console is up

2012-03-28 Thread Tom Warren
Simon,

> -Original Message-
> From: Simon Glass [mailto:s...@chromium.org]
> Sent: Wednesday, March 28, 2012 1:08 PM
> To: U-Boot Mailing List
> Cc: Tom Warren; Stephen Warren; Albert Aribaud; Simon Glass
> Subject: [PATCH 2/2] arm: Check for valid FDT after console is up
> 
> When using CONFIG_OF_CONTROL, add a check that we have a valid FDT and
> panic() if not. This must be done after the console is ready.
> 
> Signed-off-by: Simon Glass 

This works (u-boot.bin gives an error message and then resets). If you're happy 
with the constant reset loop and not a hang, I'm OK with it, too.

Tested-by: Tom Warren 
Acked-by: Tom Warren 

> ---
>  arch/arm/lib/board.c |8 
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index
> 81293c3..ab88e9c 100644
> --- a/arch/arm/lib/board.c
> +++ b/arch/arm/lib/board.c
> @@ -291,6 +291,14 @@ void board_init_f(ulong bootflag)
>   }
>   }
> 
> +#ifdef CONFIG_OF_CONTROL
> + /* For now, put this check after the console is ready */
> + if (fdtdec_prepare_fdt()) {
> + panic("** CONFIG_OF_CONTROL defined but no FDT - please see "
> + "doc/README.fdt-control");
> + }
> +#endif
> +
>   debug("monitor len: %08lX\n", gd->mon_len);
>   /*
>* Ram is setup, size stored in gd !!
> --
> 1.7.7.3
-- 
nvpublic
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] arm: Check for valid FDT after console is up

2012-03-28 Thread Simon Glass
+Wolfgang

Hi Tom,

On Wed, Mar 28, 2012 at 1:34 PM, Tom Warren  wrote:
> Simon,
>
>> -Original Message-
>> From: Simon Glass [mailto:s...@chromium.org]
>> Sent: Wednesday, March 28, 2012 1:08 PM
>> To: U-Boot Mailing List
>> Cc: Tom Warren; Stephen Warren; Albert Aribaud; Simon Glass
>> Subject: [PATCH 2/2] arm: Check for valid FDT after console is up
>>
>> When using CONFIG_OF_CONTROL, add a check that we have a valid FDT and
>> panic() if not. This must be done after the console is ready.
>>
>> Signed-off-by: Simon Glass 
>
> This works (u-boot.bin gives an error message and then resets). If you're 
> happy with the constant reset loop and not a hang, I'm OK with it, too.
>
> Tested-by: Tom Warren 
> Acked-by: Tom Warren 

Thanks. You can define CONFIG_PANIC_HANG for that behaviour.

I would like to get these applied for the upcoming release, since the
recent revert of the pre-console putc() has left us otherwise
completely without a solution to this problem.

Regards,
Simon


>
>> ---
>>  arch/arm/lib/board.c |    8 
>>  1 files changed, 8 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index
>> 81293c3..ab88e9c 100644
>> --- a/arch/arm/lib/board.c
>> +++ b/arch/arm/lib/board.c
>> @@ -291,6 +291,14 @@ void board_init_f(ulong bootflag)
>>               }
>>       }
>>
>> +#ifdef CONFIG_OF_CONTROL
>> +     /* For now, put this check after the console is ready */
>> +     if (fdtdec_prepare_fdt()) {
>> +             panic("** CONFIG_OF_CONTROL defined but no FDT - please see "
>> +                     "doc/README.fdt-control");
>> +     }
>> +#endif
>> +
>>       debug("monitor len: %08lX\n", gd->mon_len);
>>       /*
>>        * Ram is setup, size stored in gd !!
>> --
>> 1.7.7.3
> --
> nvpublic
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] BOOT: Add RAW ramdisk support to bootz

2012-03-28 Thread Marek Vasut
Dear Wolfgang Denk,

> > Dear Marek Vasut,
> > 
> > In message <201203221745.16226.marek.va...@gmail.com> you wrote:
> > > > > Dear Wolfgang Denk, are we OK with applying this and bootz patch
> > > > > please? Can we get it into .04 release please?
> > > > 
> > > > "this" - which patch version exactly are you referring to?
> > > 
> > > Revision V6.
> > 
> > Could you please be a bit more specific?  Like posting a link to the
> > respective message on gmane, or in patchwork?
> 
> http://patchwork.ozlabs.org/patch/146848/
> http://patchwork.ozlabs.org/patch/147440/
> 
> > The Subject: of this message is "BOOT: Add RAW ramdisk support to
> > bootz", but I have not seen any V6 for this patch.  Ican only guess
> > that you might be referring to [PATCH V6] BOOT: Add "bootz" command to
> > boot Linux zImage on ARM - but I'd rather be sure.
> 
> Yes, see above two links please.
> 
> > > I believe this patch is quite important to the linux-arm people and
> > > early adoption of this stuff would be very beneficial. Also, there are
> > > other patches that were applied after the MW was closed. Finally, this
> > > patch started long before .04 release cycle.
> > 
> > Where/when?
> 
> If you mean the patch, here:
> http://patchwork.ozlabs.org/patch/125318/
> 
> If you talk about accepting patches way past MW, almost all the time, at
> least in the ARM stuffs. And this works OK so far I believe, I see no
> breakage. Also, we didn't reach the RC phase yet either. Lastly, this
> change is not intrusive in any way.
> 
> > Best regards,
> > 
> > Wolfgang Denk

Did you made up your mind on this patch please?

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] arm: Check for valid FDT after console is up

2012-03-28 Thread Stephen Warren
On 03/28/2012 02:08 PM, Simon Glass wrote:
> When using CONFIG_OF_CONTROL, add a check that we have a valid FDT
> and panic() if not. This must be done after the console is ready.
> 
> Signed-off-by: Simon Glass 

Excellent. The behavior after this series is exactly what I was looking for.

One query on this patch though: Is there a need for
arch/arm/lib/board.c:init_sequence[] to still include the call to
fdtdec_check_fdt()? After all, if the console doesn't come from FDT,
then the panic() call this patch adds will show the message so there's
no need to check it earlier, and if the console does come from FDT,
there's little point executing that early assert() since the message
goes nowhere - presumably the code that extracts the console from FDT
would perform this panic if required. So, I would have just moved the
call to the existing fdtdec_check_fdt() myself, rather than splitting it
into two.

Still, as far as I'm concerned, this comment can be addressed in a later
cleanup patch. So, the series:

Tested-by: Stephen Warren 
Acked-by: Stephen Warren 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Any outstanding ARM pull requests?

2012-03-28 Thread Albert ARIBAUD

Hi Rob,


The following changes since commit 7cb30b13f12077c7eec8ce2419cd96cd65ace8e2:

   Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash
(2012-03-23 21:59:16 +0100)

are available in the git repository at:

   git://sources.calxeda.com/u-boot.git fixes

Rob Herring (4):
   net: calxedaxgmac: fix build due to missing __aligned definition
   ARM: highbank: fix warning for calxedaxgmac_initialize
   ARM: highbank: add missing get_tbclk


These three are OK and applied to u-boot-arm/master.


   ARM: highbank: fix us_to_tick calculation


This one is part of a 6-patch set, the whole of which should go in if 
the fix is to go. Whole set applied to u-boot-arm/master, with a minor 
correction to patch 5/6 which had line with a whitespace error.



  arch/arm/cpu/armv7/highbank/timer.c |9 +++--
  board/highbank/highbank.c   |1 +
  drivers/net/calxedaxgmac.c  |1 +
  3 files changed, 9 insertions(+), 2 deletions(-)

Regards,
Rob


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


Re: [U-Boot] [PATCH 2/2] arm: Check for valid FDT after console is up

2012-03-28 Thread Simon Glass
Hi Stephen,

On Wed, Mar 28, 2012 at 2:11 PM, Stephen Warren  wrote:
> On 03/28/2012 02:08 PM, Simon Glass wrote:
>> When using CONFIG_OF_CONTROL, add a check that we have a valid FDT
>> and panic() if not. This must be done after the console is ready.
>>
>> Signed-off-by: Simon Glass 
>
> Excellent. The behavior after this series is exactly what I was looking for.

Thanks, I'm pleased. The behavior was never in question, only the
means to make it work.

>
> One query on this patch though: Is there a need for
> arch/arm/lib/board.c:init_sequence[] to still include the call to
> fdtdec_check_fdt()? After all, if the console doesn't come from FDT,
> then the panic() call this patch adds will show the message so there's
> no need to check it earlier, and if the console does come from FDT,
> there's little point executing that early assert() since the message
> goes nowhere - presumably the code that extracts the console from FDT
> would perform this panic if required. So, I would have just moved the
> call to the existing fdtdec_check_fdt() myself, rather than splitting it
> into two.

I did certainly look at this, but I know we are going to hit this
problem again. As you say the console-from-FDT code will currently
have to do its own check, and I'm not entirely comfortable with that -
it would be nice it the fdtdec_check_fdt() could actually do something
useful. But I'm going to wait until another sub-arch has FDT support
(and I have put up my fdt_serial series) before worrying about it
further.

>
> Still, as far as I'm concerned, this comment can be addressed in a later
> cleanup patch. So, the series:
>
> Tested-by: Stephen Warren 
> Acked-by: Stephen Warren 

Great!

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


[U-Boot] pull request for u-boot-tegra/master

2012-03-28 Thread Tom Warren
Albert,

Please pull u-boot-tegra/master into arm master. Thanks!

The following changes since commit 4a3ea216414ad762b3718775a65437c13f0accbc:

  ARM: highbank: setup env from boot source register (2012-03-28 23:34:27 +0200)

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

Simon Glass (32):
  fdt: Add fdtdec_find_aliases() to deal with alias nodes
  fdt: Add tests for fdtdec
  fdt: Tidy up a few fdtdec problems
  fdt: Add functions to access phandles, arrays and bools
  fdt: Add basic support for decoding GPIO definitions
  arm: fdt: Add skeleton device tree file from kernel
  tegra: fdt: Add Tegra2x device tree file from kernel
  tegra: fdt: Add device tree file for Tegra2 Seaboard from kernel
  fdt: Add staging area for device tree binding documentation
  fdt: Add tegra-usb bindings file from linux
  tegra: fdt: Add additional USB binding
  tegra: fdt: Add clock bindings
  tegra: fdt: Add clock bindings for Tegra2 Seaboard
  tegra: usb: fdt: Add additional device tree definitions for USB ports
  tegra: usb: fdt: Add USB definitions for Tegra2 Seaboard
  usb: Add support for txfifo threshold
  tegra: fdt: Add function to return peripheral/clock ID
  tegra: usb: Add support for Tegra USB peripheral
  fdt: Avoid early panic() when there is no FDT present
  arm: Check for valid FDT after console is up
  tegra: usb: Add USB support to nvidia boards
  tegra: usb: Add common USB defines for tegra2 boards
  tegra: usb: Enable USB on Seaboard
  tegra: fdt: Enable FDT support for Seaboard
  tegra: Rename NV_PA_PMC_BASE to TEGRA2_PMC_BASE
  fdt: Add function to allow aliases to refer to multiple nodes
  tegra: Enhance clock support to handle 16-bit clock divisors
  tegra: i2c: Initialise I2C on Nvidia boards
  tegra: i2c: Select number of controllers for Tegra2 boards
  tegra: i2c: Enable I2C on Seaboard
  tegra: i2c: Select I2C ordering for Seaboard
  tegra: fdt: i2c: Add extra I2C bindings for U-Boot

Tom Warren (2):
  arm: Tegra2: Fix ELDK42 gcc failure with inline asm stack pointer load
  tegra: fdt: Enable FDT support for Ventana

Yen Lin (1):
  tegra: i2c: Add I2C driver

README |3 +
arch/arm/cpu/armv7/tegra2/Makefile |4 +-
arch/arm/cpu/armv7/tegra2/ap20.c   |   20 +-
arch/arm/cpu/armv7/tegra2/board.c  |2 +-
arch/arm/cpu/armv7/tegra2/clock.c  |  121 -
arch/arm/cpu/armv7/tegra2/config.mk|2 +
arch/arm/cpu/armv7/tegra2/usb.c|  460 
arch/arm/dts/skeleton.dtsi |   13 +
arch/arm/dts/tegra20.dtsi  |  196 +++
arch/arm/include/asm/arch-tegra2/clk_rst.h |   10 +-
arch/arm/include/asm/arch-tegra2/clock.h   |   13 +
arch/arm/include/asm/arch-tegra2/tegra2.h  |6 +-
arch/arm/include/asm/arch-tegra2/tegra_i2c.h   |  157 ++
arch/arm/include/asm/arch-tegra2/usb.h |  252 +
arch/arm/lib/board.c   |8 +
board/nvidia/common/board.c|   19 +
board/nvidia/common/board.h|6 +
board/nvidia/dts/tegra2-seaboard.dts   |   92 
board/nvidia/seaboard/seaboard.c   |6 +
doc/device-tree-bindings/README|   17 +
.../clock/nvidia,tegra20-car.txt   |  207 +++
doc/device-tree-bindings/i2c/tegra20-i2c.txt   |   23 +
doc/device-tree-bindings/usb/tegra-usb.txt |   25 +
drivers/i2c/Makefile   |1 +
drivers/i2c/tegra_i2c.c|  569 
drivers/usb/host/Makefile  |1 +
drivers/usb/host/ehci-hcd.c|7 +
drivers/usb/host/ehci-tegra.c  |   62 +++
drivers/usb/host/ehci.h|6 +-
include/configs/seaboard.h |   20 +
include/configs/tegra2-common.h|   13 +
include/configs/ventana.h  |5 +
include/fdtdec.h   |  197 +++-
lib/Makefile   |1 +
lib/fdtdec.c   |  323 +++-
lib/fdtdec_test.c  |  226 
36 files changed, 3038 insertions(+), 55 deletions(-)
create mode 100644 arch/arm/cpu/armv7/tegra2/usb.c
create mode 100644 arch/arm/dts/skeleton.dtsi
create mode 100644 arch/arm/dts/tegra20.dtsi
create mode 100644 arch/arm/include/asm/arch-tegra2/tegra_i2c.h
create mode 100644 arch/arm/include/asm/arch-tegra2/usb.h
create mode 100644 board/nvidia/dts/tegra2-seaboard.dts
create mode 100644 doc/device-tree-bindings/README
create mode 100644 doc/device-tree-

[U-Boot] Please pull u-boot-ti/master

2012-03-28 Thread Tom Rini
Hello,

The following changes since commit 4a3ea216414ad762b3718775a65437c13f0accbc:
  Rob Herring (1):
ARM: highbank: setup env from boot source register

are available in the git repository at:

  git://git.denx.de/u-boot-ti master

Anatolij Gustschin (2):
  board/ti/beagle/beagle.c: Fix build warnings
  arch/arm/cpu/armv7/omap-common/clocks-common.c: Fix build warnings

Tom Rini (3):
  sdrc.c: Fix typo in do_sdrc_init() for SPL
  OMAP: Remove omap1610inn-based boards
  OMAP: Move omap1510inn to Unmaintained / Orphaned

 MAINTAINERS|8 +-
 arch/arm/cpu/armv7/omap-common/clocks-common.c |4 +-
 arch/arm/cpu/armv7/omap3/sdrc.c|2 +-
 board/ti/beagle/beagle.c   |3 +-
 board/ti/omap1610inn/Makefile  |   45 ---
 board/ti/omap1610inn/config.mk |   26 --
 board/ti/omap1610inn/flash.c   |  495 
 board/ti/omap1610inn/lowlevel_init.S   |  452 -
 board/ti/omap1610inn/omap1610innovator.c   |  309 ---
 boards.cfg |   10 +-
 include/configs/omap1610h2.h   |  197 --
 include/configs/omap1610inn.h  |  202 --
 12 files changed, 8 insertions(+), 1745 deletions(-)
 delete mode 100644 board/ti/omap1610inn/Makefile
 delete mode 100644 board/ti/omap1610inn/config.mk
 delete mode 100644 board/ti/omap1610inn/flash.c
 delete mode 100644 board/ti/omap1610inn/lowlevel_init.S
 delete mode 100644 board/ti/omap1610inn/omap1610innovator.c
 delete mode 100644 include/configs/omap1610h2.h
 delete mode 100644 include/configs/omap1610inn.h


While not all of these patches have been around for long, they are
either:
- Remove broken boards (omap1610inn) or make doing so in the future
  easier (omap1510inn)
- Long-standing warning fixes
- Obvious thinko fixes.

-- 
Tom


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


[U-Boot] [PATCH 1/2] nand: extend .raw accesses to work on multiple pages

2012-03-28 Thread Scott Wood
A use for this is to read, modify, erase, and write an entire block as a
single unit, as a replacement for the biterr command.  This way gives
more flexibility in that you can also test multiple bit errors, errors
in the ECC, etc.

Signed-off-by: Scott Wood 
---
 common/cmd_nand.c |   95 +++-
 doc/README.nand   |   16 
 2 files changed, 79 insertions(+), 32 deletions(-)

diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index bae630d..4456706 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -11,7 +11,7 @@
  * Added 16-bit nand support
  * (C) 2004 Texas Instruments
  *
- * Copyright 2010 Freescale Semiconductor
+ * Copyright 2010, 2012 Freescale Semiconductor
  * The portions of this file whose copyright is held by Freescale and which
  * are not considered a derived work of GPL v2-only code may be distributed
  * and/or modified under the terms of the GNU General Public License as
@@ -390,6 +390,41 @@ static void nand_print_and_set_info(int idx)
setenv("nand_erasesize", buf);
 }
 
+static int raw_access(nand_info_t *nand, ulong addr, loff_t off, ulong count,
+   int read)
+{
+   int ret = 0;
+   size_t rwsize;
+
+   while (count--) {
+   /* Raw access */
+   mtd_oob_ops_t ops = {
+   .datbuf = (u8 *)addr,
+   .oobbuf = ((u8 *)addr) + nand->writesize,
+   .len = nand->writesize,
+   .ooblen = nand->oobsize,
+   .mode = MTD_OOB_RAW
+   };
+
+   rwsize = nand->writesize + nand->oobsize;
+   if (read)
+   ret = nand->read_oob(nand, off, &ops);
+   else
+   ret = nand->write_oob(nand, off, &ops);
+
+   if (ret) {
+   printf("%s: error at offset %llx, ret %d\n",
+   __func__, (long long)off, ret);
+   break;
+   }
+
+   addr += nand->writesize + nand->oobsize;
+   off += nand->writesize;
+   }
+
+   return ret;
+}
+
 int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 {
int i, ret = 0;
@@ -568,7 +603,9 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * 
const argv[])
 
if (strncmp(cmd, "read", 4) == 0 || strncmp(cmd, "write", 5) == 0) {
size_t rwsize;
+   ulong pagecount = 1;
int read;
+   int raw;
 
if (argc < 4)
goto usage;
@@ -577,13 +614,36 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * 
const argv[])
 
read = strncmp(cmd, "read", 4) == 0; /* 1 = read, 0 = write */
printf("\nNAND %s: ", read ? "read" : "write");
-   if (arg_off_size(argc - 3, argv + 3, &dev, &off, &size) != 0)
-   return 1;
 
nand = &nand_info[dev];
-   rwsize = size;
 
s = strchr(cmd, '.');
+
+   if (!strcmp(s, ".raw")) {
+   raw = 1;
+
+   if (arg_off(argv[3], &dev, &off, &size))
+   return 1;
+
+   if (argc > 4 && !str2long(argv[4], &pagecount)) {
+   printf("'%s' is not a number\n", argv[4]);
+   return 1;
+   }
+
+   if (pagecount * nand->writesize > size) {
+   puts("Size exceeds partition or device 
limit\n");
+   return -1;
+   }
+
+   rwsize = pagecount * (nand->writesize + nand->oobsize);
+   } else {
+   if (arg_off_size(argc - 3, argv + 3, &dev,
+   &off, &size) != 0)
+   return 1;
+
+   rwsize = size;
+   }
+
if (!s || !strcmp(s, ".jffs2") ||
!strcmp(s, ".e") || !strcmp(s, ".i")) {
if (read)
@@ -609,7 +669,8 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * 
const argv[])
return 1;
}
ret = nand_write_skip_bad(nand, off, &rwsize,
-   (u_char *)addr, WITH_YAFFS_OOB);
+   (u_char *)addr,
+   WITH_INLINE_OOB);
 #endif
} else if (!strcmp(s, ".oob")) {
/* out-of-band data */
@@ -623,22 +684,8 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * 
const argv[])
ret = nand->read_oob(nand, off, &ops);
else
ret = n

[U-Boot] [PATCH 2/2] nand: remote biterr command stub

2012-03-28 Thread Scott Wood
It can be scripted instead with .raw accesses.

Signed-off-by: Scott Wood 
---
 common/cmd_nand.c |6 --
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index 4456706..368c9f2 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -723,11 +723,6 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * 
const argv[])
return ret;
}
 
-   if (strcmp(cmd, "biterr") == 0) {
-   /* todo */
-   return 1;
-   }
-
 #ifdef CONFIG_CMD_NAND_LOCK_UNLOCK
if (strcmp(cmd, "lock") == 0) {
int tight = 0;
@@ -804,7 +799,6 @@ U_BOOT_CMD(
"nand scrub [-y] off size | scrub.part partition | scrub.chip\n"
"really clean NAND erasing bad blocks (UNSAFE)\n"
"nand markbad off [...] - mark bad block(s) at offset (UNSAFE)\n"
-   "nand biterr off - make a bit error at offset (UNSAFE)"
 #ifdef CONFIG_CMD_NAND_LOCK_UNLOCK
"\n"
"nand lock [tight] [status]\n"
-- 
1.7.7.rc3.4.g8d714

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


[U-Boot] [PATCH 1/2 v2] FSL/eSDHC: enable the peripheral clock to detect the card

2012-03-28 Thread Chang-Ming.Huang
From: Jerry Huang 

According to the card detection of p1/p2 platform RM,
we should set SYSCTL[PEREN] to enable the clock.
Otherwise, after booting the u-boot, and then inserting the SD card,
the SD card can't be detected.

Signed-off-by: Jerry Huang 
CC: Andy Fleming 
---
changes for v2:
- correct the typo

 drivers/mmc/fsl_esdhc.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index a2f35e3..1682a79 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -491,6 +491,8 @@ int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg 
*cfg)
/* First reset the eSDHC controller */
esdhc_reset(regs);
 
+   esdhc_write32(®s->sysctl, SYSCTL_PEREN);
+
mmc->priv = cfg;
mmc->send_cmd = esdhc_send_cmd;
mmc->set_ios = esdhc_set_ios;
-- 
1.7.5.4


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


[U-Boot] arithmetic operations on hush

2012-03-28 Thread Haneef Mohamed
Hi,

Does hush script support arithmetic operations.

thanks
haneef

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


Re: [U-Boot] pull request for u-boot-tegra/master

2012-03-28 Thread Albert ARIBAUD

Hi Tom,

Le 28/03/2012 23:48, Tom Warren a écrit :

Albert,

Please pull u-boot-tegra/master into arm master. Thanks!

The following changes since commit 4a3ea216414ad762b3718775a65437c13f0accbc:

   ARM: highbank: setup env from boot source register (2012-03-28 23:34:27 
+0200)

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

Simon Glass (32):
   fdt: Add fdtdec_find_aliases() to deal with alias nodes
   fdt: Add tests for fdtdec
   fdt: Tidy up a few fdtdec problems
   fdt: Add functions to access phandles, arrays and bools
   fdt: Add basic support for decoding GPIO definitions
   arm: fdt: Add skeleton device tree file from kernel
   tegra: fdt: Add Tegra2x device tree file from kernel
   tegra: fdt: Add device tree file for Tegra2 Seaboard from kernel
   fdt: Add staging area for device tree binding documentation
   fdt: Add tegra-usb bindings file from linux
   tegra: fdt: Add additional USB binding
   tegra: fdt: Add clock bindings
   tegra: fdt: Add clock bindings for Tegra2 Seaboard
   tegra: usb: fdt: Add additional device tree definitions for USB ports
   tegra: usb: fdt: Add USB definitions for Tegra2 Seaboard
   usb: Add support for txfifo threshold
   tegra: fdt: Add function to return peripheral/clock ID
   tegra: usb: Add support for Tegra USB peripheral
   fdt: Avoid early panic() when there is no FDT present
   arm: Check for valid FDT after console is up
   tegra: usb: Add USB support to nvidia boards
   tegra: usb: Add common USB defines for tegra2 boards
   tegra: usb: Enable USB on Seaboard
   tegra: fdt: Enable FDT support for Seaboard
   tegra: Rename NV_PA_PMC_BASE to TEGRA2_PMC_BASE
   fdt: Add function to allow aliases to refer to multiple nodes
   tegra: Enhance clock support to handle 16-bit clock divisors
   tegra: i2c: Initialise I2C on Nvidia boards
   tegra: i2c: Select number of controllers for Tegra2 boards
   tegra: i2c: Enable I2C on Seaboard
   tegra: i2c: Select I2C ordering for Seaboard
   tegra: fdt: i2c: Add extra I2C bindings for U-Boot

Tom Warren (2):
   arm: Tegra2: Fix ELDK42 gcc failure with inline asm stack pointer load
   tegra: fdt: Enable FDT support for Ventana

Yen Lin (1):
   tegra: i2c: Add I2C driver

README |3 +
arch/arm/cpu/armv7/tegra2/Makefile |4 +-
arch/arm/cpu/armv7/tegra2/ap20.c   |   20 +-
arch/arm/cpu/armv7/tegra2/board.c  |2 +-
arch/arm/cpu/armv7/tegra2/clock.c  |  121 -
arch/arm/cpu/armv7/tegra2/config.mk|2 +
arch/arm/cpu/armv7/tegra2/usb.c|  460 
arch/arm/dts/skeleton.dtsi |   13 +
arch/arm/dts/tegra20.dtsi  |  196 +++
arch/arm/include/asm/arch-tegra2/clk_rst.h |   10 +-
arch/arm/include/asm/arch-tegra2/clock.h   |   13 +
arch/arm/include/asm/arch-tegra2/tegra2.h  |6 +-
arch/arm/include/asm/arch-tegra2/tegra_i2c.h   |  157 ++
arch/arm/include/asm/arch-tegra2/usb.h |  252 +
arch/arm/lib/board.c   |8 +
board/nvidia/common/board.c|   19 +
board/nvidia/common/board.h|6 +
board/nvidia/dts/tegra2-seaboard.dts   |   92 
board/nvidia/seaboard/seaboard.c   |6 +
doc/device-tree-bindings/README|   17 +
.../clock/nvidia,tegra20-car.txt   |  207 +++
doc/device-tree-bindings/i2c/tegra20-i2c.txt   |   23 +
doc/device-tree-bindings/usb/tegra-usb.txt |   25 +
drivers/i2c/Makefile   |1 +
drivers/i2c/tegra_i2c.c|  569 
drivers/usb/host/Makefile  |1 +
drivers/usb/host/ehci-hcd.c|7 +
drivers/usb/host/ehci-tegra.c  |   62 +++
drivers/usb/host/ehci.h|6 +-
include/configs/seaboard.h |   20 +
include/configs/tegra2-common.h|   13 +
include/configs/ventana.h  |5 +
include/fdtdec.h   |  197 +++-
lib/Makefile   |1 +
lib/fdtdec.c   |  323 +++-
lib/fdtdec_test.c  |  226 
36 files changed, 3038 insertions(+), 55 deletions(-)
create mode 100644 arch/arm/cpu/armv7/tegra2/usb.c
create mode 100644 arch/arm/dts/skeleton.dtsi
create mode 100644 arch/arm/dts/tegra20.dtsi
create mode 100644 arch/arm/include/asm/arch-tegra2/tegra_i2c.h
create mode 100644 arch/arm/include/asm/arch-tegra2/usb.h
create mode 100644 board/nvidia/dts/tegra2-seaboard

Re: [U-Boot] [PATCH 2/2] nand: remote biterr command stub

2012-03-28 Thread Stefan Roese
On Thursday 29 March 2012 00:27:43 Scott Wood wrote:
> It can be scripted instead with .raw accesses.

Typo in the subject: s/remote/remove

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


Re: [U-Boot] Please pull u-boot-ti/master

2012-03-28 Thread Albert ARIBAUD

Hi Tom,

Le 28/03/2012 23:54, Tom Rini a écrit :

Hello,

The following changes since commit 4a3ea216414ad762b3718775a65437c13f0accbc:
   Rob Herring (1):
 ARM: highbank: setup env from boot source register

are available in the git repository at:

   git://git.denx.de/u-boot-ti master

Anatolij Gustschin (2):
   board/ti/beagle/beagle.c: Fix build warnings
   arch/arm/cpu/armv7/omap-common/clocks-common.c: Fix build warnings

Tom Rini (3):
   sdrc.c: Fix typo in do_sdrc_init() for SPL
   OMAP: Remove omap1610inn-based boards
   OMAP: Move omap1510inn to Unmaintained / Orphaned

  MAINTAINERS|8 +-
  arch/arm/cpu/armv7/omap-common/clocks-common.c |4 +-
  arch/arm/cpu/armv7/omap3/sdrc.c|2 +-
  board/ti/beagle/beagle.c   |3 +-
  board/ti/omap1610inn/Makefile  |   45 ---
  board/ti/omap1610inn/config.mk |   26 --
  board/ti/omap1610inn/flash.c   |  495 
  board/ti/omap1610inn/lowlevel_init.S   |  452 -
  board/ti/omap1610inn/omap1610innovator.c   |  309 ---
  boards.cfg |   10 +-
  include/configs/omap1610h2.h   |  197 --
  include/configs/omap1610inn.h  |  202 --
  12 files changed, 8 insertions(+), 1745 deletions(-)
  delete mode 100644 board/ti/omap1610inn/Makefile
  delete mode 100644 board/ti/omap1610inn/config.mk
  delete mode 100644 board/ti/omap1610inn/flash.c
  delete mode 100644 board/ti/omap1610inn/lowlevel_init.S
  delete mode 100644 board/ti/omap1610inn/omap1610innovator.c
  delete mode 100644 include/configs/omap1610h2.h
  delete mode 100644 include/configs/omap1610inn.h


While not all of these patches have been around for long, they are
either:
- Remove broken boards (omap1610inn) or make doing so in the future
   easier (omap1510inn)
- Long-standing warning fixes
- Obvious thinko fixes.



Applied to u-boot-arm/master, thanks.

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


Re: [U-Boot] arithmetic operations on hush

2012-03-28 Thread Wolfgang Denk
Dear Haneef Mohamed,

In message <1332994302.35766.yahoomail...@web193303.mail.sg3.yahoo.com> you 
wrote:
> 
> Does hush script support arithmetic operations.

Hush itself does not, but the "setexpr" command does.

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 all agree on the necessity of compromise. We just can't agree  on
when it's necessary to compromise."
- Larry Wall in  <1991nov13.194420.28...@netlabs.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] nand: remote biterr command stub

2012-03-28 Thread Wolfgang Denk
Dear Scott Wood,

In message <20120328222743.ga14...@schlenkerla.am.freescale.net> you wrote:
> It can be scripted instead with .raw accesses.
> 
> Signed-off-by: Scott Wood 

Can you please add an example how to do that to the commit message?
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
You Earth people glorified organized violence  for  forty  centuries.
But you imprison those who employ it privately.
-- Spock, "Dagger of the Mind", stardate 2715.1
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] fdt: Avoid early panic() when there is no FDT present

2012-03-28 Thread Wolfgang Denk
Dear Simon Glass,

In message <1332965305-21151-1-git-send-email-...@chromium.org> you wrote:
> CONFIG_OF_CONTROL requires a valid device tree. However, we cannot call
> panic() before the console is set up since the message does not appear,
> and we get a silent failure.
...
> +int fdtdec_prepare_fdt(void);
> +
> +/**
> + * Checks that we have a valid fdt available to control U-Boot.
> +
> + * However, if not then for the moment nothing is done, since this function
> + * is called too early to panic().
> + *
> + * @returns 0

If the function always returns 0, then it makes no sense to return any
value at all.  Please make it void, then.

> +int fdtdec_check_fdt(void)
> +{
> + /*
> +  * We must have an FDT, but we cannot panic() yet since the console
> +  * is not ready. So for now, just assert(). Boards which need an early
> +  * FDT (prior to console ready) will need to make their own
> +  * arrangements and do their own checks.
> +  */
> + assert(!fdtdec_prepare_fdt());
> + return 0;
> +}

Ditto - make that "void fdtdec_check_fdt(void)".

> +int fdtdec_prepare_fdt(void)
...
>   return 0;
>  }

Ditto - make that "void fdtdec_prepare_fdt(void)".


I have to admit that I do not understand how this patch will help you
anything.  You write "we cannot panic()", but "just assert()".

If the assertion fails, it will call __assert_fail() - which in turn
will just call panic().  So you are out of the frying pan into the
fire.

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
Life. Don't talk to me about life.  - Marvin the Paranoid Android
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 0/6] Introduce generic relocation feature

2012-03-28 Thread Albert ARIBAUD

Hi Simon,

Le 20/02/2012 23:38, Simon Glass a écrit :


You should keep the code that jumps to board_init_r as it is.


I have had a look at this and I don't believe that I can. I need to
call it from C and so it needs to conform to the C calling standard. I
will send a new series showing what I mean.


No need to call it from C. The most correct flow should be that the 
start.S code would call board_init_f, relocate_code() and board_init_r, 
so that no C code should call assembly language code, and setting the C 
environment or modifying it would only happen outside of C code.



Are you saying that you want a start.S in arch/arm/cpu and each
arch/arch/cpu/*/ ? I would prefer there was only one file named
start.S.



OK and I hope that file is not arch/arm/cpu/start.S which would
introduce confusion I think.


I don't want multiple homonym files either. I want a start.S file 
responsible for the generic ARM startup and another asm or include file 
responsible for the ARM-architecture specifics (i.e. ARM1176, ARM926EJS 
etc) if required. The name of that second file I'll think over, but it 
won't be start.S



What is the code size increase of using arch-specific mem ops?


About 800 bytes for me:

text   data bss dec hex filename
  177653   3932  218240  399825   619d1 u-boot
  178429   3932  218240  400601   61cd9 u-boot


Thanks.


One problem remains which causes mx31pdk to fail to build. It doesn't
have string.c in its SPL code and the architecture-specific versions of
memset()/memcpy() are too large. I propose to add a local change to
reloc.c that uses inline code for boards that use the old legacy SPL
framework. We can remove it later. This is not included in v2 but I am
interested in comments on this approach. An alternative would be just
to add simple memset()/memcpy() functions just for this board (and one
other affected MX31 board).



I am not too fond of the "later removal" approach. In my experience, this
invariably tends to the "old bloat in the code no one knows the reason
of"
situations.



Me neither. The only board affected is the tx25. We could let the
maintainer fix it up, I suppose. I have no way of testing it.


John: ping?


Since I didn't hear anything I have elected to patch this up a
different way - basically splitting out memcpy() and memset() from
string.c. See what you think of the new series. It introduces no
breakages now, at least.


I'll look this up today.


Regards,
Simon


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