Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1859925lqa; Tue, 30 Apr 2024 01:01:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVrPmETAU4Qlt5UNu1kcMQkxnKAKgNQwjpuE1I6pxqCmsCOQOyDY4IB7jwjvQcRnK5ivtu+zxHRu9G0lKjGk7kyKkUgI88JAcRFzj2dRw== X-Google-Smtp-Source: AGHT+IFwp1jEhOYn6zfdD7N+kuaauMw8n7+O4dgkcZarOioPoF3S+ooKGrIfAbFpo4QKAjvz8KWy X-Received: by 2002:a05:6122:982:b0:4de:bdbf:6351 with SMTP id g2-20020a056122098200b004debdbf6351mr2458472vkd.7.1714464067734; Tue, 30 Apr 2024 01:01:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714464067; cv=pass; d=google.com; s=arc-20160816; b=CQkGtt/1Hhq7ixo6182TkUYIquRz8+eNjYJFr84ZuNVmr7SetGtEx/U3zAh9DzqS8l yOkiycbGJqH5MpTdzpFnp5vu2REp/BbduwOUQQIj0vb9nJ2Hdoh0pC2oRwlX9OE/qCf+ RYeLYlGI1GNcmR/4yq8sM8OlifgFxAsCmW07APT0b9AxUDzDX3ZU8ybC9KLP8YJbWKdl eHcfJsUd3ZR+TPL8WqEHlwuFrEQCUgk5fIhwma6z+PIrEhDj8ketl1igUSvb/R7vZGJe OmJqWFuCYMuPmAZYNMIB+6aV0ElEZqd092yoAxzwkjakv2VUPRKQy9BOGJfFYhigqnW5 aclw== 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=Rl/4sYkUY2PAAIjugPUNoG61Eymx4LWnwcn+JNq28QQ=; fh=5MtH7OUte9FT/cYwLDxcAJjd370CYo8sQX77WUsbU04=; b=maOtKk1w1lIHwQgcDFz2Y//JCtOIEplgBuQXZhzwdgPEwIpFH3ptuBe2bgK6uipUeq haOCcbX4AHJLlr7brHRCtipTSipILtKNAwGXS7x7g7jQ9FkD1VRlD3U1y+xVseV/apJw C05hSQ9UFproxeTDLucy7l1c20ZjdR25SgoyuyNc7cq+mDTcw5UrG2HGHhgKLcZ+Ymdf Kd5fcNKpiCFEOvpBVUBx7SfxNf2PK8j3Ylv6RvK2Gsvw47jdAyd7bVYHCklDsvzr5d6e opdRYpTmynr0DykPFy5kFmVHZV9RZA/u9v/2PJjtRCEjv2Nk1l6hLras8QWNXLCOtYKG gmeA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N2DTlniL; 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-163515-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163515-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id hf13-20020a05622a608d00b004375a94cea3si27637487qtb.91.2024.04.30.01.01.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 01:01:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163515-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N2DTlniL; 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-163515-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163515-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6860A1C222C8 for ; Tue, 30 Apr 2024 08:01:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C0FA44C9B; Tue, 30 Apr 2024 08:01:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="N2DTlniL" Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (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 80C324085A for ; Tue, 30 Apr 2024 08:00:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714464061; cv=none; b=R+eHv5DPbqnWWG+BAL4gXHu9dQnqWTKWvYubqa4zcVnMAU7cPdEUcmBang4NQNjoBSdOQLSVv9h2AshKkumSBp/bcdt++lZC3nRRuAWE9t09yg7yVf1DIBS+jS/NRd/+8zbOMgI0WfQKlQu3LXukXebwTnorh4U+DW/lmy/GNbQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714464061; c=relaxed/simple; bh=dPf4UEqQCw2LaZ1eeiZsJ6PiGpuZaLeZZkNPI+mQXUo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=XxF/L1GJ3qKsO8AXBZNpAz1u4cb+b14gkb3oo2MkwbLglBv0djBz0TDzt8Kc+MHkcQKSvRzfQA/TNT3EP+MiY5j6o+rEt7Zfv2DTRaHTZlE1/3SZnWeEj1KMXCz0WvJVFvfAd4ZQCxPwJo+hozugdD/bxi8D72aRv4Gj1TyGI7s= 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=N2DTlniL; arc=none smtp.client-ip=209.85.167.45 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-f45.google.com with SMTP id 2adb3069b0e04-51967f75763so6221156e87.2 for ; Tue, 30 Apr 2024 01:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714464058; x=1715068858; 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=Rl/4sYkUY2PAAIjugPUNoG61Eymx4LWnwcn+JNq28QQ=; b=N2DTlniLrJ8oQcd41+5aK5ED144ztX4Y7ubfWXU8Y9+viQdgopLPLqwFuOvt9yL3Hu kKcy3F3sK6YGw37ktfhRgySdhpNde8TiCqA0ymX2n01f9F8VTiQd+jqAn0EWppDnPJ9u kwhLo/TfeGdDCHLSfzbqMRrqd2qHGE/UJxzxI+PgHniBII/Yk0NXySf1LAV/+S7RbCia gLMIm7cEb8qUSoYY8fEiBJYz8Pu6b4c8tKKt3OhxXIIsasiCpyXko9rmn1hwumO2enZZ dI0D7IsJmNV/VUj7FM2+FNUKInD/uB6MP97aPH/TOtQv7zsjc3Zz+mFUzW/ZT8EG9gUB 55sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714464058; x=1715068858; 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=Rl/4sYkUY2PAAIjugPUNoG61Eymx4LWnwcn+JNq28QQ=; b=PTBRiO9HDM9+u6hE+wAGh74nkgJXT9SDA0V2PuYf8HpyAP0VYWH1AaYEM3jcgYCU6e ohYTeYcBCGw1Qgj8z8j9N2x7xfinDAFoXZWHRdT2Mp1FP5V7YRfOKS1IXApGTdLPWpSU 0zKzMwh6Bgcv5wnv8mwYrGAu72bVHPAbs8dEaEqHQdhzXHR8IZtigjHYRiCH6jAFIuyu iZmpDJ54RgkzbPs5vnLWS6fu5WO1D8zi3mQuixEyM3Ux+I2tLF8qgYxX/o0Ms437xwVh sQtLRXET+ao/pkjG5rpx6NclCiOi+qrD4GYqwqosI6yP6mZM5dIZWzzCXlpSWJGQzsql hkHA== X-Forwarded-Encrypted: i=1; AJvYcCUfoxAnMOcuVh/cj6sjPXdzh9AJSkaBR8lNyTm6Vr5Nx4sMo5egT5+feIL4m/09fEDiPyUunKlGFcbfS0JlrGC5iPOWYjI0zCk1hfun X-Gm-Message-State: AOJu0YxW+B8nSyh/GAGalSk8wxdsXsXK1pbuR5LuvVqiRtCWytrUU9hR JZkJMxmhu32s5cBeHJrjYpAo/6JvIAuDtl4R5YsfhvKY1a/EgtgV4pkJhmHyawY= X-Received: by 2002:a05:6512:1328:b0:51c:8b45:c9fb with SMTP id x40-20020a056512132800b0051c8b45c9fbmr9768612lfu.69.1714464057560; Tue, 30 Apr 2024 01:00:57 -0700 (PDT) Received: from [192.168.1.20] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id g2-20020a170906348200b00a51da296f66sm14746948ejb.41.2024.04.30.01.00.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Apr 2024 01:00:56 -0700 (PDT) Message-ID: <2dc18bdd-0c82-47a2-b87d-b69028f3b251@linaro.org> Date: Tue, 30 Apr 2024 10:00:54 +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 v3 4/5] spi: cadence: Allow to read basic xSPI configuration from ACPI 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" , Piyush Malgujar References: <20240329194849.25554-1-wsadowski@marvell.com> <20240418011353.1764672-1-wsadowski@marvell.com> <20240418011353.1764672-5-wsadowski@marvell.com> <16a4a58c-cae6-4b62-859b-3661c052468a@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/G23PcowM1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FZkbLlqs2XpWaVCo2jv8+iHxZZ9FL7F6AHFzqEFdqGnJQqmEApiRqH6b4jRBOgJ+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:30, Witold Sadowski wrote: >>> >>> +#ifdef CONFIG_ACPI >>> +static const struct acpi_device_id cdns_xspi_acpi_match[] = { >>> + { >>> + .id = "cdns,xspi-nor", >>> + .driver_data = (kernel_ulong_t) &cdns_driver_data, >>> + }, >>> + { >>> + .id = "mrvl,xspi-nor", >>> + .driver_data = (kernel_ulong_t) &mrvl_driver_data, >> >> UEFI provides compatibles for ACPI? I think that's first such format in >> the kernel. > > Yes, that code is not doing what was expected. > Current usage scenario in ACPI mode is: > xSPI block with HID PRP0001, and additional compatible package set to > correct compatible string > With that approach only issue(in ACPI mode) is with matching device > with data field from of_device_id. It looks like there are functions > to match that when DTB is used, but in ACPI mode it fails. > I believe solution is to traverse dev->driver->of_match_table manually > To match device name with correct compatible data structure. > That will be included in next patchset. PRP0001 should be handled by regular of_device_id table, of course assuming your kernel has build-in CONFIG_OF. Best regards, Krzysztof