From patchwork Thu Aug 25 07:48:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takahiro Kuwano X-Patchwork-Id: 1670095 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=E2ObOlyM; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MCw9C3JQLz1yhC for ; Thu, 25 Aug 2022 17:49:50 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1021484873; Thu, 25 Aug 2022 09:49:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="E2ObOlyM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9982B84855; Thu, 25 Aug 2022 09:49:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 885B284855 for ; Thu, 25 Aug 2022 09:49:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tkuw584924@gmail.com Received: by mail-pf1-x430.google.com with SMTP id x26so1667562pfo.8 for ; Thu, 25 Aug 2022 00:49:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=0KDh5iT5/nRRdYX8EN81Sbbv2iKjebn4K/o7C7CQkZQ=; b=E2ObOlyMfJpqlW8U8AYt0lA0ZQfGvkjfSkxnYU5CiCATxU0ScZuGCaY/v9uIvL/BjZ HqtLqBKuqsF0PSQufkd7BkKZPjpHdyWApygjd78kvBefcrCP7XhcHdKC1rlz+9+HRIyh aG/wpuKZjDKxwo2rKByVCNt8Ez25CSf7RADOk9s0S5UhxseWrj//8GukipuqghRfG28R 8ekE3S4thBvDFHrXOORNXBHpcX3lZaY5QwJ8asNwH5VpCI5NdfqD6fTjTwp4EaWxUh4O pxHt3PYUKeRajr6L67dmmhvVwBhp3C8v58VmX555crB3ssc2K/TcRLT8JFj/tvbaywxl zWrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=0KDh5iT5/nRRdYX8EN81Sbbv2iKjebn4K/o7C7CQkZQ=; b=0HK6H+ddHa8hpjuoIC8+QmLAPBMuow129+m1dKgxeRgbjGJmAv7cw7OKBBmBnolgXO Ud0dwpQW4n4zpaHr7ljf8d1AGCZmpu3vJ9UuEXHX0otlSJHz4I85lP+Eyig+tfCY7vdx Ww4ZsvYfijg6fuzwekwv3N3wlmUOHYU98Mmi8coUHeEJYSU3LIpFzUK2TZChrVNorn+H BMY2as2DSL3j8TAwZEGGlLwhD7RaHeZ2WbseX8vNf4IxPUQKaIuF/A/K9MDgvU0EbB1u 2GrTZy9Ka1fFJMJyKJuSRas+iyXK0pw/mOyTMQsENsH0CEqV5Af7CZqlJ5WB3jPNr3re aMjA== X-Gm-Message-State: ACgBeo1YdiQ2uYAk35SabMnfYMoUcbDUiILzDXWVFve81vPJYOsLS3R2 0Kpdfcnrvqv2IaPhUHvepIApGZBSifM= X-Google-Smtp-Source: AA6agR6Ch5bdLT7B4d9RbYLmctSS3rAMnpwOfRajdhMSsa2V/FdkLYw9M/bz+iw9bT+t0VU2xT4fKw== X-Received: by 2002:a65:6a83:0:b0:42b:344a:3546 with SMTP id q3-20020a656a83000000b0042b344a3546mr2303730pgu.612.1661413772811; Thu, 25 Aug 2022 00:49:32 -0700 (PDT) Received: from ISCNPF1JZGWX.infineon.com (KD106168128197.ppp-bb.dion.ne.jp. [106.168.128.197]) by smtp.gmail.com with ESMTPSA id k1-20020a170902c40100b001732d38858fsm775175plk.110.2022.08.25.00.49.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 00:49:32 -0700 (PDT) From: tkuw584924@gmail.com X-Google-Original-From: Takahiro.Kuwano@infineon.com To: u-boot@lists.denx.de Cc: jagan@amarulasolutions.com, vigneshr@ti.com, pratyush@kernel.org, a-govindraju@ti.com, tkuw584924@gmail.com, Bacem.Daassi@infineon.com, Takahiro Kuwano Subject: [PATCH 1/3] mtd: spi-nor-core: Rename s28hs512t prefix Date: Thu, 25 Aug 2022 16:48:46 +0900 Message-Id: <6e5f84fe08aec5a347a04e860ebce0c18dcb04bd.1661413377.git.Takahiro.Kuwano@infineon.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: Takahiro Kuwano Change prefix to support all other devices in SEMPER S28 family. Signed-off-by: Takahiro Kuwano --- drivers/mtd/spi/spi-nor-core.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index e3c86e080a..5f16bf7b1a 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -3369,15 +3369,15 @@ static int spi_nor_cypress_octal_dtr_enable(struct spi_nor *nor) return 0; } -static int s28hs512t_erase_non_uniform(struct spi_nor *nor, loff_t addr) +static int s28hx_t_erase_non_uniform(struct spi_nor *nor, loff_t addr) { /* Factory default configuration: 32 x 4 KiB sectors at bottom. */ return spansion_erase_non_uniform(nor, addr, SPINOR_OP_S28_SE_4K, 0, SZ_128K); } -static int s28hs512t_setup(struct spi_nor *nor, const struct flash_info *info, - const struct spi_nor_flash_parameter *params) +static int s28hx_t_setup(struct spi_nor *nor, const struct flash_info *info, + const struct spi_nor_flash_parameter *params) { struct spi_mem_op op; u8 buf; @@ -3404,19 +3404,19 @@ static int s28hs512t_setup(struct spi_nor *nor, const struct flash_info *info, return ret; if (!(buf & SPINOR_REG_CYPRESS_CFR3V_UNISECT)) - nor->erase = s28hs512t_erase_non_uniform; + nor->erase = s28hx_t_erase_non_uniform; return spi_nor_default_setup(nor, info, params); } -static void s28hs512t_default_init(struct spi_nor *nor) +static void s28hx_t_default_init(struct spi_nor *nor) { nor->octal_dtr_enable = spi_nor_cypress_octal_dtr_enable; - nor->setup = s28hs512t_setup; + nor->setup = s28hx_t_setup; } -static void s28hs512t_post_sfdp_fixup(struct spi_nor *nor, - struct spi_nor_flash_parameter *params) +static void s28hx_t_post_sfdp_fixup(struct spi_nor *nor, + struct spi_nor_flash_parameter *params) { /* * On older versions of the flash the xSPI Profile 1.0 table has the @@ -3446,10 +3446,10 @@ static void s28hs512t_post_sfdp_fixup(struct spi_nor *nor, params->rdsr_addr_nbytes = 4; } -static int s28hs512t_post_bfpt_fixup(struct spi_nor *nor, - const struct sfdp_parameter_header *bfpt_header, - const struct sfdp_bfpt *bfpt, - struct spi_nor_flash_parameter *params) +static int s28hx_t_post_bfpt_fixup(struct spi_nor *nor, + const struct sfdp_parameter_header *bfpt_header, + const struct sfdp_bfpt *bfpt, + struct spi_nor_flash_parameter *params) { struct spi_mem_op op; u8 buf; @@ -3486,10 +3486,10 @@ static int s28hs512t_post_bfpt_fixup(struct spi_nor *nor, return 0; } -static struct spi_nor_fixups s28hs512t_fixups = { - .default_init = s28hs512t_default_init, - .post_sfdp = s28hs512t_post_sfdp_fixup, - .post_bfpt = s28hs512t_post_bfpt_fixup, +static struct spi_nor_fixups s28hx_t_fixups = { + .default_init = s28hx_t_default_init, + .post_sfdp = s28hx_t_post_sfdp_fixup, + .post_bfpt = s28hx_t_post_bfpt_fixup, }; #endif /* CONFIG_SPI_FLASH_S28HS512T */ @@ -3824,7 +3824,7 @@ void spi_nor_set_fixups(struct spi_nor *nor) #ifdef CONFIG_SPI_FLASH_S28HS512T if (!strcmp(nor->info->name, "s28hs512t")) - nor->fixups = &s28hs512t_fixups; + nor->fixups = &s28hx_t_fixups; #endif #ifdef CONFIG_SPI_FLASH_MT35XU