Support for SPEAr13xx boards added
Subsystems (9)
cover Support for SPEAr13xx boards added
The following patch-set adds the support for the following
1. SPEAr13xx boards (SPEAr1300 and SPEAr1310)
2. Addition of High speed support for USB device for usbtty framework
3. Miscellneous fixes in Network and FSMC (NAND controller) drivers
Please consider the patch-set for inclusion in the mainline
Please make sure that the following patches can be applied only after the following Network driver patch which Ben has already accepted in his tree 5b1b1883ffcb75de71a0b4e66b279c88ae1e15fc : SPEAr : Network driver support added
Regards
Vipin
Armando Visconti (1):
SPEAr1300: Workaround the UHC problem (issue #101435)
Vipin KUMAR (26):
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 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
SPEAr : Network driver fixes.
SPEAr : Changing the default environment variable bootargs Enable high speed support for usb device framework and usbtty SPEAr : High speed support for designware peripheral SPEAr : Enable usb device high speed support
SPEAr : Network support configuration
SPEAr : Enabling GPT clock explicitly
SPEAr : smi_init moved to board_init
SPEAr : Ethernet issue workaround is not needed when uboot is acting
as flashing
Vipin Kumar (1):
SPEAr1310 : spear1310 support added
MAINTAINERS | 2 +
MAKEALL | 2 +
Makefile | 41 ++-
arch/arm/cpu/arm926ejs/spear/Makefile | 3 +-
arch/arm/cpu/arm926ejs/spear/cpu.c | 84 ++++
arch/arm/cpu/arm_cortexa8/spear13xx/Makefile | 52 +++
arch/arm/cpu/arm_cortexa8/spear13xx/ca9_ltimer.c | 136 +++++++
arch/arm/cpu/arm_cortexa8/spear13xx/cache.S | 114 ++++++
arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c | 133 +++++++
.../arm/cpu/arm_cortexa8/spear13xx/reset.c | 40 +-
.../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 | 7 +
.../arm/include/asm/arch-spear13xx/ca9_ltimer.h | 36 +-
.../arm/include/asm/arch-spear13xx/hardware.h | 35 +-
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 | 12 +-
.../spear/common/spr13xx_lowlevel_init.S | 35 +-
.../spear/common/spr13xx_misc.c | 48 +--
board/spear/common/spr_misc.c | 32 ++-
board/spear/spear1300/Makefile | 51 +++
board/spear/spear1300/config.mk | 28 ++
board/spear/spear1300/spear1300.c | 70 ++++
board/spear/spear1310/Makefile | 51 +++
board/spear/spear1310/config.mk | 28 ++
board/spear/spear1310/spear1310.c | 70 ++++
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.spear | 51 ++-
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 | 401 ++++++++++++++++++++
drivers/mtd/nand/spr_nand.c | 124 ------
drivers/mtd/{spr_smi.c => st_smi.c} | 61 ++--
drivers/net/designware.c | 8 +-
drivers/net/designware.h | 2 +-
drivers/serial/usbtty.h | 4 +-
drivers/usb/gadget/Makefile | 2 +-
drivers/usb/gadget/{spr_udc.c => designware_udc.c} | 123 ++++---
include/configs/spear-common.h | 50 ++-
include/configs/spear13xx_evb.h | 225 +++++++++++
include/configs/{spear3xx.h => spear3xx_evb.h} | 31 ++
include/configs/{spear6xx.h => spear6xx_evb.h} | 12 +
include/linux/mtd/fsmc_nand.h | 108 ++++++
.../spr_smi.h => include/linux/mtd/st_smi.h | 10 +-
include/usb/{spr_udc.h => designware_udc.h} | 9 +-
57 files changed, 2424 insertions(+), 460 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/ca9_ltimer.c
create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/cache.S
create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c
copy include/configs/spear6xx.h => arch/arm/cpu/arm_cortexa8/spear13xx/reset.c (55%)
mode change 100644 => 100755
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/ca9_ltimer.h (55%)
copy include/configs/spear6xx.h => arch/arm/include/asm/arch-spear13xx/hardware.h (54%)
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%)
copy include/configs/spear6xx.h => board/spear/common/spr13xx_lowlevel_init.S (56%)
rename arch/arm/include/asm/arch-spear/spr_nand.h => board/spear/common/spr13xx_misc.c (52%)
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/spear1310/Makefile
create mode 100644 board/spear/spear1310/config.mk
create mode 100644 board/spear/spear1310/spear1310.c
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 drivers/usb/gadget/{spr_udc.c => designware_udc.c} (90%)
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} (84%)
create mode 100644 include/linux/mtd/fsmc_nand.h
rename arch/arm/include/asm/arch-spear/spr_smi.h => include/linux/mtd/st_smi.h (95%)
rename include/usb/{spr_udc.h => designware_udc.h} (97%)PATCH 1/28 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
@@ -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
PATCH 2/28 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
@@ -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
PATCH 3/28 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 | 28 +++++++++++++++++++++------- doc/README.spear | 8 ++++++++ 2 files changed, 29 insertions(+), 7 deletions(-)
board/spear/common/spr_misc.c +21 -7
@@ -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 ];
@@ -205,15 +210,17 @@ static int write_mac(uchar *mac)puts ("I2C EEPROM writing failed \n" ); return -1; } +#endif int do_chip_config (cmd_tbl_t *cmdtp,int flag,int argc,char *const 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 * const 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 * const 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 * const 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 * const 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
@@ -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
PATCH 4/28 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
@@ -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
PATCH 5/28 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
@@ -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
@@ -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
@@ -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
PATCH 6/28 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 | 10 ++++++++++ board/spear/spear310/spear310.c | 10 ++++++++++ board/spear/spear320/spear320.c | 10 ++++++++++ board/spear/spear600/spear600.c | 10 ++++++++++ include/configs/spear-common.h | 14 ++++++++++++-- include/configs/spear3xx.h | 3 +++ 7 files changed, 56 insertions(+), 2 deletions(-)
arch/arm/include/asm/arch-spear/hardware.h +1 -0
@@ -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 +10 -0
@@ -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,12 @@ int board_nand_init(struct nand_chip *nand)return -1 ; } + +int board_eth_init (bd_t *bis) +{ +#if defined(CONFIG_DESIGNWARE_ETH ) +return designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ); +#else +return -1 ; +#endif +}
board/spear/spear310/spear310.c +10 -0
@@ -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,12 @@ int board_nand_init(struct nand_chip *nand)return -1 ; } + +int board_eth_init (bd_t *bis) +{ +#if defined(CONFIG_DESIGNWARE_ETH ) +return designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ); +#else +return -1 ; +#endif +}
board/spear/spear320/spear320.c +10 -0
@@ -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,12 @@ int board_nand_init(struct nand_chip *nand)return -1 ; } + +int board_eth_init (bd_t *bis) +{ +#if defined(CONFIG_DESIGNWARE_ETH ) +return designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ); +#else +return -1 ; +#endif +}
board/spear/spear600/spear600.c +10 -0
@@ -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,12 @@ int board_nand_init(struct nand_chip *nand)return -1 ; } + +int board_eth_init (bd_t *bis) +{ +#if defined(CONFIG_DESIGNWARE_ETH ) +return designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ); +#else +return -1 ; +#endif +}
include/configs/spear-common.h +12 -2
@@ -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
@@ -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
PATCH 7/28 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 | 25 ++++++++++++++++++++++--- board/spear/spear320/spear320.c | 12 +++++++++--- include/configs/spear3xx.h | 13 +++++++++++++ 5 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 arch/arm/include/asm/arch-spear/clk.h
arch/arm/include/asm/arch-spear/clk.h new file +27 -0
@@ -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
@@ -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 +22 -3
@@ -61,9 +61,28 @@ int board_nand_init(struct nand_chip *nand)int board_eth_init (bd_t *bis) { +int ret =0 ; +#if defined(CONFIG_DESIGNWARE_ETH ) -return designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ); -#else -return -1 ; +if (designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ) <0 ) + ret +=-1 ; +#endif +#if defined(CONFIG_MACB ) +if (macb_eth_initialize (0 , (void *)CONFIG_SYS_MACB0_BASE , +CONFIG_MACB0_PHY ) <0 ) + ret +=-1 ; + +if (macb_eth_initialize (1 , (void *)CONFIG_SYS_MACB1_BASE , +CONFIG_MACB1_PHY ) <0 ) + ret +=-1 ; + +if (macb_eth_initialize (2 , (void *)CONFIG_SYS_MACB2_BASE , +CONFIG_MACB2_PHY ) <0 ) + ret +=-1 ; + +if (macb_eth_initialize (3 , (void *)CONFIG_SYS_MACB3_BASE , +CONFIG_MACB3_PHY ) <0 ) + ret +=-1 ;#endif +return ret; }
board/spear/spear320/spear320.c +9 -3
@@ -61,9 +61,15 @@ int board_nand_init(struct nand_chip *nand)int board_eth_init (bd_t *bis) { +int ret =0 ;#if defined(CONFIG_DESIGNWARE_ETH ) -return designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ); -#else -return -1 ; +if (designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ) <0 ) + ret +=-1 ; +#endif +#if defined(CONFIG_MACB ) +if (macb_eth_initialize (0 , (void *)CONFIG_SYS_MACB0_BASE , +CONFIG_MACB0_PHY ) <0 ) + ret +=-1 ;#endif +return ret; }
include/configs/spear3xx.h +13 -0
@@ -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
PATCH 8/28 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 | 401 +++++++++++++++++++++++++++++++++++++++++ include/linux/mtd/fsmc_nand.h | 108 +++++++++++ 3 files changed, 510 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
@@ -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 +401 -0
401 lines not on this page · raw message
include/linux/mtd/fsmc_nand.h new file +108 -0
108 lines not on this page · raw message
Signature · 1 line
1.6.0.2
PATCH 9/28 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
PATCH 10/28 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
@@ -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
@@ -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
@@ -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
@@ -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
PATCH 11/28 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
@@ -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
@@ -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
@@ -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
@@ -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
PATCH 12/28 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
@@ -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
@@ -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
@@ -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
@@ -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
PATCH 13/28 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 | 25 +++++++++++++++----
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, 62 insertions(+), 58 deletions(-)
rename include/configs/{spear3xx.h => spear3xx_evb.h} (95%)
rename include/configs/{spear6xx.h => spear6xx_evb.h} (88%)Makefile +20 -5
@@ -2088,12 +2088,27 @@ omap730p2_cs3boot_config : unconfig @$(MKCONFIG) -n $@ -a omap730p2 arm arm926ejs omap730p2 ti omap spear300_config \ +spear300_nand_config \ +spear300_usbtty_config \ +spear300_usbtty_nand_config \ spear310_config \ -spear320_config : unconfig - @$(MKCONFIG) -n $@ -t $@ spear3xx arm arm926ejs $(@:_config=) spear spear - -spear600_config : unconfig - @$(MKCONFIG) -n $@ -t $@ 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 $@ spear3xx_evb arm arm926ejs $(@:_config=) spear spear + +spear600_config \ +spear600_nand_config \ +spear600_usbtty_config \ +spear600_usbtty_nand_config : unconfig + @$(MKCONFIG) -n $@ -t $@ spear6xx_evb arm arm926ejs $(@:_config=) spear spear + +suen3_config: unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs km_arm keymile kirkwood SX1_stdout_serial_config \ SX1_config: unconfig
board/spear/spear300/config.mk +0 -11
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
PATCH 14/28 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/ca9_ltimer.c | 136 +++++++++ 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/include/asm/arch-spear13xx/ca9_ltimer.h | 43 +++ arch/arm/include/asm/arch-spear13xx/hardware.h | 42 +++ arch/arm/include/asm/arch-spear13xx/spr_misc.h | 317 ++++++++++++++++++++++ arch/arm/include/asm/arch-spear13xx/sys_proto.h | 34 +++ 9 files changed, 881 insertions(+), 0 deletions(-) create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/Makefile create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/ca9_ltimer.c 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/include/asm/arch-spear13xx/ca9_ltimer.h create mode 100644 arch/arm/include/asm/arch-spear13xx/hardware.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
@@ -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 += ca9_ltimer.o +COBJS += cpu.o +COBJS += reset.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/ca9_ltimer.c new file +136 -0
136 lines not on this page · raw message
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/include/asm/arch-spear13xx/ca9_ltimer.h new file +43 -0
43 lines not on this page · raw message
arch/arm/include/asm/arch-spear13xx/hardware.h new file +42 -0
42 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
@@ -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
PATCH 15/28 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 + board/spear/common/Makefile | 12 ++- board/spear/common/spr13xx_lowlevel_init.S | 38 +++++ board/spear/common/spr13xx_misc.c | 47 +++++++ board/spear/spear1300/Makefile | 51 +++++++ board/spear/spear1300/config.mk | 28 ++++ board/spear/spear1300/spear1300.c | 66 +++++++++ doc/README.spear | 11 ++- include/configs/spear13xx_evb.h | 201 ++++++++++++++++++++++++++++ include/configs/spear3xx_evb.h | 1 - include/configs/spear6xx_evb.h | 1 - 13 files changed, 458 insertions(+), 6 deletions(-) create mode 100644 board/spear/common/spr13xx_lowlevel_init.S create mode 100644 board/spear/common/spr13xx_misc.c 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 include/configs/spear13xx_evb.h
MAINTAINERS +1 -0
@@ -669,6 +669,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
@@ -659,6 +659,7 @@ LIST_ARM_CORTEX_A8=" \ omap3_zoom2 \ s5p_goni \ smdkc100 \ + spear1300 \ " #########################################################################
Makefile +6 -0
@@ -2107,6 +2107,12 @@ spear600_usbtty_config \ spear600_usbtty_nand_config : unconfig @$(MKCONFIG) -n $@ -t $@ 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
board/spear/common/Makefile +10 -2
@@ -29,8 +29,16 @@ 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 +COBJS-$(CONFIG_SPEAR13XX) += spr13xx_misc.o + +SOBJS-$(CONFIG_SPEAR3XX) += spr_lowlevel_init.o +SOBJS-$(CONFIG_SPEAR600) += spr_lowlevel_init.o +SOBJS-$(CONFIG_SPEAR13XX) += spr13xx_lowlevel_init.o + +COBJS := $(COBJS-y) +SOBJS := $(SOBJS-y) SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))
board/spear/common/spr13xx_lowlevel_init.S new file +38 -0
@@ -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
board/spear/common/spr13xx_misc.c new file +47 -0
47 lines not on this page · raw message
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
@@ -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 +66 -0
66 lines not on this page · raw message
doc/README.spear +9 -2
@@ -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 +201 -0
201 lines not on this page · raw message
include/configs/spear3xx_evb.h +0 -1
@@ -144,7 +144,6 @@#endif /* NAND flash configuration */ -#define CONFIG_SYS_FSMC_NAND_SP 1#define CONFIG_SYS_FSMC_NAND_8BIT 1#if defined(CONFIG_SPEAR300 )
include/configs/spear6xx_evb.h +0 -1
@@ -49,7 +49,6 @@ (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)
Signature · 1 line
1.6.0.2
PATCH 16/28 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
@@ -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
PATCH 17/28 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
@@ -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
PATCH 18/28 SPEAr : Network driver fixes.
From: Vipin KUMAR <[email protected]>
The network controller mac resets hardware address stored in MAC_HI and MAC_LO registers if mac is resetted. So, hw mac address needs to be restored in case mac is explicitly resetted from driver.
Also the max frame length for Normal descriptor can be 0x7FF i.e 2047, so reducing it to 1600
--- drivers/net/designware.c | 8 ++++++-- drivers/net/designware.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-)
drivers/net/designware.c +6 -2
@@ -148,6 +148,8 @@ static int dw_eth_init(struct eth_device *dev, bd_t *bis)if (mac_reset (dev) <0 )return -1 ; +dw_write_hwaddr (dev); +writel (FIXEDBURST |PRIORXTX_41 |BURST_16 , &dma_p->busmode);
@@ -300,8 +302,10 @@ static int eth_mdio_write(struct eth_device *dev, u8 addr, u8 reg, u16 val)writel (miiaddr |MII_CLKRANGE_150_250M |MII_BUSY , &mac_p->miiaddr);do { -if (!(readl (&mac_p->miiaddr) &MII_BUSY )) +if (!(readl (&mac_p->miiaddr) &MII_BUSY )) { ret =0 ; +break ; + }udelay (1000 ); }while (timeout--);
@@ -377,7 +381,7 @@ static int configure_phy(struct eth_device *dev)#if defined(CONFIG_DW_SEARCH_PHY ) phy_addr =find_phy (dev); -if (phy_addr >0 ) +if (phy_addr >=0 ) priv->address = phy_addr;else return -1 ;
drivers/net/designware.h +1 -1
@@ -121,7 +121,7 @@ struct eth_dma_regs {#define RXSTART (1 << 1)/* Descriptior related definitions */ -#define MAC_MAX_FRAME_SZ (2048) +#define MAC_MAX_FRAME_SZ (1600)struct dmamacdescr {u32 txrx_status;
Signature · 1 line
1.6.0.2
PATCH 19/28 SPEAr : Changing the default environment variable bootargs
From: Vipin KUMAR <[email protected]>
Linux expects the console to be set to ttyAMA0,115200, so this change is to make default bootargs to console=ttyAMA0,115200....
This patch modifies the default bootargs for all spear devices as following
For environment present in NOR flash
...root=/dev/mtdblock3...
For environment present in NAND flash
...root=/dev/mtdblock7...
--- include/configs/spear-common.h | 10 ++++++---- include/configs/spear13xx_evb.h | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-)
include/configs/spear-common.h +6 -4
@@ -137,7 +137,7 @@*/ #define CONFIG_SYS_MONITOR_LEN 0x00040000#define CONFIG_ENV_SECT_SIZE 0x00010000 -#define CONFIG_FSMTDBLK "/dev/mtdblock8 " +#define CONFIG_FSMTDBLK "/dev/mtdblock3 "#define CONFIG_BOOTCOMMAND "bootm 0xf8050000"
@@ -163,7 +163,7 @@#define CONFIG_ENV_OFFSET 0x60000#define CONFIG_ENV_RANGE 0x10000 -#define CONFIG_FSMTDBLK "/dev/mtdblock12 " +#define CONFIG_FSMTDBLK "/dev/mtdblock7 "#define CONFIG_BOOTCOMMAND "nand read.jffs2 0x1600000 " \ "0x80000 0x4C0000; " \
@@ -171,8 +171,10 @@#endif #define CONFIG_BOOTARGS_NFS "root=/dev/nfs ip=dhcp " \ - "console=ttyS0 init=/bin/sh" -#define CONFIG_BOOTARGS "console=ttyS0 mem=128M " \ + "console=ttyAMA0,115200 " \ + "init=/bin/sh" +#define CONFIG_BOOTARGS "console=ttyAMA0,115200 " \ + "mem=128M " \ "root="CONFIG_FSMTDBLK \ "rootfstype=jffs2"
include/configs/spear13xx_evb.h +6 -4
@@ -131,7 +131,7 @@*/ #define CONFIG_SYS_MONITOR_LEN 0x00040000#define CONFIG_ENV_SECT_SIZE 0x00010000 -#define CONFIG_FSMTDBLK "/dev/mtdblock8 " +#define CONFIG_FSMTDBLK "/dev/mtdblock3 "#define CONFIG_BOOTCOMMAND "bootm 0xe6050000"
@@ -145,7 +145,7 @@#define CONFIG_ENV_OFFSET 0x60000#define CONFIG_ENV_RANGE 0x10000 -#define CONFIG_FSMTDBLK "/dev/mtdblock12 " +#define CONFIG_FSMTDBLK "/dev/mtdblock7 "#define CONFIG_BOOTCOMMAND "nand read.jffs2 0x1600000 " \ "0x80000 0x4C0000; " \
@@ -153,8 +153,10 @@#endif #define CONFIG_BOOTARGS_NFS "root=/dev/nfs ip=dhcp " \ - "console=ttyAMA0 init=/bin/sh" -#define CONFIG_BOOTARGS "console=ttyAMA0 mem=128M " \ + "console=ttyAMA0,115200 " \ + "init=/bin/sh" +#define CONFIG_BOOTARGS "console=ttyAMA0,115200 " \ + "mem=128M " \ "root="CONFIG_FSMTDBLK \ "rootfstype=jffs2"
Signature · 1 line
1.6.0.2
PATCH 20/28 SPEAr1300: Workaround the UHC problem (issue #101435)
From: Armando Visconti <[email protected]>
--- arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c | 33 +++++++++++++++++++++++++++++ include/configs/spear13xx_evb.h | 3 ++ 2 files changed, 36 insertions(+), 0 deletions(-)
arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c +33 -0
@@ -83,6 +83,39 @@ int arch_cpu_init(void)writel (perip1_clk_enb, &misc_p->perip1_clk_enb);writel (perip2_clk_enb, &misc_p->perip2_clk_enb); +#ifdef CONFIG_SPEAR1300_ISSUE_101435 + { +u32 tmp_var; + +/* +* WRKD the UHC problem (issue #101435) +* +* Bit2 in MISC sys_sw_res reg is used to +* discriminate whether we are coming from a power-on +* reset or not. +*/ + tmp_var =readl (&misc_p->sys_sw_res); +if ((tmp_var &0x4 ) ==0 ) { +/* Enable UHC1 and UHC2 clocks) */ + tmp_var =readl (&misc_p->perip1_clk_enb); +writel (tmp_var |0x600 , &misc_p->perip1_clk_enb); + +/* Wait few cycles */ +for (tmp_var =0 ; tmp_var <0x10000 ; tmp_var++) + ; + +/* Reset the system */ +writel (0x1 , &misc_p->sys_sw_res); +while (1 ) + ; + }else { +/* Clear the RESET condition. */ +writel (0x2 , &misc_p->sys_sw_res); + } + + } +#endif + return 0; }#endif
include/configs/spear13xx_evb.h +3 -0
@@ -39,6 +39,9 @@#define CONFIG_ENV_IS_IN_FLASH 1#endif +/* Solve issue #101435 - UHC blocks the BUSMATRIX */ +#define CONFIG_SPEAR1300_ISSUE_101435 1 +/* Ethernet configuration */ #define CONFIG_MII #define CONFIG_DESIGNWARE_ETH
Signature · 1 line
1.6.0.2
PATCH 21/28 Enable high speed support for usb device framework and usbtty
From: Vipin KUMAR <[email protected]>
This patch adds the support for high speed in usb device framework and usbtty driver. This feature has been kept within a macro CONFIG_USBD_HS, so the board configuration files have to define this macro to enable high speed support.
Along with that specific peripheral drivers also need to define a function to let the framework know that the enumeration has happened at high speed. This function prototype is "int is_usbd_high_speed(void)"
--- Makefile | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)
Makefile +8 -4
@@ -2090,22 +2090,26 @@ omap730p2_cs3boot_config : unconfig spear300_config \ spear300_nand_config \ spear300_usbtty_config \ -spear300_usbtty_nand_config \ +spear300_usbtty_nand_config : unconfig + @$(MKCONFIG) -n $@ -t $(@:_config=) spear3xx_evb arm arm926ejs spear300 spear spear + spear310_config \ spear310_nand_config \ spear310_usbtty_config \ -spear310_usbtty_nand_config \ +spear310_usbtty_nand_config : unconfig + @$(MKCONFIG) -n $@ -t $(@:_config=) spear3xx_evb arm arm926ejs spear310 spear spear + spear320_config \ spear320_nand_config \ spear320_usbtty_config \ spear320_usbtty_nand_config : unconfig - @$(MKCONFIG) -n $@ -t $@ spear3xx_evb arm arm926ejs $(@:_config=) spear spear + @$(MKCONFIG) -n $@ -t $@ spear3xx_evb arm arm926ejs spear320 spear spear spear600_config \ spear600_nand_config \ spear600_usbtty_config \ spear600_usbtty_nand_config : unconfig - @$(MKCONFIG) -n $@ -t $@ spear6xx_evb arm arm926ejs $(@:_config=) spear spear + @$(MKCONFIG) -n $@ -t $@ spear6xx_evb arm arm926ejs spear600 spear spear spear1300_config \ spear1300_nand_config \
Signature · 1 line
1.6.0.2
PATCH 22/28 SPEAr : High speed support for designware peripheral
From: Vipin KUMAR <[email protected]>
This patch adds the support for usb device high speed for designware peripheral.
--- drivers/usb/gadget/designware_udc.c | 13 +++++++++---- include/usb/designware_udc.h | 3 +++ 2 files changed, 12 insertions(+), 4 deletions(-)
drivers/usb/gadget/designware_udc.c +9 -4
@@ -566,7 +566,7 @@ int udc_init(void)writel (~0x0 , &udc_regs_p->dev_int_mask);writel (~0x0 , &udc_regs_p->endp_int_mask); -writel (DEV_CONF_FS_SPEED |DEV_CONF_REMWAKEUP |DEV_CONF_SELFPOW | +writel (DEV_CONF_HS_SPEED |DEV_CONF_REMWAKEUP |DEV_CONF_SELFPOW |DEV_CONF_PHYINT_16 , &udc_regs_p->dev_conf);writel (DEV_CNTL_SOFTDISCONNECT , &udc_regs_p->dev_cntl);
@@ -577,6 +577,11 @@ int udc_init(void)return 0 ; } +int is_usbd_high_speed (void ) +{ +return (readl (&udc_regs_p->dev_stat) &DEV_STAT_ENUM ) ?0 :1 ; +} +/* * udc_setup_ep - setup endpoint * Associate a physical endpoint with endpoint_instance
@@ -792,7 +797,7 @@ void udc_startup_events(struct usb_device_instance *device)/* * Plug detection interrupt handling */ -void dw_udc_plug_irq (void ) +static void dw_udc_plug_irq (void ) {if (readl (&plug_regs_p->plug_state) &PLUG_STATUS_ATTACHED ) {/*
@@ -816,7 +821,7 @@ void dw_udc_plug_irq(void)/* * Device interrupt handling */ -void dw_udc_dev_irq (void ) +static void dw_udc_dev_irq (void ) {if (readl (&udc_regs_p->dev_int) &DEV_INT_USBRESET ) {writel (~0x0 , &udc_regs_p->endp_int_mask);
@@ -886,7 +891,7 @@ void dw_udc_dev_irq(void)/* * Endpoint interrupt handling */ -void dw_udc_endpoint_irq (void ) +static void dw_udc_endpoint_irq (void ) {while (readl (&udc_regs_p->endp_int) &ENDP0_INT_CTRLOUT ) {
include/usb/designware_udc.h +3 -0
@@ -197,6 +197,9 @@ struct udcfifo_regs {#define UDC_INT_PACKET_SIZE 64#define UDC_OUT_ENDPOINT 2#define UDC_BULK_PACKET_SIZE 64 +#if defined(CONFIG_USBD_HS ) +#define UDC_BULK_HS_PACKET_SIZE 512 +#endif #define UDC_IN_ENDPOINT 3#define UDC_OUT_PACKET_SIZE 64#define UDC_IN_PACKET_SIZE 64
Signature · 1 line
1.6.0.2
PATCH 23/28 SPEAr : Enable usb device high speed support
From: Vipin KUMAR <[email protected]>
This patch enables the support for usb high speed device for spear platform SOCs
--- include/configs/spear-common.h | 1 + include/configs/spear13xx_evb.h | 1 + 2 files changed, 2 insertions(+), 0 deletions(-)
include/configs/spear-common.h +1 -0
@@ -38,6 +38,7 @@/* USBD driver configuration */ #define CONFIG_DW_UDC #define CONFIG_USB_DEVICE +#define CONFIG_USBD_HS #define CONFIG_USB_TTY #define CONFIG_USBD_PRODUCT_NAME "SPEAr SoC"
include/configs/spear13xx_evb.h +1 -0
@@ -54,6 +54,7 @@/* USBD driver configuration */ #define CONFIG_DW_UDC #define CONFIG_USB_DEVICE +#define CONFIG_USBD_HS #define CONFIG_USB_TTY #define CONFIG_USBD_PRODUCT_NAME "SPEAr SoC"
Signature · 1 line
1.6.0.2
PATCH 24/28 SPEAr : Network support configuration
From: Vipin KUMAR <[email protected]>
This patch implements the review feedbacks provided by Ben according to which board_eth_init routine should not return -1. Instead, it should handle the errors itself (by printing error banner / somethign else)
For more info
http://lists.denx.de/pipermail/u-boot/2010-May/071357.html
--- board/spear/spear300/spear300.c | 7 ++++--- board/spear/spear310/spear310.c | 21 ++++++++++----------- board/spear/spear320/spear320.c | 8 ++++---- board/spear/spear600/spear600.c | 7 ++++--- 4 files changed, 22 insertions(+), 21 deletions(-)
board/spear/spear300/spear300.c +4 -3
@@ -61,9 +61,10 @@ int board_nand_init(struct nand_chip *nand)int board_eth_init (bd_t *bis) { +int ret =0 ;#if defined(CONFIG_DESIGNWARE_ETH ) -return designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ); -#else -return -1 ; +if (designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ) >=0 ) + ret++;#endif +return ret; }
board/spear/spear310/spear310.c +10 -11
@@ -63,27 +63,26 @@ int board_nand_init(struct nand_chip *nand)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 +=-1 ; +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 +=-1 ; +CONFIG_MACB0_PHY ) >=0 ) + ret++;if (macb_eth_initialize (1 , (void *)CONFIG_SYS_MACB1_BASE , -CONFIG_MACB1_PHY ) <0 ) - ret +=-1 ; +CONFIG_MACB1_PHY ) >=0 ) + ret++;if (macb_eth_initialize (2 , (void *)CONFIG_SYS_MACB2_BASE , -CONFIG_MACB2_PHY ) <0 ) - ret +=-1 ; +CONFIG_MACB2_PHY ) >=0 ) + ret++;if (macb_eth_initialize (3 , (void *)CONFIG_SYS_MACB3_BASE , -CONFIG_MACB3_PHY ) <0 ) - ret +=-1 ; +CONFIG_MACB3_PHY ) >=0 ) + ret++;#endif return ret; }
board/spear/spear320/spear320.c +4 -4
@@ -64,13 +64,13 @@ 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 +=-1 ; +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 +=-1 ; +CONFIG_MACB0_PHY ) >=0 ) + ret++;#endif return ret; }
board/spear/spear600/spear600.c +4 -3
@@ -56,9 +56,10 @@ int board_nand_init(struct nand_chip *nand)int board_eth_init (bd_t *bis) { +int ret =0 ;#if defined(CONFIG_DESIGNWARE_ETH ) -return designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ); -#else -return -1 ; +if (designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ) >=0 ) + ret++;#endif +return ret; }
Signature · 1 line
1.6.0.2
PATCH 25/28 SPEAr : Enabling GPT clock explicitly
From: Vipin KUMAR <[email protected]>
uboot needs gpt for timer operations. This clock was enabled from previous level booting software until now. This patch enables it in uboot explicitly
--- arch/arm/cpu/arm926ejs/spear/cpu.c | 6 ++++++ arch/arm/include/asm/arch-spear/spr_misc.h | 2 ++ 2 files changed, 8 insertions(+), 0 deletions(-)
arch/arm/cpu/arm926ejs/spear/cpu.c +6 -0
@@ -35,6 +35,12 @@ int arch_cpu_init(void) periph1_clken =readl (&misc_p->periph1_clken); +#if defined(CONFIG_SPEAR3XX ) + periph1_clken |=MISC_GPT2ENB ; +#elif defined(CONFIG_SPEAR600 ) + periph1_clken |=MISC_GPT3ENB ; +#endif +#if defined(CONFIG_PL011_SERIAL ) periph1_clken |=MISC_UART0ENB ;#endif
arch/arm/include/asm/arch-spear/spr_misc.h +2 -0
@@ -128,6 +128,8 @@ struct misc_regs {#define MISC_USBDENB 0x01000000#define MISC_ETHENB 0x00800000#define MISC_SMIENB 0x00200000 +#define MISC_GPT3ENB 0x00010000 +#define MISC_GPT2ENB 0x00000800#define MISC_FSMCENB 0x00000200#define MISC_I2CENB 0x00000080#define MISC_UART0ENB 0x00000008
Signature · 1 line
1.6.0.2
PATCH 26/28 SPEAr : smi_init moved to board_init
From: Vipin KUMAR <[email protected]>
flash reading is required earlier than flash_init is called since the env_init is called before flash_init. This makes the smi_init necessary before env_init being called
This patch adds these changes
---
board/spear/common/spr_misc.c | 4 ++++
board/spear/spear1300/spear1300.c | 4 ++++
drivers/mtd/st_smi.c | 4 ++--
{drivers => include/linux}/mtd/st_smi.h | 2 ++
4 files changed, 12 insertions(+), 2 deletions(-)
rename {drivers => include/linux}/mtd/st_smi.h (99%)board/spear/common/spr_misc.c +4 -0
@@ -25,6 +25,7 @@#include <command.h> #include <i2c.h> #include <net.h> +#include <linux/mtd/st_smi.h> #include <asm/io.h> #include <asm/arch/hardware.h> #include <asm/arch/spr_emi.h>
@@ -164,6 +165,9 @@ int spear_board_init(ulong mach_type) sizeof(chip->version)); } +#if defined(CONFIG_ST_SMI ) +smi_init (); +#endif #ifdef CONFIG_SPEAR_EMI spear_emi_init ();#endif
board/spear/spear1300/spear1300.c +4 -0
@@ -24,6 +24,7 @@#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>
@@ -34,6 +35,9 @@ int board_init(void) gd->bd->bi_arch_number =MACH_TYPE_SPEAR1300 ; gd->bd->bi_boot_params =CONFIG_BOOT_PARAMS_ADDR ; +#if defined(CONFIG_ST_SMI ) +smi_init (); +#endif return 0 ; }
drivers/mtd/st_smi.c +2 -2
@@ -24,10 +24,10 @@#include <common.h> #include <flash.h> #include <linux/err.h> +#include <linux/mtd/st_smi.h> #include <asm/io.h> #include <asm/arch/hardware.h> -#include "st_smi.h" #if !defined(CONFIG_SYS_NO_FLASH )
@@ -246,7 +246,7 @@ static int smi_write_enable(int bank)* * SMI initialization routine. Sets SMI control register1. */ -static void smi_init (void ) +void smi_init (void ) {/* Setting the fast mode values. SMI working at 166/4 = 41.5 MHz */ writel(HOLD1 | FAST_MODE | BANK_EN | DSEL_TIME | PRESCAL4,
include/linux/mtd/st_smi.h renamed from drivers/mtd/st_smi.h +2 -0
@@ -112,4 +112,6 @@ struct flash_dev {#define XFER_FINISH_TOUT 15/* xfer finish timeout(in ms) */ #define WMODE_TOUT 15/* write enable timeout(in ms) */ +extern void smi_init (void ); +#endif
Signature · 1 line
1.6.0.2
PATCH 27/28 SPEAr : Ethernet issue workaround is not needed when uboot is acting as flashing
From: Vipin KUMAR <[email protected]>
Ethernet/UHC issue workaround which resets the SoC has an unexpected effect while using uboot as flashing utils firmware. So, excluding the changes for uboot built as usbtty firmware
Enable overwriting of env variables. The env variables ethaddr, serial# etc support a feture of being written only once. Though this feature is bypassed using this patch
--- include/configs/spear-common.h | 10 ++++++++++ include/configs/spear13xx_evb.h | 15 ++++++++++++++- include/configs/spear3xx_evb.h | 2 ++ 3 files changed, 26 insertions(+), 1 deletions(-)
include/configs/spear-common.h +10 -0
@@ -27,6 +27,7 @@* Common configurations used for both spear3xx as well as spear6xx */ +#if !defined(CONFIG_SPEAR_USBTTY )/* Ethernet driver configuration */ #define CONFIG_MII #define CONFIG_DESIGNWARE_ETH
@@ -34,6 +35,7 @@#define CONFIG_DW0_PHY 1#define CONFIG_NET_MULTI #define CONFIG_PHY_RESET_DELAY (10000)/* in usec */ +#endif /* USBD driver configuration */ #define CONFIG_DW_UDC
@@ -109,14 +111,22 @@#define CONFIG_CMD_MEMORY #define CONFIG_CMD_RUN #define CONFIG_CMD_SAVES + +#if !defined(CONFIG_SPEAR_USBTTY )#define CONFIG_CMD_NET #define CONFIG_CMD_MII #define CONFIG_CMD_PING #define CONFIG_CMD_DHCP +#endif /* This must be included AFTER the definition of CONFIG_COMMANDS (if any) */ #include <config_cmd_default.h> +#if defined(CONFIG_SPEAR_USBTTY ) +#undef CONFIG_CMD_NET +#undef CONFIG_CMD_NFS +#endif +/* * Default Environment Varible definitions */
include/configs/spear13xx_evb.h +14 -1
@@ -39,9 +39,12 @@#define CONFIG_ENV_IS_IN_FLASH 1#endif +#if !defined(CONFIG_SPEAR_USBTTY )/* Solve issue #101435 - UHC blocks the BUSMATRIX */ -#define CONFIG_SPEAR1300_ISSUE_101435 1 +#define CONFIG_SPEAR1300_ISSUE_101435 1 +#endif +#if !defined(CONFIG_SPEAR_USBTTY )/* Ethernet configuration */ #define CONFIG_MII #define CONFIG_DESIGNWARE_ETH
@@ -50,6 +53,7 @@#define CONFIG_DW_SEARCH_PHY 1#define CONFIG_DW0_PHY 1#define CONFIG_PHY_RESET_DELAY (10000)/* in usec */ +#endif /* USBD driver configuration */ #define CONFIG_DW_UDC
@@ -108,14 +112,22 @@#define CONFIG_CMD_NAND #define CONFIG_CMD_MEMORY #define CONFIG_CMD_RUN + +#if !defined(CONFIG_SPEAR_USBTTY )#define CONFIG_CMD_NET #define CONFIG_CMD_MII #define CONFIG_CMD_PING #define CONFIG_CMD_DHCP +#endif /* This must be included AFTER the definition of CONFIG_COMMANDS (if any) */ #include <config_cmd_default.h> +#if defined(CONFIG_SPEAR_USBTTY ) +#undef CONFIG_CMD_NET +#undef CONFIG_CMD_NFS +#endif +/* * Default Environment Varible definitions */
@@ -126,6 +138,7 @@#define CONFIG_BOOTDELAY 1#endif +#define CONFIG_ENV_OVERWRITE /* * Environment placing */
include/configs/spear3xx_evb.h +2 -0
@@ -51,6 +51,7 @@#include <configs/spear-common.h> +#if !defined(CONFIG_SPEAR_USBTTY )/* Ethernet driver configuration */ #define CONFIG_DW_ALTDESCRIPTOR 1
@@ -66,6 +67,7 @@#define CONFIG_MACB0_PHY 0x01#endif +#endif /* Serial Configuration (PL011) */ #define CONFIG_SYS_SERIAL0 0xD0000000
Signature · 1 line
1.6.0.2
PATCH 28/28 SPEAr1310 : spear1310 support added
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
--- 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
MAINTAINERS +1 -0
@@ -670,6 +670,7 @@ Prakash Kumar <[email protected]> Vipin Kumar <[email protected]> spear1300 ARM CORTEX-A9 (spear1300 Soc) + spear1310 ARM CORTEX-A9 (spear1310 Soc) spear300 ARM926EJS (spear300 Soc) spear310 ARM926EJS (spear310 Soc) spear320 ARM926EJS (spear320 Soc)
MAKEALL +1 -0
@@ -660,6 +660,7 @@ LIST_ARM_CORTEX_A8=" \ s5p_goni \ smdkc100 \ spear1300 \ + spear1310 \ " #########################################################################
Makefile +6 -0
@@ -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
arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c +4 -0
@@ -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
board/spear/spear1310/Makefile new file +51 -0
51 lines not on this page · raw message
board/spear/spear1310/config.mk new file +28 -0
@@ -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/spear1310/spear1310.c new file +70 -0
70 lines not on this page · raw message
doc/README.spear +8 -3
@@ -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)
include/configs/spear13xx_evb.h +5 -0
@@ -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
Signature · 1 line
1.6.0.2
PATCH 28/28 SPEAr1310 : spear1310 support added
Dear Vipin KUMAR,
Quoted 7 lines · In message <[email protected]> you wrote:
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
Is this adding a SoC or a board? Looks more like a board to me!
Makefile spear1300_usbtty_config \ · line 2124
Quoted 13 lines
Makefile +5
-0@@ -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
NAK. Please move to boards.cfg instead.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de What's the sound a name makes when it's dropped?
PATCH 27/28 SPEAr : Ethernet issue workaround is not needed when uboot is acting as flashing
In reply to Vipin KUMARDear Vipin KUMAR,
Quoted 5 lines · In message <[email protected]> you wrote:
From: Vipin KUMAR <[email protected]>
Ethernet/UHC issue workaround which resets the SoC has an unexpected effect while using uboot as flashing utils firmware. So, excluding the changes for uboot built as usbtty firmware
Sorry, but I don't understand what you're trying to tell us here. Please re-formulate so everybody understands this.
Quoted 3 lines
Enable overwriting of env variables. The env variables ethaddr, serial# etc support a feture of being written only once. Though this feature is bypassed using this patch
This is not a good idea, it seems to me.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "There was no difference between the behavior of a god and the operations of pure chance..." - Thomas Pynchon, _Gravity's Rainbow_
PATCH 25/28 SPEAr : Enabling GPT clock explicitly
In reply to Vipin KUMARDear Vipin KUMAR,
Quoted 4 lines · In message <[email protected]> you wrote:
From: Vipin KUMAR <[email protected]>
uboot needs gpt for timer operations. This clock was enabled from previous level booting software until now. This patch enables it in uboot explicitly
Please note: the correct spelling is "U-Boot".
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "The majority of the stupid is invincible and guaranteed for all time. The terror of their tyranny, however, is alleviated by their lack of consistency." - Albert Einstein
PATCH 24/28 SPEAr : Network support configuration
In reply to Vipin KUMARDear Vipin KUMAR,
Quoted 8 lines · In message <[email protected]> you wrote:
From: Vipin KUMAR <[email protected]>
This patch implements the review feedbacks provided by Ben according to which
board_eth_initroutine should not return -1. Instead, it should handle the errors itself (by printing error banner / somethign else)For more info
http://lists.denx.de/pipermail/u-boot/2010-May/071357.html
Please squash into the patch that adds this code.
Best regards,
Wolfgang Denk
Signature · 8 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The universe contains any amount of horrible ways to be woken up,
such as the noise of the mob breaking down the front door, the scream
of fire engines, or the realization that today is the Monday which on
Friday night was a comfortably long way off.
- Terry Pratchett, _Moving Pictures_PATCH 22/28 SPEAr : High speed support for designware peripheral
In reply to Vipin KUMARHi,
2010/7/14 Vipin KUMAR <[email protected]>:
Quoted 9 lines
From: Vipin KUMAR <[email protected]>
This patch adds the support for usb device high speed for designware peripheral.
Signed-off-by Vipin Kumar <[email protected]>---
?drivers/usb/gadget/designware_udc.c | ? 13 +++++++++---- ?include/usb/designware_udc.h ? ? ? ?| ? ?3 +++ ?2 files changed, 12 insertions(+), 4 deletions(-)
Wolfgang Denk
NAKPATCH 21/28 Enable high speed support for usb device framework and usbtty
In reply to Vipin KUMARDear Vipin KUMAR,
Quoted 41 lines · In message <[email protected]> you wrote:
From: Vipin KUMAR <[email protected]>
This patch adds the support for high speed in usb device framework and usbtty driver. This feature has been kept within a macro
CONFIG_USBD_HS, so the board configuration files have to define this macro to enable high speed support.Along with that specific peripheral drivers also need to define a function to let the framework know that the enumeration has happened at high speed. This function prototype is "int
is_usbd_high_speed(void)"Signed-off-by Vipin Kumar <[email protected]>--- Makefile | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)Makefile +7
-3@@ -2090,22 +2090,26 @@ omap730p2_cs3boot_config : unconfig spear300_config \ spear300_nand_config \ spear300_usbtty_config \ -spear300_usbtty_nand_config \ +spear300_usbtty_nand_config : unconfig + @$(MKCONFIG) -n $@ -t $(@:_config=) spear3xx_evb arm arm926ejs spear300 spear spear + spear310_config \ spear310_nand_config \ spear310_usbtty_config \ -spear310_usbtty_nand_config \ +spear310_usbtty_nand_config : unconfig + @$(MKCONFIG) -n $@ -t $(@:_config=) spear3xx_evb arm arm926ejs spear310 spear spear + spear320_config \ spear320_nand_config \ spear320_usbtty_config \ spear320_usbtty_nand_config : unconfig - @$(MKCONFIG) -n $@ -t $@ spear3xx_evb arm arm926ejs $(@:_config=) spear spear + @$(MKCONFIG) -n $@ -t $@ spear3xx_evb arm arm926ejs spear320 spear spear
Makefile omap730p2_cs3boot_config : unconfig · line 2115
Quoted 10 lines
Makefile +1
-1spear600_config \ spear600_nand_config \ spear600_usbtty_config \ spear600_usbtty_nand_config : unconfig - @$(MKCONFIG) -n $@ -t $@ spear6xx_evb arm arm926ejs $(@:_config=) spear spear + @$(MKCONFIG) -n $@ -t $@ spear6xx_evb arm arm926ejs spear600 spear spear spear1300_config \ spear1300_nand_config \
NAK.
Please move to boards.cfg instead.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Never underestimate the power of human stupidity when it comes to using technology they don't understand.
PATCH 17/28 SPEAr : USB device controller bugfixes
In reply to Vipin KUMARHi,
2010/7/14 Vipin KUMAR <[email protected]>:
Quoted 12 lines
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 reachesSTATE_ADDRESSEDor 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
Quoted 4 lines
Signed-off-by Vipin Kumar <[email protected]>---
?drivers/usb/gadget/designware_udc.c | ? 59 ++++++++++++++++++++++------------ ?1 files changed, 38 insertions(+), 21 deletions(-)
Wolfgang Denk
NAKPATCH 15/28 SPEAr : spear1300 SoC support added
In reply to Vipin KUMARDear Vipin KUMAR,
Quoted 4 lines · In message <[email protected]> you wrote:
From: Vipin KUMAR <[email protected]>
SPEAr1300 SoC support contains basic spear1300 support along with the usage of following drivers
Are you here adding support for a SoC or for a board??? Looks more like board support to me...
...
Makefile spear600_usbtty_config \ · line 2114
Quoted 11 lines
Makefile +5
-0@@ -2107,6 +2107,12 @@ spear600_usbtty_config \ spear600_usbtty_nand_config : unconfig @$(MKCONFIG) -n $@ -t $@ 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
NAK.
Please use boards.cfg instead.
...
Makefile spear600_usbtty_config \ · line 2117
Quoted 3 lines
Makefile +3
-0+int misc_init_r(void) +{ + setenv("verify", "n");
NAK.
Please don't mess with things a user might want to do differently.
You can add this as default settingin your environment, but please allow the user to dicede otherwise.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I paid too much for it, but its worth it.
PATCH 15/28 SPEAr : spear1300 SoC support added
Quoted 2 lines · Wolfgang Denk
Dear Vipin KUMAR,
Dear Wolfgang,
Quoted 9 lines
Quoted 4 lines · In message <[email protected]> you wrote:
From: Vipin KUMAR <[email protected]>
SPEAr1300 SoC support contains basic spear1300 support along with the usage of following drivers
Are you here adding support for a SoC or for a board??? Looks more like board support to me...
Yes, it is a board support. I would change this comment here
Quoted 15 lines
...
Makefile spear600_usbtty_config \ · line 2114
Quoted 11 lines
Makefile +5
-0@@ -2107,6 +2107,12 @@ spear600_usbtty_config \ spear600_usbtty_nand_config : unconfig @$(MKCONFIG) -n $@ -t $@ 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 spear13xxNAK.
Quoted 2 lines
Please use boards.cfg instead.
OK.
Quoted 8 lines
...
Makefile
Quoted 3 lines
Makefile +3
-0+int misc_init_r(void) +{ + setenv("verify", "n");NAK.
Quoted 5 lines
Please don't mess with things a user might want to do differently.
You can add this as default settingin your environment, but please allow the user to dicede otherwise.
OK. I would add this in default environments in patch-set v2
Quoted 2 lines
Thanks for your valuable inputs. I would incorporate these and send a patch-set v2
Thanks and Regards
Vipin
Quoted 4 lines
Best regards,
Wolfgang Denk
PATCH 14/28 SPEAr : Basic spear1300 architecture support added
In reply to Vipin KUMARDear Vipin KUMAR,
Quoted 4 lines · In message <[email protected]> you wrote:
From: Vipin KUMAR <[email protected]>
SPEAr1300 is an ARMCortexA9 dual core based SoC which supports multiple peripherals such as
...
arch/arm/cpu/arm_cortexa8/spear13xx/reset.c line 40
Quoted 7 lines
arch/arm/cpu/arm_cortexa8/spear13xx/reset.c new file +7
-0+printf ("System is going to reboot ...\n" ); + +/* +* This 1 second delay will allow the above message +* to be printed before reset +*/ +udelay ((1000 *1000 ));
udelay() is not designed to provide such long delays. This may or may not work - it's bad style in any case.
Also, do we really need one second to print 30 characters?
And hey, why do you print this at all? Please remove the printf() _and_ the delay.
...
arch/arm/include/asm/arch-spear13xx/ca9_ltimer.h line 41
Quoted 4 lines
arch/arm/include/asm/arch-spear13xx/ca9_ltimer.h new file +4
-0+/* load related definitions */ +#define FREE_RUNNING (0xFFFFFFFF) + +#define CONFIG_SPEARCA9_HZ_CLK (250000000)
No parens needed in these #defines (please check and fix globally).
...
arch/arm/include/asm/arch-spear13xx/sys_proto.h
Quoted 3 lines
arch/arm/include/asm/arch-spear13xx/sys_proto.h new file +0
-0@@ -0,0 +1,34 @@
Drop that header file, and move the prototypes to some other suitable header.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Quote from the Boss... "I didn't say it was your fault. I said I was going to blame it on you."
Wolfgang Denk
NAKPATCH 13/28 SPEAr : Supporting various configurations for spear3xx and spear6xx boards
In reply to Vipin KUMARDear Vipin KUMAR,
Quoted 48 lines · In message <[email protected]> you wrote:
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 NANDAlso, renaming the
include/configs/spearxxx.hfiles tospear3xx_evb.h,spear6xx_evb.hetc to depict evaluation board configuration.Signed-off-by Vipin Kumar <[email protected]>--- Makefile | 25 +++++++++++++++---- 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, 62 insertions(+), 58 deletions(-) rename include/configs/{spear3xx.h => spear3xx_evb.h} (95%) rename include/configs/{spear6xx.h => spear6xx_evb.h} (88%)Makefile +10
-5@@ -2088,12 +2088,27 @@ omap730p2_cs3boot_config : unconfig @$(MKCONFIG) -n $@ -a omap730p2 arm arm926ejs omap730p2 ti omap spear300_config \ +spear300_nand_config \ +spear300_usbtty_config \ +spear300_usbtty_nand_config \ spear310_config \ -spear320_config : unconfig - @$(MKCONFIG) -n $@ -t $@ spear3xx arm arm926ejs $(@:_config=) spear spear - -spear600_config : unconfig - @$(MKCONFIG) -n $@ -t $@ 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
Makefile omap730p2_cs3boot_config : unconfig · line 2111
Quoted 10 lines
Makefile +10
-0+ @$(MKCONFIG) -n $@ -t $@ spear3xx_evb arm arm926ejs $(@:_config=) spear spear + +spear600_config \ +spear600_nand_config \ +spear600_usbtty_config \ +spear600_usbtty_nand_config : unconfig + @$(MKCONFIG) -n $@ -t $@ spear6xx_evb arm arm926ejs $(@:_config=) spear spear + +suen3_config: unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs km_arm keymile kirkwood
NAK.
I don't want to have such stuff in the Makefile any more. Please try to find a way how to do this using boards.cfg instead.
[I know that tis is non-trivial; you may want to talk to Detlev about this - he was thinking about the same issue, but I don;t know if he came to any conclusions.]
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I have the simplest tastes. I am always satisfied with the best.
-- Oscar WildePATCH 13/28 SPEAr : Supporting various configurations for spear3xx and spear6xx boards
Dear Vipin KUMAR,
Quoted 36 lines · I wrote:
Quoted 22 lines
Makefile +10
-5@@ -2088,12 +2088,27 @@ omap730p2_cs3boot_config : unconfig @$(MKCONFIG) -n $@ -a omap730p2 arm arm926ejs omap730p2 ti omap spear300_config \ +spear300_nand_config \ +spear300_usbtty_config \ +spear300_usbtty_nand_config \ spear310_config \ -spear320_config : unconfig - @$(MKCONFIG) -n $@ -t $@ spear3xx arm arm926ejs $(@:_config=) spear spear - -spear600_config : unconfig - @$(MKCONFIG) -n $@ -t $@ 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 : unconfigMakefile omap730p2_cs3boot_config : unconfig · line 2111
Quoted 10 lines
Makefile +10
-0+ @$(MKCONFIG) -n $@ -t $@ spear3xx_evb arm arm926ejs $(@:_config=) spear spear + +spear600_config \ +spear600_nand_config \ +spear600_usbtty_config \ +spear600_usbtty_nand_config : unconfig + @$(MKCONFIG) -n $@ -t $@ spear6xx_evb arm arm926ejs $(@:_config=) spear spear + +suen3_config: unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs km_arm keymile kirkwoodNAK.
Quoted 6 lines
I don't want to have such stuff in the
Makefileany more. Please try to find a way how to do this using boards.cfg instead.[I know that tis is non-trivial; you may want to talk to Detlev about this - he was thinking about the same issue, but I don;t know if he came to any conclusions.]
I discussed this topic with Detlev. This is the suggestion we came up with:
- At the moment, the first fieled in the boards.cfg file is used to determine the name of the board configuration file.
- We will now extend this and allow for additional configuration parameters to be appended.
- Unlike in the Makefile, where we were restricted by the make syntax, we suggest to use a comma as separator character.
- There can be an arbitrary number of such parameters (zero or more), but of course the list should be kept short to keep the file readable.
- The configuration parameters can take the simple form "name" (as we use now in the Makefile) or "name=value".
- The code in "mkconfig" that processes these parameters (similar to what the "-t" option is doing now) will translate a plain "name" entry into a "#define CONFIG_MK_<name> 1", and a "name=value" entry into "#define CONFIG_MK_<name> value".
In the result, instead of adding these lines to the Makefile:
+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 $@ spear3xx_evb arm arm926ejs $(@:_config=) spear spear
we would add these lines to the boards.cfg file:
spear310 arm arm926ejs arm926ejs spear310 spear spear
spear310,nand arm arm926ejs arm926ejs spear310 spear spear
spear310,usbtty arm arm926ejs arm926ejs spear310 spear spear
spear310,usbtty,nand arm arm926ejs arm926ejs spear310 spear spear spear320 arm arm926ejs arm926ejs spear310 spear spear
spear320,nand arm arm926ejs arm926ejs spear310 spear spear
spear320,usbtty arm arm926ejs arm926ejs spear310 spear spear
spear320,usbtty,nand arm arm926ejs arm926ejs spear310 spear spear
What do you think?
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Whom the gods would destroy, they first teach BASIC.
PATCH 13/28 SPEAr : Supporting various configurations for spear3xx and spear6xx boards
Quoted 5 lines · Wolfgang Denk
spear310 arm arm926ejs arm926ejs spear310 spear spear
spear310,nand arm arm926ejs arm926ejs spear310 spear spear
spear310,usbtty arm arm926ejs arm926ejs spear310 spear spearspear310,usbtty,nand arm arm926ejs arm926ejs spear310 spear spear spear320 arm arm926ejs arm926ejs spear310 spear spear
Quoted 7 lines
spear320,nand arm arm926ejs arm926ejs spear310 spear spear
spear320,usbtty arm arm926ejs arm926ejs spear310 spear spear
spear320,usbtty,nand arm arm926ejs arm926ejs spear310 spear spearWhat do you think?
My 5 cents:
I would add the "parameters" to the end, at the right side, then it won't turn ugly if there are many parameters. One could also think of releasing the line length limitation for this file...
spear320 arm arm926ejs arm926ejs spear310 spear spear
...
spear320 arm arm926ejs arm926ejs spear310 spear spear usbtty spear320 arm arm926ejs arm926ejs spear310 spear spear usbtty,nand spear320 arm arm926ejs arm926ejs spear310 spear spear usbtty,nand,and,theese,are,epic,many,needless,parameters
and it would keep the lefthand side of the table nice and tidy.
Best Regards,
Reinhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reinhard_meyer.vcf
Type: text/x-vcard
Size: 370 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100716/f823736b/attachment.vcf
PATCH 13/28 SPEAr : Supporting various configurations for spear3xx and spear6xx boards
In reply to Wolfgang DenkQuoted 81 lines · Wolfgang Denk
Dear Vipin KUMAR,
Quoted 36 lines · I wrote:
Quoted 22 lines
Makefile +10
-5@@ -2088,12 +2088,27 @@ omap730p2_cs3boot_config : unconfig @$(MKCONFIG) -n $@ -a omap730p2 arm arm926ejs omap730p2 ti omap spear300_config \ +spear300_nand_config \ +spear300_usbtty_config \ +spear300_usbtty_nand_config \ spear310_config \ -spear320_config : unconfig - @$(MKCONFIG) -n $@ -t $@ spear3xx arm arm926ejs $(@:_config=) spear spear - -spear600_config : unconfig - @$(MKCONFIG) -n $@ -t $@ 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 : unconfigMakefile omap730p2_cs3boot_config : unconfig · line 2111
Quoted 10 lines
Makefile +10
-0+ @$(MKCONFIG) -n $@ -t $@ spear3xx_evb arm arm926ejs $(@:_config=) spear spear + +spear600_config \ +spear600_nand_config \ +spear600_usbtty_config \ +spear600_usbtty_nand_config : unconfig + @$(MKCONFIG) -n $@ -t $@ spear6xx_evb arm arm926ejs $(@:_config=) spear spear + +suen3_config: unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs km_arm keymile kirkwoodNAK.
Quoted 6 lines
I don't want to have such stuff in the
Makefileany more. Please try to find a way how to do this using boards.cfg instead.[I know that tis is non-trivial; you may want to talk to Detlev about this - he was thinking about the same issue, but I don;t know if he came to any conclusions.]
I discussed this topic with Detlev. This is the suggestion we came up with:
- At the moment, the first fieled in the boards.cfg file is used to determine the name of the board configuration file.
- We will now extend this and allow for additional configuration parameters to be appended.
- Unlike in theMakefile, where we were restricted by the make syntax, we suggest to use a comma as separator character.
- There can be an arbitrary number of such parameters (zero or more), but of course the list should be kept short to keep the file readable.
- The configuration parameters can take the simple form "name" (as we use now in theMakefile) or "name=value".
- The code in "mkconfig" that processes these parameters (similar to what the "-t" option is doing now) will translate a plain "name" entry into a "#define CONFIG_MK_<name> 1", and a "name=value" entry into "#define CONFIG_MK_<name> value".In the result, instead of adding these lines to the
Makefile:Makefile +8
-0+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 $@ spear3xx_evb arm arm926ejs $(@:_config=) spear spearwe would add these lines to the boards.cfg file:
Quoted 10 lines
spear310 arm arm926ejs arm926ejs spear310 spear spear
spear310,nand arm arm926ejs arm926ejs spear310 spear spear
spear310,usbtty arm arm926ejs arm926ejs spear310 spear spearspear310,usbtty,nand arm arm926ejs arm926ejs spear310 spear spear spear320 arm arm926ejs arm926ejs spear310 spear spearspear320,nand arm arm926ejs arm926ejs spear310 spear spear
spear320,usbtty arm arm926ejs arm926ejs spear310 spear spear
spear320,usbtty,nand arm arm926ejs arm926ejs spear310 spear spear
Dear Wolfgang,
Got it. This is nice. Clears up a little mess in the Makefile I would make the changes as suggested.
Thanks..
Regards
Vipin
Quoted 7 lines
What do you think?
Best regards,
Wolfgang Denk
PATCH 12/28 SPEAr : USB Device Controller driver support added
In reply to Vipin KUMARHi,
2010/7/14 Vipin KUMAR <[email protected]>:
Quoted 8 lines
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.
Signed-off-by Vipin Kumar <[email protected]>---
Quoted 8 lines
?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%) ?renameinclude/usb/{spr_udc.h=>designware_udc.h} (98%)
PATCH 8/28 SPEAr : FSMC driver support added
In reply to Vipin KUMARDear Vipin KUMAR,
Quoted 10 lines · In message <[email protected]> you wrote:
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.
Signed-off-by Vipin Kumar <[email protected]>
...
drivers/mtd/nand/fsmc_nand.c line 132
Quoted 4 lines
drivers/mtd/nand/fsmc_nand.c new file +4
-0+static void fsmc_nand_hwcontrol (struct mtd_info *mtd,int cmd,uint ctrl) +{ +struct nand_chip *this = mtd->priv; +ulong IO_ADDR_W ;
We don't allow for CAPITAL C identifiers - these are reserved for macros.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Bus error -- please leave by the rear door.
PATCH 7/28 SPEAr : macb driver support added for spear310 and spear320
In reply to Vipin KUMARDear Vipin KUMAR,
Quoted 16 lines · In message <[email protected]> you wrote:
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
Signed-off-by Vipin Kumar <[email protected]>--- arch/arm/include/asm/arch-spear/clk.h | 27 +++++++++++++++++++++++++++ arch/arm/include/asm/arch-spear/hardware.h | 7 +++++++ board/spear/spear310/spear310.c | 25 ++++++++++++++++++++++--- board/spear/spear320/spear320.c | 12 +++++++++--- include/configs/spear3xx.h | 13 +++++++++++++ 5 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 arch/arm/include/asm/arch-spear/clk.h
...
Quoted 6 lines
board/spear/spear310/spear310.c +6
-0+#if defined(CONFIG_MACB ) +if (macb_eth_initialize (0 , (void *)CONFIG_SYS_MACB0_BASE , +CONFIG_MACB0_PHY ) <0 ) + ret +=-1 ; + + if (macb_eth_initialize(1, (void *)CONFIG_SYS_MACB1_BASE,
board/spear/spear310/spear310.c int board_nand_init(struct nand_chip *nand) · line 85
Quoted 10 lines
board/spear/spear310/spear310.c +10
-0+ CONFIG_MACB1_PHY) < 0) + ret +=-1 ; + +if (macb_eth_initialize (2 , (void *)CONFIG_SYS_MACB2_BASE , +CONFIG_MACB2_PHY ) <0 ) + ret +=-1 ; + +if (macb_eth_initialize (3 , (void *)CONFIG_SYS_MACB3_BASE , +CONFIG_MACB3_PHY ) <0 ) + ret +=-1 ;
We need braces for multiline statements.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "Infidels in all ages have battled for the rights of man, and have at all times been the fearless advocates of liberty and justice." - Robert Green Ingersoll