From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by mx.groups.io with SMTP id smtpd.web12.12399.1582886350506768789 for ; Fri, 28 Feb 2020 02:39:11 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=j+NFvGoO; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.128.65, mailfrom: pete@akeo.ie) Received: by mail-wm1-f65.google.com with SMTP id c84so2610900wme.4 for ; Fri, 28 Feb 2020 02:39:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FqzVsWYInUqs49UiqA7wpAMouOTxGC4IL8KhRGynrd4=; b=j+NFvGoOflPSJj6xRnK0izHO/4Ed+tBFru0MvxoMjSvhTRlTG5DBV7Rs3zsOHRUoNa J4YEnM1pY1EGPij3UphfaTL1W54Sz/rjnJUpoOUR8lD5c1Pk4nJkwN7WZWMrZiECkWvd auXokluTCK2G1MREVlJnzmrJGGPGE4GceTMqqF/HAObRIO0m13qKOQoWZS8NDUzkaQ0B YLkadAX4zVp6PBmW2Vf41V2q1NuSNTm9qFhn/PPdIDYxlzDlssj+ZZgGONRvH8eJVIWI mDtKE815OKs2axhmlKzBjyGCLZ1L63EBaqoN9ABHDibkIwNV4kMSK/GWoK4g1YXtpHnW Wbjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FqzVsWYInUqs49UiqA7wpAMouOTxGC4IL8KhRGynrd4=; b=aqerBvkudLEQ0cwQRNX/y2hXt6HEouEFHrkdxSfnqswOLBcjZ+CKqOSf1wzDbQA0uL V1Whv6JNqbasDGjV2dcl45aIoqKByZW2M6FG1tZ9rXoAmAyl6iC0hnorIeVuy3ktMBYW u1SS6u5EznJpGsW1EnqQJltOOCP4+dudDGaK1tmvUuvM3XzzHPawtjOz3Zm8L1/JzFiE Smzo06dH0PkivNp1c0oz7K3C4FcKY13XhMEZsjdQskXfVmH2jaVaakGrOyEIvsswgidz +SaRxZ4shbLGcnwB1HACm/amGX+HymYjoLPIXDObyqYHpuRDVbKtScKCvrJdV0HgHtsp 3GvA== X-Gm-Message-State: APjAAAUb3taw2uLLsrUhOSFbLbOYPuKEvpFmE6i2pAeigVR91UwvElUh rc45bvuf7DXYe3u9SOPznxvzROPYILM= X-Google-Smtp-Source: APXvYqyH2p/ZuvZhMwudi9118SXVMIysf0RflgmS2DFdmkTz0QVZgA5Ui8bF5ae3KAtvZsNpnaZ56w== X-Received: by 2002:a1c:208a:: with SMTP id g132mr3958823wmg.143.1582886348768; Fri, 28 Feb 2020 02:39:08 -0800 (PST) Return-Path: Received: from localhost.localdomain ([84.203.56.244]) by smtp.gmail.com with ESMTPSA id s8sm12341061wrt.57.2020.02.28.02.39.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Feb 2020 02:39:08 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, philmd@redhat.com Subject: [edk2-platforms][PATCH 01/15] Platform/RPi: Move DW USB base address to Silicon Date: Fri, 28 Feb 2020 10:38:41 +0000 Message-Id: <20200228103855.11352-2-pete@akeo.ie> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200228103855.11352-1-pete@akeo.ie> References: <20200228103855.11352-1-pete@akeo.ie> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The official BCM2835 ARM Peripherals guide lists the DW USB controller as standard SoC device. Treat is as such by adding its base address to Silicon. Signed-off-by: Pete Batard --- Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwUsbHostDxe.c | 3 ++- Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwcHw.h | 6 +----- Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h | 5 +++++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwUsbHostDxe.c b/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwUsbHostDxe.c index 37ebf503fd60..4f6f60b1eb5f 100644 --- a/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwUsbHostDxe.c +++ b/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwUsbHostDxe.c @@ -7,6 +7,7 @@ * **/ +#include #include "DwUsbHostDxe.h" #include "DwcHw.h" @@ -1548,7 +1549,7 @@ CreateDwUsbHc ( DwHc->DwUsbOtgHc.ClearRootHubPortFeature = DwHcClearRootHubPortFeature; DwHc->DwUsbOtgHc.MajorRevision = 0x02; DwHc->DwUsbOtgHc.MinorRevision = 0x00; - DwHc->DwUsbBase = DW2_USB_BASE_ADDRESS; + DwHc->DwUsbBase = BCM2836_USB_BASE_ADDRESS; Pages = EFI_SIZE_TO_PAGES (DWC2_STATUS_BUF_SIZE); DwHc->StatusBuffer = AllocatePages (Pages); diff --git a/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwcHw.h b/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwcHw.h index ddbf69a1d608..12fbde9ff6f2 100644 --- a/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwcHw.h +++ b/Platform/RaspberryPi/Drivers/DwUsbHostDxe/DwcHw.h @@ -10,11 +10,7 @@ #ifndef __DWCHW_H__ #define __DWCHW_H__ -#define DW2_USB_OFFSET 0x00980000 -#define DW2_USB_BASE_ADDRESS (FixedPcdGet64 (PcdBcm283xRegistersAddress) \ - + DW2_USB_OFFSET) - -#define HSOTG_REG(x) (x) +#define HSOTG_REG(x) (x) #define HCCHAR(_ch) HSOTG_REG(0x0500 + 0x20 * (_ch)) #define HCSPLT(_ch) HSOTG_REG(0x0504 + 0x20 * (_ch)) diff --git a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h index 7ba4877337a8..cee5fb6a4e15 100644 --- a/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h +++ b/Silicon/Broadcom/Bcm283x/Include/IndustryStandard/Bcm2836.h @@ -70,6 +70,11 @@ #define BCM2836_INTC_TIMER_CONTROL_OFFSET 0x00000040 #define BCM2836_INTC_TIMER_PENDING_OFFSET 0x00000060 +/* usb constants */ +#define BCM2836_USB_OFFSET 0x00980000 +#define BCM2836_USB_BASE_ADDRESS (BCM2836_SOC_REGISTERS + BCM2836_USB_OFFSET) +#define BCM2836_USB_LENGTH 0x00010000 + /* uart constants */ #define BCM2836_PL011_UART_OFFSET 0x00201000 #define BCM2836_PL011_UART_BASE_ADDRESS (BCM2836_SOC_REGISTERS + BCM2836_PL011_UART_OFFSET) -- 2.21.0.windows.1