From linux-omap-owner@vger.kernel.org Wed Aug 18 18:28:39 2010
Received: from localhost
	([127.0.0.1] helo=dominion ident=koen)
	by dominion.dominion.void with esmtp (Exim 4.69)
	(envelope-from <linux-omap-owner@vger.kernel.org>)
	id 1OllVH-0005Bg-GF
	for koen@localhost; Wed, 18 Aug 2010 18:28:39 +0200
Received: from xs.service.utwente.nl [130.89.5.250]
	by dominion with POP3 (fetchmail-6.3.9-rc2)
	for <koen@localhost> (single-drop); Wed, 18 Aug 2010 18:28:39 +0200 (CEST)
Received: from mail.service.utwente.nl ([130.89.5.253]) by exchange.service.utwente.nl with Microsoft SMTPSVC(6.0.3790.4675);
	 Wed, 18 Aug 2010 17:57:38 +0200
Received: from smtp.utwente.nl ([130.89.2.9]) by mail.service.utwente.nl with Microsoft SMTPSVC(6.0.3790.4675);
	 Wed, 18 Aug 2010 17:57:38 +0200
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
          by smtp.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id o7IFvR32030256
          for <k.kooi@student.utwente.nl>; Wed, 18 Aug 2010 17:57:27 +0200
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
	id S1753783Ab0HRP5L (ORCPT <rfc822;k.kooi@student.utwente.nl>);
	Wed, 18 Aug 2010 11:57:11 -0400
Received: from mail-gx0-f174.google.com ([209.85.161.174]:55177 "EHLO
	mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
	with ESMTP id S1753480Ab0HRP5I (ORCPT
	<rfc822;linux-omap@vger.kernel.org>); Wed, 18 Aug 2010 11:57:08 -0400
Received: by gxk23 with SMTP id 23so255642gxk.19
        for <linux-omap@vger.kernel.org>; Wed, 18 Aug 2010 08:57:07 -0700 (PDT)
DKIM-Signature: 	v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:from:to:cc:subject:date
         :message-id:x-mailer:in-reply-to:references;
        bh=e8dJxDt9UPvxtOTF/rlI0PjPDyMFs4sAckFxLmAD8GI=;
        b=pyQtAz7fV2MoLGemI8QO6vXPqxl34EqwK2JUMD4fMzDVxEe0PJUxz8tWEN/ibT2efn
         iZs9IySxVhSIR5MHYcEOZWslgXu+Xvg14dHQh8rswA+OmCY3NY0Sgx3a8BhTEZy3atmP
         uwbPZEyNLiKUrR3/EoVEFn1t+VXh1pB56kvPQ=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
        b=bgQvDKzcjSJ7OrGVyHdxAH3JqKV9+WGgniRJuloalSdycvPy6zDc1Nx17zvpo5vF6S
         psxP61zQBqDCO1HoJJd5o3c1jPM6QpmEsUx3RTswNIIaBkCNvywQNgv9G03OjYSRdm8b
         hXx0kWEjv7Wsja4tGrS3pUhOTdEVCeI+xCVvg=
Received: by 10.150.7.14 with SMTP id 14mr492871ybg.215.1282147027686;
        Wed, 18 Aug 2010 08:57:07 -0700 (PDT)
Received: from localhost.localdomain (thief-statics-245.mncable.net [64.77.213.245])
        by mx.google.com with ESMTPS id q21sm1438081ybk.23.2010.08.18.08.57.05
        (version=TLSv1/SSLv3 cipher=RC4-MD5);
        Wed, 18 Aug 2010 08:57:06 -0700 (PDT)
From: Robert Nelson <robertcnelson@gmail.com>
To: tony@atomide.com
Cc: linux-omap@vger.kernel.org, Robert Nelson <robertcnelson@gmail.com>
Subject: [PATCH v5 2/3] ARM: OMAP: Beagle: only Cx boards use pin 23 for write protect
Date: 	Wed, 18 Aug 2010 10:56:52 -0500
Message-Id: <1282147013-508-2-git-send-email-robertcnelson@gmail.com>
X-Mailer: git-send-email 1.7.0.4
In-Reply-To: <1282147013-508-1-git-send-email-robertcnelson@gmail.com>
References: <1282147013-508-1-git-send-email-robertcnelson@gmail.com>
Sender: linux-omap-owner@vger.kernel.org
Precedence: bulk
List-ID: <linux-omap.vger.kernel.org>
X-Mailing-List: 	linux-omap@vger.kernel.org
X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact icts.servicedesk@utwente.nl for more information.
X-UTwente-MailScanner: Found to be clean
X-UTwente-MailScanner-From: linux-omap-owner@vger.kernel.org
X-Spam-Status: No
X-OriginalArrivalTime: 18 Aug 2010 15:57:38.0453 (UTC) FILETIME=[14EEE450:01CB3EEE]

system_rev comes from u-boot and is a constant 0x20, so 
Bx boards also fall in this 'if' and will get setup with the 
wrong gpio_wp pin. Switch to using the Beagle revision routine 
to correcly set pin 23 only for C1/2/3 and C4 Boards. Bx boards
will then use the correct default pin setting.

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
---
 arch/arm/mach-omap2/board-omap3beagle.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 62d69a9..e9af4fd 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -274,7 +274,8 @@ static struct gpio_led gpio_leds[];
 static int beagle_twl_gpio_setup(struct device *dev,
 		unsigned gpio, unsigned ngpio)
 {
-	if (system_rev >= 0x20 && system_rev <= 0x34301000) {
+	if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) ||
+		(omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) {
 		omap_mux_init_gpio(23, OMAP_PIN_INPUT);
 		mmc[0].gpio_wp = 23;
 	} else {
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

