devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yisen Zhuang <Yisen.Zhuang@huawei.com>
To: devicetree@vger.kernel.org, netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Cc: mark.rutland@arm.com, salil.mehta@huawei.com,
	yankejian@huawei.com, xieqianqian@huawei.com, pawel.moll@arm.com,
	ijc+devicetree@hellion.org.uk, catalin.marinas@arm.com,
	lipeng321@huawei.com, will.deacon@arm.com, linuxarm@huawei.com,
	xuwei5@hisilicon.com, robh+dt@kernel.org,
	huangdaode@hisilicon.com, galak@codeaurora.org,
	liguozhu@huawei.com, davem@davemloft.net
Subject: [PATCH v2 net-next 02/13] net: hns: set debug port irq index to 0
Date: Sat, 23 Apr 2016 17:05:06 +0800	[thread overview]
Message-ID: <1461402317-136499-3-git-send-email-Yisen.Zhuang@huawei.com> (raw)
In-Reply-To: <1461402317-136499-1-git-send-email-Yisen.Zhuang@huawei.com>

From: Daode Huang <huangdaode@hisilicon.com>

As debug ports are moved from service dsaf to debug dsaf,
the interrupts offset should start from 0, So this patch
re-defines the offset index of debug ports.

Signed-off-by: Daode Huang <huangdaode@hisilicon.com>
Signed-off-by: Yisen Zhuang <yisen.zhuang@huawei.com>
---
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 8 +-------
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 5 +----
 2 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
index 121ba4e..054f391 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
@@ -445,20 +445,14 @@ static int hns_rcb_get_port_in_comm(
 
 #define SERVICE_RING_IRQ_IDX(v1) \
 	((v1) ? HNS_SERVICE_RING_IRQ_IDX : HNSV2_SERVICE_RING_IRQ_IDX)
-#define DEBUG_RING_IRQ_IDX(v1) \
-	((v1) ? HNS_DEBUG_RING_IRQ_IDX : HNSV2_DEBUG_RING_IRQ_IDX)
-#define DEBUG_RING_IRQ_OFFSET(v1) \
-	((v1) ? HNS_DEBUG_RING_IRQ_OFFSET : HNSV2_DEBUG_RING_IRQ_OFFSET)
 static int hns_rcb_get_base_irq_idx(struct rcb_common_cb *rcb_common)
 {
-	int comm_index = rcb_common->comm_index;
 	bool is_ver1 = AE_IS_VER1(rcb_common->dsaf_dev->dsaf_ver);
 
 	if (!HNS_DSAF_IS_DEBUG(rcb_common->dsaf_dev))
 		return SERVICE_RING_IRQ_IDX(is_ver1);
 	else
-		return  DEBUG_RING_IRQ_IDX(is_ver1) +
-			(comm_index - 1) * DEBUG_RING_IRQ_OFFSET(is_ver1);
+		return  HNS_DEBUG_RING_IRQ_IDX;
 }
 
 #define RCB_COMM_BASE_TO_RING_BASE(base, ringid)\
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
index cffd244..8782608 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
@@ -10,12 +10,9 @@
 #ifndef _DSAF_REG_H_
 #define _DSAF_REG_H_
 
-#define HNS_DEBUG_RING_IRQ_IDX 55
+#define HNS_DEBUG_RING_IRQ_IDX 0
 #define HNS_SERVICE_RING_IRQ_IDX 59
-#define HNS_DEBUG_RING_IRQ_OFFSET 2
-#define HNSV2_DEBUG_RING_IRQ_IDX 409
 #define HNSV2_SERVICE_RING_IRQ_IDX 25
-#define HNSV2_DEBUG_RING_IRQ_OFFSET 9
 
 #define DSAF_MAX_PORT_NUM_PER_CHIP 8
 #define DSAF_SERVICE_PORT_NUM_PER_DSAF 6
-- 
1.9.1

  parent reply	other threads:[~2016-04-23  9:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-23  9:05 [PATCH v2 net-next 00/13] net: hns: add support of debug dsaf device Yisen Zhuang
     [not found] ` <1461402317-136499-1-git-send-email-Yisen.Zhuang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2016-04-23  9:05   ` [PATCH v2 net-next 01/13] net: hns: add a new dsaf mode for debug port Yisen Zhuang
2016-04-23  9:05   ` [PATCH v2 net-next 04/13] net: hns: add attribute reset-field-offset for dsaf node Yisen Zhuang
2016-04-23  9:05   ` [PATCH v2 net-next 05/13] net: hns: add syscon operation for dsaf Yisen Zhuang
2016-04-23  9:05   ` [PATCH v2 net-next 12/13] Documentation: Bindings: add port-idx-in-ae for enet node Yisen Zhuang
2016-04-23  9:05 ` Yisen Zhuang [this message]
2016-04-23  9:05 ` [PATCH v2 net-next 03/13] net: hns: add attribute port-idx-in-ae in " Yisen Zhuang
2016-04-23  9:05 ` [PATCH v2 net-next 06/13] net: hns: sort the header file by alphabetical order Yisen Zhuang
2016-04-23  9:05 ` [PATCH v2 net-next 07/13] net: hns: separate debug dsaf device from service dsaf device Yisen Zhuang
2016-04-23  9:05 ` [PATCH v2 net-next 08/13] net: hns: add attribute cpld_ctrl for dsaf port node Yisen Zhuang
2016-04-23  9:05 ` [PATCH v2 net-next 09/13] net: hns: add attribute port-rst-offset " Yisen Zhuang
2016-04-23  9:05 ` [PATCH v2 net-next 10/13] net: hns: add attribute port-mode-offset " Yisen Zhuang
2016-04-23  9:05 ` [PATCH v2 net-next 11/13] Documentation: Bindings: Update DT binding for separating dsaf dev support Yisen Zhuang
2016-04-26 12:48   ` Rob Herring
2016-04-27  3:33     ` Yisen Zhuang
2016-04-27 15:25       ` Rob Herring
2016-04-28  1:45         ` Yisen Zhuang
2016-04-23  9:05 ` [PATCH v2 net-next 13/13] dts: hisi: update hns dst " Yisen Zhuang
2016-04-26  5:11 ` [PATCH v2 net-next 00/13] net: hns: add support of debug dsaf device David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461402317-136499-3-git-send-email-Yisen.Zhuang@huawei.com \
    --to=yisen.zhuang@huawei.com \
    --cc=catalin.marinas@arm.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=huangdaode@hisilicon.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=liguozhu@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linuxarm@huawei.com \
    --cc=lipeng321@huawei.com \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=salil.mehta@huawei.com \
    --cc=will.deacon@arm.com \
    --cc=xieqianqian@huawei.com \
    --cc=xuwei5@hisilicon.com \
    --cc=yankejian@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).