mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 19:25:46 +07:00
1a59d1b8e0
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 59 temple place suite 330 boston ma 02111 1307 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1334 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
65 lines
1.3 KiB
C
65 lines
1.3 KiB
C
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
/*
|
|
* init.c, Common initialization routines for NEC VR4100 series.
|
|
*
|
|
* Copyright (C) 2003-2009 Yoichi Yuasa <yuasa@linux-mips.org>
|
|
*/
|
|
#include <linux/init.h>
|
|
#include <linux/ioport.h>
|
|
#include <linux/irq.h>
|
|
#include <linux/string.h>
|
|
|
|
#include <asm/bootinfo.h>
|
|
#include <asm/time.h>
|
|
#include <asm/vr41xx/irq.h>
|
|
#include <asm/vr41xx/vr41xx.h>
|
|
|
|
#define IO_MEM_RESOURCE_START 0UL
|
|
#define IO_MEM_RESOURCE_END 0x1fffffffUL
|
|
|
|
static void __init iomem_resource_init(void)
|
|
{
|
|
iomem_resource.start = IO_MEM_RESOURCE_START;
|
|
iomem_resource.end = IO_MEM_RESOURCE_END;
|
|
}
|
|
|
|
void __init plat_time_init(void)
|
|
{
|
|
unsigned long tclock;
|
|
|
|
vr41xx_calculate_clock_frequency();
|
|
|
|
tclock = vr41xx_get_tclock_frequency();
|
|
if (current_cpu_data.processor_id == PRID_VR4131_REV2_0 ||
|
|
current_cpu_data.processor_id == PRID_VR4131_REV2_1)
|
|
mips_hpt_frequency = tclock / 2;
|
|
else
|
|
mips_hpt_frequency = tclock / 4;
|
|
}
|
|
|
|
void __init plat_mem_setup(void)
|
|
{
|
|
iomem_resource_init();
|
|
|
|
vr41xx_siu_setup();
|
|
}
|
|
|
|
void __init prom_init(void)
|
|
{
|
|
int argc, i;
|
|
char **argv;
|
|
|
|
argc = fw_arg0;
|
|
argv = (char **)fw_arg1;
|
|
|
|
for (i = 1; i < argc; i++) {
|
|
strlcat(arcs_cmdline, argv[i], COMMAND_LINE_SIZE);
|
|
if (i < (argc - 1))
|
|
strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE);
|
|
}
|
|
}
|
|
|
|
void __init prom_free_prom_memory(void)
|
|
{
|
|
}
|