From patchwork Tue Apr 3 14:48:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafal Prylowski X-Patchwork-Id: 150458 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 15BA4B6FE8 for ; Wed, 4 Apr 2012 00:48:58 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753001Ab2DCOs5 (ORCPT ); Tue, 3 Apr 2012 10:48:57 -0400 Received: from metasoft.pl ([195.149.224.191]:53418 "EHLO smtp.metasoft.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751652Ab2DCOs5 (ORCPT ); Tue, 3 Apr 2012 10:48:57 -0400 Received: (qmail 955 invoked by uid 191007); 3 Apr 2012 14:48:55 -0000 X-clamdmail: clamdmail 0.18a Received: from 178.42.99.237 (HELO ?192.168.0.24?) (prylowski@metasoft.pl@178.42.99.237) by 195.149.224.191 with ESMTPA; 3 Apr 2012 14:48:55 -0000 Message-ID: <4F7B0DA5.6080703@metasoft.pl> Date: Tue, 03 Apr 2012 16:48:05 +0200 From: Rafal Prylowski User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: "linux-ide@vger.kernel.org" CC: "linux-arm-kernel@lists.infradead.org" , "joao.ramos@inov.pt" , hsweeten@visionengravers.com, "rmallon@gmail.com" , Sergei Shtylyov , "bzolnier@gmail.com" Subject: [PATCH v2 3/3] ep93xx: Add IDE support to edb93xx boards References: <4F7B0C54.8010804@metasoft.pl> In-Reply-To: <4F7B0C54.8010804@metasoft.pl> Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Signed-off-by: Rafal Prylowski Cc: H Hartley Sweeten Cc: Ryan Mallon Acked-by: H Hartley Sweeten --- arch/arm/mach-ep93xx/edb93xx.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/arch/arm/mach-ep93xx/edb93xx.c =================================================================== --- linux-2.6.orig/arch/arm/mach-ep93xx/edb93xx.c +++ linux-2.6/arch/arm/mach-ep93xx/edb93xx.c @@ -233,6 +233,29 @@ static void __init edb93xx_register_fb(v } +/************************************************************************* + * EDB93xx IDE + *************************************************************************/ +static int __init edb93xx_has_ide(void) +{ + /* + * Although EDB9312 and EDB9315 do have IDE capability, they have + * INTRQ line wired as pull-up, which makes using IDE interface + * problematic. + */ + return machine_is_edb9312() || machine_is_edb9315 || + machine_is_edb9315a(); +} + +static void __init edb93xx_register_ide(void) +{ + if (!edb93xx_has_ide()) + return; + + ep93xx_register_ide(); +} + + static void __init edb93xx_init_machine(void) { ep93xx_init_devices(); @@ -243,6 +266,7 @@ static void __init edb93xx_init_machine( edb93xx_register_i2s(); edb93xx_register_pwm(); edb93xx_register_fb(); + edb93xx_register_ide(); }