2021-06-18 11:43:41 +08:00
|
|
|
/*
|
|
|
|
* Microwatt FPGA-based SoC platform setup code.
|
|
|
|
*
|
|
|
|
* Copyright 2020 Paul Mackerras (paulus@ozlabs.org), IBM Corp.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/stddef.h>
|
|
|
|
#include <linux/init.h>
|
2021-06-18 11:45:11 +08:00
|
|
|
#include <linux/of.h>
|
|
|
|
#include <linux/of_platform.h>
|
2021-06-18 11:45:53 +08:00
|
|
|
|
2021-06-18 11:43:41 +08:00
|
|
|
#include <asm/machdep.h>
|
|
|
|
#include <asm/time.h>
|
2021-06-18 11:45:53 +08:00
|
|
|
#include <asm/xics.h>
|
2021-06-18 11:46:32 +08:00
|
|
|
#include <asm/udbg.h>
|
2021-06-18 11:45:53 +08:00
|
|
|
|
2022-06-11 23:10:13 +08:00
|
|
|
#include "microwatt.h"
|
|
|
|
|
2021-06-18 11:45:53 +08:00
|
|
|
static void __init microwatt_init_IRQ(void)
|
|
|
|
{
|
|
|
|
xics_init();
|
|
|
|
}
|
2021-06-18 11:43:41 +08:00
|
|
|
|
2021-06-18 11:45:11 +08:00
|
|
|
static int __init microwatt_populate(void)
|
|
|
|
{
|
|
|
|
return of_platform_default_populate(NULL, NULL, NULL);
|
|
|
|
}
|
|
|
|
machine_arch_initcall(microwatt, microwatt_populate);
|
|
|
|
|
2022-06-11 23:10:13 +08:00
|
|
|
static void __init microwatt_setup_arch(void)
|
|
|
|
{
|
|
|
|
microwatt_rng_init();
|
|
|
|
}
|
|
|
|
|
2021-06-18 11:43:41 +08:00
|
|
|
define_machine(microwatt) {
|
|
|
|
.name = "microwatt",
|
2023-02-18 17:15:46 +08:00
|
|
|
.compatible = "microwatt-soc",
|
2021-06-18 11:45:53 +08:00
|
|
|
.init_IRQ = microwatt_init_IRQ,
|
2022-06-11 23:10:13 +08:00
|
|
|
.setup_arch = microwatt_setup_arch,
|
2021-06-18 11:46:32 +08:00
|
|
|
.progress = udbg_progress,
|
2021-06-18 11:43:41 +08:00
|
|
|
};
|