2016-10-07 15:18:48

by Pantelis Antoniou

[permalink] [raw]
Subject: [PATCH 0/3] Juniper prerequisites

This patchset contains prerequisites for a number of upcoming
Juniper Inc.'s patches for its PTX series of routers.

The first patch add the jnx vendor entry in the list of vendor-prefixes.
The second introduces a board types header file that userspace
requires for board identification, while the last introduces a
header file containing the known board IDs as of now.

Note that this is the first submission and we expect things to be
moved around as required.

This patchset is against mainline as of today: v4.8-9431-g3477d16

Guenter Roeck (1):
uapi: jnx: Export board types to user space

JawaharBalaji Thirumalaisamy (1):
Documentation: vendor-prefixes: Add DT vendor entry "jnx"

Rajat Jain (1):
jnx: Introduce board_ids.h

.../devicetree/bindings/vendor-prefixes.txt | 1 +
include/linux/jnx/board_ids.h | 31 ++++++++++++++++++
include/uapi/linux/Kbuild | 1 +
include/uapi/linux/jnx/Kbuild | 2 ++
include/uapi/linux/jnx/jnx-subsys.h | 38 ++++++++++++++++++++++
5 files changed, 73 insertions(+)
create mode 100644 include/linux/jnx/board_ids.h
create mode 100644 include/uapi/linux/jnx/Kbuild
create mode 100644 include/uapi/linux/jnx/jnx-subsys.h

--
1.9.1


2016-10-07 15:18:43

by Pantelis Antoniou

[permalink] [raw]
Subject: [PATCH 1/3] Documentation: vendor-prefixes: Add DT vendor entry "jnx"

From: JawaharBalaji Thirumalaisamy <[email protected]>

Add a vendor-prefix for Juniper which is set to "jnx"

Signed-off-by: JawaharBalaji Thirumalaisamy <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
[Ported from Juniper kernel]
Signed-off-by: Pantelis Antoniou <[email protected]>
---
Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 77e985f..044dc36 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -143,6 +143,7 @@ isil Intersil
issi Integrated Silicon Solutions Inc.
jdi Japan Display Inc.
jedec JEDEC Solid State Technology Association
+jnx Juniper Networks, Inc.
karo Ka-Ro electronics GmbH
keithkoep Keith & Koep GmbH
keymile Keymile GmbH
--
1.9.1

2016-10-07 15:18:45

by Pantelis Antoniou

[permalink] [raw]
Subject: [PATCH 2/3] uapi: jnx: Export board types to user space

From: Guenter Roeck <[email protected]>

Board type definitions are part of the kernel/user ABI and
thus need to be exported.

Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Mohammad Kamil <[email protected]>
[Ported from Juniper kernel]
Signed-off-by: Pantelis Antoniou <[email protected]>
---
include/uapi/linux/Kbuild | 1 +
include/uapi/linux/jnx/Kbuild | 2 ++
include/uapi/linux/jnx/jnx-subsys.h | 38 +++++++++++++++++++++++++++++++++++++
3 files changed, 41 insertions(+)
create mode 100644 include/uapi/linux/jnx/Kbuild
create mode 100644 include/uapi/linux/jnx/jnx-subsys.h

diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index d0352a9..3c83af1 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -8,6 +8,7 @@ header-y += hdlc/
header-y += hsi/
header-y += iio/
header-y += isdn/
+header-y += jnx/
header-y += mmc/
header-y += nfsd/
header-y += raid/
diff --git a/include/uapi/linux/jnx/Kbuild b/include/uapi/linux/jnx/Kbuild
new file mode 100644
index 0000000..bd1ddc6
--- /dev/null
+++ b/include/uapi/linux/jnx/Kbuild
@@ -0,0 +1,2 @@
+# UAPI Header export list
+header-y += jnx-subsys.h
diff --git a/include/uapi/linux/jnx/jnx-subsys.h b/include/uapi/linux/jnx/jnx-subsys.h
new file mode 100644
index 0000000..5bb9ea8
--- /dev/null
+++ b/include/uapi/linux/jnx/jnx-subsys.h
@@ -0,0 +1,38 @@
+/*
+ * Juniper board type definitions
+ *
+ * These definitions are needed by user-space applications.
+ *
+ * Copyright (C) 2012-2014 Juniper Networks. 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 as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef _UAPI_JNX_SUBSYS_H
+#define _UAPI_JNX_SUBSYS_H
+
+/*
+ * Juniper Board Type Definitions
+ */
+#define JNX_BOARD_TYPE_UNKNOWN 0
+#define JNX_BOARD_TYPE_RE 1
+#define JNX_BOARD_TYPE_FPC 2
+#define JNX_BOARD_TYPE_SPMB 3
+#define JNX_BOARD_TYPE_CB 4
+#define JNX_BOARD_TYPE_PS 5
+#define JNX_BOARD_TYPE_FAN 6
+#define JNX_BOARD_TYPE_FPM 7
+#define JNX_BOARD_TYPE_CG 8
+#define JNX_BOARD_TYPE_MIDPLANE 9
+#define JNX_BOARD_TYPE_PIC 10
+#define JNX_BOARD_TYPE_SIB 11
+
+#endif /* _UAPI_JNX_SUBSYS_H */
--
1.9.1

2016-10-07 15:21:02

by Pantelis Antoniou

[permalink] [raw]
Subject: [PATCH 3/3] jnx: Introduce board_ids.h

From: Rajat Jain <[email protected]>

Introduce header file to contain the Juniper Assembly IDs.

Signed-off-by: Mohammad Kamil <[email protected]>
Signed-off-by: Rajat Jain <[email protected]>
Signed-off-by: Debjit Ghosh <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
[Ported from Juniper kernel]
Signed-off-by: Pantelis Antoniou <[email protected]>
---
include/linux/jnx/board_ids.h | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 include/linux/jnx/board_ids.h

diff --git a/include/linux/jnx/board_ids.h b/include/linux/jnx/board_ids.h
new file mode 100644
index 0000000..74ce25a
--- /dev/null
+++ b/include/linux/jnx/board_ids.h
@@ -0,0 +1,31 @@
+/*
+ * Juniper Assembly ID(s) - for Juniper Boards
+ *
+ * Rajat Jain <[email protected]>
+ * Copyright (c) 2014 Juniper Networks
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+#ifndef __JNX_BOARD_IDS__
+#define __JNX_BOARD_IDS__
+
+#define JNX_ID_SNG_CB 0x09B3 /* Sangria Control Board */
+#define JNX_ID_SNG_PMB 0x09B7 /* Sangria CB/FPC PMB Board */
+#define JNX_ID_SNG_VDV_BASE_P2 0x09BC /* Sangria Vaudville FPC Base P2 */
+#define JNX_ID_HENDRICKS_FPC_P2 0x0B9B /* Hendricks FPC (new Serdes added) */
+#define JNX_ID_HENDRICKS_CB 0x0BA8 /* Hendricks Control Board */
+#define JNX_ID_GLD_2T_FPC 0x0BF9 /* Gladiator 2T FPC */
+#define JNX_ID_GLD_3T_FPC 0x0BFA /* Gladiator 3T FPC */
+#define JNX_ID_POLARIS_RCB 0x0C09 /* Polaris RCB */
+#define JNX_ID_POLARIS_MLC 0x0C0A /* Polaris Mono Line Card */
+#define JNX_ID_POLARIS_RCB_P2 0x0C51 /* Polaris RCB P2 */
+#define JNX_ID_OMEGA_RCB 0x0C6B /* Omega RCB */
+
+#endif /* __JNX_BOARD_IDS__ */
--
1.9.1

2016-10-10 17:12:25

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 1/3] Documentation: vendor-prefixes: Add DT vendor entry "jnx"

On Fri, Oct 07, 2016 at 06:15:23PM +0300, Pantelis Antoniou wrote:
> From: JawaharBalaji Thirumalaisamy <[email protected]>
>
> Add a vendor-prefix for Juniper which is set to "jnx"
>
> Signed-off-by: JawaharBalaji Thirumalaisamy <[email protected]>
> Signed-off-by: Guenter Roeck <[email protected]>
> [Ported from Juniper kernel]
> Signed-off-by: Pantelis Antoniou <[email protected]>
> ---
> Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
> index 77e985f..044dc36 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> @@ -143,6 +143,7 @@ isil Intersil
> issi Integrated Silicon Solutions Inc.
> jdi Japan Display Inc.
> jedec JEDEC Solid State Technology Association
> +jnx Juniper Networks, Inc.

Why not the ticker jnpr?

> karo Ka-Ro electronics GmbH
> keithkoep Keith & Koep GmbH
> keymile Keymile GmbH
> --
> 1.9.1
>