mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-27 23:20:26 +09:00
x86: apl: Add PCH driver
Add a driver for the Apollo Lake Platform Controller Hub. It does not have any functionality and is just a placeholder for now. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
8bd5dcd895
commit
40fb08e917
@ -7,5 +7,6 @@ obj-$(CONFIG_SPL_BUILD) += systemagent.o
|
||||
obj-y += hostbridge.o
|
||||
obj-y += itss.o
|
||||
obj-y += lpc.o
|
||||
obj-y += pch.o
|
||||
obj-y += pmc.o
|
||||
obj-y += uart.o
|
||||
|
36
arch/x86/cpu/apollolake/pch.c
Normal file
36
arch/x86/cpu/apollolake/pch.c
Normal file
@ -0,0 +1,36 @@
|
||||
// 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(apl_pch) = {
|
||||
.name = "apl_pch",
|
||||
.id = UCLASS_PCH,
|
||||
.of_match = apl_pch_ids,
|
||||
.ops = &apl_pch_ops,
|
||||
};
|
9
arch/x86/include/asm/arch-apollolake/pch.h
Normal file
9
arch/x86/include/asm/arch-apollolake/pch.h
Normal file
@ -0,0 +1,9 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright 2019 Google LLC
|
||||
*/
|
||||
|
||||
#ifndef _ASM_ARCH_PCH_H
|
||||
#define _ASM_ARCH_PCH_H
|
||||
|
||||
#endif /* _ASM_ARCH_PCH_H */
|
Loading…
Reference in New Issue
Block a user