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.web11.9447.1576762056379330458 for ; Thu, 19 Dec 2019 05:27:36 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZKNSy33I; 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=1576762055; 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=FmholFHzKQrDlmhRLcRyCku7MRbHE8E/CEnY8jd4NJM=; b=ZKNSy33IEqU+C6yCpiiIkYCEAr3jMo5tNRHSoBrEQ2a6/IK1cHbxgvf8bK+5fNcQy3TMkq 9L8mDwcsdmMIPX1ONcDSiDJHZGKQqJbhClznPWwksJ5glRou52/b5kOxbaarw8J4gkMU9B hBFsnnEQ818TijizRfZ9dTwYYhHvlCo= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-145-PUUdfYz9OfyhJZJH8wS2sg-1; Thu, 19 Dec 2019 08:27:34 -0500 Received: by mail-ed1-f70.google.com with SMTP id ck15so3485069edb.6 for ; Thu, 19 Dec 2019 05:27:33 -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=FmholFHzKQrDlmhRLcRyCku7MRbHE8E/CEnY8jd4NJM=; b=ardfzqGlhOP+sLpRKmM916PG85WETQlztThTYzfxveCKdakQZvL6/zMrqi6gCRYVtB tZs2A9Hhe8aRixDuBy02kuFKDT7fAVU667AjiocJxirqqNTBP4AW8KpoCyl7Bqvh28cF r1LGVEkvsJDWxvxSj52pG7tnCzR6sYy6VBf/K2h/3PS92ovk9EbOcuZ6aZTMDvRzJyEo F85T2jiL7HD1HjUM79xkBccxijSPC5HSF4xjrSVFvBDAMfX7O49bMmkdnzlFg9Ehu2+P A6fNuQujD8xneokgFdYNeVh0xNKwBMqZ8Kb46qo6430XXOHujphw1scXg2iMPOtb4CIu r7vA== X-Gm-Message-State: APjAAAX36IZ8pnsxqf8wybDnV1M1P0HRiBVpM4E4gfIB3a2sdXgQVFuQ 9hIbsSxh4IsP+ep6kHgTqBQLNUwvRTknWX0i5dKwac/JrAfERM9eTcLjjrdYOeZ5KYjckWfAyKp QfJ/fqZZX7ldGAQ== X-Received: by 2002:a17:906:71a:: with SMTP id y26mr9632160ejb.48.1576762052188; Thu, 19 Dec 2019 05:27:32 -0800 (PST) X-Google-Smtp-Source: APXvYqy3hGqeexO9RPZrx5obuohGGXkXL0RkAb67yuY7sZgrvHB0PeDMXEhysLEEPMa9MSq7LGvX6Q== X-Received: by 2002:a17:906:71a:: with SMTP id y26mr9632140ejb.48.1576762051923; Thu, 19 Dec 2019 05:27:31 -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 g9sm495491ejd.66.2019.12.19.05.27.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Dec 2019 05:27:31 -0800 (PST) Subject: Re: [edk2-platforms][PATCH v2 1/7] Silicon/Bcm283x: Add UART constants for PL011 and miniUART To: Pete Batard , devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org References: <20191219121434.2856-1-pete@akeo.ie> <20191219121434.2856-2-pete@akeo.ie> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: <617f1b75-563d-55d9-c562-6d169d511be3@redhat.com> Date: Thu, 19 Dec 2019 14:27:30 +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: <20191219121434.2856-2-pete@akeo.ie> X-MC-Unique: PUUdfYz9OfyhJZJH8wS2sg-1 X-Mimecast-Spam-Score: 0 Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 0x00100000 > -#define BCM2836_WDOG_BASE_ADDRESS (FixedPcdGet64 (PcdBcm283xRegistersAddress) \ > - + BCM2836_WDOG_OFFSET) > +#define BCM2836_WDOG_BASE_ADDRESS (BCM2836_SOC_REGISTERS + BCM2836_WDOG_OFFSET) Good! > #define BCM2836_WDOG_PASSWORD 0x5a000000 > #define BCM2836_WDOG_RSTC_OFFSET 0x0000001c > #define BCM2836_WDOG_WDOG_OFFSET 0x00000024 > @@ -34,8 +33,7 @@ > > /* mailbox interface constants */ > #define BCM2836_MBOX_OFFSET 0x0000b880 > -#define BCM2836_MBOX_BASE_ADDRESS (FixedPcdGet64 (PcdBcm283xRegistersAddress) \ > - + BCM2836_MBOX_OFFSET) > +#define BCM2836_MBOX_BASE_ADDRESS (BCM2836_SOC_REGISTERS + BCM2836_MBOX_OFFSET) > #define BCM2836_MBOX_READ_OFFSET 0x00000000 > #define BCM2836_MBOX_STATUS_OFFSET 0x00000018 > #define BCM2836_MBOX_CONFIG_OFFSET 0x0000001c > @@ -50,4 +48,15 @@ > #define BCM2836_INTC_TIMER_CONTROL_OFFSET 0x00000040 > #define BCM2836_INTC_TIMER_PENDING_OFFSET 0x00000060 > > +/* uart constants */ > +#define BCM2836_PL011_UART_OFFSET 0x00201000 > +#define BCM2836_PL011_UART_BASE_ADDRESS (BCM2836_SOC_REGISTERS + BCM2836_PL011_UART_OFFSET) > +#define BCM2836_PL011_UART_LENGTH 0x00001000 > +#define BCM2836_PL011_UART_INTERRUPT 0x99 Hmm 96 + 29 = 0x7D, 96 + 57 = 0x99. OK. Maybe we can later add a definition for this '96'. Reviewed-by: Philippe Mathieu-Daude > + > +#define BCM2836_MINI_UART_OFFSET 0x00215000 > +#define BCM2836_MINI_UART_BASE_ADDRESS (BCM2836_SOC_REGISTERS + BCM2836_MINI_UART_OFFSET) > +#define BCM2836_MINI_UART_LENGTH 0x00000070 > +#define BCM2836_MINI_UART_INTERRUPT 0x7D > + > #endif /*__BCM2836_H__ */ >