summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2017-03-03 13:34:03 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-03-09 07:36:15 +0100
commitda11bd9d6028b811732e98bc8cbf3e00b7a1f2b3 (patch)
treeca93e81132d363be2e77e48de36ea0a026b010c4 /arch/x86
parent8972eb7ff17ad058a6c6018305bb912138ab0ca2 (diff)
downloadbarebox-da11bd9d6028b811732e98bc8cbf3e00b7a1f2b3.tar.gz
efi: move x86 clocksource to device/driver
so we can dynamicly register the device As we may need to use HW IP for clocksource. As on EFI we could use Timestamp GUID if present (Not often the case as it's not even enabled by default on any Target on EDK II not even OVMF) Or if we choose we could use a Simulated Timestamp driver that work on Event (Add Later) Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/Kconfig2
-rw-r--r--arch/x86/mach-efi/Makefile1
-rw-r--r--arch/x86/mach-efi/clocksource.c11
3 files changed, 13 insertions, 1 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 9803f3f..52ccf48 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -77,7 +77,7 @@ choice
select EFI_GUID
select EFI_DEVICEPATH
select PRINTF_UUID
- select CLOCKSOURCE_EFI
+ select CLOCKSOURCE_EFI_X86
config X86_BIOS_BRINGUP
bool "16 bit BIOS"
diff --git a/arch/x86/mach-efi/Makefile b/arch/x86/mach-efi/Makefile
index c8a97ba..f633e7c 100644
--- a/arch/x86/mach-efi/Makefile
+++ b/arch/x86/mach-efi/Makefile
@@ -1,4 +1,5 @@
obj-$(CONFIG_X86_64) += reloc_x86_64.o crt0-efi-x86_64.o
obj-$(CONFIG_X86_32) += reloc_ia32.o crt0-efi-ia32.o
+obj-y += clocksource.o
extra-$(CONFIG_X86_32) += elf_ia32_efi.lds
extra-$(CONFIG_X86_64) += elf_x86_64_efi.lds
diff --git a/arch/x86/mach-efi/clocksource.c b/arch/x86/mach-efi/clocksource.c
new file mode 100644
index 0000000..2023fa1
--- /dev/null
+++ b/arch/x86/mach-efi/clocksource.c
@@ -0,0 +1,11 @@
+#include <common.h>
+#include <init.h>
+#include <driver.h>
+
+static int efi_x86_pure_init(void)
+{
+ struct device_d *dev = device_alloc("efi-cs-x86", DEVICE_ID_SINGLE);
+
+ return platform_device_register(dev);
+}
+core_initcall(efi_x86_pure_init);