From patchwork Fri Jun 21 07:56:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 253158 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 1C0DD2C02F2 for ; Fri, 21 Jun 2013 17:56:39 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7A60B4A1F3; Fri, 21 Jun 2013 09:56:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 3hWefQRZcoYQ; Fri, 21 Jun 2013 09:56:37 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id ED1E34A1F4; Fri, 21 Jun 2013 09:56:35 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A681A4A1F4 for ; Fri, 21 Jun 2013 09:56:28 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 QEf9AoUL5fGW for ; Fri, 21 Jun 2013 09:56:22 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 BL_NJABL=ERR(-1.5) (only DNSBL check requested) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by theia.denx.de (Postfix) with ESMTPS id 6698D4A1F3 for ; Fri, 21 Jun 2013 09:56:14 +0200 (CEST) Received: by mail-pa0-f52.google.com with SMTP id kq13so7463834pab.11 for ; Fri, 21 Jun 2013 00:56:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:x-mailer:mime-version:content-transfer-encoding :x-gm-message-state; bh=Gdfv4Ii6wg98f48u24VMlnPtu0Lg898Pv8gd9JfzmYA=; b=Wwkij6k21V1vU9csjFCUkGlQmrKlCMJ9cK2L61uG1SJVtn1zHe96DEMrpoEJ3XdXtS WJWatTQUw3mBddyCLWmt9flx9xvRa698E1oki3tC9nMTOH5eWt0edEA12EFJtskKi3Po 7rH/J+leAAisDYzK8AZXMZeQm1dpG8H4XoWJLly+qi6GEZOH2txoiavPZ0dEoYpF2kxd r9oyu3P8oLVUVzNxrErmxpjAaO3M8Qj495SRl4nEsNyvk4kcOzsV/FlFeWS72DrKuSoM rcFasEQgXnintFhyFa+KNBYxUkKQJ7bXcOGiUPk7clwy6mO9AJfOi8zTn7m6ce3Qx0ec 1sCg== X-Received: by 10.68.59.98 with SMTP id y2mr11207229pbq.135.1371801373533; Fri, 21 Jun 2013 00:56:13 -0700 (PDT) Received: from [192.168.0.100] (114-39-103-89.dynamic.hinet.net. [114.39.103.89]) by mx.google.com with ESMTPSA id sd2sm3816045pbb.33.2013.06.21.00.56.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Jun 2013 00:56:13 -0700 (PDT) Message-ID: <1371801368.12179.2.camel@phoenix> From: Axel Lin To: Steve Sakoman Date: Fri, 21 Jun 2013 15:56:08 +0800 In-Reply-To: <1371801294.12179.1.camel@phoenix> References: <1371801294.12179.1.camel@phoenix> X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 X-Gm-Message-State: ALoCoQnovqzt3Pn0cloQPs/XNHhNjlKpzBNR/HxdSeqbybAyHFE1ehk8s8ajnfPmZhLqrQVdHZOi Cc: Marek Vasut , u-boot@lists.denx.de, Tom Rini , Stefan Roese Subject: [U-Boot] [PATCH v3 2/2] gpio: omap_gpio: Fix valid GPIO range for OMAP5 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de OMAP54XX and DRA7XX SoCs have 8 banks per 32 GPIOs, that is, 256 in total. The DRA7xx config defines CONFIG_DRA7XX, but also includes omap5_common.h, where CONFIG_OMAP54XX is defined (due to sharing of many internal IPs with the OMAP5, including GPIO). Reported-by: Lubomir Popov Signed-off-by: Axel Lin --- v3: just a new patch adding to this patch serial. Hi Lubomir, I'd appreciate if you can test this patch serial ( mainly for OMAP5 ). Thanks, Axel arch/arm/cpu/armv7/omap5/hwinit.c | 4 +++- arch/arm/include/asm/arch-omap5/gpio.h | 2 ++ drivers/gpio/omap_gpio.c | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv7/omap5/hwinit.c b/arch/arm/cpu/armv7/omap5/hwinit.c index daf124e..11ba36b 100644 --- a/arch/arm/cpu/armv7/omap5/hwinit.c +++ b/arch/arm/cpu/armv7/omap5/hwinit.c @@ -43,13 +43,15 @@ DECLARE_GLOBAL_DATA_PTR; u32 *const omap_si_rev = (u32 *)OMAP_SRAM_SCRATCH_OMAP_REV; -static struct gpio_bank gpio_bank_54xx[6] = { +static struct gpio_bank gpio_bank_54xx[8] = { { (void *)OMAP54XX_GPIO1_BASE, METHOD_GPIO_24XX }, { (void *)OMAP54XX_GPIO2_BASE, METHOD_GPIO_24XX }, { (void *)OMAP54XX_GPIO3_BASE, METHOD_GPIO_24XX }, { (void *)OMAP54XX_GPIO4_BASE, METHOD_GPIO_24XX }, { (void *)OMAP54XX_GPIO5_BASE, METHOD_GPIO_24XX }, { (void *)OMAP54XX_GPIO6_BASE, METHOD_GPIO_24XX }, + { (void *)OMAP54XX_GPIO7_BASE, METHOD_GPIO_24XX }, + { (void *)OMAP54XX_GPIO8_BASE, METHOD_GPIO_24XX }, }; const struct gpio_bank *const omap_gpio_bank = gpio_bank_54xx; diff --git a/arch/arm/include/asm/arch-omap5/gpio.h b/arch/arm/include/asm/arch-omap5/gpio.h index c14dff0..f507a35 100644 --- a/arch/arm/include/asm/arch-omap5/gpio.h +++ b/arch/arm/include/asm/arch-omap5/gpio.h @@ -46,5 +46,7 @@ #define OMAP54XX_GPIO4_BASE 0x48059000 #define OMAP54XX_GPIO5_BASE 0x4805B000 #define OMAP54XX_GPIO6_BASE 0x4805D000 +#define OMAP54XX_GPIO7_BASE 0x48051000 +#define OMAP54XX_GPIO8_BASE 0x48053000 #endif /* _GPIO_OMAP5_H */ diff --git a/drivers/gpio/omap_gpio.c b/drivers/gpio/omap_gpio.c index 6fa57c9..0092c13 100644 --- a/drivers/gpio/omap_gpio.c +++ b/drivers/gpio/omap_gpio.c @@ -42,6 +42,8 @@ #if defined(CONFIG_AM33XX) #define OMAP_MAX_GPIO 128 +#elif defined(CONFIG_OMAP54XX) +#define OMAP_MAX_GPIO 256 #else #define OMAP_MAX_GPIO 192 #endif