Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1272376pxb; Fri, 18 Feb 2022 04:28:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxYwvC2dVq22Vw0QeYX4L9nymrveaStgaUgehg1btxhbQpvkLAt73hPm82ZYAX6FyAr85fR X-Received: by 2002:a17:902:e84a:b0:14e:d70b:92d5 with SMTP id t10-20020a170902e84a00b0014ed70b92d5mr7279966plg.94.1645187292821; Fri, 18 Feb 2022 04:28:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645187292; cv=none; d=google.com; s=arc-20160816; b=O9bRrcsndeRZxC6zgfizOfASfYvog/1dUdeNuCF7zFCrDAytr1lK9oi/A/S2KBaRQl FbR7TVJXabd5ugMYk2a2CQcYuuX6cNYoLvAGiHE+iVbuJX0mEhYTg2RG7hjFgT1DJoaR AnnTe4v9xYSbORYk/tgd0mJdRW7vP190bXKEByFLJRfyepNNfuHl1l9SoDDUU1M17/OV +gDZogXoMM2QjJzqsaz20Ec8PNKjqPClrZstfyDVbBdqZCTLVzAAKix5aUDaxoV6WQWD gAKoIL6D8QjmZ6O52CqzcVPyDpATjX4PfuAaYfAigX1/WuqOc1TrTlMQYzxmw1qgI+2P mqhQ== 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 :dkim-signature; bh=TVr3ei/zYQMSUzZaFUQ8S5hh2hTqvyLfZwC1r+crQ0A=; b=kShyavcVbHNlNgiZiJ4hjRFMW9EuPwxU8LQTKM5JSjCuh57JP7qDUCq/kuoDI3ZLH3 UVOe68Zr34Yq/+WwjnSiLrxKYGq/w0JHiMbojDmg+ISc3iH3AZE/naG+qn04/eTRxvJv A4fyI6S58FExixg7gt6l2Dh2l20qEtoOW9G4kMo8nKmeUIje4ZgO5d5mEsSy9C42K33n zbgaTNuER8BfVOTkqAq4I8mnE5YOf91gmu7czkLn8GwOIlScbx55GM4BpGHXB+g9PVEX H1K3lhhRdJuWltrMYotAn0kviPZPeSVFRnweh5RZGtjsyYmuN4+RLBO9Axv9FMK3uDTW lZTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=TVc6c1XY; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oj18si3511250pjb.17.2022.02.18.04.27.58; Fri, 18 Feb 2022 04:28:12 -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; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=TVc6c1XY; 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 S234413AbiBRLiO (ORCPT + 99 others); Fri, 18 Feb 2022 06:38:14 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:44602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234605AbiBRLgp (ORCPT ); Fri, 18 Feb 2022 06:36:45 -0500 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BC3A2B4056 for ; Fri, 18 Feb 2022 03:36:25 -0800 (PST) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 814D62248E; Fri, 18 Feb 2022 12:36:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1645184181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TVr3ei/zYQMSUzZaFUQ8S5hh2hTqvyLfZwC1r+crQ0A=; b=TVc6c1XYX8fNeZlkL2XA9GSV4kWaXLg+qE9i2Clh7tcYWpG8cvHw0fm6+pj0Eh3rCay4cC 4AXoQgxxwbC9NQEVA/Sw0VoIoQURysczutWcWZtUJbRTLmc7XwI0tchv4a8VDcUfGUkV39 0i3/SLq3KrwADr4wSmH8NxYm+5Pep00= From: Michael Walle To: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Tudor Ambarus , Pratyush Yadav , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , yaliang.wang@windriver.com, Michael Walle Subject: [PATCH v2 22/32] mtd: spi-nor: xilinx: rename vendor specific functions and defines Date: Fri, 18 Feb 2022 12:35:57 +0100 Message-Id: <20220218113607.1360020-23-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220218113607.1360020-1-michael@walle.cc> References: <20220218113607.1360020-1-michael@walle.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Drop the generic spi_nor prefix for all the xilinx functions. Signed-off-by: Michael Walle --- drivers/mtd/spi-nor/xilinx.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/mtd/spi-nor/xilinx.c b/drivers/mtd/spi-nor/xilinx.c index 2140d6b2bb02..c098c50379b4 100644 --- a/drivers/mtd/spi-nor/xilinx.c +++ b/drivers/mtd/spi-nor/xilinx.c @@ -8,9 +8,9 @@ #include "core.h" -#define SPINOR_OP_XSE 0x50 /* Sector erase */ -#define SPINOR_OP_XPP 0x82 /* Page program */ -#define SPINOR_OP_XRDSR 0xd7 /* Read status register */ +#define XILINX_OP_SE 0x50 /* Sector erase */ +#define XILINX_OP_PP 0x82 /* Page program */ +#define XILINX_OP_RDSR 0xd7 /* Read status register */ #define XSR_PAGESIZE BIT(0) /* Page size in Po2 or Linear */ #define XSR_RDY BIT(7) /* Ready */ @@ -60,20 +60,20 @@ static u32 s3an_convert_addr(struct spi_nor *nor, u32 addr) } /** - * spi_nor_xread_sr() - Read the Status Register on S3AN flashes. + * xilinx_nor_read_sr() - Read the Status Register on S3AN flashes. * @nor: pointer to 'struct spi_nor'. * @sr: pointer to a DMA-able buffer where the value of the * Status Register will be written. * * Return: 0 on success, -errno otherwise. */ -static int spi_nor_xread_sr(struct spi_nor *nor, u8 *sr) +static int xilinx_nor_read_sr(struct spi_nor *nor, u8 *sr) { int ret; if (nor->spimem) { struct spi_mem_op op = - SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_XRDSR, 0), + SPI_MEM_OP(SPI_MEM_OP_CMD(XILINX_OP_RDSR, 0), SPI_MEM_OP_NO_ADDR, SPI_MEM_OP_NO_DUMMY, SPI_MEM_OP_DATA_IN(1, sr, 0)); @@ -82,7 +82,7 @@ static int spi_nor_xread_sr(struct spi_nor *nor, u8 *sr) ret = spi_mem_exec_op(nor->spimem, &op); } else { - ret = spi_nor_controller_ops_read_reg(nor, SPINOR_OP_XRDSR, sr, + ret = spi_nor_controller_ops_read_reg(nor, XILINX_OP_RDSR, sr, 1); } @@ -93,17 +93,17 @@ static int spi_nor_xread_sr(struct spi_nor *nor, u8 *sr) } /** - * spi_nor_xsr_ready() - Query the Status Register of the S3AN flash to see if - * the flash is ready for new commands. + * xilinx_nor_sr_ready() - Query the Status Register of the S3AN flash to see + * if the flash is ready for new commands. * @nor: pointer to 'struct spi_nor'. * * Return: 1 if ready, 0 if not ready, -errno on errors. */ -static int spi_nor_xsr_ready(struct spi_nor *nor) +static int xilinx_nor_sr_ready(struct spi_nor *nor) { int ret; - ret = spi_nor_xread_sr(nor, nor->bouncebuf); + ret = xilinx_nor_read_sr(nor, nor->bouncebuf); if (ret) return ret; @@ -116,12 +116,12 @@ static int xilinx_nor_setup(struct spi_nor *nor, u32 page_size; int ret; - ret = spi_nor_xread_sr(nor, nor->bouncebuf); + ret = xilinx_nor_read_sr(nor, nor->bouncebuf); if (ret) return ret; - nor->erase_opcode = SPINOR_OP_XSE; - nor->program_opcode = SPINOR_OP_XPP; + nor->erase_opcode = XILINX_OP_SE; + nor->program_opcode = XILINX_OP_PP; nor->read_opcode = SPINOR_OP_READ; nor->flags |= SNOR_F_NO_OP_CHIP_ERASE; @@ -155,7 +155,7 @@ static int xilinx_nor_setup(struct spi_nor *nor, static void xilinx_nor_late_init(struct spi_nor *nor) { nor->params->setup = xilinx_nor_setup; - nor->params->ready = spi_nor_xsr_ready; + nor->params->ready = xilinx_nor_sr_ready; } static const struct spi_nor_fixups xilinx_nor_fixups = { -- 2.30.2