1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-30 06:51:28 +02:00

powerpc: Move setup_board_extra() into a PPC file

We don't need this PPC-specific function in generic code. Move it to
the powerpc directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
Simon Glass
2017-03-31 08:40:36 -06:00
committed by Tom Rini
parent 056285fd45
commit e5fb573f64
4 changed files with 40 additions and 25 deletions

32
arch/powerpc/lib/setup.c Normal file
View File

@@ -0,0 +1,32 @@
/*
* Copyright (c) 2017 Google, Inc
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <version.h>
DECLARE_GLOBAL_DATA_PTR;
int setup_board_extra(void)
{
bd_t *bd = gd->bd;
strncpy((char *)bd->bi_s_version, "1.2", sizeof(bd->bi_s_version));
strncpy((char *)bd->bi_r_version, U_BOOT_VERSION,
sizeof(bd->bi_r_version));
bd->bi_procfreq = gd->cpu_clk; /* Processor Speed, In Hz */
bd->bi_plb_busfreq = gd->bus_clk;
#if defined(CONFIG_405GP) || defined(CONFIG_405EP) || \
defined(CONFIG_440EP) || defined(CONFIG_440GR) || \
defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
bd->bi_pci_busfreq = get_PCI_freq();
bd->bi_opbfreq = get_OPB_freq();
#elif defined(CONFIG_XILINX_405)
bd->bi_pci_busfreq = get_PCI_freq();
#endif
return 0;
}