qcacmn: Add athdiag support for QCA6290

Add support for athdiag read / write using PLD APIs.

Change-Id: I5ce8a10bb44342427c97c02d1b6d05db026ef78a
CRs-fixed: 2046045
This commit is contained in:
Manikandan Mohan
2017-04-28 16:56:07 -07:00
committed by snandini
부모 8fe2d7704c
커밋 64c3d8438f

파일 보기

@@ -71,6 +71,7 @@ static ssize_t ath_procfs_diag_read(struct file *file, char __user *buf,
uint8_t *read_buffer = NULL;
struct hif_softc *scn;
uint32_t offset = 0, memtype = 0;
struct hif_target_info *tgt_info;
read_buffer = qdf_mem_malloc(count);
if (NULL == read_buffer) {
@@ -83,7 +84,11 @@ static ssize_t ath_procfs_diag_read(struct file *file, char __user *buf,
read_buffer, count, (int)*pos, buf);
scn = HIF_GET_SOFTC(hif_hdl);
if (scn->bus_type == QDF_BUS_TYPE_SNOC) {
tgt_info = hif_get_target_info_handle(GET_HIF_OPAQUE_HDL(hif_hdl));
if (scn->bus_type == QDF_BUS_TYPE_SNOC ||
(scn->bus_type == QDF_BUS_TYPE_PCI &&
(tgt_info->target_type == TARGET_TYPE_QCA6290 ||
tgt_info->target_type == TARGET_TYPE_QCA8074))) {
memtype = ((uint32_t)(*pos) & 0xff000000) >> 24;
offset = (uint32_t)(*pos) & 0xffffff;
HIF_TRACE("%s: offset 0x%x memtype 0x%x, datalen %zu\n",
@@ -126,6 +131,7 @@ static ssize_t ath_procfs_diag_write(struct file *file,
uint8_t *write_buffer = NULL;
struct hif_softc *scn;
uint32_t offset = 0, memtype = 0;
struct hif_target_info *tgt_info;
write_buffer = qdf_mem_malloc(count);
if (NULL == write_buffer) {
@@ -145,7 +151,11 @@ static ssize_t ath_procfs_diag_write(struct file *file,
(int)*pos, *((uint32_t *) write_buffer));
scn = HIF_GET_SOFTC(hif_hdl);
if (scn->bus_type == QDF_BUS_TYPE_SNOC) {
tgt_info = hif_get_target_info_handle(GET_HIF_OPAQUE_HDL(hif_hdl));
if (scn->bus_type == QDF_BUS_TYPE_SNOC ||
(scn->bus_type == QDF_BUS_TYPE_PCI &&
(tgt_info->target_type == TARGET_TYPE_QCA6290 ||
tgt_info->target_type == TARGET_TYPE_QCA8074))) {
memtype = ((uint32_t)(*pos) & 0xff000000) >> 24;
offset = (uint32_t)(*pos) & 0xffffff;
HIF_TRACE("%s: offset 0x%x memtype 0x%x, datalen %zu\n",