Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp371759pxa; Wed, 26 Aug 2020 12:58:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywVrNCQ3/ubuELwMtZme/6D2AKpjyiNnc1QPHGs3/4Ps6/OSC2t2eNmrFllzLxhqnBKGnV X-Received: by 2002:a17:906:840c:: with SMTP id n12mr16618327ejx.246.1598471913724; Wed, 26 Aug 2020 12:58:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598471913; cv=none; d=google.com; s=arc-20160816; b=GPxYDVP/PzSHddjNAMBMgpV6dkpU8buoDrhInRawmLnQymDMa65mrpURKV9HYduUZI SqccyQpYoOTxwfxpXZA3wEQFVIC+Zr2+fzp3gGUB5HrCEoeCWNjTrfaZ7lkEIyomSpSM 776ztNhIcj2dKtsDxFMqHKJZfI9RRGXfPE6wAPF69YeUVNB0r+hgtELKZ+LT2rL4qGeB Qz6mpkjjJ69c4w5uwfKsVho1b3I2AbCe0dTFf677z9ed9pcTYepAXgQSP1wNxYaL1qNt RDBPG88DT6WC7k5SbOIS4jn4UjRDQu3AEifEySEwE43VCgBShjKLw7QxcgJu4+Lb0xMO P+jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=tk0FdBRl4yrZP8KpNGRoyatrwcoEEVz5bzGl7M6mn84=; b=IVUqrUdkQgXa9OEUKRV/7YAX9kwibZP2JflycilQhQHemerPkdl8TK2qH9M0jH0jiH wV+KuhZXL5Tbp9ed51HPF44rJjQWTnH4qUKFVJexr5OlCfOqTx/iWKJSplMAV/H4Bn3g Lw3+nxojHC2CCkD2AI5IVz3FpK1YdCSL50abXb+uFY1glUDRThmxrmNBmdW+OELFR9an vtw185jXslvR3iriugpqarIzF1wtSJYhFD0ArV7HNTY1D2tWp9CHVVrBwrvlRqO2TKVZ PfJOY4dUY+Iz/WVmvzO2Y0VJq+9XIQRD/NDuYKhhpBE+I8Um1TOfnxnJChtmRrg3AFqM id5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=saLNRmhE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt21si2909858ejc.664.2020.08.26.12.58.10; Wed, 26 Aug 2020 12:58:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=saLNRmhE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726854AbgHZT4y (ORCPT + 99 others); Wed, 26 Aug 2020 15:56:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726753AbgHZT4y (ORCPT ); Wed, 26 Aug 2020 15:56:54 -0400 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70822C061574; Wed, 26 Aug 2020 12:56:53 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id k25so2812887edj.13; Wed, 26 Aug 2020 12:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=tk0FdBRl4yrZP8KpNGRoyatrwcoEEVz5bzGl7M6mn84=; b=saLNRmhED3dlhcNReWUFAiieOMjkTrBEzsAb/2uRF4gwjrDeJqB9Xg6FPBr2zQdaug TryKkusVjcz+tJ2o46njmZMb4efeTX4A6fqd40/ST8lQU5xVj+CzHOOLEf8TqQj+zFrI FUAcSKjdBGoLp/kD/7W8MO6PkM0M1Kwe3FutAYpg5HuC1tVEN+XA63/Ta42bIpwUwpFY 6KISPdQgBHBKUdx5B7x4KuG+ZANYYBaywAbXKdqawrwKorn6waSYOKmyIvMUy/FBaTu3 OPW/oqlmnWrYxIZBD8Sb6vE7WgG/oltlFnRGmwhFkXLFgkgP2r8eAJ164CX9Gj/Z7xBI 8rGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=tk0FdBRl4yrZP8KpNGRoyatrwcoEEVz5bzGl7M6mn84=; b=UoKAkv2sq3hWmzYGOMpdX3GZXcEeuvHWIR3KbHGnYHGu/0Hn6zmI4VWlRcXDypt1j4 S9qmocQHT3xxnyrNclrQNtE7r1Dw63quaVrXkw8jCfpOnQfKowxJ1na87s/cjbKFEn8U AK23rlN1EQGHaCd4R8Lqk1sF23KEnsfTk74hmS08M0secfIcEC5swvzsntpNvChOo1Bu 54hY6EUgYX5yfvP27b8/fweEZ8E6t4MYkr09zosKGB//qz6Fj1nq810OHExOVQmvbLMJ Iv3AeMwdGLB2RXhPOYKP+7Lqcr6/qjed0nU73Jq7JrL9beJKxbAXKxO5zz5fR1W5nbq8 mcTg== X-Gm-Message-State: AOAM5330WXo/MDLmdOmzfkNmmAZuhqamPYVreWcgXuf0MQUgIxl2Jv5A fhoWrjnGG7SShsH+TY9+EhY= X-Received: by 2002:aa7:cb0a:: with SMTP id s10mr16788025edt.134.1598471811840; Wed, 26 Aug 2020 12:56:51 -0700 (PDT) Received: from skbuf ([86.126.22.216]) by smtp.gmail.com with ESMTPSA id f6sm1725454edy.2.2020.08.26.12.56.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 12:56:51 -0700 (PDT) Date: Wed, 26 Aug 2020 22:56:49 +0300 From: Vladimir Oltean To: Andy Shevchenko Cc: kuldip dwivedi , Mark Brown , linux-spi , Linux Kernel Mailing List , Qiang Zhao , Pankaj Bansal , Varun Sethi , tanveer , "Rafael J. Wysocki" , ACPI Devel Maling List Subject: Re: [PATCH] spi: spi-fsl-dspi: Add ACPI support Message-ID: <20200826195649.g6k574y6ofzbagnm@skbuf> References: <20200821131029.11440-1-kuldip.dwivedi@puresoftware.com> <20200822183342.6sdhp6yq6i7yvdia@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 26, 2020 at 10:36:15PM +0300, Andy Shevchenko wrote: > On Wed, Aug 26, 2020 at 10:34 PM Andy Shevchenko > wrote: > > On Sat, Aug 22, 2020 at 9:37 PM Vladimir Oltean wrote: > > > On Fri, Aug 21, 2020 at 06:40:29PM +0530, kuldip dwivedi wrote: > > > > > Just noticed this now. > > > So for device tree, spi-fsl-dspi supports the following compatibles: > > > > > > fsl,vf610-dspi > > > fsl,ls1021a-v1.0-dspi > > > fsl,ls1012a-dspi > > > fsl,ls1028a-dspi > > > fsl,ls1043a-dspi > > > fsl,ls1046a-dspi > > > fsl,ls2080a-dspi > > > fsl,ls2085a-dspi > > > fsl,lx2160a-dspi > > > > > > Depending on the compatible string, the driver knows whether to use DMA > > > or XSPI mode, and what the FIFO size is. > > FIFO size can be read from the property My personal preference is for the driver to hold the expert information about the hardware parameters, and not the device tree. Today you need to know only about this set of parameters, tomorrow you need something new, but you also need to work with old DT blobs... It's a mess. > (or better if you can derive it directly from HW, like DesignWare > does). Nope, can't do that. This IP block doesn't even have an ID or revision register. > DMA is just defined by FixedDMA resources (your platform with DMA > provides them, otherwise no such resources). > This is a case of knowing that tomatoes are fruit, but being wise enough to not put them in a fruit salad. I would not be happy to see this driver make the decision to use DMA based just on the presence of DMA channels in the firmware blob. On some platforms, there are DMA channels but due to an erratum they don't work. While on other platforms, using the DMA channels would simply cause a performance downgrade. Same thing about interrupts, in fact. The firmware blob tells the driver what the interrupt line is, but it doesn't mean that the driver has to use it. Thanks, -Vladimir