RE: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-13 Thread Vadim Pasternak


> -Original Message-
> From: Ingo Molnar [mailto:mingo.kernel@gmail.com] On Behalf Of Ingo
> Molnar
> Sent: Monday, September 12, 2016 2:01 PM
> To: Greg KH <gre...@linuxfoundation.org>
> Cc: Geert Uytterhoeven <ge...@linux-m68k.org>; Vadim Pasternak
> <vad...@mellanox.com>; t...@linutronix.de; mi...@redhat.com;
> h...@zytor.com; da...@davemloft.net; a...@linux-foundation.org;
> kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox
> systems platform
> 
> 
> * Greg KH <gre...@linuxfoundation.org> wrote:
> 
> > On Mon, Sep 12, 2016 at 11:14:26AM +0200, Geert Uytterhoeven wrote:
> > > On Mon, Sep 12, 2016 at 10:34 AM, Greg KH <gre...@linuxfoundation.org>
> wrote:
> > > >> This is LPC to I2C bridge.
> > > >
> > > > "LPC"?
> > >
> > > https://en.wikipedia.org/wiki/Low_Pin_Count
> > >
> > > "Modern ISA"
> >
> > So my original point stands, 1990's technology being used for brand
> > new devices today, ugh :(
> >
> > Someone needs to go kick some hardware designers...
> 
> In their defense, "this is a carbon copy of published 1990s technology" is a 
> pretty
> good starting point for a defendant, in patent litigation.
> 

I understood your comments regarding undiscoverable busses.
But we use LPC on all our x86 based systems.
I have to activate all platform related stuff from some place and we don't 
support ACPI.

Do you think it would be OK, if I'll remove all PCI related code, make use of 
DMI and leave only platform activation code?
If yes, I'll re-work this driver and re-send it for your review.

Thanks,
Vadim.




> Thanks,
> 
>   Ingo


RE: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-13 Thread Vadim Pasternak


> -Original Message-
> From: Ingo Molnar [mailto:mingo.kernel@gmail.com] On Behalf Of Ingo
> Molnar
> Sent: Monday, September 12, 2016 2:01 PM
> To: Greg KH 
> Cc: Geert Uytterhoeven ; Vadim Pasternak
> ; t...@linutronix.de; mi...@redhat.com;
> h...@zytor.com; da...@davemloft.net; a...@linux-foundation.org;
> kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox
> systems platform
> 
> 
> * Greg KH  wrote:
> 
> > On Mon, Sep 12, 2016 at 11:14:26AM +0200, Geert Uytterhoeven wrote:
> > > On Mon, Sep 12, 2016 at 10:34 AM, Greg KH 
> wrote:
> > > >> This is LPC to I2C bridge.
> > > >
> > > > "LPC"?
> > >
> > > https://en.wikipedia.org/wiki/Low_Pin_Count
> > >
> > > "Modern ISA"
> >
> > So my original point stands, 1990's technology being used for brand
> > new devices today, ugh :(
> >
> > Someone needs to go kick some hardware designers...
> 
> In their defense, "this is a carbon copy of published 1990s technology" is a 
> pretty
> good starting point for a defendant, in patent litigation.
> 

I understood your comments regarding undiscoverable busses.
But we use LPC on all our x86 based systems.
I have to activate all platform related stuff from some place and we don't 
support ACPI.

Do you think it would be OK, if I'll remove all PCI related code, make use of 
DMI and leave only platform activation code?
If yes, I'll re-work this driver and re-send it for your review.

Thanks,
Vadim.




> Thanks,
> 
>   Ingo


RE: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-13 Thread Vadim Pasternak


> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Tuesday, September 13, 2016 11:12 AM
> To: Vadim Pasternak <vad...@mellanox.com>
> Cc: Ingo Molnar <mi...@kernel.org>; Geert Uytterhoeven <geert@linux-
> m68k.org>; t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> da...@davemloft.net; a...@linux-foundation.org; kv...@codeaurora.org;
> mche...@kernel.org; li...@roeck-us.net; x...@kernel.org; linux-
> ker...@vger.kernel.org; platform-driver-...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox
> systems platform
> 
> On Tue, Sep 13, 2016 at 07:27:20AM +, Vadim Pasternak wrote:
> >
> >
> > > -Original Message-
> > > From: Ingo Molnar [mailto:mingo.kernel@gmail.com] On Behalf Of
> > > Ingo Molnar
> > > Sent: Monday, September 12, 2016 2:01 PM
> > > To: Greg KH <gre...@linuxfoundation.org>
> > > Cc: Geert Uytterhoeven <ge...@linux-m68k.org>; Vadim Pasternak
> > > <vad...@mellanox.com>; t...@linutronix.de; mi...@redhat.com;
> > > h...@zytor.com; da...@davemloft.net; a...@linux-foundation.org;
> > > kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> > > x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> > > x...@vger.kernel.org; j...@resnulli.us
> > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for
> > > Mellanox systems platform
> > >
> > >
> > > * Greg KH <gre...@linuxfoundation.org> wrote:
> > >
> > > > On Mon, Sep 12, 2016 at 11:14:26AM +0200, Geert Uytterhoeven wrote:
> > > > > On Mon, Sep 12, 2016 at 10:34 AM, Greg KH
> > > > > <gre...@linuxfoundation.org>
> > > wrote:
> > > > > >> This is LPC to I2C bridge.
> > > > > >
> > > > > > "LPC"?
> > > > >
> > > > > https://en.wikipedia.org/wiki/Low_Pin_Count
> > > > >
> > > > > "Modern ISA"
> > > >
> > > > So my original point stands, 1990's technology being used for
> > > > brand new devices today, ugh :(
> > > >
> > > > Someone needs to go kick some hardware designers...
> > >
> > > In their defense, "this is a carbon copy of published 1990s
> > > technology" is a pretty good starting point for a defendant, in patent
> litigation.
> > >
> >
> > I understood your comments regarding undiscoverable busses.
> > But we use LPC on all our x86 based systems.
> > I have to activate all platform related stuff from some place and we
> > don't support ACPI.
> 
> x86 that doesn't support ACPI?  That's sad :(

Yes.
But we should make a decision for the coming platform - to provide ACPI support 
for board specific stuff, or equip the new systems with BMC (so we'll introduce 
all board related stuff through DTS).
But currently this is our reality. Me also sad.

> 
> > Do you think it would be OK, if I'll remove all PCI related code, make
> > use of DMI and leave only platform activation code?
> > If yes, I'll re-work this driver and re-send it for your review.
> 
> Yes, that sounds like a good start, let's see how the code looks after doing 
> that.

Sure. I'll do it.
Thank you very much for your comments.

Thanks,

Vadim
> 
> thanks,
> 
> greg k-h


RE: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-13 Thread Vadim Pasternak


> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Tuesday, September 13, 2016 11:12 AM
> To: Vadim Pasternak 
> Cc: Ingo Molnar ; Geert Uytterhoeven  m68k.org>; t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> da...@davemloft.net; a...@linux-foundation.org; kv...@codeaurora.org;
> mche...@kernel.org; li...@roeck-us.net; x...@kernel.org; linux-
> ker...@vger.kernel.org; platform-driver-...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox
> systems platform
> 
> On Tue, Sep 13, 2016 at 07:27:20AM +, Vadim Pasternak wrote:
> >
> >
> > > -Original Message-
> > > From: Ingo Molnar [mailto:mingo.kernel@gmail.com] On Behalf Of
> > > Ingo Molnar
> > > Sent: Monday, September 12, 2016 2:01 PM
> > > To: Greg KH 
> > > Cc: Geert Uytterhoeven ; Vadim Pasternak
> > > ; t...@linutronix.de; mi...@redhat.com;
> > > h...@zytor.com; da...@davemloft.net; a...@linux-foundation.org;
> > > kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> > > x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> > > x...@vger.kernel.org; j...@resnulli.us
> > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for
> > > Mellanox systems platform
> > >
> > >
> > > * Greg KH  wrote:
> > >
> > > > On Mon, Sep 12, 2016 at 11:14:26AM +0200, Geert Uytterhoeven wrote:
> > > > > On Mon, Sep 12, 2016 at 10:34 AM, Greg KH
> > > > > 
> > > wrote:
> > > > > >> This is LPC to I2C bridge.
> > > > > >
> > > > > > "LPC"?
> > > > >
> > > > > https://en.wikipedia.org/wiki/Low_Pin_Count
> > > > >
> > > > > "Modern ISA"
> > > >
> > > > So my original point stands, 1990's technology being used for
> > > > brand new devices today, ugh :(
> > > >
> > > > Someone needs to go kick some hardware designers...
> > >
> > > In their defense, "this is a carbon copy of published 1990s
> > > technology" is a pretty good starting point for a defendant, in patent
> litigation.
> > >
> >
> > I understood your comments regarding undiscoverable busses.
> > But we use LPC on all our x86 based systems.
> > I have to activate all platform related stuff from some place and we
> > don't support ACPI.
> 
> x86 that doesn't support ACPI?  That's sad :(

Yes.
But we should make a decision for the coming platform - to provide ACPI support 
for board specific stuff, or equip the new systems with BMC (so we'll introduce 
all board related stuff through DTS).
But currently this is our reality. Me also sad.

> 
> > Do you think it would be OK, if I'll remove all PCI related code, make
> > use of DMI and leave only platform activation code?
> > If yes, I'll re-work this driver and re-send it for your review.
> 
> Yes, that sounds like a good start, let's see how the code looks after doing 
> that.

Sure. I'll do it.
Thank you very much for your comments.

Thanks,

Vadim
> 
> thanks,
> 
> greg k-h


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-13 Thread Greg KH
On Tue, Sep 13, 2016 at 07:27:20AM +, Vadim Pasternak wrote:
> 
> 
> > -Original Message-
> > From: Ingo Molnar [mailto:mingo.kernel@gmail.com] On Behalf Of Ingo
> > Molnar
> > Sent: Monday, September 12, 2016 2:01 PM
> > To: Greg KH <gre...@linuxfoundation.org>
> > Cc: Geert Uytterhoeven <ge...@linux-m68k.org>; Vadim Pasternak
> > <vad...@mellanox.com>; t...@linutronix.de; mi...@redhat.com;
> > h...@zytor.com; da...@davemloft.net; a...@linux-foundation.org;
> > kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> > x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> > x...@vger.kernel.org; j...@resnulli.us
> > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for 
> > Mellanox
> > systems platform
> > 
> > 
> > * Greg KH <gre...@linuxfoundation.org> wrote:
> > 
> > > On Mon, Sep 12, 2016 at 11:14:26AM +0200, Geert Uytterhoeven wrote:
> > > > On Mon, Sep 12, 2016 at 10:34 AM, Greg KH <gre...@linuxfoundation.org>
> > wrote:
> > > > >> This is LPC to I2C bridge.
> > > > >
> > > > > "LPC"?
> > > >
> > > > https://en.wikipedia.org/wiki/Low_Pin_Count
> > > >
> > > > "Modern ISA"
> > >
> > > So my original point stands, 1990's technology being used for brand
> > > new devices today, ugh :(
> > >
> > > Someone needs to go kick some hardware designers...
> > 
> > In their defense, "this is a carbon copy of published 1990s technology" is 
> > a pretty
> > good starting point for a defendant, in patent litigation.
> > 
> 
> I understood your comments regarding undiscoverable busses.
> But we use LPC on all our x86 based systems.
> I have to activate all platform related stuff from some place and we
> don't support ACPI.

x86 that doesn't support ACPI?  That's sad :(

> Do you think it would be OK, if I'll remove all PCI related code, make
> use of DMI and leave only platform activation code?
> If yes, I'll re-work this driver and re-send it for your review.

Yes, that sounds like a good start, let's see how the code looks after
doing that.

thanks,

greg k-h


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-13 Thread Greg KH
On Tue, Sep 13, 2016 at 07:27:20AM +, Vadim Pasternak wrote:
> 
> 
> > -Original Message-
> > From: Ingo Molnar [mailto:mingo.kernel@gmail.com] On Behalf Of Ingo
> > Molnar
> > Sent: Monday, September 12, 2016 2:01 PM
> > To: Greg KH 
> > Cc: Geert Uytterhoeven ; Vadim Pasternak
> > ; t...@linutronix.de; mi...@redhat.com;
> > h...@zytor.com; da...@davemloft.net; a...@linux-foundation.org;
> > kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> > x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> > x...@vger.kernel.org; j...@resnulli.us
> > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for 
> > Mellanox
> > systems platform
> > 
> > 
> > * Greg KH  wrote:
> > 
> > > On Mon, Sep 12, 2016 at 11:14:26AM +0200, Geert Uytterhoeven wrote:
> > > > On Mon, Sep 12, 2016 at 10:34 AM, Greg KH 
> > wrote:
> > > > >> This is LPC to I2C bridge.
> > > > >
> > > > > "LPC"?
> > > >
> > > > https://en.wikipedia.org/wiki/Low_Pin_Count
> > > >
> > > > "Modern ISA"
> > >
> > > So my original point stands, 1990's technology being used for brand
> > > new devices today, ugh :(
> > >
> > > Someone needs to go kick some hardware designers...
> > 
> > In their defense, "this is a carbon copy of published 1990s technology" is 
> > a pretty
> > good starting point for a defendant, in patent litigation.
> > 
> 
> I understood your comments regarding undiscoverable busses.
> But we use LPC on all our x86 based systems.
> I have to activate all platform related stuff from some place and we
> don't support ACPI.

x86 that doesn't support ACPI?  That's sad :(

> Do you think it would be OK, if I'll remove all PCI related code, make
> use of DMI and leave only platform activation code?
> If yes, I'll re-work this driver and re-send it for your review.

Yes, that sounds like a good start, let's see how the code looks after
doing that.

thanks,

greg k-h


RE: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Vadim Pasternak


> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Monday, September 12, 2016 10:41 AM
> To: Vadim Pasternak <vad...@mellanox.com>
> Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> da...@davemloft.net; ge...@linux-m68k.org; a...@linux-foundation.org;
> kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox
> systems platform
> 
> On Mon, Sep 12, 2016 at 07:23:59AM +, Vadim Pasternak wrote:
> >
> >
> > > -Original Message-
> > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > Sent: Monday, September 12, 2016 10:05 AM
> > > To: Vadim Pasternak <vad...@mellanox.com>
> > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > da...@davemloft.net; ge...@linux-m68k.org;
> > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > li...@roeck-us.net; x...@kernel.org; linux-kernel@vger.kernel.org;
> > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for
> > > Mellanox systems platform
> > >
> > > On Mon, Sep 12, 2016 at 06:44:03AM +, Vadim Pasternak wrote:
> > > >
> > > >
> > > > > -Original Message-
> > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > Sent: Monday, September 12, 2016 9:13 AM
> > > > > To: Vadim Pasternak <vad...@mellanox.com>
> > > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > > a...@linux-foundation.org; kv...@codeaurora.org;
> > > > > mche...@kernel.org; li...@roeck-us.net; x...@kernel.org;
> > > > > linux-kernel@vger.kernel.org;
> > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support
> > > > > for Mellanox systems platform
> > > > >
> > > > > On Mon, Sep 12, 2016 at 06:29:58AM +, vad...@mellanox.com
> wrote:
> > > > > > From: Vadim Pasternak <vad...@mellanox.com>
> > > > > >
> > > > > > 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.
> > > > >
> > > > > What does "system support" mean?
> > > > >
> > > > > Why can't this just be a "normal" PCI driver, as you are just
> > > > > accessing a PCI device and doing something with it, seems odd to
> > > > > claim it is a
> > > "platform" driver.
> > > > >
> > > >
> > > > This driver also activates probes to create i2c platform driver and 
> > > > muxes.
> > >
> > > And how does it do that?  Through the PCI device?
> > >
> > > > For ARM and PPC based systems I can activate such stuff through dts.
> > > > To be honest I don't know what is the right way to do such things
> > > > for
> > > > x86 systems.
> > >
> > > How is it found in a x86 system, in ACPI?
> > >
> >
> > We have no support in ACPI.
> > Currently it could be found through DMI.
> >
> > > > If I will move PCI related stuff to separate driver, could you
> > > > suggest some right location for that?
> > >
> > > Depends on what it does.
> >
> > It creates platform i2c driver (Mellanox controller), like:
> > platform_device_register_simple("i2c_mlxcpld", -1,
> >  NULL, 0); And
> > two mux platform device instances, like:
> > platform_device_register_resndata(dev,
> > " i2c-mux-reg", i, NULL,
> > 0, _mux_data[i],
> >
> > sizeof(mlxplat_mux_data[i]));
> 
> Ugh.  Really?  These aren't on a real bus?  What is this, the 1990's?

Actually this is 2015-2016.
Many switches use i2c virtual buses infrastructure for placing slow devices for 
system monitoring and control.

> 
> Ok, a DMI driver for these makes sense in the platform directory to me, but 
> you
> have to convince the maintainer of this subsystem :)
> 
> And rip all of that PCI stuff out, that belongs in a PCI driver.
> 
Thank you very much for all your inputs.

> thanks,
> 
> greg k-h

Thanks,

Vadim.


RE: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Vadim Pasternak


> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Monday, September 12, 2016 10:41 AM
> To: Vadim Pasternak 
> Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> da...@davemloft.net; ge...@linux-m68k.org; a...@linux-foundation.org;
> kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox
> systems platform
> 
> On Mon, Sep 12, 2016 at 07:23:59AM +, Vadim Pasternak wrote:
> >
> >
> > > -Original Message-
> > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > Sent: Monday, September 12, 2016 10:05 AM
> > > To: Vadim Pasternak 
> > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > da...@davemloft.net; ge...@linux-m68k.org;
> > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > li...@roeck-us.net; x...@kernel.org; linux-kernel@vger.kernel.org;
> > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for
> > > Mellanox systems platform
> > >
> > > On Mon, Sep 12, 2016 at 06:44:03AM +, Vadim Pasternak wrote:
> > > >
> > > >
> > > > > -Original Message-
> > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > Sent: Monday, September 12, 2016 9:13 AM
> > > > > To: Vadim Pasternak 
> > > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > > a...@linux-foundation.org; kv...@codeaurora.org;
> > > > > mche...@kernel.org; li...@roeck-us.net; x...@kernel.org;
> > > > > linux-kernel@vger.kernel.org;
> > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support
> > > > > for Mellanox systems platform
> > > > >
> > > > > On Mon, Sep 12, 2016 at 06:29:58AM +, vad...@mellanox.com
> wrote:
> > > > > > From: Vadim Pasternak 
> > > > > >
> > > > > > 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.
> > > > >
> > > > > What does "system support" mean?
> > > > >
> > > > > Why can't this just be a "normal" PCI driver, as you are just
> > > > > accessing a PCI device and doing something with it, seems odd to
> > > > > claim it is a
> > > "platform" driver.
> > > > >
> > > >
> > > > This driver also activates probes to create i2c platform driver and 
> > > > muxes.
> > >
> > > And how does it do that?  Through the PCI device?
> > >
> > > > For ARM and PPC based systems I can activate such stuff through dts.
> > > > To be honest I don't know what is the right way to do such things
> > > > for
> > > > x86 systems.
> > >
> > > How is it found in a x86 system, in ACPI?
> > >
> >
> > We have no support in ACPI.
> > Currently it could be found through DMI.
> >
> > > > If I will move PCI related stuff to separate driver, could you
> > > > suggest some right location for that?
> > >
> > > Depends on what it does.
> >
> > It creates platform i2c driver (Mellanox controller), like:
> > platform_device_register_simple("i2c_mlxcpld", -1,
> >  NULL, 0); And
> > two mux platform device instances, like:
> > platform_device_register_resndata(dev,
> > " i2c-mux-reg", i, NULL,
> > 0, _mux_data[i],
> >
> > sizeof(mlxplat_mux_data[i]));
> 
> Ugh.  Really?  These aren't on a real bus?  What is this, the 1990's?

Actually this is 2015-2016.
Many switches use i2c virtual buses infrastructure for placing slow devices for 
system monitoring and control.

> 
> Ok, a DMI driver for these makes sense in the platform directory to me, but 
> you
> have to convince the maintainer of this subsystem :)
> 
> And rip all of that PCI stuff out, that belongs in a PCI driver.
> 
Thank you very much for all your inputs.

> thanks,
> 
> greg k-h

Thanks,

Vadim.


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Ingo Molnar

* Greg KH  wrote:

> On Mon, Sep 12, 2016 at 11:14:26AM +0200, Geert Uytterhoeven wrote:
> > On Mon, Sep 12, 2016 at 10:34 AM, Greg KH  
> > wrote:
> > >> This is LPC to I2C bridge.
> > >
> > > "LPC"?
> > 
> > https://en.wikipedia.org/wiki/Low_Pin_Count
> > 
> > "Modern ISA"
> 
> So my original point stands, 1990's technology being used for brand new
> devices today, ugh :(
> 
> Someone needs to go kick some hardware designers...

In their defense, "this is a carbon copy of published 1990s technology" is a 
pretty good starting point for a defendant, in patent litigation.

Thanks,

Ingo


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Ingo Molnar

* Greg KH  wrote:

> On Mon, Sep 12, 2016 at 11:14:26AM +0200, Geert Uytterhoeven wrote:
> > On Mon, Sep 12, 2016 at 10:34 AM, Greg KH  
> > wrote:
> > >> This is LPC to I2C bridge.
> > >
> > > "LPC"?
> > 
> > https://en.wikipedia.org/wiki/Low_Pin_Count
> > 
> > "Modern ISA"
> 
> So my original point stands, 1990's technology being used for brand new
> devices today, ugh :(
> 
> Someone needs to go kick some hardware designers...

In their defense, "this is a carbon copy of published 1990s technology" is a 
pretty good starting point for a defendant, in patent litigation.

Thanks,

Ingo


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Geert Uytterhoeven
On Mon, Sep 12, 2016 at 12:21 PM, Greg KH  wrote:
> On Mon, Sep 12, 2016 at 11:14:26AM +0200, Geert Uytterhoeven wrote:
>> On Mon, Sep 12, 2016 at 10:34 AM, Greg KH  wrote:
>> >> This is LPC to I2C bridge.
>> >
>> > "LPC"?
>>
>> https://en.wikipedia.org/wiki/Low_Pin_Count
>>
>> "Modern ISA"
>
> So my original point stands, 1990's technology being used for brand new
> devices today, ugh :(
>
> Someone needs to go kick some hardware designers...

Non-discoverable buses are everywhere these days.

If only we had some machine-readable language to describe hardware topology.
Oh wait...

http://lmgtfy.com/?q=return+of+the+non-discoverable+buses

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Geert Uytterhoeven
On Mon, Sep 12, 2016 at 12:21 PM, Greg KH  wrote:
> On Mon, Sep 12, 2016 at 11:14:26AM +0200, Geert Uytterhoeven wrote:
>> On Mon, Sep 12, 2016 at 10:34 AM, Greg KH  wrote:
>> >> This is LPC to I2C bridge.
>> >
>> > "LPC"?
>>
>> https://en.wikipedia.org/wiki/Low_Pin_Count
>>
>> "Modern ISA"
>
> So my original point stands, 1990's technology being used for brand new
> devices today, ugh :(
>
> Someone needs to go kick some hardware designers...

Non-discoverable buses are everywhere these days.

If only we had some machine-readable language to describe hardware topology.
Oh wait...

http://lmgtfy.com/?q=return+of+the+non-discoverable+buses

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Greg KH
On Mon, Sep 12, 2016 at 11:14:26AM +0200, Geert Uytterhoeven wrote:
> On Mon, Sep 12, 2016 at 10:34 AM, Greg KH  wrote:
> >> This is LPC to I2C bridge.
> >
> > "LPC"?
> 
> https://en.wikipedia.org/wiki/Low_Pin_Count
> 
> "Modern ISA"

So my original point stands, 1990's technology being used for brand new
devices today, ugh :(

Someone needs to go kick some hardware designers...

greg k-h


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Greg KH
On Mon, Sep 12, 2016 at 11:14:26AM +0200, Geert Uytterhoeven wrote:
> On Mon, Sep 12, 2016 at 10:34 AM, Greg KH  wrote:
> >> This is LPC to I2C bridge.
> >
> > "LPC"?
> 
> https://en.wikipedia.org/wiki/Low_Pin_Count
> 
> "Modern ISA"

So my original point stands, 1990's technology being used for brand new
devices today, ugh :(

Someone needs to go kick some hardware designers...

greg k-h


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Geert Uytterhoeven
On Mon, Sep 12, 2016 at 10:34 AM, Greg KH  wrote:
>> This is LPC to I2C bridge.
>
> "LPC"?

https://en.wikipedia.org/wiki/Low_Pin_Count

"Modern ISA"

>> Controller logic is implemented in Lattice CPLD. CPLD itself is attached to 
>> LPC.
>
> And how is the CPLD attached to the CPU?

Via LPC, I guess.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Geert Uytterhoeven
On Mon, Sep 12, 2016 at 10:34 AM, Greg KH  wrote:
>> This is LPC to I2C bridge.
>
> "LPC"?

https://en.wikipedia.org/wiki/Low_Pin_Count

"Modern ISA"

>> Controller logic is implemented in Lattice CPLD. CPLD itself is attached to 
>> LPC.
>
> And how is the CPLD attached to the CPU?

Via LPC, I guess.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


RE: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Vadim Pasternak


> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Monday, September 12, 2016 11:35 AM
> To: Vadim Pasternak <vad...@mellanox.com>
> Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> da...@davemloft.net; ge...@linux-m68k.org; a...@linux-foundation.org;
> kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox
> systems platform
> 
> On Mon, Sep 12, 2016 at 08:21:28AM +, Vadim Pasternak wrote:
> >
> >
> > > -Original Message-
> > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > Sent: Monday, September 12, 2016 11:17 AM
> > > To: Vadim Pasternak <vad...@mellanox.com>
> > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > da...@davemloft.net; ge...@linux-m68k.org;
> > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > li...@roeck-us.net; x...@kernel.org; linux-kernel@vger.kernel.org;
> > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for
> > > Mellanox systems platform
> > >
> > > On Mon, Sep 12, 2016 at 07:48:24AM +, Vadim Pasternak wrote:
> > > >
> > > >
> > > > > -Original Message-
> > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > Sent: Monday, September 12, 2016 10:41 AM
> > > > > To: Vadim Pasternak <vad...@mellanox.com>
> > > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > > a...@linux-foundation.org; kv...@codeaurora.org;
> > > > > mche...@kernel.org; li...@roeck-us.net; x...@kernel.org;
> > > > > linux-kernel@vger.kernel.org;
> > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support
> > > > > for Mellanox systems platform
> > > > >
> > > > > On Mon, Sep 12, 2016 at 07:23:59AM +, Vadim Pasternak wrote:
> > > > > >
> > > > > >
> > > > > > > -Original Message-
> > > > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > > > Sent: Monday, September 12, 2016 10:05 AM
> > > > > > > To: Vadim Pasternak <vad...@mellanox.com>
> > > > > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > > > > a...@linux-foundation.org; kv...@codeaurora.org;
> > > > > > > mche...@kernel.org; li...@roeck-us.net; x...@kernel.org;
> > > > > > > linux-kernel@vger.kernel.org;
> > > > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce
> > > > > > > support for Mellanox systems platform
> > > > > > >
> > > > > > > On Mon, Sep 12, 2016 at 06:44:03AM +0000, Vadim Pasternak wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > > > -Original Message-
> > > > > > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > > > > > Sent: Monday, September 12, 2016 9:13 AM
> > > > > > > > > To: Vadim Pasternak <vad...@mellanox.com>
> > > > > > > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > > > > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > > > > > > a...@linux-foundation.org; kv...@codeaurora.org;
> > > > > > > > > mche...@kernel.org; li...@roeck-us.net; x...@kernel.org;
> > > > > > > > > linux-kernel@vger.kernel.org;
> > > > > > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > > > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce
> > > > > > > > > support for Mellanox systems platform
> > > > > > > > >
> > > > > > > > > On Mon, Sep 12, 2016 at 06:29

RE: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Vadim Pasternak


> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Monday, September 12, 2016 11:35 AM
> To: Vadim Pasternak 
> Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> da...@davemloft.net; ge...@linux-m68k.org; a...@linux-foundation.org;
> kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox
> systems platform
> 
> On Mon, Sep 12, 2016 at 08:21:28AM +, Vadim Pasternak wrote:
> >
> >
> > > -Original Message-
> > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > Sent: Monday, September 12, 2016 11:17 AM
> > > To: Vadim Pasternak 
> > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > da...@davemloft.net; ge...@linux-m68k.org;
> > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > li...@roeck-us.net; x...@kernel.org; linux-kernel@vger.kernel.org;
> > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for
> > > Mellanox systems platform
> > >
> > > On Mon, Sep 12, 2016 at 07:48:24AM +, Vadim Pasternak wrote:
> > > >
> > > >
> > > > > -Original Message-
> > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > Sent: Monday, September 12, 2016 10:41 AM
> > > > > To: Vadim Pasternak 
> > > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > > a...@linux-foundation.org; kv...@codeaurora.org;
> > > > > mche...@kernel.org; li...@roeck-us.net; x...@kernel.org;
> > > > > linux-kernel@vger.kernel.org;
> > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support
> > > > > for Mellanox systems platform
> > > > >
> > > > > On Mon, Sep 12, 2016 at 07:23:59AM +, Vadim Pasternak wrote:
> > > > > >
> > > > > >
> > > > > > > -Original Message-
> > > > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > > > Sent: Monday, September 12, 2016 10:05 AM
> > > > > > > To: Vadim Pasternak 
> > > > > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > > > > a...@linux-foundation.org; kv...@codeaurora.org;
> > > > > > > mche...@kernel.org; li...@roeck-us.net; x...@kernel.org;
> > > > > > > linux-kernel@vger.kernel.org;
> > > > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce
> > > > > > > support for Mellanox systems platform
> > > > > > >
> > > > > > > On Mon, Sep 12, 2016 at 06:44:03AM +, Vadim Pasternak wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > > > -Original Message-
> > > > > > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > > > > > Sent: Monday, September 12, 2016 9:13 AM
> > > > > > > > > To: Vadim Pasternak 
> > > > > > > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > > > > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > > > > > > a...@linux-foundation.org; kv...@codeaurora.org;
> > > > > > > > > mche...@kernel.org; li...@roeck-us.net; x...@kernel.org;
> > > > > > > > > linux-kernel@vger.kernel.org;
> > > > > > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > > > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce
> > > > > > > > > support for Mellanox systems platform
> > > > > > > > >
> > > > > > > > > On Mon, Sep 12, 2016 at 06:29:58AM +,
> > > > > > > > > vad...@mellanox.com
> > > > > wrote:
> > > > >

Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Greg KH
On Mon, Sep 12, 2016 at 08:21:28AM +, Vadim Pasternak wrote:
> 
> 
> > -Original Message-
> > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > Sent: Monday, September 12, 2016 11:17 AM
> > To: Vadim Pasternak <vad...@mellanox.com>
> > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > da...@davemloft.net; ge...@linux-m68k.org; a...@linux-foundation.org;
> > kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> > x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> > x...@vger.kernel.org; j...@resnulli.us
> > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for 
> > Mellanox
> > systems platform
> > 
> > On Mon, Sep 12, 2016 at 07:48:24AM +, Vadim Pasternak wrote:
> > >
> > >
> > > > -Original Message-
> > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > Sent: Monday, September 12, 2016 10:41 AM
> > > > To: Vadim Pasternak <vad...@mellanox.com>
> > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > > li...@roeck-us.net; x...@kernel.org; linux-kernel@vger.kernel.org;
> > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for
> > > > Mellanox systems platform
> > > >
> > > > On Mon, Sep 12, 2016 at 07:23:59AM +, Vadim Pasternak wrote:
> > > > >
> > > > >
> > > > > > -Original Message-
> > > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > > Sent: Monday, September 12, 2016 10:05 AM
> > > > > > To: Vadim Pasternak <vad...@mellanox.com>
> > > > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > > > a...@linux-foundation.org; kv...@codeaurora.org;
> > > > > > mche...@kernel.org; li...@roeck-us.net; x...@kernel.org;
> > > > > > linux-kernel@vger.kernel.org;
> > > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support
> > > > > > for Mellanox systems platform
> > > > > >
> > > > > > On Mon, Sep 12, 2016 at 06:44:03AM +, Vadim Pasternak wrote:
> > > > > > >
> > > > > > >
> > > > > > > > -----Original Message-
> > > > > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > > > > Sent: Monday, September 12, 2016 9:13 AM
> > > > > > > > To: Vadim Pasternak <vad...@mellanox.com>
> > > > > > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > > > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > > > > > a...@linux-foundation.org; kv...@codeaurora.org;
> > > > > > > > mche...@kernel.org; li...@roeck-us.net; x...@kernel.org;
> > > > > > > > linux-kernel@vger.kernel.org;
> > > > > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce
> > > > > > > > support for Mellanox systems platform
> > > > > > > >
> > > > > > > > On Mon, Sep 12, 2016 at 06:29:58AM +,
> > > > > > > > vad...@mellanox.com
> > > > wrote:
> > > > > > > > > From: Vadim Pasternak <vad...@mellanox.com>
> > > > > > > > >
> > > > > > > > > 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.
> > > > > &

Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Greg KH
On Mon, Sep 12, 2016 at 08:21:28AM +, Vadim Pasternak wrote:
> 
> 
> > -Original Message-
> > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > Sent: Monday, September 12, 2016 11:17 AM
> > To: Vadim Pasternak 
> > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > da...@davemloft.net; ge...@linux-m68k.org; a...@linux-foundation.org;
> > kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> > x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> > x...@vger.kernel.org; j...@resnulli.us
> > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for 
> > Mellanox
> > systems platform
> > 
> > On Mon, Sep 12, 2016 at 07:48:24AM +, Vadim Pasternak wrote:
> > >
> > >
> > > > -Original Message-
> > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > Sent: Monday, September 12, 2016 10:41 AM
> > > > To: Vadim Pasternak 
> > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > > li...@roeck-us.net; x...@kernel.org; linux-kernel@vger.kernel.org;
> > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for
> > > > Mellanox systems platform
> > > >
> > > > On Mon, Sep 12, 2016 at 07:23:59AM +, Vadim Pasternak wrote:
> > > > >
> > > > >
> > > > > > -Original Message-
> > > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > > Sent: Monday, September 12, 2016 10:05 AM
> > > > > > To: Vadim Pasternak 
> > > > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > > > a...@linux-foundation.org; kv...@codeaurora.org;
> > > > > > mche...@kernel.org; li...@roeck-us.net; x...@kernel.org;
> > > > > > linux-kernel@vger.kernel.org;
> > > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support
> > > > > > for Mellanox systems platform
> > > > > >
> > > > > > On Mon, Sep 12, 2016 at 06:44:03AM +, Vadim Pasternak wrote:
> > > > > > >
> > > > > > >
> > > > > > > > -----Original Message-
> > > > > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > > > > Sent: Monday, September 12, 2016 9:13 AM
> > > > > > > > To: Vadim Pasternak 
> > > > > > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > > > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > > > > > a...@linux-foundation.org; kv...@codeaurora.org;
> > > > > > > > mche...@kernel.org; li...@roeck-us.net; x...@kernel.org;
> > > > > > > > linux-kernel@vger.kernel.org;
> > > > > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce
> > > > > > > > support for Mellanox systems platform
> > > > > > > >
> > > > > > > > On Mon, Sep 12, 2016 at 06:29:58AM +,
> > > > > > > > vad...@mellanox.com
> > > > wrote:
> > > > > > > > > From: Vadim Pasternak 
> > > > > > > > >
> > > > > > > > > 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.
> > > > > > > >
> > > > > > > > What does "system support" mean?
> > > > > > > >

RE: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Vadim Pasternak


> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Monday, September 12, 2016 11:17 AM
> To: Vadim Pasternak <vad...@mellanox.com>
> Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> da...@davemloft.net; ge...@linux-m68k.org; a...@linux-foundation.org;
> kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox
> systems platform
> 
> On Mon, Sep 12, 2016 at 07:48:24AM +, Vadim Pasternak wrote:
> >
> >
> > > -Original Message-
> > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > Sent: Monday, September 12, 2016 10:41 AM
> > > To: Vadim Pasternak <vad...@mellanox.com>
> > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > da...@davemloft.net; ge...@linux-m68k.org;
> > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > li...@roeck-us.net; x...@kernel.org; linux-kernel@vger.kernel.org;
> > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for
> > > Mellanox systems platform
> > >
> > > On Mon, Sep 12, 2016 at 07:23:59AM +, Vadim Pasternak wrote:
> > > >
> > > >
> > > > > -Original Message-
> > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > Sent: Monday, September 12, 2016 10:05 AM
> > > > > To: Vadim Pasternak <vad...@mellanox.com>
> > > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > > a...@linux-foundation.org; kv...@codeaurora.org;
> > > > > mche...@kernel.org; li...@roeck-us.net; x...@kernel.org;
> > > > > linux-kernel@vger.kernel.org;
> > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support
> > > > > for Mellanox systems platform
> > > > >
> > > > > On Mon, Sep 12, 2016 at 06:44:03AM +, Vadim Pasternak wrote:
> > > > > >
> > > > > >
> > > > > > > -Original Message-
> > > > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > > > Sent: Monday, September 12, 2016 9:13 AM
> > > > > > > To: Vadim Pasternak <vad...@mellanox.com>
> > > > > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > > > > a...@linux-foundation.org; kv...@codeaurora.org;
> > > > > > > mche...@kernel.org; li...@roeck-us.net; x...@kernel.org;
> > > > > > > linux-kernel@vger.kernel.org;
> > > > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce
> > > > > > > support for Mellanox systems platform
> > > > > > >
> > > > > > > On Mon, Sep 12, 2016 at 06:29:58AM +,
> > > > > > > vad...@mellanox.com
> > > wrote:
> > > > > > > > From: Vadim Pasternak <vad...@mellanox.com>
> > > > > > > >
> > > > > > > > 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.
> > > > > > >
> > > > > > > What does "system support" mean?
> > > > > > >
> > > > > > > Why can't this just be a "normal" PCI driver, as you are
> > > > > > > just accessing a PCI device and doing something with it,
> > > > > > > seems odd to claim it is a
> > > > > "platform" driver.
> > > > > > >
> > > > &

RE: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Vadim Pasternak


> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Monday, September 12, 2016 11:17 AM
> To: Vadim Pasternak 
> Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> da...@davemloft.net; ge...@linux-m68k.org; a...@linux-foundation.org;
> kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox
> systems platform
> 
> On Mon, Sep 12, 2016 at 07:48:24AM +, Vadim Pasternak wrote:
> >
> >
> > > -Original Message-
> > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > Sent: Monday, September 12, 2016 10:41 AM
> > > To: Vadim Pasternak 
> > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > da...@davemloft.net; ge...@linux-m68k.org;
> > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > li...@roeck-us.net; x...@kernel.org; linux-kernel@vger.kernel.org;
> > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for
> > > Mellanox systems platform
> > >
> > > On Mon, Sep 12, 2016 at 07:23:59AM +, Vadim Pasternak wrote:
> > > >
> > > >
> > > > > -Original Message-
> > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > Sent: Monday, September 12, 2016 10:05 AM
> > > > > To: Vadim Pasternak 
> > > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > > a...@linux-foundation.org; kv...@codeaurora.org;
> > > > > mche...@kernel.org; li...@roeck-us.net; x...@kernel.org;
> > > > > linux-kernel@vger.kernel.org;
> > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support
> > > > > for Mellanox systems platform
> > > > >
> > > > > On Mon, Sep 12, 2016 at 06:44:03AM +, Vadim Pasternak wrote:
> > > > > >
> > > > > >
> > > > > > > -Original Message-
> > > > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > > > Sent: Monday, September 12, 2016 9:13 AM
> > > > > > > To: Vadim Pasternak 
> > > > > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > > > > a...@linux-foundation.org; kv...@codeaurora.org;
> > > > > > > mche...@kernel.org; li...@roeck-us.net; x...@kernel.org;
> > > > > > > linux-kernel@vger.kernel.org;
> > > > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce
> > > > > > > support for Mellanox systems platform
> > > > > > >
> > > > > > > On Mon, Sep 12, 2016 at 06:29:58AM +,
> > > > > > > vad...@mellanox.com
> > > wrote:
> > > > > > > > From: Vadim Pasternak 
> > > > > > > >
> > > > > > > > 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.
> > > > > > >
> > > > > > > What does "system support" mean?
> > > > > > >
> > > > > > > Why can't this just be a "normal" PCI driver, as you are
> > > > > > > just accessing a PCI device and doing something with it,
> > > > > > > seems odd to claim it is a
> > > > > "platform" driver.
> > > > > > >
> > > > > >
> > > > > > This driver also activates probes to create i2c platform driver and
> muxes.
> > > > &g

Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Greg KH
On Mon, Sep 12, 2016 at 07:48:24AM +, Vadim Pasternak wrote:
> 
> 
> > -Original Message-
> > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > Sent: Monday, September 12, 2016 10:41 AM
> > To: Vadim Pasternak <vad...@mellanox.com>
> > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > da...@davemloft.net; ge...@linux-m68k.org; a...@linux-foundation.org;
> > kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> > x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> > x...@vger.kernel.org; j...@resnulli.us
> > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for 
> > Mellanox
> > systems platform
> > 
> > On Mon, Sep 12, 2016 at 07:23:59AM +, Vadim Pasternak wrote:
> > >
> > >
> > > > -Original Message-
> > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > Sent: Monday, September 12, 2016 10:05 AM
> > > > To: Vadim Pasternak <vad...@mellanox.com>
> > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > > li...@roeck-us.net; x...@kernel.org; linux-kernel@vger.kernel.org;
> > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for
> > > > Mellanox systems platform
> > > >
> > > > On Mon, Sep 12, 2016 at 06:44:03AM +, Vadim Pasternak wrote:
> > > > >
> > > > >
> > > > > > -Original Message-
> > > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > > Sent: Monday, September 12, 2016 9:13 AM
> > > > > > To: Vadim Pasternak <vad...@mellanox.com>
> > > > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > > > a...@linux-foundation.org; kv...@codeaurora.org;
> > > > > > mche...@kernel.org; li...@roeck-us.net; x...@kernel.org;
> > > > > > linux-kernel@vger.kernel.org;
> > > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support
> > > > > > for Mellanox systems platform
> > > > > >
> > > > > > On Mon, Sep 12, 2016 at 06:29:58AM +, vad...@mellanox.com
> > wrote:
> > > > > > > From: Vadim Pasternak <vad...@mellanox.com>
> > > > > > >
> > > > > > > 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.
> > > > > >
> > > > > > What does "system support" mean?
> > > > > >
> > > > > > Why can't this just be a "normal" PCI driver, as you are just
> > > > > > accessing a PCI device and doing something with it, seems odd to
> > > > > > claim it is a
> > > > "platform" driver.
> > > > > >
> > > > >
> > > > > This driver also activates probes to create i2c platform driver and 
> > > > > muxes.
> > > >
> > > > And how does it do that?  Through the PCI device?
> > > >
> > > > > For ARM and PPC based systems I can activate such stuff through dts.
> > > > > To be honest I don't know what is the right way to do such things
> > > > > for
> > > > > x86 systems.
> > > >
> > > > How is it found in a x86 system, in ACPI?
> > > >
> > >
> > > We have no support in ACPI.
> > > Currently it could be found through DMI.
> > >
> > > > > If I will move PCI related stuff to separate driver, could you
> > > > > suggest some right location for that?
> > > >
> > > > Depends on what it does.
> > >
> > > It creates platform i2c driver (Mellanox controller), like:
> > > platform_device_register_simple("i2c_mlxcpld", -1,
> > >  NULL, 0); And
> > > two mux platform device instances, like:
> > > platform_device_register_resndata(dev,
> > > " i2c-mux-reg", i, NULL,
> > > 0, _mux_data[i],
> > >
> > > sizeof(mlxplat_mux_data[i]));
> > 
> > Ugh.  Really?  These aren't on a real bus?  What is this, the 1990's?
> 
> Actually this is 2015-2016.
> Many switches use i2c virtual buses infrastructure for placing slow
> devices for system monitoring and control.

Yes, but that i2c controller is on what type of bus?  A non-discoverable
one?  That's what I'm complaining about...

thanks,

greg k-h


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Greg KH
On Mon, Sep 12, 2016 at 07:48:24AM +, Vadim Pasternak wrote:
> 
> 
> > -Original Message-
> > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > Sent: Monday, September 12, 2016 10:41 AM
> > To: Vadim Pasternak 
> > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > da...@davemloft.net; ge...@linux-m68k.org; a...@linux-foundation.org;
> > kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> > x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> > x...@vger.kernel.org; j...@resnulli.us
> > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for 
> > Mellanox
> > systems platform
> > 
> > On Mon, Sep 12, 2016 at 07:23:59AM +, Vadim Pasternak wrote:
> > >
> > >
> > > > -Original Message-
> > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > Sent: Monday, September 12, 2016 10:05 AM
> > > > To: Vadim Pasternak 
> > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > > li...@roeck-us.net; x...@kernel.org; linux-kernel@vger.kernel.org;
> > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for
> > > > Mellanox systems platform
> > > >
> > > > On Mon, Sep 12, 2016 at 06:44:03AM +, Vadim Pasternak wrote:
> > > > >
> > > > >
> > > > > > -Original Message-
> > > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > > Sent: Monday, September 12, 2016 9:13 AM
> > > > > > To: Vadim Pasternak 
> > > > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > > > a...@linux-foundation.org; kv...@codeaurora.org;
> > > > > > mche...@kernel.org; li...@roeck-us.net; x...@kernel.org;
> > > > > > linux-kernel@vger.kernel.org;
> > > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support
> > > > > > for Mellanox systems platform
> > > > > >
> > > > > > On Mon, Sep 12, 2016 at 06:29:58AM +, vad...@mellanox.com
> > wrote:
> > > > > > > From: Vadim Pasternak 
> > > > > > >
> > > > > > > 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.
> > > > > >
> > > > > > What does "system support" mean?
> > > > > >
> > > > > > Why can't this just be a "normal" PCI driver, as you are just
> > > > > > accessing a PCI device and doing something with it, seems odd to
> > > > > > claim it is a
> > > > "platform" driver.
> > > > > >
> > > > >
> > > > > This driver also activates probes to create i2c platform driver and 
> > > > > muxes.
> > > >
> > > > And how does it do that?  Through the PCI device?
> > > >
> > > > > For ARM and PPC based systems I can activate such stuff through dts.
> > > > > To be honest I don't know what is the right way to do such things
> > > > > for
> > > > > x86 systems.
> > > >
> > > > How is it found in a x86 system, in ACPI?
> > > >
> > >
> > > We have no support in ACPI.
> > > Currently it could be found through DMI.
> > >
> > > > > If I will move PCI related stuff to separate driver, could you
> > > > > suggest some right location for that?
> > > >
> > > > Depends on what it does.
> > >
> > > It creates platform i2c driver (Mellanox controller), like:
> > > platform_device_register_simple("i2c_mlxcpld", -1,
> > >  NULL, 0); And
> > > two mux platform device instances, like:
> > > platform_device_register_resndata(dev,
> > > " i2c-mux-reg", i, NULL,
> > > 0, _mux_data[i],
> > >
> > > sizeof(mlxplat_mux_data[i]));
> > 
> > Ugh.  Really?  These aren't on a real bus?  What is this, the 1990's?
> 
> Actually this is 2015-2016.
> Many switches use i2c virtual buses infrastructure for placing slow
> devices for system monitoring and control.

Yes, but that i2c controller is on what type of bus?  A non-discoverable
one?  That's what I'm complaining about...

thanks,

greg k-h


RE: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Vadim Pasternak


> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Monday, September 12, 2016 9:13 AM
> To: Vadim Pasternak <vad...@mellanox.com>
> Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> da...@davemloft.net; ge...@linux-m68k.org; a...@linux-foundation.org;
> kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox
> systems platform
> 
> On Mon, Sep 12, 2016 at 06:29:58AM +, vad...@mellanox.com wrote:
> > From: Vadim Pasternak <vad...@mellanox.com>
> >
> > 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.
> 
> What does "system support" mean?
> 
> Why can't this just be a "normal" PCI driver, as you are just accessing a PCI
> device and doing something with it, seems odd to claim it is a "platform" 
> driver.
> 

This driver also activates probes to create i2c platform driver and muxes.
For ARM and PPC based systems I can activate such stuff through dts. To be 
honest I don't know what is the right way to do such things for x86 systems.
If I will move PCI related stuff to separate driver, could you suggest some 
right location for that?

For example, could I have the code like in f.e. in 
arch/x86/platform/ts5500/ts5500.c as a platform initialization code? 

Thanks,
Vadim.

> thanks,
> 
> greg k-h


RE: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Vadim Pasternak


> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Monday, September 12, 2016 9:13 AM
> To: Vadim Pasternak 
> Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> da...@davemloft.net; ge...@linux-m68k.org; a...@linux-foundation.org;
> kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox
> systems platform
> 
> On Mon, Sep 12, 2016 at 06:29:58AM +, vad...@mellanox.com wrote:
> > From: Vadim Pasternak 
> >
> > 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.
> 
> What does "system support" mean?
> 
> Why can't this just be a "normal" PCI driver, as you are just accessing a PCI
> device and doing something with it, seems odd to claim it is a "platform" 
> driver.
> 

This driver also activates probes to create i2c platform driver and muxes.
For ARM and PPC based systems I can activate such stuff through dts. To be 
honest I don't know what is the right way to do such things for x86 systems.
If I will move PCI related stuff to separate driver, could you suggest some 
right location for that?

For example, could I have the code like in f.e. in 
arch/x86/platform/ts5500/ts5500.c as a platform initialization code? 

Thanks,
Vadim.

> thanks,
> 
> greg k-h


RE: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Vadim Pasternak


> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Monday, September 12, 2016 10:05 AM
> To: Vadim Pasternak <vad...@mellanox.com>
> Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> da...@davemloft.net; ge...@linux-m68k.org; a...@linux-foundation.org;
> kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox
> systems platform
> 
> On Mon, Sep 12, 2016 at 06:44:03AM +, Vadim Pasternak wrote:
> >
> >
> > > -Original Message-
> > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > Sent: Monday, September 12, 2016 9:13 AM
> > > To: Vadim Pasternak <vad...@mellanox.com>
> > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > da...@davemloft.net; ge...@linux-m68k.org;
> > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > li...@roeck-us.net; x...@kernel.org; linux-kernel@vger.kernel.org;
> > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for
> > > Mellanox systems platform
> > >
> > > On Mon, Sep 12, 2016 at 06:29:58AM +, vad...@mellanox.com wrote:
> > > > From: Vadim Pasternak <vad...@mellanox.com>
> > > >
> > > > 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.
> > >
> > > What does "system support" mean?
> > >
> > > Why can't this just be a "normal" PCI driver, as you are just
> > > accessing a PCI device and doing something with it, seems odd to claim it 
> > > is a
> "platform" driver.
> > >
> >
> > This driver also activates probes to create i2c platform driver and muxes.
> 
> And how does it do that?  Through the PCI device?
> 
> > For ARM and PPC based systems I can activate such stuff through dts.
> > To be honest I don't know what is the right way to do such things for
> > x86 systems.
> 
> How is it found in a x86 system, in ACPI?
> 

We have no support in ACPI.
Currently it could be found through DMI.

> > If I will move PCI related stuff to separate driver, could you suggest
> > some right location for that?
> 
> Depends on what it does.

It creates platform i2c driver (Mellanox controller), like:
platform_device_register_simple("i2c_mlxcpld", -1,
 NULL, 0);
And two mux platform device instances, like:
platform_device_register_resndata(dev,
" i2c-mux-reg", i, NULL,
0, _mux_data[i],
sizeof(mlxplat_mux_data[i]));

> 
> > For example, could I have the code like in f.e. in
> > arch/x86/platform/ts5500/ts5500.c as a platform initialization code?
> 
> How does it talk to the hardware for this?
> 
It defines several platform devices, like:
static struct platform_device ts5500_dio1_pdev = {
.name = "ts5500-dio1",
.id = -1,
.resource = ts5500_dio1_resource,
.num_resources = 1,
};
And registers them in __init, like:
platform_device_register(_dio1_pdev)


> thanks,
> 
> greg k-h

Thanks,
Vadim.


RE: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Vadim Pasternak


> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Monday, September 12, 2016 10:05 AM
> To: Vadim Pasternak 
> Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> da...@davemloft.net; ge...@linux-m68k.org; a...@linux-foundation.org;
> kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox
> systems platform
> 
> On Mon, Sep 12, 2016 at 06:44:03AM +, Vadim Pasternak wrote:
> >
> >
> > > -Original Message-
> > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > Sent: Monday, September 12, 2016 9:13 AM
> > > To: Vadim Pasternak 
> > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > da...@davemloft.net; ge...@linux-m68k.org;
> > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > li...@roeck-us.net; x...@kernel.org; linux-kernel@vger.kernel.org;
> > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for
> > > Mellanox systems platform
> > >
> > > On Mon, Sep 12, 2016 at 06:29:58AM +, vad...@mellanox.com wrote:
> > > > From: Vadim Pasternak 
> > > >
> > > > 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.
> > >
> > > What does "system support" mean?
> > >
> > > Why can't this just be a "normal" PCI driver, as you are just
> > > accessing a PCI device and doing something with it, seems odd to claim it 
> > > is a
> "platform" driver.
> > >
> >
> > This driver also activates probes to create i2c platform driver and muxes.
> 
> And how does it do that?  Through the PCI device?
> 
> > For ARM and PPC based systems I can activate such stuff through dts.
> > To be honest I don't know what is the right way to do such things for
> > x86 systems.
> 
> How is it found in a x86 system, in ACPI?
> 

We have no support in ACPI.
Currently it could be found through DMI.

> > If I will move PCI related stuff to separate driver, could you suggest
> > some right location for that?
> 
> Depends on what it does.

It creates platform i2c driver (Mellanox controller), like:
platform_device_register_simple("i2c_mlxcpld", -1,
 NULL, 0);
And two mux platform device instances, like:
platform_device_register_resndata(dev,
" i2c-mux-reg", i, NULL,
0, _mux_data[i],
sizeof(mlxplat_mux_data[i]));

> 
> > For example, could I have the code like in f.e. in
> > arch/x86/platform/ts5500/ts5500.c as a platform initialization code?
> 
> How does it talk to the hardware for this?
> 
It defines several platform devices, like:
static struct platform_device ts5500_dio1_pdev = {
.name = "ts5500-dio1",
.id = -1,
.resource = ts5500_dio1_resource,
.num_resources = 1,
};
And registers them in __init, like:
platform_device_register(_dio1_pdev)


> thanks,
> 
> greg k-h

Thanks,
Vadim.


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Greg KH
On Mon, Sep 12, 2016 at 07:23:59AM +, Vadim Pasternak wrote:
> 
> 
> > -Original Message-
> > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > Sent: Monday, September 12, 2016 10:05 AM
> > To: Vadim Pasternak <vad...@mellanox.com>
> > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > da...@davemloft.net; ge...@linux-m68k.org; a...@linux-foundation.org;
> > kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> > x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> > x...@vger.kernel.org; j...@resnulli.us
> > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for 
> > Mellanox
> > systems platform
> > 
> > On Mon, Sep 12, 2016 at 06:44:03AM +, Vadim Pasternak wrote:
> > >
> > >
> > > > -Original Message-
> > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > Sent: Monday, September 12, 2016 9:13 AM
> > > > To: Vadim Pasternak <vad...@mellanox.com>
> > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > > li...@roeck-us.net; x...@kernel.org; linux-kernel@vger.kernel.org;
> > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for
> > > > Mellanox systems platform
> > > >
> > > > On Mon, Sep 12, 2016 at 06:29:58AM +, vad...@mellanox.com wrote:
> > > > > From: Vadim Pasternak <vad...@mellanox.com>
> > > > >
> > > > > 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.
> > > >
> > > > What does "system support" mean?
> > > >
> > > > Why can't this just be a "normal" PCI driver, as you are just
> > > > accessing a PCI device and doing something with it, seems odd to claim 
> > > > it is a
> > "platform" driver.
> > > >
> > >
> > > This driver also activates probes to create i2c platform driver and muxes.
> > 
> > And how does it do that?  Through the PCI device?
> > 
> > > For ARM and PPC based systems I can activate such stuff through dts.
> > > To be honest I don't know what is the right way to do such things for
> > > x86 systems.
> > 
> > How is it found in a x86 system, in ACPI?
> > 
> 
> We have no support in ACPI.
> Currently it could be found through DMI.
> 
> > > If I will move PCI related stuff to separate driver, could you suggest
> > > some right location for that?
> > 
> > Depends on what it does.
> 
> It creates platform i2c driver (Mellanox controller), like:
> platform_device_register_simple("i2c_mlxcpld", -1,
>  NULL, 0);
> And two mux platform device instances, like:
> platform_device_register_resndata(dev,
> " i2c-mux-reg", i, NULL,
> 0, _mux_data[i],
> sizeof(mlxplat_mux_data[i]));

Ugh.  Really?  These aren't on a real bus?  What is this, the 1990's?

Ok, a DMI driver for these makes sense in the platform directory to me,
but you have to convince the maintainer of this subsystem :)

And rip all of that PCI stuff out, that belongs in a PCI driver.

thanks,

greg k-h


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Greg KH
On Mon, Sep 12, 2016 at 07:23:59AM +, Vadim Pasternak wrote:
> 
> 
> > -Original Message-
> > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > Sent: Monday, September 12, 2016 10:05 AM
> > To: Vadim Pasternak 
> > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > da...@davemloft.net; ge...@linux-m68k.org; a...@linux-foundation.org;
> > kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> > x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> > x...@vger.kernel.org; j...@resnulli.us
> > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for 
> > Mellanox
> > systems platform
> > 
> > On Mon, Sep 12, 2016 at 06:44:03AM +, Vadim Pasternak wrote:
> > >
> > >
> > > > -Original Message-
> > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > Sent: Monday, September 12, 2016 9:13 AM
> > > > To: Vadim Pasternak 
> > > > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > > > da...@davemloft.net; ge...@linux-m68k.org;
> > > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > > li...@roeck-us.net; x...@kernel.org; linux-kernel@vger.kernel.org;
> > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for
> > > > Mellanox systems platform
> > > >
> > > > On Mon, Sep 12, 2016 at 06:29:58AM +, vad...@mellanox.com wrote:
> > > > > From: Vadim Pasternak 
> > > > >
> > > > > 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.
> > > >
> > > > What does "system support" mean?
> > > >
> > > > Why can't this just be a "normal" PCI driver, as you are just
> > > > accessing a PCI device and doing something with it, seems odd to claim 
> > > > it is a
> > "platform" driver.
> > > >
> > >
> > > This driver also activates probes to create i2c platform driver and muxes.
> > 
> > And how does it do that?  Through the PCI device?
> > 
> > > For ARM and PPC based systems I can activate such stuff through dts.
> > > To be honest I don't know what is the right way to do such things for
> > > x86 systems.
> > 
> > How is it found in a x86 system, in ACPI?
> > 
> 
> We have no support in ACPI.
> Currently it could be found through DMI.
> 
> > > If I will move PCI related stuff to separate driver, could you suggest
> > > some right location for that?
> > 
> > Depends on what it does.
> 
> It creates platform i2c driver (Mellanox controller), like:
> platform_device_register_simple("i2c_mlxcpld", -1,
>  NULL, 0);
> And two mux platform device instances, like:
> platform_device_register_resndata(dev,
> " i2c-mux-reg", i, NULL,
> 0, _mux_data[i],
> sizeof(mlxplat_mux_data[i]));

Ugh.  Really?  These aren't on a real bus?  What is this, the 1990's?

Ok, a DMI driver for these makes sense in the platform directory to me,
but you have to convince the maintainer of this subsystem :)

And rip all of that PCI stuff out, that belongs in a PCI driver.

thanks,

greg k-h


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Greg KH
On Mon, Sep 12, 2016 at 06:44:03AM +, Vadim Pasternak wrote:
> 
> 
> > -Original Message-
> > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > Sent: Monday, September 12, 2016 9:13 AM
> > To: Vadim Pasternak <vad...@mellanox.com>
> > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > da...@davemloft.net; ge...@linux-m68k.org; a...@linux-foundation.org;
> > kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> > x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> > x...@vger.kernel.org; j...@resnulli.us
> > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for 
> > Mellanox
> > systems platform
> > 
> > On Mon, Sep 12, 2016 at 06:29:58AM +, vad...@mellanox.com wrote:
> > > From: Vadim Pasternak <vad...@mellanox.com>
> > >
> > > 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.
> > 
> > What does "system support" mean?
> > 
> > Why can't this just be a "normal" PCI driver, as you are just accessing a 
> > PCI
> > device and doing something with it, seems odd to claim it is a "platform" 
> > driver.
> > 
> 
> This driver also activates probes to create i2c platform driver and muxes.

And how does it do that?  Through the PCI device?

> For ARM and PPC based systems I can activate such stuff through dts.
> To be honest I don't know what is the right way to do such things for
> x86 systems.

How is it found in a x86 system, in ACPI?

> If I will move PCI related stuff to separate driver, could you suggest
> some right location for that?

Depends on what it does.

> For example, could I have the code like in f.e. in
> arch/x86/platform/ts5500/ts5500.c as a platform initialization code? 

How does it talk to the hardware for this?

thanks,

greg k-h


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Greg KH
On Mon, Sep 12, 2016 at 06:44:03AM +, Vadim Pasternak wrote:
> 
> 
> > -Original Message-
> > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > Sent: Monday, September 12, 2016 9:13 AM
> > To: Vadim Pasternak 
> > Cc: t...@linutronix.de; mi...@redhat.com; h...@zytor.com;
> > da...@davemloft.net; ge...@linux-m68k.org; a...@linux-foundation.org;
> > kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> > x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> > x...@vger.kernel.org; j...@resnulli.us
> > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for 
> > Mellanox
> > systems platform
> > 
> > On Mon, Sep 12, 2016 at 06:29:58AM +, vad...@mellanox.com wrote:
> > > From: Vadim Pasternak 
> > >
> > > 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.
> > 
> > What does "system support" mean?
> > 
> > Why can't this just be a "normal" PCI driver, as you are just accessing a 
> > PCI
> > device and doing something with it, seems odd to claim it is a "platform" 
> > driver.
> > 
> 
> This driver also activates probes to create i2c platform driver and muxes.

And how does it do that?  Through the PCI device?

> For ARM and PPC based systems I can activate such stuff through dts.
> To be honest I don't know what is the right way to do such things for
> x86 systems.

How is it found in a x86 system, in ACPI?

> If I will move PCI related stuff to separate driver, could you suggest
> some right location for that?

Depends on what it does.

> For example, could I have the code like in f.e. in
> arch/x86/platform/ts5500/ts5500.c as a platform initialization code? 

How does it talk to the hardware for this?

thanks,

greg k-h


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Greg KH
On Mon, Sep 12, 2016 at 06:29:58AM +, vad...@mellanox.com wrote:
> From: Vadim Pasternak 
> 
> 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.

What does "system support" mean?

Why can't this just be a "normal" PCI driver, as you are just accessing
a PCI device and doing something with it, seems odd to claim it is a
"platform" driver.

thanks,

greg k-h


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Greg KH
On Mon, Sep 12, 2016 at 06:29:58AM +, vad...@mellanox.com wrote:
> From: Vadim Pasternak 
> 
> 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.

What does "system support" mean?

Why can't this just be a "normal" PCI driver, as you are just accessing
a PCI device and doing something with it, seems odd to claim it is a
"platform" driver.

thanks,

greg k-h


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Greg KH
On Sun, Sep 11, 2016 at 10:34:27PM -0700, Guenter Roeck wrote:
> > +static int mlxplat_lpc_config(struct mlxplat_priv *priv)
> > +{
> > +   struct pci_dev *pdev = NULL;
> > +   u16 dev_id;
> > +   int err;
> > +
> > +   pdev = pci_get_bus_and_slot(MLXPLAT_CPLD_LPC_CTRL_IFC_BUS_ID,
> > +   PCI_DEVFN(MLXPLAT_CPLD_LPC_CTRL_IFC_SLOT_ID,
> > +   MLXPLAT_CPLD_LPC_CTRL_IFC_FUNC_ID));
> > +
> 
> Kind of unusual way to initialize a PCI device. If this can't be implemented
> as PCI driver, maybe it should be initialized using PCI quirks ?

That's a _very old_ way of writing a pci driver, I thought we had gotten
rid of all of that crud.

This needs to be a "normal" PCI driver, no need for it to be a platform
driver at all from what I can tell.

thanks,

greg k-h


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-12 Thread Greg KH
On Sun, Sep 11, 2016 at 10:34:27PM -0700, Guenter Roeck wrote:
> > +static int mlxplat_lpc_config(struct mlxplat_priv *priv)
> > +{
> > +   struct pci_dev *pdev = NULL;
> > +   u16 dev_id;
> > +   int err;
> > +
> > +   pdev = pci_get_bus_and_slot(MLXPLAT_CPLD_LPC_CTRL_IFC_BUS_ID,
> > +   PCI_DEVFN(MLXPLAT_CPLD_LPC_CTRL_IFC_SLOT_ID,
> > +   MLXPLAT_CPLD_LPC_CTRL_IFC_FUNC_ID));
> > +
> 
> Kind of unusual way to initialize a PCI device. If this can't be implemented
> as PCI driver, maybe it should be initialized using PCI quirks ?

That's a _very old_ way of writing a pci driver, I thought we had gotten
rid of all of that crud.

This needs to be a "normal" PCI driver, no need for it to be a platform
driver at all from what I can tell.

thanks,

greg k-h


Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-11 Thread Guenter Roeck

On 09/11/2016 11:29 PM, vad...@mellanox.com wrote:

From: Vadim Pasternak 

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"

Signed-off-by: Vadim Pasternak 
---
 MAINTAINERS   |   7 +
 arch/x86/Kconfig  |  23 ++
 arch/x86/platform/Makefile|   1 +
 arch/x86/platform/mellanox/Makefile   |   1 +
 arch/x86/platform/mellanox/mlx-platform.c | 501 ++
 5 files changed, 533 insertions(+)
 create mode 100644 arch/x86/platform/mellanox/Makefile
 create mode 100644 arch/x86/platform/mellanox/mlx-platform.c

diff --git a/MAINTAINERS b/MAINTAINERS
index 4705c94..8a675de 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7664,6 +7664,13 @@ 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 
+L:  platform-driver-...@vger.kernel.org
+S:  Supported
+W:  http://www.mellanox.com
+F:  arch/x86/platform/mellanox/mlx-platform.c
+
 SOFT-ROCE DRIVER (rxe)
 M: Moni Shoua 
 L: linux-r...@vger.kernel.org
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index c580d8c..cc7efdd9 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2631,6 +2631,29 @@ config TS5500

 endif # X86_32

+config MLX_PLATFORM
+   tristate "Mellanox Technologies platform support"
+   depends on X86_64
+   depends on PCI
+   depends on DMI
+   depends on I2C_MLXCPLD
+   depends on I2C_MUX_REG
+   select HWMON
+   select PMBUS
+   select LM75
+   select NEW_LEDS
+   select LEDS_CLASS
+   select LEDS_TRIGGERS
+   select LEDS_TRIGGER_TIMER
+   select LEDS_MLXCPLD
+   ---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 AMD_NB
def_bool y
depends on CPU_SUP_AMD && PCI
diff --git a/arch/x86/platform/Makefile b/arch/x86/platform/Makefile
index 184842e..3c3c19e 100644
--- a/arch/x86/platform/Makefile
+++ b/arch/x86/platform/Makefile
@@ -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/
diff --git a/arch/x86/platform/mellanox/Makefile 
b/arch/x86/platform/mellanox/Makefile
new file mode 100644
index 000..f43c931
--- /dev/null
+++ b/arch/x86/platform/mellanox/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_MLX_PLATFORM) += mlx-platform.o
diff --git a/arch/x86/platform/mellanox/mlx-platform.c 
b/arch/x86/platform/mellanox/mlx-platform.c
new file mode 100644
index 000..02afa89
--- /dev/null
+++ b/arch/x86/platform/mellanox/mlx-platform.c
@@ -0,0 +1,501 @@
+/*
+ * arch/x86/platform/mellanox/mlx-platform.c
+ * Copyright (c) 2016 Mellanox Technologies. All rights reserved.
+ * Copyright (c) 2016 Vadim Pasternak 
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ *contributors may be used to endorse or promote products derived from
+ *this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) 

Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-11 Thread Guenter Roeck

On 09/11/2016 11:29 PM, vad...@mellanox.com wrote:

From: Vadim Pasternak 

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"

Signed-off-by: Vadim Pasternak 
---
 MAINTAINERS   |   7 +
 arch/x86/Kconfig  |  23 ++
 arch/x86/platform/Makefile|   1 +
 arch/x86/platform/mellanox/Makefile   |   1 +
 arch/x86/platform/mellanox/mlx-platform.c | 501 ++
 5 files changed, 533 insertions(+)
 create mode 100644 arch/x86/platform/mellanox/Makefile
 create mode 100644 arch/x86/platform/mellanox/mlx-platform.c

diff --git a/MAINTAINERS b/MAINTAINERS
index 4705c94..8a675de 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7664,6 +7664,13 @@ 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 
+L:  platform-driver-...@vger.kernel.org
+S:  Supported
+W:  http://www.mellanox.com
+F:  arch/x86/platform/mellanox/mlx-platform.c
+
 SOFT-ROCE DRIVER (rxe)
 M: Moni Shoua 
 L: linux-r...@vger.kernel.org
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index c580d8c..cc7efdd9 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2631,6 +2631,29 @@ config TS5500

 endif # X86_32

+config MLX_PLATFORM
+   tristate "Mellanox Technologies platform support"
+   depends on X86_64
+   depends on PCI
+   depends on DMI
+   depends on I2C_MLXCPLD
+   depends on I2C_MUX_REG
+   select HWMON
+   select PMBUS
+   select LM75
+   select NEW_LEDS
+   select LEDS_CLASS
+   select LEDS_TRIGGERS
+   select LEDS_TRIGGER_TIMER
+   select LEDS_MLXCPLD
+   ---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 AMD_NB
def_bool y
depends on CPU_SUP_AMD && PCI
diff --git a/arch/x86/platform/Makefile b/arch/x86/platform/Makefile
index 184842e..3c3c19e 100644
--- a/arch/x86/platform/Makefile
+++ b/arch/x86/platform/Makefile
@@ -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/
diff --git a/arch/x86/platform/mellanox/Makefile 
b/arch/x86/platform/mellanox/Makefile
new file mode 100644
index 000..f43c931
--- /dev/null
+++ b/arch/x86/platform/mellanox/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_MLX_PLATFORM) += mlx-platform.o
diff --git a/arch/x86/platform/mellanox/mlx-platform.c 
b/arch/x86/platform/mellanox/mlx-platform.c
new file mode 100644
index 000..02afa89
--- /dev/null
+++ b/arch/x86/platform/mellanox/mlx-platform.c
@@ -0,0 +1,501 @@
+/*
+ * arch/x86/platform/mellanox/mlx-platform.c
+ * Copyright (c) 2016 Mellanox Technologies. All rights reserved.
+ * Copyright (c) 2016 Vadim Pasternak 
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ *contributors may be used to endorse or promote products derived from
+ *this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT 

RE: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-11 Thread Vadim Pasternak


> -Original Message-
> From: H. Peter Anvin [mailto:h...@zytor.com]
> Sent: Monday, September 12, 2016 7:42 AM
> To: Vadim Pasternak <vad...@mellanox.com>; t...@linutronix.de
> Cc: mi...@redhat.com; da...@davemloft.net; ge...@linux-m68k.org;
> a...@linux-foundation.org; gre...@linuxfoundation.org;
> kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox
> systems platform
> 
> On September 11, 2016 11:29:58 PM PDT, vad...@mellanox.com wrote:
> >From: Vadim Pasternak <vad...@mellanox.com>
> >
> >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"
> >
> >Signed-off-by: Vadim Pasternak <vad...@mellanox.com>
> >---
> > MAINTAINERS   |   7 +
> > arch/x86/Kconfig  |  23 ++
> > arch/x86/platform/Makefile|   1 +
> > arch/x86/platform/mellanox/Makefile   |   1 +
> >arch/x86/platform/mellanox/mlx-platform.c | 501
> >++
> > 5 files changed, 533 insertions(+)
> > create mode 100644 arch/x86/platform/mellanox/Makefile
> > create mode 100644 arch/x86/platform/mellanox/mlx-platform.c
> >
> >diff --git a/MAINTAINERS b/MAINTAINERS
> >index 4705c94..8a675de 100644
> >--- a/MAINTAINERS
> >+++ b/MAINTAINERS
> >@@ -7664,6 +7664,13 @@ 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 <vad...@mellanox.com>
> >+L:  platform-driver-...@vger.kernel.org
> >+S:  Supported
> >+W:  http://www.mellanox.com
> >+F:  arch/x86/platform/mellanox/mlx-platform.c
> >+
> > SOFT-ROCE DRIVER (rxe)
> > M:  Moni Shoua <mo...@mellanox.com>
> > L:  linux-r...@vger.kernel.org
> >diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index
> >c580d8c..cc7efdd9 100644
> >--- a/arch/x86/Kconfig
> >+++ b/arch/x86/Kconfig
> >@@ -2631,6 +2631,29 @@ config TS5500
> >
> > endif # X86_32
> >
> >+config MLX_PLATFORM
> >+tristate "Mellanox Technologies platform support"
> >+depends on X86_64
> >+depends on PCI
> >+depends on DMI
> >+depends on I2C_MLXCPLD
> >+depends on I2C_MUX_REG
> >+select HWMON
> >+select PMBUS
> >+select LM75
> >+select NEW_LEDS
> >+select LEDS_CLASS
> >+select LEDS_TRIGGERS
> >+select LEDS_TRIGGER_TIMER
> >+select LEDS_MLXCPLD
> >+---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 AMD_NB
> > def_bool y
> > depends on CPU_SUP_AMD && PCI
> >diff --git a/arch/x86/platform/Makefile b/arch/x86/platform/Makefile
> >index 184842e..3c3c19e 100644
> >--- a/arch/x86/platform/Makefile
> >+++ b/arch/x86/platform/Makefile
> >@@ -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/
> >diff --git a/arch/x86/platform/mellanox/Makefile
> >b/arch/x86/platform/mellanox/Makefile
> >new file mode 100644
> >index 000..f43c931
> >--- /dev/null
> >+++ b/arch/x86/platform/mellanox/Makefile
> >@@ -0,0 +1 @@
> >+obj-$(CONFIG_MLX_PLATFORM)  += mlx-platform.o
> >diff --git a/arch/x86/platform/mellanox/mlx-platform.c
> >b/arch/x86/platform/mellanox/mlx-platform.c
> >new file mode 100644
> >index 000..02afa89
> >--- /dev/null
> >+++ b/arch/x86/platform/mellanox/mlx-platf

RE: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-11 Thread Vadim Pasternak


> -Original Message-
> From: H. Peter Anvin [mailto:h...@zytor.com]
> Sent: Monday, September 12, 2016 7:42 AM
> To: Vadim Pasternak ; t...@linutronix.de
> Cc: mi...@redhat.com; da...@davemloft.net; ge...@linux-m68k.org;
> a...@linux-foundation.org; gre...@linuxfoundation.org;
> kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> x...@kernel.org; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox
> systems platform
> 
> On September 11, 2016 11:29:58 PM PDT, vad...@mellanox.com wrote:
> >From: Vadim Pasternak 
> >
> >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"
> >
> >Signed-off-by: Vadim Pasternak 
> >---
> > MAINTAINERS   |   7 +
> > arch/x86/Kconfig  |  23 ++
> > arch/x86/platform/Makefile|   1 +
> > arch/x86/platform/mellanox/Makefile   |   1 +
> >arch/x86/platform/mellanox/mlx-platform.c | 501
> >++
> > 5 files changed, 533 insertions(+)
> > create mode 100644 arch/x86/platform/mellanox/Makefile
> > create mode 100644 arch/x86/platform/mellanox/mlx-platform.c
> >
> >diff --git a/MAINTAINERS b/MAINTAINERS
> >index 4705c94..8a675de 100644
> >--- a/MAINTAINERS
> >+++ b/MAINTAINERS
> >@@ -7664,6 +7664,13 @@ 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 
> >+L:  platform-driver-...@vger.kernel.org
> >+S:  Supported
> >+W:  http://www.mellanox.com
> >+F:  arch/x86/platform/mellanox/mlx-platform.c
> >+
> > SOFT-ROCE DRIVER (rxe)
> > M:  Moni Shoua 
> > L:  linux-r...@vger.kernel.org
> >diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index
> >c580d8c..cc7efdd9 100644
> >--- a/arch/x86/Kconfig
> >+++ b/arch/x86/Kconfig
> >@@ -2631,6 +2631,29 @@ config TS5500
> >
> > endif # X86_32
> >
> >+config MLX_PLATFORM
> >+tristate "Mellanox Technologies platform support"
> >+depends on X86_64
> >+depends on PCI
> >+depends on DMI
> >+depends on I2C_MLXCPLD
> >+depends on I2C_MUX_REG
> >+select HWMON
> >+select PMBUS
> >+select LM75
> >+select NEW_LEDS
> >+select LEDS_CLASS
> >+select LEDS_TRIGGERS
> >+select LEDS_TRIGGER_TIMER
> >+select LEDS_MLXCPLD
> >+---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 AMD_NB
> > def_bool y
> > depends on CPU_SUP_AMD && PCI
> >diff --git a/arch/x86/platform/Makefile b/arch/x86/platform/Makefile
> >index 184842e..3c3c19e 100644
> >--- a/arch/x86/platform/Makefile
> >+++ b/arch/x86/platform/Makefile
> >@@ -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/
> >diff --git a/arch/x86/platform/mellanox/Makefile
> >b/arch/x86/platform/mellanox/Makefile
> >new file mode 100644
> >index 000..f43c931
> >--- /dev/null
> >+++ b/arch/x86/platform/mellanox/Makefile
> >@@ -0,0 +1 @@
> >+obj-$(CONFIG_MLX_PLATFORM)  += mlx-platform.o
> >diff --git a/arch/x86/platform/mellanox/mlx-platform.c
> >b/arch/x86/platform/mellanox/mlx-platform.c
> >new file mode 100644
> >index 000..02afa89
> >--- /dev/null
> >+++ b/arch/x86/platform/mellanox/mlx-platform.c
> >@@ -0,0 +1,501 @@
> >+/*
> >+ * arch/x86/platform/mellanox/mlx-platform.c
> >+ * Copyright (c) 2016 Mell

Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-11 Thread H. Peter Anvin
On September 11, 2016 11:29:58 PM PDT, vad...@mellanox.com wrote:
>From: Vadim Pasternak 
>
>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"
>
>Signed-off-by: Vadim Pasternak 
>---
> MAINTAINERS   |   7 +
> arch/x86/Kconfig  |  23 ++
> arch/x86/platform/Makefile|   1 +
> arch/x86/platform/mellanox/Makefile   |   1 +
>arch/x86/platform/mellanox/mlx-platform.c | 501
>++
> 5 files changed, 533 insertions(+)
> create mode 100644 arch/x86/platform/mellanox/Makefile
> create mode 100644 arch/x86/platform/mellanox/mlx-platform.c
>
>diff --git a/MAINTAINERS b/MAINTAINERS
>index 4705c94..8a675de 100644
>--- a/MAINTAINERS
>+++ b/MAINTAINERS
>@@ -7664,6 +7664,13 @@ 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 
>+L:  platform-driver-...@vger.kernel.org
>+S:  Supported
>+W:  http://www.mellanox.com
>+F:  arch/x86/platform/mellanox/mlx-platform.c
>+
> SOFT-ROCE DRIVER (rxe)
> M:Moni Shoua 
> L:linux-r...@vger.kernel.org
>diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>index c580d8c..cc7efdd9 100644
>--- a/arch/x86/Kconfig
>+++ b/arch/x86/Kconfig
>@@ -2631,6 +2631,29 @@ config TS5500
> 
> endif # X86_32
> 
>+config MLX_PLATFORM
>+  tristate "Mellanox Technologies platform support"
>+  depends on X86_64
>+  depends on PCI
>+  depends on DMI
>+  depends on I2C_MLXCPLD
>+  depends on I2C_MUX_REG
>+  select HWMON
>+  select PMBUS
>+  select LM75
>+  select NEW_LEDS
>+  select LEDS_CLASS
>+  select LEDS_TRIGGERS
>+  select LEDS_TRIGGER_TIMER
>+  select LEDS_MLXCPLD
>+  ---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 AMD_NB
>   def_bool y
>   depends on CPU_SUP_AMD && PCI
>diff --git a/arch/x86/platform/Makefile b/arch/x86/platform/Makefile
>index 184842e..3c3c19e 100644
>--- a/arch/x86/platform/Makefile
>+++ b/arch/x86/platform/Makefile
>@@ -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/
>diff --git a/arch/x86/platform/mellanox/Makefile
>b/arch/x86/platform/mellanox/Makefile
>new file mode 100644
>index 000..f43c931
>--- /dev/null
>+++ b/arch/x86/platform/mellanox/Makefile
>@@ -0,0 +1 @@
>+obj-$(CONFIG_MLX_PLATFORM)+= mlx-platform.o
>diff --git a/arch/x86/platform/mellanox/mlx-platform.c
>b/arch/x86/platform/mellanox/mlx-platform.c
>new file mode 100644
>index 000..02afa89
>--- /dev/null
>+++ b/arch/x86/platform/mellanox/mlx-platform.c
>@@ -0,0 +1,501 @@
>+/*
>+ * arch/x86/platform/mellanox/mlx-platform.c
>+ * Copyright (c) 2016 Mellanox Technologies. All rights reserved.
>+ * Copyright (c) 2016 Vadim Pasternak 
>+ *
>+ * Redistribution and use in source and binary forms, with or without
>+ * modification, are permitted provided that the following conditions
>are met:
>+ *
>+ * 1. Redistributions of source code must retain the above copyright
>+ *notice, this list of conditions and the following disclaimer.
>+ * 2. Redistributions in binary form must reproduce the above
>copyright
>+ *notice, this list of conditions and the following disclaimer in
>the
>+ *documentation and/or other materials provided with the
>distribution.
>+ * 3. Neither the names of the copyright holders nor the names of its
>+ *contributors may be used to endorse or promote products derived
>from
>+ *this software without specific prior written permission.
>+ *
>+ * Alternatively, this software may be distributed under the terms of
>the
>+ * GNU General Public License ("GPL") version 2 as published by the
>Free
>+ * Software Foundation.
>+ *
>+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
>"AS IS"
>+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
>TO, THE
>+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
>PURPOSE
>+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
>CONTRIBUTORS BE
>+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
>+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 

Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

2016-09-11 Thread H. Peter Anvin
On September 11, 2016 11:29:58 PM PDT, vad...@mellanox.com wrote:
>From: Vadim Pasternak 
>
>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"
>
>Signed-off-by: Vadim Pasternak 
>---
> MAINTAINERS   |   7 +
> arch/x86/Kconfig  |  23 ++
> arch/x86/platform/Makefile|   1 +
> arch/x86/platform/mellanox/Makefile   |   1 +
>arch/x86/platform/mellanox/mlx-platform.c | 501
>++
> 5 files changed, 533 insertions(+)
> create mode 100644 arch/x86/platform/mellanox/Makefile
> create mode 100644 arch/x86/platform/mellanox/mlx-platform.c
>
>diff --git a/MAINTAINERS b/MAINTAINERS
>index 4705c94..8a675de 100644
>--- a/MAINTAINERS
>+++ b/MAINTAINERS
>@@ -7664,6 +7664,13 @@ 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 
>+L:  platform-driver-...@vger.kernel.org
>+S:  Supported
>+W:  http://www.mellanox.com
>+F:  arch/x86/platform/mellanox/mlx-platform.c
>+
> SOFT-ROCE DRIVER (rxe)
> M:Moni Shoua 
> L:linux-r...@vger.kernel.org
>diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>index c580d8c..cc7efdd9 100644
>--- a/arch/x86/Kconfig
>+++ b/arch/x86/Kconfig
>@@ -2631,6 +2631,29 @@ config TS5500
> 
> endif # X86_32
> 
>+config MLX_PLATFORM
>+  tristate "Mellanox Technologies platform support"
>+  depends on X86_64
>+  depends on PCI
>+  depends on DMI
>+  depends on I2C_MLXCPLD
>+  depends on I2C_MUX_REG
>+  select HWMON
>+  select PMBUS
>+  select LM75
>+  select NEW_LEDS
>+  select LEDS_CLASS
>+  select LEDS_TRIGGERS
>+  select LEDS_TRIGGER_TIMER
>+  select LEDS_MLXCPLD
>+  ---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 AMD_NB
>   def_bool y
>   depends on CPU_SUP_AMD && PCI
>diff --git a/arch/x86/platform/Makefile b/arch/x86/platform/Makefile
>index 184842e..3c3c19e 100644
>--- a/arch/x86/platform/Makefile
>+++ b/arch/x86/platform/Makefile
>@@ -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/
>diff --git a/arch/x86/platform/mellanox/Makefile
>b/arch/x86/platform/mellanox/Makefile
>new file mode 100644
>index 000..f43c931
>--- /dev/null
>+++ b/arch/x86/platform/mellanox/Makefile
>@@ -0,0 +1 @@
>+obj-$(CONFIG_MLX_PLATFORM)+= mlx-platform.o
>diff --git a/arch/x86/platform/mellanox/mlx-platform.c
>b/arch/x86/platform/mellanox/mlx-platform.c
>new file mode 100644
>index 000..02afa89
>--- /dev/null
>+++ b/arch/x86/platform/mellanox/mlx-platform.c
>@@ -0,0 +1,501 @@
>+/*
>+ * arch/x86/platform/mellanox/mlx-platform.c
>+ * Copyright (c) 2016 Mellanox Technologies. All rights reserved.
>+ * Copyright (c) 2016 Vadim Pasternak 
>+ *
>+ * Redistribution and use in source and binary forms, with or without
>+ * modification, are permitted provided that the following conditions
>are met:
>+ *
>+ * 1. Redistributions of source code must retain the above copyright
>+ *notice, this list of conditions and the following disclaimer.
>+ * 2. Redistributions in binary form must reproduce the above
>copyright
>+ *notice, this list of conditions and the following disclaimer in
>the
>+ *documentation and/or other materials provided with the
>distribution.
>+ * 3. Neither the names of the copyright holders nor the names of its
>+ *contributors may be used to endorse or promote products derived
>from
>+ *this software without specific prior written permission.
>+ *
>+ * Alternatively, this software may be distributed under the terms of
>the
>+ * GNU General Public License ("GPL") version 2 as published by the
>Free
>+ * Software Foundation.
>+ *
>+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
>"AS IS"
>+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
>TO, THE
>+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
>PURPOSE
>+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
>CONTRIBUTORS BE
>+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
>+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
>OF
>+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
>BUSINESS