From patchwork Tue Mar 7 22:46:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65927 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp5468wrd; Tue, 7 Mar 2023 14:52:11 -0800 (PST) X-Google-Smtp-Source: AK7set+p0Fx73Q4KpiJHjk5hlVOs7iKL9OOGb77u8/Y/1IGJUIJpo5Hz7/I50cBnmx5Vf8jeOjXN X-Received: by 2002:a05:6a20:8f04:b0:bf:4563:e647 with SMTP id b4-20020a056a208f0400b000bf4563e647mr18776576pzk.40.1678229531646; Tue, 07 Mar 2023 14:52:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678229531; cv=none; d=google.com; s=arc-20160816; b=JpxHuzJlN/BHYIGAHBfgDpEjd7trEajQrHi4XVRW5LoOBJE3CrWjI/lplNt0UoQf/3 zAaYc6bqNfjk6OnoLf3xO7py1yufLIBNDfy+85rHuWYq16ODFjrQwZtPxPW/JJgJP2sL 0+oSe2UkGre0SgDcWhcN6+zWz7NvaNAsmV5TlMpvX00qNUbICEC4ItoTWL0mUy57pCKB KJryUoSJwWaYuvDmFDEQPhMrP5tNwa/lBJlkr8gJs09eCe273C3IEd7mPszZYCpmAFB0 sSJoN7JsgxUS9b54unrgMfiQnCsW35BaPQBaoliMGw8dzLuWeNFI0irCNoodP8GvD9PB OysQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=L/OGCCzGTtunOvAt0ix/2Iscs1X3UcSOtts3pByL0KM=; b=V6Ww1vfa4RaHKt1zY0bMp8JKKhrZjNOazIHBiAgQCS4Gr5A4Juyb1dM8AunbMHExe9 qztFipgyc9tkKOuhHBD4ITAXqmyv1yhbFKNsVDzIYYh+/5fI/R0PU0T1VxfrxCnUnXog 4mEXXLwOiGHA7A0pCLDTnKIBx2Ok05wDKlYVEu3YsSMK6wx5eIEUwGvpARdjMQQprt5/ B3UGxdgzckM14KzyyfQrr1CqvP1Pkps4L8WWr8VjTYQzgwKtGX1GT6jyRruf/mwvAgMl wllSNqSLRMHb+ucUL2fQVfLCul1DN5eS8ft6sjZT/7Xd8mV4ez8I28sgKx8/YFlrzINl lPtg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p123-20020a622981000000b005939fff6d47si12183834pfp.326.2023.03.07.14.51.58; Tue, 07 Mar 2023 14:52:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230272AbjCGWt0 (ORCPT + 99 others); Tue, 7 Mar 2023 17:49:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231598AbjCGWrd (ORCPT ); Tue, 7 Mar 2023 17:47:33 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E6393867D3; Tue, 7 Mar 2023 14:47:08 -0800 (PST) Received: from gsql.ggedos.sk (off-20.infotel.telecom.sk [212.5.213.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by hosting.gsystem.sk (Postfix) with ESMTPSA id 425DB7A0750; Tue, 7 Mar 2023 23:46:50 +0100 (CET) From: Ondrej Zary To: Damien Le Moal , Sudip Mukherjee Cc: Christoph Hellwig , Sergey Shtylyov , Jens Axboe , Tim Waugh , linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 23/32] pata_parport-bpck6: move ppc6_wr_extout to bpck6.c and rename Date: Tue, 7 Mar 2023 23:46:18 +0100 Message-Id: <20230307224627.28011-24-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230307224627.28011-1-linux@zary.sk> References: <20230307224627.28011-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759751209359398462?= X-GMAIL-MSGID: =?utf-8?q?1759751209359398462?= Move ppc6_wr_extout to bpck6.c and rename it to bpck6_wr_extout Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/bpck6.c | 10 ++++++++-- drivers/ata/pata_parport/ppc6lnx.c | 10 ---------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 1f976ee04ef2..968c9f3297e3 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -174,18 +174,24 @@ static void bpck6_read_block(struct pi_adapter *pi, char *buf, int len) ppc6_send_cmd(pi, CMD_PREFIX_RESET | PREFIX_IO16 | PREFIX_BLK); } +static void bpck6_wr_extout(struct pi_adapter *pi, u8 regdata) +{ + ppc6_send_cmd(pi, REG_VERSION | ACCESS_REG | ACCESS_WRITE); + ppc6_wr_data_byte(pi, (u8)((regdata & 0x03) << 6)); +} + static void bpck6_connect(struct pi_adapter *pi) { dev_dbg(&pi->dev, "connect\n"); ppc6_open(pi); - ppc6_wr_extout(pi, 0x3); + bpck6_wr_extout(pi, 0x3); } static void bpck6_disconnect(struct pi_adapter *pi) { dev_dbg(&pi->dev, "disconnect\n"); - ppc6_wr_extout(pi, 0x0); + bpck6_wr_extout(pi, 0x0); ppc6_deselect(pi); } diff --git a/drivers/ata/pata_parport/ppc6lnx.c b/drivers/ata/pata_parport/ppc6lnx.c index cd4fa31a5ff8..931bf67fabb9 100644 --- a/drivers/ata/pata_parport/ppc6lnx.c +++ b/drivers/ata/pata_parport/ppc6lnx.c @@ -72,7 +72,6 @@ static void ppc6_deselect(struct pi_adapter *pi); static void ppc6_send_cmd(struct pi_adapter *pi, u8 cmd); static void ppc6_wr_data_byte(struct pi_adapter *pi, u8 data); static u8 ppc6_rd_data_byte(struct pi_adapter *pi); -static void ppc6_wr_extout(struct pi_adapter *pi, u8 regdata); static int ppc6_open(struct pi_adapter *pi); //*************************************************************************** @@ -281,15 +280,6 @@ static u8 ppc6_rd_data_byte(struct pi_adapter *pi) //*************************************************************************** -static void ppc6_wr_extout(struct pi_adapter *pi, u8 regdata) -{ - ppc6_send_cmd(pi, REG_VERSION | ACCESS_REG | ACCESS_WRITE); - - ppc6_wr_data_byte(pi, (u8)((regdata & 0x03) << 6)); -} - -//*************************************************************************** - static int ppc6_open(struct pi_adapter *pi) { int ret;