cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

setup.c (1015B)


      1/*
      2 * Microwatt FPGA-based SoC platform setup code.
      3 *
      4 * Copyright 2020 Paul Mackerras (paulus@ozlabs.org), IBM Corp.
      5 */
      6
      7#include <linux/types.h>
      8#include <linux/kernel.h>
      9#include <linux/stddef.h>
     10#include <linux/init.h>
     11#include <linux/of.h>
     12#include <linux/of_platform.h>
     13
     14#include <asm/machdep.h>
     15#include <asm/time.h>
     16#include <asm/xics.h>
     17#include <asm/udbg.h>
     18
     19#include "microwatt.h"
     20
     21static void __init microwatt_init_IRQ(void)
     22{
     23	xics_init();
     24}
     25
     26static int __init microwatt_probe(void)
     27{
     28	return of_machine_is_compatible("microwatt-soc");
     29}
     30
     31static int __init microwatt_populate(void)
     32{
     33	return of_platform_default_populate(NULL, NULL, NULL);
     34}
     35machine_arch_initcall(microwatt, microwatt_populate);
     36
     37static void __init microwatt_setup_arch(void)
     38{
     39	microwatt_rng_init();
     40}
     41
     42define_machine(microwatt) {
     43	.name			= "microwatt",
     44	.probe			= microwatt_probe,
     45	.init_IRQ		= microwatt_init_IRQ,
     46	.setup_arch		= microwatt_setup_arch,
     47	.progress		= udbg_progress,
     48	.calibrate_decr		= generic_calibrate_decr,
     49};