Re: [U-Boot] [PATCH] mpc5xxx_fec: add call to reset_phy() after PHY initialization

2010-10-12 Thread Ben Warren
  Hi Ilya,

On 8/19/2010 2:09 AM, Ilya Yanok wrote:
 Some boards need their board-specific PHY quirks to be called
 to PHY to work normally. As mpc5xxx_fec driver uses on demand
 PHY initialization and can even reinit PHY during normal operation
 we can't count on reset_phy() call from arch/arch/lib/board.c
 (it is most likely called _before_ we init the PHY from the
 driver) so we need to add call to reset_phy() directly in the
 driver.

 Cc: Ben Warrenbiggerbadder...@gmail.com
 Signed-off-by: Ilya Yanokya...@emcraft.com
 ---
   drivers/net/mpc5xxx_fec.c |7 +++
   1 files changed, 7 insertions(+), 0 deletions(-)

 diff --git a/drivers/net/mpc5xxx_fec.c b/drivers/net/mpc5xxx_fec.c
 index c88e596..bc8c922 100644
 --- a/drivers/net/mpc5xxx_fec.c
 +++ b/drivers/net/mpc5xxx_fec.c
 @@ -250,6 +250,13 @@ static int mpc5xxx_fec_init(struct eth_device *dev, bd_t 
 * bis)
   mpc5xxx_fec_init_phy(dev, bis);

   /*
 +  * Call board-specific PHY fixups (if any)
 +  */
 +#ifdef CONFIG_RESET_PHY_R
 + reset_phy();
 +#endif
 +
 + /*
* Initialize RxBD/TxBD rings
*/
   mpc5xxx_fec_rbd_init(fec);
Applied to net repo.  Please accept my sincere apologies for taking so 
long to process.

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


Re: [U-Boot] [PATCH v6 1/2][NEXT] davinci_emac: davinci_eth_set_mac_addr to -write_hwaddr

2010-10-12 Thread Ben Warren
  Hi Ben,

On 9/23/2010 6:58 AM, Ben Gardiner wrote:
 This patch proposes to migrate the davinci_emac driver to using the
 eth_device-write_hwaddr function pointer as suggested by Ben Warren.

 All the davinci boards had the behaviour, prior to this patch, of
 sync'ing the environment variable enetaddr with the MAC address read
 from non-volatile storage on boot -- when the two locations disagreed,
 the environment variable value took precendence. This patch keeps the
 same behaviour but lets eth_initialize take care of it.

 This patch refactors davinci_emac setup in the boards so that the MAC
 address is read from non-volatile storage into the environment variable
 and then the environment variable value is use in eth_intialize. The
 only exception is the direct call to davinci_eth_set_mac_addr made by
 the da830evm board init which was changed into an assignment of the
 enetaddr field.

 Signed-off-by: Ben Gardinerbengardi...@nanometrics.ca
 Tested-by: Nick Thompsonnick.thomp...@ge.com
 CC: Ben Warrenbiggerbadder...@gmail.com

Added to net repo.

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


Re: [U-Boot] [PATCH] rarp: Condtionally compile rarp support

2010-10-12 Thread Ben Warren
  Hi Peter,

On 9/30/2010 9:25 AM, Peter Tyser wrote:
 Most people don't use the 'rarpboot' command, so only enable it when
 CONFIG_CMD_RARP is defined.

 Signed-off-by: Peter Tyserpty...@xes-inc.com
 ---
   common/cmd_net.c |2 ++
   include/config_cmd_all.h |1 +
   net/Makefile |2 +-
   net/net.c|   11 +--
   4 files changed, 13 insertions(+), 3 deletions(-)
Applied to net repo.

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


Re: [U-Boot] [PATCH] smc91111: add write_hwaddr

2010-10-12 Thread Ben Warren
  Hi Thomas,

On 10/5/2010 6:16 PM, Thomas Chou wrote:
 Add smc_write_hwaddr() to set mac address.
 Clear dev before use.

 Signed-off-by: Thomas Choutho...@wytron.com.tw
 ---
   drivers/net/smc9.c |   40 
   1 files changed, 24 insertions(+), 16 deletions(-)
Applied to net repo.

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


Re: [U-Boot] [PATCH 1/2] drivers/net/at91_emac.c: increase timeout for autonegotiation

2010-10-12 Thread Ben Warren
  Hi Andreas,

On 10/7/2010 12:44 AM, Andreas Bießmann wrote:
 This patch increases timeout for autonegotiation from 1 second to 3 seconds.
 Some boards (e.g. at91rm9200ek) did not negotiate within 1 second.

 Signed-off-by: Andreas Bießmannandreas.de...@googlemail.com
 ---
   drivers/net/at91_emac.c |2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

 diff --git a/drivers/net/at91_emac.c b/drivers/net/at91_emac.c
 index ca2b16b..4626398 100644
 --- a/drivers/net/at91_emac.c
 +++ b/drivers/net/at91_emac.c
 @@ -220,7 +220,7 @@ static int at91emac_phy_reset(struct eth_device *netdev)
   at91emac_write(emac, CONFIG_DRIVER_AT91EMAC_PHYADDR, MII_BMCR,
   (BMCR_ANENABLE | BMCR_ANRESTART));

 - for (i = 0; i  10 / 100; i++) {
 + for (i = 0; i  3; i++) {
   at91emac_read(emac, CONFIG_DRIVER_AT91EMAC_PHYADDR,
   MII_BMSR,status);
   if (status  BMSR_ANEGCOMPLETE)
Applied to net repo.

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


Re: [U-Boot] [PATCH 2/2] drivers/net/at91_emac.c: change return values

2010-10-12 Thread Ben Warren
  HI Andreas,

On 10/7/2010 12:44 AM, Andreas Bießmann wrote:
 Some return values pretended correct pass. This patch changes them according
 to README.drivers.net. This patch changes e.g. command 'dhcp' to stop after
 errorneous autonegotiation.

 Signed-off-by: Andreas Bießmannandreas.de...@googlemail.com
 ---
   drivers/net/at91_emac.c |   18 +-
   1 files changed, 9 insertions(+), 9 deletions(-)
Applied to net repo.

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


Re: [U-Boot] [PATCH] net: Fix emaclite driver to support little-endian microblaze

2010-10-12 Thread Ben Warren
  Hi Michal,

On 10/10/2010 6:41 PM, Michal Simek wrote:
 Support New emaclite AXI IP.

 Signed-off-by: Michal Simekmon...@monstr.eu
 CC: Ben Warrenbiggerbadder...@gmail.com
 ---
   drivers/net/xilinx_emaclite.c |4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

 diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
 index 455ce0c..76af939 100644
 --- a/drivers/net/xilinx_emaclite.c
 +++ b/drivers/net/xilinx_emaclite.c
 @@ -309,7 +309,7 @@ static int emaclite_recv(struct eth_device *dev)
   #endif
   }
   /* Get the length of the frame that arrived */
 - switch(((in_be32 (baseaddress + XEL_RXBUFF_OFFSET + 0xC))
 + switch(((ntohl(in_be32 (baseaddress + XEL_RXBUFF_OFFSET + 0xC)))
   0x )  16) {
   case 0x806:
   length = 42 + 20; /* FIXME size of ARP */
 @@ -317,7 +317,7 @@ static int emaclite_recv(struct eth_device *dev)
   break;
   case 0x800:
   length = 14 + 14 +
 - (((in_be32 (baseaddress + XEL_RXBUFF_OFFSET + 0x10))
 + (((ntohl(in_be32 (baseaddress + XEL_RXBUFF_OFFSET + 
 0x10)))
   0x)  16); /* FIXME size of IP packet */
   debug (IP Packet\n);
   break;
Applied to net repo.

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


Re: [U-Boot] [PATCH v2] net: Move Emaclite to NET_MULTI

2010-10-12 Thread Ben Warren
  Hi Michal,

On 10/10/2010 6:41 PM, Michal Simek wrote:
 Emaclite was using old net api that's why
 this patch move emaclite to NET_MULTI api.

 Signed-off-by: Michal Simekmon...@monstr.eu
 CC: Ben Warrenbiggerbadder...@gmail.com

 ---

 v2: Pass base_addr as parameter

 v1: Initial version
 ---
   drivers/net/xilinx_emaclite.c |   84 
 +++--
   include/netdev.h  |1 +
   2 files changed, 48 insertions(+), 37 deletions(-)
Applied to net repo.

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


[U-Boot] Pull request - net

2010-10-12 Thread Ben Warren


Wolfgang,

The following changes since commit bfc7bea6adc46e1db2f5a5e3464d7652ed67c864:
   Wolfgang Denk (1):
 Merge branch 'master' of git://git.denx.de/u-boot-x86

are available in the git repository at:

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

Andreas Bießmann (2):
   drivers/net/at91_emac.c: increase timeout for autonegotiation
   drivers/net/at91_emac.c: change return values

Ben Gardiner (1):
   davinci_emac: davinci_eth_set_mac_addr to -write_hwaddr

Ben Warren (1):
   Net: Remove redundant CONFIG_NET_MULTI directives

Ilya Yanok (1):
   mpc5xxx_fec: add call to reset_phy() after PHY initialization

Joakim Tjernlund (4):
   net: Fix faulty definition of uec_initialize()
   UEC: Don't udelay needlessly
   UEC PHY: Remove strange 0.5 sec delay
   UEC PHY: Speed up initial PHY neg.

Michal Simek (2):
   net: Fix emaclite driver to support little-endian microblaze
   net: Move Emaclite to NET_MULTI

Peter Tyser (1):
   rarp: Condtionally compile rarp support

Reinhard Meyer (1):
   NET: add ENC28J60 driver using SPI framework

Reinhard Meyer (-VC) (1):
   NET: move legacy enc28j60.c to sidetrack as enc28j60_lpc2292.c

Thomas Chou (1):
   smc9: add write_hwaddr

  arch/arm/include/asm/arch-davinci/emac_defs.h |1 -
  arch/arm/lib/board.c  |   19 -
  board/davinci/common/misc.c   |   41 +-
  board/davinci/common/misc.h   |2 +-
  board/davinci/da8xxevm/da830evm.c |   12 +-
  board/davinci/dm365evm/dm365evm.c |2 +-
  board/davinci/dvevm/dvevm.c   |2 +-
  board/davinci/sffsdr/sffsdr.c |2 +-
  board/davinci/sonata/sonata.c |2 +-
  common/cmd_net.c  |2 +
  drivers/net/Makefile  |1 +
  drivers/net/at91_emac.c   |   20 +-
  drivers/net/davinci_emac.c|   80 +-
  drivers/net/enc28j60.c| 1548 -
  drivers/net/enc28j60.h|  251 
  drivers/net/enc28j60_lpc2292.c|  983 
  drivers/net/mpc5xxx_fec.c |7 +
  drivers/net/smc9.c|   40 +-
  drivers/net/xilinx_emaclite.c |   88 +-
  drivers/qe/uec.c  |4 +-
  drivers/qe/uec_phy.c  |   10 +-
  include/config_cmd_all.h  |1 +
  include/configs/SMN42.h   |2 +-
  include/configs/lpc2292sodimm.h   |2 +-
  include/netdev.h  |4 +-
  net/Makefile  |2 +-
  net/eth.c |   16 +-
  net/net.c |   11 +-
  28 files changed, 2192 insertions(+), 963 deletions(-)
  create mode 100644 drivers/net/enc28j60.h
  create mode 100644 drivers/net/enc28j60_lpc2292.c


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


Re: [U-Boot] [PATCH 1/2] drivers/net/at91_emac.c: increase timeout for autonegotiation

2010-10-12 Thread Reinhard Meyer
Dear Ben Warren,
 Applied to net repo.

OOPS, I already caught them in the AT91 repo and they are on the way to 
mainstream already.

Reinhard

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


[U-Boot] Pull request - microblaze

2010-10-12 Thread Michal Simek
Dear Wolfgang,

please pull the following changes to your tree.

Thanks,
Michal


The following changes since commit bfc7bea6adc46e1db2f5a5e3464d7652ed67c864:
  Wolfgang Denk (1):
Merge branch 'master' of git://git.denx.de/u-boot-x86

are available in the git repository at:

  git://www.denx.de/git/u-boot-microblaze.git master

Michal Simek (3):
  microblaze: Fix microblaze-generic config file
  microblaze: Add support for NET_MULTI api
  microblaze: Support little-endian microblaze target

Stephan Linz (2):
  microblaze: generic: adding DHCP support
  microblaze: generic: rename MTD partition set to 'flash-0'

 arch/microblaze/cpu/start.S|   60 +-
 arch/microblaze/include/asm/byteorder.h|4 +
 arch/microblaze/lib/board.c|   12 +-
 .../xilinx/microblaze-generic/microblaze-generic.c |   13 +
 include/configs/microblaze-generic.h   |  236 +++-
 5 files changed, 207 insertions(+), 118 deletions(-)


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


Re: [U-Boot] [PATCH] cfi_flash: Fix Unknown FLASH error message

2010-10-12 Thread Stefan Roese
On Wednesday 29 September 2010 20:49:05 Peter Tyser wrote:
 From: John Schmoller jschmol...@xes-inc.com
 
 When a CFI flash chip could not be detected an error message similar to
 the following would be printed on bootup:
 
  FLASH: ## Unknown FLASH on Bank 1 - Size = 0x0100 = 0 MB
 
 The printf incorrectly converted the flash size into megabytes.  This
 patch fixes the printing of the flash size in megabytes:
 
  FLASH: ## Unknown FLASH on Bank 1 - Size = 0x0100 = 16 MB

Applied to u-boot-cfi-flash/master. Thanks.
 
Cheers,
Stefan

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


[U-Boot] Please pull u-boot-cfi-flash/master

2010-10-12 Thread Stefan Roese
The following changes since commit bfc7bea6adc46e1db2f5a5e3464d7652ed67c864:

  Merge branch 'master' of git://git.denx.de/u-boot-x86 (2010-10-11 10:00:34 
+0200)

are available in the git repository at:

  git://www.denx.de/git/u-boot-cfi-flash.git master

John Schmoller (1):
  cfi_flash: Fix Unknown FLASH error message

 drivers/mtd/cfi_flash.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3] ns16550: Add WATCHDOG_RESET to putc for short watchdog timeout boards

2010-10-12 Thread Stefan Roese
Call watchdog_reset() upon newline. This is done here in putc
since the environment code uses a single puts() to print the complete
envrironment upon printenv. So we can't put this watchdog call
in puts().

This is needed for boards with a very short watchdog timeout, like the
lwmon5 with a 100ms timeout. Without this patch this board resets in the
commands with long outputs, like printenv or fdt print.

Note that the image size is not increased with this patch when
CONFIG_HW_WATCHDOG or CONFIG_WATCHDOG are not defined since the compiler
optimizes this additional code away.

Signed-off-by: Stefan Roese s...@denx.de
---
v3:
- Only call WATCHDOG_RESET() upon newline
- Remove inclusion of common.h

v2:
- Move declaration and assignment of count out of loop
  as pointed out by Wolfgang (thanks).

 drivers/serial/ns16550.c |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 7e833fd..418a556 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -70,6 +70,15 @@ void NS16550_putc (NS16550_t com_port, char c)
 {
while ((serial_in(com_port-lsr)  UART_LSR_THRE) == 0);
serial_out(c, com_port-thr);
+
+   /*
+* Call watchdog_reset() upon newline. This is done here in putc
+* since the environment code uses a single puts() to print the complete
+* envrironment upon printenv. So we can't put this watchdog call
+* in puts().
+*/
+   if (c == '\n')
+   WATCHDOG_RESET();
 }
 
 #ifndef CONFIG_NS16550_MIN_FUNCTIONS
-- 
1.7.3.1

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


[U-Boot] u-boot newbie

2010-10-12 Thread kishore shiek ahamed
Hello

Am a U-Boot newbie and as for now have used u-boot  and would like to
explore edit n hack U-boot
Referring  to U-boot manual it explains how to use but i wish to know how
u-boot is organised and designed to work
could anyone point to some resource for u-boot hacks?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] MX51 LCD Support

2010-10-12 Thread Stefano Babic
This patchset adds support for LCD to the MX51 Soc
using the IPUv3 graphic processor. This is a porting
to U-Boot of the Linux driver developed and delivered
by Freescale.


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


[U-Boot] [PATCH 1/4] Add linux framebuffer header

2010-10-12 Thread Stefano Babic
The patch adds the linux framebuffer header file. As several
drivers are ported from Linux, it is easier to reuse the same
structures already present in the kernel.

Signed-off-by: Stefano Babic sba...@denx.de
---
 include/linux/fb.h |  616 
 1 files changed, 616 insertions(+), 0 deletions(-)
 create mode 100644 include/linux/fb.h

diff --git a/include/linux/fb.h b/include/linux/fb.h
new file mode 100644
index 000..0138e61
--- /dev/null
+++ b/include/linux/fb.h
@@ -0,0 +1,616 @@
+#ifndef _LINUX_FB_H
+#define _LINUX_FB_H
+
+#include linux/types.h
+
+/* Definitions of frame buffers
*/
+
+#define FB_MAX 32  /* sufficient for now */
+
+#define FB_TYPE_PACKED_PIXELS  0   /* Packed Pixels*/
+
+#define FB_VISUAL_MONO01   0   /* Monochr. 1=Black 0=White */
+#define FB_VISUAL_MONO10   1   /* Monochr. 1=White 0=Black */
+#define FB_VISUAL_TRUECOLOR2   /* True color   */
+#define FB_VISUAL_PSEUDOCOLOR  3   /* Pseudo color (like atari) */
+#define FB_VISUAL_DIRECTCOLOR  4   /* Direct color */
+#define FB_VISUAL_STATIC_PSEUDOCOLOR   5   /* Pseudo color readonly */
+
+#define FB_ACCEL_NONE  0   /* no hardware accelerator  */
+
+struct fb_fix_screeninfo {
+   char id[16];/* identification string eg TT 
Builtin */
+   unsigned long smem_start;   /* Start of frame buffer mem */
+   /* (physical address) */
+   __u32 smem_len; /* Length of frame buffer mem */
+   __u32 type; /* see FB_TYPE_**/
+   __u32 type_aux; /* Interleave for interleaved Planes */
+   __u32 visual;   /* see FB_VISUAL_*  */ 
+   __u16 xpanstep; /* zero if no hardware panning  */
+   __u16 ypanstep; /* zero if no hardware panning  */
+   __u16 ywrapstep;/* zero if no hardware ywrap*/
+   __u32 line_length;  /* length of a line in bytes*/
+   unsigned long mmio_start;   /* Start of Memory Mapped I/O   */
+   /* (physical address) */
+   __u32 mmio_len; /* Length of Memory Mapped I/O  */
+   __u32 accel;/* Indicate to driver which */
+   /*  specific chip/card we have  */
+   __u16 reserved[3];  /* Reserved for future compatibility */
+};
+
+/*
+ * Interpretation of offset for color fields: All offsets are from the right,
+ * inside a pixel value, which is exactly 'bits_per_pixel' wide (means: you
+ * can use the offset as right argument to ). A pixel afterwards is a bit
+ * stream and is written to video memory as that unmodified.
+ *
+ * For pseudocolor: offset and length should be the same for all color
+ * components. Offset specifies the position of the least significant bit
+ * of the pallette index in a pixel value. Length indicates the number
+ * of available palette entries (i.e. # of entries = 1  length).
+ */
+struct fb_bitfield {
+   __u32 offset;   /* beginning of bitfield*/
+   __u32 length;   /* length of bitfield   */
+   __u32 msb_right;
+
+};
+
+#define FB_NONSTD_HAM  1   /* Hold-And-Modify (HAM)*/
+#define FB_NONSTD_REV_PIX_IN_B 2   /* order of pixels in each byte is 
reversed */
+
+#define FB_ACTIVATE_NOW0   /* set values immediately (or 
vbl)*/
+#define FB_ACTIVATE_NXTOPEN1   /* activate on next open*/
+#define FB_ACTIVATE_TEST   2   /* don't set, round up impossible */
+#define FB_ACTIVATE_MASK   15
+   /* values   */
+#define FB_ACTIVATE_VBL   16   /* activate values on next vbl  
*/
+#define FB_CHANGE_CMAP_VBL 32  /* change colormap on vbl   */
+#define FB_ACTIVATE_ALL   64   /* change all VCs on this fb
*/
+#define FB_ACTIVATE_FORCE 128  /* force apply even when no change*/
+#define FB_ACTIVATE_INV_MODE  256   /* invalidate videomode */
+
+#define FB_SYNC_HOR_HIGH_ACT   1   /* horizontal sync high active  */
+#define FB_SYNC_VERT_HIGH_ACT  2   /* vertical sync high active*/
+#define FB_SYNC_EXT4   /* external sync*/
+#define FB_SYNC_COMP_HIGH_ACT  8   /* composite sync high active   */
+#define FB_SYNC_BROADCAST  16  /* broadcast video timings  */
+   /* vtotal = 144d/288n/576i = PAL  */
+   /* vtotal = 121d/242n/484i = NTSC */
+#define FB_SYNC_ON_GREEN   32  /* sync on green */
+
+#define FB_VMODE_NONINTERLACED  0 

[U-Boot] [PATCH 4/4] MX51: Add video support to vision2 board

2010-10-12 Thread Stefano Babic
The patch adds support for LCD to the vision board.

Signed-off-by: Stefano Babic sba...@denx.de
---
 board/ttcontrol/vision2/vision2.c |   69 +
 include/configs/vision2.h |   15 
 2 files changed, 84 insertions(+), 0 deletions(-)

diff --git a/board/ttcontrol/vision2/vision2.c 
b/board/ttcontrol/vision2/vision2.c
index c991ee2..c3e6c70 100644
--- a/board/ttcontrol/vision2/vision2.c
+++ b/board/ttcontrol/vision2/vision2.c
@@ -37,14 +37,34 @@
 #include fsl_esdhc.h
 #include fsl_pmic.h
 #include mc13892.h
+#include linux/fb.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
 static u32 system_rev;
 
+extern int mx51_fb_init(struct fb_videomode *mode);
+
 #ifdef CONFIG_HW_WATCHDOG
 #include watchdog.h
 
+static struct fb_videomode nec_nl6448bc26_09c = {
+   NEC_NL6448BC26-09C,
+   60, /* Refresh */
+   640,/* xres */
+   480,/* yres */
+   37650,  /* pixclock = 26.56Mhz */
+   48, /* left margin */
+   16, /* right margin */
+   31, /* upper margin */
+   12, /* lower margin */
+   96, /* hsync-len */
+   2,  /* vsync-len */
+   0,  /* sync */
+   FB_VMODE_NONINTERLACED, /* vmode */
+   0,  /* flag */
+};
+
 void hw_watchdog_reset(void)
 {
int val;
@@ -423,6 +443,9 @@ static void setup_gpios(void)
mxc_request_iomux(MX51_PIN_CSPI1_RDY, IOMUX_CONFIG_ALT3);
mxc_iomux_set_pad(MX51_PIN_CSPI1_RDY, 0x82);
 
+   /* PWM Output GPIO1_2 */
+   mxc_request_iomux(MX51_PIN_GPIO1_2, IOMUX_CONFIG_ALT1);
+
/*
 * Set GPIO1_4 to high and output; it is used to reset
 * the system on reboot
@@ -630,6 +653,34 @@ int board_early_init_f(void)
return 0;
 }
 
+static void backlight(int on)
+{
+   if (on) {
+   mxc_gpio_set(65, 1);
+   udelay(1);
+   mxc_gpio_set(68, 1);
+   } else {
+   mxc_gpio_set(65, 0);
+   mxc_gpio_set(68, 0);
+   }
+}
+
+void lcd_enable(void)
+{
+   int ret;
+
+   mxc_request_iomux(MX51_PIN_DI1_PIN2, IOMUX_CONFIG_ALT0);
+   mxc_request_iomux(MX51_PIN_DI1_PIN3, IOMUX_CONFIG_ALT0);
+
+   mxc_gpio_set(2, 1);
+   mxc_request_iomux(MX51_PIN_GPIO1_2, IOMUX_CONFIG_ALT0);
+
+   ret = mx51_fb_init(nec_nl6448bc26_09c);
+   if (ret) {
+   puts(LCD cannot be configured\n);
+   }
+}
+
 int board_init(void)
 {
 #ifdef CONFIG_SYS_ARM_WITHOUT_RELOC
@@ -709,3 +760,21 @@ int checkboard(void)
return 0;
 }
 
+int do_vision_lcd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+   int on;
+
+   if (argc  2)
+   return cmd_usage(cmdtp);
+
+   on = (strcmp(argv[1], on) == 0);
+   backlight(on);
+
+   return 0;
+}
+
+U_BOOT_CMD(
+   lcdbl,  CONFIG_SYS_MAXARGS, 1, do_vision_lcd,
+   Vision2 Backlight,
+   lcdbl [on|off]\n
+);
diff --git a/include/configs/vision2.h b/include/configs/vision2.h
index 1f73c71..5710375 100644
--- a/include/configs/vision2.h
+++ b/include/configs/vision2.h
@@ -212,6 +212,21 @@
 #define CONFIG_SYS_CLKTL_CBCDR 0x19239100
 
 /*
+ * Framebuffer and LCD
+ */
+#define CONFIG_PREBOOT
+#define CONFIG_LCD
+#define CONFIG_VIDEO_MX5
+#define CONFIG_SYS_CONSOLE_ENV_OVERWRITE
+#defineCONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV
+#define LCD_BPPLCD_COLOR16
+#defineCONFIG_SPLASH_SCREEN
+#define CONFIG_CMD_BMP
+#define CONFIG_BMP_16BPP
+#define CMD_DISPLAY
+
+/*
  * NAND FLASH driver setup
  */
 #define CONFIG_CMD_NAND
-- 
1.6.3.3

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


[U-Boot] [PATCH 3/4] MX51: Add video support

2010-10-12 Thread Stefano Babic
Add framebuffer driver for the MX51 processor
working on the IPUv3 internal graphic processor.

Signed-off-by: Stefano Babic sba...@denx.de
---
 drivers/video/Makefile   |1 +
 drivers/video/mxc_ipuv3_fb.c |  661 ++
 drivers/video/mxcfb.h|   78 +
 3 files changed, 740 insertions(+), 0 deletions(-)
 create mode 100644 drivers/video/mxc_ipuv3_fb.c
 create mode 100644 drivers/video/mxcfb.h

diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 4be82e7..5b7b261 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -34,6 +34,7 @@ COBJS-$(CONFIG_VIDEO_CT69000) += ct69000.o videomodes.o
 COBJS-$(CONFIG_VIDEO_MB862xx) += mb862xx.o videomodes.o
 COBJS-$(CONFIG_VIDEO_MB86R0xGDC) += mb86r0xgdc.o videomodes.o
 COBJS-$(CONFIG_VIDEO_MX3) += mx3fb.o
+COBJS-$(CONFIG_VIDEO_MX5) += mxc_ipuv3_fb.o ipu_common.o ipu_disp.o
 COBJS-$(CONFIG_VIDEO_SED13806) += sed13806.o
 COBJS-$(CONFIG_SED156X) += sed156x.o
 COBJS-$(CONFIG_VIDEO_SM501) += sm501.o
diff --git a/drivers/video/mxc_ipuv3_fb.c b/drivers/video/mxc_ipuv3_fb.c
new file mode 100644
index 000..7a905c5
--- /dev/null
+++ b/drivers/video/mxc_ipuv3_fb.c
@@ -0,0 +1,661 @@
+/*
+ * Porting to u-boot:
+ *
+ * (C) Copyright 2010
+ * Stefano Babic, DENX Software Engineering, sba...@denx.de
+ *
+ * MX51 Linux framebuffer:
+ *
+ * (C) Copyright 2004-2010 Freescale Semiconductor, Inc.
+ *
+ * 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
+ */
+
+/* #define DEBUG */
+#include common.h
+#include asm/errno.h
+#include linux/string.h
+#include linux/list.h
+#include linux/fb.h
+#include asm/io.h
+#include malloc.h
+#include lcd.h
+#include videomodes.h
+#include ipu.h
+#include mxcfb.h
+
+DECLARE_GLOBAL_DATA_PTR;
+
+void *lcd_base;/* Start of framebuffer memory  */
+void *lcd_console_address; /* Start of console buffer  */
+
+int lcd_line_length;
+int lcd_color_fg;
+int lcd_color_bg;
+
+short console_col;
+short console_row;
+
+vidinfo_t panel_info;
+
+static int mxcfb_map_video_memory(struct fb_info *fbi);
+static int mxcfb_unmap_video_memory(struct fb_info *fbi);
+
+void lcd_initcolregs(void)
+{
+}
+
+void lcd_setcolreg(ushort regno, ushort red, ushort green, ushort blue)
+{
+}
+
+void lcd_disable(void)
+{
+}
+
+void lcd_panel_disable(void)
+{
+}
+
+void fb_videomode_to_var(struct fb_var_screeninfo *var,
+const struct fb_videomode *mode)
+{
+   var-xres = mode-xres;
+   var-yres = mode-yres;
+   var-xres_virtual = mode-xres;
+   var-yres_virtual = mode-yres;
+   var-xoffset = 0;
+   var-yoffset = 0;
+   var-pixclock = mode-pixclock;
+   var-left_margin = mode-left_margin;
+   var-right_margin = mode-right_margin;
+   var-upper_margin = mode-upper_margin;
+   var-lower_margin = mode-lower_margin;
+   var-hsync_len = mode-hsync_len;
+   var-vsync_len = mode-vsync_len;
+   var-sync = mode-sync;
+   var-vmode = mode-vmode  FB_VMODE_MASK;
+}
+
+/*
+ * Structure containing the MXC specific framebuffer information.
+ */
+struct mxcfb_info {
+   int blank;
+   ipu_channel_t ipu_ch;
+   int ipu_di;
+   u32 ipu_di_pix_fmt;
+   bool overlay;
+   bool alpha_chan_en;
+   dma_addr_t alpha_phy_addr0;
+   dma_addr_t alpha_phy_addr1;
+   void *alpha_virt_addr0;
+   void *alpha_virt_addr1;
+   uint32_t alpha_mem_len;
+   uint32_t cur_ipu_buf;
+   uint32_t cur_ipu_alpha_buf;
+
+   u32 pseudo_palette[16];
+};
+
+enum {
+   BOTH_ON,
+   SRC_ON,
+   TGT_ON,
+   BOTH_OFF
+};
+
+static unsigned long default_bpp = 16;
+static bool g_dp_in_use;
+static struct fb_info *mxcfb_info[3];
+static int ext_clk_used;
+
+static uint32_t bpp_to_pixfmt(struct fb_info *fbi)
+{
+   uint32_t pixfmt = 0;
+
+   debug(bpp_to_pixfmt: %d\n, fbi-var.bits_per_pixel);
+
+   if (fbi-var.nonstd)
+   return fbi-var.nonstd;
+
+   switch (fbi-var.bits_per_pixel) {
+   case 24:
+   pixfmt = IPU_PIX_FMT_BGR24;
+   break;
+   case 32:
+   pixfmt = IPU_PIX_FMT_BGR32;
+   break;
+   case 16:
+   pixfmt = IPU_PIX_FMT_RGB565;
+ 

Re: [U-Boot] [PATCH 1/4] Add linux framebuffer header

2010-10-12 Thread Wolfgang Denk
Dear Stefano Babic,

In message 1286875504-9058-2-git-send-email-sba...@denx.de you wrote:
 The patch adds the linux framebuffer header file. As several
 drivers are ported from Linux, it is easier to reuse the same
 structures already present in the kernel.
 
 Signed-off-by: Stefano Babic sba...@denx.de
 ---
  include/linux/fb.h |  616 
 
  1 files changed, 616 insertions(+), 0 deletions(-)
  create mode 100644 include/linux/fb.h

Please include an indication where exactly the code is coming from,
as described in the Linux kernel's SubmittingPatches document:

|  Special note to back-porters: It seems to be a common and useful practise
|  to insert an indication of the origin of a patch at the top of the commit
|  message (just after the subject line) to facilitate tracking. For instance,
|  here's what we see in 2.6-stable :
|  
|  Date:   Tue May 13 19:10:30 2008 +
|  
|  SCSI: libiscsi regression in 2.6.25: fix nop timer handling
|  
|  commit 4cf1043593db6a337f10e006c23c69e5fc93e722 upstream
|  
|  And here's what appears in 2.4 :
|  
|  Date:   Tue May 13 22:12:27 2008 +0200
|  
|  wireless, airo: waitbusy() won't delay
|  
|  [backport of 2.6 commit b7acbdfbd1f277c1eb23f344f899cfa4cd0bf36a]
|  
|  Whatever the format, this information provides a valuable help to people
|  tracking your trees, and to people trying to trouble-shoot bugs in your
|  tree.

So please include at least the name of the file in the Linux tree and
the exact kenrel version used as a reference in the commit message.

Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Just think, with VLSI we can have 100 ENIACS on a chip!
- Alan Perlis
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/4] MX51: Add IPU driver for video support

2010-10-12 Thread Wolfgang Denk
Dear Stefano Babic,

In message 1286875504-9058-3-git-send-email-sba...@denx.de you wrote:
 The patch is a porting of the IPU Linux driver
 developed by Freescale to have framebuffer
 functionalities in u-boot.
 Most features are dropped from the original driver and
 only LCD support is the goal of this porting.

I don't know how close this is to the original Linux driver;
eventually you should add a more precise reference to the original
version in the commit message here, too.

 --- /dev/null
 +++ b/drivers/video/ipu.h
 @@ -0,0 +1,316 @@
...
 +typedef unsigned char bool;
 +#define true 1
 +#define false 0

An, no.  Can we please drop that.

 +#define IDMA_CHAN_INVALID0xFF
 +#define HIGH_RESOLUTION_WIDTH1024
 +
 +struct clk {
 + const char *name;
 + int id;
 + /* Source clock this clk depends on */
 + struct clk *parent;
 + /* Secondary clock to enable/disable with this clock */
 + struct clk *secondary;
 + /* Current clock rate */
 + unsigned long rate;
 + /* Reference count of clock enable/disable */
 + __s8 usecount;
 + /* Register bit position for clock's enable/disable control. */
 + u8 enable_shift;
 + /* Register address for clock's enable/disable control. */
 + void *enable_reg;
 + u32 flags;
 + /* Function ptr to recalculate the clock's rate based on parent
 +clock's rate */
 + void (*recalc) (struct clk *);
 + /* Function ptr to set the clock to a new rate. The rate must match a
 +supported rate returned from round_rate. Leave blank if clock is not
 +programmable */
 + int (*set_rate) (struct clk *, unsigned long);
 + /* Function ptr to round the requested clock rate to the nearest
 +supported rate that is less than or equal to the requested rate. */
 + unsigned long (*round_rate) (struct clk *, unsigned long);
 + /* Function ptr to enable the clock. Leave blank if clock can not
 +be gated. */
 + int (*enable) (struct clk *);
 + /* Function ptr to disable the clock. Leave blank if clock can not
 +be gated. */
 + void (*disable) (struct clk *);
 + /* Function ptr to set the parent clock of the clock. */
 + int (*set_parent) (struct clk *, struct clk *);

Incorrect multi-line comment style. Please fix globally. [or is the
whole file a verbatim copy of the Linux file?]


 +/* @} */
 +/* @name YUV Planar Formats */
 +/* @{ */

Oops. What's that?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
I distrust all systematisers, and avoid them. The will  to  a  system
shows a lack of honesty.
- Friedrich Wilhelm Nietzsche _Götzen-Dämmerung [The Twilight of  the
Idols]_ ``Maxims and Missiles'' no. 26
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] [NEW_RELOC] arm1136, qong: add support for ELF relocations

2010-10-12 Thread Heiko Schocher
Signed-off-by: Wolfgang Denk w...@denx.de
Signed-off-by: Heiko Schocher h...@denx.de
---
 arch/arm/cpu/arm1136/start.S|  171 ++-
 arch/arm/cpu/arm1136/u-boot.lds |8 ++
 include/configs/qong.h  |2 +-
 3 files changed, 105 insertions(+), 76 deletions(-)

diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S
index 494768e..a86114b 100644
--- a/arch/arm/cpu/arm1136/start.S
+++ b/arch/arm/cpu/arm1136/start.S
@@ -89,48 +89,35 @@ _end_vect:
 _TEXT_BASE:
.word   TEXT_BASE
 
-#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-.globl _armboot_start
-_armboot_start:
-   .word _start
-#endif
-
 /*
  * These are defined in the board-specific linker script.
+ * Subtracting _start from them lets the linker put their
+ * relative position in the executable instead of leaving
+ * them null.
  */
-.globl _bss_start
-_bss_start:
-   .word __bss_start
-
-.globl _bss_end
-_bss_end:
-   .word _end
-
-#if !defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
-.globl _datarel_start
-_datarel_start:
-   .word __datarel_start
+.globl _bss_start_ofs
+_bss_start_ofs:
+   .word __bss_start - _start
 
-.globl _datarelrolocal_start
-_datarelrolocal_start:
-   .word __datarelrolocal_start
+.globl _bss_end_ofs
+_bss_end_ofs:
+   .word _end - _start
 
-.globl _datarellocal_start
-_datarellocal_start:
-   .word __datarellocal_start
+.globl _datarel_start_ofs
+_datarel_start_ofs:
+   .word __datarel_start - _start
 
-.globl _datarelro_start
-_datarelro_start:
-   .word __datarelro_start
+.globl _datarelrolocal_start_ofs
+_datarelrolocal_start_ofs:
+   .word __datarelrolocal_start - _start
 
-.globl _got_start
-_got_start:
-   .word __got_start
+.globl _datarellocal_start_ofs
+_datarellocal_start_ofs:
+   .word __datarellocal_start - _start
 
-.globl _got_end
-_got_end:
-   .word __got_end
-#endif
+.globl _datarelro_start_ofs
+_datarelro_start_ofs:
+   .word __datarelro_start - _start
 
 #ifdef CONFIG_USE_IRQ
 /* IRQ stack memory (calculated at run-time) */
@@ -225,9 +212,8 @@ stack_setup:
 
adr r0, _start
ldr r2, _TEXT_BASE
-   ldr r3, _bss_start
-   sub r2, r3, r2  /* r2 - size of armboot*/
-   add r2, r0, r2  /* r2 - source end address */
+   ldr r3, _bss_start_ofs
+   add r2, r0, r3  /* r2 - source end address */
cmp r0, r6
beq clear_bss
 
@@ -239,36 +225,54 @@ copy_loop:
blo copy_loop
 
 #ifndef CONFIG_PRELOADER
-   /* fix got entries */
-   ldr r1, _TEXT_BASE
-   mov r0, r7  /* reloc addr */
-   ldr r2, _got_start  /* addr in Flash */
-   ldr r3, _got_end/* addr in Flash */
-   sub r3, r3, r1
-   add r3, r3, r0
-   sub r2, r2, r1
-   add r2, r2, r0
-
+   /*
+* fix .rel.dyn relocations
+*/
+   ldr r0, _TEXT_BASE  /* r0 - Text base */
+   sub r9, r7, r0  /* r9 - relocation offset */
+   ldr r10, _dynsym_start_ofs  /* r10 - sym table ofs */
+   add r10, r10, r0/* r10 - sym table in FLASH */
+   ldr r2, _rel_dyn_start_ofs  /* r2 - rel dyn start ofs */
+   add r2, r2, r0  /* r2 - rel dyn start in FLASH */
+   ldr r3, _rel_dyn_end_ofs/* r3 - rel dyn end ofs */
+   add r3, r3, r0  /* r3 - rel dyn end in FLASH */
 fixloop:
-   ldr r4, [r2]
-   sub r4, r4, r1
-   add r4, r4, r0
-   str r4, [r2]
-   add r2, r2, #4
+   ldr r0, [r2]/* r0 - location to fix up, IN FLASH! */
+   add r0, r9  /* r0 - location to fix up in RAM */
+   ldr r1, [r2, #4]
+   and r8, r1, #0xff
+   cmp r8, #23 /* relative fixup? */
+   beq fixrel
+   cmp r8, #2  /* absolute fixup? */
+   beq fixabs
+   /* ignore unknown type of fixup */
+   b   fixnext
+fixabs:
+   /* absolute fix: set location to (offset) symbol value */
+   mov r1, r1, LSR #4  /* r1 - symbol index in .dynsym */
+   add r1, r10, r1 /* r1 - address of symbol in table */
+   ldr r1, [r1, #4]/* r1 - symbol value */
+   add r1, r9  /* r1 - relocated sym addr */
+   b   fixnext
+fixrel:
+   /* relative fix: increase location by offset */
+   ldr r1, [r0]
+   add r1, r1, r9
+fixnext:
+   str r1, [r0]
+   add r2, r2, #8  /* each rel.dyn entry is 8 bytes */
cmp r2, r3
-   bne fixloop
+   ble fixloop
 #endif
 #endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */
 
 clear_bss:
 #ifndef CONFIG_PRELOADER
-   ldr r0, _bss_start
-   ldr r1, _bss_end
+   ldr r0, _bss_start_ofs
+

Re: [U-Boot] [PATCH 3/4] MX51: Add video support

2010-10-12 Thread Wolfgang Denk
Dear Stefano Babic,

In message 1286875504-9058-4-git-send-email-sba...@denx.de you wrote:
 Add framebuffer driver for the MX51 processor
 working on the IPUv3 internal graphic processor.

Please add reference to original sources.


 +/*
 + * Allocates the DRAM memory for the frame buffer.  This buffer is 
 remapped
 + * into a non-cached, non-buffered, memory region to allow palette and pixel
 + * writes to occur without flushing the cache.  Once this area is remapped,
 + * all virtual memory access to the video memory should occur at the new 
 region.

Is this comment still valid for the U-Boot port?  

Does it work with both dcache on and dcache off settings?


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
It is dangerous to be right on a subject  on  which  the  established
authorities are wrong.-- Voltaire
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] MX51: Add video support to vision2 board

2010-10-12 Thread Wolfgang Denk
Dear Stefano Babic,

In message 1286875504-9058-5-git-send-email-sba...@denx.de you wrote:
 The patch adds support for LCD to the vision board.
...

 +#define CONFIG_PREBOOT

Normally one defines a default command here ?

 +#define CONFIG_BMP_16BPP
 +#define CMD_DISPLAY

CONFIG_CMD_DISPLAY ???

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
There is a biblical analogy I'd like to draw here.   Casts are to C++
Programmers what the apple was to Eve. - Scott Douglas Meyers
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] imx25: Fix reset

2010-10-12 Thread Matthias Weisser
This patch fixes the reset command on imx25

Signed-off-by: Matthias Weisser weiss...@arcor.de
---
 arch/arm/cpu/arm926ejs/mx25/reset.c   |   10 ++
 arch/arm/include/asm/arch-mx25/imx-regs.h |   10 +-
 2 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/mx25/reset.c 
b/arch/arm/cpu/arm926ejs/mx25/reset.c
index 1e33150..a5fd170 100644
--- a/arch/arm/cpu/arm926ejs/mx25/reset.c
+++ b/arch/arm/cpu/arm926ejs/mx25/reset.c
@@ -42,15 +42,9 @@
 void reset_cpu (ulong ignored)
 {
struct wdog_regs *regs = (struct wdog_regs *)IMX_WDT_BASE;
-   /* Disable watchdog and set Time-Out field to 0 */
-   writel (0x, regs-wcr);
 
-   /* Write Service Sequence */
-   writel (0x, regs-wsr);
-   writel (0x, regs-wsr);
-
-   /* Enable watchdog */
-   writel (WCR_WDE, regs-wcr);
+   /* Enable watchdog and set Time-Out field to 0 (0.5s timeout) */
+   writew (WCR_WDE, regs-wcr);
 
while (1) ;
 }
diff --git a/arch/arm/include/asm/arch-mx25/imx-regs.h 
b/arch/arm/include/asm/arch-mx25/imx-regs.h
index f709bd8..fe258a8 100644
--- a/arch/arm/include/asm/arch-mx25/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx25/imx-regs.h
@@ -108,11 +108,11 @@ struct gpt_regs {
 
 /* Watchdog Timer (WDOG) registers */
 struct wdog_regs {
-   u32 wcr;/* Control */
-   u32 wsr;/* Service */
-   u32 wrsr;   /* Reset Status */
-   u32 wicr;   /* Interrupt Control */
-   u32 wmcr;   /* Misc Control */
+   u16 wcr;/* Control */
+   u16 wsr;/* Service */
+   u16 wrsr;   /* Reset Status */
+   u16 wicr;   /* Interrupt Control */
+   u16 wmcr;   /* Misc Control */
 };
 
 /* IIM control registers */
-- 
1.7.0.4

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


Re: [U-Boot] [PATCH 2/4] MX51: Add IPU driver for video support

2010-10-12 Thread Stefano Babic
Wolfgang Denk wrote:
 Dear Stefano Babic,
 
 In message 1286875504-9058-3-git-send-email-sba...@denx.de you wrote:
 The patch is a porting of the IPU Linux driver
 developed by Freescale to have framebuffer
 functionalities in u-boot.
 Most features are dropped from the original driver and
 only LCD support is the goal of this porting.
 
 I don't know how close this is to the original Linux driver;
 eventually you should add a more precise reference to the original
 version in the commit message here, too.

The original driver is part of the Freescale's kernel for i.MX, based on
the vanilla kernel 2.6.31. However, the code was not sent to LKML and it
is not part of the kernel mainline.
For this reason and because I dropped a lot of parts that I thought not
useful in u-boot, this porting is not so close to the original one. I
have already tried to fix all code styling issues, but it seems I missed
a lot of them and I have to check them again. And of course, I will add
the reference to the original code, too.

 
 --- /dev/null
 +++ b/drivers/video/ipu.h
 @@ -0,0 +1,316 @@
 ...
 +typedef unsigned char bool;
 +#define true 1
 +#define false 0
 
 An, no.  Can we please drop that.

Yes, this was already in my list to drop. I missed it ;-)

 
 Incorrect multi-line comment style. Please fix globally. [or is the
 whole file a verbatim copy of the Linux file?]

No, I will fix them.

 
 
 +/* @} */
 +/* @name YUV Planar Formats */
 +/* @{ */
 
 Oops. What's that?

A comment in the original code that I cannot understand and I have to
drop ;-)

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


[U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Joakim Tjernlund
This add relocation of .got entries produced
by -fpic. -fpic produces 2-3% smaller code and
is faster. Unfortunately gcc promotes -fpic to
-fPIC when -mrelocatable is used so one need a very
small patch to gcc too(sent upstream).

Signed-off-by: Joakim Tjernlund joakim.tjernl...@transmode.se
---
 arch/powerpc/cpu/mpc83xx/start.S|   18 ++
 arch/powerpc/cpu/mpc83xx/u-boot.lds |1 +
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/cpu/mpc83xx/start.S b/arch/powerpc/cpu/mpc83xx/start.S
index c7d85a8..95ae1d8 100644
--- a/arch/powerpc/cpu/mpc83xx/start.S
+++ b/arch/powerpc/cpu/mpc83xx/start.S
@@ -69,6 +69,8 @@
  */
START_GOT
GOT_ENTRY(_GOT2_TABLE_)
+   GOT_ENTRY(_GOT_TABLE_)
+   GOT_ENTRY(_GLOBAL_OFFSET_TABLE_)
GOT_ENTRY(__bss_start)
GOT_ENTRY(_end)
 
@@ -951,6 +953,22 @@ in_ram:
stw r0,0(r3)
 2: bdnz1b
 
+   lwz r4,GOT(_GLOBAL_OFFSET_TABLE_)
+   addir4,r4,-4 /* don't write over blrl in GOT */
+   lwz r3,GOT(_GOT_TABLE_)
+   subf.   r4,r3,r4 /* r4 - r3 */
+   ble 3f
+   srwir4,r4,2 /* r4/4 */
+   mr  r5,r11
+   mtctr   r4
+   addir3,r3,-4
+1: lwzur0,4(r3)
+   cmpwi   r0,0
+   beq-2f
+   add r0,r0,r11
+   stw r0,0(r3)
+2: bdnz1b
+3:
 #ifndef CONFIG_NAND_SPL
/*
 * Now adjust the fixups and the pointers to the fixups
diff --git a/arch/powerpc/cpu/mpc83xx/u-boot.lds 
b/arch/powerpc/cpu/mpc83xx/u-boot.lds
index 0b74a13..a498a37 100644
--- a/arch/powerpc/cpu/mpc83xx/u-boot.lds
+++ b/arch/powerpc/cpu/mpc83xx/u-boot.lds
@@ -67,6 +67,7 @@ SECTIONS
   PROVIDE (erotext = .);
   .reloc   :
   {
+_GOT_TABLE_ = .;
 *(.got)
 _GOT2_TABLE_ = .;
 *(.got2)
-- 
1.7.2.2

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


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Wolfgang Denk
Dear Joakim Tjernlund,

In message 1286887081-23172-1-git-send-email-joakim.tjernl...@transmode.se 
you wrote:
 This add relocation of .got entries produced
 by -fpic. -fpic produces 2-3% smaller code and
 is faster. Unfortunately gcc promotes -fpic to
 -fPIC when -mrelocatable is used so one need a very
 small patch to gcc too(sent upstream).

What happens when one uses this patch in combination with a standard
(i. e. older, unpatched) GCC?

   START_GOT
   GOT_ENTRY(_GOT2_TABLE_)
 + GOT_ENTRY(_GOT_TABLE_)
 + GOT_ENTRY(_GLOBAL_OFFSET_TABLE_)
   GOT_ENTRY(__bss_start)
   GOT_ENTRY(_end)
  
 @@ -951,6 +953,22 @@ in_ram:
   stw r0,0(r3)
  2:   bdnz1b
  
 + lwz r4,GOT(_GLOBAL_OFFSET_TABLE_)

What exactly is _GLOBAL_OFFSET_TABLE_ good for, and how does it differ
from _GOT_TABLE_ ?

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
Perfection is reached, not when there is no longer anything  to  add,
but when there is no longer anything to take away.
   - Antoine de Saint-Exupery
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Joakim Tjernlund
Wolfgang Denk w...@denx.de wrote on 2010/10/12 14:52:18:
 
 Dear Joakim Tjernlund,
 
 In message 
1286887081-23172-1-git-send-email-joakim.tjernl...@transmode.se you 
wrote:
  This add relocation of .got entries produced
  by -fpic. -fpic produces 2-3% smaller code and
  is faster. Unfortunately gcc promotes -fpic to
  -fPIC when -mrelocatable is used so one need a very
  small patch to gcc too(sent upstream).
 
 What happens when one uses this patch in combination with a standard
 (i. e. older, unpatched) GCC?

Nothing, gcc will produce -fPIC relocs and the code will/should just work.

 
  START_GOT
  GOT_ENTRY(_GOT2_TABLE_)
  +   GOT_ENTRY(_GOT_TABLE_)
  +   GOT_ENTRY(_GLOBAL_OFFSET_TABLE_)
  GOT_ENTRY(__bss_start)
  GOT_ENTRY(_end)
  
  @@ -951,6 +953,22 @@ in_ram:
  stw   r0,0(r3)
   2:   bdnz   1b
  
  +   lwz   r4,GOT(_GLOBAL_OFFSET_TABLE_)
 
 What exactly is _GLOBAL_OFFSET_TABLE_ good for, and how does it differ
 from _GOT_TABLE_ ?

_GLOBAL_OFFSET_TABLE_ is a predefined symbol that the linker defines to
be in the middle of the -fpic GOT table. It marks the end of the GOT table
as far as we are concerned(u-boot does not generate so many relocs that 
the
linker needs to use the space above _GLOBAL_OFFSET_TABLE_)

There is no predefined symbol that marks the start of fpic relocs so
one is added(_GOT_TABLE_) by me to the linker script.

 Jocke

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


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Wolfgang Denk
Dear Joakim Tjernlund,

In message 
of4dcfbd28.58e81a84-onc12577ba.0047150b-c12577ba.0047d...@transmode.se you 
wrote:

  What happens when one uses this patch in combination with a standard
  (i. e. older, unpatched) GCC?
 
 Nothing, gcc will produce -fPIC relocs and the code will/should just work.

OK, so your change means effectively a no-op (except for the moderate
size increase in start.S) to most of us?

You mentioned -fpic was smaller and faster; do you have any numbers
for that (especailly for the faster part) ?

 _GLOBAL_OFFSET_TABLE_ is a predefined symbol that the linker defines to
 be in the middle of the -fpic GOT table. It marks the end of the GOT table
 as far as we are concerned(u-boot does not generate so many relocs that 
 the
 linker needs to use the space above _GLOBAL_OFFSET_TABLE_)
 
 There is no predefined symbol that marks the start of fpic relocs so
 one is added(_GOT_TABLE_) by me to the linker script.

OK - can you please include these explanations into the commit
message?  Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
You!  What PLANET is this!
-- McCoy, The City on the Edge of Forever, stardate 3134.0
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ppc4xx: Add CATCenter Io 405EP board support

2010-10-12 Thread Dirk Eibach
Board support for the Guntermann  Drunck CATCenter Io.

Signed-off-by: Dirk Eibach eib...@gdsys.de
---
 MAKEALL  |1 +
 Makefile |3 +
 board/gdsys/io/Makefile  |   51 ++
 board/gdsys/io/config.mk |   24 +
 board/gdsys/io/io.c  |  231 ++
 include/configs/io.h |  251 ++
 6 files changed, 561 insertions(+), 0 deletions(-)
 create mode 100644 board/gdsys/io/Makefile
 create mode 100644 board/gdsys/io/config.mk
 create mode 100644 board/gdsys/io/io.c
 create mode 100644 include/configs/io.h

diff --git a/MAKEALL b/MAKEALL
index 1b506d6..37aeed4 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -156,6 +156,7 @@ LIST_4xx=$(boards_by_cpu ppc4xx)
haleakala_nand  \
hcu4\
hcu5\
+   io  \
intip   \
kilauea \
kilauea_nand\
diff --git a/Makefile b/Makefile
index 8df60fa..86f9efa 100644
--- a/Makefile
+++ b/Makefile
@@ -1004,6 +1004,9 @@ mcu25_config:  unconfig
@mkdir -p $(obj)board/netstal/common
@$(MKCONFIG) $@ powerpc ppc4xx $(call lcname,$@) netstal
 
+io_config: unconfig
+   @$(MKCONFIG) $(@:_config=) powerpc ppc4xx io gdsys
+
 # Kilauea  Haleakala images are identical (recognized via PVR)
 kilauea_config \
 haleakala_config: unconfig
diff --git a/board/gdsys/io/Makefile b/board/gdsys/io/Makefile
new file mode 100644
index 000..1270fea
--- /dev/null
+++ b/board/gdsys/io/Makefile
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2007
+# Stefan Roese, DENX Software Engineering, s...@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS  = $(BOARD).o
+SOBJS   =
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/gdsys/io/config.mk b/board/gdsys/io/config.mk
new file mode 100644
index 000..1bdf5e4
--- /dev/null
+++ b/board/gdsys/io/config.mk
@@ -0,0 +1,24 @@
+#
+# (C) Copyright 2000
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+TEXT_BASE = 0xFFFC
diff --git a/board/gdsys/io/io.c b/board/gdsys/io/io.c
new file mode 100644
index 000..4247806
--- /dev/null
+++ b/board/gdsys/io/io.c
@@ -0,0 +1,231 @@
+/*
+ * (C) Copyright 2009
+ * Dirk Eibach,  Guntermann  Drunck GmbH, eib...@gdsys.de
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public 

Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Joakim Tjernlund
Wolfgang Denk w...@denx.de wrote on 2010/10/12 15:47:19:
 
 Dear Joakim Tjernlund,
 
 In message OF4DCFBD28.58E81A84-ONC12577BA.0047150B-C12577BA.
 0047d...@transmode.se you wrote:
 
   What happens when one uses this patch in combination with a 
standard
   (i. e. older, unpatched) GCC?
  
  Nothing, gcc will produce -fPIC relocs and the code will/should just 
work.
 
 OK, so your change means effectively a no-op (except for the moderate
 size increase in start.S) to most of us?

Yes.

 
 You mentioned -fpic was smaller and faster; do you have any numbers
 for that (especailly for the faster part) ?

No, but I can show a code fragment,

char *f()
{
return string;
}

-fPIC -mplt-bss:
.LC1:
.long .LC0
.section.text
.align 2
.globl f
.LCL0:
.long .LCTOC1-.LCF0
.type   f, @function
f:
stwu 1,-16(1)
mflr 0
bcl 20,31,.LCF0
.LCF0:
stw 30,8(1)
mflr 30
stw 0,20(1)
lwz 0,.LCL0-.LCF0(30)
add 30,0,30
lwz 0,20(1)
lwz 3,.LC1-.LCTOC1(30)
mtlr 0
lwz 30,8(1)
addi 1,1,16
blr
.LC0:
.string string
.ident  GCC: (Gentoo 4.4.4-r2 p1.2, pie-0.4.5) 4.4.4
.section.note.GNU-stack,,@progbits

-fpic -mbss-plt:
f:
stwu 1,-16(1)
mflr 12
bl _global_offset_tab...@local-4
stw 30,8(1)
mflr 30
mtlr 12
lwz 3,@got(30)
lwz 30,8(1)
addi 1,1,16
blr
.LC0:
.string string
.ident  GCC: (Gentoo 4.4.4-r2 p1.2, pie-0.4.5) 4.4.4
.section.note.GNU-stack,,@progbits

 
  _GLOBAL_OFFSET_TABLE_ is a predefined symbol that the linker defines 
to
  be in the middle of the -fpic GOT table. It marks the end of the GOT 
table
  as far as we are concerned(u-boot does not generate so many relocs 
that 
  the
  linker needs to use the space above _GLOBAL_OFFSET_TABLE_)
  
  There is no predefined symbol that marks the start of fpic relocs so
  one is added(_GOT_TABLE_) by me to the linker script.
 
 OK - can you please include these explanations into the commit
 message?  Thanks.

Will do.

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


Re: [U-Boot] [PATCH 3/4] MX51: Add video support

2010-10-12 Thread stefano babic
Wolfgang Denk wrote:
 Dear Stefano Babic,
 
 In message 1286875504-9058-4-git-send-email-sba...@denx.de you wrote:
 Add framebuffer driver for the MX51 processor
 working on the IPUv3 internal graphic processor.
 
 Please add reference to original sources.

Ok

 
 
 +/*
 + * Allocates the DRAM memory for the frame buffer.  This buffer is 
 remapped
 + * into a non-cached, non-buffered, memory region to allow palette and pixel
 + * writes to occur without flushing the cache.  Once this area is remapped,
 + * all virtual memory access to the video memory should occur at the new 
 region.
 
 Is this comment still valid for the U-Boot port?  

No, it is not. The comment makes no sense for u-boot. There is no
allocation and malloc is not called, as the memory for the framebuffer
is taken from the lcd_base variable.

 
 Does it work with both dcache on and dcache off settings?

Well, as there is not yet support for L2-Cache on the MX51, we can say
yes ;-). However, this range of memory is used directly from the IPU
processor and not by the CPU, as well as in Linux without calling any
function to invalidate the cache. But I agree, it should be tested again
when support for L2-cache will be integrated.

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 4/4] MX51: Add video support to vision2 board

2010-10-12 Thread stefano babic
Am 12.10.2010 13:37, schrieb Wolfgang Denk:
 Dear Stefano Babic,
 
 In message 1286875504-9058-5-git-send-email-sba...@denx.de you wrote:
 The patch adds support for LCD to the vision board.
 ...
 
 +#define CONFIG_PREBOOT
 
 Normally one defines a default command here ?

Probably I misunderstand its usage, but my intention is to enable the
PREBOOT feature, but let the user to decide with the preboot variable
if it is required or not. In my case for this board, I use it to load an
image from a NAND device, as splashimage can be used only with an address.

In common/main.c:

#ifdef CONFIG_PREBOOT
if ((p = getenv (preboot)) != NULL) {

So I need to set this config even without a value if I would like to use
it later setting the preboot variable.

 
 +#define CONFIG_BMP_16BPP
 +#define CMD_DISPLAY
 
 CONFIG_CMD_DISPLAY ???

This is wrong ! Thanks, I forget to remove it.

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] ppc4xx: Add CATCenter Io 405EP board support

2010-10-12 Thread Wolfgang Denk
Dear Dirk Eibach,

In message 1286890387-11491-1-git-send-email-eib...@gdsys.de you wrote:
 Board support for the Guntermann  Drunck CATCenter Io.
 
 Signed-off-by: Dirk Eibach eib...@gdsys.de
 ---
  MAKEALL  |1 +
  Makefile |3 +
  board/gdsys/io/Makefile  |   51 ++
  board/gdsys/io/config.mk |   24 +
  board/gdsys/io/io.c  |  231 ++
  include/configs/io.h |  251 
 ++
  6 files changed, 561 insertions(+), 0 deletions(-)
  create mode 100644 board/gdsys/io/Makefile
  create mode 100644 board/gdsys/io/config.mk
  create mode 100644 board/gdsys/io/io.c
  create mode 100644 include/configs/io.h

Entry to MAINTAINERS missing.

 diff --git a/MAKEALL b/MAKEALL
 index 1b506d6..37aeed4 100755
 --- a/MAKEALL
 +++ b/MAKEALL
 @@ -156,6 +156,7 @@ LIST_4xx=$(boards_by_cpu ppc4xx)
   haleakala_nand  \
   hcu4\
   hcu5\
 + io  \
   intip   \
   kilauea \
   kilauea_nand\

Please keep lists sorted.

 diff --git a/Makefile b/Makefile
 index 8df60fa..86f9efa 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -1004,6 +1004,9 @@ mcu25_config:  unconfig
   @mkdir -p $(obj)board/netstal/common
   @$(MKCONFIG) $@ powerpc ppc4xx $(call lcname,$@) netstal
  
 +io_config: unconfig
 + @$(MKCONFIG) $(@:_config=) powerpc ppc4xx io gdsys
 +

NAK. We don't accept entries to Makefile any more. Please add your
board description to boards.cfg instead.

And remember to keep lists sorted.

 +int configure_gbit_phy(unsigned char addr)
 +{
 + unsigned short value;
 +
 + if (miiphy_write(GBIT_PHY_NAME, addr, 0x16, 0x0002))
 + goto err_out;
 + if (miiphy_write(GBIT_PHY_NAME, addr, 0x1a, 0x800a))
 + goto err_out;
 + if (miiphy_write(GBIT_PHY_NAME, addr, 0x16, 0x))
 + goto err_out;
 + if (miiphy_read(GBIT_PHY_NAME, addr, 0x10, value))
 + goto err_out;
 + if (miiphy_write(GBIT_PHY_NAME, addr, 0x10, value  ~0x0004))
 + goto err_out;
 + if (miiphy_write(GBIT_PHY_NAME, addr, 0x00, 0x9140))
 + goto err_out;

You might want to replace all these magic constants with some
#defines, and add some comments what you're actually doing.

 + while (!(in_le16((void *)(CONFIG_SYS_LATCH_BASE + 0x200))  0x0010));

Semicolon onnew line, please.

 + /*
 +  * wait for fpga out of reset
 +  */
 + while (1) {
 + fpga_set_reg(REG_REFELECTION_LOW, REFLECTION_TESTPATTERN);
 + if (fpga_get_reg(REG_REFELECTION_HIGH) ==
 + REFLECTION_TESTPATTERN_INV)
 + break;
 + }

What happens if this loop does not terminate? Maybe a timeout and
error message would be helpful?

 + char *s = getenv(serial#);
 + u16 versions = fpga_get_reg(REG_VERSIONS);
 + u16 fpga_version = fpga_get_reg(REG_FPGA_VERSION);
 + u16 fpga_features = fpga_get_reg(REG_FPGA_FEATURES);
 + unsigned unit_type = (versions  0xf000)  12;
 + unsigned hardware_version = versions  0x000f;
 + unsigned feature_channels = fpga_features  0x007f;
 + unsigned feature_expansion = fpga_features  (115);

Please separate declarations and code.  A few initializations may be
ok, but this is unreadable.

 + printf(, expansion %ssupported, feature_expansion ?  : un);
 +
 + puts(\n);

Why not include the newline in the printf() format string ?

 diff --git a/include/configs/io.h b/include/configs/io.h
 new file mode 100644
 index 000..53dce7d
 --- /dev/null
 +++ b/include/configs/io.h
 @@ -0,0 +1,251 @@
 +/*
 + * (C) Copyright 2009
 + * Dirk Eibach,  Guntermann  Drunck GmbH, eib...@gdsys.de

2009?

+
 +#define CONFIG_PHY_ADDR  4   /* PHY address  
 */
 +#define CONFIG_HAS_ETH0
 +#define CONFIG_HAS_ETH1
 +#define CONFIG_PHY1_ADDR 0xc /* EMAC1 PHY address*/
 +#define CONFIG_PHY_CLK_FREQEMAC_STACR_CLK_66MHZ

Please use TABs for vertical alignment.

 +/*
 + * I2C stuff
 + */
 +#define CONFIG_SYS_I2C_SPEED 10  /* I2C speed and slave address*/

Comment wrong? I don't see a slave address here.

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
Unix is like a toll road on which you have to stop every 50  feet  to
pay another nickel. But hey! You only feel 5 cents poorer each time.
 - Larry Wall in 1992aug13.192357.15...@netlabs.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/4] MX51: Add video support

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

In message 4cb4776d.8050...@denx.de you wrote:

  Does it work with both dcache on and dcache off settings?
 
 Well, as there is not yet support for L2-Cache on the MX51, we can say
 yes ;-). However, this range of memory is used directly from the IPU
 processor and not by the CPU, as well as in Linux without calling any
 function to invalidate the cache. But I agree, it should be tested again
 when support for L2-cache will be integrated.

What about L1 cache?  Have Heiko's chache patches been adapted for MX5
yet?

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
When the bosses talk about improving  productivity,  they  are  never
talking about themselves.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3] [NEXT] da830: fixup ARM relocation support

2010-10-12 Thread Nick Thompson
On 23/09/10 10:32, Nick Thompson wrote:
 Fixes build breakage in da830evm after commit
 97003756249bd790910417eb66f0039bbf06a02c da8xx: fixup ARM
 relocation support
 
 The da8xx fixup commit changed da830/da850 common code to make
 relocation work in da850, but didn't add the required defines
 to da830evm_config.h resulting in build failure in the common code.
 
 This patch adds those defines for da830, but makes no sense without
 also referring to the commit mentioned above.
 
 Signed-off-by: Nick Thompson nick.thomp...@ge.com
 Reviewed-by: Ben Gardiner bengardi...@nanometrics.ca
 ---
 Changes since v1:
 removed CONFIG_SKIP_RELOCATE_UBOOT
 
 Changes since v2:
 removed #undef CONFIG_SYS_ARM_WITHOUT_RELOC as it is not defined
 in the first place.
 
  include/configs/da830evm.h |   11 ---
  1 files changed, 8 insertions(+), 3 deletions(-)

Hi Sandeep,

Does this patch need to go through the TI tree? It brings da830 in
line with da850.

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


Re: [U-Boot] [PATCH] drivers/net/fec_mxc.c: write mac address in init

2010-10-12 Thread John Rigby
On Wed, Sep 8, 2010 at 2:11 PM, John Rigby john.ri...@linaro.org wrote:
 call fec_set_hwaddr in init routine to setup MAC address
 so when ethaddr is set late the change will propagate to the hw

 Signed-off-by: John Rigby john.ri...@linaro.org

Ben, can this fix go into the next release?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4] MX51: Add video support to vision2 board

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

In message 4cb479a1.6060...@denx.de you wrote:

  Normally one defines a default command here ?
 
 Probably I misunderstand its usage, but my intention is to enable the
 PREBOOT feature, but let the user to decide with the preboot variable
 if it is required or not. In my case for this board, I use it to load an
 image from a NAND device, as splashimage can be used only with an address.

No, you did not misinderstand. Everything is fine if this was your
intention.  I just wantred to make that sure, as most people define
some default command here.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
We fight only when there is no other choice. We prefer  the  ways  of
peaceful contact.
-- Kirk, Spectre of the Gun, stardate 4385.3
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ppc4xx: Add CATCenter Io 405EP board support

2010-10-12 Thread Stefan Roese
Hi Dirk,

On Tuesday 12 October 2010 15:33:07 Dirk Eibach wrote:
 Board support for the Guntermann  Drunck CATCenter Io.

Apart from Wolfgangs comments, some more from myself below.
 
 diff --git a/include/configs/io.h b/include/configs/io.h
 new file mode 100644
 index 000..53dce7d
 --- /dev/null
 +++ b/include/configs/io.h

snip

 +/* Gbit PHYs */
 +#define CONFIG_BITBANGMII/* bit-bang MII PHY management  */
 +
 +#define CONFIG_SYS_MDIO_PIN  (0x8000  13)   /* our MDIO is GPIO0 
*/
 +#define CONFIG_SYS_MDC_PIN   (0x8000  7)/* our MDC  is GPIO7  
*/
 +
 +#define MDIO_ACTIVE  out32(GPIO0_TCR, in32(GPIO0_TCR) |
 CONFIG_SYS_MDIO_PIN)

Use out_be32() accessors here and below.

Please fix and resubmit. Thanks.

Cheers,
Stefan

--
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] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Scott Wood
On Tue, 12 Oct 2010 15:04:31 +0200
Joakim Tjernlund joakim.tjernl...@transmode.se wrote:

 _GLOBAL_OFFSET_TABLE_ is a predefined symbol that the linker defines to
 be in the middle of the -fpic GOT table. It marks the end of the GOT table
 as far as we are concerned(u-boot does not generate so many relocs that 
 the
 linker needs to use the space above _GLOBAL_OFFSET_TABLE_)
 
 There is no predefined symbol that marks the start of fpic relocs so
 one is added(_GOT_TABLE_) by me to the linker script.

Maybe call it _GOT_START_ or similar?  _GLOBAL_OFFSET_TABLE_ and
_GOT_TABLE_[1] look like synonyms.

-Scott

[1] Global offset table table? :-)

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


Re: [U-Boot] U-boot hangs at command prompt if unattended for sometime (30 seconds)

2010-10-12 Thread StephenPaulraj Chinnadurai-ERS,HCLTech
Original Message-
From: Marek Vasut [mailto:marek.va...@gmail.com] 
Sent: Tuesday, October 05, 2010 1:50 PM
To: StephenPaulraj Chinnadurai-ERS,HCLTech
Cc: u-boot@lists.denx.de
Subject: Re: U-boot hangs at command prompt if unattended for sometime (30 
seconds)

Dne Út 5. října 2010 05:11:45 StephenPaulraj Chinnadurai-ERS,HCLTech napsal(a):
 Hi Marek,
 
 I have modified the Voipac PXA270 u-boot source code for my customized
 board. Everything is working fine except suspend/resume. When in u-boot
 prompt, if unattended for some time (30 seconds), the u-boot hangs. The
 u-boot is not taking any input from the keyboard, the only way to resume
 the u-boot is through controller reset.

Does the CPU hang? or does it end in some other than svc mode ? or what ?
U-boot didn't display the exception, fiq or irq messages. I think the 
controller goes into sleep mode.
 
 Which part of the u-boot source code I should concentrate/modify to come of
 this issue?

Hardware ...
The PXA270 controller is connected to the TPS65021 power management IC. Is 
there any possibility the TPS65021 IC will place the PXA270 in sleep mode.

But I wonder, when I engage the u-boot by:
1. downloading 50MB files through tftp 
2. copying the 50MB files from SDRAM to Flash

which take more than 5 minutes the u-boot is not going to sleep but only when 
kept idle for 30 seconds it is going to sleep.

Is it going to sleep mode or it is some other problem? How to debug it ?

 
 Thanks and Regards
 Stephen Paulraj C
 
 
 
 DISCLAIMER:
 ---
 
 
 The contents of this e-mail and any attachment(s) are confidential and
 intended for the named recipient(s) only. It shall not attach any
 liability on the originator or HCL or its affiliates. Any views or
 opinions presented in this email are solely those of the author and may
 not necessarily reflect the opinions of HCL or its affiliates. Any form of
 reproduction, dissemination, copying, disclosure, modification,
 distribution and / or publication of this message without the prior
 written consent of the author of this e-mail is strictly prohibited. If
 you have received this email in error please delete it and notify the
 sender immediately. Before opening any mail and attachments please check
 them for viruses and defect.
 
 ---
 

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


Re: [U-Boot] U-boot hangs at command prompt if unattended for sometime (30 seconds)

2010-10-12 Thread StephenPaulraj Chinnadurai-ERS,HCLTech
Ignore my previous mail because prefix is not proper.

 -Original Message-
 From: Marek Vasut [mailto:marek.va...@gmail.com]
 Sent: Tuesday, October 05, 2010 1:50 PM
 To: StephenPaulraj Chinnadurai-ERS,HCLTech
 Cc: u-boot@lists.denx.de
 Subject: Re: U-boot hangs at command prompt if unattended for sometime (30
 seconds)
 
 Dne Út 5. října 2010 05:11:45 StephenPaulraj Chinnadurai-ERS,HCLTech
 napsal(a):
  Hi Marek,
 
  I have modified the Voipac PXA270 u-boot source code for my customized
  board. Everything is working fine except suspend/resume. When in u-boot
  prompt, if unattended for some time (30 seconds), the u-boot hangs. The
  u-boot is not taking any input from the keyboard, the only way to resume
  the u-boot is through controller reset.
 
 Does the CPU hang? or does it end in some other than svc mode ? or what ?


U-boot didn't display the exception, fiq or irq messages. I think the 
controller goes into sleep mode.

 
  Which part of the u-boot source code I should concentrate/modify to come
 of
  this issue?
 
 Hardware ...

The PXA270 controller is connected to the TPS65021 power management IC. Is 
there any possibility the TPS65021 IC will place the PXA270 in sleep mode.

But I wonder, when I engage the u-boot by:
1. downloading 50MB files through tftp
2. copying the 50MB files from SDRAM to Flash

which take more than 5 minutes the u-boot is not going to sleep but only when 
kept idle for 30 seconds it is going to sleep.

Is it going to sleep mode or it is some other problem? How to debug it?

 
  Thanks and Regards
  Stephen Paulraj C
 
 
 
  DISCLAIMER:
  
 ---
  
 
  The contents of this e-mail and any attachment(s) are confidential and
  intended for the named recipient(s) only. It shall not attach any
  liability on the originator or HCL or its affiliates. Any views or
  opinions presented in this email are solely those of the author and may
  not necessarily reflect the opinions of HCL or its affiliates. Any form
 of
  reproduction, dissemination, copying, disclosure, modification,
  distribution and / or publication of this message without the prior
  written consent of the author of this e-mail is strictly prohibited. If
  you have received this email in error please delete it and notify the
  sender immediately. Before opening any mail and attachments please check
  them for viruses and defect.
 
  
 ---
  

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


[U-Boot] [PATCH 0/5] da850evm NAND support

2010-10-12 Thread Ben Gardiner
This patch series adds NAND support to the da850evm. The support is in the
spirit of that found in the omap-l1 and u-boot-davinci trees where NAND support
can be enabled with the addition of a single '#define CONFIG_USE_NAND' to the 
top of the include/configs/da850evm.h file. Pinmux entries are added for NAND
so that NAND is usable even when the boot mode is not from NAND. Also the 
mtdpart, ubi and ubifs commands are proposed to be added to the NAND support 
because of their importance when using NAND.

Ben Gardiner (5):
  davinci_nand, trivial : use symbolic ECC start command
  da850evm : enable NAND even when not in NAND boot mode
  da850evm: setup the NAND flash timings
  da850evm: setup NAND support under CONFIG_USE_NAND
  da850evm: add mtdpart and ubi commands with NAND support

 board/davinci/da8xxevm/da850evm.c |   40 +
 drivers/mtd/nand/davinci_nand.c   |3 +-
 include/configs/da850evm.h|   37 ++
 3 files changed, 79 insertions(+), 1 deletions(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] da850evm : enable NAND even when not in NAND boot mode

2010-10-12 Thread Ben Gardiner
There is currently no NAND pinmux enabled by the da850evm board setup code.
This is fine when booting from NAND since the early boot code (UBL) will setup
the pinmux; however, when the boot mode is any other setting NAND is unusable
when enabled in the config.

This patch adds a pinmux list for NAND and enables it when NAND is enabled in
the config. Tested by booting from SPI on the da850evm and verifying NAND
was usable.

Signed-off-by: Ben Gardiner bengardi...@nanometrics.ca
CC: Nick Thompson nick.thomp...@ge.com
To: Sudhakar Rajashekhara sudhakar@ti.com

---

Note: there is precendent for NAND configuration by u-boot independent of the
selected boot mode; see commit 26be2c53d671ecfd3e0483f0870649ac28322293 by
Nick Thompson nick.thomp...@ge.com Davinci: NAND enable ECC even when not in
NAND boot mode

---

 board/davinci/da8xxevm/da850evm.c |   22 ++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/board/davinci/da8xxevm/da850evm.c 
b/board/davinci/da8xxevm/da850evm.c
index eeb456c..f84adb9 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -54,12 +54,34 @@ static const struct pinmux_config i2c_pins[] = {
{ pinmux(4), 2, 3 }
 };
 
+#ifdef CONFIG_NAND_DAVINCI
+const struct pinmux_config nand_pins[] = {
+   { pinmux(7), 1, 1 },
+   { pinmux(7), 1, 2 },
+   { pinmux(7), 1, 4 },
+   { pinmux(7), 1, 5 },
+   { pinmux(9), 1, 0 },
+   { pinmux(9), 1, 1 },
+   { pinmux(9), 1, 2 },
+   { pinmux(9), 1, 3 },
+   { pinmux(9), 1, 4 },
+   { pinmux(9), 1, 5 },
+   { pinmux(9), 1, 6 },
+   { pinmux(9), 1, 7 },
+   { pinmux(12), 1, 5 },
+   { pinmux(12), 1, 6 }
+};
+#endif
+
 static const struct pinmux_resource pinmuxes[] = {
 #ifdef CONFIG_SPI_FLASH
PINMUX_ITEM(spi1_pins),
 #endif
PINMUX_ITEM(uart_pins),
PINMUX_ITEM(i2c_pins),
+#ifdef CONFIG_NAND_DAVINCI
+   PINMUX_ITEM(nand_pins),
+#endif
 };
 
 static const struct lpsc_resource lpsc[] = {
-- 
1.7.0.4

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


[U-Boot] [PATCH] davinci_nand, trivial : use symbolic ECC start command

2010-10-12 Thread Ben Gardiner
The ECC calculations were started by writing 1  13 to the nand FCR register;
that value is also defined as DAVINCI_NANDFCR_4BIT_CALC_START in emif_defs.h.

This patch substitutes the macro DAVINCI_NANDFCR_4BIT_CALC_START for the
magic number '1  13'.

Signed-off-by: Ben Gardiner bengardi...@nanometrics.ca
CC: Sandeep Paulraj s-paul...@ti.com
To: Scott Wood scottw...@freescale.com

---

 drivers/mtd/nand/davinci_nand.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index c5a86d6..d41579c 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -481,7 +481,8 @@ static int nand_davinci_4bit_correct_data(struct mtd_info 
*mtd, uint8_t *dat,
 * Set the addr_calc_st bit(bit no 13) in the NAND Flash Control
 * register to 1.
 */
-   __raw_writel(1  13, davinci_emif_regs-nandfcr);
+   __raw_writel(DAVINCI_NANDFCR_4BIT_CALC_START,
+   davinci_emif_regs-nandfcr);
 
/*
 * Wait for the corr_state field (bits 8 to 11) in the
-- 
1.7.0.4

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


[U-Boot] [PATCH] da850evm: setup NAND support under CONFIG_USE_NAND

2010-10-12 Thread Ben Gardiner
The current da850evm config is missing the pieces for NAND support that can be
found in the u-boot-davinci tree [1].

This patch adds NAND support in the spirit of the support in the u-boot-davinci
tree where NAND support for the da850evm can be enabled by putting a single
'#define CONFIG_USE_NAND' at the top of the include/configs/da850evm.h file.

[1] http://arago-project.org/git/people/?p=sandeep/u-boot-davinci.git;a=tree

Signed-off-by: Ben Gardiner bengardi...@nanometrics.ca
CC: Sandeep Paulraj s-paul...@ti.com
To: Sudhakar Rajashekhara sudhakar@ti.com

---

 include/configs/da850evm.h |   29 +
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index d02b196..c96d45a 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -79,6 +79,29 @@
 #define CONFIG_SYS_I2C_SLAVE   10 /* Bogus, master-only in U-Boot */
 
 /*
+ * Flash  Environment
+ */
+#ifdef CONFIG_USE_NAND
+#undef CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_NAND_DAVINCI
+#define CONFIG_SYS_NO_FLASH
+#define CONFIG_ENV_IS_IN_NAND  /* U-Boot env in NAND Flash  */
+#define CONFIG_ENV_OFFSET  0x0 /* Block 0--not used by bootcode */
+#define CONFIG_ENV_SIZE(128  10)
+#defineCONFIG_SYS_NAND_USE_FLASH_BBT
+#define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
+#defineCONFIG_SYS_NAND_PAGE_2K
+#define CONFIG_SYS_NAND_CS 3
+#define CONFIG_SYS_NAND_BASE   DAVINCI_ASYNC_EMIF_DATA_CE3_BASE
+#define CONFIG_SYS_CLE_MASK0x10
+#define CONFIG_SYS_ALE_MASK0x8
+#undef CONFIG_SYS_NAND_HW_ECC
+#define CONFIG_SYS_MAX_NAND_DEVICE 1 /* Max number of NAND devices */
+#define NAND_MAX_CHIPS 1
+#define DEF_BOOTM  
+#endif
+
+/*
  * U-Boot general configuration
  */
 #define CONFIG_BOOTFILEuImage /* Boot file name */
@@ -127,6 +150,12 @@
 #undef CONFIG_CMD_PING
 #endif
 
+#ifdef CONFIG_USE_NAND
+#undef CONFIG_CMD_FLASH
+#undef CONFIG_CMD_IMLS
+#define CONFIG_CMD_NAND
+#endif
+
 #if !defined(CONFIG_USE_NAND)  \
!defined(CONFIG_USE_NOR)  \
!defined(CONFIG_USE_SPIFLASH)
-- 
1.7.0.4

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


[U-Boot] [PATCH] da850evm: setup the NAND flash timings

2010-10-12 Thread Ben Gardiner
The default NAND flash timings are very conservative. This patch assigns the
timings reccomended in the recent linux kernel patch [1] from Sekhar Nori. The
speedup, as reported in that patch, is greater than 5x for reads.

[1] http://www.spinics.net/lists/arm-kernel/msg100278.html

Signed-off-by: Ben Gardiner bengardi...@nanometrics.ca
CC: Sekhar Nori nsek...@ti.com
To: Sudhakar Rajashekhara sudhakar@ti.com

---

 board/davinci/da8xxevm/da850evm.c |   18 ++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/board/davinci/da8xxevm/da850evm.c 
b/board/davinci/da8xxevm/da850evm.c
index f84adb9..0eb9e29 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -24,6 +24,7 @@
 #include common.h
 #include i2c.h
 #include asm/arch/hardware.h
+#include asm/arch/emif_defs.h
 #include asm/io.h
 #include ../common/misc.h
 #include common.h
@@ -98,6 +99,23 @@ int board_init(void)
irq_init();
 #endif
 
+
+#ifdef CONFIG_NAND_DAVINCI
+   /*
+* NAND CS setup - cycle counts based on da850evm NAND timings in the
+* Linux kernel @ 25MHz EMIFA
+*/
+   writel((DAVINCI_ABCR_WSETUP(0) |
+   DAVINCI_ABCR_WSTROBE(0) |
+   DAVINCI_ABCR_WHOLD(0) |
+   DAVINCI_ABCR_RSETUP(0) |
+   DAVINCI_ABCR_RSTROBE(1) |
+   DAVINCI_ABCR_RHOLD(0) |
+   DAVINCI_ABCR_TA(0) |
+   DAVINCI_ABCR_ASIZE_8BIT),
+  davinci_emif_regs-ab2cr); /* CS3 */
+#endif
+
/* arch number of the board */
gd-bd-bi_arch_number = MACH_TYPE_DAVINCI_DA850_EVM;
 
-- 
1.7.0.4

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


[U-Boot] [PATCH] da850evm: add mtdpart and ubi commands with NAND support

2010-10-12 Thread Ben Gardiner
This patch enables also the mtdpart, ubi and ubifs commands when NAND support
is enabled.

Signed-off-by: Ben Gardinerbengardi...@nanometrics.ca
To: Sudhakar Rajashekhara sudhakar@ti.com
Signed-off-by: Ben Gardiner bengardi...@nanometrics.ca

---

 include/configs/da850evm.h |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index c96d45a..49dfc06 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -154,6 +154,14 @@
 #undef CONFIG_CMD_FLASH
 #undef CONFIG_CMD_IMLS
 #define CONFIG_CMD_NAND
+
+#define CONFIG_CMD_MTDPARTS
+#define CONFIG_MTD_DEVICE
+#define CONFIG_MTD_PARTITIONS
+#define CONFIG_LZO
+#define CONFIG_RBTREE
+#define CONFIG_CMD_UBI
+#define CONFIG_CMD_UBIFS
 #endif
 
 #if !defined(CONFIG_USE_NAND)  \
-- 
1.7.0.4

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


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Joakim Tjernlund
Scott Wood scottw...@freescale.com wrote on 2010/10/12 17:52:58:
 
 On Tue, 12 Oct 2010 15:04:31 +0200
 Joakim Tjernlund joakim.tjernl...@transmode.se wrote:
 
  _GLOBAL_OFFSET_TABLE_ is a predefined symbol that the linker defines 
to
  be in the middle of the -fpic GOT table. It marks the end of the GOT 
table
  as far as we are concerned(u-boot does not generate so many relocs 
that 
  the
  linker needs to use the space above _GLOBAL_OFFSET_TABLE_)
  
  There is no predefined symbol that marks the start of fpic relocs so
  one is added(_GOT_TABLE_) by me to the linker script.
 
 Maybe call it _GOT_START_ or similar?  _GLOBAL_OFFSET_TABLE_ and
 _GOT_TABLE_[1] look like synonyms.

hmm, the other reloc syms are named _GOT2_TABLE_ and
_FIXUP_TABLE_ so I think I should follow that.

 
 -Scott
 
 [1] Global offset table table? :-)

 :)

Figured I should mention that I have added -msingle-pic-base(from ARM) 
which
works nicely with -fpic(not sure if -fPIC is possible) and reduces size 
even more:
 
size u-boot-before
   textdata bss dec hex filename
 2305956580   24228  261403   3fd1b u-boot
size u-boot-after
   textdata bss dec hex filename
 2227796580   24228  253587   3de93 u-boot

If you have 8 KB free DPRAM/cache one can move the GOT tables there
while in flash and create true PIC 

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


[U-Boot] hi.. i am new to uboot concept..

2010-10-12 Thread dakshayini A
hi..
 i wanted to know where exactly.. the MAC address.. set in uboot
code where can i find those files...how.can.i   read MAC adress from
flash..i am using 6280 ubootlader version.please guide me..


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


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Kim Phillips
On Tue, 12 Oct 2010 16:10:33 +0200
Joakim Tjernlund joakim.tjernl...@transmode.se wrote:

 Wolfgang Denk w...@denx.de wrote on 2010/10/12 15:47:19:
  
  Dear Joakim Tjernlund,
  
  In message OF4DCFBD28.58E81A84-ONC12577BA.0047150B-C12577BA.
  0047d...@transmode.se you wrote:
  
What happens when one uses this patch in combination with a 
 standard
(i. e. older, unpatched) GCC?
   
   Nothing, gcc will produce -fPIC relocs and the code will/should just 
 work.
  
  OK, so your change means effectively a no-op (except for the moderate
  size increase in start.S) to most of us?
 
 Yes.

that moderate size increase in start.S breaks nand builds:

Configuring for MPC8313ERDB_NAND_66 board...
start.o:(.got2+0x4): undefined reference to `_GOT_TABLE_'
make[1]: *** [/home/r1aaha/git/u-boot/nand_spl/u-boot-spl] Error 1

...

Configuring for MPC8315ERDB_NAND board...
powerpc-linux-gnu-ld: NAND bootstrap too big
powerpc-linux-gnu-ld: NAND bootstrap too big
start.o:(.got2+0x4): undefined reference to `_GOT_TABLE_'
make[1]: *** [/home/r1aaha/git/u-boot/nand_spl/u-boot-spl] Error 1

(I'm using powerpc-linux-gnu-gcc (Sourcery G++ Lite 4.3-74) 4.3.2 atm).

Kim

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


Re: [U-Boot] [PATCH 2/3] nand: introduce CONFIG_NAND_EARLY_INIT and nand_early_init()

2010-10-12 Thread Ben Gardiner
Hello Mike,

I tested this patch series with da850evm plus NAND support; I can
confirm that the #warning is issued as expected; furthermore that when
configured with environment specified by env.oob the board boots and
obtains its environment, as expected , both with '#undef
CONFIG_NAND_MAYBE_EARLY_INIT and #define CONFIG_NAND_EARLY_INIT

Tested-by: Ben Gardiner bengardi...@nanometrics.ca

Just one little nitpick:

On Sun, Oct 10, 2010 at 6:40 AM, Mike Frysinger vap...@gentoo.org wrote:
[snip]
 diff --git a/drivers/mtd/nand/nand.c b/drivers/mtd/nand/nand.c
 index 4a63d5c..a8a6292 100644
 --- a/drivers/mtd/nand/nand.c
 +++ b/drivers/mtd/nand/nand.c
 @@ -77,6 +77,10 @@ static void nand_init_chip(struct mtd_info *mtd, struct 
 nand_chip *nand,

  }

 +#if defined(CONFIG_NAND_MAYBE_EARLY_INIT)  !defined(CONFIG_NAND_EARLY_INIT)
 +# warning Please read CONFIG_NAND_MAYBE_EARLY_INIT in 
 doc/feature-removal-schedule.txt

checkpatch warns line over 80 characters

Best Regards,
Ben Gardiner

---
Nanometrics Inc.
http://www.nanometrics.ca
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] U-boot hangs at command prompt if unattended for sometime (30 seconds)

2010-10-12 Thread Wolfgang Denk
Dear StephenPaulraj Chinnadurai-ERS,HCLTech,

In message 
ec921d4b77c99b4eb3cedaffcf17d5f7420f3e4...@chn-hclt-evs07.hclt.corp.hcl.in 
you wrote:

 The PXA270 controller is connected to the TPS65021 power management IC. Is
 there any possibility the TPS65021 IC will place the PXA270 in sleep mode.

Well, you probably know your hardware design much better than we. How
should we know how your unknown (to us) hardware running unknown (to
us) code might (mis-) behave?

 Is it going to sleep mode or it is some other problem? How to debug it?

Submit your patches for inclusion into mainline; the peer review that
then takes place usually discovers some problems you might be
missing...

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
What can it profit a man to gain the whole world and to come  to  his
property with a gastric ulcer, a blown prostate, and bifocals?
 -- John Steinbeck, _Cannery Row_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Wolfgang Denk
Dear Scott Wood,

In message 20101012105258.37208...@udp111988uds.am.freescale.net you wrote:

 Maybe call it _GOT_START_ or similar?  _GLOBAL_OFFSET_TABLE_ and
 _GOT_TABLE_[1] look like synonyms.
...
 [1] Global offset table table? :-)

Yeah.  Please display the GOT table on the LCD display ;-)

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
Ever try. Ever fail. No matter. Try again. Fail again.  Fail  better.
-- S. Beckett
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Scott Wood
On Tue, 12 Oct 2010 12:31:25 -0500
Kim Phillips kim.phill...@freescale.com wrote:

 that moderate size increase in start.S breaks nand builds:
 
 Configuring for MPC8313ERDB_NAND_66 board...
 start.o:(.got2+0x4): undefined reference to `_GOT_TABLE_'
 make[1]: *** [/home/r1aaha/git/u-boot/nand_spl/u-boot-spl] Error 1

I don't think that's the size increase (though that might end up being
an issue as well), but rather the NAND SPL linker script needs to be
updated with _GOT_TABLE_.

-Scott

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


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Albert ARIBAUD
Le 12/10/2010 19:11, Joakim Tjernlund a écrit :

 Figured I should mention that I have added -msingle-pic-base(from ARM)
 which
 works nicely with -fpic(not sure if -fPIC is possible) and reduces size
 even more:

Since you seem to be following the same path as I did on ARM, I may as 
well ask: did you try removing -fPIC and -msingle-pic-base from compile 
options and adding -pie to the link options instead?

Link option -pie generates ELF relocation and, on ARM at least, does a 
better job than GOT reloc, which does not fix handle pointers in 
initialized data while ELF reloc fixes them.

And since ELF reloc does not modify code (it is a linker option), you 
end up with the same size for text+data+rodata. You do have a bigger 
FLASH image though, because the ELF reloc tables are bigger than the GOT 
table; but you can git rid of them / not copy them to RAM once relocated.

The move from -fPIC to ELF on ARM can be looked for in the elf_reloc 
branch of the u-boot-arm repo.

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


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Joakim Tjernlund
Kim Phillips kim.phill...@freescale.com wrote on 2010/10/12 19:31:25:
 
 On Tue, 12 Oct 2010 16:10:33 +0200
 Joakim Tjernlund joakim.tjernl...@transmode.se wrote:
 
  Wolfgang Denk w...@denx.de wrote on 2010/10/12 15:47:19:
   
   Dear Joakim Tjernlund,
   
   In message OF4DCFBD28.58E81A84-ONC12577BA.0047150B-C12577BA.
   0047d...@transmode.se you wrote:
   
 What happens when one uses this patch in combination with a 
  standard
 (i. e. older, unpatched) GCC?

Nothing, gcc will produce -fPIC relocs and the code will/should 
just 
  work.
   
   OK, so your change means effectively a no-op (except for the 
moderate
   size increase in start.S) to most of us?
  
  Yes.
 
 that moderate size increase in start.S breaks nand builds:
 
 Configuring for MPC8313ERDB_NAND_66 board...
 start.o:(.got2+0x4): undefined reference to `_GOT_TABLE_'
 make[1]: *** [/home/r1aaha/git/u-boot/nand_spl/u-boot-spl] Error 1

ehh, these got there own linker scripts it seems
I could #ifdef NAND_SPL I guess?
Or possbly select one of GUT/GOT2 based on
#if __pic__ == 1

 
 
 ...
 
 Configuring for MPC8315ERDB_NAND board...
 powerpc-linux-gnu-ld: NAND bootstrap too big
 powerpc-linux-gnu-ld: NAND bootstrap too big
 start.o:(.got2+0x4): undefined reference to `_GOT_TABLE_'
 make[1]: *** [/home/r1aaha/git/u-boot/nand_spl/u-boot-spl] Error 1

How much is missing?

One thing I wonder about: How come NAND_SPL need GOT2 relocs
but no FIXUPs? I figured either none or both.

Jocke
 
 (I'm using powerpc-linux-gnu-gcc (Sourcery G++ Lite 4.3-74) 4.3.2 atm).
 
 Kim
 

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


Re: [U-Boot] [PATCH] [NEXT] arm, relocation: fix typo in comment

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

In message 1285157193-21717-1-git-send-email...@denx.de you wrote:
 Signed-off-by: Heiko Schocher h...@denx.de
 ---
  include/configs/imx27lite-common.h |2 +-
  include/configs/km_arm.h   |2 +-
  include/configs/omap3_beagle.h |2 +-
  include/configs/qong.h |2 +-
  include/configs/tx25.h |2 +-
  5 files changed, 5 insertions(+), 5 deletions(-)

Applied to u-boot-arm, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
That Microsoft, the Trabant of the operating  system  world,  may  be
glancing  over the Berlin Wall at the Audis and BMWs and Mercedes. In
their own universe Trabants and Ladas were mainstream too...
   -- Evan Leibovitch
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH][NEXT] arm-reloc: don't undef CONFIG_SYS_ARM_WITHOUT_RELOC

2010-10-12 Thread Wolfgang Denk
Dear Ben Gardiner,

In message 1285191169-32552-1-git-send-email-bengardi...@nanometrics.ca you 
wrote:
 There were some #undef's of CONFIG_SYS_ARM_WITHOUT_RELOC added to a few board
 configs as part of the arm relocation series; but these are not needed now as 
 we
 do not #undef what is not #defined in the first place.
 
 Signed-off-by: Ben Gardiner bengardi...@nanometrics.ca
 CC: Heiko Schocher h...@denx.de
 
 ---
  include/configs/da850evm.h |1 -
  include/configs/imx27lite-common.h |1 -
  include/configs/omap3_beagle.h |1 -
  include/configs/qong.h |1 -
  include/configs/tx25.h |1 -
  5 files changed, 0 insertions(+), 5 deletions(-)

Aplied to u-boot-arm, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
To be sure of hitting the target, shoot first and, whatever you  hit,
call it the target.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] [NEW_RELOC] arm1136, qong: add support for ELF relocations

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

In message 4cb478d4.3030...@free.fr you wrote:
 Le 12/10/2010 13:31, Heiko Schocher a écrit :
  Signed-off-by: Wolfgang Denkw...@denx.de
  Signed-off-by: Heiko Schocherh...@denx.de
  ---

 I assume this is [ELF_RELOC], not [NEW_RELOC], right? I'm asking because
 using the same tag for all elf_reloc branch related patches makes it
 easier to find them all back.

  diff --git a/arch/arm/cpu/arm1136/u-boot.lds 
  b/arch/arm/cpu/arm1136/u-boot.lds

  +   __dynsym_start = .;
  +   .dynsym : { *(.dynsym) }
  +
  __got_start = .;
  . = ALIGN(4);
  .got : { *(.got) }

 Do you need to keep .got in the linker file? I think it can be removed.

 You could also add

   /DISCARD/ : { *(.dynstr*) }
   /DISCARD/ : { *(.dynamic*) }
   /DISCARD/ : { *(.plt*) }
   /DISCARD/ : { *(.interp*) }
   /DISCARD/ : { *(.gnu*) }

 At the end of the sections statement.

Agreed.

Heiko, can you please retest / resubmit?  Thanks.

  diff --git a/include/configs/qong.h b/include/configs/qong.h

  +#defineCONFIG_RELOC_FIXUP_WORKS

 I believe this is now common to all ARMs, hence unneeded in config files.

This should then be done for all board, i. e. in a separate commit.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The day-to-day travails of the IBM programmer are so amusing to  most
of us who are fortunate enough never to have been one - like watching
Charlie Chaplin trying to cook a shoe.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Pull request u-boot-marvell.git

2010-10-12 Thread Wolfgang Denk
Dear Prafulla Wadaskar,

In message f766e4f80769bd478052fb6533fa745d19a69e2...@sc-vexch4.marvell.com 
you wrote:
 
 The following changes since commit d778a2fbb360530395dfbc0dbe1f80b7bf959028=
 :
   Albert Aribaud (1):
 orion5x: fix relocation-incompatible code
 
 are available in the git repository at:
 
   u-boot-marvell.git master branch
 
 Albert Aribaud (2):
   mvsata_ide: adjust port init sequence
   orion5x: optimize window size computation
 
 Prafulla Wadaskar (4):
   Kirkwood: print_cpuinfo fixed for valid devid revid
   Kirkwood: dram_init is moved to dram.c
   kirkwood: added common config file mv-common.h
   Kirkwood: Changes specific to ARM relocation support
 
  arch/arm/cpu/arm926ejs/kirkwood/cpu.c   |   34 +++-
  arch/arm/cpu/arm926ejs/kirkwood/dram.c  |   38 
  arch/arm/cpu/arm926ejs/orion5x/cpu.c|   32 ++-
  arch/arm/include/asm/arch-kirkwood/cpu.h|2 +
  board/Marvell/guruplug/guruplug.c   |   11 -
  board/Marvell/mv88f6281gtw_ge/mv88f6281gtw_ge.c |   11 -
  board/Marvell/openrd_base/openrd_base.c |   11 -
  board/Marvell/rd6281a/rd6281a.c |   11 -
  board/Marvell/sheevaplug/sheevaplug.c   |   11 -
  drivers/block/mvsata_ide.c  |   42 -
  include/configs/guruplug.h  |  103 +--
  include/configs/keymile-common.h|1 +
  include/configs/mv-common.h |  230 +++=
 
  include/configs/mv88f6281gtw_ge.h   |  120 ++---
  include/configs/openrd_base.h   |  146 +--
  include/configs/rd6281a.h   |  101 +-
  include/configs/sheevaplug.h|  104 +--
  17 files changed, 389 insertions(+), 619 deletions(-)
  create mode 100644 include/configs/mv-common.h

Applied to u-boot-arm, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The glory of creation is in its infinite diversity. And in the way
our differences combine to create meaning and beauty.
-- Dr. Miranda Jones and Spock, Is There in Truth No Beauty?,
   stardate 5630.8
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Joakim Tjernlund
 
 Le 12/10/2010 19:11, Joakim Tjernlund a écrit :
 
  Figured I should mention that I have added -msingle-pic-base(from ARM)
  which
  works nicely with -fpic(not sure if -fPIC is possible) and reduces 
size
  even more:
 
 Since you seem to be following the same path as I did on ARM, I may as 
 well ask: did you try removing -fPIC and -msingle-pic-base from compile 
 options and adding -pie to the link options instead?

looked at it briefly but -pie is really massive. Each access needs
a reloc entry, even if they access the same data.

 
 Link option -pie generates ELF relocation and, on ARM at least, does a 
 better job than GOT reloc, which does not fix handle pointers in 
 initialized data while ELF reloc fixes them.

on ppc -mrelocatable does the job for you and adds fixup relocs.
It a simple addon that should be fairly easy to add to other archs too.

 
 And since ELF reloc does not modify code (it is a linker option), you 

ehh, I think you need to reloc directly in the text segment.

 end up with the same size for text+data+rodata. You do have a bigger 
 FLASH image though, because the ELF reloc tables are bigger than the GOT 

 table; but you can git rid of them / not copy them to RAM once 
relocated.

I don't think RAM is as much as a problem as flash is.

 
 The move from -fPIC to ELF on ARM can be looked for in the elf_reloc 
 branch of the u-boot-arm repo.

Yes, but I believe the ppc way is smaller once -fpic and -msingle-pic-base
are used(In flash anyway).
Also, I don't think you will be able to do true PIC in the
future without PIC code.

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


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Kim Phillips
On Tue, 12 Oct 2010 19:41:56 +0200
Joakim Tjernlund joakim.tjernl...@transmode.se wrote:

 Kim Phillips kim.phill...@freescale.com wrote on 2010/10/12 19:31:25:
  that moderate size increase in start.S breaks nand builds:
  
  Configuring for MPC8313ERDB_NAND_66 board...
  start.o:(.got2+0x4): undefined reference to `_GOT_TABLE_'
  make[1]: *** [/home/r1aaha/git/u-boot/nand_spl/u-boot-spl] Error 1
 
 ehh, these got there own linker scripts it seems
 I could #ifdef NAND_SPL I guess?
 Or possbly select one of GUT/GOT2 based on
 #if __pic__ == 1

I think NAND_SPL would be clearer, assuming no other differences are
involved.

  Configuring for MPC8315ERDB_NAND board...
  powerpc-linux-gnu-ld: NAND bootstrap too big
  powerpc-linux-gnu-ld: NAND bootstrap too big
  start.o:(.got2+0x4): undefined reference to `_GOT_TABLE_'
  make[1]: *** [/home/r1aaha/git/u-boot/nand_spl/u-boot-spl] Error 1
 
 How much is missing?

I can't tell due to the undefined reference error.

 One thing I wonder about: How come NAND_SPL need GOT2 relocs
 but no FIXUPs? I figured either none or both.

I don't know; apparently FIXUPs aren't needed?

Kim

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


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Scott Wood
On Tue, 12 Oct 2010 13:19:38 -0500
Kim Phillips kim.phill...@freescale.com wrote:

 On Tue, 12 Oct 2010 19:41:56 +0200
 Joakim Tjernlund joakim.tjernl...@transmode.se wrote:
 
  Kim Phillips kim.phill...@freescale.com wrote on 2010/10/12 19:31:25:
   that moderate size increase in start.S breaks nand builds:
   
   Configuring for MPC8313ERDB_NAND_66 board...
   start.o:(.got2+0x4): undefined reference to `_GOT_TABLE_'
   make[1]: *** [/home/r1aaha/git/u-boot/nand_spl/u-boot-spl] Error 1
  
  ehh, these got there own linker scripts it seems
  I could #ifdef NAND_SPL I guess?
  Or possbly select one of GUT/GOT2 based on
  #if __pic__ == 1
 
 I think NAND_SPL would be clearer, assuming no other differences are
 involved.

Why?  The type of PIC is the distinction.  If it can be determined with
__pic__, wouldn't that also avoid the extra code being present in the
main U-Boot if an older toolchain is used and we end up with -fPIC?
And there could be other types of SPL besides NAND.

The linker scripts for NAND SPL would still have to be updated, though,
or else wouldn't it break with a new toolchain that actually uses
-fpic?  I assume we're not passing different flags when building the
SPL.

-Scott

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


Re: [U-Boot] Pull request: nand flash

2010-10-12 Thread Wolfgang Denk
Dear Scott Wood,

In message 20101011203442.ga8...@udp111988uds.am.freescale.net you wrote:
 The following changes since commit bfc7bea6adc46e1db2f5a5e3464d7652ed67c864:
   Wolfgang Denk (1):
 Merge branch 'master' of git://git.denx.de/u-boot-x86
 
 are available in the git repository at:
 
   git://git.denx.de/u-boot-nand-flash.git master
 
 Ben Gardiner (5):
   mtdparts: regroup calls to get_mtd_device_nm
   mtd: add an mtd method for get_len_incl_bad()
   mtdparts: show net size in mtdparts list
   mtdparts: add new sub-command spread
   mtdparts: new add.spread: add part skipping bad blocks
 
 Enric Balletbo i Serra (1):
   mtd: OneNAND: add support for OneNAND manufactured by Numonyx
 
 Scott Wood (7):
   nand util: read/write: accept unaligned length
   cmd_nand: some infrastructure fixes and refactoring
   nand erase: .spread, .part, .chip subcommands
   nand commands: make only dump repeatable.
   nand: remove dead code and suspend/resume
   Followup fixes on the mtdparts spread patchset
   README: Add new NAND env features
 
  README |   32 +++-
  common/cmd_mtdparts.c  |  261 
  common/cmd_nand.c  |  339 
 +++-
  drivers/mtd/mtdcore.c  |   44 +
  drivers/mtd/mtdpart.c  |   16 --
  drivers/mtd/nand/nand_base.c   |  245 +--
  drivers/mtd/nand/nand_bbt.c|   19 --
  drivers/mtd/nand/nand_ecc.c|   17 --
  drivers/mtd/nand/nand_util.c   |  159 +-
  drivers/mtd/onenand/onenand_base.c |1 +
  include/linux/mtd/mtd.h|8 +-
  include/linux/mtd/onenand.h|1 +
  include/nand.h |7 +-
  13 files changed, 606 insertions(+), 543 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
My play was a complete success.  The audience was a failure.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] da850evm: fix linux bootparam address

2010-10-12 Thread Ben Gardiner
Dear Sudhakar,

On Wed, Sep 22, 2010 at 12:45 PM, Ben Gardiner
bengardi...@nanometrics.ca wrote:
 This patch fixes the LINUX_BOOT_PARAM_ADDR define to be based off of
 PHYS_SDRAM_1 instead of CONFIG_SYS_MEMTEST_START. On da830 they are the same
 thing but on da850 the CONFIG_SYS_MEMSTART define is offset from the
 PHYS_SDRAM_1 start.

 Without this patch it is not possible to boot linux on da850 -- bootm hangs
 at Uncompressing Linux... done, booting the kernel.

 Signed-off-by: Ben Gardiner bengardi...@nanometrics.ca
 CC: Sudhakar Rajashekhara sudhakar@ti.com

I just noticed today that there is a patch committed [1] in the
u-boot-davinci tree (Sandeep Paulraj, the maintainer, has been added
to the cc) which does the same as this patch and also predates it. I
am sorry: I was unaware of the da850 changes in that tree when I
worked on this and other patches. In my defense, the description of
that repo is DaVinci DM3xx/DM6446 U-Boot integration/staging tree.
Whereas I had been porting changes from the u-boot-omapl1 tree [2]
which is described as the DA8xx/OMAP-L1xx U-Boot integration/staging
tree.

Also relevant are the following patches where you have made changes to
the u-boot-davinci tree which predate the changes I have submitted for
2010.12: da850: Enable Davinci EMAC driver [3] which predates my
[PATCH v6 2/2][NEXT] da850evm: basic MII EMAC support. [4] The
changes here are very similar except for the differences resulting
from my implementing the davinci_eth_set_mac_addr extraction as
requested by Ben Warren (on the CC since I am singling him out).

I apologize for being oblivious to the integration efforts in that
tree. I would very much like to see more complete da850 support in
2010.12 -- how would you like to proceed? I am happy to withdraw the
patches and review/test any that you post in their place.

Best Regards,
Ben Gardiner

[1] 
http://arago-project.org/git/people/?p=sandeep/u-boot-davinci.git;a=commit;h=5e2c1cea799c6dfb4b91eb86ba204983d2199fd1
[2] http://arago-project.org/git/projects/?p=u-boot-omapl1.git;a=summary
[3] 
http://arago-project.org/git/people/?p=sandeep/u-boot-davinci.git;a=commit;h=97696ddf76cf10b2a5ac670a638b5120a2a6657f
[4] http://www.mail-archive.com/u-boot@lists.denx.de/msg38461.html

---
Nanometrics Inc.
http://www.nanometrics.ca
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Kim Phillips
On Tue, 12 Oct 2010 13:25:40 -0500
Scott Wood scottw...@freescale.com wrote:

 On Tue, 12 Oct 2010 13:19:38 -0500
 Kim Phillips kim.phill...@freescale.com wrote:
 
  On Tue, 12 Oct 2010 19:41:56 +0200
  Joakim Tjernlund joakim.tjernl...@transmode.se wrote:
  
   Kim Phillips kim.phill...@freescale.com wrote on 2010/10/12 19:31:25:
that moderate size increase in start.S breaks nand builds:

Configuring for MPC8313ERDB_NAND_66 board...
start.o:(.got2+0x4): undefined reference to `_GOT_TABLE_'
make[1]: *** [/home/r1aaha/git/u-boot/nand_spl/u-boot-spl] Error 1
   
   ehh, these got there own linker scripts it seems
   I could #ifdef NAND_SPL I guess?
   Or possbly select one of GUT/GOT2 based on
   #if __pic__ == 1
  
  I think NAND_SPL would be clearer, assuming no other differences are
  involved.
 
 Why?  The type of PIC is the distinction.  If it can be determined with
 __pic__, wouldn't that also avoid the extra code being present in the
 main U-Boot if an older toolchain is used and we end up with -fPIC?
 And there could be other types of SPL besides NAND.

that's true - I was going for more reader consistency wrt the current
code.

 The linker scripts for NAND SPL would still have to be updated, though,
 or else wouldn't it break with a new toolchain that actually uses
 -fpic?  I assume we're not passing different flags when building the
 SPL.

we're not.

Kim

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


Re: [U-Boot] Pull request - net

2010-10-12 Thread Wolfgang Denk
Dear Ben Warren,

In message 4cb402a0.7040...@gmail.com you wrote:
 
 
 Wolfgang,
 
 The following changes since commit bfc7bea6adc46e1db2f5a5e3464d7652ed67c864:
Wolfgang Denk (1):
  Merge branch 'master' of git://git.denx.de/u-boot-x86
 
 are available in the git repository at:
 
git://git.denx.de/u-boot-net.git master
 
 Andreas Bießmann (2):
drivers/net/at91_emac.c: increase timeout for autonegotiation
drivers/net/at91_emac.c: change return values
 
 Ben Gardiner (1):
davinci_emac: davinci_eth_set_mac_addr to -write_hwaddr
 
 Ben Warren (1):
Net: Remove redundant CONFIG_NET_MULTI directives
 
 Ilya Yanok (1):
mpc5xxx_fec: add call to reset_phy() after PHY initialization
 
 Joakim Tjernlund (4):
net: Fix faulty definition of uec_initialize()
UEC: Don't udelay needlessly
UEC PHY: Remove strange 0.5 sec delay
UEC PHY: Speed up initial PHY neg.
 
 Michal Simek (2):
net: Fix emaclite driver to support little-endian microblaze
net: Move Emaclite to NET_MULTI
 
 Peter Tyser (1):
rarp: Condtionally compile rarp support
 
 Reinhard Meyer (1):
NET: add ENC28J60 driver using SPI framework
 
 Reinhard Meyer (-VC) (1):
NET: move legacy enc28j60.c to sidetrack as enc28j60_lpc2292.c
 
 Thomas Chou (1):
smc9: add write_hwaddr
 
   arch/arm/include/asm/arch-davinci/emac_defs.h |1 -
   arch/arm/lib/board.c  |   19 -
   board/davinci/common/misc.c   |   41 +-
   board/davinci/common/misc.h   |2 +-
   board/davinci/da8xxevm/da830evm.c |   12 +-
   board/davinci/dm365evm/dm365evm.c |2 +-
   board/davinci/dvevm/dvevm.c   |2 +-
   board/davinci/sffsdr/sffsdr.c |2 +-
   board/davinci/sonata/sonata.c |2 +-
   common/cmd_net.c  |2 +
   drivers/net/Makefile  |1 +
   drivers/net/at91_emac.c   |   20 +-
   drivers/net/davinci_emac.c|   80 +-
   drivers/net/enc28j60.c| 1548 
 -
   drivers/net/enc28j60.h|  251 
   drivers/net/enc28j60_lpc2292.c|  983 
   drivers/net/mpc5xxx_fec.c |7 +
   drivers/net/smc9.c|   40 +-
   drivers/net/xilinx_emaclite.c |   88 +-
   drivers/qe/uec.c  |4 +-
   drivers/qe/uec_phy.c  |   10 +-
   include/config_cmd_all.h  |1 +
   include/configs/SMN42.h   |2 +-
   include/configs/lpc2292sodimm.h   |2 +-
   include/netdev.h  |4 +-
   net/Makefile  |2 +-
   net/eth.c |   16 +-
   net/net.c |   11 +-
   28 files changed, 2192 insertions(+), 963 deletions(-)
   create mode 100644 drivers/net/enc28j60.h
   create mode 100644 drivers/net/enc28j60_lpc2292.c

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Too many people are ready to carry the stool when the piano needs  to
be moved.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Pull request - microblaze

2010-10-12 Thread Wolfgang Denk
Dear Michal Simek,

In message 4cb406ba.6030...@monstr.eu you wrote:
 
 The following changes since commit bfc7bea6adc46e1db2f5a5e3464d7652ed67c864:
   Wolfgang Denk (1):
 Merge branch 'master' of git://git.denx.de/u-boot-x86
 
 are available in the git repository at:
 
   git://www.denx.de/git/u-boot-microblaze.git master
 
 Michal Simek (3):
   microblaze: Fix microblaze-generic config file
   microblaze: Add support for NET_MULTI api
   microblaze: Support little-endian microblaze target
 
 Stephan Linz (2):
   microblaze: generic: adding DHCP support
   microblaze: generic: rename MTD partition set to 'flash-0'
 
  arch/microblaze/cpu/start.S|   60 +-
  arch/microblaze/include/asm/byteorder.h|4 +
  arch/microblaze/lib/board.c|   12 +-
  .../xilinx/microblaze-generic/microblaze-generic.c |   13 +
  include/configs/microblaze-generic.h   |  236 
 +++-
  5 files changed, 207 insertions(+), 118 deletions(-)

Thanks.

Umm.. this does not include the 3rd patch by Stephan Linz:

microblaze: generic: enable FDT support

Any reason for that?

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
Just think of a computer as hardware you can program.
- Nigel de la Tierre
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2010-10-12 Thread Wolfgang Denk
Dear Stefan Roese,

In message 201010120901.57611...@denx.de you wrote:
 
   git://www.denx.de/git/u-boot-cfi-flash.git master
 
 John Schmoller (1):
   cfi_flash: Fix Unknown FLASH error message
 
  drivers/mtd/cfi_flash.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Conscious is when you are aware of something, and conscience is  when
you wish you weren't.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] CONFIG_CMD_JFFS2 is not necessary to use mtdparts on erase protect on/off

2010-10-12 Thread Wolfgang Denk
Dear Alexander Stein,

In message 
1281538084-10062-1-git-send-email-alexander.st...@systec-electronic.com you 
wrote:
 The include jffs2/jffs2.h is still necessary though.
 
 Signed-off-by: Alexander Stein alexander.st...@systec-electronic.com
 ---
  common/cmd_flash.c |   12 ++--
  1 files changed, 6 insertions(+), 6 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The first thing we do is kill all the lawyers.
(Shakespeare. II Henry VI, Act IV, scene ii)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/2] fdt_support: support adding EDID property to FDT display nodes

2010-10-12 Thread Wolfgang Denk
Dear Anatolij Gustschin,

In message 1282123520-25823-1-git-send-email-ag...@denx.de you wrote:
 Boards can pass display timing info for drivers using EDID
 block. Provide common function to add board specific EDID
 data to the device tree. Subsequent patch makes use of this
 functionality.
 
 Detailed timing descriptor data from EDID is used for
 programming the display controller. This is currently
 implemented on the Linux side by the fsl-diu-fb frame
 buffer driver and it is documented there in
 Documentation/powerpc/dts-bindings/fsl/diu.txt.
 
 Signed-off-by: Anatolij Gustschin ag...@denx.de
 Acked-by: Detlev Zundel d...@denx.de
 Cc: Gerald Van Baren vanba...@cideas.com
 ---
 v2:
  - improve commit message as suggested by Detlev
  - add Acked-by line
 
  common/fdt_support.c  |   29 +
  include/fdt_support.h |1 +
  2 files changed, 30 insertions(+), 0 deletions(-)

Applied.


Jerry, hope it's OK with you that I pulled this directly.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
I still miss my ex-wife, but my aim is getting better.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 2/2] pdm360ng: add EDID property to FDT display node

2010-10-12 Thread Wolfgang Denk
Dear Anatolij Gustschin,

In message 1282059962-9001-1-git-send-email-ag...@denx.de you wrote:
 PDM360NG board uses this functionality to pass display
 timing info to the Linux Framebuffer driver.
 
 Signed-off-by: Anatolij Gustschin ag...@denx.de
 ---
 v2:
  - added howto comment explaining the generation of
EDID data block.
 
  board/pdm360ng/pdm360ng.c |   43 +++
  1 files changed, 43 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
I distrust all systematisers, and avoid them. The will  to  a  system
shows a lack of honesty.
- Friedrich Wilhelm Nietzsche _Götzen-Dämmerung [The Twilight of  the
Idols]_ ``Maxims and Missiles'' no. 26
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/2 v5][U-BOOT] Zoom3: Add support for OMAP3630 Zoom3 board.

2010-10-12 Thread Wolfgang Denk
Dear Martinez, Aldo,

In message dfef307e035c8647b119e6a60db62d4a01c8177...@dlee02.ent.ti.com you 
wrote:
 
I am not supposed to be adding this patch below
http://www.mail-archive.com/u-boot@lists.denx.de/msg34906.html
   
I will need an ACK from the responsible custodian.
  
   Who would that be?
  
  I believe that would be you Wolfgang.
  
  You have ACK'ed serial patches before that touch common code.
 Gentle reminder :)

oops. sorry.

Acked-by: Wolfgang Denk w...@denx.de

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
You get a wonderful view from the point of no return.
- Terry Pratchett, _Making_Money_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Joakim Tjernlund
Scott Wood scottw...@freescale.com wrote on 2010/10/12 20:25:40:
 
 On Tue, 12 Oct 2010 13:19:38 -0500
 Kim Phillips kim.phill...@freescale.com wrote:
 
  On Tue, 12 Oct 2010 19:41:56 +0200
  Joakim Tjernlund joakim.tjernl...@transmode.se wrote:
  
   Kim Phillips kim.phill...@freescale.com wrote on 2010/10/12 
19:31:25:
that moderate size increase in start.S breaks nand builds:

Configuring for MPC8313ERDB_NAND_66 board...
start.o:(.got2+0x4): undefined reference to `_GOT_TABLE_'
make[1]: *** [/home/r1aaha/git/u-boot/nand_spl/u-boot-spl] Error 1
   
   ehh, these got there own linker scripts it seems
   I could #ifdef NAND_SPL I guess?
   Or possbly select one of GUT/GOT2 based on
   #if __pic__ == 1
  
  I think NAND_SPL would be clearer, assuming no other differences are
  involved.
 
 Why?  The type of PIC is the distinction.  If it can be determined with
 __pic__, wouldn't that also avoid the extra code being present in the
 main U-Boot if an older toolchain is used and we end up with -fPIC?
 And there could be other types of SPL besides NAND.

The PIC type can be different for various files but u-boot
doesn't do that and I don't see why it should so we should
be fine.

 
 The linker scripts for NAND SPL would still have to be updated, though,
 or else wouldn't it break with a new toolchain that actually uses
 -fpic?  I assume we're not passing different flags when building the
 SPL.

Yes, it is a simple symbol to add. I will do it twm if you don't
beat me to it. it would be nice if you could try what works
and not though.

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


Re: [U-Boot] [PATCH v2 1/2] fdt_support: support adding EDID property to FDT display nodes

2010-10-12 Thread Jerry Van baren
On 10/12/2010 3:06 PM, Wolfgang Denk wrote:
 Dear Anatolij Gustschin,

 In message1282123520-25823-1-git-send-email-ag...@denx.de  you wrote:

[snip]

 Signed-off-by: Anatolij Gustschinag...@denx.de
 Acked-by: Detlev Zundeld...@denx.de
 Cc: Gerald Van Barenvanba...@cideas.com
 ---
 v2:
   - improve commit message as suggested by Detlev
   - add Acked-by line

   common/fdt_support.c  |   29 +
   include/fdt_support.h |1 +
   2 files changed, 30 insertions(+), 0 deletions(-)

 Applied.


 Jerry, hope it's OK with you that I pulled this directly.

Yes, thanks.

 Best regards,
 Wolfgang Denk

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


Re: [U-Boot] [PATCH v3] Add generic support for samsung s3c2440

2010-10-12 Thread Wolfgang Denk
Dear Minkyu Kang,

In message 4c768b8b.5000...@diagraph.com C Nauman wrote:
 This patch adds generic support for the Samsung s3c2440 processor.

 Global s3c24x0 changes to struct members converting from upper case
 to to lower case.

 Signed-off-by: Craig Nauman cnau...@diagraph.com
 Cc: kevin.morf...@fearnside-systems.co.uk

 ---
  - v3 Fixup style problems checkpatch.pl yields one error from David's name
  - v2 Fix global s3c24x0 struct members to lower case as requested by Minkyu
  - v1 Start from patch posted by Kevin Morfitt 2009-06-19

  arch/arm/cpu/arm920t/s3c24x0/speed.c|   31 +-
  arch/arm/cpu/arm920t/s3c24x0/timer.c|   23 +-
  arch/arm/cpu/arm920t/s3c24x0/usb.c  |   10 +-
  arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c |   12 +-
  arch/arm/include/asm/arch-s3c24x0/s3c2440.h |  163 ++
  arch/arm/include/asm/arch-s3c24x0/s3c24x0.h |  672 +-- 
 
  arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h |2 +
  board/mpl/vcma9/vcma9.c |   41 +-
  board/samsung/smdk2400/smdk2400.c   |   28 +-
  board/samsung/smdk2410/smdk2410.c   |   36 +-
  board/sbc2410x/sbc2410x.c   |   44 +-
  board/trab/cmd_trab.c   |   28 +-
  board/trab/rs485.c  |   40 +-
  board/trab/trab.c   |   67 ++--
  board/trab/trab_fkt.c   |  142 +++---
  board/trab/tsc2000.c|   39 +-
  board/trab/tsc2000.h|   86 ++--
  board/trab/vfd.c|   90 ++--
  drivers/i2c/s3c24x0_i2c.c   |  102 ++--
  drivers/mtd/nand/s3c2410_nand.c |   25 +-
  drivers/rtc/s3c24x0_rtc.c   |   52 +-
  drivers/serial/serial_s3c24x0.c |   26 +-
  22 files changed, 1019 insertions(+), 740 deletions(-)
  create mode 100644 arch/arm/include/asm/arch-s3c24x0/s3c2440.h

Do you have this patch still on your queue?

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
Mistakes are often the stepping stones to utter failure.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Joakim Tjernlund
Kim Phillips kim.phill...@freescale.com wrote on 2010/10/12 20:19:38:
 
 On Tue, 12 Oct 2010 19:41:56 +0200
 Joakim Tjernlund joakim.tjernl...@transmode.se wrote:
 
  Kim Phillips kim.phill...@freescale.com wrote on 2010/10/12 
19:31:25:
   that moderate size increase in start.S breaks nand builds:
 
  One thing I wonder about: How come NAND_SPL need GOT2 relocs
  but no FIXUPs? I figured either none or both.
 
 I don't know; apparently FIXUPs aren't needed?

Fixups are needed unless your link address == load address.
I guess you link at the load address? If so
you should not need to relocate the GOT either.

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


Re: [U-Boot] [PATCH 1/2] zlib/gunzip: Use WATCHDOG_RESET macro

2010-10-12 Thread Wolfgang Denk
Dear Stefan Roese,

In message 1283952898-4247-1-git-send-email...@denx.de you wrote:
 As usually done in U-Boot, the watchdog_reset code is called via a
 macro (WATCHDOG_RESET). In zlib.c this was done differently, by using
 a function pointer which is initialized with WATCHDOG_RESET upon watchdog
 usage or with NULL otherwise. This patch now uses the plain
 WATCHDOG_RESET macros to call the function resulting in slightly smaller
 U-Boot images and simpler code.
 
 U-Boot code size reduction:
 
 PowerPC board with watchdog support (lwmon5):
 - 80 bytes smaller image size
 
 PowerPC board without watchdog support (sequoia):
 - 112 bytes smaller image size
 
 Signed-off-by: Stefan Roese s...@denx.de
 Cc: Detlev Zundel d...@denx.de
 Cc: Wolfgang Denk w...@denx.de
 ---
  lib/gunzip.c |5 -
  lib/zlib.c   |   10 --
  2 files changed, 4 insertions(+), 11 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
You could end up being oddly sad and full of a strange, diffuse  com-
passion  which would lead you to believe that it might be a good idea
to wipe out the whole human race and start again with amoebas.
 - Terry Pratchett, _Guards! Guards!_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2 v2] zlib: Add further watchdog reset calls

2010-10-12 Thread Wolfgang Denk
Dear Stefan Roese,

In message 1283952931-4406-1-git-send-email...@denx.de you wrote:
 Patch 253cb831 [zlib: add watchdog reset call] added already a few
 watchdog reset calls to the new zlib U-Boot port. But on some boards
 this is not enough. Additional calls are needed on boards with
 short watchdog timeouts.
 
 This was detected and tested on the lwmon5 board with a very short
 watchdog timeout. Without this patch, the board resets during Linux
 kernel decompression. With it, the decompression succeeds.
 
 Signed-off-by: Stefan Roese s...@denx.de
 Cc: Detlev Zundel d...@denx.de
 ---
 v2:
 - Changed to use WATCHDOG_RESET macro instead of function pointer
 
  lib/zlib.c |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
If God wanted me to touch my toes, he'd have put them on my knees.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Joakim Tjernlund
 
 Yes, it is a simple symbol to add. I will do it twm if you don't
 beat me to it. it would be nice if you could try what works
 and not though.

Could not wait, does this work for you?

diff --git a/nand_spl/board/freescale/mpc8313erdb/u-boot.lds 
b/nand_spl/board/freescale/mpc8313erdb/u-boot.lds
index ad82589..1a3e44f 100644
--- a/nand_spl/board/freescale/mpc8313erdb/u-boot.lds
+++ b/nand_spl/board/freescale/mpc8313erdb/u-boot.lds
@@ -38,6 +38,8 @@ SECTIONS
.data : {
*(.data*)
*(.sdata*)
+   _GOT_TABLE_ = .;
+   *(.got)
_GOT2_TABLE_ = .;
*(.got2)
__got2_entries = (. - _GOT2_TABLE_)  2;

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


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Scott Wood
On Tue, 12 Oct 2010 21:13:19 +0200
Joakim Tjernlund joakim.tjernl...@transmode.se wrote:

 Kim Phillips kim.phill...@freescale.com wrote on 2010/10/12 20:19:38:
  
  On Tue, 12 Oct 2010 19:41:56 +0200
  Joakim Tjernlund joakim.tjernl...@transmode.se wrote:
  
   Kim Phillips kim.phill...@freescale.com wrote on 2010/10/12 
 19:31:25:
that moderate size increase in start.S breaks nand builds:
  
   One thing I wonder about: How come NAND_SPL need GOT2 relocs
   but no FIXUPs? I figured either none or both.
  
  I don't know; apparently FIXUPs aren't needed?
 
 Fixups are needed unless your link address == load address.
 I guess you link at the load address? If so
 you should not need to relocate the GOT either.

We do need to relocate with NAND SPL.  We start in the NAND buffer,
but we have to move to RAM to free up the buffer for loading the rest
of U-Boot.

-Scott

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


Re: [U-Boot] [PATCH 1/2 V3] mmc: add boundary check for mmc operation

2010-10-12 Thread Wolfgang Denk
Dear Andy,

In message 2a3dcf3da181ad40bde86a3150b27b6b0316062...@dbde02.ent.ti.com 
Sukumar Ghorai wrote:
...
 I found the problem. It's a eMMC size calculation is wrong and here is the
 fix I am sending as a patch too in my next email.

 From: Sukumar Ghorai s-gho...@ti.com
 Date: Mon, 20 Sep 2010 18:29:29 +0530
 Subject: [PATCH 1/3] fix for eMMC capacity calculation

   capacity of the eMMC device available in ext-CSD register only

 Signed-off-by: Sukumar Ghorai s-gho...@ti.com
 ---
 drivers/mmc/mmc.c |   11 +++
  1 files changed, 11 insertions(+), 0 deletions(-)

Is this patch on your queue?

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
Here's a fish hangs in the net like a poor man's right in  the  law.
'Twill hardly come out. - Shakespeare, Pericles, Act II, Scene 1
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] arch/arm/include/asm/sizes.h: cleanups

2010-10-12 Thread Wolfgang Denk
Dear =?UTF-8?q?Andreas=20Bie=C3=9Fmann?=,

In message 1285363903-71316-1-git-send-email-andreas.de...@googlemail.com you 
wrote:
 
 Merge several sizes.h in asm/arch subdirectories into a single
 asm/sizes.h file.
 
 Fixup usage of asm/arch/sizes.h in some files to use the merged file.
 
 Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com
 ---
 These changes where submitted in 2008 but never applied.
 See http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/44229
 
 It is not necessary to have several copies of files with nearly the same 
 content.
 
  arch/arm/include/asm/arch-arm925t/sizes.h |   50 
  arch/arm/include/asm/arch-arm926ejs/sizes.h   |   51 
  arch/arm/include/asm/arch-omap/sizes.h|   52 
 -
  arch/arm/include/asm/arch-omap24xx/omap2420.h |2 +-
  arch/arm/include/asm/arch-omap24xx/sizes.h|   49 ---
  arch/arm/include/asm/sizes.h  |5 +-
  include/configs/h2_p2_dbg_board.h |2 +-
  include/configs/omap1510.h|2 +-
  include/configs/omap730.h |2 +-
  9 files changed, 6 insertions(+), 209 deletions(-)
  delete mode 100644 arch/arm/include/asm/arch-arm925t/sizes.h
  delete mode 100644 arch/arm/include/asm/arch-arm926ejs/sizes.h
  delete mode 100644 arch/arm/include/asm/arch-omap/sizes.h
  delete mode 100644 arch/arm/include/asm/arch-omap24xx/sizes.h

Applied to u-boot-arm, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
When properly administered, vacations do not  diminish  productivity:
for every week you're away and get nothing done, there's another when
your boss is away and you get twice as much done.  -- Daniel B. Luten
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] nand: allow demand initialization

2010-10-12 Thread Mike Frysinger
On Monday, October 11, 2010 17:27:33 Scott Wood wrote:
 On Mon, 11 Oct 2010 17:02:00 -0400 Mike Frysinger wrote:
  On Monday, October 11, 2010 16:29:41 Scott Wood wrote:
   On Sun, Oct 10, 2010 at 06:37:40AM -0400, Mike Frysinger wrote:
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -309,6 +309,8 @@

if (argc  2)

goto usage;

+   nand_init();
+
   
   Also do_nandboot().
  
  does it need to be before the mtdparts init stuff, or can it be in
  nand_load_image() ?
 
 I think before -- the mtdparts init checks whether an mtd device
 actually exists.  Though in that case, and also for things
 like mtdparts.spread, nand_init() should go in mtdparts_init(), and also
 nand_load_image() in case mtdparts aren't enabled.

np

 OTOH, I'm fine with leaving that as a future refinement for someone who
 is using embedded-env with NAND and cares about the boot time it adds.

i'd lean towards this too.  i have no way of testing this behavior.
-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] env: don't set to default env twice when use CONFIG_ENV_IS_NOWHERE

2010-10-12 Thread Wolfgang Denk
Dear Lei Wen,

In message 1286685400-27286-1-git-send-email-lei...@marvell.com you wrote:
 When use the CONFIG_ENV_IS_NOWHERE, I met such issue:
 
 DRAM:  256 MiB
 Using default environment
 
 *** Warning - bad CRC, using default environment
 
 Signed-off-by: Lei Wen lei...@marvell.com
 ---
 V2: don't move the warning when environment is not vaild
 
  common/env_common.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Business is like a wheelbarrow. Nothing ever happens until you  start
pushing.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] [NEXT]arm: Make jadecpu use relocation

2010-10-12 Thread Wolfgang Denk
Dear =?ISO-8859-1?Q?Matthias_Wei=DFer?=,

In message 4cb2dde8.6040...@arcor.de you wrote:
 
  Unfortunately this breaks building for this board:
...
 I am not sure how to fix this. gd_t contains a member ram_size if 
 CONFIG_SYS_ARM_WITHOUT_RELOC is not defined. This is the case for our 
 jadecpu board.
 
 Also the patch is in current master branch and builds cleanly here.

Confirmed.

Sorry for the confusion. I just did not expect that the board might
build without CONFIG_SYS_ARM_WITHOUT_RELOC ;-)

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
More software projects have gone awry for lack of calendar time than
for all other causes combined.
 - Fred Brooks, Jr., _The Mythical Man Month_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/3 v2] nand: introduce CONFIG_NAND_EARLY_INIT and nand_early_init()

2010-10-12 Thread Mike Frysinger
Add new config options to allow people to control early initialization
of NAND.  The current behavior (NAND is initialized early) is unchanged,
but now people may choose to disable this behavior and only initialize
NAND when it would actually be used.

So that we can change the default in the future to not initialize NAND
early on, we also introduce a CONFIG_MAYBE_NAND_EARLY_INIT option.  If
board porters do not make a choice either way, they will get a build
warning.  This should encourage board porters to opt in to one of the
two choices by themselves.  After a release or two, we can then force
the remaining boards to enable the new config option, delete the compat
option, and have the default behavior match the standard U-Boot policy.

Signed-off-by: Mike Frysinger vap...@gentoo.org
---
v2
- call nand_init() in do_nandboot() too

 common/cmd_nand.c   |6 ++
 common/env_nand.c   |8 
 drivers/mtd/nand/nand.c |7 +++
 3 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index 8a81237..99408b1 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -393,6 +393,8 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char * 
const argv[])
if (argc  2)
goto usage;
 
+   nand_init();
+
if (quiet_str)
quiet = simple_strtoul(quiet_str, NULL, 0) != 0;
 
@@ -811,7 +813,11 @@ int do_nandboot(cmd_tbl_t * cmdtp, int flag, int argc, 
char * const argv[])
struct mtd_device *dev;
struct part_info *part;
u8 pnum;
+#endif
 
+   nand_init();
+
+#if defined(CONFIG_CMD_MTDPARTS)
if (argc = 2) {
char *p = (argc == 2) ? argv[1] : argv[2];
if (!(str2long(p, addr))  (mtdparts_init() == 0) 
diff --git a/common/env_nand.c b/common/env_nand.c
index 4e8307a..3dffebd 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -359,6 +359,8 @@ void env_relocate_spec(void)
return;
}
 
+   nand_init();
+
if (readenv(CONFIG_ENV_OFFSET, (u_char *) tmp_env1))
puts(No Valid Environment Area found\n);
 
@@ -404,6 +406,8 @@ void env_relocate_spec(void)
free(tmp_env1);
free(tmp_env2);
 
+#else
+   nand_init();
 #endif /* ! ENV_IS_EMBEDDED */
 }
 #else /* ! CONFIG_ENV_OFFSET_REDUND */
@@ -418,6 +422,8 @@ void env_relocate_spec (void)
int ret;
char buf[CONFIG_ENV_SIZE];
 
+   nand_init();
+
 #if defined(CONFIG_ENV_OFFSET_OOB)
ret = get_nand_env_oob(nand_info[0], nand_env_oob_offset);
/*
@@ -439,6 +445,8 @@ void env_relocate_spec (void)
}
 
env_import(buf, 1);
+#else
+   nand_init();
 #endif /* ! ENV_IS_EMBEDDED */
 }
 #endif /* CONFIG_ENV_OFFSET_REDUND */
diff --git a/drivers/mtd/nand/nand.c b/drivers/mtd/nand/nand.c
index 47d6872..4a63d5c 100644
--- a/drivers/mtd/nand/nand.c
+++ b/drivers/mtd/nand/nand.c
@@ -81,6 +81,13 @@ void nand_init(void)
 {
int i;
unsigned int size = 0;
+   static uint8_t initialized;
+
+   if (initialized)
+   return;
+   initialized = 1;
+   puts(NAND:  );
+
for (i = 0; i  CONFIG_SYS_MAX_NAND_DEVICE; i++) {
nand_init_chip(nand_info[i], nand_chip[i], base_address[i]);
size += nand_info[i].size / 1024;
-- 
1.7.3.1

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


[U-Boot] [PATCH 2/3 v2] nand: introduce CONFIG_NAND_EARLY_INIT and nand_early_init()

2010-10-12 Thread Mike Frysinger
Add new config options to allow people to control early initialization
of NAND.  The current behavior (NAND is initialized early) is unchanged,
but now people may choose to disable this behavior and only initialize
NAND when it would actually be used.

So that we can change the default in the future to not initialize NAND
early on, we also introduce a CONFIG_MAYBE_NAND_EARLY_INIT option.  If
board porters do not make a choice either way, they will get a build
warning.  This should encourage board porters to opt in to one of the
two choices by themselves.  After a release or two, we can then force
the remaining boards to enable the new config option, delete the compat
option, and have the default behavior match the standard U-Boot policy.

Signed-off-by: Mike Frysinger vap...@gentoo.org
---
v2
- appease useless checkpatch warnings

 arch/arm/lib/board.c |5 +
 arch/blackfin/lib/board.c|   10 ++
 arch/m68k/lib/board.c|6 +++---
 arch/mips/lib/board.c|5 +
 arch/nios2/lib/board.c   |9 ++---
 arch/powerpc/lib/board.c |6 +++---
 arch/sh/lib/board.c  |3 ++-
 doc/feature-removal-schedule.txt |   20 
 drivers/mtd/nand/nand.c  |4 
 include/config_defaults.h|2 ++
 include/nand.h   |5 +
 11 files changed, 45 insertions(+), 30 deletions(-)

diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 22bd2c9..7d8ed51 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -346,10 +346,7 @@ void start_armboot (void)
}
 #endif /* CONFIG_LCD */
 
-#if defined(CONFIG_CMD_NAND)
-   puts (NAND:  );
-   nand_init();/* go init the NAND */
-#endif
+   nand_early_init();
 
 #if defined(CONFIG_CMD_ONENAND)
onenand_init();
diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c
index fcfd174..5628ff4 100644
--- a/arch/blackfin/lib/board.c
+++ b/arch/blackfin/lib/board.c
@@ -15,6 +15,7 @@
 #include environment.h
 #include malloc.h
 #include mmc.h
+#include nand.h
 #include net.h
 #include timestamp.h
 #include status_led.h
@@ -24,10 +25,6 @@
 #include asm/mach-common/bits/mpu.h
 #include kgdb.h
 
-#ifdef CONFIG_CMD_NAND
-#include nand.h  /* cannot even include nand.h if it isnt configured */
-#endif
-
 #ifdef CONFIG_BITBANGMII
 #include miiphy.h
 #endif
@@ -345,10 +342,7 @@ void board_init_r(gd_t * id, ulong dest_addr)
bd-bi_flashoffset = 0;
 #endif
 
-#ifdef CONFIG_CMD_NAND
-   puts(NAND:  );
-   nand_init();/* go init the NAND */
-#endif
+   nand_early_init();
 
 #ifdef CONFIG_GENERIC_MMC
puts(MMC:   );
diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c
index eba2435..5eb878b 100644
--- a/arch/m68k/lib/board.c
+++ b/arch/m68k/lib/board.c
@@ -593,10 +593,10 @@ void board_init_r (gd_t *id, ulong dest_addr)
doc_init ();
 #endif
 
-#if defined(CONFIG_CMD_NAND)
+#if defined(CONFIG_CMD_NAND)  \
+(defined(CONFIG_NAND_MAYBE_EARLY_INIT) || defined(CONFIG_NAND_EARLY_INIT))
WATCHDOG_RESET ();
-   puts (NAND:  );
-   nand_init();/* go init the NAND */
+   nand_early_init();
 #endif
 
 #ifdef CONFIG_BITBANGMII
diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c
index 0044b19..869635f 100644
--- a/arch/mips/lib/board.c
+++ b/arch/mips/lib/board.c
@@ -330,10 +330,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
bd-bi_flashoffset = 0;
 #endif
 
-#ifdef CONFIG_CMD_NAND
-   puts (NAND:  );
-   nand_init ();   /* go init the NAND */
-#endif
+   nand_early_init();
 
 #if defined(CONFIG_CMD_ONENAND)
onenand_init();
diff --git a/arch/nios2/lib/board.c b/arch/nios2/lib/board.c
index f83e691..a1ebcae 100644
--- a/arch/nios2/lib/board.c
+++ b/arch/nios2/lib/board.c
@@ -36,9 +36,7 @@
 #if defined(CONFIG_SYS_NIOS_EPCSBASE)
 #include nios2-epcs.h
 #endif
-#ifdef CONFIG_CMD_NAND
-#include nand.h  /* cannot even include nand.h if it isnt configured */
-#endif
+#include nand.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -130,10 +128,7 @@ void board_init (void)
bd-bi_flashsize = flash_init();
 #endif
 
-#ifdef CONFIG_CMD_NAND
-   puts(NAND:  );
-   nand_init();
-#endif
+   nand_early_init();
 
 #ifdef CONFIG_GENERIC_MMC
puts(MMC:   );
diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c
index bfdfa86..163af4a 100644
--- a/arch/powerpc/lib/board.c
+++ b/arch/powerpc/lib/board.c
@@ -763,10 +763,10 @@ void board_init_r (gd_t *id, ulong dest_addr)
spi_init_r ();
 #endif
 
-#if defined(CONFIG_CMD_NAND)
+#if defined(CONFIG_CMD_NAND)  \
+(defined(CONFIG_NAND_MAYBE_EARLY_INIT) || defined(CONFIG_NAND_EARLY_INIT))
WATCHDOG_RESET ();
-   puts (NAND:  );
-   nand_init();/* go init the NAND */
+   nand_early_init();
 #endif
 
 #ifdef CONFIG_GENERIC_MMC
diff --git a/arch/sh/lib/board.c b/arch/sh/lib/board.c

Re: [U-Boot] [PATCH] - Add support for HP Jornada (710/720/728) board

2010-10-12 Thread Wolfgang Denk
Dear Kristoffer Ericson,

In message 20101006194103.ge...@boggieman.bredbandsbolaget.se you wrote:
 
 Content-Type: text/plain; charset=utf-8
 Content-Disposition: inline
 
 This patch add support for the HP Jornada 700-series with flashrom (manufact. 
 2008). 
 With little effort it could also be made to support earlier flashroms (just a 
 change of memory settings).
 The HP Jornada is an strongarm device (sa1110 + sa).
 
 Signed-off-by: Kristoffer Ericson kristoffer.eric...@gmail.com

Please send as plain text.  Use git tools to prepare (git
format-patch) and to submit (git send-email) the patch.  In any
case, please make sure that commit message, Signed-off-by line and
body of the patch are not split into separate MIME parts.


Entry to MAINTAINERS file missing.

...
 +int board_init(void)
 +{
 + gd-bd-bi_arch_number = 48;
 + gd-bd-bi_boot_params = 0xc100;
 +
 +
 + /* turn on flashing
 +  * would be nice to have some protection but
 +  * that would have to be implemented in the
 +  * flash init function, which isnt possible yet. */

Incorrect multiline comment style. Please fix globally.

...
 +#define CONFIG_BOOTARGS  root=/dev/hda1 
 console=ttySA0,19200n8 console=tty1
 +#define CONFIG_BOOTCOMMAND   run boot_kernel
 +#define CONFIG_SYS_AUTOLOAD  n /* No autoload */
 +#define CONFIG_SYS_LOAD_ADDR 0xc000
 +
 +/*
 + * Miscellaneous configurable options
 + */
 +#define CONFIG_SYS_LONGHELP  
 /* undef to save memory */
 +#define CONFIG_SYS_PROMPTHP Jornada#   
 /* Monitor Command Prompt   */
 +#define CONFIG_SYS_CBSIZE256 
 /* Console I/O Buffer Size  */
 +#define CONFIG_SYS_PBSIZE
 (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)/* Print Buffer Size */
 +#define CONFIG_SYS_MAXARGS   16  
 /* max number of command args   */
 +#define CONFIG_SYS_BARGSIZE  256 /* Boot 
 Argument Buffer Size*/
 +#define CONFIG_SYS_MEMTEST_START 0xc004  
 /* memtest works on */
 +#define CONFIG_SYS_MEMTEST_END   0xc200  
 /* 4 ... 128 MB in SDRAM   */
 +#define CONFIG_SYS_HZ3686400 
 /* incrementer freq: 3.6864 MHz */
 +#define CONFIG_SYS_CPUSPEED  0x0a
 /* set core clock to 206MHz */
 +#define CONFIG_SYS_BAUDRATE_TABLE{ 9600, 19200, 38400, 57600, 115200 }   
 /* valid baudrates */

Lines too long. Please fix globally.


Please clean up and resubmit.

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
Never underestimate the bandwidth of a station wagon full of tapes.
-- Dr. Warren Jackson, Director, UTCS
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] mkconfig: change CONFIG_MK_ prefix into plain CONFIG_

2010-10-12 Thread Wolfgang Denk
Dear Mike Frysinger,

In message 201010111517.18063.vap...@gentoo.org you wrote:

 On Monday, October 11, 2010 05:45:09 Wolfgang Denk wrote:
   board/bf527-ezkit/video.c |   10 +-
   include/configs/bf527-ezkit.h |2 +-

 these look fine ... were you going to update boards.cfg too ?  this was the
 only reason the bf527-ezkit-v2 target exists in the top level Makefile ...

I still need to find out how to correctly process the make config
options (still waiting for feedback, none received so far :-( ).

Then I will convert all PPC boards.  I hope others pick up for the
other architectures.  I'm growing tired of producing series of 1000
lines patches ;-)

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The price one pays for pursuing any profession,  or  calling,  is  an
intimate knowledge of its ugly side.  - James Baldwin
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2 V3] mmc: add boundary check for mmc operation

2010-10-12 Thread Ghorai, Sukumar


 -Original Message-
 From: Wolfgang Denk [mailto:w...@denx.de]
 Sent: Wednesday, October 13, 2010 12:51 AM
 To: Andy Fleming; Ghorai, Sukumar
 Cc: Lei Wen; Lei Wen; u-boot@lists.denx.de; sshtyl...@mvista.com
 Subject: Re: [U-Boot] [PATCH 1/2 V3] mmc: add boundary check for mmc
 operation
 
 Dear Andy,
 
 In message 2a3dcf3da181ad40bde86a3150b27b6b0316062...@dbde02.ent.ti.com
 Sukumar Ghorai wrote:
 ...
  I found the problem. It's a eMMC size calculation is wrong and here is
 the
  fix I am sending as a patch too in my next email.
 
  From: Sukumar Ghorai s-gho...@ti.com
  Date: Mon, 20 Sep 2010 18:29:29 +0530
  Subject: [PATCH 1/3] fix for eMMC capacity calculation
 
capacity of the eMMC device available in ext-CSD register only
 
  Signed-off-by: Sukumar Ghorai s-gho...@ti.com
  ---
  drivers/mmc/mmc.c |   11 +++
   1 files changed, 11 insertions(+), 0 deletions(-)
 
 Is this patch on your queue?
[Ghorai] 
This has been submitted by Steve Sakoman sometime back.
http://www.mail-archive.com/u-boot@lists.denx.de/msg38692.html

 
 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
 Here's a fish hangs in the net like a poor man's right in  the  law.
 'Twill hardly come out. - Shakespeare, Pericles, Act II, Scene 1
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] tools/imls: fix comment in Makefile

2010-10-12 Thread Wolfgang Denk
Dear Daniel Hobi,

In message 1286813015-19085-1-git-send-email-daniel.h...@schmid-telecom.ch 
you wrote:
 Commit d984fed0 (makefiles: fixes for building build tools)
 changed the variable name FIT_CFLAGS to HOSTCFLAGS_NOPED
 but forgot to update to corresponding comment.
 
 Signed-off-by: Daniel Hobi daniel.h...@schmid-telecom.ch
 Cc: Scott Wood scottw...@freescale.com
 Cc: Wolfgang Denk w...@denx.de
 ---
  tools/imls/Makefile |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
It is a good thing for an uneducated man to read books of quotations.
- Sir Winston Churchill _My Early Life_ ch. 9
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Joakim Tjernlund
Scott Wood scottw...@freescale.com wrote on 2010/10/12 21:20:26:
 
 On Tue, 12 Oct 2010 21:13:19 +0200
 Joakim Tjernlund joakim.tjernl...@transmode.se wrote:
 
  Kim Phillips kim.phill...@freescale.com wrote on 2010/10/12 
20:19:38:
   
   On Tue, 12 Oct 2010 19:41:56 +0200
   Joakim Tjernlund joakim.tjernl...@transmode.se wrote:
   
Kim Phillips kim.phill...@freescale.com wrote on 2010/10/12 
  19:31:25:
 that moderate size increase in start.S breaks nand builds:
   
One thing I wonder about: How come NAND_SPL need GOT2 relocs
but no FIXUPs? I figured either none or both.
   
   I don't know; apparently FIXUPs aren't needed?
  
  Fixups are needed unless your link address == load address.
  I guess you link at the load address? If so
  you should not need to relocate the GOT either.
 
 We do need to relocate with NAND SPL.  We start in the NAND buffer,
 but we have to move to RAM to free up the buffer for loading the rest
 of U-Boot.

Sure, but do you move to a specific RAM address and is
it the same as your link address?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] drivers/net/fec_mxc.c: write mac address in init

2010-10-12 Thread Wolfgang Denk
Dear John Rigby,

In message 1283976684-30754-1-git-send-email-john.ri...@linaro.org you wrote:
 call fec_set_hwaddr in init routine to setup MAC address
 so when ethaddr is set late the change will propagate to the hw

s/late/later/ ?

 Signed-off-by: John Rigby john.ri...@linaro.org
 ---
  drivers/net/fec_mxc.c |2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
 
 diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
 index 2d4ffed..050c0e1 100644
 --- a/drivers/net/fec_mxc.c
 +++ b/drivers/net/fec_mxc.c
 @@ -414,6 +414,8 @@ static int fec_init(struct eth_device *dev, bd_t* bd)
   uint32_t base;
   struct fec_priv *fec = (struct fec_priv *)dev-priv;
  
 + /* Initialize MAC address */
 + fec_set_hwaddr(dev);
   /*
* reserve memory for both buffer descriptor chains at once
* Datasheet forces the startaddress of each chain is 16 byte

Please insert blank line before comment.

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
It became apparent that one reason why the Ice Giants were  known  as
the  Ice  Giants  was  because they were, well, giants. The other was
that they were made of ice.  -Terry Pratchett, _Sourcery_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Kim Phillips
On Tue, 12 Oct 2010 21:17:38 +0200
Joakim Tjernlund joakim.tjernl...@transmode.se wrote:

  Yes, it is a simple symbol to add. I will do it twm if you don't
  beat me to it. it would be nice if you could try what works
  and not though.
 
 Could not wait, does this work for you?
 
 diff --git a/nand_spl/board/freescale/mpc8313erdb/u-boot.lds 
 b/nand_spl/board/freescale/mpc8313erdb/u-boot.lds
 index ad82589..1a3e44f 100644
 --- a/nand_spl/board/freescale/mpc8313erdb/u-boot.lds
 +++ b/nand_spl/board/freescale/mpc8313erdb/u-boot.lds
 @@ -38,6 +38,8 @@ SECTIONS
 .data : {
 *(.data*)
 *(.sdata*)
 +   _GOT_TABLE_ = .;
 +   *(.got)
 _GOT2_TABLE_ = .;
 *(.got2)
 __got2_entries = (. - _GOT2_TABLE_)  2;

it passes a build test on the 8313, but applying the same change to the
8315 still fails to build with bootstrap too big errors, because it
still suffers from the extra bits.  At least now it's buildable, so
we have some size info for the curious:

before (fits):

$ size ./nand_spl/board/freescale/mpc8315erdb/start.o
   textdata bss dec hex filename
   1528  12   01540 604 
./nand_spl/board/freescale/mpc8315erdb/start.o

after (too big):

$ size ./nand_spl/board/freescale/mpc8315erdb/start.o
   textdata bss dec hex filename
   1588  20   01608 648 
./nand_spl/board/freescale/mpc8315erdb/start.o

and there are other 83xx nand boards; please at least MAKEALL 83xx
before resubmitting.

Thanks,

Kim

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


Re: [U-Boot] [PATCH 2/3 v2] nand: introduce CONFIG_NAND_EARLY_INIT and nand_early_init()

2010-10-12 Thread Ben Gardiner
On Tue, Oct 12, 2010 at 3:35 PM, Mike Frysinger vap...@gentoo.org wrote:
 Add new config options to allow people to control early initialization
 of NAND.  The current behavior (NAND is initialized early) is unchanged,
 but now people may choose to disable this behavior and only initialize
 NAND when it would actually be used.

 So that we can change the default in the future to not initialize NAND
 early on, we also introduce a CONFIG_MAYBE_NAND_EARLY_INIT option.  If
 board porters do not make a choice either way, they will get a build
 warning.  This should encourage board porters to opt in to one of the
 two choices by themselves.  After a release or two, we can then force
 the remaining boards to enable the new config option, delete the compat
 option, and have the default behavior match the standard U-Boot policy.

 Signed-off-by: Mike Frysinger vap...@gentoo.org
 ---
 v2
        - appease useless checkpatch warnings

Still working as expected with v2 of 1/3 and 2/3.

Best Regards,
Ben Gardiner

---
Nanometrics Inc.
http://www.nanometrics.ca
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

2010-10-12 Thread Scott Wood
On Tue, 12 Oct 2010 21:51:44 +0200
Joakim Tjernlund joakim.tjernl...@transmode.se wrote:

 Scott Wood scottw...@freescale.com wrote on 2010/10/12 21:20:26:
  We do need to relocate with NAND SPL.  We start in the NAND buffer,
  but we have to move to RAM to free up the buffer for loading the rest
  of U-Boot.
 
 Sure, but do you move to a specific RAM address and is
 it the same as your link address?

The link address is of the pre-relocation NAND buffer.

-Scott

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


Re: [U-Boot] [PATCH 2/3 v2] nand: introduce CONFIG_NAND_EARLY_INIT and nand_early_init()

2010-10-12 Thread Wolfgang Denk
Dear Mike,

is there a patch 3/3, too?

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
When a woman marries again it is because she detested her first  hus-
band.  When  a  man  marries again, it is because he adored his first
wife.  -- Oscar Wilde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


  1   2   >