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=-5.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 6FC7FC56201 for ; Fri, 30 Oct 2020 04:42:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B84F9221F9 for ; Fri, 30 Oct 2020 04:42:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="BxK0yPKA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726455AbgJ3Emt (ORCPT ); Fri, 30 Oct 2020 00:42:49 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:37182 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726452AbgJ3Ems (ORCPT ); Fri, 30 Oct 2020 00:42:48 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 09U4ggZg025782; Thu, 29 Oct 2020 23:42:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1604032962; bh=eqoZBq5/ceWt03VWmFJalh7jjQmcg8qkau2eAe0ufVk=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=BxK0yPKAYrZcupWSyBGf0GEqzw6Memj08XvC4DhWbhc+am+OhGzwlPulHCJMFRMc2 ehXcnKEpkl1JnfX+5fnhPaWzG2VcMTCdE3zv+WeiaVY83d7zt2VfcxMzSX9uUMD5Ss sLvhSpkJQdvtLkOPNzv6Qu6VGDKoXLud+//mwu0E= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 09U4ggWb067529 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 29 Oct 2020 23:42:42 -0500 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Thu, 29 Oct 2020 23:42:41 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Thu, 29 Oct 2020 23:42:41 -0500 Received: from [10.250.233.179] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 09U4gdgN040637; Thu, 29 Oct 2020 23:42:40 -0500 Subject: Re: [RFC] Accessing QSPI device under mtd To: Dinh Nguyen , CC: "Ramuthevar, Vadivel MuruganX" , , Mark Brown , Richard Gong References: <7918ea88-3ede-743e-4444-587d0f625c2e@kernel.org> From: Vignesh Raghavendra Message-ID: Date: Fri, 30 Oct 2020 10:12:38 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <7918ea88-3ede-743e-4444-587d0f625c2e@kernel.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Hi, On 10/30/20 1:17 AM, Dinh Nguyen wrote: > Hi, > > With commit "a314f6367787ee mtd: spi-nor: Convert cadence-quadspi to use > spi-mem framework", I can no longer access the QSPI device under > /dev/mtd on the Intel Stratix10 and Agilex platforms and is breaking > a few tests we have in-house. > > Can someone point me to how to access the QSPI device using the spi-mem > framework? > There is should be no visible change to userspace. /dev/mtdX devices should still get created based on cmdline or ofpart. Could you elaborate what fails? Is the flash detected and /dev/mtdX devices created? Is the issue with read or write or erase? Also what is the kernel version and .config being used? Full bootlog + testcase that fails would be helpful. Regards Vignesh