From patchwork Fri Oct 29 17:26:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12593207 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A60A2C4332F for ; Fri, 29 Oct 2021 17:50:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6EA1B610CB for ; Fri, 29 Oct 2021 17:50:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6EA1B610CB Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Nw9ygweFbxjgw9n6yHqZnt8x1joWMM9WFrgs7wU8jpU=; b=wzaMLS20vr8kmw T6S5bK6v6QW+HZrNWttubRRCx7RGblMWPIrSY36q7yml0bI9k019vTXBSl40NL1aQsbsOJYc/+kiz K/WU+18NWQ5QZhzbMT3OHRztx7REWT/2fdj9p8h5F8sZcs/73IZcFgLBT6Z2GJdbEzJoJ59/I9/8O U9sndHqflVIyh3QCtd/RdHzGkIBIy9x3NP7+/fOTTqXzSIeIhA7HqSJy/c8rU+QpV7tpu+NuEkSvF UXvTbxa9hhZz/JA+wwjZctDoE2KP6XBP40oCX813MiFzPH69HNNqb0u2SGsUyMaZXdhXdQhD3OpAR tuM4fd5uokdk+TUjUv7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mgVza-00BeSC-Pe; Fri, 29 Oct 2021 17:48:40 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mgVfD-00BZFH-Es; Fri, 29 Oct 2021 17:27:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1635528455; x=1667064455; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2YdE+SgbfKpFNhWbzxp0lJU6yqY1YopFvEPZOalaIgQ=; b=IEymfV94LD9p239NPOQgDepudHioaANMUQ3FAxucrC7UrcA5cyrjcSSS gLg9fWxUM9uq8Q74NjdtfkFUv015fB9xMtRVyanA/vOkaE8nMG+f5DAI4 +/9I3vJQQMKvec16pbTSY6biX/EhKIlIF5XsEKMpboW6gU+rneMajqKkU Fq2iZDB7rr3cmkkcqnxn6xNPeTk6d9M2x2baEXLytlywgAhIJd8m0oZo5 TVKdE4DsgydC2HoMq2JXi4F82G2BXyRrOTrjnOQcEceSGSBcek4T7KLK9 I4xYbnpS650zK9wKUero1D+PK7Db8pL+dgb+HV55uqnGKbG0zIAt6yrKd w==; IronPort-SDR: TVM2A+KP9Ck1UjFB6QB4YfeVlLkC57D1sI3XOJVwod4BDDZmscM/VZkXddu0qFZK81iMy3QKC5 1amgEXnLyKoUxLOEoTBoR8NWTBvKHvJn0929QAJTy7nLUNWanDc1pB10o/fOc98zB+mo1iuHRk 9cerz/Fqdjk3cdGmKUTsXQAexg6MaNq0C0Iv607riDsPho8Pko3oCDN5iHJfu1U4INrIoXlWDZ 49BUnddbgMITn4EWHl1jL4cGGg+5NMJTuTDyqwjfB+SJo1EhN0iP3tExDvvbmAremTdlrttFw9 MwBvMJn8yQ1lMIzoN0G27HdX X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="150063392" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 29 Oct 2021 10:27:34 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Fri, 29 Oct 2021 10:27:30 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Fri, 29 Oct 2021 10:27:25 -0700 From: Tudor Ambarus To: , , Subject: [PATCH v3 10/25] mtd: spi-nor: sst: Use manufacturer late_init() to set _write() Date: Fri, 29 Oct 2021 20:26:18 +0300 Message-ID: <20211029172633.886453-11-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211029172633.886453-1-tudor.ambarus@microchip.com> References: <20211029172633.886453-1-tudor.ambarus@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211029_102735_568463_D1D84B52 X-CRM114-Status: GOOD ( 11.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: macromorgan@hotmail.com, jaimeliao@mxic.com.tw, Tudor Ambarus , richard@nod.at, esben@geanix.com, linux@rasmusvillemoes.dk, knaerzche@gmail.com, linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, code@reto-schneider.ch, miquel.raynal@bootlin.com, heiko.thiery@gmail.com, sr@denx.de, figgyc@figgyc.uk, mail@david-bauer.net, zhengxunli@mxic.com.tw Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Setting the correct nor->mtd._write in a fixup hook was misleading, since this is not a fixup, just a specific setting for SST, that differs from the SPI NOR core default init. Signed-off-by: Tudor Ambarus Reviewed-by: Michael Walle Reviewed-by: Pratyush Yadav --- drivers/mtd/spi-nor/sst.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/spi-nor/sst.c b/drivers/mtd/spi-nor/sst.c index 660aabde477a..3593aae0920f 100644 --- a/drivers/mtd/spi-nor/sst.c +++ b/drivers/mtd/spi-nor/sst.c @@ -177,14 +177,14 @@ static int sst_write(struct mtd_info *mtd, loff_t to, size_t len, return ret; } -static void sst_post_sfdp_fixups(struct spi_nor *nor) +static void sst_late_init(struct spi_nor *nor) { if (nor->info->flags & SST_WRITE) nor->mtd._write = sst_write; } static const struct spi_nor_fixups sst_fixups = { - .post_sfdp = sst_post_sfdp_fixups, + .late_init = sst_late_init, }; const struct spi_nor_manufacturer spi_nor_sst = {