]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
Merge branch 'for-2.6.19' of git://brick.kernel.dk/data/git/linux-2.6-block
authorLinus Torvalds <torvalds@g5.osdl.org>
Wed, 4 Oct 2006 17:44:01 +0000 (10:44 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 4 Oct 2006 17:44:01 +0000 (10:44 -0700)
* 'for-2.6.19' of git://brick.kernel.dk/data/git/linux-2.6-block:
  [PATCH] Document bi_sector and sector_t
  [PATCH] helper function for retrieving scsi_cmd given host based block layer tag

214 files changed:
Documentation/video4linux/CARDLIST.saa7134
arch/alpha/kernel/setup.c
arch/alpha/kernel/systbls.S
arch/arm/configs/at91rm9200dk_defconfig
arch/arm/configs/at91rm9200ek_defconfig
arch/arm/configs/ateb9200_defconfig
arch/arm/configs/carmeva_defconfig
arch/arm/configs/csb337_defconfig
arch/arm/configs/csb637_defconfig
arch/arm/configs/kafa_defconfig
arch/arm/configs/kb9202_defconfig
arch/arm/configs/onearm_defconfig
arch/arm/kernel/crunch.c
arch/arm/kernel/iwmmxt-notifier.c
arch/arm/mach-at91rm9200/board-1arm.c
arch/arm/mach-at91rm9200/board-carmeva.c
arch/arm/mach-at91rm9200/board-eb9200.c
arch/arm/mach-at91rm9200/board-kafa.c
arch/arm/mach-at91rm9200/board-kb9202.c
arch/arm/mach-at91rm9200/devices.c
arch/arm/mach-ep93xx/edb9302.c
arch/arm/mach-ep93xx/edb9312.c
arch/arm/mach-ep93xx/edb9315.c
arch/arm/mach-ep93xx/edb9315a.c
arch/arm/mach-lh7a40x/clcd.c
arch/arm/mach-lh7a40x/clocks.c
arch/arm/mach-omap2/pm-domain.c
arch/arm/mach-pnx4008/gpio.c
arch/arm/mach-pnx4008/sleep.S
arch/arm/mach-pnx4008/time.c
arch/arm/mach-pxa/leds-trizeps4.c
arch/arm/tools/gen-mach-types
arch/arm26/lib/ecard.S
arch/arm26/lib/io-acorn.S
arch/avr32/boards/atstk1000/atstk1002.c
arch/avr32/configs/atstk1002_defconfig
arch/avr32/kernel/setup.c
arch/avr32/mach-at32ap/at32ap.c
arch/avr32/mach-at32ap/at32ap7000.c
arch/frv/kernel/time.c
arch/h8300/kernel/time.c
arch/i386/lib/semaphore.S
arch/m32r/mm/mmu.S
arch/m68k/kernel/time.c
arch/m68knommu/platform/532x/config.c
arch/m68knommu/platform/68328/romvec.S
arch/mips/Kconfig
arch/mips/philips/pnx8550/common/int.c
arch/mips/philips/pnx8550/common/platform.c
arch/mips/philips/pnx8550/common/prom.c
arch/mips/philips/pnx8550/common/setup.c
arch/parisc/kernel/head.S
arch/parisc/kernel/syscall.S
arch/powerpc/platforms/83xx/mpc834x_itx.c
arch/powerpc/platforms/85xx/mpc85xx_ads.h
arch/powerpc/platforms/85xx/mpc85xx_cds.c
arch/powerpc/platforms/cell/cbe_regs.c
arch/powerpc/platforms/cell/ras.c
arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
arch/powerpc/platforms/pasemi/setup.c
arch/powerpc/platforms/pasemi/time.c
arch/powerpc/sysdev/tsi108_dev.c
arch/ppc/amiga/time.c
arch/ppc/platforms/4xx/cpci405.h
arch/s390/kernel/kprobes.c
arch/sparc/kernel/ioport.c
arch/sparc/kernel/of_device.c
arch/sparc64/kernel/auxio.c
arch/sparc64/kernel/of_device.c
arch/sparc64/kernel/prom.c
arch/um/drivers/hostaudio_kern.c
arch/um/drivers/net_kern.c
arch/um/drivers/slip_kern.c
arch/um/drivers/ssl.c
arch/um/drivers/stdio_console.c
arch/um/drivers/ubd_kern.c
arch/um/include/mconsole_kern.h
arch/um/include/mode_kern.h
arch/um/include/skas/mmu-skas.h
arch/um/include/sysdep-ppc/ptrace.h
arch/um/include/um_uaccess.h
arch/um/kernel/init_task.c
arch/um/kernel/irq.c
arch/um/kernel/ksyms.c
arch/um/kernel/signal.c
arch/um/kernel/skas/mem.c
arch/um/kernel/skas/mmu.c
arch/um/kernel/skas/tlb.c
arch/um/kernel/smp.c
arch/um/kernel/sysrq.c
arch/um/kernel/trap.c
arch/um/kernel/tt/gdb_kern.c
arch/um/kernel/tt/mem.c
arch/um/kernel/um_arch.c
arch/um/sys-i386/ldt.c
arch/um/sys-i386/sysrq.c
arch/um/sys-i386/tls.c
arch/v850/kernel/time.c
arch/x86_64/boot/video.S
arch/x86_64/ia32/ia32_binfmt.c
arch/x86_64/kernel/pci-calgary.c
arch/x86_64/kernel/tce.c
arch/x86_64/kernel/x8664_ksyms.c
arch/x86_64/lib/copy_page.S
arch/x86_64/lib/delay.c
arch/x86_64/lib/memcpy.S
arch/x86_64/lib/memset.S
arch/x86_64/lib/thunk.S
drivers/block/cciss.c
drivers/block/cpqarray.c
drivers/char/briq_panel.c
drivers/char/ftape/lowlevel/fdc-io.c
drivers/char/ftape/zftape/zftape-rw.c
drivers/char/ftape/zftape/zftape-rw.h
drivers/char/hw_random/ixp4xx-rng.c
drivers/char/mspec.c
drivers/char/nsc_gpio.c
drivers/char/pcmcia/synclink_cs.c
drivers/char/sx.c
drivers/char/synclink.c
drivers/char/watchdog/iTCO_wdt.c
drivers/char/watchdog/omap_wdt.c
drivers/char/watchdog/pcwd.c
drivers/char/watchdog/pcwd_pci.c
drivers/char/watchdog/pnx4008_wdt.c
drivers/hwmon/w83791d.c
drivers/i2c/busses/i2c-ocores.c
drivers/ide/pci/generic.c
drivers/ide/pci/jmicron.c
drivers/ide/pci/rz1000.c
drivers/infiniband/hw/ipath/ipath_mmap.c
drivers/leds/leds-ams-delta.c
drivers/media/Kconfig
drivers/media/dvb/dvb-usb/Kconfig
drivers/media/dvb/dvb-usb/usb-urb.c
drivers/media/radio/radio-gemtek-pci.c
drivers/media/video/saa7134/saa7134-cards.c
drivers/media/video/saa7134/saa7134-dvb.c
drivers/media/video/saa7134/saa7134-tvaudio.c
drivers/media/video/saa7134/saa7134-video.c
drivers/media/video/saa7134/saa7134.h
drivers/media/video/tveeprom.c
drivers/media/video/zoran_card.c
drivers/media/video/zr36120.c
drivers/net/arm/ep93xx_eth.c
drivers/net/fs_enet/mii-fec.c
drivers/net/pcnet32.c
drivers/net/phy/fixed.c
drivers/net/ucc_geth_phy.c
drivers/rtc/rtc-max6902.c
drivers/scsi/aic94xx/aic94xx_init.c
drivers/scsi/imm.h
drivers/scsi/ppa.h
drivers/serial/Kconfig
drivers/serial/Makefile
drivers/serial/at91_serial.c [deleted file]
drivers/serial/atmel_serial.c [new file with mode: 0644]
drivers/serial/atmel_serial.h [new file with mode: 0644]
drivers/serial/cpm_uart/cpm_uart.h
drivers/serial/netx-serial.c
drivers/serial/sh-sci.c
drivers/serial/sh-sci.h
drivers/spi/spi_s3c24xx.c
drivers/spi/spi_s3c24xx_gpio.c
drivers/usb/core/generic.c
drivers/usb/gadget/gmidi.c
drivers/usb/host/u132-hcd.c
drivers/usb/input/usbtouchscreen.c
drivers/usb/misc/appledisplay.c
drivers/usb/misc/ftdi-elan.c
drivers/usb/misc/sisusbvga/sisusb.c
drivers/usb/misc/sisusbvga/sisusb_con.c
drivers/video/intelfb/intelfb_i2c.c
fs/isofs/namei.c
fs/nfs/client.c
fs/nfs/getroot.c
fs/nfs/namespace.c
fs/nfs/nfs4namespace.c
fs/nfs/nfsroot.c
fs/nfs/super.c
fs/reiserfs/file.c
include/asm-arm/arch-at91rm9200/at91rm9200_usart.h [deleted file]
include/asm-arm/arch-at91rm9200/board.h
include/asm-arm/arch-at91rm9200/hardware.h
include/asm-arm/arch-lh7a40x/clocks.h
include/asm-arm/mach/serial_at91.h
include/asm-arm/pgtable-nommu.h
include/asm-avr32/arch-at32ap/at91rm9200_usart.h [deleted file]
include/asm-avr32/arch-at32ap/board.h
include/asm-avr32/arch-at32ap/init.h
include/asm-avr32/mach/serial_at91.h
include/asm-i386/alternative-asm.i
include/asm-i386/frame.i
include/asm-mips/mach-pnx8550/uart.h
include/asm-powerpc/irq.h
include/asm-powerpc/pci-bridge.h
include/asm-sparc64/compat_signal.h
include/asm-x86_64/alternative-asm.i
include/linux/Kbuild
include/linux/config.h
include/linux/serial_core.h
include/net/netdma.h
init/do_mounts.h
kernel/rtmutex-debug.c
kernel/rtmutex-tester.c
mm/filemap.h
mm/slab.c
mm/vmstat.c
net/atm/lec.h
net/core/fib_rules.c
net/ipv6/fib6_rules.c
net/ipv6/mip6.c
sound/aoa/soundbus/sysfs.c
sound/core/memory.c

index 6fb82ac3bef09e6c40aa48c76b37f42d21ad9c5c..53ce6a39083c22036bd7b52678da54cbc4a27d20 100644 (file)
@@ -98,3 +98,4 @@
  97 -> LifeView FlyDVB-S /Acorp TV134DS         [5168:0300,4e42:0300]
  98 -> Proteus Pro 2309                         [0919:2003]
  99 -> AVerMedia TV Hybrid A16AR                [1461:2c00]
+100 -> Asus Europa2 OEM                         [1043:4860]
index fd4a8fa0c93d70ac5092778fecbf32f9b16d8e6e..a94e6d93e2eedb695f83e718a2fd3eba1b674807 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/a.out.h>
 #include <linux/screen_info.h>
 #include <linux/delay.h>
-#include <linux/config.h>      /* CONFIG_ALPHA_LCA etc */
 #include <linux/mc146818rtc.h>
 #include <linux/console.h>
 #include <linux/cpu.h>
index 4342cea1a92673c8d439b75c21493857a813159f..f6cfe8ce3f966b68cd5827c215eca6df94ffc57e 100644 (file)
@@ -4,7 +4,6 @@
  * The system call table. 
  */
 
-#include <linux/config.h>                      /* CONFIG_OSF4_COMPAT */
 #include <asm/unistd.h>
 
        .data
index 4f3d8d37741e0c13156886c04b471ccbfbd4086f..c82e4667f45e25e4a9e2efb3e922b77efe6df987 100644 (file)
@@ -553,9 +553,9 @@ CONFIG_HW_CONSOLE=y
 #
 # Non-8250 serial port support
 #
-CONFIG_SERIAL_AT91=y
-CONFIG_SERIAL_AT91_CONSOLE=y
-# CONFIG_SERIAL_AT91_TTYAT is not set
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
+# CONFIG_SERIAL_ATMEL_TTYAT is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
index 08b5dc38876f2eafb6218b71a64fe85910484ea8..b983fc59aa42b437d42aec4af7bc6795819f23b5 100644 (file)
@@ -534,9 +534,9 @@ CONFIG_HW_CONSOLE=y
 #
 # Non-8250 serial port support
 #
-CONFIG_SERIAL_AT91=y
-CONFIG_SERIAL_AT91_CONSOLE=y
-# CONFIG_SERIAL_AT91_TTYAT is not set
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
+# CONFIG_SERIAL_ATMEL_TTYAT is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
index bee7813d040e8c7360deb5c4a496cc1da299ed82..15e6b0bbbde8af55b646d579a5e13a7887bfef2d 100644 (file)
@@ -656,9 +656,9 @@ CONFIG_HW_CONSOLE=y
 #
 # Non-8250 serial port support
 #
-CONFIG_SERIAL_AT91=y
-CONFIG_SERIAL_AT91_CONSOLE=y
-# CONFIG_SERIAL_AT91_TTYAT is not set
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
+# CONFIG_SERIAL_ATMEL_TTYAT is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
index 8a075c8ecc63d38a1839af27621dd357cca378ff..d24ae8777c35d2b4d20bc77b1d012a71cc662ca2 100644 (file)
@@ -455,8 +455,8 @@ CONFIG_HW_CONSOLE=y
 #
 # Non-8250 serial port support
 #
-CONFIG_SERIAL_AT91=y
-CONFIG_SERIAL_AT91_CONSOLE=y
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
index cf3fa5cb26e4174bdcc5ba01180035fb3e80561c..a2d6fd398f16b4acea1abd03b21e6f0e2e85a74d 100644 (file)
@@ -591,9 +591,9 @@ CONFIG_HW_CONSOLE=y
 #
 # Non-8250 serial port support
 #
-CONFIG_SERIAL_AT91=y
-CONFIG_SERIAL_AT91_CONSOLE=y
-# CONFIG_SERIAL_AT91_TTYAT is not set
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
+# CONFIG_SERIAL_ATMEL_TTYAT is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
index 640d70c1f066e35922eec29c7ffd1a545ca4be99..2a1ac6c60abc0a1ce184008f45fb0b28a2b56154 100644 (file)
@@ -591,9 +591,9 @@ CONFIG_HW_CONSOLE=y
 #
 # Non-8250 serial port support
 #
-CONFIG_SERIAL_AT91=y
-CONFIG_SERIAL_AT91_CONSOLE=y
-# CONFIG_SERIAL_AT91_TTYAT is not set
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
+# CONFIG_SERIAL_ATMEL_TTYAT is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
index 1db633e2c94073b158e485638585e9e3c54c3bd9..54fcd75779da062a12865aeb2e795f8127ddb206 100644 (file)
@@ -536,9 +536,9 @@ CONFIG_HW_CONSOLE=y
 #
 # Non-8250 serial port support
 #
-CONFIG_SERIAL_AT91=y
-CONFIG_SERIAL_AT91_CONSOLE=y
-# CONFIG_SERIAL_AT91_TTYAT is not set
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
+# CONFIG_SERIAL_ATMEL_TTYAT is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
index 45396e08719689f8b87bb2a673b5f6dd4a830b83..b4cd4b4148367887579d65b0b072b70365bdfdfa 100644 (file)
@@ -418,8 +418,8 @@ CONFIG_HW_CONSOLE=y
 #
 # Non-8250 serial port support
 #
-CONFIG_SERIAL_AT91=y
-CONFIG_SERIAL_AT91_CONSOLE=y
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
index 6a93e3aae10675f68158c655d9eafb15794ad6c8..cb1d94f9049ee4e447a9d5ae31840abc4289c884 100644 (file)
@@ -583,9 +583,9 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 #
 # Non-8250 serial port support
 #
-CONFIG_SERIAL_AT91=y
-CONFIG_SERIAL_AT91_CONSOLE=y
-# CONFIG_SERIAL_AT91_TTYAT is not set
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
+# CONFIG_SERIAL_ATMEL_TTYAT is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
index 748175921f9b362e6a36749e6667b865a04375a5..cec83783206e335a11f9a88f225ad3eba3ab6620 100644 (file)
@@ -10,7 +10,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/signal.h>
index 44a86c33796e5910bcb3ae29bd7ab6ef577644eb..0d1a1db40062990a60bdd93d691a047941a6d4c1 100644 (file)
@@ -15,7 +15,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/signal.h>
index 36eecd7161f5646d64d706513433b17becc3d232..971c3e2d8e367a6400b3f4c864af4fe611860346 100644 (file)
@@ -18,7 +18,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/init.h>
 #include <linux/mm.h>
index 50e513681ae6b1c3d897f3919cf7fed71888872c..98208740e7c52f1be6aa1f5d9a62c655fa7cd92c 100644 (file)
@@ -19,7 +19,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/init.h>
 #include <linux/mm.h>
index c6e0d51fbea0c31c0a230531b7b89c227cbb68b1..65e867ba2df371795177a3256eeb73eff0e576be 100644 (file)
@@ -19,7 +19,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/init.h>
 #include <linux/mm.h>
index 91e301924f2cc178f8f936478ac7a4d00229e189..6ef3c4879829010b2898d008ee326cd62e88c3fb 100644 (file)
@@ -18,7 +18,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/init.h>
 #include <linux/mm.h>
index 272fe43bceca0c070f90bbeed8137ae0875e8bfc..35a954a44b1b9d6f7f7749dc217a0af26785f58d 100644 (file)
@@ -19,7 +19,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/init.h>
 #include <linux/mm.h>
index 01525530c287df93f1686a0985c351da25c495ab..059824376629db538a6306e56bee80b9dbaeeb69 100644 (file)
@@ -544,7 +544,7 @@ void __init at91_init_leds(u8 cpu_led, u8 timer_led) {}
  *  UART
  * -------------------------------------------------------------------- */
 
-#if defined(CONFIG_SERIAL_AT91)
+#if defined(CONFIG_SERIAL_ATMEL)
 static struct resource dbgu_resources[] = {
        [0] = {
                .start  = AT91_VA_BASE_SYS + AT91_DBGU,
@@ -558,13 +558,14 @@ static struct resource dbgu_resources[] = {
        },
 };
 
-static struct at91_uart_data dbgu_data = {
+static struct atmel_uart_data dbgu_data = {
        .use_dma_tx     = 0,
        .use_dma_rx     = 0,            /* DBGU not capable of receive DMA */
+       .regs           = (void __iomem *)(AT91_VA_BASE_SYS + AT91_DBGU),
 };
 
 static struct platform_device at91rm9200_dbgu_device = {
-       .name           = "at91_usart",
+       .name           = "atmel_usart",
        .id             = 0,
        .dev            = {
                                .platform_data  = &dbgu_data,
@@ -593,13 +594,13 @@ static struct resource uart0_resources[] = {
        },
 };
 
-static struct at91_uart_data uart0_data = {
+static struct atmel_uart_data uart0_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
 };
 
 static struct platform_device at91rm9200_uart0_device = {
-       .name           = "at91_usart",
+       .name           = "atmel_usart",
        .id             = 1,
        .dev            = {
                                .platform_data  = &uart0_data,
@@ -635,13 +636,13 @@ static struct resource uart1_resources[] = {
        },
 };
 
-static struct at91_uart_data uart1_data = {
+static struct atmel_uart_data uart1_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
 };
 
 static struct platform_device at91rm9200_uart1_device = {
-       .name           = "at91_usart",
+       .name           = "atmel_usart",
        .id             = 2,
        .dev            = {
                                .platform_data  = &uart1_data,
@@ -676,13 +677,13 @@ static struct resource uart2_resources[] = {
        },
 };
 
-static struct at91_uart_data uart2_data = {
+static struct atmel_uart_data uart2_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
 };
 
 static struct platform_device at91rm9200_uart2_device = {
-       .name           = "at91_usart",
+       .name           = "atmel_usart",
        .id             = 3,
        .dev            = {
                                .platform_data  = &uart2_data,
@@ -711,13 +712,13 @@ static struct resource uart3_resources[] = {
        },
 };
 
-static struct at91_uart_data uart3_data = {
+static struct atmel_uart_data uart3_data = {
        .use_dma_tx     = 1,
        .use_dma_rx     = 1,
 };
 
 static struct platform_device at91rm9200_uart3_device = {
-       .name           = "at91_usart",
+       .name           = "atmel_usart",
        .id             = 4,
        .dev            = {
                                .platform_data  = &uart3_data,
@@ -733,8 +734,8 @@ static inline void configure_usart3_pins(void)
        at91_set_B_periph(AT91_PIN_PA6, 0);             /* RXD3 */
 }
 
-struct platform_device *at91_uarts[AT91_NR_UART];      /* the UARTs to use */
-struct platform_device *at91_default_console_device;   /* the serial console device */
+struct platform_device *at91_uarts[ATMEL_MAX_UART];    /* the UARTs to use */
+struct platform_device *atmel_default_console_device;  /* the serial console device */
 
 void __init at91_init_serial(struct at91_uart_config *config)
 {
@@ -775,9 +776,9 @@ void __init at91_init_serial(struct at91_uart_config *config)
        }
 
        /* Set serial console device */
-       if (config->console_tty < AT91_NR_UART)
-               at91_default_console_device = at91_uarts[config->console_tty];
-       if (!at91_default_console_device)
+       if (config->console_tty < ATMEL_MAX_UART)
+               atmel_default_console_device = at91_uarts[config->console_tty];
+       if (!atmel_default_console_device)
                printk(KERN_INFO "AT91: No default serial console defined.\n");
 }
 
@@ -785,7 +786,7 @@ void __init at91_add_device_serial(void)
 {
        int i;
 
-       for (i = 0; i < AT91_NR_UART; i++) {
+       for (i = 0; i < ATMEL_MAX_UART; i++) {
                if (at91_uarts[i])
                        platform_device_register(at91_uarts[i]);
        }
index 62a8efd232566a67b1f7342cb5f833b8a1229975..0315615b74da92e3c0a577c689afe2b78b7280c5 100644 (file)
@@ -10,7 +10,6 @@
  * your option) any later version.
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/mm.h>
index 9e399211108ce2f100c425b7b3199541b82087b1..e310e4d72990e0a18f5cf54a3930fca58bbed227 100644 (file)
@@ -11,7 +11,6 @@
  * your option) any later version.
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/mm.h>
index ef7482faad81372af99706a6039a55862e7e5e1f..249ca9e57bc6bbaffd2235c499cc85e235f917ea 100644 (file)
@@ -10,7 +10,6 @@
  * your option) any later version.
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/mm.h>
index fa958e9d6ddd0c5e1712e15302a0a34bd21c49c2..7ca0e6170a4197b6f357e4d020808a3867460906 100644 (file)
@@ -10,7 +10,6 @@
  * your option) any later version.
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/mm.h>
index 93751fee793df79236385b8437be9f1d5e95ec84..1992db4c25236c19ca10b8007d58bf1125fba90c 100644 (file)
@@ -8,7 +8,7 @@
  *  version 2 as published by the Free Software Foundation.
  *
  */
-#include <linux/config.h>
+
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/dma-mapping.h>
index 2291afe9f23e9d6fa80c15d821ab1370033f9d29..7530a95c15a620bd48fca2e5397f6d259986632c 100644 (file)
@@ -8,7 +8,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/cpufreq.h>
 #include <asm/hardware.h>
 #include <asm/arch/clocks.h>
index 5e20e740cde572d3d9fc4af981d7db8009bb321c..2494091a078b1b332f2d51628532016ee3b8b41e 100644 (file)
@@ -15,7 +15,6 @@
  * published by the Free Software Foundation.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/clk.h>
index e1ce050d8fe02a581c748afcfe2394e843303ba1..1ab84ced7b5a56d310e7b1654771421d6dc200d6 100644 (file)
@@ -14,7 +14,6 @@
  * or implied.
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
index 93c802bac2699dcf2558ac868e0d065f8dd221ab..fea1e17a3650aace27cf69dcac4b520e6041dc75 100644 (file)
@@ -11,7 +11,6 @@
  * or implied.
  */
 
-#include <linux/config.h>
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <asm/hardware.h>
index 756228ddd035de276cb27fef771e55ec5b92f532..b986065cd0f33c1f920aa534d9a499d78f031bf5 100644 (file)
@@ -11,7 +11,6 @@
  * or implied.
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/delay.h>
index 14cfc85e44b5d166dfbefd45f0f0b9ee5e2a24d1..2271d20ffedaf7dc1abc1dc64ba747aa91e8c762 100644 (file)
@@ -10,7 +10,6 @@
  * published by the Free Software Foundation.
  */
 
-#include <linux/config.h>
 #include <linux/init.h>
 
 #include <asm/hardware.h>
index 2f9c9b5dd2600e17cabaa6e0b4340459d5e98837..ce319ef64bc108c6df94ac2b7b2c02e888050d35 100644 (file)
@@ -28,7 +28,6 @@ END   {
          printf(" */\n\n");
          printf("#ifndef __ASM_ARM_MACH_TYPE_H\n");
          printf("#define __ASM_ARM_MACH_TYPE_H\n\n");
-         printf("#include <linux/config.h>\n\n");
          printf("#ifndef __ASSEMBLY__\n");
          printf("/* The type of machine we're running on */\n");
          printf("extern unsigned int __machine_arch_type;\n");
index b4633150f01ccfa5aa3d35e0bd9098cef6613f30..658bc4529c9d8be9647904ee4e761cd184ea6157 100644 (file)
@@ -7,7 +7,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <linux/config.h> /* for CONFIG_CPU_nn */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <asm/hardware.h>
index f6c3e30b1b4f0a08c05f244e08c322eda4b05625..5f62ade5be39141ea60eaaa3deb41e50dc348fe0 100644 (file)
@@ -7,7 +7,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <linux/config.h> /* for CONFIG_CPU_nn */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <asm/hardware.h>
index 49164e9aadd64be321ffa37e98c326a5eb940504..cced73c58115f8323d4b19e95451ad76f4038374 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/init.h>
 
 #include <asm/arch/board.h>
+#include <asm/arch/init.h>
 
 struct eth_platform_data __initdata eth0_data = {
        .valid          = 1,
@@ -20,13 +21,22 @@ struct eth_platform_data __initdata eth0_data = {
 
 extern struct lcdc_platform_data atstk1000_fb0_data;
 
+void __init setup_board(void)
+{
+       at32_map_usart(1, 0);   /* /dev/ttyS0 */
+       at32_map_usart(2, 1);   /* /dev/ttyS1 */
+       at32_map_usart(3, 2);   /* /dev/ttyS2 */
+
+       at32_setup_serial_console(0);
+}
+
 static int __init atstk1002_init(void)
 {
        at32_add_system_devices();
 
-       at32_add_device_usart(1);       /* /dev/ttyS0 */
-       at32_add_device_usart(2);       /* /dev/ttyS1 */
-       at32_add_device_usart(3);       /* /dev/ttyS2 */
+       at32_add_device_usart(0);
+       at32_add_device_usart(1);
+       at32_add_device_usart(2);
 
        at32_add_device_eth(0, &eth0_data);
        at32_add_device_spi(0);
index 1d22255009fddfe9387792fc416624bb259d4033..6c2c5e00dfc7ecd93113a51fc18f5175454ea737 100644 (file)
@@ -385,9 +385,9 @@ CONFIG_PPP_DEFLATE=m
 #
 # Non-8250 serial port support
 #
-CONFIG_SERIAL_AT91=y
-CONFIG_SERIAL_AT91_CONSOLE=y
-# CONFIG_SERIAL_AT91_TTYAT is not set
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
+# CONFIG_SERIAL_ATMEL_TTYAT is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
index 5d68f3c6990b3d7fb40038f4e51437260051f713..ea2d1ffee4780c14ea6237f21090d1cbfd036f65 100644 (file)
@@ -292,6 +292,7 @@ void __init setup_arch (char **cmdline_p)
 
        setup_processor();
        setup_platform();
+       setup_board();
 
        cpu_clk = clk_get(NULL, "cpu");
        if (IS_ERR(cpu_clk)) {
index f7cedf5aabeaa4a09d192e3301343bca695cd283..90f207e8e96d809c1e14ac3348e90772e1d87826 100644 (file)
@@ -48,9 +48,6 @@ void __init setup_platform(void)
        at32_sm_init();
        at32_clock_init();
        at32_portmux_init();
-
-       /* FIXME: This doesn't belong here */
-       at32_setup_serial_console(1);
 }
 
 static int __init pdc_probe(struct platform_device *pdev)
index 37982b60398e25b239e0b7dce1e57d3d73ce8d83..7ff6ad8bab5faa5132871aa869edeec875dd2001 100644 (file)
@@ -523,33 +523,49 @@ void __init at32_add_system_devices(void)
  *  USART
  * -------------------------------------------------------------------- */
 
-static struct resource usart0_resource[] = {
+static struct atmel_uart_data atmel_usart0_data = {
+       .use_dma_tx     = 1,
+       .use_dma_rx     = 1,
+};
+static struct resource atmel_usart0_resource[] = {
        PBMEM(0xffe00c00),
        IRQ(7),
 };
-DEFINE_DEV(usart, 0);
-DEV_CLK(usart, usart0, pba, 4);
+DEFINE_DEV_DATA(atmel_usart, 0);
+DEV_CLK(usart, atmel_usart0, pba, 4);
 
-static struct resource usart1_resource[] = {
+static struct atmel_uart_data atmel_usart1_data = {
+       .use_dma_tx     = 1,
+       .use_dma_rx     = 1,
+};
+static struct resource atmel_usart1_resource[] = {
        PBMEM(0xffe01000),
        IRQ(7),
 };
-DEFINE_DEV(usart, 1);
-DEV_CLK(usart, usart1, pba, 4);
+DEFINE_DEV_DATA(atmel_usart, 1);
+DEV_CLK(usart, atmel_usart1, pba, 4);
 
-static struct resource usart2_resource[] = {
+static struct atmel_uart_data atmel_usart2_data = {
+       .use_dma_tx     = 1,
+       .use_dma_rx     = 1,
+};
+static struct resource atmel_usart2_resource[] = {
        PBMEM(0xffe01400),
        IRQ(8),
 };
-DEFINE_DEV(usart, 2);
-DEV_CLK(usart, usart2, pba, 5);
+DEFINE_DEV_DATA(atmel_usart, 2);
+DEV_CLK(usart, atmel_usart2, pba, 5);
 
-static struct resource usart3_resource[] = {
+static struct atmel_uart_data atmel_usart3_data = {
+       .use_dma_tx     = 1,
+       .use_dma_rx     = 1,
+};
+static struct resource atmel_usart3_resource[] = {
        PBMEM(0xffe01800),
        IRQ(9),
 };
-DEFINE_DEV(usart, 3);
-DEV_CLK(usart, usart3, pba, 6);
+DEFINE_DEV_DATA(atmel_usart, 3);
+DEV_CLK(usart, atmel_usart3, pba, 6);
 
 static inline void configure_usart0_pins(void)
 {
@@ -575,51 +591,54 @@ static inline void configure_usart3_pins(void)
        portmux_set_func(PIOB, 17, FUNC_B);     /* TXD  */
 }
 
-static struct platform_device *setup_usart(unsigned int id)
+static struct platform_device *at32_usarts[4];
+
+void __init at32_map_usart(unsigned int hw_id, unsigned int line)
 {
        struct platform_device *pdev;
 
-       switch (id) {
+       switch (hw_id) {
        case 0:
-               pdev = &usart0_device;
+               pdev = &atmel_usart0_device;
                configure_usart0_pins();
                break;
        case 1:
-               pdev = &usart1_device;
+               pdev = &atmel_usart1_device;
                configure_usart1_pins();
                break;
        case 2:
-               pdev = &usart2_device;
+               pdev = &atmel_usart2_device;
                configure_usart2_pins();
                break;
        case 3:
-               pdev = &usart3_device;
+               pdev = &atmel_usart3_device;
                configure_usart3_pins();
                break;
        default:
-               pdev = NULL;
-               break;
+               return;
        }
 
-       return pdev;
+       if (PXSEG(pdev->resource[0].start) == P4SEG) {
+               /* Addresses in the P4 segment are permanently mapped 1:1 */
+               struct atmel_uart_data *data = pdev->dev.platform_data;
+               data->regs = (void __iomem *)pdev->resource[0].start;
+       }
+
+       pdev->id = line;
+       at32_usarts[line] = pdev;
 }
 
 struct platform_device *__init at32_add_device_usart(unsigned int id)
 {
-       struct platform_device *pdev;
-
-       pdev = setup_usart(id);
-       if (pdev)
-               platform_device_register(pdev);
-
-       return pdev;
+       platform_device_register(at32_usarts[id]);
+       return at32_usarts[id];
 }
 
-struct platform_device *at91_default_console_device;
+struct platform_device *atmel_default_console_device;
 
 void __init at32_setup_serial_console(unsigned int usart_id)
 {
-       at91_default_console_device = setup_usart(usart_id);
+       atmel_default_console_device = at32_usarts[usart_id];
 }
 
 /* --------------------------------------------------------------------
@@ -813,10 +832,10 @@ struct clk *at32_clock_list[] = {
        &pio1_mck,
        &pio2_mck,
        &pio3_mck,
-       &usart0_usart,
-       &usart1_usart,
-       &usart2_usart,
-       &usart3_usart,
+       &atmel_usart0_usart,
+       &atmel_usart1_usart,
+       &atmel_usart2_usart,
+       &atmel_usart3_usart,
        &macb0_hclk,
        &macb0_pclk,
        &spi0_mck,
index 7e55884135ed8ee2cf460cd0c03c0f223853256d..44a9aebc4f5a1637d1076510c1900c3aae33fa2c 100644 (file)
@@ -10,7 +10,6 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#include <linux/config.h> /* CONFIG_HEARTBEAT */
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
index e569d17b4ae6b92b5ceccf554795d6cd83070945..8abab3bc2b6fe1615cf80c71e3ca6450e8ee91f2 100644 (file)
@@ -16,7 +16,6 @@
  *             "A Kernel Model for Precision Timekeeping" by Dave Mills
  */
 
-#include <linux/config.h> /* CONFIG_HEARTBEAT */
 #include <linux/errno.h>
 #include <linux/module.h>
 #include <linux/sched.h>
index 01f80b5c45d2fde74444b1be34b39016e7310e8f..ef6ad9e1a609d85d751268b4c8911706476b723b 100644 (file)
@@ -13,7 +13,6 @@
  * rw semaphores implemented November 1999 by Benjamin LaHaise <bcrl@kvack.org>
  */
 
-#include <linux/config.h>
 #include <linux/linkage.h>
 #include <asm/rwlock.h>
 #include <asm/alternative-asm.i>
index 0c28f11d66775c2b5cec14e976fcbeda526302f9..9a4d40b3d6a26ceab9c021ba1d558371e1930880 100644 (file)
@@ -6,7 +6,6 @@
 
 /* $Id: mmu.S,v 1.15 2004/03/16 02:56:27 takata Exp $ */
 
-#include <linux/config.h>      /* CONFIG_MMU */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <asm/smp.h>
index 6cfc984380d96619dc821d840a35825701cca28d..28b2fefa4513b9c8e534c06f6c81294b55de838f 100644 (file)
@@ -10,7 +10,6 @@
  *             "A Kernel Model for Precision Timekeeping" by Dave Mills
  */
 
-#include <linux/config.h> /* CONFIG_HEARTBEAT */
 #include <linux/errno.h>
 #include <linux/module.h>
 #include <linux/sched.h>
index ceef9bc181eabf791a727cbd6d6409ecd07109e7..c7d6ad5138206bd924334e47e1d992a66d424b55 100644 (file)
@@ -17,7 +17,6 @@
 
 /***************************************************************************/
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/param.h>
index 3e7fe1e1491318de9ef3275503a1bf59e89922c9..31084466eae8e925755510ca588bdaecc35c9174 100644 (file)
@@ -10,8 +10,6 @@
  * Copyright 2006 Greg Ungerer <gerg@snapgear.com>
  */
 
-#include <linux/config.h>
-
 .global _start
 .global _buserr
 .global trap
index bfab055ad7cc3d98e358b21c60e6200bb10c557a..8a49884bd5ec674204d6d4852f272d70bbca593d 100644 (file)
@@ -440,13 +440,11 @@ config MIPS_XXS1500
 
 config PNX8550_V2PCI
        bool "Philips PNX8550 based Viper2-PCI board"
-       depends on BROKEN
        select PNX8550
        select SYS_SUPPORTS_LITTLE_ENDIAN
 
 config PNX8550_JBS
        bool "Philips PNX8550 based JBS board"
-       depends on BROKEN
        select PNX8550
        select SYS_SUPPORTS_LITTLE_ENDIAN
 
index 099679a9dfb9c9dbc56744499d1855ddf4799a04..3c93512be1ec11bd54de27b47bcdb4222dc34e38 100644 (file)
@@ -90,7 +90,7 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
        unsigned int pending = read_c0_status() & read_c0_cause();
 
        if (pending & STATUSF_IP2)
-               do_IRQ(2, regs);
+               hw0_irqdispatch(2, regs);
        else if (pending & STATUSF_IP7) {
                if (read_c0_config7() & 0x01c0)
                        timer_irqdispatch(7, regs);
index 5436b4b97455f8ce95fffed943685d7eee5fda48..d43f56e2cd7887b1adea9cbae07996b59e3951c6 100644 (file)
 #include <linux/init.h>
 #include <linux/resource.h>
 #include <linux/serial.h>
-#include <linux/serial_ip3106.h>
+#include <linux/serial_pnx8xxx.h>
 #include <linux/platform_device.h>
 
 #include <int.h>
 #include <usb.h>
 #include <uart.h>
 
-extern struct uart_ops ip3106_pops;
-
 static struct resource pnx8550_usb_ohci_resources[] = {
        [0] = {
                .start          = PNX8550_USB_OHCI_OP_BASE,
@@ -63,31 +61,29 @@ static struct resource pnx8550_uart_resources[] = {
        },
 };
 
-struct ip3106_port ip3106_ports[] = {
+struct pnx8xxx_port pnx8xxx_ports[] = {
        [0] = {
                .port   = {
-                       .type           = PORT_IP3106,
+                       .type           = PORT_PNX8XXX,
                        .iotype         = UPIO_MEM,
                        .membase        = (void __iomem *)PNX8550_UART_PORT0,
                        .mapbase        = PNX8550_UART_PORT0,
                        .irq            = PNX8550_UART_INT(0),
                        .uartclk        = 3692300,
                        .fifosize       = 16,
-                       .ops            = &ip3106_pops,
                        .flags          = UPF_BOOT_AUTOCONF,
                        .line           = 0,
                },
        },
        [1] = {
                .port   = {
-                       .type           = PORT_IP3106,
+                       .type           = PORT_PNX8XXX,
                        .iotype         = UPIO_MEM,
                        .membase        = (void __iomem *)PNX8550_UART_PORT1,
                        .mapbase        = PNX8550_UART_PORT1,
                        .irq            = PNX8550_UART_INT(1),
                        .uartclk        = 3692300,
                        .fifosize       = 16,
-                       .ops            = &ip3106_pops,
                        .flags          = UPF_BOOT_AUTOCONF,
                        .line           = 1,
                },
@@ -111,12 +107,12 @@ static struct platform_device pnx8550_usb_ohci_device = {
 };
 
 static struct platform_device pnx8550_uart_device = {
-       .name           = "ip3106-uart",
+       .name           = "pnx8xxx-uart",
        .id             = -1,
        .dev = {
                .dma_mask               = &uart_dmamask,
                .coherent_dma_mask      = 0xffffffff,
-               .platform_data = ip3106_ports,
+               .platform_data = pnx8xxx_ports,
        },
        .num_resources  = ARRAY_SIZE(pnx8550_uart_resources),
        .resource       = pnx8550_uart_resources,
index 70aac9759412b8faf0557c396d48401e554ba64b..f8952c1359cd8b0752ec97e91154527d3a768d3d 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/string.h>
-#include <linux/serial_ip3106.h>
+#include <linux/serial_pnx8xxx.h>
 
 #include <asm/bootinfo.h>
 #include <uart.h>
@@ -126,7 +126,7 @@ void prom_putchar(char c)
 {
        if (pnx8550_console_port != -1) {
                /* Wait until FIFO not full */
-               while( ((ip3106_fifo(UART_BASE, pnx8550_console_port) & IP3106_UART_FIFO_TXFIFO) >> 16) >= 16)
+               while( ((ip3106_fifo(UART_BASE, pnx8550_console_port) & PNX8XXX_UART_FIFO_TXFIFO) >> 16) >= 16)
                        ;
                /* Send one char */
                ip3106_fifo(UART_BASE, pnx8550_console_port) = c;
index 36b0c8bc6c06197824c0ca65f5645fcbd869bfcf..e62123ca9b64899c51176a2c6ad6ae95381f5882 100644 (file)
@@ -24,7 +24,7 @@
 #include <linux/mm.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
-#include <linux/serial_ip3106.h>
+#include <linux/serial_pnx8xxx.h>
 #include <linux/pm.h>
 
 #include <asm/cpu.h>
@@ -56,7 +56,7 @@ extern char *prom_getcmdline(void);
 
 struct resource standard_io_resources[] = {
        {
-               .start  = .0x00,
+               .start  = 0x00,
                .end    = 0x1f,
                .name   = "dma1",
                .flags  = IORESOURCE_BUSY
@@ -144,7 +144,7 @@ void __init plat_mem_setup(void)
                /* We must initialize the UART (console) before prom_printf */
                /* Set LCR to 8-bit and BAUD to 38400 (no 5)                */
                ip3106_lcr(UART_BASE, pnx8550_console_port) =
-                       IP3106_UART_LCR_8BIT;
+                       PNX8XXX_UART_LCR_8BIT;
                ip3106_baud(UART_BASE, pnx8550_console_port) = 5;
        }
 
index 3e79e62f7b0b24f38609a1f5ba609ee1fca1057d..eaad2328fea14669fdd00dce7f45df8c8a9ef0d3 100644 (file)
@@ -12,8 +12,6 @@
  * Initial Version 04-23-1999 by Helge Deller <deller@gmx.de>
  */
 
-#include <linux/config.h>      /* for CONFIG_SMP */
-
 #include <asm/asm-offsets.h>
 #include <asm/psw.h>
 #include <asm/pdc.h>
index 9670a89c77fe480255ce79cf5a8705434e06d43e..a05800429304983d9c3b26dea81c5deb65cccb4d 100644 (file)
@@ -6,7 +6,6 @@
  * thanks to Philipp Rumpf, Mike Shaver and various others
  * sorry about the wall, puffin..
  */
-#include <linux/config.h> /* for CONFIG_SMP */
 
 #include <asm/asm-offsets.h>
 #include <asm/unistd.h>
index 8c676d763bb0aecc1a47ab4ef8badba262a12707..5446bab08eca6eba4a8354418f6b3baa5f1ba4e8 100644 (file)
@@ -11,7 +11,6 @@
  * option) any later version.
  */
 
-#include <linux/config.h>
 #include <linux/stddef.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
index effcbf78f8517085b09ec619650456247e6c2669..46c3532992aa99f8eaf6a6bb8d4219ec2742a9c6 100644 (file)
@@ -18,7 +18,6 @@
 #ifndef __MACH_MPC85XXADS_H
 #define __MACH_MPC85XXADS_H
 
-#include <linux/config.h>
 #include <linux/initrd.h>
 #include <sysdev/fsl_soc.h>
 
index 4c1fede6470e99d1b94e3ac8a01379232261a7dd..193a5d7921b5fc85be01ae26b61db84a34bc50c4 100644 (file)
@@ -11,7 +11,6 @@
  * option) any later version.
  */
 
-#include <linux/config.h>
 #include <linux/stddef.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
index 3f3859d12e003c0a59f2601de3103d46fe62a8ed..2f194ba29899699883e612b136a3972598d08514 100644 (file)
@@ -6,8 +6,6 @@
  * (c) 2006 Benjamin Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
  */
 
-
-#include <linux/config.h>
 #include <linux/percpu.h>
 #include <linux/types.h>
 
index 033ad6e2827bfe966cf438488c8bb8fbf09616ab..0984c70716953fd8a5a577cbc3d63efcccb555f3 100644 (file)
@@ -1,6 +1,5 @@
 #define DEBUG
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/smp.h>
index e4f2b9df5e170027cf1ac85e5cbb65c21a59351d..cb6f084844f2740800fe7a1b7dea14bc4cb9336d 100644 (file)
@@ -18,7 +18,6 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#include <linux/config.h>
 #include <linux/stddef.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
index 628482671c1548e5ad074f2cba5d6fe6b89de123..106896c3b60a56c0a119222444ea1895238bc8de 100644 (file)
@@ -22,7 +22,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/delay.h>
index 9bd410b8fec6f9def2da05b8437cc3074d370d41..fa54351ac268debfce53a13be8ea28435bcadec2 100644 (file)
@@ -17,7 +17,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-#include <linux/config.h>
 #include <linux/time.h>
 
 #include <asm/time.h>
index f3038461d4c0566f162ecacba1ccff41ebd5515b..11de090eb9015ea7a2917b3269dff8afa4c519d4 100644 (file)
@@ -9,7 +9,6 @@
  * option) any later version.
  */
 
-#include <linux/config.h>
 #include <linux/stddef.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
index 0073527a7036dabef9640d685275a7857cdf97e9..8c880c0ca380819af131bbba2a88aec9e3af704b 100644 (file)
@@ -1,4 +1,3 @@
-#include <linux/config.h> /* CONFIG_HEARTBEAT */
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
index f5a5c0cd062d637192b7a6f8840fe67f07ce3f89..a6c0a138b0d7268e195785f396bc8d5b3f324336 100644 (file)
@@ -13,7 +13,6 @@
 #ifndef __CPCI405_H__
 #define __CPCI405_H__
 
-#include <linux/config.h>
 #include <platforms/4xx/ibm405gp.h>
 #include <asm/ppcboot.h>
 
index 4d9ff5ce4cbdb41c04a78261ad8d98e579bb8891..67914fe7f317cb6be4b9e864816e3020f8596e4f 100644 (file)
@@ -20,7 +20,6 @@
  * s390 port, used ppc64 as template. Mike Grundy <grundym@us.ibm.com>
  */
 
-#include <linux/config.h>
 #include <linux/kprobes.h>
 #include <linux/ptrace.h>
 #include <linux/preempt.h>
index d33f8a07ccaca4c26d1f3aebd38a771ba93816f7..54d51b404603091e377f1e311df323b64caffc12 100644 (file)
@@ -25,7 +25,6 @@
  * <zaitcev> Sounds reasonable
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
index 97bf87e8cdde56853b86dda4677569be491dff9f..74bef2a2d37f8461df87fe43ce95a5d276ad8ab9 100644 (file)
@@ -1,4 +1,3 @@
-#include <linux/config.h>
 #include <linux/string.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
index 718350aba1ecae75a009f789f0a08b8c5e54869d..826118ee53d5f97f74e3985c4c078a2e63f77a5b 100644 (file)
@@ -5,7 +5,6 @@
  * Refactoring for unified NCR/PCIO support 2002 Eric Brower (ebrower@usa.net)
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
index 238bbf6de07d1603b5ab7e225442ef1eabab2177..7f920453577085dcd02351d6d6be16e179a2c100 100644 (file)
@@ -1,4 +1,3 @@
-#include <linux/config.h>
 #include <linux/string.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
index 5cc5ab63293fa912188053b8d7a9a360e60fd3e5..e21cd6afa709c2724c353dfab813d18df6a03974 100644 (file)
@@ -15,7 +15,6 @@
  *      2 of the License, or (at your option) any later version.
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/string.h>
index d247ef45c374c3cb620f6e741035c310f428d4d6..a0d148ea63d6bfa7b8bf8a1ffaceeff6b72ad477 100644 (file)
@@ -3,7 +3,6 @@
  * Licensed under the GPL
  */
 
-#include "linux/config.h"
 #include "linux/module.h"
 #include "linux/init.h"
 #include "linux/slab.h"
index 300a54a6523eb925de5e5308b5170c622f7b3811..c1c5604752fb20dada9f293393f3a8e32c4e0520 100644 (file)
@@ -5,7 +5,6 @@
  * Licensed under the GPL.
  */
 
-#include "linux/config.h"
 #include "linux/kernel.h"
 #include "linux/netdevice.h"
 #include "linux/rtnetlink.h"
index ccea2d7885e58d2937df864a30e61db69d3f7b77..788da5439a2defd3b18837e74828b3ec75457ef6 100644 (file)
@@ -1,4 +1,3 @@
-#include "linux/config.h"
 #include "linux/kernel.h"
 #include "linux/stddef.h"
 #include "linux/init.h"
index 6f13e7c71a82f3ecb00ccf44e24c0cfc8fafc9fd..ed9c59082d0df56806248e7928d4a953d524d15e 100644 (file)
@@ -3,7 +3,6 @@
  * Licensed under the GPL
  */
 
-#include "linux/config.h"
 #include "linux/fs.h"
 #include "linux/tty.h"
 #include "linux/tty_driver.h"
index e4bfcfe8550ba91cc7515c3d3bd46bd7e39ba325..7a4897e27f42784054bb674fb29e8664f17a5af9 100644 (file)
@@ -3,7 +3,6 @@
  * Licensed under the GPL
  */
 
-#include "linux/config.h"
 #include "linux/posix_types.h"
 #include "linux/tty.h"
 #include "linux/tty_flip.h"
index fda4a3940698c26a8be776ce5141e5fa3e03189f..f0b0668458b76e8967853c260a5aefb5385f13fd 100644 (file)
@@ -20,7 +20,6 @@
 #define MAJOR_NR UBD_MAJOR
 #define UBD_SHIFT 4
 
-#include "linux/config.h"
 #include "linux/module.h"
 #include "linux/blkdev.h"
 #include "linux/hdreg.h"
index d86ee14260ce463e44a965725d995c2ad8a9e069..d0b690197fd78fa5e8dc94e069e96bbe50dca287 100644 (file)
@@ -6,7 +6,6 @@
 #ifndef __MCONSOLE_KERN_H__
 #define __MCONSOLE_KERN_H__
 
-#include "linux/config.h"
 #include "linux/list.h"
 #include "mconsole.h"
 
index e7539a8451efece50aa56d8ee1b37159b054f496..88e5e77bf517cea4ed0db5e72bee492a5ef4e069 100644 (file)
@@ -6,8 +6,6 @@
 #ifndef __MODE_KERN_H__
 #define __MODE_KERN_H__
 
-#include "linux/config.h"
-
 #ifdef CONFIG_MODE_TT
 #include "mode_kern_tt.h"
 #endif
index d8869a6ef1b43b43b2ae006be0f1126cd8ed628f..b26986c0c3d22a1ed1c93dfe2cac32090b8a6daf 100644 (file)
@@ -6,7 +6,6 @@
 #ifndef __SKAS_MMU_H
 #define __SKAS_MMU_H
 
-#include "linux/config.h"
 #include "mm_id.h"
 #include "asm/ldt.h"
 
index 8a27353733a9823773f1b82548792d5f087d8595..df2397dba3e5282f63b134cab7d59719b1b5461a 100644 (file)
@@ -5,7 +5,6 @@
 #ifndef __SYS_PTRACE_PPC_H
 #define __SYS_PTRACE_PPC_H
 
-#include "linux/config.h"
 #include "linux/types.h"
 
 /* the following taken from <asm-ppc/ptrace.h> */
index 4567f1eeb4a7d25f8d079aa846a752514e7d6340..5126a99b59612a4dd3ac9b6818aed574e67fa438 100644 (file)
@@ -6,7 +6,6 @@
 #ifndef __ARCH_UM_UACCESS_H
 #define __ARCH_UM_UACCESS_H
 
-#include "linux/config.h"
 #include "choose-mode.h"
 
 #ifdef CONFIG_MODE_TT
index 49ed5ddf070478ed21025f32db09dba081c9ad35..8cde431348cc46dccdf80d52d90e4dc1cd3a0b69 100644 (file)
@@ -3,7 +3,6 @@
  * Licensed under the GPL
  */
 
-#include "linux/config.h"
 #include "linux/mm.h"
 #include "linux/module.h"
 #include "linux/sched.h"
index ce7f233fc490d1cb03cc30a6d77dcd511a112cb5..eee97bb81ba54c3bd2d47acc5e94c17baf38ed95 100644 (file)
@@ -5,7 +5,6 @@
  *     Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
  */
 
-#include "linux/config.h"
 #include "linux/kernel.h"
 #include "linux/module.h"
 #include "linux/smp.h"
index f030e44262ba88a1e7b6b22034f86537ed83c529..0e00cf93f90042f766b11c7b8e7a5075cbd1a376 100644 (file)
@@ -3,7 +3,6 @@
  * Licensed under the GPL
  */
 
-#include "linux/config.h"
 #include "linux/module.h"
 #include "linux/string.h"
 #include "linux/smp_lock.h"
index 4aa9808ba2642c99b4a19fbebc445ca17956a853..2a32e5e8e9c963f041fe7334bda569c1c2966591 100644 (file)
@@ -3,7 +3,6 @@
  * Licensed under the GPL
  */
 
-#include "linux/config.h"
 #include "linux/stddef.h"
 #include "linux/sys.h"
 #include "linux/sched.h"
index 27bbf54b1e52a1b84fff2fd11f866582a95bb685..0d2cce621134b98e315c958f6addd43a8d0d1bf1 100644 (file)
@@ -3,7 +3,6 @@
  * Licensed under the GPL
  */
 
-#include "linux/config.h"
 #include "linux/mm.h"
 #include "asm/pgtable.h"
 #include "mem_user.h"
index 4cd2ff546ef6f9d322b2f882ca182bf5315cf7c9..c17eddcf89b3ce8ab627cbdad0f2574cdd3035cb 100644 (file)
@@ -3,7 +3,6 @@
  * Licensed under the GPL
  */
 
-#include "linux/config.h"
 #include "linux/sched.h"
 #include "linux/list.h"
 #include "linux/spinlock.h"
index 6e84963dfc29e99c93bcdfe1cd2e11c1103c9310..27eb29ce666b624a59115df89e173eb32d9a4e39 100644 (file)
@@ -6,7 +6,6 @@
 
 #include "linux/stddef.h"
 #include "linux/sched.h"
-#include "linux/config.h"
 #include "linux/mm.h"
 #include "asm/page.h"
 #include "asm/pgtable.h"
index 511116aebaf7206c392401bea1b2bea2691e3e9a..759b07053160736a1b0ce8e4220ec3c054197689 100644 (file)
@@ -3,7 +3,6 @@
  * Licensed under the GPL
  */
 
-#include "linux/config.h"
 #include "linux/percpu.h"
 #include "asm/pgalloc.h"
 #include "asm/tlb.h"
index b331e970002ffe29c4d8db3d97c0d42a0084e525..239c98054dec4292f3444783240bf28958f7a850 100644 (file)
@@ -3,7 +3,6 @@
  * Licensed under the GPL
  */
 
-#include "linux/config.h"
 #include "linux/sched.h"
 #include "linux/kernel.h"
 #include "linux/module.h"
index c7b195c7e51fa3ddc3d46da245f2f0f5ce7fa6fe..b5f124a2f6ae843b48d33ca02c2a9800a695578d 100644 (file)
@@ -8,7 +8,6 @@
 #include "linux/sched.h"
 #include "linux/mm.h"
 #include "linux/spinlock.h"
-#include "linux/config.h"
 #include "linux/init.h"
 #include "linux/ptrace.h"
 #include "asm/semaphore.h"
index 26506388a6aa66cbc64552153ccd822f33c81cf3..68e1bf63cd0ad2e453010bc384161dfb74e75699 100644 (file)
@@ -4,7 +4,6 @@
  */
 
 #include "linux/init.h"
-#include "linux/config.h"
 #include "mconsole_kern.h"
 
 #ifdef CONFIG_MCONSOLE
index 84a23b14f770b308dca9b06a982dc264706af5a9..4d1929dfa285ff4c5ed825f883219518a3bf2c75 100644 (file)
@@ -4,7 +4,6 @@
  */
 
 #include "linux/stddef.h"
-#include "linux/config.h"
 #include "linux/mm.h"
 #include "asm/uaccess.h"
 #include "mem_user.h"
index 97d88e7902f7dbb71f19b62facbf652fe854575f..66f43c906821b46de035417fdb1ca042b47eecad 100644 (file)
@@ -3,7 +3,6 @@
  * Licensed under the GPL
  */
 
-#include "linux/config.h"
 #include "linux/kernel.h"
 #include "linux/sched.h"
 #include "linux/notifier.h"
index 69971b78beaf9900a92d27de56117343f05d26c7..e299ee5a753d7b1adddad393e926a4609509cfdb 100644 (file)
@@ -4,7 +4,6 @@
  */
 
 #include "linux/stddef.h"
-#include "linux/config.h"
 #include "linux/sched.h"
 #include "linux/slab.h"
 #include "linux/types.h"
index d5244f07053990392d695705013bc86993cad76c..171b3e9dc86777e54cb8a06a43a29e55bb810688 100644 (file)
@@ -3,7 +3,6 @@
  * Licensed under the GPL
  */
 
-#include "linux/config.h"
 #include "linux/kernel.h"
 #include "linux/smp.h"
 #include "linux/sched.h"
index 71b9796258ef650dc008a5b45a7965fbc8e873aa..643dab58572739d2b1f36f5c4ef32e6e0c1ebcc2 100644 (file)
@@ -3,7 +3,6 @@
  * Licensed under the GPL
  */
 
-#include "linux/config.h"
 #include "linux/kernel.h"
 #include "linux/sched.h"
 #include "linux/slab.h"
index f4d1a4d3cdc231696e55802039541e5b024b3c76..cd06f47c0ea7404bfd29f15f31e222ca9c2f5260 100644 (file)
@@ -10,7 +10,6 @@
  *             "A Kernel Model for Precision Timekeeping" by Dave Mills
  */
 
-#include <linux/config.h> /* CONFIG_HEARTBEAT */
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
index 2aa565c136e5acff6dfc6e9beec303fc6cac9d9e..d6ff88f351350c72d18ff330059bbc737797add8 100644 (file)
@@ -11,8 +11,6 @@
  *
  */
 
-#include <linux/config.h> /* for CONFIG_VIDEO_* */
-
 /* Enable autodetection of SVGA adapters and modes. */
 #undef CONFIG_VIDEO_SVGA
 
index 2fd5a67fd4353d4389a7b68ceab0c85186760c86..82ef182de6aee197be2c796e799d24d37dff0ae3 100644 (file)
@@ -6,7 +6,6 @@
  * of ugly preprocessor tricks. Talk about very very poor man's inheritance.
  */ 
 #include <linux/types.h>
-#include <linux/config.h> 
 #include <linux/stddef.h>
 #include <linux/rwsem.h>
 #include <linux/sched.h>
index cfb09b07ae99864b90062b6f96fc60201341a654..f760045d6d35f0bf082f43d1322f32fe34c04680 100644 (file)
@@ -21,7 +21,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/types.h>
index cbabfdf78e06982711daa1f1b03c161a66cc6455..f61fb8e4f12954b5f8f2f61dad0cf7218d9818cc 100644 (file)
@@ -23,7 +23,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/slab.h>
 #include <linux/mm.h>
index c3454af5e3a25896ca6cac599c0e21ce10e73a26..6d77e4797a471035978e04e4307a71d034918cbc 100644 (file)
@@ -1,7 +1,6 @@
 /* Exports for assembly files.
    All C exports should go in the respective C files. */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/smp.h>
 
index 0ebb03b60e797946ff5aae6952b7e94fae5d5d25..727a5d46d2fc0cfb6888053a698841fb6e9732f9 100644 (file)
@@ -1,6 +1,5 @@
 /* Written 2003 by Andi Kleen, based on a kernel by Evandro Menezes */
-       
-#include <linux/config.h>
+
 #include <linux/linkage.h>
 #include <asm/dwarf2.h>
 
index b6cd3cca2f458a8ece3db97c35859bcd473c6735..50be90975d04a40e08f9a3c72329fbe9b7ec7cdd 100644 (file)
@@ -8,7 +8,6 @@
  *     depends wildly on alignment on many x86 processors. 
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/delay.h>
index 967b22fa7d07d59d21985eebdbb56298b81b8db4..0ea0ddc875a7128203b8a0c8a7c4f5784fb2b680 100644 (file)
@@ -1,6 +1,5 @@
 /* Copyright 2002 Andi Kleen */
-       
-#include <linux/config.h>
+
 #include <linux/linkage.h>
 #include <asm/dwarf2.h>
 #include <asm/cpufeature.h>
index 09ed1f6b0eaa2c9037abb072db6bd4684d8bb6c2..2c5948116bd21731d4a85712fddd00d3943fd728 100644 (file)
@@ -1,6 +1,5 @@
 /* Copyright 2002 Andi Kleen, SuSE Labs */
 
-#include <linux/config.h>
 #include <linux/linkage.h>
 #include <asm/dwarf2.h>
 
index 0025535cac8d9fa389016d0b79b84519fab9a073..55e586d352d3c444d35fe7399726666ba94b9adf 100644 (file)
@@ -5,7 +5,6 @@
  * Subject to the GNU public license, v.2. No warranty of any kind.
  */
 
-       #include <linux/config.h>
        #include <linux/linkage.h>
        #include <asm/dwarf2.h>
        #include <asm/calling.h>                        
index 99f87efe0f588b2d4327516b7a7dac0304fcc39b..36b88f6c5f82c7a28c725ab3dd94d28c3f4ec8f9 100644 (file)
@@ -20,7 +20,6 @@
  *
  */
 
-#include <linux/config.h>      /* CONFIG_PROC_FS */
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/types.h>
index 4abc193314ee6c34f7a6e93f5e5faaaca8c3761f..ada68e65b5ff554deafd347a703653180668a028 100644 (file)
@@ -19,7 +19,6 @@
  *    Questions/Comments/Bugfixes to iss_storagedev@hp.com
  *
  */
-#include <linux/config.h>      /* CONFIG_PROC_FS */
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/pci.h>
index b8c22255f6ada92615b2e70d8ad717927e04c9ae..9f8082f8dd290c61aa9d13d6dc5f5be64c68d47d 100644 (file)
@@ -11,7 +11,6 @@
 #include <linux/sched.h>
 #include <linux/tty.h>
 #include <linux/timer.h>
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/wait.h>
 #include <linux/string.h>
index 65c9d2ec60bdd7221a30a776fba377c37b89c078..2165324456520a5f786716154b63491519aaebb7 100644 (file)
@@ -26,7 +26,6 @@
  *      Linux.
  */
 
-#include <linux/config.h> /* for CONFIG_FT_* */
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/ioport.h>
index a61ef50f3dfcec756da9f6e6b0769f16edefff70..dab634686885a47c8f6bb3c2c94310120a64d3dc 100644 (file)
@@ -24,7 +24,6 @@
  *      zftape.
  */
 
-#include <linux/config.h> /* for CONFIG_ZFT_DFLT_BLK_SZ */
 #include <linux/errno.h>
 #include <linux/mm.h>
 
index 14c07f0865755f101fd7d8191ea0437527411806..1ceec22b60bd7f8bf05c36f03dd49731560fa557 100644 (file)
@@ -28,7 +28,6 @@
  *
  */
 
-#include <linux/config.h> /* for CONFIG_ZFT_DFLT_BLK_SZ */
 #include "../zftape/zftape-buffers.h"
 
 #define SEGMENTS_PER_TAPE  (ft_segments_per_track * ft_tracks_per_tape)
index 3cf4d641a51c637c48508a2e9c10a120de86e757..c9caff57db85dfac639d30efe0c1439299cccd81 100644 (file)
@@ -15,7 +15,6 @@
  */
 
 #include <linux/kernel.h>
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
index 5426b1e5595f7cef7877ae7d697758b942bee182..5c0dec39cf6c66998cdd9b65205a78882587b0a0 100644 (file)
@@ -30,7 +30,6 @@
  * processor from ever speculating a cache line from this page.
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
index 7719bd75810b2d561a9f9ef0f703573b56e8998b..4d47d79bcea78aa4a0f4abc34137fc530fc36f7d 100644 (file)
@@ -7,7 +7,6 @@
    Copyright (c) 2005      Jim Cromie <jim.cromie@gmail.com>
 */
 
-#include <linux/config.h>
 #include <linux/fs.h>
 #include <linux/module.h>
 #include <linux/errno.h>
index d1ecb2c6de98719803479876d3e9ea0d7f185c03..73e3242099139e0c41892fe6198210355b2e413d 100644 (file)
@@ -35,7 +35,6 @@
 
 #define MAX_DEVICE_COUNT 4
 
-#include <linux/config.h>      
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/signal.h>
index 57e31e5eaedb7aa998dff3373fc96f180cb45e79..8fd71a5fc6192b1befd31c2b611e894d0e2299a1 100644 (file)
 #define RCS_ID "$Id: sx.c,v 1.33 2000/03/08 10:01:02 wolff, pvdl Exp $"
 #define RCS_REV "$Revision: 1.33 $"
 
-
 #include <linux/module.h>
-#include <linux/config.h> 
 #include <linux/kdev_t.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
index 38d94987de8343988faa9ef3ffe0049a61d5be60..a4150c4519c4e4173a9a1f60951d3cf5e0b6fc32 100644 (file)
@@ -63,7 +63,6 @@
 #define MAX_PCI_DEVICES 10
 #define MAX_TOTAL_DEVICES 20
 
-#include <linux/config.h>      
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/signal.h>
index 8f89948832fc3e46d868685f900a84b26f83e273..aaac94db0d8b7ca9e40e9fd04fc93585c9101192 100644 (file)
@@ -49,7 +49,6 @@
 #define PFX            DRV_NAME ": "
 
 /* Includes */
-#include <linux/config.h>              /* For CONFIG_WATCHDOG_NOWAYOUT/... */
 #include <linux/module.h>              /* For module specific items */
 #include <linux/moduleparam.h>         /* For new moduleparam's */
 #include <linux/types.h>               /* For standard types (like size_t) */
index 8f90b90a502132ffc0ac2e9396c6adb0b865b014..5dbd7dc2936f73981ef889dcb1840aee9b496b84 100644 (file)
@@ -27,7 +27,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/fs.h>
index 6f8515db5b076028cb620de63e01e8d3692be6f8..8e1e6e48e0a70733f8768a95cce8901409a8d9e0 100644 (file)
@@ -49,7 +49,6 @@
  *     More info available at http://www.berkprod.com/ or http://www.pcwatchdog.com/
  */
 
-#include <linux/config.h>      /* For CONFIG_WATCHDOG_NOWAYOUT/... */
 #include <linux/module.h>      /* For module specific items */
 #include <linux/moduleparam.h> /* For new moduleparam's */
 #include <linux/types.h>       /* For standard types (like size_t) */
index 2de6e497c1402e9fa434c1f7afd12708f1820427..f4872c87106393786bf1d5be663877a8bbe61fca 100644 (file)
@@ -31,7 +31,6 @@
  *     Includes, defines, variables, module parameters, ...
  */
 
-#include <linux/config.h>      /* For CONFIG_WATCHDOG_NOWAYOUT/... */
 #include <linux/module.h>      /* For module specific items */
 #include <linux/moduleparam.h> /* For new moduleparam's */
 #include <linux/types.h>       /* For standard types (like size_t) */
index db2731ba88e303c48a2333cf424fff0937acbceb..3a55fc6abcd8fe3a7382111dbf24493c97a31a4d 100644 (file)
@@ -14,7 +14,6 @@
  * or implied.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/types.h>
index d965d074cd61c8ee3c3335dd850acc266f456106..371ed4f69a97ea9f122b65ad489d74a2c60f210a 100644 (file)
@@ -32,7 +32,6 @@
     The w83791g chip is the same as the w83791d but lead-free.
 */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
index 952a28d485ce9e593b26f6d7d4b7336582c11564..3e276e958ef7de18d28d2937840635acf6ac5360 100644 (file)
@@ -9,7 +9,6 @@
  * kind, whether express or implied.
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/sched.h>
index 0cb7b9b520ea198e2ca487686788620ab5ca5006..965c43659e35c60e807516d07621b3c254685a01 100644 (file)
@@ -23,7 +23,6 @@
 
 #undef REALLY_SLOW_IO          /* most systems can safely undef this */
 
-#include <linux/config.h> /* for CONFIG_BLK_DEV_IDEPCI */
 #include <linux/types.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
index 68c74bbf8b06a3e2f3a03bbbec8c93d504065671..c1cec236ecf012a1f481fb0f98b57cec0fd748c6 100644 (file)
@@ -5,7 +5,6 @@
  *  May be copied or modified under the terms of the GNU General Public License
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/module.h>
 #include <linux/pci.h>
index 608cd7609072730dccdd7face2a216e1947452f4..5f6950c2d1d10510adcdbfe202e987537691c426 100644 (file)
@@ -17,7 +17,6 @@
 
 #undef REALLY_SLOW_IO          /* most systems can safely undef this */
 
-#include <linux/config.h> /* for CONFIG_BLK_DEV_IDEPCI */
 #include <linux/types.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
index 11b7378ff2145eeaa6d8b78aae3510d9748848d8..a82157db46895c5f770e68139076b949042cede9 100644 (file)
@@ -30,7 +30,6 @@
  * SOFTWARE.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/vmalloc.h>
 #include <linux/mm.h>
index e9f06116c4d774085990ef2a3d14284340be3252..599878c8e7146fb65f2799ca6cfba1a13dc652c0 100644 (file)
@@ -8,7 +8,6 @@
  * published by the Free Software Foundation.
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
index ed4aa4e7912c39fd3ed764eab623e64490735073..9f7e1fe8c97e254ee107bbf771550223d6219557 100644 (file)
@@ -54,6 +54,7 @@ config VIDEO_V4L1_COMPAT
 
 config VIDEO_V4L2
        bool
+       depends on VIDEO_DEV
        default y
 
 source "drivers/media/video/Kconfig"
index 67cefdd2334a5d31ec486f9e1cf996b70acc0852..2cc5caa26a0ac12828d6e6a7d0cf67ebaf91a807 100644 (file)
@@ -69,7 +69,6 @@ config DVB_USB_DIBUSB_MC
 config DVB_USB_DIB0700
        tristate "DiBcom DiB0700 USB DVB devices (see help for supported devices)"
        depends on DVB_USB
-       select DVB_DIB7000M
        select DVB_DIB3000MC
        select DVB_TUNER_MT2060
        help
index 8728cf347a717959adb4611892174d2d99adab02..572b2d9aa66a7300c8b2b37816ab8d8de0369bb2 100644 (file)
@@ -122,8 +122,9 @@ static int usb_allocate_stream_buffers(struct usb_data_stream *stream, int num,
                        usb_free_stream_buffers(stream);
                        return -ENOMEM;
                }
-               deb_mem("buffer %d: %p (dma: %u)\n",
-                       stream->buf_num, stream->buf_list[stream->buf_num], stream->dma_addr[stream->buf_num]);
+               deb_mem("buffer %d: %p (dma: %Lu)\n",
+                       stream->buf_num,
+stream->buf_list[stream->buf_num], (long long)stream->dma_addr[stream->buf_num]);
                memset(stream->buf_list[stream->buf_num],0,size);
                stream->state |= USB_STATE_URB_BUF;
        }
index cfab57d6bc4a7b9d8dfcf3a86c1252affa7167da..eb14106f66fa28a33777ce7c53cf368512ff9ac7 100644 (file)
@@ -449,7 +449,7 @@ static int __init gemtek_pci_init_module( void )
 
 static void __exit gemtek_pci_cleanup_module( void )
 {
-       return pci_unregister_driver( &gemtek_pci_driver );
+       pci_unregister_driver(&gemtek_pci_driver);
 }
 
 MODULE_AUTHOR( "Vladimir Shebordaev <vshebordaev@mail.ru>" );
index fe3c83ca3de3b2af716c64e5afc3d1cd35e17911..c9d8e3b9cc374387532a9696a59f9d92f1ab7784 100644 (file)
@@ -2994,6 +2994,34 @@ struct saa7134_board saa7134_boards[] = {
                        .amux = LINE1,
                },
        },
+       [SAA7134_BOARD_ASUS_EUROPA2_HYBRID] = {
+               .name           = "Asus Europa2 OEM",
+               .audio_clock    = 0x00187de7,
+               .tuner_type     = TUNER_PHILIPS_FMD1216ME_MK3,
+               .radio_type     = UNSET,
+               .tuner_addr     = ADDR_UNSET,
+               .radio_addr     = ADDR_UNSET,
+               .tda9887_conf   = TDA9887_PRESENT| TDA9887_PORT1_ACTIVE | TDA9887_PORT2_ACTIVE,
+               .mpeg           = SAA7134_MPEG_DVB,
+               .inputs = {{
+                       .name   = name_tv,
+                       .vmux   = 3,
+                       .amux   = TV,
+                       .tv     = 1,
+               },{
+                       .name   = name_comp1,
+                       .vmux   = 4,
+                       .amux   = LINE2,
+               },{
+                       .name   = name_svideo,
+                       .vmux   = 8,
+                       .amux   = LINE2,
+               }},
+               .radio = {
+                       .name   = name_radio,
+                       .amux   = LINE1,
+               },
+       },
 };
 
 const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
@@ -3596,6 +3624,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
                .subvendor    = 0x1461,
                .subdevice    = 0x2c00,
                .driver_data  = SAA7134_BOARD_AVERMEDIA_A16AR,
+       },{
+               .vendor       = PCI_VENDOR_ID_PHILIPS,
+               .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
+               .subvendor    = 0x1043,
+               .subdevice    = 0x4860,
+               .driver_data  = SAA7134_BOARD_ASUS_EUROPA2_HYBRID,
        },{
                /* --- boards without eeprom + subsystem ID --- */
                .vendor       = PCI_VENDOR_ID_PHILIPS,
@@ -3871,6 +3905,7 @@ int saa7134_board_init2(struct saa7134_dev *dev)
                break;
        case SAA7134_BOARD_PHILIPS_EUROPA:
        case SAA7134_BOARD_VIDEOMATE_DVBT_300:
+       case SAA7134_BOARD_ASUS_EUROPA2_HYBRID:
                /* The Philips EUROPA based hybrid boards have the tuner connected through
                 * the channel decoder. We have to make it transparent to find it
                 */
index fb741fa465a500effd4dd193f7aad4175309340c..1ba53b525ad27812a66e06b826c7d162f1b10d5a 100644 (file)
@@ -874,6 +874,34 @@ static struct tda1004x_config philips_tiger_config = {
 
 /* ------------------------------------------------------------------ */
 
+static int asus_p7131_dual_tuner_init(struct dvb_frontend *fe)
+{
+       struct saa7134_dev *dev = fe->dvb->priv;
+       static u8 data[] = { 0x3c, 0x33, 0x6a};
+       struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)};
+
+       if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1)
+               return -EIO;
+       /* make sure the DVB-T antenna input is set */
+       saa_setl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0200000);
+       return 0;
+}
+
+static int asus_p7131_dual_tuner_sleep(struct dvb_frontend *fe)
+{
+       struct saa7134_dev *dev = fe->dvb->priv;
+       static u8 data[] = { 0x3c, 0x33, 0x68};
+       struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)};
+
+       i2c_transfer(&dev->i2c_adap, &msg, 1);
+       philips_tda827xa_tuner_sleep( 0x61, fe);
+       /* reset antenna inputs for analog usage */
+       saa_clearl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0200000);
+       return 0;
+}
+
+/* ------------------------------------------------------------------ */
+
 static int lifeview_trio_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params)
 {
        int ret;
@@ -1148,8 +1176,8 @@ static int dvb_init(struct saa7134_dev *dev)
                                               &philips_tiger_config,
                                               &dev->i2c_adap);
                if (dev->dvb.frontend) {
-                       dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init;
-                       dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep;
+                       dev->dvb.frontend->ops.tuner_ops.init = asus_p7131_dual_tuner_init;
+                       dev->dvb.frontend->ops.tuner_ops.sleep = asus_p7131_dual_tuner_sleep;
                        dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params;
                }
                break;
@@ -1240,6 +1268,18 @@ static int dvb_init(struct saa7134_dev *dev)
                        }
                }
                break;
+       case SAA7134_BOARD_ASUS_EUROPA2_HYBRID:
+               dev->dvb.frontend = tda10046_attach(&medion_cardbus,
+                                                   &dev->i2c_adap);
+               if (dev->dvb.frontend) {
+                       dev->original_demod_sleep = dev->dvb.frontend->ops.sleep;
+                       dev->dvb.frontend->ops.sleep = philips_europa_demod_sleep;
+                       dev->dvb.frontend->ops.tuner_ops.init = philips_fmd1216_tuner_init;
+                       dev->dvb.frontend->ops.tuner_ops.sleep = philips_fmd1216_tuner_sleep;
+                       dev->dvb.frontend->ops.tuner_ops.set_params = philips_fmd1216_tuner_set_params;
+               }
+               break;
+
        default:
                printk("%s: Huh? unknown DVB card?\n",dev->name);
                break;
index d31220d204958f16ad7d4cdb9eea829b0369706f..dd759d6d8d25c88a831f4b0a9689d714222717fe 100644 (file)
@@ -72,12 +72,12 @@ static struct mainscan {
        int          carr;
 } mainscan[] = {
        {
-               .name = "M",
-               .std  = V4L2_STD_NTSC | V4L2_STD_PAL_M,
+               .name = "MN",
+               .std  = V4L2_STD_MN,
                .carr = 4500,
        },{
-               .name = "BG",
-               .std  = V4L2_STD_PAL_BG,
+               .name = "BGH",
+               .std  = V4L2_STD_B | V4L2_STD_GH,
                .carr = 5500,
        },{
                .name = "I",
@@ -85,7 +85,7 @@ static struct mainscan {
                .carr = 6000,
        },{
                .name = "DKL",
-               .std  = V4L2_STD_PAL_DK | V4L2_STD_SECAM,
+               .std  = V4L2_STD_DK | V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC,
                .carr = 6500,
        }
 };
@@ -93,76 +93,70 @@ static struct mainscan {
 static struct saa7134_tvaudio tvaudio[] = {
        {
                .name          = "PAL-B/G FM-stereo",
-               .std           = V4L2_STD_PAL,
+               .std           = V4L2_STD_PAL_BG,
                .mode          = TVAUDIO_FM_BG_STEREO,
                .carr1         = 5500,
                .carr2         = 5742,
        },{
                .name          = "PAL-D/K1 FM-stereo",
-               .std           = V4L2_STD_PAL,
+               .std           = V4L2_STD_PAL_DK,
                .carr1         = 6500,
                .carr2         = 6258,
                .mode          = TVAUDIO_FM_BG_STEREO,
        },{
                .name          = "PAL-D/K2 FM-stereo",
-               .std           = V4L2_STD_PAL,
+               .std           = V4L2_STD_PAL_DK,
                .carr1         = 6500,
                .carr2         = 6742,
                .mode          = TVAUDIO_FM_BG_STEREO,
        },{
                .name          = "PAL-D/K3 FM-stereo",
-               .std           = V4L2_STD_PAL,
+               .std           = V4L2_STD_PAL_DK,
                .carr1         = 6500,
                .carr2         = 5742,
                .mode          = TVAUDIO_FM_BG_STEREO,
        },{
                .name          = "PAL-B/G NICAM",
-               .std           = V4L2_STD_PAL,
+               .std           = V4L2_STD_PAL_BG,
                .carr1         = 5500,
                .carr2         = 5850,
                .mode          = TVAUDIO_NICAM_FM,
        },{
                .name          = "PAL-I NICAM",
-               .std           = V4L2_STD_PAL,
+               .std           = V4L2_STD_PAL_I,
                .carr1         = 6000,
                .carr2         = 6552,
                .mode          = TVAUDIO_NICAM_FM,
        },{
                .name          = "PAL-D/K NICAM",
-               .std           = V4L2_STD_PAL,
+               .std           = V4L2_STD_PAL_DK,
                .carr1         = 6500,
                .carr2         = 5850,
                .mode          = TVAUDIO_NICAM_FM,
        },{
                .name          = "SECAM-L NICAM",
-               .std           = V4L2_STD_SECAM,
+               .std           = V4L2_STD_SECAM_L,
                .carr1         = 6500,
                .carr2         = 5850,
                .mode          = TVAUDIO_NICAM_AM,
        },{
-               .name          = "SECAM-L MONO",
-               .std           = V4L2_STD_SECAM,
+               .name          = "SECAM-D/K NICAM",
+               .std           = V4L2_STD_SECAM_DK,
                .carr1         = 6500,
-               .carr2         = -1,
-               .mode          = TVAUDIO_AM_MONO,
+               .carr2         = 5850,
+               .mode          = TVAUDIO_NICAM_FM,
        },{
-               .name          = "SECAM-D/K",
-               .std           = V4L2_STD_SECAM,
-               .carr1         = 6500,
-               .carr2         = -1,
-               .mode          = TVAUDIO_FM_MONO,
+               .name          = "NTSC-A2 FM-stereo",
+               .std           = V4L2_STD_NTSC,
+               .carr1         = 4500,
+               .carr2         = 4724,
+               .mode          = TVAUDIO_FM_K_STEREO,
        },{
                .name          = "NTSC-M",
                .std           = V4L2_STD_NTSC,
                .carr1         = 4500,
                .carr2         = -1,
                .mode          = TVAUDIO_FM_MONO,
-       },{
-               .name          = "NTSC-A2 FM-stereo",
-               .std           = V4L2_STD_NTSC,
-               .carr1         = 4500,
-               .carr2         = 4724,
-               .mode          = TVAUDIO_FM_K_STEREO,
        }
 };
 #define TVAUDIO (sizeof(tvaudio)/sizeof(struct saa7134_tvaudio))
@@ -340,12 +334,6 @@ static void tvaudio_setmode(struct saa7134_dev *dev,
                saa_writeb(SAA7134_STEREO_DAC_OUTPUT_SELECT,  0xa1);
                saa_writeb(SAA7134_NICAM_CONFIG,              0x00);
                break;
-       case TVAUDIO_AM_MONO:
-               saa_writeb(SAA7134_DEMODULATOR,               0x12);
-               saa_writeb(SAA7134_DCXO_IDENT_CTRL,           0x00);
-               saa_writeb(SAA7134_FM_DEEMPHASIS,             0x44);
-               saa_writeb(SAA7134_STEREO_DAC_OUTPUT_SELECT,  0xa0);
-               break;
        case TVAUDIO_FM_SAT_STEREO:
                /* not implemented (yet) */
                break;
@@ -390,7 +378,6 @@ static int tvaudio_checkcarrier(struct saa7134_dev *dev, struct mainscan *scan)
                }
                printk("\n");
        }
-
        if (dev->tvnorm->id & scan->std) {
                tvaudio_setcarrier(dev,scan->carr-90,scan->carr-90);
                saa_readl(SAA7134_LEVEL_READOUT1 >> 2);
@@ -426,7 +413,6 @@ static int tvaudio_getstereo(struct saa7134_dev *dev, struct saa7134_tvaudio *au
 
        switch (audio->mode) {
        case TVAUDIO_FM_MONO:
-       case TVAUDIO_AM_MONO:
                return V4L2_TUNER_SUB_MONO;
        case TVAUDIO_FM_K_STEREO:
        case TVAUDIO_FM_BG_STEREO:
@@ -495,7 +481,6 @@ static int tvaudio_setstereo(struct saa7134_dev *dev, struct saa7134_tvaudio *au
 
        switch (audio->mode) {
        case TVAUDIO_FM_MONO:
-       case TVAUDIO_AM_MONO:
                /* nothing to do ... */
                break;
        case TVAUDIO_FM_K_STEREO:
@@ -556,6 +541,7 @@ static int tvaudio_thread(void *data)
 
                if (1 == nscan) {
                        /* only one candidate -- skip scan ;) */
+                       dprintk("only one main carrier candidate - skipping scan\n");
                        max1 = 12345;
                        carrier = default_carrier;
                } else {
@@ -603,7 +589,6 @@ static int tvaudio_thread(void *data)
                dev->automute = 0;
                saa_andorb(SAA7134_STEREO_DAC_OUTPUT_SELECT, 0x30, 0x00);
                saa7134_tvaudio_setmute(dev);
-
                /* find the exact tv audio norm */
                for (audio = UNSET, i = 0; i < TVAUDIO; i++) {
                        if (dev->tvnorm->id != UNSET &&
@@ -611,7 +596,7 @@ static int tvaudio_thread(void *data)
                                continue;
                        if (tvaudio[i].carr1 != carrier)
                                continue;
-
+                       /* Note: at least the primary carrier is right here */
                        if (UNSET == audio)
                                audio = i;
                        tvaudio_setmode(dev,&tvaudio[i],"trying");
@@ -626,6 +611,7 @@ static int tvaudio_thread(void *data)
                if (UNSET == audio)
                        continue;
                tvaudio_setmode(dev,&tvaudio[audio],"using");
+
                tvaudio_setstereo(dev,&tvaudio[audio],V4L2_TUNER_MODE_MONO);
                dev->tvaudio = &tvaudio[audio];
 
@@ -750,7 +736,6 @@ static int mute_input_7133(struct saa7134_dev *dev)
        int mask;
        struct saa7134_input *in;
 
-       /* Hac 0506 route OSS sound simultanously  */
        xbarin = 0x03;
        switch (dev->input->amux) {
        case TV:
@@ -834,18 +819,16 @@ static int tvaudio_thread_ddep(void *data)
                } else {
                        /* (let chip) scan for sound carrier */
                        norms = 0;
-                       if (dev->tvnorm->id & V4L2_STD_PAL) {
-                               dprintk("PAL scan\n");
-                               norms |= 0x2c; /* B/G + D/K + I */
-                       }
-                       if (dev->tvnorm->id & V4L2_STD_NTSC) {
-                               dprintk("NTSC scan\n");
-                               norms |= 0x40; /* M */
-                       }
-                       if (dev->tvnorm->id & V4L2_STD_SECAM) {
-                               dprintk("SECAM scan\n");
-                               norms |= 0x18; /* L + D/K */
-                       }
+                       if (dev->tvnorm->id & (V4L2_STD_B | V4L2_STD_GH))
+                               norms |= 0x04;
+                       if (dev->tvnorm->id & V4L2_STD_PAL_I)
+                               norms |= 0x20;
+                       if (dev->tvnorm->id & V4L2_STD_DK)
+                               norms |= 0x08;
+                       if (dev->tvnorm->id & V4L2_STD_MN)
+                               norms |= 0x40;
+                       if (dev->tvnorm->id & (V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC))
+                               norms |= 0x10;
                        if (0 == norms)
                                norms = 0x7c; /* all */
                        dprintk("scanning:%s%s%s%s%s\n",
@@ -1034,7 +1017,11 @@ int saa7134_tvaudio_fini(struct saa7134_dev *dev)
 
 int saa7134_tvaudio_do_scan(struct saa7134_dev *dev)
 {
-       if (dev->thread.pid >= 0) {
+       if (dev->input->amux != TV) {
+               dprintk("sound IF not in use, skipping scan\n");
+               dev->automute = 0;
+               saa7134_tvaudio_setmute(dev);
+       } else if (dev->thread.pid >= 0) {
                dev->thread.mode = UNSET;
                dev->thread.scan2++;
                wake_up_interruptible(&dev->thread.wq);
index 2c171af9a9f2fb868f81ded74eb70fba0c6353f2..203302f21827e5104e8b7d1b2485afbb369b76c2 100644 (file)
@@ -43,12 +43,16 @@ static unsigned int gbuffers      = 8;
 static unsigned int noninterlaced = 1;
 static unsigned int gbufsize      = 720*576*4;
 static unsigned int gbufsize_max  = 720*576*4;
+static char secam[] = "--";
 module_param(video_debug, int, 0644);
 MODULE_PARM_DESC(video_debug,"enable debug messages [video]");
 module_param(gbuffers, int, 0444);
 MODULE_PARM_DESC(gbuffers,"number of capture buffers, range 2-32");
 module_param(noninterlaced, int, 0644);
 MODULE_PARM_DESC(noninterlaced,"capture non interlaced video");
+module_param_string(secam, secam, sizeof(secam), 0644);
+MODULE_PARM_DESC(secam, "force SECAM variant, either DK,L or Lc");
+
 
 #define dprintk(fmt, arg...)   if (video_debug) \
        printk(KERN_DEBUG "%s/video: " fmt, dev->name , ## arg)
@@ -279,7 +283,43 @@ static struct saa7134_tvnorm tvnorms[] = {
                .id            = V4L2_STD_SECAM,
                NORM_625_50,
 
-               .sync_control  = 0x18, /* old: 0x58, */
+               .sync_control  = 0x18,
+               .luma_control  = 0x1b,
+               .chroma_ctrl1  = 0xd1,
+               .chroma_gain   = 0x80,
+               .chroma_ctrl2  = 0x00,
+               .vgate_misc    = 0x1c,
+
+       },{
+               .name          = "SECAM-DK",
+               .id            = V4L2_STD_SECAM_DK,
+               NORM_625_50,
+
+               .sync_control  = 0x18,
+               .luma_control  = 0x1b,
+               .chroma_ctrl1  = 0xd1,
+               .chroma_gain   = 0x80,
+               .chroma_ctrl2  = 0x00,
+               .vgate_misc    = 0x1c,
+
+       },{
+               .name          = "SECAM-L",
+               .id            = V4L2_STD_SECAM_L,
+               NORM_625_50,
+
+               .sync_control  = 0x18,
+               .luma_control  = 0x1b,
+               .chroma_ctrl1  = 0xd1,
+               .chroma_gain   = 0x80,
+               .chroma_ctrl2  = 0x00,
+               .vgate_misc    = 0x1c,
+
+       },{
+               .name          = "SECAM-Lc",
+               .id            = V4L2_STD_SECAM_LC,
+               NORM_625_50,
+
+               .sync_control  = 0x18,
                .luma_control  = 0x1b,
                .chroma_ctrl1  = 0xd1,
                .chroma_gain   = 0x80,
@@ -1769,6 +1809,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
        {
                v4l2_std_id *id = arg;
                unsigned int i;
+               v4l2_std_id fixup;
 
                for (i = 0; i < TVNORMS; i++)
                        if (*id == tvnorms[i].id)
@@ -1779,7 +1820,22 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
                                        break;
                if (i == TVNORMS)
                        return -EINVAL;
-
+               if ((*id & V4L2_STD_SECAM) && (secam[0] != '-')) {
+                       if (secam[0] == 'L' || secam[0] == 'l') {
+                               if (secam[1] == 'C' || secam[1] == 'c')
+                                       fixup = V4L2_STD_SECAM_LC;
+                               else
+                                       fixup = V4L2_STD_SECAM_L;
+                       } else {
+                               if (secam[0] == 'D' || secam[0] == 'd')
+                                       fixup = V4L2_STD_SECAM_DK;
+                               else
+                                       fixup = V4L2_STD_SECAM;
+                       }
+                       for (i = 0; i < TVNORMS; i++)
+                               if (fixup == tvnorms[i].id)
+                                       break;
+               }
                mutex_lock(&dev->lock);
                if (res_check(fh, RESOURCE_OVERLAY)) {
                        spin_lock_irqsave(&dev->slock,flags);
index 701a90942108d2946c8e04b6e4336923713b95a8..7cf96b430250013710409a118578d5129822b51a 100644 (file)
@@ -61,7 +61,6 @@ enum saa7134_tvaudio_mode {
        TVAUDIO_FM_K_STEREO   = 4,
        TVAUDIO_NICAM_AM      = 5,
        TVAUDIO_NICAM_FM      = 6,
-       TVAUDIO_AM_MONO       = 7
 };
 
 enum saa7134_audio_in {
@@ -227,6 +226,7 @@ struct saa7134_format {
 #define SAA7134_BOARD_FLYDVBS_LR300 97
 #define SAA7134_BOARD_PROTEUS_2309 98
 #define SAA7134_BOARD_AVERMEDIA_A16AR   99
+#define SAA7134_BOARD_ASUS_EUROPA2_HYBRID 100
 
 #define SAA7134_MAXBOARDS 8
 #define SAA7134_INPUT_MAX 8
index cd1502ac956056f5e0e461b3b7fcdeac076d25f4..e6baaee038bfde5d3843eb6a7a11879adc0a6df6 100644 (file)
@@ -222,8 +222,8 @@ hauppauge_tuner[] =
        { TUNER_TCL_2002MB,    "TCL M2523_3DB_E"},
        { TUNER_ABSENT,        "Philips 8275A"},
        { TUNER_ABSENT,        "Microtune MT2060"},
-       { TUNER_ABSENT,        "Philips FM1236 MK5"},
-       { TUNER_ABSENT,        "Philips FM1216ME MK5"},
+       { TUNER_PHILIPS_FM1236_MK3, "Philips FM1236 MK5"},
+       { TUNER_PHILIPS_FM1216ME_MK3, "Philips FM1216ME MK5"},
        { TUNER_ABSENT,        "TCL M2523_3DI_E"},
        { TUNER_ABSENT,        "Samsung THPD5222FG30A"},
        /* 120-129 */
index 9f21d0ba0f0f721df3d44cad9d8b8566288964cd..653822ce391c574492f5c78c677ad7414edcd696 100644 (file)
@@ -1278,9 +1278,7 @@ find_zr36057 (void)
 
        zoran_num = 0;
        while (zoran_num < BUZ_MAX &&
-              (dev =
-               pci_find_device(PCI_VENDOR_ID_ZORAN,
-                               PCI_DEVICE_ID_ZORAN_36057, dev)) != NULL) {
+              (dev = pci_get_device(PCI_VENDOR_ID_ZORAN, PCI_DEVICE_ID_ZORAN_36057, dev)) != NULL) {
                card_num = card[zoran_num];
                zr = &zoran[zoran_num];
                memset(zr, 0, sizeof(struct zoran));    // Just in case if previous cycle failed
@@ -1541,7 +1539,8 @@ find_zr36057 (void)
                                goto zr_detach_vfe;
                        }
                }
-
+               /* Success so keep the pci_dev referenced */
+               pci_dev_get(zr->pci_dev);
                zoran_num++;
                continue;
 
@@ -1563,6 +1562,9 @@ find_zr36057 (void)
                iounmap(zr->zr36057_mem);
                continue;
        }
+       if (dev)        /* Clean up ref count on early exit */
+               pci_dev_put(dev);
+
        if (zoran_num == 0) {
                dprintk(1, KERN_INFO "No known MJPEG cards found.\n");
        }
index 9240638a01342bca3ad81d7b463dc906b30764cd..b5ffe53c40d8ee275a66de704bd4f9dcddf2a5ed 100644 (file)
@@ -1840,16 +1840,16 @@ int __init find_zoran(void)
        struct zoran *ztv;
        struct pci_dev *dev = NULL;
        unsigned char revision;
-       int zoran_num=0;
+       int zoran_num = 0;
 
-       while ((dev = pci_find_device(PCI_VENDOR_ID_ZORAN,PCI_DEVICE_ID_ZORAN_36120, dev)))
+       while ((dev = pci_get_device(PCI_VENDOR_ID_ZORAN,PCI_DEVICE_ID_ZORAN_36120, dev)))
        {
                /* Ok, a ZR36120/ZR36125 found! */
                ztv = &zorans[zoran_num];
                ztv->dev = dev;
 
                if (pci_enable_device(dev))
-                       return -EIO;
+                       continue;
 
                pci_read_config_byte(dev, PCI_CLASS_REVISION, &revision);
                printk(KERN_INFO "zoran: Zoran %x (rev %d) ",
@@ -1867,17 +1867,18 @@ int __init find_zoran(void)
                {
                        iounmap(ztv->zoran_mem);
                        printk(KERN_ERR "zoran: Bad irq number or handler\n");
-                       return -EINVAL;
+                       continue;
                }
                if (result==-EBUSY)
                        printk(KERN_ERR "zoran: IRQ %d busy, change your PnP config in BIOS\n",dev->irq);
                if (result < 0) {
                        iounmap(ztv->zoran_mem);
-                       return result;
+                       continue;
                }
                /* Enable bus-mastering */
                pci_set_master(dev);
-
+               /* Keep a reference */
+               pci_dev_get(dev);
                zoran_num++;
        }
        if(zoran_num)
@@ -2041,6 +2042,9 @@ void release_zoran(int max)
                if (ztv->zoran_mem)
                        iounmap(ztv->zoran_mem);
 
+               /* Drop PCI device */
+               pci_dev_put(ztv->dev);
+
                video_unregister_device(&ztv->video_dev);
                video_unregister_device(&ztv->vbi_dev);
        }
@@ -2057,13 +2061,12 @@ int __init zr36120_init(void)
 
        handle_chipset();
        zoran_cards = find_zoran();
-       if (zoran_cards<0)
-               /* no cards found, no need for a driver */
+       if (zoran_cards <= 0)
                return -EIO;
 
        /* initialize Zorans */
        for (card=0; card<zoran_cards; card++) {
-               if (init_zoran(card)<0) {
+               if (init_zoran(card) < 0) {
                        /* only release the zorans we have registered */
                        release_zoran(card);
                        return -EIO;
index cef00744a9dc4dcadfeee83a3251efa8abbc5a04..d231efa624d4ab50905da8f9aefb4f437a4a64b2 100644 (file)
@@ -9,7 +9,6 @@
  * (at your option) any later version.
  */
 
-#include <linux/config.h>
 #include <linux/dma-mapping.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
index 1328e10caa358a64ab05911523926ef4521d9535..baaae3dbf2e6c2eb0d2931f8e18a0f4bb9c8f54e 100644 (file)
@@ -12,8 +12,6 @@
  * kind, whether express or implied.
  */
 
-
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
index 21dc68eff514c424a7771848347f78e66c7d6581..a43e24245b7e379644c4bc56f0bec5ba1cc72ffd 100644 (file)
@@ -21,8 +21,6 @@
  *
  *************************************************************************/
 
-#include <linux/config.h>
-
 #define DRV_NAME       "pcnet32"
 #ifdef CONFIG_PCNET32_NAPI
 #define DRV_VERSION    "1.33-NAPI"
index 94b47c8d0ab402c681bb73057adb71952ede69c1..f14e99276dbac0bc2ea40956718b39c8eae10436 100644 (file)
@@ -13,7 +13,6 @@
  * option) any later version.
  *
  */
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/string.h>
index f91028c5386d7da2b8237f251bfd50f1c4729256..67260eb3188af2d771e1966af647a118b789fa1d 100644 (file)
@@ -17,7 +17,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/string.h>
index 2f0b7772419276cd8f1f8b0bb7157973ecce0574..0b20dfacbf595c6fcc1c00855771688582f3780c 100644 (file)
@@ -19,7 +19,6 @@
  *                - Initial driver creation.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/version.h>
 
index ee2ccad70487cca1a60076d388e1eadf3760b55f..734adc9d5206c1f84177a5fadccc197264ffa0c5 100644 (file)
@@ -24,7 +24,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
index ece936ac29c731d3cc4d0773ea462386f4a8a19b..8f6f32fc61ffebd02ed30a7a8e41f9d5b67b7510 100644 (file)
@@ -66,7 +66,6 @@
  */
 /* ------ END OF USER CONFIGURABLE PARAMETERS ----- */
 
-#include  <linux/config.h>
 #include  <linux/stddef.h>
 #include  <linux/module.h>
 #include  <linux/kernel.h>
index 7511df3588e432461d165e43c339a99c910be818..ba8021427b884ea7942d1deb8084b30b8aaeb1f1 100644 (file)
@@ -73,7 +73,6 @@
  */
 /* ------ END OF USER CONFIGURABLE PARAMETERS ----- */
 
-#include  <linux/config.h>
 #include  <linux/stddef.h>
 #include  <linux/module.h>
 #include  <linux/kernel.h>
index 8edee745888a7371ab653534ed8e865ae4a83ccf..b0d502622d9452c9cdfa091d282d36e612104205 100644 (file)
@@ -299,33 +299,33 @@ config SERIAL_AMBA_PL011_CONSOLE
          your boot loader (lilo or loadlin) about how to pass options to the
          kernel at boot time.)
 
-config SERIAL_AT91
-       bool "AT91RM9200 / AT91SAM9261 serial port support"
-       depends on ARM && (ARCH_AT91RM9200 || ARCH_AT91SAM9261)
+config SERIAL_ATMEL
+       bool "AT91 / AT32 on-chip serial port support"
+       depends on (ARM && ARCH_AT91) || AVR32
        select SERIAL_CORE
        help
          This enables the driver for the on-chip UARTs of the Atmel
-         AT91RM9200 and AT91SAM926 processor.
+         AT91 and AT32 processors.
 
-config SERIAL_AT91_CONSOLE
-       bool "Support for console on AT91RM9200 / AT91SAM9261 serial port"
-       depends on SERIAL_AT91=y
+config SERIAL_ATMEL_CONSOLE
+       bool "Support for console on AT91 / AT32 serial port"
+       depends on SERIAL_ATMEL=y
        select SERIAL_CORE_CONSOLE
        help
-         Say Y here if you wish to use a UART on the Atmel AT91RM9200 or
-         AT91SAM9261 as the system console (the system console is the device
-         which receives all kernel messages and warnings and which allows
-         logins in single user mode).
+         Say Y here if you wish to use an on-chip UART on a Atmel
+         AT91 or AT32 processor as the system console (the system
+         console is the device which receives all kernel messages and
+         warnings and which allows logins in single user mode).
 
-config SERIAL_AT91_TTYAT
-       bool "Install as device ttyAT0-4 instead of ttyS0-4"
-       depends on SERIAL_AT91=y
+config SERIAL_ATMEL_TTYAT
+       bool "Install as device ttyATn instead of ttySn"
+       depends on SERIAL_ATMEL=y
        help
-         Say Y here if you wish to have the five internal AT91RM9200 UARTs
-         appear as /dev/ttyAT0-4 (major 204, minor 154-158) instead of the
-         normal /dev/ttyS0-4 (major 4, minor 64-68). This is necessary if
-         you also want other UARTs, such as external 8250/16C550 compatible
-         UARTs.
+         Say Y here if you wish to have the internal AT91 / AT32 UARTs
+         appear as /dev/ttyATn (major 204, minor starting at 154)
+         instead of the normal /dev/ttySn (major 4, minor starting at
+         64). This is necessary if you also want other UARTs, such as
+         external 8250/16C550 compatible UARTs.
          The ttySn nodes are legally reserved for the 8250 serial driver
          but are often misused by other serial drivers.
 
index 927faee0362ec1733d4b5a758e7f895209d75b60..b4d8a7c182e3a7b780cf2a9dfe8c87e4298055f2 100644 (file)
@@ -54,5 +54,5 @@ obj-$(CONFIG_SERIAL_TXX9) += serial_txx9.o
 obj-$(CONFIG_SERIAL_VR41XX) += vr41xx_siu.o
 obj-$(CONFIG_SERIAL_SGI_IOC4) += ioc4_serial.o
 obj-$(CONFIG_SERIAL_SGI_IOC3) += ioc3_serial.o
-obj-$(CONFIG_SERIAL_AT91) += at91_serial.o
+obj-$(CONFIG_SERIAL_ATMEL) += atmel_serial.o
 obj-$(CONFIG_SERIAL_NETX) += netx-serial.o
diff --git a/drivers/serial/at91_serial.c b/drivers/serial/at91_serial.c
deleted file mode 100644 (file)
index bf4bf10..0000000
+++ /dev/null
@@ -1,980 +0,0 @@
-/*
- *  linux/drivers/char/at91_serial.c
- *
- *  Driver for Atmel AT91RM9200 Serial ports
- *  Copyright (C) 2003 Rick Bronson
- *
- *  Based on drivers/char/serial_sa1100.c, by Deep Blue Solutions Ltd.
- *  Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
- *
- * 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
- *
- */
-#include <linux/module.h>
-#include <linux/tty.h>
-#include <linux/ioport.h>
-#include <linux/slab.h>
-#include <linux/init.h>
-#include <linux/serial.h>
-#include <linux/clk.h>
-#include <linux/console.h>
-#include <linux/sysrq.h>
-#include <linux/tty_flip.h>
-#include <linux/platform_device.h>
-
-#include <asm/io.h>
-
-#include <asm/arch/at91rm9200_usart.h>
-#include <asm/arch/at91rm9200_pdc.h>
-#include <asm/mach/serial_at91.h>
-#include <asm/arch/board.h>
-#include <asm/arch/system.h>
-#include <asm/arch/gpio.h>
-
-#if defined(CONFIG_SERIAL_AT91_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
-#define SUPPORT_SYSRQ
-#endif
-
-#include <linux/serial_core.h>
-
-#ifdef CONFIG_SERIAL_AT91_TTYAT
-
-/* Use device name ttyAT, major 204 and minor 154-169.  This is necessary if we
- * should coexist with the 8250 driver, such as if we have an external 16C550
- * UART. */
-#define SERIAL_AT91_MAJOR      204
-#define MINOR_START            154
-#define AT91_DEVICENAME                "ttyAT"
-
-#else
-
-/* Use device name ttyS, major 4, minor 64-68.  This is the usual serial port
- * name, but it is legally reserved for the 8250 driver. */
-#define SERIAL_AT91_MAJOR      TTY_MAJOR
-#define MINOR_START            64
-#define AT91_DEVICENAME                "ttyS"
-
-#endif
-
-#define AT91_ISR_PASS_LIMIT    256
-
-#define UART_PUT_CR(port,v)    writel(v, (port)->membase + AT91_US_CR)
-#define UART_GET_MR(port)      readl((port)->membase + AT91_US_MR)
-#define UART_PUT_MR(port,v)    writel(v, (port)->membase + AT91_US_MR)
-#define UART_PUT_IER(port,v)   writel(v, (port)->membase + AT91_US_IER)
-#define UART_PUT_IDR(port,v)   writel(v, (port)->membase + AT91_US_IDR)
-#define UART_GET_IMR(port)     readl((port)->membase + AT91_US_IMR)
-#define UART_GET_CSR(port)     readl((port)->membase + AT91_US_CSR)
-#define UART_GET_CHAR(port)    readl((port)->membase + AT91_US_RHR)
-#define UART_PUT_CHAR(port,v)  writel(v, (port)->membase + AT91_US_THR)
-#define UART_GET_BRGR(port)    readl((port)->membase + AT91_US_BRGR)
-#define UART_PUT_BRGR(port,v)  writel(v, (port)->membase + AT91_US_BRGR)
-#define UART_PUT_RTOR(port,v)  writel(v, (port)->membase + AT91_US_RTOR)
-
-// #define UART_GET_CR(port)   readl((port)->membase + AT91_US_CR)             // is write-only
-
- /* PDC registers */
-#define UART_PUT_PTCR(port,v)  writel(v, (port)->membase + AT91_PDC_PTCR)
-#define UART_GET_PTSR(port)    readl((port)->membase + AT91_PDC_PTSR)
-
-#define UART_PUT_RPR(port,v)   writel(v, (port)->membase + AT91_PDC_RPR)
-#define UART_GET_RPR(port)     readl((port)->membase + AT91_PDC_RPR)
-#define UART_PUT_RCR(port,v)   writel(v, (port)->membase + AT91_PDC_RCR)
-#define UART_PUT_RNPR(port,v)  writel(v, (port)->membase + AT91_PDC_RNPR)
-#define UART_PUT_RNCR(port,v)  writel(v, (port)->membase + AT91_PDC_RNCR)
-
-#define UART_PUT_TPR(port,v)   writel(v, (port)->membase + AT91_PDC_TPR)
-#define UART_PUT_TCR(port,v)   writel(v, (port)->membase + AT91_PDC_TCR)
-//#define UART_PUT_TNPR(port,v)        writel(v, (port)->membase + AT91_PDC_TNPR)
-//#define UART_PUT_TNCR(port,v)        writel(v, (port)->membase + AT91_PDC_TNCR)
-
-static int (*at91_open)(struct uart_port *);
-static void (*at91_close)(struct uart_port *);
-
-/*
- * We wrap our port structure around the generic uart_port.
- */
-struct at91_uart_port {
-       struct uart_port        uart;           /* uart */
-       struct clk              *clk;           /* uart clock */
-       unsigned short          suspended;      /* is port suspended? */
-};
-
-static struct at91_uart_port at91_ports[AT91_NR_UART];
-
-#ifdef SUPPORT_SYSRQ
-static struct console at91_console;
-#endif
-
-/*
- * Return TIOCSER_TEMT when transmitter FIFO and Shift register is empty.
- */
-static u_int at91_tx_empty(struct uart_port *port)
-{
-       return (UART_GET_CSR(port) & AT91_US_TXEMPTY) ? TIOCSER_TEMT : 0;
-}
-
-/*
- * Set state of the modem control output lines
- */
-static void at91_set_mctrl(struct uart_port *port, u_int mctrl)
-{
-       unsigned int control = 0;
-       unsigned int mode;
-
-       if (arch_identify() == ARCH_ID_AT91RM9200) {
-               /*
-                * AT91RM9200 Errata #39: RTS0 is not internally connected to PA21.
-                *  We need to drive the pin manually.
-                */
-               if (port->mapbase == AT91RM9200_BASE_US0) {
-                       if (mctrl & TIOCM_RTS)
-                               at91_set_gpio_value(AT91_PIN_PA21, 0);
-                       else
-                               at91_set_gpio_value(AT91_PIN_PA21, 1);
-               }
-       }
-
-       if (mctrl & TIOCM_RTS)
-               control |= AT91_US_RTSEN;
-       else
-               control |= AT91_US_RTSDIS;
-
-       if (mctrl & TIOCM_DTR)
-               control |= AT91_US_DTREN;
-       else
-               control |= AT91_US_DTRDIS;
-
-       UART_PUT_CR(port, control);
-
-       /* Local loopback mode? */
-       mode = UART_GET_MR(port) & ~AT91_US_CHMODE;
-       if (mctrl & TIOCM_LOOP)
-               mode |= AT91_US_CHMODE_LOC_LOOP;
-       else
-               mode |= AT91_US_CHMODE_NORMAL;
-       UART_PUT_MR(port, mode);
-}
-
-/*
- * Get state of the modem control input lines
- */
-static u_int at91_get_mctrl(struct uart_port *port)
-{
-       unsigned int status, ret = 0;
-
-       status = UART_GET_CSR(port);
-
-       /*
-        * The control signals are active low.
-        */
-       if (!(status & AT91_US_DCD))
-               ret |= TIOCM_CD;
-       if (!(status & AT91_US_CTS))
-               ret |= TIOCM_CTS;
-       if (!(status & AT91_US_DSR))
-               ret |= TIOCM_DSR;
-       if (!(status & AT91_US_RI))
-               ret |= TIOCM_RI;
-
-       return ret;
-}
-
-/*
- * Stop transmitting.
- */
-static void at91_stop_tx(struct uart_port *port)
-{
-       struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
-
-       UART_PUT_IDR(port, AT91_US_TXRDY);
-}
-
-/*
- * Start transmitting.
- */
-static void at91_start_tx(struct uart_port *port)
-{
-       struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
-
-       UART_PUT_IER(port, AT91_US_TXRDY);
-}
-
-/*
- * Stop receiving - port is in process of being closed.
- */
-static void at91_stop_rx(struct uart_port *port)
-{
-       struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
-
-       UART_PUT_IDR(port, AT91_US_RXRDY);
-}
-
-/*
- * Enable modem status interrupts
- */
-static void at91_enable_ms(struct uart_port *port)
-{
-       UART_PUT_IER(port, AT91_US_RIIC | AT91_US_DSRIC | AT91_US_DCDIC | AT91_US_CTSIC);
-}
-
-/*
- * Control the transmission of a break signal
- */
-static void at91_break_ctl(struct uart_port *port, int break_state)
-{
-       if (break_state != 0)
-               UART_PUT_CR(port, AT91_US_STTBRK);      /* start break */
-       else
-               UART_PUT_CR(port, AT91_US_STPBRK);      /* stop break */
-}
-
-/*
- * Characters received (called from interrupt handler)
- */
-static void at91_rx_chars(struct uart_port *port, struct pt_regs *regs)
-{
-       struct tty_struct *tty = port->info->tty;
-       unsigned int status, ch, flg;
-
-       status = UART_GET_CSR(port);
-       while (status & AT91_US_RXRDY) {
-               ch = UART_GET_CHAR(port);
-
-               port->icount.rx++;
-
-               flg = TTY_NORMAL;
-
-               /*
-                * note that the error handling code is
-                * out of the main execution path
-                */
-               if (unlikely(status & (AT91_US_PARE | AT91_US_FRAME | AT91_US_OVRE | AT91_US_RXBRK))) {
-                       UART_PUT_CR(port, AT91_US_RSTSTA);      /* clear error */
-                       if (status & AT91_US_RXBRK) {
-                               status &= ~(AT91_US_PARE | AT91_US_FRAME);      /* ignore side-effect */
-                               port->icount.brk++;
-                               if (uart_handle_break(port))
-                                       goto ignore_char;
-                       }
-                       if (status & AT91_US_PARE)
-                               port->icount.parity++;
-                       if (status & AT91_US_FRAME)
-                               port->icount.frame++;
-                       if (status & AT91_US_OVRE)
-                               port->icount.overrun++;
-
-                       status &= port->read_status_mask;
-
-                       if (status & AT91_US_RXBRK)
-                               flg = TTY_BREAK;
-                       else if (status & AT91_US_PARE)
-                               flg = TTY_PARITY;
-                       else if (status & AT91_US_FRAME)
-                               flg = TTY_FRAME;
-               }
-
-               if (uart_handle_sysrq_char(port, ch, regs))
-                       goto ignore_char;
-
-               uart_insert_char(port, status, AT91_US_OVRE, ch, flg);
-
-       ignore_char:
-               status = UART_GET_CSR(port);
-       }
-
-       tty_flip_buffer_push(tty);
-}
-
-/*
- * Transmit characters (called from interrupt handler)
- */
-static void at91_tx_chars(struct uart_port *port)
-{
-       struct circ_buf *xmit = &port->info->xmit;
-
-       if (port->x_char) {
-               UART_PUT_CHAR(port, port->x_char);
-               port->icount.tx++;
-               port->x_char = 0;
-               return;
-       }
-       if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
-               at91_stop_tx(port);
-               return;
-       }
-
-       while (UART_GET_CSR(port) & AT91_US_TXRDY) {
-               UART_PUT_CHAR(port, xmit->buf[xmit->tail]);
-               xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
-               port->icount.tx++;
-               if (uart_circ_empty(xmit))
-                       break;
-       }
-
-       if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
-               uart_write_wakeup(port);
-
-       if (uart_circ_empty(xmit))
-               at91_stop_tx(port);
-}
-
-/*
- * Interrupt handler
- */
-static irqreturn_t at91_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-       struct uart_port *port = dev_id;
-       struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
-       unsigned int status, pending, pass_counter = 0;
-
-       status = UART_GET_CSR(port);
-       pending = status & UART_GET_IMR(port);
-       while (pending) {
-               /* Interrupt receive */
-               if (pending & AT91_US_RXRDY)
-                       at91_rx_chars(port, regs);
-
-               // TODO: All reads to CSR will clear these interrupts!
-               if (pending & AT91_US_RIIC) port->icount.rng++;
-               if (pending & AT91_US_DSRIC) port->icount.dsr++;
-               if (pending & AT91_US_DCDIC)
-                       uart_handle_dcd_change(port, !(status & AT91_US_DCD));
-               if (pending & AT91_US_CTSIC)
-                       uart_handle_cts_change(port, !(status & AT91_US_CTS));
-               if (pending & (AT91_US_RIIC | AT91_US_DSRIC | AT91_US_DCDIC | AT91_US_CTSIC))
-                       wake_up_interruptible(&port->info->delta_msr_wait);
-
-               /* Interrupt transmit */
-               if (pending & AT91_US_TXRDY)
-                       at91_tx_chars(port);
-
-               if (pass_counter++ > AT91_ISR_PASS_LIMIT)
-                       break;
-
-               status = UART_GET_CSR(port);
-               pending = status & UART_GET_IMR(port);
-       }
-       return IRQ_HANDLED;
-}
-
-/*
- * Perform initialization and enable port for reception
- */
-static int at91_startup(struct uart_port *port)
-{
-       struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
-       int retval;
-
-       /*
-        * Ensure that no interrupts are enabled otherwise when
-        * request_irq() is called we could get stuck trying to
-        * handle an unexpected interrupt
-        */
-       UART_PUT_IDR(port, -1);
-
-       /*
-        * Allocate the IRQ
-        */
-       retval = request_irq(port->irq, at91_interrupt, IRQF_SHARED, "at91_serial", port);
-       if (retval) {
-               printk("at91_serial: at91_startup - Can't get irq\n");
-               return retval;
-       }
-
-       /*
-        * If there is a specific "open" function (to register
-        * control line interrupts)
-        */
-       if (at91_open) {
-               retval = at91_open(port);
-               if (retval) {
-                       free_irq(port->irq, port);
-                       return retval;
-               }
-       }
-
-       /*
-        * Finally, enable the serial port
-        */
-       UART_PUT_CR(port, AT91_US_RSTSTA | AT91_US_RSTRX);
-       UART_PUT_CR(port, AT91_US_TXEN | AT91_US_RXEN);         /* enable xmit & rcvr */
-
-       UART_PUT_IER(port, AT91_US_RXRDY);              /* enable receive only */
-
-       return 0;
-}
-
-/*
- * Disable the port
- */
-static void at91_shutdown(struct uart_port *port)
-{
-       struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
-
-       /*
-        * Disable all interrupts, port and break condition.
-        */
-       UART_PUT_CR(port, AT91_US_RSTSTA);
-       UART_PUT_IDR(port, -1);
-
-       /*
-        * Free the interrupt
-        */
-       free_irq(port->irq, port);
-
-       /*
-        * If there is a specific "close" function (to unregister
-        * control line interrupts)
-        */
-       if (at91_close)
-               at91_close(port);
-}
-
-/*
- * Power / Clock management.
- */
-static void at91_serial_pm(struct uart_port *port, unsigned int state, unsigned int oldstate)
-{
-       struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
-
-       switch (state) {
-               case 0:
-                       /*
-                        * Enable the peripheral clock for this serial port.
-                        * This is called on uart_open() or a resume event.
-                        */
-                       clk_enable(at91_port->clk);
-                       break;
-               case 3:
-                       /*
-                        * Disable the peripheral clock for this serial port.
-                        * This is called on uart_close() or a suspend event.
-                        */
-                       clk_disable(at91_port->clk);
-                       break;
-               default:
-                       printk(KERN_ERR "at91_serial: unknown pm %d\n", state);
-       }
-}
-
-/*
- * Change the port parameters
- */
-static void at91_set_termios(struct uart_port *port, struct termios * termios, struct termios * old)
-{
-       unsigned long flags;
-       unsigned int mode, imr, quot, baud;
-
-       baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
-       quot = uart_get_divisor(port, baud);
-
-       /* Get current mode register */
-       mode = UART_GET_MR(port) & ~(AT91_US_CHRL | AT91_US_NBSTOP | AT91_US_PAR);
-
-       /* byte size */
-       switch (termios->c_cflag & CSIZE) {
-       case CS5:
-               mode |= AT91_US_CHRL_5;
-               break;
-       case CS6:
-               mode |= AT91_US_CHRL_6;
-               break;
-       case CS7:
-               mode |= AT91_US_CHRL_7;
-               break;
-       default:
-               mode |= AT91_US_CHRL_8;
-               break;
-       }
-
-       /* stop bits */
-       if (termios->c_cflag & CSTOPB)
-               mode |= AT91_US_NBSTOP_2;
-
-       /* parity */
-       if (termios->c_cflag & PARENB) {
-               if (termios->c_cflag & CMSPAR) {                        /* Mark or Space parity */
-                       if (termios->c_cflag & PARODD)
-                               mode |= AT91_US_PAR_MARK;
-                       else
-                               mode |= AT91_US_PAR_SPACE;
-               }
-               else if (termios->c_cflag & PARODD)
-                       mode |= AT91_US_PAR_ODD;
-               else
-                       mode |= AT91_US_PAR_EVEN;
-       }
-       else
-               mode |= AT91_US_PAR_NONE;
-
-       spin_lock_irqsave(&port->lock, flags);
-
-       port->read_status_mask = AT91_US_OVRE;
-       if (termios->c_iflag & INPCK)
-               port->read_status_mask |= (AT91_US_FRAME | AT91_US_PARE);
-       if (termios->c_iflag & (BRKINT | PARMRK))
-               port->read_status_mask |= AT91_US_RXBRK;
-
-       /*
-        * Characters to ignore
-        */
-       port->ignore_status_mask = 0;
-       if (termios->c_iflag & IGNPAR)
-               port->ignore_status_mask |= (AT91_US_FRAME | AT91_US_PARE);
-       if (termios->c_iflag & IGNBRK) {
-               port->ignore_status_mask |= AT91_US_RXBRK;
-               /*
-                * If we're ignoring parity and break indicators,
-                * ignore overruns too (for real raw support).
-                */
-               if (termios->c_iflag & IGNPAR)
-                       port->ignore_status_mask |= AT91_US_OVRE;
-       }
-
-       // TODO: Ignore all characters if CREAD is set.
-
-       /* update the per-port timeout */
-       uart_update_timeout(port, termios->c_cflag, baud);
-
-       /* disable interrupts and drain transmitter */
-       imr = UART_GET_IMR(port);       /* get interrupt mask */
-       UART_PUT_IDR(port, -1);         /* disable all interrupts */
-       while (!(UART_GET_CSR(port) & AT91_US_TXEMPTY)) { barrier(); }
-
-       /* disable receiver and transmitter */
-       UART_PUT_CR(port, AT91_US_TXDIS | AT91_US_RXDIS);
-
-       /* set the parity, stop bits and data size */
-       UART_PUT_MR(port, mode);
-
-       /* set the baud rate */
-       UART_PUT_BRGR(port, quot);
-       UART_PUT_CR(port, AT91_US_RSTSTA | AT91_US_RSTRX);
-       UART_PUT_CR(port, AT91_US_TXEN | AT91_US_RXEN);
-
-       /* restore interrupts */
-       UART_PUT_IER(port, imr);
-
-       /* CTS flow-control and modem-status interrupts */
-       if (UART_ENABLE_MS(port, termios->c_cflag))
-               port->ops->enable_ms(port);
-
-       spin_unlock_irqrestore(&port->lock, flags);
-}
-
-/*
- * Return string describing the specified port
- */
-static const char *at91_type(struct uart_port *port)
-{
-       return (port->type == PORT_AT91) ? "AT91_SERIAL" : NULL;
-}
-
-/*
- * Release the memory region(s) being used by 'port'.
- */
-static void at91_release_port(struct uart_port *port)
-{
-       struct platform_device *pdev = to_platform_device(port->dev);
-       int size = pdev->resource[0].end - pdev->resource[0].start + 1;
-
-       release_mem_region(port->mapbase, size);
-
-       if (port->flags & UPF_IOREMAP) {
-               iounmap(port->membase);
-               port->membase = NULL;
-       }
-}
-
-/*
- * Request the memory region(s) being used by 'port'.
- */
-static int at91_request_port(struct uart_port *port)
-{
-       struct platform_device *pdev = to_platform_device(port->dev);
-       int size = pdev->resource[0].end - pdev->resource[0].start + 1;
-
-       if (!request_mem_region(port->mapbase, size, "at91_serial"))
-               return -EBUSY;
-
-       if (port->flags & UPF_IOREMAP) {
-               port->membase = ioremap(port->mapbase, size);
-               if (port->membase == NULL) {
-                       release_mem_region(port->mapbase, size);
-                       return -ENOMEM;
-               }
-       }
-
-       return 0;
-}
-
-/*
- * Configure/autoconfigure the port.
- */
-static void at91_config_port(struct uart_port *port, int flags)
-{
-       if (flags & UART_CONFIG_TYPE) {
-               port->type = PORT_AT91;
-               at91_request_port(port);
-       }
-}
-
-/*
- * Verify the new serial_struct (for TIOCSSERIAL).
- */
-static int at91_verify_port(struct uart_port *port, struct serial_struct *ser)
-{
-       int ret = 0;
-       if (ser->type != PORT_UNKNOWN && ser->type != PORT_AT91)
-               ret = -EINVAL;
-       if (port->irq != ser->irq)
-               ret = -EINVAL;
-       if (ser->io_type != SERIAL_IO_MEM)
-               ret = -EINVAL;
-       if (port->uartclk / 16 != ser->baud_base)
-               ret = -EINVAL;
-       if ((void *)port->mapbase != ser->iomem_base)
-               ret = -EINVAL;
-       if (port->iobase != ser->port)
-               ret = -EINVAL;
-       if (ser->hub6 != 0)
-               ret = -EINVAL;
-       return ret;
-}
-
-static struct uart_ops at91_pops = {
-       .tx_empty       = at91_tx_empty,
-       .set_mctrl      = at91_set_mctrl,
-       .get_mctrl      = at91_get_mctrl,
-       .stop_tx        = at91_stop_tx,
-       .start_tx       = at91_start_tx,
-       .stop_rx        = at91_stop_rx,
-       .enable_ms      = at91_enable_ms,
-       .break_ctl      = at91_break_ctl,
-       .startup        = at91_startup,
-       .shutdown       = at91_shutdown,
-       .set_termios    = at91_set_termios,
-       .type           = at91_type,
-       .release_port   = at91_release_port,
-       .request_port   = at91_request_port,
-       .config_port    = at91_config_port,
-       .verify_port    = at91_verify_port,
-       .pm             = at91_serial_pm,
-};
-
-/*
- * Configure the port from the platform device resource info.
- */
-static void __devinit at91_init_port(struct at91_uart_port *at91_port, struct platform_device *pdev)
-{
-       struct uart_port *port = &at91_port->uart;
-       struct at91_uart_data *data = pdev->dev.platform_data;
-
-       port->iotype    = UPIO_MEM;
-       port->flags     = UPF_BOOT_AUTOCONF;
-       port->ops       = &at91_pops;
-       port->fifosize  = 1;
-       port->line      = pdev->id;
-       port->dev       = &pdev->dev;
-
-       port->mapbase   = pdev->resource[0].start;
-       port->irq       = pdev->resource[1].start;
-
-       if (port->mapbase == AT91_VA_BASE_SYS + AT91_DBGU)              /* Part of system perpherals - already mapped */
-               port->membase = (void __iomem *) port->mapbase;
-       else {
-               port->flags     |= UPF_IOREMAP;
-               port->membase   = NULL;
-       }
-
-       if (!at91_port->clk) {          /* for console, the clock could already be configured */
-               at91_port->clk = clk_get(&pdev->dev, "usart");
-               clk_enable(at91_port->clk);
-               port->uartclk = clk_get_rate(at91_port->clk);
-       }
-}
-
-/*
- * Register board-specific modem-control line handlers.
- */
-void __init at91_register_uart_fns(struct at91_port_fns *fns)
-{
-       if (fns->enable_ms)
-               at91_pops.enable_ms = fns->enable_ms;
-       if (fns->get_mctrl)
-               at91_pops.get_mctrl = fns->get_mctrl;
-       if (fns->set_mctrl)
-               at91_pops.set_mctrl = fns->set_mctrl;
-       at91_open          = fns->open;
-       at91_close         = fns->close;
-       at91_pops.pm       = fns->pm;
-       at91_pops.set_wake = fns->set_wake;
-}
-
-
-#ifdef CONFIG_SERIAL_AT91_CONSOLE
-static void at91_console_putchar(struct uart_port *port, int ch)
-{
-       while (!(UART_GET_CSR(port) & AT91_US_TXRDY))
-               barrier();
-       UART_PUT_CHAR(port, ch);
-}
-
-/*
- * Interrupts are disabled on entering
- */
-static void at91_console_write(struct console *co, const char *s, u_int count)
-{
-       struct uart_port *port = &at91_ports[co->index].uart;
-       unsigned int status, imr;
-
-       /*
-        *      First, save IMR and then disable interrupts
-        */
-       imr = UART_GET_IMR(port);       /* get interrupt mask */
-       UART_PUT_IDR(port, AT91_US_RXRDY | AT91_US_TXRDY);
-
-       uart_console_write(port, s, count, at91_console_putchar);
-
-       /*
-        *      Finally, wait for transmitter to become empty
-        *      and restore IMR
-        */
-       do {
-               status = UART_GET_CSR(port);
-       } while (!(status & AT91_US_TXRDY));
-       UART_PUT_IER(port, imr);        /* set interrupts back the way they were */
-}
-
-/*
- * If the port was already initialised (eg, by a boot loader), try to determine
- * the current setup.
- */
-static void __init at91_console_get_options(struct uart_port *port, int *baud, int *parity, int *bits)
-{
-       unsigned int mr, quot;
-
-// TODO: CR is a write-only register
-//     unsigned int cr;
-//
-//     cr = UART_GET_CR(port) & (AT91_US_RXEN | AT91_US_TXEN);
-//     if (cr == (AT91_US_RXEN | AT91_US_TXEN)) {
-//             /* ok, the port was enabled */
-//     }
-
-       mr = UART_GET_MR(port) & AT91_US_CHRL;
-       if (mr == AT91_US_CHRL_8)
-               *bits = 8;
-       else
-               *bits = 7;
-
-       mr = UART_GET_MR(port) & AT91_US_PAR;
-       if (mr == AT91_US_PAR_EVEN)
-               *parity = 'e';
-       else if (mr == AT91_US_PAR_ODD)
-               *parity = 'o';
-
-       quot = UART_GET_BRGR(port);
-       *baud = port->uartclk / (16 * (quot));
-}
-
-static int __init at91_console_setup(struct console *co, char *options)
-{
-       struct uart_port *port = &at91_ports[co->index].uart;
-       int baud = 115200;
-       int bits = 8;
-       int parity = 'n';
-       int flow = 'n';
-
-       if (port->membase == 0)         /* Port not initialized yet - delay setup */
-               return -ENODEV;
-
-       UART_PUT_IDR(port, -1);                         /* disable interrupts */
-       UART_PUT_CR(port, AT91_US_RSTSTA | AT91_US_RSTRX);
-       UART_PUT_CR(port, AT91_US_TXEN | AT91_US_RXEN);
-
-       if (options)
-               uart_parse_options(options, &baud, &parity, &bits, &flow);
-       else
-               at91_console_get_options(port, &baud, &parity, &bits);
-
-       return uart_set_options(port, co, baud, parity, bits, flow);
-}
-
-static struct uart_driver at91_uart;
-
-static struct console at91_console = {
-       .name           = AT91_DEVICENAME,
-       .write          = at91_console_write,
-       .device         = uart_console_device,
-       .setup          = at91_console_setup,
-       .flags          = CON_PRINTBUFFER,
-       .index          = -1,
-       .data           = &at91_uart,
-};
-
-#define AT91_CONSOLE_DEVICE    &at91_console
-
-/*
- * Early console initialization (before VM subsystem initialized).
- */
-static int __init at91_console_init(void)
-{
-       if (at91_default_console_device) {
-               add_preferred_console(AT91_DEVICENAME, at91_default_console_device->id, NULL);
-               at91_init_port(&(at91_ports[at91_default_console_device->id]), at91_default_console_device);
-               register_console(&at91_console);
-       }
-
-       return 0;
-}
-console_initcall(at91_console_init);
-
-/*
- * Late console initialization.
- */
-static int __init at91_late_console_init(void)
-{
-       if (at91_default_console_device && !(at91_console.flags & CON_ENABLED))
-               register_console(&at91_console);
-
-       return 0;
-}
-core_initcall(at91_late_console_init);
-
-#else
-#define AT91_CONSOLE_DEVICE    NULL
-#endif
-
-static struct uart_driver at91_uart = {
-       .owner                  = THIS_MODULE,
-       .driver_name            = "at91_serial",
-       .dev_name               = AT91_DEVICENAME,
-       .major                  = SERIAL_AT91_MAJOR,
-       .minor                  = MINOR_START,
-       .nr                     = AT91_NR_UART,
-       .cons                   = AT91_CONSOLE_DEVICE,
-};
-
-#ifdef CONFIG_PM
-static int at91_serial_suspend(struct platform_device *pdev, pm_message_t state)
-{
-       struct uart_port *port = platform_get_drvdata(pdev);
-       struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
-
-       if (device_may_wakeup(&pdev->dev) && !at91_suspend_entering_slow_clock())
-               enable_irq_wake(port->irq);
-       else {
-               disable_irq_wake(port->irq);
-               uart_suspend_port(&at91_uart, port);
-               at91_port->suspended = 1;
-       }
-
-       return 0;
-}
-
-static int at91_serial_resume(struct platform_device *pdev)
-{
-       struct uart_port *port = platform_get_drvdata(pdev);
-       struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
-
-       if (at91_port->suspended) {
-               uart_resume_port(&at91_uart, port);
-               at91_port->suspended = 0;
-       }
-
-       return 0;
-}
-#else
-#define at91_serial_suspend NULL
-#define at91_serial_resume NULL
-#endif
-
-static int __devinit at91_serial_probe(struct platform_device *pdev)
-{
-       struct at91_uart_port *port;
-       int ret;
-
-       port = &at91_ports[pdev->id];
-       at91_init_port(port, pdev);
-
-       ret = uart_add_one_port(&at91_uart, &port->uart);
-       if (!ret) {
-               device_init_wakeup(&pdev->dev, 1);
-               platform_set_drvdata(pdev, port);
-       }
-
-       return ret;
-}
-
-static int __devexit at91_serial_remove(struct platform_device *pdev)
-{
-       struct uart_port *port = platform_get_drvdata(pdev);
-       struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
-       int ret = 0;
-
-       clk_disable(at91_port->clk);
-       clk_put(at91_port->clk);
-
-       device_init_wakeup(&pdev->dev, 0);
-       platform_set_drvdata(pdev, NULL);
-
-       if (port) {
-               ret = uart_remove_one_port(&at91_uart, port);
-               kfree(port);
-       }
-
-       return ret;
-}
-
-static struct platform_driver at91_serial_driver = {
-       .probe          = at91_serial_probe,
-       .remove         = __devexit_p(at91_serial_remove),
-       .suspend        = at91_serial_suspend,
-       .resume         = at91_serial_resume,
-       .driver         = {
-               .name   = "at91_usart",
-               .owner  = THIS_MODULE,
-       },
-};
-
-static int __init at91_serial_init(void)
-{
-       int ret;
-
-       ret = uart_register_driver(&at91_uart);
-       if (ret)
-               return ret;
-
-       ret = platform_driver_register(&at91_serial_driver);
-       if (ret)
-               uart_unregister_driver(&at91_uart);
-
-       return ret;
-}
-
-static void __exit at91_serial_exit(void)
-{
-       platform_driver_unregister(&at91_serial_driver);
-       uart_unregister_driver(&at91_uart);
-}
-
-module_init(at91_serial_init);
-module_exit(at91_serial_exit);
-
-MODULE_AUTHOR("Rick Bronson");
-MODULE_DESCRIPTION("AT91 generic serial port driver");
-MODULE_LICENSE("GPL");
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
new file mode 100644 (file)
index 0000000..955c46d
--- /dev/null
@@ -0,0 +1,992 @@
+/*
+ *  linux/drivers/char/at91_serial.c
+ *
+ *  Driver for Atmel AT91 / AT32 Serial ports
+ *  Copyright (C) 2003 Rick Bronson
+ *
+ *  Based on drivers/char/serial_sa1100.c, by Deep Blue Solutions Ltd.
+ *  Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
+ *
+ * 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
+ *
+ */
+#include <linux/module.h>
+#include <linux/tty.h>
+#include <linux/ioport.h>
+#include <linux/slab.h>
+#include <linux/init.h>
+#include <linux/serial.h>
+#include <linux/clk.h>
+#include <linux/console.h>
+#include <linux/sysrq.h>
+#include <linux/tty_flip.h>
+#include <linux/platform_device.h>
+
+#include <asm/io.h>
+
+#include <asm/arch/at91rm9200_pdc.h>
+#include <asm/mach/serial_at91.h>
+#include <asm/arch/board.h>
+#ifdef CONFIG_ARM
+#include <asm/arch/system.h>
+#include <asm/arch/gpio.h>
+#endif
+
+#include "atmel_serial.h"
+
+#if defined(CONFIG_SERIAL_ATMEL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
+#define SUPPORT_SYSRQ
+#endif
+
+#include <linux/serial_core.h>
+
+#ifdef CONFIG_SERIAL_ATMEL_TTYAT
+
+/* Use device name ttyAT, major 204 and minor 154-169.  This is necessary if we
+ * should coexist with the 8250 driver, such as if we have an external 16C550
+ * UART. */
+#define SERIAL_ATMEL_MAJOR     204
+#define MINOR_START            154
+#define ATMEL_DEVICENAME       "ttyAT"
+
+#else
+
+/* Use device name ttyS, major 4, minor 64-68.  This is the usual serial port
+ * name, but it is legally reserved for the 8250 driver. */
+#define SERIAL_ATMEL_MAJOR     TTY_MAJOR
+#define MINOR_START            64
+#define ATMEL_DEVICENAME       "ttyS"
+
+#endif
+
+#define ATMEL_ISR_PASS_LIMIT   256
+
+#define UART_PUT_CR(port,v)    writel(v, (port)->membase + ATMEL_US_CR)
+#define UART_GET_MR(port)      readl((port)->membase + ATMEL_US_MR)
+#define UART_PUT_MR(port,v)    writel(v, (port)->membase + ATMEL_US_MR)
+#define UART_PUT_IER(port,v)   writel(v, (port)->membase + ATMEL_US_IER)
+#define UART_PUT_IDR(port,v)   writel(v, (port)->membase + ATMEL_US_IDR)
+#define UART_GET_IMR(port)     readl((port)->membase + ATMEL_US_IMR)
+#define UART_GET_CSR(port)     readl((port)->membase + ATMEL_US_CSR)
+#define UART_GET_CHAR(port)    readl((port)->membase + ATMEL_US_RHR)
+#define UART_PUT_CHAR(port,v)  writel(v, (port)->membase + ATMEL_US_THR)
+#define UART_GET_BRGR(port)    readl((port)->membase + ATMEL_US_BRGR)
+#define UART_PUT_BRGR(port,v)  writel(v, (port)->membase + ATMEL_US_BRGR)
+#define UART_PUT_RTOR(port,v)  writel(v, (port)->membase + ATMEL_US_RTOR)
+
+// #define UART_GET_CR(port)   readl((port)->membase + ATMEL_US_CR)            // is write-only
+
+ /* PDC registers */
+#define UART_PUT_PTCR(port,v)  writel(v, (port)->membase + ATMEL_PDC_PTCR)
+#define UART_GET_PTSR(port)    readl((port)->membase + ATMEL_PDC_PTSR)
+
+#define UART_PUT_RPR(port,v)   writel(v, (port)->membase + ATMEL_PDC_RPR)
+#define UART_GET_RPR(port)     readl((port)->membase + ATMEL_PDC_RPR)
+#define UART_PUT_RCR(port,v)   writel(v, (port)->membase + ATMEL_PDC_RCR)
+#define UART_PUT_RNPR(port,v)  writel(v, (port)->membase + ATMEL_PDC_RNPR)
+#define UART_PUT_RNCR(port,v)  writel(v, (port)->membase + ATMEL_PDC_RNCR)
+
+#define UART_PUT_TPR(port,v)   writel(v, (port)->membase + ATMEL_PDC_TPR)
+#define UART_PUT_TCR(port,v)   writel(v, (port)->membase + ATMEL_PDC_TCR)
+//#define UART_PUT_TNPR(port,v)        writel(v, (port)->membase + ATMEL_PDC_TNPR)
+//#define UART_PUT_TNCR(port,v)        writel(v, (port)->membase + ATMEL_PDC_TNCR)
+
+static int (*atmel_open_hook)(struct uart_port *);
+static void (*atmel_close_hook)(struct uart_port *);
+
+/*
+ * We wrap our port structure around the generic uart_port.
+ */
+struct atmel_uart_port {
+       struct uart_port        uart;           /* uart */
+       struct clk              *clk;           /* uart clock */
+       unsigned short          suspended;      /* is port suspended? */
+};
+
+static struct atmel_uart_port atmel_ports[ATMEL_MAX_UART];
+
+#ifdef SUPPORT_SYSRQ
+static struct console atmel_console;
+#endif
+
+/*
+ * Return TIOCSER_TEMT when transmitter FIFO and Shift register is empty.
+ */
+static u_int atmel_tx_empty(struct uart_port *port)
+{
+       return (UART_GET_CSR(port) & ATMEL_US_TXEMPTY) ? TIOCSER_TEMT : 0;
+}
+
+/*
+ * Set state of the modem control output lines
+ */
+static void atmel_set_mctrl(struct uart_port *port, u_int mctrl)
+{
+       unsigned int control = 0;
+       unsigned int mode;
+
+#ifdef CONFIG_ARM
+       if (arch_identify() == ARCH_ID_AT91RM9200) {
+               /*
+                * AT91RM9200 Errata #39: RTS0 is not internally connected to PA21.
+                *  We need to drive the pin manually.
+                */
+               if (port->mapbase == AT91RM9200_BASE_US0) {
+                       if (mctrl & TIOCM_RTS)
+                               at91_set_gpio_value(AT91_PIN_PA21, 0);
+                       else
+                               at91_set_gpio_value(AT91_PIN_PA21, 1);
+               }
+       }
+#endif
+
+       if (mctrl & TIOCM_RTS)
+               control |= ATMEL_US_RTSEN;
+       else
+               control |= ATMEL_US_RTSDIS;
+
+       if (mctrl & TIOCM_DTR)
+               control |= ATMEL_US_DTREN;
+       else
+               control |= ATMEL_US_DTRDIS;
+
+       UART_PUT_CR(port, control);
+
+       /* Local loopback mode? */
+       mode = UART_GET_MR(port) & ~ATMEL_US_CHMODE;
+       if (mctrl & TIOCM_LOOP)
+               mode |= ATMEL_US_CHMODE_LOC_LOOP;
+       else
+               mode |= ATMEL_US_CHMODE_NORMAL;
+       UART_PUT_MR(port, mode);
+}
+
+/*
+ * Get state of the modem control input lines
+ */
+static u_int atmel_get_mctrl(struct uart_port *port)
+{
+       unsigned int status, ret = 0;
+
+       status = UART_GET_CSR(port);
+
+       /*
+        * The control signals are active low.
+        */
+       if (!(status & ATMEL_US_DCD))
+               ret |= TIOCM_CD;
+       if (!(status & ATMEL_US_CTS))
+               ret |= TIOCM_CTS;
+       if (!(status & ATMEL_US_DSR))
+               ret |= TIOCM_DSR;
+       if (!(status & ATMEL_US_RI))
+               ret |= TIOCM_RI;
+
+       return ret;
+}
+
+/*
+ * Stop transmitting.
+ */
+static void atmel_stop_tx(struct uart_port *port)
+{
+       struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
+
+       UART_PUT_IDR(port, ATMEL_US_TXRDY);
+}
+
+/*
+ * Start transmitting.
+ */
+static void atmel_start_tx(struct uart_port *port)
+{
+       struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
+
+       UART_PUT_IER(port, ATMEL_US_TXRDY);
+}
+
+/*
+ * Stop receiving - port is in process of being closed.
+ */
+static void atmel_stop_rx(struct uart_port *port)
+{
+       struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
+
+       UART_PUT_IDR(port, ATMEL_US_RXRDY);
+}
+
+/*
+ * Enable modem status interrupts
+ */
+static void atmel_enable_ms(struct uart_port *port)
+{
+       UART_PUT_IER(port, ATMEL_US_RIIC | ATMEL_US_DSRIC | ATMEL_US_DCDIC | ATMEL_US_CTSIC);
+}
+
+/*
+ * Control the transmission of a break signal
+ */
+static void atmel_break_ctl(struct uart_port *port, int break_state)
+{
+       if (break_state != 0)
+               UART_PUT_CR(port, ATMEL_US_STTBRK);     /* start break */
+       else
+               UART_PUT_CR(port, ATMEL_US_STPBRK);     /* stop break */
+}
+
+/*
+ * Characters received (called from interrupt handler)
+ */
+static void atmel_rx_chars(struct uart_port *port, struct pt_regs *regs)
+{
+       struct tty_struct *tty = port->info->tty;
+       unsigned int status, ch, flg;
+
+       status = UART_GET_CSR(port);
+       while (status & ATMEL_US_RXRDY) {
+               ch = UART_GET_CHAR(port);
+
+               port->icount.rx++;
+
+               flg = TTY_NORMAL;
+
+               /*
+                * note that the error handling code is
+                * out of the main execution path
+                */
+               if (unlikely(status & (ATMEL_US_PARE | ATMEL_US_FRAME | ATMEL_US_OVRE | ATMEL_US_RXBRK))) {
+                       UART_PUT_CR(port, ATMEL_US_RSTSTA);     /* clear error */
+                       if (status & ATMEL_US_RXBRK) {
+                               status &= ~(ATMEL_US_PARE | ATMEL_US_FRAME);    /* ignore side-effect */
+                               port->icount.brk++;
+                               if (uart_handle_break(port))
+                                       goto ignore_char;
+                       }
+                       if (status & ATMEL_US_PARE)
+                               port->icount.parity++;
+                       if (status & ATMEL_US_FRAME)
+                               port->icount.frame++;
+                       if (status & ATMEL_US_OVRE)
+                               port->icount.overrun++;
+
+                       status &= port->read_status_mask;
+
+                       if (status & ATMEL_US_RXBRK)
+                               flg = TTY_BREAK;
+                       else if (status & ATMEL_US_PARE)
+                               flg = TTY_PARITY;
+                       else if (status & ATMEL_US_FRAME)
+                               flg = TTY_FRAME;
+               }
+
+               if (uart_handle_sysrq_char(port, ch, regs))
+                       goto ignore_char;
+
+               uart_insert_char(port, status, ATMEL_US_OVRE, ch, flg);
+
+       ignore_char:
+               status = UART_GET_CSR(port);
+       }
+
+       tty_flip_buffer_push(tty);
+}
+
+/*
+ * Transmit characters (called from interrupt handler)
+ */
+static void atmel_tx_chars(struct uart_port *port)
+{
+       struct circ_buf *xmit = &port->info->xmit;
+
+       if (port->x_char) {
+               UART_PUT_CHAR(port, port->x_char);
+               port->icount.tx++;
+               port->x_char = 0;
+               return;
+       }
+       if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
+               atmel_stop_tx(port);
+               return;
+       }
+
+       while (UART_GET_CSR(port) & ATMEL_US_TXRDY) {
+               UART_PUT_CHAR(port, xmit->buf[xmit->tail]);
+               xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
+               port->icount.tx++;
+               if (uart_circ_empty(xmit))
+                       break;
+       }
+
+       if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
+               uart_write_wakeup(port);
+
+       if (uart_circ_empty(xmit))
+               atmel_stop_tx(port);
+}
+
+/*
+ * Interrupt handler
+ */
+static irqreturn_t atmel_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+       struct uart_port *port = dev_id;
+       struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
+       unsigned int status, pending, pass_counter = 0;
+
+       status = UART_GET_CSR(port);
+       pending = status & UART_GET_IMR(port);
+       while (pending) {
+               /* Interrupt receive */
+               if (pending & ATMEL_US_RXRDY)
+                       atmel_rx_chars(port, regs);
+
+               // TODO: All reads to CSR will clear these interrupts!
+               if (pending & ATMEL_US_RIIC) port->icount.rng++;
+               if (pending & ATMEL_US_DSRIC) port->icount.dsr++;
+               if (pending & ATMEL_US_DCDIC)
+                       uart_handle_dcd_change(port, !(status & ATMEL_US_DCD));
+               if (pending & ATMEL_US_CTSIC)
+                       uart_handle_cts_change(port, !(status & ATMEL_US_CTS));
+               if (pending & (ATMEL_US_RIIC | ATMEL_US_DSRIC | ATMEL_US_DCDIC | ATMEL_US_CTSIC))
+                       wake_up_interruptible(&port->info->delta_msr_wait);
+
+               /* Interrupt transmit */
+               if (pending & ATMEL_US_TXRDY)
+                       atmel_tx_chars(port);
+
+               if (pass_counter++ > ATMEL_ISR_PASS_LIMIT)
+                       break;
+
+               status = UART_GET_CSR(port);
+               pending = status & UART_GET_IMR(port);
+       }
+       return IRQ_HANDLED;
+}
+
+/*
+ * Perform initialization and enable port for reception
+ */
+static int atmel_startup(struct uart_port *port)
+{
+       struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
+       int retval;
+
+       /*
+        * Ensure that no interrupts are enabled otherwise when
+        * request_irq() is called we could get stuck trying to
+        * handle an unexpected interrupt
+        */
+       UART_PUT_IDR(port, -1);
+
+       /*
+        * Allocate the IRQ
+        */
+       retval = request_irq(port->irq, atmel_interrupt, IRQF_SHARED, "atmel_serial", port);
+       if (retval) {
+               printk("atmel_serial: atmel_startup - Can't get irq\n");
+               return retval;
+       }
+
+       /*
+        * If there is a specific "open" function (to register
+        * control line interrupts)
+        */
+       if (atmel_open_hook) {
+               retval = atmel_open_hook(port);
+               if (retval) {
+                       free_irq(port->irq, port);
+                       return retval;
+               }
+       }
+
+       /*
+        * Finally, enable the serial port
+        */
+       UART_PUT_CR(port, ATMEL_US_RSTSTA | ATMEL_US_RSTRX);
+       UART_PUT_CR(port, ATMEL_US_TXEN | ATMEL_US_RXEN);               /* enable xmit & rcvr */
+
+       UART_PUT_IER(port, ATMEL_US_RXRDY);             /* enable receive only */
+
+       return 0;
+}
+
+/*
+ * Disable the port
+ */
+static void atmel_shutdown(struct uart_port *port)
+{
+       struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
+
+       /*
+        * Disable all interrupts, port and break condition.
+        */
+       UART_PUT_CR(port, ATMEL_US_RSTSTA);
+       UART_PUT_IDR(port, -1);
+
+       /*
+        * Free the interrupt
+        */
+       free_irq(port->irq, port);
+
+       /*
+        * If there is a specific "close" function (to unregister
+        * control line interrupts)
+        */
+       if (atmel_close_hook)
+               atmel_close_hook(port);
+}
+
+/*
+ * Power / Clock management.
+ */
+static void atmel_serial_pm(struct uart_port *port, unsigned int state, unsigned int oldstate)
+{
+       struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
+
+       switch (state) {
+               case 0:
+                       /*
+                        * Enable the peripheral clock for this serial port.
+                        * This is called on uart_open() or a resume event.
+                        */
+                       clk_enable(atmel_port->clk);
+                       break;
+               case 3:
+                       /*
+                        * Disable the peripheral clock for this serial port.
+                        * This is called on uart_close() or a suspend event.
+                        */
+                       clk_disable(atmel_port->clk);
+                       break;
+               default:
+                       printk(KERN_ERR "atmel_serial: unknown pm %d\n", state);
+       }
+}
+
+/*
+ * Change the port parameters
+ */
+static void atmel_set_termios(struct uart_port *port, struct termios * termios, struct termios * old)
+{
+       unsigned long flags;
+       unsigned int mode, imr, quot, baud;
+
+       baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
+       quot = uart_get_divisor(port, baud);
+
+       /* Get current mode register */
+       mode = UART_GET_MR(port) & ~(ATMEL_US_CHRL | ATMEL_US_NBSTOP | ATMEL_US_PAR);
+
+       /* byte size */
+       switch (termios->c_cflag & CSIZE) {
+       case CS5:
+               mode |= ATMEL_US_CHRL_5;
+               break;
+       case CS6:
+               mode |= ATMEL_US_CHRL_6;
+               break;
+       case CS7:
+               mode |= ATMEL_US_CHRL_7;
+               break;
+       default:
+               mode |= ATMEL_US_CHRL_8;
+               break;
+       }
+
+       /* stop bits */
+       if (termios->c_cflag & CSTOPB)
+               mode |= ATMEL_US_NBSTOP_2;
+
+       /* parity */
+       if (termios->c_cflag & PARENB) {
+               if (termios->c_cflag & CMSPAR) {                        /* Mark or Space parity */
+                       if (termios->c_cflag & PARODD)
+                               mode |= ATMEL_US_PAR_MARK;
+                       else
+                               mode |= ATMEL_US_PAR_SPACE;
+               }
+               else if (termios->c_cflag & PARODD)
+                       mode |= ATMEL_US_PAR_ODD;
+               else
+                       mode |= ATMEL_US_PAR_EVEN;
+       }
+       else
+               mode |= ATMEL_US_PAR_NONE;
+
+       spin_lock_irqsave(&port->lock, flags);
+
+       port->read_status_mask = ATMEL_US_OVRE;
+       if (termios->c_iflag & INPCK)
+               port->read_status_mask |= (ATMEL_US_FRAME | ATMEL_US_PARE);
+       if (termios->c_iflag & (BRKINT | PARMRK))
+               port->read_status_mask |= ATMEL_US_RXBRK;
+
+       /*
+        * Characters to ignore
+        */
+       port->ignore_status_mask = 0;
+       if (termios->c_iflag & IGNPAR)
+               port->ignore_status_mask |= (ATMEL_US_FRAME | ATMEL_US_PARE);
+       if (termios->c_iflag & IGNBRK) {
+               port->ignore_status_mask |= ATMEL_US_RXBRK;
+               /*
+                * If we're ignoring parity and break indicators,
+                * ignore overruns too (for real raw support).
+                */
+               if (termios->c_iflag & IGNPAR)
+                       port->ignore_status_mask |= ATMEL_US_OVRE;
+       }
+
+       // TODO: Ignore all characters if CREAD is set.
+
+       /* update the per-port timeout */
+       uart_update_timeout(port, termios->c_cflag, baud);
+
+       /* disable interrupts and drain transmitter */
+       imr = UART_GET_IMR(port);       /* get interrupt mask */
+       UART_PUT_IDR(port, -1);         /* disable all interrupts */
+       while (!(UART_GET_CSR(port) & ATMEL_US_TXEMPTY)) { barrier(); }
+
+       /* disable receiver and transmitter */
+       UART_PUT_CR(port, ATMEL_US_TXDIS | ATMEL_US_RXDIS);
+
+       /* set the parity, stop bits and data size */
+       UART_PUT_MR(port, mode);
+
+       /* set the baud rate */
+       UART_PUT_BRGR(port, quot);
+       UART_PUT_CR(port, ATMEL_US_RSTSTA | ATMEL_US_RSTRX);
+       UART_PUT_CR(port, ATMEL_US_TXEN | ATMEL_US_RXEN);
+
+       /* restore interrupts */
+       UART_PUT_IER(port, imr);
+
+       /* CTS flow-control and modem-status interrupts */
+       if (UART_ENABLE_MS(port, termios->c_cflag))
+               port->ops->enable_ms(port);
+
+       spin_unlock_irqrestore(&port->lock, flags);
+}
+
+/*
+ * Return string describing the specified port
+ */
+static const char *atmel_type(struct uart_port *port)
+{
+       return (port->type == PORT_ATMEL) ? "ATMEL_SERIAL" : NULL;
+}
+
+/*
+ * Release the memory region(s) being used by 'port'.
+ */
+static void atmel_release_port(struct uart_port *port)
+{
+       struct platform_device *pdev = to_platform_device(port->dev);
+       int size = pdev->resource[0].end - pdev->resource[0].start + 1;
+
+       release_mem_region(port->mapbase, size);
+
+       if (port->flags & UPF_IOREMAP) {
+               iounmap(port->membase);
+               port->membase = NULL;
+       }
+}
+
+/*
+ * Request the memory region(s) being used by 'port'.
+ */
+static int atmel_request_port(struct uart_port *port)
+{
+       struct platform_device *pdev = to_platform_device(port->dev);
+       int size = pdev->resource[0].end - pdev->resource[0].start + 1;
+
+       if (!request_mem_region(port->mapbase, size, "atmel_serial"))
+               return -EBUSY;
+
+       if (port->flags & UPF_IOREMAP) {
+               port->membase = ioremap(port->mapbase, size);
+               if (port->membase == NULL) {
+                       release_mem_region(port->mapbase, size);
+                       return -ENOMEM;
+               }
+       }
+
+       return 0;
+}
+
+/*
+ * Configure/autoconfigure the port.
+ */
+static void atmel_config_port(struct uart_port *port, int flags)
+{
+       if (flags & UART_CONFIG_TYPE) {
+               port->type = PORT_ATMEL;
+               atmel_request_port(port);
+       }
+}
+
+/*
+ * Verify the new serial_struct (for TIOCSSERIAL).
+ */
+static int atmel_verify_port(struct uart_port *port, struct serial_struct *ser)
+{
+       int ret = 0;
+       if (ser->type != PORT_UNKNOWN && ser->type != PORT_ATMEL)
+               ret = -EINVAL;
+       if (port->irq != ser->irq)
+               ret = -EINVAL;
+       if (ser->io_type != SERIAL_IO_MEM)
+               ret = -EINVAL;
+       if (port->uartclk / 16 != ser->baud_base)
+               ret = -EINVAL;
+       if ((void *)port->mapbase != ser->iomem_base)
+               ret = -EINVAL;
+       if (port->iobase != ser->port)
+               ret = -EINVAL;
+       if (ser->hub6 != 0)
+               ret = -EINVAL;
+       return ret;
+}
+
+static struct uart_ops atmel_pops = {
+       .tx_empty       = atmel_tx_empty,
+       .set_mctrl      = atmel_set_mctrl,
+       .get_mctrl      = atmel_get_mctrl,
+       .stop_tx        = atmel_stop_tx,
+       .start_tx       = atmel_start_tx,
+       .stop_rx        = atmel_stop_rx,
+       .enable_ms      = atmel_enable_ms,
+       .break_ctl      = atmel_break_ctl,
+       .startup        = atmel_startup,
+       .shutdown       = atmel_shutdown,
+       .set_termios    = atmel_set_termios,
+       .type           = atmel_type,
+       .release_port   = atmel_release_port,
+       .request_port   = atmel_request_port,
+       .config_port    = atmel_config_port,
+       .verify_port    = atmel_verify_port,
+       .pm             = atmel_serial_pm,
+};
+
+/*
+ * Configure the port from the platform device resource info.
+ */
+static void __devinit atmel_init_port(struct atmel_uart_port *atmel_port, struct platform_device *pdev)
+{
+       struct uart_port *port = &atmel_port->uart;
+       struct atmel_uart_data *data = pdev->dev.platform_data;
+
+       port->iotype    = UPIO_MEM;
+       port->flags     = UPF_BOOT_AUTOCONF;
+       port->ops       = &atmel_pops;
+       port->fifosize  = 1;
+       port->line      = pdev->id;
+       port->dev       = &pdev->dev;
+
+       port->mapbase   = pdev->resource[0].start;
+       port->irq       = pdev->resource[1].start;
+
+       if (data->regs)
+               /* Already mapped by setup code */
+               port->membase = data->regs;
+       else {
+               port->flags     |= UPF_IOREMAP;
+               port->membase   = NULL;
+       }
+
+       if (!atmel_port->clk) {         /* for console, the clock could already be configured */
+               atmel_port->clk = clk_get(&pdev->dev, "usart");
+               clk_enable(atmel_port->clk);
+               port->uartclk = clk_get_rate(atmel_port->clk);
+       }
+}
+
+/*
+ * Register board-specific modem-control line handlers.
+ */
+void __init atmel_register_uart_fns(struct atmel_port_fns *fns)
+{
+       if (fns->enable_ms)
+               atmel_pops.enable_ms = fns->enable_ms;
+       if (fns->get_mctrl)
+               atmel_pops.get_mctrl = fns->get_mctrl;
+       if (fns->set_mctrl)
+               atmel_pops.set_mctrl = fns->set_mctrl;
+       atmel_open_hook         = fns->open;
+       atmel_close_hook        = fns->close;
+       atmel_pops.pm           = fns->pm;
+       atmel_pops.set_wake     = fns->set_wake;
+}
+
+
+#ifdef CONFIG_SERIAL_ATMEL_CONSOLE
+static void atmel_console_putchar(struct uart_port *port, int ch)
+{
+       while (!(UART_GET_CSR(port) & ATMEL_US_TXRDY))
+               barrier();
+       UART_PUT_CHAR(port, ch);
+}
+
+/*
+ * Interrupts are disabled on entering
+ */
+static void atmel_console_write(struct console *co, const char *s, u_int count)
+{
+       struct uart_port *port = &atmel_ports[co->index].uart;
+       unsigned int status, imr;
+
+       /*
+        *      First, save IMR and then disable interrupts
+        */
+       imr = UART_GET_IMR(port);       /* get interrupt mask */
+       UART_PUT_IDR(port, ATMEL_US_RXRDY | ATMEL_US_TXRDY);
+
+       uart_console_write(port, s, count, atmel_console_putchar);
+
+       /*
+        *      Finally, wait for transmitter to become empty
+        *      and restore IMR
+        */
+       do {
+               status = UART_GET_CSR(port);
+       } while (!(status & ATMEL_US_TXRDY));
+       UART_PUT_IER(port, imr);        /* set interrupts back the way they were */
+}
+
+/*
+ * If the port was already initialised (eg, by a boot loader), try to determine
+ * the current setup.
+ */
+static void __init atmel_console_get_options(struct uart_port *port, int *baud, int *parity, int *bits)
+{
+       unsigned int mr, quot;
+
+// TODO: CR is a write-only register
+//     unsigned int cr;
+//
+//     cr = UART_GET_CR(port) & (ATMEL_US_RXEN | ATMEL_US_TXEN);
+//     if (cr == (ATMEL_US_RXEN | ATMEL_US_TXEN)) {
+//             /* ok, the port was enabled */
+//     }
+
+       mr = UART_GET_MR(port) & ATMEL_US_CHRL;
+       if (mr == ATMEL_US_CHRL_8)
+               *bits = 8;
+       else
+               *bits = 7;
+
+       mr = UART_GET_MR(port) & ATMEL_US_PAR;
+       if (mr == ATMEL_US_PAR_EVEN)
+               *parity = 'e';
+       else if (mr == ATMEL_US_PAR_ODD)
+               *parity = 'o';
+
+       /*
+        * The serial core only rounds down when matching this to a
+        * supported baud rate. Make sure we don't end up slightly
+        * lower than one of those, as it would make us fall through
+        * to a much lower baud rate than we really want.
+        */
+       quot = UART_GET_BRGR(port);
+       *baud = port->uartclk / (16 * (quot - 1));
+}
+
+static int __init atmel_console_setup(struct console *co, char *options)
+{
+       struct uart_port *port = &atmel_ports[co->index].uart;
+       int baud = 115200;
+       int bits = 8;
+       int parity = 'n';
+       int flow = 'n';
+
+       if (port->membase == 0)         /* Port not initialized yet - delay setup */
+               return -ENODEV;
+
+       UART_PUT_IDR(port, -1);                         /* disable interrupts */
+       UART_PUT_CR(port, ATMEL_US_RSTSTA | ATMEL_US_RSTRX);
+       UART_PUT_CR(port, ATMEL_US_TXEN | ATMEL_US_RXEN);
+
+       if (options)
+               uart_parse_options(options, &baud, &parity, &bits, &flow);
+       else
+               atmel_console_get_options(port, &baud, &parity, &bits);
+
+       return uart_set_options(port, co, baud, parity, bits, flow);
+}
+
+static struct uart_driver atmel_uart;
+
+static struct console atmel_console = {
+       .name           = ATMEL_DEVICENAME,
+       .write          = atmel_console_write,
+       .device         = uart_console_device,
+       .setup          = atmel_console_setup,
+       .flags          = CON_PRINTBUFFER,
+       .index          = -1,
+       .data           = &atmel_uart,
+};
+
+#define ATMEL_CONSOLE_DEVICE   &atmel_console
+
+/*
+ * Early console initialization (before VM subsystem initialized).
+ */
+static int __init atmel_console_init(void)
+{
+       if (atmel_default_console_device) {
+               add_preferred_console(ATMEL_DEVICENAME, atmel_default_console_device->id, NULL);
+               atmel_init_port(&(atmel_ports[atmel_default_console_device->id]), atmel_default_console_device);
+               register_console(&atmel_console);
+       }
+
+       return 0;
+}
+console_initcall(atmel_console_init);
+
+/*
+ * Late console initialization.
+ */
+static int __init atmel_late_console_init(void)
+{
+       if (atmel_default_console_device && !(atmel_console.flags & CON_ENABLED))
+               register_console(&atmel_console);
+
+       return 0;
+}
+core_initcall(atmel_late_console_init);
+
+#else
+#define ATMEL_CONSOLE_DEVICE   NULL
+#endif
+
+static struct uart_driver atmel_uart = {
+       .owner                  = THIS_MODULE,
+       .driver_name            = "atmel_serial",
+       .dev_name               = ATMEL_DEVICENAME,
+       .major                  = SERIAL_ATMEL_MAJOR,
+       .minor                  = MINOR_START,
+       .nr                     = ATMEL_MAX_UART,
+       .cons                   = ATMEL_CONSOLE_DEVICE,
+};
+
+#ifdef CONFIG_PM
+static int atmel_serial_suspend(struct platform_device *pdev, pm_message_t state)
+{
+       struct uart_port *port = platform_get_drvdata(pdev);
+       struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
+
+       if (device_may_wakeup(&pdev->dev) && !at91_suspend_entering_slow_clock())
+               enable_irq_wake(port->irq);
+       else {
+               disable_irq_wake(port->irq);
+               uart_suspend_port(&atmel_uart, port);
+               atmel_port->suspended = 1;
+       }
+
+       return 0;
+}
+
+static int atmel_serial_resume(struct platform_device *pdev)
+{
+       struct uart_port *port = platform_get_drvdata(pdev);
+       struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
+
+       if (atmel_port->suspended) {
+               uart_resume_port(&atmel_uart, port);
+               atmel_port->suspended = 0;
+       }
+
+       return 0;
+}
+#else
+#define atmel_serial_suspend NULL
+#define atmel_serial_resume NULL
+#endif
+
+static int __devinit atmel_serial_probe(struct platform_device *pdev)
+{
+       struct atmel_uart_port *port;
+       int ret;
+
+       port = &atmel_ports[pdev->id];
+       atmel_init_port(port, pdev);
+
+       ret = uart_add_one_port(&atmel_uart, &port->uart);
+       if (!ret) {
+               device_init_wakeup(&pdev->dev, 1);
+               platform_set_drvdata(pdev, port);
+       }
+
+       return ret;
+}
+
+static int __devexit atmel_serial_remove(struct platform_device *pdev)
+{
+       struct uart_port *port = platform_get_drvdata(pdev);
+       struct atmel_uart_port *atmel_port = (struct atmel_uart_port *) port;
+       int ret = 0;
+
+       clk_disable(atmel_port->clk);
+       clk_put(atmel_port->clk);
+
+       device_init_wakeup(&pdev->dev, 0);
+       platform_set_drvdata(pdev, NULL);
+
+       if (port) {
+               ret = uart_remove_one_port(&atmel_uart, port);
+               kfree(port);
+       }
+
+       return ret;
+}
+
+static struct platform_driver atmel_serial_driver = {
+       .probe          = atmel_serial_probe,
+       .remove         = __devexit_p(atmel_serial_remove),
+       .suspend        = atmel_serial_suspend,
+       .resume         = atmel_serial_resume,
+       .driver         = {
+               .name   = "atmel_usart",
+               .owner  = THIS_MODULE,
+       },
+};
+
+static int __init atmel_serial_init(void)
+{
+       int ret;
+
+       ret = uart_register_driver(&atmel_uart);
+       if (ret)
+               return ret;
+
+       ret = platform_driver_register(&atmel_serial_driver);
+       if (ret)
+               uart_unregister_driver(&atmel_uart);
+
+       return ret;
+}
+
+static void __exit atmel_serial_exit(void)
+{
+       platform_driver_unregister(&atmel_serial_driver);
+       uart_unregister_driver(&atmel_uart);
+}
+
+module_init(atmel_serial_init);
+module_exit(atmel_serial_exit);
+
+MODULE_AUTHOR("Rick Bronson");
+MODULE_DESCRIPTION("Atmel AT91 / AT32 serial port driver");
+MODULE_LICENSE("GPL");
diff --git a/drivers/serial/atmel_serial.h b/drivers/serial/atmel_serial.h
new file mode 100644 (file)
index 0000000..eced2ad
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+ * drivers/serial/atmel_serial.h
+ *
+ * Copyright (C) 2005 Ivan Kokshaysky
+ * Copyright (C) SAN People
+ *
+ * USART registers.
+ * Based on AT91RM9200 datasheet revision E.
+ *
+ * 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.
+ */
+
+#ifndef ATMEL_SERIAL_H
+#define ATMEL_SERIAL_H
+
+#define ATMEL_US_CR            0x00                    /* Control Register */
+#define                ATMEL_US_RSTRX          (1 <<  2)               /* Reset Receiver */
+#define                ATMEL_US_RSTTX          (1 <<  3)               /* Reset Transmitter */
+#define                ATMEL_US_RXEN           (1 <<  4)               /* Receiver Enable */
+#define                ATMEL_US_RXDIS          (1 <<  5)               /* Receiver Disable */
+#define                ATMEL_US_TXEN           (1 <<  6)               /* Transmitter Enable */
+#define                ATMEL_US_TXDIS          (1 <<  7)               /* Transmitter Disable */
+#define                ATMEL_US_RSTSTA         (1 <<  8)               /* Reset Status Bits */
+#define                ATMEL_US_STTBRK         (1 <<  9)               /* Start Break */
+#define                ATMEL_US_STPBRK         (1 << 10)               /* Stop Break */
+#define                ATMEL_US_STTTO          (1 << 11)               /* Start Time-out */
+#define                ATMEL_US_SENDA          (1 << 12)               /* Send Address */
+#define                ATMEL_US_RSTIT          (1 << 13)               /* Reset Iterations */
+#define                ATMEL_US_RSTNACK        (1 << 14)               /* Reset Non Acknowledge */
+#define                ATMEL_US_RETTO          (1 << 15)               /* Rearm Time-out */
+#define                ATMEL_US_DTREN          (1 << 16)               /* Data Terminal Ready Enable */
+#define                ATMEL_US_DTRDIS         (1 << 17)               /* Data Terminal Ready Disable */
+#define                ATMEL_US_RTSEN          (1 << 18)               /* Request To Send Enable */
+#define                ATMEL_US_RTSDIS         (1 << 19)               /* Request To Send Disable */
+
+#define ATMEL_US_MR            0x04                    /* Mode Register */
+#define                ATMEL_US_USMODE         (0xf <<  0)             /* Mode of the USART */
+#define                        ATMEL_US_USMODE_NORMAL          0
+#define                        ATMEL_US_USMODE_RS485           1
+#define                        ATMEL_US_USMODE_HWHS            2
+#define                        ATMEL_US_USMODE_MODEM           3
+#define                        ATMEL_US_USMODE_ISO7816_T0      4
+#define                        ATMEL_US_USMODE_ISO7816_T1      6
+#define                        ATMEL_US_USMODE_IRDA            8
+#define                ATMEL_US_USCLKS         (3   <<  4)             /* Clock Selection */
+#define                ATMEL_US_CHRL           (3   <<  6)             /* Character Length */
+#define                        ATMEL_US_CHRL_5                 (0 <<  6)
+#define                        ATMEL_US_CHRL_6                 (1 <<  6)
+#define                        ATMEL_US_CHRL_7                 (2 <<  6)
+#define                        ATMEL_US_CHRL_8                 (3 <<  6)
+#define                ATMEL_US_SYNC           (1 <<  8)               /* Synchronous Mode Select */
+#define                ATMEL_US_PAR            (7 <<  9)               /* Parity Type */
+#define                        ATMEL_US_PAR_EVEN               (0 <<  9)
+#define                        ATMEL_US_PAR_ODD                (1 <<  9)
+#define                        ATMEL_US_PAR_SPACE              (2 <<  9)
+#define                        ATMEL_US_PAR_MARK               (3 <<  9)
+#define                        ATMEL_US_PAR_NONE               (4 <<  9)
+#define                        ATMEL_US_PAR_MULTI_DROP         (6 <<  9)
+#define                ATMEL_US_NBSTOP         (3 << 12)               /* Number of Stop Bits */
+#define                        ATMEL_US_NBSTOP_1               (0 << 12)
+#define                        ATMEL_US_NBSTOP_1_5             (1 << 12)
+#define                        ATMEL_US_NBSTOP_2               (2 << 12)
+#define                ATMEL_US_CHMODE         (3 << 14)               /* Channel Mode */
+#define                        ATMEL_US_CHMODE_NORMAL          (0 << 14)
+#define                        ATMEL_US_CHMODE_ECHO            (1 << 14)
+#define                        ATMEL_US_CHMODE_LOC_LOOP        (2 << 14)
+#define                        ATMEL_US_CHMODE_REM_LOOP        (3 << 14)
+#define                ATMEL_US_MSBF           (1 << 16)               /* Bit Order */
+#define                ATMEL_US_MODE9          (1 << 17)               /* 9-bit Character Length */
+#define                ATMEL_US_CLKO           (1 << 18)               /* Clock Output Select */
+#define                ATMEL_US_OVER           (1 << 19)               /* Oversampling Mode */
+#define                ATMEL_US_INACK          (1 << 20)               /* Inhibit Non Acknowledge */
+#define                ATMEL_US_DSNACK         (1 << 21)               /* Disable Successive NACK */
+#define                ATMEL_US_MAX_ITER       (7 << 24)               /* Max Iterations */
+#define                ATMEL_US_FILTER         (1 << 28)               /* Infrared Receive Line Filter */
+
+#define ATMEL_US_IER           0x08                    /* Interrupt Enable Register */
+#define                ATMEL_US_RXRDY          (1 <<  0)               /* Receiver Ready */
+#define                ATMEL_US_TXRDY          (1 <<  1)               /* Transmitter Ready */
+#define                ATMEL_US_RXBRK          (1 <<  2)               /* Break Received / End of Break */
+#define                ATMEL_US_ENDRX          (1 <<  3)               /* End of Receiver Transfer */
+#define                ATMEL_US_ENDTX          (1 <<  4)               /* End of Transmitter Transfer */
+#define                ATMEL_US_OVRE           (1 <<  5)               /* Overrun Error */
+#define                ATMEL_US_FRAME          (1 <<  6)               /* Framing Error */
+#define                ATMEL_US_PARE           (1 <<  7)               /* Parity Error */
+#define                ATMEL_US_TIMEOUT        (1 <<  8)               /* Receiver Time-out */
+#define                ATMEL_US_TXEMPTY        (1 <<  9)               /* Transmitter Empty */
+#define                ATMEL_US_ITERATION      (1 << 10)               /* Max number of Repetitions Reached */
+#define                ATMEL_US_TXBUFE         (1 << 11)               /* Transmission Buffer Empty */
+#define                ATMEL_US_RXBUFF         (1 << 12)               /* Reception Buffer Full */
+#define                ATMEL_US_NACK           (1 << 13)               /* Non Acknowledge */
+#define                ATMEL_US_RIIC           (1 << 16)               /* Ring Indicator Input Change */
+#define                ATMEL_US_DSRIC          (1 << 17)               /* Data Set Ready Input Change */
+#define                ATMEL_US_DCDIC          (1 << 18)               /* Data Carrier Detect Input Change */
+#define                ATMEL_US_CTSIC          (1 << 19)               /* Clear to Send Input Change */
+#define                ATMEL_US_RI             (1 << 20)               /* RI */
+#define                ATMEL_US_DSR            (1 << 21)               /* DSR */
+#define                ATMEL_US_DCD            (1 << 22)               /* DCD */
+#define                ATMEL_US_CTS            (1 << 23)               /* CTS */
+
+#define ATMEL_US_IDR           0x0c                    /* Interrupt Disable Register */
+#define ATMEL_US_IMR           0x10                    /* Interrupt Mask Register */
+#define ATMEL_US_CSR           0x14                    /* Channel Status Register */
+#define ATMEL_US_RHR           0x18                    /* Receiver Holding Register */
+#define ATMEL_US_THR           0x1c                    /* Transmitter Holding Register */
+
+#define ATMEL_US_BRGR          0x20                    /* Baud Rate Generator Register */
+#define                ATMEL_US_CD             (0xffff << 0)           /* Clock Divider */
+
+#define ATMEL_US_RTOR          0x24                    /* Receiver Time-out Register */
+#define                ATMEL_US_TO             (0xffff << 0)           /* Time-out Value */
+
+#define ATMEL_US_TTGR          0x28                    /* Transmitter Timeguard Register */
+#define                ATMEL_US_TG             (0xff << 0)             /* Timeguard Value */
+
+#define ATMEL_US_FIDI          0x40                    /* FI DI Ratio Register */
+#define ATMEL_US_NER           0x44                    /* Number of Errors Register */
+#define ATMEL_US_IF            0x4c                    /* IrDA Filter Register */
+
+#endif
index 3b35cb779539a891c40b433411a0111ac4226daa..a8f894c7819463cd30b39eafd1bc10032f135965 100644 (file)
@@ -16,7 +16,6 @@
 #ifndef CPM_UART_H
 #define CPM_UART_H
 
-#include <linux/config.h>
 #include <linux/platform_device.h>
 #include <linux/fs_uart_pd.h>
 
index c1adc9e4b239cf97e25221830e97fe029ec9282d..7502109d37f09755d9f31dd128e6bcf708e880d9 100644 (file)
@@ -17,8 +17,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include <linux/config.h>
-
 #if defined(CONFIG_SERIAL_NETX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
 #define SUPPORT_SYSRQ
 #endif
index f336ba6778dd6bdbbffe4fd2a9f37a930021544d..5c025d1190c171762f4f6c625010d0ed7b3968d7 100644 (file)
@@ -20,7 +20,6 @@
 
 #undef DEBUG
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/timer.h>
index 28643c4dc850178e15d6d1970682065de6e8e552..7ee992146ae9453c47667a7f8c505d5848644ff0 100644 (file)
@@ -10,7 +10,6 @@
  *  Modified to support SH7300(SH-Mobile) SCIF. Takashi Kusuda (Jun 2003).
  *  Modified to support H8/300 Series Yoshinori Sato (Feb 2004).
  */
-#include <linux/config.h>
 #include <linux/serial_core.h>
 #include <asm/io.h>
 
index 5fc14563ee3a98f523c277be23246074d2407849..20eb6e95a3a04a965c68ca1e2ab8a01fe1ff31c4 100644 (file)
@@ -13,7 +13,6 @@
 
 //#define DEBUG
 
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/spinlock.h>
 #include <linux/workqueue.h>
index aacdceb8f44b69e783ba7b9d15f04c6247f1c9c3..a5d2cdfff46f9aeae510956558e2e429f72b920d 100644 (file)
@@ -11,7 +11,6 @@
  *
 */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/delay.h>
index 16332cc57946abb820f9570eecbfbf9c253959c9..ebb20ff7ac583b41ace5b1ed8c2201fe35667f28 100644 (file)
@@ -17,7 +17,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/usb.h>
 #include "usb.h"
 
index 83601d4009e36dd66a82e026b2c9c482877f612a..64554acad63f915ca41d06fe69a2ac66c12d0fa9 100644 (file)
@@ -21,7 +21,6 @@
 #define DEBUG 1
 // #define VERBOSE
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/delay.h>
index cb2e2a604d1b7f338dbd6011893c7f5bd1dd45b2..0a315200b331c2212e154cf311470fc6b2b0b55d 100644 (file)
@@ -35,7 +35,6 @@
 * via an ELAN U132 adapter.
 *
 */
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
index 4640d1000d83c024f54c80876536c62ee61de6dd..923e22db18d4fea4d6e2346b141c935f7317ab55 100644 (file)
@@ -35,7 +35,6 @@
 
 //#define DEBUG
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/input.h>
index bfde82f5d180a9b0e1f9fd460efed96940f5f195..fc6cc147996f9562cc632d462bd512462374d3a6 100644 (file)
@@ -20,7 +20,6 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/init.h>
index b88a09497c28a84fb745673ac8a91588a54ce44c..c6f2f488a40feee4795ff728434f80467c82444c 100644 (file)
@@ -35,7 +35,6 @@
 * via an ELAN U132 adapter.
 *
 */
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/init.h>
index a44124c7e8514860861aa291ee4ded07afe53145..a287836e39f19178d3b62ee2ccc208ec94e22863 100644 (file)
@@ -36,7 +36,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/mutex.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
index fb48feca835308ba30a351a37e748ea5282522d8..bf26c3c56990f2ee36c9216b00fa430fc8662d22 100644 (file)
@@ -47,7 +47,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/mutex.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
index c1113d6e941d2670e6aa29ab8900a356252699de..5686e2164e397c7855606f8c0553caad2ec498f8 100644 (file)
@@ -25,7 +25,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 **************************************************************************/
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
index e7ba0c30e0711ff16669c1ec6e0e8cee20be7f74..c04b3a14a3e94b07744214a18de0a9452d35b3b7 100644 (file)
@@ -6,7 +6,6 @@
  *  (C) 1991  Linus Torvalds - minix filesystem
  */
 
-#include <linux/config.h>      /* Joliet? */
 #include <linux/smp_lock.h>
 #include "isofs.h"
 
index 8106f3b29e4aa9747fd786280b132d7c41332154..6e4e48c5092afec39d716309ccccd5900105d4e3 100644 (file)
@@ -10,7 +10,6 @@
  */
 
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 
index 76b08ae9ed82f49694f58ecbf84619ba1dbb259a..20c6f39ea38a20c44cdbead39d4edeb0d65316c5 100644 (file)
@@ -9,7 +9,6 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 
index 60408646176b9e7fdc1c9da0e7cc1c8986812024..ec1114b33d8954a3d2436646d9d735112e240e0e 100644 (file)
@@ -7,8 +7,6 @@
  * NFS namespace
  */
 
-#include <linux/config.h>
-
 #include <linux/dcache.h>
 #include <linux/mount.h>
 #include <linux/namei.h>
index 24e47f3bbd17334fb640c634034605a4d6ad041c..b872779d7cd5de2d73bc50172490c2028144a910 100644 (file)
@@ -7,8 +7,6 @@
  * NFSv4 namespace
  */
 
-#include <linux/config.h>
-
 #include <linux/dcache.h>
 #include <linux/mount.h>
 #include <linux/namei.h>
index 1d656a64519977189d7741e944dd11832e6e51ae..8dfefe41a8da88277875936ebab5918875388ed2 100644 (file)
@@ -69,7 +69,6 @@
  *     Fabian Frederick:       Option parser rebuilt (using parser lib)
 */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/kernel.h>
index e8d40030cab4939264b4e2d2350cea9ae6c60546..28659a919d6e47e5dfcf4ec3a0bdc7e827b4d477 100644 (file)
@@ -20,7 +20,6 @@
  *   of another (see nfs_lookup())
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 
index c093642fb983b4627e94793b3268cde7c9d4c308..b67ce93540485af0762014f7c9213bfed390aabe 100644 (file)
@@ -2,7 +2,6 @@
  * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README
  */
 
-#include <linux/config.h>
 #include <linux/time.h>
 #include <linux/reiserfs_fs.h>
 #include <linux/reiserfs_acl.h>
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_usart.h b/include/asm-arm/arch-at91rm9200/at91rm9200_usart.h
deleted file mode 100644 (file)
index 79f851e..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * include/asm-arm/arch-at91rm9200/at91rm9200_usart.h
- *
- * Copyright (C) 2005 Ivan Kokshaysky
- * Copyright (C) SAN People
- *
- * USART registers.
- * Based on AT91RM9200 datasheet revision E.
- *
- * 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.
- */
-
-#ifndef AT91RM9200_USART_H
-#define AT91RM9200_USART_H
-
-#define AT91_US_CR             0x00                    /* Control Register */
-#define                AT91_US_RSTRX           (1 <<  2)               /* Reset Receiver */
-#define                AT91_US_RSTTX           (1 <<  3)               /* Reset Transmitter */
-#define                AT91_US_RXEN            (1 <<  4)               /* Receiver Enable */
-#define                AT91_US_RXDIS           (1 <<  5)               /* Receiver Disable */
-#define                AT91_US_TXEN            (1 <<  6)               /* Transmitter Enable */
-#define                AT91_US_TXDIS           (1 <<  7)               /* Transmitter Disable */
-#define                AT91_US_RSTSTA          (1 <<  8)               /* Reset Status Bits */
-#define                AT91_US_STTBRK          (1 <<  9)               /* Start Break */
-#define                AT91_US_STPBRK          (1 << 10)               /* Stop Break */
-#define                AT91_US_STTTO           (1 << 11)               /* Start Time-out */
-#define                AT91_US_SENDA           (1 << 12)               /* Send Address */
-#define                AT91_US_RSTIT           (1 << 13)               /* Reset Iterations */
-#define                AT91_US_RSTNACK         (1 << 14)               /* Reset Non Acknowledge */
-#define                AT91_US_RETTO           (1 << 15)               /* Rearm Time-out */
-#define                AT91_US_DTREN           (1 << 16)               /* Data Terminal Ready Enable */
-#define                AT91_US_DTRDIS          (1 << 17)               /* Data Terminal Ready Disable */
-#define                AT91_US_RTSEN           (1 << 18)               /* Request To Send Enable */
-#define                AT91_US_RTSDIS          (1 << 19)               /* Request To Send Disable */
-
-#define AT91_US_MR             0x04                    /* Mode Register */
-#define                AT91_US_USMODE          (0xf <<  0)             /* Mode of the USART */
-#define                        AT91_US_USMODE_NORMAL           0
-#define                        AT91_US_USMODE_RS485            1
-#define                        AT91_US_USMODE_HWHS             2
-#define                        AT91_US_USMODE_MODEM            3
-#define                        AT91_US_USMODE_ISO7816_T0       4
-#define                        AT91_US_USMODE_ISO7816_T1       6
-#define                        AT91_US_USMODE_IRDA             8
-#define                AT91_US_USCLKS          (3   <<  4)             /* Clock Selection */
-#define                AT91_US_CHRL            (3   <<  6)             /* Character Length */
-#define                        AT91_US_CHRL_5                  (0 <<  6)
-#define                        AT91_US_CHRL_6                  (1 <<  6)
-#define                        AT91_US_CHRL_7                  (2 <<  6)
-#define                        AT91_US_CHRL_8                  (3 <<  6)
-#define                AT91_US_SYNC            (1 <<  8)               /* Synchronous Mode Select */
-#define                AT91_US_PAR             (7 <<  9)               /* Parity Type */
-#define                        AT91_US_PAR_EVEN                (0 <<  9)
-#define                        AT91_US_PAR_ODD                 (1 <<  9)
-#define                        AT91_US_PAR_SPACE               (2 <<  9)
-#define                        AT91_US_PAR_MARK                (3 <<  9)
-#define                        AT91_US_PAR_NONE                (4 <<  9)
-#define                        AT91_US_PAR_MULTI_DROP          (6 <<  9)
-#define                AT91_US_NBSTOP          (3 << 12)               /* Number of Stop Bits */
-#define                        AT91_US_NBSTOP_1                (0 << 12)
-#define                        AT91_US_NBSTOP_1_5              (1 << 12)
-#define                        AT91_US_NBSTOP_2                (2 << 12)
-#define                AT91_US_CHMODE          (3 << 14)               /* Channel Mode */
-#define                        AT91_US_CHMODE_NORMAL           (0 << 14)
-#define                        AT91_US_CHMODE_ECHO             (1 << 14)
-#define                        AT91_US_CHMODE_LOC_LOOP         (2 << 14)
-#define                        AT91_US_CHMODE_REM_LOOP         (3 << 14)
-#define                AT91_US_MSBF            (1 << 16)               /* Bit Order */
-#define                AT91_US_MODE9           (1 << 17)               /* 9-bit Character Length */
-#define                AT91_US_CLKO            (1 << 18)               /* Clock Output Select */
-#define                AT91_US_OVER            (1 << 19)               /* Oversampling Mode */
-#define                AT91_US_INACK           (1 << 20)               /* Inhibit Non Acknowledge */
-#define                AT91_US_DSNACK          (1 << 21)               /* Disable Successive NACK */
-#define                AT91_US_MAX_ITER        (7 << 24)               /* Max Iterations */
-#define                AT91_US_FILTER          (1 << 28)               /* Infrared Receive Line Filter */
-
-#define AT91_US_IER            0x08                    /* Interrupt Enable Register */
-#define                AT91_US_RXRDY           (1 <<  0)               /* Receiver Ready */
-#define                AT91_US_TXRDY           (1 <<  1)               /* Transmitter Ready */
-#define                AT91_US_RXBRK           (1 <<  2)               /* Break Received / End of Break */
-#define                AT91_US_ENDRX           (1 <<  3)               /* End of Receiver Transfer */
-#define                AT91_US_ENDTX           (1 <<  4)               /* End of Transmitter Transfer */
-#define                AT91_US_OVRE            (1 <<  5)               /* Overrun Error */
-#define                AT91_US_FRAME           (1 <<  6)               /* Framing Error */
-#define                AT91_US_PARE            (1 <<  7)               /* Parity Error */
-#define                AT91_US_TIMEOUT         (1 <<  8)               /* Receiver Time-out */
-#define                AT91_US_TXEMPTY         (1 <<  9)               /* Transmitter Empty */
-#define                AT91_US_ITERATION       (1 << 10)               /* Max number of Repetitions Reached */
-#define                AT91_US_TXBUFE          (1 << 11)               /* Transmission Buffer Empty */
-#define                AT91_US_RXBUFF          (1 << 12)               /* Reception Buffer Full */
-#define                AT91_US_NACK            (1 << 13)               /* Non Acknowledge */
-#define                AT91_US_RIIC            (1 << 16)               /* Ring Indicator Input Change */
-#define                AT91_US_DSRIC           (1 << 17)               /* Data Set Ready Input Change */
-#define                AT91_US_DCDIC           (1 << 18)               /* Data Carrier Detect Input Change */
-#define                AT91_US_CTSIC           (1 << 19)               /* Clear to Send Input Change */
-#define                AT91_US_RI              (1 << 20)               /* RI */
-#define                AT91_US_DSR             (1 << 21)               /* DSR */
-#define                AT91_US_DCD             (1 << 22)               /* DCD */
-#define                AT91_US_CTS             (1 << 23)               /* CTS */
-
-#define AT91_US_IDR            0x0c                    /* Interrupt Disable Register */
-#define AT91_US_IMR            0x10                    /* Interrupt Mask Register */
-#define AT91_US_CSR            0x14                    /* Channel Status Register */
-#define AT91_US_RHR            0x18                    /* Receiver Holding Register */
-#define AT91_US_THR            0x1c                    /* Transmitter Holding Register */
-
-#define AT91_US_BRGR           0x20                    /* Baud Rate Generator Register */
-#define                AT91_US_CD              (0xffff << 0)           /* Clock Divider */
-
-#define AT91_US_RTOR           0x24                    /* Receiver Time-out Register */
-#define                AT91_US_TO              (0xffff << 0)           /* Time-out Value */
-
-#define AT91_US_TTGR           0x28                    /* Transmitter Timeguard Register */
-#define                AT91_US_TG              (0xff << 0)             /* Timeguard Value */
-
-#define AT91_US_FIDI           0x40                    /* FI DI Ratio Register */
-#define AT91_US_NER            0x44                    /* Number of Errors Register */
-#define AT91_US_IF             0x4c                    /* IrDA Filter Register */
-
-#endif
index c1ca9a4658ec9e801aa49bc2d7ba746420615c34..3cc9aec80f9d50320dc2231f314d243a4040287f 100644 (file)
@@ -97,12 +97,13 @@ struct at91_uart_config {
        unsigned short  nr_tty;         /* number of serial tty's */
        short           tty_map[];      /* map UART to tty number */
 };
-extern struct platform_device *at91_default_console_device;
+extern struct platform_device *atmel_default_console_device;
 extern void __init at91_init_serial(struct at91_uart_config *config);
 
-struct at91_uart_data {
+struct atmel_uart_data {
        short           use_dma_tx;     /* use transmit DMA? */
        short           use_dma_rx;     /* use receive DMA? */
+       void __iomem    *regs;          /* virtual base address, if any */
 };
 extern void __init at91_add_device_serial(void);
 
index 6551b4d1ff7b21ca6e78e9c53a563fc3e50e114a..9ca4cc9c0b2e707b4f155c9053bde7571ac981f8 100644 (file)
@@ -44,7 +44,7 @@
 #define AT91_SRAM_VIRT_BASE    (AT91_IO_VIRT_BASE - AT91RM9200_SRAM_SIZE)
 
 /* Serial ports */
-#define AT91_NR_UART           5               /* 4 USART3's and one DBGU port */
+#define ATMEL_MAX_UART         5               /* 4 USART3's and one DBGU port */
 
 /* FLASH */
 #define AT91_FLASH_BASE                0x10000000      /* NCS0: Flash physical base address */
index bee02fd8dab1d5689eee096312d7d0962bd220bb..7d0ba18ad5787d7ebdb3aaba80867d0dbbef2e77 100644 (file)
@@ -8,8 +8,6 @@
  *
  */
 
-#include <linux/config.h>
-
 #ifndef __ASM_ARCH_CLOCKS_H
 #define __ASM_ARCH_CLOCKS_H
 
index 1290bb32802d861c06c7db621be7da8b7ad276fb..55b317a89061b58ca673b0fe080ed3a361aecf69 100644 (file)
@@ -14,7 +14,7 @@ struct uart_port;
  * This is a temporary structure for registering these
  * functions; it is intended to be discarded after boot.
  */
-struct at91_port_fns {
+struct atmel_port_fns {
        void    (*set_mctrl)(struct uart_port *, u_int);
        u_int   (*get_mctrl)(struct uart_port *);
        void    (*enable_ms)(struct uart_port *);
@@ -24,10 +24,10 @@ struct at91_port_fns {
        void    (*close)(struct uart_port *);
 };
 
-#if defined(CONFIG_SERIAL_AT91)
-void at91_register_uart_fns(struct at91_port_fns *fns);
+#if defined(CONFIG_SERIAL_ATMEL)
+void atmel_register_uart_fns(struct atmel_port_fns *fns);
 #else
-#define at91_register_uart_fns(fns) do { } while (0)
+#define atmel_register_uart_fns(fns) do { } while (0)
 #endif
 
 
index b13322dccf41cf94d31879888232e51e80580aaa..c1b264dff2870f786887b686c44295282b75d4fa 100644 (file)
@@ -13,7 +13,6 @@
 
 #ifndef __ASSEMBLY__
 
-#include <linux/config.h>
 #include <linux/slab.h>
 #include <asm/processor.h>
 #include <asm/page.h>
diff --git a/include/asm-avr32/arch-at32ap/at91rm9200_usart.h b/include/asm-avr32/arch-at32ap/at91rm9200_usart.h
deleted file mode 100644 (file)
index 79f851e..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * include/asm-arm/arch-at91rm9200/at91rm9200_usart.h
- *
- * Copyright (C) 2005 Ivan Kokshaysky
- * Copyright (C) SAN People
- *
- * USART registers.
- * Based on AT91RM9200 datasheet revision E.
- *
- * 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.
- */
-
-#ifndef AT91RM9200_USART_H
-#define AT91RM9200_USART_H
-
-#define AT91_US_CR             0x00                    /* Control Register */
-#define                AT91_US_RSTRX           (1 <<  2)               /* Reset Receiver */
-#define                AT91_US_RSTTX           (1 <<  3)               /* Reset Transmitter */
-#define                AT91_US_RXEN            (1 <<  4)               /* Receiver Enable */
-#define                AT91_US_RXDIS           (1 <<  5)               /* Receiver Disable */
-#define                AT91_US_TXEN            (1 <<  6)               /* Transmitter Enable */
-#define                AT91_US_TXDIS           (1 <<  7)               /* Transmitter Disable */
-#define                AT91_US_RSTSTA          (1 <<  8)               /* Reset Status Bits */
-#define                AT91_US_STTBRK          (1 <<  9)               /* Start Break */
-#define                AT91_US_STPBRK          (1 << 10)               /* Stop Break */
-#define                AT91_US_STTTO           (1 << 11)               /* Start Time-out */
-#define                AT91_US_SENDA           (1 << 12)               /* Send Address */
-#define                AT91_US_RSTIT           (1 << 13)               /* Reset Iterations */
-#define                AT91_US_RSTNACK         (1 << 14)               /* Reset Non Acknowledge */
-#define                AT91_US_RETTO           (1 << 15)               /* Rearm Time-out */
-#define                AT91_US_DTREN           (1 << 16)               /* Data Terminal Ready Enable */
-#define                AT91_US_DTRDIS          (1 << 17)               /* Data Terminal Ready Disable */
-#define                AT91_US_RTSEN           (1 << 18)               /* Request To Send Enable */
-#define                AT91_US_RTSDIS          (1 << 19)               /* Request To Send Disable */
-
-#define AT91_US_MR             0x04                    /* Mode Register */
-#define                AT91_US_USMODE          (0xf <<  0)             /* Mode of the USART */
-#define                        AT91_US_USMODE_NORMAL           0
-#define                        AT91_US_USMODE_RS485            1
-#define                        AT91_US_USMODE_HWHS             2
-#define                        AT91_US_USMODE_MODEM            3
-#define                        AT91_US_USMODE_ISO7816_T0       4
-#define                        AT91_US_USMODE_ISO7816_T1       6
-#define                        AT91_US_USMODE_IRDA             8
-#define                AT91_US_USCLKS          (3   <<  4)             /* Clock Selection */
-#define                AT91_US_CHRL            (3   <<  6)             /* Character Length */
-#define                        AT91_US_CHRL_5                  (0 <<  6)
-#define                        AT91_US_CHRL_6                  (1 <<  6)
-#define                        AT91_US_CHRL_7                  (2 <<  6)
-#define                        AT91_US_CHRL_8                  (3 <<  6)
-#define                AT91_US_SYNC            (1 <<  8)               /* Synchronous Mode Select */
-#define                AT91_US_PAR             (7 <<  9)               /* Parity Type */
-#define                        AT91_US_PAR_EVEN                (0 <<  9)
-#define                        AT91_US_PAR_ODD                 (1 <<  9)
-#define                        AT91_US_PAR_SPACE               (2 <<  9)
-#define                        AT91_US_PAR_MARK                (3 <<  9)
-#define                        AT91_US_PAR_NONE                (4 <<  9)
-#define                        AT91_US_PAR_MULTI_DROP          (6 <<  9)
-#define                AT91_US_NBSTOP          (3 << 12)               /* Number of Stop Bits */
-#define                        AT91_US_NBSTOP_1                (0 << 12)
-#define                        AT91_US_NBSTOP_1_5              (1 << 12)
-#define                        AT91_US_NBSTOP_2                (2 << 12)
-#define                AT91_US_CHMODE          (3 << 14)               /* Channel Mode */
-#define                        AT91_US_CHMODE_NORMAL           (0 << 14)
-#define                        AT91_US_CHMODE_ECHO             (1 << 14)
-#define                        AT91_US_CHMODE_LOC_LOOP         (2 << 14)
-#define                        AT91_US_CHMODE_REM_LOOP         (3 << 14)
-#define                AT91_US_MSBF            (1 << 16)               /* Bit Order */
-#define                AT91_US_MODE9           (1 << 17)               /* 9-bit Character Length */
-#define                AT91_US_CLKO            (1 << 18)               /* Clock Output Select */
-#define                AT91_US_OVER            (1 << 19)               /* Oversampling Mode */
-#define                AT91_US_INACK           (1 << 20)               /* Inhibit Non Acknowledge */
-#define                AT91_US_DSNACK          (1 << 21)               /* Disable Successive NACK */
-#define                AT91_US_MAX_ITER        (7 << 24)               /* Max Iterations */
-#define                AT91_US_FILTER          (1 << 28)               /* Infrared Receive Line Filter */
-
-#define AT91_US_IER            0x08                    /* Interrupt Enable Register */
-#define                AT91_US_RXRDY           (1 <<  0)               /* Receiver Ready */
-#define                AT91_US_TXRDY           (1 <<  1)               /* Transmitter Ready */
-#define                AT91_US_RXBRK           (1 <<  2)               /* Break Received / End of Break */
-#define                AT91_US_ENDRX           (1 <<  3)               /* End of Receiver Transfer */
-#define                AT91_US_ENDTX           (1 <<  4)               /* End of Transmitter Transfer */
-#define                AT91_US_OVRE            (1 <<  5)               /* Overrun Error */
-#define                AT91_US_FRAME           (1 <<  6)               /* Framing Error */
-#define                AT91_US_PARE            (1 <<  7)               /* Parity Error */
-#define                AT91_US_TIMEOUT         (1 <<  8)               /* Receiver Time-out */
-#define                AT91_US_TXEMPTY         (1 <<  9)               /* Transmitter Empty */
-#define                AT91_US_ITERATION       (1 << 10)               /* Max number of Repetitions Reached */
-#define                AT91_US_TXBUFE          (1 << 11)               /* Transmission Buffer Empty */
-#define                AT91_US_RXBUFF          (1 << 12)               /* Reception Buffer Full */
-#define                AT91_US_NACK            (1 << 13)               /* Non Acknowledge */
-#define                AT91_US_RIIC            (1 << 16)               /* Ring Indicator Input Change */
-#define                AT91_US_DSRIC           (1 << 17)               /* Data Set Ready Input Change */
-#define                AT91_US_DCDIC           (1 << 18)               /* Data Carrier Detect Input Change */
-#define                AT91_US_CTSIC           (1 << 19)               /* Clear to Send Input Change */
-#define                AT91_US_RI              (1 << 20)               /* RI */
-#define                AT91_US_DSR             (1 << 21)               /* DSR */
-#define                AT91_US_DCD             (1 << 22)               /* DCD */
-#define                AT91_US_CTS             (1 << 23)               /* CTS */
-
-#define AT91_US_IDR            0x0c                    /* Interrupt Disable Register */
-#define AT91_US_IMR            0x10                    /* Interrupt Mask Register */
-#define AT91_US_CSR            0x14                    /* Channel Status Register */
-#define AT91_US_RHR            0x18                    /* Receiver Holding Register */
-#define AT91_US_THR            0x1c                    /* Transmitter Holding Register */
-
-#define AT91_US_BRGR           0x20                    /* Baud Rate Generator Register */
-#define                AT91_US_CD              (0xffff << 0)           /* Clock Divider */
-
-#define AT91_US_RTOR           0x24                    /* Receiver Time-out Register */
-#define                AT91_US_TO              (0xffff << 0)           /* Time-out Value */
-
-#define AT91_US_TTGR           0x28                    /* Transmitter Timeguard Register */
-#define                AT91_US_TG              (0xff << 0)             /* Timeguard Value */
-
-#define AT91_US_FIDI           0x40                    /* FI DI Ratio Register */
-#define AT91_US_NER            0x44                    /* Number of Errors Register */
-#define AT91_US_IF             0x4c                    /* IrDA Filter Register */
-
-#endif
index 39368e18ab2027e94e2e8772046356e4bf8d8279..a39b3e999f18dca54774979c4f500b17fe785b3d 100644 (file)