From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C01F6C47082 for ; Wed, 26 May 2021 12:43:49 +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 85CB86101E for ; Wed, 26 May 2021 12:43:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 85CB86101E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iHDdjXDN4pHkKaAFmIq53meOdnb4r9sNxa0ihuWYGi4=; b=vcYhd2DmdhUV5M LwViMMruLPiZzMDvMYOJxL/ycZqeuSvl/8KrbD6oCPM4AZKtCFDkQAuJG7ObtP5KFKztURsjgRb2X /8Wt393y618xXj40CRxgwK2wMOVBKLjg6F4z/zjghlL1HMRU59TJ3m6PXnwT8IpDbAlC1mO1g2lN+ lC1NaO47gtLZn6tYHPKq9m4v1PN3dzJZxyVXOTfAaqVw+wzf7/g31wKDEUMgUdZ9sGKEfexR1CLpj p5O4AnYTGdwxd75pM4FN4MpIJ7ZJ+jEKpQcyY7hkpAazC/eAh57z0fLAQaB0oRbL2WVlLF6K8Ukz/ s+gUIQZSlVF+9053967w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1llssG-00E6f8-72; Wed, 26 May 2021 12:43:00 +0000 Received: from mga01.intel.com ([192.55.52.88]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1llqly-00DCSW-3P for linux-mtd@lists.infradead.org; Wed, 26 May 2021 10:28:23 +0000 IronPort-SDR: 8A6Zby+8j75atWEDdKQMoQ2//xMQP/XV+pVSDUK7/hGa7iXH9X+3zxzp96YHf89vxPf9jy/BS3 6PnPXuxnQaVg== X-IronPort-AV: E=McAfee;i="6200,9189,9995"; a="223616095" X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="223616095" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2021 03:28:16 -0700 IronPort-SDR: kqC0WeuoTRf4bbkUD3C8oUlHLJlMInJFGWIhk+MHul7sEjj7ExCmaUOMKACntpqYBwXwSHuOla jAAJJEXzW4HA== X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="547146093" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.163]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2021 03:28:13 -0700 Received: by lahna (sSMTP sendmail emulation); Wed, 26 May 2021 13:28:11 +0300 Date: Wed, 26 May 2021 13:28:10 +0300 From: Mika Westerberg To: Michael Walle Cc: Pratyush Yadav , Tudor Ambarus , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org Subject: Re: [PATCH] mtd: spi-nor: intel-spi: Add support for second flash chip Message-ID: <20210526102810.GB291593@lahna.fi.intel.com> References: <20210525160318.35802-1-mika.westerberg@linux.intel.com> <20210525191414.dc45h27rzqen4dce@ti.com> <20210526091250.GY291593@lahna.fi.intel.com> <20210526092417.GA291593@lahna.fi.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210526_032822_209594_46E4CE0C X-CRM114-Status: GOOD ( 22.79 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org Hi, On Wed, May 26, 2021 at 11:31:58AM +0200, Michael Walle wrote: > > Oh, I see now this commit: > > > > a314f6367787 ("mtd: spi-nor: Convert cadence-quadspi to use spi-mem > > framework") > > > > So "SPI MEM" means generic SPI subsystem for memory mapped devices. > > Unfortunately Intel controller at least is not capable of running > > generic SPI transactions. It only supports accessing SPI-NOR flashes and > > for those there is small set of commands that supports. I don't think it > > is even possible to convert the driver to generic SPI subsystem. > > AFAIK it stands for SPI memory device (memory mapped is not a requirement). > Eg. spi-nxp-fspi doesn't support generic SPI devices either, but just SPI > flashes. So I'd guess SPI MEM is exactly what you are looking for. OK, I see that there is ->mem_ops that can be used to implement different higher level commands. What I'm not seeing is that how the child SPI flash is created using this scheme? DeviceTree and ACPI are supported fine but what about scanning? I mean the intel_spi driver has this: spi_nor_scan(&ispi->nor, NULL, &hwcaps); But if the driver is to be moved under drivers/spi/* you can't really call these functions anymore or can you? Or the point is to keep the driver under controllers/ and just call spi_nor_scan(), and in addition implement the new mem_ops? Thanks in advance and sorry about many questions but there does not seem to be a conversion guide nor any (non-DT/ACPI) examples that I can take a look. :-) ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/