From nobody Wed Nov 27 04:47:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+41610+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+41610+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1559134232; cv=none; d=zoho.com; s=zohoarc; b=NshpoG3jWy+5D8ZSlMrOKyu7s9JQ6Nb2LpCfjP7nPUxFwC1Y1ZvhBGV38wPR5kgd9K3+NPQjm6AuQAHKWntWxHy5U07No3fX7yQ5OlCj02By3CuTvtt20mtMbfOaYx/wI1rZtVicmnjHyaf5+Zy8L6NOJ/CF5gi9heQ64nmfEfw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559134232; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=sImY2ViJdeEqWwsYCM7VoKZ3/Fl2nIX10R9YOtga0tE=; b=j2kytUVCPpYNUun1pWJfN2ze72UENH+5VZHm3y7YG1bPfit8+h1bIRhWYWZ5bTUvCfIZQVkRSvRQLwka5yw3rqIwbqAY61eNmkHqez1HLnmmeRF6wkAKGCTsNSYQTaF/Xjr24MOpVW3XaUFyggoEtrO8kN5N2wtrF74ZxWi4DEM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+41610+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1559134232015266.2861951009429; Wed, 29 May 2019 05:50:32 -0700 (PDT) Return-Path: X-Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by groups.io with SMTP; Wed, 29 May 2019 05:50:31 -0700 X-Received: by mail-wr1-f65.google.com with SMTP id h1so1705343wro.4 for ; Wed, 29 May 2019 05:50:30 -0700 (PDT) X-Gm-Message-State: APjAAAUDM4AG0AO3/b//2KqRH2JtBipyMYpZcx5iSN48GGB+bWW2CVY5 Eqwjk+hbEw8bydveCReI1sMy0CN3Zol3Lg== X-Google-Smtp-Source: APXvYqwHoKxefZ1/t6Lt7KGJf8YksS6ZABu9eKErxG7VytbCnEDAcuDdXv1vT+52XJbSm2ytz8meuQ== X-Received: by 2002:adf:9c0a:: with SMTP id f10mr13138052wrc.248.1559134229218; Wed, 29 May 2019 05:50:29 -0700 (PDT) X-Received: from sudo.home ([2a01:cb1d:112:6f00:c225:e9ff:fe2e:ea8]) by smtp.gmail.com with ESMTPSA id l18sm18112608wrv.38.2019.05.29.05.50.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 May 2019 05:50:28 -0700 (PDT) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: leif.lindholm@linaro.org, masahisa.kojima@linaro.org, Ard Biesheuvel Subject: [edk2-devel] [PATCH edk2-platforms 3/5] Platform/Secure96Dxe: redefine LS connector CS as platform property Date: Wed, 29 May 2019 14:50:19 +0200 Message-Id: <20190529125021.28308-4-ard.biesheuvel@linaro.org> In-Reply-To: <20190529125021.28308-1-ard.biesheuvel@linaro.org> References: <20190529125021.28308-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ard.biesheuvel@linaro.org Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1559134231; bh=3eNIEYXbi+i8VXURj1glpO65qDbf7sreletBkjnEVMU=; h=Cc:Date:From:Reply-To:Subject:To; b=oyeAvOIUbQ539cQEs+UBjb4aoazp/4pm5gOP/Ossr8WHihK2Dv0Q3Hctvvy7noC7DvQ AOzq/EHj3e2PmhEoj0nsWX6PRY3xOB5I7eDAo5BM7T6VO6PO4sw92AuY5yLZTffTxEfzw ej/UXMSO6IZoJsbRoSDUoAN6F7GzH+5oa+A= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" As opposed to the Secure96's I2C peripherals, whose bus addresses are properties of the peripherals themselves, the SPI CS address of the TPM is a property of the platform that incorporates the LS connector. So tweak the macros that emit the CS values and related properties to put it under the control of the platform that incorporates the driver. Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Platform/96Boards/Secure96Dxe/Secure96.dts | 2 +- Platform/96Boards/Secure96Dxe/Secure96.h | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Platform/96Boards/Secure96Dxe/Secure96.dts b/Platform/96Boards= /Secure96Dxe/Secure96.dts index d066fcb1933c..0d7d9b3900a4 100644 --- a/Platform/96Boards/Secure96Dxe/Secure96.dts +++ b/Platform/96Boards/Secure96Dxe/Secure96.dts @@ -39,7 +39,7 @@ __overlay__ { INFINEON_SLB9670_DT_NODENAME { compatible =3D "infineon,slb9670"; - reg =3D ; + reg =3D ; spi-max-frequency =3D <22500000>; }; }; diff --git a/Platform/96Boards/Secure96Dxe/Secure96.h b/Platform/96Boards/S= ecure96Dxe/Secure96.h index c34fc5eea046..1d8bf4159209 100644 --- a/Platform/96Boards/Secure96Dxe/Secure96.h +++ b/Platform/96Boards/Secure96Dxe/Secure96.h @@ -1,6 +1,6 @@ /** @file =20 - Copyright (c) 2018, Linaro, Ltd. All rights reserved.
+ Copyright (c) 2018-2019, Linaro, Ltd. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -8,14 +8,19 @@ #ifndef _SECURE96_H_ #define _SECURE96_H_ =20 +#define __CONCAT(a,b) a ## b + #define ATSHA204A_SLAVE_ADDRESS 0x60 #define ATSHA204A_DT_NODENAME atsha204a@60 =20 #define ATECC508A_SLAVE_ADDRESS 0x51 #define ATECC508A_DT_NODENAME atecc508a@51 =20 -#define INFINEON_SLB9670_SPI_CS 0x0 -#define INFINEON_SLB9670_DT_NODENAME tpm@0 +#define INFINEON_SLB9670_DT_NODENAME __CONCAT(tpm@,SECURE96_SPI0_CS) + +#ifndef SECURE96_SPI0_CS +#define SECURE96_SPI0_CS 0 +#endif =20 #ifndef SECURE96_ACPI_GPIO #define SECURE96_ACPI_GPIO "\\_SB.GPIO" --=20 2.20.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#41610): https://edk2.groups.io/g/devel/message/41610 Mute This Topic: https://groups.io/mt/31833223/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-