Re: [U-Boot] RFC: U-Boot OneNAND IPL TEXT_BASE

2010-05-02 Thread Marek Vasut
Dne Ne 2. května 2010 05:54:41 Kyungmin Park napsal(a):
 Hi,
 
 Which CPU do you use? In most ARM cpu, CPU load the IPL into its
 internal SRAM, and runs at here.
PXA270 ... the BootRAM is mapped to 0x0 and the code runs from there.
 But in your case it's not. So you maybe redefine IPL address.
 
 Instead of modifying the config.mk, how about to define IPL_TEXT_BASE.
 
 e.g.,
 
 In OneNAND IPL code,
 
 #ifndef BOARD_IPL_TEXT_BASE
 #define ONENAND_IPL_TEXT_BASE BOARD_IPL_TEXT_BASE
 #endif

That won't help -- TEXT_BASE is used while compiling start.S (to setup stack 
under TEXT_BASE) and the config.mk prepares the gcc options for start.S (the 
TEXT_BASE is defined in the gcc options).So modifying config.mk is unavoidable 
I 
fear.

The thing we can do is define STACK_TOP_BASE and that'd certainly do the trick! 
This would allow me to point stack into SRAM, while running the IPL code from 
BootRAM. Of course, in case STACK_TOP_BASE wasn't defined, it'd fall back to 
the 
old code in start.S. This would of course work without modifying config.mk and 
I 
start to like such a solution.

Hm?

 
 load IPL code ONENAND_IPL_TEXT_BASE instead of current code.
 
 Thank you,
 Kyungmin Park

Thanks!
 
 On Sat, May 1, 2010 at 11:48 AM, Marek Vasut marek.va...@gmail.com wrote:
  Hey,
  
  I've been tinkering with OneNAND IPL in uboot. I found out it wan't to
  load itself to the address specified in board/$(BOARDDIR)/config.mk .
  That's fine in most cases, but in my case that wasn't possible.
  
  In my case, SDRAM init didn't fit into the IPL, so I had to copy U-Boot
  into SRAM, then execute it and let it relocate itself into SDRAM. One
  more time: IPL: OneNAND-SRAM
  U-Boot: SRAM-SDRAM
  
  It all works fine, but when compiling the IPL, I had to alter TEXT_BASE
  not to point into SDRAM but SRAM too (because of stack). I introduced a
  variable called IPL which allows using config.mk from (for example)
  onenand-
  ipl/board/$(BOARDDIR)/config.mk rather than the
  board/$(BOARDDIR)/config.mk one, which is in my opinion a correct
  behaviour.
  
  Any opinions?
  
  Thanks in advance.
  
  diff --git a/config.mk b/config.mk
  index 73b5195..8639580 100644
  --- a/config.mk
  +++ b/config.mk
  @@ -130,9 +130,13 @@ BOARDDIR = $(VENDOR)/$(BOARD)
   else
   BOARDDIR = $(BOARD)
   endif
  +ifdef  IPL
  +sinclude $(TOPDIR)/$(IPL)/board/$(BOARDDIR)/config.mk  # include IPL
  specific rules
  +else
   ifdef  BOARD
   sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific
  rules endif
  +endif
  
   
  #
  
  ___
  U-Boot mailing list
  U-Boot@lists.denx.de
  http://lists.denx.de/mailman/listinfo/u-boot
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3] POST cleanup v3 (incremental)

2010-05-02 Thread Michael Zaidman
Incremental patch. Should be applied above its v2:
http://lists.denx.de/pipermail/u-boot/2010-April/070729.html
(Sorry for inconvenience. I will use --in-reply-to option next time)

In the patch:
- Fix for hcu4 board;
- post.h - preprocessor conditional inclusions optimization.

Signed-off-by: Michael Zaidman michael.zaid...@gmail.com
---
 include/configs/hcu4.h |2 +-
 include/post.h |   18 +-
 2 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/include/configs/hcu4.h b/include/configs/hcu4.h
index b01f8b1..26992e7 100644
--- a/include/configs/hcu4.h
+++ b/include/configs/hcu4.h
@@ -72,7 +72,7 @@
 #define CONFIG_SYS_INIT_RAM_ENDCONFIG_SYS_OCM_DATA_SIZE
 #define CONFIG_SYS_GBL_DATA_SIZE   256 /* num bytes initial 
data */
 #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - 
CONFIG_SYS_GBL_DATA_SIZE)
-#define CONFIG_SYS_INIT_SP_OFFSET  CONFIG_SYS_POST_WORD_ADDR
+#define CONFIG_SYS_INIT_SP_OFFSET  (CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 
 /*---
  * Serial Port
diff --git a/include/post.h b/include/post.h
index 296e1d5..939310b 100644
--- a/include/post.h
+++ b/include/post.h
@@ -35,31 +35,24 @@
 
 #ifdef CONFIG_MPC5xxx
 #define _POST_WORD_ADDR(MPC5XXX_SRAM + MPC5XXX_SRAM_POST_SIZE)
-#endif
 
-#if defined(CONFIG_MPC821) || defined(CONFIG_MPC823) || \
-   defined(CONFIG_MPC855) || defined(CONFIG_MPC855T)|| \
-   defined(CONFIG_MPC850) || defined(CONFIG_MPC86x)
+#elif defined(CONFIG_8xx)
 #define _POST_WORD_ADDR \
(((immap_t *)CONFIG_SYS_IMMR)-im_cpm.cp_dpmem + CPM_POST_WORD_ADDR)
-#endif
 
-#ifdef CONFIG_MPC8260
+#elif defined(CONFIG_MPC8260)
 #include asm/cpm_8260.h
 #define _POST_WORD_ADDR(CONFIG_SYS_IMMR + CPM_POST_WORD_ADDR)
-#endif
 
-#ifdef CONFIG_MPC8360
+#elif defined(CONFIG_MPC8360)
 #include asm/immap_qe.h
 #define _POST_WORD_ADDR(CONFIG_SYS_IMMR + CPM_POST_WORD_ADDR)
-#endif
 
-#ifdef CONFIG_MPC85xx
+#elif defined (CONFIG_MPC85xx)
 #include asm/cpm_85xx.h
 #define _POST_WORD_ADDR(CONFIG_SYS_IMMR + CPM_POST_WORD_ADDR)
-#endif
 
-#ifdef CONFIG_4xx
+#elif defined (CONFIG_4xx)
 #define _POST_WORD_ADDR \
(CONFIG_SYS_OCM_DATA_ADDR + CONFIG_SYS_GBL_DATA_OFFSET - 0x4)
 #endif
@@ -67,7 +60,6 @@
 #ifndef _POST_WORD_ADDR
 #error _POST_WORD_ADDR currently not implemented for this platform!
 #endif
-
 #endif /* CONFIG_SYS_POST_WORD_ADDR */
 
 static inline ulong post_word_load (void)
-- 
1.6.3.3

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


Re: [U-Boot] RFC: U-Boot OneNAND IPL TEXT_BASE

2010-05-02 Thread Kyungmin Park
On Sun, May 2, 2010 at 3:39 PM, Marek Vasut marek.va...@gmail.com wrote:
 Dne Ne 2. května 2010 05:54:41 Kyungmin Park napsal(a):
 Hi,

 Which CPU do you use? In most ARM cpu, CPU load the IPL into its
 internal SRAM, and runs at here.
 PXA270 ... the BootRAM is mapped to 0x0 and the code runs from there.
 But in your case it's not. So you maybe redefine IPL address.

 Instead of modifying the config.mk, how about to define IPL_TEXT_BASE.

 e.g.,

 In OneNAND IPL code,

 #ifndef BOARD_IPL_TEXT_BASE
 #define ONENAND_IPL_TEXT_BASE BOARD_IPL_TEXT_BASE
 #endif

 That won't help -- TEXT_BASE is used while compiling start.S (to setup stack
 under TEXT_BASE) and the config.mk prepares the gcc options for start.S (the
 TEXT_BASE is defined in the gcc options).So modifying config.mk is 
 unavoidable I
 fear.

Sorry my mistake. It's already supported at current drivers. Now I
works on s5pc100 and s5pc110 and each define it's TEXT_BASE at
onenand_ipl/board/samsung/${board_name}/config.mk. and it's used at
start.S

No need to modify config.mk and Makefile. If you need I can't send a
sample files to you.

Thank you,
Kyungmin Park


 The thing we can do is define STACK_TOP_BASE and that'd certainly do the 
 trick!
 This would allow me to point stack into SRAM, while running the IPL code from
 BootRAM. Of course, in case STACK_TOP_BASE wasn't defined, it'd fall back to 
 the
 old code in start.S. This would of course work without modifying config.mk 
 and I
 start to like such a solution.

 Hm?


 load IPL code ONENAND_IPL_TEXT_BASE instead of current code.

 Thank you,
 Kyungmin Park

 Thanks!

 On Sat, May 1, 2010 at 11:48 AM, Marek Vasut marek.va...@gmail.com wrote:
  Hey,
 
  I've been tinkering with OneNAND IPL in uboot. I found out it wan't to
  load itself to the address specified in board/$(BOARDDIR)/config.mk .
  That's fine in most cases, but in my case that wasn't possible.
 
  In my case, SDRAM init didn't fit into the IPL, so I had to copy U-Boot
  into SRAM, then execute it and let it relocate itself into SDRAM. One
  more time: IPL: OneNAND-SRAM
  U-Boot: SRAM-SDRAM
 
  It all works fine, but when compiling the IPL, I had to alter TEXT_BASE
  not to point into SDRAM but SRAM too (because of stack). I introduced a
  variable called IPL which allows using config.mk from (for example)
  onenand-
  ipl/board/$(BOARDDIR)/config.mk rather than the
  board/$(BOARDDIR)/config.mk one, which is in my opinion a correct
  behaviour.
 
  Any opinions?
 
  Thanks in advance.
 
  diff --git a/config.mk b/config.mk
  index 73b5195..8639580 100644
  --- a/config.mk
  +++ b/config.mk
  @@ -130,9 +130,13 @@ BOARDDIR = $(VENDOR)/$(BOARD)
   else
   BOARDDIR = $(BOARD)
   endif
  +ifdef  IPL
  +sinclude $(TOPDIR)/$(IPL)/board/$(BOARDDIR)/config.mk  # include IPL
  specific rules
  +else
   ifdef  BOARD
   sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific
  rules endif
  +endif
 
   
  #
 
  ___
  U-Boot mailing list
  U-Boot@lists.denx.de
  http://lists.denx.de/mailman/listinfo/u-boot

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


Re: [U-Boot] RFC: U-Boot OneNAND IPL TEXT_BASE

2010-05-02 Thread Marek Vasut
Dne Ne 2. května 2010 13:07:13 Kyungmin Park napsal(a):
 On Sun, May 2, 2010 at 3:39 PM, Marek Vasut marek.va...@gmail.com wrote:
  Dne Ne 2. května 2010 05:54:41 Kyungmin Park napsal(a):
  Hi,
  
  Which CPU do you use? In most ARM cpu, CPU load the IPL into its
  internal SRAM, and runs at here.
  
  PXA270 ... the BootRAM is mapped to 0x0 and the code runs from there.
  
  But in your case it's not. So you maybe redefine IPL address.
  
  Instead of modifying the config.mk, how about to define IPL_TEXT_BASE.
  
  e.g.,
  
  In OneNAND IPL code,
  
  #ifndef BOARD_IPL_TEXT_BASE
  #define ONENAND_IPL_TEXT_BASE BOARD_IPL_TEXT_BASE
  #endif
  
  That won't help -- TEXT_BASE is used while compiling start.S (to setup
  stack under TEXT_BASE) and the config.mk prepares the gcc options for
  start.S (the TEXT_BASE is defined in the gcc options).So modifying
  config.mk is unavoidable I fear.
 
 Sorry my mistake. It's already supported at current drivers. Now I
 works on s5pc100 and s5pc110 and each define it's TEXT_BASE at
 onenand_ipl/board/samsung/${board_name}/config.mk. and it's used at
 start.S
 
I noticed the config.mk in onenand-ipl/board/... were meant to be used, but in 
my case, those were not used. Instead, the board/... config.mk was used (and 
from what I saw in config.mk, that's understandable).

Also, see the Makefile in onenand-ipl/board/apollon/Makefile -- onenand-
ipl/board/apollon/config.mk defines the TEXT_BASE in Makefile, but right before 
that it includes the system-wide config.mk, which configures the compiler 
options and amongst those is -DTEXT_BASE and that one is set to one defined in 
board/apollon/config.mk . Obviously when compiling start.S, that one is used.

Cheers

 No need to modify config.mk and Makefile. If you need I can't send a
 sample files to you.
 
 Thank you,
 Kyungmin Park
 
  The thing we can do is define STACK_TOP_BASE and that'd certainly do the
  trick! This would allow me to point stack into SRAM, while running the
  IPL code from BootRAM. Of course, in case STACK_TOP_BASE wasn't defined,
  it'd fall back to the old code in start.S. This would of course work
  without modifying config.mk and I start to like such a solution.
  
  Hm?
  
  load IPL code ONENAND_IPL_TEXT_BASE instead of current code.
  
  Thank you,
  Kyungmin Park
  
  Thanks!
  
  On Sat, May 1, 2010 at 11:48 AM, Marek Vasut marek.va...@gmail.com wrote:
   Hey,
   
   I've been tinkering with OneNAND IPL in uboot. I found out it wan't to
   load itself to the address specified in board/$(BOARDDIR)/config.mk .
   That's fine in most cases, but in my case that wasn't possible.
   
   In my case, SDRAM init didn't fit into the IPL, so I had to copy
   U-Boot into SRAM, then execute it and let it relocate itself into
   SDRAM. One more time: IPL: OneNAND-SRAM
   U-Boot: SRAM-SDRAM
   
   It all works fine, but when compiling the IPL, I had to alter
   TEXT_BASE not to point into SDRAM but SRAM too (because of stack). I
   introduced a variable called IPL which allows using config.mk from
   (for example) onenand-
   ipl/board/$(BOARDDIR)/config.mk rather than the
   board/$(BOARDDIR)/config.mk one, which is in my opinion a correct
   behaviour.
   
   Any opinions?
   
   Thanks in advance.
   
   diff --git a/config.mk b/config.mk
   index 73b5195..8639580 100644
   --- a/config.mk
   +++ b/config.mk
   @@ -130,9 +130,13 @@ BOARDDIR = $(VENDOR)/$(BOARD)
else
BOARDDIR = $(BOARD)
endif
   +ifdef  IPL
   +sinclude $(TOPDIR)/$(IPL)/board/$(BOARDDIR)/config.mk  # include IPL
   specific rules
   +else
ifdef  BOARD
sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board
   specific rules endif
   +endif
   
#
   ### #
   
   ___
   U-Boot mailing list
   U-Boot@lists.denx.de
   http://lists.denx.de/mailman/listinfo/u-boot
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] From Eurocredit

2010-05-02 Thread Euroclear Credit
Beneficiary
Ac# 9789568425
 
Euro clear credit received a Dtc Screen Credit of $167,500 enrouted to your 
Bank from a Fortis Bank.
The transmission department of Euro clear Credit need a final clarification 
from you on the transaction details with transworld stores where the Dtc Screen 
credit was initiated from Fortis Bank.
Upon hearing from you the $167,500 will be transmitted to your A/c #.
 
Sorry for the slight delay as to confirm the payment in your Account .
 
Simeon Watterson
Euroclear Credit.
eurocleartransmiss...@credit4u.com

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


[U-Boot] Irish 2010 Grant Winner

2010-05-02 Thread info
This is to inform you that you have been selected for a cash prize of 
£1,000,000 (British Pounds) held on the 25th
of April.

CLAIM FORM
Names:_
Tele:_
Age:_
Address:___
occupation:___
country:___
next of kin:
Email:redeemprize2...@live.co.uk

Agent Name: Mr.Mark Foster
Tel:+44 704-571-0545
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [OT] - Solved : Memory Mapped CF Card (IDE) and Linux

2010-05-02 Thread Graeme Russ
Hi,

I found how to access my Direct-Mapped CF Card (thanks to Alan Cox) and I
think the solution to this particular case may be of some help to others
here...

Linux 2.6 provides a primitive 'PATA Platform' driver (primitive in that
it is a very low-level driver, not primitive in its code maturity). This
driver only supports 16-bit access to the PATA device. My hardware has
only 8 data bits of the CF card wired up. The solution is to tweak the
PATA Platform data_xfer() funcitons slightly to replace the 16-bit I/O
functions with 8-bit I/O functions.

More information can be found at (linux-ide archive):

http://www.spinics.net/lists/linux-ide/msg37519.html

Regards,

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


Re: [U-Boot] [PATCH v5 2/3] ARM1176: TI: TNETV107X soc initial support

2010-05-02 Thread Cyril Chemparathy
Hi Tom,

Thanks for the excellent review.

[...]
 +static struct async_emif_config default_async_emif_config[NUM_CS] = {
 + {   /* CS0 */
 + .mode   = ASYNC_EMIF_MODE_NAND,
 + .select_strobe  = ASYNC_EMIF_CS0_SELECT_STROBE,
 + .extend_wait= ASYNC_EMIF_CS0_EXTEND_WAIT,
 + .wr_setup   = ASYNC_EMIF_CS0_WR_SETUP,
 + .wr_strobe  = ASYNC_EMIF_CS0_WR_STROBE,
 + .wr_hold= ASYNC_EMIF_CS0_WR_HOLD,
 + .rd_setup   = ASYNC_EMIF_CS0_RD_SETUP,
 + .rd_strobe  = ASYNC_EMIF_CS0_RD_STROBE,
 + .rd_hold= ASYNC_EMIF_CS0_RD_HOLD,
 + .turn_around= ASYNC_EMIF_CS0_TURN_AROUND,
 + .width  = ASYNC_EMIF_CS0_WIDTH,
 + },
[...]

 A better place for all the preceding code would be in an arch *.h
 The NUM_CS should likely be a CONFIG_ paramter.

I have moved this over to board code instead, since the board should
determine these based on the connected device's timings.

[...]
 +static const struct pll_init_data plls[] = {
 + [SYS_PLL] = {
 + .config_enable  = CONFIG_PLL_SYS_CONFIG,
 + .pll= SYS_PLL,
 + .internal_osc   = CONFIG_PLL_SYS_INT_OSC,
 + .external_freq  = CONFIG_PLL_SYS_EXT_FREQ,
 +#if (CONFIG_PLL_SYS_CONFIG)
 + .pll_freq   = CONFIG_PLL_SYS_PLL_FREQ,
 + .div_freq = {
 + CONFIG_PLL_SYS_ARM1176_CLK,
 + CONFIG_PLL_SYS_DSP_CLK,
 + CONFIG_PLL_SYS_DDR_CLK,
 + CONFIG_PLL_SYS_FULL_CLK,
 + CONFIG_PLL_SYS_LCD_CLK,
 + CONFIG_PLL_SYS_VLYNQ_REF_CLK,
 + CONFIG_PLL_SYS_TSC_CLK,
 + CONFIG_PLL_SYS_HALF_CLK,
 + },
 +#endif
 + },
[...]

 Similar to above, the preceeding code is better placed in an arch *.h
 Please move.

Again, moved these initializations to board code instead.  Some boards
may opt to run at different rates.

[...]
 +static const struct pin_config pin_table[] = {
 + TNETV107X_MUX_CFG(0, 0, MUX_MODE_1),
 + TNETV107X_MUX_CFG(0, 0, MUX_MODE_2),
 
 Change these immedates '0, 0' into #defines
 Apply globally

These are register indices and bit shifts, not really amenable to macro
definition.  I have put in a comment for the column contents.

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


Re: [U-Boot] [PATCH v2 01/17] u-boot.img file not created when srctree and objtree are different

2010-05-02 Thread Tom Rix
Vipin KUMAR wrote:
 Adding ($obj) before tools/mkimage for u-boot.img file creation
 

This is fine.
Change follows similar targets in the Makefile
Ack-ed
Tom

 Signed-off-by: Vipin Kumar vipin.ku...@st.com
 ---
  Makefile |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/Makefile b/Makefile
 index 34f10ce..7bfdfd3 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -313,7 +313,7 @@ $(obj)u-boot.ldr.srec:$(obj)u-boot.ldr
   $(OBJCOPY) ${OBJCFLAGS} -O srec $ $@ -I binary
  
  $(obj)u-boot.img:$(obj)u-boot.bin
 - ./tools/mkimage -A $(ARCH) -T firmware -C none \
 + $(obj)tools/mkimage -A $(ARCH) -T firmware -C none \
   -a $(TEXT_BASE) -e 0 \
   -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \
   sed -e 's/[ ]*$$/ for $(BOARD) board/') \

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


Re: [U-Boot] [PATCH v2 02/17] change_bit routine defined

2010-05-02 Thread Tom Rix
Vipin KUMAR wrote:
 change_bit routine is left implementation dependent until now.
 This routine is now defined for arm platforms in asm-arm/bitops.h
 

Add a reason on why this change is needed.
Something like
'mtd/nand/.. needs this to be defined..
  and the new nand driver needs it.. '

Tom


 Signed-off-by: Vipin Kumar vipin.ku...@st.com
 ---
  arch/arm/include/asm/bitops.h |   11 +--
  1 files changed, 9 insertions(+), 2 deletions(-)
 
 diff --git a/arch/arm/include/asm/bitops.h b/arch/arm/include/asm/bitops.h
 index 270f163..435857b 100644
 --- a/arch/arm/include/asm/bitops.h
 +++ b/arch/arm/include/asm/bitops.h
 @@ -29,8 +29,6 @@ extern void set_bit(int nr, volatile void * addr);
  
  extern void clear_bit(int nr, volatile void * addr);
  
 -extern void change_bit(int nr, volatile void * addr);
 -
  static inline void __change_bit(int nr, volatile void *addr)
  {
   unsigned long mask = BIT_MASK(nr);
 @@ -39,6 +37,15 @@ static inline void __change_bit(int nr, volatile void 
 *addr)
   *p ^= mask;
  }
  
 +static inline void change_bit(int nr, volatile void *addr)
 +{
 + unsigned long flags;
 +
 + local_irq_save(flags);
 + __change_bit(nr, addr);
 + local_irq_restore(flags);
 +}
 +
  static inline int __test_and_set_bit(int nr, volatile void *addr)
  {
   unsigned long mask = BIT_MASK(nr);

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


Re: [U-Boot] [PATCH v2 05/17] SPEAr : Reducing the max RAM size to 128MB

2010-05-02 Thread Tom Rix
Vipin KUMAR wrote:
 Signed-off-by: Vipin Kumar vipin.ku...@st.com
 ---
  include/configs/spear-common.h |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h
 index cc52e39..b526558 100644
 --- a/include/configs/spear-common.h
 +++ b/include/configs/spear-common.h
 @@ -208,6 +208,6 @@
  /* Physical Memory Map */
  #define CONFIG_NR_DRAM_BANKS 1
  #define PHYS_SDRAM_1 0x
 -#define PHYS_SDRAM_1_MAXSIZE 0x4000
 +#define PHYS_SDRAM_1_MAXSIZE 0x0800

I verified that spear3xx and spear6xx only have 128GB
Add a more descriptive long commit explaining why the change is necessary.

Tom

  
  #endif

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


Re: [U-Boot] [PATCH v2 06/17] SPEAr : Basic arch related support added for SPEAr SoCs

2010-05-02 Thread Tom Rix
Vipin KUMAR wrote:
 Adding CONFIG_DISPLAY_CPUINFO and CONFIG_ARCH_CPU_INIT support for SPEAr3xx 
 and
 SPEAr6xx SoCs

Add more complete description of these CONFIG_* variables in the commit log

 
 Signed-off-by: Vipin Kumar vipin.ku...@st.com
 ---
  arch/arm/cpu/arm926ejs/spear/Makefile  |3 +-
  arch/arm/cpu/arm926ejs/spear/cpu.c |   76 
 
  arch/arm/include/asm/arch-spear/spr_misc.h |5 ++
  include/configs/spear-common.h |3 +-
  4 files changed, 85 insertions(+), 2 deletions(-)
  create mode 100644 arch/arm/cpu/arm926ejs/spear/cpu.c
 
 diff --git a/arch/arm/cpu/arm926ejs/spear/Makefile 
 b/arch/arm/cpu/arm926ejs/spear/Makefile
 index bf8dfa8..2814526 100644
 --- a/arch/arm/cpu/arm926ejs/spear/Makefile
 +++ b/arch/arm/cpu/arm926ejs/spear/Makefile
 @@ -26,7 +26,8 @@ include $(TOPDIR)/config.mk
  LIB  = $(obj)lib$(SOC).a
  
  COBJS:= reset.o \
 -timer.o
 +timer.o \
 +cpu.o

Order the objects is alphabetical.
Move cpu.o to first position

  SOBJS:=
  
  SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 diff --git a/arch/arm/cpu/arm926ejs/spear/cpu.c 
 b/arch/arm/cpu/arm926ejs/spear/cpu.c
 new file mode 100644
 index 000..e935fec
 --- /dev/null
 +++ b/arch/arm/cpu/arm926ejs/spear/cpu.c
 @@ -0,0 +1,76 @@
 +/*
 + * (C) Copyright 2009
 + * Vipin Kumar, ST Micoelectronics, vipin.ku...@st.com.
 + *
 + * See file CREDITS for list of people who contributed to this
 + * project.
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License as
 + * published by the Free Software Foundation; either version 2 of
 + * the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 + * MA 02111-1307 USA
 + */
 +
 +#include common.h
 +#include asm/io.h
 +#include asm/arch/hardware.h
 +#include asm/arch/spr_misc.h
 +
 +#ifdef CONFIG_ARCH_CPU_INIT
 +int arch_cpu_init(void)
 +{
 + struct misc_regs *const misc_p =
 + (struct misc_regs *)CONFIG_SPEAR_MISCBASE;
 + u32 periph1_clken;
 +
 + periph1_clken = readl(misc_p-periph1_clken);
 +
 +#if defined(CONFIG_PL011_SERIAL)
 + periph1_clken |= MISC_UART0ENB;
 +#endif
 +#if defined(CONFIG_DW_ETH)
 + periph1_clken |= MISC_ETHENB;

This config is not defined.
This is dead code
Remove

or maybe this should be

CONFIG_DESIGNWARE_ETH

 +#endif
 +#if defined(CONFIG_DW_UDC)
 + periph1_clken |= MISC_USBDENB;
 +#endif
 +#if defined(CONFIG_DW_I2C)
 + periph1_clken |= MISC_I2CENB;
 +#endif
 +#if defined(CONFIG_ST_SMI)
 + periph1_clken |= MISC_SMIENB;
 +#endif
 +#if defined(CONFIG_NAND_FSMC)
 + periph1_clken |= MISC_FSMCENB;
 +#endif
 +
 + writel(periph1_clken, misc_p-periph1_clken);
 + return 0;
 +}
 +#endif
 +
 +#ifdef CONFIG_DISPLAY_CPUINFO
 +int print_cpuinfo(void)
 +{
 +#ifdef CONFIG_SPEAR300
 + printf(CPU:   SPEAr300\n);
 +#elif defined(CONFIG_SPEAR310)
 + printf(CPU:   SPEAr310\n);
 +#elif defined(CONFIG_SPEAR320)
 + printf(CPU:   SPEAr320\n);
 +#elif defined(CONFIG_SPEAR600)
 + printf(CPU:   SPEAr600\n);

Add an
#else
#error Unknown cpu .. 
To future proof this logic.

 +#endif
 + return 0;
 +}
 +#endif
 diff --git a/arch/arm/include/asm/arch-spear/spr_misc.h 
 b/arch/arm/include/asm/arch-spear/spr_misc.h
 index 8b96d9b..045d2bb 100644
 --- a/arch/arm/include/asm/arch-spear/spr_misc.h
 +++ b/arch/arm/include/asm/arch-spear/spr_misc.h
 @@ -126,5 +126,10 @@ struct misc_regs {
  
  /* PERIPH1_CLKEN, PERIPH1_RST value */
  #define MISC_USBDENB 0x0100
 +#define MISC_ETHENB  0x0080
 +#define MISC_SMIENB  0x0020
 +#define MISC_FSMCENB 0x0200
 +#define MISC_I2CENB  0x0080
 +#define MISC_UART0ENB0x0008
  
  #endif
 diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h
 index b526558..68ba293 100644
 --- a/include/configs/spear-common.h
 +++ b/include/configs/spear-common.h
 @@ -47,7 +47,6 @@
  
  /* Timer, HZ specific defines */
  #define CONFIG_SYS_HZ(1000)
 -#define CONFIG_SYS_HZ_CLOCK  (830)

Why is CONFIG_SYS_HZ_CLOCK being removed ?
This should likely be its own patch.

Tom

  
  /* Flash configuration */
  #if defined(CONFIG_FLASH_PNOR)
 @@ -168,6 +167,8 @@
  #define CONFIG_ENV_SIZE  0x02000
  
  /* Miscellaneous configurable options */
 +#define CONFIG_ARCH_CPU_INIT 1

Re: [U-Boot] [PATCH v2 07/17] SPEAr : Network driver support added

2010-05-02 Thread Tom Rix
Vipin KUMAR wrote:
 Designware network driver support added.
 This is a Synopsys ethernet controller
 
 Signed-off-by: Vipin Kumar vipin.ku...@st.com
 ---
  drivers/net/Makefile |1 +
  drivers/net/designware.c |  537 
 ++
  drivers/net/designware.h |  264 +++
  include/netdev.h |1 +
  4 files changed, 803 insertions(+), 0 deletions(-)
  create mode 100644 drivers/net/designware.c
  create mode 100644 drivers/net/designware.h
 
 diff --git a/drivers/net/Makefile b/drivers/net/Makefile
 index 1ec0ba1..82df908 100644
 --- a/drivers/net/Makefile
 +++ b/drivers/net/Makefile
 @@ -33,6 +33,7 @@ COBJS-$(CONFIG_BCM570x) += bcm570x.o bcm570x_autoneg.o 
 5701rls.o
  COBJS-$(CONFIG_BFIN_MAC) += bfin_mac.o
  COBJS-$(CONFIG_CS8900) += cs8900.o
  COBJS-$(CONFIG_TULIP) += dc2114x.o
 +COBJS-$(CONFIG_DESIGNWARE_ETH) += designware.o
  COBJS-$(CONFIG_DRIVER_DM9000) += dm9000x.o
  COBJS-$(CONFIG_DNET) += dnet.o
  COBJS-$(CONFIG_E1000) += e1000.o
 diff --git a/drivers/net/designware.c b/drivers/net/designware.c
 new file mode 100644
 index 000..9361f77
 --- /dev/null
 +++ b/drivers/net/designware.c
 @@ -0,0 +1,537 @@
 +/*
 + * (C) Copyright 2009
 + * Vipin Kumar, ST Micoelectronics, vipin.ku...@st.com.
 + *
 + * (C) Copyright 2008
 + * Deepak Sikri, ST Micoelectronics, deepak.si...@st.com.
 + *
 + * See file CREDITS for list of people who contributed to this
 + * project.
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License as
 + * published by the Free Software Foundation; either version 2 of
 + * the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 + * MA 02111-1307 USA
 + */
 +
 +/*
 + * Designware ethernet IP driver for u-boot
 + */
 +
 +#include common.h
 +#include miiphy.h
 +#include malloc.h
 +#include linux/err.h
 +#include asm/io.h
 +#include designware.h
 +
 +static void tx_descs_init(struct eth_device *dev)
 +{
 + struct dw_eth_dev *priv = dev-priv;
 + struct eth_dma_regs *dma_p = priv-dma_regs_p;
 + struct dmamacdescr *desc_table_p = priv-tx_mac_descrtable[0];
 + char *txbuffs = priv-txbuffs[0];
 + struct dmamacdescr *desc_p;
 + u32 idx;
 +
 + for (idx = 0; idx  CONFIG_TX_DESCR_NUM; idx++) {
 + desc_p = desc_table_p[idx];
 + desc_p-dmamac_addr = txbuffs[idx * CONFIG_ETH_BUFSIZE];
 + desc_p-dmamac_next = desc_table_p[idx + 1];
 +
 +#if defined(CONFIG_DW_ALTDESCRIPTOR)

Add a comment describing CONFIG_DW_ALTDESCRIPTOR
The README.spear would be an excellent place to put this
and the other new CONFIG_ *

Update the README.spear to be current with the
new spear1300 target and the other new information
you want to share.

 + desc_p-txrx_status = ~(DESC_TXSTS_TXINT | DESC_TXSTS_TXLAST |
 + DESC_TXSTS_TXFIRST | DESC_TXSTS_TXCRCDIS | \
 + DESC_TXSTS_TXCHECKINSCTRL | \
 + DESC_TXSTS_TXRINGEND | DESC_TXSTS_TXPADDIS);
 +
 + desc_p-txrx_status |= DESC_TXSTS_TXCHAIN;
 + desc_p-dmamac_cntl = 0;
 + desc_p-txrx_status = ~(DESC_TXSTS_MSK | DESC_TXSTS_OWNBYDMA);
 +#else
 + desc_p-dmamac_cntl = DESC_TXCTRL_TXCHAIN;
 + desc_p-txrx_status = 0;
 +#endif
 + }
 +
 + /* Correcting the last pointer of the chain */
 + desc_p-dmamac_next = desc_table_p[0];
 +
 + writel((ulong)desc_table_p[0], dma_p-txdesclistaddr);
 +}
 +
 +static void rx_descs_init(struct eth_device *dev)
 +{
 + struct dw_eth_dev *priv = dev-priv;
 + struct eth_dma_regs *dma_p = priv-dma_regs_p;
 + struct dmamacdescr *desc_table_p = priv-rx_mac_descrtable[0];
 + char *rxbuffs = priv-rxbuffs[0];
 + struct dmamacdescr *desc_p;
 + u32 idx;
 +
 + for (idx = 0; idx  CONFIG_RX_DESCR_NUM; idx++) {
 + desc_p = desc_table_p[idx];
 + desc_p-dmamac_addr = rxbuffs[idx * CONFIG_ETH_BUFSIZE];
 + desc_p-dmamac_next = desc_table_p[idx + 1];
 +
 + desc_p-dmamac_cntl =
 + (MAC_MAX_FRAME_SZ  DESC_RXCTRL_SIZE1MASK) | \
 +   DESC_RXCTRL_RXCHAIN;
 +
 + desc_p-txrx_status = DESC_RXSTS_OWNBYDMA;
 + }
 +
 + /* Correcting the last pointer of the chain */
 + desc_p-dmamac_next = desc_table_p[0];
 +
 + writel((ulong)desc_table_p[0], dma_p-rxdesclistaddr);
 +}
 +
 +static void descs_init(struct 

Re: [U-Boot] [PATCH v2 08/17] SPEAr : Network support configured for spear SoCs

2010-05-02 Thread Tom Rix
Vipin KUMAR wrote:
 Signed-off-by: Vipin Kumar vipin.ku...@st.com
 ---
  arch/arm/include/asm/arch-spear/hardware.h |1 +
  board/spear/spear300/spear300.c|6 ++
  board/spear/spear310/spear310.c|6 ++
  board/spear/spear320/spear320.c|6 ++
  board/spear/spear600/spear600.c|6 ++
  include/configs/spear-common.h |   10 --
  include/configs/spear3xx.h |3 +++
  7 files changed, 36 insertions(+), 2 deletions(-)
 
 diff --git a/arch/arm/include/asm/arch-spear/hardware.h 
 b/arch/arm/include/asm/arch-spear/hardware.h
 index 818f36c..39d64b6 100644
 --- a/arch/arm/include/asm/arch-spear/hardware.h
 +++ b/arch/arm/include/asm/arch-spear/hardware.h
 @@ -31,6 +31,7 @@
  #define CONFIG_SPEAR_SYSCNTLBASE (0xFCA0)
  #define CONFIG_SPEAR_TIMERBASE   (0xFC80)
  #define CONFIG_SPEAR_MISCBASE(0xFCA8)
 +#define CONFIG_SPEAR_ETHBASE (0xE080)
  
  #define CONFIG_SYS_NAND_CLE  (1  16)
  #define CONFIG_SYS_NAND_ALE  (1  17)
 diff --git a/board/spear/spear300/spear300.c b/board/spear/spear300/spear300.c
 index 60ee544..cd24247 100644
 --- a/board/spear/spear300/spear300.c
 +++ b/board/spear/spear300/spear300.c
 @@ -22,6 +22,7 @@
   */
  
  #include common.h
 +#include netdev.h
  #include nand.h
  #include asm/io.h
  #include asm/arch/hardware.h
 @@ -56,3 +57,8 @@ int board_nand_init(struct nand_chip *nand)
  
   return -1;
  }
 +
 +int board_eth_init(bd_t *bis)
 +{
 + return designware_initialize(0, CONFIG_SPEAR_ETHBASE);
 +}

The function can be conditionally compiled in based on
CONFIG_DESIGNWARE_ETH

board_eth_init may be able to go in the spear/common

Tom

 diff --git a/board/spear/spear310/spear310.c b/board/spear/spear310/spear310.c
 index 03dfe16..e8a6552 100644
 --- a/board/spear/spear310/spear310.c
 +++ b/board/spear/spear310/spear310.c
 @@ -23,6 +23,7 @@
   */
  
  #include common.h
 +#include netdev.h
  #include nand.h
  #include asm/io.h
  #include asm/arch/hardware.h
 @@ -57,3 +58,8 @@ int board_nand_init(struct nand_chip *nand)
  
   return -1;
  }
 +
 +int board_eth_init(bd_t *bis)
 +{
 + return dw_mii_initialize(0, CONFIG_SPEAR_ETHBASE);
 +}
 diff --git a/board/spear/spear320/spear320.c b/board/spear/spear320/spear320.c
 index 2ba2dbb..72bc9a5 100644
 --- a/board/spear/spear320/spear320.c
 +++ b/board/spear/spear320/spear320.c
 @@ -23,6 +23,7 @@
   */
  
  #include common.h
 +#include netdev.h
  #include nand.h
  #include asm/io.h
  #include asm/arch/hardware.h
 @@ -57,3 +58,8 @@ int board_nand_init(struct nand_chip *nand)
  
   return -1;
  }
 +
 +int board_eth_init(bd_t *bis)
 +{
 + return dw_mii_initialize(0, CONFIG_SPEAR_ETHBASE);
 +}
 diff --git a/board/spear/spear600/spear600.c b/board/spear/spear600/spear600.c
 index eef9a37..6d921bd 100644
 --- a/board/spear/spear600/spear600.c
 +++ b/board/spear/spear600/spear600.c
 @@ -22,6 +22,7 @@
   */
  
  #include common.h
 +#include netdev.h
  #include nand.h
  #include asm/io.h
  #include asm/arch/hardware.h
 @@ -51,3 +52,8 @@ int board_nand_init(struct nand_chip *nand)
  
   return -1;
  }
 +
 +int board_eth_init(bd_t *bis)
 +{
 + return designware_initialize(0, CONFIG_SPEAR_ETHBASE);
 +}
 diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h
 index 68ba293..ecb1fd1 100644
 --- a/include/configs/spear-common.h
 +++ b/include/configs/spear-common.h
 @@ -27,6 +27,11 @@
   * Common configurations used for both spear3xx as well as spear6xx
   */
  
 +/* Ethernet driver configuration */
 +#define CONFIG_DESIGNWARE_ETH
 +#define CONFIG_NET_MULTI
 +#define CONFIG_PHY_RESET_DELAY   (1) /* in 
 usec */
 +
  /* USBD driver configuration */
  #define CONFIG_SPEARUDC
  #define CONFIG_USB_DEVICE
 @@ -98,11 +103,12 @@
  #define CONFIG_CMD_MEMORY
  #define CONFIG_CMD_RUN
  #define CONFIG_CMD_SAVES
 +#define CONFIG_CMD_NET
 +#define CONFIG_CMD_PING
 +#define CONFIG_CMD_DHCP
  
  /* This must be included AFTER the definition of CONFIG_COMMANDS (if any) */
  #include config_cmd_default.h
 -#undef CONFIG_CMD_NET
 -#undef CONFIG_CMD_NFS
  
  /*
   * Default Environment Varible definitions
 diff --git a/include/configs/spear3xx.h b/include/configs/spear3xx.h
 index 0248aba..502c50f 100644
 --- a/include/configs/spear3xx.h
 +++ b/include/configs/spear3xx.h
 @@ -41,6 +41,9 @@
  
  #include configs/spear-common.h
  
 +/* Ethernet driver configuration */
 +#define CONFIG_DW_ALTDESCRIPTOR  1
 +
  /* Serial Configuration (PL011) */
  #define CONFIG_SYS_SERIAL0   0xD000
  

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


Re: [U-Boot] [PATCH v2 09/17] SPEAr : macb driver support added for spear310 and spear320

2010-05-02 Thread Tom Rix
Vipin KUMAR wrote:

Add more detail in the commit to the what this change is and why it is needed.

 Signed-off-by: Vipin Kumar vipin.ku...@st.com
 ---
  arch/arm/include/asm/arch-spear/clk.h  |   27 +++
  arch/arm/include/asm/arch-spear/hardware.h |7 +++
  board/spear/spear310/spear310.c|9 -
  board/spear/spear320/spear320.c|6 +-
  include/configs/spear3xx.h |   13 +
  5 files changed, 60 insertions(+), 2 deletions(-)
  create mode 100644 arch/arm/include/asm/arch-spear/clk.h
 
 diff --git a/arch/arm/include/asm/arch-spear/clk.h 
 b/arch/arm/include/asm/arch-spear/clk.h
 new file mode 100644
 index 000..343c6ce
 --- /dev/null
 +++ b/arch/arm/include/asm/arch-spear/clk.h
 @@ -0,0 +1,27 @@
 +/*
 + * (C) Copyright 2009

2009 ?
Maybe this should be 2010?
Check globally.

 + * Vipin Kumar, STMicroelectronics, vipin.ku...@st.com
 + *
 + * See file CREDITS for list of people who contributed to this
 + * project.
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License as
 + * published by the Free Software Foundation; either version 2 of
 + * the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 + * MA 02111-1307 USA
 + */
 +
 +static inline unsigned long get_macb_pclk_rate(unsigned int dev_id)
 +{
 + return 8300;
 +}
 diff --git a/arch/arm/include/asm/arch-spear/hardware.h 
 b/arch/arm/include/asm/arch-spear/hardware.h
 index 39d64b6..9f1e154 100644
 --- a/arch/arm/include/asm/arch-spear/hardware.h
 +++ b/arch/arm/include/asm/arch-spear/hardware.h
 @@ -56,6 +56,11 @@
  #define CONFIG_SPEAR_EMIBASE (0x4F00)
  #define CONFIG_SPEAR_RASBASE (0xB400)
  
 +#define CONFIG_SYS_MACB0_BASE(0xB000)
 +#define CONFIG_SYS_MACB1_BASE(0xB080)
 +#define CONFIG_SYS_MACB2_BASE(0xB100)
 +#define CONFIG_SYS_MACB3_BASE(0xB180)
 +
  #elif defined(CONFIG_SPEAR320)
  #define CONFIG_SYS_I2C_BASE  (0xD018)
  #define CONFIG_SPEAR_FSMCBASE(0x4C00)
 @@ -63,5 +68,7 @@
  #define CONFIG_SPEAR_EMIBASE (0x4000)
  #define CONFIG_SPEAR_RASBASE (0xB300)
  
 +#define CONFIG_SYS_MACB0_BASE(0xAA00)
 +
  #endif
  #endif /* _ASM_ARCH_HARDWARE_H */
 diff --git a/board/spear/spear310/spear310.c b/board/spear/spear310/spear310.c
 index e8a6552..1207709 100644
 --- a/board/spear/spear310/spear310.c
 +++ b/board/spear/spear310/spear310.c
 @@ -61,5 +61,12 @@ int board_nand_init(struct nand_chip *nand)
  
  int board_eth_init(bd_t *bis)
  {
 - return dw_mii_initialize(0, CONFIG_SPEAR_ETHBASE);
 + dw_mii_initialize(0, CONFIG_SPEAR_ETHBASE);

Previously, status of dw_mii_initialize was forward up to caller.
Now it is ignored.
Add a check if it passes fails.
Foward check status to caller

 +
 + macb_eth_initialize(0, (void *)CONFIG_SYS_MACB0_BASE, CONFIG_MACB0_PHY);
 + macb_eth_initialize(1, (void *)CONFIG_SYS_MACB1_BASE, CONFIG_MACB1_PHY);
 + macb_eth_initialize(2, (void *)CONFIG_SYS_MACB2_BASE, CONFIG_MACB2_PHY);
 + macb_eth_initialize(3, (void *)CONFIG_SYS_MACB3_BASE, CONFIG_MACB3_PHY);
 +
 + return 0;
  }
 diff --git a/board/spear/spear320/spear320.c b/board/spear/spear320/spear320.c
 index 72bc9a5..efc9a99 100644
 --- a/board/spear/spear320/spear320.c
 +++ b/board/spear/spear320/spear320.c
 @@ -61,5 +61,9 @@ int board_nand_init(struct nand_chip *nand)
  
  int board_eth_init(bd_t *bis)
  {
 - return dw_mii_initialize(0, CONFIG_SPEAR_ETHBASE);
 + dw_mii_initialize(0, CONFIG_SPEAR_ETHBASE);
 +
 + macb_eth_initialize(0, (void *)CONFIG_SYS_MACB0_BASE, CONFIG_MACB0_PHY);
 +
 + return 0;
  }
 diff --git a/include/configs/spear3xx.h b/include/configs/spear3xx.h
 index 502c50f..689d914 100644
 --- a/include/configs/spear3xx.h
 +++ b/include/configs/spear3xx.h
 @@ -44,6 +44,19 @@
  /* Ethernet driver configuration */
  #define CONFIG_DW_ALTDESCRIPTOR  1
  
 +#if defined(CONFIG_SPEAR310)
 +#define CONFIG_MACB  1
 +#define CONFIG_MACB0_PHY 0x01
 +#define CONFIG_MACB1_PHY 0x03
 +#define CONFIG_MACB2_PHY 0x05
 +#define CONFIG_MACB3_PHY 0x07
 +
 +#elif defined(CONFIG_SPEAR320)
 +#define CONFIG_MACB  

Re: [U-Boot] [PATCH v2 10/17] SPEAr : FSMC driver support added

2010-05-02 Thread Tom Rix
Vipin KUMAR wrote:
 Flexible static memory controller is an IP which controls the access
 to NAND chips along with many other memory device chips eg NOR, SRAM.
 This is an ST peripheral. This patch adds the driver support for FSMC
 controller interfacing with NAND memory.

IP, ST ?
Add meaning of IP and something to say ST is manufacturer and
not a class of peripherals.

 
 Signed-off-by: Vipin Kumar vipin.ku...@st.com
 ---
  drivers/mtd/nand/Makefile |1 +
  drivers/mtd/nand/fsmc_nand.c  |  365 
 +
  include/linux/mtd/fsmc_nand.h |  104 
  3 files changed, 470 insertions(+), 0 deletions(-)
  create mode 100644 drivers/mtd/nand/fsmc_nand.c
  create mode 100644 include/linux/mtd/fsmc_nand.h
 
 diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
 index 28f27da..4c6b54f 100644
 --- a/drivers/mtd/nand/Makefile
 +++ b/drivers/mtd/nand/Makefile
 @@ -38,6 +38,7 @@ COBJS-$(CONFIG_DRIVER_NAND_BFIN) += bfin_nand.o
  COBJS-$(CONFIG_NAND_DAVINCI) += davinci_nand.o
  COBJS-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o
  COBJS-$(CONFIG_NAND_FSL_UPM) += fsl_upm.o
 +COBJS-$(CONFIG_NAND_FSMC) += fsmc_nand.o
  COBJS-$(CONFIG_NAND_KB9202) += kb9202_nand.o
  COBJS-$(CONFIG_NAND_KIRKWOOD) += kirkwood_nand.o
  COBJS-$(CONFIG_NAND_KMETER1) += kmeter1_nand.o
 diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
 new file mode 100644
 index 000..bad5606
 --- /dev/null
 +++ b/drivers/mtd/nand/fsmc_nand.c
 @@ -0,0 +1,365 @@
 +/*
 + * (C) Copyright 2009

2009?

 + * Vipin Kumar, ST Micoelectronics, vipin.ku...@st.com.
 + *
 + * See file CREDITS for list of people who contributed to this
 + * project.
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License as
 + * published by the Free Software Foundation; either version 2 of
 + * the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 + * MA 02111-1307 USA
 + */
 +
 +#include common.h
 +#include nand.h
 +#include asm/io.h
 +#include linux/bitops.h
 +#include linux/err.h
 +#include linux/mtd/nand_ecc.h
 +#include linux/mtd/fsmc_nand.h
 +#include asm/arch/hardware.h
 +
 +static u32 fsmc_version;
 +static struct fsmc_regs *const fsmc_regs_p =
 +(struct fsmc_regs *)CONFIG_SYS_FSMC_BASE;
 +

CONFIG_SYS_FSMC_BASE is not defined until 11/17
This make this change non-bisectable.
Fix.

 +/*
 + * ECC4 and ECC1 have 13 bytes and 3 bytes of ecc respectively for 512 bytes 
 of
 + * data. ECC4 can correct upto 8 bits in 512 bytes of data while ECC1 can

'upto' - 'up to'

 + * correct 1 bit in 512 bytes
 + */
 +
 +#if defined(CONFIG_SYS_FSMC_NAND_LP)
 +static struct nand_ecclayout fsmc_ecc4_layout = {
 + .eccbytes = 104,
 + .eccpos = {  2,   3,   4,   5,   6,   7,   8,
 + 9,  10,  11,  12,  13,  14,
 + 18,  19,  20,  21,  22,  23,  24,
 + 25,  26,  27,  28,  29,  30,
 + 34,  35,  36,  37,  38,  39,  40,
 + 41,  42,  43,  44,  45,  46,
 + 50,  51,  52,  53,  54,  55,  56,
 + 57,  58,  59,  60,  61,  62,
 + 66,  67,  68,  69,  70,  71,  72,
 + 73,  74,  75,  76,  77,  78,
 + 82,  83,  84,  85,  86,  87,  88,
 + 89,  90,  91,  92,  93,  94,
 + 98,  99, 100, 101, 102, 103, 104,
 + 105, 106, 107, 108, 109, 110,
 + 114, 115, 116, 117, 118, 119, 120,
 + 121, 122, 123, 124, 125, 126
 + },
 + .oobfree = {
 + {.offset = 15, .length = 3},
 + {.offset = 31, .length = 3},
 + {.offset = 47, .length = 3},
 + {.offset = 63, .length = 3},
 + {.offset = 79, .length = 3},
 + {.offset = 95, .length = 3},
 + {.offset = 111, .length = 3},
 + {.offset = 127, .length = 1}
 + }
 +};
 +
 +/*
 + * ECC placement definitions in oobfree type format
 + * There are 13 bytes of ecc for every 512 byte block and it has to be read
 + * consicutively and immidiately after the 512 byte data block for hardware 
 to

'consivutively, immidiately' fix spelling

 + * generate the error bit offsets in 512 byte data
 + * Managing the ecc bytes in the following way makes it easier for software 
 to
 + * read ecc bytes consicutive to data bytes. This way is similar to

'consicutive'

 + * oobfree structure maintained already in u-boot nand driver
 + */
 +static struct fsmc_eccplace fsmc_eccpl = {
 + .eccplace = {
 +   

Re: [U-Boot] [PATCH v2 11/17] SPEAr : Configuring FSMC driver for NAND interface

2010-05-02 Thread Tom Rix
Vipin KUMAR wrote:
 Since FSMC is a standard IP and it supports different memory interfaces the 
 FSMC

grammar
'interfaces the' - 'interfaces; the'

 is supported independent of spear platform and spear is configured to use that
 driver for interfacing with the NAND device

Describe that because the common interface is used,
the spear specific files
arch/arm/include/asm/arch-spear/spr_nand.h,
drivers/mtd/nand/spr_nand.c
Have been removed and replaced
with
...

 
 Signed-off-by: Vipin Kumar vipin.ku...@st.com
 ---
  arch/arm/include/asm/arch-spear/hardware.h |8 +-
  arch/arm/include/asm/arch-spear/spr_nand.h |   57 -
  board/spear/spear300/spear300.c|4 +-
  board/spear/spear310/spear310.c|4 +-
  board/spear/spear320/spear320.c|4 +-
  board/spear/spear600/spear600.c|4 +-
  drivers/mtd/nand/Makefile  |1 -
  drivers/mtd/nand/spr_nand.c|  124 
 
  include/configs/spear-common.h |2 +-
  include/configs/spear3xx.h |4 +
  include/configs/spear6xx.h |3 +
  11 files changed, 20 insertions(+), 195 deletions(-)
  delete mode 100644 arch/arm/include/asm/arch-spear/spr_nand.h
  delete mode 100644 drivers/mtd/nand/spr_nand.c
 
 diff --git a/arch/arm/include/asm/arch-spear/hardware.h 
 b/arch/arm/include/asm/arch-spear/hardware.h
 index 9f1e154..52037b6 100644
 --- a/arch/arm/include/asm/arch-spear/hardware.h
 +++ b/arch/arm/include/asm/arch-spear/hardware.h
 @@ -38,15 +38,15 @@
  
  #if defined(CONFIG_SPEAR600)
  #define CONFIG_SYS_I2C_BASE  (0xD020)
 -#define CONFIG_SPEAR_FSMCBASE(0xD180)
 +#define CONFIG_SYS_FSMC_BASE (0xD180)
  
  #elif defined(CONFIG_SPEAR300)
  #define CONFIG_SYS_I2C_BASE  (0xD018)
 -#define CONFIG_SPEAR_FSMCBASE(0x9400)
 +#define CONFIG_SYS_FSMC_BASE (0x9400)
  
  #elif defined(CONFIG_SPEAR310)
  #define CONFIG_SYS_I2C_BASE  (0xD018)
 -#define CONFIG_SPEAR_FSMCBASE(0x4400)
 +#define CONFIG_SYS_FSMC_BASE (0x4400)
  
  #undef CONFIG_SYS_NAND_CLE
  #undef CONFIG_SYS_NAND_ALE
 @@ -63,7 +63,7 @@
  
  #elif defined(CONFIG_SPEAR320)
  #define CONFIG_SYS_I2C_BASE  (0xD018)
 -#define CONFIG_SPEAR_FSMCBASE(0x4C00)
 +#define CONFIG_SYS_FSMC_BASE (0x4C00)
  
  #define CONFIG_SPEAR_EMIBASE (0x4000)
  #define CONFIG_SPEAR_RASBASE (0xB300)
 diff --git a/arch/arm/include/asm/arch-spear/spr_nand.h 
 b/arch/arm/include/asm/arch-spear/spr_nand.h
 deleted file mode 100644
 index 2b63dc7..000
 --- a/arch/arm/include/asm/arch-spear/spr_nand.h
 +++ /dev/null
 @@ -1,57 +0,0 @@
 -/*
 - * (C) Copyright 2009
 - * Vipin Kumar, ST Micoelectronics, vipin.ku...@st.com.
 - *
 - * See file CREDITS for list of people who contributed to this
 - * project.
 - *
 - * This program is free software; you can redistribute it and/or
 - * modify it under the terms of the GNU General Public License as
 - * published by the Free Software Foundation; either version 2 of
 - * the License, or (at your option) any later version.
 - *
 - * This program is distributed in the hope that it will be useful,
 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 - * GNU General Public License for more details.
 - *
 - * You should have received a copy of the GNU General Public License
 - * along with this program; if not, write to the Free Software
 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 - * MA 02111-1307 USA
 - */
 -
 -#ifndef __SPR_NAND_H__
 -#define __SPR_NAND_H__
 -
 -struct fsmc_regs {
 - u32 reserved_1[0x10];
 - u32 genmemctrl_pc;
 - u32 reserved_2;
 - u32 genmemctrl_comm;
 - u32 genmemctrl_attrib;
 - u32 reserved_3;
 - u32 genmemctrl_ecc;
 -};
 -
 -/* genmemctrl_pc register definitions */
 -#define FSMC_RESET   (1  0)
 -#define FSMC_WAITON  (1  1)
 -#define FSMC_ENABLE  (1  2)
 -#define FSMC_DEVTYPE_NAND(1  3)
 -#define FSMC_DEVWID_8(0  4)
 -#define FSMC_DEVWID_16   (1  4)
 -#define FSMC_ECCEN   (1  6)
 -#define FSMC_ECCPLEN_512 (0  7)
 -#define FSMC_ECCPLEN_256 (1  7)
 -#define FSMC_TCLR_1  (1  9)
 -#define FSMC_TAR_1   (1  13)
 -
 -/* genmemctrl_comm register definitions */
 -#define FSMC_TSET_0  (0  0)
 -#define FSMC_TWAIT_6 (6  8)
 -#define FSMC_THOLD_4 (4  16)
 -#define FSMC_THIZ_1  (1  24)
 -
 -extern int spear_nand_init(struct nand_chip *nand);
 -#endif
 diff --git a/board/spear/spear300/spear300.c b/board/spear/spear300/spear300.c
 index cd24247..bb98161 100644
 --- 

Re: [U-Boot] [PATCH v2 12/17] SPEAr : i2c driver moved completely into drivers/i2c

2010-05-02 Thread Tom Rix
Vipin KUMAR wrote:
 The i2c IP used by spear platform is a synopsys i2c controller

'IP' expand.

What is the connection between 'synopsys' and 'designware' ?
If the part is synopsys, that should be the string used
instead of 'dw' or 'designware'


 The earlier driver adds the driver of this controller as if it is specific to
 spear platform.
 The driver files are now moved into drivers/i2c folder for reusability by 
 other

Maybe something like
'The earlier i2c driver was specific to spear platforms.
  This driver has been moved to the common driver directory drivers/i2c
  where it can be used by other platforms'


Tom

 platforms
 
 Signed-off-by: Vipin Kumar vipin.ku...@st.com
 ---
  drivers/i2c/Makefile   |2 +-
  drivers/i2c/{spr_i2c.c = designware_i2c.c}|4 ++--
  .../spr_i2c.h = drivers/i2c/designware_i2c.h  |6 +++---
  include/configs/spear-common.h |2 +-
  4 files changed, 7 insertions(+), 7 deletions(-)
  rename drivers/i2c/{spr_i2c.c = designware_i2c.c} (98%)
  rename arch/arm/include/asm/arch-spear/spr_i2c.h = 
 drivers/i2c/designware_i2c.h (98%)
 
 diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
 index d2c2515..099a6cd 100644
 --- a/drivers/i2c/Makefile
 +++ b/drivers/i2c/Makefile
 @@ -27,6 +27,7 @@ LIB := $(obj)libi2c.a
  
  COBJS-$(CONFIG_BFIN_TWI_I2C) += bfin-twi_i2c.o
  COBJS-$(CONFIG_DRIVER_DAVINCI_I2C) += davinci_i2c.o
 +COBJS-$(CONFIG_DW_I2C) += designware_i2c.o
  COBJS-$(CONFIG_FSL_I2C) += fsl_i2c.o
  COBJS-$(CONFIG_I2C_KIRKWOOD) += kirkwood_i2c.o
  COBJS-$(CONFIG_I2C_MXC) += mxc_i2c.o
 @@ -38,7 +39,6 @@ COBJS-$(CONFIG_PPC4XX_I2C) += ppc4xx_i2c.o
  COBJS-$(CONFIG_DRIVER_S3C24X0_I2C) += s3c24x0_i2c.o
  COBJS-$(CONFIG_S3C44B0_I2C) += s3c44b0_i2c.o
  COBJS-$(CONFIG_SOFT_I2C) += soft_i2c.o
 -COBJS-$(CONFIG_SPEAR_I2C) += spr_i2c.o
  COBJS-$(CONFIG_TSI108_I2C) += tsi108_i2c.o
  
  COBJS:= $(COBJS-y)
 diff --git a/drivers/i2c/spr_i2c.c b/drivers/i2c/designware_i2c.c
 similarity index 98%
 rename from drivers/i2c/spr_i2c.c
 rename to drivers/i2c/designware_i2c.c
 index eabfe84..d352146 100644
 --- a/drivers/i2c/spr_i2c.c
 +++ b/drivers/i2c/designware_i2c.c
 @@ -24,7 +24,7 @@
  #include common.h
  #include asm/io.h
  #include asm/arch/hardware.h
 -#include asm/arch/spr_i2c.h
 +#include designware_i2c.h
  
  static struct i2c_regs *const i2c_regs_p =
  (struct i2c_regs *)CONFIG_SYS_I2C_BASE;
 @@ -113,7 +113,7 @@ int i2c_get_bus_speed(void)
  /*
   * i2c_init - Init function
   * @speed:   required i2c speed
 - * @slaveadd:slave address for the spear device
 + * @slaveadd:slave address for the device
   *
   * Initialization function.
   */
 diff --git a/arch/arm/include/asm/arch-spear/spr_i2c.h 
 b/drivers/i2c/designware_i2c.h
 similarity index 98%
 rename from arch/arm/include/asm/arch-spear/spr_i2c.h
 rename to drivers/i2c/designware_i2c.h
 index 7521ebc..03b520e 100644
 --- a/arch/arm/include/asm/arch-spear/spr_i2c.h
 +++ b/drivers/i2c/designware_i2c.h
 @@ -21,8 +21,8 @@
   * MA 02111-1307 USA
   */
  
 -#ifndef __SPR_I2C_H_
 -#define __SPR_I2C_H_
 +#ifndef __DW_I2C_H_
 +#define __DW_I2C_H_
  
  struct i2c_regs {
   u32 ic_con;
 @@ -143,4 +143,4 @@ struct i2c_regs {
  #define I2C_FAST_SPEED   40
  #define I2C_STANDARD_SPEED   10
  
 -#endif /* __SPR_I2C_H_ */
 +#endif /* __DW_I2C_H_ */
 diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h
 index 3eaa086..e49f267 100644
 --- a/include/configs/spear-common.h
 +++ b/include/configs/spear-common.h
 @@ -44,7 +44,7 @@
  
  /* I2C driver configuration */
  #define CONFIG_HARD_I2C
 -#define CONFIG_SPEAR_I2C
 +#define CONFIG_DW_I2C
  #define CONFIG_SYS_I2C_SPEED 40
  #define CONFIG_SYS_I2C_SLAVE 0x02
  

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


Re: [U-Boot] [PATCH v2 13/17] SPEAr : smi driver moved completely into drivers/mtd

2010-05-02 Thread Tom Rix
Vipin KUMAR wrote:
 The smi IP used by spear platform is a ST serial memory interface controller
 The earlier driver adds the driver of this controller as if it is specific to
 spear platform.
 The driver files are now moved into drivers/mtd folder for reusability by 
 other
 platforms
 

Similar cleanup of 'IP' and 'ST'

Tom


 Signed-off-by: Vipin Kumar vipin.ku...@st.com
 ---
  drivers/mtd/Makefile   |2 +-
  drivers/mtd/{spr_smi.c = st_smi.c}|2 +-
  .../arch-spear/spr_smi.h = drivers/mtd/st_smi.h   |4 ++--
  include/configs/spear-common.h |6 +++---
  4 files changed, 7 insertions(+), 7 deletions(-)
  rename drivers/mtd/{spr_smi.c = st_smi.c} (99%)
  rename arch/arm/include/asm/arch-spear/spr_smi.h = drivers/mtd/st_smi.h 
 (99%)
 
 diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
 index cbf6f15..d868d27 100644
 --- a/drivers/mtd/Makefile
 +++ b/drivers/mtd/Makefile
 @@ -34,7 +34,7 @@ COBJS-$(CONFIG_FLASH_CFI_MTD) += cfi_mtd.o
  COBJS-$(CONFIG_HAS_DATAFLASH) += dataflash.o
  COBJS-$(CONFIG_FLASH_CFI_LEGACY) += jedec_flash.o
  COBJS-$(CONFIG_MW_EEPROM) += mw_eeprom.o
 -COBJS-$(CONFIG_SPEARSMI) += spr_smi.o
 +COBJS-$(CONFIG_ST_SMI) += st_smi.o
  
  COBJS:= $(COBJS-y)
  SRCS := $(COBJS:.o=.c)
 diff --git a/drivers/mtd/spr_smi.c b/drivers/mtd/st_smi.c
 similarity index 99%
 rename from drivers/mtd/spr_smi.c
 rename to drivers/mtd/st_smi.c
 index 189ee6d..80d9fee 100644
 --- a/drivers/mtd/spr_smi.c
 +++ b/drivers/mtd/st_smi.c
 @@ -27,7 +27,7 @@
  
  #include asm/io.h
  #include asm/arch/hardware.h
 -#include asm/arch/spr_smi.h
 +#include st_smi.h
  
  #if !defined(CONFIG_SYS_NO_FLASH)
  
 diff --git a/arch/arm/include/asm/arch-spear/spr_smi.h b/drivers/mtd/st_smi.h
 similarity index 99%
 rename from arch/arm/include/asm/arch-spear/spr_smi.h
 rename to drivers/mtd/st_smi.h
 index e2e5e8f..37ed503 100644
 --- a/arch/arm/include/asm/arch-spear/spr_smi.h
 +++ b/drivers/mtd/st_smi.h
 @@ -21,8 +21,8 @@
   * MA 02111-1307 USA
   */
  
 -#ifndef SPR_SMI_H
 -#define SPR_SMI_H
 +#ifndef ST_SMI_H
 +#define ST_SMI_H
  
  /* 0xF800. . 0xFBFF. 64MBSMI (Serial Flash Mem) */
  /* 0xFC00. . 0xFC1F. 2MB SMI (Serial Flash Reg.) */
 diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h
 index e49f267..99923de 100644
 --- a/include/configs/spear-common.h
 +++ b/include/configs/spear-common.h
 @@ -57,10 +57,10 @@
  #if defined(CONFIG_FLASH_PNOR)
  #define CONFIG_SPEAR_EMI 1
  #else
 -#define CONFIG_SPEARSMI  1
 +#define CONFIG_ST_SMI1
  #endif
  
 -#if defined(CONFIG_SPEARSMI)
 +#if defined(CONFIG_ST_SMI)
  
  #define CONFIG_SYS_MAX_FLASH_BANKS   2
  #define CONFIG_SYS_FLASH_BASE(0xF800)
 @@ -125,7 +125,7 @@
   * U-Boot Environment placing definitions.
   */
  #if defined(CONFIG_ENV_IS_IN_FLASH)
 -#ifdef CONFIG_SPEARSMI
 +#ifdef CONFIG_ST_SMI
  /*
   * Environment is in serial NOR flash
   */

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


Re: [U-Boot] [PATCH v2 14/17] SPEAr : USBD driver support added

2010-05-02 Thread Tom Rix
Vipin KUMAR wrote:
 USBD is a Synopsys IP. The earlier driver implements itself as specific to 
 spear
 SoCs. This patch implements this driver as a reusable driver for other 
 platforms
 as well.

Similar comments about 'IP'
Similar comments about Synopsys vs DW
Expand 'USBD' to be 'the usb device on the spear platforms'
'implements itself' - 'is implementend'
'patch implement' - 'patch moves .. to a common driver'

 
 Signed-off-by: Vipin Kumar vipin.ku...@st.com
 ---
  drivers/serial/usbtty.h|4 +-
  drivers/usb/gadget/Makefile|2 +-
  drivers/usb/gadget/{spr_udc.c = designware_udc.c} |  116 
 +++-
  include/configs/spear-common.h |2 +-
  include/usb/{spr_udc.h = designware_udc.h}|8 +-
  5 files changed, 74 insertions(+), 58 deletions(-)
  rename drivers/usb/gadget/{spr_udc.c = designware_udc.c} (91%)
  rename include/usb/{spr_udc.h = designware_udc.h} (98%)
 
 diff --git a/drivers/serial/usbtty.h b/drivers/serial/usbtty.h
 index a23169a..38b407f 100644
 --- a/drivers/serial/usbtty.h
 +++ b/drivers/serial/usbtty.h
 @@ -33,8 +33,8 @@
  #include usb/musb_udc.h
  #elif defined(CONFIG_PXA27X)
  #include usb/pxa27x_udc.h
 -#elif defined(CONFIG_SPEAR3XX) || defined(CONFIG_SPEAR600)
 -#include usb/spr_udc.h
 +#elif defined(CONFIG_DW_UDC)
 +#include usb/designware_udc.h
  #endif
  
  #include version_autogenerated.h
 diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
 index 1d7362d..3820f36 100644
 --- a/drivers/usb/gadget/Makefile
 +++ b/drivers/usb/gadget/Makefile
 @@ -28,11 +28,11 @@ LIB   := $(obj)libusb_gadget.a
  ifdef CONFIG_USB_DEVICE
  COBJS-y += core.o
  COBJS-y += ep0.o
 +COBJS-$(CONFIG_DW_UDC) += designware_udc.o
  COBJS-$(CONFIG_OMAP1510) += omap1510_udc.o
  COBJS-$(CONFIG_OMAP1610) += omap1510_udc.o
  COBJS-$(CONFIG_MPC885_FAMILY) += mpc8xx_udc.o
  COBJS-$(CONFIG_PXA27X) += pxa27x_udc.o
 -COBJS-$(CONFIG_SPEARUDC) += spr_udc.o
  endif
  
  COBJS:= $(COBJS-y)
 diff --git a/drivers/usb/gadget/spr_udc.c 
 b/drivers/usb/gadget/designware_udc.c
 similarity index 91%
 rename from drivers/usb/gadget/spr_udc.c
 rename to drivers/usb/gadget/designware_udc.c
 index f2b06d6..e550426 100644
 --- a/drivers/usb/gadget/spr_udc.c
 +++ b/drivers/usb/gadget/designware_udc.c
 @@ -29,14 +29,13 @@
  
  #include usbdevice.h
  #include ep0.h
 -#include usb/spr_udc.h
 +#include usb/designware_udc.h
  #include asm/arch/hardware.h
 -#include asm/arch/spr_misc.h
  
  #define UDC_INIT_MDELAY  80  /* Device settle delay */
  
  /* Some kind of debugging output... */
 -#ifndef DEBUG_SPRUSBTTY
 +#ifndef DEBUG_DWUSBTTY
  #define UDCDBG(str)
  #define UDCDBGA(fmt, args...)
  #else
 @@ -251,7 +250,7 @@ static void usbputpcktofifo(int epNum, u8 *bufp, u32 len)
  }
  
  /*
 - * spear_write_noniso_tx_fifo - Write the next packet to TxFIFO.
 + * dw_write_noniso_tx_fifo - Write the next packet to TxFIFO.
   * @endpoint:Endpoint pointer.
   *
   * If the endpoint has an active tx_urb, then the next packet of data from 
 the
 @@ -263,7 +262,7 @@ static void usbputpcktofifo(int epNum, u8 *bufp, u32 len)
   * transmitted in this packet.
   *
   */
 -static void spear_write_noniso_tx_fifo(struct usb_endpoint_instance
 +static void dw_write_noniso_tx_fifo(struct usb_endpoint_instance
  *endpoint)
  {
   struct urb *urb = endpoint-tx_urb;
 @@ -307,7 +306,7 @@ static void spear_write_noniso_tx_fifo(struct 
 usb_endpoint_instance
   * Handle SETUP USB interrupt.
   * This function implements TRM Figure 14-14.
   */
 -static void spear_udc_setup(struct usb_endpoint_instance *endpoint)
 +static void dw_udc_setup(struct usb_endpoint_instance *endpoint)
  {
   u8 *datap = (u8 *)ep0_urb-device_request;
   int ep_addr = endpoint-endpoint_address;
 @@ -344,11 +343,11 @@ static void spear_udc_setup(struct 
 usb_endpoint_instance *endpoint)
   endpoint-tx_urb = ep0_urb;
   endpoint-sent = 0;
   /*
 -  * Write packet data to the FIFO.  spear_write_noniso_tx_fifo
 +  * Write packet data to the FIFO.  dw_write_noniso_tx_fifo
* will update endpoint-last with the number of bytes written
* to the FIFO.
*/
 - spear_write_noniso_tx_fifo(endpoint);
 + dw_write_noniso_tx_fifo(endpoint);
  
   writel(0x0, inep_regs_p[ep_addr].write_done);
   }
 @@ -361,7 +360,7 @@ static void spear_udc_setup(struct usb_endpoint_instance 
 *endpoint)
  /*
   * Handle endpoint 0 RX interrupt
   */
 -static void spear_udc_ep0_rx(struct usb_endpoint_instance *endpoint)
 +static void dw_udc_ep0_rx(struct usb_endpoint_instance *endpoint)
  {
   u8 dummy[64];
  
 @@ -395,7 +394,7 @@ static void spear_udc_ep0_rx(struct usb_endpoint_instance 
 *endpoint)
  /*
   * Handle endpoint 0 TX interrupt
   */
 -static void 

Re: [U-Boot] [PATCH v2 15/17] SPEAr : Basic spear1300 architecture support added

2010-05-02 Thread Tom Rix

Expand the commit log to describe this new part.
Include a URL reference to where it can be reviewed.

Vipin KUMAR wrote:
 Signed-off-by: Vipin Kumar vipin.ku...@st.com
 ---
  arch/arm/cpu/arm_cortexa8/spear13xx/Makefile|   52 
  arch/arm/cpu/arm_cortexa8/spear13xx/cache.S |  112 
  arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c   |   99 +++
  arch/arm/cpu/arm_cortexa8/spear13xx/reset.c |   47 
  arch/arm/cpu/arm_cortexa8/spear13xx/timer.c |  136 ++
  arch/arm/include/asm/arch-spear13xx/hardware.h  |   40 +++
  arch/arm/include/asm/arch-spear13xx/spr_gpt.h   |   85 ++
  arch/arm/include/asm/arch-spear13xx/spr_misc.h  |  317 
 +++
  arch/arm/include/asm/arch-spear13xx/sys_proto.h |   32 +++
  9 files changed, 920 insertions(+), 0 deletions(-)
  create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/Makefile
  create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/cache.S
  create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c
  create mode 100755 arch/arm/cpu/arm_cortexa8/spear13xx/reset.c
  create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/timer.c
  create mode 100644 arch/arm/include/asm/arch-spear13xx/hardware.h
  create mode 100644 arch/arm/include/asm/arch-spear13xx/spr_gpt.h
  create mode 100644 arch/arm/include/asm/arch-spear13xx/spr_misc.h
  create mode 100644 arch/arm/include/asm/arch-spear13xx/sys_proto.h
 
 diff --git a/arch/arm/cpu/arm_cortexa8/spear13xx/Makefile 
 b/arch/arm/cpu/arm_cortexa8/spear13xx/Makefile
 new file mode 100644
 index 000..4157164
 --- /dev/null
 +++ b/arch/arm/cpu/arm_cortexa8/spear13xx/Makefile
 @@ -0,0 +1,52 @@
 +#
 +# (C) Copyright 2000-2003
 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
 +#
 +# (C) Copyright 2008
 +# Guennadi Liakhovetki, DENX Software Engineering, l...@denx.de
 +#
 +# See file CREDITS for list of people who contributed to this
 +# project.
 +#
 +# This program is free software; you can redistribute it and/or
 +# modify it under the terms of the GNU General Public License as
 +# published by the Free Software Foundation; either version 2 of
 +# the License, or (at your option) any later version.
 +#
 +# This program is distributed in the hope that it will be useful,
 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 +# GNU General Public License for more details.
 +#
 +# You should have received a copy of the GNU General Public License
 +# along with this program; if not, write to the Free Software
 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 +# MA 02111-1307 USA
 +#
 +
 +include $(TOPDIR)/config.mk
 +
 +LIB  = $(obj)lib$(SOC).a
 +
 +COBJS+= timer.o
 +COBJS+= reset.o
 +COBJS+= cpu.o
 +
 +SOBJS= cache.o
 +
 +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 +OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS))
 +
 +all:  $(obj).depend $(LIB)
 +
 +$(LIB):  $(OBJS)
 + $(AR) $(ARFLAGS) $@ $(OBJS)
 +
 +#
 +
 +# defines $(obj).depend target
 +include $(SRCTREE)/rules.mk
 +
 +sinclude $(obj).depend
 +
 +#
 diff --git a/arch/arm/cpu/arm_cortexa8/spear13xx/cache.S 
 b/arch/arm/cpu/arm_cortexa8/spear13xx/cache.S
 new file mode 100644
 index 000..b3d1fb0
 --- /dev/null
 +++ b/arch/arm/cpu/arm_cortexa8/spear13xx/cache.S
 @@ -0,0 +1,112 @@
 +/*
 + * (C) Copyright 2009
 + * Vipin Kumar, ST Micoelectronics, vipin.ku...@st.com.
 + *
 + * See file CREDITS for list of people who contributed to this
 + * project.

This cache.S is extremely similar to  s5pc1xx/cache.S
And to a lesser degree the omap3/cache.S.
When a work is based on another work, the original work MUST
be acknowledged.


 + *
 + * 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
 + */
 +
 +.global invalidate_dcache
 +
 +/*
 + *   invalidate_dcache()
 + *
 + *   Invalidate the whole D-cache.
 + *
 + *   Corrupted registers: r0-r5, r7, r9-r11
 + *
 + *   - mm- mm_struct describing address space
 + */
 +invalidate_dcache:
 + stmfd   r13!, {r0 - r5, r7, r9 - r12, r14}
 +
 + mrc p15, 1, r0, c0, c0, 1   @ read clidr
 + andsr3, r0, #0x700   

Re: [U-Boot] [PATCH v2 16/17] SPEAr : spear1300 SoC support added

2010-05-02 Thread Tom Rix
Vipin KUMAR wrote:
 SPEAr1300 SoC support contains basic spear1300 support along with the
 usage of following drivers
 - serial driver(UART)
 - i2c driver
 - smi driver
 - nand driver(FSMC)
 - usbd driver
 
 Signed-off-by: Vipin Kumar vipin.ku...@st.com
 ---
  Makefile   |6 +

Need MAINTAINERS MAKEALL

  arch/arm/include/asm/arch-spear13xx/hardware.h |8 +-
  board/spear/common/Makefile|   10 +-
  board/spear/spear1300/Makefile |   51 ++
  board/spear/spear1300/config.mk|   28 
  board/spear/spear1300/spear1300.c  |   86 ++
  board/spear/spear1300/spr_lowlevel_init.S  |   38 +
  include/configs/spear13xx.h|  199 
 
  8 files changed, 420 insertions(+), 6 deletions(-)
  create mode 100644 board/spear/spear1300/Makefile
  create mode 100644 board/spear/spear1300/config.mk
  create mode 100644 board/spear/spear1300/spear1300.c
  create mode 100644 board/spear/spear1300/spr_lowlevel_init.S
  create mode 100644 include/configs/spear13xx.h
 
 diff --git a/Makefile b/Makefile
 index 7bfdfd3..0b6a151 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -3041,6 +3041,12 @@ spear320_config :  unconfig
  spear600_config :unconfig
   @$(MKCONFIG) -n $@ -t $(@:_config=) spear6xx arm arm926ejs 
 $(@:_config=) spear spear
  
 +spear1300_config \
 +spear1300_nand_config \
 +spear1300_usbtty_config \
 +spear1300_usbtty_nand_config :   unconfig
 + @$(MKCONFIG) -n $@ -t $(@:_config=) spear13xx arm arm_cortexa8 
 spear1300 spear spear13xx
 +
  suen3_config:unconfig
   @$(MKCONFIG) $(@:_config=) arm arm926ejs km_arm keymile kirkwood
  
 diff --git a/arch/arm/include/asm/arch-spear13xx/hardware.h 
 b/arch/arm/include/asm/arch-spear13xx/hardware.h
 index 384260a..7a1cedb 100644
 --- a/arch/arm/include/asm/arch-spear13xx/hardware.h
 +++ b/arch/arm/include/asm/arch-spear13xx/hardware.h
 @@ -24,10 +24,10 @@
  #ifndef _ASM_ARCH_HARDWARE_H
  #define _ASM_ARCH_HARDWARE_H
  
 -#define CONFIG_SYS_USBD_BASE (0xE110)
 -#define CONFIG_SYS_PLUG_BASE (0xE120)
 -#define CONFIG_SYS_FIFO_BASE (0xE1000800)
 -#define CONFIG_SYS_SMI_BASE  (0xFC00)
 +#define CONFIG_SYS_USBD_BASE (0xE380)
 +#define CONFIG_SYS_PLUG_BASE (0xE280)
 +#define CONFIG_SYS_FIFO_BASE (0xE3000800)
 +#define CONFIG_SYS_SMI_BASE  (0xEA00)
  #define CONFIG_SPEAR_TIMERBASE   (0xE038)
  #define CONFIG_SPEAR_MISCBASE(0xE070)
  #define CONFIG_SYS_I2C_BASE  (0xE028)
 diff --git a/board/spear/common/Makefile b/board/spear/common/Makefile
 index 4f8959f..1ae4fd4 100644
 --- a/board/spear/common/Makefile
 +++ b/board/spear/common/Makefile
 @@ -29,8 +29,14 @@ endif
  
  LIB  = $(obj)lib$(VENDOR).a
  
 -COBJS:= spr_misc.o
 -SOBJS:= spr_lowlevel_init.o
 +COBJS-$(CONFIG_SPEAR3XX) += spr_misc.o
 +COBJS-$(CONFIG_SPEAR600) += spr_misc.o
 +
 +SOBJS-$(CONFIG_SPEAR3XX) += spr_lowlevel_init.o
 +SOBJS-$(CONFIG_SPEAR600) += spr_lowlevel_init.o
 +
 +COBJS:= $(COBJS-y)
 +SOBJS:= $(SOBJS-y)
  
  SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
  OBJS := $(addprefix $(obj),$(COBJS))
 diff --git a/board/spear/spear1300/Makefile b/board/spear/spear1300/Makefile
 new file mode 100644
 index 000..fb66895
 --- /dev/null
 +++ b/board/spear/spear1300/Makefile
 @@ -0,0 +1,51 @@
 +#
 +# (C) Copyright 2000-2004
 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
 +#
 +# See file CREDITS for list of people who contributed to this
 +# project.
 +#
 +# This program is free software; you can redistribute it and/or
 +# modify it under the terms of the GNU General Public License as
 +# published by the Free Software Foundation; either version 2 of
 +# the License, or (at your option) any later version.
 +#
 +# This program is distributed in the hope that it will be useful,
 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 +# GNU General Public License for more details.
 +#
 +# You should have received a copy of the GNU General Public License
 +# along with this program; if not, write to the Free Software
 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 +# MA 02111-1307 USA
 +#
 +
 +include $(TOPDIR)/config.mk
 +
 +LIB  = $(obj)lib$(BOARD).a
 +
 +COBJS:= spear1300.o
 +SOBJS:= spr_lowlevel_init.o
 +
 +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 +OBJS := $(addprefix $(obj),$(COBJS))
 +SOBJS:= $(addprefix $(obj),$(SOBJS))
 +
 +$(LIB):  $(obj).depend $(OBJS) $(SOBJS)
 + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
 +
 +clean:
 + rm -f $(SOBJS) $(OBJS)
 +
 +distclean:   clean
 + rm -f $(LIB) core *.bak $(obj).depend
 +
 

Re: [U-Boot] [PATCH v2 17/17] SPEAr : Supporting various configurations for spear3xx and spear6xx boards

2010-05-02 Thread Tom Rix
Vipin KUMAR wrote:
 spear3xx and 6xx boards can be compiled in following configurations
 1. Environment placed in NAND
 2. console on usb device
 3. console on usb device with environment placed in NAND
 

Add the new configs to the README.spear
Tom



 Signed-off-by: Vipin Kumar vipin.ku...@st.com
 ---
  Makefile   |   16 ++--
  board/spear/spear300/config.mk |   11 ---
  board/spear/spear310/config.mk |   11 ---
  board/spear/spear320/config.mk |   11 ---
  board/spear/spear600/config.mk |   11 ---
  include/configs/spear3xx.h |   10 ++
  include/configs/spear6xx.h |   10 ++
  7 files changed, 34 insertions(+), 46 deletions(-)
 
 diff --git a/Makefile b/Makefile
 index 0b6a151..4cc9913 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -3034,11 +3034,23 @@ smdk2410_config   :   unconfig
   @$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 samsung s3c24x0
  
  spear300_config \
 +spear300_nand_config \
 +spear300_usbtty_config \
 +spear300_usbtty_nand_config \
  spear310_config \
 -spear320_config :unconfig
 +spear310_nand_config \
 +spear310_usbtty_config \
 +spear310_usbtty_nand_config \
 +spear320_config \
 +spear320_nand_config \
 +spear320_usbtty_config \
 +spear320_usbtty_nand_config :unconfig
   @$(MKCONFIG) -n $@ -t $(@:_config=) spear3xx arm arm926ejs 
 $(@:_config=) spear spear
  
 -spear600_config :unconfig
 +spear600_config \
 +spear600_nand_config \
 +spear600_usbtty_config \
 +spear600_usbtty_nand_config :unconfig
   @$(MKCONFIG) -n $@ -t $(@:_config=) spear6xx arm arm926ejs 
 $(@:_config=) spear spear
  
  spear1300_config \
 diff --git a/board/spear/spear300/config.mk b/board/spear/spear300/config.mk
 index 35646f2..0bbb40f 100644
 --- a/board/spear/spear300/config.mk
 +++ b/board/spear/spear300/config.mk
 @@ -26,14 +26,3 @@
  TEXT_BASE = 0x0070
  
  ALL += $(obj)u-boot.img
 -
 -# Environment variables in NAND
 -ifeq ($(ENV),NAND)
 -PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_NAND
 -else
 -PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_FLASH
 -endif
 -
 -ifeq ($(CONSOLE),USB)
 -PLATFORM_RELFLAGS += -DCONFIG_SPEAR_USBTTY
 -endif
 diff --git a/board/spear/spear310/config.mk b/board/spear/spear310/config.mk
 index cba8436..c8264c3 100644
 --- a/board/spear/spear310/config.mk
 +++ b/board/spear/spear310/config.mk
 @@ -27,18 +27,7 @@ TEXT_BASE = 0x0070
  
  ALL += $(obj)u-boot.img
  
 -# Environment variables in NAND
 -ifeq ($(ENV),NAND)
 -PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_NAND
 -else
 -PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_FLASH
 -endif
 -
  # Support parallel flash
  ifeq ($(FLASH),PNOR)
  PLATFORM_RELFLAGS += -DCONFIG_FLASH_PNOR
  endif
 -
 -ifeq ($(CONSOLE),USB)
 -PLATFORM_RELFLAGS += -DCONFIG_SPEAR_USBTTY
 -endif
 diff --git a/board/spear/spear320/config.mk b/board/spear/spear320/config.mk
 index cba8436..c8264c3 100644
 --- a/board/spear/spear320/config.mk
 +++ b/board/spear/spear320/config.mk
 @@ -27,18 +27,7 @@ TEXT_BASE = 0x0070
  
  ALL += $(obj)u-boot.img
  
 -# Environment variables in NAND
 -ifeq ($(ENV),NAND)
 -PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_NAND
 -else
 -PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_FLASH
 -endif
 -
  # Support parallel flash
  ifeq ($(FLASH),PNOR)
  PLATFORM_RELFLAGS += -DCONFIG_FLASH_PNOR
  endif
 -
 -ifeq ($(CONSOLE),USB)
 -PLATFORM_RELFLAGS += -DCONFIG_SPEAR_USBTTY
 -endif
 diff --git a/board/spear/spear600/config.mk b/board/spear/spear600/config.mk
 index 35646f2..0bbb40f 100644
 --- a/board/spear/spear600/config.mk
 +++ b/board/spear/spear600/config.mk
 @@ -26,14 +26,3 @@
  TEXT_BASE = 0x0070
  
  ALL += $(obj)u-boot.img
 -
 -# Environment variables in NAND
 -ifeq ($(ENV),NAND)
 -PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_NAND
 -else
 -PLATFORM_RELFLAGS += -DCONFIG_ENV_IS_IN_FLASH
 -endif
 -
 -ifeq ($(CONSOLE),USB)
 -PLATFORM_RELFLAGS += -DCONFIG_SPEAR_USBTTY
 -endif
 diff --git a/include/configs/spear3xx.h b/include/configs/spear3xx.h
 index fde505c..f0c915e 100644
 --- a/include/configs/spear3xx.h
 +++ b/include/configs/spear3xx.h
 @@ -39,6 +39,16 @@
  #define CONFIG_SPEAR320  1
  #endif
  
 +#if defined(CONFIG_MK_usbtty)
 +#define CONFIG_SPEAR_USBTTY  1
 +#endif
 +
 +#if defined(CONFIG_MK_nand)
 +#define CONFIG_ENV_IS_IN_NAND1
 +#else
 +#define CONFIG_ENV_IS_IN_FLASH   1
 +#endif
 +
  #include configs/spear-common.h
  
  /* Ethernet driver configuration */
 diff --git a/include/configs/spear6xx.h b/include/configs/spear6xx.h
 index 2532344..82d24df 100644
 --- a/include/configs/spear6xx.h
 +++ b/include/configs/spear6xx.h
 @@ -30,6 +30,16 @@
   */
  #define CONFIG_SPEAR600  1
  
 +#if defined(CONFIG_MK_usbtty)
 +#define CONFIG_SPEAR_USBTTY  1
 +#endif
 +
 +#if defined(CONFIG_MK_nand)
 +#define CONFIG_ENV_IS_IN_NAND1
 +#else
 +#define CONFIG_ENV_IS_IN_FLASH 

[U-Boot] [PATCH 0/3] mmc: add mmc_spi driver

2010-05-02 Thread Thomas Chou
This patch series adds a mmc_spi driver.

Thomas Chou (3):
  lib: add crc7 from Linux
  mmc: add find_mmc_device_quiet that doesnt print not found message
  mmc: add generic mmc spi driver

 common/Makefile   |1 +
 common/cmd_mmc_spi.c  |  115 ++
 drivers/mmc/Makefile  |1 +
 drivers/mmc/mmc.c |   14 ++-
 drivers/mmc/mmc_spi.c |  393 +
 include/linux/crc7.h  |   14 ++
 include/mmc.h |1 +
 include/mmc_spi.h |   27 
 lib/Makefile  |1 +
 lib/crc7.c|   62 
 10 files changed, 626 insertions(+), 3 deletions(-)
 create mode 100644 common/cmd_mmc_spi.c
 create mode 100644 drivers/mmc/mmc_spi.c
 create mode 100644 include/linux/crc7.h
 create mode 100644 include/mmc_spi.h
 create mode 100644 lib/crc7.c

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


[U-Boot] [PATCH 2/3] mmc: add find_mmc_device_quiet that doesnt print not found message

2010-05-02 Thread Thomas Chou
We need to query mmc devices in mmc_spi subcommand and don't want
the Device not found message.

Signed-off-by: Thomas Chou tho...@wytron.com.tw
---
 drivers/mmc/mmc.c |   14 +++---
 include/mmc.h |1 +
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index cf4ea16..55ab13e 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -60,7 +60,7 @@ int mmc_set_blocklen(struct mmc *mmc, int len)
return mmc_send_cmd(mmc, cmd, NULL);
 }
 
-struct mmc *find_mmc_device(int dev_num)
+struct mmc *find_mmc_device_quiet(int dev_num)
 {
struct mmc *m;
struct list_head *entry;
@@ -72,11 +72,19 @@ struct mmc *find_mmc_device(int dev_num)
return m;
}
 
-   printf(MMC Device %d not found\n, dev_num);
-
return NULL;
 }
 
+struct mmc *find_mmc_device(int dev_num)
+{
+   struct mmc *m = find_mmc_device_quiet(dev_num);
+
+   if (!m)
+   printf(MMC Device %d not found\n, dev_num);
+
+   return m;
+}
+
 static ulong
 mmc_bwrite(int dev_num, ulong start, lbaint_t blkcnt, const void*src)
 {
diff --git a/include/mmc.h b/include/mmc.h
index 8973bc7..b24b596 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -270,6 +270,7 @@ int mmc_register(struct mmc *mmc);
 int mmc_initialize(bd_t *bis);
 int mmc_init(struct mmc *mmc);
 int mmc_read(struct mmc *mmc, u64 src, uchar *dst, int size);
+struct mmc *find_mmc_device_quiet(int dev_num);
 struct mmc *find_mmc_device(int dev_num);
 void print_mmc_devices(char separator);
 int board_mmc_getcd(u8 *cd, struct mmc *mmc);
-- 
1.6.6.1

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


[U-Boot] Toggling pins using the BDI3000

2010-05-02 Thread Can Aydin


Hi All,

I'm not sure if this is the place to ask this, please redirect if it isn't.

I'm looking into using a BDI3000 with a P2020RDB evaluation kit we've 
already purchased from Denx, but there is some confusion over how the 
board hardware handles the power on boot configuration signals to the 
processor. The addenda to the P2020RDB manuals provided by Freescale 
seem to indicate that certain boot functions that are supposed to be 
configurable using dipswitches on the board do not work as they should, 
notably certain clock speeds and the SPI and eSDHC boot configurations, 
which are the two options I am keen to exercise before moving on to 
prototyping.


Is a BDI3000, (using bdiGDB?), able to override the signals on these 
pins using JTAG functionality? Essentially, what I would like is some 
way of finding out if the P2020 is obtaining the correct PLL ratio and 
boot ROM location from the signals, and more importantly, override any 
erroneus signals that the hardware on the platform (P2020RDB and later, 
the prototype) might be providing (or failing to provide) it. (without 
using an oscilloscope and a soldering iron that is).


Regards,

Can Aydin
--

*Can Aydin*
Software Engineer
Locata Corporation
can.ay...@locatacorp.com

Locata Corporation Pty Ltd
Level 1, 111 Canberra Ave
Griffith ACT 2603 Australia
Phone +612 6126 5734
Fax +612 6126 5704

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


[U-Boot] Pais Casino Join Today Be Rich!

2010-05-02 Thread Making Money
- AUTOMATYCZNY raport antySPAMowy --
Oprogramowanie  do  wykrywania  spamu,  dzia³aj±ce  na  serwerze:
*** mta.pl ***,
zidentyfikowa³o  ten email  jako prawdopodobny  spam. Oryginalna  wiadomo¶æ
zosta³a do³±czonado tej, aby mo¿na by³o j± przejrzeæ, zweryfikowaæ  lub
zablokowaæ na  przysz³o¶æ. Je¿eli masz jakie¶ w±tpliwo¶ci, to kieruj je pod
adres the administrator of that system

Przegl±d zawarto¶ci:  Pais Casino Pais Casino is now online, and we give you a 
invite
   to our online Casino! http://www.paiscasino.net [...] 

Szczegó³y analizy zawarto¶ci: (8.9 zaliczonych, 6.5 wymaganych)

pkt  nazwa regu³y   krótki opis
 -- ---
-1.4 ALL_TRUSTEDPassed through trusted hosts only via SMTP
 0.0 HTML_MESSAGE   BODY: Wiadomo¶æ zawiera kod HTML
 1.7 MIME_HTML_ONLY BODY: Wiadomo¶æ posiada tylko czê¶ci tekstowe/html
MIME
 1.5 RAZOR2_CF_RANGE_E8_51_100 Razor2 gives engine 8 confidence level
above 50%
[cf: 100]
 0.5 RAZOR2_CHECK   Na li¶cie Razor2 (http://razor.sf.net/)
 0.5 RAZOR2_CF_RANGE_51_100 Razor2 stwierdzi³ pewno¶æ pomiêdzy 51 i 100
[cf: 100]
 2.1 URIBL_OB_SURBL Contains an URL listed in the OB SURBL blocklist
[URIs: paiscasino.net]
 0.0 FORGED_OUTLOOK_TAGSOutlook nie potrafi wysy³aæ wiadomo¶ci HTML w tym
 formacie
 0.7 MSOE_MID_WRONG_CASEMSOE_MID_WRONG_CASE
 0.0 FORGED_OUTLOOK_HTMLOutlook nie potrafi wysy³aæ wiadomo¶ci ca³kowicie
 w HTML
 4.2 FORGED_MUA_OUTLOOK Podrobiony mail udaj±cy przesy³kê z MS Outlook
-0.9 AWLAWL: From: address is in the auto white-list

Oryginalna wiadomo¶æ nie by³a w ca³o¶ci  tekstowa, w zwi±zku z tym otwarcie
jej za  pomoc± niektórych  programów pocztowych   mo¿e  nie  byæ ca³kowicie
bezpieczne; w  szczególno¶ci,   przesy³ka  mo¿e   zawieraæ  wirusa  lub kod
informuj±cy spamera, ¿e twój adres pocztowy jest  prawid³owyi mo¿na  na
niego przysy³aæ wiêcej spamu.  Je¿eli  chceszj± przejrzeæ, bezpieczniej
bêdzie zapisaæ j± najpierw na dysk, a nastêpnie otworzyæ edytorem tekstu.

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


Re: [U-Boot] [PATCH-V2 0/4] Add Support for AM3517EVM with EMIF4

2010-05-02 Thread Hiremath, Vaibhav

 -Original Message-
 From: Hiremath, Vaibhav
 Sent: Friday, April 23, 2010 8:26 PM
 To: u-boot@lists.denx.de
 Cc: Paulraj, Sandeep; tom@windriver.com; Hiremath, Vaibhav
 Subject: [PATCH-V2 0/4] Add Support for AM3517EVM with EMIF4
 
 From: Vaibhav Hiremath hvaib...@ti.com
 
 Changes from V1 (comments provided by Tom Rix):
   - Refreshed against latest denx/master.
   - Further split SDRC consolidated patch, since it was
 fixing up one issue in dram_init in addition to code
 moment.
   - Retained copyright for sdrc.c file, since it is
 barely a code moment.
 
 AM3517 device is high-performance, industrial applications
 processor designed and developed keeping Software Compatible
 with OMAP3 Processors.
 
 Differances :-
 ===
   - The SDRC controller has been replaced with EMIF4.
   - Some new IP's got added like, CAN, VPFE, etc...
   - Removed ISP completely
 
 This patch series adds support for AM3517EVM along with EMIF4 configuration.
 
 Tested :-
 ===
   - OMAP3 EVM (both NAND and MMC boot mode)
   - AM3517 EVM (both NAND and MMC boot mode)
 
 Build tested on all OMAP3 platforms.
 
 Below are some of the useful links :-
 ===
 AM3517 device is high-performance, industrial applications processor
 designed
 and developed keeping Software Compatible with OMAP3 Processors.
 
 Below are some of the useful links -
 
 Migration from OMAP35x to AM35x :-
 http://focus.ti.com/lit/an/sprab91/sprab91.pdf
 
 Specs/TRM :-
 http://focus.ti.com/docs/prod/folders/print/am3517.html
 
 EVM Link -:
 http://www.logicpd.com/products/development-kits/zoom-am3517-experimenter-
 kit
 
 
 Vaibhav Hiremath (4):
   omap3: Calculate CS1 size only when SDRC is initialized for CS1
   omap3: Consolidate SDRC related operations
   AM35x: Add support for AM3517EVM
   AM35x: Add support for EMIF4
 
  Makefile|3 +
  arch/arm/cpu/arm_cortexa8/omap3/Makefile|6 +
  arch/arm/cpu/arm_cortexa8/omap3/board.c |   34 +---
  arch/arm/cpu/arm_cortexa8/omap3/emif4.c |  168 +++
  arch/arm/cpu/arm_cortexa8/omap3/mem.c   |   90 --
  arch/arm/cpu/arm_cortexa8/omap3/sdrc.c  |  202 +
  arch/arm/cpu/arm_cortexa8/omap3/sys_info.c  |   41 ---
  arch/arm/include/asm/arch-omap3/cpu.h   |   27 ++
  arch/arm/include/asm/arch-omap3/emif4.h |   79 ++
  arch/arm/include/asm/arch-omap3/mem.h   |   13 +
  arch/arm/include/asm/arch-omap3/mux.h   |   36 +++
  arch/arm/include/asm/arch-omap3/sys_proto.h |7 +-
  board/logicpd/am3517evm/Makefile|   47 +++
  board/logicpd/am3517evm/am3517evm.c |   76 +
  board/logicpd/am3517evm/am3517evm.h |  405
 +++
  board/logicpd/am3517evm/config.mk   |   30 ++
  include/configs/am3517_evm.h|  297 
  include/configs/devkit8000.h|2 +
  include/configs/omap3_beagle.h  |2 +
  include/configs/omap3_evm.h |2 +
  include/configs/omap3_overo.h   |2 +
  include/configs/omap3_pandora.h |2 +
  include/configs/omap3_sdp3430.h |2 +
  include/configs/omap3_zoom1.h   |2 +
  include/configs/omap3_zoom2.h   |2 +
  25 files changed, 1411 insertions(+), 166 deletions(-)
  create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/emif4.c
  create mode 100644 arch/arm/cpu/arm_cortexa8/omap3/sdrc.c
  create mode 100644 arch/arm/include/asm/arch-omap3/emif4.h
  create mode 100644 board/logicpd/am3517evm/Makefile
  create mode 100644 board/logicpd/am3517evm/am3517evm.c
  create mode 100644 board/logicpd/am3517evm/am3517evm.h
  create mode 100644 board/logicpd/am3517evm/config.mk
  create mode 100644 include/configs/am3517_evm.h

[Hiremath, Vaibhav] Tom,

A gentle reminder to review this series on patch-sets.

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