mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 01:31:30 +03:00
nvadsp: Fix build issues and enable
Fix build issues for nvadsp in OOT kernel and enable the build.
- Below files copied from kernel/nvidia/include/linux/
- tegra_nvadsp.h (72af3e78a6aff0fa250e9fd36b8414264d0e4c9a)
- tegra-firmwares.h (700223e52f49f300664dd91335fa11111af733aa)
- tegra-hsp.h (988be8f05033e1d728e046e918b506d829106082)
- Below file copied from kernel/nvidia/include/uapi/misc/
- adsp_console_ioctl.h (72af3e78a6aff0fa250e9fd36b8414264d0e4c9a)
- Functions that needs additional AGIC APIs not supported in upstream
are pushed under macro CONFIG_AGIC_EXT_APIS
- T210 chip_data and references removed
Bug 4164138
Bug 3682950
Change-Id: I5dfb570e578ca3631896de7350cea66698612568
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2971924
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
119c4f87e2
commit
d5138e1c58
101
include/linux/tegra-firmwares.h
Normal file
101
include/linux/tegra-firmwares.h
Normal file
@@ -0,0 +1,101 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/**
|
||||
* Copyright (c) 2016-2023, NVIDIA CORPORATION. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef __TEGRA_FIRMWARES_H
|
||||
#define __TEGRA_FIRMWARES_H
|
||||
|
||||
/*
|
||||
* max size of version string
|
||||
*/
|
||||
#define TFW_VERSION_MAX_SIZE 256
|
||||
|
||||
#if IS_ENABLED(CONFIG_TEGRA_FIRMWARES_CLASS)
|
||||
|
||||
struct device *tegrafw_register(const char *name,
|
||||
const u32 flags,
|
||||
ssize_t (*reader)(struct device *dev, char *, size_t),
|
||||
const char *string);
|
||||
void tegrafw_unregister(struct device *fwdev);
|
||||
struct device *devm_tegrafw_register(struct device *dev,
|
||||
const char *name,
|
||||
const u32 flags,
|
||||
ssize_t (*reader)(struct device *dev, char *, size_t),
|
||||
const char *string);
|
||||
void devm_tegrafw_unregister(struct device *dev, struct device *fwdev);
|
||||
void tegrafw_invalidate(struct device *fwdev);
|
||||
struct device *devm_tegrafw_register_dt_string(struct device *dev,
|
||||
const char *name,
|
||||
const char *path,
|
||||
const char *property);
|
||||
#else
|
||||
|
||||
static inline struct device *tegrafw_register(const char *name,
|
||||
const u32 flags,
|
||||
ssize_t (*reader)(struct device *, char *, size_t),
|
||||
const char *string)
|
||||
{
|
||||
return ERR_PTR(-ENOTSUPP);
|
||||
}
|
||||
|
||||
static inline void tegrafw_unregister(struct device *fwdev)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void tegrafw_invalidate(struct device *fwdev)
|
||||
{
|
||||
}
|
||||
|
||||
static inline struct device *devm_tegrafw_register(struct device *dev,
|
||||
const char *name,
|
||||
const u32 flags,
|
||||
ssize_t (*reader)(struct device *dev, char *, size_t),
|
||||
const char *string)
|
||||
{
|
||||
return ERR_PTR(-ENOTSUPP);
|
||||
}
|
||||
|
||||
static inline void devm_tegrafw_unregister(struct device *dev,
|
||||
struct device *fwdev)
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
struct device *devm_tegrafw_register_dt_string(struct device *dev,
|
||||
const char *name,
|
||||
const char *path,
|
||||
const char *property)
|
||||
{
|
||||
return ERR_PTR(-ENOTSUPP);
|
||||
}
|
||||
|
||||
#endif /* IS_ENABLED(...) */
|
||||
|
||||
enum {
|
||||
TFW_NORMAL = 0x0000,
|
||||
TFW_DONT_CACHE = 0x0001,
|
||||
TFW_MAX = 0xFFFF,
|
||||
};
|
||||
|
||||
static inline struct device *tegrafw_register_string(const char *name,
|
||||
const char *string)
|
||||
{
|
||||
return tegrafw_register(name, TFW_NORMAL, NULL, string);
|
||||
}
|
||||
|
||||
static inline struct device *devm_tegrafw_register_string(struct device *dev,
|
||||
const char *name,
|
||||
const char *string)
|
||||
{
|
||||
return devm_tegrafw_register(dev, name, TFW_NORMAL, NULL, string);
|
||||
}
|
||||
|
||||
static inline struct device *tegrafw_register_dt_string(const char *name,
|
||||
const char *path,
|
||||
const char *property)
|
||||
{
|
||||
return devm_tegrafw_register_dt_string(NULL, name, path, property);
|
||||
}
|
||||
|
||||
#endif /* __TEGRA_FIRMWARES_CLASS */
|
||||
Reference in New Issue
Block a user