From patchwork Thu Jul 16 15:58:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 35922 Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6GG0REF018055 for ; Thu, 16 Jul 2009 16:00:27 GMT Received: from dlep36.itg.ti.com ([157.170.170.91]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id n6GFwjKG007833; Thu, 16 Jul 2009 10:58:50 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id n6GFwiFi024524; Thu, 16 Jul 2009 10:58:44 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 3E32780628; Thu, 16 Jul 2009 10:58:44 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id 7E11780626 for ; Thu, 16 Jul 2009 10:58:41 -0500 (CDT) Received: from red.ext.ti.com (localhost [127.0.0.1]) by dflp51.itg.ti.com (8.13.7/8.13.7) with ESMTP id n6GFwf55005863 for ; Thu, 16 Jul 2009 10:58:41 -0500 (CDT) Received: from mail104-va3-R.bigfish.com (mail-va3.bigfish.com [216.32.180.113]) by red.ext.ti.com (8.13.7/8.13.7) with ESMTP id n6GFwZYi027643 for ; Thu, 16 Jul 2009 10:58:40 -0500 Received: from mail104-va3 (localhost.localdomain [127.0.0.1]) by mail104-va3-R.bigfish.com (Postfix) with ESMTP id A44F714201BD for ; Thu, 16 Jul 2009 15:58:35 +0000 (UTC) X-SpamScore: 0 X-BigFish: vps0(zzzz1202hzzz2dh6bh62h) X-Spam-TCS-SCL: 1:0 X-FB-SS: 5, X-MS-Exchange-Organization-Antispam-Report: OrigIP: 63.81.120.155; Service: EHS Received: by mail104-va3 (MessageSwitch) id 1247759912992017_10897; Thu, 16 Jul 2009 15:58:32 +0000 (UCT) Received: from imap.sh.mvista.com (unknown [63.81.120.155]) by mail104-va3.bigfish.com (Postfix) with ESMTP id DD10EDC8057 for ; Thu, 16 Jul 2009 15:58:32 +0000 (UTC) Received: from wasted.dev.rtsoft.ru (unknown [10.150.0.9]) by imap.sh.mvista.com (Postfix) with ESMTP id 93C013ECD; Thu, 16 Jul 2009 08:58:30 -0700 (PDT) From: Sergei Shtylyov Organization: MontaVista Software Inc. To: khilman@deeprootsystems.com Date: Thu, 16 Jul 2009 19:58:53 +0400 User-Agent: KMail/1.5 MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200907161958.53885.sshtylyov@ru.mvista.com> Cc: davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH] DM646x: pass correct MUSB IRQs (take 3) X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.4 Precedence: list List-Id: davinci-linux-open-source.linux.davincidsp.com List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com DM646x has MUSB connected to IRQs 13 and 14 (unlike IRQ12 on other platforms), so pass the correct IRQ resources with the platform device. Signed-off-by: Dmitry Krivoschekov Signed-off-by: Sergei Shtylyov --- Killed stray spaces... arch/arm/mach-davinci/usb.c | 13 +++++++++++++ 1 files changed, 13 insertions(+) Index: linux-davinci/arch/arm/mach-davinci/usb.c =================================================================== --- linux-davinci.orig/arch/arm/mach-davinci/usb.c +++ linux-davinci/arch/arm/mach-davinci/usb.c @@ -13,6 +13,7 @@ #include #include #include +#include #define DAVINCI_USB_OTG_BASE 0x01C64000 @@ -64,6 +65,10 @@ static struct resource usb_resources[] = .start = IRQ_USBINT, .flags = IORESOURCE_IRQ, }, + { + /* placeholder for the dedicated CPPI IRQ */ + .flags = IORESOURCE_IRQ, + }, }; static u64 usb_dmamask = DMA_BIT_MASK(32); @@ -84,6 +89,14 @@ void __init setup_usb(unsigned mA, unsig { usb_data.power = mA / 2; usb_data.potpgt = potpgt_msec / 2; + + if (cpu_is_davinci_dm646x()) { + /* Override the defaults as DM6467 uses different IRQs. */ + usb_dev.resource[1].start = IRQ_DM646X_USBINT; + usb_dev.resource[2].start = IRQ_DM646X_USBDMAINT; + } else /* other devices don't have dedicated CPPI IRQ */ + usb_dev.num_resources = 2; + platform_device_register(&usb_dev); }