|
| 1 | +/* Copyright 2017 IBM Corp. |
| 2 | + * |
| 3 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | + * you may not use this file except in compliance with the License. |
| 5 | + * You may obtain a copy of the License at |
| 6 | + * |
| 7 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | + * |
| 9 | + * Unless required by applicable law or agreed to in writing, software |
| 10 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 12 | + * implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +#include <skiboot.h> |
| 18 | +#include <device.h> |
| 19 | +#include <console.h> |
| 20 | +#include <chip.h> |
| 21 | +#include <ipmi.h> |
| 22 | +#include <psi.h> |
| 23 | +#include <npu-regs.h> |
| 24 | + |
| 25 | +#include "astbmc.h" |
| 26 | + |
| 27 | +static bool romulus_probe(void) |
| 28 | +{ |
| 29 | + if (!dt_node_is_compatible(dt_root, "ibm,romulus")) |
| 30 | + return false; |
| 31 | + |
| 32 | + /* Lot of common early inits here */ |
| 33 | + astbmc_early_init(); |
| 34 | + |
| 35 | + /* Setup UART for use by OPAL (Linux hvc) */ |
| 36 | + uart_set_console_policy(UART_CONSOLE_OPAL); |
| 37 | + |
| 38 | + return true; |
| 39 | +} |
| 40 | + |
| 41 | +DECLARE_PLATFORM(romulus_platform) = { |
| 42 | + .name = "Romulus", |
| 43 | + .probe = romulus_probe, |
| 44 | + .init = astbmc_init, |
| 45 | + .start_preload_resource = flash_start_preload_resource, |
| 46 | + .resource_loaded = flash_resource_loaded, |
| 47 | + .bmc = NULL, /* FIXME: Add openBMC */ |
| 48 | + .pci_get_slot_info = slot_table_get_slot_info, |
| 49 | + .pci_probe_complete = check_all_slot_table, |
| 50 | + .cec_power_down = astbmc_ipmi_power_down, |
| 51 | + .cec_reboot = astbmc_ipmi_reboot, |
| 52 | + .elog_commit = ipmi_elog_commit, |
| 53 | + .exit = ipmi_wdt_final_reset, |
| 54 | + .terminate = ipmi_terminate, |
| 55 | +}; |
0 commit comments