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=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 60E0BC33C9E for ; Tue, 14 Jan 2020 17:42:19 +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 F286124658 for ; Tue, 14 Jan 2020 17:42:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CdPYnqFp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F286124658 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=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.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject: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=1hdHCQR79gaYua/t/87bmZr3hoIboAaBMrJz0Hgvvg4=; b=CdPYnqFpBpiYRZ tRNIR5E0O2LpPEFdbzb/JaF8rjZ9CvZo0N4hUOKdJDUsAtOlAsUUmJQljIFPzK7ArbkuPPHxL23iz EwSwR06PPf4cn7pbHwbP2jvXCsDrIU3cZiHDxOzNE4cDA7AnSXNgOJiYwBAcSajP4cAs8LsiCj/a3 ubNDMKtP70vW+kOx7M5tG8S2T8Q27FU/ZyLS1F+J3aEeikBiE4F2BeGTJLo1S9K76LNiashCz+bou +D/90nb8fuTKkmWizN5Jcwci05ucq5btkk6t4Ky7UQfgWbjG6jBdrNrsS/GQrcKqXFedhd43mMKcT /qGZQpP6ucPDS2/1xsJg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1irQCl-0004Fm-RU; Tue, 14 Jan 2020 17:42:15 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1irQCf-0004ES-6f for linux-arm-kernel@lists.infradead.org; Tue, 14 Jan 2020 17:42:13 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 337A31396; Tue, 14 Jan 2020 09:42:07 -0800 (PST) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1A7063F68E; Tue, 14 Jan 2020 09:42:05 -0800 (PST) Date: Tue, 14 Jan 2020 17:41:57 +0000 From: Sudeep Holla To: Arnd Bergmann Subject: Re: [PATCH V2] firmware: arm_scmi: Make scmi core independent of transport type Message-ID: <20200114174157.GA23201@bogus> References: <3f5567ec928e20963d729350e6d674c4acb0c7a0.1578648530.git.viresh.kumar@linaro.org> <20200113064156.lt3xxpzygattz3he@vireshk-i7> <20200114092615.nvj6mkwkplub5ul7@vireshk-i7> <20200114111110.jhkj2y47ncp5233r@vireshk-i7> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200114_094209_285356_45D806A1 X-CRM114-Status: GOOD ( 17.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peng.fan@nxp.com, Viresh Kumar , Jassi Brar , "linux-kernel@vger.kernel.org" , Linux ARM , Sudeep Holla , cristian.marussi@arm.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jan 14, 2020 at 12:17:28PM +0100, Arnd Bergmann wrote: > On Tue, Jan 14, 2020 at 12:11 PM Viresh Kumar wrote: > > > > > > Okay, I think I understand that a bit now. So here are the things > > which I may need to do now: > > > > - Maybe move payload to struct scmi_mailbox structure, as that is the > > transport dependent structure.. > > > > - Do ioremap, etc in mailbox.c only instead of driver.c > > > > - Provide more ops in struct scmi_transport_ops to provide read/write > > helpers to the payload and implement the ones based on > > ioread/iowrite in mailbox.c .. > > > > Am I thinking in the right direction now ? > > That sounds about right. What I'm still not sure about is whether the > current kernel code is actually correct and should use iomeap() > in the first place. Can you confirm that all current hardware > implementations actually use MMIO type registers here rather than > just rely on a buffer in RAM? > I remember we had this discussion in the past and was trying to dig up the archive. I found it [1]. At that time and even today, I don't have knowledge of any upstream platform using memory other than SRAM and hence I found it safe to retain ioremap as is. But I agree in general, this abstraction will allow us to add shmem of other memory types like RAM. However, it's difficult to have understanding and representation of the memory type used by the platform firmware say in DT or even ACPI. -- Regards, Sudeep [1] https://www.spinics.net/lists/arm-kernel/msg647292.html _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel