From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web09.9788.1576764690372683442 for ; Thu, 19 Dec 2019 06:11:30 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XkgZXjHO; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576764689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6K7zDHgTUSB3PdQ5Rrn+GQ90TfRlRDhWp3PoVojLKLs=; b=XkgZXjHOHyX4H16BDGdGduug98JMq2TfCT5RqRDnoV0TZu09qrlTVEaIkrLwkPyZb2o75t cUdamRZzbpAEFOP//WiuBqpYXfXLj2MTOsXRUl2V3flLj/MeZkx918R6GsOquxs9gg1tkH pdZBXyIgtZUHw6QcvJ3VDuV6UVoS88s= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-289-F7Psqj1YM16pUDS0kQ4PFQ-1; Thu, 19 Dec 2019 09:11:26 -0500 Received: by mail-wr1-f70.google.com with SMTP id c17so1571915wrp.10 for ; Thu, 19 Dec 2019 06:11:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nkDkVogQTzHozPR3t4nSm81PveRXcupO/OmQsGek4w8=; b=Q5mKceqck47J2ZwPLLw8GT68ZYssdcCmSY2XR4nyN+Lg6Gw4+zyYtXUt3wFexo9rbe lY8g8Z4Iujlmlg2p+CQF5I082J/jNkjk61CDNBzwS4YPbojoWlxt/86wav3lqIJJ3aUC pf0yHsgwuJN8Sp9mBsgD5saU+mZtV/yCKiXfbmTTvyvUpz2mDeOBSERqfePGcLiyxNVW /OuK8Y6A8aZlQPvkbjgy3V+n5p7FgVID5qHJVJuIE0pNTzG6rufBPH6u+nzhGmjHmKv9 i+BZfz94mfdGEaqQg/Xj1GPYHLocA2ogZG5XK/ojkiEG29C8vildsy29aIUZOqQuZIwv noAg== X-Gm-Message-State: APjAAAXgOkHd29A9+EXpvjBVZgI0JVCT01t3IvkZTFfE8KzRIWqNqn32 OZTRy/esJPYPX+EMcjiTAuvV0H17Lk99lftZrWNNFqCWcaMdOxtqs+F2nwuc4c8TZLGlyiHEQB1 6ZGiU1h8pkNa/Ew== X-Received: by 2002:a5d:5044:: with SMTP id h4mr9419520wrt.4.1576764684568; Thu, 19 Dec 2019 06:11:24 -0800 (PST) X-Google-Smtp-Source: APXvYqwk5QmKkW/LbqwqxeSzjafw+HrX8+unmgVS0xGKZ2BE5S2sUGSvbzEoPoXwtFuwrAGVCUQ//A== X-Received: by 2002:a5d:5044:: with SMTP id h4mr9419505wrt.4.1576764684357; Thu, 19 Dec 2019 06:11:24 -0800 (PST) Return-Path: Received: from [192.168.1.35] (34.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.34]) by smtp.gmail.com with ESMTPSA id w22sm5958552wmk.34.2019.12.19.06.11.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Dec 2019 06:11:23 -0800 (PST) Subject: Re: [edk2-platforms][PATCH v2 1/7] Silicon/Bcm283x: Add UART constants for PL011 and miniUART To: Ard Biesheuvel Cc: Pete Batard , edk2-devel-groups-io , Leif Lindholm References: <20191219121434.2856-1-pete@akeo.ie> <20191219121434.2856-2-pete@akeo.ie> <617f1b75-563d-55d9-c562-6d169d511be3@redhat.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: <048d4eed-304a-d305-98ef-d16980058e6b@redhat.com> Date: Thu, 19 Dec 2019 15:11:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: X-MC-Unique: F7Psqj1YM16pUDS0kQ4PFQ-1 X-Mimecast-Spam-Score: 0 Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 12/19/19 2:32 PM, Ard Biesheuvel wrote: > On Thu, 19 Dec 2019 at 15:27, Philippe Mathieu-Daud=C3=A9 wrote: >> >> On 12/19/19 1:14 PM, Pete Batard wrote: >>> This adds offset, base address, interrupt and register-space length >>> for the 2 UARTs that the Bcm283x SoC provides. >>> >>> To be consistent, we simplify the two other existing base address >>> definitions to a more legible equivalent since there is no point >>> in explicit refs to FixedPcdGet64 (PcdBcm283xRegistersAddress). >>> >>> Signed-off-by: Pete Batard >>> --- >>> Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h | 17 +++= ++++++++++---- >>> 1 file changed, 13 insertions(+), 4 deletions(-) >>> >>> diff --git a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.= h b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h >>> index 02107086d439..dd9a698f7218 100644 >>> --- a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h >>> +++ b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h >>> @@ -24,8 +24,7 @@ >>> >>> /* watchdog constants */ >>> #define BCM2836_WDOG_OFFSET 0x001000= 00 >>> -#define BCM2836_WDOG_BASE_ADDRESS (FixedPcdG= et64 (PcdBcm283xRegistersAddress) \ >>> - + BCM2836_= WDOG_OFFSET) >>> +#define BCM2836_WDOG_BASE_ADDRESS (BCM2836_S= OC_REGISTERS + BCM2836_WDOG_OFFSET) >> >> Good! >> >>> #define BCM2836_WDOG_PASSWORD 0x5a0000= 00 >>> #define BCM2836_WDOG_RSTC_OFFSET 0x000000= 1c >>> #define BCM2836_WDOG_WDOG_OFFSET 0x000000= 24 >>> @@ -34,8 +33,7 @@ >>> >>> /* mailbox interface constants */ >>> #define BCM2836_MBOX_OFFSET 0x0000b8= 80 >>> -#define BCM2836_MBOX_BASE_ADDRESS (FixedPcdG= et64 (PcdBcm283xRegistersAddress) \ >>> - + BCM2836_= MBOX_OFFSET) >>> +#define BCM2836_MBOX_BASE_ADDRESS (BCM2836_S= OC_REGISTERS + BCM2836_MBOX_OFFSET) >>> #define BCM2836_MBOX_READ_OFFSET 0x000000= 00 >>> #define BCM2836_MBOX_STATUS_OFFSET 0x000000= 18 >>> #define BCM2836_MBOX_CONFIG_OFFSET 0x000000= 1c >>> @@ -50,4 +48,15 @@ >>> #define BCM2836_INTC_TIMER_CONTROL_OFFSET 0x000000= 40 >>> #define BCM2836_INTC_TIMER_PENDING_OFFSET 0x000000= 60 >>> >>> +/* uart constants */ >>> +#define BCM2836_PL011_UART_OFFSET 0x00201000 >>> +#define BCM2836_PL011_UART_BASE_ADDRESS (BCM2836_S= OC_REGISTERS + BCM2836_PL011_UART_OFFSET) >>> +#define BCM2836_PL011_UART_LENGTH 0x00001000 >>> +#define BCM2836_PL011_UART_INTERRUPT 0x99 >> >> Hmm 96 + 29 =3D 0x7D, 96 + 57 =3D 0x99. OK. >> Maybe we can later add a definition for this '96'. >> >=20 > Ehm, no that's not going to happen. It is fine to abstract actual > physical properties like the base of a register block, but that > doesn't make it an end in itself to express arbitrary values like > interrupt line numbers like this. OK, understood. >> Reviewed-by: Philippe Mathieu-Daude >> >=20 > Thanks! >=20 >=20 >>> + >>> +#define BCM2836_MINI_UART_OFFSET 0x00215000 >>> +#define BCM2836_MINI_UART_BASE_ADDRESS (BCM2836_S= OC_REGISTERS + BCM2836_MINI_UART_OFFSET) >>> +#define BCM2836_MINI_UART_LENGTH 0x00000070 >>> +#define BCM2836_MINI_UART_INTERRUPT 0x7D >>> + >>> #endif /*__BCM2836_H__ */ >>> >> >=20