mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-08 05:43:21 +09:00
![Simon Glass](/assets/img/avatar_default.png)
At present there are a lot of dtoc warnings reported when building chromebook_coral, of the form: WARNING: the driver intel_apl_lpc was not found in the driver list Correct these by using driver names that matches their compatible string. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
37 lines
680 B
C
37 lines
680 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Copyright 2019 Google LLC
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <dm.h>
|
|
#include <pch.h>
|
|
#include <spl.h>
|
|
#include <asm/lpc_common.h>
|
|
|
|
#define BIOS_CTRL 0xdc
|
|
|
|
static int apl_set_spi_protect(struct udevice *dev, bool protect)
|
|
{
|
|
if (spl_phase() == PHASE_SPL)
|
|
return lpc_set_spi_protect(dev, BIOS_CTRL, protect);
|
|
|
|
return 0;
|
|
}
|
|
|
|
static const struct pch_ops apl_pch_ops = {
|
|
.set_spi_protect = apl_set_spi_protect,
|
|
};
|
|
|
|
static const struct udevice_id apl_pch_ids[] = {
|
|
{ .compatible = "intel,apl-pch" },
|
|
{ }
|
|
};
|
|
|
|
U_BOOT_DRIVER(intel_apl_pch) = {
|
|
.name = "intel_apl_pch",
|
|
.id = UCLASS_PCH,
|
|
.of_match = apl_pch_ids,
|
|
.ops = &apl_pch_ops,
|
|
};
|