mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
Depending on kernel version the Tegra UFS driver includes different headers to build the driver. Now that Linux v5.x kernels are no longer supported, we can simplify this. Simplify the headers for the Tegra UFS driver as follows ... 1. For Linux v6.x kernels only the ufshcd-priv.h and ufshcd-pltfrm.h headers are required. These headers are copied from the Linux kernel. However, only the prototypes for the functions 'ufshcd_query_attr', 'ufshcd_query_descriptor_retry' and 'ufshcd_pltfrm_init' are needed. The functions 'ufshcd_query_attr' and 'ufshcd_query_descriptor_retry' have not been change since they were introduced in Linux v4.17 and the function 'ufshcd_pltfrm_init' was last updated in Linux v6.1 (making the ufs_hba_variant_ops argument const). Although redefining the prototypes outside the kernel is fragile and does not protect the Tegra UFS driver from updates to these functions, this problem already exists. 2. Move the files ufshcd-pltfrm.h and ufshcd-priv.h into the Tegra UFS driver directory because these are not needed outside of the driver. JIRA LINQPJ14-47 Change-Id: I3891bf756723f730f036637891c55090b5d2a384 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3349825 GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
22 lines
873 B
C
22 lines
873 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/* Copyright (c) 2015-2023, The Linux Foundation. All rights reserved. */
|
|
/* SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. */
|
|
/*
|
|
* This file is derived from the Linux kernel's drivers/ufs/host/ufshcd-pltfrm.h
|
|
* header file, but only the necessary prototype used by the Tegra UFS driver
|
|
* is copied. This function was first introduced in Linux v4.4 and was modified
|
|
* in Linux v6.1 to make the 'vops' argument const. Hence, this prototype is
|
|
* compatible with kernels from Linux v6.1 upto Linux v6.15. Linux kernels newer
|
|
* than v6.15 need to be verified.
|
|
*/
|
|
|
|
#ifndef UFSHCD_PLTFRM_H_
|
|
#define UFSHCD_PLTFRM_H_
|
|
|
|
#include <ufs/ufshcd.h>
|
|
|
|
int ufshcd_pltfrm_init(struct platform_device *pdev,
|
|
const struct ufs_hba_variant_ops *vops);
|
|
|
|
#endif /* UFSHCD_PLTFRM_H_ */
|