2016-03-05 06:41:13 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2015 Intel Corp.
|
|
|
|
* (Written by Alexandru Gagniuc <alexandrux.gagniuc@intel.com> for Intel Corp.)
|
|
|
|
* (Written by Andrey Petrov <andrey.petrov@intel.com> for Intel Corp.)
|
|
|
|
*
|
|
|
|
* 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.
|
2016-04-10 19:09:16 +02:00
|
|
|
*
|
|
|
|
* 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.
|
2016-03-05 06:41:13 +01:00
|
|
|
*/
|
|
|
|
|
2016-04-18 22:47:08 +02:00
|
|
|
#include <arch/acpi.h>
|
2016-03-05 06:41:13 +01:00
|
|
|
#include <bootstate.h>
|
2016-04-20 03:04:21 +02:00
|
|
|
#include <cbmem.h>
|
2016-03-05 06:41:13 +01:00
|
|
|
#include <console/console.h>
|
|
|
|
#include <cpu/cpu.h>
|
|
|
|
#include <device/device.h>
|
|
|
|
#include <device/pci.h>
|
|
|
|
#include <fsp/api.h>
|
|
|
|
#include <fsp/util.h>
|
|
|
|
#include <memrange.h>
|
2016-03-18 22:43:00 +01:00
|
|
|
#include <soc/iomap.h>
|
2016-03-05 06:41:13 +01:00
|
|
|
#include <soc/cpu.h>
|
2016-05-13 04:11:48 +02:00
|
|
|
#include <soc/intel/common/vbt.h>
|
2016-07-13 08:49:10 +02:00
|
|
|
#include <soc/itss.h>
|
2016-04-20 03:04:21 +02:00
|
|
|
#include <soc/nvs.h>
|
2016-03-05 06:41:13 +01:00
|
|
|
#include <soc/pci_devs.h>
|
2016-06-16 02:13:20 +02:00
|
|
|
#include <spi-generic.h>
|
2016-06-15 07:20:28 +02:00
|
|
|
#include <soc/pm.h>
|
2016-07-01 23:36:03 +02:00
|
|
|
#include <soc/p2sb.h>
|
2016-03-05 06:41:13 +01:00
|
|
|
|
|
|
|
#include "chip.h"
|
|
|
|
|
2016-05-13 04:11:48 +02:00
|
|
|
static void *vbt;
|
|
|
|
static struct region_device vbt_rdev;
|
|
|
|
|
2016-06-27 19:51:17 +02:00
|
|
|
static const char *soc_acpi_name(struct device *dev)
|
|
|
|
{
|
|
|
|
if (dev->path.type == DEVICE_PATH_DOMAIN)
|
|
|
|
return "PCI0";
|
|
|
|
|
|
|
|
if (dev->path.type != DEVICE_PATH_PCI)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
switch (dev->path.pci.devfn) {
|
|
|
|
/* DSDT: acpi/northbridge.asl */
|
|
|
|
case NB_DEVFN:
|
|
|
|
return "MCHC";
|
|
|
|
/* DSDT: acpi/lpc.asl */
|
|
|
|
case LPC_DEVFN:
|
|
|
|
return "LPCB";
|
|
|
|
/* DSDT: acpi/xhci.asl */
|
|
|
|
case XHCI_DEVFN:
|
|
|
|
return "XHCI";
|
|
|
|
/* DSDT: acpi/pch_hda.asl */
|
|
|
|
case HDA_DEVFN:
|
|
|
|
return "HDAS";
|
|
|
|
/* DSDT: acpi/lpss.asl */
|
|
|
|
case LPSS_DEVFN_UART0:
|
|
|
|
return "URT1";
|
|
|
|
case LPSS_DEVFN_UART1:
|
|
|
|
return "URT2";
|
|
|
|
case LPSS_DEVFN_UART2:
|
|
|
|
return "URT3";
|
|
|
|
case LPSS_DEVFN_UART3:
|
|
|
|
return "URT4";
|
|
|
|
case LPSS_DEVFN_SPI0:
|
|
|
|
return "SPI1";
|
|
|
|
case LPSS_DEVFN_SPI1:
|
|
|
|
return "SPI2";
|
|
|
|
case LPSS_DEVFN_SPI2:
|
|
|
|
return "SPI3";
|
|
|
|
case LPSS_DEVFN_PWM:
|
|
|
|
return "PWM";
|
|
|
|
case LPSS_DEVFN_I2C0:
|
|
|
|
return "I2C0";
|
|
|
|
case LPSS_DEVFN_I2C1:
|
|
|
|
return "I2C1";
|
|
|
|
case LPSS_DEVFN_I2C2:
|
|
|
|
return "I2C2";
|
|
|
|
case LPSS_DEVFN_I2C3:
|
|
|
|
return "I2C3";
|
|
|
|
case LPSS_DEVFN_I2C4:
|
|
|
|
return "I2C4";
|
|
|
|
case LPSS_DEVFN_I2C5:
|
|
|
|
return "I2C5";
|
|
|
|
case LPSS_DEVFN_I2C6:
|
|
|
|
return "I2C6";
|
|
|
|
case LPSS_DEVFN_I2C7:
|
|
|
|
return "I2C7";
|
|
|
|
/* Storage */
|
|
|
|
case SDCARD_DEVFN:
|
|
|
|
return "SDCD";
|
|
|
|
case EMMC_DEVFN:
|
|
|
|
return "EMMC";
|
|
|
|
case SDIO_DEVFN:
|
|
|
|
return "SDIO";
|
|
|
|
}
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2016-03-05 06:41:13 +01:00
|
|
|
static void pci_domain_set_resources(device_t dev)
|
|
|
|
{
|
|
|
|
assign_resources(dev->link_list);
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct device_operations pci_domain_ops = {
|
|
|
|
.read_resources = pci_domain_read_resources,
|
|
|
|
.set_resources = pci_domain_set_resources,
|
|
|
|
.enable_resources = NULL,
|
|
|
|
.init = NULL,
|
|
|
|
.scan_bus = pci_domain_scan_bus,
|
|
|
|
.ops_pci_bus = pci_bus_default_ops,
|
2016-06-27 19:51:17 +02:00
|
|
|
.acpi_name = &soc_acpi_name,
|
2016-03-05 06:41:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
static struct device_operations cpu_bus_ops = {
|
|
|
|
.read_resources = DEVICE_NOOP,
|
|
|
|
.set_resources = DEVICE_NOOP,
|
|
|
|
.enable_resources = DEVICE_NOOP,
|
|
|
|
.init = apollolake_init_cpus,
|
|
|
|
.scan_bus = NULL,
|
2016-04-18 22:47:08 +02:00
|
|
|
.acpi_fill_ssdt_generator = generate_cpu_entries,
|
2016-03-05 06:41:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
static void enable_dev(device_t dev)
|
|
|
|
{
|
|
|
|
/* Set the operations if it is a special bus type */
|
|
|
|
if (dev->path.type == DEVICE_PATH_DOMAIN) {
|
|
|
|
dev->ops = &pci_domain_ops;
|
|
|
|
} else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) {
|
|
|
|
dev->ops = &cpu_bus_ops;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void soc_init(void *data)
|
|
|
|
{
|
|
|
|
struct range_entry range;
|
2016-04-20 03:04:21 +02:00
|
|
|
struct global_nvs_t *gnvs;
|
2016-03-05 06:41:13 +01:00
|
|
|
|
2016-05-13 04:11:48 +02:00
|
|
|
/* Save VBT info and mapping */
|
|
|
|
if (locate_vbt(&vbt_rdev) != CB_ERR)
|
|
|
|
vbt = rdev_mmap_full(&vbt_rdev);
|
|
|
|
|
2016-07-13 08:49:10 +02:00
|
|
|
/* Snapshot the current GPIO IRQ polarities. FSP is setting a
|
|
|
|
* default policy that doesn't honor boards' requirements. */
|
|
|
|
itss_snapshot_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END);
|
|
|
|
|
2016-03-05 06:41:13 +01:00
|
|
|
/* TODO: tigten this resource range */
|
|
|
|
/* TODO: fix for S3 resume, as this would corrupt OS memory */
|
|
|
|
range_entry_init(&range, 0x200000, 4ULL*GiB, 0);
|
|
|
|
fsp_silicon_init(&range);
|
2016-04-20 03:04:21 +02:00
|
|
|
|
2016-07-13 08:49:10 +02:00
|
|
|
/* Restore GPIO IRQ polarities back to previous settings. */
|
|
|
|
itss_restore_irq_polarities(GPIO_IRQ_START, GPIO_IRQ_END);
|
|
|
|
|
2016-07-01 23:36:03 +02:00
|
|
|
/*
|
|
|
|
* Keep the P2SB device visible so it and the other devices are
|
|
|
|
* visible in coreboot for driver support and PCI resource allocation.
|
|
|
|
* There is a UPD setting for this, but it's more consistent to use
|
|
|
|
* hide and unhide symmetrically.
|
|
|
|
*/
|
|
|
|
p2sb_unhide();
|
|
|
|
|
2016-04-20 03:04:21 +02:00
|
|
|
/* Allocate ACPI NVS in CBMEM */
|
|
|
|
gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
|
2016-03-05 06:41:13 +01:00
|
|
|
}
|
|
|
|
|
2016-05-13 04:11:48 +02:00
|
|
|
static void soc_final(void *data)
|
|
|
|
{
|
|
|
|
if (vbt)
|
|
|
|
rdev_munmap(&vbt_rdev, vbt);
|
2016-06-15 07:20:28 +02:00
|
|
|
|
|
|
|
/* Disable global reset, just in case */
|
|
|
|
global_reset_enable(0);
|
|
|
|
/* Make sure payload/OS can't trigger global reset */
|
|
|
|
global_reset_lock();
|
2016-05-13 04:11:48 +02:00
|
|
|
}
|
|
|
|
|
2016-06-23 03:32:17 +02:00
|
|
|
static void disable_dev(struct device *dev, struct FSP_S_CONFIG *silconfig) {
|
|
|
|
|
|
|
|
switch (dev->path.pci.devfn) {
|
|
|
|
case ISH_DEVFN:
|
|
|
|
silconfig->IshEnable = 0;
|
|
|
|
break;
|
|
|
|
case SATA_DEVFN:
|
|
|
|
silconfig->EnableSata = 0;
|
|
|
|
break;
|
|
|
|
case PCIEA0_DEVFN:
|
|
|
|
silconfig->PcieRootPortEn[0] = 0;
|
|
|
|
break;
|
|
|
|
case PCIEA1_DEVFN:
|
|
|
|
silconfig->PcieRootPortEn[1] = 0;
|
|
|
|
break;
|
|
|
|
case PCIEA2_DEVFN:
|
|
|
|
silconfig->PcieRootPortEn[2] = 0;
|
|
|
|
break;
|
|
|
|
case PCIEA3_DEVFN:
|
|
|
|
silconfig->PcieRootPortEn[3] = 0;
|
|
|
|
break;
|
|
|
|
case PCIEB0_DEVFN:
|
|
|
|
silconfig->PcieRootPortEn[4] = 0;
|
|
|
|
break;
|
|
|
|
case PCIEB1_DEVFN:
|
|
|
|
silconfig->PcieRootPortEn[5] = 0;
|
|
|
|
break;
|
|
|
|
case XHCI_DEVFN:
|
|
|
|
silconfig->Usb30Mode = 0;
|
|
|
|
break;
|
|
|
|
case XDCI_DEVFN:
|
|
|
|
silconfig->UsbOtg = 0;
|
|
|
|
break;
|
2016-06-28 21:14:33 +02:00
|
|
|
case LPSS_DEVFN_I2C0:
|
2016-06-23 03:32:17 +02:00
|
|
|
silconfig->I2c0Enable = 0;
|
|
|
|
break;
|
2016-06-28 21:14:33 +02:00
|
|
|
case LPSS_DEVFN_I2C1:
|
2016-06-23 03:32:17 +02:00
|
|
|
silconfig->I2c1Enable = 0;
|
|
|
|
break;
|
2016-06-28 21:14:33 +02:00
|
|
|
case LPSS_DEVFN_I2C2:
|
2016-06-23 03:32:17 +02:00
|
|
|
silconfig->I2c2Enable = 0;
|
|
|
|
break;
|
2016-06-28 21:14:33 +02:00
|
|
|
case LPSS_DEVFN_I2C3:
|
2016-06-23 03:32:17 +02:00
|
|
|
silconfig->I2c3Enable = 0;
|
|
|
|
break;
|
2016-06-28 21:14:33 +02:00
|
|
|
case LPSS_DEVFN_I2C4:
|
2016-06-23 03:32:17 +02:00
|
|
|
silconfig->I2c4Enable = 0;
|
|
|
|
break;
|
2016-06-28 21:14:33 +02:00
|
|
|
case LPSS_DEVFN_I2C5:
|
2016-06-23 03:32:17 +02:00
|
|
|
silconfig->I2c5Enable = 0;
|
|
|
|
break;
|
2016-06-28 21:14:33 +02:00
|
|
|
case LPSS_DEVFN_I2C6:
|
2016-06-23 03:32:17 +02:00
|
|
|
silconfig->I2c6Enable = 0;
|
|
|
|
break;
|
2016-06-28 21:14:33 +02:00
|
|
|
case LPSS_DEVFN_I2C7:
|
2016-06-23 03:32:17 +02:00
|
|
|
silconfig->I2c7Enable = 0;
|
|
|
|
break;
|
2016-06-28 21:14:33 +02:00
|
|
|
case LPSS_DEVFN_UART0:
|
2016-06-23 03:32:17 +02:00
|
|
|
silconfig->Hsuart0Enable = 0;
|
|
|
|
break;
|
2016-06-28 21:14:33 +02:00
|
|
|
case LPSS_DEVFN_UART1:
|
2016-06-23 03:32:17 +02:00
|
|
|
silconfig->Hsuart1Enable = 0;
|
|
|
|
break;
|
2016-06-28 21:14:33 +02:00
|
|
|
case LPSS_DEVFN_UART2:
|
2016-06-23 03:32:17 +02:00
|
|
|
silconfig->Hsuart2Enable = 0;
|
|
|
|
break;
|
2016-06-28 21:14:33 +02:00
|
|
|
case LPSS_DEVFN_UART3:
|
2016-06-23 03:32:17 +02:00
|
|
|
silconfig->Hsuart3Enable = 0;
|
|
|
|
break;
|
2016-06-28 21:14:33 +02:00
|
|
|
case LPSS_DEVFN_SPI0:
|
2016-06-23 03:32:17 +02:00
|
|
|
silconfig->Spi0Enable = 0;
|
|
|
|
break;
|
2016-06-28 21:14:33 +02:00
|
|
|
case LPSS_DEVFN_SPI1:
|
2016-06-23 03:32:17 +02:00
|
|
|
silconfig->Spi1Enable = 0;
|
|
|
|
break;
|
2016-06-28 21:14:33 +02:00
|
|
|
case LPSS_DEVFN_SPI2:
|
2016-06-23 03:32:17 +02:00
|
|
|
silconfig->Spi2Enable = 0;
|
|
|
|
break;
|
|
|
|
case SDCARD_DEVFN:
|
|
|
|
silconfig->SdcardEnabled = 0;
|
|
|
|
break;
|
|
|
|
case EMMC_DEVFN:
|
|
|
|
silconfig->eMMCEnabled = 0;
|
|
|
|
break;
|
|
|
|
case SDIO_DEVFN:
|
|
|
|
silconfig->SdioEnabled = 0;
|
|
|
|
break;
|
|
|
|
case SMBUS_DEVFN:
|
|
|
|
silconfig->SmbusEnable = 0;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
printk(BIOS_WARNING, "PCI:%02x.%01x: Could not disable the device\n",
|
|
|
|
PCI_SLOT(dev->path.pci.devfn),
|
|
|
|
PCI_FUNC(dev->path.pci.devfn));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void parse_devicetree(struct FSP_S_CONFIG *silconfig)
|
|
|
|
{
|
2016-06-28 21:14:33 +02:00
|
|
|
struct device *dev = NB_DEV_ROOT;
|
2016-06-23 03:32:17 +02:00
|
|
|
|
|
|
|
if (!dev) {
|
|
|
|
printk(BIOS_ERR, "Could not find root device\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
/* Only disable bus 0 devices. */
|
|
|
|
for (dev = dev->bus->children; dev; dev = dev->sibling) {
|
|
|
|
if (!dev->enabled)
|
|
|
|
disable_dev(dev, silconfig);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-03-05 06:41:13 +01:00
|
|
|
void platform_fsp_silicon_init_params_cb(struct FSPS_UPD *silupd)
|
|
|
|
{
|
|
|
|
struct FSP_S_CONFIG *silconfig = &silupd->FspsConfig;
|
|
|
|
static struct soc_intel_apollolake_config *cfg;
|
|
|
|
|
|
|
|
/* Load VBT before devicetree-specific config. */
|
2016-05-13 04:11:48 +02:00
|
|
|
silconfig->GraphicsConfigPtr = (uintptr_t)vbt;
|
2016-03-05 06:41:13 +01:00
|
|
|
|
2016-06-28 21:14:33 +02:00
|
|
|
struct device *dev = NB_DEV_ROOT;
|
|
|
|
|
2016-04-14 11:53:48 +02:00
|
|
|
if (!dev || !dev->chip_info) {
|
2016-03-05 06:41:13 +01:00
|
|
|
printk(BIOS_ERR, "BUG! Could not find SOC devicetree config\n");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
cfg = dev->chip_info;
|
|
|
|
|
2016-06-23 03:32:17 +02:00
|
|
|
/* Parse device tree and disable unused device*/
|
|
|
|
parse_devicetree(silconfig);
|
|
|
|
|
2016-03-05 06:41:13 +01:00
|
|
|
silconfig->PcieRpClkReqNumber[0] = cfg->pcie_rp0_clkreq_pin;
|
|
|
|
silconfig->PcieRpClkReqNumber[1] = cfg->pcie_rp1_clkreq_pin;
|
|
|
|
silconfig->PcieRpClkReqNumber[2] = cfg->pcie_rp2_clkreq_pin;
|
|
|
|
silconfig->PcieRpClkReqNumber[3] = cfg->pcie_rp3_clkreq_pin;
|
|
|
|
silconfig->PcieRpClkReqNumber[4] = cfg->pcie_rp4_clkreq_pin;
|
|
|
|
silconfig->PcieRpClkReqNumber[5] = cfg->pcie_rp5_clkreq_pin;
|
2016-03-18 22:43:00 +01:00
|
|
|
|
2016-05-18 04:01:34 +02:00
|
|
|
if (cfg->emmc_tx_cmd_cntl != 0)
|
|
|
|
silconfig->EmmcTxCmdCntl = cfg->emmc_tx_cmd_cntl;
|
|
|
|
if (cfg->emmc_tx_data_cntl1 != 0)
|
|
|
|
silconfig->EmmcTxDataCntl1 = cfg->emmc_tx_data_cntl1;
|
|
|
|
if (cfg->emmc_tx_data_cntl2 != 0)
|
|
|
|
silconfig->EmmcTxDataCntl2 = cfg->emmc_tx_data_cntl2;
|
|
|
|
if (cfg->emmc_rx_cmd_data_cntl1 != 0)
|
|
|
|
silconfig->EmmcRxCmdDataCntl1 = cfg->emmc_rx_cmd_data_cntl1;
|
|
|
|
if (cfg->emmc_rx_strobe_cntl != 0)
|
|
|
|
silconfig->EmmcRxStrobeCntl = cfg->emmc_rx_strobe_cntl;
|
|
|
|
if (cfg->emmc_rx_cmd_data_cntl2 != 0)
|
|
|
|
silconfig->EmmcRxCmdDataCntl2 = cfg->emmc_rx_cmd_data_cntl2;
|
|
|
|
|
2016-03-28 23:45:59 +02:00
|
|
|
silconfig->IshEnable = cfg->integrated_sensor_hub_enable;
|
2016-06-21 01:08:42 +02:00
|
|
|
|
2016-05-04 00:15:31 +02:00
|
|
|
silconfig->LPSS_S0ixEnable = cfg->lpss_s0ix_enable;
|
|
|
|
|
2016-06-21 01:08:42 +02:00
|
|
|
/* Disable setting of EISS bit in FSP. */
|
|
|
|
silconfig->SpiEiss = 0;
|
2016-03-05 06:41:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
struct chip_operations soc_intel_apollolake_ops = {
|
|
|
|
CHIP_NAME("Intel Apollolake SOC")
|
|
|
|
.enable_dev = &enable_dev,
|
2016-05-13 04:11:48 +02:00
|
|
|
.init = &soc_init,
|
|
|
|
.final = &soc_final
|
2016-03-05 06:41:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
static void fsp_notify_dummy(void *arg)
|
|
|
|
{
|
|
|
|
|
|
|
|
enum fsp_notify_phase ph = (enum fsp_notify_phase) arg;
|
2016-06-23 04:32:51 +02:00
|
|
|
enum fsp_status ret;
|
2016-03-05 06:41:13 +01:00
|
|
|
|
2016-06-23 04:32:51 +02:00
|
|
|
if ((ret = fsp_notify(ph)) != FSP_SUCCESS) {
|
|
|
|
printk(BIOS_CRIT, "FspNotify failed, ret = %x!\n", ret);
|
|
|
|
if (fsp_reset_requested(ret))
|
|
|
|
fsp_handle_reset(ret);
|
|
|
|
}
|
2016-04-29 23:48:20 +02:00
|
|
|
/* Call END_OF_FIRMWARE Notify after READY_TO_BOOT Notify */
|
2016-07-01 23:36:03 +02:00
|
|
|
if (ph == READY_TO_BOOT) {
|
2016-04-29 23:48:20 +02:00
|
|
|
fsp_notify_dummy((void *)END_OF_FIRMWARE);
|
2016-07-01 23:36:03 +02:00
|
|
|
/* Hide the P2SB device to align with previous behavior. */
|
|
|
|
p2sb_hide();
|
|
|
|
}
|
2016-03-05 06:41:13 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
BOOT_STATE_INIT_ENTRY(BS_DEV_RESOURCES, BS_ON_EXIT, fsp_notify_dummy,
|
|
|
|
(void *) AFTER_PCI_ENUM);
|
|
|
|
BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_LOAD, BS_ON_EXIT, fsp_notify_dummy,
|
|
|
|
(void *) READY_TO_BOOT);
|
|
|
|
BOOT_STATE_INIT_ENTRY(BS_OS_RESUME, BS_ON_ENTRY, fsp_notify_dummy,
|
|
|
|
(void *) READY_TO_BOOT);
|
2016-06-16 02:13:20 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* spi_init() needs to run unconditionally on every boot (including resume) to
|
|
|
|
* allow write protect to be disabled for eventlog and nvram updates. This needs
|
|
|
|
* to be done as early as possible in ramstage. Thus, add a callback for entry
|
|
|
|
* into BS_PRE_DEVICE.
|
|
|
|
*/
|
|
|
|
static void spi_init_cb(void *unused)
|
|
|
|
{
|
|
|
|
spi_init();
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOT_STATE_INIT_ENTRY(BS_PRE_DEVICE, BS_ON_ENTRY, spi_init_cb, NULL);
|