diff options
author | Jason Jin <Jason.jin@freescale.com> | 2008-10-10 11:41:00 +0800 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-10-18 21:54:08 +0200 |
commit | 2e26d837f11460c0e6dede7d65424a31e0183d09 (patch) | |
tree | 68d1bcd295e302e939a6a0fa07fef138b1348d73 /board | |
parent | 7e183cad0c5ab6415dca95d6ac290ea918b28c55 (diff) | |
download | bootable_bootloader_goldelico_gta04-2e26d837f11460c0e6dede7d65424a31e0183d09.zip bootable_bootloader_goldelico_gta04-2e26d837f11460c0e6dede7d65424a31e0183d09.tar.gz bootable_bootloader_goldelico_gta04-2e26d837f11460c0e6dede7d65424a31e0183d09.tar.bz2 |
Enabled the Freescale SGMII riser card on 8536DS
Signed-off-by: Jason Jin <Jason.jin@freescale.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/freescale/mpc8536ds/mpc8536ds.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/board/freescale/mpc8536ds/mpc8536ds.c b/board/freescale/mpc8536ds/mpc8536ds.c index 5b252d1..ce77bb9 100644 --- a/board/freescale/mpc8536ds/mpc8536ds.c +++ b/board/freescale/mpc8536ds/mpc8536ds.c @@ -35,8 +35,11 @@ #include <libfdt.h> #include <spd_sdram.h> #include <fdt_support.h> +#include <tsec.h> +#include <netdev.h> #include "../common/pixis.h" +#include "../common/sgmii_riser.h" #if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER) extern void ddr_enable_ecc(unsigned int dram_size); @@ -618,6 +621,45 @@ int is_sata_supported(void) return 1; } +int board_eth_init(bd_t *bis) +{ +#ifdef CONFIG_TSEC_ENET + struct tsec_info_struct tsec_info[2]; + volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); + int num = 0; + uint sdrs2_io_sel = + (gur->pordevsr & MPC85xx_PORDEVSR_SRDS2_IO_SEL) >> 27; + +#ifdef CONFIG_TSEC1 + SET_STD_TSEC_INFO(tsec_info[num], 1); + if ((sdrs2_io_sel == 4) || (sdrs2_io_sel == 6)) { + tsec_info[num].phyaddr = 0; + tsec_info[num].flags |= TSEC_SGMII; + } + num++; +#endif +#ifdef CONFIG_TSEC3 + SET_STD_TSEC_INFO(tsec_info[num], 3); + if (sdrs2_io_sel == 4) { + tsec_info[num].phyaddr = 1; + tsec_info[num].flags |= TSEC_SGMII; + } + num++; +#endif + + if (!num) { + printf("No TSECs initialized\n"); + return 0; + } + + if ((sdrs2_io_sel == 4) || (sdrs2_io_sel == 6)) + fsl_sgmii_riser_init(tsec_info, num); + + tsec_eth_init(bis, tsec_info, num); +#endif + return pci_eth_init(bis); +} + #if defined(CONFIG_OF_BOARD_SETUP) void ft_board_setup(void *blob, bd_t *bd) |