From patchwork Tue Jun 4 07:34:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1109663 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.se header.i=@prevas.se header.b="ShgZdwXn"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 45J3bW15Kcz9sBb for ; Tue, 4 Jun 2019 17:34:47 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726943AbfFDHep (ORCPT ); Tue, 4 Jun 2019 03:34:45 -0400 Received: from mail-eopbgr00119.outbound.protection.outlook.com ([40.107.0.119]:36579 "EHLO EUR02-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726996AbfFDHeo (ORCPT ); Tue, 4 Jun 2019 03:34:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.se; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=987R//YVqi0cvNOk97EH5a/ZpgvdUuDdRoXjuZJnUHI=; b=ShgZdwXnnxv/RXpXNdJZ8yNCRvmNrf5heMMGkBWLXJWwUTEfFg9WvRqrTJN5FofzId/3ItJHIUwcWG5j5xb2Aa6iSWtcX9Nd55X/CBVNi/5oqA7au657FFDr+Dpo4F5xNvufW74bvmRxKlV7gpRbvrI/F+/JSB5DfJkRZWklJfA= Received: from DB8PR10MB2634.EURPRD10.PROD.OUTLOOK.COM (20.179.10.220) by DB8PR10MB3068.EURPRD10.PROD.OUTLOOK.COM (10.255.19.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1965.12; Tue, 4 Jun 2019 07:34:35 +0000 Received: from DB8PR10MB2634.EURPRD10.PROD.OUTLOOK.COM ([fe80::a0b0:f05d:f1e:2d5b]) by DB8PR10MB2634.EURPRD10.PROD.OUTLOOK.COM ([fe80::a0b0:f05d:f1e:2d5b%4]) with mapi id 15.20.1943.018; Tue, 4 Jun 2019 07:34:35 +0000 From: Rasmus Villemoes To: Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" CC: Rasmus Villemoes , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH net-next v4 10/10] net: dsa: mv88e6xxx: refactor mv88e6352_g1_reset Thread-Topic: [PATCH net-next v4 10/10] net: dsa: mv88e6xxx: refactor mv88e6352_g1_reset Thread-Index: AQHVGqf17q8Evgd5XEqT1Wmw3jFofQ== Date: Tue, 4 Jun 2019 07:34:35 +0000 Message-ID: <20190604073412.21743-11-rasmus.villemoes@prevas.dk> References: <20190604073412.21743-1-rasmus.villemoes@prevas.dk> In-Reply-To: <20190604073412.21743-1-rasmus.villemoes@prevas.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6PR03CA0030.eurprd03.prod.outlook.com (2603:10a6:20b::43) To DB8PR10MB2634.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:ab::28) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Rasmus.Villemoes@prevas.se; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.20.1 x-originating-ip: [81.216.59.226] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 425e284d-7d2b-4322-e798-08d6e8bf1746 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:DB8PR10MB3068; x-ms-traffictypediagnostic: DB8PR10MB3068: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4125; x-forefront-prvs: 0058ABBBC7 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(366004)(39850400004)(136003)(376002)(396003)(346002)(189003)(199004)(4326008)(8976002)(8936002)(71200400001)(71190400001)(6436002)(6486002)(68736007)(446003)(486006)(2616005)(11346002)(81156014)(8676002)(66066001)(50226002)(36756003)(81166006)(42882007)(476003)(53936002)(186003)(52116002)(73956011)(76176011)(66946007)(66476007)(66556008)(64756008)(66446008)(99286004)(7736002)(44832011)(25786009)(72206003)(305945005)(478600001)(74482002)(1076003)(256004)(6512007)(102836004)(3846002)(26005)(6116002)(386003)(6506007)(316002)(14454004)(54906003)(5660300002)(2906002)(110136005); DIR:OUT; SFP:1102; SCL:1; SRVR:DB8PR10MB3068; H:DB8PR10MB2634.EURPRD10.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: prevas.se does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: wuvwoEh2CFRDNUDVjPMnWtGCBpk63MRGt856KIpBaYs/dLJ4R8Dpo0uu7dA0wlR/IEanckW076XcasqOdVTHmteQMb8awFcLE1N5OxdAo/aYgo5bmxwWQ90Id2WOMIpCLQpWVxisLEbYEEygk9TGStO6D8MmY++ZhbwTwWFh7T3pb8+hcdiZxBAnlLQfsb7DElul+OWblsoBvmpJhx74CkBI6Kqh4njR1CgVJNcS+CbjG3dHYpMdhA2OW0r1qZlJOst65HExaunuhrJdAVPuHzoiJgd6KktnbtDCyGpNZIEMJ+v60lL2T2nbcjn+xv4/TZnWY59b79rtvH+u/L42suC1XyHpBXMHPfKJ0sIh2chU+D1XW20pwasn5ojMsSkP7gQLecOwSIPV/M+sRz8L1P4l+kB9UoSUoN7qj7uzI/g= MIME-Version: 1.0 X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: 425e284d-7d2b-4322-e798-08d6e8bf1746 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2019 07:34:35.1961 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Rasmus.Villemoes@prevas.dk X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR10MB3068 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The new mv88e6250_g1_reset() is identical to mv88e6352_g1_reset() except for the call of mv88e6352_g1_wait_ppu_polling(), so refactor the 6352 version in term of the 6250 one. No functional change. Reviewed-by: Andrew Lunn Signed-off-by: Rasmus Villemoes --- drivers/net/dsa/mv88e6xxx/global1.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/global1.c b/drivers/net/dsa/mv88e6xxx/global1.c index fc10b6e495f5..41c0792a2e2b 100644 --- a/drivers/net/dsa/mv88e6xxx/global1.c +++ b/drivers/net/dsa/mv88e6xxx/global1.c @@ -203,21 +203,9 @@ int mv88e6250_g1_reset(struct mv88e6xxx_chip *chip) int mv88e6352_g1_reset(struct mv88e6xxx_chip *chip) { - u16 val; int err; - /* Set the SWReset bit 15 */ - err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, &val); - if (err) - return err; - - val |= MV88E6XXX_G1_CTL1_SW_RESET; - - err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, val); - if (err) - return err; - - err = mv88e6xxx_g1_wait_init_ready(chip); + err = mv88e6250_g1_reset(chip); if (err) return err;