SPEAr : Network support configured for spear SoCs
PATCH v4 8/19 SPEAr : Network support configured for spear SoCs
From: Vipin KUMAR <[email protected]>
--- arch/arm/include/asm/arch-spear/hardware.h | 1 + board/spear/spear300/spear300.c | 11 +++++++++++ board/spear/spear310/spear310.c | 11 +++++++++++ board/spear/spear320/spear320.c | 11 +++++++++++ board/spear/spear600/spear600.c | 11 +++++++++++ include/configs/spear-common.h | 14 ++++++++++++-- include/configs/spear3xx.h | 3 +++ 7 files changed, 60 insertions(+), 2 deletions(-)
arch/arm/include/asm/arch-spear/hardware.h +1 -0
@@ -31,6 +31,7 @@#define CONFIG_SPEAR_SYSCNTLBASE (0xFCA00000)#define CONFIG_SPEAR_TIMERBASE (0xFC800000)#define CONFIG_SPEAR_MISCBASE (0xFCA80000) +#define CONFIG_SPEAR_ETHBASE (0xE0800000)#define CONFIG_SYS_NAND_CLE (1 << 16)#define CONFIG_SYS_NAND_ALE (1 << 17)
board/spear/spear300/spear300.c +11 -0
@@ -22,6 +22,7 @@*/ #include <common.h> +#include <netdev.h> #include <nand.h> #include <asm/io.h> #include <asm/arch/hardware.h>
@@ -56,3 +57,13 @@ int board_nand_init(struct nand_chip *nand)return -1 ; } + +int board_eth_init (bd_t *bis) +{ +int ret =0 ; +#if defined(CONFIG_DESIGNWARE_ETH ) +if (designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ) >=0 ) + ret++; +#endif +return ret; +}
board/spear/spear310/spear310.c +11 -0
@@ -23,6 +23,7 @@*/ #include <common.h> +#include <netdev.h> #include <nand.h> #include <asm/io.h> #include <asm/arch/hardware.h>
@@ -57,3 +58,13 @@ int board_nand_init(struct nand_chip *nand)return -1 ; } + +int board_eth_init (bd_t *bis) +{ +int ret =0 ; +#if defined(CONFIG_DESIGNWARE_ETH ) +if (designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ) >=0 ) + ret++; +#endif +return ret; +}
board/spear/spear320/spear320.c +11 -0
@@ -23,6 +23,7 @@*/ #include <common.h> +#include <netdev.h> #include <nand.h> #include <asm/io.h> #include <asm/arch/hardware.h>
@@ -57,3 +58,13 @@ int board_nand_init(struct nand_chip *nand)return -1 ; } + +int board_eth_init (bd_t *bis) +{ +int ret =0 ; +#if defined(CONFIG_DESIGNWARE_ETH ) +if (designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ) >=0 ) + ret++; +#endif +return ret; +}
board/spear/spear600/spear600.c +11 -0
@@ -22,6 +22,7 @@*/ #include <common.h> +#include <netdev.h> #include <nand.h> #include <asm/io.h> #include <asm/arch/hardware.h>
@@ -51,3 +52,13 @@ int board_nand_init(struct nand_chip *nand)return -1 ; } + +int board_eth_init (bd_t *bis) +{ +int ret =0 ; +#if defined(CONFIG_DESIGNWARE_ETH ) +if (designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ) >=0 ) + ret++; +#endif +return ret; +}
include/configs/spear-common.h +12 -2
@@ -27,6 +27,14 @@* Common configurations used for both spear3xx as well as spear6xx */ +/* Ethernet driver configuration */ +#define CONFIG_MII +#define CONFIG_DESIGNWARE_ETH +#define CONFIG_DW_SEARCH_PHY +#define CONFIG_DW0_PHY 1 +#define CONFIG_NET_MULTI +#define CONFIG_PHY_RESET_DELAY (10000)/* in usec */ +/* USBD driver configuration */ #define CONFIG_SPEARUDC #define CONFIG_USB_DEVICE
@@ -99,11 +107,13 @@#define CONFIG_CMD_MEMORY #define CONFIG_CMD_RUN #define CONFIG_CMD_SAVES +#define CONFIG_CMD_NET +#define CONFIG_CMD_MII +#define CONFIG_CMD_PING +#define CONFIG_CMD_DHCP /* This must be included AFTER the definition of CONFIG_COMMANDS (if any) */ #include <config_cmd_default.h> -#undef CONFIG_CMD_NET -#undef CONFIG_CMD_NFS/* * Default Environment Varible definitions
include/configs/spear3xx.h +3 -0
@@ -41,6 +41,9 @@#include <configs/spear-common.h> +/* Ethernet driver configuration */ +#define CONFIG_DW_ALTDESCRIPTOR 1 +/* Serial Configuration (PL011) */ #define CONFIG_SYS_SERIAL0 0xD0000000
Signature · 1 line
1.6.0.2
PATCH v4 9/19 SPEAr : macb driver support added for spear310 and spear320
From: Vipin KUMAR <[email protected]>
SPEAr310 and SPEAr320 SoCs have an extra ethernet controller. The driver for this device is already supported by u-boot, so configuring board configuration file and defining base addresses etc to make use of the common driver
--- arch/arm/include/asm/arch-spear/clk.h | 27 +++++++++++++++++++++++++++ arch/arm/include/asm/arch-spear/hardware.h | 7 +++++++ board/spear/spear310/spear310.c | 17 +++++++++++++++++ board/spear/spear320/spear320.c | 5 +++++ include/configs/spear3xx.h | 13 +++++++++++++ 5 files changed, 69 insertions(+), 0 deletions(-) create mode 100644 arch/arm/include/asm/arch-spear/clk.h
arch/arm/include/asm/arch-spear/clk.h new file +27 -0
@@ -0,0 +1,27 @@ +/* +* (C) Copyright 2010 +* Vipin Kumar, STMicroelectronics, <[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +static inline unsigned long get_macb_pclk_rate (unsigned int dev_id) +{ +return 83000000 ; +}
arch/arm/include/asm/arch-spear/hardware.h +7 -0
@@ -56,6 +56,11 @@#define CONFIG_SPEAR_EMIBASE (0x4F000000)#define CONFIG_SPEAR_RASBASE (0xB4000000) +#define CONFIG_SYS_MACB0_BASE (0xB0000000) +#define CONFIG_SYS_MACB1_BASE (0xB0800000) +#define CONFIG_SYS_MACB2_BASE (0xB1000000) +#define CONFIG_SYS_MACB3_BASE (0xB1800000) +#elif defined(CONFIG_SPEAR320 )#define CONFIG_SYS_I2C_BASE (0xD0180000)#define CONFIG_SPEAR_FSMCBASE (0x4C000000)
@@ -63,5 +68,7 @@#define CONFIG_SPEAR_EMIBASE (0x40000000)#define CONFIG_SPEAR_RASBASE (0xB3000000) +#define CONFIG_SYS_MACB0_BASE (0xAA000000) +#endif #endif /* _ASM_ARCH_HARDWARE_H */
board/spear/spear310/spear310.c +17 -0
@@ -66,5 +66,22 @@ int board_eth_init(bd_t *bis)if (designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ) >=0 ) ret++;#endif +#if defined(CONFIG_MACB ) +if (macb_eth_initialize (0 , (void *)CONFIG_SYS_MACB0_BASE , +CONFIG_MACB0_PHY ) >=0 ) + ret++; + +if (macb_eth_initialize (1 , (void *)CONFIG_SYS_MACB1_BASE , +CONFIG_MACB1_PHY ) >=0 ) + ret++; + +if (macb_eth_initialize (2 , (void *)CONFIG_SYS_MACB2_BASE , +CONFIG_MACB2_PHY ) >=0 ) + ret++; + +if (macb_eth_initialize (3 , (void *)CONFIG_SYS_MACB3_BASE , +CONFIG_MACB3_PHY ) >=0 ) + ret++; +#endif return ret; }
board/spear/spear320/spear320.c +5 -0
@@ -66,5 +66,10 @@ int board_eth_init(bd_t *bis)if (designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ) >=0 ) ret++;#endif +#if defined(CONFIG_MACB ) +if (macb_eth_initialize (0 , (void *)CONFIG_SYS_MACB0_BASE , +CONFIG_MACB0_PHY ) >=0 ) + ret++; +#endif return ret; }
include/configs/spear3xx.h +13 -0
@@ -44,6 +44,19 @@/* Ethernet driver configuration */ #define CONFIG_DW_ALTDESCRIPTOR 1 +#if defined(CONFIG_SPEAR310 ) +#define CONFIG_MACB 1 +#define CONFIG_MACB0_PHY 0x01 +#define CONFIG_MACB1_PHY 0x03 +#define CONFIG_MACB2_PHY 0x05 +#define CONFIG_MACB3_PHY 0x07 + +#elif defined(CONFIG_SPEAR320 ) +#define CONFIG_MACB 1 +#define CONFIG_MACB0_PHY 0x01 + +#endif +/* Serial Configuration (PL011) */ #define CONFIG_SYS_SERIAL0 0xD0000000
Signature · 1 line
1.6.0.2
v4 cover Network support feedbacks incorporated
These patches incorporate the feedbacks provided by Ben. The patch-set contians only 2 patches. All other subpatches remain unchanged from PATCH v3
http://lists.denx.de/pipermail/u-boot/2010-May/071357.html
Vipin KUMAR (18):
change_bit routine defined
SPEAr : SMI erase and write timeouts increased
SPEAr : Placing ethaddr write and read within CONFIG_CMD_NET SPEAr : Reducing the max RAM size to 128MB
SPEAr : Basic arch related support added for SPEAr SoCs SPEAr : Network driver support added
SPEAr : Network support configured for spear SoCs
SPEAr : macb driver support added for spear310 and spear320 SPEAr : FSMC driver support added
SPEAr : Configuring FSMC driver for NAND interface
SPEAr : i2c driver moved completely into drivers/i2c SPEAr : smi driver moved completely into drivers/mtd SPEAr : USB Device Controller driver support added
SPEAr : Supporting various configurations for spear3xx and spear6xx
boards
SPEAr : Basic spear1300 architecture support added
SPEAr : spear1300 SoC support added
SPEAr : Removing extraneous code
SPEAr : USB device controller bugfixes
Wolfgang Denk (1):
Makefile: fix out-of-tree building of "u-boot.img" target
MAINTAINERS | 1 +
MAKEALL | 1 +
Makefile | 30 +-
arch/arm/cpu/arm926ejs/spear/Makefile | 3 +-
arch/arm/cpu/arm926ejs/spear/cpu.c | 78 +++
arch/arm/cpu/arm_cortexa8/spear13xx/Makefile | 52 ++
arch/arm/cpu/arm_cortexa8/spear13xx/cache.S | 114 +++++
arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c | 96 ++++
.../arm_cortexa8/spear13xx/reset.c} | 52 +--
arch/arm/cpu/arm_cortexa8/spear13xx/timer.c | 138 +++++
.../arm/include/asm/arch-spear/clk.h | 26 +-
arch/arm/include/asm/arch-spear/hardware.h | 16 +-
arch/arm/include/asm/arch-spear/spr_misc.h | 5 +
.../arm/include/asm/arch-spear13xx/hardware.h | 33 +-
arch/arm/include/asm/arch-spear13xx/spr_gpt.h | 85 ++++
arch/arm/include/asm/arch-spear13xx/spr_misc.h | 317 ++++++++++++
.../arm/include/asm/arch-spear13xx/sys_proto.h | 29 +-
arch/arm/include/asm/bitops.h | 11 +-
board/spear/common/Makefile | 10 +-
board/spear/common/spr_misc.c | 28 +-
board/spear/spear1300/Makefile | 51 ++
board/spear/spear1300/config.mk | 28 +
board/spear/spear1300/spear1300.c | 88 ++++
.../spear/spear1300/spr_lowlevel_init.S | 35 +-
board/spear/spear300/config.mk | 11 -
board/spear/spear300/spear300.c | 18 +-
board/spear/spear310/config.mk | 11 -
board/spear/spear310/spear310.c | 35 ++-
board/spear/spear320/config.mk | 11 -
board/spear/spear320/spear320.c | 23 +-
board/spear/spear600/config.mk | 11 -
board/spear/spear600/spear600.c | 18 +-
doc/README.designware_eth | 25 +
doc/README.spear | 46 ++-
drivers/i2c/Makefile | 2 +-
drivers/i2c/{spr_i2c.c => designware_i2c.c} | 4 +-
.../spr_i2c.h => drivers/i2c/designware_i2c.h | 6 +-
drivers/mtd/Makefile | 2 +-
drivers/mtd/nand/Makefile | 2 +-
drivers/mtd/nand/fsmc_nand.c | 366 ++++++++++++++
drivers/mtd/nand/spr_nand.c | 124 -----
drivers/mtd/{spr_smi.c => st_smi.c} | 59 ++-
.../arch-spear/spr_smi.h => drivers/mtd/st_smi.h | 8 +-
drivers/net/Makefile | 1 +
drivers/net/designware.c | 531 ++++++++++++++++++++
drivers/net/designware.h | 264 ++++++++++
drivers/serial/usbtty.h | 4 +-
drivers/usb/gadget/Makefile | 2 +-
drivers/usb/gadget/{spr_udc.c => designware_udc.c} | 116 +++--
include/configs/spear-common.h | 33 +-
include/configs/spear13xx_evb.h | 202 ++++++++
include/configs/{spear3xx.h => spear3xx_evb.h} | 30 ++
include/configs/{spear6xx.h => spear6xx_evb.h} | 13 +
include/linux/mtd/fsmc_nand.h | 104 ++++
include/netdev.h | 1 +
include/usb/{spr_udc.h => designware_udc.h} | 6 +-
56 files changed, 2996 insertions(+), 420 deletions(-)
create mode 100644 arch/arm/cpu/arm926ejs/spear/cpu.c
create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/Makefile
create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/cache.S
create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/cpu.c
rename arch/arm/{include/asm/arch-spear/spr_nand.h => cpu/arm_cortexa8/spear13xx/reset.c} (50%)
mode change 100644 => 100755
create mode 100644 arch/arm/cpu/arm_cortexa8/spear13xx/timer.c
copy include/configs/spear6xx.h => arch/arm/include/asm/arch-spear/clk.h (64%)
copy include/configs/spear6xx.h => arch/arm/include/asm/arch-spear13xx/hardware.h (58%)
create mode 100644 arch/arm/include/asm/arch-spear13xx/spr_gpt.h
create mode 100644 arch/arm/include/asm/arch-spear13xx/spr_misc.h
copy include/configs/spear6xx.h => arch/arm/include/asm/arch-spear13xx/sys_proto.h (64%)
create mode 100644 board/spear/spear1300/Makefile
create mode 100644 board/spear/spear1300/config.mk
create mode 100644 board/spear/spear1300/spear1300.c
copy include/configs/spear6xx.h => board/spear/spear1300/spr_lowlevel_init.S (56%)
create mode 100644 doc/README.designware_eth
rename drivers/i2c/{spr_i2c.c => designware_i2c.c} (98%)
rename arch/arm/include/asm/arch-spear/spr_i2c.h => drivers/i2c/designware_i2c.h (98%)
create mode 100644 drivers/mtd/nand/fsmc_nand.c
delete mode 100644 drivers/mtd/nand/spr_nand.c
rename drivers/mtd/{spr_smi.c => st_smi.c} (94%)
rename arch/arm/include/asm/arch-spear/spr_smi.h => drivers/mtd/st_smi.h (96%)
create mode 100644 drivers/net/designware.c
create mode 100644 drivers/net/designware.h
rename drivers/usb/gadget/{spr_udc.c => designware_udc.c} (91%)
create mode 100644 include/configs/spear13xx_evb.h
rename include/configs/{spear3xx.h => spear3xx_evb.h} (85%)
rename include/configs/{spear6xx.h => spear6xx_evb.h} (82%)
create mode 100644 include/linux/mtd/fsmc_nand.h
rename include/usb/{spr_udc.h => designware_udc.h} (98%)PATCH v4 8/19 SPEAr : Network support configured for spear SoCs
In reply to Vipin KUMARQuoted 4 lines · Vipin KUMAR
From: Vipin KUMAR <[email protected]>
Signed-off-by Vipin Kumar <[email protected]>
Quoted 195 lines
--- arch/arm/include/asm/arch-spear/hardware.h | 1 + board/spear/spear300/spear300.c | 11 +++++++++++ board/spear/spear310/spear310.c | 11 +++++++++++ board/spear/spear320/spear320.c | 11 +++++++++++ board/spear/spear600/spear600.c | 11 +++++++++++ include/configs/spear-common.h | 14 ++++++++++++-- include/configs/spear3xx.h | 3 +++ 7 files changed, 60 insertions(+), 2 deletions(-)arch/arm/include/asm/arch-spear/hardware.h +1
-0@@ -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 +7
-0@@ -22,6 +22,7 @@*/ #include <common.h> +#include <netdev.h> #include <nand.h> #include <asm/io.h> #include <asm/arch/hardware.h> @@ -56,3 +57,13 @@ int board_nand_init(struct nand_chip *nand)return -1 ; } + +int board_eth_init (bd_t *bis) +{ +int ret =0 ; +#if defined(CONFIG_DESIGNWARE_ETH ) + if (designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY)Quoted 1 line
= 0)
board/spear/spear300/spear300.c +4
-0+ ret++; +#endif +return ret; +}board/spear/spear310/spear310.c +7
-0@@ -23,6 +23,7 @@*/ #include <common.h> +#include <netdev.h> #include <nand.h> #include <asm/io.h> #include <asm/arch/hardware.h> @@ -57,3 +58,13 @@ int board_nand_init(struct nand_chip *nand)return -1 ; } + +int board_eth_init (bd_t *bis) +{ +int ret =0 ; +#if defined(CONFIG_DESIGNWARE_ETH ) + if (designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY)Quoted 1 line
= 0)
board/spear/spear310/spear310.c +4
-0+ ret++; +#endif +return ret; +}board/spear/spear320/spear320.c +7
-0@@ -23,6 +23,7 @@*/ #include <common.h> +#include <netdev.h> #include <nand.h> #include <asm/io.h> #include <asm/arch/hardware.h> @@ -57,3 +58,13 @@ int board_nand_init(struct nand_chip *nand)return -1 ; } + +int board_eth_init (bd_t *bis) +{ +int ret =0 ; +#if defined(CONFIG_DESIGNWARE_ETH ) + if (designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY)Quoted 1 line
= 0)
board/spear/spear320/spear320.c +4
-0+ ret++; +#endif +return ret; +}board/spear/spear600/spear600.c +7
-0@@ -22,6 +22,7 @@*/ #include <common.h> +#include <netdev.h> #include <nand.h> #include <asm/io.h> #include <asm/arch/hardware.h> @@ -51,3 +52,13 @@ int board_nand_init(struct nand_chip *nand)return -1 ; } + +int board_eth_init (bd_t *bis) +{ +int ret =0 ; +#if defined(CONFIG_DESIGNWARE_ETH ) + if (designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY)Quoted 1 line
= 0)
board/spear/spear600/spear600.c +4
-0+ ret++; +#endif +return ret; +}include/configs/spear-common.h +8
-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 */ +/* USBD driver configuration */ #define CONFIG_SPEARUDC #define
CONFIG_USB_DEVICEinclude/configs/spear-common.h +4
-2@@ -99,11 +107,13 @@#define CONFIG_CMD_MEMORY #define CONFIG_CMD_RUN #define CONFIG_CMD_SAVES +#define CONFIG_CMD_NET +#define CONFIG_CMD_MII +#define CONFIG_CMD_PING +#define CONFIG_CMD_DHCP /* This must be included AFTER the definition of CONFIG_COMMANDS (if any) */ #include <config_cmd_default.h> -#undef CONFIG_CMD_NET -#undef CONFIG_CMD_NFS/* * Default Environment Varible definitions
include/configs/spear3xx.h +3
-1@@ -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 --1.6.0.2
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH v4 9/19 SPEAr : macb driver support added for spear310 and spear320
In reply to Vipin KUMARQuoted 9 lines · Vipin KUMAR
From: Vipin KUMAR <[email protected]>
SPEAr310 and SPEAr320 SoCs have an extra ethernet controller. The driver for this device is already supported by u-boot, so configuring board configuration file and defining base addresses etc to make use of the common driver
Signed-off-by Vipin Kumar <[email protected]>
Quoted 147 lines
--- arch/arm/include/asm/arch-spear/clk.h | 27 +++++++++++++++++++++++++++ arch/arm/include/asm/arch-spear/hardware.h | 7 +++++++ board/spear/spear310/spear310.c | 17 +++++++++++++++++ board/spear/spear320/spear320.c | 5 +++++ include/configs/spear3xx.h | 13 +++++++++++++ 5 files changed, 69 insertions(+), 0 deletions(-) create mode 100644 arch/arm/include/asm/arch-spear/clk.harch/arm/include/asm/arch-spear/clk.h new file +27
-0@@ -0,0 +1,27 @@ +/* +* (C) Copyright 2010 +* Vipin Kumar, STMicroelectronics, <[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +static inline unsigned long get_macb_pclk_rate (unsigned int dev_id) +{ +return 83000000 ; +}arch/arm/include/asm/arch-spear/hardware.h +7
-0@@ -56,6 +56,11 @@#define CONFIG_SPEAR_EMIBASE (0x4F000000)#define CONFIG_SPEAR_RASBASE (0xB4000000) +#define CONFIG_SYS_MACB0_BASE (0xB0000000) +#define CONFIG_SYS_MACB1_BASE (0xB0800000) +#define CONFIG_SYS_MACB2_BASE (0xB1000000) +#define CONFIG_SYS_MACB3_BASE (0xB1800000) +#elif defined(CONFIG_SPEAR320 )#define CONFIG_SYS_I2C_BASE (0xD0180000)#define CONFIG_SPEAR_FSMCBASE (0x4C000000)@@ -63,5 +68,7 @@#define CONFIG_SPEAR_EMIBASE (0x40000000)#define CONFIG_SPEAR_RASBASE (0xB3000000) +#define CONFIG_SYS_MACB0_BASE (0xAA000000) +#endif #endif /* _ASM_ARCH_HARDWARE_H */ board/spear/spear310/spear310.c +17
-0@@ -66,5 +66,22 @@ int board_eth_init(bd_t *bis)if (designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ) >=0 ) ret++;#endif +#if defined(CONFIG_MACB ) +if (macb_eth_initialize (0 , (void *)CONFIG_SYS_MACB0_BASE , +CONFIG_MACB0_PHY ) >=0 ) + ret++; + +if (macb_eth_initialize (1 , (void *)CONFIG_SYS_MACB1_BASE , +CONFIG_MACB1_PHY ) >=0 ) + ret++; + +if (macb_eth_initialize (2 , (void *)CONFIG_SYS_MACB2_BASE , +CONFIG_MACB2_PHY ) >=0 ) + ret++; + +if (macb_eth_initialize (3 , (void *)CONFIG_SYS_MACB3_BASE , +CONFIG_MACB3_PHY ) >=0 ) + ret++; +#endif return ret;}
board/spear/spear320/spear320.c +5
-0@@ -66,5 +66,10 @@ int board_eth_init(bd_t *bis)if (designware_initialize (0 ,CONFIG_SPEAR_ETHBASE ,CONFIG_DW0_PHY ) >=0 ) ret++;#endif +#if defined(CONFIG_MACB ) +if (macb_eth_initialize (0 , (void *)CONFIG_SYS_MACB0_BASE , +CONFIG_MACB0_PHY ) >=0 ) + ret++; +#endif return ret;}
include/configs/spear3xx.h +13
-1@@ -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 --1.6.0.2
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH v4 9/19 SPEAr : macb driver support added for spear310 and spear320
Quoted 4 lines · Ben Warren
Quoted 2 lines · Vipin KUMAR
From: Vipin KUMAR <[email protected]>
Quoted 9 lines
Quoted 7 lines
SPEAr310 and SPEAr320 SoCs have an extra ethernet controller. The driver for this device is already supported by u-boot, so configuring board configuration file and defining base addresses etc to make use of the common driver
Signed-off-by Vipin Kumar <[email protected]>Acked-by ?Ben Warren <[email protected]>
Thanks Ben
Quoted 154 lines
Quoted 139 lines
---
?arch/arm/include/asm/arch-spear/clk.h ? ? ?| ? 27
+++++++++++++++++++++++++++?arch/arm/include/asm/arch-spear/hardware.h | ? ?7 +++++++ ?board/spear/spear310/spear310.c ? ? ? ? ? ?| ? 17 +++++++++++++++++ ?board/spear/spear320/spear320.c ? ? ? ? ? ?| ? ?5 +++++ ?include/configs/spear3xx.h ? ? ? ? ? ? ? ? | ? 13 +++++++++++++?5 files changed, 69 insertions(+), 0 deletions(-) ?create mode 100644
arch/arm/include/asm/arch-spear/clk.harch/arm/include/asm/arch-spear/clk.h new file +27
-0@@ -0,0 +1,27 @@ +/* +* (C) Copyright 2010 +* Vipin Kumar, STMicroelectronics, <[email protected]> +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +static inline unsigned long get_macb_pclk_rate (unsigned int dev_id) +{ + ? ? ? return 83000000; +}arch/arm/include/asm/arch-spear/hardware.h +7
-0@@ -56,6 +56,11 @@ ?#define CONFIG_SPEAR_EMIBASE ? ? ? ? ? ? ? ? ? (0x4F000000) ?#define CONFIG_SPEAR_RASBASE ? ? ? ? ? ? ? ? ? (0xB4000000) +#define CONFIG_SYS_MACB0_BASE ? ? ? ? ? ? ? ? ?(0xB0000000) +#define CONFIG_SYS_MACB1_BASE ? ? ? ? ? ? ? ? ?(0xB0800000) +#define CONFIG_SYS_MACB2_BASE ? ? ? ? ? ? ? ? ?(0xB1000000) +#define CONFIG_SYS_MACB3_BASE ? ? ? ? ? ? ? ? ?(0xB1800000) + ?#elif defined(CONFIG_SPEAR320) ?#define CONFIG_SYS_I2C_BASE ? ? ? ? ? ? ? ? ? ?(0xD0180000) ?#define CONFIG_SPEAR_FSMCBASE ? ? ? ? ? ? ? ? ?(0x4C000000)@@ -63,5 +68,7 @@ ?#define CONFIG_SPEAR_EMIBASE ? ? ? ? ? ? ? ? ? (0x40000000) ?#define CONFIG_SPEAR_RASBASE ? ? ? ? ? ? ? ? ? (0xB3000000) +#define CONFIG_SYS_MACB0_BASE ? ? ? ? ? ? ? ? ?(0xAA000000) +?#endif
?#endif /*_ASM_ARCH_HARDWARE_H*/board/spear/spear310/spear310.c +0
-0@@ -66,5 +66,22 @@ int board_eth_init(bd_t *bis) ? ? ? ?if (designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY) >=0 ) ? ? ? ? ? ? ? ?ret++;?#endif
board/spear/spear310/spear310.c +17
-0+#if defined(CONFIG_MACB ) + ? ? ? if (macb_eth_initialize(0, (void *)CONFIG_SYS_MACB0_BASE, + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? CONFIG_MACB0_PHY) >= 0) + ? ? ? ? ? ? ? ret++; + + ? ? ? if (macb_eth_initialize(1, (void *)CONFIG_SYS_MACB1_BASE, + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? CONFIG_MACB1_PHY) >= 0) + ? ? ? ? ? ? ? ret++; + + ? ? ? if (macb_eth_initialize(2, (void *)CONFIG_SYS_MACB2_BASE, + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? CONFIG_MACB2_PHY) >= 0) + ? ? ? ? ? ? ? ret++; + + ? ? ? if (macb_eth_initialize(3, (void *)CONFIG_SYS_MACB3_BASE, + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? CONFIG_MACB3_PHY) >= 0) + ? ? ? ? ? ? ? ret++; +#endif ? ? ? ?return ret;
?}board/spear/spear320/spear320.c +0
-0@@ -66,5 +66,10 @@ int board_eth_init(bd_t *bis) ? ? ? ?if (designware_initialize(0, CONFIG_SPEAR_ETHBASE, CONFIG_DW0_PHY) >=0 ) ? ? ? ? ? ? ? ?ret++;?#endif
board/spear/spear320/spear320.c +5
-0+#if defined(CONFIG_MACB ) + ? ? ? if (macb_eth_initialize(0, (void *)CONFIG_SYS_MACB0_BASE, + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? CONFIG_MACB0_PHY) >= 0) + ? ? ? ? ? ? ? ret++; +#endif ? ? ? ?return ret;
?}include/configs/spear3xx.h +0
-0@@ -44,6 +44,19 @@?/* Ethernet driver configuration */
?#defineCONFIG_DW_ALTDESCRIPTOR? ? ? ? ? ? ? ? ? ? ? ?1include/configs/spear3xx.h +13
-0+#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) */
?#defineCONFIG_SYS_SERIAL0? ? ? ? ? ? ? ? ? ?0xD0000000Quoted 8 lines
--
1.6.0.2_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot