Re: [U-Boot-Users] [PATCH 1/8] New board SIMPC8313 support: MAINTAINERS, MAKEALL, Makefile

2008-06-10 Thread Kim Phillips
On Fri, 30 May 2008 11:07:38 -0700 (PDT)
Ron Madrid [EMAIL PROTECTED] wrote:

 New board SIMPC8313 support: MAINTAINERS, MAKEALL,
 Makefile
 
 Signed-off-by: Ron Madrid
 ---
  MAINTAINERS |5 +
  MAKEALL |2 ++
  Makefile|   18 ++
  3 files changed, 25 insertions(+), 0 deletions(-)
 
I can't apply this:

Applying New board SIMPC8313 support: MAINTAINERS, MAKEALL, Makefile
.dotest/patch:15: trailing whitespace.
 
fatal: corrupt patch at line 41
Patch failed at 0001.
When you have resolved this problem run git-am --resolved.
If you would prefer to skip this patch, instead run git-am --skip.

...

 $(obj)include/config.h ; \
 + $(MKCONFIG) -a SIMPC8313 ppc mpc83xx simpc8313
 sheldon; \

your mailer is obviously line-wrapping the patch.

Please refer to linux-2.6/Documentation/email-clients.txt on how to fix
this.

Thank you,

Kim

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] net: sh: Renesas SH7763 Ethernet device support

2008-06-10 Thread Ben Warren
Hi Nobuhiro,

Nobuhiro Iwamatsu wrote:
 Renesas SH7763 has 2 channel Ethernet device.
 This is 10/100/1000 Base support.
 But this patch check 10/100 Base only.

 Signed-off-by: Nobuhiro Iwamatsu [EMAIL PROTECTED]
 ---
  drivers/net/Makefile |1 +
  drivers/net/sh_eth.c |  599 
 ++
  drivers/net/sh_eth.h |  195 
   
Where's the code that has this driver being initialized by net/eth.c? Is 
it in another patch or should I just go to bed?
  3 files changed, 795 insertions(+), 0 deletions(-)
  create mode 100644 drivers/net/sh_eth.c
  create mode 100644 drivers/net/sh_eth.h

 diff --git a/drivers/net/Makefile b/drivers/net/Makefile
 index 5b031c9..e2a6b35 100644
 --- a/drivers/net/Makefile
 +++ b/drivers/net/Makefile
 @@ -66,6 +66,7 @@ COBJS-y += uli526x.o
  COBJS-y += vsc7385.o
  COBJS-$(CONFIG_XILINX_EMAC) += xilinx_emac.o
  COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o
 +COBJS-$(CONFIG_SH_ETHER) += sh_eth.o

  COBJS:= $(COBJS-y)
  SRCS := $(COBJS:.o=.c)
 diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
 new file mode 100644
 index 000..869a8f0
 --- /dev/null
 +++ b/drivers/net/sh_eth.c
 @@ -0,0 +1,599 @@
 +/*
 + * sh_eth.c - Driver for Renesas SH7763's ethernet controler.
 + *
 + * Copyright (C) 2008 Renesas Solutions Corp.
 + * Copyright (c) 2008 Nobuhiro Iwamatsu
 + * Copyright (c) 2007 Carlos Munoz [EMAIL PROTECTED]
 + *
 + * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
 + */
 +
 +#include config.h
 +#include common.h
 +#include malloc.h
 +#include net.h
 +#include asm/errno.h
 +
 +#include sh_eth.h
 +
 +#ifndef CONFIG_SH_ETHER_USE_PORT
 +# error Please define CONFIG_SH_ETHER_USE_PORT
 +#endif
 +#ifndef CONFIG_SH_ETHER_PHY_ADDR
 +# error Please define CONFIG_SH_ETHER_PHY_ADDR
 +#endif
 +
 +extern int eth_init(bd_t *bd);
 +extern void eth_halt(void);
 +extern int eth_rx(void);
 +extern int eth_send(volatile void *packet, int length);
 +
 +static struct dev_info_s *dev;
 +
 +/*
 + * Bits are written to the PHY serially using the
 + * PIR register, just like a bit banger.
 + */
 +static void sh_eth_mii_write_phy_bits(int port, u32 val, int len)
 +{
 + int i;
 + u32 pir;
 +
 + /* Bit positions is 1 less than the number of bits */
 + for (i = len - 1; i = 0; i--) {
 + /* Write direction, bit to write, clock is low */
 + pir = 2 | ((val  1  i) ? 1  2 : 0);
 + OUT32(PIR(port), pir);
 + PHY_DELAY;
 + /* Write direction, bit to write, clock is high */
 + pir = 3 | ((val  1  i) ? 1  2 : 0);
 + OUT32(PIR(port), pir);
 + PHY_DELAY;
 + /* Write direction, bit to write, clock is low */
 + pir = 2 | ((val  1  i) ? 1  2 : 0);
 + OUT32(PIR(port), pir);
 + PHY_DELAY;
 + }
 +}
 +
 +static void sh_eth_mii_bus_release(int port)
 +{
 + /* Read direction, clock is low */
 + OUT32(PIR(port), 0);
 + PHY_DELAY;
 + /* Read direction, clock is high */
 + OUT32(PIR(port), 1);
 + PHY_DELAY;
 + /* Read direction, clock is low */
 + OUT32(PIR(port), 0);
 + PHY_DELAY;
 +}
 +
 +static void sh_eth_mii_ind_bus_release(int port)
 +{
 + /* Read direction, clock is low */
 + OUT32(PIR(port), 0);
 + PHY_DELAY;
 +}
 +
 +static int sh_eth_mii_read_phy_bits(int port, u32 * val, int len)
 +{
 + int i;
 + u32 pir;
 +
 + *val = 0;
 + for (i = len - 1; i = 0; i--) {
 + /* Read direction, clock is high */
 + OUT32(PIR(port), 1);
 + PHY_DELAY;
 + /* Read bit */
 + pir = IN32(PIR(port));
 + *val |= (pir  8) ? 1  i : 0;
 + /* Read direction, clock is low */
 + OUT32(PIR(port), 0);
 + PHY_DELAY;
 + }
 +
 + return 0;
 +}
 +
 +/* To read a phy register, mii managements frames are sent to the phy.
 +   The frames look like this:
 +   pre (32 bits):0x 
 +   st (2 bits):  01
 +   op (2bits):   10: read 01: write
 +   phyad (5 bits):   x
 +   regad (5 bits):   x
 +   ta (Bus release):
 +   data (16 bits):   read data */
 +static u32 sh_eth_mii_read_phy_reg(int port, u8 phy_addr, int reg)
 +{
 + u32 val;
 +
 + /* Sent 

[U-Boot-Users] [PATCH 1/2] add MPC8343 based board mvBlueLYNX-M7

2008-06-10 Thread Andre Schwarz
Add MPC8343 based board mvBlueLYNX-M7.
It's a single board stereo camera system.
Please read doc/README.mvblm7 for details.

Signed-off-by: Andre Schwarz [EMAIL PROTECTED]
---



MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler  - Registergericht: 
Amtsgericht Stuttgart, HRB 271090
Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
 CREDITS  |4 +
 MAINTAINERS  |4 +
 doc/README.mvblm7|   85 
 include/configs/MVBLM7.h |  481 ++
 4 files changed, 574 insertions(+), 0 deletions(-)

diff --git a/CREDITS b/CREDITS
index e84ef38..aa57682 100644
--- a/CREDITS
+++ b/CREDITS
@@ -424,6 +424,10 @@ N: Paolo Scaffardi
 E: [EMAIL PROTECTED]
 D: FADS823 configuration, MPC823 video support, I2C, wireless keyboard, lots 
more
 
+N: Andre Schwarz
+E: [EMAIL PROTECTED]
+D: Support for Matrix Vision boards (MVBLM7)
+
 N: Robert Schwebel
 E: [EMAIL PROTECTED]
 D: Support for csb226, logodl and innokom boards (PXA2xx)
diff --git a/MAINTAINERS b/MAINTAINERS
index d3dfd48..357cab3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -371,6 +371,10 @@ Peter De Schrijver [EMAIL PROTECTED]
 
ML2 PPC4xx
 
+Andre Schwarz [EMAIL PROTECTED]
+
+   mvblm7  MPC8343
+
 Timur Tabi [EMAIL PROTECTED]
 
MPC8349E-mITX   MPC8349
diff --git a/doc/README.mvblm7 b/doc/README.mvblm7
new file mode 100644
index 000..52b9df7
--- /dev/null
+++ b/doc/README.mvblm7
@@ -0,0 +1,85 @@
+Matrix Vision mvBlueLYNX-M7 (mvBL-M7)
+-
+
+1. Board Description
+
+   The mvBL-M7 is a 120x120mm single board computing platform
+   with strong focus on stereo image processing applications.
+
+   Power Supply is either VDC 12-48V or Pover over Ethernet (PoE)
+   on any port (requires add-on board).
+
+2  System Components
+
+2.1CPU 
+   Freescale MPC8343VRAGDB CPU running at 400MHz core and 266MHz csb.
+   512MByte DDR-II memory @ 133MHz.
+   8 MByte Nor Flash on local bus.
+   2 Vitesse VSC8601 RGMII ethernet Phys.
+   1 USB host controller over ULPI I/F.
+   2 serial ports. Console running on ttyS0 @ 115200 8N1.
+   1 SD-Card slot connected to SPI.
+   System configuration (HRCW) is taken from I2C EEPROM.
+
+2.2PCI
+   A miniPCI Type-III socket is present. PCI clock fixed at 66MHz.
+   
+2.3FPGA
+   Altera Cyclone-II EP2C20/35 with PCI DMA engines.
+   Connects to dual Matrix Vision specific CCD/CMOS sensor interfaces.
+   Utilizes another 256MB DDR-II memory and 32-128MB Nand Flash.
+
+2.3.1  I/O @ FPGA
+   2x8 Outputs : Infineon High-Side Switches to Main Supply.
+   2x8 Inputs  : Programmable input threshold + trigger capabilities
+   2 dedicated flash interfaces for illuminator boards.
+   Cross trigger for chaining several boards.
+
+2.4I2C
+   Bus1: 
+   MAX5381 DAC @ 0x60 for 1st digital input threshold.
+   LM75 @ 0x90 for temperature monitoring.
+   EEPROM @ 0xA0 for system setup (HRCW etc.) + vendor specifics.
+   1st image sensor interface (slave adresses depend on sensor)
+   Bus2:   
+   MAX5381 DAC @ 0x60 for 2nd digital input threshold.
+   2nd image sensor interface (slave adresses depend on sensor)
+
+3  Flash layout.
+
+   reset vector is 0xFFF00100, i.e. HIGHBOOT.
+
+   FF80environment
+   FF802000redundant environment
+   FF804000u-boot script image
+   FF806000redundant u-boot script image
+   FF808000device tree blob
+   FF80A000redundant device tree blob
+   FF80C000tbd.
+   FF80E000tbd.
+   FF81kernel
+   FFC0root FS
+   FFF0u-boot
+   FFF8FPGA raw bit file 
+
+   mtd partitions are propagated to linux kernel via device tree blob.
+
+4  Booting
+
+   On startup the bootscript @ FF804000 is executed. This script can be
+   exchanged easily. Default boot mode is boot from flash, i.e. system
+   works stand-alone.
+
+   This behaviour depends on some environment variables :
+
+   netboot : yes -try dhcp/bootp and boot from network.
+   A dhcp_client_id and dhcp_vendor-class-identifier can be used for
+   DHCP server configuration, e.g. to provide different images to
+   different devices.
+
+   During netboot the system tries to get 3 image files:
+   1. Kernel - name + data is given during BOOTP.
+   2. Initrd - name is stored in initrd_name
+   3. device tree blob - name is stored in dtb_name
+   Fallback files are the flash versions.
+
diff --git a/include/configs/MVBLM7.h b/include/configs/MVBLM7.h
new file mode 100644
index 000..16a8caa
--- /dev/null
+++ b/include/configs/MVBLM7.h
@@ -0,0 +1,481 @@
+/*
+ * Copyright 

[U-Boot-Users] [PATCH 2/2] add MPC8343 based board mvBlueLYNX-M7

2008-06-10 Thread Andre Schwarz
Add MPC8343 based board mvBlueLYNX-M7.
It's a single board stereo camera system.
Please read doc/README.mvblm7 for details.

Signed-off-by: Andre Schwarz [EMAIL PROTECTED]
---


MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler  - Registergericht: 
Amtsgericht Stuttgart, HRB 271090
Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
 MAKEALL|1 +
 Makefile   |3 +
 board/mvblm7/Makefile  |   48 ++
 board/mvblm7/config.mk |   25 ++
 board/mvblm7/fpga.c|  188 
 board/mvblm7/fpga.h|   34 +++
 board/mvblm7/mvblm7.c  |  157 +
 board/mvblm7/mvblm7.h  |   21 +
 board/mvblm7/mvblm7_autoscript |   37 
 board/mvblm7/pci.c |  165 +++
 10 files changed, 679 insertions(+), 0 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index 3cb1d24..c751586 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -331,6 +331,7 @@ LIST_83xx= \
MPC8360ERDK_66  \
MPC837XEMDS \
MPC837XERDB \
+   MVBLM7  \
sbc8349 \
TQM834x \
 
diff --git a/Makefile b/Makefile
index cc988e1..fd9c949 100644
--- a/Makefile
+++ b/Makefile
@@ -2107,6 +2107,9 @@ MPC837XEMDS_HOST_config:  unconfig
 MPC837XERDB_config:unconfig
@$(MKCONFIG) -a MPC837XERDB ppc mpc83xx mpc837xerdb freescale
 
+MVBLM7_config: unconfig
+   @$(MKCONFIG) $(@:_config=) ppc mpc83xx mvblm7
+
 sbc8349_config:unconfig
@$(MKCONFIG) $(@:_config=) ppc mpc83xx sbc8349
 
diff --git a/board/mvblm7/Makefile b/board/mvblm7/Makefile
new file mode 100644
index 000..84cd14a
--- /dev/null
+++ b/board/mvblm7/Makefile
@@ -0,0 +1,48 @@
+#
+# Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved.
+#
+# 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 pci.o fpga.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak .depend
+
+#
+
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/mvblm7/config.mk b/board/mvblm7/config.mk
new file mode 100644
index 000..1d85f4f
--- /dev/null
+++ b/board/mvblm7/config.mk
@@ -0,0 +1,25 @@
+#
+# Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved.
+#
+# 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
+#
+
+sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
+
+TEXT_BASE  = 0xFFF0
diff --git a/board/mvblm7/fpga.c b/board/mvblm7/fpga.c
new file mode 100644
index 000..a60af01
--- /dev/null
+++ b/board/mvblm7/fpga.c
@@ -0,0 +1,188 @@
+/*
+ * (C) Copyright 2002
+ * Rich Ireland, Enterasys Networks, [EMAIL PROTECTED]
+ * Keith Outwater, [EMAIL PROTECTED]
+ *
+ * (C) Copyright 2008
+ * Andre Schwarz, Matrix Vision GmbH, [EMAIL PROTECTED]
+ *
+ * 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 

[U-Boot-Users] [PATCH] Add mechanisms for CPU and board-specific Ethernet initialization

2008-06-10 Thread Ben Warren
This patch is the first step in cleaning up net/eth.c, by moving Ethernet
initialization to CPU or board-specific code.  Initial implementation is
only on the Freescale TSEC controller, but others will be added soon.

Signed-off-by: Ben Warren [EMAIL PROTECTED]
---

When we discussed this a few months ago, I was planning on defining the 
cpu_eth_init() and board_eth_init() functions as weak with no aliases, but in
my testing this did not result in them being NULL, hence the default function.

 board/atum8548/atum8548.c |   18 +++
 board/freescale/mpc8313erdb/mpc8313erdb.c |   12 ++
 board/freescale/mpc8315erdb/mpc8315erdb.c |   12 ++
 board/freescale/mpc8349emds/mpc8349emds.c |   12 ++
 board/freescale/mpc8349itx/mpc8349itx.c   |   12 ++
 board/freescale/mpc837xemds/mpc837xemds.c |   12 ++
 board/freescale/mpc837xerdb/mpc837xerdb.c |   13 +++
 board/freescale/mpc8540ads/mpc8540ads.c   |   22 ++
 board/freescale/mpc8541cds/mpc8541cds.c   |   12 ++
 board/freescale/mpc8544ds/mpc8544ds.c |   18 +++
 board/freescale/mpc8548cds/mpc8548cds.c   |   18 +++
 board/freescale/mpc8555cds/mpc8555cds.c   |   12 ++
 board/freescale/mpc8560ads/mpc8560ads.c   |   12 ++
 board/freescale/mpc8568mds/mpc8568mds.c   |   12 ++
 board/freescale/mpc8641hpcn/mpc8641hpcn.c |   18 +++
 board/mpc8540eval/mpc8540eval.c   |   22 ++
 board/pm854/pm854.c   |   22 ++
 board/pm856/pm856.c   |   12 ++
 board/sbc8349/sbc8349.c   |   12 ++
 board/sbc8548/sbc8548.c   |   18 +++
 board/sbc8560/sbc8560.c   |9 +++
 board/sbc8641d/sbc8641d.c |   18 +++
 board/stxgp3/stxgp3.c |   12 ++
 board/stxssa/stxssa.c |   12 ++
 board/tqm834x/tqm834x.c   |   12 ++
 board/tqm85xx/tqm85xx.c   |   22 ++
 include/netdev.h  |   34 +
 net/eth.c |   26 -
 28 files changed, 430 insertions(+), 16 deletions(-)
 create mode 100644 include/netdev.h

diff --git a/board/atum8548/atum8548.c b/board/atum8548/atum8548.c
index 2f6ae29..d6bd8ae 100644
--- a/board/atum8548/atum8548.c
+++ b/board/atum8548/atum8548.c
@@ -34,6 +34,7 @@
 #include miiphy.h
 #include libfdt.h
 #include fdt_support.h
+#include netdev.h
 
 #if defined(CONFIG_DDR_ECC)  !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
 extern void ddr_enable_ecc(unsigned int dram_size);
@@ -417,3 +418,20 @@ ft_board_setup(void *blob, bd_t *bd)
}
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+#if defined(CONFIG_TSEC1)
+   tsec_initialize(bis, 0, CONFIG_TSEC1_NAME);
+#endif
+#if defined(CONFIG_TSEC2)
+   tsec_initialize(bis, 1, CONFIG_TSEC2_NAME);
+#endif
+#if defined(CONFIG_TSEC3)
+   tsec_initialize(bis, 2, CONFIG_TSEC3_NAME);
+#endif
+#if defined(CONFIG_TSEC4)
+   tsec_initialize(bis, 3, CONFIG_TSEC4_NAME);
+#endif
+   return 0;
+}
diff --git a/board/freescale/mpc8313erdb/mpc8313erdb.c 
b/board/freescale/mpc8313erdb/mpc8313erdb.c
index 7cbdb7b..00abb6b 100644
--- a/board/freescale/mpc8313erdb/mpc8313erdb.c
+++ b/board/freescale/mpc8313erdb/mpc8313erdb.c
@@ -29,6 +29,7 @@
 #include pci.h
 #include mpc83xx.h
 #include vsc7385.h
+#include netdev.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -128,3 +129,14 @@ void ft_board_setup(void *blob, bd_t *bd)
 #endif
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+#if defined(CONFIG_TSEC1)
+   tsec_initialize(bis, 0, CONFIG_TSEC1_NAME);
+#endif
+#if defined(CONFIG_TSEC2)
+   tsec_initialize(bis, 1, CONFIG_TSEC2_NAME);
+#endif
+   return 0;
+}
diff --git a/board/freescale/mpc8315erdb/mpc8315erdb.c 
b/board/freescale/mpc8315erdb/mpc8315erdb.c
index 7af36dd..136b0aa 100644
--- a/board/freescale/mpc8315erdb/mpc8315erdb.c
+++ b/board/freescale/mpc8315erdb/mpc8315erdb.c
@@ -30,6 +30,7 @@
 #endif
 #include pci.h
 #include mpc83xx.h
+#include netdev.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -130,3 +131,14 @@ void ft_board_setup(void *blob, bd_t *bd)
 #endif
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+#if defined(CONFIG_TSEC1)
+   tsec_initialize(bis, 0, CONFIG_TSEC1_NAME);
+#endif
+#if defined(CONFIG_TSEC2)
+   tsec_initialize(bis, 1, CONFIG_TSEC2_NAME);
+#endif
+   return 0;
+}
diff --git a/board/freescale/mpc8349emds/mpc8349emds.c 
b/board/freescale/mpc8349emds/mpc8349emds.c
index 6c82596..59ace6c 100644
--- a/board/freescale/mpc8349emds/mpc8349emds.c
+++ b/board/freescale/mpc8349emds/mpc8349emds.c
@@ -30,6 +30,7 @@
 #include spi.h
 #include miiphy.h
 #include spd_sdram.h
+#include netdev.h
 
 #if defined(CONFIG_OF_LIBFDT)
 #include libfdt.h
@@ -287,3 +288,14 @@ void ft_board_setup(void *blob, 

[U-Boot-Users] Teridian Phy Support tr78q21x3

2008-06-10 Thread Manuel Sahm
Hello,
I?m using a at91sam9260 Microcontroller.

I added a Teridian Phy Driver (tr78q21x3) to the Uboot version 1.3.0
It works. (even in linux when I use the linux generic macb driver)

If I try to use the latest u-boot-version (1.3.3) with the macb driver - 
ethernet doesn?t work (in u-boot and linux).
I don?t know how to add my phy driver to the latest u-boot version !

Is anybody out there who would be able to insert the phy driver in the 
latest u-boot version (tree) - I would offer my driver for anybody...

Please reply

Thank you

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] mips: Bring over optimized memset() routine from Linux.

2008-06-10 Thread Shinya Kuribayashi
Hi Jason,

Jason McMullan wrote:
 This commit pulls over the memset() MIPS routine from Linux 2.6.26,
 which provides a 10x to 20x speedup over the generic byte-at-a-time
 routine. This is especially useful on platforms with manual ECC
 scrubbing, that require all of memory to be written at least once
 after a power cycle.
 ---
  include/asm-mips/string.h |2 +-
  lib_mips/Makefile |2 +-
  lib_mips/memset.S |  174 
 +
  3 files changed, 176 insertions(+), 2 deletions(-)
  create mode 100644 lib_mips/memset.S

IIRC, Linux's memset relies on AdEL/AdES exceptions. We have Status.EXL
enabled, but don't have proper exception handlers, yet. So my question
is does this code always works expectedly, or works with some alignment
restriction?

And some nitpickings. See below.

 diff --git a/lib_mips/memset.S b/lib_mips/memset.S
 new file mode 100644
 index 000..f1c07d7
 --- /dev/null
 +++ b/lib_mips/memset.S
 @@ -0,0 +1,174 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
 + * License.  See the file COPYING in the main directory of this archive
 + * for more details.
 + *
 + * Copyright (C) 1998, 1999, 2000 by Ralf Baechle
 + * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
 + * Copyright (C) 2007  Maciej W. Rozycki
 + */
 +#include asm/asm.h
 +//#include asm/asm-offsets.h

Please remove unused #include. Even '#if 0'-ing is not allowed in
U-Boot policy.

 +#include asm/regdef.h
 +
 +#if LONGSIZE == 4
 +#define LONG_S_L swl
 +#define LONG_S_R swr
 +#else
 +#define LONG_S_L sdl
 +#define LONG_S_R sdr
 +#endif
 +
 +#define EX(insn,reg,addr,handler)\
 +9:   insnreg, addr;  \
 + .section __ex_table,a;\
 + PTR 9b, handler;\
 + .previous
 +
 + .macro  f_fill64 dst, offset, val, fixup
 + EX(LONG_S, \val, (\offset +  0 * LONGSIZE)(\dst), \fixup)
 + EX(LONG_S, \val, (\offset +  1 * LONGSIZE)(\dst), \fixup)
 + EX(LONG_S, \val, (\offset +  2 * LONGSIZE)(\dst), \fixup)
 + EX(LONG_S, \val, (\offset +  3 * LONGSIZE)(\dst), \fixup)
 + EX(LONG_S, \val, (\offset +  4 * LONGSIZE)(\dst), \fixup)
 + EX(LONG_S, \val, (\offset +  5 * LONGSIZE)(\dst), \fixup)
 + EX(LONG_S, \val, (\offset +  6 * LONGSIZE)(\dst), \fixup)
 + EX(LONG_S, \val, (\offset +  7 * LONGSIZE)(\dst), \fixup)
 +#if LONGSIZE == 4
 + EX(LONG_S, \val, (\offset +  8 * LONGSIZE)(\dst), \fixup)
 + EX(LONG_S, \val, (\offset +  9 * LONGSIZE)(\dst), \fixup)
 + EX(LONG_S, \val, (\offset + 10 * LONGSIZE)(\dst), \fixup)
 + EX(LONG_S, \val, (\offset + 11 * LONGSIZE)(\dst), \fixup)
 + EX(LONG_S, \val, (\offset + 12 * LONGSIZE)(\dst), \fixup)
 + EX(LONG_S, \val, (\offset + 13 * LONGSIZE)(\dst), \fixup)
 + EX(LONG_S, \val, (\offset + 14 * LONGSIZE)(\dst), \fixup)
 + EX(LONG_S, \val, (\offset + 15 * LONGSIZE)(\dst), \fixup)
 +#endif
 + .endm
 +
 +/*
 + * memset(void *s, int c, size_t n)
 + *
 + * a0: start of area to clear
 + * a1: char to fill with
 + * a2: size of area to clear
 + */
 + .setnoreorder
 + .align  5
 +LEAF(memset)
 + beqza1, 1f
 +  move   v0, a0  /* result */

^

 + andia1, 0xff/* spread fillword */
 + LONG_SLLt1, a1, 8
 + or  a1, t1
 + LONG_SLLt1, a1, 16
 +#if LONGSIZE == 8
 + or  a1, t1
 + LONG_SLLt1, a1, 32
 +#endif
 + or  a1, t1
 +1:
 +
 +FEXPORT(__bzero)
 + sltiu   t0, a2, LONGSIZE/* very small region? */
 + bnezt0, .Lsmall_memset
 +  andi   t0, a0, LONGMASK/* aligned? */

^

[further part snipped]

Please fix wrong indentations with proper tabs. I know this is exactly
the same as Linux's memset, but we prefer to fix it correctly in U-Boot.

[ I used to do like you did, but changed my mind. Now I think this is
  better practice. Incoherent indentations with Linux is not a big deal
  IMO. Just diff -w option blows them away. ]

Thanks in advance,

-- 
Shinya Kuribayashi
NEC Electronics

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH v2] NAND read/write.jffs2 fix

2008-06-10 Thread Morten Ebbell Hestens
patch for branch mtd-2.6.22.1 on git://git.denx.de/u-boot-nand-flash.git

nand read(.jffs2|.e|.i) skips bad blocks during read.
write(.jffs2|.e|.i) skips bad blocks during write
nand read will read 0xff for bad block.
Update documentation.
---
 common/cmd_nand.c|   73 ++---
 doc/README.nand  |   16 +-
 drivers/mtd/nand/nand_util.c |  814 --
 include/nand.h   |9 +-
 4 files changed, 278 insertions(+), 634 deletions(-)

diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index eff9173..64e825e 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -73,9 +73,10 @@ static int nand_dump(nand_info_t *nand, ulong off, int 
only_oob)
while (i--) {
if (!only_oob) {
printf( \t%02x %02x %02x %02x %02x %02x %02x %02x
- %02x %02x %02x %02x %02x %02x %02x 
%02x\n,
-   p[0], p[1], p[2], p[3], p[4], p[5], 
p[6], p[7],
-   p[8], p[9], p[10], p[11], p[12], p[13], 
p[14], p[15]);
+ %02x %02x %02x %02x %02x %02x %02x %02x\n,
+   p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7],
+   p[8], p[9], p[10], p[11], p[12], p[13], p[14],
+   p[15]);
}
p += 16;
}
@@ -319,7 +320,6 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
 
}
 
-   /* read write */
if (strncmp(cmd, read, 4) == 0 || strncmp(cmd, write, 5) == 0) {
int read;
 
@@ -334,33 +334,13 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
return 1;
 
s = strchr(cmd, '.');
-   if (s != NULL 
-   (!strcmp(s, .jffs2) || !strcmp(s, .e) || !strcmp(s, 
.i))) {
-   if (read) {
-   /* read */
-   nand_read_options_t opts;
-   memset(opts, 0, sizeof(opts));
-   opts.buffer = (u_char*) addr;
-   opts.length = size;
-   opts.offset = off;
-   opts.quiet  = quiet;
-/*
- *  ! BROKEN !
- *
- *  TODO: Function must be implemented
- *
- * ret = nand_read_opts(nand, opts);
- */
-   } else {
-   /* write */
-   mtd_oob_ops_t opts;
-   memset(opts, 0, sizeof(opts));
-   opts.datbuf = (u_char*) addr;
-   opts.len= size;
-   opts.ooblen = 64;
-   opts.mode   = MTD_OOB_AUTO;
-   ret = nand_write_opts(nand, off, opts);
-   }
+   if (s != NULL  (!strcmp(s, .jffs2) ||
+ !strcmp(s, .e) || !strcmp(s, .i))) {
+   if (read)
+   ret = nand_read_skip_bad(nand, off, size, 
(u_char *)addr);
+   else
+   ret = nand_write_skip_bad(nand, off, size, 
(u_char *)addr);
+
} else if (s != NULL  !strcmp(s, .oob)) {
struct mtd_oob_ops ops;
 
@@ -374,7 +354,7 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
ret = nand-write_oob(nand, off, ops);
} else {
if (read)
-   ret = nand_read(nand, off, size, (u_char 
*)addr);
+   ret = nand_read_ff_upon_bad(nand, off, size, 
(u_char *)addr);
else
ret = nand_write(nand, off, size, (u_char 
*)addr);
}
@@ -399,6 +379,7 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
}
return 1;
}
+
if (strcmp(cmd, biterr) == 0) {
/* todo */
return 1;
@@ -489,23 +470,31 @@ usage:
return 1;
 }
 
-U_BOOT_CMD(nand, 5, 1, do_nand,
-   nand- NAND sub-system\n,
-   info  - show available NAND devices\n
-   nand device [dev] - show or set current device\n
-   nand read[.jffs2] - addr off|partition size\n
-   nand write[.jffs2]- addr off|partition size - read/write `size' 
bytes starting\n
-   at offset `off' to/from memory address `addr'\n
-   nand erase [clean] [off size] - erase `size' bytes from\n
-   offset `off' (entire device if not specified)\n
+U_BOOT_CMD(
+nand, 5, 1, do_nand,
+   nand - NAND sub-system\n,
+   info - show available NAND devices\n
+   

Re: [U-Boot-Users] [PATCH] 85xx/86xx: Move to dynamic mgmt of LAWs

2008-06-10 Thread Jon Loeliger
 With the new LAW interface (set_next_law) we can move to letting the
 system allocate which LAWs are used for what purpose.  This makes life
 a bit easier going forward with the new DDR code.
 
 Signed-off-by: Kumar Gala [EMAIL PROTECTED]
 ---
 
 Andy, I know this touches a few 86xx boards, but I'm 99.9% sure jdl will
 just ack it so please pick this up.
 
 - k

Acked-by: Jon Loeliger [EMAIL PROTECTED]

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [Junk released by Allow List] Command history no longer working

2008-06-10 Thread Magnus Lilja
Hi

On Thu, May 29, 2008 at 9:58 PM, Kenneth Johansson [EMAIL PROTECTED] wrote:
 I noticed that not a lot of platforms/boards set GD_FLG_RELOC so
 command history will probably cease to work for these boards also?

 Most boards do the relocation and then it gets set by the common
 board_init_r() function.

I got hit by this problem today and only after I figured out what was
really wrong I searched the mailing list archives and found this
thread (and a couple of others).


I'm using an ARM board and as far as I can see lib_arm/board.c does
not set the GD_FLG_RELOC bit, in fact no ARM boards do so in the
current git tree (according to grep anyway). Many other architectures
set the flag in their respective common lib_arch/board.c. Should/can
the GD_FLG_RELOC be set in a common place
(lib_arm/board.c:start_armboot) for ARM as well?

Or shall we place gd-flags |= GD_FLG_RELOC in the board specific init
routines/files?


Regards,
Magnus Lilja

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] Signed-off-by in mtd-2.6.22.1 branch

2008-06-10 Thread Stefan Roese
On Monday 09 June 2008, Scott Wood wrote:
 There are several patches from William Juul in the mtd-2.6.22.1 branch of
 u-boot-nand-flash that are missing Signed-off-by lines.  William or
 Stefan, can you provide sign-offs for these?

I have to admit that I don't remember all the details anymore. And I don't 
have the time to fully review those changes again right now. So if you really 
need my Signed-off-by for me handling/merging those patches from William, 
here you go:

Signed-off-by: Stefan Roese [EMAIL PROTECTED]

Scott, what are your plans on merging this branch into mainline now? In the 
next merge window?

Thanks.

Best regards,
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: [EMAIL PROTECTED]
=

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] 移植u-boot中的问题

2008-06-10 Thread sclgirl11
您好!
  我在移植u-boot1.1.2时,用skyeye模拟虽能运行,但不是不识flash;于是我在自己的开发板上(三星S3C44B0X)
 
上来运行,结果烧写了u-boot.bin文件后,开发板和超级终端上什么都不显示..是不是串口无法输出东西呢?我的串口设置的是不是不对啊?因为我是刚刚接触u-boot,所以不知道该怎么学习,出了问题也不会解决,肯请您解答一下吧,谢谢!
  如果您有移植成功的u-boot,开发板是S3C44B0X的话,麻烦您把源码和.bin文件传给我参考一下吧,有相关的u-boot资料也传给我,不胜感激了! 
 -
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] 85xx: extended cpu identification

2008-06-10 Thread Kumar Gala

On Jun 10, 2008, at 12:57 AM, Kim Phillips wrote:

 On Thu, 29 May 2008 03:20:08 -0500 (CDT)
 Kumar Gala [EMAIL PROTECTED] wrote:

 +struct cpu_type cpu_type_list [] = {
 +CPU_TYPE_ENTRY(8533, 8533, 0),
 +CPU_TYPE_ENTRY(8533, 8533_E, CPU_FTRS_HAS_CRYPTO),
 +CPU_TYPE_ENTRY(8540, 8540, 0),
 +CPU_TYPE_ENTRY(8541, 8541, 0),
 +CPU_TYPE_ENTRY(8541, 8541_E, CPU_FTRS_HAS_CRYPTO),
 +CPU_TYPE_ENTRY(8543, 8543, 0),
 +CPU_TYPE_ENTRY(8543, 8543_E, CPU_FTRS_HAS_CRYPTO),
 +CPU_TYPE_ENTRY(8544, 8544, 0),
 +CPU_TYPE_ENTRY(8544, 8544_E, CPU_FTRS_HAS_CRYPTO),
 +CPU_TYPE_ENTRY(8545, 8545, 0),
 +CPU_TYPE_ENTRY(8545, 8545_E, CPU_FTRS_HAS_CRYPTO),
 +CPU_TYPE_ENTRY(8547, 8547_E, CPU_FTRS_HAS_CRYPTO),
 +CPU_TYPE_ENTRY(8548, 8548, 0),
 +CPU_TYPE_ENTRY(8548, 8548_E, CPU_FTRS_HAS_CRYPTO),
 +CPU_TYPE_ENTRY(8555, 8555, 0),
 +CPU_TYPE_ENTRY(8555, 8555_E, CPU_FTRS_HAS_CRYPTO),
 +CPU_TYPE_ENTRY(8560, 8560, 0),
 +CPU_TYPE_ENTRY(8567, 8567, 0),
 +CPU_TYPE_ENTRY(8567, 8567_E, CPU_FTRS_HAS_CRYPTO),
 +CPU_TYPE_ENTRY(8568, 8568, 0),
 +CPU_TYPE_ENTRY(8568, 8568_E, CPU_FTRS_HAS_CRYPTO),
 +CPU_TYPE_ENTRY(8572, 8572, 0),
 +CPU_TYPE_ENTRY(8572, 8572_E, CPU_FTRS_HAS_CRYPTO),

 this seems like overkill given all we have to do is check one bit (see
 IS_E_PROCESSOR macro in handle crypto node patch I just sent out).

I don't trust our HW guys to keep w/that convention.  Plus we can use  
this mechanism for other things if need be.

- k

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] U-Boot Compilation error

2008-06-10 Thread Vijay Srivastava
Hi,

I am trying to compile uboot version 1.1.3 for ppc_870 board with the
following settings
bash$ export CROSS_COMPILE=ppc_8xx-
bash$ export PATH=${PATH}:/opt/eldk/bin:/opt/eldk/usr/bin

But I am getting following error:

make txc870_config

-
unrecognized option
make:  *** [txc870_config] Error 1
-

I added following lines in the Makefile to support my eval ppc870 board
(txc870)



--

#
## MPC8xx Systems
#

txc860_config:unconfig
@./mkconfig $(@:_config=) ppc mpc8xx txc860

txc870_config: unconfig
@./mkconfig $(@:_config=) ppc mpc8xx txc870

-

Also I tried for AMX860 with the following command
make AMX860_config

but got the same result...


Please indicate if I missed something or what what else is required ?


Thanks
Vijay
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] 85xx: extended cpu identification

2008-06-10 Thread Kim Phillips
On Tue, 10 Jun 2008 08:23:46 -0500
Kumar Gala [EMAIL PROTECTED] wrote:

 
 On Jun 10, 2008, at 12:57 AM, Kim Phillips wrote:
 
  On Thu, 29 May 2008 03:20:08 -0500 (CDT)
  Kumar Gala [EMAIL PROTECTED] wrote:
 
  +struct cpu_type cpu_type_list [] = {
  +  CPU_TYPE_ENTRY(8533, 8533, 0),
  +  CPU_TYPE_ENTRY(8533, 8533_E, CPU_FTRS_HAS_CRYPTO),
  +  CPU_TYPE_ENTRY(8540, 8540, 0),
  +  CPU_TYPE_ENTRY(8541, 8541, 0),
  +  CPU_TYPE_ENTRY(8541, 8541_E, CPU_FTRS_HAS_CRYPTO),
  +  CPU_TYPE_ENTRY(8543, 8543, 0),
  +  CPU_TYPE_ENTRY(8543, 8543_E, CPU_FTRS_HAS_CRYPTO),
  +  CPU_TYPE_ENTRY(8544, 8544, 0),
  +  CPU_TYPE_ENTRY(8544, 8544_E, CPU_FTRS_HAS_CRYPTO),
  +  CPU_TYPE_ENTRY(8545, 8545, 0),
  +  CPU_TYPE_ENTRY(8545, 8545_E, CPU_FTRS_HAS_CRYPTO),
  +  CPU_TYPE_ENTRY(8547, 8547_E, CPU_FTRS_HAS_CRYPTO),
  +  CPU_TYPE_ENTRY(8548, 8548, 0),
  +  CPU_TYPE_ENTRY(8548, 8548_E, CPU_FTRS_HAS_CRYPTO),
  +  CPU_TYPE_ENTRY(8555, 8555, 0),
  +  CPU_TYPE_ENTRY(8555, 8555_E, CPU_FTRS_HAS_CRYPTO),
  +  CPU_TYPE_ENTRY(8560, 8560, 0),
  +  CPU_TYPE_ENTRY(8567, 8567, 0),
  +  CPU_TYPE_ENTRY(8567, 8567_E, CPU_FTRS_HAS_CRYPTO),
  +  CPU_TYPE_ENTRY(8568, 8568, 0),
  +  CPU_TYPE_ENTRY(8568, 8568_E, CPU_FTRS_HAS_CRYPTO),
  +  CPU_TYPE_ENTRY(8572, 8572, 0),
  +  CPU_TYPE_ENTRY(8572, 8572_E, CPU_FTRS_HAS_CRYPTO),
 
  this seems like overkill given all we have to do is check one bit (see
  IS_E_PROCESSOR macro in handle crypto node patch I just sent out).
 
 I don't trust our HW guys to keep w/that convention.  Plus we can use  
 this mechanism for other things if need be.

they've been pretty good so far, and until the other thing comes
around, we can compact this table instead of expanding it - the 85xx_E
entries themselves are unnecessary.

Kim

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] Add mechanisms for CPU and board-specific Ethernet initialization

2008-06-10 Thread Ben Warren
On Tue, Jun 10, 2008 at 5:12 AM, Stefan Roese [EMAIL PROTECTED] wrote:
 Hi Ben,

 On Tuesday 10 June 2008, Ben Warren wrote:
 This patch is the first step in cleaning up net/eth.c, by moving Ethernet
 initialization to CPU or board-specific code.  Initial implementation is
 only on the Freescale TSEC controller, but others will be added soon.

 Great, thanks.

 snip

 diff --git a/net/eth.c b/net/eth.c
 index c4f24c6..e75dc43 100644
 --- a/net/eth.c
 +++ b/net/eth.c
 @@ -28,6 +28,12 @@

  #if defined(CONFIG_CMD_NET)  defined(CONFIG_NET_MULTI)

 +/* CPU and board-specific Ethernet initializations.  Aliased function
 + * signals caller to move on */
 +static int __def_eth_init(bd_t *bis) {return -1;}
 +int cpu_eth_init(bd_t *bis) __attribute((weak, alias(__def_eth_init)));
 +int board_eth_init(bd_t *bis) __attribute((weak,
 alias(__def_eth_init))); +
  #ifdef CFG_GT_6426x
  extern int gt6426x_eth_initialize(bd_t *bis);
  #endif
 @@ -165,6 +171,10 @@ int eth_initialize(bd_t *bis)
  #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
   miiphy_init();
  #endif
 + /* Try CPU-specific initialization first.  If it fails or isn't
 +  * present, call the board-specific initialization */
 + if (cpu_eth_init(bis)  0 )

 Nitpicking: No space before ) please.
Huh, don't know how I missed that one.

 + board_eth_init(bis);

 Shouldn't this be the other way around?

 +   if (board_eth_init(bis)  0)
 +   eth_eth_init(bis);

 So that the board init routine can overwrite the cpu init version.

Yeah, I think you're right.  If board_eth_init() exists, it gets
highest priority.  New patch coming soon!

 Best regards,
 Stefan

Thanks for the review,
Ben

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH v2] Add mechanisms for CPU and board-specific Ethernet initialization

2008-06-10 Thread Ben Warren
This patch is the first step in cleaning up net/eth.c, by moving Ethernet
initialization to CPU or board-specific code.  Initial implementation is
only on the Freescale TSEC controller, but others will be added soon.

Signed-off-by: Ben Warren [EMAIL PROTECTED]
---

When we discussed this a few months ago, I was planning on defining the 
cpu_eth_init() and board_eth_init() functions as weak with no aliases, but in
my testing this did not result in them being NULL, hence the default function.

 board/atum8548/atum8548.c |   18 +++
 board/freescale/mpc8313erdb/mpc8313erdb.c |   12 ++
 board/freescale/mpc8315erdb/mpc8315erdb.c |   12 ++
 board/freescale/mpc8349emds/mpc8349emds.c |   12 ++
 board/freescale/mpc8349itx/mpc8349itx.c   |   12 ++
 board/freescale/mpc837xemds/mpc837xemds.c |   12 ++
 board/freescale/mpc837xerdb/mpc837xerdb.c |   13 +++
 board/freescale/mpc8540ads/mpc8540ads.c   |   22 ++
 board/freescale/mpc8541cds/mpc8541cds.c   |   12 ++
 board/freescale/mpc8544ds/mpc8544ds.c |   18 +++
 board/freescale/mpc8548cds/mpc8548cds.c   |   18 +++
 board/freescale/mpc8555cds/mpc8555cds.c   |   12 ++
 board/freescale/mpc8560ads/mpc8560ads.c   |   12 ++
 board/freescale/mpc8568mds/mpc8568mds.c   |   12 ++
 board/freescale/mpc8641hpcn/mpc8641hpcn.c |   18 +++
 board/mpc8540eval/mpc8540eval.c   |   22 ++
 board/pm854/pm854.c   |   22 ++
 board/pm856/pm856.c   |   12 ++
 board/sbc8349/sbc8349.c   |   12 ++
 board/sbc8548/sbc8548.c   |   18 +++
 board/sbc8560/sbc8560.c   |9 +++
 board/sbc8641d/sbc8641d.c |   18 +++
 board/stxgp3/stxgp3.c |   12 ++
 board/stxssa/stxssa.c |   12 ++
 board/tqm834x/tqm834x.c   |   12 ++
 board/tqm85xx/tqm85xx.c   |   22 ++
 include/netdev.h  |   34 +
 net/eth.c |   26 -
 28 files changed, 430 insertions(+), 16 deletions(-)
 create mode 100644 include/netdev.h

diff --git a/board/atum8548/atum8548.c b/board/atum8548/atum8548.c
index 2f6ae29..d6bd8ae 100644
--- a/board/atum8548/atum8548.c
+++ b/board/atum8548/atum8548.c
@@ -34,6 +34,7 @@
 #include miiphy.h
 #include libfdt.h
 #include fdt_support.h
+#include netdev.h
 
 #if defined(CONFIG_DDR_ECC)  !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
 extern void ddr_enable_ecc(unsigned int dram_size);
@@ -417,3 +418,20 @@ ft_board_setup(void *blob, bd_t *bd)
}
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+#if defined(CONFIG_TSEC1)
+   tsec_initialize(bis, 0, CONFIG_TSEC1_NAME);
+#endif
+#if defined(CONFIG_TSEC2)
+   tsec_initialize(bis, 1, CONFIG_TSEC2_NAME);
+#endif
+#if defined(CONFIG_TSEC3)
+   tsec_initialize(bis, 2, CONFIG_TSEC3_NAME);
+#endif
+#if defined(CONFIG_TSEC4)
+   tsec_initialize(bis, 3, CONFIG_TSEC4_NAME);
+#endif
+   return 0;
+}
diff --git a/board/freescale/mpc8313erdb/mpc8313erdb.c 
b/board/freescale/mpc8313erdb/mpc8313erdb.c
index 7cbdb7b..00abb6b 100644
--- a/board/freescale/mpc8313erdb/mpc8313erdb.c
+++ b/board/freescale/mpc8313erdb/mpc8313erdb.c
@@ -29,6 +29,7 @@
 #include pci.h
 #include mpc83xx.h
 #include vsc7385.h
+#include netdev.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -128,3 +129,14 @@ void ft_board_setup(void *blob, bd_t *bd)
 #endif
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+#if defined(CONFIG_TSEC1)
+   tsec_initialize(bis, 0, CONFIG_TSEC1_NAME);
+#endif
+#if defined(CONFIG_TSEC2)
+   tsec_initialize(bis, 1, CONFIG_TSEC2_NAME);
+#endif
+   return 0;
+}
diff --git a/board/freescale/mpc8315erdb/mpc8315erdb.c 
b/board/freescale/mpc8315erdb/mpc8315erdb.c
index 7af36dd..136b0aa 100644
--- a/board/freescale/mpc8315erdb/mpc8315erdb.c
+++ b/board/freescale/mpc8315erdb/mpc8315erdb.c
@@ -30,6 +30,7 @@
 #endif
 #include pci.h
 #include mpc83xx.h
+#include netdev.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -130,3 +131,14 @@ void ft_board_setup(void *blob, bd_t *bd)
 #endif
 }
 #endif
+
+int board_eth_init(bd_t *bis)
+{
+#if defined(CONFIG_TSEC1)
+   tsec_initialize(bis, 0, CONFIG_TSEC1_NAME);
+#endif
+#if defined(CONFIG_TSEC2)
+   tsec_initialize(bis, 1, CONFIG_TSEC2_NAME);
+#endif
+   return 0;
+}
diff --git a/board/freescale/mpc8349emds/mpc8349emds.c 
b/board/freescale/mpc8349emds/mpc8349emds.c
index 6c82596..59ace6c 100644
--- a/board/freescale/mpc8349emds/mpc8349emds.c
+++ b/board/freescale/mpc8349emds/mpc8349emds.c
@@ -30,6 +30,7 @@
 #include spi.h
 #include miiphy.h
 #include spd_sdram.h
+#include netdev.h
 
 #if defined(CONFIG_OF_LIBFDT)
 #include libfdt.h
@@ -287,3 +288,14 @@ void ft_board_setup(void *blob, 

Re: [U-Boot-Users] U-Boot Compilation error

2008-06-10 Thread Jerry Van Baren
Vijay Srivastava wrote:
 
 
 Hi,
 
 I am trying to compile uboot version 1.1.3 for ppc_870 board with the 
 following settings
 bash$ export CROSS_COMPILE=ppc_8xx-
 bash$ export PATH=${PATH}:/opt/eldk/bin:/opt/eldk/usr/bin
 
 But I am getting following error:
 
 make txc870_config

What does the command which make say?  Are you running the make 
program that you expect?

What does make --version say?

FWIIW, on my debian system I see (note that we are using the native make 
to do the cross compile):

$ which make
/usr/bin/make

$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i486-pc-linux-gnu

Best regards,
gvb

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] 85xx: extended cpu identification

2008-06-10 Thread Kumar Gala

On Jun 10, 2008, at 8:48 AM, Kim Phillips wrote:

 On Tue, 10 Jun 2008 08:23:46 -0500
 Kumar Gala [EMAIL PROTECTED] wrote:


 On Jun 10, 2008, at 12:57 AM, Kim Phillips wrote:

 On Thu, 29 May 2008 03:20:08 -0500 (CDT)
 Kumar Gala [EMAIL PROTECTED] wrote:

 +struct cpu_type cpu_type_list [] = {
 +  CPU_TYPE_ENTRY(8533, 8533, 0),
 +  CPU_TYPE_ENTRY(8533, 8533_E, CPU_FTRS_HAS_CRYPTO),
 +  CPU_TYPE_ENTRY(8540, 8540, 0),
 +  CPU_TYPE_ENTRY(8541, 8541, 0),
 +  CPU_TYPE_ENTRY(8541, 8541_E, CPU_FTRS_HAS_CRYPTO),
 +  CPU_TYPE_ENTRY(8543, 8543, 0),
 +  CPU_TYPE_ENTRY(8543, 8543_E, CPU_FTRS_HAS_CRYPTO),
 +  CPU_TYPE_ENTRY(8544, 8544, 0),
 +  CPU_TYPE_ENTRY(8544, 8544_E, CPU_FTRS_HAS_CRYPTO),
 +  CPU_TYPE_ENTRY(8545, 8545, 0),
 +  CPU_TYPE_ENTRY(8545, 8545_E, CPU_FTRS_HAS_CRYPTO),
 +  CPU_TYPE_ENTRY(8547, 8547_E, CPU_FTRS_HAS_CRYPTO),
 +  CPU_TYPE_ENTRY(8548, 8548, 0),
 +  CPU_TYPE_ENTRY(8548, 8548_E, CPU_FTRS_HAS_CRYPTO),
 +  CPU_TYPE_ENTRY(8555, 8555, 0),
 +  CPU_TYPE_ENTRY(8555, 8555_E, CPU_FTRS_HAS_CRYPTO),
 +  CPU_TYPE_ENTRY(8560, 8560, 0),
 +  CPU_TYPE_ENTRY(8567, 8567, 0),
 +  CPU_TYPE_ENTRY(8567, 8567_E, CPU_FTRS_HAS_CRYPTO),
 +  CPU_TYPE_ENTRY(8568, 8568, 0),
 +  CPU_TYPE_ENTRY(8568, 8568_E, CPU_FTRS_HAS_CRYPTO),
 +  CPU_TYPE_ENTRY(8572, 8572, 0),
 +  CPU_TYPE_ENTRY(8572, 8572_E, CPU_FTRS_HAS_CRYPTO),

 this seems like overkill given all we have to do is check one bit  
 (see
 IS_E_PROCESSOR macro in handle crypto node patch I just sent out).

 I don't trust our HW guys to keep w/that convention.  Plus we can use
 this mechanism for other things if need be.

 they've been pretty good so far, and until the other thing comes
 around, we can compact this table instead of expanding it - the 85xx_E
 entries themselves are unnecessary.

I disagree and would prefer to keep it as I've done as it provides the  
most flexibility.

- k

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] Add mechanisms for CPU and board-specific Ethernet initialization

2008-06-10 Thread Shinya Kuribayashi
Ben Warren wrote:
 @@ -165,6 +171,10 @@ int eth_initialize(bd_t *bis)
  #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
   miiphy_init();
  #endif
 + /* Try CPU-specific initialization first.  If it fails or isn't
 +  * present, call the board-specific initialization */
 + if (cpu_eth_init(bis)  0 )
 Nitpicking: No space before ) please.
 Huh, don't know how I missed that one.
 + board_eth_init(bis);
 Shouldn't this be the other way around?

 +   if (board_eth_init(bis)  0)
 +   eth_eth_init(bis);

 So that the board init routine can overwrite the cpu init version.

 Yeah, I think you're right.  If board_eth_init() exists, it gets
 highest priority.

Just wondered, does that mean we could only have either cpu_eth_init or
board_eth_init at a time?

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH 1/4] Change initdram() return type to phys_size_t

2008-06-10 Thread Jon Loeliger
On Mon, 2008-06-09 at 20:37 -0500, Becky Bruce wrote:
 This patch changes the return type of initdram() from long int to phys_size_t.
 This is required for a couple of reasons: long int limits the amount of dram
 to 2GB, and u-boot in general is moving over to phys_size_t to represent the
 size of physical memory.  phys_size_t is defined as an unsigned long on almost
 all current platforms.
 
 This patch *only* changes the return type of the initdram function (in
 include/common.h, as well as in each board's implementation of initdram).  It
 does not actually modify the code inside the function on any of the platforms;
 platforms which wish to support more than 2GB of DRAM will need to modify
 their initdram() function code.
 
 Build tested with MAKEALL for ppc, arm, mips, mips-el. Booted on powerpc
 MPC8641HPCN.
 
 Patch is too large for the list, and is located at:
 http://gate.crashing.org/~galak/0001-Change-initdram-return-type-to-phys_size_t.patch

The whole 4-part series:

Acked-by: Jon Loeliger [EMAIL PROTECTED]

jdl



-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH 1/4] Change initdram( ) return type to phys_size_t

2008-06-10 Thread Stefan Roese
On Tuesday 10 June 2008, Jon Loeliger wrote:
 On Mon, 2008-06-09 at 20:37 -0500, Becky Bruce wrote:
  This patch changes the return type of initdram() from long int to
  phys_size_t. This is required for a couple of reasons: long int limits
  the amount of dram to 2GB, and u-boot in general is moving over to
  phys_size_t to represent the size of physical memory.  phys_size_t is
  defined as an unsigned long on almost all current platforms.
 
  This patch *only* changes the return type of the initdram function (in
  include/common.h, as well as in each board's implementation of initdram).
   It does not actually modify the code inside the function on any of the
  platforms; platforms which wish to support more than 2GB of DRAM will
  need to modify their initdram() function code.
 
  Build tested with MAKEALL for ppc, arm, mips, mips-el. Booted on powerpc
  MPC8641HPCN.
 
  Patch is too large for the list, and is located at:
  http://gate.crashing.org/~galak/0001-Change-initdram-return-type-to-phys_
 size_t.patch

 The whole 4-part series:

 Acked-by: Jon Loeliger [EMAIL PROTECTED]

Acked-by: Stefan Roese [EMAIL PROTECTED]

Thanks.

Best regards,
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: [EMAIL PROTECTED]
=

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH v2] Add mechanisms for CPU and board-specific Ethernet initialization

2008-06-10 Thread Jon Loeliger
On Tue, 2008-06-10 at 07:03 -0700, Ben Warren wrote:
 +#if defined(CONFIG_TSEC1)
 +   tsec_initialize(bis, 0, CONFIG_TSEC1_NAME);
 +#endif
 +#if defined(CONFIG_TSEC2)
 +   tsec_initialize(bis, 1, CONFIG_TSEC2_NAME);
 +#endif
 +#if defined(CONFIG_MPC85XX_FEC)
 +   tsec_initialize(bis, 2, CONFIG_MPC85XX_FEC_NAME);
 +#else
 +#if defined(CONFIG_TSEC3)
 +   tsec_initialize(bis, 2, CONFIG_TSEC3_NAME);
 +#endif
 +#if defined(CONFIG_TSEC4)
 +   tsec_initialize(bis, 3, CONFIG_TSEC4_NAME);
 +#endif
 +#endif
 +   return 0;
 +}

So, why not make a new function in tsec.c called something
like tsec_initialize_all(bis) with essentially the above
#ifdef-series and make all of the individual board functions
just be like:

+int board_eth_init(bd_t *bis)
+{
+   tsec_initialize_all(bis);
+   return 0;
+}

Just a notion.  Haven't actually thought about it...

jdl




-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] Add mechanisms for CPU and board-specific Ethernet initialization

2008-06-10 Thread Shinya Kuribayashi
Stefan Roese wrote:
 On Tuesday 10 June 2008, Shinya Kuribayashi wrote:
 Shouldn't this be the other way around?

 +   if (board_eth_init(bis)  0)
 +   eth_eth_init(bis);

 So that the board init routine can overwrite the cpu init version.
 Yeah, I think you're right.  If board_eth_init() exists, it gets
 highest priority.
 Just wondered, does that mean we could only have either cpu_eth_init or
 board_eth_init at a time?
 
 Not really. board_eth_init() could call cpu_eth_init() if necessary.

Hm. What is cpu_eth_init for then? Just

board_eth_init(bis);

seems to be enough for me. I also wonder where is the best place to have
cpu_eth_init?

I'm not going to argue with you, I'm just thinking about my targets. One
of my targets has internal ethernet MAC, and its evaluation board has an
on-board external PCI NIC. Another target has internal MAC, but doesn't
have PCI NIC.

I thought it'll be something like

cpu_eth_init(bis);
board_eth_init(bis);

But again, I don't have strong opinions around here. Please go ahead.


Thanks for your comments,

  Shinya


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] 85xx: extended cpu identification

2008-06-10 Thread Kim Phillips
On Tue, 10 Jun 2008 10:10:02 -0500
Kumar Gala [EMAIL PROTECTED] wrote:

 
 On Jun 10, 2008, at 8:48 AM, Kim Phillips wrote:
 
  On Tue, 10 Jun 2008 08:23:46 -0500
  Kumar Gala [EMAIL PROTECTED] wrote:
 
 
  On Jun 10, 2008, at 12:57 AM, Kim Phillips wrote:
 
  On Thu, 29 May 2008 03:20:08 -0500 (CDT)
  Kumar Gala [EMAIL PROTECTED] wrote:
 
  +struct cpu_type cpu_type_list [] = {
  +CPU_TYPE_ENTRY(8533, 8533, 0),
  +CPU_TYPE_ENTRY(8533, 8533_E, CPU_FTRS_HAS_CRYPTO),
  +CPU_TYPE_ENTRY(8540, 8540, 0),
  +CPU_TYPE_ENTRY(8541, 8541, 0),
  +CPU_TYPE_ENTRY(8541, 8541_E, CPU_FTRS_HAS_CRYPTO),
  +CPU_TYPE_ENTRY(8543, 8543, 0),
  +CPU_TYPE_ENTRY(8543, 8543_E, CPU_FTRS_HAS_CRYPTO),
  +CPU_TYPE_ENTRY(8544, 8544, 0),
  +CPU_TYPE_ENTRY(8544, 8544_E, CPU_FTRS_HAS_CRYPTO),
  +CPU_TYPE_ENTRY(8545, 8545, 0),
  +CPU_TYPE_ENTRY(8545, 8545_E, CPU_FTRS_HAS_CRYPTO),
  +CPU_TYPE_ENTRY(8547, 8547_E, CPU_FTRS_HAS_CRYPTO),
  +CPU_TYPE_ENTRY(8548, 8548, 0),
  +CPU_TYPE_ENTRY(8548, 8548_E, CPU_FTRS_HAS_CRYPTO),
  +CPU_TYPE_ENTRY(8555, 8555, 0),
  +CPU_TYPE_ENTRY(8555, 8555_E, CPU_FTRS_HAS_CRYPTO),
  +CPU_TYPE_ENTRY(8560, 8560, 0),
  +CPU_TYPE_ENTRY(8567, 8567, 0),
  +CPU_TYPE_ENTRY(8567, 8567_E, CPU_FTRS_HAS_CRYPTO),
  +CPU_TYPE_ENTRY(8568, 8568, 0),
  +CPU_TYPE_ENTRY(8568, 8568_E, CPU_FTRS_HAS_CRYPTO),
  +CPU_TYPE_ENTRY(8572, 8572, 0),
  +CPU_TYPE_ENTRY(8572, 8572_E, CPU_FTRS_HAS_CRYPTO),
 
  this seems like overkill given all we have to do is check one bit  
  (see
  IS_E_PROCESSOR macro in handle crypto node patch I just sent out).
 
  I don't trust our HW guys to keep w/that convention.  Plus we can use
  this mechanism for other things if need be.
 
  they've been pretty good so far, and until the other thing comes
  around, we can compact this table instead of expanding it - the 85xx_E
  entries themselves are unnecessary.
 
 I disagree and would prefer to keep it as I've done as it provides the  
 most flexibility.

it's easier to do a IS_E_PROCESSOR(get_svr()) from cpu/mpc85xx/fdt.c
instead of getting ver, calling cpu = identify_cpu(ver), and then
checking cpu-features every time.  I don't know what other features
you have in mind (perhaps this patch should wait until then?), but
HAS_CRYPTO is either on or off, and the bit already exists in the h/w..

Kim

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] fdt: unshadow global working fdt variable

2008-06-10 Thread Kim Phillips
differentiate with local variables of the same name by renaming the
global 'fdt' variable 'working_fdt'.

Signed-off-by: Kim Phillips [EMAIL PROTECTED]
---
applies to current u-boot-fdt.git.

 common/cmd_fdt.c |  114 +++---
 common/fdt_support.c |2 +-
 include/libfdt_env.h |2 +-
 lib_ppc/bootm.c  |2 +-
 4 files changed, 64 insertions(+), 56 deletions(-)

diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
index 4285a96..5c3a0bb 100644
--- a/common/cmd_fdt.c
+++ b/common/cmd_fdt.c
@@ -62,7 +62,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
/*
 * Set the address [and length] of the fdt.
 */
-   fdt = (struct fdt_header *)simple_strtoul(argv[2], NULL, 16);
+   working_fdt = (struct fdt_header *)simple_strtoul(argv[2], 
NULL, 16);
 
if (!fdt_valid()) {
return 1;
@@ -75,15 +75,15 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
 * Optional new length
 */
len = simple_strtoul(argv[3], NULL, 16);
-   if (len  fdt_totalsize(fdt)) {
+   if (len  fdt_totalsize(working_fdt)) {
printf (New length %d  existing length %d, 
ignoring.\n,
-   len, fdt_totalsize(fdt));
+   len, fdt_totalsize(working_fdt));
} else {
/*
 * Open in place with a new length.
 */
-   err = fdt_open_into(fdt, fdt, len);
+   err = fdt_open_into(working_fdt, working_fdt, 
len);
if (err != 0) {
printf (libfdt fdt_open_into(): %s\n,
fdt_strerror(err));
@@ -92,7 +92,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
}
 
/
-* Move the fdt
+* Move the working_fdt
 /
} else if (strncmp(argv[1], mo, 2) == 0) {
struct fdt_header *newaddr;
@@ -107,7 +107,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
/*
 * Set the address and length of the fdt.
 */
-   fdt = (struct fdt_header *)simple_strtoul(argv[2], NULL, 16);
+   working_fdt = (struct fdt_header *)simple_strtoul(argv[2], 
NULL, 16);
if (!fdt_valid()) {
return 1;
}
@@ -119,13 +119,13 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
 * current length.
 */
if (argc = 4) {
-   len = fdt_totalsize(fdt);
+   len = fdt_totalsize(working_fdt);
} else {
len = simple_strtoul(argv[4], NULL, 16);
-   if (len  fdt_totalsize(fdt)) {
+   if (len  fdt_totalsize(working_fdt)) {
printf (New length 0x%X  existing length 
0x%X, aborting.\n,
-   len, fdt_totalsize(fdt));
+   len, fdt_totalsize(working_fdt));
return 1;
}
}
@@ -133,13 +133,13 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
/*
 * Copy to the new location.
 */
-   err = fdt_open_into(fdt, newaddr, len);
+   err = fdt_open_into(working_fdt, newaddr, len);
if (err != 0) {
printf (libfdt fdt_open_into(): %s\n,
fdt_strerror(err));
return 1;
}
-   fdt = newaddr;
+   working_fdt = newaddr;
 
/
 * Make a new node
@@ -161,7 +161,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
pathp = argv[2];
nodep = argv[3];
 
-   nodeoffset = fdt_path_offset (fdt, pathp);
+   nodeoffset = fdt_path_offset (working_fdt, pathp);
if (nodeoffset  0) {
/*
 * Not found or something else bad happened.
@@ -170,7 +170,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])

Re: [U-Boot-Users] [PATCH v2] Add mechanisms for CPU and board-specific Ethernet initialization

2008-06-10 Thread Ben Warren
Jon Loeliger wrote:
 On Tue, 2008-06-10 at 07:03 -0700, Ben Warren wrote:
   
 +#if defined(CONFIG_TSEC1)
 +   tsec_initialize(bis, 0, CONFIG_TSEC1_NAME);
 +#endif
 +#if defined(CONFIG_TSEC2)
 +   tsec_initialize(bis, 1, CONFIG_TSEC2_NAME);
 +#endif
 +#if defined(CONFIG_MPC85XX_FEC)
 +   tsec_initialize(bis, 2, CONFIG_MPC85XX_FEC_NAME);
 +#else
 +#if defined(CONFIG_TSEC3)
 +   tsec_initialize(bis, 2, CONFIG_TSEC3_NAME);
 +#endif
 +#if defined(CONFIG_TSEC4)
 +   tsec_initialize(bis, 3, CONFIG_TSEC4_NAME);
 +#endif
 +#endif
 +   return 0;
 +}
 

 So, why not make a new function in tsec.c called something
 like tsec_initialize_all(bis) with essentially the above
 #ifdef-series and make all of the individual board functions
 just be like:

 +int board_eth_init(bd_t *bis)
 +{
 +   tsec_initialize_all(bis);
 +   return 0;
 +}

   
I'd prefer to abstract index information away from the drivers.  That 
way if you guys come up with a chip that has 8 TSECs, the driver doesn't 
have to change.  Next release cycle I'm planning on bringing in PHY lib 
support, in which case we'll want to pass specific info to each instance 
of the TSEC.  That said, what you're suggesting would be a good 
candidate for a cpu_eth_init() function, that can be overridden by 
board_eth_init() if desired.  Ya man, I dig it.  I'll play around with 
that tonight.
 Just a notion.  Haven't actually thought about it...

   
Please keep not thinking.  It's more interesting than most peoples' 
fully-baked discussion :)
 jdl

   
cheers,
Ben

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] fdt: unshadow global working fdt variable

2008-06-10 Thread Kumar Gala

On Jun 10, 2008, at 11:06 AM, Kim Phillips wrote:

 differentiate with local variables of the same name by renaming the
 global 'fdt' variable 'working_fdt'.

 Signed-off-by: Kim Phillips [EMAIL PROTECTED]
 ---
 applies to current u-boot-fdt.git.

thank you, this was just evil.

- k


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] Add mechanisms for CPU and board-specific Ethernet initialization

2008-06-10 Thread Ben Warren
Shinya Kuribayashi wrote:
 Stefan Roese wrote:
 On Tuesday 10 June 2008, Shinya Kuribayashi wrote:
 Shouldn't this be the other way around?

 +   if (board_eth_init(bis)  0)
 +   eth_eth_init(bis);

 So that the board init routine can overwrite the cpu init version.
 Yeah, I think you're right.  If board_eth_init() exists, it gets
 highest priority.
 Just wondered, does that mean we could only have either cpu_eth_init or
 board_eth_init at a time?

 Not really. board_eth_init() could call cpu_eth_init() if necessary.

 Hm. What is cpu_eth_init for then? Just

board_eth_init(bis);

 seems to be enough for me. I also wonder where is the best place to have
 cpu_eth_init?

The cpu_init() was suggested by Stefan in our original discussion, when 
I only had the board function.  His perspective is ppc_4xx, where tons 
of CPUs and boards share the EMAC driver, and he didn't want to modify 
each board.  As you'll see in the discussion with JDL, it can probably 
apply to TSEC as well.
 I'm not going to argue with you, I'm just thinking about my targets. One
 of my targets has internal ethernet MAC, and its evaluation board has an
 on-board external PCI NIC. Another target has internal MAC, but doesn't
 have PCI NIC.

 I thought it'll be something like

cpu_eth_init(bis);
board_eth_init(bis);

The idea is that cpu_eth_init is a default for a CPU family, and 
board_eth_init is a board override, which can of course call cpu_eth_init.
 But again, I don't have strong opinions around here. Please go ahead.


 Thanks for your comments,

  Shinya

Thanks for the discussion!

cheers,
Ben


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] Signed-off-by in mtd-2.6.22.1 branch

2008-06-10 Thread Scott Wood
On Tue, Jun 10, 2008 at 02:35:36PM +0200, Stefan Roese wrote:
 I have to admit that I don't remember all the details anymore. And I don't
 have the time to fully review those changes again right now. So if you
 really need my Signed-off-by for me handling/merging those patches from
 William, here you go:
 
 Signed-off-by: Stefan Roese [EMAIL PROTECTED]

Thanks.

 Scott, what are your plans on merging this branch into mainline now? In
 the next merge window?

Yes.  I've rebased it against current u-boot, and I'll push it to a testing
branch soon.

-Scott

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [Patch] U-Boot-V2: Board: SDP3430: fix ram driver for ioctl, open, close change

2008-06-10 Thread Menon, Nishanth
Commit ee6d36a5405305f3bbdb0457948c219731b3d9cc introduced requirement for 
default functions be registered. Without this accessing /dev/ram0 will not work 
on SDP3430 in the default config.

Signed-off-by: Nishanth Menon[EMAIL PROTECTED]

---
 board/omap/board-sdp343x.c |3 +++
 1 file changed, 3 insertions(+)

Index: u-boot-v2.git/board/omap/board-sdp343x.c
===
--- u-boot-v2.git.orig/board/omap/board-sdp343x.c   2008-06-10 
13:03:29.0 -0500
+++ u-boot-v2.git/board/omap/board-sdp343x.c2008-06-10 13:03:56.0 
-0500
@@ -656,8 +656,11 @@
 static struct driver_d ram_drv = {
.name = ram,
.probe = dummy_probe,
+   .open  = dev_open_default,
+   .close = dev_close_default,
.read = mem_read,
.write = mem_write,
+   .lseek  = dev_lseek_default,
.type = DEVICE_TYPE_DRAM,
 };
 #endif

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] Signed-off-by in mtd-2.6.22.1 branch

2008-06-10 Thread Stefan Roese
On Tuesday 10 June 2008, Scott Wood wrote:
  Scott, what are your plans on merging this branch into mainline now? In
  the next merge window?

 Yes.  I've rebased it against current u-boot, and I'll push it to a testing
 branch soon.

Great. Thanks.

Best regards,
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: [EMAIL PROTECTED]
=

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH v2] 85xx/86xx: Move to dynamic mgmt of LAWs

2008-06-10 Thread Becky Bruce

On Jun 10, 2008, at 12:03 AM, Kumar Gala wrote:

 With the new LAW interface (set_next_law) we can move to letting the
 system allocate which LAWs are used for what purpose.  This makes life
 a bit easier going forward with the new DDR code.

 Signed-off-by: Kumar Gala [EMAIL PROTECTED]
 ---



Acked-by: Becky Bruce [EMAIL PROTECTED]

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] Please pull mpc83xx.git

2008-06-10 Thread Kim Phillips
Wolfgang,

please pull support for the MVBLM7 board and some local bus define
refactoring:

The following changes since commit 8155efbd7ae9c65564ca98affe94631d612ae088:
  Wolfgang Denk (1):
Merge branch 'master' of ssh://mercury/home/wd/git/u-boot/master

are available in the git repository at:

  git://git.denx.de/u-boot-mpc83xx.git

Andre Schwarz (2):
  add MPC8343 based board mvBlueLYNX-M7 (doc+config)
  add MPC8343 based board mvBlueLYNX-M7 (board+make files)

Anton Vorontsov (2):
  83xx/85xx/86xx: factor out Freescale Localbus defines out of mpc83xx.h
  83xx/85xx: further localbus cleanups

Kim Phillips (1):
  mpc83xx: MVBLM7: minor build fixups

Tor Krill (1):
  Add missing CSCONFIG_BANK_BIT_3 define to mpc83xx.h

 CREDITS|4 +
 MAINTAINERS|4 +
 MAKEALL|1 +
 Makefile   |3 +
 board/mvblm7/Makefile  |   48 
 board/mvblm7/config.mk |   25 ++
 board/mvblm7/fpga.c|  188 
 board/mvblm7/fpga.h|   34 +++
 board/mvblm7/mvblm7.c  |  157 +
 board/mvblm7/mvblm7.h  |   21 ++
 board/mvblm7/mvblm7_autoscript |   37 +++
 board/mvblm7/pci.c |  133 +++
 doc/README.mvblm7  |   85 +++
 include/asm-ppc/fsl_lbc.h  |  264 ++
 include/configs/MPC8315ERDB.h  |2 +-
 include/configs/MPC8349EMDS.h  |2 +-
 include/configs/MPC8349ITX.h   |4 +-
 include/configs/MPC8360EMDS.h  |2 +-
 include/configs/MPC8360ERDK.h  |2 +-
 include/configs/MPC837XEMDS.h  |2 +-
 include/configs/MVBLM7.h   |  479 
 include/configs/TQM834x.h  |2 +-
 include/mpc83xx.h  |  235 +---
 include/mpc85xx.h  |   37 +---
 include/mpc86xx.h  |2 +
 25 files changed, 1497 insertions(+), 276 deletions(-)
 create mode 100644 board/mvblm7/Makefile
 create mode 100644 board/mvblm7/config.mk
 create mode 100644 board/mvblm7/fpga.c
 create mode 100644 board/mvblm7/fpga.h
 create mode 100644 board/mvblm7/mvblm7.c
 create mode 100644 board/mvblm7/mvblm7.h
 create mode 100644 board/mvblm7/mvblm7_autoscript
 create mode 100644 board/mvblm7/pci.c
 create mode 100644 doc/README.mvblm7
 create mode 100644 include/asm-ppc/fsl_lbc.h
 create mode 100644 include/configs/MVBLM7.h

Thanks,

Kim

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] Teridian Phy Support tr78q21x3

2008-06-10 Thread Anatolij Gustschin
Hello,

Manuel Sahm wrote:

 I added a Teridian Phy Driver (tr78q21x3) to the Uboot version 1.3.0
 It works. (even in linux when I use the linux generic macb driver)
 
 If I try to use the latest u-boot-version (1.3.3) with the macb driver - 
 ethernet doesn?t work (in u-boot and linux).
 I don?t know how to add my phy driver to the latest u-boot version !

Maybe it is not a phy driver problem? Teridian phy 78q21x3 supports only
MII mode. Reverse the following patch locally and check if ethernet works
again:

http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blobdiff_plain;f=drivers/net/macb.c;h=e5733f6e5b23c6ad7a05dfbda0b5a3d783f701f7;hp=6657d22926b55f4000c03095bb9b87af53247056;hb=8e429b3eee23927c1222679f6b6f53667b21595c;hpb=422b1a01602b6e2fbf8444a1192c7ba31461fd4c

Best regards,
Anatolij


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] 85xx: extended cpu identification

2008-06-10 Thread Wolfgang Denk
In message [EMAIL PROTECTED] you wrote:
 
  I don't trust our HW guys to keep w/that convention.  Plus we can use
  this mechanism for other things if need be.
 
  they've been pretty good so far, and until the other thing comes
  around, we can compact this table instead of expanding it - the 85xx_E
  entries themselves are unnecessary.
 
 I disagree and would prefer to keep it as I've done as it provides the  
 most flexibility.

I vote with the others for the short and readable form.

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: [EMAIL PROTECTED]
core error - bus dumped

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] U-Boot Compilation error

2008-06-10 Thread Wolfgang Denk
In message [EMAIL PROTECTED] you wrote:
 
 I am trying to compile uboot version 1.1.3 for ppc_870 board with the

There is no such board as ppc_870 in the U-Boot source tree.

 make txc870_config

There is no such target as txc870 in the U-Boot source tree.

 unrecognized option
 make:  *** [txc870_config] Error 1

It seemd your Makefile was modified, and bugs introduced.

 I added following lines in the Makefile to support my eval ppc870 board
 (txc870)

This is not sufficient to port U-Boot for new hardware. Please read
the README and the other documentation.

 Also I tried for AMX860 with the following command
 make AMX860_config
 
 but got the same result...

This is then a result of your incorrect modigications. The unmodified
1.1.3 U-Boot source tree builds just fine.

 --=_Part_18146_561575.1213104560034
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline

Please never post HTML 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: [EMAIL PROTECTED]
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

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] FSL LAW: Add new interface to use the last free LAW

2008-06-10 Thread Kumar Gala
LAWs have the concept of priority so its useful to be able to allocate
the lowest (highest number) priority.  We will end up using this with the
new DDR code.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---
 drivers/misc/fsl_law.c|   19 +++
 include/asm-ppc/fsl_law.h |1 +
 2 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/drivers/misc/fsl_law.c b/drivers/misc/fsl_law.c
index d7d6c40..48ece4f 100644
--- a/drivers/misc/fsl_law.c
+++ b/drivers/misc/fsl_law.c
@@ -70,6 +70,25 @@ int set_next_law(phys_addr_t addr, enum law_size sz, enum 
law_trgt_if id)
return idx;
 }

+int set_last_law(phys_addr_t addr, enum law_size sz, enum law_trgt_if id)
+{
+   u32 idx;
+
+   /* we have no LAWs free */
+   if (gd-used_laws == -1)
+   return -1;
+
+   /* grab the last free law */
+   idx = __ilog2(~(gd-used_laws));
+
+   if (idx = FSL_HW_NUM_LAWS)
+   return -1;
+
+   set_law(idx, addr, sz, id);
+
+   return idx;
+}
+
 void disable_law(u8 idx)
 {
volatile u32 *base = (volatile u32 *)(CFG_IMMR + 0xc08);
diff --git a/include/asm-ppc/fsl_law.h b/include/asm-ppc/fsl_law.h
index 6c445a4..227bf83 100644
--- a/include/asm-ppc/fsl_law.h
+++ b/include/asm-ppc/fsl_law.h
@@ -74,6 +74,7 @@ struct law_entry {

 extern void set_law(u8 idx, phys_addr_t addr, enum law_size sz, enum 
law_trgt_if id);
 extern int set_next_law(phys_addr_t addr, enum law_size sz, enum law_trgt_if 
id);
+extern int set_last_law(phys_addr_t addr, enum law_size sz, enum law_trgt_if 
id);
 extern void disable_law(u8 idx);
 extern void init_laws(void);
 extern void print_laws(void);
-- 
1.5.5.1


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] fdt_support: add crypto node handling for MPC8{3, 5}xxE processors

2008-06-10 Thread Kumar Gala


 void ft_cpu_setup(void *blob, bd_t *bd)
 {
 + /* delete crypto node if not on an E-processor */
 + if (!IS_E_PROCESSOR(get_svr()))
 + fdt_fixup_crypto_node(blob, 0);
 +

This is wrong or you need to fix the IS_E_PROCESSOR() macro.

IS_E_PROCESSOR(svr) should be defined:

svr  0x8

or you want:

IS_E_PROCESSOR(SVR_SOC_VER(get_svr()))

- k


 #if defined(CONFIG_HAS_ETH0) || defined(CONFIG_HAS_ETH1) ||\
 defined(CONFIG_HAS_ETH2) || defined(CONFIG_HAS_ETH3)
   fdt_fixup_ethernet(blob, bd);
 diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h
 index 8bdfb9d..14d3d70 100644
 --- a/include/asm-ppc/processor.h
 +++ b/include/asm-ppc/processor.h
 @@ -883,6 +883,15 @@
 /* Some parts define SVR[0:23] as the SOC version */
 #define SVR_SOC_VER(svr) (((svr)  8)  0xFF)/* SOC Version  
 fields */

 +/* whether MPC8xxxE (i.e. has SEC) */
 +#if defined(CONFIG_MPC85xx)
 +#define IS_E_PROCESSOR(svr)  (svr  0x800)
 +#else
 +#if defined(CONFIG_MPC83XX)
 +#define IS_E_PROCESSOR(spridr)   (!(spridr  0x0001))
 +#endif
 +#endif
 +
 /*
  * SVR_SOC_VER() Version Values
  */

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] 85xx: expose cpu identification

2008-06-10 Thread Kumar Gala
The current cpu identification code is used just to return the name
of the processor at boot.  There are some other locations that the name
is useful (device tree setup).  Expose the functionality to other bits
of code.

Also, drop the 'E' suffix and add it on by looking at the SVR version
when we print this out.  This is mainly to allow the most flexible use
of the name.  The device tree code tends to not care about the 'E' suffix.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---

Reworked and dropped the flags idea and just use SVR to determine the 'E' bit.
At this point he HW guys will now break the convention of using the particular
bit we test to determine if we have crypto or not.

- k

 cpu/mpc85xx/cpu.c   |   76 ++
 include/asm-ppc/processor.h |   11 ++
 2 files changed, 51 insertions(+), 36 deletions(-)

diff --git a/cpu/mpc85xx/cpu.c b/cpu/mpc85xx/cpu.c
index 58d23f4..d585e87 100644
--- a/cpu/mpc85xx/cpu.c
+++ b/cpu/mpc85xx/cpu.c
@@ -32,38 +32,41 @@

 DECLARE_GLOBAL_DATA_PTR;

-struct cpu_type {
-   char name[15];
-   u32 soc_ver;
+struct cpu_type cpu_type_list [] = {
+   CPU_TYPE_ENTRY(8533, 8533),
+   CPU_TYPE_ENTRY(8533, 8533_E),
+   CPU_TYPE_ENTRY(8540, 8540),
+   CPU_TYPE_ENTRY(8541, 8541),
+   CPU_TYPE_ENTRY(8541, 8541_E),
+   CPU_TYPE_ENTRY(8543, 8543),
+   CPU_TYPE_ENTRY(8543, 8543_E),
+   CPU_TYPE_ENTRY(8544, 8544),
+   CPU_TYPE_ENTRY(8544, 8544_E),
+   CPU_TYPE_ENTRY(8545, 8545),
+   CPU_TYPE_ENTRY(8545, 8545_E),
+   CPU_TYPE_ENTRY(8547, 8547_E),
+   CPU_TYPE_ENTRY(8548, 8548),
+   CPU_TYPE_ENTRY(8548, 8548_E),
+   CPU_TYPE_ENTRY(8555, 8555),
+   CPU_TYPE_ENTRY(8555, 8555_E),
+   CPU_TYPE_ENTRY(8560, 8560),
+   CPU_TYPE_ENTRY(8567, 8567),
+   CPU_TYPE_ENTRY(8567, 8567_E),
+   CPU_TYPE_ENTRY(8568, 8568),
+   CPU_TYPE_ENTRY(8568, 8568_E),
+   CPU_TYPE_ENTRY(8572, 8572),
+   CPU_TYPE_ENTRY(8572, 8572_E),
 };

-#define CPU_TYPE_ENTRY(x) {#x, SVR_##x}
+struct cpu_type *identify_cpu(uint ver)
+{
+   int i;
+   for (i = 0; i  ARRAY_SIZE(cpu_type_list); i++)
+   if (cpu_type_list[i].soc_ver == ver)
+   return cpu_type_list[i];

-struct cpu_type cpu_type_list [] = {
-   CPU_TYPE_ENTRY(8533),
-   CPU_TYPE_ENTRY(8533_E),
-   CPU_TYPE_ENTRY(8540),
-   CPU_TYPE_ENTRY(8541),
-   CPU_TYPE_ENTRY(8541_E),
-   CPU_TYPE_ENTRY(8543),
-   CPU_TYPE_ENTRY(8543_E),
-   CPU_TYPE_ENTRY(8544),
-   CPU_TYPE_ENTRY(8544_E),
-   CPU_TYPE_ENTRY(8545),
-   CPU_TYPE_ENTRY(8545_E),
-   CPU_TYPE_ENTRY(8547_E),
-   CPU_TYPE_ENTRY(8548),
-   CPU_TYPE_ENTRY(8548_E),
-   CPU_TYPE_ENTRY(8555),
-   CPU_TYPE_ENTRY(8555_E),
-   CPU_TYPE_ENTRY(8560),
-   CPU_TYPE_ENTRY(8567),
-   CPU_TYPE_ENTRY(8567_E),
-   CPU_TYPE_ENTRY(8568),
-   CPU_TYPE_ENTRY(8568_E),
-   CPU_TYPE_ENTRY(8572),
-   CPU_TYPE_ENTRY(8572_E),
-};
+   return NULL;
+}

 int checkcpu (void)
 {
@@ -74,7 +77,7 @@ int checkcpu (void)
uint fam;
uint ver;
uint major, minor;
-   int i;
+   struct cpu_type *cpu;
 #ifdef CONFIG_DDR_CLK_FREQ
volatile ccsr_gur_t *gur = (void *)(CFG_MPC85xx_GUTS_ADDR);
u32 ddr_ratio = ((gur-porpllsr)  0x3e00)  9;
@@ -89,14 +92,15 @@ int checkcpu (void)

puts(CPU:   );

-   for (i = 0; i  ARRAY_SIZE(cpu_type_list); i++)
-   if (cpu_type_list[i].soc_ver == ver) {
-   puts(cpu_type_list[i].name);
-   break;
-   }
+   cpu = identify_cpu(ver);
+   if (cpu) {
+   puts(cpu-name);

-   if (i == ARRAY_SIZE(cpu_type_list))
+   if (svr  0x8)
+   puts(E);
+   } else {
puts(Unknown);
+   }

printf(, Version: %d.%d, (0x%08x)\n, major, minor, svr);

diff --git a/include/asm-ppc/processor.h b/include/asm-ppc/processor.h
index 8bdfb9d..61a0d05 100644
--- a/include/asm-ppc/processor.h
+++ b/include/asm-ppc/processor.h
@@ -960,6 +960,17 @@ n:
 #define SR15   15

 #ifndef __ASSEMBLY__
+
+struct cpu_type {
+   char name[15];
+   u32 soc_ver;
+};
+
+struct cpu_type *identify_cpu(uint ver);
+
+#define CPU_TYPE_ENTRY(n, v) \
+   { .name = #n, .soc_ver = SVR_##v, }
+
 #ifndef CONFIG_MACH_SPECIFIC
 extern int _machine;
 extern int have_of;
-- 
1.5.5.1


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] ppc: Add u64 versions of fls64 and __ilog bitops

2008-06-10 Thread Wolfgang Denk
In message [EMAIL PROTECTED] you wrote:
 Signed-off-by: Kumar Gala [EMAIL PROTECTED]

Comments and code do not match; you'r actually adding much more code.

 +/*
 + * fls: find last (most-significant) bit set.
 + * Note fls(0) = 0, fls(1) = 1, fls(0x8000) = 32.
 + */
 +static __inline__ int fls(unsigned int x)

This is not a u64 version of fls64, or is it? ;-)

 +static __inline__ unsigned long __fls(unsigned long x)

Neither is this...

Also: is fls() vs. __fls() a good way to differentiate between int and
ulong? 

 + * fls64(value) returns 0 if value is 0 or the position of the last
 + * set bit if value is nonzero. The last (most significant) bit is

Sorry, I can't parse this.

 +#elif BITS_PER_LONG == 64
 +static inline int fls64(__u64 x)
 +{
 + if (x == 0)
 + return 0;
 + return __fls(x) + 1;

Do I  have to understand where the +1 is coming from?

 +static inline int ffs64(u64 x)
 +{
 + return __ilog2_u64(x  -x) + 1ull;

Isn't there an easier way to do this?

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: [EMAIL PROTECTED]
Beware of the Turing Tar-pit in  which  everything  is  possible  but
nothing of interest is easy.

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] ppc: Add u64 versions of fls64 and __ilog bitops

2008-06-10 Thread Kumar Gala

On Jun 10, 2008, at 4:58 PM, Wolfgang Denk wrote:

 In message [EMAIL PROTECTED]  
 you wrote:
 Signed-off-by: Kumar Gala [EMAIL PROTECTED]

 Comments and code do not match; you'r actually adding much more code.

I was just needing the u64 versions and the other stuff came along to  
make it work :)

 +/*
 + * fls: find last (most-significant) bit set.
 + * Note fls(0) = 0, fls(1) = 1, fls(0x8000) = 32.
 + */
 +static __inline__ int fls(unsigned int x)

 This is not a u64 version of fls64, or is it? ;-)

 +static __inline__ unsigned long __fls(unsigned long x)

 Neither is this...

 Also: is fls() vs. __fls() a good way to differentiate between int and
 ulong?

I took this from the kernel source tree and didn't really pay much  
attention to it.

 + * fls64(value) returns 0 if value is 0 or the position of the last
 + * set bit if value is nonzero. The last (most significant) bit is

 Sorry, I can't parse this.

again taken from kernel land.

 +#elif BITS_PER_LONG == 64
 +static inline int fls64(__u64 x)
 +{
 +if (x == 0)
 +return 0;
 +return __fls(x) + 1;

 Do I  have to understand where the +1 is coming from?

Nope, you can just accept it.  I can drop this for now since I don't  
believe we support any ppc64 machines.

 +static inline int ffs64(u64 x)
 +{
 +return __ilog2_u64(x  -x) + 1ull;

 Isn't there an easier way to do this?

Not aware of one.

So, I've stolen this from the kernel and am not sure what you'd like  
for me to change at this point.

- k

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH 07/08] Socrates: NAND support added. Changed the U-Boot base address and

2008-06-10 Thread Andy Fleming
On Sat, Jun 7, 2008 at 10:02 AM, Sergei Poselenov
[EMAIL PROTECTED] wrote:
 Hello,

 +#include asm/io.h
 +
 +int state;

 Can that variable be made static?

 Regards, Magnus


 Yes, it can.

 Wolfgang, what is the best way to handle this? Should I re-do the
 patch?


I have made the change in my tree.

Andy

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] ppc: Add u64 versions of fls64 and __ilog bitops

2008-06-10 Thread Wolfgang Denk
Dear Kumar,

in message [EMAIL PROTECTED] you wrote:
 
  Comments and code do not match; you'r actually adding much more code.
 
 I was just needing the u64 versions and the other stuff came along to  
 make it work :)

Please make the comment match the code.

  Also: is fls() vs. __fls() a good way to differentiate between int and
  ulong?
 
 I took this from the kernel source tree and didn't really pay much  
 attention to it.

Maybe we can do better?

  + * fls64(value) returns 0 if value is 0 or the position of the last
  + * set bit if value is nonzero. The last (most significant) bit is
 
  Sorry, I can't parse this.
 
 again taken from kernel land.

No reason not to fix it.

  +#elif BITS_PER_LONG == 64
  +static inline int fls64(__u64 x)
  +{
  +  if (x == 0)
  +  return 0;
  +  return __fls(x) + 1;
 
  Do I  have to understand where the +1 is coming from?
 
 Nope, you can just accept it.  I can drop this for now since I don't  
 believe we support any ppc64 machines.

I guess we might see support for the PA6T soon. SO please leave it
here.

And I'd appreciate if somebody could explain the code to me...

  +static inline int ffs64(u64 x)
  +{
  +  return __ilog2_u64(x  -x) + 1ull;
 
  Isn't there an easier way to do this?
 
 Not aware of one.
 
 So, I've stolen this from the kernel and am not sure what you'd like  
 for me to change at this point.

Please clean it up and fix at least the obvious issues.

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: [EMAIL PROTECTED]
Build a system that even a fool can use and only a fool will want  to
use it.

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] u-boot and CONFIG_MTD_NAND_ECC_SMC patch

2008-06-10 Thread mark roths
Sorry if this has been covered already, the problem exists in all the u-boot
versions I have up to 1.2.0.

When linux has CONFIG_MTD_NAND_ECC_SMC configured, NAND flash sectors
written under linux appear to have ECC errors when read by u-boot.

The help for CONFIG_MTD_NAND_ECC_SMC:
Software ECC according to the Smart Media Specification.
The original Linux implementation had byte 0 and 1 swapped.

u-boot appears to conform to the 'original' linux implementation.  The
following patch fixes this.

*** ../u-boot-1.1.5/drivers/nand/nand_ecc.c 2006-10-20
08:54:33.0 -0700
--- drivers/nand/nand_ecc.c 2008-06-10 12:59:21.0 -0700
***
*** 118,123 
--- 118,124 
 {
   u_char idx, reg1, reg2, reg3;
   int j;
+   u_char tmp0, tmp1;

   /* Initialize variables */
   reg1 = reg2 = reg3 = 0;
***
*** 140,148 
--- 141,157 
   /* Create non-inverted ECC code from line parity */
   nand_trans_result(reg2, reg3, ecc_code);

+ #define CONFIG_MTD_NAND_ECC_SMC
   /* Calculate final ECC code */
+ #ifdef CONFIG_MTD_NAND_ECC_SMC
+   tmp0 = ~ecc_code[0];
+   tmp1 = ~ecc_code[1];
+   ecc_code[0] = tmp1;
+   ecc_code[1] = tmp0;
+ #else
   ecc_code[0] = ~ecc_code[0];
   ecc_code[1] = ~ecc_code[1];
+ #endif
   ecc_code[2] = ((~reg1)  2) | 0x03;
   return 0;
 }


Mark Roths
Softair Microsystems

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] Add mechanisms for CPU and board-specific Ethernet initialization

2008-06-10 Thread Haavard Skinnemoen
On Tue, 10 Jun 2008 01:29:27 -0700
Ben Warren [EMAIL PROTECTED] wrote:

 This patch is the first step in cleaning up net/eth.c, by moving Ethernet
 initialization to CPU or board-specific code.  Initial implementation is
 only on the Freescale TSEC controller, but others will be added soon.
 
 Signed-off-by: Ben Warren [EMAIL PROTECTED]

Sweet!

 ---
 
 When we discussed this a few months ago, I was planning on defining the 
 cpu_eth_init() and board_eth_init() functions as weak with no aliases, but in
 my testing this did not result in them being NULL, hence the default function.

Works just as well, doesn't it?

 diff --git a/net/eth.c b/net/eth.c
 index c4f24c6..e75dc43 100644
 --- a/net/eth.c
 +++ b/net/eth.c
 @@ -28,6 +28,12 @@
  
  #if defined(CONFIG_CMD_NET)  defined(CONFIG_NET_MULTI)
  
 +/* CPU and board-specific Ethernet initializations.  Aliased function
 + * signals caller to move on */
 +static int __def_eth_init(bd_t *bis) {return -1;}

Just a cosmetic thing: I really think this should look like a normal
function, i.e. not cuddling everything up on one line. I've seen such
things being mistaken for macros before.

Haavard

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] libfdt: Move the working_fdt pointer to cmd_fdt.c

2008-06-10 Thread Jerry Van Baren
The working_fdt pointer was declared in common/fdt_support.c but was
not used there.  Move it to common/cmd_fdt.c where it is used (it is
also used in lib_ppc/bootm.c).

Signed-off-by: Gerald Van Baren [EMAIL PROTECTED]
---

Hi Kim,

I've applied your patch fdt: unshadow global working fdt variable.
As a feeble attempt to redeem myself, I added a patch to move working_fdt
to cmd_fdt.c... it isn't used (any longer) in fdt_support.c.

I started to hack bootm.c (if we moved the reference to working_fdt out
of boot_relocate_fdt() or move that function, we could make working_fdt
static), but it got too complex so I backed out of that change for now.

Best regards,
gvb

 common/cmd_fdt.c |5 +
 common/fdt_support.c |5 -
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
index 5c3a0bb..97b9dd7 100644
--- a/common/cmd_fdt.c
+++ b/common/cmd_fdt.c
@@ -46,6 +46,11 @@ static int fdt_parse_prop(char **newval, int count, char 
*data, int *len);
 static int fdt_print(const char *pathp, char *prop, int depth);
 
 /*
+ * The working_fdt points to our working flattened device tree.
+ */
+struct fdt_header *working_fdt;
+
+/*
  * Flattened Device Tree command, see the help for parameter definitions.
  */
 int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
diff --git a/common/fdt_support.c b/common/fdt_support.c
index e8aa3e9..e58b294 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -35,11 +35,6 @@
  */
 DECLARE_GLOBAL_DATA_PTR;
 
-/*
- * fdt points to our working device tree.
- */
-struct fdt_header *working_fdt;
-
 
 /**
  * fdt_find_and_setprop: Find a node and set it's property
-- 
1.5.5.1


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH v2] fdt: add crypto node handling for MPC8{3, 5}xxE processors

2008-06-10 Thread Kim Phillips
crypto node if not on an E-processor.  If on 8360 or 834x family,
check rev and up-rev crypto node (to SEC rev. 2.4 property values)
if on an 'EA' processor, e.g. MPC8349EA.

Signed-off-by: Kim Phillips [EMAIL PROTECTED]
---
change since v1: mpc85xx IS_E_PROCESSOR(svr) definition changed to (svr
 0x8).

(I'm not sure, but I think this goes through WD directly)

 common/fdt_support.c|   87 +++
 cpu/mpc83xx/fdt.c   |   18 +
 cpu/mpc85xx/fdt.c   |6 +++
 include/asm-ppc/processor.h |9 
 include/fdt_support.h   |6 +++
 include/mpc83xx.h   |7 +++-
 6 files changed, 132 insertions(+), 1 deletions(-)

diff --git a/common/fdt_support.c b/common/fdt_support.c
index 7507744..c5b4650 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -447,3 +447,90 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd)
   prop, compat, fdt_strerror(err));
 }
 #endif /* CONFIG_HAS_FSL_DR_USB */
+
+#if defined(CONFIG_MPC83XX) || defined(CONFIG_MPC85xx)
+/*
+ * update crypto node properties to a specified revision of the SEC
+ * called with sec_rev == 0 if not on an mpc8xxxE processor
+ */
+void fdt_fixup_crypto_node(void *blob, int sec_rev)
+{
+   const struct sec_rev_prop {
+   u32 sec_rev;
+   u32 num_channels;
+   u32 channel_fifo_len;
+   u32 exec_units_mask;
+   u32 descriptor_types_mask;
+   } sec_rev_prop_list [] = {
+   { 0x0200, 4, 24, 0x07e, 0x01010ebf }, /* SEC 2.0 */
+   { 0x0201, 4, 24, 0x0fe, 0x012b0ebf }, /* SEC 2.1 */
+   { 0x0202, 1, 24, 0x04c, 0x0122003f }, /* SEC 2.2 */
+   { 0x0204, 4, 24, 0x07e, 0x012b0ebf }, /* SEC 2.4 */
+   { 0x0300, 4, 24, 0x9fe, 0x03ab0ebf }, /* SEC 3.0 */
+   { 0x0303, 4, 24, 0x97c, 0x03ab0abf }, /* SEC 3.3 */
+   };
+   char compat_strlist[ARRAY_SIZE(sec_rev_prop_list) *
+   sizeof(fsl,secX.Y)];
+   int crypto_node, sec_idx, err;
+   char *p;
+   u32 val;
+
+   /* locate crypto node based on lowest common compatible */
+   crypto_node = fdt_node_offset_by_compatible(blob, -1, fsl,sec2.0);
+   if (crypto_node == -FDT_ERR_NOTFOUND)
+   return;
+
+   /* delete it if not on an E-processor */
+   if (crypto_node  0  !sec_rev) {
+   fdt_del_node(blob, crypto_node);
+   return;
+   }
+
+   /* else we got called for possible uprev */
+   for (sec_idx = 0; sec_idx  ARRAY_SIZE(sec_rev_prop_list); sec_idx++)
+   if (sec_rev_prop_list[sec_idx].sec_rev == sec_rev)
+   break;
+
+   if (sec_idx == ARRAY_SIZE(sec_rev_prop_list)) {
+   puts(warning: unknown SEC revision number\n);
+   return;
+   }
+
+   val = cpu_to_fdt32(sec_rev_prop_list[sec_idx].num_channels);
+   err = fdt_setprop(blob, crypto_node, fsl,num-channels, val, 4);
+   if (err  0)
+   printf(WARNING: could not set crypto property: %s\n,
+  fdt_strerror(err));
+
+   val = cpu_to_fdt32(sec_rev_prop_list[sec_idx].descriptor_types_mask);
+   err = fdt_setprop(blob, crypto_node, fsl,descriptor-types-mask, val, 
4);
+   if (err  0)
+   printf(WARNING: could not set crypto property: %s\n,
+  fdt_strerror(err));
+
+   val = cpu_to_fdt32(sec_rev_prop_list[sec_idx].exec_units_mask);
+   err = fdt_setprop(blob, crypto_node, fsl,exec-units-mask, val, 4);
+   if (err  0)
+   printf(WARNING: could not set crypto property: %s\n,
+  fdt_strerror(err));
+
+   val = cpu_to_fdt32(sec_rev_prop_list[sec_idx].channel_fifo_len);
+   err = fdt_setprop(blob, crypto_node, fsl,channel-fifo-len, val, 4);
+   if (err  0)
+   printf(WARNING: could not set crypto property: %s\n,
+  fdt_strerror(err));
+
+   val = 0;
+   while (sec_idx = 0) {
+   p = compat_strlist + val;
+   val += sprintf(p, fsl,sec%d.%d,
+   (sec_rev_prop_list[sec_idx].sec_rev  0xff00)  8,
+   sec_rev_prop_list[sec_idx].sec_rev  0x00ff);
+   sec_idx--;
+   }
+   err = fdt_setprop(blob, crypto_node, compatible, compat_strlist, 
val);
+   if (err  0)
+   printf(WARNING: could not set crypto property: %s\n,
+  fdt_strerror(err));
+}
+#endif /* defined(CONFIG_MPC83XX) || defined(CONFIG_MPC85xx) */
diff --git a/cpu/mpc83xx/fdt.c b/cpu/mpc83xx/fdt.c
index 02c4d05..267ae6a 100644
--- a/cpu/mpc83xx/fdt.c
+++ b/cpu/mpc83xx/fdt.c
@@ -26,6 +26,7 @@
 #include common.h
 #include libfdt.h
 #include fdt_support.h
+#include asm/processor.h
 
 extern void ft_qe_setup(void *blob);
 
@@ -33,6 +34,23 @@ DECLARE_GLOBAL_DATA_PTR;
 
 void ft_cpu_setup(void *blob, bd_t *bd)
 {
+   

Re: [U-Boot-Users] [PATCH v2] fdt: add crypto node handling for MPC8{3, 5}xxE processors

2008-06-10 Thread Jerry Van Baren
Kim Phillips wrote:
 crypto node if not on an E-processor.  If on 8360 or 834x family,
 check rev and up-rev crypto node (to SEC rev. 2.4 property values)
 if on an 'EA' processor, e.g. MPC8349EA.
 
 Signed-off-by: Kim Phillips [EMAIL PROTECTED]
 ---
 change since v1: mpc85xx IS_E_PROCESSOR(svr) definition changed to (svr
  0x8).
 
 (I'm not sure, but I think this goes through WD directly)
 
  common/fdt_support.c|   87 
 +++

I'm not really competent to evaluate this beyond the obvious criteria 
(it compiles and passes the sniff test).  From the libfdt point of view, 
I'm OK with Wolfgang applying the patch directly.

Best regards,
gvb

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] Pull request: u-boot-fdt

2008-06-10 Thread Jerry Van Baren
Dear Wolfgang,

I've added Kim's and my working_fdt improvements to my previous pull requests.

Thanks,
gvb

The following changes since commit 8155efbd7ae9c65564ca98affe94631d612ae088:
  Wolfgang Denk (1):
Merge branch 'master' of ssh://mercury/home/wd/git/u-boot/master

are available in the git repository at:

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

David Gibson (1):
  libfdt: Several cleanups to parameter checking

Gerald Van Baren (6):
  Convert mpc7448hpc2 to CONFIG_OF_LIBFDT
  Change the stxxst to CONFIG_OF_LIBFDT
  Remove the deprecated CONFIG_OF_FLAT_TREE
  The fdt boardsetup command criteria was not unique
  Use strncmp() for the fdt command
  libfdt: Move the working_fdt pointer to cmd_fdt.c

Kim Phillips (1):
  fdt: unshadow global working fdt variable

 README|9 +-
 board/freescale/mpc7448hpc2/mpc7448hpc2.c |   21 +-
 board/tqm8272/tqm8272.c   |4 -
 common/Makefile   |1 -
 common/cmd_fdt.c  |  134 +
 common/fdt_support.c  |5 -
 common/ft_build.c |  471 -
 cpu/74xx_7xx/cpu.c|   35 +--
 drivers/pci/tsi108_pci.c  |   33 ++-
 include/configs/mpc7448hpc2.h |3 +-
 include/configs/stxxtc.h  |4 +-
 include/ft_build.h|   71 -
 include/libfdt_env.h  |2 +-
 lib_ppc/bootm.c   |2 +-
 libfdt/fdt.c  |   17 +-
 libfdt/fdt_ro.c   |   26 +--
 libfdt/fdt_rw.c   |   24 +-
 libfdt/fdt_sw.c   |   31 +-
 libfdt/libfdt_internal.h  |1 +
 19 files changed, 161 insertions(+), 733 deletions(-)
 delete mode 100644 common/ft_build.c
 delete mode 100644 include/ft_build.h

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] libfdt: Move the working_fdt pointer to cmd_fdt.c

2008-06-10 Thread Kim Phillips
On Tue, 10 Jun 2008 22:36:07 -0400
Jerry Van Baren [EMAIL PROTECTED] wrote:

 I've applied your patch fdt: unshadow global working fdt variable.
 As a feeble attempt to redeem myself, I added a patch to move working_fdt
 to cmd_fdt.c... it isn't used (any longer) in fdt_support.c.

sounds good

 I started to hack bootm.c (if we moved the reference to working_fdt out
 of boot_relocate_fdt() or move that function, we could make working_fdt
 static), but it got too complex so I backed out of that change for now.

:)

I gave a shot at switching all MPC8[356]xx to MPC8[356]XX but the 100k
limit, stepping into 51xx space, and probably horrible timing (due to
the many unapplied patches out there) prevented me from doing so.

thanks,

Kim

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] Can't get strong symbol to override weak one

2008-06-10 Thread Ben Warren
Hi,

Not specifically U-boot related, but hopefully a smart person here can help.

I have a weak symbol defined as:
int cpu_eth_init(bd_t *bis) __attribute((weak, alias(__def_eth_init)));  (1)

I've created a new file in cpu/mpc83xx that includes a real
implementation of the function:
int cpu_eth_init(bd_t *bis)  (2)

Using objdump, I've verified that this function is making it into
libmpc8xxx.a, however it doesn't get linked into the final U-boot
executable.  System.map shows cpu_eth_init at the same address as
__def_eth_init.

If I change (1) to:
extern int cpu_eth_init(bd_t *bis), (2) gets linked in OK.  Of course,
that's not what I want to do.

I've tried changing the order of the archives that get linked together
by ld, but nothing seems to work.  Since I don't really know what I'm
doing, I guess that shouldn't be surprising.

Any help would be appreciated.

thanks,
Ben

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users