[EMAIL PROTECTED] wrote:
look at the following link i posted some time ago:
http://marc.theaimsgroup.com/?l=linux-usb-devel&m=114346900121770&w=2
Ok, here is a patch with modifications to other files in the kernel, to
get the usb udc work. The patch is for 2.6.12.
That's the one I got and that was working on 2.6.12, but had some problems on
2.6.17...
Julien
What problems do you mean exactly? Maybe it's not that difficult to get
it working with 2.6.17 or newer.
Torsten
diff --git a/arch/arm/mach-imx/generic.c b/arch/arm/mach-imx/generic.c
index 41e5849..b2b6392 100644
--- a/arch/arm/mach-imx/generic.c
+++ b/arch/arm/mach-imx/generic.c
@@ -30,6 +30,7 @@ #include <asm/arch/imxfb.h>
#include <asm/hardware.h>
#include <asm/mach/map.h>
+#include <asm/arch/mmc.h>
void imx_gpio_mode(int gpio_mode)
{
@@ -159,6 +160,15 @@ unsigned int imx_get_hclk(void)
}
EXPORT_SYMBOL(imx_get_hclk);
+/*
+ * get usb_clk
+ */
+unsigned int imx_get_usb_clk(void)
+{
+ return imx_get_system_clk() / (((CSCR>>26) & 0x7)+1);
+}
+EXPORT_SYMBOL(imx_get_usb_clk);
+
static struct resource imx_mmc_resources[] = {
[0] = {
.start = 0x00214000,
@@ -172,13 +182,25 @@ static struct resource imx_mmc_resources
},
};
+static u64 imxmmmc_dmamask = 0xffffffffUL;
+
static struct platform_device imx_mmc_device = {
.name = "imx-mmc",
.id = 0,
+ .dev = {
+ .dma_mask = &imxmmmc_dmamask,
+ .coherent_dma_mask = 0xffffffff,
+ },
.num_resources = ARRAY_SIZE(imx_mmc_resources),
.resource = imx_mmc_resources,
};
+void __init imx_set_mmc_info(struct imxmmc_platform_data *info)
+{
+ imx_mmc_device.dev.platform_data = info;
+}
+EXPORT_SYMBOL(imx_set_mmc_info);
+
static struct resource imx_uart1_resources[] = {
[0] = {
.start = 0x00206000,
@@ -264,11 +286,62 @@ static struct platform_device imxfb_devi
.resource = imxfb_resources,
};
+static struct resource imx_usb_resources[] = {
+ [0] = {
+ .start = 0x00212000,
+ .end = 0x00212FFF,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = USBD_INT0,
+ .end = USBD_INT0,
+ .flags = IORESOURCE_IRQ,
+ },
+ [2] = {
+ .start = USBD_INT1,
+ .end = USBD_INT1,
+ .flags = IORESOURCE_IRQ,
+ },
+ [3] = {
+ .start = USBD_INT2,
+ .end = USBD_INT2,
+ .flags = IORESOURCE_IRQ,
+ },
+ [4] = {
+ .start = USBD_INT3,
+ .end = USBD_INT3,
+ .flags = IORESOURCE_IRQ,
+ },
+ [5] = {
+ .start = USBD_INT4,
+ .end = USBD_INT4,
+ .flags = IORESOURCE_IRQ,
+ },
+ [6] = {
+ .start = USBD_INT5,
+ .end = USBD_INT5,
+ .flags = IORESOURCE_IRQ,
+ },
+ [7] = {
+ .start = USBD_INT6,
+ .end = USBD_INT6,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device imx_usb_device = {
+ .name = "imx-usb",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(imx_usb_resources),
+ .resource = imx_usb_resources,
+};
+
static struct platform_device *devices[] __initdata = {
&imx_mmc_device,
&imxfb_device,
&imx_uart1_device,
&imx_uart2_device,
+ &imx_usb_device,
};
static struct map_desc imx_io_desc[] __initdata = {
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 3b24f9f..0ada9cf 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -106,6 +106,26 @@ config USB_PXA2XX
depends on USB_GADGET_PXA2XX
default USB_GADGET
+config USB_GADGET_IMX
+ boolean "IMX: MX1, MXL"
+ depends on ARCH_IMX
+ help
+ Freescale's IMX series include an integrated full speed
+ USB 1.1 device controller. The controller in the IMX series
+ is register-compatible.
+
+ It has Six fixed-function endpoints, as well as endpoint
+ zero (for control transfers).
+
+ Say "y" to link the driver statically, or "m" to build a
+ dynamically linked module called "imx_udc" and force all
+ gadget drivers to also be dynamically linked.
+
+config USB_IMX
+ tristate
+ depends on USB_GADGET_IMX
+ default USB_GADGET
+
# if there's only one gadget driver, using only two bulk endpoints,
# don't waste memory for the other endpoints
config USB_PXA2XX_SMALL
@@ -378,6 +398,15 @@ config USB_G_SERIAL
which includes instructions and a "driver info file" needed to
make MS-Windows work with this driver.
+config USB_G_SPI
+ tristate "SPI Gadget"
+ help
+ The SPI Gadget talks to the Linux-USB usbspi driver.
+
+ Say "y" to link the driver statically, or "m" to build a
+ dynamically linked module called "g_serial".
+
+
# put drivers that need isochronous transfer support (for audio
# or video class gadget drivers), or specific hardware, here.
diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index d5fd04d..5963036 100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
@@ -4,6 +4,7 @@ #
obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o
obj-$(CONFIG_USB_NET2280) += net2280.o
obj-$(CONFIG_USB_PXA2XX) += pxa2xx_udc.o
+obj-$(CONFIG_USB_IMX) += imx_udc.o
obj-$(CONFIG_USB_GOKU) += goku_udc.o
obj-$(CONFIG_USB_OMAP) += omap_udc.o
obj-$(CONFIG_USB_LH7A40X) += lh7a40x_udc.o
@@ -14,6 +15,7 @@ #
g_zero-objs := zero.o usbstring.o config.o epautoconf.o
g_ether-objs := ether.o usbstring.o config.o epautoconf.o
g_serial-objs := serial.o usbstring.o config.o epautoconf.o
+g_spi-objs := spi.o usbstring.o config.o epautoconf.o
gadgetfs-objs := inode.o
g_file_storage-objs := file_storage.o usbstring.o config.o \
epautoconf.o
@@ -27,4 +29,5 @@ obj-$(CONFIG_USB_ETH) += g_ether.o
obj-$(CONFIG_USB_GADGETFS) += gadgetfs.o
obj-$(CONFIG_USB_FILE_STORAGE) += g_file_storage.o
obj-$(CONFIG_USB_G_SERIAL) += g_serial.o
+obj-$(CONFIG_USB_G_SPI) += g_spi.o
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 3f783cb..2b59b81 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -20,8 +20,8 @@
*/
-// #define DEBUG 1
-// #define VERBOSE
+#define DEBUG 1
+#define VERBOSE
#include <linux/config.h>
#include <linux/module.h>
@@ -255,6 +255,10 @@ #ifdef CONFIG_USB_GADGET_AT91
#define DEV_CONFIG_CDC
#endif
+#ifdef CONFIG_USB_GADGET_IMX
+#define DEV_CONFIG_CDC
+#endif
+
/* For CDC-incapable hardware, choose the simple cdc subset.
* Anything that talks bulk (without notable bugs) can do this.
@@ -961,6 +965,7 @@ static inline int ether_alt_ep_setup (st
*/
/* one endpoint writes data back IN to the host */
+
if (strcmp (ep->name, EP_IN_NAME) == 0) {
d = ep_desc (dev->gadget, &hs_source_desc, &fs_source_desc);
ep->driver_data = dev;
@@ -2303,6 +2308,8 @@ #endif
device_desc.bcdDevice = __constant_cpu_to_le16 (0x0212);
} else if (gadget_is_at91(gadget)) {
device_desc.bcdDevice = __constant_cpu_to_le16 (0x0213);
+ } else if (gadget_is_imx(gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0214);
} else {
/* can't assume CDC works. don't want to default to
* anything less functional on CDC-capable hardware,
@@ -2503,7 +2510,7 @@ #endif
if (!dev->req)
goto fail;
dev->req->complete = eth_setup_complete;
-
+#ifdef DEV_CONFIG_CDC
/* ... and maybe likewise for status transfer */
if (dev->status_ep) {
dev->stat_req = eth_req_alloc (dev->status_ep,
@@ -2513,7 +2520,7 @@ #endif
goto fail;
}
}
-
+#endif
/* finish hookup to lower layer ... */
dev->gadget = gadget;
set_gadget_data (gadget, dev);
diff --git a/drivers/usb/gadget/file_storage.c
b/drivers/usb/gadget/file_storage.c
index 4857f0e..2a569bc 100644
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -3755,6 +3755,8 @@ static int __init check_parameters(struc
mod_data.release = 0x0312;
else if (gadget_is_at91(fsg->gadget))
mod_data.release = 0x0313;
+ else if (gadget_is_imx(fsg->gadget))
+ mod_data.release = 0x0314;
else {
WARN(fsg, "controller '%s' not recognized\n",
fsg->gadget->name);
diff --git a/drivers/usb/gadget/gadget_chips.h
b/drivers/usb/gadget/gadget_chips.h
index ea2eb52..beb7647 100644
--- a/drivers/usb/gadget/gadget_chips.h
+++ b/drivers/usb/gadget/gadget_chips.h
@@ -86,6 +86,12 @@ #else
#define gadget_is_at91(g) 0
#endif
+#ifdef CONFIG_USB_GADGET_IMX
+#define gadget_is_imx(g) !strcmp("imx_udc", (g)->name)
+#else
+#define gadget_is_imx(g) 0
+#endif
+
// CONFIG_USB_GADGET_SX2
// CONFIG_USB_GADGET_AU1X00
// ...
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
index 4d591c7..ff0be32 100644
--- a/drivers/usb/gadget/serial.c
+++ b/drivers/usb/gadget/serial.c
@@ -1464,6 +1464,9 @@ static int gs_bind(struct usb_gadget *ga
} else if (gadget_is_at91(gadget)) {
gs_device_desc.bcdDevice =
__constant_cpu_to_le16(GS_VERSION_NUM|0x0013);
+ } else if (gadget_is_imx(gadget)) {
+ gs_device_desc.bcdDevice =
+ __constant_cpu_to_le16(GS_VERSION_NUM|0x0014);
} else {
printk(KERN_WARNING "gs_bind: controller '%s' not recognized\n",
gadget->name);
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c
index 6e49432..0ac2f53 100644
--- a/drivers/usb/gadget/zero.c
+++ b/drivers/usb/gadget/zero.c
@@ -218,8 +218,13 @@ #define STRING_LOOPBACK 251
* This device advertises two configurations; these numbers work
* on a pxa250 as well as more flexible hardware.
*/
+#ifndef CONFIG_ARCH_IMX
#define CONFIG_SOURCE_SINK 3
#define CONFIG_LOOPBACK 2
+#else
+#define CONFIG_SOURCE_SINK 1
+#define CONFIG_LOOPBACK 2
+#endif
static struct usb_device_descriptor
device_desc = {
@@ -1197,6 +1202,8 @@ #endif
device_desc.bcdDevice = __constant_cpu_to_le16 (0x0212);
} else if (gadget_is_at91(gadget)) {
device_desc.bcdDevice = __constant_cpu_to_le16 (0x0213);
+ } else if (gadget_is_imx(gadget)) {
+ device_desc.bcdDevice = __constant_cpu_to_le16 (0x0214);
} else {
/* gadget zero is so simple (for now, no altsettings) that
* it SHOULD NOT have problems with bulk-capable hardware.
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 99214aa..d45c86a 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -61,7 +61,7 @@ static int generic_probe(struct usb_inte
const struct usb_device_id *id_pattern;
id_pattern = usb_match_id(interface, generic_device_ids);
- if (id_pattern != NULL)
+// if (id_pattern != NULL)
return usb_serial_probe(interface, id);
return -ENODEV;
}
diff --git a/include/asm-arm/arch-imx/hardware.h
b/include/asm-arm/arch-imx/hardware.h
index adffb6a..a6e8f2e 100644
--- a/include/asm-arm/arch-imx/hardware.h
+++ b/include/asm-arm/arch-imx/hardware.h
@@ -24,6 +24,8 @@ #include <asm/sizes.h>
#include "imx-regs.h"
#ifndef __ASSEMBLY__
+# define __REG8(x) (*((volatile u8 *)IO_ADDRESS(x)))
+
# define __REG(x) (*((volatile u32 *)IO_ADDRESS(x)))
# define __REG2(x,y) (*(volatile u32 *)((u32)&__REG(x) + (y)))
@@ -81,6 +83,7 @@ extern unsigned int imx_get_perclk2(void
extern unsigned int imx_get_perclk3(void); /* SSI */
extern unsigned int imx_get_hclk(void); /* SDRAM, CSI, Memory Stick,*/
/* I2C, DMA */
+extern unsigned int imx_get_usb_clk(void);
#endif
#define MAXIRQNUM 62
@@ -95,5 +98,8 @@ #define MEM_SIZE 0x01000000
#ifdef CONFIG_ARCH_MX1ADS
#include "mx1ads.h"
#endif
+#ifdef CONFIG_MACH_SCB9328
+#include "scb9328.h"
+#endif
#endif
diff --git a/include/asm-arm/arch-imx/imx-regs.h
b/include/asm-arm/arch-imx/imx-regs.h
index 93b840e..ec4f57e 100644
--- a/include/asm-arm/arch-imx/imx-regs.h
+++ b/include/asm-arm/arch-imx/imx-regs.h
@@ -121,6 +121,8 @@ #define PA12_PF_CSI_VSYNC ( GPIO_PORT
#define PA13_PF_CSI_HSYNC ( GPIO_PORTA | GPIO_PF | 13 )
#define PA14_PF_CSI_PIXCLK ( GPIO_PORTA | GPIO_PF | 14 )
#define PA15_PF_I2C_SDA ( GPIO_PORTA | GPIO_OUT | GPIO_PF | 15 )
+#define PA15_FIFO ( GPIO_PORTA | GPIO_IN | 15)
+#define PA16_FIFO ( GPIO_PORTA | GPIO_OUT | GPIO_AF | GPIO_GPIO |
GPIO_PUEN | 16)
#define PA16_PF_I2C_SCL ( GPIO_PORTA | GPIO_OUT | GPIO_PF | 16 )
#define PA17_AF_ETMTRACEPKT4 ( GPIO_PORTA | GPIO_AF | 17 )
#define PA17_AIN_SPI2_SS ( GPIO_PORTA | GPIO_AIN | 17 )
@@ -166,7 +168,7 @@ #define PB18_AF_SSI_TXFS ( GPIO_PORT
#define PB19_AF_SSI_TXCLK ( GPIO_PORTB | GPIO_AF | 19 )
#define PB20_PF_USBD_AFE ( GPIO_PORTB | GPIO_PF | 20 )
#define PB21_PF_USBD_OE ( GPIO_PORTB | GPIO_PF | 21 )
-#define PB22_PFUSBD_RCV ( GPIO_PORTB | GPIO_PF | 22 )
+#define PB22_PF_USBD_RCV ( GPIO_PORTB | GPIO_PF | 22 )
#define PB23_PF_USBD_SUSPND ( GPIO_PORTB | GPIO_PF | 23 )
#define PB24_PF_USBD_VP ( GPIO_PORTB | GPIO_PF | 24 )
#define PB25_PF_USBD_VM ( GPIO_PORTB | GPIO_PF | 25 )
@@ -183,7 +185,7 @@ #define PC6_PF_SSI_TXDAT ( GPIO_PORT
#define PC7_PF_SSI_TXFS ( GPIO_PORTC | GPIO_PF | 7 )
#define PC8_PF_SSI_TXCLK ( GPIO_PORTC | GPIO_PF | 8 )
#define PC9_PF_UART1_CTS ( GPIO_PORTC | GPIO_OUT | GPIO_PF | 9 )
-#define PC10_PF_UART1_RTS ( GPIO_PORTC | GPIO_IN | GPIO_PF | 10 )
+#define PC10_PF_UART1_RTS ( GPIO_PORTC | GPIO_IN | GPIO_PF | GPIO_PUEN | 10
)
#define PC11_PF_UART1_TXD ( GPIO_PORTC | GPIO_OUT | GPIO_PF | 11 )
#define PC12_PF_UART1_RXD ( GPIO_PORTC | GPIO_IN | GPIO_PF | 12 )
#define PC13_PF_SPI1_SPI_RDY ( GPIO_PORTC | GPIO_PF | 13 )
@@ -314,11 +316,16 @@ #define IMX_INTCNTL __REG(IMX_AIT
#define INTCNTL_FIAD (1<<19)
#define INTCNTL_NIAD (1<<20)
-#define IMX_NIMASK __REG(IMX_AITC_BASE+0x04)
-#define IMX_INTENNUM __REG(IMX_AITC_BASE+0x08)
-#define IMX_INTDISNUM __REG(IMX_AITC_BASE+0x0c)
-#define IMX_INTENABLEH __REG(IMX_AITC_BASE+0x10)
-#define IMX_INTENABLEL __REG(IMX_AITC_BASE+0x14)
+#define IMX_NIMASK __REG(IMX_AITC_BASE+0x04) /* Normal I Mask Register
*/
+#define IMX_INTENNUM __REG(IMX_AITC_BASE+0x08) /* I Enable Number
Register */
+#define IMX_INTDISNUM __REG(IMX_AITC_BASE+0x0c) /* I Disable Number
Register */
+#define IMX_INTENABLEH __REG(IMX_AITC_BASE+0x10) /* I Enable Register High
*/
+#define IMX_INTENABLEL __REG(IMX_AITC_BASE+0x14) /* I Enable Register Low
*/
+#define IMX_NIPNDH __REG(IMX_AITC_BASE+0x58) /* Normal I Pending
Register High */
+#define IMX_NIPNDL __REG(IMX_AITC_BASE+0x5C) /* Normal I Pending
Register Low */
+#define IMX_INTSRCH __REG(IMX_AITC_BASE+0x48)
+#define IMX_INTSRCL __REG(IMX_AITC_BASE+0x4C)
+
/*
* General purpose timers
@@ -569,4 +576,96 @@ #define UTS_TXFULL (1<<4) /* TxFIFO
#define UTS_RXFULL (1<<3) /* RxFIFO full */
#define UTS_SOFTRST (1<<0) /* Software reset */
+/*
+ * USB register
+ */
+#define USB_FRAME __REG(0x00 + IMX_USBD_BASE) /* USB frame */
+#define USB_SPEC __REG(0x04 + IMX_USBD_BASE) /* USB Spec */
+#define USB_STAT __REG(0x08 + IMX_USBD_BASE) /* USB Status */
+#define USB_CTRL __REG(0x0C + IMX_USBD_BASE) /* USB Control */
+#define USB_DADR __REG(0x10 + IMX_USBD_BASE) /* USB Desc RAM addr */
+#define USB_DDAT __REG(0x14 + IMX_USBD_BASE) /* USB Desc RAM/EP
buffer data */
+#define USB_INTR __REG(0x18 + IMX_USBD_BASE) /* USB interrupt */
+#define USB_MASK __REG(0x1C + IMX_USBD_BASE) /* USB Mask */
+#define USB_ENAB __REG(0x24 + IMX_USBD_BASE) /* USB Enable */
+#define USB_EP_STAT(x) __REG(0x30 + IMX_USBD_BASE + (x*0x30)) /* USB
status/control */
+#define USB_EP_INTR(x) __REG(0x34 + IMX_USBD_BASE + (x*0x30)) /* USB
interrupt */
+#define USB_EP_MASK(x) __REG(0x38 + IMX_USBD_BASE + (x*0x30)) /* USB
mask */
+#define USB_EP_FDAT(x) __REG(0x3C + IMX_USBD_BASE + (x*0x30)) /* USB
FIFO data */
+#define USB_EP_FDAT0(x) __REG8(0x3C + IMX_USBD_BASE + (x*0x30))/* USB FIFO
data */
+#define USB_EP_FDAT1(x) __REG8(0x3D + IMX_USBD_BASE + (x*0x30))/* USB FIFO
data */
+#define USB_EP_FDAT2(x) __REG8(0x3E + IMX_USBD_BASE + (x*0x30))/* USB FIFO
data */
+#define USB_EP_FDAT3(x) __REG8(0x3F + IMX_USBD_BASE + (x*0x30))/* USB FIFO
data */
+#define USB_EP_FSTAT(x) __REG(0x40 + IMX_USBD_BASE + (x*0x30)) /* USB
FIFO status */
+#define USB_EP_FCTRL(x) __REG(0x44 + IMX_USBD_BASE + (x*0x30)) /* USB
FIFO control */
+#define USB_EP_LRFP(x) __REG(0x48 + IMX_USBD_BASE + (x*0x30)) /* USB
last read frame pointer */
+#define USB_EP_LWFP(x) __REG(0x4C + IMX_USBD_BASE + (x*0x30)) /* USB
last write frame pointer */
+#define USB_EP_FALRM(x) __REG(0x50 + IMX_USBD_BASE + (x*0x30)) /* USB
FIFO alarm */
+#define USB_EP_FRDP(x) __REG(0x54 + IMX_USBD_BASE + (x*0x30)) /* USB
FIFO read pointer */
+#define USB_EP_FWRP(x) __REG(0x58 + IMX_USBD_BASE + (x*0x30)) /* USB
FIFO write pointer */
+
+/* USB Control Register Bit Fields.*/
+#define USB_CMDOVER (1<<6) /* UDC status */
+#define USB_CMDERROR (1<<5) /* UDC status */
+#define USB_FE_ENA (1<<3) /* Enable Font End logic */
+#define USB_UDC_RST (1<<2) /* UDC reset */
+#define USB_AFE_ENA (1<<1) /* Analog Font end enable */
+#define USB_RESUME (1<<0) /* UDC resume */
+
+/* USB Descriptor Ram Bit Fields */
+#define USB_CFG (1<<31) /* Configuration */
+#define USB_BSY (1<<30) /* Busy status */
+#define USB_DADR_DESC (0x1FF) /* Descriptor Ram Address */
+#define USB_DDAT_DESC (0xFF) /* Descriptor Endpoint Buffer */
+
+/* USB Endpoint Bit fields */
+/* USB Endpoint status bit fields */
+#define USB_FIFO_BCOUNT (0x7F<<16) /* Endpoint FIFO byte
count */
+#define USB_SIP (1<<8) /* Endpoint setup in progress */
+#define USB_DIR (1<<7) /* Endpoint transfer direction
*/
+#define USB_MAX (3<<5) /* Endpoint Max packet size */
+#define USB_TYP (3<<3) /* Endpoint type */
+#define USB_ZLPS (1<<2) /* Send zero length packet */
+#define USB_FLUSH (1<<1) /* Endpoint FIFO Flush */
+#define USB_STALL (1<<0) /* Force stall */
+/* USB Endpoint FIFO status bit fields */
+#define USB_FRAME_STAT (0xF<<24) /* Frame status bit [0-3] */
+#define USB_ERR (1<<22) /* FIFO error */
+#define USB_UF (1<<21) /* FIFO underflow */
+#define USB_OF (1<<20) /* FIFO overflow */
+#define USB_FR (1<<19) /* FIFO frame ready */
+#define USB_FULL (1<<18) /* FIFO full */
+#define USB_ALRM (1<<17) /* FIFO alarm */
+#define USB_EMPTY (1<<16) /* FIFO empty */
+/* USB Endpoint FIFO control bit fields */
+#define USB_WFR (1<<29) /* Write frame end */
+/* USB Endpoint FIFO interrupt bit fields */
+#define USB_FIFO_FULL (1<<8) /* fifo full */
+#define USB_FIFO_EMPTY (1<<7) /* fifo empty */
+#define USB_FIFO_ERROR (1<<6) /* fifo error */
+#define USB_FIFO_HIGH (1<<5) /* fifo high */
+#define USB_FIFO_LOW (1<<4) /* fifo low */
+#define USB_MDEVREQ (1<<3) /* multi Device request */
+#define USB_EOT (1<<2) /* fifo end of transfer */
+#define USB_DEVREQ (1<<1) /* Device request */
+#define USB_EOF (1<<0) /* fifo end of frame */
+
+/* USB Interrupt Bit fields */
+#define USB_WAKEUP (1<<31) /* Wake up Interrupt */
+#define USB_MSOF (1<<7) /* Missed Start of Frame */
+#define USB_SOF (1<<6) /* Start of Frame */
+#define USB_RESET_STOP (1<<5) /* Reset Signaling stop */
+#define USB_RESET_START (1<<4) /* Reset Signaling start */
+#define USB_RES (1<<3) /* Suspend to resume */
+#define USB_SUSP (1<<2) /* Active to suspend */
+#define USB_FRAME_MATCH (1<<1) /* Frame matched */
+#define USB_CFG_CHG (1<<0) /* Configuration change occurred */
+
+/* USB Enable Register Bit Fields.*/
+#define USB_RST (1<<31) /* Reset USB modules */
+#define USB_ENA (1<<30) /* Enable USB modules*/
+#define USB_SUSPEND (1<<29) /* Suspend USB modules */
+#define USB_ENDIAN (1<<28) /* Endian of USB modules */
+#define USB_POWER (1<<0) /* Power mode of USB modules */
+
#endif // _IMX_REGS_H
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel