From patchwork Tue Nov 4 07:17:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 406452 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id CCD4E140079 for ; Tue, 4 Nov 2014 18:17:46 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9F36A4B8DC; Tue, 4 Nov 2014 08:17:44 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pF1sMgE15oTs; Tue, 4 Nov 2014 08:17:44 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BC3784B8CE; Tue, 4 Nov 2014 08:17:43 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C60FC4B8CE for ; Tue, 4 Nov 2014 08:17:38 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id azMpmQky4CgS for ; Tue, 4 Nov 2014 08:17:38 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by theia.denx.de (Postfix) with ESMTPS id 653254B8CD for ; Tue, 4 Nov 2014 08:17:35 +0100 (CET) Received: by mail-pa0-f51.google.com with SMTP id kq14so13967275pab.10 for ; Mon, 03 Nov 2014 23:17:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=VUA20A/g1K6xhuHyHQWMiTVEwCKz8Nxyn3S220IL6eM=; b=MzhYCsuDYd9HZipVY1xvCP7YJ3PxgRPYP6z1NxBvGbW/pUP/MCFBvNzU3dXwm3H+6r IKLcw6KUDHu+tnhc6QhNplqPN2MQ05vvCg7h6I0F8xOugz1nQUg9EepYwMpAcMTr0I5P ibtKr78sad+Db4wjsjTozCG2bRk7C+CH4JY8sQVCMZ8uBc26Nln0aa8Ht1DRRIr2n7NZ 2BzWPGJFexLpLdGTfzfJUFvUYrquSWueF6FahtQQ98rfW2Y/dm6YDHQ4cc9dqkuMA4BT NuXtB2NPQRIXoVvj7bfK5kCdJ3Z8KVXE0zgRllmgHp0xJ95RWM8z/f6LGR2SmPwetQLj qnfw== X-Gm-Message-State: ALoCoQleBYRPt7PkKbwv9X51qpNeG7lq1PsjNsDZxMlMCdjdO7m1aFGwfkmYVtasY0NSv0XMasJo X-Received: by 10.66.234.6 with SMTP id ua6mr36037753pac.33.1415085453917; Mon, 03 Nov 2014 23:17:33 -0800 (PST) Received: from xps-iwamatsu.renesas.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id j5sm19085670pdp.9.2014.11.03.23.17.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Nov 2014 23:17:32 -0800 (PST) From: Nobuhiro Iwamatsu To: u-boot@lists.denx.de, Marek Vasut Date: Tue, 4 Nov 2014 16:17:21 +0900 Message-Id: <1415085441-31476-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> X-Mailer: git-send-email 2.1.1 Cc: Nobuhiro Iwamatsu Subject: [U-Boot] [PATCH] usb: rmobile: Use ARRAY_SIZE(usb_base_address) instead of CONFIG_USB_MAX_CONTROLLER_COUNT X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Nobuhiro Iwamatsu CC: Marek Vasut --- drivers/usb/host/ehci-rmobile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/ehci-rmobile.c b/drivers/usb/host/ehci-rmobile.c index b433087..7fe79ef 100644 --- a/drivers/usb/host/ehci-rmobile.c +++ b/drivers/usb/host/ehci-rmobile.c @@ -13,18 +13,18 @@ #include "ehci.h" #if defined(CONFIG_R8A7740) -static u32 usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT] = { +static u32 usb_base_address[] = { 0xC6700000 }; #elif defined(CONFIG_R8A7790) -static u32 usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT] = { +static u32 usb_base_address[] = { 0xEE080000, /* USB0 (EHCI) */ 0xEE0A0000, /* USB1 */ 0xEE0C0000, /* USB2 */ }; #elif defined(CONFIG_R8A7791) || defined(CONFIG_R8A7793) || \ defined(CONFIG_R8A7794) -static u32 usb_base_address[CONFIG_USB_MAX_CONTROLLER_COUNT] = { +static u32 usb_base_address[] = { 0xEE080000, /* USB0 (EHCI) */ 0xEE0C0000, /* USB1 */ }; @@ -53,7 +53,7 @@ int ehci_hcd_stop(int index) if (!i) printf("error : ehci(%d) reset failed.\n", index); - if (index == (CONFIG_USB_MAX_CONTROLLER_COUNT - 1)) + if (index == (ARRAY_SIZE(usb_base_address) - 1)) setbits_le32(SMSTPCR7, SMSTPCR703); return 0;