Loading drivers/platform/msm/mhi_dev/mhi.c +4 −0 Original line number Diff line number Diff line Loading @@ -1957,6 +1957,10 @@ static int mhi_dev_cache_host_cfg(struct mhi_dev *mhi) return rc; } mhi_log(MHI_MSG_VERBOSE, "Number of Event rings : %d, HW Event rings : %d\n", mhi->cfg.event_rings, mhi->cfg.hw_event_rings); mhi->cmd_ctx_shadow.size = sizeof(struct mhi_dev_cmd_ctx); mhi->ev_ctx_shadow.size = sizeof(struct mhi_dev_ev_ctx) * mhi->cfg.event_rings; Loading drivers/platform/msm/mhi_dev/mhi_mmio.c +14 −8 Original line number Diff line number Diff line /* Copyright (c) 2015, 2017-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2015, 2017-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -982,16 +982,22 @@ EXPORT_SYMBOL(mhi_dev_mmio_init); int mhi_dev_update_ner(struct mhi_dev *dev) { int rc = 0; int rc = 0, mhi_cfg = 0; rc = mhi_dev_mmio_masked_read(dev, MHICFG, MHICFG_NER_MASK, MHICFG_NER_SHIFT, &dev->cfg.event_rings); if (rc) { pr_err("Error update NER\n"); if (WARN_ON(!dev)) return -EINVAL; rc = mhi_dev_mmio_read(dev, MHICFG, &mhi_cfg); if (rc) return rc; } pr_debug("NER in HW :%d\n", dev->cfg.event_rings); pr_debug("MHICFG: 0x%x", mhi_cfg); dev->cfg.event_rings = (mhi_cfg & MHICFG_NER_MASK) >> MHICFG_NER_SHIFT; dev->cfg.hw_event_rings = (mhi_cfg & MHICFG_NHWER_MASK) >> MHICFG_NHWER_SHIFT; return 0; } EXPORT_SYMBOL(mhi_dev_update_ner); Loading Loading
drivers/platform/msm/mhi_dev/mhi.c +4 −0 Original line number Diff line number Diff line Loading @@ -1957,6 +1957,10 @@ static int mhi_dev_cache_host_cfg(struct mhi_dev *mhi) return rc; } mhi_log(MHI_MSG_VERBOSE, "Number of Event rings : %d, HW Event rings : %d\n", mhi->cfg.event_rings, mhi->cfg.hw_event_rings); mhi->cmd_ctx_shadow.size = sizeof(struct mhi_dev_cmd_ctx); mhi->ev_ctx_shadow.size = sizeof(struct mhi_dev_ev_ctx) * mhi->cfg.event_rings; Loading
drivers/platform/msm/mhi_dev/mhi_mmio.c +14 −8 Original line number Diff line number Diff line /* Copyright (c) 2015, 2017-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2015, 2017-2020, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -982,16 +982,22 @@ EXPORT_SYMBOL(mhi_dev_mmio_init); int mhi_dev_update_ner(struct mhi_dev *dev) { int rc = 0; int rc = 0, mhi_cfg = 0; rc = mhi_dev_mmio_masked_read(dev, MHICFG, MHICFG_NER_MASK, MHICFG_NER_SHIFT, &dev->cfg.event_rings); if (rc) { pr_err("Error update NER\n"); if (WARN_ON(!dev)) return -EINVAL; rc = mhi_dev_mmio_read(dev, MHICFG, &mhi_cfg); if (rc) return rc; } pr_debug("NER in HW :%d\n", dev->cfg.event_rings); pr_debug("MHICFG: 0x%x", mhi_cfg); dev->cfg.event_rings = (mhi_cfg & MHICFG_NER_MASK) >> MHICFG_NER_SHIFT; dev->cfg.hw_event_rings = (mhi_cfg & MHICFG_NHWER_MASK) >> MHICFG_NHWER_SHIFT; return 0; } EXPORT_SYMBOL(mhi_dev_update_ner); Loading