From f36919a8138ed7ecd3dbce4630e02936b13907da Mon Sep 17 00:00:00 2001 From: Ricardo Ribalda Delgado Date: Tue, 26 Jan 2016 13:47:45 +0100 Subject: ppc: xilinx-ppc440-generic: Wire LL_TEMAC driver If the xparameters file contains a LL_TEMAC definition compile its driver and the net commands. Signed-off-by: Ricardo Ribalda Delgado Reviewed-by: Bin Meng Reviewed-by: Tom Rini Signed-off-by: Michal Simek Reviewed-by: Michal Simek --- .../xilinx/ppc440-generic/xilinx_ppc440_generic.c | 22 ++++++++++++++++++++++ board/xilinx/ppc440-generic/xparameters.h | 4 ++++ 2 files changed, 26 insertions(+) (limited to 'board/xilinx') diff --git a/board/xilinx/ppc440-generic/xilinx_ppc440_generic.c b/board/xilinx/ppc440-generic/xilinx_ppc440_generic.c index 0e3ab94..d823352 100644 --- a/board/xilinx/ppc440-generic/xilinx_ppc440_generic.c +++ b/board/xilinx/ppc440-generic/xilinx_ppc440_generic.c @@ -8,6 +8,7 @@ #include #include +#include #include int checkboard(void) @@ -34,3 +35,24 @@ void get_sys_info(sys_info_t *sys_info) int get_serial_clock(void){ return XPAR_UARTNS550_0_CLOCK_FREQ_HZ; } + +int board_eth_init(bd_t *bis) +{ + int ret = 0; + + puts("Init xilinx temac\n"); +#ifdef XPAR_LLTEMAC_0_BASEADDR + ret |= xilinx_ll_temac_eth_init(bis, XPAR_LLTEMAC_0_BASEADDR, + XILINX_LL_TEMAC_M_SDMA_DCR | XILINX_LL_TEMAC_M_SDMA_PLB, + XPAR_LLTEMAC_0_LLINK_CONNECTED_BASEADDR); + +#endif + +#ifdef XPAR_LLTEMAC_1_BASEADDR + ret |= xilinx_ll_temac_eth_init(bis, XPAR_LLTEMAC_1_BASEADDR, + XILINX_LL_TEMAC_M_SDMA_DCR | XILINX_LL_TEMAC_M_SDMA_PLB, + XPAR_LLTEMAC_1_LLINK_CONNECTED_BASEADDR); +#endif + + return ret; +} diff --git a/board/xilinx/ppc440-generic/xparameters.h b/board/xilinx/ppc440-generic/xparameters.h index 9685560..b45a6a1 100644 --- a/board/xilinx/ppc440-generic/xparameters.h +++ b/board/xilinx/ppc440-generic/xparameters.h @@ -18,5 +18,9 @@ #define XPAR_CORE_CLOCK_FREQ_HZ 400000000 #define XPAR_INTC_MAX_NUM_INTR_INPUTS 32 #define XPAR_UARTNS550_0_CLOCK_FREQ_HZ 100000000 +#define XPAR_LLTEMAC_0_LLINK_CONNECTED_BASEADDR 0x80 +#define XPAR_LLTEMAC_1_LLINK_CONNECTED_BASEADDR 0x98 +#define XPAR_LLTEMAC_0_BASEADDR 0x83000000 +#define XPAR_LLTEMAC_1_BASEADDR 0x83000040 #endif -- cgit v1.1