linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaro Koskinen <aaro.koskinen@nokia.com>
To: Ralf Baechle <ralf@linux-mips.org>,
	David Daney <ddaney.cavm@gmail.com>,
	linux-mips@linux-mips.org
Cc: Janne Huttunen <janne.huttunen@nokia.com>,
	Aaro Koskinen <aaro.koskinen@nokia.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org
Subject: [PATCH 13/14] MIPS: OCTEON: support interfaces 4 and 5
Date: Thu, 13 Aug 2015 16:21:45 +0300	[thread overview]
Message-ID: <1439472106-7750-14-git-send-email-aaro.koskinen@nokia.com> (raw)
In-Reply-To: <1439472106-7750-1-git-send-email-aaro.koskinen@nokia.com>

From: Janne Huttunen <janne.huttunen@nokia.com>

Add the support for mapping between interface/port numbers and IPD port
numbers also for the additional interfaces some Octeon II models have.

Signed-off-by: Janne Huttunen <janne.huttunen@nokia.com>
Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
---
 arch/mips/cavium-octeon/executive/cvmx-helper-util.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/mips/cavium-octeon/executive/cvmx-helper-util.c b/arch/mips/cavium-octeon/executive/cvmx-helper-util.c
index 4029596..b45b297 100644
--- a/arch/mips/cavium-octeon/executive/cvmx-helper-util.c
+++ b/arch/mips/cavium-octeon/executive/cvmx-helper-util.c
@@ -382,6 +382,10 @@ int cvmx_helper_get_ipd_port(int interface, int port)
 		return port + 32;
 	case 3:
 		return port + 36;
+	case 4:
+		return port + 40;
+	case 5:
+		return port + 44;
 	}
 	return -1;
 }
@@ -404,6 +408,10 @@ int cvmx_helper_get_interface_num(int ipd_port)
 		return 2;
 	else if (ipd_port < 40)
 		return 3;
+	else if (ipd_port < 44)
+		return 4;
+	else if (ipd_port < 48)
+		return 5;
 	else
 		cvmx_dprintf("cvmx_helper_get_interface_num: Illegal IPD "
 			     "port number\n");
@@ -428,6 +436,10 @@ int cvmx_helper_get_interface_index_num(int ipd_port)
 		return ipd_port & 3;
 	else if (ipd_port < 40)
 		return ipd_port & 3;
+	else if (ipd_port < 44)
+		return ipd_port & 3;
+	else if (ipd_port < 48)
+		return ipd_port & 3;
 	else
 		cvmx_dprintf("cvmx_helper_get_interface_index_num: "
 			     "Illegal IPD port number\n");
-- 
2.4.3

  parent reply	other threads:[~2015-08-13 13:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13 13:21 [PATCH 00/14] MIPS/staging: OCTEON: enable ethernet/xaui on CN68XX Aaro Koskinen
2015-08-13 13:21 ` [PATCH 01/14] MIPS: OCTEON: fix CN6880 hang on XAUI init Aaro Koskinen
2015-08-13 13:21 ` [PATCH 02/14] MIPS: OCTEON: support additional interfaces on CN68XX Aaro Koskinen
2015-08-13 13:21 ` [PATCH 03/14] MIPS: OCTEON: support all PIP input ports " Aaro Koskinen
2015-08-13 13:21 ` [PATCH 04/14] MIPS: OCTEON: configure XAUI pkinds Aaro Koskinen
2015-08-13 13:21 ` [PATCH 05/14] MIPS: OCTEON: configure minimum PKO packet sizes on CN68XX Aaro Koskinen
2015-08-13 13:21 ` [PATCH 06/14] MIPS: OCTEON: add definitions for setting up SSO Aaro Koskinen
2015-08-13 13:21 ` [PATCH 07/14] MIPS/staging: OCTEON: properly enable/disable SSO WQE interrupts Aaro Koskinen
2015-08-13 13:21 ` [PATCH 08/14] MIPS/staging: OCTEON: set SSO group mask properly on CN68XX Aaro Koskinen
2015-08-13 13:21 ` [PATCH 09/14] MIPS/staging: OCTEON: increase output command buffers Aaro Koskinen
2015-08-13 13:21 ` [PATCH 10/14] MIPS/staging: OCTEON: support CN68XX style WQE Aaro Koskinen
2015-08-13 13:21 ` [PATCH 11/14] MIPS: OCTEON: initialize CN68XX PKO Aaro Koskinen
2015-08-13 13:21 ` [PATCH 12/14] MIPS: OCTEON: set up 1:1 mapping between CN68XX PKO queues and ports Aaro Koskinen
2015-08-13 13:21 ` Aaro Koskinen [this message]
2015-08-13 13:21 ` [PATCH 14/14] MIPS/staging: OCTEON: use common helpers for determining interface and port Aaro Koskinen
2015-08-13 19:16 ` [PATCH 00/14] MIPS/staging: OCTEON: enable ethernet/xaui on CN68XX David Daney
2015-08-13 19:16   ` David Daney
2015-08-14 13:09   ` Aaro Koskinen
2015-08-14 19:49     ` David Daney
2015-08-14 19:49       ` David Daney
2015-08-19 19:40       ` Ralf Baechle

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=1439472106-7750-14-git-send-email-aaro.koskinen@nokia.com \
    --to=aaro.koskinen@nokia.com \
    --cc=ddaney.cavm@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=janne.huttunen@nokia.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /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).