Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1858283lqa; Tue, 30 Apr 2024 00:57:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXg9EKOUs+bXmuJFA0O7j/a8TGjq8wroA15jyp0pKNXYTAPwbVS+UUA7ci6bO1Z681+A451ydQwWoAWwZnIM2qeH2XVYze0dngiIGRsSQ== X-Google-Smtp-Source: AGHT+IGStoQR0sxzUjU74VVF5AGuDt1AJTHsJjev5jMywezUnigsYRNFwIMa3w5kVzk7ykNqJI7u X-Received: by 2002:a05:6a21:6d98:b0:1a9:694b:5b0 with SMTP id wl24-20020a056a216d9800b001a9694b05b0mr15149062pzb.21.1714463820427; Tue, 30 Apr 2024 00:57:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714463820; cv=pass; d=google.com; s=arc-20160816; b=d27sMyp9fO0byG0ZBxj2Q2zR4fURsSFu8L6wozgtWPn120FoC8AxhggNX29kSkDNWd NTqLN4QAkC2x4+V/BwWxoX+erx6I796VF/LUZJJ1hK2d3pgMdFhRHF8YtJhTGXUSZ3v6 0Tb5WhKPpiwSQnfxGKz0LUcYG8m9nEYu6cjNlLcWBgTuIafVilwVArByGZ3lftefFCcF rpkZ4D6y8osYk48WRPN+q5m/AerH4wrdWZsixEgzXHYLOA8Msc/rz3kXHyIlYFqwfy04 +ARlSr5fTRpyrLFIC9/2daR1VES1phixU9UiuiB4i+5dJmUcKKE91hGKlCv+ZjF3wffy aFpQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=KArDFBHj2K7Rv6IgAh6+qe6uqz0BJOoQlTHtZUsTg04=; fh=AgNX+WyeL8CK1/WVJ67Te6XOcOsWvkk1HC5bGiDNpUk=; b=Iam/xFwtFSuvv1Vx7UWmYsHg7UpHxOGUbCX3ZlrrepHJl+yyTD1VCluOevkvzVxTP1 9pxBKZUtL7ntMLDeldMgwG2IeGlV/WJRaHPgBO/SpEwH4FvfW2rgnFkzaahP0GhYd87j TeL8U9t/0Jonnq0UfLC2A37ZzAb30Suc1TdAO4mkCZXSRyl0yskjMekDJrOfcR1QcFDI baf6QZTgH1ph845spBbLVwXROgptcQmdL9MnBL6QLJgQCOYL1GhgRGp7Y3hOa3lhVsJe uvdwnSIh+D+9poh4ukZ9Xxo5mT5RVAvvoVRAUB2uOvluCFKxFHpUBaiLcGw10JlP6LmM kT5A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ibq7wA/x"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-163509-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163509-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g27-20020a63565b000000b005f8074174fdsi18058410pgm.6.2024.04.30.00.57.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 00:57:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163509-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ibq7wA/x"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-163509-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163509-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0E3B2283E27 for ; Tue, 30 Apr 2024 07:57:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DCAAB40BEE; Tue, 30 Apr 2024 07:56:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ibq7wA/x" Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 631553FE51 for ; Tue, 30 Apr 2024 07:56:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714463812; cv=none; b=ECHEzE7rq/Wct6FGs7SV+VhppksWcF9NhhA3sN+gjNae81V6bFJ6A1+D6Hcpd0vSHfoe7hxhsJdU52Nfa8yFvTNaXyu8n86PZqu9rhr1HLxMqweELzyl0t1YBiKa69oLkHGaOGhbC0OND40+CDNhAGdPcgRi18780yrDRd/oi50= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714463812; c=relaxed/simple; bh=PcaXhDvxLLTkfk407anVdJT3Akqt50K/hZKVXLLmpl0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=CXdYbsf622hZKPCwedsnigLQ7qOSjXzpmAIE2CkJ7zkhUiYSSeYgY0CNChFPqIjbfcDljVh3gQ9MDyi8genWNezBCBjVxVhQoviDK7EUWtJrbiR5sqsyu2z69oMpGAJ4jqU33LkjhvSYAlRSM8ADlhTM7It4yFF3DJBvi3HGr3o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ibq7wA/x; arc=none smtp.client-ip=209.85.167.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-51abd9fcbf6so8909784e87.1 for ; Tue, 30 Apr 2024 00:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714463810; x=1715068610; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=KArDFBHj2K7Rv6IgAh6+qe6uqz0BJOoQlTHtZUsTg04=; b=ibq7wA/xvu5MjXvpLW+T3t1WhN2DQla6qpzC//frpVUam0FD5wzFd0/b6K/CLqXteq 0ZpjoQWODQkikSCdjVe1Oez5zqoMNd+CIcZGlJiqGoeH47/EOjG/QhKAaSr/Md99w1Bu /obphp0hvCWlE/z1BPZ9imcJPARFFSejy4HRBQS8cYAlcSphbEJmuPKWuEjFzx74o12j 4x3CbE5HMqvYtJLZOz9Y3Os8r5stSS4B2jKswj7WrJ1+gzlTumRlu5HHOEJpdsOfgcqQ tbZpJhveZWSJE1BKKTDMm/l+rJpKXxY2ZVLNv2W+M1XPPZ43BjPumc1lj8LpTF13C1cQ B3MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714463810; x=1715068610; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KArDFBHj2K7Rv6IgAh6+qe6uqz0BJOoQlTHtZUsTg04=; b=G3+kCzzlFhnSNMFxBAhNGZHE2FMV9uHHfw73xE9S1LARIRlPpyvkaK/7BBuxkJIXnu 8/G2hFIEtag0oYyyvSQy9xDgg+QbXeMPRObliyv2LKr9QrMDbyxdPcnljTw3f5kZ0rOc 72GkKXhQD+3YD9xYNZUlkK+slPlPrcYAZhlAKRa+hUDyXyGBu9ppTVSQOBO0qK7u5oUj I99hon0s3d6gst4qGEFQLRhlcqvaFu8Zl/rAK0KLgPosTagq79yvUOkj44x8BuX94ZWx b23oyh+l5VmqryFVjGRhqePB6EqOoDCKJcL1P4xiJDd81ehAHAlQLi1uyQhxKz1WHHnK UQ2Q== X-Forwarded-Encrypted: i=1; AJvYcCWHxRnp4YUnYikHMyC4/5uFGDXUxopS5odWwk/cand0m8epDBY1rHPKrnaT7+6SpDQP8anxraVW9wMDG17t1IKOOcXJmPSuPCF7UIp0 X-Gm-Message-State: AOJu0YzNzKBsM55rwWqSgrzLodvu3vgduGGYjDdpU7MUZ9DL1hSz9uPW xC0Pc+S/cWJVj8AIJ6Giggbi7lbzXK8qMbK6V8YFatVMK7tNsKFL3sSnGcRQliI= X-Received: by 2002:a05:6512:4003:b0:51d:4383:9e59 with SMTP id br3-20020a056512400300b0051d43839e59mr7568415lfb.0.1714463809537; Tue, 30 Apr 2024 00:56:49 -0700 (PDT) Received: from [192.168.1.20] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id c19-20020a170906155300b00a526a99ccecsm14692918ejd.42.2024.04.30.00.56.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Apr 2024 00:56:49 -0700 (PDT) Message-ID: <95b95cde-c93c-404a-a520-4bf77c62a03a@linaro.org> Date: Tue, 30 Apr 2024 09:56:47 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [EXTERNAL] Re: [PATCH 2/5] spi: cadence: Add Marvell IP modification changes To: Witold Sadowski , "linux-kernel@vger.kernel.org" , "linux-spi@vger.kernel.org" , "devicetree@vger.kernel.org" Cc: "broonie@kernel.org" , "robh@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "conor+dt@kernel.org" , "pthombar@cadence.com" References: <20240329194849.25554-1-wsadowski@marvell.com> <20240329194849.25554-3-wsadowski@marvell.com> <7bd584b0-46e1-4dcb-a402-80784f7d11b7@linaro.org> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy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HFzqEFdqGnJQqmEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 29/04/2024 16:55, Witold Sadowski wrote: >> >>> + >>> +static bool cdns_xspi_get_hw_overlay(struct platform_device *pdev) { >>> + int err; >>> + >>> + err = device_property_match_string(&pdev->dev, >>> + "compatible", "mrvl,xspi-nor"); >> >> No, do not add matching in some random parts of the code, but use driver >> match/data from ID table. > > Ok. As I have written in different mail, a little bit of manual matching > Will be necessary to handle both ACPI and device-tree case. ACPI also handle variants with match data. > >> >> .... >> >>> >>> + cdns_xspi_print_phy_config(cdns_xspi); >>> ret = cdns_xspi_controller_init(cdns_xspi); >>> if (ret) { >>> dev_err(dev, "Failed to initialize controller\n"); @@ -613,6 >> +911,9 >>> @@ static const struct of_device_id cdns_xspi_of_match[] = { >>> { >>> .compatible = "cdns,xspi-nor", >>> }, >>> + { >>> + .compatible = "mrvl,xspi-nor", >> >> This falsely suggest they are compatible :/ > > I'm not sure if I understand what do you mean. > cdns, xspi will be compatible with overlay, as it won't touch any > additional HW. It possibly fail in second direction, as overlay > handling code will not see expected values. That's clear rule for almost every driver: if you do not have any match data, it suggests entry is redundant, because devices are compatible. There is no different treatment for SPI. As seen in other pieces of this code, devices are not compatible, so it points to missing match data to handle variants. Best regards, Krzysztof