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

2010-05-04 Thread Vipin KUMAR
 -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
 --- a/board/spear/spear300/spear300.c
 +++ b/board/spear/spear300/spear300.c
 @@ -25,10 +25,10 @@
  #include netdev.h
  #include nand.h
  #include asm/io.h
 +#include linux/mtd/fsmc_nand.h
  #include asm/arch/hardware.h
  #include asm/arch/spr_defs.h
  #include asm/arch/spr_misc.h
 -#include asm/arch/spr_nand.h
  
  int board_init(void)
  {
 @@ -52,7 +52,7 @@ int board_nand_init(struct nand_chip *nand)
  ((readl(misc_regs_p-auto_cfg_reg)  MISC_SOCCFGMSK) ==
   MISC_SOCCFG31)) {
  
 -return spear_nand_init(nand);
 +return fsmc_nand_init(nand);
 
 Can make this conditionally compiled with CONFIG_NAND_FSMC
 
OK. Please find these changes in v3

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


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 11/17] SPEAr : Configuring FSMC driver for NAND interface

2010-04-27 Thread Scott Wood
On Mon, Apr 26, 2010 at 08:26:44AM +0530, Vipin KUMAR wrote:
 Since FSMC is a standard IP and it supports different memory interfaces the 
 FSMC
 is supported independent of spear platform and spear is configured to use that
 driver for interfacing with the NAND device
 
 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

Acked-by: Scott Wood scottw...@freescale.com

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