Re: [U-Boot] [PATCH 7/8] APM82xxx: Add bluestone board support

2010-08-30 Thread Tirumala Marri
 -Original Message-
 From: Wolfgang Denk [mailto:w...@denx.de]
 Sent: Sunday, August 29, 2010 1:57 AM
 To: tma...@apm.com
 Cc: u-boot@lists.denx.de; open-source-rev...@apm.com
 Subject: Re: [U-Boot] [PATCH 7/8] APM82xxx: Add bluestone board support

 Dear tma...@apm.com,

 In message 1282856775-24619-1-git-send-email-tma...@apm.com you
 wrote:
  From: Tirumala Marri tma...@apm.com
 
  Add support code for bluestone board wth APM82XXX processor based.
  This patch includes early board init, misc init, configure EBC,
  and initializes UIC.
 
  Signed-off-by: Tirumala R Marri tma...@apm.com
  ---
   arch/powerpc/include/asm/ppc4xx-ebc.h |4 +
   board/amcc/bluestone/Makefile |   52 
   board/amcc/bluestone/bluestone.c  |  213
 
   board/amcc/bluestone/config.mk|   40 ++
   board/amcc/bluestone/init.S   |   55 
   include/configs/bluestone.h   |  218
 +
   6 files changed, 582 insertions(+), 0 deletions(-)

 Entry to boards.cfg, MAINTAINERS and MAKEALL missing.

 Best regards,

 Wolfgang Denk


Mr Wolfgang,
  Sure will fix it.
Regards,
Marri
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 7/8] APM82xxx: Add bluestone board support

2010-08-30 Thread Stefan Roese
Hi Marri,

(please reply to the mailing list as well)

On Monday 30 August 2010 19:31:32 Tirumala Marri wrote:
   +int board_early_init_r(void)
   +{
   + u32 bootdevice;
   +
   + /*
   +  * Clear potential errors resulting from auto-calibration.
   +  * If not done, then we could get an interrupt later on when
   +  * exceptions are enabled.
   +  */
   + set_mcsr(get_mcsr());
   +
   + /* Reconfigure EBC here */
   + bootdevice = bootdevice_selected();
   + reconfigure_EBC(bootdevice);
  
  Please explain why the EBC needs to be reconfigured at this stage.
 
 [Marri]Once we are running out of ram, we are trying to change from what
 Initial bootstraps set up the EBC banks. Let me review if it is
 significantly
 Changing anything. Otherwise I will get rid of the function.

Why don't you do it as usually done. Just define the EBC register settings in 
your board header and they will get automatically written to the EBC registers 
in arch/powerpc/cpu/ppc4xx/cpu.c, cpu_init_f():

Defines in bluestone.h like this:

/* Memory Bank 0 (NOR-flash) */
#define CONFIG_SYS_EBC_PB0AP(EBC_BXAP_BME_DISABLED  |   \
 EBC_BXAP_TWT_ENCODE(16)|   \
 EBC_BXAP_BCE_DISABLE   |   \
 EBC_BXAP_BCT_2TRANS|   \
 EBC_BXAP_CSN_ENCODE(1) |   \
 EBC_BXAP_OEN_ENCODE(1) |   \
 EBC_BXAP_WBN_ENCODE(1) |   \
 EBC_BXAP_WBF_ENCODE(1) |   \
 EBC_BXAP_TH_ENCODE(7)  |   \
 EBC_BXAP_RE_DISABLED   |   \
 EBC_BXAP_SOR_DELAYED   |   \
 EBC_BXAP_BEM_WRITEONLY |   \
 EBC_BXAP_PEN_DISABLED)
#define CONFIG_SYS_EBC_PB0CR
(EBC_BXCR_BAS_ENCODE(CONFIG_SYS_BOOT_BASE_ADDR) | \
 EBC_BXCR_BS_16MB   |   \
 EBC_BXCR_BU_RW |   \
 EBC_BXCR_BW_16BIT)

snip

   +#define CONFIG_SDRAM_INFO_EEPROM_ADDR0x54/* Board specific
 
 */
 
   +#define CONFIG_SDRAM16BIT_OFFSET 0x20/* Board specific */
  
  Those two defines are not used in your patches. Please remove.
 
 [Marri]  The variable CONFIG_SDRAM_INFO_EEPROM_ADDR is used.
 Where  CONFIG_SDRAM16BIT_OFFSET  is not used any where.

I can't find CONFIG_SDRAM_INFO_EEPROM_ADDR either. Where is it used?
 
snip

  Please fix and resubmit. Thanks.
  
  Cheers,
  Stefan
 
 I will do the fixes and send it again.

Thanks.

Cheers,
Stefan

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


Re: [U-Boot] [PATCH 7/8] APM82xxx: Add bluestone board support

2010-08-29 Thread Wolfgang Denk
Dear Feng Kan,

In message aanlktikbac7n-twhkrzy+skwwm88vkvnuxy8crx-u...@mail.gmail.com you 
wrote:
 Our legal is out at the moment. Why is this an issue, since it is
 on many of the files in U-Boot. Our legal indicated without the
 statement the Copyright would not stand.

Please tell your legal to get a clue.

Fact is, that any files where a All rights reserved. is found have
zero chance to go into mainline.  [And any existing files with such
notes are already on the kill list.]

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
KLB is an acronym for `Known Lazy Bastard', aka non-FAQ  reader,  aka
person  who  would  rather  make  someone  take their time to explain
something basic than look it up in a  FAQ.
 -- Tom Christiansen in 6aq547$mn...@csnews.cs.colorado.edu
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 7/8] APM82xxx: Add bluestone board support

2010-08-29 Thread Wolfgang Denk
Dear tma...@apm.com,

In message 1282856775-24619-1-git-send-email-tma...@apm.com you wrote:
 From: Tirumala Marri tma...@apm.com
 
 Add support code for bluestone board wth APM82XXX processor based.
 This patch includes early board init, misc init, configure EBC,
 and initializes UIC.
 
 Signed-off-by: Tirumala R Marri tma...@apm.com
 ---
  arch/powerpc/include/asm/ppc4xx-ebc.h |4 +
  board/amcc/bluestone/Makefile |   52 
  board/amcc/bluestone/bluestone.c  |  213 
  board/amcc/bluestone/config.mk|   40 ++
  board/amcc/bluestone/init.S   |   55 
  include/configs/bluestone.h   |  218 
 +
  6 files changed, 582 insertions(+), 0 deletions(-)

Entry to boards.cfg, MAINTAINERS and MAKEALL missing.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Do not follow where the path may leadgo instead where there is no
path and leave a trail.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 7/8] APM82xxx: Add bluestone board support

2010-08-27 Thread Stefan Roese
Hi Marri,

On Thursday 26 August 2010 23:06:15 tma...@apm.com wrote:
 From: Tirumala Marri tma...@apm.com
 
 Add support code for bluestone board wth APM82XXX processor based.
 This patch includes early board init, misc init, configure EBC,
 and initializes UIC.

Again, some comments below.
 
 Signed-off-by: Tirumala R Marri tma...@apm.com
 ---
  arch/powerpc/include/asm/ppc4xx-ebc.h |4 +
  board/amcc/bluestone/Makefile |   52 
  board/amcc/bluestone/bluestone.c  |  213
  board/amcc/bluestone/config.mk|  
 40 ++
  board/amcc/bluestone/init.S   |   55 
  include/configs/bluestone.h   |  218
 + 6 files changed, 582 insertions(+), 0
 deletions(-)
 
 diff --git a/arch/powerpc/include/asm/ppc4xx-ebc.h
 b/arch/powerpc/include/asm/ppc4xx-ebc.h index 9c17e46..245e487 100644
 --- a/arch/powerpc/include/asm/ppc4xx-ebc.h
 +++ b/arch/powerpc/include/asm/ppc4xx-ebc.h
 @@ -73,6 +73,10 @@
  #define EBC_NUM_BANKS3
  #endif
 
 +#if defined(CONFIG_APM82XXX)
 +#define EBC_NUM_BANKS   3
 +#endif
 +
  /* Bank Configuration Register */
  #define EBC_BXCR(n)  (n)
  #define EBC_BXCR_BANK_SIZE(n)(0x10  (((n)  EBC_BXCR_BS_MASK) 

 17)) diff --git a/board/amcc/bluestone/Makefile
 b/board/amcc/bluestone/Makefile new file mode 100644
 index 000..637d20d
 --- /dev/null
 +++ b/board/amcc/bluestone/Makefile
 @@ -0,0 +1,52 @@
 +#
 +# Copyright (c) 2010, Applied Micro Circuits Corporation
 +# All rights reserved. Tirumala R Marri tma...@apm.com

IIRC, then this statement All rights reserved interferes with the GPL. 
Please remove it from all your files.

 +#
 +# 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-y  := $(BOARD).o
 +SOBJS:= init.o
 +
 +COBJS   := $(COBJS-y)
 +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 +OBJS := $(addprefix $(obj),$(COBJS))
 +SOBJS:= $(addprefix $(obj),$(SOBJS))
 +
 +$(LIB):  $(OBJS) $(SOBJS)
 + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
 +
 +clean:
 + rm -f $(SOBJS) $(OBJS)
 +
 +distclean:   clean
 + rm -f $(LIB) core *.bak $(obj).depend
 +
 +#
 +
 +# defines $(obj).depend target
 +include $(SRCTREE)/rules.mk
 +
 +sinclude $(obj).depend
 +
 +#
 diff --git a/board/amcc/bluestone/bluestone.c
 b/board/amcc/bluestone/bluestone.c new file mode 100644
 index 000..b13e84a
 --- /dev/null
 +++ b/board/amcc/bluestone/bluestone.c
 @@ -0,0 +1,213 @@
 +/*
 + * Bluestone board support
 + *
 + * Copyright (c) 2010, Applied Micro Circuits Corporation
 + * All rights reserved. Tirumala R Marri tma...@apm.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 ppc440.h
 +#include libfdt.h
 +#include fdt_support.h
 +#include i2c.h
 +#include asm/processor.h
 +#include asm/io.h
 +#include asm/mmu.h
 +#include asm/gpio.h
 +
 +DECLARE_GLOBAL_DATA_PTR;
 +
 +#define SDR_AHB_CFG  0x370

Starting here...

 +/* Define Boot devices */
 +#define BOOT_FROM_8BIT_SRAM 0x00
 +#define BOOT_FROM_8BIT_SRAM_FULL_ADDR   0x01
 +#define BOOT_FROM_8BIT_NAND  0x02
 +#define BOOT_FROM_8BIT_NOR   0x03
 +#define BOOT_FROM_8BIT_NOR_FULL_ADDR 0x04
 +#define BOOT_DEVICE_UNKNOWN  0xff
 +
 +#define APM82161_MASK  

Re: [U-Boot] [PATCH 7/8] APM82xxx: Add bluestone board support

2010-08-27 Thread Feng Kan
Hi Stefan:

Our legal is out at the moment. Why is this an issue, since it is
on many of the files in U-Boot. Our legal indicated without the
statement the Copyright would not stand.

Thanks
Feng
 +# Copyright (c) 2010, Applied Micro Circuits Corporation
 +# All rights reserved. Tirumala R Marri tma...@apm.com

 IIRC, then this statement All rights reserved interferes with the GPL.
 Please remove it from all your files.

 +#
 +# 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-y      := $(BOARD).o
 +SOBJS        := init.o
 +
 +COBJS   := $(COBJS-y)
 +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 +OBJS := $(addprefix $(obj),$(COBJS))
 +SOBJS        := $(addprefix $(obj),$(SOBJS))
 +
 +$(LIB):      $(OBJS) $(SOBJS)
 +     $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
 +
 +clean:
 +     rm -f $(SOBJS) $(OBJS)
 +
 +distclean:   clean
 +     rm -f $(LIB) core *.bak $(obj).depend
 +
 +#
 +
 +# defines $(obj).depend target
 +include $(SRCTREE)/rules.mk
 +
 +sinclude $(obj).depend
 +
 +#
 diff --git a/board/amcc/bluestone/bluestone.c
 b/board/amcc/bluestone/bluestone.c new file mode 100644
 index 000..b13e84a
 --- /dev/null
 +++ b/board/amcc/bluestone/bluestone.c
 @@ -0,0 +1,213 @@
 +/*
 + * Bluestone board support
 + *
 + * Copyright (c) 2010, Applied Micro Circuits Corporation
 + * All rights reserved. Tirumala R Marri tma...@apm.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 ppc440.h
 +#include libfdt.h
 +#include fdt_support.h
 +#include i2c.h
 +#include asm/processor.h
 +#include asm/io.h
 +#include asm/mmu.h
 +#include asm/gpio.h
 +
 +DECLARE_GLOBAL_DATA_PTR;
 +
 +#define SDR_AHB_CFG  0x370

 Starting here...

 +/* Define Boot devices */
 +#define BOOT_FROM_8BIT_SRAM                     0x00
 +#define BOOT_FROM_8BIT_SRAM_FULL_ADDR           0x01
 +#define BOOT_FROM_8BIT_NAND                  0x02
 +#define BOOT_FROM_8BIT_NOR                   0x03
 +#define BOOT_FROM_8BIT_NOR_FULL_ADDR         0x04
 +#define BOOT_DEVICE_UNKNOWN                  0xff
 +
 +#define APM82161_MASK                (u32)(0x1  21)
 +
 +/* NOR Flash */
 +#define EBC_BXAP_NOR (EBC_BXAP_BME_DISABLED   | \
 +                     EBC_BXAP_TWT_ENCODE(64)  | \
 +                     EBC_BXAP_BCE_DISABLE    | \
 +                     EBC_BXAP_BCT_2TRANS     | \
 +                     EBC_BXAP_CSN_ENCODE(1)  | \
 +                     EBC_BXAP_OEN_ENCODE(2)  | \
 +                     EBC_BXAP_WBN_ENCODE(2)  | \
 +                     EBC_BXAP_WBF_ENCODE(2)  | \
 +                     EBC_BXAP_TH_ENCODE(7)   | \
 +                     EBC_BXAP_SOR_DELAYED    | \
 +                     EBC_BXAP_BEM_WRITEONLY  | \
 +                     EBC_BXAP_PEN_DISABLED)
 +/* Peripheral Bank Configuration Register - EBC_BxCR */
 +#define EBC_BXCR_8BIT_NOR    \
 +     (EBC_BXCR_BAS_ENCODE(CONFIG_SYS_FLASH_BASE) | \
 +     EBC_BXCR_BS_1MB                | \
 +     EBC_BXCR_BU_RW                  | \
 +     EBC_BXCR_BW_8BIT)
 +
 +#define EBC_BXCR_8BIT_SRAM   \
 +     (EBC_BXCR_BAS_ENCODE(CONFIG_SYS_EXTSRAM_BASE) | \
 +     EBC_BXCR_BS_1MB                 | \
 +     EBC_BXCR_BU_RW                  | \
 +     EBC_BXCR_BW_8BIT)

 ... till here. Why do you add these defines to this C file? These
 should be located in the general header files (ppc440.h) and/or
 the board config 

[U-Boot] [PATCH 7/8] APM82xxx: Add bluestone board support

2010-08-26 Thread tmarri
From: Tirumala Marri tma...@apm.com

Add support code for bluestone board wth APM82XXX processor based.
This patch includes early board init, misc init, configure EBC,
and initializes UIC.

Signed-off-by: Tirumala R Marri tma...@apm.com
---
 arch/powerpc/include/asm/ppc4xx-ebc.h |4 +
 board/amcc/bluestone/Makefile |   52 
 board/amcc/bluestone/bluestone.c  |  213 
 board/amcc/bluestone/config.mk|   40 ++
 board/amcc/bluestone/init.S   |   55 
 include/configs/bluestone.h   |  218 +
 6 files changed, 582 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/include/asm/ppc4xx-ebc.h 
b/arch/powerpc/include/asm/ppc4xx-ebc.h
index 9c17e46..245e487 100644
--- a/arch/powerpc/include/asm/ppc4xx-ebc.h
+++ b/arch/powerpc/include/asm/ppc4xx-ebc.h
@@ -73,6 +73,10 @@
 #define EBC_NUM_BANKS  3
 #endif
 
+#if defined(CONFIG_APM82XXX)
+#define EBC_NUM_BANKS   3
+#endif
+
 /* Bank Configuration Register */
 #define EBC_BXCR(n)(n)
 #define EBC_BXCR_BANK_SIZE(n)  (0x10  (((n)  EBC_BXCR_BS_MASK)  17))
diff --git a/board/amcc/bluestone/Makefile b/board/amcc/bluestone/Makefile
new file mode 100644
index 000..637d20d
--- /dev/null
+++ b/board/amcc/bluestone/Makefile
@@ -0,0 +1,52 @@
+#
+# Copyright (c) 2010, Applied Micro Circuits Corporation
+# All rights reserved. Tirumala R Marri tma...@apm.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 $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS-y:= $(BOARD).o
+SOBJS  := init.o
+
+COBJS   := $(COBJS-y)
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/amcc/bluestone/bluestone.c b/board/amcc/bluestone/bluestone.c
new file mode 100644
index 000..b13e84a
--- /dev/null
+++ b/board/amcc/bluestone/bluestone.c
@@ -0,0 +1,213 @@
+/*
+ * Bluestone board support
+ *
+ * Copyright (c) 2010, Applied Micro Circuits Corporation
+ * All rights reserved. Tirumala R Marri tma...@apm.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 ppc440.h
+#include libfdt.h
+#include fdt_support.h
+#include i2c.h
+#include asm/processor.h
+#include asm/io.h
+#include asm/mmu.h
+#include asm/gpio.h
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define SDR_AHB_CFG0x370
+
+/* Define Boot devices */
+#define BOOT_FROM_8BIT_SRAM 0x00
+#define BOOT_FROM_8BIT_SRAM_FULL_ADDR   0x01
+#define BOOT_FROM_8BIT_NAND0x02
+#define BOOT_FROM_8BIT_NOR 0x03
+#define BOOT_FROM_8BIT_NOR_FULL_ADDR   0x04
+#define BOOT_DEVICE_UNKNOWN0xff
+
+#define APM82161_MASK  (u32)(0x1  21)
+
+/* NOR Flash */
+#define EBC_BXAP_NOR   (EBC_BXAP_BME_DISABLED   | \
+   EBC_BXAP_TWT_ENCODE(64)  | \
+   EBC_BXAP_BCE_DISABLE| \
+   EBC_BXAP_BCT_2TRANS | \
+   EBC_BXAP_CSN_ENCODE(1)  | \
+   EBC_BXAP_OEN_ENCODE(2)  | \
+