summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-sa1100/h3600.h104
-rw-r--r--include/asm-arm/arch-sa1100/irqs.h26
-rw-r--r--include/asm-arm/hardware/sa1111.h232
-rw-r--r--include/asm-arm/pci.h8
-rw-r--r--include/linux/auto_fs.h2
-rw-r--r--include/linux/module.h1
-rw-r--r--include/linux/usb.h77
-rw-r--r--include/linux/usbdevice_fs.h2
8 files changed, 253 insertions, 199 deletions
diff --git a/include/asm-arm/arch-sa1100/h3600.h b/include/asm-arm/arch-sa1100/h3600.h
index d0fc9198c9eb..1b6355971574 100644
--- a/include/asm-arm/arch-sa1100/h3600.h
+++ b/include/asm-arm/arch-sa1100/h3600.h
@@ -16,7 +16,7 @@
*
* History:
*
- * 2001-10-?? Andrew Christian Added support for iPAQ H3800
+ * 2001-10-?? Andrew Christian Added support for iPAQ H3800
*
*/
@@ -26,6 +26,11 @@
/* generalized support for H3xxx series Compaq Pocket PC's */
#define machine_is_h3xxx() (machine_is_h3100() || machine_is_h3600() || machine_is_h3800())
+/* Physical memory regions corresponding to chip selects */
+#define H3600_EGPIO_PHYS (SA1100_CS5_PHYS + 0x01000000)
+#define H3600_BANK_2_PHYS SA1100_CS2_PHYS
+#define H3600_BANK_4_PHYS SA1100_CS4_PHYS
+
/* Virtual memory regions corresponding to chip selects 2 & 4 (used on sleeves) */
#define H3600_EGPIO_VIRT 0xf0000000
#define H3600_BANK_2_VIRT 0xf1000000
@@ -36,8 +41,7 @@
--- these are common across all current iPAQ platforms
*/
-#define GPIO_H3600_NPOWER_BUTTON GPIO_GPIO (0) /* Also known as the "off button" */
-#define GPIO_H3600_MICROCONTROLLER GPIO_GPIO (1) /* From ASIC2 on H3800 */
+#define GPIO_H3600_NPOWER_BUTTON GPIO_GPIO (0) /* Also known as the "off button" */
#define GPIO_H3600_PCMCIA_CD1 GPIO_GPIO (10)
#define GPIO_H3600_PCMCIA_IRQ1 GPIO_GPIO (11)
@@ -56,83 +60,105 @@
#define GPIO_H3600_COM_CTS GPIO_GPIO (25)
#define GPIO_H3600_COM_RTS GPIO_GPIO (26)
-#define IRQ_GPIO_H3600_NPOWER_BUTTON IRQ_GPIO0
-#define IRQ_GPIO_H3600_MICROCONTROLLER IRQ_GPIO1
+#define IRQ_GPIO_H3600_NPOWER_BUTTON IRQ_GPIO0
#define IRQ_GPIO_H3600_PCMCIA_CD1 IRQ_GPIO10
#define IRQ_GPIO_H3600_PCMCIA_IRQ1 IRQ_GPIO11
#define IRQ_GPIO_H3600_PCMCIA_CD0 IRQ_GPIO17
#define IRQ_GPIO_H3600_PCMCIA_IRQ0 IRQ_GPIO21
-#define IRQ_GPIO_H3600_COM_DCD IRQ_GPIO23
+#define IRQ_GPIO_H3600_COM_DCD IRQ_GPIO23
#define IRQ_GPIO_H3600_OPT_IRQ IRQ_GPIO24
-#define IRQ_GPIO_H3600_COM_CTS IRQ_GPIO25
+#define IRQ_GPIO_H3600_COM_CTS IRQ_GPIO25
#ifndef __ASSEMBLY__
-enum ipaq_model {
- IPAQ_H3100,
- IPAQ_H3600,
- IPAQ_H3800
-};
enum ipaq_egpio_type {
- IPAQ_EGPIO_LCD_ON, /* Power to the LCD panel */
+ IPAQ_EGPIO_LCD_POWER, /* Power to the LCD panel */
IPAQ_EGPIO_CODEC_NRESET, /* Clear to reset the audio codec (remember to return high) */
- IPAQ_EGPIO_AUDIO_ON, /* Audio power */
- IPAQ_EGPIO_QMUTE, /* Audio muting */
+ IPAQ_EGPIO_AUDIO_ON, /* Audio power */
+ IPAQ_EGPIO_QMUTE, /* Audio muting */
IPAQ_EGPIO_OPT_NVRAM_ON, /* Non-volatile RAM on extension sleeves (SPI interface) */
- IPAQ_EGPIO_OPT_ON, /* Power to extension sleeves */
- IPAQ_EGPIO_CARD_RESET, /* Reset PCMCIA cards on extension sleeve (???) */
- IPAQ_EGPIO_OPT_RESET, /* Reset option pack (???) */
- IPAQ_EGPIO_IR_ON, /* IR sensor/emitter power */
- IPAQ_EGPIO_IR_FSEL, /* IR speed selection 1->fast, 0->slow */
- IPAQ_EGPIO_RS232_ON, /* Maxim RS232 chip power */
- IPAQ_EGPIO_VPP_ON, /* Turn on power to flash programming */
+ IPAQ_EGPIO_OPT_ON, /* Power to extension sleeves */
+ IPAQ_EGPIO_CARD_RESET, /* Reset PCMCIA cards on extension sleeve (???) */
+ IPAQ_EGPIO_OPT_RESET, /* Reset option pack (???) */
+ IPAQ_EGPIO_IR_ON, /* IR sensor/emitter power */
+ IPAQ_EGPIO_IR_FSEL, /* IR speed selection 1->fast, 0->slow */
+ IPAQ_EGPIO_RS232_ON, /* Maxim RS232 chip power */
+ IPAQ_EGPIO_VPP_ON, /* Turn on power to flash programming */
+ IPAQ_EGPIO_LCD_ENABLE, /* Enable/disable LCD controller */
};
struct ipaq_model_ops {
- enum ipaq_model model;
const char *generic_name;
- void (*initialize)(void);
- void (*control)(enum ipaq_egpio_type, int);
+ void (*control)(enum ipaq_egpio_type, int);
unsigned long (*read)(void);
+ void (*blank_callback)(int blank);
+ int (*pm_callback)(int req); /* Primary model callback */
+ int (*pm_callback_aux)(int req); /* Secondary callback (used by HAL modules) */
};
extern struct ipaq_model_ops ipaq_model_ops;
-static __inline__ enum ipaq_model h3600_model( void ) {
- return ipaq_model_ops.model;
-}
-
-static __inline__ const char * h3600_generic_name( void ) {
+static __inline__ const char * h3600_generic_name(void)
+{
return ipaq_model_ops.generic_name;
}
-static __inline__ void init_h3600_egpio( void ) {
- if (ipaq_model_ops.initialize)
- ipaq_model_ops.initialize();
-}
-
-static __inline__ void assign_h3600_egpio( enum ipaq_egpio_type x, int level ) {
+static __inline__ void assign_h3600_egpio(enum ipaq_egpio_type x, int level)
+{
if (ipaq_model_ops.control)
ipaq_model_ops.control(x,level);
}
-static __inline__ void clr_h3600_egpio( enum ipaq_egpio_type x ) {
+static __inline__ void clr_h3600_egpio(enum ipaq_egpio_type x)
+{
if (ipaq_model_ops.control)
ipaq_model_ops.control(x,0);
}
-static __inline__ void set_h3600_egpio( enum ipaq_egpio_type x ) {
+static __inline__ void set_h3600_egpio(enum ipaq_egpio_type x)
+{
if (ipaq_model_ops.control)
ipaq_model_ops.control(x,1);
}
-static __inline__ unsigned long read_h3600_egpio( void ) {
+static __inline__ unsigned long read_h3600_egpio(void)
+{
if (ipaq_model_ops.read)
return ipaq_model_ops.read();
return 0;
}
+static __inline__ int h3600_register_blank_callback(void (*f)(int))
+{
+ ipaq_model_ops.blank_callback = f;
+ return 0;
+}
+
+static __inline__ void h3600_unregister_blank_callback(void (*f)(int))
+{
+ ipaq_model_ops.blank_callback = NULL;
+}
+
+
+static __inline__ int h3600_register_pm_callback(int (*f)(int))
+{
+ ipaq_model_ops.pm_callback_aux = f;
+ return 0;
+}
+
+static __inline__ void h3600_unregister_pm_callback(int (*f)(int))
+{
+ ipaq_model_ops.pm_callback_aux = NULL;
+}
+
+static __inline__ int h3600_power_management(int req)
+{
+ if (ipaq_model_ops.pm_callback)
+ return ipaq_model_ops.pm_callback(req);
+ return 0;
+}
+
#endif /* ASSEMBLY */
#endif /* _INCLUDE_H3600_H_ */
diff --git a/include/asm-arm/arch-sa1100/irqs.h b/include/asm-arm/arch-sa1100/irqs.h
index cc5dcda895c6..66e4f596c739 100644
--- a/include/asm-arm/arch-sa1100/irqs.h
+++ b/include/asm-arm/arch-sa1100/irqs.h
@@ -108,18 +108,18 @@
#define AUDDTS (IRQ_BOARD_END + 40)
#define AUDRDD (IRQ_BOARD_END + 41)
#define AUDSTO (IRQ_BOARD_END + 42)
-#define USBPWR (IRQ_BOARD_END + 43)
-#define NIRQHCIM (IRQ_BOARD_END + 44)
-#define IRQHCIBUFFACC (IRQ_BOARD_END + 45)
-#define IRQHCIRMTWKP (IRQ_BOARD_END + 46)
-#define NHCIMFCIR (IRQ_BOARD_END + 47)
-#define USB_PORT_RESUME (IRQ_BOARD_END + 48)
-#define S0_READY_NINT (IRQ_BOARD_END + 49)
-#define S1_READY_NINT (IRQ_BOARD_END + 50)
-#define S0_CD_VALID (IRQ_BOARD_END + 51)
-#define S1_CD_VALID (IRQ_BOARD_END + 52)
-#define S0_BVD1_STSCHG (IRQ_BOARD_END + 53)
-#define S1_BVD1_STSCHG (IRQ_BOARD_END + 54)
+#define IRQ_USBPWR (IRQ_BOARD_END + 43)
+#define IRQ_NHCIM (IRQ_BOARD_END + 44)
+#define IRQ_HCIBUFFACC (IRQ_BOARD_END + 45)
+#define IRQ_HCIRMTWKP (IRQ_BOARD_END + 46)
+#define IRQ_NHCIMFCIR (IRQ_BOARD_END + 47)
+#define IRQ_USB_PORT_RESUME (IRQ_BOARD_END + 48)
+#define IRQ_S0_READY_NINT (IRQ_BOARD_END + 49)
+#define IRQ_S1_READY_NINT (IRQ_BOARD_END + 50)
+#define IRQ_S0_CD_VALID (IRQ_BOARD_END + 51)
+#define IRQ_S1_CD_VALID (IRQ_BOARD_END + 52)
+#define IRQ_S0_BVD1_STSCHG (IRQ_BOARD_END + 53)
+#define IRQ_S1_BVD1_STSCHG (IRQ_BOARD_END + 54)
/*
* Figure out the MAX IRQ number.
@@ -129,7 +129,7 @@
* Otherwise, we have the standard IRQs only.
*/
#ifdef CONFIG_SA1111
-#define NR_IRQS (S1_BVD1_STSCHG + 1)
+#define NR_IRQS (IRQ_S1_BVD1_STSCHG + 1)
#elif defined(CONFIG_SA1100_GRAPHICSCLIENT) || \
defined(CONFIG_SA1100_GRAPHICSMASTER) || \
defined(CONFIG_SA1100_H3800)
diff --git a/include/asm-arm/hardware/sa1111.h b/include/asm-arm/hardware/sa1111.h
index c334e869f8ef..311e4832eb2f 100644
--- a/include/asm-arm/hardware/sa1111.h
+++ b/include/asm-arm/hardware/sa1111.h
@@ -64,18 +64,10 @@
#define SA1111_SMCR 0x0004
#define SA1111_SKID 0x0008
-#define _SBI_SKCR _SA1111(SA1111_SKCR)
-#define _SBI_SMCR _SA1111(SA1111_SMCR)
-#define _SBI_SKID _SA1111(SA1111_SKID)
-
-#if LANGUAGE == C
-
#define SBI_SKCR __CCREG(SA1111_SKCR)
#define SBI_SMCR __CCREG(SA1111_SMCR)
#define SBI_SKID __CCREG(SA1111_SKID)
-#endif /* LANGUAGE == C */
-
#define SKCR_PLL_BYPASS (1<<0)
#define SKCR_RCLKEN (1<<1)
#define SKCR_SLEEP (1<<2)
@@ -135,22 +127,10 @@
#define SA1111_SKPMC 0x020c
#define SA1111_SKPTC 0x0210
#define SA1111_SKPEN0 0x0214
-#define SA1111_SKPWN0 0x0218
+#define SA1111_SKPWM0 0x0218
#define SA1111_SKPEN1 0x021c
#define SA1111_SKPWM1 0x0220
-#define _SKPCR _SA1111(SA1111_SKPCR)
-#define _SKCDR _SA1111(SA1111_SKCDR)
-#define _SKAUD _SA1111(SA1111_SKAUD)
-#define _SKPMC _SA1111(SA1111_SKPMC)
-#define _SKPTC _SA1111(SA1111_SKPTC)
-#define _SKPEN0 _SA1111(SA1111_SKPEN0)
-#define _SKPWM0 _SA1111(SA1111_SKPWM0)
-#define _SKPEN1 _SA1111(SA1111_SKPEN1)
-#define _SKPWM1 _SA1111(SA1111_SKPWM1)
-
-#if LANGUAGE == C
-
#define SKPCR __CCREG(SA1111_SKPCR)
#define SKCDR __CCREG(SA1111_SKCDR)
#define SKAUD __CCREG(SA1111_SKAUD)
@@ -161,8 +141,6 @@
#define SKPEN1 __CCREG(SA1111_SKPEN1)
#define SKPWM1 __CCREG(SA1111_SKPWM1)
-#endif /* LANGUAGE == C */
-
#define SKPCR_UCLKEN (1<<0)
#define SKPCR_ACCLKEN (1<<1)
#define SKPCR_I2SCLKEN (1<<2)
@@ -176,21 +154,14 @@
/*
* USB Host controller
*/
-#define _USB_OHCI_OP_BASE _SA1111( 0x400 )
-#define _USB_STATUS _SA1111( 0x518 )
-#define _USB_RESET _SA1111( 0x51c )
-#define _USB_INTERRUPTEST _SA1111( 0x520 )
-
-#define _USB_EXTENT (_USB_INTERRUPTEST - _USB_OHCI_OP_BASE + 4)
-
-#if LANGUAGE == C
-
-#define USB_OHCI_OP_BASE __CCREG(0x0400)
-#define USB_STATUS __CCREG(0x0518)
-#define USB_RESET __CCREG(0x051c)
-#define USB_INTERRUPTEST __CCReG(0x0520)
+#define SA1111_USB 0x0400
-#endif /* LANGUAGE == C */
+/*
+ * Offsets from SA1111_USB_BASE
+ */
+#define SA1111_USB_STATUS 0x0118
+#define SA1111_USB_RESET 0x011c
+#define SA1111_USB_IRQTEST 0x0120
#define USB_RESET_FORCEIFRESET (1 << 0)
#define USB_RESET_FORCEHCRESET (1 << 1)
@@ -451,82 +422,56 @@
* WAKE_POL0 Wake-up polarity selection 0
* WAKE_POL1 Wake-up polarity selection 1
*/
+#define SA1111_INTC 0x1600
-#define SA1111_INTTEST0 0x1600
-#define SA1111_INTTEST1 0x1604
-#define SA1111_INTEN0 0x1608
-#define SA1111_INTEN1 0x160c
-#define SA1111_INTPOL0 0x1610
-#define SA1111_INTPOL1 0x1614
-#define SA1111_INTTSTSEL 0x1618
-#define SA1111_INTSTATCLR0 0x161c
-#define SA1111_INTSTATCLR1 0x1620
-#define SA1111_INTSET0 0x1624
-#define SA1111_INTSET1 0x1628
-#define SA1111_WAKE_EN0 0x162c
-#define SA1111_WAKE_EN1 0x1630
-#define SA1111_WAKE_POL0 0x1634
-#define SA1111_WAKE_POL1 0x1638
-
-#define _INTTEST0 _SA1111(SA1111_INTTEST0)
-#define _INTTEST1 _SA1111(SA1111_INTTEST1)
-#define _INTEN0 _SA1111(SA1111_INTEN0)
-#define _INTEN1 _SA1111(SA1111_INTEN1)
-#define _INTPOL0 _SA1111(SA1111_INTPOL0)
-#define _INTPOL1 _SA1111(SA1111_INTPOL1)
-#define _INTTSTSEL _SA1111(SA1111_INTTSTSEL)
-#define _INTSTATCLR0 _SA1111(SA1111_INTSTATCLR0)
-#define _INTSTATCLR1 _SA1111(SA1111_INTSTATCLR1)
-#define _INTSET0 _SA1111(SA1111_INTSET0)
-#define _INTSET1 _SA1111(SA1111_INTSET1)
-#define _WAKE_EN0 _SA1111(SA1111_WAKE_EN0)
-#define _WAKE_EN1 _SA1111(SA1111_WAKE_EN1)
-#define _WAKE_POL0 _SA1111(SA1111_WAKE_POL0)
-#define _WAKE_POL1 _SA1111(SA1111_WAKE_POL1)
-
-#if LANGUAGE == C
-
-#define INTTEST0 __CCREG(SA1111_INTTEST0)
-#define INTTEST1 __CCREG(SA1111_INTTEST1)
-#define INTEN0 __CCREG(SA1111_INTEN0)
-#define INTEN1 __CCREG(SA1111_INTEN1)
-#define INTPOL0 __CCREG(SA1111_INTPOL0)
-#define INTPOL1 __CCREG(SA1111_INTPOL1)
-#define INTTSTSEL __CCREG(SA1111_INTTSTSEL)
-#define INTSTATCLR0 __CCREG(SA1111_INTSTATCLR0)
-#define INTSTATCLR1 __CCREG(SA1111_INTSTATCLR1)
-#define INTSET0 __CCREG(SA1111_INTSET0)
-#define INTSET1 __CCREG(SA1111_INTSET1)
-#define WAKE_EN0 __CCREG(SA1111_WAKE_EN0)
-#define WAKE_EN1 __CCREG(SA1111_WAKE_EN1)
-#define WAKE_POL0 __CCREG(SA1111_WAKE_POL0)
-#define WAKE_POL1 __CCREG(SA1111_WAKE_POL1)
-
-#endif /* LANGUAGE == C */
+/*
+ * These are offsets from the above base.
+ */
+#define SA1111_INTTEST0 0x0000
+#define SA1111_INTTEST1 0x0004
+#define SA1111_INTEN0 0x0008
+#define SA1111_INTEN1 0x000c
+#define SA1111_INTPOL0 0x0010
+#define SA1111_INTPOL1 0x0014
+#define SA1111_INTTSTSEL 0x0018
+#define SA1111_INTSTATCLR0 0x001c
+#define SA1111_INTSTATCLR1 0x0020
+#define SA1111_INTSET0 0x0024
+#define SA1111_INTSET1 0x0028
+#define SA1111_WAKEEN0 0x002c
+#define SA1111_WAKEEN1 0x0030
+#define SA1111_WAKEPOL0 0x0034
+#define SA1111_WAKEPOL1 0x0038
+
+#define INTTEST0 __CCREG(SA1111_INTC + SA1111_INTTEST0)
+#define INTTEST1 __CCREG(SA1111_INTC + SA1111_INTTEST1)
+#define INTEN0 __CCREG(SA1111_INTC + SA1111_INTEN0)
+#define INTEN1 __CCREG(SA1111_INTC + SA1111_INTEN1)
+#define INTPOL0 __CCREG(SA1111_INTC + SA1111_INTPOL0)
+#define INTPOL1 __CCREG(SA1111_INTC + SA1111_INTPOL1)
+#define INTTSTSEL __CCREG(SA1111_INTC + SA1111_INTTSTSEL)
+#define INTSTATCLR0 __CCREG(SA1111_INTC + SA1111_INTSTATCLR0)
+#define INTSTATCLR1 __CCREG(SA1111_INTC + SA1111_INTSTATCLR1)
+#define INTSET0 __CCREG(SA1111_INTC + SA1111_INTSET0)
+#define INTSET1 __CCREG(SA1111_INTC + SA1111_INTSET1)
+#define WAKE_EN0 __CCREG(SA1111_INTC + SA1111_WAKEEN0)
+#define WAKE_EN1 __CCREG(SA1111_INTC + SA1111_WAKEEN1)
+#define WAKE_POL0 __CCREG(SA1111_INTC + SA1111_WAKEPOL0)
+#define WAKE_POL1 __CCREG(SA1111_INTC + SA1111_WAKEPOL1)
/*
* PS/2 Trackpad and Mouse Interfaces
*
- * Registers (prefix kbd applies to trackpad interface, mse to mouse)
- * KBDCR Control Register
- * KBDSTAT Status Register
- * KBDDATA Transmit/Receive Data register
- * KBDCLKDIV Clock Division Register
- * KBDPRECNT Clock Precount Register
- * KBDTEST1 Test register 1
- * KBDTEST2 Test register 2
- * KBDTEST3 Test register 3
- * KBDTEST4 Test register 4
- * MSECR
- * MSESTAT
- * MSEDATA
- * MSECLKDIV
- * MSEPRECNT
- * MSETEST1
- * MSETEST2
- * MSETEST3
- * MSETEST4
- *
+ * Registers
+ * PS2CR Control Register
+ * PS2STAT Status Register
+ * PS2DATA Transmit/Receive Data register
+ * PS2CLKDIV Clock Division Register
+ * PS2PRECNT Clock Precount Register
+ * PS2TEST1 Test register 1
+ * PS2TEST2 Test register 2
+ * PS2TEST3 Test register 3
+ * PS2TEST4 Test register 4
*/
#define SA1111_KBD 0x0a00
@@ -564,17 +509,14 @@
* PCSSR Sleep State Register
*/
-#define _PCCR _SA1111( 0x1800 )
-#define _PCSSR _SA1111( 0x1804 )
-#define _PCSR _SA1111( 0x1808 )
-
-#if LANGUAGE == C
-
-#define PCCR __CCREG(0x1800)
-#define PCSSR __CCREG(0x1804)
-#define PCSR __CCREG(0x1808)
+#define SA1111_PCMCIA 0x1600
-#endif /* LANGUAGE == C */
+/*
+ * These are offsets from the above base.
+ */
+#define SA1111_PCCR 0x0000
+#define SA1111_PCSSR 0x0004
+#define SA1111_PCSR 0x0008
#define PCSR_S0_READY (1<<0)
#define PCSR_S1_READY (1<<1)
@@ -603,21 +545,61 @@
#define PCSSR_S0_SLEEP (1<<0)
#define PCSSR_S1_SLEEP (1<<1)
-struct sa1111_device {
+
+
+
+extern struct bus_type sa1111_bus_type;
+
+#define SA1111_DEVID_SBI 0
+#define SA1111_DEVID_SK 1
+#define SA1111_DEVID_USB 2
+#define SA1111_DEVID_SAC 3
+#define SA1111_DEVID_SSP 4
+#define SA1111_DEVID_PS2 5
+#define SA1111_DEVID_GPIO 6
+#define SA1111_DEVID_INT 7
+#define SA1111_DEVID_PCMCIA 8
+
+struct sa1111_dev {
struct device dev;
- struct resource resource;
- void *base;
+ unsigned int devid;
+ struct resource res;
+ void *mapbase;
+ unsigned int skpcr_mask;
+ unsigned int irq[6];
};
-extern struct sa1111_device *sa1111;
+#define SA1111_DEV(_d) container_of((_d), struct sa1111_dev, dev)
-int sa1111_check_dma_bug(dma_addr_t addr);
+struct sa1111_driver {
+ struct device_driver drv;
+ unsigned int devid;
+};
+
+#define SA1111_DRV(_d) container_of((_d), struct sa1111_driver, drv)
+
+#define SA1111_DRIVER_NAME(_sadev) ((_sadev)->dev.driver->name)
+
+/*
+ * Probe for a SA1111 chip.
+ */
+extern int sa1111_init(unsigned long phys, unsigned int irq);
/*
* These frob the SKPCR register.
*/
-void sa1111_enable_device(unsigned int mask);
-void sa1111_disable_device(unsigned int mask);
+void sa1111_enable_device(struct sa1111_dev *);
+void sa1111_disable_device(struct sa1111_dev *);
+
+unsigned int sa1111_pll_clock(struct sa1111_dev *);
+#define SA1111_AUDIO_ACLINK 0
+#define SA1111_AUDIO_I2S 1
+
+void sa1111_select_audio_mode(struct sa1111_dev *sadev, int mode);
+int sa1111_set_audio_rate(struct sa1111_dev *sadev, int rate);
+int sa1111_get_audio_rate(struct sa1111_dev *sadev);
+
+int sa1111_check_dma_bug(dma_addr_t addr);
#endif /* _ASM_ARCH_SA1111 */
diff --git a/include/asm-arm/pci.h b/include/asm-arm/pci.h
index 70fcb5c4d021..3a7310558dd2 100644
--- a/include/asm-arm/pci.h
+++ b/include/asm-arm/pci.h
@@ -27,15 +27,11 @@ void sa1111_dma_sync_sg(struct pci_dev *, struct scatterlist *, int, int);
#ifdef CONFIG_SA1111
#define SA1111_FAKE_PCIDEV ((struct pci_dev *) 1111)
-
-static inline int dev_is_sa1111(const struct pci_dev *dev)
-{
- return (dev == SA1111_FAKE_PCIDEV);
-}
+#define dev_is_sa1111(dev) (dev == SA1111_FAKE_PCIDEV)
#else
-static inline int dev_is_sa1111(const struct pci_dev *dev) { return 0; }
+#define dev_is_sa1111(dev) (0)
#endif
diff --git a/include/linux/auto_fs.h b/include/linux/auto_fs.h
index 39b120cd2e12..13bc53bc06f5 100644
--- a/include/linux/auto_fs.h
+++ b/include/linux/auto_fs.h
@@ -45,7 +45,7 @@
* If so, 32-bit user-space code should be backwards compatible.
*/
-#if defined(__sparc__) || defined(__mips__) || defined(__x86_64) \
+#if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) \
|| defined(__powerpc__) || defined(__s390__)
typedef unsigned int autofs_wqt_t;
#else
diff --git a/include/linux/module.h b/include/linux/module.h
index c71778e38536..4dc669b060fb 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -253,6 +253,7 @@ static const struct gtype##_id * __module_##gtype##_table \
* software modules
*
* "GPL" [GNU Public License v2 or later]
+ * "GPL v2" [GNU Public License v2]
* "GPL and additional rights" [GNU Public License v2 rights and more]
* "Dual BSD/GPL" [GNU Public License v2 or BSD license choice]
* "Dual MPL/GPL" [GNU Public License v2 or Mozilla license choice]
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 5d323aa0d36e..5dbc3cb115f7 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -84,6 +84,7 @@
#include <linux/list.h> /* for struct list_head */
#include <linux/device.h> /* for struct device */
#include <linux/fs.h> /* for struct file_operations */
+#include <linux/completion.h> /* for struct completion */
static __inline__ void wait_ms(unsigned int ms)
@@ -452,9 +453,9 @@ static inline int usb_make_path (struct usb_device *dev, char *buf, size_t size)
* User mode code can read these tables to choose which modules to load.
* Declare the table as a MODULE_DEVICE_TABLE.
*
- * The third probe() parameter will point to a matching entry from this
- * table. (Null value reserved.) Use the driver_data field for each
- * match to hold information tied to that match: device quirks, etc.
+ * A probe() parameter will point to a matching entry from this table.
+ * Use the driver_info field for each match to hold information tied
+ * to that match: device quirks, etc.
*
* Terminate the driver's table with an all-zeroes entry.
* Use the flag values to control which fields are compared.
@@ -604,17 +605,14 @@ struct usb_device_id {
* @name: The driver name should be unique among USB drivers,
* and should normally be the same as the module name.
* @probe: Called to see if the driver is willing to manage a particular
- * interface on a device. The probe routine returns a handle that
- * will later be provided to disconnect(), or a null pointer to
- * indicate that the driver will not handle the interface.
- * The handle is normally a pointer to driver-specific data.
- * If the probe() routine needs to access the interface
- * structure itself, use usb_ifnum_to_if() to make sure it's using
- * the right one.
+ * interface on a device. If it is, probe returns zero and uses
+ * dev_set_drvdata() to associate driver-specific data with the
+ * interface. It may also use usb_set_interface() to specify the
+ * appropriate altsetting. If unwilling to manage the interface,
+ * return a negative errno value.
* @disconnect: Called when the interface is no longer accessible, usually
- * because its device has been (or is being) disconnected. The
- * handle passed is what was returned by probe(), or was provided
- * to usb_driver_claim_interface().
+ * because its device has been (or is being) disconnected or the
+ * driver module is being unloaded.
* @ioctl: Used for drivers that want to talk to userspace through
* the "usbfs" filesystem. This lets devices provide ways to
* expose information to user space regardless of where they
@@ -648,7 +646,7 @@ struct usb_driver {
void (*disconnect) (struct usb_interface *intf);
- int (*ioctl) (struct usb_device *dev, unsigned int code, void *buf);
+ int (*ioctl) (struct usb_interface *intf, unsigned int code, void *buf);
const struct usb_device_id *id_table;
@@ -1074,6 +1072,57 @@ extern int usb_set_interface(struct usb_device *dev, int ifnum, int alternate);
#define USB_CTRL_SET_TIMEOUT 3
+
+/**
+ * struct usb_sg_request - support for scatter/gather I/O
+ * @status: zero indicates success, else negative errno
+ * @bytes: counts bytes transferred.
+ *
+ * These requests are initialized using usb_sg_init(), and then are used
+ * as request handles passed to usb_sg_wait() or usb_sg_cancel(). Most
+ * members of the request object aren't for driver access.
+ *
+ * The status and bytecount values are valid only after usb_sg_wait()
+ * returns. If the status is zero, then the bytecount matches the total
+ * from the request.
+ *
+ * After an error completion, drivers may need to clear a halt condition
+ * on the endpoint.
+ */
+struct usb_sg_request {
+ int status;
+ size_t bytes;
+
+ // members not documented above are private to usbcore,
+ // and are not provided for driver access!
+ spinlock_t lock;
+
+ struct usb_device *dev;
+ int pipe;
+ struct scatterlist *sg;
+ int nents;
+
+ int entries;
+ struct urb **urbs;
+
+ int count;
+ struct completion complete;
+};
+
+int usb_sg_init (
+ struct usb_sg_request *io,
+ struct usb_device *dev,
+ unsigned pipe,
+ unsigned period,
+ struct scatterlist *sg,
+ int nents,
+ size_t length,
+ int mem_flags
+);
+void usb_sg_cancel (struct usb_sg_request *io);
+void usb_sg_wait (struct usb_sg_request *io);
+
+
/* -------------------------------------------------------------------------- */
/*
diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h
index de18e956f47b..84653713900c 100644
--- a/include/linux/usbdevice_fs.h
+++ b/include/linux/usbdevice_fs.h
@@ -108,7 +108,7 @@ struct usbdevfs_urb {
struct usbdevfs_iso_packet_desc iso_frame_desc[0];
};
-/* ioctls for talking to drivers in the usbcore module: */
+/* ioctls for talking directly to drivers */
struct usbdevfs_ioctl {
int ifno; /* interface 0..N ; negative numbers reserved */
int ioctl_code; /* MUST encode size + direction of data so the