From fc00c656c96528112d05cf0edf8631bd5eaea446 Mon Sep 17 00:00:00 2001 From: Kacper Date: Sun, 7 Dec 2025 20:10:31 +0100 Subject: Add build system scaffolding and libc headers --- .../x86_64/linux/counter/microchip-tcb-capture.h | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 include/arch/x86_64/linux/counter/microchip-tcb-capture.h (limited to 'include/arch/x86_64/linux/counter') diff --git a/include/arch/x86_64/linux/counter/microchip-tcb-capture.h b/include/arch/x86_64/linux/counter/microchip-tcb-capture.h new file mode 100644 index 00000000..3bf528c3 --- /dev/null +++ b/include/arch/x86_64/linux/counter/microchip-tcb-capture.h @@ -0,0 +1,40 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * Channel numbers used by the microchip-tcb-capture driver + * Copyright (C) 2025 Bence Csókás + */ +#ifndef _COUNTER_MCHP_TCB_H_ +#define _COUNTER_MCHP_TCB_H_ + +/* + * The driver defines the following components: + * + * Count 0 + * \__ Synapse 0 -- Signal 0 (Channel A, i.e. TIOA) + * \__ Synapse 1 -- Signal 1 (Channel B, i.e. TIOB) + * \__ Extension capture0 (RA register) + * \__ Extension capture1 (RB register) + * + * It also supports the following events: + * + * Channel 0: + * - CV register changed + * - CV overflowed + * - RA captured + * Channel 1: + * - RB captured + * Channel 2: + * - RC compare triggered + */ + +/* Capture extensions */ +#define COUNTER_MCHP_EXCAP_RA 0 +#define COUNTER_MCHP_EXCAP_RB 1 + +/* Event channels */ +#define COUNTER_MCHP_EVCHN_CV 0 +#define COUNTER_MCHP_EVCHN_RA 0 +#define COUNTER_MCHP_EVCHN_RB 1 +#define COUNTER_MCHP_EVCHN_RC 2 + +#endif /* _COUNTER_MCHP_TCB_H_ */ -- cgit v1.2.3