qcacld-3.0: Add WLAN device memory info to SOC info API
Populate WLAN device memory related info along with other SOC info in pld_get_soc_info() API. Change-Id: I4b269e8d96d838b3ea7f998642cc8542cebb00d5 CRs-fixed: 2899892
This commit is contained in:

committed by
Madan Koyyalamudi

parent
682b6b93b5
commit
b4aea4cb8f
@@ -307,7 +307,20 @@ struct pld_device_version {
|
||||
u32 minor_version;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pld_dev_mem_info - WLAN device memory info
|
||||
* @start: start address of the memory block
|
||||
* @size: size of the memory block
|
||||
*
|
||||
* pld_dev_mem_info is used to store WLAN device memory info
|
||||
*/
|
||||
struct pld_dev_mem_info {
|
||||
u64 start;
|
||||
u64 size;
|
||||
};
|
||||
|
||||
#define PLD_MAX_TIMESTAMP_LEN 32
|
||||
#define PLD_MAX_DEV_MEM_NUM 4
|
||||
|
||||
/**
|
||||
* struct pld_soc_info - SOC information
|
||||
@@ -320,6 +333,7 @@ struct pld_device_version {
|
||||
* @fw_version: FW version
|
||||
* @fw_build_timestamp: FW build timestamp
|
||||
* @device_version: WLAN device version info
|
||||
* @dev_mem_info: WLAN device memory info
|
||||
*
|
||||
* pld_soc_info is used to store WLAN SOC information.
|
||||
*/
|
||||
@@ -333,6 +347,7 @@ struct pld_soc_info {
|
||||
u32 fw_version;
|
||||
char fw_build_timestamp[PLD_MAX_TIMESTAMP_LEN + 1];
|
||||
struct pld_device_version device_version;
|
||||
struct pld_dev_mem_info dev_mem_info[PLD_MAX_DEV_MEM_NUM];
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -864,7 +864,7 @@ int pld_pcie_get_platform_cap(struct device *dev, struct pld_platform_cap *cap)
|
||||
*/
|
||||
int pld_pcie_get_soc_info(struct device *dev, struct pld_soc_info *info)
|
||||
{
|
||||
int ret = 0;
|
||||
int ret = 0, i;
|
||||
struct cnss_soc_info cnss_info = {0};
|
||||
|
||||
if (!info)
|
||||
@@ -891,6 +891,10 @@ int pld_pcie_get_soc_info(struct device *dev, struct pld_soc_info *info)
|
||||
cnss_info.device_version.major_version;
|
||||
info->device_version.minor_version =
|
||||
cnss_info.device_version.minor_version;
|
||||
for (i = 0; i < PLD_MAX_DEV_MEM_NUM; i++) {
|
||||
info->dev_mem_info[i].start = cnss_info.dev_mem_info[i].start;
|
||||
info->dev_mem_info[i].size = cnss_info.dev_mem_info[i].size;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user