mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
In Linux v6.2, the Tegra IVC driver was updated to support iosys-map and this breaks building some of the out-of-tree drivers for Linux v6.2+ kernels. In Linux v6.3, the GPIO OF APIs were removed and this breaks building some of the out-of-tree drivers that use these legacy APIs. For now the broken drivers are not built for these corresponding kernels. Instead of checking the kernel version in the Makefile for the corresponding broken driver, move the kernel version checking to the top-level Makefile and add CONFIG definitions that can be used the various Makefiles. This is also needed for working with 3rd party Linux kernels that may have upstream backports and need to set these CONFIG variables for their Linux kernel. Bug 4221847 Change-Id: I35ee59bccdcdb1be56e4680c453279b421692c6a Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996215 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
44 lines
1.4 KiB
Makefile
44 lines
1.4 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved.
|
|
|
|
LINUXINCLUDE += -I$(srctree.nvconftest)
|
|
LINUXINCLUDE += -I$(srctree.nvidia-oot)/include
|
|
|
|
subdir-ccflags-y += -Werror
|
|
|
|
LINUX_VERSION := $(shell expr $(VERSION) \* 256 + $(PATCHLEVEL))
|
|
LINUX_VERSION_6_2 := $(shell expr 6 \* 256 + 2)
|
|
LINUX_VERSION_6_3 := $(shell expr 6 \* 256 + 3)
|
|
|
|
# The Tegra IVC driver was updated to support iosys-map in Linux v6.2.
|
|
# For Linux v6.2 kernels, don't build any drivers that requires this.
|
|
ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_2); echo $$?),0)
|
|
export CONFIG_TEGRA_IVC_LEGACY_DISABLE=y
|
|
subdir-ccflags-y += -DCONFIG_TEGRA_IVC_LEGACY_DISABLE
|
|
endif
|
|
|
|
# Legacy GPIO support is removed in Linux v6.3
|
|
ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_3); echo $$?),0)
|
|
export CONFIG_TEGRA_GPIO_LEGACY_DISABLE=y
|
|
endif
|
|
|
|
ifeq ($(CONFIG_TEGRA_VIRTUALIZATION),y)
|
|
subdir-ccflags-y += -DCONFIG_TEGRA_VIRTUALIZATION
|
|
endif
|
|
|
|
ifeq ($(CONFIG_TEGRA_SYSTEM_TYPE_ACK),y)
|
|
subdir-ccflags-y += -DCONFIG_TEGRA_SYSTEM_TYPE_ACK
|
|
subdir-ccflags-y += -Wno-sometimes-uninitialized
|
|
subdir-ccflags-y += -Wno-parentheses-equality
|
|
subdir-ccflags-y += -Wno-enum-conversion
|
|
subdir-ccflags-y += -Wno-implicit-fallthrough
|
|
endif
|
|
|
|
obj-m += drivers/
|
|
|
|
ifdef CONFIG_SND_SOC
|
|
obj-m += sound/soc/tegra/
|
|
obj-m += sound/tegra-safety-audio/
|
|
obj-m += sound/soc/tegra-virt-alt/
|
|
endif
|