aboutsummaryrefslogtreecommitdiff
path: root/platforms/astbmc/swift.c
blob: 401aa6b2283645060f1ef2a0ed870ca5f668bffb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
/*
 * Copyright 2019 IBM Corp.
 */

#include <skiboot.h>
#include <ipmi.h>
#include "astbmc.h"
#include <device.h>

static bool swift_probe(void)
{
	if (!dt_node_is_compatible(dt_root, "ibm,swift"))
		return false;

	/* Lot of common early inits here */
	astbmc_early_init();

	/* Setup UART for use by OPAL (Linux hvc) */
	uart_set_console_policy(UART_CONSOLE_OPAL);

	return true;
}

DECLARE_PLATFORM(swift) = {
	.bmc			= &bmc_plat_ast2500_openbmc,
	.cec_power_down		= astbmc_ipmi_power_down,
	.cec_reboot		= astbmc_ipmi_reboot,
	.elog_commit		= ipmi_elog_commit,
	.exit			= astbmc_exit,
	.init			= astbmc_init,
	.name			= "Swift",
	.pci_get_slot_info	= dt_slot_get_slot_info,
	.probe			= swift_probe,
	.resource_loaded	= flash_resource_loaded,
	.start_preload_resource	= flash_start_preload_resource,
	.terminate		= ipmi_terminate,
};