mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
msm: ipa: Update IPA_SRAM_DIRECT_ACCESS_n for IPA4.5
IPA shared RAM S/W area access can be done via this register. At IPA4.5 the register name and offset changed. This change updates the code accordingly. CRs-Fixed: 2291194 Change-Id: Ibd683181f551df63097a58fd1e0473a3564236b6 Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
This commit is contained in:
parent
740bdf6543
commit
dc6d11595d
@ -2649,18 +2649,18 @@ int _ipa_init_sram_v3(void)
|
|||||||
unsigned long phys_addr;
|
unsigned long phys_addr;
|
||||||
|
|
||||||
IPADBG(
|
IPADBG(
|
||||||
"ipa_wrapper_base(0x%08X) ipa_reg_base_ofst(0x%08X) IPA_SRAM_DIRECT_ACCESS_n(0x%08X) smem_restricted_bytes(0x%08X) smem_sz(0x%08X)\n",
|
"ipa_wrapper_base(0x%08X) ipa_reg_base_ofst(0x%08X) IPA_SW_AREA_RAM_DIRECT_ACCESS_n(0x%08X) smem_restricted_bytes(0x%08X) smem_sz(0x%08X)\n",
|
||||||
ipa3_ctx->ipa_wrapper_base,
|
ipa3_ctx->ipa_wrapper_base,
|
||||||
ipa3_ctx->ctrl->ipa_reg_base_ofst,
|
ipa3_ctx->ctrl->ipa_reg_base_ofst,
|
||||||
ipahal_get_reg_n_ofst(
|
ipahal_get_reg_n_ofst(
|
||||||
IPA_SRAM_DIRECT_ACCESS_n,
|
IPA_SW_AREA_RAM_DIRECT_ACCESS_n,
|
||||||
ipa3_ctx->smem_restricted_bytes / 4),
|
ipa3_ctx->smem_restricted_bytes / 4),
|
||||||
ipa3_ctx->smem_restricted_bytes,
|
ipa3_ctx->smem_restricted_bytes,
|
||||||
ipa3_ctx->smem_sz);
|
ipa3_ctx->smem_sz);
|
||||||
|
|
||||||
phys_addr = ipa3_ctx->ipa_wrapper_base +
|
phys_addr = ipa3_ctx->ipa_wrapper_base +
|
||||||
ipa3_ctx->ctrl->ipa_reg_base_ofst +
|
ipa3_ctx->ctrl->ipa_reg_base_ofst +
|
||||||
ipahal_get_reg_n_ofst(IPA_SRAM_DIRECT_ACCESS_n,
|
ipahal_get_reg_n_ofst(IPA_SW_AREA_RAM_DIRECT_ACCESS_n,
|
||||||
ipa3_ctx->smem_restricted_bytes / 4);
|
ipa3_ctx->smem_restricted_bytes / 4);
|
||||||
|
|
||||||
ipa_sram_mmio = ioremap(phys_addr, ipa3_ctx->smem_sz);
|
ipa_sram_mmio = ioremap(phys_addr, ipa3_ctx->smem_sz);
|
||||||
|
@ -1623,7 +1623,7 @@ int ipa3_flt_read_tbl_from_hw(u32 pipe_idx, enum ipa_ip_type ip_type,
|
|||||||
/* map IPA SRAM */
|
/* map IPA SRAM */
|
||||||
ipa_sram_mmio = ioremap(ipa3_ctx->ipa_wrapper_base +
|
ipa_sram_mmio = ioremap(ipa3_ctx->ipa_wrapper_base +
|
||||||
ipa3_ctx->ctrl->ipa_reg_base_ofst +
|
ipa3_ctx->ctrl->ipa_reg_base_ofst +
|
||||||
ipahal_get_reg_n_ofst(IPA_SRAM_DIRECT_ACCESS_n,
|
ipahal_get_reg_n_ofst(IPA_SW_AREA_RAM_DIRECT_ACCESS_n,
|
||||||
ipa3_ctx->smem_restricted_bytes / 4),
|
ipa3_ctx->smem_restricted_bytes / 4),
|
||||||
ipa3_ctx->smem_sz);
|
ipa3_ctx->smem_sz);
|
||||||
if (!ipa_sram_mmio) {
|
if (!ipa_sram_mmio) {
|
||||||
|
@ -146,7 +146,7 @@ static int ipa3_nat_ipv6ct_mmap(struct file *filp, struct vm_area_struct *vma)
|
|||||||
|
|
||||||
phys_addr = ipa3_ctx->ipa_wrapper_base +
|
phys_addr = ipa3_ctx->ipa_wrapper_base +
|
||||||
ipa3_ctx->ctrl->ipa_reg_base_ofst +
|
ipa3_ctx->ctrl->ipa_reg_base_ofst +
|
||||||
ipahal_get_reg_n_ofst(IPA_SRAM_DIRECT_ACCESS_n,
|
ipahal_get_reg_n_ofst(IPA_SW_AREA_RAM_DIRECT_ACCESS_n,
|
||||||
dev->smem_offset);
|
dev->smem_offset);
|
||||||
|
|
||||||
if (remap_pfn_range(
|
if (remap_pfn_range(
|
||||||
|
@ -1938,7 +1938,7 @@ int ipa3_rt_read_tbl_from_hw(u32 tbl_idx, enum ipa_ip_type ip_type,
|
|||||||
/* map IPA SRAM */
|
/* map IPA SRAM */
|
||||||
ipa_sram_mmio = ioremap(ipa3_ctx->ipa_wrapper_base +
|
ipa_sram_mmio = ioremap(ipa3_ctx->ipa_wrapper_base +
|
||||||
ipa3_ctx->ctrl->ipa_reg_base_ofst +
|
ipa3_ctx->ctrl->ipa_reg_base_ofst +
|
||||||
ipahal_get_reg_n_ofst(IPA_SRAM_DIRECT_ACCESS_n,
|
ipahal_get_reg_n_ofst(IPA_SW_AREA_RAM_DIRECT_ACCESS_n,
|
||||||
ipa3_ctx->smem_restricted_bytes / 4),
|
ipa3_ctx->smem_restricted_bytes / 4),
|
||||||
ipa3_ctx->smem_sz);
|
ipa3_ctx->smem_sz);
|
||||||
if (!ipa_sram_mmio) {
|
if (!ipa_sram_mmio) {
|
||||||
|
@ -249,7 +249,8 @@ static void ipa3_log_evt_hdlr(void)
|
|||||||
if (ipa3_ctx->uc_ctx.uc_event_top_ofst +
|
if (ipa3_ctx->uc_ctx.uc_event_top_ofst +
|
||||||
sizeof(struct IpaHwEventLogInfoData_t) >=
|
sizeof(struct IpaHwEventLogInfoData_t) >=
|
||||||
ipa3_ctx->ctrl->ipa_reg_base_ofst +
|
ipa3_ctx->ctrl->ipa_reg_base_ofst +
|
||||||
ipahal_get_reg_n_ofst(IPA_SRAM_DIRECT_ACCESS_n, 0) +
|
ipahal_get_reg_n_ofst(
|
||||||
|
IPA_SW_AREA_RAM_DIRECT_ACCESS_n, 0) +
|
||||||
ipa3_ctx->smem_sz) {
|
ipa3_ctx->smem_sz) {
|
||||||
IPAERR("uc_top 0x%x outside SRAM\n",
|
IPAERR("uc_top 0x%x outside SRAM\n",
|
||||||
ipa3_ctx->uc_ctx.uc_event_top_ofst);
|
ipa3_ctx->uc_ctx.uc_event_top_ofst);
|
||||||
@ -657,7 +658,7 @@ int ipa3_uc_interface_init(void)
|
|||||||
|
|
||||||
phys_addr = ipa3_ctx->ipa_wrapper_base +
|
phys_addr = ipa3_ctx->ipa_wrapper_base +
|
||||||
ipa3_ctx->ctrl->ipa_reg_base_ofst +
|
ipa3_ctx->ctrl->ipa_reg_base_ofst +
|
||||||
ipahal_get_reg_n_ofst(IPA_SRAM_DIRECT_ACCESS_n, 0);
|
ipahal_get_reg_n_ofst(IPA_SW_AREA_RAM_DIRECT_ACCESS_n, 0);
|
||||||
ipa3_ctx->uc_ctx.uc_sram_mmio = ioremap(phys_addr,
|
ipa3_ctx->uc_ctx.uc_sram_mmio = ioremap(phys_addr,
|
||||||
IPA_RAM_UC_SMEM_SIZE);
|
IPA_RAM_UC_SMEM_SIZE);
|
||||||
if (!ipa3_ctx->uc_ctx.uc_sram_mmio) {
|
if (!ipa3_ctx->uc_ctx.uc_sram_mmio) {
|
||||||
|
@ -556,7 +556,7 @@ static void ipa3_uc_mhi_event_log_info_hdlr(
|
|||||||
if (ipa3_uc_mhi_ctx->mhi_uc_stats_ofst +
|
if (ipa3_uc_mhi_ctx->mhi_uc_stats_ofst +
|
||||||
sizeof(struct IpaHwStatsMhiInfoData_t) >=
|
sizeof(struct IpaHwStatsMhiInfoData_t) >=
|
||||||
ipa3_ctx->ctrl->ipa_reg_base_ofst +
|
ipa3_ctx->ctrl->ipa_reg_base_ofst +
|
||||||
ipahal_get_reg_n_ofst(IPA_SRAM_DIRECT_ACCESS_n, 0) +
|
ipahal_get_reg_n_ofst(IPA_SW_AREA_RAM_DIRECT_ACCESS_n, 0) +
|
||||||
ipa3_ctx->smem_sz) {
|
ipa3_ctx->smem_sz) {
|
||||||
IPAERR("uc_mhi_stats 0x%x outside SRAM\n",
|
IPAERR("uc_mhi_stats 0x%x outside SRAM\n",
|
||||||
ipa3_uc_mhi_ctx->mhi_uc_stats_ofst);
|
ipa3_uc_mhi_ctx->mhi_uc_stats_ofst);
|
||||||
|
@ -56,7 +56,7 @@ struct IpaHwEventLogInfoData_t *uc_event_top_mmio)
|
|||||||
if (ipa3_ctx->uc_ntn_ctx.ntn_uc_stats_ofst +
|
if (ipa3_ctx->uc_ntn_ctx.ntn_uc_stats_ofst +
|
||||||
sizeof(struct Ipa3HwStatsNTNInfoData_t) >=
|
sizeof(struct Ipa3HwStatsNTNInfoData_t) >=
|
||||||
ipa3_ctx->ctrl->ipa_reg_base_ofst +
|
ipa3_ctx->ctrl->ipa_reg_base_ofst +
|
||||||
ipahal_get_reg_n_ofst(IPA_SRAM_DIRECT_ACCESS_n, 0) +
|
ipahal_get_reg_n_ofst(IPA_SW_AREA_RAM_DIRECT_ACCESS_n, 0) +
|
||||||
ipa3_ctx->smem_sz) {
|
ipa3_ctx->smem_sz) {
|
||||||
IPAERR("uc_ntn_stats 0x%x outside SRAM\n",
|
IPAERR("uc_ntn_stats 0x%x outside SRAM\n",
|
||||||
ipa3_ctx->uc_ntn_ctx.ntn_uc_stats_ofst);
|
ipa3_ctx->uc_ntn_ctx.ntn_uc_stats_ofst);
|
||||||
|
@ -373,7 +373,7 @@ struct IpaHwEventLogInfoData_t *uc_event_top_mmio)
|
|||||||
if (ipa3_ctx->uc_wdi_ctx.wdi_uc_stats_ofst +
|
if (ipa3_ctx->uc_wdi_ctx.wdi_uc_stats_ofst +
|
||||||
sizeof(struct IpaHwStatsWDIInfoData_t) >=
|
sizeof(struct IpaHwStatsWDIInfoData_t) >=
|
||||||
ipa3_ctx->ctrl->ipa_reg_base_ofst +
|
ipa3_ctx->ctrl->ipa_reg_base_ofst +
|
||||||
ipahal_get_reg_n_ofst(IPA_SRAM_DIRECT_ACCESS_n, 0) +
|
ipahal_get_reg_n_ofst(IPA_SW_AREA_RAM_DIRECT_ACCESS_n, 0) +
|
||||||
ipa3_ctx->smem_sz) {
|
ipa3_ctx->smem_sz) {
|
||||||
IPAERR("uc_wdi_stats 0x%x outside SRAM\n",
|
IPAERR("uc_wdi_stats 0x%x outside SRAM\n",
|
||||||
ipa3_ctx->uc_wdi_ctx.wdi_uc_stats_ofst);
|
ipa3_ctx->uc_wdi_ctx.wdi_uc_stats_ofst);
|
||||||
|
@ -84,7 +84,7 @@ static const char *ipareg_name_to_str[IPA_REG_MAX] = {
|
|||||||
__stringify(IPA_ENDP_INIT_PROD_CFG_n),
|
__stringify(IPA_ENDP_INIT_PROD_CFG_n),
|
||||||
__stringify(IPA_ENDP_INIT_RSRC_GRP_n),
|
__stringify(IPA_ENDP_INIT_RSRC_GRP_n),
|
||||||
__stringify(IPA_SHARED_MEM_SIZE),
|
__stringify(IPA_SHARED_MEM_SIZE),
|
||||||
__stringify(IPA_SRAM_DIRECT_ACCESS_n),
|
__stringify(IPA_SW_AREA_RAM_DIRECT_ACCESS_n),
|
||||||
__stringify(IPA_DEBUG_CNT_CTRL_n),
|
__stringify(IPA_DEBUG_CNT_CTRL_n),
|
||||||
__stringify(IPA_UC_MAILBOX_m_n),
|
__stringify(IPA_UC_MAILBOX_m_n),
|
||||||
__stringify(IPA_FILT_ROUT_HASH_FLUSH),
|
__stringify(IPA_FILT_ROUT_HASH_FLUSH),
|
||||||
@ -2320,7 +2320,7 @@ static struct ipahal_reg_obj ipahal_reg_objs[IPA_HW_MAX][IPA_REG_MAX] = {
|
|||||||
[IPA_HW_v3_0][IPA_SHARED_MEM_SIZE] = {
|
[IPA_HW_v3_0][IPA_SHARED_MEM_SIZE] = {
|
||||||
ipareg_construct_dummy, ipareg_parse_shared_mem_size,
|
ipareg_construct_dummy, ipareg_parse_shared_mem_size,
|
||||||
0x00000054, 0, 0, 0, 0},
|
0x00000054, 0, 0, 0, 0},
|
||||||
[IPA_HW_v3_0][IPA_SRAM_DIRECT_ACCESS_n] = {
|
[IPA_HW_v3_0][IPA_SW_AREA_RAM_DIRECT_ACCESS_n] = {
|
||||||
ipareg_construct_dummy, ipareg_parse_dummy,
|
ipareg_construct_dummy, ipareg_parse_dummy,
|
||||||
0x00007000, 0x4, 0, 0, 0},
|
0x00007000, 0x4, 0, 0, 0},
|
||||||
[IPA_HW_v3_0][IPA_DEBUG_CNT_CTRL_n] = {
|
[IPA_HW_v3_0][IPA_DEBUG_CNT_CTRL_n] = {
|
||||||
@ -2924,6 +2924,9 @@ static struct ipahal_reg_obj ipahal_reg_objs[IPA_HW_MAX][IPA_REG_MAX] = {
|
|||||||
ipareg_construct_endp_init_aggr_n_v4_5,
|
ipareg_construct_endp_init_aggr_n_v4_5,
|
||||||
ipareg_parse_endp_init_aggr_n_v4_5,
|
ipareg_parse_endp_init_aggr_n_v4_5,
|
||||||
0x00000824, 0x70, 0, 31, 1},
|
0x00000824, 0x70, 0, 31, 1},
|
||||||
|
[IPA_HW_v4_5][IPA_SW_AREA_RAM_DIRECT_ACCESS_n] = {
|
||||||
|
ipareg_construct_dummy, ipareg_parse_dummy,
|
||||||
|
0x000010000, 0x4, 0, 0, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -85,7 +85,7 @@ enum ipahal_reg_name {
|
|||||||
IPA_ENDP_INIT_PROD_CFG_n,
|
IPA_ENDP_INIT_PROD_CFG_n,
|
||||||
IPA_ENDP_INIT_RSRC_GRP_n,
|
IPA_ENDP_INIT_RSRC_GRP_n,
|
||||||
IPA_SHARED_MEM_SIZE,
|
IPA_SHARED_MEM_SIZE,
|
||||||
IPA_SRAM_DIRECT_ACCESS_n,
|
IPA_SW_AREA_RAM_DIRECT_ACCESS_n,
|
||||||
IPA_DEBUG_CNT_CTRL_n,
|
IPA_DEBUG_CNT_CTRL_n,
|
||||||
IPA_UC_MAILBOX_m_n,
|
IPA_UC_MAILBOX_m_n,
|
||||||
IPA_FILT_ROUT_HASH_FLUSH,
|
IPA_FILT_ROUT_HASH_FLUSH,
|
||||||
@ -204,12 +204,12 @@ struct ipahal_reg_endp_init_mode {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* struct ipahal_reg_shared_mem_size - IPA SHARED_MEM_SIZE register
|
* struct ipahal_reg_shared_mem_size - IPA_SHARED_MEM_SIZE register
|
||||||
* @shared_mem_sz: Available size [in 8Bytes] of SW partition within
|
* @shared_mem_sz: Available size [in 8Bytes] of SW partition within
|
||||||
* IPA shared memory.
|
* IPA shared memory.
|
||||||
* @shared_mem_baddr: Offset of SW partition within IPA
|
* @shared_mem_baddr: Offset of SW partition within IPA
|
||||||
* shared memory[in 8Bytes]. To get absolute address of SW partition,
|
* shared memory[in 8Bytes]. To get absolute address of SW partition,
|
||||||
* add this offset to IPA_SRAM_DIRECT_ACCESS_n baddr.
|
* add this offset to IPA_SW_AREA_RAM_DIRECT_ACCESS_n baddr.
|
||||||
*/
|
*/
|
||||||
struct ipahal_reg_shared_mem_size {
|
struct ipahal_reg_shared_mem_size {
|
||||||
u32 shared_mem_sz;
|
u32 shared_mem_sz;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user