summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/distro/chinook-compat.conf37
-rw-r--r--packages/libxine/libxine-x11_1.0.bb4
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/.mtn2git_empty0
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/270-usb-gadget-udc.patch2739
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/arch-config.patch62
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/bkpxa-pxa-cpu.patch117
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/bkpxa-pxa-cpufreq.patch403
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/board-init.patch81
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/bugfix-i2c-include.patch12
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/bugfix-mmc-clock.patch14
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/bugfix-pxa-cpufreq.patch64
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/bugfix-serial-interrupt.patch25
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/bugfix-serial-register-status.patch69
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/compact-flash.patch287
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/compile-fix-pxa_cpufreq.patch13
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/cpufreq-better-freqs.patch53
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/cpufreq-fixup.patch26
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/cpufreq-ondemand-by-default.patch42
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/disable-uncompress-message.patch32
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/ethernet-config.patch26
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/flash.patch171
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/gumstix-asoc.patch224
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/gumstix-custom-connex/.mtn2git_empty0
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/gumstix-custom-connex/defconfig1619
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/gumstix-custom-connex/defconfig-nofb1619
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/gumstix-custom-verdex/.mtn2git_empty0
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/gumstix-custom-verdex/defconfig1791
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/gumstix-custom-verdex/defconfig-nofb1791
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/gumstix-fb-logo.patch10455
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/gumstix-pxa270-mmc.patch33
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/gumstix-pxa270-usb-host.patch366
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/header.patch170
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/mach-types-fix.patch13
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/misalignment-handling.patch38
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/mmc-card-detect.patch80
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/modular-init-bluetooth.patch108
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/modular-init-smc91x.patch203
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/modular-init-usb-gadget.patch106
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/pcm-gcc-411-bugfix.patch60
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/proc-gpio.patch348
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/pxa-regs-additions.patch28
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/pxa-regs-fixup.patch12
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/pxa2xx_udc.patch65
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/pxafb-18bpp-mode.patch433
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/pxafb-definition.patch180
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/serial-divisor.patch31
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/serial-ether-addr.patch62
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/smc-ether-addr.patch62
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/smc911x-fixup.patch392
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/tsc2003-config.diff31
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/tsc2003.c699
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/uImage-in-own-partition.patch56
-rw-r--r--packages/linux/gumstix-kernel-2.6.21/ucb1400-ac97-audio.patch309
-rw-r--r--packages/linux/gumstix-kernel_2.6.21.bb54
-rw-r--r--packages/linux/gumstix-linux.inc74
-rw-r--r--packages/linux/linux-rp-2.6.24/pxa27x-resume.patch41
-rw-r--r--packages/linux/linux-rp_2.6.24.bb3
-rw-r--r--packages/uclibc/uclibc-0.9.29/bfin/uClibc.machine68
-rw-r--r--packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-002-atmel.1.patch3546
-rw-r--r--packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-avr32-fix-sa_onstack.patch31
-rw-r--r--packages/uclibc/uclibc_0.9.29.bb4
61 files changed, 29446 insertions, 36 deletions
diff --git a/conf/distro/chinook-compat.conf b/conf/distro/chinook-compat.conf
index ef0fa80f65..c439ad67f6 100644
--- a/conf/distro/chinook-compat.conf
+++ b/conf/distro/chinook-compat.conf
@@ -83,7 +83,8 @@ PREFERRED_VERSION_pango = "1.16.4"
PREFERRED_VERSION_atk = "1.18.0"
PREFERRED_VERSION_gtk+ = "2.10.14"
-PREFERRED_VERSION_gnome-vfs = "2.16"
+PREFERRED_VERSION_gnome-vfs = "2.16.3"
+
# 3.9.1 would be correct
PREFERRED_VERSION_gtkhtml-3.8 = "3.8.2"
PREFERRED_VERSION_libxml2 = "2.6.27"
@@ -99,12 +100,16 @@ PREFERRED_VERSION_gst-plugins-base = "0.10.14"
# 0.11.3 would be correct ( + maemo patches)
PREFERRED_VERSION_gst-ffmpeg = "0.10.2"
+PREFERRED_VERSION_bluez-libs = "3.20"
+
PREFERRED_PROVIDER_virtual/db = "db"
PREFERRED_PROVIDER_virtual/db-native = "db-native"
PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive"
# This is a hack to avoid building mesa which crashes the compiler
PREFERRED_PROVIDER_virtual/libsdl = "libsdl-directfb"
+PREFERRED_VERSION_libsdl-directfb = "1.2.9"
+PREFERRED_VERSION_libsdl-image = "1.2.3"
PREFERRED_PROVIDER_xserver = "xserver-kdrive"
@@ -137,11 +142,6 @@ PREFERRED_VERSION_pixman = "0.9.6"
PREFERRED_PROVIDER_virtual/libqte2 = "qte-mt"
PREFERRED_PROVIDER_avahi = "avahi"
-# Prevent chosing jikes-native (until java bootstrap patch is merged).
-PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"
-
-PREFERRED_PROVIDER_swt3.4-gtk = "swt3.4-gtk-hildon"
-
PREFERRED_VERSION_libsoup = "2.2.7"
PREFERRED_VERSION_libglade = "2.4.2"
PREFERRED_VERSION_gnutls = "1.4.5"
@@ -150,6 +150,23 @@ PREFERRED_VERSION_libgcrypt = "1.2.3"
PREFERRED_VERSION_gpe-scap = "1.3"
+# various Maemo4 specific libraries
+PREFERRED_VERSION_mce-dev = "1.6.3"
+PREFERRED_VERSION_libosso = "2.13"
+PREFERRED_VERSION_libhildon = "1.99.0"
+PREFERRED_VERSION_libhildonmime = "1.10.0"
+PREFERRED_VERSION_libhildonfm = "1.9.46"
+PREFERRED_VERSION_hildon-thumbnail = "0.14"
+PREFERRED_VERSION_osso-gwconnect = "1.0.12"
+PREFERRED_VERSION_osso-gnome-vfs2 = "2.16.3"
+
+# Java stuff
+
+PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"
+
+PREFERRED_PROVIDER_swt3.4-gtk = "swt3.4-gtk-hildon"
+PREFERRED_VERSION_swt3.4-gtk-hildon = "3.3+3.4M5"
+
# Does not compile with the CodeSourcery compiler .. :(
PREFERRED_VERSION_kaffe = "1.1.8+cvs20080120"
PREFERRED_VERSION_kaffeh-native = "1.1.8+cvs20080120"
@@ -172,3 +189,11 @@ PKG_hildon-1 = "libhildon1"
PKG_zlib = "zlib1g"
PKG_libglade = "libglade2-0"
PKG_libsoup = "libsoup2.2-8"
+
+PKG_libsdl-image = "libsdl-image1.2"
+PKG_libsdl-directfb = "libsdl1.2"
+
+PKG_bluez-libs = "libbluetooth2"
+
+PKG_osso-ic-oss = "osso-ic"
+PKG_libconic = "libconic0"
diff --git a/packages/libxine/libxine-x11_1.0.bb b/packages/libxine/libxine-x11_1.0.bb
index 28d3be1b3d..db0d725aac 100644
--- a/packages/libxine/libxine-x11_1.0.bb
+++ b/packages/libxine/libxine-x11_1.0.bb
@@ -5,7 +5,7 @@ PRIORITY = "optional"
LICENSE = "GPL"
DEPENDS = "zlib libogg libvorbis tremor libmad libmodplug esound virtual/libx11 libxext libpng"
PROVIDES = "virtual/libxine"
-PR = "r0"
+PR = "r1"
inherit autotools pkgconfig gettext binconfig
@@ -17,7 +17,7 @@ SRC_URI = "http://heanet.dl.sourceforge.net/sourceforge/xine/xine-lib-${PV}.tar.
file://libxine-ffmpeg-enable-arm.patch;patch=1 \
file://no-caca-no-aalib.patch;patch=1 \
file://dont-have-xv.patch;patch=1 \
- file://restore-esd.patch;patch=1 \
+# file://restore-esd.patch;patch=1 \
file://fix-syntax-xine-vorbis-decoder.patch;patch=1 \
file://libxine-cut-memusage.patch;patch=1 \
file://mpegvideo-static-inlinine.patch;patch=1 \
diff --git a/packages/linux/gumstix-kernel-2.6.21/.mtn2git_empty b/packages/linux/gumstix-kernel-2.6.21/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/gumstix-kernel-2.6.21/.mtn2git_empty
diff --git a/packages/linux/gumstix-kernel-2.6.21/270-usb-gadget-udc.patch b/packages/linux/gumstix-kernel-2.6.21/270-usb-gadget-udc.patch
new file mode 100644
index 0000000000..630d188ea0
--- /dev/null
+++ b/packages/linux/gumstix-kernel-2.6.21/270-usb-gadget-udc.patch
@@ -0,0 +1,2739 @@
+Index: linux-2.6.21gum/drivers/usb/gadget/Kconfig
+===================================================================
+--- linux-2.6.21gum.orig/drivers/usb/gadget/Kconfig
++++ linux-2.6.21gum/drivers/usb/gadget/Kconfig
+@@ -129,6 +129,28 @@ config USB_PXA2XX_SMALL
+ default y if USB_ETH
+ default y if USB_G_SERIAL
+
++config USB_GADGET_PXA27X
++ boolean "PXA 27x"
++ depends on ARCH_PXA && PXA27x
++ help
++ Intel's PXA 27x series XScale ARM-5TE processors include
++ an integrated full speed USB 1.1 device controller.
++
++ Say "y" to link the driver statically, or "m" to build a
++ dynamically linked module called "pxa27x_udc" and force all
++ gadget drivers to also be dynamically linked.
++
++config USB_PXA27X
++ tristate
++ depends on USB_GADGET_PXA27X
++ default USB_GADGET
++ select USB_GADGET_SELECTED
++
++config USB_PXA27X_DMA
++ bool # "Use DMA support"
++ depends on USB_GADGET_PXA27X
++ default n
++
+ config USB_GADGET_GOKU
+ boolean "Toshiba TC86C001 'Goku-S'"
+ depends on PCI
+Index: linux-2.6.21gum/drivers/usb/gadget/Makefile
+===================================================================
+--- linux-2.6.21gum.orig/drivers/usb/gadget/Makefile
++++ linux-2.6.21gum/drivers/usb/gadget/Makefile
+@@ -7,6 +7,7 @@ obj-$(CONFIG_USB_PXA2XX) += pxa2xx_udc.o
+ obj-$(CONFIG_USB_GOKU) += goku_udc.o
+ obj-$(CONFIG_USB_OMAP) += omap_udc.o
+ obj-$(CONFIG_USB_LH7A40X) += lh7a40x_udc.o
++obj-$(CONFIG_USB_PXA27X) += pxa27x_udc.o
+ obj-$(CONFIG_USB_AT91) += at91_udc.o
+ obj-$(CONFIG_USB_GADGET_GUMSTIX) += gumstix_gadget.o
+
+Index: linux-2.6.21gum/drivers/usb/gadget/pxa27x_udc.c
+===================================================================
+--- /dev/null
++++ linux-2.6.21gum/drivers/usb/gadget/pxa27x_udc.c
+@@ -0,0 +1,2352 @@
++/*
++ * linux/drivers/usb/gadget/pxa27x_udc.c
++ * Intel PXA2xx and IXP4xx on-chip full speed USB device controllers
++ *
++ * Copyright (C) 2002 Intrinsyc, Inc. (Frank Becker)
++ * Copyright (C) 2003 Robert Schwebel, Pengutronix
++ * Copyright (C) 2003 Benedikt Spranger, Pengutronix
++ * Copyright (C) 2003 David Brownell
++ * Copyright (C) 2003 Joshua Wise
++ * Copyright (C) 2004 Intel Corporation
++ * Copyright (C) 2005 SDG Systems, LLC (Aric Blumer)
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ *
++ */
++
++#undef DEBUG
++ // #define DEBUG 1
++ //#define VERBOSE DBG_VERBOSE
++
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/ioport.h>
++#include <linux/types.h>
++#include <linux/version.h>
++#include <linux/errno.h>
++#include <linux/delay.h>
++#include <linux/sched.h>
++#include <linux/slab.h>
++#include <linux/init.h>
++#include <linux/timer.h>
++#include <linux/list.h>
++#include <linux/interrupt.h>
++#include <linux/proc_fs.h>
++#include <linux/mm.h>
++#include <linux/platform_device.h>
++#include <linux/dma-mapping.h>
++#include <linux/irq.h>
++
++#include <asm/byteorder.h>
++#include <asm/dma.h>
++#include <asm/io.h>
++#include <asm/system.h>
++#include <asm/mach-types.h>
++#include <asm/unaligned.h>
++#include <asm/hardware.h>
++#include <asm/mach/irq.h>
++#include <asm/arch/pxa-regs.h>
++
++#include <linux/usb/ch9.h>
++#include <linux/usb_gadget.h>
++
++#include <asm/arch/udc.h>
++
++
++/*
++ * This driver handles the USB Device Controller (UDC) in Intel's PXA 27777777x
++ * series processors.
++ * Such controller drivers work with a gadget driver. The gadget driver
++ * returns descriptors, implements configuration and data protocols used
++ * by the host to interact with this device, and allocates endpoints to
++ * the different protocol interfaces. The controller driver virtualizes
++ * usb hardware so that the gadget drivers will be more portable.
++ *
++ * This UDC hardware wants to implement a bit too much USB protocol, so
++ * it constrains the sorts of USB configuration change events that work.
++ * The errata for these chips are misleading; some "fixed" bugs from
++ * pxa250 a0/a1 b0/b1/b2 sure act like they're still there.
++ */
++
++#define DRIVER_VERSION "21-Jul-2005"
++#define DRIVER_DESC "PXA 27x USB Device Controller driver"
++
++
++static const char driver_name [] = "pxa27x_udc";
++
++static const char ep0name [] = "ep0";
++
++
++#define USE_DMA
++//#define DISABLE_TEST_MODE
++
++#ifdef CONFIG_PROC_FS
++#define UDC_PROC_FILE
++#endif
++
++#include "pxa27x_udc.h"
++
++#if 0
++#ifdef CONFIG_EMBEDDED
++/* few strings, and little code to use them */
++#undef DEBUG
++#undef UDC_PROC_FILE
++#endif
++#endif
++
++#ifdef USE_DMA
++static int use_dma = 1;
++module_param(use_dma, bool, 0);
++MODULE_PARM_DESC (use_dma, "true to use dma");
++
++static void dma_nodesc_handler (int dmach, void *_ep);
++static void kick_dma(struct pxa27x_ep *ep, struct pxa27x_request *req);
++
++#define DMASTR " (dma support)"
++
++#else /* !USE_DMA */
++#define DMASTR " (pio only)"
++#endif
++
++#ifdef CONFIG_USB_PXA27X_SMALL
++#define SIZE_STR " (small)"
++#else
++#define SIZE_STR ""
++#endif
++
++#ifdef DISABLE_TEST_MODE
++/* (mode == 0) == no undocumented chip tweaks
++ * (mode & 1) == double buffer bulk IN
++ * (mode & 2) == double buffer bulk OUT
++ * ... so mode = 3 (or 7, 15, etc) does it for both
++ */
++static ushort fifo_mode = 0;
++module_param(fifo_mode, ushort, 0);
++MODULE_PARM_DESC (fifo_mode, "pxa27x udc fifo mode");
++#endif
++
++#define UDCISR0_IR0 0x3
++#define UDCISR_INT_MASK (UDC_INT_FIFOERROR | UDC_INT_PACKETCMP)
++#define UDCICR_INT_MASK UDCISR_INT_MASK
++
++#define UDCCSR_MASK (UDCCSR_FST | UDCCSR_DME)
++/* ---------------------------------------------------------------------------
++ * endpoint related parts of the api to the usb controller hardware,
++ * used by gadget driver; and the inner talker-to-hardware core.
++ * ---------------------------------------------------------------------------
++ */
++
++static void pxa27x_ep_fifo_flush (struct usb_ep *ep);
++static void nuke (struct pxa27x_ep *, int status);
++
++static void pio_irq_enable(int ep_num)
++{
++ if (ep_num < 16)
++ UDCICR0 |= 3 << (ep_num * 2);
++ else {
++ ep_num -= 16;
++ UDCICR1 |= 3 << (ep_num * 2);
++ }
++}
++
++static void pio_irq_disable(int ep_num)
++{
++ ep_num &= 0xf;
++ if (ep_num < 16)
++ UDCICR0 &= ~(3 << (ep_num * 2));
++ else {
++ ep_num -= 16;
++ UDCICR1 &= ~(3 << (ep_num * 2));
++ }
++}
++
++/* The UDCCR reg contains mask and interrupt status bits,
++ * so using '|=' isn't safe as it may ack an interrupt.
++ */
++#define UDCCR_MASK_BITS (UDCCR_OEN | UDCCR_UDE)
++
++static inline void udc_set_mask_UDCCR(int mask)
++{
++ UDCCR = (UDCCR & UDCCR_MASK_BITS) | (mask & UDCCR_MASK_BITS);
++}
++
++static inline void udc_clear_mask_UDCCR(int mask)
++{
++ UDCCR = (UDCCR & UDCCR_MASK_BITS) & ~(mask & UDCCR_MASK_BITS);
++}
++
++static inline void udc_ack_int_UDCCR(int mask)
++{
++ /* udccr contains the bits we dont want to change */
++ __u32 udccr = UDCCR & UDCCR_MASK_BITS;
++
++ UDCCR = udccr | (mask & ~UDCCR_MASK_BITS);
++}
++
++/*
++ * endpoint enable/disable
++ *
++ * we need to verify the descriptors used to enable endpoints. since pxa27x
++ * endpoint configurations are fixed, and are pretty much always enabled,
++ * there's not a lot to manage here.
++ *
++ * because pxa27x can't selectively initialize bulk (or interrupt) endpoints,
++ * (resetting endpoint halt and toggle), SET_INTERFACE is unusable except
++ * for a single interface (with only the default altsetting) and for gadget
++ * drivers that don't halt endpoints (not reset by set_interface). that also
++ * means that if you use ISO, you must violate the USB spec rule that all
++ * iso endpoints must be in non-default altsettings.
++ */
++static int pxa27x_ep_enable (struct usb_ep *_ep,
++ const struct usb_endpoint_descriptor *desc)
++{
++ struct pxa27x_ep *ep;
++ struct pxa27x_udc *dev;
++
++ ep = container_of (_ep, struct pxa27x_ep, ep);
++ if (!_ep || !desc || _ep->name == ep0name
++ || desc->bDescriptorType != USB_DT_ENDPOINT
++ || ep->fifo_size < le16_to_cpu(desc->wMaxPacketSize)) {
++ DMSG("%s, bad ep or descriptor\n", __FUNCTION__);
++ return -EINVAL;
++ }
++
++ /* xfer types must match, except that interrupt ~= bulk */
++ if( ep->ep_type != USB_ENDPOINT_XFER_BULK
++ && desc->bmAttributes != USB_ENDPOINT_XFER_INT) {
++ DMSG("%s, %s type mismatch\n", __FUNCTION__, _ep->name);
++ return -EINVAL;
++ }
++
++ /* hardware _could_ do smaller, but driver doesn't */
++ if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK
++ && le16_to_cpu (desc->wMaxPacketSize)
++ != BULK_FIFO_SIZE)
++ || !desc->wMaxPacketSize) {
++ DMSG("%s, bad %s maxpacket\n", __FUNCTION__, _ep->name);
++ return -ERANGE;
++ }
++
++ dev = ep->dev;
++ if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) {
++ DMSG("%s, bogus device state\n", __FUNCTION__);
++ return -ESHUTDOWN;
++ }
++
++ ep->desc = desc;
++ ep->dma = -1;
++ ep->stopped = 0;
++ ep->pio_irqs = ep->dma_irqs = 0;
++ ep->ep.maxpacket = le16_to_cpu (desc->wMaxPacketSize);
++
++ /* flush fifo (mostly for OUT buffers) */
++ pxa27x_ep_fifo_flush (_ep);
++
++ /* ... reset halt state too, if we could ... */
++
++#ifdef USE_DMA
++ /* for (some) bulk and ISO endpoints, try to get a DMA channel and
++ * bind it to the endpoint. otherwise use PIO.
++ */
++ DMSG("%s: called attributes=%d\n", __FUNCTION__, ep->ep_type);
++ switch (ep->ep_type) {
++ case USB_ENDPOINT_XFER_ISOC:
++ if (le16_to_cpu(desc->wMaxPacketSize) % 32)
++ break;
++ // fall through
++ case USB_ENDPOINT_XFER_BULK:
++ if (!use_dma || !ep->reg_drcmr)
++ break;
++ ep->dma = pxa_request_dma ((char *)_ep->name,
++ (le16_to_cpu (desc->wMaxPacketSize) > 64)
++ ? DMA_PRIO_MEDIUM /* some iso */
++ : DMA_PRIO_LOW,
++ dma_nodesc_handler, ep);
++ if (ep->dma >= 0) {
++ *ep->reg_drcmr = DRCMR_MAPVLD | ep->dma;
++ DMSG("%s using dma%d\n", _ep->name, ep->dma);
++ }
++ default:
++ break;
++ }
++#endif
++ DBG(DBG_VERBOSE, "enabled %s\n", _ep->name);
++ return 0;
++}
++
++static int pxa27x_ep_disable (struct usb_ep *_ep)
++{
++ struct pxa27x_ep *ep;
++
++ ep = container_of (_ep, struct pxa27x_ep, ep);
++ if (!_ep || !ep->desc) {
++ DMSG("%s, %s not enabled\n", __FUNCTION__,
++ _ep ? ep->ep.name : NULL);
++ return -EINVAL;
++ }
++ nuke (ep, -ESHUTDOWN);
++
++#ifdef USE_DMA
++ if (ep->dma >= 0) {
++ *ep->reg_drcmr = 0;
++ pxa_free_dma (ep->dma);
++ ep->dma = -1;
++ }
++#endif
++
++ /* flush fifo (mostly for IN buffers) */
++ pxa27x_ep_fifo_flush (_ep);
++
++ ep->desc = 0;
++ ep->stopped = 1;
++
++ DBG(DBG_VERBOSE, "%s disabled\n", _ep->name);
++ return 0;
++}
++
++/*-------------------------------------------------------------------------*/
++
++/* for the pxa27x, these can just wrap kmalloc/kfree. gadget drivers
++ * must still pass correctly initialized endpoints, since other controller
++ * drivers may care about how it's currently set up (dma issues etc).
++ */
++
++/*
++ * pxa27x_ep_alloc_request - allocate a request data structure
++ */
++static struct usb_request *
++pxa27x_ep_alloc_request (struct usb_ep *_ep, unsigned gfp_flags)
++{
++ struct pxa27x_request *req;
++
++ req = kmalloc (sizeof *req, gfp_flags);
++ if (!req)
++ return 0;
++
++ memset (req, 0, sizeof *req);
++ INIT_LIST_HEAD (&req->queue);
++ return &req->req;
++}
++
++
++/*
++ * pxa27x_ep_free_request - deallocate a request data structure
++ */
++static void
++pxa27x_ep_free_request (struct usb_ep *_ep, struct usb_request *_req)
++{
++ struct pxa27x_request *req;
++
++ req = container_of(_req, struct pxa27x_request, req);
++ WARN_ON (!list_empty (&req->queue));
++ kfree(req);
++}
++
++
++/* PXA cache needs flushing with DMA I/O (it's dma-incoherent), but there's
++ * no device-affinity and the heap works perfectly well for i/o buffers.
++ * It wastes much less memory than dma_alloc_coherent() would, and even
++ * prevents cacheline (32 bytes wide) sharing problems.
++ */
++static void *
++pxa27x_ep_alloc_buffer(struct usb_ep *_ep, unsigned bytes,
++ dma_addr_t *dma, unsigned gfp_flags)
++{
++ char *retval;
++
++ retval = kmalloc (bytes, gfp_flags & ~(__GFP_DMA|__GFP_HIGHMEM));
++ if (retval)
++ *dma = virt_to_bus (retval);
++ return retval;
++}
++
++static void
++pxa27x_ep_free_buffer(struct usb_ep *_ep, void *buf, dma_addr_t dma,
++ unsigned bytes)
++{
++ kfree (buf);
++}
++
++/*-------------------------------------------------------------------------*/
++
++/*
++ * done - retire a request; caller blocked irqs
++ */
++static void done(struct pxa27x_ep *ep, struct pxa27x_request *req, int status)
++{
++ list_del_init(&req->queue);
++ if (likely (req->req.status == -EINPROGRESS))
++ req->req.status = status;
++ else
++ status = req->req.status;
++
++ if (status && status != -ESHUTDOWN)
++