This patch adds the support for spear1310 SoC. Currently spear1310 uses the
following drivers
- UART (PL011)
- designware i2c
- st smi (Serial Memory Interface)
- designware usb device
- designware ethernet

Signed-off-by: Vipin Kumar <vipin.ku...@st.com>
---
 MAINTAINERS                               |    1 +
 MAKEALL                                   |    1 +
 Makefile                                  |    6 +++
 arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c |    4 ++
 board/spear/spear1310/Makefile            |   51 +++++++++++++++++++++
 board/spear/spear1310/config.mk           |   28 +++++++++++
 board/spear/spear1310/spear1310.c         |   70 +++++++++++++++++++++++++++++
 doc/README.spear                          |   11 +++-
 include/configs/spear13xx_evb.h           |    5 ++
 9 files changed, 174 insertions(+), 3 deletions(-)
 create mode 100644 board/spear/spear1310/Makefile
 create mode 100644 board/spear/spear1310/config.mk
 create mode 100644 board/spear/spear1310/spear1310.c

diff --git a/MAINTAINERS b/MAINTAINERS
index 4f9ad7f..e9ac299 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -670,6 +670,7 @@ Prakash Kumar <prak...@embedx.com>
 Vipin Kumar <vipin.ku...@st.com>
 
        spear1300       ARM CORTEX-A9 (spear1300 Soc)
+       spear1310       ARM CORTEX-A9 (spear1310 Soc)
        spear300        ARM926EJS (spear300 Soc)
        spear310        ARM926EJS (spear310 Soc)
        spear320        ARM926EJS (spear320 Soc)
diff --git a/MAKEALL b/MAKEALL
index e77608a..d140d38 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -660,6 +660,7 @@ LIST_ARM_CORTEX_A8="                \
        s5p_goni                \
        smdkc100                \
        spear1300               \
+       spear1310               \
 "
 
 #########################################################################
diff --git a/Makefile b/Makefile
index 870207d..fb0ad0f 100644
--- a/Makefile
+++ b/Makefile
@@ -2117,6 +2117,12 @@ spear1300_usbtty_config \
 spear1300_usbtty_nand_config : unconfig
        @$(MKCONFIG) -n $@ -t $(@:_config=) spear13xx_evb arm arm_cortexa8 
spear1300 spear spear13xx
 
+spear1310_config \
+spear1310_nand_config \
+spear1310_usbtty_config \
+spear1310_usbtty_nand_config : unconfig
+       @$(MKCONFIG) -n $@ -t $(@:_config=) spear13xx_evb arm arm_cortexa8 
spear1310 spear spear13xx
+
 suen3_config:  unconfig
        @$(MKCONFIG) $(@:_config=) arm arm926ejs km_arm keymile kirkwood
 
diff --git a/arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c 
b/arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c
index 4720b60..bf0da29 100644
--- a/arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c
+++ b/arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c
@@ -123,7 +123,11 @@ int arch_cpu_init(void)
 #ifdef CONFIG_DISPLAY_CPUINFO
 int print_cpuinfo(void)
 {
+#if defined(CONFIG_SPEAR1300)
        printf("CPU:   SPEAr1300\n");
+#elif defined(CONFIG_SPEAR1310)
+       printf("CPU:   SPEAr1310\n");
+#endif
        return 0;
 }
 #endif
diff --git a/board/spear/spear1310/Makefile b/board/spear/spear1310/Makefile
new file mode 100644
index 0000000..661a6a0
--- /dev/null
+++ b/board/spear/spear1310/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  := spear1310.o
+SOBJS  :=
+
+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
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/spear/spear1310/config.mk b/board/spear/spear1310/config.mk
new file mode 100644
index 0000000..4bd519c
--- /dev/null
+++ b/board/spear/spear1310/config.mk
@@ -0,0 +1,28 @@
+#
+# (C) Copyright 2010
+# Vipin Kumar, ST Microelectronics <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
+#
+
+#########################################################################
+
+TEXT_BASE = 0x00700000
+
+ALL += $(obj)u-boot.img
diff --git a/board/spear/spear1310/spear1310.c 
b/board/spear/spear1310/spear1310.c
new file mode 100644
index 0000000..852a096
--- /dev/null
+++ b/board/spear/spear1310/spear1310.c
@@ -0,0 +1,70 @@
+/*
+ * (C) Copyright 2010
+ * 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 <netdev.h>
+#include <nand.h>
+#include <linux/mtd/st_smi.h>
+#include <linux/mtd/fsmc_nand.h>
+#include <asm/arch/hardware.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+       gd->bd->bi_arch_number = MACH_TYPE_SPEAR1310;
+       gd->bd->bi_boot_params = CONFIG_BOOT_PARAMS_ADDR;
+
+#if defined(CONFIG_ST_SMI)
+       smi_init();
+#endif
+       return 0;
+}
+
+/*
+ * board_nand_init - Board specific NAND initialization
+ * @nand:      mtd private chip structure
+ *
+ * Called by nand_init_chip to initialize the board specific functions
+ */
+
+int board_nand_init(struct nand_chip *nand)
+{
+#if defined(CONFIG_NAND_FSMC)
+       return fsmc_nand_init(nand);
+#else
+       return -1;
+#endif
+}
+
+#if defined(CONFIG_CMD_NET)
+int board_eth_init(bd_t *bis)
+{
+       int ret = 0;
+#if defined(CONFIG_DESIGNWARE_ETH)
+       if (designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY) >= 0)
+               ret++;
+#endif
+       return ret;
+}
+#endif
diff --git a/doc/README.spear b/doc/README.spear
index 94b492f..6839c23 100644
--- a/doc/README.spear
+++ b/doc/README.spear
@@ -6,10 +6,11 @@ SPEAr600 is also known as SPEArPlus and SPEAr300 is also 
known as SPEArBasic
 The SPEAr SoC family embeds a customizable logic that can be programmed
 one-time by a customer at silicon mask level (i.e. not at runtime!).
 
-U-Boot supports five spear SoCs: SPEAr600, SPEAr3xx, SPEAr1300
+U-Boot supports six spear SoCs: SPEAr600, SPEAr3xx, SPEAr1300, SPEAr1310
 
-4 SoCs (SPEAr3xx and SPEAr600) share common peripherals. SPEAr1300 is based on
-ARM CortexA9 core and other peripherals are common
+4 SoCs (SPEAr3xx and SPEAr600) are based on arm926ejs core and share
+common peripherals. SPEAr13xx SoCs are based on ARM CortexA9 core
+and other peripherals are common.
 
 1. ARM926ejs core based (sp600 has two cores, the 2nd handled only in Linux)
 2. FastEthernet (sp600 has Gbit version, but same controller - GMAC)
@@ -61,6 +62,10 @@ Build options
        make spear1300_nand_config
        make spear1300_usbtty_config
        make spear1300_usbtty_nand_config
+       make spear1310_config
+       make spear1310_nand_config
+       make spear1310_usbtty_config
+       make spear1310_usbtty_nand_config
 
 Further options
        make FLASH=PNOR (supported by SPEAr310 and SPEAr320)
diff --git a/include/configs/spear13xx_evb.h b/include/configs/spear13xx_evb.h
index 195a08e..820170d 100644
--- a/include/configs/spear13xx_evb.h
+++ b/include/configs/spear13xx_evb.h
@@ -29,6 +29,11 @@
 #define CONFIG_SPEAR1300                       1
 #endif
 
+#if defined(CONFIG_MK_spear1310)
+#define CONFIG_SPEAR13XX                       1
+#define CONFIG_SPEAR1310                       1
+#endif
+
 #if defined(CONFIG_MK_usbtty)
 #define CONFIG_SPEAR_USBTTY                    1
 #endif
-- 
1.6.0.2

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

Reply via email to