diff options
author | Dmitry Baryshkov <dbaryshkov@gmail.com> | 2007-12-07 10:53:04 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openembedded.org> | 2007-12-07 10:53:04 +0000 |
commit | 9c849fd6aaccbfb3a76e81e4dbcc20f09479e984 (patch) | |
tree | 0e6d5bff73d209e944152a2073e63fb032b124d9 /packages | |
parent | e25bfd9221d17ae8fe0efdc96ed9cd74de0e4a4d (diff) |
linux-rp: add two patches for Tosa to fix usb networking - close #1527
Diffstat (limited to 'packages')
-rw-r--r-- | packages/linux/linux-rp-2.6.23/pxa2xx_udc_support_inverse_vbus.patch | 120 | ||||
-rw-r--r-- | packages/linux/linux-rp-2.6.23/tosa_udc_use_gpio_vbus.patch | 99 | ||||
-rw-r--r-- | packages/linux/linux-rp_2.6.23.bb | 6 |
3 files changed, 223 insertions, 2 deletions
diff --git a/packages/linux/linux-rp-2.6.23/pxa2xx_udc_support_inverse_vbus.patch b/packages/linux/linux-rp-2.6.23/pxa2xx_udc_support_inverse_vbus.patch new file mode 100644 index 0000000000..72211aace2 --- /dev/null +++ b/packages/linux/linux-rp-2.6.23/pxa2xx_udc_support_inverse_vbus.patch @@ -0,0 +1,120 @@ +From dbaryshkov@gmail.com Fri Dec 7 00:05:32 2007 +Return-Path: <SRS0=7TBh+psr=Q5=lists.arm.linux.org.uk=linux-arm-kernel-bounces+openembedded=haerwu.biz@haerwu.biz> +X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on 3080.s.tld.pl +X-Spam-Level: +X-Spam-Status: No, score=1.0 required=5.0 tests=BAYES_40,SPF_FAIL + autolearn=disabled version=3.1.7 +Delivered-To: haerwu.biz-marcin@haerwu.biz +Received: (qmail 3062 invoked by uid 813007); 6 Dec 2007 23:44:39 -0000 +Delivered-To: haerwu.biz-openembedded@haerwu.biz +Received: (qmail 3048 invoked by uid 813007); 6 Dec 2007 23:44:39 -0000 +X-clamdmail: clamdmail 0.18a +Received: from zeniv.linux.org.uk (195.92.253.2) + by smtp.host4.kei.pl with SMTP; 6 Dec 2007 23:44:38 -0000 +Received: from [2002:4e20:1eda:1:201:3dff:fe00:156] (helo=lists.arm.linux.org.uk) + by ZenIV.linux.org.uk with esmtpsa (Exim 4.63 #1 (Red Hat Linux)) + id 1J0Pts-0004dN-KF; Thu, 06 Dec 2007 23:13:03 +0000 +Received: from localhost ([127.0.0.1] helo=lists.arm.linux.org.uk) + by lists.arm.linux.org.uk with esmtp (Exim 4.50) + id 1J0Pr7-0000cF-OJ; Thu, 06 Dec 2007 23:10:10 +0000 +Received: from mu-out-0910.google.com ([209.85.134.185]) + by lists.arm.linux.org.uk with esmtp (Exim 4.50) id 1J0Pn3-0000bt-0E + for linux-arm-kernel@lists.arm.linux.org.uk; + Thu, 06 Dec 2007 23:06:40 +0000 +Received: by mu-out-0910.google.com with SMTP id i2so13552mue + for <linux-arm-kernel@lists.arm.linux.org.uk>; + Thu, 06 Dec 2007 15:05:40 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; + h=domainkey-signature:received:received:date:to:subject:message-id:mime-version:content-type:content-disposition:user-agent:from; + bh=cfa4MUFsOjAsSKDax5Yk97Hu762FByFSAfUQi5KP2cc=; + b=aA5uLmMsFBL6uxIQjxwtR4vD/2zBfGHiN/xepdZSggrNmYu0DJ75Q8JsSqzU/z7Vh9hALIiHjCR3WeqlJqZKCBMSrANzpFN4KVunUajamxn85btZMYysQ3YuZI+DUTYPovoZhuPjmT+SUT7RFpOhwKXbs7z9J8DCgodOVS+YwEY= +DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; + h=date:to:subject:message-id:mime-version:content-type:content-disposition:user-agent:from; + b=oWC1DMK+88t4jXf/5sY2gvSAjKuYypZhUflAHvCNbKYn2iFzpEFoFfjcUgV+lArS06OuT/R4v4Cp87JGK1NLA/uei3fhFZwNsoHcqWkgdsOqp5dSWMZFWCCrO4ODJahoFlnsxoS6OiceJM6EKX8u3RTELEVZEnVl3H2HWM4JJh4= +Received: by 10.82.107.15 with SMTP id f15mr9802870buc.1196982339522; + Thu, 06 Dec 2007 15:05:39 -0800 (PST) +Received: from doriath.ww600.siemens.net ( [91.122.9.34]) + by mx.google.com with ESMTPS id 5sm15474nfv.2007.12.06.15.05.37 + (version=SSLv3 cipher=OTHER); Thu, 06 Dec 2007 15:05:38 -0800 (PST) +Date: Fri, 7 Dec 2007 02:05:32 +0300 +To: linux-arm-kernel@lists.arm.linux.org.uk +Message-ID: <20071206230532.GA13332@doriath.ww600.siemens.net> +MIME-Version: 1.0 +Content-Type: text/plain; + charset=us-ascii +Content-Disposition: inline +User-Agent: Mutt/1.5.17 (2007-11-01) +From: Dmitry Baryshkov <dbaryshkov@gmail.com> +Subject: [PATCH 1/2] pxa2xx_udc_support_inverse_vbus.patch +X-BeenThere: linux-arm-kernel@lists.arm.linux.org.uk +X-Mailman-Version: 2.1.5 +Precedence: list +List-Id: ARM Linux kernel discussions <linux-arm-kernel.lists.arm.linux.org.uk> +List-Unsubscribe: <http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel>, + <mailto:linux-arm-kernel-request@lists.arm.linux.org.uk?subject=unsubscribe> +List-Archive: <http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel> +List-Post: <mailto:linux-arm-kernel@lists.arm.linux.org.uk> +List-Help: <mailto:linux-arm-kernel-request@lists.arm.linux.org.uk?subject=help> +List-Subscribe: <http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel>, + <mailto:linux-arm-kernel-request@lists.arm.linux.org.uk?subject=subscribe> +Sender: linux-arm-kernel-bounces@lists.arm.linux.org.uk +Errors-To: linux-arm-kernel-bounces+openembedded=haerwu.biz+openembedded=haerwu.biz@lists.arm.linux.org.uk +X-Length: 5827 +Status: R +X-Status: NC +X-KMail-EncryptionState: +X-KMail-SignatureState: +X-KMail-MDN-Sent: + +Some pxa-based boards (like e.g. tosa) have the VBUS-detection gpio pin +inverted. I.e. it's low when VBUS is connected and high when +disconnected. Allow specifiing whether gpio_vbus value is inverted. + +Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> + +Index: linux-test/drivers/usb/gadget/pxa2xx_udc.c +=================================================================== +--- linux-test.orig/drivers/usb/gadget/pxa2xx_udc.c 2007-12-06 12:41:25.784337009 +0300 ++++ linux-test/drivers/usb/gadget/pxa2xx_udc.c 2007-12-06 13:39:33.504345084 +0300 +@@ -125,8 +125,12 @@ static int is_vbus_present(void) + { + struct pxa2xx_udc_mach_info *mach = the_controller->mach; + +- if (mach->gpio_vbus) +- return gpio_get_value(mach->gpio_vbus); ++ if (mach->gpio_vbus) { ++ int value = gpio_get_value(mach->gpio_vbus); ++ return mach->gpio_vbus_inverted ? ++ !value : ++ value; ++ } + if (mach->udc_is_connected) + return mach->udc_is_connected(); + return 1; +@@ -1396,6 +1400,9 @@ static irqreturn_t udc_vbus_irq(int irq, + struct pxa2xx_udc *dev = _dev; + int vbus = gpio_get_value(dev->mach->gpio_vbus); + ++ if (dev->mach->gpio_vbus_inverted) ++ vbus = !vbus; ++ + pxa2xx_udc_vbus_session(&dev->gadget, vbus); + return IRQ_HANDLED; + } +Index: linux-test/include/asm-arm/mach/udc_pxa2xx.h +=================================================================== +--- linux-test.orig/include/asm-arm/mach/udc_pxa2xx.h 2007-12-06 12:38:49.872349393 +0300 ++++ linux-test/include/asm-arm/mach/udc_pxa2xx.h 2007-12-06 12:41:03.594903549 +0300 +@@ -22,5 +22,6 @@ struct pxa2xx_udc_mach_info { + */ + u16 gpio_vbus; /* high == vbus present */ + u16 gpio_pullup; /* high == pullup activated */ ++ unsigned char gpio_vbus_inverted:1; + }; + + +------------------------------------------------------------------- +List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel +FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php +Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php + diff --git a/packages/linux/linux-rp-2.6.23/tosa_udc_use_gpio_vbus.patch b/packages/linux/linux-rp-2.6.23/tosa_udc_use_gpio_vbus.patch new file mode 100644 index 0000000000..12ef2e4f39 --- /dev/null +++ b/packages/linux/linux-rp-2.6.23/tosa_udc_use_gpio_vbus.patch @@ -0,0 +1,99 @@ +From dbaryshkov@gmail.com Fri Dec 7 00:07:07 2007 +Return-Path: <SRS0=x/UTRF0x=Q6=lists.arm.linux.org.uk=linux-arm-kernel-bounces+openembedded=haerwu.biz@haerwu.biz> +X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on 3073.s.tld.pl +X-Spam-Level: +X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,SPF_FAIL + autolearn=disabled version=3.1.7 +Delivered-To: haerwu.biz-marcin@haerwu.biz +Received: (qmail 27813 invoked by uid 813007); 7 Dec 2007 00:02:29 -0000 +Delivered-To: haerwu.biz-openembedded@haerwu.biz +Received: (qmail 27803 invoked by uid 813007); 7 Dec 2007 00:02:28 -0000 +X-clamdmail: clamdmail 0.18a +Received: from zeniv.linux.org.uk (195.92.253.2) + by smtp.host4.kei.pl with SMTP; 7 Dec 2007 00:02:28 -0000 +Received: from [2002:4e20:1eda:1:201:3dff:fe00:156] (helo=lists.arm.linux.org.uk) + by ZenIV.linux.org.uk with esmtpsa (Exim 4.63 #1 (Red Hat Linux)) + id 1J0Q9g-0005Vf-7a; Thu, 06 Dec 2007 23:29:23 +0000 +Received: from localhost ([127.0.0.1] helo=lists.arm.linux.org.uk) + by lists.arm.linux.org.uk with esmtp (Exim 4.50) + id 1J0Pvo-0000d6-NY; Thu, 06 Dec 2007 23:15:02 +0000 +Received: from ug-out-1314.google.com ([66.249.92.171]) + by lists.arm.linux.org.uk with esmtp (Exim 4.50) id 1J0PoR-0000bz-SM + for linux-arm-kernel@lists.arm.linux.org.uk; + Thu, 06 Dec 2007 23:10:07 +0000 +Received: by ug-out-1314.google.com with SMTP id 29so955850ugc + for <linux-arm-kernel@lists.arm.linux.org.uk>; + Thu, 06 Dec 2007 15:07:14 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; + h=domainkey-signature:received:received:date:to:subject:message-id:mime-version:content-type:content-disposition:user-agent:from; + bh=kjQKYxTmbZXtFO0UaAnYmPE6Fk1iyXNHPNOw6H2kP6U=; + b=vpDrUZqfbWhRrhxvozaHlI9ZC2UwfZvkqIrEeyX5rmqM9rXJTkm1fQQUJvaw43KzvEmxqPXYvpvHQ663HaRRVtN08xB0t2NcDpTm20QUwznzUbze+c4FPTP+86FQbsfhCck86qmrvfBUoDVD1xS2eVR+MxwI63D3rapCtUNpvvo= +DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; + h=date:to:subject:message-id:mime-version:content-type:content-disposition:user-agent:from; + b=D4Cx347bDXn3mf7g77jwn0W3XSXIZh+CiEev1FGhlTeKRZhnM7x1ht4Z+57AiD/dMCrCq8lHqE8Gy0Rv7x7krF2bmUJaiO7HXfxmLWY+msGF2nTymkr1NKsqipQRIVCcEf0ZBKcIrT0dK94QhuP4Ea4Sb/YOfb2YwrJPyNWsISo= +Received: by 10.78.165.16 with SMTP id n16mr3075565hue.1196982433587; + Thu, 06 Dec 2007 15:07:13 -0800 (PST) +Received: from doriath.ww600.siemens.net ( [91.122.9.34]) + by mx.google.com with ESMTPS id k5sm5631nfh.2007.12.06.15.07.12 + (version=SSLv3 cipher=OTHER); Thu, 06 Dec 2007 15:07:12 -0800 (PST) +Date: Fri, 7 Dec 2007 02:07:07 +0300 +To: linux-arm-kernel@lists.arm.linux.org.uk +Message-ID: <20071206230707.GA13639@doriath.ww600.siemens.net> +MIME-Version: 1.0 +Content-Type: text/plain; + charset=us-ascii +Content-Disposition: inline +User-Agent: Mutt/1.5.17 (2007-11-01) +From: Dmitry Baryshkov <dbaryshkov@gmail.com> +Subject: [PATCH 2/2] tosa_udc_use_gpio_vbus.patch +X-BeenThere: linux-arm-kernel@lists.arm.linux.org.uk +X-Mailman-Version: 2.1.5 +Precedence: list +List-Id: ARM Linux kernel discussions <linux-arm-kernel.lists.arm.linux.org.uk> +List-Unsubscribe: <http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel>, + <mailto:linux-arm-kernel-request@lists.arm.linux.org.uk?subject=unsubscribe> +List-Archive: <http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel> +List-Post: <mailto:linux-arm-kernel@lists.arm.linux.org.uk> +List-Help: <mailto:linux-arm-kernel-request@lists.arm.linux.org.uk?subject=help> +List-Subscribe: <http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel>, + <mailto:linux-arm-kernel-request@lists.arm.linux.org.uk?subject=subscribe> +Sender: linux-arm-kernel-bounces@lists.arm.linux.org.uk +Errors-To: linux-arm-kernel-bounces+openembedded=haerwu.biz+openembedded=haerwu.biz@lists.arm.linux.org.uk +X-Length: 4865 +Status: R +X-Status: NC +X-KMail-EncryptionState: +X-KMail-SignatureState: +X-KMail-MDN-Sent: + +Use gpio_vbus instead of udc_is_connected for udc on tosa. + +Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> + +Index: linux-test/arch/arm/mach-pxa/tosa.c +=================================================================== +--- linux-test.orig/arch/arm/mach-pxa/tosa.c 2007-12-06 12:43:04.301350179 +0300 ++++ linux-test/arch/arm/mach-pxa/tosa.c 2007-12-06 12:47:50.881381650 +0300 +@@ -165,14 +165,10 @@ static void tosa_udc_command(int cmd) + } + } + +-static int tosa_udc_is_connected(void) +-{ +- return ((GPLR(TOSA_GPIO_USB_IN) & GPIO_bit(TOSA_GPIO_USB_IN)) == 0); +-} +- + static struct pxa2xx_udc_mach_info udc_info __initdata = { + .udc_command = tosa_udc_command, +- .udc_is_connected = tosa_udc_is_connected, ++ .gpio_vbus = TOSA_GPIO_USB_IN, ++ .gpio_vbus_inverted = 1, + }; + + /* + +------------------------------------------------------------------- +List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel +FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php +Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php + diff --git a/packages/linux/linux-rp_2.6.23.bb b/packages/linux/linux-rp_2.6.23.bb index 3fb304f51f..53625791a7 100644 --- a/packages/linux/linux-rp_2.6.23.bb +++ b/packages/linux/linux-rp_2.6.23.bb @@ -1,6 +1,6 @@ require linux-rp.inc -PR = "r9" +PR = "r10" DEFAULT_PREFERENCE_qemuarm = "-1" DEFAULT_PREFERENCE_qemux86 = "-1" @@ -123,7 +123,9 @@ SRC_URI_append_tosa = "\ file://arm-dma-coherent.patch;patch=1 \ file://usb-ohci-hooks-r3.patch;patch=1 \ file://tmio-ohci-r9.patch;patch=1 \ - " + file://pxa2xx_udc_support_inverse_vbus.patch;patch=1 \ + file://tosa_udc_use_gpio_vbus.patch;patch=1 \ + " # ${DOSRC}/tosa-asoc-r1.patch;patch=1 " SRC_URI_append_htcuniversal ="\ |