Re: [U-Boot] [PATCH] am3517evm: remove rootfstype kernel parameter for MMC boot device

2012-01-25 Thread Yegor Yefremov
Am 18.07.2011 15:51, schrieb Yegor Yefremov:
 From 53afd3a38abbaed8890ca1ba36439e0c93b69969 Mon Sep 17 00:00:00 2001
 From: Yegor Yefremov yegorsli...@googlemail.com
 Date: Mon, 18 Jul 2011 15:44:42 +0200
 Subject: [PATCH] am3517evm: remove rootfstype kernel parameter for MMC boot 
 device
 
 it is not necessary to define rootfstype for mass storage devices.
 Kernel detects it automatically.
 
 Signed-off-by: Yegor Yefremov yegorsli...@googlemail.com
 ---
  include/configs/am3517_evm.h |3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)
 
 diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
 index 18aaadf..8b8c80b 100644
 --- a/include/configs/am3517_evm.h
 +++ b/include/configs/am3517_evm.h
 @@ -192,8 +192,7 @@
   loadaddr=0x8200\0 \
   console=ttyO2,115200n8\0 \
   mmcargs=setenv bootargs console=${console}  \
 - root=/dev/mmcblk0p2 rw  \
 - rootfstype=ext3 rootwait\0 \
 + root=/dev/mmcblk0p2 rw rootwait\0 \
   nandargs=setenv bootargs console=${console}  \
   root=/dev/mtdblock4 rw  \
   rootfstype=jffs2\0 \

Could you please review this patch? It is very annoying when using Buildroot as 
it creates ext2 images.

Thanks.

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


Re: [U-Boot] [PATCH v2 1/4] ehci-omap: Clean up added ehci-omap.c

2012-01-25 Thread Govindraj
Hi Igor,

On Sun, Jan 22, 2012 at 5:50 PM, Igor Grinberg grinb...@compulab.co.il wrote:
 On 01/19/12 10:15, Govindraj wrote:
 On Wed, Jan 18, 2012 at 11:21 PM, Igor Grinberg grinb...@compulab.co.il 
 wrote:
 Hi Govindraj,

 On 01/17/12 08:10, Govindraj wrote:


[...]

 +             if (get_timer(init)  CONFIG_SYS_HZ) {
 +                     debug(OMAP EHCI error: timeout resetting phy\n);
 +                     break;
 +             }
 +}

 Ok, this function is kind of duplication of the ULPI code.
 ulpi_reset() function in drivers/usb/ulpi/ulpi.c provides an implementation
 of the ULPI spec. and should be used by the drivers.
 What it lacks currently, is a way to pass a port number to the viewport
 implementation and of course the omap-ulpi-viewport(.c) implementation 
 itself...
 So, IMO, the right way would be to implement ULPI accessors 
 (omap-ulpi-viewport.c)

 so you mean add omap-ulpi-viewport.c which will do ulpi read writes
 for ulpi implementation
 within tll module of omap host controller.

 No. What I meant is that omap-ulpi-viewport.c will do the ULPI access
 to the PHY (which is not TLL), but after the above question, I think
 it can do both: TLL and non-TLL.


 we just need func reset to be done for ulpi which is done using ehci register
 INSNREG05_ULPI. IMHO I don't see any use case or true requirement of
 omap-ulpi-viewport.c framework.

 The fact that the reset is done by writing the ULPI_FUNC_CTRL_RESET bit
 of the ULPI_FUNC_CTRL register - is the requirement...
 For example tomorrow, you will find out that besides reset, you also need
 to set some other bit in a register inside the ULPI PHY (e.g. VBUS), so
 you will implement another ehci function that will do a write to ULPI
 and thus duplicate another portion of code...


 and add an ability to pass some kind of private data to the viewport, which
 in case of OMAP will be the port number.


I started on adding omap-ulpi-viewport.c which will work with ulpi.c
if omap_ehci.c is used.

for port id can we just set a global data field that will inform the
omap_view port
on the port id, or we have to modify most api's syntax in
drivers/usb/ulpi/ulpi.c

Is it okay to have the port id from ehci-omap.c set and used in
drivers/usb/ulpi/omap-ulpi-viewport.c ?

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


Re: [U-Boot] [PATCH] ARM: tegra: Define Tegra20 CAR binding

2012-01-25 Thread Peter De Schrijver
On Tue, Jan 24, 2012 at 11:59:40PM +0100, Colin Cross wrote:
 On Tue, Jan 24, 2012 at 2:43 PM, Stephen Warren swar...@nvidia.com wrote:
  Colin Cross wrote at Tuesday, January 24, 2012 3:33 PM:
  On Tue, Jan 24, 2012 at 2:08 PM, Stephen Warren swar...@nvidia.com wrote:
   Peter De Schrijver wrote at Tuesday, January 24, 2012 2:53 AM:
   What about the peripheral resets which are also handled by CAR? 
   Peripheral
   clock nodes also offer assert and deassert methods for the reset signal
   associated with them. Those methods are used when powergating domains 
   for
   example. Should we model this in the same binding?
  
   In most cases, I think the resets are handled purely within clock enable
   and disable, so there's no need to explicitly manage them or represent
   them in the device tree. Do you agree here?
 
  clk_enable could force a deasserted reset, but clk_disable cannot
  imply asserting reset.  The clocks need to be turned off for power
  management without resetting the registers.
 
  Yes, I just spoke to someone off-list, and he said the same thing. He
  went on to say that therefore even the reset removal with clk_enable
  was questionable, and that drivers should explicitly manage reset
  removal themselves. Does that seem a reasonable stance? It'd certainly
  take away the somewhat asymmetric nature of reset removal just magically
  working when you first enable the clocks. We'd presumably then want a
  common reset infra-structure and binding to match that change?
 
 In 99% of drivers reset is irrelevant, as long as the block is out of
 reset by the time the driver starts writing to registers.  clk_enable
 is a decent place to ensure that - it always has to be done before
 writing to the registers, and it maps nicely to the reset bits on
 Tegra.  It would be nice if those driver didn't need to deassert reset
 explicitly, especially if that requires a Tegra-specific API.

I think this could be solved by moving the drivers to runtime PM and handle the
clock and reset bits in tegra platform device specific code. iirc that's the
way it's handled in OMAP?

Cheers,

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


[U-Boot] SPL Framework: Add support for U_BOOT_CMD

2012-01-25 Thread Prabhakar Lad
*Hi Folks*,

*I want to add a command using U_BOOT_CMD in uboot, where SPL_BUILD is
enabled for example for da850evm in spl frame work how can i do that *
*When I tried to that I get following error,
error: no memory region specified for loadable section* 
*When i add printf statements and build I get errors for hawkboard_nand
board puts works fine. Is printf being removed as of buffer overriding *issues
or
*is there a support yet* to be added for printf?

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


Re: [U-Boot] [PATCH 00/14] Nokia RX-51 support

2012-01-25 Thread Sergey Lapin
On Tue, Jan 24, 2012 at 03:27:57PM +0100, Pali Rohár wrote:
 This patch series add support for new board Nokia RX-51 (aka N900).
 Last two patches adding on screen bootmenu support.
 
 This series supersedes the last sent version.
A quick offtopic question - how do you replace boot loader on N900?

Thanks a lot,
S.

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


Re: [U-Boot] non SPL boot on beagleboard-xm

2012-01-25 Thread Peter Meerwald
Hello Tom,

  I can boot u-boot built from git commit
  b609009801b8a00644926f49b7d0d0cc0d3d8797 successfully, but it fails with
  git commit ee08a8260a3a7f6ef2001cfa3e7b6137b485f40a:

 The current implementation (after poking some of the other
 beagleboard.org folks) requires SPL.  It's not a hard requirement of
 supporting SPL that other loaders not be supported, we just didn't aim
 for compatibility.

thank you for the clarification; I had the impression it might be 
something optional as CONFIG_SPL implies

MLO/SPL + current u-boot breaks the USB ethernet patches (i.e. booting via 
tftp)

regards, p.

-- 

Peter Meerwald
+43-664-218 (mobile)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 00/28] Add link-local addressing support

2012-01-25 Thread Stefano Babic
On 20/01/2012 01:53, Joe Hershberger wrote:
 Link-local support allows the bootloader to get a usable network address
 regardless of network environment.  Given that bootloaders may not always
 have access to a DHCP server, this functionality makes accessing it in
 those environments easier.  It is also referred to as zero-configuration IP.
 

Hi Joe,

I have a basic question about your patchset. RFC3927 requires that
addresses are continuosly checked to avoid conflicts - this is a strict
requirement.

However, it is clear we cannot comply with this requirement. The
protocol runs once and there is not a background process to check for
conflicts.

I can imagine we can get conflicts, when several targets are running at
the same time in u_boot and they are attached to a network where
local-link addressing is active. Then we can have two or more system
using the same ip address, making the network unreliable.

Which are the limitations of this implementation ? They should also
described in your patchset, maybe with a README file. Is is thought to
connect the target directly to a PC ?

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-0 Fax: +49-8142-66989-80  Email: off...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] SPL Framework: Add support for U_BOOT_CMD

2012-01-25 Thread Christian Riesch
Hi,

On Wed, Jan 25, 2012 at 10:52 AM, Prabhakar Lad
prabhakar.cse...@gmail.com wrote:
 *I want to add a command using U_BOOT_CMD in uboot, where SPL_BUILD is
 enabled for example for da850evm in spl frame work how can i do that *

Why do you want to do that? A command in an SPL?

 *When I tried to that I get following error,
 error: no memory region specified for loadable section* 
 *When i add printf statements and build I get errors for hawkboard_nand
 board puts works fine. Is printf being removed as of buffer overriding *issues
 or
 *is there a support yet* to be added for printf?

Could you please post an example of what you are trying to do?
Are you using Sughosh Ganu's Hawkboard SPL patches or not? Without
those patches hawkboard does not use the new SPL framework.

[U-Boot,1/2,V4] arm926: Flush the data cache before disabling it
http://patchwork.ozlabs.org/patch/136079/

[U-Boot,2/2,V4] Changes to move hawkboard to the new spl infrastructure
http://patchwork.ozlabs.org/patch/135433/

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


Re: [U-Boot] [PATCH V4 1/2] ehci-omap: driver for EHCI host on OMAP3

2012-01-25 Thread Stefano Babic
On 17/01/2012 07:14, Govindraj wrote:
 On Mon, Jan 16, 2012 at 3:27 PM, Stefano Babic sba...@denx.de wrote:
 On 16/01/2012 08:58, Govindraj wrote:

 Th v2 patch series [1] posted is based on top of this patch.

 If I understand well, we need in any case Ilya's patch. In this case, it
 is maybe worth to merge Ilya's patch in the meanwhile (and please drop
 my patch that remove USB support from TAM3517 boards).

 
 Yes correct we have to pull in this patch.
 
 Tom, Will you be taking this through omap tree?

Tom,

do you see any problem about merging this patch ? It fixes the build
problem on the mt_ventoux board, and there is still a Ilya's patch (mcx:
support for HTKW mcx board) waiting for it

http://patchwork.ozlabs.org/patch/131431/

Stefano

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


Re: [U-Boot] [PATCH] omap: mmc: Raise timeout value to 20ms

2012-01-25 Thread Andreas Müller
On Wednesday, January 11, 2012 04:34:05 PM Tom Rini trini at ti.com wrote:
 I ordered the same card Peter sees failure on and it arrived
 yesterday.  I'm formatting it now and will see if I can duplicate the
 problem here today.
ping?

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


Re: [U-Boot] SPL Framework: Add support for U_BOOT_CMD

2012-01-25 Thread Wolfgang Denk
Dear Prabhakar Lad,

In message ca+v-a8vtoyw3x82hnrrzq--cbuhdvvsrr7srhkwm9q6huwz...@mail.gmail.com 
you wrote:
 
 *I want to add a command using U_BOOT_CMD in uboot, where SPL_BUILD is
 enabled for example for da850evm in spl frame work how can i do that *

This makes no sense. Commands can only be executed when we have full
U-Boot running (actually even only after relocation).  You cannot run
commands in the SPL.

 *is there a support yet* to be added for printf?

This makes also no sense to me - printf is available in the SPL.

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
Buy land. They've stopped making it.   - Mark Twain
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] SPL Framework: Add support for U_BOOT_CMD

2012-01-25 Thread Christian Riesch
On Wed, Jan 25, 2012 at 11:37 AM, Wolfgang Denk w...@denx.de wrote:
 In message 
 ca+v-a8vtoyw3x82hnrrzq--cbuhdvvsrr7srhkwm9q6huwz...@mail.gmail.com you 
 wrote:
 *is there a support yet* to be added for printf?

 This makes also no sense to me - printf is available in the SPL.

As long as CONFIG_SPL_LIBCOMMON_SUPPORT is defined.
Regards, Christian
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] SPL Framework: Add support for U_BOOT_CMD

2012-01-25 Thread Prabhakar Lad
Hi Christian,


On Wed, Jan 25, 2012 at 3:57 PM, Christian Riesch 
christian.rie...@omicron.at wrote:

 Hi,

 On Wed, Jan 25, 2012 at 10:52 AM, Prabhakar Lad
 prabhakar.cse...@gmail.com wrote:
  *I want to add a command using U_BOOT_CMD in uboot, where SPL_BUILD is
  enabled for example for da850evm in spl frame work how can i do that *

 Why do you want to do that? A command in an SPL?

For davinci soc I wanted to add clocks command not particularly for
SPL only
when I move some piece of code from arc/arm/cpu/arm926ejs/cpu.c to say
arc/arm/cpu/arm926ejs/speed.c and implement the command I get following
errors,

   arm-none-linux-gnueabi-ld: error: no memory region specified for
loadable section `.u_boot_cmd'
   make[2]: ***
[/home/plad/ti/uboot/denx_uboot/uboot-ti/u-boot-ti/spl/u-boot-spl] Error 1
   make[2]: Leaving directory
`/home/plad/ti/uboot/denx_uboot/uboot-ti/u-boot-ti/spl'
   I get these errors for SPL enabled


  *When I tried to that I get following error,
  error: no memory region specified for loadable section* 
  *When i add printf statements and build I get errors for hawkboard_nand
  board puts works fine. Is printf being removed as of buffer overriding
 *issues
  or
  *is there a support yet* to be added for printf?

 Could you please post an example of what you are trying to do?
 Are you using Sughosh Ganu's Hawkboard SPL patches or not? Without
 those patches hawkboard does not use the new SPL framework.

I didn't use this patches, ill now.

  I didn't use these patches though ill try it

 [U-Boot,1/2,V4] arm926: Flush the data cache before disabling it
 http://patchwork.ozlabs.org/patch/136079/

 [U-Boot,2/2,V4] Changes to move hawkboard to the new spl infrastructure
 http://patchwork.ozlabs.org/patch/135433/

 Regards, Christian


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


Re: [U-Boot] [PATCH 02/28] net: cosmetic: checkpatch compliance

2012-01-25 Thread Stefano Babic
On 20/01/2012 01:53, Joe Hershberger wrote:
 Signed-off-by: Joe Hershberger joe.hershber...@ni.com
 Cc: Joe Hershberger joe.hershber...@gmail.com
 Cc: Wolfgang Denk w...@denx.de
 ---

Hi Joe,

as far as I understand this patch has nothing to do with the main
feature (link-local addressing). Maybe is it worth to remove it from
this patchset and send it in a separate patch ?

I see the patch address only code styling, but it is quite long for a
review. IMHO it is better to have a separate patchset for this.

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-0 Fax: +49-8142-66989-80  Email: off...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] SPL Framework: Add support for U_BOOT_CMD

2012-01-25 Thread Christian Riesch
Hi,

On Wed, Jan 25, 2012 at 11:50 AM, Prabhakar Lad
prabhakar.cse...@gmail.com wrote:
 On Wed, Jan 25, 2012 at 3:57 PM, Christian Riesch 
 christian.rie...@omicron.at wrote:

 Hi,

 On Wed, Jan 25, 2012 at 10:52 AM, Prabhakar Lad
 prabhakar.cse...@gmail.com wrote:
  *I want to add a command using U_BOOT_CMD in uboot, where SPL_BUILD is
  enabled for example for da850evm in spl frame work how can i do that *

 Why do you want to do that? A command in an SPL?

    For davinci soc I wanted to add clocks command not particularly for
 SPL only
    when I move some piece of code from arc/arm/cpu/arm926ejs/cpu.c to say
    arc/arm/cpu/arm926ejs/speed.c and implement the command I get following
 errors,

   arm-none-linux-gnueabi-ld: error: no memory region specified for
 loadable section `.u_boot_cmd'
   make[2]: ***
 [/home/plad/ti/uboot/denx_uboot/uboot-ti/u-boot-ti/spl/u-boot-spl] Error 1
   make[2]: Leaving directory
 `/home/plad/ti/uboot/denx_uboot/uboot-ti/u-boot-ti/spl'
   I get these errors for SPL enabled

As Wolfgang wrote, commands cannot be run in SPL and therefore you
should not compile them into SPL.

How about something like this:

#ifndef CONFIG_SPL_BUILD
U_BOOT_CMD(
...
);
#endif

If you don't use Sughosh's patches I think you need #ifndef
CONFIG_NAND_SPL instead of #ifndef CONFIG_SPL_BUILD.
Regards, Christian
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] SPL Linux Boot

2012-01-25 Thread Stefano Babic
Hi Tom,

last version of patchset has not received comments since a long time -
Simon sends to me a confirm that tests on the devkit8000 are successful.

Any chance to get the patchset merged soon or do you have any open points ?

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-0 Fax: +49-8142-66989-80  Email: off...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 00/14] Nokia RX-51 support

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 04:48:00 Sergey Lapin wrote:
 On Tue, Jan 24, 2012 at 03:27:57PM +0100, Pali Rohár wrote:
  This patch series add support for new board Nokia RX-51 (aka N900).
  Last two patches adding on screen bootmenu support.
 
  This series supersedes the last sent version.

 A quick offtopic question - how do you replace boot loader on N900?

 Thanks a lot,
 S.

See commit message in: [PATCH 12/14] New board support: Nokia RX-51 aka N900

Bootloader is not replacing (yet). Instead U-Boot is flashed into kernel area
and loaded by proprietary NOLO bootloader. NOLO can load only one image and
only from kernel area - so it does not support dualbooting.

Kernel image can be attached into U-Boot binary (at pos. 0x4) and flashed
into nand kernel area (2MB is enought for U-Boot with kernel). And then U-Boot
can boot attached kernel image or load/boot it from SD/eMMC.

--
Pali Rohár
pali.ro...@gmail.com

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 3/3] Armada100: gplugD: Add USB command support

2012-01-25 Thread Ajay Bhargav
This patch adds support for USB commands and USB storage device for
Marvell gplugD

Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com
---
 include/configs/gplugd.h |   17 +
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/include/configs/gplugd.h b/include/configs/gplugd.h
index 9813309..f8dc74f 100644
--- a/include/configs/gplugd.h
+++ b/include/configs/gplugd.h
@@ -134,4 +134,21 @@
 #define CONFIG_CMD_EDITENV
 #define CONFIG_CMD_SAVEENV
 
+#define CONFIG_CMD_USB
+
+#ifdef CONFIG_CMD_USB
+#define CONFIG_USB_EHCI
+#define CONFIG_USB_EHCI_ARMADA100
+#define CONFIG_EHCI_IS_TDI
+#define CONFIG_USB_STORAGE
+
+#ifndef CONFIG_DOS_PARTITION
+#define CONFIG_DOS_PARTITION
+#endif /* CONFIG_DOS_PARTITION */
+
+#define CONFIG_ISO_PARTITION
+#define CONFIG_SUPPORT_VFAT
+#define CONFIG_CMD_EXT2
+#endif /* CONFIG_CMD_USB */
+
 #endif /* __CONFIG_GPLUGD_H */
-- 
1.7.7.2

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


[U-Boot] [PATCH 1/3] USB: Armada100: Add UTMI PHY interface driver

2012-01-25 Thread Ajay Bhargav
This patch adds USB host controller's UTMI PHY interface driver for
Armada100 SOCs.

Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com
---
 arch/arm/include/asm/arch-armada100/armada100.h |7 ++
 drivers/usb/host/utmi-armada100.c   |   87 +++
 drivers/usb/host/utmi-armada100.h   |   79 
 3 files changed, 173 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/host/utmi-armada100.c
 create mode 100644 drivers/usb/host/utmi-armada100.h

diff --git a/arch/arm/include/asm/arch-armada100/armada100.h 
b/arch/arm/include/asm/arch-armada100/armada100.h
index 0ed3a8e..d6984dc 100644
--- a/arch/arm/include/asm/arch-armada100/armada100.h
+++ b/arch/arm/include/asm/arch-armada100/armada100.h
@@ -43,6 +43,13 @@
 #define SSP2_APBCLK0x01
 #define SSP2_FNCLK 0x02
 
+/* USB Clock/reset control bits */
+#define USB_SPH_AXICLK_EN  0x10
+#define USB_SPH_AXI_RST0x02
+
+/* MPMU Clocks */
+#define MPMU_EN_ALL_CLKS   0x1E
+
 /* Register Base Addresses */
 #define ARMD1_DRAM_BASE0xB000
 #define ARMD1_FEC_BASE 0xC080
diff --git a/drivers/usb/host/utmi-armada100.c 
b/drivers/usb/host/utmi-armada100.c
new file mode 100644
index 000..b8225dd
--- /dev/null
+++ b/drivers/usb/host/utmi-armada100.c
@@ -0,0 +1,87 @@
+/*
+ * (C) Copyright 2012
+ * eInfochips Ltd. www.einfochips.com
+ * Written-by: Ajay Bhargav ajay.bhar...@einfochips.com
+ *
+ * (C) Copyright 2009
+ * Marvell Semiconductor www.marvell.com
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include common.h
+#include asm/io.h
+#include usb.h
+#include asm/arch/cpu.h
+#include asm/arch/armada100.h
+#include utmi-armada100.h
+
+static void utmi_phy_init(void)
+{
+   struct armd1usb_phy_reg *phy_regs =
+   (struct armd1usb_phy_reg *)UTMI_PHY_BASE;
+
+   setbits_le32(phy_regs-utmi_ctrl, INPKT_DELAY_SOF | PLL_PWR_UP);
+   udelay(1000);
+   setbits_le32(phy_regs-utmi_ctrl, PHY_PWR_UP);
+
+   clrbits_le32(phy_regs-utmi_pll, PLL_FBDIV_MASK | PLL_REFDIV_MASK);
+   setbits_le32(phy_regs-utmi_pll, N_DIVIDER  PLL_FBDIV | M_DIVIDER);
+
+   setbits_le32(phy_regs-utmi_tx, PHSEL_VAL  CK60_PHSEL);
+
+   /* Calibrate pll */
+   while ((readl(phy_regs-utmi_pll)  PLL_READY) == 0)
+   ;
+
+   udelay(200);
+   setbits_le32(phy_regs-utmi_pll, VCOCAL_START);
+   udelay(400);
+   clrbits_le32(phy_regs-utmi_pll, VCOCAL_START);
+
+   udelay(200);
+   setbits_le32(phy_regs-utmi_tx, RCAL_START);
+   udelay(400);
+   clrbits_le32(phy_regs-utmi_tx, RCAL_START);
+
+   while ((readl(phy_regs-utmi_pll)  PLL_READY) == 0)
+   ;
+}
+
+/*
+ * Initialize USB host controller's UTMI Physical interface
+ */
+void utmi_init(void)
+{
+   struct armd1mpmu_registers *mpmu_regs =
+   (struct armd1mpmu_registers *)ARMD1_MPMU_BASE;
+
+   struct armd1apmu_registers *apmu_regs =
+   (struct armd1apmu_registers *)ARMD1_APMU_BASE;
+
+   /* Turn on main PMU clocks */
+   writel(MPMU_EN_ALL_CLKS, mpmu_regs-acgr);
+
+   /* USB Clock reset */
+   writel(USB_SPH_AXICLK_EN, apmu_regs-usbcrc);
+   writel(USB_SPH_AXICLK_EN | USB_SPH_AXI_RST, apmu_regs-usbcrc);
+
+   /* Initialize UTMI transceiver */
+   utmi_phy_init();
+}
diff --git a/drivers/usb/host/utmi-armada100.h 
b/drivers/usb/host/utmi-armada100.h
new file mode 100644
index 000..dd0ccdb
--- /dev/null
+++ b/drivers/usb/host/utmi-armada100.h
@@ -0,0 +1,79 @@
+/*
+ * (C) Copyright 2012
+ * eInfochips Ltd. www.einfochips.com
+ * Written-by: Ajay Bhargav ajay.bhar...@einfochips.com
+ *
+ * (C) Copyright 2009
+ * Marvell Semiconductor www.marvell.com
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; 

[U-Boot] [PATCH 2/3] USB: Armada100: ECHI Driver for Armada100 SOCs

2012-01-25 Thread Ajay Bhargav
This patch adds support for USB EHCI driver for Armada100 SOCs.

Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com
---
 arch/arm/include/asm/arch-armada100/armada100.h |1 +
 drivers/usb/host/Makefile   |1 +
 drivers/usb/host/ehci-armada100.c   |   62 +++
 3 files changed, 64 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/host/ehci-armada100.c

diff --git a/arch/arm/include/asm/arch-armada100/armada100.h 
b/arch/arm/include/asm/arch-armada100/armada100.h
index d6984dc..26f836e 100644
--- a/arch/arm/include/asm/arch-armada100/armada100.h
+++ b/arch/arm/include/asm/arch-armada100/armada100.h
@@ -67,6 +67,7 @@
 #define ARMD1_SSP5_BASE0xD4021000
 #define ARMD1_UART3_BASE   0xD4026000
 #define ARMD1_MPMU_BASE0xD405
+#define ARMD1_USB_HOST_BASE0xD4209000
 #define ARMD1_APMU_BASE0xD4282800
 #define ARMD1_CPU_BASE 0xD4282C00
 
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index 77e217f..94e72c3 100644
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
@@ -35,6 +35,7 @@ COBJS-$(CONFIG_USB_SL811HS) += sl811-hcd.o
 
 # echi
 COBJS-$(CONFIG_USB_EHCI) += ehci-hcd.o
+COBJS-$(CONFIG_USB_EHCI_ARMADA100) += ehci-armada100.o utmi-armada100.o
 ifdef CONFIG_MPC512X
 COBJS-$(CONFIG_USB_EHCI_FSL) += ehci-mpc512x.o
 else
diff --git a/drivers/usb/host/ehci-armada100.c 
b/drivers/usb/host/ehci-armada100.c
new file mode 100644
index 000..cf05d1a
--- /dev/null
+++ b/drivers/usb/host/ehci-armada100.c
@@ -0,0 +1,62 @@
+/*
+ * (C) Copyright 2012
+ * eInfochips Ltd. www.einfochips.com
+ * Written-by: Ajay Bhargav ajay.bhar...@einfochips.com
+ *
+ * This driver is based on Kirkwood echi driver
+ * (C) Copyright 2009
+ * Marvell Semiconductor www.marvell.com
+ * Written-by: Prafulla Wadaskar prafu...@marvell.com
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include common.h
+#include asm/io.h
+#include usb.h
+#include ehci.h
+#include ehci-core.h
+#include asm/arch/cpu.h
+#include asm/arch/armada100.h
+#include utmi-armada100.h
+
+/*
+ * EHCI host controller init
+ */
+int ehci_hcd_init(void)
+{
+   utmi_init();
+   hccr = (struct ehci_hccr *)(ARMD1_USB_HOST_BASE + 0x100);
+   hcor = (struct ehci_hcor *)((uint32_t) hccr
+   + HC_LENGTH(ehci_readl(hccr-cr_capbase)));
+
+   printf(Kirkwood-ehci: init hccr %x and hcor %x hc_length %d\n,
+   (uint32_t)hccr, (uint32_t)hcor,
+   (uint32_t)HC_LENGTH(ehci_readl(hccr-cr_capbase)));
+
+   return 0;
+}
+
+/*
+ * EHCI host controller stop
+ */
+int ehci_hcd_stop(void)
+{
+   return 0;
+}
-- 
1.7.7.2

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


[U-Boot] [PATCH 1/2] at91: modified NAND flash timing on meesc board

2012-01-25 Thread Daniel Gorsulowski
Signed-off-by: Daniel Gorsulowski daniel.gorsulow...@esd.eu
---
 board/esd/meesc/meesc.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c
index 4882ffc..9dd4375 100644
--- a/board/esd/meesc/meesc.c
+++ b/board/esd/meesc/meesc.c
@@ -73,20 +73,20 @@ static void meesc_nand_hw_init(void)
writel(csa, matrix-csa[0]);
 
/* Configure SMC CS3 for NAND/SmartMedia */
-   writel(AT91_SMC_SETUP_NWE(1) | AT91_SMC_SETUP_NCS_WR(0) |
-   AT91_SMC_SETUP_NRD(1) | AT91_SMC_SETUP_NCS_RD(0),
+   writel(AT91_SMC_SETUP_NWE(1) | AT91_SMC_SETUP_NCS_WR(1) |
+   AT91_SMC_SETUP_NRD(2) | AT91_SMC_SETUP_NCS_RD(2),
smc-cs[3].setup);
 
writel(AT91_SMC_PULSE_NWE(3) | AT91_SMC_PULSE_NCS_WR(3) |
AT91_SMC_PULSE_NRD(3) | AT91_SMC_PULSE_NCS_RD(3),
smc-cs[3].pulse);
 
-   writel(AT91_SMC_CYCLE_NWE(5) | AT91_SMC_CYCLE_NRD(5),
+   writel(AT91_SMC_CYCLE_NWE(6) | AT91_SMC_CYCLE_NRD(6),
smc-cs[3].cycle);
writel(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE |
AT91_SMC_MODE_EXNW_DISABLE |
AT91_SMC_MODE_DBW_8 |
-   AT91_SMC_MODE_TDF_CYCLE(3),
+   AT91_SMC_MODE_TDF_CYCLE(12),
smc-cs[3].mode);
 
/* Configure RDY/BSY */
-- 
1.5.3

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


[U-Boot] [PATCH 2/2] at91: modified NAND flash timing on otc570 board

2012-01-25 Thread Daniel Gorsulowski
Signed-off-by: Daniel Gorsulowski daniel.gorsulow...@esd.eu
---
 board/esd/otc570/otc570.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/board/esd/otc570/otc570.c b/board/esd/otc570/otc570.c
index 5dded41..0c12b66 100644
--- a/board/esd/otc570/otc570.c
+++ b/board/esd/otc570/otc570.c
@@ -81,20 +81,20 @@ static void otc570_nand_hw_init(void)
writel(csa, matrix-csa[0]);
 
/* Configure SMC CS3 for NAND/SmartMedia */
-   writel(AT91_SMC_SETUP_NWE(1) | AT91_SMC_SETUP_NCS_WR(0) |
-   AT91_SMC_SETUP_NRD(1) | AT91_SMC_SETUP_NCS_RD(0),
+   writel(AT91_SMC_SETUP_NWE(1) | AT91_SMC_SETUP_NCS_WR(1) |
+   AT91_SMC_SETUP_NRD(2) | AT91_SMC_SETUP_NCS_RD(2),
smc-cs[3].setup);
 
writel(AT91_SMC_PULSE_NWE(3) | AT91_SMC_PULSE_NCS_WR(3) |
AT91_SMC_PULSE_NRD(3) | AT91_SMC_PULSE_NCS_RD(3),
smc-cs[3].pulse);
 
-   writel(AT91_SMC_CYCLE_NWE(5) | AT91_SMC_CYCLE_NRD(5),
+   writel(AT91_SMC_CYCLE_NWE(6) | AT91_SMC_CYCLE_NRD(6),
smc-cs[3].cycle);
writel(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE |
AT91_SMC_MODE_EXNW_DISABLE |
AT91_SMC_MODE_DBW_8 |
-   AT91_SMC_MODE_TDF_CYCLE(3),
+   AT91_SMC_MODE_TDF_CYCLE(12),
smc-cs[3].mode);
 
/* Configure RDY/BSY */
-- 
1.5.3

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


Re: [U-Boot] [PATCH v2 1/4] ehci-omap: Clean up added ehci-omap.c

2012-01-25 Thread Igor Grinberg
Hi Govindraj,

On 01/25/12 11:04, Govindraj wrote:
 Hi Igor,
 
 On Sun, Jan 22, 2012 at 5:50 PM, Igor Grinberg grinb...@compulab.co.il 
 wrote:
 On 01/19/12 10:15, Govindraj wrote:
 On Wed, Jan 18, 2012 at 11:21 PM, Igor Grinberg grinb...@compulab.co.il 
 wrote:
 Hi Govindraj,

 On 01/17/12 08:10, Govindraj wrote:


[...]

 and add an ability to pass some kind of private data to the viewport, which
 in case of OMAP will be the port number.
 
 
 I started on adding omap-ulpi-viewport.c which will work with ulpi.c
 if omap_ehci.c is used.

Good! Thanks for working on that.

 
 for port id can we just set a global data field that will inform the
 omap_view port
 on the port id, or we have to modify most api's syntax in
 drivers/usb/ulpi/ulpi.c

IMO, we should modify the API, because it does not make sense
to use the generic layer, but workaround some missing feature...

My suggestion for the change is:
1) introduce some kind of
struct ulpi_viewport {
u32 viewport_addr;
uint portnum;
}

2) use the above struct _instead_ of the u32 ulpi_viewport parameter

Another way, would be instead of uint portnum, use void *private_data,
but I think it will just complicate things too much and there will be no
real benefit (and also will add, otherwise needless, castings).
If the above structure will not be enough for some platform,
it can be extended easily and without changing the API anymore.

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


Re: [U-Boot] [RFC] mx28: Fix reboot from the kernel

2012-01-25 Thread Matthias Fuchs
On 24.01.2012 17:23, Fabio Estevam wrote:
 When running Linux on a mx28evk and issuing a 'reboot'command the following 
 behaviour is observed:
 
 root@freescale /$ reboot  
   
 starting pid 329, tty '': '/etc/rc.d/rcS stop'
   
 root@freescale /$ Stopping inetd: 
   
 Terminated
   
 Unmounting filesystems
   
 umount: tmpfs busy - remounted read-only  
   
 chown: /home/user/.rhosts: Read-only file system  
   
 chown: /home/user: Read-only file system  
   
 chown: /home/user: Read-only file system  
   
 cat: can't open '/proc/devices': No such file or directory
   
 The system is going down NOW! 
   
 Sent SIGTERM to all processes 
   
 Sent SIGKILL to all processes 
   
 Requesting system reboot  
   
 [   24.24] Restarting system. 
   
   
 U-Boot 2011.12-06887-g586ab2f-dirty (Jan 24 2012 - 12:58:50)  
   
   
   
 Freescale i.MX28 family   
   
 DRAM:  0
 
 , and then U-boot hangs.
 
 Calling mx28_power_init() prior to mxs_iomux_setup_multiple_pads() fixes the 
 problem and
 make U-boot to re-start succesfully.

Hmm, I did not observe that issue on my board.
 
 Signed-off-by: Fabio Estevam fabio.este...@freescale.com
 ---
 This patch fixes the reboot issue, but I am not able to provide a good 
 explanation for it, so
 I am marking it as RFC.
 
  arch/arm/cpu/arm926ejs/mx28/spl_boot.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/arch/arm/cpu/arm926ejs/mx28/spl_boot.c 
 b/arch/arm/cpu/arm926ejs/mx28/spl_boot.c
 index dfb8309..0e57252 100644
 --- a/arch/arm/cpu/arm926ejs/mx28/spl_boot.c
 +++ b/arch/arm/cpu/arm926ejs/mx28/spl_boot.c
 @@ -49,8 +49,8 @@ void early_delay(int delay)
  void mx28_common_spl_init(const iomux_cfg_t *iomux_setup,
   const unsigned int iomux_size)
  {
 - mxs_iomux_setup_multiple_pads(iomux_setup, iomux_size);
   mx28_power_init();
 + mxs_iomux_setup_multiple_pads(iomux_setup, iomux_size);
   mx28_mem_init();
   mx28_power_wait_pswitch();
  }
Without an explanation I woutld not accept this patch.

So when adding some instructions before mx28_mem_init() you could
check for the first steps in that function are and if really delaying
the first instructions or same later stuff helps. Perhaps this brings us
a clue.

I will see if your reordering has any impact on my USB recovery boot
issue.

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


Re: [U-Boot] [RFC] mx28: Fix reboot from the kernel

2012-01-25 Thread Stefano Babic
On 24/01/2012 17:23, Fabio Estevam wrote:
 When running Linux on a mx28evk and issuing a 'reboot'command the following 
 behaviour is observed:
 

Hi Fabio,

 
 Calling mx28_power_init() prior to mxs_iomux_setup_multiple_pads() fixes the 
 problem and
 make U-boot to re-start succesfully.

This does not explain why it hangs, and why it does not hangs on
M28apparently, checking both functions there is no evident reason
why they should be called in a certain order. I think we have to dig
more deeply inside this strange behavior.

Best regards,
SWtefano Babic

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


Re: [U-Boot] mx28 spl power cpu clock configuration

2012-01-25 Thread Marek Vasut
 Hi Marek/Fabio,
 
 I think there's an error in code setting up the CPU clock in the
 SPL for the i.MX28. When instruction stepping through
 mx28_power_clock2pll in spl_power_init.c, the processor drops dead
 right after PLL bypass has been disabled.

Stepping through the code is not recommended, that's why I couldn't debug 
certain parts of the power init code either. But I don't think it's a bug, I 
suspect it's an expected behaviour during this transition.
 
 The i.MX28 reference manual (pag 116) states that the JTAG clock is
 derived from the CPU clock and that the JTAG tap will stop working
 if CPU clock is stalled, too low or disabled. I figured that
 disabling PLL bypass would temporarilly cause an irregular clock,
 throwing off the probe, even in adaptive clocking mode. Three
 different probes later, I know it is not.
 
 Freescal tech support said it may be related to a non ARM specification
 shortcut in the clock tree, but that's not causing the problem either.
 
 I succeeded in reproducing the problem using only my JTAG probe
 (Abatron BDI300) on adaptive clocking. Below the transcript of
 the probe's command line interface:
 926Ereset
 ...
 926Emd 0x8004 1
 8004 : 0x0  
 926Emm 0x8004 0x0002
 926Emd 0x8004 1
 8004 : 0x0002   131072  
 926E
 926Emd 0x800401d0 1
 800401d0 : 0x000441ff   279039  .A..
 926Emm 0x800401d0 0x41ff
 926Emd 0x800401d0 1
 After the last command, both mx28evk board and JTAG probe hang. The
 last JTAG transaction, caused by the last 'mm'-command, is shown on
 attachement 'TCK-RTCK, Adaptive, No Frac0.png'. This picture shows that
 the transaction the probe is raising TCK, but the target is no longer
 following it, as it's supposed to do.
 
 When configuring the probe at a fixed clock of 1MHz, the same sequence
 no longer hangs up the probe, but just hangs up the target:
 926Ereset
 ...
 926Emd 0x8004 1
 8004 : 0x0  
 926Emm 0x8004 0x0002
 926Emd 0x8004 1
 8004 : 0x0002   131072  
 926E
 926Emd 0x800401d0 1
 800401d0 : 0x000441ff   279039  .A..
 926Emm 0x800401d0 0x41ff
 926Emd 0x8004 1
 8004 : 0x   -1  
 The last read-back is obviously a bogus value. The last JTAG
 transaction, caused by the last 'mm'-command, is shown on
 attachement 'TCK-RTCK, 1MHz, No Frac0.png'. This picture shows that
 half-way the transaction the stops outputting RTCK, while the probe
 continues on it's fixed clock.
 
 I think the cause of this problem is that PLL bypass is disabled - using
 PLL0 as CPU clock source instead of it's reference xtal - while CPU
 clock gating on PLL0 is still enabled. Now I don't fully understand why
 this problem only occurs when instruction-stepping the code, and not
 under normal operating conditions. It may be related to delay, because
 some time later mx28_mem_init in spl_mem_init.c does disable CPU clock
 gating on PLL0.
 
 I have tested this by modifying the sequence above by inserting commands
 to disable CPU clock gating:
 926Ereset
 ...
 926Emd 0x8004 1
 8004 : 0x0  
 926Emm 0x8004 0x0002
 926Emd 0x8004 1
 8004 : 0x0002   131072  
 926E
 926Emd 0x800401b0 1
 800401b0 : 0x92929292  -1835887982  
 926Emm 0x800401b0 0x12525513
 926Emd 0x800401b0 1
 800401b0 : 0x52521513   138059  ..RR
 926E
 926Emd 0x800401d0 1
 800401d0 : 0x000441ff   279039  .A..
 926Emm 0x800401d0 0x41ff
 926Emd 0x800401d0 1
 800401d0 : 0x41ff16895  .A..
 After this sequence, both probe and board are still fully responsive.
 Even the written value can be read back successfully. Attachement
 'TCK-RTCK, Adaptive, Frac0.png' shows the JTAG transaction, caused by
 the last 'mm'-command. The zoomed section at the bottom shows how the
 clock frequency increases half-way the command.
 
 The sequence above changes more to the clkctrl_frac0 register than just
 disabling CPU clock gating, but I have repeated this sequence writing
 a value of 0x92929212 (over a power-up default of 0x92929292) and that
 works just the same.
 
 Shouldn't we configure clkctrl_frac0 - or at least disable CPU clock
 gating - before disabling PLL bypass?

This seems reasonable. Fabio, can you comment?

M

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


Re: [U-Boot] [PATCH V3 4/6] sf command: allow default chip select through CONFIG_SPI_FLASH_CS

2012-01-25 Thread Matthias Fuchs
Hi Eric,

please see my comments below.

On 24.01.2012 17:18, Eric Nelson wrote:
 This patch allows a board configuration file to provide a default 
 chip-select for serial flash so that first argument to the 'sf' command
 is optional.
 
 On boards that use the mxc_spi driver and a GPIO for chip select, this allows 
 a much simpler command line:
   U-Boot sf probe
 instead of
   U-Boot sf probe 0x5300
 
 Signed-off-by: Eric Nelson eric.nel...@boundarydevices.com
 Acked-by: Dirk Behme dirk.be...@de.bosch.com 
 Acked-by: Stefano Babic sba...@denx.de
 ---
  common/cmd_sf.c |   34 +++---
  1 files changed, 23 insertions(+), 11 deletions(-)
 
 diff --git a/common/cmd_sf.c b/common/cmd_sf.c
 index 7225656..4b32171 100644
 --- a/common/cmd_sf.c
 +++ b/common/cmd_sf.c
 @@ -70,20 +70,28 @@ static int do_spi_flash_probe(int argc, char * const 
 argv[])
   char *endp;
   struct spi_flash *new;
  
 - if (argc  2)
 - return -1;
 -
 - cs = simple_strtoul(argv[1], endp, 0);
 - if (*argv[1] == 0 || (*endp != 0  *endp != ':'))
 +#ifndef CONFIG_SPI_FLASH_CS
 + if (argc  2) {
 + printf(%s: missing arguments\n, __func__);
I think this format for the error message is a little bit untypical for
u-boot. We do not show up the internal C function name. Better would be
to show the command usage, right?

   return -1;
 - if (*endp == ':') {
 - if (endp[1] == 0)
 - return -1;
 + }
 +#else
 + cs = CONFIG_SPI_FLASH_CS ;
Other options for the spi flash subsystem are called
CONFIG_SF_DEFAULT_MODE|SPEED. It think it make sense to call
this CONFIG_SF_DEFAULT_CS and CONFIG_SF_DEFAULT_BUS (see below).

 +#endif
  
 - bus = cs;
 - cs = simple_strtoul(endp + 1, endp, 0);
 - if (*endp != 0)
 + if (argc = 2) {
 + cs = simple_strtoul(argv[1], endp, 0);
 + if (*argv[1] == 0 || (*endp != 0  *endp != ':'))
   return -1;
 + if (*endp == ':') {
 + if (endp[1] == 0)
 + return -1;
 +
 + bus = cs;
 + cs = simple_strtoul(endp + 1, endp, 0);
 + if (*endp != 0)
 + return -1;
 + }
   }
  
   if (argc = 3) {
 @@ -299,7 +307,11 @@ usage:
  U_BOOT_CMD(
   sf, 5,  1,  do_spi_flash,
   SPI flash sub-system,
 +#ifndef CONFIG_SPI_FLASH_CS
   probe [bus:]cs [hz] [mode] - init flash device on given SPI bus\n
 +#else
 + probe [[bus:]cs] [hz] [mode]   - init flash device on given SPI bus\n
 +#endif
and chip select\n
   sf read addr offset len- read `len' bytes starting at\n
`offset' to memory at `addr'\n
Can you also add a config option for the SPI bus number? I think these
two need to handled in the same patch.

So you could add this stuff:

diff --git a/common/cmd_sf.c b/common/cmd_sf.c
index 9e97c8e..fa4312a 100644
--- a/common/cmd_sf.c
+++ b/common/cmd_sf.c
@@ -63,7 +63,11 @@ static int sf_parse_len_arg(char *arg, ulong *len)

 static int do_spi_flash_probe(int argc, char * const argv[])
 {
+#ifdef CONFIG_SF_DEFAULT_BUS
+   unsigned int bus = CONFIG_SF_DEFAULT_BUS;
+#else
unsigned int bus = 0;
+#endif
unsigned int cs;
unsigned int speed = CONFIG_SF_DEFAULT_SPEED;
unsigned int mode = CONFIG_SF_DEFAULT_MODE;

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


Re: [U-Boot] non SPL boot on beagleboard-xm

2012-01-25 Thread Tom Rini
On 01/25/2012 03:03 AM, Peter Meerwald wrote:
 Hello Tom,
 
 I can boot u-boot built from git commit
 b609009801b8a00644926f49b7d0d0cc0d3d8797 successfully, but it fails with
 git commit ee08a8260a3a7f6ef2001cfa3e7b6137b485f40a:
 
 The current implementation (after poking some of the other
 beagleboard.org folks) requires SPL.  It's not a hard requirement of
 supporting SPL that other loaders not be supported, we just didn't aim
 for compatibility.
 
 thank you for the clarification; I had the impression it might be 
 something optional as CONFIG_SPL implies
 
 MLO/SPL + current u-boot breaks the USB ethernet patches (i.e. booting via 
 tftp)

Even with 'dc off' before you start usb?

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


Re: [U-Boot] mx28 spl power cpu clock configuration

2012-01-25 Thread Fabio Estevam
Hi Robert,

On 1/25/12, Marek Vasut marek.va...@gmail.com wrote:

 Shouldn't we configure clkctrl_frac0 - or at least disable CPU clock
 gating - before disabling PLL bypass?

 This seems reasonable. Fabio, can you comment?

Could you please post a patch with your proposed change so that we can test it?

Regards,

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


Re: [U-Boot] non SPL boot on beagleboard-xm

2012-01-25 Thread Peter Meerwald
Hello Tom,

  MLO/SPL + current u-boot breaks the USB ethernet patches (i.e. booting via 
  tftp)

 Even with 'dc off' before you start usb?

I was not aware of the u-boot command 'dc off' -- yes, it solve my USB 
ethernet problem

here is my story (from bisecting):

v2011.06 + Koen et al. patches (git://github.com/koenkooi/u-boot.git) 
works

shortly afterwards, dcache was enabled (commit 
c2dd0d45540397704de9b13287417d21049d34c6) and USB ethernet fails

v2011.09 works if using 'dc off' before 'usb start' (I tried it as a 
recent non-SPL u-boot version)

u-boot current (137703b811502dfea364650fb3e17f20b4c21333) works as well 
with 'dc off' before 'usb start'

thanks, regards, p.

-- 

Peter Meerwald
+43-664-218 (mobile)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] u-boot script test

2012-01-25 Thread James Chargin
In message 1327404627.60813.yahoomail...@web120202.mail.ne1.yahoo.com

 For now i got around this problem with a negative test
 set x

 if test $x != 1 then echo No; else echo Yes; fi

 with this if x is not present i get No, even in the case when x is
 present and set any other value (not 1)
 when i do set x 1 and run the test again i get Yes

 Thanks
 Sridhar

I've experienced a similar situation. For now, I'm using U-Boot 2010.12.
I want to test existence of environment var without any console output
about the result, only control of conditional statement. I've found that
the following provides what I need, even though it is a bit hackish.

My configuration defines CONFIG_SYS_DEVICE_NULLDEV so I can redirect
stdout and hide console output during existence testing.

= setenv stderr nulldev
= if printenv a; then echo yes; else echo no;fi
## Error: a not defined
no
= coninfo
List of available devices:
serial   8003 SIO stdin stdout
nulldev  8003 SIO stderr

This seems a bug, the error message goes to stdout, rather than stderr;
but you decide how you think error messages should work. To work with
this as it is:

= setenv t 'setenv stdout nulldev;if printenv a; then setenv stdout
serial; echo set; true; else setenv stdout serial;echo not set;false; fi'
=
= printenv a
## Error: a not defined
= run t
not set
= setenv a 1
= run t
set
= run t  echo 2
set
2
= setenv a
= run t  echo 2
not set
=

Notice that use of printenv does not expand the environment variable so
there is never any issue with what that expands to.

If the hush shell is present, a hush variable can be used as a
parameter to the testing script

= setenv t 'setenv stdout nulldev;if printenv $var;then setenv stdout
serial;true;else setenv stdout serial;false;fi'
=
= setenv b
= if var=b;run t; then echo yes; else echo no; fi
no
= setenv b 1
= if var=b;run t; then echo yes; else echo no; fi
yes
=

I hope this is helpful.

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


Re: [U-Boot] mx28 spl power cpu clock configuration

2012-01-25 Thread Robert Deliën
Hi Fabio,

 Could you please post a patch with your proposed change so that we can test 
 it?

I was hoping for a suggestion from you, as you know this SoC far better than me.
Currently I am trying different solutions. Even though they prevent the system 
from
hanging up, they still don't enable me to step through the code. And since 
therey's
no problem with normal operation, I think they aren't worth anything unless they
fix instruction stepping.

But as Marek, says: Instruction stepping this section can fail for another 
reason.

Cheers,

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


Re: [U-Boot] mx28 spl power cpu clock configuration

2012-01-25 Thread Marek Vasut
 Hi Fabio,
 
  Could you please post a patch with your proposed change so that we can
  test it?
 
 I was hoping for a suggestion from you, as you know this SoC far better
 than me. Currently I am trying different solutions. Even though they
 prevent the system from hanging up, they still don't enable me to step
 through the code.

From your previous email, it looked like that was proper solution. You can 
still 
send a patch so we can test and proceed further in sync.

 And since therey's no problem with normal operation, I
 think they aren't worth anything unless they fix instruction stepping.

What do you mean?
 
 But as Marek, says: Instruction stepping this section can fail for another
 reason.

I never said such sentence.

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


Re: [U-Boot] mx28 spl power cpu clock configuration

2012-01-25 Thread Robert Deliën
 From your previous email, it looked like that was proper solution. You can 
 still
 send a patch so we can test and proceed further in sync.

I will send it in, as soon as I have a solution that enables instruction 
stepping through
this code.

 What do you mean?

If my 'solution' doesn't enable instruction, it's not really solving any 
problems and
hence not worth anybody's time. Before I send anything in, I want to understand
why it works, and preferably why it didn't work without it.

 I never said such sentence.

You said instruction stepping this area isn't recommended, so I concluded that
many things can go wrong there.

Cheers,

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


Re: [U-Boot] mx28 spl power cpu clock configuration

2012-01-25 Thread Marek Vasut
  From your previous email, it looked like that was proper solution. You
  can still send a patch so we can test and proceed further in sync.
 
 I will send it in, as soon as I have a solution that enables instruction
 stepping through this code.
 
  What do you mean?
 
 If my 'solution' doesn't enable instruction, it's not really solving any
 problems and hence not worth anybody's time. Before I send anything in, I
 want to understand why it works, and preferably why it didn't work without
 it.
 
  I never said such sentence.
 
 You said instruction stepping this area isn't recommended, so I concluded
 that many things can go wrong there.
 
 Cheers,
 
 Robert.

Robert ... do you really want to cooperate and help fix stuff mainline or do 
you 
want to keep everyone in blind, make them guess/help you and when you fix 
something, never come back and have the fix only for yourself?

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


Re: [U-Boot] [U-Boot-Users] cross compiler

2012-01-25 Thread Marek Vasut
 hi.. i am new to u-boot .
  for my practice my team leader asked me to
 cross compile arm720t modnet50 board with arm-none-linux compiler and now
 asking me to compile the same source code with abacus-anurag-linux compiler
 . will it be useful for me? and i am getting a error  that system not
 configured -see readme..
  please help me to start my carrier in u-boot..

It's always good to start with README and doc/

Anyway,

make CROSS_COMPILE=arm-whatever mrproper
make CROSS_COMPILE=arm-whatever modnet50
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] TRATS: Fix uart gpio config

2012-01-25 Thread Marek Vasut
 It updates the missing gpio configuration of UART port.
 
 Signed-off-by: Chander Kashyap chander.kash...@linaro.org
 Cc: HeungJun, Kim riverful@samsung.com
 ---
  board/samsung/trats/trats.c |4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
 index f795ff0..4c9773d 100644
 --- a/board/samsung/trats/trats.c
 +++ b/board/samsung/trats/trats.c
 @@ -337,7 +337,7 @@ static void board_uart_init(void)
   int i;
 
   /* UART0-UART1 GPIOs (part1) : 0x */
 - for (i = 0; i  7; i++) {
 + for (i = 0; i  8; i++) {
   s5p_gpio_set_pull(gpio1-a0, i, GPIO_PULL_NONE);
   s5p_gpio_cfg_pin(gpio1-a0, i, GPIO_FUNC(0x2));
   }
 @@ -347,7 +347,7 @@ static void board_uart_init(void)
* GPA1CON[3] = I2C_3_SCL (3)
* GPA1CON[2] = I2C_3_SDA (3)
*/
 - for (i = 0; i  5; i++) {
 + for (i = 0; i  6; i++) {
   s5p_gpio_set_pull(gpio1-a1, i, GPIO_PULL_NONE);
   s5p_gpio_cfg_pin(gpio1-a1, i,
   GPIO_FUNC((i == 2 || i == 3) ? 0x3 : 0x2));

Acked-by: Marek Vasut marek.va...@gmail.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] non SPL boot on beagleboard-xm

2012-01-25 Thread Tom Rini
On 01/25/2012 08:43 AM, Peter Meerwald wrote:
 Hello Tom,
 
 MLO/SPL + current u-boot breaks the USB ethernet patches (i.e. booting via 
 tftp)
 
 Even with 'dc off' before you start usb?
 
 I was not aware of the u-boot command 'dc off' -- yes, it solve my USB 
 ethernet problem
 
 here is my story (from bisecting):
 
 v2011.06 + Koen et al. patches (git://github.com/koenkooi/u-boot.git) 
 works
 
 shortly afterwards, dcache was enabled (commit 
 c2dd0d45540397704de9b13287417d21049d34c6) and USB ethernet fails
 
 v2011.09 works if using 'dc off' before 'usb start' (I tried it as a 
 recent non-SPL u-boot version)
 
 u-boot current (137703b811502dfea364650fb3e17f20b4c21333) works as well 
 with 'dc off' before 'usb start'

So what's going on is that the dcache has been enabled now, but the USB
stack is not safe, so we have to issue 'dcache off' (or 'dc off') before
starting USB (or in other cases, networking).

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


Re: [U-Boot] mx28 spl power cpu clock configuration

2012-01-25 Thread Robert Deliën
 Robert ... do you really want to cooperate and help fix stuff mainline or do 
 you
 want to keep everyone in blind, make them guess/help you and when you fix
 something, never come back and have the fix only for yourself?

Well, given my very verbose thread start, including oscillographs, it it not my
intention to leave everyone in the blind.

My 'fix' as it is now, doesn't fix any real problem. It's not finished yet. As 
it looks
now, it makes the JTAG connection unreliable. Data is getting corrupted when 
it's
read or written. However, the system no longer hangs up itself.

I will post a patch when I've found a working solution. It's in my best interest
to have it tested and reviewed by you guys, as you understand the clock tree
of this SoC a lot better than I. Besides that, I'd like to have it in the 
mainline as
well, so we don't have to maintain our patches.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] mx28 spl power cpu clock configuration

2012-01-25 Thread Marek Vasut
  Robert ... do you really want to cooperate and help fix stuff mainline or
  do you want to keep everyone in blind, make them guess/help you and when
  you fix something, never come back and have the fix only for yourself?
 
 Well, given my very verbose thread start, including oscillographs, it it
 not my intention to leave everyone in the blind.

That's indeed a good start!

 
 My 'fix' as it is now, doesn't fix any real problem. It's not finished yet.
 As it looks now, it makes the JTAG connection unreliable. Data is getting
 corrupted when it's read or written. However, the system no longer hangs
 up itself.

That IS a progress.
 
 I will post a patch when I've found a working solution. It's in my best
 interest to have it tested and reviewed by you guys, as you understand the
 clock tree of this SoC a lot better than I. Besides that, I'd like to have
 it in the mainline as well, so we don't have to maintain our patches.

But we can also test and review the current solution ;-)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Last version for AT91RM9200-DK

2012-01-25 Thread Marek Vasut
 Hi list,
 
 Someone know what is the last U-boot non-broken version for AT91RM9200-DK
 Board?

Hello,

if it's broken, please fix it and send patch (TM).

 I need the boot from compact flash feature, is that available on that
 version?

No idea, the code is GPL, you have the source.

 I can not have that feature in default installed version (0.3.2 2003)
 right?

That's some version custom-made by whoever it was .. but that's not mainline, 
you should stick with mainline.

M

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


Re: [U-Boot] u-boot-atmel support for SMSC9514

2012-01-25 Thread Marek Vasut
 Dear Wilson Perez,
 
 In message CALe7QMCQ3500k3gCZyAJXbxJKvF-E2wp_RbsSnMwptyPx0-
w...@mail.gmail.com you wrote:
  I am currently using u-boot-2009.11 on an Atmel at91sam9g45 and would
  like to add support for the SMSC9514 to be able to run tcp/ip over usb. 
  The
 
 U-Boot has only a minimal network stack; we can do some UDP, but we
 cannot do TCP/IP.

We can also do ICMP ;-)
 
  goal is to load kernel and filesystem images for system recovery via tftp
  on a tcp/ip over usb interface.
 
 This makes no sesen.  TFTP is a UDP based protocol.  You don't need
 TCP/IP for it.

I think he means he wants to load kernel with tftpboot ... for that, he has to 
update u-boot to a more recent (mainline) version and simply use the USB 
ethernet stuff. I think this particular chip is supported already.

M

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


Re: [U-Boot] non SPL boot on beagleboard-xm

2012-01-25 Thread Marek Vasut
 On 01/25/2012 08:43 AM, Peter Meerwald wrote:
  Hello Tom,
  
  MLO/SPL + current u-boot breaks the USB ethernet patches (i.e. booting
  via tftp)
  
  Even with 'dc off' before you start usb?
  
  I was not aware of the u-boot command 'dc off' -- yes, it solve my USB
  ethernet problem
  
  here is my story (from bisecting):
  
  v2011.06 + Koen et al. patches (git://github.com/koenkooi/u-boot.git)
  works
  
  shortly afterwards, dcache was enabled (commit
  c2dd0d45540397704de9b13287417d21049d34c6) and USB ethernet fails
  
  v2011.09 works if using 'dc off' before 'usb start' (I tried it as a
  recent non-SPL u-boot version)
  
  u-boot current (137703b811502dfea364650fb3e17f20b4c21333) works as well
  with 'dc off' before 'usb start'
 
 So what's going on is that the dcache has been enabled now, but the USB
 stack is not safe, so we have to issue 'dcache off' (or 'dc off') before
 starting USB (or in other cases, networking).

Why would it not be safe? Because we don't have the unified cache ops in place 
yet? :-(

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


Re: [U-Boot] [PATCH 00/14] Nokia RX-51 support

2012-01-25 Thread Marek Vasut
 This patch series add support for new board Nokia RX-51 (aka N900).
 Last two patches adding on screen bootmenu support.

Isn't on-screen bootmenu already supported by common/menu.c stuff ?
 
 This series supersedes the last sent version.

So ... this is V2? What are the changes from previous version of the series? 
Please read Submitting patches on the wiki next time.

 
 Pali Rohár (14):
   arm,omap3: Define save_boot_params in lowlevel_init.S for SPL only
   arm: Optionally use existing atags in bootm.c
   Add power bus message definitions in twl4030.h
   Fix function readline in main.c
   cfb_console: Fix function console_scrollup
   cfb_console: Add function console_clear and console_clear_line
   cfb_console: Add functions for moving with cursor
   cfb_console: Add support for some ANSI terminal escape codes
   New command clear: Clear the ANSI terminal
   New config variable CONFIG_MENUCMD
   New config variable CONFIG_PREMONITOR
   New board support: Nokia RX-51 aka N900
   New command bootmenu: ANSI terminal Boot Menu support
   RX-51: Add support for bootmenu
 
  README   |2 +
  arch/arm/cpu/armv7/omap3/lowlevel_init.S |4 +-
  arch/arm/lib/bootm.c |   39 +++-
  board/nokia/rx51/Makefile|   46 
  board/nokia/rx51/lowlevel_init.S |   79 ++
  board/nokia/rx51/rx51.c  |  381
 ++ board/nokia/rx51/rx51.h  | 
 378 + boards.cfg  
 |1 +
  common/Makefile  |2 +
  common/cmd_bootmenu.c|  366
  common/cmd_clear.c   |  
 42 
  common/env_common.c  |3 +
  common/main.c|   89 ++-
  drivers/video/cfb_console.c  |  346
 +-- include/common.h |  
 20 ++
  include/config_cmd_all.h |2 +
  include/configs/nokia_rx51.h |  375
 + include/twl4030.h|  
 98 
  18 files changed, 2233 insertions(+), 40 deletions(-)
  create mode 100644 board/nokia/rx51/Makefile
  create mode 100644 board/nokia/rx51/lowlevel_init.S
  create mode 100644 board/nokia/rx51/rx51.c
  create mode 100644 board/nokia/rx51/rx51.h
  create mode 100644 common/cmd_bootmenu.c
  create mode 100644 common/cmd_clear.c
  create mode 100644 include/configs/nokia_rx51.h
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 01/14] arm, omap3: Define save_boot_params in lowlevel_init.S for SPL only

2012-01-25 Thread Marek Vasut
 * Hide function save_boot_params if CONFIG_SPL_BUILD is not defined
 (function do nothing)

What do you mean by this statement here ?
 
 * Same behaviour as in file arch/arm/cpu/armv7/omap4/lowlevel_init.S

Eh?

 * This allow to implement board specified function save_boot_params in
 board code

I see ... do you want to write overridable function? Make it a weak alias?

M
 
 Signed-off-by: Pali Rohár pali.ro...@gmail.com
 ---
 Changes since original version:
- Fixed commit message
 
  arch/arm/cpu/armv7/omap3/lowlevel_init.S |4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/arch/arm/cpu/armv7/omap3/lowlevel_init.S
 b/arch/arm/cpu/armv7/omap3/lowlevel_init.S index 2f6930b..c42c5dd 100644
 --- a/arch/arm/cpu/armv7/omap3/lowlevel_init.S
 +++ b/arch/arm/cpu/armv7/omap3/lowlevel_init.S
 @@ -35,15 +35,15 @@
  _TEXT_BASE:
   .word   CONFIG_SYS_TEXT_BASE/* sdram load addr from config.mk */
 
 +#ifdef CONFIG_SPL_BUILD
  .global save_boot_params
  save_boot_params:
 -#ifdef CONFIG_SPL_BUILD
   ldr r4, =omap3_boot_device
   ldr r5, [r0, #0x4]
   and r5, r5, #0xff
   str r5, [r4]
 -#endif
   bx  lr

Wasn't this jump intentionally left out from the macro ifdef block?

 +#endif
 
  .global omap3_gp_romcode_call
  omap3_gp_romcode_call:
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 02/14] arm: Optionally use existing atags in bootm.c

2012-01-25 Thread Marek Vasut
 This patch adapts the bootm command so that it can use an existing atags
 command set up by a previous bootloader.

Why do you need it?

 If the environment variable
 atagaddr is unset, bootm behaves as normal. If atagaddr is set, bootm
 will use atags address from environment variable and also append new boot
 args (if specified in u-boot). For example, if a previous boot loader
 already set up the atags struct at 0x8100:
 
 setenv atagaddr 0x8100; bootm 0x80008000

Can't you set those atags correctly in uboot?

M
 
 Signed-off-by: Pali Rohár pali.ro...@gmail.com
 ---
 Changes since original version:
- Added info to README file
- Added local define CONFIG_SETUP_ANY_TAG
- Fixed compile warning
- Fixed commit message
- Check if atagaddr is not NULL
 
  README   |2 ++
  arch/arm/lib/bootm.c |   39 ---
  2 files changed, 34 insertions(+), 7 deletions(-)
 
 diff --git a/README b/README
 index 9d713e8..8c3b98a 100644
 --- a/README
 +++ b/README
 @@ -3584,6 +3584,8 @@ Some configuration options can be set using
 Environment Variables.
 
  List of environment variables (most likely not complete):
 
 +  atagaddr   - bootm will use ATAGs struct from specified address (arm only)
 +
baudrate   - see CONFIG_BAUDRATE
 
bootdelay  - see CONFIG_BOOTDELAY
 diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
 index afa0093..8366dd5 100644
 --- a/arch/arm/lib/bootm.c
 +++ b/arch/arm/lib/bootm.c
 @@ -93,6 +93,14 @@ static void announce_and_cleanup(void)
   cleanup_before_linux();
  }
 
 +#if defined(CONFIG_SETUP_MEMORY_TAGS) || \
 +defined(CONFIG_CMDLINE_TAG) || \
 +defined(CONFIG_INITRD_TAG) || \
 +defined(CONFIG_SERIAL_TAG) || \
 +defined(CONFIG_REVISION_TAG)
 +#define CONFIG_SETUP_ANY_TAG
 +#endif
 +
  int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t
 *images) {
   bd_t*bd = gd-bd;
 @@ -125,12 +133,22 @@ int do_bootm_linux(int flag, int argc, char *argv[],
 bootm_headers_t *images) debug (## Transferring control to Linux (at
 address %08lx) ...\n, (ulong) kernel_entry);
 
 -#if defined (CONFIG_SETUP_MEMORY_TAGS) || \
 -defined (CONFIG_CMDLINE_TAG) || \
 -defined (CONFIG_INITRD_TAG) || \
 -defined (CONFIG_SERIAL_TAG) || \
 -defined (CONFIG_REVISION_TAG)
 - setup_start_tag (bd);
 + s = getenv(atagaddr);
 + if (s)
 + bd-bi_boot_params = simple_strtoul(s, NULL, 16);
 +
 + if (bd-bi_boot_params) {
 + printf(Using existing atags at %#lx\n, bd-bi_boot_params);
 +
 + params = (struct tag *) bd-bi_boot_params;
 + while (params-hdr.size  0)
 + params = tag_next(params);
 + } else {
 +#ifdef CONFIG_SETUP_ANY_TAG
 + setup_start_tag(bd);
 +#endif
 + }
 +
  #ifdef CONFIG_SERIAL_TAG
   setup_serial_tag (params);
  #endif
 @@ -147,8 +165,15 @@ int do_bootm_linux(int flag, int argc, char *argv[],
 bootm_headers_t *images) if (images-rd_start  images-rd_end)
   setup_initrd_tag (bd, images-rd_start, images-rd_end);
  #endif
 - setup_end_tag(bd);
 +
 + if (s) {
 + if (params-hdr.size  0)
 + setup_end_tag(bd);
 + } else {
 +#ifdef CONFIG_SETUP_ANY_TAG
 + setup_end_tag(bd);
  #endif
 + }
 
   announce_and_cleanup();
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] SPL Framework: Add support for U_BOOT_CMD

2012-01-25 Thread Tom Rini
On Wed, Jan 25, 2012 at 4:43 AM, Christian Riesch
christian.rie...@omicron.at wrote:
 Hi,

 On Wed, Jan 25, 2012 at 11:50 AM, Prabhakar Lad
 prabhakar.cse...@gmail.com wrote:
 On Wed, Jan 25, 2012 at 3:57 PM, Christian Riesch 
 christian.rie...@omicron.at wrote:

 Hi,

 On Wed, Jan 25, 2012 at 10:52 AM, Prabhakar Lad
 prabhakar.cse...@gmail.com wrote:
  *I want to add a command using U_BOOT_CMD in uboot, where SPL_BUILD is
  enabled for example for da850evm in spl frame work how can i do that *

 Why do you want to do that? A command in an SPL?

    For davinci soc I wanted to add clocks command not particularly for
 SPL only
    when I move some piece of code from arc/arm/cpu/arm926ejs/cpu.c to say
    arc/arm/cpu/arm926ejs/speed.c and implement the command I get following
 errors,

   arm-none-linux-gnueabi-ld: error: no memory region specified for
 loadable section `.u_boot_cmd'
   make[2]: ***
 [/home/plad/ti/uboot/denx_uboot/uboot-ti/u-boot-ti/spl/u-boot-spl] Error 1
   make[2]: Leaving directory
 `/home/plad/ti/uboot/denx_uboot/uboot-ti/u-boot-ti/spl'
   I get these errors for SPL enabled

 As Wolfgang wrote, commands cannot be run in SPL and therefore you
 should not compile them into SPL.

 How about something like this:

 #ifndef CONFIG_SPL_BUILD
 U_BOOT_CMD(
 ...
 );
 #endif

 If you don't use Sughosh's patches I think you need #ifndef
 CONFIG_NAND_SPL instead of #ifndef CONFIG_SPL_BUILD.
 Regards, Christian

Maybe we should poke command.h to nop out U_BOOT_CMD for
CONFIG_SPL_BUILD?  OTOH, #ifndef'ing U_BOOT_CMD and the code itself
gets us a space savings we wouldn't get otherwise (I suspect giving
the MTD/NAND issue I've mentioned before)...

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


Re: [U-Boot] [PATCH 04/14] Fix function readline in main.c

2012-01-25 Thread Marek Vasut
  * Ignore ANSI escape codes for moving cursor, which are generated by
 keyboard

I think WD should comment on this one.

 
 Signed-off-by: Pali Rohár pali.ro...@gmail.com
 ---
 Changes since original version:
- Fixed commit message
 
  common/main.c |   51 +++
  1 files changed, 51 insertions(+), 0 deletions(-)
 
 diff --git a/common/main.c b/common/main.c
 index e96c95a..e7b5516 100644
 --- a/common/main.c
 +++ b/common/main.c
 @@ -958,6 +958,7 @@ int readline_into_buffer (const char *const prompt,
 char * buffer) intn = 0;  /* buffer index 
*/
   int plen = 0;   /* prompt length*/
   int col;/* output column cnt*/
 + int esc = 0;/* ansi escape char */
   charc;
 
   /* print prompt */
 @@ -1024,7 +1025,57 @@ int readline_into_buffer (const char *const prompt,
 char * buffer) p=delete_char(p_buf, p, col, n, plen);
   continue;
 
 + case '\e':  /* ANSI escape char */
 + esc = 1;
 + continue;
 +
   default:
 +
 + /*
 +  * Check for ANSI escape chars
 +  */
 + if (esc == 0  c == '\e') {
 + esc = 1;
 + continue;
 + } else if (esc == 1) {
 + if (c == '[') {
 + esc = 2;
 + continue;
 + }
 + if (n  CONFIG_SYS_CBSIZE-2) {
 + ++n;
 + *p++ = '\e';
 + putc('\e');
 + }
 + esc = 0;
 + } else if (esc == 2 || esc == 3) {
 + if (esc == 2  c == '1') {
 + esc = 3;
 + continue;
 + }
 + /* Ignore ANSI escape sequences */
 + /* generated by keyboard */
 + /* \e [ 1 A-D and \e [ A-D */
 + if (c = 'A'  c = 'D') {
 + esc = 0;
 + continue;
 + }
 + if (esc == 2  n  CONFIG_SYS_CBSIZE-3) {
 + n += 2;
 + *p++ = '\e';
 + *p++ = '[';
 + puts(\e[);
 + } else if (esc == 3 
 + n  CONFIG_SYS_CBSIZE-4) {
 + n += 3;
 + *p++ = '\e';
 + *p++ = '[';
 + *p++ = '1';
 + puts(\e[1);
 + }
 + esc = 0;
 + }
 +
   /*
* Must be a normal character then
*/
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 05/14] cfb_console: Fix function console_scrollup

2012-01-25 Thread Marek Vasut
  * Use correct buffer size, do not damage screen output

What are the symptoms, how does this fix the issue?

Ccing Anatolij, I think he's the right one for this patch. Again, keep the 
correct CC!!!

 
 Signed-off-by: Pali Rohár pali.ro...@gmail.com
 ---
 Changes since original version:
- Fixed commit message
 
  drivers/video/cfb_console.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
 index 904caf7..9092399 100644
 --- a/drivers/video/cfb_console.c
 +++ b/drivers/video/cfb_console.c
 @@ -701,7 +701,7 @@ static void console_scrollup(void)
   );
  #else
   memcpyl(CONSOLE_ROW_FIRST, CONSOLE_ROW_SECOND,
 - CONSOLE_SCROLL_SIZE  2);
 + CONSOLE_SCROLL_SIZE);
  #endif
 
   /* clear the last one */
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 06/14] cfb_console: Add function console_clear and console_clear_line

2012-01-25 Thread Marek Vasut
  * console_clear - clear full console framebuffer output
  * console_clear_line - clear part of specified line (or full)
 
 Signed-off-by: Pali Rohár pali.ro...@gmail.com
 ---
 Changes since original version:
- Fixed commit message
 
  drivers/video/cfb_console.c |   64
 +++ 1 files changed, 52
 insertions(+), 12 deletions(-)
 
 diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
 index 9092399..b74d6d0 100644
 --- a/drivers/video/cfb_console.c
 +++ b/drivers/video/cfb_console.c
 @@ -683,6 +683,57 @@ static void memcpyl(int *d, int *s, int c)
  }
  #endif
 
 +static void console_clear(void)

Do you use this function AT ALL?

 +{
 +#ifdef VIDEO_HW_RECTFILL
 + video_hw_rectfill(VIDEO_PIXEL_SIZE, /* bytes per pixel */
 +   0,/* dest pos x */
 +   video_logo_height,/* dest pos y */
 +   VIDEO_VISIBLE_COLS,   /* frame width */
 +   VIDEO_VISIBLE_ROWS,   /* frame height */
 +   bgx   /* fill color */
 + );
 +#else
 + memsetl(CONSOLE_ROW_FIRST, CONSOLE_SIZE, bgx);
 +#endif
 +}
 +
 +static void console_clear_line(int line, int begin, int end)
 +{
 +#ifdef VIDEO_HW_RECTFILL
 + video_hw_rectfill(VIDEO_PIXEL_SIZE, /* bytes per pixel */
 +   /* FIXME: correct? */
 +   VIDEO_FONT_WIDTH * begin, /* dest pos x */
 +   /* FIXME: correct? */
 +   video_logo_height +
 +   CONSOLE_ROW_SIZE * line,  /* dest pos y */
 +   /* FIXME: correct? */
 +   VIDEO_FONT_WIDTH * (end - begin), /* frame width */
 +   VIDEO_FONT_HEIGHT,/* frame height */
 +   bgx   /* fill color */
 + );
 +#else
 + int i;
 + if (begin == 0  end == CONSOLE_COLS)
 + memsetl(CONSOLE_ROW_FIRST +
 + CONSOLE_ROW_SIZE * line,/* offset of row */
 + CONSOLE_ROW_SIZE  2,  /* length of row */
 + bgx /* fill color */
 + );
 + else
 + for (i = 0; i  VIDEO_FONT_HEIGHT; ++i)
 + memsetl(CONSOLE_ROW_FIRST +
 + CONSOLE_ROW_SIZE * line + /* offset of row */
 + VIDEO_FONT_WIDTH *
 + VIDEO_PIXEL_SIZE * begin + /* offset of col */
 + i * VIDEO_LINE_LEN, /* col offset of i line */
 + (VIDEO_FONT_WIDTH * VIDEO_PIXEL_SIZE *
 + (end - begin + 1))  2, /* length to end */
 + bgx /* fill color */
 + );
 +#endif
 +}
 +
  static void console_scrollup(void)
  {
   /* copy up rows ignoring the first one */
 @@ -705,18 +756,7 @@ static void console_scrollup(void)
  #endif
 
   /* clear the last one */
 -#ifdef VIDEO_HW_RECTFILL
 - video_hw_rectfill(VIDEO_PIXEL_SIZE, /* bytes per pixel */
 -   0,/* dest pos x */
 -   VIDEO_VISIBLE_ROWS
 -   - VIDEO_FONT_HEIGHT,  /* dest pos y */
 -   VIDEO_VISIBLE_COLS,   /* frame width */
 -   VIDEO_FONT_HEIGHT,/* frame height */
 -   CONSOLE_BG_COL/* fill color */
 - );
 -#else
 - memsetl(CONSOLE_ROW_LAST, CONSOLE_ROW_SIZE  2, CONSOLE_BG_COL);
 -#endif
 + console_clear_line(CONSOLE_ROWS-1, 0, CONSOLE_COLS);
  }
 
  static void console_back(void)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 09/14] New command clear: Clear the ANSI terminal

2012-01-25 Thread Marek Vasut
  * Command can be enabled by CONFIG_CMD_CLEAR
  * Added some ANSI escape codes definitions in common.h
 
 Signed-off-by: Pali Rohár pali.ro...@gmail.com
 Cc: Marcel Mol mar...@mesa.nl

Do you seriously need a new command for such a simple operation?

M
 ---
 Changes since original version:
- Renamed command clr to clear
- Use puts instead printf
- Move cursor to pos1,1
- Merged parts of patch Add some ANSI escape codes definitions in
 common.h
 
  common/Makefile  |1 +
  common/cmd_clear.c   |   42 ++
  include/common.h |7 +++
  include/config_cmd_all.h |1 +
  4 files changed, 51 insertions(+), 0 deletions(-)
  create mode 100644 common/cmd_clear.c
 
 diff --git a/common/Makefile b/common/Makefile
 index 2d9ae8c..e1efd45 100644
 --- a/common/Makefile
 +++ b/common/Makefile
 @@ -69,6 +69,7 @@ COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o cmd_bedbug.o
  COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o
  COBJS-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o
  COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o
 +COBJS-$(CONFIG_CMD_CLEAR) += cmd_clear.o
  COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o
  COBJS-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o
  COBJS-$(CONFIG_DATAFLASH_MMC_SELECT) += cmd_dataflash_mmc_mux.o
 diff --git a/common/cmd_clear.c b/common/cmd_clear.c
 new file mode 100644
 index 000..597611e
 --- /dev/null
 +++ b/common/cmd_clear.c
 @@ -0,0 +1,42 @@
 +/*
 + * Copyright 2011
 + * Marcel Mol, MESA Consulting, mar...@mesa.nl
 + *
 + * Copyright 2011
 + * Pali Rohár, pali.ro...@gmail.com
 + *
 + * See file CREDITS for list of people who contributed to this
 + * project.
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License as
 + * published by the Free Software Foundation; either version 2 of
 + * the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 + * MA 02111-1307 USA
 + */
 +
 +#include common.h
 +#include command.h
 +
 +static int do_clear(cmd_tbl_t *cmdtp, int flag, int argc, char * const
 argv[]) +{
 + puts(ANSI_CLEAR_CONSOLE);
 + printf(ANSI_CURSOR_POSITION, 1, 1);
 + return 0;
 +}
 +
 +U_BOOT_CMD(
 + clear,CONFIG_SYS_MAXARGS, 1,  do_clear,
 + clear,
 + \n
 + - clear screen and move cursor to top of screen
 +);
 diff --git a/include/common.h b/include/common.h
 index 3df1def..9c0449e 100644
 --- a/include/common.h
 +++ b/include/common.h
 @@ -751,6 +751,13 @@ void clear_ctrlc (void); /* clear the Control-C
 condition */ int  disable_ctrlc (int);/* 1 to disable, 0 to enable
 Control-C detect */
 
  /*
 + * ANSI terminal
 + */
 +
 +#define ANSI_CURSOR_POSITION \e[%d;%dH
 +#define ANSI_CLEAR_CONSOLE   \e[2J
 +
 +/*
   * STDIO based functions (can always be used)
   */
  /* serial stuff */
 diff --git a/include/config_cmd_all.h b/include/config_cmd_all.h
 index 9716f9c..3f25eba 100644
 --- a/include/config_cmd_all.h
 +++ b/include/config_cmd_all.h
 @@ -23,6 +23,7 @@
  #define CONFIG_CMD_BSP   /* Board Specific functions */
  #define CONFIG_CMD_CACHE /* icache, dcache   */
  #define CONFIG_CMD_CDP   /* Cisco Discovery Protocol */
 +#define CONFIG_CMD_CLEAR /* ANSI clear screen command*/
  #define CONFIG_CMD_CONSOLE   /* coninfo  */
  #define CONFIG_CMD_DATE  /* support for RTC, date/time...*/
  #define CONFIG_CMD_DHCP  /* DHCP Support */
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 10/14] New config variable CONFIG_MENUCMD

2012-01-25 Thread Marek Vasut
  * If not defined CONFIG_MENUCMD do nothing
 
  * If CONFIG_MENUKEY is 0 and was pressed any key run env menu_cmd
  * If pressed key was CONFIG_MENUKEY run env menu_cmd
  * If CONFIG_MENUKEY is not defined run env menu_cmd always
 
  * CONFIG_MENUKEY working if defined CONFIG_MENUCMD and CONFIG_BOOTDELAY =
 0
 
 Signed-off-by: Pali Rohár pali.ro...@gmail.com

So this is just to interrupt autoboot? Why not just report the menukey as any 
other keypress and do it that way?

M
 ---
 Changes since original version:
- Fixed commit message
 
  common/main.c |   34 +++---
  1 files changed, 23 insertions(+), 11 deletions(-)
 
 diff --git a/common/main.c b/common/main.c
 index e7b5516..503d6c4 100644
 --- a/common/main.c
 +++ b/common/main.c
 @@ -82,6 +82,20 @@ int do_mdm_init = 0;
  extern void mdm_init(void); /* defined in board.c */
  #endif
 
 +#if defined(CONFIG_MENUKEY)  !defined(CONFIG_MENUCMD)  \
 +(!defined(CONFIG_BOOTDELAY) || CONFIG_BOOTDELAY  0)
 +#error CONFIG_MENUKEY defined, but not CONFIG_MENUCMD or CONFIG_BOOTDELAY
 = 0 +#error define CONFIG_MENUCMD and CONFIG_BOOTDELAY too
 +#endif
 +
 +#ifdef CONFIG_MENUCMD
 +# ifdef CONFIG_MENUKEY
 +static int menucmd;
 +# else
 +static int menucmd = 1;
 +# endif
 +#endif
 +
  /*
 ** * Watch for 'delay' seconds for autoboot stop or autoboot delay string.
 * returns: 0 -  no key string, allow autoboot 1 - got key string, abort @@
 -201,10 +215,6 @@ int abortboot(int bootdelay)
 
  # else   /* !defined(CONFIG_AUTOBOOT_KEYED) */
 
 -#ifdef CONFIG_MENUKEY
 -static int menukey = 0;
 -#endif
 -
  #ifndef CONFIG_MENU
  static inline
  #endif
 @@ -241,8 +251,10 @@ int abortboot(int bootdelay)
   if (tstc()) {   /* we got a key press   */
   abort  = 1; /* don't auto boot  */
   bootdelay = 0;  /* no more delay*/
 -# ifdef CONFIG_MENUKEY
 - menukey = getc();
 +# if defined(CONFIG_MENUCMD)  defined(CONFIG_MENUKEY)
 + if (CONFIG_MENUKEY == 0 ||
 + CONFIG_MENUKEY == getc())
 + menucmd = 1;
  # else
   (void) getc();  /* consume input*/
  # endif
 @@ -292,6 +304,7 @@ int run_command2(const char *cmd, int flag)
 
  void main_loop (void)
  {
 + char *s;
  #ifndef CONFIG_SYS_HUSH_PARSER
   static char lastcommand[CONFIG_SYS_CBSIZE] = { 0, };
   int len;
 @@ -300,7 +313,6 @@ void main_loop (void)
  #endif
 
  #if defined(CONFIG_BOOTDELAY)  (CONFIG_BOOTDELAY = 0)
 - char *s;
   int bootdelay;
  #endif
  #ifdef CONFIG_PREBOOT
 @@ -405,15 +417,15 @@ void main_loop (void)
   disable_ctrlc(prev);/* restore Control C checking */
  # endif
   }
 +#endif /* CONFIG_BOOTDELAY */
 
 -# ifdef CONFIG_MENUKEY
 - if (menukey == CONFIG_MENUKEY) {
 +#ifdef CONFIG_MENUCMD
 + if (menucmd == 1) {
   s = getenv(menucmd);
   if (s)
   run_command2(s, 0);
   }
 -#endif /* CONFIG_MENUKEY */
 -#endif /* CONFIG_BOOTDELAY */
 +#endif
 
   /*
* Main Loop for Monitor Command Processing
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 11/14] New config variable CONFIG_PREMONITOR

2012-01-25 Thread Marek Vasut
  * if defined run env premonitor before Main Loop for Monitor Processing

What is this good for?
 
 Signed-off-by: Pali Rohár pali.ro...@gmail.com
 ---
 Changes since original version:
- removed #ifdef CONFIG_PREMONITOR in main.c
 
  common/env_common.c |3 +++
  common/main.c   |4 
  2 files changed, 7 insertions(+), 0 deletions(-)
 
 diff --git a/common/env_common.c b/common/env_common.c
 index 71811c4..1c2360d 100644
 --- a/common/env_common.c
 +++ b/common/env_common.c
 @@ -92,6 +92,9 @@ const uchar default_environment[] = {
  #ifdef   CONFIG_PREBOOT
   preboot=  CONFIG_PREBOOT  \0
  #endif
 +#ifdef   CONFIG_PREMONITOR
 + premonitor=   CONFIG_PREMONITOR   \0
 +#endif
  #ifdef   CONFIG_ROOTPATH
   rootpath= CONFIG_ROOTPATH \0
  #endif
 diff --git a/common/main.c b/common/main.c
 index 503d6c4..e0c262c 100644
 --- a/common/main.c
 +++ b/common/main.c
 @@ -427,6 +427,10 @@ void main_loop (void)
   }
  #endif
 
 + s = getenv(premonitor);
 + if (s)
 + run_command2(s, 0);
 +
   /*
* Main Loop for Monitor Command Processing
*/
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 13/14] New command bootmenu: ANSI terminal Boot Menu support

2012-01-25 Thread Marek Vasut
  * Added some ANSI escape codes definitions in common.h
  * Configuration is done via env variables bootmenu_delay and
 bootmenu_num:
 
 bootmenu_delay=delay
 bootmenu_num=title=commands
 
 (title and commands are separated by first char '=')
 
 delay is delay in seconds of autobooting first entry
 num is boot menu entry, starting from zero
 title is text shown in boot screen
 commands are commands which will be executed when menu entry is
 selected

Do you need this command if you already have common/menu.c?

M

 
  * First argument of bootmenu command override bootmenu_delay env
  * If env bootmenu_delay or bootmenu arg is not specified, delay is 10
 seconds * If delay is 0, no entry will be shown on screen and first will
 be called * If delay is less then 0, no autoboot delay will be used
  * Boot Menu will stop finding next menu entry if last was not defined
  * Boot Menu always add menu entry U-Boot console at end of all entries
 
  * Example using:
 
 setenv bootmenu_0 Boot 1. kernel=bootm 0x8200  # Set first menu
 entry setenv bootmenu_1 Boot 2. kernel=bootm 0x8300  # Set second menu
 entry setenv bootmenu_2 Reset board=reset# Set third menu
 entry setenv bootmenu_3 U-Boot boot order=boot   # Set fourth menu
 entry setenv bootmenu_4  # Empty string is end of all bootmenu entries
 bootmenu 20# Run bootmenu with autoboot delay 20s
 
 Signed-off-by: Pali Rohár pali.ro...@gmail.com
 ---
 Changes since original version:
- ANSI bootmenu command: use puts instead printf
- Merged parts of patch Add some ANSI escape codes definitions in
 common.h
 
  common/Makefile  |1 +
  common/cmd_bootmenu.c|  366
 ++ include/common.h | 
  13 ++
  include/config_cmd_all.h |1 +
  4 files changed, 381 insertions(+), 0 deletions(-)
  create mode 100644 common/cmd_bootmenu.c
 
 diff --git a/common/Makefile b/common/Makefile
 index e1efd45..7402bfb 100644
 --- a/common/Makefile
 +++ b/common/Makefile
 @@ -67,6 +67,7 @@ COBJS-$(CONFIG_CMD_SOURCE) += cmd_source.o
  COBJS-$(CONFIG_CMD_BDI) += cmd_bdinfo.o
  COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o cmd_bedbug.o
  COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o
 +COBJS-$(CONFIG_CMD_BOOTMENU) += cmd_bootmenu.o
  COBJS-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o
  COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o
  COBJS-$(CONFIG_CMD_CLEAR) += cmd_clear.o
 diff --git a/common/cmd_bootmenu.c b/common/cmd_bootmenu.c
 new file mode 100644
 index 000..931ed18
 --- /dev/null
 +++ b/common/cmd_bootmenu.c
 @@ -0,0 +1,366 @@
 +/*
 + * (C) Copyright 2011 Pali Rohár pali.ro...@gmail.com
 + *
 + * See file CREDITS for list of people who contributed to this
 + * project.
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License as
 + * published by the Free Software Foundation; either version 2 of
 + * the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 + * MA 02111-1307 USA
 + */
 +
 +#include common.h
 +#include command.h
 +#include watchdog.h
 +#include linux/string.h
 +
 +#ifdef CONFIG_SYS_HUSH_PARSER
 +#include hush.h
 +#endif
 +
 +static char *get_option(int n)
 +{
 +
 + char name[] = bootmenu_\0\0;
 +
 + if (n  0 || n  99)
 + return NULL;
 +
 + sprintf(name+9, %d, n);
 +
 + return getenv(name);
 +
 +}
 +
 +static char *get_end_of_title(char *str)
 +{
 +
 + if (!str)
 + return NULL;
 +
 + return strchr(str, '=');
 +
 +}
 +
 +static int print_title(char *begin, char *end)
 +{
 +
 + if (!begin || !end || end  begin)
 + return 1;
 +
 + while (begin != end)
 + putc(*(begin++));
 +
 + return 0;
 +
 +}
 +
 +static int print_entry(int n, int reverse)
 +{
 +
 + char *str = get_option(n);
 + char *end = get_end_of_title(str);
 +
 + if (!end)
 + return 1;
 +
 + printf(ANSI_CURSOR_POSITION, n+4, 1);
 +
 + if (reverse)
 + puts(ANSI_COLOR_REVERSE);
 +
 + puts( );
 + print_title(str, end);
 + puts(ANSI_CLEAR_LINE_TO_END);
 +
 + if (reverse)
 + puts(ANSI_COLOR_RESET);
 +
 + return 0;
 +
 +}
 +
 +static int print_menu(int active)
 +{
 +
 + int n = 0;
 +
 + printf(ANSI_CURSOR_POSITION, 1, 1);
 + puts(ANSI_CLEAR_LINE);
 + printf(ANSI_CURSOR_POSITION, 2, 1);
 + puts(  *** U-Boot BOOT MENU ***);
 + puts(ANSI_CLEAR_LINE_TO_END);
 + printf(ANSI_CURSOR_POSITION, 3, 

Re: [U-Boot] [PATCH] omap: mmc: Raise timeout value to 20ms

2012-01-25 Thread Tom Rini
On Wed, Jan 25, 2012 at 3:35 AM, Andreas Müller
schnitzelt...@googlemail.com wrote:
 On Wednesday, January 11, 2012 04:34:05 PM Tom Rini trini at ti.com wrote:
 I ordered the same card Peter sees failure on and it arrived
 yesterday.  I'm formatting it now and will see if I can duplicate the
 problem here today.
 ping?

I thought I had sent a message saying I didn't see failure on my card,
sadly, so that I wanted a clean version of the changes Peter did based
on my didn't-work patch.

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


Re: [U-Boot] [PATCH 03/14] Add power bus message definitions in twl4030.h

2012-01-25 Thread Marek Vasut
 * Code copied from linux kernel 3.0.0 from file include/linux/i2c/twl.h

Do you need them?

Also, as in other patches, I noticed you don't CC Tom Rini. Also, Ccing Igor 
Grinberg. Please keep the Cc in next inkarnation of the series!

Guys, can you also help review the rest of the series ?

 
 Signed-off-by: Pali Rohár pali.ro...@gmail.com
 ---
 Changes since original version:
- Fixed commit message
 
  include/twl4030.h |   98
 + 1 files changed, 98
 insertions(+), 0 deletions(-)
 
 diff --git a/include/twl4030.h b/include/twl4030.h
 index 9cd32ab..0c17f59 100644
 --- a/include/twl4030.h
 +++ b/include/twl4030.h
 @@ -151,6 +151,103 @@
  #define TWL4030_PM_MASTER_SW_EVENTS_DEVSLP   (1  1)
  #define TWL4030_PM_MASTER_SW_EVENTS_DEVOFF   (1  0)
 
 +/* Power bus message definitions */
 +
 +/* The TWL4030/5030 splits its power-management resources (the various
 + * regulators, clock and reset lines) into 3 processor groups - P1, P2 and
 + * P3. These groups can then be configured to transition between sleep,
 wait-on + * and active states by sending messages to the power bus.  See
 Section 5.4.2 + * Power Resources of TWL4030 TRM
 + */
 +
 +/* Processor groups */
 +#define DEV_GRP_NULL 0x0
 +#define DEV_GRP_P1   0x1 /* P1: all OMAP devices */
 +#define DEV_GRP_P2   0x2 /* P2: all Modem devices */
 +#define DEV_GRP_P3   0x4 /* P3: all peripheral devices */
 +
 +/* Resource groups */
 +#define RES_GRP_RES  0x0 /* Reserved */
 +#define RES_GRP_PP   0x1 /* Power providers */
 +#define RES_GRP_RC   0x2 /* Reset and control */
 +#define RES_GRP_PP_RC0x3
 +#define RES_GRP_PR   0x4 /* Power references */
 +#define RES_GRP_PP_PR0x5
 +#define RES_GRP_RC_PR0x6
 +#define RES_GRP_ALL  0x7 /* All resource groups */
 +
 +#define RES_TYPE2_R0 0x0
 +
 +#define RES_TYPE_ALL 0x7
 +
 +/* Resource states */
 +#define RES_STATE_WRST   0xF
 +#define RES_STATE_ACTIVE 0xE
 +#define RES_STATE_SLEEP  0x8
 +#define RES_STATE_OFF0x0
 +
 +/* Power resources */
 +
 +/* Power providers */
 +#define RES_VAUX1   1
 +#define RES_VAUX2   2
 +#define RES_VAUX3   3
 +#define RES_VAUX4   4
 +#define RES_VMMC1   5
 +#define RES_VMMC2   6
 +#define RES_VPLL1   7
 +#define RES_VPLL2   8
 +#define RES_VSIM9
 +#define RES_VDAC10
 +#define RES_VINTANA111
 +#define RES_VINTANA212
 +#define RES_VINTDIG 13
 +#define RES_VIO 14
 +#define RES_VDD115
 +#define RES_VDD216
 +#define RES_VUSB_1V517
 +#define RES_VUSB_1V818
 +#define RES_VUSB_3V119
 +#define RES_VUSBCP  20
 +#define RES_REGEN   21
 +/* Reset and control */
 +#define RES_NRES_PWRON  22
 +#define RES_CLKEN   23
 +#define RES_SYSEN   24
 +#define RES_HFCLKOUT25
 +#define RES_32KCLKOUT   26
 +#define RES_RESET   27
 +/* Power Reference */
 +#define RES_Main_Ref28
 +
 +#define TOTAL_RESOURCES  28
 +/*
 + * Power Bus Message Format ... these can be sent individually by Linux,
 + * but are usually part of downloaded scripts that are run when various
 + * power events are triggered.
 + *
 + *  Broadcast Message (16 Bits):
 + *DEV_GRP[15:13] MT[12]  RES_GRP[11:9]  RES_TYPE2[8:7] RES_TYPE[6:4]
 + *RES_STATE[3:0]
 + *
 + *  Singular Message (16 Bits):
 + *DEV_GRP[15:13] MT[12]  RES_ID[11:4]  RES_STATE[3:0]
 + */
 +
 +#define MSG_BROADCAST(devgrp, grp, type, type2, state) \
 + ((devgrp)  13 | 1  12 | (grp)  9 | (type2)  7 \
 + | (type)  4 | (state))
 +
 +#define MSG_SINGULAR(devgrp, id, state) \
 + ((devgrp)  13 | 0  12 | (id)  4 | (state))
 +
 +#define MSG_BROADCAST_ALL(devgrp, state) \
 + ((devgrp)  5 | (state))
 +
 +#define MSG_BROADCAST_REF MSG_BROADCAST_ALL
 +#define MSG_BROADCAST_PROV MSG_BROADCAST_ALL
 +#define MSG_BROADCAST__CLK_RST MSG_BROADCAST_ALL
 +
  /* Power Managment Receiver */
  #define TWL4030_PM_RECEIVER_SC_CONFIG0x5B
  #define TWL4030_PM_RECEIVER_SC_DETECT1   0x5C
 @@ -311,6 +408,7 @@
  #define TWL4030_PM_RECEIVER_VDAC_VSEL_18 0x03
  #define TWL4030_PM_RECEIVER_VMMC1_VSEL_300x02
  #define TWL4030_PM_RECEIVER_VMMC1_VSEL_320x03
 +#define TWL4030_PM_RECEIVER_VSIM_VSEL_18 0x03
 
  /* Device Selection in PM Receiver Module */
  #define TWL4030_PM_RECEIVER_DEV_GRP_P1   0x20
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 01/14] arm, omap3: Define save_boot_params in lowlevel_init.S for SPL only

2012-01-25 Thread Tom Rini
On Tue, Jan 24, 2012 at 7:27 AM, Pali Rohár pali.ro...@gmail.com wrote:
 * Hide function save_boot_params if CONFIG_SPL_BUILD is not defined (function 
 do nothing)

This is fine.

 * Same behaviour as in file arch/arm/cpu/armv7/omap4/lowlevel_init.S

This isn't quite right.  OMAP4/5 and AM33XX can re-use the same code
here to determine boot device/mode but it's not the same as 'OMAP3.'

 * This allow to implement board specified function save_boot_params in board 
 code

This is fine.

 Signed-off-by: Pali Rohár pali.ro...@gmail.com

So I will apply this, but modify the commit message slightly.

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


Re: [U-Boot] [PATCH 01/14] arm, omap3: Define save_boot_params in lowlevel_init.S for SPL only

2012-01-25 Thread Tom Rini
On Wed, Jan 25, 2012 at 11:00 AM, Marek Vasut marek.va...@gmail.com wrote:
 * Hide function save_boot_params if CONFIG_SPL_BUILD is not defined
 (function do nothing)

 What do you mean by this statement here ?

 * Same behaviour as in file arch/arm/cpu/armv7/omap4/lowlevel_init.S

 Eh?

 * This allow to implement board specified function save_boot_params in
 board code

 I see ... do you want to write overridable function? Make it a weak alias?

There is a weak one today, but we globally replace it for 'omap3'
today.  The N900 needs its own version however.

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


Re: [U-Boot] SPL Framework: Add support for U_BOOT_CMD

2012-01-25 Thread Scott Wood
On 01/25/2012 12:19 PM, Tom Rini wrote:
 Maybe we should poke command.h to nop out U_BOOT_CMD for
 CONFIG_SPL_BUILD?  OTOH, #ifndef'ing U_BOOT_CMD and the code itself
 gets us a space savings we wouldn't get otherwise (I suspect giving
 the MTD/NAND issue I've mentioned before)...

Commands should be stripped out already with the new SPL -- that's what
the (unfortunately uncommented) sed command in GEN_UBOOT appears to be
doing.

-Scott

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


Re: [U-Boot] SPL Framework: Add support for U_BOOT_CMD

2012-01-25 Thread Tom Rini
On Wed, Jan 25, 2012 at 11:55 AM, Scott Wood scottw...@freescale.com wrote:
 On 01/25/2012 12:19 PM, Tom Rini wrote:
 Maybe we should poke command.h to nop out U_BOOT_CMD for
 CONFIG_SPL_BUILD?  OTOH, #ifndef'ing U_BOOT_CMD and the code itself
 gets us a space savings we wouldn't get otherwise (I suspect giving
 the MTD/NAND issue I've mentioned before)...

 Commands should be stripped out already with the new SPL -- that's what
 the (unfortunately uncommented) sed command in GEN_UBOOT appears to be
 doing.

Ah that's right.  Should be easy enough to test on say beagleboard,
along with a patch to make commands.h do the right thing.

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


Re: [U-Boot] [PATCH 00/14] Nokia RX-51 support

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 19:20:01 Marek Vasut wrote:
 So why not just replace the bootloader right away?


Booting process on n900:
1. Omap bootrom
2. Nokia X-Loader
3. Nokia NOLO Bootloader
4. Linux kernel
...

Nokia X-Loader and NOLO are stored in first nand part. It has size 128kB.
Nokia X-Loader is signed (size 14.5kB), so cannot be replaced. NOLO bootloader
is not signed (so theoretically can be replaced), but size is limited to
113kB. I do not know how to compile U-Boot binary with size  113kB...

Size of part where is stored linux kernel has 2MB and it is enought for U-Boot
with kernel image (~200kB + ~1.6MB). Also U-Boot can boot kernel from eMMC/SD.

--
Pali Rohár
pali.ro...@gmail.com

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


Re: [U-Boot] [PATCH V3 4/6] sf command: allow default chip select through CONFIG_SPI_FLASH_CS

2012-01-25 Thread Mike Frysinger
On Wednesday 25 January 2012 10:10:18 Matthias Fuchs wrote:
 Can you also add a config option for the SPI bus number? I think these
 two need to handled in the same patch.
 
 So you could add this stuff:
 
  static int do_spi_flash_probe(int argc, char * const argv[])
  {
 +#ifdef CONFIG_SF_DEFAULT_BUS
 +   unsigned int bus = CONFIG_SF_DEFAULT_BUS;
 +#else
 unsigned int bus = 0;
 +#endif

move the default logic to the top of the file like the existing 
CONFIG_SF_DEFAULT_SPEED, then the code later on only needs to do:
unsigned int bus = CONFIG_SF_DEFAULT_BUS;

otherwise, this suggestion sounds good too
-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


Re: [U-Boot] [PATCH 02/14] arm: Optionally use existing atags in bootm.c

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 19:02:45 Marek Vasut wrote:
  This patch adapts the bootm command so that it can use an existing atags
  command set up by a previous bootloader.

 Why do you need it?

Default Nokia kernel has patches which using non-standard atags for reporting
bootmode, bootreason, hw-rev, NOLO version, boot count, ...

Closed-source Maemo application need to know these properties (read via
/proc/bootreason, ...) and will restart device if there is error.

So U-Boot must can reuse old atags from NOLO and tell it new kernel.


  If the environment variable
  atagaddr is unset, bootm behaves as normal. If atagaddr is set, bootm
  will use atags address from environment variable and also append new boot
  args (if specified in u-boot). For example, if a previous boot loader
  already set up the atags struct at 0x8100:
 
  setenv atagaddr 0x8100; bootm 0x80008000

 Can't you set those atags correctly in uboot?


No, because atags are not static (e.g bootreason).

--
Pali Rohár
pali.ro...@gmail.com

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


Re: [U-Boot] [PATCH 03/14] Add power bus message definitions in twl4030.h

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 19:04:37 Marek Vasut wrote:
  * Code copied from linux kernel 3.0.0 from file include/linux/i2c/twl.h

 Do you need them?


Yes, needed for twl regulator for enabling eMMC.

--
Pali Rohár
pali.ro...@gmail.com

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


Re: [U-Boot] [PATCH 06/14] cfb_console: Add function console_clear and console_clear_line

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 19:08:31 Marek Vasut wrote:
 
  +static void console_clear(void)

 Do you use this function AT ALL?


Yes, in patch which add ANSI terminal support to cfb_console.

--
Pali Rohár
pali.ro...@gmail.com

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


Re: [U-Boot] [PATCH 09/14] New command clear: Clear the ANSI terminal

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 19:10:03 Marek Vasut wrote:
 Do you seriously need a new command for such a simple operation?


Yes, command clear is really usefull for debugging framebuffer output on n900.

--
Pali Rohár
pali.ro...@gmail.com

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


Re: [U-Boot] [PATCH 10/14] New config variable CONFIG_MENUCMD

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 19:12:29 Marek Vasut wrote:
 So this is just to interrupt autoboot? Why not just report the menukey as
 any other keypress and do it that way?


Usefull for interrupt autoboot and run some menu (script/booting) only with
specific key (for example with key M on device keyboard).

--
Pali Rohár
pali.ro...@gmail.com

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


Re: [U-Boot] [PATCH 11/14] New config variable CONFIG_PREMONITOR

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 19:12:51 Marek Vasut wrote:
   * if defined run env premonitor before Main Loop for Monitor Processing

 What is this good for?


before running monitor loop I'd like write some info to console (specific
board info, board commands, board macros). but if these info will be written
in preboot it can be deleted by menu section.

--
Pali Rohár
pali.ro...@gmail.com

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


Re: [U-Boot] [PATCH 13/14] New command bootmenu: ANSI terminal Boot Menu support

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 19:18:50 Marek Vasut wrote:
 Do you need this command if you already have common/menu.c?


I need menu which can work with ANSI terminal and framebuffer on device
screen. Something which can easy choose booting system...

I can look at menu.c if it can replace my bootmenu (or change bootmenu code to
use menu.c)...

Anyway this patch [13] and next [14] can be reviewed separatly. Nokia RX-51
support is in patches 1-12. Patch 14 is additional for rx51, which only add
this bootmenu support. U-Boot rx51 port working fine without 13 and 14.

--
Pali Rohár
pali.ro...@gmail.com

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 v6 1/3] PXA: PXA27x Matrix keypad driver

2012-01-25 Thread Vasily Khoruzhick
From: Marek Vasut marek.va...@gmail.com

Signed-off-by: Marek Vasut marek.va...@gmail.com
Signed-off-by: Vasily Khoruzhick anars...@gmail.com
[vasily: adapted Marek's old version for newer u-boot,
 fixed multiple keypresses handling]
---
v2: use struct-based access to regs, minor cleanup
v3: fix multiple keypresses handling, minor cleanup
v4: another minor cleanup
v5: fix indentation issues in scan_keys(), remove udelay,
increase PXA_KEYPAD_TIMEOUT (due to removed udelay)
v6: remove ifdefs around WATCHDOG_RESET()

 arch/arm/include/asm/arch-pxa/pxa-regs.h|   52 -
 arch/arm/include/asm/arch-pxa/regs-keypad.h |   84 
 drivers/input/Makefile  |2 +
 drivers/input/pxa27x-mkp.c  |  289 +++
 4 files changed, 375 insertions(+), 52 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-pxa/regs-keypad.h
 create mode 100644 drivers/input/pxa27x-mkp.c

diff --git a/arch/arm/include/asm/arch-pxa/pxa-regs.h 
b/arch/arm/include/asm/arch-pxa/pxa-regs.h
index b81b42c..d562658 100644
--- a/arch/arm/include/asm/arch-pxa/pxa-regs.h
+++ b/arch/arm/include/asm/arch-pxa/pxa-regs.h
@@ -2567,58 +2567,6 @@ typedef void (*ExcpHndlr) (void) ;
 #define OVL2C1_O2EN(131) /* Enable bit for Overlay 2 */
 #define CCR_CEN(131) /* Enable bit for Cursor */
 
-/* Keypad controller */
-
-#define KPC0x4150 /* Keypad Interface Control register */
-#define KPDK   0x4158 /* Keypad Interface Direct Key register */
-#define KPREC  0x41500010 /* Keypad Intefcace Rotary Encoder register 
*/
-#define KPMK   0x41500018 /* Keypad Intefcace Matrix Key register */
-#define KPAS   0x41500020 /* Keypad Interface Automatic Scan register 
*/
-#define KPASMKP0   0x41500028 /* Keypad Interface Automatic Scan Multiple 
Key Presser register 0 */
-#define KPASMKP1   0x41500030 /* Keypad Interface Automatic Scan Multiple 
Key Presser register 1 */
-#define KPASMKP2   0x41500038 /* Keypad Interface Automatic Scan Multiple 
Key Presser register 2 */
-#define KPASMKP3   0x41500040 /* Keypad Interface Automatic Scan Multiple 
Key Presser register 3 */
-#define KPKDI  0x41500048 /* Keypad Interface Key Debounce Interval 
register */
-
-#define KPC_AS (0x1  30)  /* Automatic Scan bit */
-#define KPC_ASACT  (0x1  29)  /* Automatic Scan on Activity */
-#define KPC_MI (0x1  22)  /* Matrix interrupt bit */
-#define KPC_IMKP   (0x1  21)  /* Ignore Multiple Key Press */
-#define KPC_MS7(0x1  20)  /* Matrix scan line 7 */
-#define KPC_MS6(0x1  19)  /* Matrix scan line 6 */
-#define KPC_MS5(0x1  18)  /* Matrix scan line 5 */
-#define KPC_MS4(0x1  17)  /* Matrix scan line 4 */
-#define KPC_MS3(0x1  16)  /* Matrix scan line 3 */
-#define KPC_MS2(0x1  15)  /* Matrix scan line 2 */
-#define KPC_MS1(0x1  14)  /* Matrix scan line 1 */
-#define KPC_MS0(0x1  13)  /* Matrix scan line 0 */
-#define KPC_ME (0x1  12)  /* Matrix Keypad Enable */
-#define KPC_MIE(0x1  11)  /* Matrix Interrupt Enable */
-#define KPC_DK_DEB_SEL (0x1   9)  /* Direct Key Debounce select */
-#define KPC_DI (0x1   5)  /* Direct key interrupt bit */
-#define KPC_DEE0   (0x1   2)  /* Rotary Encoder 0 Enable */
-#define KPC_DE (0x1   1)  /* Direct Keypad Enable */
-#define KPC_DIE(0x1   0)  /* Direct Keypad interrupt Enable 
*/
-
-#define KPDK_DKP   (0x1  31)
-#define KPDK_DK7   (0x1   7)
-#define KPDK_DK6   (0x1   6)
-#define KPDK_DK5   (0x1   5)
-#define KPDK_DK4   (0x1   4)
-#define KPDK_DK3   (0x1   3)
-#define KPDK_DK2   (0x1   2)
-#define KPDK_DK1   (0x1   1)
-#define KPDK_DK0   (0x1   0)
-
-#define KPREC_OF1  (0x1  31)
-#define kPREC_UF1  (0x1  30)
-#define KPREC_OF0  (0x1  15)
-#define KPREC_UF0  (0x1  14)
-
-#define KPMK_MKP   (0x1  31)
-#define KPAS_SO(0x1  31)
-#define KPASMKPx_SO(0x1  31)
-
 #define GPIO113_BIT(1  17)/* GPIO113 in GPSR, GPCR, bit 17 */
 #define PSLR   0x40F00034
 #define PSTR   0x40F00038  /* Power Manager Standby Configuration Reg 
*/
diff --git a/arch/arm/include/asm/arch-pxa/regs-keypad.h 
b/arch/arm/include/asm/arch-pxa/regs-keypad.h
new file mode 100644
index 000..1909417
--- /dev/null
+++ b/arch/arm/include/asm/arch-pxa/regs-keypad.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2012 Vasily Khoruzhick anars...@gmail.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 

[U-Boot] [PATCH 2/2] ARM: tegra: Add clock binding to tegra-seabaord.dts

2012-01-25 Thread Stephen Warren
This provides an example of how to use the Tegra CAR clock binding in a
board .dts file.

Signed-off-by: Stephen Warren swar...@nvidia.com
---
I think it makes sense to check the previous patch into the Linux kernel,
since it's mainly just defining what the binding is. However, this patch
is just an example and needs to be reworked to cover all boards, and add
a PMU node for the true clk_32k source. I'm providing this patch mostly
as an example that Simon Glass can use within U-Boot in the interim.
---
 arch/arm/boot/dts/tegra-seaboard.dts |   24 
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/tegra-seaboard.dts 
b/arch/arm/boot/dts/tegra-seaboard.dts
index b55a02e..06a3cb1 100644
--- a/arch/arm/boot/dts/tegra-seaboard.dts
+++ b/arch/arm/boot/dts/tegra-seaboard.dts
@@ -11,6 +11,30 @@
reg =  0x 0x4000 ;
};
 
+   clocks {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   /* This will eventually be a clock output from a PMU IC */
+   clk_32k: clock@0 {
+   compatible = fixed-clock;
+   reg = 0;
+   #clock-cells = 0;
+   clock-frequency = 32768;
+   };
+
+   osc: clock@1 {
+   compatible = fixed-clock;
+   reg = 1;
+   #clock-cells = 0;
+   clock-frequency = 1200;
+   };
+   };
+
+   clock@60006000 {
+   clocks = clk_32k osc;
+   };
+
i2c@7000c000 {
clock-frequency = 40;
};
-- 
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] ARM: tegra: Define Tegra20 CAR binding

2012-01-25 Thread Stephen Warren
Document a binding for the Tegra20 CAR (Clock And Reset) Controller,
add it to tegra20.dtsi, and configure it for the board in tegra-
seaboard.dts.

Signed-off-by: Stephen Warren swar...@nvidia.com
---
v2:
* Remove clock-names, clock-output-names properties; Tegra will solely
  use integer IDs for clocks in DT.
* Fixed typo in compatible flag
* Resolve FIXME re: multiple clocks with the same reset ID; give each
  unique clock an ID, and ignore the reset bits, since this is purely a
  clock binding. Code (e.g. U-Boot) that wants to use this to determine
  CAR reset bit numbers would need a table to convert from the clock IDs
  in this binding to the related reset bit number, if any. In general, I
  think that's true, and the U-Boot code that handles peripheral IDs
  should be reworked to handle clocks, the peripheral clocks being a
  subset of all clocks.
* Define clock IDs for all the non-peripheral clocks too; inputs, PLLs,
  etc.
* Separate tegra-seaboard.dts usage example into a separate patch.

This patch semantically relies on Grant Likely's common clock binding patch
series. Once that's finalized, this patch could be checked into the kernel
provided there are no relevant changes to Grant's patches. I believe that
Simon Glass wants to start using this within U-Boot ASAP though.
---
 .../bindings/clock/nvidia,tegra20-car.txt  |  164 
 arch/arm/boot/dts/tegra20.dtsi |6 +
 2 files changed, 170 insertions(+), 0 deletions(-)
 create mode 100644 
Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt

diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt 
b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt
new file mode 100644
index 000..acce2d9
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt
@@ -0,0 +1,164 @@
+NVIDIA Tegra20 Clock And Reset Controller
+
+This binding uses the common clock binding:
+Documentation/devicetree/bindings/clock/clock-bindings.txt
+
+The CAR (Clock And Reset) Controller on Tegra is the HW module responsible
+for muxing and gating Tegra's clocks, and setting their rates.
+
+Required properties :
+- compatible : Should be nvidia,chip-car
+- reg : Should contain CAR registers location and length
+- clocks : Should contain phandle and clock specifiers for two clocks:
+  the 32 KHz 32k_in, and the board-specific oscillator osc.
+- #clock-cells : Should be 1.
+  In clock consumers, this cell represents the clock ID exposed by the CAR.
+
+  The first 96 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB
+  registers. Later, subsequent IDs will be assigned to all other clocks the
+  CAR controls; mainly the PLLs.
+
+0  osc
+1  clk_32k a/k/a clk_s
+2  clk_m
+3  sclk
+4  cclk
+5  hclk
+6  pclk
+7  blink
+8  pll_a
+9  pll_a_out0
+10 pll_c
+11 pll_c_out1
+12 pll_d
+13 pll_e
+14 pll_m
+15 pll_m_out1
+16 pll_p
+17 pll_p_out1
+18 pll_p_out2
+19 pll_p_out3
+20 pll_p_out4
+21 pll_s
+22 pll_u
+23 pll_x
+24 audio   a/k/a audio_sync_clk
+25 audio_2xa/k/a audio_2x_sync_clk
+26 cpu
+27 cop a/k/a avp
+28 ac97
+29 rtc
+30 tmr
+31 uart1
+32 uart2
+33 gpio
+34 sdmmc2
+35 spdif_out
+36 spdif_in
+37 i2s1
+38 i2c1
+39 ndflash
+40 sdmmc1
+41 sdmmc4
+42 twc
+43 pwm
+44 i2s2
+45 epp
+46 vi
+47 vi_sensor
+48 2d
+49 usbd
+50 isp
+51 3d
+52 ide
+53 disp2
+54 disp1
+55 host1x
+56 vcp
+57 cache2
+58 mem
+59 ahbdma
+60 apbdma
+61 kbc
+62 stat_mon
+63 pmc
+64 fuse
+65 kfuse
+66 sbc1
+67 snor
+68 spi
+69 sbc2
+70 xio
+71 sbc3
+72 dvc
+73 dsi
+74 cve
+75 tvo
+76 mipi
+77 hdmi
+78 csi
+79 tvdac
+80 i2c2
+81 uart3
+82 emc
+83 usb2
+84 usb3
+85 mpe
+86 vde
+87 bsea
+88 bsev
+89 speedo
+90 uart4
+91 uart5
+92 i2c3
+93 sbc4
+94 sdmmc3
+95 pcie
+96 owr
+97 afi
+98 csite
+99 avpucq
+100la
+101irama
+102iramb
+103iramc
+104iramd
+105cram2
+106clk_d
+107sus
+108cdev1
+109cdev2
+
+Example:
+
+clocks {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   clk_32k: clock@0 {
+   compatible = fixed-clock;
+   reg = 0;
+   #clock-cells = 0;
+   clock-frequency = 32768;
+   };
+
+   osc: clock@1 {
+   compatible = fixed-clock;
+   reg = 1;
+   #clock-cells = 0;
+   clock-frequency = 1200;
+   };
+};
+
+tegra_car: clock@60006000 {
+   compatible = nvidia,tegra20-car;
+   reg = 0x60006000 1000;
+   clocks = clk_32k 

[U-Boot] [PATCH v6 2/3] zipitz2: enable pxa27x_mkp driver

2012-01-25 Thread Vasily Khoruzhick
Signed-off-by: Vasily Khoruzhick anars...@gmail.com
---
v2: remove usbtty stuff from EXTRA_ENV_SETTINGS
v3: shift+backspace should produce backspace code
v4: no change
v5: prettify CONFIG_PXA27X_MKP_KEYMAP
v6: no change

 include/configs/zipitz2.h |   82 ++---
 1 files changed, 77 insertions(+), 5 deletions(-)

diff --git a/include/configs/zipitz2.h b/include/configs/zipitz2.h
index 26204af..615f9bc 100644
--- a/include/configs/zipitz2.h
+++ b/include/configs/zipitz2.h
@@ -80,6 +80,12 @@
 #defineCONFIG_CMD_MMC
 #defineCONFIG_CMD_SPI
 
+#defineCONFIG_EXTRA_ENV_SETTINGS   
\
+   stdout=lcd\0  \
+   stdin=pxa27x-mkp\0\
+   stderr=lcd\0  \
+   
+#defineCONFIG_KEYBOARD
 /*
  * MMC Card Configuration
  */
@@ -206,15 +212,81 @@ unsigned char zipitz2_spi_read(void);
 #define CONFIG_SYS_FLASH_PROTECTION
 
 /*
+ * Matrix keypad
+ */
+#ifdef CONFIG_KEYBOARD
+#defineCONFIG_PXA27X_MKP
+
+#defineCONFIG_PXA27X_MKP_MKP_COLS  7
+#defineCONFIG_PXA27X_MKP_MKP_ROWS  6
+
+#defineCONFIG_PXA27X_MKP_DEBOUNCE  30
+#defineCONFIG_PXA27X_MKP_DELAY 3
+
+#defineCONFIG_PXA27X_MKP_MOD_SHIFT {5, 3}
+#defineCONFIG_PXA27X_MKP_MOD_ALT   {5, 2}
+#defineCONFIG_PXA27X_MKP_MOD_CTRL  {5, 4}
+
+#defineCONFIG_PXA27X_MKP_KEYMAP\
+   { 1, 1, 'q', 'Q', '1', 0xff },  \
+   { 2, 1, 'i', 'I', '8', 0xff },  \
+   { 3, 1, 'g', 'G', '\', 0xff }, \
+   { 4, 1, 'x', 'X', '/', 0xff },  \
+   { 5, 1, '\r', 0xff, 0xff, 0xff },   \
+   { 6, 1, '-', 0xff, 0xff, 0xff },\
+   \
+   { 1, 2, 'w', 'W', '2', 0xff },  \
+   { 2, 2, 'o', 'O', '9', 0xff },  \
+   { 3, 2, 'h', 'H', '\'', 0xff }, \
+   { 4, 2, 'c', 'C', '+', 0xff },  \
+   \
+   { 1, 3, 'e', 'E', '3', 0xff },  \
+   { 2, 3, 'p', 'P', '0', 0xff },  \
+   { 3, 3, 'j', 'J', '[', 0xff },  \
+   { 4, 3, 'v', 'V', '*', 0xff },  \
+   \
+   { 0, 4, '\e', 0xff, '|', 0xff },\
+   { 1, 4, 'r', 'R', '4', 0xff },  \
+   { 2, 4, 'a', 'A', '$', 0xff },  \
+   { 3, 4, 'k', 'K', ']', 0xff },  \
+   { 4, 4, 'b', 'B', '=', 0xff },  \
+   \
+   { 0, 5, '\t', 0xff, 0xff, 0xff },   \
+   { 1, 5, 't', 'T', '5', 0xff },  \
+   { 2, 5, 's', 'S', '#', 0xff },  \
+   { 3, 5, 'l', 'L', '-', 0xff },  \
+   { 4, 5, 'n', 'N', '_', 0xff },  \
+   { 5, 5, ' ', 0xff, 0xff, 0xff },\
+   \
+   { 1, 6, 'y', 'Y', '6', 0xff },  \
+   { 2, 6, 'd', 'D', '', 0xff },  \
+   { 3, 6, '\b', '\b', '\\', 0xff },   \
+   { 4, 6, 'm', 'M', '?', 0xff },  \
+   { 5, 6, ',', '(', '', '{' },   \
+   \
+   { 1, 7, 'u', 'U', '7', 0xff },  \
+   { 2, 7, 'f', 'F', '@', 0xff },  \
+   { 3, 7, 'z', 'Z', '!', 0xff },  \
+   { 4, 7, ';', '~', ':', 0xff },  \
+   { 5, 7, '.', ')', '', '}' },   \
+   \
+   { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }
+
+#defineCONFIG_SYS_CONSOLE_ENV_OVERWRITE
+#defineCONFIG_SYS_CONSOLE_IS_IN_ENV
+
+#endif
+
+/*
  * GPIO settings
  */
 #define CONFIG_SYS_GAFR0_L_VAL 0x02000140
-#define CONFIG_SYS_GAFR0_U_VAL 0x59188000
-#define CONFIG_SYS_GAFR1_L_VAL 0x6392
+#define CONFIG_SYS_GAFR0_U_VAL 0x59188005
+#define CONFIG_SYS_GAFR1_L_VAL 0x639420a2
 #define CONFIG_SYS_GAFR1_U_VAL 0xaaa03950
 #define CONFIG_SYS_GAFR2_L_VAL 0x0aaa
 #define CONFIG_SYS_GAFR2_U_VAL 0x29000308
-#define CONFIG_SYS_GAFR3_L_VAL 0x5400
+#define CONFIG_SYS_GAFR3_L_VAL 0x56aa9500
 #define CONFIG_SYS_GAFR3_U_VAL 0x00d5
 #define CONFIG_SYS_GPCR0_VAL   0x
 #define CONFIG_SYS_GPCR1_VAL   0x0020
@@ -222,7 +294,7 @@ unsigned char zipitz2_spi_read(void);
 #define CONFIG_SYS_GPCR3_VAL   0x
 #define CONFIG_SYS_GPDR0_VAL   0xdafcee00
 #define CONFIG_SYS_GPDR1_VAL   0xffa3aaab
-#define CONFIG_SYS_GPDR2_VAL   0x8fe9
+#define CONFIG_SYS_GPDR2_VAL   0x8fe1
 #define CONFIG_SYS_GPDR3_VAL   0x001b1f8a
 #define CONFIG_SYS_GPSR0_VAL   0x06080400
 #define CONFIG_SYS_GPSR1_VAL   0x007f
@@ -234,7 +306,7 @@ unsigned char zipitz2_spi_read(void);
 /*
  * Clock settings
  */
-#define CONFIG_SYS_CKEN0x00511220
+#define CONFIG_SYS_CKEN  

[U-Boot] [PATCH v6 3/3] zipitz2: use pxa_mmc_gen as MMC driver

2012-01-25 Thread Vasily Khoruzhick
Signed-off-by: Vasily Khoruzhick anars...@gmail.com
---
v2: mmcinfo is necessary to scan card for partitions
v3: replace mmcinfo with mmc rescan
v4: mmc rescan does not take extra argument in recent u-boot,
so remove it.
v5: remove spaces from CONFIG_BOOTCOMMAND
v6: no change

 board/zipitz2/zipitz2.c   |8 
 include/configs/zipitz2.h |6 --
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/board/zipitz2/zipitz2.c b/board/zipitz2/zipitz2.c
index b093c2f..4075fb6 100644
--- a/board/zipitz2/zipitz2.c
+++ b/board/zipitz2/zipitz2.c
@@ -79,6 +79,14 @@ void dram_init_banksize(void)
gd-bd-bi_dram[0].size = PHYS_SDRAM_1_SIZE;
 }
 
+#ifdef CONFIG_CMD_MMC
+int board_mmc_init(bd_t *bis)
+{
+   pxa_mmc_register(0);
+   return 0;
+}
+#endif
+
 #ifdef CONFIG_CMD_SPI
 
 struct {
diff --git a/include/configs/zipitz2.h b/include/configs/zipitz2.h
index 615f9bc..6dae630 100644
--- a/include/configs/zipitz2.h
+++ b/include/configs/zipitz2.h
@@ -45,7 +45,8 @@
 #defineCONFIG_ARCH_CPU_INIT
 
 #defineCONFIG_BOOTCOMMAND  
\
-   if mmc init  fatload mmc 0 0xa000 uboot.script ; then   \
+   if mmc rescan  ext2load mmc 0 0xa000 boot/uboot.script ;\
+   then  \
source 0xa000;\
else  \
bootm 0x6;\
@@ -91,7 +92,8 @@
  */
 #ifdef CONFIG_CMD_MMC
 #defineCONFIG_MMC
-#defineCONFIG_PXA_MMC
+#defineCONFIG_GENERIC_MMC
+#defineCONFIG_PXA_MMC_GENERIC
 #defineCONFIG_SYS_MMC_BASE 0xF000
 #defineCONFIG_CMD_FAT
 #define CONFIG_CMD_EXT2
-- 
1.7.8.4

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


Re: [U-Boot] [PATCH 05/14] cfb_console: Fix function console_scrollup

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 19:06:51 Marek Vasut wrote:
   * Use correct buffer size, do not damage screen output

 What are the symptoms, how does this fix the issue?

 Ccing Anatolij, I think he's the right one for this patch. Again, keep the
 correct CC!!!


Output on n900 screen is damged after function console_scrollup is called.

--
Pali Rohár
pali.ro...@gmail.com

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


Re: [U-Boot] [PATCH 1/2] ARM: tegra: Define Tegra20 CAR binding

2012-01-25 Thread Simon Glass
Hi Stephen,

On Wed, Jan 25, 2012 at 11:57 AM, Stephen Warren swar...@nvidia.com wrote:
 Document a binding for the Tegra20 CAR (Clock And Reset) Controller,
 add it to tegra20.dtsi, and configure it for the board in tegra-
 seaboard.dts.

 Signed-off-by: Stephen Warren swar...@nvidia.com
 ---
 v2:
 * Remove clock-names, clock-output-names properties; Tegra will solely
  use integer IDs for clocks in DT.
 * Fixed typo in compatible flag
 * Resolve FIXME re: multiple clocks with the same reset ID; give each
  unique clock an ID, and ignore the reset bits, since this is purely a
  clock binding. Code (e.g. U-Boot) that wants to use this to determine
  CAR reset bit numbers would need a table to convert from the clock IDs
  in this binding to the related reset bit number, if any. In general, I
  think that's true, and the U-Boot code that handles peripheral IDs
  should be reworked to handle clocks, the peripheral clocks being a
  subset of all clocks.

The clock enable and reset enable bits use the same numbering. I think
you have invented a third which is an arbitrary number which doesn't
correspond to anything in hardware. That makes sense for pin mux
function perhaps, since the indirection provides a useful concept of
function number, but here I can't see the benefit.

 * Define clock IDs for all the non-peripheral clocks too; inputs, PLLs,
  etc.
 * Separate tegra-seaboard.dts usage example into a separate patch.

 This patch semantically relies on Grant Likely's common clock binding patch
 series. Once that's finalized, this patch could be checked into the kernel
 provided there are no relevant changes to Grant's patches. I believe that
 Simon Glass wants to start using this within U-Boot ASAP though.

As I may have said I am really not keen on the idea of having a table
just to use it in U-Boot.

 ---
  .../bindings/clock/nvidia,tegra20-car.txt          |  164 
 
  arch/arm/boot/dts/tegra20.dtsi                     |    6 +
  2 files changed, 170 insertions(+), 0 deletions(-)
  create mode 100644 
 Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt

 diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt 
 b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt
 new file mode 100644
 index 000..acce2d9
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt
 @@ -0,0 +1,164 @@
 +NVIDIA Tegra20 Clock And Reset Controller
 +
 +This binding uses the common clock binding:
 +Documentation/devicetree/bindings/clock/clock-bindings.txt
 +
 +The CAR (Clock And Reset) Controller on Tegra is the HW module responsible
 +for muxing and gating Tegra's clocks, and setting their rates.
 +
 +Required properties :
 +- compatible : Should be nvidia,chip-car
 +- reg : Should contain CAR registers location and length
 +- clocks : Should contain phandle and clock specifiers for two clocks:
 +  the 32 KHz 32k_in, and the board-specific oscillator osc.
 +- #clock-cells : Should be 1.
 +  In clock consumers, this cell represents the clock ID exposed by the CAR.
 +
 +  The first 96 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB
 +  registers. Later, subsequent IDs will be assigned to all other clocks the
 +  CAR controls; mainly the PLLs.

Are you sure? The ordering doesn't seem to fit with U-Boot's enum
periph_id in arch/arm/include/asm/arch-tegra2/clock.h. That file
follows along with the hardware.

 +
 +    0  osc
 +    1  clk_32k         a/k/a clk_s
 +    2  clk_m
 +    3  sclk
 +    4  cclk
 +    5  hclk
 +    6  pclk
 +    7  blink
 +    8  pll_a
 +    9  pll_a_out0
 +    10 pll_c
 +    11 pll_c_out1
 +    12 pll_d
 +    13 pll_e
 +    14 pll_m
 +    15 pll_m_out1
 +    16 pll_p
 +    17 pll_p_out1
 +    18 pll_p_out2
 +    19 pll_p_out3
 +    20 pll_p_out4
 +    21 pll_s
 +    22 pll_u
 +    23 pll_x
 +    24 audio           a/k/a audio_sync_clk
 +    25 audio_2x        a/k/a audio_2x_sync_clk
 +    26 cpu
 +    27 cop             a/k/a avp
 +    28 ac97
 +    29 rtc
 +    30 tmr
 +    31 uart1
 +    32 uart2
 +    33 gpio
 +    34 sdmmc2
 +    35 spdif_out
 +    36 spdif_in
 +    37 i2s1
 +    38 i2c1
 +    39 ndflash
 +    40 sdmmc1
 +    41 sdmmc4
 +    42 twc
 +    43 pwm
 +    44 i2s2
 +    45 epp
 +    46 vi
 +    47 vi_sensor
 +    48 2d
 +    49 usbd
 +    50 isp
 +    51 3d
 +    52 ide
 +    53 disp2
 +    54 disp1
 +    55 host1x
 +    56 vcp
 +    57 cache2
 +    58 mem
 +    59 ahbdma
 +    60 apbdma
 +    61 kbc
 +    62 stat_mon
 +    63 pmc
 +    64 fuse
 +    65 kfuse
 +    66 sbc1
 +    67 snor
 +    68 spi
 +    69 sbc2
 +    70 xio
 +    71 sbc3
 +    72 dvc
 +    73 dsi
 +    74 cve
 +    75 tvo
 +    76 mipi
 +    77 hdmi
 +    78 csi
 +    79 tvdac
 +    80 i2c2
 +    81 uart3
 +    82 emc
 +    83 usb2
 +    84 usb3
 +    85 mpe
 +    86 vde
 +    87 bsea
 +    88 bsev
 +    89 speedo
 +    90 uart4
 +    91 uart5
 +    92 i2c3
 +    93 sbc4
 +    94 sdmmc3
 +    95 pcie
 +    96 owr
 +   

Re: [U-Boot] [PATCH 1/2] ARM: tegra: Define Tegra20 CAR binding

2012-01-25 Thread Stephen Warren
Simon Glass wrote at Wednesday, January 25, 2012 1:14 PM:
 On Wed, Jan 25, 2012 at 11:57 AM, Stephen Warren swar...@nvidia.com wrote:
  Document a binding for the Tegra20 CAR (Clock And Reset) Controller,
  add it to tegra20.dtsi, and configure it for the board in tegra-
  seaboard.dts.
...
  v2:
...
  * Resolve FIXME re: multiple clocks with the same reset ID; give each
   unique clock an ID, and ignore the reset bits, since this is purely a
   clock binding. Code (e.g. U-Boot) that wants to use this to determine
   CAR reset bit numbers would need a table to convert from the clock IDs
   in this binding to the related reset bit number, if any. In general, I
   think that's true, and the U-Boot code that handles peripheral IDs
   should be reworked to handle clocks, the peripheral clocks being a
   subset of all clocks.
 
 The clock enable and reset enable bits use the same numbering. I think
 you have invented a third which is an arbitrary number which doesn't
 correspond to anything in hardware. That makes sense for pin mux
 function perhaps, since the indirection provides a useful concept of
 function number, but here I can't see the benefit.

I didn't do it because there was specific benefit, but simply because
we have no choice.

There are clocks that don't have reset bits or clock enable bits.

There are some clocks that are really different clocks (different mux
selection or divider control registers) yet share the same bit for reset
and clock enable.

Therefore it simply isn't true that there's a 1:1 mapping between clocks
and clock-enable/reset bits.

I deliberately made this updated binding have a different numbering
scheme to the clock-enable/reset bits to make this clear, so that no one
would accidentally confuse the two concepts.

  * Define clock IDs for all the non-peripheral clocks too; inputs, PLLs,
   etc.
  * Separate tegra-seaboard.dts usage example into a separate patch.
 
  This patch semantically relies on Grant Likely's common clock binding patch
  series. Once that's finalized, this patch could be checked into the kernel
  provided there are no relevant changes to Grant's patches. I believe that
  Simon Glass wants to start using this within U-Boot ASAP though.
 
 As I may have said I am really not keen on the idea of having a table
 just to use it in U-Boot.

I don't see any alternative given the way the HW is designed.

We could ignore the way the HW works and assume that clock ID == clock-
enable/reset bits is true for many clocks. However, it's not true for
all, so I think that'd be too error-prone.

Equally, I know that you will need a table sometime in U-Boot to map
from clock ID to clock-enable/reset bit and many other per-clock
parameters if you're going to be initializing stuff in U-Boot from DT
rather than hard-coding it, so I think you may as well just add it now.

  diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt
...
  +  The first 96 clocks are numbered to match the bits in the CAR's 
  CLK_OUT_ENB
  +  registers. Later, subsequent IDs will be assigned to all other clocks the
  +  CAR controls; mainly the PLLs.
 
 Are you sure? The ordering doesn't seem to fit with U-Boot's enum
 periph_id in arch/arm/include/asm/arch-tegra2/clock.h. That file
 follows along with the hardware.

No, that paragraph is wrong. I simply forgot to remove it.

-- 
nvpublic

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


Re: [U-Boot] [PATCH V4 1/2] ehci-omap: driver for EHCI host on OMAP3

2012-01-25 Thread Tom Rini
On Wed, Jan 25, 2012 at 3:32 AM, Stefano Babic sba...@denx.de wrote:
 On 17/01/2012 07:14, Govindraj wrote:
 On Mon, Jan 16, 2012 at 3:27 PM, Stefano Babic sba...@denx.de wrote:
 On 16/01/2012 08:58, Govindraj wrote:

 Th v2 patch series [1] posted is based on top of this patch.

 If I understand well, we need in any case Ilya's patch. In this case, it
 is maybe worth to merge Ilya's patch in the meanwhile (and please drop
 my patch that remove USB support from TAM3517 boards).


 Yes correct we have to pull in this patch.

 Tom, Will you be taking this through omap tree?

 Tom,

 do you see any problem about merging this patch ? It fixes the build
 problem on the mt_ventoux board, and there is still a Ilya's patch (mcx:
 support for HTKW mcx board) waiting for it

 http://patchwork.ozlabs.org/patch/131431/

My only concern is that I would really like to wait for the cleanup /
fixup series to be complete before we pull this change in as well.

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


Re: [U-Boot] [PATCH 11/14] New config variable CONFIG_PREMONITOR

2012-01-25 Thread Marek Vasut
 On Wednesday 25 January 2012 19:12:51 Marek Vasut wrote:
* if defined run env premonitor before Main Loop for Monitor
Processing
  
  What is this good for?
 
 before running monitor loop I'd like write some info to console (specific
 board info, board commands, board macros). but if these info will be
 written in preboot it can be deleted by menu section.

The menu here, you refer to the thing you implemented? So fix that instead of 
introducing broken code and a pile of workarounds.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 10/14] New config variable CONFIG_MENUCMD

2012-01-25 Thread Marek Vasut
 On Wednesday 25 January 2012 19:12:29 Marek Vasut wrote:
  So this is just to interrupt autoboot? Why not just report the menukey
  as any other keypress and do it that way?
 
 Usefull for interrupt autoboot and run some menu (script/booting) only with
 specific key (for example with key M on device keyboard).

what's the difference between this and CONFIG_MENUKEY?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 09/14] New command clear: Clear the ANSI terminal

2012-01-25 Thread Marek Vasut
 On Wednesday 25 January 2012 19:10:03 Marek Vasut wrote:
  Do you seriously need a new command for such a simple operation?
 
 Yes, command clear is really usefull for debugging framebuffer output on
 n900.

Ok, let's see what the other people think, I'm opposed tho
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 06/14] cfb_console: Add function console_clear and console_clear_line

2012-01-25 Thread Marek Vasut
 On Wednesday 25 January 2012 19:08:31 Marek Vasut wrote:
   +static void console_clear(void)
  
  Do you use this function AT ALL?
 
 Yes, in patch which add ANSI terminal support to cfb_console.

Why do you even need the support for ANSI terminal in the first place?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 02/14] arm: Optionally use existing atags in bootm.c

2012-01-25 Thread Marek Vasut
 On Wednesday 25 January 2012 19:02:45 Marek Vasut wrote:
   This patch adapts the bootm command so that it can use an existing
   atags command set up by a previous bootloader.
  
  Why do you need it?
 
 Default Nokia kernel has patches which using non-standard atags for
 reporting bootmode, bootreason, hw-rev, NOLO version, boot count, ...

So what? Make u-boot pass arbitrary atags and specify them in your board file.

 
 Closed-source Maemo application need to know these properties (read via
 /proc/bootreason, ...) and will restart device if there is error.

Fine?
 
 So U-Boot must can reuse old atags from NOLO and tell it new kernel.

must can reuse? Anyway, that's nonsense, why won't u-boot be able to craft 
those 
atags?

 
   If the environment variable
   atagaddr is unset, bootm behaves as normal. If atagaddr is set,
   bootm will use atags address from environment variable and also append
   new boot args (if specified in u-boot). For example, if a previous
   boot loader already set up the atags struct at 0x8100:
   
   setenv atagaddr 0x8100; bootm 0x80008000
  
  Can't you set those atags correctly in uboot?
 
 No, because atags are not static (e.g bootreason).

So? You craft them properly in u-boot?

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


Re: [U-Boot] [PATCH 00/14] Nokia RX-51 support

2012-01-25 Thread Marek Vasut
 On Wednesday 25 January 2012 19:20:01 Marek Vasut wrote:
  So why not just replace the bootloader right away?
 
 Booting process on n900:
 1. Omap bootrom
 2. Nokia X-Loader
 3. Nokia NOLO Bootloader
 4. Linux kernel
 ...

To make it clear, I own N900 myself ;-)

 
 Nokia X-Loader and NOLO are stored in first nand part. It has size 128kB.
 Nokia X-Loader is signed (size 14.5kB), so cannot be replaced. NOLO
 bootloader is not signed (so theoretically can be replaced), but size is
 limited to 113kB. I do not know how to compile U-Boot binary with size 
 113kB...
 
 Size of part where is stored linux kernel has 2MB and it is enought for
 U-Boot with kernel image (~200kB + ~1.6MB). Also U-Boot can boot kernel
 from eMMC/SD.

You didn't answer my question, so again ... why can't you replace NOLO? Because 
there's the 113kb limit? Use SPL then.

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


Re: [U-Boot] [PATCH v6 1/3] PXA: PXA27x Matrix keypad driver

2012-01-25 Thread Marek Vasut
 From: Marek Vasut marek.va...@gmail.com
 
 Signed-off-by: Marek Vasut marek.va...@gmail.com
 Signed-off-by: Vasily Khoruzhick anars...@gmail.com
 [vasily: adapted Marek's old version for newer u-boot,
  fixed multiple keypresses handling]

Fine ... albert, can you comment on it?

Vasily, do you think this code is good? I want an honest answer!

 ---
 v2: use struct-based access to regs, minor cleanup
 v3: fix multiple keypresses handling, minor cleanup
 v4: another minor cleanup
 v5: fix indentation issues in scan_keys(), remove udelay,
 increase PXA_KEYPAD_TIMEOUT (due to removed udelay)
 v6: remove ifdefs around WATCHDOG_RESET()
 
  arch/arm/include/asm/arch-pxa/pxa-regs.h|   52 -
  arch/arm/include/asm/arch-pxa/regs-keypad.h |   84 
  drivers/input/Makefile  |2 +
  drivers/input/pxa27x-mkp.c  |  289
 +++ 4 files changed, 375 insertions(+), 52
 deletions(-)
  create mode 100644 arch/arm/include/asm/arch-pxa/regs-keypad.h
  create mode 100644 drivers/input/pxa27x-mkp.c
 
 diff --git a/arch/arm/include/asm/arch-pxa/pxa-regs.h
 b/arch/arm/include/asm/arch-pxa/pxa-regs.h index b81b42c..d562658 100644
 --- a/arch/arm/include/asm/arch-pxa/pxa-regs.h
 +++ b/arch/arm/include/asm/arch-pxa/pxa-regs.h
 @@ -2567,58 +2567,6 @@ typedef void   (*ExcpHndlr) (void) ;
  #define OVL2C1_O2EN  (131) /* Enable bit for Overlay 2 */
  #define CCR_CEN  (131) /* Enable bit for Cursor */
 
 -/* Keypad controller */
 -
 -#define KPC  0x4150 /* Keypad Interface Control register */
 -#define KPDK 0x4158 /* Keypad Interface Direct Key register */
 -#define KPREC0x41500010 /* Keypad Intefcace Rotary Encoder 
register */
 -#define KPMK 0x41500018 /* Keypad Intefcace Matrix Key register */
 -#define KPAS 0x41500020 /* Keypad Interface Automatic Scan register 
*/
 -#define KPASMKP0 0x41500028 /* Keypad Interface Automatic Scan Multiple
 Key Presser register 0 */ -#define KPASMKP1   0x41500030 /* Keypad Interface
 Automatic Scan Multiple Key Presser register 1 */ -#define
 KPASMKP2  0x41500038 /* Keypad Interface Automatic Scan Multiple Key
 Presser register 2 */ -#define KPASMKP3   0x41500040 /* Keypad Interface
 Automatic Scan Multiple Key Presser register 3 */ -#define
 KPKDI 0x41500048 /* Keypad Interface Key Debounce Interval register 
 */ 
-
 -#define KPC_AS   (0x1  30)  /* Automatic Scan bit */
 -#define KPC_ASACT(0x1  29)  /* Automatic Scan on Activity */
 -#define KPC_MI   (0x1  22)  /* Matrix interrupt bit */
 -#define KPC_IMKP (0x1  21)  /* Ignore Multiple Key Press */
 -#define KPC_MS7  (0x1  20)  /* Matrix scan line 7 */
 -#define KPC_MS6  (0x1  19)  /* Matrix scan line 6 */
 -#define KPC_MS5  (0x1  18)  /* Matrix scan line 5 */
 -#define KPC_MS4  (0x1  17)  /* Matrix scan line 4 */
 -#define KPC_MS3  (0x1  16)  /* Matrix scan line 3 */
 -#define KPC_MS2  (0x1  15)  /* Matrix scan line 2 */
 -#define KPC_MS1  (0x1  14)  /* Matrix scan line 1 */
 -#define KPC_MS0  (0x1  13)  /* Matrix scan line 0 */
 -#define KPC_ME   (0x1  12)  /* Matrix Keypad Enable */
 -#define KPC_MIE  (0x1  11)  /* Matrix Interrupt Enable */
 -#define KPC_DK_DEB_SEL   (0x1   9)  /* Direct Key Debounce select */
 -#define KPC_DI   (0x1   5)  /* Direct key interrupt bit */
 -#define KPC_DEE0 (0x1   2)  /* Rotary Encoder 0 Enable */
 -#define KPC_DE   (0x1   1)  /* Direct Keypad Enable */
 -#define KPC_DIE  (0x1   0)  /* Direct Keypad interrupt Enable 
*/
 -
 -#define KPDK_DKP (0x1  31)
 -#define KPDK_DK7 (0x1   7)
 -#define KPDK_DK6 (0x1   6)
 -#define KPDK_DK5 (0x1   5)
 -#define KPDK_DK4 (0x1   4)
 -#define KPDK_DK3 (0x1   3)
 -#define KPDK_DK2 (0x1   2)
 -#define KPDK_DK1 (0x1   1)
 -#define KPDK_DK0 (0x1   0)
 -
 -#define KPREC_OF1(0x1  31)
 -#define kPREC_UF1(0x1  30)
 -#define KPREC_OF0(0x1  15)
 -#define KPREC_UF0(0x1  14)
 -
 -#define KPMK_MKP (0x1  31)
 -#define KPAS_SO  (0x1  31)
 -#define KPASMKPx_SO  (0x1  31)
 -
  #define GPIO113_BIT  (1  17)/* GPIO113 in GPSR, GPCR, bit 17 */
  #define PSLR 0x40F00034
  #define PSTR 0x40F00038  /* Power Manager Standby Configuration Reg 
*/
 diff --git a/arch/arm/include/asm/arch-pxa/regs-keypad.h
 b/arch/arm/include/asm/arch-pxa/regs-keypad.h new file mode 100644
 index 000..1909417
 --- /dev/null
 +++ b/arch/arm/include/asm/arch-pxa/regs-keypad.h
 @@ -0,0 +1,84 @@
 +/*
 + * Copyright (C) 2012 Vasily Khoruzhick anars...@gmail.com
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License as
 + * published by the Free Software Foundation; either version 

Re: [U-Boot] [PATCH 02/14] arm: Optionally use existing atags in bootm.c

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 21:55:53 Marek Vasut wrote:
 must can reuse? Anyway, that's nonsense, why won't u-boot be able to craft
 those atags?


Maemo 5 (default OS in Nokia N900) cannot work if kernel does not have proper
atags from NOLO. So if U-Boot does not reuse it, then Maemo will not boot...

--
Pali Rohár
pali.ro...@gmail.com

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


Re: [U-Boot] [PATCH 00/14] Nokia RX-51 support

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 21:56:37 Marek Vasut wrote:
  On Wednesday 25 January 2012 19:20:01 Marek Vasut wrote:
   So why not just replace the bootloader right away?
 
  Booting process on n900:
  1. Omap bootrom
  2. Nokia X-Loader
  3. Nokia NOLO Bootloader
  4. Linux kernel
  ...

 To make it clear, I own N900 myself ;-)

  Nokia X-Loader and NOLO are stored in first nand part. It has size 128kB.
  Nokia X-Loader is signed (size 14.5kB), so cannot be replaced. NOLO
  bootloader is not signed (so theoretically can be replaced), but size is
  limited to 113kB. I do not know how to compile U-Boot binary with size 
  113kB...
 
  Size of part where is stored linux kernel has 2MB and it is enought for
  U-Boot with kernel image (~200kB + ~1.6MB). Also U-Boot can boot kernel
  from eMMC/SD.

 You didn't answer my question, so again ... why can't you replace NOLO?
 Because there's the 113kb limit? Use SPL then.


I only tried to boot U-Boot in qemu wich increased boot part - but not worked.
(NOLO in qemu can boot u-boot without problems). So NOLO do some extra work -
which I do not know... Also limit is problem to test on real n900.

--
Pali Rohár
pali.ro...@gmail.com

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


Re: [U-Boot] [PATCH 11/14] New config variable CONFIG_PREMONITOR

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 21:51:38 Marek Vasut wrote:
  On Wednesday 25 January 2012 19:12:51 Marek Vasut wrote:
 * if defined run env premonitor before Main Loop for Monitor
 Processing
  
   What is this good for?
 
  before running monitor loop I'd like write some info to console (specific
  board info, board commands, board macros). but if these info will be
  written in preboot it can be deleted by menu section.

 The menu here, you refer to the thing you implemented? So fix that instead
 of introducing broken code and a pile of workarounds.

With menu I mean env menucmd. U-Boot run command stored in env menucmd after
preboot and before monitor loop. For example in menucmd can be my bootmenu,
but there are no problems - no broken code! My bootmenu clear screan and show
menu, so anything printed before menu entries will be deleted. This is not bug
- Also in Grub or LILO is debug/output log cleaned when showing menu entries.

--
Pali Rohár
pali.ro...@gmail.com

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


Re: [U-Boot] [PATCH 11/14] New config variable CONFIG_PREMONITOR

2012-01-25 Thread Marek Vasut
 On Wednesday 25 January 2012 21:51:38 Marek Vasut wrote:
   On Wednesday 25 January 2012 19:12:51 Marek Vasut wrote:
  * if defined run env premonitor before Main Loop for Monitor
  Processing

What is this good for?
   
   before running monitor loop I'd like write some info to console
   (specific board info, board commands, board macros). but if these info
   will be written in preboot it can be deleted by menu section.
  
  The menu here, you refer to the thing you implemented? So fix that
  instead of introducing broken code and a pile of workarounds.
 
 With menu I mean env menucmd. U-Boot run command stored in env menucmd
 after preboot and before monitor loop. For example in menucmd can be my
 bootmenu, but there are no problems - no broken code! My bootmenu clear
 screan and show menu, so anything printed before menu entries will be
 deleted. This is not bug - Also in Grub or LILO is debug/output log
 cleaned when showing menu entries.

Ok anyway, but you implemented custom menu system anyway ... so let's clear 
this 
first, is common/menu.c useless for your application?

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


Re: [U-Boot] [PATCH 02/14] arm: Optionally use existing atags in bootm.c

2012-01-25 Thread Marek Vasut
 On Wednesday 25 January 2012 21:55:53 Marek Vasut wrote:
  must can reuse? Anyway, that's nonsense, why won't u-boot be able to
  craft those atags?
 
 Maemo 5 (default OS in Nokia N900) cannot work if kernel does not have
 proper atags from NOLO. So if U-Boot does not reuse it, then Maemo will
 not boot...

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


Re: [U-Boot] [PATCH 00/14] Nokia RX-51 support

2012-01-25 Thread Marek Vasut
 On Wednesday 25 January 2012 21:56:37 Marek Vasut wrote:
   On Wednesday 25 January 2012 19:20:01 Marek Vasut wrote:
So why not just replace the bootloader right away?
   
   Booting process on n900:
   1. Omap bootrom
   2. Nokia X-Loader
   3. Nokia NOLO Bootloader
   4. Linux kernel
   ...
  
  To make it clear, I own N900 myself ;-)
  
   Nokia X-Loader and NOLO are stored in first nand part. It has size
   128kB. Nokia X-Loader is signed (size 14.5kB), so cannot be replaced.
   NOLO bootloader is not signed (so theoretically can be replaced), but
   size is limited to 113kB. I do not know how to compile U-Boot binary
   with size  113kB...
   
   Size of part where is stored linux kernel has 2MB and it is enought for
   U-Boot with kernel image (~200kB + ~1.6MB). Also U-Boot can boot kernel
   from eMMC/SD.
  
  You didn't answer my question, so again ... why can't you replace NOLO?
  Because there's the 113kb limit? Use SPL then.
 
 I only tried to boot U-Boot in qemu wich increased boot part - but not
 worked. (NOLO in qemu can boot u-boot without problems). So NOLO do some
 extra work - which I do not know... Also limit is problem to test on real
 n900.

What do you mean? Did you crack yours open? Can you connect JTAG to the device? 
I didn't check on mine.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] am3517evm: remove rootfstype kernel parameter for MMC boot device

2012-01-25 Thread Tom Rini
On Wed, Jan 25, 2012 at 1:06 AM, Yegor Yefremov
yegor_s...@visionsystems.de wrote:
 Am 18.07.2011 15:51, schrieb Yegor Yefremov:
 From 53afd3a38abbaed8890ca1ba36439e0c93b69969 Mon Sep 17 00:00:00 2001
 From: Yegor Yefremov yegorsli...@googlemail.com
 Date: Mon, 18 Jul 2011 15:44:42 +0200
 Subject: [PATCH] am3517evm: remove rootfstype kernel parameter for MMC boot 
 device

 it is not necessary to define rootfstype for mass storage devices.
 Kernel detects it automatically.

 Signed-off-by: Yegor Yefremov yegorsli...@googlemail.com
 ---
  include/configs/am3517_evm.h |    3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)

 diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
 index 18aaadf..8b8c80b 100644
 --- a/include/configs/am3517_evm.h
 +++ b/include/configs/am3517_evm.h
 @@ -192,8 +192,7 @@
       loadaddr=0x8200\0 \
       console=ttyO2,115200n8\0 \
       mmcargs=setenv bootargs console=${console}  \
 -             root=/dev/mmcblk0p2 rw  \
 -             rootfstype=ext3 rootwait\0 \
 +             root=/dev/mmcblk0p2 rw rootwait\0 \
       nandargs=setenv bootargs console=${console}  \
               root=/dev/mtdblock4 rw  \
               rootfstype=jffs2\0 \

 Could you please review this patch? It is very annoying when using Buildroot 
 as it creates ext2 images.

Reworked to apply again and applied to u-boot-ti/master, thanks for
the reminder.

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


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

2012-01-25 Thread Tom Rini
Hello,

The following changes since commit 5d250e52ffd5554834a45ac8d53762fbbf36933c:
  Simon Glass (1):
tegra2: Enable data cache

are available in the git repository at:

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

Ben Gardiner (1):
  arm, davinci: add PLL0 prediv to da850 lowlevel setup

Pali Rohár (1):
  arm: omap3: Define save_boot_params in lowlevel_init.S for SPL only

Yegor Yefremov (1):
  am3517evm: remove rootfstype kernel parameter for MMC boot device

 arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c |7 +++
 arch/arm/cpu/armv7/omap3/lowlevel_init.S|4 ++--
 arch/arm/include/asm/arch-davinci/pll_defs.h|3 ++-
 include/configs/am3517_evm.h|3 +--
 4 files changed, 12 insertions(+), 5 deletions(-)

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


Re: [U-Boot] [PATCH 02/14] arm: Optionally use existing atags in bootm.c

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 22:28:38 Marek Vasut wrote:
  On Wednesday 25 January 2012 21:55:53 Marek Vasut wrote:
   must can reuse? Anyway, that's nonsense, why won't u-boot be able to
   craft those atags?
 
  Maemo 5 (default OS in Nokia N900) cannot work if kernel does not have
  proper atags from NOLO. So if U-Boot does not reuse it, then Maemo will
  not boot...

 U-Boot CAN GENERATE THEM

Yes, you can parse atags from NOLO and then generate new from existing... But
why? Better and easier is copy exising and use it.

--
Pali Rohár
pali.ro...@gmail.com

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


Re: [U-Boot] SPL Linux Boot

2012-01-25 Thread Tom Rini
On Wed, Jan 25, 2012 at 4:50 AM, Stefano Babic sba...@denx.de wrote:
 Hi Tom,

 last version of patchset has not received comments since a long time -
 Simon sends to me a confirm that tests on the devkit8000 are successful.

 Any chance to get the patchset merged soon or do you have any open points ?

I've sent Albert a pull request now for the few things I've got queued
up other than this.  Once he takes that I'll take the Linux SPL series
in, give it a few whacks and move it along to Albert.

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


Re: [U-Boot] [PATCH v6 1/3] PXA: PXA27x Matrix keypad driver

2012-01-25 Thread Vasily Khoruzhick
2012/1/25 Marek Vasut marek.va...@gmail.com:
 From: Marek Vasut marek.va...@gmail.com

 Signed-off-by: Marek Vasut marek.va...@gmail.com
 Signed-off-by: Vasily Khoruzhick anars...@gmail.com
 [vasily: adapted Marek's old version for newer u-boot,
          fixed multiple keypresses handling]

 Fine ... albert, can you comment on it?

 Vasily, do you think this code is good? I want an honest answer!

Well, it's overcomplicated due to missing _generic_ keyboard support in u-boot.
It's possible to separate buffer handling, layout management into some
keyboard-core,
so keyboard driver provides only key press/release events to core and
then core decides
what to do if we have multiple keys pressed, if modifier is pressed, etc, etc...

Anyway, for me this code is easy to understand, but it's for now. So
if you want _really_ honest answer -- wait for few weeks
so I can re-review it with fresh view.

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


Re: [U-Boot] [PATCH 00/14] Nokia RX-51 support

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 22:29:16 Marek Vasut wrote:
  On Wednesday 25 January 2012 21:56:37 Marek Vasut wrote:
On Wednesday 25 January 2012 19:20:01 Marek Vasut wrote:
 So why not just replace the bootloader right away?
   
Booting process on n900:
1. Omap bootrom
2. Nokia X-Loader
3. Nokia NOLO Bootloader
4. Linux kernel
...
  
   To make it clear, I own N900 myself ;-)
  
Nokia X-Loader and NOLO are stored in first nand part. It has size
128kB. Nokia X-Loader is signed (size 14.5kB), so cannot be replaced.
NOLO bootloader is not signed (so theoretically can be replaced), but
size is limited to 113kB. I do not know how to compile U-Boot binary
with size  113kB...
   
Size of part where is stored linux kernel has 2MB and it is enought
for
U-Boot with kernel image (~200kB + ~1.6MB). Also U-Boot can boot
kernel
from eMMC/SD.
  
   You didn't answer my question, so again ... why can't you replace NOLO?
   Because there's the 113kb limit? Use SPL then.
 
  I only tried to boot U-Boot in qemu wich increased boot part - but not
  worked. (NOLO in qemu can boot u-boot without problems). So NOLO do some
  extra work - which I do not know... Also limit is problem to test on real
  n900.

 What do you mean? Did you crack yours open? Can you connect JTAG to the
 device? I didn't check on mine.

I have no idea if N900 has JTAG. And I think that nobody cracked X-Loader yet.

NOLO bootloader can be replaced/flashed via flasher-3.5 app throw USB. Also
when NOLO is damaged (or cleared/replaced) it can restored - coldflashed again
via flasher-3.5.

What I tried:
I created mtd image where was X-Loader, NOLO and U-Boot. QEmu RX51 successfull
booted this image and I got serial console and video screen output.

But when I created mtd image where was only X-Loader an U-Boot, QEmu RX51 was
unable to boot (it freezed).

So NOLO executing some code which inilialize board or someting else which must
be done in U-Boot board code. There is no documentation or info about NOLO, so
I cannot create working NOLO replacement.

--
Pali Rohár
pali.ro...@gmail.com

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


Re: [U-Boot] [PATCH v6 1/3] PXA: PXA27x Matrix keypad driver

2012-01-25 Thread Marek Vasut
 2012/1/25 Marek Vasut marek.va...@gmail.com:
  From: Marek Vasut marek.va...@gmail.com
  
  Signed-off-by: Marek Vasut marek.va...@gmail.com
  Signed-off-by: Vasily Khoruzhick anars...@gmail.com
  [vasily: adapted Marek's old version for newer u-boot,
   fixed multiple keypresses handling]
  
  Fine ... albert, can you comment on it?
  
  Vasily, do you think this code is good? I want an honest answer!
 
 Well, it's overcomplicated due to missing _generic_ keyboard support in
 u-boot.

Then create such code!

 It's possible to separate buffer handling, layout management into
 some keyboard-core,
 so keyboard driver provides only key press/release events to core and
 then core decides
 what to do if we have multiple keys pressed, if modifier is pressed, etc,
 etc...

Great idea, let's put this patch on hold and implement the support layer then!
 
 Anyway, for me this code is easy to understand, but it's for now. So
 if you want _really_ honest answer -- wait for few weeks
 so I can re-review it with fresh view.

I don't mind. But maybe you can really implement the keyboard support layer and 
simply add this as a clean and easy driver.

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


Re: [U-Boot] [PATCH 02/14] arm: Optionally use existing atags in bootm.c

2012-01-25 Thread Marek Vasut
 On Wednesday 25 January 2012 22:28:38 Marek Vasut wrote:
   On Wednesday 25 January 2012 21:55:53 Marek Vasut wrote:
must can reuse? Anyway, that's nonsense, why won't u-boot be able to
craft those atags?
   
   Maemo 5 (default OS in Nokia N900) cannot work if kernel does not have
   proper atags from NOLO. So if U-Boot does not reuse it, then Maemo will
   not boot...
  
  U-Boot CAN GENERATE THEM
 
 Yes, you can parse atags from NOLO and then generate new from existing...
 But why? Better and easier is copy exising and use it.

Because eventually, someone will replace nolo with u-boot and what then?

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


Re: [U-Boot] [PATCH 11/14] New config variable CONFIG_PREMONITOR

2012-01-25 Thread Pali Rohár
On Wednesday 25 January 2012 22:28:17 Marek Vasut wrote:
  On Wednesday 25 January 2012 21:51:38 Marek Vasut wrote:
On Wednesday 25 January 2012 19:12:51 Marek Vasut wrote:
   * if defined run env premonitor before Main Loop for Monitor
   Processing

 What is this good for?
   
before running monitor loop I'd like write some info to console
(specific board info, board commands, board macros). but if these info
will be written in preboot it can be deleted by menu section.
  
   The menu here, you refer to the thing you implemented? So fix that
   instead of introducing broken code and a pile of workarounds.
 
  With menu I mean env menucmd. U-Boot run command stored in env menucmd
  after preboot and before monitor loop. For example in menucmd can be my
  bootmenu, but there are no problems - no broken code! My bootmenu clear
  screan and show menu, so anything printed before menu entries will be
  deleted. This is not bug - Also in Grub or LILO is debug/output log
  cleaned when showing menu entries.

 Ok anyway, but you implemented custom menu system anyway ... so let's clear
 this first, is common/menu.c useless for your application?


I do not know. I created my bootmenu before menu.c was integrated into u-boot.
I did not looked at menu.c yet - I do not know what is in menu.c implemented.

--
Pali Rohár
pali.ro...@gmail.com

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


  1   2   >