aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2014-08-07 02:36:12 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-08-07 02:36:12 -0400
commit5e2aa2ed08e2e280121dc7cf5609c87d464f12ef (patch)
treeca7d7b1480285e3b617fecc5b41f0ce150a82c32 /Documentation
parentf62d14a8072b9756db36ba394e2b267470a40240 (diff)
parentfc8104bc5a3f6f49d79f45f2706f79f77a9fb2ae (diff)
Merge branch 'next' into for-linus
Prepare first round of input updates for 3.17.
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/stable/sysfs-devices-system-cpu25
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget45
-rw-r--r--Documentation/ABI/testing/ima_policy2
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio46
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio-proximity-as393516
-rw-r--r--Documentation/ABI/testing/sysfs-bus-pci23
-rw-r--r--Documentation/ABI/testing/sysfs-class-net8
-rw-r--r--Documentation/ABI/testing/sysfs-class-net-cdc_ncm149
-rw-r--r--Documentation/ABI/testing/sysfs-class-net-queues79
-rw-r--r--Documentation/ABI/testing/sysfs-class-net-statistics201
-rw-r--r--Documentation/ABI/testing/sysfs-devices-system-cpu4
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-thingm23
-rw-r--r--Documentation/ABI/testing/sysfs-platform-brcmstb-gisb-arb8
-rw-r--r--Documentation/ABI/testing/sysfs-platform-chipidea-usb-otg56
-rw-r--r--Documentation/ABI/testing/sysfs-power29
-rw-r--r--Documentation/Changes14
-rw-r--r--Documentation/CodingStyle22
-rw-r--r--Documentation/DMA-API-HOWTO.txt210
-rw-r--r--Documentation/DMA-API.txt150
-rw-r--r--Documentation/DMA-ISA-LPC.txt4
-rw-r--r--Documentation/DMA-attributes.txt2
-rw-r--r--Documentation/DocBook/80211.tmpl1
-rw-r--r--Documentation/DocBook/Makefile3
-rw-r--r--Documentation/DocBook/drm.tmpl1039
-rw-r--r--Documentation/DocBook/filesystems.tmpl2
-rw-r--r--Documentation/DocBook/gadget.tmpl2
-rw-r--r--Documentation/DocBook/genericirq.tmpl4
-rw-r--r--Documentation/DocBook/kernel-locking.tmpl2
-rw-r--r--Documentation/DocBook/libata.tmpl6
-rw-r--r--Documentation/DocBook/media/Makefile6
-rw-r--r--Documentation/DocBook/media/v4l/io.xml15
-rw-r--r--Documentation/DocBook/media/v4l/media-ioc-enum-links.xml8
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt.xml4
-rw-r--r--Documentation/DocBook/media/v4l/subdev-formats.xml760
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-dqevent.xml33
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-dv-timings-cap.xml27
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-enum-dv-timings.xml30
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml20
-rw-r--r--Documentation/DocBook/media_api.tmpl2
-rw-r--r--Documentation/DocBook/mtdnand.tmpl30
-rw-r--r--Documentation/DocBook/regulator.tmpl2
-rw-r--r--Documentation/DocBook/uio-howto.tmpl4
-rw-r--r--Documentation/DocBook/usb.tmpl2
-rw-r--r--Documentation/DocBook/writing-an-alsa-driver.tmpl2
-rw-r--r--Documentation/DocBook/writing_musb_glue_layer.tmpl873
-rw-r--r--Documentation/EDID/1024x768.S2
-rw-r--r--Documentation/EDID/1280x1024.S2
-rw-r--r--Documentation/EDID/1600x1200.S2
-rw-r--r--Documentation/EDID/1680x1050.S2
-rw-r--r--Documentation/EDID/1920x1080.S2
-rw-r--r--Documentation/EDID/800x600.S41
-rw-r--r--Documentation/EDID/HOWTO.txt2
-rw-r--r--Documentation/EDID/edid.S17
-rw-r--r--Documentation/IRQ-domain.txt3
-rw-r--r--Documentation/RCU/00-INDEX2
-rw-r--r--Documentation/RCU/checklist.txt12
-rw-r--r--Documentation/RCU/rcu_dereference.txt371
-rw-r--r--Documentation/RCU/stallwarn.txt2
-rw-r--r--Documentation/RCU/whatisRCU.txt55
-rw-r--r--Documentation/SubmittingPatches22
-rw-r--r--Documentation/accounting/getdelays.c1
-rw-r--r--Documentation/acpi/enumeration.txt8
-rw-r--r--Documentation/arm/00-INDEX2
-rw-r--r--Documentation/arm/Marvell/README5
-rw-r--r--Documentation/arm/memory.txt9
-rw-r--r--Documentation/arm/sti/stih407-overview.txt18
-rw-r--r--Documentation/arm/uefi.txt64
-rw-r--r--Documentation/arm64/booting.txt4
-rw-r--r--Documentation/atomic_ops.txt31
-rw-r--r--Documentation/cgroups/memory.txt27
-rw-r--r--Documentation/cgroups/unified-hierarchy.txt359
-rw-r--r--Documentation/clk.txt16
-rw-r--r--Documentation/connector/connector.txt15
-rw-r--r--Documentation/cpu-freq/core.txt29
-rw-r--r--Documentation/cpu-freq/cpu-drivers.txt48
-rw-r--r--Documentation/cpu-freq/index.txt4
-rw-r--r--Documentation/cpu-freq/intel-pstate.txt7
-rw-r--r--Documentation/debugging-via-ohci1394.txt13
-rw-r--r--Documentation/device-mapper/thin-provisioning.txt5
-rw-r--r--Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt19
-rw-r--r--Documentation/devicetree/bindings/arm/armada-38x.txt14
-rw-r--r--Documentation/devicetree/bindings/arm/armada-cpu-reset.txt14
-rw-r--r--Documentation/devicetree/bindings/arm/axxia.txt12
-rw-r--r--Documentation/devicetree/bindings/arm/coherency-fabric.txt32
-rw-r--r--Documentation/devicetree/bindings/arm/cpus.txt8
-rw-r--r--Documentation/devicetree/bindings/arm/exynos/power_domain.txt20
-rw-r--r--Documentation/devicetree/bindings/arm/exynos/smp-sysram.txt38
-rw-r--r--Documentation/devicetree/bindings/arm/global_timer.txt7
-rw-r--r--Documentation/devicetree/bindings/arm/l2cc.txt3
-rw-r--r--Documentation/devicetree/bindings/arm/marvell,berlin.txt102
-rw-r--r--Documentation/devicetree/bindings/arm/omap/l3-noc.txt2
-rw-r--r--Documentation/devicetree/bindings/arm/omap/omap.txt18
-rw-r--r--Documentation/devicetree/bindings/arm/pmu.txt1
-rw-r--r--Documentation/devicetree/bindings/arm/psci.txt37
-rw-r--r--Documentation/devicetree/bindings/arm/rockchip.txt10
-rw-r--r--Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt2
-rw-r--r--Documentation/devicetree/bindings/arm/samsung/pmu.txt4
-rw-r--r--Documentation/devicetree/bindings/arm/samsung/sysreg.txt11
-rw-r--r--Documentation/devicetree/bindings/arm/sti.txt15
-rw-r--r--Documentation/devicetree/bindings/arm/vexpress-sysreg.txt79
-rw-r--r--Documentation/devicetree/bindings/arm/vexpress.txt15
-rw-r--r--Documentation/devicetree/bindings/ata/ahci-platform.txt14
-rw-r--r--Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt30
-rw-r--r--Documentation/devicetree/bindings/bus/mvebu-mbus.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/altr_socfpga.txt4
-rw-r--r--Documentation/devicetree/bindings/clock/at91-clock.txt130
-rw-r--r--Documentation/devicetree/bindings/clock/bcm-kona-clock.txt116
-rw-r--r--Documentation/devicetree/bindings/clock/clock-bindings.txt9
-rw-r--r--Documentation/devicetree/bindings/clock/exynos3250-clock.txt41
-rw-r--r--Documentation/devicetree/bindings/clock/exynos5260-clock.txt190
-rw-r--r--Documentation/devicetree/bindings/clock/exynos5410-clock.txt45
-rw-r--r--Documentation/devicetree/bindings/clock/exynos5420-clock.txt3
-rw-r--r--Documentation/devicetree/bindings/clock/fixed-clock.txt1
-rw-r--r--Documentation/devicetree/bindings/clock/hix5hd2-clock.txt31
-rw-r--r--Documentation/devicetree/bindings/clock/imx25-clock.txt3
-rw-r--r--Documentation/devicetree/bindings/clock/imx27-clock.txt7
-rw-r--r--Documentation/devicetree/bindings/clock/imx6q-clock.txt1
-rw-r--r--Documentation/devicetree/bindings/clock/imx6sx-clock.txt13
-rw-r--r--Documentation/devicetree/bindings/clock/lsi,axm5516-clks.txt29
-rw-r--r--Documentation/devicetree/bindings/clock/mvebu-core-clock.txt8
-rw-r--r--Documentation/devicetree/bindings/clock/qcom,gcc.txt3
-rw-r--r--Documentation/devicetree/bindings/clock/qoriq-clock.txt (renamed from Documentation/devicetree/bindings/clock/corenet-clock.txt)10
-rw-r--r--Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt4
-rw-r--r--Documentation/devicetree/bindings/clock/renesas,r8a7740-cpg-clocks.txt41
-rw-r--r--Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt27
-rw-r--r--Documentation/devicetree/bindings/clock/samsung,s3c2410-clock.txt50
-rw-r--r--Documentation/devicetree/bindings/clock/samsung,s3c2412-clock.txt50
-rw-r--r--Documentation/devicetree/bindings/clock/samsung,s3c2443-clock.txt56
-rw-r--r--Documentation/devicetree/bindings/clock/sunxi.txt4
-rw-r--r--Documentation/devicetree/bindings/clock/ti-keystone-pllctrl.txt20
-rw-r--r--Documentation/devicetree/bindings/clock/ti/apll.txt24
-rw-r--r--Documentation/devicetree/bindings/clock/ti/dpll.txt10
-rw-r--r--Documentation/devicetree/bindings/clock/ti/dra7-atl.txt96
-rw-r--r--Documentation/devicetree/bindings/clock/ti/gate.txt29
-rw-r--r--Documentation/devicetree/bindings/clock/ti/interface.txt2
-rw-r--r--Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt6
-rw-r--r--Documentation/devicetree/bindings/crypto/samsung-sss.txt34
-rw-r--r--Documentation/devicetree/bindings/dma/dma.txt4
-rw-r--r--Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt2
-rw-r--r--Documentation/devicetree/bindings/dma/mmp-dma.txt11
-rw-r--r--Documentation/devicetree/bindings/dma/ti-edma.txt17
-rw-r--r--Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt75
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt2
-rw-r--r--Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt6
-rw-r--r--Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt2
-rw-r--r--Documentation/devicetree/bindings/hsi/client-devices.txt44
-rw-r--r--Documentation/devicetree/bindings/hsi/nokia-modem.txt57
-rw-r--r--Documentation/devicetree/bindings/hsi/omap-ssi.txt97
-rw-r--r--Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt20
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-arb-gpio-challenge.txt6
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-cros-ec-tunnel.txt39
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-exynos5.txt11
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt2
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-rcar.txt3
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-rk3x.txt42
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt26
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-sunxi-p2wi.txt41
-rw-r--r--Documentation/devicetree/bindings/iio/proximity/as3935.txt28
-rw-r--r--Documentation/devicetree/bindings/input/atmel,maxtouch.txt25
-rw-r--r--Documentation/devicetree/bindings/input/cap1106.txt53
-rw-r--r--Documentation/devicetree/bindings/input/touchscreen/pixcir_i2c_ts.txt26
-rw-r--r--Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt4
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt29
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/marvell,armada-370-xp-mpic.txt (renamed from Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt)0
-rw-r--r--Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt70
-rw-r--r--Documentation/devicetree/bindings/leds/leds-lp55xx.txt8
-rw-r--r--Documentation/devicetree/bindings/leds/leds-pwm.txt2
-rw-r--r--Documentation/devicetree/bindings/media/i2c/adv7604.txt70
-rw-r--r--Documentation/devicetree/bindings/media/renesas,vsp1.txt43
-rw-r--r--Documentation/devicetree/bindings/media/s5p-mfc.txt3
-rw-r--r--Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt32
-rw-r--r--Documentation/devicetree/bindings/mfd/bcm590xx.txt4
-rw-r--r--Documentation/devicetree/bindings/mfd/bfticu.txt25
-rw-r--r--Documentation/devicetree/bindings/mfd/mc13xxx.txt3
-rw-r--r--Documentation/devicetree/bindings/mfd/qriox.txt17
-rw-r--r--Documentation/devicetree/bindings/mfd/s2mps11.txt14
-rw-r--r--Documentation/devicetree/bindings/mfd/sun6i-prcm.txt59
-rw-r--r--Documentation/devicetree/bindings/mfd/ti-keystone-devctrl.txt19
-rw-r--r--Documentation/devicetree/bindings/mfd/twl4030-power.txt17
-rw-r--r--Documentation/devicetree/bindings/mfd/twl6040.txt2
-rw-r--r--Documentation/devicetree/bindings/misc/arm-charlcd.txt18
-rw-r--r--Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt2
-rw-r--r--Documentation/devicetree/bindings/mmc/mmc.txt2
-rw-r--r--Documentation/devicetree/bindings/mmc/mmci.txt54
-rw-r--r--Documentation/devicetree/bindings/mmc/moxa,moxart-mmc.txt30
-rw-r--r--Documentation/devicetree/bindings/mmc/samsung-sdhci.txt2
-rw-r--r--Documentation/devicetree/bindings/mmc/sunxi-mmc.txt43
-rw-r--r--Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt5
-rw-r--r--Documentation/devicetree/bindings/mmc/usdhi6rol0.txt33
-rw-r--r--Documentation/devicetree/bindings/mtd/fsl-quadspi.txt35
-rw-r--r--Documentation/devicetree/bindings/mtd/gpmc-nand.txt47
-rw-r--r--Documentation/devicetree/bindings/mtd/gpmc-nor.txt2
-rw-r--r--Documentation/devicetree/bindings/mtd/gpmc-onenand.txt2
-rw-r--r--Documentation/devicetree/bindings/mtd/m25p80.txt4
-rw-r--r--Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt8
-rw-r--r--Documentation/devicetree/bindings/net/amd-xgbe-phy.txt17
-rw-r--r--Documentation/devicetree/bindings/net/amd-xgbe.txt34
-rw-r--r--Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt2
-rw-r--r--Documentation/devicetree/bindings/net/broadcom-systemport.txt29
-rw-r--r--Documentation/devicetree/bindings/net/can/xilinx_can.txt44
-rw-r--r--Documentation/devicetree/bindings/net/cpsw-phy-sel.txt4
-rw-r--r--Documentation/devicetree/bindings/net/fixed-link.txt42
-rw-r--r--Documentation/devicetree/bindings/net/fsl-tsec-phy.txt5
-rw-r--r--Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt36
-rw-r--r--Documentation/devicetree/bindings/net/ieee802154/at86rf230.txt23
-rw-r--r--Documentation/devicetree/bindings/net/mdio-gpio.txt2
-rw-r--r--Documentation/devicetree/bindings/net/micrel-ks8851.txt15
-rw-r--r--Documentation/devicetree/bindings/net/micrel-ksz9021.txt49
-rw-r--r--Documentation/devicetree/bindings/net/micrel-ksz90x1.txt83
-rw-r--r--Documentation/devicetree/bindings/net/nfc/pn544.txt35
-rw-r--r--Documentation/devicetree/bindings/net/nfc/st21nfca.txt33
-rw-r--r--Documentation/devicetree/bindings/net/nfc/trf7970a.txt2
-rw-r--r--Documentation/devicetree/bindings/net/via-rhine.txt17
-rw-r--r--Documentation/devicetree/bindings/panel/auo,b133xtn01.txt7
-rw-r--r--Documentation/devicetree/bindings/panel/edt,et057090dhu.txt7
-rw-r--r--Documentation/devicetree/bindings/panel/edt,et070080dh6.txt10
-rw-r--r--Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt10
-rw-r--r--Documentation/devicetree/bindings/pci/designware-pcie.txt74
-rw-r--r--Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt38
-rw-r--r--Documentation/devicetree/bindings/pci/host-generic-pci.txt100
-rw-r--r--Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt66
-rw-r--r--Documentation/devicetree/bindings/pci/rcar-pci.txt47
-rw-r--r--Documentation/devicetree/bindings/pci/samsung,exynos5440-pcie.txt65
-rw-r--r--Documentation/devicetree/bindings/phy/samsung-phy.txt47
-rw-r--r--Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt23
-rw-r--r--Documentation/devicetree/bindings/phy/ti-phy.txt7
-rw-r--r--Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt9
-rw-r--r--Documentation/devicetree/bindings/pinctrl/brcm,bcm11351-pinctrl.txt12
-rw-r--r--Documentation/devicetree/bindings/pinctrl/fsl,imx6sx-pinctrl.txt36
-rw-r--r--Documentation/devicetree/bindings/pinctrl/marvell,orion-pinctrl.txt91
-rw-r--r--Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt1
-rw-r--r--Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt88
-rw-r--r--Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt95
-rw-r--r--Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt22
-rw-r--r--Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt28
-rw-r--r--Documentation/devicetree/bindings/power/reset/keystone-reset.txt67
-rw-r--r--Documentation/devicetree/bindings/power_supply/axxia-reset.txt20
-rw-r--r--Documentation/devicetree/bindings/powerpc/4xx/akebono.txt54
-rw-r--r--Documentation/devicetree/bindings/powerpc/4xx/hsta.txt19
-rw-r--r--Documentation/devicetree/bindings/powerpc/4xx/reboot.txt2
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/board.txt17
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/ccf.txt46
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/cpus.txt11
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/dcsr.txt2
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/pamu.txt10
-rw-r--r--Documentation/devicetree/bindings/pwm/bcm-kona-pwm.txt21
-rw-r--r--Documentation/devicetree/bindings/regulator/ltc3589.txt99
-rw-r--r--Documentation/devicetree/bindings/regulator/regulator.txt2
-rw-r--r--Documentation/devicetree/bindings/regulator/tps65090.txt4
-rw-r--r--Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt21
-rw-r--r--Documentation/devicetree/bindings/reset/socfpga-reset.txt (renamed from Documentation/devicetree/bindings/arm/altera/socfpga-reset.txt)2
-rw-r--r--Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt3
-rw-r--r--Documentation/devicetree/bindings/rtc/xgene-rtc.txt28
-rw-r--r--Documentation/devicetree/bindings/serial/atmel-usart.txt12
-rw-r--r--Documentation/devicetree/bindings/serial/nxp,sc16is7xx.txt33
-rw-r--r--Documentation/devicetree/bindings/serial/of-serial.txt1
-rw-r--r--Documentation/devicetree/bindings/serial/renesas,sci-serial.txt8
-rw-r--r--Documentation/devicetree/bindings/soc/qcom/qcom,gsbi.txt78
-rw-r--r--Documentation/devicetree/bindings/sound/ak4104.txt3
-rw-r--r--Documentation/devicetree/bindings/sound/alc5623.txt25
-rw-r--r--Documentation/devicetree/bindings/sound/cs42l56.txt63
-rw-r--r--Documentation/devicetree/bindings/sound/fsl-sai.txt11
-rw-r--r--Documentation/devicetree/bindings/sound/max98090.txt6
-rw-r--r--Documentation/devicetree/bindings/sound/max98095.txt22
-rw-r--r--Documentation/devicetree/bindings/sound/nokia,rx51.txt27
-rw-r--r--Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.txt28
-rw-r--r--Documentation/devicetree/bindings/sound/renesas,rsnd.txt1
-rw-r--r--Documentation/devicetree/bindings/sound/rt5640.txt13
-rw-r--r--Documentation/devicetree/bindings/sound/simple-card.txt91
-rw-r--r--Documentation/devicetree/bindings/sound/snow.txt17
-rw-r--r--Documentation/devicetree/bindings/sound/st,sta350.txt131
-rw-r--r--Documentation/devicetree/bindings/spi/fsl-spi.txt6
-rw-r--r--Documentation/devicetree/bindings/spi/qcom,spi-qup.txt6
-rw-r--r--Documentation/devicetree/bindings/spi/spi-bus.txt4
-rw-r--r--Documentation/devicetree/bindings/spi/spi-cadence.txt31
-rw-r--r--Documentation/devicetree/bindings/spi/spi-dw.txt24
-rw-r--r--Documentation/devicetree/bindings/spmi/spmi.txt2
-rw-r--r--Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt1
-rw-r--r--Documentation/devicetree/bindings/thermal/armada-thermal.txt12
-rw-r--r--Documentation/devicetree/bindings/thermal/exynos-thermal.txt50
-rw-r--r--Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.txt4
-rw-r--r--Documentation/devicetree/bindings/timer/energymicro,efm32-timer.txt (renamed from Documentation/devicetree/bindings/timer/efm32,timer.txt)4
-rw-r--r--Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt31
-rw-r--r--Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt17
-rw-r--r--Documentation/devicetree/bindings/usb/dwc2.txt2
-rw-r--r--Documentation/devicetree/bindings/usb/ehci-orion.txt5
-rw-r--r--Documentation/devicetree/bindings/usb/exynos-usb.txt31
-rw-r--r--Documentation/devicetree/bindings/usb/gr-udc.txt22
-rw-r--r--Documentation/devicetree/bindings/usb/msm-hsusb.txt78
-rw-r--r--Documentation/devicetree/bindings/usb/omap-usb.txt4
-rw-r--r--Documentation/devicetree/bindings/usb/usb-ehci.txt1
-rw-r--r--Documentation/devicetree/bindings/usb/usb-ohci.txt1
-rw-r--r--Documentation/devicetree/bindings/usb/usb-xhci.txt8
-rw-r--r--Documentation/devicetree/bindings/usb/usb3503.txt8
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt10
-rw-r--r--Documentation/devicetree/bindings/video/exynos_dp.txt4
-rw-r--r--Documentation/devicetree/bindings/video/exynos_hdmi.txt3
-rw-r--r--Documentation/devicetree/bindings/video/hdmi-connector.txt1
-rw-r--r--Documentation/devicetree/bindings/video/lgphilips,lb035q02.txt33
-rw-r--r--Documentation/devicetree/bindings/video/panel-dpi.txt45
-rw-r--r--Documentation/devicetree/bindings/video/sharp,ls037v7dw01.txt43
-rw-r--r--Documentation/devicetree/bindings/video/ti,omap4-dss.txt4
-rw-r--r--Documentation/devicetree/bindings/video/ti,omap5-dss.txt96
-rw-r--r--Documentation/devicetree/bindings/video/toppoly,td028ttec1.txt30
-rw-r--r--Documentation/devicetree/bindings/video/tpo,td043mtea1.txt33
-rw-r--r--Documentation/devicetree/bindings/watchdog/marvel.txt7
-rw-r--r--Documentation/dma-buf-sharing.txt6
-rw-r--r--Documentation/driver-model/devres.txt15
-rw-r--r--Documentation/dynamic-debug-howto.txt2
-rw-r--r--Documentation/edac.txt2
-rw-r--r--Documentation/efi-stub.txt33
-rw-r--r--Documentation/email-clients.txt26
-rw-r--r--Documentation/fb/sm501.txt2
-rw-r--r--Documentation/fb/sstfb.txt2
-rw-r--r--Documentation/filesystems/Locking5
-rw-r--r--Documentation/filesystems/f2fs.txt8
-rw-r--r--Documentation/filesystems/nfs/nfs41-server.txt2
-rw-r--r--Documentation/filesystems/proc.txt12
-rw-r--r--Documentation/filesystems/seq_file.txt9
-rw-r--r--Documentation/filesystems/sharedsubtree.txt2
-rw-r--r--Documentation/filesystems/vfat.txt5
-rw-r--r--Documentation/filesystems/vfs.txt13
-rw-r--r--Documentation/gpio/consumer.txt2
-rw-r--r--Documentation/gpio/driver.txt59
-rw-r--r--Documentation/hid/uhid.txt2
-rw-r--r--Documentation/hsi.txt75
-rw-r--r--Documentation/hwmon/emc140359
-rw-r--r--Documentation/hwmon/hwmon-kernel-api.txt107
-rw-r--r--Documentation/hwmon/jc4216
-rw-r--r--Documentation/hwmon/lm7720
-rw-r--r--Documentation/hwmon/nct668357
-rw-r--r--Documentation/hwmon/ntc_thermistor8
-rw-r--r--Documentation/hwmon/shtc143
-rw-r--r--Documentation/hwmon/sysfs-interface14
-rw-r--r--Documentation/input/alps.txt2
-rw-r--r--Documentation/input/input.txt2
-rw-r--r--Documentation/java.txt8
-rw-r--r--Documentation/kbuild/makefiles.txt2
-rw-r--r--Documentation/kbuild/modules.txt2
-rw-r--r--Documentation/kernel-parameters.txt125
-rw-r--r--Documentation/kmemleak.txt1
-rw-r--r--Documentation/kprobes.txt16
-rw-r--r--Documentation/laptops/00-INDEX4
-rw-r--r--Documentation/laptops/freefall.c (renamed from Documentation/laptops/hpfall.c)59
-rw-r--r--Documentation/memory-barriers.txt46
-rw-r--r--Documentation/memory-hotplug.txt140
-rw-r--r--Documentation/mtd/nand/pxa3xx-nand.txt2
-rw-r--r--Documentation/mtd/spi-nor.txt62
-rw-r--r--Documentation/mutex-design.txt252
-rw-r--r--Documentation/networking/bonding.txt44
-rw-r--r--Documentation/networking/can.txt37
-rw-r--r--Documentation/networking/cdc_mbim.txt339
-rw-r--r--Documentation/networking/dccp.txt2
-rw-r--r--Documentation/networking/filter.txt425
-rw-r--r--Documentation/networking/packet_mmap.txt2
-rw-r--r--Documentation/platform/x86-laptop-drivers.txt18
-rw-r--r--Documentation/power/devices.txt34
-rw-r--r--Documentation/power/opp.txt40
-rw-r--r--Documentation/power/runtime_pm.txt37
-rw-r--r--Documentation/power/states.txt87
-rw-r--r--Documentation/power/suspend-and-cpuhotplug.txt2
-rw-r--r--Documentation/power/swsusp.txt5
-rw-r--r--Documentation/powerpc/cpu_families.txt221
-rw-r--r--Documentation/powerpc/transactional_memory.txt2
-rw-r--r--Documentation/printk-formats.txt4
-rw-r--r--Documentation/ptp/testptp.c5
-rw-r--r--Documentation/pwm.txt10
-rw-r--r--Documentation/rbtree.txt2
-rw-r--r--Documentation/rfkill.txt2
-rw-r--r--Documentation/robust-futexes.txt2
-rw-r--r--Documentation/s390/monreader.txt2
-rw-r--r--Documentation/s390/zfcpdump.txt73
-rw-r--r--Documentation/scsi/LICENSE.qla2xxx2
-rw-r--r--Documentation/security/Smack.txt10
-rw-r--r--Documentation/security/Yama.txt2
-rw-r--r--Documentation/serial/driver25
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt4
-rw-r--r--Documentation/sound/alsa/HD-Audio-Models.txt5
-rw-r--r--Documentation/sysctl/kernel.txt38
-rw-r--r--Documentation/sysctl/vm.txt29
-rw-r--r--Documentation/thermal/nouveau_thermal7
-rw-r--r--Documentation/timers/timer_stats.txt6
-rw-r--r--Documentation/trace/events.txt2
-rw-r--r--Documentation/trace/ftrace.txt26
-rw-r--r--Documentation/trace/postprocess/trace-vmscan-postprocess.pl14
-rw-r--r--Documentation/trace/tracepoints.txt24
-rw-r--r--Documentation/usb/chipidea.txt71
-rw-r--r--Documentation/usb/mass-storage.txt2
-rw-r--r--Documentation/vDSO/parse_vdso.c67
-rw-r--r--Documentation/vDSO/vdso_standalone_test_x86.c128
-rw-r--r--Documentation/vDSO/vdso_test.c107
-rw-r--r--Documentation/video4linux/CARDLIST.bttv1
-rw-r--r--Documentation/video4linux/CARDLIST.em28xx1
-rw-r--r--Documentation/video4linux/fimc.txt30
-rw-r--r--Documentation/video4linux/v4l2-pci-skeleton.c42
-rw-r--r--Documentation/virtual/kvm/api.txt37
-rw-r--r--Documentation/virtual/kvm/devices/vm.txt26
-rw-r--r--Documentation/virtual/kvm/ppc-pv.txt14
-rw-r--r--Documentation/virtual/kvm/s390-diag.txt2
-rw-r--r--Documentation/vm/hwpoison.txt5
-rw-r--r--Documentation/vm/remap_file_pages.txt28
-rw-r--r--Documentation/vm/transhuge.txt4
-rw-r--r--Documentation/w1/w1.generic2
-rw-r--r--Documentation/w1/w1.netlink13
-rw-r--r--Documentation/x86/earlyprintk.txt2
-rw-r--r--Documentation/x86/i386/IO-APIC.txt2
-rw-r--r--Documentation/x86/x86_64/mm.txt2
407 files changed, 13166 insertions, 1500 deletions
diff --git a/Documentation/ABI/stable/sysfs-devices-system-cpu b/Documentation/ABI/stable/sysfs-devices-system-cpu
new file mode 100644
index 000000000000..33c133e2a631
--- /dev/null
+++ b/Documentation/ABI/stable/sysfs-devices-system-cpu
@@ -0,0 +1,25 @@
1What: /sys/devices/system/cpu/dscr_default
2Date: 13-May-2014
3KernelVersion: v3.15.0
4Contact:
5Description: Writes are equivalent to writing to
6 /sys/devices/system/cpu/cpuN/dscr on all CPUs.
7 Reads return the last written value or 0.
8 This value is not a global default: it is a way to set
9 all per-CPU defaults at the same time.
10Values: 64 bit unsigned integer (bit field)
11
12What: /sys/devices/system/cpu/cpu[0-9]+/dscr
13Date: 13-May-2014
14KernelVersion: v3.15.0
15Contact:
16Description: Default value for the Data Stream Control Register (DSCR) on
17 a CPU.
18 This default value is used when the kernel is executing and
19 for any process that has not set the DSCR itself.
20 If a process ever sets the DSCR (via direct access to the
21 SPR) that value will be persisted for that process and used
22 on any CPU where it executes (overriding the value described
23 here).
24 If set by a process it will be inherited by child processes.
25Values: 64 bit unsigned integer (bit field)
diff --git a/Documentation/ABI/testing/configfs-usb-gadget b/Documentation/ABI/testing/configfs-usb-gadget
index 37559a06393b..95a36589a66b 100644
--- a/Documentation/ABI/testing/configfs-usb-gadget
+++ b/Documentation/ABI/testing/configfs-usb-gadget
@@ -62,6 +62,40 @@ KernelVersion: 3.11
62Description: 62Description:
63 This group contains functions available to this USB gadget. 63 This group contains functions available to this USB gadget.
64 64
65What: /config/usb-gadget/gadget/functions/<func>.<inst>/interface.<n>
66Date: May 2014
67KernelVersion: 3.16
68Description:
69 This group contains "Feature Descriptors" specific for one
70 gadget's USB interface or one interface group described
71 by an IAD.
72
73 The attributes:
74
75 compatible_id - 8-byte string for "Compatible ID"
76 sub_compatible_id - 8-byte string for "Sub Compatible ID"
77
78What: /config/usb-gadget/gadget/functions/<func>.<inst>/interface.<n>/<property>
79Date: May 2014
80KernelVersion: 3.16
81Description:
82 This group contains "Extended Property Descriptors" specific for one
83 gadget's USB interface or one interface group described
84 by an IAD.
85
86 The attributes:
87
88 type - value 1..7 for interpreting the data
89 1: unicode string
90 2: unicode string with environment variable
91 3: binary
92 4: little-endian 32-bit
93 5: big-endian 32-bit
94 6: unicode string with a symbolic link
95 7: multiple unicode strings
96 data - blob of data to be interpreted depending on
97 type
98
65What: /config/usb-gadget/gadget/strings 99What: /config/usb-gadget/gadget/strings
66Date: Jun 2013 100Date: Jun 2013
67KernelVersion: 3.11 101KernelVersion: 3.11
@@ -79,3 +113,14 @@ Description:
79 product - gadget's product description 113 product - gadget's product description
80 manufacturer - gadget's manufacturer description 114 manufacturer - gadget's manufacturer description
81 115
116What: /config/usb-gadget/gadget/os_desc
117Date: May 2014
118KernelVersion: 3.16
119Description:
120 This group contains "OS String" extension handling attributes.
121
122 use - flag turning "OS Desctiptors" support on/off
123 b_vendor_code - one-byte value used for custom per-device and
124 per-interface requests
125 qw_sign - an identifier to be reported as "OS String"
126 proper
diff --git a/Documentation/ABI/testing/ima_policy b/Documentation/ABI/testing/ima_policy
index f1c5cc9d17a8..4c3efe434806 100644
--- a/Documentation/ABI/testing/ima_policy
+++ b/Documentation/ABI/testing/ima_policy
@@ -23,7 +23,7 @@ Description:
23 [fowner]] 23 [fowner]]
24 lsm: [[subj_user=] [subj_role=] [subj_type=] 24 lsm: [[subj_user=] [subj_role=] [subj_type=]
25 [obj_user=] [obj_role=] [obj_type=]] 25 [obj_user=] [obj_role=] [obj_type=]]
26 option: [[appraise_type=]] 26 option: [[appraise_type=]] [permit_directio]
27 27
28 base: func:= [BPRM_CHECK][MMAP_CHECK][FILE_CHECK][MODULE_CHECK] 28 base: func:= [BPRM_CHECK][MMAP_CHECK][FILE_CHECK][MODULE_CHECK]
29 mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC] 29 mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC]
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index 6e02c5029152..a9757dcf2e81 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -114,14 +114,17 @@ What: /sys/bus/iio/devices/iio:deviceX/in_temp_raw
114What: /sys/bus/iio/devices/iio:deviceX/in_tempX_raw 114What: /sys/bus/iio/devices/iio:deviceX/in_tempX_raw
115What: /sys/bus/iio/devices/iio:deviceX/in_temp_x_raw 115What: /sys/bus/iio/devices/iio:deviceX/in_temp_x_raw
116What: /sys/bus/iio/devices/iio:deviceX/in_temp_y_raw 116What: /sys/bus/iio/devices/iio:deviceX/in_temp_y_raw
117What: /sys/bus/iio/devices/iio:deviceX/in_temp_z_raw 117What: /sys/bus/iio/devices/iio:deviceX/in_temp_ambient_raw
118What: /sys/bus/iio/devices/iio:deviceX/in_temp_object_raw
118KernelVersion: 2.6.35 119KernelVersion: 2.6.35
119Contact: linux-iio@vger.kernel.org 120Contact: linux-iio@vger.kernel.org
120Description: 121Description:
121 Raw (unscaled no bias removal etc.) temperature measurement. 122 Raw (unscaled no bias removal etc.) temperature measurement.
122 If an axis is specified it generally means that the temperature 123 If an axis is specified it generally means that the temperature
123 sensor is associated with one part of a compound device (e.g. 124 sensor is associated with one part of a compound device (e.g.
124 a gyroscope axis). Units after application of scale and offset 125 a gyroscope axis). The ambient and object modifiers distinguish
126 between ambient (reference) and distant temperature for contact-
127 less measurements. Units after application of scale and offset
125 are milli degrees Celsius. 128 are milli degrees Celsius.
126 129
127What: /sys/bus/iio/devices/iio:deviceX/in_tempX_input 130What: /sys/bus/iio/devices/iio:deviceX/in_tempX_input
@@ -210,6 +213,14 @@ Contact: linux-iio@vger.kernel.org
210Description: 213Description:
211 Scaled humidity measurement in milli percent. 214 Scaled humidity measurement in milli percent.
212 215
216What: /sys/bus/iio/devices/iio:deviceX/in_X_mean_raw
217KernelVersion: 3.5
218Contact: linux-iio@vger.kernel.org
219Description:
220 Averaged raw measurement from channel X. The number of values
221 used for averaging is device specific. The converting rules for
222 normal raw values also applies to the averaged raw values.
223
213What: /sys/bus/iio/devices/iio:deviceX/in_accel_offset 224What: /sys/bus/iio/devices/iio:deviceX/in_accel_offset
214What: /sys/bus/iio/devices/iio:deviceX/in_accel_x_offset 225What: /sys/bus/iio/devices/iio:deviceX/in_accel_x_offset
215What: /sys/bus/iio/devices/iio:deviceX/in_accel_y_offset 226What: /sys/bus/iio/devices/iio:deviceX/in_accel_y_offset
@@ -784,6 +795,7 @@ What: /sys/.../iio:deviceX/scan_elements/in_incli_x_en
784What: /sys/.../iio:deviceX/scan_elements/in_incli_y_en 795What: /sys/.../iio:deviceX/scan_elements/in_incli_y_en
785What: /sys/.../iio:deviceX/scan_elements/in_pressureY_en 796What: /sys/.../iio:deviceX/scan_elements/in_pressureY_en
786What: /sys/.../iio:deviceX/scan_elements/in_pressure_en 797What: /sys/.../iio:deviceX/scan_elements/in_pressure_en
798What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_en
787KernelVersion: 2.6.37 799KernelVersion: 2.6.37
788Contact: linux-iio@vger.kernel.org 800Contact: linux-iio@vger.kernel.org
789Description: 801Description:
@@ -799,6 +811,7 @@ What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_type
799What: /sys/.../iio:deviceX/scan_elements/in_timestamp_type 811What: /sys/.../iio:deviceX/scan_elements/in_timestamp_type
800What: /sys/.../iio:deviceX/scan_elements/in_pressureY_type 812What: /sys/.../iio:deviceX/scan_elements/in_pressureY_type
801What: /sys/.../iio:deviceX/scan_elements/in_pressure_type 813What: /sys/.../iio:deviceX/scan_elements/in_pressure_type
814What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_type
802KernelVersion: 2.6.37 815KernelVersion: 2.6.37
803Contact: linux-iio@vger.kernel.org 816Contact: linux-iio@vger.kernel.org
804Description: 817Description:
@@ -845,6 +858,7 @@ What: /sys/.../iio:deviceX/scan_elements/in_incli_y_index
845What: /sys/.../iio:deviceX/scan_elements/in_timestamp_index 858What: /sys/.../iio:deviceX/scan_elements/in_timestamp_index
846What: /sys/.../iio:deviceX/scan_elements/in_pressureY_index 859What: /sys/.../iio:deviceX/scan_elements/in_pressureY_index
847What: /sys/.../iio:deviceX/scan_elements/in_pressure_index 860What: /sys/.../iio:deviceX/scan_elements/in_pressure_index
861What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_index
848KernelVersion: 2.6.37 862KernelVersion: 2.6.37
849Contact: linux-iio@vger.kernel.org 863Contact: linux-iio@vger.kernel.org
850Description: 864Description:
@@ -881,6 +895,25 @@ Description:
881 on-chip EEPROM. After power-up or chip reset the device will 895 on-chip EEPROM. After power-up or chip reset the device will
882 automatically load the saved configuration. 896 automatically load the saved configuration.
883 897
898What: /sys/.../iio:deviceX/in_illuminanceY_input
899What: /sys/.../iio:deviceX/in_illuminanceY_raw
900What: /sys/.../iio:deviceX/in_illuminanceY_mean_raw
901KernelVersion: 3.4
902Contact: linux-iio@vger.kernel.org
903Description:
904 Illuminance measurement, units after application of scale
905 and offset are lux.
906
907What: /sys/.../iio:deviceX/in_intensityY_raw
908What: /sys/.../iio:deviceX/in_intensityY_ir_raw
909What: /sys/.../iio:deviceX/in_intensityY_both_raw
910KernelVersion: 3.4
911Contact: linux-iio@vger.kernel.org
912Description:
913 Unit-less light intensity. Modifiers both and ir indicate
914 that measurements contains visible and infrared light
915 components or just infrared light, respectively.
916
884What: /sys/.../iio:deviceX/in_intensity_red_integration_time 917What: /sys/.../iio:deviceX/in_intensity_red_integration_time
885What: /sys/.../iio:deviceX/in_intensity_green_integration_time 918What: /sys/.../iio:deviceX/in_intensity_green_integration_time
886What: /sys/.../iio:deviceX/in_intensity_blue_integration_time 919What: /sys/.../iio:deviceX/in_intensity_blue_integration_time
@@ -891,3 +924,12 @@ Contact: linux-iio@vger.kernel.org
891Description: 924Description:
892 This attribute is used to get/set the integration time in 925 This attribute is used to get/set the integration time in
893 seconds. 926 seconds.
927
928What: /sys/bus/iio/devices/iio:deviceX/in_rot_quaternion_raw
929KernelVersion: 3.15
930Contact: linux-iio@vger.kernel.org
931Description:
932 Raw value of quaternion components using a format
933 x y z w. Here x, y, and z component represents the axis about
934 which a rotation will occur and w component represents the
935 amount of rotation.
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-proximity-as3935 b/Documentation/ABI/testing/sysfs-bus-iio-proximity-as3935
new file mode 100644
index 000000000000..6708c5e264aa
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-iio-proximity-as3935
@@ -0,0 +1,16 @@
1What /sys/bus/iio/devices/iio:deviceX/in_proximity_raw
2Date: March 2014
3KernelVersion: 3.15
4Contact: Matt Ranostay <mranostay@gmail.com>
5Description:
6 Get the current distance in meters of storm (1km steps)
7 1000-40000 = distance in meters
8
9What /sys/bus/iio/devices/iio:deviceX/sensor_sensitivity
10Date: March 2014
11KernelVersion: 3.15
12Contact: Matt Ranostay <mranostay@gmail.com>
13Description:
14 Show or set the gain boost of the amp, from 0-31 range.
15 18 = indoors (default)
16 14 = outdoors
diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
index a3c5a6685036..6615fda0abfb 100644
--- a/Documentation/ABI/testing/sysfs-bus-pci
+++ b/Documentation/ABI/testing/sysfs-bus-pci
@@ -117,7 +117,7 @@ Description:
117 117
118What: /sys/bus/pci/devices/.../vpd 118What: /sys/bus/pci/devices/.../vpd
119Date: February 2008 119Date: February 2008
120Contact: Ben Hutchings <bhutchings@solarflare.com> 120Contact: Ben Hutchings <bwh@kernel.org>
121Description: 121Description:
122 A file named vpd in a device directory will be a 122 A file named vpd in a device directory will be a
123 binary file containing the Vital Product Data for the 123 binary file containing the Vital Product Data for the
@@ -250,3 +250,24 @@ Description:
250 valid. For example, writing a 2 to this file when sriov_numvfs 250 valid. For example, writing a 2 to this file when sriov_numvfs
251 is not 0 and not 2 already will return an error. Writing a 10 251 is not 0 and not 2 already will return an error. Writing a 10
252 when the value of sriov_totalvfs is 8 will return an error. 252 when the value of sriov_totalvfs is 8 will return an error.
253
254What: /sys/bus/pci/devices/.../driver_override
255Date: April 2014
256Contact: Alex Williamson <alex.williamson@redhat.com>
257Description:
258 This file allows the driver for a device to be specified which
259 will override standard static and dynamic ID matching. When
260 specified, only a driver with a name matching the value written
261 to driver_override will have an opportunity to bind to the
262 device. The override is specified by writing a string to the
263 driver_override file (echo pci-stub > driver_override) and
264 may be cleared with an empty string (echo > driver_override).
265 This returns the device to standard matching rules binding.
266 Writing to driver_override does not automatically unbind the
267 device from its current driver or make any attempt to
268 automatically load the specified driver. If no driver with a
269 matching name is currently loaded in the kernel, the device
270 will not bind to any driver. This also allows devices to
271 opt-out of driver binding using a driver_override name such as
272 "none". Only a single driver may be specified in the override,
273 there is no support for parsing delimiters.
diff --git a/Documentation/ABI/testing/sysfs-class-net b/Documentation/ABI/testing/sysfs-class-net
index d922060e455d..416c5d59f52e 100644
--- a/Documentation/ABI/testing/sysfs-class-net
+++ b/Documentation/ABI/testing/sysfs-class-net
@@ -169,6 +169,14 @@ Description:
169 "unknown", "notpresent", "down", "lowerlayerdown", "testing", 169 "unknown", "notpresent", "down", "lowerlayerdown", "testing",
170 "dormant", "up". 170 "dormant", "up".
171 171
172What: /sys/class/net/<iface>/phys_port_id
173Date: July 2013
174KernelVersion: 3.12
175Contact: netdev@vger.kernel.org
176Description:
177 Indicates the interface unique physical port identifier within
178 the NIC, as a string.
179
172What: /sys/class/net/<iface>/speed 180What: /sys/class/net/<iface>/speed
173Date: October 2009 181Date: October 2009
174KernelVersion: 2.6.33 182KernelVersion: 2.6.33
diff --git a/Documentation/ABI/testing/sysfs-class-net-cdc_ncm b/Documentation/ABI/testing/sysfs-class-net-cdc_ncm
new file mode 100644
index 000000000000..5cedf72df358
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-net-cdc_ncm
@@ -0,0 +1,149 @@
1What: /sys/class/net/<iface>/cdc_ncm/min_tx_pkt
2Date: May 2014
3KernelVersion: 3.16
4Contact: Bjørn Mork <bjorn@mork.no>
5Description:
6 The driver will pad NCM Transfer Blocks (NTBs) longer
7 than this to tx_max, allowing the device to receive
8 tx_max sized frames with no terminating short
9 packet. NTBs shorter than this limit are transmitted
10 as-is, without any padding, and are terminated with a
11 short USB packet.
12
13 Padding to tx_max allows the driver to transmit NTBs
14 back-to-back without any interleaving short USB
15 packets. This reduces the number of short packet
16 interrupts in the device, and represents a tradeoff
17 between USB bus bandwidth and device DMA optimization.
18
19 Set to 0 to pad all frames. Set greater than tx_max to
20 disable all padding.
21
22What: /sys/class/net/<iface>/cdc_ncm/rx_max
23Date: May 2014
24KernelVersion: 3.16
25Contact: Bjørn Mork <bjorn@mork.no>
26Description:
27 The maximum NTB size for RX. Cannot exceed the
28 maximum value supported by the device. Must allow at
29 least one max sized datagram plus headers.
30
31 The actual limits are device dependent. See
32 dwNtbInMaxSize.
33
34 Note: Some devices will silently ignore changes to
35 this value, resulting in oversized NTBs and
36 corresponding framing errors.
37
38What: /sys/class/net/<iface>/cdc_ncm/tx_max
39Date: May 2014
40KernelVersion: 3.16
41Contact: Bjørn Mork <bjorn@mork.no>
42Description:
43 The maximum NTB size for TX. Cannot exceed the
44 maximum value supported by the device. Must allow at
45 least one max sized datagram plus headers.
46
47 The actual limits are device dependent. See
48 dwNtbOutMaxSize.
49
50What: /sys/class/net/<iface>/cdc_ncm/tx_timer_usecs
51Date: May 2014
52KernelVersion: 3.16
53Contact: Bjørn Mork <bjorn@mork.no>
54Description:
55 Datagram aggregation timeout in µs. The driver will
56 wait up to 3 times this timeout for more datagrams to
57 aggregate before transmitting an NTB frame.
58
59 Valid range: 5 to 4000000
60
61 Set to 0 to disable aggregation.
62
63The following read-only attributes all represent fields of the
64structure defined in section 6.2.1 "GetNtbParameters" of "Universal
65Serial Bus Communications Class Subclass Specifications for Network
66Control Model Devices" (CDC NCM), Revision 1.0 (Errata 1), November
6724, 2010 from USB Implementers Forum, Inc. The descriptions are
68quoted from table 6-3 of CDC NCM: "NTB Parameter Structure".
69
70What: /sys/class/net/<iface>/cdc_ncm/bmNtbFormatsSupported
71Date: May 2014
72KernelVersion: 3.16
73Contact: Bjørn Mork <bjorn@mork.no>
74Description:
75 Bit 0: 16-bit NTB supported (set to 1)
76 Bit 1: 32-bit NTB supported
77 Bits 2 – 15: reserved (reset to zero; must be ignored by host)
78
79What: /sys/class/net/<iface>/cdc_ncm/dwNtbInMaxSize
80Date: May 2014
81KernelVersion: 3.16
82Contact: Bjørn Mork <bjorn@mork.no>
83Description:
84 IN NTB Maximum Size in bytes
85
86What: /sys/class/net/<iface>/cdc_ncm/wNdpInDivisor
87Date: May 2014
88KernelVersion: 3.16
89Contact: Bjørn Mork <bjorn@mork.no>
90Description:
91 Divisor used for IN NTB Datagram payload alignment
92
93What: /sys/class/net/<iface>/cdc_ncm/wNdpInPayloadRemainder
94Date: May 2014
95KernelVersion: 3.16
96Contact: Bjørn Mork <bjorn@mork.no>
97Description:
98 Remainder used to align input datagram payload within
99 the NTB: (Payload Offset) mod (wNdpInDivisor) =
100 wNdpInPayloadRemainder
101
102What: /sys/class/net/<iface>/cdc_ncm/wNdpInAlignment
103Date: May 2014
104KernelVersion: 3.16
105Contact: Bjørn Mork <bjorn@mork.no>
106Description:
107 NDP alignment modulus for NTBs on the IN pipe. Shall
108 be a power of 2, and shall be at least 4.
109
110What: /sys/class/net/<iface>/cdc_ncm/dwNtbOutMaxSize
111Date: May 2014
112KernelVersion: 3.16
113Contact: Bjørn Mork <bjorn@mork.no>
114Description:
115 OUT NTB Maximum Size
116
117What: /sys/class/net/<iface>/cdc_ncm/wNdpOutDivisor
118Date: May 2014
119KernelVersion: 3.16
120Contact: Bjørn Mork <bjorn@mork.no>
121Description:
122 OUT NTB Datagram alignment modulus
123
124What: /sys/class/net/<iface>/cdc_ncm/wNdpOutPayloadRemainder
125Date: May 2014
126KernelVersion: 3.16
127Contact: Bjørn Mork <bjorn@mork.no>
128Description:
129 Remainder used to align output datagram payload
130 offsets within the NTB: Padding, shall be transmitted
131 as zero by function, and ignored by host. (Payload
132 Offset) mod (wNdpOutDivisor) = wNdpOutPayloadRemainder
133
134What: /sys/class/net/<iface>/cdc_ncm/wNdpOutAlignment
135Date: May 2014
136KernelVersion: 3.16
137Contact: Bjørn Mork <bjorn@mork.no>
138Description:
139 NDP alignment modulus for use in NTBs on the OUT
140 pipe. Shall be a power of 2, and shall be at least 4.
141
142What: /sys/class/net/<iface>/cdc_ncm/wNtbOutMaxDatagrams
143Date: May 2014
144KernelVersion: 3.16
145Contact: Bjørn Mork <bjorn@mork.no>
146Description:
147 Maximum number of datagrams that the host may pack
148 into a single OUT NTB. Zero means that the device
149 imposes no limit.
diff --git a/Documentation/ABI/testing/sysfs-class-net-queues b/Documentation/ABI/testing/sysfs-class-net-queues
new file mode 100644
index 000000000000..5e9aeb91d355
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-net-queues
@@ -0,0 +1,79 @@
1What: /sys/class/<iface>/queues/rx-<queue>/rps_cpus
2Date: March 2010
3KernelVersion: 2.6.35
4Contact: netdev@vger.kernel.org
5Description:
6 Mask of the CPU(s) currently enabled to participate into the
7 Receive Packet Steering packet processing flow for this
8 network device queue. Possible values depend on the number
9 of available CPU(s) in the system.
10
11What: /sys/class/<iface>/queues/rx-<queue>/rps_flow_cnt
12Date: April 2010
13KernelVersion: 2.6.35
14Contact: netdev@vger.kernel.org
15Description:
16 Number of Receive Packet Steering flows being currently
17 processed by this particular network device receive queue.
18
19What: /sys/class/<iface>/queues/tx-<queue>/tx_timeout
20Date: November 2011
21KernelVersion: 3.3
22Contact: netdev@vger.kernel.org
23Description:
24 Indicates the number of transmit timeout events seen by this
25 network interface transmit queue.
26
27What: /sys/class/<iface>/queues/tx-<queue>/xps_cpus
28Date: November 2010
29KernelVersion: 2.6.38
30Contact: netdev@vger.kernel.org
31Description:
32 Mask of the CPU(s) currently enabled to participate into the
33 Transmit Packet Steering packet processing flow for this
34 network device transmit queue. Possible vaules depend on the
35 number of available CPU(s) in the system.
36
37What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/hold_time
38Date: November 2011
39KernelVersion: 3.3
40Contact: netdev@vger.kernel.org
41Description:
42 Indicates the hold time in milliseconds to measure the slack
43 of this particular network device transmit queue.
44 Default value is 1000.
45
46What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/inflight
47Date: November 2011
48KernelVersion: 3.3
49Contact: netdev@vger.kernel.org
50Description:
51 Indicates the number of bytes (objects) in flight on this
52 network device transmit queue.
53
54What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/limit
55Date: November 2011
56KernelVersion: 3.3
57Contact: netdev@vger.kernel.org
58Description:
59 Indicates the current limit of bytes allowed to be queued
60 on this network device transmit queue. This value is clamped
61 to be within the bounds defined by limit_max and limit_min.
62
63What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/limit_max
64Date: November 2011
65KernelVersion: 3.3
66Contact: netdev@vger.kernel.org
67Description:
68 Indicates the absolute maximum limit of bytes allowed to be
69 queued on this network device transmit queue. See
70 include/linux/dynamic_queue_limits.h for the default value.
71
72What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/limit_min
73Date: November 2011
74KernelVersion: 3.3
75Contact: netdev@vger.kernel.org
76Description:
77 Indicates the absolute minimum limit of bytes allowed to be
78 queued on this network device transmit queue. Default value is
79 0.
diff --git a/Documentation/ABI/testing/sysfs-class-net-statistics b/Documentation/ABI/testing/sysfs-class-net-statistics
new file mode 100644
index 000000000000..397118de7b5e
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-net-statistics
@@ -0,0 +1,201 @@
1What: /sys/class/<iface>/statistics/collisions
2Date: April 2005
3KernelVersion: 2.6.12
4Contact: netdev@vger.kernel.org
5Description:
6 Indicates the number of collisions seen by this network device.
7 This value might not be relevant with all MAC layers.
8
9What: /sys/class/<iface>/statistics/multicast
10Date: April 2005
11KernelVersion: 2.6.12
12Contact: netdev@vger.kernel.org
13Description:
14 Indicates the number of multicast packets received by this
15 network device.
16
17What: /sys/class/<iface>/statistics/rx_bytes
18Date: April 2005
19KernelVersion: 2.6.12
20Contact: netdev@vger.kernel.org
21Description:
22 Indicates the number of bytes received by this network device.
23 See the network driver for the exact meaning of when this
24 value is incremented.
25
26What: /sys/class/<iface>/statistics/rx_compressed
27Date: April 2005
28KernelVersion: 2.6.12
29Contact: netdev@vger.kernel.org
30Description:
31 Indicates the number of compressed packets received by this
32 network device. This value might only be relevant for interfaces
33 that support packet compression (e.g: PPP).
34
35What: /sys/class/<iface>/statistics/rx_crc_errors
36Date: April 2005
37KernelVersion: 2.6.12
38Contact: netdev@vger.kernel.org
39Description:
40 Indicates the number of packets received with a CRC (FCS) error
41 by this network device. Note that the specific meaning might
42 depend on the MAC layer used by the interface.
43
44What: /sys/class/<iface>/statistics/rx_dropped
45Date: April 2005
46KernelVersion: 2.6.12
47Contact: netdev@vger.kernel.org
48Description:
49 Indicates the number of packets received by the network device
50 but dropped, that are not forwarded to the upper layers for
51 packet processing. See the network driver for the exact
52 meaning of this value.
53
54What: /sys/class/<iface>/statistics/rx_fifo_errors
55Date: April 2005
56KernelVersion: 2.6.12
57Contact: netdev@vger.kernel.org
58Description:
59 Indicates the number of receive FIFO errors seen by this
60 network device. See the network driver for the exact
61 meaning of this value.
62
63What: /sys/class/<iface>/statistics/rx_frame_errors
64Date: April 2005
65KernelVersion: 2.6.12
66Contact: netdev@vger.kernel.org
67Description:
68 Indicates the number of received frames with error, such as
69 alignment errors. Note that the specific meaning depends on
70 on the MAC layer protocol used. See the network driver for
71 the exact meaning of this value.
72
73What: /sys/class/<iface>/statistics/rx_length_errors
74Date: April 2005
75KernelVersion: 2.6.12
76Contact: netdev@vger.kernel.org
77Description:
78 Indicates the number of received error packet with a length
79 error, oversized or undersized. See the network driver for the
80 exact meaning of this value.
81
82What: /sys/class/<iface>/statistics/rx_missed_errors
83Date: April 2005
84KernelVersion: 2.6.12
85Contact: netdev@vger.kernel.org
86Description:
87 Indicates the number of received packets that have been missed
88 due to lack of capacity in the receive side. See the network
89 driver for the exact meaning of this value.
90
91What: /sys/class/<iface>/statistics/rx_over_errors
92Date: April 2005
93KernelVersion: 2.6.12
94Contact: netdev@vger.kernel.org
95Description:
96 Indicates the number of received packets that are oversized
97 compared to what the network device is configured to accept
98 (e.g: larger than MTU). See the network driver for the exact
99 meaning of this value.
100
101What: /sys/class/<iface>/statistics/rx_packets
102Date: April 2005
103KernelVersion: 2.6.12
104Contact: netdev@vger.kernel.org
105Description:
106 Indicates the total number of good packets received by this
107 network device.
108
109What: /sys/class/<iface>/statistics/tx_aborted_errors
110Date: April 2005
111KernelVersion: 2.6.12
112Contact: netdev@vger.kernel.org
113Description:
114 Indicates the number of packets that have been aborted
115 during transmission by a network device (e.g: because of
116 a medium collision). See the network driver for the exact
117 meaning of this value.
118
119What: /sys/class/<iface>/statistics/tx_bytes
120Date: April 2005
121KernelVersion: 2.6.12
122Contact: netdev@vger.kernel.org
123Description:
124 Indicates the number of bytes transmitted by a network
125 device. See the network driver for the exact meaning of this
126 value, in particular whether this accounts for all successfully
127 transmitted packets or all packets that have been queued for
128 transmission.
129
130What: /sys/class/<iface>/statistics/tx_carrier_errors
131Date: April 2005
132KernelVersion: 2.6.12
133Contact: netdev@vger.kernel.org
134Description:
135 Indicates the number of packets that could not be transmitted
136 because of carrier errors (e.g: physical link down). See the
137 network driver for the exact meaning of this value.
138
139What: /sys/class/<iface>/statistics/tx_compressed
140Date: April 2005
141KernelVersion: 2.6.12
142Contact: netdev@vger.kernel.org
143Description:
144 Indicates the number of transmitted compressed packets. Note
145 this might only be relevant for devices that support
146 compression (e.g: PPP).
147
148What: /sys/class/<iface>/statistics/tx_dropped
149Date: April 2005
150KernelVersion: 2.6.12
151Contact: netdev@vger.kernel.org
152Description:
153 Indicates the number of packets dropped during transmission.
154 See the driver for the exact reasons as to why the packets were
155 dropped.
156
157What: /sys/class/<iface>/statistics/tx_errors
158Date: April 2005
159KernelVersion: 2.6.12
160Contact: netdev@vger.kernel.org
161Description:
162 Indicates the number of packets in error during transmission by
163 a network device. See the driver for the exact reasons as to
164 why the packets were dropped.
165
166What: /sys/class/<iface>/statistics/tx_fifo_errors
167Date: April 2005
168KernelVersion: 2.6.12
169Contact: netdev@vger.kernel.org
170Description:
171 Indicates the number of packets having caused a transmit
172 FIFO error. See the driver for the exact reasons as to why the
173 packets were dropped.
174
175What: /sys/class/<iface>/statistics/tx_heartbeat_errors
176Date: April 2005
177KernelVersion: 2.6.12
178Contact: netdev@vger.kernel.org
179Description:
180 Indicates the number of packets transmitted that have been
181 reported as heartbeat errors. See the driver for the exact
182 reasons as to why the packets were dropped.
183
184What: /sys/class/<iface>/statistics/tx_packets
185Date: April 2005
186KernelVersion: 2.6.12
187Contact: netdev@vger.kernel.org
188Description:
189 Indicates the number of packets transmitted by a network
190 device. See the driver for whether this reports the number of all
191 attempted or successful transmissions.
192
193What: /sys/class/<iface>/statistics/tx_window_errors
194Date: April 2005
195KernelVersion: 2.6.12
196Contact: netdev@vger.kernel.org
197Description:
198 Indicates the number of packets not successfully transmitted
199 due to a window collision. The specific meaning depends on the
200 MAC layer used. On Ethernet this is usually used to report
201 late collisions errors.
diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu
index d5a0d33c571f..acb9bfc89b48 100644
--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
@@ -128,7 +128,7 @@ Description: Discover cpuidle policy and mechanism
128 128
129What: /sys/devices/system/cpu/cpu#/cpufreq/* 129What: /sys/devices/system/cpu/cpu#/cpufreq/*
130Date: pre-git history 130Date: pre-git history
131Contact: cpufreq@vger.kernel.org 131Contact: linux-pm@vger.kernel.org
132Description: Discover and change clock speed of CPUs 132Description: Discover and change clock speed of CPUs
133 133
134 Clock scaling allows you to change the clock speed of the 134 Clock scaling allows you to change the clock speed of the
@@ -146,7 +146,7 @@ Description: Discover and change clock speed of CPUs
146 146
147What: /sys/devices/system/cpu/cpu#/cpufreq/freqdomain_cpus 147What: /sys/devices/system/cpu/cpu#/cpufreq/freqdomain_cpus
148Date: June 2013 148Date: June 2013
149Contact: cpufreq@vger.kernel.org 149Contact: linux-pm@vger.kernel.org
150Description: Discover CPUs in the same CPU frequency coordination domain 150Description: Discover CPUs in the same CPU frequency coordination domain
151 151
152 freqdomain_cpus is the list of CPUs (online+offline) that share 152 freqdomain_cpus is the list of CPUs (online+offline) that share
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-thingm b/Documentation/ABI/testing/sysfs-driver-hid-thingm
deleted file mode 100644
index abcffeedd20a..000000000000
--- a/Documentation/ABI/testing/sysfs-driver-hid-thingm
+++ /dev/null
@@ -1,23 +0,0 @@
1What: /sys/class/leds/blink1::<serial>/rgb
2Date: January 2013
3Contact: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
4Description: The ThingM blink1 is an USB RGB LED. The color notation is
5 3-byte hexadecimal. Read this attribute to get the last set
6 color. Write the 24-bit hexadecimal color to change the current
7 LED color. The default color is full white (0xFFFFFF).
8 For instance, set the color to green with: echo 00FF00 > rgb
9
10What: /sys/class/leds/blink1::<serial>/fade
11Date: January 2013
12Contact: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
13Description: This attribute allows to set a fade time in milliseconds for
14 the next color change. Read the attribute to know the current
15 fade time. The default value is set to 0 (no fade time). For
16 instance, set a fade time of 2 seconds with: echo 2000 > fade
17
18What: /sys/class/leds/blink1::<serial>/play
19Date: January 2013
20Contact: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
21Description: This attribute is used to play/pause the light patterns. Write 1
22 to start playing, 0 to stop. Reading this attribute returns the
23 current playing status.
diff --git a/Documentation/ABI/testing/sysfs-platform-brcmstb-gisb-arb b/Documentation/ABI/testing/sysfs-platform-brcmstb-gisb-arb
new file mode 100644
index 000000000000..f1bad92bbe27
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-platform-brcmstb-gisb-arb
@@ -0,0 +1,8 @@
1What: /sys/devices/../../gisb_arb_timeout
2Date: May 2014
3KernelVersion: 3.17
4Contact: Florian Fainelli <f.fainelli@gmail.com>
5Description:
6 Returns the currently configured raw timeout value of the
7 Broadcom Set Top Box internal GISB bus arbiter. Minimum value
8 is 1, and maximum value is 0xffffffff.
diff --git a/Documentation/ABI/testing/sysfs-platform-chipidea-usb-otg b/Documentation/ABI/testing/sysfs-platform-chipidea-usb-otg
new file mode 100644
index 000000000000..151c59578db4
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-platform-chipidea-usb-otg
@@ -0,0 +1,56 @@
1What: /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req
2Date: Feb 2014
3Contact: Li Jun <b47624@freescale.com>
4Description:
5 Can be set and read.
6 Set a_bus_req(A-device bus request) input to be 1 if
7 the application running on the A-device wants to use the bus,
8 and to be 0 when the application no longer wants to use
9 the bus(or wants to work as peripheral). a_bus_req can also
10 be set to 1 by kernel in response to remote wakeup signaling
11 from the B-device, the A-device should decide to resume the bus.
12
13 Valid values are "1" and "0".
14
15 Reading: returns 1 if the application running on the A-device
16 is using the bus as host role, otherwise 0.
17
18What: /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_drop
19Date: Feb 2014
20Contact: Li Jun <b47624@freescale.com>
21Description:
22 Can be set and read
23 The a_bus_drop(A-device bus drop) input is 1 when the
24 application running on the A-device wants to power down
25 the bus, and is 0 otherwise, When a_bus_drop is 1, then
26 the a_bus_req shall be 0.
27
28 Valid values are "1" and "0".
29
30 Reading: returns 1 if the bus is off(vbus is turned off) by
31 A-device, otherwise 0.
32
33What: /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
34Date: Feb 2014
35Contact: Li Jun <b47624@freescale.com>
36Description:
37 Can be set and read.
38 The b_bus_req(B-device bus request) input is 1 during the time
39 that the application running on the B-device wants to use the
40 bus as host, and is 0 when the application no longer wants to
41 work as host and decides to switch back to be peripheral.
42
43 Valid values are "1" and "0".
44
45 Reading: returns if the application running on the B device
46 is using the bus as host role, otherwise 0.
47
48What: /sys/bus/platform/devices/ci_hdrc.0/inputs/a_clr_err
49Date: Feb 2014
50Contact: Li Jun <b47624@freescale.com>
51Description:
52 Only can be set.
53 The a_clr_err(A-device Vbus error clear) input is used to clear
54 vbus error, then A-device will power down the bus.
55
56 Valid value is "1"
diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/testing/sysfs-power
index 64c9276e9421..f4551816329e 100644
--- a/Documentation/ABI/testing/sysfs-power
+++ b/Documentation/ABI/testing/sysfs-power
@@ -7,19 +7,30 @@ Description:
7 subsystem. 7 subsystem.
8 8
9What: /sys/power/state 9What: /sys/power/state
10Date: August 2006 10Date: May 2014
11Contact: Rafael J. Wysocki <rjw@rjwysocki.net> 11Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
12Description: 12Description:
13 The /sys/power/state file controls the system power state. 13 The /sys/power/state file controls system sleep states.
14 Reading from this file returns what states are supported, 14 Reading from this file returns the available sleep state
15 which is hard-coded to 'freeze' (Low-Power Idle), 'standby' 15 labels, which may be "mem", "standby", "freeze" and "disk"
16 (Power-On Suspend), 'mem' (Suspend-to-RAM), and 'disk' 16 (hibernation). The meanings of the first three labels depend on
17 (Suspend-to-Disk). 17 the relative_sleep_states command line argument as follows:
18 1) relative_sleep_states = 1
19 "mem", "standby", "freeze" represent non-hibernation sleep
20 states from the deepest ("mem", always present) to the
21 shallowest ("freeze"). "standby" and "freeze" may or may
22 not be present depending on the capabilities of the
23 platform. "freeze" can only be present if "standby" is
24 present.
25 2) relative_sleep_states = 0 (default)
26 "mem" - "suspend-to-RAM", present if supported.
27 "standby" - "power-on suspend", present if supported.
28 "freeze" - "suspend-to-idle", always present.
18 29
19 Writing to this file one of these strings causes the system to 30 Writing to this file one of these strings causes the system to
20 transition into that state. Please see the file 31 transition into the corresponding state, if available. See
21 Documentation/power/states.txt for a description of each of 32 Documentation/power/states.txt for a description of what
22 these states. 33 "suspend-to-RAM", "power-on suspend" and "suspend-to-idle" mean.
23 34
24What: /sys/power/disk 35What: /sys/power/disk
25Date: September 2006 36Date: September 2006
diff --git a/Documentation/Changes b/Documentation/Changes
index 07c75d18154e..227bec88021e 100644
--- a/Documentation/Changes
+++ b/Documentation/Changes
@@ -73,6 +73,11 @@ Perl
73You will need perl 5 and the following modules: Getopt::Long, Getopt::Std, 73You will need perl 5 and the following modules: Getopt::Long, Getopt::Std,
74File::Basename, and File::Find to build the kernel. 74File::Basename, and File::Find to build the kernel.
75 75
76BC
77--
78
79You will need bc to build kernels 3.10 and higher
80
76 81
77System utilities 82System utilities
78================ 83================
@@ -275,12 +280,9 @@ that is possible.
275mcelog 280mcelog
276------ 281------
277 282
278In Linux 2.6.31+ the i386 kernel needs to run the mcelog utility 283On x86 kernels the mcelog utility is needed to process and log machine check
279as a regular cronjob similar to the x86-64 kernel to process and log 284events when CONFIG_X86_MCE is enabled. Machine check events are errors reported
280machine check events when CONFIG_X86_NEW_MCE is enabled. Machine check 285by the CPU. Processing them is strongly encouraged.
281events are errors reported by the CPU. Processing them is strongly encouraged.
282All x86-64 kernels since 2.6.4 require the mcelog utility to
283process machine checks.
284 286
285Getting updated software 287Getting updated software
286======================== 288========================
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index 7fe0546c504a..6b6bef31e956 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -660,15 +660,23 @@ There are a number of driver model diagnostic macros in <linux/device.h>
660which you should use to make sure messages are matched to the right device 660which you should use to make sure messages are matched to the right device
661and driver, and are tagged with the right level: dev_err(), dev_warn(), 661and driver, and are tagged with the right level: dev_err(), dev_warn(),
662dev_info(), and so forth. For messages that aren't associated with a 662dev_info(), and so forth. For messages that aren't associated with a
663particular device, <linux/printk.h> defines pr_debug() and pr_info(). 663particular device, <linux/printk.h> defines pr_notice(), pr_info(),
664pr_warn(), pr_err(), etc.
664 665
665Coming up with good debugging messages can be quite a challenge; and once 666Coming up with good debugging messages can be quite a challenge; and once
666you have them, they can be a huge help for remote troubleshooting. Such 667you have them, they can be a huge help for remote troubleshooting. However
667messages should be compiled out when the DEBUG symbol is not defined (that 668debug message printing is handled differently than printing other non-debug
668is, by default they are not included). When you use dev_dbg() or pr_debug(), 669messages. While the other pr_XXX() functions print unconditionally,
669that's automatic. Many subsystems have Kconfig options to turn on -DDEBUG. 670pr_debug() does not; it is compiled out by default, unless either DEBUG is
670A related convention uses VERBOSE_DEBUG to add dev_vdbg() messages to the 671defined or CONFIG_DYNAMIC_DEBUG is set. That is true for dev_dbg() also,
671ones already enabled by DEBUG. 672and a related convention uses VERBOSE_DEBUG to add dev_vdbg() messages to
673the ones already enabled by DEBUG.
674
675Many subsystems have Kconfig debug options to turn on -DDEBUG in the
676corresponding Makefile; in other cases specific files #define DEBUG. And
677when a debug message should be unconditionally printed, such as if it is
678already inside a debug-related #ifdef secton, printk(KERN_DEBUG ...) can be
679used.
672 680
673 681
674 Chapter 14: Allocating memory 682 Chapter 14: Allocating memory
diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt
index 5e983031cc11..dcbbe3602d78 100644
--- a/Documentation/DMA-API-HOWTO.txt
+++ b/Documentation/DMA-API-HOWTO.txt
@@ -9,16 +9,76 @@ This is a guide to device driver writers on how to use the DMA API
9with example pseudo-code. For a concise description of the API, see 9with example pseudo-code. For a concise description of the API, see
10DMA-API.txt. 10DMA-API.txt.
11 11
12Most of the 64bit platforms have special hardware that translates bus 12 CPU and DMA addresses
13addresses (DMA addresses) into physical addresses. This is similar to 13
14how page tables and/or a TLB translates virtual addresses to physical 14There are several kinds of addresses involved in the DMA API, and it's
15addresses on a CPU. This is needed so that e.g. PCI devices can 15important to understand the differences.
16access with a Single Address Cycle (32bit DMA address) any page in the 16
1764bit physical address space. Previously in Linux those 64bit 17The kernel normally uses virtual addresses. Any address returned by
18platforms had to set artificial limits on the maximum RAM size in the 18kmalloc(), vmalloc(), and similar interfaces is a virtual address and can
19system, so that the virt_to_bus() static scheme works (the DMA address 19be stored in a "void *".
20translation tables were simply filled on bootup to map each bus 20
21address to the physical page __pa(bus_to_virt())). 21The virtual memory system (TLB, page tables, etc.) translates virtual
22addresses to CPU physical addresses, which are stored as "phys_addr_t" or
23"resource_size_t". The kernel manages device resources like registers as
24physical addresses. These are the addresses in /proc/iomem. The physical
25address is not directly useful to a driver; it must use ioremap() to map
26the space and produce a virtual address.
27
28I/O devices use a third kind of address: a "bus address" or "DMA address".
29If a device has registers at an MMIO address, or if it performs DMA to read
30or write system memory, the addresses used by the device are bus addresses.
31In some systems, bus addresses are identical to CPU physical addresses, but
32in general they are not. IOMMUs and host bridges can produce arbitrary
33mappings between physical and bus addresses.
34
35Here's a picture and some examples:
36
37 CPU CPU Bus
38 Virtual Physical Address
39 Address Address Space
40 Space Space
41
42 +-------+ +------+ +------+
43 | | |MMIO | Offset | |
44 | | Virtual |Space | applied | |
45 C +-------+ --------> B +------+ ----------> +------+ A
46 | | mapping | | by host | |
47 +-----+ | | | | bridge | | +--------+
48 | | | | +------+ | | | |
49 | CPU | | | | RAM | | | | Device |
50 | | | | | | | | | |
51 +-----+ +-------+ +------+ +------+ +--------+
52 | | Virtual |Buffer| Mapping | |
53 X +-------+ --------> Y +------+ <---------- +------+ Z
54 | | mapping | RAM | by IOMMU
55 | | | |
56 | | | |
57 +-------+ +------+
58
59During the enumeration process, the kernel learns about I/O devices and
60their MMIO space and the host bridges that connect them to the system. For
61example, if a PCI device has a BAR, the kernel reads the bus address (A)
62from the BAR and converts it to a CPU physical address (B). The address B
63is stored in a struct resource and usually exposed via /proc/iomem. When a
64driver claims a device, it typically uses ioremap() to map physical address
65B at a virtual address (C). It can then use, e.g., ioread32(C), to access
66the device registers at bus address A.
67
68If the device supports DMA, the driver sets up a buffer using kmalloc() or
69a similar interface, which returns a virtual address (X). The virtual
70memory system maps X to a physical address (Y) in system RAM. The driver
71can use virtual address X to access the buffer, but the device itself
72cannot because DMA doesn't go through the CPU virtual memory system.
73
74In some simple systems, the device can do DMA directly to physical address
75Y. But in many others, there is IOMMU hardware that translates bus
76addresses to physical addresses, e.g., it translates Z to Y. This is part
77of the reason for the DMA API: the driver can give a virtual address X to
78an interface like dma_map_single(), which sets up any required IOMMU
79mapping and returns the bus address Z. The driver then tells the device to
80do DMA to Z, and the IOMMU maps it to the buffer at address Y in system
81RAM.
22 82
23So that Linux can use the dynamic DMA mapping, it needs some help from the 83So that Linux can use the dynamic DMA mapping, it needs some help from the
24drivers, namely it has to take into account that DMA addresses should be 84drivers, namely it has to take into account that DMA addresses should be
@@ -29,17 +89,17 @@ The following API will work of course even on platforms where no such
29hardware exists. 89hardware exists.
30 90
31Note that the DMA API works with any bus independent of the underlying 91Note that the DMA API works with any bus independent of the underlying
32microprocessor architecture. You should use the DMA API rather than 92microprocessor architecture. You should use the DMA API rather than the
33the bus specific DMA API (e.g. pci_dma_*). 93bus-specific DMA API, i.e., use the dma_map_*() interfaces rather than the
94pci_map_*() interfaces.
34 95
35First of all, you should make sure 96First of all, you should make sure
36 97
37#include <linux/dma-mapping.h> 98#include <linux/dma-mapping.h>
38 99
39is in your driver. This file will obtain for you the definition of the 100is in your driver, which provides the definition of dma_addr_t. This type
40dma_addr_t (which can hold any valid DMA address for the platform) 101can hold any valid DMA or bus address for the platform and should be used
41type which should be used everywhere you hold a DMA (bus) address 102everywhere you hold a DMA address returned from the DMA mapping functions.
42returned from the DMA mapping functions.
43 103
44 What memory is DMA'able? 104 What memory is DMA'able?
45 105
@@ -123,9 +183,9 @@ Here, dev is a pointer to the device struct of your device, and mask
123is a bit mask describing which bits of an address your device 183is a bit mask describing which bits of an address your device
124supports. It returns zero if your card can perform DMA properly on 184supports. It returns zero if your card can perform DMA properly on
125the machine given the address mask you provided. In general, the 185the machine given the address mask you provided. In general, the
126device struct of your device is embedded in the bus specific device 186device struct of your device is embedded in the bus-specific device
127struct of your device. For example, a pointer to the device struct of 187struct of your device. For example, &pdev->dev is a pointer to the
128your PCI device is pdev->dev (pdev is a pointer to the PCI device 188device struct of a PCI device (pdev is a pointer to the PCI device
129struct of your device). 189struct of your device).
130 190
131If it returns non-zero, your device cannot perform DMA properly on 191If it returns non-zero, your device cannot perform DMA properly on
@@ -147,8 +207,7 @@ exactly why.
147The standard 32-bit addressing device would do something like this: 207The standard 32-bit addressing device would do something like this:
148 208
149 if (dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32))) { 209 if (dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32))) {
150 printk(KERN_WARNING 210 dev_warn(dev, "mydev: No suitable DMA available\n");
151 "mydev: No suitable DMA available.\n");
152 goto ignore_this_device; 211 goto ignore_this_device;
153 } 212 }
154 213
@@ -170,8 +229,7 @@ all 64-bits when accessing streaming DMA:
170 } else if (!dma_set_mask(dev, DMA_BIT_MASK(32))) { 229 } else if (!dma_set_mask(dev, DMA_BIT_MASK(32))) {
171 using_dac = 0; 230 using_dac = 0;
172 } else { 231 } else {
173 printk(KERN_WARNING 232 dev_warn(dev, "mydev: No suitable DMA available\n");
174 "mydev: No suitable DMA available.\n");
175 goto ignore_this_device; 233 goto ignore_this_device;
176 } 234 }
177 235
@@ -187,22 +245,20 @@ the case would look like this:
187 using_dac = 0; 245 using_dac = 0;
188 consistent_using_dac = 0; 246 consistent_using_dac = 0;
189 } else { 247 } else {
190 printk(KERN_WARNING 248 dev_warn(dev, "mydev: No suitable DMA available\n");
191 "mydev: No suitable DMA available.\n");
192 goto ignore_this_device; 249 goto ignore_this_device;
193 } 250 }
194 251
195The coherent coherent mask will always be able to set the same or a 252The coherent mask will always be able to set the same or a smaller mask as
196smaller mask as the streaming mask. However for the rare case that a 253the streaming mask. However for the rare case that a device driver only
197device driver only uses consistent allocations, one would have to 254uses consistent allocations, one would have to check the return value from
198check the return value from dma_set_coherent_mask(). 255dma_set_coherent_mask().
199 256
200Finally, if your device can only drive the low 24-bits of 257Finally, if your device can only drive the low 24-bits of
201address you might do something like: 258address you might do something like:
202 259
203 if (dma_set_mask(dev, DMA_BIT_MASK(24))) { 260 if (dma_set_mask(dev, DMA_BIT_MASK(24))) {
204 printk(KERN_WARNING 261 dev_warn(dev, "mydev: 24-bit DMA addressing not available\n");
205 "mydev: 24-bit DMA addressing not available.\n");
206 goto ignore_this_device; 262 goto ignore_this_device;
207 } 263 }
208 264
@@ -232,14 +288,14 @@ Here is pseudo-code showing how this might be done:
232 card->playback_enabled = 1; 288 card->playback_enabled = 1;
233 } else { 289 } else {
234 card->playback_enabled = 0; 290 card->playback_enabled = 0;
235 printk(KERN_WARNING "%s: Playback disabled due to DMA limitations.\n", 291 dev_warn(dev, "%s: Playback disabled due to DMA limitations\n",
236 card->name); 292 card->name);
237 } 293 }
238 if (!dma_set_mask(dev, RECORD_ADDRESS_BITS)) { 294 if (!dma_set_mask(dev, RECORD_ADDRESS_BITS)) {
239 card->record_enabled = 1; 295 card->record_enabled = 1;
240 } else { 296 } else {
241 card->record_enabled = 0; 297 card->record_enabled = 0;
242 printk(KERN_WARNING "%s: Record disabled due to DMA limitations.\n", 298 dev_warn(dev, "%s: Record disabled due to DMA limitations\n",
243 card->name); 299 card->name);
244 } 300 }
245 301
@@ -331,7 +387,7 @@ context with the GFP_ATOMIC flag.
331Size is the length of the region you want to allocate, in bytes. 387Size is the length of the region you want to allocate, in bytes.
332 388
333This routine will allocate RAM for that region, so it acts similarly to 389This routine will allocate RAM for that region, so it acts similarly to
334__get_free_pages (but takes size instead of a page order). If your 390__get_free_pages() (but takes size instead of a page order). If your
335driver needs regions sized smaller than a page, you may prefer using 391driver needs regions sized smaller than a page, you may prefer using
336the dma_pool interface, described below. 392the dma_pool interface, described below.
337 393
@@ -343,11 +399,11 @@ the consistent DMA mask has been explicitly changed via
343dma_set_coherent_mask(). This is true of the dma_pool interface as 399dma_set_coherent_mask(). This is true of the dma_pool interface as
344well. 400well.
345 401
346dma_alloc_coherent returns two values: the virtual address which you 402dma_alloc_coherent() returns two values: the virtual address which you
347can use to access it from the CPU and dma_handle which you pass to the 403can use to access it from the CPU and dma_handle which you pass to the
348card. 404card.
349 405
350The cpu return address and the DMA bus master address are both 406The CPU virtual address and the DMA bus address are both
351guaranteed to be aligned to the smallest PAGE_SIZE order which 407guaranteed to be aligned to the smallest PAGE_SIZE order which
352is greater than or equal to the requested size. This invariant 408is greater than or equal to the requested size. This invariant
353exists (for example) to guarantee that if you allocate a chunk 409exists (for example) to guarantee that if you allocate a chunk
@@ -359,13 +415,13 @@ To unmap and free such a DMA region, you call:
359 dma_free_coherent(dev, size, cpu_addr, dma_handle); 415 dma_free_coherent(dev, size, cpu_addr, dma_handle);
360 416
361where dev, size are the same as in the above call and cpu_addr and 417where dev, size are the same as in the above call and cpu_addr and
362dma_handle are the values dma_alloc_coherent returned to you. 418dma_handle are the values dma_alloc_coherent() returned to you.
363This function may not be called in interrupt context. 419This function may not be called in interrupt context.
364 420
365If your driver needs lots of smaller memory regions, you can write 421If your driver needs lots of smaller memory regions, you can write
366custom code to subdivide pages returned by dma_alloc_coherent, 422custom code to subdivide pages returned by dma_alloc_coherent(),
367or you can use the dma_pool API to do that. A dma_pool is like 423or you can use the dma_pool API to do that. A dma_pool is like
368a kmem_cache, but it uses dma_alloc_coherent not __get_free_pages. 424a kmem_cache, but it uses dma_alloc_coherent(), not __get_free_pages().
369Also, it understands common hardware constraints for alignment, 425Also, it understands common hardware constraints for alignment,
370like queue heads needing to be aligned on N byte boundaries. 426like queue heads needing to be aligned on N byte boundaries.
371 427
@@ -373,37 +429,37 @@ Create a dma_pool like this:
373 429
374 struct dma_pool *pool; 430 struct dma_pool *pool;
375 431
376 pool = dma_pool_create(name, dev, size, align, alloc); 432 pool = dma_pool_create(name, dev, size, align, boundary);
377 433
378The "name" is for diagnostics (like a kmem_cache name); dev and size 434The "name" is for diagnostics (like a kmem_cache name); dev and size
379are as above. The device's hardware alignment requirement for this 435are as above. The device's hardware alignment requirement for this
380type of data is "align" (which is expressed in bytes, and must be a 436type of data is "align" (which is expressed in bytes, and must be a
381power of two). If your device has no boundary crossing restrictions, 437power of two). If your device has no boundary crossing restrictions,
382pass 0 for alloc; passing 4096 says memory allocated from this pool 438pass 0 for boundary; passing 4096 says memory allocated from this pool
383must not cross 4KByte boundaries (but at that time it may be better to 439must not cross 4KByte boundaries (but at that time it may be better to
384go for dma_alloc_coherent directly instead). 440use dma_alloc_coherent() directly instead).
385 441
386Allocate memory from a dma pool like this: 442Allocate memory from a DMA pool like this:
387 443
388 cpu_addr = dma_pool_alloc(pool, flags, &dma_handle); 444 cpu_addr = dma_pool_alloc(pool, flags, &dma_handle);
389 445
390flags are SLAB_KERNEL if blocking is permitted (not in_interrupt nor 446flags are GFP_KERNEL if blocking is permitted (not in_interrupt nor
391holding SMP locks), SLAB_ATOMIC otherwise. Like dma_alloc_coherent, 447holding SMP locks), GFP_ATOMIC otherwise. Like dma_alloc_coherent(),
392this returns two values, cpu_addr and dma_handle. 448this returns two values, cpu_addr and dma_handle.
393 449
394Free memory that was allocated from a dma_pool like this: 450Free memory that was allocated from a dma_pool like this:
395 451
396 dma_pool_free(pool, cpu_addr, dma_handle); 452 dma_pool_free(pool, cpu_addr, dma_handle);
397 453
398where pool is what you passed to dma_pool_alloc, and cpu_addr and 454where pool is what you passed to dma_pool_alloc(), and cpu_addr and
399dma_handle are the values dma_pool_alloc returned. This function 455dma_handle are the values dma_pool_alloc() returned. This function
400may be called in interrupt context. 456may be called in interrupt context.
401 457
402Destroy a dma_pool by calling: 458Destroy a dma_pool by calling:
403 459
404 dma_pool_destroy(pool); 460 dma_pool_destroy(pool);
405 461
406Make sure you've called dma_pool_free for all memory allocated 462Make sure you've called dma_pool_free() for all memory allocated
407from a pool before you destroy the pool. This function may not 463from a pool before you destroy the pool. This function may not
408be called in interrupt context. 464be called in interrupt context.
409 465
@@ -418,7 +474,7 @@ one of the following values:
418 DMA_FROM_DEVICE 474 DMA_FROM_DEVICE
419 DMA_NONE 475 DMA_NONE
420 476
421One should provide the exact DMA direction if you know it. 477You should provide the exact DMA direction if you know it.
422 478
423DMA_TO_DEVICE means "from main memory to the device" 479DMA_TO_DEVICE means "from main memory to the device"
424DMA_FROM_DEVICE means "from the device to main memory" 480DMA_FROM_DEVICE means "from the device to main memory"
@@ -489,14 +545,14 @@ and to unmap it:
489 dma_unmap_single(dev, dma_handle, size, direction); 545 dma_unmap_single(dev, dma_handle, size, direction);
490 546
491You should call dma_mapping_error() as dma_map_single() could fail and return 547You should call dma_mapping_error() as dma_map_single() could fail and return
492error. Not all dma implementations support dma_mapping_error() interface. 548error. Not all DMA implementations support the dma_mapping_error() interface.
493However, it is a good practice to call dma_mapping_error() interface, which 549However, it is a good practice to call dma_mapping_error() interface, which
494will invoke the generic mapping error check interface. Doing so will ensure 550will invoke the generic mapping error check interface. Doing so will ensure
495that the mapping code will work correctly on all dma implementations without 551that the mapping code will work correctly on all DMA implementations without
496any dependency on the specifics of the underlying implementation. Using the 552any dependency on the specifics of the underlying implementation. Using the
497returned address without checking for errors could result in failures ranging 553returned address without checking for errors could result in failures ranging
498from panics to silent data corruption. A couple of examples of incorrect ways 554from panics to silent data corruption. A couple of examples of incorrect ways
499to check for errors that make assumptions about the underlying dma 555to check for errors that make assumptions about the underlying DMA
500implementation are as follows and these are applicable to dma_map_page() as 556implementation are as follows and these are applicable to dma_map_page() as
501well. 557well.
502 558
@@ -516,13 +572,13 @@ Incorrect example 2:
516 goto map_error; 572 goto map_error;
517 } 573 }
518 574
519You should call dma_unmap_single when the DMA activity is finished, e.g. 575You should call dma_unmap_single() when the DMA activity is finished, e.g.,
520from the interrupt which told you that the DMA transfer is done. 576from the interrupt which told you that the DMA transfer is done.
521 577
522Using cpu pointers like this for single mappings has a disadvantage, 578Using CPU pointers like this for single mappings has a disadvantage:
523you cannot reference HIGHMEM memory in this way. Thus, there is a 579you cannot reference HIGHMEM memory in this way. Thus, there is a
524map/unmap interface pair akin to dma_{map,unmap}_single. These 580map/unmap interface pair akin to dma_{map,unmap}_single(). These
525interfaces deal with page/offset pairs instead of cpu pointers. 581interfaces deal with page/offset pairs instead of CPU pointers.
526Specifically: 582Specifically:
527 583
528 struct device *dev = &my_dev->dev; 584 struct device *dev = &my_dev->dev;
@@ -550,7 +606,7 @@ Here, "offset" means byte offset within the given page.
550You should call dma_mapping_error() as dma_map_page() could fail and return 606You should call dma_mapping_error() as dma_map_page() could fail and return
551error as outlined under the dma_map_single() discussion. 607error as outlined under the dma_map_single() discussion.
552 608
553You should call dma_unmap_page when the DMA activity is finished, e.g. 609You should call dma_unmap_page() when the DMA activity is finished, e.g.,
554from the interrupt which told you that the DMA transfer is done. 610from the interrupt which told you that the DMA transfer is done.
555 611
556With scatterlists, you map a region gathered from several regions by: 612With scatterlists, you map a region gathered from several regions by:
@@ -588,18 +644,16 @@ PLEASE NOTE: The 'nents' argument to the dma_unmap_sg call must be
588 it should _NOT_ be the 'count' value _returned_ from the 644 it should _NOT_ be the 'count' value _returned_ from the
589 dma_map_sg call. 645 dma_map_sg call.
590 646
591Every dma_map_{single,sg} call should have its dma_unmap_{single,sg} 647Every dma_map_{single,sg}() call should have its dma_unmap_{single,sg}()
592counterpart, because the bus address space is a shared resource (although 648counterpart, because the bus address space is a shared resource and
593in some ports the mapping is per each BUS so less devices contend for the 649you could render the machine unusable by consuming all bus addresses.
594same bus address space) and you could render the machine unusable by eating
595all bus addresses.
596 650
597If you need to use the same streaming DMA region multiple times and touch 651If you need to use the same streaming DMA region multiple times and touch
598the data in between the DMA transfers, the buffer needs to be synced 652the data in between the DMA transfers, the buffer needs to be synced
599properly in order for the cpu and device to see the most uptodate and 653properly in order for the CPU and device to see the most up-to-date and
600correct copy of the DMA buffer. 654correct copy of the DMA buffer.
601 655
602So, firstly, just map it with dma_map_{single,sg}, and after each DMA 656So, firstly, just map it with dma_map_{single,sg}(), and after each DMA
603transfer call either: 657transfer call either:
604 658
605 dma_sync_single_for_cpu(dev, dma_handle, size, direction); 659 dma_sync_single_for_cpu(dev, dma_handle, size, direction);
@@ -611,7 +665,7 @@ or:
611as appropriate. 665as appropriate.
612 666
613Then, if you wish to let the device get at the DMA area again, 667Then, if you wish to let the device get at the DMA area again,
614finish accessing the data with the cpu, and then before actually 668finish accessing the data with the CPU, and then before actually
615giving the buffer to the hardware call either: 669giving the buffer to the hardware call either:
616 670
617 dma_sync_single_for_device(dev, dma_handle, size, direction); 671 dma_sync_single_for_device(dev, dma_handle, size, direction);
@@ -623,9 +677,9 @@ or:
623as appropriate. 677as appropriate.
624 678
625After the last DMA transfer call one of the DMA unmap routines 679After the last DMA transfer call one of the DMA unmap routines
626dma_unmap_{single,sg}. If you don't touch the data from the first dma_map_* 680dma_unmap_{single,sg}(). If you don't touch the data from the first
627call till dma_unmap_*, then you don't have to call the dma_sync_* 681dma_map_*() call till dma_unmap_*(), then you don't have to call the
628routines at all. 682dma_sync_*() routines at all.
629 683
630Here is pseudo code which shows a situation in which you would need 684Here is pseudo code which shows a situation in which you would need
631to use the dma_sync_*() interfaces. 685to use the dma_sync_*() interfaces.
@@ -690,12 +744,12 @@ to use the dma_sync_*() interfaces.
690 } 744 }
691 } 745 }
692 746
693Drivers converted fully to this interface should not use virt_to_bus any 747Drivers converted fully to this interface should not use virt_to_bus() any
694longer, nor should they use bus_to_virt. Some drivers have to be changed a 748longer, nor should they use bus_to_virt(). Some drivers have to be changed a
695little bit, because there is no longer an equivalent to bus_to_virt in the 749little bit, because there is no longer an equivalent to bus_to_virt() in the
696dynamic DMA mapping scheme - you have to always store the DMA addresses 750dynamic DMA mapping scheme - you have to always store the DMA addresses
697returned by the dma_alloc_coherent, dma_pool_alloc, and dma_map_single 751returned by the dma_alloc_coherent(), dma_pool_alloc(), and dma_map_single()
698calls (dma_map_sg stores them in the scatterlist itself if the platform 752calls (dma_map_sg() stores them in the scatterlist itself if the platform
699supports dynamic DMA mapping in hardware) in your driver structures and/or 753supports dynamic DMA mapping in hardware) in your driver structures and/or
700in the card registers. 754in the card registers.
701 755
@@ -709,9 +763,9 @@ as it is impossible to correctly support them.
709DMA address space is limited on some architectures and an allocation 763DMA address space is limited on some architectures and an allocation
710failure can be determined by: 764failure can be determined by:
711 765
712- checking if dma_alloc_coherent returns NULL or dma_map_sg returns 0 766- checking if dma_alloc_coherent() returns NULL or dma_map_sg returns 0
713 767
714- checking the returned dma_addr_t of dma_map_single and dma_map_page 768- checking the dma_addr_t returned from dma_map_single() and dma_map_page()
715 by using dma_mapping_error(): 769 by using dma_mapping_error():
716 770
717 dma_addr_t dma_handle; 771 dma_addr_t dma_handle;
@@ -794,7 +848,7 @@ Example 2: (if buffers are allocated in a loop, unmap all mapped buffers when
794 dma_unmap_single(array[i].dma_addr); 848 dma_unmap_single(array[i].dma_addr);
795 } 849 }
796 850
797Networking drivers must call dev_kfree_skb to free the socket buffer 851Networking drivers must call dev_kfree_skb() to free the socket buffer
798and return NETDEV_TX_OK if the DMA mapping fails on the transmit hook 852and return NETDEV_TX_OK if the DMA mapping fails on the transmit hook
799(ndo_start_xmit). This means that the socket buffer is just dropped in 853(ndo_start_xmit). This means that the socket buffer is just dropped in
800the failure case. 854the failure case.
@@ -831,7 +885,7 @@ transform some example code.
831 DEFINE_DMA_UNMAP_LEN(len); 885 DEFINE_DMA_UNMAP_LEN(len);
832 }; 886 };
833 887
8342) Use dma_unmap_{addr,len}_set to set these values. 8882) Use dma_unmap_{addr,len}_set() to set these values.
835 Example, before: 889 Example, before:
836 890
837 ringp->mapping = FOO; 891 ringp->mapping = FOO;
@@ -842,7 +896,7 @@ transform some example code.
842 dma_unmap_addr_set(ringp, mapping, FOO); 896 dma_unmap_addr_set(ringp, mapping, FOO);
843 dma_unmap_len_set(ringp, len, BAR); 897 dma_unmap_len_set(ringp, len, BAR);
844 898
8453) Use dma_unmap_{addr,len} to access these values. 8993) Use dma_unmap_{addr,len}() to access these values.
846 Example, before: 900 Example, before:
847 901
848 dma_unmap_single(dev, ringp->mapping, ringp->len, 902 dma_unmap_single(dev, ringp->mapping, ringp->len,
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt
index e865279cec58..52088408668a 100644
--- a/Documentation/DMA-API.txt
+++ b/Documentation/DMA-API.txt
@@ -4,22 +4,26 @@
4 James E.J. Bottomley <James.Bottomley@HansenPartnership.com> 4 James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
5 5
6This document describes the DMA API. For a more gentle introduction 6This document describes the DMA API. For a more gentle introduction
7of the API (and actual examples) see 7of the API (and actual examples), see Documentation/DMA-API-HOWTO.txt.
8Documentation/DMA-API-HOWTO.txt.
9 8
10This API is split into two pieces. Part I describes the API. Part II 9This API is split into two pieces. Part I describes the basic API.
11describes the extensions to the API for supporting non-consistent 10Part II describes extensions for supporting non-consistent memory
12memory machines. Unless you know that your driver absolutely has to 11machines. Unless you know that your driver absolutely has to support
13support non-consistent platforms (this is usually only legacy 12non-consistent platforms (this is usually only legacy platforms) you
14platforms) you should only use the API described in part I. 13should only use the API described in part I.
15 14
16Part I - dma_ API 15Part I - dma_ API
17------------------------------------- 16-------------------------------------
18 17
19To get the dma_ API, you must #include <linux/dma-mapping.h> 18To get the dma_ API, you must #include <linux/dma-mapping.h>. This
19provides dma_addr_t and the interfaces described below.
20 20
21A dma_addr_t can hold any valid DMA or bus address for the platform. It
22can be given to a device to use as a DMA source or target. A CPU cannot
23reference a dma_addr_t directly because there may be translation between
24its physical address space and the bus address space.
21 25
22Part Ia - Using large dma-coherent buffers 26Part Ia - Using large DMA-coherent buffers
23------------------------------------------ 27------------------------------------------
24 28
25void * 29void *
@@ -33,20 +37,21 @@ to make sure to flush the processor's write buffers before telling
33devices to read that memory.) 37devices to read that memory.)
34 38
35This routine allocates a region of <size> bytes of consistent memory. 39This routine allocates a region of <size> bytes of consistent memory.
36It also returns a <dma_handle> which may be cast to an unsigned
37integer the same width as the bus and used as the physical address
38base of the region.
39 40
40Returns: a pointer to the allocated region (in the processor's virtual 41It returns a pointer to the allocated region (in the processor's virtual
41address space) or NULL if the allocation failed. 42address space) or NULL if the allocation failed.
42 43
44It also returns a <dma_handle> which may be cast to an unsigned integer the
45same width as the bus and given to the device as the bus address base of
46the region.
47
43Note: consistent memory can be expensive on some platforms, and the 48Note: consistent memory can be expensive on some platforms, and the
44minimum allocation length may be as big as a page, so you should 49minimum allocation length may be as big as a page, so you should
45consolidate your requests for consistent memory as much as possible. 50consolidate your requests for consistent memory as much as possible.
46The simplest way to do that is to use the dma_pool calls (see below). 51The simplest way to do that is to use the dma_pool calls (see below).
47 52
48The flag parameter (dma_alloc_coherent only) allows the caller to 53The flag parameter (dma_alloc_coherent() only) allows the caller to
49specify the GFP_ flags (see kmalloc) for the allocation (the 54specify the GFP_ flags (see kmalloc()) for the allocation (the
50implementation may choose to ignore flags that affect the location of 55implementation may choose to ignore flags that affect the location of
51the returned memory, like GFP_DMA). 56the returned memory, like GFP_DMA).
52 57
@@ -61,24 +66,24 @@ void
61dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, 66dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
62 dma_addr_t dma_handle) 67 dma_addr_t dma_handle)
63 68
64Free the region of consistent memory you previously allocated. dev, 69Free a region of consistent memory you previously allocated. dev,
65size and dma_handle must all be the same as those passed into the 70size and dma_handle must all be the same as those passed into
66consistent allocate. cpu_addr must be the virtual address returned by 71dma_alloc_coherent(). cpu_addr must be the virtual address returned by
67the consistent allocate. 72the dma_alloc_coherent().
68 73
69Note that unlike their sibling allocation calls, these routines 74Note that unlike their sibling allocation calls, these routines
70may only be called with IRQs enabled. 75may only be called with IRQs enabled.
71 76
72 77
73Part Ib - Using small dma-coherent buffers 78Part Ib - Using small DMA-coherent buffers
74------------------------------------------ 79------------------------------------------
75 80
76To get this part of the dma_ API, you must #include <linux/dmapool.h> 81To get this part of the dma_ API, you must #include <linux/dmapool.h>
77 82
78Many drivers need lots of small dma-coherent memory regions for DMA 83Many drivers need lots of small DMA-coherent memory regions for DMA
79descriptors or I/O buffers. Rather than allocating in units of a page 84descriptors or I/O buffers. Rather than allocating in units of a page
80or more using dma_alloc_coherent(), you can use DMA pools. These work 85or more using dma_alloc_coherent(), you can use DMA pools. These work
81much like a struct kmem_cache, except that they use the dma-coherent allocator, 86much like a struct kmem_cache, except that they use the DMA-coherent allocator,
82not __get_free_pages(). Also, they understand common hardware constraints 87not __get_free_pages(). Also, they understand common hardware constraints
83for alignment, like queue heads needing to be aligned on N-byte boundaries. 88for alignment, like queue heads needing to be aligned on N-byte boundaries.
84 89
@@ -87,7 +92,7 @@ for alignment, like queue heads needing to be aligned on N-byte boundaries.
87 dma_pool_create(const char *name, struct device *dev, 92 dma_pool_create(const char *name, struct device *dev,
88 size_t size, size_t align, size_t alloc); 93 size_t size, size_t align, size_t alloc);
89 94
90The pool create() routines initialize a pool of dma-coherent buffers 95dma_pool_create() initializes a pool of DMA-coherent buffers
91for use with a given device. It must be called in a context which 96for use with a given device. It must be called in a context which
92can sleep. 97can sleep.
93 98
@@ -102,25 +107,26 @@ from this pool must not cross 4KByte boundaries.
102 void *dma_pool_alloc(struct dma_pool *pool, gfp_t gfp_flags, 107 void *dma_pool_alloc(struct dma_pool *pool, gfp_t gfp_flags,
103 dma_addr_t *dma_handle); 108 dma_addr_t *dma_handle);
104 109
105This allocates memory from the pool; the returned memory will meet the size 110This allocates memory from the pool; the returned memory will meet the
106and alignment requirements specified at creation time. Pass GFP_ATOMIC to 111size and alignment requirements specified at creation time. Pass
107prevent blocking, or if it's permitted (not in_interrupt, not holding SMP locks), 112GFP_ATOMIC to prevent blocking, or if it's permitted (not
108pass GFP_KERNEL to allow blocking. Like dma_alloc_coherent(), this returns 113in_interrupt, not holding SMP locks), pass GFP_KERNEL to allow
109two values: an address usable by the cpu, and the dma address usable by the 114blocking. Like dma_alloc_coherent(), this returns two values: an
110pool's device. 115address usable by the CPU, and the DMA address usable by the pool's
116device.
111 117
112 118
113 void dma_pool_free(struct dma_pool *pool, void *vaddr, 119 void dma_pool_free(struct dma_pool *pool, void *vaddr,
114 dma_addr_t addr); 120 dma_addr_t addr);
115 121
116This puts memory back into the pool. The pool is what was passed to 122This puts memory back into the pool. The pool is what was passed to
117the pool allocation routine; the cpu (vaddr) and dma addresses are what 123dma_pool_alloc(); the CPU (vaddr) and DMA addresses are what
118were returned when that routine allocated the memory being freed. 124were returned when that routine allocated the memory being freed.
119 125
120 126
121 void dma_pool_destroy(struct dma_pool *pool); 127 void dma_pool_destroy(struct dma_pool *pool);
122 128
123The pool destroy() routines free the resources of the pool. They must be 129dma_pool_destroy() frees the resources of the pool. It must be
124called in a context which can sleep. Make sure you've freed all allocated 130called in a context which can sleep. Make sure you've freed all allocated
125memory back to the pool before you destroy it. 131memory back to the pool before you destroy it.
126 132
@@ -187,9 +193,9 @@ dma_map_single(struct device *dev, void *cpu_addr, size_t size,
187 enum dma_data_direction direction) 193 enum dma_data_direction direction)
188 194
189Maps a piece of processor virtual memory so it can be accessed by the 195Maps a piece of processor virtual memory so it can be accessed by the
190device and returns the physical handle of the memory. 196device and returns the bus address of the memory.
191 197
192The direction for both api's may be converted freely by casting. 198The direction for both APIs may be converted freely by casting.
193However the dma_ API uses a strongly typed enumerator for its 199However the dma_ API uses a strongly typed enumerator for its
194direction: 200direction:
195 201
@@ -198,31 +204,30 @@ DMA_TO_DEVICE data is going from the memory to the device
198DMA_FROM_DEVICE data is coming from the device to the memory 204DMA_FROM_DEVICE data is coming from the device to the memory
199DMA_BIDIRECTIONAL direction isn't known 205DMA_BIDIRECTIONAL direction isn't known
200 206
201Notes: Not all memory regions in a machine can be mapped by this 207Notes: Not all memory regions in a machine can be mapped by this API.
202API. Further, regions that appear to be physically contiguous in 208Further, contiguous kernel virtual space may not be contiguous as
203kernel virtual space may not be contiguous as physical memory. Since 209physical memory. Since this API does not provide any scatter/gather
204this API does not provide any scatter/gather capability, it will fail 210capability, it will fail if the user tries to map a non-physically
205if the user tries to map a non-physically contiguous piece of memory. 211contiguous piece of memory. For this reason, memory to be mapped by
206For this reason, it is recommended that memory mapped by this API be 212this API should be obtained from sources which guarantee it to be
207obtained only from sources which guarantee it to be physically contiguous 213physically contiguous (like kmalloc).
208(like kmalloc). 214
209 215Further, the bus address of the memory must be within the
210Further, the physical address of the memory must be within the 216dma_mask of the device (the dma_mask is a bit mask of the
211dma_mask of the device (the dma_mask represents a bit mask of the 217addressable region for the device, i.e., if the bus address of
212addressable region for the device. I.e., if the physical address of 218the memory ANDed with the dma_mask is still equal to the bus
213the memory anded with the dma_mask is still equal to the physical 219address, then the device can perform DMA to the memory). To
214address, then the device can perform DMA to the memory). In order to
215ensure that the memory allocated by kmalloc is within the dma_mask, 220ensure that the memory allocated by kmalloc is within the dma_mask,
216the driver may specify various platform-dependent flags to restrict 221the driver may specify various platform-dependent flags to restrict
217the physical memory range of the allocation (e.g. on x86, GFP_DMA 222the bus address range of the allocation (e.g., on x86, GFP_DMA
218guarantees to be within the first 16Mb of available physical memory, 223guarantees to be within the first 16MB of available bus addresses,
219as required by ISA devices). 224as required by ISA devices).
220 225
221Note also that the above constraints on physical contiguity and 226Note also that the above constraints on physical contiguity and
222dma_mask may not apply if the platform has an IOMMU (a device which 227dma_mask may not apply if the platform has an IOMMU (a device which
223supplies a physical to virtual mapping between the I/O memory bus and 228maps an I/O bus address to a physical memory address). However, to be
224the device). However, to be portable, device driver writers may *not* 229portable, device driver writers may *not* assume that such an IOMMU
225assume that such an IOMMU exists. 230exists.
226 231
227Warnings: Memory coherency operates at a granularity called the cache 232Warnings: Memory coherency operates at a granularity called the cache
228line width. In order for memory mapped by this API to operate 233line width. In order for memory mapped by this API to operate
@@ -281,9 +286,9 @@ cache width is.
281int 286int
282dma_mapping_error(struct device *dev, dma_addr_t dma_addr) 287dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
283 288
284In some circumstances dma_map_single and dma_map_page will fail to create 289In some circumstances dma_map_single() and dma_map_page() will fail to create
285a mapping. A driver can check for these errors by testing the returned 290a mapping. A driver can check for these errors by testing the returned
286dma address with dma_mapping_error(). A non-zero return value means the mapping 291DMA address with dma_mapping_error(). A non-zero return value means the mapping
287could not be created and the driver should take appropriate action (e.g. 292could not be created and the driver should take appropriate action (e.g.
288reduce current DMA mapping usage or delay and try again later). 293reduce current DMA mapping usage or delay and try again later).
289 294
@@ -291,7 +296,7 @@ reduce current DMA mapping usage or delay and try again later).
291 dma_map_sg(struct device *dev, struct scatterlist *sg, 296 dma_map_sg(struct device *dev, struct scatterlist *sg,
292 int nents, enum dma_data_direction direction) 297 int nents, enum dma_data_direction direction)
293 298
294Returns: the number of physical segments mapped (this may be shorter 299Returns: the number of bus address segments mapped (this may be shorter
295than <nents> passed in if some elements of the scatter/gather list are 300than <nents> passed in if some elements of the scatter/gather list are
296physically or virtually adjacent and an IOMMU maps them with a single 301physically or virtually adjacent and an IOMMU maps them with a single
297entry). 302entry).
@@ -299,7 +304,7 @@ entry).
299Please note that the sg cannot be mapped again if it has been mapped once. 304Please note that the sg cannot be mapped again if it has been mapped once.
300The mapping process is allowed to destroy information in the sg. 305The mapping process is allowed to destroy information in the sg.
301 306
302As with the other mapping interfaces, dma_map_sg can fail. When it 307As with the other mapping interfaces, dma_map_sg() can fail. When it
303does, 0 is returned and a driver must take appropriate action. It is 308does, 0 is returned and a driver must take appropriate action. It is
304critical that the driver do something, in the case of a block driver 309critical that the driver do something, in the case of a block driver
305aborting the request or even oopsing is better than doing nothing and 310aborting the request or even oopsing is better than doing nothing and
@@ -335,7 +340,7 @@ must be the same as those and passed in to the scatter/gather mapping
335API. 340API.
336 341
337Note: <nents> must be the number you passed in, *not* the number of 342Note: <nents> must be the number you passed in, *not* the number of
338physical entries returned. 343bus address entries returned.
339 344
340void 345void
341dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, 346dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
@@ -350,7 +355,7 @@ void
350dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, 355dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
351 enum dma_data_direction direction) 356 enum dma_data_direction direction)
352 357
353Synchronise a single contiguous or scatter/gather mapping for the cpu 358Synchronise a single contiguous or scatter/gather mapping for the CPU
354and device. With the sync_sg API, all the parameters must be the same 359and device. With the sync_sg API, all the parameters must be the same
355as those passed into the single mapping API. With the sync_single API, 360as those passed into the single mapping API. With the sync_single API,
356you can use dma_handle and size parameters that aren't identical to 361you can use dma_handle and size parameters that aren't identical to
@@ -391,10 +396,10 @@ The four functions above are just like the counterpart functions
391without the _attrs suffixes, except that they pass an optional 396without the _attrs suffixes, except that they pass an optional
392struct dma_attrs*. 397struct dma_attrs*.
393 398
394struct dma_attrs encapsulates a set of "dma attributes". For the 399struct dma_attrs encapsulates a set of "DMA attributes". For the
395definition of struct dma_attrs see linux/dma-attrs.h. 400definition of struct dma_attrs see linux/dma-attrs.h.
396 401
397The interpretation of dma attributes is architecture-specific, and 402The interpretation of DMA attributes is architecture-specific, and
398each attribute should be documented in Documentation/DMA-attributes.txt. 403each attribute should be documented in Documentation/DMA-attributes.txt.
399 404
400If struct dma_attrs* is NULL, the semantics of each of these 405If struct dma_attrs* is NULL, the semantics of each of these
@@ -458,7 +463,7 @@ Note: where the platform can return consistent memory, it will
458guarantee that the sync points become nops. 463guarantee that the sync points become nops.
459 464
460Warning: Handling non-consistent memory is a real pain. You should 465Warning: Handling non-consistent memory is a real pain. You should
461only ever use this API if you positively know your driver will be 466only use this API if you positively know your driver will be
462required to work on one of the rare (usually non-PCI) architectures 467required to work on one of the rare (usually non-PCI) architectures
463that simply cannot make consistent memory. 468that simply cannot make consistent memory.
464 469
@@ -492,30 +497,29 @@ continuing on for size. Again, you *must* observe the cache line
492boundaries when doing this. 497boundaries when doing this.
493 498
494int 499int
495dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, 500dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,
496 dma_addr_t device_addr, size_t size, int 501 dma_addr_t device_addr, size_t size, int
497 flags) 502 flags)
498 503
499Declare region of memory to be handed out by dma_alloc_coherent when 504Declare region of memory to be handed out by dma_alloc_coherent() when
500it's asked for coherent memory for this device. 505it's asked for coherent memory for this device.
501 506
502bus_addr is the physical address to which the memory is currently 507phys_addr is the CPU physical address to which the memory is currently
503assigned in the bus responding region (this will be used by the 508assigned (this will be ioremapped so the CPU can access the region).
504platform to perform the mapping).
505 509
506device_addr is the physical address the device needs to be programmed 510device_addr is the bus address the device needs to be programmed
507with actually to address this memory (this will be handed out as the 511with to actually address this memory (this will be handed out as the
508dma_addr_t in dma_alloc_coherent()). 512dma_addr_t in dma_alloc_coherent()).
509 513
510size is the size of the area (must be multiples of PAGE_SIZE). 514size is the size of the area (must be multiples of PAGE_SIZE).
511 515
512flags can be or'd together and are: 516flags can be ORed together and are:
513 517
514DMA_MEMORY_MAP - request that the memory returned from 518DMA_MEMORY_MAP - request that the memory returned from
515dma_alloc_coherent() be directly writable. 519dma_alloc_coherent() be directly writable.
516 520
517DMA_MEMORY_IO - request that the memory returned from 521DMA_MEMORY_IO - request that the memory returned from
518dma_alloc_coherent() be addressable using read/write/memcpy_toio etc. 522dma_alloc_coherent() be addressable using read()/write()/memcpy_toio() etc.
519 523
520One or both of these flags must be present. 524One or both of these flags must be present.
521 525
@@ -572,7 +576,7 @@ region is occupied.
572Part III - Debug drivers use of the DMA-API 576Part III - Debug drivers use of the DMA-API
573------------------------------------------- 577-------------------------------------------
574 578
575The DMA-API as described above as some constraints. DMA addresses must be 579The DMA-API as described above has some constraints. DMA addresses must be
576released with the corresponding function with the same size for example. With 580released with the corresponding function with the same size for example. With
577the advent of hardware IOMMUs it becomes more and more important that drivers 581the advent of hardware IOMMUs it becomes more and more important that drivers
578do not violate those constraints. In the worst case such a violation can 582do not violate those constraints. In the worst case such a violation can
@@ -690,11 +694,11 @@ architectural default.
690void debug_dmap_mapping_error(struct device *dev, dma_addr_t dma_addr); 694void debug_dmap_mapping_error(struct device *dev, dma_addr_t dma_addr);
691 695
692dma-debug interface debug_dma_mapping_error() to debug drivers that fail 696dma-debug interface debug_dma_mapping_error() to debug drivers that fail
693to check dma mapping errors on addresses returned by dma_map_single() and 697to check DMA mapping errors on addresses returned by dma_map_single() and
694dma_map_page() interfaces. This interface clears a flag set by 698dma_map_page() interfaces. This interface clears a flag set by
695debug_dma_map_page() to indicate that dma_mapping_error() has been called by 699debug_dma_map_page() to indicate that dma_mapping_error() has been called by
696the driver. When driver does unmap, debug_dma_unmap() checks the flag and if 700the driver. When driver does unmap, debug_dma_unmap() checks the flag and if
697this flag is still set, prints warning message that includes call trace that 701this flag is still set, prints warning message that includes call trace that
698leads up to the unmap. This interface can be called from dma_mapping_error() 702leads up to the unmap. This interface can be called from dma_mapping_error()
699routines to enable dma mapping error check debugging. 703routines to enable DMA mapping error check debugging.
700 704
diff --git a/Documentation/DMA-ISA-LPC.txt b/Documentation/DMA-ISA-LPC.txt
index e767805b4182..b1a19835e907 100644
--- a/Documentation/DMA-ISA-LPC.txt
+++ b/Documentation/DMA-ISA-LPC.txt
@@ -16,7 +16,7 @@ To do ISA style DMA you need to include two headers:
16#include <asm/dma.h> 16#include <asm/dma.h>
17 17
18The first is the generic DMA API used to convert virtual addresses to 18The first is the generic DMA API used to convert virtual addresses to
19physical addresses (see Documentation/DMA-API.txt for details). 19bus addresses (see Documentation/DMA-API.txt for details).
20 20
21The second contains the routines specific to ISA DMA transfers. Since 21The second contains the routines specific to ISA DMA transfers. Since
22this is not present on all platforms make sure you construct your 22this is not present on all platforms make sure you construct your
@@ -50,7 +50,7 @@ early as possible and not release it until the driver is unloaded.)
50Part III - Address translation 50Part III - Address translation
51------------------------------ 51------------------------------
52 52
53To translate the virtual address to a physical use the normal DMA 53To translate the virtual address to a bus address, use the normal DMA
54API. Do _not_ use isa_virt_to_phys() even though it does the same 54API. Do _not_ use isa_virt_to_phys() even though it does the same
55thing. The reason for this is that the function isa_virt_to_phys() 55thing. The reason for this is that the function isa_virt_to_phys()
56will require a Kconfig dependency to ISA, not just ISA_DMA_API which 56will require a Kconfig dependency to ISA, not just ISA_DMA_API which
diff --git a/Documentation/DMA-attributes.txt b/Documentation/DMA-attributes.txt
index cc2450d80310..18dc52c4f2a0 100644
--- a/Documentation/DMA-attributes.txt
+++ b/Documentation/DMA-attributes.txt
@@ -98,5 +98,5 @@ DMA_ATTR_FORCE_CONTIGUOUS
98By default DMA-mapping subsystem is allowed to assemble the buffer 98By default DMA-mapping subsystem is allowed to assemble the buffer
99allocated by dma_alloc_attrs() function from individual pages if it can 99allocated by dma_alloc_attrs() function from individual pages if it can
100be mapped as contiguous chunk into device dma address space. By 100be mapped as contiguous chunk into device dma address space. By
101specifing this attribute the allocated buffer is forced to be contiguous 101specifying this attribute the allocated buffer is forced to be contiguous
102also in physical memory. 102also in physical memory.
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl
index 044b76436e83..d9b9416c989f 100644
--- a/Documentation/DocBook/80211.tmpl
+++ b/Documentation/DocBook/80211.tmpl
@@ -100,6 +100,7 @@
100!Finclude/net/cfg80211.h wdev_priv 100!Finclude/net/cfg80211.h wdev_priv
101!Finclude/net/cfg80211.h ieee80211_iface_limit 101!Finclude/net/cfg80211.h ieee80211_iface_limit
102!Finclude/net/cfg80211.h ieee80211_iface_combination 102!Finclude/net/cfg80211.h ieee80211_iface_combination
103!Finclude/net/cfg80211.h cfg80211_check_combinations
103 </chapter> 104 </chapter>
104 <chapter> 105 <chapter>
105 <title>Actions and configuration</title> 106 <title>Actions and configuration</title>
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index b444f2e8fe32..bec06659e0eb 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -14,7 +14,8 @@ DOCBOOKS := z8530book.xml device-drivers.xml \
14 genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ 14 genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
15 80211.xml debugobjects.xml sh.xml regulator.xml \ 15 80211.xml debugobjects.xml sh.xml regulator.xml \
16 alsa-driver-api.xml writing-an-alsa-driver.xml \ 16 alsa-driver-api.xml writing-an-alsa-driver.xml \
17 tracepoint.xml drm.xml media_api.xml w1.xml 17 tracepoint.xml drm.xml media_api.xml w1.xml \
18 writing_musb_glue_layer.xml
18 19
19include Documentation/DocBook/media/Makefile 20include Documentation/DocBook/media/Makefile
20 21
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl
index 677a02553ec0..7df3134ebc0e 100644
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/drm.tmpl
@@ -79,7 +79,7 @@
79 <partintro> 79 <partintro>
80 <para> 80 <para>
81 This first part of the DRM Developer's Guide documents core DRM code, 81 This first part of the DRM Developer's Guide documents core DRM code,
82 helper libraries for writting drivers and generic userspace interfaces 82 helper libraries for writing drivers and generic userspace interfaces
83 exposed by DRM drivers. 83 exposed by DRM drivers.
84 </para> 84 </para>
85 </partintro> 85 </partintro>
@@ -142,6 +142,12 @@
142 to register it with the DRM subsystem. 142 to register it with the DRM subsystem.
143 </para> 143 </para>
144 <para> 144 <para>
145 Newer drivers that no longer require a <structname>drm_bus</structname>
146 structure can alternatively use the low-level device initialization and
147 registration functions such as <function>drm_dev_alloc()</function> and
148 <function>drm_dev_register()</function> directly.
149 </para>
150 <para>
145 The <structname>drm_driver</structname> structure contains static 151 The <structname>drm_driver</structname> structure contains static
146 information that describes the driver and features it supports, and 152 information that describes the driver and features it supports, and
147 pointers to methods that the DRM core will call to implement the DRM API. 153 pointers to methods that the DRM core will call to implement the DRM API.
@@ -282,6 +288,36 @@ char *date;</synopsis>
282 </sect3> 288 </sect3>
283 </sect2> 289 </sect2>
284 <sect2> 290 <sect2>
291 <title>Device Registration</title>
292 <para>
293 A number of functions are provided to help with device registration.
294 The functions deal with PCI, USB and platform devices, respectively.
295 </para>
296!Edrivers/gpu/drm/drm_pci.c
297!Edrivers/gpu/drm/drm_usb.c
298!Edrivers/gpu/drm/drm_platform.c
299 <para>
300 New drivers that no longer rely on the services provided by the
301 <structname>drm_bus</structname> structure can call the low-level
302 device registration functions directly. The
303 <function>drm_dev_alloc()</function> function can be used to allocate
304 and initialize a new <structname>drm_device</structname> structure.
305 Drivers will typically want to perform some additional setup on this
306 structure, such as allocating driver-specific data and storing a
307 pointer to it in the DRM device's <structfield>dev_private</structfield>
308 field. Drivers should also set the device's unique name using the
309 <function>drm_dev_set_unique()</function> function. After it has been
310 set up a device can be registered with the DRM subsystem by calling
311 <function>drm_dev_register()</function>. This will cause the device to
312 be exposed to userspace and will call the driver's
313 <structfield>.load()</structfield> implementation. When a device is
314 removed, the DRM device can safely be unregistered and freed by calling
315 <function>drm_dev_unregister()</function> followed by a call to
316 <function>drm_dev_unref()</function>.
317 </para>
318!Edrivers/gpu/drm/drm_stub.c
319 </sect2>
320 <sect2>
285 <title>Driver Load</title> 321 <title>Driver Load</title>
286 <para> 322 <para>
287 The <methodname>load</methodname> method is the driver and device 323 The <methodname>load</methodname> method is the driver and device
@@ -342,21 +378,13 @@ char *date;</synopsis>
342 <sect4> 378 <sect4>
343 <title>Managed IRQ Registration</title> 379 <title>Managed IRQ Registration</title>
344 <para> 380 <para>
345 Both the <function>drm_irq_install</function> and
346 <function>drm_irq_uninstall</function> functions get the device IRQ by
347 calling <function>drm_dev_to_irq</function>. This inline function will
348 call a bus-specific operation to retrieve the IRQ number. For platform
349 devices, <function>platform_get_irq</function>(..., 0) is used to
350 retrieve the IRQ number.
351 </para>
352 <para>
353 <function>drm_irq_install</function> starts by calling the 381 <function>drm_irq_install</function> starts by calling the
354 <methodname>irq_preinstall</methodname> driver operation. The operation 382 <methodname>irq_preinstall</methodname> driver operation. The operation
355 is optional and must make sure that the interrupt will not get fired by 383 is optional and must make sure that the interrupt will not get fired by
356 clearing all pending interrupt flags or disabling the interrupt. 384 clearing all pending interrupt flags or disabling the interrupt.
357 </para> 385 </para>
358 <para> 386 <para>
359 The IRQ will then be requested by a call to 387 The passed-in IRQ will then be requested by a call to
360 <function>request_irq</function>. If the DRIVER_IRQ_SHARED driver 388 <function>request_irq</function>. If the DRIVER_IRQ_SHARED driver
361 feature flag is set, a shared (IRQF_SHARED) IRQ handler will be 389 feature flag is set, a shared (IRQF_SHARED) IRQ handler will be
362 requested. 390 requested.
@@ -459,7 +487,7 @@ char *date;</synopsis>
459 providing a solution to every graphics memory-related problems, GEM 487 providing a solution to every graphics memory-related problems, GEM
460 identified common code between drivers and created a support library to 488 identified common code between drivers and created a support library to
461 share it. GEM has simpler initialization and execution requirements than 489 share it. GEM has simpler initialization and execution requirements than
462 TTM, but has no video RAM management capabitilies and is thus limited to 490 TTM, but has no video RAM management capabilities and is thus limited to
463 UMA devices. 491 UMA devices.
464 </para> 492 </para>
465 <sect2> 493 <sect2>
@@ -889,7 +917,7 @@ int (*prime_fd_to_handle)(struct drm_device *dev,
889 vice versa. Drivers must use the kernel dma-buf buffer sharing framework 917 vice versa. Drivers must use the kernel dma-buf buffer sharing framework
890 to manage the PRIME file descriptors. Similar to the mode setting 918 to manage the PRIME file descriptors. Similar to the mode setting
891 API PRIME is agnostic to the underlying buffer object manager, as 919 API PRIME is agnostic to the underlying buffer object manager, as
892 long as handles are 32bit unsinged integers. 920 long as handles are 32bit unsigned integers.
893 </para> 921 </para>
894 <para> 922 <para>
895 While non-GEM drivers must implement the operations themselves, GEM 923 While non-GEM drivers must implement the operations themselves, GEM
@@ -1799,6 +1827,12 @@ void intel_crt_init(struct drm_device *dev)
1799 <title>KMS API Functions</title> 1827 <title>KMS API Functions</title>
1800!Edrivers/gpu/drm/drm_crtc.c 1828!Edrivers/gpu/drm/drm_crtc.c
1801 </sect2> 1829 </sect2>
1830 <sect2>
1831 <title>KMS Locking</title>
1832!Pdrivers/gpu/drm/drm_modeset_lock.c kms locking
1833!Iinclude/drm/drm_modeset_lock.h
1834!Edrivers/gpu/drm/drm_modeset_lock.c
1835 </sect2>
1802 </sect1> 1836 </sect1>
1803 1837
1804 <!-- Internals: kms helper functions --> 1838 <!-- Internals: kms helper functions -->
@@ -1903,8 +1937,8 @@ void intel_crt_init(struct drm_device *dev)
1903 <para> 1937 <para>
1904 The function filters out modes larger than 1938 The function filters out modes larger than
1905 <parameter>max_width</parameter> and <parameter>max_height</parameter> 1939 <parameter>max_width</parameter> and <parameter>max_height</parameter>
1906 if specified. It then calls the connector 1940 if specified. It then calls the optional connector
1907 <methodname>mode_valid</methodname> helper operation for each mode in 1941 <methodname>mode_valid</methodname> helper operation for each mode in
1908 the probed list to check whether the mode is valid for the connector. 1942 the probed list to check whether the mode is valid for the connector.
1909 </para> 1943 </para>
1910 </listitem> 1944 </listitem>
@@ -2265,7 +2299,7 @@ void intel_crt_init(struct drm_device *dev)
2265 <para> 2299 <para>
2266 Verify whether a mode is valid for the connector. Return MODE_OK for 2300 Verify whether a mode is valid for the connector. Return MODE_OK for
2267 supported modes and one of the enum drm_mode_status values (MODE_*) 2301 supported modes and one of the enum drm_mode_status values (MODE_*)
2268 for unsupported modes. This operation is mandatory. 2302 for unsupported modes. This operation is optional.
2269 </para> 2303 </para>
2270 <para> 2304 <para>
2271 As the mode rejection reason is currently not used beside for 2305 As the mode rejection reason is currently not used beside for
@@ -2356,7 +2390,7 @@ void intel_crt_init(struct drm_device *dev)
2356 first create properties and then create and associate individual instances 2390 first create properties and then create and associate individual instances
2357 of those properties to objects. A property can be instantiated multiple 2391 of those properties to objects. A property can be instantiated multiple
2358 times and associated with different objects. Values are stored in property 2392 times and associated with different objects. Values are stored in property
2359 instances, and all other property information are stored in the propery 2393 instances, and all other property information are stored in the property
2360 and shared between all instances of the property. 2394 and shared between all instances of the property.
2361 </para> 2395 </para>
2362 <para> 2396 <para>
@@ -2450,6 +2484,863 @@ void intel_crt_init(struct drm_device *dev)
2450 pointer to the target object, a pointer to the previously created property 2484 pointer to the target object, a pointer to the previously created property
2451 and an initial instance value. 2485 and an initial instance value.
2452 </para> 2486 </para>
2487 <sect2>
2488 <title>Existing KMS Properties</title>
2489 <para>
2490 The following table gives description of drm properties exposed by various
2491 modules/drivers.
2492 </para>
2493 <table border="1" cellpadding="0" cellspacing="0">
2494 <tbody>
2495 <tr style="font-weight: bold;">
2496 <td valign="top" >Owner Module/Drivers</td>
2497 <td valign="top" >Group</td>
2498 <td valign="top" >Property Name</td>
2499 <td valign="top" >Type</td>
2500 <td valign="top" >Property Values</td>
2501 <td valign="top" >Object attached</td>
2502 <td valign="top" >Description/Restrictions</td>
2503 </tr>
2504 <tr>
2505 <td rowspan="20" valign="top" >DRM</td>
2506 <td rowspan="2" valign="top" >Generic</td>
2507 <td valign="top" >“EDIDâ€</td>
2508 <td valign="top" >BLOB | IMMUTABLE</td>
2509 <td valign="top" >0</td>
2510 <td valign="top" >Connector</td>
2511 <td valign="top" >Contains id of edid blob ptr object.</td>
2512 </tr>
2513 <tr>
2514 <td valign="top" >“DPMSâ€</td>
2515 <td valign="top" >ENUM</td>
2516 <td valign="top" >{ “Onâ€, “Standbyâ€, “Suspendâ€, “Off†}</td>
2517 <td valign="top" >Connector</td>
2518 <td valign="top" >Contains DPMS operation mode value.</td>
2519 </tr>
2520 <tr>
2521 <td rowspan="1" valign="top" >Plane</td>
2522 <td valign="top" >“typeâ€</td>
2523 <td valign="top" >ENUM | IMMUTABLE</td>
2524 <td valign="top" >{ "Overlay", "Primary", "Cursor" }</td>
2525 <td valign="top" >Plane</td>
2526 <td valign="top" >Plane type</td>
2527 </tr>
2528 <tr>
2529 <td rowspan="2" valign="top" >DVI-I</td>
2530 <td valign="top" >“subconnectorâ€</td>
2531 <td valign="top" >ENUM</td>
2532 <td valign="top" >{ “Unknownâ€, “DVI-Dâ€, “DVI-A†}</td>
2533 <td valign="top" >Connector</td>
2534 <td valign="top" >TBD</td>
2535 </tr>
2536 <tr>
2537 <td valign="top" >“select subconnectorâ€</td>
2538 <td valign="top" >ENUM</td>
2539 <td valign="top" >{ “Automaticâ€, “DVI-Dâ€, “DVI-A†}</td>
2540 <td valign="top" >Connector</td>
2541 <td valign="top" >TBD</td>
2542 </tr>
2543 <tr>
2544 <td rowspan="13" valign="top" >TV</td>
2545 <td valign="top" >“subconnectorâ€</td>
2546 <td valign="top" >ENUM</td>
2547 <td valign="top" >{ "Unknown", "Composite", "SVIDEO", "Component", "SCART" }</td>
2548 <td valign="top" >Connector</td>
2549 <td valign="top" >TBD</td>
2550 </tr>
2551 <tr>
2552 <td valign="top" >“select subconnectorâ€</td>
2553 <td valign="top" >ENUM</td>
2554 <td valign="top" >{ "Automatic", "Composite", "SVIDEO", "Component", "SCART" }</td>
2555 <td valign="top" >Connector</td>
2556 <td valign="top" >TBD</td>
2557 </tr>
2558 <tr>
2559 <td valign="top" >“modeâ€</td>
2560 <td valign="top" >ENUM</td>
2561 <td valign="top" >{ "NTSC_M", "NTSC_J", "NTSC_443", "PAL_B" } etc.</td>
2562 <td valign="top" >Connector</td>
2563 <td valign="top" >TBD</td>
2564 </tr>
2565 <tr>
2566 <td valign="top" >“left marginâ€</td>
2567 <td valign="top" >RANGE</td>
2568 <td valign="top" >Min=0, Max=100</td>
2569 <td valign="top" >Connector</td>
2570 <td valign="top" >TBD</td>
2571 </tr>
2572 <tr>
2573 <td valign="top" >“right marginâ€</td>
2574 <td valign="top" >RANGE</td>
2575 <td valign="top" >Min=0, Max=100</td>
2576 <td valign="top" >Connector</td>
2577 <td valign="top" >TBD</td>
2578 </tr>
2579 <tr>
2580 <td valign="top" >“top marginâ€</td>
2581 <td valign="top" >RANGE</td>
2582 <td valign="top" >Min=0, Max=100</td>
2583 <td valign="top" >Connector</td>
2584 <td valign="top" >TBD</td>
2585 </tr>
2586 <tr>
2587 <td valign="top" >“bottom marginâ€</td>
2588 <td valign="top" >RANGE</td>
2589 <td valign="top" >Min=0, Max=100</td>
2590 <td valign="top" >Connector</td>
2591 <td valign="top" >TBD</td>
2592 </tr>
2593 <tr>
2594 <td valign="top" >“brightnessâ€</td>
2595 <td valign="top" >RANGE</td>
2596 <td valign="top" >Min=0, Max=100</td>
2597 <td valign="top" >Connector</td>
2598 <td valign="top" >TBD</td>
2599 </tr>
2600 <tr>
2601 <td valign="top" >“contrastâ€</td>
2602 <td valign="top" >RANGE</td>
2603 <td valign="top" >Min=0, Max=100</td>
2604 <td valign="top" >Connector</td>
2605 <td valign="top" >TBD</td>
2606 </tr>
2607 <tr>
2608 <td valign="top" >“flicker reductionâ€</td>
2609 <td valign="top" >RANGE</td>
2610 <td valign="top" >Min=0, Max=100</td>
2611 <td valign="top" >Connector</td>
2612 <td valign="top" >TBD</td>
2613 </tr>
2614 <tr>
2615 <td valign="top" >“overscanâ€</td>
2616 <td valign="top" >RANGE</td>
2617 <td valign="top" >Min=0, Max=100</td>
2618 <td valign="top" >Connector</td>
2619 <td valign="top" >TBD</td>
2620 </tr>
2621 <tr>
2622 <td valign="top" >“saturationâ€</td>
2623 <td valign="top" >RANGE</td>
2624 <td valign="top" >Min=0, Max=100</td>
2625 <td valign="top" >Connector</td>
2626 <td valign="top" >TBD</td>
2627 </tr>
2628 <tr>
2629 <td valign="top" >“hueâ€</td>
2630 <td valign="top" >RANGE</td>
2631 <td valign="top" >Min=0, Max=100</td>
2632 <td valign="top" >Connector</td>
2633 <td valign="top" >TBD</td>
2634 </tr>
2635 <tr>
2636 <td rowspan="2" valign="top" >Optional</td>
2637 <td valign="top" >“scaling modeâ€</td>
2638 <td valign="top" >ENUM</td>
2639 <td valign="top" >{ "None", "Full", "Center", "Full aspect" }</td>
2640 <td valign="top" >Connector</td>
2641 <td valign="top" >TBD</td>
2642 </tr>
2643 <tr>
2644 <td valign="top" >“dirtyâ€</td>
2645 <td valign="top" >ENUM | IMMUTABLE</td>
2646 <td valign="top" >{ "Off", "On", "Annotate" }</td>
2647 <td valign="top" >Connector</td>
2648 <td valign="top" >TBD</td>
2649 </tr>
2650 <tr>
2651 <td rowspan="21" valign="top" >i915</td>
2652 <td rowspan="3" valign="top" >Generic</td>
2653 <td valign="top" >"Broadcast RGB"</td>
2654 <td valign="top" >ENUM</td>
2655 <td valign="top" >{ "Automatic", "Full", "Limited 16:235" }</td>
2656 <td valign="top" >Connector</td>
2657 <td valign="top" >TBD</td>
2658 </tr>
2659 <tr>
2660 <td valign="top" >“audioâ€</td>
2661 <td valign="top" >ENUM</td>
2662 <td valign="top" >{ "force-dvi", "off", "auto", "on" }</td>
2663 <td valign="top" >Connector</td>
2664 <td valign="top" >TBD</td>
2665 </tr>
2666 <tr>
2667 <td valign="top" >Standard name as in DRM</td>
2668 <td valign="top" >Standard type as in DRM</td>
2669 <td valign="top" >Standard value as in DRM</td>
2670 <td valign="top" >Standard Object as in DRM</td>
2671 <td valign="top" >TBD</td>
2672 </tr>
2673 <tr>
2674 <td rowspan="17" valign="top" >SDVO-TV</td>
2675 <td valign="top" >“modeâ€</td>
2676 <td valign="top" >ENUM</td>
2677 <td valign="top" >{ "NTSC_M", "NTSC_J", "NTSC_443", "PAL_B" } etc.</td>
2678 <td valign="top" >Connector</td>
2679 <td valign="top" >TBD</td>
2680 </tr>
2681 <tr>
2682 <td valign="top" >"left_margin"</td>
2683 <td valign="top" >RANGE</td>
2684 <td valign="top" >Min=0, Max= SDVO dependent</td>
2685 <td valign="top" >Connector</td>
2686 <td valign="top" >TBD</td>
2687 </tr>
2688 <tr>
2689 <td valign="top" >"right_margin"</td>
2690 <td valign="top" >RANGE</td>
2691 <td valign="top" >Min=0, Max= SDVO dependent</td>
2692 <td valign="top" >Connector</td>
2693 <td valign="top" >TBD</td>
2694 </tr>
2695 <tr>
2696 <td valign="top" >"top_margin"</td>
2697 <td valign="top" >RANGE</td>
2698 <td valign="top" >Min=0, Max= SDVO dependent</td>
2699 <td valign="top" >Connector</td>
2700 <td valign="top" >TBD</td>
2701 </tr>
2702 <tr>
2703 <td valign="top" >"bottom_margin"</td>
2704 <td valign="top" >RANGE</td>
2705 <td valign="top" >Min=0, Max= SDVO dependent</td>
2706 <td valign="top" >Connector</td>
2707 <td valign="top" >TBD</td>
2708 </tr>
2709 <tr>
2710 <td valign="top" >“hposâ€</td>
2711 <td valign="top" >RANGE</td>
2712 <td valign="top" >Min=0, Max= SDVO dependent</td>
2713 <td valign="top" >Connector</td>
2714 <td valign="top" >TBD</td>
2715 </tr>
2716 <tr>
2717 <td valign="top" >“vposâ€</td>
2718 <td valign="top" >RANGE</td>
2719 <td valign="top" >Min=0, Max= SDVO dependent</td>
2720 <td valign="top" >Connector</td>
2721 <td valign="top" >TBD</td>
2722 </tr>
2723 <tr>
2724 <td valign="top" >“contrastâ€</td>
2725 <td valign="top" >RANGE</td>
2726 <td valign="top" >Min=0, Max= SDVO dependent</td>
2727 <td valign="top" >Connector</td>
2728 <td valign="top" >TBD</td>
2729 </tr>
2730 <tr>
2731 <td valign="top" >“saturationâ€</td>
2732 <td valign="top" >RANGE</td>
2733 <td valign="top" >Min=0, Max= SDVO dependent</td>
2734 <td valign="top" >Connector</td>
2735 <td valign="top" >TBD</td>
2736 </tr>
2737 <tr>
2738 <td valign="top" >“hueâ€</td>
2739 <td valign="top" >RANGE</td>
2740 <td valign="top" >Min=0, Max= SDVO dependent</td>
2741 <td valign="top" >Connector</td>
2742 <td valign="top" >TBD</td>
2743 </tr>
2744 <tr>
2745 <td valign="top" >“sharpnessâ€</td>
2746 <td valign="top" >RANGE</td>
2747 <td valign="top" >Min=0, Max= SDVO dependent</td>
2748 <td valign="top" >Connector</td>
2749 <td valign="top" >TBD</td>
2750 </tr>
2751 <tr>
2752 <td valign="top" >“flicker_filterâ€</td>
2753 <td valign="top" >RANGE</td>
2754 <td valign="top" >Min=0, Max= SDVO dependent</td>
2755 <td valign="top" >Connector</td>
2756 <td valign="top" >TBD</td>
2757 </tr>
2758 <tr>
2759 <td valign="top" >“flicker_filter_adaptiveâ€</td>
2760 <td valign="top" >RANGE</td>
2761 <td valign="top" >Min=0, Max= SDVO dependent</td>
2762 <td valign="top" >Connector</td>
2763 <td valign="top" >TBD</td>
2764 </tr>
2765 <tr>
2766 <td valign="top" >“flicker_filter_2dâ€</td>
2767 <td valign="top" >RANGE</td>
2768 <td valign="top" >Min=0, Max= SDVO dependent</td>
2769 <td valign="top" >Connector</td>
2770 <td valign="top" >TBD</td>
2771 </tr>
2772 <tr>
2773 <td valign="top" >“tv_chroma_filterâ€</td>
2774 <td valign="top" >RANGE</td>
2775 <td valign="top" >Min=0, Max= SDVO dependent</td>
2776 <td valign="top" >Connector</td>
2777 <td valign="top" >TBD</td>
2778 </tr>
2779 <tr>
2780 <td valign="top" >“tv_luma_filterâ€</td>
2781 <td valign="top" >RANGE</td>
2782 <td valign="top" >Min=0, Max= SDVO dependent</td>
2783 <td valign="top" >Connector</td>
2784 <td valign="top" >TBD</td>
2785 </tr>
2786 <tr>
2787 <td valign="top" >“dot_crawlâ€</td>
2788 <td valign="top" >RANGE</td>
2789 <td valign="top" >Min=0, Max=1</td>
2790 <td valign="top" >Connector</td>
2791 <td valign="top" >TBD</td>
2792 </tr>
2793 <tr>
2794 <td valign="top" >SDVO-TV/LVDS</td>
2795 <td valign="top" >“brightnessâ€</td>
2796 <td valign="top" >RANGE</td>
2797 <td valign="top" >Min=0, Max= SDVO dependent</td>
2798 <td valign="top" >Connector</td>
2799 <td valign="top" >TBD</td>
2800 </tr>
2801 <tr>
2802 <td rowspan="3" valign="top" >CDV gma-500</td>
2803 <td rowspan="3" valign="top" >Generic</td>
2804 <td valign="top" >"Broadcast RGB"</td>
2805 <td valign="top" >ENUM</td>
2806 <td valign="top" >{ “Fullâ€, “Limited 16:235†}</td>
2807 <td valign="top" >Connector</td>
2808 <td valign="top" >TBD</td>
2809 </tr>
2810 <tr>
2811 <td valign="top" >"Broadcast RGB"</td>
2812 <td valign="top" >ENUM</td>
2813 <td valign="top" >{ “offâ€, “autoâ€, “on†}</td>
2814 <td valign="top" >Connector</td>
2815 <td valign="top" >TBD</td>
2816 </tr>
2817 <tr>
2818 <td valign="top" >Standard name as in DRM</td>
2819 <td valign="top" >Standard type as in DRM</td>
2820 <td valign="top" >Standard value as in DRM</td>
2821 <td valign="top" >Standard Object as in DRM</td>
2822 <td valign="top" >TBD</td>
2823 </tr>
2824 <tr>
2825 <td rowspan="20" valign="top" >Poulsbo</td>
2826 <td rowspan="2" valign="top" >Generic</td>
2827 <td valign="top" >“backlightâ€</td>
2828 <td valign="top" >RANGE</td>
2829 <td valign="top" >Min=0, Max=100</td>
2830 <td valign="top" >Connector</td>
2831 <td valign="top" >TBD</td>
2832 </tr>
2833 <tr>
2834 <td valign="top" >Standard name as in DRM</td>
2835 <td valign="top" >Standard type as in DRM</td>
2836 <td valign="top" >Standard value as in DRM</td>
2837 <td valign="top" >Standard Object as in DRM</td>
2838 <td valign="top" >TBD</td>
2839 </tr>
2840 <tr>
2841 <td rowspan="17" valign="top" >SDVO-TV</td>
2842 <td valign="top" >“modeâ€</td>
2843 <td valign="top" >ENUM</td>
2844 <td valign="top" >{ "NTSC_M", "NTSC_J", "NTSC_443", "PAL_B" } etc.</td>
2845 <td valign="top" >Connector</td>
2846 <td valign="top" >TBD</td>
2847 </tr>
2848 <tr>
2849 <td valign="top" >"left_margin"</td>
2850 <td valign="top" >RANGE</td>
2851 <td valign="top" >Min=0, Max= SDVO dependent</td>
2852 <td valign="top" >Connector</td>
2853 <td valign="top" >TBD</td>
2854 </tr>
2855 <tr>
2856 <td valign="top" >"right_margin"</td>
2857 <td valign="top" >RANGE</td>
2858 <td valign="top" >Min=0, Max= SDVO dependent</td>
2859 <td valign="top" >Connector</td>
2860 <td valign="top" >TBD</td>
2861 </tr>
2862 <tr>
2863 <td valign="top" >"top_margin"</td>
2864 <td valign="top" >RANGE</td>
2865 <td valign="top" >Min=0, Max= SDVO dependent</td>
2866 <td valign="top" >Connector</td>
2867 <td valign="top" >TBD</td>
2868 </tr>
2869 <tr>
2870 <td valign="top" >"bottom_margin"</td>
2871 <td valign="top" >RANGE</td>
2872 <td valign="top" >Min=0, Max= SDVO dependent</td>
2873 <td valign="top" >Connector</td>
2874 <td valign="top" >TBD</td>
2875 </tr>
2876 <tr>
2877 <td valign="top" >“hposâ€</td>
2878 <td valign="top" >RANGE</td>
2879 <td valign="top" >Min=0, Max= SDVO dependent</td>
2880 <td valign="top" >Connector</td>
2881 <td valign="top" >TBD</td>
2882 </tr>
2883 <tr>
2884 <td valign="top" >“vposâ€</td>
2885 <td valign="top" >RANGE</td>
2886 <td valign="top" >Min=0, Max= SDVO dependent</td>
2887 <td valign="top" >Connector</td>
2888 <td valign="top" >TBD</td>
2889 </tr>
2890 <tr>
2891 <td valign="top" >“contrastâ€</td>
2892 <td valign="top" >RANGE</td>
2893 <td valign="top" >Min=0, Max= SDVO dependent</td>
2894 <td valign="top" >Connector</td>
2895 <td valign="top" >TBD</td>
2896 </tr>
2897 <tr>
2898 <td valign="top" >“saturationâ€</td>
2899 <td valign="top" >RANGE</td>
2900 <td valign="top" >Min=0, Max= SDVO dependent</td>
2901 <td valign="top" >Connector</td>
2902 <td valign="top" >TBD</td>
2903 </tr>
2904 <tr>
2905 <td valign="top" >“hueâ€</td>
2906 <td valign="top" >RANGE</td>
2907 <td valign="top" >Min=0, Max= SDVO dependent</td>
2908 <td valign="top" >Connector</td>
2909 <td valign="top" >TBD</td>
2910 </tr>
2911 <tr>
2912 <td valign="top" >“sharpnessâ€</td>
2913 <td valign="top" >RANGE</td>
2914 <td valign="top" >Min=0, Max= SDVO dependent</td>
2915 <td valign="top" >Connector</td>
2916 <td valign="top" >TBD</td>
2917 </tr>
2918 <tr>
2919 <td valign="top" >“flicker_filterâ€</td>
2920 <td valign="top" >RANGE</td>
2921 <td valign="top" >Min=0, Max= SDVO dependent</td>
2922 <td valign="top" >Connector</td>
2923 <td valign="top" >TBD</td>
2924 </tr>
2925 <tr>
2926 <td valign="top" >“flicker_filter_adaptiveâ€</td>
2927 <td valign="top" >RANGE</td>
2928 <td valign="top" >Min=0, Max= SDVO dependent</td>
2929 <td valign="top" >Connector</td>
2930 <td valign="top" >TBD</td>
2931 </tr>
2932 <tr>
2933 <td valign="top" >“flicker_filter_2dâ€</td>
2934 <td valign="top" >RANGE</td>
2935 <td valign="top" >Min=0, Max= SDVO dependent</td>
2936 <td valign="top" >Connector</td>
2937 <td valign="top" >TBD</td>
2938 </tr>
2939 <tr>
2940 <td valign="top" >“tv_chroma_filterâ€</td>
2941 <td valign="top" >RANGE</td>
2942 <td valign="top" >Min=0, Max= SDVO dependent</td>
2943 <td valign="top" >Connector</td>
2944 <td valign="top" >TBD</td>
2945 </tr>
2946 <tr>
2947 <td valign="top" >“tv_luma_filterâ€</td>
2948 <td valign="top" >RANGE</td>
2949 <td valign="top" >Min=0, Max= SDVO dependent</td>
2950 <td valign="top" >Connector</td>
2951 <td valign="top" >TBD</td>
2952 </tr>
2953 <tr>
2954 <td valign="top" >“dot_crawlâ€</td>
2955 <td valign="top" >RANGE</td>
2956 <td valign="top" >Min=0, Max=1</td>
2957 <td valign="top" >Connector</td>
2958 <td valign="top" >TBD</td>
2959 </tr>
2960 <tr>
2961 <td valign="top" >SDVO-TV/LVDS</td>
2962 <td valign="top" >“brightnessâ€</td>
2963 <td valign="top" >RANGE</td>
2964 <td valign="top" >Min=0, Max= SDVO dependent</td>
2965 <td valign="top" >Connector</td>
2966 <td valign="top" >TBD</td>
2967 </tr>
2968 <tr>
2969 <td rowspan="11" valign="top" >armada</td>
2970 <td rowspan="2" valign="top" >CRTC</td>
2971 <td valign="top" >"CSC_YUV"</td>
2972 <td valign="top" >ENUM</td>
2973 <td valign="top" >{ "Auto" , "CCIR601", "CCIR709" }</td>
2974 <td valign="top" >CRTC</td>
2975 <td valign="top" >TBD</td>
2976 </tr>
2977 <tr>
2978 <td valign="top" >"CSC_RGB"</td>
2979 <td valign="top" >ENUM</td>
2980 <td valign="top" >{ "Auto", "Computer system", "Studio" }</td>
2981 <td valign="top" >CRTC</td>
2982 <td valign="top" >TBD</td>
2983 </tr>
2984 <tr>
2985 <td rowspan="9" valign="top" >Overlay</td>
2986 <td valign="top" >"colorkey"</td>
2987 <td valign="top" >RANGE</td>
2988 <td valign="top" >Min=0, Max=0xffffff</td>
2989 <td valign="top" >Plane</td>
2990 <td valign="top" >TBD</td>
2991 </tr>
2992 <tr>
2993 <td valign="top" >"colorkey_min"</td>
2994 <td valign="top" >RANGE</td>
2995 <td valign="top" >Min=0, Max=0xffffff</td>
2996 <td valign="top" >Plane</td>
2997 <td valign="top" >TBD</td>
2998 </tr>
2999 <tr>
3000 <td valign="top" >"colorkey_max"</td>
3001 <td valign="top" >RANGE</td>
3002 <td valign="top" >Min=0, Max=0xffffff</td>
3003 <td valign="top" >Plane</td>
3004 <td valign="top" >TBD</td>
3005 </tr>
3006 <tr>
3007 <td valign="top" >"colorkey_val"</td>
3008 <td valign="top" >RANGE</td>
3009 <td valign="top" >Min=0, Max=0xffffff</td>
3010 <td valign="top" >Plane</td>
3011 <td valign="top" >TBD</td>
3012 </tr>
3013 <tr>
3014 <td valign="top" >"colorkey_alpha"</td>
3015 <td valign="top" >RANGE</td>
3016 <td valign="top" >Min=0, Max=0xffffff</td>
3017 <td valign="top" >Plane</td>
3018 <td valign="top" >TBD</td>
3019 </tr>
3020 <tr>
3021 <td valign="top" >"colorkey_mode"</td>
3022 <td valign="top" >ENUM</td>
3023 <td valign="top" >{ "disabled", "Y component", "U component"
3024 , "V component", "RGB", “R component", "G component", "B component" }</td>
3025 <td valign="top" >Plane</td>
3026 <td valign="top" >TBD</td>
3027 </tr>
3028 <tr>
3029 <td valign="top" >"brightness"</td>
3030 <td valign="top" >RANGE</td>
3031 <td valign="top" >Min=0, Max=256 + 255</td>
3032 <td valign="top" >Plane</td>
3033 <td valign="top" >TBD</td>
3034 </tr>
3035 <tr>
3036 <td valign="top" >"contrast"</td>
3037 <td valign="top" >RANGE</td>
3038 <td valign="top" >Min=0, Max=0x7fff</td>
3039 <td valign="top" >Plane</td>
3040 <td valign="top" >TBD</td>
3041 </tr>
3042 <tr>
3043 <td valign="top" >"saturation"</td>
3044 <td valign="top" >RANGE</td>
3045 <td valign="top" >Min=0, Max=0x7fff</td>
3046 <td valign="top" >Plane</td>
3047 <td valign="top" >TBD</td>
3048 </tr>
3049 <tr>
3050 <td rowspan="2" valign="top" >exynos</td>
3051 <td valign="top" >CRTC</td>
3052 <td valign="top" >“modeâ€</td>
3053 <td valign="top" >ENUM</td>
3054 <td valign="top" >{ "normal", "blank" }</td>
3055 <td valign="top" >CRTC</td>
3056 <td valign="top" >TBD</td>
3057 </tr>
3058 <tr>
3059 <td valign="top" >Overlay</td>
3060 <td valign="top" >“zposâ€</td>
3061 <td valign="top" >RANGE</td>
3062 <td valign="top" >Min=0, Max=MAX_PLANE-1</td>
3063 <td valign="top" >Plane</td>
3064 <td valign="top" >TBD</td>
3065 </tr>
3066 <tr>
3067 <td rowspan="3" valign="top" >i2c/ch7006_drv</td>
3068 <td valign="top" >Generic</td>
3069 <td valign="top" >“scaleâ€</td>
3070 <td valign="top" >RANGE</td>
3071 <td valign="top" >Min=0, Max=2</td>
3072 <td valign="top" >Connector</td>
3073 <td valign="top" >TBD</td>
3074 </tr>
3075 <tr>
3076 <td rowspan="2" valign="top" >TV</td>
3077 <td valign="top" >Standard names as in DRM</td>
3078 <td valign="top" >Standard types as in DRM</td>
3079 <td valign="top" >Standard Values as in DRM</td>
3080 <td valign="top" >Standard object as in DRM</td>
3081 <td valign="top" >TBD</td>
3082 </tr>
3083 <tr>
3084 <td valign="top" >“modeâ€</td>
3085 <td valign="top" >ENUM</td>
3086 <td valign="top" >{ "PAL", "PAL-M","PAL-N"}, â€PAL-Nc"
3087 , "PAL-60", "NTSC-M", "NTSC-J" }</td>
3088 <td valign="top" >Connector</td>
3089 <td valign="top" >TBD</td>
3090 </tr>
3091 <tr>
3092 <td rowspan="16" valign="top" >nouveau</td>
3093 <td rowspan="6" valign="top" >NV10 Overlay</td>
3094 <td valign="top" >"colorkey"</td>
3095 <td valign="top" >RANGE</td>
3096 <td valign="top" >Min=0, Max=0x01ffffff</td>
3097 <td valign="top" >Plane</td>
3098 <td valign="top" >TBD</td>
3099 </tr>
3100 <tr>
3101 <td valign="top" >“contrastâ€</td>
3102 <td valign="top" >RANGE</td>
3103 <td valign="top" >Min=0, Max=8192-1</td>
3104 <td valign="top" >Plane</td>
3105 <td valign="top" >TBD</td>
3106 </tr>
3107 <tr>
3108 <td valign="top" >“brightnessâ€</td>
3109 <td valign="top" >RANGE</td>
3110 <td valign="top" >Min=0, Max=1024</td>
3111 <td valign="top" >Plane</td>
3112 <td valign="top" >TBD</td>
3113 </tr>
3114 <tr>
3115 <td valign="top" >“hueâ€</td>
3116 <td valign="top" >RANGE</td>
3117 <td valign="top" >Min=0, Max=359</td>
3118 <td valign="top" >Plane</td>
3119 <td valign="top" >TBD</td>
3120 </tr>
3121 <tr>
3122 <td valign="top" >“saturationâ€</td>
3123 <td valign="top" >RANGE</td>
3124 <td valign="top" >Min=0, Max=8192-1</td>
3125 <td valign="top" >Plane</td>
3126 <td valign="top" >TBD</td>
3127 </tr>
3128 <tr>
3129 <td valign="top" >“iturbt_709â€</td>
3130 <td valign="top" >RANGE</td>
3131 <td valign="top" >Min=0, Max=1</td>
3132 <td valign="top" >Plane</td>
3133 <td valign="top" >TBD</td>
3134 </tr>
3135 <tr>
3136 <td rowspan="2" valign="top" >Nv04 Overlay</td>
3137 <td valign="top" >“colorkeyâ€</td>
3138 <td valign="top" >RANGE</td>
3139 <td valign="top" >Min=0, Max=0x01ffffff</td>
3140 <td valign="top" >Plane</td>
3141 <td valign="top" >TBD</td>
3142 </tr>
3143 <tr>
3144 <td valign="top" >“brightnessâ€</td>
3145 <td valign="top" >RANGE</td>
3146 <td valign="top" >Min=0, Max=1024</td>
3147 <td valign="top" >Plane</td>
3148 <td valign="top" >TBD</td>
3149 </tr>
3150 <tr>
3151 <td rowspan="7" valign="top" >Display</td>
3152 <td valign="top" >“dithering modeâ€</td>
3153 <td valign="top" >ENUM</td>
3154 <td valign="top" >{ "auto", "off", "on" }</td>
3155 <td valign="top" >Connector</td>
3156 <td valign="top" >TBD</td>
3157 </tr>
3158 <tr>
3159 <td valign="top" >“dithering depthâ€</td>
3160 <td valign="top" >ENUM</td>
3161 <td valign="top" >{ "auto", "off", "on", "static 2x2", "dynamic 2x2", "temporal" }</td>
3162 <td valign="top" >Connector</td>
3163 <td valign="top" >TBD</td>
3164 </tr>
3165 <tr>
3166 <td valign="top" >“underscanâ€</td>
3167 <td valign="top" >ENUM</td>
3168 <td valign="top" >{ "auto", "6 bpc", "8 bpc" }</td>
3169 <td valign="top" >Connector</td>
3170 <td valign="top" >TBD</td>
3171 </tr>
3172 <tr>
3173 <td valign="top" >“underscan hborderâ€</td>
3174 <td valign="top" >RANGE</td>
3175 <td valign="top" >Min=0, Max=128</td>
3176 <td valign="top" >Connector</td>
3177 <td valign="top" >TBD</td>
3178 </tr>
3179 <tr>
3180 <td valign="top" >“underscan vborderâ€</td>
3181 <td valign="top" >RANGE</td>
3182 <td valign="top" >Min=0, Max=128</td>
3183 <td valign="top" >Connector</td>
3184 <td valign="top" >TBD</td>
3185 </tr>
3186 <tr>
3187 <td valign="top" >“vibrant hueâ€</td>
3188 <td valign="top" >RANGE</td>
3189 <td valign="top" >Min=0, Max=180</td>
3190 <td valign="top" >Connector</td>
3191 <td valign="top" >TBD</td>
3192 </tr>
3193 <tr>
3194 <td valign="top" >“color vibranceâ€</td>
3195 <td valign="top" >RANGE</td>
3196 <td valign="top" >Min=0, Max=200</td>
3197 <td valign="top" >Connector</td>
3198 <td valign="top" >TBD</td>
3199 </tr>
3200 <tr>
3201 <td valign="top" >Generic</td>
3202 <td valign="top" >Standard name as in DRM</td>
3203 <td valign="top" >Standard type as in DRM</td>
3204 <td valign="top" >Standard value as in DRM</td>
3205 <td valign="top" >Standard Object as in DRM</td>
3206 <td valign="top" >TBD</td>
3207 </tr>
3208 <tr>
3209 <td rowspan="2" valign="top" >omap</td>
3210 <td rowspan="2" valign="top" >Generic</td>
3211 <td valign="top" >“rotationâ€</td>
3212 <td valign="top" >BITMASK</td>
3213 <td valign="top" >{ 0, "rotate-0" },
3214 { 1, "rotate-90" },
3215 { 2, "rotate-180" },
3216 { 3, "rotate-270" },
3217 { 4, "reflect-x" },
3218 { 5, "reflect-y" }</td>
3219 <td valign="top" >CRTC, Plane</td>
3220 <td valign="top" >TBD</td>
3221 </tr>
3222 <tr>
3223 <td valign="top" >“zorderâ€</td>
3224 <td valign="top" >RANGE</td>
3225 <td valign="top" >Min=0, Max=3</td>
3226 <td valign="top" >CRTC, Plane</td>
3227 <td valign="top" >TBD</td>
3228 </tr>
3229 <tr>
3230 <td valign="top" >qxl</td>
3231 <td valign="top" >Generic</td>
3232 <td valign="top" >“hotplug_mode_update"</td>
3233 <td valign="top" >RANGE</td>
3234 <td valign="top" >Min=0, Max=1</td>
3235 <td valign="top" >Connector</td>
3236 <td valign="top" >TBD</td>
3237 </tr>
3238 <tr>
3239 <td rowspan="10" valign="top" >radeon</td>
3240 <td valign="top" >DVI-I</td>
3241 <td valign="top" >“coherentâ€</td>
3242 <td valign="top" >RANGE</td>
3243 <td valign="top" >Min=0, Max=1</td>
3244 <td valign="top" >Connector</td>
3245 <td valign="top" >TBD</td>
3246 </tr>
3247 <tr>
3248 <td valign="top" >DAC enable load detect</td>
3249 <td valign="top" >“load detectionâ€</td>
3250 <td valign="top" >RANGE</td>
3251 <td valign="top" >Min=0, Max=1</td>
3252 <td valign="top" >Connector</td>
3253 <td valign="top" >TBD</td>
3254 </tr>
3255 <tr>
3256 <td valign="top" >TV Standard</td>
3257 <td valign="top" >"tv standard"</td>
3258 <td valign="top" >ENUM</td>
3259 <td valign="top" >{ "ntsc", "pal", "pal-m", "pal-60", "ntsc-j"
3260 , "scart-pal", "pal-cn", "secam" }</td>
3261 <td valign="top" >Connector</td>
3262 <td valign="top" >TBD</td>
3263 </tr>
3264 <tr>
3265 <td valign="top" >legacy TMDS PLL detect</td>
3266 <td valign="top" >"tmds_pll"</td>
3267 <td valign="top" >ENUM</td>
3268 <td valign="top" >{ "driver", "bios" }</td>
3269 <td valign="top" >-</td>
3270 <td valign="top" >TBD</td>
3271 </tr>
3272 <tr>
3273 <td rowspan="3" valign="top" >Underscan</td>
3274 <td valign="top" >"underscan"</td>
3275 <td valign="top" >ENUM</td>
3276 <td valign="top" >{ "off", "on", "auto" }</td>
3277 <td valign="top" >Connector</td>
3278 <td valign="top" >TBD</td>
3279 </tr>
3280 <tr>
3281 <td valign="top" >"underscan hborder"</td>
3282 <td valign="top" >RANGE</td>
3283 <td valign="top" >Min=0, Max=128</td>
3284 <td valign="top" >Connector</td>
3285 <td valign="top" >TBD</td>
3286 </tr>
3287 <tr>
3288 <td valign="top" >"underscan vborder"</td>
3289 <td valign="top" >RANGE</td>
3290 <td valign="top" >Min=0, Max=128</td>
3291 <td valign="top" >Connector</td>
3292 <td valign="top" >TBD</td>
3293 </tr>
3294 <tr>
3295 <td valign="top" >Audio</td>
3296 <td valign="top" >“audioâ€</td>
3297 <td valign="top" >ENUM</td>
3298 <td valign="top" >{ "off", "on", "auto" }</td>
3299 <td valign="top" >Connector</td>
3300 <td valign="top" >TBD</td>
3301 </tr>
3302 <tr>
3303 <td valign="top" >FMT Dithering</td>
3304 <td valign="top" >“ditherâ€</td>
3305 <td valign="top" >ENUM</td>
3306 <td valign="top" >{ "off", "on" }</td>
3307 <td valign="top" >Connector</td>
3308 <td valign="top" >TBD</td>
3309 </tr>
3310 <tr>
3311 <td valign="top" >Generic</td>
3312 <td valign="top" >Standard name as in DRM</td>
3313 <td valign="top" >Standard type as in DRM</td>
3314 <td valign="top" >Standard value as in DRM</td>
3315 <td valign="top" >Standard Object as in DRM</td>
3316 <td valign="top" >TBD</td>
3317 </tr>
3318 <tr>
3319 <td rowspan="3" valign="top" >rcar-du</td>
3320 <td rowspan="3" valign="top" >Generic</td>
3321 <td valign="top" >"alpha"</td>
3322 <td valign="top" >RANGE</td>
3323 <td valign="top" >Min=0, Max=255</td>
3324 <td valign="top" >Plane</td>
3325 <td valign="top" >TBD</td>
3326 </tr>
3327 <tr>
3328 <td valign="top" >"colorkey"</td>
3329 <td valign="top" >RANGE</td>
3330 <td valign="top" >Min=0, Max=0x01ffffff</td>
3331 <td valign="top" >Plane</td>
3332 <td valign="top" >TBD</td>
3333 </tr>
3334 <tr>
3335 <td valign="top" >"zpos"</td>
3336 <td valign="top" >RANGE</td>
3337 <td valign="top" >Min=1, Max=7</td>
3338 <td valign="top" >Plane</td>
3339 <td valign="top" >TBD</td>
3340 </tr>
3341 </tbody>
3342 </table>
3343 </sect2>
2453 </sect1> 3344 </sect1>
2454 3345
2455 <!-- Internals: vertical blanking --> 3346 <!-- Internals: vertical blanking -->
@@ -2527,6 +3418,10 @@ void (*disable_vblank) (struct drm_device *dev, int crtc);</synopsis>
2527 with a call to <function>drm_vblank_cleanup</function> in the driver 3418 with a call to <function>drm_vblank_cleanup</function> in the driver
2528 <methodname>unload</methodname> operation handler. 3419 <methodname>unload</methodname> operation handler.
2529 </para> 3420 </para>
3421 <sect2>
3422 <title>Vertical Blanking and Interrupt Handling Functions Reference</title>
3423!Edrivers/gpu/drm/drm_irq.c
3424 </sect2>
2530 </sect1> 3425 </sect1>
2531 3426
2532 <!-- Internals: open/close, file operations and ioctls --> 3427 <!-- Internals: open/close, file operations and ioctls -->
@@ -2697,10 +3592,10 @@ int num_ioctls;</synopsis>
2697 <sect1> 3592 <sect1>
2698 <title>Legacy Support Code</title> 3593 <title>Legacy Support Code</title>
2699 <para> 3594 <para>
2700 The section very brievely covers some of the old legacy support code which 3595 The section very briefly covers some of the old legacy support code which
2701 is only used by old DRM drivers which have done a so-called shadow-attach 3596 is only used by old DRM drivers which have done a so-called shadow-attach
2702 to the underlying device instead of registering as a real driver. This 3597 to the underlying device instead of registering as a real driver. This
2703 also includes some of the old generic buffer mangement and command 3598 also includes some of the old generic buffer management and command
2704 submission code. Do not use any of this in new and modern drivers. 3599 submission code. Do not use any of this in new and modern drivers.
2705 </para> 3600 </para>
2706 3601
@@ -2869,17 +3764,16 @@ int num_ioctls;</synopsis>
2869 <term>DRM_IOCTL_MODESET_CTL</term> 3764 <term>DRM_IOCTL_MODESET_CTL</term>
2870 <listitem> 3765 <listitem>
2871 <para> 3766 <para>
2872 This should be called by application level drivers before and 3767 This was only used for user-mode-settind drivers around
2873 after mode setting, since on many devices the vertical blank 3768 modesetting changes to allow the kernel to update the vblank
2874 counter is reset at that time. Internally, the DRM snapshots 3769 interrupt after mode setting, since on many devices the vertical
2875 the last vblank count when the ioctl is called with the 3770 blank counter is reset to 0 at some point during modeset. Modern
2876 _DRM_PRE_MODESET command, so that the counter won't go backwards 3771 drivers should not call this any more since with kernel mode
2877 (which is dealt with when _DRM_POST_MODESET is used). 3772 setting it is a no-op.
2878 </para> 3773 </para>
2879 </listitem> 3774 </listitem>
2880 </varlistentry> 3775 </varlistentry>
2881 </variablelist> 3776 </variablelist>
2882<!--!Edrivers/char/drm/drm_irq.c-->
2883 </para> 3777 </para>
2884 </sect1> 3778 </sect1>
2885 3779
@@ -2942,6 +3836,96 @@ int num_ioctls;</synopsis>
2942 probing, so those sections fully apply. 3836 probing, so those sections fully apply.
2943 </para> 3837 </para>
2944 </sect2> 3838 </sect2>
3839 <sect2>
3840 <title>DPIO</title>
3841!Pdrivers/gpu/drm/i915/i915_reg.h DPIO
3842 <table id="dpiox2">
3843 <title>Dual channel PHY (VLV/CHV)</title>
3844 <tgroup cols="8">
3845 <colspec colname="c0" />
3846 <colspec colname="c1" />
3847 <colspec colname="c2" />
3848 <colspec colname="c3" />
3849 <colspec colname="c4" />
3850 <colspec colname="c5" />
3851 <colspec colname="c6" />
3852 <colspec colname="c7" />
3853 <spanspec spanname="ch0" namest="c0" nameend="c3" />
3854 <spanspec spanname="ch1" namest="c4" nameend="c7" />
3855 <spanspec spanname="ch0pcs01" namest="c0" nameend="c1" />
3856 <spanspec spanname="ch0pcs23" namest="c2" nameend="c3" />
3857 <spanspec spanname="ch1pcs01" namest="c4" nameend="c5" />
3858 <spanspec spanname="ch1pcs23" namest="c6" nameend="c7" />
3859 <thead>
3860 <row>
3861 <entry spanname="ch0">CH0</entry>
3862 <entry spanname="ch1">CH1</entry>
3863 </row>
3864 </thead>
3865 <tbody valign="top" align="center">
3866 <row>
3867 <entry spanname="ch0">CMN/PLL/REF</entry>
3868 <entry spanname="ch1">CMN/PLL/REF</entry>
3869 </row>
3870 <row>
3871 <entry spanname="ch0pcs01">PCS01</entry>
3872 <entry spanname="ch0pcs23">PCS23</entry>
3873 <entry spanname="ch1pcs01">PCS01</entry>
3874 <entry spanname="ch1pcs23">PCS23</entry>
3875 </row>
3876 <row>
3877 <entry>TX0</entry>
3878 <entry>TX1</entry>
3879 <entry>TX2</entry>
3880 <entry>TX3</entry>
3881 <entry>TX0</entry>
3882 <entry>TX1</entry>
3883 <entry>TX2</entry>
3884 <entry>TX3</entry>
3885 </row>
3886 <row>
3887 <entry spanname="ch0">DDI0</entry>
3888 <entry spanname="ch1">DDI1</entry>
3889 </row>
3890 </tbody>
3891 </tgroup>
3892 </table>
3893 <table id="dpiox1">
3894 <title>Single channel PHY (CHV)</title>
3895 <tgroup cols="4">
3896 <colspec colname="c0" />
3897 <colspec colname="c1" />
3898 <colspec colname="c2" />
3899 <colspec colname="c3" />
3900 <spanspec spanname="ch0" namest="c0" nameend="c3" />
3901 <spanspec spanname="ch0pcs01" namest="c0" nameend="c1" />
3902 <spanspec spanname="ch0pcs23" namest="c2" nameend="c3" />
3903 <thead>
3904 <row>
3905 <entry spanname="ch0">CH0</entry>
3906 </row>
3907 </thead>
3908 <tbody valign="top" align="center">
3909 <row>
3910 <entry spanname="ch0">CMN/PLL/REF</entry>
3911 </row>
3912 <row>
3913 <entry spanname="ch0pcs01">PCS01</entry>
3914 <entry spanname="ch0pcs23">PCS23</entry>
3915 </row>
3916 <row>
3917 <entry>TX0</entry>
3918 <entry>TX1</entry>
3919 <entry>TX2</entry>
3920 <entry>TX3</entry>
3921 </row>
3922 <row>
3923 <entry spanname="ch0">DDI2</entry>
3924 </row>
3925 </tbody>
3926 </tgroup>
3927 </table>
3928 </sect2>
2945 </sect1> 3929 </sect1>
2946 3930
2947 <sect1> 3931 <sect1>
@@ -2950,6 +3934,11 @@ int num_ioctls;</synopsis>
2950 This sections covers all things related to the GEM implementation in the 3934 This sections covers all things related to the GEM implementation in the
2951 i915 driver. 3935 i915 driver.
2952 </para> 3936 </para>
3937 <sect2>
3938 <title>Batchbuffer Parsing</title>
3939!Pdrivers/gpu/drm/i915/i915_cmd_parser.c batch buffer command parser
3940!Idrivers/gpu/drm/i915/i915_cmd_parser.c
3941 </sect2>
2953 </sect1> 3942 </sect1>
2954 </chapter> 3943 </chapter>
2955</part> 3944</part>
diff --git a/Documentation/DocBook/filesystems.tmpl b/Documentation/DocBook/filesystems.tmpl
index 4f676838da06..bcdfdb9a9277 100644
--- a/Documentation/DocBook/filesystems.tmpl
+++ b/Documentation/DocBook/filesystems.tmpl
@@ -62,7 +62,7 @@
62!Efs/mpage.c 62!Efs/mpage.c
63!Efs/namei.c 63!Efs/namei.c
64!Efs/buffer.c 64!Efs/buffer.c
65!Efs/bio.c 65!Eblock/bio.c
66!Efs/seq_file.c 66!Efs/seq_file.c
67!Efs/filesystems.c 67!Efs/filesystems.c
68!Efs/fs-writeback.c 68!Efs/fs-writeback.c
diff --git a/Documentation/DocBook/gadget.tmpl b/Documentation/DocBook/gadget.tmpl
index 4017f147ba2f..2c425d70f7e2 100644
--- a/Documentation/DocBook/gadget.tmpl
+++ b/Documentation/DocBook/gadget.tmpl
@@ -708,7 +708,7 @@ hardware level details could be very different.
708 708
709<para>Systems need specialized hardware support to implement OTG, 709<para>Systems need specialized hardware support to implement OTG,
710notably including a special <emphasis>Mini-AB</emphasis> jack 710notably including a special <emphasis>Mini-AB</emphasis> jack
711and associated transciever to support <emphasis>Dual-Role</emphasis> 711and associated transceiver to support <emphasis>Dual-Role</emphasis>
712operation: 712operation:
713they can act either as a host, using the standard 713they can act either as a host, using the standard
714Linux-USB host side driver stack, 714Linux-USB host side driver stack,
diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl
index 46347f603353..59fb5c077541 100644
--- a/Documentation/DocBook/genericirq.tmpl
+++ b/Documentation/DocBook/genericirq.tmpl
@@ -182,7 +182,7 @@
182 <para> 182 <para>
183 Each interrupt is described by an interrupt descriptor structure 183 Each interrupt is described by an interrupt descriptor structure
184 irq_desc. The interrupt is referenced by an 'unsigned int' numeric 184 irq_desc. The interrupt is referenced by an 'unsigned int' numeric
185 value which selects the corresponding interrupt decription structure 185 value which selects the corresponding interrupt description structure
186 in the descriptor structures array. 186 in the descriptor structures array.
187 The descriptor structure contains status information and pointers 187 The descriptor structure contains status information and pointers
188 to the interrupt flow method and the interrupt chip structure 188 to the interrupt flow method and the interrupt chip structure
@@ -470,7 +470,7 @@ if (desc->irq_data.chip->irq_eoi)
470 <para> 470 <para>
471 To avoid copies of identical implementations of IRQ chips the 471 To avoid copies of identical implementations of IRQ chips the
472 core provides a configurable generic interrupt chip 472 core provides a configurable generic interrupt chip
473 implementation. Developers should check carefuly whether the 473 implementation. Developers should check carefully whether the
474 generic chip fits their needs before implementing the same 474 generic chip fits their needs before implementing the same
475 functionality slightly differently themselves. 475 functionality slightly differently themselves.
476 </para> 476 </para>
diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl
index 19f2a5a5a5b4..e584ee12a1e7 100644
--- a/Documentation/DocBook/kernel-locking.tmpl
+++ b/Documentation/DocBook/kernel-locking.tmpl
@@ -1760,7 +1760,7 @@ as it would be on UP.
1760</para> 1760</para>
1761 1761
1762<para> 1762<para>
1763There is a furthur optimization possible here: remember our original 1763There is a further optimization possible here: remember our original
1764cache code, where there were no reference counts and the caller simply 1764cache code, where there were no reference counts and the caller simply
1765held the lock whenever using the object? This is still possible: if 1765held the lock whenever using the object? This is still possible: if
1766you hold the lock, no one can delete the object, so you don't need to 1766you hold the lock, no one can delete the object, so you don't need to
diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl
index deb71baed328..d7fcdc5a4379 100644
--- a/Documentation/DocBook/libata.tmpl
+++ b/Documentation/DocBook/libata.tmpl
@@ -677,7 +677,7 @@ and other resources, etc.
677 677
678 <listitem> 678 <listitem>
679 <para> 679 <para>
680 ATA_QCFLAG_ACTIVE is clared from qc->flags. 680 ATA_QCFLAG_ACTIVE is cleared from qc->flags.
681 </para> 681 </para>
682 </listitem> 682 </listitem>
683 683
@@ -708,7 +708,7 @@ and other resources, etc.
708 708
709 <listitem> 709 <listitem>
710 <para> 710 <para>
711 qc->waiting is claread &amp; completed (in that order). 711 qc->waiting is cleared &amp; completed (in that order).
712 </para> 712 </para>
713 </listitem> 713 </listitem>
714 714
@@ -1163,7 +1163,7 @@ and other resources, etc.
1163 1163
1164 <para> 1164 <para>
1165 Once sense data is acquired, this type of errors can be 1165 Once sense data is acquired, this type of errors can be
1166 handled similary to other SCSI errors. Note that sense data 1166 handled similarly to other SCSI errors. Note that sense data
1167 may indicate ATA bus error (e.g. Sense Key 04h HARDWARE ERROR 1167 may indicate ATA bus error (e.g. Sense Key 04h HARDWARE ERROR
1168 &amp;&amp; ASC/ASCQ 47h/00h SCSI PARITY ERROR). In such 1168 &amp;&amp; ASC/ASCQ 47h/00h SCSI PARITY ERROR). In such
1169 cases, the error should be considered as an ATA bus error and 1169 cases, the error should be considered as an ATA bus error and
diff --git a/Documentation/DocBook/media/Makefile b/Documentation/DocBook/media/Makefile
index f9fd615427fb..639e74857968 100644
--- a/Documentation/DocBook/media/Makefile
+++ b/Documentation/DocBook/media/Makefile
@@ -195,15 +195,15 @@ DVB_DOCUMENTED = \
195# 195#
196 196
197install_media_images = \ 197install_media_images = \
198 $(Q)cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api 198 $(Q)-cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api
199 199
200$(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64 200$(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64
201 $(Q)base64 -d $< >$@ 201 $(Q)base64 -d $< >$@
202 202
203$(MEDIA_OBJ_DIR)/v4l2.xml: $(OBJIMGFILES) 203$(MEDIA_OBJ_DIR)/v4l2.xml: $(OBJIMGFILES)
204 @$($(quiet)gen_xml) 204 @$($(quiet)gen_xml)
205 @(ln -sf $(MEDIA_SRC_DIR)/v4l/*xml $(MEDIA_OBJ_DIR)/) 205 @(ln -sf `cd $(MEDIA_SRC_DIR) && /bin/pwd`/v4l/*xml $(MEDIA_OBJ_DIR)/)
206 @(ln -sf $(MEDIA_SRC_DIR)/dvb/*xml $(MEDIA_OBJ_DIR)/) 206 @(ln -sf `cd $(MEDIA_SRC_DIR) && /bin/pwd`/dvb/*xml $(MEDIA_OBJ_DIR)/)
207 207
208$(MEDIA_OBJ_DIR)/videodev2.h.xml: $(srctree)/include/uapi/linux/videodev2.h $(MEDIA_OBJ_DIR)/v4l2.xml 208$(MEDIA_OBJ_DIR)/videodev2.h.xml: $(srctree)/include/uapi/linux/videodev2.h $(MEDIA_OBJ_DIR)/v4l2.xml
209 @$($(quiet)gen_xml) 209 @$($(quiet)gen_xml)
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml
index 97a69bf6f3eb..a086a5db7a18 100644
--- a/Documentation/DocBook/media/v4l/io.xml
+++ b/Documentation/DocBook/media/v4l/io.xml
@@ -125,7 +125,7 @@ location of the buffers in device memory can be determined with the
125<structfield>m.offset</structfield> and <structfield>length</structfield> 125<structfield>m.offset</structfield> and <structfield>length</structfield>
126returned in a &v4l2-buffer; are passed as sixth and second parameter to the 126returned in a &v4l2-buffer; are passed as sixth and second parameter to the
127<function>mmap()</function> function. When using the multi-planar API, 127<function>mmap()</function> function. When using the multi-planar API,
128struct &v4l2-buffer; contains an array of &v4l2-plane; structures, each 128&v4l2-buffer; contains an array of &v4l2-plane; structures, each
129containing its own <structfield>m.offset</structfield> and 129containing its own <structfield>m.offset</structfield> and
130<structfield>length</structfield>. When using the multi-planar API, every 130<structfield>length</structfield>. When using the multi-planar API, every
131plane of every buffer has to be mapped separately, so the number of 131plane of every buffer has to be mapped separately, so the number of
@@ -699,7 +699,12 @@ linkend="v4l2-buf-type" /></entry>
699buffer. It depends on the negotiated data format and may change with 699buffer. It depends on the negotiated data format and may change with
700each buffer for compressed variable size data like JPEG images. 700each buffer for compressed variable size data like JPEG images.
701Drivers must set this field when <structfield>type</structfield> 701Drivers must set this field when <structfield>type</structfield>
702refers to an input stream, applications when it refers to an output stream.</entry> 702refers to an input stream, applications when it refers to an output stream.
703If the application sets this to 0 for an output stream, then
704<structfield>bytesused</structfield> will be set to the size of the
705buffer (see the <structfield>length</structfield> field of this struct) by
706the driver. For multiplanar formats this field is ignored and the
707<structfield>planes</structfield> pointer is used instead.</entry>
703 </row> 708 </row>
704 <row> 709 <row>
705 <entry>__u32</entry> 710 <entry>__u32</entry>
@@ -861,7 +866,11 @@ should set this to 0.</entry>
861 <entry></entry> 866 <entry></entry>
862 <entry>The number of bytes occupied by data in the plane 867 <entry>The number of bytes occupied by data in the plane
863 (its payload). Drivers must set this field when <structfield>type</structfield> 868 (its payload). Drivers must set this field when <structfield>type</structfield>
864 refers to an input stream, applications when it refers to an output stream.</entry> 869 refers to an input stream, applications when it refers to an output stream.
870 If the application sets this to 0 for an output stream, then
871 <structfield>bytesused</structfield> will be set to the size of the
872 plane (see the <structfield>length</structfield> field of this struct)
873 by the driver.</entry>
865 </row> 874 </row>
866 <row> 875 <row>
867 <entry>__u32</entry> 876 <entry>__u32</entry>
diff --git a/Documentation/DocBook/media/v4l/media-ioc-enum-links.xml b/Documentation/DocBook/media/v4l/media-ioc-enum-links.xml
index cf8548556c7d..74fb394ec667 100644
--- a/Documentation/DocBook/media/v4l/media-ioc-enum-links.xml
+++ b/Documentation/DocBook/media/v4l/media-ioc-enum-links.xml
@@ -79,13 +79,13 @@
79 <entry>Entity id, set by the application.</entry> 79 <entry>Entity id, set by the application.</entry>
80 </row> 80 </row>
81 <row> 81 <row>
82 <entry>struct &media-pad-desc;</entry> 82 <entry>&media-pad-desc;</entry>
83 <entry>*<structfield>pads</structfield></entry> 83 <entry>*<structfield>pads</structfield></entry>
84 <entry>Pointer to a pads array allocated by the application. Ignored 84 <entry>Pointer to a pads array allocated by the application. Ignored
85 if NULL.</entry> 85 if NULL.</entry>
86 </row> 86 </row>
87 <row> 87 <row>
88 <entry>struct &media-link-desc;</entry> 88 <entry>&media-link-desc;</entry>
89 <entry>*<structfield>links</structfield></entry> 89 <entry>*<structfield>links</structfield></entry>
90 <entry>Pointer to a links array allocated by the application. Ignored 90 <entry>Pointer to a links array allocated by the application. Ignored
91 if NULL.</entry> 91 if NULL.</entry>
@@ -153,12 +153,12 @@
153 &cs-str; 153 &cs-str;
154 <tbody valign="top"> 154 <tbody valign="top">
155 <row> 155 <row>
156 <entry>struct &media-pad-desc;</entry> 156 <entry>&media-pad-desc;</entry>
157 <entry><structfield>source</structfield></entry> 157 <entry><structfield>source</structfield></entry>
158 <entry>Pad at the origin of this link.</entry> 158 <entry>Pad at the origin of this link.</entry>
159 </row> 159 </row>
160 <row> 160 <row>
161 <entry>struct &media-pad-desc;</entry> 161 <entry>&media-pad-desc;</entry>
162 <entry><structfield>sink</structfield></entry> 162 <entry><structfield>sink</structfield></entry>
163 <entry>Pad at the target of this link.</entry> 163 <entry>Pad at the target of this link.</entry>
164 </row> 164 </row>
diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml
index ea514d6075c5..91dcbc84f3f8 100644
--- a/Documentation/DocBook/media/v4l/pixfmt.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt.xml
@@ -772,7 +772,7 @@ extended control <constant>V4L2_CID_MPEG_STREAM_TYPE</constant>, see
772 </row> 772 </row>
773 <row id="V4L2-PIX-FMT-H264-MVC"> 773 <row id="V4L2-PIX-FMT-H264-MVC">
774 <entry><constant>V4L2_PIX_FMT_H264_MVC</constant></entry> 774 <entry><constant>V4L2_PIX_FMT_H264_MVC</constant></entry>
775 <entry>'MVC'</entry> 775 <entry>'M264'</entry>
776 <entry>H264 MVC video elementary stream.</entry> 776 <entry>H264 MVC video elementary stream.</entry>
777 </row> 777 </row>
778 <row id="V4L2-PIX-FMT-H263"> 778 <row id="V4L2-PIX-FMT-H263">
@@ -812,7 +812,7 @@ extended control <constant>V4L2_CID_MPEG_STREAM_TYPE</constant>, see
812 </row> 812 </row>
813 <row id="V4L2-PIX-FMT-VP8"> 813 <row id="V4L2-PIX-FMT-VP8">
814 <entry><constant>V4L2_PIX_FMT_VP8</constant></entry> 814 <entry><constant>V4L2_PIX_FMT_VP8</constant></entry>
815 <entry>'VP8'</entry> 815 <entry>'VP80'</entry>
816 <entry>VP8 video elementary stream.</entry> 816 <entry>VP8 video elementary stream.</entry>
817 </row> 817 </row>
818 </tbody> 818 </tbody>
diff --git a/Documentation/DocBook/media/v4l/subdev-formats.xml b/Documentation/DocBook/media/v4l/subdev-formats.xml
index 7331ce116f4c..b2d5a0363cba 100644
--- a/Documentation/DocBook/media/v4l/subdev-formats.xml
+++ b/Documentation/DocBook/media/v4l/subdev-formats.xml
@@ -1898,6 +1898,134 @@
1898 <entry>y<subscript>1</subscript></entry> 1898 <entry>y<subscript>1</subscript></entry>
1899 <entry>y<subscript>0</subscript></entry> 1899 <entry>y<subscript>0</subscript></entry>
1900 </row> 1900 </row>
1901 <row id="V4L2-MBUS-FMT-UYVY10-2X10">
1902 <entry>V4L2_MBUS_FMT_UYVY10_2X10</entry>
1903 <entry>0x2018</entry>
1904 <entry></entry>
1905 &dash-ent-22;
1906 <entry>u<subscript>9</subscript></entry>
1907 <entry>u<subscript>8</subscript></entry>
1908 <entry>u<subscript>7</subscript></entry>
1909 <entry>u<subscript>6</subscript></entry>
1910 <entry>u<subscript>5</subscript></entry>
1911 <entry>u<subscript>4</subscript></entry>
1912 <entry>u<subscript>3</subscript></entry>
1913 <entry>u<subscript>2</subscript></entry>
1914 <entry>u<subscript>1</subscript></entry>
1915 <entry>u<subscript>0</subscript></entry>
1916 </row>
1917 <row>
1918 <entry></entry>
1919 <entry></entry>
1920 <entry></entry>
1921 &dash-ent-22;
1922 <entry>y<subscript>9</subscript></entry>
1923 <entry>y<subscript>8</subscript></entry>
1924 <entry>y<subscript>7</subscript></entry>
1925 <entry>y<subscript>6</subscript></entry>
1926 <entry>y<subscript>5</subscript></entry>
1927 <entry>y<subscript>4</subscript></entry>
1928 <entry>y<subscript>3</subscript></entry>
1929 <entry>y<subscript>2</subscript></entry>
1930 <entry>y<subscript>1</subscript></entry>
1931 <entry>y<subscript>0</subscript></entry>
1932 </row>
1933 <row>
1934 <entry></entry>
1935 <entry></entry>
1936 <entry></entry>
1937 &dash-ent-22;
1938 <entry>v<subscript>9</subscript></entry>
1939 <entry>v<subscript>8</subscript></entry>
1940 <entry>v<subscript>7</subscript></entry>
1941 <entry>v<subscript>6</subscript></entry>
1942 <entry>v<subscript>5</subscript></entry>
1943 <entry>v<subscript>4</subscript></entry>
1944 <entry>v<subscript>3</subscript></entry>
1945 <entry>v<subscript>2</subscript></entry>
1946 <entry>v<subscript>1</subscript></entry>
1947 <entry>v<subscript>0</subscript></entry>
1948 </row>
1949 <row>
1950 <entry></entry>
1951 <entry></entry>
1952 <entry></entry>
1953 &dash-ent-22;
1954 <entry>y<subscript>9</subscript></entry>
1955 <entry>y<subscript>8</subscript></entry>
1956 <entry>y<subscript>7</subscript></entry>
1957 <entry>y<subscript>6</subscript></entry>
1958 <entry>y<subscript>5</subscript></entry>
1959 <entry>y<subscript>4</subscript></entry>
1960 <entry>y<subscript>3</subscript></entry>
1961 <entry>y<subscript>2</subscript></entry>
1962 <entry>y<subscript>1</subscript></entry>
1963 <entry>y<subscript>0</subscript></entry>
1964 </row>
1965 <row id="V4L2-MBUS-FMT-VYUY10-2X10">
1966 <entry>V4L2_MBUS_FMT_VYUY10_2X10</entry>
1967 <entry>0x2019</entry>
1968 <entry></entry>
1969 &dash-ent-22;
1970 <entry>v<subscript>9</subscript></entry>
1971 <entry>v<subscript>8</subscript></entry>
1972 <entry>v<subscript>7</subscript></entry>
1973 <entry>v<subscript>6</subscript></entry>
1974 <entry>v<subscript>5</subscript></entry>
1975 <entry>v<subscript>4</subscript></entry>
1976 <entry>v<subscript>3</subscript></entry>
1977 <entry>v<subscript>2</subscript></entry>
1978 <entry>v<subscript>1</subscript></entry>
1979 <entry>v<subscript>0</subscript></entry>
1980 </row>
1981 <row>
1982 <entry></entry>
1983 <entry></entry>
1984 <entry></entry>
1985 &dash-ent-22;
1986 <entry>y<subscript>9</subscript></entry>
1987 <entry>y<subscript>8</subscript></entry>
1988 <entry>y<subscript>7</subscript></entry>
1989 <entry>y<subscript>6</subscript></entry>
1990 <entry>y<subscript>5</subscript></entry>
1991 <entry>y<subscript>4</subscript></entry>
1992 <entry>y<subscript>3</subscript></entry>
1993 <entry>y<subscript>2</subscript></entry>
1994 <entry>y<subscript>1</subscript></entry>
1995 <entry>y<subscript>0</subscript></entry>
1996 </row>
1997 <row>
1998 <entry></entry>
1999 <entry></entry>
2000 <entry></entry>
2001 &dash-ent-22;
2002 <entry>u<subscript>9</subscript></entry>
2003 <entry>u<subscript>8</subscript></entry>
2004 <entry>u<subscript>7</subscript></entry>
2005 <entry>u<subscript>6</subscript></entry>
2006 <entry>u<subscript>5</subscript></entry>
2007 <entry>u<subscript>4</subscript></entry>
2008 <entry>u<subscript>3</subscript></entry>
2009 <entry>u<subscript>2</subscript></entry>
2010 <entry>u<subscript>1</subscript></entry>
2011 <entry>u<subscript>0</subscript></entry>
2012 </row>
2013 <row>
2014 <entry></entry>
2015 <entry></entry>
2016 <entry></entry>
2017 &dash-ent-22;
2018 <entry>y<subscript>9</subscript></entry>
2019 <entry>y<subscript>8</subscript></entry>
2020 <entry>y<subscript>7</subscript></entry>
2021 <entry>y<subscript>6</subscript></entry>
2022 <entry>y<subscript>5</subscript></entry>
2023 <entry>y<subscript>4</subscript></entry>
2024 <entry>y<subscript>3</subscript></entry>
2025 <entry>y<subscript>2</subscript></entry>
2026 <entry>y<subscript>1</subscript></entry>
2027 <entry>y<subscript>0</subscript></entry>
2028 </row>
1901 <row id="V4L2-MBUS-FMT-YUYV10-2X10"> 2029 <row id="V4L2-MBUS-FMT-YUYV10-2X10">
1902 <entry>V4L2_MBUS_FMT_YUYV10_2X10</entry> 2030 <entry>V4L2_MBUS_FMT_YUYV10_2X10</entry>
1903 <entry>0x200b</entry> 2031 <entry>0x200b</entry>
@@ -2308,6 +2436,110 @@
2308 <entry>v<subscript>1</subscript></entry> 2436 <entry>v<subscript>1</subscript></entry>
2309 <entry>v<subscript>0</subscript></entry> 2437 <entry>v<subscript>0</subscript></entry>
2310 </row> 2438 </row>
2439 <row id="V4L2-MBUS-FMT-UYVY10-1X20">
2440 <entry>V4L2_MBUS_FMT_UYVY10_1X20</entry>
2441 <entry>0x201a</entry>
2442 <entry></entry>
2443 &dash-ent-12;
2444 <entry>u<subscript>9</subscript></entry>
2445 <entry>u<subscript>8</subscript></entry>
2446 <entry>u<subscript>7</subscript></entry>
2447 <entry>u<subscript>6</subscript></entry>
2448 <entry>u<subscript>5</subscript></entry>
2449 <entry>u<subscript>4</subscript></entry>
2450 <entry>u<subscript>3</subscript></entry>
2451 <entry>u<subscript>2</subscript></entry>
2452 <entry>u<subscript>1</subscript></entry>
2453 <entry>u<subscript>0</subscript></entry>
2454 <entry>y<subscript>9</subscript></entry>
2455 <entry>y<subscript>8</subscript></entry>
2456 <entry>y<subscript>7</subscript></entry>
2457 <entry>y<subscript>6</subscript></entry>
2458 <entry>y<subscript>5</subscript></entry>
2459 <entry>y<subscript>4</subscript></entry>
2460 <entry>y<subscript>3</subscript></entry>
2461 <entry>y<subscript>2</subscript></entry>
2462 <entry>y<subscript>1</subscript></entry>
2463 <entry>y<subscript>0</subscript></entry>
2464 </row>
2465 <row>
2466 <entry></entry>
2467 <entry></entry>
2468 <entry></entry>
2469 &dash-ent-12;
2470 <entry>v<subscript>9</subscript></entry>
2471 <entry>v<subscript>8</subscript></entry>
2472 <entry>v<subscript>7</subscript></entry>
2473 <entry>v<subscript>6</subscript></entry>
2474 <entry>v<subscript>5</subscript></entry>
2475 <entry>v<subscript>4</subscript></entry>
2476 <entry>v<subscript>3</subscript></entry>
2477 <entry>v<subscript>2</subscript></entry>
2478 <entry>v<subscript>1</subscript></entry>
2479 <entry>v<subscript>0</subscript></entry>
2480 <entry>y<subscript>9</subscript></entry>
2481 <entry>y<subscript>8</subscript></entry>
2482 <entry>y<subscript>7</subscript></entry>
2483 <entry>y<subscript>6</subscript></entry>
2484 <entry>y<subscript>5</subscript></entry>
2485 <entry>y<subscript>4</subscript></entry>
2486 <entry>y<subscript>3</subscript></entry>
2487 <entry>y<subscript>2</subscript></entry>
2488 <entry>y<subscript>1</subscript></entry>
2489 <entry>y<subscript>0</subscript></entry>
2490 </row>
2491 <row id="V4L2-MBUS-FMT-VYUY10-1X20">
2492 <entry>V4L2_MBUS_FMT_VYUY10_1X20</entry>
2493 <entry>0x201b</entry>
2494 <entry></entry>
2495 &dash-ent-12;
2496 <entry>v<subscript>9</subscript></entry>
2497 <entry>v<subscript>8</subscript></entry>
2498 <entry>v<subscript>7</subscript></entry>
2499 <entry>v<subscript>6</subscript></entry>
2500 <entry>v<subscript>5</subscript></entry>
2501 <entry>v<subscript>4</subscript></entry>
2502 <entry>v<subscript>3</subscript></entry>
2503 <entry>v<subscript>2</subscript></entry>
2504 <entry>v<subscript>1</subscript></entry>
2505 <entry>v<subscript>0</subscript></entry>
2506 <entry>y<subscript>9</subscript></entry>
2507 <entry>y<subscript>8</subscript></entry>
2508 <entry>y<subscript>7</subscript></entry>
2509 <entry>y<subscript>6</subscript></entry>
2510 <entry>y<subscript>5</subscript></entry>
2511 <entry>y<subscript>4</subscript></entry>
2512 <entry>y<subscript>3</subscript></entry>
2513 <entry>y<subscript>2</subscript></entry>
2514 <entry>y<subscript>1</subscript></entry>
2515 <entry>y<subscript>0</subscript></entry>
2516 </row>
2517 <row>
2518 <entry></entry>
2519 <entry></entry>
2520 <entry></entry>
2521 &dash-ent-12;
2522 <entry>u<subscript>9</subscript></entry>
2523 <entry>u<subscript>8</subscript></entry>
2524 <entry>u<subscript>7</subscript></entry>
2525 <entry>u<subscript>6</subscript></entry>
2526 <entry>u<subscript>5</subscript></entry>
2527 <entry>u<subscript>4</subscript></entry>
2528 <entry>u<subscript>3</subscript></entry>
2529 <entry>u<subscript>2</subscript></entry>
2530 <entry>u<subscript>1</subscript></entry>
2531 <entry>u<subscript>0</subscript></entry>
2532 <entry>y<subscript>9</subscript></entry>
2533 <entry>y<subscript>8</subscript></entry>
2534 <entry>y<subscript>7</subscript></entry>
2535 <entry>y<subscript>6</subscript></entry>
2536 <entry>y<subscript>5</subscript></entry>
2537 <entry>y<subscript>4</subscript></entry>
2538 <entry>y<subscript>3</subscript></entry>
2539 <entry>y<subscript>2</subscript></entry>
2540 <entry>y<subscript>1</subscript></entry>
2541 <entry>y<subscript>0</subscript></entry>
2542 </row>
2311 <row id="V4L2-MBUS-FMT-YUYV10-1X20"> 2543 <row id="V4L2-MBUS-FMT-YUYV10-1X20">
2312 <entry>V4L2_MBUS_FMT_YUYV10_1X20</entry> 2544 <entry>V4L2_MBUS_FMT_YUYV10_1X20</entry>
2313 <entry>0x200d</entry> 2545 <entry>0x200d</entry>
@@ -2486,6 +2718,534 @@
2486 <entry>v<subscript>1</subscript></entry> 2718 <entry>v<subscript>1</subscript></entry>
2487 <entry>v<subscript>0</subscript></entry> 2719 <entry>v<subscript>0</subscript></entry>
2488 </row> 2720 </row>
2721 <row id="V4L2-MBUS-FMT-UYVY12-2X12">
2722 <entry>V4L2_MBUS_FMT_UYVY12_2X12</entry>
2723 <entry>0x201c</entry>
2724 <entry></entry>
2725 &dash-ent-20;
2726 <entry>u<subscript>11</subscript></entry>
2727 <entry>u<subscript>10</subscript></entry>
2728 <entry>u<subscript>9</subscript></entry>
2729 <entry>u<subscript>8</subscript></entry>
2730 <entry>u<subscript>7</subscript></entry>
2731 <entry>u<subscript>6</subscript></entry>
2732 <entry>u<subscript>5</subscript></entry>
2733 <entry>u<subscript>4</subscript></entry>
2734 <entry>u<subscript>3</subscript></entry>
2735 <entry>u<subscript>2</subscript></entry>
2736 <entry>u<subscript>1</subscript></entry>
2737 <entry>u<subscript>0</subscript></entry>
2738 </row>
2739 <row>
2740 <entry></entry>
2741 <entry></entry>
2742 <entry></entry>
2743 &dash-ent-20;
2744 <entry>y<subscript>11</subscript></entry>
2745 <entry>y<subscript>10</subscript></entry>
2746 <entry>y<subscript>9</subscript></entry>
2747 <entry>y<subscript>8</subscript></entry>
2748 <entry>y<subscript>7</subscript></entry>
2749 <entry>y<subscript>6</subscript></entry>
2750 <entry>y<subscript>5</subscript></entry>
2751 <entry>y<subscript>4</subscript></entry>
2752 <entry>y<subscript>3</subscript></entry>
2753 <entry>y<subscript>2</subscript></entry>
2754 <entry>y<subscript>1</subscript></entry>
2755 <entry>y<subscript>0</subscript></entry>
2756 </row>
2757 <row>
2758 <entry></entry>
2759 <entry></entry>
2760 <entry></entry>
2761 &dash-ent-20;
2762 <entry>v<subscript>11</subscript></entry>
2763 <entry>v<subscript>10</subscript></entry>
2764 <entry>v<subscript>9</subscript></entry>
2765 <entry>v<subscript>8</subscript></entry>
2766 <entry>v<subscript>7</subscript></entry>
2767 <entry>v<subscript>6</subscript></entry>
2768 <entry>v<subscript>5</subscript></entry>
2769 <entry>v<subscript>4</subscript></entry>
2770 <entry>v<subscript>3</subscript></entry>
2771 <entry>v<subscript>2</subscript></entry>
2772 <entry>v<subscript>1</subscript></entry>
2773 <entry>v<subscript>0</subscript></entry>
2774 </row>
2775 <row>
2776 <entry></entry>
2777 <entry></entry>
2778 <entry></entry>
2779 &dash-ent-20;
2780 <entry>y<subscript>11</subscript></entry>
2781 <entry>y<subscript>10</subscript></entry>
2782 <entry>y<subscript>9</subscript></entry>
2783 <entry>y<subscript>8</subscript></entry>
2784 <entry>y<subscript>7</subscript></entry>
2785 <entry>y<subscript>6</subscript></entry>
2786 <entry>y<subscript>5</subscript></entry>
2787 <entry>y<subscript>4</subscript></entry>
2788 <entry>y<subscript>3</subscript></entry>
2789 <entry>y<subscript>2</subscript></entry>
2790 <entry>y<subscript>1</subscript></entry>
2791 <entry>y<subscript>0</subscript></entry>
2792 </row>
2793 <row id="V4L2-MBUS-FMT-VYUY12-2X12">
2794 <entry>V4L2_MBUS_FMT_VYUY12_2X12</entry>
2795 <entry>0x201d</entry>
2796 <entry></entry>
2797 &dash-ent-20;
2798 <entry>v<subscript>11</subscript></entry>
2799 <entry>v<subscript>10</subscript></entry>
2800 <entry>v<subscript>9</subscript></entry>
2801 <entry>v<subscript>8</subscript></entry>
2802 <entry>v<subscript>7</subscript></entry>
2803 <entry>v<subscript>6</subscript></entry>
2804 <entry>v<subscript>5</subscript></entry>
2805 <entry>v<subscript>4</subscript></entry>
2806 <entry>v<subscript>3</subscript></entry>
2807 <entry>v<subscript>2</subscript></entry>
2808 <entry>v<subscript>1</subscript></entry>
2809 <entry>v<subscript>0</subscript></entry>
2810 </row>
2811 <row>
2812 <entry></entry>
2813 <entry></entry>
2814 <entry></entry>
2815 &dash-ent-20;
2816 <entry>y<subscript>11</subscript></entry>
2817 <entry>y<subscript>10</subscript></entry>
2818 <entry>y<subscript>9</subscript></entry>
2819 <entry>y<subscript>8</subscript></entry>
2820 <entry>y<subscript>7</subscript></entry>
2821 <entry>y<subscript>6</subscript></entry>
2822 <entry>y<subscript>5</subscript></entry>
2823 <entry>y<subscript>4</subscript></entry>
2824 <entry>y<subscript>3</subscript></entry>
2825 <entry>y<subscript>2</subscript></entry>
2826 <entry>y<subscript>1</subscript></entry>
2827 <entry>y<subscript>0</subscript></entry>
2828 </row>
2829 <row>
2830 <entry></entry>
2831 <entry></entry>
2832 <entry></entry>
2833 &dash-ent-20;
2834 <entry>u<subscript>11</subscript></entry>
2835 <entry>u<subscript>10</subscript></entry>
2836 <entry>u<subscript>9</subscript></entry>
2837 <entry>u<subscript>8</subscript></entry>
2838 <entry>u<subscript>7</subscript></entry>
2839 <entry>u<subscript>6</subscript></entry>
2840 <entry>u<subscript>5</subscript></entry>
2841 <entry>u<subscript>4</subscript></entry>
2842 <entry>u<subscript>3</subscript></entry>
2843 <entry>u<subscript>2</subscript></entry>
2844 <entry>u<subscript>1</subscript></entry>
2845 <entry>u<subscript>0</subscript></entry>
2846 </row>
2847 <row>
2848 <entry></entry>
2849 <entry></entry>
2850 <entry></entry>
2851 &dash-ent-20;
2852 <entry>y<subscript>11</subscript></entry>
2853 <entry>y<subscript>10</subscript></entry>
2854 <entry>y<subscript>9</subscript></entry>
2855 <entry>y<subscript>8</subscript></entry>
2856 <entry>y<subscript>7</subscript></entry>
2857 <entry>y<subscript>6</subscript></entry>
2858 <entry>y<subscript>5</subscript></entry>
2859 <entry>y<subscript>4</subscript></entry>
2860 <entry>y<subscript>3</subscript></entry>
2861 <entry>y<subscript>2</subscript></entry>
2862 <entry>y<subscript>1</subscript></entry>
2863 <entry>y<subscript>0</subscript></entry>
2864 </row>
2865 <row id="V4L2-MBUS-FMT-YUYV12-2X12">
2866 <entry>V4L2_MBUS_FMT_YUYV12_2X12</entry>
2867 <entry>0x201e</entry>
2868 <entry></entry>
2869 &dash-ent-20;
2870 <entry>y<subscript>11</subscript></entry>
2871 <entry>y<subscript>10</subscript></entry>
2872 <entry>y<subscript>9</subscript></entry>
2873 <entry>y<subscript>8</subscript></entry>
2874 <entry>y<subscript>7</subscript></entry>
2875 <entry>y<subscript>6</subscript></entry>
2876 <entry>y<subscript>5</subscript></entry>
2877 <entry>y<subscript>4</subscript></entry>
2878 <entry>y<subscript>3</subscript></entry>
2879 <entry>y<subscript>2</subscript></entry>
2880 <entry>y<subscript>1</subscript></entry>
2881 <entry>y<subscript>0</subscript></entry>
2882 </row>
2883 <row>
2884 <entry></entry>
2885 <entry></entry>
2886 <entry></entry>
2887 &dash-ent-20;
2888 <entry>u<subscript>11</subscript></entry>
2889 <entry>u<subscript>10</subscript></entry>
2890 <entry>u<subscript>9</subscript></entry>
2891 <entry>u<subscript>8</subscript></entry>
2892 <entry>u<subscript>7</subscript></entry>
2893 <entry>u<subscript>6</subscript></entry>
2894 <entry>u<subscript>5</subscript></entry>
2895 <entry>u<subscript>4</subscript></entry>
2896 <entry>u<subscript>3</subscript></entry>
2897 <entry>u<subscript>2</subscript></entry>
2898 <entry>u<subscript>1</subscript></entry>
2899 <entry>u<subscript>0</subscript></entry>
2900 </row>
2901 <row>
2902 <entry></entry>
2903 <entry></entry>
2904 <entry></entry>
2905 &dash-ent-20;
2906 <entry>y<subscript>11</subscript></entry>
2907 <entry>y<subscript>10</subscript></entry>
2908 <entry>y<subscript>9</subscript></entry>
2909 <entry>y<subscript>8</subscript></entry>
2910 <entry>y<subscript>7</subscript></entry>
2911 <entry>y<subscript>6</subscript></entry>
2912 <entry>y<subscript>5</subscript></entry>
2913 <entry>y<subscript>4</subscript></entry>
2914 <entry>y<subscript>3</subscript></entry>
2915 <entry>y<subscript>2</subscript></entry>
2916 <entry>y<subscript>1</subscript></entry>
2917 <entry>y<subscript>0</subscript></entry>
2918 </row>
2919 <row>
2920 <entry></entry>
2921 <entry></entry>
2922 <entry></entry>
2923 &dash-ent-20;
2924 <entry>v<subscript>11</subscript></entry>
2925 <entry>v<subscript>10</subscript></entry>
2926 <entry>v<subscript>9</subscript></entry>
2927 <entry>v<subscript>8</subscript></entry>
2928 <entry>v<subscript>7</subscript></entry>
2929 <entry>v<subscript>6</subscript></entry>
2930 <entry>v<subscript>5</subscript></entry>
2931 <entry>v<subscript>4</subscript></entry>
2932 <entry>v<subscript>3</subscript></entry>
2933 <entry>v<subscript>2</subscript></entry>
2934 <entry>v<subscript>1</subscript></entry>
2935 <entry>v<subscript>0</subscript></entry>
2936 </row>
2937 <row id="V4L2-MBUS-FMT-YVYU12-2X12">
2938 <entry>V4L2_MBUS_FMT_YVYU12_2X12</entry>
2939 <entry>0x201f</entry>
2940 <entry></entry>
2941 &dash-ent-20;
2942 <entry>y<subscript>11</subscript></entry>
2943 <entry>y<subscript>10</subscript></entry>
2944 <entry>y<subscript>9</subscript></entry>
2945 <entry>y<subscript>8</subscript></entry>
2946 <entry>y<subscript>7</subscript></entry>
2947 <entry>y<subscript>6</subscript></entry>
2948 <entry>y<subscript>5</subscript></entry>
2949 <entry>y<subscript>4</subscript></entry>
2950 <entry>y<subscript>3</subscript></entry>
2951 <entry>y<subscript>2</subscript></entry>
2952 <entry>y<subscript>1</subscript></entry>
2953 <entry>y<subscript>0</subscript></entry>
2954 </row>
2955 <row>
2956 <entry></entry>
2957 <entry></entry>
2958 <entry></entry>
2959 &dash-ent-20;
2960 <entry>v<subscript>11</subscript></entry>
2961 <entry>v<subscript>10</subscript></entry>
2962 <entry>v<subscript>9</subscript></entry>
2963 <entry>v<subscript>8</subscript></entry>
2964 <entry>v<subscript>7</subscript></entry>
2965 <entry>v<subscript>6</subscript></entry>
2966 <entry>v<subscript>5</subscript></entry>
2967 <entry>v<subscript>4</subscript></entry>
2968 <entry>v<subscript>3</subscript></entry>
2969 <entry>v<subscript>2</subscript></entry>
2970 <entry>v<subscript>1</subscript></entry>
2971 <entry>v<subscript>0</subscript></entry>
2972 </row>
2973 <row>
2974 <entry></entry>
2975 <entry></entry>
2976 <entry></entry>
2977 &dash-ent-20;
2978 <entry>y<subscript>11</subscript></entry>
2979 <entry>y<subscript>10</subscript></entry>
2980 <entry>y<subscript>9</subscript></entry>
2981 <entry>y<subscript>8</subscript></entry>
2982 <entry>y<subscript>7</subscript></entry>
2983 <entry>y<subscript>6</subscript></entry>
2984 <entry>y<subscript>5</subscript></entry>
2985 <entry>y<subscript>4</subscript></entry>
2986 <entry>y<subscript>3</subscript></entry>
2987 <entry>y<subscript>2</subscript></entry>
2988 <entry>y<subscript>1</subscript></entry>
2989 <entry>y<subscript>0</subscript></entry>
2990 </row>
2991 <row>
2992 <entry></entry>
2993 <entry></entry>
2994 <entry></entry>
2995 &dash-ent-20;
2996 <entry>u<subscript>11</subscript></entry>
2997 <entry>u<subscript>10</subscript></entry>
2998 <entry>u<subscript>9</subscript></entry>
2999 <entry>u<subscript>8</subscript></entry>
3000 <entry>u<subscript>7</subscript></entry>
3001 <entry>u<subscript>6</subscript></entry>
3002 <entry>u<subscript>5</subscript></entry>
3003 <entry>u<subscript>4</subscript></entry>
3004 <entry>u<subscript>3</subscript></entry>
3005 <entry>u<subscript>2</subscript></entry>
3006 <entry>u<subscript>1</subscript></entry>
3007 <entry>u<subscript>0</subscript></entry>
3008 </row>
3009 <row id="V4L2-MBUS-FMT-UYVY12-1X24">
3010 <entry>V4L2_MBUS_FMT_UYVY12_1X24</entry>
3011 <entry>0x2020</entry>
3012 <entry></entry>
3013 &dash-ent-8;
3014 <entry>u<subscript>11</subscript></entry>
3015 <entry>u<subscript>10</subscript></entry>
3016 <entry>u<subscript>9</subscript></entry>
3017 <entry>u<subscript>8</subscript></entry>
3018 <entry>u<subscript>7</subscript></entry>
3019 <entry>u<subscript>6</subscript></entry>
3020 <entry>u<subscript>5</subscript></entry>
3021 <entry>u<subscript>4</subscript></entry>
3022 <entry>u<subscript>3</subscript></entry>
3023 <entry>u<subscript>2</subscript></entry>
3024 <entry>u<subscript>1</subscript></entry>
3025 <entry>u<subscript>0</subscript></entry>
3026 <entry>y<subscript>11</subscript></entry>
3027 <entry>y<subscript>10</subscript></entry>
3028 <entry>y<subscript>9</subscript></entry>
3029 <entry>y<subscript>8</subscript></entry>
3030 <entry>y<subscript>7</subscript></entry>
3031 <entry>y<subscript>6</subscript></entry>
3032 <entry>y<subscript>5</subscript></entry>
3033 <entry>y<subscript>4</subscript></entry>
3034 <entry>y<subscript>3</subscript></entry>
3035 <entry>y<subscript>2</subscript></entry>
3036 <entry>y<subscript>1</subscript></entry>
3037 <entry>y<subscript>0</subscript></entry>
3038 </row>
3039 <row>
3040 <entry></entry>
3041 <entry></entry>
3042 <entry></entry>
3043 &dash-ent-8;
3044 <entry>v<subscript>11</subscript></entry>
3045 <entry>v<subscript>10</subscript></entry>
3046 <entry>v<subscript>9</subscript></entry>
3047 <entry>v<subscript>8</subscript></entry>
3048 <entry>v<subscript>7</subscript></entry>
3049 <entry>v<subscript>6</subscript></entry>
3050 <entry>v<subscript>5</subscript></entry>
3051 <entry>v<subscript>4</subscript></entry>
3052 <entry>v<subscript>3</subscript></entry>
3053 <entry>v<subscript>2</subscript></entry>
3054 <entry>v<subscript>1</subscript></entry>
3055 <entry>v<subscript>0</subscript></entry>
3056 <entry>y<subscript>11</subscript></entry>
3057 <entry>y<subscript>10</subscript></entry>
3058 <entry>y<subscript>9</subscript></entry>
3059 <entry>y<subscript>8</subscript></entry>
3060 <entry>y<subscript>7</subscript></entry>
3061 <entry>y<subscript>6</subscript></entry>
3062 <entry>y<subscript>5</subscript></entry>
3063 <entry>y<subscript>4</subscript></entry>
3064 <entry>y<subscript>3</subscript></entry>
3065 <entry>y<subscript>2</subscript></entry>
3066 <entry>y<subscript>1</subscript></entry>
3067 <entry>y<subscript>0</subscript></entry>
3068 </row>
3069 <row id="V4L2-MBUS-FMT-VYUY12-1X24">
3070 <entry>V4L2_MBUS_FMT_VYUY12_1X24</entry>
3071 <entry>0x2021</entry>
3072 <entry></entry>
3073 &dash-ent-8;
3074 <entry>v<subscript>11</subscript></entry>
3075 <entry>v<subscript>10</subscript></entry>
3076 <entry>v<subscript>9</subscript></entry>
3077 <entry>v<subscript>8</subscript></entry>
3078 <entry>v<subscript>7</subscript></entry>
3079 <entry>v<subscript>6</subscript></entry>
3080 <entry>v<subscript>5</subscript></entry>
3081 <entry>v<subscript>4</subscript></entry>
3082 <entry>v<subscript>3</subscript></entry>
3083 <entry>v<subscript>2</subscript></entry>
3084 <entry>v<subscript>1</subscript></entry>
3085 <entry>v<subscript>0</subscript></entry>
3086 <entry>y<subscript>11</subscript></entry>
3087 <entry>y<subscript>10</subscript></entry>
3088 <entry>y<subscript>9</subscript></entry>
3089 <entry>y<subscript>8</subscript></entry>
3090 <entry>y<subscript>7</subscript></entry>
3091 <entry>y<subscript>6</subscript></entry>
3092 <entry>y<subscript>5</subscript></entry>
3093 <entry>y<subscript>4</subscript></entry>
3094 <entry>y<subscript>3</subscript></entry>
3095 <entry>y<subscript>2</subscript></entry>
3096 <entry>y<subscript>1</subscript></entry>
3097 <entry>y<subscript>0</subscript></entry>
3098 </row>
3099 <row>
3100 <entry></entry>
3101 <entry></entry>
3102 <entry></entry>
3103 &dash-ent-8;
3104 <entry>u<subscript>11</subscript></entry>
3105 <entry>u<subscript>10</subscript></entry>
3106 <entry>u<subscript>9</subscript></entry>
3107 <entry>u<subscript>8</subscript></entry>
3108 <entry>u<subscript>7</subscript></entry>
3109 <entry>u<subscript>6</subscript></entry>
3110 <entry>u<subscript>5</subscript></entry>
3111 <entry>u<subscript>4</subscript></entry>
3112 <entry>u<subscript>3</subscript></entry>
3113 <entry>u<subscript>2</subscript></entry>
3114 <entry>u<subscript>1</subscript></entry>
3115 <entry>u<subscript>0</subscript></entry>
3116 <entry>y<subscript>11</subscript></entry>
3117 <entry>y<subscript>10</subscript></entry>
3118 <entry>y<subscript>9</subscript></entry>
3119 <entry>y<subscript>8</subscript></entry>
3120 <entry>y<subscript>7</subscript></entry>
3121 <entry>y<subscript>6</subscript></entry>
3122 <entry>y<subscript>5</subscript></entry>
3123 <entry>y<subscript>4</subscript></entry>
3124 <entry>y<subscript>3</subscript></entry>
3125 <entry>y<subscript>2</subscript></entry>
3126 <entry>y<subscript>1</subscript></entry>
3127 <entry>y<subscript>0</subscript></entry>
3128 </row>
3129 <row id="V4L2-MBUS-FMT-YUYV12-1X24">
3130 <entry>V4L2_MBUS_FMT_YUYV12_1X24</entry>
3131 <entry>0x2022</entry>
3132 <entry></entry>
3133 &dash-ent-8;
3134 <entry>y<subscript>11</subscript></entry>
3135 <entry>y<subscript>10</subscript></entry>
3136 <entry>y<subscript>9</subscript></entry>
3137 <entry>y<subscript>8</subscript></entry>
3138 <entry>y<subscript>7</subscript></entry>
3139 <entry>y<subscript>6</subscript></entry>
3140 <entry>y<subscript>5</subscript></entry>
3141 <entry>y<subscript>4</subscript></entry>
3142 <entry>y<subscript>3</subscript></entry>
3143 <entry>y<subscript>2</subscript></entry>
3144 <entry>y<subscript>1</subscript></entry>
3145 <entry>y<subscript>0</subscript></entry>
3146 <entry>u<subscript>11</subscript></entry>
3147 <entry>u<subscript>10</subscript></entry>
3148 <entry>u<subscript>9</subscript></entry>
3149 <entry>u<subscript>8</subscript></entry>
3150 <entry>u<subscript>7</subscript></entry>
3151 <entry>u<subscript>6</subscript></entry>
3152 <entry>u<subscript>5</subscript></entry>
3153 <entry>u<subscript>4</subscript></entry>
3154 <entry>u<subscript>3</subscript></entry>
3155 <entry>u<subscript>2</subscript></entry>
3156 <entry>u<subscript>1</subscript></entry>
3157 <entry>u<subscript>0</subscript></entry>
3158 </row>
3159 <row>
3160 <entry></entry>
3161 <entry></entry>
3162 <entry></entry>
3163 &dash-ent-8;
3164 <entry>y<subscript>11</subscript></entry>
3165 <entry>y<subscript>10</subscript></entry>
3166 <entry>y<subscript>9</subscript></entry>
3167 <entry>y<subscript>8</subscript></entry>
3168 <entry>y<subscript>7</subscript></entry>
3169 <entry>y<subscript>6</subscript></entry>
3170 <entry>y<subscript>5</subscript></entry>
3171 <entry>y<subscript>4</subscript></entry>
3172 <entry>y<subscript>3</subscript></entry>
3173 <entry>y<subscript>2</subscript></entry>
3174 <entry>y<subscript>1</subscript></entry>
3175 <entry>y<subscript>0</subscript></entry>
3176 <entry>v<subscript>11</subscript></entry>
3177 <entry>v<subscript>10</subscript></entry>
3178 <entry>v<subscript>9</subscript></entry>
3179 <entry>v<subscript>8</subscript></entry>
3180 <entry>v<subscript>7</subscript></entry>
3181 <entry>v<subscript>6</subscript></entry>
3182 <entry>v<subscript>5</subscript></entry>
3183 <entry>v<subscript>4</subscript></entry>
3184 <entry>v<subscript>3</subscript></entry>
3185 <entry>v<subscript>2</subscript></entry>
3186 <entry>v<subscript>1</subscript></entry>
3187 <entry>v<subscript>0</subscript></entry>
3188 </row>
3189 <row id="V4L2-MBUS-FMT-YVYU12-1X24">
3190 <entry>V4L2_MBUS_FMT_YVYU12_1X24</entry>
3191 <entry>0x2023</entry>
3192 <entry></entry>
3193 &dash-ent-8;
3194 <entry>y<subscript>11</subscript></entry>
3195 <entry>y<subscript>10</subscript></entry>
3196 <entry>y<subscript>9</subscript></entry>
3197 <entry>y<subscript>8</subscript></entry>
3198 <entry>y<subscript>7</subscript></entry>
3199 <entry>y<subscript>6</subscript></entry>
3200 <entry>y<subscript>5</subscript></entry>
3201 <entry>y<subscript>4</subscript></entry>
3202 <entry>y<subscript>3</subscript></entry>
3203 <entry>y<subscript>2</subscript></entry>
3204 <entry>y<subscript>1</subscript></entry>
3205 <entry>y<subscript>0</subscript></entry>
3206 <entry>v<subscript>11</subscript></entry>
3207 <entry>v<subscript>10</subscript></entry>
3208 <entry>v<subscript>9</subscript></entry>
3209 <entry>v<subscript>8</subscript></entry>
3210 <entry>v<subscript>7</subscript></entry>
3211 <entry>v<subscript>6</subscript></entry>
3212 <entry>v<subscript>5</subscript></entry>
3213 <entry>v<subscript>4</subscript></entry>
3214 <entry>v<subscript>3</subscript></entry>
3215 <entry>v<subscript>2</subscript></entry>
3216 <entry>v<subscript>1</subscript></entry>
3217 <entry>v<subscript>0</subscript></entry>
3218 </row>
3219 <row>
3220 <entry></entry>
3221 <entry></entry>
3222 <entry></entry>
3223 &dash-ent-8;
3224 <entry>y<subscript>11</subscript></entry>
3225 <entry>y<subscript>10</subscript></entry>
3226 <entry>y<subscript>9</subscript></entry>
3227 <entry>y<subscript>8</subscript></entry>
3228 <entry>y<subscript>7</subscript></entry>
3229 <entry>y<subscript>6</subscript></entry>
3230 <entry>y<subscript>5</subscript></entry>
3231 <entry>y<subscript>4</subscript></entry>
3232 <entry>y<subscript>3</subscript></entry>
3233 <entry>y<subscript>2</subscript></entry>
3234 <entry>y<subscript>1</subscript></entry>
3235 <entry>y<subscript>0</subscript></entry>
3236 <entry>u<subscript>11</subscript></entry>
3237 <entry>u<subscript>10</subscript></entry>
3238 <entry>u<subscript>9</subscript></entry>
3239 <entry>u<subscript>8</subscript></entry>
3240 <entry>u<subscript>7</subscript></entry>
3241 <entry>u<subscript>6</subscript></entry>
3242 <entry>u<subscript>5</subscript></entry>
3243 <entry>u<subscript>4</subscript></entry>
3244 <entry>u<subscript>3</subscript></entry>
3245 <entry>u<subscript>2</subscript></entry>
3246 <entry>u<subscript>1</subscript></entry>
3247 <entry>u<subscript>0</subscript></entry>
3248 </row>
2489 </tbody> 3249 </tbody>
2490 </tgroup> 3250 </tgroup>
2491 </table> 3251 </table>
diff --git a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
index 89891adb928a..820f86e8744b 100644
--- a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
@@ -242,6 +242,22 @@
242 </tgroup> 242 </tgroup>
243 </table> 243 </table>
244 244
245 <table frame="none" pgwide="1" id="v4l2-event-src-change">
246 <title>struct <structname>v4l2_event_src_change</structname></title>
247 <tgroup cols="3">
248 &cs-str;
249 <tbody valign="top">
250 <row>
251 <entry>__u32</entry>
252 <entry><structfield>changes</structfield></entry>
253 <entry>
254 A bitmask that tells what has changed. See <xref linkend="src-changes-flags" />.
255 </entry>
256 </row>
257 </tbody>
258 </tgroup>
259 </table>
260
245 <table pgwide="1" frame="none" id="changes-flags"> 261 <table pgwide="1" frame="none" id="changes-flags">
246 <title>Changes</title> 262 <title>Changes</title>
247 <tgroup cols="3"> 263 <tgroup cols="3">
@@ -270,6 +286,23 @@
270 </tbody> 286 </tbody>
271 </tgroup> 287 </tgroup>
272 </table> 288 </table>
289
290 <table pgwide="1" frame="none" id="src-changes-flags">
291 <title>Source Changes</title>
292 <tgroup cols="3">
293 &cs-def;
294 <tbody valign="top">
295 <row>
296 <entry><constant>V4L2_EVENT_SRC_CH_RESOLUTION</constant></entry>
297 <entry>0x0001</entry>
298 <entry>This event gets triggered when a resolution change is
299 detected at an input. This can come from an input connector or
300 from a video decoder.
301 </entry>
302 </row>
303 </tbody>
304 </tgroup>
305 </table>
273 </refsect1> 306 </refsect1>
274 <refsect1> 307 <refsect1>
275 &return-value; 308 &return-value;
diff --git a/Documentation/DocBook/media/v4l/vidioc-dv-timings-cap.xml b/Documentation/DocBook/media/v4l/vidioc-dv-timings-cap.xml
index cd7720d404ea..28a8c1e1c705 100644
--- a/Documentation/DocBook/media/v4l/vidioc-dv-timings-cap.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-dv-timings-cap.xml
@@ -1,11 +1,12 @@
1<refentry id="vidioc-dv-timings-cap"> 1<refentry id="vidioc-dv-timings-cap">
2 <refmeta> 2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_DV_TIMINGS_CAP</refentrytitle> 3 <refentrytitle>ioctl VIDIOC_DV_TIMINGS_CAP, VIDIOC_SUBDEV_DV_TIMINGS_CAP</refentrytitle>
4 &manvol; 4 &manvol;
5 </refmeta> 5 </refmeta>
6 6
7 <refnamediv> 7 <refnamediv>
8 <refname>VIDIOC_DV_TIMINGS_CAP</refname> 8 <refname>VIDIOC_DV_TIMINGS_CAP</refname>
9 <refname>VIDIOC_SUBDEV_DV_TIMINGS_CAP</refname>
9 <refpurpose>The capabilities of the Digital Video receiver/transmitter</refpurpose> 10 <refpurpose>The capabilities of the Digital Video receiver/transmitter</refpurpose>
10 </refnamediv> 11 </refnamediv>
11 12
@@ -33,7 +34,7 @@
33 <varlistentry> 34 <varlistentry>
34 <term><parameter>request</parameter></term> 35 <term><parameter>request</parameter></term>
35 <listitem> 36 <listitem>
36 <para>VIDIOC_DV_TIMINGS_CAP</para> 37 <para>VIDIOC_DV_TIMINGS_CAP, VIDIOC_SUBDEV_DV_TIMINGS_CAP</para>
37 </listitem> 38 </listitem>
38 </varlistentry> 39 </varlistentry>
39 <varlistentry> 40 <varlistentry>
@@ -54,10 +55,19 @@
54 interface and may change in the future.</para> 55 interface and may change in the future.</para>
55 </note> 56 </note>
56 57
57 <para>To query the capabilities of the DV receiver/transmitter applications can call 58 <para>To query the capabilities of the DV receiver/transmitter applications
58this ioctl and the driver will fill in the structure. Note that drivers may return 59can call the <constant>VIDIOC_DV_TIMINGS_CAP</constant> ioctl on a video node
60and the driver will fill in the structure. Note that drivers may return
59different values after switching the video input or output.</para> 61different values after switching the video input or output.</para>
60 62
63 <para>When implemented by the driver DV capabilities of subdevices can be
64queried by calling the <constant>VIDIOC_SUBDEV_DV_TIMINGS_CAP</constant> ioctl
65directly on a subdevice node. The capabilities are specific to inputs (for DV
66receivers) or outputs (for DV transmitters), applications must specify the
67desired pad number in the &v4l2-dv-timings-cap; <structfield>pad</structfield>
68field. Attempts to query capabilities on a pad that doesn't support them will
69return an &EINVAL;.</para>
70
61 <table pgwide="1" frame="none" id="v4l2-bt-timings-cap"> 71 <table pgwide="1" frame="none" id="v4l2-bt-timings-cap">
62 <title>struct <structname>v4l2_bt_timings_cap</structname></title> 72 <title>struct <structname>v4l2_bt_timings_cap</structname></title>
63 <tgroup cols="3"> 73 <tgroup cols="3">
@@ -127,7 +137,14 @@ different values after switching the video input or output.</para>
127 </row> 137 </row>
128 <row> 138 <row>
129 <entry>__u32</entry> 139 <entry>__u32</entry>
130 <entry><structfield>reserved</structfield>[3]</entry> 140 <entry><structfield>pad</structfield></entry>
141 <entry>Pad number as reported by the media controller API. This field
142 is only used when operating on a subdevice node. When operating on a
143 video node applications must set this field to zero.</entry>
144 </row>
145 <row>
146 <entry>__u32</entry>
147 <entry><structfield>reserved</structfield>[2]</entry>
131 <entry>Reserved for future extensions. Drivers must set the array to zero.</entry> 148 <entry>Reserved for future extensions. Drivers must set the array to zero.</entry>
132 </row> 149 </row>
133 <row> 150 <row>
diff --git a/Documentation/DocBook/media/v4l/vidioc-enum-dv-timings.xml b/Documentation/DocBook/media/v4l/vidioc-enum-dv-timings.xml
index b3e17c1dfaf5..b9fdfeacdbcb 100644
--- a/Documentation/DocBook/media/v4l/vidioc-enum-dv-timings.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-enum-dv-timings.xml
@@ -1,11 +1,12 @@
1<refentry id="vidioc-enum-dv-timings"> 1<refentry id="vidioc-enum-dv-timings">
2 <refmeta> 2 <refmeta>
3 <refentrytitle>ioctl VIDIOC_ENUM_DV_TIMINGS</refentrytitle> 3 <refentrytitle>ioctl VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS</refentrytitle>
4 &manvol; 4 &manvol;
5 </refmeta> 5 </refmeta>
6 6
7 <refnamediv> 7 <refnamediv>
8 <refname>VIDIOC_ENUM_DV_TIMINGS</refname> 8 <refname>VIDIOC_ENUM_DV_TIMINGS</refname>
9 <refname>VIDIOC_SUBDEV_ENUM_DV_TIMINGS</refname>
9 <refpurpose>Enumerate supported Digital Video timings</refpurpose> 10 <refpurpose>Enumerate supported Digital Video timings</refpurpose>
10 </refnamediv> 11 </refnamediv>
11 12
@@ -33,7 +34,7 @@
33 <varlistentry> 34 <varlistentry>
34 <term><parameter>request</parameter></term> 35 <term><parameter>request</parameter></term>
35 <listitem> 36 <listitem>
36 <para>VIDIOC_ENUM_DV_TIMINGS</para> 37 <para>VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS</para>
37 </listitem> 38 </listitem>
38 </varlistentry> 39 </varlistentry>
39 <varlistentry> 40 <varlistentry>
@@ -61,14 +62,21 @@ standards or even custom timings that are not in this list.</para>
61 62
62 <para>To query the available timings, applications initialize the 63 <para>To query the available timings, applications initialize the
63<structfield>index</structfield> field and zero the reserved array of &v4l2-enum-dv-timings; 64<structfield>index</structfield> field and zero the reserved array of &v4l2-enum-dv-timings;
64and call the <constant>VIDIOC_ENUM_DV_TIMINGS</constant> ioctl with a pointer to this 65and call the <constant>VIDIOC_ENUM_DV_TIMINGS</constant> ioctl on a video node with a
65structure. Drivers fill the rest of the structure or return an 66pointer to this structure. Drivers fill the rest of the structure or return an
66&EINVAL; when the index is out of bounds. To enumerate all supported DV timings, 67&EINVAL; when the index is out of bounds. To enumerate all supported DV timings,
67applications shall begin at index zero, incrementing by one until the 68applications shall begin at index zero, incrementing by one until the
68driver returns <errorcode>EINVAL</errorcode>. Note that drivers may enumerate a 69driver returns <errorcode>EINVAL</errorcode>. Note that drivers may enumerate a
69different set of DV timings after switching the video input or 70different set of DV timings after switching the video input or
70output.</para> 71output.</para>
71 72
73 <para>When implemented by the driver DV timings of subdevices can be queried
74by calling the <constant>VIDIOC_SUBDEV_ENUM_DV_TIMINGS</constant> ioctl directly
75on a subdevice node. The DV timings are specific to inputs (for DV receivers) or
76outputs (for DV transmitters), applications must specify the desired pad number
77in the &v4l2-enum-dv-timings; <structfield>pad</structfield> field. Attempts to
78enumerate timings on a pad that doesn't support them will return an &EINVAL;.</para>
79
72 <table pgwide="1" frame="none" id="v4l2-enum-dv-timings"> 80 <table pgwide="1" frame="none" id="v4l2-enum-dv-timings">
73 <title>struct <structname>v4l2_enum_dv_timings</structname></title> 81 <title>struct <structname>v4l2_enum_dv_timings</structname></title>
74 <tgroup cols="3"> 82 <tgroup cols="3">
@@ -82,8 +90,16 @@ application.</entry>
82 </row> 90 </row>
83 <row> 91 <row>
84 <entry>__u32</entry> 92 <entry>__u32</entry>
85 <entry><structfield>reserved</structfield>[3]</entry> 93 <entry><structfield>pad</structfield></entry>
86 <entry>Reserved for future extensions. Drivers must set the array to zero.</entry> 94 <entry>Pad number as reported by the media controller API. This field
95 is only used when operating on a subdevice node. When operating on a
96 video node applications must set this field to zero.</entry>
97 </row>
98 <row>
99 <entry>__u32</entry>
100 <entry><structfield>reserved</structfield>[2]</entry>
101 <entry>Reserved for future extensions. Drivers and applications must
102 set the array to zero.</entry>
87 </row> 103 </row>
88 <row> 104 <row>
89 <entry>&v4l2-dv-timings;</entry> 105 <entry>&v4l2-dv-timings;</entry>
@@ -103,7 +119,7 @@ application.</entry>
103 <term><errorcode>EINVAL</errorcode></term> 119 <term><errorcode>EINVAL</errorcode></term>
104 <listitem> 120 <listitem>
105 <para>The &v4l2-enum-dv-timings; <structfield>index</structfield> 121 <para>The &v4l2-enum-dv-timings; <structfield>index</structfield>
106is out of bounds.</para> 122is out of bounds or the <structfield>pad</structfield> number is invalid.</para>
107 </listitem> 123 </listitem>
108 </varlistentry> 124 </varlistentry>
109 <varlistentry> 125 <varlistentry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml b/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml
index 5c70b616d818..17efa870d4d2 100644
--- a/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml
@@ -155,6 +155,26 @@
155 </entry> 155 </entry>
156 </row> 156 </row>
157 <row> 157 <row>
158 <entry><constant>V4L2_EVENT_SOURCE_CHANGE</constant></entry>
159 <entry>5</entry>
160 <entry>
161 <para>This event is triggered when a source parameter change is
162 detected during runtime by the video device. It can be a
163 runtime resolution change triggered by a video decoder or the
164 format change happening on an input connector.
165 This event requires that the <structfield>id</structfield>
166 matches the input index (when used with a video device node)
167 or the pad index (when used with a subdevice node) from which
168 you want to receive events.</para>
169
170 <para>This event has a &v4l2-event-src-change; associated
171 with it. The <structfield>changes</structfield> bitfield denotes
172 what has changed for the subscribed pad. If multiple events
173 occurred before application could dequeue them, then the changes
174 will have the ORed value of all the events generated.</para>
175 </entry>
176 </row>
177 <row>
158 <entry><constant>V4L2_EVENT_PRIVATE_START</constant></entry> 178 <entry><constant>V4L2_EVENT_PRIVATE_START</constant></entry>
159 <entry>0x08000000</entry> 179 <entry>0x08000000</entry>
160 <entry>Base event number for driver-private events.</entry> 180 <entry>Base event number for driver-private events.</entry>
diff --git a/Documentation/DocBook/media_api.tmpl b/Documentation/DocBook/media_api.tmpl
index 4decb46bfa76..03f9a1f8d413 100644
--- a/Documentation/DocBook/media_api.tmpl
+++ b/Documentation/DocBook/media_api.tmpl
@@ -68,7 +68,7 @@
68 several digital tv standards. While it is called as DVB API, 68 several digital tv standards. While it is called as DVB API,
69 in fact it covers several different video standards including 69 in fact it covers several different video standards including
70 DVB-T, DVB-S, DVB-C and ATSC. The API is currently being updated 70 DVB-T, DVB-S, DVB-C and ATSC. The API is currently being updated
71 to documment support also for DVB-S2, ISDB-T and ISDB-S.</para> 71 to document support also for DVB-S2, ISDB-T and ISDB-S.</para>
72 <para>The third part covers the Remote Controller API.</para> 72 <para>The third part covers the Remote Controller API.</para>
73 <para>The fourth part covers the Media Controller API.</para> 73 <para>The fourth part covers the Media Controller API.</para>
74 <para>For additional information and for the latest development code, 74 <para>For additional information and for the latest development code,
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index cd11926e07c7..7da8f0402af5 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -91,7 +91,7 @@
91 <listitem><para> 91 <listitem><para>
92 [MTD Interface]</para><para> 92 [MTD Interface]</para><para>
93 These functions provide the interface to the MTD kernel API. 93 These functions provide the interface to the MTD kernel API.
94 They are not replacable and provide functionality 94 They are not replaceable and provide functionality
95 which is complete hardware independent. 95 which is complete hardware independent.
96 </para></listitem> 96 </para></listitem>
97 <listitem><para> 97 <listitem><para>
@@ -100,14 +100,14 @@
100 </para></listitem> 100 </para></listitem>
101 <listitem><para> 101 <listitem><para>
102 [GENERIC]</para><para> 102 [GENERIC]</para><para>
103 Generic functions are not replacable and provide functionality 103 Generic functions are not replaceable and provide functionality
104 which is complete hardware independent. 104 which is complete hardware independent.
105 </para></listitem> 105 </para></listitem>
106 <listitem><para> 106 <listitem><para>
107 [DEFAULT]</para><para> 107 [DEFAULT]</para><para>
108 Default functions provide hardware related functionality which is suitable 108 Default functions provide hardware related functionality which is suitable
109 for most of the implementations. These functions can be replaced by the 109 for most of the implementations. These functions can be replaced by the
110 board driver if neccecary. Those functions are called via pointers in the 110 board driver if necessary. Those functions are called via pointers in the
111 NAND chip description structure. The board driver can set the functions which 111 NAND chip description structure. The board driver can set the functions which
112 should be replaced by board dependent functions before calling nand_scan(). 112 should be replaced by board dependent functions before calling nand_scan().
113 If the function pointer is NULL on entry to nand_scan() then the pointer 113 If the function pointer is NULL on entry to nand_scan() then the pointer
@@ -264,7 +264,7 @@ static void board_hwcontrol(struct mtd_info *mtd, int cmd)
264 is set up nand_scan() is called. This function tries to 264 is set up nand_scan() is called. This function tries to
265 detect and identify then chip. If a chip is found all the 265 detect and identify then chip. If a chip is found all the
266 internal data fields are initialized accordingly. 266 internal data fields are initialized accordingly.
267 The structure(s) have to be zeroed out first and then filled with the neccecary 267 The structure(s) have to be zeroed out first and then filled with the necessary
268 information about the device. 268 information about the device.
269 </para> 269 </para>
270 <programlisting> 270 <programlisting>
@@ -327,7 +327,7 @@ module_init(board_init);
327 <sect1 id="Exit_function"> 327 <sect1 id="Exit_function">
328 <title>Exit function</title> 328 <title>Exit function</title>
329 <para> 329 <para>
330 The exit function is only neccecary if the driver is 330 The exit function is only necessary if the driver is
331 compiled as a module. It releases all resources which 331 compiled as a module. It releases all resources which
332 are held by the chip driver and unregisters the partitions 332 are held by the chip driver and unregisters the partitions
333 in the MTD layer. 333 in the MTD layer.
@@ -494,7 +494,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
494 in this case. See rts_from4.c and diskonchip.c for 494 in this case. See rts_from4.c and diskonchip.c for
495 implementation reference. In those cases we must also 495 implementation reference. In those cases we must also
496 use bad block tables on FLASH, because the ECC layout is 496 use bad block tables on FLASH, because the ECC layout is
497 interferring with the bad block marker positions. 497 interfering with the bad block marker positions.
498 See bad block table support for details. 498 See bad block table support for details.
499 </para> 499 </para>
500 </sect2> 500 </sect2>
@@ -542,7 +542,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
542 <para> 542 <para>
543 nand_scan() calls the function nand_default_bbt(). 543 nand_scan() calls the function nand_default_bbt().
544 nand_default_bbt() selects appropriate default 544 nand_default_bbt() selects appropriate default
545 bad block table desriptors depending on the chip information 545 bad block table descriptors depending on the chip information
546 which was retrieved by nand_scan(). 546 which was retrieved by nand_scan().
547 </para> 547 </para>
548 <para> 548 <para>
@@ -554,7 +554,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
554 <sect2 id="Flash_based_tables"> 554 <sect2 id="Flash_based_tables">
555 <title>Flash based tables</title> 555 <title>Flash based tables</title>
556 <para> 556 <para>
557 It may be desired or neccecary to keep a bad block table in FLASH. 557 It may be desired or necessary to keep a bad block table in FLASH.
558 For AG-AND chips this is mandatory, as they have no factory marked 558 For AG-AND chips this is mandatory, as they have no factory marked
559 bad blocks. They have factory marked good blocks. The marker pattern 559 bad blocks. They have factory marked good blocks. The marker pattern
560 is erased when the block is erased to be reused. So in case of 560 is erased when the block is erased to be reused. So in case of
@@ -565,10 +565,10 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
565 of the blocks. 565 of the blocks.
566 </para> 566 </para>
567 <para> 567 <para>
568 The blocks in which the tables are stored are procteted against 568 The blocks in which the tables are stored are protected against
569 accidental access by marking them bad in the memory bad block 569 accidental access by marking them bad in the memory bad block
570 table. The bad block table management functions are allowed 570 table. The bad block table management functions are allowed
571 to circumvernt this protection. 571 to circumvent this protection.
572 </para> 572 </para>
573 <para> 573 <para>
574 The simplest way to activate the FLASH based bad block table support 574 The simplest way to activate the FLASH based bad block table support
@@ -592,7 +592,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
592 User defined tables are created by filling out a 592 User defined tables are created by filling out a
593 nand_bbt_descr structure and storing the pointer in the 593 nand_bbt_descr structure and storing the pointer in the
594 nand_chip structure member bbt_td before calling nand_scan(). 594 nand_chip structure member bbt_td before calling nand_scan().
595 If a mirror table is neccecary a second structure must be 595 If a mirror table is necessary a second structure must be
596 created and a pointer to this structure must be stored 596 created and a pointer to this structure must be stored
597 in bbt_md inside the nand_chip structure. If the bbt_md 597 in bbt_md inside the nand_chip structure. If the bbt_md
598 member is set to NULL then only the main table is used 598 member is set to NULL then only the main table is used
@@ -666,7 +666,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
666 <para> 666 <para>
667 For automatic placement some blocks must be reserved for 667 For automatic placement some blocks must be reserved for
668 bad block table storage. The number of reserved blocks is defined 668 bad block table storage. The number of reserved blocks is defined
669 in the maxblocks member of the babd block table description structure. 669 in the maxblocks member of the bad block table description structure.
670 Reserving 4 blocks for mirrored tables should be a reasonable number. 670 Reserving 4 blocks for mirrored tables should be a reasonable number.
671 This also limits the number of blocks which are scanned for the bad 671 This also limits the number of blocks which are scanned for the bad
672 block table ident pattern. 672 block table ident pattern.
@@ -1068,11 +1068,11 @@ in this page</entry>
1068 <chapter id="filesystems"> 1068 <chapter id="filesystems">
1069 <title>Filesystem support</title> 1069 <title>Filesystem support</title>
1070 <para> 1070 <para>
1071 The NAND driver provides all neccecary functions for a 1071 The NAND driver provides all necessary functions for a
1072 filesystem via the MTD interface. 1072 filesystem via the MTD interface.
1073 </para> 1073 </para>
1074 <para> 1074 <para>
1075 Filesystems must be aware of the NAND pecularities and 1075 Filesystems must be aware of the NAND peculiarities and
1076 restrictions. One major restrictions of NAND Flash is, that you cannot 1076 restrictions. One major restrictions of NAND Flash is, that you cannot
1077 write as often as you want to a page. The consecutive writes to a page, 1077 write as often as you want to a page. The consecutive writes to a page,
1078 before erasing it again, are restricted to 1-3 writes, depending on the 1078 before erasing it again, are restricted to 1-3 writes, depending on the
@@ -1222,7 +1222,7 @@ in this page</entry>
1222#define NAND_BBT_VERSION 0x00000100 1222#define NAND_BBT_VERSION 0x00000100
1223/* Create a bbt if none axists */ 1223/* Create a bbt if none axists */
1224#define NAND_BBT_CREATE 0x00000200 1224#define NAND_BBT_CREATE 0x00000200
1225/* Write bbt if neccecary */ 1225/* Write bbt if necessary */
1226#define NAND_BBT_WRITE 0x00001000 1226#define NAND_BBT_WRITE 0x00001000
1227/* Read and write back block contents when writing bbt */ 1227/* Read and write back block contents when writing bbt */
1228#define NAND_BBT_SAVECONTENT 0x00002000 1228#define NAND_BBT_SAVECONTENT 0x00002000
diff --git a/Documentation/DocBook/regulator.tmpl b/Documentation/DocBook/regulator.tmpl
index 346e552fa2cc..3b08a085d2c7 100644
--- a/Documentation/DocBook/regulator.tmpl
+++ b/Documentation/DocBook/regulator.tmpl
@@ -155,7 +155,7 @@
155 release regulators. Functions are 155 release regulators. Functions are
156 provided to <link linkend='API-regulator-enable'>enable</link> 156 provided to <link linkend='API-regulator-enable'>enable</link>
157 and <link linkend='API-regulator-disable'>disable</link> the 157 and <link linkend='API-regulator-disable'>disable</link> the
158 reguator and to get and set the runtime parameters of the 158 regulator and to get and set the runtime parameters of the
159 regulator. 159 regulator.
160 </para> 160 </para>
161 <para> 161 <para>
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl
index 95618159e29b..bbe9c1fd5cef 100644
--- a/Documentation/DocBook/uio-howto.tmpl
+++ b/Documentation/DocBook/uio-howto.tmpl
@@ -766,10 +766,10 @@ framework to set up sysfs files for this region. Simply leave it alone.
766 <para> 766 <para>
767 The dynamic memory regions will be allocated when the UIO device file, 767 The dynamic memory regions will be allocated when the UIO device file,
768 <varname>/dev/uioX</varname> is opened. 768 <varname>/dev/uioX</varname> is opened.
769 Simiar to static memory resources, the memory region information for 769 Similar to static memory resources, the memory region information for
770 dynamic regions is then visible via sysfs at 770 dynamic regions is then visible via sysfs at
771 <varname>/sys/class/uio/uioX/maps/mapY/*</varname>. 771 <varname>/sys/class/uio/uioX/maps/mapY/*</varname>.
772 The dynmaic memory regions will be freed when the UIO device file is 772 The dynamic memory regions will be freed when the UIO device file is
773 closed. When no processes are holding the device file open, the address 773 closed. When no processes are holding the device file open, the address
774 returned to userspace is ~0. 774 returned to userspace is ~0.
775 </para> 775 </para>
diff --git a/Documentation/DocBook/usb.tmpl b/Documentation/DocBook/usb.tmpl
index 8d57c1888dca..85fc0e28576f 100644
--- a/Documentation/DocBook/usb.tmpl
+++ b/Documentation/DocBook/usb.tmpl
@@ -153,7 +153,7 @@
153 153
154 <listitem><para>The Linux USB API supports synchronous calls for 154 <listitem><para>The Linux USB API supports synchronous calls for
155 control and bulk messages. 155 control and bulk messages.
156 It also supports asynchnous calls for all kinds of data transfer, 156 It also supports asynchronous calls for all kinds of data transfer,
157 using request structures called "URBs" (USB Request Blocks). 157 using request structures called "URBs" (USB Request Blocks).
158 </para></listitem> 158 </para></listitem>
159 159
diff --git a/Documentation/DocBook/writing-an-alsa-driver.tmpl b/Documentation/DocBook/writing-an-alsa-driver.tmpl
index d0056a4e9c53..6f639d9530b5 100644
--- a/Documentation/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/DocBook/writing-an-alsa-driver.tmpl
@@ -5696,7 +5696,7 @@ struct _snd_pcm_runtime {
5696 suspending the PCM operations via 5696 suspending the PCM operations via
5697 <function>snd_pcm_suspend_all()</function> or 5697 <function>snd_pcm_suspend_all()</function> or
5698 <function>snd_pcm_suspend()</function>. It means that the PCM 5698 <function>snd_pcm_suspend()</function>. It means that the PCM
5699 streams are already stoppped when the register snapshot is 5699 streams are already stopped when the register snapshot is
5700 taken. But, remember that you don't have to restart the PCM 5700 taken. But, remember that you don't have to restart the PCM
5701 stream in the resume callback. It'll be restarted via 5701 stream in the resume callback. It'll be restarted via
5702 trigger call with <constant>SNDRV_PCM_TRIGGER_RESUME</constant> 5702 trigger call with <constant>SNDRV_PCM_TRIGGER_RESUME</constant>
diff --git a/Documentation/DocBook/writing_musb_glue_layer.tmpl b/Documentation/DocBook/writing_musb_glue_layer.tmpl
new file mode 100644
index 000000000000..837eca77f274
--- /dev/null
+++ b/Documentation/DocBook/writing_musb_glue_layer.tmpl
@@ -0,0 +1,873 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
4
5<book id="Writing-MUSB-Glue-Layer">
6 <bookinfo>
7 <title>Writing an MUSB Glue Layer</title>
8
9 <authorgroup>
10 <author>
11 <firstname>Apelete</firstname>
12 <surname>Seketeli</surname>
13 <affiliation>
14 <address>
15 <email>apelete at seketeli.net</email>
16 </address>
17 </affiliation>
18 </author>
19 </authorgroup>
20
21 <copyright>
22 <year>2014</year>
23 <holder>Apelete Seketeli</holder>
24 </copyright>
25
26 <legalnotice>
27 <para>
28 This documentation is free software; you can redistribute it
29 and/or modify it under the terms of the GNU General Public
30 License as published by the Free Software Foundation; either
31 version 2 of the License, or (at your option) any later version.
32 </para>
33
34 <para>
35 This documentation is distributed in the hope that it will be
36 useful, but WITHOUT ANY WARRANTY; without even the implied
37 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
38 See the GNU General Public License for more details.
39 </para>
40
41 <para>
42 You should have received a copy of the GNU General Public License
43 along with this documentation; if not, write to the Free Software
44 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
45 02111-1307 USA
46 </para>
47
48 <para>
49 For more details see the file COPYING in the Linux kernel source
50 tree.
51 </para>
52 </legalnotice>
53 </bookinfo>
54
55<toc></toc>
56
57 <chapter id="introduction">
58 <title>Introduction</title>
59 <para>
60 The Linux MUSB subsystem is part of the larger Linux USB
61 subsystem. It provides support for embedded USB Device Controllers
62 (UDC) that do not use Universal Host Controller Interface (UHCI)
63 or Open Host Controller Interface (OHCI).
64 </para>
65 <para>
66 Instead, these embedded UDC rely on the USB On-the-Go (OTG)
67 specification which they implement at least partially. The silicon
68 reference design used in most cases is the Multipoint USB
69 Highspeed Dual-Role Controller (MUSB HDRC) found in the Mentor
70 Graphics Inventraâ„¢ design.
71 </para>
72 <para>
73 As a self-taught exercise I have written an MUSB glue layer for
74 the Ingenic JZ4740 SoC, modelled after the many MUSB glue layers
75 in the kernel source tree. This layer can be found at
76 drivers/usb/musb/jz4740.c. In this documentation I will walk
77 through the basics of the jz4740.c glue layer, explaining the
78 different pieces and what needs to be done in order to write your
79 own device glue layer.
80 </para>
81 </chapter>
82
83 <chapter id="linux-musb-basics">
84 <title>Linux MUSB Basics</title>
85 <para>
86 To get started on the topic, please read USB On-the-Go Basics (see
87 Resources) which provides an introduction of USB OTG operation at
88 the hardware level. A couple of wiki pages by Texas Instruments
89 and Analog Devices also provide an overview of the Linux kernel
90 MUSB configuration, albeit focused on some specific devices
91 provided by these companies. Finally, getting acquainted with the
92 USB specification at USB home page may come in handy, with
93 practical instance provided through the Writing USB Device Drivers
94 documentation (again, see Resources).
95 </para>
96 <para>
97 Linux USB stack is a layered architecture in which the MUSB
98 controller hardware sits at the lowest. The MUSB controller driver
99 abstract the MUSB controller hardware to the Linux USB stack.
100 </para>
101 <programlisting>
102 ------------------------
103 | | &lt;------- drivers/usb/gadget
104 | Linux USB Core Stack | &lt;------- drivers/usb/host
105 | | &lt;------- drivers/usb/core
106 ------------------------
107 â¬
108 --------------------------
109 | | &lt;------ drivers/usb/musb/musb_gadget.c
110 | MUSB Controller driver | &lt;------ drivers/usb/musb/musb_host.c
111 | | &lt;------ drivers/usb/musb/musb_core.c
112 --------------------------
113 â¬
114 ---------------------------------
115 | MUSB Platform Specific Driver |
116 | | &lt;-- drivers/usb/musb/jz4740.c
117 | aka &quot;Glue Layer&quot; |
118 ---------------------------------
119 â¬
120 ---------------------------------
121 | MUSB Controller Hardware |
122 ---------------------------------
123 </programlisting>
124 <para>
125 As outlined above, the glue layer is actually the platform
126 specific code sitting in between the controller driver and the
127 controller hardware.
128 </para>
129 <para>
130 Just like a Linux USB driver needs to register itself with the
131 Linux USB subsystem, the MUSB glue layer needs first to register
132 itself with the MUSB controller driver. This will allow the
133 controller driver to know about which device the glue layer
134 supports and which functions to call when a supported device is
135 detected or released; remember we are talking about an embedded
136 controller chip here, so no insertion or removal at run-time.
137 </para>
138 <para>
139 All of this information is passed to the MUSB controller driver
140 through a platform_driver structure defined in the glue layer as:
141 </para>
142 <programlisting linenumbering="numbered">
143static struct platform_driver jz4740_driver = {
144 .probe = jz4740_probe,
145 .remove = jz4740_remove,
146 .driver = {
147 .name = "musb-jz4740",
148 },
149};
150 </programlisting>
151 <para>
152 The probe and remove function pointers are called when a matching
153 device is detected and, respectively, released. The name string
154 describes the device supported by this glue layer. In the current
155 case it matches a platform_device structure declared in
156 arch/mips/jz4740/platform.c. Note that we are not using device
157 tree bindings here.
158 </para>
159 <para>
160 In order to register itself to the controller driver, the glue
161 layer goes through a few steps, basically allocating the
162 controller hardware resources and initialising a couple of
163 circuits. To do so, it needs to keep track of the information used
164 throughout these steps. This is done by defining a private
165 jz4740_glue structure:
166 </para>
167 <programlisting linenumbering="numbered">
168struct jz4740_glue {
169 struct device *dev;
170 struct platform_device *musb;
171 struct clk *clk;
172};
173 </programlisting>
174 <para>
175 The dev and musb members are both device structure variables. The
176 first one holds generic information about the device, since it's
177 the basic device structure, and the latter holds information more
178 closely related to the subsystem the device is registered to. The
179 clk variable keeps information related to the device clock
180 operation.
181 </para>
182 <para>
183 Let's go through the steps of the probe function that leads the
184 glue layer to register itself to the controller driver.
185 </para>
186 <para>
187 N.B.: For the sake of readability each function will be split in
188 logical parts, each part being shown as if it was independent from
189 the others.
190 </para>
191 <programlisting linenumbering="numbered">
192static int jz4740_probe(struct platform_device *pdev)
193{
194 struct platform_device *musb;
195 struct jz4740_glue *glue;
196 struct clk *clk;
197 int ret;
198
199 glue = devm_kzalloc(&amp;pdev->dev, sizeof(*glue), GFP_KERNEL);
200 if (!glue)
201 return -ENOMEM;
202
203 musb = platform_device_alloc("musb-hdrc", PLATFORM_DEVID_AUTO);
204 if (!musb) {
205 dev_err(&amp;pdev->dev, "failed to allocate musb device\n");
206 return -ENOMEM;
207 }
208
209 clk = devm_clk_get(&amp;pdev->dev, "udc");
210 if (IS_ERR(clk)) {
211 dev_err(&amp;pdev->dev, "failed to get clock\n");
212 ret = PTR_ERR(clk);
213 goto err_platform_device_put;
214 }
215
216 ret = clk_prepare_enable(clk);
217 if (ret) {
218 dev_err(&amp;pdev->dev, "failed to enable clock\n");
219 goto err_platform_device_put;
220 }
221
222 musb->dev.parent = &amp;pdev->dev;
223
224 glue->dev = &amp;pdev->dev;
225 glue->musb = musb;
226 glue->clk = clk;
227
228 return 0;
229
230err_platform_device_put:
231 platform_device_put(musb);
232 return ret;
233}
234 </programlisting>
235 <para>
236 The first few lines of the probe function allocate and assign the
237 glue, musb and clk variables. The GFP_KERNEL flag (line 8) allows
238 the allocation process to sleep and wait for memory, thus being
239 usable in a blocking situation. The PLATFORM_DEVID_AUTO flag (line
240 12) allows automatic allocation and management of device IDs in
241 order to avoid device namespace collisions with explicit IDs. With
242 devm_clk_get() (line 18) the glue layer allocates the clock -- the
243 <literal>devm_</literal> prefix indicates that clk_get() is
244 managed: it automatically frees the allocated clock resource data
245 when the device is released -- and enable it.
246 </para>
247 <para>
248 Then comes the registration steps:
249 </para>
250 <programlisting linenumbering="numbered">
251static int jz4740_probe(struct platform_device *pdev)
252{
253 struct musb_hdrc_platform_data *pdata = &amp;jz4740_musb_platform_data;
254
255 pdata->platform_ops = &amp;jz4740_musb_ops;
256
257 platform_set_drvdata(pdev, glue);
258
259 ret = platform_device_add_resources(musb, pdev->resource,
260 pdev->num_resources);
261 if (ret) {
262 dev_err(&amp;pdev->dev, "failed to add resources\n");
263 goto err_clk_disable;
264 }
265
266 ret = platform_device_add_data(musb, pdata, sizeof(*pdata));
267 if (ret) {
268 dev_err(&amp;pdev->dev, "failed to add platform_data\n");
269 goto err_clk_disable;
270 }
271
272 return 0;
273
274err_clk_disable:
275 clk_disable_unprepare(clk);
276err_platform_device_put:
277 platform_device_put(musb);
278 return ret;
279}
280 </programlisting>
281 <para>
282 The first step is to pass the device data privately held by the
283 glue layer on to the controller driver through
284 platform_set_drvdata() (line 7). Next is passing on the device
285 resources information, also privately held at that point, through
286 platform_device_add_resources() (line 9).
287 </para>
288 <para>
289 Finally comes passing on the platform specific data to the
290 controller driver (line 16). Platform data will be discussed in
291 <link linkend="device-platform-data">Chapter 4</link>, but here
292 we are looking at the platform_ops function pointer (line 5) in
293 musb_hdrc_platform_data structure (line 3). This function
294 pointer allows the MUSB controller driver to know which function
295 to call for device operation:
296 </para>
297 <programlisting linenumbering="numbered">
298static const struct musb_platform_ops jz4740_musb_ops = {
299 .init = jz4740_musb_init,
300 .exit = jz4740_musb_exit,
301};
302 </programlisting>
303 <para>
304 Here we have the minimal case where only init and exit functions
305 are called by the controller driver when needed. Fact is the
306 JZ4740 MUSB controller is a basic controller, lacking some
307 features found in other controllers, otherwise we may also have
308 pointers to a few other functions like a power management function
309 or a function to switch between OTG and non-OTG modes, for
310 instance.
311 </para>
312 <para>
313 At that point of the registration process, the controller driver
314 actually calls the init function:
315 </para>
316 <programlisting linenumbering="numbered">
317static int jz4740_musb_init(struct musb *musb)
318{
319 musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2);
320 if (!musb->xceiv) {
321 pr_err("HS UDC: no transceiver configured\n");
322 return -ENODEV;
323 }
324
325 /* Silicon does not implement ConfigData register.
326 * Set dyn_fifo to avoid reading EP config from hardware.
327 */
328 musb->dyn_fifo = true;
329
330 musb->isr = jz4740_musb_interrupt;
331
332 return 0;
333}
334 </programlisting>
335 <para>
336 The goal of jz4740_musb_init() is to get hold of the transceiver
337 driver data of the MUSB controller hardware and pass it on to the
338 MUSB controller driver, as usual. The transceiver is the circuitry
339 inside the controller hardware responsible for sending/receiving
340 the USB data. Since it is an implementation of the physical layer
341 of the OSI model, the transceiver is also referred to as PHY.
342 </para>
343 <para>
344 Getting hold of the MUSB PHY driver data is done with
345 usb_get_phy() which returns a pointer to the structure
346 containing the driver instance data. The next couple of
347 instructions (line 12 and 14) are used as a quirk and to setup
348 IRQ handling respectively. Quirks and IRQ handling will be
349 discussed later in <link linkend="device-quirks">Chapter
350 5</link> and <link linkend="handling-irqs">Chapter 3</link>.
351 </para>
352 <programlisting linenumbering="numbered">
353static int jz4740_musb_exit(struct musb *musb)
354{
355 usb_put_phy(musb->xceiv);
356
357 return 0;
358}
359 </programlisting>
360 <para>
361 Acting as the counterpart of init, the exit function releases the
362 MUSB PHY driver when the controller hardware itself is about to be
363 released.
364 </para>
365 <para>
366 Again, note that init and exit are fairly simple in this case due
367 to the basic set of features of the JZ4740 controller hardware.
368 When writing an musb glue layer for a more complex controller
369 hardware, you might need to take care of more processing in those
370 two functions.
371 </para>
372 <para>
373 Returning from the init function, the MUSB controller driver jumps
374 back into the probe function:
375 </para>
376 <programlisting linenumbering="numbered">
377static int jz4740_probe(struct platform_device *pdev)
378{
379 ret = platform_device_add(musb);
380 if (ret) {
381 dev_err(&amp;pdev->dev, "failed to register musb device\n");
382 goto err_clk_disable;
383 }
384
385 return 0;
386
387err_clk_disable:
388 clk_disable_unprepare(clk);
389err_platform_device_put:
390 platform_device_put(musb);
391 return ret;
392}
393 </programlisting>
394 <para>
395 This is the last part of the device registration process where the
396 glue layer adds the controller hardware device to Linux kernel
397 device hierarchy: at this stage, all known information about the
398 device is passed on to the Linux USB core stack.
399 </para>
400 <programlisting linenumbering="numbered">
401static int jz4740_remove(struct platform_device *pdev)
402{
403 struct jz4740_glue *glue = platform_get_drvdata(pdev);
404
405 platform_device_unregister(glue->musb);
406 clk_disable_unprepare(glue->clk);
407
408 return 0;
409}
410 </programlisting>
411 <para>
412 Acting as the counterpart of probe, the remove function unregister
413 the MUSB controller hardware (line 5) and disable the clock (line
414 6), allowing it to be gated.
415 </para>
416 </chapter>
417
418 <chapter id="handling-irqs">
419 <title>Handling IRQs</title>
420 <para>
421 Additionally to the MUSB controller hardware basic setup and
422 registration, the glue layer is also responsible for handling the
423 IRQs:
424 </para>
425 <programlisting linenumbering="numbered">
426static irqreturn_t jz4740_musb_interrupt(int irq, void *__hci)
427{
428 unsigned long flags;
429 irqreturn_t retval = IRQ_NONE;
430 struct musb *musb = __hci;
431
432 spin_lock_irqsave(&amp;musb->lock, flags);
433
434 musb->int_usb = musb_readb(musb->mregs, MUSB_INTRUSB);
435 musb->int_tx = musb_readw(musb->mregs, MUSB_INTRTX);
436 musb->int_rx = musb_readw(musb->mregs, MUSB_INTRRX);
437
438 /*
439 * The controller is gadget only, the state of the host mode IRQ bits is
440 * undefined. Mask them to make sure that the musb driver core will
441 * never see them set
442 */
443 musb->int_usb &amp;= MUSB_INTR_SUSPEND | MUSB_INTR_RESUME |
444 MUSB_INTR_RESET | MUSB_INTR_SOF;
445
446 if (musb->int_usb || musb->int_tx || musb->int_rx)
447 retval = musb_interrupt(musb);
448
449 spin_unlock_irqrestore(&amp;musb->lock, flags);
450
451 return retval;
452}
453 </programlisting>
454 <para>
455 Here the glue layer mostly has to read the relevant hardware
456 registers and pass their values on to the controller driver which
457 will handle the actual event that triggered the IRQ.
458 </para>
459 <para>
460 The interrupt handler critical section is protected by the
461 spin_lock_irqsave() and counterpart spin_unlock_irqrestore()
462 functions (line 7 and 24 respectively), which prevent the
463 interrupt handler code to be run by two different threads at the
464 same time.
465 </para>
466 <para>
467 Then the relevant interrupt registers are read (line 9 to 11):
468 </para>
469 <itemizedlist>
470 <listitem>
471 <para>
472 MUSB_INTRUSB: indicates which USB interrupts are currently
473 active,
474 </para>
475 </listitem>
476 <listitem>
477 <para>
478 MUSB_INTRTX: indicates which of the interrupts for TX
479 endpoints are currently active,
480 </para>
481 </listitem>
482 <listitem>
483 <para>
484 MUSB_INTRRX: indicates which of the interrupts for TX
485 endpoints are currently active.
486 </para>
487 </listitem>
488 </itemizedlist>
489 <para>
490 Note that musb_readb() is used to read 8-bit registers at most,
491 while musb_readw() allows us to read at most 16-bit registers.
492 There are other functions that can be used depending on the size
493 of your device registers. See musb_io.h for more information.
494 </para>
495 <para>
496 Instruction on line 18 is another quirk specific to the JZ4740
497 USB device controller, which will be discussed later in <link
498 linkend="device-quirks">Chapter 5</link>.
499 </para>
500 <para>
501 The glue layer still needs to register the IRQ handler though.
502 Remember the instruction on line 14 of the init function:
503 </para>
504 <programlisting linenumbering="numbered">
505static int jz4740_musb_init(struct musb *musb)
506{
507 musb->isr = jz4740_musb_interrupt;
508
509 return 0;
510}
511 </programlisting>
512 <para>
513 This instruction sets a pointer to the glue layer IRQ handler
514 function, in order for the controller hardware to call the handler
515 back when an IRQ comes from the controller hardware. The interrupt
516 handler is now implemented and registered.
517 </para>
518 </chapter>
519
520 <chapter id="device-platform-data">
521 <title>Device Platform Data</title>
522 <para>
523 In order to write an MUSB glue layer, you need to have some data
524 describing the hardware capabilities of your controller hardware,
525 which is called the platform data.
526 </para>
527 <para>
528 Platform data is specific to your hardware, though it may cover a
529 broad range of devices, and is generally found somewhere in the
530 arch/ directory, depending on your device architecture.
531 </para>
532 <para>
533 For instance, platform data for the JZ4740 SoC is found in
534 arch/mips/jz4740/platform.c. In the platform.c file each device of
535 the JZ4740 SoC is described through a set of structures.
536 </para>
537 <para>
538 Here is the part of arch/mips/jz4740/platform.c that covers the
539 USB Device Controller (UDC):
540 </para>
541 <programlisting linenumbering="numbered">
542/* USB Device Controller */
543struct platform_device jz4740_udc_xceiv_device = {
544 .name = "usb_phy_gen_xceiv",
545 .id = 0,
546};
547
548static struct resource jz4740_udc_resources[] = {
549 [0] = {
550 .start = JZ4740_UDC_BASE_ADDR,
551 .end = JZ4740_UDC_BASE_ADDR + 0x10000 - 1,
552 .flags = IORESOURCE_MEM,
553 },
554 [1] = {
555 .start = JZ4740_IRQ_UDC,
556 .end = JZ4740_IRQ_UDC,
557 .flags = IORESOURCE_IRQ,
558 .name = "mc",
559 },
560};
561
562struct platform_device jz4740_udc_device = {
563 .name = "musb-jz4740",
564 .id = -1,
565 .dev = {
566 .dma_mask = &amp;jz4740_udc_device.dev.coherent_dma_mask,
567 .coherent_dma_mask = DMA_BIT_MASK(32),
568 },
569 .num_resources = ARRAY_SIZE(jz4740_udc_resources),
570 .resource = jz4740_udc_resources,
571};
572 </programlisting>
573 <para>
574 The jz4740_udc_xceiv_device platform device structure (line 2)
575 describes the UDC transceiver with a name and id number.
576 </para>
577 <para>
578 At the time of this writing, note that
579 &quot;usb_phy_gen_xceiv&quot; is the specific name to be used for
580 all transceivers that are either built-in with reference USB IP or
581 autonomous and doesn't require any PHY programming. You will need
582 to set CONFIG_NOP_USB_XCEIV=y in the kernel configuration to make
583 use of the corresponding transceiver driver. The id field could be
584 set to -1 (equivalent to PLATFORM_DEVID_NONE), -2 (equivalent to
585 PLATFORM_DEVID_AUTO) or start with 0 for the first device of this
586 kind if we want a specific id number.
587 </para>
588 <para>
589 The jz4740_udc_resources resource structure (line 7) defines the
590 UDC registers base addresses.
591 </para>
592 <para>
593 The first array (line 9 to 11) defines the UDC registers base
594 memory addresses: start points to the first register memory
595 address, end points to the last register memory address and the
596 flags member defines the type of resource we are dealing with. So
597 IORESOURCE_MEM is used to define the registers memory addresses.
598 The second array (line 14 to 17) defines the UDC IRQ registers
599 addresses. Since there is only one IRQ register available for the
600 JZ4740 UDC, start and end point at the same address. The
601 IORESOURCE_IRQ flag tells that we are dealing with IRQ resources,
602 and the name &quot;mc&quot; is in fact hard-coded in the MUSB core
603 in order for the controller driver to retrieve this IRQ resource
604 by querying it by its name.
605 </para>
606 <para>
607 Finally, the jz4740_udc_device platform device structure (line 21)
608 describes the UDC itself.
609 </para>
610 <para>
611 The &quot;musb-jz4740&quot; name (line 22) defines the MUSB
612 driver that is used for this device; remember this is in fact
613 the name that we used in the jz4740_driver platform driver
614 structure in <link linkend="linux-musb-basics">Chapter
615 2</link>. The id field (line 23) is set to -1 (equivalent to
616 PLATFORM_DEVID_NONE) since we do not need an id for the device:
617 the MUSB controller driver was already set to allocate an
618 automatic id in <link linkend="linux-musb-basics">Chapter
619 2</link>. In the dev field we care for DMA related information
620 here. The dma_mask field (line 25) defines the width of the DMA
621 mask that is going to be used, and coherent_dma_mask (line 26)
622 has the same purpose but for the alloc_coherent DMA mappings: in
623 both cases we are using a 32 bits mask. Then the resource field
624 (line 29) is simply a pointer to the resource structure defined
625 before, while the num_resources field (line 28) keeps track of
626 the number of arrays defined in the resource structure (in this
627 case there were two resource arrays defined before).
628 </para>
629 <para>
630 With this quick overview of the UDC platform data at the arch/
631 level now done, let's get back to the MUSB glue layer specific
632 platform data in drivers/usb/musb/jz4740.c:
633 </para>
634 <programlisting linenumbering="numbered">
635static struct musb_hdrc_config jz4740_musb_config = {
636 /* Silicon does not implement USB OTG. */
637 .multipoint = 0,
638 /* Max EPs scanned, driver will decide which EP can be used. */
639 .num_eps = 4,
640 /* RAMbits needed to configure EPs from table */
641 .ram_bits = 9,
642 .fifo_cfg = jz4740_musb_fifo_cfg,
643 .fifo_cfg_size = ARRAY_SIZE(jz4740_musb_fifo_cfg),
644};
645
646static struct musb_hdrc_platform_data jz4740_musb_platform_data = {
647 .mode = MUSB_PERIPHERAL,
648 .config = &amp;jz4740_musb_config,
649};
650 </programlisting>
651 <para>
652 First the glue layer configures some aspects of the controller
653 driver operation related to the controller hardware specifics.
654 This is done through the jz4740_musb_config musb_hdrc_config
655 structure.
656 </para>
657 <para>
658 Defining the OTG capability of the controller hardware, the
659 multipoint member (line 3) is set to 0 (equivalent to false)
660 since the JZ4740 UDC is not OTG compatible. Then num_eps (line
661 5) defines the number of USB endpoints of the controller
662 hardware, including endpoint 0: here we have 3 endpoints +
663 endpoint 0. Next is ram_bits (line 7) which is the width of the
664 RAM address bus for the MUSB controller hardware. This
665 information is needed when the controller driver cannot
666 automatically configure endpoints by reading the relevant
667 controller hardware registers. This issue will be discussed when
668 we get to device quirks in <link linkend="device-quirks">Chapter
669 5</link>. Last two fields (line 8 and 9) are also about device
670 quirks: fifo_cfg points to the USB endpoints configuration table
671 and fifo_cfg_size keeps track of the size of the number of
672 entries in that configuration table. More on that later in <link
673 linkend="device-quirks">Chapter 5</link>.
674 </para>
675 <para>
676 Then this configuration is embedded inside
677 jz4740_musb_platform_data musb_hdrc_platform_data structure (line
678 11): config is a pointer to the configuration structure itself,
679 and mode tells the controller driver if the controller hardware
680 may be used as MUSB_HOST only, MUSB_PERIPHERAL only or MUSB_OTG
681 which is a dual mode.
682 </para>
683 <para>
684 Remember that jz4740_musb_platform_data is then used to convey
685 platform data information as we have seen in the probe function
686 in <link linkend="linux-musb-basics">Chapter 2</link>
687 </para>
688 </chapter>
689
690 <chapter id="device-quirks">
691 <title>Device Quirks</title>
692 <para>
693 Completing the platform data specific to your device, you may also
694 need to write some code in the glue layer to work around some
695 device specific limitations. These quirks may be due to some
696 hardware bugs, or simply be the result of an incomplete
697 implementation of the USB On-the-Go specification.
698 </para>
699 <para>
700 The JZ4740 UDC exhibits such quirks, some of which we will discuss
701 here for the sake of insight even though these might not be found
702 in the controller hardware you are working on.
703 </para>
704 <para>
705 Let's get back to the init function first:
706 </para>
707 <programlisting linenumbering="numbered">
708static int jz4740_musb_init(struct musb *musb)
709{
710 musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2);
711 if (!musb->xceiv) {
712 pr_err("HS UDC: no transceiver configured\n");
713 return -ENODEV;
714 }
715
716 /* Silicon does not implement ConfigData register.
717 * Set dyn_fifo to avoid reading EP config from hardware.
718 */
719 musb->dyn_fifo = true;
720
721 musb->isr = jz4740_musb_interrupt;
722
723 return 0;
724}
725 </programlisting>
726 <para>
727 Instruction on line 12 helps the MUSB controller driver to work
728 around the fact that the controller hardware is missing registers
729 that are used for USB endpoints configuration.
730 </para>
731 <para>
732 Without these registers, the controller driver is unable to read
733 the endpoints configuration from the hardware, so we use line 12
734 instruction to bypass reading the configuration from silicon, and
735 rely on a hard-coded table that describes the endpoints
736 configuration instead:
737 </para>
738 <programlisting linenumbering="numbered">
739static struct musb_fifo_cfg jz4740_musb_fifo_cfg[] = {
740{ .hw_ep_num = 1, .style = FIFO_TX, .maxpacket = 512, },
741{ .hw_ep_num = 1, .style = FIFO_RX, .maxpacket = 512, },
742{ .hw_ep_num = 2, .style = FIFO_TX, .maxpacket = 64, },
743};
744 </programlisting>
745 <para>
746 Looking at the configuration table above, we see that each
747 endpoints is described by three fields: hw_ep_num is the endpoint
748 number, style is its direction (either FIFO_TX for the controller
749 driver to send packets in the controller hardware, or FIFO_RX to
750 receive packets from hardware), and maxpacket defines the maximum
751 size of each data packet that can be transmitted over that
752 endpoint. Reading from the table, the controller driver knows that
753 endpoint 1 can be used to send and receive USB data packets of 512
754 bytes at once (this is in fact a bulk in/out endpoint), and
755 endpoint 2 can be used to send data packets of 64 bytes at once
756 (this is in fact an interrupt endpoint).
757 </para>
758 <para>
759 Note that there is no information about endpoint 0 here: that one
760 is implemented by default in every silicon design, with a
761 predefined configuration according to the USB specification. For
762 more examples of endpoint configuration tables, see musb_core.c.
763 </para>
764 <para>
765 Let's now get back to the interrupt handler function:
766 </para>
767 <programlisting linenumbering="numbered">
768static irqreturn_t jz4740_musb_interrupt(int irq, void *__hci)
769{
770 unsigned long flags;
771 irqreturn_t retval = IRQ_NONE;
772 struct musb *musb = __hci;
773
774 spin_lock_irqsave(&amp;musb->lock, flags);
775
776 musb->int_usb = musb_readb(musb->mregs, MUSB_INTRUSB);
777 musb->int_tx = musb_readw(musb->mregs, MUSB_INTRTX);
778 musb->int_rx = musb_readw(musb->mregs, MUSB_INTRRX);
779
780 /*
781 * The controller is gadget only, the state of the host mode IRQ bits is
782 * undefined. Mask them to make sure that the musb driver core will
783 * never see them set
784 */
785 musb->int_usb &amp;= MUSB_INTR_SUSPEND | MUSB_INTR_RESUME |
786 MUSB_INTR_RESET | MUSB_INTR_SOF;
787
788 if (musb->int_usb || musb->int_tx || musb->int_rx)
789 retval = musb_interrupt(musb);
790
791 spin_unlock_irqrestore(&amp;musb->lock, flags);
792
793 return retval;
794}
795 </programlisting>
796 <para>
797 Instruction on line 18 above is a way for the controller driver to
798 work around the fact that some interrupt bits used for USB host
799 mode operation are missing in the MUSB_INTRUSB register, thus left
800 in an undefined hardware state, since this MUSB controller
801 hardware is used in peripheral mode only. As a consequence, the
802 glue layer masks these missing bits out to avoid parasite
803 interrupts by doing a logical AND operation between the value read
804 from MUSB_INTRUSB and the bits that are actually implemented in
805 the register.
806 </para>
807 <para>
808 These are only a couple of the quirks found in the JZ4740 USB
809 device controller. Some others were directly addressed in the MUSB
810 core since the fixes were generic enough to provide a better
811 handling of the issues for others controller hardware eventually.
812 </para>
813 </chapter>
814
815 <chapter id="conclusion">
816 <title>Conclusion</title>
817 <para>
818 Writing a Linux MUSB glue layer should be a more accessible task,
819 as this documentation tries to show the ins and outs of this
820 exercise.
821 </para>
822 <para>
823 The JZ4740 USB device controller being fairly simple, I hope its
824 glue layer serves as a good example for the curious mind. Used
825 with the current MUSB glue layers, this documentation should
826 provide enough guidance to get started; should anything gets out
827 of hand, the linux-usb mailing list archive is another helpful
828 resource to browse through.
829 </para>
830 </chapter>
831
832 <chapter id="acknowledgements">
833 <title>Acknowledgements</title>
834 <para>
835 Many thanks to Lars-Peter Clausen and Maarten ter Huurne for
836 answering my questions while I was writing the JZ4740 glue layer
837 and for helping me out getting the code in good shape.
838 </para>
839 <para>
840 I would also like to thank the Qi-Hardware community at large for
841 its cheerful guidance and support.
842 </para>
843 </chapter>
844
845 <chapter id="resources">
846 <title>Resources</title>
847 <para>
848 USB Home Page:
849 <ulink url="http://www.usb.org">http://www.usb.org</ulink>
850 </para>
851 <para>
852 linux-usb Mailing List Archives:
853 <ulink url="http://marc.info/?l=linux-usb">http://marc.info/?l=linux-usb</ulink>
854 </para>
855 <para>
856 USB On-the-Go Basics:
857 <ulink url="http://www.maximintegrated.com/app-notes/index.mvp/id/1822">http://www.maximintegrated.com/app-notes/index.mvp/id/1822</ulink>
858 </para>
859 <para>
860 Writing USB Device Drivers:
861 <ulink url="https://www.kernel.org/doc/htmldocs/writing_usb_driver/index.html">https://www.kernel.org/doc/htmldocs/writing_usb_driver/index.html</ulink>
862 </para>
863 <para>
864 Texas Instruments USB Configuration Wiki Page:
865 <ulink url="http://processors.wiki.ti.com/index.php/Usbgeneralpage">http://processors.wiki.ti.com/index.php/Usbgeneralpage</ulink>
866 </para>
867 <para>
868 Analog Devices Blackfin MUSB Configuration:
869 <ulink url="http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:musb">http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:musb</ulink>
870 </para>
871 </chapter>
872
873</book>
diff --git a/Documentation/EDID/1024x768.S b/Documentation/EDID/1024x768.S
index 4b486fe31b32..6f3e4b75e49e 100644
--- a/Documentation/EDID/1024x768.S
+++ b/Documentation/EDID/1024x768.S
@@ -36,7 +36,7 @@
36#define DPI 72 36#define DPI 72
37#define VFREQ 60 /* Hz */ 37#define VFREQ 60 /* Hz */
38#define TIMING_NAME "Linux XGA" 38#define TIMING_NAME "Linux XGA"
39#define ESTABLISHED_TIMINGS_BITS 0x08 /* Bit 3 -> 1024x768 @60 Hz */ 39#define ESTABLISHED_TIMING2_BITS 0x08 /* Bit 3 -> 1024x768 @60 Hz */
40#define HSYNC_POL 0 40#define HSYNC_POL 0
41#define VSYNC_POL 0 41#define VSYNC_POL 0
42#define CRC 0x55 42#define CRC 0x55
diff --git a/Documentation/EDID/1280x1024.S b/Documentation/EDID/1280x1024.S
index a2799fe33a4d..bd9bef2a65af 100644
--- a/Documentation/EDID/1280x1024.S
+++ b/Documentation/EDID/1280x1024.S
@@ -36,7 +36,7 @@
36#define DPI 72 36#define DPI 72
37#define VFREQ 60 /* Hz */ 37#define VFREQ 60 /* Hz */
38#define TIMING_NAME "Linux SXGA" 38#define TIMING_NAME "Linux SXGA"
39#define ESTABLISHED_TIMINGS_BITS 0x00 /* none */ 39/* No ESTABLISHED_TIMINGx_BITS */
40#define HSYNC_POL 1 40#define HSYNC_POL 1
41#define VSYNC_POL 1 41#define VSYNC_POL 1
42#define CRC 0xa0 42#define CRC 0xa0
diff --git a/Documentation/EDID/1600x1200.S b/Documentation/EDID/1600x1200.S
index 0ded64cfd1f5..a45101c6160c 100644
--- a/Documentation/EDID/1600x1200.S
+++ b/Documentation/EDID/1600x1200.S
@@ -36,7 +36,7 @@
36#define DPI 72 36#define DPI 72
37#define VFREQ 60 /* Hz */ 37#define VFREQ 60 /* Hz */
38#define TIMING_NAME "Linux UXGA" 38#define TIMING_NAME "Linux UXGA"
39#define ESTABLISHED_TIMINGS_BITS 0x00 /* none */ 39/* No ESTABLISHED_TIMINGx_BITS */
40#define HSYNC_POL 1 40#define HSYNC_POL 1
41#define VSYNC_POL 1 41#define VSYNC_POL 1
42#define CRC 0x9d 42#define CRC 0x9d
diff --git a/Documentation/EDID/1680x1050.S b/Documentation/EDID/1680x1050.S
index 96f67cafcf2e..b0d7c69282b4 100644
--- a/Documentation/EDID/1680x1050.S
+++ b/Documentation/EDID/1680x1050.S
@@ -36,7 +36,7 @@
36#define DPI 96 36#define DPI 96
37#define VFREQ 60 /* Hz */ 37#define VFREQ 60 /* Hz */
38#define TIMING_NAME "Linux WSXGA" 38#define TIMING_NAME "Linux WSXGA"
39#define ESTABLISHED_TIMINGS_BITS 0x00 /* none */ 39/* No ESTABLISHED_TIMINGx_BITS */
40#define HSYNC_POL 1 40#define HSYNC_POL 1
41#define VSYNC_POL 1 41#define VSYNC_POL 1
42#define CRC 0x26 42#define CRC 0x26
diff --git a/Documentation/EDID/1920x1080.S b/Documentation/EDID/1920x1080.S
index 36ed5d571d0a..3084355e81e7 100644
--- a/Documentation/EDID/1920x1080.S
+++ b/Documentation/EDID/1920x1080.S
@@ -36,7 +36,7 @@
36#define DPI 96 36#define DPI 96
37#define VFREQ 60 /* Hz */ 37#define VFREQ 60 /* Hz */
38#define TIMING_NAME "Linux FHD" 38#define TIMING_NAME "Linux FHD"
39#define ESTABLISHED_TIMINGS_BITS 0x00 /* none */ 39/* No ESTABLISHED_TIMINGx_BITS */
40#define HSYNC_POL 1 40#define HSYNC_POL 1
41#define VSYNC_POL 1 41#define VSYNC_POL 1
42#define CRC 0x05 42#define CRC 0x05
diff --git a/Documentation/EDID/800x600.S b/Documentation/EDID/800x600.S
new file mode 100644
index 000000000000..6644e26d5801
--- /dev/null
+++ b/Documentation/EDID/800x600.S
@@ -0,0 +1,41 @@
1/*
2 800x600.S: EDID data set for standard 800x600 60 Hz monitor
3
4 Copyright (C) 2011 Carsten Emde <C.Emde@osadl.org>
5 Copyright (C) 2014 Linaro Limited
6
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16*/
17
18/* EDID */
19#define VERSION 1
20#define REVISION 3
21
22/* Display */
23#define CLOCK 40000 /* kHz */
24#define XPIX 800
25#define YPIX 600
26#define XY_RATIO XY_RATIO_4_3
27#define XBLANK 256
28#define YBLANK 28
29#define XOFFSET 40
30#define XPULSE 128
31#define YOFFSET (63+1)
32#define YPULSE (63+4)
33#define DPI 72
34#define VFREQ 60 /* Hz */
35#define TIMING_NAME "Linux SVGA"
36#define ESTABLISHED_TIMING1_BITS 0x01 /* Bit 0: 800x600 @ 60Hz */
37#define HSYNC_POL 1
38#define VSYNC_POL 1
39#define CRC 0xc2
40
41#include "edid.S"
diff --git a/Documentation/EDID/HOWTO.txt b/Documentation/EDID/HOWTO.txt
index 7146db1d9e8c..835db332289b 100644
--- a/Documentation/EDID/HOWTO.txt
+++ b/Documentation/EDID/HOWTO.txt
@@ -18,7 +18,7 @@ CONFIG_DRM_LOAD_EDID_FIRMWARE was introduced. It allows to provide an
18individually prepared or corrected EDID data set in the /lib/firmware 18individually prepared or corrected EDID data set in the /lib/firmware
19directory from where it is loaded via the firmware interface. The code 19directory from where it is loaded via the firmware interface. The code
20(see drivers/gpu/drm/drm_edid_load.c) contains built-in data sets for 20(see drivers/gpu/drm/drm_edid_load.c) contains built-in data sets for
21commonly used screen resolutions (1024x768, 1280x1024, 1600x1200, 21commonly used screen resolutions (800x600, 1024x768, 1280x1024, 1600x1200,
221680x1050, 1920x1080) as binary blobs, but the kernel source tree does 221680x1050, 1920x1080) as binary blobs, but the kernel source tree does
23not contain code to create these data. In order to elucidate the origin 23not contain code to create these data. In order to elucidate the origin
24of the built-in binary EDID blobs and to facilitate the creation of 24of the built-in binary EDID blobs and to facilitate the creation of
diff --git a/Documentation/EDID/edid.S b/Documentation/EDID/edid.S
index ea97ae275fca..7ac03276d7a2 100644
--- a/Documentation/EDID/edid.S
+++ b/Documentation/EDID/edid.S
@@ -33,6 +33,17 @@
33#define XY_RATIO_5_4 0b10 33#define XY_RATIO_5_4 0b10
34#define XY_RATIO_16_9 0b11 34#define XY_RATIO_16_9 0b11
35 35
36/* Provide defaults for the timing bits */
37#ifndef ESTABLISHED_TIMING1_BITS
38#define ESTABLISHED_TIMING1_BITS 0x00
39#endif
40#ifndef ESTABLISHED_TIMING2_BITS
41#define ESTABLISHED_TIMING2_BITS 0x00
42#endif
43#ifndef ESTABLISHED_TIMING3_BITS
44#define ESTABLISHED_TIMING3_BITS 0x00
45#endif
46
36#define mfgname2id(v1,v2,v3) \ 47#define mfgname2id(v1,v2,v3) \
37 ((((v1-'@')&0x1f)<<10)+(((v2-'@')&0x1f)<<5)+((v3-'@')&0x1f)) 48 ((((v1-'@')&0x1f)<<10)+(((v2-'@')&0x1f)<<5)+((v3-'@')&0x1f))
38#define swap16(v1) ((v1>>8)+((v1&0xff)<<8)) 49#define swap16(v1) ((v1>>8)+((v1&0xff)<<8))
@@ -139,7 +150,7 @@ white_x_y_msb: .byte 0x50,0x54
139 Bit 2 640x480 @ 75 Hz 150 Bit 2 640x480 @ 75 Hz
140 Bit 1 800x600 @ 56 Hz 151 Bit 1 800x600 @ 56 Hz
141 Bit 0 800x600 @ 60 Hz */ 152 Bit 0 800x600 @ 60 Hz */
142estbl_timing1: .byte 0x00 153estbl_timing1: .byte ESTABLISHED_TIMING1_BITS
143 154
144/* Bit 7 800x600 @ 72 Hz 155/* Bit 7 800x600 @ 72 Hz
145 Bit 6 800x600 @ 75 Hz 156 Bit 6 800x600 @ 75 Hz
@@ -149,11 +160,11 @@ estbl_timing1: .byte 0x00
149 Bit 2 1024x768 @ 72 Hz 160 Bit 2 1024x768 @ 72 Hz
150 Bit 1 1024x768 @ 75 Hz 161 Bit 1 1024x768 @ 75 Hz
151 Bit 0 1280x1024 @ 75 Hz */ 162 Bit 0 1280x1024 @ 75 Hz */
152estbl_timing2: .byte ESTABLISHED_TIMINGS_BITS 163estbl_timing2: .byte ESTABLISHED_TIMING2_BITS
153 164
154/* Bit 7 1152x870 @ 75 Hz (Apple Macintosh II) 165/* Bit 7 1152x870 @ 75 Hz (Apple Macintosh II)
155 Bits 6-0 Other manufacturer-specific display mod */ 166 Bits 6-0 Other manufacturer-specific display mod */
156estbl_timing3: .byte 0x00 167estbl_timing3: .byte ESTABLISHED_TIMING3_BITS
157 168
158/* Standard timing */ 169/* Standard timing */
159/* X resolution, less 31, divided by 8 (256-2288 pixels) */ 170/* X resolution, less 31, divided by 8 (256-2288 pixels) */
diff --git a/Documentation/IRQ-domain.txt b/Documentation/IRQ-domain.txt
index 03df71aeb38c..8a8b82c9ca53 100644
--- a/Documentation/IRQ-domain.txt
+++ b/Documentation/IRQ-domain.txt
@@ -41,8 +41,7 @@ An interrupt controller driver creates and registers an irq_domain by
41calling one of the irq_domain_add_*() functions (each mapping method 41calling one of the irq_domain_add_*() functions (each mapping method
42has a different allocator function, more on that later). The function 42has a different allocator function, more on that later). The function
43will return a pointer to the irq_domain on success. The caller must 43will return a pointer to the irq_domain on success. The caller must
44provide the allocator function with an irq_domain_ops structure with 44provide the allocator function with an irq_domain_ops structure.
45the .map callback populated as a minimum.
46 45
47In most cases, the irq_domain will begin empty without any mappings 46In most cases, the irq_domain will begin empty without any mappings
48between hwirq and IRQ numbers. Mappings are added to the irq_domain 47between hwirq and IRQ numbers. Mappings are added to the irq_domain
diff --git a/Documentation/RCU/00-INDEX b/Documentation/RCU/00-INDEX
index fa57139f50bf..f773a264ae02 100644
--- a/Documentation/RCU/00-INDEX
+++ b/Documentation/RCU/00-INDEX
@@ -12,6 +12,8 @@ lockdep-splat.txt
12 - RCU Lockdep splats explained. 12 - RCU Lockdep splats explained.
13NMI-RCU.txt 13NMI-RCU.txt
14 - Using RCU to Protect Dynamic NMI Handlers 14 - Using RCU to Protect Dynamic NMI Handlers
15rcu_dereference.txt
16 - Proper care and feeding of return values from rcu_dereference()
15rcubarrier.txt 17rcubarrier.txt
16 - RCU and Unloadable Modules 18 - RCU and Unloadable Modules
17rculist_nulls.txt 19rculist_nulls.txt
diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt
index 9d10d1db16a5..877947130ebe 100644
--- a/Documentation/RCU/checklist.txt
+++ b/Documentation/RCU/checklist.txt
@@ -114,12 +114,16 @@ over a rather long period of time, but improvements are always welcome!
114 http://www.openvms.compaq.com/wizard/wiz_2637.html 114 http://www.openvms.compaq.com/wizard/wiz_2637.html
115 115
116 The rcu_dereference() primitive is also an excellent 116 The rcu_dereference() primitive is also an excellent
117 documentation aid, letting the person reading the code 117 documentation aid, letting the person reading the
118 know exactly which pointers are protected by RCU. 118 code know exactly which pointers are protected by RCU.
119 Please note that compilers can also reorder code, and 119 Please note that compilers can also reorder code, and
120 they are becoming increasingly aggressive about doing 120 they are becoming increasingly aggressive about doing
121 just that. The rcu_dereference() primitive therefore 121 just that. The rcu_dereference() primitive therefore also
122 also prevents destructive compiler optimizations. 122 prevents destructive compiler optimizations. However,
123 with a bit of devious creativity, it is possible to
124 mishandle the return value from rcu_dereference().
125 Please see rcu_dereference.txt in this directory for
126 more information.
123 127
124 The rcu_dereference() primitive is used by the 128 The rcu_dereference() primitive is used by the
125 various "_rcu()" list-traversal primitives, such 129 various "_rcu()" list-traversal primitives, such
diff --git a/Documentation/RCU/rcu_dereference.txt b/Documentation/RCU/rcu_dereference.txt
new file mode 100644
index 000000000000..ceb05da5a5ac
--- /dev/null
+++ b/Documentation/RCU/rcu_dereference.txt
@@ -0,0 +1,371 @@
1PROPER CARE AND FEEDING OF RETURN VALUES FROM rcu_dereference()
2
3Most of the time, you can use values from rcu_dereference() or one of
4the similar primitives without worries. Dereferencing (prefix "*"),
5field selection ("->"), assignment ("="), address-of ("&"), addition and
6subtraction of constants, and casts all work quite naturally and safely.
7
8It is nevertheless possible to get into trouble with other operations.
9Follow these rules to keep your RCU code working properly:
10
11o You must use one of the rcu_dereference() family of primitives
12 to load an RCU-protected pointer, otherwise CONFIG_PROVE_RCU
13 will complain. Worse yet, your code can see random memory-corruption
14 bugs due to games that compilers and DEC Alpha can play.
15 Without one of the rcu_dereference() primitives, compilers
16 can reload the value, and won't your code have fun with two
17 different values for a single pointer! Without rcu_dereference(),
18 DEC Alpha can load a pointer, dereference that pointer, and
19 return data preceding initialization that preceded the store of
20 the pointer.
21
22 In addition, the volatile cast in rcu_dereference() prevents the
23 compiler from deducing the resulting pointer value. Please see
24 the section entitled "EXAMPLE WHERE THE COMPILER KNOWS TOO MUCH"
25 for an example where the compiler can in fact deduce the exact
26 value of the pointer, and thus cause misordering.
27
28o Do not use single-element RCU-protected arrays. The compiler
29 is within its right to assume that the value of an index into
30 such an array must necessarily evaluate to zero. The compiler
31 could then substitute the constant zero for the computation, so
32 that the array index no longer depended on the value returned
33 by rcu_dereference(). If the array index no longer depends
34 on rcu_dereference(), then both the compiler and the CPU
35 are within their rights to order the array access before the
36 rcu_dereference(), which can cause the array access to return
37 garbage.
38
39o Avoid cancellation when using the "+" and "-" infix arithmetic
40 operators. For example, for a given variable "x", avoid
41 "(x-x)". There are similar arithmetic pitfalls from other
42 arithmetic operatiors, such as "(x*0)", "(x/(x+1))" or "(x%1)".
43 The compiler is within its rights to substitute zero for all of
44 these expressions, so that subsequent accesses no longer depend
45 on the rcu_dereference(), again possibly resulting in bugs due
46 to misordering.
47
48 Of course, if "p" is a pointer from rcu_dereference(), and "a"
49 and "b" are integers that happen to be equal, the expression
50 "p+a-b" is safe because its value still necessarily depends on
51 the rcu_dereference(), thus maintaining proper ordering.
52
53o Avoid all-zero operands to the bitwise "&" operator, and
54 similarly avoid all-ones operands to the bitwise "|" operator.
55 If the compiler is able to deduce the value of such operands,
56 it is within its rights to substitute the corresponding constant
57 for the bitwise operation. Once again, this causes subsequent
58 accesses to no longer depend on the rcu_dereference(), causing
59 bugs due to misordering.
60
61 Please note that single-bit operands to bitwise "&" can also
62 be dangerous. At this point, the compiler knows that the
63 resulting value can only take on one of two possible values.
64 Therefore, a very small amount of additional information will
65 allow the compiler to deduce the exact value, which again can
66 result in misordering.
67
68o If you are using RCU to protect JITed functions, so that the
69 "()" function-invocation operator is applied to a value obtained
70 (directly or indirectly) from rcu_dereference(), you may need to
71 interact directly with the hardware to flush instruction caches.
72 This issue arises on some systems when a newly JITed function is
73 using the same memory that was used by an earlier JITed function.
74
75o Do not use the results from the boolean "&&" and "||" when
76 dereferencing. For example, the following (rather improbable)
77 code is buggy:
78
79 int a[2];
80 int index;
81 int force_zero_index = 1;
82
83 ...
84
85 r1 = rcu_dereference(i1)
86 r2 = a[r1 && force_zero_index]; /* BUGGY!!! */
87
88 The reason this is buggy is that "&&" and "||" are often compiled
89 using branches. While weak-memory machines such as ARM or PowerPC
90 do order stores after such branches, they can speculate loads,
91 which can result in misordering bugs.
92
93o Do not use the results from relational operators ("==", "!=",
94 ">", ">=", "<", or "<=") when dereferencing. For example,
95 the following (quite strange) code is buggy:
96
97 int a[2];
98 int index;
99 int flip_index = 0;
100
101 ...
102
103 r1 = rcu_dereference(i1)
104 r2 = a[r1 != flip_index]; /* BUGGY!!! */
105
106 As before, the reason this is buggy is that relational operators
107 are often compiled using branches. And as before, although
108 weak-memory machines such as ARM or PowerPC do order stores
109 after such branches, but can speculate loads, which can again
110 result in misordering bugs.
111
112o Be very careful about comparing pointers obtained from
113 rcu_dereference() against non-NULL values. As Linus Torvalds
114 explained, if the two pointers are equal, the compiler could
115 substitute the pointer you are comparing against for the pointer
116 obtained from rcu_dereference(). For example:
117
118 p = rcu_dereference(gp);
119 if (p == &default_struct)
120 do_default(p->a);
121
122 Because the compiler now knows that the value of "p" is exactly
123 the address of the variable "default_struct", it is free to
124 transform this code into the following:
125
126 p = rcu_dereference(gp);
127 if (p == &default_struct)
128 do_default(default_struct.a);
129
130 On ARM and Power hardware, the load from "default_struct.a"
131 can now be speculated, such that it might happen before the
132 rcu_dereference(). This could result in bugs due to misordering.
133
134 However, comparisons are OK in the following cases:
135
136 o The comparison was against the NULL pointer. If the
137 compiler knows that the pointer is NULL, you had better
138 not be dereferencing it anyway. If the comparison is
139 non-equal, the compiler is none the wiser. Therefore,
140 it is safe to compare pointers from rcu_dereference()
141 against NULL pointers.
142
143 o The pointer is never dereferenced after being compared.
144 Since there are no subsequent dereferences, the compiler
145 cannot use anything it learned from the comparison
146 to reorder the non-existent subsequent dereferences.
147 This sort of comparison occurs frequently when scanning
148 RCU-protected circular linked lists.
149
150 o The comparison is against a pointer that references memory
151 that was initialized "a long time ago." The reason
152 this is safe is that even if misordering occurs, the
153 misordering will not affect the accesses that follow
154 the comparison. So exactly how long ago is "a long
155 time ago"? Here are some possibilities:
156
157 o Compile time.
158
159 o Boot time.
160
161 o Module-init time for module code.
162
163 o Prior to kthread creation for kthread code.
164
165 o During some prior acquisition of the lock that
166 we now hold.
167
168 o Before mod_timer() time for a timer handler.
169
170 There are many other possibilities involving the Linux
171 kernel's wide array of primitives that cause code to
172 be invoked at a later time.
173
174 o The pointer being compared against also came from
175 rcu_dereference(). In this case, both pointers depend
176 on one rcu_dereference() or another, so you get proper
177 ordering either way.
178
179 That said, this situation can make certain RCU usage
180 bugs more likely to happen. Which can be a good thing,
181 at least if they happen during testing. An example
182 of such an RCU usage bug is shown in the section titled
183 "EXAMPLE OF AMPLIFIED RCU-USAGE BUG".
184
185 o All of the accesses following the comparison are stores,
186 so that a control dependency preserves the needed ordering.
187 That said, it is easy to get control dependencies wrong.
188 Please see the "CONTROL DEPENDENCIES" section of
189 Documentation/memory-barriers.txt for more details.
190
191 o The pointers are not equal -and- the compiler does
192 not have enough information to deduce the value of the
193 pointer. Note that the volatile cast in rcu_dereference()
194 will normally prevent the compiler from knowing too much.
195
196o Disable any value-speculation optimizations that your compiler
197 might provide, especially if you are making use of feedback-based
198 optimizations that take data collected from prior runs. Such
199 value-speculation optimizations reorder operations by design.
200
201 There is one exception to this rule: Value-speculation
202 optimizations that leverage the branch-prediction hardware are
203 safe on strongly ordered systems (such as x86), but not on weakly
204 ordered systems (such as ARM or Power). Choose your compiler
205 command-line options wisely!
206
207
208EXAMPLE OF AMPLIFIED RCU-USAGE BUG
209
210Because updaters can run concurrently with RCU readers, RCU readers can
211see stale and/or inconsistent values. If RCU readers need fresh or
212consistent values, which they sometimes do, they need to take proper
213precautions. To see this, consider the following code fragment:
214
215 struct foo {
216 int a;
217 int b;
218 int c;
219 };
220 struct foo *gp1;
221 struct foo *gp2;
222
223 void updater(void)
224 {
225 struct foo *p;
226
227 p = kmalloc(...);
228 if (p == NULL)
229 deal_with_it();
230 p->a = 42; /* Each field in its own cache line. */
231 p->b = 43;
232 p->c = 44;
233 rcu_assign_pointer(gp1, p);
234 p->b = 143;
235 p->c = 144;
236 rcu_assign_pointer(gp2, p);
237 }
238
239 void reader(void)
240 {
241 struct foo *p;
242 struct foo *q;
243 int r1, r2;
244
245 p = rcu_dereference(gp2);
246 if (p == NULL)
247 return;
248 r1 = p->b; /* Guaranteed to get 143. */
249 q = rcu_dereference(gp1); /* Guaranteed non-NULL. */
250 if (p == q) {
251 /* The compiler decides that q->c is same as p->c. */
252 r2 = p->c; /* Could get 44 on weakly order system. */
253 }
254 do_something_with(r1, r2);
255 }
256
257You might be surprised that the outcome (r1 == 143 && r2 == 44) is possible,
258but you should not be. After all, the updater might have been invoked
259a second time between the time reader() loaded into "r1" and the time
260that it loaded into "r2". The fact that this same result can occur due
261to some reordering from the compiler and CPUs is beside the point.
262
263But suppose that the reader needs a consistent view?
264
265Then one approach is to use locking, for example, as follows:
266
267 struct foo {
268 int a;
269 int b;
270 int c;
271 spinlock_t lock;
272 };
273 struct foo *gp1;
274 struct foo *gp2;
275
276 void updater(void)
277 {
278 struct foo *p;
279
280 p = kmalloc(...);
281 if (p == NULL)
282 deal_with_it();
283 spin_lock(&p->lock);
284 p->a = 42; /* Each field in its own cache line. */
285 p->b = 43;
286 p->c = 44;
287 spin_unlock(&p->lock);
288 rcu_assign_pointer(gp1, p);
289 spin_lock(&p->lock);
290 p->b = 143;
291 p->c = 144;
292 spin_unlock(&p->lock);
293 rcu_assign_pointer(gp2, p);
294 }
295
296 void reader(void)
297 {
298 struct foo *p;
299 struct foo *q;
300 int r1, r2;
301
302 p = rcu_dereference(gp2);
303 if (p == NULL)
304 return;
305 spin_lock(&p->lock);
306 r1 = p->b; /* Guaranteed to get 143. */
307 q = rcu_dereference(gp1); /* Guaranteed non-NULL. */
308 if (p == q) {
309 /* The compiler decides that q->c is same as p->c. */
310 r2 = p->c; /* Locking guarantees r2 == 144. */
311 }
312 spin_unlock(&p->lock);
313 do_something_with(r1, r2);
314 }
315
316As always, use the right tool for the job!
317
318
319EXAMPLE WHERE THE COMPILER KNOWS TOO MUCH
320
321If a pointer obtained from rcu_dereference() compares not-equal to some
322other pointer, the compiler normally has no clue what the value of the
323first pointer might be. This lack of knowledge prevents the compiler
324from carrying out optimizations that otherwise might destroy the ordering
325guarantees that RCU depends on. And the volatile cast in rcu_dereference()
326should prevent the compiler from guessing the value.
327
328But without rcu_dereference(), the compiler knows more than you might
329expect. Consider the following code fragment:
330
331 struct foo {
332 int a;
333 int b;
334 };
335 static struct foo variable1;
336 static struct foo variable2;
337 static struct foo *gp = &variable1;
338
339 void updater(void)
340 {
341 initialize_foo(&variable2);
342 rcu_assign_pointer(gp, &variable2);
343 /*
344 * The above is the only store to gp in this translation unit,
345 * and the address of gp is not exported in any way.
346 */
347 }
348
349 int reader(void)
350 {
351 struct foo *p;
352
353 p = gp;
354 barrier();
355 if (p == &variable1)
356 return p->a; /* Must be variable1.a. */
357 else
358 return p->b; /* Must be variable2.b. */
359 }
360
361Because the compiler can see all stores to "gp", it knows that the only
362possible values of "gp" are "variable1" on the one hand and "variable2"
363on the other. The comparison in reader() therefore tells the compiler
364the exact value of "p" even in the not-equals case. This allows the
365compiler to make the return values independent of the load from "gp",
366in turn destroying the ordering between this load and the loads of the
367return values. This can result in "p->b" returning pre-initialization
368garbage values.
369
370In short, rcu_dereference() is -not- optional when you are going to
371dereference the resulting pointer.
diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt
index 6f3a0057548e..68fe3ad27015 100644
--- a/Documentation/RCU/stallwarn.txt
+++ b/Documentation/RCU/stallwarn.txt
@@ -24,7 +24,7 @@ CONFIG_RCU_CPU_STALL_TIMEOUT
24 timing of the next warning for the current stall. 24 timing of the next warning for the current stall.
25 25
26 Stall-warning messages may be enabled and disabled completely via 26 Stall-warning messages may be enabled and disabled completely via
27 /sys/module/rcutree/parameters/rcu_cpu_stall_suppress. 27 /sys/module/rcupdate/parameters/rcu_cpu_stall_suppress.
28 28
29CONFIG_RCU_CPU_STALL_VERBOSE 29CONFIG_RCU_CPU_STALL_VERBOSE
30 30
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt
index 0f0fb7c432c2..49b8551a3b68 100644
--- a/Documentation/RCU/whatisRCU.txt
+++ b/Documentation/RCU/whatisRCU.txt
@@ -326,11 +326,11 @@ used as follows:
326a. synchronize_rcu() rcu_read_lock() / rcu_read_unlock() 326a. synchronize_rcu() rcu_read_lock() / rcu_read_unlock()
327 call_rcu() rcu_dereference() 327 call_rcu() rcu_dereference()
328 328
329b. call_rcu_bh() rcu_read_lock_bh() / rcu_read_unlock_bh() 329b. synchronize_rcu_bh() rcu_read_lock_bh() / rcu_read_unlock_bh()
330 rcu_dereference_bh() 330 call_rcu_bh() rcu_dereference_bh()
331 331
332c. synchronize_sched() rcu_read_lock_sched() / rcu_read_unlock_sched() 332c. synchronize_sched() rcu_read_lock_sched() / rcu_read_unlock_sched()
333 preempt_disable() / preempt_enable() 333 call_rcu_sched() preempt_disable() / preempt_enable()
334 local_irq_save() / local_irq_restore() 334 local_irq_save() / local_irq_restore()
335 hardirq enter / hardirq exit 335 hardirq enter / hardirq exit
336 NMI enter / NMI exit 336 NMI enter / NMI exit
@@ -794,10 +794,22 @@ in docbook. Here is the list, by category.
794 794
795RCU list traversal: 795RCU list traversal:
796 796
797 list_entry_rcu
798 list_first_entry_rcu
799 list_next_rcu
797 list_for_each_entry_rcu 800 list_for_each_entry_rcu
801 list_for_each_entry_continue_rcu
802 hlist_first_rcu
803 hlist_next_rcu
804 hlist_pprev_rcu
798 hlist_for_each_entry_rcu 805 hlist_for_each_entry_rcu
806 hlist_for_each_entry_rcu_bh
807 hlist_for_each_entry_continue_rcu
808 hlist_for_each_entry_continue_rcu_bh
809 hlist_nulls_first_rcu
799 hlist_nulls_for_each_entry_rcu 810 hlist_nulls_for_each_entry_rcu
800 list_for_each_entry_continue_rcu 811 hlist_bl_first_rcu
812 hlist_bl_for_each_entry_rcu
801 813
802RCU pointer/list update: 814RCU pointer/list update:
803 815
@@ -806,28 +818,38 @@ RCU pointer/list update:
806 list_add_tail_rcu 818 list_add_tail_rcu
807 list_del_rcu 819 list_del_rcu
808 list_replace_rcu 820 list_replace_rcu
809 hlist_del_rcu
810 hlist_add_after_rcu 821 hlist_add_after_rcu
811 hlist_add_before_rcu 822 hlist_add_before_rcu
812 hlist_add_head_rcu 823 hlist_add_head_rcu
824 hlist_del_rcu
825 hlist_del_init_rcu
813 hlist_replace_rcu 826 hlist_replace_rcu
814 list_splice_init_rcu() 827 list_splice_init_rcu()
828 hlist_nulls_del_init_rcu
829 hlist_nulls_del_rcu
830 hlist_nulls_add_head_rcu
831 hlist_bl_add_head_rcu
832 hlist_bl_del_init_rcu
833 hlist_bl_del_rcu
834 hlist_bl_set_first_rcu
815 835
816RCU: Critical sections Grace period Barrier 836RCU: Critical sections Grace period Barrier
817 837
818 rcu_read_lock synchronize_net rcu_barrier 838 rcu_read_lock synchronize_net rcu_barrier
819 rcu_read_unlock synchronize_rcu 839 rcu_read_unlock synchronize_rcu
820 rcu_dereference synchronize_rcu_expedited 840 rcu_dereference synchronize_rcu_expedited
821 call_rcu 841 rcu_read_lock_held call_rcu
822 kfree_rcu 842 rcu_dereference_check kfree_rcu
823 843 rcu_dereference_protected
824 844
825bh: Critical sections Grace period Barrier 845bh: Critical sections Grace period Barrier
826 846
827 rcu_read_lock_bh call_rcu_bh rcu_barrier_bh 847 rcu_read_lock_bh call_rcu_bh rcu_barrier_bh
828 rcu_read_unlock_bh synchronize_rcu_bh 848 rcu_read_unlock_bh synchronize_rcu_bh
829 rcu_dereference_bh synchronize_rcu_bh_expedited 849 rcu_dereference_bh synchronize_rcu_bh_expedited
830 850 rcu_dereference_bh_check
851 rcu_dereference_bh_protected
852 rcu_read_lock_bh_held
831 853
832sched: Critical sections Grace period Barrier 854sched: Critical sections Grace period Barrier
833 855
@@ -835,7 +857,12 @@ sched: Critical sections Grace period Barrier
835 rcu_read_unlock_sched call_rcu_sched 857 rcu_read_unlock_sched call_rcu_sched
836 [preempt_disable] synchronize_sched_expedited 858 [preempt_disable] synchronize_sched_expedited
837 [and friends] 859 [and friends]
860 rcu_read_lock_sched_notrace
861 rcu_read_unlock_sched_notrace
838 rcu_dereference_sched 862 rcu_dereference_sched
863 rcu_dereference_sched_check
864 rcu_dereference_sched_protected
865 rcu_read_lock_sched_held
839 866
840 867
841SRCU: Critical sections Grace period Barrier 868SRCU: Critical sections Grace period Barrier
@@ -843,6 +870,8 @@ SRCU: Critical sections Grace period Barrier
843 srcu_read_lock synchronize_srcu srcu_barrier 870 srcu_read_lock synchronize_srcu srcu_barrier
844 srcu_read_unlock call_srcu 871 srcu_read_unlock call_srcu
845 srcu_dereference synchronize_srcu_expedited 872 srcu_dereference synchronize_srcu_expedited
873 srcu_dereference_check
874 srcu_read_lock_held
846 875
847SRCU: Initialization/cleanup 876SRCU: Initialization/cleanup
848 init_srcu_struct 877 init_srcu_struct
@@ -850,9 +879,13 @@ SRCU: Initialization/cleanup
850 879
851All: lockdep-checked RCU-protected pointer access 880All: lockdep-checked RCU-protected pointer access
852 881
853 rcu_dereference_check 882 rcu_access_index
854 rcu_dereference_protected
855 rcu_access_pointer 883 rcu_access_pointer
884 rcu_dereference_index_check
885 rcu_dereference_raw
886 rcu_lockdep_assert
887 rcu_sleep_check
888 RCU_NONIDLE
856 889
857See the comment headers in the source code (or the docbook generated 890See the comment headers in the source code (or the docbook generated
858from them) for more information. 891from them) for more information.
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 2a8e89e13e45..7e9abb8a276b 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -132,6 +132,20 @@ Example:
132 platform_set_drvdata(), but left the variable "dev" unused, 132 platform_set_drvdata(), but left the variable "dev" unused,
133 delete it. 133 delete it.
134 134
135If your patch fixes a bug in a specific commit, e.g. you found an issue using
136git-bisect, please use the 'Fixes:' tag with the first 12 characters of the
137SHA-1 ID, and the one line summary.
138Example:
139
140 Fixes: e21d2170f366 ("video: remove unnecessary platform_set_drvdata()")
141
142The following git-config settings can be used to add a pretty format for
143outputting the above style in the git log or git show commands
144
145 [core]
146 abbrev = 12
147 [pretty]
148 fixes = Fixes: %h (\"%s\")
135 149
1363) Separate your changes. 1503) Separate your changes.
137 151
@@ -443,7 +457,7 @@ person it names. This tag documents that potentially interested parties
443have been included in the discussion 457have been included in the discussion
444 458
445 459
44614) Using Reported-by:, Tested-by:, Reviewed-by: and Suggested-by: 46014) Using Reported-by:, Tested-by:, Reviewed-by:, Suggested-by: and Fixes:
447 461
448If this patch fixes a problem reported by somebody else, consider adding a 462If this patch fixes a problem reported by somebody else, consider adding a
449Reported-by: tag to credit the reporter for their contribution. Please 463Reported-by: tag to credit the reporter for their contribution. Please
@@ -498,6 +512,12 @@ idea was not posted in a public forum. That said, if we diligently credit our
498idea reporters, they will, hopefully, be inspired to help us again in the 512idea reporters, they will, hopefully, be inspired to help us again in the
499future. 513future.
500 514
515A Fixes: tag indicates that the patch fixes an issue in a previous commit. It
516is used to make it easy to determine where a bug originated, which can help
517review a bug fix. This tag also assists the stable kernel team in determining
518which stable kernel versions should receive your fix. This is the preferred
519method for indicating a bug fixed by the patch. See #2 above for more details.
520
501 521
50215) The canonical patch format 52215) The canonical patch format
503 523
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c
index c6a06b71594d..f40578026a04 100644
--- a/Documentation/accounting/getdelays.c
+++ b/Documentation/accounting/getdelays.c
@@ -314,6 +314,7 @@ int main(int argc, char *argv[])
314 break; 314 break;
315 case 'm': 315 case 'm':
316 strncpy(cpumask, optarg, sizeof(cpumask)); 316 strncpy(cpumask, optarg, sizeof(cpumask));
317 cpumask[sizeof(cpumask) - 1] = '\0';
317 maskset = 1; 318 maskset = 1;
318 printf("cpumask %s maskset %d\n", cpumask, maskset); 319 printf("cpumask %s maskset %d\n", cpumask, maskset);
319 break; 320 break;
diff --git a/Documentation/acpi/enumeration.txt b/Documentation/acpi/enumeration.txt
index 2a1519b87177..e182be5e3c83 100644
--- a/Documentation/acpi/enumeration.txt
+++ b/Documentation/acpi/enumeration.txt
@@ -60,12 +60,6 @@ If the driver needs to perform more complex initialization like getting and
60configuring GPIOs it can get its ACPI handle and extract this information 60configuring GPIOs it can get its ACPI handle and extract this information
61from ACPI tables. 61from ACPI tables.
62 62
63Currently the kernel is not able to automatically determine from which ACPI
64device it should make the corresponding platform device so we need to add
65the ACPI device explicitly to acpi_platform_device_ids list defined in
66drivers/acpi/acpi_platform.c. This limitation is only for the platform
67devices, SPI and I2C devices are created automatically as described below.
68
69DMA support 63DMA support
70~~~~~~~~~~~ 64~~~~~~~~~~~
71DMA controllers enumerated via ACPI should be registered in the system to 65DMA controllers enumerated via ACPI should be registered in the system to
@@ -296,7 +290,7 @@ specifies the path to the controller. In order to use these GPIOs in Linux
296we need to translate them to the corresponding Linux GPIO descriptors. 290we need to translate them to the corresponding Linux GPIO descriptors.
297 291
298There is a standard GPIO API for that and is documented in 292There is a standard GPIO API for that and is documented in
299Documentation/gpio.txt. 293Documentation/gpio/.
300 294
301In the above example we can get the corresponding two GPIO descriptors with 295In the above example we can get the corresponding two GPIO descriptors with
302a code like this: 296a code like this:
diff --git a/Documentation/arm/00-INDEX b/Documentation/arm/00-INDEX
index a94090cc785d..3b08bc2b04cf 100644
--- a/Documentation/arm/00-INDEX
+++ b/Documentation/arm/00-INDEX
@@ -46,5 +46,7 @@ swp_emulation
46 - SWP/SWPB emulation handler/logging description 46 - SWP/SWPB emulation handler/logging description
47tcm.txt 47tcm.txt
48 - ARM Tightly Coupled Memory 48 - ARM Tightly Coupled Memory
49uefi.txt
50 - [U]EFI configuration and runtime services documentation
49vlocks.txt 51vlocks.txt
50 - Voting locks, low-level mechanism relying on memory system atomic writes. 52 - Voting locks, low-level mechanism relying on memory system atomic writes.
diff --git a/Documentation/arm/Marvell/README b/Documentation/arm/Marvell/README
index 963ec445e15a..2cce5401e323 100644
--- a/Documentation/arm/Marvell/README
+++ b/Documentation/arm/Marvell/README
@@ -234,6 +234,11 @@ Berlin family (Digital Entertainment)
234 Core: Marvell PJ4B (ARMv7), Tauros3 L2CC 234 Core: Marvell PJ4B (ARMv7), Tauros3 L2CC
235 Homepage: http://www.marvell.com/digital-entertainment/armada-1500/ 235 Homepage: http://www.marvell.com/digital-entertainment/armada-1500/
236 Product Brief: http://www.marvell.com/digital-entertainment/armada-1500/assets/Marvell-ARMADA-1500-Product-Brief.pdf 236 Product Brief: http://www.marvell.com/digital-entertainment/armada-1500/assets/Marvell-ARMADA-1500-Product-Brief.pdf
237 88DE3114, Armada 1500 Pro
238 Design name: BG2-Q
239 Core: Quad Core ARM Cortex-A9, PL310 L2CC
240 Homepage: http://www.marvell.com/digital-entertainment/armada-1500-pro/
241 Product Brief: http://www.marvell.com/digital-entertainment/armada-1500-pro/assets/Marvell_ARMADA_1500_PRO-01_product_brief.pdf
237 88DE???? 242 88DE????
238 Design name: BG3 243 Design name: BG3
239 Core: ARM Cortex-A15, CA15 integrated L2CC 244 Core: ARM Cortex-A15, CA15 integrated L2CC
diff --git a/Documentation/arm/memory.txt b/Documentation/arm/memory.txt
index 4bfb9ffbdbc1..38dc06d0a791 100644
--- a/Documentation/arm/memory.txt
+++ b/Documentation/arm/memory.txt
@@ -41,16 +41,9 @@ fffe8000 fffeffff DTCM mapping area for platforms with
41fffe0000 fffe7fff ITCM mapping area for platforms with 41fffe0000 fffe7fff ITCM mapping area for platforms with
42 ITCM mounted inside the CPU. 42 ITCM mounted inside the CPU.
43 43
44fff00000 fffdffff Fixmap mapping region. Addresses provided 44ffc00000 ffdfffff Fixmap mapping region. Addresses provided
45 by fix_to_virt() will be located here. 45 by fix_to_virt() will be located here.
46 46
47ffc00000 ffefffff DMA memory mapping region. Memory returned
48 by the dma_alloc_xxx functions will be
49 dynamically mapped here.
50
51ff000000 ffbfffff Reserved for future expansion of DMA
52 mapping region.
53
54fee00000 feffffff Mapping of PCI I/O space. This is a static 47fee00000 feffffff Mapping of PCI I/O space. This is a static
55 mapping within the vmalloc space. 48 mapping within the vmalloc space.
56 49
diff --git a/Documentation/arm/sti/stih407-overview.txt b/Documentation/arm/sti/stih407-overview.txt
new file mode 100644
index 000000000000..3343f32f58bc
--- /dev/null
+++ b/Documentation/arm/sti/stih407-overview.txt
@@ -0,0 +1,18 @@
1 STiH407 Overview
2 ================
3
4Introduction
5------------
6
7 The STiH407 is the new generation of SoC for Multi-HD, AVC set-top boxes
8 and server/connected client application for satellite, cable, terrestrial
9 and IP-STB markets.
10
11 Features
12 - ARM Cortex-A9 1.5 GHz dual core CPU (28nm)
13 - SATA2, USB 3.0, PCIe, Gbit Ethernet
14
15 Document Author
16 ---------------
17
18 Maxime Coquelin <maxime.coquelin@st.com>, (c) 2014 ST Microelectronics
diff --git a/Documentation/arm/uefi.txt b/Documentation/arm/uefi.txt
new file mode 100644
index 000000000000..d60030a1b909
--- /dev/null
+++ b/Documentation/arm/uefi.txt
@@ -0,0 +1,64 @@
1UEFI, the Unified Extensible Firmware Interface, is a specification
2governing the behaviours of compatible firmware interfaces. It is
3maintained by the UEFI Forum - http://www.uefi.org/.
4
5UEFI is an evolution of its predecessor 'EFI', so the terms EFI and
6UEFI are used somewhat interchangeably in this document and associated
7source code. As a rule, anything new uses 'UEFI', whereas 'EFI' refers
8to legacy code or specifications.
9
10UEFI support in Linux
11=====================
12Booting on a platform with firmware compliant with the UEFI specification
13makes it possible for the kernel to support additional features:
14- UEFI Runtime Services
15- Retrieving various configuration information through the standardised
16 interface of UEFI configuration tables. (ACPI, SMBIOS, ...)
17
18For actually enabling [U]EFI support, enable:
19- CONFIG_EFI=y
20- CONFIG_EFI_VARS=y or m
21
22The implementation depends on receiving information about the UEFI environment
23in a Flattened Device Tree (FDT) - so is only available with CONFIG_OF.
24
25UEFI stub
26=========
27The "stub" is a feature that extends the Image/zImage into a valid UEFI
28PE/COFF executable, including a loader application that makes it possible to
29load the kernel directly from the UEFI shell, boot menu, or one of the
30lightweight bootloaders like Gummiboot or rEFInd.
31
32The kernel image built with stub support remains a valid kernel image for
33booting in non-UEFI environments.
34
35UEFI kernel support on ARM
36==========================
37UEFI kernel support on the ARM architectures (arm and arm64) is only available
38when boot is performed through the stub.
39
40When booting in UEFI mode, the stub deletes any memory nodes from a provided DT.
41Instead, the kernel reads the UEFI memory map.
42
43The stub populates the FDT /chosen node with (and the kernel scans for) the
44following parameters:
45________________________________________________________________________________
46Name | Size | Description
47================================================================================
48linux,uefi-system-table | 64-bit | Physical address of the UEFI System Table.
49--------------------------------------------------------------------------------
50linux,uefi-mmap-start | 64-bit | Physical address of the UEFI memory map,
51 | | populated by the UEFI GetMemoryMap() call.
52--------------------------------------------------------------------------------
53linux,uefi-mmap-size | 32-bit | Size in bytes of the UEFI memory map
54 | | pointed to in previous entry.
55--------------------------------------------------------------------------------
56linux,uefi-mmap-desc-size | 32-bit | Size in bytes of each entry in the UEFI
57 | | memory map.
58--------------------------------------------------------------------------------
59linux,uefi-mmap-desc-ver | 32-bit | Version of the mmap descriptor format.
60--------------------------------------------------------------------------------
61linux,uefi-stub-kern-ver | string | Copy of linux_banner from build.
62--------------------------------------------------------------------------------
63
64For verbose debug messages, specify 'uefi_debug' on the kernel command line.
diff --git a/Documentation/arm64/booting.txt b/Documentation/arm64/booting.txt
index beb754e87c65..37fc4f632176 100644
--- a/Documentation/arm64/booting.txt
+++ b/Documentation/arm64/booting.txt
@@ -85,6 +85,10 @@ The decompressed kernel image contains a 64-byte header as follows:
85Header notes: 85Header notes:
86 86
87- code0/code1 are responsible for branching to stext. 87- code0/code1 are responsible for branching to stext.
88- when booting through EFI, code0/code1 are initially skipped.
89 res5 is an offset to the PE header and the PE header has the EFI
90 entry point (efi_stub_entry). When the stub has done its work, it
91 jumps to code0 to resume the normal boot process.
88 92
89The image must be placed at the specified offset (currently 0x80000) 93The image must be placed at the specified offset (currently 0x80000)
90from the start of the system RAM and called there. The start of the 94from the start of the system RAM and called there. The start of the
diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt
index d9ca5be9b471..68542fe13b85 100644
--- a/Documentation/atomic_ops.txt
+++ b/Documentation/atomic_ops.txt
@@ -285,15 +285,13 @@ If a caller requires memory barrier semantics around an atomic_t
285operation which does not return a value, a set of interfaces are 285operation which does not return a value, a set of interfaces are
286defined which accomplish this: 286defined which accomplish this:
287 287
288 void smp_mb__before_atomic_dec(void); 288 void smp_mb__before_atomic(void);
289 void smp_mb__after_atomic_dec(void); 289 void smp_mb__after_atomic(void);
290 void smp_mb__before_atomic_inc(void);
291 void smp_mb__after_atomic_inc(void);
292 290
293For example, smp_mb__before_atomic_dec() can be used like so: 291For example, smp_mb__before_atomic() can be used like so:
294 292
295 obj->dead = 1; 293 obj->dead = 1;
296 smp_mb__before_atomic_dec(); 294 smp_mb__before_atomic();
297 atomic_dec(&obj->ref_count); 295 atomic_dec(&obj->ref_count);
298 296
299It makes sure that all memory operations preceding the atomic_dec() 297It makes sure that all memory operations preceding the atomic_dec()
@@ -302,15 +300,10 @@ operation. In the above example, it guarantees that the assignment of
302"1" to obj->dead will be globally visible to other cpus before the 300"1" to obj->dead will be globally visible to other cpus before the
303atomic counter decrement. 301atomic counter decrement.
304 302
305Without the explicit smp_mb__before_atomic_dec() call, the 303Without the explicit smp_mb__before_atomic() call, the
306implementation could legally allow the atomic counter update visible 304implementation could legally allow the atomic counter update visible
307to other cpus before the "obj->dead = 1;" assignment. 305to other cpus before the "obj->dead = 1;" assignment.
308 306
309The other three interfaces listed are used to provide explicit
310ordering with respect to memory operations after an atomic_dec() call
311(smp_mb__after_atomic_dec()) and around atomic_inc() calls
312(smp_mb__{before,after}_atomic_inc()).
313
314A missing memory barrier in the cases where they are required by the 307A missing memory barrier in the cases where they are required by the
315atomic_t implementation above can have disastrous results. Here is 308atomic_t implementation above can have disastrous results. Here is
316an example, which follows a pattern occurring frequently in the Linux 309an example, which follows a pattern occurring frequently in the Linux
@@ -487,12 +480,12 @@ Finally there is the basic operation:
487Which returns a boolean indicating if bit "nr" is set in the bitmask 480Which returns a boolean indicating if bit "nr" is set in the bitmask
488pointed to by "addr". 481pointed to by "addr".
489 482
490If explicit memory barriers are required around clear_bit() (which 483If explicit memory barriers are required around {set,clear}_bit() (which do
491does not return a value, and thus does not need to provide memory 484not return a value, and thus does not need to provide memory barrier
492barrier semantics), two interfaces are provided: 485semantics), two interfaces are provided:
493 486
494 void smp_mb__before_clear_bit(void); 487 void smp_mb__before_atomic(void);
495 void smp_mb__after_clear_bit(void); 488 void smp_mb__after_atomic(void);
496 489
497They are used as follows, and are akin to their atomic_t operation 490They are used as follows, and are akin to their atomic_t operation
498brothers: 491brothers:
@@ -500,13 +493,13 @@ brothers:
500 /* All memory operations before this call will 493 /* All memory operations before this call will
501 * be globally visible before the clear_bit(). 494 * be globally visible before the clear_bit().
502 */ 495 */
503 smp_mb__before_clear_bit(); 496 smp_mb__before_atomic();
504 clear_bit( ... ); 497 clear_bit( ... );
505 498
506 /* The clear_bit() will be visible before all 499 /* The clear_bit() will be visible before all
507 * subsequent memory operations. 500 * subsequent memory operations.
508 */ 501 */
509 smp_mb__after_clear_bit(); 502 smp_mb__after_atomic();
510 503
511There are two special bitops with lock barrier semantics (acquire/release, 504There are two special bitops with lock barrier semantics (acquire/release,
512same as spinlocks). These operate in the same way as their non-_lock/unlock 505same as spinlocks). These operate in the same way as their non-_lock/unlock
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index 2622115276aa..02ab997a1ed2 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -270,6 +270,11 @@ When oom event notifier is registered, event will be delivered.
270 270
2712.7 Kernel Memory Extension (CONFIG_MEMCG_KMEM) 2712.7 Kernel Memory Extension (CONFIG_MEMCG_KMEM)
272 272
273WARNING: Current implementation lacks reclaim support. That means allocation
274 attempts will fail when close to the limit even if there are plenty of
275 kmem available for reclaim. That makes this option unusable in real
276 life so DO NOT SELECT IT unless for development purposes.
277
273With the Kernel memory extension, the Memory Controller is able to limit 278With the Kernel memory extension, the Memory Controller is able to limit
274the amount of kernel memory used by the system. Kernel memory is fundamentally 279the amount of kernel memory used by the system. Kernel memory is fundamentally
275different than user memory, since it can't be swapped out, which makes it 280different than user memory, since it can't be swapped out, which makes it
@@ -453,15 +458,11 @@ About use_hierarchy, see Section 6.
453 458
4545.1 force_empty 4595.1 force_empty
455 memory.force_empty interface is provided to make cgroup's memory usage empty. 460 memory.force_empty interface is provided to make cgroup's memory usage empty.
456 You can use this interface only when the cgroup has no tasks.
457 When writing anything to this 461 When writing anything to this
458 462
459 # echo 0 > memory.force_empty 463 # echo 0 > memory.force_empty
460 464
461 Almost all pages tracked by this memory cgroup will be unmapped and freed. 465 the cgroup will be reclaimed and as many pages reclaimed as possible.
462 Some pages cannot be freed because they are locked or in-use. Such pages are
463 moved to parent (if use_hierarchy==1) or root (if use_hierarchy==0) and this
464 cgroup will be empty.
465 466
466 The typical use case for this interface is before calling rmdir(). 467 The typical use case for this interface is before calling rmdir().
467 Because rmdir() moves all pages to parent, some out-of-use page caches can be 468 Because rmdir() moves all pages to parent, some out-of-use page caches can be
@@ -535,16 +536,13 @@ Note:
535 536
5365.3 swappiness 5375.3 swappiness
537 538
538Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. 539Overrides /proc/sys/vm/swappiness for the particular group. The tunable
539Please note that unlike the global swappiness, memcg knob set to 0 540in the root cgroup corresponds to the global swappiness setting.
540really prevents from any swapping even if there is a swap storage
541available. This might lead to memcg OOM killer if there are no file
542pages to reclaim.
543 541
544Following cgroups' swappiness can't be changed. 542Please note that unlike during the global reclaim, limit reclaim
545- root cgroup (uses /proc/sys/vm/swappiness). 543enforces that 0 swappiness really prevents from any swapping even if
546- a cgroup which uses hierarchy and it has other cgroup(s) below it. 544there is a swap storage available. This might lead to memcg OOM killer
547- a cgroup which uses hierarchy and not the root of hierarchy. 545if there are no file pages to reclaim.
548 546
5495.4 failcnt 5475.4 failcnt
550 548
@@ -754,7 +752,6 @@ You can disable the OOM-killer by writing "1" to memory.oom_control file, as:
754 752
755 #echo 1 > memory.oom_control 753 #echo 1 > memory.oom_control
756 754
757This operation is only allowed to the top cgroup of a sub-hierarchy.
758If OOM-killer is disabled, tasks under cgroup will hang/sleep 755If OOM-killer is disabled, tasks under cgroup will hang/sleep
759in memory cgroup's OOM-waitqueue when they request accountable memory. 756in memory cgroup's OOM-waitqueue when they request accountable memory.
760 757
diff --git a/Documentation/cgroups/unified-hierarchy.txt b/Documentation/cgroups/unified-hierarchy.txt
new file mode 100644
index 000000000000..324b182e6000
--- /dev/null
+++ b/Documentation/cgroups/unified-hierarchy.txt
@@ -0,0 +1,359 @@
1
2Cgroup unified hierarchy
3
4April, 2014 Tejun Heo <tj@kernel.org>
5
6This document describes the changes made by unified hierarchy and
7their rationales. It will eventually be merged into the main cgroup
8documentation.
9
10CONTENTS
11
121. Background
132. Basic Operation
14 2-1. Mounting
15 2-2. cgroup.subtree_control
16 2-3. cgroup.controllers
173. Structural Constraints
18 3-1. Top-down
19 3-2. No internal tasks
204. Other Changes
21 4-1. [Un]populated Notification
22 4-2. Other Core Changes
23 4-3. Per-Controller Changes
24 4-3-1. blkio
25 4-3-2. cpuset
26 4-3-3. memory
275. Planned Changes
28 5-1. CAP for resource control
29
30
311. Background
32
33cgroup allows an arbitrary number of hierarchies and each hierarchy
34can host any number of controllers. While this seems to provide a
35high level of flexibility, it isn't quite useful in practice.
36
37For example, as there is only one instance of each controller, utility
38type controllers such as freezer which can be useful in all
39hierarchies can only be used in one. The issue is exacerbated by the
40fact that controllers can't be moved around once hierarchies are
41populated. Another issue is that all controllers bound to a hierarchy
42are forced to have exactly the same view of the hierarchy. It isn't
43possible to vary the granularity depending on the specific controller.
44
45In practice, these issues heavily limit which controllers can be put
46on the same hierarchy and most configurations resort to putting each
47controller on its own hierarchy. Only closely related ones, such as
48the cpu and cpuacct controllers, make sense to put on the same
49hierarchy. This often means that userland ends up managing multiple
50similar hierarchies repeating the same steps on each hierarchy
51whenever a hierarchy management operation is necessary.
52
53Unfortunately, support for multiple hierarchies comes at a steep cost.
54Internal implementation in cgroup core proper is dazzlingly
55complicated but more importantly the support for multiple hierarchies
56restricts how cgroup is used in general and what controllers can do.
57
58There's no limit on how many hierarchies there may be, which means
59that a task's cgroup membership can't be described in finite length.
60The key may contain any varying number of entries and is unlimited in
61length, which makes it highly awkward to handle and leads to addition
62of controllers which exist only to identify membership, which in turn
63exacerbates the original problem.
64
65Also, as a controller can't have any expectation regarding what shape
66of hierarchies other controllers would be on, each controller has to
67assume that all other controllers are operating on completely
68orthogonal hierarchies. This makes it impossible, or at least very
69cumbersome, for controllers to cooperate with each other.
70
71In most use cases, putting controllers on hierarchies which are
72completely orthogonal to each other isn't necessary. What usually is
73called for is the ability to have differing levels of granularity
74depending on the specific controller. In other words, hierarchy may
75be collapsed from leaf towards root when viewed from specific
76controllers. For example, a given configuration might not care about
77how memory is distributed beyond a certain level while still wanting
78to control how CPU cycles are distributed.
79
80Unified hierarchy is the next version of cgroup interface. It aims to
81address the aforementioned issues by having more structure while
82retaining enough flexibility for most use cases. Various other
83general and controller-specific interface issues are also addressed in
84the process.
85
86
872. Basic Operation
88
892-1. Mounting
90
91Currently, unified hierarchy can be mounted with the following mount
92command. Note that this is still under development and scheduled to
93change soon.
94
95 mount -t cgroup -o __DEVEL__sane_behavior cgroup $MOUNT_POINT
96
97All controllers which are not bound to other hierarchies are
98automatically bound to unified hierarchy and show up at the root of
99it. Controllers which are enabled only in the root of unified
100hierarchy can be bound to other hierarchies at any time. This allows
101mixing unified hierarchy with the traditional multiple hierarchies in
102a fully backward compatible way.
103
104
1052-2. cgroup.subtree_control
106
107All cgroups on unified hierarchy have a "cgroup.subtree_control" file
108which governs which controllers are enabled on the children of the
109cgroup. Let's assume a hierarchy like the following.
110
111 root - A - B - C
112 \ D
113
114root's "cgroup.subtree_control" file determines which controllers are
115enabled on A. A's on B. B's on C and D. This coincides with the
116fact that controllers on the immediate sub-level are used to
117distribute the resources of the parent. In fact, it's natural to
118assume that resource control knobs of a child belong to its parent.
119Enabling a controller in a "cgroup.subtree_control" file declares that
120distribution of the respective resources of the cgroup will be
121controlled. Note that this means that controller enable states are
122shared among siblings.
123
124When read, the file contains a space-separated list of currently
125enabled controllers. A write to the file should contain a
126space-separated list of controllers with '+' or '-' prefixed (without
127the quotes). Controllers prefixed with '+' are enabled and '-'
128disabled. If a controller is listed multiple times, the last entry
129wins. The specific operations are executed atomically - either all
130succeed or fail.
131
132
1332-3. cgroup.controllers
134
135Read-only "cgroup.controllers" file contains a space-separated list of
136controllers which can be enabled in the cgroup's
137"cgroup.subtree_control" file.
138
139In the root cgroup, this lists controllers which are not bound to
140other hierarchies and the content changes as controllers are bound to
141and unbound from other hierarchies.
142
143In non-root cgroups, the content of this file equals that of the
144parent's "cgroup.subtree_control" file as only controllers enabled
145from the parent can be used in its children.
146
147
1483. Structural Constraints
149
1503-1. Top-down
151
152As it doesn't make sense to nest control of an uncontrolled resource,
153all non-root "cgroup.subtree_control" files can only contain
154controllers which are enabled in the parent's "cgroup.subtree_control"
155file. A controller can be enabled only if the parent has the
156controller enabled and a controller can't be disabled if one or more
157children have it enabled.
158
159
1603-2. No internal tasks
161
162One long-standing issue that cgroup faces is the competition between
163tasks belonging to the parent cgroup and its children cgroups. This
164is inherently nasty as two different types of entities compete and
165there is no agreed-upon obvious way to handle it. Different
166controllers are doing different things.
167
168The cpu controller considers tasks and cgroups as equivalents and maps
169nice levels to cgroup weights. This works for some cases but falls
170flat when children should be allocated specific ratios of CPU cycles
171and the number of internal tasks fluctuates - the ratios constantly
172change as the number of competing entities fluctuates. There also are
173other issues. The mapping from nice level to weight isn't obvious or
174universal, and there are various other knobs which simply aren't
175available for tasks.
176
177The blkio controller implicitly creates a hidden leaf node for each
178cgroup to host the tasks. The hidden leaf has its own copies of all
179the knobs with "leaf_" prefixed. While this allows equivalent control
180over internal tasks, it's with serious drawbacks. It always adds an
181extra layer of nesting which may not be necessary, makes the interface
182messy and significantly complicates the implementation.
183
184The memory controller currently doesn't have a way to control what
185happens between internal tasks and child cgroups and the behavior is
186not clearly defined. There have been attempts to add ad-hoc behaviors
187and knobs to tailor the behavior to specific workloads. Continuing
188this direction will lead to problems which will be extremely difficult
189to resolve in the long term.
190
191Multiple controllers struggle with internal tasks and came up with
192different ways to deal with it; unfortunately, all the approaches in
193use now are severely flawed and, furthermore, the widely different
194behaviors make cgroup as whole highly inconsistent.
195
196It is clear that this is something which needs to be addressed from
197cgroup core proper in a uniform way so that controllers don't need to
198worry about it and cgroup as a whole shows a consistent and logical
199behavior. To achieve that, unified hierarchy enforces the following
200structural constraint:
201
202 Except for the root, only cgroups which don't contain any task may
203 have controllers enabled in their "cgroup.subtree_control" files.
204
205Combined with other properties, this guarantees that, when a
206controller is looking at the part of the hierarchy which has it
207enabled, tasks are always only on the leaves. This rules out
208situations where child cgroups compete against internal tasks of the
209parent.
210
211There are two things to note. Firstly, the root cgroup is exempt from
212the restriction. Root contains tasks and anonymous resource
213consumption which can't be associated with any other cgroup and
214requires special treatment from most controllers. How resource
215consumption in the root cgroup is governed is up to each controller.
216
217Secondly, the restriction doesn't take effect if there is no enabled
218controller in the cgroup's "cgroup.subtree_control" file. This is
219important as otherwise it wouldn't be possible to create children of a
220populated cgroup. To control resource distribution of a cgroup, the
221cgroup must create children and transfer all its tasks to the children
222before enabling controllers in its "cgroup.subtree_control" file.
223
224
2254. Other Changes
226
2274-1. [Un]populated Notification
228
229cgroup users often need a way to determine when a cgroup's
230subhierarchy becomes empty so that it can be cleaned up. cgroup
231currently provides release_agent for it; unfortunately, this mechanism
232is riddled with issues.
233
234- It delivers events by forking and execing a userland binary
235 specified as the release_agent. This is a long deprecated method of
236 notification delivery. It's extremely heavy, slow and cumbersome to
237 integrate with larger infrastructure.
238
239- There is single monitoring point at the root. There's no way to
240 delegate management of a subtree.
241
242- The event isn't recursive. It triggers when a cgroup doesn't have
243 any tasks or child cgroups. Events for internal nodes trigger only
244 after all children are removed. This again makes it impossible to
245 delegate management of a subtree.
246
247- Events are filtered from the kernel side. A "notify_on_release"
248 file is used to subscribe to or suppress release events. This is
249 unnecessarily complicated and probably done this way because event
250 delivery itself was expensive.
251
252Unified hierarchy implements an interface file "cgroup.populated"
253which can be used to monitor whether the cgroup's subhierarchy has
254tasks in it or not. Its value is 0 if there is no task in the cgroup
255and its descendants; otherwise, 1. poll and [id]notify events are
256triggered when the value changes.
257
258This is significantly lighter and simpler and trivially allows
259delegating management of subhierarchy - subhierarchy monitoring can
260block further propagation simply by putting itself or another process
261in the subhierarchy and monitor events that it's interested in from
262there without interfering with monitoring higher in the tree.
263
264In unified hierarchy, the release_agent mechanism is no longer
265supported and the interface files "release_agent" and
266"notify_on_release" do not exist.
267
268
2694-2. Other Core Changes
270
271- None of the mount options is allowed.
272
273- remount is disallowed.
274
275- rename(2) is disallowed.
276
277- The "tasks" file is removed. Everything should at process
278 granularity. Use the "cgroup.procs" file instead.
279
280- The "cgroup.procs" file is not sorted. pids will be unique unless
281 they got recycled in-between reads.
282
283- The "cgroup.clone_children" file is removed.
284
285
2864-3. Per-Controller Changes
287
2884-3-1. blkio
289
290- blk-throttle becomes properly hierarchical.
291
292
2934-3-2. cpuset
294
295- Tasks are kept in empty cpusets after hotplug and take on the masks
296 of the nearest non-empty ancestor, instead of being moved to it.
297
298- A task can be moved into an empty cpuset, and again it takes on the
299 masks of the nearest non-empty ancestor.
300
301
3024-3-3. memory
303
304- use_hierarchy is on by default and the cgroup file for the flag is
305 not created.
306
307
3085. Planned Changes
309
3105-1. CAP for resource control
311
312Unified hierarchy will require one of the capabilities(7), which is
313yet to be decided, for all resource control related knobs. Process
314organization operations - creation of sub-cgroups and migration of
315processes in sub-hierarchies may be delegated by changing the
316ownership and/or permissions on the cgroup directory and
317"cgroup.procs" interface file; however, all operations which affect
318resource control - writes to a "cgroup.subtree_control" file or any
319controller-specific knobs - will require an explicit CAP privilege.
320
321This, in part, is to prevent the cgroup interface from being
322inadvertently promoted to programmable API used by non-privileged
323binaries. cgroup exposes various aspects of the system in ways which
324aren't properly abstracted for direct consumption by regular programs.
325This is an administration interface much closer to sysctl knobs than
326system calls. Even the basic access model, being filesystem path
327based, isn't suitable for direct consumption. There's no way to
328access "my cgroup" in a race-free way or make multiple operations
329atomic against migration to another cgroup.
330
331Another aspect is that, for better or for worse, the cgroup interface
332goes through far less scrutiny than regular interfaces for
333unprivileged userland. The upside is that cgroup is able to expose
334useful features which may not be suitable for general consumption in a
335reasonable time frame. It provides a relatively short path between
336internal details and userland-visible interface. Of course, this
337shortcut comes with high risk. We go through what we go through for
338general kernel APIs for good reasons. It may end up leaking internal
339details in a way which can exert significant pain by locking the
340kernel into a contract that can't be maintained in a reasonable
341manner.
342
343Also, due to the specific nature, cgroup and its controllers don't
344tend to attract attention from a wide scope of developers. cgroup's
345short history is already fraught with severely mis-designed
346interfaces, unnecessary commitments to and exposing of internal
347details, broken and dangerous implementations of various features.
348
349Keeping cgroup as an administration interface is both advantageous for
350its role and imperative given its nature. Some of the cgroup features
351may make sense for unprivileged access. If deemed justified, those
352must be further abstracted and implemented as a different interface,
353be it a system call or process-private filesystem, and survive through
354the scrutiny that any interface for general consumption is required to
355go through.
356
357Requiring CAP is not a complete solution but should serve as a
358significant deterrent against spraying cgroup usages in non-privileged
359programs.
diff --git a/Documentation/clk.txt b/Documentation/clk.txt
index c9c399af7c08..1fee72f4d331 100644
--- a/Documentation/clk.txt
+++ b/Documentation/clk.txt
@@ -68,21 +68,27 @@ the operations defined in clk.h:
68 int (*is_enabled)(struct clk_hw *hw); 68 int (*is_enabled)(struct clk_hw *hw);
69 unsigned long (*recalc_rate)(struct clk_hw *hw, 69 unsigned long (*recalc_rate)(struct clk_hw *hw,
70 unsigned long parent_rate); 70 unsigned long parent_rate);
71 long (*round_rate)(struct clk_hw *hw, unsigned long, 71 long (*round_rate)(struct clk_hw *hw,
72 unsigned long *); 72 unsigned long rate,
73 unsigned long *parent_rate);
73 long (*determine_rate)(struct clk_hw *hw, 74 long (*determine_rate)(struct clk_hw *hw,
74 unsigned long rate, 75 unsigned long rate,
75 unsigned long *best_parent_rate, 76 unsigned long *best_parent_rate,
76 struct clk **best_parent_clk); 77 struct clk **best_parent_clk);
77 int (*set_parent)(struct clk_hw *hw, u8 index); 78 int (*set_parent)(struct clk_hw *hw, u8 index);
78 u8 (*get_parent)(struct clk_hw *hw); 79 u8 (*get_parent)(struct clk_hw *hw);
79 int (*set_rate)(struct clk_hw *hw, unsigned long); 80 int (*set_rate)(struct clk_hw *hw,
81 unsigned long rate,
82 unsigned long parent_rate);
80 int (*set_rate_and_parent)(struct clk_hw *hw, 83 int (*set_rate_and_parent)(struct clk_hw *hw,
81 unsigned long rate, 84 unsigned long rate,
82 unsigned long parent_rate, u8 index); 85 unsigned long parent_rate,
86 u8 index);
83 unsigned long (*recalc_accuracy)(struct clk_hw *hw, 87 unsigned long (*recalc_accuracy)(struct clk_hw *hw,
84 unsigned long parent_accuracy); 88 unsigned long parent_accuracy);
85 void (*init)(struct clk_hw *hw); 89 void (*init)(struct clk_hw *hw);
90 int (*debug_init)(struct clk_hw *hw,
91 struct dentry *dentry);
86 }; 92 };
87 93
88 Part 3 - hardware clk implementations 94 Part 3 - hardware clk implementations
diff --git a/Documentation/connector/connector.txt b/Documentation/connector/connector.txt
index e5c5f5e6ab70..f6215f95149b 100644
--- a/Documentation/connector/connector.txt
+++ b/Documentation/connector/connector.txt
@@ -24,7 +24,8 @@ netlink based networking for inter-process communication in a significantly
24easier way: 24easier way:
25 25
26int cn_add_callback(struct cb_id *id, char *name, void (*callback) (struct cn_msg *, struct netlink_skb_parms *)); 26int cn_add_callback(struct cb_id *id, char *name, void (*callback) (struct cn_msg *, struct netlink_skb_parms *));
27void cn_netlink_send(struct cn_msg *msg, u32 __group, int gfp_mask); 27void cn_netlink_send_multi(struct cn_msg *msg, u16 len, u32 portid, u32 __group, int gfp_mask);
28void cn_netlink_send(struct cn_msg *msg, u32 portid, u32 __group, int gfp_mask);
28 29
29struct cb_id 30struct cb_id
30{ 31{
@@ -71,15 +72,21 @@ void cn_del_callback(struct cb_id *id);
71 struct cb_id *id - unique connector's user identifier. 72 struct cb_id *id - unique connector's user identifier.
72 73
73 74
74int cn_netlink_send(struct cn_msg *msg, u32 __groups, int gfp_mask); 75int cn_netlink_send_multi(struct cn_msg *msg, u16 len, u32 portid, u32 __groups, int gfp_mask);
76int cn_netlink_send(struct cn_msg *msg, u32 portid, u32 __groups, int gfp_mask);
75 77
76 Sends message to the specified groups. It can be safely called from 78 Sends message to the specified groups. It can be safely called from
77 softirq context, but may silently fail under strong memory pressure. 79 softirq context, but may silently fail under strong memory pressure.
78 If there are no listeners for given group -ESRCH can be returned. 80 If there are no listeners for given group -ESRCH can be returned.
79 81
80 struct cn_msg * - message header(with attached data). 82 struct cn_msg * - message header(with attached data).
83 u16 len - for *_multi multiple cn_msg messages can be sent
84 u32 port - destination port.
85 If non-zero the message will be sent to the
86 given port, which should be set to the
87 original sender.
81 u32 __group - destination group. 88 u32 __group - destination group.
82 If __group is zero, then appropriate group will 89 If port and __group is zero, then appropriate group will
83 be searched through all registered connector users, 90 be searched through all registered connector users,
84 and message will be delivered to the group which was 91 and message will be delivered to the group which was
85 created for user with the same ID as in msg. 92 created for user with the same ID as in msg.
@@ -111,7 +118,7 @@ acknowledge number MUST be the same + 1.
111If we receive a message and its sequence number is not equal to one we 118If we receive a message and its sequence number is not equal to one we
112are expecting, then it is a new message. If we receive a message and 119are expecting, then it is a new message. If we receive a message and
113its sequence number is the same as one we are expecting, but its 120its sequence number is the same as one we are expecting, but its
114acknowledge is not equal to the acknowledge number in the original 121acknowledge is not equal to the sequence number in the original
115message + 1, then it is a new message. 122message + 1, then it is a new message.
116 123
117Obviously, the protocol header contains the above id. 124Obviously, the protocol header contains the above id.
diff --git a/Documentation/cpu-freq/core.txt b/Documentation/cpu-freq/core.txt
index 0060d76b445f..70933eadc308 100644
--- a/Documentation/cpu-freq/core.txt
+++ b/Documentation/cpu-freq/core.txt
@@ -20,6 +20,7 @@ Contents:
20--------- 20---------
211. CPUFreq core and interfaces 211. CPUFreq core and interfaces
222. CPUFreq notifiers 222. CPUFreq notifiers
233. CPUFreq Table Generation with Operating Performance Point (OPP)
23 24
241. General Information 251. General Information
25======================= 26=======================
@@ -92,3 +93,31 @@ values:
92cpu - number of the affected CPU 93cpu - number of the affected CPU
93old - old frequency 94old - old frequency
94new - new frequency 95new - new frequency
96
973. CPUFreq Table Generation with Operating Performance Point (OPP)
98==================================================================
99For details about OPP, see Documentation/power/opp.txt
100
101dev_pm_opp_init_cpufreq_table - cpufreq framework typically is initialized with
102 cpufreq_frequency_table_cpuinfo which is provided with the list of
103 frequencies that are available for operation. This function provides
104 a ready to use conversion routine to translate the OPP layer's internal
105 information about the available frequencies into a format readily
106 providable to cpufreq.
107
108 WARNING: Do not use this function in interrupt context.
109
110 Example:
111 soc_pm_init()
112 {
113 /* Do things */
114 r = dev_pm_opp_init_cpufreq_table(dev, &freq_table);
115 if (!r)
116 cpufreq_frequency_table_cpuinfo(policy, freq_table);
117 /* Do other things */
118 }
119
120 NOTE: This function is available only if CONFIG_CPU_FREQ is enabled in
121 addition to CONFIG_PM_OPP.
122
123dev_pm_opp_free_cpufreq_table - Free up the table allocated by dev_pm_opp_init_cpufreq_table
diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt
index 48da5fdcb9f1..14f4e6336d88 100644
--- a/Documentation/cpu-freq/cpu-drivers.txt
+++ b/Documentation/cpu-freq/cpu-drivers.txt
@@ -26,6 +26,7 @@ Contents:
261.4 target/target_index or setpolicy? 261.4 target/target_index or setpolicy?
271.5 target/target_index 271.5 target/target_index
281.6 setpolicy 281.6 setpolicy
291.7 get_intermediate and target_intermediate
292. Frequency Table Helpers 302. Frequency Table Helpers
30 31
31 32
@@ -79,6 +80,10 @@ cpufreq_driver.attr - A pointer to a NULL-terminated list of
79 "struct freq_attr" which allow to 80 "struct freq_attr" which allow to
80 export values to sysfs. 81 export values to sysfs.
81 82
83cpufreq_driver.get_intermediate
84and target_intermediate Used to switch to stable frequency while
85 changing CPU frequency.
86
82 87
831.2 Per-CPU Initialization 881.2 Per-CPU Initialization
84-------------------------- 89--------------------------
@@ -151,7 +156,7 @@ Some cpufreq-capable processors switch the frequency between certain
151limits on their own. These shall use the ->setpolicy call 156limits on their own. These shall use the ->setpolicy call
152 157
153 158
1541.4. target/target_index 1591.5. target/target_index
155------------- 160-------------
156 161
157The target_index call has two arguments: struct cpufreq_policy *policy, 162The target_index call has two arguments: struct cpufreq_policy *policy,
@@ -160,6 +165,9 @@ and unsigned int index (into the exposed frequency table).
160The CPUfreq driver must set the new frequency when called here. The 165The CPUfreq driver must set the new frequency when called here. The
161actual frequency must be determined by freq_table[index].frequency. 166actual frequency must be determined by freq_table[index].frequency.
162 167
168It should always restore to earlier frequency (i.e. policy->restore_freq) in
169case of errors, even if we switched to intermediate frequency earlier.
170
163Deprecated: 171Deprecated:
164---------- 172----------
165The target call has three arguments: struct cpufreq_policy *policy, 173The target call has three arguments: struct cpufreq_policy *policy,
@@ -179,7 +187,7 @@ Here again the frequency table helper might assist you - see section 2
179for details. 187for details.
180 188
181 189
1821.5 setpolicy 1901.6 setpolicy
183--------------- 191---------------
184 192
185The setpolicy call only takes a struct cpufreq_policy *policy as 193The setpolicy call only takes a struct cpufreq_policy *policy as
@@ -190,6 +198,23 @@ setting when policy->policy is CPUFREQ_POLICY_PERFORMANCE, and a
190powersaving-oriented setting when CPUFREQ_POLICY_POWERSAVE. Also check 198powersaving-oriented setting when CPUFREQ_POLICY_POWERSAVE. Also check
191the reference implementation in drivers/cpufreq/longrun.c 199the reference implementation in drivers/cpufreq/longrun.c
192 200
2011.7 get_intermediate and target_intermediate
202--------------------------------------------
203
204Only for drivers with target_index() and CPUFREQ_ASYNC_NOTIFICATION unset.
205
206get_intermediate should return a stable intermediate frequency platform wants to
207switch to, and target_intermediate() should set CPU to to that frequency, before
208jumping to the frequency corresponding to 'index'. Core will take care of
209sending notifications and driver doesn't have to handle them in
210target_intermediate() or target_index().
211
212Drivers can return '0' from get_intermediate() in case they don't wish to switch
213to intermediate frequency for some target frequency. In that case core will
214directly call ->target_index().
215
216NOTE: ->target_index() should restore to policy->restore_freq in case of
217failures as core would send notifications for that.
193 218
194 219
1952. Frequency Table Helpers 2202. Frequency Table Helpers
@@ -228,3 +253,22 @@ is the corresponding frequency table helper for the ->target
228stage. Just pass the values to this function, and the unsigned int 253stage. Just pass the values to this function, and the unsigned int
229index returns the number of the frequency table entry which contains 254index returns the number of the frequency table entry which contains
230the frequency the CPU shall be set to. 255the frequency the CPU shall be set to.
256
257The following macros can be used as iterators over cpufreq_frequency_table:
258
259cpufreq_for_each_entry(pos, table) - iterates over all entries of frequency
260table.
261
262cpufreq-for_each_valid_entry(pos, table) - iterates over all entries,
263excluding CPUFREQ_ENTRY_INVALID frequencies.
264Use arguments "pos" - a cpufreq_frequency_table * as a loop cursor and
265"table" - the cpufreq_frequency_table * you want to iterate over.
266
267For example:
268
269 struct cpufreq_frequency_table *pos, *driver_freq_table;
270
271 cpufreq_for_each_entry(pos, driver_freq_table) {
272 /* Do something with pos */
273 pos->frequency = ...
274 }
diff --git a/Documentation/cpu-freq/index.txt b/Documentation/cpu-freq/index.txt
index 3d0b915035b9..dc024ab4054f 100644
--- a/Documentation/cpu-freq/index.txt
+++ b/Documentation/cpu-freq/index.txt
@@ -35,8 +35,8 @@ Mailing List
35------------ 35------------
36There is a CPU frequency changing CVS commit and general list where 36There is a CPU frequency changing CVS commit and general list where
37you can report bugs, problems or submit patches. To post a message, 37you can report bugs, problems or submit patches. To post a message,
38send an email to cpufreq@vger.kernel.org, to subscribe go to 38send an email to linux-pm@vger.kernel.org, to subscribe go to
39http://vger.kernel.org/vger-lists.html#cpufreq and follow the 39http://vger.kernel.org/vger-lists.html#linux-pm and follow the
40instructions there. 40instructions there.
41 41
42Links 42Links
diff --git a/Documentation/cpu-freq/intel-pstate.txt b/Documentation/cpu-freq/intel-pstate.txt
index e742d21dbd96..a69ffe1d54d5 100644
--- a/Documentation/cpu-freq/intel-pstate.txt
+++ b/Documentation/cpu-freq/intel-pstate.txt
@@ -15,10 +15,13 @@ New sysfs files for controlling P state selection have been added to
15/sys/devices/system/cpu/intel_pstate/ 15/sys/devices/system/cpu/intel_pstate/
16 16
17 max_perf_pct: limits the maximum P state that will be requested by 17 max_perf_pct: limits the maximum P state that will be requested by
18 the driver stated as a percentage of the available performance. 18 the driver stated as a percentage of the available performance. The
19 available (P states) performance may be reduced by the no_turbo
20 setting described below.
19 21
20 min_perf_pct: limits the minimum P state that will be requested by 22 min_perf_pct: limits the minimum P state that will be requested by
21 the driver stated as a percentage of the available performance. 23 the driver stated as a percentage of the max (non-turbo)
24 performance level.
22 25
23 no_turbo: limits the driver to selecting P states below the turbo 26 no_turbo: limits the driver to selecting P states below the turbo
24 frequency range. 27 frequency range.
diff --git a/Documentation/debugging-via-ohci1394.txt b/Documentation/debugging-via-ohci1394.txt
index fa0151a712f9..5c9a567b3fac 100644
--- a/Documentation/debugging-via-ohci1394.txt
+++ b/Documentation/debugging-via-ohci1394.txt
@@ -25,9 +25,11 @@ using data transfer rates in the order of 10MB/s or more.
25With most FireWire controllers, memory access is limited to the low 4 GB 25With most FireWire controllers, memory access is limited to the low 4 GB
26of physical address space. This can be a problem on IA64 machines where 26of physical address space. This can be a problem on IA64 machines where
27memory is located mostly above that limit, but it is rarely a problem on 27memory is located mostly above that limit, but it is rarely a problem on
28more common hardware such as x86, x86-64 and PowerPC. However, at least 28more common hardware such as x86, x86-64 and PowerPC.
29Agere/LSI FW643e and FW643e2 controllers are known to support access to 29
30physical addresses above 4 GB. 30At least LSI FW643e and FW643e2 controllers are known to support access to
31physical addresses above 4 GB, but this feature is currently not enabled by
32Linux.
31 33
32Together with a early initialization of the OHCI-1394 controller for debugging, 34Together with a early initialization of the OHCI-1394 controller for debugging,
33this facility proved most useful for examining long debugs logs in the printk 35this facility proved most useful for examining long debugs logs in the printk
@@ -101,8 +103,9 @@ Step-by-step instructions for using firescope with early OHCI initialization:
101 compliant, they are based on TI PCILynx chips and require drivers for Win- 103 compliant, they are based on TI PCILynx chips and require drivers for Win-
102 dows operating systems. 104 dows operating systems.
103 105
104 The mentioned kernel log message contains ">4 GB phys DMA" in case of 106 The mentioned kernel log message contains the string "physUB" if the
105 OHCI-1394 controllers which support accesses above this limit. 107 controller implements a writable Physical Upper Bound register. This is
108 required for physical DMA above 4 GB (but not utilized by Linux yet).
106 109
1072) Establish a working FireWire cable connection: 1102) Establish a working FireWire cable connection:
108 111
diff --git a/Documentation/device-mapper/thin-provisioning.txt b/Documentation/device-mapper/thin-provisioning.txt
index 05a27e9442bd..2f5173500bd9 100644
--- a/Documentation/device-mapper/thin-provisioning.txt
+++ b/Documentation/device-mapper/thin-provisioning.txt
@@ -309,7 +309,10 @@ ii) Status
309 error_if_no_space|queue_if_no_space 309 error_if_no_space|queue_if_no_space
310 If the pool runs out of data or metadata space, the pool will 310 If the pool runs out of data or metadata space, the pool will
311 either queue or error the IO destined to the data device. The 311 either queue or error the IO destined to the data device. The
312 default is to queue the IO until more space is added. 312 default is to queue the IO until more space is added or the
313 'no_space_timeout' expires. The 'no_space_timeout' dm-thin-pool
314 module parameter can be used to change this timeout -- it
315 defaults to 60 seconds but may be disabled using a value of 0.
313 316
314iii) Messages 317iii) Messages
315 318
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt
index 926b4d6aae7e..26799ef562df 100644
--- a/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt
+++ b/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt
@@ -1,20 +1,21 @@
1Power Management Service Unit(PMSU) 1Power Management Service Unit(PMSU)
2----------------------------------- 2-----------------------------------
3Available on Marvell SOCs: Armada 370 and Armada XP 3Available on Marvell SOCs: Armada 370, Armada 38x and Armada XP
4 4
5Required properties: 5Required properties:
6 6
7- compatible: "marvell,armada-370-xp-pmsu" 7- compatible: should be one of:
8 - "marvell,armada-370-pmsu" for Armada 370 or Armada XP
9 - "marvell,armada-380-pmsu" for Armada 38x
10 - "marvell,armada-370-xp-pmsu" was used for Armada 370/XP but is now
11 deprecated and will be removed
8 12
9- reg: Should contain PMSU registers location and length. First pair 13- reg: Should contain PMSU registers location and length.
10 for the per-CPU SW Reset Control registers, second pair for the
11 Power Management Service Unit.
12 14
13Example: 15Example:
14 16
15armada-370-xp-pmsu@d0022000 { 17armada-370-xp-pmsu@22000 {
16 compatible = "marvell,armada-370-xp-pmsu"; 18 compatible = "marvell,armada-370-pmsu";
17 reg = <0xd0022100 0x430>, 19 reg = <0x22000 0x1000>;
18 <0xd0020800 0x20>;
19}; 20};
20 21
diff --git a/Documentation/devicetree/bindings/arm/armada-38x.txt b/Documentation/devicetree/bindings/arm/armada-38x.txt
index 11f2330a6554..ad9f8ed4d9bd 100644
--- a/Documentation/devicetree/bindings/arm/armada-38x.txt
+++ b/Documentation/devicetree/bindings/arm/armada-38x.txt
@@ -6,5 +6,15 @@ following property:
6 6
7Required root node property: 7Required root node property:
8 8
9 - compatible: must contain either "marvell,armada380" or 9 - compatible: must contain "marvell,armada380"
10 "marvell,armada385" depending on the variant of the SoC being used. 10
11In addition, boards using the Marvell Armada 385 SoC shall have the
12following property before the previous one:
13
14Required root node property:
15
16compatible: must contain "marvell,armada385"
17
18Example:
19
20compatible = "marvell,a385-rd", "marvell,armada385", "marvell,armada380";
diff --git a/Documentation/devicetree/bindings/arm/armada-cpu-reset.txt b/Documentation/devicetree/bindings/arm/armada-cpu-reset.txt
new file mode 100644
index 000000000000..b63a7b6ab998
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/armada-cpu-reset.txt
@@ -0,0 +1,14 @@
1Marvell Armada CPU reset controller
2===================================
3
4Required properties:
5
6- compatible: Should be "marvell,armada-370-cpu-reset".
7
8- reg: should be register base and length as documented in the
9 datasheet for the CPU reset registers
10
11cpurst: cpurst@20800 {
12 compatible = "marvell,armada-370-cpu-reset";
13 reg = <0x20800 0x20>;
14};
diff --git a/Documentation/devicetree/bindings/arm/axxia.txt b/Documentation/devicetree/bindings/arm/axxia.txt
new file mode 100644
index 000000000000..7b4ef9c07696
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/axxia.txt
@@ -0,0 +1,12 @@
1Axxia AXM55xx device tree bindings
2
3Boards using the AXM55xx SoC need to have the following properties:
4
5Required root node property:
6
7 - compatible = "lsi,axm5516"
8
9Boards:
10
11 LSI AXM5516 Validation board (Amarillo)
12 compatible = "lsi,axm5516-amarillo", "lsi,axm5516"
diff --git a/Documentation/devicetree/bindings/arm/coherency-fabric.txt b/Documentation/devicetree/bindings/arm/coherency-fabric.txt
index 17d8cd107559..8dd46617c889 100644
--- a/Documentation/devicetree/bindings/arm/coherency-fabric.txt
+++ b/Documentation/devicetree/bindings/arm/coherency-fabric.txt
@@ -1,16 +1,33 @@
1Coherency fabric 1Coherency fabric
2---------------- 2----------------
3Available on Marvell SOCs: Armada 370 and Armada XP 3Available on Marvell SOCs: Armada 370, Armada 375, Armada 38x and Armada XP
4 4
5Required properties: 5Required properties:
6 6
7- compatible: "marvell,coherency-fabric" 7- compatible: the possible values are:
8
9 * "marvell,coherency-fabric", to be used for the coherency fabric of
10 the Armada 370 and Armada XP.
11
12 * "marvell,armada-375-coherency-fabric", for the Armada 375 coherency
13 fabric.
14
15 * "marvell,armada-380-coherency-fabric", for the Armada 38x coherency
16 fabric.
8 17
9- reg: Should contain coherency fabric registers location and 18- reg: Should contain coherency fabric registers location and
10 length. First pair for the coherency fabric registers, second pair 19 length.
11 for the per-CPU fabric registers registers. 20
21 * For "marvell,coherency-fabric", the first pair for the coherency
22 fabric registers, second pair for the per-CPU fabric registers.
12 23
13Example: 24 * For "marvell,armada-375-coherency-fabric", only one pair is needed
25 for the per-CPU fabric registers.
26
27 * For "marvell,armada-380-coherency-fabric", only one pair is needed
28 for the per-CPU fabric registers.
29
30Examples:
14 31
15coherency-fabric@d0020200 { 32coherency-fabric@d0020200 {
16 compatible = "marvell,coherency-fabric"; 33 compatible = "marvell,coherency-fabric";
@@ -19,3 +36,8 @@ coherency-fabric@d0020200 {
19 36
20}; 37};
21 38
39coherency-fabric@21810 {
40 compatible = "marvell,armada-375-coherency-fabric";
41 reg = <0x21810 0x1c>;
42};
43
diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt
index 333f4aea3029..1fe72a0778cd 100644
--- a/Documentation/devicetree/bindings/arm/cpus.txt
+++ b/Documentation/devicetree/bindings/arm/cpus.txt
@@ -178,13 +178,19 @@ nodes to be present and contain the properties described below.
178 Usage and definition depend on ARM architecture version. 178 Usage and definition depend on ARM architecture version.
179 # On ARM v8 64-bit this property is required and must 179 # On ARM v8 64-bit this property is required and must
180 be one of: 180 be one of:
181 "spin-table"
182 "psci" 181 "psci"
182 "spin-table"
183 # On ARM 32-bit systems this property is optional and 183 # On ARM 32-bit systems this property is optional and
184 can be one of: 184 can be one of:
185 "allwinner,sun6i-a31"
186 "arm,psci"
187 "marvell,armada-375-smp"
188 "marvell,armada-380-smp"
189 "marvell,armada-xp-smp"
185 "qcom,gcc-msm8660" 190 "qcom,gcc-msm8660"
186 "qcom,kpss-acc-v1" 191 "qcom,kpss-acc-v1"
187 "qcom,kpss-acc-v2" 192 "qcom,kpss-acc-v2"
193 "rockchip,rk3066-smp"
188 194
189 - cpu-release-addr 195 - cpu-release-addr
190 Usage: required for systems that have an "enable-method" 196 Usage: required for systems that have an "enable-method"
diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
index 5216b419016a..8b4f7b7fe88b 100644
--- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
+++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
@@ -9,6 +9,18 @@ Required Properties:
9- reg: physical base address of the controller and length of memory mapped 9- reg: physical base address of the controller and length of memory mapped
10 region. 10 region.
11 11
12Optional Properties:
13- clocks: List of clock handles. The parent clocks of the input clocks to the
14 devices in this power domain are set to oscclk before power gating
15 and restored back after powering on a domain. This is required for
16 all domains which are powered on and off and not required for unused
17 domains.
18- clock-names: The following clocks can be specified:
19 - oscclk: Oscillator clock.
20 - pclkN, clkN: Pairs of parent of input clock and input clock to the
21 devices in this power domain. Maximum of 4 pairs (N = 0 to 3)
22 are supported currently.
23
12Node of a device using power domains must have a samsung,power-domain property 24Node of a device using power domains must have a samsung,power-domain property
13defined with a phandle to respective power domain. 25defined with a phandle to respective power domain.
14 26
@@ -19,6 +31,14 @@ Example:
19 reg = <0x10023C00 0x10>; 31 reg = <0x10023C00 0x10>;
20 }; 32 };
21 33
34 mfc_pd: power-domain@10044060 {
35 compatible = "samsung,exynos4210-pd";
36 reg = <0x10044060 0x20>;
37 clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MOUT_SW_ACLK333>,
38 <&clock CLK_MOUT_USER_ACLK333>;
39 clock-names = "oscclk", "pclk0", "clk0";
40 };
41
22Example of the node using power domain: 42Example of the node using power domain:
23 43
24 node { 44 node {
diff --git a/Documentation/devicetree/bindings/arm/exynos/smp-sysram.txt b/Documentation/devicetree/bindings/arm/exynos/smp-sysram.txt
new file mode 100644
index 000000000000..4a0a4f70a0ce
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/exynos/smp-sysram.txt
@@ -0,0 +1,38 @@
1Samsung Exynos SYSRAM for SMP bringup:
2------------------------------------
3
4Samsung SMP-capable Exynos SoCs use part of the SYSRAM for the bringup
5of the secondary cores. Once the core gets powered up it executes the
6code that is residing at some specific location of the SYSRAM.
7
8Therefore reserved section sub-nodes have to be added to the mmio-sram
9declaration. These nodes are of two types depending upon secure or
10non-secure execution environment.
11
12Required sub-node properties:
13- compatible : depending upon boot mode, should be
14 "samsung,exynos4210-sysram" : for Secure SYSRAM
15 "samsung,exynos4210-sysram-ns" : for Non-secure SYSRAM
16
17The rest of the properties should follow the generic mmio-sram discription
18found in ../../misc/sysram.txt
19
20Example:
21
22 sysram@02020000 {
23 compatible = "mmio-sram";
24 reg = <0x02020000 0x54000>;
25 #address-cells = <1>;
26 #size-cells = <1>;
27 ranges = <0 0x02020000 0x54000>;
28
29 smp-sysram@0 {
30 compatible = "samsung,exynos4210-sysram";
31 reg = <0x0 0x1000>;
32 };
33
34 smp-sysram@53000 {
35 compatible = "samsung,exynos4210-sysram-ns";
36 reg = <0x53000 0x1000>;
37 };
38 };
diff --git a/Documentation/devicetree/bindings/arm/global_timer.txt b/Documentation/devicetree/bindings/arm/global_timer.txt
index 1e548981eda4..bdae3a818793 100644
--- a/Documentation/devicetree/bindings/arm/global_timer.txt
+++ b/Documentation/devicetree/bindings/arm/global_timer.txt
@@ -4,8 +4,11 @@
4 4
5** Timer node required properties: 5** Timer node required properties:
6 6
7- compatible : Should be "arm,cortex-a9-global-timer" 7- compatible : should contain
8 Driver supports versions r2p0 and above. 8 * "arm,cortex-a5-global-timer" for Cortex-A5 global timers.
9 * "arm,cortex-a9-global-timer" for Cortex-A9 global
10 timers or any compatible implementation. Note: driver
11 supports versions r2p0 and above.
9 12
10- interrupts : One interrupt to each core 13- interrupts : One interrupt to each core
11 14
diff --git a/Documentation/devicetree/bindings/arm/l2cc.txt b/Documentation/devicetree/bindings/arm/l2cc.txt
index b513cb8196fe..af527ee111c2 100644
--- a/Documentation/devicetree/bindings/arm/l2cc.txt
+++ b/Documentation/devicetree/bindings/arm/l2cc.txt
@@ -40,6 +40,9 @@ Optional properties:
40- arm,filter-ranges : <start length> Starting address and length of window to 40- arm,filter-ranges : <start length> Starting address and length of window to
41 filter. Addresses in the filter window are directed to the M1 port. Other 41 filter. Addresses in the filter window are directed to the M1 port. Other
42 addresses will go to the M0 port. 42 addresses will go to the M0 port.
43- arm,io-coherent : indicates that the system is operating in an hardware
44 I/O coherent mode. Valid only when the arm,pl310-cache compatible
45 string is used.
43- interrupts : 1 combined interrupt. 46- interrupts : 1 combined interrupt.
44- cache-id-part: cache id part number to be used if it is not present 47- cache-id-part: cache id part number to be used if it is not present
45 on hardware 48 on hardware
diff --git a/Documentation/devicetree/bindings/arm/marvell,berlin.txt b/Documentation/devicetree/bindings/arm/marvell,berlin.txt
index 737afa5f8148..94013a9a8769 100644
--- a/Documentation/devicetree/bindings/arm/marvell,berlin.txt
+++ b/Documentation/devicetree/bindings/arm/marvell,berlin.txt
@@ -12,6 +12,7 @@ SoC and board used. Currently known SoC compatibles are:
12 "marvell,berlin2" for Marvell Armada 1500 (BG2, 88DE3100), 12 "marvell,berlin2" for Marvell Armada 1500 (BG2, 88DE3100),
13 "marvell,berlin2cd" for Marvell Armada 1500-mini (BG2CD, 88DE3005) 13 "marvell,berlin2cd" for Marvell Armada 1500-mini (BG2CD, 88DE3005)
14 "marvell,berlin2ct" for Marvell Armada ? (BG2CT, 88DE????) 14 "marvell,berlin2ct" for Marvell Armada ? (BG2CT, 88DE????)
15 "marvell,berlin2q" for Marvell Armada 1500-pro (BG2Q, 88DE3114)
15 "marvell,berlin3" for Marvell Armada ? (BG3, 88DE????) 16 "marvell,berlin3" for Marvell Armada ? (BG3, 88DE????)
16 17
17* Example: 18* Example:
@@ -22,3 +23,104 @@ SoC and board used. Currently known SoC compatibles are:
22 23
23 ... 24 ...
24} 25}
26
27* Marvell Berlin2 chip control binding
28
29Marvell Berlin SoCs have a chip control register set providing several
30individual registers dealing with pinmux, padmux, clock, reset, and secondary
31CPU boot address. Unfortunately, the individual registers are spread among the
32chip control registers, so there should be a single DT node only providing the
33different functions which are described below.
34
35Required properties:
36- compatible: shall be one of
37 "marvell,berlin2-chip-ctrl" for BG2
38 "marvell,berlin2cd-chip-ctrl" for BG2CD
39 "marvell,berlin2q-chip-ctrl" for BG2Q
40- reg: address and length of following register sets for
41 BG2/BG2CD: chip control register set
42 BG2Q: chip control register set and cpu pll registers
43
44* Marvell Berlin2 system control binding
45
46Marvell Berlin SoCs have a system control register set providing several
47individual registers dealing with pinmux, padmux, and reset.
48
49Required properties:
50- compatible: should be one of
51 "marvell,berlin2-system-ctrl" for BG2
52 "marvell,berlin2cd-system-ctrl" for BG2CD
53 "marvell,berlin2q-system-ctrl" for BG2Q
54- reg: address and length of the system control register set
55
56* Clock provider binding
57
58As clock related registers are spread among the chip control registers, the
59chip control node also provides the clocks. Marvell Berlin2 (BG2, BG2CD, BG2Q)
60SoCs share the same IP for PLLs and clocks, with some minor differences in
61features and register layout.
62
63Required properties:
64- #clock-cells: shall be set to 1
65- clocks: clock specifiers referencing the core clock input clocks
66- clock-names: array of strings describing the input clock specifiers above.
67 Allowed clock-names for the reference clocks are
68 "refclk" for the SoCs osciallator input on all SoCs,
69 and SoC-specific input clocks for
70 BG2/BG2CD: "video_ext0" for the external video clock input
71
72Clocks provided by core clocks shall be referenced by a clock specifier
73indexing one of the provided clocks. Refer to dt-bindings/clock/berlin<soc>.h
74for the corresponding index mapping.
75
76* Pin controller binding
77
78Pin control registers are part of both register sets, chip control and system
79control. The pins controlled are organized in groups, so no actual pin
80information is needed.
81
82A pin-controller node should contain subnodes representing the pin group
83configurations, one per function. Each subnode has the group name and the muxing
84function used.
85
86Be aware the Marvell Berlin datasheets use the keyword 'mode' for what is called
87a 'function' in the pin-controller subsystem.
88
89Required subnode-properties:
90- groups: a list of strings describing the group names.
91- function: a string describing the function used to mux the groups.
92
93Example:
94
95chip: chip-control@ea0000 {
96 compatible = "marvell,berlin2-chip-ctrl";
97 #clock-cells = <1>;
98 reg = <0xea0000 0x400>;
99 clocks = <&refclk>, <&externaldev 0>;
100 clock-names = "refclk", "video_ext0";
101
102 spi1_pmux: spi1-pmux {
103 groups = "G0";
104 function = "spi1";
105 };
106};
107
108sysctrl: system-controller@d000 {
109 compatible = "marvell,berlin2-system-ctrl";
110 reg = <0xd000 0x100>;
111
112 uart0_pmux: uart0-pmux {
113 groups = "GSM4";
114 function = "uart0";
115 };
116
117 uart1_pmux: uart1-pmux {
118 groups = "GSM5";
119 function = "uart1";
120 };
121
122 uart2_pmux: uart2-pmux {
123 groups = "GSM3";
124 function = "uart2";
125 };
126};
diff --git a/Documentation/devicetree/bindings/arm/omap/l3-noc.txt b/Documentation/devicetree/bindings/arm/omap/l3-noc.txt
index c0105de55cbd..974624ea68f6 100644
--- a/Documentation/devicetree/bindings/arm/omap/l3-noc.txt
+++ b/Documentation/devicetree/bindings/arm/omap/l3-noc.txt
@@ -6,6 +6,8 @@ provided by Arteris.
6Required properties: 6Required properties:
7- compatible : Should be "ti,omap3-l3-smx" for OMAP3 family 7- compatible : Should be "ti,omap3-l3-smx" for OMAP3 family
8 Should be "ti,omap4-l3-noc" for OMAP4 family 8 Should be "ti,omap4-l3-noc" for OMAP4 family
9 Should be "ti,dra7-l3-noc" for DRA7 family
10 Should be "ti,am4372-l3-noc" for AM43 family
9- reg: Contains L3 register address range for each noc domain. 11- reg: Contains L3 register address range for each noc domain.
10- ti,hwmods: "l3_main_1", ... One hwmod for each noc domain. 12- ti,hwmods: "l3_main_1", ... One hwmod for each noc domain.
11 13
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
index 36ede19a1630..d22b216f5d23 100644
--- a/Documentation/devicetree/bindings/arm/omap/omap.txt
+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
@@ -80,7 +80,10 @@ SoCs:
80 compatible = "ti,omap5432", "ti,omap5" 80 compatible = "ti,omap5432", "ti,omap5"
81 81
82- DRA742 82- DRA742
83 compatible = "ti,dra7xx", "ti,dra7" 83 compatible = "ti,dra742", "ti,dra74", "ti,dra7"
84
85- DRA722
86 compatible = "ti,dra722", "ti,dra72", "ti,dra7"
84 87
85- AM4372 88- AM4372
86 compatible = "ti,am4372", "ti,am43" 89 compatible = "ti,am4372", "ti,am43"
@@ -102,6 +105,12 @@ Boards:
102- OMAP4 DuoVero with Parlor : Commercial expansion board with daughter board 105- OMAP4 DuoVero with Parlor : Commercial expansion board with daughter board
103 compatible = "gumstix,omap4-duovero-parlor", "gumstix,omap4-duovero", "ti,omap4430", "ti,omap4"; 106 compatible = "gumstix,omap4-duovero-parlor", "gumstix,omap4-duovero", "ti,omap4430", "ti,omap4";
104 107
108- OMAP4 VAR-STK-OM44 : Commercial dev kit with VAR-OM44CustomBoard and VAR-SOM-OM44 w/WLAN
109 compatible = "variscite,var-stk-om44", "variscite,var-som-om44", "ti,omap4460", "ti,omap4";
110
111- OMAP4 VAR-DVK-OM44 : Commercial dev kit with VAR-OM44CustomBoard, VAR-SOM-OM44 w/WLAN and LCD touchscreen
112 compatible = "variscite,var-dvk-om44", "variscite,var-som-om44", "ti,omap4460", "ti,omap4";
113
105- OMAP3 EVM : Software Development Board for OMAP35x, AM/DM37x 114- OMAP3 EVM : Software Development Board for OMAP35x, AM/DM37x
106 compatible = "ti,omap3-evm", "ti,omap3" 115 compatible = "ti,omap3-evm", "ti,omap3"
107 116
@@ -120,5 +129,8 @@ Boards:
120- AM437x GP EVM 129- AM437x GP EVM
121 compatible = "ti,am437x-gp-evm", "ti,am4372", "ti,am43" 130 compatible = "ti,am437x-gp-evm", "ti,am4372", "ti,am43"
122 131
123- DRA7 EVM: Software Developement Board for DRA7XX 132- DRA742 EVM: Software Development Board for DRA742
124 compatible = "ti,dra7-evm", "ti,dra7" 133 compatible = "ti,dra7-evm", "ti,dra742", "ti,dra74", "ti,dra7"
134
135- DRA722 EVM: Software Development Board for DRA722
136 compatible = "ti,dra72-evm", "ti,dra722", "ti,dra72", "ti,dra7"
diff --git a/Documentation/devicetree/bindings/arm/pmu.txt b/Documentation/devicetree/bindings/arm/pmu.txt
index fe5cef8976cb..75ef91d08f3b 100644
--- a/Documentation/devicetree/bindings/arm/pmu.txt
+++ b/Documentation/devicetree/bindings/arm/pmu.txt
@@ -8,6 +8,7 @@ Required properties:
8 8
9- compatible : should be one of 9- compatible : should be one of
10 "arm,armv8-pmuv3" 10 "arm,armv8-pmuv3"
11 "arm,cortex-a17-pmu"
11 "arm,cortex-a15-pmu" 12 "arm,cortex-a15-pmu"
12 "arm,cortex-a12-pmu" 13 "arm,cortex-a12-pmu"
13 "arm,cortex-a9-pmu" 14 "arm,cortex-a9-pmu"
diff --git a/Documentation/devicetree/bindings/arm/psci.txt b/Documentation/devicetree/bindings/arm/psci.txt
index 433afe9cb590..b4a58f39223c 100644
--- a/Documentation/devicetree/bindings/arm/psci.txt
+++ b/Documentation/devicetree/bindings/arm/psci.txt
@@ -21,7 +21,15 @@ to #0.
21 21
22Main node required properties: 22Main node required properties:
23 23
24 - compatible : Must be "arm,psci" 24 - compatible : should contain at least one of:
25
26 * "arm,psci" : for implementations complying to PSCI versions prior to
27 0.2. For these cases function IDs must be provided.
28
29 * "arm,psci-0.2" : for implementations complying to PSCI 0.2. Function
30 IDs are not required and should be ignored by an OS with PSCI 0.2
31 support, but are permitted to be present for compatibility with
32 existing software when "arm,psci" is later in the compatible list.
25 33
26 - method : The method of calling the PSCI firmware. Permitted 34 - method : The method of calling the PSCI firmware. Permitted
27 values are: 35 values are:
@@ -45,6 +53,8 @@ Main node optional properties:
45 53
46Example: 54Example:
47 55
56Case 1: PSCI v0.1 only.
57
48 psci { 58 psci {
49 compatible = "arm,psci"; 59 compatible = "arm,psci";
50 method = "smc"; 60 method = "smc";
@@ -53,3 +63,28 @@ Example:
53 cpu_on = <0x95c10002>; 63 cpu_on = <0x95c10002>;
54 migrate = <0x95c10003>; 64 migrate = <0x95c10003>;
55 }; 65 };
66
67
68Case 2: PSCI v0.2 only
69
70 psci {
71 compatible = "arm,psci-0.2";
72 method = "smc";
73 };
74
75Case 3: PSCI v0.2 and PSCI v0.1.
76
77 A DTB may provide IDs for use by kernels without PSCI 0.2 support,
78 enabling firmware and hypervisors to support existing and new kernels.
79 These IDs will be ignored by kernels with PSCI 0.2 support, which will
80 use the standard PSCI 0.2 IDs exclusively.
81
82 psci {
83 compatible = "arm,psci-0.2", "arm,psci";
84 method = "hvc";
85
86 cpu_on = < arbitrary value >;
87 cpu_off = < arbitrary value >;
88
89 ...
90 };
diff --git a/Documentation/devicetree/bindings/arm/rockchip.txt b/Documentation/devicetree/bindings/arm/rockchip.txt
new file mode 100644
index 000000000000..857f12636eb2
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/rockchip.txt
@@ -0,0 +1,10 @@
1Rockchip platforms device tree bindings
2---------------------------------------
3
4- bq Curie 2 tablet:
5 Required root node properties:
6 - compatible = "mundoreader,bq-curie2", "rockchip,rk3066a";
7
8- Radxa Rock board:
9 Required root node properties:
10 - compatible = "radxa,rock", "rockchip,rk3188";
diff --git a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
index 5d49f2b37f68..832fe8cc24d7 100644
--- a/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
+++ b/Documentation/devicetree/bindings/arm/samsung/exynos-adc.txt
@@ -48,7 +48,7 @@ adc@12D10000 {
48 48
49 /* NTC thermistor is a hwmon device */ 49 /* NTC thermistor is a hwmon device */
50 ncp15wb473@0 { 50 ncp15wb473@0 {
51 compatible = "ntc,ncp15wb473"; 51 compatible = "murata,ncp15wb473";
52 pullup-uv = <1800000>; 52 pullup-uv = <1800000>;
53 pullup-ohm = <47000>; 53 pullup-ohm = <47000>;
54 pulldown-ohm = <0>; 54 pulldown-ohm = <0>;
diff --git a/Documentation/devicetree/bindings/arm/samsung/pmu.txt b/Documentation/devicetree/bindings/arm/samsung/pmu.txt
index f1f155255f28..2a4ab046a8a1 100644
--- a/Documentation/devicetree/bindings/arm/samsung/pmu.txt
+++ b/Documentation/devicetree/bindings/arm/samsung/pmu.txt
@@ -2,6 +2,10 @@ SAMSUNG Exynos SoC series PMU Registers
2 2
3Properties: 3Properties:
4 - compatible : should contain two values. First value must be one from following list: 4 - compatible : should contain two values. First value must be one from following list:
5 - "samsung,exynos3250-pmu" - for Exynos3250 SoC,
6 - "samsung,exynos4210-pmu" - for Exynos4210 SoC,
7 - "samsung,exynos4212-pmu" - for Exynos4212 SoC,
8 - "samsung,exynos4412-pmu" - for Exynos4412 SoC,
5 - "samsung,exynos5250-pmu" - for Exynos5250 SoC, 9 - "samsung,exynos5250-pmu" - for Exynos5250 SoC,
6 - "samsung,exynos5420-pmu" - for Exynos5420 SoC. 10 - "samsung,exynos5420-pmu" - for Exynos5420 SoC.
7 second value must be always "syscon". 11 second value must be always "syscon".
diff --git a/Documentation/devicetree/bindings/arm/samsung/sysreg.txt b/Documentation/devicetree/bindings/arm/samsung/sysreg.txt
index 0ab3251a6ec2..4fced6e9d5e4 100644
--- a/Documentation/devicetree/bindings/arm/samsung/sysreg.txt
+++ b/Documentation/devicetree/bindings/arm/samsung/sysreg.txt
@@ -1,8 +1,10 @@
1SAMSUNG S5P/Exynos SoC series System Registers (SYSREG) 1SAMSUNG S5P/Exynos SoC series System Registers (SYSREG)
2 2
3Properties: 3Properties:
4 - compatible : should contain "samsung,<chip name>-sysreg", "syscon"; 4 - compatible : should contain two values. First value must be one from following list:
5 For Exynos4 SoC series it should be "samsung,exynos4-sysreg", "syscon"; 5 - "samsung,exynos4-sysreg" - for Exynos4 based SoCs,
6 - "samsung,exynos5-sysreg" - for Exynos5 based SoCs.
7 second value must be always "syscon".
6 - reg : offset and length of the register set. 8 - reg : offset and length of the register set.
7 9
8Example: 10Example:
@@ -10,3 +12,8 @@ Example:
10 compatible = "samsung,exynos4-sysreg", "syscon"; 12 compatible = "samsung,exynos4-sysreg", "syscon";
11 reg = <0x10010000 0x400>; 13 reg = <0x10010000 0x400>;
12 }; 14 };
15
16 syscon@10050000 {
17 compatible = "samsung,exynos5-sysreg", "syscon";
18 reg = <0x10050000 0x5000>;
19 };
diff --git a/Documentation/devicetree/bindings/arm/sti.txt b/Documentation/devicetree/bindings/arm/sti.txt
new file mode 100644
index 000000000000..92f16c78bb69
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/sti.txt
@@ -0,0 +1,15 @@
1ST STi Platforms Device Tree Bindings
2---------------------------------------
3
4Boards with the ST STiH415 SoC shall have the following properties:
5Required root node property:
6compatible = "st,stih415";
7
8Boards with the ST STiH416 SoC shall have the following properties:
9Required root node property:
10compatible = "st,stih416";
11
12Boards with the ST STiH407 SoC shall have the following properties:
13Required root node property:
14compatible = "st,stih407";
15
diff --git a/Documentation/devicetree/bindings/arm/vexpress-sysreg.txt b/Documentation/devicetree/bindings/arm/vexpress-sysreg.txt
index 5580e9c4bd85..00318d083c9e 100644
--- a/Documentation/devicetree/bindings/arm/vexpress-sysreg.txt
+++ b/Documentation/devicetree/bindings/arm/vexpress-sysreg.txt
@@ -8,6 +8,8 @@ interrupt generation, MMC and NOR Flash control etc.
8Required node properties: 8Required node properties:
9- compatible value : = "arm,vexpress,sysreg"; 9- compatible value : = "arm,vexpress,sysreg";
10- reg : physical base address and the size of the registers window 10- reg : physical base address and the size of the registers window
11
12Deprecated properties, replaced by GPIO subnodes (see below):
11- gpio-controller : specifies that the node is a GPIO controller 13- gpio-controller : specifies that the node is a GPIO controller
12- #gpio-cells : size of the GPIO specifier, should be 2: 14- #gpio-cells : size of the GPIO specifier, should be 2:
13 - first cell is the pseudo-GPIO line number: 15 - first cell is the pseudo-GPIO line number:
@@ -16,35 +18,86 @@ Required node properties:
16 2 - NOR FLASH WPn 18 2 - NOR FLASH WPn
17 - second cell can take standard GPIO flags (currently ignored). 19 - second cell can take standard GPIO flags (currently ignored).
18 20
21Control registers providing pseudo-GPIO lines must be represented
22by subnodes, each of them requiring the following properties:
23- compatible value : one of
24 "arm,vexpress-sysreg,sys_led"
25 "arm,vexpress-sysreg,sys_mci"
26 "arm,vexpress-sysreg,sys_flash"
27- gpio-controller : makes the node a GPIO controller
28- #gpio-cells : size of the GPIO specifier, must be 2:
29 - first cell is the function number:
30 - for sys_led : 0..7 = LED 0..7
31 - for sys_mci : 0 = MMC CARDIN, 1 = MMC WPROT
32 - for sys_flash : 0 = NOR FLASH WPn
33 - second cell can take standard GPIO flags (currently ignored).
34
19Example: 35Example:
20 v2m_sysreg: sysreg@10000000 { 36 v2m_sysreg: sysreg@10000000 {
21 compatible = "arm,vexpress-sysreg"; 37 compatible = "arm,vexpress-sysreg";
22 reg = <0x10000000 0x1000>; 38 reg = <0x10000000 0x1000>;
23 gpio-controller; 39
24 #gpio-cells = <2>; 40 v2m_led_gpios: sys_led@08 {
41 compatible = "arm,vexpress-sysreg,sys_led";
42 gpio-controller;
43 #gpio-cells = <2>;
44 };
45
46 v2m_mmc_gpios: sys_mci@48 {
47 compatible = "arm,vexpress-sysreg,sys_mci";
48 gpio-controller;
49 #gpio-cells = <2>;
50 };
51
52 v2m_flash_gpios: sys_flash@4c {
53 compatible = "arm,vexpress-sysreg,sys_flash";
54 gpio-controller;
55 #gpio-cells = <2>;
56 };
25 }; 57 };
26 58
27This block also can also act a bridge to the platform's configuration 59This block also can also act a bridge to the platform's configuration
28bus via "system control" interface, addressing devices with site number, 60bus via "system control" interface, addressing devices with site number,
29position in the board stack, config controller, function and device 61position in the board stack, config controller, function and device
30numbers - see motherboard's TRM for more details. 62numbers - see motherboard's TRM for more details. All configuration
31 63controller accessible via this interface must reference the sysreg
32The node describing a config device must refer to the sysreg node via 64node via "arm,vexpress,config-bridge" phandle and define appropriate
33"arm,vexpress,config-bridge" phandle (can be also defined in the node's 65topology properties - see main vexpress node documentation for more
34parent) and relies on the board topology properties - see main vexpress 66details. Each child of such node describes one function and must
35node documentation for more details. It must also define the following 67define the following properties:
36property: 68- compatible value : must be one of (corresponding to the TRM):
37- arm,vexpress-sysreg,func : must contain two cells: 69 "arm,vexpress-amp"
38 - first cell defines function number (eg. 1 for clock generator, 70 "arm,vexpress-dvimode"
39 2 for voltage regulators etc.) 71 "arm,vexpress-energy"
40 - device number (eg. osc 0, osc 1 etc.) 72 "arm,vexpress-muxfpga"
73 "arm,vexpress-osc"
74 "arm,vexpress-power"
75 "arm,vexpress-reboot"
76 "arm,vexpress-reset"
77 "arm,vexpress-scc"
78 "arm,vexpress-shutdown"
79 "arm,vexpress-temp"
80 "arm,vexpress-volt"
81- arm,vexpress-sysreg,func : must contain a set of two cells long groups:
82 - first cell of each group defines the function number
83 (eg. 1 for clock generator, 2 for voltage regulators etc.)
84 - second cell of each group defines device number (eg. osc 0,
85 osc 1 etc.)
86 - some functions (eg. energy meter, with its 64 bit long counter)
87 are using more than one function/device number pair
41 88
42Example: 89Example:
43 mcc { 90 mcc {
91 compatible = "arm,vexpress,config-bus";
44 arm,vexpress,config-bridge = <&v2m_sysreg>; 92 arm,vexpress,config-bridge = <&v2m_sysreg>;
45 93
46 osc@0 { 94 osc@0 {
47 compatible = "arm,vexpress-osc"; 95 compatible = "arm,vexpress-osc";
48 arm,vexpress-sysreg,func = <1 0>; 96 arm,vexpress-sysreg,func = <1 0>;
49 }; 97 };
98
99 energy@0 {
100 compatible = "arm,vexpress-energy";
101 arm,vexpress-sysreg,func = <13 0>, <13 1>;
102 };
50 }; 103 };
diff --git a/Documentation/devicetree/bindings/arm/vexpress.txt b/Documentation/devicetree/bindings/arm/vexpress.txt
index ae49161e478a..39844cd0bcce 100644
--- a/Documentation/devicetree/bindings/arm/vexpress.txt
+++ b/Documentation/devicetree/bindings/arm/vexpress.txt
@@ -80,12 +80,17 @@ but also control clock generators, voltage regulators, gather
80environmental data like temperature, power consumption etc. Even 80environmental data like temperature, power consumption etc. Even
81the video output switch (FPGA) is controlled that way. 81the video output switch (FPGA) is controlled that way.
82 82
83Nodes describing devices controlled by this infrastructure should 83The controllers are not mapped into normal memory address space
84point at the bridge device node: 84and must be accessed through bridges - other devices capable
85of generating transactions on the configuration bus.
86
87The nodes describing configuration controllers must define
88the following properties:
89- compatible value:
90 compatible = "arm,vexpress,config-bus";
85- bridge phandle: 91- bridge phandle:
86 arm,vexpress,config-bridge = <phandle>; 92 arm,vexpress,config-bridge = <phandle>;
87This property can be also defined in a parent node (eg. for a DCC) 93and children describing available functions.
88and is effective for all children.
89 94
90 95
91Platform topology 96Platform topology
@@ -197,7 +202,7 @@ Example of a VE tile description (simplified)
197 }; 202 };
198 203
199 dcc { 204 dcc {
200 compatible = "simple-bus"; 205 compatible = "arm,vexpress,config-bus";
201 arm,vexpress,config-bridge = <&v2m_sysreg>; 206 arm,vexpress,config-bridge = <&v2m_sysreg>;
202 207
203 osc@0 { 208 osc@0 {
diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt
index 48b285ffa3a6..c96d8dcf98fd 100644
--- a/Documentation/devicetree/bindings/ata/ahci-platform.txt
+++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt
@@ -4,10 +4,16 @@ SATA nodes are defined to describe on-chip Serial ATA controllers.
4Each SATA controller should have its own node. 4Each SATA controller should have its own node.
5 5
6Required properties: 6Required properties:
7- compatible : compatible list, one of "snps,spear-ahci", 7- compatible : compatible string, one of:
8 "snps,exynos5440-ahci", "ibm,476gtr-ahci", 8 - "allwinner,sun4i-a10-ahci"
9 "allwinner,sun4i-a10-ahci", "fsl,imx53-ahci" 9 - "fsl,imx53-ahci"
10 "fsl,imx6q-ahci" or "snps,dwc-ahci" 10 - "fsl,imx6q-ahci"
11 - "hisilicon,hisi-ahci"
12 - "ibm,476gtr-ahci"
13 - "marvell,armada-380-ahci"
14 - "snps,dwc-ahci"
15 - "snps,exynos5440-ahci"
16 - "snps,spear-ahci"
11- interrupts : <interrupt mapping for SATA IRQ> 17- interrupts : <interrupt mapping for SATA IRQ>
12- reg : <registers mapping> 18- reg : <registers mapping>
13 19
diff --git a/Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt b/Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt
new file mode 100644
index 000000000000..e2d501d20c9a
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt
@@ -0,0 +1,30 @@
1Broadcom GISB bus Arbiter controller
2
3Required properties:
4
5- compatible: should be "brcm,gisb-arb"
6- reg: specifies the base physical address and size of the registers
7- interrupt-parent: specifies the phandle to the parent interrupt controller
8 this arbiter gets interrupt line from
9- interrupts: specifies the two interrupts (timeout and TEA) to be used from
10 the parent interrupt controller
11
12Optional properties:
13
14- brcm,gisb-arb-master-mask: 32-bits wide bitmask used to specify which GISB
15 masters are valid at the system level
16- brcm,gisb-arb-master-names: string list of the litteral name of the GISB
17 masters. Should match the number of bits set in brcm,gisb-master-mask and
18 the order in which they appear
19
20Example:
21
22gisb-arb@f0400000 {
23 compatible = "brcm,gisb-arb";
24 reg = <0xf0400000 0x800>;
25 interrupts = <0>, <2>;
26 interrupt-parent = <&sun_l2_intc>;
27
28 brcm,gisb-arb-master-mask = <0x7>;
29 brcm,gisb-arb-master-names = "bsp_0", "scpu_0", "cpu_0";
30};
diff --git a/Documentation/devicetree/bindings/bus/mvebu-mbus.txt b/Documentation/devicetree/bindings/bus/mvebu-mbus.txt
index 7586fb68c072..5fa44f52a0b8 100644
--- a/Documentation/devicetree/bindings/bus/mvebu-mbus.txt
+++ b/Documentation/devicetree/bindings/bus/mvebu-mbus.txt
@@ -197,7 +197,7 @@ to be set by the operating system and that are guaranteed to be free of overlaps
197with one another or with the system memory ranges. 197with one another or with the system memory ranges.
198 198
199Each entry in the property refers to exactly one window. If the operating system 199Each entry in the property refers to exactly one window. If the operating system
200choses to use a different set of mbus windows, it must ensure that any address 200chooses to use a different set of mbus windows, it must ensure that any address
201translations performed from downstream devices are adapted accordingly. 201translations performed from downstream devices are adapted accordingly.
202 202
203The operating system may insert additional mbus windows that do not conflict 203The operating system may insert additional mbus windows that do not conflict
diff --git a/Documentation/devicetree/bindings/clock/altr_socfpga.txt b/Documentation/devicetree/bindings/clock/altr_socfpga.txt
index 5dfd145d3ccf..f72e80e0dade 100644
--- a/Documentation/devicetree/bindings/clock/altr_socfpga.txt
+++ b/Documentation/devicetree/bindings/clock/altr_socfpga.txt
@@ -21,8 +21,8 @@ Optional properties:
21- fixed-divider : If clocks have a fixed divider value, use this property. 21- fixed-divider : If clocks have a fixed divider value, use this property.
22- clk-gate : For "socfpga-gate-clk", clk-gate contains the gating register 22- clk-gate : For "socfpga-gate-clk", clk-gate contains the gating register
23 and the bit index. 23 and the bit index.
24- div-reg : For "socfpga-gate-clk", div-reg contains the divider register, bit shift, 24- div-reg : For "socfpga-gate-clk" and "socfpga-periph-clock", div-reg contains
25 and width. 25 the divider register, bit shift, and width.
26- clk-phase : For the sdmmc_clk, contains the value of the clock phase that controls 26- clk-phase : For the sdmmc_clk, contains the value of the clock phase that controls
27 the SDMMC CIU clock. The first value is the clk_sample(smpsel), and the second 27 the SDMMC CIU clock. The first value is the clk_sample(smpsel), and the second
28 value is the cclk_in_drv(drvsel). The clk-phase is used to enable the correct 28 value is the cclk_in_drv(drvsel). The clk-phase is used to enable the correct
diff --git a/Documentation/devicetree/bindings/clock/at91-clock.txt b/Documentation/devicetree/bindings/clock/at91-clock.txt
index cd5e23912888..b3d544ca522a 100644
--- a/Documentation/devicetree/bindings/clock/at91-clock.txt
+++ b/Documentation/devicetree/bindings/clock/at91-clock.txt
@@ -6,6 +6,16 @@ This binding uses the common clock binding[1].
6 6
7Required properties: 7Required properties:
8- compatible : shall be one of the following: 8- compatible : shall be one of the following:
9 "atmel,at91sam9x5-sckc":
10 at91 SCKC (Slow Clock Controller)
11 This node contains the slow clock definitions.
12
13 "atmel,at91sam9x5-clk-slow-osc":
14 at91 slow oscillator
15
16 "atmel,at91sam9x5-clk-slow-rc-osc":
17 at91 internal slow RC oscillator
18
9 "atmel,at91rm9200-pmc" or 19 "atmel,at91rm9200-pmc" or
10 "atmel,at91sam9g45-pmc" or 20 "atmel,at91sam9g45-pmc" or
11 "atmel,at91sam9n12-pmc" or 21 "atmel,at91sam9n12-pmc" or
@@ -15,8 +25,18 @@ Required properties:
15 All at91 specific clocks (clocks defined below) must be child 25 All at91 specific clocks (clocks defined below) must be child
16 node of the PMC node. 26 node of the PMC node.
17 27
28 "atmel,at91sam9x5-clk-slow" (under sckc node)
29 or
30 "atmel,at91sam9260-clk-slow" (under pmc node):
31 at91 slow clk
32
33 "atmel,at91rm9200-clk-main-osc"
34 "atmel,at91sam9x5-clk-main-rc-osc"
35 at91 main clk sources
36
37 "atmel,at91sam9x5-clk-main"
18 "atmel,at91rm9200-clk-main": 38 "atmel,at91rm9200-clk-main":
19 at91 main oscillator 39 at91 main clock
20 40
21 "atmel,at91rm9200-clk-master" or 41 "atmel,at91rm9200-clk-master" or
22 "atmel,at91sam9x5-clk-master": 42 "atmel,at91sam9x5-clk-master":
@@ -54,6 +74,63 @@ Required properties:
54 "atmel,at91sam9x5-clk-utmi": 74 "atmel,at91sam9x5-clk-utmi":
55 at91 utmi clock 75 at91 utmi clock
56 76
77Required properties for SCKC node:
78- reg : defines the IO memory reserved for the SCKC.
79- #size-cells : shall be 0 (reg is used to encode clk id).
80- #address-cells : shall be 1 (reg is used to encode clk id).
81
82
83For example:
84 sckc: sckc@fffffe50 {
85 compatible = "atmel,sama5d3-pmc";
86 reg = <0xfffffe50 0x4>
87 #size-cells = <0>;
88 #address-cells = <1>;
89
90 /* put at91 slow clocks here */
91 };
92
93
94Required properties for internal slow RC oscillator:
95- #clock-cells : from common clock binding; shall be set to 0.
96- clock-frequency : define the internal RC oscillator frequency.
97
98Optional properties:
99- clock-accuracy : define the internal RC oscillator accuracy.
100
101For example:
102 slow_rc_osc: slow_rc_osc {
103 compatible = "atmel,at91sam9x5-clk-slow-rc-osc";
104 clock-frequency = <32768>;
105 clock-accuracy = <50000000>;
106 };
107
108Required properties for slow oscillator:
109- #clock-cells : from common clock binding; shall be set to 0.
110- clocks : shall encode the main osc source clk sources (see atmel datasheet).
111
112Optional properties:
113- atmel,osc-bypass : boolean property. Set this when a clock signal is directly
114 provided on XIN.
115
116For example:
117 slow_osc: slow_osc {
118 compatible = "atmel,at91rm9200-clk-slow-osc";
119 #clock-cells = <0>;
120 clocks = <&slow_xtal>;
121 };
122
123Required properties for slow clock:
124- #clock-cells : from common clock binding; shall be set to 0.
125- clocks : shall encode the slow clk sources (see atmel datasheet).
126
127For example:
128 clk32k: slck {
129 compatible = "atmel,at91sam9x5-clk-slow";
130 #clock-cells = <0>;
131 clocks = <&slow_rc_osc &slow_osc>;
132 };
133
57Required properties for PMC node: 134Required properties for PMC node:
58- reg : defines the IO memory reserved for the PMC. 135- reg : defines the IO memory reserved for the PMC.
59- #size-cells : shall be 0 (reg is used to encode clk id). 136- #size-cells : shall be 0 (reg is used to encode clk id).
@@ -62,7 +139,7 @@ Required properties for PMC node:
62- interrupt-controller : tell that the PMC is an interrupt controller. 139- interrupt-controller : tell that the PMC is an interrupt controller.
63- #interrupt-cells : must be set to 1. The first cell encodes the interrupt id, 140- #interrupt-cells : must be set to 1. The first cell encodes the interrupt id,
64 and reflect the bit position in the PMC_ER/DR/SR registers. 141 and reflect the bit position in the PMC_ER/DR/SR registers.
65 You can use the dt macros defined in dt-bindings/clk/at91.h. 142 You can use the dt macros defined in dt-bindings/clock/at91.h.
66 0 (AT91_PMC_MOSCS) -> main oscillator ready 143 0 (AT91_PMC_MOSCS) -> main oscillator ready
67 1 (AT91_PMC_LOCKA) -> PLL A ready 144 1 (AT91_PMC_LOCKA) -> PLL A ready
68 2 (AT91_PMC_LOCKB) -> PLL B ready 145 2 (AT91_PMC_LOCKB) -> PLL B ready
@@ -85,24 +162,57 @@ For example:
85 /* put at91 clocks here */ 162 /* put at91 clocks here */
86 }; 163 };
87 164
165Required properties for main clock internal RC oscillator:
166- interrupt-parent : must reference the PMC node.
167- interrupts : shall be set to "<0>".
168- clock-frequency : define the internal RC oscillator frequency.
169
170Optional properties:
171- clock-accuracy : define the internal RC oscillator accuracy.
172
173For example:
174 main_rc_osc: main_rc_osc {
175 compatible = "atmel,at91sam9x5-clk-main-rc-osc";
176 interrupt-parent = <&pmc>;
177 interrupts = <0>;
178 clock-frequency = <12000000>;
179 clock-accuracy = <50000000>;
180 };
181
182Required properties for main clock oscillator:
183- interrupt-parent : must reference the PMC node.
184- interrupts : shall be set to "<0>".
185- #clock-cells : from common clock binding; shall be set to 0.
186- clocks : shall encode the main osc source clk sources (see atmel datasheet).
187
188Optional properties:
189- atmel,osc-bypass : boolean property. Specified if a clock signal is provided
190 on XIN.
191
192 clock signal is directly provided on XIN pin.
193
194For example:
195 main_osc: main_osc {
196 compatible = "atmel,at91rm9200-clk-main-osc";
197 interrupt-parent = <&pmc>;
198 interrupts = <0>;
199 #clock-cells = <0>;
200 clocks = <&main_xtal>;
201 };
202
88Required properties for main clock: 203Required properties for main clock:
89- interrupt-parent : must reference the PMC node. 204- interrupt-parent : must reference the PMC node.
90- interrupts : shall be set to "<0>". 205- interrupts : shall be set to "<0>".
91- #clock-cells : from common clock binding; shall be set to 0. 206- #clock-cells : from common clock binding; shall be set to 0.
92- clocks (optional if clock-frequency is provided) : shall be the slow clock 207- clocks : shall encode the main clk sources (see atmel datasheet).
93 phandle. This clock is used to calculate the main clock rate if
94 "clock-frequency" is not provided.
95- clock-frequency : the main oscillator frequency.Prefer the use of
96 "clock-frequency" over automatic clock rate calculation.
97 208
98For example: 209For example:
99 main: mainck { 210 main: mainck {
100 compatible = "atmel,at91rm9200-clk-main"; 211 compatible = "atmel,at91sam9x5-clk-main";
101 interrupt-parent = <&pmc>; 212 interrupt-parent = <&pmc>;
102 interrupts = <0>; 213 interrupts = <0>;
103 #clock-cells = <0>; 214 #clock-cells = <0>;
104 clocks = <&ck32k>; 215 clocks = <&main_rc_osc &main_osc>;
105 clock-frequency = <18432000>;
106 }; 216 };
107 217
108Required properties for master clock: 218Required properties for master clock:
diff --git a/Documentation/devicetree/bindings/clock/bcm-kona-clock.txt b/Documentation/devicetree/bindings/clock/bcm-kona-clock.txt
index 56d1f4961075..5286e260fcae 100644
--- a/Documentation/devicetree/bindings/clock/bcm-kona-clock.txt
+++ b/Documentation/devicetree/bindings/clock/bcm-kona-clock.txt
@@ -10,12 +10,12 @@ This binding uses the common clock binding:
10 10
11Required properties: 11Required properties:
12- compatible 12- compatible
13 Shall have one of the following values: 13 Shall have a value of the form "brcm,<model>-<which>-ccu",
14 - "brcm,bcm11351-root-ccu" 14 where <model> is a Broadcom SoC model number and <which> is
15 - "brcm,bcm11351-aon-ccu" 15 the name of a defined CCU. For example:
16 - "brcm,bcm11351-hub-ccu" 16 "brcm,bcm11351-root-ccu"
17 - "brcm,bcm11351-master-ccu" 17 The compatible strings used for each supported SoC family
18 - "brcm,bcm11351-slave-ccu" 18 are defined below.
19- reg 19- reg
20 Shall define the base and range of the address space 20 Shall define the base and range of the address space
21 containing clock control registers 21 containing clock control registers
@@ -26,12 +26,48 @@ Required properties:
26 Shall be an ordered list of strings defining the names of 26 Shall be an ordered list of strings defining the names of
27 the clocks provided by the CCU. 27 the clocks provided by the CCU.
28 28
29Device tree example:
30
31 slave_ccu: slave_ccu {
32 compatible = "brcm,bcm11351-slave-ccu";
33 reg = <0x3e011000 0x0f00>;
34 #clock-cells = <1>;
35 clock-output-names = "uartb",
36 "uartb2",
37 "uartb3",
38 "uartb4";
39 };
40
41 ref_crystal_clk: ref_crystal {
42 #clock-cells = <0>;
43 compatible = "fixed-clock";
44 clock-frequency = <26000000>;
45 };
46
47 uart@3e002000 {
48 compatible = "brcm,bcm11351-dw-apb-uart", "snps,dw-apb-uart";
49 status = "disabled";
50 reg = <0x3e002000 0x1000>;
51 clocks = <&slave_ccu BCM281XX_SLAVE_CCU_UARTB3>;
52 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
53 reg-shift = <2>;
54 reg-io-width = <4>;
55 };
56
57BCM281XX family
58---------------
59CCU compatible string values for SoCs in the BCM281XX family are:
60 "brcm,bcm11351-root-ccu"
61 "brcm,bcm11351-aon-ccu"
62 "brcm,bcm11351-hub-ccu"
63 "brcm,bcm11351-master-ccu"
64 "brcm,bcm11351-slave-ccu"
29 65
30BCM281XX family SoCs use Kona CCUs. The following table defines 66The following table defines the set of CCUs and clock specifiers for
31the set of CCUs and clock specifiers for BCM281XX clocks. When 67BCM281XX family clocks. When a clock consumer references a clocks,
32a clock consumer references a clocks, its symbolic specifier 68its symbolic specifier (rather than its numeric index value) should
33(rather than its numeric index value) should be used. These 69be used. These specifiers are defined in:
34specifiers are defined in "include/dt-bindings/clock/bcm281xx.h". 70 "include/dt-bindings/clock/bcm281xx.h"
35 71
36 CCU Clock Type Index Specifier 72 CCU Clock Type Index Specifier
37 --- ----- ---- ----- --------- 73 --- ----- ---- ----- ---------
@@ -64,30 +100,40 @@ specifiers are defined in "include/dt-bindings/clock/bcm281xx.h".
64 slave pwm peri 9 BCM281XX_SLAVE_CCU_PWM 100 slave pwm peri 9 BCM281XX_SLAVE_CCU_PWM
65 101
66 102
67Device tree example: 103BCM21664 family
104---------------
105CCU compatible string values for SoCs in the BCM21664 family are:
106 "brcm,bcm21664-root-ccu"
107 "brcm,bcm21664-aon-ccu"
108 "brcm,bcm21664-master-ccu"
109 "brcm,bcm21664-slave-ccu"
68 110
69 slave_ccu: slave_ccu { 111The following table defines the set of CCUs and clock specifiers for
70 compatible = "brcm,bcm11351-slave-ccu"; 112BCM21664 family clocks. When a clock consumer references a clocks,
71 reg = <0x3e011000 0x0f00>; 113its symbolic specifier (rather than its numeric index value) should
72 #clock-cells = <1>; 114be used. These specifiers are defined in:
73 clock-output-names = "uartb", 115 "include/dt-bindings/clock/bcm21664.h"
74 "uartb2",
75 "uartb3",
76 "uartb4";
77 };
78 116
79 ref_crystal_clk: ref_crystal { 117 CCU Clock Type Index Specifier
80 #clock-cells = <0>; 118 --- ----- ---- ----- ---------
81 compatible = "fixed-clock"; 119 root frac_1m peri 0 BCM21664_ROOT_CCU_FRAC_1M
82 clock-frequency = <26000000>;
83 };
84 120
85 uart@3e002000 { 121 aon hub_timer peri 0 BCM21664_AON_CCU_HUB_TIMER
86 compatible = "brcm,bcm11351-dw-apb-uart", "snps,dw-apb-uart"; 122
87 status = "disabled"; 123 master sdio1 peri 0 BCM21664_MASTER_CCU_SDIO1
88 reg = <0x3e002000 0x1000>; 124 master sdio2 peri 1 BCM21664_MASTER_CCU_SDIO2
89 clocks = <&slave_ccu BCM281XX_SLAVE_CCU_UARTB3>; 125 master sdio3 peri 2 BCM21664_MASTER_CCU_SDIO3
90 interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; 126 master sdio4 peri 3 BCM21664_MASTER_CCU_SDIO4
91 reg-shift = <2>; 127 master sdio1_sleep peri 4 BCM21664_MASTER_CCU_SDIO1_SLEEP
92 reg-io-width = <4>; 128 master sdio2_sleep peri 5 BCM21664_MASTER_CCU_SDIO2_SLEEP
93 }; 129 master sdio3_sleep peri 6 BCM21664_MASTER_CCU_SDIO3_SLEEP
130 master sdio4_sleep peri 7 BCM21664_MASTER_CCU_SDIO4_SLEEP
131
132 slave uartb peri 0 BCM21664_SLAVE_CCU_UARTB
133 slave uartb2 peri 1 BCM21664_SLAVE_CCU_UARTB2
134 slave uartb3 peri 2 BCM21664_SLAVE_CCU_UARTB3
135 slave uartb4 peri 3 BCM21664_SLAVE_CCU_UARTB4
136 slave bsc1 peri 4 BCM21664_SLAVE_CCU_BSC1
137 slave bsc2 peri 5 BCM21664_SLAVE_CCU_BSC2
138 slave bsc3 peri 6 BCM21664_SLAVE_CCU_BSC3
139 slave bsc4 peri 7 BCM21664_SLAVE_CCU_BSC4
diff --git a/Documentation/devicetree/bindings/clock/clock-bindings.txt b/Documentation/devicetree/bindings/clock/clock-bindings.txt
index 700e7aac3717..f15787817d6b 100644
--- a/Documentation/devicetree/bindings/clock/clock-bindings.txt
+++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt
@@ -44,10 +44,9 @@ For example:
44 clocks by index. The names should reflect the clock output signal 44 clocks by index. The names should reflect the clock output signal
45 names for the device. 45 names for the device.
46 46
47clock-indices: If the identifyng number for the clocks in the node 47clock-indices: If the identifying number for the clocks in the node
48 is not linear from zero, then the this mapping allows 48 is not linear from zero, then this allows the mapping of
49 the mapping of identifiers into the clock-output-names 49 identifiers into the clock-output-names array.
50 array.
51 50
52For example, if we have two clocks <&oscillator 1> and <&oscillator 3>: 51For example, if we have two clocks <&oscillator 1> and <&oscillator 3>:
53 52
@@ -58,7 +57,7 @@ For example, if we have two clocks <&oscillator 1> and <&oscillator 3>:
58 clock-output-names = "clka", "clkb"; 57 clock-output-names = "clka", "clkb";
59 } 58 }
60 59
61 This ensures we do not have any empty nodes in clock-output-names 60 This ensures we do not have any empty strings in clock-output-names
62 61
63 62
64==Clock consumers== 63==Clock consumers==
diff --git a/Documentation/devicetree/bindings/clock/exynos3250-clock.txt b/Documentation/devicetree/bindings/clock/exynos3250-clock.txt
new file mode 100644
index 000000000000..aadc9c59e2d1
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/exynos3250-clock.txt
@@ -0,0 +1,41 @@
1* Samsung Exynos3250 Clock Controller
2
3The Exynos3250 clock controller generates and supplies clock to various
4controllers within the Exynos3250 SoC.
5
6Required Properties:
7
8- compatible: should be one of the following.
9 - "samsung,exynos3250-cmu" - controller compatible with Exynos3250 SoC.
10
11- reg: physical base address of the controller and length of memory mapped
12 region.
13
14- #clock-cells: should be 1.
15
16Each clock is assigned an identifier and client nodes can use this identifier
17to specify the clock which they consume.
18
19All available clocks are defined as preprocessor macros in
20dt-bindings/clock/exynos3250.h header and can be used in device
21tree sources.
22
23Example 1: An example of a clock controller node is listed below.
24
25 cmu: clock-controller@10030000 {
26 compatible = "samsung,exynos3250-cmu";
27 reg = <0x10030000 0x20000>;
28 #clock-cells = <1>;
29 };
30
31Example 2: UART controller node that consumes the clock generated by the clock
32 controller. Refer to the standard clock bindings for information
33 about 'clocks' and 'clock-names' property.
34
35 serial@13800000 {
36 compatible = "samsung,exynos4210-uart";
37 reg = <0x13800000 0x100>;
38 interrupts = <0 109 0>;
39 clocks = <&cmu CLK_UART0>, <&cmu CLK_SCLK_UART0>;
40 clock-names = "uart", "clk_uart_baud0";
41 };
diff --git a/Documentation/devicetree/bindings/clock/exynos5260-clock.txt b/Documentation/devicetree/bindings/clock/exynos5260-clock.txt
new file mode 100644
index 000000000000..5496b2fac483
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/exynos5260-clock.txt
@@ -0,0 +1,190 @@
1* Samsung Exynos5260 Clock Controller
2
3Exynos5260 has 13 clock controllers which are instantiated
4independently from the device-tree. These clock controllers
5generate and supply clocks to various hardware blocks within
6the SoC.
7
8Each clock is assigned an identifier and client nodes can use
9this identifier to specify the clock which they consume. All
10available clocks are defined as preprocessor macros in
11dt-bindings/clock/exynos5260-clk.h header and can be used in
12device tree sources.
13
14External clocks:
15
16There are several clocks that are generated outside the SoC. It
17is expected that they are defined using standard clock bindings
18with following clock-output-names:
19
20 - "fin_pll" - PLL input clock from XXTI
21 - "xrtcxti" - input clock from XRTCXTI
22 - "ioclk_pcm_extclk" - pcm external operation clock
23 - "ioclk_spdif_extclk" - spdif external operation clock
24 - "ioclk_i2s_cdclk" - i2s0 codec clock
25
26Phy clocks:
27
28There are several clocks which are generated by specific PHYs.
29These clocks are fed into the clock controller and then routed to
30the hardware blocks. These clocks are defined as fixed clocks in the
31driver with following names:
32
33 - "phyclk_dptx_phy_ch3_txd_clk" - dp phy clock for channel 3
34 - "phyclk_dptx_phy_ch2_txd_clk" - dp phy clock for channel 2
35 - "phyclk_dptx_phy_ch1_txd_clk" - dp phy clock for channel 1
36 - "phyclk_dptx_phy_ch0_txd_clk" - dp phy clock for channel 0
37 - "phyclk_hdmi_phy_tmds_clko" - hdmi phy tmds clock
38 - "phyclk_hdmi_phy_pixel_clko" - hdmi phy pixel clock
39 - "phyclk_hdmi_link_o_tmds_clkhi" - hdmi phy for hdmi link
40 - "phyclk_dptx_phy_o_ref_clk_24m" - dp phy reference clock
41 - "phyclk_dptx_phy_clk_div2"
42 - "phyclk_mipi_dphy_4l_m_rxclkesc0"
43 - "phyclk_usbhost20_phy_phyclock" - usb 2.0 phy clock
44 - "phyclk_usbhost20_phy_freeclk"
45 - "phyclk_usbhost20_phy_clk48mohci"
46 - "phyclk_usbdrd30_udrd30_pipe_pclk"
47 - "phyclk_usbdrd30_udrd30_phyclock" - usb 3.0 phy clock
48
49Required Properties for Clock Controller:
50
51 - compatible: should be one of the following.
52 1) "samsung,exynos5260-clock-top"
53 2) "samsung,exynos5260-clock-peri"
54 3) "samsung,exynos5260-clock-egl"
55 4) "samsung,exynos5260-clock-kfc"
56 5) "samsung,exynos5260-clock-g2d"
57 6) "samsung,exynos5260-clock-mif"
58 7) "samsung,exynos5260-clock-mfc"
59 8) "samsung,exynos5260-clock-g3d"
60 9) "samsung,exynos5260-clock-fsys"
61 10) "samsung,exynos5260-clock-aud"
62 11) "samsung,exynos5260-clock-isp"
63 12) "samsung,exynos5260-clock-gscl"
64 13) "samsung,exynos5260-clock-disp"
65
66 - reg: physical base address of the controller and the length of
67 memory mapped region.
68
69 - #clock-cells: should be 1.
70
71 - clocks: list of clock identifiers which are fed as the input to
72 the given clock controller. Please refer the next section to find
73 the input clocks for a given controller.
74
75 - clock-names: list of names of clocks which are fed as the input
76 to the given clock controller.
77
78Input clocks for top clock controller:
79 - fin_pll
80 - dout_mem_pll
81 - dout_bus_pll
82 - dout_media_pll
83
84Input clocks for peri clock controller:
85 - fin_pll
86 - ioclk_pcm_extclk
87 - ioclk_i2s_cdclk
88 - ioclk_spdif_extclk
89 - phyclk_hdmi_phy_ref_cko
90 - dout_aclk_peri_66
91 - dout_sclk_peri_uart0
92 - dout_sclk_peri_uart1
93 - dout_sclk_peri_uart2
94 - dout_sclk_peri_spi0_b
95 - dout_sclk_peri_spi1_b
96 - dout_sclk_peri_spi2_b
97 - dout_aclk_peri_aud
98 - dout_sclk_peri_spi0_b
99
100Input clocks for egl clock controller:
101 - fin_pll
102 - dout_bus_pll
103
104Input clocks for kfc clock controller:
105 - fin_pll
106 - dout_media_pll
107
108Input clocks for g2d clock controller:
109 - fin_pll
110 - dout_aclk_g2d_333
111
112Input clocks for mif clock controller:
113 - fin_pll
114
115Input clocks for mfc clock controller:
116 - fin_pll
117 - dout_aclk_mfc_333
118
119Input clocks for g3d clock controller:
120 - fin_pll
121
122Input clocks for fsys clock controller:
123 - fin_pll
124 - phyclk_usbhost20_phy_phyclock
125 - phyclk_usbhost20_phy_freeclk
126 - phyclk_usbhost20_phy_clk48mohci
127 - phyclk_usbdrd30_udrd30_pipe_pclk
128 - phyclk_usbdrd30_udrd30_phyclock
129 - dout_aclk_fsys_200
130
131Input clocks for aud clock controller:
132 - fin_pll
133 - fout_aud_pll
134 - ioclk_i2s_cdclk
135 - ioclk_pcm_extclk
136
137Input clocks for isp clock controller:
138 - fin_pll
139 - dout_aclk_isp1_266
140 - dout_aclk_isp1_400
141 - mout_aclk_isp1_266
142
143Input clocks for gscl clock controller:
144 - fin_pll
145 - dout_aclk_gscl_400
146 - dout_aclk_gscl_333
147
148Input clocks for disp clock controller:
149 - fin_pll
150 - phyclk_dptx_phy_ch3_txd_clk
151 - phyclk_dptx_phy_ch2_txd_clk
152 - phyclk_dptx_phy_ch1_txd_clk
153 - phyclk_dptx_phy_ch0_txd_clk
154 - phyclk_hdmi_phy_tmds_clko
155 - phyclk_hdmi_phy_ref_clko
156 - phyclk_hdmi_phy_pixel_clko
157 - phyclk_hdmi_link_o_tmds_clkhi
158 - phyclk_mipi_dphy_4l_m_txbyte_clkhs
159 - phyclk_dptx_phy_o_ref_clk_24m
160 - phyclk_dptx_phy_clk_div2
161 - phyclk_mipi_dphy_4l_m_rxclkesc0
162 - phyclk_hdmi_phy_ref_cko
163 - ioclk_spdif_extclk
164 - dout_aclk_peri_aud
165 - dout_aclk_disp_222
166 - dout_sclk_disp_pixel
167 - dout_aclk_disp_333
168
169Example 1: An example of a clock controller node is listed below.
170
171 clock_mfc: clock-controller@11090000 {
172 compatible = "samsung,exynos5260-clock-mfc";
173 clock = <&fin_pll>, <&clock_top TOP_DOUT_ACLK_MFC_333>;
174 clock-names = "fin_pll", "dout_aclk_mfc_333";
175 reg = <0x11090000 0x10000>;
176 #clock-cells = <1>;
177 };
178
179Example 2: UART controller node that consumes the clock generated by the
180 peri clock controller. Refer to the standard clock bindings for
181 information about 'clocks' and 'clock-names' property.
182
183 serial@12C00000 {
184 compatible = "samsung,exynos4210-uart";
185 reg = <0x12C00000 0x100>;
186 interrupts = <0 146 0>;
187 clocks = <&clock_peri PERI_PCLK_UART0>, <&clock_peri PERI_SCLK_UART0>;
188 clock-names = "uart", "clk_uart_baud0";
189 };
190
diff --git a/Documentation/devicetree/bindings/clock/exynos5410-clock.txt b/Documentation/devicetree/bindings/clock/exynos5410-clock.txt
new file mode 100644
index 000000000000..aeab635b07b5
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/exynos5410-clock.txt
@@ -0,0 +1,45 @@
1* Samsung Exynos5410 Clock Controller
2
3The Exynos5410 clock controller generates and supplies clock to various
4controllers within the Exynos5410 SoC.
5
6Required Properties:
7
8- compatible: should be "samsung,exynos5410-clock"
9
10- reg: physical base address of the controller and length of memory mapped
11 region.
12
13- #clock-cells: should be 1.
14
15All available clocks are defined as preprocessor macros in
16dt-bindings/clock/exynos5410.h header and can be used in device
17tree sources.
18
19External clock:
20
21There is clock that is generated outside the SoC. It
22is expected that it is defined using standard clock bindings
23with following clock-output-name:
24
25 - "fin_pll" - PLL input clock from XXTI
26
27Example 1: An example of a clock controller node is listed below.
28
29 clock: clock-controller@0x10010000 {
30 compatible = "samsung,exynos5410-clock";
31 reg = <0x10010000 0x30000>;
32 #clock-cells = <1>;
33 };
34
35Example 2: UART controller node that consumes the clock generated by the clock
36 controller. Refer to the standard clock bindings for information
37 about 'clocks' and 'clock-names' property.
38
39 serial@12C20000 {
40 compatible = "samsung,exynos4210-uart";
41 reg = <0x12C00000 0x100>;
42 interrupts = <0 51 0>;
43 clocks = <&clock CLK_UART0>, <&clock CLK_SCLK_UART0>;
44 clock-names = "uart", "clk_uart_baud0";
45 };
diff --git a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt
index ca88c97a8562..d54f42cf0440 100644
--- a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt
+++ b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt
@@ -1,12 +1,13 @@
1* Samsung Exynos5420 Clock Controller 1* Samsung Exynos5420 Clock Controller
2 2
3The Exynos5420 clock controller generates and supplies clock to various 3The Exynos5420 clock controller generates and supplies clock to various
4controllers within the Exynos5420 SoC. 4controllers within the Exynos5420 SoC and for the Exynos5800 SoC.
5 5
6Required Properties: 6Required Properties:
7 7
8- compatible: should be one of the following. 8- compatible: should be one of the following.
9 - "samsung,exynos5420-clock" - controller compatible with Exynos5420 SoC. 9 - "samsung,exynos5420-clock" - controller compatible with Exynos5420 SoC.
10 - "samsung,exynos5800-clock" - controller compatible with Exynos5800 SoC.
10 11
11- reg: physical base address of the controller and length of memory mapped 12- reg: physical base address of the controller and length of memory mapped
12 region. 13 region.
diff --git a/Documentation/devicetree/bindings/clock/fixed-clock.txt b/Documentation/devicetree/bindings/clock/fixed-clock.txt
index 48ea0ad8ad46..0641a663ad69 100644
--- a/Documentation/devicetree/bindings/clock/fixed-clock.txt
+++ b/Documentation/devicetree/bindings/clock/fixed-clock.txt
@@ -12,7 +12,6 @@ Required properties:
12Optional properties: 12Optional properties:
13- clock-accuracy : accuracy of clock in ppb (parts per billion). 13- clock-accuracy : accuracy of clock in ppb (parts per billion).
14 Should be a single cell. 14 Should be a single cell.
15- gpios : From common gpio binding; gpio connection to clock enable pin.
16- clock-output-names : From common clock binding. 15- clock-output-names : From common clock binding.
17 16
18Example: 17Example:
diff --git a/Documentation/devicetree/bindings/clock/hix5hd2-clock.txt b/Documentation/devicetree/bindings/clock/hix5hd2-clock.txt
new file mode 100644
index 000000000000..7894a64887cb
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/hix5hd2-clock.txt
@@ -0,0 +1,31 @@
1* Hisilicon Hix5hd2 Clock Controller
2
3The hix5hd2 clock controller generates and supplies clock to various
4controllers within the hix5hd2 SoC.
5
6Required Properties:
7
8- compatible: should be "hisilicon,hix5hd2-clock"
9- reg: Address and length of the register set
10- #clock-cells: Should be <1>
11
12Each clock is assigned an identifier and client nodes use this identifier
13to specify the clock which they consume.
14
15All these identifier could be found in <dt-bindings/clock/hix5hd2-clock.h>.
16
17Examples:
18 clock: clock@f8a22000 {
19 compatible = "hisilicon,hix5hd2-clock";
20 reg = <0xf8a22000 0x1000>;
21 #clock-cells = <1>;
22 };
23
24 uart0: uart@f8b00000 {
25 compatible = "arm,pl011", "arm,primecell";
26 reg = <0xf8b00000 0x1000>;
27 interrupts = <0 49 4>;
28 clocks = <&clock HIX5HD2_FIXED_83M>;
29 clock-names = "apb_pclk";
30 status = "disabled";
31 };
diff --git a/Documentation/devicetree/bindings/clock/imx25-clock.txt b/Documentation/devicetree/bindings/clock/imx25-clock.txt
index db4f2f05c4d0..ba6b312ff8a5 100644
--- a/Documentation/devicetree/bindings/clock/imx25-clock.txt
+++ b/Documentation/devicetree/bindings/clock/imx25-clock.txt
@@ -139,6 +139,9 @@ clocks and IDs.
139 uart5_ipg 124 139 uart5_ipg 124
140 reserved 125 140 reserved 125
141 wdt_ipg 126 141 wdt_ipg 126
142 cko_div 127
143 cko_sel 128
144 cko 129
142 145
143Examples: 146Examples:
144 147
diff --git a/Documentation/devicetree/bindings/clock/imx27-clock.txt b/Documentation/devicetree/bindings/clock/imx27-clock.txt
index 7a2070393732..6bc9fd2c6631 100644
--- a/Documentation/devicetree/bindings/clock/imx27-clock.txt
+++ b/Documentation/devicetree/bindings/clock/imx27-clock.txt
@@ -98,7 +98,12 @@ clocks and IDs.
98 fpm 83 98 fpm 83
99 mpll_osc_sel 84 99 mpll_osc_sel 84
100 mpll_sel 85 100 mpll_sel 85
101 spll_gate 86 101 spll_gate 86
102 mshc_div 87
103 rtic_ipg_gate 88
104 mshc_ipg_gate 89
105 rtic_ahb_gate 90
106 mshc_baud_gate 91
102 107
103Examples: 108Examples:
104 109
diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.txt b/Documentation/devicetree/bindings/clock/imx6q-clock.txt
index 6aab72bf67ea..90ec91fe5ce0 100644
--- a/Documentation/devicetree/bindings/clock/imx6q-clock.txt
+++ b/Documentation/devicetree/bindings/clock/imx6q-clock.txt
@@ -220,6 +220,7 @@ clocks and IDs.
220 lvds2_sel 205 220 lvds2_sel 205
221 lvds1_gate 206 221 lvds1_gate 206
222 lvds2_gate 207 222 lvds2_gate 207
223 esai_ahb 208
223 224
224Examples: 225Examples:
225 226
diff --git a/Documentation/devicetree/bindings/clock/imx6sx-clock.txt b/Documentation/devicetree/bindings/clock/imx6sx-clock.txt
new file mode 100644
index 000000000000..22362b9b7ba3
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/imx6sx-clock.txt
@@ -0,0 +1,13 @@
1* Clock bindings for Freescale i.MX6 SoloX
2
3Required properties:
4- compatible: Should be "fsl,imx6sx-ccm"
5- reg: Address and length of the register set
6- #clock-cells: Should be <1>
7- clocks: list of clock specifiers, must contain an entry for each required
8 entry in clock-names
9- clock-names: should include entries "ckil", "osc", "ipp_di0" and "ipp_di1"
10
11The clock consumer should specify the desired clock by having the clock
12ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx6sx-clock.h
13for the full list of i.MX6 SoloX clock IDs.
diff --git a/Documentation/devicetree/bindings/clock/lsi,axm5516-clks.txt b/Documentation/devicetree/bindings/clock/lsi,axm5516-clks.txt
new file mode 100644
index 000000000000..3ce97cfe999b
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/lsi,axm5516-clks.txt
@@ -0,0 +1,29 @@
1AXM5516 clock driver bindings
2-----------------------------
3
4Required properties :
5- compatible : shall contain "lsi,axm5516-clks"
6- reg : shall contain base register location and length
7- #clock-cells : shall contain 1
8
9The consumer specifies the desired clock by having the clock ID in its "clocks"
10phandle cell. See <dt-bindings/clock/lsi,axxia-clock.h> for the list of
11supported clock IDs.
12
13Example:
14
15 clks: clock-controller@2010020000 {
16 compatible = "lsi,axm5516-clks";
17 #clock-cells = <1>;
18 reg = <0x20 0x10020000 0 0x20000>;
19 };
20
21 serial0: uart@2010080000 {
22 compatible = "arm,pl011", "arm,primecell";
23 reg = <0x20 0x10080000 0 0x1000>;
24 interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
25 clocks = <&clks AXXIA_CLK_PER>;
26 clock-names = "apb_pclk";
27 };
28 };
29
diff --git a/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt
index 307a503c5db8..dc5ea5b22da9 100644
--- a/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt
+++ b/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt
@@ -29,6 +29,11 @@ The following is a list of provided IDs and clock names on Kirkwood and Dove:
29 2 = l2clk (L2 Cache clock derived from CPU0 clock) 29 2 = l2clk (L2 Cache clock derived from CPU0 clock)
30 3 = ddrclk (DDR controller clock derived from CPU0 clock) 30 3 = ddrclk (DDR controller clock derived from CPU0 clock)
31 31
32The following is a list of provided IDs and clock names on Orion5x:
33 0 = tclk (Internal Bus clock)
34 1 = cpuclk (CPU0 clock)
35 2 = ddrclk (DDR controller clock derived from CPU0 clock)
36
32Required properties: 37Required properties:
33- compatible : shall be one of the following: 38- compatible : shall be one of the following:
34 "marvell,armada-370-core-clock" - For Armada 370 SoC core clocks 39 "marvell,armada-370-core-clock" - For Armada 370 SoC core clocks
@@ -38,6 +43,9 @@ Required properties:
38 "marvell,dove-core-clock" - for Dove SoC core clocks 43 "marvell,dove-core-clock" - for Dove SoC core clocks
39 "marvell,kirkwood-core-clock" - for Kirkwood SoC (except mv88f6180) 44 "marvell,kirkwood-core-clock" - for Kirkwood SoC (except mv88f6180)
40 "marvell,mv88f6180-core-clock" - for Kirkwood MV88f6180 SoC 45 "marvell,mv88f6180-core-clock" - for Kirkwood MV88f6180 SoC
46 "marvell,mv88f5182-core-clock" - for Orion MV88F5182 SoC
47 "marvell,mv88f5281-core-clock" - for Orion MV88F5281 SoC
48 "marvell,mv88f6183-core-clock" - for Orion MV88F6183 SoC
41- reg : shall be the register address of the Sample-At-Reset (SAR) register 49- reg : shall be the register address of the Sample-At-Reset (SAR) register
42- #clock-cells : from common clock binding; shall be set to 1 50- #clock-cells : from common clock binding; shall be set to 1
43 51
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc.txt b/Documentation/devicetree/bindings/clock/qcom,gcc.txt
index 767401f42871..9cfcb4f2bc97 100644
--- a/Documentation/devicetree/bindings/clock/qcom,gcc.txt
+++ b/Documentation/devicetree/bindings/clock/qcom,gcc.txt
@@ -4,9 +4,12 @@ Qualcomm Global Clock & Reset Controller Binding
4Required properties : 4Required properties :
5- compatible : shall contain only one of the following: 5- compatible : shall contain only one of the following:
6 6
7 "qcom,gcc-apq8064"
7 "qcom,gcc-msm8660" 8 "qcom,gcc-msm8660"
8 "qcom,gcc-msm8960" 9 "qcom,gcc-msm8960"
9 "qcom,gcc-msm8974" 10 "qcom,gcc-msm8974"
11 "qcom,gcc-msm8974pro"
12 "qcom,gcc-msm8974pro-ac"
10 13
11- reg : shall contain base register location and length 14- reg : shall contain base register location and length
12- #clock-cells : shall contain 1 15- #clock-cells : shall contain 1
diff --git a/Documentation/devicetree/bindings/clock/corenet-clock.txt b/Documentation/devicetree/bindings/clock/qoriq-clock.txt
index 24711af48e30..5666812fc42b 100644
--- a/Documentation/devicetree/bindings/clock/corenet-clock.txt
+++ b/Documentation/devicetree/bindings/clock/qoriq-clock.txt
@@ -7,6 +7,14 @@ which can then be passed to a variety of internal logic, including
7cores and peripheral IP blocks. 7cores and peripheral IP blocks.
8Please refer to the Reference Manual for details. 8Please refer to the Reference Manual for details.
9 9
10All references to "1.0" and "2.0" refer to the QorIQ chassis version to
11which the chip complies.
12
13Chassis Version Example Chips
14--------------- -------------
151.0 p4080, p5020, p5040
162.0 t4240, b4860, t1040
17
101. Clock Block Binding 181. Clock Block Binding
11 19
12Required properties: 20Required properties:
@@ -85,7 +93,7 @@ Example for clock block and clock provider:
85 #clock-cells = <0>; 93 #clock-cells = <0>;
86 compatible = "fsl,qoriq-sysclk-1.0"; 94 compatible = "fsl,qoriq-sysclk-1.0";
87 clock-output-names = "sysclk"; 95 clock-output-names = "sysclk";
88 } 96 };
89 97
90 pll0: pll0@800 { 98 pll0: pll0@800 {
91 #clock-cells = <1>; 99 #clock-cells = <1>;
diff --git a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
index 5992dceec7af..8a92b5fb3540 100644
--- a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
+++ b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
@@ -10,6 +10,8 @@ index in the group, from 0 to 31.
10Required Properties: 10Required Properties:
11 11
12 - compatible: Must be one of the following 12 - compatible: Must be one of the following
13 - "renesas,r7s72100-mstp-clocks" for R7S72100 (RZ) MSTP gate clocks
14 - "renesas,r8a7779-mstp-clocks" for R8A7779 (R-Car H1) MSTP gate clocks
13 - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks 15 - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks
14 - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2) MSTP gate clocks 16 - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2) MSTP gate clocks
15 - "renesas,cpg-mstp-clock" for generic MSTP gate clocks 17 - "renesas,cpg-mstp-clock" for generic MSTP gate clocks
@@ -43,7 +45,7 @@ Example
43 clock-output-names = 45 clock-output-names =
44 "tpu0", "mmcif1", "sdhi3", "sdhi2", 46 "tpu0", "mmcif1", "sdhi3", "sdhi2",
45 "sdhi1", "sdhi0", "mmcif0"; 47 "sdhi1", "sdhi0", "mmcif0";
46 renesas,clock-indices = < 48 clock-indices = <
47 R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3 49 R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3
48 R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0 50 R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0
49 R8A7790_CLK_MMCIF0 51 R8A7790_CLK_MMCIF0
diff --git a/Documentation/devicetree/bindings/clock/renesas,r8a7740-cpg-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,r8a7740-cpg-clocks.txt
new file mode 100644
index 000000000000..2c03302f86ed
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/renesas,r8a7740-cpg-clocks.txt
@@ -0,0 +1,41 @@
1These bindings should be considered EXPERIMENTAL for now.
2
3* Renesas R8A7740 Clock Pulse Generator (CPG)
4
5The CPG generates core clocks for the R8A7740 SoC. It includes three PLLs
6and several fixed ratio and variable ratio dividers.
7
8Required Properties:
9
10 - compatible: Must be "renesas,r8a7740-cpg-clocks"
11
12 - reg: Base address and length of the memory resource used by the CPG
13
14 - clocks: Reference to the three parent clocks
15 - #clock-cells: Must be 1
16 - clock-output-names: The names of the clocks. Supported clocks are
17 "system", "pllc0", "pllc1", "pllc2", "r", "usb24s", "i", "zg", "b",
18 "m1", "hp", "hpp", "usbp", "s", "zb", "m3", and "cp".
19
20 - renesas,mode: board-specific settings of the MD_CK* bits
21
22
23Example
24-------
25
26cpg_clocks: cpg_clocks@e6150000 {
27 compatible = "renesas,r8a7740-cpg-clocks";
28 reg = <0xe6150000 0x10000>;
29 clocks = <&extal1_clk>, <&extal2_clk>, <&extalr_clk>;
30 #clock-cells = <1>;
31 clock-output-names = "system", "pllc0", "pllc1",
32 "pllc2", "r",
33 "usb24s",
34 "i", "zg", "b", "m1", "hp",
35 "hpp", "usbp", "s", "zb", "m3",
36 "cp";
37};
38
39&cpg_clocks {
40 renesas,mode = <0x05>;
41};
diff --git a/Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt
new file mode 100644
index 000000000000..ed3c8cb12f4e
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt
@@ -0,0 +1,27 @@
1* Renesas R8A7779 Clock Pulse Generator (CPG)
2
3The CPG generates core clocks for the R8A7779. It includes one PLL and
4several fixed ratio dividers
5
6Required Properties:
7
8 - compatible: Must be "renesas,r8a7779-cpg-clocks"
9 - reg: Base address and length of the memory resource used by the CPG
10
11 - clocks: Reference to the parent clock
12 - #clock-cells: Must be 1
13 - clock-output-names: The names of the clocks. Supported clocks are "plla",
14 "z", "zs", "s", "s1", "p", "b", "out".
15
16
17Example
18-------
19
20 cpg_clocks: cpg_clocks@ffc80000 {
21 compatible = "renesas,r8a7779-cpg-clocks";
22 reg = <0 0xffc80000 0 0x30>;
23 clocks = <&extal_clk>;
24 #clock-cells = <1>;
25 clock-output-names = "plla", "z", "zs", "s", "s1", "p",
26 "b", "out";
27 };
diff --git a/Documentation/devicetree/bindings/clock/samsung,s3c2410-clock.txt b/Documentation/devicetree/bindings/clock/samsung,s3c2410-clock.txt
new file mode 100644
index 000000000000..822505e715ae
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/samsung,s3c2410-clock.txt
@@ -0,0 +1,50 @@
1* Samsung S3C2410 Clock Controller
2
3The S3C2410 clock controller generates and supplies clock to various controllers
4within the SoC. The clock binding described here is applicable to the s3c2410,
5s3c2440 and s3c2442 SoCs in the s3c24x family.
6
7Required Properties:
8
9- compatible: should be one of the following.
10 - "samsung,s3c2410-clock" - controller compatible with S3C2410 SoC.
11 - "samsung,s3c2440-clock" - controller compatible with S3C2440 SoC.
12 - "samsung,s3c2442-clock" - controller compatible with S3C2442 SoC.
13- reg: physical base address of the controller and length of memory mapped
14 region.
15- #clock-cells: should be 1.
16
17Each clock is assigned an identifier and client nodes can use this identifier
18to specify the clock which they consume. Some of the clocks are available only
19on a particular SoC.
20
21All available clocks are defined as preprocessor macros in
22dt-bindings/clock/s3c2410.h header and can be used in device
23tree sources.
24
25External clocks:
26
27The xti clock used as input for the plls is generated outside the SoC. It is
28expected that is are defined using standard clock bindings with a
29clock-output-names value of "xti".
30
31Example: Clock controller node:
32
33 clocks: clock-controller@4c000000 {
34 compatible = "samsung,s3c2410-clock";
35 reg = <0x4c000000 0x20>;
36 #clock-cells = <1>;
37 };
38
39Example: UART controller node that consumes the clock generated by the clock
40 controller (refer to the standard clock bindings for information about
41 "clocks" and "clock-names" properties):
42
43 serial@50004000 {
44 compatible = "samsung,s3c2440-uart";
45 reg = <0x50004000 0x4000>;
46 interrupts = <1 23 3 4>, <1 23 4 4>;
47 clock-names = "uart", "clk_uart_baud2";
48 clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>;
49 status = "disabled";
50 };
diff --git a/Documentation/devicetree/bindings/clock/samsung,s3c2412-clock.txt b/Documentation/devicetree/bindings/clock/samsung,s3c2412-clock.txt
new file mode 100644
index 000000000000..2b430960ba47
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/samsung,s3c2412-clock.txt
@@ -0,0 +1,50 @@
1* Samsung S3C2412 Clock Controller
2
3The S3C2412 clock controller generates and supplies clock to various controllers
4within the SoC. The clock binding described here is applicable to the s3c2412
5and s3c2413 SoCs in the s3c24x family.
6
7Required Properties:
8
9- compatible: should be "samsung,s3c2412-clock"
10- reg: physical base address of the controller and length of memory mapped
11 region.
12- #clock-cells: should be 1.
13
14Each clock is assigned an identifier and client nodes can use this identifier
15to specify the clock which they consume. Some of the clocks are available only
16on a particular SoC.
17
18All available clocks are defined as preprocessor macros in
19dt-bindings/clock/s3c2412.h header and can be used in device
20tree sources.
21
22External clocks:
23
24There are several clocks that are generated outside the SoC. It is expected
25that they are defined using standard clock bindings with following
26clock-output-names:
27 - "xti" - crystal input - required,
28 - "ext" - external clock source - optional,
29
30Example: Clock controller node:
31
32 clocks: clock-controller@4c000000 {
33 compatible = "samsung,s3c2412-clock";
34 reg = <0x4c000000 0x20>;
35 #clock-cells = <1>;
36 };
37
38Example: UART controller node that consumes the clock generated by the clock
39 controller (refer to the standard clock bindings for information about
40 "clocks" and "clock-names" properties):
41
42 serial@50004000 {
43 compatible = "samsung,s3c2412-uart";
44 reg = <0x50004000 0x4000>;
45 interrupts = <1 23 3 4>, <1 23 4 4>;
46 clock-names = "uart", "clk_uart_baud2", "clk_uart_baud3";
47 clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>,
48 <&clocks SCLK_UART>;
49 status = "disabled";
50 };
diff --git a/Documentation/devicetree/bindings/clock/samsung,s3c2443-clock.txt b/Documentation/devicetree/bindings/clock/samsung,s3c2443-clock.txt
new file mode 100644
index 000000000000..e67bb05478af
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/samsung,s3c2443-clock.txt
@@ -0,0 +1,56 @@
1* Samsung S3C2443 Clock Controller
2
3The S3C2443 clock controller generates and supplies clock to various controllers
4within the SoC. The clock binding described here is applicable to all SoCs in
5the s3c24x family starting with the s3c2443.
6
7Required Properties:
8
9- compatible: should be one of the following.
10 - "samsung,s3c2416-clock" - controller compatible with S3C2416 SoC.
11 - "samsung,s3c2443-clock" - controller compatible with S3C2443 SoC.
12 - "samsung,s3c2450-clock" - controller compatible with S3C2450 SoC.
13- reg: physical base address of the controller and length of memory mapped
14 region.
15- #clock-cells: should be 1.
16
17Each clock is assigned an identifier and client nodes can use this identifier
18to specify the clock which they consume. Some of the clocks are available only
19on a particular SoC.
20
21All available clocks are defined as preprocessor macros in
22dt-bindings/clock/s3c2443.h header and can be used in device
23tree sources.
24
25External clocks:
26
27There are several clocks that are generated outside the SoC. It is expected
28that they are defined using standard clock bindings with following
29clock-output-names:
30 - "xti" - crystal input - required,
31 - "ext" - external clock source - optional,
32 - "ext_i2s" - external I2S clock - optional,
33 - "ext_uart" - external uart clock - optional,
34
35Example: Clock controller node:
36
37 clocks: clock-controller@4c000000 {
38 compatible = "samsung,s3c2416-clock";
39 reg = <0x4c000000 0x40>;
40 #clock-cells = <1>;
41 };
42
43Example: UART controller node that consumes the clock generated by the clock
44 controller (refer to the standard clock bindings for information about
45 "clocks" and "clock-names" properties):
46
47 serial@50004000 {
48 compatible = "samsung,s3c2440-uart";
49 reg = <0x50004000 0x4000>;
50 interrupts = <1 23 3 4>, <1 23 4 4>;
51 clock-names = "uart", "clk_uart_baud2",
52 "clk_uart_baud3";
53 clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>,
54 <&clocks SCLK_UART>;
55 status = "disabled";
56 };
diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt
index a5160d8cbb5f..b9ec668bfe62 100644
--- a/Documentation/devicetree/bindings/clock/sunxi.txt
+++ b/Documentation/devicetree/bindings/clock/sunxi.txt
@@ -20,12 +20,15 @@ Required properties:
20 "allwinner,sun5i-a13-ahb-gates-clk" - for the AHB gates on A13 20 "allwinner,sun5i-a13-ahb-gates-clk" - for the AHB gates on A13
21 "allwinner,sun5i-a10s-ahb-gates-clk" - for the AHB gates on A10s 21 "allwinner,sun5i-a10s-ahb-gates-clk" - for the AHB gates on A10s
22 "allwinner,sun7i-a20-ahb-gates-clk" - for the AHB gates on A20 22 "allwinner,sun7i-a20-ahb-gates-clk" - for the AHB gates on A20
23 "allwinner,sun6i-a31-ar100-clk" - for the AR100 on A31
23 "allwinner,sun6i-a31-ahb1-mux-clk" - for the AHB1 multiplexer on A31 24 "allwinner,sun6i-a31-ahb1-mux-clk" - for the AHB1 multiplexer on A31
24 "allwinner,sun6i-a31-ahb1-gates-clk" - for the AHB1 gates on A31 25 "allwinner,sun6i-a31-ahb1-gates-clk" - for the AHB1 gates on A31
25 "allwinner,sun4i-a10-apb0-clk" - for the APB0 clock 26 "allwinner,sun4i-a10-apb0-clk" - for the APB0 clock
27 "allwinner,sun6i-a31-apb0-clk" - for the APB0 clock on A31
26 "allwinner,sun4i-a10-apb0-gates-clk" - for the APB0 gates on A10 28 "allwinner,sun4i-a10-apb0-gates-clk" - for the APB0 gates on A10
27 "allwinner,sun5i-a13-apb0-gates-clk" - for the APB0 gates on A13 29 "allwinner,sun5i-a13-apb0-gates-clk" - for the APB0 gates on A13
28 "allwinner,sun5i-a10s-apb0-gates-clk" - for the APB0 gates on A10s 30 "allwinner,sun5i-a10s-apb0-gates-clk" - for the APB0 gates on A10s
31 "allwinner,sun6i-a31-apb0-gates-clk" - for the APB0 gates on A31
29 "allwinner,sun7i-a20-apb0-gates-clk" - for the APB0 gates on A20 32 "allwinner,sun7i-a20-apb0-gates-clk" - for the APB0 gates on A20
30 "allwinner,sun4i-a10-apb1-clk" - for the APB1 clock 33 "allwinner,sun4i-a10-apb1-clk" - for the APB1 clock
31 "allwinner,sun4i-a10-apb1-mux-clk" - for the APB1 clock muxing 34 "allwinner,sun4i-a10-apb1-mux-clk" - for the APB1 clock muxing
@@ -41,6 +44,7 @@ Required properties:
41 "allwinner,sun7i-a20-gmac-clk" - for the GMAC clock module on A20/A31 44 "allwinner,sun7i-a20-gmac-clk" - for the GMAC clock module on A20/A31
42 "allwinner,sun4i-a10-usb-clk" - for usb gates + resets on A10 / A20 45 "allwinner,sun4i-a10-usb-clk" - for usb gates + resets on A10 / A20
43 "allwinner,sun5i-a13-usb-clk" - for usb gates + resets on A13 46 "allwinner,sun5i-a13-usb-clk" - for usb gates + resets on A13
47 "allwinner,sun6i-a31-usb-clk" - for usb gates + resets on A31
44 48
45Required properties for all clocks: 49Required properties for all clocks:
46- reg : shall be the control register address for the clock. 50- reg : shall be the control register address for the clock.
diff --git a/Documentation/devicetree/bindings/clock/ti-keystone-pllctrl.txt b/Documentation/devicetree/bindings/clock/ti-keystone-pllctrl.txt
new file mode 100644
index 000000000000..3e6a81e99804
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/ti-keystone-pllctrl.txt
@@ -0,0 +1,20 @@
1* Device tree bindings for Texas Instruments keystone pll controller
2
3The main pll controller used to drive theC66x CorePacs, the switch fabric,
4and a majority of the peripheral clocks (all but the ARM CorePacs, DDR3 and
5the NETCP modules) requires a PLL Controller to manage the various clock
6divisions, gating, and synchronization.
7
8Required properties:
9
10- compatible: "ti,keystone-pllctrl", "syscon"
11
12- reg: contains offset/length value for pll controller
13 registers space.
14
15Example:
16
17pllctrl: pll-controller@0x02310000 {
18 compatible = "ti,keystone-pllctrl", "syscon";
19 reg = <0x02310000 0x200>;
20};
diff --git a/Documentation/devicetree/bindings/clock/ti/apll.txt b/Documentation/devicetree/bindings/clock/ti/apll.txt
index 7faf5a68b3be..ade4dd4c30f0 100644
--- a/Documentation/devicetree/bindings/clock/ti/apll.txt
+++ b/Documentation/devicetree/bindings/clock/ti/apll.txt
@@ -14,18 +14,32 @@ a subtype of a DPLL [2], although a simplified one at that.
14[2] Documentation/devicetree/bindings/clock/ti/dpll.txt 14[2] Documentation/devicetree/bindings/clock/ti/dpll.txt
15 15
16Required properties: 16Required properties:
17- compatible : shall be "ti,dra7-apll-clock" 17- compatible : shall be "ti,dra7-apll-clock" or "ti,omap2-apll-clock"
18- #clock-cells : from common clock binding; shall be set to 0. 18- #clock-cells : from common clock binding; shall be set to 0.
19- clocks : link phandles of parent clocks (clk-ref and clk-bypass) 19- clocks : link phandles of parent clocks (clk-ref and clk-bypass)
20- reg : address and length of the register set for controlling the APLL. 20- reg : address and length of the register set for controlling the APLL.
21 It contains the information of registers in the following order: 21 It contains the information of registers in the following order:
22 "control" - contains the control register base address 22 "control" - contains the control register offset
23 "idlest" - contains the idlest register base address 23 "idlest" - contains the idlest register offset
24 "autoidle" - contains the autoidle register offset (OMAP2 only)
25- ti,clock-frequency : static clock frequency for the clock (OMAP2 only)
26- ti,idlest-shift : bit-shift for the idlest field (OMAP2 only)
27- ti,bit-shift : bit-shift for enable and autoidle fields (OMAP2 only)
24 28
25Examples: 29Examples:
26 apll_pcie_ck: apll_pcie_ck@4a008200 { 30 apll_pcie_ck: apll_pcie_ck {
27 #clock-cells = <0>; 31 #clock-cells = <0>;
28 clocks = <&apll_pcie_in_clk_mux>, <&dpll_pcie_ref_ck>; 32 clocks = <&apll_pcie_in_clk_mux>, <&dpll_pcie_ref_ck>;
29 reg = <0x4a00821c 0x4>, <0x4a008220 0x4>; 33 reg = <0x021c>, <0x0220>;
30 compatible = "ti,dra7-apll-clock"; 34 compatible = "ti,dra7-apll-clock";
31 }; 35 };
36
37 apll96_ck: apll96_ck {
38 #clock-cells = <0>;
39 compatible = "ti,omap2-apll-clock";
40 clocks = <&sys_ck>;
41 ti,bit-shift = <2>;
42 ti,idlest-shift = <8>;
43 ti,clock-frequency = <96000000>;
44 reg = <0x0500>, <0x0530>, <0x0520>;
45 };
diff --git a/Documentation/devicetree/bindings/clock/ti/dpll.txt b/Documentation/devicetree/bindings/clock/ti/dpll.txt
index 30bfdb7c9f18..df57009ff8e7 100644
--- a/Documentation/devicetree/bindings/clock/ti/dpll.txt
+++ b/Documentation/devicetree/bindings/clock/ti/dpll.txt
@@ -24,12 +24,14 @@ Required properties:
24 "ti,omap4-dpll-core-clock", 24 "ti,omap4-dpll-core-clock",
25 "ti,omap4-dpll-m4xen-clock", 25 "ti,omap4-dpll-m4xen-clock",
26 "ti,omap4-dpll-j-type-clock", 26 "ti,omap4-dpll-j-type-clock",
27 "ti,omap5-mpu-dpll-clock",
27 "ti,am3-dpll-no-gate-clock", 28 "ti,am3-dpll-no-gate-clock",
28 "ti,am3-dpll-j-type-clock", 29 "ti,am3-dpll-j-type-clock",
29 "ti,am3-dpll-no-gate-j-type-clock", 30 "ti,am3-dpll-no-gate-j-type-clock",
30 "ti,am3-dpll-clock", 31 "ti,am3-dpll-clock",
31 "ti,am3-dpll-core-clock", 32 "ti,am3-dpll-core-clock",
32 "ti,am3-dpll-x2-clock", 33 "ti,am3-dpll-x2-clock",
34 "ti,omap2-dpll-core-clock",
33 35
34- #clock-cells : from common clock binding; shall be set to 0. 36- #clock-cells : from common clock binding; shall be set to 0.
35- clocks : link phandles of parent clocks, first entry lists reference clock 37- clocks : link phandles of parent clocks, first entry lists reference clock
@@ -41,6 +43,7 @@ Required properties:
41 "mult-div1" - contains the multiplier / divider register base address 43 "mult-div1" - contains the multiplier / divider register base address
42 "autoidle" - contains the autoidle register base address (optional) 44 "autoidle" - contains the autoidle register base address (optional)
43 ti,am3-* dpll types do not have autoidle register 45 ti,am3-* dpll types do not have autoidle register
46 ti,omap2-* dpll type does not support idlest / autoidle registers
44 47
45Optional properties: 48Optional properties:
46- DPLL mode setting - defining any one or more of the following overrides 49- DPLL mode setting - defining any one or more of the following overrides
@@ -73,3 +76,10 @@ Examples:
73 clocks = <&sys_clkin_ck>, <&sys_clkin_ck>; 76 clocks = <&sys_clkin_ck>, <&sys_clkin_ck>;
74 reg = <0x90>, <0x5c>, <0x68>; 77 reg = <0x90>, <0x5c>, <0x68>;
75 }; 78 };
79
80 dpll_ck: dpll_ck {
81 #clock-cells = <0>;
82 compatible = "ti,omap2-dpll-core-clock";
83 clocks = <&sys_ck>, <&sys_ck>;
84 reg = <0x0500>, <0x0540>;
85 };
diff --git a/Documentation/devicetree/bindings/clock/ti/dra7-atl.txt b/Documentation/devicetree/bindings/clock/ti/dra7-atl.txt
new file mode 100644
index 000000000000..585e8c191f50
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/ti/dra7-atl.txt
@@ -0,0 +1,96 @@
1Device Tree Clock bindings for ATL (Audio Tracking Logic) of DRA7 SoC.
2
3The ATL IP is used to generate clock to be used to synchronize baseband and
4audio codec. A single ATL IP provides four ATL clock instances sharing the same
5functional clock but can be configured to provide different clocks.
6ATL can maintain a clock averages to some desired frequency based on the bws/aws
7signals - can compensate the drift between the two ws signal.
8
9In order to provide the support for ATL and it's output clocks (which can be used
10internally within the SoC or external components) two sets of bindings is needed:
11
12Clock tree binding:
13This binding uses the common clock binding[1].
14To be able to integrate the ATL clocks with DT clock tree.
15Provides ccf level representation of the ATL clocks to be used by drivers.
16Since the clock instances are part of a single IP this binding is used as a node
17for the DT clock tree, the IP driver is needed to handle the actual configuration
18of the IP.
19
20[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
21
22Required properties:
23- compatible : shall be "ti,dra7-atl-clock"
24- #clock-cells : from common clock binding; shall be set to 0.
25- clocks : link phandles to functional clock of ATL
26
27Binding for the IP driver:
28This binding is used to configure the IP driver which is going to handle the
29configuration of the IP for the ATL clock instances.
30
31Required properties:
32- compatible : shall be "ti,dra7-atl"
33- reg : base address for the ATL IP
34- ti,provided-clocks : List of phandles to the clocks associated with the ATL
35- clocks : link phandles to functional clock of ATL
36- clock-names : Shall be set to "fck"
37- ti,hwmods : Shall be set to "atl"
38
39Optional properties:
40Configuration of ATL instances:
41- atl{0/1/2/3} {
42 - bws : Baseband word select signal selection
43 - aws : Audio word select signal selection
44};
45
46For valid word select signals, see the dt-bindings/clk/ti-dra7-atl.h include
47file.
48
49Examples:
50/* clock bindings for atl provided clocks */
51atl_clkin0_ck: atl_clkin0_ck {
52 #clock-cells = <0>;
53 compatible = "ti,dra7-atl-clock";
54 clocks = <&atl_gfclk_mux>;
55};
56
57atl_clkin1_ck: atl_clkin1_ck {
58 #clock-cells = <0>;
59 compatible = "ti,dra7-atl-clock";
60 clocks = <&atl_gfclk_mux>;
61};
62
63atl_clkin2_ck: atl_clkin2_ck {
64 #clock-cells = <0>;
65 compatible = "ti,dra7-atl-clock";
66 clocks = <&atl_gfclk_mux>;
67};
68
69atl_clkin3_ck: atl_clkin3_ck {
70 #clock-cells = <0>;
71 compatible = "ti,dra7-atl-clock";
72 clocks = <&atl_gfclk_mux>;
73};
74
75/* binding for the IP */
76atl: atl@4843c000 {
77 compatible = "ti,dra7-atl";
78 reg = <0x4843c000 0x3ff>;
79 ti,hwmods = "atl";
80 ti,provided-clocks = <&atl_clkin0_ck>, <&atl_clkin1_ck>,
81 <&atl_clkin2_ck>, <&atl_clkin3_ck>;
82 clocks = <&atl_gfclk_mux>;
83 clock-names = "fck";
84 status = "disabled";
85};
86
87#include <dt-bindings/clk/ti-dra7-atl.h>
88
89&atl {
90 status = "okay";
91
92 atl2 {
93 bws = <DRA7_ATL_WS_MCASP2_FSX>;
94 aws = <DRA7_ATL_WS_MCASP3_FSX>;
95 };
96};
diff --git a/Documentation/devicetree/bindings/clock/ti/gate.txt b/Documentation/devicetree/bindings/clock/ti/gate.txt
index 125281aaa4ca..03f8fdee62a7 100644
--- a/Documentation/devicetree/bindings/clock/ti/gate.txt
+++ b/Documentation/devicetree/bindings/clock/ti/gate.txt
@@ -25,6 +25,11 @@ Required properties:
25 to map clockdomains properly 25 to map clockdomains properly
26 "ti,hsdiv-gate-clock" - gate clock with OMAP36xx specific hardware handling, 26 "ti,hsdiv-gate-clock" - gate clock with OMAP36xx specific hardware handling,
27 required for a hardware errata 27 required for a hardware errata
28 "ti,composite-gate-clock" - composite gate clock, to be part of composite
29 clock
30 "ti,composite-no-wait-gate-clock" - composite gate clock that does not wait
31 for clock to be active before returning
32 from clk_enable()
28- #clock-cells : from common clock binding; shall be set to 0 33- #clock-cells : from common clock binding; shall be set to 0
29- clocks : link to phandle of parent clock 34- clocks : link to phandle of parent clock
30- reg : offset for register controlling adjustable gate, not needed for 35- reg : offset for register controlling adjustable gate, not needed for
@@ -41,7 +46,7 @@ Examples:
41 #clock-cells = <0>; 46 #clock-cells = <0>;
42 compatible = "ti,gate-clock"; 47 compatible = "ti,gate-clock";
43 clocks = <&core_96m_fck>; 48 clocks = <&core_96m_fck>;
44 reg = <0x48004a00 0x4>; 49 reg = <0x0a00>;
45 ti,bit-shift = <25>; 50 ti,bit-shift = <25>;
46 }; 51 };
47 52
@@ -57,7 +62,7 @@ Examples:
57 #clock-cells = <0>; 62 #clock-cells = <0>;
58 compatible = "ti,dss-gate-clock"; 63 compatible = "ti,dss-gate-clock";
59 clocks = <&dpll4_m4x2_ck>; 64 clocks = <&dpll4_m4x2_ck>;
60 reg = <0x48004e00 0x4>; 65 reg = <0x0e00>;
61 ti,bit-shift = <0>; 66 ti,bit-shift = <0>;
62 }; 67 };
63 68
@@ -65,7 +70,7 @@ Examples:
65 #clock-cells = <0>; 70 #clock-cells = <0>;
66 compatible = "ti,am35xx-gate-clock"; 71 compatible = "ti,am35xx-gate-clock";
67 clocks = <&ipss_ick>; 72 clocks = <&ipss_ick>;
68 reg = <0x4800259c 0x4>; 73 reg = <0x059c>;
69 ti,bit-shift = <1>; 74 ti,bit-shift = <1>;
70 }; 75 };
71 76
@@ -80,6 +85,22 @@ Examples:
80 compatible = "ti,hsdiv-gate-clock"; 85 compatible = "ti,hsdiv-gate-clock";
81 clocks = <&dpll4_m2x2_mul_ck>; 86 clocks = <&dpll4_m2x2_mul_ck>;
82 ti,bit-shift = <0x1b>; 87 ti,bit-shift = <0x1b>;
83 reg = <0x48004d00 0x4>; 88 reg = <0x0d00>;
84 ti,set-bit-to-disable; 89 ti,set-bit-to-disable;
85 }; 90 };
91
92 vlynq_gate_fck: vlynq_gate_fck {
93 #clock-cells = <0>;
94 compatible = "ti,composite-gate-clock";
95 clocks = <&core_ck>;
96 ti,bit-shift = <3>;
97 reg = <0x0200>;
98 };
99
100 sys_clkout2_src_gate: sys_clkout2_src_gate {
101 #clock-cells = <0>;
102 compatible = "ti,composite-no-wait-gate-clock";
103 clocks = <&core_ck>;
104 ti,bit-shift = <15>;
105 reg = <0x0070>;
106 };
diff --git a/Documentation/devicetree/bindings/clock/ti/interface.txt b/Documentation/devicetree/bindings/clock/ti/interface.txt
index 064e8caccac3..3111a409fea6 100644
--- a/Documentation/devicetree/bindings/clock/ti/interface.txt
+++ b/Documentation/devicetree/bindings/clock/ti/interface.txt
@@ -21,6 +21,8 @@ Required properties:
21 "ti,omap3-dss-interface-clock" - interface clock with DSS specific HW handling 21 "ti,omap3-dss-interface-clock" - interface clock with DSS specific HW handling
22 "ti,omap3-ssi-interface-clock" - interface clock with SSI specific HW handling 22 "ti,omap3-ssi-interface-clock" - interface clock with SSI specific HW handling
23 "ti,am35xx-interface-clock" - interface clock with AM35xx specific HW handling 23 "ti,am35xx-interface-clock" - interface clock with AM35xx specific HW handling
24 "ti,omap2430-interface-clock" - interface clock with OMAP2430 specific HW
25 handling
24- #clock-cells : from common clock binding; shall be set to 0 26- #clock-cells : from common clock binding; shall be set to 0
25- clocks : link to phandle of parent clock 27- clocks : link to phandle of parent clock
26- reg : base address for the control register 28- reg : base address for the control register
diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
index f055515d2b62..366690cb86a3 100644
--- a/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
+++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
@@ -8,10 +8,12 @@ Both required and optional properties listed below must be defined
8under node /cpus/cpu@0. 8under node /cpus/cpu@0.
9 9
10Required properties: 10Required properties:
11- operating-points: Refer to Documentation/devicetree/bindings/power/opp.txt 11- None
12 for details
13 12
14Optional properties: 13Optional properties:
14- operating-points: Refer to Documentation/devicetree/bindings/power/opp.txt for
15 details. OPPs *must* be supplied either via DT, i.e. this property, or
16 populated at runtime.
15- clock-latency: Specify the possible maximum transition latency for clock, 17- clock-latency: Specify the possible maximum transition latency for clock,
16 in unit of nanoseconds. 18 in unit of nanoseconds.
17- voltage-tolerance: Specify the CPU voltage tolerance in percentage. 19- voltage-tolerance: Specify the CPU voltage tolerance in percentage.
diff --git a/Documentation/devicetree/bindings/crypto/samsung-sss.txt b/Documentation/devicetree/bindings/crypto/samsung-sss.txt
new file mode 100644
index 000000000000..a6dafa83c6df
--- /dev/null
+++ b/Documentation/devicetree/bindings/crypto/samsung-sss.txt
@@ -0,0 +1,34 @@
1Samsung SoC SSS (Security SubSystem) module
2
3The SSS module in S5PV210 SoC supports the following:
4-- Feeder (FeedCtrl)
5-- Advanced Encryption Standard (AES)
6-- Data Encryption Standard (DES)/3DES
7-- Public Key Accelerator (PKA)
8-- SHA-1/SHA-256/MD5/HMAC (SHA-1/SHA-256/MD5)/PRNG
9-- PRNG: Pseudo Random Number Generator
10
11The SSS module in Exynos4 (Exynos4210) and
12Exynos5 (Exynos5420 and Exynos5250) SoCs
13supports the following also:
14-- ARCFOUR (ARC4)
15-- True Random Number Generator (TRNG)
16-- Secure Key Manager
17
18Required properties:
19
20- compatible : Should contain entries for this and backward compatible
21 SSS versions:
22 - "samsung,s5pv210-secss" for S5PV210 SoC.
23 - "samsung,exynos4210-secss" for Exynos4210, Exynos4212, Exynos4412, Exynos5250,
24 Exynos5260 and Exynos5420 SoCs.
25- reg : Offset and length of the register set for the module
26- interrupts : interrupt specifiers of SSS module interrupts, should contain
27 following entries:
28 - first : feed control interrupt (required for all variants),
29 - second : hash interrupt (required only for samsung,s5pv210-secss).
30
31- clocks : list of clock phandle and specifier pairs for all clocks listed in
32 clock-names property.
33- clock-names : list of device clock input names; should contain one entry
34 "secss".
diff --git a/Documentation/devicetree/bindings/dma/dma.txt b/Documentation/devicetree/bindings/dma/dma.txt
index 8f504e6bae14..82104271e754 100644
--- a/Documentation/devicetree/bindings/dma/dma.txt
+++ b/Documentation/devicetree/bindings/dma/dma.txt
@@ -14,7 +14,7 @@ Required property:
14 14
15Optional properties: 15Optional properties:
16- dma-channels: Number of DMA channels supported by the controller. 16- dma-channels: Number of DMA channels supported by the controller.
17- dma-requests: Number of DMA requests signals supported by the 17- dma-requests: Number of DMA request signals supported by the
18 controller. 18 controller.
19 19
20Example: 20Example:
@@ -44,7 +44,7 @@ Required property:
44 #dma-cells property in the node referenced by phandle 44 #dma-cells property in the node referenced by phandle
45 containing DMA controller specific information. This 45 containing DMA controller specific information. This
46 typically contains a DMA request line number or a 46 typically contains a DMA request line number or a
47 channel number, but can contain any data that is used 47 channel number, but can contain any data that is
48 required for configuring a channel. 48 required for configuring a channel.
49- dma-names: Contains one identifier string for each DMA specifier in 49- dma-names: Contains one identifier string for each DMA specifier in
50 the dmas property. The specific strings that can be used 50 the dmas property. The specific strings that can be used
diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
index ee9be9961524..e577196a12c0 100644
--- a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
+++ b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
@@ -8,7 +8,7 @@ Required properties:
8 "fsl,imx51-sdma" 8 "fsl,imx51-sdma"
9 "fsl,imx53-sdma" 9 "fsl,imx53-sdma"
10 "fsl,imx6q-sdma" 10 "fsl,imx6q-sdma"
11 The -to variants should be preferred since they allow to determnine the 11 The -to variants should be preferred since they allow to determine the
12 correct ROM script addresses needed for the driver to work without additional 12 correct ROM script addresses needed for the driver to work without additional
13 firmware. 13 firmware.
14- reg : Should contain SDMA registers location and length 14- reg : Should contain SDMA registers location and length
diff --git a/Documentation/devicetree/bindings/dma/mmp-dma.txt b/Documentation/devicetree/bindings/dma/mmp-dma.txt
index a4fa4efa1d83..7a802f64e5bd 100644
--- a/Documentation/devicetree/bindings/dma/mmp-dma.txt
+++ b/Documentation/devicetree/bindings/dma/mmp-dma.txt
@@ -1,17 +1,20 @@
1* MARVELL MMP DMA controller 1* MARVELL MMP DMA controller
2 2
3Marvell Peripheral DMA Controller 3Marvell Peripheral DMA Controller
4Used platfroms: pxa688, pxa910, pxa3xx, etc 4Used platforms: pxa688, pxa910, pxa3xx, etc
5 5
6Required properties: 6Required properties:
7- compatible: Should be "marvell,pdma-1.0" 7- compatible: Should be "marvell,pdma-1.0"
8- reg: Should contain DMA registers location and length. 8- reg: Should contain DMA registers location and length.
9- interrupts: Either contain all of the per-channel DMA interrupts 9- interrupts: Either contain all of the per-channel DMA interrupts
10 or one irq for pdma device 10 or one irq for pdma device
11- #dma-channels: Number of DMA channels supported by the controller. 11
12Optional properties:
13- #dma-channels: Number of DMA channels supported by the controller (defaults
14 to 32 when not specified)
12 15
13"marvell,pdma-1.0" 16"marvell,pdma-1.0"
14Used platfroms: pxa25x, pxa27x, pxa3xx, pxa93x, pxa168, pxa910, pxa688. 17Used platforms: pxa25x, pxa27x, pxa3xx, pxa93x, pxa168, pxa910, pxa688.
15 18
16Examples: 19Examples:
17 20
@@ -45,7 +48,7 @@ pdma: dma-controller@d4000000 {
45 48
46 49
47Marvell Two Channel DMA Controller used specifically for audio 50Marvell Two Channel DMA Controller used specifically for audio
48Used platfroms: pxa688, pxa910 51Used platforms: pxa688, pxa910
49 52
50Required properties: 53Required properties:
51- compatible: Should be "marvell,adma-1.0" or "marvell,pxa910-squ" 54- compatible: Should be "marvell,adma-1.0" or "marvell,pxa910-squ"
diff --git a/Documentation/devicetree/bindings/dma/ti-edma.txt b/Documentation/devicetree/bindings/dma/ti-edma.txt
index 9fbbdb783a72..5ba525a10035 100644
--- a/Documentation/devicetree/bindings/dma/ti-edma.txt
+++ b/Documentation/devicetree/bindings/dma/ti-edma.txt
@@ -2,11 +2,8 @@ TI EDMA
2 2
3Required properties: 3Required properties:
4- compatible : "ti,edma3" 4- compatible : "ti,edma3"
5- ti,edma-regions: Number of regions
6- ti,edma-slots: Number of slots
7- #dma-cells: Should be set to <1> 5- #dma-cells: Should be set to <1>
8 Clients should use a single channel number per DMA request. 6 Clients should use a single channel number per DMA request.
9- dma-channels: Specify total DMA channels per CC
10- reg: Memory map for accessing module 7- reg: Memory map for accessing module
11- interrupt-parent: Interrupt controller the interrupt is routed through 8- interrupt-parent: Interrupt controller the interrupt is routed through
12- interrupts: Exactly 3 interrupts need to be specified in the order: 9- interrupts: Exactly 3 interrupts need to be specified in the order:
@@ -17,6 +14,13 @@ Optional properties:
17- ti,hwmods: Name of the hwmods associated to the EDMA 14- ti,hwmods: Name of the hwmods associated to the EDMA
18- ti,edma-xbar-event-map: Crossbar event to channel map 15- ti,edma-xbar-event-map: Crossbar event to channel map
19 16
17Deprecated properties:
18Listed here in case one wants to boot an old kernel with new DTB. These
19properties might need to be added to the new DTS files.
20- ti,edma-regions: Number of regions
21- ti,edma-slots: Number of slots
22- dma-channels: Specify total DMA channels per CC
23
20Example: 24Example:
21 25
22edma: edma@49000000 { 26edma: edma@49000000 {
@@ -26,9 +30,6 @@ edma: edma@49000000 {
26 compatible = "ti,edma3"; 30 compatible = "ti,edma3";
27 ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2"; 31 ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";
28 #dma-cells = <1>; 32 #dma-cells = <1>;
29 dma-channels = <64>; 33 ti,edma-xbar-event-map = /bits/ 16 <1 12
30 ti,edma-regions = <4>; 34 2 13>;
31 ti,edma-slots = <256>;
32 ti,edma-xbar-event-map = <1 12
33 2 13>;
34}; 35};
diff --git a/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt b/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt
new file mode 100644
index 000000000000..1405ed071bb4
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt
@@ -0,0 +1,75 @@
1Xilinx AXI VDMA engine, it does transfers between memory and video devices.
2It can be configured to have one channel or two channels. If configured
3as two channels, one is to transmit to the video device and another is
4to receive from the video device.
5
6Required properties:
7- compatible: Should be "xlnx,axi-vdma-1.00.a"
8- #dma-cells: Should be <1>, see "dmas" property below
9- reg: Should contain VDMA registers location and length.
10- xlnx,num-fstores: Should be the number of framebuffers as configured in h/w.
11- dma-channel child node: Should have at least one channel and can have up to
12 two channels per device. This node specifies the properties of each
13 DMA channel (see child node properties below).
14
15Optional properties:
16- xlnx,include-sg: Tells configured for Scatter-mode in
17 the hardware.
18- xlnx,flush-fsync: Tells which channel to Flush on Frame sync.
19 It takes following values:
20 {1}, flush both channels
21 {2}, flush mm2s channel
22 {3}, flush s2mm channel
23
24Required child node properties:
25- compatible: It should be either "xlnx,axi-vdma-mm2s-channel" or
26 "xlnx,axi-vdma-s2mm-channel".
27- interrupts: Should contain per channel VDMA interrupts.
28- xlnx,data-width: Should contain the stream data width, take values
29 {32,64...1024}.
30
31Optional child node properties:
32- xlnx,include-dre: Tells hardware is configured for Data
33 Realignment Engine.
34- xlnx,genlock-mode: Tells Genlock synchronization is
35 enabled/disabled in hardware.
36
37Example:
38++++++++
39
40axi_vdma_0: axivdma@40030000 {
41 compatible = "xlnx,axi-vdma-1.00.a";
42 #dma_cells = <1>;
43 reg = < 0x40030000 0x10000 >;
44 xlnx,num-fstores = <0x8>;
45 xlnx,flush-fsync = <0x1>;
46 dma-channel@40030000 {
47 compatible = "xlnx,axi-vdma-mm2s-channel";
48 interrupts = < 0 54 4 >;
49 xlnx,datawidth = <0x40>;
50 } ;
51 dma-channel@40030030 {
52 compatible = "xlnx,axi-vdma-s2mm-channel";
53 interrupts = < 0 53 4 >;
54 xlnx,datawidth = <0x40>;
55 } ;
56} ;
57
58
59* DMA client
60
61Required properties:
62- dmas: a list of <[Video DMA device phandle] [Channel ID]> pairs,
63 where Channel ID is '0' for write/tx and '1' for read/rx
64 channel.
65- dma-names: a list of DMA channel names, one per "dmas" entry
66
67Example:
68++++++++
69
70vdmatest_0: vdmatest@0 {
71 compatible ="xlnx,axi-vdma-test-1.00.a";
72 dmas = <&axi_vdma_0 0
73 &axi_vdma_0 1>;
74 dma-names = "vdma0", "vdma1";
75} ;
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt b/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt
index 3ddc7ccfe5f3..c306a2d0f2b1 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt
@@ -54,7 +54,7 @@ Optional device specific properties:
54 IO 8-15 are bank 2. These chips have two different interrupt outputs: 54 IO 8-15 are bank 2. These chips have two different interrupt outputs:
55 One for bank 1 and another for bank 2. If irq-mirror is set, both 55 One for bank 1 and another for bank 2. If irq-mirror is set, both
56 interrupts are generated regardless of the bank that an input change 56 interrupts are generated regardless of the bank that an input change
57 occured on. If it is not set, the interrupt are only generated for the 57 occurred on. If it is not set, the interrupt are only generated for the
58 bank they belong to. 58 bank they belong to.
59 On devices with only one interrupt output this property is useless. 59 On devices with only one interrupt output this property is useless.
60 60
diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
index f61cef74a212..941a26aa4322 100644
--- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
+++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
@@ -21,6 +21,12 @@ Required Properties:
21 GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported. 21 GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported.
22 - gpio-ranges: Range of pins managed by the GPIO controller. 22 - gpio-ranges: Range of pins managed by the GPIO controller.
23 23
24Optional properties:
25
26 - clocks: Must contain a reference to the functional clock. The property is
27 mandatory if the hardware implements a controllable functional clock for
28 the GPIO instance.
29
24Please refer to gpio.txt in this directory for details of gpio-ranges property 30Please refer to gpio.txt in this directory for details of gpio-ranges property
25and the common GPIO bindings used by client devices. 31and the common GPIO bindings used by client devices.
26 32
diff --git a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt b/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt
index efa8b8451f93..b48f4ef31d93 100644
--- a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt
+++ b/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt
@@ -136,6 +136,7 @@ of the following host1x client modules:
136 - compatible: "nvidia,tegra<chip>-hdmi" 136 - compatible: "nvidia,tegra<chip>-hdmi"
137 - reg: Physical base address and length of the controller's registers. 137 - reg: Physical base address and length of the controller's registers.
138 - interrupts: The interrupt outputs from the controller. 138 - interrupts: The interrupt outputs from the controller.
139 - hdmi-supply: supply for the +5V HDMI connector pin
139 - vdd-supply: regulator for supply voltage 140 - vdd-supply: regulator for supply voltage
140 - pll-supply: regulator for PLL 141 - pll-supply: regulator for PLL
141 - clocks: Must contain an entry for each entry in clock-names. 142 - clocks: Must contain an entry for each entry in clock-names.
@@ -180,6 +181,7 @@ of the following host1x client modules:
180 See ../reset/reset.txt for details. 181 See ../reset/reset.txt for details.
181 - reset-names: Must include the following entries: 182 - reset-names: Must include the following entries:
182 - dsi 183 - dsi
184 - avdd-dsi-supply: phandle of a supply that powers the DSI controller
183 - nvidia,mipi-calibrate: Should contain a phandle and a specifier specifying 185 - nvidia,mipi-calibrate: Should contain a phandle and a specifier specifying
184 which pads are used by this DSI output and need to be calibrated. See also 186 which pads are used by this DSI output and need to be calibrated. See also
185 ../mipi/nvidia,tegra114-mipi.txt. 187 ../mipi/nvidia,tegra114-mipi.txt.
diff --git a/Documentation/devicetree/bindings/hsi/client-devices.txt b/Documentation/devicetree/bindings/hsi/client-devices.txt
new file mode 100644
index 000000000000..104c9a3e57a4
--- /dev/null
+++ b/Documentation/devicetree/bindings/hsi/client-devices.txt
@@ -0,0 +1,44 @@
1Each HSI port is supposed to have one child node, which
2symbols the remote device connected to the HSI port. The
3following properties are standardized for HSI clients:
4
5Required HSI configuration properties:
6
7- hsi-channel-ids: A list of channel ids
8
9- hsi-rx-mode: Receiver Bit transmission mode ("stream" or "frame")
10- hsi-tx-mode: Transmitter Bit transmission mode ("stream" or "frame")
11- hsi-mode: May be used instead hsi-rx-mode and hsi-tx-mode if
12 the transmission mode is the same for receiver and
13 transmitter
14- hsi-speed-kbps: Max bit transmission speed in kbit/s
15- hsi-flow: RX flow type ("synchronized" or "pipeline")
16- hsi-arb-mode: Arbitration mode for TX frame ("round-robin", "priority")
17
18Optional HSI configuration properties:
19
20- hsi-channel-names: A list with one name per channel specified in the
21 hsi-channel-ids property
22
23
24Device Tree node example for an HSI client:
25
26hsi-controller {
27 hsi-port {
28 modem: hsi-client {
29 compatible = "nokia,n900-modem";
30
31 hsi-channel-ids = <0>, <1>, <2>, <3>;
32 hsi-channel-names = "mcsaab-control",
33 "speech-control",
34 "speech-data",
35 "mcsaab-data";
36 hsi-speed-kbps = <55000>;
37 hsi-mode = "frame";
38 hsi-flow = "synchronized";
39 hsi-arb-mode = "round-robin";
40
41 /* more client specific properties */
42 };
43 };
44};
diff --git a/Documentation/devicetree/bindings/hsi/nokia-modem.txt b/Documentation/devicetree/bindings/hsi/nokia-modem.txt
new file mode 100644
index 000000000000..8a979780452b
--- /dev/null
+++ b/Documentation/devicetree/bindings/hsi/nokia-modem.txt
@@ -0,0 +1,57 @@
1Nokia modem client bindings
2
3The Nokia modem HSI client follows the common HSI client binding
4and inherits all required properties. The following additional
5properties are needed by the Nokia modem HSI client:
6
7Required properties:
8- compatible: Should be one of
9 "nokia,n900-modem"
10- hsi-channel-names: Should contain the following strings
11 "mcsaab-control"
12 "speech-control"
13 "speech-data"
14 "mcsaab-data"
15- gpios: Should provide a GPIO handler for each GPIO listed in
16 gpio-names
17- gpio-names: Should contain the following strings
18 "cmt_apeslpx"
19 "cmt_rst_rq"
20 "cmt_en"
21 "cmt_rst"
22 "cmt_bsi"
23- interrupts: Should be IRQ handle for modem's reset indication
24
25Example:
26
27&ssi_port {
28 modem: hsi-client {
29 compatible = "nokia,n900-modem";
30
31 pinctrl-names = "default";
32 pinctrl-0 = <&modem_pins>;
33
34 hsi-channel-ids = <0>, <1>, <2>, <3>;
35 hsi-channel-names = "mcsaab-control",
36 "speech-control",
37 "speech-data",
38 "mcsaab-data";
39 hsi-speed-kbps = <55000>;
40 hsi-mode = "frame";
41 hsi-flow = "synchronized";
42 hsi-arb-mode = "round-robin";
43
44 interrupts-extended = <&gpio3 8 IRQ_TYPE_EDGE_FALLING>; /* 72 */
45
46 gpios = <&gpio3 6 GPIO_ACTIVE_HIGH>, /* 70 */
47 <&gpio3 9 GPIO_ACTIVE_HIGH>, /* 73 */
48 <&gpio3 10 GPIO_ACTIVE_HIGH>, /* 74 */
49 <&gpio3 11 GPIO_ACTIVE_HIGH>, /* 75 */
50 <&gpio5 29 GPIO_ACTIVE_HIGH>; /* 157 */
51 gpio-names = "cmt_apeslpx",
52 "cmt_rst_rq",
53 "cmt_en",
54 "cmt_rst",
55 "cmt_bsi";
56 };
57};
diff --git a/Documentation/devicetree/bindings/hsi/omap-ssi.txt b/Documentation/devicetree/bindings/hsi/omap-ssi.txt
new file mode 100644
index 000000000000..f26625e42693
--- /dev/null
+++ b/Documentation/devicetree/bindings/hsi/omap-ssi.txt
@@ -0,0 +1,97 @@
1OMAP SSI controller bindings
2
3OMAP Synchronous Serial Interface (SSI) controller implements a legacy
4variant of MIPI's High Speed Synchronous Serial Interface (HSI).
5
6Required properties:
7- compatible: Should include "ti,omap3-ssi".
8- reg-names: Contains the values "sys" and "gdd" (in this order).
9- reg: Contains a matching register specifier for each entry
10 in reg-names.
11- interrupt-names: Contains the value "gdd_mpu".
12- interrupts: Contains matching interrupt information for each entry
13 in interrupt-names.
14- ranges: Represents the bus address mapping between the main
15 controller node and the child nodes below.
16- clock-names: Must include the following entries:
17 "ssi_ssr_fck": The OMAP clock of that name
18 "ssi_sst_fck": The OMAP clock of that name
19 "ssi_ick": The OMAP clock of that name
20- clocks: Contains a matching clock specifier for each entry in
21 clock-names.
22- #address-cells: Should be set to <1>
23- #size-cells: Should be set to <1>
24
25Each port is represented as a sub-node of the ti,omap3-ssi device.
26
27Required Port sub-node properties:
28- compatible: Should be set to the following value
29 ti,omap3-ssi-port (applicable to OMAP34xx devices)
30- reg-names: Contains the values "tx" and "rx" (in this order).
31- reg: Contains a matching register specifier for each entry
32 in reg-names.
33- interrupt-parent Should be a phandle for the interrupt controller
34- interrupts: Should contain interrupt specifiers for mpu interrupts
35 0 and 1 (in this order).
36- ti,ssi-cawake-gpio: Defines which GPIO pin is used to signify CAWAKE
37 events for the port. This is an optional board-specific
38 property. If it's missing the port will not be
39 enabled.
40
41Example for Nokia N900:
42
43ssi-controller@48058000 {
44 compatible = "ti,omap3-ssi";
45
46 /* needed until hwmod is updated to use the compatible string */
47 ti,hwmods = "ssi";
48
49 reg = <0x48058000 0x1000>,
50 <0x48059000 0x1000>;
51 reg-names = "sys",
52 "gdd";
53
54 interrupts = <55>;
55 interrupt-names = "gdd_mpu";
56
57 clocks = <&ssi_ssr_fck>,
58 <&ssi_sst_fck>,
59 <&ssi_ick>;
60 clock-names = "ssi_ssr_fck",
61 "ssi_sst_fck",
62 "ssi_ick";
63
64 #address-cells = <1>;
65 #size-cells = <1>;
66 ranges;
67
68 ssi-port@4805a000 {
69 compatible = "ti,omap3-ssi-port";
70
71 reg = <0x4805a000 0x800>,
72 <0x4805a800 0x800>;
73 reg-names = "tx",
74 "rx";
75
76 interrupt-parent = <&intc>;
77 interrupts = <67>,
78 <68>;
79
80 ti,ssi-cawake-gpio = <&gpio5 23 GPIO_ACTIVE_HIGH>; /* 151 */
81 }
82
83 ssi-port@4805a000 {
84 compatible = "ti,omap3-ssi-port";
85
86 reg = <0x4805b000 0x800>,
87 <0x4805b800 0x800>;
88 reg-names = "tx",
89 "rx";
90
91 interrupt-parent = <&intc>;
92 interrupts = <69>,
93 <70>;
94
95 status = "disabled"; /* second port is not used on N900 */
96 }
97}
diff --git a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
index c6f66674f19c..b117b2e9e1a7 100644
--- a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
+++ b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
@@ -3,11 +3,19 @@ NTC Thermistor hwmon sensors
3 3
4Requires node properties: 4Requires node properties:
5- "compatible" value : one of 5- "compatible" value : one of
6 "ntc,ncp15wb473" 6 "murata,ncp15wb473"
7 "ntc,ncp18wb473" 7 "murata,ncp18wb473"
8 "ntc,ncp21wb473" 8 "murata,ncp21wb473"
9 "ntc,ncp03wb473" 9 "murata,ncp03wb473"
10 "ntc,ncp15wl333" 10 "murata,ncp15wl333"
11
12/* Usage of vendor name "ntc" is deprecated */
13<DEPRECATED> "ntc,ncp15wb473"
14<DEPRECATED> "ntc,ncp18wb473"
15<DEPRECATED> "ntc,ncp21wb473"
16<DEPRECATED> "ntc,ncp03wb473"
17<DEPRECATED> "ntc,ncp15wl333"
18
11- "pullup-uv" Pull up voltage in micro volts 19- "pullup-uv" Pull up voltage in micro volts
12- "pullup-ohm" Pull up resistor value in ohms 20- "pullup-ohm" Pull up resistor value in ohms
13- "pulldown-ohm" Pull down resistor value in ohms 21- "pulldown-ohm" Pull down resistor value in ohms
@@ -21,7 +29,7 @@ Read more about iio bindings at
21 29
22Example: 30Example:
23 ncp15wb473@0 { 31 ncp15wb473@0 {
24 compatible = "ntc,ncp15wb473"; 32 compatible = "murata,ncp15wb473";
25 pullup-uv = <1800000>; 33 pullup-uv = <1800000>;
26 pullup-ohm = <47000>; 34 pullup-ohm = <47000>;
27 pulldown-ohm = <0>; 35 pulldown-ohm = <0>;
diff --git a/Documentation/devicetree/bindings/i2c/i2c-arb-gpio-challenge.txt b/Documentation/devicetree/bindings/i2c/i2c-arb-gpio-challenge.txt
index 1ac8ea8ade1d..bfeabb843941 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-arb-gpio-challenge.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-arb-gpio-challenge.txt
@@ -8,6 +8,12 @@ the standard I2C multi-master rules. Using GPIOs is generally useful in
8the case where there is a device on the bus that has errata and/or bugs 8the case where there is a device on the bus that has errata and/or bugs
9that makes standard multimaster mode not feasible. 9that makes standard multimaster mode not feasible.
10 10
11Note that this scheme works well enough but has some downsides:
12* It is nonstandard (not using standard I2C multimaster)
13* Having two masters on a bus in general makes it relatively hard to debug
14 problems (hard to tell if i2c issues were caused by one master, another, or
15 some device on the bus).
16
11 17
12Algorithm: 18Algorithm:
13 19
diff --git a/Documentation/devicetree/bindings/i2c/i2c-cros-ec-tunnel.txt b/Documentation/devicetree/bindings/i2c/i2c-cros-ec-tunnel.txt
new file mode 100644
index 000000000000..898f030eba62
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-cros-ec-tunnel.txt
@@ -0,0 +1,39 @@
1I2C bus that tunnels through the ChromeOS EC (cros-ec)
2======================================================
3On some ChromeOS board designs we've got a connection to the EC (embedded
4controller) but no direct connection to some devices on the other side of
5the EC (like a battery and PMIC). To get access to those devices we need
6to tunnel our i2c commands through the EC.
7
8The node for this device should be under a cros-ec node like google,cros-ec-spi
9or google,cros-ec-i2c.
10
11
12Required properties:
13- compatible: google,cros-ec-i2c-tunnel
14- google,remote-bus: The EC bus we'd like to talk to.
15
16Optional child nodes:
17- One node per I2C device connected to the tunnelled I2C bus.
18
19
20Example:
21 cros-ec@0 {
22 compatible = "google,cros-ec-spi";
23
24 ...
25
26 i2c-tunnel {
27 compatible = "google,cros-ec-i2c-tunnel";
28 #address-cells = <1>;
29 #size-cells = <0>;
30
31 google,remote-bus = <0>;
32
33 battery: sbs-battery@b {
34 compatible = "sbs,sbs-battery";
35 reg = <0xb>;
36 sbs,poll-retry-count = <1>;
37 };
38 };
39 }
diff --git a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
index 056732cfdcee..d4745e31f5c6 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt
@@ -5,7 +5,14 @@ at various speeds ranging from 100khz to 3.4Mhz.
5 5
6Required properties: 6Required properties:
7 - compatible: value should be. 7 - compatible: value should be.
8 -> "samsung,exynos5-hsi2c", for i2c compatible with exynos5 hsi2c. 8 -> "samsung,exynos5-hsi2c", (DEPRECATED)
9 for i2c compatible with HSI2C available
10 on Exynos5250 and Exynos5420 SoCs.
11 -> "samsung,exynos5250-hsi2c", for i2c compatible with HSI2C available
12 on Exynos5250 and Exynos5420 SoCs.
13 -> "samsung,exynos5260-hsi2c", for i2c compatible with HSI2C available
14 on Exynos5260 SoCs.
15
9 - reg: physical base address of the controller and length of memory mapped 16 - reg: physical base address of the controller and length of memory mapped
10 region. 17 region.
11 - interrupts: interrupt number to the cpu. 18 - interrupts: interrupt number to the cpu.
@@ -26,7 +33,7 @@ Optional properties:
26Example: 33Example:
27 34
28hsi2c@12ca0000 { 35hsi2c@12ca0000 {
29 compatible = "samsung,exynos5-hsi2c"; 36 compatible = "samsung,exynos5250-hsi2c";
30 reg = <0x12ca0000 0x100>; 37 reg = <0x12ca0000 0x100>;
31 interrupts = <56>; 38 interrupts = <56>;
32 clock-frequency = <100000>; 39 clock-frequency = <100000>;
diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
index befd4fb4764f..5c30026921ae 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
@@ -5,7 +5,7 @@ Required properties :
5 5
6 - reg : Offset and length of the register set for the device 6 - reg : Offset and length of the register set for the device
7 - compatible : Should be either: 7 - compatible : Should be either:
8 - "allwinner,sun4i-i2c" 8 - "allwinner,sun4i-a10-i2c"
9 - "allwinner,sun6i-a31-i2c" 9 - "allwinner,sun6i-a31-i2c"
10 - "marvell,mv64xxx-i2c" 10 - "marvell,mv64xxx-i2c"
11 - "marvell,mv78230-i2c" 11 - "marvell,mv78230-i2c"
diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
index dd8b2dd1edeb..16b3e07aa98f 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
@@ -7,6 +7,9 @@ Required properties:
7 "renesas,i2c-r8a7779" 7 "renesas,i2c-r8a7779"
8 "renesas,i2c-r8a7790" 8 "renesas,i2c-r8a7790"
9 "renesas,i2c-r8a7791" 9 "renesas,i2c-r8a7791"
10 "renesas,i2c-r8a7792"
11 "renesas,i2c-r8a7793"
12 "renesas,i2c-r8a7794"
10- reg: physical base address of the controller and length of memory mapped 13- reg: physical base address of the controller and length of memory mapped
11 region. 14 region.
12- interrupts: interrupt specifier. 15- interrupts: interrupt specifier.
diff --git a/Documentation/devicetree/bindings/i2c/i2c-rk3x.txt b/Documentation/devicetree/bindings/i2c/i2c-rk3x.txt
new file mode 100644
index 000000000000..dde6c22ce91a
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-rk3x.txt
@@ -0,0 +1,42 @@
1* Rockchip RK3xxx I2C controller
2
3This driver interfaces with the native I2C controller present in Rockchip
4RK3xxx SoCs.
5
6Required properties :
7
8 - reg : Offset and length of the register set for the device
9 - compatible : should be "rockchip,rk3066-i2c", "rockchip,rk3188-i2c" or
10 "rockchip,rk3288-i2c".
11 - interrupts : interrupt number
12 - clocks : parent clock
13
14Required on RK3066, RK3188 :
15
16 - rockchip,grf : the phandle of the syscon node for the general register
17 file (GRF)
18 - on those SoCs an alias with the correct I2C bus ID (bit offset in the GRF)
19 is also required.
20
21Optional properties :
22
23 - clock-frequency : SCL frequency to use (in Hz). If omitted, 100kHz is used.
24
25Example:
26
27aliases {
28 i2c0 = &i2c0;
29}
30
31i2c0: i2c@2002d000 {
32 compatible = "rockchip,rk3188-i2c";
33 reg = <0x2002d000 0x1000>;
34 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
35 #address-cells = <1>;
36 #size-cells = <0>;
37
38 rockchip,grf = <&grf>;
39
40 clock-names = "i2c";
41 clocks = <&cru PCLK_I2C0>;
42};
diff --git a/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
new file mode 100644
index 000000000000..d2153ce36fa8
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
@@ -0,0 +1,26 @@
1Device tree configuration for Renesas IIC (sh_mobile) driver
2
3Required properties:
4- compatible : "renesas,iic-<soctype>". "renesas,rmobile-iic" as fallback
5- reg : address start and address range size of device
6- interrupts : interrupt of device
7- clocks : clock for device
8- #address-cells : should be <1>
9- #size-cells : should be <0>
10
11Optional properties:
12- clock-frequency : frequency of bus clock in Hz. Default 100kHz if unset.
13
14Pinctrl properties might be needed, too. See there.
15
16Example:
17
18 iic0: i2c@e6500000 {
19 compatible = "renesas,iic-r8a7790", "renesas,rmobile-iic";
20 reg = <0 0xe6500000 0 0x425>;
21 interrupts = <0 174 IRQ_TYPE_LEVEL_HIGH>;
22 clocks = <&mstp3_clks R8A7790_CLK_IIC0>;
23 clock-frequency = <400000>;
24 #address-cells = <1>;
25 #size-cells = <0>;
26 };
diff --git a/Documentation/devicetree/bindings/i2c/i2c-sunxi-p2wi.txt b/Documentation/devicetree/bindings/i2c/i2c-sunxi-p2wi.txt
new file mode 100644
index 000000000000..6b765485af7d
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-sunxi-p2wi.txt
@@ -0,0 +1,41 @@
1
2* Allwinner P2WI (Push/Pull 2 Wire Interface) controller
3
4Required properties :
5
6 - reg : Offset and length of the register set for the device.
7 - compatible : Should one of the following:
8 - "allwinner,sun6i-a31-p2wi"
9 - interrupts : The interrupt line connected to the P2WI peripheral.
10 - clocks : The gate clk connected to the P2WI peripheral.
11 - resets : The reset line connected to the P2WI peripheral.
12
13Optional properties :
14
15 - clock-frequency : Desired P2WI bus clock frequency in Hz. If not set the
16default frequency is 100kHz
17
18A P2WI may contain one child node encoding a P2WI slave device.
19
20Slave device properties:
21 Required properties:
22 - reg : the I2C slave address used during the initialization
23 process to switch from I2C to P2WI mode
24
25Example:
26
27 p2wi@01f03400 {
28 compatible = "allwinner,sun6i-a31-p2wi";
29 reg = <0x01f03400 0x400>;
30 interrupts = <0 39 4>;
31 clocks = <&apb0_gates 3>;
32 clock-frequency = <6000000>;
33 resets = <&apb0_rst 3>;
34
35 axp221: pmic@68 {
36 compatible = "x-powers,axp221";
37 reg = <0x68>;
38
39 /* ... */
40 };
41 };
diff --git a/Documentation/devicetree/bindings/iio/proximity/as3935.txt b/Documentation/devicetree/bindings/iio/proximity/as3935.txt
new file mode 100644
index 000000000000..ae23dd8da736
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/proximity/as3935.txt
@@ -0,0 +1,28 @@
1Austrian Microsystems AS3935 Franklin lightning sensor device driver
2
3Required properties:
4 - compatible: must be "ams,as3935"
5 - reg: SPI chip select number for the device
6 - spi-cpha: SPI Mode 1. Refer to spi/spi-bus.txt for generic SPI
7 slave node bindings.
8 - interrupt-parent : should be the phandle for the interrupt controller
9 - interrupts : the sole interrupt generated by the device
10
11 Refer to interrupt-controller/interrupts.txt for generic
12 interrupt client node bindings.
13
14Optional properties:
15 - ams,tuning-capacitor-pf: Calibration tuning capacitor stepping
16 value 0 - 120pF. This will require using the calibration data from
17 the manufacturer.
18
19Example:
20
21as3935@0 {
22 compatible = "ams,as3935";
23 reg = <0>;
24 spi-cpha;
25 interrupt-parent = <&gpio1>;
26 interrupts = <16 1>;
27 ams,tuning-capacitor-pf = <80>;
28};
diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
new file mode 100644
index 000000000000..baef432e8369
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
@@ -0,0 +1,25 @@
1Atmel maXTouch touchscreen/touchpad
2
3Required properties:
4- compatible:
5 atmel,maxtouch
6
7- reg: The I2C address of the device
8
9- interrupts: The sink for the touchpad's IRQ output
10 See ../interrupt-controller/interrupts.txt
11
12Optional properties for main touchpad device:
13
14- linux,gpio-keymap: An array of up to 4 entries indicating the Linux
15 keycode generated by each GPIO. Linux keycodes are defined in
16 <dt-bindings/input/input.h>.
17
18Example:
19
20 touch@4b {
21 compatible = "atmel,maxtouch";
22 reg = <0x4b>;
23 interrupt-parent = <&gpio>;
24 interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_LOW>;
25 };
diff --git a/Documentation/devicetree/bindings/input/cap1106.txt b/Documentation/devicetree/bindings/input/cap1106.txt
new file mode 100644
index 000000000000..4b463904cba0
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/cap1106.txt
@@ -0,0 +1,53 @@
1Device tree bindings for Microchip CAP1106, 6 channel capacitive touch sensor
2
3The node for this driver must be a child of a I2C controller node, as the
4device communication via I2C only.
5
6Required properties:
7
8 compatible: Must be "microchip,cap1106"
9
10 reg: The I2C slave address of the device.
11 Only 0x28 is valid.
12
13 interrupts: Property describing the interrupt line the
14 device's ALERT#/CM_IRQ# pin is connected to.
15 The device only has one interrupt source.
16
17Optional properties:
18
19 autorepeat: Enables the Linux input system's autorepeat
20 feature on the input device.
21
22 microchip,sensor-gain: Defines the gain of the sensor circuitry. This
23 effectively controls the sensitivity, as a
24 smaller delta capacitance is required to
25 generate the same delta count values.
26 Valid values are 1, 2, 4, and 8.
27 By default, a gain of 1 is set.
28
29 linux,keycodes: Specifies an array of numeric keycode values to
30 be used for the channels. If this property is
31 omitted, KEY_A, KEY_B, etc are used as
32 defaults. The array must have exactly six
33 entries.
34
35Example:
36
37i2c_controller {
38 cap1106@28 {
39 compatible = "microchip,cap1106";
40 interrupt-parent = <&gpio1>;
41 interrupts = <0 0>;
42 reg = <0x28>;
43 autorepeat;
44 microchip,sensor-gain = <2>;
45
46 linux,keycodes = <103 /* KEY_UP */
47 106 /* KEY_RIGHT */
48 108 /* KEY_DOWN */
49 105 /* KEY_LEFT */
50 109 /* KEY_PAGEDOWN */
51 104>; /* KEY_PAGEUP */
52 };
53}
diff --git a/Documentation/devicetree/bindings/input/touchscreen/pixcir_i2c_ts.txt b/Documentation/devicetree/bindings/input/touchscreen/pixcir_i2c_ts.txt
new file mode 100644
index 000000000000..6e551090f465
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/touchscreen/pixcir_i2c_ts.txt
@@ -0,0 +1,26 @@
1* Pixcir I2C touchscreen controllers
2
3Required properties:
4- compatible: must be "pixcir,pixcir_ts" or "pixcir,pixcir_tangoc"
5- reg: I2C address of the chip
6- interrupts: interrupt to which the chip is connected
7- attb-gpio: GPIO connected to the ATTB line of the chip
8- touchscreen-size-x: horizontal resolution of touchscreen (in pixels)
9- touchscreen-size-y: vertical resolution of touchscreen (in pixels)
10
11Example:
12
13 i2c@00000000 {
14 /* ... */
15
16 pixcir_ts@5c {
17 compatible = "pixcir,pixcir_ts";
18 reg = <0x5c>;
19 interrupts = <2 0>;
20 attb-gpio = <&gpf 2 0 2>;
21 touchscreen-size-x = <800>;
22 touchscreen-size-y = <600>;
23 };
24
25 /* ... */
26 };
diff --git a/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt b/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt
index 2faf1f1fa39e..80c37df940a7 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/zforce_ts.txt
@@ -9,6 +9,9 @@ Required properties:
9- x-size: horizontal resolution of touchscreen 9- x-size: horizontal resolution of touchscreen
10- y-size: vertical resolution of touchscreen 10- y-size: vertical resolution of touchscreen
11 11
12Optional properties:
13- vdd-supply: Regulator controlling the controller supply
14
12Example: 15Example:
13 16
14 i2c@00000000 { 17 i2c@00000000 {
@@ -18,6 +21,7 @@ Example:
18 compatible = "neonode,zforce"; 21 compatible = "neonode,zforce";
19 reg = <0x50>; 22 reg = <0x50>;
20 interrupts = <2 0>; 23 interrupts = <2 0>;
24 vdd-supply = <&reg_zforce_vdd>;
21 25
22 gpios = <&gpio5 6 0>, /* INT */ 26 gpios = <&gpio5 6 0>, /* INT */
23 <&gpio5 9 0>; /* RST */ 27 <&gpio5 9 0>; /* RST */
diff --git a/Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt
new file mode 100644
index 000000000000..448273a30a11
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt
@@ -0,0 +1,29 @@
1Broadcom Generic Level 2 Interrupt Controller
2
3Required properties:
4
5- compatible: should be "brcm,l2-intc"
6- reg: specifies the base physical address and size of the registers
7- interrupt-controller: identifies the node as an interrupt controller
8- #interrupt-cells: specifies the number of cells needed to encode an
9 interrupt source. Should be 1.
10- interrupt-parent: specifies the phandle to the parent interrupt controller
11 this controller is cacaded from
12- interrupts: specifies the interrupt line in the interrupt-parent irq space
13 to be used for cascading
14
15Optional properties:
16
17- brcm,irq-can-wake: If present, this means the L2 controller can be used as a
18 wakeup source for system suspend/resume.
19
20Example:
21
22hif_intr2_intc: interrupt-controller@f0441000 {
23 compatible = "brcm,l2-intc";
24 reg = <0xf0441000 0x30>;
25 interrupt-controller;
26 #interrupt-cells = <1>;
27 interrupt-parent = <&intc>;
28 interrupts = <0x0 0x20 0x0>;
29};
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt b/Documentation/devicetree/bindings/interrupt-controller/marvell,armada-370-xp-mpic.txt
index 5fc03134a999..5fc03134a999 100644
--- a/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/marvell,armada-370-xp-mpic.txt
diff --git a/Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt b/Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt
new file mode 100644
index 000000000000..6fa4c737af23
--- /dev/null
+++ b/Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt
@@ -0,0 +1,70 @@
1Samsung Exynos IOMMU H/W, System MMU (System Memory Management Unit)
2
3Samsung's Exynos architecture contains System MMUs that enables scattered
4physical memory chunks visible as a contiguous region to DMA-capable peripheral
5devices like MFC, FIMC, FIMD, GScaler, FIMC-IS and so forth.
6
7System MMU is an IOMMU and supports identical translation table format to
8ARMv7 translation tables with minimum set of page properties including access
9permissions, shareability and security protection. In addition, System MMU has
10another capabilities like L2 TLB or block-fetch buffers to minimize translation
11latency.
12
13System MMUs are in many to one relation with peripheral devices, i.e. single
14peripheral device might have multiple System MMUs (usually one for each bus
15master), but one System MMU can handle transactions from only one peripheral
16device. The relation between a System MMU and the peripheral device needs to be
17defined in device node of the peripheral device.
18
19MFC in all Exynos SoCs and FIMD, M2M Scalers and G2D in Exynos5420 has 2 System
20MMUs.
21* MFC has one System MMU on its left and right bus.
22* FIMD in Exynos5420 has one System MMU for window 0 and 4, the other system MMU
23 for window 1, 2 and 3.
24* M2M Scalers and G2D in Exynos5420 has one System MMU on the read channel and
25 the other System MMU on the write channel.
26The drivers must consider how to handle those System MMUs. One of the idea is
27to implement child devices or sub-devices which are the client devices of the
28System MMU.
29
30Note:
31The current DT binding for the Exynos System MMU is incomplete.
32The following properties can be removed or changed, if found incompatible with
33the "Generic IOMMU Binding" support for attaching devices to the IOMMU.
34
35Required properties:
36- compatible: Should be "samsung,exynos-sysmmu"
37- reg: A tuple of base address and size of System MMU registers.
38- interrupt-parent: The phandle of the interrupt controller of System MMU
39- interrupts: An interrupt specifier for interrupt signal of System MMU,
40 according to the format defined by a particular interrupt
41 controller.
42- clock-names: Should be "sysmmu" if the System MMU is needed to gate its clock.
43 Optional "master" if the clock to the System MMU is gated by
44 another gate clock other than "sysmmu".
45 Exynos4 SoCs, there needs no "master" clock.
46 Exynos5 SoCs, some System MMUs must have "master" clocks.
47- clocks: Required if the System MMU is needed to gate its clock.
48- samsung,power-domain: Required if the System MMU is needed to gate its power.
49 Please refer to the following document:
50 Documentation/devicetree/bindings/arm/exynos/power_domain.txt
51
52Examples:
53 gsc_0: gsc@13e00000 {
54 compatible = "samsung,exynos5-gsc";
55 reg = <0x13e00000 0x1000>;
56 interrupts = <0 85 0>;
57 samsung,power-domain = <&pd_gsc>;
58 clocks = <&clock CLK_GSCL0>;
59 clock-names = "gscl";
60 };
61
62 sysmmu_gsc0: sysmmu@13E80000 {
63 compatible = "samsung,exynos-sysmmu";
64 reg = <0x13E80000 0x1000>;
65 interrupt-parent = <&combiner>;
66 interrupts = <2 0>;
67 clock-names = "sysmmu", "master";
68 clocks = <&clock CLK_SMMU_GSCL0>, <&clock CLK_GSCL0>;
69 samsung,power-domain = <&pd_gsc>;
70 };
diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt
index c55b8c016a9e..1b66a413fb9d 100644
--- a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt
+++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt
@@ -1,7 +1,13 @@
1Binding for TI/National Semiconductor LP55xx Led Drivers 1Binding for TI/National Semiconductor LP55xx Led Drivers
2 2
3Required properties: 3Required properties:
4- compatible: "national,lp5521" or "national,lp5523" or "ti,lp5562" or "ti,lp8501" 4- compatible: one of
5 national,lp5521
6 national,lp5523
7 ti,lp55231
8 ti,lp5562
9 ti,lp8501
10
5- reg: I2C slave address 11- reg: I2C slave address
6- clock-mode: Input clock mode, (0: automode, 1: internal, 2: external) 12- clock-mode: Input clock mode, (0: automode, 1: internal, 2: external)
7 13
diff --git a/Documentation/devicetree/bindings/leds/leds-pwm.txt b/Documentation/devicetree/bindings/leds/leds-pwm.txt
index 7297107cf832..6c6583c35f2f 100644
--- a/Documentation/devicetree/bindings/leds/leds-pwm.txt
+++ b/Documentation/devicetree/bindings/leds/leds-pwm.txt
@@ -13,6 +13,8 @@ LED sub-node properties:
13 For the pwms and pwm-names property please refer to: 13 For the pwms and pwm-names property please refer to:
14 Documentation/devicetree/bindings/pwm/pwm.txt 14 Documentation/devicetree/bindings/pwm/pwm.txt
15- max-brightness : Maximum brightness possible for the LED 15- max-brightness : Maximum brightness possible for the LED
16- active-low : (optional) For PWMs where the LED is wired to supply
17 rather than ground.
16- label : (optional) 18- label : (optional)
17 see Documentation/devicetree/bindings/leds/common.txt 19 see Documentation/devicetree/bindings/leds/common.txt
18- linux,default-trigger : (optional) 20- linux,default-trigger : (optional)
diff --git a/Documentation/devicetree/bindings/media/i2c/adv7604.txt b/Documentation/devicetree/bindings/media/i2c/adv7604.txt
new file mode 100644
index 000000000000..c27cede3bd68
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/adv7604.txt
@@ -0,0 +1,70 @@
1* Analog Devices ADV7604/11 video decoder with HDMI receiver
2
3The ADV7604 and ADV7611 are multiformat video decoders with an integrated HDMI
4receiver. The ADV7604 has four multiplexed HDMI inputs and one analog input,
5and the ADV7611 has one HDMI input and no analog input.
6
7These device tree bindings support the ADV7611 only at the moment.
8
9Required Properties:
10
11 - compatible: Must contain one of the following
12 - "adi,adv7611" for the ADV7611
13
14 - reg: I2C slave address
15
16 - hpd-gpios: References to the GPIOs that control the HDMI hot-plug
17 detection pins, one per HDMI input. The active flag indicates the GPIO
18 level that enables hot-plug detection.
19
20The device node must contain one 'port' child node per device input and output
21port, in accordance with the video interface bindings defined in
22Documentation/devicetree/bindings/media/video-interfaces.txt. The port nodes
23are numbered as follows.
24
25 Port ADV7611
26------------------------------------------------------------
27 HDMI 0
28 Digital output 1
29
30The digital output port node must contain at least one endpoint.
31
32Optional Properties:
33
34 - reset-gpios: Reference to the GPIO connected to the device's reset pin.
35
36Optional Endpoint Properties:
37
38 The following three properties are defined in video-interfaces.txt and are
39 valid for source endpoints only.
40
41 - hsync-active: Horizontal synchronization polarity. Defaults to active low.
42 - vsync-active: Vertical synchronization polarity. Defaults to active low.
43 - pclk-sample: Pixel clock polarity. Defaults to output on the falling edge.
44
45 If none of hsync-active, vsync-active and pclk-sample is specified the
46 endpoint will use embedded BT.656 synchronization.
47
48
49Example:
50
51 hdmi_receiver@4c {
52 compatible = "adi,adv7611";
53 reg = <0x4c>;
54
55 reset-gpios = <&ioexp 0 GPIO_ACTIVE_LOW>;
56 hpd-gpios = <&ioexp 2 GPIO_ACTIVE_HIGH>;
57
58 #address-cells = <1>;
59 #size-cells = <0>;
60
61 port@0 {
62 reg = <0>;
63 };
64 port@1 {
65 reg = <1>;
66 hdmi_in: endpoint {
67 remote-endpoint = <&ccdc_in>;
68 };
69 };
70 };
diff --git a/Documentation/devicetree/bindings/media/renesas,vsp1.txt b/Documentation/devicetree/bindings/media/renesas,vsp1.txt
new file mode 100644
index 000000000000..87fe08abf36d
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/renesas,vsp1.txt
@@ -0,0 +1,43 @@
1* Renesas VSP1 Video Processing Engine
2
3The VSP1 is a video processing engine that supports up-/down-scaling, alpha
4blending, color space conversion and various other image processing features.
5It can be found in the Renesas R-Car second generation SoCs.
6
7Required properties:
8
9 - compatible: Must contain "renesas,vsp1"
10
11 - reg: Base address and length of the registers block for the VSP1.
12 - interrupts: VSP1 interrupt specifier.
13 - clocks: A phandle + clock-specifier pair for the VSP1 functional clock.
14
15 - renesas,#rpf: Number of Read Pixel Formatter (RPF) modules in the VSP1.
16 - renesas,#uds: Number of Up Down Scaler (UDS) modules in the VSP1.
17 - renesas,#wpf: Number of Write Pixel Formatter (WPF) modules in the VSP1.
18
19
20Optional properties:
21
22 - renesas,has-lif: Boolean, indicates that the LCD Interface (LIF) module is
23 available.
24 - renesas,has-lut: Boolean, indicates that the Look Up Table (LUT) module is
25 available.
26 - renesas,has-sru: Boolean, indicates that the Super Resolution Unit (SRU)
27 module is available.
28
29
30Example: R8A7790 (R-Car H2) VSP1-S node
31
32 vsp1@fe928000 {
33 compatible = "renesas,vsp1";
34 reg = <0 0xfe928000 0 0x8000>;
35 interrupts = <0 267 IRQ_TYPE_LEVEL_HIGH>;
36 clocks = <&mstp1_clks R8A7790_CLK_VSP1_S>;
37
38 renesas,has-lut;
39 renesas,has-sru;
40 renesas,#rpf = <5>;
41 renesas,#uds = <3>;
42 renesas,#wpf = <4>;
43 };
diff --git a/Documentation/devicetree/bindings/media/s5p-mfc.txt b/Documentation/devicetree/bindings/media/s5p-mfc.txt
index f4181680831b..3e3c5f349570 100644
--- a/Documentation/devicetree/bindings/media/s5p-mfc.txt
+++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt
@@ -10,7 +10,8 @@ Required properties:
10 - compatible : value should be either one among the following 10 - compatible : value should be either one among the following
11 (a) "samsung,mfc-v5" for MFC v5 present in Exynos4 SoCs 11 (a) "samsung,mfc-v5" for MFC v5 present in Exynos4 SoCs
12 (b) "samsung,mfc-v6" for MFC v6 present in Exynos5 SoCs 12 (b) "samsung,mfc-v6" for MFC v6 present in Exynos5 SoCs
13 (b) "samsung,mfc-v7" for MFC v7 present in Exynos5420 SoC 13 (c) "samsung,mfc-v7" for MFC v7 present in Exynos5420 SoC
14 (d) "samsung,mfc-v8" for MFC v8 present in Exynos5800 SoC
14 15
15 - reg : Physical base address of the IP registers and length of memory 16 - reg : Physical base address of the IP registers and length of memory
16 mapped region. 17 mapped region.
diff --git a/Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt b/Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt
index 653c90c34a71..1ee3bc09f319 100644
--- a/Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt
+++ b/Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt
@@ -6,10 +6,11 @@ The actual devices are instantiated from the child nodes of a Device Bus node.
6 6
7Required properties: 7Required properties:
8 8
9 - compatible: Currently only Armada 370/XP SoC are supported, 9 - compatible: Armada 370/XP SoC are supported using the
10 with this compatible string: 10 "marvell,mvebu-devbus" compatible string.
11 11
12 marvell,mvebu-devbus 12 Orion5x SoC are supported using the
13 "marvell,orion-devbus" compatible string.
13 14
14 - reg: A resource specifier for the register space. 15 - reg: A resource specifier for the register space.
15 This is the base address of a chip select within 16 This is the base address of a chip select within
@@ -22,7 +23,14 @@ Required properties:
22 integer values for each chip-select line in use: 23 integer values for each chip-select line in use:
23 0 <physical address of mapping> <size> 24 0 <physical address of mapping> <size>
24 25
25Mandatory timing properties for child nodes: 26Optional properties:
27
28 - devbus,keep-config This property can optionally be used to keep
29 using the timing parameters set by the
30 bootloader. It makes all the timing properties
31 described below unused.
32
33Timing properties for child nodes:
26 34
27Read parameters: 35Read parameters:
28 36
@@ -30,21 +38,26 @@ Read parameters:
30 drive the AD bus after the completion of a device read. 38 drive the AD bus after the completion of a device read.
31 This prevents contentions on the Device Bus after a read 39 This prevents contentions on the Device Bus after a read
32 cycle from a slow device. 40 cycle from a slow device.
41 Mandatory, except if devbus,keep-config is used.
33 42
34 - devbus,bus-width: Defines the bus width (e.g. <16>) 43 - devbus,bus-width: Defines the bus width, in bits (e.g. <16>).
44 Mandatory, except if devbus,keep-config is used.
35 45
36 - devbus,badr-skew-ps: Defines the time delay from from A[2:0] toggle, 46 - devbus,badr-skew-ps: Defines the time delay from from A[2:0] toggle,
37 to read data sample. This parameter is useful for 47 to read data sample. This parameter is useful for
38 synchronous pipelined devices, where the address 48 synchronous pipelined devices, where the address
39 precedes the read data by one or two cycles. 49 precedes the read data by one or two cycles.
50 Mandatory, except if devbus,keep-config is used.
40 51
41 - devbus,acc-first-ps: Defines the time delay from the negation of 52 - devbus,acc-first-ps: Defines the time delay from the negation of
42 ALE[0] to the cycle that the first read data is sampled 53 ALE[0] to the cycle that the first read data is sampled
43 by the controller. 54 by the controller.
55 Mandatory, except if devbus,keep-config is used.
44 56
45 - devbus,acc-next-ps: Defines the time delay between the cycle that 57 - devbus,acc-next-ps: Defines the time delay between the cycle that
46 samples data N and the cycle that samples data N+1 58 samples data N and the cycle that samples data N+1
47 (in burst accesses). 59 (in burst accesses).
60 Mandatory, except if devbus,keep-config is used.
48 61
49 - devbus,rd-setup-ps: Defines the time delay between DEV_CSn assertion to 62 - devbus,rd-setup-ps: Defines the time delay between DEV_CSn assertion to
50 DEV_OEn assertion. If set to 0 (default), 63 DEV_OEn assertion. If set to 0 (default),
@@ -52,6 +65,8 @@ Read parameters:
52 This parameter has no affect on <acc-first-ps> parameter 65 This parameter has no affect on <acc-first-ps> parameter
53 (no affect on first data sample). Set <rd-setup-ps> 66 (no affect on first data sample). Set <rd-setup-ps>
54 to a value smaller than <acc-first-ps>. 67 to a value smaller than <acc-first-ps>.
68 Mandatory for "marvell,mvebu-devbus" compatible string,
69 except if devbus,keep-config is used.
55 70
56 - devbus,rd-hold-ps: Defines the time between the last data sample to the 71 - devbus,rd-hold-ps: Defines the time between the last data sample to the
57 de-assertion of DEV_CSn. If set to 0 (default), 72 de-assertion of DEV_CSn. If set to 0 (default),
@@ -62,16 +77,20 @@ Read parameters:
62 last data sampled. Also this parameter has no 77 last data sampled. Also this parameter has no
63 affect on <turn-off-ps> parameter. 78 affect on <turn-off-ps> parameter.
64 Set <rd-hold-ps> to a value smaller than <turn-off-ps>. 79 Set <rd-hold-ps> to a value smaller than <turn-off-ps>.
80 Mandatory for "marvell,mvebu-devbus" compatible string,
81 except if devbus,keep-config is used.
65 82
66Write parameters: 83Write parameters:
67 84
68 - devbus,ale-wr-ps: Defines the time delay from the ALE[0] negation cycle 85 - devbus,ale-wr-ps: Defines the time delay from the ALE[0] negation cycle
69 to the DEV_WEn assertion. 86 to the DEV_WEn assertion.
87 Mandatory.
70 88
71 - devbus,wr-low-ps: Defines the time during which DEV_WEn is active. 89 - devbus,wr-low-ps: Defines the time during which DEV_WEn is active.
72 A[2:0] and Data are kept valid as long as DEV_WEn 90 A[2:0] and Data are kept valid as long as DEV_WEn
73 is active. This parameter defines the setup time of 91 is active. This parameter defines the setup time of
74 address and data to DEV_WEn rise. 92 address and data to DEV_WEn rise.
93 Mandatory.
75 94
76 - devbus,wr-high-ps: Defines the time during which DEV_WEn is kept 95 - devbus,wr-high-ps: Defines the time during which DEV_WEn is kept
77 inactive (high) between data beats of a burst write. 96 inactive (high) between data beats of a burst write.
@@ -79,10 +98,13 @@ Write parameters:
79 <wr-high-ps> - <tick> ps. 98 <wr-high-ps> - <tick> ps.
80 This parameter defines the hold time of address and 99 This parameter defines the hold time of address and
81 data after DEV_WEn rise. 100 data after DEV_WEn rise.
101 Mandatory.
82 102
83 - devbus,sync-enable: Synchronous device enable. 103 - devbus,sync-enable: Synchronous device enable.
84 1: True 104 1: True
85 0: False 105 0: False
106 Mandatory for "marvell,mvebu-devbus" compatible string,
107 except if devbus,keep-config is used.
86 108
87An example for an Armada XP GP board, with a 16 MiB NOR device as child 109An example for an Armada XP GP board, with a 16 MiB NOR device as child
88is showed below. Note that the Device Bus driver is in charge of allocating 110is showed below. Note that the Device Bus driver is in charge of allocating
diff --git a/Documentation/devicetree/bindings/mfd/bcm590xx.txt b/Documentation/devicetree/bindings/mfd/bcm590xx.txt
index 1fe30e2b10da..be51a15e05f9 100644
--- a/Documentation/devicetree/bindings/mfd/bcm590xx.txt
+++ b/Documentation/devicetree/bindings/mfd/bcm590xx.txt
@@ -19,7 +19,9 @@ Optional child nodes:
19 The valid regulator node names for BCM59056 are: 19 The valid regulator node names for BCM59056 are:
20 rfldo, camldo1, camldo2, simldo1, simldo2, sdldo, sdxldo, 20 rfldo, camldo1, camldo2, simldo1, simldo2, sdldo, sdxldo,
21 mmcldo1, mmcldo2, audldo, micldo, usbldo, vibldo, 21 mmcldo1, mmcldo2, audldo, micldo, usbldo, vibldo,
22 csr, iosr1, iosr2, msr, sdsr1, sdsr2, vsr 22 csr, iosr1, iosr2, msr, sdsr1, sdsr2, vsr,
23 gpldo1, gpldo2, gpldo3, gpldo4, gpldo5, gpldo6,
24 vbus
23 25
24Example: 26Example:
25 pmu: bcm59056@8 { 27 pmu: bcm59056@8 {
diff --git a/Documentation/devicetree/bindings/mfd/bfticu.txt b/Documentation/devicetree/bindings/mfd/bfticu.txt
new file mode 100644
index 000000000000..65c90776c620
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/bfticu.txt
@@ -0,0 +1,25 @@
1KEYMILE bfticu Chassis Management FPGA
2
3The bfticu is a multifunction device that manages the whole chassis.
4Its main functionality is to collect IRQs from the whole chassis and signals
5them to a single controller.
6
7Required properties:
8- compatible: "keymile,bfticu"
9- interrupt-controller: the bfticu FPGA is an interrupt controller
10- interrupts: the main IRQ line to signal the collected IRQs
11- #interrupt-cells : is 2 and their usage is compliant to the 2 cells variant
12 of Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
13- interrupt-parent: the parent IRQ ctrl the main IRQ is connected to
14- reg: access on the parent local bus (chip select, offset in chip select, size)
15
16Example:
17
18 chassis-mgmt@3,0 {
19 compatible = "keymile,bfticu";
20 interrupt-controller;
21 #interrupt-cells = <2>;
22 reg = <3 0 0x100>;
23 interrupt-parent = <&mpic>;
24 interrupts = <6 1 0 0>;
25 };
diff --git a/Documentation/devicetree/bindings/mfd/mc13xxx.txt b/Documentation/devicetree/bindings/mfd/mc13xxx.txt
index 1413f39912d3..8aba48821a85 100644
--- a/Documentation/devicetree/bindings/mfd/mc13xxx.txt
+++ b/Documentation/devicetree/bindings/mfd/mc13xxx.txt
@@ -10,6 +10,9 @@ Optional properties:
10- fsl,mc13xxx-uses-touch : Indicate the touchscreen controller is being used 10- fsl,mc13xxx-uses-touch : Indicate the touchscreen controller is being used
11 11
12Sub-nodes: 12Sub-nodes:
13- codec: Contain the Audio Codec node.
14 - adc-port: Contain PMIC SSI port number used for ADC.
15 - dac-port: Contain PMIC SSI port number used for DAC.
13- leds : Contain the led nodes and initial register values in property 16- leds : Contain the led nodes and initial register values in property
14 "led-control". Number of register depends of used IC, for MC13783 is 6, 17 "led-control". Number of register depends of used IC, for MC13783 is 6,
15 for MC13892 is 4, for MC34708 is 1. See datasheet for bits definitions of 18 for MC13892 is 4, for MC34708 is 1. See datasheet for bits definitions of
diff --git a/Documentation/devicetree/bindings/mfd/qriox.txt b/Documentation/devicetree/bindings/mfd/qriox.txt
new file mode 100644
index 000000000000..f301e2d4ce76
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/qriox.txt
@@ -0,0 +1,17 @@
1KEYMILE qrio Board Control CPLD
2
3The qrio is a multifunction device that controls the KEYMILE boards based on
4the kmp204x design.
5It is consists of a reset controller, watchdog timer, LEDs, and 2 IRQ capable
6GPIO blocks.
7
8Required properties:
9- compatible: "keymile,qriox"
10- reg: access on the parent local bus (chip select, offset in chip select, size)
11
12Example:
13
14 board-control@1,0 {
15 compatible = "keymile,qriox";
16 reg = <1 0 0x80>;
17 };
diff --git a/Documentation/devicetree/bindings/mfd/s2mps11.txt b/Documentation/devicetree/bindings/mfd/s2mps11.txt
index 802e839b0829..d81ba30c0d8b 100644
--- a/Documentation/devicetree/bindings/mfd/s2mps11.txt
+++ b/Documentation/devicetree/bindings/mfd/s2mps11.txt
@@ -56,6 +56,20 @@ for a particular group of BUCKs. So provide same regulator-ramp-delay<value>.
56Grouping of BUCKs sharing ramp rate setting is as follow : BUCK[1, 6], 56Grouping of BUCKs sharing ramp rate setting is as follow : BUCK[1, 6],
57BUCK[3, 4], and BUCK[7, 8, 10] 57BUCK[3, 4], and BUCK[7, 8, 10]
58 58
59On S2MPS14 the LDO10, LDO11 and LDO12 can be configured to external control
60over GPIO. To turn this feature on this property must be added to the regulator
61sub-node:
62 - samsung,ext-control-gpios: GPIO specifier for one GPIO
63 controlling this regulator (enable/disable);
64Example:
65 LDO12 {
66 regulator-name = "V_EMMC_2.8V";
67 regulator-min-microvolt = <2800000>;
68 regulator-max-microvolt = <2800000>;
69 samsung,ext-control-gpios = <&gpk0 2 0>;
70 };
71
72
59The regulator constraints inside the regulator nodes use the standard regulator 73The regulator constraints inside the regulator nodes use the standard regulator
60bindings which are documented elsewhere. 74bindings which are documented elsewhere.
61 75
diff --git a/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt b/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt
new file mode 100644
index 000000000000..1f5a31fef907
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt
@@ -0,0 +1,59 @@
1* Allwinner PRCM (Power/Reset/Clock Management) Multi-Functional Device
2
3PRCM is an MFD device exposing several Power Management related devices
4(like clks and reset controllers).
5
6Required properties:
7 - compatible: "allwinner,sun6i-a31-prcm"
8 - reg: The PRCM registers range
9
10The prcm node may contain several subdevices definitions:
11 - see Documentation/devicetree/clk/sunxi.txt for clock devices
12 - see Documentation/devicetree/reset/allwinner,sunxi-clock-reset.txt for reset
13 controller devices
14
15
16Example:
17
18 prcm: prcm@01f01400 {
19 compatible = "allwinner,sun6i-a31-prcm";
20 reg = <0x01f01400 0x200>;
21
22 /* Put subdevices here */
23 ar100: ar100_clk {
24 compatible = "allwinner,sun6i-a31-ar100-clk";
25 #clock-cells = <0>;
26 clocks = <&osc32k>, <&osc24M>, <&pll6>, <&pll6>;
27 };
28
29 ahb0: ahb0_clk {
30 compatible = "fixed-factor-clock";
31 #clock-cells = <0>;
32 clock-div = <1>;
33 clock-mult = <1>;
34 clocks = <&ar100_div>;
35 clock-output-names = "ahb0";
36 };
37
38 apb0: apb0_clk {
39 compatible = "allwinner,sun6i-a31-apb0-clk";
40 #clock-cells = <0>;
41 clocks = <&ahb0>;
42 clock-output-names = "apb0";
43 };
44
45 apb0_gates: apb0_gates_clk {
46 compatible = "allwinner,sun6i-a31-apb0-gates-clk";
47 #clock-cells = <1>;
48 clocks = <&apb0>;
49 clock-output-names = "apb0_pio", "apb0_ir",
50 "apb0_timer01", "apb0_p2wi",
51 "apb0_uart", "apb0_1wire",
52 "apb0_i2c";
53 };
54
55 apb0_rst: apb0_rst {
56 compatible = "allwinner,sun6i-a31-clock-reset";
57 #reset-cells = <1>;
58 };
59 };
diff --git a/Documentation/devicetree/bindings/mfd/ti-keystone-devctrl.txt b/Documentation/devicetree/bindings/mfd/ti-keystone-devctrl.txt
new file mode 100644
index 000000000000..20963c76b4bc
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/ti-keystone-devctrl.txt
@@ -0,0 +1,19 @@
1* Device tree bindings for Texas Instruments keystone device state control
2
3The Keystone II devices have a set of registers that are used to control
4the status of its peripherals. This node is intended to allow access to
5this functionality.
6
7Required properties:
8
9- compatible: "ti,keystone-devctrl", "syscon"
10
11- reg: contains offset/length value for device state control
12 registers space.
13
14Example:
15
16devctrl: device-state-control@0x02620000 {
17 compatible = "ti,keystone-devctrl", "syscon";
18 reg = <0x02620000 0x1000>;
19};
diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
index 8e15ec35ac99..b9ee7b98d3e2 100644
--- a/Documentation/devicetree/bindings/mfd/twl4030-power.txt
+++ b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
@@ -5,7 +5,22 @@ to control the power resources, including power scripts. For now, the
5binding only supports the complete shutdown of the system after poweroff. 5binding only supports the complete shutdown of the system after poweroff.
6 6
7Required properties: 7Required properties:
8- compatible : must be "ti,twl4030-power" 8- compatible : must be one of the following
9 "ti,twl4030-power"
10 "ti,twl4030-power-reset"
11 "ti,twl4030-power-idle"
12 "ti,twl4030-power-idle-osc-off"
13
14The use of ti,twl4030-power-reset is recommended at least on
153530 that needs a special configuration for warm reset to work.
16
17When using ti,twl4030-power-idle, the TI recommended configuration
18for idle modes is loaded to the tlw4030 PMIC.
19
20When using ti,twl4030-power-idle-osc-off, the TI recommended
21configuration is used with the external oscillator being shut
22down during off-idle. Note that this does not work on all boards
23depending on how the external oscillator is wired.
9 24
10Optional properties: 25Optional properties:
11- ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or 26- ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or
diff --git a/Documentation/devicetree/bindings/mfd/twl6040.txt b/Documentation/devicetree/bindings/mfd/twl6040.txt
index 0f5dd709d752..a41157b5d930 100644
--- a/Documentation/devicetree/bindings/mfd/twl6040.txt
+++ b/Documentation/devicetree/bindings/mfd/twl6040.txt
@@ -19,6 +19,8 @@ Required properties:
19 19
20Optional properties, nodes: 20Optional properties, nodes:
21- enable-active-high: To power on the twl6040 during boot. 21- enable-active-high: To power on the twl6040 during boot.
22- clocks: phandle to the clk32k clock provider
23- clock-names: Must be "clk32k"
22 24
23Vibra functionality 25Vibra functionality
24Required properties: 26Required properties:
diff --git a/Documentation/devicetree/bindings/misc/arm-charlcd.txt b/Documentation/devicetree/bindings/misc/arm-charlcd.txt
new file mode 100644
index 000000000000..e28e2aac47f1
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/arm-charlcd.txt
@@ -0,0 +1,18 @@
1ARM Versatile Character LCD
2-----------------------------------------------------
3This binding defines the character LCD interface found on ARM Versatile AB
4and PB reference platforms.
5
6Required properties:
7- compatible : "arm,versatile-clcd"
8- reg : Location and size of character LCD registers
9
10Optional properties:
11- interrupts - single interrupt for character LCD. The character LCD can
12 operate in polled mode without an interrupt.
13
14Example:
15 lcd@10008000 {
16 compatible = "arm,versatile-lcd";
17 reg = <0x10008000 0x1000>;
18 };
diff --git a/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt
index b8653ea97957..e5bc49f764d1 100644
--- a/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt
+++ b/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt
@@ -12,7 +12,7 @@ extensions to the Synopsys Designware Mobile Storage Host Controller.
12Required Properties: 12Required Properties:
13 13
14* compatible: should be one of the following. 14* compatible: should be one of the following.
15 - "hisilicon,hi4511-dw-mshc": for controllers with hi4511 specific extentions. 15 - "hisilicon,hi4511-dw-mshc": for controllers with hi4511 specific extensions.
16 16
17Example: 17Example:
18 18
diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt
index 9dce540771fb..3c18001dfd5d 100644
--- a/Documentation/devicetree/bindings/mmc/mmc.txt
+++ b/Documentation/devicetree/bindings/mmc/mmc.txt
@@ -38,6 +38,8 @@ Optional properties:
38- mmc-highspeed-ddr-1_2v: eMMC high-speed DDR mode(1.2V I/O) is supported 38- mmc-highspeed-ddr-1_2v: eMMC high-speed DDR mode(1.2V I/O) is supported
39- mmc-hs200-1_8v: eMMC HS200 mode(1.8V I/O) is supported 39- mmc-hs200-1_8v: eMMC HS200 mode(1.8V I/O) is supported
40- mmc-hs200-1_2v: eMMC HS200 mode(1.2V I/O) is supported 40- mmc-hs200-1_2v: eMMC HS200 mode(1.2V I/O) is supported
41- mmc-hs400-1_8v: eMMC HS400 mode(1.8V I/O) is supported
42- mmc-hs400-1_2v: eMMC HS400 mode(1.2V I/O) is supported
41 43
42*NOTE* on CD and WP polarity. To use common for all SD/MMC host controllers line 44*NOTE* on CD and WP polarity. To use common for all SD/MMC host controllers line
43polarity properties, we have to fix the meaning of the "normal" and "inverted" 45polarity properties, we have to fix the meaning of the "normal" and "inverted"
diff --git a/Documentation/devicetree/bindings/mmc/mmci.txt b/Documentation/devicetree/bindings/mmc/mmci.txt
index 2b584cae352a..03796cf2d3e7 100644
--- a/Documentation/devicetree/bindings/mmc/mmci.txt
+++ b/Documentation/devicetree/bindings/mmc/mmci.txt
@@ -4,12 +4,58 @@ The ARM PrimeCell MMCI PL180 and PL181 provides an interface for
4reading and writing to MultiMedia and SD cards alike. 4reading and writing to MultiMedia and SD cards alike.
5 5
6This file documents differences between the core properties described 6This file documents differences between the core properties described
7by mmc.txt and the properties used by the mmci driver. 7by mmc.txt and the properties used by the mmci driver. Using "st" as
8the prefix for a property, indicates support by the ST Micro variant.
8 9
9Required properties: 10Required properties:
10- compatible : contains "arm,pl18x", "arm,primecell". 11- compatible : contains "arm,pl18x", "arm,primecell".
11- arm,primecell-periphid : contains the PrimeCell Peripheral ID. 12- vmmc-supply : phandle to the regulator device tree node, mentioned
13 as the VCC/VDD supply in the eMMC/SD specs.
12 14
13Optional properties: 15Optional properties:
14- mmc-cap-mmc-highspeed : indicates whether MMC is high speed capable 16- arm,primecell-periphid : contains the PrimeCell Peripheral ID, it overrides
15- mmc-cap-sd-highspeed : indicates whether SD is high speed capable 17 the ID provided by the HW
18- vqmmc-supply : phandle to the regulator device tree node, mentioned
19 as the VCCQ/VDD_IO supply in the eMMC/SD specs.
20- st,sig-dir-dat0 : bus signal direction pin used for DAT[0].
21- st,sig-dir-dat2 : bus signal direction pin used for DAT[2].
22- st,sig-dir-dat31 : bus signal direction pin used for DAT[3] and DAT[1].
23- st,sig-dir-dat74 : bus signal direction pin used for DAT[4] to DAT[7].
24- st,sig-dir-cmd : cmd signal direction pin used for CMD.
25- st,sig-pin-fbclk : feedback clock signal pin used.
26
27Deprecated properties:
28- mmc-cap-mmc-highspeed : indicates whether MMC is high speed capable.
29- mmc-cap-sd-highspeed : indicates whether SD is high speed capable.
30
31Example:
32
33sdi0_per1@80126000 {
34 compatible = "arm,pl18x", "arm,primecell";
35 reg = <0x80126000 0x1000>;
36 interrupts = <0 60 IRQ_TYPE_LEVEL_HIGH>;
37
38 dmas = <&dma 29 0 0x2>, /* Logical - DevToMem */
39 <&dma 29 0 0x0>; /* Logical - MemToDev */
40 dma-names = "rx", "tx";
41
42 clocks = <&prcc_kclk 1 5>, <&prcc_pclk 1 5>;
43 clock-names = "sdi", "apb_pclk";
44
45 max-frequency = <100000000>;
46 bus-width = <4>;
47 cap-sd-highspeed;
48 cap-mmc-highspeed;
49 cd-gpios = <&gpio2 31 0x4>; // 95
50 st,sig-dir-dat0;
51 st,sig-dir-dat2;
52 st,sig-dir-cmd;
53 st,sig-pin-fbclk;
54
55 vmmc-supply = <&ab8500_ldo_aux3_reg>;
56 vqmmc-supply = <&vmmci>;
57
58 pinctrl-names = "default", "sleep";
59 pinctrl-0 = <&sdi0_default_mode>;
60 pinctrl-1 = <&sdi0_sleep_mode>;
61};
diff --git a/Documentation/devicetree/bindings/mmc/moxa,moxart-mmc.txt b/Documentation/devicetree/bindings/mmc/moxa,moxart-mmc.txt
new file mode 100644
index 000000000000..b63819149f22
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/moxa,moxart-mmc.txt
@@ -0,0 +1,30 @@
1MOXA ART MMC Host Controller Interface
2
3 Inherits from mmc binding[1].
4
5 [1] Documentation/devicetree/bindings/mmc/mmc.txt
6
7Required properties:
8
9- compatible : Must be "moxa,moxart-mmc" or "faraday,ftsdc010"
10- reg : Should contain registers location and length
11- interrupts : Should contain the interrupt number
12- clocks : Should contain phandle for the clock feeding the MMC controller
13
14Optional properties:
15
16- dmas : Should contain two DMA channels, line request number must be 5 for
17 both channels
18- dma-names : Must be "tx", "rx"
19
20Example:
21
22 mmc: mmc@98e00000 {
23 compatible = "moxa,moxart-mmc";
24 reg = <0x98e00000 0x5C>;
25 interrupts = <5 0>;
26 clocks = <&clk_apb>;
27 dmas = <&dma 5>,
28 <&dma 5>;
29 dma-names = "tx", "rx";
30 };
diff --git a/Documentation/devicetree/bindings/mmc/samsung-sdhci.txt b/Documentation/devicetree/bindings/mmc/samsung-sdhci.txt
index 328e990d2546..42e0a9afa100 100644
--- a/Documentation/devicetree/bindings/mmc/samsung-sdhci.txt
+++ b/Documentation/devicetree/bindings/mmc/samsung-sdhci.txt
@@ -3,7 +3,7 @@
3Samsung's SDHCI controller is used as a connectivity interface with external 3Samsung's SDHCI controller is used as a connectivity interface with external
4MMC, SD and eMMC storage mediums. This file documents differences between the 4MMC, SD and eMMC storage mediums. This file documents differences between the
5core mmc properties described by mmc.txt and the properties used by the 5core mmc properties described by mmc.txt and the properties used by the
6Samsung implmentation of the SDHCI controller. 6Samsung implementation of the SDHCI controller.
7 7
8Required SoC Specific Properties: 8Required SoC Specific Properties:
9- compatible: should be one of the following 9- compatible: should be one of the following
diff --git a/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt b/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt
new file mode 100644
index 000000000000..91b3a3467150
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt
@@ -0,0 +1,43 @@
1* Allwinner sunxi MMC controller
2
3The highspeed MMC host controller on Allwinner SoCs provides an interface
4for MMC, SD and SDIO types of memory cards.
5
6Supported maximum speeds are the ones of the eMMC standard 4.5 as well
7as the speed of SD standard 3.0.
8Absolute maximum transfer rate is 200MB/s
9
10Required properties:
11 - compatible : "allwinner,sun4i-a10-mmc" or "allwinner,sun5i-a13-mmc"
12 - reg : mmc controller base registers
13 - clocks : a list with 2 phandle + clock specifier pairs
14 - clock-names : must contain "ahb" and "mmc"
15 - interrupts : mmc controller interrupt
16
17Optional properties:
18 - resets : phandle + reset specifier pair
19 - reset-names : must contain "ahb"
20 - for cd, bus-width and additional generic mmc parameters
21 please refer to mmc.txt within this directory
22
23Examples:
24 - Within .dtsi:
25 mmc0: mmc@01c0f000 {
26 compatible = "allwinner,sun5i-a13-mmc";
27 reg = <0x01c0f000 0x1000>;
28 clocks = <&ahb_gates 8>, <&mmc0_clk>;
29 clock-names = "ahb", "mod";
30 interrupts = <0 32 4>;
31 status = "disabled";
32 };
33
34 - Within dts:
35 mmc0: mmc@01c0f000 {
36 pinctrl-names = "default", "default";
37 pinctrl-0 = <&mmc0_pins_a>;
38 pinctrl-1 = <&mmc0_cd_pin_reference_design>;
39 bus-width = <4>;
40 cd-gpios = <&pio 7 1 0>; /* PH1 */
41 cd-inverted;
42 status = "okay";
43 };
diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
index 8f3f13315358..2d4a7258a10d 100644
--- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
+++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt
@@ -69,10 +69,6 @@ Optional properties:
69 69
70* supports-highspeed: Enables support for high speed cards (up to 50MHz) 70* supports-highspeed: Enables support for high speed cards (up to 50MHz)
71 71
72* caps2-mmc-hs200-1_8v: Supports mmc HS200 SDR 1.8V mode
73
74* caps2-mmc-hs200-1_2v: Supports mmc HS200 SDR 1.2V mode
75
76* broken-cd: as documented in mmc core bindings. 72* broken-cd: as documented in mmc core bindings.
77 73
78* vmmc-supply: The phandle to the regulator to use for vmmc. If this is 74* vmmc-supply: The phandle to the regulator to use for vmmc. If this is
@@ -103,7 +99,6 @@ board specific portions as listed below.
103 clock-freq-min-max = <400000 200000000>; 99 clock-freq-min-max = <400000 200000000>;
104 num-slots = <1>; 100 num-slots = <1>;
105 supports-highspeed; 101 supports-highspeed;
106 caps2-mmc-hs200-1_8v;
107 broken-cd; 102 broken-cd;
108 fifo-depth = <0x80>; 103 fifo-depth = <0x80>;
109 card-detect-delay = <200>; 104 card-detect-delay = <200>;
diff --git a/Documentation/devicetree/bindings/mmc/usdhi6rol0.txt b/Documentation/devicetree/bindings/mmc/usdhi6rol0.txt
new file mode 100644
index 000000000000..8babdaa8623b
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/usdhi6rol0.txt
@@ -0,0 +1,33 @@
1* Renesas usdhi6rol0 SD/SDIO host controller
2
3Required properties:
4
5- compatible: must be
6 "renesas,usdhi6rol0"
7- interrupts: 3 interrupts, named "card detect", "data" and "SDIO" must be
8 specified
9- clocks: a clock binding for the IMCLK input
10
11Optional properties:
12
13- vmmc-supply: a phandle of a regulator, supplying Vcc to the card
14- vqmmc-supply: a phandle of a regulator, supplying VccQ to the card
15
16Additionally any standard mmc bindings from mmc.txt can be used.
17
18Example:
19
20sd0: sd@ab000000 {
21 compatible = "renesas,usdhi6rol0";
22 reg = <0xab000000 0x200>;
23 interrupts = <0 23 0x4
24 0 24 0x4
25 0 25 0x4>;
26 interrupt-names = "card detect", "data", "SDIO";
27 bus-width = <4>;
28 max-frequency = <50000000>;
29 cap-power-off-card;
30 clocks = <&imclk>;
31 vmmc-supply = <&vcc_sd0>;
32 vqmmc-supply = <&vccq_sd0>;
33};
diff --git a/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt b/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
new file mode 100644
index 000000000000..823d13412195
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
@@ -0,0 +1,35 @@
1* Freescale Quad Serial Peripheral Interface(QuadSPI)
2
3Required properties:
4 - compatible : Should be "fsl,vf610-qspi"
5 - reg : the first contains the register location and length,
6 the second contains the memory mapping address and length
7 - reg-names: Should contain the reg names "QuadSPI" and "QuadSPI-memory"
8 - interrupts : Should contain the interrupt for the device
9 - clocks : The clocks needed by the QuadSPI controller
10 - clock-names : the name of the clocks
11
12Optional properties:
13 - fsl,qspi-has-second-chip: The controller has two buses, bus A and bus B.
14 Each bus can be connected with two NOR flashes.
15 Most of the time, each bus only has one NOR flash
16 connected, this is the default case.
17 But if there are two NOR flashes connected to the
18 bus, you should enable this property.
19 (Please check the board's schematic.)
20
21Example:
22
23qspi0: quadspi@40044000 {
24 compatible = "fsl,vf610-qspi";
25 reg = <0x40044000 0x1000>, <0x20000000 0x10000000>;
26 reg-names = "QuadSPI", "QuadSPI-memory";
27 interrupts = <0 24 IRQ_TYPE_LEVEL_HIGH>;
28 clocks = <&clks VF610_CLK_QSPI0_EN>,
29 <&clks VF610_CLK_QSPI0>;
30 clock-names = "qspi_en", "qspi";
31
32 flash0: s25fl128s@0 {
33 ....
34 };
35};
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
index 5e1f31b5ff70..65f4f7c43136 100644
--- a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
@@ -28,6 +28,8 @@ Optional properties:
28 "ham1" 1-bit Hamming ecc code 28 "ham1" 1-bit Hamming ecc code
29 "bch4" 4-bit BCH ecc code 29 "bch4" 4-bit BCH ecc code
30 "bch8" 8-bit BCH ecc code 30 "bch8" 8-bit BCH ecc code
31 "bch16" 16-bit BCH ECC code
32 Refer below "How to select correct ECC scheme for your device ?"
31 33
32 - ti,nand-xfer-type: A string setting the data transfer type. One of: 34 - ti,nand-xfer-type: A string setting the data transfer type. One of:
33 35
@@ -43,7 +45,7 @@ Optional properties:
43 ELM hardware engines should specify this device node in .dtsi 45 ELM hardware engines should specify this device node in .dtsi
44 Using ELM for ECC error correction frees some CPU cycles. 46 Using ELM for ECC error correction frees some CPU cycles.
45 47
46For inline partiton table parsing (optional): 48For inline partition table parsing (optional):
47 49
48 - #address-cells: should be set to 1 50 - #address-cells: should be set to 1
49 - #size-cells: should be set to 1 51 - #size-cells: should be set to 1
@@ -90,3 +92,46 @@ Example for an AM33xx board:
90 }; 92 };
91 }; 93 };
92 94
95How to select correct ECC scheme for your device ?
96--------------------------------------------------
97Higher ECC scheme usually means better protection against bit-flips and
98increased system lifetime. However, selection of ECC scheme is dependent
99on various other factors also like;
100
101(1) support of built in hardware engines.
102 Some legacy OMAP SoC do not have ELM harware engine, so those SoC cannot
103 support ecc-schemes with hardware error-correction (BCHx_HW). However
104 such SoC can use ecc-schemes with software library for error-correction
105 (BCHx_HW_DETECTION_SW). The error correction capability with software
106 library remains equivalent to their hardware counter-part, but there is
107 slight CPU penalty when too many bit-flips are detected during reads.
108
109(2) Device parameters like OOBSIZE.
110 Other factor which governs the selection of ecc-scheme is oob-size.
111 Higher ECC schemes require more OOB/Spare area to store ECC syndrome,
112 so the device should have enough free bytes available its OOB/Spare
113 area to accomodate ECC for entire page. In general following expression
114 helps in determining if given device can accomodate ECC syndrome:
115 "2 + (PAGESIZE / 512) * ECC_BYTES" >= OOBSIZE"
116 where
117 OOBSIZE number of bytes in OOB/spare area
118 PAGESIZE number of bytes in main-area of device page
119 ECC_BYTES number of ECC bytes generated to protect
120 512 bytes of data, which is:
121 '3' for HAM1_xx ecc schemes
122 '7' for BCH4_xx ecc schemes
123 '14' for BCH8_xx ecc schemes
124 '26' for BCH16_xx ecc schemes
125
126 Example(a): For a device with PAGESIZE = 2048 and OOBSIZE = 64 and
127 trying to use BCH16 (ECC_BYTES=26) ecc-scheme.
128 Number of ECC bytes per page = (2 + (2048 / 512) * 26) = 106 B
129 which is greater than capacity of NAND device (OOBSIZE=64)
130 Hence, BCH16 cannot be supported on given device. But it can
131 probably use lower ecc-schemes like BCH8.
132
133 Example(b): For a device with PAGESIZE = 2048 and OOBSIZE = 128 and
134 trying to use BCH16 (ECC_BYTES=26) ecc-scheme.
135 Number of ECC bytes per page = (2 + (2048 / 512) * 26) = 106 B
136 which can be accomodate in the OOB/Spare area of this device
137 (OOBSIZE=128). So this device can use BCH16 ecc-scheme.
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-nor.txt b/Documentation/devicetree/bindings/mtd/gpmc-nor.txt
index 420b3ab18890..4828c17bb784 100644
--- a/Documentation/devicetree/bindings/mtd/gpmc-nor.txt
+++ b/Documentation/devicetree/bindings/mtd/gpmc-nor.txt
@@ -30,7 +30,7 @@ Optional properties:
30- gpmc,XXX Additional GPMC timings and settings parameters. See 30- gpmc,XXX Additional GPMC timings and settings parameters. See
31 Documentation/devicetree/bindings/bus/ti-gpmc.txt 31 Documentation/devicetree/bindings/bus/ti-gpmc.txt
32 32
33Optional properties for partiton table parsing: 33Optional properties for partition table parsing:
34- #address-cells: should be set to 1 34- #address-cells: should be set to 1
35- #size-cells: should be set to 1 35- #size-cells: should be set to 1
36 36
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt b/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt
index b7529424ac88..5d8fa527c496 100644
--- a/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt
+++ b/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt
@@ -17,7 +17,7 @@ Optional properties:
17 17
18 - dma-channel: DMA Channel index 18 - dma-channel: DMA Channel index
19 19
20For inline partiton table parsing (optional): 20For inline partition table parsing (optional):
21 21
22 - #address-cells: should be set to 1 22 - #address-cells: should be set to 1
23 - #size-cells: should be set to 1 23 - #size-cells: should be set to 1
diff --git a/Documentation/devicetree/bindings/mtd/m25p80.txt b/Documentation/devicetree/bindings/mtd/m25p80.txt
index 6d3d57609470..4611aa83531b 100644
--- a/Documentation/devicetree/bindings/mtd/m25p80.txt
+++ b/Documentation/devicetree/bindings/mtd/m25p80.txt
@@ -5,8 +5,8 @@ Required properties:
5 representing partitions. 5 representing partitions.
6- compatible : Should be the manufacturer and the name of the chip. Bear in mind 6- compatible : Should be the manufacturer and the name of the chip. Bear in mind
7 the DT binding is not Linux-only, but in case of Linux, see the 7 the DT binding is not Linux-only, but in case of Linux, see the
8 "m25p_ids" table in drivers/mtd/devices/m25p80.c for the list of 8 "spi_nor_ids" table in drivers/mtd/spi-nor/spi-nor.c for the list
9 supported chips. 9 of supported chips.
10- reg : Chip-Select number 10- reg : Chip-Select number
11- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at 11- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
12 12
diff --git a/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt b/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
index 86e0a5601ff5..de8b517a5521 100644
--- a/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt
@@ -17,6 +17,14 @@ Optional properties:
17 - num-cs: Number of chipselect lines to usw 17 - num-cs: Number of chipselect lines to usw
18 - nand-on-flash-bbt: boolean to enable on flash bbt option if 18 - nand-on-flash-bbt: boolean to enable on flash bbt option if
19 not present false 19 not present false
20 - nand-ecc-strength: number of bits to correct per ECC step
21 - nand-ecc-step-size: number of data bytes covered by a single ECC step
22
23The following ECC strength and step size are currently supported:
24
25 - nand-ecc-strength = <1>, nand-ecc-step-size = <512>
26 - nand-ecc-strength = <4>, nand-ecc-step-size = <512>
27 - nand-ecc-strength = <8>, nand-ecc-step-size = <512>
20 28
21Example: 29Example:
22 30
diff --git a/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt b/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt
new file mode 100644
index 000000000000..d01ed63d3ebb
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt
@@ -0,0 +1,17 @@
1* AMD 10GbE PHY driver (amd-xgbe-phy)
2
3Required properties:
4- compatible: Should be "amd,xgbe-phy-seattle-v1a" and
5 "ethernet-phy-ieee802.3-c45"
6- reg: Address and length of the register sets for the device
7 - SerDes Rx/Tx registers
8 - SerDes integration registers (1/2)
9 - SerDes integration registers (2/2)
10
11Example:
12 xgbe_phy@e1240800 {
13 compatible = "amd,xgbe-phy-seattle-v1a", "ethernet-phy-ieee802.3-c45";
14 reg = <0 0xe1240800 0 0x00400>,
15 <0 0xe1250000 0 0x00060>,
16 <0 0xe1250080 0 0x00004>;
17 };
diff --git a/Documentation/devicetree/bindings/net/amd-xgbe.txt b/Documentation/devicetree/bindings/net/amd-xgbe.txt
new file mode 100644
index 000000000000..ea0c7908a3b8
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/amd-xgbe.txt
@@ -0,0 +1,34 @@
1* AMD 10GbE driver (amd-xgbe)
2
3Required properties:
4- compatible: Should be "amd,xgbe-seattle-v1a"
5- reg: Address and length of the register sets for the device
6 - MAC registers
7 - PCS registers
8- interrupt-parent: Should be the phandle for the interrupt controller
9 that services interrupts for this device
10- interrupts: Should contain the amd-xgbe interrupt
11- clocks: Should be the DMA clock for the amd-xgbe device (used for
12 calculating the correct Rx interrupt watchdog timer value on a DMA
13 channel for coalescing)
14- clock-names: Should be the name of the DMA clock, "dma_clk"
15- phy-handle: See ethernet.txt file in the same directory
16- phy-mode: See ethernet.txt file in the same directory
17
18Optional properties:
19- mac-address: mac address to be assigned to the device. Can be overridden
20 by UEFI.
21
22Example:
23 xgbe@e0700000 {
24 compatible = "amd,xgbe-seattle-v1a";
25 reg = <0 0xe0700000 0 0x80000>,
26 <0 0xe0780000 0 0x80000>;
27 interrupt-parent = <&gic>;
28 interrupts = <0 325 4>;
29 clocks = <&xgbe_clk>;
30 clock-names = "dma_clk";
31 phy-handle = <&phy>;
32 phy-mode = "xgmii";
33 mac-address = [ 02 a1 a2 a3 a4 a5 ];
34 };
diff --git a/Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt b/Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt
index f2febb94550e..451fef26b4df 100644
--- a/Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt
+++ b/Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt
@@ -24,7 +24,7 @@ Optional properties:
24- fixed-link: When the GENET interface is connected to a MoCA hardware block or 24- fixed-link: When the GENET interface is connected to a MoCA hardware block or
25 when operating in a RGMII to RGMII type of connection, or when the MDIO bus is 25 when operating in a RGMII to RGMII type of connection, or when the MDIO bus is
26 voluntarily disabled, this property should be used to describe the "fixed link". 26 voluntarily disabled, this property should be used to describe the "fixed link".
27 See Documentation/devicetree/bindings/net/fsl-tsec-phy.txt for information on 27 See Documentation/devicetree/bindings/net/fixed-link.txt for information on
28 the property specifics 28 the property specifics
29 29
30Required child nodes: 30Required child nodes:
diff --git a/Documentation/devicetree/bindings/net/broadcom-systemport.txt b/Documentation/devicetree/bindings/net/broadcom-systemport.txt
new file mode 100644
index 000000000000..c183ea90d9bc
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/broadcom-systemport.txt
@@ -0,0 +1,29 @@
1* Broadcom BCM7xxx Ethernet Systemport Controller (SYSTEMPORT)
2
3Required properties:
4- compatible: should be one of "brcm,systemport-v1.00" or "brcm,systemport"
5- reg: address and length of the register set for the device.
6- interrupts: interrupts for the device, first cell must be for the the rx
7 interrupts, and the second cell should be for the transmit queues
8- local-mac-address: Ethernet MAC address (48 bits) of this adapter
9- phy-mode: Should be a string describing the PHY interface to the
10 Ethernet switch/PHY, see Documentation/devicetree/bindings/net/ethernet.txt
11- fixed-link: see Documentation/devicetree/bindings/net/fixed-link.txt for
12 the property specific details
13
14Optional properties:
15- systemport,num-tier2-arb: number of tier 2 arbiters, an integer
16- systemport,num-tier1-arb: number of tier 1 arbiters, an integer
17- systemport,num-txq: number of HW transmit queues, an integer
18- systemport,num-rxq: number of HW receive queues, an integer
19
20Example:
21ethernet@f04a0000 {
22 compatible = "brcm,systemport-v1.00";
23 reg = <0xf04a0000 0x4650>;
24 local-mac-address = [ 00 11 22 33 44 55 ];
25 fixed-link = <0 1 1000 0 0>;
26 phy-mode = "gmii";
27 interrupts = <0x0 0x16 0x0>,
28 <0x0 0x17 0x0>;
29};
diff --git a/Documentation/devicetree/bindings/net/can/xilinx_can.txt b/Documentation/devicetree/bindings/net/can/xilinx_can.txt
new file mode 100644
index 000000000000..fe38847d8e26
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/xilinx_can.txt
@@ -0,0 +1,44 @@
1Xilinx Axi CAN/Zynq CANPS controller Device Tree Bindings
2---------------------------------------------------------
3
4Required properties:
5- compatible : Should be "xlnx,zynq-can-1.0" for Zynq CAN
6 controllers and "xlnx,axi-can-1.00.a" for Axi CAN
7 controllers.
8- reg : Physical base address and size of the Axi CAN/Zynq
9 CANPS registers map.
10- interrupts : Property with a value describing the interrupt
11 number.
12- interrupt-parent : Must be core interrupt controller
13- clock-names : List of input clock names - "can_clk", "pclk"
14 (For CANPS), "can_clk" , "s_axi_aclk"(For AXI CAN)
15 (See clock bindings for details).
16- clocks : Clock phandles (see clock bindings for details).
17- tx-fifo-depth : Can Tx fifo depth.
18- rx-fifo-depth : Can Rx fifo depth.
19
20
21Example:
22
23For Zynq CANPS Dts file:
24 zynq_can_0: can@e0008000 {
25 compatible = "xlnx,zynq-can-1.0";
26 clocks = <&clkc 19>, <&clkc 36>;
27 clock-names = "can_clk", "pclk";
28 reg = <0xe0008000 0x1000>;
29 interrupts = <0 28 4>;
30 interrupt-parent = <&intc>;
31 tx-fifo-depth = <0x40>;
32 rx-fifo-depth = <0x40>;
33 };
34For Axi CAN Dts file:
35 axi_can_0: axi-can@40000000 {
36 compatible = "xlnx,axi-can-1.00.a";
37 clocks = <&clkc 0>, <&clkc 1>;
38 clock-names = "can_clk","s_axi_aclk" ;
39 reg = <0x40000000 0x10000>;
40 interrupt-parent = <&intc>;
41 interrupts = <0 59 1>;
42 tx-fifo-depth = <0x40>;
43 rx-fifo-depth = <0x40>;
44 };
diff --git a/Documentation/devicetree/bindings/net/cpsw-phy-sel.txt b/Documentation/devicetree/bindings/net/cpsw-phy-sel.txt
index 7ff57a119f81..764c0c79b43d 100644
--- a/Documentation/devicetree/bindings/net/cpsw-phy-sel.txt
+++ b/Documentation/devicetree/bindings/net/cpsw-phy-sel.txt
@@ -2,7 +2,9 @@ TI CPSW Phy mode Selection Device Tree Bindings
2----------------------------------------------- 2-----------------------------------------------
3 3
4Required properties: 4Required properties:
5- compatible : Should be "ti,am3352-cpsw-phy-sel" 5- compatible : Should be "ti,am3352-cpsw-phy-sel" for am335x platform and
6 "ti,dra7xx-cpsw-phy-sel" for dra7xx platform
7 "ti,am43xx-cpsw-phy-sel" for am43xx platform
6- reg : physical base address and size of the cpsw 8- reg : physical base address and size of the cpsw
7 registers map 9 registers map
8- reg-names : names of the register map given in "reg" node 10- reg-names : names of the register map given in "reg" node
diff --git a/Documentation/devicetree/bindings/net/fixed-link.txt b/Documentation/devicetree/bindings/net/fixed-link.txt
new file mode 100644
index 000000000000..82bf7e0f47b6
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/fixed-link.txt
@@ -0,0 +1,42 @@
1Fixed link Device Tree binding
2------------------------------
3
4Some Ethernet MACs have a "fixed link", and are not connected to a
5normal MDIO-managed PHY device. For those situations, a Device Tree
6binding allows to describe a "fixed link".
7
8Such a fixed link situation is described by creating a 'fixed-link'
9sub-node of the Ethernet MAC device node, with the following
10properties:
11
12* 'speed' (integer, mandatory), to indicate the link speed. Accepted
13 values are 10, 100 and 1000
14* 'full-duplex' (boolean, optional), to indicate that full duplex is
15 used. When absent, half duplex is assumed.
16* 'pause' (boolean, optional), to indicate that pause should be
17 enabled.
18* 'asym-pause' (boolean, optional), to indicate that asym_pause should
19 be enabled.
20
21Old, deprecated 'fixed-link' binding:
22
23* A 'fixed-link' property in the Ethernet MAC node, with 5 cells, of the
24 form <a b c d e> with the following accepted values:
25 - a: emulated PHY ID, choose any but but unique to the all specified
26 fixed-links, from 0 to 31
27 - b: duplex configuration: 0 for half duplex, 1 for full duplex
28 - c: link speed in Mbits/sec, accepted values are: 10, 100 and 1000
29 - d: pause configuration: 0 for no pause, 1 for pause
30 - e: asymmetric pause configuration: 0 for no asymmetric pause, 1 for
31 asymmetric pause
32
33Example:
34
35ethernet@0 {
36 ...
37 fixed-link {
38 speed = <1000>;
39 full-duplex;
40 };
41 ...
42};
diff --git a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
index 737cdef4f903..be6ea8960f20 100644
--- a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
+++ b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
@@ -42,10 +42,7 @@ Properties:
42 interrupt. For TSEC and eTSEC devices, the first interrupt is 42 interrupt. For TSEC and eTSEC devices, the first interrupt is
43 transmit, the second is receive, and the third is error. 43 transmit, the second is receive, and the third is error.
44 - phy-handle : See ethernet.txt file in the same directory. 44 - phy-handle : See ethernet.txt file in the same directory.
45 - fixed-link : <a b c d e> where a is emulated phy id - choose any, 45 - fixed-link : See fixed-link.txt in the same directory.
46 but unique to the all specified fixed-links, b is duplex - 0 half,
47 1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no
48 pause, 1 pause, e is asym_pause - 0 no asym_pause, 1 asym_pause.
49 - phy-connection-type : See ethernet.txt file in the same directory. 46 - phy-connection-type : See ethernet.txt file in the same directory.
50 This property is only really needed if the connection is of type 47 This property is only really needed if the connection is of type
51 "rgmii-id", as all other connection types are detected by hardware. 48 "rgmii-id", as all other connection types are detected by hardware.
diff --git a/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt b/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt
new file mode 100644
index 000000000000..75d398bb1fbb
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt
@@ -0,0 +1,36 @@
1Hisilicon hix5hd2 gmac controller
2
3Required properties:
4- compatible: should be "hisilicon,hix5hd2-gmac".
5- reg: specifies base physical address(s) and size of the device registers.
6 The first region is the MAC register base and size.
7 The second region is external interface control register.
8- interrupts: should contain the MAC interrupt.
9- #address-cells: must be <1>.
10- #size-cells: must be <0>.
11- phy-mode: see ethernet.txt [1].
12- phy-handle: see ethernet.txt [1].
13- mac-address: see ethernet.txt [1].
14- clocks: clock phandle and specifier pair.
15
16- PHY subnode: inherits from phy binding [2]
17
18[1] Documentation/devicetree/bindings/net/ethernet.txt
19[2] Documentation/devicetree/bindings/net/phy.txt
20
21Example:
22 gmac0: ethernet@f9840000 {
23 compatible = "hisilicon,hix5hd2-gmac";
24 reg = <0xf9840000 0x1000>,<0xf984300c 0x4>;
25 interrupts = <0 71 4>;
26 #address-cells = <1>;
27 #size-cells = <0>;
28 phy-mode = "mii";
29 phy-handle = <&phy2>;
30 mac-address = [00 00 00 00 00 00];
31 clocks = <&clock HIX5HD2_MAC0_CLK>;
32
33 phy2: ethernet-phy@2 {
34 reg = <2>;
35 };
36 };
diff --git a/Documentation/devicetree/bindings/net/ieee802154/at86rf230.txt b/Documentation/devicetree/bindings/net/ieee802154/at86rf230.txt
new file mode 100644
index 000000000000..d3bbdded4cbe
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/ieee802154/at86rf230.txt
@@ -0,0 +1,23 @@
1* AT86RF230 IEEE 802.15.4 *
2
3Required properties:
4 - compatible: should be "atmel,at86rf230", "atmel,at86rf231",
5 "atmel,at86rf233" or "atmel,at86rf212"
6 - spi-max-frequency: maximal bus speed, should be set to 7500000 depends
7 sync or async operation mode
8 - reg: the chipselect index
9 - interrupts: the interrupt generated by the device
10
11Optional properties:
12 - reset-gpio: GPIO spec for the rstn pin
13 - sleep-gpio: GPIO spec for the slp_tr pin
14
15Example:
16
17 at86rf231@0 {
18 compatible = "atmel,at86rf231";
19 spi-max-frequency = <7500000>;
20 reg = <0>;
21 interrupts = <19 1>;
22 interrupt-parent = <&gpio3>;
23 };
diff --git a/Documentation/devicetree/bindings/net/mdio-gpio.txt b/Documentation/devicetree/bindings/net/mdio-gpio.txt
index c79bab025369..8dbcf8295c6c 100644
--- a/Documentation/devicetree/bindings/net/mdio-gpio.txt
+++ b/Documentation/devicetree/bindings/net/mdio-gpio.txt
@@ -14,7 +14,7 @@ node.
14Example: 14Example:
15 15
16aliases { 16aliases {
17 mdio-gpio0 = <&mdio0>; 17 mdio-gpio0 = &mdio0;
18}; 18};
19 19
20mdio0: mdio { 20mdio0: mdio {
diff --git a/Documentation/devicetree/bindings/net/micrel-ks8851.txt b/Documentation/devicetree/bindings/net/micrel-ks8851.txt
index d54d0cc79487..bbdf9a7359a2 100644
--- a/Documentation/devicetree/bindings/net/micrel-ks8851.txt
+++ b/Documentation/devicetree/bindings/net/micrel-ks8851.txt
@@ -1,9 +1,18 @@
1Micrel KS8851 Ethernet mac 1Micrel KS8851 Ethernet mac (MLL)
2 2
3Required properties: 3Required properties:
4- compatible = "micrel,ks8851-ml" of parallel interface 4- compatible = "micrel,ks8851-mll" of parallel interface
5- reg : 2 physical address and size of registers for data and command 5- reg : 2 physical address and size of registers for data and command
6- interrupts : interrupt connection 6- interrupts : interrupt connection
7 7
8Micrel KS8851 Ethernet mac (SPI)
9
10Required properties:
11- compatible = "micrel,ks8851" or the deprecated "ks8851"
12- reg : chip select number
13- interrupts : interrupt connection
14
8Optional properties: 15Optional properties:
9- vdd-supply: supply for Ethernet mac 16- vdd-supply: analog 3.3V supply for Ethernet mac
17- vdd-io-supply: digital 1.8V IO supply for Ethernet mac
18- reset-gpios: reset_n input pin
diff --git a/Documentation/devicetree/bindings/net/micrel-ksz9021.txt b/Documentation/devicetree/bindings/net/micrel-ksz9021.txt
deleted file mode 100644
index 997a63f1aea1..000000000000
--- a/Documentation/devicetree/bindings/net/micrel-ksz9021.txt
+++ /dev/null
@@ -1,49 +0,0 @@
1Micrel KSZ9021 Gigabit Ethernet PHY
2
3Some boards require special tuning values, particularly when it comes to
4clock delays. You can specify clock delay values by adding
5micrel-specific properties to an Ethernet OF device node.
6
7All skew control options are specified in picoseconds. The minimum
8value is 0, and the maximum value is 3000.
9
10Optional properties:
11 - rxc-skew-ps : Skew control of RXC pad
12 - rxdv-skew-ps : Skew control of RX CTL pad
13 - txc-skew-ps : Skew control of TXC pad
14 - txen-skew-ps : Skew control of TX_CTL pad
15 - rxd0-skew-ps : Skew control of RX data 0 pad
16 - rxd1-skew-ps : Skew control of RX data 1 pad
17 - rxd2-skew-ps : Skew control of RX data 2 pad
18 - rxd3-skew-ps : Skew control of RX data 3 pad
19 - txd0-skew-ps : Skew control of TX data 0 pad
20 - txd1-skew-ps : Skew control of TX data 1 pad
21 - txd2-skew-ps : Skew control of TX data 2 pad
22 - txd3-skew-ps : Skew control of TX data 3 pad
23
24Examples:
25
26 /* Attach to an Ethernet device with autodetected PHY */
27 &enet {
28 rxc-skew-ps = <3000>;
29 rxdv-skew-ps = <0>;
30 txc-skew-ps = <3000>;
31 txen-skew-ps = <0>;
32 status = "okay";
33 };
34
35 /* Attach to an explicitly-specified PHY */
36 mdio {
37 phy0: ethernet-phy@0 {
38 rxc-skew-ps = <3000>;
39 rxdv-skew-ps = <0>;
40 txc-skew-ps = <3000>;
41 txen-skew-ps = <0>;
42 reg = <0>;
43 };
44 };
45 ethernet@70000 {
46 status = "okay";
47 phy = <&phy0>;
48 phy-mode = "rgmii-id";
49 };
diff --git a/Documentation/devicetree/bindings/net/micrel-ksz90x1.txt b/Documentation/devicetree/bindings/net/micrel-ksz90x1.txt
new file mode 100644
index 000000000000..692076fda0e5
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/micrel-ksz90x1.txt
@@ -0,0 +1,83 @@
1Micrel KSZ9021/KSZ9031 Gigabit Ethernet PHY
2
3Some boards require special tuning values, particularly when it comes to
4clock delays. You can specify clock delay values by adding
5micrel-specific properties to an Ethernet OF device node.
6
7Note that these settings are applied after any phy-specific fixup from
8phy_fixup_list (see phy_init_hw() from drivers/net/phy/phy_device.c),
9and therefore may overwrite them.
10
11KSZ9021:
12
13 All skew control options are specified in picoseconds. The minimum
14 value is 0, the maximum value is 3000, and it is incremented by 200ps
15 steps.
16
17 Optional properties:
18
19 - rxc-skew-ps : Skew control of RXC pad
20 - rxdv-skew-ps : Skew control of RX CTL pad
21 - txc-skew-ps : Skew control of TXC pad
22 - txen-skew-ps : Skew control of TX CTL pad
23 - rxd0-skew-ps : Skew control of RX data 0 pad
24 - rxd1-skew-ps : Skew control of RX data 1 pad
25 - rxd2-skew-ps : Skew control of RX data 2 pad
26 - rxd3-skew-ps : Skew control of RX data 3 pad
27 - txd0-skew-ps : Skew control of TX data 0 pad
28 - txd1-skew-ps : Skew control of TX data 1 pad
29 - txd2-skew-ps : Skew control of TX data 2 pad
30 - txd3-skew-ps : Skew control of TX data 3 pad
31
32KSZ9031:
33
34 All skew control options are specified in picoseconds. The minimum
35 value is 0, and the maximum is property-dependent. The increment
36 step is 60ps.
37
38 Optional properties:
39
40 Maximum value of 1860:
41
42 - rxc-skew-ps : Skew control of RX clock pad
43 - txc-skew-ps : Skew control of TX clock pad
44
45 Maximum value of 900:
46
47 - rxdv-skew-ps : Skew control of RX CTL pad
48 - txen-skew-ps : Skew control of TX CTL pad
49 - rxd0-skew-ps : Skew control of RX data 0 pad
50 - rxd1-skew-ps : Skew control of RX data 1 pad
51 - rxd2-skew-ps : Skew control of RX data 2 pad
52 - rxd3-skew-ps : Skew control of RX data 3 pad
53 - txd0-skew-ps : Skew control of TX data 0 pad
54 - txd1-skew-ps : Skew control of TX data 1 pad
55 - txd2-skew-ps : Skew control of TX data 2 pad
56 - txd3-skew-ps : Skew control of TX data 3 pad
57
58Examples:
59
60 /* Attach to an Ethernet device with autodetected PHY */
61 &enet {
62 rxc-skew-ps = <3000>;
63 rxdv-skew-ps = <0>;
64 txc-skew-ps = <3000>;
65 txen-skew-ps = <0>;
66 status = "okay";
67 };
68
69 /* Attach to an explicitly-specified PHY */
70 mdio {
71 phy0: ethernet-phy@0 {
72 rxc-skew-ps = <3000>;
73 rxdv-skew-ps = <0>;
74 txc-skew-ps = <3000>;
75 txen-skew-ps = <0>;
76 reg = <0>;
77 };
78 };
79 ethernet@70000 {
80 status = "okay";
81 phy = <&phy0>;
82 phy-mode = "rgmii-id";
83 };
diff --git a/Documentation/devicetree/bindings/net/nfc/pn544.txt b/Documentation/devicetree/bindings/net/nfc/pn544.txt
new file mode 100644
index 000000000000..dab69f36167c
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/nfc/pn544.txt
@@ -0,0 +1,35 @@
1* NXP Semiconductors PN544 NFC Controller
2
3Required properties:
4- compatible: Should be "nxp,pn544-i2c".
5- clock-frequency: I²C work frequency.
6- reg: address on the bus
7- interrupt-parent: phandle for the interrupt gpio controller
8- interrupts: GPIO interrupt to which the chip is connected
9- enable-gpios: Output GPIO pin used for enabling/disabling the PN544
10- firmware-gpios: Output GPIO pin used to enter firmware download mode
11
12Optional SoC Specific Properties:
13- pinctrl-names: Contains only one value - "default".
14- pintctrl-0: Specifies the pin control groups used for this controller.
15
16Example (for ARM-based BeagleBone with PN544 on I2C2):
17
18&i2c2 {
19
20 status = "okay";
21
22 pn544: pn544@28 {
23
24 compatible = "nxp,pn544-i2c";
25
26 reg = <0x28>;
27 clock-frequency = <400000>;
28
29 interrupt-parent = <&gpio1>;
30 interrupts = <17 GPIO_ACTIVE_HIGH>;
31
32 enable-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
33 firmware-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>;
34 };
35};
diff --git a/Documentation/devicetree/bindings/net/nfc/st21nfca.txt b/Documentation/devicetree/bindings/net/nfc/st21nfca.txt
new file mode 100644
index 000000000000..e4faa2e8dfeb
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/nfc/st21nfca.txt
@@ -0,0 +1,33 @@
1* STMicroelectronics SAS. ST21NFCA NFC Controller
2
3Required properties:
4- compatible: Should be "st,st21nfca_i2c".
5- clock-frequency: I²C work frequency.
6- reg: address on the bus
7- interrupt-parent: phandle for the interrupt gpio controller
8- interrupts: GPIO interrupt to which the chip is connected
9- enable-gpios: Output GPIO pin used for enabling/disabling the ST21NFCA
10
11Optional SoC Specific Properties:
12- pinctrl-names: Contains only one value - "default".
13- pintctrl-0: Specifies the pin control groups used for this controller.
14
15Example (for ARM-based BeagleBoard xM with ST21NFCA on I2C2):
16
17&i2c2 {
18
19 status = "okay";
20
21 st21nfca: st21nfca@1 {
22
23 compatible = "st,st21nfca_i2c";
24
25 reg = <0x01>;
26 clock-frequency = <400000>;
27
28 interrupt-parent = <&gpio5>;
29 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
30
31 enable-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;
32 };
33};
diff --git a/Documentation/devicetree/bindings/net/nfc/trf7970a.txt b/Documentation/devicetree/bindings/net/nfc/trf7970a.txt
index 8dd3ef7bc56b..1e436133685f 100644
--- a/Documentation/devicetree/bindings/net/nfc/trf7970a.txt
+++ b/Documentation/devicetree/bindings/net/nfc/trf7970a.txt
@@ -12,6 +12,7 @@ Required properties:
12Optional SoC Specific Properties: 12Optional SoC Specific Properties:
13- pinctrl-names: Contains only one value - "default". 13- pinctrl-names: Contains only one value - "default".
14- pintctrl-0: Specifies the pin control groups used for this controller. 14- pintctrl-0: Specifies the pin control groups used for this controller.
15- autosuspend-delay: Specify autosuspend delay in milliseconds.
15 16
16Example (for ARM-based BeagleBone with TRF7970A on SPI1): 17Example (for ARM-based BeagleBone with TRF7970A on SPI1):
17 18
@@ -29,6 +30,7 @@ Example (for ARM-based BeagleBone with TRF7970A on SPI1):
29 ti,enable-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>, 30 ti,enable-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>,
30 <&gpio2 5 GPIO_ACTIVE_LOW>; 31 <&gpio2 5 GPIO_ACTIVE_LOW>;
31 vin-supply = <&ldo3_reg>; 32 vin-supply = <&ldo3_reg>;
33 autosuspend-delay = <30000>;
32 status = "okay"; 34 status = "okay";
33 }; 35 };
34}; 36};
diff --git a/Documentation/devicetree/bindings/net/via-rhine.txt b/Documentation/devicetree/bindings/net/via-rhine.txt
new file mode 100644
index 000000000000..334eca2bf937
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/via-rhine.txt
@@ -0,0 +1,17 @@
1* VIA Rhine 10/100 Network Controller
2
3Required properties:
4- compatible : Should be "via,vt8500-rhine" for integrated
5 Rhine controllers found in VIA VT8500, WonderMedia WM8950
6 and similar. These are listed as 1106:3106 rev. 0x84 on the
7 virtual PCI bus under vendor-provided kernels
8- reg : Address and length of the io space
9- interrupts : Should contain the controller interrupt line
10
11Examples:
12
13ethernet@d8004000 {
14 compatible = "via,vt8500-rhine";
15 reg = <0xd8004000 0x100>;
16 interrupts = <10>;
17};
diff --git a/Documentation/devicetree/bindings/panel/auo,b133xtn01.txt b/Documentation/devicetree/bindings/panel/auo,b133xtn01.txt
new file mode 100644
index 000000000000..7443b7c76769
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/auo,b133xtn01.txt
@@ -0,0 +1,7 @@
1AU Optronics Corporation 13.3" WXGA (1366x768) TFT LCD panel
2
3Required properties:
4- compatible: should be "auo,b133xtn01"
5
6This binding is compatible with the simple-panel binding, which is specified
7in simple-panel.txt in this directory.
diff --git a/Documentation/devicetree/bindings/panel/edt,et057090dhu.txt b/Documentation/devicetree/bindings/panel/edt,et057090dhu.txt
new file mode 100644
index 000000000000..4903d7b1d947
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/edt,et057090dhu.txt
@@ -0,0 +1,7 @@
1Emerging Display Technology Corp. 5.7" VGA TFT LCD panel
2
3Required properties:
4- compatible: should be "edt,et057090dhu"
5
6This binding is compatible with the simple-panel binding, which is specified
7in simple-panel.txt in this directory.
diff --git a/Documentation/devicetree/bindings/panel/edt,et070080dh6.txt b/Documentation/devicetree/bindings/panel/edt,et070080dh6.txt
new file mode 100644
index 000000000000..20cb38e836e4
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/edt,et070080dh6.txt
@@ -0,0 +1,10 @@
1Emerging Display Technology Corp. ET070080DH6 7.0" WVGA TFT LCD panel
2
3Required properties:
4- compatible: should be "edt,et070080dh6"
5
6This panel is the same as ETM0700G0DH6 except for the touchscreen.
7ET070080DH6 is the model with resistive touch.
8
9This binding is compatible with the simple-panel binding, which is specified
10in simple-panel.txt in this directory.
diff --git a/Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt b/Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt
new file mode 100644
index 000000000000..ee4b18053e40
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt
@@ -0,0 +1,10 @@
1Emerging Display Technology Corp. ETM0700G0DH6 7.0" WVGA TFT LCD panel
2
3Required properties:
4- compatible: should be "edt,etm0700g0dh6"
5
6This panel is the same as ET070080DH6 except for the touchscreen.
7ETM0700G0DH6 is the model with capacitive multitouch.
8
9This binding is compatible with the simple-panel binding, which is specified
10in simple-panel.txt in this directory.
diff --git a/Documentation/devicetree/bindings/pci/designware-pcie.txt b/Documentation/devicetree/bindings/pci/designware-pcie.txt
index d6fae13ff062..d0d15ee42834 100644
--- a/Documentation/devicetree/bindings/pci/designware-pcie.txt
+++ b/Documentation/devicetree/bindings/pci/designware-pcie.txt
@@ -1,15 +1,7 @@
1* Synopsys Designware PCIe interface 1* Synopsys Designware PCIe interface
2 2
3Required properties: 3Required properties:
4- compatible: should contain "snps,dw-pcie" to identify the 4- compatible: should contain "snps,dw-pcie" to identify the core.
5 core, plus an identifier for the specific instance, such
6 as "samsung,exynos5440-pcie" or "fsl,imx6q-pcie".
7- reg: base addresses and lengths of the pcie controller,
8 the phy controller, additional register for the phy controller.
9- interrupts: interrupt values for level interrupt,
10 pulse interrupt, special interrupt.
11- clocks: from common clock binding: handle to pci clock.
12- clock-names: from common clock binding: should be "pcie" and "pcie_bus".
13- #address-cells: set to <3> 5- #address-cells: set to <3>
14- #size-cells: set to <2> 6- #size-cells: set to <2>
15- device_type: set to "pci" 7- device_type: set to "pci"
@@ -19,65 +11,11 @@ Required properties:
19 to define the mapping of the PCIe interface to interrupt 11 to define the mapping of the PCIe interface to interrupt
20 numbers. 12 numbers.
21- num-lanes: number of lanes to use 13- num-lanes: number of lanes to use
14- clocks: Must contain an entry for each entry in clock-names.
15 See ../clocks/clock-bindings.txt for details.
16- clock-names: Must include the following entries:
17 - "pcie"
18 - "pcie_bus"
22 19
23Optional properties: 20Optional properties:
24- reset-gpio: gpio pin number of power good signal 21- reset-gpio: gpio pin number of power good signal
25
26Optional properties for fsl,imx6q-pcie
27- power-on-gpio: gpio pin number of power-enable signal
28- wake-up-gpio: gpio pin number of incoming wakeup signal
29- disable-gpio: gpio pin number of outgoing rfkill/endpoint disable signal
30
31Example:
32
33SoC specific DT Entry:
34
35 pcie@290000 {
36 compatible = "samsung,exynos5440-pcie", "snps,dw-pcie";
37 reg = <0x290000 0x1000
38 0x270000 0x1000
39 0x271000 0x40>;
40 interrupts = <0 20 0>, <0 21 0>, <0 22 0>;
41 clocks = <&clock 28>, <&clock 27>;
42 clock-names = "pcie", "pcie_bus";
43 #address-cells = <3>;
44 #size-cells = <2>;
45 device_type = "pci";
46 ranges = <0x00000800 0 0x40000000 0x40000000 0 0x00001000 /* configuration space */
47 0x81000000 0 0 0x40001000 0 0x00010000 /* downstream I/O */
48 0x82000000 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */
49 #interrupt-cells = <1>;
50 interrupt-map-mask = <0 0 0 0>;
51 interrupt-map = <0x0 0 &gic 53>;
52 num-lanes = <4>;
53 };
54
55 pcie@2a0000 {
56 compatible = "samsung,exynos5440-pcie", "snps,dw-pcie";
57 reg = <0x2a0000 0x1000
58 0x272000 0x1000
59 0x271040 0x40>;
60 interrupts = <0 23 0>, <0 24 0>, <0 25 0>;
61 clocks = <&clock 29>, <&clock 27>;
62 clock-names = "pcie", "pcie_bus";
63 #address-cells = <3>;
64 #size-cells = <2>;
65 device_type = "pci";
66 ranges = <0x00000800 0 0x60000000 0x60000000 0 0x00001000 /* configuration space */
67 0x81000000 0 0 0x60001000 0 0x00010000 /* downstream I/O */
68 0x82000000 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */
69 #interrupt-cells = <1>;
70 interrupt-map-mask = <0 0 0 0>;
71 interrupt-map = <0x0 0 &gic 56>;
72 num-lanes = <4>;
73 };
74
75Board specific DT Entry:
76
77 pcie@290000 {
78 reset-gpio = <&pin_ctrl 5 0>;
79 };
80
81 pcie@2a0000 {
82 reset-gpio = <&pin_ctrl 22 0>;
83 };
diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt
new file mode 100644
index 000000000000..9455fd0ec830
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt
@@ -0,0 +1,38 @@
1* Freescale i.MX6 PCIe interface
2
3This PCIe host controller is based on the Synopsis Designware PCIe IP
4and thus inherits all the common properties defined in designware-pcie.txt.
5
6Required properties:
7- compatible: "fsl,imx6q-pcie"
8- reg: base addresse and length of the pcie controller
9- interrupts: A list of interrupt outputs of the controller. Must contain an
10 entry for each entry in the interrupt-names property.
11- interrupt-names: Must include the following entries:
12 - "msi": The interrupt that is asserted when an MSI is received
13- clock-names: Must include the following additional entries:
14 - "pcie_phy"
15
16Example:
17
18 pcie@0x01000000 {
19 compatible = "fsl,imx6q-pcie", "snps,dw-pcie";
20 reg = <0x01ffc000 0x4000>;
21 #address-cells = <3>;
22 #size-cells = <2>;
23 device_type = "pci";
24 ranges = <0x00000800 0 0x01f00000 0x01f00000 0 0x00080000
25 0x81000000 0 0 0x01f80000 0 0x00010000
26 0x82000000 0 0x01000000 0x01000000 0 0x00f00000>;
27 num-lanes = <1>;
28 interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
29 interrupt-names = "msi";
30 #interrupt-cells = <1>;
31 interrupt-map-mask = <0 0 0 0x7>;
32 interrupt-map = <0 0 0 1 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
33 <0 0 0 2 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
34 <0 0 0 3 &intc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
35 <0 0 0 4 &intc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
36 clocks = <&clks 144>, <&clks 206>, <&clks 189>;
37 clock-names = "pcie", "pcie_bus", "pcie_phy";
38 };
diff --git a/Documentation/devicetree/bindings/pci/host-generic-pci.txt b/Documentation/devicetree/bindings/pci/host-generic-pci.txt
new file mode 100644
index 000000000000..f0b0436807b4
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/host-generic-pci.txt
@@ -0,0 +1,100 @@
1* Generic PCI host controller
2
3Firmware-initialised PCI host controllers and PCI emulations, such as the
4virtio-pci implementations found in kvmtool and other para-virtualised
5systems, do not require driver support for complexities such as regulator
6and clock management. In fact, the controller may not even require the
7configuration of a control interface by the operating system, instead
8presenting a set of fixed windows describing a subset of IO, Memory and
9Configuration Spaces.
10
11Such a controller can be described purely in terms of the standardized device
12tree bindings communicated in pci.txt:
13
14
15Properties of the host controller node:
16
17- compatible : Must be "pci-host-cam-generic" or "pci-host-ecam-generic"
18 depending on the layout of configuration space (CAM vs
19 ECAM respectively).
20
21- device_type : Must be "pci".
22
23- ranges : As described in IEEE Std 1275-1994, but must provide
24 at least a definition of non-prefetchable memory. One
25 or both of prefetchable Memory and IO Space may also
26 be provided.
27
28- bus-range : Optional property (also described in IEEE Std 1275-1994)
29 to indicate the range of bus numbers for this controller.
30 If absent, defaults to <0 255> (i.e. all buses).
31
32- #address-cells : Must be 3.
33
34- #size-cells : Must be 2.
35
36- reg : The Configuration Space base address and size, as accessed
37 from the parent bus.
38
39
40Properties of the /chosen node:
41
42- linux,pci-probe-only
43 : Optional property which takes a single-cell argument.
44 If '0', then Linux will assign devices in its usual manner,
45 otherwise it will not try to assign devices and instead use
46 them as they are configured already.
47
48Configuration Space is assumed to be memory-mapped (as opposed to being
49accessed via an ioport) and laid out with a direct correspondence to the
50geography of a PCI bus address by concatenating the various components to
51form an offset.
52
53For CAM, this 24-bit offset is:
54
55 cfg_offset(bus, device, function, register) =
56 bus << 16 | device << 11 | function << 8 | register
57
58Whilst ECAM extends this by 4 bits to accomodate 4k of function space:
59
60 cfg_offset(bus, device, function, register) =
61 bus << 20 | device << 15 | function << 12 | register
62
63Interrupt mapping is exactly as described in `Open Firmware Recommended
64Practice: Interrupt Mapping' and requires the following properties:
65
66- #interrupt-cells : Must be 1
67
68- interrupt-map : <see aforementioned specification>
69
70- interrupt-map-mask : <see aforementioned specification>
71
72
73Example:
74
75pci {
76 compatible = "pci-host-cam-generic"
77 device_type = "pci";
78 #address-cells = <3>;
79 #size-cells = <2>;
80 bus-range = <0x0 0x1>;
81
82 // CPU_PHYSICAL(2) SIZE(2)
83 reg = <0x0 0x40000000 0x0 0x1000000>;
84
85 // BUS_ADDRESS(3) CPU_PHYSICAL(2) SIZE(2)
86 ranges = <0x01000000 0x0 0x01000000 0x0 0x01000000 0x0 0x00010000>,
87 <0x02000000 0x0 0x41000000 0x0 0x41000000 0x0 0x3f000000>;
88
89
90 #interrupt-cells = <0x1>;
91
92 // PCI_DEVICE(3) INT#(1) CONTROLLER(PHANDLE) CONTROLLER_DATA(3)
93 interrupt-map = < 0x0 0x0 0x0 0x1 &gic 0x0 0x4 0x1
94 0x800 0x0 0x0 0x1 &gic 0x0 0x5 0x1
95 0x1000 0x0 0x0 0x1 &gic 0x0 0x6 0x1
96 0x1800 0x0 0x0 0x1 &gic 0x0 0x7 0x1>;
97
98 // PCI_DEVICE(3) INT#(1)
99 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
100}
diff --git a/Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt b/Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt
new file mode 100644
index 000000000000..d8ef5bf50f11
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt
@@ -0,0 +1,66 @@
1Renesas AHB to PCI bridge
2-------------------------
3
4This is the bridge used internally to connect the USB controllers to the
5AHB. There is one bridge instance per USB port connected to the internal
6OHCI and EHCI controllers.
7
8Required properties:
9- compatible: "renesas,pci-r8a7790" for the R8A7790 SoC;
10 "renesas,pci-r8a7791" for the R8A7791 SoC.
11- reg: A list of physical regions to access the device: the first is
12 the operational registers for the OHCI/EHCI controllers and the
13 second is for the bridge configuration and control registers.
14- interrupts: interrupt for the device.
15- clocks: The reference to the device clock.
16- bus-range: The PCI bus number range; as this is a single bus, the range
17 should be specified as the same value twice.
18- #address-cells: must be 3.
19- #size-cells: must be 2.
20- #interrupt-cells: must be 1.
21- interrupt-map: standard property used to define the mapping of the PCI
22 interrupts to the GIC interrupts.
23- interrupt-map-mask: standard property that helps to define the interrupt
24 mapping.
25
26Example SoC configuration:
27
28 pci0: pci@ee090000 {
29 compatible = "renesas,pci-r8a7790";
30 clocks = <&mstp7_clks R8A7790_CLK_EHCI>;
31 reg = <0x0 0xee090000 0x0 0xc00>,
32 <0x0 0xee080000 0x0 0x1100>;
33 interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>;
34 status = "disabled";
35
36 bus-range = <0 0>;
37 #address-cells = <3>;
38 #size-cells = <2>;
39 #interrupt-cells = <1>;
40 interrupt-map-mask = <0xff00 0 0 0x7>;
41 interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
42 0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
43 0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>;
44
45 pci@0,1 {
46 reg = <0x800 0 0 0 0>;
47 device_type = "pci";
48 phys = <&usbphy 0 0>;
49 phy-names = "usb";
50 };
51
52 pci@0,2 {
53 reg = <0x1000 0 0 0 0>;
54 device_type = "pci";
55 phys = <&usbphy 0 0>;
56 phy-names = "usb";
57 };
58 };
59
60Example board setup:
61
62&pci0 {
63 status = "okay";
64 pinctrl-0 = <&usb0_pins>;
65 pinctrl-names = "default";
66};
diff --git a/Documentation/devicetree/bindings/pci/rcar-pci.txt b/Documentation/devicetree/bindings/pci/rcar-pci.txt
new file mode 100644
index 000000000000..29d3b989d3b0
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/rcar-pci.txt
@@ -0,0 +1,47 @@
1* Renesas RCar PCIe interface
2
3Required properties:
4- compatible: should contain one of the following
5 "renesas,pcie-r8a7779", "renesas,pcie-r8a7790", "renesas,pcie-r8a7791"
6- reg: base address and length of the pcie controller registers.
7- #address-cells: set to <3>
8- #size-cells: set to <2>
9- bus-range: PCI bus numbers covered
10- device_type: set to "pci"
11- ranges: ranges for the PCI memory and I/O regions.
12- dma-ranges: ranges for the inbound memory regions.
13- interrupts: two interrupt sources for MSI interrupts, followed by interrupt
14 source for hardware related interrupts (e.g. link speed change).
15- #interrupt-cells: set to <1>
16- interrupt-map-mask and interrupt-map: standard PCI properties
17 to define the mapping of the PCIe interface to interrupt
18 numbers.
19- clocks: from common clock binding: clock specifiers for the PCIe controller
20 and PCIe bus clocks.
21- clock-names: from common clock binding: should be "pcie" and "pcie_bus".
22
23Example:
24
25SoC specific DT Entry:
26
27 pcie: pcie@fe000000 {
28 compatible = "renesas,pcie-r8a7791";
29 reg = <0 0xfe000000 0 0x80000>;
30 #address-cells = <3>;
31 #size-cells = <2>;
32 bus-range = <0x00 0xff>;
33 device_type = "pci";
34 ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
35 0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
36 0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
37 0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
38 dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x40000000
39 0x42000000 2 0x00000000 2 0x00000000 0 0x40000000>;
40 interrupts = <0 116 4>, <0 117 4>, <0 118 4>;
41 #interrupt-cells = <1>;
42 interrupt-map-mask = <0 0 0 0>;
43 interrupt-map = <0 0 0 0 &gic 0 116 4>;
44 clocks = <&mstp3_clks R8A7791_CLK_PCIE>, <&pcie_bus_clk>;
45 clock-names = "pcie", "pcie_bus";
46 status = "disabled";
47 };
diff --git a/Documentation/devicetree/bindings/pci/samsung,exynos5440-pcie.txt b/Documentation/devicetree/bindings/pci/samsung,exynos5440-pcie.txt
new file mode 100644
index 000000000000..4f9d23d2ed67
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/samsung,exynos5440-pcie.txt
@@ -0,0 +1,65 @@
1* Samsung Exynos 5440 PCIe interface
2
3This PCIe host controller is based on the Synopsis Designware PCIe IP
4and thus inherits all the common properties defined in designware-pcie.txt.
5
6Required properties:
7- compatible: "samsung,exynos5440-pcie"
8- reg: base addresses and lengths of the pcie controller,
9 the phy controller, additional register for the phy controller.
10- interrupts: A list of interrupt outputs for level interrupt,
11 pulse interrupt, special interrupt.
12
13Example:
14
15SoC specific DT Entry:
16
17 pcie@290000 {
18 compatible = "samsung,exynos5440-pcie", "snps,dw-pcie";
19 reg = <0x290000 0x1000
20 0x270000 0x1000
21 0x271000 0x40>;
22 interrupts = <0 20 0>, <0 21 0>, <0 22 0>;
23 clocks = <&clock 28>, <&clock 27>;
24 clock-names = "pcie", "pcie_bus";
25 #address-cells = <3>;
26 #size-cells = <2>;
27 device_type = "pci";
28 ranges = <0x00000800 0 0x40000000 0x40000000 0 0x00001000 /* configuration space */
29 0x81000000 0 0 0x40001000 0 0x00010000 /* downstream I/O */
30 0x82000000 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */
31 #interrupt-cells = <1>;
32 interrupt-map-mask = <0 0 0 0>;
33 interrupt-map = <0 0 0 0 &gic GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
34 num-lanes = <4>;
35 };
36
37 pcie@2a0000 {
38 compatible = "samsung,exynos5440-pcie", "snps,dw-pcie";
39 reg = <0x2a0000 0x1000
40 0x272000 0x1000
41 0x271040 0x40>;
42 interrupts = <0 23 0>, <0 24 0>, <0 25 0>;
43 clocks = <&clock 29>, <&clock 27>;
44 clock-names = "pcie", "pcie_bus";
45 #address-cells = <3>;
46 #size-cells = <2>;
47 device_type = "pci";
48 ranges = <0x00000800 0 0x60000000 0x60000000 0 0x00001000 /* configuration space */
49 0x81000000 0 0 0x60001000 0 0x00010000 /* downstream I/O */
50 0x82000000 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */
51 #interrupt-cells = <1>;
52 interrupt-map-mask = <0 0 0 0>;
53 interrupt-map = <0 0 0 0 &gic GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
54 num-lanes = <4>;
55 };
56
57Board specific DT Entry:
58
59 pcie@290000 {
60 reset-gpio = <&pin_ctrl 5 0>;
61 };
62
63 pcie@2a0000 {
64 reset-gpio = <&pin_ctrl 22 0>;
65 };
diff --git a/Documentation/devicetree/bindings/phy/samsung-phy.txt b/Documentation/devicetree/bindings/phy/samsung-phy.txt
index b422e38946d7..2049261d8c31 100644
--- a/Documentation/devicetree/bindings/phy/samsung-phy.txt
+++ b/Documentation/devicetree/bindings/phy/samsung-phy.txt
@@ -114,3 +114,50 @@ Example:
114 compatible = "samsung,exynos-sataphy-i2c"; 114 compatible = "samsung,exynos-sataphy-i2c";
115 reg = <0x38>; 115 reg = <0x38>;
116 }; 116 };
117
118Samsung Exynos5 SoC series USB DRD PHY controller
119--------------------------------------------------
120
121Required properties:
122- compatible : Should be set to one of the following supported values:
123 - "samsung,exynos5250-usbdrd-phy" - for exynos5250 SoC,
124 - "samsung,exynos5420-usbdrd-phy" - for exynos5420 SoC.
125- reg : Register offset and length of USB DRD PHY register set;
126- clocks: Clock IDs array as required by the controller
127- clock-names: names of clocks correseponding to IDs in the clock property;
128 Required clocks:
129 - phy: main PHY clock (same as USB DRD controller i.e. DWC3 IP clock),
130 used for register access.
131 - ref: PHY's reference clock (usually crystal clock), used for
132 PHY operations, associated by phy name. It is used to
133 determine bit values for clock settings register.
134 For Exynos5420 this is given as 'sclk_usbphy30' in CMU.
135- samsung,pmu-syscon: phandle for PMU system controller interface, used to
136 control pmu registers for power isolation.
137- #phy-cells : from the generic PHY bindings, must be 1;
138
139For "samsung,exynos5250-usbdrd-phy" and "samsung,exynos5420-usbdrd-phy"
140compatible PHYs, the second cell in the PHY specifier identifies the
141PHY id, which is interpreted as follows:
142 0 - UTMI+ type phy,
143 1 - PIPE3 type phy,
144
145Example:
146 usbdrd_phy: usbphy@12100000 {
147 compatible = "samsung,exynos5250-usbdrd-phy";
148 reg = <0x12100000 0x100>;
149 clocks = <&clock 286>, <&clock 1>;
150 clock-names = "phy", "ref";
151 samsung,pmu-syscon = <&pmu_system_controller>;
152 #phy-cells = <1>;
153 };
154
155- aliases: For SoCs like Exynos5420 having multiple USB 3.0 DRD PHY controllers,
156 'usbdrd_phy' nodes should have numbered alias in the aliases node,
157 in the form of usbdrdphyN, N = 0, 1... (depending on number of
158 controllers).
159Example:
160 aliases {
161 usbdrdphy0 = &usb3_phy0;
162 usbdrdphy1 = &usb3_phy1;
163 };
diff --git a/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
index a82361b62015..16528b9eb561 100644
--- a/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
+++ b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
@@ -2,15 +2,26 @@ Allwinner sun4i USB PHY
2----------------------- 2-----------------------
3 3
4Required properties: 4Required properties:
5- compatible : should be one of "allwinner,sun4i-a10-usb-phy", 5- compatible : should be one of
6 "allwinner,sun5i-a13-usb-phy" or "allwinner,sun7i-a20-usb-phy" 6 * allwinner,sun4i-a10-usb-phy
7 * allwinner,sun5i-a13-usb-phy
8 * allwinner,sun6i-a31-usb-phy
9 * allwinner,sun7i-a20-usb-phy
7- reg : a list of offset + length pairs 10- reg : a list of offset + length pairs
8- reg-names : "phy_ctrl", "pmu1" and for sun4i or sun7i "pmu2" 11- reg-names :
12 * "phy_ctrl"
13 * "pmu1"
14 * "pmu2" for sun4i, sun6i or sun7i
9- #phy-cells : from the generic phy bindings, must be 1 15- #phy-cells : from the generic phy bindings, must be 1
10- clocks : phandle + clock specifier for the phy clock 16- clocks : phandle + clock specifier for the phy clocks
11- clock-names : "usb_phy" 17- clock-names :
18 * "usb_phy" for sun4i, sun5i or sun7i
19 * "usb0_phy", "usb1_phy" and "usb2_phy" for sun6i
12- resets : a list of phandle + reset specifier pairs 20- resets : a list of phandle + reset specifier pairs
13- reset-names : "usb0_reset", "usb1_reset" and for sun4i or sun7i "usb2_reset" 21- reset-names :
22 * "usb0_reset"
23 * "usb1_reset"
24 * "usb2_reset" for sun4i, sun6i or sun7i
14 25
15Example: 26Example:
16 usbphy: phy@0x01c13400 { 27 usbphy: phy@0x01c13400 {
diff --git a/Documentation/devicetree/bindings/phy/ti-phy.txt b/Documentation/devicetree/bindings/phy/ti-phy.txt
index 788fb0fa3762..9ce458f32945 100644
--- a/Documentation/devicetree/bindings/phy/ti-phy.txt
+++ b/Documentation/devicetree/bindings/phy/ti-phy.txt
@@ -32,6 +32,11 @@ Required properties:
32 - reg : Address and length of the register set for the device. 32 - reg : Address and length of the register set for the device.
33 - #phy-cells: determine the number of cells that should be given in the 33 - #phy-cells: determine the number of cells that should be given in the
34 phandle while referencing this phy. 34 phandle while referencing this phy.
35 - clocks: a list of phandles and clock-specifier pairs, one for each entry in
36 clock-names.
37 - clock-names: should include:
38 * "wkupclk" - wakeup clock.
39 * "refclk" - reference clock (optional).
35 40
36Optional properties: 41Optional properties:
37 - ctrl-module : phandle of the control module used by PHY driver to power on 42 - ctrl-module : phandle of the control module used by PHY driver to power on
@@ -44,6 +49,8 @@ usb2phy@4a0ad080 {
44 reg = <0x4a0ad080 0x58>; 49 reg = <0x4a0ad080 0x58>;
45 ctrl-module = <&omap_control_usb>; 50 ctrl-module = <&omap_control_usb>;
46 #phy-cells = <0>; 51 #phy-cells = <0>;
52 clocks = <&usb_phy_cm_clk32k>, <&usb_otg_ss_refclk960m>;
53 clock-names = "wkupclk", "refclk";
47}; 54};
48 55
49TI PIPE3 PHY 56TI PIPE3 PHY
diff --git a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
index dff0e5f995e2..d8d065608ec0 100644
--- a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
@@ -6,8 +6,13 @@ the first two functions being GPIO in and out. The configuration on
6the pins includes drive strength and pull-up. 6the pins includes drive strength and pull-up.
7 7
8Required properties: 8Required properties:
9- compatible: "allwinner,<soc>-pinctrl". Supported SoCs for now are: 9- compatible: Should be one of the followings (depending on you SoC):
10 sun5i-a13. 10 "allwinner,sun4i-a10-pinctrl"
11 "allwinner,sun5i-a10s-pinctrl"
12 "allwinner,sun5i-a13-pinctrl"
13 "allwinner,sun6i-a31-pinctrl"
14 "allwinner,sun6i-a31-r-pinctrl"
15 "allwinner,sun7i-a20-pinctrl"
11- reg: Should contain the register physical address and length for the 16- reg: Should contain the register physical address and length for the
12 pin controller. 17 pin controller.
13 18
diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,bcm11351-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/brcm,bcm11351-pinctrl.txt
index 67a5db95f189..4eaae32821ae 100644
--- a/Documentation/devicetree/bindings/pinctrl/brcm,bcm11351-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm11351-pinctrl.txt
@@ -73,9 +73,9 @@ Optional Properties (for standard pins):
73 Otherwise: 73 Otherwise:
74 0: fast slew rate 74 0: fast slew rate
75 1: normal slew rate 75 1: normal slew rate
76- input-enable: No arguements. Enable input (does not affect 76- input-enable: No arguments. Enable input (does not affect
77 output.) 77 output.)
78- input-disable: No arguements. Disable input (does not affect 78- input-disable: No arguments. Disable input (does not affect
79 output.) 79 output.)
80- drive-strength: Integer. Drive strength in mA. Valid values are 80- drive-strength: Integer. Drive strength in mA. Valid values are
81 2, 4, 6, 8, 10, 12, 14, 16 mA. 81 2, 4, 6, 8, 10, 12, 14, 16 mA.
@@ -99,9 +99,9 @@ Optional Properties (for I2C pins):
99 Otherwise: 99 Otherwise:
100 0: fast slew rate 100 0: fast slew rate
101 1: normal slew rate 101 1: normal slew rate
102- input-enable: No arguements. Enable input (does not affect 102- input-enable: No arguments. Enable input (does not affect
103 output.) 103 output.)
104- input-disable: No arguements. Disable input (does not affect 104- input-disable: No arguments. Disable input (does not affect
105 output.) 105 output.)
106 106
107Optional Properties (for HDMI pins): 107Optional Properties (for HDMI pins):
@@ -111,9 +111,9 @@ Optional Properties (for HDMI pins):
111- slew-rate: Integer. Controls slew rate. 111- slew-rate: Integer. Controls slew rate.
112 0: Standard(100kbps)& Fast(400kbps) mode 112 0: Standard(100kbps)& Fast(400kbps) mode
113 1: Highspeed (3.4Mbps) mode 113 1: Highspeed (3.4Mbps) mode
114- input-enable: No arguements. Enable input (does not affect 114- input-enable: No arguments. Enable input (does not affect
115 output.) 115 output.)
116- input-disable: No arguements. Disable input (does not affect 116- input-disable: No arguments. Disable input (does not affect
117 output.) 117 output.)
118 118
119Example: 119Example:
diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,imx6sx-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/fsl,imx6sx-pinctrl.txt
new file mode 100644
index 000000000000..b1b595220f1b
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/fsl,imx6sx-pinctrl.txt
@@ -0,0 +1,36 @@
1* Freescale i.MX6 SoloX IOMUX Controller
2
3Please refer to fsl,imx-pinctrl.txt in this directory for common binding part
4and usage.
5
6Required properties:
7- compatible: "fsl,imx6sx-iomuxc"
8- fsl,pins: each entry consists of 6 integers and represents the mux and config
9 setting for one pin. The first 5 integers <mux_reg conf_reg input_reg mux_val
10 input_val> are specified using a PIN_FUNC_ID macro, which can be found in
11 imx6sx-pinfunc.h under device tree source folder. The last integer CONFIG is
12 the pad setting value like pull-up on this pin. Please refer to i.MX6 SoloX
13 Reference Manual for detailed CONFIG settings.
14
15CONFIG bits definition:
16PAD_CTL_HYS (1 << 16)
17PAD_CTL_PUS_100K_DOWN (0 << 14)
18PAD_CTL_PUS_47K_UP (1 << 14)
19PAD_CTL_PUS_100K_UP (2 << 14)
20PAD_CTL_PUS_22K_UP (3 << 14)
21PAD_CTL_PUE (1 << 13)
22PAD_CTL_PKE (1 << 12)
23PAD_CTL_ODE (1 << 11)
24PAD_CTL_SPEED_LOW (0 << 6)
25PAD_CTL_SPEED_MED (1 << 6)
26PAD_CTL_SPEED_HIGH (3 << 6)
27PAD_CTL_DSE_DISABLE (0 << 3)
28PAD_CTL_DSE_260ohm (1 << 3)
29PAD_CTL_DSE_130ohm (2 << 3)
30PAD_CTL_DSE_87ohm (3 << 3)
31PAD_CTL_DSE_65ohm (4 << 3)
32PAD_CTL_DSE_52ohm (5 << 3)
33PAD_CTL_DSE_43ohm (6 << 3)
34PAD_CTL_DSE_37ohm (7 << 3)
35PAD_CTL_SRE_FAST (1 << 0)
36PAD_CTL_SRE_SLOW (0 << 0)
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,orion-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,orion-pinctrl.txt
new file mode 100644
index 000000000000..27570a3a1741
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/marvell,orion-pinctrl.txt
@@ -0,0 +1,91 @@
1* Marvell Orion SoC pinctrl driver for mpp
2
3Please refer to marvell,mvebu-pinctrl.txt in this directory for common binding
4part and usage.
5
6Required properties:
7- compatible: "marvell,88f5181l-pinctrl", "marvell,88f5182-pinctrl",
8 "marvell,88f5281-pinctrl"
9
10- reg: two register areas, the first one describing the first two
11 contiguous MPP registers, and the second one describing the single
12 final MPP register, separated from the previous one.
13
14Available mpp pins/groups and functions:
15Note: brackets (x) are not part of the mpp name for marvell,function and given
16only for more detailed description in this document.
17
18* Marvell Orion 88f5181l
19
20name pins functions
21================================================================================
22mpp0 0 pcie(rstout), pci(req2), gpio
23mpp1 1 gpio, pci(gnt2)
24mpp2 2 gpio, pci(req3), pci-1(pme)
25mpp3 3 gpio, pci(gnt3)
26mpp4 4 gpio, pci(req4)
27mpp5 5 gpio, pci(gnt4)
28mpp6 6 gpio, pci(req5), pci-1(clk)
29mpp7 7 gpio, pci(gnt5), pci-1(clk)
30mpp8 8 gpio, ge(col)
31mpp9 9 gpio, ge(rxerr)
32mpp10 10 gpio, ge(crs)
33mpp11 11 gpio, ge(txerr)
34mpp12 12 gpio, ge(txd4)
35mpp13 13 gpio, ge(txd5)
36mpp14 14 gpio, ge(txd6)
37mpp15 15 gpio, ge(txd7)
38mpp16 16 ge(rxd4)
39mpp17 17 ge(rxd5)
40mpp18 18 ge(rxd6)
41mpp19 19 ge(rxd7)
42
43* Marvell Orion 88f5182
44
45name pins functions
46================================================================================
47mpp0 0 pcie(rstout), pci(req2), gpio
48mpp1 1 gpio, pci(gnt2)
49mpp2 2 gpio, pci(req3), pci-1(pme)
50mpp3 3 gpio, pci(gnt3)
51mpp4 4 gpio, pci(req4), bootnand(re), sata0(prsnt)
52mpp5 5 gpio, pci(gnt4), bootnand(we), sata1(prsnt)
53mpp6 6 gpio, pci(req5), nand(re0), sata0(act)
54mpp7 7 gpio, pci(gnt5), nand(we0), sata1(act)
55mpp8 8 gpio, ge(col)
56mpp9 9 gpio, ge(rxerr)
57mpp10 10 gpio, ge(crs)
58mpp11 11 gpio, ge(txerr)
59mpp12 12 gpio, ge(txd4), nand(re1), sata0(ledprsnt)
60mpp13 13 gpio, ge(txd5), nand(we1), sata1(ledprsnt)
61mpp14 14 gpio, ge(txd6), nand(re2), sata0(ledact)
62mpp15 15 gpio, ge(txd7), nand(we2), sata1(ledact)
63mpp16 16 uart1(rxd), ge(rxd4), gpio
64mpp17 17 uart1(txd), ge(rxd5), gpio
65mpp18 18 uart1(cts), ge(rxd6), gpio
66mpp19 19 uart1(rts), ge(rxd7), gpio
67
68* Marvell Orion 88f5281
69
70name pins functions
71================================================================================
72mpp0 0 pcie(rstout), pci(req2), gpio
73mpp1 1 gpio, pci(gnt2)
74mpp2 2 gpio, pci(req3), pci(pme)
75mpp3 3 gpio, pci(gnt3)
76mpp4 4 gpio, pci(req4), bootnand(re)
77mpp5 5 gpio, pci(gnt4), bootnand(we)
78mpp6 6 gpio, pci(req5), nand(re0)
79mpp7 7 gpio, pci(gnt5), nand(we0)
80mpp8 8 gpio, ge(col)
81mpp9 9 gpio, ge(rxerr)
82mpp10 10 gpio, ge(crs)
83mpp11 11 gpio, ge(txerr)
84mpp12 12 gpio, ge(txd4), nand(re1)
85mpp13 13 gpio, ge(txd5), nand(we1)
86mpp14 14 gpio, ge(txd6), nand(re2)
87mpp15 15 gpio, ge(txd7), nand(we2)
88mpp16 16 uart1(rxd), ge(rxd4)
89mpp17 17 uart1(txd), ge(rxd5)
90mpp18 18 uart1(cts), ge(rxd6)
91mpp19 19 uart1(rts), ge(rxd7)
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
index 4414163e76d2..fa40a177164c 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
@@ -156,6 +156,7 @@ input-disable - disable input on pin (no effect on output)
156input-schmitt-enable - enable schmitt-trigger mode 156input-schmitt-enable - enable schmitt-trigger mode
157input-schmitt-disable - disable schmitt-trigger mode 157input-schmitt-disable - disable schmitt-trigger mode
158input-debounce - debounce mode with debound time X 158input-debounce - debounce mode with debound time X
159power-source - select between different power supplies
159low-power-enable - enable low power mode 160low-power-enable - enable low power mode
160low-power-disable - disable low power mode 161low-power-disable - disable low power mode
161output-low - set the pin to output mode with low level 162output-low - set the pin to output mode with low level
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt
new file mode 100644
index 000000000000..7181f925acaa
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt
@@ -0,0 +1,88 @@
1Qualcomm APQ8064 TLMM block
2
3Required properties:
4- compatible: "qcom,apq8064-pinctrl"
5- reg: Should be the base address and length of the TLMM block.
6- interrupts: Should be the parent IRQ of the TLMM block.
7- interrupt-controller: Marks the device node as an interrupt controller.
8- #interrupt-cells: Should be two.
9- gpio-controller: Marks the device node as a GPIO controller.
10- #gpio-cells : Should be two.
11 The first cell is the gpio pin number and the
12 second cell is used for optional parameters.
13
14Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
15a general description of GPIO and interrupt bindings.
16
17Please refer to pinctrl-bindings.txt in this directory for details of the
18common pinctrl bindings used by client devices, including the meaning of the
19phrase "pin configuration node".
20
21Qualcomm's pin configuration nodes act as a container for an abitrary number of
22subnodes. Each of these subnodes represents some desired configuration for a
23pin, a group, or a list of pins or groups. This configuration can include the
24mux function to select on those pin(s)/group(s), and various pin configuration
25parameters, such as pull-up, drive strength, etc.
26
27The name of each subnode is not important; all subnodes should be enumerated
28and processed purely based on their content.
29
30Each subnode only affects those parameters that are explicitly listed. In
31other words, a subnode that lists a mux function but no pin configuration
32parameters implies no information about any pin configuration parameters.
33Similarly, a pin subnode that describes a pullup parameter implies no
34information about e.g. the mux function.
35
36
37The following generic properties as defined in pinctrl-bindings.txt are valid
38to specify in a pin configuration subnode:
39
40 pins, function, bias-disable, bias-pull-down, bias-pull,up, drive-strength,
41 output-low, output-high.
42
43Non-empty subnodes must specify the 'pins' property.
44
45Valid values for pins are:
46 gpio0-gpio89
47
48Valid values for function are:
49 cam_mclk, codec_mic_i2s, codec_spkr_i2s, gsbi1, gsbi2, gsbi3, gsbi4,
50 gsbi4_cam_i2c, gsbi5, gsbi5_spi_cs1, gsbi5_spi_cs2, gsbi5_spi_cs3, gsbi6,
51 gsbi6_spi_cs1, gsbi6_spi_cs2, gsbi6_spi_cs3, gsbi7, gsbi7_spi_cs1,
52 gsbi7_spi_cs2, gsbi7_spi_cs3, gsbi_cam_i2c, hdmi, mi2s, riva_bt, riva_fm,
53 riva_wlan, sdc2, sdc4, slimbus, spkr_i2s, tsif1, tsif2, usb2_hsic,
54
55Example:
56
57 msmgpio: pinctrl@800000 {
58 compatible = "qcom,apq8064-pinctrl";
59 reg = <0x800000 0x4000>;
60
61 gpio-controller;
62 #gpio-cells = <2>;
63 interrupt-controller;
64 #interrupt-cells = <2>;
65 interrupts = <0 32 0x4>;
66
67 pinctrl-names = "default";
68 pinctrl-0 = <&gsbi5_uart_default>;
69
70 gsbi5_uart_default: gsbi5_uart_default {
71 mux {
72 pins = "gpio51", "gpio52";
73 function = "gsbi5";
74 };
75
76 tx {
77 pins = "gpio51";
78 drive-strength = <4>;
79 bias-disable;
80 };
81
82 rx {
83 pins = "gpio52";
84 drive-strength = <2>;
85 bias-pull-up;
86 };
87 };
88 };
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt
new file mode 100644
index 000000000000..e0d35a40981b
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt
@@ -0,0 +1,95 @@
1Qualcomm IPQ8064 TLMM block
2
3Required properties:
4- compatible: "qcom,ipq8064-pinctrl"
5- reg: Should be the base address and length of the TLMM block.
6- interrupts: Should be the parent IRQ of the TLMM block.
7- interrupt-controller: Marks the device node as an interrupt controller.
8- #interrupt-cells: Should be two.
9- gpio-controller: Marks the device node as a GPIO controller.
10- #gpio-cells : Should be two.
11 The first cell is the gpio pin number and the
12 second cell is used for optional parameters.
13
14Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for
15a general description of GPIO and interrupt bindings.
16
17Please refer to pinctrl-bindings.txt in this directory for details of the
18common pinctrl bindings used by client devices, including the meaning of the
19phrase "pin configuration node".
20
21Qualcomm's pin configuration nodes act as a container for an abitrary number of
22subnodes. Each of these subnodes represents some desired configuration for a
23pin, a group, or a list of pins or groups. This configuration can include the
24mux function to select on those pin(s)/group(s), and various pin configuration
25parameters, such as pull-up, drive strength, etc.
26
27The name of each subnode is not important; all subnodes should be enumerated
28and processed purely based on their content.
29
30Each subnode only affects those parameters that are explicitly listed. In
31other words, a subnode that lists a mux function but no pin configuration
32parameters implies no information about any pin configuration parameters.
33Similarly, a pin subnode that describes a pullup parameter implies no
34information about e.g. the mux function.
35
36
37The following generic properties as defined in pinctrl-bindings.txt are valid
38to specify in a pin configuration subnode:
39
40 pins, function, bias-disable, bias-pull-down, bias-pull,up, drive-strength,
41 output-low, output-high.
42
43Non-empty subnodes must specify the 'pins' property.
44
45Valid values for qcom,pins are:
46 gpio0-gpio68
47 Supports mux, bias, and drive-strength
48
49 sdc3_clk, sdc3_cmd, sdc3_data
50 Supports bias and drive-strength
51
52
53Valid values for function are:
54 mdio, mi2s, pdm, ssbi, spmi, audio_pcm, gsbi1, gsbi2, gsbi4, gsbi5,
55 gsbi5_spi_cs1, gsbi5_spi_cs2, gsbi5_spi_cs3, gsbi6, gsbi7, nss_spi, sdc1,
56 spdif, nand, tsif1, tsif2, usb_fs_n, usb_fs, usb2_hsic, rgmii2, sata,
57 pcie1_rst, pcie1_prsnt, pcie1_pwren_n, pcie1_pwren, pcie1_pwrflt,
58 pcie1_clk_req, pcie2_rst, pcie2_prsnt, pcie2_pwren_n, pcie2_pwren,
59 pcie2_pwrflt, pcie2_clk_req, pcie3_rst, pcie3_prsnt, pcie3_pwren_n,
60 pcie3_pwren, pcie3_pwrflt, pcie3_clk_req, ps_hold
61
62Example:
63
64 pinmux: pinctrl@800000 {
65 compatible = "qcom,ipq8064-pinctrl";
66 reg = <0x800000 0x4000>;
67
68 gpio-controller;
69 #gpio-cells = <2>;
70 interrupt-controller;
71 #interrupt-cells = <2>;
72 interrupts = <0 32 0x4>;
73
74 pinctrl-names = "default";
75 pinctrl-0 = <&gsbi5_uart_default>;
76
77 gsbi5_uart_default: gsbi5_uart_default {
78 mux {
79 pins = "gpio18", "gpio19";
80 function = "gsbi5";
81 };
82
83 tx {
84 pins = "gpio18";
85 drive-strength = <4>;
86 bias-disable;
87 };
88
89 rx {
90 pins = "gpio19";
91 drive-strength = <2>;
92 bias-pull-up;
93 };
94 };
95 };
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt
index 9fb89e3f61ea..73262b575dfc 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt
@@ -50,7 +50,27 @@ Valid values for pins are:
50 Supports bias and drive-strength 50 Supports bias and drive-strength
51 51
52Valid values for function are: 52Valid values for function are:
53 blsp_i2c2, blsp_i2c6, blsp_i2c11, blsp_spi1, blsp_uart2, blsp_uart8, slimbus 53 cci_i2c0, cci_i2c1, uim1, uim2, uim_batt_alarm,
54 blsp_uim1, blsp_uart1, blsp_i2c1, blsp_spi1,
55 blsp_uim2, blsp_uart2, blsp_i2c2, blsp_spi2,
56 blsp_uim3, blsp_uart3, blsp_i2c3, blsp_spi3,
57 blsp_uim4, blsp_uart4, blsp_i2c4, blsp_spi4,
58 blsp_uim5, blsp_uart5, blsp_i2c5, blsp_spi5,
59 blsp_uim6, blsp_uart6, blsp_i2c6, blsp_spi6,
60 blsp_uim7, blsp_uart7, blsp_i2c7, blsp_spi7,
61 blsp_uim8, blsp_uart8, blsp_i2c8, blsp_spi8,
62 blsp_uim9, blsp_uart9, blsp_i2c9, blsp_spi9,
63 blsp_uim10, blsp_uart10, blsp_i2c10, blsp_spi10,
64 blsp_uim11, blsp_uart11, blsp_i2c11, blsp_spi11,
65 blsp_uim12, blsp_uart12, blsp_i2c12, blsp_spi12,
66 blsp_spi1_cs1, blsp_spi2_cs2, blsp_spi_cs3, blsp_spi2_cs1, blsp_spi2_cs2
67 blsp_spi2_cs3, blsp_spi10_cs1, blsp_spi10_cs2, blsp_spi10_cs3,
68 sdc3, sdc4, gcc_gp_clk1, gcc_gp_clk2, gcc_gp_clk3, cci_timer0, cci_timer1,
69 cci_timer2, cci_timer3, cci_async_in0, cci_async_in1, cci_async_in2,
70 cam_mckl0, cam_mclk1, cam_mclk2, cam_mclk3, mdp_vsync, hdmi_cec, hdmi_ddc,
71 hdmi_hpd, edp_hpd, gp_pdm0, gp_pdm1, gp_pdm2, gp_pdm3, gp0_clk, gp1_clk,
72 gp_mn, tsif1, tsif2, hsic, grfc, audio_ref_clk, qua_mi2s, pri_mi2s, spkr_mi2s,
73 ter_mi2s, sec_mi2s, bt, fm, wlan, slimbus
54 74
55 (Note that this is not yet the complete list of functions) 75 (Note that this is not yet the complete list of functions)
56 76
diff --git a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
index f378d342aae4..cefef741a40b 100644
--- a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
@@ -21,13 +21,23 @@ defined as gpio sub-nodes of the pinmux controller.
21Required properties for iomux controller: 21Required properties for iomux controller:
22 - compatible: one of "rockchip,rk2928-pinctrl", "rockchip,rk3066a-pinctrl" 22 - compatible: one of "rockchip,rk2928-pinctrl", "rockchip,rk3066a-pinctrl"
23 "rockchip,rk3066b-pinctrl", "rockchip,rk3188-pinctrl" 23 "rockchip,rk3066b-pinctrl", "rockchip,rk3188-pinctrl"
24 - rockchip,grf: phandle referencing a syscon providing the
25 "general register files"
26
27Optional properties for iomux controller:
28 - rockchip,pmu: phandle referencing a syscon providing the pmu registers
29 as some SoCs carry parts of the iomux controller registers there.
30 Required for at least rk3188 and rk3288.
31
32Deprecated properties for iomux controller:
24 - reg: first element is the general register space of the iomux controller 33 - reg: first element is the general register space of the iomux controller
25 second element is the separate pull register space of the rk3188 34 It should be large enough to contain also separate pull registers.
35 second element is the separate pull register space of the rk3188.
36 Use rockchip,grf and rockchip,pmu described above instead.
26 37
27Required properties for gpio sub nodes: 38Required properties for gpio sub nodes:
28 - compatible: "rockchip,gpio-bank", "rockchip,rk3188-gpio-bank0" 39 - compatible: "rockchip,gpio-bank", "rockchip,rk3188-gpio-bank0"
29 - reg: register of the gpio bank (different than the iomux registerset) 40 - reg: register of the gpio bank (different than the iomux registerset)
30 second element: separate pull register for rk3188 bank0
31 - interrupts: base interrupt of the gpio bank in the interrupt controller 41 - interrupts: base interrupt of the gpio bank in the interrupt controller
32 - clocks: clock that drives this bank 42 - clocks: clock that drives this bank
33 - gpio-controller: identifies the node as a gpio controller and pin bank. 43 - gpio-controller: identifies the node as a gpio controller and pin bank.
@@ -39,6 +49,10 @@ Required properties for gpio sub nodes:
39 cells should use the standard two-cell scheme described in 49 cells should use the standard two-cell scheme described in
40 bindings/interrupt-controller/interrupts.txt 50 bindings/interrupt-controller/interrupts.txt
41 51
52Deprecated properties for gpio sub nodes:
53 - reg: second element: separate pull register for rk3188 bank0, use
54 rockchip,pmu described above instead
55
42Required properties for pin configuration node: 56Required properties for pin configuration node:
43 - rockchip,pins: 3 integers array, represents a group of pins mux and config 57 - rockchip,pins: 3 integers array, represents a group of pins mux and config
44 setting. The format is rockchip,pins = <PIN_BANK PIN_BANK_IDX MUX &phandle>. 58 setting. The format is rockchip,pins = <PIN_BANK PIN_BANK_IDX MUX &phandle>.
@@ -54,7 +68,8 @@ Examples:
54 68
55pinctrl@20008000 { 69pinctrl@20008000 {
56 compatible = "rockchip,rk3066a-pinctrl"; 70 compatible = "rockchip,rk3066a-pinctrl";
57 reg = <0x20008000 0x150>; 71 rockchip,grf = <&grf>;
72
58 #address-cells = <1>; 73 #address-cells = <1>;
59 #size-cells = <1>; 74 #size-cells = <1>;
60 ranges; 75 ranges;
@@ -103,16 +118,15 @@ Example for rk3188:
103 118
104 pinctrl@20008000 { 119 pinctrl@20008000 {
105 compatible = "rockchip,rk3188-pinctrl"; 120 compatible = "rockchip,rk3188-pinctrl";
106 reg = <0x20008000 0xa0>, 121 rockchip,grf = <&grf>;
107 <0x20008164 0x1a0>; 122 rockchip,pmu = <&pmu>;
108 #address-cells = <1>; 123 #address-cells = <1>;
109 #size-cells = <1>; 124 #size-cells = <1>;
110 ranges; 125 ranges;
111 126
112 gpio0: gpio0@0x2000a000 { 127 gpio0: gpio0@0x2000a000 {
113 compatible = "rockchip,rk3188-gpio-bank0"; 128 compatible = "rockchip,rk3188-gpio-bank0";
114 reg = <0x2000a000 0x100>, 129 reg = <0x2000a000 0x100>;
115 <0x20004064 0x8>;
116 interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; 130 interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
117 clocks = <&clk_gates8 9>; 131 clocks = <&clk_gates8 9>;
118 132
diff --git a/Documentation/devicetree/bindings/power/reset/keystone-reset.txt b/Documentation/devicetree/bindings/power/reset/keystone-reset.txt
new file mode 100644
index 000000000000..c82f12e2d85c
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/reset/keystone-reset.txt
@@ -0,0 +1,67 @@
1* Device tree bindings for Texas Instruments keystone reset
2
3This node is intended to allow SoC reset in case of software reset
4of selected watchdogs.
5
6The Keystone SoCs can contain up to 4 watchdog timers to reset
7SoC. Each watchdog timer event input is connected to the Reset Mux
8block. The Reset Mux block can be configured to cause reset or not.
9
10Additionally soft or hard reset can be configured.
11
12Required properties:
13
14- compatible: ti,keystone-reset
15
16- ti,syscon-pll: phandle/offset pair. The phandle to syscon used to
17 access pll controller registers and the offset to use
18 reset control registers.
19
20- ti,syscon-dev: phandle/offset pair. The phandle to syscon used to
21 access device state control registers and the offset
22 in order to use mux block registers for all watchdogs.
23
24Optional properties:
25
26- ti,soft-reset: Boolean option indicating soft reset.
27 By default hard reset is used.
28
29- ti,wdt-list: WDT list that can cause SoC reset. It's not related
30 to WDT driver, it's just needed to enable a SoC related
31 reset that's triggered by one of WDTs. The list is
32 in format: <0>, <2>; It can be in random order and
33 begins from 0 to 3, as keystone can contain up to 4 SoC
34 reset watchdogs and can be in random order.
35
36Example 1:
37Setup keystone reset so that in case software reset or
38WDT0 is triggered it issues hard reset for SoC.
39
40pllctrl: pll-controller@02310000 {
41 compatible = "ti,keystone-pllctrl", "syscon";
42 reg = <0x02310000 0x200>;
43};
44
45devctrl: device-state-control@02620000 {
46 compatible = "ti,keystone-devctrl", "syscon";
47 reg = <0x02620000 0x1000>;
48};
49
50rstctrl: reset-controller {
51 compatible = "ti,keystone-reset";
52 ti,syscon-pll = <&pllctrl 0xe4>;
53 ti,syscon-dev = <&devctrl 0x328>;
54 ti,wdt-list = <0>;
55};
56
57Example 2:
58Setup keystone reset so that in case of software reset or
59WDT0 or WDT2 is triggered it issues soft reset for SoC.
60
61rstctrl: reset-controller {
62 compatible = "ti,keystone-reset";
63 ti,syscon-pll = <&pllctrl 0xe4>;
64 ti,syscon-dev = <&devctrl 0x328>;
65 ti,wdt-list = <0>, <2>;
66 ti,soft-reset;
67};
diff --git a/Documentation/devicetree/bindings/power_supply/axxia-reset.txt b/Documentation/devicetree/bindings/power_supply/axxia-reset.txt
new file mode 100644
index 000000000000..47e720d249d2
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/axxia-reset.txt
@@ -0,0 +1,20 @@
1Axxia Restart Driver
2
3This driver can do reset of the Axxia SoC. It uses the registers in the syscon
4block to initiate a chip reset.
5
6Required Properties:
7 -compatible: "lsi,axm55xx-reset"
8 -syscon: phandle to the syscon node.
9
10Example:
11
12 syscon: syscon@2010030000 {
13 compatible = "lsi,axxia-syscon", "syscon";
14 reg = <0x20 0x10030000 0 0x2000>;
15 };
16
17 reset: reset@2010031000 {
18 compatible = "lsi,axm55xx-reset";
19 syscon = <&syscon>;
20 };
diff --git a/Documentation/devicetree/bindings/powerpc/4xx/akebono.txt b/Documentation/devicetree/bindings/powerpc/4xx/akebono.txt
new file mode 100644
index 000000000000..db939210e29d
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/4xx/akebono.txt
@@ -0,0 +1,54 @@
1
2IBM Akebono board device tree
3=============================
4
5The IBM Akebono board is a development board for the PPC476GTR SoC.
6
70) The root node
8
9 Required properties:
10
11 - model : "ibm,akebono".
12 - compatible : "ibm,akebono" , "ibm,476gtr".
13
141.a) The Secure Digital Host Controller Interface (SDHCI) node
15
16 Represent the Secure Digital Host Controller Interfaces.
17
18 Required properties:
19
20 - compatible : should be "ibm,476gtr-sdhci","generic-sdhci".
21 - reg : should contain the SDHCI registers location and length.
22 - interrupt-parent : a phandle for the interrupt controller.
23 - interrupts : should contain the SDHCI interrupt.
24
251.b) The Advanced Host Controller Interface (AHCI) SATA node
26
27 Represents the advanced host controller SATA interface.
28
29 Required properties:
30
31 - compatible : should be "ibm,476gtr-ahci".
32 - reg : should contain the AHCI registers location and length.
33 - interrupt-parent : a phandle for the interrupt controller.
34 - interrupts : should contain the AHCI interrupt.
35
361.c) The FPGA node
37
38 The Akebono board stores some board information such as the revision
39 number in an FPGA which is represented by this node.
40
41 Required properties:
42
43 - compatible : should be "ibm,akebono-fpga".
44 - reg : should contain the FPGA registers location and length.
45
461.d) The AVR node
47
48 The Akebono board has an Atmel AVR microprocessor attached to the I2C
49 bus as a power controller for the board.
50
51 Required properties:
52
53 - compatible : should be "ibm,akebono-avr".
54 - reg : should contain the I2C bus address for the AVR.
diff --git a/Documentation/devicetree/bindings/powerpc/4xx/hsta.txt b/Documentation/devicetree/bindings/powerpc/4xx/hsta.txt
new file mode 100644
index 000000000000..c737c8338705
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/4xx/hsta.txt
@@ -0,0 +1,19 @@
1
2ppc476gtr High Speed Serial Assist (HSTA) node
3==============================================
4
5The 476gtr SoC contains a high speed serial assist module attached
6between the plb4 and plb6 system buses to provide high speed data
7transfer between memory and system peripherals as well as support for
8PCI message signalled interrupts.
9
10Currently only the MSI support is used by Linux using the following
11device tree entries:
12
13Require properties:
14- compatible : "ibm,476gtr-hsta-msi", "ibm,hsta-msi"
15- reg : register mapping for the HSTA MSI space
16- interrupt-parent : parent controller for mapping interrupts
17- interrupts : ordered interrupt mapping for each MSI in the register
18 space. The first interrupt should be associated with a
19 register offset of 0x00, the second to 0x10, etc.
diff --git a/Documentation/devicetree/bindings/powerpc/4xx/reboot.txt b/Documentation/devicetree/bindings/powerpc/4xx/reboot.txt
index d7217260589c..5bc63551319e 100644
--- a/Documentation/devicetree/bindings/powerpc/4xx/reboot.txt
+++ b/Documentation/devicetree/bindings/powerpc/4xx/reboot.txt
@@ -1,7 +1,7 @@
1Reboot property to control system reboot on PPC4xx systems: 1Reboot property to control system reboot on PPC4xx systems:
2 2
3By setting "reset_type" to one of the following values, the default 3By setting "reset_type" to one of the following values, the default
4software reset mechanism may be overidden. Here the possible values of 4software reset mechanism may be overridden. Here the possible values of
5"reset_type": 5"reset_type":
6 6
7 1 - PPC4xx core reset 7 1 - PPC4xx core reset
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/board.txt b/Documentation/devicetree/bindings/powerpc/fsl/board.txt
index 380914e965e0..700dec4774fa 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/board.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/board.txt
@@ -67,3 +67,20 @@ Example:
67 gpio-controller; 67 gpio-controller;
68 }; 68 };
69 }; 69 };
70
71* Freescale on-board FPGA connected on I2C bus
72
73Some Freescale boards like BSC9132QDS have on board FPGA connected on
74the i2c bus.
75
76Required properties:
77- compatible: Should be a board-specific string followed by a string
78 indicating the type of FPGA. Example:
79 "fsl,<board>-fpga", "fsl,fpga-qixis-i2c"
80- reg: Should contain the address of the FPGA
81
82Example:
83 fpga: fpga@66 {
84 compatible = "fsl,bsc9132qds-fpga", "fsl,fpga-qixis-i2c";
85 reg = <0x66>;
86 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/ccf.txt b/Documentation/devicetree/bindings/powerpc/fsl/ccf.txt
new file mode 100644
index 000000000000..454da7e08acd
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/ccf.txt
@@ -0,0 +1,46 @@
1Freescale CoreNet Coherency Fabric(CCF) Device Tree Binding
2
3DESCRIPTION
4
5The CoreNet coherency fabric is a fabric-oriented, connectivity infrastructure
6that enables the implementation of coherent, multicore systems.
7
8Required properties:
9
10- compatible: <string list>
11 fsl,corenet1-cf - CoreNet coherency fabric version 1.
12 Example chips: T4240, B4860
13
14 fsl,corenet2-cf - CoreNet coherency fabric version 2.
15 Example chips: P5040, P5020, P4080, P3041, P2041
16
17 fsl,corenet-cf - Used to represent the common registers
18 between CCF version 1 and CCF version 2. This compatible
19 is retained for compatibility reasons, as it was already
20 used for both CCF version 1 chips and CCF version 2
21 chips. It should be specified after either
22 "fsl,corenet1-cf" or "fsl,corenet2-cf".
23
24- reg: <prop-encoded-array>
25 A standard property. Represents the CCF registers.
26
27- interrupts: <prop-encoded-array>
28 Interrupt mapping for CCF error interrupt.
29
30- fsl,ccf-num-csdids: <u32>
31 Specifies the number of Coherency Subdomain ID Port Mapping
32 Registers that are supported by the CCF.
33
34- fsl,ccf-num-snoopids: <u32>
35 Specifies the number of Snoop ID Port Mapping Registers that
36 are supported by CCF.
37
38Example:
39
40 corenet-cf@18000 {
41 compatible = "fsl,corenet2-cf", "fsl,corenet-cf";
42 reg = <0x18000 0x1000>;
43 interrupts = <16 2 1 31>;
44 fsl,ccf-num-csdids = <32>;
45 fsl,ccf-num-snoopids = <32>;
46 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cpus.txt b/Documentation/devicetree/bindings/powerpc/fsl/cpus.txt
index 922c30ad90d1..f8cd2397aa04 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/cpus.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/cpus.txt
@@ -20,3 +20,14 @@ PROPERTIES
20 a property named fsl,eref-[CAT], where [CAT] is the abbreviated category 20 a property named fsl,eref-[CAT], where [CAT] is the abbreviated category
21 name with all uppercase letters converted to lowercase, indicates that 21 name with all uppercase letters converted to lowercase, indicates that
22 the category is supported by the implementation. 22 the category is supported by the implementation.
23
24 - fsl,portid-mapping
25 Usage: optional
26 Value type: <u32>
27 Definition: The Coherency Subdomain ID Port Mapping Registers and
28 Snoop ID Port Mapping registers, which are part of the CoreNet
29 Coherency fabric (CCF), provide a CoreNet Coherency Subdomain
30 ID/CoreNet Snoop ID to cpu mapping functions. Certain bits from
31 these registers should be set if the coresponding CPU should be
32 snooped. This property defines a bitmask which selects the bit
33 that should be set if this cpu should be snooped.
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/dcsr.txt b/Documentation/devicetree/bindings/powerpc/fsl/dcsr.txt
index 9d54eb5a295f..18a88100af94 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/dcsr.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/dcsr.txt
@@ -82,7 +82,7 @@ PROPERTIES
82 Which event source asserted the interrupt is captured in an EPU 82 Which event source asserted the interrupt is captured in an EPU
83 Interrupt Status Register (EPISR0,EPISR1). 83 Interrupt Status Register (EPISR0,EPISR1).
84 84
85 Interrupt numbers are lised in order (perfmon, event0, event1). 85 Interrupt numbers are listed in order (perfmon, event0, event1).
86 86
87 - interrupt-parent 87 - interrupt-parent
88 Usage: required 88 Usage: required
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/pamu.txt b/Documentation/devicetree/bindings/powerpc/fsl/pamu.txt
index 1f5e329f756c..c2b2899885f2 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/pamu.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/pamu.txt
@@ -34,6 +34,15 @@ Optional properties:
34 for legacy drivers. 34 for legacy drivers.
35- interrupt-parent : <phandle> 35- interrupt-parent : <phandle>
36 Phandle to interrupt controller 36 Phandle to interrupt controller
37- fsl,portid-mapping : <u32>
38 The Coherency Subdomain ID Port Mapping Registers and
39 Snoop ID Port Mapping registers, which are part of the
40 CoreNet Coherency fabric (CCF), provide a CoreNet
41 Coherency Subdomain ID/CoreNet Snoop ID to pamu mapping
42 functions. Certain bits from these registers should be
43 set if PAMUs should be snooped. This property defines
44 a bitmask which selects the bits that should be set if
45 PAMUs should be snooped.
37 46
38Child nodes: 47Child nodes:
39 48
@@ -88,6 +97,7 @@ Example:
88 compatible = "fsl,pamu-v1.0", "fsl,pamu"; 97 compatible = "fsl,pamu-v1.0", "fsl,pamu";
89 reg = <0x20000 0x5000>; 98 reg = <0x20000 0x5000>;
90 ranges = <0 0x20000 0x5000>; 99 ranges = <0 0x20000 0x5000>;
100 fsl,portid-mapping = <0xf80000>;
91 #address-cells = <1>; 101 #address-cells = <1>;
92 #size-cells = <1>; 102 #size-cells = <1>;
93 interrupts = < 103 interrupts = <
diff --git a/Documentation/devicetree/bindings/pwm/bcm-kona-pwm.txt b/Documentation/devicetree/bindings/pwm/bcm-kona-pwm.txt
new file mode 100644
index 000000000000..8eae9fe7841c
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/bcm-kona-pwm.txt
@@ -0,0 +1,21 @@
1Broadcom Kona PWM controller device tree bindings
2
3This controller has 6 channels.
4
5Required Properties :
6- compatible: should contain "brcm,kona-pwm"
7- reg: physical base address and length of the controller's registers
8- clocks: phandle + clock specifier pair for the external clock
9- #pwm-cells: Should be 3. See pwm.txt in this directory for a
10 description of the cells format.
11
12Refer to clocks/clock-bindings.txt for generic clock consumer properties.
13
14Example:
15
16pwm: pwm@3e01a000 {
17 compatible = "brcm,bcm11351-pwm", "brcm,kona-pwm";
18 reg = <0x3e01a000 0xc4>;
19 clocks = <&pwm_clk>;
20 #pwm-cells = <3>;
21};
diff --git a/Documentation/devicetree/bindings/regulator/ltc3589.txt b/Documentation/devicetree/bindings/regulator/ltc3589.txt
new file mode 100644
index 000000000000..801053036146
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/ltc3589.txt
@@ -0,0 +1,99 @@
1Linear Technology LTC3589, LTC3589-1, and LTC3589-2 8-output regulators
2
3Required properties:
4- compatible: "lltc,ltc3589", "lltc,ltc3589-1" or "lltc,ltc3589-2"
5- reg: I2C slave address
6
7Required child node:
8- regulators: Contains eight regulator child nodes sw1, sw2, sw3, bb-out,
9 ldo1, ldo2, ldo3, and ldo4, specifying the initialization data as
10 documented in Documentation/devicetree/bindings/regulator/regulator.txt.
11
12Each regulator is defined using the standard binding for regulators. The
13nodes for sw1, sw2, sw3, bb-out, ldo1, and ldo2 additionally need to specify
14the resistor values of their external feedback voltage dividers:
15
16Required properties (not on ldo3, ldo4):
17- lltc,fb-voltage-divider: An array of two integers containing the resistor
18 values R1 and R2 of the feedback voltage divider in ohms.
19
20Regulators sw1, sw2, sw3, and ldo2 can regulate the feedback reference from
210.3625 V to 0.75 V in 12.5 mV steps. The output voltage thus ranges between
220.3625 * (1 + R1/R2) V and 0.75 * (1 + R1/R2) V. Regulators bb-out and ldo1
23have a fixed 0.8 V reference and thus output 0.8 * (1 + R1/R2) V. The ldo3
24regulator is fixed to 1.8 V on LTC3589 and to 2.8 V on LTC3589-1,2. The ldo4
25regulator can output between 1.8 V and 3.3 V on LTC3589 and between 1.2 V
26and 3.2 V on LTC3589-1,2 in four steps. The ldo1 standby regulator can not
27be disabled and thus should have the regulator-always-on property set.
28
29Example:
30
31 ltc3589: pmic@34 {
32 compatible = "lltc,ltc3589-1";
33 reg = <0x34>;
34
35 regulators {
36 sw1_reg: sw1 {
37 regulator-min-microvolt = <591930>;
38 regulator-max-microvolt = <1224671>;
39 lltc,fb-voltage-divider = <100000 158000>;
40 regulator-ramp-delay = <7000>;
41 regulator-boot-on;
42 regulator-always-on;
43 };
44
45 sw2_reg: sw2 {
46 regulator-min-microvolt = <704123>;
47 regulator-max-microvolt = <1456803>;
48 lltc,fb-voltage-divider = <180000 191000>;
49 regulator-ramp-delay = <7000>;
50 regulator-boot-on;
51 regulator-always-on;
52 };
53
54 sw3_reg: sw3 {
55 regulator-min-microvolt = <1341250>;
56 regulator-max-microvolt = <2775000>;
57 lltc,fb-voltage-divider = <270000 100000>;
58 regulator-ramp-delay = <7000>;
59 regulator-boot-on;
60 regulator-always-on;
61 };
62
63 bb_out_reg: bb-out {
64 regulator-min-microvolt = <3387341>;
65 regulator-max-microvolt = <3387341>;
66 lltc,fb-voltage-divider = <511000 158000>;
67 regulator-boot-on;
68 regulator-always-on;
69 };
70
71 ldo1_reg: ldo1 {
72 regulator-min-microvolt = <1306329>;
73 regulator-max-microvolt = <1306329>;
74 lltc,fb-voltage-divider = <100000 158000>;
75 regulator-boot-on;
76 regulator-always-on;
77 };
78
79 ldo2_reg: ldo2 {
80 regulator-min-microvolt = <704123>;
81 regulator-max-microvolt = <1456806>;
82 lltc,fb-voltage-divider = <180000 191000>;
83 regulator-ramp-delay = <7000>;
84 regulator-boot-on;
85 regulator-always-on;
86 };
87
88 ldo3_reg: ldo3 {
89 regulator-min-microvolt = <2800000>;
90 regulator-max-microvolt = <2800000>;
91 regulator-boot-on;
92 };
93
94 ldo4_reg: ldo4 {
95 regulator-min-microvolt = <1200000>;
96 regulator-max-microvolt = <3200000>;
97 };
98 };
99 };
diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt
index e2c7f1e7251a..86074334e342 100644
--- a/Documentation/devicetree/bindings/regulator/regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/regulator.txt
@@ -12,7 +12,7 @@ Optional properties:
12- regulator-allow-bypass: allow the regulator to go into bypass mode 12- regulator-allow-bypass: allow the regulator to go into bypass mode
13- <name>-supply: phandle to the parent supply/regulator node 13- <name>-supply: phandle to the parent supply/regulator node
14- regulator-ramp-delay: ramp delay for regulator(in uV/uS) 14- regulator-ramp-delay: ramp delay for regulator(in uV/uS)
15 For hardwares which support disabling ramp rate, it should be explicitly 15 For hardware which supports disabling ramp rate, it should be explicitly
16 intialised to zero (regulator-ramp-delay = <0>) for disabling ramp delay. 16 intialised to zero (regulator-ramp-delay = <0>) for disabling ramp delay.
17- regulator-enable-ramp-delay: The time taken, in microseconds, for the supply 17- regulator-enable-ramp-delay: The time taken, in microseconds, for the supply
18 rail to reach the target voltage, plus/minus whatever tolerance the board 18 rail to reach the target voltage, plus/minus whatever tolerance the board
diff --git a/Documentation/devicetree/bindings/regulator/tps65090.txt b/Documentation/devicetree/bindings/regulator/tps65090.txt
index 313a60ba61d8..340980239ea9 100644
--- a/Documentation/devicetree/bindings/regulator/tps65090.txt
+++ b/Documentation/devicetree/bindings/regulator/tps65090.txt
@@ -21,6 +21,10 @@ Optional properties:
21 number should be provided. If it is externally controlled and no GPIO 21 number should be provided. If it is externally controlled and no GPIO
22 entry then driver will just configure this rails as external control 22 entry then driver will just configure this rails as external control
23 and will not provide any enable/disable APIs. 23 and will not provide any enable/disable APIs.
24- ti,overcurrent-wait: This is applicable to FET registers, which have a
25 poorly defined "overcurrent wait" field. If this property is present it
26 should be between 0 - 3. If this property isn't present we won't touch the
27 "overcurrent wait" field and we'll leave it to the BIOS/EC to deal with.
24 28
25Each regulator is defined using the standard binding for regulators. 29Each regulator is defined using the standard binding for regulators.
26 30
diff --git a/Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt b/Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt
new file mode 100644
index 000000000000..c8f775714887
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt
@@ -0,0 +1,21 @@
1Allwinner sunxi Peripheral Reset Controller
2===========================================
3
4Please also refer to reset.txt in this directory for common reset
5controller binding usage.
6
7Required properties:
8- compatible: Should be one of the following:
9 "allwinner,sun6i-a31-ahb1-reset"
10 "allwinner,sun6i-a31-clock-reset"
11- reg: should be register base and length as documented in the
12 datasheet
13- #reset-cells: 1, see below
14
15example:
16
17ahb1_rst: reset@01c202c0 {
18 #reset-cells = <1>;
19 compatible = "allwinner,sun6i-a31-ahb1-reset";
20 reg = <0x01c202c0 0xc>;
21};
diff --git a/Documentation/devicetree/bindings/arm/altera/socfpga-reset.txt b/Documentation/devicetree/bindings/reset/socfpga-reset.txt
index ecdb57d69dbf..32c1c8bfd5dc 100644
--- a/Documentation/devicetree/bindings/arm/altera/socfpga-reset.txt
+++ b/Documentation/devicetree/bindings/reset/socfpga-reset.txt
@@ -3,9 +3,11 @@ Altera SOCFPGA Reset Manager
3Required properties: 3Required properties:
4- compatible : "altr,rst-mgr" 4- compatible : "altr,rst-mgr"
5- reg : Should contain 1 register ranges(address and length) 5- reg : Should contain 1 register ranges(address and length)
6- #reset-cells: 1
6 7
7Example: 8Example:
8 rstmgr@ffd05000 { 9 rstmgr@ffd05000 {
10 #reset-cells = <1>;
9 compatible = "altr,rst-mgr"; 11 compatible = "altr,rst-mgr";
10 reg = <0xffd05000 0x1000>; 12 reg = <0xffd05000 0x1000>;
11 }; 13 };
diff --git a/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt b/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt
index 31406fd4a43e..5c199ee044cb 100644
--- a/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt
+++ b/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt
@@ -9,6 +9,9 @@ Required properties:
9- interrupts: rtc alarm/event interrupt 9- interrupts: rtc alarm/event interrupt
10- #clock-cells: the value should be 0 10- #clock-cells: the value should be 0
11 11
12Optional properties:
13- clock-output-names: From common clock binding
14
12Example: 15Example:
13 16
14hym8563: hym8563@51 { 17hym8563: hym8563@51 {
diff --git a/Documentation/devicetree/bindings/rtc/xgene-rtc.txt b/Documentation/devicetree/bindings/rtc/xgene-rtc.txt
new file mode 100644
index 000000000000..fd195c358446
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/xgene-rtc.txt
@@ -0,0 +1,28 @@
1* APM X-Gene Real Time Clock
2
3RTC controller for the APM X-Gene Real Time Clock
4
5Required properties:
6- compatible : Should be "apm,xgene-rtc"
7- reg: physical base address of the controller and length of memory mapped
8 region.
9- interrupts: IRQ line for the RTC.
10- #clock-cells: Should be 1.
11- clocks: Reference to the clock entry.
12
13Example:
14
15rtcclk: rtcclk {
16 compatible = "fixed-clock";
17 #clock-cells = <1>;
18 clock-frequency = <100000000>;
19 clock-output-names = "rtcclk";
20};
21
22rtc: rtc@10510000 {
23 compatible = "apm,xgene-rtc";
24 reg = <0x0 0x10510000 0x0 0x400>;
25 interrupts = <0x0 0x46 0x4>;
26 #clock-cells = <1>;
27 clocks = <&rtcclk 0>;
28};
diff --git a/Documentation/devicetree/bindings/serial/atmel-usart.txt b/Documentation/devicetree/bindings/serial/atmel-usart.txt
index 17c1042b2df8..a6391e70a8fd 100644
--- a/Documentation/devicetree/bindings/serial/atmel-usart.txt
+++ b/Documentation/devicetree/bindings/serial/atmel-usart.txt
@@ -13,8 +13,9 @@ Required properties:
13Optional properties: 13Optional properties:
14- atmel,use-dma-rx: use of PDC or DMA for receiving data 14- atmel,use-dma-rx: use of PDC or DMA for receiving data
15- atmel,use-dma-tx: use of PDC or DMA for transmitting data 15- atmel,use-dma-tx: use of PDC or DMA for transmitting data
16- rts-gpios: specify a GPIO for RTS line. It will use specified PIO instead of the peripheral 16- {rts,cts,dtr,dsr,rng,dcd}-gpios: specify a GPIO for RTS/CTS/DTR/DSR/RI/DCD line respectively.
17 function pin for the USART RTS feature. If unsure, don't specify this property. 17 It will use specified PIO instead of the peripheral function pin for the USART feature.
18 If unsure, don't specify this property.
18- add dma bindings for dma transfer: 19- add dma bindings for dma transfer:
19 - dmas: DMA specifier, consisting of a phandle to DMA controller node, 20 - dmas: DMA specifier, consisting of a phandle to DMA controller node,
20 memory peripheral interface and USART DMA channel ID, FIFO configuration. 21 memory peripheral interface and USART DMA channel ID, FIFO configuration.
@@ -35,7 +36,12 @@ Example:
35 clock-names = "usart"; 36 clock-names = "usart";
36 atmel,use-dma-rx; 37 atmel,use-dma-rx;
37 atmel,use-dma-tx; 38 atmel,use-dma-tx;
38 rts-gpios = <&pioD 15 0>; 39 rts-gpios = <&pioD 15 GPIO_ACTIVE_LOW>;
40 cts-gpios = <&pioD 16 GPIO_ACTIVE_LOW>;
41 dtr-gpios = <&pioD 17 GPIO_ACTIVE_LOW>;
42 dsr-gpios = <&pioD 18 GPIO_ACTIVE_LOW>;
43 dcd-gpios = <&pioD 20 GPIO_ACTIVE_LOW>;
44 rng-gpios = <&pioD 19 GPIO_ACTIVE_LOW>;
39 }; 45 };
40 46
41- use DMA: 47- use DMA:
diff --git a/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.txt b/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.txt
new file mode 100644
index 000000000000..246c795668dc
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.txt
@@ -0,0 +1,33 @@
1* NXP SC16IS7xx advanced Universal Asynchronous Receiver-Transmitter (UART)
2
3Required properties:
4- compatible: Should be one of the following:
5 - "nxp,sc16is740" for NXP SC16IS740,
6 - "nxp,sc16is741" for NXP SC16IS741,
7 - "nxp,sc16is750" for NXP SC16IS750,
8 - "nxp,sc16is752" for NXP SC16IS752,
9 - "nxp,sc16is760" for NXP SC16IS760,
10 - "nxp,sc16is762" for NXP SC16IS762.
11- reg: I2C address of the SC16IS7xx device.
12- interrupt-parent: The phandle for the interrupt controller that
13 services interrupts for this IC.
14- interrupts: Should contain the UART interrupt
15- clocks: Reference to the IC source clock.
16
17Optional properties:
18- gpio-controller: Marks the device node as a GPIO controller.
19- #gpio-cells: Should be two. The first cell is the GPIO number and
20 the second cell is used to specify the GPIO polarity:
21 0 = active high,
22 1 = active low.
23
24Example:
25 sc16is750: sc16is750@51 {
26 compatible = "nxp,sc16is750";
27 reg = <0x51>;
28 clocks = <&clk20m>;
29 interrupt-parent = <&gpio3>;
30 interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
31 gpio-controller;
32 #gpio-cells = <2>;
33 };
diff --git a/Documentation/devicetree/bindings/serial/of-serial.txt b/Documentation/devicetree/bindings/serial/of-serial.txt
index 1928a3e83cd0..77054772a8f4 100644
--- a/Documentation/devicetree/bindings/serial/of-serial.txt
+++ b/Documentation/devicetree/bindings/serial/of-serial.txt
@@ -37,6 +37,7 @@ Optional properties:
37- auto-flow-control: one way to enable automatic flow control support. The 37- auto-flow-control: one way to enable automatic flow control support. The
38 driver is allowed to detect support for the capability even without this 38 driver is allowed to detect support for the capability even without this
39 property. 39 property.
40- has-hw-flow-control: the hardware has flow control capability.
40 41
41Example: 42Example:
42 43
diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
index 53e6c175db6c..b3556609a06f 100644
--- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
@@ -4,6 +4,14 @@ Required properties:
4 4
5 - compatible: Must contain one of the following: 5 - compatible: Must contain one of the following:
6 6
7 - "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART.
8 - "renesas,scifb-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFB compatible UART.
9 - "renesas,scifa-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFA compatible UART.
10 - "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART.
11 - "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART.
12 - "renesas,scifb-r8a7740" for R8A7740 (R-Mobile A1) SCIFB compatible UART.
13 - "renesas,scif-r8a7778" for R8A7778 (R-Car M1) SCIF compatible UART.
14 - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
7 - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART. 15 - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
8 - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART. 16 - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART.
9 - "renesas,scifb-r8a7790" for R8A7790 (R-Car H2) SCIFB compatible UART. 17 - "renesas,scifb-r8a7790" for R8A7790 (R-Car H2) SCIFB compatible UART.
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,gsbi.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,gsbi.txt
new file mode 100644
index 000000000000..4ce24d425bf1
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,gsbi.txt
@@ -0,0 +1,78 @@
1QCOM GSBI (General Serial Bus Interface) Driver
2
3The GSBI controller is modeled as a node with zero or more child nodes, each
4representing a serial sub-node device that is mux'd as part of the GSBI
5configuration settings. The mode setting will govern the input/output mode of
6the 4 GSBI IOs.
7
8Required properties:
9- compatible: must contain "qcom,gsbi-v1.0.0" for APQ8064/IPQ8064
10- reg: Address range for GSBI registers
11- clocks: required clock
12- clock-names: must contain "iface" entry
13- qcom,mode : indicates MUX value for configuration of the serial interface.
14 Please reference dt-bindings/soc/qcom,gsbi.h for valid mux values.
15
16Optional properties:
17- qcom,crci : indicates CRCI MUX value for QUP CRCI ports. Please reference
18 dt-bindings/soc/qcom,gsbi.h for valid CRCI mux values.
19
20Required properties if child node exists:
21- #address-cells: Must be 1
22- #size-cells: Must be 1
23- ranges: Must be present
24
25Properties for children:
26
27A GSBI controller node can contain 0 or more child nodes representing serial
28devices. These serial devices can be a QCOM UART, I2C controller, spi
29controller, or some combination of aforementioned devices.
30
31See the following for child node definitions:
32Documentation/devicetree/bindings/i2c/qcom,i2c-qup.txt
33Documentation/devicetree/bindings/spi/qcom,spi-qup.txt
34Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt
35
36Example for APQ8064:
37
38#include <dt-bindings/soc/qcom,gsbi.h>
39
40 gsbi4@16300000 {
41 compatible = "qcom,gsbi-v1.0.0";
42 reg = <0x16300000 0x100>;
43 clocks = <&gcc GSBI4_H_CLK>;
44 clock-names = "iface";
45 #address-cells = <1>;
46 #size-cells = <1>;
47 ranges;
48 qcom,mode = <GSBI_PROT_I2C_UART>;
49 qcom,crci = <GSBI_CRCI_QUP>;
50
51 /* child nodes go under here */
52
53 i2c_qup4: i2c@16380000 {
54 compatible = "qcom,i2c-qup-v1.1.1";
55 reg = <0x16380000 0x1000>;
56 interrupts = <0 153 0>;
57
58 clocks = <&gcc GSBI4_QUP_CLK>, <&gcc GSBI4_H_CLK>;
59 clock-names = "core", "iface";
60
61 clock-frequency = <200000>;
62
63 #address-cells = <1>;
64 #size-cells = <0>;
65
66 };
67
68 uart4: serial@16340000 {
69 compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
70 reg = <0x16340000 0x1000>,
71 <0x16300000 0x1000>;
72 interrupts = <0 152 0x0>;
73 clocks = <&gcc GSBI4_UART_CLK>, <&gcc GSBI4_H_CLK>;
74 clock-names = "core", "iface";
75 status = "ok";
76 };
77 };
78
diff --git a/Documentation/devicetree/bindings/sound/ak4104.txt b/Documentation/devicetree/bindings/sound/ak4104.txt
index b902ee39cf89..deca5e18f304 100644
--- a/Documentation/devicetree/bindings/sound/ak4104.txt
+++ b/Documentation/devicetree/bindings/sound/ak4104.txt
@@ -8,6 +8,8 @@ Required properties:
8 8
9 - reg : The chip select number on the SPI bus 9 - reg : The chip select number on the SPI bus
10 10
11 - vdd-supply : A regulator node, providing 2.7V - 3.6V
12
11Optional properties: 13Optional properties:
12 14
13 - reset-gpio : a GPIO spec for the reset pin. If specified, it will be 15 - reset-gpio : a GPIO spec for the reset pin. If specified, it will be
@@ -19,4 +21,5 @@ spdif: ak4104@0 {
19 compatible = "asahi-kasei,ak4104"; 21 compatible = "asahi-kasei,ak4104";
20 reg = <0>; 22 reg = <0>;
21 spi-max-frequency = <5000000>; 23 spi-max-frequency = <5000000>;
24 vdd-supply = <&vdd_3v3_reg>;
22}; 25};
diff --git a/Documentation/devicetree/bindings/sound/alc5623.txt b/Documentation/devicetree/bindings/sound/alc5623.txt
new file mode 100644
index 000000000000..26c86c98d671
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/alc5623.txt
@@ -0,0 +1,25 @@
1ALC5621/ALC5622/ALC5623 audio Codec
2
3Required properties:
4
5 - compatible: "realtek,alc5623"
6 - reg: the I2C address of the device.
7
8Optional properties:
9
10 - add-ctrl: Default register value for Reg-40h, Additional Control
11 Register. If absent or has the value of 0, the
12 register is untouched.
13
14 - jack-det-ctrl: Default register value for Reg-5Ah, Jack Detect
15 Control Register. If absent or has value 0, the
16 register is untouched.
17
18Example:
19
20 alc5621: alc5621@1a {
21 compatible = "alc5621";
22 reg = <0x1a>;
23 add-ctrl = <0x3700>;
24 jack-det-ctrl = <0x4810>;
25 };
diff --git a/Documentation/devicetree/bindings/sound/cs42l56.txt b/Documentation/devicetree/bindings/sound/cs42l56.txt
new file mode 100644
index 000000000000..4feb0eb27ea4
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/cs42l56.txt
@@ -0,0 +1,63 @@
1CS42L52 audio CODEC
2
3Required properties:
4
5 - compatible : "cirrus,cs42l56"
6
7 - reg : the I2C address of the device for I2C
8
9 - VA-supply, VCP-supply, VLDO-supply : power supplies for the device,
10 as covered in Documentation/devicetree/bindings/regulator/regulator.txt.
11
12Optional properties:
13
14 - cirrus,gpio-nreset : GPIO controller's phandle and the number
15 of the GPIO used to reset the codec.
16
17 - cirrus,chgfreq-divisor : Values used to set the Charge Pump Frequency.
18 Allowable values of 0x00 through 0x0F. These are raw values written to the
19 register, not the actual frequency. The frequency is determined by the following.
20 Frequency = MCLK / 4 * (N+2)
21 N = chgfreq_val
22 MCLK = Where MCLK is the frequency of the mclk signal after the MCLKDIV2 circuit.
23
24 - cirrus,ain1a-ref-cfg, ain1b-ref-cfg : boolean, If present, AIN1A or AIN1B are configured
25 as a pseudo-differential input referenced to AIN1REF/AIN3A.
26
27 - cirrus,ain2a-ref-cfg, ain2b-ref-cfg : boolean, If present, AIN2A or AIN2B are configured
28 as a pseudo-differential input referenced to AIN2REF/AIN3B.
29
30 - cirrus,micbias-lvl: Set the output voltage level on the MICBIAS Pin.
31 0 = 0.5 x VA
32 1 = 0.6 x VA
33 2 = 0.7 x VA
34 3 = 0.8 x VA
35 4 = 0.83 x VA
36 5 = 0.91 x VA
37
38 - cirrus,adaptive-pwr-cfg : Configures how the power to the Headphone and Lineout
39 Amplifiers adapt to the output signal levels.
40 0 = Adapt to Volume Mode. Voltage level determined by the sum of the relevant volume settings.
41 1 = Fixed - Headphone and Line Amp supply = + or - VCP/2.
42 2 = Fixed - Headphone and Line Amp supply = + or - VCP.
43 3 = Adapted to Signal; Voltage level is dynamically determined by the output signal.
44
45 - cirrus,hpf-left-freq, hpf-right-freq : Sets the corner frequency (-3dB point) for the internal High-Pass
46 Filter.
47 0 = 1.8Hz
48 1 = 119Hz
49 2 = 236Hz
50 3 = 464Hz
51
52
53Example:
54
55codec: codec@4b {
56 compatible = "cirrus,cs42l56";
57 reg = <0x4b>;
58 gpio-reset = <&gpio 10 0>;
59 cirrus,chgfreq-divisor = <0x05>;
60 cirrus.ain1_ref_cfg;
61 cirrus,micbias-lvl = <5>;
62 VA-supply = <&reg_audio>;
63};
diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt b/Documentation/devicetree/bindings/sound/fsl-sai.txt
index 98611a6761c0..0f4e23828190 100644
--- a/Documentation/devicetree/bindings/sound/fsl-sai.txt
+++ b/Documentation/devicetree/bindings/sound/fsl-sai.txt
@@ -7,10 +7,11 @@ codec/DSP interfaces.
7 7
8 8
9Required properties: 9Required properties:
10- compatible: Compatible list, contains "fsl,vf610-sai". 10- compatible: Compatible list, contains "fsl,vf610-sai" or "fsl,imx6sx-sai".
11- reg: Offset and length of the register set for the device. 11- reg: Offset and length of the register set for the device.
12- clocks: Must contain an entry for each entry in clock-names. 12- clocks: Must contain an entry for each entry in clock-names.
13- clock-names : Must include the "sai" entry. 13- clock-names : Must include the "bus" for register access and "mclk1" "mclk2"
14 "mclk3" for bit clock and frame clock providing.
14- dmas : Generic dma devicetree binding as described in 15- dmas : Generic dma devicetree binding as described in
15 Documentation/devicetree/bindings/dma/dma.txt. 16 Documentation/devicetree/bindings/dma/dma.txt.
16- dma-names : Two dmas have to be defined, "tx" and "rx". 17- dma-names : Two dmas have to be defined, "tx" and "rx".
@@ -30,8 +31,10 @@ sai2: sai@40031000 {
30 reg = <0x40031000 0x1000>; 31 reg = <0x40031000 0x1000>;
31 pinctrl-names = "default"; 32 pinctrl-names = "default";
32 pinctrl-0 = <&pinctrl_sai2_1>; 33 pinctrl-0 = <&pinctrl_sai2_1>;
33 clocks = <&clks VF610_CLK_SAI2>; 34 clocks = <&clks VF610_CLK_PLATFORM_BUS>,
34 clock-names = "sai"; 35 <&clks VF610_CLK_SAI2>,
36 <&clks 0>, <&clks 0>;
37 clock-names = "bus", "mclk1", "mclk2", "mclk3";
35 dma-names = "tx", "rx"; 38 dma-names = "tx", "rx";
36 dmas = <&edma0 0 VF610_EDMA_MUXID0_SAI2_TX>, 39 dmas = <&edma0 0 VF610_EDMA_MUXID0_SAI2_TX>,
37 <&edma0 0 VF610_EDMA_MUXID0_SAI2_RX>; 40 <&edma0 0 VF610_EDMA_MUXID0_SAI2_RX>;
diff --git a/Documentation/devicetree/bindings/sound/max98090.txt b/Documentation/devicetree/bindings/sound/max98090.txt
index e4c8b36dcf89..a5e63fa47dc5 100644
--- a/Documentation/devicetree/bindings/sound/max98090.txt
+++ b/Documentation/devicetree/bindings/sound/max98090.txt
@@ -10,6 +10,12 @@ Required properties:
10 10
11- interrupts : The CODEC's interrupt output. 11- interrupts : The CODEC's interrupt output.
12 12
13Optional properties:
14
15- clocks: The phandle of the master clock to the CODEC
16
17- clock-names: Should be "mclk"
18
13Pins on the device (for linking into audio routes): 19Pins on the device (for linking into audio routes):
14 20
15 * MIC1 21 * MIC1
diff --git a/Documentation/devicetree/bindings/sound/max98095.txt b/Documentation/devicetree/bindings/sound/max98095.txt
new file mode 100644
index 000000000000..318a4c82f17f
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/max98095.txt
@@ -0,0 +1,22 @@
1MAX98095 audio CODEC
2
3This device supports I2C only.
4
5Required properties:
6
7- compatible : "maxim,max98095".
8
9- reg : The I2C address of the device.
10
11Optional properties:
12
13- clocks: The phandle of the master clock to the CODEC
14
15- clock-names: Should be "mclk"
16
17Example:
18
19max98095: codec@11 {
20 compatible = "maxim,max98095";
21 reg = <0x11>;
22};
diff --git a/Documentation/devicetree/bindings/sound/nokia,rx51.txt b/Documentation/devicetree/bindings/sound/nokia,rx51.txt
new file mode 100644
index 000000000000..72f93d996273
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/nokia,rx51.txt
@@ -0,0 +1,27 @@
1* Nokia N900 audio setup
2
3Required properties:
4- compatible: Should contain "nokia,n900-audio"
5- nokia,cpu-dai: phandle for the McBSP node
6- nokia,audio-codec: phandles for the main TLV320AIC3X node and the
7 auxiliary TLV320AIC3X node (in this order)
8- nokia,headphone-amplifier: phandle for the TPA6130A2 node
9- tvout-selection-gpios: GPIO for tvout selection
10- jack-detection-gpios: GPIO for jack detection
11- eci-switch-gpios: GPIO for ECI (Enhancement Control Interface) switch
12- speaker-amplifier-gpios: GPIO for speaker amplifier
13
14Example:
15
16sound {
17 compatible = "nokia,n900-audio";
18
19 nokia,cpu-dai = <&mcbsp2>;
20 nokia,audio-codec = <&tlv320aic3x>, <&tlv320aic3x_aux>;
21 nokia,headphone-amplifier = <&tpa6130a2>;
22
23 tvout-selection-gpios = <&gpio2 8 GPIO_ACTIVE_HIGH>; /* 40 */
24 jack-detection-gpios = <&gpio6 17 GPIO_ACTIVE_HIGH>; /* 177 */
25 eci-switch-gpios = <&gpio6 22 GPIO_ACTIVE_HIGH>; /* 182 */
26 speaker-amplifier-gpios = <&twl_gpio 7 GPIO_ACTIVE_HIGH>;
27};
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.txt
new file mode 100644
index 000000000000..b4730c2822bc
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.txt
@@ -0,0 +1,28 @@
1NVIDIA Tegra30 HDA controller
2
3Required properties:
4- compatible : "nvidia,tegra30-hda"
5- reg : Should contain the HDA registers location and length.
6- interrupts : The interrupt from the HDA controller.
7- clocks : Must contain an entry for each required entry in clock-names.
8 See ../clocks/clock-bindings.txt for details.
9- clock-names : Must include the following entries: hda, hdacodec_2x, hda2hdmi
10- resets : Must contain an entry for each entry in reset-names.
11 See ../reset/reset.txt for details.
12- reset-names : Must include the following entries: hda, hdacodec_2x, hda2hdmi
13
14Example:
15
16hda@0,70030000 {
17 compatible = "nvidia,tegra124-hda", "nvidia,tegra30-hda";
18 reg = <0x0 0x70030000 0x0 0x10000>;
19 interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
20 clocks = <&tegra_car TEGRA124_CLK_HDA>,
21 <&tegra_car TEGRA124_CLK_HDA2HDMI>,
22 <&tegra_car TEGRA124_CLK_HDA2CODEC_2X>;
23 clock-names = "hda", "hda2hdmi", "hda2codec_2x";
24 resets = <&tegra_car 125>, /* hda */
25 <&tegra_car 128>; /* hda2hdmi */
26 <&tegra_car 111>, /* hda2codec_2x */
27 reset-names = "hda", "hda2hdmi", "hda2codec_2x";
28};
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
index a44e9179faf5..8346cab046cd 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
@@ -20,6 +20,7 @@ Required properties:
20SSI subnode properties: 20SSI subnode properties:
21- interrupts : Should contain SSI interrupt for PIO transfer 21- interrupts : Should contain SSI interrupt for PIO transfer
22- shared-pin : if shared clock pin 22- shared-pin : if shared clock pin
23- pio-transfer : use PIO transfer mode
23 24
24SRC subnode properties: 25SRC subnode properties:
25no properties at this point 26no properties at this point
diff --git a/Documentation/devicetree/bindings/sound/rt5640.txt b/Documentation/devicetree/bindings/sound/rt5640.txt
index 068a1141b06f..bac4d9ac1edc 100644
--- a/Documentation/devicetree/bindings/sound/rt5640.txt
+++ b/Documentation/devicetree/bindings/sound/rt5640.txt
@@ -1,10 +1,10 @@
1RT5640 audio CODEC 1RT5640/RT5639 audio CODEC
2 2
3This device supports I2C only. 3This device supports I2C only.
4 4
5Required properties: 5Required properties:
6 6
7- compatible : "realtek,rt5640". 7- compatible : One of "realtek,rt5640" or "realtek,rt5639".
8 8
9- reg : The I2C address of the device. 9- reg : The I2C address of the device.
10 10
@@ -18,7 +18,7 @@ Optional properties:
18 18
19- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin. 19- realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin.
20 20
21Pins on the device (for linking into audio routes): 21Pins on the device (for linking into audio routes) for RT5639/RT5640:
22 22
23 * DMIC1 23 * DMIC1
24 * DMIC2 24 * DMIC2
@@ -31,13 +31,16 @@ Pins on the device (for linking into audio routes):
31 * HPOR 31 * HPOR
32 * LOUTL 32 * LOUTL
33 * LOUTR 33 * LOUTR
34 * MONOP
35 * MONON
36 * SPOLP 34 * SPOLP
37 * SPOLN 35 * SPOLN
38 * SPORP 36 * SPORP
39 * SPORN 37 * SPORN
40 38
39Additional pins on the device for RT5640:
40
41 * MONOP
42 * MONON
43
41Example: 44Example:
42 45
43rt5640 { 46rt5640 {
diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
index 131aa2ad7f1a..c2e9841dfce4 100644
--- a/Documentation/devicetree/bindings/sound/simple-card.txt
+++ b/Documentation/devicetree/bindings/sound/simple-card.txt
@@ -1,6 +1,6 @@
1Simple-Card: 1Simple-Card:
2 2
3Simple-Card specifies audio DAI connection of SoC <-> codec. 3Simple-Card specifies audio DAI connections of SoC <-> codec.
4 4
5Required properties: 5Required properties:
6 6
@@ -10,26 +10,54 @@ Optional properties:
10 10
11- simple-audio-card,name : User specified audio sound card name, one string 11- simple-audio-card,name : User specified audio sound card name, one string
12 property. 12 property.
13- simple-audio-card,format : CPU/CODEC common audio format.
14 "i2s", "right_j", "left_j" , "dsp_a"
15 "dsp_b", "ac97", "pdm", "msb", "lsb"
16- simple-audio-card,widgets : Please refer to widgets.txt. 13- simple-audio-card,widgets : Please refer to widgets.txt.
17- simple-audio-card,routing : A list of the connections between audio components. 14- simple-audio-card,routing : A list of the connections between audio components.
18 Each entry is a pair of strings, the first being the 15 Each entry is a pair of strings, the first being the
19 connection's sink, the second being the connection's 16 connection's sink, the second being the connection's
20 source. 17 source.
21- dai-tdm-slot-num : Please refer to tdm-slot.txt. 18- simple-audio-card,mclk-fs : Multiplication factor between stream rate and codec
22- dai-tdm-slot-width : Please refer to tdm-slot.txt. 19 mclk.
20
21Optional subnodes:
22
23- simple-audio-card,dai-link : Container for dai-link level
24 properties and the CPU and CODEC
25 sub-nodes. This container may be
26 omitted when the card has only one
27 DAI link. See the examples and the
28 section bellow.
29
30Dai-link subnode properties and subnodes:
31
32If dai-link subnode is omitted and the subnode properties are directly
33under "sound"-node the subnode property and subnode names have to be
34prefixed with "simple-audio-card,"-prefix.
23 35
24Required subnodes: 36Required dai-link subnodes:
25 37
26- simple-audio-card,dai-link : container for the CPU and CODEC sub-nodes 38- cpu : CPU sub-node
27 This container may be omitted when the 39- codec : CODEC sub-node
28 card has only one DAI link.
29 See the examples.
30 40
31- simple-audio-card,cpu : CPU sub-node 41Optional dai-link subnode properties:
32- simple-audio-card,codec : CODEC sub-node 42
43- format : CPU/CODEC common audio format.
44 "i2s", "right_j", "left_j" , "dsp_a"
45 "dsp_b", "ac97", "pdm", "msb", "lsb"
46- frame-master : Indicates dai-link frame master.
47 phandle to a cpu or codec subnode.
48- bitclock-master : Indicates dai-link bit clock master.
49 phandle to a cpu or codec subnode.
50- bitclock-inversion : bool property. Add this if the
51 dai-link uses bit clock inversion.
52- frame-inversion : bool property. Add this if the
53 dai-link uses frame clock inversion.
54
55For backward compatibility the frame-master and bitclock-master
56properties can be used as booleans in codec subnode to indicate if the
57codec is the dai-link frame or bit clock master. In this case there
58should be no dai-link node, the same properties should not be present
59at sound-node level, and the bitclock-inversion and frame-inversion
60properties should also be placed in the codec node if needed.
33 61
34Required CPU/CODEC subnodes properties: 62Required CPU/CODEC subnodes properties:
35 63
@@ -37,29 +65,21 @@ Required CPU/CODEC subnodes properties:
37 65
38Optional CPU/CODEC subnodes properties: 66Optional CPU/CODEC subnodes properties:
39 67
40- format : CPU/CODEC specific audio format if needed. 68- dai-tdm-slot-num : Please refer to tdm-slot.txt.
41 see simple-audio-card,format 69- dai-tdm-slot-width : Please refer to tdm-slot.txt.
42- frame-master : bool property. add this if subnode is frame master
43- bitclock-master : bool property. add this if subnode is bitclock master
44- bitclock-inversion : bool property. add this if subnode has clock inversion
45- frame-inversion : bool property. add this if subnode has frame inversion
46- clocks / system-clock-frequency : specify subnode's clock if needed. 70- clocks / system-clock-frequency : specify subnode's clock if needed.
47 it can be specified via "clocks" if system has 71 it can be specified via "clocks" if system has
48 clock node (= common clock), or "system-clock-frequency" 72 clock node (= common clock), or "system-clock-frequency"
49 (if system doens't support common clock) 73 (if system doens't support common clock)
50 74
51Note:
52 * For 'format', 'frame-master', 'bitclock-master', 'bitclock-inversion' and
53 'frame-inversion', the simple card will use the settings of CODEC for both
54 CPU and CODEC sides as we need to keep the settings identical for both ends
55 of the link.
56
57Example 1 - single DAI link: 75Example 1 - single DAI link:
58 76
59sound { 77sound {
60 compatible = "simple-audio-card"; 78 compatible = "simple-audio-card";
61 simple-audio-card,name = "VF610-Tower-Sound-Card"; 79 simple-audio-card,name = "VF610-Tower-Sound-Card";
62 simple-audio-card,format = "left_j"; 80 simple-audio-card,format = "left_j";
81 simple-audio-card,bitclock-master = <&dailink0_master>;
82 simple-audio-card,frame-master = <&dailink0_master>;
63 simple-audio-card,widgets = 83 simple-audio-card,widgets =
64 "Microphone", "Microphone Jack", 84 "Microphone", "Microphone Jack",
65 "Headphone", "Headphone Jack", 85 "Headphone", "Headphone Jack",
@@ -69,17 +89,12 @@ sound {
69 "Headphone Jack", "HP_OUT", 89 "Headphone Jack", "HP_OUT",
70 "External Speaker", "LINE_OUT"; 90 "External Speaker", "LINE_OUT";
71 91
72 dai-tdm-slot-num = <2>;
73 dai-tdm-slot-width = <8>;
74
75 simple-audio-card,cpu { 92 simple-audio-card,cpu {
76 sound-dai = <&sh_fsi2 0>; 93 sound-dai = <&sh_fsi2 0>;
77 }; 94 };
78 95
79 simple-audio-card,codec { 96 dailink0_master: simple-audio-card,codec {
80 sound-dai = <&ak4648>; 97 sound-dai = <&ak4648>;
81 bitclock-master;
82 frame-master;
83 clocks = <&osc>; 98 clocks = <&osc>;
84 }; 99 };
85}; 100};
@@ -105,31 +120,31 @@ Example 2 - many DAI links:
105sound { 120sound {
106 compatible = "simple-audio-card"; 121 compatible = "simple-audio-card";
107 simple-audio-card,name = "Cubox Audio"; 122 simple-audio-card,name = "Cubox Audio";
108 simple-audio-card,format = "i2s";
109 123
110 simple-audio-card,dai-link@0 { /* I2S - HDMI */ 124 simple-audio-card,dai-link@0 { /* I2S - HDMI */
111 simple-audio-card,cpu { 125 format = "i2s";
126 cpu {
112 sound-dai = <&audio1 0>; 127 sound-dai = <&audio1 0>;
113 }; 128 };
114 simple-audio-card,codec { 129 codec {
115 sound-dai = <&tda998x 0>; 130 sound-dai = <&tda998x 0>;
116 }; 131 };
117 }; 132 };
118 133
119 simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */ 134 simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
120 simple-audio-card,cpu { 135 cpu {
121 sound-dai = <&audio1 1>; 136 sound-dai = <&audio1 1>;
122 }; 137 };
123 simple-audio-card,codec { 138 codec {
124 sound-dai = <&tda998x 1>; 139 sound-dai = <&tda998x 1>;
125 }; 140 };
126 }; 141 };
127 142
128 simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */ 143 simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
129 simple-audio-card,cpu { 144 cpu {
130 sound-dai = <&audio1 1>; 145 sound-dai = <&audio1 1>;
131 }; 146 };
132 simple-audio-card,codec { 147 codec {
133 sound-dai = <&spdif_codec>; 148 sound-dai = <&spdif_codec>;
134 }; 149 };
135 }; 150 };
diff --git a/Documentation/devicetree/bindings/sound/snow.txt b/Documentation/devicetree/bindings/sound/snow.txt
new file mode 100644
index 000000000000..678b191c37b8
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/snow.txt
@@ -0,0 +1,17 @@
1Audio Binding for Snow boards
2
3Required properties:
4- compatible : Can be one of the following,
5 "google,snow-audio-max98090" or
6 "google,snow-audio-max98095"
7- samsung,i2s-controller: The phandle of the Samsung I2S controller
8- samsung,audio-codec: The phandle of the audio codec
9
10Example:
11
12sound {
13 compatible = "google,snow-audio-max98095";
14
15 samsung,i2s-controller = <&i2s0>;
16 samsung,audio-codec = <&max98095>;
17};
diff --git a/Documentation/devicetree/bindings/sound/st,sta350.txt b/Documentation/devicetree/bindings/sound/st,sta350.txt
new file mode 100644
index 000000000000..b7e71bf5caf4
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/st,sta350.txt
@@ -0,0 +1,131 @@
1STA350 audio CODEC
2
3The driver for this device only supports I2C.
4
5Required properties:
6
7 - compatible: "st,sta350"
8 - reg: the I2C address of the device for I2C
9 - reset-gpios: a GPIO spec for the reset pin. If specified, it will be
10 deasserted before communication to the codec starts.
11
12 - power-down-gpios: a GPIO spec for the power down pin. If specified,
13 it will be deasserted before communication to the codec
14 starts.
15
16 - vdd-dig-supply: regulator spec, providing 3.3V
17 - vdd-pll-supply: regulator spec, providing 3.3V
18 - vcc-supply: regulator spec, providing 5V - 26V
19
20Optional properties:
21
22 - st,output-conf: number, Selects the output configuration:
23 0: 2-channel (full-bridge) power, 2-channel data-out
24 1: 2 (half-bridge). 1 (full-bridge) on-board power
25 2: 2 Channel (Full-Bridge) Power, 1 Channel FFX
26 3: 1 Channel Mono-Parallel
27 If parameter is missing, mode 0 will be enabled.
28 This property has to be specified as '/bits/ 8' value.
29
30 - st,ch1-output-mapping: Channel 1 output mapping
31 - st,ch2-output-mapping: Channel 2 output mapping
32 - st,ch3-output-mapping: Channel 3 output mapping
33 0: Channel 1
34 1: Channel 2
35 2: Channel 3
36 If parameter is missing, channel 1 is choosen.
37 This properties have to be specified as '/bits/ 8' values.
38
39 - st,thermal-warning-recover:
40 If present, thermal warning recovery is enabled.
41
42 - st,thermal-warning-adjustment:
43 If present, thermal warning adjustment is enabled.
44
45 - st,fault-detect-recovery:
46 If present, then fault recovery will be enabled.
47
48 - st,ffx-power-output-mode: string
49 The FFX power output mode selects how the FFX output timing is
50 configured. Must be one of these values:
51 - "drop-compensation"
52 - "tapered-compensation"
53 - "full-power-mode"
54 - "variable-drop-compensation" (default)
55
56 - st,drop-compensation-ns: number
57 Only required for "st,ffx-power-output-mode" ==
58 "variable-drop-compensation".
59 Specifies the drop compensation in nanoseconds.
60 The value must be in the range of 0..300, and only
61 multiples of 20 are allowed. Default is 140ns.
62
63 - st,overcurrent-warning-adjustment:
64 If present, overcurrent warning adjustment is enabled.
65
66 - st,max-power-use-mpcc:
67 If present, then MPCC bits are used for MPC coefficients,
68 otherwise standard MPC coefficients are used.
69
70 - st,max-power-corr:
71 If present, power bridge correction for THD reduction near maximum
72 power output is enabled.
73
74 - st,am-reduction-mode:
75 If present, FFX mode runs in AM reduction mode, otherwise normal
76 FFX mode is used.
77
78 - st,odd-pwm-speed-mode:
79 If present, PWM speed mode run on odd speed mode (341.3 kHz) on all
80 channels. If not present, normal PWM spped mode (384 kHz) will be used.
81
82 - st,distortion-compensation:
83 If present, distortion compensation variable uses DCC coefficient.
84 If not present, preset DC coefficient is used.
85
86 - st,invalid-input-detect-mute:
87 If present, automatic invalid input detect mute is enabled.
88
89 - st,activate-mute-output:
90 If present, a mute output will be activated in ase the volume will
91 reach a value lower than -76 dBFS.
92
93 - st,bridge-immediate-off:
94 If present, the bridge will be switched off immediately after the
95 power-down-gpio goes low. Otherwise, the bridge will wait for 13
96 million clock cycles to pass before shutting down.
97
98 - st,noise-shape-dc-cut:
99 If present, the noise-shaping technique on the DC cutoff filter are
100 enabled.
101
102 - st,powerdown-master-volume:
103 If present, the power-down pin and I2C power-down functions will
104 act on the master volume. Otherwise, the functions will act on the
105 mute commands.
106
107 - st,powerdown-delay-divider:
108 If present, the bridge power-down time will be divided by the provided
109 value. If not specified, a divider of 1 will be used. Allowed values
110 are 1, 2, 4, 8, 16, 32, 64 and 128.
111 This property has to be specified as '/bits/ 8' value.
112
113Example:
114
115codec: sta350@38 {
116 compatible = "st,sta350";
117 reg = <0x1c>;
118 reset-gpios = <&gpio1 19 0>;
119 power-down-gpios = <&gpio1 16 0>;
120 st,output-conf = /bits/ 8 <0x3>; // set output to 2-channel
121 // (full-bridge) power,
122 // 2-channel data-out
123 st,ch1-output-mapping = /bits/ 8 <0>; // set channel 1 output ch 1
124 st,ch2-output-mapping = /bits/ 8 <0>; // set channel 2 output ch 1
125 st,ch3-output-mapping = /bits/ 8 <0>; // set channel 3 output ch 1
126 st,max-power-correction; // enables power bridge
127 // correction for THD reduction
128 // near maximum power output
129 st,invalid-input-detect-mute; // mute if no valid digital
130 // audio signal is provided.
131};
diff --git a/Documentation/devicetree/bindings/spi/fsl-spi.txt b/Documentation/devicetree/bindings/spi/fsl-spi.txt
index b032dd76e9d2..a2331372068c 100644
--- a/Documentation/devicetree/bindings/spi/fsl-spi.txt
+++ b/Documentation/devicetree/bindings/spi/fsl-spi.txt
@@ -42,6 +42,10 @@ Required properties:
42- interrupts : should contain eSPI interrupt, the device has one interrupt. 42- interrupts : should contain eSPI interrupt, the device has one interrupt.
43- fsl,espi-num-chipselects : the number of the chipselect signals. 43- fsl,espi-num-chipselects : the number of the chipselect signals.
44 44
45Optional properties:
46- fsl,csbef: chip select assertion time in bits before frame starts
47- fsl,csaft: chip select negation time in bits after frame ends
48
45Example: 49Example:
46 spi@110000 { 50 spi@110000 {
47 #address-cells = <1>; 51 #address-cells = <1>;
@@ -51,4 +55,6 @@ Example:
51 interrupts = <53 0x2>; 55 interrupts = <53 0x2>;
52 interrupt-parent = <&mpic>; 56 interrupt-parent = <&mpic>;
53 fsl,espi-num-chipselects = <4>; 57 fsl,espi-num-chipselects = <4>;
58 fsl,csbef = <1>;
59 fsl,csaft = <1>;
54 }; 60 };
diff --git a/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt b/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt
index b82a268f1bd4..bee6ff204baf 100644
--- a/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt
+++ b/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt
@@ -23,6 +23,12 @@ Optional properties:
23- spi-max-frequency: Specifies maximum SPI clock frequency, 23- spi-max-frequency: Specifies maximum SPI clock frequency,
24 Units - Hz. Definition as per 24 Units - Hz. Definition as per
25 Documentation/devicetree/bindings/spi/spi-bus.txt 25 Documentation/devicetree/bindings/spi/spi-bus.txt
26- num-cs: total number of chipselects
27- cs-gpios: should specify GPIOs used for chipselects.
28 The gpios will be referred to as reg = <index> in the SPI child
29 nodes. If unspecified, a single SPI device without a chip
30 select can be used.
31
26 32
27SPI slave nodes must be children of the SPI master node and can contain 33SPI slave nodes must be children of the SPI master node and can contain
28properties described in Documentation/devicetree/bindings/spi/spi-bus.txt 34properties described in Documentation/devicetree/bindings/spi/spi-bus.txt
diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt
index e5a4d1b4acfe..bbaa857dd68f 100644
--- a/Documentation/devicetree/bindings/spi/spi-bus.txt
+++ b/Documentation/devicetree/bindings/spi/spi-bus.txt
@@ -55,13 +55,15 @@ contain the following properties.
55 chip select active high 55 chip select active high
56- spi-3wire - (optional) Empty property indicating device requires 56- spi-3wire - (optional) Empty property indicating device requires
57 3-wire mode. 57 3-wire mode.
58- spi-lsb-first - (optional) Empty property indicating device requires
59 LSB first mode.
58- spi-tx-bus-width - (optional) The bus width(number of data wires) that 60- spi-tx-bus-width - (optional) The bus width(number of data wires) that
59 used for MOSI. Defaults to 1 if not present. 61 used for MOSI. Defaults to 1 if not present.
60- spi-rx-bus-width - (optional) The bus width(number of data wires) that 62- spi-rx-bus-width - (optional) The bus width(number of data wires) that
61 used for MISO. Defaults to 1 if not present. 63 used for MISO. Defaults to 1 if not present.
62 64
63Some SPI controllers and devices support Dual and Quad SPI transfer mode. 65Some SPI controllers and devices support Dual and Quad SPI transfer mode.
64It allows data in SPI system transfered in 2 wires(DUAL) or 4 wires(QUAD). 66It allows data in the SPI system to be transferred in 2 wires(DUAL) or 4 wires(QUAD).
65Now the value that spi-tx-bus-width and spi-rx-bus-width can receive is 67Now the value that spi-tx-bus-width and spi-rx-bus-width can receive is
66only 1(SINGLE), 2(DUAL) and 4(QUAD). 68only 1(SINGLE), 2(DUAL) and 4(QUAD).
67Dual/Quad mode is not allowed when 3-wire mode is used. 69Dual/Quad mode is not allowed when 3-wire mode is used.
diff --git a/Documentation/devicetree/bindings/spi/spi-cadence.txt b/Documentation/devicetree/bindings/spi/spi-cadence.txt
new file mode 100644
index 000000000000..94f09141a4f0
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-cadence.txt
@@ -0,0 +1,31 @@
1Cadence SPI controller Device Tree Bindings
2-------------------------------------------
3
4Required properties:
5- compatible : Should be "cdns,spi-r1p6" or "xlnx,zynq-spi-r1p6".
6- reg : Physical base address and size of SPI registers map.
7- interrupts : Property with a value describing the interrupt
8 number.
9- interrupt-parent : Must be core interrupt controller
10- clock-names : List of input clock names - "ref_clk", "pclk"
11 (See clock bindings for details).
12- clocks : Clock phandles (see clock bindings for details).
13
14Optional properties:
15- num-cs : Number of chip selects used.
16 If a decoder is used, this will be the number of
17 chip selects after the decoder.
18- is-decoded-cs : Flag to indicate whether decoder is used or not.
19
20Example:
21
22 spi@e0007000 {
23 compatible = "xlnx,zynq-spi-r1p6";
24 clock-names = "ref_clk", "pclk";
25 clocks = <&clkc 26>, <&clkc 35>;
26 interrupt-parent = <&intc>;
27 interrupts = <0 49 4>;
28 num-cs = <4>;
29 is-decoded-cs = <0>;
30 reg = <0xe0007000 0x1000>;
31 } ;
diff --git a/Documentation/devicetree/bindings/spi/spi-dw.txt b/Documentation/devicetree/bindings/spi/spi-dw.txt
new file mode 100644
index 000000000000..7b63ed601990
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-dw.txt
@@ -0,0 +1,24 @@
1Synopsys DesignWare SPI master
2
3Required properties:
4- compatible: should be "snps,designware-spi"
5- #address-cells: see spi-bus.txt
6- #size-cells: see spi-bus.txt
7- reg: address and length of the spi master registers
8- interrupts: should contain one interrupt
9- clocks: spi clock phandle
10- num-cs: see spi-bus.txt
11
12Optional properties:
13- cs-gpios: see spi-bus.txt
14
15Example:
16
17spi: spi@4020a000 {
18 compatible = "snps,designware-spi";
19 interrupts = <11 1>;
20 reg = <0x4020a000 0x1000>;
21 clocks = <&pclk>;
22 num-cs = <2>;
23 cs-gpios = <&banka 0 0>;
24};
diff --git a/Documentation/devicetree/bindings/spmi/spmi.txt b/Documentation/devicetree/bindings/spmi/spmi.txt
index 462a42fb3a1e..4bb10d161a27 100644
--- a/Documentation/devicetree/bindings/spmi/spmi.txt
+++ b/Documentation/devicetree/bindings/spmi/spmi.txt
@@ -26,7 +26,7 @@ Each child node must have one and only one 'reg' entry of type SPMI_USID.
26 reg = <...>; 26 reg = <...>;
27 27
28 #address-cells = <2>; 28 #address-cells = <2>;
29 #size-cells <0>; 29 #size-cells = <0>;
30 30
31 child@0 { 31 child@0 {
32 compatible = "..."; 32 compatible = "...";
diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
index 3be5ce7a9654..e75f0e549fff 100644
--- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
+++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
@@ -61,6 +61,7 @@ Required properties:
61Optional properties: 61Optional properties:
62- interface_pix_fmt: How this display is connected to the 62- interface_pix_fmt: How this display is connected to the
63 display interface. Currently supported types: "rgb24", "rgb565", "bgr666" 63 display interface. Currently supported types: "rgb24", "rgb565", "bgr666"
64 and "lvds666".
64- edid: verbatim EDID data block describing attached display. 65- edid: verbatim EDID data block describing attached display.
65- ddc: phandle describing the i2c bus handling the display data 66- ddc: phandle describing the i2c bus handling the display data
66 channel 67 channel
diff --git a/Documentation/devicetree/bindings/thermal/armada-thermal.txt b/Documentation/devicetree/bindings/thermal/armada-thermal.txt
index fff93d5f92de..4cf024929a3f 100644
--- a/Documentation/devicetree/bindings/thermal/armada-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/armada-thermal.txt
@@ -1,11 +1,21 @@
1* Marvell Armada 370/XP thermal management 1* Marvell Armada 370/375/380/XP thermal management
2 2
3Required properties: 3Required properties:
4 4
5- compatible: Should be set to one of the following: 5- compatible: Should be set to one of the following:
6 marvell,armada370-thermal 6 marvell,armada370-thermal
7 marvell,armada375-thermal
8 marvell,armada375-z1-thermal
9 marvell,armada380-thermal
7 marvell,armadaxp-thermal 10 marvell,armadaxp-thermal
8 11
12 Note: As the name suggests, "marvell,armada375-z1-thermal"
13 applies for the SoC Z1 stepping only. On such stepping
14 some quirks need to be done and the register offset differs
15 from the one in the A0 stepping.
16 The operating system may auto-detect the SoC stepping and
17 update the compatible and register offsets at runtime.
18
9- reg: Device's register space. 19- reg: Device's register space.
10 Two entries are expected, see the examples below. 20 Two entries are expected, see the examples below.
11 The first one is required for the sensor register; 21 The first one is required for the sensor register;
diff --git a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt
index 284f5300fd8b..c94909215c07 100644
--- a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt
@@ -6,16 +6,35 @@
6 "samsung,exynos4412-tmu" 6 "samsung,exynos4412-tmu"
7 "samsung,exynos4210-tmu" 7 "samsung,exynos4210-tmu"
8 "samsung,exynos5250-tmu" 8 "samsung,exynos5250-tmu"
9 "samsung,exynos5260-tmu"
10 "samsung,exynos5420-tmu" for TMU channel 0, 1 on Exynos5420
11 "samsung,exynos5420-tmu-ext-triminfo" for TMU channels 2, 3 and 4
12 Exynos5420 (Must pass triminfo base and triminfo clock)
9 "samsung,exynos5440-tmu" 13 "samsung,exynos5440-tmu"
10- interrupt-parent : The phandle for the interrupt controller 14- interrupt-parent : The phandle for the interrupt controller
11- reg : Address range of the thermal registers. For soc's which has multiple 15- reg : Address range of the thermal registers. For soc's which has multiple
12 instances of TMU and some registers are shared across all TMU's like 16 instances of TMU and some registers are shared across all TMU's like
13 interrupt related then 2 set of register has to supplied. First set 17 interrupt related then 2 set of register has to supplied. First set
14 belongs to each instance of TMU and second set belongs to common TMU 18 belongs to register set of TMU instance and second set belongs to
15 registers. 19 registers shared with the TMU instance.
20
21 NOTE: On Exynos5420, the TRIMINFO register is misplaced for TMU
22 channels 2, 3 and 4
23 Use "samsung,exynos5420-tmu-ext-triminfo" in cases, there is a misplaced
24 register, also provide clock to access that base.
25
26 TRIMINFO at 0x1006c000 contains data for TMU channel 3
27 TRIMINFO at 0x100a0000 contains data for TMU channel 4
28 TRIMINFO at 0x10068000 contains data for TMU channel 2
29
16- interrupts : Should contain interrupt for thermal system 30- interrupts : Should contain interrupt for thermal system
17- clocks : The main clock for TMU device 31- clocks : The main clocks for TMU device
32 -- 1. operational clock for TMU channel
33 -- 2. optional clock to access the shared registers of TMU channel
18- clock-names : Thermal system clock name 34- clock-names : Thermal system clock name
35 -- "tmu_apbif" operational clock for current TMU channel
36 -- "tmu_triminfo_apbif" clock to access the shared triminfo register
37 for current TMU channel
19- vtmu-supply: This entry is optional and provides the regulator node supplying 38- vtmu-supply: This entry is optional and provides the regulator node supplying
20 voltage to TMU. If needed this entry can be placed inside 39 voltage to TMU. If needed this entry can be placed inside
21 board/platform specific dts file. 40 board/platform specific dts file.
@@ -43,6 +62,31 @@ Example 2):
43 clock-names = "tmu_apbif"; 62 clock-names = "tmu_apbif";
44 }; 63 };
45 64
65Example 3): (In case of Exynos5420 "with misplaced TRIMINFO register")
66 tmu_cpu2: tmu@10068000 {
67 compatible = "samsung,exynos5420-tmu-ext-triminfo";
68 reg = <0x10068000 0x100>, <0x1006c000 0x4>;
69 interrupts = <0 184 0>;
70 clocks = <&clock 318>, <&clock 318>;
71 clock-names = "tmu_apbif", "tmu_triminfo_apbif";
72 };
73
74 tmu_cpu3: tmu@1006c000 {
75 compatible = "samsung,exynos5420-tmu-ext-triminfo";
76 reg = <0x1006c000 0x100>, <0x100a0000 0x4>;
77 interrupts = <0 185 0>;
78 clocks = <&clock 318>, <&clock 319>;
79 clock-names = "tmu_apbif", "tmu_triminfo_apbif";
80 };
81
82 tmu_gpu: tmu@100a0000 {
83 compatible = "samsung,exynos5420-tmu-ext-triminfo";
84 reg = <0x100a0000 0x100>, <0x10068000 0x4>;
85 interrupts = <0 215 0>;
86 clocks = <&clock 319>, <&clock 318>;
87 clock-names = "tmu_apbif", "tmu_triminfo_apbif";
88 };
89
46Note: For multi-instance tmu each instance should have an alias correctly 90Note: For multi-instance tmu each instance should have an alias correctly
47numbered in "aliases" node. 91numbered in "aliases" node.
48 92
diff --git a/Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.txt b/Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.txt
index 7c26154b8bbb..27cfc7d7ccd7 100644
--- a/Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.txt
+++ b/Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.txt
@@ -9,6 +9,9 @@ Required properties:
9 one) 9 one)
10- clocks: phandle to the source clock (usually the AHB clock) 10- clocks: phandle to the source clock (usually the AHB clock)
11 11
12Optionnal properties:
13- resets: phandle to a reset controller asserting the timer
14
12Example: 15Example:
13 16
14timer@01c60000 { 17timer@01c60000 {
@@ -19,4 +22,5 @@ timer@01c60000 {
19 <0 53 1>, 22 <0 53 1>,
20 <0 54 1>; 23 <0 54 1>;
21 clocks = <&ahb1_gates 19>; 24 clocks = <&ahb1_gates 19>;
25 resets = <&ahb1rst 19>;
22}; 26};
diff --git a/Documentation/devicetree/bindings/timer/efm32,timer.txt b/Documentation/devicetree/bindings/timer/energymicro,efm32-timer.txt
index 97a568f696c9..e502c11b2211 100644
--- a/Documentation/devicetree/bindings/timer/efm32,timer.txt
+++ b/Documentation/devicetree/bindings/timer/energymicro,efm32-timer.txt
@@ -6,7 +6,7 @@ channels and can be used as PWM or Quadrature Decoder. Available clock sources
6are the cpu's HFPERCLK (with a 10-bit prescaler) or an external pin. 6are the cpu's HFPERCLK (with a 10-bit prescaler) or an external pin.
7 7
8Required properties: 8Required properties:
9- compatible : Should be efm32,timer 9- compatible : Should be "energymicro,efm32-timer"
10- reg : Address and length of the register set 10- reg : Address and length of the register set
11- clocks : Should contain a reference to the HFPERCLK 11- clocks : Should contain a reference to the HFPERCLK
12 12
@@ -16,7 +16,7 @@ Optional properties:
16Example: 16Example:
17 17
18timer@40010c00 { 18timer@40010c00 {
19 compatible = "efm32,timer"; 19 compatible = "energymicro,efm32-timer";
20 reg = <0x40010c00 0x400>; 20 reg = <0x40010c00 0x400>;
21 interrupts = <14>; 21 interrupts = <14>;
22 clocks = <&cmu clk_HFPERCLKTIMER3>; 22 clocks = <&cmu clk_HFPERCLKTIMER3>;
diff --git a/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt b/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
new file mode 100644
index 000000000000..aa8c40230e5e
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
@@ -0,0 +1,31 @@
1Freescale FlexTimer Module (FTM) Timer
2
3Required properties:
4
5- compatible : should be "fsl,ftm-timer"
6- reg : Specifies base physical address and size of the register sets for the
7 clock event device and clock source device.
8- interrupts : Should be the clock event device interrupt.
9- clocks : The clocks provided by the SoC to drive the timer, must contain an
10 entry for each entry in clock-names.
11- clock-names : Must include the following entries:
12 o "ftm-evt"
13 o "ftm-src"
14 o "ftm-evt-counter-en"
15 o "ftm-src-counter-en"
16- big-endian: One boolean property, the big endian mode will be in use if it is
17 present, or the little endian mode will be in use for all the device registers.
18
19Example:
20ftm: ftm@400b8000 {
21 compatible = "fsl,ftm-timer";
22 reg = <0x400b8000 0x1000 0x400b9000 0x1000>;
23 interrupts = <0 44 IRQ_TYPE_LEVEL_HIGH>;
24 clock-names = "ftm-evt", "ftm-src",
25 "ftm-evt-counter-en", "ftm-src-counter-en";
26 clocks = <&clks VF610_CLK_FTM2>,
27 <&clks VF610_CLK_FTM3>,
28 <&clks VF610_CLK_FTM2_EXT_FIX_EN>,
29 <&clks VF610_CLK_FTM3_EXT_FIX_EN>;
30 big-endian;
31};
diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt
new file mode 100644
index 000000000000..f2899b550939
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt
@@ -0,0 +1,17 @@
1Qualcomm CI13xxx (Chipidea) USB controllers
2
3Required properties:
4- compatible: should contain "qcom,ci-hdrc"
5- reg: offset and length of the register set in the memory map
6- interrupts: interrupt-specifier for the controller interrupt.
7- usb-phy: phandle for the PHY device
8- dr_mode: Should be "peripheral"
9
10Examples:
11 gadget@f9a55000 {
12 compatible = "qcom,ci-hdrc";
13 reg = <0xf9a55000 0x400>;
14 dr_mode = "peripheral";
15 interrupts = <0 134 0>;
16 usb-phy = <&usbphy0>;
17 };
diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt
index b8b6871f116f..467ddd15d40c 100644
--- a/Documentation/devicetree/bindings/usb/dwc2.txt
+++ b/Documentation/devicetree/bindings/usb/dwc2.txt
@@ -13,7 +13,7 @@ Refer to clk/clock-bindings.txt for generic clock consumer properties
13 13
14Optional properties: 14Optional properties:
15- phys: phy provider specifier 15- phys: phy provider specifier
16- phy-names: shall be "device" 16- phy-names: shall be "usb2-phy"
17Refer to phy/phy-bindings.txt for generic phy consumer properties 17Refer to phy/phy-bindings.txt for generic phy consumer properties
18 18
19Example: 19Example:
diff --git a/Documentation/devicetree/bindings/usb/ehci-orion.txt b/Documentation/devicetree/bindings/usb/ehci-orion.txt
index 6bc09ec14c4d..17c3bc858b86 100644
--- a/Documentation/devicetree/bindings/usb/ehci-orion.txt
+++ b/Documentation/devicetree/bindings/usb/ehci-orion.txt
@@ -6,6 +6,11 @@ Required properties:
6 region. 6 region.
7- interrupts: The EHCI interrupt 7- interrupts: The EHCI interrupt
8 8
9Optional properties:
10- clocks: reference to the clock
11- phys: reference to the USB PHY
12- phy-names: name of the USB PHY, should be "usb"
13
9Example: 14Example:
10 15
11 ehci@50000 { 16 ehci@50000 {
diff --git a/Documentation/devicetree/bindings/usb/exynos-usb.txt b/Documentation/devicetree/bindings/usb/exynos-usb.txt
index d967ba16de60..a3b5990d0f2c 100644
--- a/Documentation/devicetree/bindings/usb/exynos-usb.txt
+++ b/Documentation/devicetree/bindings/usb/exynos-usb.txt
@@ -12,6 +12,13 @@ Required properties:
12 - interrupts: interrupt number to the cpu. 12 - interrupts: interrupt number to the cpu.
13 - clocks: from common clock binding: handle to usb clock. 13 - clocks: from common clock binding: handle to usb clock.
14 - clock-names: from common clock binding: Shall be "usbhost". 14 - clock-names: from common clock binding: Shall be "usbhost".
15 - port: if in the SoC there are EHCI phys, they should be listed here.
16 One phy per port. Each port should have following entries:
17 - reg: port number on EHCI controller, e.g
18 On Exynos5250, port 0 is USB2.0 otg phy
19 port 1 is HSIC phy0
20 port 2 is HSIC phy1
21 - phys: from the *Generic PHY* bindings; specifying phy used by port.
15 22
16Optional properties: 23Optional properties:
17 - samsung,vbus-gpio: if present, specifies the GPIO that 24 - samsung,vbus-gpio: if present, specifies the GPIO that
@@ -27,6 +34,14 @@ Example:
27 34
28 clocks = <&clock 285>; 35 clocks = <&clock 285>;
29 clock-names = "usbhost"; 36 clock-names = "usbhost";
37
38 #address-cells = <1>;
39 #size-cells = <0>;
40 port@0 {
41 reg = <0>;
42 phys = <&usb2phy 1>;
43 status = "disabled";
44 };
30 }; 45 };
31 46
32OHCI 47OHCI
@@ -38,6 +53,13 @@ Required properties:
38 - interrupts: interrupt number to the cpu. 53 - interrupts: interrupt number to the cpu.
39 - clocks: from common clock binding: handle to usb clock. 54 - clocks: from common clock binding: handle to usb clock.
40 - clock-names: from common clock binding: Shall be "usbhost". 55 - clock-names: from common clock binding: Shall be "usbhost".
56 - port: if in the SoC there are OHCI phys, they should be listed here.
57 One phy per port. Each port should have following entries:
58 - reg: port number on OHCI controller, e.g
59 On Exynos5250, port 0 is USB2.0 otg phy
60 port 1 is HSIC phy0
61 port 2 is HSIC phy1
62 - phys: from the *Generic PHY* bindings, specifying phy used by port.
41 63
42Example: 64Example:
43 usb@12120000 { 65 usb@12120000 {
@@ -47,6 +69,15 @@ Example:
47 69
48 clocks = <&clock 285>; 70 clocks = <&clock 285>;
49 clock-names = "usbhost"; 71 clock-names = "usbhost";
72
73 #address-cells = <1>;
74 #size-cells = <0>;
75 port@0 {
76 reg = <0>;
77 phys = <&usb2phy 1>;
78 status = "disabled";
79 };
80
50 }; 81 };
51 82
52DWC3 83DWC3
diff --git a/Documentation/devicetree/bindings/usb/gr-udc.txt b/Documentation/devicetree/bindings/usb/gr-udc.txt
index 0c5118f7a916..e9445224fabd 100644
--- a/Documentation/devicetree/bindings/usb/gr-udc.txt
+++ b/Documentation/devicetree/bindings/usb/gr-udc.txt
@@ -12,17 +12,23 @@ Required properties:
12 12
13- reg : Address and length of the register set for the device 13- reg : Address and length of the register set for the device
14 14
15- interrupts : Interrupt numbers for this device 15- interrupts : Interrupt numbers for this device. Either one interrupt number
16 for all interrupts, or one for status related interrupts, one for IN
17 endpoint related interrupts and one for OUT endpoint related interrupts.
16 18
17Optional properties: 19Optional properties:
18 20
19- epobufsizes : An array of buffer sizes for OUT endpoints. If the property is 21- epobufsizes : Array of buffer sizes for OUT endpoints when they differ
20 not present, or for endpoints outside of the array, 1024 is assumed by 22 from the default size of 1024. The array is indexed by the OUT endpoint
21 the driver. 23 number. If the property is present it typically contains one entry for
22 24 each OUT endpoint of the core. Fewer entries overrides the default sizes
23- epibufsizes : An array of buffer sizes for IN endpoints. If the property is 25 only for as many endpoints as the array contains.
24 not present, or for endpoints outside of the array, 1024 is assumed by 26
25 the driver. 27- epibufsizes : Array of buffer sizes for IN endpoints when they differ
28 from the default size of 1024. The array is indexed by the IN endpoint
29 number. If the property is present it typically contains one entry for
30 each IN endpoint of the core. Fewer entries overrides the default sizes
31 only for as many endpoints as the array contains.
26 32
27For further information look in the documentation for the GLIB IP core library: 33For further information look in the documentation for the GLIB IP core library:
28http://www.gaisler.com/products/grlib/grip.pdf 34http://www.gaisler.com/products/grlib/grip.pdf
diff --git a/Documentation/devicetree/bindings/usb/msm-hsusb.txt b/Documentation/devicetree/bindings/usb/msm-hsusb.txt
index 5ea26c631e3a..2826f2af503a 100644
--- a/Documentation/devicetree/bindings/usb/msm-hsusb.txt
+++ b/Documentation/devicetree/bindings/usb/msm-hsusb.txt
@@ -15,3 +15,81 @@ Example EHCI controller device node:
15 usb-phy = <&usb_otg>; 15 usb-phy = <&usb_otg>;
16 }; 16 };
17 17
18USB PHY with optional OTG:
19
20Required properties:
21- compatible: Should contain:
22 "qcom,usb-otg-ci" for chipsets with ChipIdea 45nm PHY
23 "qcom,usb-otg-snps" for chipsets with Synopsys 28nm PHY
24
25- regs: Offset and length of the register set in the memory map
26- interrupts: interrupt-specifier for the OTG interrupt.
27
28- clocks: A list of phandle + clock-specifier pairs for the
29 clocks listed in clock-names
30- clock-names: Should contain the following:
31 "phy" USB PHY reference clock
32 "core" Protocol engine clock
33 "iface" Interface bus clock
34 "alt_core" Protocol engine clock for targets with asynchronous
35 reset methodology. (optional)
36
37- vdccx-supply: phandle to the regulator for the vdd supply for
38 digital circuit operation.
39- v1p8-supply: phandle to the regulator for the 1.8V supply
40- v3p3-supply: phandle to the regulator for the 3.3V supply
41
42- resets: A list of phandle + reset-specifier pairs for the
43 resets listed in reset-names
44- reset-names: Should contain the following:
45 "phy" USB PHY controller reset
46 "link" USB LINK controller reset
47
48- qcom,otg-control: OTG control (VBUS and ID notifications) can be one of
49 1 - PHY control
50 2 - PMIC control
51
52Optional properties:
53- dr_mode: One of "host", "peripheral" or "otg". Defaults to "otg"
54
55- qcom,phy-init-sequence: PHY configuration sequence values. This is related to Device
56 Mode Eye Diagram test. Start address at which these values will be
57 written is ULPI_EXT_VENDOR_SPECIFIC. Value of -1 is reserved as
58 "do not overwrite default value at this address".
59 For example: qcom,phy-init-sequence = < -1 0x63 >;
60 Will update only value at address ULPI_EXT_VENDOR_SPECIFIC + 1.
61
62- qcom,phy-num: Select number of pyco-phy to use, can be one of
63 0 - PHY one, default
64 1 - Second PHY
65 Some platforms may have configuration to allow USB
66 controller work with any of the two HSPHYs present.
67
68- qcom,vdd-levels: This property must be a list of three integer values
69 (no, min, max) where each value represents either a voltage
70 in microvolts or a value corresponding to voltage corner.
71
72Example HSUSB OTG controller device node:
73
74 usb@f9a55000 {
75 compatible = "qcom,usb-otg-snps";
76 reg = <0xf9a55000 0x400>;
77 interrupts = <0 134 0>;
78 dr_mode = "peripheral";
79
80 clocks = <&gcc GCC_XO_CLK>, <&gcc GCC_USB_HS_SYSTEM_CLK>,
81 <&gcc GCC_USB_HS_AHB_CLK>;
82
83 clock-names = "phy", "core", "iface";
84
85 vddcx-supply = <&pm8841_s2_corner>;
86 v1p8-supply = <&pm8941_l6>;
87 v3p3-supply = <&pm8941_l24>;
88
89 resets = <&gcc GCC_USB2A_PHY_BCR>, <&gcc GCC_USB_HS_BCR>;
90 reset-names = "phy", "link";
91
92 qcom,otg-control = <1>;
93 qcom,phy-init-sequence = < -1 0x63 >;
94 qcom,vdd-levels = <1 5 7>;
95 };
diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt
index 38b2faec4199..38d9bb8507cf 100644
--- a/Documentation/devicetree/bindings/usb/omap-usb.txt
+++ b/Documentation/devicetree/bindings/usb/omap-usb.txt
@@ -44,7 +44,9 @@ Board specific device node entry
44}; 44};
45 45
46OMAP DWC3 GLUE 46OMAP DWC3 GLUE
47 - compatible : Should be "ti,dwc3" 47 - compatible : Should be
48 * "ti,dwc3" for OMAP5 and DRA7
49 * "ti,am437x-dwc3" for AM437x
48 - ti,hwmods : Should be "usb_otg_ss" 50 - ti,hwmods : Should be "usb_otg_ss"
49 - reg : Address and length of the register set for the device. 51 - reg : Address and length of the register set for the device.
50 - interrupts : The irq number of this device that is used to interrupt the 52 - interrupts : The irq number of this device that is used to interrupt the
diff --git a/Documentation/devicetree/bindings/usb/usb-ehci.txt b/Documentation/devicetree/bindings/usb/usb-ehci.txt
index ff151ec084c4..43c1a4e06767 100644
--- a/Documentation/devicetree/bindings/usb/usb-ehci.txt
+++ b/Documentation/devicetree/bindings/usb/usb-ehci.txt
@@ -15,6 +15,7 @@ Optional properties:
15 - clocks : a list of phandle + clock specifier pairs 15 - clocks : a list of phandle + clock specifier pairs
16 - phys : phandle + phy specifier pair 16 - phys : phandle + phy specifier pair
17 - phy-names : "usb" 17 - phy-names : "usb"
18 - resets : phandle + reset specifier pair
18 19
19Example (Sequoia 440EPx): 20Example (Sequoia 440EPx):
20 ehci@e0000300 { 21 ehci@e0000300 {
diff --git a/Documentation/devicetree/bindings/usb/usb-ohci.txt b/Documentation/devicetree/bindings/usb/usb-ohci.txt
index 45f67d91e888..b968a1aea995 100644
--- a/Documentation/devicetree/bindings/usb/usb-ohci.txt
+++ b/Documentation/devicetree/bindings/usb/usb-ohci.txt
@@ -12,6 +12,7 @@ Optional properties:
12- clocks : a list of phandle + clock specifier pairs 12- clocks : a list of phandle + clock specifier pairs
13- phys : phandle + phy specifier pair 13- phys : phandle + phy specifier pair
14- phy-names : "usb" 14- phy-names : "usb"
15- resets : phandle + reset specifier pair
15 16
16Example: 17Example:
17 18
diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.txt b/Documentation/devicetree/bindings/usb/usb-xhci.txt
index 90f8f607d125..5a79377c6a96 100644
--- a/Documentation/devicetree/bindings/usb/usb-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt
@@ -1,11 +1,17 @@
1USB xHCI controllers 1USB xHCI controllers
2 2
3Required properties: 3Required properties:
4 - compatible: should be "generic-xhci" (deprecated: "xhci-platform"). 4 - compatible: should be one of "generic-xhci",
5 "marvell,armada-375-xhci", "marvell,armada-380-xhci",
6 "renesas,xhci-r8a7790", "renesas,xhci-r8a7791" (deprecated:
7 "xhci-platform").
5 - reg: should contain address and length of the standard XHCI 8 - reg: should contain address and length of the standard XHCI
6 register set for the device. 9 register set for the device.
7 - interrupts: one XHCI interrupt should be described here. 10 - interrupts: one XHCI interrupt should be described here.
8 11
12Optional property:
13 - clocks: reference to a clock
14
9Example: 15Example:
10 usb@f0931000 { 16 usb@f0931000 {
11 compatible = "generic-xhci"; 17 compatible = "generic-xhci";
diff --git a/Documentation/devicetree/bindings/usb/usb3503.txt b/Documentation/devicetree/bindings/usb/usb3503.txt
index a018da4a7ad7..221ac0dbc678 100644
--- a/Documentation/devicetree/bindings/usb/usb3503.txt
+++ b/Documentation/devicetree/bindings/usb/usb3503.txt
@@ -15,6 +15,14 @@ Optional properties:
15- reset-gpios: Should specify GPIO for reset. 15- reset-gpios: Should specify GPIO for reset.
16- initial-mode: Should specify initial mode. 16- initial-mode: Should specify initial mode.
17 (1 for HUB mode, 2 for STANDBY mode) 17 (1 for HUB mode, 2 for STANDBY mode)
18- refclk: Clock used for driving REFCLK signal (optional, if not provided
19 the driver assumes that clock signal is always available, its
20 rate is specified by REF_SEL pins and a value from the primary
21 reference clock frequencies table is used)
22- refclk-frequency: Frequency of the REFCLK signal as defined by REF_SEL
23 pins (optional, if not provided, driver will not set rate of the
24 REFCLK signal and assume that a value from the primary reference
25 clock frequencies table is used)
18 26
19Examples: 27Examples:
20 usb3503@08 { 28 usb3503@08 {
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index abc308083acb..91bd2287f0c7 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -13,6 +13,7 @@ allwinner Allwinner Technology Co., Ltd.
13altr Altera Corp. 13altr Altera Corp.
14amcc Applied Micro Circuits Corporation (APM, formally AMCC) 14amcc Applied Micro Circuits Corporation (APM, formally AMCC)
15amd Advanced Micro Devices (AMD), Inc. 15amd Advanced Micro Devices (AMD), Inc.
16ams AMS AG
16amstaos AMS-Taos Inc. 17amstaos AMS-Taos Inc.
17apm Applied Micro Circuits Corporation (APM) 18apm Applied Micro Circuits Corporation (APM)
18arm ARM Ltd. 19arm ARM Ltd.
@@ -73,12 +74,16 @@ lantiq Lantiq Semiconductor
73lg LG Corporation 74lg LG Corporation
74linux Linux-specific binding 75linux Linux-specific binding
75lsi LSI Corp. (LSI Logic) 76lsi LSI Corp. (LSI Logic)
77lltc Linear Technology Corporation
76marvell Marvell Technology Group Ltd. 78marvell Marvell Technology Group Ltd.
77maxim Maxim Integrated Products 79maxim Maxim Integrated Products
80micrel Micrel Inc.
78microchip Microchip Technology Inc. 81microchip Microchip Technology Inc.
79mosaixtech Mosaix Technologies, Inc. 82mosaixtech Mosaix Technologies, Inc.
80moxa Moxa 83moxa Moxa
81mpl MPL AG 84mpl MPL AG
85mundoreader Mundo Reader S.L.
86murata Murata Manufacturing Co., Ltd.
82mxicy Macronix International Co., Ltd. 87mxicy Macronix International Co., Ltd.
83national National Semiconductor 88national National Semiconductor
84neonode Neonode Inc. 89neonode Neonode Inc.
@@ -94,10 +99,12 @@ panasonic Panasonic Corporation
94phytec PHYTEC Messtechnik GmbH 99phytec PHYTEC Messtechnik GmbH
95picochip Picochip Ltd 100picochip Picochip Ltd
96plathome Plat'Home Co., Ltd. 101plathome Plat'Home Co., Ltd.
102pixcir PIXCIR MICROELECTRONICS Co., Ltd
97powervr PowerVR (deprecated, use img) 103powervr PowerVR (deprecated, use img)
98qca Qualcomm Atheros, Inc. 104qca Qualcomm Atheros, Inc.
99qcom Qualcomm Technologies, Inc 105qcom Qualcomm Technologies, Inc
100qnap QNAP Systems, Inc. 106qnap QNAP Systems, Inc.
107radxa Radxa
101raidsonic RaidSonic Technology GmbH 108raidsonic RaidSonic Technology GmbH
102ralink Mediatek/Ralink Technology Corp. 109ralink Mediatek/Ralink Technology Corp.
103ramtron Ramtron International 110ramtron Ramtron International
@@ -123,10 +130,12 @@ stericsson ST-Ericsson
123synology Synology, Inc. 130synology Synology, Inc.
124ti Texas Instruments 131ti Texas Instruments
125tlm Trusted Logic Mobility 132tlm Trusted Logic Mobility
133toradex Toradex AG
126toshiba Toshiba Corporation 134toshiba Toshiba Corporation
127toumaz Toumaz 135toumaz Toumaz
128usi Universal Scientifc Industrial Co., Ltd. 136usi Universal Scientifc Industrial Co., Ltd.
129v3 V3 Semiconductor 137v3 V3 Semiconductor
138variscite Variscite Ltd.
130via VIA Technologies, Inc. 139via VIA Technologies, Inc.
131voipac Voipac Technologies s.r.o. 140voipac Voipac Technologies s.r.o.
132winbond Winbond Electronics corp. 141winbond Winbond Electronics corp.
@@ -135,3 +144,4 @@ wm Wondermedia Technologies, Inc.
135xes Extreme Engineering Solutions (X-ES) 144xes Extreme Engineering Solutions (X-ES)
136xlnx Xilinx 145xlnx Xilinx
137zyxel ZyXEL Communications Corp. 146zyxel ZyXEL Communications Corp.
147zarlink Zarlink Semiconductor
diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/video/exynos_dp.txt
index 57ccdde02c3a..53dbccfa80ca 100644
--- a/Documentation/devicetree/bindings/video/exynos_dp.txt
+++ b/Documentation/devicetree/bindings/video/exynos_dp.txt
@@ -62,6 +62,10 @@ Optional properties for dp-controller:
62 -hsync-active-high: 62 -hsync-active-high:
63 HSYNC polarity configuration. 63 HSYNC polarity configuration.
64 High if defined, Low if not defined 64 High if defined, Low if not defined
65 -samsung,hpd-gpio:
66 Hotplug detect GPIO.
67 Indicates which GPIO should be used for hotplug
68 detection
65 69
66Example: 70Example:
67 71
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt b/Documentation/devicetree/bindings/video/exynos_hdmi.txt
index f9187a259259..1fd8cf9cbfac 100644
--- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt
+++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt
@@ -5,6 +5,7 @@ Required properties:
5 1) "samsung,exynos5-hdmi" <DEPRECATED> 5 1) "samsung,exynos5-hdmi" <DEPRECATED>
6 2) "samsung,exynos4210-hdmi" 6 2) "samsung,exynos4210-hdmi"
7 3) "samsung,exynos4212-hdmi" 7 3) "samsung,exynos4212-hdmi"
8 4) "samsung,exynos5420-hdmi"
8- reg: physical base address of the hdmi and length of memory mapped 9- reg: physical base address of the hdmi and length of memory mapped
9 region. 10 region.
10- interrupts: interrupt number to the cpu. 11- interrupts: interrupt number to the cpu.
@@ -27,6 +28,7 @@ Required properties:
27 "hdmi", "sclk_hdmi", "sclk_pixel", "sclk_hdmiphy" and "mout_hdmi". 28 "hdmi", "sclk_hdmi", "sclk_pixel", "sclk_hdmiphy" and "mout_hdmi".
28- ddc: phandle to the hdmi ddc node 29- ddc: phandle to the hdmi ddc node
29- phy: phandle to the hdmi phy node 30- phy: phandle to the hdmi phy node
31- samsung,syscon-phandle: phandle for system controller node for PMU.
30 32
31Example: 33Example:
32 34
@@ -37,4 +39,5 @@ Example:
37 hpd-gpio = <&gpx3 7 1>; 39 hpd-gpio = <&gpx3 7 1>;
38 ddc = <&hdmi_ddc_node>; 40 ddc = <&hdmi_ddc_node>;
39 phy = <&hdmi_phy_node>; 41 phy = <&hdmi_phy_node>;
42 samsung,syscon-phandle = <&pmu_system_controller>;
40 }; 43 };
diff --git a/Documentation/devicetree/bindings/video/hdmi-connector.txt b/Documentation/devicetree/bindings/video/hdmi-connector.txt
index ccccc19e2573..acd5668b1ce1 100644
--- a/Documentation/devicetree/bindings/video/hdmi-connector.txt
+++ b/Documentation/devicetree/bindings/video/hdmi-connector.txt
@@ -7,6 +7,7 @@ Required properties:
7 7
8Optional properties: 8Optional properties:
9- label: a symbolic name for the connector 9- label: a symbolic name for the connector
10- hpd-gpios: HPD GPIO number
10 11
11Required nodes: 12Required nodes:
12- Video port for HDMI input 13- Video port for HDMI input
diff --git a/Documentation/devicetree/bindings/video/lgphilips,lb035q02.txt b/Documentation/devicetree/bindings/video/lgphilips,lb035q02.txt
new file mode 100644
index 000000000000..1a1e653e5407
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/lgphilips,lb035q02.txt
@@ -0,0 +1,33 @@
1LG.Philips LB035Q02 Panel
2=========================
3
4Required properties:
5- compatible: "lgphilips,lb035q02"
6- enable-gpios: panel enable gpio
7
8Optional properties:
9- label: a symbolic name for the panel
10
11Required nodes:
12- Video port for DPI input
13
14Example
15-------
16
17lcd-panel: panel@0 {
18 compatible = "lgphilips,lb035q02";
19 reg = <0>;
20 spi-max-frequency = <100000>;
21 spi-cpol;
22 spi-cpha;
23
24 label = "lcd";
25
26 enable-gpios = <&gpio7 7 0>;
27
28 port {
29 lcd_in: endpoint {
30 remote-endpoint = <&dpi_out>;
31 };
32 };
33};
diff --git a/Documentation/devicetree/bindings/video/panel-dpi.txt b/Documentation/devicetree/bindings/video/panel-dpi.txt
new file mode 100644
index 000000000000..a40180b05bab
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/panel-dpi.txt
@@ -0,0 +1,45 @@
1Generic MIPI DPI Panel
2======================
3
4Required properties:
5- compatible: "panel-dpi"
6
7Optional properties:
8- label: a symbolic name for the panel
9- enable-gpios: panel enable gpio
10
11Required nodes:
12- "panel-timing" containing video timings
13 (Documentation/devicetree/bindings/video/display-timing.txt)
14- Video port for DPI input
15
16Example
17-------
18
19lcd0: display@0 {
20 compatible = "samsung,lte430wq-f0c", "panel-dpi";
21 label = "lcd";
22
23 port {
24 lcd_in: endpoint {
25 remote-endpoint = <&dpi_out>;
26 };
27 };
28
29 panel-timing {
30 clock-frequency = <9200000>;
31 hactive = <480>;
32 vactive = <272>;
33 hfront-porch = <8>;
34 hback-porch = <4>;
35 hsync-len = <41>;
36 vback-porch = <2>;
37 vfront-porch = <4>;
38 vsync-len = <10>;
39
40 hsync-active = <0>;
41 vsync-active = <0>;
42 de-active = <1>;
43 pixelclk-active = <1>;
44 };
45};
diff --git a/Documentation/devicetree/bindings/video/sharp,ls037v7dw01.txt b/Documentation/devicetree/bindings/video/sharp,ls037v7dw01.txt
new file mode 100644
index 000000000000..0cc8981e9d49
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/sharp,ls037v7dw01.txt
@@ -0,0 +1,43 @@
1SHARP LS037V7DW01 TFT-LCD panel
2===================================
3
4Required properties:
5- compatible: "sharp,ls037v7dw01"
6
7Optional properties:
8- label: a symbolic name for the panel
9- enable-gpios: a GPIO spec for the optional enable pin.
10 This pin is the INI pin as specified in the LS037V7DW01.pdf file.
11- reset-gpios: a GPIO spec for the optional reset pin.
12 This pin is the RESB pin as specified in the LS037V7DW01.pdf file.
13- mode-gpios: a GPIO
14 ordered MO, LR, and UD as specified in the LS037V7DW01.pdf file.
15
16Required nodes:
17- Video port for DPI input
18
19This panel can have zero to five GPIOs to configure to change configuration
20between QVGA and VGA mode and the scan direction. As these pins can be also
21configured with external pulls, all the GPIOs are considered optional with holes
22in the array.
23
24Example
25-------
26
27Example when connected to a omap2+ based device:
28
29lcd0: display {
30 compatible = "sharp,ls037v7dw01";
31 power-supply = <&lcd_3v3>;
32 enable-gpios = <&gpio5 24 GPIO_ACTIVE_HIGH>; /* gpio152, lcd INI */
33 reset-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>; /* gpio155, lcd RESB */
34 mode-gpios = <&gpio5 26 GPIO_ACTIVE_HIGH /* gpio154, lcd MO */
35 &gpio1 2 GPIO_ACTIVE_HIGH /* gpio2, lcd LR */
36 &gpio1 3 GPIO_ACTIVE_HIGH>; /* gpio3, lcd UD */
37
38 port {
39 lcd_in: endpoint {
40 remote-endpoint = <&dpi_out>;
41 };
42 };
43};
diff --git a/Documentation/devicetree/bindings/video/ti,omap4-dss.txt b/Documentation/devicetree/bindings/video/ti,omap4-dss.txt
index f85d6fcfa705..b8c29fbd1fbb 100644
--- a/Documentation/devicetree/bindings/video/ti,omap4-dss.txt
+++ b/Documentation/devicetree/bindings/video/ti,omap4-dss.txt
@@ -109,3 +109,7 @@ Required properties:
109 109
110Optional nodes: 110Optional nodes:
111- Video port for HDMI output 111- Video port for HDMI output
112
113HDMI Endpoint optional properties:
114- lanes: list of 8 pin numbers for the HDMI lanes: CLK+, CLK-, D0+, D0-,
115 D1+, D1-, D2+, D2-. (default: 0,1,2,3,4,5,6,7)
diff --git a/Documentation/devicetree/bindings/video/ti,omap5-dss.txt b/Documentation/devicetree/bindings/video/ti,omap5-dss.txt
new file mode 100644
index 000000000000..38ffc8fcd816
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/ti,omap5-dss.txt
@@ -0,0 +1,96 @@
1Texas Instruments OMAP5 Display Subsystem
2=========================================
3
4See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic
5description about OMAP Display Subsystem bindings.
6
7DSS Core
8--------
9
10Required properties:
11- compatible: "ti,omap5-dss"
12- reg: address and length of the register space
13- ti,hwmods: "dss_core"
14- clocks: handle to fclk
15- clock-names: "fck"
16
17Required nodes:
18- DISPC
19
20Optional nodes:
21- DSS Submodules: RFBI, DSI, HDMI
22- Video port for DPI output
23
24DPI Endpoint required properties:
25- data-lines: number of lines used
26
27
28DISPC
29-----
30
31Required properties:
32- compatible: "ti,omap5-dispc"
33- reg: address and length of the register space
34- ti,hwmods: "dss_dispc"
35- interrupts: the DISPC interrupt
36- clocks: handle to fclk
37- clock-names: "fck"
38
39
40RFBI
41----
42
43Required properties:
44- compatible: "ti,omap5-rfbi"
45- reg: address and length of the register space
46- ti,hwmods: "dss_rfbi"
47- clocks: handles to fclk and iclk
48- clock-names: "fck", "ick"
49
50Optional nodes:
51- Video port for RFBI output
52- RFBI controlled peripherals
53
54
55DSI
56---
57
58Required properties:
59- compatible: "ti,omap5-dsi"
60- reg: addresses and lengths of the register spaces for 'proto', 'phy' and 'pll'
61- reg-names: "proto", "phy", "pll"
62- interrupts: the DSI interrupt line
63- ti,hwmods: "dss_dsi1" or "dss_dsi2"
64- vdd-supply: power supply for DSI
65- clocks: handles to fclk and pll clock
66- clock-names: "fck", "sys_clk"
67
68Optional nodes:
69- Video port for DSI output
70- DSI controlled peripherals
71
72DSI Endpoint required properties:
73- lanes: list of pin numbers for the DSI lanes: CLK+, CLK-, DATA0+, DATA0-,
74 DATA1+, DATA1-, ...
75
76
77HDMI
78----
79
80Required properties:
81- compatible: "ti,omap5-hdmi"
82- reg: addresses and lengths of the register spaces for 'wp', 'pll', 'phy',
83 'core'
84- reg-names: "wp", "pll", "phy", "core"
85- interrupts: the HDMI interrupt line
86- ti,hwmods: "dss_hdmi"
87- vdda-supply: vdda power supply
88- clocks: handles to fclk and pll clock
89- clock-names: "fck", "sys_clk"
90
91Optional nodes:
92- Video port for HDMI output
93
94HDMI Endpoint optional properties:
95- lanes: list of 8 pin numbers for the HDMI lanes: CLK+, CLK-, D0+, D0-,
96 D1+, D1-, D2+, D2-. (default: 0,1,2,3,4,5,6,7)
diff --git a/Documentation/devicetree/bindings/video/toppoly,td028ttec1.txt b/Documentation/devicetree/bindings/video/toppoly,td028ttec1.txt
new file mode 100644
index 000000000000..7175dc3740ac
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/toppoly,td028ttec1.txt
@@ -0,0 +1,30 @@
1Toppoly TD028TTEC1 Panel
2========================
3
4Required properties:
5- compatible: "toppoly,td028ttec1"
6
7Optional properties:
8- label: a symbolic name for the panel
9
10Required nodes:
11- Video port for DPI input
12
13Example
14-------
15
16lcd-panel: td028ttec1@0 {
17 compatible = "toppoly,td028ttec1";
18 reg = <0>;
19 spi-max-frequency = <100000>;
20 spi-cpol;
21 spi-cpha;
22
23 label = "lcd";
24 port {
25 lcd_in: endpoint {
26 remote-endpoint = <&dpi_out>;
27 };
28 };
29};
30
diff --git a/Documentation/devicetree/bindings/video/tpo,td043mtea1.txt b/Documentation/devicetree/bindings/video/tpo,td043mtea1.txt
new file mode 100644
index 000000000000..ec6d62975162
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/tpo,td043mtea1.txt
@@ -0,0 +1,33 @@
1TPO TD043MTEA1 Panel
2====================
3
4Required properties:
5- compatible: "tpo,td043mtea1"
6- reset-gpios: panel reset gpio
7
8Optional properties:
9- label: a symbolic name for the panel
10
11Required nodes:
12- Video port for DPI input
13
14Example
15-------
16
17lcd-panel: panel@0 {
18 compatible = "tpo,td043mtea1";
19 reg = <0>;
20 spi-max-frequency = <100000>;
21 spi-cpol;
22 spi-cpha;
23
24 label = "lcd";
25
26 reset-gpios = <&gpio7 7 0>;
27
28 port {
29 lcd_in: endpoint {
30 remote-endpoint = <&dpi_out>;
31 };
32 };
33};
diff --git a/Documentation/devicetree/bindings/watchdog/marvel.txt b/Documentation/devicetree/bindings/watchdog/marvel.txt
index de11eb4c121f..97223fddb7bd 100644
--- a/Documentation/devicetree/bindings/watchdog/marvel.txt
+++ b/Documentation/devicetree/bindings/watchdog/marvel.txt
@@ -5,11 +5,18 @@ Required Properties:
5- Compatibility : "marvell,orion-wdt" 5- Compatibility : "marvell,orion-wdt"
6 "marvell,armada-370-wdt" 6 "marvell,armada-370-wdt"
7 "marvell,armada-xp-wdt" 7 "marvell,armada-xp-wdt"
8 "marvell,armada-375-wdt"
9 "marvell,armada-380-wdt"
8 10
9- reg : Should contain two entries: first one with the 11- reg : Should contain two entries: first one with the
10 timer control address, second one with the 12 timer control address, second one with the
11 rstout enable address. 13 rstout enable address.
12 14
15For "marvell,armada-375-wdt" and "marvell,armada-380-wdt":
16
17- reg : A third entry is mandatory and should contain the
18 shared mask/unmask RSTOUT address.
19
13Optional properties: 20Optional properties:
14 21
15- interrupts : Contains the IRQ for watchdog expiration 22- interrupts : Contains the IRQ for watchdog expiration
diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt
index 505e71172ae7..67a4087d53f9 100644
--- a/Documentation/dma-buf-sharing.txt
+++ b/Documentation/dma-buf-sharing.txt
@@ -66,7 +66,7 @@ The dma_buf buffer sharing API usage contains the following steps:
66 66
67 Exporting modules which do not wish to provide any specific name may use the 67 Exporting modules which do not wish to provide any specific name may use the
68 helper define 'dma_buf_export()', with the same arguments as above, but 68 helper define 'dma_buf_export()', with the same arguments as above, but
69 without the last argument; a __FILE__ pre-processor directive will be 69 without the last argument; a KBUILD_MODNAME pre-processor directive will be
70 inserted in place of 'exp_name' instead. 70 inserted in place of 'exp_name' instead.
71 71
722. Userspace gets a handle to pass around to potential buffer-users 722. Userspace gets a handle to pass around to potential buffer-users
@@ -217,7 +217,7 @@ NOTES:
217 and then allow further {map,unmap}_dma_buf operations from any buffer-user 217 and then allow further {map,unmap}_dma_buf operations from any buffer-user
218 from the migrated backing-storage. 218 from the migrated backing-storage.
219 219
220 If the exporter cannot fulfil the backing-storage constraints of the new 220 If the exporter cannot fulfill the backing-storage constraints of the new
221 buffer-user device as requested, dma_buf_attach() would return an error to 221 buffer-user device as requested, dma_buf_attach() would return an error to
222 denote non-compatibility of the new buffer-sharing request with the current 222 denote non-compatibility of the new buffer-sharing request with the current
223 buffer. 223 buffer.
@@ -352,7 +352,7 @@ Being able to mmap an export dma-buf buffer object has 2 main use-cases:
352 352
353 No special interfaces, userspace simply calls mmap on the dma-buf fd. 353 No special interfaces, userspace simply calls mmap on the dma-buf fd.
354 354
3552. Supporting existing mmap interfaces in exporters 3552. Supporting existing mmap interfaces in importers
356 356
357 Similar to the motivation for kernel cpu access it is again important that 357 Similar to the motivation for kernel cpu access it is again important that
358 the userspace code of a given importing subsystem can use the same interfaces 358 the userspace code of a given importing subsystem can use the same interfaces
diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt
index 4f7897e99cba..1525e30483fd 100644
--- a/Documentation/driver-model/devres.txt
+++ b/Documentation/driver-model/devres.txt
@@ -236,6 +236,9 @@ certainly invest a bit more effort into libata core layer).
236MEM 236MEM
237 devm_kzalloc() 237 devm_kzalloc()
238 devm_kfree() 238 devm_kfree()
239 devm_kmemdup()
240 devm_get_free_pages()
241 devm_free_pages()
239 242
240IIO 243IIO
241 devm_iio_device_alloc() 244 devm_iio_device_alloc()
@@ -308,3 +311,15 @@ SLAVE DMA ENGINE
308 311
309SPI 312SPI
310 devm_spi_register_master() 313 devm_spi_register_master()
314
315GPIO
316 devm_gpiod_get()
317 devm_gpiod_get_index()
318 devm_gpiod_get_optional()
319 devm_gpiod_get_index_optional()
320 devm_gpiod_put()
321
322MDIO
323 devm_mdiobus_alloc()
324 devm_mdiobus_alloc_size()
325 devm_mdiobus_free()
diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt
index 46325eb2ea76..9417871b8758 100644
--- a/Documentation/dynamic-debug-howto.txt
+++ b/Documentation/dynamic-debug-howto.txt
@@ -321,7 +321,7 @@ nullarbor:~ # echo -n 'func svc_process -p' >
321nullarbor:~ # echo -n 'format "nfsd: READ" +p' > 321nullarbor:~ # echo -n 'format "nfsd: READ" +p' >
322 <debugfs>/dynamic_debug/control 322 <debugfs>/dynamic_debug/control
323 323
324// enable messages in files of which the pathes include string "usb" 324// enable messages in files of which the paths include string "usb"
325nullarbor:~ # echo -n '*usb* +p' > <debugfs>/dynamic_debug/control 325nullarbor:~ # echo -n '*usb* +p' > <debugfs>/dynamic_debug/control
326 326
327// enable all messages 327// enable all messages
diff --git a/Documentation/edac.txt b/Documentation/edac.txt
index cb4c2cefd45a..73fff13e848f 100644
--- a/Documentation/edac.txt
+++ b/Documentation/edac.txt
@@ -550,7 +550,7 @@ installs itself as:
550 /sys/devices/systm/edac/test-instance 550 /sys/devices/systm/edac/test-instance
551 551
552in this directory are various controls, a symlink and one or more 'instance' 552in this directory are various controls, a symlink and one or more 'instance'
553directorys. 553directories.
554 554
555The standard default controls are: 555The standard default controls are:
556 556
diff --git a/Documentation/efi-stub.txt b/Documentation/efi-stub.txt
index c628788d5b47..7747024d3bb7 100644
--- a/Documentation/efi-stub.txt
+++ b/Documentation/efi-stub.txt
@@ -1,13 +1,21 @@
1 The EFI Boot Stub 1 The EFI Boot Stub
2 --------------------------- 2 ---------------------------
3 3
4On the x86 platform, a bzImage can masquerade as a PE/COFF image, 4On the x86 and ARM platforms, a kernel zImage/bzImage can masquerade
5thereby convincing EFI firmware loaders to load it as an EFI 5as a PE/COFF image, thereby convincing EFI firmware loaders to load
6executable. The code that modifies the bzImage header, along with the 6it as an EFI executable. The code that modifies the bzImage header,
7EFI-specific entry point that the firmware loader jumps to are 7along with the EFI-specific entry point that the firmware loader
8collectively known as the "EFI boot stub", and live in 8jumps to are collectively known as the "EFI boot stub", and live in
9arch/x86/boot/header.S and arch/x86/boot/compressed/eboot.c, 9arch/x86/boot/header.S and arch/x86/boot/compressed/eboot.c,
10respectively. 10respectively. For ARM the EFI stub is implemented in
11arch/arm/boot/compressed/efi-header.S and
12arch/arm/boot/compressed/efi-stub.c. EFI stub code that is shared
13between architectures is in drivers/firmware/efi/efi-stub-helper.c.
14
15For arm64, there is no compressed kernel support, so the Image itself
16masquerades as a PE/COFF image and the EFI stub is linked into the
17kernel. The arm64 EFI stub lives in arch/arm64/kernel/efi-entry.S
18and arch/arm64/kernel/efi-stub.c.
11 19
12By using the EFI boot stub it's possible to boot a Linux kernel 20By using the EFI boot stub it's possible to boot a Linux kernel
13without the use of a conventional EFI boot loader, such as grub or 21without the use of a conventional EFI boot loader, such as grub or
@@ -23,7 +31,10 @@ The bzImage located in arch/x86/boot/bzImage must be copied to the EFI
23System Partition (ESP) and renamed with the extension ".efi". Without 31System Partition (ESP) and renamed with the extension ".efi". Without
24the extension the EFI firmware loader will refuse to execute it. It's 32the extension the EFI firmware loader will refuse to execute it. It's
25not possible to execute bzImage.efi from the usual Linux file systems 33not possible to execute bzImage.efi from the usual Linux file systems
26because EFI firmware doesn't have support for them. 34because EFI firmware doesn't have support for them. For ARM the
35arch/arm/boot/zImage should be copied to the system partition, and it
36may not need to be renamed. Similarly for arm64, arch/arm64/boot/Image
37should be copied but not necessarily renamed.
27 38
28 39
29**** Passing kernel parameters from the EFI shell 40**** Passing kernel parameters from the EFI shell
@@ -63,3 +74,11 @@ Notice how bzImage.efi can be specified with a relative path. That's
63because the image we're executing is interpreted by the EFI shell, 74because the image we're executing is interpreted by the EFI shell,
64which understands relative paths, whereas the rest of the command line 75which understands relative paths, whereas the rest of the command line
65is passed to bzImage.efi. 76is passed to bzImage.efi.
77
78
79**** The "dtb=" option
80
81For the ARM and arm64 architectures, we also need to be able to provide a
82device tree to the kernel. This is done with the "dtb=" command line option,
83and is processed in the same manner as the "initrd=" option that is
84described above.
diff --git a/Documentation/email-clients.txt b/Documentation/email-clients.txt
index e9f5daccbd02..9af538be3751 100644
--- a/Documentation/email-clients.txt
+++ b/Documentation/email-clients.txt
@@ -1,6 +1,17 @@
1Email clients info for Linux 1Email clients info for Linux
2====================================================================== 2======================================================================
3 3
4Git
5----------------------------------------------------------------------
6These days most developers use `git send-email` instead of regular
7email clients. The man page for this is quite good. On the receiving
8end, maintainers use `git am` to apply the patches.
9
10If you are new to git then send your first patch to yourself. Save it
11as raw text including all the headers. Run `git am raw_email.txt` and
12then review the changelog with `git log`. When that works then send
13the patch to the appropriate mailing list(s).
14
4General Preferences 15General Preferences
5---------------------------------------------------------------------- 16----------------------------------------------------------------------
6Patches for the Linux kernel are submitted via email, preferably as 17Patches for the Linux kernel are submitted via email, preferably as
@@ -201,20 +212,15 @@ To beat some sense out of the internal editor, do this:
201 212
202- Edit your Thunderbird config settings so that it won't use format=flowed. 213- Edit your Thunderbird config settings so that it won't use format=flowed.
203 Go to "edit->preferences->advanced->config editor" to bring up the 214 Go to "edit->preferences->advanced->config editor" to bring up the
204 thunderbird's registry editor, and set "mailnews.send_plaintext_flowed" to 215 thunderbird's registry editor.
205 "false".
206 216
207- Disable HTML Format: Set "mail.identity.id1.compose_html" to "false". 217- Set "mailnews.send_plaintext_flowed" to "false"
208 218
209- Enable "preformat" mode: Set "editor.quotesPreformatted" to "true". 219- Set "mailnews.wraplength" from "72" to "0"
210 220
211- Enable UTF8: Set "prefs.converted-to-utf8" to "true". 221- "View" > "Message Body As" > "Plain Text"
212 222
213- Install the "toggle wordwrap" extension. Download the file from: 223- "View" > "Character Encoding" > "Unicode (UTF-8)"
214 https://addons.mozilla.org/thunderbird/addon/2351/
215 Then go to "tools->add ons", select "install" at the bottom of the screen,
216 and browse to where you saved the .xul file. This adds an "Enable
217 Wordwrap" entry under the Options menu of the message composer.
218 224
219~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 225~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
220TkRat (GUI) 226TkRat (GUI)
diff --git a/Documentation/fb/sm501.txt b/Documentation/fb/sm501.txt
index 8d17aebd2648..187f3b3ccb6c 100644
--- a/Documentation/fb/sm501.txt
+++ b/Documentation/fb/sm501.txt
@@ -3,7 +3,7 @@ Configuration:
3You can pass the following kernel command line options to sm501 videoframebuffer: 3You can pass the following kernel command line options to sm501 videoframebuffer:
4 4
5 sm501fb.bpp= SM501 Display driver: 5 sm501fb.bpp= SM501 Display driver:
6 Specifiy bits-per-pixel if not specified by 'mode' 6 Specify bits-per-pixel if not specified by 'mode'
7 7
8 sm501fb.mode= SM501 Display driver: 8 sm501fb.mode= SM501 Display driver:
9 Specify resolution as 9 Specify resolution as
diff --git a/Documentation/fb/sstfb.txt b/Documentation/fb/sstfb.txt
index 550ca775a4cb..13db1075e4a5 100644
--- a/Documentation/fb/sstfb.txt
+++ b/Documentation/fb/sstfb.txt
@@ -10,7 +10,7 @@ Introduction
10 The main page is located at <http://sstfb.sourceforge.net>, and if 10 The main page is located at <http://sstfb.sourceforge.net>, and if
11 you want the latest version, check out the CVS, as the driver is a work 11 you want the latest version, check out the CVS, as the driver is a work
12 in progress, I feel uncomfortable with releasing tarballs of something 12 in progress, I feel uncomfortable with releasing tarballs of something
13 not completely working...Don't worry, it's still more than useable 13 not completely working...Don't worry, it's still more than usable
14 (I eat my own dog food) 14 (I eat my own dog food)
15 15
16 Please read the Bug section, and report any success or failure to me 16 Please read the Bug section, and report any success or failure to me
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index eba790134253..b18dd1779029 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -196,8 +196,7 @@ prototypes:
196 void (*invalidatepage) (struct page *, unsigned int, unsigned int); 196 void (*invalidatepage) (struct page *, unsigned int, unsigned int);
197 int (*releasepage) (struct page *, int); 197 int (*releasepage) (struct page *, int);
198 void (*freepage)(struct page *); 198 void (*freepage)(struct page *);
199 int (*direct_IO)(int, struct kiocb *, const struct iovec *iov, 199 int (*direct_IO)(int, struct kiocb *, struct iov_iter *iter, loff_t offset);
200 loff_t offset, unsigned long nr_segs);
201 int (*get_xip_mem)(struct address_space *, pgoff_t, int, void **, 200 int (*get_xip_mem)(struct address_space *, pgoff_t, int, void **,
202 unsigned long *); 201 unsigned long *);
203 int (*migratepage)(struct address_space *, struct page *, struct page *); 202 int (*migratepage)(struct address_space *, struct page *, struct page *);
@@ -431,6 +430,8 @@ prototypes:
431 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); 430 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
432 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 431 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
433 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 432 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
433 ssize_t (*read_iter) (struct kiocb *, struct iov_iter *);
434 ssize_t (*write_iter) (struct kiocb *, struct iov_iter *);
434 int (*iterate) (struct file *, struct dir_context *); 435 int (*iterate) (struct file *, struct dir_context *);
435 unsigned int (*poll) (struct file *, struct poll_table_struct *); 436 unsigned int (*poll) (struct file *, struct poll_table_struct *);
436 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); 437 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt
index 25311e113e75..51afba17bbae 100644
--- a/Documentation/filesystems/f2fs.txt
+++ b/Documentation/filesystems/f2fs.txt
@@ -461,11 +461,11 @@ The number of blocks and buckets are determined by,
461 # of blocks in level #n = | 461 # of blocks in level #n = |
462 `- 4, Otherwise 462 `- 4, Otherwise
463 463
464 ,- 2^ (n + dir_level), 464 ,- 2^(n + dir_level),
465 | if n < MAX_DIR_HASH_DEPTH / 2, 465 | if n + dir_level < MAX_DIR_HASH_DEPTH / 2,
466 # of buckets in level #n = | 466 # of buckets in level #n = |
467 `- 2^((MAX_DIR_HASH_DEPTH / 2 + dir_level) - 1), 467 `- 2^((MAX_DIR_HASH_DEPTH / 2) - 1),
468 Otherwise 468 Otherwise
469 469
470When F2FS finds a file name in a directory, at first a hash value of the file 470When F2FS finds a file name in a directory, at first a hash value of the file
471name is calculated. Then, F2FS scans the hash table in level #0 to find the 471name is calculated. Then, F2FS scans the hash table in level #0 to find the
diff --git a/Documentation/filesystems/nfs/nfs41-server.txt b/Documentation/filesystems/nfs/nfs41-server.txt
index b930ad087780..c49cd7e796e7 100644
--- a/Documentation/filesystems/nfs/nfs41-server.txt
+++ b/Documentation/filesystems/nfs/nfs41-server.txt
@@ -176,7 +176,5 @@ Nonstandard compound limitations:
176 ca_maxrequestsize request and a ca_maxresponsesize reply, so we may 176 ca_maxrequestsize request and a ca_maxresponsesize reply, so we may
177 fail to live up to the promise we made in CREATE_SESSION fore channel 177 fail to live up to the promise we made in CREATE_SESSION fore channel
178 negotiation. 178 negotiation.
179* No more than one read-like operation allowed per compound; encoding
180 replies that cross page boundaries (except for read data) not handled.
181 179
182See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues. 180See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues.
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 8b9cd8eb3f91..ddc531a74d04 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -234,7 +234,7 @@ Table 1-2: Contents of the status files (as of 2.6.30-rc7)
234 ShdPnd bitmap of shared pending signals for the process 234 ShdPnd bitmap of shared pending signals for the process
235 SigBlk bitmap of blocked signals 235 SigBlk bitmap of blocked signals
236 SigIgn bitmap of ignored signals 236 SigIgn bitmap of ignored signals
237 SigCgt bitmap of catched signals 237 SigCgt bitmap of caught signals
238 CapInh bitmap of inheritable capabilities 238 CapInh bitmap of inheritable capabilities
239 CapPrm bitmap of permitted capabilities 239 CapPrm bitmap of permitted capabilities
240 CapEff bitmap of effective capabilities 240 CapEff bitmap of effective capabilities
@@ -300,7 +300,7 @@ Table 1-4: Contents of the stat files (as of 2.6.30-rc7)
300 pending bitmap of pending signals 300 pending bitmap of pending signals
301 blocked bitmap of blocked signals 301 blocked bitmap of blocked signals
302 sigign bitmap of ignored signals 302 sigign bitmap of ignored signals
303 sigcatch bitmap of catched signals 303 sigcatch bitmap of caught signals
304 wchan address where process went to sleep 304 wchan address where process went to sleep
305 0 (place holder) 305 0 (place holder)
306 0 (place holder) 306 0 (place holder)
@@ -854,7 +854,8 @@ WritebackTmp: Memory used by FUSE for temporary writeback buffers
854 if strict overcommit accounting is enabled (mode 2 in 854 if strict overcommit accounting is enabled (mode 2 in
855 'vm.overcommit_memory'). 855 'vm.overcommit_memory').
856 The CommitLimit is calculated with the following formula: 856 The CommitLimit is calculated with the following formula:
857 CommitLimit = ('vm.overcommit_ratio' * Physical RAM) + Swap 857 CommitLimit = ([total RAM pages] - [total huge TLB pages]) *
858 overcommit_ratio / 100 + [total swap pages]
858 For example, on a system with 1G of physical RAM and 7G 859 For example, on a system with 1G of physical RAM and 7G
859 of swap with a `vm.overcommit_ratio` of 30 it would 860 of swap with a `vm.overcommit_ratio` of 30 it would
860 yield a CommitLimit of 7.3G. 861 yield a CommitLimit of 7.3G.
@@ -1245,8 +1246,9 @@ second). The meanings of the columns are as follows, from left to right:
1245 1246
1246The "intr" line gives counts of interrupts serviced since boot time, for each 1247The "intr" line gives counts of interrupts serviced since boot time, for each
1247of the possible system interrupts. The first column is the total of all 1248of the possible system interrupts. The first column is the total of all
1248interrupts serviced; each subsequent column is the total for that particular 1249interrupts serviced including unnumbered architecture specific interrupts;
1249interrupt. 1250each subsequent column is the total for that particular numbered interrupt.
1251Unnumbered interrupts are not shown, only summed into the total.
1250 1252
1251The "ctxt" line gives the total number of context switches across all CPUs. 1253The "ctxt" line gives the total number of context switches across all CPUs.
1252 1254
diff --git a/Documentation/filesystems/seq_file.txt b/Documentation/filesystems/seq_file.txt
index a1e2e0dda907..1fe0ccb1af55 100644
--- a/Documentation/filesystems/seq_file.txt
+++ b/Documentation/filesystems/seq_file.txt
@@ -54,6 +54,15 @@ how the mechanism works without getting lost in other details. (Those
54wanting to see the full source for this module can find it at 54wanting to see the full source for this module can find it at
55http://lwn.net/Articles/22359/). 55http://lwn.net/Articles/22359/).
56 56
57Deprecated create_proc_entry
58
59Note that the above article uses create_proc_entry which was removed in
60kernel 3.10. Current versions require the following update
61
62- entry = create_proc_entry("sequence", 0, NULL);
63- if (entry)
64- entry->proc_fops = &ct_file_ops;
65+ entry = proc_create("sequence", 0, NULL, &ct_file_ops);
57 66
58The iterator interface 67The iterator interface
59 68
diff --git a/Documentation/filesystems/sharedsubtree.txt b/Documentation/filesystems/sharedsubtree.txt
index 4ede421c9687..32a173dd3158 100644
--- a/Documentation/filesystems/sharedsubtree.txt
+++ b/Documentation/filesystems/sharedsubtree.txt
@@ -727,7 +727,7 @@ replicas continue to be exactly same.
727 mkdir -p /tmp/m3 727 mkdir -p /tmp/m3
728 mount --rbind /root /tmp/m3 728 mount --rbind /root /tmp/m3
729 729
730 I wont' draw the tree..but it has 24 vfsmounts 730 I won't draw the tree..but it has 24 vfsmounts
731 731
732 732
733 at step i the number of vfsmounts is V[i] = i*V[i-1]. 733 at step i the number of vfsmounts is V[i] = i*V[i-1].
diff --git a/Documentation/filesystems/vfat.txt b/Documentation/filesystems/vfat.txt
index 4a93e98b290a..ce1126aceed8 100644
--- a/Documentation/filesystems/vfat.txt
+++ b/Documentation/filesystems/vfat.txt
@@ -172,6 +172,11 @@ nfs=stale_rw|nostale_ro
172 To maintain backward compatibility, '-o nfs' is also accepted, 172 To maintain backward compatibility, '-o nfs' is also accepted,
173 defaulting to stale_rw 173 defaulting to stale_rw
174 174
175dos1xfloppy -- If set, use a fallback default BIOS Parameter Block
176 configuration, determined by backing device size. These static
177 parameters match defaults assumed by DOS 1.x for 160 kiB,
178 180 kiB, 320 kiB, and 360 kiB floppies and floppy images.
179
175 180
176<bool>: 0,1,yes,no,true,false 181<bool>: 0,1,yes,no,true,false
177 182
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 617f6d70c077..a1d0d7a30165 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -589,8 +589,7 @@ struct address_space_operations {
589 void (*invalidatepage) (struct page *, unsigned int, unsigned int); 589 void (*invalidatepage) (struct page *, unsigned int, unsigned int);
590 int (*releasepage) (struct page *, int); 590 int (*releasepage) (struct page *, int);
591 void (*freepage)(struct page *); 591 void (*freepage)(struct page *);
592 ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, 592 ssize_t (*direct_IO)(int, struct kiocb *, struct iov_iter *iter, loff_t offset);
593 loff_t offset, unsigned long nr_segs);
594 struct page* (*get_xip_page)(struct address_space *, sector_t, 593 struct page* (*get_xip_page)(struct address_space *, sector_t,
595 int); 594 int);
596 /* migrate the contents of a page to the specified target */ 595 /* migrate the contents of a page to the specified target */
@@ -807,6 +806,8 @@ struct file_operations {
807 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); 806 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
808 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 807 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
809 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 808 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
809 ssize_t (*read_iter) (struct kiocb *, struct iov_iter *);
810 ssize_t (*write_iter) (struct kiocb *, struct iov_iter *);
810 int (*iterate) (struct file *, struct dir_context *); 811 int (*iterate) (struct file *, struct dir_context *);
811 unsigned int (*poll) (struct file *, struct poll_table_struct *); 812 unsigned int (*poll) (struct file *, struct poll_table_struct *);
812 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); 813 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
@@ -837,11 +838,15 @@ otherwise noted.
837 838
838 read: called by read(2) and related system calls 839 read: called by read(2) and related system calls
839 840
840 aio_read: called by io_submit(2) and other asynchronous I/O operations 841 aio_read: vectored, possibly asynchronous read
842
843 read_iter: possibly asynchronous read with iov_iter as destination
841 844
842 write: called by write(2) and related system calls 845 write: called by write(2) and related system calls
843 846
844 aio_write: called by io_submit(2) and other asynchronous I/O operations 847 aio_write: vectored, possibly asynchronous write
848
849 write_iter: possibly asynchronous write with iov_iter as source
845 850
846 iterate: called when the VFS needs to read the directory contents 851 iterate: called when the VFS needs to read the directory contents
847 852
diff --git a/Documentation/gpio/consumer.txt b/Documentation/gpio/consumer.txt
index 09854fe59307..d8abfc31abbe 100644
--- a/Documentation/gpio/consumer.txt
+++ b/Documentation/gpio/consumer.txt
@@ -41,7 +41,7 @@ Both functions return either a valid GPIO descriptor, or an error code checkable
41with IS_ERR() (they will never return a NULL pointer). -ENOENT will be returned 41with IS_ERR() (they will never return a NULL pointer). -ENOENT will be returned
42if and only if no GPIO has been assigned to the device/function/index triplet, 42if and only if no GPIO has been assigned to the device/function/index triplet,
43other error codes are used for cases where a GPIO has been assigned but an error 43other error codes are used for cases where a GPIO has been assigned but an error
44occured while trying to acquire it. This is useful to discriminate between mere 44occurred while trying to acquire it. This is useful to discriminate between mere
45errors and an absence of GPIO for optional GPIO parameters. 45errors and an absence of GPIO for optional GPIO parameters.
46 46
47Device-managed variants of these functions are also defined: 47Device-managed variants of these functions are also defined:
diff --git a/Documentation/gpio/driver.txt b/Documentation/gpio/driver.txt
index f73cc7b5dc85..fa9a0a8b3734 100644
--- a/Documentation/gpio/driver.txt
+++ b/Documentation/gpio/driver.txt
@@ -73,6 +73,65 @@ The IRQ portions of the GPIO block are implemented using an irqchip, using
73the header <linux/irq.h>. So basically such a driver is utilizing two sub- 73the header <linux/irq.h>. So basically such a driver is utilizing two sub-
74systems simultaneously: gpio and irq. 74systems simultaneously: gpio and irq.
75 75
76GPIO irqchips usually fall in one of two categories:
77
78* CHAINED GPIO irqchips: these are usually the type that is embedded on
79 an SoC. This means that there is a fast IRQ handler for the GPIOs that
80 gets called in a chain from the parent IRQ handler, most typically the
81 system interrupt controller. This means the GPIO irqchip is registered
82 using irq_set_chained_handler() or the corresponding
83 gpiochip_set_chained_irqchip() helper function, and the GPIO irqchip
84 handler will be called immediately from the parent irqchip, while
85 holding the IRQs disabled. The GPIO irqchip will then end up calling
86 something like this sequence in its interrupt handler:
87
88 static irqreturn_t tc3589x_gpio_irq(int irq, void *data)
89 chained_irq_enter(...);
90 generic_handle_irq(...);
91 chained_irq_exit(...);
92
93 Chained GPIO irqchips typically can NOT set the .can_sleep flag on
94 struct gpio_chip, as everything happens directly in the callbacks.
95
96* NESTED THREADED GPIO irqchips: these are off-chip GPIO expanders and any
97 other GPIO irqchip residing on the other side of a sleeping bus. Of course
98 such drivers that need slow bus traffic to read out IRQ status and similar,
99 traffic which may in turn incur other IRQs to happen, cannot be handled
100 in a quick IRQ handler with IRQs disabled. Instead they need to spawn a
101 thread and then mask the parent IRQ line until the interrupt is handled
102 by the driver. The hallmark of this driver is to call something like
103 this in its interrupt handler:
104
105 static irqreturn_t tc3589x_gpio_irq(int irq, void *data)
106 ...
107 handle_nested_irq(irq);
108
109 The hallmark of threaded GPIO irqchips is that they set the .can_sleep
110 flag on struct gpio_chip to true, indicating that this chip may sleep
111 when accessing the GPIOs.
112
113To help out in handling the set-up and management of GPIO irqchips and the
114associated irqdomain and resource allocation callbacks, the gpiolib has
115some helpers that can be enabled by selecting the GPIOLIB_IRQCHIP Kconfig
116symbol:
117
118* gpiochip_irqchip_add(): adds an irqchip to a gpiochip. It will pass
119 the struct gpio_chip* for the chip to all IRQ callbacks, so the callbacks
120 need to embed the gpio_chip in its state container and obtain a pointer
121 to the container using container_of().
122 (See Documentation/driver-model/design-patterns.txt)
123
124* gpiochip_set_chained_irqchip(): sets up a chained irq handler for a
125 gpio_chip from a parent IRQ and passes the struct gpio_chip* as handler
126 data. (Notice handler data, since the irqchip data is likely used by the
127 parent irqchip!) This is for the chained type of chip.
128
129To use the helpers please keep the following in mind:
130
131- Make sure to assign all relevant members of the struct gpio_chip so that
132 the irqchip can initialize. E.g. .dev and .can_sleep shall be set up
133 properly.
134
76It is legal for any IRQ consumer to request an IRQ from any irqchip no matter 135It is legal for any IRQ consumer to request an IRQ from any irqchip no matter
77if that is a combined GPIO+IRQ driver. The basic premise is that gpio_chip and 136if that is a combined GPIO+IRQ driver. The basic premise is that gpio_chip and
78irq_chip are orthogonal, and offering their services independent of each 137irq_chip are orthogonal, and offering their services independent of each
diff --git a/Documentation/hid/uhid.txt b/Documentation/hid/uhid.txt
index ee6593608c8e..54c8f9706a95 100644
--- a/Documentation/hid/uhid.txt
+++ b/Documentation/hid/uhid.txt
@@ -125,7 +125,7 @@ the request was handled successfully.
125 125
126read() 126read()
127------ 127------
128read() will return a queued ouput report. These output reports can be of type 128read() will return a queued output report. These output reports can be of type
129UHID_START, UHID_STOP, UHID_OPEN, UHID_CLOSE, UHID_OUTPUT or UHID_OUTPUT_EV. No 129UHID_START, UHID_STOP, UHID_OPEN, UHID_CLOSE, UHID_OUTPUT or UHID_OUTPUT_EV. No
130reaction is required to any of them but you should handle them according to your 130reaction is required to any of them but you should handle them according to your
131needs. Only UHID_OUTPUT and UHID_OUTPUT_EV have payloads. 131needs. Only UHID_OUTPUT and UHID_OUTPUT_EV have payloads.
diff --git a/Documentation/hsi.txt b/Documentation/hsi.txt
new file mode 100644
index 000000000000..6ac6cd51852a
--- /dev/null
+++ b/Documentation/hsi.txt
@@ -0,0 +1,75 @@
1HSI - High-speed Synchronous Serial Interface
2
31. Introduction
4~~~~~~~~~~~~~~~
5
6High Speed Syncronous Interface (HSI) is a fullduplex, low latency protocol,
7that is optimized for die-level interconnect between an Application Processor
8and a Baseband chipset. It has been specified by the MIPI alliance in 2003 and
9implemented by multiple vendors since then.
10
11The HSI interface supports full duplex communication over multiple channels
12(typically 8) and is capable of reaching speeds up to 200 Mbit/s.
13
14The serial protocol uses two signals, DATA and FLAG as combined data and clock
15signals and an additional READY signal for flow control. An additional WAKE
16signal can be used to wakeup the chips from standby modes. The signals are
17commonly prefixed by AC for signals going from the application die to the
18cellular die and CA for signals going the other way around.
19
20+------------+ +---------------+
21| Cellular | | Application |
22| Die | | Die |
23| | - - - - - - CAWAKE - - - - - - >| |
24| T|------------ CADATA ------------>|R |
25| X|------------ CAFLAG ------------>|X |
26| |<----------- ACREADY ------------| |
27| | | |
28| | | |
29| |< - - - - - ACWAKE - - - - - - -| |
30| R|<----------- ACDATA -------------|T |
31| X|<----------- ACFLAG -------------|X |
32| |------------ CAREADY ----------->| |
33| | | |
34| | | |
35+------------+ +---------------+
36
372. HSI Subsystem in Linux
38~~~~~~~~~~~~~~~~~~~~~~~~~
39
40In the Linux kernel the hsi subsystem is supposed to be used for HSI devices.
41The hsi subsystem contains drivers for hsi controllers including support for
42multi-port controllers and provides a generic API for using the HSI ports.
43
44It also contains HSI client drivers, which make use of the generic API to
45implement a protocol used on the HSI interface. These client drivers can
46use an arbitrary number of channels.
47
483. hsi-char Device
49~~~~~~~~~~~~~~~~~~
50
51Each port automatically registers a generic client driver called hsi_char,
52which provides a charecter device for userspace representing the HSI port.
53It can be used to communicate via HSI from userspace. Userspace may
54configure the hsi_char device using the following ioctl commands:
55
56* HSC_RESET:
57 - flush the HSI port
58
59* HSC_SET_PM
60 - enable or disable the client.
61
62* HSC_SEND_BREAK
63 - send break
64
65* HSC_SET_RX
66 - set RX configuration
67
68* HSC_GET_RX
69 - get RX configuration
70
71* HSC_SET_TX
72 - set TX configuration
73
74* HSC_GET_TX
75 - get TX configuration
diff --git a/Documentation/hwmon/emc1403 b/Documentation/hwmon/emc1403
new file mode 100644
index 000000000000..a869b0ef6a9d
--- /dev/null
+++ b/Documentation/hwmon/emc1403
@@ -0,0 +1,59 @@
1Kernel driver emc1403
2=====================
3
4Supported chips:
5 * SMSC / Microchip EMC1402, EMC1412
6 Addresses scanned: I2C 0x18, 0x1c, 0x29, 0x4c, 0x4d, 0x5c
7 Prefix: 'emc1402'
8 Datasheets:
9 http://ww1.microchip.com/downloads/en/DeviceDoc/1412.pdf
10 http://ww1.microchip.com/downloads/en/DeviceDoc/1402.pdf
11 * SMSC / Microchip EMC1403, EMC1404, EMC1413, EMC1414
12 Addresses scanned: I2C 0x18, 0x29, 0x4c, 0x4d
13 Prefix: 'emc1403', 'emc1404'
14 Datasheets:
15 http://ww1.microchip.com/downloads/en/DeviceDoc/1403_1404.pdf
16 http://ww1.microchip.com/downloads/en/DeviceDoc/1413_1414.pdf
17 * SMSC / Microchip EMC1422
18 Addresses scanned: I2C 0x4c
19 Prefix: 'emc1422'
20 Datasheet:
21 http://ww1.microchip.com/downloads/en/DeviceDoc/1422.pdf
22 * SMSC / Microchip EMC1423, EMC1424
23 Addresses scanned: I2C 0x4c
24 Prefix: 'emc1423', 'emc1424'
25 Datasheet:
26 http://ww1.microchip.com/downloads/en/DeviceDoc/1423_1424.pdf
27
28Author:
29 Kalhan Trisal <kalhan.trisal@intel.com
30
31
32Description
33-----------
34
35The Standard Microsystems Corporation (SMSC) / Microchip EMC14xx chips
36contain up to four temperature sensors. EMC14x2 support two sensors
37(one internal, one external). EMC14x3 support three sensors (one internal,
38two external), and EMC14x4 support four sensors (one internal, three
39external).
40
41The chips implement three limits for each sensor: low (tempX_min), high
42(tempX_max) and critical (tempX_crit.) The chips also implement an
43hysteresis mechanism which applies to all limits. The relative difference
44is stored in a single register on the chip, which means that the relative
45difference between the limit and its hysteresis is always the same for
46all three limits.
47
48This implementation detail implies the following:
49* When setting a limit, its hysteresis will automatically follow, the
50 difference staying unchanged. For example, if the old critical limit
51 was 80 degrees C, and the hysteresis was 75 degrees C, and you change
52 the critical limit to 90 degrees C, then the hysteresis will
53 automatically change to 85 degrees C.
54* The hysteresis values can't be set independently. We decided to make
55 only temp1_crit_hyst writable, while all other hysteresis attributes
56 are read-only. Setting temp1_crit_hyst writes the difference between
57 temp1_crit_hyst and temp1_crit into the chip, and the same relative
58 hysteresis applies automatically to all other limits.
59* The limits should be set before the hysteresis.
diff --git a/Documentation/hwmon/hwmon-kernel-api.txt b/Documentation/hwmon/hwmon-kernel-api.txt
new file mode 100644
index 000000000000..2ecdbfc85ecf
--- /dev/null
+++ b/Documentation/hwmon/hwmon-kernel-api.txt
@@ -0,0 +1,107 @@
1The Linux Hardware Monitoring kernel API.
2=========================================
3
4Guenter Roeck
5
6Introduction
7------------
8
9This document describes the API that can be used by hardware monitoring
10drivers that want to use the hardware monitoring framework.
11
12This document does not describe what a hardware monitoring (hwmon) Driver or
13Device is. It also does not describe the API which can be used by user space
14to communicate with a hardware monitoring device. If you want to know this
15then please read the following file: Documentation/hwmon/sysfs-interface.
16
17For additional guidelines on how to write and improve hwmon drivers, please
18also read Documentation/hwmon/submitting-patches.
19
20The API
21-------
22Each hardware monitoring driver must #include <linux/hwmon.h> and, in most
23cases, <linux/hwmon-sysfs.h>. linux/hwmon.h declares the following
24register/unregister functions:
25
26struct device *hwmon_device_register(struct device *dev);
27struct device *
28hwmon_device_register_with_groups(struct device *dev, const char *name,
29 void *drvdata,
30 const struct attribute_group **groups);
31
32struct device *
33devm_hwmon_device_register_with_groups(struct device *dev,
34 const char *name, void *drvdata,
35 const struct attribute_group **groups);
36
37void hwmon_device_unregister(struct device *dev);
38void devm_hwmon_device_unregister(struct device *dev);
39
40hwmon_device_register registers a hardware monitoring device. The parameter
41of this function is a pointer to the parent device.
42This function returns a pointer to the newly created hardware monitoring device
43or PTR_ERR for failure. If this registration function is used, hardware
44monitoring sysfs attributes are expected to have been created and attached to
45the parent device prior to calling hwmon_device_register. A name attribute must
46have been created by the caller.
47
48hwmon_device_register_with_groups is similar to hwmon_device_register. However,
49it has additional parameters. The name parameter is a pointer to the hwmon
50device name. The registration function wil create a name sysfs attribute
51pointing to this name. The drvdata parameter is the pointer to the local
52driver data. hwmon_device_register_with_groups will attach this pointer
53to the newly allocated hwmon device. The pointer can be retrieved by the driver
54using dev_get_drvdata() on the hwmon device pointer. The groups parameter is
55a pointer to a list of sysfs attribute groups. The list must be NULL terminated.
56hwmon_device_register_with_groups creates the hwmon device with name attribute
57as well as all sysfs attributes attached to the hwmon device.
58
59devm_hwmon_device_register_with_groups is similar to
60hwmon_device_register_with_groups. However, it is device managed, meaning the
61hwmon device does not have to be removed explicitly by the removal function.
62
63hwmon_device_unregister deregisters a registered hardware monitoring device.
64The parameter of this function is the pointer to the registered hardware
65monitoring device structure. This function must be called from the driver
66remove function if the hardware monitoring device was registered with
67hwmon_device_register or with hwmon_device_register_with_groups.
68
69devm_hwmon_device_unregister does not normally have to be called. It is only
70needed for error handling, and only needed if the driver probe fails after
71the call to devm_hwmon_device_register_with_groups.
72
73The header file linux/hwmon-sysfs.h provides a number of useful macros to
74declare and use hardware monitoring sysfs attributes.
75
76In many cases, you can use the exsting define DEVICE_ATTR to declare such
77attributes. This is feasible if an attribute has no additional context. However,
78in many cases there will be additional information such as a sensor index which
79will need to be passed to the sysfs attribute handling function.
80
81SENSOR_DEVICE_ATTR and SENSOR_DEVICE_ATTR_2 can be used to define attributes
82which need such additional context information. SENSOR_DEVICE_ATTR requires
83one additional argument, SENSOR_DEVICE_ATTR_2 requires two.
84
85SENSOR_DEVICE_ATTR defines a struct sensor_device_attribute variable.
86This structure has the following fields.
87
88struct sensor_device_attribute {
89 struct device_attribute dev_attr;
90 int index;
91};
92
93You can use to_sensor_dev_attr to get the pointer to this structure from the
94attribute read or write function. Its parameter is the device to which the
95attribute is attached.
96
97SENSOR_DEVICE_ATTR_2 defines a struct sensor_device_attribute_2 variable,
98which is defined as follows.
99
100struct sensor_device_attribute_2 {
101 struct device_attribute dev_attr;
102 u8 index;
103 u8 nr;
104};
105
106Use to_sensor_dev_attr_2 to get the pointer to this structure. Its parameter
107is the device to which the attribute is attached.
diff --git a/Documentation/hwmon/jc42 b/Documentation/hwmon/jc42
index 868d74d6b773..f3893f7440de 100644
--- a/Documentation/hwmon/jc42
+++ b/Documentation/hwmon/jc42
@@ -5,9 +5,12 @@ Supported chips:
5 * Analog Devices ADT7408 5 * Analog Devices ADT7408
6 Datasheets: 6 Datasheets:
7 http://www.analog.com/static/imported-files/data_sheets/ADT7408.pdf 7 http://www.analog.com/static/imported-files/data_sheets/ADT7408.pdf
8 * Atmel AT30TS00 8 * Atmel AT30TS00, AT30TS002A/B, AT30TSE004A
9 Datasheets: 9 Datasheets:
10 http://www.atmel.com/Images/doc8585.pdf 10 http://www.atmel.com/Images/doc8585.pdf
11 http://www.atmel.com/Images/doc8711.pdf
12 http://www.atmel.com/Images/Atmel-8852-SEEPROM-AT30TSE002A-Datasheet.pdf
13 http://www.atmel.com/Images/Atmel-8868-DTS-AT30TSE004A-Datasheet.pdf
11 * IDT TSE2002B3, TSE2002GB2, TS3000B3, TS3000GB2 14 * IDT TSE2002B3, TSE2002GB2, TS3000B3, TS3000GB2
12 Datasheets: 15 Datasheets:
13 http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf 16 http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf
@@ -34,12 +37,13 @@ Supported chips:
34 Datasheet: 37 Datasheet:
35 http://www.onsemi.com/pub_link/Collateral/CAT34TS02-D.PDF 38 http://www.onsemi.com/pub_link/Collateral/CAT34TS02-D.PDF
36 http://www.onsemi.com/pub/Collateral/CAT6095-D.PDF 39 http://www.onsemi.com/pub/Collateral/CAT6095-D.PDF
37 * ST Microelectronics STTS424, STTS424E02, STTS2002, STTS3000 40 * ST Microelectronics STTS424, STTS424E02, STTS2002, STTS2004, STTS3000
38 Datasheets: 41 Datasheets:
39 http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00157556.pdf 42 http://www.st.com/web/en/resource/technical/document/datasheet/CD00157556.pdf
40 http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00157558.pdf 43 http://www.st.com/web/en/resource/technical/document/datasheet/CD00157558.pdf
41 http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00225278.pdf 44 http://www.st.com/web/en/resource/technical/document/datasheet/CD00266638.pdf
42 http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATA_BRIEF/CD00270920.pdf 45 http://www.st.com/web/en/resource/technical/document/datasheet/CD00225278.pdf
46 http://www.st.com/web/en/resource/technical/document/datasheet/DM00076709.pdf
43 * JEDEC JC 42.4 compliant temperature sensor chips 47 * JEDEC JC 42.4 compliant temperature sensor chips
44 Datasheet: 48 Datasheet:
45 http://www.jedec.org/sites/default/files/docs/4_01_04R19.pdf 49 http://www.jedec.org/sites/default/files/docs/4_01_04R19.pdf
diff --git a/Documentation/hwmon/lm77 b/Documentation/hwmon/lm77
index 57c3a46d6370..bfc915fe3639 100644
--- a/Documentation/hwmon/lm77
+++ b/Documentation/hwmon/lm77
@@ -18,5 +18,21 @@ sensor incorporates a band-gap type temperature sensor,
1810-bit ADC, and a digital comparator with user-programmable upper 1810-bit ADC, and a digital comparator with user-programmable upper
19and lower limit values. 19and lower limit values.
20 20
21Limits can be set through the Overtemperature Shutdown register and 21The LM77 implements 3 limits: low (temp1_min), high (temp1_max) and
22Hysteresis register. 22critical (temp1_crit.) It also implements an hysteresis mechanism which
23applies to all 3 limits. The relative difference is stored in a single
24register on the chip, which means that the relative difference between
25the limit and its hysteresis is always the same for all 3 limits.
26
27This implementation detail implies the following:
28* When setting a limit, its hysteresis will automatically follow, the
29 difference staying unchanged. For example, if the old critical limit
30 was 80 degrees C, and the hysteresis was 75 degrees C, and you change
31 the critical limit to 90 degrees C, then the hysteresis will
32 automatically change to 85 degrees C.
33* All 3 hysteresis can't be set independently. We decided to make
34 temp1_crit_hyst writable, while temp1_min_hyst and temp1_max_hyst are
35 read-only. Setting temp1_crit_hyst writes the difference between
36 temp1_crit_hyst and temp1_crit into the chip, and the same relative
37 hysteresis applies automatically to the low and high limits.
38* The limits should be set before the hysteresis.
diff --git a/Documentation/hwmon/nct6683 b/Documentation/hwmon/nct6683
new file mode 100644
index 000000000000..c1301d4300cd
--- /dev/null
+++ b/Documentation/hwmon/nct6683
@@ -0,0 +1,57 @@
1Kernel driver nct6683
2=====================
3
4Supported chips:
5 * Nuvoton NCT6683D
6 Prefix: 'nct6683'
7 Addresses scanned: ISA address retrieved from Super I/O registers
8 Datasheet: Available from Nuvoton upon request
9
10Authors:
11 Guenter Roeck <linux@roeck-us.net>
12
13Description
14-----------
15
16This driver implements support for the Nuvoton NCT6683D eSIO chip.
17
18The chips implement up to shared 32 temperature and voltage sensors.
19It supports up to 16 fan rotation sensors and up to 8 fan control engines.
20
21Temperatures are measured in degrees Celsius. Measurement resolution is
220.5 degrees C.
23
24Voltage sensors (also known as IN sensors) report their values in millivolts.
25
26Fan rotation speeds are reported in RPM (rotations per minute).
27
28Usage Note
29----------
30
31Limit register locations on Intel boards with EC firmware version 1.0
32build date 04/03/13 do not match the register locations in the Nuvoton
33datasheet. Nuvoton confirms that Intel uses a special firmware version
34with different register addresses. The specification describing the Intel
35firmware is held under NDA by Nuvoton and Intel and not available
36to the public.
37
38Some of the register locations can be reverse engineered; others are too
39well hidden. Given this, writing any values from the operating system is
40considered too risky with this firmware and has been disabled. All limits
41must all be written from the BIOS.
42
43The driver has only been tested with the Intel firmware, and by default
44only instantiates on Intel boards. To enable it on non-Intel boards,
45set the 'force' module parameter to 1.
46
47Tested Boards and Firmware Versions
48-----------------------------------
49
50The driver has been reported to work with the following boards and
51firmware versions.
52
53Board Firmware version
54---------------------------------------------------------------
55Intel DH87RL NCT6683D EC firmware version 1.0 build 04/03/13
56Intel DH87MC NCT6683D EC firmware version 1.0 build 04/03/13
57Intel DB85FL NCT6683D EC firmware version 1.0 build 04/03/13
diff --git a/Documentation/hwmon/ntc_thermistor b/Documentation/hwmon/ntc_thermistor
index 3bfda94096fd..057b77029f26 100644
--- a/Documentation/hwmon/ntc_thermistor
+++ b/Documentation/hwmon/ntc_thermistor
@@ -1,7 +1,7 @@
1Kernel driver ntc_thermistor 1Kernel driver ntc_thermistor
2================= 2=================
3 3
4Supported thermistors: 4Supported thermistors from Murata:
5* Murata NTC Thermistors NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, NCP15WL333 5* Murata NTC Thermistors NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, NCP15WL333
6 Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473', 'ncp15wl333' 6 Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473', 'ncp15wl333'
7 Datasheet: Publicly available at Murata 7 Datasheet: Publicly available at Murata
@@ -15,9 +15,9 @@ Authors:
15Description 15Description
16----------- 16-----------
17 17
18The NTC thermistor is a simple thermistor that requires users to provide the 18The NTC (Negative Temperature Coefficient) thermistor is a simple thermistor
19resistance and lookup the corresponding compensation table to get the 19that requires users to provide the resistance and lookup the corresponding
20temperature input. 20compensation table to get the temperature input.
21 21
22The NTC driver provides lookup tables with a linear approximation function 22The NTC driver provides lookup tables with a linear approximation function
23and four circuit models with an option not to use any of the four models. 23and four circuit models with an option not to use any of the four models.
diff --git a/Documentation/hwmon/shtc1 b/Documentation/hwmon/shtc1
new file mode 100644
index 000000000000..6b1e05458f0f
--- /dev/null
+++ b/Documentation/hwmon/shtc1
@@ -0,0 +1,43 @@
1Kernel driver shtc1
2===================
3
4Supported chips:
5 * Sensirion SHTC1
6 Prefix: 'shtc1'
7 Addresses scanned: none
8 Datasheet: http://www.sensirion.com/file/datasheet_shtc1
9
10 * Sensirion SHTW1
11 Prefix: 'shtw1'
12 Addresses scanned: none
13 Datasheet: Not publicly available
14
15Author:
16 Johannes Winkelmann <johannes.winkelmann@sensirion.com>
17
18Description
19-----------
20
21This driver implements support for the Sensirion SHTC1 chip, a humidity and
22temperature sensor. Temperature is measured in degrees celsius, relative
23humidity is expressed as a percentage. Driver can be used as well for SHTW1
24chip, which has the same electrical interface.
25
26The device communicates with the I2C protocol. All sensors are set to I2C
27address 0x70. See Documentation/i2c/instantiating-devices for methods to
28instantiate the device.
29
30There are two options configurable by means of shtc1_platform_data:
311. blocking (pull the I2C clock line down while performing the measurement) or
32 non-blocking mode. Blocking mode will guarantee the fastest result but
33 the I2C bus will be busy during that time. By default, non-blocking mode
34 is used. Make sure clock-stretching works properly on your device if you
35 want to use blocking mode.
362. high or low accuracy. High accuracy is used by default and using it is
37 strongly recommended.
38
39sysfs-Interface
40---------------
41
42temp1_input - temperature input
43humidity1_input - humidity input
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface
index 79f8257dd790..2cc95ad46604 100644
--- a/Documentation/hwmon/sysfs-interface
+++ b/Documentation/hwmon/sysfs-interface
@@ -327,6 +327,13 @@ temp[1-*]_max_hyst
327 from the max value. 327 from the max value.
328 RW 328 RW
329 329
330temp[1-*]_min_hyst
331 Temperature hysteresis value for min limit.
332 Unit: millidegree Celsius
333 Must be reported as an absolute temperature, NOT a delta
334 from the min value.
335 RW
336
330temp[1-*]_input Temperature input value. 337temp[1-*]_input Temperature input value.
331 Unit: millidegree Celsius 338 Unit: millidegree Celsius
332 RO 339 RO
@@ -362,6 +369,13 @@ temp[1-*]_lcrit Temperature critical min value, typically lower than
362 Unit: millidegree Celsius 369 Unit: millidegree Celsius
363 RW 370 RW
364 371
372temp[1-*]_lcrit_hyst
373 Temperature hysteresis value for critical min limit.
374 Unit: millidegree Celsius
375 Must be reported as an absolute temperature, NOT a delta
376 from the critical min value.
377 RW
378
365temp[1-*]_offset 379temp[1-*]_offset
366 Temperature offset which is added to the temperature reading 380 Temperature offset which is added to the temperature reading
367 by the chip. 381 by the chip.
diff --git a/Documentation/input/alps.txt b/Documentation/input/alps.txt
index e544c7ff8cfa..90bca6f988e1 100644
--- a/Documentation/input/alps.txt
+++ b/Documentation/input/alps.txt
@@ -94,7 +94,7 @@ PS/2 packet format
94 94
95Note that the device never signals overflow condition. 95Note that the device never signals overflow condition.
96 96
97ALPS Absolute Mode - Protocol Verion 1 97ALPS Absolute Mode - Protocol Version 1
98-------------------------------------- 98--------------------------------------
99 99
100 byte 0: 1 0 0 0 1 x9 x8 x7 100 byte 0: 1 0 0 0 1 x9 x8 x7
diff --git a/Documentation/input/input.txt b/Documentation/input/input.txt
index 666c06c5ab0c..0acfddbe2028 100644
--- a/Documentation/input/input.txt
+++ b/Documentation/input/input.txt
@@ -226,7 +226,7 @@ And so on up to js31.
226~~~~~~~~~~~ 226~~~~~~~~~~~
227 evdev is the generic input event interface. It passes the events 227 evdev is the generic input event interface. It passes the events
228generated in the kernel straight to the program, with timestamps. The 228generated in the kernel straight to the program, with timestamps. The
229API is still evolving, but should be useable now. It's described in 229API is still evolving, but should be usable now. It's described in
230section 5. 230section 5.
231 231
232 This should be the way for GPM and X to get keyboard and mouse 232 This should be the way for GPM and X to get keyboard and mouse
diff --git a/Documentation/java.txt b/Documentation/java.txt
index e6a723281547..418020584ccc 100644
--- a/Documentation/java.txt
+++ b/Documentation/java.txt
@@ -188,6 +188,9 @@ shift
188#define CP_METHODREF 10 188#define CP_METHODREF 10
189#define CP_INTERFACEMETHODREF 11 189#define CP_INTERFACEMETHODREF 11
190#define CP_NAMEANDTYPE 12 190#define CP_NAMEANDTYPE 12
191#define CP_METHODHANDLE 15
192#define CP_METHODTYPE 16
193#define CP_INVOKEDYNAMIC 18
191 194
192/* Define some commonly used error messages */ 195/* Define some commonly used error messages */
193 196
@@ -242,14 +245,19 @@ void skip_constant(FILE *classfile, u_int16_t *cur)
242 break; 245 break;
243 case CP_CLASS: 246 case CP_CLASS:
244 case CP_STRING: 247 case CP_STRING:
248 case CP_METHODTYPE:
245 seekerr = fseek(classfile, 2, SEEK_CUR); 249 seekerr = fseek(classfile, 2, SEEK_CUR);
246 break; 250 break;
251 case CP_METHODHANDLE:
252 seekerr = fseek(classfile, 3, SEEK_CUR);
253 break;
247 case CP_INTEGER: 254 case CP_INTEGER:
248 case CP_FLOAT: 255 case CP_FLOAT:
249 case CP_FIELDREF: 256 case CP_FIELDREF:
250 case CP_METHODREF: 257 case CP_METHODREF:
251 case CP_INTERFACEMETHODREF: 258 case CP_INTERFACEMETHODREF:
252 case CP_NAMEANDTYPE: 259 case CP_NAMEANDTYPE:
260 case CP_INVOKEDYNAMIC:
253 seekerr = fseek(classfile, 4, SEEK_CUR); 261 seekerr = fseek(classfile, 4, SEEK_CUR);
254 break; 262 break;
255 case CP_LONG: 263 case CP_LONG:
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index d567a7cc552b..c600e2f44a62 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -1171,7 +1171,7 @@ When kbuild executes, the following steps are followed (roughly):
1171 obvious reason. 1171 obvious reason.
1172 1172
1173 dtc 1173 dtc
1174 Create flattend device tree blob object suitable for linking 1174 Create flattened device tree blob object suitable for linking
1175 into vmlinux. Device tree blobs linked into vmlinux are placed 1175 into vmlinux. Device tree blobs linked into vmlinux are placed
1176 in an init section in the image. Platform code *must* copy the 1176 in an init section in the image. Platform code *must* copy the
1177 blob to non-init memory prior to calling unflatten_device_tree(). 1177 blob to non-init memory prior to calling unflatten_device_tree().
diff --git a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt
index 69372fb98cf8..3fb39e0116b4 100644
--- a/Documentation/kbuild/modules.txt
+++ b/Documentation/kbuild/modules.txt
@@ -470,7 +470,7 @@ build.
470 470
471 Sometimes, an external module uses exported symbols from 471 Sometimes, an external module uses exported symbols from
472 another external module. kbuild needs to have full knowledge of 472 another external module. kbuild needs to have full knowledge of
473 all symbols to avoid spliitting out warnings about undefined 473 all symbols to avoid spitting out warnings about undefined
474 symbols. Three solutions exist for this situation. 474 symbols. Three solutions exist for this situation.
475 475
476 NOTE: The method with a top-level kbuild file is recommended 476 NOTE: The method with a top-level kbuild file is recommended
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 43842177b771..b7fa2f599459 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1,27 +1,37 @@
1 Kernel Parameters 1 Kernel Parameters
2 ~~~~~~~~~~~~~~~~~ 2 ~~~~~~~~~~~~~~~~~
3 3
4The following is a consolidated list of the kernel parameters as implemented 4The following is a consolidated list of the kernel parameters as
5(mostly) by the __setup() macro and sorted into English Dictionary order 5implemented by the __setup(), core_param() and module_param() macros
6(defined as ignoring all punctuation and sorting digits before letters in a 6and sorted into English Dictionary order (defined as ignoring all
7case insensitive manner), and with descriptions where known. 7punctuation and sorting digits before letters in a case insensitive
8 8manner), and with descriptions where known.
9Module parameters for loadable modules are specified only as the 9
10parameter name with optional '=' and value as appropriate, such as: 10The kernel parses parameters from the kernel command line up to "--";
11 11if it doesn't recognize a parameter and it doesn't contain a '.', the
12 modprobe usbcore blinkenlights=1 12parameter gets passed to init: parameters with '=' go into init's
13 13environment, others are passed as command line arguments to init.
14Module parameters for modules that are built into the kernel image 14Everything after "--" is passed as an argument to init.
15are specified on the kernel command line with the module name plus 15
16'.' plus parameter name, with '=' and value if appropriate, such as: 16Module parameters can be specified in two ways: via the kernel command
17 17line with a module name prefix, or via modprobe, e.g.:
18 usbcore.blinkenlights=1 18
19 (kernel command line) usbcore.blinkenlights=1
20 (modprobe command line) modprobe usbcore blinkenlights=1
21
22Parameters for modules which are built into the kernel need to be
23specified on the kernel command line. modprobe looks through the
24kernel command line (/proc/cmdline) and collects module parameters
25when it loads a module, so the kernel command line can be used for
26loadable modules too.
19 27
20Hyphens (dashes) and underscores are equivalent in parameter names, so 28Hyphens (dashes) and underscores are equivalent in parameter names, so
21 log_buf_len=1M print-fatal-signals=1 29 log_buf_len=1M print-fatal-signals=1
22can also be entered as 30can also be entered as
23 log-buf-len=1M print_fatal_signals=1 31 log-buf-len=1M print_fatal_signals=1
24 32
33Double-quotes can be used to protect spaces in values, e.g.:
34 param="spaces in here"
25 35
26This document may not be entirely up to date and comprehensive. The command 36This document may not be entirely up to date and comprehensive. The command
27"modinfo -p ${modulename}" shows a current list of all parameters of a loadable 37"modinfo -p ${modulename}" shows a current list of all parameters of a loadable
@@ -214,6 +224,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
214 unusable. The "log_buf_len" parameter may be useful 224 unusable. The "log_buf_len" parameter may be useful
215 if you need to capture more output. 225 if you need to capture more output.
216 226
227 acpi_force_table_verification [HW,ACPI]
228 Enable table checksum verification during early stage.
229 By default, this is disabled due to x86 early mapping
230 size limitation.
231
217 acpi_irq_balance [HW,ACPI] 232 acpi_irq_balance [HW,ACPI]
218 ACPI will balance active IRQs 233 ACPI will balance active IRQs
219 default in APIC mode 234 default in APIC mode
@@ -237,7 +252,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
237 This feature is enabled by default. 252 This feature is enabled by default.
238 This option allows to turn off the feature. 253 This option allows to turn off the feature.
239 254
240 acpi_no_auto_ssdt [HW,ACPI] Disable automatic loading of SSDT 255 acpi_no_static_ssdt [HW,ACPI]
256 Disable installation of static SSDTs at early boot time
257 By default, SSDTs contained in the RSDT/XSDT will be
258 installed automatically and they will appear under
259 /sys/firmware/acpi/tables.
260 This option turns off this feature.
261 Note that specifying this option does not affect
262 dynamic table installation which will install SSDT
263 tables to /sys/firmware/acpi/tables/dynamic.
241 264
242 acpica_no_return_repair [HW, ACPI] 265 acpica_no_return_repair [HW, ACPI]
243 Disable AML predefined validation mechanism 266 Disable AML predefined validation mechanism
@@ -617,8 +640,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
617 Also note the kernel might malfunction if you disable 640 Also note the kernel might malfunction if you disable
618 some critical bits. 641 some critical bits.
619 642
620 cma=nn[MG] [ARM,KNL] 643 cma=nn[MG]@[start[MG][-end[MG]]]
621 Sets the size of kernel global memory area for contiguous 644 [ARM,X86,KNL]
645 Sets the size of kernel global memory area for
646 contiguous memory allocations and optionally the
647 placement constraint by the physical address range of
622 memory allocations. For more information, see 648 memory allocations. For more information, see
623 include/linux/dma-contiguous.h 649 include/linux/dma-contiguous.h
624 650
@@ -883,6 +909,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
883 which are not unmapped. 909 which are not unmapped.
884 910
885 earlycon= [KNL] Output early console device and options. 911 earlycon= [KNL] Output early console device and options.
912
886 uart[8250],io,<addr>[,options] 913 uart[8250],io,<addr>[,options]
887 uart[8250],mmio,<addr>[,options] 914 uart[8250],mmio,<addr>[,options]
888 uart[8250],mmio32,<addr>[,options] 915 uart[8250],mmio32,<addr>[,options]
@@ -892,7 +919,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
892 (mmio) or 32-bit (mmio32). 919 (mmio) or 32-bit (mmio32).
893 The options are the same as for ttyS, above. 920 The options are the same as for ttyS, above.
894 921
895 earlyprintk= [X86,SH,BLACKFIN,ARM] 922 pl011,<addr>
923 Start an early, polled-mode console on a pl011 serial
924 port at the specified address. The pl011 serial port
925 must already be setup and configured. Options are not
926 yet supported.
927
928 smh Use ARM semihosting calls for early console.
929
930 earlyprintk= [X86,SH,BLACKFIN,ARM,M68k]
896 earlyprintk=vga 931 earlyprintk=vga
897 earlyprintk=efi 932 earlyprintk=efi
898 earlyprintk=xen 933 earlyprintk=xen
@@ -1287,6 +1322,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1287 for working out where the kernel is dying during 1322 for working out where the kernel is dying during
1288 startup. 1323 startup.
1289 1324
1325 initcall_blacklist= [KNL] Do not execute a comma-separated list of
1326 initcall functions. Useful for debugging built-in
1327 modules and initcalls.
1328
1290 initrd= [BOOT] Specify the location of the initial ramdisk 1329 initrd= [BOOT] Specify the location of the initial ramdisk
1291 1330
1292 inport.irq= [HW] Inport (ATI XL and Microsoft) busmouse driver 1331 inport.irq= [HW] Inport (ATI XL and Microsoft) busmouse driver
@@ -1435,6 +1474,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1435 js= [HW,JOY] Analog joystick 1474 js= [HW,JOY] Analog joystick
1436 See Documentation/input/joystick.txt. 1475 See Documentation/input/joystick.txt.
1437 1476
1477 kaslr/nokaslr [X86]
1478 Enable/disable kernel and module base offset ASLR
1479 (Address Space Layout Randomization) if built into
1480 the kernel. When CONFIG_HIBERNATION is selected,
1481 kASLR is disabled by default. When kASLR is enabled,
1482 hibernation will be disabled.
1483
1438 keepinitrd [HW,ARM] 1484 keepinitrd [HW,ARM]
1439 1485
1440 kernelcore=nn[KMG] [KNL,X86,IA-64,PPC] This parameter 1486 kernelcore=nn[KMG] [KNL,X86,IA-64,PPC] This parameter
@@ -2071,10 +2117,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2071 noapic [SMP,APIC] Tells the kernel to not make use of any 2117 noapic [SMP,APIC] Tells the kernel to not make use of any
2072 IOAPICs that may be present in the system. 2118 IOAPICs that may be present in the system.
2073 2119
2074 nokaslr [X86]
2075 Disable kernel and module base offset ASLR (Address
2076 Space Layout Randomization) if built into the kernel.
2077
2078 noautogroup Disable scheduler automatic task group creation. 2120 noautogroup Disable scheduler automatic task group creation.
2079 2121
2080 nobats [PPC] Do not use BATs for mapping kernel lowmem 2122 nobats [PPC] Do not use BATs for mapping kernel lowmem
@@ -2145,6 +2187,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2145 in certain environments such as networked servers or 2187 in certain environments such as networked servers or
2146 real-time systems. 2188 real-time systems.
2147 2189
2190 nohibernate [HIBERNATION] Disable hibernation and resume.
2191
2148 nohz= [KNL] Boottime enable/disable dynamic ticks 2192 nohz= [KNL] Boottime enable/disable dynamic ticks
2149 Valid arguments: on, off 2193 Valid arguments: on, off
2150 Default: on 2194 Default: on
@@ -2218,10 +2262,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2218 noreplace-smp [X86-32,SMP] Don't replace SMP instructions 2262 noreplace-smp [X86-32,SMP] Don't replace SMP instructions
2219 with UP alternatives 2263 with UP alternatives
2220 2264
2221 nordrand [X86] Disable the direct use of the RDRAND 2265 nordrand [X86] Disable kernel use of the RDRAND and
2222 instruction even if it is supported by the 2266 RDSEED instructions even if they are supported
2223 processor. RDRAND is still available to user 2267 by the processor. RDRAND and RDSEED are still
2224 space applications. 2268 available to user space applications.
2225 2269
2226 noresume [SWSUSP] Disables resume and restores original swap 2270 noresume [SWSUSP] Disables resume and restores original swap
2227 space. 2271 space.
@@ -2332,6 +2376,14 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2332 timeout < 0: reboot immediately 2376 timeout < 0: reboot immediately
2333 Format: <timeout> 2377 Format: <timeout>
2334 2378
2379 crash_kexec_post_notifiers
2380 Run kdump after running panic-notifiers and dumping
2381 kmsg. This only for the users who doubt kdump always
2382 succeeds in any situation.
2383 Note that this also increases risks of kdump failure,
2384 because some panic notifiers can make the crashed
2385 kernel more unstable.
2386
2335 parkbd.port= [HW] Parallel port number the keyboard adapter is 2387 parkbd.port= [HW] Parallel port number the keyboard adapter is
2336 connected to, default is 0. 2388 connected to, default is 0.
2337 Format: <parport#> 2389 Format: <parport#>
@@ -2738,6 +2790,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2738 leaf rcu_node structure. Useful for very large 2790 leaf rcu_node structure. Useful for very large
2739 systems. 2791 systems.
2740 2792
2793 rcutree.jiffies_till_sched_qs= [KNL]
2794 Set required age in jiffies for a
2795 given grace period before RCU starts
2796 soliciting quiescent-state help from
2797 rcu_note_context_switch().
2798
2741 rcutree.jiffies_till_first_fqs= [KNL] 2799 rcutree.jiffies_till_first_fqs= [KNL]
2742 Set delay from grace-period initialization to 2800 Set delay from grace-period initialization to
2743 first attempt to force quiescent states. 2801 first attempt to force quiescent states.
@@ -2889,6 +2947,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2889 [KNL, SMP] Set scheduler's default relax_domain_level. 2947 [KNL, SMP] Set scheduler's default relax_domain_level.
2890 See Documentation/cgroups/cpusets.txt. 2948 See Documentation/cgroups/cpusets.txt.
2891 2949
2950 relative_sleep_states=
2951 [SUSPEND] Use sleep state labeling where the deepest
2952 state available other than hibernation is always "mem".
2953 Format: { "0" | "1" }
2954 0 -- Traditional sleep state labels.
2955 1 -- Relative sleep state labels.
2956
2892 reserve= [KNL,BUGS] Force the kernel to ignore some iomem area 2957 reserve= [KNL,BUGS] Force the kernel to ignore some iomem area
2893 2958
2894 reservetop= [X86-32] 2959 reservetop= [X86-32]
@@ -2926,6 +2991,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2926 noresume Don't check if there's a hibernation image 2991 noresume Don't check if there's a hibernation image
2927 present during boot. 2992 present during boot.
2928 nocompress Don't compress/decompress hibernation images. 2993 nocompress Don't compress/decompress hibernation images.
2994 no Disable hibernation and resume.
2929 2995
2930 retain_initrd [RAM] Keep initrd memory after extraction 2996 retain_initrd [RAM] Keep initrd memory after extraction
2931 2997
@@ -3070,6 +3136,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3070 [KNL] Should the soft-lockup detector generate panics. 3136 [KNL] Should the soft-lockup detector generate panics.
3071 Format: <integer> 3137 Format: <integer>
3072 3138
3139 softlockup_all_cpu_backtrace=
3140 [KNL] Should the soft-lockup detector generate
3141 backtraces on all cpus.
3142 Format: <integer>
3143
3073 sonypi.*= [HW] Sony Programmable I/O Control Device driver 3144 sonypi.*= [HW] Sony Programmable I/O Control Device driver
3074 See Documentation/laptops/sonypi.txt 3145 See Documentation/laptops/sonypi.txt
3075 3146
diff --git a/Documentation/kmemleak.txt b/Documentation/kmemleak.txt
index a7563ec4ea7b..b772418bf064 100644
--- a/Documentation/kmemleak.txt
+++ b/Documentation/kmemleak.txt
@@ -142,6 +142,7 @@ kmemleak_alloc_percpu - notify of a percpu memory block allocation
142kmemleak_free - notify of a memory block freeing 142kmemleak_free - notify of a memory block freeing
143kmemleak_free_part - notify of a partial memory block freeing 143kmemleak_free_part - notify of a partial memory block freeing
144kmemleak_free_percpu - notify of a percpu memory block freeing 144kmemleak_free_percpu - notify of a percpu memory block freeing
145kmemleak_update_trace - update object allocation stack trace
145kmemleak_not_leak - mark an object as not a leak 146kmemleak_not_leak - mark an object as not a leak
146kmemleak_ignore - do not scan or report an object as leak 147kmemleak_ignore - do not scan or report an object as leak
147kmemleak_scan_area - add scan areas inside a memory block 148kmemleak_scan_area - add scan areas inside a memory block
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt
index 0cfb00fd86ff..4bbeca8483ed 100644
--- a/Documentation/kprobes.txt
+++ b/Documentation/kprobes.txt
@@ -22,8 +22,9 @@ Appendix B: The kprobes sysctl interface
22 22
23Kprobes enables you to dynamically break into any kernel routine and 23Kprobes enables you to dynamically break into any kernel routine and
24collect debugging and performance information non-disruptively. You 24collect debugging and performance information non-disruptively. You
25can trap at almost any kernel code address, specifying a handler 25can trap at almost any kernel code address(*), specifying a handler
26routine to be invoked when the breakpoint is hit. 26routine to be invoked when the breakpoint is hit.
27(*: some parts of the kernel code can not be trapped, see 1.5 Blacklist)
27 28
28There are currently three types of probes: kprobes, jprobes, and 29There are currently three types of probes: kprobes, jprobes, and
29kretprobes (also called return probes). A kprobe can be inserted 30kretprobes (also called return probes). A kprobe can be inserted
@@ -273,6 +274,19 @@ using one of the following techniques:
273 or 274 or
274- Execute 'sysctl -w debug.kprobes_optimization=n' 275- Execute 'sysctl -w debug.kprobes_optimization=n'
275 276
2771.5 Blacklist
278
279Kprobes can probe most of the kernel except itself. This means
280that there are some functions where kprobes cannot probe. Probing
281(trapping) such functions can cause a recursive trap (e.g. double
282fault) or the nested probe handler may never be called.
283Kprobes manages such functions as a blacklist.
284If you want to add a function into the blacklist, you just need
285to (1) include linux/kprobes.h and (2) use NOKPROBE_SYMBOL() macro
286to specify a blacklisted function.
287Kprobes checks the given probe address against the blacklist and
288rejects registering it, if the given address is in the blacklist.
289
2762. Architectures Supported 2902. Architectures Supported
277 291
278Kprobes, jprobes, and return probes are implemented on the following 292Kprobes, jprobes, and return probes are implemented on the following
diff --git a/Documentation/laptops/00-INDEX b/Documentation/laptops/00-INDEX
index d13b9a9a9e00..d399ae1fc724 100644
--- a/Documentation/laptops/00-INDEX
+++ b/Documentation/laptops/00-INDEX
@@ -8,8 +8,8 @@ disk-shock-protection.txt
8 - information on hard disk shock protection. 8 - information on hard disk shock protection.
9dslm.c 9dslm.c
10 - Simple Disk Sleep Monitor program 10 - Simple Disk Sleep Monitor program
11hpfall.c 11freefall.c
12 - (HP) laptop accelerometer program for disk protection. 12 - (HP/DELL) laptop accelerometer program for disk protection.
13laptop-mode.txt 13laptop-mode.txt
14 - how to conserve battery power using laptop-mode. 14 - how to conserve battery power using laptop-mode.
15sony-laptop.txt 15sony-laptop.txt
diff --git a/Documentation/laptops/hpfall.c b/Documentation/laptops/freefall.c
index b85dbbac0499..aab2ff09e868 100644
--- a/Documentation/laptops/hpfall.c
+++ b/Documentation/laptops/freefall.c
@@ -1,7 +1,9 @@
1/* Disk protection for HP machines. 1/* Disk protection for HP/DELL machines.
2 * 2 *
3 * Copyright 2008 Eric Piel 3 * Copyright 2008 Eric Piel
4 * Copyright 2009 Pavel Machek <pavel@ucw.cz> 4 * Copyright 2009 Pavel Machek <pavel@ucw.cz>
5 * Copyright 2012 Sonal Santan
6 * Copyright 2014 Pali Rohár <pali.rohar@gmail.com>
5 * 7 *
6 * GPLv2. 8 * GPLv2.
7 */ 9 */
@@ -18,24 +20,31 @@
18#include <signal.h> 20#include <signal.h>
19#include <sys/mman.h> 21#include <sys/mman.h>
20#include <sched.h> 22#include <sched.h>
23#include <syslog.h>
21 24
22char unload_heads_path[64]; 25static int noled;
26static char unload_heads_path[64];
27static char device_path[32];
28static const char app_name[] = "FREE FALL";
23 29
24int set_unload_heads_path(char *device) 30static int set_unload_heads_path(char *device)
25{ 31{
26 char devname[64]; 32 char devname[64];
27 33
28 if (strlen(device) <= 5 || strncmp(device, "/dev/", 5) != 0) 34 if (strlen(device) <= 5 || strncmp(device, "/dev/", 5) != 0)
29 return -EINVAL; 35 return -EINVAL;
30 strncpy(devname, device + 5, sizeof(devname)); 36 strncpy(devname, device + 5, sizeof(devname) - 1);
37 strncpy(device_path, device, sizeof(device_path) - 1);
31 38
32 snprintf(unload_heads_path, sizeof(unload_heads_path) - 1, 39 snprintf(unload_heads_path, sizeof(unload_heads_path) - 1,
33 "/sys/block/%s/device/unload_heads", devname); 40 "/sys/block/%s/device/unload_heads", devname);
34 return 0; 41 return 0;
35} 42}
36int valid_disk(void) 43
44static int valid_disk(void)
37{ 45{
38 int fd = open(unload_heads_path, O_RDONLY); 46 int fd = open(unload_heads_path, O_RDONLY);
47
39 if (fd < 0) { 48 if (fd < 0) {
40 perror(unload_heads_path); 49 perror(unload_heads_path);
41 return 0; 50 return 0;
@@ -45,43 +54,54 @@ int valid_disk(void)
45 return 1; 54 return 1;
46} 55}
47 56
48void write_int(char *path, int i) 57static void write_int(char *path, int i)
49{ 58{
50 char buf[1024]; 59 char buf[1024];
51 int fd = open(path, O_RDWR); 60 int fd = open(path, O_RDWR);
61
52 if (fd < 0) { 62 if (fd < 0) {
53 perror("open"); 63 perror("open");
54 exit(1); 64 exit(1);
55 } 65 }
66
56 sprintf(buf, "%d", i); 67 sprintf(buf, "%d", i);
68
57 if (write(fd, buf, strlen(buf)) != strlen(buf)) { 69 if (write(fd, buf, strlen(buf)) != strlen(buf)) {
58 perror("write"); 70 perror("write");
59 exit(1); 71 exit(1);
60 } 72 }
73
61 close(fd); 74 close(fd);
62} 75}
63 76
64void set_led(int on) 77static void set_led(int on)
65{ 78{
79 if (noled)
80 return;
66 write_int("/sys/class/leds/hp::hddprotect/brightness", on); 81 write_int("/sys/class/leds/hp::hddprotect/brightness", on);
67} 82}
68 83
69void protect(int seconds) 84static void protect(int seconds)
70{ 85{
86 const char *str = (seconds == 0) ? "Unparked" : "Parked";
87
71 write_int(unload_heads_path, seconds*1000); 88 write_int(unload_heads_path, seconds*1000);
89 syslog(LOG_INFO, "%s %s disk head\n", str, device_path);
72} 90}
73 91
74int on_ac(void) 92static int on_ac(void)
75{ 93{
76// /sys/class/power_supply/AC0/online 94 /* /sys/class/power_supply/AC0/online */
95 return 1;
77} 96}
78 97
79int lid_open(void) 98static int lid_open(void)
80{ 99{
81// /proc/acpi/button/lid/LID/state 100 /* /proc/acpi/button/lid/LID/state */
101 return 1;
82} 102}
83 103
84void ignore_me(void) 104static void ignore_me(int signum)
85{ 105{
86 protect(0); 106 protect(0);
87 set_led(0); 107 set_led(0);
@@ -90,6 +110,7 @@ void ignore_me(void)
90int main(int argc, char **argv) 110int main(int argc, char **argv)
91{ 111{
92 int fd, ret; 112 int fd, ret;
113 struct stat st;
93 struct sched_param param; 114 struct sched_param param;
94 115
95 if (argc == 1) 116 if (argc == 1)
@@ -111,7 +132,16 @@ int main(int argc, char **argv)
111 return EXIT_FAILURE; 132 return EXIT_FAILURE;
112 } 133 }
113 134
114 daemon(0, 0); 135 if (stat("/sys/class/leds/hp::hddprotect/brightness", &st))
136 noled = 1;
137
138 if (daemon(0, 0) != 0) {
139 perror("daemon");
140 return EXIT_FAILURE;
141 }
142
143 openlog(app_name, LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
144
115 param.sched_priority = sched_get_priority_max(SCHED_FIFO); 145 param.sched_priority = sched_get_priority_max(SCHED_FIFO);
116 sched_setscheduler(0, SCHED_FIFO, &param); 146 sched_setscheduler(0, SCHED_FIFO, &param);
117 mlockall(MCL_CURRENT|MCL_FUTURE); 147 mlockall(MCL_CURRENT|MCL_FUTURE);
@@ -141,6 +171,7 @@ int main(int argc, char **argv)
141 alarm(20); 171 alarm(20);
142 } 172 }
143 173
174 closelog();
144 close(fd); 175 close(fd);
145 return EXIT_SUCCESS; 176 return EXIT_SUCCESS;
146} 177}
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
index 556f951f8626..f1dc4a215593 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -115,8 +115,8 @@ For example, consider the following sequence of events:
115 CPU 1 CPU 2 115 CPU 1 CPU 2
116 =============== =============== 116 =============== ===============
117 { A == 1; B == 2 } 117 { A == 1; B == 2 }
118 A = 3; x = A; 118 A = 3; x = B;
119 B = 4; y = B; 119 B = 4; y = A;
120 120
121The set of accesses as seen by the memory system in the middle can be arranged 121The set of accesses as seen by the memory system in the middle can be arranged
122in 24 different combinations: 122in 24 different combinations:
@@ -1583,20 +1583,21 @@ There are some more advanced barrier functions:
1583 insert anything more than a compiler barrier in a UP compilation. 1583 insert anything more than a compiler barrier in a UP compilation.
1584 1584
1585 1585
1586 (*) smp_mb__before_atomic_dec(); 1586 (*) smp_mb__before_atomic();
1587 (*) smp_mb__after_atomic_dec(); 1587 (*) smp_mb__after_atomic();
1588 (*) smp_mb__before_atomic_inc();
1589 (*) smp_mb__after_atomic_inc();
1590 1588
1591 These are for use with atomic add, subtract, increment and decrement 1589 These are for use with atomic (such as add, subtract, increment and
1592 functions that don't return a value, especially when used for reference 1590 decrement) functions that don't return a value, especially when used for
1593 counting. These functions do not imply memory barriers. 1591 reference counting. These functions do not imply memory barriers.
1592
1593 These are also used for atomic bitop functions that do not return a
1594 value (such as set_bit and clear_bit).
1594 1595
1595 As an example, consider a piece of code that marks an object as being dead 1596 As an example, consider a piece of code that marks an object as being dead
1596 and then decrements the object's reference count: 1597 and then decrements the object's reference count:
1597 1598
1598 obj->dead = 1; 1599 obj->dead = 1;
1599 smp_mb__before_atomic_dec(); 1600 smp_mb__before_atomic();
1600 atomic_dec(&obj->ref_count); 1601 atomic_dec(&obj->ref_count);
1601 1602
1602 This makes sure that the death mark on the object is perceived to be set 1603 This makes sure that the death mark on the object is perceived to be set
@@ -1606,27 +1607,6 @@ There are some more advanced barrier functions:
1606 operations" subsection for information on where to use these. 1607 operations" subsection for information on where to use these.
1607 1608
1608 1609
1609 (*) smp_mb__before_clear_bit(void);
1610 (*) smp_mb__after_clear_bit(void);
1611
1612 These are for use similar to the atomic inc/dec barriers. These are
1613 typically used for bitwise unlocking operations, so care must be taken as
1614 there are no implicit memory barriers here either.
1615
1616 Consider implementing an unlock operation of some nature by clearing a
1617 locking bit. The clear_bit() would then need to be barriered like this:
1618
1619 smp_mb__before_clear_bit();
1620 clear_bit( ... );
1621
1622 This prevents memory operations before the clear leaking to after it. See
1623 the subsection on "Locking Functions" with reference to RELEASE operation
1624 implications.
1625
1626 See Documentation/atomic_ops.txt for more information. See the "Atomic
1627 operations" subsection for information on where to use these.
1628
1629
1630MMIO WRITE BARRIER 1610MMIO WRITE BARRIER
1631------------------ 1611------------------
1632 1612
@@ -2283,11 +2263,11 @@ operations:
2283 change_bit(); 2263 change_bit();
2284 2264
2285With these the appropriate explicit memory barrier should be used if necessary 2265With these the appropriate explicit memory barrier should be used if necessary
2286(smp_mb__before_clear_bit() for instance). 2266(smp_mb__before_atomic() for instance).
2287 2267
2288 2268
2289The following also do _not_ imply memory barriers, and so may require explicit 2269The following also do _not_ imply memory barriers, and so may require explicit
2290memory barriers under some circumstances (smp_mb__before_atomic_dec() for 2270memory barriers under some circumstances (smp_mb__before_atomic() for
2291instance): 2271instance):
2292 2272
2293 atomic_add(); 2273 atomic_add();
diff --git a/Documentation/memory-hotplug.txt b/Documentation/memory-hotplug.txt
index 58340d50f8a6..45134dc23854 100644
--- a/Documentation/memory-hotplug.txt
+++ b/Documentation/memory-hotplug.txt
@@ -88,16 +88,21 @@ phase by hand.
88 88
891.3. Unit of Memory online/offline operation 891.3. Unit of Memory online/offline operation
90------------ 90------------
91Memory hotplug uses SPARSEMEM memory model. SPARSEMEM divides the whole memory 91Memory hotplug uses SPARSEMEM memory model which allows memory to be divided
92into chunks of the same size. The chunk is called a "section". The size of 92into chunks of the same size. These chunks are called "sections". The size of
93a section is architecture dependent. For example, power uses 16MiB, ia64 uses 93a memory section is architecture dependent. For example, power uses 16MiB, ia64
941GiB. The unit of online/offline operation is "one section". (see Section 3.) 94uses 1GiB.
95 95
96To determine the size of sections, please read this file: 96Memory sections are combined into chunks referred to as "memory blocks". The
97size of a memory block is architecture dependent and represents the logical
98unit upon which memory online/offline operations are to be performed. The
99default size of a memory block is the same as memory section size unless an
100architecture specifies otherwise. (see Section 3.)
101
102To determine the size (in bytes) of a memory block please read this file:
97 103
98/sys/devices/system/memory/block_size_bytes 104/sys/devices/system/memory/block_size_bytes
99 105
100This file shows the size of sections in byte.
101 106
102----------------------- 107-----------------------
1032. Kernel Configuration 1082. Kernel Configuration
@@ -123,42 +128,35 @@ config options.
123 (CONFIG_ACPI_CONTAINER). 128 (CONFIG_ACPI_CONTAINER).
124 This option can be kernel module too. 129 This option can be kernel module too.
125 130
131
126-------------------------------- 132--------------------------------
1274 sysfs files for memory hotplug 1333 sysfs files for memory hotplug
128-------------------------------- 134--------------------------------
129All sections have their device information in sysfs. Each section is part of 135All memory blocks have their device information in sysfs. Each memory block
130a memory block under /sys/devices/system/memory as 136is described under /sys/devices/system/memory as
131 137
132/sys/devices/system/memory/memoryXXX 138/sys/devices/system/memory/memoryXXX
133(XXX is the section id.) 139(XXX is the memory block id.)
134 140
135Now, XXX is defined as (start_address_of_section / section_size) of the first 141For the memory block covered by the sysfs directory. It is expected that all
136section contained in the memory block. The files 'phys_index' and
137'end_phys_index' under each directory report the beginning and end section id's
138for the memory block covered by the sysfs directory. It is expected that all
139memory sections in this range are present and no memory holes exist in the 142memory sections in this range are present and no memory holes exist in the
140range. Currently there is no way to determine if there is a memory hole, but 143range. Currently there is no way to determine if there is a memory hole, but
141the existence of one should not affect the hotplug capabilities of the memory 144the existence of one should not affect the hotplug capabilities of the memory
142block. 145block.
143 146
144For example, assume 1GiB section size. A device for a memory starting at 147For example, assume 1GiB memory block size. A device for a memory starting at
1450x100000000 is /sys/device/system/memory/memory4 1480x100000000 is /sys/device/system/memory/memory4
146(0x100000000 / 1Gib = 4) 149(0x100000000 / 1Gib = 4)
147This device covers address range [0x100000000 ... 0x140000000) 150This device covers address range [0x100000000 ... 0x140000000)
148 151
149Under each section, you can see 4 or 5 files, the end_phys_index file being 152Under each memory block, you can see 4 files:
150a recent addition and not present on older kernels.
151 153
152/sys/devices/system/memory/memoryXXX/start_phys_index 154/sys/devices/system/memory/memoryXXX/phys_index
153/sys/devices/system/memory/memoryXXX/end_phys_index
154/sys/devices/system/memory/memoryXXX/phys_device 155/sys/devices/system/memory/memoryXXX/phys_device
155/sys/devices/system/memory/memoryXXX/state 156/sys/devices/system/memory/memoryXXX/state
156/sys/devices/system/memory/memoryXXX/removable 157/sys/devices/system/memory/memoryXXX/removable
157 158
158'phys_index' : read-only and contains section id of the first section 159'phys_index' : read-only and contains memory block id, same as XXX.
159 in the memory block, same as XXX.
160'end_phys_index' : read-only and contains section id of the last section
161 in the memory block.
162'state' : read-write 160'state' : read-write
163 at read: contains online/offline state of memory. 161 at read: contains online/offline state of memory.
164 at write: user can specify "online_kernel", 162 at write: user can specify "online_kernel",
@@ -185,6 +183,7 @@ For example:
185A backlink will also be created: 183A backlink will also be created:
186/sys/devices/system/memory/memory9/node0 -> ../../node/node0 184/sys/devices/system/memory/memory9/node0 -> ../../node/node0
187 185
186
188-------------------------------- 187--------------------------------
1894. Physical memory hot-add phase 1884. Physical memory hot-add phase
190-------------------------------- 189--------------------------------
@@ -210,15 +209,12 @@ If memory device is found, memory hotplug code will be called.
210 209
2114.2 Notify memory hot-add event by hand 2104.2 Notify memory hot-add event by hand
212------------ 211------------
213On powerpc, the firmware does not notify a memory hotplug event to the kernel. 212On some architectures, the firmware may not notify the kernel of a memory
214Therefore, "probe" interface is supported to notify the event to the kernel. 213hotplug event. Therefore, the memory "probe" interface is supported to
215This interface depends on CONFIG_ARCH_MEMORY_PROBE. 214explicitly notify the kernel. This interface depends on
216 215CONFIG_ARCH_MEMORY_PROBE and can be configured on powerpc, sh, and x86
217CONFIG_ARCH_MEMORY_PROBE is supported on powerpc only. On x86, this config 216if hotplug is supported, although for x86 this should be handled by ACPI
218option is disabled by default since ACPI notifies a memory hotplug event to 217notification.
219the kernel, which performs its hotplug operation as the result. Please
220enable this option if you need the "probe" interface for testing purposes
221on x86.
222 218
223Probe interface is located at 219Probe interface is located at
224/sys/devices/system/memory/probe 220/sys/devices/system/memory/probe
@@ -227,11 +223,10 @@ You can tell the physical address of new memory to the kernel by
227 223
228% echo start_address_of_new_memory > /sys/devices/system/memory/probe 224% echo start_address_of_new_memory > /sys/devices/system/memory/probe
229 225
230Then, [start_address_of_new_memory, start_address_of_new_memory + section_size) 226Then, [start_address_of_new_memory, start_address_of_new_memory +
231memory range is hot-added. In this case, hotplug script is not called (in 227memory_block_size] memory range is hot-added. In this case, hotplug script is
232current implementation). You'll have to online memory by yourself. 228not called (in current implementation). You'll have to online memory by
233Please see "How to online memory" in this text. 229yourself. Please see "How to online memory" in this text.
234
235 230
236 231
237------------------------------ 232------------------------------
@@ -240,36 +235,36 @@ Please see "How to online memory" in this text.
240 235
2415.1. State of memory 2365.1. State of memory
242------------ 237------------
243To see (online/offline) state of memory section, read 'state' file. 238To see (online/offline) state of a memory block, read 'state' file.
244 239
245% cat /sys/device/system/memory/memoryXXX/state 240% cat /sys/device/system/memory/memoryXXX/state
246 241
247 242
248If the memory section is online, you'll read "online". 243If the memory block is online, you'll read "online".
249If the memory section is offline, you'll read "offline". 244If the memory block is offline, you'll read "offline".
250 245
251 246
2525.2. How to online memory 2475.2. How to online memory
253------------ 248------------
254Even if the memory is hot-added, it is not at ready-to-use state. 249Even if the memory is hot-added, it is not at ready-to-use state.
255For using newly added memory, you have to "online" the memory section. 250For using newly added memory, you have to "online" the memory block.
256 251
257For onlining, you have to write "online" to the section's state file as: 252For onlining, you have to write "online" to the memory block's state file as:
258 253
259% echo online > /sys/devices/system/memory/memoryXXX/state 254% echo online > /sys/devices/system/memory/memoryXXX/state
260 255
261This onlining will not change the ZONE type of the target memory section, 256This onlining will not change the ZONE type of the target memory block,
262If the memory section is in ZONE_NORMAL, you can change it to ZONE_MOVABLE: 257If the memory block is in ZONE_NORMAL, you can change it to ZONE_MOVABLE:
263 258
264% echo online_movable > /sys/devices/system/memory/memoryXXX/state 259% echo online_movable > /sys/devices/system/memory/memoryXXX/state
265(NOTE: current limit: this memory section must be adjacent to ZONE_MOVABLE) 260(NOTE: current limit: this memory block must be adjacent to ZONE_MOVABLE)
266 261
267And if the memory section is in ZONE_MOVABLE, you can change it to ZONE_NORMAL: 262And if the memory block is in ZONE_MOVABLE, you can change it to ZONE_NORMAL:
268 263
269% echo online_kernel > /sys/devices/system/memory/memoryXXX/state 264% echo online_kernel > /sys/devices/system/memory/memoryXXX/state
270(NOTE: current limit: this memory section must be adjacent to ZONE_NORMAL) 265(NOTE: current limit: this memory block must be adjacent to ZONE_NORMAL)
271 266
272After this, section memoryXXX's state will be 'online' and the amount of 267After this, memory block XXX's state will be 'online' and the amount of
273available memory will be increased. 268available memory will be increased.
274 269
275Currently, newly added memory is added as ZONE_NORMAL (for powerpc, ZONE_DMA). 270Currently, newly added memory is added as ZONE_NORMAL (for powerpc, ZONE_DMA).
@@ -284,22 +279,22 @@ This may be changed in future.
2846.1 Memory offline and ZONE_MOVABLE 2796.1 Memory offline and ZONE_MOVABLE
285------------ 280------------
286Memory offlining is more complicated than memory online. Because memory offline 281Memory offlining is more complicated than memory online. Because memory offline
287has to make the whole memory section be unused, memory offline can fail if 282has to make the whole memory block be unused, memory offline can fail if
288the section includes memory which cannot be freed. 283the memory block includes memory which cannot be freed.
289 284
290In general, memory offline can use 2 techniques. 285In general, memory offline can use 2 techniques.
291 286
292(1) reclaim and free all memory in the section. 287(1) reclaim and free all memory in the memory block.
293(2) migrate all pages in the section. 288(2) migrate all pages in the memory block.
294 289
295In the current implementation, Linux's memory offline uses method (2), freeing 290In the current implementation, Linux's memory offline uses method (2), freeing
296all pages in the section by page migration. But not all pages are 291all pages in the memory block by page migration. But not all pages are
297migratable. Under current Linux, migratable pages are anonymous pages and 292migratable. Under current Linux, migratable pages are anonymous pages and
298page caches. For offlining a section by migration, the kernel has to guarantee 293page caches. For offlining a memory block by migration, the kernel has to
299that the section contains only migratable pages. 294guarantee that the memory block contains only migratable pages.
300 295
301Now, a boot option for making a section which consists of migratable pages is 296Now, a boot option for making a memory block which consists of migratable pages
302supported. By specifying "kernelcore=" or "movablecore=" boot option, you can 297is supported. By specifying "kernelcore=" or "movablecore=" boot option, you can
303create ZONE_MOVABLE...a zone which is just used for movable pages. 298create ZONE_MOVABLE...a zone which is just used for movable pages.
304(See also Documentation/kernel-parameters.txt) 299(See also Documentation/kernel-parameters.txt)
305 300
@@ -315,28 +310,27 @@ creates ZONE_MOVABLE as following.
315 Size of memory for movable pages (for offline) is ZZZZ. 310 Size of memory for movable pages (for offline) is ZZZZ.
316 311
317 312
318Note) Unfortunately, there is no information to show which section belongs 313Note: Unfortunately, there is no information to show which memory block belongs
319to ZONE_MOVABLE. This is TBD. 314to ZONE_MOVABLE. This is TBD.
320 315
321 316
3226.2. How to offline memory 3176.2. How to offline memory
323------------ 318------------
324You can offline a section by using the same sysfs interface that was used in 319You can offline a memory block by using the same sysfs interface that was used
325memory onlining. 320in memory onlining.
326 321
327% echo offline > /sys/devices/system/memory/memoryXXX/state 322% echo offline > /sys/devices/system/memory/memoryXXX/state
328 323
329If offline succeeds, the state of the memory section is changed to be "offline". 324If offline succeeds, the state of the memory block is changed to be "offline".
330If it fails, some error core (like -EBUSY) will be returned by the kernel. 325If it fails, some error core (like -EBUSY) will be returned by the kernel.
331Even if a section does not belong to ZONE_MOVABLE, you can try to offline it. 326Even if a memory block does not belong to ZONE_MOVABLE, you can try to offline
332If it doesn't contain 'unmovable' memory, you'll get success. 327it. If it doesn't contain 'unmovable' memory, you'll get success.
333 328
334A section under ZONE_MOVABLE is considered to be able to be offlined easily. 329A memory block under ZONE_MOVABLE is considered to be able to be offlined
335But under some busy state, it may return -EBUSY. Even if a memory section 330easily. But under some busy state, it may return -EBUSY. Even if a memory
336cannot be offlined due to -EBUSY, you can retry offlining it and may be able to 331block cannot be offlined due to -EBUSY, you can retry offlining it and may be
337offline it (or not). 332able to offline it (or not). (For example, a page is referred to by some kernel
338(For example, a page is referred to by some kernel internal call and released 333internal call and released soon.)
339 soon.)
340 334
341Consideration: 335Consideration:
342Memory hotplug's design direction is to make the possibility of memory offlining 336Memory hotplug's design direction is to make the possibility of memory offlining
@@ -373,11 +367,11 @@ MEMORY_GOING_OFFLINE
373 Generated to begin the process of offlining memory. Allocations are no 367 Generated to begin the process of offlining memory. Allocations are no
374 longer possible from the memory but some of the memory to be offlined 368 longer possible from the memory but some of the memory to be offlined
375 is still in use. The callback can be used to free memory known to a 369 is still in use. The callback can be used to free memory known to a
376 subsystem from the indicated memory section. 370 subsystem from the indicated memory block.
377 371
378MEMORY_CANCEL_OFFLINE 372MEMORY_CANCEL_OFFLINE
379 Generated if MEMORY_GOING_OFFLINE fails. Memory is available again from 373 Generated if MEMORY_GOING_OFFLINE fails. Memory is available again from
380 the section that we attempted to offline. 374 the memory block that we attempted to offline.
381 375
382MEMORY_OFFLINE 376MEMORY_OFFLINE
383 Generated after offlining memory is complete. 377 Generated after offlining memory is complete.
@@ -413,8 +407,8 @@ node if necessary.
413-------------- 407--------------
414 - allowing memory hot-add to ZONE_MOVABLE. maybe we need some switch like 408 - allowing memory hot-add to ZONE_MOVABLE. maybe we need some switch like
415 sysctl or new control file. 409 sysctl or new control file.
416 - showing memory section and physical device relationship. 410 - showing memory block and physical device relationship.
417 - showing memory section is under ZONE_MOVABLE or not 411 - showing memory block is under ZONE_MOVABLE or not
418 - test and make it better memory offlining. 412 - test and make it better memory offlining.
419 - support HugeTLB page migration and offlining. 413 - support HugeTLB page migration and offlining.
420 - memmap removing at memory offline. 414 - memmap removing at memory offline.
diff --git a/Documentation/mtd/nand/pxa3xx-nand.txt b/Documentation/mtd/nand/pxa3xx-nand.txt
index 840fd41c181b..1074cbc67ec6 100644
--- a/Documentation/mtd/nand/pxa3xx-nand.txt
+++ b/Documentation/mtd/nand/pxa3xx-nand.txt
@@ -48,7 +48,7 @@ configurable between two modes: 1) Hamming, 2) BCH.
48Note that the actual BCH mode: BCH-4 or BCH-8 will depend on the way 48Note that the actual BCH mode: BCH-4 or BCH-8 will depend on the way
49the controller is configured to transfer the data. 49the controller is configured to transfer the data.
50 50
51In the BCH mode the ECC code will be calculated for each transfered chunk 51In the BCH mode the ECC code will be calculated for each transferred chunk
52and expected to be located (when reading/programming) right after the spare 52and expected to be located (when reading/programming) right after the spare
53bytes as the figure above shows. 53bytes as the figure above shows.
54 54
diff --git a/Documentation/mtd/spi-nor.txt b/Documentation/mtd/spi-nor.txt
new file mode 100644
index 000000000000..548d6306ebca
--- /dev/null
+++ b/Documentation/mtd/spi-nor.txt
@@ -0,0 +1,62 @@
1 SPI NOR framework
2 ============================================
3
4Part I - Why do we need this framework?
5---------------------------------------
6
7SPI bus controllers (drivers/spi/) only deal with streams of bytes; the bus
8controller operates agnostic of the specific device attached. However, some
9controllers (such as Freescale's QuadSPI controller) cannot easily handle
10arbitrary streams of bytes, but rather are designed specifically for SPI NOR.
11
12In particular, Freescale's QuadSPI controller must know the NOR commands to
13find the right LUT sequence. Unfortunately, the SPI subsystem has no notion of
14opcodes, addresses, or data payloads; a SPI controller simply knows to send or
15receive bytes (Tx and Rx). Therefore, we must define a new layering scheme under
16which the controller driver is aware of the opcodes, addressing, and other
17details of the SPI NOR protocol.
18
19Part II - How does the framework work?
20--------------------------------------
21
22This framework just adds a new layer between the MTD and the SPI bus driver.
23With this new layer, the SPI NOR controller driver does not depend on the
24m25p80 code anymore.
25
26 Before this framework, the layer is like:
27
28 MTD
29 ------------------------
30 m25p80
31 ------------------------
32 SPI bus driver
33 ------------------------
34 SPI NOR chip
35
36 After this framework, the layer is like:
37 MTD
38 ------------------------
39 SPI NOR framework
40 ------------------------
41 m25p80
42 ------------------------
43 SPI bus driver
44 ------------------------
45 SPI NOR chip
46
47 With the SPI NOR controller driver (Freescale QuadSPI), it looks like:
48 MTD
49 ------------------------
50 SPI NOR framework
51 ------------------------
52 fsl-quadSPI
53 ------------------------
54 SPI NOR chip
55
56Part III - How can drivers use the framework?
57---------------------------------------------
58
59The main API is spi_nor_scan(). Before you call the hook, a driver should
60initialize the necessary fields for spi_nor{}. Please see
61drivers/mtd/spi-nor/spi-nor.c for detail. Please also refer to fsl-quadspi.c
62when you want to write a new driver for a SPI NOR controller.
diff --git a/Documentation/mutex-design.txt b/Documentation/mutex-design.txt
index 1dfe62c3641d..ee231ed09ec6 100644
--- a/Documentation/mutex-design.txt
+++ b/Documentation/mutex-design.txt
@@ -1,139 +1,157 @@
1Generic Mutex Subsystem 1Generic Mutex Subsystem
2 2
3started by Ingo Molnar <mingo@redhat.com> 3started by Ingo Molnar <mingo@redhat.com>
4updated by Davidlohr Bueso <davidlohr@hp.com>
4 5
5 "Why on earth do we need a new mutex subsystem, and what's wrong 6What are mutexes?
6 with semaphores?" 7-----------------
7 8
8firstly, there's nothing wrong with semaphores. But if the simpler 9In the Linux kernel, mutexes refer to a particular locking primitive
9mutex semantics are sufficient for your code, then there are a couple 10that enforces serialization on shared memory systems, and not only to
10of advantages of mutexes: 11the generic term referring to 'mutual exclusion' found in academia
12or similar theoretical text books. Mutexes are sleeping locks which
13behave similarly to binary semaphores, and were introduced in 2006[1]
14as an alternative to these. This new data structure provided a number
15of advantages, including simpler interfaces, and at that time smaller
16code (see Disadvantages).
11 17
12 - 'struct mutex' is smaller on most architectures: E.g. on x86, 18[1] http://lwn.net/Articles/164802/
13 'struct semaphore' is 20 bytes, 'struct mutex' is 16 bytes.
14 A smaller structure size means less RAM footprint, and better
15 CPU-cache utilization.
16 19
17 - tighter code. On x86 i get the following .text sizes when 20Implementation
18 switching all mutex-alike semaphores in the kernel to the mutex 21--------------
19 subsystem:
20 22
21 text data bss dec hex filename 23Mutexes are represented by 'struct mutex', defined in include/linux/mutex.h
22 3280380 868188 396860 4545428 455b94 vmlinux-semaphore 24and implemented in kernel/locking/mutex.c. These locks use a three
23 3255329 865296 396732 4517357 44eded vmlinux-mutex 25state atomic counter (->count) to represent the different possible
26transitions that can occur during the lifetime of a lock:
24 27
25 that's 25051 bytes of code saved, or a 0.76% win - off the hottest 28 1: unlocked
26 codepaths of the kernel. (The .data savings are 2892 bytes, or 0.33%) 29 0: locked, no waiters
27 Smaller code means better icache footprint, which is one of the 30 negative: locked, with potential waiters
28 major optimization goals in the Linux kernel currently.
29 31
30 - the mutex subsystem is slightly faster and has better scalability for 32In its most basic form it also includes a wait-queue and a spinlock
31 contended workloads. On an 8-way x86 system, running a mutex-based 33that serializes access to it. CONFIG_SMP systems can also include
32 kernel and testing creat+unlink+close (of separate, per-task files) 34a pointer to the lock task owner (->owner) as well as a spinner MCS
33 in /tmp with 16 parallel tasks, the average number of ops/sec is: 35lock (->osq), both described below in (ii).
34 36
35 Semaphores: Mutexes: 37When acquiring a mutex, there are three possible paths that can be
38taken, depending on the state of the lock:
36 39
37 $ ./test-mutex V 16 10 $ ./test-mutex V 16 10 40(i) fastpath: tries to atomically acquire the lock by decrementing the
38 8 CPUs, running 16 tasks. 8 CPUs, running 16 tasks. 41 counter. If it was already taken by another task it goes to the next
39 checking VFS performance. checking VFS performance. 42 possible path. This logic is architecture specific. On x86-64, the
40 avg loops/sec: 34713 avg loops/sec: 84153 43 locking fastpath is 2 instructions:
41 CPU utilization: 63% CPU utilization: 22%
42 44
43 i.e. in this workload, the mutex based kernel was 2.4 times faster 45 0000000000000e10 <mutex_lock>:
44 than the semaphore based kernel, _and_ it also had 2.8 times less CPU 46 e21: f0 ff 0b lock decl (%rbx)
45 utilization. (In terms of 'ops per CPU cycle', the semaphore kernel 47 e24: 79 08 jns e2e <mutex_lock+0x1e>
46 performed 551 ops/sec per 1% of CPU time used, while the mutex kernel
47 performed 3825 ops/sec per 1% of CPU time used - it was 6.9 times
48 more efficient.)
49
50 the scalability difference is visible even on a 2-way P4 HT box:
51
52 Semaphores: Mutexes:
53
54 $ ./test-mutex V 16 10 $ ./test-mutex V 16 10
55 4 CPUs, running 16 tasks. 8 CPUs, running 16 tasks.
56 checking VFS performance. checking VFS performance.
57 avg loops/sec: 127659 avg loops/sec: 181082
58 CPU utilization: 100% CPU utilization: 34%
59
60 (the straight performance advantage of mutexes is 41%, the per-cycle
61 efficiency of mutexes is 4.1 times better.)
62
63 - there are no fastpath tradeoffs, the mutex fastpath is just as tight
64 as the semaphore fastpath. On x86, the locking fastpath is 2
65 instructions:
66
67 c0377ccb <mutex_lock>:
68 c0377ccb: f0 ff 08 lock decl (%eax)
69 c0377cce: 78 0e js c0377cde <.text..lock.mutex>
70 c0377cd0: c3 ret
71 48
72 the unlocking fastpath is equally tight: 49 the unlocking fastpath is equally tight:
73 50
74 c0377cd1 <mutex_unlock>: 51 0000000000000bc0 <mutex_unlock>:
75 c0377cd1: f0 ff 00 lock incl (%eax) 52 bc8: f0 ff 07 lock incl (%rdi)
76 c0377cd4: 7e 0f jle c0377ce5 <.text..lock.mutex+0x7> 53 bcb: 7f 0a jg bd7 <mutex_unlock+0x17>
77 c0377cd6: c3 ret 54
78 55
79 - 'struct mutex' semantics are well-defined and are enforced if 56(ii) midpath: aka optimistic spinning, tries to spin for acquisition
80 CONFIG_DEBUG_MUTEXES is turned on. Semaphores on the other hand have 57 while the lock owner is running and there are no other tasks ready
81 virtually no debugging code or instrumentation. The mutex subsystem 58 to run that have higher priority (need_resched). The rationale is
82 checks and enforces the following rules: 59 that if the lock owner is running, it is likely to release the lock
83 60 soon. The mutex spinners are queued up using MCS lock so that only
84 * - only one task can hold the mutex at a time 61 one spinner can compete for the mutex.
85 * - only the owner can unlock the mutex 62
86 * - multiple unlocks are not permitted 63 The MCS lock (proposed by Mellor-Crummey and Scott) is a simple spinlock
87 * - recursive locking is not permitted 64 with the desirable properties of being fair and with each cpu trying
88 * - a mutex object must be initialized via the API 65 to acquire the lock spinning on a local variable. It avoids expensive
89 * - a mutex object must not be initialized via memset or copying 66 cacheline bouncing that common test-and-set spinlock implementations
90 * - task may not exit with mutex held 67 incur. An MCS-like lock is specially tailored for optimistic spinning
91 * - memory areas where held locks reside must not be freed 68 for sleeping lock implementation. An important feature of the customized
92 * - held mutexes must not be reinitialized 69 MCS lock is that it has the extra property that spinners are able to exit
93 * - mutexes may not be used in hardware or software interrupt 70 the MCS spinlock queue when they need to reschedule. This further helps
94 * contexts such as tasklets and timers 71 avoid situations where MCS spinners that need to reschedule would continue
95 72 waiting to spin on mutex owner, only to go directly to slowpath upon
96 furthermore, there are also convenience features in the debugging 73 obtaining the MCS lock.
97 code: 74
98 75
99 * - uses symbolic names of mutexes, whenever they are printed in debug output 76(iii) slowpath: last resort, if the lock is still unable to be acquired,
100 * - point-of-acquire tracking, symbolic lookup of function names 77 the task is added to the wait-queue and sleeps until woken up by the
101 * - list of all locks held in the system, printout of them 78 unlock path. Under normal circumstances it blocks as TASK_UNINTERRUPTIBLE.
102 * - owner tracking 79
103 * - detects self-recursing locks and prints out all relevant info 80While formally kernel mutexes are sleepable locks, it is path (ii) that
104 * - detects multi-task circular deadlocks and prints out all affected 81makes them more practically a hybrid type. By simply not interrupting a
105 * locks and tasks (and only those tasks) 82task and busy-waiting for a few cycles instead of immediately sleeping,
83the performance of this lock has been seen to significantly improve a
84number of workloads. Note that this technique is also used for rw-semaphores.
85
86Semantics
87---------
88
89The mutex subsystem checks and enforces the following rules:
90
91 - Only one task can hold the mutex at a time.
92 - Only the owner can unlock the mutex.
93 - Multiple unlocks are not permitted.
94 - Recursive locking/unlocking is not permitted.
95 - A mutex must only be initialized via the API (see below).
96 - A task may not exit with a mutex held.
97 - Memory areas where held locks reside must not be freed.
98 - Held mutexes must not be reinitialized.
99 - Mutexes may not be used in hardware or software interrupt
100 contexts such as tasklets and timers.
101
102These semantics are fully enforced when CONFIG DEBUG_MUTEXES is enabled.
103In addition, the mutex debugging code also implements a number of other
104features that make lock debugging easier and faster:
105
106 - Uses symbolic names of mutexes, whenever they are printed
107 in debug output.
108 - Point-of-acquire tracking, symbolic lookup of function names,
109 list of all locks held in the system, printout of them.
110 - Owner tracking.
111 - Detects self-recursing locks and prints out all relevant info.
112 - Detects multi-task circular deadlocks and prints out all affected
113 locks and tasks (and only those tasks).
114
115
116Interfaces
117----------
118Statically define the mutex:
119 DEFINE_MUTEX(name);
120
121Dynamically initialize the mutex:
122 mutex_init(mutex);
123
124Acquire the mutex, uninterruptible:
125 void mutex_lock(struct mutex *lock);
126 void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
127 int mutex_trylock(struct mutex *lock);
128
129Acquire the mutex, interruptible:
130 int mutex_lock_interruptible_nested(struct mutex *lock,
131 unsigned int subclass);
132 int mutex_lock_interruptible(struct mutex *lock);
133
134Acquire the mutex, interruptible, if dec to 0:
135 int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock);
136
137Unlock the mutex:
138 void mutex_unlock(struct mutex *lock);
139
140Test if the mutex is taken:
141 int mutex_is_locked(struct mutex *lock);
106 142
107Disadvantages 143Disadvantages
108------------- 144-------------
109 145
110The stricter mutex API means you cannot use mutexes the same way you 146Unlike its original design and purpose, 'struct mutex' is larger than
111can use semaphores: e.g. they cannot be used from an interrupt context, 147most locks in the kernel. E.g: on x86-64 it is 40 bytes, almost twice
112nor can they be unlocked from a different context that which acquired 148as large as 'struct semaphore' (24 bytes) and 8 bytes shy of the
113it. [ I'm not aware of any other (e.g. performance) disadvantages from 149'struct rw_semaphore' variant. Larger structure sizes mean more CPU
114using mutexes at the moment, please let me know if you find any. ] 150cache and memory footprint.
115
116Implementation of mutexes
117-------------------------
118
119'struct mutex' is the new mutex type, defined in include/linux/mutex.h and
120implemented in kernel/locking/mutex.c. It is a counter-based mutex with a
121spinlock and a wait-list. The counter has 3 states: 1 for "unlocked", 0 for
122"locked" and negative numbers (usually -1) for "locked, potential waiters
123queued".
124
125the APIs of 'struct mutex' have been streamlined:
126
127 DEFINE_MUTEX(name);
128 151
129 mutex_init(mutex); 152When to use mutexes
153-------------------
130 154
131 void mutex_lock(struct mutex *lock); 155Unless the strict semantics of mutexes are unsuitable and/or the critical
132 int mutex_lock_interruptible(struct mutex *lock); 156region prevents the lock from being shared, always prefer them to any other
133 int mutex_trylock(struct mutex *lock); 157locking primitive.
134 void mutex_unlock(struct mutex *lock);
135 int mutex_is_locked(struct mutex *lock);
136 void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
137 int mutex_lock_interruptible_nested(struct mutex *lock,
138 unsigned int subclass);
139 int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock);
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index a383c00392d0..9c723ecd0025 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -585,13 +585,19 @@ mode
585 balance-tlb or 5 585 balance-tlb or 5
586 586
587 Adaptive transmit load balancing: channel bonding that 587 Adaptive transmit load balancing: channel bonding that
588 does not require any special switch support. The 588 does not require any special switch support.
589 outgoing traffic is distributed according to the 589
590 current load (computed relative to the speed) on each 590 In tlb_dynamic_lb=1 mode; the outgoing traffic is
591 slave. Incoming traffic is received by the current 591 distributed according to the current load (computed
592 slave. If the receiving slave fails, another slave 592 relative to the speed) on each slave.
593 takes over the MAC address of the failed receiving 593
594 slave. 594 In tlb_dynamic_lb=0 mode; the load balancing based on
595 current load is disabled and the load is distributed
596 only using the hash distribution.
597
598 Incoming traffic is received by the current slave.
599 If the receiving slave fails, another slave takes over
600 the MAC address of the failed receiving slave.
595 601
596 Prerequisite: 602 Prerequisite:
597 603
@@ -736,6 +742,28 @@ primary_reselect
736 742
737 This option was added for bonding version 3.6.0. 743 This option was added for bonding version 3.6.0.
738 744
745tlb_dynamic_lb
746
747 Specifies if dynamic shuffling of flows is enabled in tlb
748 mode. The value has no effect on any other modes.
749
750 The default behavior of tlb mode is to shuffle active flows across
751 slaves based on the load in that interval. This gives nice lb
752 characteristics but can cause packet reordering. If re-ordering is
753 a concern use this variable to disable flow shuffling and rely on
754 load balancing provided solely by the hash distribution.
755 xmit-hash-policy can be used to select the appropriate hashing for
756 the setup.
757
758 The sysfs entry can be used to change the setting per bond device
759 and the initial value is derived from the module parameter. The
760 sysfs entry is allowed to be changed only if the bond device is
761 down.
762
763 The default value is "1" that enables flow shuffling while value "0"
764 disables it. This option was added in bonding driver 3.7.1
765
766
739updelay 767updelay
740 768
741 Specifies the time, in milliseconds, to wait before enabling a 769 Specifies the time, in milliseconds, to wait before enabling a
@@ -769,7 +797,7 @@ use_carrier
769xmit_hash_policy 797xmit_hash_policy
770 798
771 Selects the transmit hash policy to use for slave selection in 799 Selects the transmit hash policy to use for slave selection in
772 balance-xor and 802.3ad modes. Possible values are: 800 balance-xor, 802.3ad, and tlb modes. Possible values are:
773 801
774 layer2 802 layer2
775 803
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
index 2fa44cbe81b7..2236d6dcb7da 100644
--- a/Documentation/networking/can.txt
+++ b/Documentation/networking/can.txt
@@ -469,6 +469,41 @@ solution for a couple of reasons:
469 having this 'send only' use-case we may remove the receive list in the 469 having this 'send only' use-case we may remove the receive list in the
470 Kernel to save a little (really a very little!) CPU usage. 470 Kernel to save a little (really a very little!) CPU usage.
471 471
472 4.1.1.1 CAN filter usage optimisation
473
474 The CAN filters are processed in per-device filter lists at CAN frame
475 reception time. To reduce the number of checks that need to be performed
476 while walking through the filter lists the CAN core provides an optimized
477 filter handling when the filter subscription focusses on a single CAN ID.
478
479 For the possible 2048 SFF CAN identifiers the identifier is used as an index
480 to access the corresponding subscription list without any further checks.
481 For the 2^29 possible EFF CAN identifiers a 10 bit XOR folding is used as
482 hash function to retrieve the EFF table index.
483
484 To benefit from the optimized filters for single CAN identifiers the
485 CAN_SFF_MASK or CAN_EFF_MASK have to be set into can_filter.mask together
486 with set CAN_EFF_FLAG and CAN_RTR_FLAG bits. A set CAN_EFF_FLAG bit in the
487 can_filter.mask makes clear that it matters whether a SFF or EFF CAN ID is
488 subscribed. E.g. in the example from above
489
490 rfilter[0].can_id = 0x123;
491 rfilter[0].can_mask = CAN_SFF_MASK;
492
493 both SFF frames with CAN ID 0x123 and EFF frames with 0xXXXXX123 can pass.
494
495 To filter for only 0x123 (SFF) and 0x12345678 (EFF) CAN identifiers the
496 filter has to be defined in this way to benefit from the optimized filters:
497
498 struct can_filter rfilter[2];
499
500 rfilter[0].can_id = 0x123;
501 rfilter[0].can_mask = (CAN_EFF_FLAG | CAN_RTR_FLAG | CAN_SFF_MASK);
502 rfilter[1].can_id = 0x12345678 | CAN_EFF_FLAG;
503 rfilter[1].can_mask = (CAN_EFF_FLAG | CAN_RTR_FLAG | CAN_EFF_MASK);
504
505 setsockopt(s, SOL_CAN_RAW, CAN_RAW_FILTER, &rfilter, sizeof(rfilter));
506
472 4.1.2 RAW socket option CAN_RAW_ERR_FILTER 507 4.1.2 RAW socket option CAN_RAW_ERR_FILTER
473 508
474 As described in chapter 3.4 the CAN interface driver can generate so 509 As described in chapter 3.4 the CAN interface driver can generate so
@@ -706,7 +741,7 @@ solution for a couple of reasons:
706 741
707 RX_NO_AUTOTIMER: Prevent automatically starting the timeout monitor. 742 RX_NO_AUTOTIMER: Prevent automatically starting the timeout monitor.
708 743
709 RX_ANNOUNCE_RESUME: If passed at RX_SETUP and a receive timeout occured, a 744 RX_ANNOUNCE_RESUME: If passed at RX_SETUP and a receive timeout occurred, a
710 RX_CHANGED message will be generated when the (cyclic) receive restarts. 745 RX_CHANGED message will be generated when the (cyclic) receive restarts.
711 746
712 TX_RESET_MULTI_IDX: Reset the index for the multiple frame transmission. 747 TX_RESET_MULTI_IDX: Reset the index for the multiple frame transmission.
diff --git a/Documentation/networking/cdc_mbim.txt b/Documentation/networking/cdc_mbim.txt
new file mode 100644
index 000000000000..a15ea602aa52
--- /dev/null
+++ b/Documentation/networking/cdc_mbim.txt
@@ -0,0 +1,339 @@
1 cdc_mbim - Driver for CDC MBIM Mobile Broadband modems
2 ========================================================
3
4The cdc_mbim driver supports USB devices conforming to the "Universal
5Serial Bus Communications Class Subclass Specification for Mobile
6Broadband Interface Model" [1], which is a further development of
7"Universal Serial Bus Communications Class Subclass Specifications for
8Network Control Model Devices" [2] optimized for Mobile Broadband
9devices, aka "3G/LTE modems".
10
11
12Command Line Parameters
13=======================
14
15The cdc_mbim driver has no parameters of its own. But the probing
16behaviour for NCM 1.0 backwards compatible MBIM functions (an
17"NCM/MBIM function" as defined in section 3.2 of [1]) is affected
18by a cdc_ncm driver parameter:
19
20prefer_mbim
21-----------
22Type: Boolean
23Valid Range: N/Y (0-1)
24Default Value: Y (MBIM is preferred)
25
26This parameter sets the system policy for NCM/MBIM functions. Such
27functions will be handled by either the cdc_ncm driver or the cdc_mbim
28driver depending on the prefer_mbim setting. Setting prefer_mbim=N
29makes the cdc_mbim driver ignore these functions and lets the cdc_ncm
30driver handle them instead.
31
32The parameter is writable, and can be changed at any time. A manual
33unbind/bind is required to make the change effective for NCM/MBIM
34functions bound to the "wrong" driver
35
36
37Basic usage
38===========
39
40MBIM functions are inactive when unmanaged. The cdc_mbim driver only
41provides an userspace interface to the MBIM control channel, and will
42not participate in the management of the function. This implies that a
43userspace MBIM management application always is required to enable a
44MBIM function.
45
46Such userspace applications includes, but are not limited to:
47 - mbimcli (included with the libmbim [3] library), and
48 - ModemManager [4]
49
50Establishing a MBIM IP session reequires at least these actions by the
51management application:
52 - open the control channel
53 - configure network connection settings
54 - connect to network
55 - configure IP interface
56
57Management application development
58----------------------------------
59The driver <-> userspace interfaces are described below. The MBIM
60control channel protocol is described in [1].
61
62
63MBIM control channel userspace ABI
64==================================
65
66/dev/cdc-wdmX character device
67------------------------------
68The driver creates a two-way pipe to the MBIM function control channel
69using the cdc-wdm driver as a subdriver. The userspace end of the
70control channel pipe is a /dev/cdc-wdmX character device.
71
72The cdc_mbim driver does not process or police messages on the control
73channel. The channel is fully delegated to the userspace management
74application. It is therefore up to this application to ensure that it
75complies with all the control channel requirements in [1].
76
77The cdc-wdmX device is created as a child of the MBIM control
78interface USB device. The character device associated with a specific
79MBIM function can be looked up using sysfs. For example:
80
81 bjorn@nemi:~$ ls /sys/bus/usb/drivers/cdc_mbim/2-4:2.12/usbmisc
82 cdc-wdm0
83
84 bjorn@nemi:~$ grep . /sys/bus/usb/drivers/cdc_mbim/2-4:2.12/usbmisc/cdc-wdm0/dev
85 180:0
86
87
88USB configuration descriptors
89-----------------------------
90The wMaxControlMessage field of the CDC MBIM functional descriptor
91limits the maximum control message size. The managament application is
92responsible for negotiating a control message size complying with the
93requirements in section 9.3.1 of [1], taking this descriptor field
94into consideration.
95
96The userspace application can access the CDC MBIM functional
97descriptor of a MBIM function using either of the two USB
98configuration descriptor kernel interfaces described in [6] or [7].
99
100See also the ioctl documentation below.
101
102
103Fragmentation
104-------------
105The userspace application is responsible for all control message
106fragmentation and defragmentaion, as described in section 9.5 of [1].
107
108
109/dev/cdc-wdmX write()
110---------------------
111The MBIM control messages from the management application *must not*
112exceed the negotiated control message size.
113
114
115/dev/cdc-wdmX read()
116--------------------
117The management application *must* accept control messages of up the
118negotiated control message size.
119
120
121/dev/cdc-wdmX ioctl()
122--------------------
123IOCTL_WDM_MAX_COMMAND: Get Maximum Command Size
124This ioctl returns the wMaxControlMessage field of the CDC MBIM
125functional descriptor for MBIM devices. This is intended as a
126convenience, eliminating the need to parse the USB descriptors from
127userspace.
128
129 #include <stdio.h>
130 #include <fcntl.h>
131 #include <sys/ioctl.h>
132 #include <linux/types.h>
133 #include <linux/usb/cdc-wdm.h>
134 int main()
135 {
136 __u16 max;
137 int fd = open("/dev/cdc-wdm0", O_RDWR);
138 if (!ioctl(fd, IOCTL_WDM_MAX_COMMAND, &max))
139 printf("wMaxControlMessage is %d\n", max);
140 }
141
142
143Custom device services
144----------------------
145The MBIM specification allows vendors to freely define additional
146services. This is fully supported by the cdc_mbim driver.
147
148Support for new MBIM services, including vendor specified services, is
149implemented entirely in userspace, like the rest of the MBIM control
150protocol
151
152New services should be registered in the MBIM Registry [5].
153
154
155
156MBIM data channel userspace ABI
157===============================
158
159wwanY network device
160--------------------
161The cdc_mbim driver represents the MBIM data channel as a single
162network device of the "wwan" type. This network device is initially
163mapped to MBIM IP session 0.
164
165
166Multiplexed IP sessions (IPS)
167-----------------------------
168MBIM allows multiplexing up to 256 IP sessions over a single USB data
169channel. The cdc_mbim driver models such IP sessions as 802.1q VLAN
170subdevices of the master wwanY device, mapping MBIM IP session Z to
171VLAN ID Z for all values of Z greater than 0.
172
173The device maximum Z is given in the MBIM_DEVICE_CAPS_INFO structure
174described in section 10.5.1 of [1].
175
176The userspace management application is responsible for adding new
177VLAN links prior to establishing MBIM IP sessions where the SessionId
178is greater than 0. These links can be added by using the normal VLAN
179kernel interfaces, either ioctl or netlink.
180
181For example, adding a link for a MBIM IP session with SessionId 3:
182
183 ip link add link wwan0 name wwan0.3 type vlan id 3
184
185The driver will automatically map the "wwan0.3" network device to MBIM
186IP session 3.
187
188
189Device Service Streams (DSS)
190----------------------------
191MBIM also allows up to 256 non-IP data streams to be multiplexed over
192the same shared USB data channel. The cdc_mbim driver models these
193sessions as another set of 802.1q VLAN subdevices of the master wwanY
194device, mapping MBIM DSS session A to VLAN ID (256 + A) for all values
195of A.
196
197The device maximum A is given in the MBIM_DEVICE_SERVICES_INFO
198structure described in section 10.5.29 of [1].
199
200The DSS VLAN subdevices are used as a practical interface between the
201shared MBIM data channel and a MBIM DSS aware userspace application.
202It is not intended to be presented as-is to an end user. The
203assumption is that an userspace application initiating a DSS session
204also takes care of the necessary framing of the DSS data, presenting
205the stream to the end user in an appropriate way for the stream type.
206
207The network device ABI requires a dummy ethernet header for every DSS
208data frame being transported. The contents of this header is
209arbitrary, with the following exceptions:
210 - TX frames using an IP protocol (0x0800 or 0x86dd) will be dropped
211 - RX frames will have the protocol field set to ETH_P_802_3 (but will
212 not be properly formatted 802.3 frames)
213 - RX frames will have the destination address set to the hardware
214 address of the master device
215
216The DSS supporting userspace management application is responsible for
217adding the dummy ethernet header on TX and stripping it on RX.
218
219This is a simple example using tools commonly available, exporting
220DssSessionId 5 as a pty character device pointed to by a /dev/nmea
221symlink:
222
223 ip link add link wwan0 name wwan0.dss5 type vlan id 261
224 ip link set dev wwan0.dss5 up
225 socat INTERFACE:wwan0.dss5,type=2 PTY:,echo=0,link=/dev/nmea
226
227This is only an example, most suitable for testing out a DSS
228service. Userspace applications supporting specific MBIM DSS services
229are expected to use the tools and programming interfaces required by
230that service.
231
232Note that adding VLAN links for DSS sessions is entirely optional. A
233management application may instead choose to bind a packet socket
234directly to the master network device, using the received VLAN tags to
235map frames to the correct DSS session and adding 18 byte VLAN ethernet
236headers with the appropriate tag on TX. In this case using a socket
237filter is recommended, matching only the DSS VLAN subset. This avoid
238unnecessary copying of unrelated IP session data to userspace. For
239example:
240
241 static struct sock_filter dssfilter[] = {
242 /* use special negative offsets to get VLAN tag */
243 BPF_STMT(BPF_LD|BPF_B|BPF_ABS, SKF_AD_OFF + SKF_AD_VLAN_TAG_PRESENT),
244 BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, 1, 0, 6), /* true */
245
246 /* verify DSS VLAN range */
247 BPF_STMT(BPF_LD|BPF_H|BPF_ABS, SKF_AD_OFF + SKF_AD_VLAN_TAG),
248 BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 256, 0, 4), /* 256 is first DSS VLAN */
249 BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 512, 3, 0), /* 511 is last DSS VLAN */
250
251 /* verify ethertype */
252 BPF_STMT(BPF_LD|BPF_H|BPF_ABS, 2 * ETH_ALEN),
253 BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, ETH_P_802_3, 0, 1),
254
255 BPF_STMT(BPF_RET|BPF_K, (u_int)-1), /* accept */
256 BPF_STMT(BPF_RET|BPF_K, 0), /* ignore */
257 };
258
259
260
261Tagged IP session 0 VLAN
262------------------------
263As described above, MBIM IP session 0 is treated as special by the
264driver. It is initially mapped to untagged frames on the wwanY
265network device.
266
267This mapping implies a few restrictions on multiplexed IPS and DSS
268sessions, which may not always be practical:
269 - no IPS or DSS session can use a frame size greater than the MTU on
270 IP session 0
271 - no IPS or DSS session can be in the up state unless the network
272 device representing IP session 0 also is up
273
274These problems can be avoided by optionally making the driver map IP
275session 0 to a VLAN subdevice, similar to all other IP sessions. This
276behaviour is triggered by adding a VLAN link for the magic VLAN ID
2774094. The driver will then immediately start mapping MBIM IP session
2780 to this VLAN, and will drop untagged frames on the master wwanY
279device.
280
281Tip: It might be less confusing to the end user to name this VLAN
282subdevice after the MBIM SessionID instead of the VLAN ID. For
283example:
284
285 ip link add link wwan0 name wwan0.0 type vlan id 4094
286
287
288VLAN mapping
289------------
290
291Summarizing the cdc_mbim driver mapping described above, we have this
292relationship between VLAN tags on the wwanY network device and MBIM
293sessions on the shared USB data channel:
294
295 VLAN ID MBIM type MBIM SessionID Notes
296 ---------------------------------------------------------
297 untagged IPS 0 a)
298 1 - 255 IPS 1 - 255 <VLANID>
299 256 - 511 DSS 0 - 255 <VLANID - 256>
300 512 - 4093 b)
301 4094 IPS 0 c)
302
303 a) if no VLAN ID 4094 link exists, else dropped
304 b) unsupported VLAN range, unconditionally dropped
305 c) if a VLAN ID 4094 link exists, else dropped
306
307
308
309
310References
311==========
312
313[1] USB Implementers Forum, Inc. - "Universal Serial Bus
314 Communications Class Subclass Specification for Mobile Broadband
315 Interface Model", Revision 1.0 (Errata 1), May 1, 2013
316 - http://www.usb.org/developers/docs/devclass_docs/
317
318[2] USB Implementers Forum, Inc. - "Universal Serial Bus
319 Communications Class Subclass Specifications for Network Control
320 Model Devices", Revision 1.0 (Errata 1), November 24, 2010
321 - http://www.usb.org/developers/docs/devclass_docs/
322
323[3] libmbim - "a glib-based library for talking to WWAN modems and
324 devices which speak the Mobile Interface Broadband Model (MBIM)
325 protocol"
326 - http://www.freedesktop.org/wiki/Software/libmbim/
327
328[4] ModemManager - "a DBus-activated daemon which controls mobile
329 broadband (2G/3G/4G) devices and connections"
330 - http://www.freedesktop.org/wiki/Software/ModemManager/
331
332[5] "MBIM (Mobile Broadband Interface Model) Registry"
333 - http://compliance.usb.org/mbim/
334
335[6] "/proc/bus/usb filesystem output"
336 - Documentation/usb/proc_usb_info.txt
337
338[7] "/sys/bus/usb/devices/.../descriptors"
339 - Documentation/ABI/stable/sysfs-bus-usb
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt
index bf5dbe3ab8c5..55c575fcaf17 100644
--- a/Documentation/networking/dccp.txt
+++ b/Documentation/networking/dccp.txt
@@ -86,7 +86,7 @@ built-in CCIDs.
86 86
87DCCP_SOCKOPT_CCID is write-only and sets both the TX and RX CCIDs at the same 87DCCP_SOCKOPT_CCID is write-only and sets both the TX and RX CCIDs at the same
88time, combining the operation of the next two socket options. This option is 88time, combining the operation of the next two socket options. This option is
89preferrable over the latter two, since often applications will use the same 89preferable over the latter two, since often applications will use the same
90type of CCID for both directions; and mixed use of CCIDs is not currently well 90type of CCID for both directions; and mixed use of CCIDs is not currently well
91understood. This socket option takes as argument at least one uint8_t value, or 91understood. This socket option takes as argument at least one uint8_t value, or
92an array of uint8_t values, which must match available CCIDS (see above). CCIDs 92an array of uint8_t values, which must match available CCIDS (see above). CCIDs
diff --git a/Documentation/networking/filter.txt b/Documentation/networking/filter.txt
index 81f940f4e884..ee78eba78a9d 100644
--- a/Documentation/networking/filter.txt
+++ b/Documentation/networking/filter.txt
@@ -277,10 +277,11 @@ Possible BPF extensions are shown in the following table:
277 mark skb->mark 277 mark skb->mark
278 queue skb->queue_mapping 278 queue skb->queue_mapping
279 hatype skb->dev->type 279 hatype skb->dev->type
280 rxhash skb->rxhash 280 rxhash skb->hash
281 cpu raw_smp_processor_id() 281 cpu raw_smp_processor_id()
282 vlan_tci vlan_tx_tag_get(skb) 282 vlan_tci vlan_tx_tag_get(skb)
283 vlan_pr vlan_tx_tag_present(skb) 283 vlan_pr vlan_tx_tag_present(skb)
284 rand prandom_u32()
284 285
285These extensions can also be prefixed with '#'. 286These extensions can also be prefixed with '#'.
286Examples for low-level BPF: 287Examples for low-level BPF:
@@ -308,6 +309,18 @@ Examples for low-level BPF:
308 ret #-1 309 ret #-1
309 drop: ret #0 310 drop: ret #0
310 311
312** icmp random packet sampling, 1 in 4
313 ldh [12]
314 jne #0x800, drop
315 ldb [23]
316 jneq #1, drop
317 # get a random uint32 number
318 ld rand
319 mod #4
320 jneq #1, drop
321 ret #-1
322 drop: ret #0
323
311** SECCOMP filter example: 324** SECCOMP filter example:
312 325
313 ld [4] /* offsetof(struct seccomp_data, arch) */ 326 ld [4] /* offsetof(struct seccomp_data, arch) */
@@ -548,42 +561,43 @@ toolchain for developing and testing the kernel's JIT compiler.
548 561
549BPF kernel internals 562BPF kernel internals
550-------------------- 563--------------------
551Internally, for the kernel interpreter, a different BPF instruction set 564Internally, for the kernel interpreter, a different instruction set
552format with similar underlying principles from BPF described in previous 565format with similar underlying principles from BPF described in previous
553paragraphs is being used. However, the instruction set format is modelled 566paragraphs is being used. However, the instruction set format is modelled
554closer to the underlying architecture to mimic native instruction sets, so 567closer to the underlying architecture to mimic native instruction sets, so
555that a better performance can be achieved (more details later). 568that a better performance can be achieved (more details later). This new
569ISA is called 'eBPF' or 'internal BPF' interchangeably. (Note: eBPF which
570originates from [e]xtended BPF is not the same as BPF extensions! While
571eBPF is an ISA, BPF extensions date back to classic BPF's 'overloading'
572of BPF_LD | BPF_{B,H,W} | BPF_ABS instruction.)
556 573
557It is designed to be JITed with one to one mapping, which can also open up 574It is designed to be JITed with one to one mapping, which can also open up
558the possibility for GCC/LLVM compilers to generate optimized BPF code through 575the possibility for GCC/LLVM compilers to generate optimized eBPF code through
559a BPF backend that performs almost as fast as natively compiled code. 576an eBPF backend that performs almost as fast as natively compiled code.
560 577
561The new instruction set was originally designed with the possible goal in 578The new instruction set was originally designed with the possible goal in
562mind to write programs in "restricted C" and compile into BPF with a optional 579mind to write programs in "restricted C" and compile into eBPF with a optional
563GCC/LLVM backend, so that it can just-in-time map to modern 64-bit CPUs with 580GCC/LLVM backend, so that it can just-in-time map to modern 64-bit CPUs with
564minimal performance overhead over two steps, that is, C -> BPF -> native code. 581minimal performance overhead over two steps, that is, C -> eBPF -> native code.
565 582
566Currently, the new format is being used for running user BPF programs, which 583Currently, the new format is being used for running user BPF programs, which
567includes seccomp BPF, classic socket filters, cls_bpf traffic classifier, 584includes seccomp BPF, classic socket filters, cls_bpf traffic classifier,
568team driver's classifier for its load-balancing mode, netfilter's xt_bpf 585team driver's classifier for its load-balancing mode, netfilter's xt_bpf
569extension, PTP dissector/classifier, and much more. They are all internally 586extension, PTP dissector/classifier, and much more. They are all internally
570converted by the kernel into the new instruction set representation and run 587converted by the kernel into the new instruction set representation and run
571in the extended interpreter. For in-kernel handlers, this all works 588in the eBPF interpreter. For in-kernel handlers, this all works transparently
572transparently by using sk_unattached_filter_create() for setting up the 589by using sk_unattached_filter_create() for setting up the filter, resp.
573filter, resp. sk_unattached_filter_destroy() for destroying it. The macro 590sk_unattached_filter_destroy() for destroying it. The macro
574SK_RUN_FILTER(filter, ctx) transparently invokes the right BPF function to 591SK_RUN_FILTER(filter, ctx) transparently invokes eBPF interpreter or JITed
575run the filter. 'filter' is a pointer to struct sk_filter that we got from 592code to run the filter. 'filter' is a pointer to struct sk_filter that we
576sk_unattached_filter_create(), and 'ctx' the given context (e.g. skb pointer). 593got from sk_unattached_filter_create(), and 'ctx' the given context (e.g.
577All constraints and restrictions from sk_chk_filter() apply before a 594skb pointer). All constraints and restrictions from sk_chk_filter() apply
578conversion to the new layout is being done behind the scenes! 595before a conversion to the new layout is being done behind the scenes!
579 596
580Currently, for JITing, the user BPF format is being used and current BPF JIT 597Currently, the classic BPF format is being used for JITing on most of the
581compilers reused whenever possible. In other words, we do not (yet!) perform 598architectures. Only x86-64 performs JIT compilation from eBPF instruction set,
582a JIT compilation in the new layout, however, future work will successively 599however, future work will migrate other JIT compilers as well, so that they
583migrate traditional JIT compilers into the new instruction format as well, so 600will profit from the very same benefits.
584that they will profit from the very same benefits. Thus, when speaking about
585JIT in the following, a JIT compiler (TBD) for the new instruction format is
586meant in this context.
587 601
588Some core changes of the new internal format: 602Some core changes of the new internal format:
589 603
@@ -592,35 +606,35 @@ Some core changes of the new internal format:
592 The old format had two registers A and X, and a hidden frame pointer. The 606 The old format had two registers A and X, and a hidden frame pointer. The
593 new layout extends this to be 10 internal registers and a read-only frame 607 new layout extends this to be 10 internal registers and a read-only frame
594 pointer. Since 64-bit CPUs are passing arguments to functions via registers 608 pointer. Since 64-bit CPUs are passing arguments to functions via registers
595 the number of args from BPF program to in-kernel function is restricted 609 the number of args from eBPF program to in-kernel function is restricted
596 to 5 and one register is used to accept return value from an in-kernel 610 to 5 and one register is used to accept return value from an in-kernel
597 function. Natively, x86_64 passes first 6 arguments in registers, aarch64/ 611 function. Natively, x86_64 passes first 6 arguments in registers, aarch64/
598 sparcv9/mips64 have 7 - 8 registers for arguments; x86_64 has 6 callee saved 612 sparcv9/mips64 have 7 - 8 registers for arguments; x86_64 has 6 callee saved
599 registers, and aarch64/sparcv9/mips64 have 11 or more callee saved registers. 613 registers, and aarch64/sparcv9/mips64 have 11 or more callee saved registers.
600 614
601 Therefore, BPF calling convention is defined as: 615 Therefore, eBPF calling convention is defined as:
602 616
603 * R0 - return value from in-kernel function 617 * R0 - return value from in-kernel function, and exit value for eBPF program
604 * R1 - R5 - arguments from BPF program to in-kernel function 618 * R1 - R5 - arguments from eBPF program to in-kernel function
605 * R6 - R9 - callee saved registers that in-kernel function will preserve 619 * R6 - R9 - callee saved registers that in-kernel function will preserve
606 * R10 - read-only frame pointer to access stack 620 * R10 - read-only frame pointer to access stack
607 621
608 Thus, all BPF registers map one to one to HW registers on x86_64, aarch64, 622 Thus, all eBPF registers map one to one to HW registers on x86_64, aarch64,
609 etc, and BPF calling convention maps directly to ABIs used by the kernel on 623 etc, and eBPF calling convention maps directly to ABIs used by the kernel on
610 64-bit architectures. 624 64-bit architectures.
611 625
612 On 32-bit architectures JIT may map programs that use only 32-bit arithmetic 626 On 32-bit architectures JIT may map programs that use only 32-bit arithmetic
613 and may let more complex programs to be interpreted. 627 and may let more complex programs to be interpreted.
614 628
615 R0 - R5 are scratch registers and BPF program needs spill/fill them if 629 R0 - R5 are scratch registers and eBPF program needs spill/fill them if
616 necessary across calls. Note that there is only one BPF program (== one BPF 630 necessary across calls. Note that there is only one eBPF program (== one
617 main routine) and it cannot call other BPF functions, it can only call 631 eBPF main routine) and it cannot call other eBPF functions, it can only
618 predefined in-kernel functions, though. 632 call predefined in-kernel functions, though.
619 633
620- Register width increases from 32-bit to 64-bit: 634- Register width increases from 32-bit to 64-bit:
621 635
622 Still, the semantics of the original 32-bit ALU operations are preserved 636 Still, the semantics of the original 32-bit ALU operations are preserved
623 via 32-bit subregisters. All BPF registers are 64-bit with 32-bit lower 637 via 32-bit subregisters. All eBPF registers are 64-bit with 32-bit lower
624 subregisters that zero-extend into 64-bit if they are being written to. 638 subregisters that zero-extend into 64-bit if they are being written to.
625 That behavior maps directly to x86_64 and arm64 subregister definition, but 639 That behavior maps directly to x86_64 and arm64 subregister definition, but
626 makes other JITs more difficult. 640 makes other JITs more difficult.
@@ -631,8 +645,8 @@ Some core changes of the new internal format:
631 645
632 Operation is 64-bit, because on 64-bit architectures, pointers are also 646 Operation is 64-bit, because on 64-bit architectures, pointers are also
633 64-bit wide, and we want to pass 64-bit values in/out of kernel functions, 647 64-bit wide, and we want to pass 64-bit values in/out of kernel functions,
634 so 32-bit BPF registers would otherwise require to define register-pair 648 so 32-bit eBPF registers would otherwise require to define register-pair
635 ABI, thus, there won't be able to use a direct BPF register to HW register 649 ABI, thus, there won't be able to use a direct eBPF register to HW register
636 mapping and JIT would need to do combine/split/move operations for every 650 mapping and JIT would need to do combine/split/move operations for every
637 register in and out of the function, which is complex, bug prone and slow. 651 register in and out of the function, which is complex, bug prone and slow.
638 Another reason is the use of atomic 64-bit counters. 652 Another reason is the use of atomic 64-bit counters.
@@ -646,14 +660,145 @@ Some core changes of the new internal format:
646- Introduces bpf_call insn and register passing convention for zero overhead 660- Introduces bpf_call insn and register passing convention for zero overhead
647 calls from/to other kernel functions: 661 calls from/to other kernel functions:
648 662
649 After a kernel function call, R1 - R5 are reset to unreadable and R0 has a 663 Before an in-kernel function call, the internal BPF program needs to
650 return type of the function. Since R6 - R9 are callee saved, their state is 664 place function arguments into R1 to R5 registers to satisfy calling
651 preserved across the call. 665 convention, then the interpreter will take them from registers and pass
652 666 to in-kernel function. If R1 - R5 registers are mapped to CPU registers
653Also in the new design, BPF is limited to 4096 insns, which means that any 667 that are used for argument passing on given architecture, the JIT compiler
668 doesn't need to emit extra moves. Function arguments will be in the correct
669 registers and BPF_CALL instruction will be JITed as single 'call' HW
670 instruction. This calling convention was picked to cover common call
671 situations without performance penalty.
672
673 After an in-kernel function call, R1 - R5 are reset to unreadable and R0 has
674 a return value of the function. Since R6 - R9 are callee saved, their state
675 is preserved across the call.
676
677 For example, consider three C functions:
678
679 u64 f1() { return (*_f2)(1); }
680 u64 f2(u64 a) { return f3(a + 1, a); }
681 u64 f3(u64 a, u64 b) { return a - b; }
682
683 GCC can compile f1, f3 into x86_64:
684
685 f1:
686 movl $1, %edi
687 movq _f2(%rip), %rax
688 jmp *%rax
689 f3:
690 movq %rdi, %rax
691 subq %rsi, %rax
692 ret
693
694 Function f2 in eBPF may look like:
695
696 f2:
697 bpf_mov R2, R1
698 bpf_add R1, 1
699 bpf_call f3
700 bpf_exit
701
702 If f2 is JITed and the pointer stored to '_f2'. The calls f1 -> f2 -> f3 and
703 returns will be seamless. Without JIT, __sk_run_filter() interpreter needs to
704 be used to call into f2.
705
706 For practical reasons all eBPF programs have only one argument 'ctx' which is
707 already placed into R1 (e.g. on __sk_run_filter() startup) and the programs
708 can call kernel functions with up to 5 arguments. Calls with 6 or more arguments
709 are currently not supported, but these restrictions can be lifted if necessary
710 in the future.
711
712 On 64-bit architectures all register map to HW registers one to one. For
713 example, x86_64 JIT compiler can map them as ...
714
715 R0 - rax
716 R1 - rdi
717 R2 - rsi
718 R3 - rdx
719 R4 - rcx
720 R5 - r8
721 R6 - rbx
722 R7 - r13
723 R8 - r14
724 R9 - r15
725 R10 - rbp
726
727 ... since x86_64 ABI mandates rdi, rsi, rdx, rcx, r8, r9 for argument passing
728 and rbx, r12 - r15 are callee saved.
729
730 Then the following internal BPF pseudo-program:
731
732 bpf_mov R6, R1 /* save ctx */
733 bpf_mov R2, 2
734 bpf_mov R3, 3
735 bpf_mov R4, 4
736 bpf_mov R5, 5
737 bpf_call foo
738 bpf_mov R7, R0 /* save foo() return value */
739 bpf_mov R1, R6 /* restore ctx for next call */
740 bpf_mov R2, 6
741 bpf_mov R3, 7
742 bpf_mov R4, 8
743 bpf_mov R5, 9
744 bpf_call bar
745 bpf_add R0, R7
746 bpf_exit
747
748 After JIT to x86_64 may look like:
749
750 push %rbp
751 mov %rsp,%rbp
752 sub $0x228,%rsp
753 mov %rbx,-0x228(%rbp)
754 mov %r13,-0x220(%rbp)
755 mov %rdi,%rbx
756 mov $0x2,%esi
757 mov $0x3,%edx
758 mov $0x4,%ecx
759 mov $0x5,%r8d
760 callq foo
761 mov %rax,%r13
762 mov %rbx,%rdi
763 mov $0x2,%esi
764 mov $0x3,%edx
765 mov $0x4,%ecx
766 mov $0x5,%r8d
767 callq bar
768 add %r13,%rax
769 mov -0x228(%rbp),%rbx
770 mov -0x220(%rbp),%r13
771 leaveq
772 retq
773
774 Which is in this example equivalent in C to:
775
776 u64 bpf_filter(u64 ctx)
777 {
778 return foo(ctx, 2, 3, 4, 5) + bar(ctx, 6, 7, 8, 9);
779 }
780
781 In-kernel functions foo() and bar() with prototype: u64 (*)(u64 arg1, u64
782 arg2, u64 arg3, u64 arg4, u64 arg5); will receive arguments in proper
783 registers and place their return value into '%rax' which is R0 in eBPF.
784 Prologue and epilogue are emitted by JIT and are implicit in the
785 interpreter. R0-R5 are scratch registers, so eBPF program needs to preserve
786 them across the calls as defined by calling convention.
787
788 For example the following program is invalid:
789
790 bpf_mov R1, 1
791 bpf_call foo
792 bpf_mov R0, R1
793 bpf_exit
794
795 After the call the registers R1-R5 contain junk values and cannot be read.
796 In the future an eBPF verifier can be used to validate internal BPF programs.
797
798Also in the new design, eBPF is limited to 4096 insns, which means that any
654program will terminate quickly and will only call a fixed number of kernel 799program will terminate quickly and will only call a fixed number of kernel
655functions. Original BPF and the new format are two operand instructions, 800functions. Original BPF and the new format are two operand instructions,
656which helps to do one-to-one mapping between BPF insn and x86 insn during JIT. 801which helps to do one-to-one mapping between eBPF insn and x86 insn during JIT.
657 802
658The input context pointer for invoking the interpreter function is generic, 803The input context pointer for invoking the interpreter function is generic,
659its content is defined by a specific use case. For seccomp register R1 points 804its content is defined by a specific use case. For seccomp register R1 points
@@ -661,7 +806,26 @@ to seccomp_data, for converted BPF filters R1 points to a skb.
661 806
662A program, that is translated internally consists of the following elements: 807A program, that is translated internally consists of the following elements:
663 808
664 op:16, jt:8, jf:8, k:32 ==> op:8, a_reg:4, x_reg:4, off:16, imm:32 809 op:16, jt:8, jf:8, k:32 ==> op:8, dst_reg:4, src_reg:4, off:16, imm:32
810
811So far 87 internal BPF instructions were implemented. 8-bit 'op' opcode field
812has room for new instructions. Some of them may use 16/24/32 byte encoding. New
813instructions must be multiple of 8 bytes to preserve backward compatibility.
814
815Internal BPF is a general purpose RISC instruction set. Not every register and
816every instruction are used during translation from original BPF to new format.
817For example, socket filters are not using 'exclusive add' instruction, but
818tracing filters may do to maintain counters of events, for example. Register R9
819is not used by socket filters either, but more complex filters may be running
820out of registers and would have to resort to spill/fill to stack.
821
822Internal BPF can used as generic assembler for last step performance
823optimizations, socket filters and seccomp are using it as assembler. Tracing
824filters may use it as assembler to generate code from kernel. In kernel usage
825may not be bounded by security considerations, since generated internal BPF code
826may be optimizing internal code path and not being exposed to the user space.
827Safety of internal BPF can come from a verifier (TBD). In such use cases as
828described, it may be used as safe instruction set.
665 829
666Just like the original BPF, the new format runs within a controlled environment, 830Just like the original BPF, the new format runs within a controlled environment,
667is deterministic and the kernel can easily prove that. The safety of the program 831is deterministic and the kernel can easily prove that. The safety of the program
@@ -670,6 +834,181 @@ loops and other CFG validation; second step starts from the first insn and
670descends all possible paths. It simulates execution of every insn and observes 834descends all possible paths. It simulates execution of every insn and observes
671the state change of registers and stack. 835the state change of registers and stack.
672 836
837eBPF opcode encoding
838--------------------
839
840eBPF is reusing most of the opcode encoding from classic to simplify conversion
841of classic BPF to eBPF. For arithmetic and jump instructions the 8-bit 'code'
842field is divided into three parts:
843
844 +----------------+--------+--------------------+
845 | 4 bits | 1 bit | 3 bits |
846 | operation code | source | instruction class |
847 +----------------+--------+--------------------+
848 (MSB) (LSB)
849
850Three LSB bits store instruction class which is one of:
851
852 Classic BPF classes: eBPF classes:
853
854 BPF_LD 0x00 BPF_LD 0x00
855 BPF_LDX 0x01 BPF_LDX 0x01
856 BPF_ST 0x02 BPF_ST 0x02
857 BPF_STX 0x03 BPF_STX 0x03
858 BPF_ALU 0x04 BPF_ALU 0x04
859 BPF_JMP 0x05 BPF_JMP 0x05
860 BPF_RET 0x06 [ class 6 unused, for future if needed ]
861 BPF_MISC 0x07 BPF_ALU64 0x07
862
863When BPF_CLASS(code) == BPF_ALU or BPF_JMP, 4th bit encodes source operand ...
864
865 BPF_K 0x00
866 BPF_X 0x08
867
868 * in classic BPF, this means:
869
870 BPF_SRC(code) == BPF_X - use register X as source operand
871 BPF_SRC(code) == BPF_K - use 32-bit immediate as source operand
872
873 * in eBPF, this means:
874
875 BPF_SRC(code) == BPF_X - use 'src_reg' register as source operand
876 BPF_SRC(code) == BPF_K - use 32-bit immediate as source operand
877
878... and four MSB bits store operation code.
879
880If BPF_CLASS(code) == BPF_ALU or BPF_ALU64 [ in eBPF ], BPF_OP(code) is one of:
881
882 BPF_ADD 0x00
883 BPF_SUB 0x10
884 BPF_MUL 0x20
885 BPF_DIV 0x30
886 BPF_OR 0x40
887 BPF_AND 0x50
888 BPF_LSH 0x60
889 BPF_RSH 0x70
890 BPF_NEG 0x80
891 BPF_MOD 0x90
892 BPF_XOR 0xa0
893 BPF_MOV 0xb0 /* eBPF only: mov reg to reg */
894 BPF_ARSH 0xc0 /* eBPF only: sign extending shift right */
895 BPF_END 0xd0 /* eBPF only: endianness conversion */
896
897If BPF_CLASS(code) == BPF_JMP, BPF_OP(code) is one of:
898
899 BPF_JA 0x00
900 BPF_JEQ 0x10
901 BPF_JGT 0x20
902 BPF_JGE 0x30
903 BPF_JSET 0x40
904 BPF_JNE 0x50 /* eBPF only: jump != */
905 BPF_JSGT 0x60 /* eBPF only: signed '>' */
906 BPF_JSGE 0x70 /* eBPF only: signed '>=' */
907 BPF_CALL 0x80 /* eBPF only: function call */
908 BPF_EXIT 0x90 /* eBPF only: function return */
909
910So BPF_ADD | BPF_X | BPF_ALU means 32-bit addition in both classic BPF
911and eBPF. There are only two registers in classic BPF, so it means A += X.
912In eBPF it means dst_reg = (u32) dst_reg + (u32) src_reg; similarly,
913BPF_XOR | BPF_K | BPF_ALU means A ^= imm32 in classic BPF and analogous
914src_reg = (u32) src_reg ^ (u32) imm32 in eBPF.
915
916Classic BPF is using BPF_MISC class to represent A = X and X = A moves.
917eBPF is using BPF_MOV | BPF_X | BPF_ALU code instead. Since there are no
918BPF_MISC operations in eBPF, the class 7 is used as BPF_ALU64 to mean
919exactly the same operations as BPF_ALU, but with 64-bit wide operands
920instead. So BPF_ADD | BPF_X | BPF_ALU64 means 64-bit addition, i.e.:
921dst_reg = dst_reg + src_reg
922
923Classic BPF wastes the whole BPF_RET class to represent a single 'ret'
924operation. Classic BPF_RET | BPF_K means copy imm32 into return register
925and perform function exit. eBPF is modeled to match CPU, so BPF_JMP | BPF_EXIT
926in eBPF means function exit only. The eBPF program needs to store return
927value into register R0 before doing a BPF_EXIT. Class 6 in eBPF is currently
928unused and reserved for future use.
929
930For load and store instructions the 8-bit 'code' field is divided as:
931
932 +--------+--------+-------------------+
933 | 3 bits | 2 bits | 3 bits |
934 | mode | size | instruction class |
935 +--------+--------+-------------------+
936 (MSB) (LSB)
937
938Size modifier is one of ...
939
940 BPF_W 0x00 /* word */
941 BPF_H 0x08 /* half word */
942 BPF_B 0x10 /* byte */
943 BPF_DW 0x18 /* eBPF only, double word */
944
945... which encodes size of load/store operation:
946
947 B - 1 byte
948 H - 2 byte
949 W - 4 byte
950 DW - 8 byte (eBPF only)
951
952Mode modifier is one of:
953
954 BPF_IMM 0x00 /* classic BPF only, reserved in eBPF */
955 BPF_ABS 0x20
956 BPF_IND 0x40
957 BPF_MEM 0x60
958 BPF_LEN 0x80 /* classic BPF only, reserved in eBPF */
959 BPF_MSH 0xa0 /* classic BPF only, reserved in eBPF */
960 BPF_XADD 0xc0 /* eBPF only, exclusive add */
961
962eBPF has two non-generic instructions: (BPF_ABS | <size> | BPF_LD) and
963(BPF_IND | <size> | BPF_LD) which are used to access packet data.
964
965They had to be carried over from classic to have strong performance of
966socket filters running in eBPF interpreter. These instructions can only
967be used when interpreter context is a pointer to 'struct sk_buff' and
968have seven implicit operands. Register R6 is an implicit input that must
969contain pointer to sk_buff. Register R0 is an implicit output which contains
970the data fetched from the packet. Registers R1-R5 are scratch registers
971and must not be used to store the data across BPF_ABS | BPF_LD or
972BPF_IND | BPF_LD instructions.
973
974These instructions have implicit program exit condition as well. When
975eBPF program is trying to access the data beyond the packet boundary,
976the interpreter will abort the execution of the program. JIT compilers
977therefore must preserve this property. src_reg and imm32 fields are
978explicit inputs to these instructions.
979
980For example:
981
982 BPF_IND | BPF_W | BPF_LD means:
983
984 R0 = ntohl(*(u32 *) (((struct sk_buff *) R6)->data + src_reg + imm32))
985 and R1 - R5 were scratched.
986
987Unlike classic BPF instruction set, eBPF has generic load/store operations:
988
989BPF_MEM | <size> | BPF_STX: *(size *) (dst_reg + off) = src_reg
990BPF_MEM | <size> | BPF_ST: *(size *) (dst_reg + off) = imm32
991BPF_MEM | <size> | BPF_LDX: dst_reg = *(size *) (src_reg + off)
992BPF_XADD | BPF_W | BPF_STX: lock xadd *(u32 *)(dst_reg + off16) += src_reg
993BPF_XADD | BPF_DW | BPF_STX: lock xadd *(u64 *)(dst_reg + off16) += src_reg
994
995Where size is one of: BPF_B or BPF_H or BPF_W or BPF_DW. Note that 1 and
9962 byte atomic increments are not supported.
997
998Testing
999-------
1000
1001Next to the BPF toolchain, the kernel also ships a test module that contains
1002various test cases for classic and internal BPF that can be executed against
1003the BPF interpreter and JIT compiler. It can be found in lib/test_bpf.c and
1004enabled via Kconfig:
1005
1006 CONFIG_TEST_BPF=m
1007
1008After the module has been built and installed, the test suite can be executed
1009via insmod or modprobe against 'test_bpf' module. Results of the test cases
1010including timings in nsec can be found in the kernel log (dmesg).
1011
673Misc 1012Misc
674---- 1013----
675 1014
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt
index 6fea79efb4cb..38112d512f47 100644
--- a/Documentation/networking/packet_mmap.txt
+++ b/Documentation/networking/packet_mmap.txt
@@ -578,7 +578,7 @@ processes. This also works in combination with mmap(2) on packet sockets.
578 578
579Currently implemented fanout policies are: 579Currently implemented fanout policies are:
580 580
581 - PACKET_FANOUT_HASH: schedule to socket by skb's rxhash 581 - PACKET_FANOUT_HASH: schedule to socket by skb's packet hash
582 - PACKET_FANOUT_LB: schedule to socket by round-robin 582 - PACKET_FANOUT_LB: schedule to socket by round-robin
583 - PACKET_FANOUT_CPU: schedule to socket by CPU packet arrives on 583 - PACKET_FANOUT_CPU: schedule to socket by CPU packet arrives on
584 - PACKET_FANOUT_RND: schedule to socket by random selection 584 - PACKET_FANOUT_RND: schedule to socket by random selection
diff --git a/Documentation/platform/x86-laptop-drivers.txt b/Documentation/platform/x86-laptop-drivers.txt
new file mode 100644
index 000000000000..01facd2590bb
--- /dev/null
+++ b/Documentation/platform/x86-laptop-drivers.txt
@@ -0,0 +1,18 @@
1compal-laptop
2=============
3List of supported hardware:
4
5by Compal:
6 Compal FL90/IFL90
7 Compal FL91/IFL91
8 Compal FL92/JFL92
9 Compal FT00/IFT00
10
11by Dell:
12 Dell Vostro 1200
13 Dell Mini 9 (Inspiron 910)
14 Dell Mini 10 (Inspiron 1010)
15 Dell Mini 10v (Inspiron 1011)
16 Dell Mini 1012 (Inspiron 1012)
17 Dell Inspiron 11z (Inspiron 1110)
18 Dell Mini 12 (Inspiron 1210)
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt
index 47d46dff70f7..d172bce0fd49 100644
--- a/Documentation/power/devices.txt
+++ b/Documentation/power/devices.txt
@@ -2,6 +2,7 @@ Device Power Management
2 2
3Copyright (c) 2010-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc. 3Copyright (c) 2010-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc.
4Copyright (c) 2010 Alan Stern <stern@rowland.harvard.edu> 4Copyright (c) 2010 Alan Stern <stern@rowland.harvard.edu>
5Copyright (c) 2014 Intel Corp., Rafael J. Wysocki <rafael.j.wysocki@intel.com>
5 6
6 7
7Most of the code in Linux is device drivers, so most of the Linux power 8Most of the code in Linux is device drivers, so most of the Linux power
@@ -326,6 +327,20 @@ the phases are:
326 driver in some way for the upcoming system power transition, but it 327 driver in some way for the upcoming system power transition, but it
327 should not put the device into a low-power state. 328 should not put the device into a low-power state.
328 329
330 For devices supporting runtime power management, the return value of the
331 prepare callback can be used to indicate to the PM core that it may
332 safely leave the device in runtime suspend (if runtime-suspended
333 already), provided that all of the device's descendants are also left in
334 runtime suspend. Namely, if the prepare callback returns a positive
335 number and that happens for all of the descendants of the device too,
336 and all of them (including the device itself) are runtime-suspended, the
337 PM core will skip the suspend, suspend_late and suspend_noirq suspend
338 phases as well as the resume_noirq, resume_early and resume phases of
339 the following system resume for all of these devices. In that case,
340 the complete callback will be called directly after the prepare callback
341 and is entirely responsible for bringing the device back to the
342 functional state as appropriate.
343
329 2. The suspend methods should quiesce the device to stop it from performing 344 2. The suspend methods should quiesce the device to stop it from performing
330 I/O. They also may save the device registers and put it into the 345 I/O. They also may save the device registers and put it into the
331 appropriate low-power state, depending on the bus type the device is on, 346 appropriate low-power state, depending on the bus type the device is on,
@@ -400,12 +415,23 @@ When resuming from freeze, standby or memory sleep, the phases are:
400 the resume callbacks occur; it's not necessary to wait until the 415 the resume callbacks occur; it's not necessary to wait until the
401 complete phase. 416 complete phase.
402 417
418 Moreover, if the preceding prepare callback returned a positive number,
419 the device may have been left in runtime suspend throughout the whole
420 system suspend and resume (the suspend, suspend_late, suspend_noirq
421 phases of system suspend and the resume_noirq, resume_early, resume
422 phases of system resume may have been skipped for it). In that case,
423 the complete callback is entirely responsible for bringing the device
424 back to the functional state after system suspend if necessary. [For
425 example, it may need to queue up a runtime resume request for the device
426 for this purpose.] To check if that is the case, the complete callback
427 can consult the device's power.direct_complete flag. Namely, if that
428 flag is set when the complete callback is being run, it has been called
429 directly after the preceding prepare and special action may be required
430 to make the device work correctly afterward.
431
403At the end of these phases, drivers should be as functional as they were before 432At the end of these phases, drivers should be as functional as they were before
404suspending: I/O can be performed using DMA and IRQs, and the relevant clocks are 433suspending: I/O can be performed using DMA and IRQs, and the relevant clocks are
405gated on. Even if the device was in a low-power state before the system sleep 434gated on.
406because of runtime power management, afterwards it should be back in its
407full-power state. There are multiple reasons why it's best to do this; they are
408discussed in more detail in Documentation/power/runtime_pm.txt.
409 435
410However, the details here may again be platform-specific. For example, 436However, the details here may again be platform-specific. For example,
411some systems support multiple "run" states, and the mode in effect at 437some systems support multiple "run" states, and the mode in effect at
diff --git a/Documentation/power/opp.txt b/Documentation/power/opp.txt
index b8a907dc0169..a9adad828cdc 100644
--- a/Documentation/power/opp.txt
+++ b/Documentation/power/opp.txt
@@ -10,8 +10,7 @@ Contents
103. OPP Search Functions 103. OPP Search Functions
114. OPP Availability Control Functions 114. OPP Availability Control Functions
125. OPP Data Retrieval Functions 125. OPP Data Retrieval Functions
136. Cpufreq Table Generation 136. Data Structures
147. Data Structures
15 14
161. Introduction 151. Introduction
17=============== 16===============
@@ -72,7 +71,6 @@ operations until that OPP could be re-enabled if possible.
72OPP library facilitates this concept in it's implementation. The following 71OPP library facilitates this concept in it's implementation. The following
73operational functions operate only on available opps: 72operational functions operate only on available opps:
74opp_find_freq_{ceil, floor}, dev_pm_opp_get_voltage, dev_pm_opp_get_freq, dev_pm_opp_get_opp_count 73opp_find_freq_{ceil, floor}, dev_pm_opp_get_voltage, dev_pm_opp_get_freq, dev_pm_opp_get_opp_count
75and dev_pm_opp_init_cpufreq_table
76 74
77dev_pm_opp_find_freq_exact is meant to be used to find the opp pointer which can then 75dev_pm_opp_find_freq_exact is meant to be used to find the opp pointer which can then
78be used for dev_pm_opp_enable/disable functions to make an opp available as required. 76be used for dev_pm_opp_enable/disable functions to make an opp available as required.
@@ -96,10 +94,9 @@ using RCU read locks. The opp_find_freq_{exact,ceil,floor},
96opp_get_{voltage, freq, opp_count} fall into this category. 94opp_get_{voltage, freq, opp_count} fall into this category.
97 95
98opp_{add,enable,disable} are updaters which use mutex and implement it's own 96opp_{add,enable,disable} are updaters which use mutex and implement it's own
99RCU locking mechanisms. dev_pm_opp_init_cpufreq_table acts as an updater and uses 97RCU locking mechanisms. These functions should *NOT* be called under RCU locks
100mutex to implment RCU updater strategy. These functions should *NOT* be called 98and other contexts that prevent blocking functions in RCU or mutex operations
101under RCU locks and other contexts that prevent blocking functions in RCU or 99from working.
102mutex operations from working.
103 100
1042. Initial OPP List Registration 1012. Initial OPP List Registration
105================================ 102================================
@@ -311,34 +308,7 @@ dev_pm_opp_get_opp_count - Retrieve the number of available opps for a device
311 /* Do other things */ 308 /* Do other things */
312 } 309 }
313 310
3146. Cpufreq Table Generation 3116. Data Structures
315===========================
316dev_pm_opp_init_cpufreq_table - cpufreq framework typically is initialized with
317 cpufreq_frequency_table_cpuinfo which is provided with the list of
318 frequencies that are available for operation. This function provides
319 a ready to use conversion routine to translate the OPP layer's internal
320 information about the available frequencies into a format readily
321 providable to cpufreq.
322
323 WARNING: Do not use this function in interrupt context.
324
325 Example:
326 soc_pm_init()
327 {
328 /* Do things */
329 r = dev_pm_opp_init_cpufreq_table(dev, &freq_table);
330 if (!r)
331 cpufreq_frequency_table_cpuinfo(policy, freq_table);
332 /* Do other things */
333 }
334
335 NOTE: This function is available only if CONFIG_CPU_FREQ is enabled in
336 addition to CONFIG_PM as power management feature is required to
337 dynamically scale voltage and frequency in a system.
338
339dev_pm_opp_free_cpufreq_table - Free up the table allocated by dev_pm_opp_init_cpufreq_table
340
3417. Data Structures
342================== 312==================
343Typically an SoC contains multiple voltage domains which are variable. Each 313Typically an SoC contains multiple voltage domains which are variable. Each
344domain is represented by a device pointer. The relationship to OPP can be 314domain is represented by a device pointer. The relationship to OPP can be
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index 5f96daf8566a..f32ce5419573 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -2,6 +2,7 @@ Runtime Power Management Framework for I/O Devices
2 2
3(C) 2009-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc. 3(C) 2009-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc.
4(C) 2010 Alan Stern <stern@rowland.harvard.edu> 4(C) 2010 Alan Stern <stern@rowland.harvard.edu>
5(C) 2014 Intel Corp., Rafael J. Wysocki <rafael.j.wysocki@intel.com>
5 6
61. Introduction 71. Introduction
7 8
@@ -444,6 +445,10 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
444 bool pm_runtime_status_suspended(struct device *dev); 445 bool pm_runtime_status_suspended(struct device *dev);
445 - return true if the device's runtime PM status is 'suspended' 446 - return true if the device's runtime PM status is 'suspended'
446 447
448 bool pm_runtime_suspended_if_enabled(struct device *dev);
449 - return true if the device's runtime PM status is 'suspended' and its
450 'power.disable_depth' field is equal to 1
451
447 void pm_runtime_allow(struct device *dev); 452 void pm_runtime_allow(struct device *dev);
448 - set the power.runtime_auto flag for the device and decrease its usage 453 - set the power.runtime_auto flag for the device and decrease its usage
449 counter (used by the /sys/devices/.../power/control interface to 454 counter (used by the /sys/devices/.../power/control interface to
@@ -644,19 +649,33 @@ place (in particular, if the system is not waking up from hibernation), it may
644be more efficient to leave the devices that had been suspended before the system 649be more efficient to leave the devices that had been suspended before the system
645suspend began in the suspended state. 650suspend began in the suspended state.
646 651
652To this end, the PM core provides a mechanism allowing some coordination between
653different levels of device hierarchy. Namely, if a system suspend .prepare()
654callback returns a positive number for a device, that indicates to the PM core
655that the device appears to be runtime-suspended and its state is fine, so it
656may be left in runtime suspend provided that all of its descendants are also
657left in runtime suspend. If that happens, the PM core will not execute any
658system suspend and resume callbacks for all of those devices, except for the
659complete callback, which is then entirely responsible for handling the device
660as appropriate. This only applies to system suspend transitions that are not
661related to hibernation (see Documentation/power/devices.txt for more
662information).
663
647The PM core does its best to reduce the probability of race conditions between 664The PM core does its best to reduce the probability of race conditions between
648the runtime PM and system suspend/resume (and hibernation) callbacks by carrying 665the runtime PM and system suspend/resume (and hibernation) callbacks by carrying
649out the following operations: 666out the following operations:
650 667
651 * During system suspend it calls pm_runtime_get_noresume() and 668 * During system suspend pm_runtime_get_noresume() is called for every device
652 pm_runtime_barrier() for every device right before executing the 669 right before executing the subsystem-level .prepare() callback for it and
653 subsystem-level .suspend() callback for it. In addition to that it calls 670 pm_runtime_barrier() is called for every device right before executing the
654 __pm_runtime_disable() with 'false' as the second argument for every device 671 subsystem-level .suspend() callback for it. In addition to that the PM core
655 right before executing the subsystem-level .suspend_late() callback for it. 672 calls __pm_runtime_disable() with 'false' as the second argument for every
656 673 device right before executing the subsystem-level .suspend_late() callback
657 * During system resume it calls pm_runtime_enable() and pm_runtime_put() 674 for it.
658 for every device right after executing the subsystem-level .resume_early() 675
659 callback and right after executing the subsystem-level .resume() callback 676 * During system resume pm_runtime_enable() and pm_runtime_put() are called for
677 every device right after executing the subsystem-level .resume_early()
678 callback and right after executing the subsystem-level .complete() callback
660 for it, respectively. 679 for it, respectively.
661 680
6627. Generic subsystem callbacks 6817. Generic subsystem callbacks
diff --git a/Documentation/power/states.txt b/Documentation/power/states.txt
index 442d43df9b25..50f3ef9177c1 100644
--- a/Documentation/power/states.txt
+++ b/Documentation/power/states.txt
@@ -1,62 +1,87 @@
1System Power Management Sleep States
1 2
2System Power Management States 3(C) 2014 Intel Corp., Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3 4
5The kernel supports up to four system sleep states generically, although three
6of them depend on the platform support code to implement the low-level details
7for each state.
4 8
5The kernel supports four power management states generically, though 9The states are represented by strings that can be read or written to the
6one is generic and the other three are dependent on platform support 10/sys/power/state file. Those strings may be "mem", "standby", "freeze" and
7code to implement the low-level details for each state. 11"disk", where the last one always represents hibernation (Suspend-To-Disk) and
8This file describes each state, what they are 12the meaning of the remaining ones depends on the relative_sleep_states command
9commonly called, what ACPI state they map to, and what string to write 13line argument.
10to /sys/power/state to enter that state
11 14
12state: Freeze / Low-Power Idle 15For relative_sleep_states=1, the strings "mem", "standby" and "freeze" label the
16available non-hibernation sleep states from the deepest to the shallowest,
17respectively. In that case, "mem" is always present in /sys/power/state,
18because there is at least one non-hibernation sleep state in every system. If
19the given system supports two non-hibernation sleep states, "standby" is present
20in /sys/power/state in addition to "mem". If the system supports three
21non-hibernation sleep states, "freeze" will be present in /sys/power/state in
22addition to "mem" and "standby".
23
24For relative_sleep_states=0, which is the default, the following descriptions
25apply.
26
27state: Suspend-To-Idle
13ACPI state: S0 28ACPI state: S0
14String: "freeze" 29Label: "freeze"
15 30
16This state is a generic, pure software, light-weight, low-power state. 31This state is a generic, pure software, light-weight, system sleep state.
17It allows more energy to be saved relative to idle by freezing user 32It allows more energy to be saved relative to runtime idle by freezing user
18space and putting all I/O devices into low-power states (possibly 33space and putting all I/O devices into low-power states (possibly
19lower-power than available at run time), such that the processors can 34lower-power than available at run time), such that the processors can
20spend more time in their idle states. 35spend more time in their idle states.
21This state can be used for platforms without Standby/Suspend-to-RAM 36
37This state can be used for platforms without Power-On Suspend/Suspend-to-RAM
22support, or it can be used in addition to Suspend-to-RAM (memory sleep) 38support, or it can be used in addition to Suspend-to-RAM (memory sleep)
23to provide reduced resume latency. 39to provide reduced resume latency. It is always supported.
24 40
25 41
26State: Standby / Power-On Suspend 42State: Standby / Power-On Suspend
27ACPI State: S1 43ACPI State: S1
28String: "standby" 44Label: "standby"
29 45
30This state offers minimal, though real, power savings, while providing 46This state, if supported, offers moderate, though real, power savings, while
31a very low-latency transition back to a working system. No operating 47providing a relatively low-latency transition back to a working system. No
32state is lost (the CPU retains power), so the system easily starts up 48operating state is lost (the CPU retains power), so the system easily starts up
33again where it left off. 49again where it left off.
34 50
35We try to put devices in a low-power state equivalent to D1, which 51In addition to freezing user space and putting all I/O devices into low-power
36also offers low power savings, but low resume latency. Not all devices 52states, which is done for Suspend-To-Idle too, nonboot CPUs are taken offline
37support D1, and those that don't are left on. 53and all low-level system functions are suspended during transitions into this
54state. For this reason, it should allow more energy to be saved relative to
55Suspend-To-Idle, but the resume latency will generally be greater than for that
56state.
38 57
39 58
40State: Suspend-to-RAM 59State: Suspend-to-RAM
41ACPI State: S3 60ACPI State: S3
42String: "mem" 61Label: "mem"
43 62
44This state offers significant power savings as everything in the 63This state, if supported, offers significant power savings as everything in the
45system is put into a low-power state, except for memory, which is 64system is put into a low-power state, except for memory, which should be placed
46placed in self-refresh mode to retain its contents. 65into the self-refresh mode to retain its contents. All of the steps carried out
66when entering Power-On Suspend are also carried out during transitions to STR.
67Additional operations may take place depending on the platform capabilities. In
68particular, on ACPI systems the kernel passes control to the BIOS (platform
69firmware) as the last step during STR transitions and that usually results in
70powering down some more low-level components that aren't directly controlled by
71the kernel.
47 72
48System and device state is saved and kept in memory. All devices are 73System and device state is saved and kept in memory. All devices are suspended
49suspended and put into D3. In many cases, all peripheral buses lose 74and put into low-power states. In many cases, all peripheral buses lose power
50power when entering STR, so devices must be able to handle the 75when entering STR, so devices must be able to handle the transition back to the
51transition back to the On state. 76"on" state.
52 77
53For at least ACPI, STR requires some minimal boot-strapping code to 78For at least ACPI, STR requires some minimal boot-strapping code to resume the
54resume the system from STR. This may be true on other platforms. 79system from it. This may be the case on other platforms too.
55 80
56 81
57State: Suspend-to-disk 82State: Suspend-to-disk
58ACPI State: S4 83ACPI State: S4
59String: "disk" 84Label: "disk"
60 85
61This state offers the greatest power savings, and can be used even in 86This state offers the greatest power savings, and can be used even in
62the absence of low-level platform support for power management. This 87the absence of low-level platform support for power management. This
diff --git a/Documentation/power/suspend-and-cpuhotplug.txt b/Documentation/power/suspend-and-cpuhotplug.txt
index e13dafc8e8f1..2850df3bf957 100644
--- a/Documentation/power/suspend-and-cpuhotplug.txt
+++ b/Documentation/power/suspend-and-cpuhotplug.txt
@@ -1,6 +1,6 @@
1Interaction of Suspend code (S3) with the CPU hotplug infrastructure 1Interaction of Suspend code (S3) with the CPU hotplug infrastructure
2 2
3 (C) 2011 Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> 3 (C) 2011 - 2014 Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
4 4
5 5
6I. How does the regular CPU hotplug code differ from how the Suspend-to-RAM 6I. How does the regular CPU hotplug code differ from how the Suspend-to-RAM
diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt
index 079160e22bcc..f732a8321e8a 100644
--- a/Documentation/power/swsusp.txt
+++ b/Documentation/power/swsusp.txt
@@ -220,7 +220,10 @@ Q: After resuming, system is paging heavily, leading to very bad interactivity.
220 220
221A: Try running 221A: Try running
222 222
223cat `cat /proc/[0-9]*/maps | grep / | sed 's:.* /:/:' | sort -u` > /dev/null 223cat /proc/[0-9]*/maps | grep / | sed 's:.* /:/:' | sort -u | while read file
224do
225 test -f "$file" && cat "$file" > /dev/null
226done
224 227
225after resume. swapoff -a; swapon -a may also be useful. 228after resume. swapoff -a; swapon -a may also be useful.
226 229
diff --git a/Documentation/powerpc/cpu_families.txt b/Documentation/powerpc/cpu_families.txt
new file mode 100644
index 000000000000..fc08e22feb1a
--- /dev/null
+++ b/Documentation/powerpc/cpu_families.txt
@@ -0,0 +1,221 @@
1CPU Families
2============
3
4This document tries to summarise some of the different cpu families that exist
5and are supported by arch/powerpc.
6
7
8Book3S (aka sPAPR)
9------------------
10
11 - Hash MMU
12 - Mix of 32 & 64 bit
13
14 +--------------+ +----------------+
15 | Old POWER | --------------> | RS64 (threads) |
16 +--------------+ +----------------+
17 |
18 |
19 v
20 +--------------+ +----------------+ +------+
21 | 601 | --------------> | 603 | ---> | e300 |
22 +--------------+ +----------------+ +------+
23 | |
24 | |
25 v v
26 +--------------+ +----------------+ +-------+
27 | 604 | | 750 (G3) | ---> | 750CX |
28 +--------------+ +----------------+ +-------+
29 | | |
30 | | |
31 v v v
32 +--------------+ +----------------+ +-------+
33 | 620 (64 bit) | | 7400 | | 750CL |
34 +--------------+ +----------------+ +-------+
35 | | |
36 | | |
37 v v v
38 +--------------+ +----------------+ +-------+
39 | POWER3/630 | | 7410 | | 750FX |
40 +--------------+ +----------------+ +-------+
41 | |
42 | |
43 v v
44 +--------------+ +----------------+
45 | POWER3+ | | 7450 |
46 +--------------+ +----------------+
47 | |
48 | |
49 v v
50 +--------------+ +----------------+
51 | POWER4 | | 7455 |
52 +--------------+ +----------------+
53 | |
54 | |
55 v v
56 +--------------+ +-------+ +----------------+
57 | POWER4+ | --> | 970 | | 7447 |
58 +--------------+ +-------+ +----------------+
59 | | |
60 | | |
61 v v v
62 +--------------+ +-------+ +----------------+
63 | POWER5 | | 970FX | | 7448 |
64 +--------------+ +-------+ +----------------+
65 | | |
66 | | |
67 v v v
68 +--------------+ +-------+ +----------------+
69 | POWER5+ | | 970MP | | e600 |
70 +--------------+ +-------+ +----------------+
71 |
72 |
73 v
74 +--------------+
75 | POWER5++ |
76 +--------------+
77 |
78 |
79 v
80 +--------------+ +-------+
81 | POWER6 | <-?-> | Cell |
82 +--------------+ +-------+
83 |
84 |
85 v
86 +--------------+
87 | POWER7 |
88 +--------------+
89 |
90 |
91 v
92 +--------------+
93 | POWER7+ |
94 +--------------+
95 |
96 |
97 v
98 +--------------+
99 | POWER8 |
100 +--------------+
101
102
103 +---------------+
104 | PA6T (64 bit) |
105 +---------------+
106
107
108IBM BookE
109---------
110
111 - Software loaded TLB.
112 - All 32 bit
113
114 +--------------+
115 | 401 |
116 +--------------+
117 |
118 |
119 v
120 +--------------+
121 | 403 |
122 +--------------+
123 |
124 |
125 v
126 +--------------+
127 | 405 |
128 +--------------+
129 |
130 |
131 v
132 +--------------+
133 | 440 |
134 +--------------+
135 |
136 |
137 v
138 +--------------+ +----------------+
139 | 450 | --> | BG/P |
140 +--------------+ +----------------+
141 |
142 |
143 v
144 +--------------+
145 | 460 |
146 +--------------+
147 |
148 |
149 v
150 +--------------+
151 | 476 |
152 +--------------+
153
154
155Motorola/Freescale 8xx
156----------------------
157
158 - Software loaded with hardware assist.
159 - All 32 bit
160
161 +-------------+
162 | MPC8xx Core |
163 +-------------+
164
165
166Freescale BookE
167---------------
168
169 - Software loaded TLB.
170 - e6500 adds HW loaded indirect TLB entries.
171 - Mix of 32 & 64 bit
172
173 +--------------+
174 | e200 |
175 +--------------+
176
177
178 +--------------------------------+
179 | e500 |
180 +--------------------------------+
181 |
182 |
183 v
184 +--------------------------------+
185 | e500v2 |
186 +--------------------------------+
187 |
188 |
189 v
190 +--------------------------------+
191 | e500mc (Book3e) |
192 +--------------------------------+
193 |
194 |
195 v
196 +--------------------------------+
197 | e5500 (64 bit) |
198 +--------------------------------+
199 |
200 |
201 v
202 +--------------------------------+
203 | e6500 (HW TLB) (Multithreaded) |
204 +--------------------------------+
205
206
207IBM A2 core
208-----------
209
210 - Book3E, software loaded TLB + HW loaded indirect TLB entries.
211 - 64 bit
212
213 +--------------+ +----------------+
214 | A2 core | --> | WSP |
215 +--------------+ +----------------+
216 |
217 |
218 v
219 +--------------+
220 | BG/Q |
221 +--------------+
diff --git a/Documentation/powerpc/transactional_memory.txt b/Documentation/powerpc/transactional_memory.txt
index dc23e58ae264..9791e98ab49c 100644
--- a/Documentation/powerpc/transactional_memory.txt
+++ b/Documentation/powerpc/transactional_memory.txt
@@ -160,7 +160,7 @@ To avoid this, when taking a signal in an active transaction, we need to use
160the stack pointer from the checkpointed state, rather than the speculated 160the stack pointer from the checkpointed state, rather than the speculated
161state. This ensures that the signal context (written tm suspended) will be 161state. This ensures that the signal context (written tm suspended) will be
162written below the stack required for the rollback. The transaction is aborted 162written below the stack required for the rollback. The transaction is aborted
163becuase of the treclaim, so any memory written between the tbegin and the 163because of the treclaim, so any memory written between the tbegin and the
164signal will be rolled back anyway. 164signal will be rolled back anyway.
165 165
166For signals taken in non-TM or suspended mode, we use the 166For signals taken in non-TM or suspended mode, we use the
diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt
index 6f4eb322ffaf..b4498218c474 100644
--- a/Documentation/printk-formats.txt
+++ b/Documentation/printk-formats.txt
@@ -199,11 +199,11 @@ struct va_format:
199 Do not use this feature without some mechanism to verify the 199 Do not use this feature without some mechanism to verify the
200 correctness of the format string and va_list arguments. 200 correctness of the format string and va_list arguments.
201 201
202u64 SHOULD be printed with %llu/%llx, (unsigned long long): 202u64 SHOULD be printed with %llu/%llx:
203 203
204 printk("%llu", u64_var); 204 printk("%llu", u64_var);
205 205
206s64 SHOULD be printed with %lld/%llx, (long long): 206s64 SHOULD be printed with %lld/%llx:
207 207
208 printk("%lld", s64_var); 208 printk("%lld", s64_var);
209 209
diff --git a/Documentation/ptp/testptp.c b/Documentation/ptp/testptp.c
index f1ac2dae999e..ba1d50200c46 100644
--- a/Documentation/ptp/testptp.c
+++ b/Documentation/ptp/testptp.c
@@ -17,6 +17,7 @@
17 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */ 19 */
20#define _GNU_SOURCE
20#include <errno.h> 21#include <errno.h>
21#include <fcntl.h> 22#include <fcntl.h>
22#include <inttypes.h> 23#include <inttypes.h>
@@ -46,12 +47,14 @@
46#define CLOCK_INVALID -1 47#define CLOCK_INVALID -1
47#endif 48#endif
48 49
49/* When glibc offers the syscall, this will go away. */ 50/* clock_adjtime is not available in GLIBC < 2.14 */
51#if !__GLIBC_PREREQ(2, 14)
50#include <sys/syscall.h> 52#include <sys/syscall.h>
51static int clock_adjtime(clockid_t id, struct timex *tx) 53static int clock_adjtime(clockid_t id, struct timex *tx)
52{ 54{
53 return syscall(__NR_clock_adjtime, id, tx); 55 return syscall(__NR_clock_adjtime, id, tx);
54} 56}
57#endif
55 58
56static clockid_t get_clockid(int fd) 59static clockid_t get_clockid(int fd)
57{ 60{
diff --git a/Documentation/pwm.txt b/Documentation/pwm.txt
index 93cb97974986..ca895fd211e4 100644
--- a/Documentation/pwm.txt
+++ b/Documentation/pwm.txt
@@ -19,7 +19,8 @@ should instead register a static mapping that can be used to match PWM
19consumers to providers, as given in the following example: 19consumers to providers, as given in the following example:
20 20
21 static struct pwm_lookup board_pwm_lookup[] = { 21 static struct pwm_lookup board_pwm_lookup[] = {
22 PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL), 22 PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL,
23 50000, PWM_POLARITY_NORMAL),
23 }; 24 };
24 25
25 static void __init board_init(void) 26 static void __init board_init(void)
@@ -97,6 +98,13 @@ pwm_chip as argument which provides a description of the PWM chip, the
97number of PWM devices provided by the chip and the chip-specific 98number of PWM devices provided by the chip and the chip-specific
98implementation of the supported PWM operations to the framework. 99implementation of the supported PWM operations to the framework.
99 100
101When implementing polarity support in a PWM driver, make sure to respect the
102signal conventions in the PWM framework. By definition, normal polarity
103characterizes a signal starts high for the duration of the duty cycle and
104goes low for the remainder of the period. Conversely, a signal with inversed
105polarity starts low for the duration of the duty cycle and goes high for the
106remainder of the period.
107
100Locking 108Locking
101------- 109-------
102 110
diff --git a/Documentation/rbtree.txt b/Documentation/rbtree.txt
index 61b6c48871a0..39873ef41bf9 100644
--- a/Documentation/rbtree.txt
+++ b/Documentation/rbtree.txt
@@ -255,7 +255,7 @@ However, rbtree can be augmented to store such interval ranges in a structured
255way making it possible to do efficient lookup and exact match. 255way making it possible to do efficient lookup and exact match.
256 256
257This "extra information" stored in each node is the maximum hi 257This "extra information" stored in each node is the maximum hi
258(max_hi) value among all the nodes that are its descendents. This 258(max_hi) value among all the nodes that are its descendants. This
259information can be maintained at each node just be looking at the node 259information can be maintained at each node just be looking at the node
260and its immediate children. And this will be used in O(log n) lookup 260and its immediate children. And this will be used in O(log n) lookup
261for lowest match (lowest start address among all possible matches) 261for lowest match (lowest start address among all possible matches)
diff --git a/Documentation/rfkill.txt b/Documentation/rfkill.txt
index f430004df73c..427e89712f4a 100644
--- a/Documentation/rfkill.txt
+++ b/Documentation/rfkill.txt
@@ -21,7 +21,7 @@ aircraft.
21The rfkill subsystem has a concept of "hard" and "soft" block, which 21The rfkill subsystem has a concept of "hard" and "soft" block, which
22differ little in their meaning (block == transmitters off) but rather in 22differ little in their meaning (block == transmitters off) but rather in
23whether they can be changed or not: 23whether they can be changed or not:
24 - hard block: read-only radio block that cannot be overriden by software 24 - hard block: read-only radio block that cannot be overridden by software
25 - soft block: writable radio block (need not be readable) that is set by 25 - soft block: writable radio block (need not be readable) that is set by
26 the system software. 26 the system software.
27 27
diff --git a/Documentation/robust-futexes.txt b/Documentation/robust-futexes.txt
index 0a9446a53bd1..af6fce23e484 100644
--- a/Documentation/robust-futexes.txt
+++ b/Documentation/robust-futexes.txt
@@ -210,7 +210,7 @@ i386 and x86_64 syscalls are wired up at the moment, and Ulrich has
210tested the new glibc code (on x86_64 and i386), and it works for his 210tested the new glibc code (on x86_64 and i386), and it works for his
211robust-mutex testcases. 211robust-mutex testcases.
212 212
213All other architectures should build just fine too - but they wont have 213All other architectures should build just fine too - but they won't have
214the new syscalls yet. 214the new syscalls yet.
215 215
216Architectures need to implement the new futex_atomic_cmpxchg_inatomic() 216Architectures need to implement the new futex_atomic_cmpxchg_inatomic()
diff --git a/Documentation/s390/monreader.txt b/Documentation/s390/monreader.txt
index beeaa4b24427..d3729585fdb0 100644
--- a/Documentation/s390/monreader.txt
+++ b/Documentation/s390/monreader.txt
@@ -10,7 +10,7 @@ Author: Gerald Schaefer (geraldsc@de.ibm.com)
10Description 10Description
11=========== 11===========
12This item delivers a new Linux API in the form of a misc char device that is 12This item delivers a new Linux API in the form of a misc char device that is
13useable from user space and allows read access to the z/VM Monitor Records 13usable from user space and allows read access to the z/VM Monitor Records
14collected by the *MONITOR System Service of z/VM. 14collected by the *MONITOR System Service of z/VM.
15 15
16 16
diff --git a/Documentation/s390/zfcpdump.txt b/Documentation/s390/zfcpdump.txt
index cf45d27c4608..dc929be96016 100644
--- a/Documentation/s390/zfcpdump.txt
+++ b/Documentation/s390/zfcpdump.txt
@@ -1,15 +1,15 @@
1s390 SCSI dump tool (zfcpdump) 1The s390 SCSI dump tool (zfcpdump)
2 2
3System z machines (z900 or higher) provide hardware support for creating system 3System z machines (z900 or higher) provide hardware support for creating system
4dumps on SCSI disks. The dump process is initiated by booting a dump tool, which 4dumps on SCSI disks. The dump process is initiated by booting a dump tool, which
5has to create a dump of the current (probably crashed) Linux image. In order to 5has to create a dump of the current (probably crashed) Linux image. In order to
6not overwrite memory of the crashed Linux with data of the dump tool, the 6not overwrite memory of the crashed Linux with data of the dump tool, the
7hardware saves some memory plus the register sets of the boot cpu before the 7hardware saves some memory plus the register sets of the boot CPU before the
8dump tool is loaded. There exists an SCLP hardware interface to obtain the saved 8dump tool is loaded. There exists an SCLP hardware interface to obtain the saved
9memory afterwards. Currently 32 MB are saved. 9memory afterwards. Currently 32 MB are saved.
10 10
11This zfcpdump implementation consists of a Linux dump kernel together with 11This zfcpdump implementation consists of a Linux dump kernel together with
12a userspace dump tool, which are loaded together into the saved memory region 12a user space dump tool, which are loaded together into the saved memory region
13below 32 MB. zfcpdump is installed on a SCSI disk using zipl (as contained in 13below 32 MB. zfcpdump is installed on a SCSI disk using zipl (as contained in
14the s390-tools package) to make the device bootable. The operator of a Linux 14the s390-tools package) to make the device bootable. The operator of a Linux
15system can then trigger a SCSI dump by booting the SCSI disk, where zfcpdump 15system can then trigger a SCSI dump by booting the SCSI disk, where zfcpdump
@@ -19,68 +19,33 @@ The kernel part of zfcpdump is implemented as a debugfs file under "zcore/mem",
19which exports memory and registers of the crashed Linux in an s390 19which exports memory and registers of the crashed Linux in an s390
20standalone dump format. It can be used in the same way as e.g. /dev/mem. The 20standalone dump format. It can be used in the same way as e.g. /dev/mem. The
21dump format defines a 4K header followed by plain uncompressed memory. The 21dump format defines a 4K header followed by plain uncompressed memory. The
22register sets are stored in the prefix pages of the respective cpus. To build a 22register sets are stored in the prefix pages of the respective CPUs. To build a
23dump enabled kernel with the zcore driver, the kernel config option 23dump enabled kernel with the zcore driver, the kernel config option
24CONFIG_ZFCPDUMP has to be set. When reading from "zcore/mem", the part of 24CONFIG_CRASH_DUMP has to be set. When reading from "zcore/mem", the part of
25memory, which has been saved by hardware is read by the driver via the SCLP 25memory, which has been saved by hardware is read by the driver via the SCLP
26hardware interface. The second part is just copied from the non overwritten real 26hardware interface. The second part is just copied from the non overwritten real
27memory. 27memory.
28 28
29The userspace application of zfcpdump can reside e.g. in an intitramfs or an 29Since kernel version 3.12 also the /proc/vmcore file can also be used to access
30initrd. It reads from zcore/mem and writes the system dump to a file on a 30the dump.
31SCSI disk.
32 31
33To build a zfcpdump kernel use the following settings in your kernel 32To get a valid zfcpdump kernel configuration use "make zfcpdump_defconfig".
34configuration:
35 * CONFIG_ZFCPDUMP=y
36 * Enable ZFCP driver
37 * Enable SCSI driver
38 * Enable ext2 and ext3 filesystems
39 * Disable as many features as possible to keep the kernel small.
40 E.g. network support is not needed at all.
41 33
42To use the zfcpdump userspace application in an initramfs you have to do the 34The s390 zipl tool looks for the zfcpdump kernel and optional initrd/initramfs
43following: 35under the following locations:
44 36
45 * Copy the zfcpdump executable somewhere into your Linux tree. 37* kernel: <zfcpdump directory>/zfcpdump.image
46 E.g. to "arch/s390/boot/zfcpdump. If you do not want to include 38* ramdisk: <zfcpdump directory>/zfcpdump.rd
47 shared libraries, compile the tool with the "-static" gcc option.
48 * If you want to include e2fsck, add it to your source tree, too. The zfcpdump
49 application attempts to start /sbin/e2fsck from the ramdisk.
50 * Use an initramfs config file like the following:
51 39
52 dir /dev 755 0 0 40The zfcpdump directory is defined in the s390-tools package.
53 nod /dev/console 644 0 0 c 5 1
54 nod /dev/null 644 0 0 c 1 3
55 nod /dev/sda1 644 0 0 b 8 1
56 nod /dev/sda2 644 0 0 b 8 2
57 nod /dev/sda3 644 0 0 b 8 3
58 nod /dev/sda4 644 0 0 b 8 4
59 nod /dev/sda5 644 0 0 b 8 5
60 nod /dev/sda6 644 0 0 b 8 6
61 nod /dev/sda7 644 0 0 b 8 7
62 nod /dev/sda8 644 0 0 b 8 8
63 nod /dev/sda9 644 0 0 b 8 9
64 nod /dev/sda10 644 0 0 b 8 10
65 nod /dev/sda11 644 0 0 b 8 11
66 nod /dev/sda12 644 0 0 b 8 12
67 nod /dev/sda13 644 0 0 b 8 13
68 nod /dev/sda14 644 0 0 b 8 14
69 nod /dev/sda15 644 0 0 b 8 15
70 file /init arch/s390/boot/zfcpdump 755 0 0
71 file /sbin/e2fsck arch/s390/boot/e2fsck 755 0 0
72 dir /proc 755 0 0
73 dir /sys 755 0 0
74 dir /mnt 755 0 0
75 dir /sbin 755 0 0
76 41
77 * Issue "make image" to build the zfcpdump image with initramfs. 42The user space application of zfcpdump can reside in an intitramfs or an
43initrd. It can also be included in a built-in kernel initramfs. The application
44reads from /proc/vmcore or zcore/mem and writes the system dump to a SCSI disk.
78 45
79In a Linux distribution the zfcpdump enabled kernel image must be copied to 46The s390-tools package version 1.24.0 and above builds an external zfcpdump
80/usr/share/zfcpdump/zfcpdump.image, where the s390 zipl tool is looking for the 47initramfs with a user space application that writes the dump to a SCSI
81dump kernel when preparing a SCSI dump disk. 48partition.
82
83If you use a ramdisk copy it to "/usr/share/zfcpdump/zfcpdump.rd".
84 49
85For more information on how to use zfcpdump refer to the s390 'Using the Dump 50For more information on how to use zfcpdump refer to the s390 'Using the Dump
86Tools book', which is available from 51Tools book', which is available from
diff --git a/Documentation/scsi/LICENSE.qla2xxx b/Documentation/scsi/LICENSE.qla2xxx
index 5020b7b5a244..52f0b4359234 100644
--- a/Documentation/scsi/LICENSE.qla2xxx
+++ b/Documentation/scsi/LICENSE.qla2xxx
@@ -1,4 +1,4 @@
1Copyright (c) 2003-2013 QLogic Corporation 1Copyright (c) 2003-2014 QLogic Corporation
2QLogic Linux FC-FCoE Driver 2QLogic Linux FC-FCoE Driver
3 3
4This program includes a device driver for Linux 3.x. 4This program includes a device driver for Linux 3.x.
diff --git a/Documentation/security/Smack.txt b/Documentation/security/Smack.txt
index 5ea996f21d6c..b6ef7e9dba30 100644
--- a/Documentation/security/Smack.txt
+++ b/Documentation/security/Smack.txt
@@ -204,6 +204,16 @@ onlycap
204 these capabilities are effective at for processes with any 204 these capabilities are effective at for processes with any
205 label. The value is set by writing the desired label to the 205 label. The value is set by writing the desired label to the
206 file or cleared by writing "-" to the file. 206 file or cleared by writing "-" to the file.
207ptrace
208 This is used to define the current ptrace policy
209 0 - default: this is the policy that relies on smack access rules.
210 For the PTRACE_READ a subject needs to have a read access on
211 object. For the PTRACE_ATTACH a read-write access is required.
212 1 - exact: this is the policy that limits PTRACE_ATTACH. Attach is
213 only allowed when subject's and object's labels are equal.
214 PTRACE_READ is not affected. Can be overriden with CAP_SYS_PTRACE.
215 2 - draconian: this policy behaves like the 'exact' above with an
216 exception that it can't be overriden with CAP_SYS_PTRACE.
207revoke-subject 217revoke-subject
208 Writing a Smack label here sets the access to '-' for all access 218 Writing a Smack label here sets the access to '-' for all access
209 rules with that subject label. 219 rules with that subject label.
diff --git a/Documentation/security/Yama.txt b/Documentation/security/Yama.txt
index dd908cf64ecf..227a63f018a2 100644
--- a/Documentation/security/Yama.txt
+++ b/Documentation/security/Yama.txt
@@ -37,7 +37,7 @@ still work as root).
37In mode 1, software that has defined application-specific relationships 37In mode 1, software that has defined application-specific relationships
38between a debugging process and its inferior (crash handlers, etc), 38between a debugging process and its inferior (crash handlers, etc),
39prctl(PR_SET_PTRACER, pid, ...) can be used. An inferior can declare which 39prctl(PR_SET_PTRACER, pid, ...) can be used. An inferior can declare which
40other process (and its descendents) are allowed to call PTRACE_ATTACH 40other process (and its descendants) are allowed to call PTRACE_ATTACH
41against it. Only one such declared debugging process can exists for 41against it. Only one such declared debugging process can exists for
42each inferior at a time. For example, this is used by KDE, Chromium, and 42each inferior at a time. For example, this is used by KDE, Chromium, and
43Firefox's crash handlers, and by Wine for allowing only Wine processes 43Firefox's crash handlers, and by Wine for allowing only Wine processes
diff --git a/Documentation/serial/driver b/Documentation/serial/driver
index c3a7689a90e6..3bba1aeb799c 100644
--- a/Documentation/serial/driver
+++ b/Documentation/serial/driver
@@ -429,3 +429,28 @@ thus:
429 struct uart_port port; 429 struct uart_port port;
430 int my_stuff; 430 int my_stuff;
431 }; 431 };
432
433Modem control lines via GPIO
434----------------------------
435
436Some helpers are provided in order to set/get modem control lines via GPIO.
437
438mctrl_gpio_init(dev, idx):
439 This will get the {cts,rts,...}-gpios from device tree if they are
440 present and request them, set direction etc, and return an
441 allocated structure. devm_* functions are used, so there's no need
442 to call mctrl_gpio_free().
443
444mctrl_gpio_free(dev, gpios):
445 This will free the requested gpios in mctrl_gpio_init().
446 As devm_* function are used, there's generally no need to call
447 this function.
448
449mctrl_gpio_to_gpiod(gpios, gidx)
450 This returns the gpio structure associated to the modem line index.
451
452mctrl_gpio_set(gpios, mctrl):
453 This will sets the gpios according to the mctrl state.
454
455mctrl_gpio_get(gpios, mctrl):
456 This will update mctrl with the gpios values.
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index b8dd0df76952..7ccf933bfbe0 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -948,7 +948,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
948 avoided as much as possible... 948 avoided as much as possible...
949 949
950 MORE NOTES ON "azx_get_response timeout" PROBLEMS: 950 MORE NOTES ON "azx_get_response timeout" PROBLEMS:
951 On some hardwares, you may need to add a proper probe_mask option 951 On some hardware, you may need to add a proper probe_mask option
952 to avoid the "azx_get_response timeout" problem above, instead. 952 to avoid the "azx_get_response timeout" problem above, instead.
953 This occurs when the access to non-existing or non-working codec slot 953 This occurs when the access to non-existing or non-working codec slot
954 (likely a modem one) causes a stall of the communication via HD-audio 954 (likely a modem one) causes a stall of the communication via HD-audio
@@ -1124,7 +1124,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
1124 buggy_irq - Enable workaround for buggy interrupts on some 1124 buggy_irq - Enable workaround for buggy interrupts on some
1125 motherboards (default yes on nForce chips, 1125 motherboards (default yes on nForce chips,
1126 otherwise off) 1126 otherwise off)
1127 buggy_semaphore - Enable workaround for hardwares with buggy 1127 buggy_semaphore - Enable workaround for hardware with buggy
1128 semaphores (e.g. on some ASUS laptops) 1128 semaphores (e.g. on some ASUS laptops)
1129 (default off) 1129 (default off)
1130 spdif_aclink - Use S/PDIF over AC-link instead of direct connection 1130 spdif_aclink - Use S/PDIF over AC-link instead of direct connection
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index 85c362d8ea34..d1ab5e17eb13 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -286,6 +286,11 @@ STAC92HD83*
286 hp-inv-led HP with broken BIOS for inverted mute LED 286 hp-inv-led HP with broken BIOS for inverted mute LED
287 auto BIOS setup (default) 287 auto BIOS setup (default)
288 288
289STAC92HD95
290==========
291 hp-led LED support for HP laptops
292 hp-bass Bass HPF setup for HP Spectre 13
293
289STAC9872 294STAC9872
290======== 295========
291 vaio VAIO laptop without SPDIF 296 vaio VAIO laptop without SPDIF
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index 9886c3d57fc2..c14374e71775 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -75,8 +75,10 @@ show up in /proc/sys/kernel:
75- shmall 75- shmall
76- shmmax [ sysv ipc ] 76- shmmax [ sysv ipc ]
77- shmmni 77- shmmni
78- softlockup_all_cpu_backtrace
78- stop-a [ SPARC only ] 79- stop-a [ SPARC only ]
79- sysrq ==> Documentation/sysrq.txt 80- sysrq ==> Documentation/sysrq.txt
81- sysctl_writes_strict
80- tainted 82- tainted
81- threads-max 83- threads-max
82- unknown_nmi_panic 84- unknown_nmi_panic
@@ -762,6 +764,42 @@ without users and with a dead originative process will be destroyed.
762 764
763============================================================== 765==============================================================
764 766
767sysctl_writes_strict:
768
769Control how file position affects the behavior of updating sysctl values
770via the /proc/sys interface:
771
772 -1 - Legacy per-write sysctl value handling, with no printk warnings.
773 Each write syscall must fully contain the sysctl value to be
774 written, and multiple writes on the same sysctl file descriptor
775 will rewrite the sysctl value, regardless of file position.
776 0 - (default) Same behavior as above, but warn about processes that
777 perform writes to a sysctl file descriptor when the file position
778 is not 0.
779 1 - Respect file position when writing sysctl strings. Multiple writes
780 will append to the sysctl value buffer. Anything past the max length
781 of the sysctl value buffer will be ignored. Writes to numeric sysctl
782 entries must always be at file position 0 and the value must be
783 fully contained in the buffer sent in the write syscall.
784
785==============================================================
786
787softlockup_all_cpu_backtrace:
788
789This value controls the soft lockup detector thread's behavior
790when a soft lockup condition is detected as to whether or not
791to gather further debug information. If enabled, each cpu will
792be issued an NMI and instructed to capture stack trace.
793
794This feature is only applicable for architectures which support
795NMI.
796
7970: do nothing. This is the default behavior.
798
7991: on detection capture more debug information.
800
801==============================================================
802
765tainted: 803tainted:
766 804
767Non-zero if the kernel has been tainted. Numeric values, which 805Non-zero if the kernel has been tainted. Numeric values, which
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index dd9d0e33b443..4415aa915681 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -702,7 +702,8 @@ The batch value of each per cpu pagelist is also updated as a result. It is
702set to pcp->high/4. The upper limit of batch is (PAGE_SHIFT * 8) 702set to pcp->high/4. The upper limit of batch is (PAGE_SHIFT * 8)
703 703
704The initial value is zero. Kernel does not use this value at boot time to set 704The initial value is zero. Kernel does not use this value at boot time to set
705the high water marks for each per cpu page list. 705the high water marks for each per cpu page list. If the user writes '0' to this
706sysctl, it will revert to this default behavior.
706 707
707============================================================== 708==============================================================
708 709
@@ -746,8 +747,8 @@ Changing this takes effect whenever an application requests memory.
746vfs_cache_pressure 747vfs_cache_pressure
747------------------ 748------------------
748 749
749Controls the tendency of the kernel to reclaim the memory which is used for 750This percentage value controls the tendency of the kernel to reclaim
750caching of directory and inode objects. 751the memory which is used for caching of directory and inode objects.
751 752
752At the default value of vfs_cache_pressure=100 the kernel will attempt to 753At the default value of vfs_cache_pressure=100 the kernel will attempt to
753reclaim dentries and inodes at a "fair" rate with respect to pagecache and 754reclaim dentries and inodes at a "fair" rate with respect to pagecache and
@@ -757,6 +758,11 @@ never reclaim dentries and inodes due to memory pressure and this can easily
757lead to out-of-memory conditions. Increasing vfs_cache_pressure beyond 100 758lead to out-of-memory conditions. Increasing vfs_cache_pressure beyond 100
758causes the kernel to prefer to reclaim dentries and inodes. 759causes the kernel to prefer to reclaim dentries and inodes.
759 760
761Increasing vfs_cache_pressure significantly beyond 100 may have negative
762performance impact. Reclaim code needs to take various locks to find freeable
763directory and inode objects. With vfs_cache_pressure=1000, it will look for
764ten times more freeable objects than there are.
765
760============================================================== 766==============================================================
761 767
762zone_reclaim_mode: 768zone_reclaim_mode:
@@ -772,16 +778,17 @@ This is value ORed together of
7722 = Zone reclaim writes dirty pages out 7782 = Zone reclaim writes dirty pages out
7734 = Zone reclaim swaps pages 7794 = Zone reclaim swaps pages
774 780
775zone_reclaim_mode is set during bootup to 1 if it is determined that pages 781zone_reclaim_mode is disabled by default. For file servers or workloads
776from remote zones will cause a measurable performance reduction. The 782that benefit from having their data cached, zone_reclaim_mode should be
777page allocator will then reclaim easily reusable pages (those page 783left disabled as the caching effect is likely to be more important than
778cache pages that are currently not used) before allocating off node pages.
779
780It may be beneficial to switch off zone reclaim if the system is
781used for a file server and all of memory should be used for caching files
782from disk. In that case the caching effect is more important than
783data locality. 784data locality.
784 785
786zone_reclaim may be enabled if it's known that the workload is partitioned
787such that each partition fits within a NUMA node and that accessing remote
788memory would cause a measurable performance reduction. The page allocator
789will then reclaim easily reusable pages (those page cache pages that are
790currently not used) before allocating off node pages.
791
785Allowing zone reclaim to write out pages stops processes that are 792Allowing zone reclaim to write out pages stops processes that are
786writing large amounts of data from dirtying pages on other nodes. Zone 793writing large amounts of data from dirtying pages on other nodes. Zone
787reclaim will write out dirty pages if a zone fills up and so effectively 794reclaim will write out dirty pages if a zone fills up and so effectively
diff --git a/Documentation/thermal/nouveau_thermal b/Documentation/thermal/nouveau_thermal
index efceb7828f54..60bc29357ac3 100644
--- a/Documentation/thermal/nouveau_thermal
+++ b/Documentation/thermal/nouveau_thermal
@@ -4,7 +4,7 @@ Kernel driver nouveau
4Supported chips: 4Supported chips:
5* NV43+ 5* NV43+
6 6
7Authors: Martin Peres (mupuf) <martin.peres@labri.fr> 7Authors: Martin Peres (mupuf) <martin.peres@free.fr>
8 8
9Description 9Description
10--------- 10---------
@@ -68,8 +68,9 @@ Your fan can be driven in different modes:
68 68
69NOTE: Be sure to use the manual mode if you want to drive the fan speed manually 69NOTE: Be sure to use the manual mode if you want to drive the fan speed manually
70 70
71NOTE2: Not all fan management modes may be supported on all chipsets. We are 71NOTE2: When operating in manual mode outside the vbios-defined
72working on it. 72[PWM_min, PWM_max] range, the reported fan speed (RPM) may not be accurate
73depending on your hardware.
73 74
74Bug reports 75Bug reports
75--------- 76---------
diff --git a/Documentation/timers/timer_stats.txt b/Documentation/timers/timer_stats.txt
index 8abd40b22b7f..de835ee97455 100644
--- a/Documentation/timers/timer_stats.txt
+++ b/Documentation/timers/timer_stats.txt
@@ -39,9 +39,9 @@ To stop a sample period issue:
39The statistics can be retrieved by: 39The statistics can be retrieved by:
40# cat /proc/timer_stats 40# cat /proc/timer_stats
41 41
42The readout of /proc/timer_stats automatically disables sampling. The sampled 42While sampling is enabled, each readout from /proc/timer_stats will see
43information is kept until a new sample period is started. This allows multiple 43newly updated statistics. Once sampling is disabled, the sampled information
44readouts. 44is kept until a new sample period is started. This allows multiple readouts.
45 45
46Sample output of /proc/timer_stats: 46Sample output of /proc/timer_stats:
47 47
diff --git a/Documentation/trace/events.txt b/Documentation/trace/events.txt
index c94435df2037..75d25a1d6e42 100644
--- a/Documentation/trace/events.txt
+++ b/Documentation/trace/events.txt
@@ -443,7 +443,7 @@ The following commands are supported:
443 The following command creates a snapshot every time a block request 443 The following command creates a snapshot every time a block request
444 queue is unplugged with a depth > 1. If you were tracing a set of 444 queue is unplugged with a depth > 1. If you were tracing a set of
445 events or functions at the time, the snapshot trace buffer would 445 events or functions at the time, the snapshot trace buffer would
446 capture those events when the trigger event occured: 446 capture those events when the trigger event occurred:
447 447
448 # echo 'snapshot if nr_rq > 1' > \ 448 # echo 'snapshot if nr_rq > 1' > \
449 /sys/kernel/debug/tracing/events/block/block_unplug/trigger 449 /sys/kernel/debug/tracing/events/block/block_unplug/trigger
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index bd365988e8d8..2479b2a0c77c 100644
--- a/Documentation/trace/ftrace.txt
+++ b/Documentation/trace/ftrace.txt
@@ -2003,6 +2003,32 @@ want, depending on your needs.
2003 360.774530 | 1) 0.594 us | __phys_addr(); 2003 360.774530 | 1) 0.594 us | __phys_addr();
2004 2004
2005 2005
2006The function name is always displayed after the closing bracket
2007for a function if the start of that function is not in the
2008trace buffer.
2009
2010Display of the function name after the closing bracket may be
2011enabled for functions whose start is in the trace buffer,
2012allowing easier searching with grep for function durations.
2013It is default disabled.
2014
2015 hide: echo nofuncgraph-tail > trace_options
2016 show: echo funcgraph-tail > trace_options
2017
2018 Example with nofuncgraph-tail (default):
2019 0) | putname() {
2020 0) | kmem_cache_free() {
2021 0) 0.518 us | __phys_addr();
2022 0) 1.757 us | }
2023 0) 2.861 us | }
2024
2025 Example with funcgraph-tail:
2026 0) | putname() {
2027 0) | kmem_cache_free() {
2028 0) 0.518 us | __phys_addr();
2029 0) 1.757 us | } /* kmem_cache_free() */
2030 0) 2.861 us | } /* putname() */
2031
2006You can put some comments on specific functions by using 2032You can put some comments on specific functions by using
2007trace_printk() For example, if you want to put a comment inside 2033trace_printk() For example, if you want to put a comment inside
2008the __might_sleep() function, you just have to include 2034the __might_sleep() function, you just have to include
diff --git a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
index 00e425faa2fd..78c9a7b2b58f 100644
--- a/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
+++ b/Documentation/trace/postprocess/trace-vmscan-postprocess.pl
@@ -47,7 +47,6 @@ use constant HIGH_KSWAPD_REWAKEUP => 21;
47use constant HIGH_NR_SCANNED => 22; 47use constant HIGH_NR_SCANNED => 22;
48use constant HIGH_NR_TAKEN => 23; 48use constant HIGH_NR_TAKEN => 23;
49use constant HIGH_NR_RECLAIMED => 24; 49use constant HIGH_NR_RECLAIMED => 24;
50use constant HIGH_NR_CONTIG_DIRTY => 25;
51 50
52my %perprocesspid; 51my %perprocesspid;
53my %perprocess; 52my %perprocess;
@@ -105,7 +104,7 @@ my $regex_direct_end_default = 'nr_reclaimed=([0-9]*)';
105my $regex_kswapd_wake_default = 'nid=([0-9]*) order=([0-9]*)'; 104my $regex_kswapd_wake_default = 'nid=([0-9]*) order=([0-9]*)';
106my $regex_kswapd_sleep_default = 'nid=([0-9]*)'; 105my $regex_kswapd_sleep_default = 'nid=([0-9]*)';
107my $regex_wakeup_kswapd_default = 'nid=([0-9]*) zid=([0-9]*) order=([0-9]*)'; 106my $regex_wakeup_kswapd_default = 'nid=([0-9]*) zid=([0-9]*) order=([0-9]*)';
108my $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]*)'; 107my $regex_lru_isolate_default = 'isolate_mode=([0-9]*) order=([0-9]*) nr_requested=([0-9]*) nr_scanned=([0-9]*) nr_taken=([0-9]*) file=([0-9]*)';
109my $regex_lru_shrink_inactive_default = 'nid=([0-9]*) zid=([0-9]*) nr_scanned=([0-9]*) nr_reclaimed=([0-9]*) priority=([0-9]*) flags=([A-Z_|]*)'; 108my $regex_lru_shrink_inactive_default = 'nid=([0-9]*) zid=([0-9]*) nr_scanned=([0-9]*) nr_reclaimed=([0-9]*) priority=([0-9]*) flags=([A-Z_|]*)';
110my $regex_lru_shrink_active_default = 'lru=([A-Z_]*) nr_scanned=([0-9]*) nr_rotated=([0-9]*) priority=([0-9]*)'; 109my $regex_lru_shrink_active_default = 'lru=([A-Z_]*) nr_scanned=([0-9]*) nr_rotated=([0-9]*) priority=([0-9]*)';
111my $regex_writepage_default = 'page=([0-9a-f]*) pfn=([0-9]*) flags=([A-Z_|]*)'; 110my $regex_writepage_default = 'page=([0-9a-f]*) pfn=([0-9]*) flags=([A-Z_|]*)';
@@ -200,7 +199,7 @@ $regex_lru_isolate = generate_traceevent_regex(
200 $regex_lru_isolate_default, 199 $regex_lru_isolate_default,
201 "isolate_mode", "order", 200 "isolate_mode", "order",
202 "nr_requested", "nr_scanned", "nr_taken", 201 "nr_requested", "nr_scanned", "nr_taken",
203 "contig_taken", "contig_dirty", "contig_failed"); 202 "file");
204$regex_lru_shrink_inactive = generate_traceevent_regex( 203$regex_lru_shrink_inactive = generate_traceevent_regex(
205 "vmscan/mm_vmscan_lru_shrink_inactive", 204 "vmscan/mm_vmscan_lru_shrink_inactive",
206 $regex_lru_shrink_inactive_default, 205 $regex_lru_shrink_inactive_default,
@@ -375,7 +374,6 @@ EVENT_PROCESS:
375 } 374 }
376 my $isolate_mode = $1; 375 my $isolate_mode = $1;
377 my $nr_scanned = $4; 376 my $nr_scanned = $4;
378 my $nr_contig_dirty = $7;
379 377
380 # To closer match vmstat scanning statistics, only count isolate_both 378 # To closer match vmstat scanning statistics, only count isolate_both
381 # and isolate_inactive as scanning. isolate_active is rotation 379 # and isolate_inactive as scanning. isolate_active is rotation
@@ -385,7 +383,6 @@ EVENT_PROCESS:
385 if ($isolate_mode != 2) { 383 if ($isolate_mode != 2) {
386 $perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned; 384 $perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned;
387 } 385 }
388 $perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty;
389 } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") { 386 } elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") {
390 $details = $6; 387 $details = $6;
391 if ($details !~ /$regex_lru_shrink_inactive/o) { 388 if ($details !~ /$regex_lru_shrink_inactive/o) {
@@ -539,13 +536,6 @@ sub dump_stats {
539 } 536 }
540 } 537 }
541 } 538 }
542 if ($stats{$process_pid}->{HIGH_NR_CONTIG_DIRTY}) {
543 print " ";
544 my $count = $stats{$process_pid}->{HIGH_NR_CONTIG_DIRTY};
545 if ($count != 0) {
546 print "contig-dirty=$count ";
547 }
548 }
549 539
550 print "\n"; 540 print "\n";
551 } 541 }
diff --git a/Documentation/trace/tracepoints.txt b/Documentation/trace/tracepoints.txt
index 6b018b53177a..a3efac621c5a 100644
--- a/Documentation/trace/tracepoints.txt
+++ b/Documentation/trace/tracepoints.txt
@@ -115,6 +115,30 @@ If the tracepoint has to be used in kernel modules, an
115EXPORT_TRACEPOINT_SYMBOL_GPL() or EXPORT_TRACEPOINT_SYMBOL() can be 115EXPORT_TRACEPOINT_SYMBOL_GPL() or EXPORT_TRACEPOINT_SYMBOL() can be
116used to export the defined tracepoints. 116used to export the defined tracepoints.
117 117
118If you need to do a bit of work for a tracepoint parameter, and
119that work is only used for the tracepoint, that work can be encapsulated
120within an if statement with the following:
121
122 if (trace_foo_bar_enabled()) {
123 int i;
124 int tot = 0;
125
126 for (i = 0; i < count; i++)
127 tot += calculate_nuggets();
128
129 trace_foo_bar(tot);
130 }
131
132All trace_<tracepoint>() calls have a matching trace_<tracepoint>_enabled()
133function defined that returns true if the tracepoint is enabled and
134false otherwise. The trace_<tracepoint>() should always be within the
135block of the if (trace_<tracepoint>_enabled()) to prevent races between
136the tracepoint being enabled and the check being seen.
137
138The advantage of using the trace_<tracepoint>_enabled() is that it uses
139the static_key of the tracepoint to allow the if statement to be implemented
140with jump labels and avoid conditional branches.
141
118Note: The convenience macro TRACE_EVENT provides an alternative way to 142Note: The convenience macro TRACE_EVENT provides an alternative way to
119 define tracepoints. Check http://lwn.net/Articles/379903, 143 define tracepoints. Check http://lwn.net/Articles/379903,
120 http://lwn.net/Articles/381064 and http://lwn.net/Articles/383362 144 http://lwn.net/Articles/381064 and http://lwn.net/Articles/383362
diff --git a/Documentation/usb/chipidea.txt b/Documentation/usb/chipidea.txt
new file mode 100644
index 000000000000..995c8bca40e2
--- /dev/null
+++ b/Documentation/usb/chipidea.txt
@@ -0,0 +1,71 @@
11. How to test OTG FSM(HNP and SRP)
2-----------------------------------
3To show how to demo OTG HNP and SRP functions via sys input files
4with 2 Freescale i.MX6Q sabre SD boards.
5
61.1 How to enable OTG FSM in menuconfig
7---------------------------------------
8Select CONFIG_USB_OTG_FSM, rebuild kernel Image and modules.
9If you want to check some internal variables for otg fsm,
10select CONFIG_USB_CHIPIDEA_DEBUG, there are 2 files which
11can show otg fsm variables and some controller registers value:
12cat /sys/kernel/debug/ci_hdrc.0/otg
13cat /sys/kernel/debug/ci_hdrc.0/registers
14
151.2 Test operations
16-------------------
171) Power up 2 Freescale i.MX6Q sabre SD boards with gadget class driver loaded
18 (e.g. g_mass_storage).
19
202) Connect 2 boards with usb cable with one end is micro A plug, the other end
21 is micro B plug.
22
23 The A-device(with micro A plug inserted) should enumrate B-device.
24
253) Role switch
26 On B-device:
27 echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
28
29 if HNP polling is not supported, also need:
30 On A-device:
31 echo 0 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req
32
33 B-device should take host role and enumrate A-device.
34
354) A-device switch back to host.
36 On B-device:
37 echo 0 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
38
39 A-device should switch back to host and enumrate B-device.
40
415) Remove B-device(unplug micro B plug) and insert again in 10 seconds,
42 A-device should enumrate B-device again.
43
446) Remove B-device(unplug micro B plug) and insert again after 10 seconds,
45 A-device should NOT enumrate B-device.
46
47 if A-device wants to use bus:
48 On A-device:
49 echo 0 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_drop
50 echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req
51
52 if B-device wants to use bus:
53 On B-device:
54 echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
55
567) A-device power down the bus.
57 On A-device:
58 echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_drop
59
60 A-device should disconnect with B-device and power down the bus.
61
628) B-device does data pulse for SRP.
63 On B-device:
64 echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
65
66 A-device should resume usb bus and enumrate B-device.
67
681.3 Reference document
69----------------------
70"On-The-Go and Embedded Host Supplement to the USB Revision 2.0 Specification
71July 27, 2012 Revision 2.0 version 1.1a"
diff --git a/Documentation/usb/mass-storage.txt b/Documentation/usb/mass-storage.txt
index 59063ad7a60d..e89803a5a960 100644
--- a/Documentation/usb/mass-storage.txt
+++ b/Documentation/usb/mass-storage.txt
@@ -13,7 +13,7 @@
13 operation. 13 operation.
14 14
15 Note that the driver is slightly non-portable in that it assumes 15 Note that the driver is slightly non-portable in that it assumes
16 a single memory/DMA buffer will be useable for bulk-in and bulk-out 16 a single memory/DMA buffer will be usable for bulk-in and bulk-out
17 endpoints. With most device controllers this is not an issue, but 17 endpoints. With most device controllers this is not an issue, but
18 there may be some with hardware restrictions that prevent a buffer 18 there may be some with hardware restrictions that prevent a buffer
19 from being used by more than one endpoint. 19 from being used by more than one endpoint.
diff --git a/Documentation/vDSO/parse_vdso.c b/Documentation/vDSO/parse_vdso.c
index 85870208edcf..1dbb4b87268f 100644
--- a/Documentation/vDSO/parse_vdso.c
+++ b/Documentation/vDSO/parse_vdso.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * parse_vdso.c: Linux reference vDSO parser 2 * parse_vdso.c: Linux reference vDSO parser
3 * Written by Andrew Lutomirski, 2011. 3 * Written by Andrew Lutomirski, 2011-2014.
4 * 4 *
5 * This code is meant to be linked in to various programs that run on Linux. 5 * This code is meant to be linked in to various programs that run on Linux.
6 * As such, it is available with as few restrictions as possible. This file 6 * As such, it is available with as few restrictions as possible. This file
@@ -11,13 +11,14 @@
11 * it starts a program. It works equally well in statically and dynamically 11 * it starts a program. It works equally well in statically and dynamically
12 * linked binaries. 12 * linked binaries.
13 * 13 *
14 * This code is tested on x86_64. In principle it should work on any 64-bit 14 * This code is tested on x86. In principle it should work on any
15 * architecture that has a vDSO. 15 * architecture that has a vDSO.
16 */ 16 */
17 17
18#include <stdbool.h> 18#include <stdbool.h>
19#include <stdint.h> 19#include <stdint.h>
20#include <string.h> 20#include <string.h>
21#include <limits.h>
21#include <elf.h> 22#include <elf.h>
22 23
23/* 24/*
@@ -45,11 +46,18 @@ extern void *vdso_sym(const char *version, const char *name);
45 46
46 47
47/* And here's the code. */ 48/* And here's the code. */
48 49#ifndef ELF_BITS
49#ifndef __x86_64__ 50# if ULONG_MAX > 0xffffffffUL
50# error Not yet ported to non-x86_64 architectures 51# define ELF_BITS 64
52# else
53# define ELF_BITS 32
54# endif
51#endif 55#endif
52 56
57#define ELF_BITS_XFORM2(bits, x) Elf##bits##_##x
58#define ELF_BITS_XFORM(bits, x) ELF_BITS_XFORM2(bits, x)
59#define ELF(x) ELF_BITS_XFORM(ELF_BITS, x)
60
53static struct vdso_info 61static struct vdso_info
54{ 62{
55 bool valid; 63 bool valid;
@@ -59,14 +67,14 @@ static struct vdso_info
59 uintptr_t load_offset; /* load_addr - recorded vaddr */ 67 uintptr_t load_offset; /* load_addr - recorded vaddr */
60 68
61 /* Symbol table */ 69 /* Symbol table */
62 Elf64_Sym *symtab; 70 ELF(Sym) *symtab;
63 const char *symstrings; 71 const char *symstrings;
64 Elf64_Word *bucket, *chain; 72 ELF(Word) *bucket, *chain;
65 Elf64_Word nbucket, nchain; 73 ELF(Word) nbucket, nchain;
66 74
67 /* Version table */ 75 /* Version table */
68 Elf64_Versym *versym; 76 ELF(Versym) *versym;
69 Elf64_Verdef *verdef; 77 ELF(Verdef) *verdef;
70} vdso_info; 78} vdso_info;
71 79
72/* Straight from the ELF specification. */ 80/* Straight from the ELF specification. */
@@ -92,9 +100,14 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
92 100
93 vdso_info.load_addr = base; 101 vdso_info.load_addr = base;
94 102
95 Elf64_Ehdr *hdr = (Elf64_Ehdr*)base; 103 ELF(Ehdr) *hdr = (ELF(Ehdr)*)base;
96 Elf64_Phdr *pt = (Elf64_Phdr*)(vdso_info.load_addr + hdr->e_phoff); 104 if (hdr->e_ident[EI_CLASS] !=
97 Elf64_Dyn *dyn = 0; 105 (ELF_BITS == 32 ? ELFCLASS32 : ELFCLASS64)) {
106 return; /* Wrong ELF class -- check ELF_BITS */
107 }
108
109 ELF(Phdr) *pt = (ELF(Phdr)*)(vdso_info.load_addr + hdr->e_phoff);
110 ELF(Dyn) *dyn = 0;
98 111
99 /* 112 /*
100 * We need two things from the segment table: the load offset 113 * We need two things from the segment table: the load offset
@@ -108,7 +121,7 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
108 + (uintptr_t)pt[i].p_offset 121 + (uintptr_t)pt[i].p_offset
109 - (uintptr_t)pt[i].p_vaddr; 122 - (uintptr_t)pt[i].p_vaddr;
110 } else if (pt[i].p_type == PT_DYNAMIC) { 123 } else if (pt[i].p_type == PT_DYNAMIC) {
111 dyn = (Elf64_Dyn*)(base + pt[i].p_offset); 124 dyn = (ELF(Dyn)*)(base + pt[i].p_offset);
112 } 125 }
113 } 126 }
114 127
@@ -118,7 +131,7 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
118 /* 131 /*
119 * Fish out the useful bits of the dynamic table. 132 * Fish out the useful bits of the dynamic table.
120 */ 133 */
121 Elf64_Word *hash = 0; 134 ELF(Word) *hash = 0;
122 vdso_info.symstrings = 0; 135 vdso_info.symstrings = 0;
123 vdso_info.symtab = 0; 136 vdso_info.symtab = 0;
124 vdso_info.versym = 0; 137 vdso_info.versym = 0;
@@ -131,22 +144,22 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
131 + vdso_info.load_offset); 144 + vdso_info.load_offset);
132 break; 145 break;
133 case DT_SYMTAB: 146 case DT_SYMTAB:
134 vdso_info.symtab = (Elf64_Sym *) 147 vdso_info.symtab = (ELF(Sym) *)
135 ((uintptr_t)dyn[i].d_un.d_ptr 148 ((uintptr_t)dyn[i].d_un.d_ptr
136 + vdso_info.load_offset); 149 + vdso_info.load_offset);
137 break; 150 break;
138 case DT_HASH: 151 case DT_HASH:
139 hash = (Elf64_Word *) 152 hash = (ELF(Word) *)
140 ((uintptr_t)dyn[i].d_un.d_ptr 153 ((uintptr_t)dyn[i].d_un.d_ptr
141 + vdso_info.load_offset); 154 + vdso_info.load_offset);
142 break; 155 break;
143 case DT_VERSYM: 156 case DT_VERSYM:
144 vdso_info.versym = (Elf64_Versym *) 157 vdso_info.versym = (ELF(Versym) *)
145 ((uintptr_t)dyn[i].d_un.d_ptr 158 ((uintptr_t)dyn[i].d_un.d_ptr
146 + vdso_info.load_offset); 159 + vdso_info.load_offset);
147 break; 160 break;
148 case DT_VERDEF: 161 case DT_VERDEF:
149 vdso_info.verdef = (Elf64_Verdef *) 162 vdso_info.verdef = (ELF(Verdef) *)
150 ((uintptr_t)dyn[i].d_un.d_ptr 163 ((uintptr_t)dyn[i].d_un.d_ptr
151 + vdso_info.load_offset); 164 + vdso_info.load_offset);
152 break; 165 break;
@@ -168,8 +181,8 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base)
168 vdso_info.valid = true; 181 vdso_info.valid = true;
169} 182}
170 183
171static bool vdso_match_version(Elf64_Versym ver, 184static bool vdso_match_version(ELF(Versym) ver,
172 const char *name, Elf64_Word hash) 185 const char *name, ELF(Word) hash)
173{ 186{
174 /* 187 /*
175 * This is a helper function to check if the version indexed by 188 * This is a helper function to check if the version indexed by
@@ -188,7 +201,7 @@ static bool vdso_match_version(Elf64_Versym ver,
188 201
189 /* First step: find the version definition */ 202 /* First step: find the version definition */
190 ver &= 0x7fff; /* Apparently bit 15 means "hidden" */ 203 ver &= 0x7fff; /* Apparently bit 15 means "hidden" */
191 Elf64_Verdef *def = vdso_info.verdef; 204 ELF(Verdef) *def = vdso_info.verdef;
192 while(true) { 205 while(true) {
193 if ((def->vd_flags & VER_FLG_BASE) == 0 206 if ((def->vd_flags & VER_FLG_BASE) == 0
194 && (def->vd_ndx & 0x7fff) == ver) 207 && (def->vd_ndx & 0x7fff) == ver)
@@ -197,11 +210,11 @@ static bool vdso_match_version(Elf64_Versym ver,
197 if (def->vd_next == 0) 210 if (def->vd_next == 0)
198 return false; /* No definition. */ 211 return false; /* No definition. */
199 212
200 def = (Elf64_Verdef *)((char *)def + def->vd_next); 213 def = (ELF(Verdef) *)((char *)def + def->vd_next);
201 } 214 }
202 215
203 /* Now figure out whether it matches. */ 216 /* Now figure out whether it matches. */
204 Elf64_Verdaux *aux = (Elf64_Verdaux*)((char *)def + def->vd_aux); 217 ELF(Verdaux) *aux = (ELF(Verdaux)*)((char *)def + def->vd_aux);
205 return def->vd_hash == hash 218 return def->vd_hash == hash
206 && !strcmp(name, vdso_info.symstrings + aux->vda_name); 219 && !strcmp(name, vdso_info.symstrings + aux->vda_name);
207} 220}
@@ -213,10 +226,10 @@ void *vdso_sym(const char *version, const char *name)
213 return 0; 226 return 0;
214 227
215 ver_hash = elf_hash(version); 228 ver_hash = elf_hash(version);
216 Elf64_Word chain = vdso_info.bucket[elf_hash(name) % vdso_info.nbucket]; 229 ELF(Word) chain = vdso_info.bucket[elf_hash(name) % vdso_info.nbucket];
217 230
218 for (; chain != STN_UNDEF; chain = vdso_info.chain[chain]) { 231 for (; chain != STN_UNDEF; chain = vdso_info.chain[chain]) {
219 Elf64_Sym *sym = &vdso_info.symtab[chain]; 232 ELF(Sym) *sym = &vdso_info.symtab[chain];
220 233
221 /* Check for a defined global or weak function w/ right name. */ 234 /* Check for a defined global or weak function w/ right name. */
222 if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC) 235 if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC)
@@ -243,7 +256,7 @@ void *vdso_sym(const char *version, const char *name)
243 256
244void vdso_init_from_auxv(void *auxv) 257void vdso_init_from_auxv(void *auxv)
245{ 258{
246 Elf64_auxv_t *elf_auxv = auxv; 259 ELF(auxv_t) *elf_auxv = auxv;
247 for (int i = 0; elf_auxv[i].a_type != AT_NULL; i++) 260 for (int i = 0; elf_auxv[i].a_type != AT_NULL; i++)
248 { 261 {
249 if (elf_auxv[i].a_type == AT_SYSINFO_EHDR) { 262 if (elf_auxv[i].a_type == AT_SYSINFO_EHDR) {
diff --git a/Documentation/vDSO/vdso_standalone_test_x86.c b/Documentation/vDSO/vdso_standalone_test_x86.c
new file mode 100644
index 000000000000..d46240265c50
--- /dev/null
+++ b/Documentation/vDSO/vdso_standalone_test_x86.c
@@ -0,0 +1,128 @@
1/*
2 * vdso_test.c: Sample code to test parse_vdso.c on x86
3 * Copyright (c) 2011-2014 Andy Lutomirski
4 * Subject to the GNU General Public License, version 2
5 *
6 * You can amuse yourself by compiling with:
7 * gcc -std=gnu99 -nostdlib
8 * -Os -fno-asynchronous-unwind-tables -flto -lgcc_s
9 * vdso_standalone_test_x86.c parse_vdso.c
10 * to generate a small binary. On x86_64, you can omit -lgcc_s
11 * if you want the binary to be completely standalone.
12 */
13
14#include <sys/syscall.h>
15#include <sys/time.h>
16#include <unistd.h>
17#include <stdint.h>
18
19extern void *vdso_sym(const char *version, const char *name);
20extern void vdso_init_from_sysinfo_ehdr(uintptr_t base);
21extern void vdso_init_from_auxv(void *auxv);
22
23/* We need a libc functions... */
24int strcmp(const char *a, const char *b)
25{
26 /* This implementation is buggy: it never returns -1. */
27 while (*a || *b) {
28 if (*a != *b)
29 return 1;
30 if (*a == 0 || *b == 0)
31 return 1;
32 a++;
33 b++;
34 }
35
36 return 0;
37}
38
39/* ...and two syscalls. This is x86-specific. */
40static inline long x86_syscall3(long nr, long a0, long a1, long a2)
41{
42 long ret;
43#ifdef __x86_64__
44 asm volatile ("syscall" : "=a" (ret) : "a" (nr),
45 "D" (a0), "S" (a1), "d" (a2) :
46 "cc", "memory", "rcx",
47 "r8", "r9", "r10", "r11" );
48#else
49 asm volatile ("int $0x80" : "=a" (ret) : "a" (nr),
50 "b" (a0), "c" (a1), "d" (a2) :
51 "cc", "memory" );
52#endif
53 return ret;
54}
55
56static inline long linux_write(int fd, const void *data, size_t len)
57{
58 return x86_syscall3(__NR_write, fd, (long)data, (long)len);
59}
60
61static inline void linux_exit(int code)
62{
63 x86_syscall3(__NR_exit, code, 0, 0);
64}
65
66void to_base10(char *lastdig, uint64_t n)
67{
68 while (n) {
69 *lastdig = (n % 10) + '0';
70 n /= 10;
71 lastdig--;
72 }
73}
74
75__attribute__((externally_visible)) void c_main(void **stack)
76{
77 /* Parse the stack */
78 long argc = (long)*stack;
79 stack += argc + 2;
80
81 /* Now we're pointing at the environment. Skip it. */
82 while(*stack)
83 stack++;
84 stack++;
85
86 /* Now we're pointing at auxv. Initialize the vDSO parser. */
87 vdso_init_from_auxv((void *)stack);
88
89 /* Find gettimeofday. */
90 typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz);
91 gtod_t gtod = (gtod_t)vdso_sym("LINUX_2.6", "__vdso_gettimeofday");
92
93 if (!gtod)
94 linux_exit(1);
95
96 struct timeval tv;
97 long ret = gtod(&tv, 0);
98
99 if (ret == 0) {
100 char buf[] = "The time is .000000\n";
101 to_base10(buf + 31, tv.tv_sec);
102 to_base10(buf + 38, tv.tv_usec);
103 linux_write(1, buf, sizeof(buf) - 1);
104 } else {
105 linux_exit(ret);
106 }
107
108 linux_exit(0);
109}
110
111/*
112 * This is the real entry point. It passes the initial stack into
113 * the C entry point.
114 */
115asm (
116 ".text\n"
117 ".global _start\n"
118 ".type _start,@function\n"
119 "_start:\n\t"
120#ifdef __x86_64__
121 "mov %rsp,%rdi\n\t"
122 "jmp c_main"
123#else
124 "push %esp\n\t"
125 "call c_main\n\t"
126 "int $3"
127#endif
128 );
diff --git a/Documentation/vDSO/vdso_test.c b/Documentation/vDSO/vdso_test.c
index fff633432dff..8daeb7d7032c 100644
--- a/Documentation/vDSO/vdso_test.c
+++ b/Documentation/vDSO/vdso_test.c
@@ -1,111 +1,52 @@
1/* 1/*
2 * vdso_test.c: Sample code to test parse_vdso.c on x86_64 2 * vdso_test.c: Sample code to test parse_vdso.c
3 * Copyright (c) 2011 Andy Lutomirski 3 * Copyright (c) 2014 Andy Lutomirski
4 * Subject to the GNU General Public License, version 2 4 * Subject to the GNU General Public License, version 2
5 * 5 *
6 * You can amuse yourself by compiling with: 6 * Compile with:
7 * gcc -std=gnu99 -nostdlib 7 * gcc -std=gnu99 vdso_test.c parse_vdso.c
8 * -Os -fno-asynchronous-unwind-tables -flto 8 *
9 * vdso_test.c parse_vdso.c -o vdso_test 9 * Tested on x86, 32-bit and 64-bit. It may work on other architectures, too.
10 * to generate a small binary with no dependencies at all.
11 */ 10 */
12 11
13#include <sys/syscall.h>
14#include <sys/time.h>
15#include <unistd.h>
16#include <stdint.h> 12#include <stdint.h>
13#include <elf.h>
14#include <stdio.h>
15#include <sys/auxv.h>
16#include <sys/time.h>
17 17
18extern void *vdso_sym(const char *version, const char *name); 18extern void *vdso_sym(const char *version, const char *name);
19extern void vdso_init_from_sysinfo_ehdr(uintptr_t base); 19extern void vdso_init_from_sysinfo_ehdr(uintptr_t base);
20extern void vdso_init_from_auxv(void *auxv); 20extern void vdso_init_from_auxv(void *auxv);
21 21
22/* We need a libc functions... */ 22int main(int argc, char **argv)
23int strcmp(const char *a, const char *b)
24{ 23{
25 /* This implementation is buggy: it never returns -1. */ 24 unsigned long sysinfo_ehdr = getauxval(AT_SYSINFO_EHDR);
26 while (*a || *b) { 25 if (!sysinfo_ehdr) {
27 if (*a != *b) 26 printf("AT_SYSINFO_EHDR is not present!\n");
28 return 1; 27 return 0;
29 if (*a == 0 || *b == 0)
30 return 1;
31 a++;
32 b++;
33 } 28 }
34 29
35 return 0; 30 vdso_init_from_sysinfo_ehdr(getauxval(AT_SYSINFO_EHDR));
36}
37
38/* ...and two syscalls. This is x86_64-specific. */
39static inline long linux_write(int fd, const void *data, size_t len)
40{
41
42 long ret;
43 asm volatile ("syscall" : "=a" (ret) : "a" (__NR_write),
44 "D" (fd), "S" (data), "d" (len) :
45 "cc", "memory", "rcx",
46 "r8", "r9", "r10", "r11" );
47 return ret;
48}
49
50static inline void linux_exit(int code)
51{
52 asm volatile ("syscall" : : "a" (__NR_exit), "D" (code));
53}
54
55void to_base10(char *lastdig, uint64_t n)
56{
57 while (n) {
58 *lastdig = (n % 10) + '0';
59 n /= 10;
60 lastdig--;
61 }
62}
63
64__attribute__((externally_visible)) void c_main(void **stack)
65{
66 /* Parse the stack */
67 long argc = (long)*stack;
68 stack += argc + 2;
69
70 /* Now we're pointing at the environment. Skip it. */
71 while(*stack)
72 stack++;
73 stack++;
74
75 /* Now we're pointing at auxv. Initialize the vDSO parser. */
76 vdso_init_from_auxv((void *)stack);
77 31
78 /* Find gettimeofday. */ 32 /* Find gettimeofday. */
79 typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz); 33 typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz);
80 gtod_t gtod = (gtod_t)vdso_sym("LINUX_2.6", "__vdso_gettimeofday"); 34 gtod_t gtod = (gtod_t)vdso_sym("LINUX_2.6", "__vdso_gettimeofday");
81 35
82 if (!gtod) 36 if (!gtod) {
83 linux_exit(1); 37 printf("Could not find __vdso_gettimeofday\n");
38 return 1;
39 }
84 40
85 struct timeval tv; 41 struct timeval tv;
86 long ret = gtod(&tv, 0); 42 long ret = gtod(&tv, 0);
87 43
88 if (ret == 0) { 44 if (ret == 0) {
89 char buf[] = "The time is .000000\n"; 45 printf("The time is %lld.%06lld\n",
90 to_base10(buf + 31, tv.tv_sec); 46 (long long)tv.tv_sec, (long long)tv.tv_usec);
91 to_base10(buf + 38, tv.tv_usec);
92 linux_write(1, buf, sizeof(buf) - 1);
93 } else { 47 } else {
94 linux_exit(ret); 48 printf("__vdso_gettimeofday failed\n");
95 } 49 }
96 50
97 linux_exit(0); 51 return 0;
98} 52}
99
100/*
101 * This is the real entry point. It passes the initial stack into
102 * the C entry point.
103 */
104asm (
105 ".text\n"
106 ".global _start\n"
107 ".type _start,@function\n"
108 "_start:\n\t"
109 "mov %rsp,%rdi\n\t"
110 "jmp c_main"
111 );
diff --git a/Documentation/video4linux/CARDLIST.bttv b/Documentation/video4linux/CARDLIST.bttv
index 2f6e93597ce0..b092c0a14df2 100644
--- a/Documentation/video4linux/CARDLIST.bttv
+++ b/Documentation/video4linux/CARDLIST.bttv
@@ -164,3 +164,4 @@
164163 -> Bt848 Capture 14MHz 164163 -> Bt848 Capture 14MHz
165164 -> CyberVision CV06 (SV) 165164 -> CyberVision CV06 (SV)
166165 -> Kworld V-Stream Xpert TV PVR878 166165 -> Kworld V-Stream Xpert TV PVR878
167166 -> PCI-8604PW
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx
index e085b1243b45..5a3ddcd340d3 100644
--- a/Documentation/video4linux/CARDLIST.em28xx
+++ b/Documentation/video4linux/CARDLIST.em28xx
@@ -92,3 +92,4 @@
92 91 -> SpeedLink Vicious And Devine Laplace webcam (em2765) [1ae7:9003,1ae7:9004] 92 91 -> SpeedLink Vicious And Devine Laplace webcam (em2765) [1ae7:9003,1ae7:9004]
93 92 -> PCTV DVB-S2 Stick (461e) (em28178) 93 92 -> PCTV DVB-S2 Stick (461e) (em28178)
94 93 -> KWorld USB ATSC TV Stick UB435-Q V3 (em2874) [1b80:e34c] 94 93 -> KWorld USB ATSC TV Stick UB435-Q V3 (em2874) [1b80:e34c]
95 94 -> PCTV tripleStick (292e) (em28178)
diff --git a/Documentation/video4linux/fimc.txt b/Documentation/video4linux/fimc.txt
index 7d6e160724bd..e0c6b8bc4743 100644
--- a/Documentation/video4linux/fimc.txt
+++ b/Documentation/video4linux/fimc.txt
@@ -140,39 +140,9 @@ You can either grep through the kernel log to find relevant information, i.e.
140or retrieve the information from /dev/media? with help of the media-ctl tool: 140or retrieve the information from /dev/media? with help of the media-ctl tool:
141# media-ctl -p 141# media-ctl -p
142 142
1436. Platform support
144===================
145
146The machine code (arch/arm/plat-samsung and arch/arm/mach-*) must select
147following options:
148
149CONFIG_S5P_DEV_FIMC0 mandatory
150CONFIG_S5P_DEV_FIMC1 \
151CONFIG_S5P_DEV_FIMC2 | optional
152CONFIG_S5P_DEV_FIMC3 |
153CONFIG_S5P_SETUP_FIMC /
154CONFIG_S5P_DEV_CSIS0 \ optional for MIPI-CSI interface
155CONFIG_S5P_DEV_CSIS1 /
156
157Except that, relevant s5p_device_fimc? should be registered in the machine code
158in addition to a "s5p-fimc-md" platform device to which the media device driver
159is bound. The "s5p-fimc-md" device instance is required even if only mem-to-mem
160operation is used.
161
162The description of sensor(s) attached to FIMC/MIPI-CSIS camera inputs should be
163passed as the "s5p-fimc-md" device platform_data. The platform data structure
164is defined in file include/media/s5p_fimc.h.
165
1667. Build 1437. Build
167======== 144========
168 145
169This driver depends on following config options:
170PLAT_S5P,
171PM_RUNTIME,
172I2C,
173REGULATOR,
174VIDEO_V4L2_SUBDEV_API,
175
176If the driver is built as a loadable kernel module (CONFIG_VIDEO_SAMSUNG_S5P_FIMC=m) 146If the driver is built as a loadable kernel module (CONFIG_VIDEO_SAMSUNG_S5P_FIMC=m)
177two modules are created (in addition to the core v4l2 modules): s5p-fimc.ko and 147two modules are created (in addition to the core v4l2 modules): s5p-fimc.ko and
178optional s5p-csis.ko (MIPI-CSI receiver subdev). 148optional s5p-csis.ko (MIPI-CSI receiver subdev).
diff --git a/Documentation/video4linux/v4l2-pci-skeleton.c b/Documentation/video4linux/v4l2-pci-skeleton.c
index 3a1c0d2dafce..46904fe49609 100644
--- a/Documentation/video4linux/v4l2-pci-skeleton.c
+++ b/Documentation/video4linux/v4l2-pci-skeleton.c
@@ -77,7 +77,8 @@ struct skeleton {
77 77
78 spinlock_t qlock; 78 spinlock_t qlock;
79 struct list_head buf_list; 79 struct list_head buf_list;
80 unsigned int sequence; 80 unsigned field;
81 unsigned sequence;
81}; 82};
82 83
83struct skel_buffer { 84struct skel_buffer {
@@ -124,7 +125,7 @@ static const struct v4l2_dv_timings_cap skel_timings_cap = {
124 * Interrupt handler: typically interrupts happen after a new frame has been 125 * Interrupt handler: typically interrupts happen after a new frame has been
125 * captured. It is the job of the handler to remove the new frame from the 126 * captured. It is the job of the handler to remove the new frame from the
126 * internal list and give it back to the vb2 framework, updating the sequence 127 * internal list and give it back to the vb2 framework, updating the sequence
127 * counter and timestamp at the same time. 128 * counter, field and timestamp at the same time.
128 */ 129 */
129static irqreturn_t skeleton_irq(int irq, void *dev_id) 130static irqreturn_t skeleton_irq(int irq, void *dev_id)
130{ 131{
@@ -139,8 +140,15 @@ static irqreturn_t skeleton_irq(int irq, void *dev_id)
139 spin_lock(&skel->qlock); 140 spin_lock(&skel->qlock);
140 list_del(&new_buf->list); 141 list_del(&new_buf->list);
141 spin_unlock(&skel->qlock); 142 spin_unlock(&skel->qlock);
142 new_buf->vb.v4l2_buf.sequence = skel->sequence++;
143 v4l2_get_timestamp(&new_buf->vb.v4l2_buf.timestamp); 143 v4l2_get_timestamp(&new_buf->vb.v4l2_buf.timestamp);
144 new_buf->vb.v4l2_buf.sequence = skel->sequence++;
145 new_buf->vb.v4l2_buf.field = skel->field;
146 if (skel->format.field == V4L2_FIELD_ALTERNATE) {
147 if (skel->field == V4L2_FIELD_BOTTOM)
148 skel->field = V4L2_FIELD_TOP;
149 else if (skel->field == V4L2_FIELD_TOP)
150 skel->field = V4L2_FIELD_BOTTOM;
151 }
144 vb2_buffer_done(&new_buf->vb, VB2_BUF_STATE_DONE); 152 vb2_buffer_done(&new_buf->vb, VB2_BUF_STATE_DONE);
145 } 153 }
146#endif 154#endif
@@ -160,6 +168,17 @@ static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt,
160{ 168{
161 struct skeleton *skel = vb2_get_drv_priv(vq); 169 struct skeleton *skel = vb2_get_drv_priv(vq);
162 170
171 skel->field = skel->format.field;
172 if (skel->field == V4L2_FIELD_ALTERNATE) {
173 /*
174 * You cannot use read() with FIELD_ALTERNATE since the field
175 * information (TOP/BOTTOM) cannot be passed back to the user.
176 */
177 if (vb2_fileio_is_active(vq))
178 return -EINVAL;
179 skel->field = V4L2_FIELD_TOP;
180 }
181
163 if (vq->num_buffers + *nbuffers < 3) 182 if (vq->num_buffers + *nbuffers < 3)
164 *nbuffers = 3 - vq->num_buffers; 183 *nbuffers = 3 - vq->num_buffers;
165 184
@@ -173,10 +192,7 @@ static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt,
173 192
174/* 193/*
175 * Prepare the buffer for queueing to the DMA engine: check and set the 194 * Prepare the buffer for queueing to the DMA engine: check and set the
176 * payload size and fill in the field. Note: if the format's field is 195 * payload size.
177 * V4L2_FIELD_ALTERNATE, then vb->v4l2_buf.field should be set in the
178 * interrupt handler since that's usually where you know if the TOP or
179 * BOTTOM field has been captured.
180 */ 196 */
181static int buffer_prepare(struct vb2_buffer *vb) 197static int buffer_prepare(struct vb2_buffer *vb)
182{ 198{
@@ -190,7 +206,6 @@ static int buffer_prepare(struct vb2_buffer *vb)
190 } 206 }
191 207
192 vb2_set_plane_payload(vb, 0, size); 208 vb2_set_plane_payload(vb, 0, size);
193 vb->v4l2_buf.field = skel->format.field;
194 return 0; 209 return 0;
195} 210}
196 211
@@ -254,7 +269,7 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count)
254 * Stop the DMA engine. Any remaining buffers in the DMA queue are dequeued 269 * Stop the DMA engine. Any remaining buffers in the DMA queue are dequeued
255 * and passed on to the vb2 framework marked as STATE_ERROR. 270 * and passed on to the vb2 framework marked as STATE_ERROR.
256 */ 271 */
257static int stop_streaming(struct vb2_queue *vq) 272static void stop_streaming(struct vb2_queue *vq)
258{ 273{
259 struct skeleton *skel = vb2_get_drv_priv(vq); 274 struct skeleton *skel = vb2_get_drv_priv(vq);
260 275
@@ -262,7 +277,6 @@ static int stop_streaming(struct vb2_queue *vq)
262 277
263 /* Release all active buffers */ 278 /* Release all active buffers */
264 return_all_buffers(skel, VB2_BUF_STATE_ERROR); 279 return_all_buffers(skel, VB2_BUF_STATE_ERROR);
265 return 0;
266} 280}
267 281
268/* 282/*
@@ -319,10 +333,12 @@ static void skeleton_fill_pix_format(struct skeleton *skel,
319 /* HDMI input */ 333 /* HDMI input */
320 pix->width = skel->timings.bt.width; 334 pix->width = skel->timings.bt.width;
321 pix->height = skel->timings.bt.height; 335 pix->height = skel->timings.bt.height;
322 if (skel->timings.bt.interlaced) 336 if (skel->timings.bt.interlaced) {
323 pix->field = V4L2_FIELD_INTERLACED; 337 pix->field = V4L2_FIELD_ALTERNATE;
324 else 338 pix->height /= 2;
339 } else {
325 pix->field = V4L2_FIELD_NONE; 340 pix->field = V4L2_FIELD_NONE;
341 }
326 pix->colorspace = V4L2_COLORSPACE_REC709; 342 pix->colorspace = V4L2_COLORSPACE_REC709;
327 } 343 }
328 344
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index a9380ba54c8e..0fe36497642c 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -1794,6 +1794,11 @@ registers, find a list below:
1794 PPC | KVM_REG_PPC_MMCR0 | 64 1794 PPC | KVM_REG_PPC_MMCR0 | 64
1795 PPC | KVM_REG_PPC_MMCR1 | 64 1795 PPC | KVM_REG_PPC_MMCR1 | 64
1796 PPC | KVM_REG_PPC_MMCRA | 64 1796 PPC | KVM_REG_PPC_MMCRA | 64
1797 PPC | KVM_REG_PPC_MMCR2 | 64
1798 PPC | KVM_REG_PPC_MMCRS | 64
1799 PPC | KVM_REG_PPC_SIAR | 64
1800 PPC | KVM_REG_PPC_SDAR | 64
1801 PPC | KVM_REG_PPC_SIER | 64
1797 PPC | KVM_REG_PPC_PMC1 | 32 1802 PPC | KVM_REG_PPC_PMC1 | 32
1798 PPC | KVM_REG_PPC_PMC2 | 32 1803 PPC | KVM_REG_PPC_PMC2 | 32
1799 PPC | KVM_REG_PPC_PMC3 | 32 1804 PPC | KVM_REG_PPC_PMC3 | 32
@@ -1868,6 +1873,7 @@ registers, find a list below:
1868 PPC | KVM_REG_PPC_PPR | 64 1873 PPC | KVM_REG_PPC_PPR | 64
1869 PPC | KVM_REG_PPC_ARCH_COMPAT 32 1874 PPC | KVM_REG_PPC_ARCH_COMPAT 32
1870 PPC | KVM_REG_PPC_DABRX | 32 1875 PPC | KVM_REG_PPC_DABRX | 32
1876 PPC | KVM_REG_PPC_WORT | 64
1871 PPC | KVM_REG_PPC_TM_GPR0 | 64 1877 PPC | KVM_REG_PPC_TM_GPR0 | 64
1872 ... 1878 ...
1873 PPC | KVM_REG_PPC_TM_GPR31 | 64 1879 PPC | KVM_REG_PPC_TM_GPR31 | 64
@@ -2066,7 +2072,7 @@ the "Server" class MMU emulation supported by KVM.
2066This can in turn be used by userspace to generate the appropriate 2072This can in turn be used by userspace to generate the appropriate
2067device-tree properties for the guest operating system. 2073device-tree properties for the guest operating system.
2068 2074
2069The structure contains some global informations, followed by an 2075The structure contains some global information, followed by an
2070array of supported segment page sizes: 2076array of supported segment page sizes:
2071 2077
2072 struct kvm_ppc_smmu_info { 2078 struct kvm_ppc_smmu_info {
@@ -2126,7 +2132,7 @@ into the hash PTE second double word).
21264.75 KVM_IRQFD 21324.75 KVM_IRQFD
2127 2133
2128Capability: KVM_CAP_IRQFD 2134Capability: KVM_CAP_IRQFD
2129Architectures: x86 2135Architectures: x86 s390
2130Type: vm ioctl 2136Type: vm ioctl
2131Parameters: struct kvm_irqfd (in) 2137Parameters: struct kvm_irqfd (in)
2132Returns: 0 on success, -1 on error 2138Returns: 0 on success, -1 on error
@@ -2211,6 +2217,8 @@ KVM_S390_SIGP_STOP (vcpu) - sigp restart
2211KVM_S390_PROGRAM_INT (vcpu) - program check; code in parm 2217KVM_S390_PROGRAM_INT (vcpu) - program check; code in parm
2212KVM_S390_SIGP_SET_PREFIX (vcpu) - sigp set prefix; prefix address in parm 2218KVM_S390_SIGP_SET_PREFIX (vcpu) - sigp set prefix; prefix address in parm
2213KVM_S390_RESTART (vcpu) - restart 2219KVM_S390_RESTART (vcpu) - restart
2220KVM_S390_INT_CLOCK_COMP (vcpu) - clock comparator interrupt
2221KVM_S390_INT_CPU_TIMER (vcpu) - CPU timer interrupt
2214KVM_S390_INT_VIRTIO (vm) - virtio external interrupt; external interrupt 2222KVM_S390_INT_VIRTIO (vm) - virtio external interrupt; external interrupt
2215 parameters in parm and parm64 2223 parameters in parm and parm64
2216KVM_S390_INT_SERVICE (vm) - sclp external interrupt; sclp parameter in parm 2224KVM_S390_INT_SERVICE (vm) - sclp external interrupt; sclp parameter in parm
@@ -2314,8 +2322,8 @@ struct kvm_create_device {
2314 2322
23154.80 KVM_SET_DEVICE_ATTR/KVM_GET_DEVICE_ATTR 23234.80 KVM_SET_DEVICE_ATTR/KVM_GET_DEVICE_ATTR
2316 2324
2317Capability: KVM_CAP_DEVICE_CTRL 2325Capability: KVM_CAP_DEVICE_CTRL, KVM_CAP_VM_ATTRIBUTES for vm device
2318Type: device ioctl 2326Type: device ioctl, vm ioctl
2319Parameters: struct kvm_device_attr 2327Parameters: struct kvm_device_attr
2320Returns: 0 on success, -1 on error 2328Returns: 0 on success, -1 on error
2321Errors: 2329Errors:
@@ -2340,8 +2348,8 @@ struct kvm_device_attr {
2340 2348
23414.81 KVM_HAS_DEVICE_ATTR 23494.81 KVM_HAS_DEVICE_ATTR
2342 2350
2343Capability: KVM_CAP_DEVICE_CTRL 2351Capability: KVM_CAP_DEVICE_CTRL, KVM_CAP_VM_ATTRIBUTES for vm device
2344Type: device ioctl 2352Type: device ioctl, vm ioctl
2345Parameters: struct kvm_device_attr 2353Parameters: struct kvm_device_attr
2346Returns: 0 on success, -1 on error 2354Returns: 0 on success, -1 on error
2347Errors: 2355Errors:
@@ -2376,6 +2384,8 @@ Possible features:
2376 Depends on KVM_CAP_ARM_PSCI. 2384 Depends on KVM_CAP_ARM_PSCI.
2377 - KVM_ARM_VCPU_EL1_32BIT: Starts the CPU in a 32bit mode. 2385 - KVM_ARM_VCPU_EL1_32BIT: Starts the CPU in a 32bit mode.
2378 Depends on KVM_CAP_ARM_EL1_32BIT (arm64 only). 2386 Depends on KVM_CAP_ARM_EL1_32BIT (arm64 only).
2387 - KVM_ARM_VCPU_PSCI_0_2: Emulate PSCI v0.2 for the CPU.
2388 Depends on KVM_CAP_ARM_PSCI_0_2.
2379 2389
2380 2390
23814.83 KVM_ARM_PREFERRED_TARGET 23914.83 KVM_ARM_PREFERRED_TARGET
@@ -2738,6 +2748,21 @@ It gets triggered whenever both KVM_CAP_PPC_EPR are enabled and an
2738external interrupt has just been delivered into the guest. User space 2748external interrupt has just been delivered into the guest. User space
2739should put the acknowledged interrupt vector into the 'epr' field. 2749should put the acknowledged interrupt vector into the 'epr' field.
2740 2750
2751 /* KVM_EXIT_SYSTEM_EVENT */
2752 struct {
2753#define KVM_SYSTEM_EVENT_SHUTDOWN 1
2754#define KVM_SYSTEM_EVENT_RESET 2
2755 __u32 type;
2756 __u64 flags;
2757 } system_event;
2758
2759If exit_reason is KVM_EXIT_SYSTEM_EVENT then the vcpu has triggered
2760a system-level event using some architecture specific mechanism (hypercall
2761or some special instruction). In case of ARM/ARM64, this is triggered using
2762HVC instruction based PSCI call from the vcpu. The 'type' field describes
2763the system-level event type. The 'flags' field describes architecture
2764specific flags for the system-level event.
2765
2741 /* Fix the size of the union. */ 2766 /* Fix the size of the union. */
2742 char padding[256]; 2767 char padding[256];
2743 }; 2768 };
diff --git a/Documentation/virtual/kvm/devices/vm.txt b/Documentation/virtual/kvm/devices/vm.txt
new file mode 100644
index 000000000000..0d16f96c0eac
--- /dev/null
+++ b/Documentation/virtual/kvm/devices/vm.txt
@@ -0,0 +1,26 @@
1Generic vm interface
2====================================
3
4The virtual machine "device" also accepts the ioctls KVM_SET_DEVICE_ATTR,
5KVM_GET_DEVICE_ATTR, and KVM_HAS_DEVICE_ATTR. The interface uses the same
6struct kvm_device_attr as other devices, but targets VM-wide settings
7and controls.
8
9The groups and attributes per virtual machine, if any, are architecture
10specific.
11
121. GROUP: KVM_S390_VM_MEM_CTRL
13Architectures: s390
14
151.1. ATTRIBUTE: KVM_S390_VM_MEM_CTRL
16Parameters: none
17Returns: -EBUSY if already a vcpus is defined, otherwise 0
18
19Enables CMMA for the virtual machine
20
211.2. ATTRIBUTE: KVM_S390_VM_CLR_CMMA
22Parameteres: none
23Returns: 0
24
25Clear the CMMA status for all guest pages, so any pages the guest marked
26as unused are again used any may not be reclaimed by the host.
diff --git a/Documentation/virtual/kvm/ppc-pv.txt b/Documentation/virtual/kvm/ppc-pv.txt
index 4643cde517c4..319560646f32 100644
--- a/Documentation/virtual/kvm/ppc-pv.txt
+++ b/Documentation/virtual/kvm/ppc-pv.txt
@@ -94,10 +94,24 @@ a bitmap of available features inside the magic page.
94The following enhancements to the magic page are currently available: 94The following enhancements to the magic page are currently available:
95 95
96 KVM_MAGIC_FEAT_SR Maps SR registers r/w in the magic page 96 KVM_MAGIC_FEAT_SR Maps SR registers r/w in the magic page
97 KVM_MAGIC_FEAT_MAS0_TO_SPRG7 Maps MASn, ESR, PIR and high SPRGs
97 98
98For enhanced features in the magic page, please check for the existence of the 99For enhanced features in the magic page, please check for the existence of the
99feature before using them! 100feature before using them!
100 101
102Magic page flags
103================
104
105In addition to features that indicate whether a host is capable of a particular
106feature we also have a channel for a guest to tell the guest whether it's capable
107of something. This is what we call "flags".
108
109Flags are passed to the host in the low 12 bits of the Effective Address.
110
111The following flags are currently available for a guest to expose:
112
113 MAGIC_PAGE_FLAG_NOT_MAPPED_NX Guest handles NX bits correclty wrt magic page
114
101MSR bits 115MSR bits
102======== 116========
103 117
diff --git a/Documentation/virtual/kvm/s390-diag.txt b/Documentation/virtual/kvm/s390-diag.txt
index f1de4fbade15..48c4921794ed 100644
--- a/Documentation/virtual/kvm/s390-diag.txt
+++ b/Documentation/virtual/kvm/s390-diag.txt
@@ -78,3 +78,5 @@ DIAGNOSE function code 'X'501 - KVM breakpoint
78 78
79If the function code specifies 0x501, breakpoint functions may be performed. 79If the function code specifies 0x501, breakpoint functions may be performed.
80This function code is handled by userspace. 80This function code is handled by userspace.
81
82This diagnose function code has no subfunctions and uses no parameters.
diff --git a/Documentation/vm/hwpoison.txt b/Documentation/vm/hwpoison.txt
index 550068466605..6ae89a9edf2a 100644
--- a/Documentation/vm/hwpoison.txt
+++ b/Documentation/vm/hwpoison.txt
@@ -84,6 +84,11 @@ PR_MCE_KILL
84 PR_MCE_KILL_EARLY: Early kill 84 PR_MCE_KILL_EARLY: Early kill
85 PR_MCE_KILL_LATE: Late kill 85 PR_MCE_KILL_LATE: Late kill
86 PR_MCE_KILL_DEFAULT: Use system global default 86 PR_MCE_KILL_DEFAULT: Use system global default
87 Note that if you want to have a dedicated thread which handles
88 the SIGBUS(BUS_MCEERR_AO) on behalf of the process, you should
89 call prctl(PR_MCE_KILL_EARLY) on the designated thread. Otherwise,
90 the SIGBUS is sent to the main thread.
91
87PR_MCE_KILL_GET 92PR_MCE_KILL_GET
88 return current mode 93 return current mode
89 94
diff --git a/Documentation/vm/remap_file_pages.txt b/Documentation/vm/remap_file_pages.txt
new file mode 100644
index 000000000000..560e4363a55d
--- /dev/null
+++ b/Documentation/vm/remap_file_pages.txt
@@ -0,0 +1,28 @@
1The remap_file_pages() system call is used to create a nonlinear mapping,
2that is, a mapping in which the pages of the file are mapped into a
3nonsequential order in memory. The advantage of using remap_file_pages()
4over using repeated calls to mmap(2) is that the former approach does not
5require the kernel to create additional VMA (Virtual Memory Area) data
6structures.
7
8Supporting of nonlinear mapping requires significant amount of non-trivial
9code in kernel virtual memory subsystem including hot paths. Also to get
10nonlinear mapping work kernel need a way to distinguish normal page table
11entries from entries with file offset (pte_file). Kernel reserves flag in
12PTE for this purpose. PTE flags are scarce resource especially on some CPU
13architectures. It would be nice to free up the flag for other usage.
14
15Fortunately, there are not many users of remap_file_pages() in the wild.
16It's only known that one enterprise RDBMS implementation uses the syscall
17on 32-bit systems to map files bigger than can linearly fit into 32-bit
18virtual address space. This use-case is not critical anymore since 64-bit
19systems are widely available.
20
21The plan is to deprecate the syscall and replace it with an emulation.
22The emulation will create new VMAs instead of nonlinear mappings. It's
23going to work slower for rare users of remap_file_pages() but ABI is
24preserved.
25
26One side effect of emulation (apart from performance) is that user can hit
27vm.max_map_count limit more easily due to additional VMAs. See comment for
28DEFAULT_MAX_MAP_COUNT for more details on the limit.
diff --git a/Documentation/vm/transhuge.txt b/Documentation/vm/transhuge.txt
index 4a63953a41f1..6b31cfbe2a9a 100644
--- a/Documentation/vm/transhuge.txt
+++ b/Documentation/vm/transhuge.txt
@@ -360,13 +360,13 @@ on any tail page, would mean having to split all hugepages upfront in
360get_user_pages which is unacceptable as too many gup users are 360get_user_pages which is unacceptable as too many gup users are
361performance critical and they must work natively on hugepages like 361performance critical and they must work natively on hugepages like
362they work natively on hugetlbfs already (hugetlbfs is simpler because 362they work natively on hugetlbfs already (hugetlbfs is simpler because
363hugetlbfs pages cannot be splitted so there wouldn't be requirement of 363hugetlbfs pages cannot be split so there wouldn't be requirement of
364accounting the pins on the tail pages for hugetlbfs). If we wouldn't 364accounting the pins on the tail pages for hugetlbfs). If we wouldn't
365account the gup refcounts on the tail pages during gup, we won't know 365account the gup refcounts on the tail pages during gup, we won't know
366anymore which tail page is pinned by gup and which is not while we run 366anymore which tail page is pinned by gup and which is not while we run
367split_huge_page. But we still have to add the gup pin to the head page 367split_huge_page. But we still have to add the gup pin to the head page
368too, to know when we can free the compound page in case it's never 368too, to know when we can free the compound page in case it's never
369splitted during its lifetime. That requires changing not just 369split during its lifetime. That requires changing not just
370get_page, but put_page as well so that when put_page runs on a tail 370get_page, but put_page as well so that when put_page runs on a tail
371page (and only on a tail page) it will find its respective head page, 371page (and only on a tail page) it will find its respective head page,
372and then it will decrease the head page refcount in addition to the 372and then it will decrease the head page refcount in addition to the
diff --git a/Documentation/w1/w1.generic b/Documentation/w1/w1.generic
index a31c5a242973..b2033c64c7da 100644
--- a/Documentation/w1/w1.generic
+++ b/Documentation/w1/w1.generic
@@ -82,7 +82,7 @@ driver - (standard) symlink to the w1 driver
82w1_master_add - Manually register a slave device 82w1_master_add - Manually register a slave device
83w1_master_attempts - the number of times a search was attempted 83w1_master_attempts - the number of times a search was attempted
84w1_master_max_slave_count 84w1_master_max_slave_count
85 - the maximum slaves that may be attached to a master 85 - maximum number of slaves to search for at a time
86w1_master_name - the name of the device (w1_bus_masterX) 86w1_master_name - the name of the device (w1_bus_masterX)
87w1_master_pullup - 5V strong pullup 0 enabled, 1 disabled 87w1_master_pullup - 5V strong pullup 0 enabled, 1 disabled
88w1_master_remove - Manually remove a slave device 88w1_master_remove - Manually remove a slave device
diff --git a/Documentation/w1/w1.netlink b/Documentation/w1/w1.netlink
index 927a52cc0519..ef2727192d69 100644
--- a/Documentation/w1/w1.netlink
+++ b/Documentation/w1/w1.netlink
@@ -30,7 +30,7 @@ Protocol.
30 W1_SLAVE_CMD 30 W1_SLAVE_CMD
31 userspace command for slave device 31 userspace command for slave device
32 (read/write/touch) 32 (read/write/touch)
33 __u8 res - reserved 33 __u8 status - error indication from kernel
34 __u16 len - size of data attached to this header data 34 __u16 len - size of data attached to this header data
35 union { 35 union {
36 __u8 id[8]; - slave unique device id 36 __u8 id[8]; - slave unique device id
@@ -44,10 +44,14 @@ Protocol.
44 __u8 cmd - command opcode. 44 __u8 cmd - command opcode.
45 W1_CMD_READ - read command 45 W1_CMD_READ - read command
46 W1_CMD_WRITE - write command 46 W1_CMD_WRITE - write command
47 W1_CMD_TOUCH - touch command
48 (write and sample data back to userspace)
49 W1_CMD_SEARCH - search command 47 W1_CMD_SEARCH - search command
50 W1_CMD_ALARM_SEARCH - alarm search command 48 W1_CMD_ALARM_SEARCH - alarm search command
49 W1_CMD_TOUCH - touch command
50 (write and sample data back to userspace)
51 W1_CMD_RESET - send bus reset
52 W1_CMD_SLAVE_ADD - add slave to kernel list
53 W1_CMD_SLAVE_REMOVE - remove slave from kernel list
54 W1_CMD_LIST_SLAVES - get slaves list from kernel
51 __u8 res - reserved 55 __u8 res - reserved
52 __u16 len - length of data for this command 56 __u16 len - length of data for this command
53 For read command data must be allocated like for write command 57 For read command data must be allocated like for write command
@@ -87,8 +91,7 @@ format:
87 id0 ... idN 91 id0 ... idN
88 92
89 Each message is at most 4k in size, so if number of master devices 93 Each message is at most 4k in size, so if number of master devices
90 exceeds this, it will be split into several messages, 94 exceeds this, it will be split into several messages.
91 cn.seq will be increased for each one.
92 95
93W1 search and alarm search commands. 96W1 search and alarm search commands.
94request: 97request:
diff --git a/Documentation/x86/earlyprintk.txt b/Documentation/x86/earlyprintk.txt
index f19802c0f485..688e3eeed21d 100644
--- a/Documentation/x86/earlyprintk.txt
+++ b/Documentation/x86/earlyprintk.txt
@@ -33,7 +33,7 @@ and two USB cables, connected like this:
33 ... 33 ...
34 34
35( If your system does not list a debug port capability then you probably 35( If your system does not list a debug port capability then you probably
36 wont be able to use the USB debug key. ) 36 won't be able to use the USB debug key. )
37 37
38 b.) You also need a Netchip USB debug cable/key: 38 b.) You also need a Netchip USB debug cable/key:
39 39
diff --git a/Documentation/x86/i386/IO-APIC.txt b/Documentation/x86/i386/IO-APIC.txt
index 30b4c714fbe1..15f5baf7e1b6 100644
--- a/Documentation/x86/i386/IO-APIC.txt
+++ b/Documentation/x86/i386/IO-APIC.txt
@@ -87,7 +87,7 @@ your PCI configuration:
87 87
88 echo -n pirq=; echo `scanpci | grep T_L | cut -c56-` | sed 's/ /,/g' 88 echo -n pirq=; echo `scanpci | grep T_L | cut -c56-` | sed 's/ /,/g'
89 89
90note that this script wont work if you have skipped a few slots or if your 90note that this script won't work if you have skipped a few slots or if your
91board does not do default daisy-chaining. (or the IO-APIC has the PIRQ pins 91board does not do default daisy-chaining. (or the IO-APIC has the PIRQ pins
92connected in some strange way). E.g. if in the above case you have your SCSI 92connected in some strange way). E.g. if in the above case you have your SCSI
93card (IRQ11) in Slot3, and have Slot1 empty: 93card (IRQ11) in Slot3, and have Slot1 empty:
diff --git a/Documentation/x86/x86_64/mm.txt b/Documentation/x86/x86_64/mm.txt
index c584a51add15..afe68ddbe6a4 100644
--- a/Documentation/x86/x86_64/mm.txt
+++ b/Documentation/x86/x86_64/mm.txt
@@ -12,6 +12,8 @@ ffffc90000000000 - ffffe8ffffffffff (=45 bits) vmalloc/ioremap space
12ffffe90000000000 - ffffe9ffffffffff (=40 bits) hole 12ffffe90000000000 - ffffe9ffffffffff (=40 bits) hole
13ffffea0000000000 - ffffeaffffffffff (=40 bits) virtual memory map (1TB) 13ffffea0000000000 - ffffeaffffffffff (=40 bits) virtual memory map (1TB)
14... unused hole ... 14... unused hole ...
15ffffff0000000000 - ffffff7fffffffff (=39 bits) %esp fixup stacks
16... unused hole ...
15ffffffff80000000 - ffffffffa0000000 (=512 MB) kernel text mapping, from phys 0 17ffffffff80000000 - ffffffffa0000000 (=512 MB) kernel text mapping, from phys 0
16ffffffffa0000000 - ffffffffff5fffff (=1525 MB) module mapping space 18ffffffffa0000000 - ffffffffff5fffff (=1525 MB) module mapping space
17ffffffffff600000 - ffffffffffdfffff (=8 MB) vsyscalls 19ffffffffff600000 - ffffffffffdfffff (=8 MB) vsyscalls