Re: [U-Boot] RFC: split ARM repo and distribute workload

2009-09-21 Thread Jean-Christophe PLAGNIOL-VILLARD
On 23:57 Fri 04 Sep , Wolfgang Denk wrote:
 Hello everybody,
 
 ARM has always been one of the architectures that generated a big
 number of different processors and SoCs, but recently the activitiy in
 this area is literally exploding.  This is partially due to the fact
 that ARM is currently used in many designs, so many new ARM based
 processors and SoCs and even more new ARM boards show up, but another
 and at least as important change is that some silicon and board
 vendors have started to actively pushing their products into the
 U-Boot (and Linux) mainline source trees (and *welcome* they all
 are!).
 
 It has become evident that this growing complexity has become way too
 massive to be shouldered by a single custodian, even a very active one
 like Jean-Christophe.
 
 I think we have no other choice but to add more manpower to this task,
 i. e. split the ARM respository and distribute the workload across a
 few more custodians.
 
 Unline with the Power architecture, where the split can be easily
 defined by processor lines, with ARM it seems more logical to me to
 differentiate by silicon vendors.
 
 After much thinking I therefor suggest to implement the following
 change for the ARM architecture:
 
 
 master ARM repository:Tom Rix
 
 Atmel (AT91): Jean-Christophe Plagniol-Villard
 
 Marvell (PXA + IXP):  Jean-Christophe Plagniol-Villard
I decline it

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


Re: [U-Boot] [PATCH] Add support for Eukrea CPU9260/CPU9G20 SBC

2009-09-06 Thread Jean-Christophe PLAGNIOL-VILLARD
On 18:15 Sat 05 Sep , Eric Benard wrote:
 these boards are built around Atmel's AT91SAM9260/9G20 and have
 up to 64MB of NOR flash, up to 128MB of SDRAM, up to 2GB of NAND
 and include a 10/100 Ethernet PHY in RMII mode.
 
 Signed-off-by: Eric Benard e...@eukrea.com
 ---
  MAINTAINERS|5 +
  MAKEALL|2 +
  Makefile   |8 +
  board/eukrea/cpu9260/Makefile  |   59 +
  board/eukrea/cpu9260/config.mk |1 +
  board/eukrea/cpu9260/cpu9260.c |  218 +
  board/eukrea/cpu9260/led.c |  153 
  cpu/arm926ejs/at91/lowlevel_init.S |3 +-
  include/configs/cpu9260.h  |  453 
 
  9 files changed, 901 insertions(+), 1 deletions(-)
  create mode 100644 board/eukrea/cpu9260/Makefile
  create mode 100644 board/eukrea/cpu9260/config.mk
  create mode 100644 board/eukrea/cpu9260/cpu9260.c
  create mode 100644 board/eukrea/cpu9260/led.c
  create mode 100644 include/configs/cpu9260.h
 
it's looks fine

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


Re: [U-Boot] [PATCH 3/8] TWL4030 Add usb PHY support

2009-09-06 Thread Jean-Christophe PLAGNIOL-VILLARD
On 08:46 Sun 06 Sep , Tom wrote:
 Jean-Christophe PLAGNIOL-VILLARD wrote:
 On 15:12 Fri 04 Sep , Tom Rix wrote:
 snip
 please add an empty line
 I will take care of all the empty lines.
 
 +   if (ret == 0)
 +   ret = data;
 +   else
 +   printf(TWL4030:USB:Read[0x%x] Error %d\n, address, ret);
 +
 +   return ret;
 why not this and avoid the copy of data
  if (ret != 0) {
  printf(TWL4030:USB:Read[0x%x] Error %d\n, address, ret);
  return ret;
  }
 
  return data;
 }
 
 In general I rather have only one exit point from a function.
 This makes tracing execution easier.
ok
 
 +   /* Check if the PHY DPLL is locked */
 +   sts = twl4030_usb_read(TWL4030_USB_PHY_CLK_CTRL_STS);
 +   while (!(sts  PHY_DPLL_CLK)  0  timeout) {
 +   udelay(10);
 +   sts = twl4030_usb_read(TWL4030_USB_PHY_CLK_CTRL_STS);
 +   timeout -= 10;
 +   }
 why not set time to 100 * 1000
  and just decrease by 1
 Yes.
 
 make some enums by group of function will be better as it simplify the code
 +#define TWL4030_USB_VENDOR_ID_LO   0x00
 +#define TWL4030_USB_VENDOR_ID_HI   0x01
 I see your point, but this is how they are defined in a twl4030 spec.
 This way makes it easy to look up #define in the spec.
 Just remove the prefix.
 +#define TWL4030_USB_PRODUCT_ID_LO  0x02
 +#define TWL4030_USB_PRODUCT_ID_HI  0x03
ok fine

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


Re: [U-Boot] [PATCH v4 4/4]: arm: Define test_and_set_bit and test_and_clear bit for ARM

2009-09-06 Thread Jean-Christophe PLAGNIOL-VILLARD
On 17:27 Fri 04 Sep , Justin Waters wrote:
 Simon,
 
 I found a slight problem with this section of the patch:
 
 On Mon, 2009-08-24 at 03:10 -0400, Simon Kagstrom wrote:
  diff --git a/include/asm-arm/bitops.h b/include/asm-arm/bitops.h
  index 854e225..3c7b00c 100644
  --- a/include/asm-arm/bitops.h
  +++ b/include/asm-arm/bitops.h
  @@ -17,6 +17,8 @@
   
   #ifdef __KERNEL__
   
  +#include asm/proc/system.h
  +
 
 It causes a compiler error on the arm926ejs platform:
 
   In file included from cpu.c:34:
   /home/justin/git/u-boot/include/asm/system.h: At top level:
   /home/justin/git/u-boot/include/asm/system.h:71: error: expected
 identifier or '(' before 'asm'
 
 I did some digging, and it looks like set_cr() is implemented by both
 asm-arm/system.h and asm-arm/proc-armv/system.h.  One implements the
 function as a macro, while the other uses a standard C function, hence
 the weird error message.  The conflict occurs in cpu/arm926ejs/cpu.c.  
 
 * cpu.c includes both common.h and asm/system.h
 * common.h includes asm/bitops.h, which now includes asm/proc/system.h
 
 There are a few other values that are defined in both files, although
 they don't seem to cause any problems.
 
 If I comment out one of the two implementations, the code compiles fine.
 However, I'm not really sure what the correct fix would be.  I just
 wanted to let you know.
It's corrent and Simon already send the cleanup which is part of the pending
arm pull request

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


Re: [U-Boot] ARM Pull Request

2009-09-06 Thread Jean-Christophe PLAGNIOL-VILLARD
 Jean-Christophe: In
 
 http://lists.denx.de/pipermail/u-boot/2009-August/059087.html
 
 we agreed on omap3_devkit8000.
 in v4 the author prefer it devkit8000 so I respect it
 
 You missed v5 and v6, no?
no I did not as Frederik Kriewitz said this
'Oh yes, do we really need a v7? Or is v4 (with timll vendor directory) ok'

so I applied this one as the patch is ok
 
 for the l2_cache I'm fine to move to omap3 as it's really omap3 specific
 
 Again, you confuse people. From your previous mail:
 
 as I said now more than 10 times on omap3 we can use the generic
 ARMV7 cache code
 
 we clearly need to clean the omap3 and not force other soc to duplicate code
 
 With
 
 http://lists.denx.de/pipermail/u-boot/2009-August/059087.html
???

 
 we just try to do the opposite: Move the custom code away so that
 Samsung can use its own (generic?) implementation.
When I've said we do not need the custom code for omap3 either so omap3 and
Samsung can use the same code the generic one

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


Re: [U-Boot] [PATCH 1/3] omap: move TI's boards to board/ti/

2009-09-06 Thread Jean-Christophe PLAGNIOL-VILLARD
On 23:43 Sun 06 Sep , Wolfgang Denk wrote:
 Dear Jean-Christophe PLAGNIOL-VILLARD,
 
 In message 1251037960-17063-1-git-send-email-plagn...@jcrosoft.com you 
 wrote:
  Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
  ---
 
 Sorry for the late comment, but I hust notice that this patch (and
 the two following ones) moves the board names to the right
 directories, but it fails to also rename the Make target names and
 the board config files.
 
 For example, moving board/omap3/beagle/ = board/ti/beagle/ is a
 perfectly corrrect thing to do, but we should also use this
 opportunity and fix the make target name (omap3_beagle_config =
 beagle_config) and the board config file name
 (include/configs/omap3_beagle.h = include/configs/beagle.h)
 
 
 Do you see a chance to update your patches once more, so  we  can  do
 this in one step? I'd prefer to do this at once rather that doing the
 rename in another patch.
I'll prefer to do it in two step as we will face a problem for evm boards
as they exist for multiple soc not only TI's.

So for evm I think we need to keep the omap3_evm as we have also as example
a dvevm for davinci too

This patch series move vendors to the corrent area the next one will fix the
board config and header

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


Re: [U-Boot] [PATCH v4 0/4]: bitops cleanup and fixes

2009-09-06 Thread Jean-Christophe PLAGNIOL-VILLARD
On 22:50 Sun 06 Sep , Wolfgang Denk wrote:
 Dear Jean-Christophe PLAGNIOL-VILLARD,
 
 In message 20090905113728.gn30...@game.jcrosoft.org you wrote:
  
Sorry to ping you all, but are there any more comments on work to be
done before this patch series can be accepted? The patches were these:

   [PATCH v4 1/4]: Move __set/clear_bit from ubifs.h to bitops.h
   [PATCH v4 2/4]: arm: Make arm bitops endianness-independent
   [PATCH v4 3/4]: Define ffs/fls for all architectures
   [PATCH v4 4/4]: arm: Define test_and_set_bit and test_and_clear bit 
for ARM
   
   I think we're just waiting for an ARM custodian to pick this up.
  I've already ack the patches at the V2 version so I wait other arch 
  Maintainer
  comment as it will impact everyone
 
 Just waiting is a reliable way to delay things forever, expecially
 when you wait without telling that you are waiting, and without
 actively pinging the parties you exect answers from.
??
I'm not supposed to apply patches that update all arch except if I receive
ack for it or most of at least
so I've gave the ack for the arm part and Mike did a comment and no other
Maintainer did a comment so how can I applied to patch?

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


Re: [U-Boot] [PATCH] MCI support for AT91 family processors.

2009-09-05 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:03 Sat 05 Sep , Albin Tonnerre wrote:
 Oh ... I had a more recent patch, but looks like it didn't make it to the 
 list.
 It already fixes a large parts of your comments. Thanks for the review
 
  please use MCI0_BASE and MCI1_BASE so we can detect if the soc support
  multiple mci and please move it to soc header
  I'll send a patch to clean the other
 
 I'm not sure what other you're talking about
take a look in the atmel_spi driver

the number of MCI will be detected depending on the MCIx_BASE declared in the
soc header

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


Re: [U-Boot] [PATCH v4 0/4]: bitops cleanup and fixes

2009-09-05 Thread Jean-Christophe PLAGNIOL-VILLARD
On 22:14 Fri 04 Sep , Wolfgang Denk wrote:
 Dear Simon Kagstrom,
 
 In message 20090831113210.02299...@marrow.netinsight.se you wrote:
  On Mon, 24 Aug 2009 09:06:05 +0200
  Simon Kagstrom simon.kagst...@netinsight.net wrote:
  
   This update to the patch series just cleans up the commit messages to
   have the comments in the git comments section.
  
  Sorry to ping you all, but are there any more comments on work to be
  done before this patch series can be accepted? The patches were these:
  
 [PATCH v4 1/4]: Move __set/clear_bit from ubifs.h to bitops.h
 [PATCH v4 2/4]: arm: Make arm bitops endianness-independent
 [PATCH v4 3/4]: Define ffs/fls for all architectures
 [PATCH v4 4/4]: arm: Define test_and_set_bit and test_and_clear bit for 
  ARM
 
 I think we're just waiting for an ARM custodian to pick this up.
I've already ack the patches at the V2 version so I wait other arch Maintainer
comment as it will impact everyone

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


[U-Boot] [PATCH] at91: move base address define to soc header

2009-09-05 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 include/asm-arm/arch-at91/at91cap9.h|4 
 include/asm-arm/arch-at91/at91sam9260.h |4 
 include/asm-arm/arch-at91/at91sam9261.h |3 +++
 include/asm-arm/arch-at91/at91sam9263.h |4 
 include/asm-arm/arch-at91/at91sam9g45.h |5 +
 include/asm-arm/arch-at91/at91sam9rl.h  |3 +++
 include/asm-arm/arch-at91/hardware.h|   18 --
 7 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/include/asm-arm/arch-at91/at91cap9.h 
b/include/asm-arm/arch-at91/at91cap9.h
index b128ac5..98bfcc7 100644
--- a/include/asm-arm/arch-at91/at91cap9.h
+++ b/include/asm-arm/arch-at91/at91cap9.h
@@ -109,6 +109,10 @@
 #define AT91_USART1AT91CAP9_BASE_US1
 #define AT91_USART2AT91CAP9_BASE_US2
 
+#define AT91_BASE_SPI  AT91CAP9_BASE_SPI0
+#define AT91_ID_UHPAT91CAP9_ID_UHP
+#define AT91_PMC_UHP   AT91CAP9_PMC_UHP
+
 /*
  * SCKCR flags
  */
diff --git a/include/asm-arm/arch-at91/at91sam9260.h 
b/include/asm-arm/arch-at91/at91sam9260.h
index 73975f4..f2aef8a 100644
--- a/include/asm-arm/arch-at91/at91sam9260.h
+++ b/include/asm-arm/arch-at91/at91sam9260.h
@@ -105,6 +105,10 @@
 #define AT91_USART4AT91SAM9260_BASE_US4
 #define AT91_USART5AT91SAM9260_BASE_US5
 
+#define AT91_BASE_SPI  AT91SAM9260_BASE_SPI0
+#define AT91_ID_UHPAT91SAM9260_ID_UHP
+#define AT91_PMC_UHP   AT91SAM926x_PMC_UHP
+
 /*
  * Internal Memory.
  */
diff --git a/include/asm-arm/arch-at91/at91sam9261.h 
b/include/asm-arm/arch-at91/at91sam9261.h
index b303e07..55bd49a 100644
--- a/include/asm-arm/arch-at91/at91sam9261.h
+++ b/include/asm-arm/arch-at91/at91sam9261.h
@@ -88,6 +88,9 @@
 #define AT91_USART1AT91SAM9261_BASE_US1
 #define AT91_USART2AT91SAM9261_BASE_US2
 
+#define AT91_BASE_SPI  AT91SAM9261_BASE_SPI0
+#define AT91_ID_UHPAT91SAM9261_ID_UHP
+#define AT91_PMC_UHP   AT91SAM926x_PMC_UHP
 
 /*
  * Internal Memory.
diff --git a/include/asm-arm/arch-at91/at91sam9263.h 
b/include/asm-arm/arch-at91/at91sam9263.h
index 966a683..d862129 100644
--- a/include/asm-arm/arch-at91/at91sam9263.h
+++ b/include/asm-arm/arch-at91/at91sam9263.h
@@ -108,6 +108,10 @@
 #define AT91_SMC   AT91_SMC0
 #define AT91_SDRAMCAT91_SDRAMC0
 
+#define AT91_BASE_SPI  AT91SAM9263_BASE_SPI0
+#define AT91_ID_UHPAT91SAM9263_ID_UHP
+#define AT91_PMC_UHP   AT91SAM926x_PMC_UHP
+
 /*
  * Internal Memory.
  */
diff --git a/include/asm-arm/arch-at91/at91sam9g45.h 
b/include/asm-arm/arch-at91/at91sam9g45.h
index 0feed9c..d02b157 100644
--- a/include/asm-arm/arch-at91/at91sam9g45.h
+++ b/include/asm-arm/arch-at91/at91sam9g45.h
@@ -114,6 +114,11 @@
 #define AT91_USART2AT91SAM9G45_BASE_US2
 #define AT91_USART3AT91SAM9G45_BASE_US3
 
+#define AT91_BASE_EMAC AT91SAM9G45_BASE_EMAC
+#define AT91_BASE_SPI  AT91SAM9G45_BASE_SPI0
+#define AT91_ID_UHPAT91SAM9G45_ID_UHPHS
+#define AT91_PMC_UHP   AT91SAM926x_PMC_UHP
+
 /*
  * Internal Memory.
  */
diff --git a/include/asm-arm/arch-at91/at91sam9rl.h 
b/include/asm-arm/arch-at91/at91sam9rl.h
index 4dd8037..3638f92 100644
--- a/include/asm-arm/arch-at91/at91sam9rl.h
+++ b/include/asm-arm/arch-at91/at91sam9rl.h
@@ -99,6 +99,9 @@
 #define AT91_USART2AT91SAM9RL_BASE_US2
 #define AT91_USART3AT91SAM9RL_BASE_US3
 
+#define AT91_BASE_SPI  AT91SAM9RL_BASE_SPI
+#define AT91_ID_UHPAT91SAM9RL_ID_UHP
+
 
 /*
  * Internal Memory.
diff --git a/include/asm-arm/arch-at91/hardware.h 
b/include/asm-arm/arch-at91/hardware.h
index de06a10..56fbf04 100644
--- a/include/asm-arm/arch-at91/hardware.h
+++ b/include/asm-arm/arch-at91/hardware.h
@@ -20,34 +20,16 @@
 #include asm/arch/at91rm9200.h
 #elif defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20)
 #include asm/arch/at91sam9260.h
-#define AT91_BASE_SPI  AT91SAM9260_BASE_SPI0
-#define AT91_ID_UHPAT91SAM9260_ID_UHP
-#define AT91_PMC_UHP   AT91SAM926x_PMC_UHP
 #elif defined(CONFIG_AT91SAM9261) || defined(CONFIG_AT91SAM9G10)
 #include asm/arch/at91sam9261.h
-#define AT91_BASE_SPI  AT91SAM9261_BASE_SPI0
-#define AT91_ID_UHPAT91SAM9261_ID_UHP
-#define AT91_PMC_UHP   AT91SAM926x_PMC_UHP
 #elif defined(CONFIG_AT91SAM9263)
 #include asm/arch/at91sam9263.h
-#define AT91_BASE_SPI  AT91SAM9263_BASE_SPI0
-#define AT91_ID_UHPAT91SAM9263_ID_UHP
-#define AT91_PMC_UHP   AT91SAM926x_PMC_UHP
 #elif defined(CONFIG_AT91SAM9RL)
 #include asm/arch/at91sam9rl.h
-#define AT91_BASE_SPI  AT91SAM9RL_BASE_SPI
-#define AT91_ID_UHPAT91SAM9RL_ID_UHP
 #elif defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45)
 #include asm/arch/at91sam9g45.h
-#define AT91_BASE_EMAC  AT91SAM9G45_BASE_EMAC
-#define AT91_BASE_SPI   AT91SAM9G45_BASE_SPI0
-#define AT91_ID_UHP AT91SAM9G45_ID_UHPHS
-#define AT91_PMC_UHPAT91SAM926x_PMC_UHP
 #elif defined(CONFIG_AT91CAP9)
 #include asm/arch/at91cap9.h
-#define AT91_BASE_SPI  AT91CAP9_BASE_SPI0
-#define AT91_ID_UHPAT91CAP9_ID_UHP
-#define AT91_PMC_UHP   AT91CAP9_PMC_UHP
 #elif defined(CONFIG_AT91X40

Re: [U-Boot] [PATCH] AT91: Add support for blue_LED_* and add coloured_LED_init to at91/led.c

2009-09-05 Thread Jean-Christophe PLAGNIOL-VILLARD
On 13:20 Sat 05 Sep , Albin Tonnerre wrote:
 On Sat, 05 Sep 2009 01:47 +0200, Jean-Christophe PLAGNIOL-VILLARD wrote :
  On 10:36 Thu 20 Aug , Albin Tonnerre wrote:
   On Thu, Aug 20, 2009 at 02:00:45AM +0200, Jean-Christophe 
   PLAGNIOL-VILLARD wrote :
On 10:49 Tue 18 Aug , Albin Tonnerre wrote:
 On Tue, Aug 18, 2009 at 12:51:48AM +0200, Jean-Christophe 
 PLAGNIOL-VILLARD wrote :
  no please take a look on the other LED thread
 
 Would you please provide a pointer to this thread ? THe only one 
 remotely
 related I can find is
 http://lists.denx.de/pipermail/u-boot/2009-May/052160.html, and you 
 did not
 participate in this one ...
I've as I'm the one who ask Daniel Gorsulowski to base his new code 
(this patch)
against Ulf precedent patch and as other people have done the same 
comment as I will do
no need to repeat it
   
   Ok, so I'm really confused now. This patch does exactly what you're 
   arguing
   against in the rest of your mail, and you still don't provide a pointer 
   to Ulf's
   patch.
   Would you mind *explaining* to me what your plan is? I just can't get it.
  something like this for assembly
  
  .macro set_led \num, \state
  call (c or assembly) set_led_state num state
  .endm
  
  .macore set_led_red \state
  call (c or assembly) set_led_state CONFIG_SYS_LED_RED state
  .endm
  
  and for c
  
  void set_led(int num, int state)
  {
  
  }
  
  void set_reg_led(int state)
  {
  set_led(CONFIG_SYS_LED_RED, state);
  }
  
  etc... for all colour
  
 
 Ok. So what about implementing the current, existing LED API ?
 you'd get:
 
 void status_led_set  (int led, int state);
 that sound a lot like your set_led function. And then
 
 status_led_set(STATUS_LED_{YELLOW,BLUE,RED}, state)
 
 which is basically the same as your set_reg_led?
so you use this one instead

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


Re: [U-Boot] ARM Pull Request

2009-09-05 Thread Jean-Christophe PLAGNIOL-VILLARD
On 07:37 Sat 05 Sep , Dirk Behme wrote:
 Dear Jean-Christophe,
 
 Jean-Christophe PLAGNIOL-VILLARD wrote:
 Hi,
 
 Please pull
 The following changes since commit 3aa8b68d80dbcb6829af60485c1e388b39af793d:
   Wolfgang Denk (1):
 Merge branch 'next' of ../next
 
 are available in the git repository at:
 
   git://git.denx.de/u-boot-arm.git master
 
 Albin Tonnerre (3):
   at91sam9260/afeb9260: Fix SPI initialization
   Add support for the Calao SBC35-A9G20 board
   Support for the Calao TNY-A9260/TNY-A9G20 boards
 
 Frederik Kriewitz (1):
   Add support for the DevKit8000 board
 
 I'd like to have the omap3_devkit8000.h version of that patch, instead.
this one is fine no need not the omap3_devkit8000 version
 
 Additionally,
 
 http://lists.denx.de/pipermail/u-boot/2009-August/058492.html
as I said now more than 10 times on omap3 we can use the generic ARMV7 cache
code as on Samsung

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


Re: [U-Boot] [PATCH-ARM] CONFIG_SYS_HZ fix for ARM902T S3C24X0 Boards

2009-09-05 Thread Jean-Christophe PLAGNIOL-VILLARD
On 16:33 Sat 05 Sep , kevin.morf...@fearnside-systems.co.uk wrote:
 This sets CONFIG_SYS_HZ to 1000 for all boards that use the s3c2400 and
 s3c2410 cpu's which fixes various problems such as the timeouts in tftp being
 too short.
 
 Tested on an Embest SBC2440-II Board with local u-boot patches as I don't
 have any s3c2400 or s3c2410 boards but need this patch applying before I can
 submit patches for the SBC2440-II Board. Also, ran MAKEALL for all ARM9 
 targets
 and no new warnings or errors were found.
 
 It was originally submitted on 21/06/2009 but didn't get into the 2009.08
 release, and Jean-Pierre made one comment on the original patch (see
 http://lists.denx.de/pipermail/u-boot/2009-July/055470.html). I've made two
 changes to the original patch:
 - it's been re-based to the current release
 - I've re-named get_timer_raw() to get_ticks() in response to Jean-Pierre's 
 comment
 
 This affects the sbc2410, smdk2400, smdk2410 and trab boards. I've copied it
 directly to the maintainers of all except the sbc2410 which doesn't have an
 entry in MAINTAINERS.
 
 Signed-off-by: Kevin Morfitt kmorf...@aselaptop-1.localdomain
 ---
  cpu/arm920t/s3c24x0/timer.c |   36 
  include/configs/sbc2410x.h  |4 +---
  include/configs/smdk2400.h  |4 +---
  include/configs/smdk2410.h  |4 +---
  include/configs/trab.h  |   12 +---
  5 files changed, 24 insertions(+), 36 deletions(-)
Need to be test on trab or other but looks fine

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


Re: [U-Boot] [PATCH 3/4] s5pc1xx: support serial driver

2009-09-04 Thread Jean-Christophe PLAGNIOL-VILLARD
 +
 +#ifdef CONFIG_SERIAL0
 +#define UART_NR  S5PC1XX_UART0
 +#elif defined(CONFIG_SERIAL1)
 +#define UART_NR  S5PC1XX_UART1
 +#elif defined(CONFIG_SERIAL2)
 +#define UART_NR  S5PC1XX_UART2
 +#elif defined(CONFIG_SERIAL3)
 +#define UART_NR  S5PC1XX_UART3
 +#else
 +#error Bad: you didn't configure serial ...
 +#endif
why not use serial multi API?
 +
 +#define barrier() asm volatile( : : : memory)
this is really generic maybe put it somewhere else
 +
 +static inline s5pc1xx_uart_t *s5pc1xx_get_base_uart(enum s5pc1xx_uarts_nr nr)
 +{
 + if (cpu_is_s5pc100())
 + return (s5pc1xx_uart_t *)(S5PC100_PA_UART + (nr * 0x400));
 + else
 + return (s5pc1xx_uart_t *)(S5PC110_PA_UART + (nr * 0x400));
 +}
 +
 +/*
 + * The coefficient, used to calculate the baudrate on S5PC1XX UARTs is
 + * calculated as
 + * C = UBRDIV * 16 + number_of_set_bits_in_UDIVSLOT
 + * however, section 31.6.11 of the datasheet doesn't recomment using 1 for 1,
 + * 3 for 2, ... (2^n - 1) for n, instead, they suggest using these constants:
 + */
 +static const int udivslot[] = {
 + 0,
 + 0x0080,
 + 0x0808,
 + 0x0888,
 + 0x,
 + 0x4924,
 + 0x4a52,
 + 0x54aa,
 + 0x,
 + 0xd555,
 + 0xd5d5,
 + 0xddd5,
 + 0x,
 + 0xdfdd,
 + 0xdfdf,
 + 0xffdf,
 +};
 +
 +void serial_setbrg(void)
 +{
 + DECLARE_GLOBAL_DATA_PTR;
 + s5pc1xx_uart_t *const uart = s5pc1xx_get_base_uart(UART_NR);
 + u32 pclk = get_pclk();
please use this API
get_pclk_rate() as at91 sh4 and other

 + u32 baudrate = gd-baudrate;
 + int i;
 +
 + i = (pclk / baudrate) % 16;
 +
 + uart-UBRDIV = pclk / baudrate / 16 - 1;
please use accesor writex/readx
 +
 +int restartpowersequence = 0;
 +int atmsecs;
do you use it somewhere else?
I guess no so please make them static
 +
 +void uart_serial_setbrg(unsigned int baudrate, int port)
 +{
 + s5pc1xx_uart_t *const uart = s5pc1xx_get_base_uart(port);
 + u32 pclk = get_pclk();
 + int i;
 +
 + i = (pclk / baudrate) % 16;
 +
 + uart-UBRDIV = pclk / baudrate / 16 - 1;
 + uart-UDIVSLOT = udivslot[i];
 +}
please do not duplidate code
 +

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


Re: [U-Boot] [PATCH] arm_cortexa8: support cache flush to other soc

2009-09-04 Thread Jean-Christophe PLAGNIOL-VILLARD
On 12:45 Fri 04 Sep , Dirk Behme wrote:
 Kyungmin Park wrote:
  Hi,
  
  As he goes to home, I reply it instead.
 
 Nice weekend then :)
 
  On Fri, Sep 4, 2009 at 5:43 PM, Dirk Behmedirk.be...@googlemail.com wrote:
  Dear Minkyu Kang,
 
  Minkyu Kang wrote:
  Current code is supported only omap3 soc.
  this patch will support s5pc1xx(s5pc100 and s5pc110) soc also.
  Thanks for this patch!
 
  How is this patch related to
 
  http://lists.denx.de/pipermail/u-boot/2009-August/058492.html
 
  
  It's not good idea to move invalidate_cache to omap directory. we need it.
 
 Well, yes and no ;)
 
 Most probably you (== Samsung) can't use the invalidate_dcache version 
 we move in above patch to omap directory, because the version we move 
 above is OMAP3 specific (it has calls to OMAP3 ROM code). So no, it's 
 a good idea to move OMAP3 specific code to omap directory.
It's certainly not as the OMAP3 does not need to call the ROM code
so we can share the same for for S3P and omap3

 
 But yes, you might need DCache flush (*). So the idea of above patch 
 was to have your own (or generic) implementation, but let OMAP3 use 
 the custom one where needed.
no need for omap3

 
 (*) Do you really need DCache flush? It always was Jean-Christophe's 
 argument that U-Boot doesn't use any DCache at all.
It's true but U-Boot is not necessarely the first stage loader so yes
we will clean all cache
 
 0xC100 is the device type of s5pc100 then? So it should be
 
 if (get_device_type() != S5PC100_DEVICE)
 
 ? I hear some people crying please use macro ;)
 
 But I don't like this selection here. When we get additional similar 
 SoCs, we will end with something like
 
 if (get_device_type() != 0xC100) ||
(get_device_type() != FOO) ||
(get_device_type() != BAR))  ||
... {
 
 modifying each time cpu/arm_cortexa8/cpu.c.
 
 I would like more that we are able to compile the functionality based 
 on the config file we use for compilation. E.g. provide emtpy 
 l2_cache_disable(); function for SoCs that don't need it, but have 
 functionality behind it where needed.
multiple soc support will clearly simplify board support and improve code
testing but it's need to have the possiblity to be disable as the compile
to minimize the size impact

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


Re: [U-Boot] RFC: split ARM repo and distribute workload

2009-09-04 Thread Jean-Christophe PLAGNIOL-VILLARD
On 23:57 Fri 04 Sep , Wolfgang Denk wrote:
 Hello everybody,
 
 ARM has always been one of the architectures that generated a big
 number of different processors and SoCs, but recently the activitiy in
 this area is literally exploding.  This is partially due to the fact
 that ARM is currently used in many designs, so many new ARM based
 processors and SoCs and even more new ARM boards show up, but another
 and at least as important change is that some silicon and board
 vendors have started to actively pushing their products into the
 U-Boot (and Linux) mainline source trees (and *welcome* they all
 are!).
 
 It has become evident that this growing complexity has become way too
 massive to be shouldered by a single custodian, even a very active one
 like Jean-Christophe.
 
 I think we have no other choice but to add more manpower to this task,
 i. e. split the ARM respository and distribute the workload across a
 few more custodians.
 
 Unline with the Power architecture, where the split can be easily
 defined by processor lines, with ARM it seems more logical to me to
 differentiate by silicon vendors.
 
 After much thinking I therefor suggest to implement the following
 change for the ARM architecture:
 
 

I think this will be better

master ARM repository : Jean-Christophe Plagniol-Villard

Freescale (i.MX)Magnus Lilja?
Or are there any volunteers at Freescale?

Marvell Prafulla Wadaskar

Samsung (s3c, s5pc):Are there any volunteers at Samsung?

Texas Instruments (OMAP):   Tom Rix

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


Re: [U-Boot] [PATCH] Add support for the DevKit8000 board

2009-09-04 Thread Jean-Christophe PLAGNIOL-VILLARD
On 12:56 Sun 23 Aug , Frederik Kriewitz wrote:
 This patch adds support for the DevKit8000 board.
 
 Signed-off-by: Frederik Kriewitz frede...@kriewitz.eu
 ---
 mach-types.h needs to be synced (MACH_TYPE_DEVKIT8000)
 ---
  MAINTAINERS |4 +
  MAKEALL |1 +
  Makefile|3 +
  board/timll/devkit8000/Makefile |   52 +
  board/timll/devkit8000/config.mk|   35 
  board/timll/devkit8000/devkit8000.c |  131 
  board/timll/devkit8000/devkit8000.h |  373 
 +++
  doc/README.timll|   15 ++
  include/configs/devkit8000.h|  307 
  9 files changed, 921 insertions(+), 0 deletions(-)
  create mode 100644 board/timll/devkit8000/Makefile
  create mode 100644 board/timll/devkit8000/config.mk
  create mode 100644 board/timll/devkit8000/devkit8000.c
  create mode 100644 board/timll/devkit8000/devkit8000.h
  create mode 100644 doc/README.timll
  create mode 100644 include/configs/devkit8000.h

applied to u-boot-arm

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


Re: [U-Boot] [PATCH] Add support for the Calao SBC35-A9G20 board

2009-09-04 Thread Jean-Christophe PLAGNIOL-VILLARD
On 18:03 Mon 24 Aug , Albin Tonnerre wrote:
 The Calao SBC35-A9G20 board is manufactured and sold by Calao Systems
 http://www.calao-systems.com. It is built around an AT91SAM9G20 ARM SoC
 running at 400MHz. It features an Ethernet port, an SPI RTC backed by an 
 onboard
 battery , an SD/MMC slot, a CompactFlash slot, 64Mo of SDRAM, 256Mo of NAND
 flash, two USB host ports, and an USB device port. More informations can be
 found at http://www.calao-systems.com/articles.php?lng=enpg=5936
 
 Signed-off-by: Albin Tonnerre albin.tonne...@free-electrons.com
 ---
  MAINTAINERS  |4 +
  MAKEALL  |1 +
  Makefile |7 +
  board/calao/sbc35_a9g20/Makefile |   55 
  board/calao/sbc35_a9g20/config.mk|1 +
  board/calao/sbc35_a9g20/sbc35_a9g20.c|  197 
 ++
  board/calao/sbc35_a9g20/spi.c|   57 +
  cpu/arm926ejs/at91/at91sam9260_devices.c |2 +-
  include/configs/sbc35_a9g20.h|  194 +
  9 files changed, 517 insertions(+), 1 deletions(-)
  create mode 100644 board/calao/sbc35_a9g20/Makefile
  create mode 100644 board/calao/sbc35_a9g20/config.mk
  create mode 100644 board/calao/sbc35_a9g20/sbc35_a9g20.c
  create mode 100644 board/calao/sbc35_a9g20/spi.c
  create mode 100644 include/configs/sbc35_a9g20.h
 
Applied to u-boot-arm

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


Re: [U-Boot] [PATCH 4/8] OMAP3 Add usb device support

2009-09-04 Thread Jean-Christophe PLAGNIOL-VILLARD
Hi,

please be carefull you have a lot's of ligne which exceed 80 chars
limit

 +
 +/* Define MUSB_DEBUG before including this file to get debug macros */
 +#ifdef MUSB_DEBUG
 +
 +static inline void MUSB_PRINT_PWR(u8 b)
please lowercase
 +{
 + serial_printf(\tpower   0x%2.2x\n, b);
maybe a macro will simplify the code
#define MUSB_FLAGS_PRINT(x, y)  \
if (b  MUSB_##x_##y)   \
serial_printf(\t\t#y\n);

static inline void musb_print_pwr(u8 b)
{
serial_printf(\tpower   0x%2.2x\n, b);
MUSB_FLAGS_PRINT(POWER, ISOUPDATE);
MUSB_FLAGS_PRINT(POWER, SOFTCONN);
MUSB_FLAGS_PRINT(POWER, HSENAB);
MUSB_FLAGS_PRINT(POWER, HSMODE);
MUSB_FLAGS_PRINT(POWER, RESET);
MUSB_FLAGS_PRINT(POWER, RESUME);
MUSB_FLAGS_PRINT(POWER, SUSPENDM);
MUSB_FLAGS_PRINT(POWER, ENSUSPEND);
}
and so on
 +
 +static inline void MUSB_PRINT_CSR0(u16 w)
please lowercase and so on
 +{
 + serial_printf(\tcsr00x%4.4x\n, w);
 + if (w  MUSB_CSR0_FLUSHFIFO)
 + serial_printf(\t\tFLUSHFIFO\n);
 + if (w  MUSB_CSR0_P_SVDSETUPEND)
 + serial_printf(\t\tSERV_SETUPEND\n);
 + if (w  MUSB_CSR0_P_SVDRXPKTRDY)
 + serial_printf(\t\tSERV_RXPKTRDY\n);
 + if (w  MUSB_CSR0_P_SENDSTALL)
 + serial_printf(\t\tSENDSTALL\n);
 + if (w  MUSB_CSR0_P_SETUPEND)
 + serial_printf(\t\tSETUPEND\n);
 + if (w  MUSB_CSR0_P_DATAEND)
 + serial_printf(\t\tDATAEND\n);
 + if (w  MUSB_CSR0_P_SENTSTALL)
 + serial_printf(\t\tSENTSTALL\n);
 + if (w  MUSB_CSR0_TXPKTRDY)
 + serial_printf(\t\tTXPKTRDY\n);
 + if (w  MUSB_CSR0_RXPKTRDY)
 + serial_printf(\t\tRXPKTRDY\n);
 +}
 +

 +
 +#define MAX_ENDPOINT 15
maybe we can put it configurable
 +
 +#define GET_ENDPOINT(dev,ep) \
 +(((struct usb_device_instance *)(dev))-bus-endpoint_array + ep)
 +
 +#define SET_EP0_STATE(s) \
 +do { \
 + if ((0 = (s))  (SET_ADDRESS = (s))) {   \
 + if ((s) != ep0_state) { \
 + if ((debug_setup)  (debug_level  1)) \
 + serial_printf(INFO : Changing state from %s to 
 %s in %s at line %d\n, ep0_state_strings[ep0_state], ep0_state_strings[s], 
 __PRETTY_FUNCTION__, __LINE__); \
too long please split
 + ep0_state = s;  \
 + }   \
 + } else {\
 + if (debug_level  0)\
 + serial_printf(Error at %s %d with setting state %d is 
 invalid\n, __PRETTY_FUNCTION__, __LINE__, s); \
too long please split
 + }   \
 +} while (0)
 +
 +/* static implies these initialized to 0 or NULL */
 +static int debug_setup;
 +static int debug_level;
 +static struct musb_epinfo epinfo[MAX_ENDPOINT * 2];
 +static enum ep0_state_enum { IDLE = 0, TX, RX, SET_ADDRESS } ep0_state = 
 IDLE;
this will be better
static enum ep0_state_enum {
IDLE = 0,
TX,
RX,
SET_ADDRESS
} ep0_state = IDLE;
 +static char *ep0_state_strings[4] = {
 + IDLE,
 + TX,
 + RX,
 + SET_ADDRESS,
 +};
 +
 +static struct urb *ep0_urb;
 +struct usb_endpoint_instance *ep0_endpoint;
 +static struct usb_device_instance *udc_device;
 +static int enabled;
 +
 +#ifdef MUSB_DEBUG
 +static void musb_db_regs(void)
 +{
 + u8 b;
 + u16 w;
 +
 + b = readb(musbr-faddr);
 + serial_printf(\tfaddr   0x%2.2x\n, b);
 +
 + b = readb(musbr-power);
 + MUSB_PRINT_PWR(b);
 +
 + w = readw(musbr-ep[0].ep0.csr0);
 + MUSB_PRINT_CSR0(w);
 +
 + b = readb(musbr-devctl);
 + MUSB_PRINT_DEVCTL(b);
 +
 + b = readb(musbr-ep[0].ep0.configdata);
 + MUSB_PRINT_CONFIG(b);
 +
 + w = readw(musbr-frame);
 + serial_printf(\tframe   0x%4.4x\n, w);
 +
 + b = readb(musbr-index);
 + serial_printf(\tindex   0x%2.2x\n, b);
 +
 + w = readw(musbr-ep[1].epN.rxmaxp);
 + MUSB_PRINT_RXMAXP(w);
 +
 + w = readw(musbr-ep[1].epN.rxcsr);
 + MUSB_PRINT_RXCSR(w);
 +
 + w = readw(musbr-ep[1].epN.txmaxp);
 + MUSB_PRINT_TXMAXP(w);
 +
 + w = readw(musbr-ep[1].epN.txcsr);
 + MUSB_PRINT_TXCSR(w);
 +}
 +#else
 +#define musb_db_regs()
 +#endif /* DEBUG_MUSB */
 +
 +static void musb_peri_softconnect(void)
 +{
 + u8 power, devctl;
 + u8 intrusb;
 + u16 intrrx, intrtx;
 +
 + /* Power off MUSB */
 + power = readb(musbr-power);
 + power = ~MUSB_POWER_SOFTCONN;
 + writeb(power, musbr-power);
 +
 + /* Read intr to clear */
 + intrusb = readb(musbr-intrusb);
 + 

Re: [U-Boot] [PATCH 5/8] OMAP3 zoom1 Add usbtty configuration

2009-09-04 Thread Jean-Christophe PLAGNIOL-VILLARD
On 15:12 Fri 04 Sep , Tom Rix wrote:
 The primary console of zoom1 is the serial out from the jumpers
 accessed by removing the back panel.
 
 A secondary console is to use the usbtty.  The user can set this
 manually by doing
 
 setenv stdout usbtty; setenv stdin usbtty; setenv stderr usbtty
 saveenv
 
 usbtty will be usable by accessing the /dev/ttyACM0 on a linux host.
 
 Signed-off-by: Tom Rix tom@windriver.com
 ---
  include/configs/omap3_zoom1.h |   16 
  1 files changed, 16 insertions(+), 0 deletions(-)
Acked-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com

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


Re: [U-Boot] [PATCH, RFC] Make arm926ejs use -march=armv5t to avoid problems with EABI

2009-09-04 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:27 Fri 04 Sep , Simon Kagstrom wrote:
 Make arm926ejs use -march=armv5t to avoid problems with EABI
 
 Using -march=armv5t instead of armv5te allows Marvell Kirkwood-based
 boards to boot with the EABI changes introduced in commit
 f772acf8a584067033eff1e231fcd1fb3a00d3d9
 
 Signed-off-by: Simon Kagstrom simon.kagst...@netinsight.net
 ---
 
 This allows me to build with -mabi=aapcs-linux again. I still haven't
 found out what exactly causes the issues I had reported here
 
http://www.mail-archive.com/u-boot@lists.denx.de/msg20517.html
 
 but with this patch it works fine again. Disassembling the binary, I
 see that ldrd/strd instructions are gone (as expected), although I
 don't know if that is the issue.
it's wired because ldrd and strd are for 64bit data access
and will be faster than ldm/stm
and the e is explecitly specity to active the dsp assembly to improve
the data transfert speed

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


Re: [U-Boot] Interrupts in uboot with ARM AT91SAM9 (V2)

2009-09-04 Thread Jean-Christophe PLAGNIOL-VILLARD
On 10:31 Thu 03 Sep , Manuel Sahm wrote:
 Hello,
  
 I have to use interrupts in UBoot 1.3.4 - how could I enable them ?
  
 I have an AT91SAM9G20 - in ist header file I enable CONFIG_USE_IRQ und
 uncomment the lines#ifdefc CONFIG_USE_IRQ #error  #endif.
 I inserted the lines:
 #define CONFIG_STACKSIZE_IRQ (4*1024)
 #define CONFIG_STACKSIZE_FIQ (4*1024)
  
 
 In the file (/lib_amr/interrupts.c) I have to insert a function called
 do_irq().
 I inserted:
  
 void do_irq(struct pt_regs* pt_regs)
 {
  printf(interrupt request\n);
  show_regs(pt_regs);
  bad_mode();
 }
  
 When UBOOT starts all seems to be OK, but if I trigger my interrupt -
 the system hangsnothing is printed on screen anmd I can´t enter
 anything in the prompt ?
  
 Could you please help me ?
you need to clear the interrupt and add the at91 interrupt controller
to use it

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


[U-Boot] ARM Pull Request

2009-09-04 Thread Jean-Christophe PLAGNIOL-VILLARD
Hi,

Please pull
The following changes since commit 3aa8b68d80dbcb6829af60485c1e388b39af793d:
  Wolfgang Denk (1):
Merge branch 'next' of ../next

are available in the git repository at:

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

Albin Tonnerre (3):
  at91sam9260/afeb9260: Fix SPI initialization
  Add support for the Calao SBC35-A9G20 board
  Support for the Calao TNY-A9260/TNY-A9G20 boards

Frederik Kriewitz (1):
  Add support for the DevKit8000 board

Ilko Iliev (1):
  DM9000 init for pm9261

Ilya Yanok (1):
  imx27lite: add support for imx27lite board from LogicPD

Jean-Christophe PLAGNIOL-VILLARD (3):
  omap: move TI's boards to board/ti/
  arm: move Logicpd's boards to board/logicpd/
  omap3: move the other boards to board/

Prafulla Wadaskar (1):
  arm: Kirkwood: add SYSRSTn Duration Counter Support

Simon Kagstrom (1):
  Remove duplicate set_cr

 MAINTAINERS|   11 +
 MAKEALL|5 +
 Makefile   |   47 +++-
 board/afeb9260/afeb9260.c  |2 +-
 board/atmel/at91sam9260ek/at91sam9260ek.c  |2 +-
 .../{imx31_litekit = calao/sbc35_a9g20}/Makefile  |   16 +-
 board/calao/sbc35_a9g20/config.mk  |1 +
 board/calao/sbc35_a9g20/sbc35_a9g20.c  |  197 +
 board/calao/sbc35_a9g20/spi.c  |   57 
 board/{imx31_litekit = calao/tny_a9260}/Makefile  |   16 +-
 board/calao/tny_a9260/config.mk|1 +
 .../zoom2/debug_board.c = calao/tny_a9260/spi.c}  |   53 ++--
 board/calao/tny_a9260/tny_a9260.c  |  110 +++
 board/{omap5912osk = logicpd/imx27lite}/Makefile  |6 +-
 board/logicpd/imx27lite/config.mk  |1 +
 board/logicpd/imx27lite/imx27lite.c|   73 +
 board/logicpd/imx27lite/lowlevel_init.S|  170 +++
 board/{ = logicpd}/imx31_litekit/Makefile |0
 board/{ = logicpd}/imx31_litekit/config.mk|0
 board/{ = logicpd}/imx31_litekit/imx31_litekit.c  |0
 board/{ = logicpd}/imx31_litekit/lowlevel_init.S  |0
 board/{omap3 = logicpd}/zoom1/Makefile|0
 board/{omap3 = logicpd}/zoom1/config.mk   |0
 board/{omap3 = logicpd}/zoom1/zoom1.c |0
 board/{omap3 = logicpd}/zoom1/zoom1.h |0
 board/{omap3 = logicpd}/zoom2/Makefile|0
 board/{omap3 = logicpd}/zoom2/config.mk   |0
 board/{omap3 = logicpd}/zoom2/debug_board.c   |0
 board/{omap3 = logicpd}/zoom2/led.c   |0
 board/{omap3 = logicpd}/zoom2/zoom2.c |0
 board/{omap3 = logicpd}/zoom2/zoom2.h |0
 board/{omap3 = logicpd}/zoom2/zoom2_serial.c  |0
 board/{omap3 = logicpd}/zoom2/zoom2_serial.h  |0
 board/{omap3 = }/overo/Makefile   |0
 board/{omap3 = }/overo/config.mk  |0
 board/{omap3 = }/overo/overo.c|0
 board/{omap3 = }/overo/overo.h|0
 board/{omap3 = }/pandora/Makefile |0
 board/{omap3 = }/pandora/config.mk|0
 board/{omap3 = }/pandora/pandora.c|0
 board/{omap3 = }/pandora/pandora.h|0
 board/ronetix/pm9261/pm9261.c  |7 +
 board/{omap3 = ti}/beagle/Makefile|0
 board/{omap3 = ti}/beagle/beagle.c|0
 board/{omap3 = ti}/beagle/beagle.h|0
 board/{omap3 = ti}/beagle/config.mk   |0
 board/{omap3 = ti}/evm/Makefile   |0
 board/{omap3 = ti}/evm/config.mk  |0
 board/{omap3 = ti}/evm/evm.c  |0
 board/{omap3 = ti}/evm/evm.h  |0
 board/{ = ti}/omap1510inn/Makefile|0
 board/{ = ti}/omap1510inn/config.mk   |0
 board/{ = ti}/omap1510inn/lowlevel_init.S |0
 board/{ = ti}/omap1510inn/omap1510innovator.c |0
 board/{ = ti}/omap1610inn/Makefile|0
 board/{ = ti}/omap1610inn/config.mk   |0
 board/{ = ti}/omap1610inn/flash.c |0
 board/{ = ti}/omap1610inn/lowlevel_init.S |0
 board/{ = ti}/omap1610inn/omap1610innovator.c |0
 board/{ = ti}/omap2420h4/Makefile |0
 board/{ = ti}/omap2420h4/config.mk|0
 board/{ = ti}/omap2420h4/lowlevel_init.S  |0
 board/{ = ti}/omap2420h4/mem.c|0
 board/{ = ti}/omap2420h4/omap2420h4.c |0
 board/{ = ti}/omap2420h4/sys_info.c   |0
 board/{ = ti}/omap5912osk/Makefile|0
 board/{ = ti}/omap5912osk/config.mk   |0
 board/{ = ti}/omap5912osk/lowlevel_init.S |0
 board/{ = ti}/omap5912osk/omap5912osk.c

Re: [U-Boot] [PATCH v6 2/2] arm: A320: Add support for Faraday A320 evaluation board

2009-09-01 Thread Jean-Christophe PLAGNIOL-VILLARD
On 09:41 Tue 01 Sep , Po-Yu Chuang wrote:
 Dear Jean-Christophe PLAGNIOL-VILLARD,
 
 2009/8/20 Po-Yu Chuang ratbert.chu...@gmail.com:
  Dear Jean-Christophe PLAGNIOL-VILLARD,
  From: Po-Yu Chuang ratb...@faraday-tech.com
 
  This patch adds support for A320 evaluation board from Faraday. This board
  uses FA526 processor by default and has 512kB and 32MB NOR flash, 64M RAM.
  FA526 is an ARMv4 processor and uses the ARM920T source in this patch.
 
  Signed-off-by: Po-Yu Chuang ratb...@faraday-tech.com
  I failed to CC you again, but the patches appear in the mailing list.
  Hope you can see them.
 
  The command I used is like below.
  Is there anything wrong?
 
  git send-email \
  --from=ratbert.chu...@gmail.com \
  --to=u-b...@lists.denx.de \
  --cc=plagn...@jcrosoft.com \
  --cc...@denx.de \
  --cc=augulis.dar...@gmail.com \
  0002-arm-A320-Add-support-for-Faraday-A320-evaluation-boa.patch
 
 Did you get the patches?
 or I need to resend again?
still not please send me it as attached or please put on a http or ftp server

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


Re: [U-Boot] [PATCH] imx27lite: add support for imx27lite board from LogicPD

2009-09-01 Thread Jean-Christophe PLAGNIOL-VILLARD
On 02:32 Tue 11 Aug , Ilya Yanok wrote:
 This patch adds support for i.MX27-LITEKIT development board from
 LogicPD. This board uses i.MX27 SoC and has 2MB NOR flash, 64MB NAND
 flash, FEC ethernet controller integrated into i.MX27.
 
 Signed-off-by: Ilya Yanok ya...@emcraft.com
 ---
  MAINTAINERS |1 +
  MAKEALL |1 +
  Makefile|3 +
  board/logicpd/imx27lite/Makefile|   51 ++
  board/logicpd/imx27lite/config.mk   |1 +
  board/logicpd/imx27lite/imx27lite.c |   73 +
  board/logicpd/imx27lite/lowlevel_init.S |  170 +
  cpu/arm926ejs/mx27/generic.c|   65 
  include/asm-arm/arch-mx27/imx-regs.h|   12 ++
  include/configs/imx27lite.h |  252 
 +++
  10 files changed, 629 insertions(+), 0 deletions(-)
  create mode 100644 board/logicpd/imx27lite/Makefile
  create mode 100644 board/logicpd/imx27lite/config.mk
  create mode 100644 board/logicpd/imx27lite/imx27lite.c
  create mode 100644 board/logicpd/imx27lite/lowlevel_init.S
  create mode 100644 include/configs/imx27lite.h
Applie to u-boot-arm

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


Re: [U-Boot] [PATCH v3] arm: Kirkwood: add SYSRSTn Duration Counter Support

2009-09-01 Thread Jean-Christophe PLAGNIOL-VILLARD
On 20:59 Thu 20 Aug , Prafulla Wadaskar wrote:
 This feature can be used to trigger special command sysrstcmd using
 reset key long press event and environment variable sysrstdelay is set
 (useful for reset to factory or manufacturing mode execution)
 
 Kirkwood SoC implements a hardware-based SYSRSTn duration counter.
 When SYSRSTn is asserted low, a SYSRSTn duration counter is running.
 The counter value is stored in the SYSRSTn Length Counter Register
 The counter is based on the 25-MHz reference clock (40ns)
 It is a 29-bit counter, yielding a maximum counting duration of
 2^29/25 MHz (21.4 seconds). When the counter reach its maximum value,
 it remains at this value until counter reset is triggered by setting
 bit 31 of KW_REG_SYSRST_CNT
 
 Implementation:
 Upon long reset assertion ( ${sysrstdelay} in secs) sysrstcmd will be
 executed if pre-defined in environment variables.
 This feature will be disabled if sysrstdelay variable is unset.
 
 for-ex.
 setenv sysrst_cmd echo starting factory reset;
  nand erase 0xa 0x2;
  echo finish ed sysrst command;
 will erase particular nand sector if triggered by this event
 
 Signed-off-by: Prafulla Wadaskar prafu...@marvell.com
 ---
 Change log:
 v2: updated as per review feedback for v1
 bug fix in the previous post (V2) fixed
 
 v2 repost:
 I am sorry for previous post v2, pls ignore it, this is the right patch for 
 the same
 
 v3: updated as per review feedback for v2
 all possible messages termed as debug
 
  cpu/arm926ejs/kirkwood/cpu.c|   75 
 +++
  include/asm-arm/arch-kirkwood/cpu.h |2 +
  2 files changed, 77 insertions(+), 0 deletions(-)
Applied to u-boot-arm

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


Re: [U-Boot] [PATCH v8] Support for the Calao TNY-A9260/TNY-A9G20 boards

2009-09-01 Thread Jean-Christophe PLAGNIOL-VILLARD
On 16:04 Thu 20 Aug , Albin Tonnerre wrote:
 The Calao TNY-A9260 and TNY-9G20 are boards manufactured and sold by
 Calao Systems http://www.calao-systems.com. Their components are very
 similar to the AT91SAM9260EK board, so their configuration is based on
 the configuration of this board. There are however some differences:
 different clocks, no LCD, no ethernet. They also can use SPI EEPROM to
 store the environment.
 
 Signed-off-by: Albin Tonnerre albin.tonne...@free-electrons.com
 ---
  Changes in v7:
   - As per Jean-Christophe's commentes, fix long lines and use uppercase for
 defines in include/configs/tny_a9260.h. Slightly rework the ifdef logic in
 the process
   - Add an entry in MAINTAINERS for the tny_a9g20 as weel, since both 9260 and
 9g20 are supported
 
  Changes in v8:
   - Update MAKEALL to reflect the changes in Makefile, and add the tny_a9g20
 
  MAINTAINERS  |5 +
  MAKEALL  |2 +
  Makefile |   10 ++
  board/calao/tny_a9260/Makefile   |   55 ++
  board/calao/tny_a9260/config.mk  |1 +
  board/calao/tny_a9260/spi.c  |   50 +
  board/calao/tny_a9260/tny_a9260.c|  110 +++
  cpu/arm926ejs/at91/at91sam9260_devices.c |2 +-
  include/configs/tny_a9260.h  |  172 
 ++
  9 files changed, 406 insertions(+), 1 deletions(-)
  create mode 100644 board/calao/tny_a9260/Makefile
  create mode 100644 board/calao/tny_a9260/config.mk
  create mode 100644 board/calao/tny_a9260/spi.c
  create mode 100644 board/calao/tny_a9260/tny_a9260.c
  create mode 100644 include/configs/tny_a9260.h
 
applied to u-boot-arm

but merged manually

please next time when you add different board does it as a patch series
to avoid the manual merge

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


Re: [U-Boot] [PATCH] at91sam9260/afeb9260: Fix SPI initialization

2009-09-01 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:26 Tue 01 Sep , Albin Tonnerre wrote:
 Commit 7ebafb7ec1a0285af8380623c009576f92583b98 introduced a mistake in the 
 spi
 init function call for those boards. This patch fixes this.
 
 Signed-off-by: Albin Tonnerre albin.tonne...@free-electrons.com
 ---
  board/afeb9260/afeb9260.c |2 +-
  board/atmel/at91sam9260ek/at91sam9260ek.c |2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
applied to u-boot-arm

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


Re: [U-Boot] Intel IQ31244

2009-08-29 Thread Jean-Christophe PLAGNIOL-VILLARD
On 13:26 Fri 28 Aug , Uladzislau Rezki wrote:
 Hello list,
 
 I have Intel IQ31244 board that is based on XScale-IOP8032x Family processor.
 I want to use u-boot as embedded loader but it seems to me that this
 board is not
 supported by u-boot.
 
 So, my questions are: Is it possible to build u-boot for my device ?
 Has anyone had any
 experience with such device ?
It's not supported for now
we only support ixp425
but it will not be so difficult to add it

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


Re: [U-Boot] [PATCH] Support for Embedtronics/MRFSA board.

2009-08-29 Thread Jean-Christophe PLAGNIOL-VILLARD
On 21:05 Sat 29 Aug , Albin Tonnerre wrote:
 Hi Sami,
 
 Please note that I'm not an u-boot custodian, so what follows is by no means
 authoritative.
 However, I do have some comments about your code:
agreed with all comments

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


Re: [U-Boot] [PATCH] Support for Embedtronics/MRFSA board.

2009-08-29 Thread Jean-Christophe PLAGNIOL-VILLARD
On 20:22 Sat 29 Aug , Sami Kantoluoto wrote:
 Adds support for Embedtronics Oy's MRFSA board. Board features
 AT91SAM9G20 controller, 64 MB of SDRAM, two 64 Mbit data flashses
 (AT45DB321), SD card slot, GSM modem, GPS receiver, ZigBee (CC2420),
 USB host ports, USB device port, two RS232 and one RS422/RS485 port,
 two opto isolated inputs, two relays and bunch of leds.
 
 This patch supports booting (e.g. Linux kernel) from following
 media/interface:
 
   - dataflash
   - ethernet
   - debug serial port
   - SD/MMC
 
 Signed-off-by: Sami Kantoluoto sami.kantolu...@embedtronics.fi
 ---
  Makefile |   13 +
  board/embedtronics/mrfsa/Makefile|   60 +
  board/embedtronics/mrfsa/config.mk   |1 +
  board/embedtronics/mrfsa/iopins.h|   36 +++
  board/embedtronics/mrfsa/ks8995ma.h  |  255 ++
  board/embedtronics/mrfsa/mrfsa.c |  481 
 ++
  board/embedtronics/mrfsa/partition.c |   44 +++
  board/embedtronics/mrfsa/watchdog.c  |   62 +
  common/console.c |6 +
  cpu/arm926ejs/at91/timer.c   |7 +-
  drivers/net/macb.c   |4 +
  include/asm-arm/mach-types.h |   13 +
  include/configs/mrfsa.h  |  197 ++
  lib_arm/bootm.c  |   13 +
  14 files changed, 1191 insertions(+), 1 deletions(-)
  create mode 100644 board/embedtronics/mrfsa/Makefile
  create mode 100644 board/embedtronics/mrfsa/config.mk
  create mode 100644 board/embedtronics/mrfsa/iopins.h
  create mode 100644 board/embedtronics/mrfsa/ks8995ma.h
  create mode 100644 board/embedtronics/mrfsa/mrfsa.c
  create mode 100644 board/embedtronics/mrfsa/partition.c
  create mode 100644 board/embedtronics/mrfsa/watchdog.c
  create mode 100644 include/configs/mrfsa.h
first please split this patch in ortogonal changeset
as
1) patch for macb
2) patch for your switch
3) patch for the watchdog
4) patch for your board
please put the the sync request of the mach-types.h about your
board after the ---
I'll handle it myself before apply your board
 
 index 000..bfc7bad
 --- /dev/null
 +++ b/board/embedtronics/mrfsa/ks8995ma.h
 @@ -0,0 +1,255 @@
 +/*
 + * (C) Copyright 2009
 + * Sami Kantoluoto sami.kantolu...@embedtronics.fi
 + * Embedtronics Oy www.embedtronics.fi
 + *
 + * See file CREDITS for list of people who contributed to this
 + * project.
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License as
 + * published by the Free Software Foundation; either version 2 of
 + * the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 + * MA 02111-1307 USA
 + */
 +
 +#ifndef  _dev_spi_ks8995ma_h_
 +#define  _dev_spi_ks8995ma_h_1
 +
 +#define  KS_OK   0
 +#define  KS_ERROR-1
 +
 +#define  KS_RD_DATA  0x03
 +#define  KS_WR_DATA  0x02
 +
please be awre that I've start to work on the adding of a phylib
http://git.denx.de/?p=u-boot/u-boot-arm.git;a=shortlog;h=refs/heads/phylib

which will simplify phy and switch support so please take a look on it
 diff --git a/board/embedtronics/mrfsa/mrfsa.c 
 b/board/embedtronics/mrfsa/mrfsa.c
 new file mode 100644
 index 000..6420c4b
 --- /dev/null
 +++ b/board/embedtronics/mrfsa/mrfsa.c
 @@ -0,0 +1,481 @@
 +/*
 + * (C) Copyright 2007-2008
 + * Stelian Pop stelian@leadtechdesign.com
 + * Lead Tech Design www.leadtechdesign.com
 + *
 + * (C) Copyright 2009
 + * Sami Kantoluoto sami.kantolu...@embedtronics.fi
 + * Embedtronics Oy www.embedtronics.fi
 + *
 + * See file CREDITS for list of people who contributed to this
 + * project.
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License as
 + * published by the Free Software Foundation; either version 2 of
 + * the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 + * MA 02111-1307 USA
 + */
 +
 +#include common.h
 +#include asm/arch/at91_common.h
 +#include 

[U-Boot] [RFC PATCH 3/3] phylib: add generic phy driver

2009-08-26 Thread Jean-Christophe PLAGNIOL-VILLARD
this driver must be the last one registered to be the last one probed

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 drivers/net/phy/Makefile  |1 +
 drivers/net/phy/generic.c |   35 +++
 drivers/net/phy/phylib.c  |8 
 include/phydev.h  |5 +
 4 files changed, 49 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/phy/generic.c

diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile
index c8abc21..987504f 100644
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -25,6 +25,7 @@ include $(TOPDIR)/config.mk
 
 LIB:= $(obj)libphy.a
 
+COBJS-$(CONFIG_PHY_GENERIC) += generic.o
 COBJS-$(CONFIG_BITBANGMII) += miiphybb.o
 COBJS-$(CONFIG_MV88E61XX_SWITCH) += mv88e61xx.o
 COBJS-$(CONFIG_MII) += miidev.o
diff --git a/drivers/net/phy/generic.c b/drivers/net/phy/generic.c
new file mode 100644
index 000..0d8f69c
--- /dev/null
+++ b/drivers/net/phy/generic.c
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2009 Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+#include common.h
+#include phydev.h
+
+void generic_phy_register(void)
+{
+   struct phy_driver generic_phy = {
+   .name = Generic PHY,
+   .phy_id = 0x,
+   .phy_id_mask = 0x,
+   .features = 0,
+   .config_init = generic_phy_init,
+   };
+
+   phy_driver_register(generic_phy);
+}
diff --git a/drivers/net/phy/phylib.c b/drivers/net/phy/phylib.c
index 100c6c5..e6d1b8c 100644
--- a/drivers/net/phy/phylib.c
+++ b/drivers/net/phy/phylib.c
@@ -52,6 +52,14 @@ int phy_init(void)
/* Initialize the list */
INIT_LIST_HEAD(phy_drvs.list);
 
+   /*
+* this generic phy driver must be the last one registered to be
+* the last one probed
+*/
+#ifdef CONFIG_PHY_GENERIC
+   generic_phy_register();
+#endif
+
return 0;
 }
 
diff --git a/include/phydev.h b/include/phydev.h
index b15e138..fb06142 100644
--- a/include/phydev.h
+++ b/include/phydev.h
@@ -116,4 +116,9 @@ int genphy_restart_aneg(struct phy_device *phydev);
 int genphy_setup_forced(struct phy_device *phydev);
 int genphy_update_link(struct phy_device *phydev);
 
+/*
+ * Phy register functions
+ */
+void generic_phy_register(void);
+
 #endif /* __PHYDEV_H__ */
-- 
1.6.3.1

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


[U-Boot] [RFC PATCH 2/3] net: add phylib implementation

2009-08-26 Thread Jean-Christophe PLAGNIOL-VILLARD
the current implementation will allow you to probe, instance and mananage
one phy_device per mii_device

this implementation is based on the linux implementation done by Andy Fleming

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 drivers/net/phy/Makefile |1 +
 drivers/net/phy/phylib.c |  535 ++
 include/linux/ethtool.h  |  172 +++
 include/linux/mii.h  |  392 --
 include/miidev.h |1 +
 include/phydev.h |  119 ++
 6 files changed, 1060 insertions(+), 160 deletions(-)
 create mode 100644 drivers/net/phy/phylib.c
 create mode 100644 include/linux/ethtool.h
 rewrite include/linux/mii.h (67%)
 create mode 100644 include/phydev.h

diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile
index 6775e44..c8abc21 100644
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -29,6 +29,7 @@ COBJS-$(CONFIG_BITBANGMII) += miiphybb.o
 COBJS-$(CONFIG_MV88E61XX_SWITCH) += mv88e61xx.o
 COBJS-$(CONFIG_MII) += miidev.o
 COBJS-$(CONFIG_CMD_MII) += miidev.o
+COBJS-$(CONFIG_NET_PHYLIB) += phylib.o
 
 COBJS  := $(sort $(COBJS-y))
 SRCS   := $(COBJS:.o=.c)
diff --git a/drivers/net/phy/phylib.c b/drivers/net/phy/phylib.c
new file mode 100644
index 000..100c6c5
--- /dev/null
+++ b/drivers/net/phy/phylib.c
@@ -0,0 +1,535 @@
+/*
+ * drivers/net/phy/phy_device.c
+ *
+ * Framework for finding and configuring PHYs.
+ * Also contains generic PHY driver
+ *
+ * Copyright (c) 2009 Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
+ *
+ * Author: Andy Fleming
+ *
+ * Copyright (c) 2004 Freescale Semiconductor, Inc.
+ *
+ * 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.
+ *
+ */
+
+#include common.h
+#include net.h
+#include malloc.h
+#include miidev.h
+#include phydev.h
+
+#define PHY_AN_TIMEOUT (10 * CONFIG_SYS_HZ)
+
+static struct phy_driver phy_drvs;
+static int genphy_config_init(struct phy_device *phydev);
+
+int phy_driver_register(struct phy_driver *phydrv)
+{
+   if(!phydrv)
+   return -1;
+
+   list_add_tail(phydrv-list, phy_drvs.list);
+
+   if (!phydrv-config_init)
+   phydrv-config_init = genphy_config_init;
+
+   if (!phydrv-config_aneg)
+   phydrv-config_aneg = genphy_config_aneg;
+
+   if (!phydrv-read_status)
+   phydrv-read_status = genphy_read_status;
+
+   return 0;
+}
+
+int phy_init(void)
+{
+   /* Initialize the list */
+   INIT_LIST_HEAD(phy_drvs.list);
+
+   return 0;
+}
+
+static struct phy_device* phy_search(struct mii_device *miidev, unsigned int 
id)
+{
+   struct list_head *pos;
+   struct phy_driver *phydrv;
+   struct phy_device *phydev;
+
+   list_for_each(pos, phy_drvs.list) {
+   phydrv = list_entry(pos, struct phy_driver, list);
+   if ((id  phydrv-phy_id_mask) ==
+   (phydrv-phy_id  phydrv-phy_id_mask)) {
+   phydev = calloc(1, sizeof(struct phy_device));
+
+   if (!phydev)
+   return NULL;
+
+   phydev-phydrv = phydrv;
+   phydev-miidev = miidev;
+   phydev-phy_id = id;
+   return phydev;
+   }
+   }
+
+   return NULL;
+}
+
+static int phy_connect(struct mii_device *miidev, int phy_addr)
+{
+   struct phy_device* phydev;
+   unsigned int id1, id2, id;
+   unsigned int phyaddr = (phy_addr + 1u) % 32u;
+
+   id1 = mii_read(miidev, phyaddr, MII_PHYSID1);
+   id2 = mii_read(miidev, phyaddr, MII_PHYSID2);
+   id  = (id1  16) | (id2);
+   phydev = phy_search(miidev, id);
+
+   if (!phydev)
+   return -1;
+
+   phydev-addr = phyaddr;
+   phydev-miidev = miidev;
+   miidev-phydev = phydev;
+
+   printf(%s found at 0x%x\n, phydev-phydrv-name, phyaddr);
+
+   return 0;
+}
+
+/* Automatically gets and returns the PHY device */
+int phy_device_connect(struct mii_device *miidev, int phy_addr,
+   void (*adjust_link) (struct mii_device *miidev))
+{
+   struct phy_driver* phydrv;
+   struct phy_device* phydev;
+   unsigned int i;
+
+   if (!miidev-phydev) {
+   if (phy_addr = 0) {
+   if (phy_connect(miidev, phy_addr)  0)
+   goto fail;
+   }
+
+   for (i = 0; i  32; i++) {
+   if(!phy_connect(miidev, phy_addr))
+   break;
+   }
+
+   if (i == 32)
+   goto fail;
+
+   phydev = miidev-phydev;
+   phydrv = phydev-phydrv;
+
+   phydev

Re: [U-Boot] Phy lib again

2009-08-25 Thread Jean-Christophe PLAGNIOL-VILLARD
On 09:08 Tue 25 Aug , Stefan Roese wrote:
 Hi Michal,
 
 On Tuesday 25 August 2009 09:02:14 Michal Simek wrote:
  I saw you have phy lib in your branch. What is the current state?
  Are there any problems? When do you want to add to mainline?
 
 IIRC, Jean-Christophe is also working on a PHY lib implementation (port from 
 the Linux version).
 
 Jean-Christophe, what's the current status of this work? I suggest you start 
 sending ideas/patches for discussion soon, perhaps as RFC in the first stage.
as I've nearly finish but yes I can send an RFC

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


Re: [U-Boot] [PATCH 1/3] omap: move TI's boards to board/ti/

2009-08-24 Thread Jean-Christophe PLAGNIOL-VILLARD
 Second, where do you know from that all these boards are from TI?
 Are you sure that they are not from SpectrumDigital, Mistral or
 DigiKey etc?
here you mix board vendor and distributor as example you can buy a atmel
ref design at DigiKey or resistor, soc, ddr, etc...


 
 Third, I don't like the mixing of board and vendor name as directory
 names. It seems to me that where you think you know the vendor, you
 use the vendor name, and where you seem to not know it, you use the
 board name. So, to be consistent, and to overcome vendor name issue
 above, I'd like to use the board name everywhere. That is:
 
 board/beagle/
 board/omap3evm/
 board/omap1510inn/
 ...
 board/omap5912osk/
 ...
 board/omap2420h4/
 ...
 board/zoom1/
 board/zoom2/
 board/overo/
 board/pandora/
 ...
 
 To improve this even more, something like this would be nice:
 
 board/omap3beagle/
 board/omap3evm/
 board/omap1innovator/
 ...
 board/omap1osk/
 ...
 board/omap2h4/
 ...
 board/omap3zoom1/
 board/omap3zoom2/
 board/omap3overo/
 board/omap3pandora/
 ...
it's not the TI board's name and there is no need to specify in each board
name the arch as it's easy to known it via Makefile or config.h
and as repeat multiple time on the ml we prefer shorter name

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


Re: [U-Boot] [PATCH] Add support for the DevKit8000 board

2009-08-24 Thread Jean-Christophe PLAGNIOL-VILLARD
On 12:56 Sun 23 Aug , Frederik Kriewitz wrote:
 This patch adds support for the DevKit8000 board.
 
 Signed-off-by: Frederik Kriewitz frede...@kriewitz.eu
 ---
 mach-types.h needs to be synced (MACH_TYPE_DEVKIT8000)
 ---
  MAINTAINERS |4 +
  MAKEALL |1 +
  Makefile|3 +
  board/timll/devkit8000/Makefile |   52 +
  board/timll/devkit8000/config.mk|   35 
  board/timll/devkit8000/devkit8000.c |  131 
  board/timll/devkit8000/devkit8000.h |  373 
 +++
  doc/README.timll|   15 ++
  include/configs/devkit8000.h|  307 
  9 files changed, 921 insertions(+), 0 deletions(-)
  create mode 100644 board/timll/devkit8000/Makefile
  create mode 100644 board/timll/devkit8000/config.mk
  create mode 100644 board/timll/devkit8000/devkit8000.c
  create mode 100644 board/timll/devkit8000/devkit8000.h
  create mode 100644 doc/README.timll
  create mode 100644 include/configs/devkit8000.
this one is fine
but for the next time please specify in the subject the patch version to known
which one is the last

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


Re: [U-Boot] [PATCH v6] Add support for the DevKit8000 board

2009-08-24 Thread Jean-Christophe PLAGNIOL-VILLARD
On 20:31 Mon 24 Aug , Frederik Kriewitz wrote:
 This patch adds support for the DevKit8000 board.
 
 Signed-off-by: Frederik Kriewitz frede...@kriewitz.eu
 ---
 mach-types.h needs to be synced (MACH_TYPE_DEVKIT8000)
 
 Changelog:
 v6:
  added changelog
 
 v5:
  moved files from board/timll/devkit8000 to board/devkit8000
  added omap3_ config file prefix
  renamed README.timll to README.devkit8000
 
 v4:
  moved files from board/omap3/devkit8000 to board/timll/devkit8000 (vendor 
 dir)
  renamed README.devkit8000 to README.timll
  fixed LIST_ARM_CORTEX_A8 order (MAKEALL)
  fixed MAINTAINERS ordered
  comment style changes
  fixed potential alignment issue (enetaddr assignment)
 
 v3
  moved files from board/omap3/devkit8000 to board/devkit8000
  removed omap3_ config file prefix
  moved doc from README.omap3 to README.devkit8000
  added MAKEALL entry
  added warning in case a Die ID based MAC is used
  removed reset_phy() (Ethernet is only initiated if it's needed)
  moved CONFIG_SYS_NO_FLASH up (before #include config_cmd_default.h)
  command list cleanup
  minor define cleanups
  moved some common kernel args to commonargs variable
 
 v2:
  added MAINTAINERS entry
  code style fixes
  copyright added
  removed mach-types.h patch
  command list reordered
  boot command was moved to own variable (autoboot)
  fixed memtest config
  removed useless NOR flash settings
 
  MAINTAINERS|4 +
  MAKEALL|1 +
  Makefile   |3 +
  board/devkit8000/Makefile  |   52 +
  board/devkit8000/config.mk |   35 
  board/devkit8000/devkit8000.c  |  131 +
  board/devkit8000/devkit8000.h  |  373 
 
  doc/README.devkit8000  |   15 ++
  include/configs/devkit8000.h   |  307 +
  include/configs/omap3_devkit8000.h |  307 +
why do you duplicate it?
maybe an miss when updating the patch

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


Re: [U-Boot] [PATCH] sh: Fix build of sh7785lcr 32bit mode

2009-08-24 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:01 Mon 24 Aug , Nobuhiro Iwamatsu wrote:
 Update lowlevel_init.S and macro.h.
 
 Signed-off-by: Nobuhiro Iwamatsu iwama...@nigauri.org
 ---
  board/espt/lowlevel_init.S  |   10 +---
  board/renesas/sh7785lcr/lowlevel_init.S |   96 
 +--
  include/asm-sh/macro.h  |   37 ++--
  3 files changed, 71 insertions(+), 72 deletions(-)
maybe update all other sh assembly would be nice too
as IIRC it will increase the binary size otherwise
 
 diff --git a/board/espt/lowlevel_init.S b/board/espt/lowlevel_init.S
 index 7d5d72e..7f0686c 100644
 --- a/board/espt/lowlevel_init.S
 +++ b/board/espt/lowlevel_init.S
 @@ -72,15 +72,7 @@ lowlevel_init:
   /* set DDR-SDRAM dummy read */
   write32 MMSEL_A, MMSEL_D
Best Regards,
J.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] sh/rsk7203: add missing include net.h

2009-08-23 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 board/renesas/rsk7203/rsk7203.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/board/renesas/rsk7203/rsk7203.c b/board/renesas/rsk7203/rsk7203.c
index 2b85799..fbf2e23 100644
--- a/board/renesas/rsk7203/rsk7203.c
+++ b/board/renesas/rsk7203/rsk7203.c
@@ -21,6 +21,7 @@
  */
 
 #include common.h
+#include net.h
 #include netdev.h
 #include asm/io.h
 #include asm/processor.h
-- 
1.6.3.1

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


[U-Boot] [RFC] Serial API cleanup

2009-08-23 Thread Jean-Christophe PLAGNIOL-VILLARD
Hi,

currenlty we have 3 api for stdio device : stdio_dev, serial_device
(multi-serial) and the serial_getc/putc...

this cleanup will join them in one api the stdio_dev which will support
the multi-serial for before and after relocation

this will also pass the current device to the driver to allow it to
have base address and other information to simplify the implementation
and avoid workarround as done for ns16550 on the omap3 zoom or ppc4xx
as example

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


[U-Boot] [RFC PATCH 1/3] serial: join stdio_dev and serial_device

2009-08-23 Thread Jean-Christophe PLAGNIOL-VILLARD
we use for the serail multi api the struct stdio_dev also which will reduce
and simplify the code and prepare the join of all serial APIs.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 board/esd/pmc440/pmc440.c|2 +-
 board/lwmon/lwmon.c  |2 +-
 board/omap3/zoom2/zoom2_serial.h |   18 +++---
 board/trizepsiv/conxs.c  |8 ++--
 common/serial.c  |   89 +++
 common/stdio.c   |3 -
 cpu/mpc5xxx/serial.c |   36 ++--
 cpu/mpc8xx/serial.c  |   36 ++--
 cpu/ppc4xx/4xx_uart.c|   38 +++---
 drivers/serial/serial.c  |   24 
 drivers/serial/serial_pxa.c  |   54 +-
 drivers/serial/serial_s3c24x0.c  |   22 
 include/serial.h |  109 -
 include/stdio_dev.h  |9 +++-
 14 files changed, 218 insertions(+), 232 deletions(-)
 rewrite include/serial.h (65%)

diff --git a/board/esd/pmc440/pmc440.c b/board/esd/pmc440/pmc440.c
index 9ffb08e..de01e93 100644
--- a/board/esd/pmc440/pmc440.c
+++ b/board/esd/pmc440/pmc440.c
@@ -53,7 +53,7 @@ int is_monarch(void);
 int bootstrap_eeprom_read(unsigned dev_addr, unsigned offset,
  uchar *buffer, unsigned cnt);
 
-struct serial_device *default_serial_console(void)
+struct stdio_dev *default_serial_console(void)
 {
uchar buf[4];
ulong delay;
diff --git a/board/lwmon/lwmon.c b/board/lwmon/lwmon.c
index 75b3209..b380c6c 100644
--- a/board/lwmon/lwmon.c
+++ b/board/lwmon/lwmon.c
@@ -469,7 +469,7 @@ int board_postclk_init (void)
return (0);
 }
 
-struct serial_device * default_serial_console (void)
+struct stdio_dev * default_serial_console (void)
 {
return gd-do_mdm_init ? serial_scc_device : serial_smc_device;
 }
diff --git a/board/omap3/zoom2/zoom2_serial.h b/board/omap3/zoom2/zoom2_serial.h
index c98158f..c963dc2 100644
--- a/board/omap3/zoom2/zoom2_serial.h
+++ b/board/omap3/zoom2/zoom2_serial.h
@@ -60,16 +60,16 @@ int quad_tstc_##n(void) \
 {  \
return quad_tstc_dev(QUAD_BASE_##n);\
 }  \
-struct serial_device zoom2_serial_device##n =  \
+struct stdio_dev zoom2_serial_device##n =  \
 {  \
-   N(n),   \
-   U(n),   \
-   quad_init_##n,  \
-   quad_setbrg_##n,\
-   quad_getc_##n,  \
-   quad_tstc_##n,  \
-   quad_putc_##n,  \
-   quad_puts_##n,  \
+   .name = N(n),   \
+   .ctlr = U(n),   \
+   .start = quad_init_##n, \
+   .setbrg = quad_setbrg_##n,  \
+   .getc = quad_getc_##n,  \
+   .tstc = quad_tstc_##n,  \
+   .putc = quad_putc_##n,  \
+   .puts = quad_puts_##n,  \
 };
 
 #endif /* ZOOM2_SERIAL_H */
diff --git a/board/trizepsiv/conxs.c b/board/trizepsiv/conxs.c
index 8c11456..e88c86c 100644
--- a/board/trizepsiv/conxs.c
+++ b/board/trizepsiv/conxs.c
@@ -40,9 +40,9 @@ DECLARE_GLOBAL_DATA_PTR;
 #defineRH_A_PSM(1  8)/* power switching mode 
*/
 #defineRH_A_NPS(1  9)/* no power switching */
 
-extern struct serial_device serial_ffuart_device;
-extern struct serial_device serial_btuart_device;
-extern struct serial_device serial_stuart_device;
+extern struct stdio_dev serial_ffuart_device;
+extern struct stdio_dev serial_btuart_device;
+extern struct stdio_dev serial_stuart_device;
 
 #if CONFIG_POLARIS
 #define BOOT_CONSOLE   serial_stuart
@@ -130,7 +130,7 @@ int board_late_init(void)
return 0;
 }
 
-struct serial_device *default_serial_console (void)
+struct stdio_dev *default_serial_console (void)
 {
return serial_ffuart_device;
 }
diff --git a/common/serial.c b/common/serial.c
index 41a24c2..f85a52e 100644
--- a/common/serial.c
+++ b/common/serial.c
@@ -27,11 +27,10 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static struct serial_device *serial_devices = NULL;
-static struct serial_device *serial_current = NULL;
+static struct stdio_dev *serial_current = NULL;
 
 #if !defined(CONFIG_LWMON)  !defined(CONFIG_PXA27X)
-struct serial_device *__default_serial_console (void)
+struct stdio_dev *__default_serial_console (void)
 {
 #if defined(CONFIG_8xx_CONS_SMC1) || defined(CONFIG_8xx_CONS_SMC2)
return serial_smc_device;
@@ -76,20 +75,20 @@ struct serial_device *__default_serial_console (void)
 #endif
 }
 
-struct serial_device *default_serial_console(void) __attribute__((weak, 
alias

[U-Boot] [RFC PATCH 3/3] stdio/serial: factorize retrieve current device

2009-08-23 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 common/serial.c |   62 +-
 1 files changed, 20 insertions(+), 42 deletions(-)

diff --git a/common/serial.c b/common/serial.c
index a4171be..7d764f2 100644
--- a/common/serial.c
+++ b/common/serial.c
@@ -179,77 +179,55 @@ void serial_reinit_all (void)
}
 }
 
-int serial_init (void)
+struct stdio_dev * serial_get_current_device(void)
 {
-   if (!(gd-flags  GD_FLG_RELOC) || !serial_current) {
-   struct stdio_dev *dev = default_serial_console ();
+   if (!(gd-flags  GD_FLG_RELOC) || !serial_current)
+   return default_serial_console ();
 
-   if (dev-start)
-   return dev-start (dev);
+   return serial_current;
+}
 
-   return 0;
-   }
+int serial_init (void)
+{
+   struct stdio_dev *dev = serial_get_current_device();
 
-   if (serial_current-start)
-   return serial_current-start (serial_current);
+   if (dev-start)
+   return dev-start (dev);
 
return 0;
 }
 
 void serial_setbrg (void)
 {
-   if (!(gd-flags  GD_FLG_RELOC) || !serial_current) {
-   struct stdio_dev *dev = default_serial_console ();
-
-   dev-setbrg (dev);
-   return;
-   }
+   struct stdio_dev *dev = serial_get_current_device();
 
-   serial_current-setbrg (serial_current);
+   dev-setbrg (dev);
 }
 
 int serial_getc (void)
 {
-   if (!(gd-flags  GD_FLG_RELOC) || !serial_current) {
-   struct stdio_dev *dev = default_serial_console ();
+   struct stdio_dev *dev = serial_get_current_device();
 
-   return dev-getc (dev);
-   }
-
-   return serial_current-getc (serial_current);
+   return dev-getc (dev);
 }
 
 int serial_tstc (void)
 {
-   if (!(gd-flags  GD_FLG_RELOC) || !serial_current) {
-   struct stdio_dev *dev = default_serial_console ();
-
-   return dev-tstc (dev);
-   }
+   struct stdio_dev *dev = serial_get_current_device();
 
-   return serial_current-tstc (serial_current);
+   return dev-tstc (dev);
 }
 
 void serial_putc (const char c)
 {
-   if (!(gd-flags  GD_FLG_RELOC) || !serial_current) {
-   struct stdio_dev *dev = default_serial_console ();
+   struct stdio_dev *dev = serial_get_current_device();
 
-   dev-putc (dev, c);
-   return;
-   }
-
-   serial_current-putc (serial_current, c);
+   dev-putc (dev, c);
 }
 
 void serial_puts (const char *s)
 {
-   if (!(gd-flags  GD_FLG_RELOC) || !serial_current) {
-   struct stdio_dev *dev = default_serial_console ();
-
-   dev-puts (dev, s);
-   return;
-   }
+   struct stdio_dev *dev = serial_get_current_device();
 
-   serial_current-puts (serial_current, s);
+   dev-puts (dev, s);
 }
-- 
1.6.3.1

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


[U-Boot] [RFC PATCH 2/3] stdio: pass the current device to the driver

2009-08-23 Thread Jean-Christophe PLAGNIOL-VILLARD
to allow it to have base address and other information to simplify
the implementation and avoid workarround as done for ns16550 on the omap3 zoom
or ppc4xx as example

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 board/MAI/AmigaOneG3SE/video.c   |   10 +++---
 board/bf527-ezkit/video.c|4 +-
 board/bf548-ezkit/video.c|4 +-
 board/cm-bf548/video.c   |4 +-
 board/omap3/zoom2/zoom2_serial.h |   70 +++---
 board/rbc823/kbd.c   |4 +-
 common/cmd_log.c |   16 ++---
 common/console.c |   18 +-
 common/lcd.c |   21 +--
 common/serial.c  |   28 +++---
 common/stdio.c   |   58 ---
 common/usb_kbd.c |4 +-
 cpu/blackfin/jtag-console.c  |8 ++--
 cpu/mpc5xxx/serial.c |   24 ++--
 cpu/mpc8xx/serial.c  |   32 +-
 cpu/mpc8xx/video.c   |6 ++--
 cpu/ppc4xx/4xx_uart.c|   24 ++--
 drivers/input/i8042.c|4 +-
 drivers/net/netconsole.c |   10 +++---
 drivers/serial/arm_dcc.c |   39 ++---
 drivers/serial/serial.c  |   12 +++---
 drivers/serial/serial_pxa.c  |   36 ++--
 drivers/serial/serial_s3c24x0.c  |   12 +++---
 drivers/serial/usbtty.c  |8 ++--
 drivers/video/cfb_console.c  |6 ++--
 include/i8042.h  |4 +-
 include/stdio_dev.h  |   14 
 lib_i386/video.c |4 +-
 28 files changed, 273 insertions(+), 211 deletions(-)

diff --git a/board/MAI/AmigaOneG3SE/video.c b/board/MAI/AmigaOneG3SE/video.c
index e24e28b..4827f50 100644
--- a/board/MAI/AmigaOneG3SE/video.c
+++ b/board/MAI/AmigaOneG3SE/video.c
@@ -46,8 +46,8 @@ unsigned int video_scrolls = 0;
 #define VIDEO_NAME vga
 
 void video_test(void);
-void video_putc(char ch);
-void video_puts(char *string);
+void video_putc(struct stdio_dev *dev, char ch);
+void video_puts(struct stdio_dev *dev, char *string);
 void video_scroll(int rows);
 void video_banner(void);
 int  video_init(void);
@@ -163,7 +163,7 @@ void video_test(void)
 
 }
 
-void video_putc(char ch)
+void video_putc(struct stdio_dev *dev, char ch)
 {
 switch(ch)
 {
@@ -224,11 +224,11 @@ void video_scroll(int rows)
 cursor_col=0;
 }
 
-void video_puts(char *string)
+void video_puts(struct stdio_dev *dev, char *string)
 {
 while (*string)
 {
-   video_putc(*string);
+   video_putc(dev, *string);
string++;
 }
 }
diff --git a/board/bf527-ezkit/video.c b/board/bf527-ezkit/video.c
index 0b6b7b2..1c10d04 100644
--- a/board/bf527-ezkit/video.c
+++ b/board/bf527-ezkit/video.c
@@ -261,11 +261,11 @@ static void dma_bitblit(void *dst, fastimage_t *logo, int 
x, int y)
 
 }
 
-void video_putc(const char c)
+void video_putc(struct stdio_dev *dev, const char c)
 {
 }
 
-void video_puts(const char *s)
+void video_puts(struct stdio_dev *dev, const char *s)
 {
 }
 
diff --git a/board/bf548-ezkit/video.c b/board/bf548-ezkit/video.c
index f4f1bec..2d1ca7c 100644
--- a/board/bf548-ezkit/video.c
+++ b/board/bf548-ezkit/video.c
@@ -271,11 +271,11 @@ static void dma_bitblit(void *dst, fastimage_t *logo, int 
x, int y)
 
 }
 
-void video_putc(const char c)
+void video_putc(struct stdio_dev *dev, const char c)
 {
 }
 
-void video_puts(const char *s)
+void video_puts(struct stdio_dev *dev, const char *s)
 {
 }
 
diff --git a/board/cm-bf548/video.c b/board/cm-bf548/video.c
index 49dbe77..f963257 100644
--- a/board/cm-bf548/video.c
+++ b/board/cm-bf548/video.c
@@ -280,11 +280,11 @@ static void dma_bitblit(void *dst, fastimage_t *logo, int 
x, int y)
 
 }
 
-void video_putc(const char c)
+void video_putc(struct stdio_dev *dev, const char c)
 {
 }
 
-void video_puts(const char *s)
+void video_puts(struct stdio_dev *dev, const char *s)
 {
 }
 
diff --git a/board/omap3/zoom2/zoom2_serial.h b/board/omap3/zoom2/zoom2_serial.h
index c963dc2..76a84a4 100644
--- a/board/omap3/zoom2/zoom2_serial.h
+++ b/board/omap3/zoom2/zoom2_serial.h
@@ -35,41 +35,41 @@ extern int zoom2_debug_board_connected (void);
 #define N(a) S(quad##a)
 #define U(a) S(UART##a)
 
-#define QUAD_INIT(n)   \
-int quad_init_##n(void)\
-{  \
-   return quad_init_dev(QUAD_BASE_##n);\
-}  \
-void quad_setbrg_##n(void) \
-{  \
-   quad_setbrg_dev(QUAD_BASE_##n); \
-}  \
-void quad_putc_##n(const char c)   \
-{  \
-   quad_putc_dev(QUAD_BASE_##n, c);\
-}  \
-void

[U-Boot] [PATCH 2/3] arm: move Logicpd's boards to board/logicpd/

2009-08-23 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 Makefile  |6 +++---
 board/{ = logicpd}/imx31_litekit/Makefile|0
 board/{ = logicpd}/imx31_litekit/config.mk   |0
 board/{ = logicpd}/imx31_litekit/imx31_litekit.c |0
 board/{ = logicpd}/imx31_litekit/lowlevel_init.S |0
 board/{omap3 = logicpd}/zoom1/Makefile   |0
 board/{omap3 = logicpd}/zoom1/config.mk  |0
 board/{omap3 = logicpd}/zoom1/zoom1.c|0
 board/{omap3 = logicpd}/zoom1/zoom1.h|0
 board/{omap3 = logicpd}/zoom2/Makefile   |0
 board/{omap3 = logicpd}/zoom2/config.mk  |0
 board/{omap3 = logicpd}/zoom2/debug_board.c  |0
 board/{omap3 = logicpd}/zoom2/led.c  |0
 board/{omap3 = logicpd}/zoom2/zoom2.c|0
 board/{omap3 = logicpd}/zoom2/zoom2.h|0
 board/{omap3 = logicpd}/zoom2/zoom2_serial.c |0
 board/{omap3 = logicpd}/zoom2/zoom2_serial.h |0
 17 files changed, 3 insertions(+), 3 deletions(-)
 rename board/{ = logicpd}/imx31_litekit/Makefile (100%)
 rename board/{ = logicpd}/imx31_litekit/config.mk (100%)
 rename board/{ = logicpd}/imx31_litekit/imx31_litekit.c (100%)
 rename board/{ = logicpd}/imx31_litekit/lowlevel_init.S (100%)
 rename board/{omap3 = logicpd}/zoom1/Makefile (100%)
 rename board/{omap3 = logicpd}/zoom1/config.mk (100%)
 rename board/{omap3 = logicpd}/zoom1/zoom1.c (100%)
 rename board/{omap3 = logicpd}/zoom1/zoom1.h (100%)
 rename board/{omap3 = logicpd}/zoom2/Makefile (100%)
 rename board/{omap3 = logicpd}/zoom2/config.mk (100%)
 rename board/{omap3 = logicpd}/zoom2/debug_board.c (100%)
 rename board/{omap3 = logicpd}/zoom2/led.c (100%)
 rename board/{omap3 = logicpd}/zoom2/zoom2.c (100%)
 rename board/{omap3 = logicpd}/zoom2/zoom2.h (100%)
 rename board/{omap3 = logicpd}/zoom2/zoom2_serial.c (100%)
 rename board/{omap3 = logicpd}/zoom2/zoom2_serial.h (100%)

diff --git a/Makefile b/Makefile
index fa56f09..4441f8f 100644
--- a/Makefile
+++ b/Makefile
@@ -3099,10 +3099,10 @@ omap3_pandora_config :  unconfig
@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 pandora omap3 omap3
 
 omap3_zoom1_config :   unconfig
-   @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom1 omap3 omap3
+   @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom1 logicpd omap3
 
 omap3_zoom2_config :   unconfig
-   @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom2 omap3 omap3
+   @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom2 logicpd omap3
 
 #
 ## XScale Systems
@@ -3197,7 +3197,7 @@ apollon_config: unconfig
@echo CONFIG_ONENAND_U_BOOT = y  $(obj)include/config.mk
 
 imx31_litekit_config   : unconfig
-   @$(MKCONFIG) $(@:_config=) arm arm1136 imx31_litekit NULL mx31
+   @$(MKCONFIG) $(@:_config=) arm arm1136 imx31_litekit logicpd mx31
 
 imx31_phycore_eet_config \
 imx31_phycore_config   : unconfig
diff --git a/board/imx31_litekit/Makefile b/board/logicpd/imx31_litekit/Makefile
similarity index 100%
rename from board/imx31_litekit/Makefile
rename to board/logicpd/imx31_litekit/Makefile
diff --git a/board/imx31_litekit/config.mk 
b/board/logicpd/imx31_litekit/config.mk
similarity index 100%
rename from board/imx31_litekit/config.mk
rename to board/logicpd/imx31_litekit/config.mk
diff --git a/board/imx31_litekit/imx31_litekit.c 
b/board/logicpd/imx31_litekit/imx31_litekit.c
similarity index 100%
rename from board/imx31_litekit/imx31_litekit.c
rename to board/logicpd/imx31_litekit/imx31_litekit.c
diff --git a/board/imx31_litekit/lowlevel_init.S 
b/board/logicpd/imx31_litekit/lowlevel_init.S
similarity index 100%
rename from board/imx31_litekit/lowlevel_init.S
rename to board/logicpd/imx31_litekit/lowlevel_init.S
diff --git a/board/omap3/zoom1/Makefile b/board/logicpd/zoom1/Makefile
similarity index 100%
rename from board/omap3/zoom1/Makefile
rename to board/logicpd/zoom1/Makefile
diff --git a/board/omap3/zoom1/config.mk b/board/logicpd/zoom1/config.mk
similarity index 100%
rename from board/omap3/zoom1/config.mk
rename to board/logicpd/zoom1/config.mk
diff --git a/board/omap3/zoom1/zoom1.c b/board/logicpd/zoom1/zoom1.c
similarity index 100%
rename from board/omap3/zoom1/zoom1.c
rename to board/logicpd/zoom1/zoom1.c
diff --git a/board/omap3/zoom1/zoom1.h b/board/logicpd/zoom1/zoom1.h
similarity index 100%
rename from board/omap3/zoom1/zoom1.h
rename to board/logicpd/zoom1/zoom1.h
diff --git a/board/omap3/zoom2/Makefile b/board/logicpd/zoom2/Makefile
similarity index 100%
rename from board/omap3/zoom2/Makefile
rename to board/logicpd/zoom2/Makefile
diff --git a/board/omap3/zoom2/config.mk b/board/logicpd/zoom2/config.mk
similarity index 100%
rename from board/omap3/zoom2/config.mk
rename to board/logicpd/zoom2/config.mk
diff --git a/board/omap3/zoom2/debug_board.c b/board/logicpd/zoom2/debug_board.c
similarity

[U-Boot] [PATCH 3/3] omap3: move the other boards to board/

2009-08-23 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 Makefile|4 ++--
 board/{omap3 = }/overo/Makefile|0
 board/{omap3 = }/overo/config.mk   |0
 board/{omap3 = }/overo/overo.c |0
 board/{omap3 = }/overo/overo.h |0
 board/{omap3 = }/pandora/Makefile  |0
 board/{omap3 = }/pandora/config.mk |0
 board/{omap3 = }/pandora/pandora.c |0
 board/{omap3 = }/pandora/pandora.h |0
 9 files changed, 2 insertions(+), 2 deletions(-)
 rename board/{omap3 = }/overo/Makefile (100%)
 rename board/{omap3 = }/overo/config.mk (100%)
 rename board/{omap3 = }/overo/overo.c (100%)
 rename board/{omap3 = }/overo/overo.h (100%)
 rename board/{omap3 = }/pandora/Makefile (100%)
 rename board/{omap3 = }/pandora/config.mk (100%)
 rename board/{omap3 = }/pandora/pandora.c (100%)
 rename board/{omap3 = }/pandora/pandora.h (100%)

diff --git a/Makefile b/Makefile
index 4441f8f..ebeda76 100644
--- a/Makefile
+++ b/Makefile
@@ -3090,13 +3090,13 @@ omap3_beagle_config :   unconfig
@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 beagle ti omap3
 
 omap3_overo_config :   unconfig
-   @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 overo omap3 omap3
+   @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 overo NULL omap3
 
 omap3_evm_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 evm ti omap3
 
 omap3_pandora_config : unconfig
-   @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 pandora omap3 omap3
+   @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 pandora NULL omap3
 
 omap3_zoom1_config :   unconfig
@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom1 logicpd omap3
diff --git a/board/omap3/overo/Makefile b/board/overo/Makefile
similarity index 100%
rename from board/omap3/overo/Makefile
rename to board/overo/Makefile
diff --git a/board/omap3/overo/config.mk b/board/overo/config.mk
similarity index 100%
rename from board/omap3/overo/config.mk
rename to board/overo/config.mk
diff --git a/board/omap3/overo/overo.c b/board/overo/overo.c
similarity index 100%
rename from board/omap3/overo/overo.c
rename to board/overo/overo.c
diff --git a/board/omap3/overo/overo.h b/board/overo/overo.h
similarity index 100%
rename from board/omap3/overo/overo.h
rename to board/overo/overo.h
diff --git a/board/omap3/pandora/Makefile b/board/pandora/Makefile
similarity index 100%
rename from board/omap3/pandora/Makefile
rename to board/pandora/Makefile
diff --git a/board/omap3/pandora/config.mk b/board/pandora/config.mk
similarity index 100%
rename from board/omap3/pandora/config.mk
rename to board/pandora/config.mk
diff --git a/board/omap3/pandora/pandora.c b/board/pandora/pandora.c
similarity index 100%
rename from board/omap3/pandora/pandora.c
rename to board/pandora/pandora.c
diff --git a/board/omap3/pandora/pandora.h b/board/pandora/pandora.h
similarity index 100%
rename from board/omap3/pandora/pandora.h
rename to board/pandora/pandora.h
-- 
1.6.3.1

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


Re: [U-Boot] [PATCH 3/3] Consolidate arch-specific mem_malloc_init() implementations

2009-08-22 Thread Jean-Christophe PLAGNIOL-VILLARD
On 23:05 Fri 21 Aug , Peter Tyser wrote:
 Signed-off-by: Peter Tyser pty...@xes-inc.com
 ---
  common/dlmalloc.c  |   15 +++
  include/malloc.h   |2 ++
  lib_arm/board.c|   10 --
  lib_avr32/board.c  |   15 ++-
  lib_blackfin/board.c   |9 -
  lib_m68k/board.c   |   14 +-
  lib_microblaze/board.c |   20 +---
  lib_mips/board.c   |   14 +-
  lib_nios/board.c   |   14 ++
  lib_nios2/board.c  |   14 ++
  lib_ppc/board.c|   14 +-
  lib_sh/board.c |9 -
  lib_sparc/board.c  |   21 +
  13 files changed, 32 insertions(+), 139 deletions(-)
 
 diff --git a/common/dlmalloc.c b/common/dlmalloc.c
 index f3bced4..241db8c 100644
 --- a/common/dlmalloc.c
 +++ b/common/dlmalloc.c
 @@ -1520,6 +1520,21 @@ void *sbrk(ptrdiff_t increment)
   return (void *)old;
  }
  
 +#ifndef CONFIG_X86
could we have a generic name (not arch)
CONFIG_GENERIC_MALLOC_INIT

and then define it in the configs/arch.h
 +/*
 + * x86 boards use a slightly different init sequence thus they implement
 + * their own version of mem_malloc_init()
 + */
 +void mem_malloc_init(ulong start, ulong size)
 +{
 + mem_malloc_start = start;
 + mem_malloc_end = start + size;
 + mem_malloc_brk = start;
 +
 + memset((void *)mem_malloc_start, 0, size);
 +}
 +#endif
 +
  /* field-extraction macros */
  
  #define first(b) ((b)-fd)
 diff --git a/include/malloc.h b/include/malloc.h
 index 0382169..3e145ad 100644
 --- a/include/malloc.h
 +++ b/include/malloc.h
 @@ -944,6 +944,8 @@ extern ulong mem_malloc_start;
  extern ulong mem_malloc_end;
  extern ulong mem_malloc_brk;
  
Best Regards,
J.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/3] Consolidate arch-specific mem_malloc_init() implementations

2009-08-22 Thread Jean-Christophe PLAGNIOL-VILLARD
On 13:54 Sat 22 Aug , Wolfgang Denk wrote:
 Dear Jean-Christophe PLAGNIOL-VILLARD,
 
 In message 20090822085428.ga11...@game.jcrosoft.org you wrote:
 
common/dlmalloc.c  |   15 +++
include/malloc.h   |2 ++
lib_arm/board.c|   10 --
lib_avr32/board.c  |   15 ++-
lib_blackfin/board.c   |9 -
lib_m68k/board.c   |   14 +-
lib_microblaze/board.c |   20 +---
lib_mips/board.c   |   14 +-
lib_nios/board.c   |   14 ++
lib_nios2/board.c  |   14 ++
lib_ppc/board.c|   14 +-
lib_sh/board.c |9 -
lib_sparc/board.c  |   21 +
13 files changed, 32 insertions(+), 139 deletions(-)
   
   diff --git a/common/dlmalloc.c b/common/dlmalloc.c
   index f3bced4..241db8c 100644
   --- a/common/dlmalloc.c
   +++ b/common/dlmalloc.c
   @@ -1520,6 +1520,21 @@ void *sbrk(ptrdiff_t increment)
 return (void *)old;
}

   +#ifndef CONFIG_X86
  could we have a generic name (not arch)
  CONFIG_GENERIC_MALLOC_INIT
 
 That would mean you have to touch N board configurations. To me it
 sounds as if this was not per-board choice, but an architecture-
 specific decision. And a CONFIG_* name seems wrong (it should be
 CONFIG_SYS_* at least).
no the arch config file
 
  and then define it in the configs/arch.h
 
 What is configs/arch.h?  There is no such file, and the name does not
 make sense to me.
as introduce by Kumar

#include asm/config.h

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


Re: [U-Boot] [PATCH] Adding support for DevKit8000

2009-08-20 Thread Jean-Christophe PLAGNIOL-VILLARD
On 10:55 Thu 20 Aug , Frederik Kriewitz wrote:
 On Thu, Aug 20, 2009 at 12:19 AM, Jean-Christophe
 PLAGNIOL-VILLARDplagn...@jcrosoft.com wrote:
   board/omap3/devkit8000/Makefile |   52 +
   board/omap3/devkit8000/config.mk|   35 
   board/omap3/devkit8000/devkit8000.c |  124 
   board/omap3/devkit8000/devkit8000.h |  373 
  +++
  no need board are allow in board/omap3
  please create your own vendor dirent or just put it in board/
 What do you mean with that?
board/devkit8000/devkit8000.h
or board/embedinfo/devkit8000/devkit8000.h
 
 On Thu, Aug 20, 2009 at 7:18 AM, Jean-Christophe
 PLAGNIOL-VILLARDplagn...@jcrosoft.com wrote:
   +void reset_phy(void)
   +{
   +     eth_init(gd-bd);
   +}
   NACK
   the net need to be init only when you use it
 
  The kernel will try to use the already (temporally) programmed MAC address.
  I always init it because that way no kernel hack for the MAC address
  is required.
  Is it ok if I add a comment?
  no sorry
  this will be also nack by Wolfgang
  to program the mac you need to create a initramfs in your kernel wich 
  generate
  the same thing or read the content of the U-Boot env via fw_printenv
  and use ifconfig hw ether
 
 ok, I think this will break nfsroot.
 I don't think it's possible to init ethernet with a initramfs before
 mounting the rootfs.
pivot root is your friend
and generate the mac address at the openof the device in the kernel
 
 There are several boards doing the same because of nfsroot:
 
I known but it's not allow anyway
 
 Is there any command to call eth_init() in a script?
if you download the uImage from the net it work
but the best will be to handle this in a initramfs

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


Re: [U-Boot] [PATCH] Support for the Calao TNY-A9260/TNY-A9G20 boards

2009-08-20 Thread Jean-Christophe PLAGNIOL-VILLARD
On 15:43 Thu 20 Aug , Albin Tonnerre wrote:
 On Wed, Aug 19, 2009 at 11:30:05PM +0200, Jean-Christophe PLAGNIOL-VILLARD 
 wrote :
  On 21:14 Wed 19 Aug , Albin Tonnerre wrote:
   diff --git a/MAKEALL b/MAKEALL
   index edebaea..5882ceb 100755
   --- a/MAKEALL
   +++ b/MAKEALL
   @@ -607,6 +607,7 @@ LIST_at91=   \
 m501sk  \
 pm9261  \
 pm9263  \
   + tny_a9260   \
  why not 9g20 too?
 
 Oops. Thanks.
 
#
   diff --git a/Makefile b/Makefile
   index 329e0f5..2abaeeb 100644
   --- a/Makefile
   +++ b/Makefile
   @@ -2838,6 +2838,16 @@ at91sam9g45ekes_config :   unconfig
pm9263_config:   unconfig
 @$(MKCONFIG) $(@:_config=) arm arm926ejs pm9263 ronetix at91

   +TNY_A9G20_NANDFLASH_config \
   +TNY_A9G20_EEPROM_config \
   +TNY_A9G20_config \
   +TNY_A9260_NANDFLASH_config \
   +TNY_A9260_EEPROM_config \
   +TNY_A9260_config :   unconfig
   + @mkdir -p $(obj)include
   + @echo #define CONFIG_$(@:_config=) 1 $(obj)include/config.h
  try somethink like this so you do not need to put the config name uppercase
  @echo -n #define  $(obj)include/config.h
  @echo$(@:_config=) | tr [a-z] [A-Z]  $(obj)include/config.h
 
 I think I'll go with uppercase. If the shell ends up being /bin/sh, it might 
 not
 provide the '-n' switch for echo, so I'd rather avoid it when possible.
you can use \c too
but as you prefer

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


Re: [U-Boot] [PATCH v2][repost] arm: Kirkwood: add SYSRSTn Duration Counter Support

2009-08-20 Thread Jean-Christophe PLAGNIOL-VILLARD
  Okay I got it
  WE can do this but,
  There are just two APIs, overall size impact is not much 
  (100 bytes max).
 The actual u-boot.bin size diff for newly posted patch is (169464- 169344= 
 120 bytes)
ok fine

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


Re: [U-Boot] [PATCH v3] Adding support for DevKit8000

2009-08-20 Thread Jean-Christophe PLAGNIOL-VILLARD
On 20:37 Thu 20 Aug , Frederik Kriewitz wrote:
 On Thu, Aug 20, 2009 at 7:28 PM, Dirk Behmedirk.be...@googlemail.com wrote:
  Peter Tyser wrote:
 
  Hi Frederik,
  I had some minor aesthetic nitpicks.  I'd change the title to Add
  support for the DevKit8000 board.
 
 
 I'll fix them
 
 
   Unknown / orphaned boards:
  diff --git a/MAKEALL b/MAKEALL
  index edebaea..34235b7 100755
  --- a/MAKEALL
  +++ b/MAKEALL
  @@ -581,6 +581,7 @@ LIST_ARM_CORTEX_A8=                \
         omap3_pandora           \
         omap3_zoom1             \
         omap3_zoom2             \
  +       devkit8000      \
   
 
  You should maintain the alphabetical order of LIST_ARM_CORTEX_A8.
 
  What's about using 'omap3_devkit8000' ?
 
 On Thu, Aug 20, 2009 at 7:02 PM, Peter Tyserpty...@xes-inc.com wrote:
  Hi Frederik,
  I had some minor aesthetic nitpicks.  I'd change the title to Add
  support for the DevKit8000 board.
 
 Ok, I'll fix them.
 
 Jean-Christophe asked me to move it out of the omap3 vendor directory:
I agree with Dirk for the config name it will be good to have omap3_devkit8000
but if you prefer devkit8000 it's fine also

and yes I've ask you about the boardir to move it out of the omap3 dirent

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


Re: [U-Boot] [PATCH] Support for the Calao TNY-A9260/TNY-A9G20 boards

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 21:14 Wed 19 Aug , Albin Tonnerre wrote:
 The Calao TNY-A9260 and TNY-9G20 are boards manufactured and sold by
 Calao Systems http://www.calao-systems.com. Their components are very
 similar to the AT91SAM9260EK board, so their configuration is based on
 the configuration of this board. There are however some differences:
 different clocks, no LCD, no ethernet. They also can use SPI EEPROM to
 store the environment.
 
 Signed-off-by: Albin Tonnerre albin.tonne...@free-electrons.com
 ---
please put the version in the subject to known which one is the last
 Changes since previous version:
  - As per Jean-Christophe's commentes, fix long lines and use uppercase for
defines in include/configs/tny_a9260.h. Slightly rework the ifdef logic in
the process
  - Add an entry in MAINTAINERS for the tny_a9g20 as weel, since both 9260 and
9g20 are supported
 
  MAINTAINERS  |5 +
  MAKEALL  |1 +
  Makefile |   10 ++
  board/calao/tny_a9260/Makefile   |   55 ++
  board/calao/tny_a9260/config.mk  |1 +
  board/calao/tny_a9260/spi.c  |   50 +
  board/calao/tny_a9260/tny_a9260.c|  110 +++
  cpu/arm926ejs/at91/at91sam9260_devices.c |2 +-
  include/configs/tny_a9260.h  |  172 
 ++
  9 files changed, 405 insertions(+), 1 deletions(-)
  create mode 100644 board/calao/tny_a9260/Makefile
  create mode 100644 board/calao/tny_a9260/config.mk
  create mode 100644 board/calao/tny_a9260/spi.c
  create mode 100644 board/calao/tny_a9260/tny_a9260.c
  create mode 100644 include/configs/tny_a9260.h
 
 diff --git a/MAINTAINERS b/MAINTAINERS
 index 620604c..91e2c7f 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
 @@ -681,6 +681,11 @@ Andrea Scian andrea.sc...@dave-tech.it
  
   B2  ARM7TDMI (S3C44B0X)
  
 +Albin Tonnerre albin.tonne...@free-electrons.com
 +
 + tny_a9260   ARM926EJS (AT91SAM9260 SoC)
 + tny_a9g20   ARM926EJS (AT91SAM9G20 SoC)
 +
  Greg Ungerer greg.unge...@opengear.com
  
   cm4008  ks8695p
 diff --git a/MAKEALL b/MAKEALL
 index edebaea..5882ceb 100755
 --- a/MAKEALL
 +++ b/MAKEALL
 @@ -607,6 +607,7 @@ LIST_at91=   \
   m501sk  \
   pm9261  \
   pm9263  \
 + tny_a9260   \
why not 9g20 too?
  
  
  #
 diff --git a/Makefile b/Makefile
 index 329e0f5..2abaeeb 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -2838,6 +2838,16 @@ at91sam9g45ekes_config :   unconfig
  pm9263_config:   unconfig
   @$(MKCONFIG) $(@:_config=) arm arm926ejs pm9263 ronetix at91
  
 +TNY_A9G20_NANDFLASH_config \
 +TNY_A9G20_EEPROM_config \
 +TNY_A9G20_config \
 +TNY_A9260_NANDFLASH_config \
 +TNY_A9260_EEPROM_config \
 +TNY_A9260_config :   unconfig
 + @mkdir -p $(obj)include
 + @echo #define CONFIG_$(@:_config=) 1 $(obj)include/config.h
try somethink like this so you do not need to put the config name uppercase
@echo -n #define  $(obj)include/config.h
@echo$(@:_config=) | tr [a-z] [A-Z]  $(obj)include/config.h

please also remember that if you update the config you need to update the
MAKEALL too
 + @$(MKCONFIG) -a tny_a9260 arm arm926ejs tny_a9260 calao at91
 +
Best Regards,
J.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/3 v4] arm: A320: Add support for Faraday A320 evaluation board

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 09:38 Tue 18 Aug , Po-Yu Chuang wrote:
 Dear Jean-Christophe PLAGNIOL-VILLARD,
 
 2009/8/18 Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com:
  On 14:13 Thu 06 Aug     , Po-Yu Chuang wrote:
  Anyway, I have an idea now.
  I can submit a version that do not do the bank swap
  (SDRAM stays at 0x1000).
 
  The the mainline keeps beautiful as you wish.
  Then I create another patch to do the bank swap for our internal use.
 
  This should be a win-win. :-)
  why not but show us the code please
  and we will see
 
 I have submitted a v5 patch. Please check.
where?
I do not seen it

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


Re: [U-Boot] [PATCH v2][repost] arm: Kirkwood: add SYSRSTn Duration Counter Support

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 16:24 Wed 19 Aug , Prafulla Wadaskar wrote:
 I am sorry for previous post v2, pls ignore it, this is the right patch for 
 the same
 
 This feature can be used to trigger special command sysrstcmd using
 reset key long press event and environment variable sysrstdelay is set
 (useful for reset to factory or manufacturing mode execution)
 
 Kirkwood SoC implements a hardware-based SYSRSTn duration counter.
 When SYSRSTn is asserted low, a SYSRSTn duration counter is running.
 The counter value is stored in the SYSRSTn Length Counter Register
 The counter is based on the 25-MHz reference clock (40ns)
 It is a 29-bit counter, yielding a maximum counting duration of
 2^29/25 MHz (21.4 seconds). When the counter reach its maximum value,
 it remains at this value until counter reset is triggered by setting
 bit 31 of KW_REG_SYSRST_CNT
 
 Implementation:
 Upon long reset assertion ( ${sysrstdleay} in secs) sysrstcmd will be
 executed if pre-defined in environment variables.
 This feature will be disabled if sysrstdelay variable is unset.
 
 for-ex.
 setenv sysrst_cmd echo starting factory reset;
  nand erase 0xa 0x2;
  echo finish ed sysrst command;
 will erase particular nand sector if triggered by this event
 
 Signed-off-by: Prafulla Wadaskar prafu...@marvell.com
 ---
 Change log:
 v2: updated as per review feedback for v1
 bug fix in the previous post (V2) fixed
ok

but I think make optionnal will be better

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


Re: [U-Boot] [PATCH] Adding support for DevKit8000

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 01:20 Tue 18 Aug , Frederik Kriewitz wrote:
 This patch adds support for the DevKit8000 board.
 
 Signed-off-by: Frederik Kriewitz frede...@kriewitz.eu
 ---
 mach-types.h needs to be synced (MACH_TYPE_DEVKIT8000)
 ---
  MAINTAINERS |4 +
  Makefile|3 +
  board/omap3/devkit8000/Makefile |   52 +
  board/omap3/devkit8000/config.mk|   35 
  board/omap3/devkit8000/devkit8000.c |  124 
  board/omap3/devkit8000/devkit8000.h |  373 
 +++
no need board are allow in board/omap3
please create your own vendor dirent or just put it in board/
  doc/README.omap3|   11 +
  include/configs/omap3_devkit8000.h  |  321 ++
  8 files changed, 923 insertions(+), 0 deletions(-)
  create mode 100644 board/omap3/devkit8000/Makefile
  create mode 100644 board/omap3/devkit8000/config.mk
  create mode 100644 board/omap3/devkit8000/devkit8000.c
  create mode 100644 board/omap3/devkit8000/devkit8000.h
  create mode 100644 include/configs/omap3_devkit8000.h
please add entry in MAKEALL
 diff --git a/MAINTAINERS b/MAINTAINERS
 index 620604c..12ad7f5 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
 @@ -706,6 +706,10 @@ Alex Z
   lartSA1100
   dnp1110 SA1110
  
 +Frederik Kriewitz frede...@kriewitz.eu
 +
 + omap3_devkit8000ARM CORTEX-A8 (OMAP3530 SoC)
 +
  -
  
  Unknown / orphaned boards:
 diff --git a/Makefile b/Makefile
 index 329e0f5..bed9f5e 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -3072,6 +3072,9 @@ omap3_beagle_config :   unconfig
  omap3_overo_config : unconfig
   @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 overo omap3 omap3
  
 +omap3_devkit8000_config :unconfig
 + @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 devkit8000 omap3 omap3
 +
  omap3_evm_config :   unconfig
   @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 evm omap3 omap3
  
 +
 +#ifdef CONFIG_DRIVER_DM9000
 + /* Configure GPMC registers for DM9000 */
 + writel(NET_GPMC_CONFIG1, gpmc_cfg-cs[6].config1);
 + writel(NET_GPMC_CONFIG2, gpmc_cfg-cs[6].config2);
 + writel(NET_GPMC_CONFIG3, gpmc_cfg-cs[6].config3);
 + writel(NET_GPMC_CONFIG4, gpmc_cfg-cs[6].config4);
 + writel(NET_GPMC_CONFIG5, gpmc_cfg-cs[6].config5);
 + writel(NET_GPMC_CONFIG6, gpmc_cfg-cs[6].config6);
 + writel(NET_GPMC_CONFIG7, gpmc_cfg-cs[6].config7);
 +
 + /* Use OMAP DIE_ID as MAC address */
 + if (!eth_getenv_enetaddr(ethaddr, enetaddr)) {
 + enetaddr[0] = 0x02; /* locally administered */
 + enetaddr[1] = readl(id_base-die_id_1)  0xff;
 + *(u32*)enetaddr[2] = readl(id_base-die_id_0);
 + eth_setenv_enetaddr(ethaddr, enetaddr);
please add a warning for the user to known about it
 + }
 +#endif
 +
 + dieid_num_r();
 +
 + return 0;
 +}
 +
 +/*
 + * Routine: set_muxconf_regs
 + * Description: Setting up the configuration Mux registers specific to the
 + *   hardware. Many pins need to be moved from protect to primary
 + *   mode.
 + */
 +void set_muxconf_regs(void)
 +{
 + MUX_DEVKIT8000();
 +}
 +
 +#ifdef CONFIG_DRIVER_DM9000
 +int board_eth_init(bd_t *bis)
 +{
 + return dm9000_initialize(bis);
 +}
 +
 +void reset_phy(void)
 +{
 + eth_init(gd-bd);
 +}
NACK
the net need to be init only when you use it
 +#endif
 +/* DM9000 */
 +#define CONFIG_NET_MULTI 1
 +#define CONFIG_NET_RETRY_COUNT   20
 +#define  CONFIG_DRIVER_DM90001
 +#define  CONFIG_DM9000_BASE  0x2c00
 +#define  DM9000_IO   CONFIG_DM9000_BASE
 +#define  DM9000_DATA (CONFIG_DM9000_BASE+0x400)
please add a space before and after +
 +#define  CONFIG_DM9000_USE_16BIT 1
 +#define CONFIG_DM9000_NO_SROM1
 +#define CONFIG_RESET_PHY_R   1
 +#undef   CONFIG_DM9000_DEBUG
 +
 +/* NS16550 Configuration */
 +#define V_NS16550_CLK4800/* 48MHz 
 (APLL96/2) */
why define it twice?
 +
 +#define CONFIG_SYS_NS16550
 +#define CONFIG_SYS_NS16550_SERIAL
 +#define CONFIG_SYS_NS16550_REG_SIZE  (-4)
 +#define CONFIG_SYS_NS16550_CLK   V_NS16550_CLK
here?
 +
 +/* select serial console configuration */
 +#define CONFIG_CONS_INDEX3
 +#define CONFIG_SYS_NS16550_COM3  OMAP34XX_UART3
 +#define CONFIG_SERIAL3   3
 +#define CONFIG_BAUDRATE  115200
 +#define CONFIG_SYS_BAUDRATE_TABLE{4800, 9600, 19200, 38400, 57600,\
 + 115200}
 +
 +/* MMC */
 +#define CONFIG_MMC   1
 +#define CONFIG_OMAP3_MMC 1
 +#define CONFIG_DOS_PARTITION 1
 +
 +/* commands to include */
 +#include config_cmd_default.h
 +
 +#define CONFIG_CMD_DHCP  /* 

Re: [U-Boot] [PATCH] arm:kirkwood See to it that sent data is 8-byte aligned

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 12:48 Tue 18 Aug , Simon Kagstrom wrote:
 Thanks for the review Prafulla!
 
 On Tue, 18 Aug 2009 03:12:07 -0700
 Prafulla Wadaskar prafu...@marvell.com wrote:
 
   v2: Malloc send buffer (comment from Stefan Roese)
  Malloc will always be an overhead.
 
 It's only allocated once (the first time a non-aligned buffer is
 passed), so the overhead is minimal.
 
  I strongly recommend- we should pass aligned buffers from upper layers
  to avoid such rework in all low level drivers, (few are already
  aligned).
 
 We could put the same fix in eth_send instead. Then the issue is really
 just how we know what alignment requirement to go for. I guess one
 could add a field to the eth_device structure to store this and then
 fixup all drivers to supply this.
 
 If the rest of you thinks this is a good idea, I can cook up a patch.
 Opinions?
some drivers would also have the possibility to have multiple receive buffer
specially when you use dma
so IMHO it make more sense to let each drivers handle it itself

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


Re: [U-Boot] [PATCH] ARM: DaVinci: DaVinci DM365 SOC specific code

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 23:15 Tue 18 Aug , Wolfgang Denk wrote:
 Dear Paulraj, Sandeep,
 
 In message 0554bef07d437848af01b9c9b5f0bc5d7e996...@dlee01.ent.ti.com you 
 wrote:
 
  Yesterday night after J-C mentioned that he applied 2 of my patches to u-bo
  ot-arm next I tried to checkout that branch
   to add some more stuff on top of my Dm365 patches.
  
  I could not see it either. But I have used that branch in the recent past.
  I don't know what is wrong.
 
 Unfortunately the U-Boot ARM repository is in a really poor state.
 Commits and branches come and go more or less at ramdom.
 
 I apologize for the inconveninces caused by that.
 
 Jean-Christophe, we really need more consistency here.
 
I'm rebase the next now so yes I remove the old one
which was for the precedent merge

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


Re: [U-Boot] [PATCH v2] ARM: DaVinci DM355: Updating the DM355 EVM config

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 12:34 Tue 18 Aug , s-paul...@ti.com wrote:
 From: Sandeep Paulraj s-paul...@ti.com
 
 This patch enables NAND support on the DM355 EVM.
 Changes in this patch mostly relate to adding the NAND support.
 This patch also defines a boot delay.
 
 Signed-off-by: Sandeep Paulraj s-paul...@ti.com
 ---
  include/configs/davinci_dm355evm.h |   22 +-
  1 files changed, 13 insertions(+), 9 deletions(-)
Acked-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com

Scott please apply after the 4 bit patch handling

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


Re: [U-Boot] [PATCH] ARM: DaVinci: Adding Support for DaVinci DM365 EVM

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 00:01 Tue 18 Aug , Jean-Christophe PLAGNIOL-VILLARD wrote:
 On 11:20 Sat 15 Aug , s-paul...@ti.com wrote:
  From: Sandeep Paulraj s-paul...@ti.com
  
  This patch adds support for the DM365 EVM.
  It has been tested on a DM365 EVM.
  
  Signed-off-by: Sandeep Paulraj s-paul...@ti.com
  ---
   Makefile   |3 +
   board/davinci/dm365evm/Makefile|   52 ++
   board/davinci/dm365evm/config.mk   |   11 ++
   board/davinci/dm365evm/dm365evm.c  |   60 
   include/configs/davinci_dm365evm.h |  182 
  
   5 files changed, 308 insertions(+), 0 deletions(-)
   create mode 100644 board/davinci/dm365evm/Makefile
   create mode 100644 board/davinci/dm365evm/config.mk
   create mode 100644 board/davinci/dm365evm/dm365evm.c
   create mode 100644 include/configs/davinci_dm365evm.h
 apply to u-boot-arm next
I'll push it after Scott pull request as It's need to 4bit nand patch as
dependancy

btw please thread them and number your patch to known the apply order

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


Re: [U-Boot] [PATCH 0/4]: bitops cleanup and fixes

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:08 Tue 18 Aug , Simon Kagstrom wrote:
 Hi again!
 
 This patch series is an update to [PATCH 0/8]: Fixes for ubifs build
 on ARM sent in july:
 
   http://lists.denx.de/pipermail/u-boot/2009-July/055594.html
 
 and contains the patches which were not accepted. The patches are:
 
   0001-Move-__set-clear_bit-from-ubifs.h-to-bitops.h.patch
 - Code style updates. I chose to not create
   asm-generic/include/bitops/ (Jean-Christophes comment) since I
   feel that should go together with a larger restructuring.
 
   0002-Define-ffs-fls-for-all-architectures.patch
 - Code style updates (Wolfgangs comment).
 
   0003-Remove-duplicate-set_cr.patch
 - New patch, removes a duplicate definition (also unused) that
   prevents compilation of the next patch
 
   0004-Define-test_and_set_bit-and-test_and_clear-bit-for-A.patch
 - Defines test_and_set_bit etc for ARM. Uses the non-atomic
   __test_and_set_bit. The endianness issue in __test_and_set_bit
   (Jean-Christophes comment) is a separate issue and should be
   handled in a separate patch I think.
but must be part of this cleanup otherwise it will never be done correctly
and some arch as IXP will not work as there are not necessarely in little
endian

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


Re: [U-Boot] [PATCH 3/4]: Remove duplicate set_cr

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:13 Tue 18 Aug , Simon Kagstrom wrote:
 Remove duplicate set_cr
 
 set_cr is defined in both asm-arm/proc-armv/system.h and
 include/asm-arm/system.h. This patch removes it (and some duplicate
 defines) from the former.
 
 Signed-off-by: Simon Kagstrom simon.kagst...@netinsight.net
 ---
  include/asm-arm/proc-armv/system.h |   30 --
  1 files changed, 0 insertions(+), 30 deletions(-)
apply to u-boot-arm

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


Re: [U-Boot] [PATCH 2/4]: Define ffs/fls for all architectures

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:13 Tue 18 Aug , Simon Kagstrom wrote:
 Define ffs/fls for all architectures
 
 UBIFS requires fls(), which is not defined for arm (and some other
 architectures) and this patch adds it. The implementation is taken from
 Linux and is generic. ffs() is also defined for those that miss it.
 
 v2: Unify code style (empty line between ffs/fls)
please this
 
 Signed-off-by: Simon Kagstrom simon.kagst...@netinsight.net
 ---
here
  include/asm-arm/bitops.h|4 
  include/asm-avr32/bitops.h  |4 
  include/asm-i386/bitops.h   |2 ++
  include/asm-m68k/bitops.h   |2 ++
  include/asm-microblaze/bitops.h |2 ++
  include/asm-mips/bitops.h   |2 ++
  include/asm-nios/bitops.h   |5 -
  include/asm-nios2/bitops.h  |5 -
  include/asm-sh/bitops.h |2 ++
  include/asm-sparc/bitops.h  |4 
  include/linux/bitops.h  |   37 +
Acked-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com

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


Re: [U-Boot] [PATCH 1/4]: Move __set/clear_bit from ubifs.h to bitops.h

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:10 Tue 18 Aug , Simon Kagstrom wrote:
 Move __set/clear_bit from ubifs.h to bitops.h
 
 __set_bit and __clear_bit are defined in ubifs.h as well as in
 asm/include/bitops.h for some architectures. This patch moves
 the generic implementation to include/linux/bitops.h and uses
 that unless it's defined by the architecture.
 
 v2: Unify code style (newline between __set_bit and __clear_bit)
please this
 
 Signed-off-by: Simon Kagstrom simon.kagst...@netinsight.net
 ---
here
  fs/ubifs/ubifs.h   |   32 
  include/asm-avr32/bitops.h |4 
  include/asm-m68k/bitops.h  |4 
  include/asm-nios/bitops.h  |4 
  include/asm-nios2/bitops.h |4 
  include/asm-ppc/bitops.h   |4 
  include/asm-sh/bitops.h|5 +
  include/asm-sparc/bitops.h |4 
  include/linux/bitops.h |   30 ++
  9 files changed, 59 insertions(+), 32 deletions(-)

Acked-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com

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


Re: [U-Boot] [PATCH 4/4]: Define test_and_set_bit and test_and_clear bit for ARM

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:14 Tue 18 Aug , Simon Kagstrom wrote:
 Define test_and_set_bit and test_and_clear bit for ARM
 
 Needed for (e.g.) ubifs support to work.
 
 Signed-off-by: Simon Kagstrom simon.kagst...@netinsight.net
 ---
  include/asm-arm/bitops.h |   27 ---
  1 files changed, 24 insertions(+), 3 deletions(-)
this one NACK as it's must be endianness
for IXP as example

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


Re: [U-Boot] [PATCH/RFC] drivers/mmc/mmc.c: change the controller frequency before the card frequency

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 14:16 Wed 19 Aug , Albin Tonnerre wrote:
 While rewriting the atmel_mci driver to use the new MMC_GENERIC API (and allow
 the use of SD/MMC on AT91 in the process), it appeared that switching the card
 frequency before the controller frequency resulted in the answer from the card
 never being received. Changing the controller frequency before the controller
 frequency fixes that.
IIRC it's not correct you are supposed to switch the card to higherfreq and
then the bus speed

could show the patch of the atmel_mci to help

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


Re: [U-Boot] [PATCH v2] ARM Cortex8 Rename and move v7_flush_dcache_all to flush_dcache

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
 
 Applying the basic functionality (function move) now allows others
 to finally go on with their long waiting patches.
 no this code is omap3 specific and there is no need ot this
 rename or move the function make no sense
 Yes, it is OMAP3 specific (as already mentioned in the patch
 description). So it's totally fine to move it to an OMAP3 specific
 file. So it's totally fine that others (!= OMAP3, e.g Samsung) can
 re-use arm_cortexa8 stuff without the burden of OMAP3 stuff.
 the flush MUST NOT be soc specific as there is NO need to do this
 at all
 
 so NACK
 
 Let's summarize:
 
 - First, you NACK because of device_type and function name
 - Then, you mention this code is omap3 specific
 - Then, you mention this code is not needed at all
 
 Sorry, but this sounds somehow confusing, better let us stop here.
 
 As already mentioned, let us apply the patch so that other Cortex
 A8 patches are not stalled any more.
 
 At the weekend, I missed the point why this code is OMAP3 specific
 and why it has to be moved to omap3 directory, so short update:
 
 It calls OMAP3 ROM code. This doesn't work on other Cortex A8, e.g.
 Samsung. That is, it must be moved to not stall others any more.
so I'll repeat this only once there no need to call the rom code as the
generic armv7 cache full work fine

so no-need to use omap3 specific code

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


Re: [U-Boot] [PATCH] AT91: Add support for blue_LED_* and add coloured_LED_init to at91/led.c

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 10:49 Tue 18 Aug , Albin Tonnerre wrote:
 On Tue, Aug 18, 2009 at 12:51:48AM +0200, Jean-Christophe PLAGNIOL-VILLARD 
 wrote :
  no please take a look on the other LED thread
 
 Would you please provide a pointer to this thread ? THe only one remotely
 related I can find is
 http://lists.denx.de/pipermail/u-boot/2009-May/052160.html, and you did not
 participate in this one ...
I've as I'm the one who ask Daniel Gorsulowski to base his new code (this patch)
against Ulf precedent patch and as other people have done the same comment as I 
will do
no need to repeat it
 
  I want to hape coloured-LED api and numbered led handle by the same api
  with the less size impact
 
 When you have this same API, you'll still need code to turn LEDs on and off, 
 and
 you'll still have to beat the LED code out of cards-specific code because it
 really ought to be in a common file. My patch does exactly that, does *not*
 impact size, and is an actual step towards whatever you plan next. I'd prefer 
 if
 you were rejecting this on actual, justified grounds.
your patch does not do it
1) you force the init led to be common which must be board specific as every 
one can do it
how he want

2) you do brake all at91 boards too

3) as already said multiple time we need to cleanup it and stop adding new 
color support
for eachi board or arch specialy when no board use it

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


Re: [U-Boot] [RFC] cmd_ide: I/O functions cleanup

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 18:25 Fri 14 Aug , Albin Tonnerre wrote:
 Hi,
 
 This afternoon I spent some time trying to get a CompactFlash card to work on
 ARM (AT91). While looking at the code, I noticed several things in the I/O 
 code
 that I think are wrong or could be improved, so I figured I'd ask here before
 writing a patch., as I might be overlooking some things.
I think we could switch to the libata as done for sata simply
as it will allow to have specific handling and generic one

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


Re: [U-Boot] [PATCH] Adding support for DevKit8000

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 05:59 Thu 20 Aug , Frederik Kriewitz wrote:
 I'll fix that.
 
 On Thu, Aug 20, 2009 at 12:19 AM, Jean-Christophe
 PLAGNIOL-VILLARDplagn...@jcrosoft.com wrote:
  +void reset_phy(void)
  +{
  +     eth_init(gd-bd);
  +}
  NACK
  the net need to be init only when you use it
 
 The kernel will try to use the already (temporally) programmed MAC address.
 I always init it because that way no kernel hack for the MAC address
 is required.
 Is it ok if I add a comment?
no sorry
this will be also nack by Wolfgang
to program the mac you need to create a initramfs in your kernel wich generate
the same thing or read the content of the U-Boot env via fw_printenv
and use ifconfig hw ether

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


Re: [U-Boot] [PATCH v2][repost] arm: Kirkwood: add SYSRSTn Duration Counter Support

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
   Signed-off-by: Prafulla Wadaskar prafu...@marvell.com
   ---
   Change log:
   v2: updated as per review feedback for v1
   bug fix in the previous post (V2) fixed
  ok
  
  but I think make optionnal will be better
 Hi Jean
 Thanks..
 I didn't understod what you want to say here, can you pls explain?
the patch is fine for I but I think we may create a CONFIG_ somethink
to enable it only if the use want it and do not impact the U-Boot size
otherwise

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


Re: [U-Boot] [PATCH 3/3 v4] arm: A320: Add support for Faraday A320 evaluation board

2009-08-19 Thread Jean-Christophe PLAGNIOL-VILLARD
On 09:54 Thu 20 Aug , Po-Yu Chuang wrote:
 Dear Jean-Christophe PLAGNIOL-VILLARD,
 
 2009/8/20 Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com:
  On 09:38 Tue 18 Aug     , Po-Yu Chuang wrote:
  I have submitted a v5 patch. Please check.
  where?
  I do not seen it
 
 http://lists.denx.de/pipermail/u-boot/2009-August/058315.html
 
 It looks like I did not CC well. If needed, I can resubmit again
yes please resend as I do not found it in my mailbox

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


Re: [U-Boot] [PATCH] Support for the Calao TNY-A9260/TNY-A9G20 boards

2009-08-17 Thread Jean-Christophe PLAGNIOL-VILLARD
 +
 +#ifndef __CONFIG_H
 +#define __CONFIG_H
 +
 +#if defined(CONFIG_tny_a9260) || defined(CONFIG_tny_a9260_nandflash) || 
 defined(CONFIG_tny_a9260_eeprom)
too long
and define must be upper case
 +#define CONFIG_TNY_A9260
 +#define CONFIG_AT91SAM9260
 +#elif defined(CONFIG_tny_a9g20) || defined(CONFIG_tny_a9g20_nandflash) || 
 defined(CONFIG_tny_a9g20_eeprom)
ditto
 +#define CONFIG_TNY_A9G20
 +#define CONFIG_AT91SAM9G20
 +#else
 +#error Unknown board
 +#endif
 +
 +#if defined(CONFIG_tny_a9260_nandflash) || 
 defined(CONFIG_tny_a9g20_nandflash)
 +#define CONFIG_ENV_IS_IN_NAND
 +#else
 +#define CONFIG_ENV_IS_IN_EEPROM
 +#endif
 +
Best Regards,
J.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/3 v4] arm: A320: Add support for Faraday A320 evaluation board

2009-08-17 Thread Jean-Christophe PLAGNIOL-VILLARD
On 23:10 Tue 04 Aug , Darius Augulis wrote:
 On 08/04/2009 10:48 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
 On 09:42 Mon 03 Aug , Darius Augulis wrote:
 On 07/08/2009 02:30 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
 On 15:14 Fri 03 Jul , Po-Yu Chuang wrote:
 This patch adds support for A320 development board from Faraday. This 
 board
 uses FA526 processor by default and has 512kB and 32MB NOR flash, 64M RAM.
 FA526 is an ARMv4 processor and uses the ARM920T source in this patch.
 
 as I understand correctly the faraday and the CS3518 share the same core 
 and
 IP so it will be better to have the same dir
 I don't think so. Both A320 and Gemini share the same FA526 core,
 but different peripheral. There is no reason to create generic dir
 for A320 and Gemini. Also, no reason to create cpu/fa526 because
 fa526 is almost arm920t.
 duplicate code is worse
 as example on at91 we do support multiple soc of the family in the same
 generic dir which allow us to factorize common code and ofcourse split
 soc specific code too
 
 Gemini and A320 are not from the same family. There isn't any common
 code *yet*. They share only the same core.
 There are more dirs in cpu/arm920t: imx, s3c24x0, etc. Perhaps
 you won't suggest to move all these SoC's into single dir?
no as they do share nothing if the code is arm920t specific it will more to
arm/920t if soc arm920t/at91 etc
 
 A320 and Gemini *maybe* have the same timer IP, but there are few
 'small' problems. First: these processors, made in China, have very
 poor documentation. I must do lot of reverse-engineering work to
 create something working. Second, I don't have any A320 hardware to
 test something. It's very difficult to make most optimal release at
 the very beginning. After we have Gemini in main line, somebody
 interested in A320 should feel free to submit patches to optimize
 support for SoC's, based on FA526 core. Now I can't do this job and
 I guess it shouldn't be reason to reject my patches?
you are two dev working to add both soc mainline so please sync together to
not add duplicated code that all I want

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


Re: [U-Boot] [PATCH 3/3 v4] arm: A320: Add support for Faraday A320 evaluation board

2009-08-17 Thread Jean-Christophe PLAGNIOL-VILLARD
On 12:45 Thu 06 Aug , Po-Yu Chuang wrote:
 Dear Jean-Christophe and Darius,
 
 2009/8/5 Darius Augulis augulis.dar...@gmail.com:
  On 08/04/2009 10:48 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
  as I understand correctly the faraday and the CS3518 share the same core
  and
  IP so it will be better to have the same dir
 
  I don't think so. Both A320 and Gemini share the same FA526 core,
  but different peripheral. There is no reason to create generic dir
  for A320 and Gemini. Also, no reason to create cpu/fa526 because
  fa526 is almost arm920t.
 
 Let me summarize. Correct me if I am wrong.
 
 a320 is an soc with fa526 core which is similar to arm920t.
 Gemini is an soc with fa526 core.
 
 board  | A320 evb | NAS4220 |
 soc family |  | Gemini  |
 soc| A320 | CS3516  |
 cpu| FA526| FA526   |
 
 CS3516 and A320 maybe have the same timer (but most IPs are different).
 
  duplicate code is worse
  as example on at91 we do support multiple soc of the family in the same
  generic dir which allow us to factorize common code and ofcourse split
  soc specific code too
 
 What is the definition of an SOC family?
 
  Gemini and A320 are not from the same family. There isn't any common code
  *yet*. They share only the same core.
  There are more dirs in cpu/arm920t: imx, s3c24x0, etc. Perhaps you won't
  suggest to move all these SoC's into single dir?
 
 Agree. Gemini and A320 are not the same family IMO.
 The only common parts are the FA526 core and the timer.
 (or is this sufficient to be a family?)
this sufficient to not duplicate code
 
 The problem is how should the files be organized if two SOC families
 use the same IP.
 Maybe we can create a cpu/arm920t/common/ ?
no it's must be fa526 dependant not arm920t common
 But what if that IP is used in another SOC with arm926 core? (This
 happens in Faraday's other SOCs)
 
 I think the easiest way is to treat A320 and Gemini patches unrelated.
I do not want to have code duplicated for the other IP the will move for the
most of them in drivers anyway

as example on SH4 the Renesas  ST socs share the same timer, interrupt
handler and few other thinks we will not duplicate for this will use the same
code

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


Re: [U-Boot] [PATCH 3/3 v4] arm: A320: Add support for Faraday A320 evaluation board

2009-08-17 Thread Jean-Christophe PLAGNIOL-VILLARD
On 14:13 Thu 06 Aug , Po-Yu Chuang wrote:
 Dear Jean-Christophe,
 
 2009/7/8 Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com:
  +.globl lowlevel_init
  +lowlevel_init:
  +     mov     r11, lr
  +
  +     led     0x0
  +
  +     /* if REMAP bit is set - memory had been initialzed */
  +
  +     ldr     r0, =CONFIG_SYS_AHBC_BASE
  +     ldr     r1, [r0, #FTAHBC020_OFFSET_ICR]
  +     tst     r1, #FTAHBC020_ICR_REMAP                @ test REMAP bit
  +     bne     skip_remap
  +
  +     led     0x1
  +
  +     bl      init_sdmc
  +
  +     led     0x2
  +
  +     /*
  +      * copy U-Boot to RAM
  +      */
  +copy_code:
  +     ldr     r0, =ROM_DEFAULT_BASE   /* r0 - source address     */
  +     ldr     r1, =SDRAM_DEFAULT_BASE /* r1 - target address     */
  +
  +     ldr     r2, .LC5
  +     ldr     r3, .LC6
  +     sub     r2, r3, r2              /* r2 - size of armboot            
  */
  +     add     r2, r0, r2              /* r2 - source end address         
  */
  +
  +     led     0x3
  +
  +copy_loop:
  +     ldmia   r0!, {r3-r10}           /* copy from source address [r0]    
  */
  +     stmia   r1!, {r3-r10}           /* copy to   target address [r1]    
  */
  +     cmp     r0, r2                  /* until source end addreee [r2]    
  */
  +     ble     copy_loop
  +
  I do not like to do this twice we need to find an otherway
  do we really need to run in SDRAM before remap?
 
 I am afraid so.
 u-boot needs to be copied to SDRAM first to do the remap
 (swap ROM and SDRAM bank) to make SDRAM base becomes 0x0.
 cpu/arm920t/start.S then relocates u-boot to the end of SDRAM.
 
 Anyway, I have an idea now.
 I can submit a version that do not do the bank swap
 (SDRAM stays at 0x1000).
 
 The the mainline keeps beautiful as you wish.
 Then I create another patch to do the bank swap for our internal use.
 
 This should be a win-win. :-)
why not but show us the code please
and we will see

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


Re: [U-Boot] [PATCH] ARM: DaVinci: Adding Support for DaVinci DM365 EVM

2009-08-17 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:20 Sat 15 Aug , s-paul...@ti.com wrote:
 From: Sandeep Paulraj s-paul...@ti.com
 
 This patch adds support for the DM365 EVM.
 It has been tested on a DM365 EVM.
 
 Signed-off-by: Sandeep Paulraj s-paul...@ti.com
 ---
  Makefile   |3 +
  board/davinci/dm365evm/Makefile|   52 ++
  board/davinci/dm365evm/config.mk   |   11 ++
  board/davinci/dm365evm/dm365evm.c  |   60 
  include/configs/davinci_dm365evm.h |  182 
 
  5 files changed, 308 insertions(+), 0 deletions(-)
  create mode 100644 board/davinci/dm365evm/Makefile
  create mode 100644 board/davinci/dm365evm/config.mk
  create mode 100644 board/davinci/dm365evm/dm365evm.c
  create mode 100644 include/configs/davinci_dm365evm.h
apply to u-boot-arm next

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


Re: [U-Boot] [PATCH] ARM: DaVinci: DaVinci DM365 SOC specific code

2009-08-17 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:20 Sat 15 Aug , s-paul...@ti.com wrote:
 From: Sandeep Paulraj s-paul...@ti.com
 
 This patch adds support for DaVinci DM365 SOC.
 
 Signed-off-by: Sandeep Paulraj s-paul...@ti.com
 ---
  cpu/arm926ejs/davinci/Makefile |1 +
  cpu/arm926ejs/davinci/dm365.c  |   35 +++
  2 files changed, 36 insertions(+), 0 deletions(-)
  create mode 100644 cpu/arm926ejs/davinci/dm365.c
apply to u-boot-arm next

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


Re: [U-Boot] [PATCH] omap3: Fixed a problem with hwecc

2009-08-17 Thread Jean-Christophe PLAGNIOL-VILLARD
On 10:03 Fri 14 Aug , Ben Goska wrote:
 In commit 187af954cf7958c24efcf0fd62289bbdb4f1f24e there was a typo that 
 offset all the ecc registers by 4 bytes, fixed that.
 
 Signed-off-by: Ben Goska gos...@onid.oregonstate.edu
 ---
  include/asm-arm/arch-omap3/cpu.h |4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
apply to u-boot-arm

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


Re: [U-Boot] [PATCH] NAND: DaVinci: Adding 4 BIT ECC support

2009-08-17 Thread Jean-Christophe PLAGNIOL-VILLARD
On 10:45 Tue 11 Aug , s-paul...@ti.com wrote:
 From: Sandeep Paulraj s-paul...@ti.com
 
 This patch adds 4 BIT ecc support in the DaVinci NAND
 driver. Tested on both the DM355 and DM365.
 
 
 Signed-off-by: Sandeep Paulraj s-paul...@ti.com
 ---
  drivers/mtd/nand/davinci_nand.c  |  290 
 +-
  include/asm-arm/arch-davinci/emif_defs.h |   10 +
  2 files changed, 298 insertions(+), 2 deletions(-)
Scoot is this ok for you?

if yes I'd like to apply it with the board udpate to my next

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


Re: [U-Boot] [PATCH] ARM: DaVinci DM355: Updating the DM355 EVM config

2009-08-17 Thread Jean-Christophe PLAGNIOL-VILLARD
On 10:49 Tue 11 Aug , s-paul...@ti.com wrote:
 From: Sandeep Paulraj s-paul...@ti.com
 
 This patch enables NAND support on the DM355 EVM.
 Changes in this patch mostly relate to adding the NAND support.
 This patch also defines a boot delay.
 
 
 Signed-off-by: Sandeep Paulraj s-paul...@ti.com
 ---
  include/configs/davinci_dm355evm.h |   21 +
  1 files changed, 13 insertions(+), 8 deletions(-)
will be apply after nand patch handling
ack

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


Re: [U-Boot] [PATCH v2] arm: Kirkwood: add SYSRSTn Duration Counter Support

2009-08-17 Thread Jean-Christophe PLAGNIOL-VILLARD
On 22:03 Fri 07 Aug , Prafulla Wadaskar wrote:
 This feature can be used to trigger special command sysrstcmd using
 reset key long press event and environment variable sysrstdelay is set
 (useful for reset to factory or manufacturing mode execution)
 
 Kirkwood SoC implements a hardware-based SYSRSTn duration counter.
 When SYSRSTn is asserted low, a SYSRSTn duration counter is running.
 The counter value is stored in the SYSRSTn Length Counter Register
 The counter is based on the 25-MHz reference clock (40ns)
 It is a 29-bit counter, yielding a maximum counting duration of
 2^29/25 MHz (21.4 seconds). When the counter reach its maximum value,
 it remains at this value until counter reset is triggered by setting
 bit 31 of KW_REG_SYSRST_CNT
 
 Implementation:
 Upon long reset assertion ( ${sysrstdleay} in secs) sysrstcmd will be
 executed if pre-defined in environment variables.
 This feature will be disabled if sysrstdelay variable is unset.
 
 for-ex.
 setenv sysrst_cmd echo starting factory reset;
  nand erase 0xa 0x2;
  echo finish ed sysrst command;
 will erase particular nand sector if triggered by this event
 
 Signed-off-by: Prafulla Wadaskar prafu...@marvell.com
a readme would be nice
and maybe make it more generic so other soc could also implement it
 ---
 Change log:
 v2: command sysrst_cmd renamed as sysrstcmd
 stsrstdelay variable added instead of hardcoding the value
 
  cpu/arm926ejs/kirkwood/cpu.c|   79 
 +++
  include/asm-arm/arch-kirkwood/cpu.h |2 +
  2 files changed, 81 insertions(+), 0 deletions(-)
 
 diff --git a/cpu/arm926ejs/kirkwood/cpu.c b/cpu/arm926ejs/kirkwood/cpu.c
 index 795a739..9a6ee57 100644
 --- a/cpu/arm926ejs/kirkwood/cpu.c
 +++ b/cpu/arm926ejs/kirkwood/cpu.c
 @@ -195,6 +195,82 @@ int kw_config_mpp(u32 mpp0_7, u32 mpp8_15, u32 mpp16_23, 
 u32 mpp24_31,
   return 0;
  }
  
 +/*
 + * SYSRSTn Duration Counter Support
 + *
 + * Kirkwood SoC implements a hardware-based SYSRSTn duration counter.
 + * When SYSRSTn is asserted low, a SYSRSTn duration counter is running.
 + * The SYSRSTn duration counter is useful for implementing a manufacturer
 + * or factory reset. Upon a long reset assertion that is greater than a
 + * pre-configured environment variable value for sysrstdelay,
 + * The counter value is stored in the SYSRSTn Length Counter Register
 + * The counter is based on the 25-MHz reference clock (40ns)
 + * It is a 29-bit counter, yielding a maximum counting duration of
 + * 2^29/25 MHz (21.4 seconds). When the counter reach its maximum value,
 + * it remains at this value until counter reset is triggered by setting
 + * bit 31 of KW_REG_SYSRST_CNT
 + */
 +static void kw_sysrst_action(void)
 +{
 +#ifdef CONFIG_CMD_RUN
 + char cmd[BUFLEN];
 + char img[BUFLEN * 2];
 + char *argv[3];
 +
 + if (getenv(sysrstcmd) == NULL) {
 + printf(Error.. %s failed, check sysrstcmd\n,
 + __FUNCTION__);
 + return;
 + }
 +
 + printf(Starting %s process...\n, __FUNCTION__);
 + sprintf(cmd, run );
 + sprintf(img, sysrstcmd);
 + argv[0] = cmd;
 + argv[1] = img;
 + if ((do_run(NULL, 0, 2, argv)) != 0x0) {
 + printf(Error.. %s failed\n, __FUNCTION__);
 + } else {
 + printf(%s process finished\n, __FUNCTION__);
 + }

 +#else/* CONFIG_CMD_RUN */
 + printf(Error.. %s needs run command support\n, __FUNCTION__);
 +#endif   /* CONFIG_CMD_RUN */
why not replace this by

char *s = getenv(sysrstcmd);

if (!s) {
printf(Error.. %s failed, check sysrstcmd\n,
__FUNCTION__);
return;
}

printf(Starting %s process...\n, __FUNCTION__);
#if !defined(CONFIG_SYS_HUSH_PARSER)
ret = run_command (s, 0);
#else
ret = parse_string_outer(s, FLAG_PARSE_SEMICOLON
  | FLAG_EXIT_FROM_LOOP);
#endif
...
 +}
 +
 +static void kw_sysrst_check(void)
 +{
 + u32 sysrst_cnt, sysrst_dly;
 + char *s;
 +
 + /*
 +  * no action if sysrstdelay environment variable is not defined
 +  */
 + s = getenv(sysrstdelay);
 + if (s == NULL)
 + return;
 +
 + /* read sysrstdelay value */
 + sysrst_dly = (u32) simple_strtoul(s, NULL, 10);
 +
 + /* read SysRst Length counter register (bits 28:0) */
 + sysrst_cnt = (0x1fff  readl(KW_REG_SYSRST_CNT));
 + printf(H/w Rst hold time: %d.%d secs\n,
 + sysrst_cnt/SYSRST_CNT_1SEC_VAL,
 + sysrst_cnt%SYSRST_CNT_1SEC_VAL);
please add space before and after %/ etc..
 +
 + /* clear the counter for next valid read*/
 + writel(1  31, KW_REG_SYSRST_CNT);
 +
 + /*
 +  * sysrst_action:
 +  * if H/w Reset key is pressed and hold for time
 +  * more than sysrst_dly in seconds
 +  */
 + if (sysrst_cnt = SYSRST_CNT_1SEC_VAL * sysrst_dly)
 +  

Re: [U-Boot] [PATCH] Update the mtd driver name in bootargs for at91-based boards

2009-08-17 Thread Jean-Christophe PLAGNIOL-VILLARD
On 18:30 Wed 22 Jul , Albin Tonnerre wrote:
 The name of the atmel nand driver in the kernel changed from at91_nand
 to atmel_nand back in June 2008, but the at91-based boards config files
 still refer to at91_nand. This patch updates them with the new name
 
 Signed-off-by: Albin Tonnerre albin.tonne...@free-electrons.com
 ---
  include/configs/at91cap9adk.h  |4 ++--
  include/configs/at91sam9260ek.h|6 +++---
  include/configs/at91sam9261ek.h|6 +++---
  include/configs/at91sam9263ek.h|4 ++--
  include/configs/at91sam9m10g45ek.h |4 ++--
  include/configs/at91sam9rlek.h |4 ++--
  include/configs/pm9261.h   |4 ++--
  include/configs/pm9263.h   |4 ++--
  8 files changed, 18 insertions(+), 18 deletions(-)
I've recive a ack for the pm9263 recently so I apply this version

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


Re: [U-Boot] [PATCH] Update the mtd driver name in bootargs for at91-based boards

2009-08-17 Thread Jean-Christophe PLAGNIOL-VILLARD
On 00:26 Tue 18 Aug , Albin Tonnerre wrote:
 On Tue, Aug 18, 2009 at 12:14:12AM +0200, Jean-Christophe PLAGNIOL-VILLARD 
 wrote :
  I've recive a ack for the pm9263 recently so I apply this version
 
 Did you mean 9261 ? From your previous mail, I thought this was the one 
 causing
 issues.
yes a typo I've the ask for both

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


Re: [U-Boot] [PATCH] Support for the Calao TNY-A9260/TNY-A9G20 boards

2009-08-17 Thread Jean-Christophe PLAGNIOL-VILLARD
On 00:13 Tue 18 Aug , Albin Tonnerre wrote:
 On Mon, Aug 17, 2009 at 11:41:06PM +0200, Jean-Christophe PLAGNIOL-VILLARD 
 wrote :
   +
   +#ifndef __CONFIG_H
   +#define __CONFIG_H
   +
   +#if defined(CONFIG_tny_a9260) || defined(CONFIG_tny_a9260_nandflash) || 
   defined(CONFIG_tny_a9260_eeprom)
  too long
  and define must be upper case
 
 Those defines are generated directly from the target names in the Makfile, and
 are used for internal purposes only. Moving them to uppercase would mean
 changing the target names from tny_a9g20_nandflash to TNY_A9G20_NANDFLASH, 
 while
 the existing Calao-provided BSP uses lowercase. I'd rather not change that.
you make them uppercase before put them in the config.h

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


Re: [U-Boot] [PATCH] AT91: Add support for blue_LED_* and add coloured_LED_init to at91/led.c

2009-08-17 Thread Jean-Christophe PLAGNIOL-VILLARD
On 23:39 Wed 12 Aug , Albin Tonnerre wrote:
 On Wed, Aug 12, 2009 at 11:15:26PM +0200, Jean-Christophe PLAGNIOL-VILLARD 
 wrote :
  On 18:10 Wed 12 Aug , Albin Tonnerre wrote:
   Currently, at91/led.c only provides _on and _off functions for green,
   yellow and red LEDs. This patch provides a generic coloured_LED_init
   function, which is a first step towards getting rid of the
   board-specific (and duplicated) board/*/*/led.c files on at91
   This patch alos adds similar support for blue LEDs, mostly for the sake
   of completeness.
   
  we do need to stop adding more and more specific led api
  we do need to have a common api that we can use on any arch for c  asm
 
 This does not *add* specific LED API, it merely implements the existing one.
 There /is/ a common led API, which currently has no support for ARM, as you
 probably know.
 Does you message mean you'd accept a patch which drops the coloured-LED API
 (whose only user is currently ARM) and use the one described in
 include/status_led.h ?
no please take a look on the other LED thread

I want to hape coloured-LED api and numbered led handle by the same api
with the less size impact

for c  assembly

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


Re: [U-Boot] [PATCH v2] arm: Kirkwood: add SYSRSTn Duration Counter Support

2009-08-17 Thread Jean-Christophe PLAGNIOL-VILLARD
On 00:36 Tue 18 Aug , Wolfgang Denk wrote:
 Dear Jean-Christophe PLAGNIOL-VILLARD,
 
 In message 20090817221152.gm23...@game.jcrosoft.org you wrote:
 
   + printf(Starting %s process...\n, __FUNCTION__);
   + sprintf(cmd, run );
   + sprintf(img, sysrstcmd);
   + argv[0] = cmd;
   + argv[1] = img;
   + if ((do_run(NULL, 0, 2, argv)) != 0x0) {
   + printf(Error.. %s failed\n, __FUNCTION__);
   + } else {
   + printf(%s process finished\n, __FUNCTION__);
   + }
  
   +#else/* CONFIG_CMD_RUN */
   + printf(Error.. %s needs run command support\n, __FUNCTION__);
   +#endif   /* CONFIG_CMD_RUN */
  why not replace this by
  
  char *s = getenv(sysrstcmd);
  
  if (!s) {
  printf(Error.. %s failed, check sysrstcmd\n,
  __FUNCTION__);
  return;
  }
  
  printf(Starting %s process...\n, __FUNCTION__);
  #if !defined(CONFIG_SYS_HUSH_PARSER)
  ret = run_command (s, 0);
  #else
  ret = parse_string_outer(s, FLAG_PARSE_SEMICOLON
| FLAG_EXIT_FROM_LOOP);
  #endif
 
 Maybe because the original code does not need an #ifdef ?
but the size is bigger on the current implementation
and as we have this is other part of U-Boot we can add a inline to have the
ifdef at only one place

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


[U-Boot] ARM Pull Request

2009-08-17 Thread Jean-Christophe PLAGNIOL-VILLARD
Hi,

please pull
The following changes since commit 7dedefdf749ff02c1086f7ddb8cb83a77b00d030:
  John Schmoller (1):
flash: Fix CFI buffer size bug

are available in the git repository at:

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

Albin Tonnerre (1):
  Update the mtd driver name in bootargs for at91-based boards

Ben Goska (1):
  omap3: Fixed a problem with hwecc

Wolfgang Denk (1):
  Monahans: avoid floating point calculations

 board/delta/nand.c  |8 +---
 board/zylonite/nand.c   |8 +---
 include/asm-arm/arch-omap3/cpu.h|4 ++--
 include/asm-arm/arch-pxa/pxa-regs.h |2 +-
 include/configs/at91cap9adk.h   |4 ++--
 include/configs/at91sam9260ek.h |6 +++---
 include/configs/at91sam9261ek.h |6 +++---
 include/configs/at91sam9263ek.h |4 ++--
 include/configs/at91sam9m10g45ek.h  |4 ++--
 include/configs/at91sam9rlek.h  |4 ++--
 include/configs/pm9261.h|4 ++--
 include/configs/pm9263.h|4 ++--
 12 files changed, 31 insertions(+), 27 deletions(-)

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


Re: [U-Boot] [PATCH] Add ability for arch code to make changes before we boot

2009-08-15 Thread Jean-Christophe PLAGNIOL-VILLARD
On 15:45 Fri 14 Aug , Kumar Gala wrote:
 
 On Aug 14, 2009, at 3:13 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
 
 On 14:00 Fri 14 Aug , Kumar Gala wrote:
 Added a arch_preboot() function that cpu specific code can
 implement to
 allow for various modifications to the state of the machine
 right before
 we boot.  This can be useful to setup register state to a specific
 configuration.
 
 Signed-off-by: Kumar Gala ga...@kernel.crashing.org
 ---
 common/cmd_bootm.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)
 
 diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
 index 86c8122..766889a 100644
 --- a/common/cmd_bootm.c
 +++ b/common/cmd_bootm.c
 @@ -166,6 +166,13 @@ void __arch_lmb_reserve(struct lmb *lmb)
 }
 void arch_lmb_reserve(struct lmb *lmb) __attribute__((weak,
 alias(__arch_lmb_reserve)));
 
 +/* Allow for arch specific config before we boot */
 +void __arch_preboot(void)
 +{
 +   /* please define platform specific arch_preboot() */
 +}
 +void arch_preboot(void) __attribute__((weak,
 alias(__arch_preboot)));
 +
 why not a section so you will be able to have multiple callback so
 it can be
 arch or soc or board too in any combination
 
 Because the use I have for it is a simple single case at this point.
 
 If and when we need more complexity we can add it.
we have already it
as example the usb drivers that need to be stop before start an os
I forget some but I'm sure to have seen oher

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


Re: [U-Boot] OMAP DIE_ID

2009-08-15 Thread Jean-Christophe PLAGNIOL-VILLARD
On 16:24 Fri 14 Aug , Frederik Kriewitz wrote:
 I'm a bit confused about the u-boot code which reads the OMAP die id.
 
 From the OMAP TRM:
 CONTROL.CONTROL_DIE_ID[127:0]
 Address: 0x4830A218
 Size: 128
 
 u-boot code: 
 http://gitorious.org/u-boot-omap3/mainline/blobs/master/cpu/arm_cortexa8/omap3/sys_info.c#line44
 
 result: Die ID #: 04ba0054 0020 0401463b 0401c214
 Memory Dump: 4830a218: 0401c214 0401463b 0020 04ba0054
 
 Shouldn't u-boot read/show the die id the other way around (just as in
 the memory dump)?
 
 Please just tell me that I'm wrong :)
Honnesty it's not really important the order except you have a special need
it's really a personnal preference

NB: until someone give us a good reason to change we will keep it this way

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


Re: [U-Boot] OMAP DIE_ID

2009-08-15 Thread Jean-Christophe PLAGNIOL-VILLARD
On 17:02 Sat 15 Aug , Frederik Kriewitz wrote:
 On Sat, Aug 15, 2009 at 4:35 PM, Jean-Christophe
 PLAGNIOL-VILLARDplagn...@jcrosoft.com wrote:
  Honnesty it's not really important the order except you have a special need
  it's really a personnal preference
 
 I intent to use some bytes of the die id as MAC address. So I'm
 interested in the bytes which change often.
for private mac address or public?

for public you may need to remember that you are supposed to trac all of them
and do not loose any of them if you want to be able to buy a new lot of mac
address

IIRC the term of sell

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


Re: [U-Boot] [PATCH] Update the mtd driver name in bootargs for at91-based boards

2009-08-14 Thread Jean-Christophe PLAGNIOL-VILLARD
On 13:00 Thu 13 Aug , Albin Tonnerre wrote:
 On Sat, Aug 01, 2009 at 10:59:00PM +0200, Jean-Christophe PLAGNIOL-VILLARD 
 wrote :
  On 17:40 Fri 31 Jul , Albin Tonnerre wrote:
   Hi Wolfgang and Jean-Christophe,
   
   Is this patch being left aside on purpose, or did it get under the radar 
   ? I
   think it would be nice to have that fixed for the next release.
  I've not missed it but here each board Maintainer must ack it
  as the device nand depend on which kernel they work
 
 Well, if the supported kernel for those boards still use at91_nand, I wonder 
 to
 what extend it is a problem to set the supported u-boot version to 2009.06.
 After all, it is arguably way easier to maintain than a more-than-one-year-old
 kernel.
I've receive a confirmation taht the pm9261 use a old kernel so nack for this
one for the pm9263 ok and the Atmel ref board ditto

please update the patch and resend

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


Re: [U-Boot] [PATCH] imx27lite: add support for imx27lite board from LogicPD

2009-08-14 Thread Jean-Christophe PLAGNIOL-VILLARD
On 02:32 Tue 11 Aug , Ilya Yanok wrote:
 This patch adds support for i.MX27-LITEKIT development board from
 LogicPD. This board uses i.MX27 SoC and has 2MB NOR flash, 64MB NAND
 flash, FEC ethernet controller integrated into i.MX27.
 
 Signed-off-by: Ilya Yanok ya...@emcraft.com
 ---
  MAINTAINERS |1 +
  MAKEALL |1 +
  Makefile|3 +
  board/logicpd/imx27lite/Makefile|   51 ++
  board/logicpd/imx27lite/config.mk   |1 +
  board/logicpd/imx27lite/imx27lite.c |   73 +
  board/logicpd/imx27lite/lowlevel_init.S |  170 +
  cpu/arm926ejs/mx27/generic.c|   65 
  include/asm-arm/arch-mx27/imx-regs.h|   12 ++
  include/configs/imx27lite.h |  252 
 +++
  10 files changed, 629 insertions(+), 0 deletions(-)
  create mode 100644 board/logicpd/imx27lite/Makefile
  create mode 100644 board/logicpd/imx27lite/config.mk
  create mode 100644 board/logicpd/imx27lite/imx27lite.c
  create mode 100644 board/logicpd/imx27lite/lowlevel_init.S
  create mode 100644 include/configs/imx27lite.h
Acked-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com

Scott could you applied on your tree as this one need the nand patch that you
handle

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


Re: [U-Boot] [PATCH] Add ability for arch code to make changes before we boot

2009-08-14 Thread Jean-Christophe PLAGNIOL-VILLARD
On 14:00 Fri 14 Aug , Kumar Gala wrote:
 Added a arch_preboot() function that cpu specific code can implement to
 allow for various modifications to the state of the machine right before
 we boot.  This can be useful to setup register state to a specific
 configuration.
 
 Signed-off-by: Kumar Gala ga...@kernel.crashing.org
 ---
  common/cmd_bootm.c |   10 ++
  1 files changed, 10 insertions(+), 0 deletions(-)
 
 diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
 index 86c8122..766889a 100644
 --- a/common/cmd_bootm.c
 +++ b/common/cmd_bootm.c
 @@ -166,6 +166,13 @@ void __arch_lmb_reserve(struct lmb *lmb)
  }
  void arch_lmb_reserve(struct lmb *lmb) __attribute__((weak, 
 alias(__arch_lmb_reserve)));
  
 +/* Allow for arch specific config before we boot */
 +void __arch_preboot(void)
 +{
 + /* please define platform specific arch_preboot() */
 +}
 +void arch_preboot(void) __attribute__((weak, alias(__arch_preboot)));
 +
why not a section so you will be able to have multiple callback so it can be
arch or soc or board too in any combination

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


[U-Boot] [PATCH 1/3] net/eth_device: keep index inside each device

2009-08-12 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 include/net.h |1 +
 net/eth.c |   17 +
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/include/net.h b/include/net.h
index 4a03717..2a8a12d 100644
--- a/include/net.h
+++ b/include/net.h
@@ -93,6 +93,7 @@ enum eth_state_t {
 };
 
 struct eth_device {
+   int index;
char name[NAMESIZE];
unsigned char enetaddr[6];
int iobase;
diff --git a/net/eth.c b/net/eth.c
index 42f74da..2316a22 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -83,6 +83,7 @@ static unsigned int eth_rcv_current = 0, eth_rcv_last = 0;
 #endif
 
 static struct eth_device *eth_devices, *eth_current;
+static int nb_eth_devices = 0;
 
 struct eth_device *eth_get_dev(void)
 {
@@ -133,22 +134,12 @@ struct eth_device *eth_get_dev_by_index(int index)
 
 int eth_get_dev_index (void)
 {
-   struct eth_device *dev;
-   int num = 0;
-
if (!eth_devices) {
return (-1);
}
 
-   for (dev = eth_devices; dev; dev = dev-next) {
-   if (dev == eth_current)
-   break;
-   ++num;
-   }
-
-   if (dev) {
-   return (num);
-   }
+   if (eth_current)
+   return eth_current-index;
 
return (0);
 }
@@ -172,6 +163,8 @@ int eth_register(struct eth_device* dev)
d-next = dev;
}
 
+   dev-index = nb_eth_devices;
+   nb_eth_devices++;
dev-state = ETH_STATE_INIT;
dev-next  = eth_devices;
 
-- 
1.6.4

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


[U-Boot] [PATCH 3/3] smc91111: switch to MULTI_NET api

2009-08-12 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 board/netstar/eeprom.c   |3 +-
 board/voiceblue/eeprom.c |3 +-
 drivers/net/smc9.c   |  420 +++--
 drivers/net/smc9.h   |8 +-
 include/configs/ADNPESC1.h   |1 +
 include/configs/DK1C20.h |1 +
 include/configs/DK1S10.h |1 +
 include/configs/EP1C20.h |1 +
 include/configs/EP1S10.h |1 +
 include/configs/EP1S40.h |1 +
 include/configs/MigoR.h  |1 +
 include/configs/PK1C20.h |1 +
 include/configs/bf533-ezkit.h|1 +
 include/configs/bf533-stamp.h|1 +
 include/configs/bf538f-ezkit.h   |1 +
 include/configs/bf561-ezkit.h|1 +
 include/configs/blackstamp.h |1 +
 include/configs/cerf250.h|1 +
 include/configs/cm-bf533.h   |1 +
 include/configs/cm-bf561.h   |1 +
 include/configs/cradle.h |1 +
 include/configs/delta.h  |1 +
 include/configs/dnp1110.h|1 +
 include/configs/gr_cpci_ax2000.h |1 +
 include/configs/gr_ep2s60.h  |1 +
 include/configs/innokom.h|1 +
 include/configs/integratorcp.h   |1 +
 include/configs/logodl.h |1 +
 include/configs/lpd7a400-10.h|1 +
 include/configs/lpd7a404-10.h|1 +
 include/configs/ms7722se.h   |1 +
 include/configs/netstar.h|1 +
 include/configs/nhk8815.h|1 +
 include/configs/pxa255_idp.h |1 +
 include/configs/versatile.h  |1 +
 include/configs/voiceblue.h  |1 +
 include/configs/xaeniax.h|1 +
 include/configs/xm250.h  |1 +
 include/configs/xsengine.h   |1 +
 include/configs/zylonite.h   |1 +
 include/netdev.h |1 +
 41 files changed, 259 insertions(+), 212 deletions(-)

diff --git a/board/netstar/eeprom.c b/board/netstar/eeprom.c
index 5806128..05c6768 100644
--- a/board/netstar/eeprom.c
+++ b/board/netstar/eeprom.c
@@ -27,9 +27,8 @@
 #include common.h
 #include exports.h
 #include timestamp.h
-#include ../drivers/net/smc9.h
-
 #define SMC_BASE_ADDRESS CONFIG_SMC9_BASE
+#include ../drivers/net/smc9.h
 
 static u16 read_eeprom_reg(u16 reg)
 {
diff --git a/board/voiceblue/eeprom.c b/board/voiceblue/eeprom.c
index f01597a..8b3fbed 100644
--- a/board/voiceblue/eeprom.c
+++ b/board/voiceblue/eeprom.c
@@ -27,9 +27,8 @@
 #include common.h
 #include exports.h
 #include timestamp.h
-#include ../drivers/net/smc9.h
-
 #define SMC_BASE_ADDRESS CONFIG_SMC9_BASE
+#include ../drivers/net/smc9.h
 
 static u16 read_eeprom_reg(u16 reg)
 {
diff --git a/drivers/net/smc9.c b/drivers/net/smc9.c
index b41e4d2..1c0c20f 100644
--- a/drivers/net/smc9.c
+++ b/drivers/net/smc9.c
@@ -61,9 +61,10 @@
 
 #include common.h
 #include command.h
-#include config.h
+#include malloc.h
 #include smc9.h
 #include net.h
+#include netdev.h
 
 /* Use power-down feature of the chip */
 #define POWER_DOWN 0
@@ -114,7 +115,6 @@ static const char version[] =
 #define PRINTK(args...)
 #endif
 
-
 /*
  .
  . The internal workings of the driver. If you are changing anything
@@ -127,14 +127,7 @@ static const char version[] =
 /* Memory sizing constant */
 #define LAN91C111_MEMORY_MULTIPLIER(1024*2)
 
-#ifndef CONFIG_SMC9_BASE
-#define CONFIG_SMC9_BASE 0x2300
-#endif
-
-#define SMC_BASE_ADDRESS CONFIG_SMC9_BASE
-
 #define SMC_DEV_NAME SMC9
-#define SMC_PHY_ADDR 0x
 #define SMC_ALLOC_MAX_TRY 5
 #define SMC_TX_TIMEOUT 30
 
@@ -143,75 +136,51 @@ static const char version[] =
 #define ETH_ZLEN 60
 
 #ifdef CONFIG_SMC_USE_32_BIT
-#define USE_32_BIT  1
+#define is_use_32bit(x) (x-use_32bit)
 #else
-#undef USE_32_BIT
+#define is_use_32bit(x) (0)
 #endif
+
+struct smc9_device {
+   int id;
+   void*regs;
+
+   int use_32bit;
+
+   struct eth_device   netdev;
+   unsigned short  phy_addr;
+};
+#define to_smc9(_nd) container_of(_nd, struct smc9_device, netdev)
+
 /*-
  .
  .  The driver can be entered at any of the following entry points.
  .
  .--  */
 
-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);
-
 #ifdef SHARED_RESOURCES
extern void swap_to(int device_id);
 #endif
 
 /*
- . This is called by  register_netdev().  It is responsible for
- . checking the portlist for the SMC9000 series chipset.  If it finds
- . one, then it will initialize the device, find the hardware information,
- . and sets up the appropriate device parameters.
- . NOTE: Interrupts

[U-Boot] [PATCH 2/3] net: add getenv/setenv enetaddr function to use ethernet device num

2009-08-12 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 include/net.h |2 ++
 net/eth.c |   28 +---
 2 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/include/net.h b/include/net.h
index 2a8a12d..dc4ae41 100644
--- a/include/net.h
+++ b/include/net.h
@@ -124,6 +124,8 @@ extern void eth_set_enetaddr(int num, char* a); /* Set 
new MAC address */
 extern void eth_parse_enetaddr(const char *addr, uchar *enetaddr);
 extern int eth_getenv_enetaddr(char *name, uchar *enetaddr);
 extern int eth_setenv_enetaddr(char *name, const uchar *enetaddr);
+extern int eth_getenv_num_enetaddr(int num, uchar *enetaddr);
+extern int eth_setenv_num_enetaddr(int num, const uchar *enetaddr);
 
 extern int eth_init(bd_t *bis);/* Initialize the 
device */
 extern int eth_send(volatile void *packet, int length);   /* Send a 
packet */
diff --git a/net/eth.c b/net/eth.c
index 2316a22..9bdf961 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -27,6 +27,12 @@
 #include miidev.h
 
 #ifdef CONFIG_CMD_NET
+
+static void get_enetvar(int num, char *enetvar)
+{
+   sprintf(enetvar, num ? eth%daddr : ethaddr, num);
+}
+
 void eth_parse_enetaddr(const char *addr, uchar *enetaddr)
 {
char *end;
@@ -53,6 +59,24 @@ int eth_setenv_enetaddr(char *name, const uchar *enetaddr)
 
return setenv(name, buf);
 }
+
+int eth_getenv_num_enetaddr(int num, uchar *enetaddr)
+{
+   char enetvar[32];
+
+   get_enetvar(num, enetvar);
+
+   return eth_getenv_enetaddr(enetvar, enetaddr);
+}
+
+int eth_setenv_num_enetaddr(int num, const uchar *enetaddr)
+{
+   char enetvar[32];
+
+   get_enetvar(num, enetvar);
+
+   return eth_setenv_enetaddr(enetvar, enetaddr);
+}
 #endif
 
 #if defined(CONFIG_CMD_NET)  defined(CONFIG_NET_MULTI)
@@ -173,7 +197,6 @@ int eth_register(struct eth_device* dev)
 
 int eth_initialize(bd_t *bis)
 {
-   char enetvar[32];
unsigned char env_enetaddr[6];
int eth_number = 0;
 
@@ -214,8 +237,7 @@ int eth_initialize(bd_t *bis)
puts ( [PRIME]);
}
 
-   sprintf(enetvar, eth_number ? eth%daddr : ethaddr, 
eth_number);
-   eth_getenv_enetaddr(enetvar, env_enetaddr);
+   eth_getenv_num_enetaddr(eth_number, env_enetaddr);
 
if (memcmp(env_enetaddr, \0\0\0\0\0\0, 6)) {
if (memcmp(dev-enetaddr, \0\0\0\0\0\0, 6) 
-- 
1.6.4

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


Re: [U-Boot] [PATCH 3/3] smc91111: switch to MULTI_NET api

2009-08-12 Thread Jean-Christophe PLAGNIOL-VILLARD
On 21:12 Wed 12 Aug , Wolfgang Denk wrote:
 Dear Jean-Christophe PLAGNIOL-VILLARD,
 
 In message 1250023747-20224-3-git-send-email-plagn...@jcrosoft.com you 
 wrote:
  Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
 ...
   #ifdef CONFIG_SMC_USE_32_BIT
  -#define USE_32_BIT  1
  +#define is_use_32bit(x) (x-use_32bit)
 
 Does switching from a compile time check to a run time check not cause
 an avoidable growth of the memory footprint?
 
 How much bigger is the new code?
none for the non 32 bit support it will only impact you if you do enable the
32bits support but the impact depend on the arch you use I've seen different
impact on arm and sh
but on the board I've test less than 300 bytes for dual support

with dual support
... configured to boot from Nand Flash
Configuring for nhk8815 board...
   textdata bss dec hex filename
 1893308132   24984  222446   364ee u-boot

with 32bit only
... configured to boot from Nand Flash
Configuring for nhk8815 board...
   textdata bss dec hex filename
 1890828132   24984  222198   363f6 u-boot

with non 32bit
... configured to boot from Nand Flash
Configuring for nhk8815 board...
   textdata bss dec hex filename
 1890508132   24984  222166   363d6 u-boot

 
  -#undef USE_32_BIT
  +#define is_use_32bit(x) (0)
   #endif
 
 
 ...
  -static inline word SMC_inw(dword offset)
  +static inline word SMC_io_inw(struct smc9_device *smc, dword offset)
   {
  word v;
  -   v = *((volatile word*)(SMC_BASE_ADDRESS+offset));
  +   v = *((volatile word*)(smc-regs+offset));
  barrier(); *(volatile u32*)(0xc000);
  return v;
   }
   
  -static inline void SMC_outw(word value, dword offset)
  +static inline void SMC_io_outw(struct smc9_device *smc, word value,
  +  dword offset)
   {
  -   *((volatile word*)(SMC_BASE_ADDRESS+offset)) = value;
  +   *((volatile word*)(smc-regs+offset)) = value;
  barrier(); *(volatile u32*)(0xc000);
   }
 
 Please use proper I/O accessor functions here.
this will be for an other patch I do not want to mix Net multi api update and 
I/O cleanup
 
  -static int smc_close()
  +static void smc_halt(struct eth_device *netdev)
   {
  +   struct smc9_device *smc = to_smc9(netdev);
  PRINTK2(%s: smc_close\n, SMC_DEV_NAME);
 
 You should also adapt the debug messages to the changed function
 names.
 
  +#ifdef CONFIG_SMC_USE_32_BIT
  +#define USE_32BIT 1
  +#else
  +#define USE_32BIT 0
  +#endif
 
 Above you get rid of the USE_32BIT stuff; here you re-introduce it.
 Why?
yes it's different here it's to declare that you want to activate the 32bit for 
the default
driver init
   include/configs/ADNPESC1.h   |1 +
   include/configs/DK1C20.h |1 +
   include/configs/DK1S10.h |1 +
   include/configs/EP1C20.h |1 +
   include/configs/EP1S10.h |1 +
   include/configs/EP1S40.h |1 +
   include/configs/MigoR.h  |1 +
   include/configs/PK1C20.h |1 +
   include/configs/bf533-ezkit.h|1 +
   include/configs/bf533-stamp.h|1 +
   include/configs/bf538f-ezkit.h   |1 +
   include/configs/bf561-ezkit.h|1 +
   include/configs/blackstamp.h |1 +
   include/configs/cerf250.h|1 +
   include/configs/cm-bf533.h   |1 +
   include/configs/cm-bf561.h   |1 +
   include/configs/cradle.h |1 +
   include/configs/delta.h  |1 +
   include/configs/dnp1110.h|1 +
   include/configs/gr_cpci_ax2000.h |1 +
   include/configs/gr_ep2s60.h  |1 +
   include/configs/innokom.h|1 +
   include/configs/integratorcp.h   |1 +
   include/configs/logodl.h |1 +
   include/configs/lpd7a400-10.h|1 +
   include/configs/lpd7a404-10.h|1 +
   include/configs/ms7722se.h   |1 +
   include/configs/netstar.h|1 +
   include/configs/nhk8815.h|1 +
   include/configs/pxa255_idp.h |1 +
   include/configs/versatile.h  |1 +
   include/configs/voiceblue.h  |1 +
   include/configs/xaeniax.h|1 +
   include/configs/xm250.h  |1 +
   include/configs/xsengine.h   |1 +
   include/configs/zylonite.h   |1 +
 
 This is a pretty long list of boards which is affected. How many of
 these have actuaaly been tested with this patch, and which ones, and
 to what extent?
none will be impact as the share the same init and I've not modify any config
just active the multi support
and the code is tested on custom boards (4 differents) + nhk8815

and compile on arm  sh

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


Re: [U-Boot] [PATCH 3/3] smc91111: switch to MULTI_NET api

2009-08-12 Thread Jean-Christophe PLAGNIOL-VILLARD
On 08:54 Wed 12 Aug , Ben Warren wrote:
 Jean-Christophe,
 Jean-Christophe PLAGNIOL-VILLARD wrote:
 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
 I already posted a patch that does this and asked for help testing.
 It is available in the net/next repo.  If you find it to be
 inadequate, please provide patches to make it work.
I've also update the mac support and allow multi chip support does you pacth
do the same?

as I do need multi chip support

and the one I send work fine

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


Re: [U-Boot] [PATCH 2/3] net: add getenv/setenv enetaddr function to use ethernet device num

2009-08-12 Thread Jean-Christophe PLAGNIOL-VILLARD
On 20:58 Wed 12 Aug , Wolfgang Denk wrote:
 Dear Jean-Christophe PLAGNIOL-VILLARD,
 
 In message 1250023747-20224-2-git-send-email-plagn...@jcrosoft.com you 
 wrote:
  Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
  ---
   include/net.h |2 ++
   net/eth.c |   28 +---
   2 files changed, 27 insertions(+), 3 deletions(-)
 
 NAK.
 
 First, there are formal issues:
 
 - The subject line is way too long.
why it's only 67 chars
 
 - There is no commit message and no description what this patch is
   supposed to do or to fix. Why should we add it?
just to stop to duplicate this in every driver
 
  index 2a8a12d..dc4ae41 100644
  --- a/include/net.h
  +++ b/include/net.h
  @@ -124,6 +124,8 @@ extern void eth_set_enetaddr(int num, char* a); /* Set 
  new MAC address */
   extern void eth_parse_enetaddr(const char *addr, uchar *enetaddr);
   extern int eth_getenv_enetaddr(char *name, uchar *enetaddr);
   extern int eth_setenv_enetaddr(char *name, const uchar *enetaddr);
  +extern int eth_getenv_num_enetaddr(int num, uchar *enetaddr);
  +extern int eth_setenv_num_enetaddr(int num, const uchar *enetaddr);
 
 What are these functions god for? Are they by any chance duplicationg
 existing code, got example eth_getenv_enetaddr_by_index() ?
the get yes but not there is no set

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


Re: [U-Boot] [PATCH 1/3] net/eth_device: keep index inside each device

2009-08-12 Thread Jean-Christophe PLAGNIOL-VILLARD
On 20:50 Wed 12 Aug , Wolfgang Denk wrote:
 Dear Jean-Christophe PLAGNIOL-VILLARD,
 
 In message 1250023747-20224-1-git-send-email-plagn...@jcrosoft.com you 
 wrote:
  Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
  ---
   include/net.h |1 +
   net/eth.c |   17 +
   2 files changed, 6 insertions(+), 12 deletions(-)
 
 What exactly is the problem you are addressing with this patch?
 
 Please provide a commit message that explains what is going on, and
 what is being changed or fixed.
simple it impossible to known what will be your device index in the driver
specially when you have 2 or more drivers instance once or more
so you can not update the mac addres in the env if you want to do it
as we do on smc9 as we can not known eth%daddr you are
which allow us the avoid to read the eeprom every time we want to use the eth

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


  1   2   3   4   5   6   7   8   9   10   >