SPEAr: Update platform support for SPEAr3xx/6xx
Subsystems (2)
cover SPEAr: Update platform support for SPEAr3xx/6xx
This patchset updates the SPEAr support in the u-boot. It contains various bugfixes and enhancements.
The patches have certain dependencies on the drivers, so should be applied once the driver patches are frozen. The various drivers on which these patches depend are:
1. USB device controller:
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/125220/focus=126598
2. USB OTG: Patch (USB:gadget:designware USB OTG implementation)
3. ST_SMI: http://lists.denx.de/pipermail/u-boot/2012-February/118672.html
4. FSMC_NAND: http://patchwork.ozlabs.org/patch/143167/
5. Designware ethernet controller:
http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/126029
In a subsequent patchset, more features shall be added along with cleanup of the directory structure.
Amit Virdi (6):
SPEAr: Fix ARM relocation support
SPEAr: Eliminate dependency on Xloader table
SPEAr: Initialize SNOR in early_board_init_f
SPEAr: Use separate config flags for 3xx and 6xx board files cleanup/SPEAr: Remove unnecessary parenthesis cleanup/SPEAr: Define configuration flags more elegantly
Shiraz Hashim (4):
SPEAr: Enable autoneg for ethernet
SPEAr: Enable dcache for fast file transfer
SPEAr: explicitly select clk src for UART
SPEAr: Correct SoC ID offset in misc configuration space
Vipin KUMAR (10):
SPEAr: Place ethaddr write and read within CONFIG_CMD_NET
SPEAr: Configure network support for spear SoCs
SPEAr: Add macb driver support for spear310 and spear320
SPEAr: Add basic arch related support for SPEAr SoCs
SPEAr: Add configuration options for spear3xx and spear6xx boards
SPEAr: Remove unused flag (CONFIG_SYS_HZ_CLOCK)
SPEAr: Change the default environment variables
SPEAr: Enable usb device high speed support
SPEAr: spear usbtty configuration does not use ethernet device
SPEAr: Enable udc and usb-console support only for usbtty
configuration
Vipin Kumar (5):
SPEAr: Add interface information in initialization
SPEAr: Enable CONFIG_SYS_FLASH_PROTECTION
SPEAr: Correct the definition of CONFIG_SYS_MONITOR_BASE
SPEAr: Enable CONFIG_SYS_FLASH_EMPTY_INFO macro
SPEAr: Enable ONFI nand flash detection for spear3xx and 6xx and evb
arch/arm/cpu/arm926ejs/spear/Makefile | 3 +-
arch/arm/cpu/arm926ejs/spear/cpu.c | 89 +++++++++++++++++
.../arm/include/asm/arch-spear/clk.h | 29 +-----
arch/arm/include/asm/arch-spear/hardware.h | 8 ++
arch/arm/include/asm/arch-spear/spr_defs.h | 7 --
arch/arm/include/asm/arch-spear/spr_misc.h | 11 ++-
.../arm/include/asm/arch-spear/spr_xloader_table.h | 67 -------------
board/spear/common/Makefile | 9 ++-
board/spear/common/spr_misc.c | 102 +++++++-------------
board/spear/spear300/config.mk | 13 +---
board/spear/spear300/spear300.c | 15 +++
board/spear/spear310/config.mk | 11 --
board/spear/spear310/spear310.c | 32 ++++++
board/spear/spear320/config.mk | 11 --
board/spear/spear320/spear320.c | 30 ++++++
board/spear/spear600/config.mk | 13 +---
board/spear/spear600/spear600.c | 18 ++++
boards.cfg | 20 +++-
doc/README.spear | 39 ++++++--
drivers/net/designware.c | 10 ++-
drivers/net/designware.h | 1 +
include/configs/spear-common.h | 94 +++++++++++++-----
include/configs/{spear3xx.h => spear3xx_evb.h} | 49 ++++++++--
include/configs/{spear6xx.h => spear6xx_evb.h} | 15 +++-
include/netdev.h | 2 +-
25 files changed, 429 insertions(+), 269 deletions(-)
create mode 100644 arch/arm/cpu/arm926ejs/spear/cpu.c
copy include/configs/spear6xx.h => arch/arm/include/asm/arch-spear/clk.h (60%)
delete mode 100644 arch/arm/include/asm/arch-spear/spr_xloader_table.h
rename include/configs/{spear3xx.h => spear3xx_evb.h} (79%)
rename include/configs/{spear6xx.h => spear6xx_evb.h} (84%)Signature · 1 line
1.7.2.2
PATCH 1/25 SPEAr: Fix ARM relocation support
While the u-boot code is running from the flash, it is essential that no access is made to the bss segment. This is due to the fact that .rel.dyn and .bss areas overlap and former contains information used in relocation. In SPEAr, this was not taken into consideration. As a result, while the relocation wasn't complete, dram_init populated an uninitialized global variable resulting in corruption of .rel.dyn area, which resulted in u-boot crash.
This commit fixes this problem by removing code that accesses bss segment
--- board/spear/common/spr_misc.c | 20 +------------------- 1 files changed, 1 insertions(+), 19 deletions(-)
board/spear/common/spr_misc.c +1 -19
@@ -40,27 +40,9 @@ static struct chip_data chip_data;int dram_init (void ) { -struct xloader_table *xloader_tb = - (struct xloader_table *)XLOADER_TABLE_ADDRESS ; -struct xloader_table_1_1 *table_1_1; -struct xloader_table_1_2 *table_1_2; -struct chip_data *chip = &chip_data; - +/* Store complete RAM size and return */ gd->ram_size =get_ram_size (PHYS_SDRAM_1 ,PHYS_SDRAM_1_MAXSIZE ); -if (XLOADER_TABLE_VERSION_1_1 == xloader_tb->table_version) { - table_1_1 = &xloader_tb->table.table_1_1; - chip->dramfreq = table_1_1->ddrfreq; - chip->dramtype = table_1_1->ddrtype; - - }else if (XLOADER_TABLE_VERSION_1_2 == xloader_tb->table_version) { - table_1_2 = &xloader_tb->table.table_1_2; - chip->dramfreq = table_1_2->ddrfreq; - chip->dramtype = table_1_2->ddrtype; - }else { - chip->dramfreq =-1 ; - } -return 0 ; }
Signature · 1 line
1.7.2.2
PATCH 1/25 SPEAr: Fix ARM relocation support
Quoted 11 lines · On Wednesday 07 March 2012 13:03:50 Amit Virdi wrote:
While the u-boot code is running from the flash, it is essential that no access is made to the bss segment. This is due to the fact that .rel.dyn and .bss areas overlap and former contains information used in relocation. In SPEAr, this was not taken into consideration. As a result, while the relocation wasn't complete,
dram_initpopulated an uninitialized global variable resulting in corruption of .rel.dyn area, which resulted in u-boot crash.This commit fixes this problem by removing code that accesses bss segment
Signed-off-by Amit Virdi <[email protected]>
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 2/25 SPEAr: Eliminate dependency on Xloader table
In reply to Amit VirdiXloader table was used primarily to inform u-boot about the DDR size. However, now the ddr size is calculated at runtime which eliminates any need for the Xloader table. So removing this unnecessary code.
--- arch/arm/include/asm/arch-spear/spr_defs.h | 7 -- .../arm/include/asm/arch-spear/spr_xloader_table.h | 67 -------------------- board/spear/common/spr_misc.c | 41 ------------ 3 files changed, 0 insertions(+), 115 deletions(-) delete mode 100644 arch/arm/include/asm/arch-spear/spr_xloader_table.h
arch/arm/include/asm/arch-spear/spr_defs.h +0 -7
@@ -28,13 +28,6 @@ extern int spear_board_init(ulong);extern void setfreq (unsigned int ,unsigned int );extern unsigned int setfreq_sz; -struct chip_data { -int cpufreq; -int dramfreq; -int dramtype; -uchar version[32 ]; -}; -/* HW mac id in i2c memory definitions */ #define MAGIC_OFF 0x0#define MAGIC_LEN 0x2
arch/arm/include/asm/arch-spear/spr_xloader_table.h deleted +0 -67
67 lines not on this page · raw message
board/spear/common/spr_misc.c +0 -41
91 lines not on this page · raw message
Signature · 1 line
1.7.2.2
PATCH 2/25 SPEAr: Eliminate dependency on Xloader table
Quoted 5 lines · On Wednesday 07 March 2012 13:03:51 Amit Virdi wrote:
Xloader table was used primarily to inform u-boot about the DDR size. However, now the ddr size is calculated at runtime which eliminates any need for the Xloader table. So removing this unnecessary code.
Signed-off-by Amit Virdi <[email protected]>
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 3/25 SPEAr: Place ethaddr write and read within CONFIG_CMD_NET
In reply to Amit VirdiFrom: 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 | 29 +++++++++++++++++++++-------- doc/README.spear | 8 ++++++++ 2 files changed, 29 insertions(+), 8 deletions(-)
board/spear/common/spr_misc.c +21 -8
@@ -36,6 +36,10 @@DECLARE_GLOBAL_DATA_PTR ; +#if defined(CONFIG_CMD_NET ) +static int i2c_read_mac (uchar *buffer); +#endif +int dram_init (void ) {/* Store complete RAM size and return */
@@ -136,6 +140,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 ];
@@ -172,17 +177,18 @@ static int write_mac(uchar *mac) return 0; } -puts ("I2C EEPROM writing failed \n" ); +puts ("I2C EEPROM writing failed\n" );return -1 ; } +#endif int do_chip_config (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) {void (*sram_setfreq) (unsigned int ,unsigned int ); +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 ))return cmd_usage (cmdtp);
@@ -207,9 +213,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)
@@ -218,14 +227,15 @@ 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 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 return 0 ; }
@@ -235,4 +245,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.7.2.2
PATCH 3/25 SPEAr: Place ethaddr write and read within CONFIG_CMD_NET
Quoted 9 lines · On Wednesday 07 March 2012 13:03:52 Amit Virdi wrote:
From: Vipin KUMAR <[email protected]>
ethaddr can be optionally read from i2c memory. So,
chip_configcommand supports reading/writing hw mac id into i2c memory. Placing this code withinCONFIG_CMD_NETas this would only be needed when network interface is configuredSigned-off-by Vipin Kumar <[email protected]>Signed-off-by Amit Virdi <[email protected]>
I'm not really sure, why you have this special ethaddr handling in I2C prom here at all. Isn't it enough to have the MAC address (ethaddr) stored in the U-Boot environment (NOR, NAND, etc)? Why do you need this additional I2C stuff? Could you please explain this?
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 3/25 SPEAr: Place ethaddr write and read within CONFIG_CMD_NET
Quoted 8 lines · On Wednesday 07 March 2012 08:21:08 Stefan Roese wrote:
Quoted 7 lines · On Wednesday 07 March 2012 13:03:52 Amit Virdi wrote:
From: Vipin KUMAR <[email protected]>
ethaddr can be optionally read from i2c memory. So,
chip_configcommand supports reading/writing hw mac id into i2c memory. Placing this code withinCONFIG_CMD_NETas this would only be needed when network interface is configured
Quoted 7 lines
Quoted 2 lines
Signed-off-by Vipin Kumar <[email protected]>Signed-off-by Amit Virdi <[email protected]>I'm not really sure, why you have this special ethaddr handling in I2C prom here at all. Isn't it enough to have the MAC address (ethaddr) stored in the U-Boot environment (NOR, NAND, etc)? Why do you need this additional I2C stuff? Could you please explain this?
if the board is coming from the factory manufactured like this, then it makes sense to me to support it. after all, development boards aren't sold as "only runs u-boot". if i got a dev board and installed u-boot on it myself, i'd really prefer it to automatically look up the mac if it's stored locally.
that said, this looks like a debug command, so not sure if i would even bother making it depend on CONFIG_CMD_NET if there's no real runtime overhead ... -mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120307/abe02197/attachment.pgp>
PATCH 3/25 SPEAr: Place ethaddr write and read within CONFIG_CMD_NET
In reply to Stefan RoeseHi Stefan,
Sorry for this delayed response, I'm back to office after almost 2 weeks.
Quoted 8 lines · Stefan Roese
Quoted 7 lines · On Wednesday 07 March 2012 13:03:52 Amit Virdi wrote:
From: Vipin KUMAR<[email protected]>
ethaddr can be optionally read from i2c memory. So,
chip_configcommand supports reading/writing hw mac id into i2c memory. Placing this code withinCONFIG_CMD_NETas this would only be needed when network interface is configured
Quoted 8 lines
Quoted 2 lines
Signed-off-by Vipin Kumar<[email protected]>Signed-off-by Amit Virdi<[email protected]>I'm not really sure, why you have this special ethaddr handling in I2C prom here at all. Isn't it enough to have the MAC address (ethaddr) stored in the U-Boot environment (NOR, NAND, etc)? Why do you need this additional I2C stuff? Could you please explain this?
Generally MAC addresses are stored in EEPROMs due to two reasons:
1. Special set of command sequences are required to erase data from an EEPROM
2. EEPROMs are cheaper
As a result, board manufacturers provide an EEPROM memory that contains MAC address and other vital board parameters. In such case, NAND/NOR memories may not have ethaddr stored. On SPEAr, I2C is used to access EEPROM. So this patch is required. Please let me know if I understood your question correctly and, hence, gave the right answer.
Thanks n Regards
Amit Virdi
PATCH 3/25 SPEAr: Place ethaddr write and read within CONFIG_CMD_NET
Dear Amit Virdi,
Quoted 5 lines · In message <[email protected]> you wrote:
Generally MAC addresses are stored in EEPROMs due to two reasons:
1. Special set of command sequences are required to erase data from an EEPROM
2. EEPROMs are cheaper
Hm... With U-Boot, an EEPROM is just an additional wart, which costs _extra_ money.
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 "How is this place run - is it an anarchy?" "No, I wouldn't say so; it is not that well organised..."
PATCH 4/25 SPEAr: Configure network support for spear SoCs
In reply to Amit VirdiFrom: 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 <linux/mtd/fsmc_nand.h>
@@ -57,3 +58,12 @@ int board_nand_init(struct nand_chip *nand)#endif 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 <linux/mtd/fsmc_nand.h>
@@ -58,3 +59,12 @@ int board_nand_init(struct nand_chip *nand)#endif 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 <linux/mtd/fsmc_nand.h>
@@ -58,3 +59,12 @@ int board_nand_init(struct nand_chip *nand)#endif 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 <linux/mtd/fsmc_nand.h>
@@ -52,3 +53,12 @@ int board_nand_init(struct nand_chip *nand)#endif 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_DW_UDC #define CONFIG_USB_DEVICE
@@ -103,11 +111,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.7.2.2
PATCH 4/25 SPEAr: Configure network support for spear SoCs
Quoted 1 line · On Wednesday 07 March 2012 13:03:53 Amit Virdi wrote:
From: Vipin KUMAR <[email protected]>
Please find some comments below.
Quoted 17 lines
Signed-off-by Vipin Kumar <[email protected]>Signed-off-by Amit Virdi <[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(-)(quoted diff) +0
-0
b/arch/arm/include/asm/arch-spear/hardware.hindex a6517b2..2b9cb0e 100644
arch/arm/include/asm/arch-spear/hardware.h line 34
Quoted 4 lines
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)
I would prefer if you removed these unneeded parentheses here:
#define CONFIG_SPEAR_ETHBASE 0xE0800000
Perhaps best done by doing a cosmetic cleanup patch before the newly added defines. I know that checkpatch doesn't complain about this, but these parentheses really distract me. Not sure how other feel about it.
Quoted 17 lines
arch/arm/include/asm/arch-spear/hardware.h +0
-0#define CONFIG_SYS_NAND_CLE (1 << 16)#define CONFIG_SYS_NAND_ALE (1 << 17)(quoted diff) +0
-0
b/board/spear/spear300/spear300.cindex 32bcb77..3f7ccb8 100644board/spear/spear300/spear300.c +1
-0@@ -22,6 +22,7 @@*/ #include <common.h> +#include <netdev.h> #include <nand.h> #include <asm/io.h> #include <linux/mtd/fsmc_nand.h> @@ -57,3 +58,12 @@ int board_nand_init(struct nand_chip *nand)#endif return -1 ;
board/spear/spear300/spear300.c int board_nand_init(struct nand_chip *nand) · line 69
Quoted 10 lines
board/spear/spear300/spear300.c +9
-0} + +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 +}
This routine is added multiple times in this patch. Perhaps this can be moved to a "common/" file instead?
Quoted 15 lines
(quoted diff) +0
-0
b/board/spear/spear310/spear310.cindex 8b58218..8c5b5ba 100644board/spear/spear310/spear310.c +1
-0@@ -23,6 +23,7 @@*/ #include <common.h> +#include <netdev.h> #include <nand.h> #include <asm/io.h> #include <linux/mtd/fsmc_nand.h> @@ -58,3 +59,12 @@ int board_nand_init(struct nand_chip *nand)#endif return -1 ;
board/spear/spear310/spear310.c int board_nand_init(struct nand_chip *nand) · line 70
Quoted 10 lines
board/spear/spear310/spear310.c +9
-0} + +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 +}
Here again.
Quoted 15 lines
(quoted diff) +0
-0
b/board/spear/spear320/spear320.cindex 172ad35..b60acc2 100644board/spear/spear320/spear320.c +1
-0@@ -23,6 +23,7 @@*/ #include <common.h> +#include <netdev.h> #include <nand.h> #include <asm/io.h> #include <linux/mtd/fsmc_nand.h> @@ -58,3 +59,12 @@ int board_nand_init(struct nand_chip *nand)#endif return -1 ;
board/spear/spear320/spear320.c int board_nand_init(struct nand_chip *nand) · line 70
Quoted 10 lines
board/spear/spear320/spear320.c +9
-0} + +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 +}
And again.
Quoted 15 lines
(quoted diff) +0
-0
b/board/spear/spear600/spear600.cindex 7cf63d6..5a32b7f 100644board/spear/spear600/spear600.c +1
-0@@ -22,6 +22,7 @@*/ #include <common.h> +#include <netdev.h> #include <nand.h> #include <asm/io.h> #include <linux/mtd/fsmc_nand.h> @@ -52,3 +53,12 @@ int board_nand_init(struct nand_chip *nand)#endif return -1 ;
board/spear/spear600/spear600.c int board_nand_init(struct nand_chip *nand) · line 64
Quoted 10 lines
board/spear/spear600/spear600.c +9
-0} + +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 +}
and again.
Quoted 5 lines
(quoted diff) +0
-0
b/include/configs/spear-common.hindex 8f4973a..3f52442 100644
include/configs/spear-common.h line 36
Quoted 10 lines
include/configs/spear-common.h +7
-0@@ -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 */
Again, please remove these parentheses.
Quoted 25 lines
include/configs/spear-common.h +5
-2+/* USBD driver configuration */ #define CONFIG_DW_UDC #define CONFIG_USB_DEVICE @@ -103,11 +111,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 +0
-0
include/configs/spear3xx.h line 48
Quoted 8 lines
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
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 4/25 SPEAr: Configure network support for spear SoCs
Hello Stefan,
Quoted 19 lines · Stefan Roese
Quoted 1 line · On Wednesday 07 March 2012 13:03:53 Amit Virdi wrote:
From: Vipin KUMAR<[email protected]>
Please find some comments below.
arch/arm/include/asm/arch-spear/hardware.h line 34
Quoted 11 lines
Signed-off-by Vipin Kumar<[email protected]>Signed-off-by Amit Virdi<[email protected]>(quoted diff) +0
-0
b/arch/arm/include/asm/arch-spear/hardware.hindex a6517b2..2b9cb0e 100644arch/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)I would prefer if you removed these unneeded parentheses here:
Quoted 6 lines
#define
CONFIG_SPEAR_ETHBASE0xE0800000Perhaps best done by doing a cosmetic cleanup patch before the newly added defines. I know that checkpatch doesn't complain about this, but these parentheses really distract me. Not sure how other feel about it.
ok
Quoted 13 lines
arch/arm/include/asm/arch-spear/hardware.h
Quoted 9 lines
arch/arm/include/asm/arch-spear/hardware.h +9
-0+ +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 +}This routine is added multiple times in this patch. Perhaps this can be moved to a "common/" file instead?
[...]
Quoted 12 lines
arch/arm/include/asm/arch-spear/hardware.h
Quoted 9 lines
arch/arm/include/asm/arch-spear/hardware.h +9
-0+ +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 +}Here again.
[...]
Quoted 12 lines
arch/arm/include/asm/arch-spear/hardware.h
Quoted 9 lines
arch/arm/include/asm/arch-spear/hardware.h +9
-0+ +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 +}And again.
[...]
Quoted 19 lines
Quoted 19 lines
(quoted diff) +0
-0
b/board/spear/spear600/spear600.cindex 7cf63d6..5a32b7f 100644board/spear/spear600/spear600.c +4
-0@@ -22,6 +22,7 @@*/ #include <common.h> +#include <netdev.h> #include <nand.h> #include <asm/io.h> #include <linux/mtd/fsmc_nand.h> @@ -52,3 +53,12 @@ int board_nand_init(struct nand_chip *nand)#endif return -1 ; } + +int board_eth_init (bd_t *bis) +{
Quoted 9 lines
board/spear/spear600/spear600.c int board_nand_init(struct nand_chip *nand) · line 64
Quoted 6 lines
board/spear/spear600/spear600.c +6
-0+#if defined(CONFIG_DESIGNWARE_ETH ) +return designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ); +#else +return -1 ; +#endif +}and again.
Yes Stefan, it is planned. There's a lot of cleanup that is needed in the SPEAr platform code. I shall be sending another patchset after this patchset that adds new functionality and does the cleanup.
Can you accept this patch for the time being?
Quoted 10 lines
board/spear/spear600/spear600.c
Quoted 8 lines
board/spear/spear600/spear600.c +7
-0+/* 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 */
Quoted 2 lines
Again, please remove these parentheses.
Sure!
Thanks
Amit Virdi
PATCH 4/25 SPEAr: Configure network support for spear SoCs
Hi Amit,
Quoted 11 lines · On Monday 26 March 2012 13:41:09 Amit Virdi wrote:
Quoted 10 lines
board/spear/spear300/spear300.c int board_nand_init(struct nand_chip *nand) · line 69
Quoted 8 lines
board/spear/spear300/spear300.c +8
-0+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 +}and again.
Quoted 5 lines
Yes Stefan, it is planned. There's a lot of cleanup that is needed in the SPEAr platform code. I shall be sending another patchset after this patchset that adds new functionality and does the cleanup.
Can you accept this patch for the time being?
I can, yes. Only speaking for myself though.
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 5/25 SPEAr: Add macb driver support for spear310 and spear320
In reply to Amit VirdiFrom: 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_SYS_FSMC_BASE (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
@@ -62,9 +62,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
@@ -62,9 +62,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.7.2.2
PATCH 6/25 SPEAr: Add interface information in initialization
In reply to Amit VirdiFrom: Vipin Kumar <[email protected]>
Few Designware peripheral registers need to be modified based on the ethernet interface selected by the board. This patch supports interface information in ethernet driver
--- board/spear/spear300/spear300.c | 11 ++++++++--- board/spear/spear310/spear310.c | 23 +++++++++++++---------- board/spear/spear320/spear320.c | 22 ++++++++++++++++++---- board/spear/spear600/spear600.c | 14 +++++++++++--- drivers/net/designware.c | 10 +++++++++- drivers/net/designware.h | 1 + include/netdev.h | 2 +- 7 files changed, 61 insertions(+), 22 deletions(-)
board/spear/spear300/spear300.c +8 -3
@@ -22,6 +22,7 @@*/ #include <common.h> +#include <miiphy.h> #include <netdev.h> #include <nand.h> #include <asm/io.h>
@@ -61,9 +62,13 @@ 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 ; +u32 interface =PHY_INTERFACE_MODE_MII ; +if (designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY , + interface) >=0 ) + ret++;#endif +return ret; }
board/spear/spear310/spear310.c +13 -10
@@ -23,6 +23,7 @@*/ #include <common.h> +#include <miiphy.h> #include <netdev.h> #include <nand.h> #include <asm/io.h>
@@ -65,25 +66,27 @@ 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 ; +u32 interface =PHY_INTERFACE_MODE_MII ; +if (designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY , + interface) >=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 +18 -4
@@ -23,6 +23,7 @@*/ #include <common.h> +#include <miiphy.h> #include <netdev.h> #include <nand.h> #include <asm/io.h>
@@ -31,8 +32,18 @@#include <asm/arch/spr_defs.h> #include <asm/arch/spr_misc.h> +#define PLGPIO_SEL_36 0xb3000028 +#define PLGPIO_IO_36 0xb3000038 + +static void spear_phy_reset (void ) +{ +writel (0x10 ,PLGPIO_IO_36 ); +writel (0x10 ,PLGPIO_SEL_36 ); +} +int board_init (void ) { +spear_phy_reset ();return spear_board_init (MACH_TYPE_SPEAR320 ); }
@@ -63,14 +74,17 @@ 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 ; +u32 interface =PHY_INTERFACE_MODE_MII ; +if (designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY , + interface) >=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 +11 -3
@@ -22,6 +22,7 @@*/ #include <common.h> +#include <miiphy.h> #include <netdev.h> #include <nand.h> #include <asm/io.h>
@@ -56,9 +57,16 @@ 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 ; +u32 interface =PHY_INTERFACE_MODE_MII ; +#if defined(CONFIG_DW_AUTONEG ) + interface =PHY_INTERFACE_MODE_GMII ; +#endif +if (designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY , + interface) >=0 ) + ret++;#endif +return ret; }
drivers/net/designware.c +9 -1
@@ -171,6 +171,13 @@ static int dw_eth_init(struct eth_device *dev, bd_t *bis)if (priv->speed !=SPEED_1000M ) conf |=MII_PORTSELECT ; +if ((priv->interface !=PHY_INTERFACE_MODE_MII ) && + (priv->interface !=PHY_INTERFACE_MODE_GMII )) { + +if (priv->speed ==SPEED_100M ) + conf |=FES_100 ; + } +if (priv->duplex ==FULL_DUPLEX ) conf |=FULLDPLXMODE ;
@@ -532,7 +539,7 @@ static int dw_mii_write(const char *devname, u8 addr, u8 reg, u16 val) }#endif -int designware_initialize (u32 id,ulong base_addr,u32 phy_addr) +int designware_initialize (u32 id,ulong base_addr,u32 phy_addr,u32 interface) {struct eth_device *dev;struct dw_eth_dev *priv;
@@ -566,6 +573,7 @@ int designware_initialize(u32 id, ulong base_addr, u32 phy_addr) DW_DMA_BASE_OFFSET); priv->address = phy_addr; priv->phy_configured =0 ; + priv->interface = interface;if (mac_reset (dev) <0 )return -1 ;
drivers/net/designware.h +1 -0
@@ -234,6 +234,7 @@ struct dmamacdescr {struct dw_eth_dev {u32 address; +u32 interface;u32 speed;u32 duplex;u32 tx_currdescnum;
include/netdev.h +1 -1
@@ -52,7 +52,7 @@ int calxedaxgmac_initialize(u32 id, ulong base_addr);int cs8900_initialize (u8 dev_num,int base_addr);int davinci_emac_initialize (void );int dc21x4x_initialize (bd_t *bis); -int designware_initialize (u32 id,ulong base_addr,u32 phy_addr); +int designware_initialize (u32 id,ulong base_addr,u32 phy_addr,u32 interface);int dm9000_initialize (bd_t *bis);int dnet_eth_initialize (int id,void *regs,unsigned int phy_addr);int e1000_initialize (bd_t *bis);
Signature · 1 line
1.7.2.2
PATCH 7/25 SPEAr: Add basic arch related support for SPEAr SoCs
In reply to Amit VirdiFrom: Vipin KUMAR <[email protected]>
Earlier, architecture specific init code was mixed with board initialization code in board/spear/... This patch updates architecture support for SPEAr in latest u-boot.
It defines the following two flags for SPEAr3xx and SPEAr6xx SoCs
- CONFIG_DISPLAY_CPUINFO: Used to print the SoC information
- CONFIG_ARCH_CPU_INIT: compiles the architecture specific initialization code with arch/arm/spear/cpu.c
--- arch/arm/cpu/arm926ejs/spear/Makefile | 3 +- arch/arm/cpu/arm926ejs/spear/cpu.c | 84 ++++++++++++++++++++++++++++ arch/arm/include/asm/arch-spear/spr_misc.h | 7 ++ include/configs/spear-common.h | 2 + 4 files changed, 95 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).o -COBJS := reset.o \ +COBJS := cpu.o \ + reset.o \ timer.o SOBJS :=
arch/arm/cpu/arm926ejs/spear/cpu.c new file +84 -0
84 lines not on this page · raw message
arch/arm/include/asm/arch-spear/spr_misc.h +7 -0
@@ -126,5 +126,12 @@ struct misc_regs {/* PERIPH1_CLKEN, PERIPH1_RST value */ #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#endif
include/configs/spear-common.h +2 -0
@@ -182,6 +182,8 @@#define CONFIG_ENV_SIZE 0x02000/* Miscellaneous configurable options */ +#define CONFIG_ARCH_CPU_INIT +#define CONFIG_DISPLAY_CPUINFO #define CONFIG_BOOT_PARAMS_ADDR 0x00000100#define CONFIG_CMDLINE_TAG 1#define CONFIG_SETUP_MEMORY_TAGS 1
Signature · 1 line
1.7.2.2
PATCH 7/25 SPEAr: Add basic arch related support for SPEAr SoCs
Quoted 61 lines · On Wednesday 07 March 2012 13:03:56 Amit Virdi wrote:
From: Vipin KUMAR <[email protected]>
Earlier, architecture specific init code was mixed with board initialization code in board/spear/... This patch updates architecture support for SPEAr in latest u-boot.
It defines the following two flags for SPEAr3xx and SPEAr6xx SoCs
-CONFIG_DISPLAY_CPUINFO: Used to print the SoC information
-CONFIG_ARCH_CPU_INIT: compiles the architecture specific initialization
code witharch/arm/spear/cpu.cSigned-off-by Vipin Kumar <[email protected]>Signed-off-by Amit Virdi <[email protected]>--- arch/arm/cpu/arm926ejs/spear/Makefile | 3 +- arch/arm/cpu/arm926ejs/spear/cpu.c | 84 ++++++++++++++++++++++++++++ arch/arm/include/asm/arch-spear/spr_misc.h | 7 ++ include/configs/spear-common.h | 2 + 4 files changed, 95 insertions(+), 1 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/spear/cpu.c(quoted diff) +0
-0b/arch/arm/cpu/arm926ejs/spear/Makefile index f32ec4c..46923a4 100644
arch/arm/cpu/arm926ejs/spear/Makefile +2
-1@@ -25,7 +25,8 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).o -COBJS := reset.o \ +COBJS := cpu.o \ + reset.o \ timer.o SOBJS :=(quoted diff) +0
-0
b/arch/arm/cpu/arm926ejs/spear/cpu.cnew file mode 100644 index 0000000..4dc7d69arch/arm/cpu/arm926ejs/spear/cpu.c new file +19
-0@@ -0,0 +1,84 @@ +/* +* (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
arch/arm/cpu/arm926ejs/spear/cpu.c line 29
Quoted 10 lines
arch/arm/cpu/arm926ejs/spear/cpu.c new file +10
-0+* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#include <common.h> +#include <asm/io.h> +#include <asm/arch/hardware.h> +#include <asm/arch/spr_misc.h> + +#ifdef CONFIG_ARCH_CPU_INIT
Why not remove this #ifdef here and make compile it in unconditionally? It is needed for each SPEAr board, right?
Quoted 29 lines
arch/arm/cpu/arm926ejs/spear/cpu.c new file +29
-0+int arch_cpu_init (void ) +{ +struct misc_regs *const misc_p = + (struct misc_regs *)CONFIG_SPEAR_MISCBASE ; +u32 periph1_clken; + + 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 +#if defined(CONFIG_DESIGNWARE_ETH ) + periph1_clken |=MISC_ETHENB ; +#endif +#if defined(CONFIG_DW_UDC ) + periph1_clken |=MISC_USBDENB ; +#endif +#if defined(CONFIG_DW_I2C ) + periph1_clken |=MISC_I2CENB ; +#endif +#if defined(CONFIG_ST_SMI ) + periph1_clken |=MISC_SMIENB ; +#endif
arch/arm/cpu/arm926ejs/spear/cpu.c line 68
Quoted 10 lines
arch/arm/cpu/arm926ejs/spear/cpu.c new file +10
-0+#if defined(CONFIG_NAND_FSMC ) + periph1_clken |=MISC_FSMCENB ; +#endif + +writel (periph1_clken, &misc_p->periph1_clken); + return 0; +} +#endif + +#ifdef CONFIG_DISPLAY_CPUINFO
Again, I would remove this #ifdef here. Make it unconditionally for all SPEAr boards. We have enough #ifdef's already. :)
Quoted 38 lines
arch/arm/cpu/arm926ejs/spear/cpu.c new file +16
-0+int print_cpuinfo (void ) +{ +#ifdef CONFIG_SPEAR300 +printf ("CPU: SPEAr300\n" ); +#elif defined(CONFIG_SPEAR310 ) +printf ("CPU: SPEAr310\n" ); +#elif defined(CONFIG_SPEAR320 ) +printf ("CPU: SPEAr320\n" ); +#elif defined(CONFIG_SPEAR600 ) +printf ("CPU: SPEAr600\n" ); +#else +#error CPU not supported in spear platform +#endif +return 0 ; +} +#endif (quoted diff) +0
-0
b/arch/arm/include/asm/arch-spear/spr_misc.hindex 8b96d9b..b10c726 100644arch/arm/include/asm/arch-spear/spr_misc.h +7
-0@@ -126,5 +126,12 @@ struct misc_regs {/* PERIPH1_CLKEN, PERIPH1_RST value */ #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#endif (quoted diff) +0
-0
b/include/configs/spear-common.hindex 3f52442..5540630 100644
include/configs/spear-common.h line 186
Quoted 5 lines
include/configs/spear-common.h +2
-0@@ -182,6 +182,8 @@#define CONFIG_ENV_SIZE 0x02000/* Miscellaneous configurable options */ +#define CONFIG_ARCH_CPU_INIT +#define CONFIG_DISPLAY_CPUINFO
Other than my comment above:
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 7/25 SPEAr: Add basic arch related support for SPEAr SoCs
Hello Stefan,
Quoted 12 lines
Review
Quoted 8 lines
+ */
(quoted diff) +7
-0+ +#include<common.h> +#include<asm/io.h> +#include<asm/arch/hardware.h> +#include<asm/arch/spr_misc.h> + +#ifdef CONFIG_ARCH_CPU_INITWhy not remove this #ifdef here and make compile it in unconditionally? It is needed for each SPEAr board, right?
Yes, we don't need this flag.
Quoted 34 lines
Quoted 34 lines
arch/arm/cpu/arm926ejs/spear/cpu.c new file +34
-0+int arch_cpu_init (void ) +{ +struct misc_regs *const misc_p = + (struct misc_regs *)CONFIG_SPEAR_MISCBASE ; +u32 periph1_clken; + + 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 +#if defined(CONFIG_DESIGNWARE_ETH ) + periph1_clken |=MISC_ETHENB ; +#endif +#if defined(CONFIG_DW_UDC ) + periph1_clken |=MISC_USBDENB ; +#endif +#if defined(CONFIG_DW_I2C ) + periph1_clken |=MISC_I2CENB ; +#endif +#if defined(CONFIG_ST_SMI ) + periph1_clken |=MISC_SMIENB ; +#endif +#if defined(CONFIG_NAND_FSMC ) + periph1_clken |=MISC_FSMCENB ; +#endif + +writel (periph1_clken,&misc_p->periph1_clken);
Quoted 9 lines
arch/arm/cpu/arm926ejs/spear/cpu.c line 68
Quoted 5 lines
arch/arm/cpu/arm926ejs/spear/cpu.c new file +5
-0+ return 0; +} +#endif + +#ifdef CONFIG_DISPLAY_CPUINFO Again, I would remove this #ifdef here. Make it unconditionally for all SPEAr boards. We have enough #ifdef's already. :)
Yeah. In V2, I would not use these flags.
Quoted 40 lines
Quoted 40 lines
arch/arm/cpu/arm926ejs/spear/cpu.c new file +16
-0+int print_cpuinfo (void ) +{ +#ifdef CONFIG_SPEAR300 +printf ("CPU: SPEAr300\n" ); +#elif defined(CONFIG_SPEAR310 ) +printf ("CPU: SPEAr310\n" ); +#elif defined(CONFIG_SPEAR320 ) +printf ("CPU: SPEAr320\n" ); +#elif defined(CONFIG_SPEAR600 ) +printf ("CPU: SPEAr600\n" ); +#else +#error CPU not supported in spear platform +#endif +return 0 ; +} +#endif (quoted diff) +0
-0
b/arch/arm/include/asm/arch-spear/spr_misc.hindex 8b96d9b..b10c726 100644arch/arm/include/asm/arch-spear/spr_misc.h +7
-0@@ -126,5 +126,12 @@ struct misc_regs {/* PERIPH1_CLKEN, PERIPH1_RST value */ #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#endif (quoted diff) +0
-0
b/include/configs/spear-common.hindex 3f52442..5540630 100644include/configs/spear-common.h +0
-0@@ -182,6 +182,8 @@#define CONFIG_ENV_SIZE 0x02000
Quoted 8 lines
include/configs/spear-common.h line 186
Quoted 3 lines
include/configs/spear-common.h +2
-0/* Miscellaneous configurable options */ +#define CONFIG_ARCH_CPU_INIT +#define CONFIG_DISPLAY_CPUINFO Other than my comment above:
Acked-by Stefan Roese<[email protected]>
Ok, I would change the code and add yours Acked-by.
Regards
Amit Virdi
PATCH 8/25 SPEAr: Add configuration options for spear3xx and spear6xx boards
In reply to Amit VirdiFrom: 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.
---
board/spear/spear300/config.mk | 13 +---------
board/spear/spear310/config.mk | 11 --------
board/spear/spear320/config.mk | 11 --------
board/spear/spear600/config.mk | 13 +---------
boards.cfg | 20 ++++++++++++---
doc/README.spear | 31 +++++++++++++++++-------
include/configs/{spear3xx.h => spear3xx_evb.h} | 10 +++++++
include/configs/{spear6xx.h => spear6xx_evb.h} | 10 +++++++
8 files changed, 60 insertions(+), 59 deletions(-)
rename include/configs/{spear3xx.h => spear3xx_evb.h} (96%)
rename include/configs/{spear6xx.h => spear6xx_evb.h} (89%)board/spear/spear300/config.mk +1 -12
@@ -25,15 +25,4 @@ CONFIG_SYS_TEXT_BASE = 0x00700000 -ALL-y += $(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 +ALL += $(obj)u-boot.img
board/spear/spear310/config.mk +0 -11
@@ -27,18 +27,7 @@ CONFIG_SYS_TEXT_BASE = 0x00700000 ALL-y += $(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 @@ CONFIG_SYS_TEXT_BASE = 0x00700000 ALL-y += $(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 +1 -12
@@ -25,15 +25,4 @@ CONFIG_SYS_TEXT_BASE = 0x00700000 -ALL-y += $(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 +ALL += $(obj)u-boot.img
boards.cfg +16 -4
@@ -178,10 +178,22 @@ omap730p2_cs0boot arm arm926ejs omap730p2 ti omap omap730p2_cs3boot arm arm926ejs omap730p2 ti omap omap730p2:CS3_BOOT edminiv2 arm arm926ejs - LaCie orion5x dkb arm arm926ejs - Marvell pantheon -spear300 arm arm926ejs spear300 spear spear spear3xx:spear300 -spear310 arm arm926ejs spear310 spear spear spear3xx:spear310 -spear320 arm arm926ejs spear320 spear spear spear3xx:spear320 -spear600 arm arm926ejs spear600 spear spear spear6xx:spear600 +spear300 arm arm926ejs spear300 spear spear spear3xx_evb:spear300 +spear300_nand arm arm926ejs spear300 spear spear spear3xx_evb:spear300,nand +spear300_usbtty arm arm926ejs spear300 spear spear spear3xx_evb:spear300,usbtty +spear300_usbtty_nand arm arm926ejs spear300 spear spear spear3xx_evb:spear300,usbtty,nand +spear310 arm arm926ejs spear310 spear spear spear3xx_evb:spear310 +spear310_nand arm arm926ejs spear310 spear spear spear3xx_evb:spear310,nand +spear310_usbtty arm arm926ejs spear310 spear spear spear3xx_evb:spear310,usbtty +spear310_usbtty_nand arm arm926ejs spear310 spear spear spear3xx_evb:spear310,usbtty,nand +spear320 arm arm926ejs spear320 spear spear spear3xx_evb:spear320 +spear320_nand arm arm926ejs spear320 spear spear spear3xx_evb:spear320,nand +spear320_usbtty arm arm926ejs spear320 spear spear spear3xx_evb:spear320,usbtty +spear320_usbtty_nand arm arm926ejs spear320 spear spear spear3xx_evb:spear320,usbtty,nand +spear600 arm arm926ejs spear600 spear spear spear6xx_evb:spear600 +spear600_nand arm arm926ejs spear600 spear spear spear6xx_evb:spear600,nand +spear600_usbtty arm arm926ejs spear600 spear spear spear6xx_evb:spear600,usbtty +spear600_usbtty_nand arm arm926ejs spear600 spear spear spear6xx_evb:spear600,usbtty,nand versatileab arm arm926ejs versatile armltd versatile versatile:ARCH_VERSATILE_AB versatilepb arm arm926ejs versatile armltd versatile versatile:ARCH_VERSATILE_PB versatileqemu arm arm926ejs versatile armltd versatile versatile:ARCH_VERSATILE_QEMU,ARCH_VERSATILE_PB
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_usbtty) +#define CONFIG_SPEAR_USBTTY 1 +#endif + +#if defined(CONFIG_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_usbtty) +#define CONFIG_SPEAR_USBTTY 1 +#endif + +#if defined(CONFIG_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.7.2.2
PATCH 8/25 SPEAr: Add configuration options for spear3xx and spear6xx boards
Quoted 9 lines · On Wednesday 07 March 2012 13:03:57 Amit Virdi 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.
Some comments below.
Quoted 27 lines
Signed-off-by Vipin Kumar <[email protected]>Signed-off-by Amit Virdi <[email protected]>--- board/spear/spear300/config.mk | 13 +--------- board/spear/spear310/config.mk | 11 -------- board/spear/spear320/config.mk | 11 -------- board/spear/spear600/config.mk | 13 +--------- boards.cfg | 20 ++++++++++++--- doc/README.spear | 31 +++++++++++++++++------- include/configs/{spear3xx.h => spear3xx_evb.h} | 10 +++++++ include/configs/{spear6xx.h => spear6xx_evb.h} | 10 +++++++ 8 files changed, 60 insertions(+), 59 deletions(-) rename include/configs/{spear3xx.h => spear3xx_evb.h} (96%) rename include/configs/{spear6xx.h => spear6xx_evb.h} (89%)(quoted diff) +0
-0
b/board/spear/spear300/config.mkindex 5848ef8..0706430 100644board/spear/spear300/config.mk +0
-3@@ -25,15 +25,4 @@ CONFIG_SYS_TEXT_BASE = 0x00700000 -ALL-y += $(obj)u-boot.img - -# Environment variables in NAND
board/spear/spear300/config.mk line 28
Quoted 10 lines
board/spear/spear300/config.mk +1
-9-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 +ALL += $(obj)u-boot.img
Can't you just remove this config.mk file completely? CONFIG_SYS_TEXT_BASE can be moved to the config header instead. What else is this file needed for?
The same comment for all other config.mk files.
<snip>
Quoted 4 lines
+++
b/include/configs/spear3xx_evb.hboard/spear/spear300/config.mk +0
-0@@ -39,6 +39,16 @@ #define CONFIG_SPEAR320 1 #endif
board/spear/spear300/config.mk line 50
Quoted 10 lines
board/spear/spear300/config.mk +9
-0+#if defined(CONFIG_usbtty) +#define CONFIG_SPEAR_USBTTY 1 +#endif + +#if defined(CONFIG_nand) +#define CONFIG_ENV_IS_IN_NAND 1 +#else +#define CONFIG_ENV_IS_IN_FLASH 1 +#endif
Please don't add the "1" here. Plain "#define CONFIG_xxx" should be enough.
Quoted 14 lines
board/spear/spear300/config.mk +0
-0#include <configs/spear-common.h> /* Ethernet driver configuration */include/configs/spear6xx_evb.h renamed from include/configs/spear6xx.h +0
-0@@ -30,6 +30,16 @@*/ #define CONFIG_SPEAR600 1
include/configs/spear6xx_evb.h line 42
Quoted 10 lines
include/configs/spear6xx_evb.h renamed from include/configs/spear6xx.h +10
-0+#if defined(CONFIG_usbtty) +#define CONFIG_SPEAR_USBTTY 1 +#endif + +#if defined(CONFIG_nand) +#define CONFIG_ENV_IS_IN_NAND 1 +#else +#define CONFIG_ENV_IS_IN_FLASH 1 +#endif +
Again.
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 8/25 SPEAr: Add configuration options for spear3xx and spear6xx boards
Dear Stefan,
Quoted 8 lines
Quoted 8 lines
(quoted diff) +0
-0
b/board/spear/spear300/config.mkindex 5848ef8..0706430 100644board/spear/spear300/config.mk +0
-0@@ -25,15 +25,4 @@ CONFIG_SYS_TEXT_BASE = 0x00700000
Quoted 17 lines
board/spear/spear300/config.mk line 28
Quoted 13 lines
board/spear/spear300/config.mk +1
-12-ALL-y += $(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 +ALL += $(obj)u-boot.imgCan't you just remove this config.mk file completely?
CONFIG_SYS_TEXT_BASEcan be moved to the config header instead. What else is this file needed for?
Could you please explain which config header you are referring to here? Do you mean include/configs/spear..... ?
For SPEAr310 and SPEAr320, config.mk is needed to make image (by specifying FLASH=PNOR during compile time) that can access CFI compliant PNOR flash.
Quoted 2 lines
The same comment for all other config.mk files.
Thanks
Amit Virdi
PATCH 8/25 SPEAr: Add configuration options for spear3xx and spear6xx boards
Hi Amit,
Quoted 23 lines · On Monday 26 March 2012 14:10:04 Amit Virdi wrote:
Quoted 14 lines
Quoted 14 lines
+++
b/board/spear/spear300/config.mkboard/spear/spear300/config.mk +0
-9@@ -25,15 +25,4 @@ CONFIG_SYS_TEXT_BASE = 0x00700000 -ALL-y += $(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 -Quoted 8 lines
board/spear/spear300/config.mk line 28
Quoted 4 lines
board/spear/spear300/config.mk +1
-3-ifeq ($(CONSOLE),USB) -PLATFORM_RELFLAGS += -DCONFIG_SPEAR_USBTTY -endif +ALL += $(obj)u-boot.imgCan't you just remove this config.mk file completely?
CONFIG_SYS_TEXT_BASEcan be moved to the config header instead. What else is this file needed for?
Quoted 2 lines
Could you please explain which config header you are referring to here? Do you mean
include/configs/spear..... ?
Yes.
Quoted 3 lines
For SPEAr310 and SPEAr320, config.mk is needed to make image (by specifying FLASH=PNOR during compile time) that can access CFI compliant PNOR flash.
In the example above (spear300), only CONFIG_SYS_TEXT_BASE is left in config.mk. This can be moved to the config header (include/configs/spear-xxx- h).
You should be able to move the other remaining options (PNOR...) to boards.cfg. Or is this not possible?
Thanks,
Stefan
PATCH 8/25 SPEAr: Add configuration options for spear3xx and spear6xx boards
Stefan,
Quoted 14 lines
Quoted 7 lines
Quoted 4 lines
Can't you just remove this config.mk file completely?
CONFIG_SYS_TEXT_BASEcan be moved to the config header instead. What else is this file needed for?Could you please explain which config header you are referring to here? Do you mean
include/configs/spear..... ?Yes.
Quoted 3 lines
For SPEAr310 and SPEAr320, config.mk is needed to make image (by specifying FLASH=PNOR during compile time) that can access CFI compliant PNOR flash.
Quoted 7 lines
In the example above (spear300), only
CONFIG_SYS_TEXT_BASEis left in config.mk. This can be moved to the config header (include/configs/spear-xxx-h).You should be able to move the other remaining options (PNOR...) to boards.cfg. Or is this not possible?
It is possible and it adds to the clarity, thanks for this nice suggestion. I'll remove all the config.mk files from the board/spear/spearxx/ directories and add targets in boards.cfg for making u-boot build with environment variables placed in PNOR flash.
Best Regards
Amit Virdi
PATCH 9/25 SPEAr: Remove unused flag (CONFIG_SYS_HZ_CLOCK)
In reply to Amit VirdiFrom: Vipin KUMAR <[email protected]>
SPEAr doesn't need CONFIG_SYS_HZ_CLOCK. This commit removes it.
--- 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.7.2.2
PATCH 9/25 SPEAr: Remove unused flag (CONFIG_SYS_HZ_CLOCK)
Quoted 6 lines · On Wednesday 07 March 2012 13:03:58 Amit Virdi wrote:
From: Vipin KUMAR <[email protected]>
SPEAr doesn't need
CONFIG_SYS_HZ_CLOCK. This commit removes it.Signed-off-by Vipin Kumar <[email protected]>Signed-off-by Amit Virdi <[email protected]>
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 10/25 SPEAr: Change the default environment variables
In reply to Amit VirdiFrom: Vipin KUMAR <[email protected]>
This patch modifies the default environment variables as:
1. Default bootargs:
- console=ttyAMA0,115200
- For environment present in NOR flash
root=/dev/mtdblock3
- For environment present in NAND flash
root=/dev/mtdblock7
- Removes "mem=" option
2. Introduces CONFIG_EXTRA_ENV_USBTTY as default usbtty env var even when usbtty is not selected
3. Add default definitions for nfsboot and ramboot
4. Add a new default environment variable(CONFIG_EXTRA_ENV_UNLOCK)
Signifacance of CONFIG_EXTRA_ENV_USBTTY:
This environment variable is important for flashing utility to work. So if somebody accidently erases the env sector then also this variable must be preserved so that flashing utility functions properly.
Signifacance of CONFIG_EXTRA_ENV_UNLOCK:
This env variable is read by the cfi driver to unlock all flash sectors. This is necessary because the Parallel NOR flash connected on the spear boards, M28W64, has all its sectors in locked state at reset and these have to be unlocked explicitly before being erased or written.
--- include/configs/spear-common.h | 30 ++++++++++++++++++++++-------- 1 files changed, 22 insertions(+), 8 deletions(-)
include/configs/spear-common.h +22 -8
@@ -43,9 +43,7 @@#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
@@ -139,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"
@@ -165,19 +163,33 @@#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; " \ "bootm 0x1600000"#endif -#define CONFIG_BOOTARGS_NFS "root=/dev/nfs ip=dhcp " \ - "console=ttyS0 init=/bin/sh" -#define CONFIG_BOOTARGS "console=ttyS0 mem=128M " \ +#define CONFIG_BOOTARGS "console=ttyAMA0,115200 " \ + "mem=128M " \ "root="CONFIG_FSMTDBLK \ "rootfstype=jffs2" +#define CONFIG_NFSBOOTCOMMAND \ + "bootp; " \ + "setenv bootargs root=/dev/nfs rw " \ + "nfsroot=$(serverip):$(rootpath) " \ + "ip=$(ipaddr):$(serverip):$(gatewayip):" \ + "$(netmask):$(hostname):$(netdev):off " \ + "console=ttyAMA0,115200 $(othbootargs);" \ + "bootm; " + +#define CONFIG_RAMBOOTCOMMAND \ + "setenv bootargs root=/dev/ram rw " \ + "console=ttyAMA0,115200 $(othbootargs);" \ + CONFIG_BOOTCOMMAND + +#define CONFIG_ENV_SIZE 0x02000/* Miscellaneous configurable options */
@@ -209,7 +221,9 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET 1#define CONFIG_SYS_64BIT_VSPRINTF 1 -#define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY +#define CONFIG_EXTRA_ENV_UNLOCK "unlock=yes\0" +#define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY \ + CONFIG_EXTRA_ENV_UNLOCK/* Stack sizes */ #define CONFIG_STACKSIZE (128*1024)
Signature · 1 line
1.7.2.2
PATCH 10/25 SPEAr: Change the default environment variables
Quoted 20 lines · On Wednesday 07 March 2012 13:03:59 Amit Virdi wrote:
From: Vipin KUMAR <[email protected]>
This patch modifies the default environment variables as:
1. Default bootargs:
- console=ttyAMA0,115200
- For environment present in NOR flash
root=/dev/mtdblock3
- For environment present in NAND flash
root=/dev/mtdblock7
- Removes "mem=" option
2. IntroducesCONFIG_EXTRA_ENV_USBTTYas default usbtty env var even when usbtty is not selected
3. Add default definitions for nfsboot and ramboot
4. Add a new default environmentvariable(CONFIG_EXTRA_ENV_UNLOCK)Signifacance of
CONFIG_EXTRA_ENV_USBTTY:
This environment variable is important for flashing utility to work. So if somebody accidently erases the env sector then also this variable must be preserved so that flashing utility functions properly.
Quoted 5 lines
Signifacance of
CONFIG_EXTRA_ENV_UNLOCK:
This env variable is read by the cfi driver to unlock all flash sectors. This is necessary because the Parallel NOR flash connected on the spear boards, M28W64, has all its sectors in locked state at reset and these have to be unlocked explicitly before being erased or written.
But this is not needed for boards not using the common CFI flash driver. As the SPEAr600 based ones. So please only define it for board using the CFI driver.
Quoted 3 lines
Signed-off-by Vipin Kumar <[email protected]>Signed-off-by Shiraz Hashim <[email protected]>Signed-off-by Amit Virdi <[email protected]>
Other than my comment above:
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 10/25 SPEAr: Change the default environment variables
Hello Stefan,
Quoted 10 lines
Quoted 5 lines
Signifacance of
CONFIG_EXTRA_ENV_UNLOCK:
This env variable is read by the cfi driver to unlock all flash sectors. This is necessary because the Parallel NOR flash connected on the spear boards, M28W64, has all its sectors in locked state at reset and these have to be unlocked explicitly before being erased or written.But this is not needed for boards not using the common CFI flash driver. As the SPEAr600 based ones. So please only define it for board using the CFI driver.
Ok. I would undefine it from the spear-common file and define it for SPEAr310 board file only.
Quoted 8 lines
Quoted 3 lines
Signed-off-by Vipin Kumar<[email protected]>Signed-off-by Shiraz Hashim<[email protected]>Signed-off-by Amit Virdi<[email protected]>Other than my comment above:
Acked-by Stefan Roese<[email protected]>
Thanks.
Regards
Amit Virdi
PATCH 11/25 SPEAr: Initialize SNOR in early_board_init_f
In reply to Amit Virdiflash 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.
--- board/spear/common/spr_misc.c | 8 ++++++++ include/configs/spear-common.h | 1 + 2 files changed, 9 insertions(+), 0 deletions(-)
board/spear/common/spr_misc.c +8 -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>
@@ -54,6 +55,13 @@ void dram_init_banksize(void) gd->bd->bi_dram[0 ].size = gd->ram_size; } +int board_early_init_f () +{ +#if defined(CONFIG_ST_SMI ) +smi_init (); +#endif +return 0 ; +}int misc_init_r (void ) {#if defined(CONFIG_CMD_NET )
include/configs/spear-common.h +1 -0
@@ -194,6 +194,7 @@/* Miscellaneous configurable options */ #define CONFIG_ARCH_CPU_INIT +#define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_DISPLAY_CPUINFO #define CONFIG_BOOT_PARAMS_ADDR 0x00000100#define CONFIG_CMDLINE_TAG 1
Signature · 1 line
1.7.2.2
PATCH 11/25 SPEAr: Initialize SNOR in early_board_init_f
Quoted 5 lines · On Wednesday 07 March 2012 13:04:00 Amit Virdi wrote:
flash reading is required earlier than
flash_initis called since theenv_initis called beforeflash_init. This makes thesmi_initnecessary beforeenv_initbeing called.Signed-off-by Amit Virdi <[email protected]>
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 12/25 SPEAr: Enable usb device high speed support
In reply to Amit VirdiFrom: Vipin KUMAR <[email protected]>
This patch enables the support for usb high speed device for spear platform SOCs
--- include/configs/spear-common.h | 1 + 1 files changed, 1 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"
Signature · 1 line
1.7.2.2
PATCH 12/25 SPEAr: Enable usb device high speed support
Quoted 16 lines · On Wednesday 07 March 2012 13:04:01 Amit Virdi wrote:
From: Vipin KUMAR <[email protected]>
This patch enables the support for usb high speed device for spear platform SOCs
Signed-off-by Vipin Kumar <[email protected]>Signed-off-by Amit Virdi <[email protected]>--- include/configs/spear-common.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)(quoted diff) +0
-0
b/include/configs/spear-common.hindex 66cf19d..f4980b0 100644
include/configs/spear-common.h line 41
Quoted 4 lines
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
This define doesn't seem to be mentioned in the toplevel README file. Please add a short description there.
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 12/25 SPEAr: Enable usb device high speed support
Hello Stefan,
Quoted 12 lines · Stefan Roese
Quoted 11 lines · On Wednesday 07 March 2012 13:04:01 Amit Virdi wrote:
From: Vipin KUMAR<[email protected]>
This patch enables the support for usb high speed device for spear platform SOCs
Signed-off-by Vipin Kumar<[email protected]>Signed-off-by Amit Virdi<[email protected]>--- include/configs/spear-common.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 13 lines
include/configs/spear-common.h line 41
Quoted 9 lines
(quoted diff) +0
-0
b/include/configs/spear-common.hindex 66cf19d..f4980b0 100644include/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 This define doesn't seem to be mentioned in the toplevel README file. Please add a short description there.
Sure.
Regards
Amit Virdi
PATCH 12/25 SPEAr: Enable usb device high speed support
Hello Stefan,
Quoted 31 lines · Amit Virdi
Hello Stefan,
Quoted 13 lines · Stefan Roese
Quoted 12 lines · On Wednesday 07 March 2012 13:04:01 Amit Virdi wrote:
From: Vipin KUMAR<[email protected]>
This patch enables the support for usb high speed device for spear platform
SOCsSigned-off-by Vipin Kumar<[email protected]>Signed-off-by Amit Virdi<[email protected]>---
include/configs/spear-common.h| 1 +1 files changed, 1 insertions(+), 0 deletions(-)Quoted 14 lines
include/configs/spear-common.h line 41
Quoted 9 lines
(quoted diff) +0
-0
b/include/configs/spear-common.hindex 66cf19d..f4980b0 100644include/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 This define doesn't seem to be mentioned in the toplevel README file. Please
add a short description there.
Quoted 2 lines
Sure.
The description of this flag is in the driver patch. Since that patch is not applied yet, so you couldn't see the description.
Thanks
Amit Virdi
PATCH 13/25 SPEAr: spear usbtty configuration does not use ethernet device
In reply to Amit VirdiFrom: Vipin KUMAR <[email protected]>
Ethernet probing is removed from u-boot compiled as a firmware for spear flashing utility. This enables faster access to usbtty interface as unused ethernet i/f is not initialized.
--- include/configs/spear-common.h | 10 ++++++++++ include/configs/spear3xx_evb.h | 3 ++- include/configs/spear6xx_evb.h | 1 - 3 files changed, 12 insertions(+), 2 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/spear3xx_evb.h +2 -1
@@ -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
@@ -144,7 +146,6 @@#endif /* NAND flash configuration */ -#define CONFIG_SYS_FSMC_NAND_SP #define CONFIG_SYS_FSMC_NAND_8BIT #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 #define CONFIG_SYS_FSMC_NAND_8BIT #define CONFIG_SYS_NAND_BASE (0xD2000000)
Signature · 1 line
1.7.2.2
PATCH 13/25 SPEAr: spear usbtty configuration does not use ethernet device
Quoted 5 lines · On Wednesday 07 March 2012 13:04:02 Amit Virdi wrote:
From: Vipin KUMAR <[email protected]>
Ethernet probing is removed from u-boot compiled as a firmware for spear flashing utility. This enables faster access to usbtty interface as unused ethernet i/f is not initialized.
Ethernet probing should only be done, when the device is really accessed (e.g. by using tftp commands). I know that the current implementation of the designware ethernet driver does this probing (PHY link negotiation etc) unconditionally at startup.
I have a patch in my queue that changes the designware driver to only start probing/auto-negotiating once its really used. I'll rebase my patch on top of your designware rework patches, once they are approved.
With this patch, this patch here should be unnecessary. At least when reading the patch description above.
So is this patch still needed, after my designware net driver rework?
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 13/25 SPEAr: spear usbtty configuration does not use ethernet device
Hello Stefan,
Quoted 12 lines · Stefan Roese
Quoted 5 lines · On Wednesday 07 March 2012 13:04:02 Amit Virdi wrote:
From: Vipin KUMAR<[email protected]>
Ethernet probing is removed from u-boot compiled as a firmware for spear flashing utility. This enables faster access to usbtty interface as unused ethernet i/f is not initialized.
Ethernet probing should only be done, when the device is really accessed (e.g. by using tftp commands). I know that the current implementation of the designware ethernet driver does this probing (PHY link negotiation etc) unconditionally at startup.
Quoted 9 lines
I have a patch in my queue that changes the designware driver to only start probing/auto-negotiating once its really used. I'll rebase my patch on top of your designware rework patches, once they are approved.
With this patch, this patch here should be unnecessary. At least when reading the patch description above.
So is this patch still needed, after my designware net driver rework?
This patch is not required after your patch. I shall be dropping this in V2.
Regards
Amit Virdi
PATCH 14/25 SPEAr: Enable udc and usb-console support only for usbtty configuration
In reply to Amit VirdiFrom: Vipin KUMAR <[email protected]>
This patch enables the UDC and usb-console support only for usbtty configurations
--- include/configs/spear-common.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
include/configs/spear-common.h +3 -0
@@ -38,6 +38,7 @@#endif /* USBD driver configuration */ +#if defined(CONFIG_SPEAR_USBTTY )#define CONFIG_DW_UDC #define CONFIG_USB_DEVICE #define CONFIG_USBD_HS
@@ -46,6 +47,8 @@#define CONFIG_USBD_PRODUCT_NAME "SPEAr SoC"#define CONFIG_USBD_MANUFACTURER "ST Microelectronics" +#endif +#define CONFIG_EXTRA_ENV_USBTTY "usbtty=cdc_acm\0"/* I2C driver configuration */
Signature · 1 line
1.7.2.2
PATCH 14/25 SPEAr: Enable udc and usb-console support only for usbtty configuration
Quoted 7 lines · On Wednesday 07 March 2012 13:04:03 Amit Virdi wrote:
From: Vipin KUMAR <[email protected]>
This patch enables the UDC and usb-console support only for usbtty configurations
Signed-off-by Vipin Kumar <[email protected]>Signed-off-by Amit Virdi <[email protected]>
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 15/25 SPEAr: Enable autoneg for ethernet
In reply to Amit VirdiFrom: Shiraz Hashim <[email protected]>
The linux-2.6.37 base port has few problems with nfs boot. The boot fails while getting timeout on attempting to mount root file system. This helps the ethernet to bring up faster in linux boot thus avoiding the time out.
Besides, it was reported that few phys on SPEAr board are failing in certain network conditions which is avoided by enabling autonegotiation. See issue #115943 in global bug tracker.
--- include/configs/spear-common.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
include/configs/spear-common.h +1 -0
@@ -35,6 +35,7 @@#define CONFIG_DW0_PHY 1#define CONFIG_NET_MULTI #define CONFIG_PHY_RESET_DELAY (10000)/* in usec */ +#define CONFIG_DW_AUTONEG 1#endif /* USBD driver configuration */
Signature · 1 line
1.7.2.2
PATCH 15/25 SPEAr: Enable autoneg for ethernet
Quoted 9 lines · On Wednesday 07 March 2012 13:04:04 Amit Virdi wrote:
From: Shiraz Hashim <[email protected]>
The linux-2.6.37 base port has few problems with nfs boot. The boot fails while getting timeout on attempting to mount root file system. This helps the ethernet to bring up faster in linux boot thus avoiding the time out.
Besides, it was reported that few phys on SPEAr board are failing in certain network conditions which is avoided by enabling autonegotiation. See issue #115943 in global bug tracker.
Hmmm. This sounds like a problem in the Linux network/PHY code then. Which needs to get fixed there instead of changing something here in U-Boot. Please think about situations where the ethernet driver is not called at all in U- Boot (booting from NOR/NAND). With my changes to defer the ethernet probing to the first usage.
One more comment below.
Quoted 13 lines
Reported-by Deepak Sikri <[email protected]>Reported-by Armando Visconti <[email protected]>Signed-off-by Shiraz Hashim <[email protected]>Signed-off-by Amit Virdi <[email protected]>--- include/configs/spear-common.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)(quoted diff) +0
-0
b/include/configs/spear-common.hindex 5b6ef72..26642f1 100644
include/configs/spear-common.h line 37
Quoted 3 lines
include/configs/spear-common.h +0
-0@@ -35,6 +35,7 @@#define CONFIG_DW0_PHY 1#define CONFIG_NET_MULTI #define CONFIG_PHY_RESET_DELAY (10000)/*
in usec */
include/configs/spear-common.h line 38
Quoted 1 line
include/configs/spear-common.h +1
-0+#define CONFIG_DW_AUTONEG 1
Please don't add the "1" here.
Quoted 3 lines
include/configs/spear-common.h +0
-0#endif /* USBD driver configuration */
Signature · 7 lines
Viele Gr??e, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 15/25 SPEAr: Enable autoneg for ethernet
Stefan,
Quoted 11 lines · Stefan Roese
Quoted 9 lines · On Wednesday 07 March 2012 13:04:04 Amit Virdi wrote:
From: Shiraz Hashim<[email protected]>
The linux-2.6.37 base port has few problems with nfs boot. The boot fails while getting timeout on attempting to mount root file system. This helps the ethernet to bring up faster in linux boot thus avoiding the time out.
Besides, it was reported that few phys on SPEAr board are failing in certain network conditions which is avoided by enabling autonegotiation. See issue #115943 in global bug tracker.
Quoted 2 lines
Hmmm. This sounds like a problem in the Linux network/PHY code then. Which needs to get fixed there instead of changing something here in U-Boot. Please
Probably, this is the problem with phys used in some boards.
Quoted 4 lines
think about situations where the ethernet driver is not called at all in U- Boot (booting from NOR/NAND). With my changes to defer the ethernet probing to the first usage.
Keeping your changes, we can still move ahead with autoneg ON. I can think of two solutions for this -
Solution 1:
- Use fix configuration for all SPEAr boards except the one on which
the problem has been reported. In that case we can ON autoneg.
Solution 2:
- Enable autoneg for all SPEAr and specify a larger delay parameter if
rootfs has to be mounted from nfs. This would ensure that timeout won't happen.
I would prefer solution 2. What's your opinion?
Quoted 19 lines
One more comment below.
Quoted 13 lines
Reported-by Deepak Sikri<[email protected]>Reported-by Armando Visconti<[email protected]>Signed-off-by Shiraz Hashim<[email protected]>Signed-off-by Amit Virdi<[email protected]>--- include/configs/spear-common.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)(quoted diff) +0
-0
b/include/configs/spear-common.hindex 5b6ef72..26642f1 100644include/configs/spear-common.h line 37
Quoted 3 lines
include/configs/spear-common.h +0
-0@@ -35,6 +35,7 @@#define CONFIG_DW0_PHY 1#define CONFIG_NET_MULTI #define CONFIG_PHY_RESET_DELAY (10000)/* in usec */
Quoted 4 lines
include/configs/spear-common.h line 38
Quoted 1 line
include/configs/spear-common.h +1
-0+#define CONFIG_DW_AUTONEG 1Please don't add the "1" here.
Ok.
Thanks
Amit Virdi
PATCH 15/25 SPEAr: Enable autoneg for ethernet
Amit,
Quoted 18 lines · On Tuesday 27 March 2012 11:02:08 Amit Virdi wrote:
Quoted 11 lines
Quoted 7 lines
The linux-2.6.37 base port has few problems with nfs boot. The boot fails while getting timeout on attempting to mount root file system. This helps the ethernet to bring up faster in linux boot thus avoiding the time out.
Besides, it was reported that few phys on SPEAr board are failing in certain network conditions which is avoided by enabling autonegotiation. See issue #115943 in global bug tracker.Hmmm. This sounds like a problem in the Linux network/PHY code then. Which needs to get fixed there instead of changing something here in U-Boot. Please
Probably, this is the problem with phys used in some boards.
Quoted 3 lines
think about situations where the ethernet driver is not called at all in U- Boot (booting from NOR/NAND). With my changes to defer the ethernet probing to the first usage.
Quoted 6 lines
Keeping your changes, we can still move ahead with autoneg ON. I can think of two solutions for this -
Solution 1:
- Use fix configuration for all SPEAr boards except the one on which
the problem has been reported. In that case we can ON autoneg.
No, please don't.
Quoted 6 lines
Solution 2:
- Enable autoneg for all SPEAr and specify a larger delay parameter if
rootfs has to be mounted from nfs. This would ensure that timeout won't happen.I would prefer solution 2. What's your opinion?
I have no problem with enabling autoneg on all boards. My only concern was the error description in the commit log. This seemed to indicate some error in the Linux ethernet driver. As it relies on the ethernet setup done by the bootloader.
But again, I have generally no objection to enable autoneg for the SPEAr boards.
Best regards,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 15/25 SPEAr: Enable autoneg for ethernet
Hi Stefan,
Quoted 5 lines
Quoted 5 lines
Solution 2:
- Enable autoneg for all SPEAr and specify a larger delay parameter if
rootfs has to be mounted from nfs. This would ensure that timeout won't happen.
Quoted 7 lines
Quoted 1 line
I would prefer solution 2. What's your opinion?
I have no problem with enabling autoneg on all boards. My only concern was the error description in the commit log. This seemed to indicate some error in the Linux ethernet driver. As it relies on the ethernet setup done by the bootloader.
The error description is misleading. I would reword the same.
Quoted 3 lines
But again, I have generally no objection to enable autoneg for the SPEAr boards.
Ok, thanks.
Best Regards
Amit Virdi
PATCH 16/25 SPEAr: Enable dcache for fast file transfer
In reply to Amit VirdiFrom: Shiraz Hashim <[email protected]>
Enable data cache with 1:1 mapping of DDR to enable fast file transfer over tty which was doing lot of copy.
This feature is enabled only for flashing operation i.e. when CONFIG_SPEAR_USBTTY is enabled.
This has been tested on SPEAr320, SPEAr600 and SPEAr900 evaluation boards.
Following figures show an estimate on the performance improvements. The test setup was a Linux host (not Windows) and involved measurement of only binary transfer time, through kermit. The flash erase and flash copy time would be unaffected by these patches.
Another thing is this that the timings remained more or less same across ARM9 and Cortex based devices, hence reporting only one of the cases.
Before Enhancements
===================
$ time ukermit.small -p /dev/ttyACM0 -f spear320_uImage.img Downloading file: 100.00% completed(2014080/2014080 bytes) real 0m41.228s user 0m0.002s sys 0m0.064s
After Enhancements
==================
$ time ukermit.large -p /dev/ttyACM0 -f spear320_uImage.img Downloading file: 100.00% completed(2014080/2014080 bytes) real 0m5.441s user 0m0.001s sys 0m0.001s
--- board/spear/common/spr_misc.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
board/spear/common/spr_misc.c +4 -0
@@ -76,6 +76,10 @@ int misc_init_r(void)setenv ("stdin" ,"usbtty" );setenv ("stdout" ,"usbtty" );setenv ("stderr" ,"usbtty" ); + +#ifndef CONFIG_SYS_NO_DCACHE +dcache_enable (); +#endif #endif return 0 ; }
Signature · 1 line
1.7.2.2
PATCH 17/25 SPEAr: Enable CONFIG_SYS_FLASH_PROTECTION
In reply to Amit VirdiFrom: Vipin Kumar <[email protected]>
This patch enables flash protection(lock/unlock) for CFI devices. This is necessary because the Parallel NOR flash connected on the spear boards, M28W64, can be locked/unlocked on a sector basis. Moreover, all its sectors are in locked state at reset and these have to be unlocked explicitly before being erased or written.
--- include/configs/spear3xx_evb.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
include/configs/spear3xx_evb.h +2 -0
@@ -113,6 +113,7 @@#define CONFIG_FLASH_CFI_DRIVER #if defined(CONFIG_SPEAR310 ) +#define CONFIG_SYS_FLASH_PROTECTION 1#define CONFIG_SYS_FLASH_BASE 0x50000000#define CONFIG_SYS_CS1_FLASH_BASE 0x60000000#define CONFIG_SYS_CS2_FLASH_BASE 0x70000000
@@ -128,6 +129,7 @@#define CONFIG_SYS_MAX_FLASH_BANKS 6#elif defined(CONFIG_SPEAR320 ) +#define CONFIG_SYS_FLASH_PROTECTION 1#define CONFIG_SYS_FLASH_BASE 0x44000000#define CONFIG_SYS_CS1_FLASH_BASE 0x45000000#define CONFIG_SYS_CS2_FLASH_BASE 0x46000000
Signature · 1 line
1.7.2.2
PATCH 17/25 SPEAr: Enable CONFIG_SYS_FLASH_PROTECTION
Quoted 27 lines · On Wednesday 07 March 2012 13:04:06 Amit Virdi wrote:
From: Vipin Kumar <[email protected]>
This patch enables flash protection(lock/unlock) for CFI devices. This is necessary because the Parallel NOR flash connected on the spear boards, M28W64, can be locked/unlocked on a sector basis. Moreover, all its sectors are in locked state at reset and these have to be unlocked explicitly before being erased or written.
Signed-off-by Vipin Kumar <[email protected]>Signed-off-by Amit Virdi <[email protected]>--- include/configs/spear3xx_evb.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)(quoted diff) +0
-0
b/include/configs/spear3xx_evb.hindex 84fad0c..e827a33 100644include/configs/spear3xx_evb.h +1
-0@@ -113,6 +113,7 @@#define CONFIG_FLASH_CFI_DRIVER #if defined(CONFIG_SPEAR310 ) +#define CONFIG_SYS_FLASH_PROTECTION 1#define CONFIG_SYS_FLASH_BASE 0x50000000#define CONFIG_SYS_CS1_FLASH_BASE 0x60000000#define CONFIG_SYS_CS2_FLASH_BASE 0x70000000
include/configs/spear3xx_evb.h line 132
Quoted 4 lines
include/configs/spear3xx_evb.h +1
-0@@ -128,6 +129,7 @@#define CONFIG_SYS_MAX_FLASH_BANKS 6#elif defined(CONFIG_SPEAR320 ) +#define CONFIG_SYS_FLASH_PROTECTION 1
Remove the "1"'s above.
Other that that:
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 17/25 SPEAr: Enable CONFIG_SYS_FLASH_PROTECTION
Dear Stefan,
Quoted 30 lines · Stefan Roese
Quoted 29 lines · On Wednesday 07 March 2012 13:04:06 Amit Virdi wrote:
From: Vipin Kumar<[email protected]>
This patch enables flash protection(lock/unlock) for CFI devices. This is necessary because the Parallel NOR flash connected on the spear boards, M28W64, can be locked/unlocked on a sector basis. Moreover, all its sectors are in locked state at reset and these have to be unlocked explicitly before being erased or written.
Signed-off-by Vipin Kumar<[email protected]>Signed-off-by Amit Virdi<[email protected]>--- include/configs/spear3xx_evb.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)(quoted diff) +0
-0
b/include/configs/spear3xx_evb.hindex 84fad0c..e827a33 100644include/configs/spear3xx_evb.h +1
-0@@ -113,6 +113,7 @@#define CONFIG_FLASH_CFI_DRIVER #if defined(CONFIG_SPEAR310 ) +#define CONFIG_SYS_FLASH_PROTECTION 1#define CONFIG_SYS_FLASH_BASE 0x50000000#define CONFIG_SYS_CS1_FLASH_BASE 0x60000000#define CONFIG_SYS_CS2_FLASH_BASE 0x70000000@@ -128,6 +129,7 @@#define CONFIG_SYS_MAX_FLASH_BANKS 6
Quoted 9 lines
include/configs/spear3xx_evb.h line 132
Quoted 2 lines
include/configs/spear3xx_evb.h +1
-0#elif defined(CONFIG_SPEAR320 ) +#define CONFIG_SYS_FLASH_PROTECTION 1Remove the "1"'s above.
Other that that:
Acked-by Stefan Roese<[email protected]>
Ok.
Thanks
Amit Virdi
PATCH 18/25 SPEAr: Correct the definition of CONFIG_SYS_MONITOR_BASE
In reply to Amit VirdiFrom: Vipin Kumar <[email protected]>
The below text is copy pasted from README
- CONFIG_SYS_MONITOR_BASE:
Physical start address of boot monitor code (set by make config files to be same as the text base address (TEXT_BASE) used when linking) - same as CONFIG_SYS_FLASH_BASE when booting from flash.
This patch corrects the definition of CONFIG_SYS_MONITOR_BASE and sets it to TEXT_BASE
--- include/configs/spear-common.h | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
include/configs/spear-common.h +3 -2
@@ -168,8 +168,7 @@ "0x4C0000; bootm 0x1600000"#endif -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE -#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + \ +#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + \ CONFIG_SYS_MONITOR_LEN)#elif defined(CONFIG_ENV_IS_IN_NAND)/*
@@ -206,6 +205,8 @@#define CONFIG_ENV_SIZE 0x02000 +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE +#define CONFIG_MONITOR_IS_IN_RAM 1/* Miscellaneous configurable options */ #define CONFIG_ARCH_CPU_INIT
Signature · 1 line
1.7.2.2
PATCH 18/25 SPEAr: Correct the definition of CONFIG_SYS_MONITOR_BASE
Quoted 23 lines · On Wednesday 07 March 2012 13:04:07 Amit Virdi wrote:
From: Vipin Kumar <[email protected]>
The below text is copy pasted from README
-CONFIG_SYS_MONITOR_BASE:
Physical start address of boot monitor code (set by make config files to be same as the text base address (TEXT_BASE) used when linking) - same asCONFIG_SYS_FLASH_BASEwhen booting from flash.This patch corrects the definition of
CONFIG_SYS_MONITOR_BASEand sets it toTEXT_BASESigned-off-by Vipin Kumar <[email protected]>Signed-off-by Amit Virdi <[email protected]>--- include/configs/spear-common.h | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)(quoted diff) +0
-0
b/include/configs/spear-common.hindex 26642f1..0998157 100644
include/configs/spear-common.h line 168
Quoted 1 line
include/configs/spear-common.h +0
-0@@ -168,8 +168,7 @@ "0x4C0000; bootm
0x1600000"
include/configs/spear-common.h line 171
Quoted 3 lines
include/configs/spear-common.h +0
-1#endif -#define CONFIG_SYS_MONITOR_BASE
CONFIG_SYS_FLASH_BASE
include/configs/spear-common.h line 172
Quoted 1 line
include/configs/spear-common.h +0
-1-#define CONFIG_ENV_ADDR
(CONFIG_SYS_MONITOR_BASE + \
include/configs/spear-common.h line 171
Quoted 1 line
include/configs/spear-common.h +1
-0+#define CONFIG_ENV_ADDR
(CONFIG_SYS_FLASH_BASE + \
include/configs/spear-common.h line 209
Quoted 9 lines
include/configs/spear-common.h +2
-0CONFIG_SYS_MONITOR_LEN)#elif defined(CONFIG_ENV_IS_IN_NAND )/* @@ -206,6 +205,8 @@#define CONFIG_ENV_SIZE 0x02000 +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE +#define CONFIG_MONITOR_IS_IN_RAM 1
Why is CONFIG_MONITOR_IS_IN_RAM defined? And if really needed, please without the 1.
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 18/25 SPEAr: Correct the definition of CONFIG_SYS_MONITOR_BASE
Stefan,
Quoted 9 lines
include/configs/spear-common.h line 209
Quoted 5 lines
#define CONFIG_ENV_SIZE 0x02000include/configs/spear-common.h +2
-0+#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE +#define CONFIG_MONITOR_IS_IN_RAM 1Why is
CONFIG_MONITOR_IS_IN_RAMdefined? And if really needed, please without the 1.
CONFIG_MONITOR_IS_IN_RAM is defined with the understanding that since, u-boot is loaded by the BootROM (embedded in eROM) to RAM, so the monitor is present in RAM. Please confirm if this understanding is correct.
Thanks
Amit Virdi
PATCH 18/25 SPEAr: Correct the definition of CONFIG_SYS_MONITOR_BASE
Amit,
Quoted 11 lines · On Tuesday 27 March 2012 08:38:18 Amit Virdi wrote:
Quoted 7 lines
include/configs/spear-common.h line 209
Quoted 4 lines
#define CONFIG_ENV_SIZE 0x02000include/configs/spear-common.h +2
-0+#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE +#define CONFIG_MONITOR_IS_IN_RAM 1Why is
CONFIG_MONITOR_IS_IN_RAMdefined? And if really needed, please without the 1.
CONFIG_MONITOR_IS_IN_RAMis defined with the understanding that since, u-boot is loaded by the BootROM (embedded in eROM) to RAM, so the monitor is present in RAM. Please confirm if this understanding is correct.
Hmmm, seems to be used on some Coldfire and Blackfin platforms. Its not needed for your platform. Please remove it.
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 18/25 SPEAr: Correct the definition of CONFIG_SYS_MONITOR_BASE
Quoted 11 lines · Stefan Roese
Amit,
Quoted 8 lines · On Tuesday 27 March 2012 08:38:18 Amit Virdi wrote:
Quoted 7 lines
include/configs/spear-common.h line 209
Quoted 4 lines
#define CONFIG_ENV_SIZE 0x02000include/configs/spear-common.h +2
-0+#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE +#define CONFIG_MONITOR_IS_IN_RAM 1Why is
CONFIG_MONITOR_IS_IN_RAMdefined? And if really needed, please without the 1.
Quoted 7 lines
Quoted 3 lines
CONFIG_MONITOR_IS_IN_RAMis defined with the understanding that since, u-boot is loaded by the BootROM (embedded in eROM) to RAM, so the monitor is present in RAM. Please confirm if this understanding is correct.Hmmm, seems to be used on some Coldfire and Blackfin platforms. Its not needed for your platform. Please remove it.
Ok. Thanks for the clarification!
Best Regards
Amit Virdi
PATCH 19/25 SPEAr: Enable CONFIG_SYS_FLASH_EMPTY_INFO macro
In reply to Amit VirdiFrom: Vipin Kumar <[email protected]>
Enable CONFIG_SYS_FLASH_EMPTY_INFO macro to enable reporting of empty sector information through flinfo command.
--- include/configs/spear-common.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/spear-common.h +1 -1
@@ -80,7 +80,6 @@ CONFIG_SYS_CS1_FLASH_BASE}#define CONFIG_SYS_MAX_FLASH_SECT 128 -#define CONFIG_SYS_FLASH_EMPTY_INFO 1#define CONFIG_SYS_FLASH_ERASE_TOUT (3 * CONFIG_SYS_HZ)#define CONFIG_SYS_FLASH_WRITE_TOUT (3 * CONFIG_SYS_HZ)
@@ -238,6 +237,7 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET 1#define CONFIG_SYS_64BIT_VSPRINTF 1 +#define CONFIG_SYS_FLASH_EMPTY_INFO 1#define CONFIG_EXTRA_ENV_UNLOCK "unlock=yes\0"#define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY \ CONFIG_EXTRA_ENV_UNLOCK
Signature · 1 line
1.7.2.2
PATCH 19/25 SPEAr: Enable CONFIG_SYS_FLASH_EMPTY_INFO macro
Quoted 16 lines · On Wednesday 07 March 2012 13:04:08 Amit Virdi wrote:
From: Vipin Kumar <[email protected]>
Enable
CONFIG_SYS_FLASH_EMPTY_INFOmacro to enable reporting of empty sector information through flinfo command.Signed-off-by Vipin Kumar <[email protected]>Signed-off-by Amit Virdi <[email protected]>--- include/configs/spear-common.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)(quoted diff) +0
-0
b/include/configs/spear-common.hindex 0998157..bde99d2 100644
include/configs/spear-common.h line 80
Quoted 1 line
include/configs/spear-common.h +0
-0@@ -80,7 +80,6 @@
CONFIG_SYS_CS1_FLASH_BASE}
include/configs/spear-common.h line 240
Quoted 11 lines
include/configs/spear-common.h +1
-1#define CONFIG_SYS_MAX_FLASH_SECT 128 -#define CONFIG_SYS_FLASH_EMPTY_INFO 1#define CONFIG_SYS_FLASH_ERASE_TOUT (3 * CONFIG_SYS_HZ)#define CONFIG_SYS_FLASH_WRITE_TOUT (3 * CONFIG_SYS_HZ)@@ -238,6 +237,7 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET 1#define CONFIG_SYS_64BIT_VSPRINTF 1 +#define CONFIG_SYS_FLASH_EMPTY_INFO 1
No 1 please.
Other than that:
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 19/25 SPEAr: Enable CONFIG_SYS_FLASH_EMPTY_INFO macro
Hi Stefan,
Quoted 11 lines
CONFIG_SYS_CS1_FLASH_BASE}Quoted 10 lines
#define CONFIG_SYS_MAX_FLASH_SECT 128include/configs/spear-common.h +0
-1-#define CONFIG_SYS_FLASH_EMPTY_INFO 1#define CONFIG_SYS_FLASH_ERASE_TOUT (3 * CONFIG_SYS_HZ)#define CONFIG_SYS_FLASH_WRITE_TOUT (3 * CONFIG_SYS_HZ)@@ -238,6 +237,7 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET 1#define CONFIG_SYS_64BIT_VSPRINTF 1
Quoted 8 lines
include/configs/spear-common.h line 240
Quoted 1 line
include/configs/spear-common.h +1
-0+#define CONFIG_SYS_FLASH_EMPTY_INFO 1No 1 please.
Other than that:
Acked-by Stefan Roese<[email protected]>
Ok.
Thanks
Amit Virdi
PATCH 20/25 SPEAr: Enable ONFI nand flash detection for spear3xx and 6xx and evb
In reply to Amit VirdiFrom: Vipin Kumar <[email protected]>
--- include/configs/spear-common.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
include/configs/spear-common.h +2 -0
@@ -104,6 +104,8 @@#define CONFIG_NAND_FSMC #define CONFIG_SYS_MAX_NAND_DEVICE 1#define CONFIG_MTD_NAND_VERIFY_WRITE 1 +#define CONFIG_SYS_NAND_ONFI_DETECTION 1 +#define CONFIG_SYS_NAND_QUIET_TEST 1/* * Command support defines
Signature · 1 line
1.7.2.2
PATCH 20/25 SPEAr: Enable ONFI nand flash detection for spear3xx and 6xx and evb
Quoted 13 lines · On Wednesday 07 March 2012 13:04:09 Amit Virdi wrote:
From: Vipin Kumar <[email protected]>
Signed-off-by Vipin Kumar <[email protected]>Signed-off-by Amit Virdi <[email protected]>--- include/configs/spear-common.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)(quoted diff) +0
-0
b/include/configs/spear-common.hindex bde99d2..4fb56ba 100644
include/configs/spear-common.h line 108
Quoted 5 lines
include/configs/spear-common.h +2
-0@@ -104,6 +104,8 @@#define CONFIG_NAND_FSMC #define CONFIG_SYS_MAX_NAND_DEVICE 1#define CONFIG_MTD_NAND_VERIFY_WRITE 1 +#define CONFIG_SYS_NAND_ONFI_DETECTION 1 +#define CONFIG_SYS_NAND_QUIET_TEST 1
Remove the "1"'s please. And please also remove CONFIG_MTD_NAND_VERIFY_WRITE. Or is it really needed? I didn't need it on my SPEAr600 boards. And it slows NAND access unnecessarily down.
Other than this:
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 20/25 SPEAr: Enable ONFI nand flash detection for spear3xx and 6xx and evb
Stefan,
Quoted 9 lines · Stefan Roese
Quoted 8 lines · On Wednesday 07 March 2012 13:04:09 Amit Virdi wrote:
From: Vipin Kumar<[email protected]>
Signed-off-by Vipin Kumar<[email protected]>Signed-off-by Amit Virdi<[email protected]>--- include/configs/spear-common.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
Quoted 15 lines
include/configs/spear-common.h line 108
Quoted 10 lines
(quoted diff) +0
-0
b/include/configs/spear-common.hindex bde99d2..4fb56ba 100644include/configs/spear-common.h +2
-0@@ -104,6 +104,8 @@#define CONFIG_NAND_FSMC #define CONFIG_SYS_MAX_NAND_DEVICE 1#define CONFIG_MTD_NAND_VERIFY_WRITE 1 +#define CONFIG_SYS_NAND_ONFI_DETECTION 1 +#define CONFIG_SYS_NAND_QUIET_TEST 1Remove the "1"'s please. And please also remove
CONFIG_MTD_NAND_VERIFY_WRITE. Or is it really needed? I didn't need it on my SPEAr600 boards. And it slows NAND access unnecessarily down.
Yes, CONFIG_MTD_NAND_VERIFY_WRITE slows down the NAND access. Since it is only for verification purposes, I'll remove it in V2.
Thanks
Amit Virdi
PATCH 21/25 SPEAr: explicitly select clk src for UART
In reply to Amit VirdiFrom: Shiraz Hashim <[email protected]>
UART in u-boot intends to run on 48MHz clock supplied by USB PLL. Explicitly select the intended clock source.
--- arch/arm/cpu/arm926ejs/spear/cpu.c | 7 ++++++- arch/arm/include/asm/arch-spear/spr_misc.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletions(-)
arch/arm/cpu/arm926ejs/spear/cpu.c +6 -1
@@ -31,7 +31,7 @@ int arch_cpu_init(void) {struct misc_regs *const misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE ; -u32 periph1_clken; +u32 periph1_clken, periph_clk_cfg; periph1_clken =readl (&misc_p->periph1_clken);
@@ -43,6 +43,11 @@ int arch_cpu_init(void)#if defined(CONFIG_PL011_SERIAL ) periph1_clken |=MISC_UART0ENB ; + + periph_clk_cfg =readl (&misc_p->periph_clk_cfg); + periph_clk_cfg &= ~CONFIG_SPEAR_UARTCLKMSK ; + periph_clk_cfg |=CONFIG_SPEAR_UART48M ; +writel (periph_clk_cfg, &misc_p->periph_clk_cfg);#endif #if defined(CONFIG_DESIGNWARE_ETH ) periph1_clken |=MISC_ETHENB ;
arch/arm/include/asm/arch-spear/spr_misc.h +2 -0
@@ -110,6 +110,8 @@ struct misc_regs {/* PERIPH_CLK_CFG value */ #define MISC_GPT3SYNTH 0x00000400#define MISC_GPT4SYNTH 0x00000800 +#define CONFIG_SPEAR_UART48M 0 +#define CONFIG_SPEAR_UARTCLKMSK (0x1 << 4)/* PRSC_CLK_CFG value */ /*
Signature · 1 line
1.7.2.2
PATCH 21/25 SPEAr: explicitly select clk src for UART
Quoted 7 lines · On Wednesday 07 March 2012 13:04:10 Amit Virdi wrote:
From: Shiraz Hashim <[email protected]>
UART in u-boot intends to run on 48MHz clock supplied by USB PLL. Explicitly select the intended clock source.
Signed-off-by Shiraz Hashim <[email protected]>Signed-off-by Amit Virdi <[email protected]>
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 22/25 SPEAr: Correct SoC ID offset in misc configuration space
In reply to Amit VirdiFrom: Shiraz Hashim <[email protected]>
SoC Core ID offset is 0x30 in miscellaneous configuration address space. It was wrongly mentioned as periph2 clk enable.
--- arch/arm/include/asm/arch-spear/spr_misc.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/include/asm/arch-spear/spr_misc.h +1 -1
@@ -37,7 +37,7 @@ struct misc_regs {u32 amba_clk_cfg;/* 0x24 */ u32 periph_clk_cfg;/* 0x28 */ u32 periph1_clken;/* 0x2C */ -u32 periph2_clken;/* 0x30 */ +u32 soc_core_id;/* 0x30 */ u32 ras_clken;/* 0x34 */ u32 periph1_rst;/* 0x38 */ u32 periph2_rst;/* 0x3C */
Signature · 1 line
1.7.2.2
PATCH 22/25 SPEAr: Correct SoC ID offset in misc configuration space
Quoted 7 lines · On Wednesday 07 March 2012 13:04:11 Amit Virdi wrote:
From: Shiraz Hashim <[email protected]>
SoC Core ID offset is
0x30in miscellaneous configuration address space. It was wrongly mentioned as periph2 clk enable.Signed-off-by Shiraz Hashim <[email protected]>Signed-off-by Amit Virdi <[email protected]>
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 23/25 SPEAr: Use separate config flags for 3xx and 6xx board files
In reply to Amit Virdi--- board/spear/common/Makefile | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
board/spear/common/Makefile +7 -2
@@ -29,9 +29,14 @@ endif LIB = $(obj)lib$(VENDOR).o -COBJS := spr_misc.o -SOBJS := spr_lowlevel_init.o +COBJS-$(CONFIG_SPEAR3XX) += spr_misc.o +COBJS-$(CONFIG_SPEAR600) += spr_misc.o +SOBJS-$(CONFIG_SPEAR3XX) += spr_lowlevel_init.o +SOBJS-$(CONFIG_SPEAR600) += spr_lowlevel_init.o + +COBJS := $(sort $(COBJS-y)) +SOBJS := $(sort $(SOBJS-y)) SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) SOBJS := $(addprefix $(obj),$(SOBJS))
Signature · 1 line
1.7.2.2
PATCH 23/25 SPEAr: Use separate config flags for 3xx and 6xx board files
Quoted 16 lines · On Wednesday 07 March 2012 13:04:12 Amit Virdi wrote:
Signed-off-by Amit Virdi <[email protected]>--- board/spear/common/Makefile | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)board/spear/common/Makefile +1
-2@@ -29,9 +29,14 @@ endif LIB = $(obj)lib$(VENDOR).o -COBJS := spr_misc.o -SOBJS := spr_lowlevel_init.o +COBJS-$(CONFIG_SPEAR3XX) += spr_misc.o
board/spear/common/Makefile endif · line 42
Quoted 10 lines
board/spear/common/Makefile +6
-0+COBJS-$(CONFIG_SPEAR600) += spr_misc.o +SOBJS-$(CONFIG_SPEAR3XX) += spr_lowlevel_init.o +SOBJS-$(CONFIG_SPEAR600) += spr_lowlevel_init.o + +COBJS := $(sort $(COBJS-y)) +SOBJS := $(sort $(SOBJS-y)) SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) SOBJS := $(addprefix $(obj),$(SOBJS))
I don't really see the benefit of this patch. Could you please explain a bit more why this is needed/better?
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 23/25 SPEAr: Use separate config flags for 3xx and 6xx board files
Quoted 13 lines
Quoted 13 lines
board/spear/common/Makefile +2
-2@@ -29,9 +29,14 @@ endif LIB = $(obj)lib$(VENDOR).o -COBJS := spr_misc.o -SOBJS := spr_lowlevel_init.o +COBJS-$(CONFIG_SPEAR3XX) += spr_misc.o +COBJS-$(CONFIG_SPEAR600) += spr_misc.o
Quoted 12 lines
board/spear/common/Makefile endif · line 42
Quoted 8 lines
board/spear/common/Makefile +5
-0+SOBJS-$(CONFIG_SPEAR3XX) += spr_lowlevel_init.o +SOBJS-$(CONFIG_SPEAR600) += spr_lowlevel_init.o + +COBJS := $(sort $(COBJS-y)) +SOBJS := $(sort $(SOBJS-y)) SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) SOBJS := $(addprefix $(obj),$(SOBJS))I don't really see the benefit of this patch. Could you please explain a bit more why this is needed/better?
Although it is better this way but the original intention to introduce this patch was to add more features which I didn't added in this patchset since this patchset aims to provide bug fixes in the already existing SPEAr support in u-boot.
Maybe, I can drop this patch in V2.
Regards
Amit Virdi
PATCH 23/25 SPEAr: Use separate config flags for 3xx and 6xx board files
Quoted 26 lines · On Monday 12 March 2012 14:57:50 Amit Virdi wrote:
Quoted 19 lines
Quoted 19 lines
board/spear/common/Makefile +7
-2@@ -29,9 +29,14 @@ endif LIB = $(obj)lib$(VENDOR).o -COBJS := spr_misc.o -SOBJS := spr_lowlevel_init.o +COBJS-$(CONFIG_SPEAR3XX) += spr_misc.o +COBJS-$(CONFIG_SPEAR600) += spr_misc.o +SOBJS-$(CONFIG_SPEAR3XX) += spr_lowlevel_init.o +SOBJS-$(CONFIG_SPEAR600) += spr_lowlevel_init.o + +COBJS := $(sort $(COBJS-y)) +SOBJS := $(sort $(SOBJS-y))Quoted 6 lines
Quoted 3 lines
board/spear/common/Makefile +0
-0SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))SOBJS := $(addprefix $(obj),$(SOBJS))I don't really see the benefit of this patch. Could you please explain a bit more why this is needed/better?
Quoted 6 lines
Although it is better this way but the original intention to introduce this patch was to add more features which I didn't added in this patchset since this patchset aims to provide bug fixes in the already existing SPEAr support in u-boot.
Maybe, I can drop this patch in V2.
Yes. Please drop it for now. You can always introduce it (if needed) in a new patch adding the "features" you mentioned above.
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 24/25 cleanup/SPEAr: Remove unnecessary parenthesis
In reply to Amit VirdiIn SPEAr configuration files, unnecessary paranthesis are used in some \#defines. Remove them as they serve no purpose
--- include/configs/spear-common.h | 8 ++++---- include/configs/spear3xx_evb.h | 6 +++--- include/configs/spear6xx_evb.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-)
include/configs/spear-common.h +4 -4
@@ -61,7 +61,7 @@#define CONFIG_I2C_CHIPADDRESS 0x50/* Timer, HZ specific defines */ -#define CONFIG_SYS_HZ (1000) +#define CONFIG_SYS_HZ 1000/* Flash configuration */ #if defined(CONFIG_FLASH_PNOR )
@@ -73,9 +73,9 @@#if defined(CONFIG_ST_SMI )#define CONFIG_SYS_MAX_FLASH_BANKS 2 -#define CONFIG_SYS_FLASH_BASE (0xF8000000) -#define CONFIG_SYS_CS1_FLASH_BASE (0xF9000000) -#define CONFIG_SYS_FLASH_BANK_SIZE (0x01000000) +#define CONFIG_SYS_FLASH_BASE 0xF8000000 +#define CONFIG_SYS_CS1_FLASH_BASE 0xF9000000 +#define CONFIG_SYS_FLASH_BANK_SIZE 0x01000000#define CONFIG_SYS_FLASH_ADDR_BASE {CONFIG_SYS_FLASH_BASE, \ CONFIG_SYS_CS1_FLASH_BASE}#define CONFIG_SYS_MAX_FLASH_SECT 128
include/configs/spear3xx_evb.h +3 -3
@@ -151,13 +151,13 @@#define CONFIG_SYS_FSMC_NAND_8BIT #if defined(CONFIG_SPEAR300 ) -#define CONFIG_SYS_NAND_BASE (0x80000000) +#define CONFIG_SYS_NAND_BASE 0x80000000#elif defined(CONFIG_SPEAR310 ) -#define CONFIG_SYS_NAND_BASE (0x40000000) +#define CONFIG_SYS_NAND_BASE 0x40000000#elif defined(CONFIG_SPEAR320 ) -#define CONFIG_SYS_NAND_BASE (0x50000000) +#define CONFIG_SYS_NAND_BASE 0x50000000#endif
include/configs/spear6xx_evb.h +1 -1
@@ -50,6 +50,6 @@/* NAND flash configuration */ #define CONFIG_SYS_FSMC_NAND_8BIT -#define CONFIG_SYS_NAND_BASE (0xD2000000) +#define CONFIG_SYS_NAND_BASE 0xD2000000#endif /* __CONFIG_H */
Signature · 1 line
1.7.2.2
PATCH 24/25 cleanup/SPEAr: Remove unnecessary parenthesis
Quoted 4 lines · On Wednesday 07 March 2012 13:04:13 Amit Virdi wrote:
In SPEAr configuration files, unnecessary paranthesis are used in some \#defines. Remove them as they serve no purpose
Signed-off-by Amit Virdi <[email protected]>
Ahh, I see. I should have scanned all you patches before commenting on these cosmetic issues. I assume that you also remove the newly added parentheses here? Then I've no objections to apply the earlier patches as well and do the cleanup with this patch.
So:
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 24/25 cleanup/SPEAr: Remove unnecessary parenthesis
Quoted 10 lines · On Wednesday 07 March 2012 15:41:26 Stefan Roese wrote:
Quoted 4 lines · On Wednesday 07 March 2012 13:04:13 Amit Virdi wrote:
In SPEAr configuration files, unnecessary paranthesis are used in some \#defines. Remove them as they serve no purpose
Signed-off-by Amit Virdi <[email protected]>Ahh, I see. I should have scanned all you patches before commenting on these cosmetic issues. I assume that you also remove the newly added parentheses here? Then I've no objections to apply the earlier patches as well and do the cleanup with this patch.
This reminds me of the spear headers in arch/arm/include/asm/arch-spear. It would be great if you could remove the parentheses here as well.
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 24/25 cleanup/SPEAr: Remove unnecessary parenthesis
Quoted 7 lines · Stefan Roese
Quoted 6 lines · On Wednesday 07 March 2012 15:41:26 Stefan Roese wrote:
Quoted 4 lines · On Wednesday 07 March 2012 13:04:13 Amit Virdi wrote:
In SPEAr configuration files, unnecessary paranthesis are used in some \#defines. Remove them as they serve no purpose
Signed-off-by Amit Virdi<[email protected]>
Quoted 8 lines
Quoted 4 lines
Ahh, I see. I should have scanned all you patches before commenting on these cosmetic issues. I assume that you also remove the newly added parentheses here? Then I've no objections to apply the earlier patches as well and do the cleanup with this patch.
This reminds me of the spear headers in
arch/arm/include/asm/arch-spear. It would be great if you could remove the parentheses here as well.
Sure! Somehow, I missed this file.
It was my mistake to hold the cleanup patches till the last. Point noted for next time ;)
Regards
Amit Virdi
PATCH 25/25 cleanup/SPEAr: Define configuration flags more elegantly
In reply to Amit VirdiIn SPEAr, some of the configuration flags eg. CONFIG_SPEAR_EMI, were given value "1", which isn't required. Define the flags without assigning any value
--- include/configs/spear-common.h | 26 +++++++++++++------------- include/configs/spear3xx_evb.h | 12 ++++++------ include/configs/spear6xx_evb.h | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-)
include/configs/spear-common.h +13 -13
@@ -65,7 +65,7 @@/* Flash configuration */ #if defined(CONFIG_FLASH_PNOR ) -#define CONFIG_SPEAR_EMI 1 +#define CONFIG_SPEAR_EMI #else #define CONFIG_ST_SMI #endif
@@ -103,9 +103,9 @@#define CONFIG_MTD_PARTITIONS #define CONFIG_NAND_FSMC #define CONFIG_SYS_MAX_NAND_DEVICE 1 -#define CONFIG_MTD_NAND_VERIFY_WRITE 1 -#define CONFIG_SYS_NAND_ONFI_DETECTION 1 -#define CONFIG_SYS_NAND_QUIET_TEST 1 +#define CONFIG_MTD_NAND_VERIFY_WRITE +#define CONFIG_SYS_NAND_ONFI_DETECTION +#define CONFIG_SYS_NAND_QUIET_TEST /* * Command support defines
@@ -207,18 +207,18 @@#define CONFIG_ENV_SIZE 0x02000#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE -#define CONFIG_MONITOR_IS_IN_RAM 1 +#define CONFIG_MONITOR_IS_IN_RAM /* Miscellaneous configurable options */ #define CONFIG_ARCH_CPU_INIT #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_DISPLAY_CPUINFO #define CONFIG_BOOT_PARAMS_ADDR 0x00000100 -#define CONFIG_CMDLINE_TAG 1 -#define CONFIG_SETUP_MEMORY_TAGS 1 -#define CONFIG_MISC_INIT_R 1 -#define CONFIG_ZERO_BOOTDELAY_CHECK 1 -#define CONFIG_AUTOBOOT_KEYED 1 +#define CONFIG_CMDLINE_TAG +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_MISC_INIT_R +#define CONFIG_ZERO_BOOTDELAY_CHECK +#define CONFIG_AUTOBOOT_KEYED #define CONFIG_AUTOBOOT_STOP_STR " "#define CONFIG_AUTOBOOT_PROMPT \ "Hit SPACE in %d seconds to stop autoboot.\n", bootdelay
@@ -236,10 +236,10 @@#define CONFIG_SYS_MAXARGS 16#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE#define CONFIG_SYS_LOAD_ADDR 0x00800000 -#define CONFIG_SYS_CONSOLE_INFO_QUIET 1 -#define CONFIG_SYS_64BIT_VSPRINTF 1 +#define CONFIG_SYS_CONSOLE_INFO_QUIET +#define CONFIG_SYS_64BIT_VSPRINTF -#define CONFIG_SYS_FLASH_EMPTY_INFO 1 +#define CONFIG_SYS_FLASH_EMPTY_INFO #define CONFIG_EXTRA_ENV_UNLOCK "unlock=yes\0"#define CONFIG_EXTRA_ENV_SETTINGS CONFIG_EXTRA_ENV_USBTTY \ CONFIG_EXTRA_ENV_UNLOCK
include/configs/spear3xx_evb.h +6 -6
@@ -29,14 +29,14 @@* (easy to change) */ #if defined(CONFIG_spear300) -#define CONFIG_SPEAR3XX 1 -#define CONFIG_SPEAR300 1 +#define CONFIG_SPEAR3XX +#define CONFIG_SPEAR300 #elif defined(CONFIG_spear310) -#define CONFIG_SPEAR3XX 1 -#define CONFIG_SPEAR310 1 +#define CONFIG_SPEAR3XX +#define CONFIG_SPEAR310 #elif defined(CONFIG_spear320) -#define CONFIG_SPEAR3XX 1 -#define CONFIG_SPEAR320 1 +#define CONFIG_SPEAR3XX +#define CONFIG_SPEAR320 #endif #if defined(CONFIG_usbtty)
include/configs/spear6xx_evb.h +1 -1
@@ -28,7 +28,7 @@* High Level Configuration Options * (easy to change) */ -#define CONFIG_SPEAR600 1 +#define CONFIG_SPEAR600 #if defined(CONFIG_usbtty)#define CONFIG_SPEAR_USBTTY 1
Signature · 1 line
1.7.2.2
PATCH 25/25 cleanup/SPEAr: Define configuration flags more elegantly
Quoted 5 lines · On Wednesday 07 March 2012 13:04:14 Amit Virdi wrote:
In SPEAr, some of the configuration flags eg.
CONFIG_SPEAR_EMI, were given value "1", which isn't required. Define the flags without assigning any valueSigned-off-by Amit Virdi <[email protected]>
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
cover SPEAr: Update platform support for SPEAr3xx/6xx
In reply to Amit VirdiHi Amit,
Quoted 13 lines · On Wednesday 07 March 2012 13:03:49 Amit Virdi wrote:
This patchset updates the SPEAr support in the u-boot. It contains various bugfixes and enhancements.
The patches have certain dependencies on the drivers, so should be applied once the driver patches are frozen. The various drivers on which these patches depend are:
1. USB device controller:http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/125220/focus=126598
2. USB OTG: Patch (USB:gadget:designware USB OTG implementation)
3.ST_SMI: http://lists.denx.de/pipermail/u-boot/2012-February/118672.html
4.FSMC_NAND: http://patchwork.ozlabs.org/patch/143167/
5. Designware ethernet controller:
Quoted 4 lines
http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/126029In a subsequent patchset, more features shall be added along with cleanup of the directory structure.
Thanks for all this work.
We already talked about this off list. I think it makes much sense to install an SPEAr U-Boot custodian, to offload Albert a bit. As I understand there are more SPEAr patches to be seen soon. And I also have some waiting here (SPL support etc).
So who would be best suited to become SPEAr custodian? Amit, you yourself? Or Vipin Kumar, as he is currently listed as maintainer for the SPEAr eval boards?
Comments?
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
cover SPEAr: Update platform support for SPEAr3xx/6xx
Hello Stefan,
Quoted 28 lines · Stefan Roese
Hi Amit,
Quoted 15 lines · On Wednesday 07 March 2012 13:03:49 Amit Virdi wrote:
This patchset updates the SPEAr support in the u-boot. It contains various bugfixes and enhancements.
The patches have certain dependencies on the drivers, so should be applied once the driver patches are frozen. The various drivers on which these patches depend are:
1. USB device controller:http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/125220/focus=126598
2. USB OTG: Patch (USB:gadget:designware USB OTG implementation)
3.ST_SMI: http://lists.denx.de/pipermail/u-boot/2012-February/118672.html
4.FSMC_NAND: http://patchwork.ozlabs.org/patch/143167/
5. Designware ethernet controller:
? ?http://comments.gmane.org/gmane.comp.boot-loaders.u-boot/126029Quoted 2 lines
In a subsequent patchset, more features shall be added along with cleanup of the directory structure.
Thanks for all this work.
We already talked about this off list. I think it makes much sense to install an SPEAr U-Boot custodian, to offload Albert a bit. As I understand there are more SPEAr patches to be seen soon. And I also have some waiting here (SPL support etc).
Quoted 5 lines
So who would be best suited to become SPEAr custodian? Amit, you yourself? Or Vipin Kumar, as he is currently listed as maintainer for the SPEAr eval boards?
Comments?
Today, the best candidate for SPEAr custodian is Vipin. He has great experience on SPEAr and has been working for past so many years. However, we need his consent before appointing him the custodian ;-)
Vipin, please share your opinion.
Thanks
Amit Virdi
cover SPEAr: Update platform support for SPEAr3xx/6xx
In reply to Stefan RoeseHello Stefan,
Quoted 9 lines
We already talked about this off list. I think it makes much sense to install an SPEAr U-Boot custodian, to offload Albert a bit. As I understand there are more SPEAr patches to be seen soon. And I also have some waiting here (SPL support etc).
So who would be best suited to become SPEAr custodian? Amit, you yourself? Or Vipin Kumar, as he is currently listed as maintainer for the SPEAr eval boards?
Yes, I can become a custodian on denx. Well, in that case all spear patches would be pushed through my denx.git repository.
Is that right ?
Also, can I create a repository myself ?
and last but not the least, the workflow for custodians given at denx.de is how custodians really work or is there a deviation?
Quoted 5 lines
Comments?
Thanks,
Stefan
Regards
Vipin
Quoted 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-0 Fax: (+49)-8142-66989-80 Email: office at denx.de .
cover SPEAr: Update platform support for SPEAr3xx/6xx
Hi Vipin,
Quoted 7 lines · On Friday 09 March 2012 08:29:10 Vipin Kumar wrote:
Quoted 3 lines
So who would be best suited to become SPEAr custodian? Amit, you yourself? Or Vipin Kumar, as he is currently listed as maintainer for the SPEAr eval boards?
Yes, I can become a custodian on denx. Well, in that case all spear patches would be pushed through my denx.git repository. Is that right ?
Correct. But only the SPEAr platform patches. Not the peripheral patches like designware ethernet, USB, NAND etc. Those will still go through the responsible subsystem custodian. So its mainly those patches related to files in SPEAr board files and under arch/arm.
Quoted 1 line
Also, can I create a repository myself ?
I think Wolfgang will create it initially for you. Wolfgang, please correct me if I'm wrong.
Quoted 2 lines
and last but not the least, the workflow for custodians given at denx.de is how custodians really work or is there a deviation?
Are you referring to this page?
http://www.denx.de/wiki/U-Boot/CustodianGitTrees
It should be quite up-to-date. Though I haven't read it for quite a while. I suggest that you give it a try and ask on the list once you have some questions.
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
cover SPEAr: Update platform support for SPEAr3xx/6xx
Quoted 2 lines · Stefan Roese
Hi Vipin,
Hello Stefan,
Quoted 5 lines · On Friday 09 March 2012 08:29:10 Vipin Kumar wrote:
Quoted 4 lines
Quoted 3 lines
So who would be best suited to become SPEAr custodian? Amit, you yourself? Or Vipin Kumar, as he is currently listed as maintainer for the SPEAr eval boards?
Quoted 9 lines
Quoted 3 lines
Yes, I can become a custodian on denx. Well, in that case all spear patches would be pushed through my denx.git repository. Is that right ?
Correct. But only the SPEAr platform patches. Not the peripheral patches like designware ethernet, USB, NAND etc. Those will still go through the responsible subsystem custodian. So its mainly those patches related to files in SPEAr board files and under
arch/arm.
Yes, understood
Quoted 5 lines
Quoted 1 line
Also, can I create a repository myself ?
I think Wolfgang will create it initially for you. Wolfgang, please correct me if I'm wrong.
Quoted 7 lines
Quoted 2 lines
and last but not the least, the workflow for custodians given at denx.de is how custodians really work or is there a deviation?
Are you referring to this page?
Yes
Quoted 4 lines
It should be quite up-to-date. Though I haven't read it for quite a while. I suggest that you give it a try and ask on the list once you have some questions.
Sure. I will do that
Quoted 9 lines
Thanks,
Stefan--
DENX Software Engineering GmbH, MD: Wolfgang Denk& Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de .
Regards
Vipin