blob: 29417934ee9a1e3a91fc81eae877382dc02fad0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Support for Digigram AlpX PCI-e boards
*
* Copyright (c) 2024 Digigram Digital (info@digigram.com)
*/
#include <linux/version.h>
#include <linux/module.h>
/* Defined an exported symbol to allow dependency use */
const char* SND_ALPX_XDMA_DEP(void)
{
return "snd_alpx_xdma support";
}
EXPORT_SYMBOL(SND_ALPX_XDMA_DEP);
/*
* Use the in-kernel driver if enabled and recent enough. Otherwise, use the
* mainline kernel driver backported locally and improved with cyclic transfers
* support (6.7 code)
*/
#if IS_ENABLED(CONFIG_XILINX_XDMA) && (KERNEL_VERSION(6, 7, 0) <= LINUX_VERSION_CODE)
/* EMPTY MODULE !!! */
#include "alpx_version.h"
#warning "Use Kernel's XDMA"
/* MODULE meta required for build only */
MODULE_DESCRIPTION("AlpX XDMA support module placeholder");
MODULE_AUTHOR("Digigram Digital");
MODULE_VERSION("ALPX_MODULE_VERSION");
MODULE_LICENSE("GPL");
#else
/* Need our module BUT with the right version !! */
#if KERNEL_VERSION(6, 3, 0) > LINUX_VERSION_CODE
#warning 6.2
#include "core/generic/6.2/xilinx/xdma.c"
#elif KERNEL_VERSION(6, 7, 0) > LINUX_VERSION_CODE
#warning 6.3
#include "core/generic/6.3/xilinx/xdma.c"
#endif
#endif /* IS_ENABLED(CONFIG_XILINX_XDMA) && (KERNEL_VERSION(6, 7, 0) >= LINUX_VERSION_CODE) */
|