1/* 2 * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com> 3 * 4 * SPDX-License-Identifier: GPL-2.0+ 5 */ 6 7#include <common.h> 8#include <asm/io.h> 9#include <asm/ioapic.h> 10 11u32 io_apic_read(u32 reg) 12{ 13 writel(reg, IO_APIC_INDEX); 14 return readl(IO_APIC_DATA); 15} 16 17void io_apic_write(u32 reg, u32 val) 18{ 19 writel(reg, IO_APIC_INDEX); 20 writel(val, IO_APIC_DATA); 21} 22