Skip to contentSkip to conversation

x86/platform/mellanox: introduce support for Mellanox systems platform

PATCH Superseded [email protected] 2 participants 2 messages Sep 19, 2016

Subsystems (2)

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 x86/platform/mellanox: introduce support for Mellanox systems platform

From: Vadim Pasternak <[email protected]>

Enable system support for the Mellanox Technologies platform, which provides support for the next Mellanox basic systems: "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410", "msb7800", "msn2740", "msn2100" and also various number of derivative systems from the above basic types.

The Kconfig currently controlling compilation of this code is:
arch/x86/platform:config MLX_PLATFORM
arch/x86/platform: tristate "Mellanox Technologies platform support"

---
v1->v2:
Comments pointed out by Greg:
- kick out all PCI related code;
v2->v3
Comments pointed out by Guenter:
- remove not directly related depends and selects for Kconfig;
- use single dimensional array for mlxplat_msn21xx_channels;
- define mlxplat_mux_data and mlxplat_priv as static;
- fix line split;
- remove error messages for memory allocation failure;
- change module alias to dmi;

---
 MAINTAINERS                               |   6 +
 arch/x86/Kconfig                          |  15 ++
 arch/x86/platform/Makefile                |   1 +
 arch/x86/platform/mellanox/Makefile       |   1 +
 arch/x86/platform/mellanox/mlx-platform.c | 268 ++++++++++++++++++++++++++++++
 5 files changed, 291 insertions(+)
 create mode 100644 arch/x86/platform/mellanox/Makefile
 create mode 100644 arch/x86/platform/mellanox/mlx-platform.c
MAINTAINERS +6 -0
index 4705c94..98ced39 100644
@@ -7664,6 +7664,12 @@ W:	http://www.mellanox.com
 Q:	http://patchwork.ozlabs.org/project/netdev/list/
 F:	drivers/net/ethernet/mellanox/mlxsw/
 
+MELLANOX PLATFORM DRIVER
+M:      Vadim Pasternak <[email protected]>
+L:      [email protected]
+S:      Supported
+F:      arch/x86/platform/mellanox/mlx-platform.c
+
 SOFT-ROCE DRIVER (rxe)
 M:	Moni Shoua <[email protected]>
 L:	[email protected]
arch/x86/Kconfig +15 -0
index c580d8c..1b4393a 100644
@@ -550,6 +550,21 @@ config X86_INTEL_QUARK
 	  Say Y here if you have a Quark based system such as the Arduino
 	  compatible Intel Galileo.
 
+config MLX_PLATFORM
+	tristate "Mellanox Technologies platform support"
+	depends on X86_64
+	depends on X86_EXTENDED_PLATFORM
+	depends on DMI
+	depends on I2C_MLXCPLD
+	depends on I2C_MUX_REG
+	---help---
+	  This option enables system support for the Mellanox Technologies
+	  platform.
+
+	  Say Y here if you are building a kernel for Mellanox system.
+
+	  Otherwise, say N.
+
 config X86_INTEL_LPSS
 	bool "Intel Low Power Subsystem Support"
 	depends on X86 && ACPI
arch/x86/platform/Makefile +1 -0
index 184842e..3c3c19e 100644
@@ -8,6 +8,7 @@ obj-y	+= iris/
 obj-y	+= intel/
 obj-y	+= intel-mid/
 obj-y	+= intel-quark/
+obj-y	+= mellanox/
 obj-y	+= olpc/
 obj-y	+= scx200/
 obj-y	+= sfi/
arch/x86/platform/mellanox/Makefile new file +1 -0
new file mode 100644
index 0000000..f43c931
@@ -0,0 +1 @@
+obj-$(CONFIG_MLX_PLATFORM)	+= mlx-platform.o
arch/x86/platform/mellanox/mlx-platform.c new file +268 -0

268 lines not on this page · raw message

Signature · 1 line
2.1.4
#1 lore raw

arch/x86/Kconfig config X86_INTEL_QUARK · line 556

Quoted 4 lines · On Mon, 19 Sep 2016, [email protected] wrote:
arch/x86/Kconfig +4 -0
+config MLX_PLATFORM
+	tristate "Mellanox Technologies platform support"
+	depends on X86_64
+	depends on X86_EXTENDED_PLATFORM

I can understand those, but

arch/x86/Kconfig config X86_INTEL_QUARK · line 559

Quoted 3 lines
arch/x86/Kconfig +3 -0
+	depends on DMI
+	depends on I2C_MLXCPLD
+	depends on I2C_MUX_REG

these should be simply selected. I really hate to find all the dependencies and fiddle in a gazillion of menuconfig leafs just to get that stuff compiled.

Thanks,

tglx