1 /* 2 * Copyright (c) 2023, Intel Corporation 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef __SOC_H_ 8 #define __SOC_H_ 9 10 #include <zephyr/sys/util.h> 11 12 #ifndef _ASMLANGUAGE 13 #include <zephyr/device.h> 14 #include <zephyr/random/random.h> 15 16 #ifdef CONFIG_HPET_TIMER 17 #include "sedi_driver_hpet.h" 18 19 #define HPET_USE_CUSTOM_REG_ACCESS_FUNCS 20 21 /* COUNTER_CLK_PERIOD (CLK_PERIOD_REG) is in picoseconds (1e-12 sec) */ 22 #define HPET_COUNTER_CLK_PERIOD (1000000000000ULL) 23 24 #define HPET_CMP_MIN_DELAY (5) 25 26 __pinned_func hpet_timer_comparator_set(uint64_t next)27static inline void hpet_timer_comparator_set(uint64_t next) 28 { 29 sedi_hpet_set_comparator(HPET_0, next); 30 } 31 32 #endif /*CONFIG_HPET_TIMER */ 33 34 #endif /* !_ASMLANGUAGE */ 35 36 /* ISH specific DMA channel direction */ 37 #define IMR_TO_MEMORY (DMA_CHANNEL_DIRECTION_PRIV_START) 38 #define MEMORY_TO_IMR (DMA_CHANNEL_DIRECTION_PRIV_START + 1) 39 40 #endif /* __SOC_H_ */ 41