Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755260AbbG1OHe (ORCPT ); Tue, 28 Jul 2015 10:07:34 -0400 Received: from mail-bn1on0080.outbound.protection.outlook.com ([157.56.110.80]:55568 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753103AbbG1OHb (ORCPT ); Tue, 28 Jul 2015 10:07:31 -0400 Authentication-Results: cavium.com; dkim=none (message not signed) header.d=none; Subject: Re: [PATCH 1/3] net: mdio-octeon: Modify driver to work on both ThunderX and Octeon To: , , , , References: <1438049683-10630-1-git-send-email-mohun106@gmail.com> <1438049683-10630-2-git-send-email-mohun106@gmail.com> CC: Radha Mohan Chintakuntla , Sunil Goutham , David Daney From: David Daney Message-ID: <55B78C9C.6080006@caviumnetworks.com> Date: Tue, 28 Jul 2015 07:07:24 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1438049683-10630-2-git-send-email-mohun106@gmail.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [66.187.233.206] X-ClientProxiedBy: SN2PR07CA001.namprd07.prod.outlook.com (10.255.174.18) To BY1PR0701MB1721.namprd07.prod.outlook.com (25.162.111.140) X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1721;2:3F5wqVNAqZgjSUB+SQV5fA7Wbgrjs6ip/94KDrV5u3kj+8MirkWSmYXLQBuOZEGh24WKkkIVps+VwiCtiWTgvvB2pia84+5pOZpPOG6zzw3onUle1gFWlRQtYv80qDXyQd+21+b2L8oJ7Qqq8M8f+G0Dan/4HknyDuKeLAlFm18=;3:zQ7e1u9nly8UTLqz5pf/HF1dmKVLgjGEW1ztGE35VqbPi1QUe4kTrL0brVaaR4e49wghpPh3EssukaWzm6G5fN/dN4xe1veG7bv+QpHbH8JEgISgXVP7Z5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ogXf3W15rjg8S0aF+xTLP9MdI0WOrokVgZ3rlqyPIYa5XKFlK2Z+25ivGWej0QcZclWSTraum/79JrfjJ3j9YJReSZQ5uDqePlPTkbYdfFmHpJpJPv6h/zfau+iBJq5R9N1YrJQKHstrClu92r7B9Cx3GWMw46o7kpJrAxd17HRquDXWOu+WhDelTWVi0JZH3o+oxtMTFDAqBtIMfd4V8d7gvwA/7Zl9xTWvdDLk/guinZuyQThtvXGm3xOc= BY1PR0701MB1721: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BY1PR0701MB1721;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1721; X-Forefront-PRVS: 06515DA04B X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(24454002)(377454003)(479174004)(83506001)(59896002)(40100003)(65956001)(50986999)(77096005)(122386002)(42186005)(77156002)(33656002)(92566002)(66066001)(47776003)(19580395003)(76506005)(4001350100001)(64126003)(87266999)(5001770100001)(65816999)(80316001)(5001920100001)(2201001)(19580405001)(53416004)(62966003)(36756003)(2950100001)(189998001)(76176999)(46102003)(65806001)(5001960100002)(23746002)(54356999)(7099028);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0701MB1721;H:localhost.caveonetworks.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;BY1PR0701MB1721;23:lM+f/fmQKm85hOenP09jYs5EeczWX29/Lgs?= =?Windows-1252?Q?ACdX/vM0wsU5LM0IfCDS6Z/vpghGNEaXJTqxw2cyV/eiIfCmuUL1w+uU?= =?Windows-1252?Q?nYXVJ6qlu1lLV+1hD6bXVLxjODAzTcR8bqRFPJCAT7USYPWzp6ciZlOO?= =?Windows-1252?Q?iR9QdFaoev6o41w79u9x7EuwqcLAj3E+yKOOaSYc+m+xL/eARsr5VQXv?= =?Windows-1252?Q?LseHLfhmGRfsnRI74JIf6NzI0ktZ5/3FHDqTaKNPNBlCVDnRDiq7F/4A?= =?Windows-1252?Q?HiFSiJ6RXuxglDrLATpPVIze0qpVS5V3P/mw7Lv8iqmEgyvLXKK+c7lR?= =?Windows-1252?Q?+SFdr/2qws9lvac3Sfqzqg6Eop937SCtUk5GwrP2C6+iTSqsW5LA9G1F?= =?Windows-1252?Q?CrlWHWhN+RTwVH3WLx5R8PgTLOCT9T71RtI2AXAYFaHePvK37QgnOglp?= =?Windows-1252?Q?GmibzKHPu2NPaMTrmAkcr41uS+rEG67r0Kw4Sttx0Ms3Rh0wt0W0LsNV?= =?Windows-1252?Q?J1XijGz2DZSrLAmgR/76nT5YX/bUq8hmvFkqh5cS4WUULgt4ZWNNrSXt?= =?Windows-1252?Q?Mt6OZAxn65H/0wqXtqqifdr/k0CmSVgHKGXrKK6QbPgUXNhluqT3/YDN?= =?Windows-1252?Q?ozx0IVTEziGLCOwU1sZ1qPuo/DSNGWFFhKGAFLtt4qXVIFsqJXoO9WCC?= =?Windows-1252?Q?CEaWoacZlie8607Hu9Q6eb+dqMuF4Ze3nfkjoh3p/A1SvBFOWsX9qpQn?= =?Windows-1252?Q?BxohX6xDBqN4GbGm2BC0Rr43j1qTFPa9fLn6THFeGhQ3DpJkiXr2VNrF?= =?Windows-1252?Q?GKDJSEO7BtSm5i4ynuBIgdI2qJaRNsFJ6WRSSSNXo1/2wqgHIabXlgSf?= =?Windows-1252?Q?G5z5r84Tf9HsxS/m1LNAxemxv+waBv0ZQ2GpZluRfAiR2+Ath48NJT2l?= =?Windows-1252?Q?/1oFwpNv5IulRQ8AE4ahjnpm7Qz6Sm1aSqSx4Cyhzl8SHqz1JYuGULqv?= =?Windows-1252?Q?8Z6tMbLQjHRvMIiGlX5VbghCAtWTcY5j7qImbhbbdN13oJVmuKRzUwQD?= =?Windows-1252?Q?hD7mT+GwBJdtczAbR9rRvydzlIVs2s3Ohi1E8zexHq07RMdIQXYMaw9E?= =?Windows-1252?Q?RMGPleMnxxnZWfWbo8pu2qCM90tEJT3AhY5fXd/cV1BGo?= X-Microsoft-Exchange-Diagnostics: 1;BY1PR0701MB1721;5:CYm8her73hRCvsJsJTfU0QRGYDMhsFLudTw5j4rDJL0T6KxYCoCFQa6apq3AZWi/1I0ycxwX0LdiTTRdGfiBNbug0nm9HHJ1DZCL5YkpXCHhvMqvzDFO2W7h17M6nWFEPMq+nliIu31OWTSywgEKEA==;24:JFtc9xbxFlk52ULFpivAdX8bOR+eMeFL/2lPYIFJ4u3KMQoajhfmmugVgzUMIjRW3C46lwqSMP5VsUSZ1pWn64yStEZUdZ08SS2ILiKvH4s=;20:6gerb3sMjtvArfg1sNFJv4Yjtx1FaSqEfByUKniSDuhnMv2Jf2IJcVS6pA0yBEluSL2EdfltjF1Rxde3j+XsTQ== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jul 2015 14:07:27.6953 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1721 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2286 Lines: 75 On 07/27/2015 07:14 PM, mohun106@gmail.com wrote: > From: Radha Mohan Chintakuntla > > This patch modifies the mdio-octeon driver to work on both ThunderX and > Octeon SoCs from Cavium Inc. > > Signed-off-by: Sunil Goutham > Signed-off-by: Radha Mohan Chintakuntla > Signed-off-by: David Daney > --- > drivers/net/phy/Kconfig | 9 ++- > drivers/net/phy/mdio-octeon.c | 122 +++++++++++++++++++++++++++++++++++----- > 2 files changed, 111 insertions(+), 20 deletions(-) > > diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig > index cf18940..0d6af19 100644 > --- a/drivers/net/phy/Kconfig > +++ b/drivers/net/phy/Kconfig > @@ -145,13 +145,14 @@ config MDIO_GPIO > will be called mdio-gpio. > > config MDIO_OCTEON > - tristate "Support for MDIO buses on Octeon SOCs" > - depends on CAVIUM_OCTEON_SOC > + tristate "Support for MDIO buses on Octeon and ThunderX SOCs" > + depends on 64BIT > default y If it now depends only on 64BIT, we should probably remove the "default". People building for x86 are not interested in this driver. [...] > > +#ifdef __BIG_ENDIAN_BITFIELD > +#define OCT_MDIO_BITFIELD_FIELD(field, more) \ > + field; \ > + more > + > +#else > +#define OCT_MDIO_BITFIELD_FIELD(field, more) \ > + more \ > + field; > + > +#endif > + > +union cvmx_smix_clk { > + uint64_t u64; Perhaps: s/uint64_t/u64/ There are several of these. > + struct cvmx_smix_clk_s { > + OCT_MDIO_BITFIELD_FIELD(u64 reserved_25_63:39, > + OCT_MDIO_BITFIELD_FIELD(u64 mode:1, > + OCT_MDIO_BITFIELD_FIELD(u64 reserved_21_23:3, > + OCT_MDIO_BITFIELD_FIELD(u64 sample_hi:5, > + OCT_MDIO_BITFIELD_FIELD(u64 sample_mode:1, > + OCT_MDIO_BITFIELD_FIELD(u64 reserved_14_14:1, > + OCT_MDIO_BITFIELD_FIELD(u64 clk_idle:1, > + OCT_MDIO_BITFIELD_FIELD(u64 preamble:1, > + OCT_MDIO_BITFIELD_FIELD(u64 sample:4, > + OCT_MDIO_BITFIELD_FIELD(u64 phase:8, > + ;)))))))))) > + } s; > +}; > + [...] -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/