From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756174AbcILH5O (ORCPT ); Mon, 12 Sep 2016 03:57:14 -0400 Received: from mail-db5eur01on0067.outbound.protection.outlook.com ([104.47.2.67]:61762 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753142AbcILH5M (ORCPT ); Mon, 12 Sep 2016 03:57:12 -0400 From: Vadim Pasternak To: Greg KH CC: "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , "davem@davemloft.net" , "geert@linux-m68k.org" , "akpm@linux-foundation.org" , "kvalo@codeaurora.org" , "mchehab@kernel.org" , "linux@roeck-us.net" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "platform-driver-x86@vger.kernel.org" , "jiri@resnulli.us" Subject: RE: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform Thread-Topic: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform Thread-Index: AQHSDK6g3FF6rFhDVESYzSYzLgvtaqB1X/SAgAAE5ECAAAm7gIAAA3XQ Date: Mon, 12 Sep 2016 07:23:59 +0000 Message-ID: References: <1473661798-112691-1-git-send-email-vadimp@mellanox.com> <20160912061237.GB11230@kroah.com> <20160912070457.GA4590@kroah.com> In-Reply-To: <20160912070457.GA4590@kroah.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linuxfoundation.org; dkim=none (message not signed) header.d=none;linuxfoundation.org; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [193.47.165.251] x-ms-office365-filtering-correlation-id: 38090f9d-0a89-4ae4-adca-08d3daddc3d2 x-microsoft-exchange-diagnostics: 1;AM5PR0501MB2100;6:1aqHtPK6pqhLQV0V+q4GY7kAf0hJDe61dFVrR7sBVmkAAnkws5BCXFiKOp3y4J1TyqYSB2e5URlUDtOnVUhaKQDKtcfL2ZI/JHDVh0NoXcxWVNzsP/AENnm3JFV2G9xM1gbe5IDDZYZzjAsHmYTLAu9nAzePoCnprxokpJG/hwW8+70IIJSEas6p1U6FHU/TdmazN+lSxWqvKstuSICHffXIIzM7XNiKazoIKolZZUQttbprG1gPpmqJjFdZwdp9SYJfl8ZpYjHZP/jvzxZmUbNtAeHOKljXrYljSbGTF/rO7bw1JuDZDBxjBXIxbW+CnuJKX64jRBzHMfthu7rtng==;5:ThRHPmqRPLLR+jA/c/05Rd6gLbo+DyunkdpKixPSf7a4aVH+FG3O/C6MqnN3LDBoYBZ9TAifEuNe8bNJMDpcxiEqb6lbGlt6bFs1Tny+DVmDLiDdgIh1Uq9YnCR8CEZ/EBpeMgl7iy33DaRLs1AxZw==;24:/xm2ycWlg5j7tf39EFxfseTDsjseL1zG+Yd50aB3Bkgd1RKEOIB2lRzjkdI/yHIYwdfDVEo/rpOXAAMVJElaevIsTnuMlDqBpa1Kp8ccPa0=;7:rQXKbi/hWXLFbXSa7UWpwB+Rcb1jB6hgSHgJPAMYL4JabzJ6epMXWJhJQ4RC0LPgaTHC1ZKzw+4nnQ4kwdygjRj1hxYxUXUt1Lq6XLBwnfqEmkMokPDo14TF+3/ZPyBJ/7cbRuxHySKsYoRxZJhYTKSaWWPan0l9NfxzkgN14p3pjPGhGDbBJuY6A+mWB80uhTaRr+OUzi5S4YMC9Hc86gesmFIOkcguxED7TVG79iuwC0HgTjYjN2OL7elq/UW5 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0501MB2100; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026);SRVR:AM5PR0501MB2100;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0501MB2100; x-forefront-prvs: 006339698F x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(24454002)(377454003)(13464003)(4326007)(33656002)(586003)(87936001)(76576001)(3280700002)(3846002)(102836003)(6116002)(86362001)(7846002)(8676002)(50986999)(81166006)(5002640100001)(19580395003)(189998001)(7416002)(2900100001)(2950100001)(3660700001)(19580405001)(8936002)(76176999)(93886004)(10400500002)(54356999)(2906002)(7736002)(92566002)(66066001)(106116001)(110136002)(77096005)(87386001)(305945005)(7696004)(74316002)(5660300001)(9686002)(4001520100001)(122556002)(11100500001)(5001760100003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM5PR0501MB2100;H:AM5PR0501MB2097.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Sep 2016 07:23:59.5401 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0501MB2100 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u8C7vKxV010772 > -----Original Message----- > From: Greg KH [mailto:gregkh@linuxfoundation.org] > Sent: Monday, September 12, 2016 10:05 AM > To: Vadim Pasternak > Cc: tglx@linutronix.de; mingo@redhat.com; hpa@zytor.com; > davem@davemloft.net; geert@linux-m68k.org; akpm@linux-foundation.org; > kvalo@codeaurora.org; mchehab@kernel.org; linux@roeck-us.net; > x86@kernel.org; linux-kernel@vger.kernel.org; platform-driver- > x86@vger.kernel.org; jiri@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:gregkh@linuxfoundation.org] > > > Sent: Monday, September 12, 2016 9:13 AM > > > To: Vadim Pasternak > > > Cc: tglx@linutronix.de; mingo@redhat.com; hpa@zytor.com; > > > davem@davemloft.net; geert@linux-m68k.org; > > > akpm@linux-foundation.org; kvalo@codeaurora.org; mchehab@kernel.org; > > > linux@roeck-us.net; x86@kernel.org; linux-kernel@vger.kernel.org; > > > platform-driver- x86@vger.kernel.org; jiri@resnulli.us > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for > > > Mellanox systems platform > > > > > > On Mon, Sep 12, 2016 at 06:29:58AM +0000, vadimp@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, &mlxplat_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(&ts5500_dio1_pdev) > thanks, > > greg k-h Thanks, Vadim. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vadim Pasternak Subject: RE: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform Date: Mon, 12 Sep 2016 07:23:59 +0000 Message-ID: References: <1473661798-112691-1-git-send-email-vadimp@mellanox.com> <20160912061237.GB11230@kroah.com> <20160912070457.GA4590@kroah.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-db5eur01on0067.outbound.protection.outlook.com ([104.47.2.67]:61762 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753142AbcILH5M (ORCPT ); Mon, 12 Sep 2016 03:57:12 -0400 In-Reply-To: <20160912070457.GA4590@kroah.com> Content-Language: en-US Sender: platform-driver-x86-owner@vger.kernel.org List-ID: To: Greg KH Cc: "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , "davem@davemloft.net" , "geert@linux-m68k.org" , "akpm@linux-foundation.org" , "kvalo@codeaurora.org" , "mchehab@kernel.org" , "linux@roeck-us.net" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "platform-driver-x86@vger.kernel.org" , "jiri@resnulli.us" > -----Original Message----- > From: Greg KH [mailto:gregkh@linuxfoundation.org] > Sent: Monday, September 12, 2016 10:05 AM > To: Vadim Pasternak > Cc: tglx@linutronix.de; mingo@redhat.com; hpa@zytor.com; > davem@davemloft.net; geert@linux-m68k.org; akpm@linux-foundation.org; > kvalo@codeaurora.org; mchehab@kernel.org; linux@roeck-us.net; > x86@kernel.org; linux-kernel@vger.kernel.org; platform-driver- > x86@vger.kernel.org; jiri@resnulli.us > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for Mell= anox > systems platform >=20 > On Mon, Sep 12, 2016 at 06:44:03AM +0000, Vadim Pasternak wrote: > > > > > > > -----Original Message----- > > > From: Greg KH [mailto:gregkh@linuxfoundation.org] > > > Sent: Monday, September 12, 2016 9:13 AM > > > To: Vadim Pasternak > > > Cc: tglx@linutronix.de; mingo@redhat.com; hpa@zytor.com; > > > davem@davemloft.net; geert@linux-m68k.org; > > > akpm@linux-foundation.org; kvalo@codeaurora.org; mchehab@kernel.org; > > > linux@roeck-us.net; x86@kernel.org; linux-kernel@vger.kernel.org; > > > platform-driver- x86@vger.kernel.org; jiri@resnulli.us > > > Subject: Re: [patch v1] x86/platform/mellanox: introduce support for > > > Mellanox systems platform > > > > > > On Mon, Sep 12, 2016 at 06:29:58AM +0000, vadimp@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 clai= m it is a > "platform" driver. > > > > > > > This driver also activates probes to create i2c platform driver and mux= es. >=20 > And how does it do that? Through the PCI device? >=20 > > 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. >=20 > How is it found in a x86 system, in ACPI? >=20 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? >=20 > 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, &mlxplat_mux_data[i], sizeof(mlxplat_mux_data[i])= ); >=20 > > For example, could I have the code like in f.e. in > > arch/x86/platform/ts5500/ts5500.c as a platform initialization code? >=20 > How does it talk to the hardware for this? >=20 It defines several platform devices, like: static struct platform_device ts5500_dio1_pdev =3D { .name =3D "ts5500-dio1", .id =3D -1, .resource =3D ts5500_dio1_resource, .num_resources =3D 1, }; And registers them in __init, like: platform_device_register(&ts5500_dio1_pdev) > thanks, >=20 > greg k-h Thanks, Vadim.