arm: detect SoC timer from FDT for OMAP3 and PXA

Change-Id: Ib03a11f016cb937d748d2696a17158e17c86e317
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5522
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: David Karoly <[email protected]>
This commit is contained in:
David Karoly
2022-08-09 18:15:55 +00:00
parent 0404f954c1
commit fe2b6d7706
10 changed files with 97 additions and 55 deletions
@@ -12,6 +12,7 @@
#include <util/FixedWidthPointer.h>
#include <boot/interrupt_controller.h>
#include <boot/timer.h>
#include <boot/uart.h>
@@ -42,8 +43,9 @@ typedef struct {
FixedWidthPointer<void> acpi_root;
FixedWidthPointer<void> fdt;
uart_info uart;
intc_info interrupt_controller;
uart_info uart;
intc_info interrupt_controller;
boot_timer_info timer;
} _PACKED arch_kernel_args;
#endif /* KERNEL_ARCH_ARM_KERNEL_ARGS_H */
+25
View File
@@ -0,0 +1,25 @@
/*
* Copyright 2022 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef KERNEL_BOOT_TIMER_H
#define KERNEL_BOOT_TIMER_H
#include <boot/addr_range.h>
#include <SupportDefs.h>
#define TIMER_KIND_ARMV7 "armv7"
#define TIMER_KIND_OMAP3 "omap3"
#define TIMER_KIND_PXA "pxa"
typedef struct {
char kind[32];
addr_range regs;
uint32_t interrupt;
} __attribute__((packed)) boot_timer_info;
#endif /* KERNEL_BOOT_TIMER_H */