Simon Glass | bbf26ab | 2017-03-31 08:40:36 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017 Google, Inc |
| 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0+ |
| 5 | */ |
| 6 | |
| 7 | #include <common.h> |
| 8 | #include <version.h> |
| 9 | |
| 10 | DECLARE_GLOBAL_DATA_PTR; |
| 11 | |
| 12 | int setup_board_extra(void) |
| 13 | { |
| 14 | bd_t *bd = gd->bd; |
| 15 | |
| 16 | strncpy((char *)bd->bi_s_version, "1.2", sizeof(bd->bi_s_version)); |
| 17 | strncpy((char *)bd->bi_r_version, U_BOOT_VERSION, |
| 18 | sizeof(bd->bi_r_version)); |
| 19 | |
| 20 | bd->bi_procfreq = gd->cpu_clk; /* Processor Speed, In Hz */ |
| 21 | bd->bi_plb_busfreq = gd->bus_clk; |
| 22 | #if defined(CONFIG_405GP) || defined(CONFIG_405EP) || \ |
| 23 | defined(CONFIG_440EP) || defined(CONFIG_440GR) || \ |
| 24 | defined(CONFIG_440EPX) || defined(CONFIG_440GRX) |
| 25 | bd->bi_pci_busfreq = get_PCI_freq(); |
| 26 | bd->bi_opbfreq = get_OPB_freq(); |
| 27 | #elif defined(CONFIG_XILINX_405) |
| 28 | bd->bi_pci_busfreq = get_PCI_freq(); |
| 29 | #endif |
| 30 | |
| 31 | return 0; |
| 32 | } |