All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vipin KUMAR <vipin.kumar@st.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 28/28] SPEAr1310 : spear1310 support added
Date: Wed, 14 Jul 2010 10:40:04 +0530	[thread overview]
Message-ID: <1279084204-3263-29-git-send-email-vipin.kumar@st.com> (raw)
In-Reply-To: <1279084204-3263-28-git-send-email-vipin.kumar@st.com>

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.kumar@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 <prakash@embedx.com>
 Vipin Kumar <vipin.kumar@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, wd at 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.kumar@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.kumar at 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

  reply	other threads:[~2010-07-14  5:10 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-14  5:09 [U-Boot] [PATCH 00/28] Support for SPEAr13xx boards added Vipin KUMAR
2010-07-14  5:09 ` [U-Boot] [PATCH 01/28] change_bit routine defined Vipin KUMAR
2010-07-14  5:09   ` [U-Boot] [PATCH 02/28] SPEAr : SMI erase and write timeouts increased Vipin KUMAR
2010-07-14  5:09     ` [U-Boot] [PATCH 03/28] SPEAr : Placing ethaddr write and read within CONFIG_CMD_NET Vipin KUMAR
2010-07-14  5:09       ` [U-Boot] [PATCH 04/28] SPEAr : Reducing the max RAM size to 128MB Vipin KUMAR
2010-07-14  5:09         ` [U-Boot] [PATCH 05/28] SPEAr : Basic arch related support added for SPEAr SoCs Vipin KUMAR
2010-07-14  5:09           ` [U-Boot] [PATCH 06/28] SPEAr : Network support configured for spear SoCs Vipin KUMAR
2010-07-14  5:09             ` [U-Boot] [PATCH 07/28] SPEAr : macb driver support added for spear310 and spear320 Vipin KUMAR
2010-07-14  5:09               ` [U-Boot] [PATCH 08/28] SPEAr : FSMC driver support added Vipin KUMAR
2010-07-14  5:09                 ` [U-Boot] [PATCH 09/28] SPEAr : Configuring FSMC driver for NAND interface Vipin KUMAR
2010-07-14  5:09                   ` [U-Boot] [PATCH 10/28] SPEAr : i2c driver moved completely into drivers/i2c Vipin KUMAR
2010-07-14  5:09                     ` [U-Boot] [PATCH 11/28] SPEAr : smi driver moved completely into drivers/mtd Vipin KUMAR
2010-07-14  5:09                       ` [U-Boot] [PATCH 12/28] SPEAr : USB Device Controller driver support added Vipin KUMAR
2010-07-14  5:09                         ` [U-Boot] [PATCH 13/28] SPEAr : Supporting various configurations for spear3xx and spear6xx boards Vipin KUMAR
2010-07-14  5:09                           ` [U-Boot] [PATCH 14/28] SPEAr : Basic spear1300 architecture support added Vipin KUMAR
2010-07-14  5:09                             ` [U-Boot] [PATCH 15/28] SPEAr : spear1300 SoC " Vipin KUMAR
2010-07-14  5:09                               ` [U-Boot] [PATCH 16/28] SPEAr : Removing extraneous code Vipin KUMAR
2010-07-14  5:09                                 ` [U-Boot] [PATCH 17/28] SPEAr : USB device controller bugfixes Vipin KUMAR
2010-07-14  5:09                                   ` [U-Boot] [PATCH 18/28] SPEAr : Network driver fixes Vipin KUMAR
2010-07-14  5:09                                     ` [U-Boot] [PATCH 19/28] SPEAr : Changing the default environment variable bootargs Vipin KUMAR
2010-07-14  5:09                                       ` [U-Boot] [PATCH 20/28] SPEAr1300: Workaround the UHC problem (issue #101435) Vipin KUMAR
2010-07-14  5:09                                         ` [U-Boot] [PATCH 21/28] Enable high speed support for usb device framework and usbtty Vipin KUMAR
2010-07-14  5:09                                           ` [U-Boot] [PATCH 22/28] SPEAr : High speed support for designware peripheral Vipin KUMAR
2010-07-14  5:09                                             ` [U-Boot] [PATCH 23/28] SPEAr : Enable usb device high speed support Vipin KUMAR
2010-07-14  5:10                                               ` [U-Boot] [PATCH 24/28] SPEAr : Network support configuration Vipin KUMAR
2010-07-14  5:10                                                 ` [U-Boot] [PATCH 25/28] SPEAr : Enabling GPT clock explicitly Vipin KUMAR
2010-07-14  5:10                                                   ` [U-Boot] [PATCH 26/28] SPEAr : smi_init moved to board_init Vipin KUMAR
2010-07-14  5:10                                                     ` [U-Boot] [PATCH 27/28] SPEAr : Ethernet issue workaround is not needed when uboot is acting as flashing Vipin KUMAR
2010-07-14  5:10                                                       ` Vipin KUMAR [this message]
2010-07-15 22:14                                                         ` [U-Boot] [PATCH 28/28] SPEAr1310 : spear1310 support added Wolfgang Denk
2010-07-15 22:12                                                       ` [U-Boot] [PATCH 27/28] SPEAr : Ethernet issue workaround is not needed when uboot is acting as flashing Wolfgang Denk
2010-07-15 22:10                                                   ` [U-Boot] [PATCH 25/28] SPEAr : Enabling GPT clock explicitly Wolfgang Denk
2010-07-15 22:09                                                 ` [U-Boot] [PATCH 24/28] SPEAr : Network support configuration Wolfgang Denk
2010-08-01 11:06                                             ` [U-Boot] [PATCH 22/28] SPEAr : High speed support for designware peripheral Remy Bohmer
2010-07-15 22:08                                           ` [U-Boot] [PATCH 21/28] Enable high speed support for usb device framework and usbtty Wolfgang Denk
2010-08-01 11:11                                   ` [U-Boot] [PATCH 17/28] SPEAr : USB device controller bugfixes Remy Bohmer
2010-07-15 22:04                               ` [U-Boot] [PATCH 15/28] SPEAr : spear1300 SoC support added Wolfgang Denk
2010-07-16  4:45                                 ` Vipin KUMAR
2010-07-15 22:01                             ` [U-Boot] [PATCH 14/28] SPEAr : Basic spear1300 architecture " Wolfgang Denk
2010-07-15 21:55                           ` [U-Boot] [PATCH 13/28] SPEAr : Supporting various configurations for spear3xx and spear6xx boards Wolfgang Denk
2010-07-16 11:24                             ` Wolfgang Denk
2010-07-16 11:41                               ` Reinhard Meyer
2010-07-19  3:41                               ` Vipin KUMAR
2010-08-01 11:08                         ` [U-Boot] [PATCH 12/28] SPEAr : USB Device Controller driver support added Remy Bohmer
2010-07-15 21:41                 ` [U-Boot] [PATCH 08/28] SPEAr : FSMC " Wolfgang Denk
2010-07-15 21:38               ` [U-Boot] [PATCH 07/28] SPEAr : macb driver support added for spear310 and spear320 Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1279084204-3263-29-git-send-email-vipin.kumar@st.com \
    --to=vipin.kumar@st.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.