Ricardo Ribalda Delgado | f84496a | 2008-09-01 13:09:39 -0400 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2008 |
Ricardo Ribalda Delgado | 5712d04 | 2016-01-26 11:24:08 +0100 | [diff] [blame] | 3 | * Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda@gmail.com |
Ricardo Ribalda Delgado | f84496a | 2008-09-01 13:09:39 -0400 | [diff] [blame] | 4 | * This work has been supported by: QTechnology http://qtec.com/ |
| 5 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 6 | * SPDX-License-Identifier: GPL-2.0+ |
Ricardo Ribalda Delgado | f84496a | 2008-09-01 13:09:39 -0400 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #include <config.h> |
| 10 | #include <common.h> |
Ricardo Ribalda Delgado | 3f355dd | 2016-01-26 13:47:45 +0100 | [diff] [blame] | 11 | #include <netdev.h> |
Ricardo Ribalda Delgado | f84496a | 2008-09-01 13:09:39 -0400 | [diff] [blame] | 12 | #include <asm/processor.h> |
| 13 | |
Simon Glass | 39f90ba | 2017-03-31 08:40:25 -0600 | [diff] [blame] | 14 | DECLARE_GLOBAL_DATA_PTR; |
| 15 | |
Ricardo Ribalda Delgado | 5db1f9d | 2016-01-26 11:24:21 +0100 | [diff] [blame] | 16 | int checkboard(void) |
Ricardo Ribalda Delgado | f84496a | 2008-09-01 13:09:39 -0400 | [diff] [blame] | 17 | { |
| 18 | puts("Xilinx PPC440 Generic Board\n"); |
| 19 | return 0; |
| 20 | } |
Ricardo Ribalda Delgado | f84496a | 2008-09-01 13:09:39 -0400 | [diff] [blame] | 21 | |
Simon Glass | d35f338 | 2017-04-06 12:47:05 -0600 | [diff] [blame] | 22 | int dram_init(void) |
Ricardo Ribalda Delgado | f84496a | 2008-09-01 13:09:39 -0400 | [diff] [blame] | 23 | { |
Simon Glass | 39f90ba | 2017-03-31 08:40:25 -0600 | [diff] [blame] | 24 | gd->ram_size = get_ram_size(XPAR_DDR2_SDRAM_MEM_BASEADDR, |
Jean-Christophe PLAGNIOL-VILLARD | 0383694 | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 25 | CONFIG_SYS_SDRAM_SIZE_MB * 1024 * 1024); |
Simon Glass | 39f90ba | 2017-03-31 08:40:25 -0600 | [diff] [blame] | 26 | |
| 27 | return 0; |
Ricardo Ribalda Delgado | f84496a | 2008-09-01 13:09:39 -0400 | [diff] [blame] | 28 | } |
Ricardo Ribalda Delgado | f84496a | 2008-09-01 13:09:39 -0400 | [diff] [blame] | 29 | |
Ricardo Ribalda Delgado | 5db1f9d | 2016-01-26 11:24:21 +0100 | [diff] [blame] | 30 | void get_sys_info(sys_info_t *sys_info) |
Ricardo Ribalda Delgado | f84496a | 2008-09-01 13:09:39 -0400 | [diff] [blame] | 31 | { |
Ricardo Ribalda Delgado | 5db1f9d | 2016-01-26 11:24:21 +0100 | [diff] [blame] | 32 | sys_info->freqProcessor = XPAR_CORE_CLOCK_FREQ_HZ; |
| 33 | sys_info->freqPLB = XPAR_PLB_CLOCK_FREQ_HZ; |
| 34 | sys_info->freqPCI = 0; |
Ricardo Ribalda Delgado | f84496a | 2008-09-01 13:09:39 -0400 | [diff] [blame] | 35 | |
| 36 | return; |
| 37 | } |
Ricardo Ribalda Delgado | 4f40e13 | 2016-01-26 11:24:19 +0100 | [diff] [blame] | 38 | |
| 39 | int get_serial_clock(void){ |
| 40 | return XPAR_UARTNS550_0_CLOCK_FREQ_HZ; |
| 41 | } |
Ricardo Ribalda Delgado | 3f355dd | 2016-01-26 13:47:45 +0100 | [diff] [blame] | 42 | |
| 43 | int board_eth_init(bd_t *bis) |
| 44 | { |
| 45 | int ret = 0; |
| 46 | |
| 47 | puts("Init xilinx temac\n"); |
| 48 | #ifdef XPAR_LLTEMAC_0_BASEADDR |
| 49 | ret |= xilinx_ll_temac_eth_init(bis, XPAR_LLTEMAC_0_BASEADDR, |
| 50 | XILINX_LL_TEMAC_M_SDMA_DCR | XILINX_LL_TEMAC_M_SDMA_PLB, |
| 51 | XPAR_LLTEMAC_0_LLINK_CONNECTED_BASEADDR); |
| 52 | |
| 53 | #endif |
| 54 | |
| 55 | #ifdef XPAR_LLTEMAC_1_BASEADDR |
| 56 | ret |= xilinx_ll_temac_eth_init(bis, XPAR_LLTEMAC_1_BASEADDR, |
| 57 | XILINX_LL_TEMAC_M_SDMA_DCR | XILINX_LL_TEMAC_M_SDMA_PLB, |
| 58 | XPAR_LLTEMAC_1_LLINK_CONNECTED_BASEADDR); |
| 59 | #endif |
| 60 | |
| 61 | return ret; |
| 62 | } |