Skip to contentSkip to conversation

Network support for spear platforms and SPEAr1300

PATCH New Vipin KUMAR 4 participants 23 messages Jun 29, 2010 – Jul 12, 2010

Subsystems (9)
lore
Share & tools
lore
#0 lore raw

v5 cover Network support for spear platforms and SPEAr1300

Dear Wolfgang, Tom,

The following set of patches is the fifth iteration of patches for the following changes
-> Network device driver for synopsys designware peripheral
-> SPEAr1300 SoC support
-> A few other misc changes and bugfixes

These also include the feedbacks given by Tom and Ben
These set of patches are rebased on e5ed138a23923ebe61843244748d98d3dbc04777

Please include these changes in the mainline u-boot

Regards
Vipin

Vipin KUMAR (18):
change_bit routine defined
SPEAr : SMI erase and write timeouts increased
SPEAr : Placing ethaddr write and read within CONFIG_CMD_NET SPEAr : Reducing the max RAM size to 128MB
SPEAr : Basic arch related support added for SPEAr SoCs SPEAr : Network driver support added
SPEAr : Network support configured for spear SoCs
SPEAr : macb driver support added for spear310 and spear320 SPEAr : FSMC driver support added
SPEAr : Configuring FSMC driver for NAND interface
SPEAr : i2c driver moved completely into drivers/i2c SPEAr : smi driver moved completely into drivers/mtd SPEAr : USB Device Controller driver support added
SPEAr : Supporting various configurations for spear3xx and spear6xx
boards
SPEAr : Basic spear1300 architecture support added
SPEAr : spear1300 SoC support added
SPEAr : Removing extraneous code
SPEAr : USB device controller bugfixes

 MAINTAINERS                                        |    1 +
 MAKEALL                                            |    1 +
 Makefile                                           |   28 +-
 arch/arm/cpu/arm926ejs/spear/Makefile              |    3 +-
 arch/arm/cpu/arm926ejs/spear/cpu.c                 |   78 +++
 arch/arm/cpu/arm_cortexa8/spear13xx/Makefile       |   52 ++
 arch/arm/cpu/arm_cortexa8/spear13xx/cache.S        |  114 +++++
 arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c          |   96 ++++
 .../arm_cortexa8/spear13xx/reset.c}                |   52 +--
 arch/arm/cpu/arm_cortexa8/spear13xx/timer.c        |  138 +++++
 .../arm/include/asm/arch-spear/clk.h               |   26 +-
 arch/arm/include/asm/arch-spear/hardware.h         |   16 +-
 arch/arm/include/asm/arch-spear/spr_misc.h         |    5 +
 .../arm/include/asm/arch-spear13xx/hardware.h      |   33 +-
 arch/arm/include/asm/arch-spear13xx/spr_gpt.h      |   85 ++++
 arch/arm/include/asm/arch-spear13xx/spr_misc.h     |  317 ++++++++++++
 .../arm/include/asm/arch-spear13xx/sys_proto.h     |   29 +-
 arch/arm/include/asm/bitops.h                      |   11 +-
 board/spear/common/Makefile                        |   10 +-
 board/spear/common/spr_misc.c                      |   32 +-
 board/spear/spear1300/Makefile                     |   51 ++
 board/spear/spear1300/config.mk                    |   28 +
 board/spear/spear1300/spear1300.c                  |   88 ++++
 .../spear/spear1300/spr_lowlevel_init.S            |   35 +-
 board/spear/spear300/config.mk                     |   11 -
 board/spear/spear300/spear300.c                    |   18 +-
 board/spear/spear310/config.mk                     |   11 -
 board/spear/spear310/spear310.c                    |   35 ++-
 board/spear/spear320/config.mk                     |   11 -
 board/spear/spear320/spear320.c                    |   23 +-
 board/spear/spear600/config.mk                     |   11 -
 board/spear/spear600/spear600.c                    |   18 +-
 doc/README.designware_eth                          |   25 +
 doc/README.spear                                   |   46 ++-
 drivers/i2c/Makefile                               |    2 +-
 drivers/i2c/{spr_i2c.c => designware_i2c.c}        |    4 +-
 .../spr_i2c.h => drivers/i2c/designware_i2c.h      |    6 +-
 drivers/mtd/Makefile                               |    2 +-
 drivers/mtd/nand/Makefile                          |    2 +-
 drivers/mtd/nand/fsmc_nand.c                       |  366 ++++++++++++++
 drivers/mtd/nand/spr_nand.c                        |  124 -----
 drivers/mtd/{spr_smi.c => st_smi.c}                |   59 ++-
 .../arch-spear/spr_smi.h => drivers/mtd/st_smi.h   |    8 +-
 drivers/net/Makefile                               |    1 +
 drivers/net/designware.c                           |  531 ++++++++++++++++++++
 drivers/net/designware.h                           |  264 ++++++++++
 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                     |   33 +-
 include/configs/spear13xx_evb.h                    |  202 ++++++++
 include/configs/{spear3xx.h => spear3xx_evb.h}     |   30 ++
 include/configs/{spear6xx.h => spear6xx_evb.h}     |   13 +
 include/linux/mtd/fsmc_nand.h                      |  104 ++++
 include/netdev.h                                   |    1 +
 include/usb/{spr_udc.h => designware_udc.h}        |    6 +-
 56 files changed, 2997 insertions(+), 421 deletions(-)
 create mode 100644 arch/arm/cpu/arm926ejs/spear/cpu.c
 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
 rename arch/arm/{include/asm/arch-spear/spr_nand.h => cpu/arm_cortexa8/spear13xx/reset.c} (50%)
 mode change 100644 => 100755
 create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/timer.c
 copy include/configs/spear6xx.h => arch/arm/include/asm/arch-spear/clk.h (64%)
 copy include/configs/spear6xx.h => arch/arm/include/asm/arch-spear13xx/hardware.h (58%)
 create mode 100644 arch/arm/include/asm/arch-spear13xx/spr_gpt.h
 create mode 100644 arch/arm/include/asm/arch-spear13xx/spr_misc.h
 copy include/configs/spear6xx.h => arch/arm/include/asm/arch-spear13xx/sys_proto.h (64%)
 create mode 100644 board/spear/spear1300/Makefile
 create mode 100644 board/spear/spear1300/config.mk
 create mode 100644 board/spear/spear1300/spear1300.c
 copy include/configs/spear6xx.h => board/spear/spear1300/spr_lowlevel_init.S (56%)
 create mode 100644 doc/README.designware_eth
 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%)
 create mode 100644 drivers/mtd/nand/fsmc_nand.c
 delete mode 100644 drivers/mtd/nand/spr_nand.c
 rename drivers/mtd/{spr_smi.c => st_smi.c} (94%)
 rename arch/arm/include/asm/arch-spear/spr_smi.h => drivers/mtd/st_smi.h (96%)
 create mode 100644 drivers/net/designware.c
 create mode 100644 drivers/net/designware.h
 rename drivers/usb/gadget/{spr_udc.c => designware_udc.c} (91%)
 create mode 100644 include/configs/spear13xx_evb.h
 rename include/configs/{spear3xx.h => spear3xx_evb.h} (85%)
 rename include/configs/{spear6xx.h => spear6xx_evb.h} (82%)
 create mode 100644 include/linux/mtd/fsmc_nand.h
 rename include/usb/{spr_udc.h => designware_udc.h} (98%)
#1 lore raw

PATCH v5 1/18 change_bit routine defined

From: Vipin KUMAR <[email protected]>

change_bit routine is left implementation dependent until now. This routine is now defined for arm platforms in asm-arm/bitops.h

The Flexible Static memory controller driver, placed in mtd/nand/fsmc_nand.c needs this routine. FSMC is a memory controller peripheral from ST. The new driver implements the NAND interface part of the peripheral.

---
 arch/arm/include/asm/bitops.h |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
arch/arm/include/asm/bitops.h +9 -2
index 270f163..435857b 100644
@@ -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);
Signature · 1 line
1.6.0.2
#2 lore raw

PATCH v5 2/18 SPEAr : SMI erase and write timeouts increased

From: Vipin KUMAR <[email protected]>

SMI driver fails because of low timeout values. Increasing the write mode timeout and transfer timeouts to 15 ms

---
 arch/arm/include/asm/arch-spear/spr_smi.h |    4 +-
 drivers/mtd/spr_smi.c                     |   57 ++++++++++++++++++-----------
 2 files changed, 38 insertions(+), 23 deletions(-)
arch/arm/include/asm/arch-spear/spr_smi.h +2 -2
index 06df745..0cca000 100644
@@ -109,7 +109,7 @@ struct flash_dev {
 };
 
 #define SFLASH_PAGE_SIZE	0x100	/* flash page size */
-#define XFER_FINISH_TOUT	2	/* xfer finish timeout */
-#define WMODE_TOUT		2	/* write enable timeout */
+#define XFER_FINISH_TOUT	15	/* xfer finish timeout(in ms) */
+#define WMODE_TOUT		15	/* write enable timeout(in ms) */
 
 #endif
drivers/mtd/spr_smi.c +36 -21

133 lines not on this page · raw message

Signature · 1 line
1.6.0.2
#3 lore raw

PATCH v5 3/18 SPEAr : Placing ethaddr write and read within CONFIG_CMD_NET

From: Vipin KUMAR <[email protected]>

ethaddr can be optionally read from i2c memory. So, chip_config command supports reading/writing hw mac id into i2c memory. Placing this code within CONFIG_CMD_NET as this would only be needed when network interface is configured

---
 board/spear/common/spr_misc.c |   32 +++++++++++++++++++++++---------
 doc/README.spear              |    8 ++++++++
 2 files changed, 31 insertions(+), 9 deletions(-)
board/spear/common/spr_misc.c +23 -9
index e356912..181e3b2 100644
@@ -38,6 +38,10 @@
 DECLARE_GLOBAL_DATA_PTR;
 static struct chip_data chip_data;
 
+#if defined(CONFIG_CMD_NET)
+static int i2c_read_mac(uchar *buffer);
+#endif
+
 int dram_init(void)
 {
 	struct xloader_table *xloader_tb =
@@ -166,6 +170,7 @@ int spear_board_init(ulong mach_type)
 	return 0;
 }
 
+#if defined(CONFIG_CMD_NET)
 static int i2c_read_mac(uchar *buffer)
 {
 	u8 buf[2];
@@ -198,22 +203,24 @@ static int write_mac(uchar *mac)
 	/* check if valid MAC address is saved in I2C EEPROM or not? */
 	if ((buf[0] == MAGIC_BYTE0) && (buf[1] == MAGIC_BYTE1)) {
 		i2c_write(CONFIG_I2C_CHIPADDRESS, MAC_OFF, 1, mac, MAC_LEN);
-		puts("I2C EEPROM written with mac address \n");
+		puts("I2C EEPROM written with mac address\n");
 		return 0;
 	}
 
-	puts("I2C EEPROM writing failed \n");
+	puts("I2C EEPROM writing failed\n");
 	return -1;
 }
+#endif
 
 int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
 	void (*sram_setfreq) (unsigned int, unsigned int);
 	struct chip_data *chip = &chip_data;
+	unsigned int frequency;
+
+#if defined(CONFIG_CMD_NET)
 	unsigned char mac[6];
-	unsigned int reg, frequency;
-	char *s, *e;
-	char i2c_mac[20];
+#endif
 
 	if ((argc > 3) || (argc < 2)) {
 		cmd_usage(cmdtp);
@@ -244,9 +251,12 @@ int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 		}
 
 		return 0;
+
+#if defined(CONFIG_CMD_NET)
 	} else if (!strcmp(argv[1], "ethaddr")) {
 
-		s = argv[2];
+		u32 reg;
+		char *e, *s = argv[2];
 		for (reg = 0; reg < 6; ++reg) {
 			mac[reg] = s ? simple_strtoul(s, &e, 16) : 0;
 			if (s)
@@ -255,6 +265,7 @@ int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 		write_mac(mac);
 
 		return 0;
+#endif
 	} else if (!strcmp(argv[1], "print")) {
 
 		if (chip->cpufreq == -1)
@@ -274,13 +285,13 @@ int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 		else
 			printf("DDR Type    = Not Known\n");
 
+#if defined(CONFIG_CMD_NET)
 		if (!i2c_read_mac(mac)) {
-			sprintf(i2c_mac, "%pM", mac);
-			printf("Ethaddr (from i2c mem) = %s\n", i2c_mac);
+			printf("Ethaddr (from i2c mem) = %pM\n", mac);
 		} else {
 			printf("Ethaddr (from i2c mem) = Not set\n");
 		}
-
+#endif
 		printf("Xloader Rev = %s\n", chip->version);
 
 		return 0;
@@ -293,4 +304,7 @@ int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 U_BOOT_CMD(chip_config, 3, 1, do_chip_config,
 	   "configure chip",
 	   "chip_config cpufreq/ddrfreq frequency\n"
+#if defined(CONFIG_CMD_NET)
+	   "chip_config ethaddr XX:XX:XX:XX:XX:XX\n"
+#endif
 	   "chip_config print");
doc/README.spear +8 -0
index a8b1052..a6ff7fd 100644
@@ -46,3 +46,11 @@ Further options
 	make FLASH=PNOR (supported by SPEAr310 and SPEAr320)
 	- This option generates a uboot image that supports emi controller for
 	CFI compliant parallel NOR flash
+
+Mac id storage and retrieval in spear platforms
+
+Please read doc/README.enetaddr for the implementation guidelines for mac id
+usage. Basically, environment has precedence over board specific storage. The
+ethaddr beeing used for the network interface is always taken only from
+environment variables. Although, we can check the mac id programmed in i2c
+memory by using chip_config command
Signature · 1 line
1.6.0.2
#4 lore raw

PATCH v5 4/18 SPEAr : Reducing the max RAM size to 128MB

From: Vipin KUMAR <[email protected]>

---
 include/configs/spear-common.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/spear-common.h +1 -1
index cc52e39..b526558 100644
@@ -208,6 +208,6 @@
 /* Physical Memory Map */
 #define CONFIG_NR_DRAM_BANKS			1
 #define PHYS_SDRAM_1				0x00000000
-#define PHYS_SDRAM_1_MAXSIZE			0x40000000
+#define PHYS_SDRAM_1_MAXSIZE			0x08000000
 
 #endif
Signature · 1 line
1.6.0.2
#5 lore raw

PATCH v5 5/18 SPEAr : Basic arch related support added for SPEAr SoCs

From: Vipin KUMAR <[email protected]>

Adding CONFIG_DISPLAY_CPUINFO and CONFIG_ARCH_CPU_INIT support for SPEAr3xx and SPEAr6xx SoCs

CONFIG_DISPLAY_CPUINFO includes the built CPU related information

Earlier, architecture specific init code was mixed with board initialization code in board/spear/...
CONFIG_ARCH_CPU_INIT includes the architecture specific initialisation code with in arch/arm/spear/cpu.c

---
 arch/arm/cpu/arm926ejs/spear/Makefile      |    3 +-
 arch/arm/cpu/arm926ejs/spear/cpu.c         |   78 ++++++++++++++++++++++++++++
 arch/arm/include/asm/arch-spear/spr_misc.h |    5 ++
 include/configs/spear-common.h             |    2 +
 4 files changed, 87 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/cpu/arm926ejs/spear/cpu.c
arch/arm/cpu/arm926ejs/spear/Makefile +2 -1
index bf8dfa8..6ca8c6e 100644
@@ -25,7 +25,8 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(SOC).a
 
-COBJS	:= reset.o \
+COBJS	:= cpu.o \
+	   reset.o \
 	   timer.o
 SOBJS	:=
 
arch/arm/cpu/arm926ejs/spear/cpu.c new file +78 -0

78 lines not on this page · raw message

arch/arm/include/asm/arch-spear/spr_misc.h +5 -0
index 8b96d9b..045d2bb 100644
@@ -126,5 +126,10 @@ struct misc_regs {
 
 /* PERIPH1_CLKEN, PERIPH1_RST value */
 #define MISC_USBDENB			0x01000000
+#define MISC_ETHENB			0x00800000
+#define MISC_SMIENB			0x00200000
+#define MISC_FSMCENB			0x00000200
+#define MISC_I2CENB			0x00000080
+#define MISC_UART0ENB			0x00000008
 
 #endif
include/configs/spear-common.h +2 -0
index b526558..10beef7 100644
@@ -168,6 +168,8 @@
 #define CONFIG_ENV_SIZE				0x02000
 
 /* Miscellaneous configurable options */
+#define CONFIG_ARCH_CPU_INIT			1
+#define CONFIG_DISPLAY_CPUINFO			1
 #define CONFIG_BOOT_PARAMS_ADDR			0x00000100
 #define CONFIG_CMDLINE_TAG			1
 #define CONFIG_SETUP_MEMORY_TAGS		1
Signature · 1 line
1.6.0.2
#6 lore raw

PATCH v5 6/18 SPEAr : Network driver support added

From: Vipin KUMAR <[email protected]>

Designware network driver support added.
This is a Synopsys ethernet controller

---
 doc/README.designware_eth |   25 ++
 drivers/net/Makefile      |    1 +
 drivers/net/designware.c  |  531 +++++++++++++++++++++++++++++++++++++++++++++
 drivers/net/designware.h  |  264 ++++++++++++++++++++++
 include/netdev.h          |    1 +
 5 files changed, 822 insertions(+), 0 deletions(-)
 create mode 100644 doc/README.designware_eth
 create mode 100644 drivers/net/designware.c
 create mode 100644 drivers/net/designware.h
doc/README.designware_eth new file +25 -0
new file mode 100644
index 0000000..25ec6bd
@@ -0,0 +1,25 @@
+This driver supports Designware Ethernet Controller provided by Synopsis.
+
+The driver is enabled by CONFIG_DESIGNWARE_ETH.
+
+The driver has been developed and tested on SPEAr platforms. By default, the
+MDIO interface works at 100/Full. #defining the below options in board
+configuration file changes this behavior.
+
+Call an subroutine from respective board/.../board.c
+designware_initialize(u32 id, ulong base_addr, u32 phy_addr);
+
+The various options suported by the driver are
+1. CONFIG_DW_ALTDESCRIPTOR
+	Define this to use the Alternate/Enhanced Descriptor configurations.
+1. CONFIG_DW_AUTONEG
+	Define this to autonegotiate with the host before proceeding with mac
+	level configuration. This obviates the definitions of CONFIG_DW_SPEED10M
+	and CONFIG_DW_DUPLEXHALF.
+2. CONFIG_DW_SPEED10M
+	Define this to change the default behavior from 100Mbps to 10Mbps.
+3. CONFIG_DW_DUPLEXHALF
+	Define this to change the default behavior from Full Duplex to Half.
+4. CONFIG_DW_SEARCH_PHY
+	Define this to search the phy address. This would overwrite the value
+	passed as 3rd arg from designware_initialize routine.
drivers/net/Makefile +1 -0
index b75c02f..7a320fd 100644
@@ -34,6 +34,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
drivers/net/designware.c new file +531 -0

531 lines not on this page · raw message

drivers/net/designware.h new file +264 -0

264 lines not on this page · raw message

include/netdev.h +1 -0
index 882642a..3abc944 100644
@@ -49,6 +49,7 @@ int bfin_EMAC_initialize(bd_t *bis);
 int cs8900_initialize(u8 dev_num, int base_addr);
 int dc21x4x_initialize(bd_t *bis);
 int davinci_emac_initialize(void);
+int designware_initialize(u32 id, ulong base_addr, u32 phy_addr);
 int dnet_eth_initialize(int id, void *regs, unsigned int phy_addr);
 int e1000_initialize(bd_t *bis);
 int eepro100_initialize(bd_t *bis);
Signature · 1 line
1.6.0.2
#7 lore raw

PATCH v5 7/18 SPEAr : Network support configured for spear SoCs

From: Vipin KUMAR <[email protected]>

---
 arch/arm/include/asm/arch-spear/hardware.h |    1 +
 board/spear/spear300/spear300.c            |   11 +++++++++++
 board/spear/spear310/spear310.c            |   11 +++++++++++
 board/spear/spear320/spear320.c            |   11 +++++++++++
 board/spear/spear600/spear600.c            |   11 +++++++++++
 include/configs/spear-common.h             |   14 ++++++++++++--
 include/configs/spear3xx.h                 |    3 +++
 7 files changed, 60 insertions(+), 2 deletions(-)
arch/arm/include/asm/arch-spear/hardware.h +1 -0
index 818f36c..39d64b6 100644
@@ -31,6 +31,7 @@
 #define CONFIG_SPEAR_SYSCNTLBASE		(0xFCA00000)
 #define CONFIG_SPEAR_TIMERBASE			(0xFC800000)
 #define CONFIG_SPEAR_MISCBASE			(0xFCA80000)
+#define CONFIG_SPEAR_ETHBASE			(0xE0800000)
 
 #define CONFIG_SYS_NAND_CLE			(1 << 16)
 #define CONFIG_SYS_NAND_ALE			(1 << 17)
board/spear/spear300/spear300.c +11 -0
index 60ee544..744a17b 100644
@@ -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,13 @@ int board_nand_init(struct nand_chip *nand)
 
 	return -1;
 }
+
+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;
+}
board/spear/spear310/spear310.c +11 -0
index 03dfe16..666ed48 100644
@@ -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,13 @@ int board_nand_init(struct nand_chip *nand)
 
 	return -1;
 }
+
+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;
+}
board/spear/spear320/spear320.c +11 -0
index 2ba2dbb..89b074a 100644
@@ -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,13 @@ int board_nand_init(struct nand_chip *nand)
 
 	return -1;
 }
+
+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;
+}
board/spear/spear600/spear600.c +11 -0
index eef9a37..759b4fa 100644
@@ -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,13 @@ int board_nand_init(struct nand_chip *nand)
 
 	return -1;
 }
+
+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;
+}
include/configs/spear-common.h +12 -2
index 10beef7..1398837 100644
@@ -27,6 +27,14 @@
  * Common configurations used for both spear3xx as well as spear6xx
  */
 
+/* Ethernet driver configuration */
+#define CONFIG_MII
+#define CONFIG_DESIGNWARE_ETH
+#define CONFIG_DW_SEARCH_PHY
+#define CONFIG_DW0_PHY				1
+#define CONFIG_NET_MULTI
+#define CONFIG_PHY_RESET_DELAY			(10000)		/* in usec */
+
 /* USBD driver configuration */
 #define CONFIG_SPEARUDC
 #define CONFIG_USB_DEVICE
@@ -99,11 +107,13 @@
 #define CONFIG_CMD_MEMORY
 #define CONFIG_CMD_RUN
 #define CONFIG_CMD_SAVES
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_MII
+#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
include/configs/spear3xx.h +3 -0
index 0248aba..502c50f 100644
@@ -41,6 +41,9 @@
 
 #include <configs/spear-common.h>
 
+/* Ethernet driver configuration */
+#define CONFIG_DW_ALTDESCRIPTOR			1
+
 /* Serial Configuration (PL011) */
 #define CONFIG_SYS_SERIAL0			0xD0000000
 
Signature · 1 line
1.6.0.2
#8 lore raw

PATCH v5 8/18 SPEAr : macb driver support added for spear310 and spear320

From: Vipin KUMAR <[email protected]>

SPEAr310 and SPEAr320 SoCs have an extra ethernet controller. The driver for this device is already supported by u-boot, so configuring board configuration file and defining base addresses etc to make use of the common driver

---
 arch/arm/include/asm/arch-spear/clk.h      |   27 +++++++++++++++++++++++++++
 arch/arm/include/asm/arch-spear/hardware.h |    7 +++++++
 board/spear/spear310/spear310.c            |   17 +++++++++++++++++
 board/spear/spear320/spear320.c            |    5 +++++
 include/configs/spear3xx.h                 |   13 +++++++++++++
 5 files changed, 69 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-spear/clk.h
arch/arm/include/asm/arch-spear/clk.h new file +27 -0
new file mode 100644
index 0000000..a45ec18
@@ -0,0 +1,27 @@
+/*
+ * (C) Copyright 2010
+ * Vipin Kumar, STMicroelectronics, <[email protected]>
+ *
+ * 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 83000000;
+}
arch/arm/include/asm/arch-spear/hardware.h +7 -0
index 39d64b6..9f1e154 100644
@@ -56,6 +56,11 @@
 #define CONFIG_SPEAR_EMIBASE			(0x4F000000)
 #define CONFIG_SPEAR_RASBASE			(0xB4000000)
 
+#define CONFIG_SYS_MACB0_BASE			(0xB0000000)
+#define CONFIG_SYS_MACB1_BASE			(0xB0800000)
+#define CONFIG_SYS_MACB2_BASE			(0xB1000000)
+#define CONFIG_SYS_MACB3_BASE			(0xB1800000)
+
 #elif defined(CONFIG_SPEAR320)
 #define CONFIG_SYS_I2C_BASE			(0xD0180000)
 #define CONFIG_SPEAR_FSMCBASE			(0x4C000000)
@@ -63,5 +68,7 @@
 #define CONFIG_SPEAR_EMIBASE			(0x40000000)
 #define CONFIG_SPEAR_RASBASE			(0xB3000000)
 
+#define CONFIG_SYS_MACB0_BASE			(0xAA000000)
+
 #endif
 #endif /* _ASM_ARCH_HARDWARE_H */
board/spear/spear310/spear310.c +17 -0
index 666ed48..193fa0c 100644
@@ -66,5 +66,22 @@ int board_eth_init(bd_t *bis)
 	if (designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY) >= 0)
 		ret++;
 #endif
+#if defined(CONFIG_MACB)
+	if (macb_eth_initialize(0, (void *)CONFIG_SYS_MACB0_BASE,
+				CONFIG_MACB0_PHY) >= 0)
+		ret++;
+
+	if (macb_eth_initialize(1, (void *)CONFIG_SYS_MACB1_BASE,
+				CONFIG_MACB1_PHY) >= 0)
+		ret++;
+
+	if (macb_eth_initialize(2, (void *)CONFIG_SYS_MACB2_BASE,
+				CONFIG_MACB2_PHY) >= 0)
+		ret++;
+
+	if (macb_eth_initialize(3, (void *)CONFIG_SYS_MACB3_BASE,
+				CONFIG_MACB3_PHY) >= 0)
+		ret++;
+#endif
 	return ret;
 }
board/spear/spear320/spear320.c +5 -0
index 89b074a..0d9eed4 100644
@@ -66,5 +66,10 @@ int board_eth_init(bd_t *bis)
 	if (designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY) >= 0)
 		ret++;
 #endif
+#if defined(CONFIG_MACB)
+	if (macb_eth_initialize(0, (void *)CONFIG_SYS_MACB0_BASE,
+				CONFIG_MACB0_PHY) >= 0)
+		ret++;
+#endif
 	return ret;
 }
include/configs/spear3xx.h +13 -0
index 502c50f..689d914 100644
@@ -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				1
+#define CONFIG_MACB0_PHY			0x01
+
+#endif
+
 /* Serial Configuration (PL011) */
 #define CONFIG_SYS_SERIAL0			0xD0000000
 
Signature · 1 line
1.6.0.2
#9 lore raw

PATCH v5 9/18 SPEAr : FSMC driver support added

From: Vipin KUMAR <[email protected]>

Flexible static memory controller is a peripheral provided by ST, which controls the access to NAND chips along with many other memory device chips eg NOR, SRAM.

This patch adds the driver support for FSMC controller interfacing with NAND memory.

---
 drivers/mtd/nand/Makefile     |    1 +
 drivers/mtd/nand/fsmc_nand.c  |  366 +++++++++++++++++++++++++++++++++++++++++
 include/linux/mtd/fsmc_nand.h |  104 ++++++++++++
 3 files changed, 471 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mtd/nand/fsmc_nand.c
 create mode 100644 include/linux/mtd/fsmc_nand.h
drivers/mtd/nand/Makefile +1 -0
index 28f27da..4c6b54f 100644
@@ -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
drivers/mtd/nand/fsmc_nand.c new file +366 -0

366 lines not on this page · raw message

include/linux/mtd/fsmc_nand.h new file +104 -0

104 lines not on this page · raw message

Signature · 1 line
1.6.0.2
#10 lore raw

PATCH v5 10/18 SPEAr : Configuring FSMC driver for NAND interface

From: Vipin KUMAR <[email protected]>

Since FSMC is a standard IP and it supports different memory interfaces, it is supported independent of spear platform and spear is configured to use that driver for interfacing with the NAND device

Spear platform uses generic FSMC driver and spear specific files i.e drivers/mtd/nand/spr_nand.c, arch/arm/include/asm/arch-spear/spr_nand.h are removed

---
 arch/arm/include/asm/arch-spear/hardware.h |    8 +-
 arch/arm/include/asm/arch-spear/spr_nand.h |   57 -------------
 board/spear/spear300/spear300.c            |    7 +-
 board/spear/spear310/spear310.c            |    7 +-
 board/spear/spear320/spear320.c            |    7 +-
 board/spear/spear600/spear600.c            |    7 +-
 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, 28 insertions(+), 199 deletions(-)
 delete mode 100644 arch/arm/include/asm/arch-spear/spr_nand.h
 delete mode 100644 drivers/mtd/nand/spr_nand.c
arch/arm/include/asm/arch-spear/hardware.h +4 -4
index 9f1e154..52037b6 100644
@@ -38,15 +38,15 @@
 
 #if defined(CONFIG_SPEAR600)
 #define CONFIG_SYS_I2C_BASE			(0xD0200000)
-#define CONFIG_SPEAR_FSMCBASE			(0xD1800000)
+#define CONFIG_SYS_FSMC_BASE			(0xD1800000)
 
 #elif defined(CONFIG_SPEAR300)
 #define CONFIG_SYS_I2C_BASE			(0xD0180000)
-#define CONFIG_SPEAR_FSMCBASE			(0x94000000)
+#define CONFIG_SYS_FSMC_BASE			(0x94000000)
 
 #elif defined(CONFIG_SPEAR310)
 #define CONFIG_SYS_I2C_BASE			(0xD0180000)
-#define CONFIG_SPEAR_FSMCBASE			(0x44000000)
+#define CONFIG_SYS_FSMC_BASE			(0x44000000)
 
 #undef CONFIG_SYS_NAND_CLE
 #undef CONFIG_SYS_NAND_ALE
@@ -63,7 +63,7 @@
 
 #elif defined(CONFIG_SPEAR320)
 #define CONFIG_SYS_I2C_BASE			(0xD0180000)
-#define CONFIG_SPEAR_FSMCBASE			(0x4C000000)
+#define CONFIG_SYS_FSMC_BASE			(0x4C000000)
 
 #define CONFIG_SPEAR_EMIBASE			(0x40000000)
 #define CONFIG_SPEAR_RASBASE			(0xB3000000)
arch/arm/include/asm/arch-spear/spr_nand.h deleted +0 -57

57 lines not on this page · raw message

board/spear/spear300/spear300.c +4 -3
index 744a17b..d9f9aca 100644
@@ -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)
 {
@@ -47,14 +47,15 @@ int board_nand_init(struct nand_chip *nand)
 	struct misc_regs *const misc_regs_p =
 	    (struct misc_regs *)CONFIG_SPEAR_MISCBASE;
 
+#if defined(CONFIG_NAND_FSMC)
 	if (((readl(&misc_regs_p->auto_cfg_reg) & MISC_SOCCFGMSK) ==
 	     MISC_SOCCFG30) ||
 	    ((readl(&misc_regs_p->auto_cfg_reg) & MISC_SOCCFGMSK) ==
 	     MISC_SOCCFG31)) {
 
-		return spear_nand_init(nand);
+		return fsmc_nand_init(nand);
 	}
-
+#endif
 	return -1;
 }
 
board/spear/spear310/spear310.c +4 -3
index 193fa0c..9543b19 100644
@@ -26,10 +26,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)
 {
@@ -48,14 +48,15 @@ int board_nand_init(struct nand_chip *nand)
 	struct misc_regs *const misc_regs_p =
 	    (struct misc_regs *)CONFIG_SPEAR_MISCBASE;
 
+#if defined(CONFIG_NAND_FSMC)
 	if (((readl(&misc_regs_p->auto_cfg_reg) & MISC_SOCCFGMSK) ==
 	     MISC_SOCCFG30) ||
 	    ((readl(&misc_regs_p->auto_cfg_reg) & MISC_SOCCFGMSK) ==
 	     MISC_SOCCFG31)) {
 
-		return spear_nand_init(nand);
+		return fsmc_nand_init(nand);
 	}
-
+#endif
 	return -1;
 }
 
board/spear/spear320/spear320.c +4 -3
index 0d9eed4..77f3bc5 100644
@@ -26,10 +26,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)
 {
@@ -48,14 +48,15 @@ int board_nand_init(struct nand_chip *nand)
 	struct misc_regs *const misc_regs_p =
 	    (struct misc_regs *)CONFIG_SPEAR_MISCBASE;
 
+#if defined(CONFIG_NAND_FSMC)
 	if (((readl(&misc_regs_p->auto_cfg_reg) & MISC_SOCCFGMSK) ==
 	     MISC_SOCCFG30) ||
 	    ((readl(&misc_regs_p->auto_cfg_reg) & MISC_SOCCFGMSK) ==
 	     MISC_SOCCFG31)) {
 
-		return spear_nand_init(nand);
+		return fsmc_nand_init(nand);
 	}
-
+#endif
 	return -1;
 }
 
board/spear/spear600/spear600.c +4 -3
index 759b4fa..ec10396 100644
@@ -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)
 {
@@ -47,9 +47,10 @@ int board_nand_init(struct nand_chip *nand)
 	struct misc_regs *const misc_regs_p =
 	    (struct misc_regs *)CONFIG_SPEAR_MISCBASE;
 
+#if defined(CONFIG_NAND_FSMC)
 	if (!(readl(&misc_regs_p->auto_cfg_reg) & MISC_NANDDIS))
-		return spear_nand_init(nand);
-
+		return fsmc_nand_init(nand);
+#endif
 	return -1;
 }
 
drivers/mtd/nand/Makefile +0 -1
index 4c6b54f..36fc8b3 100644
@@ -48,7 +48,6 @@ COBJS-$(CONFIG_NAND_NDFC) += ndfc.o
 COBJS-$(CONFIG_NAND_NOMADIK) += nomadik.o
 COBJS-$(CONFIG_NAND_S3C2410) += s3c2410_nand.o
 COBJS-$(CONFIG_NAND_S3C64XX) += s3c64xx.o
-COBJS-$(CONFIG_NAND_SPEAR) += spr_nand.o
 COBJS-$(CONFIG_NAND_OMAP_GPMC) += omap_gpmc.o
 COBJS-$(CONFIG_NAND_PLAT) += nand_plat.o
 endif
drivers/mtd/nand/spr_nand.c deleted +0 -124

124 lines not on this page · raw message

include/configs/spear-common.h +1 -1
index 1398837..a54d534 100644
@@ -94,7 +94,7 @@
 #define CONFIG_SYS_LOADS_BAUD_CHANGE
 
 /* NAND FLASH Configuration */
-#define CONFIG_NAND_SPEAR			1
+#define CONFIG_NAND_FSMC			1
 #define CONFIG_SYS_MAX_NAND_DEVICE		1
 #define CONFIG_MTD_NAND_VERIFY_WRITE		1
 
include/configs/spear3xx.h +4 -0
index 689d914..fde505c 100644
@@ -133,6 +133,10 @@
 
 #endif
 
+/* NAND flash configuration */
+#define CONFIG_SYS_FSMC_NAND_SP			1
+#define CONFIG_SYS_FSMC_NAND_8BIT		1
+
 #if defined(CONFIG_SPEAR300)
 #define CONFIG_SYS_NAND_BASE			(0x80000000)
 
include/configs/spear6xx.h +3 -0
index 2ad5beb..2532344 100644
@@ -38,6 +38,9 @@
 #define CONFIG_PL01x_PORTS			{ (void *)CONFIG_SYS_SERIAL0, \
 						(void *)CONFIG_SYS_SERIAL1 }
 
+/* NAND flash configuration */
+#define CONFIG_SYS_FSMC_NAND_SP			1
+#define CONFIG_SYS_FSMC_NAND_8BIT		1
 #define CONFIG_SYS_NAND_BASE			(0xD2000000)
 
 #endif  /* __CONFIG_H */
Signature · 1 line
1.6.0.2
#11 lore raw

PATCH v5 11/18 SPEAr : i2c driver moved completely into drivers/i2c

From: Vipin KUMAR <[email protected]>

The earlier i2c driver was specific to spear platforms. This patch implements the i2c controller as a generic driver which can be used by multiple platforms

The driver files are now renamed to designware_i2c.c and designware_i2c.h and these are moved into drivers/i2c folder for reusability by other platforms

---
 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%)
drivers/i2c/Makefile +1 -1
index d2c2515..099a6cd 100644
@@ -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)
drivers/i2c/designware_i2c.c renamed from drivers/i2c/spr_i2c.c +2 -2
similarity index 98%
rename from drivers/i2c/spr_i2c.c
rename to drivers/i2c/designware_i2c.c
index eabfe84..d352146 100644
@@ -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.
  */
drivers/i2c/designware_i2c.h renamed from arch/arm/include/asm/arch-spear/spr_i2c.h +3 -3
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
@@ -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		400000
 #define I2C_STANDARD_SPEED	100000
 
-#endif /* __SPR_I2C_H_ */
+#endif /* __DW_I2C_H_ */
include/configs/spear-common.h +1 -1
index a54d534..2393bdf 100644
@@ -47,7 +47,7 @@
 
 /* I2C driver configuration */
 #define CONFIG_HARD_I2C
-#define CONFIG_SPEAR_I2C
+#define CONFIG_DW_I2C
 #define CONFIG_SYS_I2C_SPEED			400000
 #define CONFIG_SYS_I2C_SLAVE			0x02
 
Signature · 1 line
1.6.0.2
#12 lore raw

PATCH v5 12/18 SPEAr : smi driver moved completely into drivers/mtd

From: Vipin KUMAR <[email protected]>

SMI is the serial memory interface controller provided by ST.

The earlier driver was specific to spear platform. The driver files are renamed to st_smi.c and st_smi.h and moved into drivers/mtd folder for reusability by other platforms using smi controller peripheral.

---
 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%)
drivers/mtd/Makefile +1 -1
index cbf6f15..d868d27 100644
@@ -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)
drivers/mtd/st_smi.c renamed from drivers/mtd/spr_smi.c +1 -1
similarity index 99%
rename from drivers/mtd/spr_smi.c
rename to drivers/mtd/st_smi.c
index c6ba951..5193c1c 100644
@@ -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)
 
drivers/mtd/st_smi.h renamed from arch/arm/include/asm/arch-spear/spr_smi.h +2 -2
similarity index 99%
rename from arch/arm/include/asm/arch-spear/spr_smi.h
rename to drivers/mtd/st_smi.h
index 0cca000..afab546 100644
@@ -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.0000 . 0xFBFF.FFFF	64MB	SMI (Serial Flash Mem) */
 /* 0xFC00.0000 . 0xFC1F.FFFF	2MB	SMI (Serial Flash Reg.) */
include/configs/spear-common.h +3 -3
index 2393bdf..4aa0c15 100644
@@ -61,10 +61,10 @@
 #if defined(CONFIG_FLASH_PNOR)
 #define CONFIG_SPEAR_EMI			1
 #else
-#define CONFIG_SPEARSMI				1
+#define CONFIG_ST_SMI				1
 #endif
 
-#if defined(CONFIG_SPEARSMI)
+#if defined(CONFIG_ST_SMI)
 
 #define CONFIG_SYS_MAX_FLASH_BANKS		2
 #define CONFIG_SYS_FLASH_BASE			(0xF8000000)
@@ -130,7 +130,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
  */
Signature · 1 line
1.6.0.2
#13 lore raw

PATCH v5 13/18 SPEAr : USB Device Controller driver support added

From: Vipin KUMAR <[email protected]>

The earlier usb device controller driver was specific to spear platforms. This patch implements the usb device controller driver as a generic controller which can be reused by other platforms using this peripheral.

---
 drivers/serial/usbtty.h                            |    4 +-
 drivers/usb/gadget/Makefile                        |    2 +-
 drivers/usb/gadget/{spr_udc.c => designware_udc.c} |   57 ++++++++++----------
 include/configs/spear-common.h                     |    4 +-
 include/usb/{spr_udc.h => designware_udc.h}        |    6 +-
 5 files changed, 37 insertions(+), 36 deletions(-)
 rename drivers/usb/gadget/{spr_udc.c => designware_udc.c} (94%)
 rename include/usb/{spr_udc.h => designware_udc.h} (98%)
drivers/serial/usbtty.h +2 -2
index a23169a..38b407f 100644
@@ -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>
drivers/usb/gadget/Makefile +1 -1
index 1d7362d..3820f36 100644
@@ -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)
drivers/usb/gadget/designware_udc.c renamed from drivers/usb/gadget/spr_udc.c +28 -29

204 lines not on this page · raw message

include/configs/spear-common.h +3 -1
index 4aa0c15..c03520b 100644
@@ -36,14 +36,16 @@
 #define CONFIG_PHY_RESET_DELAY			(10000)		/* in usec */
 
 /* USBD driver configuration */
-#define CONFIG_SPEARUDC
+#define CONFIG_DW_UDC
 #define CONFIG_USB_DEVICE
 #define CONFIG_USB_TTY
 
 #define CONFIG_USBD_PRODUCT_NAME		"SPEAr SoC"
 #define CONFIG_USBD_MANUFACTURER		"ST Microelectronics"
 
+#if defined(CONFIG_USB_TTY)
 #define CONFIG_EXTRA_ENV_USBTTY			"usbtty=cdc_acm\0"
+#endif
 
 /* I2C driver configuration */
 #define CONFIG_HARD_I2C
include/usb/designware_udc.h renamed from include/usb/spr_udc.h +3 -3
similarity index 98%
rename from include/usb/spr_udc.h
rename to include/usb/designware_udc.h
index 2c332d5..ae98e8c 100644
@@ -21,8 +21,8 @@
  * MA 02111-1307 USA
  */
 
-#ifndef __SPR_UDC_H
-#define __SPR_UDC_H
+#ifndef __DW_UDC_H
+#define __DW_UDC_H
 
 /*
  * Defines for  USBD
@@ -227,4 +227,4 @@ void udc_startup_events(struct usb_device_instance *device);
 void udc_setup_ep(struct usb_device_instance *device, unsigned int ep,
 		  struct usb_endpoint_instance *endpoint);
 
-#endif /* __SPR_UDC_H */
+#endif /* __DW_UDC_H */
Signature · 1 line
1.6.0.2
#14 lore raw

PATCH v5 14/18 SPEAr : Supporting various configurations for spear3xx and spear6xx boards

From: Vipin KUMAR <[email protected]>

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

Also, renaming the include/configs/spearxxx.h files to spear3xx_evb.h, spear6xx_evb.h etc to depict evaluation board configuration.

---
 Makefile                                       |   22 +++++++++++++----
 board/spear/spear300/config.mk                 |   11 --------
 board/spear/spear310/config.mk                 |   11 --------
 board/spear/spear320/config.mk                 |   11 --------
 board/spear/spear600/config.mk                 |   11 --------
 doc/README.spear                               |   31 +++++++++++++++++-------
 include/configs/{spear3xx.h => spear3xx_evb.h} |   10 +++++++
 include/configs/{spear6xx.h => spear6xx_evb.h} |   10 +++++++
 8 files changed, 59 insertions(+), 58 deletions(-)
 rename include/configs/{spear3xx.h => spear3xx_evb.h} (95%)
 rename include/configs/{spear6xx.h => spear6xx_evb.h} (88%)
Makefile +17 -5
index 87d5214..f3e8641 100644
@@ -3052,12 +3052,24 @@ 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
-	@$(MKCONFIG) -n $@ -t $(@:_config=) spear3xx arm arm926ejs $(@:_config=) spear spear
-
-spear600_config :	unconfig
-	@$(MKCONFIG) -n $@ -t $(@:_config=) spear6xx arm arm926ejs $(@:_config=) spear spear
+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_evb arm arm926ejs $(@:_config=) spear spear
+
+spear600_config \
+spear600_nand_config \
+spear600_usbtty_config \
+spear600_usbtty_nand_config :	unconfig
+	@$(MKCONFIG) -n $@ -t $(@:_config=) spear6xx_evb arm arm926ejs $(@:_config=) spear spear
 
 suen3_config:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs km_arm keymile kirkwood
board/spear/spear300/config.mk +0 -11
index 35646f2..0bbb40f 100644
@@ -26,14 +26,3 @@
 TEXT_BASE = 0x00700000
 
 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
board/spear/spear310/config.mk +0 -11
index cba8436..c8264c3 100644
@@ -27,18 +27,7 @@ TEXT_BASE = 0x00700000
 
 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
board/spear/spear320/config.mk +0 -11
index cba8436..c8264c3 100644
@@ -27,18 +27,7 @@ TEXT_BASE = 0x00700000
 
 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
board/spear/spear600/config.mk +0 -11
index 35646f2..0bbb40f 100644
@@ -26,14 +26,3 @@
 TEXT_BASE = 0x00700000
 
 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
doc/README.spear +22 -9
index a6ff7fd..3161e64 100644
@@ -6,9 +6,9 @@ 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!).
 
-We are now adding the support in u-boot for two SoC: SPEAr600 and SPEAr3xx.
+U-Boot supports four SoCs: SPEAr600, SPEAr3xx
 
-All 4 SoCs share common peripherals.
+All 4 SoCs (SPEAr3xx and SPEAr600) share common peripherals.
 
 1. ARM926ejs core based (sp600 has two cores, the 2nd handled only in Linux)
 2. FastEthernet (sp600 has Gbit version, but same controller - GMAC)
@@ -22,7 +22,7 @@ All 4 SoCs share common peripherals.
 10. others ..
 
 Everything is supported in Linux.
-u-boot is not currently supporting all peripeharls (just a few as listed below).
+u-boot is currently not supporting all peripeharls (just a few as listed below).
 1. USB Device
 2. NAND controller (FSMC)
 3. Serial Memory Interface
@@ -32,17 +32,30 @@ u-boot is not currently supporting all peripeharls (just a few as listed below).
 
 Build options
 	make spear600_config
+		spear600 build with environment variables placed at default
+		location i.e. Serial NOR device
+	make spear600_nand_config
+		spear600 build with environment variables placed in NAND device
+	make spear600_usbtty_config
+		spear600 build with usbtty terminal as default and environment
+		placed at default location
+	make spear600_usbtty_nand_config
+		Build with usbtty terminal as default and environment placed in
+		NAND device
 	make spear300_config
+	make spear300_nand_config
+	make spear300_usbtty_config
+	make spear300_usbtty_nand_config
 	make spear310_config
+	make spear310_nand_config
+	make spear310_usbtty_config
+	make spear310_usbtty_nand_config
 	make spear320_config
+	make spear320_nand_config
+	make spear320_usbtty_config
+	make spear320_usbtty_nand_config
 
 Further options
-	make ENV=NAND (supported by all 4 SoCs)
-	- This option generates a uboot image that saves environment inn NAND
-
-	make CONSOLE=USB (supported by all 4 SoCs)
-	- This option generates a uboot image for using usbdevice as a tty i/f
-
 	make FLASH=PNOR (supported by SPEAr310 and SPEAr320)
 	- This option generates a uboot image that supports emi controller for
 	CFI compliant parallel NOR flash
include/configs/spear3xx_evb.h renamed from include/configs/spear3xx.h +10 -0
similarity index 95%
rename from include/configs/spear3xx.h
rename to include/configs/spear3xx_evb.h
index fde505c..f0c915e 100644
@@ -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_NAND			1
+#else
+#define CONFIG_ENV_IS_IN_FLASH			1
+#endif
+
 #include <configs/spear-common.h>
 
 /* Ethernet driver configuration */
include/configs/spear6xx_evb.h renamed from include/configs/spear6xx.h +10 -0
similarity index 88%
rename from include/configs/spear6xx.h
rename to include/configs/spear6xx_evb.h
index 2532344..82d24df 100644
@@ -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_NAND			1
+#else
+#define CONFIG_ENV_IS_IN_FLASH			1
+#endif
+
 #include <configs/spear-common.h>
 
 /* Serial Configuration (PL011) */
Signature · 1 line
1.6.0.2
#15 lore raw

PATCH v5 15/18 SPEAr : Basic spear1300 architecture support added

From: Vipin KUMAR <[email protected]>

SPEAr1300 is an ARMCortexA9 dual core based SoC which supports multiple peripherals such as

1. Ethernet Controller
2. USB Device Controller
3. USB Host Controllers
4. MTD interfaces for NAND and NOR(serial and parallel) flash devices etc

For more information, visit www.st.com/spear

This patch adds the architecture support for spear1300.

---
 arch/arm/cpu/arm_cortexa8/spear13xx/Makefile    |   52 ++++
 arch/arm/cpu/arm_cortexa8/spear13xx/cache.S     |  114 ++++++++
 arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c       |   96 +++++++
 arch/arm/cpu/arm_cortexa8/spear13xx/reset.c     |   47 ++++
 arch/arm/cpu/arm_cortexa8/spear13xx/timer.c     |  138 ++++++++++
 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 |   34 +++
 9 files changed, 923 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
arch/arm/cpu/arm_cortexa8/spear13xx/Makefile new file +52 -0
new file mode 100644
index 0000000..4157164
@@ -0,0 +1,52 @@
+#
+# (C) Copyright 2000-2003
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+#
+# (C) Copyright 2008
+# Guennadi Liakhovetki, DENX Software Engineering, <[email protected]>
+#
+# 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
+
+#########################################################################
arch/arm/cpu/arm_cortexa8/spear13xx/cache.S new file +114 -0

114 lines not on this page · raw message

arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c new file +96 -0

96 lines not on this page · raw message

arch/arm/cpu/arm_cortexa8/spear13xx/reset.c new file +47 -0

47 lines not on this page · raw message

arch/arm/cpu/arm_cortexa8/spear13xx/timer.c new file +138 -0

138 lines not on this page · raw message

arch/arm/include/asm/arch-spear13xx/hardware.h new file +40 -0
new file mode 100644
index 0000000..020ab2a
@@ -0,0 +1,40 @@
+/*
+ * (C) Copyright 2010
+ * Vipin Kumar, STMicroelectronics, <[email protected]>
+ *
+ * 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 _ASM_ARCH_SPEAR13XX_HARDWARE_H
+#define _ASM_ARCH_SPEAR13XX_HARDWARE_H
+
+#define CONFIG_SYS_USBD_BASE			(0xE1100000)
+#define CONFIG_SYS_PLUG_BASE			(0xE1200000)
+#define CONFIG_SYS_FIFO_BASE			(0xE1000800)
+#define CONFIG_SYS_SMI_BASE			(0xFC000000)
+#define CONFIG_SPEAR_TIMERBASE			(0xE0380000)
+#define CONFIG_SPEAR_MISCBASE			(0xE0700000)
+#define CONFIG_SYS_I2C_BASE			(0xE0280000)
+#define CONFIG_SPEAR_ETHBASE			(0xE2000000)
+#define CONFIG_SYS_FSMC_BASE			(0xB0000000)
+
+#define CONFIG_SYS_NAND_CLE			(1 << 16)
+#define CONFIG_SYS_NAND_ALE			(1 << 17)
+
+#endif /* _ASM_ARCH_SPEAR13XX_HARDWARE_H */
arch/arm/include/asm/arch-spear13xx/spr_gpt.h new file +85 -0

85 lines not on this page · raw message

arch/arm/include/asm/arch-spear13xx/spr_misc.h new file +317 -0

317 lines not on this page · raw message

arch/arm/include/asm/arch-spear13xx/sys_proto.h new file +34 -0
new file mode 100644
index 0000000..98b9a6b
@@ -0,0 +1,34 @@
+/*
+ * (C) Copyright 2010
+ * Vipin Kumar, STMicroelectronics, <[email protected]>
+ *
+ * Based on arch/arm/include/asm/arch-omap3/sys_proto.h
+ *
+ * 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 _SYS_PROTO_H_
+#define _SYS_PROTO_H_
+
+u32 get_device_type(void);
+void invalidate_dcache(u32);
+void l2_cache_disable(void);
+void l2_cache_enable(void);
+
+#endif
Signature · 1 line
1.6.0.2
#16 lore raw

PATCH v5 16/18 SPEAr : spear1300 SoC support added

From: Vipin KUMAR <[email protected]>

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

---
 MAINTAINERS                                    |    1 +
 MAKEALL                                        |    1 +
 Makefile                                       |    6 +
 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              |   88 ++++++++++
 board/spear/spear1300/spr_lowlevel_init.S      |   38 +++++
 doc/README.spear                               |   11 +-
 include/configs/spear13xx_evb.h                |  202 ++++++++++++++++++++++++
 11 files changed, 436 insertions(+), 8 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_evb.h
MAINTAINERS +1 -0
index d7aec98..ee731a5 100644
@@ -668,6 +668,7 @@ Prakash Kumar <[email protected]>
 
 Vipin Kumar <[email protected]>
 
+	spear1300	ARM CORTEX-A9 (spear1300 Soc)
 	spear300	ARM926EJS (spear300 Soc)
 	spear310	ARM926EJS (spear310 Soc)
 	spear320	ARM926EJS (spear320 Soc)
MAKEALL +1 -0
index d6d5f5b..7c00577 100755
@@ -656,6 +656,7 @@ LIST_ARM_CORTEX_A8="		\
 	omap3_zoom2		\
 	s5p_goni		\
 	smdkc100		\
+	spear1300		\
 "
 
 #########################################################################
Makefile +6 -0
index f3e8641..0e8db55 100644
@@ -3071,6 +3071,12 @@ spear600_usbtty_config \
 spear600_usbtty_nand_config :	unconfig
 	@$(MKCONFIG) -n $@ -t $(@:_config=) spear6xx_evb arm arm926ejs $(@:_config=) spear spear
 
+spear1300_config \
+spear1300_nand_config \
+spear1300_usbtty_config \
+spear1300_usbtty_nand_config :	unconfig
+	@$(MKCONFIG) -n $@ -t $(@:_config=) spear13xx_evb arm arm_cortexa8 spear1300 spear spear13xx
+
 suen3_config:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs km_arm keymile kirkwood
 
arch/arm/include/asm/arch-spear13xx/hardware.h +4 -4
index 020ab2a..e3dd6e5 100644
@@ -24,10 +24,10 @@
 #ifndef _ASM_ARCH_SPEAR13XX_HARDWARE_H
 #define _ASM_ARCH_SPEAR13XX_HARDWARE_H
 
-#define CONFIG_SYS_USBD_BASE			(0xE1100000)
-#define CONFIG_SYS_PLUG_BASE			(0xE1200000)
-#define CONFIG_SYS_FIFO_BASE			(0xE1000800)
-#define CONFIG_SYS_SMI_BASE			(0xFC000000)
+#define CONFIG_SYS_USBD_BASE			(0xE3800000)
+#define CONFIG_SYS_PLUG_BASE			(0xE2800000)
+#define CONFIG_SYS_FIFO_BASE			(0xE3000800)
+#define CONFIG_SYS_SMI_BASE			(0xEA000000)
 #define CONFIG_SPEAR_TIMERBASE			(0xE0380000)
 #define CONFIG_SPEAR_MISCBASE			(0xE0700000)
 #define CONFIG_SYS_I2C_BASE			(0xE0280000)
board/spear/common/Makefile +8 -2
index 4f8959f..1ae4fd4 100644
@@ -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))
board/spear/spear1300/Makefile new file +51 -0

51 lines not on this page · raw message

board/spear/spear1300/config.mk new file +28 -0
new file mode 100644
index 0000000..4bd519c
@@ -0,0 +1,28 @@
+#
+# (C) Copyright 2010
+# Vipin Kumar, ST Microelectronics <[email protected]>
+#
+# 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
board/spear/spear1300/spear1300.c new file +88 -0

88 lines not on this page · raw message

board/spear/spear1300/spr_lowlevel_init.S new file +38 -0
new file mode 100644
index 0000000..13e0372
@@ -0,0 +1,38 @@
+/*
+ * (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 <config.h>
+
+/*
+ * platform specific initializations are already done in Xloader
+ * Initializations already done include
+ * DDR, PLLs, IP's clock enable and reset release etc
+ */
+.globl lowlevel_init
+lowlevel_init:
+	/* By default, U-Boot switches CPU to low-vector */
+	/* Revert this as we work in high vector even in U-Boot */
+	mrc	p15, 0, r0, c1, c0, 0
+	orr	r0, r0, #0x00002000
+	mcr	p15, 0, r0, c1, c0, 0
+	mov	pc, lr
doc/README.spear +9 -2
index 3161e64..94b492f 100644
@@ -6,9 +6,10 @@ 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 four SoCs: SPEAr600, SPEAr3xx
+U-Boot supports five spear SoCs: SPEAr600, SPEAr3xx, SPEAr1300
 
-All 4 SoCs (SPEAr3xx and SPEAr600) share common peripherals.
+4 SoCs (SPEAr3xx and SPEAr600) share common peripherals. SPEAr1300 is 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)
@@ -29,6 +30,7 @@ u-boot is currently not supporting all peripeharls (just a few as listed below).
 4. EMI (Parallel NOR interface)
 4. I2C
 5. UART
+6. Network
 
 Build options
 	make spear600_config
@@ -55,6 +57,11 @@ Build options
 	make spear320_usbtty_config
 	make spear320_usbtty_nand_config
 
+	make spear1300_config
+	make spear1300_nand_config
+	make spear1300_usbtty_config
+	make spear1300_usbtty_nand_config
+
 Further options
 	make FLASH=PNOR (supported by SPEAr310 and SPEAr320)
 	- This option generates a uboot image that supports emi controller for
include/configs/spear13xx_evb.h new file +202 -0

202 lines not on this page · raw message

Signature · 1 line
1.6.0.2
#17 lore raw

PATCH v5 17/18 SPEAr : Removing extraneous code

From: Vipin KUMAR <[email protected]>

This sub-patch removes extraneous code from the spear platform code

---
 include/configs/spear-common.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
include/configs/spear-common.h +0 -1
index c03520b..1f7aff7 100644
@@ -57,7 +57,6 @@
 
 /* Timer, HZ specific defines */
 #define CONFIG_SYS_HZ				(1000)
-#define CONFIG_SYS_HZ_CLOCK			(8300000)
 
 /* Flash configuration */
 #if defined(CONFIG_FLASH_PNOR)
Signature · 1 line
1.6.0.2
#18 lore raw

PATCH v5 18/18 SPEAr : USB device controller bugfixes

From: Vipin KUMAR <[email protected]>

This patch fixes a few bugs in USB device controller driver. The fixes are as follows
1. Adding error condition checks eg. NULL return
2. Endpoint other than endpoint 0 (control endpoint) are initialized only if usb state machine reaches STATE_ADDRESSED or above
3. Zero length packet handling corrected
4. Dead code removed
5. Bulk out endpoint returns after servicing 1 interrupt and returns back to service if more interrupts are pending

---
 drivers/usb/gadget/designware_udc.c |   59 ++++++++++++++++++++++------------
 1 files changed, 38 insertions(+), 21 deletions(-)
drivers/usb/gadget/designware_udc.c +38 -21
index aee44aa..3c20f3d 100644
@@ -497,16 +497,24 @@ static void dw_udc_epn_tx(int ep)
 {
 	struct usb_endpoint_instance *endpoint = dw_find_ep(ep);
 
+	if (!endpoint)
+		return;
+
 	/*
 	 * We need to transmit a terminating zero-length packet now if
 	 * we have sent all of the data in this URB and the transfer
 	 * size was an exact multiple of the packet size.
 	 */
-	if (endpoint && endpoint->tx_urb && endpoint->tx_urb->actual_length) {
-		if (endpoint->last == endpoint->tx_packetSize) {
-			/* handle zero length packet here */
-			writel(0x0, &inep_regs_p[ep].write_done);
-		}
+	if (endpoint->tx_urb &&
+	    (endpoint->last == endpoint->tx_packetSize) &&
+	    (endpoint->tx_urb->actual_length - endpoint->sent -
+	     endpoint->last == 0)) {
+		/* handle zero length packet here */
+		writel(0x0, &inep_regs_p[ep].write_done);
+
+	}
+
+	if (endpoint->tx_urb && endpoint->tx_urb->actual_length) {
 		/* retire the data that was just sent */
 		usbd_tx_complete(endpoint);
 		/*
@@ -548,8 +556,6 @@ int udc_init(void)
 
 	readl(&plug_regs_p->plug_pending);
 
-	udc_disconnect();
-
 	for (i = 0; i < UDC_INIT_MDELAY; i++)
 		udelay(1000);
 
@@ -561,10 +567,9 @@ int udc_init(void)
 	writel(~0x0, &udc_regs_p->endp_int_mask);
 
 	writel(DEV_CONF_FS_SPEED | DEV_CONF_REMWAKEUP | DEV_CONF_SELFPOW |
-	       /* Dev_Conf_SYNCFRAME | */
 	       DEV_CONF_PHYINT_16, &udc_regs_p->dev_conf);
 
-	writel(0x0, &udc_regs_p->dev_cntl);
+	writel(DEV_CNTL_SOFTDISCONNECT, &udc_regs_p->dev_cntl);
 
 	/* Clear all interrupts pending */
 	writel(DEV_INT_MSK, &udc_regs_p->dev_int);
@@ -588,6 +593,9 @@ void udc_setup_ep(struct usb_device_instance *device,
 	char *tt;
 	u32 endp_intmask;
 
+	if ((ep != 0) && (udc_device->device_state < STATE_ADDRESSED))
+		return;
+
 	tt = getenv("usbtty");
 	if (!tt)
 		tt = "generic";
@@ -647,9 +655,6 @@ void udc_setup_ep(struct usb_device_instance *device,
 		writel(packet_size | ((buffer_size / sizeof(int)) << 16),
 		       &out_p->endp_maxpacksize);
 
-		writel((packet_size << 19) | ENDP_EPTYPE_CNTL,
-		       &udc_regs_p->udc_endp_reg[ep_num]);
-
 	} else if ((ep_addr & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) {
 		/* Setup the IN endpoint */
 		writel(0x0, &in_p->endp_status);
@@ -708,7 +713,17 @@ void udc_setup_ep(struct usb_device_instance *device,
 /* Turn on the USB connection by enabling the pullup resistor */
 void udc_connect(void)
 {
-	u32 plug_st;
+	u32 plug_st, dev_cntl;
+
+	dev_cntl = readl(&udc_regs_p->dev_cntl);
+	dev_cntl |= DEV_CNTL_SOFTDISCONNECT;
+	writel(dev_cntl, &udc_regs_p->dev_cntl);
+
+	udelay(1000);
+
+	dev_cntl = readl(&udc_regs_p->dev_cntl);
+	dev_cntl &= ~DEV_CNTL_SOFTDISCONNECT;
+	writel(dev_cntl, &udc_regs_p->dev_cntl);
 
 	plug_st = readl(&plug_regs_p->plug_state);
 	plug_st &= ~(PLUG_STATUS_PHY_RESET | PLUG_STATUS_PHY_MODE);
@@ -720,6 +735,8 @@ void udc_disconnect(void)
 {
 	u32 plug_st;
 
+	writel(DEV_CNTL_SOFTDISCONNECT, &udc_regs_p->dev_cntl);
+
 	plug_st = readl(&plug_regs_p->plug_state);
 	plug_st |= (PLUG_STATUS_PHY_RESET | PLUG_STATUS_PHY_MODE);
 	writel(plug_st, &plug_regs_p->plug_state);
@@ -789,11 +806,6 @@ void dw_udc_plug_irq(void)
 		UDCDBG("device attached and powered");
 		udc_state_transition(udc_device->device_state, STATE_POWERED);
 	} else {
-		/*
-		 * USB cable detached
-		 * Reset the PHY and switch the mode.
-		 */
-		udc_disconnect();
 		writel(~0x0, &udc_regs_p->dev_int_mask);
 
 		UDCDBG("device detached or unpowered");
@@ -809,13 +821,18 @@ void dw_udc_dev_irq(void)
 	if (readl(&udc_regs_p->dev_int) & DEV_INT_USBRESET) {
 		writel(~0x0, &udc_regs_p->endp_int_mask);
 
-		udc_connect();
-
 		writel(readl(&inep_regs_p[0].endp_cntl) | ENDP_CNTL_FLUSH,
 		       &inep_regs_p[0].endp_cntl);
 
 		writel(DEV_INT_USBRESET, &udc_regs_p->dev_int);
 
+		/*
+		 * This endpoint0 specific register can be programmed only
+		 * after the phy clock is initialized
+		 */
+		writel((EP0_MAX_PACKET_SIZE << 19) | ENDP_EPTYPE_CNTL,
+				&udc_regs_p->udc_endp_reg[0]);
+
 		UDCDBG("device reset in progess");
 		udc_state_transition(udc_device->device_state, STATE_DEFAULT);
 	}
@@ -902,7 +919,7 @@ void dw_udc_endpoint_irq(void)
 		writel(ENDP0_INT_CTRLIN, &udc_regs_p->endp_int);
 	}
 
-	while (readl(&udc_regs_p->endp_int) & ENDP_INT_NONISOOUT_MSK) {
+	if (readl(&udc_regs_p->endp_int) & ENDP_INT_NONISOOUT_MSK) {
 		u32 epnum = 0;
 		u32 ep_int = readl(&udc_regs_p->endp_int) &
 		    ENDP_INT_NONISOOUT_MSK;
Signature · 1 line
1.6.0.2
#19 lore raw

PATCH v5 10/18 SPEAr : Configuring FSMC driver for NAND interface

In reply to Vipin KUMAR
Quoted 11 lines · Vipin KUMAR

From: Vipin KUMAR <[email protected]>

Since FSMC is a standard IP and it supports different memory interfaces, it is supported independent of spear platform and spear is configured to use that driver for interfacing with the NAND device

Spear platform uses generic FSMC driver and spear specific files i.e drivers/mtd/nand/spr_nand.c, arch/arm/include/asm/arch-spear/spr_nand.h are removed

Quoted 15 lines
---
 arch/arm/include/asm/arch-spear/hardware.h |    8 +-
 arch/arm/include/asm/arch-spear/spr_nand.h |   57 -------------
 board/spear/spear300/spear300.c            |    7 +-
 board/spear/spear310/spear310.c            |    7 +-
 board/spear/spear320/spear320.c            |    7 +-
 board/spear/spear600/spear600.c            |    7 +-
 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, 28 insertions(+), 199 deletions(-)
 delete mode 100644 arch/arm/include/asm/arch-spear/spr_nand.h
 delete mode 100644 drivers/mtd/nand/spr_nand.c

-Scott

#20 lore raw

PATCH v5 9/18 SPEAr : FSMC driver support added

In reply to Vipin KUMAR
Quoted 9 lines · Vipin KUMAR

From: Vipin KUMAR <[email protected]>

Flexible static memory controller is a peripheral provided by ST, which controls the access to NAND chips along with many other memory device chips eg NOR, SRAM.

This patch adds the driver support for FSMC controller interfacing with NAND memory.

Quoted 8 lines
---
 drivers/mtd/nand/Makefile     |    1 +
 drivers/mtd/nand/fsmc_nand.c  |  366 +++++++++++++++++++++++++++++++++++++++++
 include/linux/mtd/fsmc_nand.h |  104 ++++++++++++
 3 files changed, 471 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mtd/nand/fsmc_nand.c
 create mode 100644 include/linux/mtd/fsmc_nand.h

-Scott

#22 lore raw

v5 cover Network support for spear platforms and SPEAr1300

In reply to Vipin KUMAR

Tom, Wolfgang,

THis time everything should be ok.

Thks for your attention,
Arm

Quoted 128 lines · Vipin KUMAR

Dear Wolfgang, Tom,

The following set of patches is the fifth iteration of patches for the following changes
-> Network device driver for synopsys designware peripheral
-> SPEAr1300 SoC support
-> A few other misc changes and bugfixes

These also include the feedbacks given by Tom and Ben
These set of patches are rebased on e5ed138a23923ebe61843244748d98d3dbc04777

Please include these changes in the mainline u-boot

Regards
Vipin

Vipin KUMAR (18):
change_bit routine defined
SPEAr : SMI erase and write timeouts increased
SPEAr : Placing ethaddr write and read within CONFIG_CMD_NET SPEAr : Reducing the max RAM size to 128MB
SPEAr : Basic arch related support added for SPEAr SoCs SPEAr : Network driver support added
SPEAr : Network support configured for spear SoCs
SPEAr : macb driver support added for spear310 and spear320 SPEAr : FSMC driver support added
SPEAr : Configuring FSMC driver for NAND interface
SPEAr : i2c driver moved completely into drivers/i2c SPEAr : smi driver moved completely into drivers/mtd SPEAr : USB Device Controller driver support added
SPEAr : Supporting various configurations for spear3xx and spear6xx
boards
SPEAr : Basic spear1300 architecture support added
SPEAr : spear1300 SoC support added
SPEAr : Removing extraneous code
SPEAr : USB device controller bugfixes

 MAINTAINERS                                        |    1 +
 MAKEALL                                            |    1 +
 Makefile                                           |   28 +-
 arch/arm/cpu/arm926ejs/spear/Makefile              |    3 +-
 arch/arm/cpu/arm926ejs/spear/cpu.c                 |   78 +++
 arch/arm/cpu/arm_cortexa8/spear13xx/Makefile       |   52 ++
 arch/arm/cpu/arm_cortexa8/spear13xx/cache.S        |  114 +++++
 arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c          |   96 ++++
 .../arm_cortexa8/spear13xx/reset.c}                |   52 +--
 arch/arm/cpu/arm_cortexa8/spear13xx/timer.c        |  138 +++++
 .../arm/include/asm/arch-spear/clk.h               |   26 +-
 arch/arm/include/asm/arch-spear/hardware.h         |   16 +-
 arch/arm/include/asm/arch-spear/spr_misc.h         |    5 +
 .../arm/include/asm/arch-spear13xx/hardware.h      |   33 +-
 arch/arm/include/asm/arch-spear13xx/spr_gpt.h      |   85 ++++
 arch/arm/include/asm/arch-spear13xx/spr_misc.h     |  317 ++++++++++++
 .../arm/include/asm/arch-spear13xx/sys_proto.h     |   29 +-
 arch/arm/include/asm/bitops.h                      |   11 +-
 board/spear/common/Makefile                        |   10 +-
 board/spear/common/spr_misc.c                      |   32 +-
 board/spear/spear1300/Makefile                     |   51 ++
 board/spear/spear1300/config.mk                    |   28 +
 board/spear/spear1300/spear1300.c                  |   88 ++++
 .../spear/spear1300/spr_lowlevel_init.S            |   35 +-
 board/spear/spear300/config.mk                     |   11 -
 board/spear/spear300/spear300.c                    |   18 +-
 board/spear/spear310/config.mk                     |   11 -
 board/spear/spear310/spear310.c                    |   35 ++-
 board/spear/spear320/config.mk                     |   11 -
 board/spear/spear320/spear320.c                    |   23 +-
 board/spear/spear600/config.mk                     |   11 -
 board/spear/spear600/spear600.c                    |   18 +-
 doc/README.designware_eth                          |   25 +
 doc/README.spear                                   |   46 ++-
 drivers/i2c/Makefile                               |    2 +-
 drivers/i2c/{spr_i2c.c => designware_i2c.c}        |    4 +-
 .../spr_i2c.h => drivers/i2c/designware_i2c.h      |    6 +-
 drivers/mtd/Makefile                               |    2 +-
 drivers/mtd/nand/Makefile                          |    2 +-
 drivers/mtd/nand/fsmc_nand.c                       |  366 ++++++++++++++
 drivers/mtd/nand/spr_nand.c                        |  124 -----
 drivers/mtd/{spr_smi.c => st_smi.c}                |   59 ++-
 .../arch-spear/spr_smi.h => drivers/mtd/st_smi.h   |    8 +-
 drivers/net/Makefile                               |    1 +
 drivers/net/designware.c                           |  531 ++++++++++++++++++++
 drivers/net/designware.h                           |  264 ++++++++++
 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                     |   33 +-
 include/configs/spear13xx_evb.h                    |  202 ++++++++
 include/configs/{spear3xx.h => spear3xx_evb.h}     |   30 ++
 include/configs/{spear6xx.h => spear6xx_evb.h}     |   13 +
 include/linux/mtd/fsmc_nand.h                      |  104 ++++
 include/netdev.h                                   |    1 +
 include/usb/{spr_udc.h => designware_udc.h}        |    6 +-
 56 files changed, 2997 insertions(+), 421 deletions(-)
 create mode 100644 arch/arm/cpu/arm926ejs/spear/cpu.c
 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
 rename arch/arm/{include/asm/arch-spear/spr_nand.h => cpu/arm_cortexa8/spear13xx/reset.c} (50%)
 mode change 100644 => 100755
 create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/timer.c
 copy include/configs/spear6xx.h => arch/arm/include/asm/arch-spear/clk.h (64%)
 copy include/configs/spear6xx.h => arch/arm/include/asm/arch-spear13xx/hardware.h (58%)
 create mode 100644 arch/arm/include/asm/arch-spear13xx/spr_gpt.h
 create mode 100644 arch/arm/include/asm/arch-spear13xx/spr_misc.h
 copy include/configs/spear6xx.h => arch/arm/include/asm/arch-spear13xx/sys_proto.h (64%)
 create mode 100644 board/spear/spear1300/Makefile
 create mode 100644 board/spear/spear1300/config.mk
 create mode 100644 board/spear/spear1300/spear1300.c
 copy include/configs/spear6xx.h => board/spear/spear1300/spr_lowlevel_init.S (56%)
 create mode 100644 doc/README.designware_eth
 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%)
 create mode 100644 drivers/mtd/nand/fsmc_nand.c
 delete mode 100644 drivers/mtd/nand/spr_nand.c
 rename drivers/mtd/{spr_smi.c => st_smi.c} (94%)
 rename arch/arm/include/asm/arch-spear/spr_smi.h => drivers/mtd/st_smi.h (96%)
 create mode 100644 drivers/net/designware.c
 create mode 100644 drivers/net/designware.h
 rename drivers/usb/gadget/{spr_udc.c => designware_udc.c} (91%)
 create mode 100644 include/configs/spear13xx_evb.h
 rename include/configs/{spear3xx.h => spear3xx_evb.h} (85%)
 rename include/configs/{spear6xx.h => spear6xx_evb.h} (82%)
 create mode 100644 include/linux/mtd/fsmc_nand.h
 rename include/usb/{spr_udc.h => designware_udc.h} (98%)