From patchwork Wed Sep 16 12:56:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 1365254 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.a=rsa-sha256 header.s=selector2 header.b=JhRI88Sg; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrzxJ36k5z9sSn for ; Wed, 16 Sep 2020 22:31:48 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7D79D82324; Wed, 16 Sep 2020 14:31:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="JhRI88Sg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9C5E782294; Wed, 16 Sep 2020 14:31:16 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on0631.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::631]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D099582294 for ; Wed, 16 Sep 2020 14:31:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=peng.fan@nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BmFCXIwBTq8TbmcOOgM78CsoGJEs9VuJvn/mtt1Rpavmz6qnlRb/iNR7HQAwAcekDbB0t73ur8eKQFI3EN4xFx3zdvZMEFX10CNwM9iL7jOzp320qUkgQ1MRbCEuSkgY7XITms/cJHECEw5x995URzLF8cDCPpgdP61BxBhO3pxOE4VE1iguUxWbf1wneU5Q1DdI0Wfe6FoLp3JnmjV+JQ+yZmt6dK2whEytNjUj9o0DytTfqCmwCvgabewMip+Ea6zU2rTaDYt+9XzLMqj/2Ko9C+dSWQ6VKe2LT6X9M5R/Ho3fR7r9lbWItP8W2e9mwHPDqIh3TQ/qaZtK+cGCRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HeuASNzFOAMpbHk+/KVdCMvEGhHZCndoRC/WJHRh6fs=; b=F6LVNSqrZE8HvwqJIj42lyHIOfiM9oyqXUamHjT61qfBCL2pXZO43JUB15vfTuvVnqnxxbqcW8ZaBBN0JQXovRob4Lp7XrLL0919XrROXwdLwMrStAauFLVwEQGLcRLyvDTR8zyhj/82iINzCFqHmkrwj5vRwzYVaXuCuUq2JRPM6+ZDU5EIhscvqUYXUGUg2z7v0al7UyNc1+qURERytc79vhmG9VDRUSzPyrg0XKttqpetC6MA4EAh1bLLWPQDm5qbOVPDWIVdl3xjooLBBkpFpFe5Tti5RN6k9HXsooO9YilcS3C78jIfG2xqM/aAjkdlfkWYPXGmpTLJbuGckA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HeuASNzFOAMpbHk+/KVdCMvEGhHZCndoRC/WJHRh6fs=; b=JhRI88Sg3bBm3Ifi1s/VXd51XViwijoRcQnOjeOshZxY5uo/4l6fpXMBUxbIT67S+dDUan07zGNmpncmfubAS/EuXqwjUhA9Ac/IPDELQPygGycnQ/TclywSzp0HS7VgVk5eZN/oSfge673/GX01nFys5+qAc7SmRved3CixR3A= Authentication-Results: denx.de; dkim=none (message not signed) header.d=none;denx.de; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4762.eurprd04.prod.outlook.com (2603:10a6:10:16::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Wed, 16 Sep 2020 12:31:10 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::39ff:13b4:4f28:1413]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::39ff:13b4:4f28:1413%10]) with mapi id 15.20.3370.019; Wed, 16 Sep 2020 12:31:10 +0000 From: peng.fan@nxp.com To: sbabic@denx.de, marex@denx.de Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, Peng Fan Subject: [PATCH 02/13] usb: ehci-mx6: preparing for ARM64 build Date: Wed, 16 Sep 2020 20:56:54 +0800 Message-Id: <20200916125705.4341-3-peng.fan@nxp.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200916125705.4341-1-peng.fan@nxp.com> References: <20200916125705.4341-1-peng.fan@nxp.com> X-ClientProxiedBy: SGBP274CA0023.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::35) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SGBP274CA0023.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.13 via Frontend Transport; Wed, 16 Sep 2020 12:31:08 +0000 X-Mailer: git-send-email 2.28.0 X-Originating-IP: [119.31.174.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 33334708-6981-4190-b035-08d85a3c6486 X-MS-TrafficTypeDiagnostic: DB7PR04MB4762: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8sHnUp+eXVHJpWotTbJIQskOKn1kbL0SJ/eJgZZ+4EneFxWE4eGXzDF9QVJhFYQaS+0nW8sJN43DkZ4ktY4sr155BlVy08ee0Imu+lq8IeJfRngfpQ85rOAWy2AoY5tyRgrr66ijEOJXsyV9INxpe4CPmPj5QauSP8jk9qZekTxuNohWMSPEKHsJJ+dMMdMwMLMUD8L5A42wZPpnMVHr4QUfdFmecIdLGz8ewtuvuwZ7q7lCS0sm+lqyUG//SDJgQLlbgWiLqG/xE7P5H3DkZxDVN6g4DYUaKl5zSVlPc0uvRXsecniUdgpRLKvGnFGt6Ky0lwEuKuveIXEMKlspUg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(376002)(136003)(346002)(366004)(39860400002)(66946007)(6486002)(8936002)(26005)(52116002)(956004)(9686003)(2616005)(8676002)(66476007)(86362001)(66556008)(6512007)(316002)(478600001)(186003)(6666004)(2906002)(83380400001)(16526019)(36756003)(6506007)(4326008)(5660300002)(1076003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: IN9lH32FeA2VBd4w5VcEgIcR7tm5EdMdKeagQpWr0e85aMaWL/iwcwUVXvUj2/uqtGk/ka1zP3MGwbfosij8hy7K7Ksi06QQ2KOT8TVGuvvyMEmV8TdttMIPSSDCyLo6uCt/625IXQYoHoRGidwdFn4SrIoMNq6McCJown2pYHJhjGhd04wJ01a6GDm/GnP3/GpHRNY7ZpT7pETFOeLYf97aRFIlgYmrOH7gSfH7UlbrLQThB71E/I0QBrS8tKi4/oWXI9TfE2ijpbrW7AS/hy1XKQxhBW8e3Z/llvqSjCLKIG1HQ7Mb/STeOX71fIWIxc5R9R4EytiwyniHNj/3XDqAT2vj3qr40oHNbu/T1S1UWPh7LWJKRCAZqnqjMiXBTjx/UVu/pcp1gHzhzUboW9h9+ysmPSVold+z6Afg2IFpSIVPdg6E6Qs4CBYCbga596y8tKIEon5x3gIhqXYoKLgRJCojNtWiL6VUr6dvHKPI6RsKMh4NtZXB7hsAbqyaLyeNnJDgD4CzyzrLJzCbmkWwgJh/qblF9o9VKMowgn6hDc/NXQMKmn5hgWSMs+1D+KocYazvcTm8NNtN798iBN3dZDSkTLy5S4mmlreua0AgAKhmH4wmlFp67+NFHB/ro9CqEKAHNOOfrztkaBym1g== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 33334708-6981-4190-b035-08d85a3c6486 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Sep 2020 12:31:10.6300 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jojaPSqSNAdOGuTJlqy+BcOCxIWMLVxaCLOveLdTB68qkhCpqrOMPCsDwRsRKGSWEkassz+87BpnbEQsHBUSqA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4762 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean From: Peng Fan Use uintptr_t and ulong to avoid build warning for ARM64 platforms Signed-off-by: Peng Fan --- drivers/usb/host/ehci-mx6.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index 9531fefce0..4b8b3087ec 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -68,7 +68,7 @@ DECLARE_GLOBAL_DATA_PTR; #define UCMD_RESET (1 << 1) /* controller reset */ #if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) -static const unsigned phy_bases[] = { +static const ulong phy_bases[] = { USB_PHY0_BASE_ADDR, #if defined(USB_PHY1_BASE_ADDR) USB_PHY1_BASE_ADDR, @@ -241,7 +241,7 @@ struct usbnc_regs { static void usb_power_config(int index) { - struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + + struct usbnc_regs *usbnc = (struct usbnc_regs *)(uintptr_t)(USB_BASE_ADDR + (0x10000 * index) + USBNC_OFFSET); void __iomem *phy_cfg2 = (void __iomem *)(&usbnc->phy_cfg2); @@ -254,7 +254,7 @@ static void usb_power_config(int index) int usb_phy_mode(int port) { - struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + + struct usbnc_regs *usbnc = (struct usbnc_regs *)(uintptr_t)(USB_BASE_ADDR + (0x10000 * port) + USBNC_OFFSET); void __iomem *status = (void __iomem *)(&usbnc->phy_status); u32 val; @@ -286,11 +286,11 @@ static void ehci_mx6_powerup_fixup(struct ehci_ctrl *ctrl, uint32_t *status_reg, static void usb_oc_config(int index) { #if defined(CONFIG_MX6) - struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + + struct usbnc_regs *usbnc = (struct usbnc_regs *)(uintptr_t)(USB_BASE_ADDR + USB_OTHERREGS_OFFSET); void __iomem *ctrl = (void __iomem *)(&usbnc->ctrl[index]); #elif defined(CONFIG_MX7) || defined(CONFIG_MX7ULP) - struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + + struct usbnc_regs *usbnc = (struct usbnc_regs *)(uintptr_t)(USB_BASE_ADDR + (0x10000 * index) + USBNC_OFFSET); void __iomem *ctrl = (void __iomem *)(&usbnc->ctrl1); #endif @@ -395,7 +395,7 @@ int ehci_hcd_init(int index, enum usb_init_type init, #elif defined(CONFIG_MX7) || defined(CONFIG_MX7ULP) u32 controller_spacing = 0x10000; #endif - struct usb_ehci *ehci = (struct usb_ehci *)(USB_BASE_ADDR + + struct usb_ehci *ehci = (struct usb_ehci *)(uintptr_t)(USB_BASE_ADDR + (controller_spacing * index)); int ret; @@ -419,8 +419,8 @@ int ehci_hcd_init(int index, enum usb_init_type init, type = board_usb_phy_mode(index); if (hccr && hcor) { - *hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength); - *hcor = (struct ehci_hcor *)((uint32_t)*hccr + + *hccr = (struct ehci_hccr *)((uintptr_t)&ehci->caplength); + *hcor = (struct ehci_hcor *)((uintptr_t)*hccr + HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase))); } @@ -652,8 +652,8 @@ static int ehci_usb_probe(struct udevice *dev) mdelay(10); - hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength); - hcor = (struct ehci_hcor *)((uint32_t)hccr + + hccr = (struct ehci_hccr *)((uintptr_t)&ehci->caplength); + hcor = (struct ehci_hcor *)((uintptr_t)hccr + HC_LENGTH(ehci_readl(&(hccr)->cr_capbase))); return ehci_register(dev, hccr, hcor, &mx6_ehci_ops, 0, priv->init_type);