From cc35ab7b2cb9ecfd5c75dcf2344b3f7cbe66311c Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 14 Aug 2010 11:59:44 -0700 Subject: [PATCH] --- yaml --- r: 209387 b: refs/heads/master c: bbbfb910d14988963fbc0b3fc5fc460daf21bf24 h: refs/heads/master i: 209385: 2c9fa8524e16e49ff1dba0f908e1d352db4b9df5 209383: 662cbbc83cb0eb99c725cdefa5a13bd7dd4cf285 v: v3 --- [refs] | 2 +- trunk/Documentation/00-INDEX | 4 +- .../ABI/testing/sysfs-bus-i2c-devices-hm6352 | 21 + .../sysfs-devices-platform-_UDC_-gadget | 12 + .../ABI/testing/sysfs-i2c-bmp085 | 31 + trunk/Documentation/DMA-API-HOWTO.txt | 16 +- trunk/Documentation/DMA-API.txt | 6 - trunk/Documentation/DocBook/Makefile | 6 +- trunk/Documentation/DocBook/kernel-api.tmpl | 1 - .../DocBook/v4l/lirc_device_interface.xml | 16 + .../DocBook/v4l/pixfmt-packed-rgb.xml | 78 + trunk/Documentation/SubmittingPatches | 11 + trunk/Documentation/blackfin/00-INDEX | 11 +- trunk/Documentation/blackfin/Filesystems | 169 -- .../Documentation/blackfin/bfin-spi-notes.txt | 14 + .../Documentation/blackfin/cachefeatures.txt | 55 - trunk/Documentation/cpu-hotplug.txt | 2 +- trunk/Documentation/devices.txt | 1 + .../feature-removal-schedule.txt | 50 +- trunk/Documentation/filesystems/Locking | 30 +- trunk/Documentation/filesystems/porting | 45 + trunk/Documentation/filesystems/proc.txt | 97 +- trunk/Documentation/filesystems/squashfs.txt | 2 +- trunk/Documentation/filesystems/vfs.txt | 6 +- trunk/Documentation/gpio.txt | 35 +- trunk/Documentation/hwmon/coretemp | 105 +- trunk/Documentation/hwmon/f71882fg | 4 + trunk/Documentation/hwmon/jc42 | 97 + trunk/Documentation/hwmon/smm665 | 157 ++ trunk/Documentation/i2c/instantiating-devices | 2 +- trunk/Documentation/kernel-parameters.txt | 6 +- trunk/Documentation/mmc/00-INDEX | 4 + trunk/Documentation/mmc/mmc-dev-attrs.txt | 56 + trunk/Documentation/networking/igb.txt | 132 + trunk/Documentation/networking/igbvf.txt | 78 + trunk/Documentation/networking/wavelan.txt | 74 - trunk/Documentation/padata.txt | 24 +- .../powerpc/dts-bindings/fsl/esdhc.txt | 2 + .../sound/alsa/HD-Audio-Models.txt | 13 +- trunk/Documentation/sysctl/vm.txt | 2 +- .../postprocess/trace-vmscan-postprocess.pl | 686 ++++++ trunk/Documentation/usb/ehci.txt | 2 +- trunk/Documentation/usb/gadget_multi.txt | 150 ++ trunk/Documentation/usb/gadget_serial.txt | 87 +- trunk/Documentation/usb/hotplug.txt | 4 +- trunk/Documentation/usb/linux-cdc-acm.inf | 107 + trunk/Documentation/usb/linux.inf | 228 +- .../video4linux/v4l2-controls.txt | 648 +++++ trunk/MAINTAINERS | 99 +- trunk/Makefile | 1 - trunk/arch/alpha/include/asm/dma-mapping.h | 2 - trunk/arch/alpha/include/asm/hw_irq.h | 1 + trunk/arch/alpha/include/asm/ioctls.h | 4 +- trunk/arch/alpha/include/asm/md.h | 13 - trunk/arch/alpha/include/asm/perf_event.h | 8 +- trunk/arch/alpha/include/asm/scatterlist.h | 2 - trunk/arch/alpha/include/asm/termbits.h | 1 + trunk/arch/alpha/include/asm/wrperfmon.h | 93 + trunk/arch/alpha/kernel/Makefile | 1 + trunk/arch/alpha/kernel/irq.c | 7 +- trunk/arch/alpha/kernel/irq_alpha.c | 3 + trunk/arch/alpha/kernel/osf_sys.c | 14 +- trunk/arch/alpha/kernel/perf_event.c | 842 +++++++ trunk/arch/alpha/kernel/process.c | 2 +- trunk/arch/alpha/kernel/time.c | 26 + trunk/arch/arm/Kconfig | 51 +- trunk/arch/arm/Makefile | 1 + trunk/arch/arm/boot/compressed/Makefile | 2 +- trunk/arch/arm/boot/compressed/head.S | 5 +- trunk/arch/arm/common/it8152.c | 8 - trunk/arch/arm/configs/s5pc110_defconfig | 66 - trunk/arch/arm/configs/s5pv210_defconfig | 5 + trunk/arch/arm/include/asm/cache.h | 2 +- trunk/arch/arm/include/asm/dma-mapping.h | 18 +- trunk/arch/arm/include/asm/elf.h | 2 + .../arch/arm/include/asm/hardware/coresight.h | 8 +- trunk/arch/arm/include/asm/hardware/scoop.h | 29 +- trunk/arch/arm/include/asm/highmem.h | 2 +- trunk/arch/arm/include/asm/ioctls.h | 2 + trunk/arch/arm/include/asm/termbits.h | 1 + trunk/arch/arm/include/asm/tlbflush.h | 8 + trunk/arch/arm/kernel/entry-common.S | 124 +- trunk/arch/arm/kernel/etm.c | 4 +- trunk/arch/arm/kernel/module.c | 34 + trunk/arch/arm/kernel/sys_arm.c | 4 +- trunk/arch/arm/kernel/sys_oabi-compat.c | 6 +- trunk/arch/arm/mach-at91/board-cam60.c | 6 +- .../arm/mach-clps711x/include/mach/hardware.h | 7 - trunk/arch/arm/mach-gemini/Kconfig | 21 + trunk/arch/arm/mach-gemini/Makefile | 3 + trunk/arch/arm/mach-gemini/board-nas4220b.c | 111 + trunk/arch/arm/mach-gemini/board-wbd111.c | 143 ++ trunk/arch/arm/mach-gemini/board-wbd222.c | 143 ++ .../arm/mach-h720x/include/mach/hardware.h | 2 - trunk/arch/arm/mach-imx/mach-pca100.c | 2 +- .../mach-integrator/include/mach/hardware.h | 1 - .../arm/mach-ixp23xx/include/mach/hardware.h | 1 - trunk/arch/arm/mach-ixp4xx/Kconfig | 8 + trunk/arch/arm/mach-ixp4xx/Makefile | 2 + .../mach-ixp4xx/include/mach/debug-macro.S | 2 + trunk/arch/arm/mach-ixp4xx/include/mach/io.h | 6 +- trunk/arch/arm/mach-ixp4xx/vulcan-pci.c | 73 + trunk/arch/arm/mach-ixp4xx/vulcan-setup.c | 246 ++ trunk/arch/arm/mach-mmp/aspenite.c | 6 +- trunk/arch/arm/mach-mmp/avengers_lite.c | 3 +- trunk/arch/arm/mach-mmp/common.c | 2 +- trunk/arch/arm/mach-mmp/common.h | 11 +- trunk/arch/arm/mach-mmp/flint.c | 3 +- .../arch/arm/mach-mmp/include/mach/devices.h | 4 + trunk/arch/arm/mach-mmp/include/mach/mmp2.h | 7 + trunk/arch/arm/mach-mmp/include/mach/pxa168.h | 5 + trunk/arch/arm/mach-mmp/include/mach/pxa910.h | 5 + trunk/arch/arm/mach-mmp/irq-mmp2.c | 1 + trunk/arch/arm/mach-mmp/jasper.c | 3 +- trunk/arch/arm/mach-mmp/mmp2.c | 22 + trunk/arch/arm/mach-mmp/tavorevb.c | 3 +- trunk/arch/arm/mach-mmp/time.c | 21 - trunk/arch/arm/mach-mmp/ttc_dkb.c | 3 +- trunk/arch/arm/mach-msm/Makefile | 2 +- trunk/arch/arm/mach-msm/acpuclock-arm11.c | 1 - trunk/arch/arm/mach-msm/board-trout-gpio.c | 115 + trunk/arch/arm/mach-msm/board-trout-mmc.c | 186 ++ trunk/arch/arm/mach-msm/board-trout.c | 11 + trunk/arch/arm/mach-msm/clock.c | 1 - trunk/arch/arm/mach-msm/devices-msm7x00.c | 3 +- trunk/arch/arm/mach-msm/include/mach/board.h | 4 + trunk/arch/arm/mach-msm/include/mach/mmc.h | 2 +- trunk/arch/arm/mach-msm/smd.c | 2 +- trunk/arch/arm/mach-mx3/mach-armadillo5x0.c | 4 +- trunk/arch/arm/mach-mx3/mach-mx31lilly.c | 4 +- trunk/arch/arm/mach-mx3/mach-mx31lite.c | 2 +- trunk/arch/arm/mach-mx3/mach-mx31moboard.c | 2 +- trunk/arch/arm/mach-mx3/mach-pcm037.c | 4 +- trunk/arch/arm/mach-mx3/mach-pcm043.c | 2 +- .../arch/arm/mach-mx3/mx31moboard-smartbot.c | 2 +- .../arch/arm/mach-omap2/board-omap3pandora.c | 16 + trunk/arch/arm/mach-omap2/hsmmc.c | 1 + trunk/arch/arm/mach-omap2/hsmmc.h | 4 + trunk/arch/arm/mach-pxa/Kconfig | 80 +- trunk/arch/arm/mach-pxa/Makefile | 13 +- trunk/arch/arm/mach-pxa/balloon3.c | 732 ++++-- trunk/arch/arm/mach-pxa/cm-x300.c | 4 +- .../arm/mach-pxa/colibri-pxa270-evalboard.c | 111 + .../arch/arm/mach-pxa/colibri-pxa270-income.c | 272 ++ trunk/arch/arm/mach-pxa/colibri-pxa270.c | 176 +- trunk/arch/arm/mach-pxa/colibri-pxa320.c | 40 + trunk/arch/arm/mach-pxa/corgi.c | 5 +- trunk/arch/arm/mach-pxa/corgi_pm.c | 11 +- trunk/arch/arm/mach-pxa/devices.c | 14 + trunk/arch/arm/mach-pxa/devices.h | 1 + trunk/arch/arm/mach-pxa/e330.c | 78 - trunk/arch/arm/mach-pxa/e350.c | 79 - trunk/arch/arm/mach-pxa/e400.c | 155 -- trunk/arch/arm/mach-pxa/e740.c | 225 -- trunk/arch/arm/mach-pxa/e750.c | 226 -- trunk/arch/arm/mach-pxa/e800.c | 229 -- trunk/arch/arm/mach-pxa/eseries.c | 809 ++++++ trunk/arch/arm/mach-pxa/imote2.c | 590 ----- .../arch/arm/mach-pxa/include/mach/balloon3.h | 75 +- .../arch/arm/mach-pxa/include/mach/colibri.h | 32 +- trunk/arch/arm/mach-pxa/include/mach/corgi.h | 5 - .../arch/arm/mach-pxa/include/mach/gumstix.h | 12 +- .../arch/arm/mach-pxa/include/mach/hardware.h | 5 - .../arch/arm/mach-pxa/include/mach/palm27x.h | 81 + .../arch/arm/mach-pxa/include/mach/pata_pxa.h | 33 + .../arch/arm/mach-pxa/include/mach/sharpsl.h | 35 - .../arm/mach-pxa/include/mach/sharpsl_pm.h | 9 + trunk/arch/arm/mach-pxa/include/mach/spitz.h | 2 - trunk/arch/arm/mach-pxa/mioa701.c | 10 +- trunk/arch/arm/mach-pxa/palm27x.c | 477 ++++ trunk/arch/arm/mach-pxa/palmld.c | 292 +-- trunk/arch/arm/mach-pxa/palmt5.c | 283 +-- trunk/arch/arm/mach-pxa/palmte2.c | 20 +- trunk/arch/arm/mach-pxa/palmtreo.c | 354 +-- trunk/arch/arm/mach-pxa/palmtx.c | 299 +-- trunk/arch/arm/mach-pxa/palmz72.c | 264 +- trunk/arch/arm/mach-pxa/poodle.c | 2 - trunk/arch/arm/mach-pxa/pxa25x.c | 1 + trunk/arch/arm/mach-pxa/pxa27x.c | 1 + trunk/arch/arm/mach-pxa/pxa3xx.c | 15 +- trunk/arch/arm/mach-pxa/raumfeld.c | 29 +- trunk/arch/arm/mach-pxa/sharpsl.h | 26 - trunk/arch/arm/mach-pxa/sharpsl_pm.c | 23 - trunk/arch/arm/mach-pxa/sleep.S | 7 - trunk/arch/arm/mach-pxa/spitz.c | 727 +++--- trunk/arch/arm/mach-pxa/spitz_pm.c | 11 +- trunk/arch/arm/mach-pxa/stargate2.c | 719 ++++-- trunk/arch/arm/mach-pxa/trizeps4.c | 6 +- trunk/arch/arm/mach-pxa/vpac270.c | 126 +- trunk/arch/arm/mach-pxa/z2.c | 118 +- trunk/arch/arm/mach-s3c2416/s3c2416.c | 3 +- trunk/arch/arm/mach-s3c2440/mach-gta02.c | 17 +- trunk/arch/arm/mach-s3c2443/s3c2443.c | 2 + trunk/arch/arm/mach-s3c64xx/Kconfig | 15 + trunk/arch/arm/mach-s3c64xx/Makefile | 2 + trunk/arch/arm/mach-s3c64xx/clock.c | 24 +- trunk/arch/arm/mach-s3c64xx/dev-audio.c | 2 +- trunk/arch/arm/mach-s3c64xx/dev-spi.c | 2 +- trunk/arch/arm/mach-s3c64xx/gpiolib.c | 2 +- .../arch/arm/mach-s3c64xx/include/mach/map.h | 6 + .../mach-s3c64xx/include/mach/regs-clock.h | 5 + .../arm/mach-s3c64xx/include/mach/regs-fb.h | 20 - trunk/arch/arm/mach-s3c64xx/mach-anw6410.c | 1 - trunk/arch/arm/mach-s3c64xx/mach-hmt.c | 1 - trunk/arch/arm/mach-s3c64xx/mach-smartq5.c | 3 +- trunk/arch/arm/mach-s3c64xx/mach-smartq7.c | 3 +- trunk/arch/arm/mach-s3c64xx/mach-smdk6410.c | 34 +- trunk/arch/arm/mach-s3c64xx/s3c6410.c | 6 +- trunk/arch/arm/mach-s3c64xx/setup-fb-24bpp.c | 2 +- trunk/arch/arm/mach-s3c64xx/setup-i2c0.c | 2 +- trunk/arch/arm/mach-s3c64xx/setup-i2c1.c | 2 +- trunk/arch/arm/mach-s3c64xx/setup-ide.c | 46 + trunk/arch/arm/mach-s3c64xx/setup-keypad.c | 34 + .../arch/arm/mach-s3c64xx/setup-sdhci-gpio.c | 17 +- trunk/arch/arm/mach-s5p6440/Kconfig | 13 +- trunk/arch/arm/mach-s5p6440/Makefile | 1 + trunk/arch/arm/mach-s5p6440/cpu.c | 3 +- trunk/arch/arm/mach-s5p6440/dev-audio.c | 2 +- trunk/arch/arm/mach-s5p6440/dev-spi.c | 2 +- trunk/arch/arm/mach-s5p6440/gpio.c | 4 +- .../arch/arm/mach-s5p6440/include/mach/irqs.h | 2 +- .../arch/arm/mach-s5p6440/include/mach/map.h | 4 +- .../arm/mach-s5p6440/include/mach/system.h | 7 +- trunk/arch/arm/mach-s5p6440/mach-smdk6440.c | 51 +- trunk/arch/arm/mach-s5p6440/setup-i2c0.c | 7 +- trunk/arch/arm/mach-s5p6440/setup-i2c1.c | 30 + trunk/arch/arm/mach-s5p6442/Kconfig | 1 + trunk/arch/arm/mach-s5p6442/clock.c | 6 + trunk/arch/arm/mach-s5p6442/dev-audio.c | 2 +- trunk/arch/arm/mach-s5p6442/dev-spi.c | 2 +- .../arch/arm/mach-s5p6442/include/mach/irqs.h | 2 +- .../arch/arm/mach-s5p6442/include/mach/map.h | 3 + .../arm/mach-s5p6442/include/mach/system.h | 7 +- trunk/arch/arm/mach-s5p6442/mach-smdk6442.c | 25 +- trunk/arch/arm/mach-s5pc100/Kconfig | 23 +- trunk/arch/arm/mach-s5pc100/Makefile | 2 + trunk/arch/arm/mach-s5pc100/clock.c | 8 +- trunk/arch/arm/mach-s5pc100/cpu.c | 7 + trunk/arch/arm/mach-s5pc100/dev-audio.c | 2 +- trunk/arch/arm/mach-s5pc100/dev-spi.c | 2 +- .../arch/arm/mach-s5pc100/include/mach/irqs.h | 4 +- .../arch/arm/mach-s5pc100/include/mach/map.h | 21 + .../mach-s5pc100/include/mach/regs-clock.h | 3 + .../arm/mach-s5pc100/include/mach/regs-fb.h | 34 - .../arm/mach-s5pc100/include/mach/system.h | 9 +- trunk/arch/arm/mach-s5pc100/mach-smdkc100.c | 80 +- trunk/arch/arm/mach-s5pc100/setup-ide.c | 70 + trunk/arch/arm/mach-s5pc100/setup-keypad.c | 34 + .../arch/arm/mach-s5pc100/setup-sdhci-gpio.c | 22 +- trunk/arch/arm/mach-s5pc100/setup-sdhci.c | 8 +- trunk/arch/arm/mach-s5pv210/Kconfig | 87 +- trunk/arch/arm/mach-s5pv210/Makefile | 2 + trunk/arch/arm/mach-s5pv210/cpu.c | 32 +- trunk/arch/arm/mach-s5pv210/dev-audio.c | 2 +- trunk/arch/arm/mach-s5pv210/dev-onenand.c | 7 +- trunk/arch/arm/mach-s5pv210/dev-spi.c | 2 +- trunk/arch/arm/mach-s5pv210/gpiolib.c | 14 + .../arch/arm/mach-s5pv210/include/mach/gpio.h | 12 +- .../arch/arm/mach-s5pv210/include/mach/irqs.h | 4 +- .../arch/arm/mach-s5pv210/include/mach/map.h | 16 + .../arm/mach-s5pv210/include/mach/memory.h | 9 +- .../mach-s5pv210/include/mach/regs-clock.h | 2 + .../arm/mach-s5pv210/include/mach/system.h | 7 +- trunk/arch/arm/mach-s5pv210/mach-aquila.c | 419 +++- trunk/arch/arm/mach-s5pv210/mach-goni.c | 437 +++- trunk/arch/arm/mach-s5pv210/mach-smdkc110.c | 66 +- trunk/arch/arm/mach-s5pv210/mach-smdkv210.c | 93 +- trunk/arch/arm/mach-s5pv210/setup-fb-24bpp.c | 2 +- trunk/arch/arm/mach-s5pv210/setup-i2c0.c | 2 +- trunk/arch/arm/mach-s5pv210/setup-i2c1.c | 2 +- trunk/arch/arm/mach-s5pv210/setup-i2c2.c | 2 +- trunk/arch/arm/mach-s5pv210/setup-ide.c | 50 + trunk/arch/arm/mach-s5pv210/setup-keypad.c | 34 + .../arch/arm/mach-s5pv210/setup-sdhci-gpio.c | 47 +- trunk/arch/arm/mach-s5pv210/setup-sdhci.c | 4 +- trunk/arch/arm/mach-s5pv310/Kconfig | 45 + trunk/arch/arm/mach-s5pv310/Makefile | 30 + trunk/arch/arm/mach-s5pv310/Makefile.boot | 2 + trunk/arch/arm/mach-s5pv310/clock.c | 544 ++++ trunk/arch/arm/mach-s5pv310/cpu.c | 122 + trunk/arch/arm/mach-s5pv310/headsmp.S | 41 + .../mach-s5pv310/include/mach/debug-macro.S | 36 + .../mach-s5pv310/include/mach/entry-macro.S | 84 + .../arch/arm/mach-s5pv310/include/mach/gpio.h | 135 + .../arm/mach-s5pv310/include/mach/hardware.h | 18 + trunk/arch/arm/mach-s5pv310/include/mach/io.h | 26 + .../arch/arm/mach-s5pv310/include/mach/irqs.h | 74 + .../arch/arm/mach-s5pv310/include/mach/map.h | 69 + .../arm/mach-s5pv310/include/mach/memory.h | 22 + .../arm/mach-s5pv310/include/mach/pwm-clock.h | 70 + .../mach-s5pv310/include/mach/regs-clock.h | 62 + .../arm/mach-s5pv310/include/mach/regs-irq.h | 19 + .../arch/arm/mach-s5pv310/include/mach/smp.h | 29 + .../arm/mach-s5pv310/include/mach/system.h | 22 + .../arm/mach-s5pv310/include/mach/timex.h | 29 + .../mach-s5pv310/include/mach/uncompress.h | 30 + .../arm/mach-s5pv310/include/mach/vmalloc.h | 22 + trunk/arch/arm/mach-s5pv310/init.c | 41 + trunk/arch/arm/mach-s5pv310/irq-combiner.c | 125 + trunk/arch/arm/mach-s5pv310/localtimer.c | 25 + trunk/arch/arm/mach-s5pv310/mach-smdkv310.c | 92 + .../arm/mach-s5pv310/mach-universal_c210.c | 86 + trunk/arch/arm/mach-s5pv310/platsmp.c | 192 ++ trunk/arch/arm/mach-s5pv310/setup-i2c0.c | 28 + trunk/arch/arm/mach-s5pv310/setup-i2c1.c | 25 + trunk/arch/arm/mach-s5pv310/setup-i2c2.c | 25 + trunk/arch/arm/mach-s5pv310/time.c | 287 +++ .../arch/arm/mach-sa1100/include/mach/irqs.h | 2 +- trunk/arch/arm/mach-shmobile/Kconfig | 26 + trunk/arch/arm/mach-shmobile/Makefile | 6 +- trunk/arch/arm/mach-shmobile/board-ap4evb.c | 817 +++++- trunk/arch/arm/mach-shmobile/board-g3evm.c | 59 +- trunk/arch/arm/mach-shmobile/board-g4evm.c | 153 +- trunk/arch/arm/mach-shmobile/clock-sh7367.c | 357 ++- trunk/arch/arm/mach-shmobile/clock-sh7372.c | 560 +++++ trunk/arch/arm/mach-shmobile/clock-sh7377.c | 369 +++ trunk/arch/arm/mach-shmobile/clock.c | 44 + .../arm/mach-shmobile/include/mach/common.h | 10 + .../arm/mach-shmobile/include/mach/irqs.h | 6 + .../arm/mach-shmobile/include/mach/memory.h | 3 + .../arm/mach-shmobile/include/mach/sh7372.h | 30 + .../arm/mach-shmobile/include/mach/vmalloc.h | 3 +- trunk/arch/arm/mach-shmobile/intc-sh7367.c | 178 +- trunk/arch/arm/mach-shmobile/intc-sh7372.c | 232 +- trunk/arch/arm/mach-shmobile/intc-sh7377.c | 300 ++- trunk/arch/arm/mach-shmobile/pfc-sh7372.c | 3 + trunk/arch/arm/mach-shmobile/setup-sh7367.c | 30 +- trunk/arch/arm/mach-shmobile/setup-sh7372.c | 391 ++- trunk/arch/arm/mach-shmobile/setup-sh7377.c | 34 +- trunk/arch/arm/mach-u300/clock.c | 139 +- trunk/arch/arm/mach-u300/clock.h | 5 +- trunk/arch/arm/mach-u300/core.c | 14 +- trunk/arch/arm/mach-u300/mmc.c | 8 +- trunk/arch/arm/mach-u300/timer.c | 28 +- trunk/arch/arm/mach-ux500/devices-db8500.c | 28 +- .../arm/mach-ux500/include/mach/db8500-regs.h | 6 +- trunk/arch/arm/mach-ux500/ste-dma40-db8500.h | 2 +- .../mach-versatile/include/mach/hardware.h | 9 - .../arch/arm/mach-w90x900/include/mach/i2c.h | 9 + trunk/arch/arm/mm/Kconfig | 4 +- trunk/arch/arm/mm/highmem.c | 4 +- trunk/arch/arm/plat-mxc/include/mach/gpio.h | 1 + .../arm/plat-nomadik/include/plat/ste_dma40.h | 4 +- trunk/arch/arm/plat-omap/include/plat/mmc.h | 2 + trunk/arch/arm/plat-pxa/Makefile | 1 - trunk/arch/arm/plat-pxa/pmu.c | 33 - trunk/arch/arm/plat-s5p/Kconfig | 20 +- trunk/arch/arm/plat-s5p/Makefile | 6 + trunk/arch/arm/plat-s5p/cpu.c | 19 +- trunk/arch/arm/plat-s5p/dev-fimc0.c | 36 + trunk/arch/arm/plat-s5p/dev-fimc1.c | 36 + trunk/arch/arm/plat-s5p/dev-fimc2.c | 36 + trunk/arch/arm/plat-s5p/dev-pmu.c | 36 + .../arch/arm/plat-s5p/include/plat/map-s5p.h | 23 +- trunk/arch/arm/plat-s5p/include/plat/pll.h | 41 + trunk/arch/arm/plat-s5p/include/plat/reset.h | 16 + .../arch/arm/plat-s5p/include/plat/s5pv310.h | 34 + .../arm/plat-s5p/include/plat/system-reset.h | 31 + trunk/arch/arm/plat-s5p/irq.c | 2 + trunk/arch/arm/plat-samsung/Kconfig | 15 + trunk/arch/arm/plat-samsung/Makefile | 7 +- trunk/arch/arm/plat-samsung/dev-hsmmc.c | 5 + trunk/arch/arm/plat-samsung/dev-hsmmc1.c | 5 + trunk/arch/arm/plat-samsung/dev-hsmmc2.c | 5 + trunk/arch/arm/plat-samsung/dev-hsmmc3.c | 77 + trunk/arch/arm/plat-samsung/dev-ide.c | 44 + trunk/arch/arm/plat-samsung/dev-keypad.c | 50 + trunk/arch/arm/plat-samsung/dev-wdt.c | 2 +- trunk/arch/arm/plat-samsung/gpiolib.c | 2 +- .../arm/plat-samsung/include/plat/adc-core.h | 28 + .../arm/plat-samsung/include/plat/ata-core.h | 28 + .../arch/arm/plat-samsung/include/plat/ata.h | 36 + .../arch/arm/plat-samsung/include/plat/devs.h | 20 + .../arm/plat-samsung/include/plat/fb-core.h | 29 + trunk/arch/arm/plat-samsung/include/plat/fb.h | 3 + .../arm/plat-samsung/include/plat/fimc-core.h | 44 + .../plat-samsung/include/plat/keypad-core.h | 31 + .../arm/plat-samsung/include/plat/keypad.h | 13 + .../arm/plat-samsung/include/plat/regs-ata.h | 56 + .../plat-samsung/include/plat/regs-fb-v4.h | 78 +- .../arm/plat-samsung/include/plat/regs-fb.h | 30 +- .../arm/plat-samsung/include/plat/regs-rtc.h | 3 + .../plat-samsung/include/plat/regs-serial.h | 2 + .../include/plat/regs-usb-hsotg.h | 2 + .../arm/plat-samsung/include/plat/sdhci.h | 127 +- trunk/arch/arm/plat-samsung/platformdata.c | 37 + trunk/arch/avr32/include/asm/cache.h | 2 +- trunk/arch/avr32/include/asm/dma-mapping.h | 10 - trunk/arch/avr32/include/asm/ioctls.h | 4 +- trunk/arch/avr32/include/asm/scatterlist.h | 2 - trunk/arch/avr32/include/asm/syscalls.h | 2 +- trunk/arch/avr32/include/asm/termbits.h | 1 + trunk/arch/avr32/kernel/process.c | 3 +- trunk/arch/avr32/mm/fault.c | 14 +- trunk/arch/blackfin/Kconfig | 20 +- trunk/arch/blackfin/Makefile | 3 +- trunk/arch/blackfin/boot/Makefile | 11 +- .../blackfin/configs/BF518F-EZBRD_defconfig | 163 +- .../blackfin/configs/BF526-EZBRD_defconfig | 129 +- .../blackfin/configs/BF527-EZKIT-V2_defconfig | 149 +- .../blackfin/configs/BF527-EZKIT_defconfig | 139 +- .../blackfin/configs/BF533-EZKIT_defconfig | 93 +- .../blackfin/configs/BF533-STAMP_defconfig | 131 +- .../blackfin/configs/BF537-STAMP_defconfig | 141 +- .../blackfin/configs/BF538-EZKIT_defconfig | 121 +- .../blackfin/configs/BF548-EZKIT_defconfig | 156 +- .../blackfin/configs/BF561-ACVILON_defconfig | 1 - .../blackfin/configs/BF561-EZKIT_defconfig | 85 +- .../arch/blackfin/configs/CM-BF527_defconfig | 1 - .../arch/blackfin/configs/CM-BF533_defconfig | 1 - .../arch/blackfin/configs/CM-BF537E_defconfig | 1 - .../arch/blackfin/configs/CM-BF537U_defconfig | 1 - .../arch/blackfin/configs/CM-BF548_defconfig | 1 - .../arch/blackfin/configs/CM-BF561_defconfig | 1 - trunk/arch/blackfin/configs/PNAV-10_defconfig | 123 +- .../arch/blackfin/configs/TCM-BF518_defconfig | 1 - .../arch/blackfin/configs/TCM-BF537_defconfig | 1 - trunk/arch/blackfin/include/asm/bfin_rotary.h | 74 +- trunk/arch/blackfin/include/asm/bfin_sdh.h | 119 +- trunk/arch/blackfin/include/asm/bitops.h | 2 +- trunk/arch/blackfin/include/asm/cache.h | 2 +- .../blackfin/include/asm/cdef_LPBlackfin.h | 8 +- .../blackfin/include/asm/def_LPBlackfin.h | 18 + trunk/arch/blackfin/include/asm/dma-mapping.h | 2 - trunk/arch/blackfin/include/asm/dma.h | 1 + trunk/arch/blackfin/include/asm/elf.h | 1 + trunk/arch/blackfin/include/asm/ftrace.h | 16 + trunk/arch/blackfin/include/asm/gpio.h | 111 +- trunk/arch/blackfin/include/asm/io.h | 8 +- trunk/arch/blackfin/include/asm/mem_init.h | 18 - trunk/arch/blackfin/include/asm/nand.h | 3 - trunk/arch/blackfin/include/asm/portmux.h | 10 +- trunk/arch/blackfin/include/asm/scatterlist.h | 2 - trunk/arch/blackfin/kernel/Makefile | 1 + trunk/arch/blackfin/kernel/bfin_dma_5xx.c | 19 +- trunk/arch/blackfin/kernel/bfin_gpio.c | 111 +- .../arch/blackfin/kernel/cplb-mpu/cplbinit.c | 4 - trunk/arch/blackfin/kernel/ftrace-entry.S | 85 +- trunk/arch/blackfin/kernel/ftrace.c | 86 +- trunk/arch/blackfin/kernel/process.c | 2 +- trunk/arch/blackfin/kernel/setup.c | 7 + trunk/arch/blackfin/kernel/vmlinux.lds.S | 7 +- trunk/arch/blackfin/mach-bf518/Kconfig | 61 + .../mach-bf518/include/mach/anomaly.h | 21 +- .../blackfin/mach-bf518/include/mach/bf518.h | 105 + .../mach-bf518/include/mach/defBF514.h | 135 - .../mach-bf518/include/mach/defBF51x_base.h | 144 +- .../blackfin/mach-bf518/include/mach/gpio.h | 83 +- .../mach-bf518/include/mach/portmux.h | 7 +- trunk/arch/blackfin/mach-bf527/Kconfig | 66 + .../mach-bf527/include/mach/anomaly.h | 22 +- .../blackfin/mach-bf527/include/mach/bf527.h | 120 + .../mach-bf527/include/mach/defBF52x_base.h | 225 +- .../blackfin/mach-bf527/include/mach/gpio.h | 96 +- .../mach-bf527/include/mach/portmux.h | 3 +- .../mach-bf533/include/mach/anomaly.h | 10 +- .../blackfin/mach-bf533/include/mach/gpio.h | 32 +- .../mach-bf533/include/mach/portmux.h | 3 +- .../mach-bf537/include/mach/anomaly.h | 11 +- .../mach-bf537/include/mach/defBF534.h | 36 +- .../blackfin/mach-bf537/include/mach/gpio.h | 96 +- .../mach-bf537/include/mach/portmux.h | 7 +- .../mach-bf538/include/mach/anomaly.h | 16 +- .../mach-bf538/include/mach/cdefBF538.h | 64 - .../mach-bf538/include/mach/defBF539.h | 14 +- .../blackfin/mach-bf538/include/mach/gpio.h | 108 +- .../mach-bf538/include/mach/portmux.h | 1 + .../mach-bf548/include/mach/anomaly.h | 16 +- .../mach-bf548/include/mach/cdefBF54x_base.h | 16 +- .../mach-bf548/include/mach/defBF542.h | 130 - .../mach-bf548/include/mach/defBF544.h | 6 +- .../mach-bf548/include/mach/defBF547.h | 136 +- .../mach-bf548/include/mach/defBF54x_base.h | 152 +- .../blackfin/mach-bf548/include/mach/gpio.h | 10 + .../mach-bf548/include/mach/portmux.h | 3 +- .../mach-bf561/include/mach/anomaly.h | 13 +- .../blackfin/mach-bf561/include/mach/gpio.h | 96 +- .../mach-bf561/include/mach/portmux.h | 3 +- trunk/arch/blackfin/mach-common/arch_checks.c | 16 +- trunk/arch/blackfin/mach-common/cache.S | 15 +- trunk/arch/blackfin/mach-common/dpmc_modes.S | 24 - trunk/arch/blackfin/mach-common/pm.c | 17 +- trunk/arch/cris/include/asm/dma-mapping.h | 8 - trunk/arch/cris/include/asm/ioctls.h | 5 +- trunk/arch/cris/include/asm/pgtable.h | 3 + trunk/arch/cris/include/asm/scatterlist.h | 2 - trunk/arch/cris/include/asm/termbits.h | 1 + trunk/arch/frv/include/asm/dma-mapping.h | 8 - trunk/arch/frv/include/asm/highmem.h | 2 +- trunk/arch/frv/include/asm/ioctls.h | 2 + trunk/arch/frv/include/asm/mem-layout.h | 2 +- trunk/arch/frv/include/asm/scatterlist.h | 2 - trunk/arch/frv/include/asm/termbits.h | 1 + trunk/arch/frv/kernel/process.c | 3 +- trunk/arch/h8300/include/asm/ioctls.h | 2 + trunk/arch/h8300/include/asm/md.h | 13 - trunk/arch/h8300/include/asm/scatterlist.h | 2 - trunk/arch/h8300/include/asm/termbits.h | 1 + trunk/arch/h8300/kernel/process.c | 2 +- trunk/arch/ia64/Kconfig | 3 +- trunk/arch/ia64/include/asm/atomic.h | 8 +- trunk/arch/ia64/include/asm/dma-mapping.h | 4 - trunk/arch/ia64/include/asm/ioctls.h | 4 +- trunk/arch/ia64/include/asm/rwsem.h | 6 +- trunk/arch/ia64/include/asm/scatterlist.h | 9 - trunk/arch/ia64/include/asm/termbits.h | 1 + trunk/arch/ia64/include/asm/unistd.h | 7 +- trunk/arch/ia64/kernel/entry.S | 3 + trunk/arch/ia64/kernel/perfmon.c | 15 +- trunk/arch/ia64/kernel/process.c | 2 +- trunk/arch/ia64/kernel/setup.c | 6 - trunk/arch/ia64/kernel/smpboot.c | 19 +- trunk/arch/m32r/include/asm/ioctls.h | 4 +- trunk/arch/m32r/include/asm/scatterlist.h | 2 - trunk/arch/m32r/include/asm/termbits.h | 1 + trunk/arch/m32r/kernel/process.c | 3 +- trunk/arch/m68k/include/asm/cache.h | 2 +- trunk/arch/m68k/include/asm/dma-mapping.h | 10 - trunk/arch/m68k/include/asm/ioctls.h | 2 + trunk/arch/m68k/include/asm/md.h | 13 - trunk/arch/m68k/include/asm/scatterlist.h | 3 - trunk/arch/m68k/include/asm/termbits.h | 1 + trunk/arch/m68k/kernel/process.c | 2 +- trunk/arch/m68k/mac/config.c | 9 + trunk/arch/m68k/mac/misc.c | 6 +- trunk/arch/m68k/sun3/leds.c | 4 +- trunk/arch/m68knommu/kernel/process.c | 2 +- .../arch/microblaze/include/asm/dma-mapping.h | 6 - trunk/arch/microblaze/include/asm/page.h | 2 +- .../arch/microblaze/include/asm/scatterlist.h | 2 - trunk/arch/microblaze/kernel/sys_microblaze.c | 2 +- trunk/arch/mips/include/asm/dma-mapping.h | 9 - trunk/arch/mips/include/asm/highmem.h | 4 +- trunk/arch/mips/include/asm/ioctls.h | 5 +- .../mips/include/asm/mach-generic/kmalloc.h | 2 +- .../arch/mips/include/asm/mach-ip27/kmalloc.h | 2 +- .../arch/mips/include/asm/mach-ip32/kmalloc.h | 4 +- trunk/arch/mips/include/asm/scatterlist.h | 2 - trunk/arch/mips/include/asm/statfs.h | 12 +- trunk/arch/mips/include/asm/termbits.h | 1 + trunk/arch/mips/kernel/syscall.c | 2 +- trunk/arch/mips/mm/dma-default.c | 7 - trunk/arch/mips/mm/highmem.c | 4 +- trunk/arch/mn10300/boot/compressed/misc.c | 1 + trunk/arch/mn10300/include/asm/cache.h | 2 +- trunk/arch/mn10300/include/asm/dma-mapping.h | 8 - trunk/arch/mn10300/include/asm/gdb-stub.h | 8 +- trunk/arch/mn10300/include/asm/highmem.h | 2 +- trunk/arch/mn10300/include/asm/ioctls.h | 4 +- trunk/arch/mn10300/include/asm/posix_types.h | 7 +- trunk/arch/mn10300/include/asm/scatterlist.h | 2 - trunk/arch/mn10300/include/asm/termbits.h | 1 + trunk/arch/mn10300/kernel/mn10300-serial.c | 5 - trunk/arch/mn10300/kernel/process.c | 2 +- trunk/arch/mn10300/kernel/rtc.c | 5 +- trunk/arch/parisc/hpux/fs.c | 7 +- trunk/arch/parisc/hpux/sys_hpux.c | 10 +- trunk/arch/parisc/include/asm/cache.h | 2 + trunk/arch/parisc/include/asm/cacheflush.h | 2 +- trunk/arch/parisc/include/asm/dma-mapping.h | 12 - trunk/arch/parisc/include/asm/ioctls.h | 4 +- trunk/arch/parisc/include/asm/scatterlist.h | 1 - trunk/arch/parisc/include/asm/termbits.h | 1 + trunk/arch/parisc/mm/ioremap.c | 2 +- trunk/arch/powerpc/Makefile | 16 +- trunk/arch/powerpc/boot/dts/p4080ds.dts | 2 + .../arch/powerpc/configs/40x/acadia_defconfig | 1003 +------- .../arch/powerpc/configs/40x/ep405_defconfig | 1212 +-------- trunk/arch/powerpc/configs/40x/hcu4_defconfig | 1065 +------- .../powerpc/configs/40x/kilauea_defconfig | 1198 +-------- .../arch/powerpc/configs/40x/makalu_defconfig | 1006 +------- .../arch/powerpc/configs/40x/virtex_defconfig | 1107 +-------- .../arch/powerpc/configs/40x/walnut_defconfig | 1090 +------- .../arch/powerpc/configs/44x/arches_defconfig | 1060 +------- .../arch/powerpc/configs/44x/bamboo_defconfig | 1021 +------- .../powerpc/configs/44x/canyonlands_defconfig | 1264 +--------- .../arch/powerpc/configs/44x/ebony_defconfig | 1104 +-------- .../arch/powerpc/configs/44x/eiger_defconfig | 1176 +-------- trunk/arch/powerpc/configs/44x/icon_defconfig | 1334 +--------- .../powerpc/configs/44x/iss476-smp_defconfig | 938 +------ .../arch/powerpc/configs/44x/katmai_defconfig | 1089 +------- .../powerpc/configs/44x/rainier_defconfig | 1091 +------- .../powerpc/configs/44x/redwood_defconfig | 1167 +-------- .../powerpc/configs/44x/sam440ep_defconfig | 1320 +--------- .../powerpc/configs/44x/sequoia_defconfig | 1112 +-------- .../powerpc/configs/44x/taishan_defconfig | 1098 +-------- .../powerpc/configs/44x/virtex5_defconfig | 1113 +-------- trunk/arch/powerpc/configs/44x/warp_defconfig | 1389 +---------- .../powerpc/configs/52xx/cm5200_defconfig | 1232 +--------- .../powerpc/configs/52xx/lite5200b_defconfig | 1257 +--------- .../powerpc/configs/52xx/motionpro_defconfig | 1265 +--------- .../powerpc/configs/52xx/pcm030_defconfig | 1220 +-------- .../powerpc/configs/52xx/tqm5200_defconfig | 1367 +--------- .../powerpc/configs/83xx/asp8347_defconfig | 1433 +---------- .../powerpc/configs/83xx/kmeter1_defconfig | 929 +------ .../configs/83xx/mpc8313_rdb_defconfig | 1729 +------------ .../configs/83xx/mpc8315_rdb_defconfig | 1798 +------------- .../configs/83xx/mpc832x_mds_defconfig | 1329 +--------- .../configs/83xx/mpc832x_rdb_defconfig | 1476 +---------- .../configs/83xx/mpc834x_itx_defconfig | 1568 +----------- .../configs/83xx/mpc834x_itxgp_defconfig | 1454 +---------- .../configs/83xx/mpc834x_mds_defconfig | 1263 +--------- .../configs/83xx/mpc836x_mds_defconfig | 1404 +---------- .../configs/83xx/mpc836x_rdk_defconfig | 1305 +--------- .../configs/83xx/mpc837x_mds_defconfig | 1334 +--------- .../configs/83xx/mpc837x_rdb_defconfig | 1472 +---------- .../powerpc/configs/83xx/sbc834x_defconfig | 1398 +---------- .../powerpc/configs/85xx/ksi8560_defconfig | 1117 --------- .../configs/85xx/mpc8540_ads_defconfig | 992 +------- .../configs/85xx/mpc8560_ads_defconfig | 1137 --------- .../configs/85xx/mpc85xx_cds_defconfig | 1155 +-------- .../powerpc/configs/85xx/sbc8548_defconfig | 1003 +------- .../powerpc/configs/85xx/sbc8560_defconfig | 1029 +------- .../powerpc/configs/85xx/socrates_defconfig | 1643 ------------- .../powerpc/configs/85xx/stx_gp3_defconfig | 1528 +----------- .../powerpc/configs/85xx/tqm8540_defconfig | 1317 ---------- .../powerpc/configs/85xx/tqm8541_defconfig | 1363 ---------- .../powerpc/configs/85xx/tqm8548_defconfig | 1355 +--------- .../powerpc/configs/85xx/tqm8555_defconfig | 1363 ---------- .../powerpc/configs/85xx/tqm8560_defconfig | 1363 ---------- .../configs/85xx/xes_mpc85xx_defconfig | 1784 +------------- .../powerpc/configs/86xx/gef_ppc9a_defconfig | 1733 ------------- .../powerpc/configs/86xx/gef_sbc310_defconfig | 1622 ------------ .../powerpc/configs/86xx/gef_sbc610_defconfig | 1815 -------------- .../configs/86xx/mpc8610_hpcd_defconfig | 1632 +----------- .../configs/86xx/mpc8641_hpcn_defconfig | 1639 +----------- .../powerpc/configs/86xx/sbc8641d_defconfig | 1428 ----------- trunk/arch/powerpc/configs/adder875_defconfig | 912 ------- trunk/arch/powerpc/configs/amigaone_defconfig | 1492 +---------- trunk/arch/powerpc/configs/c2k_defconfig | 1622 ------------ trunk/arch/powerpc/configs/cell_defconfig | 1317 +--------- trunk/arch/powerpc/configs/celleb_defconfig | 1197 +-------- trunk/arch/powerpc/configs/chrp32_defconfig | 1471 +---------- trunk/arch/powerpc/configs/ep8248e_defconfig | 1120 +-------- trunk/arch/powerpc/configs/ep88xc_defconfig | 859 +------ trunk/arch/powerpc/configs/g5_defconfig | 1551 +----------- trunk/arch/powerpc/configs/gamecube_defconfig | 948 +------ trunk/arch/powerpc/configs/holly_defconfig | 881 +------ trunk/arch/powerpc/configs/iseries_defconfig | 1058 +------- .../powerpc/configs/linkstation_defconfig | 1782 +------------- trunk/arch/powerpc/configs/maple_defconfig | 1373 +---------- trunk/arch/powerpc/configs/mgcoge_defconfig | 1160 +-------- trunk/arch/powerpc/configs/mgsuvd_defconfig | 936 ------- trunk/arch/powerpc/configs/mpc512x_defconfig | 1559 +----------- trunk/arch/powerpc/configs/mpc5200_defconfig | 1849 +------------- .../powerpc/configs/mpc7448_hpc2_defconfig | 1195 +-------- .../powerpc/configs/mpc8272_ads_defconfig | 1185 +-------- trunk/arch/powerpc/configs/mpc83xx_defconfig | 1663 +------------ trunk/arch/powerpc/configs/mpc85xx_defconfig | 1689 +------------ .../powerpc/configs/mpc85xx_smp_defconfig | 1693 +------------ .../arch/powerpc/configs/mpc866_ads_defconfig | 949 ------- trunk/arch/powerpc/configs/mpc86xx_defconfig | 1679 +------------ .../arch/powerpc/configs/mpc885_ads_defconfig | 864 +------ trunk/arch/powerpc/configs/pasemi_defconfig | 1931 +-------------- trunk/arch/powerpc/configs/pmac32_defconfig | 1886 +------------- trunk/arch/powerpc/configs/ppc40x_defconfig | 1332 +--------- trunk/arch/powerpc/configs/ppc44x_defconfig | 1471 +---------- trunk/arch/powerpc/configs/ppc64_defconfig | 1726 +------------ trunk/arch/powerpc/configs/ppc64e_defconfig | 1803 +------------- trunk/arch/powerpc/configs/ppc6xx_defconfig | 2189 +---------------- trunk/arch/powerpc/configs/pq2fads_defconfig | 1304 +--------- .../arch/powerpc/configs/prpmc2800_defconfig | 1675 +------------ trunk/arch/powerpc/configs/ps3_defconfig | 1334 +--------- trunk/arch/powerpc/configs/pseries_defconfig | 1456 +---------- .../arch/powerpc/configs/storcenter_defconfig | 1305 +--------- trunk/arch/powerpc/configs/tqm8xx_defconfig | 850 +------ trunk/arch/powerpc/configs/wii_defconfig | 1265 +--------- trunk/arch/powerpc/include/asm/dma-mapping.h | 20 - trunk/arch/powerpc/include/asm/highmem.h | 2 +- trunk/arch/powerpc/include/asm/ioctls.h | 2 + trunk/arch/powerpc/include/asm/mpc52xx.h | 1 + trunk/arch/powerpc/include/asm/mpc52xx_psc.h | 1 + trunk/arch/powerpc/include/asm/page_32.h | 2 +- trunk/arch/powerpc/include/asm/scatterlist.h | 3 - trunk/arch/powerpc/include/asm/termbits.h | 1 + trunk/arch/powerpc/kernel/process.c | 2 +- trunk/arch/powerpc/kernel/setup-common.c | 2 + trunk/arch/powerpc/kernel/sys_ppc32.c | 2 +- trunk/arch/powerpc/mm/highmem.c | 4 +- .../powerpc/platforms/52xx/mpc52xx_common.c | 106 + .../arch/powerpc/platforms/83xx/mpc837x_mds.c | 2 +- .../arch/powerpc/platforms/83xx/mpc837x_rdb.c | 2 +- .../arch/powerpc/platforms/cell/spufs/inode.c | 12 +- trunk/arch/powerpc/sysdev/fsl_rio.c | 2 +- trunk/arch/s390/appldata/appldata_net_sum.c | 3 +- trunk/arch/s390/hypfs/inode.c | 6 +- trunk/arch/s390/include/asm/ccwdev.h | 2 + trunk/arch/s390/include/asm/ioctls.h | 2 + trunk/arch/s390/include/asm/mmu.h | 5 + trunk/arch/s390/include/asm/scatterlist.h | 2 - trunk/arch/s390/include/asm/statfs.h | 9 +- trunk/arch/s390/include/asm/topology.h | 2 - trunk/arch/s390/include/asm/unistd.h | 5 +- trunk/arch/s390/kernel/compat_linux.c | 10 +- trunk/arch/s390/kernel/compat_linux.h | 10 +- trunk/arch/s390/kernel/compat_wrapper.S | 26 +- trunk/arch/s390/kernel/entry.h | 4 +- trunk/arch/s390/kernel/head.S | 2 +- trunk/arch/s390/kernel/process.c | 2 +- trunk/arch/s390/kernel/sys_s390.c | 4 +- trunk/arch/s390/kernel/syscalls.S | 3 + trunk/arch/s390/mm/cmm.c | 11 +- trunk/arch/s390/mm/vmem.c | 4 - trunk/arch/score/include/asm/scatterlist.h | 2 - trunk/arch/score/mm/tlb-score.c | 2 +- trunk/arch/sh/boards/mach-ap325rxa/setup.c | 2 +- trunk/arch/sh/boards/mach-kfr2r09/Makefile | 6 +- trunk/arch/sh/boards/mach-kfr2r09/lcd_wqvga.c | 2 +- trunk/arch/sh/include/asm/dma-mapping.h | 15 - trunk/arch/sh/include/asm/ioctls.h | 2 + trunk/arch/sh/include/asm/page.h | 2 +- trunk/arch/sh/include/asm/scatterlist.h | 2 - trunk/arch/sh/include/asm/syscalls_32.h | 2 +- trunk/arch/sh/include/asm/syscalls_64.h | 2 +- .../sh/include/mach-kfr2r09/mach/kfr2r09.h | 16 +- trunk/arch/sh/kernel/process_64.c | 2 +- trunk/arch/sparc/Kconfig.debug | 14 - trunk/arch/sparc/configs/sparc64_defconfig | 67 +- trunk/arch/sparc/include/asm/dma-mapping.h | 10 - trunk/arch/sparc/include/asm/highmem.h | 2 +- trunk/arch/sparc/include/asm/ioctls.h | 2 + trunk/arch/sparc/include/asm/parport.h | 4 + trunk/arch/sparc/include/asm/perf_event.h | 25 +- trunk/arch/sparc/include/asm/scatterlist.h | 1 - trunk/arch/sparc/include/asm/termbits.h | 1 + trunk/arch/sparc/include/asm/uaccess_32.h | 15 - trunk/arch/sparc/include/asm/uaccess_64.h | 23 +- trunk/arch/sparc/kernel/helpers.S | 75 - trunk/arch/sparc/kernel/sys_sparc32.c | 7 +- trunk/arch/sparc/mm/highmem.c | 4 +- trunk/arch/tile/include/asm/dma-mapping.h | 9 - trunk/arch/um/drivers/chan_kern.c | 8 +- trunk/arch/um/drivers/hostaudio_kern.c | 10 + trunk/arch/um/drivers/ubd_kern.c | 7 +- trunk/arch/um/include/asm/dma-mapping.h | 1 - trunk/arch/um/include/shared/os.h | 3 + trunk/arch/um/kernel/exec.c | 6 +- trunk/arch/um/kernel/internal.h | 2 +- trunk/arch/um/kernel/ksyms.c | 3 + trunk/arch/um/kernel/ptrace.c | 21 - trunk/arch/um/kernel/syscall.c | 2 +- trunk/arch/um/os-Linux/file.c | 15 + trunk/arch/um/os-Linux/user_syms.c | 4 + trunk/arch/x86/ia32/ia32entry.S | 3 + trunk/arch/x86/ia32/sys_ia32.c | 23 +- trunk/arch/x86/include/asm/dma-mapping.h | 8 - trunk/arch/x86/include/asm/highmem.h | 2 +- trunk/arch/x86/include/asm/kdebug.h | 6 + trunk/arch/x86/include/asm/page.h | 7 + trunk/arch/x86/include/asm/pgtable_64.h | 4 +- trunk/arch/x86/include/asm/scatterlist.h | 1 - trunk/arch/x86/include/asm/sys_ia32.h | 15 +- trunk/arch/x86/include/asm/syscalls.h | 2 +- trunk/arch/x86/include/asm/unistd_32.h | 5 +- trunk/arch/x86/include/asm/unistd_64.h | 6 + trunk/arch/x86/include/asm/uv/uv_bau.h | 151 +- trunk/arch/x86/include/asm/xen/page.h | 8 +- trunk/arch/x86/include/asm/xen/swiotlb-xen.h | 14 + trunk/arch/x86/kernel/apic/apic.c | 2 +- trunk/arch/x86/kernel/apic/x2apic_uv_x.c | 4 + .../x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 2 +- .../arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c | 2 +- trunk/arch/x86/kernel/cpu/perf_event_p4.c | 9 +- trunk/arch/x86/kernel/crash.c | 3 + trunk/arch/x86/kernel/entry_64.S | 4 +- trunk/arch/x86/kernel/hpet.c | 4 +- trunk/arch/x86/kernel/mpparse.c | 16 + trunk/arch/x86/kernel/pci-dma.c | 7 +- trunk/arch/x86/kernel/process.c | 2 +- trunk/arch/x86/kernel/smpboot.c | 8 +- trunk/arch/x86/kernel/syscall_table_32.S | 3 + trunk/arch/x86/kernel/tlb_uv.c | 760 ++++-- trunk/arch/x86/lib/atomic64_386_32.S | 238 +- trunk/arch/x86/mm/fault.c | 4 +- trunk/arch/x86/mm/highmem_32.c | 4 +- trunk/arch/x86/oprofile/nmi_int.c | 1 + trunk/arch/x86/xen/Makefile | 1 + trunk/arch/x86/xen/enlighten.c | 4 + trunk/arch/x86/xen/mmu.c | 293 ++- trunk/arch/x86/xen/pci-swiotlb-xen.c | 58 + trunk/arch/xtensa/include/asm/cache.h | 2 +- trunk/arch/xtensa/include/asm/dma-mapping.h | 8 - trunk/arch/xtensa/include/asm/ioctls.h | 2 + trunk/arch/xtensa/include/asm/scatterlist.h | 2 - trunk/arch/xtensa/include/asm/termbits.h | 1 + trunk/arch/xtensa/kernel/process.c | 2 +- trunk/block/blk-barrier.c | 35 +- trunk/block/blk-core.c | 120 +- trunk/block/blk-exec.c | 2 +- trunk/block/blk-lib.c | 62 +- trunk/block/blk-map.c | 2 +- trunk/block/blk-merge.c | 9 +- trunk/block/blk-settings.c | 17 + trunk/block/blk-sysfs.c | 82 +- trunk/block/blk.h | 6 +- trunk/block/cfq-iosched.c | 21 +- trunk/block/compat_ioctl.c | 57 +- trunk/block/elevator.c | 25 +- trunk/block/ioctl.c | 36 +- trunk/crypto/async_tx/Kconfig | 14 + trunk/drivers/acpi/apei/erst.c | 1 + trunk/drivers/acpi/debug.c | 32 +- trunk/drivers/ata/Kconfig | 11 + trunk/drivers/ata/Makefile | 2 + trunk/drivers/ata/libata-core.c | 2 +- trunk/drivers/ata/libata-scsi.c | 4 +- trunk/drivers/ata/pata_mpc52xx.c | 8 +- trunk/drivers/ata/pata_of_platform.c | 4 +- trunk/drivers/ata/pata_pxa.c | 411 ++++ trunk/drivers/ata/sata_fsl.c | 8 +- trunk/drivers/atm/fore200e.c | 26 +- trunk/drivers/atm/solos-pci.c | 7 +- trunk/drivers/base/node.c | 46 +- trunk/drivers/block/DAC960.c | 13 +- trunk/drivers/block/amiflop.c | 29 +- trunk/drivers/block/aoe/aoeblk.c | 6 +- trunk/drivers/block/ataflop.c | 32 +- trunk/drivers/block/brd.c | 9 +- trunk/drivers/block/cciss.c | 2165 +++++++++------- trunk/drivers/block/cciss.h | 135 +- trunk/drivers/block/cciss_cmd.h | 36 +- trunk/drivers/block/cciss_scsi.c | 670 +++-- trunk/drivers/block/cpqarray.c | 78 +- trunk/drivers/block/drbd/drbd_actlog.c | 8 +- trunk/drivers/block/drbd/drbd_int.h | 16 +- trunk/drivers/block/drbd/drbd_main.c | 102 +- trunk/drivers/block/drbd/drbd_nl.c | 4 - trunk/drivers/block/drbd/drbd_proc.c | 19 +- trunk/drivers/block/drbd/drbd_receiver.c | 135 +- trunk/drivers/block/drbd/drbd_req.c | 2 +- trunk/drivers/block/drbd/drbd_worker.c | 15 +- trunk/drivers/block/floppy.c | 182 +- trunk/drivers/block/hd.c | 2 +- trunk/drivers/block/loop.c | 9 +- trunk/drivers/block/mg_disk.c | 4 +- trunk/drivers/block/nbd.c | 7 +- trunk/drivers/block/osdblk.c | 15 +- trunk/drivers/block/paride/pcd.c | 21 +- trunk/drivers/block/paride/pd.c | 11 +- trunk/drivers/block/paride/pf.c | 26 +- trunk/drivers/block/pktcdvd.c | 20 +- trunk/drivers/block/ps3disk.c | 25 +- trunk/drivers/block/swim.c | 20 +- trunk/drivers/block/swim3.c | 32 +- trunk/drivers/block/ub.c | 35 +- trunk/drivers/block/umem.c | 2 +- trunk/drivers/block/viodasd.c | 21 +- trunk/drivers/block/virtio_blk.c | 88 +- trunk/drivers/block/xd.c | 19 +- trunk/drivers/block/xen-blkfront.c | 403 ++- trunk/drivers/block/xsysace.c | 12 +- trunk/drivers/block/z2ram.c | 13 +- trunk/drivers/cdrom/cdrom.c | 46 +- trunk/drivers/cdrom/gdrom.c | 48 +- trunk/drivers/cdrom/viocd.c | 106 +- trunk/drivers/char/Kconfig | 2 +- trunk/drivers/char/Makefile | 1 + trunk/drivers/char/amiserial.c | 25 +- trunk/drivers/char/briq_panel.c | 6 +- trunk/drivers/char/cyclades.c | 22 +- trunk/drivers/char/epca.c | 4 +- trunk/drivers/char/hvc_iucv.c | 9 +- trunk/drivers/char/hw_random/n2-drv.c | 4 +- trunk/drivers/char/hw_random/n2rng.h | 2 +- trunk/drivers/char/hw_random/pasemi-rng.c | 4 +- trunk/drivers/char/ip2/ip2main.c | 4 + trunk/drivers/char/ipmi/ipmi_si_intf.c | 69 +- trunk/drivers/char/ipmi/ipmi_watchdog.c | 42 +- trunk/drivers/char/isicom.c | 13 +- trunk/drivers/char/istallion.c | 68 +- trunk/drivers/char/keyboard.c | 10 +- trunk/drivers/char/misc.c | 2 +- trunk/drivers/char/mxser.c | 2 +- trunk/drivers/char/n_gsm.c | 3 +- trunk/drivers/char/n_hdlc.c | 16 +- trunk/drivers/char/n_r3964.c | 10 +- trunk/drivers/char/n_tty.c | 17 +- trunk/drivers/char/nozomi.c | 7 +- .../drivers/char/pcmcia/ipwireless/network.c | 2 +- trunk/drivers/char/pty.c | 47 +- trunk/drivers/char/riscom8.c | 14 +- trunk/drivers/char/rocket.c | 28 +- trunk/drivers/char/rtc.c | 2 +- trunk/drivers/char/selection.c | 13 +- trunk/drivers/char/serial167.c | 8 +- trunk/drivers/char/specialix.c | 13 +- trunk/drivers/char/stallion.c | 20 +- trunk/drivers/char/sx.c | 12 +- trunk/drivers/char/synclink.c | 21 +- trunk/drivers/char/synclink_gt.c | 92 +- trunk/drivers/char/synclinkmp.c | 43 +- trunk/drivers/char/tty_io.c | 150 +- trunk/drivers/char/tty_ioctl.c | 18 +- trunk/drivers/char/tty_ldisc.c | 43 +- trunk/drivers/char/tty_mutex.c | 47 + trunk/drivers/char/tty_port.c | 4 +- trunk/drivers/char/vc_screen.c | 4 +- trunk/drivers/char/vt.c | 43 +- trunk/drivers/char/vt_ioctl.c | 17 +- .../char/xilinx_hwicap/xilinx_hwicap.c | 4 +- trunk/drivers/cpuidle/cpuidle.c | 31 + trunk/drivers/cpuidle/governors/menu.c | 23 +- trunk/drivers/crypto/Kconfig | 2 +- trunk/drivers/crypto/amcc/crypto4xx_core.c | 4 +- trunk/drivers/crypto/amcc/crypto4xx_core.h | 2 +- trunk/drivers/crypto/ixp4xx_crypto.c | 21 + trunk/drivers/crypto/n2_core.c | 26 +- trunk/drivers/crypto/talitos.c | 6 +- trunk/drivers/dma/Kconfig | 22 +- trunk/drivers/dma/Makefile | 2 + trunk/drivers/dma/at_hdmac.c | 4 +- trunk/drivers/dma/coh901318.c | 169 ++ trunk/drivers/dma/dmatest.c | 2 +- trunk/drivers/dma/fsldma.c | 4 +- trunk/drivers/dma/intel_mid_dma.c | 1143 +++++++++ trunk/drivers/dma/intel_mid_dma_regs.h | 260 ++ trunk/drivers/dma/ioat/dma.h | 1 + trunk/drivers/dma/ioat/dma_v2.c | 24 +- trunk/drivers/dma/ioat/dma_v3.c | 5 +- trunk/drivers/dma/mpc512x_dma.c | 4 +- trunk/drivers/dma/pch_dma.c | 957 +++++++ trunk/drivers/dma/ppc4xx/adma.c | 8 +- trunk/drivers/dma/shdma.c | 8 +- trunk/drivers/dma/ste_dma40.c | 860 ++++--- trunk/drivers/dma/ste_dma40_ll.c | 40 +- trunk/drivers/dma/ste_dma40_ll.h | 15 +- trunk/drivers/dma/timb_dma.c | 8 +- trunk/drivers/edac/i5000_edac.c | 2 +- trunk/drivers/edac/i5400_edac.c | 2 +- trunk/drivers/edac/mpc85xx_edac.c | 28 +- trunk/drivers/edac/ppc4xx_edac.c | 12 +- trunk/drivers/firmware/Kconfig | 2 +- trunk/drivers/firmware/edd.c | 20 +- trunk/drivers/firmware/iscsi_ibft.c | 6 +- trunk/drivers/gpio/Kconfig | 18 + trunk/drivers/gpio/Makefile | 2 + trunk/drivers/gpio/gpiolib.c | 96 +- trunk/drivers/gpio/max730x.c | 22 +- trunk/drivers/gpio/pcf857x.c | 9 +- trunk/drivers/gpio/stmpe-gpio.c | 399 +++ trunk/drivers/gpio/sx150x.c | 645 +++++ trunk/drivers/gpio/wm831x-gpio.c | 32 + trunk/drivers/gpu/drm/ati_pcigart.c | 2 +- trunk/drivers/gpu/drm/drm_bufs.c | 33 +- trunk/drivers/gpu/drm/drm_crtc.c | 6 +- trunk/drivers/gpu/drm/drm_crtc_helper.c | 26 +- trunk/drivers/gpu/drm/drm_edid.c | 840 ++----- trunk/drivers/gpu/drm/drm_edid_modes.h | 380 +++ trunk/drivers/gpu/drm/drm_fops.c | 16 +- trunk/drivers/gpu/drm/drm_gem.c | 2 +- trunk/drivers/gpu/drm/drm_ioctl.c | 1 + trunk/drivers/gpu/drm/i2c/ch7006_drv.c | 1 + trunk/drivers/gpu/drm/i2c/ch7006_mode.c | 5 +- trunk/drivers/gpu/drm/i2c/ch7006_priv.h | 1 + trunk/drivers/gpu/drm/i915/i915_gem.c | 26 +- trunk/drivers/gpu/drm/i915/i915_gem_tiling.c | 4 +- trunk/drivers/gpu/drm/i915/i915_opregion.c | 1 + trunk/drivers/gpu/drm/i915/intel_display.c | 15 +- trunk/drivers/gpu/drm/i915/intel_fb.c | 8 +- trunk/drivers/gpu/drm/nouveau/Makefile | 8 +- trunk/drivers/gpu/drm/nouveau/nouveau_bios.c | 194 +- trunk/drivers/gpu/drm/nouveau/nouveau_bios.h | 1 + trunk/drivers/gpu/drm/nouveau/nouveau_bo.c | 6 - .../gpu/drm/nouveau/nouveau_connector.c | 19 +- .../drivers/gpu/drm/nouveau/nouveau_display.c | 6 +- trunk/drivers/gpu/drm/nouveau/nouveau_dp.c | 87 +- trunk/drivers/gpu/drm/nouveau/nouveau_drv.h | 45 +- .../drivers/gpu/drm/nouveau/nouveau_encoder.h | 6 + trunk/drivers/gpu/drm/nouveau/nouveau_fbcon.c | 3 + trunk/drivers/gpu/drm/nouveau/nouveau_gem.c | 8 +- trunk/drivers/gpu/drm/nouveau/nouveau_hw.c | 11 +- trunk/drivers/gpu/drm/nouveau/nouveau_i2c.c | 41 +- trunk/drivers/gpu/drm/nouveau/nouveau_i2c.h | 8 +- trunk/drivers/gpu/drm/nouveau/nouveau_irq.c | 6 +- trunk/drivers/gpu/drm/nouveau/nouveau_mem.c | 15 +- trunk/drivers/gpu/drm/nouveau/nouveau_reg.h | 18 +- trunk/drivers/gpu/drm/nouveau/nouveau_state.c | 91 +- trunk/drivers/gpu/drm/nouveau/nv04_crtc.c | 15 +- trunk/drivers/gpu/drm/nouveau/nv04_dfp.c | 73 + trunk/drivers/gpu/drm/nouveau/nv04_tv.c | 10 +- trunk/drivers/gpu/drm/nouveau/nv10_graph.c | 175 +- trunk/drivers/gpu/drm/nouveau/nv30_fb.c | 24 +- trunk/drivers/gpu/drm/nouveau/nv50_crtc.c | 34 +- trunk/drivers/gpu/drm/nouveau/nv50_display.c | 5 +- trunk/drivers/gpu/drm/nouveau/nvc0_fb.c | 38 + trunk/drivers/gpu/drm/nouveau/nvc0_fifo.c | 96 + trunk/drivers/gpu/drm/nouveau/nvc0_graph.c | 75 + trunk/drivers/gpu/drm/nouveau/nvc0_instmem.c | 232 ++ trunk/drivers/gpu/drm/radeon/r600_cp.c | 2 +- trunk/drivers/gpu/drm/radeon/r600_cs.c | 33 +- trunk/drivers/gpu/drm/radeon/radeon.h | 2 + .../drivers/gpu/drm/radeon/radeon_atombios.c | 180 +- trunk/drivers/gpu/drm/radeon/radeon_clocks.c | 81 + trunk/drivers/gpu/drm/radeon/radeon_combios.c | 388 ++- .../gpu/drm/radeon/radeon_connectors.c | 45 +- trunk/drivers/gpu/drm/radeon/radeon_cs.c | 2 +- trunk/drivers/gpu/drm/radeon/radeon_cursor.c | 2 +- trunk/drivers/gpu/drm/radeon/radeon_device.c | 3 +- trunk/drivers/gpu/drm/radeon/radeon_display.c | 34 +- trunk/drivers/gpu/drm/radeon/radeon_fb.c | 2 +- trunk/drivers/gpu/drm/radeon/radeon_gem.c | 12 +- trunk/drivers/gpu/drm/radeon/radeon_i2c.c | 82 + trunk/drivers/gpu/drm/radeon/radeon_kms.c | 28 +- trunk/drivers/gpu/drm/radeon/radeon_mode.h | 24 + trunk/drivers/gpu/drm/radeon/radeon_pm.c | 24 +- trunk/drivers/gpu/drm/radeon/reg_srcs/rv515 | 1 + trunk/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 +- trunk/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 2 +- trunk/drivers/hid/hid-wacom.c | 49 +- trunk/drivers/hwmon/Kconfig | 34 +- trunk/drivers/hwmon/Makefile | 2 + trunk/drivers/hwmon/ams/ams.h | 2 +- trunk/drivers/hwmon/coretemp.c | 23 +- trunk/drivers/hwmon/f71882fg.c | 83 +- trunk/drivers/hwmon/hdaps.c | 1 + trunk/drivers/hwmon/jc42.c | 593 +++++ trunk/drivers/hwmon/mc13783-adc.c | 17 +- trunk/drivers/hwmon/smm665.c | 743 ++++++ trunk/drivers/hwmon/ultra45_env.c | 4 +- trunk/drivers/i2c/Kconfig | 13 + trunk/drivers/i2c/Makefile | 3 +- trunk/drivers/i2c/busses/Kconfig | 24 +- trunk/drivers/i2c/busses/Makefile | 1 + trunk/drivers/i2c/busses/i2c-cpm.c | 8 +- trunk/drivers/i2c/busses/i2c-davinci.c | 314 ++- trunk/drivers/i2c/busses/i2c-ibm_iic.c | 6 +- trunk/drivers/i2c/busses/i2c-mpc.c | 4 +- trunk/drivers/i2c/busses/i2c-nuc900.c | 709 ++++++ trunk/drivers/i2c/busses/i2c-pxa.c | 2 +- trunk/drivers/i2c/busses/i2c-sh_mobile.c | 121 +- trunk/drivers/i2c/i2c-core.c | 158 +- trunk/drivers/i2c/i2c-dev.c | 66 +- trunk/drivers/i2c/i2c-mux.c | 165 ++ trunk/drivers/i2c/muxes/Kconfig | 18 + trunk/drivers/i2c/muxes/Makefile | 8 + trunk/drivers/i2c/muxes/pca954x.c | 301 +++ trunk/drivers/ide/ide-atapi.c | 17 +- trunk/drivers/ide/ide-cd.c | 112 +- trunk/drivers/ide/ide-cd_ioctl.c | 2 +- trunk/drivers/ide/ide-disk.c | 18 +- trunk/drivers/ide/ide-disk_ioctl.c | 9 +- trunk/drivers/ide/ide-eh.c | 5 +- trunk/drivers/ide/ide-floppy.c | 27 +- trunk/drivers/ide/ide-floppy_ioctl.c | 12 +- trunk/drivers/ide/ide-gd.c | 19 +- trunk/drivers/ide/ide-io.c | 8 +- trunk/drivers/ide/ide-pm.c | 8 +- trunk/drivers/ide/ide-tape.c | 22 +- trunk/drivers/ide/ide-taskfile.c | 10 +- trunk/drivers/ide/ide.c | 20 +- trunk/drivers/ide/tx4938ide.c | 2 +- trunk/drivers/ide/tx4939ide.c | 2 +- trunk/drivers/ide/via82cxxx.c | 2 +- trunk/drivers/infiniband/hw/cxgb4/device.c | 9 +- trunk/drivers/infiniband/hw/cxgb4/resource.c | 7 +- trunk/drivers/infiniband/hw/cxgb4/t4.h | 2 - .../drivers/infiniband/hw/ehca/ehca_classes.h | 2 +- trunk/drivers/infiniband/hw/ehca/ehca_main.c | 4 +- trunk/drivers/input/evdev.c | 152 +- trunk/drivers/input/input.c | 46 +- trunk/drivers/input/joydev.c | 31 +- trunk/drivers/input/joystick/a3d.c | 3 +- trunk/drivers/input/joystick/adi.c | 2 +- trunk/drivers/input/joystick/amijoy.c | 4 +- trunk/drivers/input/joystick/gf2k.c | 20 +- trunk/drivers/input/joystick/interact.c | 14 +- trunk/drivers/input/joystick/sidewinder.c | 18 +- trunk/drivers/input/joystick/xpad.c | 1 + trunk/drivers/input/keyboard/Kconfig | 10 + trunk/drivers/input/keyboard/Makefile | 1 + trunk/drivers/input/keyboard/gpio_keys.c | 22 + trunk/drivers/input/keyboard/hil_kbd.c | 21 +- trunk/drivers/input/keyboard/stmpe-keypad.c | 386 +++ trunk/drivers/input/misc/adxl34x.c | 1 - trunk/drivers/input/misc/ati_remote2.c | 26 +- trunk/drivers/input/misc/sparcspkr.c | 10 +- trunk/drivers/input/misc/uinput.c | 29 +- trunk/drivers/input/mouse/appletouch.c | 6 +- trunk/drivers/input/mouse/elantech.c | 31 +- trunk/drivers/input/mouse/elantech.h | 7 +- trunk/drivers/input/mouse/pc110pad.c | 4 +- trunk/drivers/input/mouse/psmouse-base.c | 14 +- trunk/drivers/input/mouse/synaptics.c | 4 +- trunk/drivers/input/mousedev.c | 44 +- trunk/drivers/input/serio/i8042-sparcio.h | 8 +- trunk/drivers/input/serio/i8042.c | 25 +- trunk/drivers/input/serio/xilinx_ps2.c | 4 +- trunk/drivers/input/tablet/aiptek.c | 15 +- trunk/drivers/input/tablet/wacom_wac.c | 4 +- trunk/drivers/input/touchscreen/Kconfig | 10 + trunk/drivers/input/touchscreen/Makefile | 1 + .../drivers/input/touchscreen/cy8ctmg110_ts.c | 6 +- trunk/drivers/input/touchscreen/stmpe-ts.c | 397 +++ trunk/drivers/isdn/gigaset/bas-gigaset.c | 6 +- trunk/drivers/isdn/gigaset/capi.c | 1 + trunk/drivers/isdn/hardware/avm/c4.c | 1 + trunk/drivers/isdn/hardware/avm/t1pci.c | 1 + .../isdn/hardware/mISDN/mISDNinfineon.c | 5 +- trunk/drivers/isdn/sc/ioctl.c | 10 +- trunk/drivers/leds/leds-gpio.c | 4 +- trunk/drivers/macintosh/macio_sysfs.c | 6 +- trunk/drivers/macintosh/smu.c | 6 +- trunk/drivers/macintosh/therm_adt746x.c | 2 +- trunk/drivers/macintosh/therm_pm72.c | 6 +- trunk/drivers/macintosh/therm_windtunnel.c | 10 +- trunk/drivers/md/Kconfig | 18 +- trunk/drivers/md/Makefile | 77 - trunk/drivers/md/bitmap.c | 508 ++-- trunk/drivers/md/bitmap.h | 6 + trunk/drivers/md/dm-crypt.c | 342 +-- trunk/drivers/md/dm-delay.c | 6 +- trunk/drivers/md/dm-exception-store.c | 4 +- trunk/drivers/md/dm-exception-store.h | 3 +- trunk/drivers/md/dm-io.c | 12 +- trunk/drivers/md/dm-ioctl.c | 207 +- trunk/drivers/md/dm-kcopyd.c | 2 +- trunk/drivers/md/dm-linear.c | 3 +- trunk/drivers/md/dm-mpath.c | 11 + trunk/drivers/md/dm-raid1.c | 4 +- trunk/drivers/md/dm-snap-persistent.c | 6 +- trunk/drivers/md/dm-snap.c | 62 +- trunk/drivers/md/dm-stripe.c | 89 +- trunk/drivers/md/dm-table.c | 99 +- trunk/drivers/md/dm-target.c | 5 + trunk/drivers/md/dm-zero.c | 5 + trunk/drivers/md/dm.c | 374 ++- trunk/drivers/md/dm.h | 14 +- trunk/drivers/md/linear.c | 2 +- trunk/drivers/md/md.c | 302 ++- trunk/drivers/md/md.h | 59 +- trunk/drivers/md/multipath.c | 8 +- trunk/drivers/md/raid0.c | 2 +- trunk/drivers/md/raid1.c | 22 +- trunk/drivers/md/raid10.c | 30 +- trunk/drivers/md/raid5.c | 170 +- trunk/drivers/md/raid5.h | 9 +- trunk/drivers/md/raid6test/Makefile | 75 - trunk/drivers/media/IR/Kconfig | 43 +- trunk/drivers/media/IR/Makefile | 2 + trunk/drivers/media/IR/ene_ir.c | 1023 ++++++++ trunk/drivers/media/IR/ene_ir.h | 235 ++ trunk/drivers/media/IR/imon.c | 20 +- trunk/drivers/media/IR/ir-core-priv.h | 13 +- trunk/drivers/media/IR/ir-jvc-decoder.c | 14 +- trunk/drivers/media/IR/ir-keytable.c | 13 +- trunk/drivers/media/IR/ir-lirc-codec.c | 124 +- trunk/drivers/media/IR/ir-nec-decoder.c | 25 +- trunk/drivers/media/IR/ir-raw-event.c | 159 +- trunk/drivers/media/IR/ir-sysfs.c | 2 + trunk/drivers/media/IR/keymaps/Makefile | 2 +- trunk/drivers/media/IR/keymaps/rc-empty.c | 44 - .../media/IR/keymaps/rc-rc5-streamzap.c | 81 + trunk/drivers/media/IR/keymaps/rc-rc6-mce.c | 2 + trunk/drivers/media/IR/mceusb.c | 21 +- trunk/drivers/media/IR/rc-map.c | 23 + trunk/drivers/media/IR/streamzap.c | 741 ++++++ trunk/drivers/media/common/tuners/Kconfig | 2 +- trunk/drivers/media/dvb/bt8xx/dst.c | 10 +- trunk/drivers/media/dvb/dm1105/Kconfig | 2 +- trunk/drivers/media/dvb/dvb-usb/Kconfig | 2 +- trunk/drivers/media/dvb/frontends/Kconfig | 2 +- trunk/drivers/media/dvb/siano/Kconfig | 2 +- trunk/drivers/media/dvb/siano/smscoreapi.c | 6 +- trunk/drivers/media/dvb/ttpci/Kconfig | 2 +- trunk/drivers/media/video/Kconfig | 16 +- trunk/drivers/media/video/Makefile | 3 +- trunk/drivers/media/video/bt8xx/Kconfig | 2 +- trunk/drivers/media/video/bt8xx/bttv-i2c.c | 2 +- trunk/drivers/media/video/cs53l32a.c | 107 +- trunk/drivers/media/video/cx18/Kconfig | 2 +- trunk/drivers/media/video/cx18/cx18-i2c.c | 3 +- trunk/drivers/media/video/cx231xx/Kconfig | 2 +- trunk/drivers/media/video/cx2341x.c | 747 +++++- trunk/drivers/media/video/cx23885/Kconfig | 2 +- trunk/drivers/media/video/cx23885/Makefile | 5 +- .../drivers/media/video/cx23885/cx23885-av.c | 35 + .../drivers/media/video/cx23885/cx23885-av.h | 27 + .../media/video/cx23885/cx23885-cards.c | 114 +- .../media/video/cx23885/cx23885-core.c | 124 +- .../drivers/media/video/cx23885/cx23885-i2c.c | 42 +- .../media/video/cx23885/cx23885-input.c | 72 +- .../drivers/media/video/cx23885/cx23885-ir.c | 24 +- .../drivers/media/video/cx23885/cx23885-reg.h | 1 + .../drivers/media/video/cx23885/cx23885-vbi.c | 2 +- .../media/video/cx23885/cx23885-video.c | 23 +- trunk/drivers/media/video/cx23885/cx23885.h | 9 +- .../drivers/media/video/cx23885/cx23888-ir.c | 142 +- trunk/drivers/media/video/cx25840/Makefile | 2 +- .../media/video/cx25840/cx25840-audio.c | 144 +- .../media/video/cx25840/cx25840-core.c | 540 ++-- .../media/video/cx25840/cx25840-core.h | 52 +- .../drivers/media/video/cx25840/cx25840-ir.c | 1279 ++++++++++ trunk/drivers/media/video/cx88/Kconfig | 2 +- trunk/drivers/media/video/cx88/cx88-i2c.c | 19 +- trunk/drivers/media/video/em28xx/Kconfig | 2 +- .../drivers/media/video/em28xx/em28xx-cards.c | 2 +- trunk/drivers/media/video/fsl-viu.c | 8 +- trunk/drivers/media/video/gspca/gspca.c | 21 +- trunk/drivers/media/video/gspca/sonixj.c | 10 +- trunk/drivers/media/video/gspca/sq930x.c | 347 +-- trunk/drivers/media/video/gspca/t613.c | 4 +- trunk/drivers/media/video/gspca/vc032x.c | 360 ++- trunk/drivers/media/video/gspca/zc3xx.c | 1999 +++++++-------- trunk/drivers/media/video/ivtv/Kconfig | 2 +- .../drivers/media/video/ivtv/ivtv-controls.c | 276 +-- .../drivers/media/video/ivtv/ivtv-controls.h | 6 +- trunk/drivers/media/video/ivtv/ivtv-driver.c | 26 +- trunk/drivers/media/video/ivtv/ivtv-driver.h | 4 +- trunk/drivers/media/video/ivtv/ivtv-fileops.c | 23 +- .../drivers/media/video/ivtv/ivtv-firmware.c | 6 +- trunk/drivers/media/video/ivtv/ivtv-gpio.c | 77 +- trunk/drivers/media/video/ivtv/ivtv-i2c.c | 16 +- trunk/drivers/media/video/ivtv/ivtv-ioctl.c | 31 +- trunk/drivers/media/video/ivtv/ivtv-streams.c | 24 +- trunk/drivers/media/video/msp3400-driver.c | 248 +- trunk/drivers/media/video/msp3400-driver.h | 18 +- trunk/drivers/media/video/msp3400-kthreads.c | 16 +- trunk/drivers/media/video/mt9m111.c | 40 +- trunk/drivers/media/video/mx2_camera.c | 4 +- .../media/video/pvrusb2/pvrusb2-debugifc.c | 14 +- trunk/drivers/media/video/s5p-fimc/Makefile | 3 + .../drivers/media/video/s5p-fimc/fimc-core.c | 1586 ++++++++++++ .../drivers/media/video/s5p-fimc/fimc-core.h | 471 ++++ trunk/drivers/media/video/s5p-fimc/fimc-reg.c | 527 ++++ .../drivers/media/video/s5p-fimc/regs-fimc.h | 293 +++ trunk/drivers/media/video/saa7115.c | 183 +- trunk/drivers/media/video/saa7134/Kconfig | 2 +- trunk/drivers/media/video/saa717x.c | 323 +-- trunk/drivers/media/video/soc_camera.c | 9 +- trunk/drivers/media/video/tlg2300/Kconfig | 2 +- trunk/drivers/media/video/tvp7002.c | 10 +- trunk/drivers/media/video/usbvideo/usbvideo.c | 12 +- trunk/drivers/media/video/uvc/uvc_driver.c | 9 + trunk/drivers/media/video/uvc/uvc_queue.c | 13 +- trunk/drivers/media/video/uvc/uvc_video.c | 19 +- trunk/drivers/media/video/uvc/uvcvideo.h | 5 +- trunk/drivers/media/video/v4l2-common.c | 482 +--- .../drivers/media/video/v4l2-compat-ioctl32.c | 7 +- trunk/drivers/media/video/v4l2-ctrls.c | 1852 ++++++++++++++ trunk/drivers/media/video/v4l2-dev.c | 60 +- trunk/drivers/media/video/v4l2-device.c | 7 + trunk/drivers/media/video/v4l2-ioctl.c | 46 +- trunk/drivers/media/video/wm8739.c | 179 +- trunk/drivers/media/video/wm8775.c | 79 +- trunk/drivers/memstick/core/mspro_block.c | 18 +- trunk/drivers/message/fusion/mptbase.c | 241 +- trunk/drivers/message/fusion/mptbase.h | 25 - trunk/drivers/message/i2o/exec-osm.c | 8 +- trunk/drivers/message/i2o/i2o_block.c | 33 +- trunk/drivers/message/i2o/i2o_config.c | 18 +- trunk/drivers/message/i2o/i2o_scsi.c | 3 +- trunk/drivers/mfd/88pm860x-core.c | 84 +- trunk/drivers/mfd/Kconfig | 75 +- trunk/drivers/mfd/Makefile | 5 + trunk/drivers/mfd/ab3100-otp.c | 16 +- trunk/drivers/mfd/ab3550-core.c | 23 +- trunk/drivers/mfd/ab8500-core.c | 4 +- trunk/drivers/mfd/ab8500-spi.c | 7 +- trunk/drivers/mfd/abx500-core.c | 2 +- trunk/drivers/mfd/davinci_voicecodec.c | 6 +- trunk/drivers/mfd/janz-cmodio.c | 1 + trunk/drivers/mfd/jz4740-adc.c | 394 +++ trunk/drivers/mfd/max8925-core.c | 27 + trunk/drivers/mfd/max8998.c | 158 ++ trunk/drivers/mfd/mc13783-core.c | 30 +- trunk/drivers/mfd/menelaus.c | 75 +- trunk/drivers/mfd/mfd-core.c | 4 +- trunk/drivers/mfd/stmpe.c | 985 ++++++++ trunk/drivers/mfd/stmpe.h | 183 ++ trunk/drivers/mfd/t7l66xb.c | 3 +- trunk/drivers/mfd/tc6387xb.c | 16 +- trunk/drivers/mfd/tc6393xb.c | 4 +- trunk/drivers/mfd/tps6507x.c | 4 +- trunk/drivers/mfd/tps6586x.c | 375 +++ trunk/drivers/mfd/twl6030-pwm.c | 163 ++ trunk/drivers/mfd/ucb1400_core.c | 2 +- trunk/drivers/mfd/wm831x-core.c | 18 +- trunk/drivers/mfd/wm8350-core.c | 6 +- trunk/drivers/mfd/wm8994-core.c | 8 +- trunk/drivers/misc/Kconfig | 27 + trunk/drivers/misc/Makefile | 3 + trunk/drivers/misc/bh1780gli.c | 273 ++ trunk/drivers/misc/bmp085.c | 482 ++++ trunk/drivers/misc/cs5535-mfgpt.c | 11 + trunk/drivers/misc/hmc6352.c | 166 ++ trunk/drivers/misc/hpilo.c | 17 +- trunk/drivers/misc/hpilo.h | 8 +- trunk/drivers/misc/lkdtm.c | 4 +- trunk/drivers/mmc/card/block.c | 87 +- trunk/drivers/mmc/card/mmc_test.c | 811 +++++- trunk/drivers/mmc/card/queue.c | 21 +- trunk/drivers/mmc/core/bus.c | 9 + trunk/drivers/mmc/core/core.c | 441 +++- trunk/drivers/mmc/core/core.h | 2 + trunk/drivers/mmc/core/host.c | 4 + trunk/drivers/mmc/core/mmc.c | 75 +- trunk/drivers/mmc/core/sd.c | 331 ++- trunk/drivers/mmc/core/sd.h | 17 + trunk/drivers/mmc/core/sd_ops.c | 48 + trunk/drivers/mmc/core/sd_ops.h | 1 + trunk/drivers/mmc/core/sdio.c | 210 +- trunk/drivers/mmc/host/Kconfig | 18 +- trunk/drivers/mmc/host/Makefile | 7 +- trunk/drivers/mmc/host/mmc_spi.c | 60 +- trunk/drivers/mmc/host/msm_sdcc.c | 62 +- trunk/drivers/mmc/host/msm_sdcc.h | 6 +- trunk/drivers/mmc/host/omap_hsmmc.c | 47 +- trunk/drivers/mmc/host/sdhci-cns3xxx.c | 97 + trunk/drivers/mmc/host/sdhci-of-core.c | 12 +- trunk/drivers/mmc/host/sdhci-pci.c | 49 + trunk/drivers/mmc/host/sdhci-pltfm.c | 17 +- trunk/drivers/mmc/host/sdhci-pltfm.h | 18 + trunk/drivers/mmc/host/sdhci-s3c.c | 123 +- trunk/drivers/mmc/host/sdhci.c | 53 +- trunk/drivers/mmc/host/sdhci.h | 10 + trunk/drivers/mtd/Kconfig | 12 +- trunk/drivers/mtd/afs.c | 2 +- trunk/drivers/mtd/chips/cfi_cmdset_0001.c | 31 +- trunk/drivers/mtd/chips/cfi_cmdset_0002.c | 17 +- trunk/drivers/mtd/chips/cfi_cmdset_0020.c | 1 - trunk/drivers/mtd/chips/cfi_probe.c | 4 +- trunk/drivers/mtd/chips/cfi_util.c | 1 - trunk/drivers/mtd/chips/chipreg.c | 1 - trunk/drivers/mtd/chips/map_absent.c | 1 - trunk/drivers/mtd/chips/map_ram.c | 1 - trunk/drivers/mtd/chips/map_rom.c | 1 - trunk/drivers/mtd/cmdlinepart.c | 17 +- trunk/drivers/mtd/devices/docecc.c | 1 - trunk/drivers/mtd/devices/docprobe.c | 1 - trunk/drivers/mtd/devices/m25p80.c | 43 +- trunk/drivers/mtd/devices/mtd_dataflash.c | 12 +- trunk/drivers/mtd/devices/mtdram.c | 1 - trunk/drivers/mtd/devices/pmc551.c | 1 - trunk/drivers/mtd/devices/sst25l.c | 2 +- trunk/drivers/mtd/ftl.c | 2 +- trunk/drivers/mtd/inftlcore.c | 6 +- trunk/drivers/mtd/inftlmount.c | 5 +- trunk/drivers/mtd/lpddr/lpddr_cmds.c | 20 +- trunk/drivers/mtd/maps/Kconfig | 8 - trunk/drivers/mtd/maps/Makefile | 1 - trunk/drivers/mtd/maps/ixp4xx.c | 35 +- trunk/drivers/mtd/maps/physmap.c | 14 +- trunk/drivers/mtd/maps/physmap_of.c | 14 +- trunk/drivers/mtd/maps/redwood.c | 131 - trunk/drivers/mtd/maps/sun_uflash.c | 6 +- trunk/drivers/mtd/mtd_blkdevs.c | 41 +- trunk/drivers/mtd/mtdblock.c | 19 +- trunk/drivers/mtd/mtdblock_ro.c | 19 +- trunk/drivers/mtd/mtdchar.c | 59 +- trunk/drivers/mtd/mtdconcat.c | 38 +- trunk/drivers/mtd/mtdcore.c | 21 +- trunk/drivers/mtd/mtdoops.c | 2 +- trunk/drivers/mtd/mtdpart.c | 31 +- trunk/drivers/mtd/mtdsuper.c | 2 + trunk/drivers/mtd/nand/Kconfig | 33 +- trunk/drivers/mtd/nand/atmel_nand.c | 2 +- trunk/drivers/mtd/nand/bf5xx_nand.c | 117 +- trunk/drivers/mtd/nand/davinci_nand.c | 17 + trunk/drivers/mtd/nand/denali.c | 1240 ++++------ trunk/drivers/mtd/nand/denali.h | 140 +- trunk/drivers/mtd/nand/diskonchip.c | 6 +- trunk/drivers/mtd/nand/fsl_elbc_nand.c | 4 +- trunk/drivers/mtd/nand/fsl_upm.c | 4 +- trunk/drivers/mtd/nand/mpc5121_nfc.c | 4 +- trunk/drivers/mtd/nand/mxc_nand.c | 600 +++-- trunk/drivers/mtd/nand/nand_base.c | 118 +- trunk/drivers/mtd/nand/nand_bbt.c | 103 +- trunk/drivers/mtd/nand/nand_ids.c | 4 + trunk/drivers/mtd/nand/nandsim.c | 14 +- trunk/drivers/mtd/nand/ndfc.c | 6 +- trunk/drivers/mtd/nand/pasemi_nand.c | 4 +- trunk/drivers/mtd/nand/plat_nand.c | 2 +- trunk/drivers/mtd/nand/r852.c | 6 +- trunk/drivers/mtd/nand/rtc_from4.c | 1 - trunk/drivers/mtd/nand/s3c2410.c | 15 +- trunk/drivers/mtd/nand/sm_common.c | 2 +- trunk/drivers/mtd/nand/socrates_nand.c | 4 +- trunk/drivers/mtd/nftlcore.c | 25 +- trunk/drivers/mtd/nftlmount.c | 3 +- trunk/drivers/mtd/ofpart.c | 4 +- trunk/drivers/mtd/onenand/Kconfig | 4 +- trunk/drivers/mtd/onenand/onenand_base.c | 49 +- trunk/drivers/mtd/onenand/onenand_bbt.c | 1 - trunk/drivers/mtd/onenand/samsung.c | 21 +- trunk/drivers/mtd/redboot.c | 18 + trunk/drivers/mtd/rfd_ftl.c | 2 +- trunk/drivers/mtd/ssfdc.c | 2 +- trunk/drivers/mtd/tests/mtd_pagetest.c | 9 +- trunk/drivers/net/arm/ixp4xx_eth.c | 2 +- trunk/drivers/net/caif/caif_spi_slave.c | 4 +- trunk/drivers/net/can/mscan/mpc5xxx_can.c | 18 +- .../net/can/sja1000/sja1000_of_platform.c | 4 +- trunk/drivers/net/cxgb3/cxgb3_main.c | 25 +- trunk/drivers/net/cxgb4vf/cxgb4vf_main.c | 31 +- trunk/drivers/net/davinci_emac.c | 2 +- trunk/drivers/net/e100.c | 2 + trunk/drivers/net/e1000/e1000_main.c | 3 + trunk/drivers/net/e1000e/netdev.c | 4 + trunk/drivers/net/ehea/ehea.h | 4 +- trunk/drivers/net/ehea/ehea_main.c | 12 +- trunk/drivers/net/enic/enic_main.c | 17 +- trunk/drivers/net/fec_mpc52xx.c | 8 +- trunk/drivers/net/fec_mpc52xx_phy.c | 4 +- trunk/drivers/net/fs_enet/fs_enet-main.c | 4 +- trunk/drivers/net/fs_enet/mac-fcc.c | 2 +- trunk/drivers/net/fs_enet/mac-fec.c | 2 +- trunk/drivers/net/fs_enet/mac-scc.c | 2 +- trunk/drivers/net/fs_enet/mii-bitbang.c | 4 +- trunk/drivers/net/fs_enet/mii-fec.c | 4 +- trunk/drivers/net/fsl_pq_mdio.c | 4 +- trunk/drivers/net/gianfar.c | 10 +- trunk/drivers/net/gianfar.h | 2 +- trunk/drivers/net/greth.c | 6 +- trunk/drivers/net/greth.h | 2 +- trunk/drivers/net/ibm_newemac/core.c | 6 +- trunk/drivers/net/ibm_newemac/core.h | 12 +- trunk/drivers/net/ibm_newemac/mal.c | 4 +- trunk/drivers/net/ibm_newemac/mal.h | 2 +- trunk/drivers/net/ibm_newemac/rgmii.c | 18 +- trunk/drivers/net/ibm_newemac/rgmii.h | 16 +- trunk/drivers/net/ibm_newemac/tah.c | 14 +- trunk/drivers/net/ibm_newemac/tah.h | 12 +- trunk/drivers/net/ibm_newemac/zmii.c | 18 +- trunk/drivers/net/ibm_newemac/zmii.h | 16 +- trunk/drivers/net/igb/igb_main.c | 2 + trunk/drivers/net/igbvf/netdev.c | 2 + trunk/drivers/net/irda/sh_irda.c | 6 +- trunk/drivers/net/ixgb/ixgb_main.c | 2 + trunk/drivers/net/ixgbe/ixgbe_main.c | 15 +- trunk/drivers/net/ixgbevf/ixgbevf_main.c | 2 + trunk/drivers/net/ll_temac_main.c | 8 +- trunk/drivers/net/myri10ge/myri10ge.c | 54 +- trunk/drivers/net/myri_sbus.c | 4 +- trunk/drivers/net/myri_sbus.h | 2 +- trunk/drivers/net/netxen/netxen_nic_main.c | 15 +- trunk/drivers/net/niu.c | 8 +- trunk/drivers/net/pcmcia/xirc2ps_cs.c | 2 +- trunk/drivers/net/phy/Kconfig | 2 +- trunk/drivers/net/phy/mdio-gpio.c | 4 +- trunk/drivers/net/phy/phy.c | 2 +- trunk/drivers/net/ppp_async.c | 6 +- trunk/drivers/net/ppp_synctty.c | 6 +- trunk/drivers/net/pppoe.c | 4 +- trunk/drivers/net/qlcnic/qlcnic_main.c | 72 +- trunk/drivers/net/sunbmac.c | 18 +- trunk/drivers/net/sunbmac.h | 4 +- trunk/drivers/net/sunhme.c | 22 +- trunk/drivers/net/sunhme.h | 2 +- trunk/drivers/net/sunlance.c | 20 +- trunk/drivers/net/sunqe.c | 16 +- trunk/drivers/net/sunqe.h | 4 +- trunk/drivers/net/ucc_geth.c | 8 +- trunk/drivers/net/usb/usbnet.c | 23 +- trunk/drivers/net/via-velocity.c | 4 +- trunk/drivers/net/virtio_net.c | 14 + trunk/drivers/net/wan/farsync.c | 15 +- trunk/drivers/net/wan/ixp4xx_hss.c | 2 +- .../net/wireless/ath/ath9k/ar9002_calib.c | 43 +- .../net/wireless/ath/ath9k/ar9003_calib.c | 18 +- .../net/wireless/ath/ath9k/ar9003_eeprom.c | 388 ++- .../net/wireless/ath/ath9k/ar9003_paprd.c | 17 +- .../net/wireless/ath/ath9k/ar9003_phy.c | 6 +- trunk/drivers/net/wireless/ath/ath9k/ath9k.h | 3 +- trunk/drivers/net/wireless/ath/ath9k/calib.c | 118 +- trunk/drivers/net/wireless/ath/ath9k/calib.h | 8 +- trunk/drivers/net/wireless/ath/ath9k/htc.h | 2 + .../net/wireless/ath/ath9k/htc_drv_main.c | 10 +- trunk/drivers/net/wireless/ath/ath9k/hw.c | 25 +- trunk/drivers/net/wireless/ath/ath9k/hw.h | 25 +- trunk/drivers/net/wireless/ath/ath9k/main.c | 104 +- trunk/drivers/net/wireless/ath/ath9k/recv.c | 10 +- trunk/drivers/net/wireless/ath/ath9k/xmit.c | 36 +- trunk/drivers/net/wireless/ipw2x00/ipw2100.c | 4 + trunk/drivers/net/wireless/iwlwifi/iwl-1000.c | 2 +- trunk/drivers/net/wireless/iwlwifi/iwl-3945.c | 18 +- trunk/drivers/net/wireless/iwlwifi/iwl-4965.c | 2 +- trunk/drivers/net/wireless/iwlwifi/iwl-5000.c | 10 +- trunk/drivers/net/wireless/iwlwifi/iwl-6000.c | 16 +- .../net/wireless/iwlwifi/iwl-agn-debugfs.c | 2 +- .../net/wireless/iwlwifi/iwl-agn-hcmd.c | 19 +- .../net/wireless/iwlwifi/iwl-agn-lib.c | 2 +- .../drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 11 +- .../drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 31 +- trunk/drivers/net/wireless/iwlwifi/iwl-agn.c | 85 +- trunk/drivers/net/wireless/iwlwifi/iwl-core.c | 35 +- trunk/drivers/net/wireless/iwlwifi/iwl-core.h | 14 +- .../drivers/net/wireless/iwlwifi/iwl-debug.h | 2 +- .../net/wireless/iwlwifi/iwl-devtrace.h | 2 +- trunk/drivers/net/wireless/iwlwifi/iwl-scan.c | 2 +- trunk/drivers/net/wireless/iwlwifi/iwl-sta.c | 6 +- .../net/wireless/iwlwifi/iwl3945-base.c | 5 +- trunk/drivers/net/wireless/libertas/cfg.c | 217 +- trunk/drivers/net/wireless/libertas/dev.h | 5 + trunk/drivers/net/wireless/libertas/if_sdio.c | 32 +- trunk/drivers/net/wireless/libertas/if_usb.c | 3 + trunk/drivers/net/wireless/libertas/main.c | 1 + .../drivers/net/wireless/libertas_tf/if_usb.c | 3 + trunk/drivers/net/wireless/rt2x00/rt2x00pci.c | 21 +- .../net/wireless/rtl818x/rtl8180_dev.c | 2 + .../drivers/net/wireless/wl12xx/wl1271_spi.c | 3 +- trunk/drivers/net/xilinx_emaclite.c | 6 +- trunk/drivers/of/device.c | 2 +- trunk/drivers/parport/parport_serial.c | 1 - trunk/drivers/parport/parport_sunbpp.c | 4 +- trunk/drivers/pci/intel-iommu.c | 28 + trunk/drivers/pcmcia/Kconfig | 2 +- trunk/drivers/pcmcia/Makefile | 1 + trunk/drivers/pcmcia/electra_cf.c | 6 +- trunk/drivers/pcmcia/m8xx_pcmcia.c | 4 +- trunk/drivers/pcmcia/pxa2xx_balloon3.c | 158 ++ trunk/drivers/platform/x86/Kconfig | 7 + trunk/drivers/platform/x86/Makefile | 1 + trunk/drivers/platform/x86/ideapad_acpi.c | 306 +++ trunk/drivers/power/Kconfig | 13 + trunk/drivers/power/Makefile | 2 + trunk/drivers/power/intel_mid_battery.c | 799 ++++++ trunk/drivers/power/olpc_battery.c | 3 +- trunk/drivers/power/s3c_adc_battery.c | 431 ++++ trunk/drivers/power/wm97xx_battery.c | 16 - trunk/drivers/regulator/Kconfig | 34 + trunk/drivers/regulator/Makefile | 5 + trunk/drivers/regulator/ab8500.c | 427 ++++ trunk/drivers/regulator/ad5398.c | 288 +++ trunk/drivers/regulator/isl6271a-regulator.c | 236 ++ trunk/drivers/regulator/lp3971.c | 10 +- trunk/drivers/regulator/max1586.c | 10 +- trunk/drivers/regulator/max8660.c | 10 +- trunk/drivers/regulator/max8998.c | 635 +++++ trunk/drivers/regulator/tps65023-regulator.c | 2 + trunk/drivers/regulator/tps6507x-regulator.c | 1 + trunk/drivers/regulator/tps6586x-regulator.c | 396 +++ trunk/drivers/regulator/wm8994-regulator.c | 5 +- trunk/drivers/rtc/Kconfig | 38 +- trunk/drivers/rtc/Makefile | 3 + trunk/drivers/rtc/rtc-cmos.c | 6 - trunk/drivers/rtc/rtc-ds3232.c | 326 +++ trunk/drivers/rtc/rtc-fm3130.c | 181 +- trunk/drivers/rtc/rtc-imxdi.c | 519 ++++ trunk/drivers/rtc/rtc-isl12022.c | 327 +++ trunk/drivers/rtc/rtc-m41t80.c | 4 +- trunk/drivers/rtc/rtc-m48t59.c | 5 +- trunk/drivers/rtc/rtc-m48t86.c | 2 +- trunk/drivers/rtc/rtc-max6900.c | 2 +- trunk/drivers/rtc/rtc-mpc5121.c | 4 +- trunk/drivers/rtc/rtc-mxc.c | 6 - trunk/drivers/rtc/rtc-nuc900.c | 64 +- trunk/drivers/rtc/rtc-pcf8563.c | 8 - trunk/drivers/rtc/rtc-pl031.c | 1 - trunk/drivers/rtc/rtc-pxa.c | 42 +- trunk/drivers/rtc/rtc-rp5c01.c | 89 + trunk/drivers/rtc/rtc-s3c.c | 44 +- trunk/drivers/s390/block/dasd.c | 12 +- trunk/drivers/s390/block/dasd_devmap.c | 44 + trunk/drivers/s390/block/dasd_diag.c | 6 +- trunk/drivers/s390/block/dasd_eckd.c | 94 +- trunk/drivers/s390/block/dasd_eckd.h | 7 +- trunk/drivers/s390/block/dasd_eer.c | 2 +- trunk/drivers/s390/block/dasd_fba.c | 4 +- trunk/drivers/s390/block/dasd_int.h | 8 +- trunk/drivers/s390/block/dcssblk.c | 5 + trunk/drivers/s390/char/monreader.c | 2 +- trunk/drivers/s390/char/monwriter.c | 2 +- trunk/drivers/s390/char/tape_block.c | 8 +- trunk/drivers/s390/cio/ccwreq.c | 16 +- trunk/drivers/s390/cio/chsc.c | 48 + trunk/drivers/s390/cio/chsc.h | 2 + trunk/drivers/s390/cio/device.c | 47 +- trunk/drivers/s390/cio/device_pgid.c | 3 + trunk/drivers/s390/cio/io_sch.h | 10 +- trunk/drivers/s390/net/claw.c | 118 +- trunk/drivers/s390/net/claw.h | 4 +- trunk/drivers/s390/net/ctcm_fsms.c | 60 +- trunk/drivers/s390/net/ctcm_main.c | 80 +- trunk/drivers/s390/net/ctcm_main.h | 4 +- trunk/drivers/s390/net/ctcm_mpc.c | 64 +- trunk/drivers/s390/net/ctcm_sysfs.c | 20 +- trunk/drivers/s390/net/smsgiucv_app.c | 7 + trunk/drivers/sbus/char/bbc_envctrl.c | 6 +- trunk/drivers/sbus/char/bbc_i2c.c | 18 +- trunk/drivers/sbus/char/bbc_i2c.h | 10 +- trunk/drivers/sbus/char/display7seg.c | 4 +- trunk/drivers/sbus/char/envctrl.c | 4 +- trunk/drivers/sbus/char/flash.c | 4 +- trunk/drivers/sbus/char/uctrl.c | 4 +- trunk/drivers/scsi/53c700.c | 3 - trunk/drivers/scsi/Kconfig | 2 +- trunk/drivers/scsi/NCR5380.c | 4 +- trunk/drivers/scsi/aacraid/rx.c | 5 +- trunk/drivers/scsi/aha1542.c | 25 - trunk/drivers/scsi/aic94xx/aic94xx_init.c | 4 +- trunk/drivers/scsi/bfa/bfa_fcport.c | 2 +- trunk/drivers/scsi/bfa/bfad.c | 2 + trunk/drivers/scsi/bfa/bfad_im.c | 4 +- trunk/drivers/scsi/bfa/include/protocol/fcp.h | 4 +- trunk/drivers/scsi/bnx2i/Kconfig | 3 +- trunk/drivers/scsi/ch.c | 89 +- trunk/drivers/scsi/dc395x.c | 2 +- trunk/drivers/scsi/fnic/fnic.h | 2 +- trunk/drivers/scsi/g_NCR5380.c | 47 +- trunk/drivers/scsi/g_NCR5380.h | 6 +- trunk/drivers/scsi/gdth.c | 2 +- trunk/drivers/scsi/initio.c | 1 - trunk/drivers/scsi/lpfc/lpfc_attr.c | 23 +- trunk/drivers/scsi/osd/osd_initiator.c | 8 +- trunk/drivers/scsi/osst.c | 3 +- trunk/drivers/scsi/qla2xxx/qla_os.c | 4 +- trunk/drivers/scsi/qlogicpti.c | 14 +- trunk/drivers/scsi/qlogicpti.h | 2 +- trunk/drivers/scsi/scsi_error.c | 12 +- trunk/drivers/scsi/scsi_lib.c | 20 +- trunk/drivers/scsi/scsi_transport_fc.c | 12 +- trunk/drivers/scsi/sd.c | 138 +- trunk/drivers/scsi/sd.h | 2 +- trunk/drivers/scsi/sg.c | 11 +- trunk/drivers/scsi/sr.c | 25 +- trunk/drivers/scsi/sun3_NCR5380.c | 2 +- trunk/drivers/scsi/sun3_scsi.c | 2 +- trunk/drivers/scsi/sun3_scsi_vme.c | 2 +- trunk/drivers/scsi/sun_esp.c | 44 +- trunk/drivers/serial/21285.c | 10 +- trunk/drivers/serial/68328serial.c | 26 +- trunk/drivers/serial/68360serial.c | 4 +- trunk/drivers/serial/8250.c | 46 +- trunk/drivers/serial/8250_early.c | 57 +- trunk/drivers/serial/8250_pci.c | 13 + trunk/drivers/serial/Kconfig | 48 +- trunk/drivers/serial/Makefile | 4 + trunk/drivers/serial/altera_uart.c | 2 +- trunk/drivers/serial/apbuart.c | 2 +- trunk/drivers/serial/atmel_serial.c | 11 +- trunk/drivers/serial/bfin_5xx.c | 7 +- trunk/drivers/serial/cpm_uart/cpm_uart_core.c | 4 +- trunk/drivers/serial/crisv10.c | 23 +- trunk/drivers/serial/imx.c | 10 +- trunk/drivers/serial/ioc3_serial.c | 9 +- trunk/drivers/serial/ioc4_serial.c | 9 +- trunk/drivers/serial/max3100.c | 7 +- trunk/drivers/serial/max3107-aava.c | 344 +++ trunk/drivers/serial/max3107.c | 1197 +++++++++ trunk/drivers/serial/max3107.h | 441 ++++ trunk/drivers/serial/mcf.c | 31 +- trunk/drivers/serial/mfd.c | 1498 +++++++++++ trunk/drivers/serial/mpc52xx_uart.c | 8 +- trunk/drivers/serial/mrst_max3110.c | 844 +++++++ trunk/drivers/serial/mrst_max3110.h | 59 + trunk/drivers/serial/nwpserial.c | 2 +- trunk/drivers/serial/of_serial.c | 6 +- trunk/drivers/serial/s5pv210.c | 8 + trunk/drivers/serial/samsung.c | 9 +- trunk/drivers/serial/serial_core.c | 288 +-- trunk/drivers/serial/sh-sci.c | 42 +- trunk/drivers/serial/sh-sci.h | 29 +- trunk/drivers/serial/sunhv.c | 4 +- trunk/drivers/serial/sunsab.c | 8 +- trunk/drivers/serial/sunsu.c | 8 +- trunk/drivers/serial/sunzilog.c | 6 +- trunk/drivers/serial/timbuart.c | 6 +- trunk/drivers/serial/uartlite.c | 4 +- trunk/drivers/serial/ucc_uart.c | 4 +- trunk/drivers/sh/Makefile | 5 +- trunk/drivers/sh/clk-cpg.c | 58 +- trunk/drivers/spi/amba-pl022.c | 6 +- trunk/drivers/spi/mpc512x_psc_spi.c | 16 +- trunk/drivers/spi/mpc52xx_psc_spi.c | 4 +- trunk/drivers/spi/mpc52xx_spi.c | 4 +- trunk/drivers/spi/omap_spi_100k.c | 23 +- trunk/drivers/spi/spi.c | 225 +- trunk/drivers/spi/spi_bitbang.c | 9 +- trunk/drivers/spi/spi_bitbang_txrx.h | 16 +- trunk/drivers/spi/spi_butterfly.c | 2 +- trunk/drivers/spi/spi_gpio.c | 109 +- trunk/drivers/spi/spi_lm70llp.c | 2 +- trunk/drivers/spi/spi_mpc8xxx.c | 4 +- trunk/drivers/spi/spi_ppc4xx.c | 6 +- trunk/drivers/spi/spi_s3c24xx_gpio.c | 8 +- trunk/drivers/spi/spi_sh_sci.c | 8 +- trunk/drivers/spi/xilinx_spi_of.c | 6 +- trunk/drivers/staging/easycap/easycap.h | 8 +- trunk/drivers/staging/easycap/easycap_ioctl.c | 52 +- trunk/drivers/staging/easycap/easycap_main.c | 38 +- trunk/drivers/staging/hv/blkvsc_drv.c | 13 +- trunk/drivers/staging/lirc/Kconfig | 29 +- trunk/drivers/staging/lirc/Makefile | 2 - trunk/drivers/staging/lirc/lirc_ene0100.c | 646 ----- trunk/drivers/staging/lirc/lirc_it87.c | 9 +- trunk/drivers/staging/lirc/lirc_parallel.c | 4 +- trunk/drivers/staging/lirc/lirc_streamzap.c | 821 ------- trunk/drivers/staging/pohmelfs/inode.c | 18 +- trunk/drivers/staging/rtl8187se/r8180_core.c | 6 +- trunk/drivers/staging/rtl8192e/r8192E_core.c | 6 +- trunk/drivers/staging/rtl8192su/r8192U_core.c | 6 +- trunk/drivers/staging/usbip/vhci_hcd.c | 6 +- trunk/drivers/usb/Makefile | 2 +- trunk/drivers/usb/atm/cxacru.c | 11 +- trunk/drivers/usb/atm/speedtch.c | 10 +- trunk/drivers/usb/atm/ueagle-atm.c | 7 +- trunk/drivers/usb/atm/usbatm.c | 23 +- trunk/drivers/usb/atm/usbatm.h | 22 +- trunk/drivers/usb/atm/xusbatm.c | 10 +- trunk/drivers/usb/c67x00/c67x00-hcd.c | 4 +- trunk/drivers/usb/class/cdc-acm.c | 12 +- trunk/drivers/usb/class/usblp.c | 371 ++- trunk/drivers/usb/core/devio.c | 7 +- trunk/drivers/usb/core/driver.c | 11 +- trunk/drivers/usb/core/endpoint.c | 9 +- trunk/drivers/usb/core/generic.c | 4 +- trunk/drivers/usb/core/hcd-pci.c | 202 +- trunk/drivers/usb/core/hcd.c | 79 +- trunk/drivers/usb/core/hub.c | 13 +- trunk/drivers/usb/core/inode.c | 4 - trunk/drivers/usb/core/quirks.c | 3 + trunk/drivers/usb/core/urb.c | 50 +- trunk/drivers/usb/core/usb.c | 6 +- trunk/drivers/usb/gadget/Kconfig | 52 +- trunk/drivers/usb/gadget/Makefile | 3 +- trunk/drivers/usb/gadget/audio.c | 4 +- trunk/drivers/usb/gadget/cdc2.c | 4 +- trunk/drivers/usb/gadget/composite.c | 73 +- trunk/drivers/usb/gadget/dbgp.c | 434 ++++ trunk/drivers/usb/gadget/dummy_hcd.c | 6 +- trunk/drivers/usb/gadget/ether.c | 6 +- trunk/drivers/usb/gadget/f_fs.c | 38 +- trunk/drivers/usb/gadget/f_hid.c | 6 +- trunk/drivers/usb/gadget/f_loopback.c | 4 +- trunk/drivers/usb/gadget/f_mass_storage.c | 125 +- trunk/drivers/usb/gadget/f_sourcesink.c | 2 +- trunk/drivers/usb/gadget/file_storage.c | 104 +- trunk/drivers/usb/gadget/fsl_qe_udc.c | 10 +- trunk/drivers/usb/gadget/g_ffs.c | 176 +- trunk/drivers/usb/gadget/gmidi.c | 2 +- trunk/drivers/usb/gadget/hid.c | 4 +- trunk/drivers/usb/gadget/inode.c | 16 +- trunk/drivers/usb/gadget/langwell_udc.c | 6 +- trunk/drivers/usb/gadget/mass_storage.c | 24 +- trunk/drivers/usb/gadget/multi.c | 262 +- trunk/drivers/usb/gadget/printer.c | 9 +- trunk/drivers/usb/gadget/s3c-hsotg.c | 153 +- trunk/drivers/usb/gadget/serial.c | 4 +- trunk/drivers/usb/gadget/storage_common.c | 105 +- trunk/drivers/usb/gadget/u_ether.c | 15 +- trunk/drivers/usb/gadget/u_serial.c | 1 + trunk/drivers/usb/gadget/webcam.c | 4 +- trunk/drivers/usb/gadget/zero.c | 2 +- trunk/drivers/usb/host/Kconfig | 11 +- trunk/drivers/usb/host/ehci-au1xxx.c | 2 +- trunk/drivers/usb/host/ehci-dbg.c | 196 +- trunk/drivers/usb/host/ehci-fsl.c | 3 +- trunk/drivers/usb/host/ehci-hcd.c | 49 +- trunk/drivers/usb/host/ehci-hub.c | 25 +- trunk/drivers/usb/host/ehci-lpm.c | 83 + trunk/drivers/usb/host/ehci-omap.c | 36 + trunk/drivers/usb/host/ehci-pci.c | 26 +- trunk/drivers/usb/host/ehci-ppc-of.c | 6 +- trunk/drivers/usb/host/ehci-q.c | 3 +- trunk/drivers/usb/host/ehci-sched.c | 182 +- trunk/drivers/usb/host/ehci-xilinx-of.c | 12 +- trunk/drivers/usb/host/ehci.h | 18 +- trunk/drivers/usb/host/fhci-hcd.c | 4 +- trunk/drivers/usb/host/hwa-hc.c | 4 +- trunk/drivers/usb/host/imx21-hcd.c | 2 +- trunk/drivers/usb/host/isp1362.h | 24 +- trunk/drivers/usb/host/isp1760-hcd.c | 3 +- trunk/drivers/usb/host/isp1760-if.c | 4 +- trunk/drivers/usb/host/ohci-dbg.c | 4 +- trunk/drivers/usb/host/ohci-hcd.c | 6 +- trunk/drivers/usb/host/ohci-hub.c | 23 +- trunk/drivers/usb/host/ohci-pci.c | 2 +- trunk/drivers/usb/host/ohci-pnx4008.c | 2 +- trunk/drivers/usb/host/ohci-ppc-of.c | 6 +- trunk/drivers/usb/host/ohci-ssb.c | 52 +- trunk/drivers/usb/host/oxu210hp-hcd.c | 7 +- trunk/drivers/usb/host/sl811-hcd.c | 5 +- trunk/drivers/usb/host/uhci-debug.c | 23 +- trunk/drivers/usb/host/uhci-hcd.c | 87 +- trunk/drivers/usb/host/uhci-hcd.h | 7 +- trunk/drivers/usb/host/uhci-hub.c | 6 +- trunk/drivers/usb/host/uhci-q.c | 4 +- trunk/drivers/usb/host/whci/hcd.c | 2 +- trunk/drivers/usb/host/whci/qset.c | 2 +- trunk/drivers/usb/host/xhci-mem.c | 101 +- trunk/drivers/usb/host/xhci-pci.c | 9 + trunk/drivers/usb/host/xhci-ring.c | 1466 +++++++---- trunk/drivers/usb/host/xhci.c | 344 +-- trunk/drivers/usb/host/xhci.h | 30 +- trunk/drivers/usb/misc/ftdi-elan.c | 4 +- trunk/drivers/usb/misc/iowarrior.c | 23 +- trunk/drivers/usb/misc/legousbtower.c | 6 +- trunk/drivers/usb/misc/rio500.c | 15 +- trunk/drivers/usb/misc/sisusbvga/sisusb.c | 10 +- trunk/drivers/usb/misc/usblcd.c | 24 +- trunk/drivers/usb/misc/usbtest.c | 14 +- trunk/drivers/usb/mon/mon_bin.c | 24 +- trunk/drivers/usb/musb/musb_core.c | 7 +- trunk/drivers/usb/musb/musb_debugfs.c | 32 +- trunk/drivers/usb/musb/musb_gadget_ep0.c | 3 + trunk/drivers/usb/musb/musb_virthub.c | 2 +- trunk/drivers/usb/musb/musbhsdma.c | 5 +- trunk/drivers/usb/musb/omap2430.c | 6 - trunk/drivers/usb/otg/Kconfig | 2 - trunk/drivers/usb/otg/ulpi.c | 134 +- trunk/drivers/usb/serial/Kconfig | 9 + trunk/drivers/usb/serial/Makefile | 1 + trunk/drivers/usb/serial/cp210x.c | 4 + trunk/drivers/usb/serial/digi_acceleport.c | 14 +- trunk/drivers/usb/serial/ftdi_sio.c | 4 + trunk/drivers/usb/serial/ftdi_sio_ids.h | 10 + trunk/drivers/usb/serial/generic.c | 15 +- trunk/drivers/usb/serial/io_ti.c | 4 +- trunk/drivers/usb/serial/ipaq.c | 1 - trunk/drivers/usb/serial/iuu_phoenix.c | 54 +- trunk/drivers/usb/serial/option.c | 17 +- trunk/drivers/usb/serial/ssu100.c | 698 ++++++ trunk/drivers/usb/serial/usb-serial.c | 32 +- trunk/drivers/usb/storage/freecom.c | 23 +- trunk/drivers/usb/storage/isd200.c | 3 +- trunk/drivers/usb/storage/usb.c | 4 + trunk/drivers/usb/usb-skeleton.c | 8 +- trunk/drivers/video/Kconfig | 17 +- trunk/drivers/video/Makefile | 2 + trunk/drivers/video/bw2.c | 4 +- trunk/drivers/video/cg14.c | 6 +- trunk/drivers/video/cg3.c | 4 +- trunk/drivers/video/cg6.c | 6 +- trunk/drivers/video/console/bitblit.c | 2 +- trunk/drivers/video/console/fbcon.c | 6 +- trunk/drivers/video/console/fbcon_ccw.c | 2 +- trunk/drivers/video/console/fbcon_cw.c | 2 +- trunk/drivers/video/console/fbcon_ud.c | 2 +- trunk/drivers/video/console/vgacon.c | 2 - trunk/drivers/video/efifb.c | 8 +- trunk/drivers/video/fbmem.c | 6 +- trunk/drivers/video/ffb.c | 4 +- trunk/drivers/video/fsl-diu-fb.c | 8 +- trunk/drivers/video/igafb.c | 5 +- trunk/drivers/video/imxfb.c | 19 +- trunk/drivers/video/leo.c | 6 +- trunk/drivers/video/matrox/i2c-matroxfb.c | 2 +- trunk/drivers/video/mb862xx/mb862xxfb.c | 4 +- trunk/drivers/video/msm/mddi.c | 4 +- trunk/drivers/video/msm/mdp.c | 1 - trunk/drivers/video/p9100.c | 4 +- trunk/drivers/video/platinumfb.c | 4 +- trunk/drivers/video/s3c-fb.c | 811 +++++- trunk/drivers/video/sh_mipi_dsi.c | 505 ++++ trunk/drivers/video/sh_mobile_hdmi.c | 1028 ++++++++ trunk/drivers/video/sh_mobile_lcdcfb.c | 196 +- trunk/drivers/video/sunxvr1000.c | 4 +- trunk/drivers/video/tcx.c | 6 +- trunk/drivers/video/uvesafb.c | 7 +- trunk/drivers/video/vt8623fb.c | 2 + trunk/drivers/video/w100fb.c | 4 +- trunk/drivers/video/xilinxfb.c | 4 +- trunk/drivers/watchdog/Kconfig | 37 +- trunk/drivers/watchdog/Makefile | 2 + trunk/drivers/watchdog/cpwd.c | 4 +- trunk/drivers/watchdog/f71808e_wdt.c | 768 ++++++ trunk/drivers/watchdog/gef_wdt.c | 2 +- trunk/drivers/watchdog/hpwdt.c | 310 ++- trunk/drivers/watchdog/mpc8xxx_wdt.c | 4 +- trunk/drivers/watchdog/riowd.c | 4 +- trunk/drivers/watchdog/s3c2410_wdt.c | 17 +- trunk/drivers/watchdog/sch311x_wdt.c | 4 +- trunk/drivers/watchdog/sp805_wdt.c | 387 +++ trunk/drivers/watchdog/wdt_pci.c | 15 +- trunk/drivers/xen/Kconfig | 5 + trunk/drivers/xen/Makefile | 1 + trunk/drivers/xen/balloon.c | 15 +- trunk/drivers/xen/swiotlb-xen.c | 515 ++++ trunk/drivers/xen/xenbus/xenbus_client.c | 90 +- trunk/drivers/zorro/proc.c | 17 +- trunk/fs/9p/v9fs_vfs.h | 2 +- trunk/fs/9p/vfs_inode.c | 34 +- trunk/fs/9p/vfs_super.c | 4 +- trunk/fs/adfs/inode.c | 16 +- trunk/fs/affs/affs.h | 3 +- trunk/fs/affs/file.c | 11 +- trunk/fs/affs/inode.c | 38 +- trunk/fs/affs/super.c | 32 +- trunk/fs/afs/cell.c | 56 +- trunk/fs/afs/dir.c | 47 +- trunk/fs/afs/inode.c | 91 +- trunk/fs/afs/internal.h | 25 +- trunk/fs/afs/mntpt.c | 78 +- trunk/fs/afs/proc.c | 2 +- trunk/fs/afs/rxrpc.c | 1 + trunk/fs/afs/super.c | 22 +- trunk/fs/attr.c | 88 +- trunk/fs/autofs/root.c | 67 +- trunk/fs/autofs4/root.c | 52 +- trunk/fs/bad_inode.c | 7 - trunk/fs/bfs/bfs.h | 1 - trunk/fs/bfs/file.c | 17 +- trunk/fs/bfs/inode.c | 116 +- trunk/fs/binfmt_misc.c | 5 +- trunk/fs/bio.c | 5 +- trunk/fs/block_dev.c | 37 +- trunk/fs/btrfs/ctree.h | 4 +- trunk/fs/btrfs/disk-io.c | 8 +- trunk/fs/btrfs/inode.c | 40 +- trunk/fs/btrfs/super.c | 2 +- trunk/fs/btrfs/volumes.c | 18 +- trunk/fs/buffer.c | 180 +- trunk/fs/cachefiles/bind.c | 2 +- trunk/fs/cachefiles/daemon.c | 38 +- trunk/fs/cachefiles/internal.h | 13 +- trunk/fs/ceph/Makefile | 2 +- trunk/fs/ceph/addr.c | 16 +- trunk/fs/ceph/armor.c | 6 +- trunk/fs/ceph/auth.c | 6 +- trunk/fs/ceph/auth_x.c | 6 +- trunk/fs/ceph/buffer.c | 16 - trunk/fs/ceph/caps.c | 303 ++- trunk/fs/ceph/ceph_frag.h | 4 +- trunk/fs/ceph/ceph_fs.c | 50 +- trunk/fs/ceph/ceph_fs.h | 87 +- trunk/fs/ceph/ceph_hash.h | 4 +- trunk/fs/ceph/ceph_strings.c | 3 + trunk/fs/ceph/crush/crush.h | 4 +- trunk/fs/ceph/crush/hash.h | 4 +- trunk/fs/ceph/crush/mapper.h | 4 +- trunk/fs/ceph/crypto.c | 27 +- trunk/fs/ceph/crypto.h | 4 +- trunk/fs/ceph/debugfs.c | 21 +- trunk/fs/ceph/decode.h | 6 +- trunk/fs/ceph/dir.c | 10 +- trunk/fs/ceph/file.c | 32 +- trunk/fs/ceph/inode.c | 5 +- trunk/fs/ceph/ioctl.c | 24 + trunk/fs/ceph/ioctl.h | 2 + trunk/fs/ceph/locks.c | 256 ++ trunk/fs/ceph/mds_client.c | 235 +- trunk/fs/ceph/mds_client.h | 30 +- trunk/fs/ceph/mdsmap.c | 6 +- trunk/fs/ceph/mdsmap.h | 8 + trunk/fs/ceph/messenger.c | 23 +- trunk/fs/ceph/mon_client.c | 170 +- trunk/fs/ceph/mon_client.h | 5 + trunk/fs/ceph/msgr.h | 4 +- trunk/fs/ceph/osd_client.c | 9 +- trunk/fs/ceph/osdmap.c | 37 +- trunk/fs/ceph/rados.h | 13 +- trunk/fs/ceph/super.c | 88 +- trunk/fs/ceph/super.h | 40 +- trunk/fs/ceph/xattr.c | 2 + trunk/fs/cifs/README | 10 + trunk/fs/cifs/cifsfs.c | 15 +- trunk/fs/cifs/inode.c | 86 +- trunk/fs/coda/inode.c | 8 +- trunk/fs/coda/psdev.c | 12 +- trunk/fs/coda/upcall.c | 12 +- trunk/fs/compat.c | 48 +- trunk/fs/compat_ioctl.c | 40 +- trunk/fs/cramfs/inode.c | 88 +- trunk/fs/dcache.c | 227 +- trunk/fs/direct-io.c | 74 +- trunk/fs/drop_caches.c | 2 +- trunk/fs/ecryptfs/file.c | 60 +- trunk/fs/ecryptfs/inode.c | 112 +- trunk/fs/ecryptfs/messaging.c | 2 +- trunk/fs/ecryptfs/super.c | 14 +- trunk/fs/exec.c | 4 +- trunk/fs/exofs/exofs.h | 3 +- trunk/fs/exofs/file.c | 30 +- trunk/fs/exofs/inode.c | 136 +- trunk/fs/exofs/ios.c | 46 +- trunk/fs/exofs/super.c | 3 +- trunk/fs/ext2/balloc.c | 11 +- trunk/fs/ext2/dir.c | 23 +- trunk/fs/ext2/ext2.h | 5 +- trunk/fs/ext2/ialloc.c | 13 +- trunk/fs/ext2/inode.c | 87 +- trunk/fs/ext2/super.c | 14 +- trunk/fs/ext2/xattr.c | 25 +- trunk/fs/ext3/ialloc.c | 12 - trunk/fs/ext3/inode.c | 63 +- trunk/fs/ext3/super.c | 14 +- trunk/fs/ext3/xattr.c | 12 +- trunk/fs/ext4/ext4.h | 3 +- trunk/fs/ext4/ialloc.c | 2 +- trunk/fs/ext4/inode.c | 53 +- trunk/fs/ext4/super.c | 10 +- trunk/fs/ext4/xattr.c | 12 +- trunk/fs/fat/fat.h | 1 - trunk/fs/fat/file.c | 49 +- trunk/fs/fat/inode.c | 26 +- trunk/fs/fcntl.c | 15 +- trunk/fs/file.c | 57 +- trunk/fs/file_table.c | 19 +- trunk/fs/freevxfs/vxfs_extern.h | 2 +- trunk/fs/freevxfs/vxfs_inode.c | 8 +- trunk/fs/freevxfs/vxfs_super.c | 2 +- trunk/fs/fs-writeback.c | 255 +- trunk/fs/fs_struct.c | 7 +- trunk/fs/fscache/internal.h | 14 +- trunk/fs/fuse/dir.c | 17 +- trunk/fs/fuse/inode.c | 6 +- trunk/fs/gfs2/aops.c | 10 +- trunk/fs/gfs2/inode.c | 27 +- trunk/fs/gfs2/log.c | 4 +- trunk/fs/gfs2/meta_io.c | 8 +- trunk/fs/gfs2/ops_fstype.c | 2 +- trunk/fs/gfs2/ops_inode.c | 18 +- trunk/fs/gfs2/super.c | 43 +- trunk/fs/gfs2/xattr.c | 24 +- trunk/fs/hfs/hfs_fs.h | 2 +- trunk/fs/hfs/inode.c | 70 +- trunk/fs/hfs/super.c | 2 +- trunk/fs/hfsplus/hfsplus_fs.h | 1 + trunk/fs/hfsplus/inode.c | 77 +- trunk/fs/hfsplus/super.c | 10 +- trunk/fs/hostfs/hostfs.h | 22 +- trunk/fs/hostfs/hostfs_kern.c | 517 ++-- trunk/fs/hostfs/hostfs_user.c | 112 +- trunk/fs/hpfs/file.c | 11 +- trunk/fs/hpfs/hpfs_fn.h | 2 +- trunk/fs/hpfs/inode.c | 24 +- trunk/fs/hpfs/super.c | 2 +- trunk/fs/hppfs/hppfs.c | 8 +- trunk/fs/hugetlbfs/inode.c | 41 +- trunk/fs/inode.c | 185 +- trunk/fs/ioctl.c | 18 +- trunk/fs/isofs/inode.c | 7 +- trunk/fs/jbd2/transaction.c | 46 +- trunk/fs/jffs2/background.c | 1 + trunk/fs/jffs2/build.c | 1 + trunk/fs/jffs2/compr.c | 5 +- trunk/fs/jffs2/compr.h | 1 + trunk/fs/jffs2/compr_lzo.c | 1 + trunk/fs/jffs2/compr_rtime.c | 1 + trunk/fs/jffs2/compr_rubin.c | 1 + trunk/fs/jffs2/compr_zlib.c | 1 + trunk/fs/jffs2/debug.c | 1 + trunk/fs/jffs2/debug.h | 1 + trunk/fs/jffs2/dir.c | 17 +- trunk/fs/jffs2/erase.c | 1 + trunk/fs/jffs2/file.c | 1 + trunk/fs/jffs2/fs.c | 11 +- trunk/fs/jffs2/gc.c | 1 + trunk/fs/jffs2/ioctl.c | 1 + trunk/fs/jffs2/jffs2_fs_i.h | 1 + trunk/fs/jffs2/jffs2_fs_sb.h | 1 + trunk/fs/jffs2/nodelist.h | 1 - trunk/fs/jffs2/os-linux.h | 2 +- trunk/fs/jffs2/super.c | 2 +- trunk/fs/jffs2/xattr.c | 2 +- trunk/fs/jfs/file.c | 14 +- trunk/fs/jfs/inode.c | 63 +- trunk/fs/jfs/jfs_inode.h | 2 +- trunk/fs/jfs/super.c | 8 +- trunk/fs/jfs/xattr.c | 87 +- trunk/fs/libfs.c | 70 +- trunk/fs/logfs/dir.c | 7 +- trunk/fs/logfs/file.c | 24 +- trunk/fs/logfs/inode.c | 51 +- trunk/fs/logfs/journal.c | 2 - trunk/fs/logfs/logfs.h | 7 +- trunk/fs/logfs/readwrite.c | 62 +- trunk/fs/logfs/segment.c | 1 - trunk/fs/logfs/super.c | 23 +- trunk/fs/mbcache.c | 168 +- trunk/fs/minix/bitmap.c | 6 +- trunk/fs/minix/dir.c | 21 +- trunk/fs/minix/file.c | 22 + trunk/fs/minix/inode.c | 35 +- trunk/fs/minix/minix.h | 4 +- trunk/fs/namei.c | 17 +- trunk/fs/namespace.c | 13 +- trunk/fs/ncpfs/inode.c | 36 +- trunk/fs/ncpfs/ioctl.c | 1 - trunk/fs/nfs/Kconfig | 17 + trunk/fs/nfs/callback.c | 11 +- trunk/fs/nfs/dns_resolve.c | 24 + trunk/fs/nfs/dns_resolve.h | 12 + trunk/fs/nfs/inode.c | 13 +- trunk/fs/nfs/internal.h | 4 +- trunk/fs/nfs/super.c | 4 +- trunk/fs/nfsd/nfs4xdr.c | 6 +- trunk/fs/nfsd/vfs.c | 14 +- trunk/fs/nilfs2/dir.c | 25 +- trunk/fs/nilfs2/gcdat.c | 2 +- trunk/fs/nilfs2/inode.c | 78 +- trunk/fs/nilfs2/nilfs.h | 2 +- trunk/fs/nilfs2/recovery.c | 11 +- trunk/fs/nilfs2/segbuf.c | 2 +- trunk/fs/nilfs2/super.c | 20 +- trunk/fs/notify/Kconfig | 1 + trunk/fs/notify/Makefile | 4 +- trunk/fs/notify/dnotify/dnotify.c | 213 +- trunk/fs/notify/fanotify/Kconfig | 26 + trunk/fs/notify/fanotify/Makefile | 1 + trunk/fs/notify/fanotify/fanotify.c | 212 ++ trunk/fs/notify/fanotify/fanotify_user.c | 760 ++++++ trunk/fs/notify/fsnotify.c | 201 +- trunk/fs/notify/fsnotify.h | 27 +- trunk/fs/notify/group.c | 182 +- trunk/fs/notify/inode_mark.c | 337 +-- trunk/fs/notify/inotify/Kconfig | 15 - trunk/fs/notify/inotify/Makefile | 1 - trunk/fs/notify/inotify/inotify.c | 873 ------- trunk/fs/notify/inotify/inotify.h | 7 +- trunk/fs/notify/inotify/inotify_fsnotify.c | 151 +- trunk/fs/notify/inotify/inotify_user.c | 369 ++- trunk/fs/notify/mark.c | 371 +++ trunk/fs/notify/notification.c | 209 +- trunk/fs/notify/vfsmount_mark.c | 187 ++ trunk/fs/ntfs/inode.c | 10 +- trunk/fs/ntfs/inode.h | 2 +- trunk/fs/ntfs/super.c | 2 +- trunk/fs/ocfs2/acl.c | 33 +- trunk/fs/ocfs2/aops.c | 9 +- trunk/fs/ocfs2/cluster/tcp.c | 17 +- trunk/fs/ocfs2/dlm/dlmmaster.c | 9 +- trunk/fs/ocfs2/dlm/dlmrecovery.c | 22 +- trunk/fs/ocfs2/dlm/dlmthread.c | 114 +- trunk/fs/ocfs2/dlmfs/dlmfs.c | 15 +- trunk/fs/ocfs2/file.c | 22 +- trunk/fs/ocfs2/inode.c | 29 +- trunk/fs/ocfs2/inode.h | 5 +- trunk/fs/ocfs2/refcounttree.c | 20 +- trunk/fs/ocfs2/super.c | 3 +- trunk/fs/omfs/dir.c | 22 +- trunk/fs/omfs/file.c | 46 +- trunk/fs/omfs/inode.c | 53 +- trunk/fs/omfs/omfs.h | 1 + trunk/fs/omfs/omfs_fs.h | 1 + trunk/fs/open.c | 7 +- trunk/fs/partitions/acorn.c | 35 +- trunk/fs/partitions/amiga.c | 20 +- trunk/fs/partitions/atari.c | 12 +- trunk/fs/partitions/check.c | 22 +- trunk/fs/partitions/check.h | 6 +- trunk/fs/partitions/efi.c | 2 +- trunk/fs/partitions/ibm.c | 17 +- trunk/fs/partitions/karma.c | 2 +- trunk/fs/partitions/ldm.c | 4 +- trunk/fs/partitions/mac.c | 4 +- trunk/fs/partitions/msdos.c | 67 +- trunk/fs/partitions/osf.c | 2 +- trunk/fs/partitions/sgi.c | 2 +- trunk/fs/partitions/sun.c | 2 +- trunk/fs/partitions/sysv68.c | 9 +- trunk/fs/partitions/ultrix.c | 2 +- trunk/fs/proc/Makefile | 2 +- trunk/fs/proc/base.c | 144 +- trunk/fs/proc/generic.c | 18 +- trunk/fs/proc/inode.c | 23 +- trunk/fs/proc/proc_sysctl.c | 15 +- trunk/fs/qnx4/inode.c | 11 +- trunk/fs/quota/dquot.c | 2 +- trunk/fs/ramfs/file-nommu.c | 7 +- trunk/fs/read_write.c | 8 +- trunk/fs/readdir.c | 8 +- trunk/fs/reiserfs/file.c | 50 +- trunk/fs/reiserfs/inode.c | 134 +- trunk/fs/reiserfs/journal.c | 1 - trunk/fs/reiserfs/super.c | 10 +- trunk/fs/signalfd.c | 2 + trunk/fs/smbfs/inode.c | 12 +- trunk/fs/splice.c | 14 +- trunk/fs/squashfs/Kconfig | 25 +- trunk/fs/squashfs/Makefile | 4 +- trunk/fs/squashfs/decompressor.c | 6 + trunk/fs/squashfs/lzo_wrapper.c | 136 + trunk/fs/squashfs/squashfs.h | 3 + trunk/fs/squashfs/squashfs_fs.h | 20 +- trunk/fs/squashfs/xattr.c | 4 +- trunk/fs/squashfs/xattr.h | 2 +- trunk/fs/stat.c | 29 +- trunk/fs/statfs.c | 95 +- trunk/fs/super.c | 51 +- trunk/fs/sync.c | 25 - trunk/fs/sysfs/inode.c | 8 +- trunk/fs/sysfs/mount.c | 2 +- trunk/fs/sysfs/sysfs.h | 2 +- trunk/fs/sysv/dir.c | 21 +- trunk/fs/sysv/file.c | 22 + trunk/fs/sysv/ialloc.c | 1 - trunk/fs/sysv/inode.c | 19 +- trunk/fs/sysv/itree.c | 19 +- trunk/fs/sysv/super.c | 74 +- trunk/fs/sysv/sysv.h | 4 +- trunk/fs/ubifs/file.c | 23 +- trunk/fs/ubifs/super.c | 12 +- trunk/fs/ubifs/ubifs.h | 2 +- trunk/fs/udf/file.c | 22 + trunk/fs/udf/ialloc.c | 2 - trunk/fs/udf/inode.c | 61 +- trunk/fs/udf/super.c | 3 +- trunk/fs/udf/udfdecl.h | 3 +- trunk/fs/ufs/dir.c | 13 +- trunk/fs/ufs/ialloc.c | 2 - trunk/fs/ufs/inode.c | 63 +- trunk/fs/ufs/super.c | 2 +- trunk/fs/ufs/truncate.c | 16 +- trunk/fs/ufs/ufs.h | 2 +- trunk/fs/ufs/util.h | 4 +- trunk/fs/utimes.c | 7 +- trunk/fs/xfs/linux-2.6/xfs_aops.c | 62 +- trunk/fs/xfs/linux-2.6/xfs_iops.c | 20 +- trunk/fs/xfs/linux-2.6/xfs_linux.h | 2 - trunk/fs/xfs/linux-2.6/xfs_super.c | 8 +- trunk/fs/xfs/linux-2.6/xfs_trace.h | 2 +- trunk/fs/xfs/xfs_vnodeops.c | 38 +- trunk/include/acpi/platform/aclinux.h | 10 +- trunk/include/asm-generic/atomic.h | 12 +- .../include/asm-generic/dma-mapping-broken.h | 3 - trunk/include/asm-generic/fcntl.h | 12 + trunk/include/asm-generic/io.h | 4 + trunk/include/asm-generic/ioctls.h | 8 +- trunk/include/asm-generic/statfs.h | 9 +- trunk/include/asm-generic/termbits.h | 1 + trunk/include/asm-generic/topology.h | 20 +- trunk/include/asm-generic/unistd.h | 4 +- trunk/include/drm/drmP.h | 22 +- trunk/include/drm/drm_core.h | 2 +- trunk/include/drm/drm_crtc.h | 37 +- trunk/include/drm/drm_edid.h | 6 + trunk/include/linux/Kbuild | 2 + trunk/include/linux/audit.h | 2 +- trunk/include/linux/auto_fs.h | 1 + trunk/include/linux/backing-dev.h | 24 +- trunk/include/linux/bio.h | 158 +- trunk/include/linux/blk_types.h | 196 ++ trunk/include/linux/blkdev.h | 149 +- trunk/include/linux/blktrace_api.h | 18 +- trunk/include/linux/buffer_head.h | 27 +- trunk/include/linux/coda_psdev.h | 8 +- trunk/include/linux/compat.h | 6 +- trunk/include/linux/compiler-gcc.h | 3 +- trunk/include/linux/console_struct.h | 4 +- trunk/include/linux/cpuidle.h | 4 + trunk/include/linux/dcache.h | 2 + trunk/include/linux/device-mapper.h | 16 +- trunk/include/linux/dm-ioctl.h | 5 +- trunk/include/linux/dma-mapping.h | 10 + trunk/include/linux/dmaengine.h | 71 + trunk/include/linux/dnotify.h | 1 + trunk/include/linux/drbd.h | 2 +- trunk/include/linux/drbd_nl.h | 9 +- trunk/include/linux/etherdevice.h | 2 +- trunk/include/linux/ext3_fs.h | 2 +- trunk/include/linux/fanotify.h | 105 + trunk/include/linux/fb.h | 4 + trunk/include/linux/flex_array.h | 5 + trunk/include/linux/fs.h | 141 +- trunk/include/linux/fs_struct.h | 27 + trunk/include/linux/fsnotify.h | 166 +- trunk/include/linux/fsnotify_backend.h | 199 +- trunk/include/linux/gpio_keys.h | 2 + trunk/include/linux/highmem.h | 14 +- trunk/include/linux/hugetlb.h | 14 +- trunk/include/linux/hugetlb_inline.h | 22 + trunk/include/linux/i2c-mux.h | 46 + trunk/include/linux/i2c.h | 35 +- trunk/include/linux/i2c/pca954x.h | 47 + trunk/include/linux/i2c/sx150x.h | 78 + trunk/include/linux/inotify.h | 185 +- trunk/include/linux/input.h | 53 +- trunk/include/linux/intel_mid_dma.h | 86 + trunk/include/linux/io-mapping.h | 3 +- trunk/include/linux/iommu-helper.h | 12 +- trunk/include/linux/istallion.h | 2 +- trunk/include/linux/jffs2.h | 3 +- trunk/include/linux/jz4740-adc.h | 32 + trunk/include/linux/kernel.h | 21 +- trunk/include/linux/kfifo.h | 1193 +++++---- trunk/include/linux/ksm.h | 2 +- trunk/include/linux/mbcache.h | 20 +- trunk/include/linux/memcontrol.h | 18 +- trunk/include/linux/mempolicy.h | 13 +- trunk/include/linux/mfd/ab8500.h | 6 + trunk/include/linux/mfd/max8998-private.h | 112 + trunk/include/linux/mfd/max8998.h | 78 + trunk/include/linux/mfd/mc13783-private.h | 220 -- trunk/include/linux/mfd/mc13783.h | 2 + trunk/include/linux/mfd/stmpe.h | 201 ++ trunk/include/linux/mfd/tps6586x.h | 47 + trunk/include/linux/mfd/wm8994/gpio.h | 4 + trunk/include/linux/miscdevice.h | 1 + trunk/include/linux/mm.h | 1 + trunk/include/linux/mmc/card.h | 24 + trunk/include/linux/mmc/core.h | 19 + trunk/include/linux/mmc/host.h | 4 + trunk/include/linux/mmc/mmc.h | 25 +- trunk/include/linux/mmc/sd.h | 5 + trunk/include/linux/mmdebug.h | 2 +- trunk/include/linux/mmzone.h | 17 - trunk/include/linux/moduleparam.h | 288 ++- trunk/include/linux/mount.h | 7 +- trunk/include/linux/mtd/bbm.h | 24 +- trunk/include/linux/mtd/blktrans.h | 16 +- trunk/include/linux/mtd/cfi.h | 20 +- trunk/include/linux/mtd/cfi_endian.h | 19 + trunk/include/linux/mtd/compatmac.h | 10 - trunk/include/linux/mtd/concat.h | 17 +- trunk/include/linux/mtd/doc2000.h | 23 +- trunk/include/linux/mtd/flashchip.h | 21 +- trunk/include/linux/mtd/gen_probe.h | 19 +- trunk/include/linux/mtd/map.h | 19 +- trunk/include/linux/mtd/mtd.h | 19 +- trunk/include/linux/mtd/nand.h | 8 +- trunk/include/linux/mtd/nand_ecc.h | 4 +- trunk/include/linux/mtd/nftl.h | 17 +- trunk/include/linux/mtd/onenand.h | 2 + trunk/include/linux/mtd/physmap.h | 1 + trunk/include/linux/netpoll.h | 2 +- trunk/include/linux/of_device.h | 16 - trunk/include/linux/of_platform.h | 14 +- trunk/include/linux/oom.h | 33 +- trunk/include/linux/pagemap.h | 13 +- trunk/include/linux/path.h | 5 + trunk/include/linux/pch_dma.h | 37 + trunk/include/linux/pci_ids.h | 3 + trunk/include/linux/percpu_counter.h | 11 + trunk/include/linux/poison.h | 9 - trunk/include/linux/posix-timers.h | 2 +- trunk/include/linux/ppp_channel.h | 2 +- trunk/include/linux/radix-tree.h | 6 +- trunk/include/linux/raid/pq.h | 2 + trunk/include/linux/regulator/ab8500.h | 25 + trunk/include/linux/reiserfs_fs.h | 2 +- trunk/include/linux/reiserfs_fs_i.h | 4 +- trunk/include/linux/resource.h | 9 + trunk/include/linux/rmap.h | 41 +- trunk/include/linux/s3c_adc_battery.h | 36 + trunk/include/linux/sched.h | 3 +- trunk/include/linux/security.h | 10 +- trunk/include/linux/serial.h | 9 +- trunk/include/linux/serial_8250.h | 5 + trunk/include/linux/serial_core.h | 14 +- trunk/include/linux/serial_mfd.h | 47 + trunk/include/linux/serial_reg.h | 16 + trunk/include/linux/sh_clk.h | 23 +- trunk/include/linux/shmem_fs.h | 3 +- trunk/include/linux/skbuff.h | 5 + trunk/include/linux/slab_def.h | 4 +- trunk/include/linux/slob_def.h | 4 +- trunk/include/linux/slub_def.h | 8 +- trunk/include/linux/spi/max7301.h | 8 + trunk/include/linux/spi/spi.h | 12 + trunk/include/linux/spi/spi_gpio.h | 5 + trunk/include/linux/statfs.h | 25 +- trunk/include/linux/swap.h | 11 +- trunk/include/linux/syscalls.h | 28 +- trunk/include/linux/sysv_fs.h | 11 + trunk/include/linux/time.h | 4 +- trunk/include/linux/topology.h | 4 - trunk/include/linux/tty.h | 52 + trunk/include/linux/usb.h | 5 +- trunk/include/linux/usb/composite.h | 6 + trunk/include/linux/usb/ehci_def.h | 23 + trunk/include/linux/usb/functionfs.h | 6 +- trunk/include/linux/usb/hcd.h | 31 +- trunk/include/linux/usb/otg.h | 11 +- trunk/include/linux/usb/quirks.h | 4 + trunk/include/linux/usb/ulpi.h | 40 + trunk/include/linux/vgaarb.h | 1 - trunk/include/linux/videodev2.h | 1 + trunk/include/linux/virtio_9p.h | 1 + trunk/include/linux/vmalloc.h | 2 + trunk/include/linux/vt_kern.h | 64 +- trunk/include/linux/wm97xx_batt.h | 16 - trunk/include/linux/writeback.h | 5 +- trunk/include/media/cx2341x.h | 97 + trunk/include/media/cx25840.h | 87 + trunk/include/media/ir-core.h | 41 +- trunk/include/media/lirc.h | 5 +- trunk/include/media/rc-map.h | 1 + trunk/include/media/v4l2-ctrls.h | 460 ++++ trunk/include/media/v4l2-dev.h | 4 + trunk/include/media/v4l2-device.h | 4 + trunk/include/media/v4l2-subdev.h | 54 +- trunk/include/mtd/mtd-abi.h | 18 +- trunk/include/mtd/mtd-user.h | 17 +- trunk/include/mtd/nftl-user.h | 16 +- trunk/include/mtd/ubi-user.h | 2 +- trunk/include/net/bluetooth/hci_core.h | 2 +- trunk/include/net/bluetooth/l2cap.h | 4 +- trunk/include/net/sock.h | 4 +- trunk/include/scsi/scsi.h | 8 +- trunk/include/scsi/scsi_netlink.h | 4 +- trunk/include/trace/events/block.h | 15 +- trunk/include/trace/events/gfpflags.h | 37 + trunk/include/trace/events/kmem.h | 38 +- trunk/include/trace/events/vmscan.h | 275 +++ trunk/include/trace/events/writeback.h | 159 ++ trunk/include/video/mipi_display.h | 130 + trunk/include/video/sh_mipi_dsi.h | 35 + trunk/include/video/sh_mobile_hdmi.h | 22 + trunk/include/video/sh_mobile_lcdc.h | 41 +- trunk/include/xen/interface/memory.h | 50 + trunk/include/xen/swiotlb-xen.h | 65 + trunk/include/xen/xen-ops.h | 6 + trunk/init/Kconfig | 14 +- trunk/init/main.c | 42 +- trunk/ipc/mqueue.c | 16 +- trunk/kernel/Makefile | 5 +- trunk/kernel/acct.c | 2 +- trunk/kernel/audit.c | 1 - trunk/kernel/audit.h | 26 +- trunk/kernel/audit_tree.c | 237 +- trunk/kernel/audit_watch.c | 274 ++- trunk/kernel/auditfilter.c | 39 +- trunk/kernel/auditsc.c | 19 +- trunk/kernel/cgroup.c | 4 +- trunk/kernel/compat.c | 17 +- trunk/kernel/cred.c | 4 - trunk/kernel/exec_domain.c | 22 +- trunk/kernel/exit.c | 7 +- trunk/kernel/fork.c | 1 + trunk/kernel/kexec.c | 8 +- trunk/kernel/kfifo.c | 750 +++--- trunk/kernel/panic.c | 60 +- trunk/kernel/params.c | 233 +- trunk/kernel/pid.c | 56 +- trunk/kernel/posix-cpu-timers.c | 8 +- trunk/kernel/power/block_io.c | 2 +- trunk/kernel/power/hibernate.c | 1 + trunk/kernel/power/snapshot.c | 1 + trunk/kernel/power/swap.c | 6 +- trunk/kernel/printk.c | 10 +- trunk/kernel/ptrace.c | 12 +- trunk/kernel/range.c | 4 - trunk/kernel/stop_machine.c | 2 +- trunk/kernel/sys.c | 202 +- trunk/kernel/sys_ni.c | 4 + trunk/kernel/sysctl.c | 11 +- trunk/kernel/time/timekeeping.c | 14 +- trunk/kernel/timer.c | 1 + trunk/kernel/trace/blktrace.c | 88 +- trunk/kernel/workqueue.c | 4 +- trunk/lib/Kconfig | 3 + trunk/lib/Kconfig.debug | 7 + trunk/lib/Makefile | 1 + trunk/lib/bug.c | 12 +- trunk/lib/decompress_bunzip2.c | 10 +- trunk/lib/flex_array.c | 25 +- trunk/lib/inflate.c | 2 + trunk/lib/iommu-helper.c | 9 - trunk/lib/list_debug.c | 6 + trunk/lib/percpu_counter.c | 27 + trunk/lib/radix-tree.c | 94 + trunk/lib/raid6/Makefile | 75 + .../md/raid6algos.c => lib/raid6/algos.c} | 4 +- .../raid6altivec.uc => lib/raid6/altivec.uc} | 0 .../md/raid6int.uc => lib/raid6/int.uc} | 0 trunk/{drivers/md => lib/raid6}/mktables.c | 0 .../md/raid6mmx.c => lib/raid6/mmx.c} | 6 +- .../md/raid6recov.c => lib/raid6/recov.c} | 2 +- .../md/raid6sse1.c => lib/raid6/sse1.c} | 6 +- .../md/raid6sse2.c => lib/raid6/sse2.c} | 4 +- trunk/lib/raid6/test/Makefile | 72 + .../md/raid6test => lib/raid6/test}/test.c | 0 trunk/{drivers/md => lib/raid6}/unroll.awk | 0 .../md/raid6x86.h => lib/raid6/x86.h} | 2 +- trunk/lib/rwsem.c | 150 +- trunk/lib/scatterlist.c | 23 +- trunk/lib/vsprintf.c | 14 +- trunk/mm/backing-dev.c | 448 ++-- trunk/mm/filemap.c | 2 - trunk/mm/hugetlb.c | 110 +- trunk/mm/hwpoison-inject.c | 15 +- trunk/mm/init-mm.c | 6 + trunk/mm/kmemleak.c | 100 +- trunk/mm/ksm.c | 71 +- trunk/mm/memblock.c | 2 +- trunk/mm/memcontrol.c | 462 ++-- trunk/mm/memory-failure.c | 120 +- trunk/mm/memory.c | 44 +- trunk/mm/mempolicy.c | 82 +- trunk/mm/migrate.c | 10 +- trunk/mm/mmap.c | 44 +- trunk/mm/nommu.c | 5 - trunk/mm/oom_kill.c | 683 ++--- trunk/mm/page-writeback.c | 254 +- trunk/mm/page_alloc.c | 33 +- trunk/mm/page_io.c | 2 +- trunk/mm/rmap.c | 186 +- trunk/mm/shmem.c | 133 +- trunk/mm/slab.c | 2 +- trunk/mm/swapfile.c | 100 +- trunk/mm/truncate.c | 38 +- trunk/mm/util.c | 11 +- trunk/mm/vmalloc.c | 11 +- trunk/mm/vmscan.c | 548 +++-- trunk/mm/vmstat.c | 8 +- trunk/net/atm/pppoatm.c | 2 +- trunk/net/bluetooth/hci_core.c | 2 +- trunk/net/bluetooth/hci_sock.c | 8 +- trunk/net/bluetooth/hci_sysfs.c | 3 +- trunk/net/bluetooth/l2cap.c | 35 +- trunk/net/bluetooth/rfcomm/tty.c | 2 +- trunk/net/caif/cfpkt_skbuff.c | 2 +- trunk/net/can/bcm.c | 41 +- trunk/net/core/dev.c | 7 +- trunk/net/dns_resolver/dns_key.c | 92 +- trunk/net/dns_resolver/dns_query.c | 5 + trunk/net/dsa/Kconfig | 2 +- trunk/net/ipv4/tcp_input.c | 2 +- trunk/net/irda/irnet/irnet_ppp.c | 2 +- trunk/net/l2tp/l2tp_ppp.c | 5 +- trunk/net/mac80211/main.c | 2 + trunk/net/mac80211/rate.c | 2 + trunk/net/mac80211/scan.c | 14 - trunk/net/rxrpc/ar-ack.c | 3 + trunk/net/rxrpc/ar-call.c | 6 +- trunk/net/rxrpc/ar-internal.h | 16 +- trunk/net/sched/act_nat.c | 23 +- trunk/net/sched/cls_flow.c | 96 +- trunk/net/sched/cls_rsvp.h | 12 +- trunk/net/sched/sch_api.c | 22 +- trunk/net/sched/sch_atm.c | 4 +- trunk/net/sched/sch_sfq.c | 50 +- trunk/net/sched/sch_tbf.c | 4 +- trunk/net/sched/sch_teql.c | 2 +- trunk/net/sunrpc/auth.c | 9 +- trunk/net/sunrpc/xprtsock.c | 26 +- trunk/net/wireless/mlme.c | 8 +- trunk/samples/Kconfig | 10 + trunk/samples/Makefile | 2 +- trunk/samples/kfifo/Makefile | 1 + trunk/samples/kfifo/bytestream-example.c | 163 ++ trunk/samples/kfifo/dma-example.c | 115 + trunk/samples/kfifo/inttype-example.c | 157 ++ trunk/samples/kfifo/record-example.c | 167 ++ trunk/scripts/checkpatch.pl | 42 +- trunk/scripts/kconfig/conf.c | 15 +- trunk/scripts/kconfig/confdata.c | 111 +- trunk/scripts/kconfig/expr.c | 2 +- trunk/scripts/kconfig/lkc.h | 10 + trunk/scripts/kconfig/nconf.c | 2 + trunk/scripts/kernel-doc | 2 + trunk/scripts/mod/modpost.c | 73 +- trunk/scripts/setlocalversion | 2 +- trunk/security/apparmor/lsm.c | 36 +- trunk/security/capability.c | 3 +- trunk/security/keys/internal.h | 5 - trunk/security/security.c | 21 +- trunk/security/selinux/hooks.c | 12 +- trunk/sound/aoa/soundbus/core.c | 2 +- trunk/sound/aoa/soundbus/soundbus.h | 2 +- trunk/sound/aoa/soundbus/sysfs.c | 2 +- trunk/sound/oss/ad1848.c | 2 +- trunk/sound/oss/au1550_ac97.c | 1 - trunk/sound/pci/hda/hda_codec.c | 150 +- trunk/sound/pci/hda/hda_codec.h | 12 + trunk/sound/pci/hda/hda_intel.c | 6 +- trunk/sound/pci/hda/patch_conexant.c | 3 + trunk/sound/pci/hda/patch_nvhdmi.c | 61 +- trunk/sound/pci/hda/patch_realtek.c | 41 +- trunk/sound/pci/hda/patch_sigmatel.c | 13 + trunk/sound/soc/blackfin/Kconfig | 7 +- trunk/sound/soc/blackfin/bf5xx-ad1980.c | 10 +- trunk/sound/soc/codecs/ad1980.c | 10 +- trunk/sound/soc/codecs/ad1980.h | 6 + trunk/sound/soc/codecs/wm8580.c | 6 +- trunk/sound/soc/fsl/mpc5200_dma.c | 4 +- trunk/sound/soc/fsl/mpc5200_dma.h | 4 +- trunk/sound/soc/fsl/mpc5200_psc_ac97.c | 26 +- trunk/sound/soc/fsl/mpc5200_psc_i2s.c | 4 +- trunk/sound/soc/fsl/mpc8610_hpcd.c | 4 +- trunk/sound/soc/imx/Kconfig | 4 +- trunk/sound/soc/soc-cache.c | 4 +- trunk/sound/sparc/amd7930.c | 8 +- trunk/sound/sparc/cs4231.c | 18 +- trunk/sound/sparc/dbri.c | 8 +- trunk/tools/perf/Makefile | 31 +- trunk/tools/perf/builtin-annotate.c | 2 +- trunk/tools/perf/builtin-report.c | 31 +- trunk/tools/perf/builtin-timechart.c | 4 +- trunk/tools/perf/builtin-trace.c | 19 +- trunk/tools/perf/util/debug.c | 2 +- trunk/tools/perf/util/debug.h | 9 +- trunk/tools/perf/util/hist.c | 16 +- trunk/tools/perf/util/hist.h | 3 +- trunk/tools/perf/util/include/linux/list.h | 8 + trunk/tools/perf/util/include/linux/types.h | 12 + trunk/tools/perf/util/probe-event.c | 11 +- trunk/tools/perf/util/probe-finder.c | 9 +- trunk/tools/perf/util/pstack.h | 2 + trunk/tools/perf/util/sort.c | 6 +- trunk/tools/perf/util/symbol.c | 40 +- trunk/tools/perf/util/symbol.h | 1 + trunk/tools/perf/util/ui/browser.c | 329 +++ trunk/tools/perf/util/ui/browser.h | 46 + trunk/tools/perf/util/ui/browsers/annotate.c | 240 ++ .../perf/util/{newt.c => ui/browsers/hists.c} | 1516 ++++-------- trunk/tools/perf/util/ui/browsers/map.c | 161 ++ trunk/tools/perf/util/ui/browsers/map.h | 6 + trunk/tools/perf/util/ui/helpline.c | 69 + trunk/tools/perf/util/ui/helpline.h | 11 + trunk/tools/perf/util/ui/libslang.h | 27 + trunk/tools/perf/util/ui/progress.c | 60 + trunk/tools/perf/util/ui/progress.h | 11 + trunk/tools/perf/util/ui/setup.c | 42 + trunk/tools/perf/util/ui/util.c | 114 + trunk/tools/perf/util/ui/util.h | 10 + 2597 files changed, 101529 insertions(+), 171856 deletions(-) create mode 100644 trunk/Documentation/ABI/testing/sysfs-bus-i2c-devices-hm6352 create mode 100644 trunk/Documentation/ABI/testing/sysfs-i2c-bmp085 delete mode 100644 trunk/Documentation/blackfin/Filesystems create mode 100644 trunk/Documentation/blackfin/bfin-spi-notes.txt delete mode 100644 trunk/Documentation/blackfin/cachefeatures.txt create mode 100644 trunk/Documentation/hwmon/jc42 create mode 100644 trunk/Documentation/hwmon/smm665 create mode 100644 trunk/Documentation/mmc/00-INDEX create mode 100644 trunk/Documentation/mmc/mmc-dev-attrs.txt create mode 100644 trunk/Documentation/networking/igb.txt create mode 100644 trunk/Documentation/networking/igbvf.txt delete mode 100644 trunk/Documentation/networking/wavelan.txt create mode 100644 trunk/Documentation/trace/postprocess/trace-vmscan-postprocess.pl create mode 100644 trunk/Documentation/usb/gadget_multi.txt create mode 100644 trunk/Documentation/usb/linux-cdc-acm.inf create mode 100644 trunk/Documentation/video4linux/v4l2-controls.txt delete mode 100644 trunk/arch/alpha/include/asm/md.h create mode 100644 trunk/arch/alpha/include/asm/wrperfmon.h create mode 100644 trunk/arch/alpha/kernel/perf_event.c delete mode 100644 trunk/arch/arm/configs/s5pc110_defconfig create mode 100644 trunk/arch/arm/mach-gemini/board-nas4220b.c create mode 100644 trunk/arch/arm/mach-gemini/board-wbd111.c create mode 100644 trunk/arch/arm/mach-gemini/board-wbd222.c create mode 100644 trunk/arch/arm/mach-ixp4xx/vulcan-pci.c create mode 100644 trunk/arch/arm/mach-ixp4xx/vulcan-setup.c create mode 100644 trunk/arch/arm/mach-msm/board-trout-mmc.c create mode 100644 trunk/arch/arm/mach-pxa/colibri-pxa270-evalboard.c create mode 100644 trunk/arch/arm/mach-pxa/colibri-pxa270-income.c delete mode 100644 trunk/arch/arm/mach-pxa/e330.c delete mode 100644 trunk/arch/arm/mach-pxa/e350.c delete mode 100644 trunk/arch/arm/mach-pxa/e400.c delete mode 100644 trunk/arch/arm/mach-pxa/e740.c delete mode 100644 trunk/arch/arm/mach-pxa/e750.c delete mode 100644 trunk/arch/arm/mach-pxa/e800.c delete mode 100644 trunk/arch/arm/mach-pxa/imote2.c create mode 100644 trunk/arch/arm/mach-pxa/include/mach/palm27x.h create mode 100644 trunk/arch/arm/mach-pxa/include/mach/pata_pxa.h delete mode 100644 trunk/arch/arm/mach-pxa/include/mach/sharpsl.h create mode 100644 trunk/arch/arm/mach-pxa/palm27x.c delete mode 100644 trunk/arch/arm/mach-pxa/sharpsl.h create mode 100644 trunk/arch/arm/mach-s3c64xx/setup-ide.c create mode 100644 trunk/arch/arm/mach-s3c64xx/setup-keypad.c create mode 100644 trunk/arch/arm/mach-s5p6440/setup-i2c1.c create mode 100644 trunk/arch/arm/mach-s5pc100/setup-ide.c create mode 100644 trunk/arch/arm/mach-s5pc100/setup-keypad.c create mode 100644 trunk/arch/arm/mach-s5pv210/setup-ide.c create mode 100644 trunk/arch/arm/mach-s5pv210/setup-keypad.c create mode 100644 trunk/arch/arm/mach-s5pv310/Kconfig create mode 100644 trunk/arch/arm/mach-s5pv310/Makefile create mode 100644 trunk/arch/arm/mach-s5pv310/Makefile.boot create mode 100644 trunk/arch/arm/mach-s5pv310/clock.c create mode 100644 trunk/arch/arm/mach-s5pv310/cpu.c create mode 100644 trunk/arch/arm/mach-s5pv310/headsmp.S create mode 100644 trunk/arch/arm/mach-s5pv310/include/mach/debug-macro.S create mode 100644 trunk/arch/arm/mach-s5pv310/include/mach/entry-macro.S create mode 100644 trunk/arch/arm/mach-s5pv310/include/mach/gpio.h create mode 100644 trunk/arch/arm/mach-s5pv310/include/mach/hardware.h create mode 100644 trunk/arch/arm/mach-s5pv310/include/mach/io.h create mode 100644 trunk/arch/arm/mach-s5pv310/include/mach/irqs.h create mode 100644 trunk/arch/arm/mach-s5pv310/include/mach/map.h create mode 100644 trunk/arch/arm/mach-s5pv310/include/mach/memory.h create mode 100644 trunk/arch/arm/mach-s5pv310/include/mach/pwm-clock.h create mode 100644 trunk/arch/arm/mach-s5pv310/include/mach/regs-clock.h create mode 100644 trunk/arch/arm/mach-s5pv310/include/mach/regs-irq.h create mode 100644 trunk/arch/arm/mach-s5pv310/include/mach/smp.h create mode 100644 trunk/arch/arm/mach-s5pv310/include/mach/system.h create mode 100644 trunk/arch/arm/mach-s5pv310/include/mach/timex.h create mode 100644 trunk/arch/arm/mach-s5pv310/include/mach/uncompress.h create mode 100644 trunk/arch/arm/mach-s5pv310/include/mach/vmalloc.h create mode 100644 trunk/arch/arm/mach-s5pv310/init.c create mode 100644 trunk/arch/arm/mach-s5pv310/irq-combiner.c create mode 100644 trunk/arch/arm/mach-s5pv310/localtimer.c create mode 100644 trunk/arch/arm/mach-s5pv310/mach-smdkv310.c create mode 100644 trunk/arch/arm/mach-s5pv310/mach-universal_c210.c create mode 100644 trunk/arch/arm/mach-s5pv310/platsmp.c create mode 100644 trunk/arch/arm/mach-s5pv310/setup-i2c0.c create mode 100644 trunk/arch/arm/mach-s5pv310/setup-i2c1.c create mode 100644 trunk/arch/arm/mach-s5pv310/setup-i2c2.c create mode 100644 trunk/arch/arm/mach-s5pv310/time.c create mode 100644 trunk/arch/arm/mach-shmobile/clock-sh7372.c create mode 100644 trunk/arch/arm/mach-shmobile/clock-sh7377.c create mode 100644 trunk/arch/arm/mach-shmobile/clock.c create mode 100644 trunk/arch/arm/mach-w90x900/include/mach/i2c.h delete mode 100644 trunk/arch/arm/plat-pxa/pmu.c create mode 100644 trunk/arch/arm/plat-s5p/dev-fimc0.c create mode 100644 trunk/arch/arm/plat-s5p/dev-fimc1.c create mode 100644 trunk/arch/arm/plat-s5p/dev-fimc2.c create mode 100644 trunk/arch/arm/plat-s5p/dev-pmu.c create mode 100644 trunk/arch/arm/plat-s5p/include/plat/reset.h create mode 100644 trunk/arch/arm/plat-s5p/include/plat/s5pv310.h create mode 100644 trunk/arch/arm/plat-s5p/include/plat/system-reset.h create mode 100644 trunk/arch/arm/plat-samsung/dev-hsmmc3.c create mode 100644 trunk/arch/arm/plat-samsung/dev-ide.c create mode 100644 trunk/arch/arm/plat-samsung/dev-keypad.c create mode 100644 trunk/arch/arm/plat-samsung/include/plat/adc-core.h create mode 100644 trunk/arch/arm/plat-samsung/include/plat/ata-core.h create mode 100644 trunk/arch/arm/plat-samsung/include/plat/ata.h create mode 100644 trunk/arch/arm/plat-samsung/include/plat/fb-core.h create mode 100644 trunk/arch/arm/plat-samsung/include/plat/fimc-core.h create mode 100644 trunk/arch/arm/plat-samsung/include/plat/keypad-core.h create mode 100644 trunk/arch/arm/plat-samsung/include/plat/regs-ata.h create mode 100644 trunk/arch/arm/plat-samsung/platformdata.c delete mode 100644 trunk/arch/h8300/include/asm/md.h delete mode 100644 trunk/arch/m68k/include/asm/md.h create mode 100644 trunk/arch/x86/include/asm/xen/swiotlb-xen.h create mode 100644 trunk/arch/x86/xen/pci-swiotlb-xen.c create mode 100644 trunk/drivers/ata/pata_pxa.c create mode 100644 trunk/drivers/char/tty_mutex.c create mode 100644 trunk/drivers/dma/intel_mid_dma.c create mode 100644 trunk/drivers/dma/intel_mid_dma_regs.h create mode 100644 trunk/drivers/dma/pch_dma.c create mode 100644 trunk/drivers/gpio/stmpe-gpio.c create mode 100644 trunk/drivers/gpio/sx150x.c create mode 100644 trunk/drivers/gpu/drm/drm_edid_modes.h create mode 100644 trunk/drivers/gpu/drm/nouveau/nvc0_fb.c create mode 100644 trunk/drivers/gpu/drm/nouveau/nvc0_fifo.c create mode 100644 trunk/drivers/gpu/drm/nouveau/nvc0_graph.c create mode 100644 trunk/drivers/gpu/drm/nouveau/nvc0_instmem.c create mode 100644 trunk/drivers/hwmon/jc42.c create mode 100644 trunk/drivers/hwmon/smm665.c create mode 100644 trunk/drivers/i2c/busses/i2c-nuc900.c create mode 100644 trunk/drivers/i2c/i2c-mux.c create mode 100644 trunk/drivers/i2c/muxes/Kconfig create mode 100644 trunk/drivers/i2c/muxes/Makefile create mode 100644 trunk/drivers/i2c/muxes/pca954x.c create mode 100644 trunk/drivers/input/keyboard/stmpe-keypad.c create mode 100644 trunk/drivers/input/touchscreen/stmpe-ts.c delete mode 100644 trunk/drivers/md/raid6test/Makefile create mode 100644 trunk/drivers/media/IR/ene_ir.c create mode 100644 trunk/drivers/media/IR/ene_ir.h delete mode 100644 trunk/drivers/media/IR/keymaps/rc-empty.c create mode 100644 trunk/drivers/media/IR/keymaps/rc-rc5-streamzap.c create mode 100644 trunk/drivers/media/IR/streamzap.c create mode 100644 trunk/drivers/media/video/cx23885/cx23885-av.c create mode 100644 trunk/drivers/media/video/cx23885/cx23885-av.h create mode 100644 trunk/drivers/media/video/cx25840/cx25840-ir.c create mode 100644 trunk/drivers/media/video/s5p-fimc/Makefile create mode 100644 trunk/drivers/media/video/s5p-fimc/fimc-core.c create mode 100644 trunk/drivers/media/video/s5p-fimc/fimc-core.h create mode 100644 trunk/drivers/media/video/s5p-fimc/fimc-reg.c create mode 100644 trunk/drivers/media/video/s5p-fimc/regs-fimc.h create mode 100644 trunk/drivers/media/video/v4l2-ctrls.c create mode 100644 trunk/drivers/mfd/jz4740-adc.c create mode 100644 trunk/drivers/mfd/max8998.c create mode 100644 trunk/drivers/mfd/stmpe.c create mode 100644 trunk/drivers/mfd/stmpe.h create mode 100644 trunk/drivers/mfd/tps6586x.c create mode 100644 trunk/drivers/mfd/twl6030-pwm.c create mode 100644 trunk/drivers/misc/bh1780gli.c create mode 100644 trunk/drivers/misc/bmp085.c create mode 100644 trunk/drivers/misc/hmc6352.c create mode 100644 trunk/drivers/mmc/core/sd.h create mode 100644 trunk/drivers/mmc/host/sdhci-cns3xxx.c create mode 100644 trunk/drivers/mmc/host/sdhci-pltfm.h delete mode 100644 trunk/drivers/mtd/maps/redwood.c create mode 100644 trunk/drivers/pcmcia/pxa2xx_balloon3.c create mode 100644 trunk/drivers/platform/x86/ideapad_acpi.c create mode 100644 trunk/drivers/power/intel_mid_battery.c create mode 100644 trunk/drivers/power/s3c_adc_battery.c create mode 100644 trunk/drivers/regulator/ab8500.c create mode 100644 trunk/drivers/regulator/ad5398.c create mode 100644 trunk/drivers/regulator/isl6271a-regulator.c create mode 100644 trunk/drivers/regulator/max8998.c create mode 100644 trunk/drivers/regulator/tps6586x-regulator.c create mode 100644 trunk/drivers/rtc/rtc-ds3232.c create mode 100644 trunk/drivers/rtc/rtc-imxdi.c create mode 100644 trunk/drivers/rtc/rtc-isl12022.c create mode 100644 trunk/drivers/serial/max3107-aava.c create mode 100644 trunk/drivers/serial/max3107.c create mode 100644 trunk/drivers/serial/max3107.h create mode 100644 trunk/drivers/serial/mfd.c create mode 100644 trunk/drivers/serial/mrst_max3110.c create mode 100644 trunk/drivers/serial/mrst_max3110.h delete mode 100644 trunk/drivers/staging/lirc/lirc_ene0100.c delete mode 100644 trunk/drivers/staging/lirc/lirc_streamzap.c create mode 100644 trunk/drivers/usb/gadget/dbgp.c create mode 100644 trunk/drivers/usb/host/ehci-lpm.c create mode 100644 trunk/drivers/usb/serial/ssu100.c create mode 100644 trunk/drivers/video/sh_mipi_dsi.c create mode 100644 trunk/drivers/video/sh_mobile_hdmi.c create mode 100644 trunk/drivers/watchdog/f71808e_wdt.c create mode 100644 trunk/drivers/watchdog/sp805_wdt.c create mode 100644 trunk/drivers/xen/swiotlb-xen.c create mode 100644 trunk/fs/ceph/locks.c create mode 100644 trunk/fs/notify/fanotify/Kconfig create mode 100644 trunk/fs/notify/fanotify/Makefile create mode 100644 trunk/fs/notify/fanotify/fanotify.c create mode 100644 trunk/fs/notify/fanotify/fanotify_user.c delete mode 100644 trunk/fs/notify/inotify/inotify.c create mode 100644 trunk/fs/notify/mark.c create mode 100644 trunk/fs/notify/vfsmount_mark.c create mode 100644 trunk/fs/squashfs/lzo_wrapper.c create mode 100644 trunk/include/linux/blk_types.h create mode 100644 trunk/include/linux/fanotify.h create mode 100644 trunk/include/linux/hugetlb_inline.h create mode 100644 trunk/include/linux/i2c-mux.h create mode 100644 trunk/include/linux/i2c/pca954x.h create mode 100644 trunk/include/linux/i2c/sx150x.h create mode 100644 trunk/include/linux/intel_mid_dma.h create mode 100644 trunk/include/linux/jz4740-adc.h create mode 100644 trunk/include/linux/mfd/max8998-private.h create mode 100644 trunk/include/linux/mfd/max8998.h delete mode 100644 trunk/include/linux/mfd/mc13783-private.h create mode 100644 trunk/include/linux/mfd/stmpe.h create mode 100644 trunk/include/linux/mfd/tps6586x.h delete mode 100644 trunk/include/linux/mtd/compatmac.h create mode 100644 trunk/include/linux/pch_dma.h create mode 100644 trunk/include/linux/regulator/ab8500.h create mode 100644 trunk/include/linux/s3c_adc_battery.h create mode 100644 trunk/include/linux/serial_mfd.h delete mode 100644 trunk/include/linux/wm97xx_batt.h create mode 100644 trunk/include/media/v4l2-ctrls.h create mode 100644 trunk/include/trace/events/gfpflags.h create mode 100644 trunk/include/trace/events/vmscan.h create mode 100644 trunk/include/trace/events/writeback.h create mode 100644 trunk/include/video/mipi_display.h create mode 100644 trunk/include/video/sh_mipi_dsi.h create mode 100644 trunk/include/video/sh_mobile_hdmi.h create mode 100644 trunk/include/xen/swiotlb-xen.h create mode 100644 trunk/lib/raid6/Makefile rename trunk/{drivers/md/raid6algos.c => lib/raid6/algos.c} (99%) rename trunk/{drivers/md/raid6altivec.uc => lib/raid6/altivec.uc} (100%) rename trunk/{drivers/md/raid6int.uc => lib/raid6/int.uc} (100%) rename trunk/{drivers/md => lib/raid6}/mktables.c (100%) rename trunk/{drivers/md/raid6mmx.c => lib/raid6/mmx.c} (98%) rename trunk/{drivers/md/raid6recov.c => lib/raid6/recov.c} (99%) rename trunk/{drivers/md/raid6sse1.c => lib/raid6/sse1.c} (98%) rename trunk/{drivers/md/raid6sse2.c => lib/raid6/sse2.c} (99%) create mode 100644 trunk/lib/raid6/test/Makefile rename trunk/{drivers/md/raid6test => lib/raid6/test}/test.c (100%) rename trunk/{drivers/md => lib/raid6}/unroll.awk (100%) rename trunk/{drivers/md/raid6x86.h => lib/raid6/x86.h} (99%) create mode 100644 trunk/samples/kfifo/Makefile create mode 100644 trunk/samples/kfifo/bytestream-example.c create mode 100644 trunk/samples/kfifo/dma-example.c create mode 100644 trunk/samples/kfifo/inttype-example.c create mode 100644 trunk/samples/kfifo/record-example.c create mode 100644 trunk/tools/perf/util/ui/browser.c create mode 100644 trunk/tools/perf/util/ui/browser.h create mode 100644 trunk/tools/perf/util/ui/browsers/annotate.c rename trunk/tools/perf/util/{newt.c => ui/browsers/hists.c} (56%) create mode 100644 trunk/tools/perf/util/ui/browsers/map.c create mode 100644 trunk/tools/perf/util/ui/browsers/map.h create mode 100644 trunk/tools/perf/util/ui/helpline.c create mode 100644 trunk/tools/perf/util/ui/helpline.h create mode 100644 trunk/tools/perf/util/ui/libslang.h create mode 100644 trunk/tools/perf/util/ui/progress.c create mode 100644 trunk/tools/perf/util/ui/progress.h create mode 100644 trunk/tools/perf/util/ui/setup.c create mode 100644 trunk/tools/perf/util/ui/util.c create mode 100644 trunk/tools/perf/util/ui/util.h diff --git a/[refs] b/[refs] index 132c9e49d154..ffab0eef2d32 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a739260d4e3d88c5c810b14231dbdce73665b0b2 +refs/heads/master: bbbfb910d14988963fbc0b3fc5fc460daf21bf24 diff --git a/trunk/Documentation/00-INDEX b/trunk/Documentation/00-INDEX index 5405f7aecefc..8dfc6708a257 100644 --- a/trunk/Documentation/00-INDEX +++ b/trunk/Documentation/00-INDEX @@ -130,8 +130,6 @@ edac.txt - information on EDAC - Error Detection And Correction eisa.txt - info on EISA bus support. -exception.txt - - how Linux v2.2 handles exceptions without verify_area etc. fault-injection/ - dir with docs about the fault injection capabilities infrastructure. fb/ @@ -234,6 +232,8 @@ memory.txt - info on typical Linux memory problems. mips/ - directory with info about Linux on MIPS architecture. +mmc/ + - directory with info about the MMC subsystem mono.txt - how to execute Mono-based .NET binaries with the help of BINFMT_MISC. mutex-design.txt diff --git a/trunk/Documentation/ABI/testing/sysfs-bus-i2c-devices-hm6352 b/trunk/Documentation/ABI/testing/sysfs-bus-i2c-devices-hm6352 new file mode 100644 index 000000000000..feb2e4a87075 --- /dev/null +++ b/trunk/Documentation/ABI/testing/sysfs-bus-i2c-devices-hm6352 @@ -0,0 +1,21 @@ +Where: /sys/bus/i2c/devices/.../heading0_input +Date: April 2010 +Kernel Version: 2.6.36? +Contact: alan.cox@intel.com +Description: Reports the current heading from the compass as a floating + point value in degrees. + +Where: /sys/bus/i2c/devices/.../power_state +Date: April 2010 +Kernel Version: 2.6.36? +Contact: alan.cox@intel.com +Description: Sets the power state of the device. 0 sets the device into + sleep mode, 1 wakes it up. + +Where: /sys/bus/i2c/devices/.../calibration +Date: April 2010 +Kernel Version: 2.6.36? +Contact: alan.cox@intel.com +Description: Sets the calibration on or off (1 = on, 0 = off). See the + chip data sheet. + diff --git a/trunk/Documentation/ABI/testing/sysfs-devices-platform-_UDC_-gadget b/trunk/Documentation/ABI/testing/sysfs-devices-platform-_UDC_-gadget index 34034027b13c..d548eaac230a 100644 --- a/trunk/Documentation/ABI/testing/sysfs-devices-platform-_UDC_-gadget +++ b/trunk/Documentation/ABI/testing/sysfs-devices-platform-_UDC_-gadget @@ -7,3 +7,15 @@ Description: 0 -> resumed (_UDC_ is the name of the USB Device Controller driver) + +What: /sys/devices/platform/_UDC_/gadget/gadget-lunX/nofua +Date: July 2010 +Contact: Andy Shevchenko +Description: + Show or set the reaction on the FUA (Force Unit Access) bit in + the SCSI WRITE(10,12) commands when a gadget in USB Mass + Storage mode. + + Possible values are: + 1 -> ignore the FUA flag + 0 -> obey the FUA flag diff --git a/trunk/Documentation/ABI/testing/sysfs-i2c-bmp085 b/trunk/Documentation/ABI/testing/sysfs-i2c-bmp085 new file mode 100644 index 000000000000..585962ad0465 --- /dev/null +++ b/trunk/Documentation/ABI/testing/sysfs-i2c-bmp085 @@ -0,0 +1,31 @@ +What: /sys/bus/i2c/devices/-/pressure0_input +Date: June 2010 +Contact: Christoph Mair +Description: Start a pressure measurement and read the result. Values + represent the ambient air pressure in pascal (0.01 millibar). + + Reading: returns the current air pressure. + + +What: /sys/bus/i2c/devices/-/temp0_input +Date: June 2010 +Contact: Christoph Mair +Description: Measure the ambient temperature. The returned value represents + the ambient temperature in units of 0.1 degree celsius. + + Reading: returns the current temperature. + + +What: /sys/bus/i2c/devices/-/oversampling +Date: June 2010 +Contact: Christoph Mair +Description: Tell the bmp085 to use more samples to calculate a pressure + value. When writing to this file the chip will use 2^x samples + to calculate the next pressure value with x being the value + written. Using this feature will decrease RMS noise and + increase the measurement time. + + Reading: returns the current oversampling setting. + + Writing: sets a new oversampling setting. + Accepted values: 0..3. diff --git a/trunk/Documentation/DMA-API-HOWTO.txt b/trunk/Documentation/DMA-API-HOWTO.txt index 98ce51796f71..d568bc235bc0 100644 --- a/trunk/Documentation/DMA-API-HOWTO.txt +++ b/trunk/Documentation/DMA-API-HOWTO.txt @@ -738,21 +738,31 @@ to "Closing". CONFIG_NEED_SG_DMA_LENGTH if the architecture supports IOMMUs (including software IOMMU). -2) ARCH_KMALLOC_MINALIGN +2) ARCH_DMA_MINALIGN Architectures must ensure that kmalloc'ed buffer is DMA-safe. Drivers and subsystems depend on it. If an architecture isn't fully DMA-coherent (i.e. hardware doesn't ensure that data in the CPU cache is identical to data in main memory), - ARCH_KMALLOC_MINALIGN must be set so that the memory allocator + ARCH_DMA_MINALIGN must be set so that the memory allocator makes sure that kmalloc'ed buffer doesn't share a cache line with the others. See arch/arm/include/asm/cache.h as an example. - Note that ARCH_KMALLOC_MINALIGN is about DMA memory alignment + Note that ARCH_DMA_MINALIGN is about DMA memory alignment constraints. You don't need to worry about the architecture data alignment constraints (e.g. the alignment constraints about 64-bit objects). +3) Supporting multiple types of IOMMUs + + If your architecture needs to support multiple types of IOMMUs, you + can use include/linux/asm-generic/dma-mapping-common.h. It's a + library to support the DMA API with multiple types of IOMMUs. Lots + of architectures (x86, powerpc, sh, alpha, ia64, microblaze and + sparc) use it. Choose one to see how it can be used. If you need to + support multiple types of IOMMUs in a single system, the example of + x86 or powerpc helps. + Closing This document, and the API itself, would not be in its current diff --git a/trunk/Documentation/DMA-API.txt b/trunk/Documentation/DMA-API.txt index 05e2ae236865..fe2326906610 100644 --- a/trunk/Documentation/DMA-API.txt +++ b/trunk/Documentation/DMA-API.txt @@ -455,12 +455,6 @@ Free memory allocated by the nonconsistent API. All parameters must be identical to those passed in (and returned by dma_alloc_noncoherent()). -int -dma_is_consistent(struct device *dev, dma_addr_t dma_handle) - -Returns true if the device dev is performing consistent DMA on the memory -area pointed to by the dma_handle. - int dma_get_cache_alignment(void) diff --git a/trunk/Documentation/DocBook/Makefile b/trunk/Documentation/DocBook/Makefile index c7e5dc7e8cb3..34929f24c284 100644 --- a/trunk/Documentation/DocBook/Makefile +++ b/trunk/Documentation/DocBook/Makefile @@ -35,7 +35,7 @@ PS_METHOD = $(prefer-db2x) PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs xmldoclinks BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) -xmldocs: $(BOOKS) xmldoclinks +xmldocs: $(BOOKS) sgmldocs: xmldocs PS := $(patsubst %.xml, %.ps, $(BOOKS)) @@ -45,7 +45,7 @@ PDF := $(patsubst %.xml, %.pdf, $(BOOKS)) pdfdocs: $(PDF) HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS))) -htmldocs: $(HTML) +htmldocs: $(HTML) xmldoclinks $(call build_main_index) $(call build_images) @@ -95,7 +95,7 @@ define rule_docproc ) > $(dir $@).$(notdir $@).cmd endef -%.xml: %.tmpl FORCE +%.xml: %.tmpl xmldoclinks FORCE $(call if_changed_rule,docproc) ### diff --git a/trunk/Documentation/DocBook/kernel-api.tmpl b/trunk/Documentation/DocBook/kernel-api.tmpl index 44b3def961a2..a20c6f6fffc3 100644 --- a/trunk/Documentation/DocBook/kernel-api.tmpl +++ b/trunk/Documentation/DocBook/kernel-api.tmpl @@ -132,7 +132,6 @@ X!Ilib/string.c FIFO Buffer kfifo interface !Iinclude/linux/kfifo.h -!Ekernel/kfifo.c diff --git a/trunk/Documentation/DocBook/v4l/lirc_device_interface.xml b/trunk/Documentation/DocBook/v4l/lirc_device_interface.xml index 0413234023d4..68134c0ab4d1 100644 --- a/trunk/Documentation/DocBook/v4l/lirc_device_interface.xml +++ b/trunk/Documentation/DocBook/v4l/lirc_device_interface.xml @@ -229,6 +229,22 @@ on working with the default settings initially. and LIRC_SETUP_END. Drivers can also choose to ignore these ioctls. + + LIRC_SET_WIDEBAND_RECEIVER + + Some receivers are equipped with special wide band receiver which is intended + to be used to learn output of existing remote. + Calling that ioctl with (1) will enable it, and with (0) disable it. + This might be useful of receivers that have otherwise narrow band receiver + that prevents them to be used with some remotes. + Wide band receiver might also be more precise + On the other hand its disadvantage it usually reduced range of reception. + Note: wide band receiver might be implictly enabled if you enable + carrier reports. In that case it will be disabled as soon as you disable + carrier reports. Trying to disable wide band receiver while carrier + reports are active will do nothing. + + diff --git a/trunk/Documentation/DocBook/v4l/pixfmt-packed-rgb.xml b/trunk/Documentation/DocBook/v4l/pixfmt-packed-rgb.xml index d2dd697a81d8..26e879231088 100644 --- a/trunk/Documentation/DocBook/v4l/pixfmt-packed-rgb.xml +++ b/trunk/Documentation/DocBook/v4l/pixfmt-packed-rgb.xml @@ -240,6 +240,45 @@ colorspace V4L2_COLORSPACE_SRGB. r1 r0 + + V4L2_PIX_FMT_BGR666 + 'BGRH' + + b5 + b4 + b3 + b2 + b1 + b0 + g5 + g4 + + g3 + g2 + g1 + g0 + r5 + r4 + r3 + r2 + + r1 + r0 + + + + + + + + + + + + + + + V4L2_PIX_FMT_BGR24 'BGR3' @@ -700,6 +739,45 @@ defined in error. Drivers may interpret them as in b1 b0 + + V4L2_PIX_FMT_BGR666 + 'BGRH' + + b5 + b4 + b3 + b2 + b1 + b0 + g5 + g4 + + g3 + g2 + g1 + g0 + r5 + r4 + r3 + r2 + + r1 + r0 + + + + + + + + + + + + + + + V4L2_PIX_FMT_BGR24 'BGR3' diff --git a/trunk/Documentation/SubmittingPatches b/trunk/Documentation/SubmittingPatches index 72651f788f4e..689e2371095c 100644 --- a/trunk/Documentation/SubmittingPatches +++ b/trunk/Documentation/SubmittingPatches @@ -98,6 +98,17 @@ system, git, as a "commit log". See #15, below. If your description starts to get long, that's a sign that you probably need to split up your patch. See #3, next. +When you submit or resubmit a patch or patch series, include the +complete patch description and justification for it. Don't just +say that this is version N of the patch (series). Don't expect the +patch merger to refer back to earlier patch versions or referenced +URLs to find the patch description and put that into the patch. +I.e., the patch (series) and its description should be self-contained. +This benefits both the patch merger(s) and reviewers. Some reviewers +probably didn't even receive earlier versions of the patch. + +If the patch fixes a logged bug entry, refer to that bug entry by +number and URL. 3) Separate your changes. diff --git a/trunk/Documentation/blackfin/00-INDEX b/trunk/Documentation/blackfin/00-INDEX index c34e12440fec..2df0365f2dff 100644 --- a/trunk/Documentation/blackfin/00-INDEX +++ b/trunk/Documentation/blackfin/00-INDEX @@ -1,11 +1,8 @@ 00-INDEX - This file -cachefeatures.txt - - Supported cache features. - -Filesystems - - Requirements for mounting the root file system. - -bfin-gpio-note.txt +bfin-gpio-notes.txt - Notes in developing/using bfin-gpio driver. + +bfin-spi-notes.txt + - Notes for using bfin spi bus driver. diff --git a/trunk/Documentation/blackfin/Filesystems b/trunk/Documentation/blackfin/Filesystems deleted file mode 100644 index 51260a1b8032..000000000000 --- a/trunk/Documentation/blackfin/Filesystems +++ /dev/null @@ -1,169 +0,0 @@ -/* - * File: Documentation/blackfin/Filesystems - * Based on: - * Author: - * - * Created: - * Description: This file contains the simple DMA Implementation for Blackfin - * - * Rev: $Id: Filesystems 2384 2006-11-01 04:12:43Z magicyang $ - * - * Modified: - * Copyright 2004-2006 Analog Devices Inc. - * - * Bugs: Enter bugs at http://blackfin.uclinux.org/ - * - */ - - How to mount the root file system in uClinux/Blackfin - ----------------------------------------------------- - -1 Mounting EXT3 File system. - ------------------------ - - Creating an EXT3 File system for uClinux/Blackfin: - - -Please follow the steps to form the EXT3 File system and mount the same as root -file system. - -a Make an ext3 file system as large as you want the final root file - system. - - mkfs.ext3 /dev/ram0 - -b Mount this Empty file system on a free directory as: - - mount -t ext3 /dev/ram0 ./test - where ./test is the empty directory. - -c Copy your root fs directory that you have so carefully made over. - - cp -af /tmp/my_final_rootfs_files/* ./test - - (For ex: cp -af uClinux-dist/romfs/* ./test) - -d If you have done everything right till now you should be able to see - the required "root" dir's (that's etc, root, bin, lib, sbin...) - -e Now unmount the file system - - umount ./test - -f Create the root file system image. - - dd if=/dev/ram0 bs=1k count= \ - > ext3fs.img - - -Now you have to tell the kernel that will be mounting this file system as -rootfs. -So do a make menuconfig under kernel and select the Ext3 journaling file system -support under File system --> submenu. - - -2. Mounting EXT2 File system. - ------------------------- - -By default the ext2 file system image will be created if you invoke make from -the top uClinux-dist directory. - - -3. Mounting CRAMFS File System - ---------------------------- - -To create a CRAMFS file system image execute the command - - mkfs.cramfs ./test cramfs.img - - where ./test is the target directory. - - -4. Mounting ROMFS File System - -------------------------- - -To create a ROMFS file system image execute the command - - genromfs -v -V "ROMdisk" -f romfs.img -d ./test - - where ./test is the target directory - - -5. Mounting the JFFS2 Filesystem - ----------------------------- - -To create a compressed JFFS filesystem (JFFS2), please execute the command - - mkfs.jffs2 -d ./test -o jffs2.img - - where ./test is the target directory. - -However, please make sure the following is in your kernel config. - -/* - * RAM/ROM/Flash chip drivers - */ -#define CONFIG_MTD_CFI 1 -#define CONFIG_MTD_ROM 1 -/* - * Mapping drivers for chip access - */ -#define CONFIG_MTD_COMPLEX_MAPPINGS 1 -#define CONFIG_MTD_BF533 1 -#undef CONFIG_MTD_UCLINUX - -Through the u-boot boot loader, use the jffs2.img in the corresponding -partition made in linux-2.6.x/drivers/mtd/maps/bf533_flash.c. - -NOTE - Currently the Flash driver is available only for EZKIT. Watch out for a - STAMP driver soon. - - -6. Mounting the NFS File system - ----------------------------- - - For mounting the NFS please do the following in the kernel config. - - In Networking Support --> Networking options --> TCP/IP networking --> - IP: kernel level autoconfiguration - - Enable BOOTP Support. - - In Kernel hacking --> Compiled-in kernel boot parameter add the following - - root=/dev/nfs rw ip=bootp - - In File system --> Network File system, Enable - - NFS file system support --> NFSv3 client support - Root File system on NFS - - in uClibc menuconfig, do the following - In Networking Support - enable Remote Procedure Call (RPC) support - Full RPC Support - - On the Host side, ensure that /etc/dhcpd.conf looks something like this - - ddns-update-style ad-hoc; - allow bootp; - subnet 10.100.4.0 netmask 255.255.255.0 { - default-lease-time 122209600; - max-lease-time 31557600; - group { - host bf533 { - hardware ethernet 00:CF:52:49:C3:01; - fixed-address 10.100.4.50; - option root-path "/home/nfsmount"; - } - } - - ensure that /etc/exports looks something like this - /home/nfsmount *(rw,no_root_squash,no_all_squash) - - run the following commands as root (may differ depending on your - distribution) : - - service nfs start - - service portmap start - - service dhcpd start - - /usr/sbin/exportfs diff --git a/trunk/Documentation/blackfin/bfin-spi-notes.txt b/trunk/Documentation/blackfin/bfin-spi-notes.txt new file mode 100644 index 000000000000..556fa877f2e8 --- /dev/null +++ b/trunk/Documentation/blackfin/bfin-spi-notes.txt @@ -0,0 +1,14 @@ +SPI Chip Select behavior: + +With the Blackfin on-chip SPI peripheral, there is some logic tied to the CPHA +bit whether the Slave Select Line is controlled by hardware (CPHA=0) or +controlled by software (CPHA=1). However, the Linux SPI bus driver assumes that +the Slave Select is always under software control and being asserted during +the entire SPI transfer. - And not just bits_per_word duration. + +In most cases you can utilize SPI MODE_3 instead of MODE_0 to work-around this +behavior. If your SPI slave device in question requires SPI MODE_0 or MODE_2 +timing, you can utilize the GPIO controlled SPI Slave Select option instead. + +You can even use the same pin whose peripheral role is a SSEL, +but use it as a GPIO instead. diff --git a/trunk/Documentation/blackfin/cachefeatures.txt b/trunk/Documentation/blackfin/cachefeatures.txt deleted file mode 100644 index 75de51f94515..000000000000 --- a/trunk/Documentation/blackfin/cachefeatures.txt +++ /dev/null @@ -1,55 +0,0 @@ -/* - * File: Documentation/blackfin/cachefeatures.txt - * Based on: - * Author: - * - * Created: - * Description: This file contains the simple DMA Implementation for Blackfin - * - * Rev: $Id: cachefeatures.txt 2384 2006-11-01 04:12:43Z magicyang $ - * - * Modified: - * Copyright 2004-2006 Analog Devices Inc. - * - * Bugs: Enter bugs at http://blackfin.uclinux.org/ - * - */ - - - Instruction and Data cache initialization. - icache_init(); - dcache_init(); - - - Instruction and Data cache Invalidation Routines, when flushing the - same is not required. - _icache_invalidate(); - _dcache_invalidate(); - - Also, for invalidating the entire instruction and data cache, the below - routines are provided (another method for invalidation, refer page no 267 and 287 of - ADSP-BF533 Hardware Reference manual) - - invalidate_entire_dcache(); - invalidate_entire_icache(); - - -External Flushing of Instruction and data cache routines. - - flush_instruction_cache(); - flush_data_cache(); - - - Internal Flushing of Instruction and Data Cache. - - icplb_flush(); - dcplb_flush(); - - - Miscellaneous cache functions. - - flush_cache_all(); - flush_cache_mm(); - invalidate_dcache_range(); - flush_dcache_range(); - flush_dcache_page(); - flush_cache_range(); - flush_cache_page(); - invalidate_dcache_range(); - flush_page_to_ram(); - diff --git a/trunk/Documentation/cpu-hotplug.txt b/trunk/Documentation/cpu-hotplug.txt index a99d7031cdf9..45d5a217484f 100644 --- a/trunk/Documentation/cpu-hotplug.txt +++ b/trunk/Documentation/cpu-hotplug.txt @@ -2,7 +2,7 @@ Maintainers: CPU Hotplug Core: - Rusty Russell + Rusty Russell Srivatsa Vaddagiri i386: Zwane Mwaikambo diff --git a/trunk/Documentation/devices.txt b/trunk/Documentation/devices.txt index f2da781705b2..d0d1df6cb5de 100644 --- a/trunk/Documentation/devices.txt +++ b/trunk/Documentation/devices.txt @@ -445,6 +445,7 @@ Your cooperation is appreciated. 233 = /dev/kmview View-OS A process with a view 234 = /dev/btrfs-control Btrfs control device 235 = /dev/autofs Autofs control device + 236 = /dev/mapper/control Device-Mapper control device 240-254 Reserved for local use 255 Reserved for MISC_DYNAMIC_MINOR diff --git a/trunk/Documentation/feature-removal-schedule.txt b/trunk/Documentation/feature-removal-schedule.txt index 71f0fea1058f..842aa9de84a6 100644 --- a/trunk/Documentation/feature-removal-schedule.txt +++ b/trunk/Documentation/feature-removal-schedule.txt @@ -151,6 +151,31 @@ Who: Eric Biederman --------------------------- +What: /proc//oom_adj +When: August 2012 +Why: /proc//oom_adj allows userspace to influence the oom killer's + badness heuristic used to determine which task to kill when the kernel + is out of memory. + + The badness heuristic has since been rewritten since the introduction of + this tunable such that its meaning is deprecated. The value was + implemented as a bitshift on a score generated by the badness() + function that did not have any precise units of measure. With the + rewrite, the score is given as a proportion of available memory to the + task allocating pages, so using a bitshift which grows the score + exponentially is, thus, impossible to tune with fine granularity. + + A much more powerful interface, /proc//oom_score_adj, was + introduced with the oom killer rewrite that allows users to increase or + decrease the badness() score linearly. This interface will replace + /proc//oom_adj. + + A warning will be emitted to the kernel log if an application uses this + deprecated interface. After it is printed once, future warnings will be + suppressed until the kernel is rebooted. + +--------------------------- + What: remove EXPORT_SYMBOL(kernel_thread) When: August 2006 Files: arch/*/kernel/*_ksyms.c @@ -335,14 +360,6 @@ When: 2.6.33 Why: Should be implemented in userspace, policy daemon. Who: Johannes Berg ---------------------------- - -What: CONFIG_INOTIFY -When: 2.6.33 -Why: last user (audit) will be converted to the newer more generic - and more easily maintained fsnotify subsystem -Who: Eric Paris - ---------------------------- What: sound-slot/service-* module aliases and related clutters in @@ -530,3 +547,20 @@ Why: superseded by acpi_sleep=nonvs Who: Rafael J. Wysocki ---------------------------- + +What: PCI DMA unmap state API +When: August 2012 +Why: PCI DMA unmap state API (include/linux/pci-dma.h) was replaced + with DMA unmap state API (DMA unmap state API can be used for + any bus). +Who: FUJITA Tomonori + +---------------------------- + +What: DMA_xxBIT_MASK macros +When: Jun 2011 +Why: DMA_xxBIT_MASK macros were replaced with DMA_BIT_MASK() macros. +Who: FUJITA Tomonori + +---------------------------- + diff --git a/trunk/Documentation/filesystems/Locking b/trunk/Documentation/filesystems/Locking index 96d4293607ec..2db4283efa8d 100644 --- a/trunk/Documentation/filesystems/Locking +++ b/trunk/Documentation/filesystems/Locking @@ -92,8 +92,8 @@ prototypes: void (*destroy_inode)(struct inode *); void (*dirty_inode) (struct inode *); int (*write_inode) (struct inode *, int); - void (*drop_inode) (struct inode *); - void (*delete_inode) (struct inode *); + int (*drop_inode) (struct inode *); + void (*evict_inode) (struct inode *); void (*put_super) (struct super_block *); void (*write_super) (struct super_block *); int (*sync_fs)(struct super_block *sb, int wait); @@ -101,14 +101,13 @@ prototypes: int (*unfreeze_fs) (struct super_block *); int (*statfs) (struct dentry *, struct kstatfs *); int (*remount_fs) (struct super_block *, int *, char *); - void (*clear_inode) (struct inode *); void (*umount_begin) (struct super_block *); int (*show_options)(struct seq_file *, struct vfsmount *); ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); locking rules: - All may block. + All may block [not true, see below] None have BKL s_umount alloc_inode: @@ -116,22 +115,25 @@ destroy_inode: dirty_inode: (must not sleep) write_inode: drop_inode: !!!inode_lock!!! -delete_inode: +evict_inode: put_super: write write_super: read sync_fs: read freeze_fs: read unfreeze_fs: read -statfs: no -remount_fs: maybe (see below) -clear_inode: +statfs: maybe(read) (see below) +remount_fs: write umount_begin: no show_options: no (namespace_sem) quota_read: no (see below) quota_write: no (see below) -->remount_fs() will have the s_umount exclusive lock if it's already mounted. -When called from get_sb_single, it does NOT have the s_umount lock. +->statfs() has s_umount (shared) when called by ustat(2) (native or +compat), but that's an accident of bad API; s_umount is used to pin +the superblock down when we only have dev_t given us by userland to +identify the superblock. Everything else (statfs(), fstatfs(), etc.) +doesn't hold it when calling ->statfs() - superblock is pinned down +by resolving the pathname passed to syscall. ->quota_read() and ->quota_write() functions are both guaranteed to be the only ones operating on the quota file by the quota code (via dqio_sem) (unless an admin really wants to screw up something and @@ -372,8 +374,6 @@ prototypes: ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); int (*readdir) (struct file *, void *, filldir_t); unsigned int (*poll) (struct file *, struct poll_table_struct *); - int (*ioctl) (struct inode *, struct file *, unsigned int, - unsigned long); long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); long (*compat_ioctl) (struct file *, unsigned int, unsigned long); int (*mmap) (struct file *, struct vm_area_struct *); @@ -407,8 +407,7 @@ write: no aio_write: no readdir: no poll: no -ioctl: yes (see below) -unlocked_ioctl: no (see below) +unlocked_ioctl: no compat_ioctl: no mmap: no open: no @@ -451,9 +450,6 @@ move ->readdir() to inode_operations and use a separate method for directory anything that resembles union-mount we won't have a struct file for all components. And there are other reasons why the current interface is a mess... -->ioctl() on regular files is superceded by the ->unlocked_ioctl() that -doesn't take the BKL. - ->read on directories probably must go away - we should just enforce -EISDIR in sys_read() and friends. diff --git a/trunk/Documentation/filesystems/porting b/trunk/Documentation/filesystems/porting index a7e9746ee7ea..b12c89538680 100644 --- a/trunk/Documentation/filesystems/porting +++ b/trunk/Documentation/filesystems/porting @@ -273,3 +273,48 @@ it's safe to remove it. If you don't need it, remove it. deliberate; as soon as struct block_device * is propagated in a reasonable way by that code fixing will become trivial; until then nothing can be done. + +[mandatory] + + block truncatation on error exit from ->write_begin, and ->direct_IO +moved from generic methods (block_write_begin, cont_write_begin, +nobh_write_begin, blockdev_direct_IO*) to callers. Take a look at +ext2_write_failed and callers for an example. + +[mandatory] + + ->truncate is going away. The whole truncate sequence needs to be +implemented in ->setattr, which is now mandatory for filesystems +implementing on-disk size changes. Start with a copy of the old inode_setattr +and vmtruncate, and the reorder the vmtruncate + foofs_vmtruncate sequence to +be in order of zeroing blocks using block_truncate_page or similar helpers, +size update and on finally on-disk truncation which should not fail. +inode_change_ok now includes the size checks for ATTR_SIZE and must be called +in the beginning of ->setattr unconditionally. + +[mandatory] + + ->clear_inode() and ->delete_inode() are gone; ->evict_inode() should +be used instead. It gets called whenever the inode is evicted, whether it has +remaining links or not. Caller does *not* evict the pagecache or inode-associated +metadata buffers; getting rid of those is responsibility of method, as it had +been for ->delete_inode(). + ->drop_inode() returns int now; it's called on final iput() with inode_lock +held and it returns true if filesystems wants the inode to be dropped. As before, +generic_drop_inode() is still the default and it's been updated appropriately. +generic_delete_inode() is also alive and it consists simply of return 1. Note that +all actual eviction work is done by caller after ->drop_inode() returns. + clear_inode() is gone; use end_writeback() instead. As before, it must +be called exactly once on each call of ->evict_inode() (as it used to be for +each call of ->delete_inode()). Unlike before, if you are using inode-associated +metadata buffers (i.e. mark_buffer_dirty_inode()), it's your responsibility to +call invalidate_inode_buffers() before end_writeback(). + No async writeback (and thus no calls of ->write_inode()) will happen +after end_writeback() returns, so actions that should not overlap with ->write_inode() +(e.g. freeing on-disk inode if i_nlink is 0) ought to be done after that call. + + NOTE: checking i_nlink in the beginning of ->write_inode() and bailing out +if it's zero is not *and* *never* *had* *been* enough. Final unlink() and iput() +may happen while the inode is in the middle of ->write_inode(); e.g. if you blindly +free the on-disk inode, you may end up doing that while ->write_inode() is writing +to it. diff --git a/trunk/Documentation/filesystems/proc.txt b/trunk/Documentation/filesystems/proc.txt index 8fe8895894d8..a6aca8740883 100644 --- a/trunk/Documentation/filesystems/proc.txt +++ b/trunk/Documentation/filesystems/proc.txt @@ -33,7 +33,8 @@ Table of Contents 2 Modifying System Parameters 3 Per-Process Parameters - 3.1 /proc//oom_adj - Adjust the oom-killer score + 3.1 /proc//oom_adj & /proc//oom_score_adj - Adjust the oom-killer + score 3.2 /proc//oom_score - Display current oom-killer score 3.3 /proc//io - Display the IO accounting fields 3.4 /proc//coredump_filter - Core dump filtering settings @@ -1234,42 +1235,64 @@ of the kernel. CHAPTER 3: PER-PROCESS PARAMETERS ------------------------------------------------------------------------------ -3.1 /proc//oom_adj - Adjust the oom-killer score ------------------------------------------------------- - -This file can be used to adjust the score used to select which processes -should be killed in an out-of-memory situation. Giving it a high score will -increase the likelihood of this process being killed by the oom-killer. Valid -values are in the range -16 to +15, plus the special value -17, which disables -oom-killing altogether for this process. - -The process to be killed in an out-of-memory situation is selected among all others -based on its badness score. This value equals the original memory size of the process -and is then updated according to its CPU time (utime + stime) and the -run time (uptime - start time). The longer it runs the smaller is the score. -Badness score is divided by the square root of the CPU time and then by -the double square root of the run time. - -Swapped out tasks are killed first. Half of each child's memory size is added to -the parent's score if they do not share the same memory. Thus forking servers -are the prime candidates to be killed. Having only one 'hungry' child will make -parent less preferable than the child. - -/proc//oom_score shows process' current badness score. - -The following heuristics are then applied: - * if the task was reniced, its score doubles - * superuser or direct hardware access tasks (CAP_SYS_ADMIN, CAP_SYS_RESOURCE - or CAP_SYS_RAWIO) have their score divided by 4 - * if oom condition happened in one cpuset and checked process does not belong - to it, its score is divided by 8 - * the resulting score is multiplied by two to the power of oom_adj, i.e. - points <<= oom_adj when it is positive and - points >>= -(oom_adj) otherwise - -The task with the highest badness score is then selected and its children -are killed, process itself will be killed in an OOM situation when it does -not have children or some of them disabled oom like described above. +3.1 /proc//oom_adj & /proc//oom_score_adj- Adjust the oom-killer score +-------------------------------------------------------------------------------- + +These file can be used to adjust the badness heuristic used to select which +process gets killed in out of memory conditions. + +The badness heuristic assigns a value to each candidate task ranging from 0 +(never kill) to 1000 (always kill) to determine which process is targeted. The +units are roughly a proportion along that range of allowed memory the process +may allocate from based on an estimation of its current memory and swap use. +For example, if a task is using all allowed memory, its badness score will be +1000. If it is using half of its allowed memory, its score will be 500. + +There is an additional factor included in the badness score: root +processes are given 3% extra memory over other tasks. + +The amount of "allowed" memory depends on the context in which the oom killer +was called. If it is due to the memory assigned to the allocating task's cpuset +being exhausted, the allowed memory represents the set of mems assigned to that +cpuset. If it is due to a mempolicy's node(s) being exhausted, the allowed +memory represents the set of mempolicy nodes. If it is due to a memory +limit (or swap limit) being reached, the allowed memory is that configured +limit. Finally, if it is due to the entire system being out of memory, the +allowed memory represents all allocatable resources. + +The value of /proc//oom_score_adj is added to the badness score before it +is used to determine which task to kill. Acceptable values range from -1000 +(OOM_SCORE_ADJ_MIN) to +1000 (OOM_SCORE_ADJ_MAX). This allows userspace to +polarize the preference for oom killing either by always preferring a certain +task or completely disabling it. The lowest possible value, -1000, is +equivalent to disabling oom killing entirely for that task since it will always +report a badness score of 0. + +Consequently, it is very simple for userspace to define the amount of memory to +consider for each task. Setting a /proc//oom_score_adj value of +500, for +example, is roughly equivalent to allowing the remainder of tasks sharing the +same system, cpuset, mempolicy, or memory controller resources to use at least +50% more memory. A value of -500, on the other hand, would be roughly +equivalent to discounting 50% of the task's allowed memory from being considered +as scoring against the task. + +For backwards compatibility with previous kernels, /proc//oom_adj may also +be used to tune the badness score. Its acceptable values range from -16 +(OOM_ADJUST_MIN) to +15 (OOM_ADJUST_MAX) and a special value of -17 +(OOM_DISABLE) to disable oom killing entirely for that task. Its value is +scaled linearly with /proc//oom_score_adj. + +Writing to /proc//oom_score_adj or /proc//oom_adj will change the +other with its scaled value. + +NOTICE: /proc//oom_adj is deprecated and will be removed, please see +Documentation/feature-removal-schedule.txt. + +Caveat: when a parent task is selected, the oom killer will sacrifice any first +generation children with seperate address spaces instead, if possible. This +avoids servers and important system daemons from being killed and loses the +minimal amount of work. + 3.2 /proc//oom_score - Display current oom-killer score ------------------------------------------------------------- diff --git a/trunk/Documentation/filesystems/squashfs.txt b/trunk/Documentation/filesystems/squashfs.txt index 203f7202cc9e..66699afd66ca 100644 --- a/trunk/Documentation/filesystems/squashfs.txt +++ b/trunk/Documentation/filesystems/squashfs.txt @@ -2,7 +2,7 @@ SQUASHFS 4.0 FILESYSTEM ======================= Squashfs is a compressed read-only filesystem for Linux. -It uses zlib compression to compress files, inodes and directories. +It uses zlib/lzo compression to compress files, inodes and directories. Inodes in the system are very small and all blocks are packed to minimise data overhead. Block sizes greater than 4K are supported up to a maximum of 1Mbytes (default block size 128K). diff --git a/trunk/Documentation/filesystems/vfs.txt b/trunk/Documentation/filesystems/vfs.txt index 94677e7dcb13..ed7e5efc06d8 100644 --- a/trunk/Documentation/filesystems/vfs.txt +++ b/trunk/Documentation/filesystems/vfs.txt @@ -727,7 +727,6 @@ struct file_operations { ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); int (*readdir) (struct file *, void *, filldir_t); unsigned int (*poll) (struct file *, struct poll_table_struct *); - int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); long (*compat_ioctl) (struct file *, unsigned int, unsigned long); int (*mmap) (struct file *, struct vm_area_struct *); @@ -768,10 +767,7 @@ otherwise noted. activity on this file and (optionally) go to sleep until there is activity. Called by the select(2) and poll(2) system calls - ioctl: called by the ioctl(2) system call - - unlocked_ioctl: called by the ioctl(2) system call. Filesystems that do not - require the BKL should use this method instead of the ioctl() above. + unlocked_ioctl: called by the ioctl(2) system call. compat_ioctl: called by the ioctl(2) system call when 32 bit system calls are used on 64 bit kernels. diff --git a/trunk/Documentation/gpio.txt b/trunk/Documentation/gpio.txt index c2c6e9b39bbe..d96a6dba5748 100644 --- a/trunk/Documentation/gpio.txt +++ b/trunk/Documentation/gpio.txt @@ -158,10 +158,11 @@ and configure pullups/pulldowns appropriately.) Spinlock-Safe GPIO access ------------------------- Most GPIO controllers can be accessed with memory read/write instructions. -That doesn't need to sleep, and can safely be done from inside IRQ handlers. -(That includes hardirq contexts on RT kernels.) +Those don't need to sleep, and can safely be done from inside hard +(nonthreaded) IRQ handlers and similar contexts. -Use these calls to access such GPIOs: +Use the following calls to access such GPIOs, +for which gpio_cansleep() will always return false (see below): /* GPIO INPUT: return zero or nonzero */ int gpio_get_value(unsigned gpio); @@ -210,9 +211,31 @@ To access such GPIOs, a different set of accessors is defined: /* GPIO OUTPUT, might sleep */ void gpio_set_value_cansleep(unsigned gpio, int value); -Other than the fact that these calls might sleep, and will not be ignored -for GPIOs that can't be accessed from IRQ handlers, these calls act the -same as the spinlock-safe calls. + +Accessing such GPIOs requires a context which may sleep, for example +a threaded IRQ handler, and those accessors must be used instead of +spinlock-safe accessors without the cansleep() name suffix. + +Other than the fact that these accessors might sleep, and will work +on GPIOs that can't be accessed from hardIRQ handlers, these calls act +the same as the spinlock-safe calls. + + ** IN ADDITION ** calls to setup and configure such GPIOs must be made +from contexts which may sleep, since they may need to access the GPIO +controller chip too: (These setup calls are usually made from board +setup or driver probe/teardown code, so this is an easy constraint.) + + gpio_direction_input() + gpio_direction_output() + gpio_request() + +## gpio_request_one() +## gpio_request_array() +## gpio_free_array() + + gpio_free() + gpio_set_debounce() + Claiming and Releasing GPIOs diff --git a/trunk/Documentation/hwmon/coretemp b/trunk/Documentation/hwmon/coretemp index 92267b62db59..25568f844804 100644 --- a/trunk/Documentation/hwmon/coretemp +++ b/trunk/Documentation/hwmon/coretemp @@ -21,8 +21,8 @@ Temperature is measured in degrees Celsius and measurement resolution is 1 degree C. Valid temperatures are from 0 to TjMax degrees C, because the actual value of temperature register is in fact a delta from TjMax. -Temperature known as TjMax is the maximum junction temperature of processor. -Intel defines this temperature as 85C or 100C. At this temperature, protection +Temperature known as TjMax is the maximum junction temperature of processor, +which depends on the CPU model. See table below. At this temperature, protection mechanism will perform actions to forcibly cool down the processor. Alarm may be raised, if the temperature grows enough (more than TjMax) to trigger the Out-Of-Spec bit. Following table summarizes the exported sysfs files: @@ -38,3 +38,104 @@ temp1_label - Contains string "Core X", where X is processor The TjMax temperature is set to 85 degrees C if undocumented model specific register (UMSR) 0xee has bit 30 set. If not the TjMax is 100 degrees C as (sometimes) documented in processor datasheet. + +Appendix A. Known TjMax lists (TBD): +Some information comes from ark.intel.com + +Process Processor TjMax(C) + +32nm Core i3/i5/i7 Processors + i7 660UM/640/620, 640LM/620, 620M, 610E 105 + i5 540UM/520/430, 540M/520/450/430 105 + i3 330E, 370M/350/330 90 rPGA, 105 BGA + i3 330UM 105 + +32nm Core i7 Extreme Processors + 980X 100 + +32nm Celeron Processors + U3400 105 + P4505/P4500 90 + +45nm Xeon Processors 5400 Quad-Core + X5492, X5482, X5472, X5470, X5460, X5450 85 + E5472, E5462, E5450/40/30/20/10/05 85 + L5408 95 + L5430, L5420, L5410 70 + +45nm Xeon Processors 5200 Dual-Core + X5282, X5272, X5270, X5260 90 + E5240 90 + E5205, E5220 70, 90 + L5240 70 + L5238, L5215 95 + +45nm Atom Processors + D525/510/425/410 100 + Z560/550/540/530P/530/520PT/520/515/510PT/510P 90 + Z510/500 90 + N475/470/455/450 100 + N280/270 90 + 330/230 125 + +45nm Core2 Processors + Solo ULV SU3500/3300 100 + T9900/9800/9600/9550/9500/9400/9300/8300/8100 105 + T6670/6500/6400 105 + T6600 90 + SU9600/9400/9300 105 + SP9600/9400 105 + SL9600/9400/9380/9300 105 + P9700/9600/9500/8800/8700/8600/8400/7570 105 + P7550/7450 90 + +45nm Core2 Quad Processors + Q9100/9000 100 + +45nm Core2 Extreme Processors + X9100/9000 105 + QX9300 100 + +45nm Core i3/i5/i7 Processors + i7 940XM/920 100 + i7 840QM/820/740/720 100 + +45nm Celeron Processors + SU2300 100 + 900 105 + +65nm Core2 Duo Processors + Solo U2200, U2100 100 + U7700/7600/7500 100 + T7800/7700/7600/7500/7400/7300/7250/7200/7100 100 + T5870/5670/5600/5550/5500/5470/5450/5300/5270 100 + T5250 100 + T5800/5750/5200 85 + L7700/7500/7400/7300/7200 100 + +65nm Core2 Extreme Processors + X7900/7800 100 + +65nm Core Duo Processors + U2500/2400 100 + T2700/2600/2450/2400/2350/2300E/2300/2250/2050 100 + L2500/2400/2300 100 + +65nm Core Solo Processors + U1500/1400/1300 100 + T1400/1350/1300/1250 100 + +65nm Xeon Processors 5000 Quad-Core + X5000 90-95 + E5000 80 + L5000 70 + L5318 95 + +65nm Xeon Processors 5000 Dual-Core + 5080, 5063, 5060, 5050, 5030 80-90 + 5160, 5150, 5148, 5140, 5130, 5120, 5110 80 + L5138 100 + +65nm Celeron Processors + T1700/1600 100 + 560/550/540/530 100 diff --git a/trunk/Documentation/hwmon/f71882fg b/trunk/Documentation/hwmon/f71882fg index a7952c2bd959..1a07fd674cd0 100644 --- a/trunk/Documentation/hwmon/f71882fg +++ b/trunk/Documentation/hwmon/f71882fg @@ -2,6 +2,10 @@ Kernel driver f71882fg ====================== Supported chips: + * Fintek F71808E + Prefix: 'f71808fg' + Addresses scanned: none, address read from Super I/O config space + Datasheet: Not public * Fintek F71858FG Prefix: 'f71858fg' Addresses scanned: none, address read from Super I/O config space diff --git a/trunk/Documentation/hwmon/jc42 b/trunk/Documentation/hwmon/jc42 new file mode 100644 index 000000000000..0e76ef12e4c6 --- /dev/null +++ b/trunk/Documentation/hwmon/jc42 @@ -0,0 +1,97 @@ +Kernel driver jc42 +================== + +Supported chips: + * Analog Devices ADT7408 + Prefix: 'adt7408' + Addresses scanned: I2C 0x18 - 0x1f + Datasheets: + http://www.analog.com/static/imported-files/data_sheets/ADT7408.pdf + * IDT TSE2002B3, TS3000B3 + Prefix: 'tse2002b3', 'ts3000b3' + Addresses scanned: I2C 0x18 - 0x1f + Datasheets: + http://www.idt.com/products/getdoc.cfm?docid=18715691 + http://www.idt.com/products/getdoc.cfm?docid=18715692 + * Maxim MAX6604 + Prefix: 'max6604' + Addresses scanned: I2C 0x18 - 0x1f + Datasheets: + http://datasheets.maxim-ic.com/en/ds/MAX6604.pdf + * Microchip MCP9805, MCP98242, MCP98243, MCP9843 + Prefixes: 'mcp9805', 'mcp98242', 'mcp98243', 'mcp9843' + Addresses scanned: I2C 0x18 - 0x1f + Datasheets: + http://ww1.microchip.com/downloads/en/DeviceDoc/21977b.pdf + http://ww1.microchip.com/downloads/en/DeviceDoc/21996a.pdf + http://ww1.microchip.com/downloads/en/DeviceDoc/22153c.pdf + * NXP Semiconductors SE97, SE97B + Prefix: 'se97' + Addresses scanned: I2C 0x18 - 0x1f + Datasheets: + http://www.nxp.com/documents/data_sheet/SE97.pdf + http://www.nxp.com/documents/data_sheet/SE97B.pdf + * NXP Semiconductors SE98 + Prefix: 'se98' + Addresses scanned: I2C 0x18 - 0x1f + Datasheets: + http://www.nxp.com/documents/data_sheet/SE98.pdf + * ON Semiconductor CAT34TS02, CAT6095 + Prefix: 'cat34ts02', 'cat6095' + Addresses scanned: I2C 0x18 - 0x1f + Datasheet: + http://www.onsemi.com/pub_link/Collateral/CAT34TS02-D.PDF + http://www.onsemi.com/pub/Collateral/CAT6095-D.PDF + * ST Microelectronics STTS424, STTS424E02 + Prefix: 'stts424' + Addresses scanned: I2C 0x18 - 0x1f + Datasheets: + http://www.st.com/stonline/products/literature/ds/13447/stts424.pdf + http://www.st.com/stonline/products/literature/ds/13448/stts424e02.pdf + * JEDEC JC 42.4 compliant temperature sensor chips + Prefix: 'jc42' + Addresses scanned: I2C 0x18 - 0x1f + Datasheet: - + +Author: + Guenter Roeck + + +Description +----------- + +This driver implements support for JEDEC JC 42.4 compliant temperature sensors. +The driver auto-detects the chips listed above, but can be manually instantiated +to support other JC 42.4 compliant chips. + +Example: the following will load the driver for a generic JC 42.4 compliant +temperature sensor at address 0x18 on I2C bus #1: + +# modprobe jc42 +# echo jc42 0x18 > /sys/bus/i2c/devices/i2c-1/new_device + +A JC 42.4 compliant chip supports a single temperature sensor. Minimum, maximum, +and critical temperature can be configured. There are alarms for high, low, +and critical thresholds. + +There is also an hysteresis to control the thresholds for resetting alarms. +Per JC 42.4 specification, the hysteresis threshold can be configured to 0, 1.5, +3.0, and 6.0 degrees C. Configured hysteresis values will be rounded to those +limits. The chip supports only a single register to configure the hysteresis, +which applies to all limits. This register can be written by writing into +temp1_crit_hyst. Other hysteresis attributes are read-only. + +Sysfs entries +------------- + +temp1_input Temperature (RO) +temp1_min Minimum temperature (RW) +temp1_max Maximum temperature (RW) +temp1_crit Critical high temperature (RW) + +temp1_crit_hyst Critical hysteresis temperature (RW) +temp1_max_hyst Maximum hysteresis temperature (RO) + +temp1_min_alarm Temperature low alarm +temp1_max_alarm Temperature high alarm +temp1_crit_alarm Temperature critical alarm diff --git a/trunk/Documentation/hwmon/smm665 b/trunk/Documentation/hwmon/smm665 new file mode 100644 index 000000000000..3820fc9ca52d --- /dev/null +++ b/trunk/Documentation/hwmon/smm665 @@ -0,0 +1,157 @@ +Kernel driver smm665 +==================== + +Supported chips: + * Summit Microelectronics SMM465 + Prefix: 'smm465' + Addresses scanned: - + Datasheet: + http://www.summitmicro.com/prod_select/summary/SMM465/SMM465DS.pdf + * Summit Microelectronics SMM665, SMM665B + Prefix: 'smm665' + Addresses scanned: - + Datasheet: + http://www.summitmicro.com/prod_select/summary/SMM665/SMM665B_2089_20.pdf + * Summit Microelectronics SMM665C + Prefix: 'smm665c' + Addresses scanned: - + Datasheet: + http://www.summitmicro.com/prod_select/summary/SMM665C/SMM665C_2125.pdf + * Summit Microelectronics SMM764 + Prefix: 'smm764' + Addresses scanned: - + Datasheet: + http://www.summitmicro.com/prod_select/summary/SMM764/SMM764_2098.pdf + * Summit Microelectronics SMM766, SMM766B + Prefix: 'smm766' + Addresses scanned: - + Datasheets: + http://www.summitmicro.com/prod_select/summary/SMM766/SMM766_2086.pdf + http://www.summitmicro.com/prod_select/summary/SMM766B/SMM766B_2122.pdf + +Author: Guenter Roeck + + +Module Parameters +----------------- + +* vref: int + Default: 1250 (mV) + Reference voltage on VREF_ADC pin in mV. It should not be necessary to set + this parameter unless a non-default reference voltage is used. + + +Description +----------- + +[From datasheet] The SMM665 is an Active DC Output power supply Controller +that monitors, margins and cascade sequences power. The part monitors six +power supply channels as well as VDD, 12V input, two general-purpose analog +inputs and an internal temperature sensor using a 10-bit ADC. + +Each monitored channel has its own high and low limits, plus a critical +limit. + +Support for SMM465, SMM764, and SMM766 has been implemented but is untested. + + +Usage Notes +----------- + +This driver does not probe for devices, since there is no register which +can be safely used to identify the chip. You will have to instantiate +the devices explicitly. When instantiating the device, you have to specify +its configuration register address. + +Example: the following will load the driver for an SMM665 at address 0x57 +on I2C bus #1: +$ modprobe smm665 +$ echo smm665 0x57 > /sys/bus/i2c/devices/i2c-1/new_device + + +Sysfs entries +------------- + +This driver uses the values in the datasheet to convert ADC register values +into the values specified in the sysfs-interface document. All attributes are +read only. + +Min, max, lcrit, and crit values are used by the chip to trigger external signals +and/or other activity. Triggered signals can include HEALTHY, RST, Power Off, +or Fault depending on the chip configuration. The driver reports values as lcrit +or crit if exceeding the limits triggers RST, Power Off, or Fault, and as min or +max otherwise. For details please see the SMM665 datasheet. + +For SMM465 and SMM764, values for Channel E and F are reported but undefined. + +in1_input 12V input voltage (mV) +in2_input 3.3V (VDD) input voltage (mV) +in3_input Channel A voltage (mV) +in4_input Channel B voltage (mV) +in5_input Channel C voltage (mV) +in6_input Channel D voltage (mV) +in7_input Channel E voltage (mV) +in8_input Channel F voltage (mV) +in9_input AIN1 voltage (mV) +in10_input AIN2 voltage (mV) + +in1_min 12v input minimum voltage (mV) +in2_min 3.3V (VDD) input minimum voltage (mV) +in3_min Channel A minimum voltage (mV) +in4_min Channel B minimum voltage (mV) +in5_min Channel C minimum voltage (mV) +in6_min Channel D minimum voltage (mV) +in7_min Channel E minimum voltage (mV) +in8_min Channel F minimum voltage (mV) +in9_min AIN1 minimum voltage (mV) +in10_min AIN2 minimum voltage (mV) + +in1_max 12v input maximum voltage (mV) +in2_max 3.3V (VDD) input maximum voltage (mV) +in3_max Channel A maximum voltage (mV) +in4_max Channel B maximum voltage (mV) +in5_max Channel C maximum voltage (mV) +in6_max Channel D maximum voltage (mV) +in7_max Channel E maximum voltage (mV) +in8_max Channel F maximum voltage (mV) +in9_max AIN1 maximum voltage (mV) +in10_max AIN2 maximum voltage (mV) + +in1_lcrit 12v input critical minimum voltage (mV) +in2_lcrit 3.3V (VDD) input critical minimum voltage (mV) +in3_lcrit Channel A critical minimum voltage (mV) +in4_lcrit Channel B critical minimum voltage (mV) +in5_lcrit Channel C critical minimum voltage (mV) +in6_lcrit Channel D critical minimum voltage (mV) +in7_lcrit Channel E critical minimum voltage (mV) +in8_lcrit Channel F critical minimum voltage (mV) +in9_lcrit AIN1 critical minimum voltage (mV) +in10_lcrit AIN2 critical minimum voltage (mV) + +in1_crit 12v input critical maximum voltage (mV) +in2_crit 3.3V (VDD) input critical maximum voltage (mV) +in3_crit Channel A critical maximum voltage (mV) +in4_crit Channel B critical maximum voltage (mV) +in5_crit Channel C critical maximum voltage (mV) +in6_crit Channel D critical maximum voltage (mV) +in7_crit Channel E critical maximum voltage (mV) +in8_crit Channel F critical maximum voltage (mV) +in9_crit AIN1 critical maximum voltage (mV) +in10_crit AIN2 critical maximum voltage (mV) + +in1_crit_alarm 12v input critical alarm +in2_crit_alarm 3.3V (VDD) input critical alarm +in3_crit_alarm Channel A critical alarm +in4_crit_alarm Channel B critical alarm +in5_crit_alarm Channel C critical alarm +in6_crit_alarm Channel D critical alarm +in7_crit_alarm Channel E critical alarm +in8_crit_alarm Channel F critical alarm +in9_crit_alarm AIN1 critical alarm +in10_crit_alarm AIN2 critical alarm + +temp1_input Chip tempererature +temp1_min Mimimum chip tempererature +temp1_max Maximum chip tempererature +temp1_crit Critical chip tempererature +temp1_crit_alarm Temperature critical alarm diff --git a/trunk/Documentation/i2c/instantiating-devices b/trunk/Documentation/i2c/instantiating-devices index e89490270aba..87da405a8597 100644 --- a/trunk/Documentation/i2c/instantiating-devices +++ b/trunk/Documentation/i2c/instantiating-devices @@ -102,7 +102,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev) memset(&i2c_info, 0, sizeof(struct i2c_board_info)); strlcpy(i2c_info.name, "isp1301_pnx", I2C_NAME_SIZE); isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info, - normal_i2c); + normal_i2c, NULL); i2c_put_adapter(i2c_adap); (...) } diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt index 44f6b19c50bb..873b68090098 100644 --- a/trunk/Documentation/kernel-parameters.txt +++ b/trunk/Documentation/kernel-parameters.txt @@ -681,8 +681,11 @@ and is between 256 and 4096 characters. It is defined in the file earlycon= [KNL] Output early console device and options. uart[8250],io,[,options] uart[8250],mmio,[,options] + uart[8250],mmio32,[,options] Start an early, polled-mode console on the 8250/16550 UART at the specified I/O port or MMIO address. + MMIO inter-register address stride is either 8bit (mmio) + or 32bit (mmio32). The options are the same as for ttyS, above. earlyprintk= [X86,SH,BLACKFIN] @@ -912,9 +915,6 @@ and is between 256 and 4096 characters. It is defined in the file controller i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX controllers - i8042.panicblink= - [HW] Frequency with which keyboard LEDs should blink - when kernel panics (default is 0.5 sec) i8042.reset [HW] Reset the controller during init and cleanup i8042.unlock [HW] Unlock (ignore) the keylock diff --git a/trunk/Documentation/mmc/00-INDEX b/trunk/Documentation/mmc/00-INDEX new file mode 100644 index 000000000000..fca586f5b853 --- /dev/null +++ b/trunk/Documentation/mmc/00-INDEX @@ -0,0 +1,4 @@ +00-INDEX + - this file +mmc-dev-attrs.txt + - info on SD and MMC device attributes diff --git a/trunk/Documentation/mmc/mmc-dev-attrs.txt b/trunk/Documentation/mmc/mmc-dev-attrs.txt new file mode 100644 index 000000000000..ff2bd685bced --- /dev/null +++ b/trunk/Documentation/mmc/mmc-dev-attrs.txt @@ -0,0 +1,56 @@ +SD and MMC Device Attributes +============================ + +All attributes are read-only. + + cid Card Identifaction Register + csd Card Specific Data Register + scr SD Card Configuration Register (SD only) + date Manufacturing Date (from CID Register) + fwrev Firmware/Product Revision (from CID Register) (SD and MMCv1 only) + hwrev Hardware/Product Revision (from CID Register) (SD and MMCv1 only) + manfid Manufacturer ID (from CID Register) + name Product Name (from CID Register) + oemid OEM/Application ID (from CID Register) + serial Product Serial Number (from CID Register) + erase_size Erase group size + preferred_erase_size Preferred erase size + +Note on Erase Size and Preferred Erase Size: + + "erase_size" is the minimum size, in bytes, of an erase + operation. For MMC, "erase_size" is the erase group size + reported by the card. Note that "erase_size" does not apply + to trim or secure trim operations where the minimum size is + always one 512 byte sector. For SD, "erase_size" is 512 + if the card is block-addressed, 0 otherwise. + + SD/MMC cards can erase an arbitrarily large area up to and + including the whole card. When erasing a large area it may + be desirable to do it in smaller chunks for three reasons: + 1. A single erase command will make all other I/O on + the card wait. This is not a problem if the whole card + is being erased, but erasing one partition will make + I/O for another partition on the same card wait for the + duration of the erase - which could be a several + minutes. + 2. To be able to inform the user of erase progress. + 3. The erase timeout becomes too large to be very + useful. Because the erase timeout contains a margin + which is multiplied by the size of the erase area, + the value can end up being several minutes for large + areas. + + "erase_size" is not the most efficient unit to erase + (especially for SD where it is just one sector), + hence "preferred_erase_size" provides a good chunk + size for erasing large areas. + + For MMC, "preferred_erase_size" is the high-capacity + erase size if a card specifies one, otherwise it is + based on the capacity of the card. + + For SD, "preferred_erase_size" is the allocation unit + size specified by the card. + + "preferred_erase_size" is in bytes. diff --git a/trunk/Documentation/networking/igb.txt b/trunk/Documentation/networking/igb.txt new file mode 100644 index 000000000000..ab2d71831892 --- /dev/null +++ b/trunk/Documentation/networking/igb.txt @@ -0,0 +1,132 @@ +Linux* Base Driver for Intel(R) Network Connection +================================================== + +Intel Gigabit Linux driver. +Copyright(c) 1999 - 2010 Intel Corporation. + +Contents +======== + +- Identifying Your Adapter +- Additional Configurations +- Support + +Identifying Your Adapter +======================== + +This driver supports all 82575, 82576 and 82580-based Intel (R) gigabit network +connections. + +For specific information on how to identify your adapter, go to the Adapter & +Driver ID Guide at: + + http://support.intel.com/support/go/network/adapter/idguide.htm + +Command Line Parameters +======================= + +The default value for each parameter is generally the recommended setting, +unless otherwise noted. + +max_vfs +------- +Valid Range: 0-7 +Default Value: 0 + +This parameter adds support for SR-IOV. It causes the driver to spawn up to +max_vfs worth of virtual function. + +Additional Configurations +========================= + + Jumbo Frames + ------------ + Jumbo Frames support is enabled by changing the MTU to a value larger than + the default of 1500. Use the ifconfig command to increase the MTU size. + For example: + + ifconfig eth mtu 9000 up + + This setting is not saved across reboots. + + Notes: + + - The maximum MTU setting for Jumbo Frames is 9216. This value coincides + with the maximum Jumbo Frames size of 9234 bytes. + + - Using Jumbo Frames at 10 or 100 Mbps may result in poor performance or + loss of link. + + Ethtool + ------- + The driver utilizes the ethtool interface for driver configuration and + diagnostics, as well as displaying statistical information. + + http://sourceforge.net/projects/gkernel. + + Enabling Wake on LAN* (WoL) + --------------------------- + WoL is configured through the Ethtool* utility. + + For instructions on enabling WoL with Ethtool, refer to the Ethtool man page. + + WoL will be enabled on the system during the next shut down or reboot. + For this driver version, in order to enable WoL, the igb driver must be + loaded when shutting down or rebooting the system. + + Wake On LAN is only supported on port A of multi-port adapters. + + Wake On LAN is not supported for the Intel(R) Gigabit VT Quad Port Server + Adapter. + + Multiqueue + ---------- + In this mode, a separate MSI-X vector is allocated for each queue and one + for "other" interrupts such as link status change and errors. All + interrupts are throttled via interrupt moderation. Interrupt moderation + must be used to avoid interrupt storms while the driver is processing one + interrupt. The moderation value should be at least as large as the expected + time for the driver to process an interrupt. Multiqueue is off by default. + + REQUIREMENTS: MSI-X support is required for Multiqueue. If MSI-X is not + found, the system will fallback to MSI or to Legacy interrupts. + + LRO + --- + Large Receive Offload (LRO) is a technique for increasing inbound throughput + of high-bandwidth network connections by reducing CPU overhead. It works by + aggregating multiple incoming packets from a single stream into a larger + buffer before they are passed higher up the networking stack, thus reducing + the number of packets that have to be processed. LRO combines multiple + Ethernet frames into a single receive in the stack, thereby potentially + decreasing CPU utilization for receives. + + NOTE: You need to have inet_lro enabled via either the CONFIG_INET_LRO or + CONFIG_INET_LRO_MODULE kernel config option. Additionally, if + CONFIG_INET_LRO_MODULE is used, the inet_lro module needs to be loaded + before the igb driver. + + You can verify that the driver is using LRO by looking at these counters in + Ethtool: + + lro_aggregated - count of total packets that were combined + lro_flushed - counts the number of packets flushed out of LRO + lro_no_desc - counts the number of times an LRO descriptor was not available + for the LRO packet + + NOTE: IPv6 and UDP are not supported by LRO. + +Support +======= + +For general information, go to the Intel support website at: + + www.intel.com/support/ + +or the Intel Wired Networking project hosted by Sourceforge at: + + http://sourceforge.net/projects/e1000 + +If an issue is identified with the released source code on the supported +kernel with a supported adapter, email the specific information related +to the issue to e1000-devel@lists.sf.net diff --git a/trunk/Documentation/networking/igbvf.txt b/trunk/Documentation/networking/igbvf.txt new file mode 100644 index 000000000000..056028138d9c --- /dev/null +++ b/trunk/Documentation/networking/igbvf.txt @@ -0,0 +1,78 @@ +Linux* Base Driver for Intel(R) Network Connection +================================================== + +Intel Gigabit Linux driver. +Copyright(c) 1999 - 2010 Intel Corporation. + +Contents +======== + +- Identifying Your Adapter +- Additional Configurations +- Support + +This file describes the igbvf Linux* Base Driver for Intel Network Connection. + +The igbvf driver supports 82576-based virtual function devices that can only +be activated on kernels that support SR-IOV. SR-IOV requires the correct +platform and OS support. + +The igbvf driver requires the igb driver, version 2.0 or later. The igbvf +driver supports virtual functions generated by the igb driver with a max_vfs +value of 1 or greater. For more information on the max_vfs parameter refer +to the README included with the igb driver. + +The guest OS loading the igbvf driver must support MSI-X interrupts. + +This driver is only supported as a loadable module at this time. Intel is +not supplying patches against the kernel source to allow for static linking +of the driver. For questions related to hardware requirements, refer to the +documentation supplied with your Intel Gigabit adapter. All hardware +requirements listed apply to use with Linux. + +Instructions on updating ethtool can be found in the section "Additional +Configurations" later in this document. + +VLANs: There is a limit of a total of 32 shared VLANs to 1 or more VFs. + +Identifying Your Adapter +======================== + +The igbvf driver supports 82576-based virtual function devices that can only +be activated on kernels that support SR-IOV. + +For more information on how to identify your adapter, go to the Adapter & +Driver ID Guide at: + + http://support.intel.com/support/go/network/adapter/idguide.htm + +For the latest Intel network drivers for Linux, refer to the following +website. In the search field, enter your adapter name or type, or use the +networking link on the left to search for your adapter: + + http://downloadcenter.intel.com/scripts-df-external/Support_Intel.aspx + +Additional Configurations +========================= + + Ethtool + ------- + The driver utilizes the ethtool interface for driver configuration and + diagnostics, as well as displaying statistical information. + + http://sourceforge.net/projects/gkernel. + +Support +======= + +For general information, go to the Intel support website at: + + http://support.intel.com + +or the Intel Wired Networking project hosted by Sourceforge at: + + http://sourceforge.net/projects/e1000 + +If an issue is identified with the released source code on the supported +kernel with a supported adapter, email the specific information related +to the issue to e1000-devel@lists.sf.net diff --git a/trunk/Documentation/networking/wavelan.txt b/trunk/Documentation/networking/wavelan.txt deleted file mode 100644 index 90e0ac4e15da..000000000000 --- a/trunk/Documentation/networking/wavelan.txt +++ /dev/null @@ -1,74 +0,0 @@ - The Wavelan drivers saga - ------------------------ - - By Jean Tourrilhes - - The Wavelan is a Radio network adapter designed by -Lucent. Under this generic name is hidden quite a variety of hardware, -and many Linux driver to support it. - The get the full story on Wireless LANs, please consult : - http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/ - -"wavelan" driver (old ISA Wavelan) ----------------- - o Config : Network device -> Wireless LAN -> AT&T WaveLAN - o Location : .../drivers/net/wireless/wavelan* - o in-line doc : .../drivers/net/wireless/wavelan.p.h - o on-line doc : - http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Wavelan.html - - This is the driver for the ISA version of the first generation -of the Wavelan, now discontinued. The device is 2 Mb/s, composed of a -Intel 82586 controller and a Lucent Modem, and is NOT 802.11 compliant. - The driver has been tested with the following hardware : - o Wavelan ISA 915 MHz (full length ISA card) - o Wavelan ISA 915 MHz 2.0 (half length ISA card) - o Wavelan ISA 2.4 GHz (full length ISA card, fixed frequency) - o Wavelan ISA 2.4 GHz 2.0 (half length ISA card, frequency selectable) - o Above cards with the optional DES encryption feature - -"wavelan_cs" driver (old Pcmcia Wavelan) -------------------- - o Config : Network device -> PCMCIA network -> - Pcmcia Wireless LAN -> AT&T/Lucent WaveLAN - o Location : .../drivers/net/pcmcia/wavelan* - o in-line doc : .../drivers/net/pcmcia/wavelan_cs.h - o on-line doc : - http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Wavelan.html - - This is the driver for the PCMCIA version of the first -generation of the Wavelan, now discontinued. The device is 2 Mb/s, -composed of a Intel 82593 controller (totally different from the 82586) -and a Lucent Modem, and NOT 802.11 compatible. - The driver has been tested with the following hardware : - o Wavelan Pcmcia 915 MHz 2.0 (Pcmcia card + separate - modem/antenna block) - o Wavelan Pcmcia 2.4 GHz 2.0 (Pcmcia card + separate - modem/antenna block) - -"wvlan_cs" driver (Wavelan IEEE, GPL) ------------------ - o Config : Not yet in kernel - o Location : Pcmcia package 3.1.10+ - o on-line doc : - http://web.archive.org/web/*/http://www.fasta.fh-dortmund.de/users/andy/wvlan/ - - This is the driver for the current generation of Wavelan IEEE, -which is 802.11 compatible. Depending on version, it is 2 Mb/s or 11 -Mb/s, with or without encryption, all implemented in Lucent specific -DSP (the Hermes). - This is a GPL full source PCMCIA driver (ISA is just a Pcmcia -card with ISA-Pcmcia bridge). - -"wavelan2_cs" driver (Wavelan IEEE, binary) --------------------- - o Config : Not yet in kernel - o Location : ftp://sourceforge.org/pcmcia/contrib/ - - This driver support exactly the same hardware as the previous -driver, the main difference is that it is based on a binary library -and supported by Lucent. - - I hope it clears the confusion ;-) - - Jean diff --git a/trunk/Documentation/padata.txt b/trunk/Documentation/padata.txt index 473ebf22cd69..7ddfe216a0aa 100644 --- a/trunk/Documentation/padata.txt +++ b/trunk/Documentation/padata.txt @@ -19,7 +19,7 @@ overall control of how tasks are to be run: The pcpumask describes which processors will be used to execute work submitted to this instance in parallel. The cbcpumask defines which -processors are allowed to use as the serialization callback processor. +processors are allowed to be used as the serialization callback processor. The workqueue wq is where the work will actually be done; it should be a multithreaded queue, naturally. @@ -30,10 +30,10 @@ cpumasks this helper function can be used: Note: Padata maintains two kinds of cpumasks internally. The user supplied cpumasks, submitted by padata_alloc/padata_alloc_possible and the 'usable' -cpumasks. The usable cpumasks are always the subset of active cpus in the -user supplied cpumasks, these are the cpumasks padata actually use. So -it is legal to supply a cpumask to padata that contains offline cpus. -Once a offline cpu in the user supplied cpumask comes online, padata +cpumasks. The usable cpumasks are always a subset of active CPUs in the +user supplied cpumasks; these are the cpumasks padata actually uses. So +it is legal to supply a cpumask to padata that contains offline CPUs. +Once an offline CPU in the user supplied cpumask comes online, padata is going to use it. There are functions for enabling and disabling the instance: @@ -44,7 +44,7 @@ There are functions for enabling and disabling the instance: These functions are setting or clearing the "PADATA_INIT" flag; if that flag is not set, other functions will refuse to work. padata_start returns zero on success (flag set) or -EINVAL if the -padata cpumask contains no active cpu (flag not set). +padata cpumask contains no active CPU (flag not set). padata_stop clears the flag and blocks until the padata instance is unused. @@ -63,11 +63,11 @@ done with great frequency. It's possible to change both cpumasks of a padata instance with padata_set_cpumasks by specifying the cpumasks for parallel execution (pcpumask) -and for the serial callback function (cbcpumask). padata_set_cpumask is to +and for the serial callback function (cbcpumask). padata_set_cpumask is used to change just one of the cpumasks. Here cpumask_type is one of PADATA_CPU_SERIAL, PADATA_CPU_PARALLEL and cpumask specifies the new cpumask to use. -To simply add or remove one cpu from a certain cpumask the functions -padata_add_cpu/padata_remove_cpu are used. cpu specifies the cpu to add or +To simply add or remove one CPU from a certain cpumask the functions +padata_add_cpu/padata_remove_cpu are used. cpu specifies the CPU to add or remove and mask is one of PADATA_CPU_SERIAL, PADATA_CPU_PARALLEL. If a user is interested in padata cpumask changes, he can register to @@ -82,7 +82,7 @@ To unregister from that notifier: struct notifier_block *nblock); The padata cpumask change notifier notifies about changes of the usable -cpumasks, i.e. the subset of active cpus in the user supplied cpumask. +cpumasks, i.e. the subset of active CPUs in the user supplied cpumask. Padata calls the notifier chain with: @@ -92,7 +92,7 @@ Padata calls the notifier chain with: Here cpumask_change_notifier is registered notifier, notification_mask is one of PADATA_CPU_SERIAL, PADATA_CPU_PARALLEL and cpumask is a pointer -to a struct padata_cpumask that contains the new cpumask informations. +to a struct padata_cpumask that contains the new cpumask information. Actually submitting work to the padata instance requires the creation of a padata_priv structure: @@ -104,7 +104,7 @@ padata_priv structure: }; This structure will almost certainly be embedded within some larger -structure specific to the work to be done. Most its fields are private to +structure specific to the work to be done. Most of its fields are private to padata, but the structure should be zeroed at initialisation time, and the parallel() and serial() functions should be provided. Those functions will be called in the process of getting the work done as we will see diff --git a/trunk/Documentation/powerpc/dts-bindings/fsl/esdhc.txt b/trunk/Documentation/powerpc/dts-bindings/fsl/esdhc.txt index 8a0040738969..64bcb8be973c 100644 --- a/trunk/Documentation/powerpc/dts-bindings/fsl/esdhc.txt +++ b/trunk/Documentation/powerpc/dts-bindings/fsl/esdhc.txt @@ -14,6 +14,8 @@ Required properties: reports inverted write-protect state; - sdhci,1-bit-only : (optional) specifies that a controller can only handle 1-bit data transfers. + - sdhci,auto-cmd12: (optional) specifies that a controller can + only handle auto CMD12. Example: diff --git a/trunk/Documentation/sound/alsa/HD-Audio-Models.txt b/trunk/Documentation/sound/alsa/HD-Audio-Models.txt index 03771d7c5dd7..ce46fa1e643e 100644 --- a/trunk/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/trunk/Documentation/sound/alsa/HD-Audio-Models.txt @@ -83,8 +83,8 @@ ALC269 ====== basic Basic preset quanta Quanta FL1 - eeepc-p703 ASUS Eeepc P703 P900A - eeepc-p901 ASUS Eeepc P901 S101 + laptop-amic Laptops with analog-mic input + laptop-dmic Laptops with digital-mic input fujitsu FSC Amilo lifebook Fujitsu Lifebook S6420 auto auto-config reading BIOS (default) @@ -109,6 +109,8 @@ ALC662/663/272 asus-mode4 ASUS asus-mode5 ASUS asus-mode6 ASUS + asus-mode7 ASUS + asus-mode8 ASUS dell Dell with ALC272 dell-zm1 Dell ZM1 with ALC272 samsung-nc10 Samsung NC10 mini notebook @@ -295,8 +297,10 @@ Conexant 5066 ============= laptop Basic Laptop config (default) dell-laptop Dell laptops + dell-vostro Dell Vostro olpc-xo-1_5 OLPC XO 1.5 ideapad Lenovo IdeaPad U150 + thinkpad Lenovo Thinkpad STAC9200 ======== @@ -404,6 +408,7 @@ STAC92HD83* mic-ref Reference board with power management for ports dell-s14 Dell laptop hp HP laptops with (inverted) mute-LED + hp-dv7-4000 HP dv-7 4000 auto BIOS setup (default) STAC9872 @@ -416,3 +421,7 @@ Cirrus Logic CS4206/4207 mbp55 MacBook Pro 5,5 imac27 IMac 27 Inch auto BIOS setup (default) + +VIA VT17xx/VT18xx/VT20xx +======================== + auto BIOS setup (default) diff --git a/trunk/Documentation/sysctl/vm.txt b/trunk/Documentation/sysctl/vm.txt index 82b2da18c45d..b606c2c4dd37 100644 --- a/trunk/Documentation/sysctl/vm.txt +++ b/trunk/Documentation/sysctl/vm.txt @@ -511,7 +511,7 @@ information may not be desired. If this is set to non-zero, this information is shown whenever the OOM killer actually kills a memory-hogging task. -The default value is 0. +The default value is 1 (enabled). ============================================================== diff --git a/trunk/Documentation/trace/postprocess/trace-vmscan-postprocess.pl b/trunk/Documentation/trace/postprocess/trace-vmscan-postprocess.pl new file mode 100644 index 000000000000..1b55146d1c8d --- /dev/null +++ b/trunk/Documentation/trace/postprocess/trace-vmscan-postprocess.pl @@ -0,0 +1,686 @@ +#!/usr/bin/perl +# This is a POC for reading the text representation of trace output related to +# page reclaim. It makes an attempt to extract some high-level information on +# what is going on. The accuracy of the parser may vary +# +# Example usage: trace-vmscan-postprocess.pl < /sys/kernel/debug/tracing/trace_pipe +# other options +# --read-procstat If the trace lacks process info, get it from /proc +# --ignore-pid Aggregate processes of the same name together +# +# Copyright (c) IBM Corporation 2009 +# Author: Mel Gorman +use strict; +use Getopt::Long; + +# Tracepoint events +use constant MM_VMSCAN_DIRECT_RECLAIM_BEGIN => 1; +use constant MM_VMSCAN_DIRECT_RECLAIM_END => 2; +use constant MM_VMSCAN_KSWAPD_WAKE => 3; +use constant MM_VMSCAN_KSWAPD_SLEEP => 4; +use constant MM_VMSCAN_LRU_SHRINK_ACTIVE => 5; +use constant MM_VMSCAN_LRU_SHRINK_INACTIVE => 6; +use constant MM_VMSCAN_LRU_ISOLATE => 7; +use constant MM_VMSCAN_WRITEPAGE_FILE_SYNC => 8; +use constant MM_VMSCAN_WRITEPAGE_ANON_SYNC => 9; +use constant MM_VMSCAN_WRITEPAGE_FILE_ASYNC => 10; +use constant MM_VMSCAN_WRITEPAGE_ANON_ASYNC => 11; +use constant MM_VMSCAN_WRITEPAGE_ASYNC => 12; +use constant EVENT_UNKNOWN => 13; + +# Per-order events +use constant MM_VMSCAN_DIRECT_RECLAIM_BEGIN_PERORDER => 11; +use constant MM_VMSCAN_WAKEUP_KSWAPD_PERORDER => 12; +use constant MM_VMSCAN_KSWAPD_WAKE_PERORDER => 13; +use constant HIGH_KSWAPD_REWAKEUP_PERORDER => 14; + +# Constants used to track state +use constant STATE_DIRECT_BEGIN => 15; +use constant STATE_DIRECT_ORDER => 16; +use constant STATE_KSWAPD_BEGIN => 17; +use constant STATE_KSWAPD_ORDER => 18; + +# High-level events extrapolated from tracepoints +use constant HIGH_DIRECT_RECLAIM_LATENCY => 19; +use constant HIGH_KSWAPD_LATENCY => 20; +use constant HIGH_KSWAPD_REWAKEUP => 21; +use constant HIGH_NR_SCANNED => 22; +use constant HIGH_NR_TAKEN => 23; +use constant HIGH_NR_RECLAIM => 24; +use constant HIGH_NR_CONTIG_DIRTY => 25; + +my %perprocesspid; +my %perprocess; +my %last_procmap; +my $opt_ignorepid; +my $opt_read_procstat; + +my $total_wakeup_kswapd; +my ($total_direct_reclaim, $total_direct_nr_scanned); +my ($total_direct_latency, $total_kswapd_latency); +my ($total_direct_writepage_file_sync, $total_direct_writepage_file_async); +my ($total_direct_writepage_anon_sync, $total_direct_writepage_anon_async); +my ($total_kswapd_nr_scanned, $total_kswapd_wake); +my ($total_kswapd_writepage_file_sync, $total_kswapd_writepage_file_async); +my ($total_kswapd_writepage_anon_sync, $total_kswapd_writepage_anon_async); + +# Catch sigint and exit on request +my $sigint_report = 0; +my $sigint_exit = 0; +my $sigint_pending = 0; +my $sigint_received = 0; +sub sigint_handler { + my $current_time = time; + if ($current_time - 2 > $sigint_received) { + print "SIGINT received, report pending. Hit ctrl-c again to exit\n"; + $sigint_report = 1; + } else { + if (!$sigint_exit) { + print "Second SIGINT received quickly, exiting\n"; + } + $sigint_exit++; + } + + if ($sigint_exit > 3) { + print "Many SIGINTs received, exiting now without report\n"; + exit; + } + + $sigint_received = $current_time; + $sigint_pending = 1; +} +$SIG{INT} = "sigint_handler"; + +# Parse command line options +GetOptions( + 'ignore-pid' => \$opt_ignorepid, + 'read-procstat' => \$opt_read_procstat, +); + +# Defaults for dynamically discovered regex's +my $regex_direct_begin_default = 'order=([0-9]*) may_writepage=([0-9]*) gfp_flags=([A-Z_|]*)'; +my $regex_direct_end_default = 'nr_reclaimed=([0-9]*)'; +my $regex_kswapd_wake_default = 'nid=([0-9]*) order=([0-9]*)'; +my $regex_kswapd_sleep_default = 'nid=([0-9]*)'; +my $regex_wakeup_kswapd_default = 'nid=([0-9]*) zid=([0-9]*) order=([0-9]*)'; +my $regex_lru_isolate_default = 'isolate_mode=([0-9]*) order=([0-9]*) nr_requested=([0-9]*) nr_scanned=([0-9]*) nr_taken=([0-9]*) contig_taken=([0-9]*) contig_dirty=([0-9]*) contig_failed=([0-9]*)'; +my $regex_lru_shrink_inactive_default = 'lru=([A-Z_]*) nr_scanned=([0-9]*) nr_reclaimed=([0-9]*) priority=([0-9]*)'; +my $regex_lru_shrink_active_default = 'lru=([A-Z_]*) nr_scanned=([0-9]*) nr_rotated=([0-9]*) priority=([0-9]*)'; +my $regex_writepage_default = 'page=([0-9a-f]*) pfn=([0-9]*) flags=([A-Z_|]*)'; + +# Dyanically discovered regex +my $regex_direct_begin; +my $regex_direct_end; +my $regex_kswapd_wake; +my $regex_kswapd_sleep; +my $regex_wakeup_kswapd; +my $regex_lru_isolate; +my $regex_lru_shrink_inactive; +my $regex_lru_shrink_active; +my $regex_writepage; + +# Static regex used. Specified like this for readability and for use with /o +# (process_pid) (cpus ) ( time ) (tpoint ) (details) +my $regex_traceevent = '\s*([a-zA-Z0-9-]*)\s*(\[[0-9]*\])\s*([0-9.]*):\s*([a-zA-Z_]*):\s*(.*)'; +my $regex_statname = '[-0-9]*\s\((.*)\).*'; +my $regex_statppid = '[-0-9]*\s\(.*\)\s[A-Za-z]\s([0-9]*).*'; + +sub generate_traceevent_regex { + my $event = shift; + my $default = shift; + my $regex; + + # Read the event format or use the default + if (!open (FORMAT, "/sys/kernel/debug/tracing/events/$event/format")) { + print("WARNING: Event $event format string not found\n"); + return $default; + } else { + my $line; + while (!eof(FORMAT)) { + $line = ; + $line =~ s/, REC->.*//; + if ($line =~ /^print fmt:\s"(.*)".*/) { + $regex = $1; + $regex =~ s/%s/\([0-9a-zA-Z|_]*\)/g; + $regex =~ s/%p/\([0-9a-f]*\)/g; + $regex =~ s/%d/\([-0-9]*\)/g; + $regex =~ s/%ld/\([-0-9]*\)/g; + $regex =~ s/%lu/\([0-9]*\)/g; + } + } + } + + # Can't handle the print_flags stuff but in the context of this + # script, it really doesn't matter + $regex =~ s/\(REC.*\) \? __print_flags.*//; + + # Verify fields are in the right order + my $tuple; + foreach $tuple (split /\s/, $regex) { + my ($key, $value) = split(/=/, $tuple); + my $expected = shift; + if ($key ne $expected) { + print("WARNING: Format not as expected for event $event '$key' != '$expected'\n"); + $regex =~ s/$key=\((.*)\)/$key=$1/; + } + } + + if (defined shift) { + die("Fewer fields than expected in format"); + } + + return $regex; +} + +$regex_direct_begin = generate_traceevent_regex( + "vmscan/mm_vmscan_direct_reclaim_begin", + $regex_direct_begin_default, + "order", "may_writepage", + "gfp_flags"); +$regex_direct_end = generate_traceevent_regex( + "vmscan/mm_vmscan_direct_reclaim_end", + $regex_direct_end_default, + "nr_reclaimed"); +$regex_kswapd_wake = generate_traceevent_regex( + "vmscan/mm_vmscan_kswapd_wake", + $regex_kswapd_wake_default, + "nid", "order"); +$regex_kswapd_sleep = generate_traceevent_regex( + "vmscan/mm_vmscan_kswapd_sleep", + $regex_kswapd_sleep_default, + "nid"); +$regex_wakeup_kswapd = generate_traceevent_regex( + "vmscan/mm_vmscan_wakeup_kswapd", + $regex_wakeup_kswapd_default, + "nid", "zid", "order"); +$regex_lru_isolate = generate_traceevent_regex( + "vmscan/mm_vmscan_lru_isolate", + $regex_lru_isolate_default, + "isolate_mode", "order", + "nr_requested", "nr_scanned", "nr_taken", + "contig_taken", "contig_dirty", "contig_failed"); +$regex_lru_shrink_inactive = generate_traceevent_regex( + "vmscan/mm_vmscan_lru_shrink_inactive", + $regex_lru_shrink_inactive_default, + "nid", "zid", + "lru", + "nr_scanned", "nr_reclaimed", "priority"); +$regex_lru_shrink_active = generate_traceevent_regex( + "vmscan/mm_vmscan_lru_shrink_active", + $regex_lru_shrink_active_default, + "nid", "zid", + "lru", + "nr_scanned", "nr_rotated", "priority"); +$regex_writepage = generate_traceevent_regex( + "vmscan/mm_vmscan_writepage", + $regex_writepage_default, + "page", "pfn", "flags"); + +sub read_statline($) { + my $pid = $_[0]; + my $statline; + + if (open(STAT, "/proc/$pid/stat")) { + $statline = ; + close(STAT); + } + + if ($statline eq '') { + $statline = "-1 (UNKNOWN_PROCESS_NAME) R 0"; + } + + return $statline; +} + +sub guess_process_pid($$) { + my $pid = $_[0]; + my $statline = $_[1]; + + if ($pid == 0) { + return "swapper-0"; + } + + if ($statline !~ /$regex_statname/o) { + die("Failed to math stat line for process name :: $statline"); + } + return "$1-$pid"; +} + +# Convert sec.usec timestamp format +sub timestamp_to_ms($) { + my $timestamp = $_[0]; + + my ($sec, $usec) = split (/\./, $timestamp); + return ($sec * 1000) + ($usec / 1000); +} + +sub process_events { + my $traceevent; + my $process_pid; + my $cpus; + my $timestamp; + my $tracepoint; + my $details; + my $statline; + + # Read each line of the event log +EVENT_PROCESS: + while ($traceevent = ) { + if ($traceevent =~ /$regex_traceevent/o) { + $process_pid = $1; + $timestamp = $3; + $tracepoint = $4; + + $process_pid =~ /(.*)-([0-9]*)$/; + my $process = $1; + my $pid = $2; + + if ($process eq "") { + $process = $last_procmap{$pid}; + $process_pid = "$process-$pid"; + } + $last_procmap{$pid} = $process; + + if ($opt_read_procstat) { + $statline = read_statline($pid); + if ($opt_read_procstat && $process eq '') { + $process_pid = guess_process_pid($pid, $statline); + } + } + } else { + next; + } + + # Perl Switch() sucks majorly + if ($tracepoint eq "mm_vmscan_direct_reclaim_begin") { + $timestamp = timestamp_to_ms($timestamp); + $perprocesspid{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}++; + $perprocesspid{$process_pid}->{STATE_DIRECT_BEGIN} = $timestamp; + + $details = $5; + if ($details !~ /$regex_direct_begin/o) { + print "WARNING: Failed to parse mm_vmscan_direct_reclaim_begin as expected\n"; + print " $details\n"; + print " $regex_direct_begin\n"; + next; + } + my $order = $1; + $perprocesspid{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN_PERORDER}[$order]++; + $perprocesspid{$process_pid}->{STATE_DIRECT_ORDER} = $order; + } elsif ($tracepoint eq "mm_vmscan_direct_reclaim_end") { + # Count the event itself + my $index = $perprocesspid{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_END}; + $perprocesspid{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_END}++; + + # Record how long direct reclaim took this time + if (defined $perprocesspid{$process_pid}->{STATE_DIRECT_BEGIN}) { + $timestamp = timestamp_to_ms($timestamp); + my $order = $perprocesspid{$process_pid}->{STATE_DIRECT_ORDER}; + my $latency = ($timestamp - $perprocesspid{$process_pid}->{STATE_DIRECT_BEGIN}); + $perprocesspid{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index] = "$order-$latency"; + } + } elsif ($tracepoint eq "mm_vmscan_kswapd_wake") { + $details = $5; + if ($details !~ /$regex_kswapd_wake/o) { + print "WARNING: Failed to parse mm_vmscan_kswapd_wake as expected\n"; + print " $details\n"; + print " $regex_kswapd_wake\n"; + next; + } + + my $order = $2; + $perprocesspid{$process_pid}->{STATE_KSWAPD_ORDER} = $order; + if (!$perprocesspid{$process_pid}->{STATE_KSWAPD_BEGIN}) { + $timestamp = timestamp_to_ms($timestamp); + $perprocesspid{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}++; + $perprocesspid{$process_pid}->{STATE_KSWAPD_BEGIN} = $timestamp; + $perprocesspid{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE_PERORDER}[$order]++; + } else { + $perprocesspid{$process_pid}->{HIGH_KSWAPD_REWAKEUP}++; + $perprocesspid{$process_pid}->{HIGH_KSWAPD_REWAKEUP_PERORDER}[$order]++; + } + } elsif ($tracepoint eq "mm_vmscan_kswapd_sleep") { + + # Count the event itself + my $index = $perprocesspid{$process_pid}->{MM_VMSCAN_KSWAPD_SLEEP}; + $perprocesspid{$process_pid}->{MM_VMSCAN_KSWAPD_SLEEP}++; + + # Record how long kswapd was awake + $timestamp = timestamp_to_ms($timestamp); + my $order = $perprocesspid{$process_pid}->{STATE_KSWAPD_ORDER}; + my $latency = ($timestamp - $perprocesspid{$process_pid}->{STATE_KSWAPD_BEGIN}); + $perprocesspid{$process_pid}->{HIGH_KSWAPD_LATENCY}[$index] = "$order-$latency"; + $perprocesspid{$process_pid}->{STATE_KSWAPD_BEGIN} = 0; + } elsif ($tracepoint eq "mm_vmscan_wakeup_kswapd") { + $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}++; + + $details = $5; + if ($details !~ /$regex_wakeup_kswapd/o) { + print "WARNING: Failed to parse mm_vmscan_wakeup_kswapd as expected\n"; + print " $details\n"; + print " $regex_wakeup_kswapd\n"; + next; + } + my $order = $3; + $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD_PERORDER}[$order]++; + } elsif ($tracepoint eq "mm_vmscan_lru_isolate") { + $details = $5; + if ($details !~ /$regex_lru_isolate/o) { + print "WARNING: Failed to parse mm_vmscan_lru_isolate as expected\n"; + print " $details\n"; + print " $regex_lru_isolate/o\n"; + next; + } + my $nr_scanned = $4; + my $nr_contig_dirty = $7; + $perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned; + $perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty; + } elsif ($tracepoint eq "mm_vmscan_writepage") { + $details = $5; + if ($details !~ /$regex_writepage/o) { + print "WARNING: Failed to parse mm_vmscan_writepage as expected\n"; + print " $details\n"; + print " $regex_writepage\n"; + next; + } + + my $flags = $3; + my $file = 0; + my $sync_io = 0; + if ($flags =~ /RECLAIM_WB_FILE/) { + $file = 1; + } + if ($flags =~ /RECLAIM_WB_SYNC/) { + $sync_io = 1; + } + if ($sync_io) { + if ($file) { + $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC}++; + } else { + $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}++; + } + } else { + if ($file) { + $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC}++; + } else { + $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC}++; + } + } + } else { + $perprocesspid{$process_pid}->{EVENT_UNKNOWN}++; + } + + if ($sigint_pending) { + last EVENT_PROCESS; + } + } +} + +sub dump_stats { + my $hashref = shift; + my %stats = %$hashref; + + # Dump per-process stats + my $process_pid; + my $max_strlen = 0; + + # Get the maximum process name + foreach $process_pid (keys %perprocesspid) { + my $len = length($process_pid); + if ($len > $max_strlen) { + $max_strlen = $len; + } + } + $max_strlen += 2; + + # Work out latencies + printf("\n") if !$opt_ignorepid; + printf("Reclaim latencies expressed as order-latency_in_ms\n") if !$opt_ignorepid; + foreach $process_pid (keys %stats) { + + if (!$stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[0] && + !$stats{$process_pid}->{HIGH_KSWAPD_LATENCY}[0]) { + next; + } + + printf "%-" . $max_strlen . "s ", $process_pid if !$opt_ignorepid; + my $index = 0; + while (defined $stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index] || + defined $stats{$process_pid}->{HIGH_KSWAPD_LATENCY}[$index]) { + + if ($stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index]) { + printf("%s ", $stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index]) if !$opt_ignorepid; + my ($dummy, $latency) = split(/-/, $stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index]); + $total_direct_latency += $latency; + } else { + printf("%s ", $stats{$process_pid}->{HIGH_KSWAPD_LATENCY}[$index]) if !$opt_ignorepid; + my ($dummy, $latency) = split(/-/, $stats{$process_pid}->{HIGH_KSWAPD_LATENCY}[$index]); + $total_kswapd_latency += $latency; + } + $index++; + } + print "\n" if !$opt_ignorepid; + } + + # Print out process activity + printf("\n"); + printf("%-" . $max_strlen . "s %8s %10s %8s %8s %8s %8s %8s\n", "Process", "Direct", "Wokeup", "Pages", "Pages", "Pages", "Time"); + printf("%-" . $max_strlen . "s %8s %10s %8s %8s %8s %8s %8s\n", "details", "Rclms", "Kswapd", "Scanned", "Sync-IO", "ASync-IO", "Stalled"); + foreach $process_pid (keys %stats) { + + if (!$stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}) { + next; + } + + $total_direct_reclaim += $stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}; + $total_wakeup_kswapd += $stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}; + $total_direct_nr_scanned += $stats{$process_pid}->{HIGH_NR_SCANNED}; + $total_direct_writepage_file_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC}; + $total_direct_writepage_anon_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}; + $total_direct_writepage_file_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC}; + + $total_direct_writepage_anon_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC}; + + my $index = 0; + my $this_reclaim_delay = 0; + while (defined $stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index]) { + my ($dummy, $latency) = split(/-/, $stats{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$index]); + $this_reclaim_delay += $latency; + $index++; + } + + printf("%-" . $max_strlen . "s %8d %10d %8u %8u %8u %8.3f", + $process_pid, + $stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}, + $stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}, + $stats{$process_pid}->{HIGH_NR_SCANNED}, + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}, + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC}, + $this_reclaim_delay / 1000); + + if ($stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}) { + print " "; + for (my $order = 0; $order < 20; $order++) { + my $count = $stats{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN_PERORDER}[$order]; + if ($count != 0) { + print "direct-$order=$count "; + } + } + } + if ($stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}) { + print " "; + for (my $order = 0; $order < 20; $order++) { + my $count = $stats{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD_PERORDER}[$order]; + if ($count != 0) { + print "wakeup-$order=$count "; + } + } + } + if ($stats{$process_pid}->{HIGH_NR_CONTIG_DIRTY}) { + print " "; + my $count = $stats{$process_pid}->{HIGH_NR_CONTIG_DIRTY}; + if ($count != 0) { + print "contig-dirty=$count "; + } + } + + print "\n"; + } + + # Print out kswapd activity + printf("\n"); + printf("%-" . $max_strlen . "s %8s %10s %8s %8s %8s %8s\n", "Kswapd", "Kswapd", "Order", "Pages", "Pages", "Pages"); + printf("%-" . $max_strlen . "s %8s %10s %8s %8s %8s %8s\n", "Instance", "Wakeups", "Re-wakeup", "Scanned", "Sync-IO", "ASync-IO"); + foreach $process_pid (keys %stats) { + + if (!$stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}) { + next; + } + + $total_kswapd_wake += $stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}; + $total_kswapd_nr_scanned += $stats{$process_pid}->{HIGH_NR_SCANNED}; + $total_kswapd_writepage_file_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC}; + $total_kswapd_writepage_anon_sync += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}; + $total_kswapd_writepage_file_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC}; + $total_kswapd_writepage_anon_async += $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC}; + + printf("%-" . $max_strlen . "s %8d %10d %8u %8i %8u", + $process_pid, + $stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}, + $stats{$process_pid}->{HIGH_KSWAPD_REWAKEUP}, + $stats{$process_pid}->{HIGH_NR_SCANNED}, + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}, + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} + $stats{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC}); + + if ($stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}) { + print " "; + for (my $order = 0; $order < 20; $order++) { + my $count = $stats{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE_PERORDER}[$order]; + if ($count != 0) { + print "wake-$order=$count "; + } + } + } + if ($stats{$process_pid}->{HIGH_KSWAPD_REWAKEUP}) { + print " "; + for (my $order = 0; $order < 20; $order++) { + my $count = $stats{$process_pid}->{HIGH_KSWAPD_REWAKEUP_PERORDER}[$order]; + if ($count != 0) { + print "rewake-$order=$count "; + } + } + } + printf("\n"); + } + + # Print out summaries + $total_direct_latency /= 1000; + $total_kswapd_latency /= 1000; + print "\nSummary\n"; + print "Direct reclaims: $total_direct_reclaim\n"; + print "Direct reclaim pages scanned: $total_direct_nr_scanned\n"; + print "Direct reclaim write file sync I/O: $total_direct_writepage_file_sync\n"; + print "Direct reclaim write anon sync I/O: $total_direct_writepage_anon_sync\n"; + print "Direct reclaim write file async I/O: $total_direct_writepage_file_async\n"; + print "Direct reclaim write anon async I/O: $total_direct_writepage_anon_async\n"; + print "Wake kswapd requests: $total_wakeup_kswapd\n"; + printf "Time stalled direct reclaim: %-1.2f seconds\n", $total_direct_latency; + print "\n"; + print "Kswapd wakeups: $total_kswapd_wake\n"; + print "Kswapd pages scanned: $total_kswapd_nr_scanned\n"; + print "Kswapd reclaim write file sync I/O: $total_kswapd_writepage_file_sync\n"; + print "Kswapd reclaim write anon sync I/O: $total_kswapd_writepage_anon_sync\n"; + print "Kswapd reclaim write file async I/O: $total_kswapd_writepage_file_async\n"; + print "Kswapd reclaim write anon async I/O: $total_kswapd_writepage_anon_async\n"; + printf "Time kswapd awake: %-1.2f seconds\n", $total_kswapd_latency; +} + +sub aggregate_perprocesspid() { + my $process_pid; + my $process; + undef %perprocess; + + foreach $process_pid (keys %perprocesspid) { + $process = $process_pid; + $process =~ s/-([0-9])*$//; + if ($process eq '') { + $process = "NO_PROCESS_NAME"; + } + + $perprocess{$process}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN} += $perprocesspid{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN}; + $perprocess{$process}->{MM_VMSCAN_KSWAPD_WAKE} += $perprocesspid{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE}; + $perprocess{$process}->{MM_VMSCAN_WAKEUP_KSWAPD} += $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD}; + $perprocess{$process}->{HIGH_KSWAPD_REWAKEUP} += $perprocesspid{$process_pid}->{HIGH_KSWAPD_REWAKEUP}; + $perprocess{$process}->{HIGH_NR_SCANNED} += $perprocesspid{$process_pid}->{HIGH_NR_SCANNED}; + $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_SYNC}; + $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_SYNC}; + $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_FILE_ASYNC}; + $perprocess{$process}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC} += $perprocesspid{$process_pid}->{MM_VMSCAN_WRITEPAGE_ANON_ASYNC}; + + for (my $order = 0; $order < 20; $order++) { + $perprocess{$process}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN_PERORDER}[$order] += $perprocesspid{$process_pid}->{MM_VMSCAN_DIRECT_RECLAIM_BEGIN_PERORDER}[$order]; + $perprocess{$process}->{MM_VMSCAN_WAKEUP_KSWAPD_PERORDER}[$order] += $perprocesspid{$process_pid}->{MM_VMSCAN_WAKEUP_KSWAPD_PERORDER}[$order]; + $perprocess{$process}->{MM_VMSCAN_KSWAPD_WAKE_PERORDER}[$order] += $perprocesspid{$process_pid}->{MM_VMSCAN_KSWAPD_WAKE_PERORDER}[$order]; + + } + + # Aggregate direct reclaim latencies + my $wr_index = $perprocess{$process}->{MM_VMSCAN_DIRECT_RECLAIM_END}; + my $rd_index = 0; + while (defined $perprocesspid{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$rd_index]) { + $perprocess{$process}->{HIGH_DIRECT_RECLAIM_LATENCY}[$wr_index] = $perprocesspid{$process_pid}->{HIGH_DIRECT_RECLAIM_LATENCY}[$rd_index]; + $rd_index++; + $wr_index++; + } + $perprocess{$process}->{MM_VMSCAN_DIRECT_RECLAIM_END} = $wr_index; + + # Aggregate kswapd latencies + my $wr_index = $perprocess{$process}->{MM_VMSCAN_KSWAPD_SLEEP}; + my $rd_index = 0; + while (defined $perprocesspid{$process_pid}->{HIGH_KSWAPD_LATENCY}[$rd_index]) { + $perprocess{$process}->{HIGH_KSWAPD_LATENCY}[$wr_index] = $perprocesspid{$process_pid}->{HIGH_KSWAPD_LATENCY}[$rd_index]; + $rd_index++; + $wr_index++; + } + $perprocess{$process}->{MM_VMSCAN_DIRECT_RECLAIM_END} = $wr_index; + } +} + +sub report() { + if (!$opt_ignorepid) { + dump_stats(\%perprocesspid); + } else { + aggregate_perprocesspid(); + dump_stats(\%perprocess); + } +} + +# Process events or signals until neither is available +sub signal_loop() { + my $sigint_processed; + do { + $sigint_processed = 0; + process_events(); + + # Handle pending signals if any + if ($sigint_pending) { + my $current_time = time; + + if ($sigint_exit) { + print "Received exit signal\n"; + $sigint_pending = 0; + } + if ($sigint_report) { + if ($current_time >= $sigint_received + 2) { + report(); + $sigint_report = 0; + $sigint_pending = 0; + $sigint_processed = 1; + } + } + } + } while ($sigint_pending || $sigint_processed); +} + +signal_loop(); +report(); diff --git a/trunk/Documentation/usb/ehci.txt b/trunk/Documentation/usb/ehci.txt index 1536b7e75134..9dcafa7d930d 100644 --- a/trunk/Documentation/usb/ehci.txt +++ b/trunk/Documentation/usb/ehci.txt @@ -9,7 +9,7 @@ compatible with the USB 1.1 standard. It defines three transfer speeds: - "Low Speed" 1.5 Mbit/sec USB 1.1 only addressed full speed and low speed. High speed devices -can be used on USB 1.1 systems, but they slow down to USB 1.1 speeds. +can be used on USB 1.1 systems, but they slow down to USB 1.1 speeds. USB 1.1 devices may also be used on USB 2.0 systems. When plugged into an EHCI controller, they are given to a USB 1.1 "companion" diff --git a/trunk/Documentation/usb/gadget_multi.txt b/trunk/Documentation/usb/gadget_multi.txt new file mode 100644 index 000000000000..80f4ef0eb75b --- /dev/null +++ b/trunk/Documentation/usb/gadget_multi.txt @@ -0,0 +1,150 @@ + -*- org -*- + +* Overview + +The Multifunction Composite Gadget (or g_multi) is a composite gadget +that makes extensive use of the composite framework to provide +a... multifunction gadget. + +In it's standard configuration it provides a single USB configuration +with RNDIS[1] (that is Ethernet), USB CDC[2] ACM (that is serial) and +USB Mass Storage functions. + +A CDC ECM (Ethernet) function may be turned on via a Kconfig option +and RNDIS can be turned off. If they are both enabled the gadget will +have two configurations -- one with RNDIS and another with CDC ECM[3]. + +Please not that if you use non-standard configuration (that is enable +CDC ECM) you may need to change vendor and/or product ID. + +* Host drivers + +To make use of the gadget one needs to make it work on host side -- +without that there's no hope of achieving anything with the gadget. +As one might expect, things one need to do very from system to system. + +** Linux host drivers + +Since the gadget uses standard composite framework and appears as such +to Linux host it does not need any additional drivers on Linux host +side. All the functions are handled by respective drivers developed +for them. + +This is also true for two configuration set-up with RNDIS +configuration being the first one. Linux host will use the second +configuration with CDC ECM which should work better under Linux. + +** Windows host drivers + +For the gadget two work under Windows two conditions have to be met: + +*** Detecting as composite gadget + +First of all, Windows need to detect the gadget as an USB composite +gadget which on its own have some conditions[4]. If they are met, +Windows lets USB Generic Parent Driver[5] handle the device which then +tries to much drivers for each individual interface (sort of, don't +get into too many details). + +The good news is: you do not have to worry about most of the +conditions! + +The only thing to worry is that the gadget has to have a single +configuration so a dual RNDIS and CDC ECM gadget won't work unless you +create a proper INF -- and of course, if you do submit it! + +*** Installing drivers for each function + +The other, trickier thing is making Windows install drivers for each +individual function. + +For mass storage it is trivial since Windows detect it's an interface +implementing USB Mass Storage class and selects appropriate driver. + +Things are harder with RDNIS and CDC ACM. + +**** RNDIS + +To make Windows select RNDIS drivers for the first function in the +gadget, one needs to use the [[file:linux.inf]] file provided with this +document. It "attaches" Window's RNDIS driver to the first interface +of the gadget. + +Please note, that while testing we encountered some issues[6] when +RNDIS was not the first interface. You do not need to worry abut it +unless you are trying to develop your own gadget in which case watch +out for this bug. + +**** CDC ACM + +Similarly, [[file:linux-cdc-acm.inf]] is provided for CDC ACM. + +**** Customising the gadget + +If you intend to hack the g_multi gadget be advised that rearranging +functions will obviously change interface numbers for each of the +functionality. As an effect provided INFs won't work since they have +interface numbers hard-coded in them (it's not hard to change those +though[7]). + +This also means, that after experimenting with g_multi and changing +provided functions one should change gadget's vendor and/or product ID +so there will be no collision with other customised gadgets or the +original gadget. + +Failing to comply may cause brain damage after wondering for hours why +things don't work as intended before realising Windows have cached +some drivers information (changing USB port may sometimes help plus +you might try using USBDeview[8] to remove the phantom device). + +**** INF testing + +Provided INF files have been tested on Windows XP SP3, Windows Vista +and Windows 7, all 32-bit versions. It should work on 64-bit versions +as well. It most likely won't work on Windows prior to Windows XP +SP2. + +** Other systems + +At this moment, drivers for any other systems have not been tested. +Knowing how MacOS is based on BSD and BSD is an Open Source it is +believed that it should (read: "I have no idea whether it will") work +out-of-the-box. + +For more exotic systems I have even less to say... + +Any testing and drivers *are* *welcome*! + +* Authors + +This document has been written by Michal Nazarewicz +([[mailto:mina86@mina86.com]]). INF files have been hacked with +support of Marek Szyprowski ([[mailto:m.szyprowski@samsung.com]]) and +Xiaofan Chen ([[mailto:xiaofanc@gmail.com]]) basing on the MS RNDIS +template[9], Microchip's CDC ACM INF file and David Brownell's +([[mailto:dbrownell@users.sourceforge.net]]) original INF files. + +* Footnotes + +[1] Remote Network Driver Interface Specification, +[[http://msdn.microsoft.com/en-us/library/ee484414.aspx]]. + +[2] Communications Device Class Abstract Control Model, spec for this +and other USB classes can be found at +[[http://www.usb.org/developers/devclass_docs/]]. + +[3] CDC Ethernet Control Model. + +[4] [[http://msdn.microsoft.com/en-us/library/ff537109(v=VS.85).aspx]] + +[5] [[http://msdn.microsoft.com/en-us/library/ff539234(v=VS.85).aspx]] + +[6] To put it in some other nice words, Windows failed to respond to +any user input. + +[7] You may find [[http://www.cygnal.org/ubb/Forum9/HTML/001050.html]] +useful. + +[8] http://www.nirsoft.net/utils/usb_devices_view.html + +[9] [[http://msdn.microsoft.com/en-us/library/ff570620.aspx]] diff --git a/trunk/Documentation/usb/gadget_serial.txt b/trunk/Documentation/usb/gadget_serial.txt index eac7df94d8e3..61e67f6a20a0 100644 --- a/trunk/Documentation/usb/gadget_serial.txt +++ b/trunk/Documentation/usb/gadget_serial.txt @@ -151,88 +151,23 @@ instructions below to install the host side driver. Installing the Windows Host ACM Driver -------------------------------------- -To use the Windows ACM driver you must have the files "gserial.inf" -and "usbser.sys" together in a folder on the Windows machine. - -The "gserial.inf" file is given here. - --------------------- CUT HERE -------------------- -[Version] -Signature="$Windows NT$" -Class=Ports -ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} -Provider=%LINUX% -DriverVer=08/17/2004,0.0.2.0 -; Copyright (C) 2004 Al Borchers (alborchers@steinerpoint.com) - -[Manufacturer] -%LINUX%=GSerialDeviceList - -[GSerialDeviceList] -%GSERIAL%=GSerialInstall, USB\VID_0525&PID_A4A7 - -[DestinationDirs] -DefaultDestDir=10,System32\Drivers - -[GSerialInstall] -CopyFiles=GSerialCopyFiles -AddReg=GSerialAddReg - -[GSerialCopyFiles] -usbser.sys - -[GSerialAddReg] -HKR,,DevLoader,,*ntkern -HKR,,NTMPDriver,,usbser.sys -HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" - -[GSerialInstall.Services] -AddService = usbser,0x0002,GSerialService - -[GSerialService] -DisplayName = %GSERIAL_DISPLAY_NAME% -ServiceType = 1 ; SERVICE_KERNEL_DRIVER -StartType = 3 ; SERVICE_DEMAND_START -ErrorControl = 1 ; SERVICE_ERROR_NORMAL -ServiceBinary = %10%\System32\Drivers\usbser.sys -LoadOrderGroup = Base - -[Strings] -LINUX = "Linux" -GSERIAL = "Gadget Serial" -GSERIAL_DISPLAY_NAME = "USB Gadget Serial Driver" --------------------- CUT HERE -------------------- - -The "usbser.sys" file comes with various versions of Windows. -For example, it can be found on Windows XP typically in - - C:\WINDOWS\Driver Cache\i386\driver.cab - -Or it can be found on the Windows 98SE CD in the "win98" folder -in the "DRIVER11.CAB" through "DRIVER20.CAB" cab files. You will -need the DOS "expand" program, the Cygwin "cabextract" program, or -a similar program to unpack these cab files and extract "usbser.sys". - -For example, to extract "usbser.sys" into the current directory -on Windows XP, open a DOS window and run a command like - - expand C:\WINDOWS\Driver~1\i386\driver.cab -F:usbser.sys . - -(Thanks to Nishant Kamat for pointing out this DOS command.) +To use the Windows ACM driver you must have the "linux-cdc-acm.inf" +file (provided along this document) which supports all recent versions +of Windows. When the gadget serial driver is loaded and the USB device connected to the Windows host with a USB cable, Windows should recognize the gadget serial device and ask for a driver. Tell Windows to find the -driver in the folder that contains "gserial.inf" and "usbser.sys". +driver in the folder that contains the "linux-cdc-acm.inf" file. For example, on Windows XP, when the gadget serial device is first plugged in, the "Found New Hardware Wizard" starts up. Select -"Install from a list or specific location (Advanced)", then on -the next screen select "Include this location in the search" and -enter the path or browse to the folder containing "gserial.inf" and -"usbser.sys". Windows will complain that the Gadget Serial driver -has not passed Windows Logo testing, but select "Continue anyway" -and finish the driver installation. +"Install from a list or specific location (Advanced)", then on the +next screen select "Include this location in the search" and enter the +path or browse to the folder containing the "linux-cdc-acm.inf" file. +Windows will complain that the Gadget Serial driver has not passed +Windows Logo testing, but select "Continue anyway" and finish the +driver installation. On Windows XP, in the "Device Manager" (under "Control Panel", "System", "Hardware") expand the "Ports (COM & LPT)" entry and you @@ -345,5 +280,3 @@ you should be able to send data back and forth between the gadget side and host side systems. Anything you type on the terminal window on the gadget side should appear in the terminal window on the host side and vice versa. - - diff --git a/trunk/Documentation/usb/hotplug.txt b/trunk/Documentation/usb/hotplug.txt index f53170665f37..4c945716a660 100644 --- a/trunk/Documentation/usb/hotplug.txt +++ b/trunk/Documentation/usb/hotplug.txt @@ -10,7 +10,7 @@ immediately usable. That means the system must do many things, including: - Bind a driver to that device. Bus frameworks do that using a device driver's probe() routine. - + - Tell other subsystems to configure the new device. Print queues may need to be enabled, networks brought up, disk partitions mounted, and so on. In some cases these will @@ -84,7 +84,7 @@ USB MODUTILS SUPPORT Current versions of module-init-tools will create a "modules.usbmap" file which contains the entries from each driver's MODULE_DEVICE_TABLE. Such files can be used by various user mode policy agents to make sure all the -right driver modules get loaded, either at boot time or later. +right driver modules get loaded, either at boot time or later. See for full information about such table entries; or look at existing drivers. Each table entry describes one or more criteria to diff --git a/trunk/Documentation/usb/linux-cdc-acm.inf b/trunk/Documentation/usb/linux-cdc-acm.inf new file mode 100644 index 000000000000..612e7220fb29 --- /dev/null +++ b/trunk/Documentation/usb/linux-cdc-acm.inf @@ -0,0 +1,107 @@ +; Windows USB CDC ACM Setup File + +; Based on INF template which was: +; Copyright (c) 2000 Microsoft Corporation +; Copyright (c) 2007 Microchip Technology Inc. +; likely to be covered by the MLPL as found at: +; . +; For use only on Windows operating systems. + +[Version] +Signature="$Windows NT$" +Class=Ports +ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} +Provider=%Linux% +DriverVer=11/15/2007,5.1.2600.0 + +[Manufacturer] +%Linux%=DeviceList, NTamd64 + +[DestinationDirs] +DefaultDestDir=12 + + +;------------------------------------------------------------------------------ +; Windows 2000/XP/Vista-32bit Sections +;------------------------------------------------------------------------------ + +[DriverInstall.nt] +include=mdmcpq.inf +CopyFiles=DriverCopyFiles.nt +AddReg=DriverInstall.nt.AddReg + +[DriverCopyFiles.nt] +usbser.sys,,,0x20 + +[DriverInstall.nt.AddReg] +HKR,,DevLoader,,*ntkern +HKR,,NTMPDriver,,USBSER.sys +HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" + +[DriverInstall.nt.Services] +AddService=usbser, 0x00000002, DriverService.nt + +[DriverService.nt] +DisplayName=%SERVICE% +ServiceType=1 +StartType=3 +ErrorControl=1 +ServiceBinary=%12%\USBSER.sys + +;------------------------------------------------------------------------------ +; Vista-64bit Sections +;------------------------------------------------------------------------------ + +[DriverInstall.NTamd64] +include=mdmcpq.inf +CopyFiles=DriverCopyFiles.NTamd64 +AddReg=DriverInstall.NTamd64.AddReg + +[DriverCopyFiles.NTamd64] +USBSER.sys,,,0x20 + +[DriverInstall.NTamd64.AddReg] +HKR,,DevLoader,,*ntkern +HKR,,NTMPDriver,,USBSER.sys +HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" + +[DriverInstall.NTamd64.Services] +AddService=usbser, 0x00000002, DriverService.NTamd64 + +[DriverService.NTamd64] +DisplayName=%SERVICE% +ServiceType=1 +StartType=3 +ErrorControl=1 +ServiceBinary=%12%\USBSER.sys + + +;------------------------------------------------------------------------------ +; Vendor and Product ID Definitions +;------------------------------------------------------------------------------ +; When developing your USB device, the VID and PID used in the PC side +; application program and the firmware on the microcontroller must match. +; Modify the below line to use your VID and PID. Use the format as shown +; below. +; Note: One INF file can be used for multiple devices with different +; VID and PIDs. For each supported device, append +; ",USB\VID_xxxx&PID_yyyy" to the end of the line. +;------------------------------------------------------------------------------ +[SourceDisksFiles] +[SourceDisksNames] +[DeviceList] +%DESCRIPTION%=DriverInstall, USB\VID_0525&PID_A4A7, USB\VID_0525&PID_A4AB&MI_02 + +[DeviceList.NTamd64] +%DESCRIPTION%=DriverInstall, USB\VID_0525&PID_A4A7, USB\VID_0525&PID_A4AB&MI_02 + + +;------------------------------------------------------------------------------ +; String Definitions +;------------------------------------------------------------------------------ +;Modify these strings to customize your device +;------------------------------------------------------------------------------ +[Strings] +Linux = "Linux Developer Community" +DESCRIPTION = "Gadget Serial" +SERVICE = "USB RS-232 Emulation Driver" diff --git a/trunk/Documentation/usb/linux.inf b/trunk/Documentation/usb/linux.inf index af71d87d9e94..4dee95851224 100644 --- a/trunk/Documentation/usb/linux.inf +++ b/trunk/Documentation/usb/linux.inf @@ -1,200 +1,66 @@ -; MS-Windows driver config matching some basic modes of the -; Linux-USB Ethernet/RNDIS gadget firmware: -; -; - RNDIS plus CDC Ethernet ... this may be familiar as a DOCSIS -; cable modem profile, and supports most non-Microsoft USB hosts -; -; - RNDIS plus CDC Subset ... used by hardware that incapable of -; full CDC Ethernet support. -; -; Microsoft only directly supports RNDIS drivers, and bundled them into XP. -; The Microsoft "Remote NDIS USB Driver Kit" is currently found at: -; http://www.microsoft.com/whdc/device/network/ndis/rmndis.mspx - +; Based on template INF file found at +; +; which was: +; Copyright (c) Microsoft Corporation +; and released under the MLPL as found at: +; . +; For use only on Windows operating systems. [Version] -Signature = "$CHICAGO$" +Signature = "$Windows NT$" Class = Net ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318} Provider = %Linux% -Compatible = 1 -MillenniumPreferred = .ME -DriverVer = 03/30/2004,0.0.0.0 -; catalog file would be used by WHQL -;CatalogFile = Linux.cat +DriverVer = 06/21/2006,6.0.6000.16384 [Manufacturer] -%Linux% = LinuxDevices,NT.5.1 +%Linux% = LinuxDevices,NTx86,NTamd64,NTia64 + +; Decoration for x86 architecture +[LinuxDevices.NTx86] +%LinuxDevice% = RNDIS.NT.5.1, USB\VID_0525&PID_a4a2, USB\VID_0525&PID_a4ab&MI_00 -[LinuxDevices] -; NetChip IDs, used by both firmware modes -%LinuxDevice% = RNDIS, USB\VID_0525&PID_a4a2 +; Decoration for x64 architecture +[LinuxDevices.NTamd64] +%LinuxDevice% = RNDIS.NT.5.1, USB\VID_0525&PID_a4a2, USB\VID_0525&PID_a4ab&MI_00 -[LinuxDevices.NT.5.1] -%LinuxDevice% = RNDIS.NT.5.1, USB\VID_0525&PID_a4a2 +; Decoration for ia64 architecture +[LinuxDevices.NTia64] +%LinuxDevice% = RNDIS.NT.5.1, USB\VID_0525&PID_a4a2, USB\VID_0525&PID_a4ab&MI_00 +;@@@ This is the common setting for setup [ControlFlags] ExcludeFromSelect=* -; Windows 98, Windows 98 Second Edition specific sections -------- - -[RNDIS] -DeviceID = usb8023 -MaxInstance = 512 -DriverVer = 03/30/2004,0.0.0.0 -AddReg = RNDIS_AddReg_98, RNDIS_AddReg_Common - -[RNDIS_AddReg_98] -HKR, , DevLoader, 0, *ndis -HKR, , DeviceVxDs, 0, usb8023.sys -HKR, NDIS, LogDriverName, 0, "usb8023" -HKR, NDIS, MajorNdisVersion, 1, 5 -HKR, NDIS, MinorNdisVersion, 1, 0 -HKR, Ndi\Interfaces, DefUpper, 0, "ndis3,ndis4,ndis5" -HKR, Ndi\Interfaces, DefLower, 0, "ethernet" -HKR, Ndi\Interfaces, UpperRange, 0, "ndis3,ndis4,ndis5" -HKR, Ndi\Interfaces, LowerRange, 0, "ethernet" -HKR, Ndi\Install, ndis3, 0, "RNDIS_Install_98" -HKR, Ndi\Install, ndis4, 0, "RNDIS_Install_98" -HKR, Ndi\Install, ndis5, 0, "RNDIS_Install_98" -HKR, Ndi, DeviceId, 0, "USB\VID_0525&PID_a4a2" - -[RNDIS_Install_98] -CopyFiles=RNDIS_CopyFiles_98 - -[RNDIS_CopyFiles_98] -usb8023.sys, usb8023w.sys, , 0 -rndismp.sys, rndismpw.sys, , 0 - -; Windows Millennium Edition specific sections -------------------- - -[RNDIS.ME] -DeviceID = usb8023 -MaxInstance = 512 -DriverVer = 03/30/2004,0.0.0.0 -AddReg = RNDIS_AddReg_ME, RNDIS_AddReg_Common -Characteristics = 0x84 ; NCF_PHYSICAL + NCF_HAS_UI -BusType = 15 - -[RNDIS_AddReg_ME] -HKR, , DevLoader, 0, *ndis -HKR, , DeviceVxDs, 0, usb8023.sys -HKR, NDIS, LogDriverName, 0, "usb8023" -HKR, NDIS, MajorNdisVersion, 1, 5 -HKR, NDIS, MinorNdisVersion, 1, 0 -HKR, Ndi\Interfaces, DefUpper, 0, "ndis3,ndis4,ndis5" -HKR, Ndi\Interfaces, DefLower, 0, "ethernet" -HKR, Ndi\Interfaces, UpperRange, 0, "ndis3,ndis4,ndis5" -HKR, Ndi\Interfaces, LowerRange, 0, "ethernet" -HKR, Ndi\Install, ndis3, 0, "RNDIS_Install_ME" -HKR, Ndi\Install, ndis4, 0, "RNDIS_Install_ME" -HKR, Ndi\Install, ndis5, 0, "RNDIS_Install_ME" -HKR, Ndi, DeviceId, 0, "USB\VID_0525&PID_a4a2" - -[RNDIS_Install_ME] -CopyFiles=RNDIS_CopyFiles_ME - -[RNDIS_CopyFiles_ME] -usb8023.sys, usb8023m.sys, , 0 -rndismp.sys, rndismpm.sys, , 0 - -; Windows 2000 specific sections --------------------------------- - -[RNDIS.NT] -Characteristics = 0x84 ; NCF_PHYSICAL + NCF_HAS_UI -BusType = 15 -DriverVer = 03/30/2004,0.0.0.0 -AddReg = RNDIS_AddReg_NT, RNDIS_AddReg_Common -CopyFiles = RNDIS_CopyFiles_NT - -[RNDIS.NT.Services] -AddService = USB_RNDIS, 2, RNDIS_ServiceInst_NT, RNDIS_EventLog - -[RNDIS_CopyFiles_NT] -; no rename of files on Windows 2000, use the 'k' names as is -usb8023k.sys, , , 0 -rndismpk.sys, , , 0 - -[RNDIS_ServiceInst_NT] -DisplayName = %ServiceDisplayName% -ServiceType = 1 -StartType = 3 -ErrorControl = 1 -ServiceBinary = %12%\usb8023k.sys -LoadOrderGroup = NDIS -AddReg = RNDIS_WMI_AddReg_NT - -[RNDIS_WMI_AddReg_NT] -HKR, , MofImagePath, 0x00020000, "System32\drivers\rndismpk.sys" - -; Windows XP specific sections ----------------------------------- - +; DDInstall section +; References the in-build Netrndis.inf [RNDIS.NT.5.1] -Characteristics = 0x84 ; NCF_PHYSICAL + NCF_HAS_UI -BusType = 15 -DriverVer = 03/30/2004,0.0.0.0 -AddReg = RNDIS_AddReg_NT, RNDIS_AddReg_Common -; no copyfiles - the files are already in place - +Characteristics = 0x84 ; NCF_PHYSICAL + NCF_HAS_UI +BusType = 15 +; NEVER REMOVE THE FOLLOWING REFERENCE FOR NETRNDIS.INF +include = netrndis.inf +needs = Usb_Rndis.ndi +AddReg = Rndis_AddReg_Vista + +; DDInstal.Services section [RNDIS.NT.5.1.Services] -AddService = USB_RNDIS, 2, RNDIS_ServiceInst_51, RNDIS_EventLog - -[RNDIS_ServiceInst_51] -DisplayName = %ServiceDisplayName% -ServiceType = 1 -StartType = 3 -ErrorControl = 1 -ServiceBinary = %12%\usb8023.sys -LoadOrderGroup = NDIS -AddReg = RNDIS_WMI_AddReg_51 - -[RNDIS_WMI_AddReg_51] -HKR, , MofImagePath, 0x00020000, "System32\drivers\rndismp.sys" - -; Windows 2000 and Windows XP common sections -------------------- - -[RNDIS_AddReg_NT] -HKR, Ndi, Service, 0, "USB_RNDIS" -HKR, Ndi\Interfaces, UpperRange, 0, "ndis5" -HKR, Ndi\Interfaces, LowerRange, 0, "ethernet" - -[RNDIS_EventLog] -AddReg = RNDIS_EventLog_AddReg - -[RNDIS_EventLog_AddReg] -HKR, , EventMessageFile, 0x00020000, "%%SystemRoot%%\System32\netevent.dll" -HKR, , TypesSupported, 0x00010001, 7 - -; Common Sections ------------------------------------------------- - -[RNDIS_AddReg_Common] -HKR, NDI\params\NetworkAddress, ParamDesc, 0, %NetworkAddress% -HKR, NDI\params\NetworkAddress, type, 0, "edit" -HKR, NDI\params\NetworkAddress, LimitText, 0, "12" -HKR, NDI\params\NetworkAddress, UpperCase, 0, "1" -HKR, NDI\params\NetworkAddress, default, 0, " " -HKR, NDI\params\NetworkAddress, optional, 0, "1" - -[SourceDisksNames] -1=%SourceDisk%,,1 - -[SourceDisksFiles] -usb8023m.sys=1 -rndismpm.sys=1 -usb8023w.sys=1 -rndismpw.sys=1 -usb8023k.sys=1 -rndismpk.sys=1 - -[DestinationDirs] -RNDIS_CopyFiles_98 = 10, system32/drivers -RNDIS_CopyFiles_ME = 10, system32/drivers -RNDIS_CopyFiles_NT = 12 +include = netrndis.inf +needs = Usb_Rndis.ndi.Services + +; Optional registry settings. You can modify as needed. +[RNDIS_AddReg_Vista] +HKR, NDI\params\VistaProperty, ParamDesc, 0, %Vista_Property% +HKR, NDI\params\VistaProperty, type, 0, "edit" +HKR, NDI\params\VistaProperty, LimitText, 0, "12" +HKR, NDI\params\VistaProperty, UpperCase, 0, "1" +HKR, NDI\params\VistaProperty, default, 0, " " +HKR, NDI\params\VistaProperty, optional, 0, "1" + +; No sys copyfiles - the sys files are already in-build +; (part of the operating system). +; We do not support XP SP1-, 2003 SP1-, ME, 9x. [Strings] -ServiceDisplayName = "USB Remote NDIS Network Device Driver" -NetworkAddress = "Network Address" Linux = "Linux Developer Community" LinuxDevice = "Linux USB Ethernet/RNDIS Gadget" -SourceDisk = "Ethernet/RNDIS Gadget Driver Install Disk" - +Vista_Property = "Optional Vista Property" diff --git a/trunk/Documentation/video4linux/v4l2-controls.txt b/trunk/Documentation/video4linux/v4l2-controls.txt new file mode 100644 index 000000000000..8773778d23fc --- /dev/null +++ b/trunk/Documentation/video4linux/v4l2-controls.txt @@ -0,0 +1,648 @@ +Introduction +============ + +The V4L2 control API seems simple enough, but quickly becomes very hard to +implement correctly in drivers. But much of the code needed to handle controls +is actually not driver specific and can be moved to the V4L core framework. + +After all, the only part that a driver developer is interested in is: + +1) How do I add a control? +2) How do I set the control's value? (i.e. s_ctrl) + +And occasionally: + +3) How do I get the control's value? (i.e. g_volatile_ctrl) +4) How do I validate the user's proposed control value? (i.e. try_ctrl) + +All the rest is something that can be done centrally. + +The control framework was created in order to implement all the rules of the +V4L2 specification with respect to controls in a central place. And to make +life as easy as possible for the driver developer. + +Note that the control framework relies on the presence of a struct v4l2_device +for V4L2 drivers and struct v4l2_subdev for sub-device drivers. + + +Objects in the framework +======================== + +There are two main objects: + +The v4l2_ctrl object describes the control properties and keeps track of the +control's value (both the current value and the proposed new value). + +v4l2_ctrl_handler is the object that keeps track of controls. It maintains a +list of v4l2_ctrl objects that it owns and another list of references to +controls, possibly to controls owned by other handlers. + + +Basic usage for V4L2 and sub-device drivers +=========================================== + +1) Prepare the driver: + +1.1) Add the handler to your driver's top-level struct: + + struct foo_dev { + ... + struct v4l2_ctrl_handler ctrl_handler; + ... + }; + + struct foo_dev *foo; + +1.2) Initialize the handler: + + v4l2_ctrl_handler_init(&foo->ctrl_handler, nr_of_controls); + + The second argument is a hint telling the function how many controls this + handler is expected to handle. It will allocate a hashtable based on this + information. It is a hint only. + +1.3) Hook the control handler into the driver: + +1.3.1) For V4L2 drivers do this: + + struct foo_dev { + ... + struct v4l2_device v4l2_dev; + ... + struct v4l2_ctrl_handler ctrl_handler; + ... + }; + + foo->v4l2_dev.ctrl_handler = &foo->ctrl_handler; + + Where foo->v4l2_dev is of type struct v4l2_device. + + Finally, remove all control functions from your v4l2_ioctl_ops: + vidioc_queryctrl, vidioc_querymenu, vidioc_g_ctrl, vidioc_s_ctrl, + vidioc_g_ext_ctrls, vidioc_try_ext_ctrls and vidioc_s_ext_ctrls. + Those are now no longer needed. + +1.3.2) For sub-device drivers do this: + + struct foo_dev { + ... + struct v4l2_subdev sd; + ... + struct v4l2_ctrl_handler ctrl_handler; + ... + }; + + foo->sd.ctrl_handler = &foo->ctrl_handler; + + Where foo->sd is of type struct v4l2_subdev. + + And set all core control ops in your struct v4l2_subdev_core_ops to these + helpers: + + .queryctrl = v4l2_subdev_queryctrl, + .querymenu = v4l2_subdev_querymenu, + .g_ctrl = v4l2_subdev_g_ctrl, + .s_ctrl = v4l2_subdev_s_ctrl, + .g_ext_ctrls = v4l2_subdev_g_ext_ctrls, + .try_ext_ctrls = v4l2_subdev_try_ext_ctrls, + .s_ext_ctrls = v4l2_subdev_s_ext_ctrls, + + Note: this is a temporary solution only. Once all V4L2 drivers that depend + on subdev drivers are converted to the control framework these helpers will + no longer be needed. + +1.4) Clean up the handler at the end: + + v4l2_ctrl_handler_free(&foo->ctrl_handler); + + +2) Add controls: + +You add non-menu controls by calling v4l2_ctrl_new_std: + + struct v4l2_ctrl *v4l2_ctrl_new_std(struct v4l2_ctrl_handler *hdl, + const struct v4l2_ctrl_ops *ops, + u32 id, s32 min, s32 max, u32 step, s32 def); + +Menu controls are added by calling v4l2_ctrl_new_std_menu: + + struct v4l2_ctrl *v4l2_ctrl_new_std_menu(struct v4l2_ctrl_handler *hdl, + const struct v4l2_ctrl_ops *ops, + u32 id, s32 max, s32 skip_mask, s32 def); + +These functions are typically called right after the v4l2_ctrl_handler_init: + + v4l2_ctrl_handler_init(&foo->ctrl_handler, nr_of_controls); + v4l2_ctrl_new_std(&foo->ctrl_handler, &foo_ctrl_ops, + V4L2_CID_BRIGHTNESS, 0, 255, 1, 128); + v4l2_ctrl_new_std(&foo->ctrl_handler, &foo_ctrl_ops, + V4L2_CID_CONTRAST, 0, 255, 1, 128); + v4l2_ctrl_new_std_menu(&foo->ctrl_handler, &foo_ctrl_ops, + V4L2_CID_POWER_LINE_FREQUENCY, + V4L2_CID_POWER_LINE_FREQUENCY_60HZ, 0, + V4L2_CID_POWER_LINE_FREQUENCY_DISABLED); + ... + if (foo->ctrl_handler.error) { + int err = foo->ctrl_handler.error; + + v4l2_ctrl_handler_free(&foo->ctrl_handler); + return err; + } + +The v4l2_ctrl_new_std function returns the v4l2_ctrl pointer to the new +control, but if you do not need to access the pointer outside the control ops, +then there is no need to store it. + +The v4l2_ctrl_new_std function will fill in most fields based on the control +ID except for the min, max, step and default values. These are passed in the +last four arguments. These values are driver specific while control attributes +like type, name, flags are all global. The control's current value will be set +to the default value. + +The v4l2_ctrl_new_std_menu function is very similar but it is used for menu +controls. There is no min argument since that is always 0 for menu controls, +and instead of a step there is a skip_mask argument: if bit X is 1, then menu +item X is skipped. + +Note that if something fails, the function will return NULL or an error and +set ctrl_handler->error to the error code. If ctrl_handler->error was already +set, then it will just return and do nothing. This is also true for +v4l2_ctrl_handler_init if it cannot allocate the internal data structure. + +This makes it easy to init the handler and just add all controls and only check +the error code at the end. Saves a lot of repetitive error checking. + +It is recommended to add controls in ascending control ID order: it will be +a bit faster that way. + +3) Optionally force initial control setup: + + v4l2_ctrl_handler_setup(&foo->ctrl_handler); + +This will call s_ctrl for all controls unconditionally. Effectively this +initializes the hardware to the default control values. It is recommended +that you do this as this ensures that both the internal data structures and +the hardware are in sync. + +4) Finally: implement the v4l2_ctrl_ops + + static const struct v4l2_ctrl_ops foo_ctrl_ops = { + .s_ctrl = foo_s_ctrl, + }; + +Usually all you need is s_ctrl: + + static int foo_s_ctrl(struct v4l2_ctrl *ctrl) + { + struct foo *state = container_of(ctrl->handler, struct foo, ctrl_handler); + + switch (ctrl->id) { + case V4L2_CID_BRIGHTNESS: + write_reg(0x123, ctrl->val); + break; + case V4L2_CID_CONTRAST: + write_reg(0x456, ctrl->val); + break; + } + return 0; + } + +The control ops are called with the v4l2_ctrl pointer as argument. +The new control value has already been validated, so all you need to do is +to actually update the hardware registers. + +You're done! And this is sufficient for most of the drivers we have. No need +to do any validation of control values, or implement QUERYCTRL/QUERYMENU. And +G/S_CTRL as well as G/TRY/S_EXT_CTRLS are automatically supported. + + +============================================================================== + +The remainder of this document deals with more advanced topics and scenarios. +In practice the basic usage as described above is sufficient for most drivers. + +=============================================================================== + + +Inheriting Controls +=================== + +When a sub-device is registered with a V4L2 driver by calling +v4l2_device_register_subdev() and the ctrl_handler fields of both v4l2_subdev +and v4l2_device are set, then the controls of the subdev will become +automatically available in the V4L2 driver as well. If the subdev driver +contains controls that already exist in the V4L2 driver, then those will be +skipped (so a V4L2 driver can always override a subdev control). + +What happens here is that v4l2_device_register_subdev() calls +v4l2_ctrl_add_handler() adding the controls of the subdev to the controls +of v4l2_device. + + +Accessing Control Values +======================== + +The v4l2_ctrl struct contains these two unions: + + /* The current control value. */ + union { + s32 val; + s64 val64; + char *string; + } cur; + + /* The new control value. */ + union { + s32 val; + s64 val64; + char *string; + }; + +Within the control ops you can freely use these. The val and val64 speak for +themselves. The string pointers point to character buffers of length +ctrl->maximum + 1, and are always 0-terminated. + +In most cases 'cur' contains the current cached control value. When you create +a new control this value is made identical to the default value. After calling +v4l2_ctrl_handler_setup() this value is passed to the hardware. It is generally +a good idea to call this function. + +Whenever a new value is set that new value is automatically cached. This means +that most drivers do not need to implement the g_volatile_ctrl() op. The +exception is for controls that return a volatile register such as a signal +strength read-out that changes continuously. In that case you will need to +implement g_volatile_ctrl like this: + + static int foo_g_volatile_ctrl(struct v4l2_ctrl *ctrl) + { + switch (ctrl->id) { + case V4L2_CID_BRIGHTNESS: + ctrl->cur.val = read_reg(0x123); + break; + } + } + +The 'new value' union is not used in g_volatile_ctrl. In general controls +that need to implement g_volatile_ctrl are read-only controls. + +To mark a control as volatile you have to set the is_volatile flag: + + ctrl = v4l2_ctrl_new_std(&sd->ctrl_handler, ...); + if (ctrl) + ctrl->is_volatile = 1; + +For try/s_ctrl the new values (i.e. as passed by the user) are filled in and +you can modify them in try_ctrl or set them in s_ctrl. The 'cur' union +contains the current value, which you can use (but not change!) as well. + +If s_ctrl returns 0 (OK), then the control framework will copy the new final +values to the 'cur' union. + +While in g_volatile/s/try_ctrl you can access the value of all controls owned +by the same handler since the handler's lock is held. If you need to access +the value of controls owned by other handlers, then you have to be very careful +not to introduce deadlocks. + +Outside of the control ops you have to go through to helper functions to get +or set a single control value safely in your driver: + + s32 v4l2_ctrl_g_ctrl(struct v4l2_ctrl *ctrl); + int v4l2_ctrl_s_ctrl(struct v4l2_ctrl *ctrl, s32 val); + +These functions go through the control framework just as VIDIOC_G/S_CTRL ioctls +do. Don't use these inside the control ops g_volatile/s/try_ctrl, though, that +will result in a deadlock since these helpers lock the handler as well. + +You can also take the handler lock yourself: + + mutex_lock(&state->ctrl_handler.lock); + printk(KERN_INFO "String value is '%s'\n", ctrl1->cur.string); + printk(KERN_INFO "Integer value is '%s'\n", ctrl2->cur.val); + mutex_unlock(&state->ctrl_handler.lock); + + +Menu Controls +============= + +The v4l2_ctrl struct contains this union: + + union { + u32 step; + u32 menu_skip_mask; + }; + +For menu controls menu_skip_mask is used. What it does is that it allows you +to easily exclude certain menu items. This is used in the VIDIOC_QUERYMENU +implementation where you can return -EINVAL if a certain menu item is not +present. Note that VIDIOC_QUERYCTRL always returns a step value of 1 for +menu controls. + +A good example is the MPEG Audio Layer II Bitrate menu control where the +menu is a list of standardized possible bitrates. But in practice hardware +implementations will only support a subset of those. By setting the skip +mask you can tell the framework which menu items should be skipped. Setting +it to 0 means that all menu items are supported. + +You set this mask either through the v4l2_ctrl_config struct for a custom +control, or by calling v4l2_ctrl_new_std_menu(). + + +Custom Controls +=============== + +Driver specific controls can be created using v4l2_ctrl_new_custom(): + + static const struct v4l2_ctrl_config ctrl_filter = { + .ops = &ctrl_custom_ops, + .id = V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER, + .name = "Spatial Filter", + .type = V4L2_CTRL_TYPE_INTEGER, + .flags = V4L2_CTRL_FLAG_SLIDER, + .max = 15, + .step = 1, + }; + + ctrl = v4l2_ctrl_new_custom(&foo->ctrl_handler, &ctrl_filter, NULL); + +The last argument is the priv pointer which can be set to driver-specific +private data. + +The v4l2_ctrl_config struct also has fields to set the is_private and is_volatile +flags. + +If the name field is not set, then the framework will assume this is a standard +control and will fill in the name, type and flags fields accordingly. + + +Active and Grabbed Controls +=========================== + +If you get more complex relationships between controls, then you may have to +activate and deactivate controls. For example, if the Chroma AGC control is +on, then the Chroma Gain control is inactive. That is, you may set it, but +the value will not be used by the hardware as long as the automatic gain +control is on. Typically user interfaces can disable such input fields. + +You can set the 'active' status using v4l2_ctrl_activate(). By default all +controls are active. Note that the framework does not check for this flag. +It is meant purely for GUIs. The function is typically called from within +s_ctrl. + +The other flag is the 'grabbed' flag. A grabbed control means that you cannot +change it because it is in use by some resource. Typical examples are MPEG +bitrate controls that cannot be changed while capturing is in progress. + +If a control is set to 'grabbed' using v4l2_ctrl_grab(), then the framework +will return -EBUSY if an attempt is made to set this control. The +v4l2_ctrl_grab() function is typically called from the driver when it +starts or stops streaming. + + +Control Clusters +================ + +By default all controls are independent from the others. But in more +complex scenarios you can get dependencies from one control to another. +In that case you need to 'cluster' them: + + struct foo { + struct v4l2_ctrl_handler ctrl_handler; +#define AUDIO_CL_VOLUME (0) +#define AUDIO_CL_MUTE (1) + struct v4l2_ctrl *audio_cluster[2]; + ... + }; + + state->audio_cluster[AUDIO_CL_VOLUME] = + v4l2_ctrl_new_std(&state->ctrl_handler, ...); + state->audio_cluster[AUDIO_CL_MUTE] = + v4l2_ctrl_new_std(&state->ctrl_handler, ...); + v4l2_ctrl_cluster(ARRAY_SIZE(state->audio_cluster), state->audio_cluster); + +From now on whenever one or more of the controls belonging to the same +cluster is set (or 'gotten', or 'tried'), only the control ops of the first +control ('volume' in this example) is called. You effectively create a new +composite control. Similar to how a 'struct' works in C. + +So when s_ctrl is called with V4L2_CID_AUDIO_VOLUME as argument, you should set +all two controls belonging to the audio_cluster: + + static int foo_s_ctrl(struct v4l2_ctrl *ctrl) + { + struct foo *state = container_of(ctrl->handler, struct foo, ctrl_handler); + + switch (ctrl->id) { + case V4L2_CID_AUDIO_VOLUME: { + struct v4l2_ctrl *mute = ctrl->cluster[AUDIO_CL_MUTE]; + + write_reg(0x123, mute->val ? 0 : ctrl->val); + break; + } + case V4L2_CID_CONTRAST: + write_reg(0x456, ctrl->val); + break; + } + return 0; + } + +In the example above the following are equivalent for the VOLUME case: + + ctrl == ctrl->cluster[AUDIO_CL_VOLUME] == state->audio_cluster[AUDIO_CL_VOLUME] + ctrl->cluster[AUDIO_CL_MUTE] == state->audio_cluster[AUDIO_CL_MUTE] + +Note that controls in a cluster may be NULL. For example, if for some +reason mute was never added (because the hardware doesn't support that +particular feature), then mute will be NULL. So in that case we have a +cluster of 2 controls, of which only 1 is actually instantiated. The +only restriction is that the first control of the cluster must always be +present, since that is the 'master' control of the cluster. The master +control is the one that identifies the cluster and that provides the +pointer to the v4l2_ctrl_ops struct that is used for that cluster. + +Obviously, all controls in the cluster array must be initialized to either +a valid control or to NULL. + + +VIDIOC_LOG_STATUS Support +========================= + +This ioctl allow you to dump the current status of a driver to the kernel log. +The v4l2_ctrl_handler_log_status(ctrl_handler, prefix) can be used to dump the +value of the controls owned by the given handler to the log. You can supply a +prefix as well. If the prefix didn't end with a space, then ': ' will be added +for you. + + +Different Handlers for Different Video Nodes +============================================ + +Usually the V4L2 driver has just one control handler that is global for +all video nodes. But you can also specify different control handlers for +different video nodes. You can do that by manually setting the ctrl_handler +field of struct video_device. + +That is no problem if there are no subdevs involved but if there are, then +you need to block the automatic merging of subdev controls to the global +control handler. You do that by simply setting the ctrl_handler field in +struct v4l2_device to NULL. Now v4l2_device_register_subdev() will no longer +merge subdev controls. + +After each subdev was added, you will then have to call v4l2_ctrl_add_handler +manually to add the subdev's control handler (sd->ctrl_handler) to the desired +control handler. This control handler may be specific to the video_device or +for a subset of video_device's. For example: the radio device nodes only have +audio controls, while the video and vbi device nodes share the same control +handler for the audio and video controls. + +If you want to have one handler (e.g. for a radio device node) have a subset +of another handler (e.g. for a video device node), then you should first add +the controls to the first handler, add the other controls to the second +handler and finally add the first handler to the second. For example: + + v4l2_ctrl_new_std(&radio_ctrl_handler, &radio_ops, V4L2_CID_AUDIO_VOLUME, ...); + v4l2_ctrl_new_std(&radio_ctrl_handler, &radio_ops, V4L2_CID_AUDIO_MUTE, ...); + v4l2_ctrl_new_std(&video_ctrl_handler, &video_ops, V4L2_CID_BRIGHTNESS, ...); + v4l2_ctrl_new_std(&video_ctrl_handler, &video_ops, V4L2_CID_CONTRAST, ...); + v4l2_ctrl_add_handler(&video_ctrl_handler, &radio_ctrl_handler); + +Or you can add specific controls to a handler: + + volume = v4l2_ctrl_new_std(&video_ctrl_handler, &ops, V4L2_CID_AUDIO_VOLUME, ...); + v4l2_ctrl_new_std(&video_ctrl_handler, &ops, V4L2_CID_BRIGHTNESS, ...); + v4l2_ctrl_new_std(&video_ctrl_handler, &ops, V4L2_CID_CONTRAST, ...); + v4l2_ctrl_add_ctrl(&radio_ctrl_handler, volume); + +What you should not do is make two identical controls for two handlers. +For example: + + v4l2_ctrl_new_std(&radio_ctrl_handler, &radio_ops, V4L2_CID_AUDIO_MUTE, ...); + v4l2_ctrl_new_std(&video_ctrl_handler, &video_ops, V4L2_CID_AUDIO_MUTE, ...); + +This would be bad since muting the radio would not change the video mute +control. The rule is to have one control for each hardware 'knob' that you +can twiddle. + + +Finding Controls +================ + +Normally you have created the controls yourself and you can store the struct +v4l2_ctrl pointer into your own struct. + +But sometimes you need to find a control from another handler that you do +not own. For example, if you have to find a volume control from a subdev. + +You can do that by calling v4l2_ctrl_find: + + struct v4l2_ctrl *volume; + + volume = v4l2_ctrl_find(sd->ctrl_handler, V4L2_CID_AUDIO_VOLUME); + +Since v4l2_ctrl_find will lock the handler you have to be careful where you +use it. For example, this is not a good idea: + + struct v4l2_ctrl_handler ctrl_handler; + + v4l2_ctrl_new_std(&ctrl_handler, &video_ops, V4L2_CID_BRIGHTNESS, ...); + v4l2_ctrl_new_std(&ctrl_handler, &video_ops, V4L2_CID_CONTRAST, ...); + +...and in video_ops.s_ctrl: + + case V4L2_CID_BRIGHTNESS: + contrast = v4l2_find_ctrl(&ctrl_handler, V4L2_CID_CONTRAST); + ... + +When s_ctrl is called by the framework the ctrl_handler.lock is already taken, so +attempting to find another control from the same handler will deadlock. + +It is recommended not to use this function from inside the control ops. + + +Inheriting Controls +=================== + +When one control handler is added to another using v4l2_ctrl_add_handler, then +by default all controls from one are merged to the other. But a subdev might +have low-level controls that make sense for some advanced embedded system, but +not when it is used in consumer-level hardware. In that case you want to keep +those low-level controls local to the subdev. You can do this by simply +setting the 'is_private' flag of the control to 1: + + static const struct v4l2_ctrl_config ctrl_private = { + .ops = &ctrl_custom_ops, + .id = V4L2_CID_..., + .name = "Some Private Control", + .type = V4L2_CTRL_TYPE_INTEGER, + .max = 15, + .step = 1, + .is_private = 1, + }; + + ctrl = v4l2_ctrl_new_custom(&foo->ctrl_handler, &ctrl_private, NULL); + +These controls will now be skipped when v4l2_ctrl_add_handler is called. + + +V4L2_CTRL_TYPE_CTRL_CLASS Controls +================================== + +Controls of this type can be used by GUIs to get the name of the control class. +A fully featured GUI can make a dialog with multiple tabs with each tab +containing the controls belonging to a particular control class. The name of +each tab can be found by querying a special control with ID . + +Drivers do not have to care about this. The framework will automatically add +a control of this type whenever the first control belonging to a new control +class is added. + + +Differences from the Spec +========================= + +There are a few places where the framework acts slightly differently from the +V4L2 Specification. Those differences are described in this section. We will +have to see whether we need to adjust the spec or not. + +1) It is no longer required to have all controls contained in a +v4l2_ext_control array be from the same control class. The framework will be +able to handle any type of control in the array. You need to set ctrl_class +to 0 in order to enable this. If ctrl_class is non-zero, then it will still +check that all controls belong to that control class. + +If you set ctrl_class to 0 and count to 0, then it will only return an error +if there are no controls at all. + +2) Clarified the way error_idx works. For get and set it will be equal to +count if nothing was done yet. If it is less than count then only the controls +up to error_idx-1 were successfully applied. + +3) When attempting to read a button control the framework will return -EACCES +instead of -EINVAL as stated in the spec. It seems to make more sense since +button controls are write-only controls. + +4) Attempting to write to a read-only control will return -EACCES instead of +-EINVAL as the spec says. + +5) The spec does not mention what should happen when you try to set/get a +control class controls. ivtv currently returns -EINVAL (indicating that the +control ID does not exist) while the framework will return -EACCES, which +makes more sense. + + +Proposals for Extensions +======================== + +Some ideas for future extensions to the spec: + +1) Add a V4L2_CTRL_FLAG_HEX to have values shown as hexadecimal instead of +decimal. Useful for e.g. video_mute_yuv. + +2) It is possible to mark in the controls array which controls have been +successfully written and which failed by for example adding a bit to the +control ID. Not sure if it is worth the effort, though. + +3) Trying to set volatile inactive controls should result in -EACCESS. + +4) Add a new flag to mark volatile controls. Any application that wants +to store the state of the controls can then skip volatile inactive controls. +Currently it is not possible to detect such controls. diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 0af9595884aa..39d8c5ce9913 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -574,7 +574,6 @@ L: linux-mtd@lists.infradead.org S: Maintained F: drivers/mtd/nand/bcm_umi_nand.c F: drivers/mtd/nand/bcm_umi_bch.c -F: drivers/mtd/nand/bcm_umi_hamming.c F: drivers/mtd/nand/nand_bcm_umi.h ARM/CAVIUM NETWORKS CNS3XXX MACHINE SUPPORT @@ -617,10 +616,10 @@ M: Richard Purdie S: Maintained ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE -M: Paulius Zaleckas +M: Hans Ulli Kroll L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) -T: git git://gitorious.org/linux-gemini/mainline.git -S: Odd Fixes +T: git git://git.berlios.de/gemini-board +S: Maintained F: arch/arm/mach-gemini/ ARM/EBSA110 MACHINE SUPPORT @@ -642,9 +641,10 @@ T: topgit git://git.openezx.org/openezx.git F: arch/arm/mach-pxa/ezx.c ARM/FARADAY FA526 PORT -M: Paulius Zaleckas +M: Hans Ulli Kroll L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) -S: Odd Fixes +S: Maintained +T: git://git.berlios.de/gemini-board F: arch/arm/mm/*-fa* ARM/FOOTBRIDGE ARCHITECTURE @@ -693,6 +693,13 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/kristoffer/linux-hpc.git F: arch/arm/mach-sa1100/jornada720.c F: arch/arm/mach-sa1100/include/mach/jornada720.h +ARM/INCOME PXA270 SUPPORT +M: Marek Vasut +L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) +S: Maintained +F: arch/arm/mach-pxa/income.c +F: arch/arm/mach-pxa/include/mach-pxa/income.h + ARM/INTEL IOP32X ARM ARCHITECTURE M: Lennert Buytenhek M: Dan Williams @@ -948,8 +955,9 @@ ARM/SHMOBILE ARM ARCHITECTURE M: Paul Mundt M: Magnus Damm L: linux-sh@vger.kernel.org -T: git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/genesis-2.6.git W: http://oss.renesas.com +Q: http://patchwork.kernel.org/project/linux-sh/list/ +T: git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/genesis-2.6.git S: Supported F: arch/arm/mach-shmobile/ F: drivers/sh/ @@ -975,12 +983,11 @@ F: drivers/input/keyboard/w90p910_keypad.c F: drivers/input/touchscreen/w90p910_ts.c F: drivers/watchdog/nuc900_wdt.c F: drivers/net/arm/w90p910_ether.c -F: drivers/mtd/nand/w90p910_nand.c +F: drivers/mtd/nand/nuc900_nand.c F: drivers/rtc/rtc-nuc900.c F: drivers/spi/spi_nuc900.c F: drivers/usb/host/ehci-w90x900.c F: drivers/video/nuc900fb.c -F: drivers/sound/soc/nuc900/ ARM/U300 MACHINE SUPPORT M: Linus Walleij @@ -1010,14 +1017,14 @@ M: Marek Vasut L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Maintained F: arch/arm/mach-pxa/vpac270.c -F: arch/arm/mach-pxa/include/mach-pxa/vpac270.h +F: arch/arm/mach-pxa/include/mach/vpac270.h ARM/ZIPIT Z2 SUPPORT M: Marek Vasut L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Maintained F: arch/arm/mach-pxa/z2.c -F: arch/arm/mach-pxa/include/mach-pxa/z2.h +F: arch/arm/mach-pxa/include/mach/z2.h ASC7621 HARDWARE MONITOR DRIVER M: George Joseph @@ -1087,7 +1094,6 @@ F: drivers/net/wireless/ath/ath5k/ ATHEROS ATH9K WIRELESS DRIVER M: "Luis R. Rodriguez" M: Jouni Malinen -M: Sujith Manoharan M: Vasanthakumar Thiagarajan M: Senthil Balasubramanian L: linux-wireless@vger.kernel.org @@ -1253,8 +1259,7 @@ S: Maintained F: drivers/net/hamradio/baycom* BEFS FILE SYSTEM -M: "Sergey S. Kostyliov" -S: Maintained +S: Orphan F: Documentation/filesystems/befs.txt F: fs/befs/ @@ -1734,6 +1739,8 @@ CRYPTOGRAPHIC RANDOM NUMBER GENERATOR M: Neil Horman L: linux-crypto@vger.kernel.org S: Maintained +F: crypto/ansi_cprng.c +F: crypto/rng.c CS5535 Audio ALSA driver M: Jaya Kumar @@ -1892,6 +1899,7 @@ F: drivers/firmware/dcdbas.* DELL WMI EXTRAS DRIVER M: Matthew Garrett S: Maintained +F: drivers/platform/x86/dell-wmi.c DEVICE NUMBER REGISTRY M: Torben Mathiasen @@ -2021,6 +2029,7 @@ L: dri-devel@lists.freedesktop.org T: git git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git S: Maintained F: drivers/gpu/drm/ +F: include/drm/ DSCC4 DRIVER M: Francois Romieu @@ -2203,6 +2212,12 @@ F: drivers/misc/cb710/ F: drivers/mmc/host/cb710-mmc.* F: include/linux/cb710.h +ENE KB2426 (ENE0100/ENE020XX) INFRARED RECEIVER +M: Maxim Levitsky +S: Maintained +F: drivers/media/IR/ene_ir.c +F: drivers/media/IR/ene_ir.h + EPSON 1355 FRAMEBUFFER DRIVER M: Christopher Hoover M: Christopher Hoover @@ -3210,6 +3225,13 @@ F: Documentation/video4linux/*.ivtv F: drivers/media/video/ivtv/ F: include/linux/ivtv* +JC42.4 TEMPERATURE SENSOR DRIVER +M: Guenter Roeck +L: lm-sensors@lm-sensors.org +S: Maintained +F: drivers/hwmon/jc42.c +F: Documentation/hwmon/jc42 + JFS FILESYSTEM M: Dave Kleikamp L: jfs-discussion@lists.sourceforge.net @@ -3521,6 +3543,7 @@ M: Marcelo Tosatti W: http://www.penguinppc.org/ L: linuxppc-dev@ozlabs.org S: Maintained +F: arch/powerpc/platforms/8xx/ LINUX FOR POWERPC EMBEDDED PPC83XX AND PPC85XX M: Kumar Gala @@ -3623,7 +3646,7 @@ M: Mike Frysinger M: Subrata Modak L: ltp-list@lists.sourceforge.net (subscribers-only) W: http://ltp.sourceforge.net/ -T: git git://git.kernel.org/pub/scm/linux/kernel/git/galak/ltp.git +T: git git://ltp.git.sourceforge.net/gitroot/ltp/ltp-dev S: Maintained M32R ARCHITECTURE @@ -4045,7 +4068,7 @@ F: net/rfkill/ F: net/wireless/ F: include/net/ieee80211* F: include/linux/wireless.h -F: include/linux/iw_handler.h +F: include/net/iw_handler.h F: drivers/net/wireless/ NETWORKING DRIVERS @@ -4193,6 +4216,8 @@ M: David Brownell L: linux-usb@vger.kernel.org L: linux-omap@vger.kernel.org S: Maintained +F: drivers/usb/*/*omap* +F: arch/arm/*omap*/usb* OMFS FILESYSTEM M: Bob Copeland @@ -4533,7 +4558,7 @@ F: drivers/net/pppox.c PPP OVER L2TP M: James Chapman S: Maintained -F: drivers/net/pppol2tp.c +F: net/l2tp/l2tp_ppp.c F: include/linux/if_pppol2tp.h PPS SUPPORT @@ -4560,11 +4585,6 @@ W: http://prism54.org S: Obsolete F: drivers/net/wireless/prism54/ -PROMISE DC4030 CACHING DISK CONTROLLER DRIVER -M: Peter Denison -W: http://www.pnd-pc.demon.co.uk/promise/ -S: Maintained - PROMISE SATA TX2/TX4 CONTROLLER LIBATA DRIVER M: Mikael Pettersson L: linux-ide@vger.kernel.org @@ -4597,6 +4617,7 @@ PS3VRAM DRIVER M: Jim Paris L: cbe-oss-dev@ozlabs.org S: Maintained +F: drivers/block/ps3vram.c PTRACE SUPPORT M: Roland McGrath @@ -4823,8 +4844,8 @@ F: net/rfkill/ RICOH SMARTMEDIA/XD DRIVER M: Maxim Levitsky S: Maintained -F: drivers/mtd/nand/r822.c -F: drivers/mtd/nand/r822.h +F: drivers/mtd/nand/r852.c +F: drivers/mtd/nand/r852.h RISCOM8 DRIVER S: Orphan @@ -5251,6 +5272,13 @@ M: Nicolas Pitre S: Odd Fixes F: drivers/net/smc91x.* +SMM665 HARDWARE MONITOR DRIVER +M: Guenter Roeck +L: lm-sensors@lm-sensors.org +S: Maintained +F: Documentation/hwmon/smm665 +F: drivers/hwmon/smm665.c + SMSC47B397 HARDWARE MONITOR DRIVER M: "Mark M. Hoffman" L: lm-sensors@lm-sensors.org @@ -5271,11 +5299,6 @@ L: netdev@vger.kernel.org S: Supported F: drivers/net/smsc9420.* -SMX UIO Interface -M: Ben Nizette -S: Maintained -F: drivers/uio/uio_smx.c - SN-IA64 (Itanium) SUB-PLATFORM M: Jes Sorensen L: linux-altix@sgi.com @@ -5405,7 +5428,8 @@ S: Maintained F: arch/arm/mach-spear*/clock.c F: arch/arm/mach-spear*/include/mach/clkdev.h F: arch/arm/plat-spear/clock.c -F: arch/arm/plat-spear/include/plat/clock.h and clkdev.h +F: arch/arm/plat-spear/include/plat/clkdev.h +F: arch/arm/plat-spear/include/plat/clock.h SPEAR PAD MULTIPLEXING SUPPORT M: Viresh Kumar @@ -5485,11 +5509,6 @@ M: Ion Badulescu S: Odd Fixes F: drivers/net/starfire* -STARMODE RADIO IP (STRIP) PROTOCOL DRIVER -S: Orphan -F: drivers/staging/strip/strip.c -F: include/linux/if_strip.h - STRADIS MPEG-2 DECODER DRIVER M: Nathan Laredo W: http://www.stradis.com/ @@ -5769,6 +5788,9 @@ UCLINUX FOR RENESAS H8/300 (H8300) M: Yoshinori Sato W: http://uclinux-h8.sourceforge.jp/ S: Supported +F: arch/h8300/ +F: drivers/ide/ide-h8300.c +F: drivers/net/ne-h8300.c UDF FILESYSTEM M: Jan Kara @@ -6060,7 +6082,7 @@ F: drivers/net/usb/usbnet.c F: include/linux/usb/usbnet.h USB VIDEO CLASS -M: Laurent Pinchart +M: Laurent Pinchart L: linux-uvc-devel@lists.berlios.de (subscribers-only) L: linux-media@vger.kernel.org T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6.git @@ -6312,6 +6334,11 @@ M: linux-wimax@intel.com L: wimax@linuxwimax.org S: Supported W: http://linuxwimax.org +F: Documentation/wimax/README.wimax +F: include/linux/wimax.h +F: include/linux/wimax/debug.h +F: include/net/wimax.h +F: net/wimax/ WIMEDIA LLC PROTOCOL (WLP) SUBSYSTEM M: David Vrabel diff --git a/trunk/Makefile b/trunk/Makefile index 7431c283f15b..788111d21559 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -189,7 +189,6 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile export KBUILD_BUILDHOST := $(SUBARCH) ARCH ?= $(SUBARCH) -CROSS_COMPILE ?= CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%) # Architecture as present in compile.h diff --git a/trunk/arch/alpha/include/asm/dma-mapping.h b/trunk/arch/alpha/include/asm/dma-mapping.h index 1bce8169733c..4567aca6fdd6 100644 --- a/trunk/arch/alpha/include/asm/dma-mapping.h +++ b/trunk/arch/alpha/include/asm/dma-mapping.h @@ -41,9 +41,7 @@ static inline int dma_set_mask(struct device *dev, u64 mask) #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) -#define dma_is_consistent(d, h) (1) #define dma_cache_sync(dev, va, size, dir) ((void)0) -#define dma_get_cache_alignment() L1_CACHE_BYTES #endif /* _ALPHA_DMA_MAPPING_H */ diff --git a/trunk/arch/alpha/include/asm/hw_irq.h b/trunk/arch/alpha/include/asm/hw_irq.h index a37db0f95092..5050ac81cd90 100644 --- a/trunk/arch/alpha/include/asm/hw_irq.h +++ b/trunk/arch/alpha/include/asm/hw_irq.h @@ -3,6 +3,7 @@ extern volatile unsigned long irq_err_count; +DECLARE_PER_CPU(unsigned long, irq_pmi_count); #ifdef CONFIG_ALPHA_GENERIC #define ACTUAL_NR_IRQS alpha_mv.nr_irqs diff --git a/trunk/arch/alpha/include/asm/ioctls.h b/trunk/arch/alpha/include/asm/ioctls.h index 67bb9f6fdbe4..59617c3c2be6 100644 --- a/trunk/arch/alpha/include/asm/ioctls.h +++ b/trunk/arch/alpha/include/asm/ioctls.h @@ -80,6 +80,7 @@ # define TIOCPKT_START 8 # define TIOCPKT_NOSTOP 16 # define TIOCPKT_DOSTOP 32 +# define TIOCPKT_IOCTL 64 #define TIOCNOTTY 0x5422 @@ -91,6 +92,7 @@ #define TIOCGSID 0x5429 /* Return the session ID of FD */ #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ +#define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ #define TIOCSERCONFIG 0x5453 #define TIOCSERGWILD 0x5454 @@ -106,7 +108,5 @@ #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ -#define TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */ -#define TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */ #endif /* _ASM_ALPHA_IOCTLS_H */ diff --git a/trunk/arch/alpha/include/asm/md.h b/trunk/arch/alpha/include/asm/md.h deleted file mode 100644 index 6c9b8222a4f2..000000000000 --- a/trunk/arch/alpha/include/asm/md.h +++ /dev/null @@ -1,13 +0,0 @@ -/* $Id: md.h,v 1.1 1997/12/15 15:11:48 jj Exp $ - * md.h: High speed xor_block operation for RAID4/5 - * - */ - -#ifndef __ASM_MD_H -#define __ASM_MD_H - -/* #define HAVE_ARCH_XORBLOCK */ - -#define MD_XORBLOCK_ALIGNMENT sizeof(long) - -#endif /* __ASM_MD_H */ diff --git a/trunk/arch/alpha/include/asm/perf_event.h b/trunk/arch/alpha/include/asm/perf_event.h index 3bef8522017c..4157cd3c44a9 100644 --- a/trunk/arch/alpha/include/asm/perf_event.h +++ b/trunk/arch/alpha/include/asm/perf_event.h @@ -2,8 +2,14 @@ #define __ASM_ALPHA_PERF_EVENT_H /* Alpha only supports software events through this interface. */ -static inline void set_perf_event_pending(void) { } +extern void set_perf_event_pending(void); #define PERF_EVENT_INDEX_OFFSET 0 +#ifdef CONFIG_PERF_EVENTS +extern void init_hw_perf_events(void); +#else +static inline void init_hw_perf_events(void) { } +#endif + #endif /* __ASM_ALPHA_PERF_EVENT_H */ diff --git a/trunk/arch/alpha/include/asm/scatterlist.h b/trunk/arch/alpha/include/asm/scatterlist.h index 5728c52a7412..017d7471c3c4 100644 --- a/trunk/arch/alpha/include/asm/scatterlist.h +++ b/trunk/arch/alpha/include/asm/scatterlist.h @@ -3,6 +3,4 @@ #include -#define ISA_DMA_THRESHOLD (~0UL) - #endif /* !(_ALPHA_SCATTERLIST_H) */ diff --git a/trunk/arch/alpha/include/asm/termbits.h b/trunk/arch/alpha/include/asm/termbits.h index ad854a4a3af6..879dd3589921 100644 --- a/trunk/arch/alpha/include/asm/termbits.h +++ b/trunk/arch/alpha/include/asm/termbits.h @@ -180,6 +180,7 @@ struct ktermios { #define FLUSHO 0x00800000 #define PENDIN 0x20000000 #define IEXTEN 0x00000400 +#define EXTPROC 0x10000000 /* Values for the ACTION argument to `tcflow'. */ #define TCOOFF 0 diff --git a/trunk/arch/alpha/include/asm/wrperfmon.h b/trunk/arch/alpha/include/asm/wrperfmon.h new file mode 100644 index 000000000000..319bf6788d87 --- /dev/null +++ b/trunk/arch/alpha/include/asm/wrperfmon.h @@ -0,0 +1,93 @@ +/* + * Definitions for use with the Alpha wrperfmon PAL call. + */ + +#ifndef __ALPHA_WRPERFMON_H +#define __ALPHA_WRPERFMON_H + +/* Following commands are implemented on all CPUs */ +#define PERFMON_CMD_DISABLE 0 +#define PERFMON_CMD_ENABLE 1 +#define PERFMON_CMD_DESIRED_EVENTS 2 +#define PERFMON_CMD_LOGGING_OPTIONS 3 +/* Following commands on EV5/EV56/PCA56 only */ +#define PERFMON_CMD_INT_FREQ 4 +#define PERFMON_CMD_ENABLE_CLEAR 7 +/* Following commands are on EV5 and better CPUs */ +#define PERFMON_CMD_READ 5 +#define PERFMON_CMD_WRITE 6 +/* Following command are on EV6 and better CPUs */ +#define PERFMON_CMD_ENABLE_WRITE 7 +/* Following command are on EV67 and better CPUs */ +#define PERFMON_CMD_I_STAT 8 +#define PERFMON_CMD_PMPC 9 + + +/* EV5/EV56/PCA56 Counters */ +#define EV5_PCTR_0 (1UL<<0) +#define EV5_PCTR_1 (1UL<<1) +#define EV5_PCTR_2 (1UL<<2) + +#define EV5_PCTR_0_COUNT_SHIFT 48 +#define EV5_PCTR_1_COUNT_SHIFT 32 +#define EV5_PCTR_2_COUNT_SHIFT 16 + +#define EV5_PCTR_0_COUNT_MASK 0xffffUL +#define EV5_PCTR_1_COUNT_MASK 0xffffUL +#define EV5_PCTR_2_COUNT_MASK 0x3fffUL + +/* EV6 Counters */ +#define EV6_PCTR_0 (1UL<<0) +#define EV6_PCTR_1 (1UL<<1) + +#define EV6_PCTR_0_COUNT_SHIFT 28 +#define EV6_PCTR_1_COUNT_SHIFT 6 + +#define EV6_PCTR_0_COUNT_MASK 0xfffffUL +#define EV6_PCTR_1_COUNT_MASK 0xfffffUL + +/* EV67 (and subsequent) counters */ +#define EV67_PCTR_0 (1UL<<0) +#define EV67_PCTR_1 (1UL<<1) + +#define EV67_PCTR_0_COUNT_SHIFT 28 +#define EV67_PCTR_1_COUNT_SHIFT 6 + +#define EV67_PCTR_0_COUNT_MASK 0xfffffUL +#define EV67_PCTR_1_COUNT_MASK 0xfffffUL + + +/* + * The Alpha Architecure Handbook, vers. 4 (1998) appears to have a misprint + * in Table E-23 regarding the bits that set the event PCTR 1 counts. + * Hopefully what we have here is correct. + */ +#define EV6_PCTR_0_EVENT_MASK 0x10UL +#define EV6_PCTR_1_EVENT_MASK 0x0fUL + +/* EV6 Events */ +#define EV6_PCTR_0_CYCLES (0UL << 4) +#define EV6_PCTR_0_INSTRUCTIONS (1UL << 4) + +#define EV6_PCTR_1_CYCLES 0 +#define EV6_PCTR_1_BRANCHES 1 +#define EV6_PCTR_1_BRANCH_MISPREDICTS 2 +#define EV6_PCTR_1_DTB_SINGLE_MISSES 3 +#define EV6_PCTR_1_DTB_DOUBLE_MISSES 4 +#define EV6_PCTR_1_ITB_MISSES 5 +#define EV6_PCTR_1_UNALIGNED_TRAPS 6 +#define EV6_PCTR_1_REPLY_TRAPS 7 + +/* From the Alpha Architecture Reference Manual, 4th edn., 2002 */ +#define EV67_PCTR_MODE_MASK 0x10UL +#define EV67_PCTR_EVENT_MASK 0x0CUL + +#define EV67_PCTR_MODE_PROFILEME (1UL<<4) +#define EV67_PCTR_MODE_AGGREGATE (0UL<<4) + +#define EV67_PCTR_INSTR_CYCLES (0UL<<2) +#define EV67_PCTR_CYCLES_UNDEF (1UL<<2) +#define EV67_PCTR_INSTR_BCACHEMISS (2UL<<2) +#define EV67_PCTR_CYCLES_MBOX (3UL<<2) + +#endif diff --git a/trunk/arch/alpha/kernel/Makefile b/trunk/arch/alpha/kernel/Makefile index 5a62fb46ef20..1ee9b5b629b8 100644 --- a/trunk/arch/alpha/kernel/Makefile +++ b/trunk/arch/alpha/kernel/Makefile @@ -15,6 +15,7 @@ obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_PCI) += pci.o pci_iommu.o pci-sysfs.o obj-$(CONFIG_SRM_ENV) += srm_env.o obj-$(CONFIG_MODULES) += module.o +obj-$(CONFIG_PERF_EVENTS) += perf_event.o ifdef CONFIG_ALPHA_GENERIC diff --git a/trunk/arch/alpha/kernel/irq.c b/trunk/arch/alpha/kernel/irq.c index 7f912ba3d9ad..fe912984d9b1 100644 --- a/trunk/arch/alpha/kernel/irq.c +++ b/trunk/arch/alpha/kernel/irq.c @@ -31,6 +31,7 @@ #include volatile unsigned long irq_err_count; +DEFINE_PER_CPU(unsigned long, irq_pmi_count); void ack_bad_irq(unsigned int irq) { @@ -63,9 +64,7 @@ int irq_select_affinity(unsigned int irq) int show_interrupts(struct seq_file *p, void *v) { -#ifdef CONFIG_SMP int j; -#endif int irq = *(loff_t *) v; struct irqaction * action; unsigned long flags; @@ -112,6 +111,10 @@ show_interrupts(struct seq_file *p, void *v) seq_printf(p, "%10lu ", cpu_data[j].ipi_count); seq_putc(p, '\n'); #endif + seq_puts(p, "PMI: "); + for_each_online_cpu(j) + seq_printf(p, "%10lu ", per_cpu(irq_pmi_count, j)); + seq_puts(p, " Performance Monitoring\n"); seq_printf(p, "ERR: %10lu\n", irq_err_count); } return 0; diff --git a/trunk/arch/alpha/kernel/irq_alpha.c b/trunk/arch/alpha/kernel/irq_alpha.c index cfde865b78e0..5f77afb88e89 100644 --- a/trunk/arch/alpha/kernel/irq_alpha.c +++ b/trunk/arch/alpha/kernel/irq_alpha.c @@ -10,6 +10,7 @@ #include #include +#include #include "proto.h" #include "irq_impl.h" @@ -111,6 +112,8 @@ init_IRQ(void) wrent(entInt, 0); alpha_mv.init_irq(); + + init_hw_perf_events(); } /* diff --git a/trunk/arch/alpha/kernel/osf_sys.c b/trunk/arch/alpha/kernel/osf_sys.c index de9d39717808..fb58150a7e8f 100644 --- a/trunk/arch/alpha/kernel/osf_sys.c +++ b/trunk/arch/alpha/kernel/osf_sys.c @@ -234,17 +234,17 @@ linux_to_osf_statfs(struct kstatfs *linux_stat, struct osf_statfs __user *osf_st } static int -do_osf_statfs(struct dentry * dentry, struct osf_statfs __user *buffer, +do_osf_statfs(struct path *path, struct osf_statfs __user *buffer, unsigned long bufsiz) { struct kstatfs linux_stat; - int error = vfs_statfs(dentry, &linux_stat); + int error = vfs_statfs(path, &linux_stat); if (!error) error = linux_to_osf_statfs(&linux_stat, buffer, bufsiz); return error; } -SYSCALL_DEFINE3(osf_statfs, char __user *, pathname, +SYSCALL_DEFINE3(osf_statfs, const char __user *, pathname, struct osf_statfs __user *, buffer, unsigned long, bufsiz) { struct path path; @@ -252,7 +252,7 @@ SYSCALL_DEFINE3(osf_statfs, char __user *, pathname, retval = user_path(pathname, &path); if (!retval) { - retval = do_osf_statfs(path.dentry, buffer, bufsiz); + retval = do_osf_statfs(&path buffer, bufsiz); path_put(&path); } return retval; @@ -267,7 +267,7 @@ SYSCALL_DEFINE3(osf_fstatfs, unsigned long, fd, retval = -EBADF; file = fget(fd); if (file) { - retval = do_osf_statfs(file->f_path.dentry, buffer, bufsiz); + retval = do_osf_statfs(&file->f_path, buffer, bufsiz); fput(file); } return retval; @@ -358,7 +358,7 @@ osf_procfs_mount(char *dirname, struct procfs_args __user *args, int flags) return do_mount("", dirname, "proc", flags, NULL); } -SYSCALL_DEFINE4(osf_mount, unsigned long, typenr, char __user *, path, +SYSCALL_DEFINE4(osf_mount, unsigned long, typenr, const char __user *, path, int, flag, void __user *, data) { int retval; @@ -932,7 +932,7 @@ SYSCALL_DEFINE3(osf_setitimer, int, which, struct itimerval32 __user *, in, } -SYSCALL_DEFINE2(osf_utimes, char __user *, filename, +SYSCALL_DEFINE2(osf_utimes, const char __user *, filename, struct timeval32 __user *, tvs) { struct timespec tv[2]; diff --git a/trunk/arch/alpha/kernel/perf_event.c b/trunk/arch/alpha/kernel/perf_event.c new file mode 100644 index 000000000000..51c39fa41693 --- /dev/null +++ b/trunk/arch/alpha/kernel/perf_event.c @@ -0,0 +1,842 @@ +/* + * Hardware performance events for the Alpha. + * + * We implement HW counts on the EV67 and subsequent CPUs only. + * + * (C) 2010 Michael J. Cree + * + * Somewhat based on the Sparc code, and to a lesser extent the PowerPC and + * ARM code, which are copyright by their respective authors. + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + + +/* The maximum number of PMCs on any Alpha CPU whatsoever. */ +#define MAX_HWEVENTS 3 +#define PMC_NO_INDEX -1 + +/* For tracking PMCs and the hw events they monitor on each CPU. */ +struct cpu_hw_events { + int enabled; + /* Number of events scheduled; also number entries valid in arrays below. */ + int n_events; + /* Number events added since last hw_perf_disable(). */ + int n_added; + /* Events currently scheduled. */ + struct perf_event *event[MAX_HWEVENTS]; + /* Event type of each scheduled event. */ + unsigned long evtype[MAX_HWEVENTS]; + /* Current index of each scheduled event; if not yet determined + * contains PMC_NO_INDEX. + */ + int current_idx[MAX_HWEVENTS]; + /* The active PMCs' config for easy use with wrperfmon(). */ + unsigned long config; + /* The active counters' indices for easy use with wrperfmon(). */ + unsigned long idx_mask; +}; +DEFINE_PER_CPU(struct cpu_hw_events, cpu_hw_events); + + + +/* + * A structure to hold the description of the PMCs available on a particular + * type of Alpha CPU. + */ +struct alpha_pmu_t { + /* Mapping of the perf system hw event types to indigenous event types */ + const int *event_map; + /* The number of entries in the event_map */ + int max_events; + /* The number of PMCs on this Alpha */ + int num_pmcs; + /* + * All PMC counters reside in the IBOX register PCTR. This is the + * LSB of the counter. + */ + int pmc_count_shift[MAX_HWEVENTS]; + /* + * The mask that isolates the PMC bits when the LSB of the counter + * is shifted to bit 0. + */ + unsigned long pmc_count_mask[MAX_HWEVENTS]; + /* The maximum period the PMC can count. */ + unsigned long pmc_max_period[MAX_HWEVENTS]; + /* + * The maximum value that may be written to the counter due to + * hardware restrictions is pmc_max_period - pmc_left. + */ + long pmc_left[3]; + /* Subroutine for allocation of PMCs. Enforces constraints. */ + int (*check_constraints)(struct perf_event **, unsigned long *, int); +}; + +/* + * The Alpha CPU PMU description currently in operation. This is set during + * the boot process to the specific CPU of the machine. + */ +static const struct alpha_pmu_t *alpha_pmu; + + +#define HW_OP_UNSUPPORTED -1 + +/* + * The hardware description of the EV67, EV68, EV69, EV7 and EV79 PMUs + * follow. Since they are identical we refer to them collectively as the + * EV67 henceforth. + */ + +/* + * EV67 PMC event types + * + * There is no one-to-one mapping of the possible hw event types to the + * actual codes that are used to program the PMCs hence we introduce our + * own hw event type identifiers. + */ +enum ev67_pmc_event_type { + EV67_CYCLES = 1, + EV67_INSTRUCTIONS, + EV67_BCACHEMISS, + EV67_MBOXREPLAY, + EV67_LAST_ET +}; +#define EV67_NUM_EVENT_TYPES (EV67_LAST_ET-EV67_CYCLES) + + +/* Mapping of the hw event types to the perf tool interface */ +static const int ev67_perfmon_event_map[] = { + [PERF_COUNT_HW_CPU_CYCLES] = EV67_CYCLES, + [PERF_COUNT_HW_INSTRUCTIONS] = EV67_INSTRUCTIONS, + [PERF_COUNT_HW_CACHE_REFERENCES] = HW_OP_UNSUPPORTED, + [PERF_COUNT_HW_CACHE_MISSES] = EV67_BCACHEMISS, +}; + +struct ev67_mapping_t { + int config; + int idx; +}; + +/* + * The mapping used for one event only - these must be in same order as enum + * ev67_pmc_event_type definition. + */ +static const struct ev67_mapping_t ev67_mapping[] = { + {EV67_PCTR_INSTR_CYCLES, 1}, /* EV67_CYCLES, */ + {EV67_PCTR_INSTR_CYCLES, 0}, /* EV67_INSTRUCTIONS */ + {EV67_PCTR_INSTR_BCACHEMISS, 1}, /* EV67_BCACHEMISS */ + {EV67_PCTR_CYCLES_MBOX, 1} /* EV67_MBOXREPLAY */ +}; + + +/* + * Check that a group of events can be simultaneously scheduled on to the + * EV67 PMU. Also allocate counter indices and config. + */ +static int ev67_check_constraints(struct perf_event **event, + unsigned long *evtype, int n_ev) +{ + int idx0; + unsigned long config; + + idx0 = ev67_mapping[evtype[0]-1].idx; + config = ev67_mapping[evtype[0]-1].config; + if (n_ev == 1) + goto success; + + BUG_ON(n_ev != 2); + + if (evtype[0] == EV67_MBOXREPLAY || evtype[1] == EV67_MBOXREPLAY) { + /* MBOX replay traps must be on PMC 1 */ + idx0 = (evtype[0] == EV67_MBOXREPLAY) ? 1 : 0; + /* Only cycles can accompany MBOX replay traps */ + if (evtype[idx0] == EV67_CYCLES) { + config = EV67_PCTR_CYCLES_MBOX; + goto success; + } + } + + if (evtype[0] == EV67_BCACHEMISS || evtype[1] == EV67_BCACHEMISS) { + /* Bcache misses must be on PMC 1 */ + idx0 = (evtype[0] == EV67_BCACHEMISS) ? 1 : 0; + /* Only instructions can accompany Bcache misses */ + if (evtype[idx0] == EV67_INSTRUCTIONS) { + config = EV67_PCTR_INSTR_BCACHEMISS; + goto success; + } + } + + if (evtype[0] == EV67_INSTRUCTIONS || evtype[1] == EV67_INSTRUCTIONS) { + /* Instructions must be on PMC 0 */ + idx0 = (evtype[0] == EV67_INSTRUCTIONS) ? 0 : 1; + /* By this point only cycles can accompany instructions */ + if (evtype[idx0^1] == EV67_CYCLES) { + config = EV67_PCTR_INSTR_CYCLES; + goto success; + } + } + + /* Otherwise, darn it, there is a conflict. */ + return -1; + +success: + event[0]->hw.idx = idx0; + event[0]->hw.config_base = config; + if (n_ev == 2) { + event[1]->hw.idx = idx0 ^ 1; + event[1]->hw.config_base = config; + } + return 0; +} + + +static const struct alpha_pmu_t ev67_pmu = { + .event_map = ev67_perfmon_event_map, + .max_events = ARRAY_SIZE(ev67_perfmon_event_map), + .num_pmcs = 2, + .pmc_count_shift = {EV67_PCTR_0_COUNT_SHIFT, EV67_PCTR_1_COUNT_SHIFT, 0}, + .pmc_count_mask = {EV67_PCTR_0_COUNT_MASK, EV67_PCTR_1_COUNT_MASK, 0}, + .pmc_max_period = {(1UL<<20) - 1, (1UL<<20) - 1, 0}, + .pmc_left = {16, 4, 0}, + .check_constraints = ev67_check_constraints +}; + + + +/* + * Helper routines to ensure that we read/write only the correct PMC bits + * when calling the wrperfmon PALcall. + */ +static inline void alpha_write_pmc(int idx, unsigned long val) +{ + val &= alpha_pmu->pmc_count_mask[idx]; + val <<= alpha_pmu->pmc_count_shift[idx]; + val |= (1<>= alpha_pmu->pmc_count_shift[idx]; + val &= alpha_pmu->pmc_count_mask[idx]; + return val; +} + +/* Set a new period to sample over */ +static int alpha_perf_event_set_period(struct perf_event *event, + struct hw_perf_event *hwc, int idx) +{ + long left = atomic64_read(&hwc->period_left); + long period = hwc->sample_period; + int ret = 0; + + if (unlikely(left <= -period)) { + left = period; + atomic64_set(&hwc->period_left, left); + hwc->last_period = period; + ret = 1; + } + + if (unlikely(left <= 0)) { + left += period; + atomic64_set(&hwc->period_left, left); + hwc->last_period = period; + ret = 1; + } + + /* + * Hardware restrictions require that the counters must not be + * written with values that are too close to the maximum period. + */ + if (unlikely(left < alpha_pmu->pmc_left[idx])) + left = alpha_pmu->pmc_left[idx]; + + if (left > (long)alpha_pmu->pmc_max_period[idx]) + left = alpha_pmu->pmc_max_period[idx]; + + atomic64_set(&hwc->prev_count, (unsigned long)(-left)); + + alpha_write_pmc(idx, (unsigned long)(-left)); + + perf_event_update_userpage(event); + + return ret; +} + + +/* + * Calculates the count (the 'delta') since the last time the PMC was read. + * + * As the PMCs' full period can easily be exceeded within the perf system + * sampling period we cannot use any high order bits as a guard bit in the + * PMCs to detect overflow as is done by other architectures. The code here + * calculates the delta on the basis that there is no overflow when ovf is + * zero. The value passed via ovf by the interrupt handler corrects for + * overflow. + * + * This can be racey on rare occasions -- a call to this routine can occur + * with an overflowed counter just before the PMI service routine is called. + * The check for delta negative hopefully always rectifies this situation. + */ +static unsigned long alpha_perf_event_update(struct perf_event *event, + struct hw_perf_event *hwc, int idx, long ovf) +{ + long prev_raw_count, new_raw_count; + long delta; + +again: + prev_raw_count = atomic64_read(&hwc->prev_count); + new_raw_count = alpha_read_pmc(idx); + + if (atomic64_cmpxchg(&hwc->prev_count, prev_raw_count, + new_raw_count) != prev_raw_count) + goto again; + + delta = (new_raw_count - (prev_raw_count & alpha_pmu->pmc_count_mask[idx])) + ovf; + + /* It is possible on very rare occasions that the PMC has overflowed + * but the interrupt is yet to come. Detect and fix this situation. + */ + if (unlikely(delta < 0)) { + delta += alpha_pmu->pmc_max_period[idx] + 1; + } + + atomic64_add(delta, &event->count); + atomic64_sub(delta, &hwc->period_left); + + return new_raw_count; +} + + +/* + * Collect all HW events into the array event[]. + */ +static int collect_events(struct perf_event *group, int max_count, + struct perf_event *event[], unsigned long *evtype, + int *current_idx) +{ + struct perf_event *pe; + int n = 0; + + if (!is_software_event(group)) { + if (n >= max_count) + return -1; + event[n] = group; + evtype[n] = group->hw.event_base; + current_idx[n++] = PMC_NO_INDEX; + } + list_for_each_entry(pe, &group->sibling_list, group_entry) { + if (!is_software_event(pe) && pe->state != PERF_EVENT_STATE_OFF) { + if (n >= max_count) + return -1; + event[n] = pe; + evtype[n] = pe->hw.event_base; + current_idx[n++] = PMC_NO_INDEX; + } + } + return n; +} + + + +/* + * Check that a group of events can be simultaneously scheduled on to the PMU. + */ +static int alpha_check_constraints(struct perf_event **events, + unsigned long *evtypes, int n_ev) +{ + + /* No HW events is possible from hw_perf_group_sched_in(). */ + if (n_ev == 0) + return 0; + + if (n_ev > alpha_pmu->num_pmcs) + return -1; + + return alpha_pmu->check_constraints(events, evtypes, n_ev); +} + + +/* + * If new events have been scheduled then update cpuc with the new + * configuration. This may involve shifting cycle counts from one PMC to + * another. + */ +static void maybe_change_configuration(struct cpu_hw_events *cpuc) +{ + int j; + + if (cpuc->n_added == 0) + return; + + /* Find counters that are moving to another PMC and update */ + for (j = 0; j < cpuc->n_events; j++) { + struct perf_event *pe = cpuc->event[j]; + + if (cpuc->current_idx[j] != PMC_NO_INDEX && + cpuc->current_idx[j] != pe->hw.idx) { + alpha_perf_event_update(pe, &pe->hw, cpuc->current_idx[j], 0); + cpuc->current_idx[j] = PMC_NO_INDEX; + } + } + + /* Assign to counters all unassigned events. */ + cpuc->idx_mask = 0; + for (j = 0; j < cpuc->n_events; j++) { + struct perf_event *pe = cpuc->event[j]; + struct hw_perf_event *hwc = &pe->hw; + int idx = hwc->idx; + + if (cpuc->current_idx[j] != PMC_NO_INDEX) { + cpuc->idx_mask |= (1<current_idx[j]); + continue; + } + + alpha_perf_event_set_period(pe, hwc, idx); + cpuc->current_idx[j] = idx; + cpuc->idx_mask |= (1<current_idx[j]); + } + cpuc->config = cpuc->event[0]->hw.config_base; +} + + + +/* Schedule perf HW event on to PMU. + * - this function is called from outside this module via the pmu struct + * returned from perf event initialisation. + */ +static int alpha_pmu_enable(struct perf_event *event) +{ + struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); + int n0; + int ret; + unsigned long flags; + + /* + * The Sparc code has the IRQ disable first followed by the perf + * disable, however this can lead to an overflowed counter with the + * PMI disabled on rare occasions. The alpha_perf_event_update() + * routine should detect this situation by noting a negative delta, + * nevertheless we disable the PMCs first to enable a potential + * final PMI to occur before we disable interrupts. + */ + perf_disable(); + local_irq_save(flags); + + /* Default to error to be returned */ + ret = -EAGAIN; + + /* Insert event on to PMU and if successful modify ret to valid return */ + n0 = cpuc->n_events; + if (n0 < alpha_pmu->num_pmcs) { + cpuc->event[n0] = event; + cpuc->evtype[n0] = event->hw.event_base; + cpuc->current_idx[n0] = PMC_NO_INDEX; + + if (!alpha_check_constraints(cpuc->event, cpuc->evtype, n0+1)) { + cpuc->n_events++; + cpuc->n_added++; + ret = 0; + } + } + + local_irq_restore(flags); + perf_enable(); + + return ret; +} + + + +/* Disable performance monitoring unit + * - this function is called from outside this module via the pmu struct + * returned from perf event initialisation. + */ +static void alpha_pmu_disable(struct perf_event *event) +{ + struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); + struct hw_perf_event *hwc = &event->hw; + unsigned long flags; + int j; + + perf_disable(); + local_irq_save(flags); + + for (j = 0; j < cpuc->n_events; j++) { + if (event == cpuc->event[j]) { + int idx = cpuc->current_idx[j]; + + /* Shift remaining entries down into the existing + * slot. + */ + while (++j < cpuc->n_events) { + cpuc->event[j - 1] = cpuc->event[j]; + cpuc->evtype[j - 1] = cpuc->evtype[j]; + cpuc->current_idx[j - 1] = + cpuc->current_idx[j]; + } + + /* Absorb the final count and turn off the event. */ + alpha_perf_event_update(event, hwc, idx, 0); + perf_event_update_userpage(event); + + cpuc->idx_mask &= ~(1UL<n_events--; + break; + } + } + + local_irq_restore(flags); + perf_enable(); +} + + +static void alpha_pmu_read(struct perf_event *event) +{ + struct hw_perf_event *hwc = &event->hw; + + alpha_perf_event_update(event, hwc, hwc->idx, 0); +} + + +static void alpha_pmu_unthrottle(struct perf_event *event) +{ + struct hw_perf_event *hwc = &event->hw; + struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); + + cpuc->idx_mask |= 1UL<idx; + wrperfmon(PERFMON_CMD_ENABLE, (1UL<idx)); +} + + +/* + * Check that CPU performance counters are supported. + * - currently support EV67 and later CPUs. + * - actually some later revisions of the EV6 have the same PMC model as the + * EV67 but we don't do suffiently deep CPU detection to detect them. + * Bad luck to the very few people who might have one, I guess. + */ +static int supported_cpu(void) +{ + struct percpu_struct *cpu; + unsigned long cputype; + + /* Get cpu type from HW */ + cpu = (struct percpu_struct *)((char *)hwrpb + hwrpb->processor_offset); + cputype = cpu->type & 0xffffffff; + /* Include all of EV67, EV68, EV7, EV79 and EV69 as supported. */ + return (cputype >= EV67_CPU) && (cputype <= EV69_CPU); +} + + + +static void hw_perf_event_destroy(struct perf_event *event) +{ + /* Nothing to be done! */ + return; +} + + + +static int __hw_perf_event_init(struct perf_event *event) +{ + struct perf_event_attr *attr = &event->attr; + struct hw_perf_event *hwc = &event->hw; + struct perf_event *evts[MAX_HWEVENTS]; + unsigned long evtypes[MAX_HWEVENTS]; + int idx_rubbish_bin[MAX_HWEVENTS]; + int ev; + int n; + + /* We only support a limited range of HARDWARE event types with one + * only programmable via a RAW event type. + */ + if (attr->type == PERF_TYPE_HARDWARE) { + if (attr->config >= alpha_pmu->max_events) + return -EINVAL; + ev = alpha_pmu->event_map[attr->config]; + } else if (attr->type == PERF_TYPE_HW_CACHE) { + return -EOPNOTSUPP; + } else if (attr->type == PERF_TYPE_RAW) { + ev = attr->config & 0xff; + } else { + return -EOPNOTSUPP; + } + + if (ev < 0) { + return ev; + } + + /* The EV67 does not support mode exclusion */ + if (attr->exclude_kernel || attr->exclude_user + || attr->exclude_hv || attr->exclude_idle) { + return -EPERM; + } + + /* + * We place the event type in event_base here and leave calculation + * of the codes to programme the PMU for alpha_pmu_enable() because + * it is only then we will know what HW events are actually + * scheduled on to the PMU. At that point the code to programme the + * PMU is put into config_base and the PMC to use is placed into + * idx. We initialise idx (below) to PMC_NO_INDEX to indicate that + * it is yet to be determined. + */ + hwc->event_base = ev; + + /* Collect events in a group together suitable for calling + * alpha_check_constraints() to verify that the group as a whole can + * be scheduled on to the PMU. + */ + n = 0; + if (event->group_leader != event) { + n = collect_events(event->group_leader, + alpha_pmu->num_pmcs - 1, + evts, evtypes, idx_rubbish_bin); + if (n < 0) + return -EINVAL; + } + evtypes[n] = hwc->event_base; + evts[n] = event; + + if (alpha_check_constraints(evts, evtypes, n + 1)) + return -EINVAL; + + /* Indicate that PMU config and idx are yet to be determined. */ + hwc->config_base = 0; + hwc->idx = PMC_NO_INDEX; + + event->destroy = hw_perf_event_destroy; + + /* + * Most architectures reserve the PMU for their use at this point. + * As there is no existing mechanism to arbitrate usage and there + * appears to be no other user of the Alpha PMU we just assume + * that we can just use it, hence a NO-OP here. + * + * Maybe an alpha_reserve_pmu() routine should be implemented but is + * anything else ever going to use it? + */ + + if (!hwc->sample_period) { + hwc->sample_period = alpha_pmu->pmc_max_period[0]; + hwc->last_period = hwc->sample_period; + atomic64_set(&hwc->period_left, hwc->sample_period); + } + + return 0; +} + +static const struct pmu pmu = { + .enable = alpha_pmu_enable, + .disable = alpha_pmu_disable, + .read = alpha_pmu_read, + .unthrottle = alpha_pmu_unthrottle, +}; + + +/* + * Main entry point to initialise a HW performance event. + */ +const struct pmu *hw_perf_event_init(struct perf_event *event) +{ + int err; + + if (!alpha_pmu) + return ERR_PTR(-ENODEV); + + /* Do the real initialisation work. */ + err = __hw_perf_event_init(event); + + if (err) + return ERR_PTR(err); + + return &pmu; +} + + + +/* + * Main entry point - enable HW performance counters. + */ +void hw_perf_enable(void) +{ + struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); + + if (cpuc->enabled) + return; + + cpuc->enabled = 1; + barrier(); + + if (cpuc->n_events > 0) { + /* Update cpuc with information from any new scheduled events. */ + maybe_change_configuration(cpuc); + + /* Start counting the desired events. */ + wrperfmon(PERFMON_CMD_LOGGING_OPTIONS, EV67_PCTR_MODE_AGGREGATE); + wrperfmon(PERFMON_CMD_DESIRED_EVENTS, cpuc->config); + wrperfmon(PERFMON_CMD_ENABLE, cpuc->idx_mask); + } +} + + +/* + * Main entry point - disable HW performance counters. + */ + +void hw_perf_disable(void) +{ + struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); + + if (!cpuc->enabled) + return; + + cpuc->enabled = 0; + cpuc->n_added = 0; + + wrperfmon(PERFMON_CMD_DISABLE, cpuc->idx_mask); +} + + +/* + * Main entry point - don't know when this is called but it + * obviously dumps debug info. + */ +void perf_event_print_debug(void) +{ + unsigned long flags; + unsigned long pcr; + int pcr0, pcr1; + int cpu; + + if (!supported_cpu()) + return; + + local_irq_save(flags); + + cpu = smp_processor_id(); + + pcr = wrperfmon(PERFMON_CMD_READ, 0); + pcr0 = (pcr >> alpha_pmu->pmc_count_shift[0]) & alpha_pmu->pmc_count_mask[0]; + pcr1 = (pcr >> alpha_pmu->pmc_count_shift[1]) & alpha_pmu->pmc_count_mask[1]; + + pr_info("CPU#%d: PCTR0[%06x] PCTR1[%06x]\n", cpu, pcr0, pcr1); + + local_irq_restore(flags); +} + + +/* + * Performance Monitoring Interrupt Service Routine called when a PMC + * overflows. The PMC that overflowed is passed in la_ptr. + */ +static void alpha_perf_event_irq_handler(unsigned long la_ptr, + struct pt_regs *regs) +{ + struct cpu_hw_events *cpuc; + struct perf_sample_data data; + struct perf_event *event; + struct hw_perf_event *hwc; + int idx, j; + + __get_cpu_var(irq_pmi_count)++; + cpuc = &__get_cpu_var(cpu_hw_events); + + /* Completely counting through the PMC's period to trigger a new PMC + * overflow interrupt while in this interrupt routine is utterly + * disastrous! The EV6 and EV67 counters are sufficiently large to + * prevent this but to be really sure disable the PMCs. + */ + wrperfmon(PERFMON_CMD_DISABLE, cpuc->idx_mask); + + /* la_ptr is the counter that overflowed. */ + if (unlikely(la_ptr >= perf_max_events)) { + /* This should never occur! */ + irq_err_count++; + pr_warning("PMI: silly index %ld\n", la_ptr); + wrperfmon(PERFMON_CMD_ENABLE, cpuc->idx_mask); + return; + } + + idx = la_ptr; + + perf_sample_data_init(&data, 0); + for (j = 0; j < cpuc->n_events; j++) { + if (cpuc->current_idx[j] == idx) + break; + } + + if (unlikely(j == cpuc->n_events)) { + /* This can occur if the event is disabled right on a PMC overflow. */ + wrperfmon(PERFMON_CMD_ENABLE, cpuc->idx_mask); + return; + } + + event = cpuc->event[j]; + + if (unlikely(!event)) { + /* This should never occur! */ + irq_err_count++; + pr_warning("PMI: No event at index %d!\n", idx); + wrperfmon(PERFMON_CMD_ENABLE, cpuc->idx_mask); + return; + } + + hwc = &event->hw; + alpha_perf_event_update(event, hwc, idx, alpha_pmu->pmc_max_period[idx]+1); + data.period = event->hw.last_period; + + if (alpha_perf_event_set_period(event, hwc, idx)) { + if (perf_event_overflow(event, 1, &data, regs)) { + /* Interrupts coming too quickly; "throttle" the + * counter, i.e., disable it for a little while. + */ + cpuc->idx_mask &= ~(1UL<idx_mask); + + return; +} + + + +/* + * Init call to initialise performance events at kernel startup. + */ +void __init init_hw_perf_events(void) +{ + pr_info("Performance events: "); + + if (!supported_cpu()) { + pr_cont("No support for your CPU.\n"); + return; + } + + pr_cont("Supported CPU type!\n"); + + /* Override performance counter IRQ vector */ + + perf_irq = alpha_perf_event_irq_handler; + + /* And set up PMU specification */ + alpha_pmu = &ev67_pmu; + perf_max_events = alpha_pmu->num_pmcs; +} + diff --git a/trunk/arch/alpha/kernel/process.c b/trunk/arch/alpha/kernel/process.c index 395a464353b8..88e608aebc8c 100644 --- a/trunk/arch/alpha/kernel/process.c +++ b/trunk/arch/alpha/kernel/process.c @@ -387,7 +387,7 @@ EXPORT_SYMBOL(dump_elf_task_fp); * sys_execve() executes a new program. */ asmlinkage int -do_sys_execve(char __user *ufilename, char __user * __user *argv, +do_sys_execve(const char __user *ufilename, char __user * __user *argv, char __user * __user *envp, struct pt_regs *regs) { int error; diff --git a/trunk/arch/alpha/kernel/time.c b/trunk/arch/alpha/kernel/time.c index 1efbed82c0fd..eacceb26d9c8 100644 --- a/trunk/arch/alpha/kernel/time.c +++ b/trunk/arch/alpha/kernel/time.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -82,6 +83,26 @@ static struct { unsigned long est_cycle_freq; +#ifdef CONFIG_PERF_EVENTS + +DEFINE_PER_CPU(u8, perf_event_pending); + +#define set_perf_event_pending_flag() __get_cpu_var(perf_event_pending) = 1 +#define test_perf_event_pending() __get_cpu_var(perf_event_pending) +#define clear_perf_event_pending() __get_cpu_var(perf_event_pending) = 0 + +void set_perf_event_pending(void) +{ + set_perf_event_pending_flag(); +} + +#else /* CONFIG_PERF_EVENTS */ + +#define test_perf_event_pending() 0 +#define clear_perf_event_pending() + +#endif /* CONFIG_PERF_EVENTS */ + static inline __u32 rpcc(void) { @@ -175,6 +196,11 @@ irqreturn_t timer_interrupt(int irq, void *dev) update_process_times(user_mode(get_irq_regs())); #endif + if (test_perf_event_pending()) { + clear_perf_event_pending(); + perf_event_do_pending(); + } + return IRQ_HANDLED; } diff --git a/trunk/arch/arm/Kconfig b/trunk/arch/arm/Kconfig index 232f0c758252..92951103255a 100644 --- a/trunk/arch/arm/Kconfig +++ b/trunk/arch/arm/Kconfig @@ -644,6 +644,7 @@ config ARCH_S3C2410 select ARCH_HAS_CPUFREQ select HAVE_CLK select ARCH_USES_GETTIMEOFFSET + select HAVE_S3C2410_I2C help Samsung S3C2410X CPU based systems, such as the Simtec Electronics BAST (), the IPAQ 1940 or @@ -673,6 +674,8 @@ config ARCH_S3C64XX select S3C_DEV_NAND select USB_ARCH_HAS_OHCI select SAMSUNG_GPIOLIB_4BIT + select HAVE_S3C2410_I2C + select HAVE_S3C2410_WATCHDOG help Samsung S3C64XX series based systems @@ -681,7 +684,10 @@ config ARCH_S5P6440 select CPU_V6 select GENERIC_GPIO select HAVE_CLK + select HAVE_S3C2410_WATCHDOG select ARCH_USES_GETTIMEOFFSET + select HAVE_S3C2410_I2C + select HAVE_S3C_RTC help Samsung S5P6440 CPU based systems @@ -691,6 +697,7 @@ config ARCH_S5P6442 select GENERIC_GPIO select HAVE_CLK select ARCH_USES_GETTIMEOFFSET + select HAVE_S3C2410_WATCHDOG help Samsung S5P6442 CPU based systems @@ -701,6 +708,9 @@ config ARCH_S5PC100 select CPU_V7 select ARM_L1_CACHE_SHIFT_6 select ARCH_USES_GETTIMEOFFSET + select HAVE_S3C2410_I2C + select HAVE_S3C_RTC + select HAVE_S3C2410_WATCHDOG help Samsung S5PC100 series based systems @@ -711,9 +721,21 @@ config ARCH_S5PV210 select HAVE_CLK select ARM_L1_CACHE_SHIFT_6 select ARCH_USES_GETTIMEOFFSET + select HAVE_S3C2410_I2C + select HAVE_S3C_RTC + select HAVE_S3C2410_WATCHDOG help Samsung S5PV210/S5PC110 series based systems +config ARCH_S5PV310 + bool "Samsung S5PV310/S5PC210" + select CPU_V7 + select GENERIC_GPIO + select HAVE_CLK + select GENERIC_CLOCKEVENTS + help + Samsung S5PV310 series based systems + config ARCH_SHARK bool "Shark" select CPU_SA110 @@ -915,6 +937,8 @@ source "arch/arm/mach-s5pc100/Kconfig" source "arch/arm/mach-s5pv210/Kconfig" +source "arch/arm/mach-s5pv310/Kconfig" + source "arch/arm/mach-shmobile/Kconfig" source "arch/arm/plat-stmp3xxx/Kconfig" @@ -1040,6 +1064,18 @@ config PL310_ERRATA_588369 is not correctly implemented in PL310 as clean lines are not invalidated as a result of these operations. Note that this errata uses Texas Instrument's secure monitor api. + +config ARM_ERRATA_720789 + bool "ARM errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a faulty ASID" + depends on CPU_V7 && SMP + help + This option enables the workaround for the 720789 Cortex-A9 (prior to + r2p0) erratum. A faulty ASID can be sent to the other CPUs for the + broadcasted CP15 TLB maintenance operations TLBIASIDIS and TLBIMVAIS. + As a consequence of this erratum, some TLB entries which should be + invalidated are not, resulting in an incoherency in the system page + tables. The workaround changes the TLB flushing routines to invalidate + entries regardless of the ASID. endmenu source "arch/arm/common/Kconfig" @@ -1108,11 +1144,11 @@ config SMP bool "Symmetric Multi-Processing (EXPERIMENTAL)" depends on EXPERIMENTAL && (REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP ||\ MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 ||\ - ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || ARCH_TEGRA) + ARCH_S5PV310 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4) depends on GENERIC_CLOCKEVENTS select USE_GENERIC_SMP_HELPERS - select HAVE_ARM_SCU if (ARCH_REALVIEW || ARCH_OMAP4 || ARCH_U8500 || \ - ARCH_VEXPRESS_CA9X4 || ARCH_TEGRA) + select HAVE_ARM_SCU if ARCH_REALVIEW || ARCH_OMAP4 || ARCH_S5PV310 ||\ + ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 help This enables support for systems with more than one CPU. If you have a system with only one CPU, like most personal computers, say N. If @@ -1182,10 +1218,10 @@ config LOCAL_TIMERS bool "Use local timer interrupts" depends on SMP && (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || \ REALVIEW_EB_A9MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \ - ARCH_U8500 || ARCH_VEXPRESS_CA9X4 || ARCH_TEGRA) + ARCH_S5PV310 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4) default y - select HAVE_ARM_TWD if (ARCH_REALVIEW || ARCH_VEXPRESS || ARCH_OMAP4 || \\ - ARCH_U8500 || ARCH_TEGRA + select HAVE_ARM_TWD if ARCH_REALVIEW || ARCH_OMAP4 || ARCH_S5PV310 || \ + ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS help Enable support for local timers on SMP platforms, rather then the legacy IPI broadcast method. Local timers allows the system @@ -1196,7 +1232,8 @@ source kernel/Kconfig.preempt config HZ int - default 200 if ARCH_EBSA110 || ARCH_S3C2410 || ARCH_S5P6440 || ARCH_S5P6442 || ARCH_S5PV210 + default 200 if ARCH_EBSA110 || ARCH_S3C2410 || ARCH_S5P6440 || \ + ARCH_S5P6442 || ARCH_S5PV210 || ARCH_S5PV310 default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER default AT91_TIMER_HZ if ARCH_AT91 default SHMOBILE_TIMER_HZ if ARCH_SHMOBILE diff --git a/trunk/arch/arm/Makefile b/trunk/arch/arm/Makefile index a8d4dca9da35..99b8200138d2 100644 --- a/trunk/arch/arm/Makefile +++ b/trunk/arch/arm/Makefile @@ -174,6 +174,7 @@ machine-$(CONFIG_ARCH_S5P6440) := s5p6440 machine-$(CONFIG_ARCH_S5P6442) := s5p6442 machine-$(CONFIG_ARCH_S5PC100) := s5pc100 machine-$(CONFIG_ARCH_S5PV210) := s5pv210 +machine-$(CONFIG_ARCH_S5PV310) := s5pv310 machine-$(CONFIG_ARCH_SA1100) := sa1100 machine-$(CONFIG_ARCH_SHARK) := shark machine-$(CONFIG_ARCH_SHMOBILE) := shmobile diff --git a/trunk/arch/arm/boot/compressed/Makefile b/trunk/arch/arm/boot/compressed/Makefile index 7636c9b3f9a7..68775e33476c 100644 --- a/trunk/arch/arm/boot/compressed/Makefile +++ b/trunk/arch/arm/boot/compressed/Makefile @@ -33,7 +33,7 @@ ifeq ($(CONFIG_CPU_XSCALE),y) OBJS += head-xscale.o endif -ifeq ($(CONFIG_PXA_SHARPSL),y) +ifeq ($(CONFIG_PXA_SHARPSL_DETECT_MACH_ID),y) OBJS += head-sharpsl.o endif diff --git a/trunk/arch/arm/boot/compressed/head.S b/trunk/arch/arm/boot/compressed/head.S index abf4d65acf62..6af9907c3b5c 100644 --- a/trunk/arch/arm/boot/compressed/head.S +++ b/trunk/arch/arm/boot/compressed/head.S @@ -170,9 +170,8 @@ not_angel: .text adr r0, LC0 - ARM( ldmia r0, {r1, r2, r3, r5, r6, r11, ip, sp}) - THUMB( ldmia r0, {r1, r2, r3, r5, r6, r11, ip} ) - THUMB( ldr sp, [r0, #32] ) + ldmia r0, {r1, r2, r3, r5, r6, r11, ip} + ldr sp, [r0, #28] #ifdef CONFIG_AUTO_ZRELADDR @ determine final kernel image address and r4, pc, #0xf8000000 diff --git a/trunk/arch/arm/common/it8152.c b/trunk/arch/arm/common/it8152.c index 7974baacafce..6c0913562455 100644 --- a/trunk/arch/arm/common/it8152.c +++ b/trunk/arch/arm/common/it8152.c @@ -263,14 +263,6 @@ static int it8152_pci_platform_notify_remove(struct device *dev) return 0; } -int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size) -{ - dev_dbg(dev, "%s: dma_addr %08x, size %08x\n", - __func__, dma_addr, size); - return (dev->bus == &pci_bus_type) && - ((dma_addr + size - PHYS_OFFSET) >= SZ_64M); -} - int __init it8152_pci_setup(int nr, struct pci_sys_data *sys) { it8152_io.start = IT8152_IO_BASE + 0x12000; diff --git a/trunk/arch/arm/configs/s5pc110_defconfig b/trunk/arch/arm/configs/s5pc110_defconfig deleted file mode 100644 index 22c2d147f793..000000000000 --- a/trunk/arch/arm/configs/s5pc110_defconfig +++ /dev/null @@ -1,66 +0,0 @@ -CONFIG_EXPERIMENTAL=y -CONFIG_SYSFS_DEPRECATED_V2=y -CONFIG_BLK_DEV_INITRD=y -CONFIG_KALLSYMS_ALL=y -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_S5PV210=y -CONFIG_S3C_LOWLEVEL_UART_PORT=1 -CONFIG_MACH_SMDKC110=y -CONFIG_VMSPLIT_2G=y -CONFIG_PREEMPT=y -CONFIG_AEABI=y -CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x20800000,8M console=ttySAC1,115200 init=/linuxrc" -CONFIG_VFP=y -CONFIG_NEON=y -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_SIZE=8192 -# CONFIG_MISC_DEVICES is not set -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_CHR_DEV_SG=y -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -CONFIG_INPUT_TOUCHSCREEN=y -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_SAMSUNG=y -CONFIG_SERIAL_SAMSUNG_CONSOLE=y -CONFIG_HW_RANDOM=y -# CONFIG_HWMON is not set -# CONFIG_VGA_CONSOLE is not set -# CONFIG_HID_SUPPORT is not set -# CONFIG_USB_SUPPORT is not set -CONFIG_EXT2_FS=y -CONFIG_INOTIFY=y -CONFIG_MSDOS_FS=y -CONFIG_VFAT_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -CONFIG_CRAMFS=y -CONFIG_ROMFS_FS=y -CONFIG_PARTITION_ADVANCED=y -CONFIG_BSD_DISKLABEL=y -CONFIG_SOLARIS_X86_PARTITION=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ASCII=y -CONFIG_NLS_ISO8859_1=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_PREEMPT is not set -CONFIG_DEBUG_RT_MUTEXES=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y -CONFIG_DEBUG_INFO=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y -CONFIG_DEBUG_LL=y -CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_S3C_UART=1 -CONFIG_CRC_CCITT=y diff --git a/trunk/arch/arm/configs/s5pv210_defconfig b/trunk/arch/arm/configs/s5pv210_defconfig index 1753836d0055..0488a1eb4d7d 100644 --- a/trunk/arch/arm/configs/s5pv210_defconfig +++ b/trunk/arch/arm/configs/s5pv210_defconfig @@ -7,6 +7,11 @@ CONFIG_MODULE_UNLOAD=y # CONFIG_BLK_DEV_BSG is not set CONFIG_ARCH_S5PV210=y CONFIG_S3C_LOWLEVEL_UART_PORT=1 +CONFIG_S3C_DEV_FB=y +CONFIG_S5PV210_SETUP_FB_24BPP=y +CONFIG_MACH_AQUILA=y +CONFIG_MACH_GONI=y +CONFIG_MACH_SMDKC110=y CONFIG_MACH_SMDKV210=y CONFIG_VMSPLIT_2G=y CONFIG_PREEMPT=y diff --git a/trunk/arch/arm/include/asm/cache.h b/trunk/arch/arm/include/asm/cache.h index 66c160b8547f..9d6122096fbe 100644 --- a/trunk/arch/arm/include/asm/cache.h +++ b/trunk/arch/arm/include/asm/cache.h @@ -14,7 +14,7 @@ * cache before the transfer is done, causing old data to be seen by * the CPU. */ -#define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES +#define ARCH_DMA_MINALIGN L1_CACHE_BYTES /* * With EABI on ARMv5 and above we must have 64-bit aligned slab pointers. diff --git a/trunk/arch/arm/include/asm/dma-mapping.h b/trunk/arch/arm/include/asm/dma-mapping.h index 69ce0727edb5..c226fe10553e 100644 --- a/trunk/arch/arm/include/asm/dma-mapping.h +++ b/trunk/arch/arm/include/asm/dma-mapping.h @@ -144,16 +144,6 @@ static inline int dma_set_mask(struct device *dev, u64 dma_mask) return 0; } -static inline int dma_get_cache_alignment(void) -{ - return 32; -} - -static inline int dma_is_consistent(struct device *dev, dma_addr_t handle) -{ - return !!arch_is_coherent(); -} - /* * DMA errors are defined by all-bits-set in the DMA address. */ @@ -298,7 +288,15 @@ extern void dmabounce_unregister_dev(struct device *); * DMA access and 1 if the buffer needs to be bounced. * */ +#ifdef CONFIG_SA1111 extern int dma_needs_bounce(struct device*, dma_addr_t, size_t); +#else +static inline int dma_needs_bounce(struct device *dev, dma_addr_t addr, + size_t size) +{ + return 0; +} +#endif /* * The DMA API, implemented by dmabounce.c. See below for descriptions. diff --git a/trunk/arch/arm/include/asm/elf.h b/trunk/arch/arm/include/asm/elf.h index 6750b8e45a49..5747a8baa413 100644 --- a/trunk/arch/arm/include/asm/elf.h +++ b/trunk/arch/arm/include/asm/elf.h @@ -59,6 +59,8 @@ typedef struct user_fp elf_fpregset_t; #define R_ARM_THM_CALL 10 #define R_ARM_THM_JUMP24 30 +#define R_ARM_THM_MOVW_ABS_NC 47 +#define R_ARM_THM_MOVT_ABS 48 /* * These are used to set parameters in the core dumps. diff --git a/trunk/arch/arm/include/asm/hardware/coresight.h b/trunk/arch/arm/include/asm/hardware/coresight.h index f82b25d4f73e..212e47828c79 100644 --- a/trunk/arch/arm/include/asm/hardware/coresight.h +++ b/trunk/arch/arm/include/asm/hardware/coresight.h @@ -48,8 +48,6 @@ struct tracectx { /* CoreSight Component Registers */ #define CSCR_CLASS 0xff4 -#define CSCR_PRSR 0x314 - #define UNLOCK_MAGIC 0xc5acce55 /* ETM control register, "ETM Architecture", 3.3.1 */ @@ -132,6 +130,12 @@ struct tracectx { ETMCTRL_BRANCH_OUTPUT | \ ETMCTRL_DO_CONTEXTID) +/* ETM management registers, "ETM Architecture", 3.5.24 */ +#define ETMMR_OSLAR 0x300 +#define ETMMR_OSLSR 0x304 +#define ETMMR_OSSRR 0x308 +#define ETMMR_PDSR 0x314 + /* ETB registers, "CoreSight Components TRM", 9.3 */ #define ETBR_DEPTH 0x04 #define ETBR_STATUS 0x0c diff --git a/trunk/arch/arm/include/asm/hardware/scoop.h b/trunk/arch/arm/include/asm/hardware/scoop.h index 46492a63a7c4..ebb3ceaa8fac 100644 --- a/trunk/arch/arm/include/asm/hardware/scoop.h +++ b/trunk/arch/arm/include/asm/hardware/scoop.h @@ -22,18 +22,23 @@ #define SCOOP_GPWR 0x24 #define SCOOP_GPRR 0x28 -#define SCOOP_GPCR_PA22 ( 1 << 12 ) -#define SCOOP_GPCR_PA21 ( 1 << 11 ) -#define SCOOP_GPCR_PA20 ( 1 << 10 ) -#define SCOOP_GPCR_PA19 ( 1 << 9 ) -#define SCOOP_GPCR_PA18 ( 1 << 8 ) -#define SCOOP_GPCR_PA17 ( 1 << 7 ) -#define SCOOP_GPCR_PA16 ( 1 << 6 ) -#define SCOOP_GPCR_PA15 ( 1 << 5 ) -#define SCOOP_GPCR_PA14 ( 1 << 4 ) -#define SCOOP_GPCR_PA13 ( 1 << 3 ) -#define SCOOP_GPCR_PA12 ( 1 << 2 ) -#define SCOOP_GPCR_PA11 ( 1 << 1 ) +#define SCOOP_CPR_OUT (1 << 7) +#define SCOOP_CPR_SD_3V (1 << 2) +#define SCOOP_CPR_CF_XV (1 << 1) +#define SCOOP_CPR_CF_3V (1 << 0) + +#define SCOOP_GPCR_PA22 (1 << 12) +#define SCOOP_GPCR_PA21 (1 << 11) +#define SCOOP_GPCR_PA20 (1 << 10) +#define SCOOP_GPCR_PA19 (1 << 9) +#define SCOOP_GPCR_PA18 (1 << 8) +#define SCOOP_GPCR_PA17 (1 << 7) +#define SCOOP_GPCR_PA16 (1 << 6) +#define SCOOP_GPCR_PA15 (1 << 5) +#define SCOOP_GPCR_PA14 (1 << 4) +#define SCOOP_GPCR_PA13 (1 << 3) +#define SCOOP_GPCR_PA12 (1 << 2) +#define SCOOP_GPCR_PA11 (1 << 1) struct scoop_config { unsigned short io_out; diff --git a/trunk/arch/arm/include/asm/highmem.h b/trunk/arch/arm/include/asm/highmem.h index feb988a7ec37..5aff58126602 100644 --- a/trunk/arch/arm/include/asm/highmem.h +++ b/trunk/arch/arm/include/asm/highmem.h @@ -36,7 +36,7 @@ extern void kunmap_high_l1_vipt(struct page *page, pte_t saved_pte); extern void *kmap(struct page *page); extern void kunmap(struct page *page); extern void *kmap_atomic(struct page *page, enum km_type type); -extern void kunmap_atomic(void *kvaddr, enum km_type type); +extern void kunmap_atomic_notypecheck(void *kvaddr, enum km_type type); extern void *kmap_atomic_pfn(unsigned long pfn, enum km_type type); extern struct page *kmap_atomic_to_page(const void *ptr); #endif diff --git a/trunk/arch/arm/include/asm/ioctls.h b/trunk/arch/arm/include/asm/ioctls.h index 7f0b6d13296a..0b30894b5482 100644 --- a/trunk/arch/arm/include/asm/ioctls.h +++ b/trunk/arch/arm/include/asm/ioctls.h @@ -52,6 +52,7 @@ #define TCSETSF2 _IOW('T',0x2D, struct termios2) #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ +#define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ #define TIOCGRS485 0x542E #define TIOCSRS485 0x542F @@ -81,6 +82,7 @@ #define TIOCPKT_START 8 #define TIOCPKT_NOSTOP 16 #define TIOCPKT_DOSTOP 32 +#define TIOCPKT_IOCTL 64 #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ diff --git a/trunk/arch/arm/include/asm/termbits.h b/trunk/arch/arm/include/asm/termbits.h index f784d11f40b5..704135d28d1d 100644 --- a/trunk/arch/arm/include/asm/termbits.h +++ b/trunk/arch/arm/include/asm/termbits.h @@ -177,6 +177,7 @@ struct ktermios { #define FLUSHO 0010000 #define PENDIN 0040000 #define IEXTEN 0100000 +#define EXTPROC 0200000 /* tcflow() and TCXONC use these */ #define TCOOFF 0 diff --git a/trunk/arch/arm/include/asm/tlbflush.h b/trunk/arch/arm/include/asm/tlbflush.h index bd863d8608cd..33b546ae72d4 100644 --- a/trunk/arch/arm/include/asm/tlbflush.h +++ b/trunk/arch/arm/include/asm/tlbflush.h @@ -378,7 +378,11 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm) if (tlb_flag(TLB_V6_I_ASID)) asm("mcr p15, 0, %0, c8, c5, 2" : : "r" (asid) : "cc"); if (tlb_flag(TLB_V7_UIS_ASID)) +#ifdef CONFIG_ARM_ERRATA_720789 + asm("mcr p15, 0, %0, c8, c3, 0" : : "r" (zero) : "cc"); +#else asm("mcr p15, 0, %0, c8, c3, 2" : : "r" (asid) : "cc"); +#endif if (tlb_flag(TLB_BTB)) { /* flush the branch target cache */ @@ -424,7 +428,11 @@ local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) if (tlb_flag(TLB_V6_I_PAGE)) asm("mcr p15, 0, %0, c8, c5, 1" : : "r" (uaddr) : "cc"); if (tlb_flag(TLB_V7_UIS_PAGE)) +#ifdef CONFIG_ARM_ERRATA_720789 + asm("mcr p15, 0, %0, c8, c3, 3" : : "r" (uaddr & PAGE_MASK) : "cc"); +#else asm("mcr p15, 0, %0, c8, c3, 1" : : "r" (uaddr) : "cc"); +#endif if (tlb_flag(TLB_BTB)) { /* flush the branch target cache */ diff --git a/trunk/arch/arm/kernel/entry-common.S b/trunk/arch/arm/kernel/entry-common.S index 2c1db77d7848..f05a35a59694 100644 --- a/trunk/arch/arm/kernel/entry-common.S +++ b/trunk/arch/arm/kernel/entry-common.S @@ -92,75 +92,111 @@ ENDPROC(ret_from_fork) #define CALL(x) .long x #ifdef CONFIG_FUNCTION_TRACER +/* + * When compiling with -pg, gcc inserts a call to the mcount routine at the + * start of every function. In mcount, apart from the function's address (in + * lr), we need to get hold of the function's caller's address. + * + * Older GCCs (pre-4.4) inserted a call to a routine called mcount like this: + * + * bl mcount + * + * These versions have the limitation that in order for the mcount routine to + * be able to determine the function's caller's address, an APCS-style frame + * pointer (which is set up with something like the code below) is required. + * + * mov ip, sp + * push {fp, ip, lr, pc} + * sub fp, ip, #4 + * + * With EABI, these frame pointers are not available unless -mapcs-frame is + * specified, and if building as Thumb-2, not even then. + * + * Newer GCCs (4.4+) solve this problem by introducing a new version of mcount, + * with call sites like: + * + * push {lr} + * bl __gnu_mcount_nc + * + * With these compilers, frame pointers are not necessary. + * + * mcount can be thought of as a function called in the middle of a subroutine + * call. As such, it needs to be transparent for both the caller and the + * callee: the original lr needs to be restored when leaving mcount, and no + * registers should be clobbered. (In the __gnu_mcount_nc implementation, we + * clobber the ip register. This is OK because the ARM calling convention + * allows it to be clobbered in subroutines and doesn't use it to hold + * parameters.) + */ #ifdef CONFIG_DYNAMIC_FTRACE ENTRY(mcount) - stmdb sp!, {r0-r3, lr} - mov r0, lr - sub r0, r0, #MCOUNT_INSN_SIZE + stmdb sp!, {r0-r3, lr} + mov r0, lr + sub r0, r0, #MCOUNT_INSN_SIZE .globl mcount_call mcount_call: - bl ftrace_stub - ldr lr, [fp, #-4] @ restore lr - ldmia sp!, {r0-r3, pc} + bl ftrace_stub + ldr lr, [fp, #-4] @ restore lr + ldmia sp!, {r0-r3, pc} ENTRY(ftrace_caller) - stmdb sp!, {r0-r3, lr} - ldr r1, [fp, #-4] - mov r0, lr - sub r0, r0, #MCOUNT_INSN_SIZE + stmdb sp!, {r0-r3, lr} + ldr r1, [fp, #-4] + mov r0, lr + sub r0, r0, #MCOUNT_INSN_SIZE .globl ftrace_call ftrace_call: - bl ftrace_stub - ldr lr, [fp, #-4] @ restore lr - ldmia sp!, {r0-r3, pc} + bl ftrace_stub + ldr lr, [fp, #-4] @ restore lr + ldmia sp!, {r0-r3, pc} #else ENTRY(__gnu_mcount_nc) - stmdb sp!, {r0-r3, lr} - ldr r0, =ftrace_trace_function - ldr r2, [r0] - adr r0, ftrace_stub - cmp r0, r2 - bne gnu_trace - ldmia sp!, {r0-r3, ip, lr} - mov pc, ip + stmdb sp!, {r0-r3, lr} + ldr r0, =ftrace_trace_function + ldr r2, [r0] + adr r0, ftrace_stub + cmp r0, r2 + bne gnu_trace + ldmia sp!, {r0-r3, ip, lr} + mov pc, ip gnu_trace: - ldr r1, [sp, #20] @ lr of instrumented routine - mov r0, lr - sub r0, r0, #MCOUNT_INSN_SIZE - mov lr, pc - mov pc, r2 - ldmia sp!, {r0-r3, ip, lr} - mov pc, ip + ldr r1, [sp, #20] @ lr of instrumented routine + mov r0, lr + sub r0, r0, #MCOUNT_INSN_SIZE + mov lr, pc + mov pc, r2 + ldmia sp!, {r0-r3, ip, lr} + mov pc, ip ENTRY(mcount) - stmdb sp!, {r0-r3, lr} - ldr r0, =ftrace_trace_function - ldr r2, [r0] - adr r0, ftrace_stub - cmp r0, r2 - bne trace - ldr lr, [fp, #-4] @ restore lr - ldmia sp!, {r0-r3, pc} + stmdb sp!, {r0-r3, lr} + ldr r0, =ftrace_trace_function + ldr r2, [r0] + adr r0, ftrace_stub + cmp r0, r2 + bne trace + ldr lr, [fp, #-4] @ restore lr + ldmia sp!, {r0-r3, pc} trace: - ldr r1, [fp, #-4] @ lr of instrumented routine - mov r0, lr - sub r0, r0, #MCOUNT_INSN_SIZE - mov lr, pc - mov pc, r2 - ldr lr, [fp, #-4] @ restore lr - ldmia sp!, {r0-r3, pc} + ldr r1, [fp, #-4] @ lr of instrumented routine + mov r0, lr + sub r0, r0, #MCOUNT_INSN_SIZE + mov lr, pc + mov pc, r2 + ldr lr, [fp, #-4] @ restore lr + ldmia sp!, {r0-r3, pc} #endif /* CONFIG_DYNAMIC_FTRACE */ .globl ftrace_stub ftrace_stub: - mov pc, lr + mov pc, lr #endif /* CONFIG_FUNCTION_TRACER */ diff --git a/trunk/arch/arm/kernel/etm.c b/trunk/arch/arm/kernel/etm.c index 827753966301..56418f98cd01 100644 --- a/trunk/arch/arm/kernel/etm.c +++ b/trunk/arch/arm/kernel/etm.c @@ -543,7 +543,9 @@ static int __init etm_probe(struct amba_device *dev, struct amba_id *id) t->etm_portsz = 1; etm_unlock(t); - ret = etm_readl(t, CSCR_PRSR); + (void)etm_readl(t, ETMMR_PDSR); + /* dummy first read */ + (void)etm_readl(&tracer, ETMMR_OSSRR); t->ncmppairs = etm_readl(t, ETMR_CONFCODE) & 0xf; etm_writel(t, 0x440, ETMR_CTRL); diff --git a/trunk/arch/arm/kernel/module.c b/trunk/arch/arm/kernel/module.c index c628bdf6c430..6b4605893f1e 100644 --- a/trunk/arch/arm/kernel/module.c +++ b/trunk/arch/arm/kernel/module.c @@ -102,7 +102,9 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned long loc; Elf32_Sym *sym; s32 offset; +#ifdef CONFIG_THUMB2_KERNEL u32 upper, lower, sign, j1, j2; +#endif offset = ELF32_R_SYM(rel->r_info); if (offset < 0 || offset > (symsec->sh_size / sizeof(Elf32_Sym))) { @@ -185,6 +187,7 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, (offset & 0x0fff); break; +#ifdef CONFIG_THUMB2_KERNEL case R_ARM_THM_CALL: case R_ARM_THM_JUMP24: upper = *(u16 *)loc; @@ -233,9 +236,40 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, *(u16 *)(loc + 2) = (u16)((lower & 0xd000) | (j1 << 13) | (j2 << 11) | ((offset >> 1) & 0x07ff)); + break; + + case R_ARM_THM_MOVW_ABS_NC: + case R_ARM_THM_MOVT_ABS: upper = *(u16 *)loc; lower = *(u16 *)(loc + 2); + + /* + * MOVT/MOVW instructions encoding in Thumb-2: + * + * i = upper[10] + * imm4 = upper[3:0] + * imm3 = lower[14:12] + * imm8 = lower[7:0] + * + * imm16 = imm4:i:imm3:imm8 + */ + offset = ((upper & 0x000f) << 12) | + ((upper & 0x0400) << 1) | + ((lower & 0x7000) >> 4) | (lower & 0x00ff); + offset = (offset ^ 0x8000) - 0x8000; + offset += sym->st_value; + + if (ELF32_R_TYPE(rel->r_info) == R_ARM_THM_MOVT_ABS) + offset >>= 16; + + *(u16 *)loc = (u16)((upper & 0xfbf0) | + ((offset & 0xf000) >> 12) | + ((offset & 0x0800) >> 1)); + *(u16 *)(loc + 2) = (u16)((lower & 0x8f00) | + ((offset & 0x0700) << 4) | + (offset & 0x00ff)); break; +#endif default: printk(KERN_ERR "%s: unknown relocation: %u\n", diff --git a/trunk/arch/arm/kernel/sys_arm.c b/trunk/arch/arm/kernel/sys_arm.c index c23501842b98..5b7c541a4c63 100644 --- a/trunk/arch/arm/kernel/sys_arm.c +++ b/trunk/arch/arm/kernel/sys_arm.c @@ -62,7 +62,7 @@ asmlinkage int sys_vfork(struct pt_regs *regs) /* sys_execve() executes a new program. * This is called indirectly via a small wrapper */ -asmlinkage int sys_execve(char __user *filenamei, char __user * __user *argv, +asmlinkage int sys_execve(const char __user *filenamei, char __user * __user *argv, char __user * __user *envp, struct pt_regs *regs) { int error; @@ -84,7 +84,7 @@ int kernel_execve(const char *filename, char *const argv[], char *const envp[]) int ret; memset(®s, 0, sizeof(struct pt_regs)); - ret = do_execve((char *)filename, (char __user * __user *)argv, + ret = do_execve(filename, (char __user * __user *)argv, (char __user * __user *)envp, ®s); if (ret < 0) goto out; diff --git a/trunk/arch/arm/kernel/sys_oabi-compat.c b/trunk/arch/arm/kernel/sys_oabi-compat.c index 33ff678e32f2..4ad8da15ef2b 100644 --- a/trunk/arch/arm/kernel/sys_oabi-compat.c +++ b/trunk/arch/arm/kernel/sys_oabi-compat.c @@ -141,7 +141,7 @@ static long cp_oldabi_stat64(struct kstat *stat, return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; } -asmlinkage long sys_oabi_stat64(char __user * filename, +asmlinkage long sys_oabi_stat64(const char __user * filename, struct oldabi_stat64 __user * statbuf) { struct kstat stat; @@ -151,7 +151,7 @@ asmlinkage long sys_oabi_stat64(char __user * filename, return error; } -asmlinkage long sys_oabi_lstat64(char __user * filename, +asmlinkage long sys_oabi_lstat64(const char __user * filename, struct oldabi_stat64 __user * statbuf) { struct kstat stat; @@ -172,7 +172,7 @@ asmlinkage long sys_oabi_fstat64(unsigned long fd, } asmlinkage long sys_oabi_fstatat64(int dfd, - char __user *filename, + const char __user *filename, struct oldabi_stat64 __user *statbuf, int flag) { diff --git a/trunk/arch/arm/mach-at91/board-cam60.c b/trunk/arch/arm/mach-at91/board-cam60.c index 02138af631e7..44eb9f764938 100644 --- a/trunk/arch/arm/mach-at91/board-cam60.c +++ b/trunk/arch/arm/mach-at91/board-cam60.c @@ -75,7 +75,7 @@ static struct at91_usbh_data __initdata cam60_usbh_data = { * SPI devices. */ #if defined(CONFIG_MTD_DATAFLASH) -static struct mtd_partition __initdata cam60_spi_partitions[] = { +static struct mtd_partition cam60_spi_partitions[] = { { .name = "BOOT1", .offset = 0, @@ -98,14 +98,14 @@ static struct mtd_partition __initdata cam60_spi_partitions[] = { }, }; -static struct flash_platform_data __initdata cam60_spi_flash_platform_data = { +static struct flash_platform_data cam60_spi_flash_platform_data = { .name = "spi_flash", .parts = cam60_spi_partitions, .nr_parts = ARRAY_SIZE(cam60_spi_partitions) }; #endif -static struct spi_board_info cam60_spi_devices[] = { +static struct spi_board_info cam60_spi_devices[] __initdata = { #if defined(CONFIG_MTD_DATAFLASH) { /* DataFlash chip */ .modalias = "mtd_dataflash", diff --git a/trunk/arch/arm/mach-clps711x/include/mach/hardware.h b/trunk/arch/arm/mach-clps711x/include/mach/hardware.h index b3ebe9e4871f..d0b7d870be9c 100644 --- a/trunk/arch/arm/mach-clps711x/include/mach/hardware.h +++ b/trunk/arch/arm/mach-clps711x/include/mach/hardware.h @@ -69,13 +69,6 @@ #define SYSPLD_VIRT_BASE 0xfe000000 #define SYSPLD_BASE SYSPLD_VIRT_BASE -#ifndef __ASSEMBLER__ - -#define PCIO_BASE IO_BASE - -#endif - - #if defined (CONFIG_ARCH_AUTCPU12) #define CS89712_VIRT_BASE CLPS7111_VIRT_BASE diff --git a/trunk/arch/arm/mach-gemini/Kconfig b/trunk/arch/arm/mach-gemini/Kconfig index 515b75cf2e8b..6f066ee4bf24 100644 --- a/trunk/arch/arm/mach-gemini/Kconfig +++ b/trunk/arch/arm/mach-gemini/Kconfig @@ -2,6 +2,13 @@ if ARCH_GEMINI menu "Cortina Systems Gemini Implementations" +config MACH_NAS4220B + bool "Raidsonic NAS-4220-B" + select GEMINI_MEM_SWAP + help + Say Y here if you intend to run this kernel on a + Raidsonic NAS-4220-B. + config MACH_RUT100 bool "Teltonika RUT100" select GEMINI_MEM_SWAP @@ -9,6 +16,20 @@ config MACH_RUT100 Say Y here if you intend to run this kernel on a Teltonika 3G Router RUT100. +config MACH_WBD111 + bool "Wiliboard WBD-111" + select GEMINI_MEM_SWAP + help + Say Y here if you intend to run this kernel on a + Wiliboard WBD-111. + +config MACH_WBD222 + bool "Wiliboard WBD-222" + select GEMINI_MEM_SWAP + help + Say Y here if you intend to run this kernel on a + Wiliboard WBD-222. + endmenu config GEMINI_MEM_SWAP diff --git a/trunk/arch/arm/mach-gemini/Makefile b/trunk/arch/arm/mach-gemini/Makefile index 719505b81821..c5b24b95a76e 100644 --- a/trunk/arch/arm/mach-gemini/Makefile +++ b/trunk/arch/arm/mach-gemini/Makefile @@ -7,4 +7,7 @@ obj-y := irq.o mm.o time.o devices.o gpio.o # Board-specific support +obj-$(CONFIG_MACH_NAS4220B) += board-nas4220b.o obj-$(CONFIG_MACH_RUT100) += board-rut1xx.o +obj-$(CONFIG_MACH_WBD111) += board-wbd111.o +obj-$(CONFIG_MACH_WBD222) += board-wbd222.o diff --git a/trunk/arch/arm/mach-gemini/board-nas4220b.c b/trunk/arch/arm/mach-gemini/board-nas4220b.c new file mode 100644 index 000000000000..01f1d6daab44 --- /dev/null +++ b/trunk/arch/arm/mach-gemini/board-nas4220b.c @@ -0,0 +1,111 @@ +/* + * Support for Raidsonic NAS-4220-B + * + * Copyright (C) 2009 Janos Laube + * + * based on rut1xx.c + * Copyright (C) 2008 Paulius Zaleckas + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include "common.h" + +static struct sys_timer ib4220b_timer = { + .init = gemini_timer_init, +}; + +static struct gpio_led ib4220b_leds[] = { + { + .name = "nas4220b:orange:hdd", + .default_trigger = "none", + .gpio = 60, + }, + { + .name = "nas4220b:green:os", + .default_trigger = "heartbeat", + .gpio = 62, + }, +}; + +static struct gpio_led_platform_data ib4220b_leds_data = { + .num_leds = ARRAY_SIZE(ib4220b_leds), + .leds = ib4220b_leds, +}; + +static struct platform_device ib4220b_led_device = { + .name = "leds-gpio", + .id = -1, + .dev = { + .platform_data = &ib4220b_leds_data, + }, +}; + +static struct gpio_keys_button ib4220b_keys[] = { + { + .code = KEY_SETUP, + .gpio = 61, + .active_low = 1, + .desc = "Backup Button", + .type = EV_KEY, + }, + { + .code = KEY_RESTART, + .gpio = 63, + .active_low = 1, + .desc = "Softreset Button", + .type = EV_KEY, + }, +}; + +static struct gpio_keys_platform_data ib4220b_keys_data = { + .buttons = ib4220b_keys, + .nbuttons = ARRAY_SIZE(ib4220b_keys), +}; + +static struct platform_device ib4220b_key_device = { + .name = "gpio-keys", + .id = -1, + .dev = { + .platform_data = &ib4220b_keys_data, + }, +}; + +static void __init ib4220b_init(void) +{ + gemini_gpio_init(); + platform_register_uart(); + platform_register_pflash(SZ_16M, NULL, 0); + platform_device_register(&ib4220b_led_device); + platform_device_register(&ib4220b_key_device); +} + +MACHINE_START(NAS4220B, "Raidsonic NAS IB-4220-B") + .phys_io = 0x7fffc000, + .io_pg_offst = ((0xffffc000) >> 18) & 0xfffc, + .boot_params = 0x100, + .map_io = gemini_map_io, + .init_irq = gemini_init_irq, + .timer = &ib4220b_timer, + .init_machine = ib4220b_init, +MACHINE_END diff --git a/trunk/arch/arm/mach-gemini/board-wbd111.c b/trunk/arch/arm/mach-gemini/board-wbd111.c new file mode 100644 index 000000000000..36538c15b3c4 --- /dev/null +++ b/trunk/arch/arm/mach-gemini/board-wbd111.c @@ -0,0 +1,143 @@ +/* + * Support for Wiliboard WBD-111 + * + * Copyright (C) 2009 Imre Kaloz + * + * 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. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include "common.h" + +static struct gpio_keys_button wbd111_keys[] = { + { + .code = KEY_SETUP, + .gpio = 5, + .active_low = 1, + .desc = "reset", + .type = EV_KEY, + }, +}; + +static struct gpio_keys_platform_data wbd111_keys_data = { + .buttons = wbd111_keys, + .nbuttons = ARRAY_SIZE(wbd111_keys), +}; + +static struct platform_device wbd111_keys_device = { + .name = "gpio-keys", + .id = -1, + .dev = { + .platform_data = &wbd111_keys_data, + }, +}; + +static struct gpio_led wbd111_leds[] = { + { + .name = "L3red", + .gpio = 1, + }, + { + .name = "L4green", + .gpio = 2, + }, + { + .name = "L4red", + .gpio = 3, + }, + { + .name = "L3green", + .gpio = 5, + }, +}; + +static struct gpio_led_platform_data wbd111_leds_data = { + .num_leds = ARRAY_SIZE(wbd111_leds), + .leds = wbd111_leds, +}; + +static struct platform_device wbd111_leds_device = { + .name = "leds-gpio", + .id = -1, + .dev = { + .platform_data = &wbd111_leds_data, + }, +}; + +static struct sys_timer wbd111_timer = { + .init = gemini_timer_init, +}; + +#ifdef CONFIG_MTD_PARTITIONS +static struct mtd_partition wbd111_partitions[] = { + { + .name = "RedBoot", + .offset = 0, + .size = 0x020000, + .mask_flags = MTD_WRITEABLE, + } , { + .name = "kernel", + .offset = 0x020000, + .size = 0x100000, + } , { + .name = "rootfs", + .offset = 0x120000, + .size = 0x6a0000, + } , { + .name = "VCTL", + .offset = 0x7c0000, + .size = 0x010000, + .mask_flags = MTD_WRITEABLE, + } , { + .name = "cfg", + .offset = 0x7d0000, + .size = 0x010000, + .mask_flags = MTD_WRITEABLE, + } , { + .name = "FIS", + .offset = 0x7e0000, + .size = 0x010000, + .mask_flags = MTD_WRITEABLE, + } +}; +#define wbd111_num_partitions ARRAY_SIZE(wbd111_partitions) +#else +#define wbd111_partitions NULL +#define wbd111_num_partitions 0 +#endif /* CONFIG_MTD_PARTITIONS */ + +static void __init wbd111_init(void) +{ + gemini_gpio_init(); + platform_register_uart(); + platform_register_pflash(SZ_8M, wbd111_partitions, + wbd111_num_partitions); + platform_device_register(&wbd111_leds_device); + platform_device_register(&wbd111_keys_device); +} + +MACHINE_START(WBD111, "Wiliboard WBD-111") + .phys_io = 0x7fffc000, + .io_pg_offst = ((0xffffc000) >> 18) & 0xfffc, + .boot_params = 0x100, + .map_io = gemini_map_io, + .init_irq = gemini_init_irq, + .timer = &wbd111_timer, + .init_machine = wbd111_init, +MACHINE_END diff --git a/trunk/arch/arm/mach-gemini/board-wbd222.c b/trunk/arch/arm/mach-gemini/board-wbd222.c new file mode 100644 index 000000000000..ece8b4c65110 --- /dev/null +++ b/trunk/arch/arm/mach-gemini/board-wbd222.c @@ -0,0 +1,143 @@ +/* + * Support for Wiliboard WBD-222 + * + * Copyright (C) 2009 Imre Kaloz + * + * 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. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include "common.h" + +static struct gpio_keys_button wbd222_keys[] = { + { + .code = KEY_SETUP, + .gpio = 5, + .active_low = 1, + .desc = "reset", + .type = EV_KEY, + }, +}; + +static struct gpio_keys_platform_data wbd222_keys_data = { + .buttons = wbd222_keys, + .nbuttons = ARRAY_SIZE(wbd222_keys), +}; + +static struct platform_device wbd222_keys_device = { + .name = "gpio-keys", + .id = -1, + .dev = { + .platform_data = &wbd222_keys_data, + }, +}; + +static struct gpio_led wbd222_leds[] = { + { + .name = "L3red", + .gpio = 1, + }, + { + .name = "L4green", + .gpio = 2, + }, + { + .name = "L4red", + .gpio = 3, + }, + { + .name = "L3green", + .gpio = 5, + }, +}; + +static struct gpio_led_platform_data wbd222_leds_data = { + .num_leds = ARRAY_SIZE(wbd222_leds), + .leds = wbd222_leds, +}; + +static struct platform_device wbd222_leds_device = { + .name = "leds-gpio", + .id = -1, + .dev = { + .platform_data = &wbd222_leds_data, + }, +}; + +static struct sys_timer wbd222_timer = { + .init = gemini_timer_init, +}; + +#ifdef CONFIG_MTD_PARTITIONS +static struct mtd_partition wbd222_partitions[] = { + { + .name = "RedBoot", + .offset = 0, + .size = 0x020000, + .mask_flags = MTD_WRITEABLE, + } , { + .name = "kernel", + .offset = 0x020000, + .size = 0x100000, + } , { + .name = "rootfs", + .offset = 0x120000, + .size = 0x6a0000, + } , { + .name = "VCTL", + .offset = 0x7c0000, + .size = 0x010000, + .mask_flags = MTD_WRITEABLE, + } , { + .name = "cfg", + .offset = 0x7d0000, + .size = 0x010000, + .mask_flags = MTD_WRITEABLE, + } , { + .name = "FIS", + .offset = 0x7e0000, + .size = 0x010000, + .mask_flags = MTD_WRITEABLE, + } +}; +#define wbd222_num_partitions ARRAY_SIZE(wbd222_partitions) +#else +#define wbd222_partitions NULL +#define wbd222_num_partitions 0 +#endif /* CONFIG_MTD_PARTITIONS */ + +static void __init wbd222_init(void) +{ + gemini_gpio_init(); + platform_register_uart(); + platform_register_pflash(SZ_8M, wbd222_partitions, + wbd222_num_partitions); + platform_device_register(&wbd222_leds_device); + platform_device_register(&wbd222_keys_device); +} + +MACHINE_START(WBD222, "Wiliboard WBD-222") + .phys_io = 0x7fffc000, + .io_pg_offst = ((0xffffc000) >> 18) & 0xfffc, + .boot_params = 0x100, + .map_io = gemini_map_io, + .init_irq = gemini_init_irq, + .timer = &wbd222_timer, + .init_machine = wbd222_init, +MACHINE_END diff --git a/trunk/arch/arm/mach-h720x/include/mach/hardware.h b/trunk/arch/arm/mach-h720x/include/mach/hardware.h index 6c19156e2a42..c55a52c6541d 100644 --- a/trunk/arch/arm/mach-h720x/include/mach/hardware.h +++ b/trunk/arch/arm/mach-h720x/include/mach/hardware.h @@ -182,8 +182,6 @@ #define SERIAL_ENABLE_EN (1<<0) /* General defines to pacify gcc */ -#define PCIO_BASE (0) /* for inb, outb and friends */ -#define PCIO_VIRT PCIO_BASE #define __ASM_ARCH_HARDWARE_INCMACH_H #include "boards.h" diff --git a/trunk/arch/arm/mach-imx/mach-pca100.c b/trunk/arch/arm/mach-imx/mach-pca100.c index 6c92deaf468f..a389d1148f18 100644 --- a/trunk/arch/arm/mach-imx/mach-pca100.c +++ b/trunk/arch/arm/mach-imx/mach-pca100.c @@ -408,7 +408,7 @@ static void __init pca100_init(void) mxc_gpio_mode(GPIO_PORTD | 27 | GPIO_GPIO | GPIO_IN); spi_register_board_info(pca100_spi_board_info, ARRAY_SIZE(pca100_spi_board_info)); - imx27_add_spi_imx0(&pca100_spi_0_data); + imx27_add_spi_imx0(&pca100_spi0_data); #endif gpio_request(OTG_PHY_CS_GPIO, "usb-otg-cs"); diff --git a/trunk/arch/arm/mach-integrator/include/mach/hardware.h b/trunk/arch/arm/mach-integrator/include/mach/hardware.h index 8e26360ce9a3..57f51ba11251 100644 --- a/trunk/arch/arm/mach-integrator/include/mach/hardware.h +++ b/trunk/arch/arm/mach-integrator/include/mach/hardware.h @@ -32,7 +32,6 @@ #define IO_SIZE 0x0B000000 // How much? #define IO_START INTEGRATOR_HDR_BASE // PA of IO -#define PCIO_BASE PCI_IO_VADDR #define PCIMEM_BASE PCI_MEMORY_VADDR #define pcibios_assign_all_busses() 1 diff --git a/trunk/arch/arm/mach-ixp23xx/include/mach/hardware.h b/trunk/arch/arm/mach-ixp23xx/include/mach/hardware.h index c3192009a886..57b508bfe280 100644 --- a/trunk/arch/arm/mach-ixp23xx/include/mach/hardware.h +++ b/trunk/arch/arm/mach-ixp23xx/include/mach/hardware.h @@ -15,7 +15,6 @@ #define __ASM_ARCH_HARDWARE_H /* PCI IO info */ -#define PCIO_BASE IXP23XX_PCI_IO_VIRT #define PCIBIOS_MIN_IO 0x00000000 #define PCIBIOS_MIN_MEM 0xe0000000 diff --git a/trunk/arch/arm/mach-ixp4xx/Kconfig b/trunk/arch/arm/mach-ixp4xx/Kconfig index 9e5070da17ae..6f991c5ae863 100644 --- a/trunk/arch/arm/mach-ixp4xx/Kconfig +++ b/trunk/arch/arm/mach-ixp4xx/Kconfig @@ -140,6 +140,14 @@ config MACH_FSG FSG-3 device. For more information on this platform, see http://www.nslu2-linux.org/wiki/FSG3/HomePage +config MACH_ARCOM_VULCAN + bool + prompt "Arcom/Eurotech Vulcan" + select PCI + help + Say 'Y' here if you want your kernel to support Arcom's + Vulcan board. + # # Certain registers and IRQs are only enabled if supporting IXP465 CPUs # diff --git a/trunk/arch/arm/mach-ixp4xx/Makefile b/trunk/arch/arm/mach-ixp4xx/Makefile index 47d1f60d23fa..d807fc367dd3 100644 --- a/trunk/arch/arm/mach-ixp4xx/Makefile +++ b/trunk/arch/arm/mach-ixp4xx/Makefile @@ -16,6 +16,7 @@ obj-pci-$(CONFIG_MACH_DSMG600) += dsmg600-pci.o obj-pci-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o obj-pci-$(CONFIG_MACH_WG302V2) += wg302v2-pci.o obj-pci-$(CONFIG_MACH_FSG) += fsg-pci.o +obj-pci-$(CONFIG_MACH_ARCOM_VULCAN) += vulcan-pci.o obj-y += common.o @@ -31,6 +32,7 @@ obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-setup.o obj-$(CONFIG_MACH_WG302V2) += wg302v2-setup.o obj-$(CONFIG_MACH_FSG) += fsg-setup.o obj-$(CONFIG_MACH_GORAMO_MLR) += goramo_mlr.o +obj-$(CONFIG_MACH_ARCOM_VULCAN) += vulcan-setup.o obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o obj-$(CONFIG_IXP4XX_QMGR) += ixp4xx_qmgr.o diff --git a/trunk/arch/arm/mach-ixp4xx/include/mach/debug-macro.S b/trunk/arch/arm/mach-ixp4xx/include/mach/debug-macro.S index 893873eb2a0d..3fc66d6d00a0 100644 --- a/trunk/arch/arm/mach-ixp4xx/include/mach/debug-macro.S +++ b/trunk/arch/arm/mach-ixp4xx/include/mach/debug-macro.S @@ -16,8 +16,10 @@ moveq \rx, #0xc8000000 movne \rx, #0xff000000 orrne \rx, \rx, #0x00b00000 +#ifdef __ARMEB__ add \rx,\rx,#3 @ Uart regs are at off set of 3 if @ byte writes used - Big Endian. +#endif .endm #define UART_SHIFT 2 diff --git a/trunk/arch/arm/mach-ixp4xx/include/mach/io.h b/trunk/arch/arm/mach-ixp4xx/include/mach/io.h index 6ea7e2fb2701..de274a1f19d7 100644 --- a/trunk/arch/arm/mach-ixp4xx/include/mach/io.h +++ b/trunk/arch/arm/mach-ixp4xx/include/mach/io.h @@ -353,7 +353,7 @@ static inline unsigned int ioread8(const void __iomem *addr) return (unsigned int)inb(port & PIO_MASK); else #ifndef CONFIG_IXP4XX_INDIRECT_PCI - return (unsigned int)__raw_readb(port); + return (unsigned int)__raw_readb(addr); #else return (unsigned int)__indirect_readb(addr); #endif @@ -381,7 +381,7 @@ static inline unsigned int ioread16(const void __iomem *addr) return (unsigned int)inw(port & PIO_MASK); else #ifndef CONFIG_IXP4XX_INDIRECT_PCI - return le16_to_cpu(__raw_readw((u32)port)); + return le16_to_cpu((__force __le16)__raw_readw(addr)); #else return (unsigned int)__indirect_readw(addr); #endif @@ -440,7 +440,7 @@ static inline void iowrite8(u8 value, void __iomem *addr) outb(value, port & PIO_MASK); else #ifndef CONFIG_IXP4XX_INDIRECT_PCI - __raw_writeb(value, port); + __raw_writeb(value, addr); #else __indirect_writeb(value, addr); #endif diff --git a/trunk/arch/arm/mach-ixp4xx/vulcan-pci.c b/trunk/arch/arm/mach-ixp4xx/vulcan-pci.c new file mode 100644 index 000000000000..f3111c6840ef --- /dev/null +++ b/trunk/arch/arm/mach-ixp4xx/vulcan-pci.c @@ -0,0 +1,73 @@ +/* + * arch/arch/mach-ixp4xx/vulcan-pci.c + * + * Vulcan board-level PCI initialization + * + * Copyright (C) 2010 Marc Zyngier + * + * based on ixdp425-pci.c: + * Copyright (C) 2002 Intel Corporation. + * Copyright (C) 2003-2004 MontaVista Software, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#include +#include +#include +#include +#include + +/* PCI controller GPIO to IRQ pin mappings */ +#define INTA 2 +#define INTB 3 + +void __init vulcan_pci_preinit(void) +{ +#ifndef CONFIG_IXP4XX_INDIRECT_PCI + /* + * Cardbus bridge wants way more than the SoC can actually offer, + * and leaves the whole PCI bus in a mess. Artificially limit it + * to 8MB per region. Of course indirect mode doesn't have this + * limitation... + */ + pci_cardbus_mem_size = SZ_8M; + pr_info("Vulcan PCI: limiting CardBus memory size to %dMB\n", + (int)(pci_cardbus_mem_size >> 20)); +#endif + set_irq_type(IXP4XX_GPIO_IRQ(INTA), IRQ_TYPE_LEVEL_LOW); + set_irq_type(IXP4XX_GPIO_IRQ(INTB), IRQ_TYPE_LEVEL_LOW); + ixp4xx_pci_preinit(); +} + +static int __init vulcan_map_irq(struct pci_dev *dev, u8 slot, u8 pin) +{ + if (slot == 1) + return IXP4XX_GPIO_IRQ(INTA); + + if (slot == 2) + return IXP4XX_GPIO_IRQ(INTB); + + return -1; +} + +struct hw_pci vulcan_pci __initdata = { + .nr_controllers = 1, + .preinit = vulcan_pci_preinit, + .swizzle = pci_std_swizzle, + .setup = ixp4xx_setup, + .scan = ixp4xx_scan_bus, + .map_irq = vulcan_map_irq, +}; + +int __init vulcan_pci_init(void) +{ + if (machine_is_arcom_vulcan()) + pci_common_init(&vulcan_pci); + return 0; +} + +subsys_initcall(vulcan_pci_init); diff --git a/trunk/arch/arm/mach-ixp4xx/vulcan-setup.c b/trunk/arch/arm/mach-ixp4xx/vulcan-setup.c new file mode 100644 index 000000000000..465cc5cce687 --- /dev/null +++ b/trunk/arch/arm/mach-ixp4xx/vulcan-setup.c @@ -0,0 +1,246 @@ +/* + * arch/arm/mach-ixp4xx/vulcan-setup.c + * + * Arcom/Eurotech Vulcan board-setup + * + * Copyright (C) 2010 Marc Zyngier + * + * based on fsg-setup.c: + * Copyright (C) 2008 Rod Whitby + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static struct flash_platform_data vulcan_flash_data = { + .map_name = "cfi_probe", + .width = 2, +}; + +static struct resource vulcan_flash_resource = { + .flags = IORESOURCE_MEM, +}; + +static struct platform_device vulcan_flash = { + .name = "IXP4XX-Flash", + .id = 0, + .dev = { + .platform_data = &vulcan_flash_data, + }, + .resource = &vulcan_flash_resource, + .num_resources = 1, +}; + +static struct platdata_mtd_ram vulcan_sram_data = { + .mapname = "Vulcan SRAM", + .bankwidth = 1, +}; + +static struct resource vulcan_sram_resource = { + .flags = IORESOURCE_MEM, +}; + +static struct platform_device vulcan_sram = { + .name = "mtd-ram", + .id = 0, + .dev = { + .platform_data = &vulcan_sram_data, + }, + .resource = &vulcan_sram_resource, + .num_resources = 1, +}; + +static struct resource vulcan_uart_resources[] = { + [0] = { + .start = IXP4XX_UART1_BASE_PHYS, + .end = IXP4XX_UART1_BASE_PHYS + 0x0fff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IXP4XX_UART2_BASE_PHYS, + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff, + .flags = IORESOURCE_MEM, + }, + [2] = { + .flags = IORESOURCE_MEM, + }, +}; + +static struct plat_serial8250_port vulcan_uart_data[] = { + [0] = { + .mapbase = IXP4XX_UART1_BASE_PHYS, + .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET, + .irq = IRQ_IXP4XX_UART1, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = IXP4XX_UART_XTAL, + }, + [1] = { + .mapbase = IXP4XX_UART2_BASE_PHYS, + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET, + .irq = IRQ_IXP4XX_UART2, + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + .iotype = UPIO_MEM, + .regshift = 2, + .uartclk = IXP4XX_UART_XTAL, + }, + [2] = { + .irq = IXP4XX_GPIO_IRQ(4), + .irqflags = IRQF_TRIGGER_LOW, + .flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + .iotype = UPIO_MEM, + .uartclk = 1843200, + }, + [3] = { + .irq = IXP4XX_GPIO_IRQ(4), + .irqflags = IRQF_TRIGGER_LOW, + .flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, + .iotype = UPIO_MEM, + .uartclk = 1843200, + }, + { } +}; + +static struct platform_device vulcan_uart = { + .name = "serial8250", + .id = PLAT8250_DEV_PLATFORM, + .dev = { + .platform_data = vulcan_uart_data, + }, + .resource = vulcan_uart_resources, + .num_resources = ARRAY_SIZE(vulcan_uart_resources), +}; + +static struct eth_plat_info vulcan_plat_eth[] = { + [0] = { + .phy = 0, + .rxq = 3, + .txreadyq = 20, + }, + [1] = { + .phy = 1, + .rxq = 4, + .txreadyq = 21, + }, +}; + +static struct platform_device vulcan_eth[] = { + [0] = { + .name = "ixp4xx_eth", + .id = IXP4XX_ETH_NPEB, + .dev = { + .platform_data = &vulcan_plat_eth[0], + }, + }, + [1] = { + .name = "ixp4xx_eth", + .id = IXP4XX_ETH_NPEC, + .dev = { + .platform_data = &vulcan_plat_eth[1], + }, + }, +}; + +static struct resource vulcan_max6369_resource = { + .flags = IORESOURCE_MEM, +}; + +static struct platform_device vulcan_max6369 = { + .name = "max6369_wdt", + .id = -1, + .resource = &vulcan_max6369_resource, + .num_resources = 1, +}; + +static struct w1_gpio_platform_data vulcan_w1_gpio_pdata = { + .pin = 14, +}; + +static struct platform_device vulcan_w1_gpio = { + .name = "w1-gpio", + .id = 0, + .dev = { + .platform_data = &vulcan_w1_gpio_pdata, + }, +}; + +static struct platform_device *vulcan_devices[] __initdata = { + &vulcan_uart, + &vulcan_flash, + &vulcan_sram, + &vulcan_max6369, + &vulcan_eth[0], + &vulcan_eth[1], + &vulcan_w1_gpio, +}; + +static void __init vulcan_init(void) +{ + ixp4xx_sys_init(); + + /* Flash is spread over both CS0 and CS1 */ + vulcan_flash_resource.start = IXP4XX_EXP_BUS_BASE(0); + vulcan_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1; + *IXP4XX_EXP_CS0 = IXP4XX_EXP_BUS_CS_EN | + IXP4XX_EXP_BUS_STROBE_T(3) | + IXP4XX_EXP_BUS_SIZE(0xF) | + IXP4XX_EXP_BUS_BYTE_RD16 | + IXP4XX_EXP_BUS_WR_EN; + *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0; + + /* SRAM on CS2, (256kB, 8bit, writable) */ + vulcan_sram_resource.start = IXP4XX_EXP_BUS_BASE(2); + vulcan_sram_resource.end = IXP4XX_EXP_BUS_BASE(2) + SZ_256K - 1; + *IXP4XX_EXP_CS2 = IXP4XX_EXP_BUS_CS_EN | + IXP4XX_EXP_BUS_STROBE_T(1) | + IXP4XX_EXP_BUS_HOLD_T(2) | + IXP4XX_EXP_BUS_SIZE(9) | + IXP4XX_EXP_BUS_SPLT_EN | + IXP4XX_EXP_BUS_WR_EN | + IXP4XX_EXP_BUS_BYTE_EN; + + /* XR16L2551 on CS3 (Moto style, 512 bytes, 8bits, writable) */ + vulcan_uart_resources[2].start = IXP4XX_EXP_BUS_BASE(3); + vulcan_uart_resources[2].end = IXP4XX_EXP_BUS_BASE(3) + 16 - 1; + vulcan_uart_data[2].mapbase = vulcan_uart_resources[2].start; + vulcan_uart_data[3].mapbase = vulcan_uart_data[2].mapbase + 8; + *IXP4XX_EXP_CS3 = IXP4XX_EXP_BUS_CS_EN | + IXP4XX_EXP_BUS_STROBE_T(3) | + IXP4XX_EXP_BUS_CYCLES(IXP4XX_EXP_BUS_CYCLES_MOTOROLA)| + IXP4XX_EXP_BUS_WR_EN | + IXP4XX_EXP_BUS_BYTE_EN; + + /* GPIOS on CS4 (512 bytes, 8bits, writable) */ + *IXP4XX_EXP_CS4 = IXP4XX_EXP_BUS_CS_EN | + IXP4XX_EXP_BUS_WR_EN | + IXP4XX_EXP_BUS_BYTE_EN; + + /* max6369 on CS5 (512 bytes, 8bits, writable) */ + vulcan_max6369_resource.start = IXP4XX_EXP_BUS_BASE(5); + vulcan_max6369_resource.end = IXP4XX_EXP_BUS_BASE(5); + *IXP4XX_EXP_CS5 = IXP4XX_EXP_BUS_CS_EN | + IXP4XX_EXP_BUS_WR_EN | + IXP4XX_EXP_BUS_BYTE_EN; + + platform_add_devices(vulcan_devices, ARRAY_SIZE(vulcan_devices)); +} + +MACHINE_START(ARCOM_VULCAN, "Arcom/Eurotech Vulcan") + /* Maintainer: Marc Zyngier */ + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS, + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc, + .map_io = ixp4xx_map_io, + .init_irq = ixp4xx_init_irq, + .timer = &ixp4xx_timer, + .boot_params = 0x0100, + .init_machine = vulcan_init, +MACHINE_END diff --git a/trunk/arch/arm/mach-mmp/aspenite.c b/trunk/arch/arm/mach-mmp/aspenite.c index 244655d323ea..0629394a5fb9 100644 --- a/trunk/arch/arm/mach-mmp/aspenite.c +++ b/trunk/arch/arm/mach-mmp/aspenite.c @@ -150,9 +150,8 @@ static void __init common_init(void) MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform") .phys_io = APB_PHYS_BASE, - .boot_params = 0x00000100, .io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc, - .map_io = pxa_map_io, + .map_io = mmp_map_io, .init_irq = pxa168_init_irq, .timer = &pxa168_timer, .init_machine = common_init, @@ -160,9 +159,8 @@ MACHINE_END MACHINE_START(ZYLONITE2, "PXA168-based Zylonite2 Development Platform") .phys_io = APB_PHYS_BASE, - .boot_params = 0x00000100, .io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc, - .map_io = pxa_map_io, + .map_io = mmp_map_io, .init_irq = pxa168_init_irq, .timer = &pxa168_timer, .init_machine = common_init, diff --git a/trunk/arch/arm/mach-mmp/avengers_lite.c b/trunk/arch/arm/mach-mmp/avengers_lite.c index 8c3fa5d14f4b..69bcba11f53f 100644 --- a/trunk/arch/arm/mach-mmp/avengers_lite.c +++ b/trunk/arch/arm/mach-mmp/avengers_lite.c @@ -42,9 +42,8 @@ static void __init avengers_lite_init(void) MACHINE_START(AVENGERS_LITE, "PXA168 Avengers lite Development Platform") .phys_io = APB_PHYS_BASE, - .boot_params = 0x00000100, .io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc, - .map_io = pxa_map_io, + .map_io = mmp_map_io, .init_irq = pxa168_init_irq, .timer = &pxa168_timer, .init_machine = avengers_lite_init, diff --git a/trunk/arch/arm/mach-mmp/common.c b/trunk/arch/arm/mach-mmp/common.c index e1e66c18b446..3b29fa7e9b08 100644 --- a/trunk/arch/arm/mach-mmp/common.c +++ b/trunk/arch/arm/mach-mmp/common.c @@ -31,7 +31,7 @@ static struct map_desc standard_io_desc[] __initdata = { }, }; -void __init pxa_map_io(void) +void __init mmp_map_io(void) { iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc)); } diff --git a/trunk/arch/arm/mach-mmp/common.h b/trunk/arch/arm/mach-mmp/common.h index b4a0ba05a0f4..ec8d65ded25c 100644 --- a/trunk/arch/arm/mach-mmp/common.h +++ b/trunk/arch/arm/mach-mmp/common.h @@ -3,15 +3,6 @@ struct sys_timer; extern void timer_init(int irq); -extern void mmp2_clear_pmic_int(void); - -extern struct sys_timer pxa168_timer; -extern struct sys_timer pxa910_timer; -extern struct sys_timer mmp2_timer; -extern void __init pxa168_init_irq(void); -extern void __init pxa910_init_irq(void); -extern void __init mmp2_init_icu(void); -extern void __init mmp2_init_irq(void); extern void __init icu_init_irq(void); -extern void __init pxa_map_io(void); +extern void __init mmp_map_io(void); diff --git a/trunk/arch/arm/mach-mmp/flint.c b/trunk/arch/arm/mach-mmp/flint.c index 4ec7709a3462..e4312d238eae 100644 --- a/trunk/arch/arm/mach-mmp/flint.c +++ b/trunk/arch/arm/mach-mmp/flint.c @@ -114,9 +114,8 @@ static void __init flint_init(void) MACHINE_START(FLINT, "Flint Development Platform") .phys_io = APB_PHYS_BASE, - .boot_params = 0x00000100, .io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc, - .map_io = pxa_map_io, + .map_io = mmp_map_io, .init_irq = mmp2_init_irq, .timer = &mmp2_timer, .init_machine = flint_init, diff --git a/trunk/arch/arm/mach-mmp/include/mach/devices.h b/trunk/arch/arm/mach-mmp/include/mach/devices.h index 1fa0a492454a..d0ec7dae88e4 100644 --- a/trunk/arch/arm/mach-mmp/include/mach/devices.h +++ b/trunk/arch/arm/mach-mmp/include/mach/devices.h @@ -1,3 +1,6 @@ +#ifndef __MACH_DEVICE_H +#define __MACH_DEVICE_H + #include #define MAX_RESOURCE_DMA 2 @@ -47,3 +50,4 @@ struct pxa_device_desc mmp2_device_##_name __initdata = { \ } extern int pxa_register_device(struct pxa_device_desc *, void *, size_t); +#endif /* __MACH_DEVICE_H */ diff --git a/trunk/arch/arm/mach-mmp/include/mach/mmp2.h b/trunk/arch/arm/mach-mmp/include/mach/mmp2.h index fec220bd5046..dbba6e8a60c4 100644 --- a/trunk/arch/arm/mach-mmp/include/mach/mmp2.h +++ b/trunk/arch/arm/mach-mmp/include/mach/mmp2.h @@ -1,6 +1,13 @@ #ifndef __ASM_MACH_MMP2_H #define __ASM_MACH_MMP2_H +struct sys_timer; + +extern struct sys_timer mmp2_timer; +extern void __init mmp2_init_icu(void); +extern void __init mmp2_init_irq(void); +extern void mmp2_clear_pmic_int(void); + #include #include #include diff --git a/trunk/arch/arm/mach-mmp/include/mach/pxa168.h b/trunk/arch/arm/mach-mmp/include/mach/pxa168.h index 3b2bd5d5eb05..27e1bc758623 100644 --- a/trunk/arch/arm/mach-mmp/include/mach/pxa168.h +++ b/trunk/arch/arm/mach-mmp/include/mach/pxa168.h @@ -1,6 +1,11 @@ #ifndef __ASM_MACH_PXA168_H #define __ASM_MACH_PXA168_H +struct sys_timer; + +extern struct sys_timer pxa168_timer; +extern void __init pxa168_init_irq(void); + #include #include #include diff --git a/trunk/arch/arm/mach-mmp/include/mach/pxa910.h b/trunk/arch/arm/mach-mmp/include/mach/pxa910.h index 4f0b4ec6f5d0..f13c49d6f8dc 100644 --- a/trunk/arch/arm/mach-mmp/include/mach/pxa910.h +++ b/trunk/arch/arm/mach-mmp/include/mach/pxa910.h @@ -1,6 +1,11 @@ #ifndef __ASM_MACH_PXA910_H #define __ASM_MACH_PXA910_H +struct sys_timer; + +extern struct sys_timer pxa910_timer; +extern void __init pxa910_init_irq(void); + #include #include #include diff --git a/trunk/arch/arm/mach-mmp/irq-mmp2.c b/trunk/arch/arm/mach-mmp/irq-mmp2.c index cb18221c0af3..01342be91c3c 100644 --- a/trunk/arch/arm/mach-mmp/irq-mmp2.c +++ b/trunk/arch/arm/mach-mmp/irq-mmp2.c @@ -16,6 +16,7 @@ #include #include +#include #include "common.h" diff --git a/trunk/arch/arm/mach-mmp/jasper.c b/trunk/arch/arm/mach-mmp/jasper.c index d77dd41d60e1..80c3e7ab1e17 100644 --- a/trunk/arch/arm/mach-mmp/jasper.c +++ b/trunk/arch/arm/mach-mmp/jasper.c @@ -135,9 +135,8 @@ static void __init jasper_init(void) MACHINE_START(MARVELL_JASPER, "Jasper Development Platform") .phys_io = APB_PHYS_BASE, - .boot_params = 0x00000100, .io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc, - .map_io = pxa_map_io, + .map_io = mmp_map_io, .init_irq = mmp2_init_irq, .timer = &mmp2_timer, .init_machine = jasper_init, diff --git a/trunk/arch/arm/mach-mmp/mmp2.c b/trunk/arch/arm/mach-mmp/mmp2.c index 7f5eb059bb01..daf3993349f8 100644 --- a/trunk/arch/arm/mach-mmp/mmp2.c +++ b/trunk/arch/arm/mach-mmp/mmp2.c @@ -17,6 +17,7 @@ #include +#include #include #include #include @@ -26,6 +27,7 @@ #include #include #include +#include #include "common.h" #include "clock.h" @@ -158,6 +160,26 @@ static int __init mmp2_init(void) } postcore_initcall(mmp2_init); +static void __init mmp2_timer_init(void) +{ + unsigned long clk_rst; + + __raw_writel(APBC_APBCLK | APBC_RST, APBC_MMP2_TIMERS); + + /* + * enable bus/functional clock, enable 6.5MHz (divider 4), + * release reset + */ + clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1); + __raw_writel(clk_rst, APBC_MMP2_TIMERS); + + timer_init(IRQ_MMP2_TIMER1); +} + +struct sys_timer mmp2_timer = { + .init = mmp2_timer_init, +}; + /* on-chip devices */ MMP2_DEVICE(uart1, "pxa2xx-uart", 0, UART1, 0xd4030000, 0x30, 4, 5); MMP2_DEVICE(uart2, "pxa2xx-uart", 1, UART2, 0xd4017000, 0x30, 20, 21); diff --git a/trunk/arch/arm/mach-mmp/tavorevb.c b/trunk/arch/arm/mach-mmp/tavorevb.c index 0e0c9220eaba..e81db7428215 100644 --- a/trunk/arch/arm/mach-mmp/tavorevb.c +++ b/trunk/arch/arm/mach-mmp/tavorevb.c @@ -100,9 +100,8 @@ static void __init tavorevb_init(void) MACHINE_START(TAVOREVB, "PXA910 Evaluation Board (aka TavorEVB)") .phys_io = APB_PHYS_BASE, - .boot_params = 0x00000100, .io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc, - .map_io = pxa_map_io, + .map_io = mmp_map_io, .init_irq = pxa910_init_irq, .timer = &pxa910_timer, .init_machine = tavorevb_init, diff --git a/trunk/arch/arm/mach-mmp/time.c b/trunk/arch/arm/mach-mmp/time.c index cf75694e9687..66528193f939 100644 --- a/trunk/arch/arm/mach-mmp/time.c +++ b/trunk/arch/arm/mach-mmp/time.c @@ -200,24 +200,3 @@ void __init timer_init(int irq) clocksource_register(&cksrc); clockevents_register_device(&ckevt); } - -static void __init mmp2_timer_init(void) -{ - unsigned long clk_rst; - - __raw_writel(APBC_APBCLK | APBC_RST, APBC_MMP2_TIMERS); - - /* - * enable bus/functional clock, enable 6.5MHz (divider 4), - * release reset - */ - clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1); - __raw_writel(clk_rst, APBC_MMP2_TIMERS); - - timer_init(IRQ_MMP2_TIMER1); -} - -struct sys_timer mmp2_timer = { - .init = mmp2_timer_init, -}; - diff --git a/trunk/arch/arm/mach-mmp/ttc_dkb.c b/trunk/arch/arm/mach-mmp/ttc_dkb.c index b22dec4abf78..ee65e05f0cf1 100644 --- a/trunk/arch/arm/mach-mmp/ttc_dkb.c +++ b/trunk/arch/arm/mach-mmp/ttc_dkb.c @@ -123,9 +123,8 @@ static void __init ttc_dkb_init(void) MACHINE_START(TTC_DKB, "PXA910-based TTC_DKB Development Platform") .phys_io = APB_PHYS_BASE, - .boot_params = 0x00000100, .io_pg_offst = (APB_VIRT_BASE >> 18) & 0xfffc, - .map_io = pxa_map_io, + .map_io = mmp_map_io, .init_irq = pxa910_init_irq, .timer = &pxa910_timer, .init_machine = ttc_dkb_init, diff --git a/trunk/arch/arm/mach-msm/Makefile b/trunk/arch/arm/mach-msm/Makefile index 7ff8020d4d24..704610648a25 100644 --- a/trunk/arch/arm/mach-msm/Makefile +++ b/trunk/arch/arm/mach-msm/Makefile @@ -15,7 +15,7 @@ obj-$(CONFIG_ARCH_QSD8X50) += sirc.o obj-$(CONFIG_MSM_SMD) += smd.o smd_debug.o obj-$(CONFIG_MSM_SMD) += last_radio_log.o -obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o devices-msm7x00.o +obj-$(CONFIG_MACH_TROUT) += board-trout.o board-trout-gpio.o board-trout-mmc.o devices-msm7x00.o obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o devices-msm7x00.o obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o obj-$(CONFIG_ARCH_QSD8X50) += board-qsd8x50.o devices-qsd8x50.o diff --git a/trunk/arch/arm/mach-msm/acpuclock-arm11.c b/trunk/arch/arm/mach-msm/acpuclock-arm11.c index f060a3959a75..7ffbd987eb5d 100644 --- a/trunk/arch/arm/mach-msm/acpuclock-arm11.c +++ b/trunk/arch/arm/mach-msm/acpuclock-arm11.c @@ -17,7 +17,6 @@ * */ -#include #include #include #include diff --git a/trunk/arch/arm/mach-msm/board-trout-gpio.c b/trunk/arch/arm/mach-msm/board-trout-gpio.c index 523d213bf79e..c50f3afc3134 100644 --- a/trunk/arch/arm/mach-msm/board-trout-gpio.c +++ b/trunk/arch/arm/mach-msm/board-trout-gpio.c @@ -15,10 +15,20 @@ #include #include #include +#include #include #include "board-trout.h" +static uint8_t trout_int_mask[2] = { + [0] = 0xff, /* mask all interrupts */ + [1] = 0xff, +}; +static uint8_t trout_sleep_int_mask[] = { + [0] = 0xff, + [1] = 0xff, +}; + struct msm_gpio_chip { struct gpio_chip chip; void __iomem *reg; /* Base of register bank */ @@ -95,16 +105,121 @@ static struct msm_gpio_chip msm_gpio_banks[] = { TROUT_GPIO_BANK("VIRTUAL", 0x12, TROUT_GPIO_VIRTUAL_BASE, 0), }; +static void trout_gpio_irq_ack(unsigned int irq) +{ + int bank = TROUT_INT_TO_BANK(irq); + uint8_t mask = TROUT_INT_TO_MASK(irq); + int reg = TROUT_BANK_TO_STAT_REG(bank); + /*printk(KERN_INFO "trout_gpio_irq_ack irq %d\n", irq);*/ + writeb(mask, TROUT_CPLD_BASE + reg); +} + +static void trout_gpio_irq_mask(unsigned int irq) +{ + unsigned long flags; + uint8_t reg_val; + int bank = TROUT_INT_TO_BANK(irq); + uint8_t mask = TROUT_INT_TO_MASK(irq); + int reg = TROUT_BANK_TO_MASK_REG(bank); + + local_irq_save(flags); + reg_val = trout_int_mask[bank] |= mask; + /*printk(KERN_INFO "trout_gpio_irq_mask irq %d => %d:%02x\n", + irq, bank, reg_val);*/ + writeb(reg_val, TROUT_CPLD_BASE + reg); + local_irq_restore(flags); +} + +static void trout_gpio_irq_unmask(unsigned int irq) +{ + unsigned long flags; + uint8_t reg_val; + int bank = TROUT_INT_TO_BANK(irq); + uint8_t mask = TROUT_INT_TO_MASK(irq); + int reg = TROUT_BANK_TO_MASK_REG(bank); + + local_irq_save(flags); + reg_val = trout_int_mask[bank] &= ~mask; + /*printk(KERN_INFO "trout_gpio_irq_unmask irq %d => %d:%02x\n", + irq, bank, reg_val);*/ + writeb(reg_val, TROUT_CPLD_BASE + reg); + local_irq_restore(flags); +} + +int trout_gpio_irq_set_wake(unsigned int irq, unsigned int on) +{ + unsigned long flags; + int bank = TROUT_INT_TO_BANK(irq); + uint8_t mask = TROUT_INT_TO_MASK(irq); + + local_irq_save(flags); + if(on) + trout_sleep_int_mask[bank] &= ~mask; + else + trout_sleep_int_mask[bank] |= mask; + local_irq_restore(flags); + return 0; +} + +static void trout_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) +{ + int j, m; + unsigned v; + int bank; + int stat_reg; + int int_base = TROUT_INT_START; + uint8_t int_mask; + + for (bank = 0; bank < 2; bank++) { + stat_reg = TROUT_BANK_TO_STAT_REG(bank); + v = readb(TROUT_CPLD_BASE + stat_reg); + int_mask = trout_int_mask[bank]; + if (v & int_mask) { + writeb(v & int_mask, TROUT_CPLD_BASE + stat_reg); + printk(KERN_ERR "trout_gpio_irq_handler: got masked " + "interrupt: %d:%02x\n", bank, v & int_mask); + } + v &= ~int_mask; + while (v) { + m = v & -v; + j = fls(m) - 1; + /*printk(KERN_INFO "msm_gpio_irq_handler %d:%02x %02x b" + "it %d irq %d\n", bank, v, m, j, int_base + j);*/ + v &= ~m; + generic_handle_irq(int_base + j); + } + int_base += TROUT_INT_BANK0_COUNT; + } + desc->chip->ack(irq); +} + +static struct irq_chip trout_gpio_irq_chip = { + .name = "troutgpio", + .ack = trout_gpio_irq_ack, + .mask = trout_gpio_irq_mask, + .unmask = trout_gpio_irq_unmask, + .set_wake = trout_gpio_irq_set_wake, +}; + /* * Called from the processor-specific init to enable GPIO pin support. */ int __init trout_init_gpio(void) { int i; + for(i = TROUT_INT_START; i <= TROUT_INT_END; i++) { + set_irq_chip(i, &trout_gpio_irq_chip); + set_irq_handler(i, handle_edge_irq); + set_irq_flags(i, IRQF_VALID); + } for (i = 0; i < ARRAY_SIZE(msm_gpio_banks); i++) gpiochip_add(&msm_gpio_banks[i].chip); + set_irq_type(MSM_GPIO_TO_INT(17), IRQF_TRIGGER_HIGH); + set_irq_chained_handler(MSM_GPIO_TO_INT(17), trout_gpio_irq_handler); + set_irq_wake(MSM_GPIO_TO_INT(17), 1); + return 0; } diff --git a/trunk/arch/arm/mach-msm/board-trout-mmc.c b/trunk/arch/arm/mach-msm/board-trout-mmc.c new file mode 100644 index 000000000000..44be8464657b --- /dev/null +++ b/trunk/arch/arm/mach-msm/board-trout-mmc.c @@ -0,0 +1,186 @@ +/* linux/arch/arm/mach-msm/board-trout-mmc.c +** Author: Brian Swetland +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include + +#include "devices.h" + +#include "board-trout.h" + +#include "proc_comm.h" + +#define DEBUG_SDSLOT_VDD 1 + +/* ---- COMMON ---- */ +static void config_gpio_table(uint32_t *table, int len) +{ + int n; + unsigned id; + for(n = 0; n < len; n++) { + id = table[n]; + msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX, &id, 0); + } +} + +/* ---- SDCARD ---- */ + +static uint32_t sdcard_on_gpio_table[] = { + PCOM_GPIO_CFG(62, 2, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_8MA), /* CLK */ + PCOM_GPIO_CFG(63, 2, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* CMD */ + PCOM_GPIO_CFG(64, 2, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* DAT3 */ + PCOM_GPIO_CFG(65, 2, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_8MA), /* DAT2 */ + PCOM_GPIO_CFG(66, 2, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_4MA), /* DAT1 */ + PCOM_GPIO_CFG(67, 2, GPIO_OUTPUT, GPIO_PULL_UP, GPIO_4MA), /* DAT0 */ +}; + +static uint32_t sdcard_off_gpio_table[] = { + PCOM_GPIO_CFG(62, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* CLK */ + PCOM_GPIO_CFG(63, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* CMD */ + PCOM_GPIO_CFG(64, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT3 */ + PCOM_GPIO_CFG(65, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT2 */ + PCOM_GPIO_CFG(66, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT1 */ + PCOM_GPIO_CFG(67, 0, GPIO_OUTPUT, GPIO_NO_PULL, GPIO_4MA), /* DAT0 */ +}; + +static uint opt_disable_sdcard; + +static int __init trout_disablesdcard_setup(char *str) +{ + int cal = simple_strtol(str, NULL, 0); + + opt_disable_sdcard = cal; + return 1; +} + +__setup("board_trout.disable_sdcard=", trout_disablesdcard_setup); + +static struct vreg *vreg_sdslot; /* SD slot power */ + +struct mmc_vdd_xlat { + int mask; + int level; +}; + +static struct mmc_vdd_xlat mmc_vdd_table[] = { + { MMC_VDD_165_195, 1800 }, + { MMC_VDD_20_21, 2050 }, + { MMC_VDD_21_22, 2150 }, + { MMC_VDD_22_23, 2250 }, + { MMC_VDD_23_24, 2350 }, + { MMC_VDD_24_25, 2450 }, + { MMC_VDD_25_26, 2550 }, + { MMC_VDD_26_27, 2650 }, + { MMC_VDD_27_28, 2750 }, + { MMC_VDD_28_29, 2850 }, + { MMC_VDD_29_30, 2950 }, +}; + +static unsigned int sdslot_vdd = 0xffffffff; +static unsigned int sdslot_vreg_enabled; + +static uint32_t trout_sdslot_switchvdd(struct device *dev, unsigned int vdd) +{ + int i, rc; + + BUG_ON(!vreg_sdslot); + + if (vdd == sdslot_vdd) + return 0; + + sdslot_vdd = vdd; + + if (vdd == 0) { +#if DEBUG_SDSLOT_VDD + printk("%s: Disabling SD slot power\n", __func__); +#endif + config_gpio_table(sdcard_off_gpio_table, + ARRAY_SIZE(sdcard_off_gpio_table)); + vreg_disable(vreg_sdslot); + sdslot_vreg_enabled = 0; + return 0; + } + + if (!sdslot_vreg_enabled) { + rc = vreg_enable(vreg_sdslot); + if (rc) { + printk(KERN_ERR "%s: Error enabling vreg (%d)\n", + __func__, rc); + } + config_gpio_table(sdcard_on_gpio_table, + ARRAY_SIZE(sdcard_on_gpio_table)); + sdslot_vreg_enabled = 1; + } + + for (i = 0; i < ARRAY_SIZE(mmc_vdd_table); i++) { + if (mmc_vdd_table[i].mask == (1 << vdd)) { +#if DEBUG_SDSLOT_VDD + printk("%s: Setting level to %u\n", + __func__, mmc_vdd_table[i].level); +#endif + rc = vreg_set_level(vreg_sdslot, + mmc_vdd_table[i].level); + if (rc) { + printk(KERN_ERR + "%s: Error setting vreg level (%d)\n", + __func__, rc); + } + return 0; + } + } + + printk(KERN_ERR "%s: Invalid VDD %d specified\n", __func__, vdd); + return 0; +} + +static unsigned int trout_sdslot_status(struct device *dev) +{ + unsigned int status; + + status = (unsigned int) gpio_get_value(TROUT_GPIO_SDMC_CD_N); + return (!status); +} + +#define TROUT_MMC_VDD MMC_VDD_165_195 | MMC_VDD_20_21 | MMC_VDD_21_22 \ + | MMC_VDD_22_23 | MMC_VDD_23_24 | MMC_VDD_24_25 \ + | MMC_VDD_25_26 | MMC_VDD_26_27 | MMC_VDD_27_28 \ + | MMC_VDD_28_29 | MMC_VDD_29_30 + +static struct msm_mmc_platform_data trout_sdslot_data = { + .ocr_mask = TROUT_MMC_VDD, + .status = trout_sdslot_status, + .translate_vdd = trout_sdslot_switchvdd, +}; + +int __init trout_init_mmc(unsigned int sys_rev) +{ + sdslot_vreg_enabled = 0; + + vreg_sdslot = vreg_get(0, "gp6"); + if (IS_ERR(vreg_sdslot)) + return PTR_ERR(vreg_sdslot); + + set_irq_wake(TROUT_GPIO_TO_INT(TROUT_GPIO_SDMC_CD_N), 1); + + if (!opt_disable_sdcard) + msm_add_sdcc(2, &trout_sdslot_data, + TROUT_GPIO_TO_INT(TROUT_GPIO_SDMC_CD_N), 0); + else + printk(KERN_INFO "trout: SD-Card interface disabled\n"); + return 0; +} + diff --git a/trunk/arch/arm/mach-msm/board-trout.c b/trunk/arch/arm/mach-msm/board-trout.c index e69a1502e4e8..469e0be3499d 100644 --- a/trunk/arch/arm/mach-msm/board-trout.c +++ b/trunk/arch/arm/mach-msm/board-trout.c @@ -30,6 +30,8 @@ #include "devices.h" #include "board-trout.h" +extern int trout_init_mmc(unsigned int); + static struct platform_device *devices[] __initdata = { &msm_device_uart3, &msm_device_smd, @@ -55,7 +57,16 @@ static void __init trout_fixup(struct machine_desc *desc, struct tag *tags, static void __init trout_init(void) { + int rc; + platform_add_devices(devices, ARRAY_SIZE(devices)); + +#ifdef CONFIG_MMC + rc = trout_init_mmc(system_rev); + if (rc) + printk(KERN_CRIT "%s: MMC init failure (%d)\n", __func__, rc); +#endif + } static struct map_desc trout_io_desc[] __initdata = { diff --git a/trunk/arch/arm/mach-msm/clock.c b/trunk/arch/arm/mach-msm/clock.c index 9cb1276ab749..c57210f4f06a 100644 --- a/trunk/arch/arm/mach-msm/clock.c +++ b/trunk/arch/arm/mach-msm/clock.c @@ -14,7 +14,6 @@ * */ -#include #include #include #include diff --git a/trunk/arch/arm/mach-msm/devices-msm7x00.c b/trunk/arch/arm/mach-msm/devices-msm7x00.c index fde9d8f69f10..4e8c0bcdc92d 100644 --- a/trunk/arch/arm/mach-msm/devices-msm7x00.c +++ b/trunk/arch/arm/mach-msm/devices-msm7x00.c @@ -322,7 +322,8 @@ static struct platform_device *msm_sdcc_devices[] __initdata = { &msm_device_sdc4, }; -int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat, +int __init msm_add_sdcc(unsigned int controller, + struct msm_mmc_platform_data *plat, unsigned int stat_irq, unsigned long stat_irq_flags) { struct platform_device *pdev; diff --git a/trunk/arch/arm/mach-msm/include/mach/board.h b/trunk/arch/arm/mach-msm/include/mach/board.h index e302fbdc439b..5a79bcf50413 100644 --- a/trunk/arch/arm/mach-msm/include/mach/board.h +++ b/trunk/arch/arm/mach-msm/include/mach/board.h @@ -18,6 +18,7 @@ #define __ASM_ARCH_MSM_BOARD_H #include +#include /* platform device data structures */ @@ -40,5 +41,8 @@ void __init msm_init_irq(void); void __init msm_init_gpio(void); void __init msm_clock_init(struct clk *clock_tbl, unsigned num_clocks); void __init msm_acpu_clock_init(struct msm_acpu_clock_platform_data *); +int __init msm_add_sdcc(unsigned int controller, + struct msm_mmc_platform_data *plat, + unsigned int stat_irq, unsigned long stat_irq_flags); #endif diff --git a/trunk/arch/arm/mach-msm/include/mach/mmc.h b/trunk/arch/arm/mach-msm/include/mach/mmc.h index 0ecf25426284..d54b6b086cff 100644 --- a/trunk/arch/arm/mach-msm/include/mach/mmc.h +++ b/trunk/arch/arm/mach-msm/include/mach/mmc.h @@ -15,7 +15,7 @@ struct embedded_sdio_data { int num_funcs; }; -struct mmc_platform_data { +struct msm_mmc_platform_data { unsigned int ocr_mask; /* available voltages */ u32 (*translate_vdd)(struct device *, unsigned int); unsigned int (*status)(struct device *); diff --git a/trunk/arch/arm/mach-msm/smd.c b/trunk/arch/arm/mach-msm/smd.c index cf11d414b425..f07dc7c738f0 100644 --- a/trunk/arch/arm/mach-msm/smd.c +++ b/trunk/arch/arm/mach-msm/smd.c @@ -997,7 +997,7 @@ int smd_core_init(void) return 0; } -static int __init msm_smd_probe(struct platform_device *pdev) +static int __devinit msm_smd_probe(struct platform_device *pdev) { pr_info("smd_init()\n"); diff --git a/trunk/arch/arm/mach-mx3/mach-armadillo5x0.c b/trunk/arch/arm/mach-mx3/mach-armadillo5x0.c index 96aadcadb4ff..68879c996a55 100644 --- a/trunk/arch/arm/mach-mx3/mach-armadillo5x0.c +++ b/trunk/arch/arm/mach-mx3/mach-armadillo5x0.c @@ -551,9 +551,9 @@ static void __init armadillo5x0_init(void) /* USB */ #if defined(CONFIG_USB_ULPI) usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, - USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); + ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, - USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); + ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); mxc_register_device(&mxc_otg_host, &usbotg_pdata); mxc_register_device(&mxc_usbh2, &usbh2_pdata); diff --git a/trunk/arch/arm/mach-mx3/mach-mx31lilly.c b/trunk/arch/arm/mach-mx3/mach-mx31lilly.c index 8f66f65e80e2..7c37daabb757 100644 --- a/trunk/arch/arm/mach-mx3/mach-mx31lilly.c +++ b/trunk/arch/arm/mach-mx3/mach-mx31lilly.c @@ -245,9 +245,9 @@ static struct mxc_usbh_platform_data usbh2_pdata = { static void lilly1131_usb_init(void) { usbotg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, - USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); + ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, - USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); + ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); mxc_register_device(&mxc_usbh1, &usbh1_pdata); mxc_register_device(&mxc_usbh2, &usbh2_pdata); diff --git a/trunk/arch/arm/mach-mx3/mach-mx31lite.c b/trunk/arch/arm/mach-mx3/mach-mx31lite.c index da236c497d2a..f66a9576d8c2 100644 --- a/trunk/arch/arm/mach-mx3/mach-mx31lite.c +++ b/trunk/arch/arm/mach-mx3/mach-mx31lite.c @@ -256,7 +256,7 @@ static void __init mxc_board_init(void) #if defined(CONFIG_USB_ULPI) /* USB */ usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, - USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); + ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); mxc_register_device(&mxc_usbh2, &usbh2_pdata); #endif diff --git a/trunk/arch/arm/mach-mx3/mach-mx31moboard.c b/trunk/arch/arm/mach-mx3/mach-mx31moboard.c index 67776bc61c33..7a075e8bf2d4 100644 --- a/trunk/arch/arm/mach-mx3/mach-mx31moboard.c +++ b/trunk/arch/arm/mach-mx3/mach-mx31moboard.c @@ -412,7 +412,7 @@ static struct mxc_usbh_platform_data usbh2_pdata = { static int __init moboard_usbh2_init(void) { usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, - USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); + ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); return mxc_register_device(&mxc_usbh2, &usbh2_pdata); } diff --git a/trunk/arch/arm/mach-mx3/mach-pcm037.c b/trunk/arch/arm/mach-mx3/mach-pcm037.c index 8a292dd1a714..214de11b20b9 100644 --- a/trunk/arch/arm/mach-mx3/mach-pcm037.c +++ b/trunk/arch/arm/mach-mx3/mach-pcm037.c @@ -654,13 +654,13 @@ static void __init mxc_board_init(void) #if defined(CONFIG_USB_ULPI) if (otg_mode_host) { otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, - USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); + ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); mxc_register_device(&mxc_otg_host, &otg_pdata); } usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, - USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); + ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); mxc_register_device(&mxc_usbh2, &usbh2_pdata); #endif diff --git a/trunk/arch/arm/mach-mx3/mach-pcm043.c b/trunk/arch/arm/mach-mx3/mach-pcm043.c index 47f5311b301a..28886f0e62f9 100644 --- a/trunk/arch/arm/mach-mx3/mach-pcm043.c +++ b/trunk/arch/arm/mach-mx3/mach-pcm043.c @@ -378,7 +378,7 @@ static void __init mxc_board_init(void) #if defined(CONFIG_USB_ULPI) if (otg_mode_host) { otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, - USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); + ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); mxc_register_device(&mxc_otg_host, &otg_pdata); } diff --git a/trunk/arch/arm/mach-mx3/mx31moboard-smartbot.c b/trunk/arch/arm/mach-mx3/mx31moboard-smartbot.c index 40c3e7564cb6..417757e78c65 100644 --- a/trunk/arch/arm/mach-mx3/mx31moboard-smartbot.c +++ b/trunk/arch/arm/mach-mx3/mx31moboard-smartbot.c @@ -134,7 +134,7 @@ static struct mxc_usbh_platform_data otg_host_pdata = { static int __init smartbot_otg_host_init(void) { otg_host_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, - USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT); + ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); return mxc_register_device(&mxc_otg_host, &otg_host_pdata); } diff --git a/trunk/arch/arm/mach-omap2/board-omap3pandora.c b/trunk/arch/arm/mach-omap2/board-omap3pandora.c index 55836fa35060..dd3af2be13be 100644 --- a/trunk/arch/arm/mach-omap2/board-omap3pandora.c +++ b/trunk/arch/arm/mach-omap2/board-omap3pandora.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -258,6 +259,20 @@ static struct platform_device pandora_dss_device = { }, }; +static void pandora_wl1251_init_card(struct mmc_card *card) +{ + /* + * We have TI wl1251 attached to MMC3. Pass this information to + * SDIO core because it can't be probed by normal methods. + */ + card->quirks |= MMC_QUIRK_NONSTD_SDIO; + card->cccr.wide_bus = 1; + card->cis.vendor = 0x104c; + card->cis.device = 0x9066; + card->cis.blksize = 512; + card->cis.max_dtr = 20000000; +} + static struct omap2_hsmmc_info omap3pandora_mmc[] = { { .mmc = 1, @@ -279,6 +294,7 @@ static struct omap2_hsmmc_info omap3pandora_mmc[] = { .wires = 4, .gpio_cd = -EINVAL, .gpio_wp = -EINVAL, + .init_card = pandora_wl1251_init_card, }, {} /* Terminator */ }; diff --git a/trunk/arch/arm/mach-omap2/hsmmc.c b/trunk/arch/arm/mach-omap2/hsmmc.c index 1ef54b036103..c8f647b6205e 100644 --- a/trunk/arch/arm/mach-omap2/hsmmc.c +++ b/trunk/arch/arm/mach-omap2/hsmmc.c @@ -268,6 +268,7 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) mmc->slots[0].gpio_wp = c->gpio_wp; mmc->slots[0].remux = c->remux; + mmc->slots[0].init_card = c->init_card; if (c->cover_only) mmc->slots[0].cover = 1; diff --git a/trunk/arch/arm/mach-omap2/hsmmc.h b/trunk/arch/arm/mach-omap2/hsmmc.h index 36f0ba8d89e2..1fe6f0187177 100644 --- a/trunk/arch/arm/mach-omap2/hsmmc.h +++ b/trunk/arch/arm/mach-omap2/hsmmc.h @@ -6,6 +6,8 @@ * published by the Free Software Foundation. */ +struct mmc_card; + struct omap2_hsmmc_info { u8 mmc; /* controller 1/2/3 */ u8 wires; /* 1/4/8 wires */ @@ -23,6 +25,8 @@ struct omap2_hsmmc_info { int ocr_mask; /* temporary HACK */ /* Remux (pad configuation) when powering on/off */ void (*remux)(struct device *dev, int slot, int power_on); + /* init some special card */ + void (*init_card)(struct mmc_card *card); }; #if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) diff --git a/trunk/arch/arm/mach-pxa/Kconfig b/trunk/arch/arm/mach-pxa/Kconfig index 3b51741a4810..7aefb9074852 100644 --- a/trunk/arch/arm/mach-pxa/Kconfig +++ b/trunk/arch/arm/mach-pxa/Kconfig @@ -238,6 +238,17 @@ config MACH_COLIBRI bool "Toradex Colibri PXA270" select PXA27x +config MACH_COLIBRI_PXA270_EVALBOARD + bool "Toradex Colibri Evaluation Carrier Board support (PXA270)" + depends on MACH_COLIBRI + +config MACH_COLIBRI_PXA270_INCOME + bool "Income s.r.o. PXA270 SBC" + depends on MACH_COLIBRI + select PXA27x + select HAVE_PWM + select PXA_HAVE_BOARD_IRQS + config MACH_COLIBRI300 bool "Toradex Colibri PXA300/310" select PXA3xx @@ -336,6 +347,9 @@ config ARCH_PXA_PALM bool "PXA based Palm PDAs" select HAVE_PWM +config MACH_PALM27X + bool + config MACH_PALMTE2 bool "Palm Tungsten|E2" default y @@ -360,6 +374,7 @@ config MACH_PALMT5 depends on ARCH_PXA_PALM select PXA27x select IWMMXT + select MACH_PALM27X help Say Y here if you intend to run this kernel on a Palm Tungsten|T5 handheld computer. @@ -370,6 +385,7 @@ config MACH_PALMTX depends on ARCH_PXA_PALM select PXA27x select IWMMXT + select MACH_PALM27X help Say Y here if you intend to run this kernel on a Palm T|X handheld computer. @@ -380,6 +396,7 @@ config MACH_PALMZ72 depends on ARCH_PXA_PALM select PXA27x select IWMMXT + select MACH_PALM27X help Say Y here if you intend to run this kernel on Palm Zire 72 handheld computer. @@ -390,6 +407,7 @@ config MACH_PALMLD depends on ARCH_PXA_PALM select PXA27x select IWMMXT + select MACH_PALM27X help Say Y here if you intend to run this kernel on a Palm LifeDrive handheld computer. @@ -447,16 +465,13 @@ config PXA_SHARPSL SL-C3000 (Spitz), SL-C3100 (Borzoi) or SL-C6000x (Tosa) handheld computer. -config SHARPSL_PM - bool - select APM_EMULATION - select SHARPSL_PM_MAX1111 - -config SHARPSL_PM_MAX1111 - bool - depends on !CORGI_SSP_DEPRECATED - select HWMON - select SENSORS_MAX1111 +config PXA_SHARPSL_DETECT_MACH_ID + bool "Detect machine ID at run-time in the decompressor" + depends on PXA_SHARPSL + help + Say Y here if you want the zImage decompressor to detect + the Zaurus machine ID at run-time. For latest kexec-based + boot loader, this is not necessary. config MACH_POODLE bool "Enable Sharp SL-5600 (Poodle) Support" @@ -510,6 +525,25 @@ config MACH_TOSA select PXA25x select PXA_HAVE_BOARD_IRQS +config TOSA_BT + tristate "Control the state of built-in bluetooth chip on Sharp SL-6000" + depends on MACH_TOSA + select RFKILL + help + This is a simple driver that is able to control + the state of built in bluetooth chip on tosa. + +config TOSA_USE_EXT_KEYCODES + bool "Tosa keyboard: use extended keycodes" + depends on MACH_TOSA + default n + help + Say Y here to enable the tosa keyboard driver to generate extended + (>= 127) keycodes. Be aware, that they can't be correctly interpreted + by either console keyboard driver or by Kdrive keybd driver. + + Say Y only if you know, what you are doing! + config MACH_ICONTROL bool "TMT iControl/SafeTCam based on the MXM-8x10 CoM" select CPU_PXA320 @@ -648,25 +682,15 @@ config PXA_SHARP_Cxx00 help Enable common support for Sharp Cxx00 models -config TOSA_BT - tristate "Control the state of built-in bluetooth chip on Sharp SL-6000" - depends on MACH_TOSA - select RFKILL - help - This is a simple driver that is able to control - the state of built in bluetooth chip on tosa. - -config TOSA_USE_EXT_KEYCODES - bool "Tosa keyboard: use extended keycodes" - depends on MACH_TOSA - default n - help - Say Y here to enable the tosa keyboard driver to generate extended - (>= 127) keycodes. Be aware, that they can't be correctly interpreted - by either console keyboard driver or by Kdrive keybd driver. - - Say Y only if you know, what you are doing! +config SHARPSL_PM + bool + select APM_EMULATION + select SHARPSL_PM_MAX1111 +config SHARPSL_PM_MAX1111 + bool + select HWMON + select SENSORS_MAX1111 config PXA_HAVE_BOARD_IRQS bool diff --git a/trunk/arch/arm/mach-pxa/Makefile b/trunk/arch/arm/mach-pxa/Makefile index b8f1f4bc7ca7..85c7fb324dbb 100644 --- a/trunk/arch/arm/mach-pxa/Makefile +++ b/trunk/arch/arm/mach-pxa/Makefile @@ -51,14 +51,16 @@ obj-$(CONFIG_MACH_CAPC7117) += capc7117.o mxm8x10.o obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o obj-$(CONFIG_GUMSTIX_AM200EPD) += am200epd.o obj-$(CONFIG_GUMSTIX_AM300EPD) += am300epd.o -obj-$(CONFIG_MACH_INTELMOTE2) += imote2.o +obj-$(CONFIG_MACH_INTELMOTE2) += stargate2.o obj-$(CONFIG_MACH_STARGATE2) += stargate2.o obj-$(CONFIG_MACH_XCEP) += xcep.o obj-$(CONFIG_MACH_TRIZEPS4) += trizeps4.o obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o obj-$(CONFIG_MACH_PCM027) += pcm027.o obj-$(CONFIG_MACH_PCM990_BASEBOARD) += pcm990-baseboard.o -obj-$(CONFIG_MACH_COLIBRI) += colibri-pxa270.o +obj-$(CONFIG_MACH_COLIBRI) += colibri-pxa270.o +obj-$(CONFIG_MACH_COLIBRI_PXA270_EVALBOARD) += colibri-pxa270-evalboard.o +obj-$(CONFIG_MACH_COLIBRI_PXA270_INCOME) += colibri-pxa270-income.o obj-$(CONFIG_MACH_COLIBRI300) += colibri-pxa3xx.o colibri-pxa300.o obj-$(CONFIG_MACH_COLIBRI320) += colibri-pxa3xx.o colibri-pxa320.o obj-$(CONFIG_MACH_VPAC270) += vpac270.o @@ -73,6 +75,7 @@ obj-$(CONFIG_PXA_EZX) += ezx.o obj-$(CONFIG_MACH_MP900C) += mp900.o obj-$(CONFIG_MACH_PALMTE2) += palmte2.o obj-$(CONFIG_MACH_PALMTC) += palmtc.o +obj-$(CONFIG_MACH_PALM27X) += palm27x.o obj-$(CONFIG_MACH_PALMT5) += palmt5.o obj-$(CONFIG_MACH_PALMTX) += palmtx.o obj-$(CONFIG_MACH_PALMZ72) += palmz72.o @@ -84,12 +87,6 @@ obj-$(CONFIG_MACH_POODLE) += poodle.o obj-$(CONFIG_MACH_TOSA) += tosa.o obj-$(CONFIG_MACH_ICONTROL) += icontrol.o mxm8x10.o obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o -obj-$(CONFIG_MACH_E330) += e330.o -obj-$(CONFIG_MACH_E350) += e350.o -obj-$(CONFIG_MACH_E740) += e740.o -obj-$(CONFIG_MACH_E750) += e750.o -obj-$(CONFIG_MACH_E400) += e400.o -obj-$(CONFIG_MACH_E800) += e800.o obj-$(CONFIG_MACH_RAUMFELD_RC) += raumfeld.o obj-$(CONFIG_MACH_RAUMFELD_CONNECTOR) += raumfeld.o obj-$(CONFIG_MACH_RAUMFELD_SPEAKER) += raumfeld.o diff --git a/trunk/arch/arm/mach-pxa/balloon3.c b/trunk/arch/arm/mach-pxa/balloon3.c index f3b5ace815e5..9041340fee1d 100644 --- a/trunk/arch/arm/mach-pxa/balloon3.c +++ b/trunk/arch/arm/mach-pxa/balloon3.c @@ -22,9 +22,14 @@ #include #include #include +#include #include #include #include +#include +#include +#include +#include #include #include @@ -51,6 +56,59 @@ #include "generic.h" #include "devices.h" +/****************************************************************************** + * Pin configuration + ******************************************************************************/ +static unsigned long balloon3_pin_config[] __initdata = { + /* Select BTUART 'COM1/ttyS0' as IO option for pins 42/43/44/45 */ + GPIO42_BTUART_RXD, + GPIO43_BTUART_TXD, + GPIO44_BTUART_CTS, + GPIO45_BTUART_RTS, + + /* Reset, configured as GPIO wakeup source */ + GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH, + + /* LEDs */ + GPIO9_GPIO, /* NAND activity LED */ + GPIO10_GPIO, /* Heartbeat LED */ + + /* AC97 */ + GPIO28_AC97_BITCLK, + GPIO29_AC97_SDATA_IN_0, + GPIO30_AC97_SDATA_OUT, + GPIO31_AC97_SYNC, + GPIO113_AC97_nRESET, + GPIO95_GPIO, + + /* MMC */ + GPIO32_MMC_CLK, + GPIO92_MMC_DAT_0, + GPIO109_MMC_DAT_1, + GPIO110_MMC_DAT_2, + GPIO111_MMC_DAT_3, + GPIO112_MMC_CMD, + + /* USB Host */ + GPIO88_USBH1_PWR, + GPIO89_USBH1_PEN, + + /* PC Card */ + GPIO48_nPOE, + GPIO49_nPWE, + GPIO50_nPIOR, + GPIO51_nPIOW, + GPIO85_nPCE_1, + GPIO54_nPCE_2, + GPIO79_PSKTSEL, + GPIO55_nPREG, + GPIO56_nPWAIT, + GPIO57_nIOIS16, +}; + +/****************************************************************************** + * Compatibility: Parameter parsing + ******************************************************************************/ static unsigned long balloon3_irq_enabled; static unsigned long balloon3_features_present = @@ -73,6 +131,321 @@ int __init parse_balloon3_features(char *arg) } early_param("balloon3_features", parse_balloon3_features); +/****************************************************************************** + * NOR Flash + ******************************************************************************/ +#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) +static struct mtd_partition balloon3_nor_partitions[] = { + { + .name = "Flash", + .offset = 0x00000000, + .size = MTDPART_SIZ_FULL, + } +}; + +static struct physmap_flash_data balloon3_flash_data[] = { + { + .width = 2, /* bankwidth in bytes */ + .parts = balloon3_nor_partitions, + .nr_parts = ARRAY_SIZE(balloon3_nor_partitions) + } +}; + +static struct resource balloon3_flash_resource = { + .start = PXA_CS0_PHYS, + .end = PXA_CS0_PHYS + SZ_64M - 1, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device balloon3_flash = { + .name = "physmap-flash", + .id = 0, + .resource = &balloon3_flash_resource, + .num_resources = 1, + .dev = { + .platform_data = balloon3_flash_data, + }, +}; +static void __init balloon3_nor_init(void) +{ + platform_device_register(&balloon3_flash); +} +#else +static inline void balloon3_nor_init(void) {} +#endif + +/****************************************************************************** + * Audio and Touchscreen + ******************************************************************************/ +#if defined(CONFIG_TOUCHSCREEN_UCB1400) || \ + defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE) +static struct ucb1400_pdata vpac270_ucb1400_pdata = { + .irq = IRQ_GPIO(BALLOON3_GPIO_CODEC_IRQ), +}; + + +static struct platform_device balloon3_ucb1400_device = { + .name = "ucb1400_core", + .id = -1, + .dev = { + .platform_data = &vpac270_ucb1400_pdata, + }, +}; + +static void __init balloon3_ts_init(void) +{ + if (!balloon3_has(BALLOON3_FEATURE_AUDIO)) + return; + + pxa_set_ac97_info(NULL); + platform_device_register(&balloon3_ucb1400_device); +} +#else +static inline void balloon3_ts_init(void) {} +#endif + +/****************************************************************************** + * Framebuffer + ******************************************************************************/ +#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) +static struct pxafb_mode_info balloon3_lcd_modes[] = { + { + .pixclock = 38000, + .xres = 480, + .yres = 640, + .bpp = 16, + .hsync_len = 8, + .left_margin = 8, + .right_margin = 8, + .vsync_len = 2, + .upper_margin = 4, + .lower_margin = 5, + .sync = 0, + }, +}; + +static struct pxafb_mach_info balloon3_lcd_screen = { + .modes = balloon3_lcd_modes, + .num_modes = ARRAY_SIZE(balloon3_lcd_modes), + .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, +}; + +static void balloon3_backlight_power(int on) +{ + gpio_set_value(BALLOON3_GPIO_RUN_BACKLIGHT, on); +} + +static void __init balloon3_lcd_init(void) +{ + int ret; + + if (!balloon3_has(BALLOON3_FEATURE_TOPPOLY)) + return; + + ret = gpio_request(BALLOON3_GPIO_RUN_BACKLIGHT, "BKL-ON"); + if (ret) { + pr_err("Requesting BKL-ON GPIO failed!\n"); + goto err; + } + + ret = gpio_direction_output(BALLOON3_GPIO_RUN_BACKLIGHT, 1); + if (ret) { + pr_err("Setting BKL-ON GPIO direction failed!\n"); + goto err2; + } + + balloon3_lcd_screen.pxafb_backlight_power = balloon3_backlight_power; + set_pxa_fb_info(&balloon3_lcd_screen); + return; + +err2: + gpio_free(BALLOON3_GPIO_RUN_BACKLIGHT); +err: + return; +} +#else +static inline void balloon3_lcd_init(void) {} +#endif + +/****************************************************************************** + * SD/MMC card controller + ******************************************************************************/ +#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) +static struct pxamci_platform_data balloon3_mci_platform_data = { + .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, + .gpio_card_detect = -1, + .gpio_card_ro = -1, + .gpio_power = -1, + .detect_delay_ms = 200, +}; + +static void __init balloon3_mmc_init(void) +{ + pxa_set_mci_info(&balloon3_mci_platform_data); +} +#else +static inline void balloon3_mmc_init(void) {} +#endif + +/****************************************************************************** + * USB Gadget + ******************************************************************************/ +#if defined(CONFIG_USB_GADGET_PXA27X)||defined(CONFIG_USB_GADGET_PXA27X_MODULE) +static void balloon3_udc_command(int cmd) +{ + if (cmd == PXA2XX_UDC_CMD_CONNECT) + UP2OCR |= UP2OCR_DPPUE | UP2OCR_DPPUBE; + else if (cmd == PXA2XX_UDC_CMD_DISCONNECT) + UP2OCR &= ~UP2OCR_DPPUE; +} + +static int balloon3_udc_is_connected(void) +{ + return 1; +} + +static struct pxa2xx_udc_mach_info balloon3_udc_info __initdata = { + .udc_command = balloon3_udc_command, + .udc_is_connected = balloon3_udc_is_connected, + .gpio_pullup = -1, +}; + +static void __init balloon3_udc_init(void) +{ + pxa_set_udc_info(&balloon3_udc_info); + platform_device_register(&balloon3_gpio_vbus); +} +#else +static inline void balloon3_udc_init(void) {} +#endif + +/****************************************************************************** + * IrDA + ******************************************************************************/ +#if defined(CONFIG_IRDA) || defined(CONFIG_IRDA_MODULE) +static struct pxaficp_platform_data balloon3_ficp_platform_data = { + .transceiver_cap = IR_FIRMODE | IR_SIRMODE | IR_OFF, +}; + +static void __init balloon3_irda_init(void) +{ + pxa_set_ficp_info(&balloon3_ficp_platform_data); +} +#else +static inline void balloon3_irda_init(void) {} +#endif + +/****************************************************************************** + * USB Host + ******************************************************************************/ +#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) +static struct pxaohci_platform_data balloon3_ohci_info = { + .port_mode = PMM_PERPORT_MODE, + .flags = ENABLE_PORT_ALL | POWER_CONTROL_LOW | POWER_SENSE_LOW, +}; + +static void __init balloon3_uhc_init(void) +{ + if (!balloon3_has(BALLOON3_FEATURE_OHCI)) + return; + pxa_set_ohci_info(&balloon3_ohci_info); +} +#else +static inline void balloon3_uhc_init(void) {} +#endif + +/****************************************************************************** + * LEDs + ******************************************************************************/ +#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) +struct gpio_led balloon3_gpio_leds[] = { + { + .name = "balloon3:green:idle", + .default_trigger = "heartbeat", + .gpio = BALLOON3_GPIO_LED_IDLE, + .active_low = 1, + }, { + .name = "balloon3:green:nand", + .default_trigger = "nand-disk", + .gpio = BALLOON3_GPIO_LED_NAND, + .active_low = 1, + }, +}; + +static struct gpio_led_platform_data balloon3_gpio_led_info = { + .leds = balloon3_gpio_leds, + .num_leds = ARRAY_SIZE(balloon3_gpio_leds), +}; + +static struct platform_device balloon3_leds = { + .name = "leds-gpio", + .id = 0, + .dev = { + .platform_data = &balloon3_gpio_led_info, + } +}; + +struct gpio_led balloon3_pcf_gpio_leds[] = { + { + .name = "balloon3:green:led0", + .gpio = BALLOON3_PCF_GPIO_LED0, + .active_low = 1, + }, { + .name = "balloon3:green:led1", + .gpio = BALLOON3_PCF_GPIO_LED1, + .active_low = 1, + }, { + .name = "balloon3:orange:led2", + .gpio = BALLOON3_PCF_GPIO_LED2, + .active_low = 1, + }, { + .name = "balloon3:orange:led3", + .gpio = BALLOON3_PCF_GPIO_LED3, + .active_low = 1, + }, { + .name = "balloon3:orange:led4", + .gpio = BALLOON3_PCF_GPIO_LED4, + .active_low = 1, + }, { + .name = "balloon3:orange:led5", + .gpio = BALLOON3_PCF_GPIO_LED5, + .active_low = 1, + }, { + .name = "balloon3:red:led6", + .gpio = BALLOON3_PCF_GPIO_LED6, + .active_low = 1, + }, { + .name = "balloon3:red:led7", + .gpio = BALLOON3_PCF_GPIO_LED7, + .active_low = 1, + }, +}; + +static struct gpio_led_platform_data balloon3_pcf_gpio_led_info = { + .leds = balloon3_pcf_gpio_leds, + .num_leds = ARRAY_SIZE(balloon3_pcf_gpio_leds), +}; + +static struct platform_device balloon3_pcf_leds = { + .name = "leds-gpio", + .id = 1, + .dev = { + .platform_data = &balloon3_pcf_gpio_led_info, + } +}; + +static void __init balloon3_leds_init(void) +{ + platform_device_register(&balloon3_leds); + platform_device_register(&balloon3_pcf_leds); +} +#else +static inline void balloon3_leds_init(void) {} +#endif + +/****************************************************************************** + * FPGA IRQ + ******************************************************************************/ static void balloon3_mask_irq(unsigned int irq) { int balloon3_irq = (irq - BALLOON3_IRQ(0)); @@ -98,7 +471,6 @@ static void balloon3_irq_handler(unsigned int irq, struct irq_desc *desc) { unsigned long pending = __raw_readl(BALLOON3_INT_CONTROL_REG) & balloon3_irq_enabled; - do { /* clear useless edge notification */ if (desc->chip->ack) @@ -132,201 +504,259 @@ static void __init balloon3_init_irq(void) "enabled\n", __func__, BALLOON3_AUX_NIRQ); } -static unsigned long balloon3_ac97_pin_config[] = { - GPIO28_AC97_BITCLK, - GPIO29_AC97_SDATA_IN_0, - GPIO30_AC97_SDATA_OUT, - GPIO31_AC97_SYNC, - GPIO113_AC97_nRESET, -}; - -static void balloon3_backlight_power(int on) -{ - pr_debug("%s: power is %s\n", __func__, on ? "on" : "off"); - gpio_set_value(BALLOON3_GPIO_RUN_BACKLIGHT, on); -} - -static unsigned long balloon3_lcd_pin_config[] = { - /* LCD - 16bpp Active TFT */ - GPIOxx_LCD_TFT_16BPP, - - GPIO99_GPIO, /* Backlight */ +/****************************************************************************** + * GPIO expander + ******************************************************************************/ +#if defined(CONFIG_GPIO_PCF857X) || defined(CONFIG_GPIO_PCF857X_MODULE) +static struct pcf857x_platform_data balloon3_pcf857x_pdata = { + .gpio_base = BALLOON3_PCF_GPIO_BASE, + .n_latch = 0, + .setup = NULL, + .teardown = NULL, + .context = NULL, }; -static struct pxafb_mode_info balloon3_lcd_modes[] = { +static struct i2c_board_info __initdata balloon3_i2c_devs[] = { { - .pixclock = 38000, - .xres = 480, - .yres = 640, - .bpp = 16, - .hsync_len = 8, - .left_margin = 8, - .right_margin = 8, - .vsync_len = 2, - .upper_margin = 4, - .lower_margin = 5, - .sync = 0, + I2C_BOARD_INFO("pcf8574a", 0x38), + .platform_data = &balloon3_pcf857x_pdata, }, }; -static struct pxafb_mach_info balloon3_pxafb_info = { - .modes = balloon3_lcd_modes, - .num_modes = ARRAY_SIZE(balloon3_lcd_modes), - .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, - .pxafb_backlight_power = balloon3_backlight_power, -}; +static void __init balloon3_i2c_init(void) +{ + pxa_set_i2c_info(NULL); + i2c_register_board_info(0, ARRAY_AND_SIZE(balloon3_i2c_devs)); +} +#else +static inline void balloon3_i2c_init(void) {} +#endif + +/****************************************************************************** + * NAND + ******************************************************************************/ +#if defined(CONFIG_MTD_NAND_PLATFORM)||defined(CONFIG_MTD_NAND_PLATFORM_MODULE) +static uint16_t balloon3_ctl = + BALLOON3_NAND_CONTROL_FLCE0 | BALLOON3_NAND_CONTROL_FLCE1 | + BALLOON3_NAND_CONTROL_FLCE2 | BALLOON3_NAND_CONTROL_FLCE3 | + BALLOON3_NAND_CONTROL_FLWP; + +static void balloon3_nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl) +{ + struct nand_chip *this = mtd->priv; -static unsigned long balloon3_mmc_pin_config[] = { - GPIO32_MMC_CLK, - GPIO92_MMC_DAT_0, - GPIO109_MMC_DAT_1, - GPIO110_MMC_DAT_2, - GPIO111_MMC_DAT_3, - GPIO112_MMC_CMD, -}; + if (ctrl & NAND_CTRL_CHANGE) { + if (ctrl & NAND_CLE) + balloon3_ctl |= BALLOON3_NAND_CONTROL_FLCLE; + else + balloon3_ctl &= ~BALLOON3_NAND_CONTROL_FLCLE; -static void balloon3_mci_setpower(struct device *dev, unsigned int vdd) -{ - struct pxamci_platform_data *p_d = dev->platform_data; - - if ((1 << vdd) & p_d->ocr_mask) { - pr_debug("%s: on\n", __func__); - /* FIXME something to prod here? */ - } else { - pr_debug("%s: off\n", __func__); - /* FIXME something to prod here? */ + if (ctrl & NAND_ALE) + balloon3_ctl |= BALLOON3_NAND_CONTROL_FLALE; + else + balloon3_ctl &= ~BALLOON3_NAND_CONTROL_FLALE; + + __raw_writel(balloon3_ctl, BALLOON3_NAND_CONTROL_REG); } + + if (cmd != NAND_CMD_NONE) + writeb(cmd, this->IO_ADDR_W); } -static struct pxamci_platform_data balloon3_mci_platform_data = { - .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, - .setpower = balloon3_mci_setpower, -}; +static void balloon3_nand_select_chip(struct mtd_info *mtd, int chip) +{ + if (chip < 0 || chip > 3) + return; -static int balloon3_udc_is_connected(void) + balloon3_ctl |= BALLOON3_NAND_CONTROL_FLCE0 | + BALLOON3_NAND_CONTROL_FLCE1 | + BALLOON3_NAND_CONTROL_FLCE2 | + BALLOON3_NAND_CONTROL_FLCE3; + + /* Deassert correct nCE line */ + balloon3_ctl &= ~(BALLOON3_NAND_CONTROL_FLCE0 << chip); + + __raw_writew(balloon3_ctl, BALLOON3_NAND_CONTROL_REG); +} + +static int balloon3_nand_probe(struct platform_device *pdev) { - pr_debug("%s: udc connected\n", __func__); - return 1; + void __iomem *temp_map; + uint16_t ver; + int ret; + + __raw_writew(BALLOON3_NAND_CONTROL2_16BIT, BALLOON3_NAND_CONTROL2_REG); + + ver = __raw_readw(BALLOON3_FPGA_VER); + if (ver > 0x0201) + pr_warn("The FPGA code, version 0x%04x, is newer than rel-0.3. " + "NAND support might be broken in this version!", ver); + + /* Power up the NAND chips */ + ret = gpio_request(BALLOON3_GPIO_RUN_NAND, "NAND"); + if (ret) + goto err1; + + ret = gpio_direction_output(BALLOON3_GPIO_RUN_NAND, 1); + if (ret) + goto err2; + + gpio_set_value(BALLOON3_GPIO_RUN_NAND, 1); + + /* Deassert all nCE lines and write protect line */ + __raw_writel(balloon3_ctl, BALLOON3_NAND_CONTROL_REG); + return 0; + +err2: + gpio_free(BALLOON3_GPIO_RUN_NAND); +err1: + return ret; } -static void balloon3_udc_command(int cmd) +static void balloon3_nand_remove(struct platform_device *pdev) { - switch (cmd) { - case PXA2XX_UDC_CMD_CONNECT: - UP2OCR |= (UP2OCR_DPPUE + UP2OCR_DPPUBE); - pr_debug("%s: connect\n", __func__); - break; - case PXA2XX_UDC_CMD_DISCONNECT: - UP2OCR &= ~UP2OCR_DPPUE; - pr_debug("%s: disconnect\n", __func__); - break; - } + /* Power down the NAND chips */ + gpio_set_value(BALLOON3_GPIO_RUN_NAND, 0); + gpio_free(BALLOON3_GPIO_RUN_NAND); } -static struct pxa2xx_udc_mach_info balloon3_udc_info = { - .udc_is_connected = balloon3_udc_is_connected, - .udc_command = balloon3_udc_command, +static struct mtd_partition balloon3_partition_info[] = { + [0] = { + .name = "Boot", + .offset = 0, + .size = SZ_4M, + }, + [1] = { + .name = "RootFS", + .offset = MTDPART_OFS_APPEND, + .size = MTDPART_SIZ_FULL + }, }; -static struct pxaficp_platform_data balloon3_ficp_platform_data = { - .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF, -}; +static const char *balloon3_part_probes[] = { "cmdlinepart", NULL }; -static unsigned long balloon3_ohci_pin_config[] = { - GPIO88_USBH1_PWR, - GPIO89_USBH1_PEN, +struct platform_nand_data balloon3_nand_pdata = { + .chip = { + .nr_chips = 4, + .chip_offset = 0, + .nr_partitions = ARRAY_SIZE(balloon3_partition_info), + .partitions = balloon3_partition_info, + .chip_delay = 50, + .part_probe_types = balloon3_part_probes, + }, + .ctrl = { + .hwcontrol = 0, + .dev_ready = 0, + .select_chip = balloon3_nand_select_chip, + .cmd_ctrl = balloon3_nand_cmd_ctl, + .probe = balloon3_nand_probe, + .remove = balloon3_nand_remove, + }, }; -static struct pxaohci_platform_data balloon3_ohci_platform_data = { - .port_mode = PMM_PERPORT_MODE, - .flags = ENABLE_PORT_ALL | POWER_CONTROL_LOW | POWER_SENSE_LOW, +static struct resource balloon3_nand_resource[] = { + [0] = { + .start = BALLOON3_NAND_BASE, + .end = BALLOON3_NAND_BASE + 0x4, + .flags = IORESOURCE_MEM, + }, }; -static unsigned long balloon3_pin_config[] __initdata = { - /* Select BTUART 'COM1/ttyS0' as IO option for pins 42/43/44/45 */ - GPIO42_BTUART_RXD, - GPIO43_BTUART_TXD, - GPIO44_BTUART_CTS, - GPIO45_BTUART_RTS, - - /* Wakeup GPIO */ - GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH, - - /* NAND & IDLE LED GPIOs */ - GPIO9_GPIO, - GPIO10_GPIO, +static struct platform_device balloon3_nand = { + .name = "gen_nand", + .num_resources = ARRAY_SIZE(balloon3_nand_resource), + .resource = balloon3_nand_resource, + .id = -1, + .dev = { + .platform_data = &balloon3_nand_pdata, + } }; -static struct gpio_led balloon3_gpio_leds[] = { +static void __init balloon3_nand_init(void) +{ + platform_device_register(&balloon3_nand); +} +#else +static inline void balloon3_nand_init(void) {} +#endif + +/****************************************************************************** + * Core power regulator + ******************************************************************************/ +#if defined(CONFIG_REGULATOR_MAX1586) || \ + defined(CONFIG_REGULATOR_MAX1586_MODULE) +static struct regulator_consumer_supply balloon3_max1587a_consumers[] = { { - .name = "balloon3:green:idle", - .default_trigger = "heartbeat", - .gpio = BALLOON3_GPIO_LED_IDLE, - .active_low = 1, + .supply = "vcc_core", + } +}; + +static struct regulator_init_data balloon3_max1587a_v3_info = { + .constraints = { + .name = "vcc_core range", + .min_uV = 900000, + .max_uV = 1705000, + .always_on = 1, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, }, + .consumer_supplies = balloon3_max1587a_consumers, + .num_consumer_supplies = ARRAY_SIZE(balloon3_max1587a_consumers), +}; + +static struct max1586_subdev_data balloon3_max1587a_subdevs[] = { { - .name = "balloon3:green:nand", - .default_trigger = "nand-disk", - .gpio = BALLOON3_GPIO_LED_NAND, - .active_low = 1, - }, + .name = "vcc_core", + .id = MAX1586_V3, + .platform_data = &balloon3_max1587a_v3_info, + } }; -static struct gpio_led_platform_data balloon3_gpio_leds_platform_data = { - .leds = balloon3_gpio_leds, - .num_leds = ARRAY_SIZE(balloon3_gpio_leds), +static struct max1586_platform_data balloon3_max1587a_info = { + .subdevs = balloon3_max1587a_subdevs, + .num_subdevs = ARRAY_SIZE(balloon3_max1587a_subdevs), + .v3_gain = MAX1586_GAIN_R24_3k32, /* 730..1550 mV */ }; -static struct platform_device balloon3led_device = { - .name = "leds-gpio", - .id = -1, - .dev = { - .platform_data = &balloon3_gpio_leds_platform_data, +static struct i2c_board_info __initdata balloon3_pi2c_board_info[] = { + { + I2C_BOARD_INFO("max1586", 0x14), + .platform_data = &balloon3_max1587a_info, }, }; -static void __init balloon3_init(void) +static void __init balloon3_pmic_init(void) { - pr_info("Initialising Balloon3\n"); + pxa27x_set_i2c_power_info(NULL); + i2c_register_board_info(1, ARRAY_AND_SIZE(balloon3_pi2c_board_info)); +} +#else +static inline void balloon3_pmic_init(void) {} +#endif - /* system bus arbiter setting - * - Core_Park - * - LCD_wt:DMA_wt:CORE_Wt = 2:3:4 - */ +/****************************************************************************** + * Machine init + ******************************************************************************/ +static void __init balloon3_init(void) +{ ARB_CNTRL = ARB_CORE_PARK | 0x234; + pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_pin_config)); + pxa_set_ffuart_info(NULL); pxa_set_btuart_info(NULL); pxa_set_stuart_info(NULL); - pxa_set_i2c_info(NULL); - if (balloon3_has(BALLOON3_FEATURE_AUDIO)) { - pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_ac97_pin_config)); - pxa_set_ac97_info(NULL); - } - - if (balloon3_has(BALLOON3_FEATURE_TOPPOLY)) { - pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_lcd_pin_config)); - gpio_request(BALLOON3_GPIO_RUN_BACKLIGHT, - "LCD Backlight Power"); - gpio_direction_output(BALLOON3_GPIO_RUN_BACKLIGHT, 1); - set_pxa_fb_info(&balloon3_pxafb_info); - } - - if (balloon3_has(BALLOON3_FEATURE_MMC)) { - pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_mmc_pin_config)); - pxa_set_mci_info(&balloon3_mci_platform_data); - } - pxa_set_ficp_info(&balloon3_ficp_platform_data); - if (balloon3_has(BALLOON3_FEATURE_OHCI)) { - pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_ohci_pin_config)); - pxa_set_ohci_info(&balloon3_ohci_platform_data); - } - pxa_set_udc_info(&balloon3_udc_info); - - pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_pin_config)); - - platform_device_register(&balloon3led_device); + balloon3_i2c_init(); + balloon3_irda_init(); + balloon3_lcd_init(); + balloon3_leds_init(); + balloon3_mmc_init(); + balloon3_nand_init(); + balloon3_nor_init(); + balloon3_pmic_init(); + balloon3_ts_init(); + balloon3_udc_init(); + balloon3_uhc_init(); } static struct map_desc balloon3_io_desc[] __initdata = { diff --git a/trunk/arch/arm/mach-pxa/cm-x300.c b/trunk/arch/arm/mach-pxa/cm-x300.c index fdda6be6c391..c70e6c2f4e7c 100644 --- a/trunk/arch/arm/mach-pxa/cm-x300.c +++ b/trunk/arch/arm/mach-pxa/cm-x300.c @@ -689,6 +689,7 @@ static void __init cm_x300_init_da9030(void) { pxa3xx_set_i2c_power_info(&cm_x300_pwr_i2c_info); i2c_register_board_info(1, &cm_x300_pmic_info, 1); + set_irq_wake(IRQ_WAKEUP0, 1); } static void __init cm_x300_init_wi2wi(void) @@ -745,9 +746,10 @@ static void __init cm_x300_init(void) { cm_x300_init_mfp(); - pxa_set_ffuart_info(NULL); pxa_set_btuart_info(NULL); pxa_set_stuart_info(NULL); + if (cpu_is_pxa300()) + pxa_set_ffuart_info(NULL); cm_x300_init_da9030(); cm_x300_init_dm9000(); diff --git a/trunk/arch/arm/mach-pxa/colibri-pxa270-evalboard.c b/trunk/arch/arm/mach-pxa/colibri-pxa270-evalboard.c new file mode 100644 index 000000000000..0f3b632c3b14 --- /dev/null +++ b/trunk/arch/arm/mach-pxa/colibri-pxa270-evalboard.c @@ -0,0 +1,111 @@ +/* + * linux/arch/arm/mach-pxa/colibri-pxa270-evalboard.c + * + * Support for Toradex PXA270 based Colibri Evaluation Carrier Board + * Daniel Mack + * Marek Vasut + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "generic.h" +#include "devices.h" + +/****************************************************************************** + * Pin configuration + ******************************************************************************/ +static mfp_cfg_t colibri_pxa270_evalboard_pin_config[] __initdata = { + /* MMC */ + GPIO32_MMC_CLK, + GPIO92_MMC_DAT_0, + GPIO109_MMC_DAT_1, + GPIO110_MMC_DAT_2, + GPIO111_MMC_DAT_3, + GPIO112_MMC_CMD, + GPIO0_GPIO, /* SD detect */ + + /* FFUART */ + GPIO39_FFUART_TXD, + GPIO34_FFUART_RXD, + + /* UHC */ + GPIO88_USBH1_PWR, + GPIO89_USBH1_PEN, + GPIO119_USBH2_PWR, + GPIO120_USBH2_PEN, +}; + +/****************************************************************************** + * SD/MMC card controller + ******************************************************************************/ +#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) +static struct pxamci_platform_data colibri_pxa270_mci_platform_data = { + .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, + .gpio_power = -1, + .gpio_card_detect = GPIO0_COLIBRI_PXA270_SD_DETECT, + .gpio_card_ro = -1, + .detect_delay_ms = 200, +}; + +static void __init colibri_pxa270_mmc_init(void) +{ + pxa_set_mci_info(&colibri_pxa270_mci_platform_data); +} +#else +static inline void colibri_pxa270_mmc_init(void) {} +#endif + +/****************************************************************************** + * USB Host + ******************************************************************************/ +#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) +static int colibri_pxa270_ohci_init(struct device *dev) +{ + UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE; + return 0; +} + +static struct pxaohci_platform_data colibri_pxa270_ohci_info = { + .port_mode = PMM_PERPORT_MODE, + .flags = ENABLE_PORT1 | ENABLE_PORT2 | + POWER_CONTROL_LOW | POWER_SENSE_LOW, + .init = colibri_pxa270_ohci_init, +}; + +static void __init colibri_pxa270_uhc_init(void) +{ + pxa_set_ohci_info(&colibri_pxa270_ohci_info); +} +#else +static inline void colibri_pxa270_uhc_init(void) {} +#endif + +void __init colibri_pxa270_evalboard_init(void) +{ + pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_evalboard_pin_config)); + pxa_set_ffuart_info(NULL); + pxa_set_btuart_info(NULL); + pxa_set_stuart_info(NULL); + + colibri_pxa270_mmc_init(); + colibri_pxa270_uhc_init(); +} + diff --git a/trunk/arch/arm/mach-pxa/colibri-pxa270-income.c b/trunk/arch/arm/mach-pxa/colibri-pxa270-income.c new file mode 100644 index 000000000000..37f0f3ed7c61 --- /dev/null +++ b/trunk/arch/arm/mach-pxa/colibri-pxa270-income.c @@ -0,0 +1,272 @@ +/* + * linux/arch/arm/mach-pxa/income.c + * + * Support for Income s.r.o. SH-Dmaster PXA270 SBC + * + * Copyright (C) 2010 + * Marek Vasut + * Pavel Revak + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include "devices.h" +#include "generic.h" + +#define GPIO114_INCOME_ETH_IRQ (114) +#define GPIO0_INCOME_SD_DETECT (0) +#define GPIO0_INCOME_SD_RO (1) +#define GPIO54_INCOME_LED_A (54) +#define GPIO55_INCOME_LED_B (55) +#define GPIO113_INCOME_TS_IRQ (113) + +/****************************************************************************** + * Pin configuration + ******************************************************************************/ +static mfp_cfg_t income_pin_config[] __initdata = { + /* MMC */ + GPIO32_MMC_CLK, + GPIO92_MMC_DAT_0, + GPIO109_MMC_DAT_1, + GPIO110_MMC_DAT_2, + GPIO111_MMC_DAT_3, + GPIO112_MMC_CMD, + GPIO0_GPIO, /* SD detect */ + GPIO1_GPIO, /* SD read-only */ + + /* FFUART */ + GPIO39_FFUART_TXD, + GPIO34_FFUART_RXD, + + /* BFUART */ + GPIO42_BTUART_RXD, + GPIO43_BTUART_TXD, + GPIO45_BTUART_RTS, + + /* STUART */ + GPIO46_STUART_RXD, + GPIO47_STUART_TXD, + + /* UHC */ + GPIO88_USBH1_PWR, + GPIO89_USBH1_PEN, + + /* LCD */ + GPIOxx_LCD_TFT_16BPP, + + /* PWM */ + GPIO16_PWM0_OUT, + + /* I2C */ + GPIO117_I2C_SCL, + GPIO118_I2C_SDA, + + /* LED */ + GPIO54_GPIO, /* LED A */ + GPIO55_GPIO, /* LED B */ +}; + +/****************************************************************************** + * SD/MMC card controller + ******************************************************************************/ +#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) +static struct pxamci_platform_data income_mci_platform_data = { + .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, + .gpio_power = -1, + .gpio_card_detect = GPIO0_INCOME_SD_DETECT, + .gpio_card_ro = GPIO0_INCOME_SD_RO, + .detect_delay_ms = 200, +}; + +static void __init income_mmc_init(void) +{ + pxa_set_mci_info(&income_mci_platform_data); +} +#else +static inline void income_mmc_init(void) {} +#endif + +/****************************************************************************** + * USB Host + ******************************************************************************/ +#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) +static struct pxaohci_platform_data income_ohci_info = { + .port_mode = PMM_PERPORT_MODE, + .flags = ENABLE_PORT1 | POWER_CONTROL_LOW | POWER_SENSE_LOW, +}; + +static void __init income_uhc_init(void) +{ + pxa_set_ohci_info(&income_ohci_info); +} +#else +static inline void income_uhc_init(void) {} +#endif + +/****************************************************************************** + * LED + ******************************************************************************/ +#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) +struct gpio_led income_gpio_leds[] = { + { + .name = "income:green:leda", + .default_trigger = "none", + .gpio = GPIO54_INCOME_LED_A, + .active_low = 1, + }, + { + .name = "income:green:ledb", + .default_trigger = "none", + .gpio = GPIO55_INCOME_LED_B, + .active_low = 1, + } +}; + +static struct gpio_led_platform_data income_gpio_led_info = { + .leds = income_gpio_leds, + .num_leds = ARRAY_SIZE(income_gpio_leds), +}; + +static struct platform_device income_leds = { + .name = "leds-gpio", + .id = -1, + .dev = { + .platform_data = &income_gpio_led_info, + } +}; + +static void __init income_led_init(void) +{ + platform_device_register(&income_leds); +} +#else +static inline void income_led_init(void) {} +#endif + +/****************************************************************************** + * I2C + ******************************************************************************/ +#if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE) +static struct i2c_board_info __initdata income_i2c_devs[] = { + { + I2C_BOARD_INFO("ds1340", 0x68), + }, { + I2C_BOARD_INFO("lm75", 0x4f), + }, +}; + +static void __init income_i2c_init(void) +{ + pxa_set_i2c_info(NULL); + pxa27x_set_i2c_power_info(NULL); + i2c_register_board_info(0, ARRAY_AND_SIZE(income_i2c_devs)); +} +#else +static inline void income_i2c_init(void) {} +#endif + +/****************************************************************************** + * Framebuffer + ******************************************************************************/ +#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) +static struct pxafb_mode_info income_lcd_modes[] = { +{ + .pixclock = 144700, + .xres = 320, + .yres = 240, + .bpp = 32, + .depth = 18, + + .left_margin = 10, + .right_margin = 10, + .upper_margin = 7, + .lower_margin = 8, + + .hsync_len = 20, + .vsync_len = 2, + + .sync = FB_SYNC_VERT_HIGH_ACT, +}, +}; + +static struct pxafb_mach_info income_lcd_screen = { + .modes = income_lcd_modes, + .num_modes = ARRAY_SIZE(income_lcd_modes), + .lcd_conn = LCD_COLOR_TFT_18BPP | LCD_PCLK_EDGE_FALL, +}; + +static void __init income_lcd_init(void) +{ + set_pxa_fb_info(&income_lcd_screen); +} +#else +static inline void income_lcd_init(void) {} +#endif + +/****************************************************************************** + * Backlight + ******************************************************************************/ +#if defined(CONFIG_BACKLIGHT_PWM) || defined(CONFIG_BACKLIGHT_PWM__MODULE) +static struct platform_pwm_backlight_data income_backlight_data = { + .pwm_id = 0, + .max_brightness = 0x3ff, + .dft_brightness = 0x1ff, + .pwm_period_ns = 1000000, +}; + +static struct platform_device income_backlight = { + .name = "pwm-backlight", + .dev = { + .parent = &pxa27x_device_pwm0.dev, + .platform_data = &income_backlight_data, + }, +}; + +static void __init income_pwm_init(void) +{ + platform_device_register(&income_backlight); +} +#else +static inline void income_pwm_init(void) {} +#endif + +void __init colibri_pxa270_income_boardinit(void) +{ + pxa2xx_mfp_config(ARRAY_AND_SIZE(income_pin_config)); + pxa_set_ffuart_info(NULL); + pxa_set_btuart_info(NULL); + pxa_set_stuart_info(NULL); + + income_mmc_init(); + income_uhc_init(); + income_led_init(); + income_i2c_init(); + income_lcd_init(); + income_pwm_init(); +} + diff --git a/trunk/arch/arm/mach-pxa/colibri-pxa270.c b/trunk/arch/arm/mach-pxa/colibri-pxa270.c index 061c45316de8..98673ac6efd0 100644 --- a/trunk/arch/arm/mach-pxa/colibri-pxa270.c +++ b/trunk/arch/arm/mach-pxa/colibri-pxa270.c @@ -3,6 +3,7 @@ * * Support for Toradex PXA270 based Colibri module * Daniel Mack + * Marek Vasut * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -10,49 +11,55 @@ */ #include -#include -#include -#include #include -#include -#include -#include +#include #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include + #include -#include -#include #include +#include +#include -#include +#include #include +#include -#include "generic.h" #include "devices.h" +#include "generic.h" -/* - * GPIO configuration - */ +/****************************************************************************** + * Pin configuration + ******************************************************************************/ static mfp_cfg_t colibri_pxa270_pin_config[] __initdata = { + /* Ethernet */ GPIO78_nCS_2, /* Ethernet CS */ GPIO114_GPIO, /* Ethernet IRQ */ + + /* AC97 */ + GPIO28_AC97_BITCLK, + GPIO29_AC97_SDATA_IN_0, + GPIO30_AC97_SDATA_OUT, + GPIO31_AC97_SYNC, + GPIO95_AC97_nRESET, + GPIO98_AC97_SYSCLK, + GPIO113_GPIO, /* Touchscreen IRQ */ }; -/* - * NOR flash - */ +/****************************************************************************** + * NOR Flash + ******************************************************************************/ +#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) static struct mtd_partition colibri_partitions[] = { { .name = "Bootloader", .offset = 0x00000000, .size = 0x00040000, - .mask_flags = MTD_WRITEABLE /* force read-only */ + .mask_flags = MTD_WRITEABLE /* force read-only */ }, { .name = "Kernel", .offset = 0x00040000, @@ -90,50 +97,113 @@ static struct platform_device colibri_pxa270_flash_device = { .num_resources = 1, }; -/* - * DM9000 Ethernet - */ -#if defined(CONFIG_DM9000) -static struct resource dm9000_resources[] = { - [0] = { - .start = COLIBRI_PXA270_ETH_PHYS, - .end = COLIBRI_PXA270_ETH_PHYS + 3, +static void __init colibri_pxa270_nor_init(void) +{ + platform_device_register(&colibri_pxa270_flash_device); +} +#else +static inline void colibri_pxa270_nor_init(void) {} +#endif + +/****************************************************************************** + * Ethernet + ******************************************************************************/ +#if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) +static struct resource colibri_pxa270_dm9000_resources[] = { + { + .start = PXA_CS2_PHYS, + .end = PXA_CS2_PHYS + 3, .flags = IORESOURCE_MEM, }, - [1] = { - .start = COLIBRI_PXA270_ETH_PHYS + 4, - .end = COLIBRI_PXA270_ETH_PHYS + 4 + 500, + { + .start = PXA_CS2_PHYS + 4, + .end = PXA_CS2_PHYS + 4 + 500, .flags = IORESOURCE_MEM, }, - [2] = { - .start = COLIBRI_PXA270_ETH_IRQ, - .end = COLIBRI_PXA270_ETH_IRQ, + { + .start = gpio_to_irq(GPIO114_COLIBRI_PXA270_ETH_IRQ), + .end = gpio_to_irq(GPIO114_COLIBRI_PXA270_ETH_IRQ), .flags = IORESOURCE_IRQ | IRQF_TRIGGER_RISING, }, }; -static struct platform_device dm9000_device = { +static struct platform_device colibri_pxa270_dm9000_device = { .name = "dm9000", .id = -1, - .num_resources = ARRAY_SIZE(dm9000_resources), - .resource = dm9000_resources, + .num_resources = ARRAY_SIZE(colibri_pxa270_dm9000_resources), + .resource = colibri_pxa270_dm9000_resources, }; -#endif /* CONFIG_DM9000 */ -static struct platform_device *colibri_pxa270_devices[] __initdata = { - &colibri_pxa270_flash_device, -#if defined(CONFIG_DM9000) - &dm9000_device, +static void __init colibri_pxa270_eth_init(void) +{ + platform_device_register(&colibri_pxa270_dm9000_device); +} +#else +static inline void colibri_pxa270_eth_init(void) {} #endif + +/****************************************************************************** + * Audio and Touchscreen + ******************************************************************************/ +#if defined(CONFIG_TOUCHSCREEN_UCB1400) || \ + defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE) +static pxa2xx_audio_ops_t colibri_pxa270_ac97_pdata = { + .reset_gpio = 95, +}; + +static struct ucb1400_pdata colibri_pxa270_ucb1400_pdata = { + .irq = gpio_to_irq(GPIO113_COLIBRI_PXA270_TS_IRQ), +}; + +static struct platform_device colibri_pxa270_ucb1400_device = { + .name = "ucb1400_core", + .id = -1, + .dev = { + .platform_data = &colibri_pxa270_ucb1400_pdata, + }, }; +static void __init colibri_pxa270_tsc_init(void) +{ + pxa_set_ac97_info(&colibri_pxa270_ac97_pdata); + platform_device_register(&colibri_pxa270_ucb1400_device); +} +#else +static inline void colibri_pxa270_tsc_init(void) {} +#endif + +static int colibri_pxa270_baseboard; +core_param(colibri_pxa270_baseboard, colibri_pxa270_baseboard, int, 0444); + static void __init colibri_pxa270_init(void) { pxa2xx_mfp_config(ARRAY_AND_SIZE(colibri_pxa270_pin_config)); - pxa_set_ffuart_info(NULL); - pxa_set_btuart_info(NULL); - pxa_set_stuart_info(NULL); - platform_add_devices(ARRAY_AND_SIZE(colibri_pxa270_devices)); + + colibri_pxa270_nor_init(); + colibri_pxa270_eth_init(); + colibri_pxa270_tsc_init(); + + switch (colibri_pxa270_baseboard) { + case COLIBRI_PXA270_EVALBOARD: + colibri_pxa270_evalboard_init(); + break; + case COLIBRI_PXA270_INCOME: + colibri_pxa270_income_boardinit(); + break; + default: + printk(KERN_ERR "Illegal colibri_pxa270_baseboard type %d\n", + colibri_pxa270_baseboard); + } +} + +/* The "Income s.r.o. SH-Dmaster PXA270 SBC" board can be booted either + * with the INCOME mach type or with COLIBRI and the kernel parameter + * "colibri_pxa270_baseboard=1" + */ +static void __init colibri_pxa270_income_init(void) +{ + colibri_pxa270_baseboard = COLIBRI_PXA270_INCOME; + colibri_pxa270_init(); } MACHINE_START(COLIBRI, "Toradex Colibri PXA270") @@ -146,3 +216,13 @@ MACHINE_START(COLIBRI, "Toradex Colibri PXA270") .timer = &pxa_timer, MACHINE_END +MACHINE_START(INCOME, "Income s.r.o. SH-Dmaster PXA270 SBC") + .phys_io = 0x40000000, + .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, + .boot_params = 0xa0000100, + .init_machine = colibri_pxa270_income_init, + .map_io = pxa_map_io, + .init_irq = pxa27x_init_irq, + .timer = &pxa_timer, +MACHINE_END + diff --git a/trunk/arch/arm/mach-pxa/colibri-pxa320.c b/trunk/arch/arm/mach-pxa/colibri-pxa320.c index ae835fad7d10..99e850d84710 100644 --- a/trunk/arch/arm/mach-pxa/colibri-pxa320.c +++ b/trunk/arch/arm/mach-pxa/colibri-pxa320.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -28,6 +29,8 @@ #include #include #include +#include +#include #include "generic.h" #include "devices.h" @@ -101,6 +104,42 @@ void __init colibri_pxa320_init_ohci(void) static inline void colibri_pxa320_init_ohci(void) {} #endif /* CONFIG_USB_OHCI_HCD || CONFIG_USB_OHCI_HCD_MODULE */ +#if defined(CONFIG_USB_GADGET_PXA27X)||defined(CONFIG_USB_GADGET_PXA27X_MODULE) +static struct gpio_vbus_mach_info colibri_pxa320_gpio_vbus_info = { + .gpio_vbus = mfp_to_gpio(MFP_PIN_GPIO96), + .gpio_pullup = -1, +}; + +static struct platform_device colibri_pxa320_gpio_vbus = { + .name = "gpio-vbus", + .id = -1, + .dev = { + .platform_data = &colibri_pxa320_gpio_vbus_info, + }, +}; + +static void colibri_pxa320_udc_command(int cmd) +{ + if (cmd == PXA2XX_UDC_CMD_CONNECT) + UP2OCR = UP2OCR_HXOE | UP2OCR_DPPUE; + else if (cmd == PXA2XX_UDC_CMD_DISCONNECT) + UP2OCR = UP2OCR_HXOE; +} + +static struct pxa2xx_udc_mach_info colibri_pxa320_udc_info __initdata = { + .udc_command = colibri_pxa320_udc_command, + .gpio_pullup = -1, +}; + +static void __init colibri_pxa320_init_udc(void) +{ + pxa_set_udc_info(&colibri_pxa320_udc_info); + platform_device_register(&colibri_pxa320_gpio_vbus); +} +#else +static inline void colibri_pxa320_init_udc(void) {} +#endif + static mfp_cfg_t colibri_pxa320_mmc_pin_config[] __initdata = { GPIO22_MMC1_CLK, GPIO23_MMC1_CMD, @@ -212,6 +251,7 @@ void __init colibri_pxa320_init(void) colibri_pxa3xx_init_mmc(ARRAY_AND_SIZE(colibri_pxa320_mmc_pin_config), mfp_to_gpio(MFP_PIN_GPIO28)); colibri_pxa320_init_uart(); + colibri_pxa320_init_udc(); } MACHINE_START(COLIBRI320, "Toradex Colibri PXA320") diff --git a/trunk/arch/arm/mach-pxa/corgi.c b/trunk/arch/arm/mach-pxa/corgi.c index 461ba4080155..3fb0fc099080 100644 --- a/trunk/arch/arm/mach-pxa/corgi.c +++ b/trunk/arch/arm/mach-pxa/corgi.c @@ -50,14 +50,13 @@ #include #include #include -#include +#include #include #include #include "generic.h" #include "devices.h" -#include "sharpsl.h" static unsigned long corgi_pin_config[] __initdata = { /* Static Memory I/O */ @@ -185,8 +184,6 @@ static struct scoop_pcmcia_config corgi_pcmcia_config = { .num_devs = 1, }; -EXPORT_SYMBOL(corgiscoop_device); - static struct w100_mem_info corgi_fb_mem = { .ext_cntl = 0x00040003, .sdram_mode_reg = 0x00650021, diff --git a/trunk/arch/arm/mach-pxa/corgi_pm.c b/trunk/arch/arm/mach-pxa/corgi_pm.c index 3f1dc74ac048..29034778bfda 100644 --- a/trunk/arch/arm/mach-pxa/corgi_pm.c +++ b/trunk/arch/arm/mach-pxa/corgi_pm.c @@ -23,12 +23,11 @@ #include #include -#include #include #include +#include #include "generic.h" -#include "sharpsl.h" #define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */ #define SHARPSL_CHARGE_ON_TEMP 0xe0 /* 2.9V */ @@ -134,11 +133,11 @@ unsigned long corgipm_read_devdata(int type) case SHARPSL_STATUS_ACIN: return ((GPLR(CORGI_GPIO_AC_IN) & GPIO_bit(CORGI_GPIO_AC_IN)) != 0); case SHARPSL_STATUS_LOCK: - return READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_batlock); + return gpio_get_value(sharpsl_pm.machinfo->gpio_batlock); case SHARPSL_STATUS_CHRGFULL: - return READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_batfull); + return gpio_get_value(sharpsl_pm.machinfo->gpio_batfull); case SHARPSL_STATUS_FATAL: - return READ_GPIO_BIT(sharpsl_pm.machinfo->gpio_fatal); + return gpio_get_value(sharpsl_pm.machinfo->gpio_fatal); case SHARPSL_ACIN_VOLT: return sharpsl_pm_pxa_read_max1111(MAX1111_ACIN_VOLT); case SHARPSL_BATT_TEMP: @@ -165,8 +164,6 @@ static struct sharpsl_charger_machinfo corgi_pm_machinfo = { .should_wakeup = corgi_should_wakeup, #if defined(CONFIG_LCD_CORGI) .backlight_limit = corgi_lcd_limit_intensity, -#elif defined(CONFIG_BACKLIGHT_CORGI) - .backlight_limit = corgibl_limit_intensity, #endif .charge_on_volt = SHARPSL_CHARGE_ON_VOLT, .charge_on_temp = SHARPSL_CHARGE_ON_TEMP, diff --git a/trunk/arch/arm/mach-pxa/devices.c b/trunk/arch/arm/mach-pxa/devices.c index 8e10db148f1b..65447dc736c2 100644 --- a/trunk/arch/arm/mach-pxa/devices.c +++ b/trunk/arch/arm/mach-pxa/devices.c @@ -4,6 +4,7 @@ #include #include +#include #include #include #include @@ -31,6 +32,19 @@ void __init pxa_register_device(struct platform_device *dev, void *data) dev_err(&dev->dev, "unable to register device: %d\n", ret); } +static struct resource pxa_resource_pmu = { + .start = IRQ_PMU, + .end = IRQ_PMU, + .flags = IORESOURCE_IRQ, +}; + +struct platform_device pxa_device_pmu = { + .name = "arm-pmu", + .id = ARM_PMU_DEVICE_CPU, + .resource = &pxa_resource_pmu, + .num_resources = 1, +}; + static struct resource pxamci_resources[] = { [0] = { .start = 0x41100000, diff --git a/trunk/arch/arm/mach-pxa/devices.h b/trunk/arch/arm/mach-pxa/devices.h index 93817d99761e..50353ea49ba4 100644 --- a/trunk/arch/arm/mach-pxa/devices.h +++ b/trunk/arch/arm/mach-pxa/devices.h @@ -1,3 +1,4 @@ +extern struct platform_device pxa_device_pmu; extern struct platform_device pxa_device_mci; extern struct platform_device pxa3xx_device_mci2; extern struct platform_device pxa3xx_device_mci3; diff --git a/trunk/arch/arm/mach-pxa/e330.c b/trunk/arch/arm/mach-pxa/e330.c deleted file mode 100644 index 8fde3387279d..000000000000 --- a/trunk/arch/arm/mach-pxa/e330.c +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Hardware definitions for the Toshiba e330 PDAs - * - * Copyright (c) 2003 Ian Molton - * - * This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - * - */ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include "generic.h" -#include "eseries.h" -#include "clock.h" - -/* -------------------- e330 tc6387xb parameters -------------------- */ - -static struct tc6387xb_platform_data e330_tc6387xb_info = { - .enable = &eseries_tmio_enable, - .disable = &eseries_tmio_disable, - .suspend = &eseries_tmio_suspend, - .resume = &eseries_tmio_resume, -}; - -static struct platform_device e330_tc6387xb_device = { - .name = "tc6387xb", - .id = -1, - .dev = { - .platform_data = &e330_tc6387xb_info, - }, - .num_resources = 2, - .resource = eseries_tmio_resources, -}; - -/* --------------------------------------------------------------- */ - -static struct platform_device *devices[] __initdata = { - &e330_tc6387xb_device, -}; - -static void __init e330_init(void) -{ - pxa_set_ffuart_info(NULL); - pxa_set_btuart_info(NULL); - pxa_set_stuart_info(NULL); - eseries_register_clks(); - eseries_get_tmio_gpios(); - platform_add_devices(devices, ARRAY_SIZE(devices)); - pxa_set_udc_info(&e7xx_udc_mach_info); -} - -MACHINE_START(E330, "Toshiba e330") - /* Maintainer: Ian Molton (spyro@f2s.com) */ - .phys_io = 0x40000000, - .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, - .boot_params = 0xa0000100, - .map_io = pxa_map_io, - .init_irq = pxa25x_init_irq, - .fixup = eseries_fixup, - .init_machine = e330_init, - .timer = &pxa_timer, -MACHINE_END - diff --git a/trunk/arch/arm/mach-pxa/e350.c b/trunk/arch/arm/mach-pxa/e350.c deleted file mode 100644 index f50f055f5720..000000000000 --- a/trunk/arch/arm/mach-pxa/e350.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Hardware definitions for the Toshiba e350 PDAs - * - * Copyright (c) 2003 Ian Molton - * - * This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - * - */ - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include "generic.h" -#include "eseries.h" -#include "clock.h" - -/* -------------------- e350 t7l66xb parameters -------------------- */ - -static struct t7l66xb_platform_data e350_t7l66xb_info = { - .irq_base = IRQ_BOARD_START, - .enable = &eseries_tmio_enable, - .suspend = &eseries_tmio_suspend, - .resume = &eseries_tmio_resume, -}; - -static struct platform_device e350_t7l66xb_device = { - .name = "t7l66xb", - .id = -1, - .dev = { - .platform_data = &e350_t7l66xb_info, - }, - .num_resources = 2, - .resource = eseries_tmio_resources, -}; - -/* ---------------------------------------------------------- */ - -static struct platform_device *devices[] __initdata = { - &e350_t7l66xb_device, -}; - -static void __init e350_init(void) -{ - pxa_set_ffuart_info(NULL); - pxa_set_btuart_info(NULL); - pxa_set_stuart_info(NULL); - eseries_register_clks(); - eseries_get_tmio_gpios(); - platform_add_devices(devices, ARRAY_SIZE(devices)); - pxa_set_udc_info(&e7xx_udc_mach_info); -} - -MACHINE_START(E350, "Toshiba e350") - /* Maintainer: Ian Molton (spyro@f2s.com) */ - .phys_io = 0x40000000, - .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, - .boot_params = 0xa0000100, - .map_io = pxa_map_io, - .init_irq = pxa25x_init_irq, - .fixup = eseries_fixup, - .init_machine = e350_init, - .timer = &pxa_timer, -MACHINE_END - diff --git a/trunk/arch/arm/mach-pxa/e400.c b/trunk/arch/arm/mach-pxa/e400.c deleted file mode 100644 index 55b950f12844..000000000000 --- a/trunk/arch/arm/mach-pxa/e400.c +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Hardware definitions for the Toshiba eseries PDAs - * - * Copyright (c) 2003 Ian Molton - * - * This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - * - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "generic.h" -#include "eseries.h" -#include "clock.h" - -/* ------------------------ E400 LCD definitions ------------------------ */ - -static struct pxafb_mode_info e400_pxafb_mode_info = { - .pixclock = 140703, - .xres = 240, - .yres = 320, - .bpp = 16, - .hsync_len = 4, - .left_margin = 28, - .right_margin = 8, - .vsync_len = 3, - .upper_margin = 5, - .lower_margin = 6, - .sync = 0, -}; - -static struct pxafb_mach_info e400_pxafb_mach_info = { - .modes = &e400_pxafb_mode_info, - .num_modes = 1, - .lcd_conn = LCD_COLOR_TFT_16BPP, - .lccr3 = 0, - .pxafb_backlight_power = NULL, -}; - -/* ------------------------ E400 MFP config ----------------------------- */ - -static unsigned long e400_pin_config[] __initdata = { - /* Chip selects */ - GPIO15_nCS_1, /* CS1 - Flash */ - GPIO80_nCS_4, /* CS4 - TMIO */ - - /* Clocks */ - GPIO12_32KHz, - - /* BTUART */ - GPIO42_BTUART_RXD, - GPIO43_BTUART_TXD, - GPIO44_BTUART_CTS, - - /* TMIO controller */ - GPIO19_GPIO, /* t7l66xb #PCLR */ - GPIO45_GPIO, /* t7l66xb #SUSPEND (NOT BTUART!) */ - - /* wakeup */ - GPIO0_GPIO | WAKEUP_ON_EDGE_RISE, -}; - -/* ---------------------------------------------------------------------- */ - -static struct mtd_partition partition_a = { - .name = "Internal NAND flash", - .offset = 0, - .size = MTDPART_SIZ_FULL, -}; - -static uint8_t scan_ff_pattern[] = { 0xff, 0xff }; - -static struct nand_bbt_descr e400_t7l66xb_nand_bbt = { - .options = 0, - .offs = 4, - .len = 2, - .pattern = scan_ff_pattern -}; - -static struct tmio_nand_data e400_t7l66xb_nand_config = { - .num_partitions = 1, - .partition = &partition_a, - .badblock_pattern = &e400_t7l66xb_nand_bbt, -}; - -static struct t7l66xb_platform_data e400_t7l66xb_info = { - .irq_base = IRQ_BOARD_START, - .enable = &eseries_tmio_enable, - .suspend = &eseries_tmio_suspend, - .resume = &eseries_tmio_resume, - - .nand_data = &e400_t7l66xb_nand_config, -}; - -static struct platform_device e400_t7l66xb_device = { - .name = "t7l66xb", - .id = -1, - .dev = { - .platform_data = &e400_t7l66xb_info, - }, - .num_resources = 2, - .resource = eseries_tmio_resources, -}; - -/* ---------------------------------------------------------- */ - -static struct platform_device *devices[] __initdata = { - &e400_t7l66xb_device, -}; - -static void __init e400_init(void) -{ - pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config)); - pxa_set_ffuart_info(NULL); - pxa_set_btuart_info(NULL); - pxa_set_stuart_info(NULL); - /* Fixme - e400 may have a switched clock */ - eseries_register_clks(); - eseries_get_tmio_gpios(); - set_pxa_fb_info(&e400_pxafb_mach_info); - platform_add_devices(devices, ARRAY_SIZE(devices)); - pxa_set_udc_info(&e7xx_udc_mach_info); -} - -MACHINE_START(E400, "Toshiba e400") - /* Maintainer: Ian Molton (spyro@f2s.com) */ - .phys_io = 0x40000000, - .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, - .boot_params = 0xa0000100, - .map_io = pxa_map_io, - .init_irq = pxa25x_init_irq, - .fixup = eseries_fixup, - .init_machine = e400_init, - .timer = &pxa_timer, -MACHINE_END - diff --git a/trunk/arch/arm/mach-pxa/e740.c b/trunk/arch/arm/mach-pxa/e740.c deleted file mode 100644 index d578021d1a10..000000000000 --- a/trunk/arch/arm/mach-pxa/e740.c +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Hardware definitions for the Toshiba eseries PDAs - * - * Copyright (c) 2003 Ian Molton - * - * This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. - * - */ - -#include -#include -#include -#include -#include -#include -#include - -#include