nvidia-oot: port tegra vblk driver

Using this patch we are adding support for
tegra vblk driver in oot kernel.

JIRA ESLC-6885

Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Change-Id: I914bb3337019412593e05e75fa0569dd1c7398d1
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2781122
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Manish Bhardwaj
2022-09-23 11:07:49 +00:00
committed by mobile promotions
parent 6cf5029afb
commit 95d8293e6c
11 changed files with 2917 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/
#ifndef UAPI_SCSI_UFS_UFS_IOCTL_H_
#define UAPI_SCSI_UFS_UFS_IOCTL_H_
#include <linux/types.h>
/*
* IOCTL opcode for ufs combo queries has the following opcode after
* SCSI_IOCTL_GET_PCI
*/
#define UFS_IOCTL_COMBO_QUERY 0x5388
/*
* IOCTL opcode to set UFS power mode
*/
#define UFS_IOCTL_SET_POWER_MODE 0x5389
/*
* Maximum number of Query requests per Combo Query Request
*/
#define MAX_QUERY_CMD_PER_COMBO 10
/**
* struct ufs_ioc_query_cmd - used to transfer ufs query command/data to and
* from user via ioctl
*/
struct ufs_ioc_query_req {
/* Query opcode to specify the type of Query operation */
__u8 opcode;
/* idn to provide more info on specific operation. */
__u8 idn;
/* index - optional in some cases */
__u8 index;
/* index - optional in some cases */
__u8 selector;
/* buf_size - buffer size in bytes pointed by buffer. */
__u16 buf_size;
/*
* user buffer pointer for query data.
* Note:
* For Read/Write Attribute this should be of 4 bytes
* For Read Flag this should be of 1 byte
* For Descriptor Read/Write size depends on the type of the descriptor
*/
__u8 *buffer;
/* delay after query command completion */
__u32 delay;
/* error status for the query operation */
__s32 error_status;
};
struct ufs_ioc_combo_query_req {
/* Number of Query Commands in this Combo */
__u8 num_cmds;
/* Flag to Specify if Command Queue need to be empty or not */
__u8 need_cq_empty;
/* Flag to Specify if return or continue with all requests on error */
__u8 return_on_error;
/* pointer to the first query command request */
struct ufs_ioc_query_req *query;
};
#endif /* UAPI_SCSI_UFS_UFS_IOCTL_H_ */