summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2015-07-06 08:33:17 -0400
committerTony Lindgren <tony@atomide.com>2015-07-06 08:33:17 -0400
commitae745302c0a3e2b5b768690f631fc14db44467e7 (patch)
tree1db4d210a7419286b447dc09fa7400a561d55f42 /Documentation
parente3abe2556b2a689b28926cd1581f0b97e9d2afa4 (diff)
parent22a5dc10e3f8fb8370748ea19dc4e3e1620d8296 (diff)
Merge branch 'fixes-rc1' into omap-for-v4.2/fixes
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/stable/sysfs-bus-w111
-rw-r--r--Documentation/ABI/stable/sysfs-driver-w1_ds28ea006
-rw-r--r--Documentation/ABI/testing/configfs-spear-pcie-gadget2
-rw-r--r--Documentation/ABI/testing/dev-kmsg9
-rw-r--r--Documentation/ABI/testing/ima_policy26
-rw-r--r--Documentation/ABI/testing/sysfs-ata11
-rw-r--r--Documentation/ABI/testing/sysfs-bus-coresight-devices-etm4x450
-rw-r--r--Documentation/ABI/testing/sysfs-bus-fcoe12
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio99
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio-vf6107
-rw-r--r--Documentation/ABI/testing/sysfs-bus-mei16
-rw-r--r--Documentation/ABI/testing/sysfs-bus-pci-drivers-janz-cmodio8
-rw-r--r--Documentation/ABI/testing/sysfs-bus-usb-lvstest12
-rw-r--r--Documentation/ABI/testing/sysfs-class-cxl33
-rw-r--r--Documentation/ABI/testing/sysfs-class-net19
-rw-r--r--Documentation/ABI/testing/sysfs-class-net-janz-ican319
-rw-r--r--Documentation/ABI/testing/sysfs-class-scsi_tape109
-rw-r--r--Documentation/ABI/testing/sysfs-class-zram24
-rw-r--r--Documentation/ABI/testing/sysfs-devices-system-cpu4
-rw-r--r--Documentation/ABI/testing/sysfs-driver-hid-logitech-lg4ff8
-rw-r--r--Documentation/ABI/testing/sysfs-driver-toshiba_haps20
-rw-r--r--Documentation/ABI/testing/sysfs-firmware-dmi-entries (renamed from Documentation/ABI/testing/sysfs-firmware-dmi)2
-rw-r--r--Documentation/ABI/testing/sysfs-firmware-dmi-tables22
-rw-r--r--Documentation/ABI/testing/sysfs-firmware-efi10
-rw-r--r--Documentation/ABI/testing/sysfs-firmware-efi-esrt81
-rw-r--r--Documentation/ABI/testing/sysfs-platform-twl4030-usb8
-rw-r--r--Documentation/CodingStyle2
-rw-r--r--Documentation/DMA-API-HOWTO.txt33
-rw-r--r--Documentation/DMA-API.txt30
-rw-r--r--Documentation/DocBook/crypto-API.tmpl67
-rw-r--r--Documentation/DocBook/drm.tmpl64
-rw-r--r--Documentation/DocBook/kernel-hacking.tmpl2
-rw-r--r--Documentation/DocBook/media/.gitignore1
-rw-r--r--Documentation/DocBook/media/Makefile88
-rw-r--r--Documentation/DocBook/media/dvb/audio.xml6
-rw-r--r--Documentation/DocBook/media/dvb/ca.xml4
-rw-r--r--Documentation/DocBook/media/dvb/demux.xml61
-rw-r--r--Documentation/DocBook/media/dvb/dvbapi.xml34
-rw-r--r--Documentation/DocBook/media/dvb/dvbproperty.xml1117
-rw-r--r--Documentation/DocBook/media/dvb/examples.xml6
-rw-r--r--Documentation/DocBook/media/dvb/fe-diseqc-recv-slave-reply.xml78
-rw-r--r--Documentation/DocBook/media/dvb/fe-diseqc-reset-overload.xml51
-rw-r--r--Documentation/DocBook/media/dvb/fe-diseqc-send-burst.xml89
-rw-r--r--Documentation/DocBook/media/dvb/fe-diseqc-send-master-cmd.xml72
-rw-r--r--Documentation/DocBook/media/dvb/fe-enable-high-lnb-voltage.xml61
-rw-r--r--Documentation/DocBook/media/dvb/fe-get-info.xml266
-rw-r--r--Documentation/DocBook/media/dvb/fe-get-property.xml81
-rw-r--r--Documentation/DocBook/media/dvb/fe-read-status.xml107
-rw-r--r--Documentation/DocBook/media/dvb/fe-set-frontend-tune-mode.xml64
-rw-r--r--Documentation/DocBook/media/dvb/fe-set-tone.xml91
-rw-r--r--Documentation/DocBook/media/dvb/fe-set-voltage.xml69
-rw-r--r--Documentation/DocBook/media/dvb/frontend.xml1747
-rw-r--r--Documentation/DocBook/media/dvb/frontend_legacy_api.xml654
-rw-r--r--Documentation/DocBook/media/dvb/intro.xml30
-rw-r--r--Documentation/DocBook/media/dvb/kdapi.xml4
-rw-r--r--Documentation/DocBook/media/dvb/net.xml374
-rw-r--r--Documentation/DocBook/media/dvb/video.xml10
-rw-r--r--Documentation/DocBook/media/typical_media_device.svg28
-rw-r--r--Documentation/DocBook/media/v4l/controls.xml4
-rw-r--r--Documentation/DocBook/media/v4l/io.xml26
-rw-r--r--Documentation/DocBook/media/v4l/media-func-open.xml2
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt-y16-be.xml81
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt.xml134
-rw-r--r--Documentation/DocBook/media/v4l/remote_controllers.xml2
-rw-r--r--Documentation/DocBook/media/v4l/subdev-formats.xml12
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-create-bufs.xml3
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml12
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-dqevent.xml5
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml10
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-enum-frameintervals.xml3
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-enum-framesizes.xml3
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-expbuf.xml3
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-dv-timings.xml4
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-edid.xml11
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-selection.xml2
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-qbuf.xml10
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-query-dv-timings.xml3
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-querybuf.xml3
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-reqbufs.xml4
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml3
-rw-r--r--Documentation/DocBook/media_api.tmpl53
-rw-r--r--Documentation/DocBook/scsi.tmpl2
-rw-r--r--Documentation/IPMI.txt5
-rw-r--r--Documentation/RCU/RTFP.txt2
-rw-r--r--Documentation/RCU/arrayRCU.txt20
-rw-r--r--Documentation/RCU/lockdep.txt10
-rw-r--r--Documentation/RCU/rcu_dereference.txt38
-rw-r--r--Documentation/RCU/whatisRCU.txt6
-rw-r--r--Documentation/SubmittingPatches4
-rw-r--r--Documentation/acpi/enumeration.txt59
-rw-r--r--Documentation/acpi/gpio-properties.txt6
-rw-r--r--Documentation/arm/CCN.txt17
-rw-r--r--Documentation/arm/Samsung/Bootloader-interface.txt53
-rw-r--r--Documentation/arm/stm32/overview.txt32
-rw-r--r--Documentation/arm/stm32/stm32f429-overview.txt22
-rw-r--r--Documentation/arm/vlocks.txt2
-rw-r--r--Documentation/arm64/booting.txt10
-rw-r--r--Documentation/blackfin/gptimers-example.c14
-rw-r--r--Documentation/blockdev/zram.txt29
-rw-r--r--Documentation/cgroups/blkio-controller.txt83
-rw-r--r--Documentation/cgroups/memory.txt1
-rw-r--r--Documentation/cgroups/unified-hierarchy.txt102
-rw-r--r--Documentation/clk.txt27
-rw-r--r--Documentation/cpu-freq/governors.txt2
-rw-r--r--Documentation/cpu-freq/intel-pstate.txt21
-rw-r--r--Documentation/cpu-freq/user-guide.txt2
-rw-r--r--Documentation/cputopology.txt37
-rw-r--r--Documentation/debugging-via-ohci1394.txt2
-rw-r--r--Documentation/device-mapper/cache-policies.txt67
-rw-r--r--Documentation/device-mapper/cache.txt9
-rw-r--r--Documentation/device-mapper/dm-raid.txt2
-rw-r--r--Documentation/device-mapper/statistics.txt41
-rw-r--r--Documentation/devicetree/bindings/arc/archs-idu-intc.txt46
-rw-r--r--Documentation/devicetree/bindings/arc/archs-intc.txt22
-rw-r--r--Documentation/devicetree/bindings/arc/axs101.txt7
-rw-r--r--Documentation/devicetree/bindings/arc/axs103.txt8
-rw-r--r--Documentation/devicetree/bindings/arm/altera/socfpga-sdram-controller.txt12
-rw-r--r--Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.txt2
-rw-r--r--Documentation/devicetree/bindings/arm/arm-boards66
-rw-r--r--Documentation/devicetree/bindings/arm/armv7m_systick.txt26
-rw-r--r--Documentation/devicetree/bindings/arm/atmel-at91.txt2
-rw-r--r--Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt31
-rw-r--r--Documentation/devicetree/bindings/arm/bcm/brcm,bcm63138.txt76
-rw-r--r--Documentation/devicetree/bindings/arm/cci.txt4
-rw-r--r--Documentation/devicetree/bindings/arm/coresight.txt12
-rw-r--r--Documentation/devicetree/bindings/arm/cpus.txt1
-rw-r--r--Documentation/devicetree/bindings/arm/exynos/power_domain.txt7
-rw-r--r--Documentation/devicetree/bindings/arm/fsl.txt3
-rw-r--r--Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt87
-rw-r--r--Documentation/devicetree/bindings/arm/l2cc.txt5
-rw-r--r--Documentation/devicetree/bindings/arm/marvell,berlin.txt100
-rw-r--r--Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt23
-rw-r--r--Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt30
-rw-r--r--Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt30
-rw-r--r--Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt23
-rw-r--r--Documentation/devicetree/bindings/arm/omap/l3-noc.txt1
-rw-r--r--Documentation/devicetree/bindings/arm/scu.txt25
-rw-r--r--Documentation/devicetree/bindings/arm/ux500/boards.txt83
-rw-r--r--Documentation/devicetree/bindings/arm/zte.txt15
-rw-r--r--Documentation/devicetree/bindings/ata/ahci-ceva.txt20
-rw-r--r--Documentation/devicetree/bindings/ata/ahci-platform.txt2
-rw-r--r--Documentation/devicetree/bindings/ata/brcm,sata-brcmstb.txt34
-rw-r--r--Documentation/devicetree/bindings/clock/amlogic,meson8b-clkc.txt40
-rw-r--r--Documentation/devicetree/bindings/clock/at91-clock.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt34
-rw-r--r--Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt132
-rw-r--r--Documentation/devicetree/bindings/clock/clock-bindings.txt7
-rw-r--r--Documentation/devicetree/bindings/clock/csr,atlas7-car.txt55
-rw-r--r--Documentation/devicetree/bindings/clock/emev2-clock.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/hi6220-clock.txt34
-rw-r--r--Documentation/devicetree/bindings/clock/imx7d-clock.txt13
-rw-r--r--Documentation/devicetree/bindings/clock/ingenic,cgu.txt53
-rw-r--r--Documentation/devicetree/bindings/clock/keystone-pll.txt8
-rw-r--r--Documentation/devicetree/bindings/clock/lpc1850-ccu.txt77
-rw-r--r--Documentation/devicetree/bindings/clock/lpc1850-cgu.txt131
-rw-r--r--Documentation/devicetree/bindings/clock/marvell,berlin.txt31
-rw-r--r--Documentation/devicetree/bindings/clock/marvell,pxa1928.txt21
-rw-r--r--Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt1
-rw-r--r--Documentation/devicetree/bindings/clock/nvidia,tegra124-car.txt44
-rw-r--r--Documentation/devicetree/bindings/clock/qca,ath79-pll.txt33
-rw-r--r--Documentation/devicetree/bindings/clock/renesas,cpg-div6-clocks.txt6
-rw-r--r--Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt6
-rw-r--r--Documentation/devicetree/bindings/clock/renesas,h8300-div-clock.txt24
-rw-r--r--Documentation/devicetree/bindings/clock/renesas,h8s2678-pll-clock.txt23
-rw-r--r--Documentation/devicetree/bindings/clock/renesas,rcar-gen2-cpg-clocks.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/renesas,rz-cpg-clocks.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/silabs,si5351.txt4
-rw-r--r--Documentation/devicetree/bindings/clock/st,stm32-rcc.txt65
-rw-r--r--Documentation/devicetree/bindings/clock/sunxi.txt1
-rw-r--r--Documentation/devicetree/bindings/clock/ti,cdce925.txt42
-rw-r--r--Documentation/devicetree/bindings/clock/zx296702-clk.txt35
-rw-r--r--Documentation/devicetree/bindings/crypto/fsl-sec2.txt6
-rw-r--r--Documentation/devicetree/bindings/crypto/marvell-cesa.txt45
-rw-r--r--Documentation/devicetree/bindings/crypto/mv_cesa.txt31
-rw-r--r--Documentation/devicetree/bindings/dma/dma.txt28
-rw-r--r--Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt2
-rw-r--r--Documentation/devicetree/bindings/dma/mv-xor.txt2
-rw-r--r--Documentation/devicetree/bindings/dma/sirfsoc-dma.txt3
-rw-r--r--Documentation/devicetree/bindings/dma/sun6i-dma.txt5
-rw-r--r--Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt52
-rw-r--r--Documentation/devicetree/bindings/drm/msm/dsi.txt120
-rw-r--r--Documentation/devicetree/bindings/drm/msm/edp.txt60
-rw-r--r--Documentation/devicetree/bindings/drm/msm/hdmi.txt6
-rw-r--r--Documentation/devicetree/bindings/drm/tilcdc/slave.txt18
-rw-r--r--Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt27
-rw-r--r--Documentation/devicetree/bindings/edac/apm-xgene-edac.txt79
-rw-r--r--Documentation/devicetree/bindings/fuse/nvidia,tegra20-fuse.txt2
-rw-r--r--Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt65
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-ath79.txt38
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-atlas7.txt50
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-etraxfs.txt21
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-xlp.txt47
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-zynq.txt2
-rw-r--r--Documentation/devicetree/bindings/gpio/nxp,lpc1850-gpio.txt39
-rw-r--r--Documentation/devicetree/bindings/h8300/cpu.txt13
-rw-r--r--Documentation/devicetree/bindings/hwlock/hwlock.txt59
-rw-r--r--Documentation/devicetree/bindings/hwlock/omap-hwspinlock.txt26
-rw-r--r--Documentation/devicetree/bindings/hwlock/qcom-hwspinlock.txt39
-rw-r--r--Documentation/devicetree/bindings/hwlock/sirf,hwspinlock.txt28
-rw-r--r--Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt1
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-at91.txt30
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-brcmstb.txt28
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-mt6577.txt41
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-xgene-slimpro.txt15
-rw-r--r--Documentation/devicetree/bindings/i2c/trivial-devices.txt3
-rw-r--r--Documentation/devicetree/bindings/iio/adc/berlin2_adc.txt19
-rw-r--r--Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt4
-rw-r--r--Documentation/devicetree/bindings/iio/adc/vf610-adc.txt9
-rw-r--r--Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt17
-rw-r--r--Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt22
-rw-r--r--Documentation/devicetree/bindings/iio/st-sensors.txt2
-rw-r--r--Documentation/devicetree/bindings/iio/temperature/mlx90614.txt24
-rw-r--r--Documentation/devicetree/bindings/input/ti,drv2665.txt17
-rw-r--r--Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt24
-rw-r--r--Documentation/devicetree/bindings/input/touchscreen/tsc2005.txt4
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/atmel,aic.txt2
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/ingenic,intc.txt28
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/qca,ath79-cpu-intc.txt44
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt30
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/renesas,h8300h-intc.txt22
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/renesas,h8s-intc.txt22
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt39
-rw-r--r--Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt37
-rw-r--r--Documentation/devicetree/bindings/leds/leds-aat1290.txt73
-rw-r--r--Documentation/devicetree/bindings/leds/leds-bcm6328.txt309
-rw-r--r--Documentation/devicetree/bindings/leds/leds-bcm6358.txt145
-rw-r--r--Documentation/devicetree/bindings/leds/leds-ktd2692.txt50
-rw-r--r--Documentation/devicetree/bindings/leds/leds-tlc591xx.txt40
-rw-r--r--Documentation/devicetree/bindings/mailbox/brcm,bcm2835-mbox.txt26
-rw-r--r--Documentation/devicetree/bindings/mailbox/mailbox.txt10
-rw-r--r--Documentation/devicetree/bindings/media/i2c/adp1653.txt37
-rw-r--r--Documentation/devicetree/bindings/media/st,stih4xx.txt32
-rw-r--r--Documentation/devicetree/bindings/memory-controllers/ath79-ddr-controller.txt35
-rw-r--r--Documentation/devicetree/bindings/memory-controllers/nvidia,tegra-mc.txt84
-rw-r--r--Documentation/devicetree/bindings/memory-controllers/renesas,h8300-bsc.txt12
-rw-r--r--Documentation/devicetree/bindings/memory-controllers/tegra-emc.txt374
-rw-r--r--Documentation/devicetree/bindings/memory-controllers/ti/emif.txt1
-rw-r--r--Documentation/devicetree/bindings/mfd/arizona.txt19
-rw-r--r--Documentation/devicetree/bindings/mfd/axp20x.txt32
-rw-r--r--Documentation/devicetree/bindings/mfd/cros-ec.txt4
-rw-r--r--Documentation/devicetree/bindings/mfd/da9063.txt18
-rw-r--r--Documentation/devicetree/bindings/mfd/max77686.txt2
-rw-r--r--Documentation/devicetree/bindings/mfd/max77693.txt67
-rw-r--r--Documentation/devicetree/bindings/mfd/mfd.txt41
-rw-r--r--[-rwxr-xr-x]Documentation/devicetree/bindings/mfd/tps6507x.txt0
-rw-r--r--Documentation/devicetree/bindings/mips/ath79-soc.txt21
-rw-r--r--Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt2
-rw-r--r--Documentation/devicetree/bindings/mmc/arasan,sdhci.txt3
-rw-r--r--Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt9
-rw-r--r--Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt28
-rw-r--r--Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt4
-rw-r--r--Documentation/devicetree/bindings/mmc/mmc.txt5
-rw-r--r--Documentation/devicetree/bindings/mmc/mtk-sd.txt32
-rw-r--r--Documentation/devicetree/bindings/mmc/renesas,mmcif.txt3
-rw-r--r--Documentation/devicetree/bindings/mtd/brcm,brcmnand.txt150
-rw-r--r--Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt (renamed from Documentation/devicetree/bindings/mtd/m25p80.txt)6
-rw-r--r--Documentation/devicetree/bindings/net/amd-xgbe-phy.txt48
-rw-r--r--Documentation/devicetree/bindings/net/amd-xgbe.txt40
-rw-r--r--Documentation/devicetree/bindings/net/cdns-emac.txt3
-rw-r--r--Documentation/devicetree/bindings/net/ezchip_enet.txt15
-rw-r--r--Documentation/devicetree/bindings/net/ipq806x-dwmac.txt35
-rw-r--r--Documentation/devicetree/bindings/net/macb.txt6
-rw-r--r--Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt2
-rw-r--r--Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt29
-rw-r--r--Documentation/devicetree/bindings/net/nfc/st-nci.txt (renamed from Documentation/devicetree/bindings/net/nfc/st21nfcb.txt)4
-rw-r--r--Documentation/devicetree/bindings/net/nfc/trf7970a.txt4
-rw-r--r--Documentation/devicetree/bindings/net/nxp,lpc1850-dwmac.txt20
-rw-r--r--Documentation/devicetree/bindings/net/phy.txt3
-rw-r--r--Documentation/devicetree/bindings/net/renesas,ravb.txt48
-rw-r--r--Documentation/devicetree/bindings/net/rockchip-dwmac.txt2
-rw-r--r--Documentation/devicetree/bindings/net/ti,dp83867.txt25
-rw-r--r--Documentation/devicetree/bindings/panel/hannstar,hsd100pxn1.txt7
-rw-r--r--Documentation/devicetree/bindings/panel/lg,lb070wv8.txt7
-rw-r--r--Documentation/devicetree/bindings/pci/xgene-pci-msi.txt68
-rw-r--r--Documentation/devicetree/bindings/pci/xilinx-pcie.txt2
-rw-r--r--Documentation/devicetree/bindings/phy/brcm,brcmstb-sata-phy.txt40
-rw-r--r--Documentation/devicetree/bindings/phy/pistachio-usb-phy.txt29
-rw-r--r--Documentation/devicetree/bindings/phy/pxa1928-usb-phy.txt18
-rw-r--r--Documentation/devicetree/bindings/phy/rcar-gen2-phy.txt1
-rw-r--r--Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/berlin,pinctrl.txt43
-rw-r--r--Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt27
-rw-r--r--Documentation/devicetree/bindings/pinctrl/img,pistachio-pinctrl.txt217
-rw-r--r--Documentation/devicetree/bindings/pinctrl/lantiq,pinctrl-falcon.txt (renamed from Documentation/devicetree/bindings/pinctrl/lantiq,falcon-pinumx.txt)0
-rw-r--r--Documentation/devicetree/bindings/pinctrl/lantiq,pinctrl-xway.txt (renamed from Documentation/devicetree/bindings/pinctrl/lantiq,xway-pinumx.txt)0
-rw-r--r--Documentation/devicetree/bindings/pinctrl/marvell,armada-370-pinctrl.txt18
-rw-r--r--Documentation/devicetree/bindings/pinctrl/marvell,armada-375-pinctrl.txt34
-rw-r--r--Documentation/devicetree/bindings/pinctrl/marvell,armada-38x-pinctrl.txt66
-rw-r--r--Documentation/devicetree/bindings/pinctrl/marvell,armada-39x-pinctrl.txt84
-rw-r--r--Documentation/devicetree/bindings/pinctrl/marvell,armada-xp-pinctrl.txt80
-rw-r--r--Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.txt57
-rw-r--r--Documentation/devicetree/bindings/pinctrl/pinctrl-atlas7.txt109
-rw-r--r--Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt9
-rw-r--r--Documentation/devicetree/bindings/pinctrl/qcom,msm8660-pinctrl.txt90
-rw-r--r--Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt4
-rw-r--r--Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt5
-rw-r--r--Documentation/devicetree/bindings/pinctrl/xlnx,zynq-pinctrl.txt7
-rw-r--r--Documentation/devicetree/bindings/power/bq24257.txt21
-rw-r--r--Documentation/devicetree/bindings/power/bq25890.txt46
-rw-r--r--Documentation/devicetree/bindings/power/opp.txt448
-rw-r--r--Documentation/devicetree/bindings/power/rt9455_charger.txt48
-rw-r--r--Documentation/devicetree/bindings/power/twl-charger.txt10
-rw-r--r--Documentation/devicetree/bindings/power_supply/max17042_battery.txt13
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/fman.txt13
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/guts.txt5
-rw-r--r--Documentation/devicetree/bindings/regulator/max8973-regulator.txt20
-rw-r--r--Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt121
-rw-r--r--Documentation/devicetree/bindings/regulator/regulator.txt7
-rw-r--r--Documentation/devicetree/bindings/remoteproc/wkup_m3_rproc.txt52
-rw-r--r--Documentation/devicetree/bindings/reset/berlin,reset.txt23
-rw-r--r--Documentation/devicetree/bindings/reset/brcm,bcm63138-pmb.txt19
-rw-r--r--Documentation/devicetree/bindings/rtc/abracon,abx80x.txt30
-rw-r--r--Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt2
-rw-r--r--Documentation/devicetree/bindings/rtc/rtc-st-lpc.txt25
-rw-r--r--Documentation/devicetree/bindings/rtc/s3c-rtc.txt3
-rw-r--r--Documentation/devicetree/bindings/serial/arm_sbsa_uart.txt10
-rw-r--r--Documentation/devicetree/bindings/serial/ingenic,uart.txt22
-rw-r--r--Documentation/devicetree/bindings/serial/mtk-uart.txt12
-rw-r--r--Documentation/devicetree/bindings/serial/nxp,lpc1850-uart.txt28
-rw-r--r--Documentation/devicetree/bindings/serial/nxp,sc16is7xx.txt37
-rw-r--r--Documentation/devicetree/bindings/serial/pl011.txt2
-rw-r--r--Documentation/devicetree/bindings/serial/renesas,sci-serial.txt8
-rw-r--r--Documentation/devicetree/bindings/serial/sirf-uart.txt15
-rw-r--r--Documentation/devicetree/bindings/serial/uniphier-uart.txt23
-rw-r--r--Documentation/devicetree/bindings/soc/fsl/qman-portals.txt4
-rw-r--r--Documentation/devicetree/bindings/soc/sunxi/sram.txt72
-rw-r--r--Documentation/devicetree/bindings/sound/adi,adau1701.txt4
-rw-r--r--Documentation/devicetree/bindings/sound/bt-sco.txt13
-rw-r--r--Documentation/devicetree/bindings/sound/gtm601.txt13
-rw-r--r--Documentation/devicetree/bindings/sound/max98090.txt6
-rw-r--r--Documentation/devicetree/bindings/sound/mt8173-max98090.txt13
-rw-r--r--Documentation/devicetree/bindings/sound/mt8173-rt5650-rt5676.txt13
-rw-r--r--Documentation/devicetree/bindings/sound/mtk-afe-pcm.txt45
-rw-r--r--Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt60
-rw-r--r--Documentation/devicetree/bindings/sound/qcom,lpass-cpu.txt13
-rw-r--r--Documentation/devicetree/bindings/sound/renesas,rsnd.txt3
-rw-r--r--Documentation/devicetree/bindings/sound/rt5645.txt72
-rw-r--r--Documentation/devicetree/bindings/sound/rt5677.txt2
-rw-r--r--Documentation/devicetree/bindings/sound/simple-card.txt6
-rw-r--r--Documentation/devicetree/bindings/sound/tas2552.txt6
-rw-r--r--Documentation/devicetree/bindings/sound/tas571x.txt41
-rw-r--r--Documentation/devicetree/bindings/sound/wm8741.txt11
-rw-r--r--Documentation/devicetree/bindings/sound/zte,zx-i2s.txt44
-rw-r--r--Documentation/devicetree/bindings/sound/zte,zx-spdif.txt28
-rw-r--r--Documentation/devicetree/bindings/spi/sh-msiof.txt2
-rw-r--r--Documentation/devicetree/bindings/spi/spi-ath79.txt24
-rw-r--r--Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt2
-rw-r--r--Documentation/devicetree/bindings/spi/spi-orion.txt8
-rw-r--r--Documentation/devicetree/bindings/spi/spi-sirf.txt3
-rw-r--r--Documentation/devicetree/bindings/spi/spi-zynqmp-qspi.txt26
-rw-r--r--Documentation/devicetree/bindings/spi/spi_atmel.txt8
-rw-r--r--Documentation/devicetree/bindings/spi/spi_pl022.txt2
-rw-r--r--Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt23
-rw-r--r--Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt57
-rw-r--r--Documentation/devicetree/bindings/thermal/thermal.txt9
-rw-r--r--Documentation/devicetree/bindings/timer/cadence,ttc-timer.txt4
-rw-r--r--Documentation/devicetree/bindings/timer/nxp,lpc3220-timer.txt26
-rw-r--r--Documentation/devicetree/bindings/timer/renesas,16bit-timer.txt25
-rw-r--r--Documentation/devicetree/bindings/timer/renesas,8bit-timer.txt25
-rw-r--r--Documentation/devicetree/bindings/timer/renesas,tpu.txt21
-rw-r--r--Documentation/devicetree/bindings/timer/st,stm32-timer.txt22
-rw-r--r--Documentation/devicetree/bindings/usb/atmel-usb.txt31
-rw-r--r--Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt35
-rw-r--r--Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt17
-rw-r--r--Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt22
-rw-r--r--Documentation/devicetree/bindings/usb/ci-hdrc-zevio.txt17
-rw-r--r--Documentation/devicetree/bindings/usb/dwc3-st.txt7
-rw-r--r--Documentation/devicetree/bindings/usb/dwc3.txt2
-rw-r--r--Documentation/devicetree/bindings/usb/msm-hsusb.txt11
-rw-r--r--Documentation/devicetree/bindings/usb/renesas_usbhs.txt7
-rw-r--r--Documentation/devicetree/bindings/usb/twlxxxx-usb.txt3
-rw-r--r--Documentation/devicetree/bindings/usb/usb-ehci.txt2
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt18
-rw-r--r--Documentation/devicetree/bindings/video/exynos-mic.txt51
-rw-r--r--Documentation/devicetree/bindings/video/exynos5433-decon.txt65
-rw-r--r--Documentation/devicetree/bindings/video/exynos_dsim.txt31
-rw-r--r--Documentation/devicetree/bindings/video/ssd1307fb.txt23
-rw-r--r--Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt25
-rw-r--r--Documentation/devicetree/bindings/watchdog/omap-wdt.txt9
-rw-r--r--Documentation/devicetree/bindings/watchdog/st_lpc_wdt.txt38
-rw-r--r--Documentation/devicetree/booting-without-of.txt4
-rw-r--r--Documentation/dmaengine/provider.txt11
-rw-r--r--Documentation/dmaengine/pxa_dma.txt153
-rw-r--r--Documentation/edac.txt289
-rw-r--r--Documentation/features/arch-support.txt11
-rw-r--r--Documentation/features/core/BPF-JIT/arch-support.txt40
-rw-r--r--Documentation/features/core/generic-idle-thread/arch-support.txt40
-rw-r--r--Documentation/features/core/jump-labels/arch-support.txt40
-rw-r--r--Documentation/features/core/tracehook/arch-support.txt40
-rw-r--r--Documentation/features/debug/KASAN/arch-support.txt40
-rw-r--r--Documentation/features/debug/gcov-profile-all/arch-support.txt40
-rw-r--r--Documentation/features/debug/kgdb/arch-support.txt40
-rw-r--r--Documentation/features/debug/kprobes-on-ftrace/arch-support.txt40
-rw-r--r--Documentation/features/debug/kprobes/arch-support.txt40
-rw-r--r--Documentation/features/debug/kretprobes/arch-support.txt40
-rw-r--r--Documentation/features/debug/optprobes/arch-support.txt40
-rw-r--r--Documentation/features/debug/stackprotector/arch-support.txt40
-rw-r--r--Documentation/features/debug/uprobes/arch-support.txt40
-rw-r--r--Documentation/features/debug/user-ret-profiler/arch-support.txt40
-rw-r--r--Documentation/features/io/dma-api-debug/arch-support.txt40
-rw-r--r--Documentation/features/io/dma-contiguous/arch-support.txt40
-rw-r--r--Documentation/features/io/dma_map_attrs/arch-support.txt40
-rw-r--r--Documentation/features/io/sg-chain/arch-support.txt40
-rw-r--r--Documentation/features/lib/strncasecmp/arch-support.txt40
-rwxr-xr-xDocumentation/features/list-arch.sh24
-rw-r--r--Documentation/features/locking/cmpxchg-local/arch-support.txt40
-rw-r--r--Documentation/features/locking/lockdep/arch-support.txt40
-rw-r--r--Documentation/features/locking/queued-rwlocks/arch-support.txt40
-rw-r--r--Documentation/features/locking/queued-spinlocks/arch-support.txt40
-rw-r--r--Documentation/features/locking/rwsem-optimized/arch-support.txt40
-rw-r--r--Documentation/features/perf/kprobes-event/arch-support.txt40
-rw-r--r--Documentation/features/perf/perf-regs/arch-support.txt40
-rw-r--r--Documentation/features/perf/perf-stackdump/arch-support.txt40
-rw-r--r--Documentation/features/sched/numa-balancing/arch-support.txt40
-rw-r--r--Documentation/features/seccomp/seccomp-filter/arch-support.txt40
-rw-r--r--Documentation/features/time/arch-tick-broadcast/arch-support.txt40
-rw-r--r--Documentation/features/time/clockevents/arch-support.txt40
-rw-r--r--Documentation/features/time/context-tracking/arch-support.txt40
-rw-r--r--Documentation/features/time/irq-time-acct/arch-support.txt40
-rw-r--r--Documentation/features/time/modern-timekeeping/arch-support.txt40
-rw-r--r--Documentation/features/time/virt-cpuacct/arch-support.txt40
-rw-r--r--Documentation/features/vm/ELF-ASLR/arch-support.txt40
-rw-r--r--Documentation/features/vm/PG_uncached/arch-support.txt40
-rw-r--r--Documentation/features/vm/THP/arch-support.txt40
-rw-r--r--Documentation/features/vm/huge-vmap/arch-support.txt40
-rw-r--r--Documentation/features/vm/ioremap_prot/arch-support.txt40
-rw-r--r--Documentation/features/vm/numa-memblock/arch-support.txt40
-rw-r--r--Documentation/features/vm/pmdp_splitting_flush/arch-support.txt40
-rw-r--r--Documentation/features/vm/pte_special/arch-support.txt40
-rw-r--r--Documentation/filesystems/Locking4
-rw-r--r--Documentation/filesystems/automount-support.txt51
-rw-r--r--Documentation/filesystems/caching/backend-api.txt23
-rw-r--r--Documentation/filesystems/caching/fscache.txt7
-rw-r--r--Documentation/filesystems/dax.txt6
-rw-r--r--Documentation/filesystems/nfs/knfsd-stats.txt44
-rw-r--r--Documentation/filesystems/porting29
-rw-r--r--Documentation/filesystems/proc.txt3
-rw-r--r--Documentation/filesystems/quota.txt5
-rw-r--r--Documentation/filesystems/vfs.txt39
-rw-r--r--Documentation/filesystems/xfs.txt12
-rw-r--r--Documentation/gpio/consumer.txt30
-rw-r--r--Documentation/gpio/gpio-legacy.txt9
-rw-r--r--Documentation/gpio/sysfs.txt8
-rw-r--r--Documentation/hwmon/ntc_thermistor6
-rw-r--r--Documentation/hwmon/submitting-patches7
-rw-r--r--Documentation/hwmon/tc7420
-rw-r--r--Documentation/hwmon/tmp4012
-rw-r--r--Documentation/hwmon/w83792d18
-rw-r--r--Documentation/hwspinlock.txt10
-rw-r--r--Documentation/i2c/slave-interface31
-rw-r--r--Documentation/input/rotary-encoder.txt2
-rw-r--r--Documentation/ioctl/ioctl-number.txt1
-rw-r--r--Documentation/ja_JP/HOWTO2
-rw-r--r--Documentation/kasan.txt10
-rw-r--r--Documentation/kbuild/headers_install.txt9
-rw-r--r--Documentation/kbuild/makefiles.txt4
-rw-r--r--Documentation/kernel-parameters.txt148
-rw-r--r--Documentation/kmemleak.txt2
-rw-r--r--Documentation/laptops/.gitignore1
-rw-r--r--Documentation/laptops/00-INDEX2
-rw-r--r--Documentation/laptops/Makefile2
-rw-r--r--Documentation/laptops/freefall.c174
-rw-r--r--Documentation/leds/leds-class-flash.txt51
-rw-r--r--Documentation/leds/leds-class.txt3
-rw-r--r--Documentation/leds/leds-lp5523.txt30
-rw-r--r--Documentation/lockup-watchdogs.txt18
-rw-r--r--Documentation/magic-number.txt2
-rw-r--r--Documentation/md.txt2
-rw-r--r--Documentation/memory-barriers.txt68
-rw-r--r--Documentation/mic/mic_overview.txt28
-rw-r--r--Documentation/mic/mpssd/Makefile2
-rwxr-xr-xDocumentation/mic/mpssd/mpss24
-rw-r--r--Documentation/mic/scif_overview.txt98
-rw-r--r--Documentation/misc-devices/spear-pcie-gadget.txt2
-rw-r--r--Documentation/module-signing.txt6
-rw-r--r--Documentation/networking/bonding.txt84
-rw-r--r--Documentation/networking/can.txt3
-rw-r--r--Documentation/networking/dctcp.txt1
-rw-r--r--Documentation/networking/fore200e.txt2
-rw-r--r--Documentation/networking/ieee802154.txt32
-rw-r--r--Documentation/networking/ip-sysctl.txt25
-rw-r--r--Documentation/networking/mpls-sysctl.txt9
-rw-r--r--Documentation/networking/netconsole.txt35
-rw-r--r--Documentation/networking/pktgen.txt150
-rw-r--r--Documentation/networking/scaling.txt2
-rw-r--r--Documentation/networking/switchdev.txt419
-rw-r--r--Documentation/networking/tc-actions-env-rules.txt6
-rw-r--r--Documentation/networking/timestamping/txtimestamp.c4
-rw-r--r--Documentation/networking/udplite.txt2
-rw-r--r--Documentation/nfc/nfc-hci.txt2
-rw-r--r--Documentation/ntb.txt127
-rw-r--r--Documentation/nvdimm/btt.txt283
-rw-r--r--Documentation/nvdimm/nvdimm.txt808
-rw-r--r--Documentation/phy.txt7
-rw-r--r--Documentation/pinctrl.txt11
-rw-r--r--Documentation/power/runtime_pm.txt6
-rw-r--r--Documentation/powerpc/00-INDEX2
-rw-r--r--Documentation/powerpc/cxl.txt4
-rw-r--r--Documentation/powerpc/dscr.txt83
-rw-r--r--Documentation/pps/pps.txt2
-rw-r--r--Documentation/prctl/Makefile2
-rw-r--r--Documentation/preempt-locking.txt2
-rw-r--r--Documentation/remoteproc.txt6
-rw-r--r--Documentation/s390/qeth.txt4
-rw-r--r--Documentation/scheduler/sched-deadline.txt184
-rw-r--r--Documentation/scsi/scsi_mid_low_api.txt2
-rw-r--r--Documentation/scsi/st.txt59
-rw-r--r--Documentation/security/Smack.txt6
-rw-r--r--Documentation/serial/serial-rs485.txt50
-rw-r--r--Documentation/serial/tty.txt6
-rw-r--r--Documentation/sound/alsa/HD-Audio-Models.txt14
-rw-r--r--Documentation/sound/alsa/Jack-Controls.txt43
-rw-r--r--Documentation/sound/oss/PSS-updates2
-rw-r--r--Documentation/sound/oss/README.OSS2
-rw-r--r--Documentation/sound/oss/btaudio2
-rw-r--r--Documentation/stable_kernel_rules.txt19
-rw-r--r--Documentation/sysctl/kernel.txt25
-rwxr-xr-xDocumentation/target/tcm_mod_builder.py284
-rw-r--r--Documentation/target/tcm_mod_builder.txt4
-rw-r--r--Documentation/target/tcmu-design.txt35
-rw-r--r--Documentation/thermal/cpu-cooling-api.txt156
-rw-r--r--Documentation/thermal/power_allocator.txt247
-rw-r--r--Documentation/thermal/sysfs-api.txt99
-rw-r--r--Documentation/trace/ftrace.txt4
-rw-r--r--Documentation/usb/gadget-testing.txt4
-rw-r--r--Documentation/usb/usb-serial.txt12
-rw-r--r--Documentation/vDSO/Makefile2
-rw-r--r--Documentation/vfio.txt62
-rw-r--r--Documentation/video4linux/CARDLIST.cx238859
-rw-r--r--Documentation/video4linux/CARDLIST.em28xx2
-rw-r--r--Documentation/video4linux/CARDLIST.saa71341
-rw-r--r--Documentation/video4linux/CARDLIST.saa71643
-rw-r--r--Documentation/video4linux/v4l2-framework.txt4
-rw-r--r--Documentation/video4linux/v4l2-pci-skeleton.c2
-rw-r--r--Documentation/video4linux/vivid.txt32
-rw-r--r--Documentation/virtual/kvm/api.txt69
-rw-r--r--Documentation/virtual/kvm/mmu.txt24
-rw-r--r--Documentation/vm/unevictable-lru.txt8
-rw-r--r--Documentation/vm/zswap.txt18
-rw-r--r--Documentation/vme_api.txt6
-rw-r--r--Documentation/w1/slaves/w1_therm11
-rw-r--r--Documentation/w1/w1.generic30
-rw-r--r--Documentation/watchdog/watchdog-kernel-api.txt7
-rw-r--r--Documentation/watchdog/watchdog-parameters.txt3
-rw-r--r--Documentation/workqueue.txt2
-rw-r--r--Documentation/x86/boot.txt3
-rw-r--r--Documentation/x86/entry_64.txt12
-rw-r--r--Documentation/x86/kernel-stacks (renamed from Documentation/x86/x86_64/kernel-stacks)54
-rw-r--r--Documentation/x86/mtrr.txt18
-rw-r--r--Documentation/x86/pat.txt48
-rw-r--r--Documentation/x86/x86_64/boot-options.txt3
-rw-r--r--Documentation/zh_CN/gpio.txt8
-rw-r--r--Documentation/zh_CN/magic-number.txt2
553 files changed, 18714 insertions, 4260 deletions
diff --git a/Documentation/ABI/stable/sysfs-bus-w1 b/Documentation/ABI/stable/sysfs-bus-w1
new file mode 100644
index 000000000000..140d85b4ae92
--- /dev/null
+++ b/Documentation/ABI/stable/sysfs-bus-w1
@@ -0,0 +1,11 @@
1What: /sys/bus/w1/devices/.../w1_master_timeout_us
2Date: April 2015
3Contact: Dmitry Khromov <dk@icelogic.net>
4Description: Bus scanning interval, microseconds component.
5 Some of 1-Wire devices commonly associated with physical access
6 control systems are attached/generate presence for as short as
7 100 ms - hence the tens-to-hundreds milliseconds scan intervals
8 are required.
9 see Documentation/w1/w1.generic for detailed information.
10Users: any user space application which wants to know bus scanning
11 interval
diff --git a/Documentation/ABI/stable/sysfs-driver-w1_ds28ea00 b/Documentation/ABI/stable/sysfs-driver-w1_ds28ea00
new file mode 100644
index 000000000000..e928def14f28
--- /dev/null
+++ b/Documentation/ABI/stable/sysfs-driver-w1_ds28ea00
@@ -0,0 +1,6 @@
1What: /sys/bus/w1/devices/.../w1_seq
2Date: Apr 2015
3Contact: Matt Campbell <mattrcampbell@gmail.com>
4Description: Support for the DS28EA00 chain sequence function
5 see Documentation/w1/slaves/w1_therm for detailed information
6Users: any user space application which wants to communicate with DS28EA00
diff --git a/Documentation/ABI/testing/configfs-spear-pcie-gadget b/Documentation/ABI/testing/configfs-spear-pcie-gadget
index 875988146a63..840c324ef34d 100644
--- a/Documentation/ABI/testing/configfs-spear-pcie-gadget
+++ b/Documentation/ABI/testing/configfs-spear-pcie-gadget
@@ -1,7 +1,7 @@
1What: /config/pcie-gadget 1What: /config/pcie-gadget
2Date: Feb 2011 2Date: Feb 2011
3KernelVersion: 2.6.37 3KernelVersion: 2.6.37
4Contact: Pratyush Anand <pratyush.anand@st.com> 4Contact: Pratyush Anand <pratyush.anand@gmail.com>
5Description: 5Description:
6 6
7 Interface is used to configure selected dual mode PCIe controller 7 Interface is used to configure selected dual mode PCIe controller
diff --git a/Documentation/ABI/testing/dev-kmsg b/Documentation/ABI/testing/dev-kmsg
index bb820be48179..fff817efa508 100644
--- a/Documentation/ABI/testing/dev-kmsg
+++ b/Documentation/ABI/testing/dev-kmsg
@@ -98,4 +98,13 @@ Description: The /dev/kmsg character device node provides userspace access
98 logic is used internally when messages are printed to the 98 logic is used internally when messages are printed to the
99 console, /proc/kmsg or the syslog() syscall. 99 console, /proc/kmsg or the syslog() syscall.
100 100
101 By default, kernel tries to avoid fragments by concatenating
102 when it can and fragments are rare; however, when extended
103 console support is enabled, the in-kernel concatenation is
104 disabled and /dev/kmsg output will contain more fragments. If
105 the log consumer performs concatenation, the end result
106 should be the same. In the future, the in-kernel concatenation
107 may be removed entirely and /dev/kmsg users are recommended to
108 implement fragment handling.
109
101Users: dmesg(1), userspace kernel log consumers 110Users: dmesg(1), userspace kernel log consumers
diff --git a/Documentation/ABI/testing/ima_policy b/Documentation/ABI/testing/ima_policy
index d0d0c578324c..0a378a88217a 100644
--- a/Documentation/ABI/testing/ima_policy
+++ b/Documentation/ABI/testing/ima_policy
@@ -20,17 +20,19 @@ Description:
20 action: measure | dont_measure | appraise | dont_appraise | audit 20 action: measure | dont_measure | appraise | dont_appraise | audit
21 condition:= base | lsm [option] 21 condition:= base | lsm [option]
22 base: [[func=] [mask=] [fsmagic=] [fsuuid=] [uid=] 22 base: [[func=] [mask=] [fsmagic=] [fsuuid=] [uid=]
23 [fowner]] 23 [euid=] [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=]] [permit_directio] 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 [FIRMWARE_CHECK] 29 [FIRMWARE_CHECK]
30 mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC] 30 mask:= [[^]MAY_READ] [[^]MAY_WRITE] [[^]MAY_APPEND]
31 [[^]MAY_EXEC]
31 fsmagic:= hex value 32 fsmagic:= hex value
32 fsuuid:= file system UUID (e.g 8bcbe394-4f13-4144-be8e-5aa9ea2ce2f6) 33 fsuuid:= file system UUID (e.g 8bcbe394-4f13-4144-be8e-5aa9ea2ce2f6)
33 uid:= decimal value 34 uid:= decimal value
35 euid:= decimal value
34 fowner:=decimal value 36 fowner:=decimal value
35 lsm: are LSM specific 37 lsm: are LSM specific
36 option: appraise_type:= [imasig] 38 option: appraise_type:= [imasig]
@@ -49,11 +51,25 @@ Description:
49 dont_measure fsmagic=0x01021994 51 dont_measure fsmagic=0x01021994
50 dont_appraise fsmagic=0x01021994 52 dont_appraise fsmagic=0x01021994
51 # RAMFS_MAGIC 53 # RAMFS_MAGIC
52 dont_measure fsmagic=0x858458f6
53 dont_appraise fsmagic=0x858458f6 54 dont_appraise fsmagic=0x858458f6
55 # DEVPTS_SUPER_MAGIC
56 dont_measure fsmagic=0x1cd1
57 dont_appraise fsmagic=0x1cd1
58 # BINFMTFS_MAGIC
59 dont_measure fsmagic=0x42494e4d
60 dont_appraise fsmagic=0x42494e4d
54 # SECURITYFS_MAGIC 61 # SECURITYFS_MAGIC
55 dont_measure fsmagic=0x73636673 62 dont_measure fsmagic=0x73636673
56 dont_appraise fsmagic=0x73636673 63 dont_appraise fsmagic=0x73636673
64 # SELINUX_MAGIC
65 dont_measure fsmagic=0xf97cff8c
66 dont_appraise fsmagic=0xf97cff8c
67 # CGROUP_SUPER_MAGIC
68 dont_measure fsmagic=0x27e0eb
69 dont_appraise fsmagic=0x27e0eb
70 # NSFS_MAGIC
71 dont_measure fsmagic=0x6e736673
72 dont_appraise fsmagic=0x6e736673
57 73
58 measure func=BPRM_CHECK 74 measure func=BPRM_CHECK
59 measure func=FILE_MMAP mask=MAY_EXEC 75 measure func=FILE_MMAP mask=MAY_EXEC
@@ -70,10 +86,6 @@ Description:
70 Examples of LSM specific definitions: 86 Examples of LSM specific definitions:
71 87
72 SELinux: 88 SELinux:
73 # SELINUX_MAGIC
74 dont_measure fsmagic=0xf97cff8c
75 dont_appraise fsmagic=0xf97cff8c
76
77 dont_measure obj_type=var_log_t 89 dont_measure obj_type=var_log_t
78 dont_appraise obj_type=var_log_t 90 dont_appraise obj_type=var_log_t
79 dont_measure obj_type=auditd_log_t 91 dont_measure obj_type=auditd_log_t
diff --git a/Documentation/ABI/testing/sysfs-ata b/Documentation/ABI/testing/sysfs-ata
index 0a932155cbba..aa4296498859 100644
--- a/Documentation/ABI/testing/sysfs-ata
+++ b/Documentation/ABI/testing/sysfs-ata
@@ -90,6 +90,17 @@ gscr
90 130: SATA_PMP_GSCR_SII_GPIO 90 130: SATA_PMP_GSCR_SII_GPIO
91 Only valid if the device is a PM. 91 Only valid if the device is a PM.
92 92
93trim
94
95 Shows the DSM TRIM mode currently used by the device. Valid
96 values are:
97 unsupported: Drive does not support DSM TRIM
98 unqueued: Drive supports unqueued DSM TRIM only
99 queued: Drive supports queued DSM TRIM
100 forced_unqueued: Drive's queued DSM support is known to be
101 buggy and only unqueued TRIM commands
102 are sent
103
93spdn_cnt 104spdn_cnt
94 105
95 Number of time libata decided to lower the speed of link due to errors. 106 Number of time libata decided to lower the speed of link due to errors.
diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm4x b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm4x
new file mode 100644
index 000000000000..2fe2e3dae487
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm4x
@@ -0,0 +1,450 @@
1What: /sys/bus/coresight/devices/<memory_map>.etm/enable_source
2Date: April 2015
3KernelVersion: 4.01
4Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
5Description: (RW) Enable/disable tracing on this specific trace entiry.
6 Enabling a source implies the source has been configured
7 properly and a sink has been identidifed for it. The path
8 of coresight components linking the source to the sink is
9 configured and managed automatically by the coresight framework.
10
11What: /sys/bus/coresight/devices/<memory_map>.etm/cpu
12Date: April 2015
13KernelVersion: 4.01
14Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
15Description: (R) The CPU this tracing entity is associated with.
16
17What: /sys/bus/coresight/devices/<memory_map>.etm/nr_pe_cmp
18Date: April 2015
19KernelVersion: 4.01
20Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
21Description: (R) Indicates the number of PE comparator inputs that are
22 available for tracing.
23
24What: /sys/bus/coresight/devices/<memory_map>.etm/nr_addr_cmp
25Date: April 2015
26KernelVersion: 4.01
27Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
28Description: (R) Indicates the number of address comparator pairs that are
29 available for tracing.
30
31What: /sys/bus/coresight/devices/<memory_map>.etm/nr_cntr
32Date: April 2015
33KernelVersion: 4.01
34Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
35Description: (R) Indicates the number of counters that are available for
36 tracing.
37
38What: /sys/bus/coresight/devices/<memory_map>.etm/nr_ext_inp
39Date: April 2015
40KernelVersion: 4.01
41Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
42Description: (R) Indicates how many external inputs are implemented.
43
44What: /sys/bus/coresight/devices/<memory_map>.etm/numcidc
45Date: April 2015
46KernelVersion: 4.01
47Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
48Description: (R) Indicates the number of Context ID comparators that are
49 available for tracing.
50
51What: /sys/bus/coresight/devices/<memory_map>.etm/numvmidc
52Date: April 2015
53KernelVersion: 4.01
54Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
55Description: (R) Indicates the number of VMID comparators that are available
56 for tracing.
57
58What: /sys/bus/coresight/devices/<memory_map>.etm/nrseqstate
59Date: April 2015
60KernelVersion: 4.01
61Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
62Description: (R) Indicates the number of sequencer states that are
63 implemented.
64
65What: /sys/bus/coresight/devices/<memory_map>.etm/nr_resource
66Date: April 2015
67KernelVersion: 4.01
68Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
69Description: (R) Indicates the number of resource selection pairs that are
70 available for tracing.
71
72What: /sys/bus/coresight/devices/<memory_map>.etm/nr_ss_cmp
73Date: April 2015
74KernelVersion: 4.01
75Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
76Description: (R) Indicates the number of single-shot comparator controls that
77 are available for tracing.
78
79What: /sys/bus/coresight/devices/<memory_map>.etm/reset
80Date: April 2015
81KernelVersion: 4.01
82Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
83Description: (W) Cancels all configuration on a trace unit and set it back
84 to its boot configuration.
85
86What: /sys/bus/coresight/devices/<memory_map>.etm/mode
87Date: April 2015
88KernelVersion: 4.01
89Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
90Description: (RW) Controls various modes supported by this ETM, for example
91 P0 instruction tracing, branch broadcast, cycle counting and
92 context ID tracing.
93
94What: /sys/bus/coresight/devices/<memory_map>.etm/pe
95Date: April 2015
96KernelVersion: 4.01
97Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
98Description: (RW) Controls which PE to trace.
99
100What: /sys/bus/coresight/devices/<memory_map>.etm/event
101Date: April 2015
102KernelVersion: 4.01
103Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
104Description: (RW) Controls the tracing of arbitrary events from bank 0 to 3.
105
106What: /sys/bus/coresight/devices/<memory_map>.etm/event_instren
107Date: April 2015
108KernelVersion: 4.01
109Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
110Description: (RW) Controls the behavior of the events in bank 0 to 3.
111
112What: /sys/bus/coresight/devices/<memory_map>.etm/event_ts
113Date: April 2015
114KernelVersion: 4.01
115Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
116Description: (RW) Controls the insertion of global timestamps in the trace
117 streams.
118
119What: /sys/bus/coresight/devices/<memory_map>.etm/syncfreq
120Date: April 2015
121KernelVersion: 4.01
122Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
123Description: (RW) Controls how often trace synchronization requests occur.
124
125What: /sys/bus/coresight/devices/<memory_map>.etm/cyc_threshold
126Date: April 2015
127KernelVersion: 4.01
128Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
129Description: (RW) Sets the threshold value for cycle counting.
130
131What: /sys/bus/coresight/devices/<memory_map>.etm/bb_ctrl
132Date: April 2015
133KernelVersion: 4.01
134Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
135Description: (RW) Controls which regions in the memory map are enabled to
136 use branch broadcasting.
137
138What: /sys/bus/coresight/devices/<memory_map>.etm/event_vinst
139Date: April 2015
140KernelVersion: 4.01
141Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
142Description: (RW) Controls instruction trace filtering.
143
144What: /sys/bus/coresight/devices/<memory_map>.etm/s_exlevel_vinst
145Date: April 2015
146KernelVersion: 4.01
147Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
148Description: (RW) In Secure state, each bit controls whether instruction
149 tracing is enabled for the corresponding exception level.
150
151What: /sys/bus/coresight/devices/<memory_map>.etm/ns_exlevel_vinst
152Date: April 2015
153KernelVersion: 4.01
154Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
155Description: (RW) In non-secure state, each bit controls whether instruction
156 tracing is enabled for the corresponding exception level.
157
158What: /sys/bus/coresight/devices/<memory_map>.etm/addr_idx
159Date: April 2015
160KernelVersion: 4.01
161Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
162Description: (RW) Select which address comparator or pair (of comparators) to
163 work with.
164
165What: /sys/bus/coresight/devices/<memory_map>.etm/addr_instdatatype
166Date: April 2015
167KernelVersion: 4.01
168Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
169Description: (RW) Controls what type of comparison the trace unit performs.
170
171What: /sys/bus/coresight/devices/<memory_map>.etm/addr_single
172Date: April 2015
173KernelVersion: 4.01
174Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
175Description: (RW) Used to setup single address comparator values.
176
177What: /sys/bus/coresight/devices/<memory_map>.etm/addr_range
178Date: April 2015
179KernelVersion: 4.01
180Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
181Description: (RW) Used to setup address range comparator values.
182
183What: /sys/bus/coresight/devices/<memory_map>.etm/seq_idx
184Date: April 2015
185KernelVersion: 4.01
186Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
187Description: (RW) Select which sequensor.
188
189What: /sys/bus/coresight/devices/<memory_map>.etm/seq_state
190Date: April 2015
191KernelVersion: 4.01
192Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
193Description: (RW) Use this to set, or read, the sequencer state.
194
195What: /sys/bus/coresight/devices/<memory_map>.etm/seq_event
196Date: April 2015
197KernelVersion: 4.01
198Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
199Description: (RW) Moves the sequencer state to a specific state.
200
201What: /sys/bus/coresight/devices/<memory_map>.etm/seq_reset_event
202Date: April 2015
203KernelVersion: 4.01
204Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
205Description: (RW) Moves the sequencer to state 0 when a programmed event
206 occurs.
207
208What: /sys/bus/coresight/devices/<memory_map>.etm/cntr_idx
209Date: April 2015
210KernelVersion: 4.01
211Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
212Description: (RW) Select which counter unit to work with.
213
214What: /sys/bus/coresight/devices/<memory_map>.etm/cntrldvr
215Date: April 2015
216KernelVersion: 4.01
217Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
218Description: (RW) This sets or returns the reload count value of the
219 specific counter.
220
221What: /sys/bus/coresight/devices/<memory_map>.etm/cntr_val
222Date: April 2015
223KernelVersion: 4.01
224Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
225Description: (RW) This sets or returns the current count value of the
226 specific counter.
227
228What: /sys/bus/coresight/devices/<memory_map>.etm/cntr_ctrl
229Date: April 2015
230KernelVersion: 4.01
231Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
232Description: (RW) Controls the operation of the selected counter.
233
234What: /sys/bus/coresight/devices/<memory_map>.etm/res_idx
235Date: April 2015
236KernelVersion: 4.01
237Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
238Description: (RW) Select which resource selection unit to work with.
239
240What: /sys/bus/coresight/devices/<memory_map>.etm/res_ctrl
241Date: April 2015
242KernelVersion: 4.01
243Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
244Description: (RW) Controls the selection of the resources in the trace unit.
245
246What: /sys/bus/coresight/devices/<memory_map>.etm/ctxid_idx
247Date: April 2015
248KernelVersion: 4.01
249Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
250Description: (RW) Select which context ID comparator to work with.
251
252What: /sys/bus/coresight/devices/<memory_map>.etm/ctxid_val
253Date: April 2015
254KernelVersion: 4.01
255Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
256Description: (RW) Get/Set the context ID comparator value to trigger on.
257
258What: /sys/bus/coresight/devices/<memory_map>.etm/ctxid_masks
259Date: April 2015
260KernelVersion: 4.01
261Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
262Description: (RW) Mask for all 8 context ID comparator value
263 registers (if implemented).
264
265What: /sys/bus/coresight/devices/<memory_map>.etm/vmid_idx
266Date: April 2015
267KernelVersion: 4.01
268Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
269Description: (RW) Select which virtual machine ID comparator to work with.
270
271What: /sys/bus/coresight/devices/<memory_map>.etm/vmid_val
272Date: April 2015
273KernelVersion: 4.01
274Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
275Description: (RW) Get/Set the virtual machine ID comparator value to
276 trigger on.
277
278What: /sys/bus/coresight/devices/<memory_map>.etm/vmid_masks
279Date: April 2015
280KernelVersion: 4.01
281Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
282Description: (RW) Mask for all 8 virtual machine ID comparator value
283 registers (if implemented).
284
285What: /sys/bus/coresight/devices/<memory_map>.etm/mgmt/trcoslsr
286Date: April 2015
287KernelVersion: 4.01
288Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
289Description: (R) Print the content of the OS Lock Status Register (0x304).
290 The value it taken directly from the HW.
291
292What: /sys/bus/coresight/devices/<memory_map>.etm/mgmt/trcpdcr
293Date: April 2015
294KernelVersion: 4.01
295Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
296Description: (R) Print the content of the Power Down Control Register
297 (0x310). The value is taken directly from the HW.
298
299What: /sys/bus/coresight/devices/<memory_map>.etm/mgmt/trcpdsr
300Date: April 2015
301KernelVersion: 4.01
302Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
303Description: (R) Print the content of the Power Down Status Register
304 (0x314). The value is taken directly from the HW.
305
306What: /sys/bus/coresight/devices/<memory_map>.etm/mgmt/trclsr
307Date: April 2015
308KernelVersion: 4.01
309Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
310Description: (R) Print the content of the SW Lock Status Register
311 (0xFB4). The value is taken directly from the HW.
312
313What: /sys/bus/coresight/devices/<memory_map>.etm/mgmt/trcauthstatus
314Date: April 2015
315KernelVersion: 4.01
316Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
317Description: (R) Print the content of the Authentication Status Register
318 (0xFB8). The value is taken directly from the HW.
319
320What: /sys/bus/coresight/devices/<memory_map>.etm/mgmt/trcdevid
321Date: April 2015
322KernelVersion: 4.01
323Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
324Description: (R) Print the content of the Device ID Register
325 (0xFC8). The value is taken directly from the HW.
326
327What: /sys/bus/coresight/devices/<memory_map>.etm/mgmt/trcdevtype
328Date: April 2015
329KernelVersion: 4.01
330Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
331Description: (R) Print the content of the Device Type Register
332 (0xFCC). The value is taken directly from the HW.
333
334What: /sys/bus/coresight/devices/<memory_map>.etm/mgmt/trcpidr0
335Date: April 2015
336KernelVersion: 4.01
337Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
338Description: (R) Print the content of the Peripheral ID0 Register
339 (0xFE0). The value is taken directly from the HW.
340
341What: /sys/bus/coresight/devices/<memory_map>.etm/mgmt/trcpidr1
342Date: April 2015
343KernelVersion: 4.01
344Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
345Description: (R) Print the content of the Peripheral ID1 Register
346 (0xFE4). The value is taken directly from the HW.
347
348What: /sys/bus/coresight/devices/<memory_map>.etm/mgmt/trcpidr2
349Date: April 2015
350KernelVersion: 4.01
351Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
352Description: (R) Print the content of the Peripheral ID2 Register
353 (0xFE8). The value is taken directly from the HW.
354
355What: /sys/bus/coresight/devices/<memory_map>.etm/mgmt/trcpidr3
356Date: April 2015
357KernelVersion: 4.01
358Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
359Description: (R) Print the content of the Peripheral ID3 Register
360 (0xFEC). The value is taken directly from the HW.
361
362What: /sys/bus/coresight/devices/<memory_map>.etm/trcidr/trcidr0
363Date: April 2015
364KernelVersion: 4.01
365Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
366Description: (R) Returns the tracing capabilities of the trace unit (0x1E0).
367 The value is taken directly from the HW.
368
369What: /sys/bus/coresight/devices/<memory_map>.etm/trcidr/trcidr1
370Date: April 2015
371KernelVersion: 4.01
372Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
373Description: (R) Returns the tracing capabilities of the trace unit (0x1E4).
374 The value is taken directly from the HW.
375
376What: /sys/bus/coresight/devices/<memory_map>.etm/trcidr/trcidr2
377Date: April 2015
378KernelVersion: 4.01
379Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
380Description: (R) Returns the maximum size of the data value, data address,
381 VMID, context ID and instuction address in the trace unit
382 (0x1E8). The value is taken directly from the HW.
383
384What: /sys/bus/coresight/devices/<memory_map>.etm/trcidr/trcidr3
385Date: April 2015
386KernelVersion: 4.01
387Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
388Description: (R) Returns the value associated with various resources
389 available to the trace unit. See the Trace Macrocell
390 architecture specification for more details (0x1E8).
391 The value is taken directly from the HW.
392
393What: /sys/bus/coresight/devices/<memory_map>.etm/trcidr/trcidr4
394Date: April 2015
395KernelVersion: 4.01
396Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
397Description: (R) Returns how many resources the trace unit supports (0x1F0).
398 The value is taken directly from the HW.
399
400What: /sys/bus/coresight/devices/<memory_map>.etm/trcidr/trcidr5
401Date: April 2015
402KernelVersion: 4.01
403Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
404Description: (R) Returns how many resources the trace unit supports (0x1F4).
405 The value is taken directly from the HW.
406
407What: /sys/bus/coresight/devices/<memory_map>.etm/trcidr/trcidr8
408Date: April 2015
409KernelVersion: 4.01
410Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
411Description: (R) Returns the maximum speculation depth of the instruction
412 trace stream. (0x180). The value is taken directly from the HW.
413
414What: /sys/bus/coresight/devices/<memory_map>.etm/trcidr/trcidr9
415Date: April 2015
416KernelVersion: 4.01
417Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
418Description: (R) Returns the number of P0 right-hand keys that the trace unit
419 can use (0x184). The value is taken directly from the HW.
420
421What: /sys/bus/coresight/devices/<memory_map>.etm/trcidr/trcidr10
422Date: April 2015
423KernelVersion: 4.01
424Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
425Description: (R) Returns the number of P1 right-hand keys that the trace unit
426 can use (0x188). The value is taken directly from the HW.
427
428What: /sys/bus/coresight/devices/<memory_map>.etm/trcidr/trcidr11
429Date: April 2015
430KernelVersion: 4.01
431Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
432Description: (R) Returns the number of special P1 right-hand keys that the
433 trace unit can use (0x18C). The value is taken directly from
434 the HW.
435
436What: /sys/bus/coresight/devices/<memory_map>.etm/trcidr/trcidr12
437Date: April 2015
438KernelVersion: 4.01
439Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
440Description: (R) Returns the number of conditional P1 right-hand keys that
441 the trace unit can use (0x190). The value is taken directly
442 from the HW.
443
444What: /sys/bus/coresight/devices/<memory_map>.etm/trcidr/trcidr13
445Date: April 2015
446KernelVersion: 4.01
447Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
448Description: (R) Returns the number of special conditional P1 right-hand keys
449 that the trace unit can use (0x194). The value is taken
450 directly from the HW.
diff --git a/Documentation/ABI/testing/sysfs-bus-fcoe b/Documentation/ABI/testing/sysfs-bus-fcoe
index 21640eaad371..657df13b100d 100644
--- a/Documentation/ABI/testing/sysfs-bus-fcoe
+++ b/Documentation/ABI/testing/sysfs-bus-fcoe
@@ -32,7 +32,7 @@ Description: 'FCoE Controller' instances on the fcoe bus.
32 32
33Attributes: 33Attributes:
34 34
35 fcf_dev_loss_tmo: Device loss timeout peroid (see below). Changing 35 fcf_dev_loss_tmo: Device loss timeout period (see below). Changing
36 this value will change the dev_loss_tmo for all 36 this value will change the dev_loss_tmo for all
37 FCFs discovered by this controller. 37 FCFs discovered by this controller.
38 38
@@ -61,7 +61,7 @@ Attributes:
61 lesb/err_block: Link Error Status Block (LESB) block error count. 61 lesb/err_block: Link Error Status Block (LESB) block error count.
62 62
63 lesb/fcs_error: Link Error Status Block (LESB) Fibre Channel 63 lesb/fcs_error: Link Error Status Block (LESB) Fibre Channel
64 Serivces error count. 64 Services error count.
65 65
66Notes: ctlr_X (global increment starting at 0) 66Notes: ctlr_X (global increment starting at 0)
67 67
@@ -85,7 +85,7 @@ Attributes:
85 fabric. 85 fabric.
86 86
87 selected: 1 indicates that the switch has been selected for use; 87 selected: 1 indicates that the switch has been selected for use;
88 0 indicates that the swich will not be used. 88 0 indicates that the switch will not be used.
89 89
90 fc_map: The Fibre Channel MAP 90 fc_map: The Fibre Channel MAP
91 91
@@ -93,7 +93,7 @@ Attributes:
93 93
94 mac: The FCF's MAC address 94 mac: The FCF's MAC address
95 95
96 fka_peroid: The FIP Keep-Alive peroid 96 fka_period: The FIP Keep-Alive period
97 97
98 fabric_state: The internal kernel state 98 fabric_state: The internal kernel state
99 "Unknown" - Initialization value 99 "Unknown" - Initialization value
@@ -101,9 +101,9 @@ Attributes:
101 "Connected" - Host is connected to the FCF 101 "Connected" - Host is connected to the FCF
102 "Deleted" - FCF is being removed from the system 102 "Deleted" - FCF is being removed from the system
103 103
104 dev_loss_tmo: The device loss timeout peroid for this FCF. 104 dev_loss_tmo: The device loss timeout period for this FCF.
105 105
106Notes: A device loss infrastructre similar to the FC Transport's 106Notes: A device loss infrastructure similar to the FC Transport's
107 is present in fcoe_sysfs. It is nice to have so that a 107 is present in fcoe_sysfs. It is nice to have so that a
108 link flapping adapter doesn't continually advance the count 108 link flapping adapter doesn't continually advance the count
109 used to identify the discovered FCF. FCFs will exist in a 109 used to identify the discovered FCF. FCFs will exist in a
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index 3befcb19f414..bbed111c31b4 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -71,6 +71,8 @@ Description:
71 71
72What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_raw 72What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_raw
73What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_supply_raw 73What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_supply_raw
74What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_i_raw
75What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_q_raw
74KernelVersion: 2.6.35 76KernelVersion: 2.6.35
75Contact: linux-iio@vger.kernel.org 77Contact: linux-iio@vger.kernel.org
76Description: 78Description:
@@ -81,6 +83,11 @@ Description:
81 unique to allow association with event codes. Units after 83 unique to allow association with event codes. Units after
82 application of scale and offset are millivolts. 84 application of scale and offset are millivolts.
83 85
86 Channels with 'i' and 'q' modifiers always exist in pairs and both
87 channels refer to the same signal. The 'i' channel contains the in-phase
88 component of the signal while the 'q' channel contains the quadrature
89 component.
90
84What: /sys/bus/iio/devices/iio:deviceX/in_voltageY-voltageZ_raw 91What: /sys/bus/iio/devices/iio:deviceX/in_voltageY-voltageZ_raw
85KernelVersion: 2.6.35 92KernelVersion: 2.6.35
86Contact: linux-iio@vger.kernel.org 93Contact: linux-iio@vger.kernel.org
@@ -246,8 +253,16 @@ What: /sys/bus/iio/devices/iio:deviceX/in_accel_y_offset
246What: /sys/bus/iio/devices/iio:deviceX/in_accel_z_offset 253What: /sys/bus/iio/devices/iio:deviceX/in_accel_z_offset
247What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_offset 254What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_offset
248What: /sys/bus/iio/devices/iio:deviceX/in_voltage_offset 255What: /sys/bus/iio/devices/iio:deviceX/in_voltage_offset
256What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_i_offset
257What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_q_offset
258What: /sys/bus/iio/devices/iio:deviceX/in_voltage_q_offset
259What: /sys/bus/iio/devices/iio:deviceX/in_voltage_i_offset
249What: /sys/bus/iio/devices/iio:deviceX/in_currentY_offset 260What: /sys/bus/iio/devices/iio:deviceX/in_currentY_offset
250What: /sys/bus/iio/devices/iio:deviceX/in_current_offset 261What: /sys/bus/iio/devices/iio:deviceX/in_current_offset
262What: /sys/bus/iio/devices/iio:deviceX/in_currentY_i_offset
263What: /sys/bus/iio/devices/iio:deviceX/in_currentY_q_offset
264What: /sys/bus/iio/devices/iio:deviceX/in_current_q_offset
265What: /sys/bus/iio/devices/iio:deviceX/in_current_i_offset
251What: /sys/bus/iio/devices/iio:deviceX/in_tempY_offset 266What: /sys/bus/iio/devices/iio:deviceX/in_tempY_offset
252What: /sys/bus/iio/devices/iio:deviceX/in_temp_offset 267What: /sys/bus/iio/devices/iio:deviceX/in_temp_offset
253What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_offset 268What: /sys/bus/iio/devices/iio:deviceX/in_pressureY_offset
@@ -273,14 +288,22 @@ Description:
273 to the _raw output. 288 to the _raw output.
274 289
275What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_scale 290What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_scale
291What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_i_scale
292What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_q_scale
276What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_supply_scale 293What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_supply_scale
277What: /sys/bus/iio/devices/iio:deviceX/in_voltage_scale 294What: /sys/bus/iio/devices/iio:deviceX/in_voltage_scale
295What: /sys/bus/iio/devices/iio:deviceX/in_voltage_i_scale
296What: /sys/bus/iio/devices/iio:deviceX/in_voltage_q_scale
278What: /sys/bus/iio/devices/iio:deviceX/in_voltage-voltage_scale 297What: /sys/bus/iio/devices/iio:deviceX/in_voltage-voltage_scale
279What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_scale 298What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_scale
280What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_scale 299What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_scale
281What: /sys/bus/iio/devices/iio:deviceX/in_currentY_scale 300What: /sys/bus/iio/devices/iio:deviceX/in_currentY_scale
282What: /sys/bus/iio/devices/iio:deviceX/in_currentY_supply_scale 301What: /sys/bus/iio/devices/iio:deviceX/in_currentY_supply_scale
283What: /sys/bus/iio/devices/iio:deviceX/in_current_scale 302What: /sys/bus/iio/devices/iio:deviceX/in_current_scale
303What: /sys/bus/iio/devices/iio:deviceX/in_currentY_i_scale
304What: /sys/bus/iio/devices/iio:deviceX/in_currentY_q_scale
305What: /sys/bus/iio/devices/iio:deviceX/in_current_i_scale
306What: /sys/bus/iio/devices/iio:deviceX/in_current_q_scale
284What: /sys/bus/iio/devices/iio:deviceX/in_accel_scale 307What: /sys/bus/iio/devices/iio:deviceX/in_accel_scale
285What: /sys/bus/iio/devices/iio:deviceX/in_accel_peak_scale 308What: /sys/bus/iio/devices/iio:deviceX/in_accel_peak_scale
286What: /sys/bus/iio/devices/iio:deviceX/in_anglvel_scale 309What: /sys/bus/iio/devices/iio:deviceX/in_anglvel_scale
@@ -328,6 +351,10 @@ Description:
328 351
329What /sys/bus/iio/devices/iio:deviceX/in_voltageY_calibscale 352What /sys/bus/iio/devices/iio:deviceX/in_voltageY_calibscale
330What /sys/bus/iio/devices/iio:deviceX/in_voltageY_supply_calibscale 353What /sys/bus/iio/devices/iio:deviceX/in_voltageY_supply_calibscale
354What /sys/bus/iio/devices/iio:deviceX/in_voltageY_i_calibscale
355What /sys/bus/iio/devices/iio:deviceX/in_voltageY_q_calibscale
356What /sys/bus/iio/devices/iio:deviceX/in_voltage_i_calibscale
357What /sys/bus/iio/devices/iio:deviceX/in_voltage_q_calibscale
331What /sys/bus/iio/devices/iio:deviceX/in_voltage_calibscale 358What /sys/bus/iio/devices/iio:deviceX/in_voltage_calibscale
332What /sys/bus/iio/devices/iio:deviceX/in_accel_x_calibscale 359What /sys/bus/iio/devices/iio:deviceX/in_accel_x_calibscale
333What /sys/bus/iio/devices/iio:deviceX/in_accel_y_calibscale 360What /sys/bus/iio/devices/iio:deviceX/in_accel_y_calibscale
@@ -420,6 +447,16 @@ Description:
420 to the underlying data channel, then this parameter 447 to the underlying data channel, then this parameter
421 gives the 3dB frequency of the filter in Hz. 448 gives the 3dB frequency of the filter in Hz.
422 449
450What: /sys/.../in_accel_filter_high_pass_3db_frequency
451What: /sys/.../in_anglvel_filter_high_pass_3db_frequency
452What: /sys/.../in_magn_filter_high_pass_3db_frequency
453KernelVersion: 4.2
454Contact: linux-iio@vger.kernel.org
455Description:
456 If a known or controllable high pass filter is applied
457 to the underlying data channel, then this parameter
458 gives the 3dB frequency of the filter in Hz.
459
423What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_raw 460What: /sys/bus/iio/devices/iio:deviceX/out_voltageY_raw
424What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_raw 461What: /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_raw
425KernelVersion: 2.6.37 462KernelVersion: 2.6.37
@@ -880,6 +917,26 @@ Description:
880 met before an event is generated. If direction is not 917 met before an event is generated. If direction is not
881 specified then this period applies to both directions. 918 specified then this period applies to both directions.
882 919
920What: /sys/.../events/in_accel_thresh_rising_low_pass_filter_3db
921What: /sys/.../events/in_anglvel_thresh_rising_low_pass_filter_3db
922What: /sys/.../events/in_magn_thresh_rising_low_pass_filter_3db
923KernelVersion: 4.2
924Contact: linux-iio@vger.kernel.org
925Description:
926 If a low pass filter can be applied to the event generation
927 this property gives its 3db frequency in Hz.
928 A value of zero disables the filter.
929
930What: /sys/.../events/in_accel_thresh_rising_high_pass_filter_3db
931What: /sys/.../events/in_anglvel_thresh_rising_high_pass_filter_3db
932What: /sys/.../events/in_magn_thresh_rising_high_pass_filter_3db
933KernelVersion: 4.2
934Contact: linux-iio@vger.kernel.org
935Description:
936 If a high pass filter can be applied to the event generation
937 this property gives its 3db frequency in Hz.
938 A value of zero disables the filter.
939
883What: /sys/.../events/in_activity_still_thresh_rising_en 940What: /sys/.../events/in_activity_still_thresh_rising_en
884What: /sys/.../events/in_activity_still_thresh_falling_en 941What: /sys/.../events/in_activity_still_thresh_falling_en
885What: /sys/.../events/in_activity_walking_thresh_rising_en 942What: /sys/.../events/in_activity_walking_thresh_rising_en
@@ -1016,6 +1073,10 @@ What: /sys/.../iio:deviceX/scan_elements/in_timestamp_en
1016What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_en 1073What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_en
1017What: /sys/.../iio:deviceX/scan_elements/in_voltageY_en 1074What: /sys/.../iio:deviceX/scan_elements/in_voltageY_en
1018What: /sys/.../iio:deviceX/scan_elements/in_voltageY-voltageZ_en 1075What: /sys/.../iio:deviceX/scan_elements/in_voltageY-voltageZ_en
1076What: /sys/.../iio:deviceX/scan_elements/in_voltageY_i_en
1077What: /sys/.../iio:deviceX/scan_elements/in_voltageY_q_en
1078What: /sys/.../iio:deviceX/scan_elements/in_voltage_i_en
1079What: /sys/.../iio:deviceX/scan_elements/in_voltage_q_en
1019What: /sys/.../iio:deviceX/scan_elements/in_incli_x_en 1080What: /sys/.../iio:deviceX/scan_elements/in_incli_x_en
1020What: /sys/.../iio:deviceX/scan_elements/in_incli_y_en 1081What: /sys/.../iio:deviceX/scan_elements/in_incli_y_en
1021What: /sys/.../iio:deviceX/scan_elements/in_pressureY_en 1082What: /sys/.../iio:deviceX/scan_elements/in_pressureY_en
@@ -1034,6 +1095,10 @@ What: /sys/.../iio:deviceX/scan_elements/in_incli_type
1034What: /sys/.../iio:deviceX/scan_elements/in_voltageY_type 1095What: /sys/.../iio:deviceX/scan_elements/in_voltageY_type
1035What: /sys/.../iio:deviceX/scan_elements/in_voltage_type 1096What: /sys/.../iio:deviceX/scan_elements/in_voltage_type
1036What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_type 1097What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_type
1098What: /sys/.../iio:deviceX/scan_elements/in_voltageY_i_type
1099What: /sys/.../iio:deviceX/scan_elements/in_voltageY_q_type
1100What: /sys/.../iio:deviceX/scan_elements/in_voltage_i_type
1101What: /sys/.../iio:deviceX/scan_elements/in_voltage_q_type
1037What: /sys/.../iio:deviceX/scan_elements/in_timestamp_type 1102What: /sys/.../iio:deviceX/scan_elements/in_timestamp_type
1038What: /sys/.../iio:deviceX/scan_elements/in_pressureY_type 1103What: /sys/.../iio:deviceX/scan_elements/in_pressureY_type
1039What: /sys/.../iio:deviceX/scan_elements/in_pressure_type 1104What: /sys/.../iio:deviceX/scan_elements/in_pressure_type
@@ -1071,6 +1136,10 @@ Description:
1071 1136
1072What: /sys/.../iio:deviceX/scan_elements/in_voltageY_index 1137What: /sys/.../iio:deviceX/scan_elements/in_voltageY_index
1073What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_index 1138What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_index
1139What: /sys/.../iio:deviceX/scan_elements/in_voltageY_i_index
1140What: /sys/.../iio:deviceX/scan_elements/in_voltageY_q_index
1141What: /sys/.../iio:deviceX/scan_elements/in_voltage_i_index
1142What: /sys/.../iio:deviceX/scan_elements/in_voltage_q_index
1074What: /sys/.../iio:deviceX/scan_elements/in_accel_x_index 1143What: /sys/.../iio:deviceX/scan_elements/in_accel_x_index
1075What: /sys/.../iio:deviceX/scan_elements/in_accel_y_index 1144What: /sys/.../iio:deviceX/scan_elements/in_accel_y_index
1076What: /sys/.../iio:deviceX/scan_elements/in_accel_z_index 1145What: /sys/.../iio:deviceX/scan_elements/in_accel_z_index
@@ -1230,6 +1299,8 @@ Description:
1230 or without compensation from tilt sensors. 1299 or without compensation from tilt sensors.
1231 1300
1232What: /sys/bus/iio/devices/iio:deviceX/in_currentX_raw 1301What: /sys/bus/iio/devices/iio:deviceX/in_currentX_raw
1302What: /sys/bus/iio/devices/iio:deviceX/in_currentX_i_raw
1303What: /sys/bus/iio/devices/iio:deviceX/in_currentX_q_raw
1233KernelVersion: 3.18 1304KernelVersion: 3.18
1234Contact: linux-iio@vger.kernel.org 1305Contact: linux-iio@vger.kernel.org
1235Description: 1306Description:
@@ -1238,6 +1309,11 @@ Description:
1238 present, output should be considered as processed with the 1309 present, output should be considered as processed with the
1239 unit in milliamps. 1310 unit in milliamps.
1240 1311
1312 Channels with 'i' and 'q' modifiers always exist in pairs and both
1313 channels refer to the same signal. The 'i' channel contains the in-phase
1314 component of the signal while the 'q' channel contains the quadrature
1315 component.
1316
1241What: /sys/.../iio:deviceX/in_energy_en 1317What: /sys/.../iio:deviceX/in_energy_en
1242What: /sys/.../iio:deviceX/in_distance_en 1318What: /sys/.../iio:deviceX/in_distance_en
1243What: /sys/.../iio:deviceX/in_velocity_sqrt(x^2+y^2+z^2)_en 1319What: /sys/.../iio:deviceX/in_velocity_sqrt(x^2+y^2+z^2)_en
@@ -1364,3 +1440,26 @@ Description:
1364 hwfifo_watermak_min but not equal to any of the values in this 1440 hwfifo_watermak_min but not equal to any of the values in this
1365 list, the driver will chose an appropriate value for the 1441 list, the driver will chose an appropriate value for the
1366 hardware fifo watermark level. 1442 hardware fifo watermark level.
1443
1444What: /sys/bus/iio/devices/iio:deviceX/in_temp_calibemissivity
1445What: /sys/bus/iio/devices/iio:deviceX/in_tempX_calibemissivity
1446What: /sys/bus/iio/devices/iio:deviceX/in_temp_object_calibemissivity
1447What: /sys/bus/iio/devices/iio:deviceX/in_tempX_object_calibemissivity
1448KernelVersion: 4.1
1449Contact: linux-iio@vger.kernel.org
1450Description:
1451 The emissivity ratio of the surface in the field of view of the
1452 contactless temperature sensor. Emissivity varies from 0 to 1,
1453 with 1 being the emissivity of a black body.
1454
1455What: /sys/bus/iio/devices/iio:deviceX/in_magn_x_oversampling_ratio
1456What: /sys/bus/iio/devices/iio:deviceX/in_magn_y_oversampling_ratio
1457What: /sys/bus/iio/devices/iio:deviceX/in_magn_z_oversampling_ratio
1458KernelVersion: 4.2
1459Contact: linux-iio@vger.kernel.org
1460Description:
1461 Hardware applied number of measurements for acquiring one
1462 data point. The HW will do <type>[_name]_oversampling_ratio
1463 measurements and return the average value as output data. Each
1464 value resulted from <type>[_name]_oversampling_ratio measurements
1465 is considered as one sample for <type>[_name]_sampling_frequency.
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-vf610 b/Documentation/ABI/testing/sysfs-bus-iio-vf610
new file mode 100644
index 000000000000..ecbc1f4af921
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-iio-vf610
@@ -0,0 +1,7 @@
1What: /sys/bus/iio/devices/iio:deviceX/conversion_mode
2KernelVersion: 4.2
3Contact: linux-iio@vger.kernel.org
4Description:
5 Specifies the hardware conversion mode used. The three
6 available modes are "normal", "high-speed" and "low-power",
7 where the last is the default mode.
diff --git a/Documentation/ABI/testing/sysfs-bus-mei b/Documentation/ABI/testing/sysfs-bus-mei
index 2066f0bbd453..20e4d1638bac 100644
--- a/Documentation/ABI/testing/sysfs-bus-mei
+++ b/Documentation/ABI/testing/sysfs-bus-mei
@@ -4,4 +4,18 @@ KernelVersion: 3.10
4Contact: Samuel Ortiz <sameo@linux.intel.com> 4Contact: Samuel Ortiz <sameo@linux.intel.com>
5 linux-mei@linux.intel.com 5 linux-mei@linux.intel.com
6Description: Stores the same MODALIAS value emitted by uevent 6Description: Stores the same MODALIAS value emitted by uevent
7 Format: mei:<mei device name> 7 Format: mei:<mei device name>:<device uuid>:
8
9What: /sys/bus/mei/devices/.../name
10Date: May 2015
11KernelVersion: 4.2
12Contact: Tomas Winkler <tomas.winkler@intel.com>
13Description: Stores mei client device name
14 Format: string
15
16What: /sys/bus/mei/devices/.../uuid
17Date: May 2015
18KernelVersion: 4.2
19Contact: Tomas Winkler <tomas.winkler@intel.com>
20Description: Stores mei client device uuid
21 Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
diff --git a/Documentation/ABI/testing/sysfs-bus-pci-drivers-janz-cmodio b/Documentation/ABI/testing/sysfs-bus-pci-drivers-janz-cmodio
new file mode 100644
index 000000000000..4d08f28dc871
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-pci-drivers-janz-cmodio
@@ -0,0 +1,8 @@
1What: /sys/bus/pci/drivers/janz-cmodio/.../modulbus_number
2Date: May 2010
3KernelVersion: 2.6.35
4Contact: Ira W. Snyder <ira.snyder@gmail.com>
5Description:
6 Value representing the HEX switch S2 of the janz carrier board CMOD-IO or CAN-PCI2
7
8 Read-only: value of the configuration switch (0..15)
diff --git a/Documentation/ABI/testing/sysfs-bus-usb-lvstest b/Documentation/ABI/testing/sysfs-bus-usb-lvstest
index aae68fc2d842..5151290cf8e7 100644
--- a/Documentation/ABI/testing/sysfs-bus-usb-lvstest
+++ b/Documentation/ABI/testing/sysfs-bus-usb-lvstest
@@ -4,14 +4,14 @@ driver is bound with root hub device.
4 4
5What: /sys/bus/usb/devices/.../get_dev_desc 5What: /sys/bus/usb/devices/.../get_dev_desc
6Date: March 2014 6Date: March 2014
7Contact: Pratyush Anand <pratyush.anand@st.com> 7Contact: Pratyush Anand <pratyush.anand@gmail.com>
8Description: 8Description:
9 Write to this node to issue "Get Device Descriptor" 9 Write to this node to issue "Get Device Descriptor"
10 for Link Layer Validation device. It is needed for TD.7.06. 10 for Link Layer Validation device. It is needed for TD.7.06.
11 11
12What: /sys/bus/usb/devices/.../u1_timeout 12What: /sys/bus/usb/devices/.../u1_timeout
13Date: March 2014 13Date: March 2014
14Contact: Pratyush Anand <pratyush.anand@st.com> 14Contact: Pratyush Anand <pratyush.anand@gmail.com>
15Description: 15Description:
16 Set "U1 timeout" for the downstream port where Link Layer 16 Set "U1 timeout" for the downstream port where Link Layer
17 Validation device is connected. Timeout value must be between 0 17 Validation device is connected. Timeout value must be between 0
@@ -19,7 +19,7 @@ Description:
19 19
20What: /sys/bus/usb/devices/.../u2_timeout 20What: /sys/bus/usb/devices/.../u2_timeout
21Date: March 2014 21Date: March 2014
22Contact: Pratyush Anand <pratyush.anand@st.com> 22Contact: Pratyush Anand <pratyush.anand@gmail.com>
23Description: 23Description:
24 Set "U2 timeout" for the downstream port where Link Layer 24 Set "U2 timeout" for the downstream port where Link Layer
25 Validation device is connected. Timeout value must be between 0 25 Validation device is connected. Timeout value must be between 0
@@ -27,21 +27,21 @@ Description:
27 27
28What: /sys/bus/usb/devices/.../hot_reset 28What: /sys/bus/usb/devices/.../hot_reset
29Date: March 2014 29Date: March 2014
30Contact: Pratyush Anand <pratyush.anand@st.com> 30Contact: Pratyush Anand <pratyush.anand@gmail.com>
31Description: 31Description:
32 Write to this node to issue "Reset" for Link Layer Validation 32 Write to this node to issue "Reset" for Link Layer Validation
33 device. It is needed for TD.7.29, TD.7.31, TD.7.34 and TD.7.35. 33 device. It is needed for TD.7.29, TD.7.31, TD.7.34 and TD.7.35.
34 34
35What: /sys/bus/usb/devices/.../u3_entry 35What: /sys/bus/usb/devices/.../u3_entry
36Date: March 2014 36Date: March 2014
37Contact: Pratyush Anand <pratyush.anand@st.com> 37Contact: Pratyush Anand <pratyush.anand@gmail.com>
38Description: 38Description:
39 Write to this node to issue "U3 entry" for Link Layer 39 Write to this node to issue "U3 entry" for Link Layer
40 Validation device. It is needed for TD.7.35 and TD.7.36. 40 Validation device. It is needed for TD.7.35 and TD.7.36.
41 41
42What: /sys/bus/usb/devices/.../u3_exit 42What: /sys/bus/usb/devices/.../u3_exit
43Date: March 2014 43Date: March 2014
44Contact: Pratyush Anand <pratyush.anand@st.com> 44Contact: Pratyush Anand <pratyush.anand@gmail.com>
45Description: 45Description:
46 Write to this node to issue "U3 exit" for Link Layer 46 Write to this node to issue "U3 exit" for Link Layer
47 Validation device. It is needed for TD.7.36. 47 Validation device. It is needed for TD.7.36.
diff --git a/Documentation/ABI/testing/sysfs-class-cxl b/Documentation/ABI/testing/sysfs-class-cxl
index d46bba801aac..acfe9df83139 100644
--- a/Documentation/ABI/testing/sysfs-class-cxl
+++ b/Documentation/ABI/testing/sysfs-class-cxl
@@ -6,6 +6,17 @@ Example: The real path of the attribute /sys/class/cxl/afu0.0s/irqs_max is
6 6
7Slave contexts (eg. /sys/class/cxl/afu0.0s): 7Slave contexts (eg. /sys/class/cxl/afu0.0s):
8 8
9What: /sys/class/cxl/<afu>/afu_err_buf
10Date: September 2014
11Contact: linuxppc-dev@lists.ozlabs.org
12Description: read only
13 AFU Error Buffer contents. The contents of this file are
14 application specific and depends on the AFU being used.
15 Applications interacting with the AFU can use this attribute
16 to know about the current error condition and take appropriate
17 action like logging the event etc.
18
19
9What: /sys/class/cxl/<afu>/irqs_max 20What: /sys/class/cxl/<afu>/irqs_max
10Date: September 2014 21Date: September 2014
11Contact: linuxppc-dev@lists.ozlabs.org 22Contact: linuxppc-dev@lists.ozlabs.org
@@ -15,6 +26,7 @@ Description: read/write
15 that hardware can support (eg. 2037). Write values will limit 26 that hardware can support (eg. 2037). Write values will limit
16 userspace applications to that many userspace interrupts. Must 27 userspace applications to that many userspace interrupts. Must
17 be >= irqs_min. 28 be >= irqs_min.
29Users: https://github.com/ibm-capi/libcxl
18 30
19What: /sys/class/cxl/<afu>/irqs_min 31What: /sys/class/cxl/<afu>/irqs_min
20Date: September 2014 32Date: September 2014
@@ -24,6 +36,7 @@ Description: read only
24 userspace must request on a CXL_START_WORK ioctl. Userspace may 36 userspace must request on a CXL_START_WORK ioctl. Userspace may
25 omit the num_interrupts field in the START_WORK IOCTL to get 37 omit the num_interrupts field in the START_WORK IOCTL to get
26 this minimum automatically. 38 this minimum automatically.
39Users: https://github.com/ibm-capi/libcxl
27 40
28What: /sys/class/cxl/<afu>/mmio_size 41What: /sys/class/cxl/<afu>/mmio_size
29Date: September 2014 42Date: September 2014
@@ -31,6 +44,7 @@ Contact: linuxppc-dev@lists.ozlabs.org
31Description: read only 44Description: read only
32 Decimal value of the size of the MMIO space that may be mmaped 45 Decimal value of the size of the MMIO space that may be mmaped
33 by userspace. 46 by userspace.
47Users: https://github.com/ibm-capi/libcxl
34 48
35What: /sys/class/cxl/<afu>/modes_supported 49What: /sys/class/cxl/<afu>/modes_supported
36Date: September 2014 50Date: September 2014
@@ -38,6 +52,7 @@ Contact: linuxppc-dev@lists.ozlabs.org
38Description: read only 52Description: read only
39 List of the modes this AFU supports. One per line. 53 List of the modes this AFU supports. One per line.
40 Valid entries are: "dedicated_process" and "afu_directed" 54 Valid entries are: "dedicated_process" and "afu_directed"
55Users: https://github.com/ibm-capi/libcxl
41 56
42What: /sys/class/cxl/<afu>/mode 57What: /sys/class/cxl/<afu>/mode
43Date: September 2014 58Date: September 2014
@@ -46,6 +61,7 @@ Description: read/write
46 The current mode the AFU is using. Will be one of the modes 61 The current mode the AFU is using. Will be one of the modes
47 given in modes_supported. Writing will change the mode 62 given in modes_supported. Writing will change the mode
48 provided that no user contexts are attached. 63 provided that no user contexts are attached.
64Users: https://github.com/ibm-capi/libcxl
49 65
50 66
51What: /sys/class/cxl/<afu>/prefault_mode 67What: /sys/class/cxl/<afu>/prefault_mode
@@ -59,6 +75,7 @@ Description: read/write
59 descriptor as an effective address and 75 descriptor as an effective address and
60 prefault what it points to. 76 prefault what it points to.
61 all: all segments process calling START_WORK maps. 77 all: all segments process calling START_WORK maps.
78Users: https://github.com/ibm-capi/libcxl
62 79
63What: /sys/class/cxl/<afu>/reset 80What: /sys/class/cxl/<afu>/reset
64Date: September 2014 81Date: September 2014
@@ -66,12 +83,14 @@ Contact: linuxppc-dev@lists.ozlabs.org
66Description: write only 83Description: write only
67 Writing 1 here will reset the AFU provided there are not 84 Writing 1 here will reset the AFU provided there are not
68 contexts active on the AFU. 85 contexts active on the AFU.
86Users: https://github.com/ibm-capi/libcxl
69 87
70What: /sys/class/cxl/<afu>/api_version 88What: /sys/class/cxl/<afu>/api_version
71Date: September 2014 89Date: September 2014
72Contact: linuxppc-dev@lists.ozlabs.org 90Contact: linuxppc-dev@lists.ozlabs.org
73Description: read only 91Description: read only
74 Decimal value of the current version of the kernel/user API. 92 Decimal value of the current version of the kernel/user API.
93Users: https://github.com/ibm-capi/libcxl
75 94
76What: /sys/class/cxl/<afu>/api_version_compatible 95What: /sys/class/cxl/<afu>/api_version_compatible
77Date: September 2014 96Date: September 2014
@@ -79,6 +98,7 @@ Contact: linuxppc-dev@lists.ozlabs.org
79Description: read only 98Description: read only
80 Decimal value of the the lowest version of the userspace API 99 Decimal value of the the lowest version of the userspace API
81 this this kernel supports. 100 this this kernel supports.
101Users: https://github.com/ibm-capi/libcxl
82 102
83 103
84AFU configuration records (eg. /sys/class/cxl/afu0.0/cr0): 104AFU configuration records (eg. /sys/class/cxl/afu0.0/cr0):
@@ -92,6 +112,7 @@ Contact: linuxppc-dev@lists.ozlabs.org
92Description: read only 112Description: read only
93 Hexadecimal value of the vendor ID found in this AFU 113 Hexadecimal value of the vendor ID found in this AFU
94 configuration record. 114 configuration record.
115Users: https://github.com/ibm-capi/libcxl
95 116
96What: /sys/class/cxl/<afu>/cr<config num>/device 117What: /sys/class/cxl/<afu>/cr<config num>/device
97Date: February 2015 118Date: February 2015
@@ -99,6 +120,7 @@ Contact: linuxppc-dev@lists.ozlabs.org
99Description: read only 120Description: read only
100 Hexadecimal value of the device ID found in this AFU 121 Hexadecimal value of the device ID found in this AFU
101 configuration record. 122 configuration record.
123Users: https://github.com/ibm-capi/libcxl
102 124
103What: /sys/class/cxl/<afu>/cr<config num>/class 125What: /sys/class/cxl/<afu>/cr<config num>/class
104Date: February 2015 126Date: February 2015
@@ -106,6 +128,7 @@ Contact: linuxppc-dev@lists.ozlabs.org
106Description: read only 128Description: read only
107 Hexadecimal value of the class code found in this AFU 129 Hexadecimal value of the class code found in this AFU
108 configuration record. 130 configuration record.
131Users: https://github.com/ibm-capi/libcxl
109 132
110What: /sys/class/cxl/<afu>/cr<config num>/config 133What: /sys/class/cxl/<afu>/cr<config num>/config
111Date: February 2015 134Date: February 2015
@@ -115,6 +138,7 @@ Description: read only
115 record. The format is expected to match the either the standard 138 record. The format is expected to match the either the standard
116 or extended configuration space defined by the PCIe 139 or extended configuration space defined by the PCIe
117 specification. 140 specification.
141Users: https://github.com/ibm-capi/libcxl
118 142
119 143
120 144
@@ -126,18 +150,21 @@ Contact: linuxppc-dev@lists.ozlabs.org
126Description: read only 150Description: read only
127 Decimal value of the size of the MMIO space that may be mmaped 151 Decimal value of the size of the MMIO space that may be mmaped
128 by userspace. This includes all slave contexts space also. 152 by userspace. This includes all slave contexts space also.
153Users: https://github.com/ibm-capi/libcxl
129 154
130What: /sys/class/cxl/<afu>m/pp_mmio_len 155What: /sys/class/cxl/<afu>m/pp_mmio_len
131Date: September 2014 156Date: September 2014
132Contact: linuxppc-dev@lists.ozlabs.org 157Contact: linuxppc-dev@lists.ozlabs.org
133Description: read only 158Description: read only
134 Decimal value of the Per Process MMIO space length. 159 Decimal value of the Per Process MMIO space length.
160Users: https://github.com/ibm-capi/libcxl
135 161
136What: /sys/class/cxl/<afu>m/pp_mmio_off 162What: /sys/class/cxl/<afu>m/pp_mmio_off
137Date: September 2014 163Date: September 2014
138Contact: linuxppc-dev@lists.ozlabs.org 164Contact: linuxppc-dev@lists.ozlabs.org
139Description: read only 165Description: read only
140 Decimal value of the Per Process MMIO space offset. 166 Decimal value of the Per Process MMIO space offset.
167Users: https://github.com/ibm-capi/libcxl
141 168
142 169
143Card info (eg. /sys/class/cxl/card0) 170Card info (eg. /sys/class/cxl/card0)
@@ -147,12 +174,14 @@ Date: September 2014
147Contact: linuxppc-dev@lists.ozlabs.org 174Contact: linuxppc-dev@lists.ozlabs.org
148Description: read only 175Description: read only
149 Identifies the CAIA Version the card implements. 176 Identifies the CAIA Version the card implements.
177Users: https://github.com/ibm-capi/libcxl
150 178
151What: /sys/class/cxl/<card>/psl_revision 179What: /sys/class/cxl/<card>/psl_revision
152Date: September 2014 180Date: September 2014
153Contact: linuxppc-dev@lists.ozlabs.org 181Contact: linuxppc-dev@lists.ozlabs.org
154Description: read only 182Description: read only
155 Identifies the revision level of the PSL. 183 Identifies the revision level of the PSL.
184Users: https://github.com/ibm-capi/libcxl
156 185
157What: /sys/class/cxl/<card>/base_image 186What: /sys/class/cxl/<card>/base_image
158Date: September 2014 187Date: September 2014
@@ -162,6 +191,7 @@ Description: read only
162 that support loadable PSLs. For FPGAs this field identifies 191 that support loadable PSLs. For FPGAs this field identifies
163 the image contained in the on-adapter flash which is loaded 192 the image contained in the on-adapter flash which is loaded
164 during the initial program load. 193 during the initial program load.
194Users: https://github.com/ibm-capi/libcxl
165 195
166What: /sys/class/cxl/<card>/image_loaded 196What: /sys/class/cxl/<card>/image_loaded
167Date: September 2014 197Date: September 2014
@@ -169,6 +199,7 @@ Contact: linuxppc-dev@lists.ozlabs.org
169Description: read only 199Description: read only
170 Will return "user" or "factory" depending on the image loaded 200 Will return "user" or "factory" depending on the image loaded
171 onto the card. 201 onto the card.
202Users: https://github.com/ibm-capi/libcxl
172 203
173What: /sys/class/cxl/<card>/load_image_on_perst 204What: /sys/class/cxl/<card>/load_image_on_perst
174Date: December 2014 205Date: December 2014
@@ -183,6 +214,7 @@ Description: read/write
183 user or factory image to be loaded. 214 user or factory image to be loaded.
184 Default is to reload on PERST whichever image the card has 215 Default is to reload on PERST whichever image the card has
185 loaded. 216 loaded.
217Users: https://github.com/ibm-capi/libcxl
186 218
187What: /sys/class/cxl/<card>/reset 219What: /sys/class/cxl/<card>/reset
188Date: October 2014 220Date: October 2014
@@ -190,3 +222,4 @@ Contact: linuxppc-dev@lists.ozlabs.org
190Description: write only 222Description: write only
191 Writing 1 will issue a PERST to card which may cause the card 223 Writing 1 will issue a PERST to card which may cause the card
192 to reload the FPGA depending on load_image_on_perst. 224 to reload the FPGA depending on load_image_on_perst.
225Users: https://github.com/ibm-capi/libcxl
diff --git a/Documentation/ABI/testing/sysfs-class-net b/Documentation/ABI/testing/sysfs-class-net
index 5ecfd72ba684..668604fc8e06 100644
--- a/Documentation/ABI/testing/sysfs-class-net
+++ b/Documentation/ABI/testing/sysfs-class-net
@@ -39,6 +39,25 @@ Description:
39 Format is a string, e.g: 00:11:22:33:44:55 for an Ethernet MAC 39 Format is a string, e.g: 00:11:22:33:44:55 for an Ethernet MAC
40 address. 40 address.
41 41
42What: /sys/class/net/<bridge iface>/bridge/group_fwd_mask
43Date: January 2012
44KernelVersion: 3.2
45Contact: netdev@vger.kernel.org
46Description:
47 Bitmask to allow forwarding of link local frames with address
48 01-80-C2-00-00-0X on a bridge device. Only values that set bits
49 not matching BR_GROUPFWD_RESTRICTED in net/bridge/br_private.h
50 allowed.
51 Default value 0 does not forward any link local frames.
52
53 Restricted bits:
54 0: 01-80-C2-00-00-00 Bridge Group Address used for STP
55 1: 01-80-C2-00-00-01 (MAC Control) 802.3 used for MAC PAUSE
56 2: 01-80-C2-00-00-02 (Link Aggregation) 802.3ad
57
58 Any values not setting these bits can be used. Take special
59 care when forwarding control frames e.g. 802.1X-PAE or LLDP.
60
42What: /sys/class/net/<iface>/broadcast 61What: /sys/class/net/<iface>/broadcast
43Date: April 2005 62Date: April 2005
44KernelVersion: 2.6.12 63KernelVersion: 2.6.12
diff --git a/Documentation/ABI/testing/sysfs-class-net-janz-ican3 b/Documentation/ABI/testing/sysfs-class-net-janz-ican3
new file mode 100644
index 000000000000..fdbc03a2b8f8
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-net-janz-ican3
@@ -0,0 +1,19 @@
1What: /sys/class/net/<iface>/termination
2Date: May 2010
3KernelVersion: 2.6.35
4Contact: Ira W. Snyder <ira.snyder@gmail.com>
5Description:
6 Value representing the can bus termination
7
8 Default: 1 (termination active)
9 Reading: get actual termination state
10 Writing: set actual termination state (0=no termination, 1=termination active)
11
12What: /sys/class/net/<iface>/fwinfo
13Date: May 2015
14KernelVersion: 3.19
15Contact: Andreas Gröger <andreas24groeger@gmail.com>
16Description:
17 Firmware stamp of ican3 module
18 Read-only: 32 byte string identification of the ICAN3 module
19 (known values: "JANZ-ICAN3 ICANOS 1.xx", "JANZ-ICAN3 CAL/CANopen 1.xx")
diff --git a/Documentation/ABI/testing/sysfs-class-scsi_tape b/Documentation/ABI/testing/sysfs-class-scsi_tape
new file mode 100644
index 000000000000..9be398b87ee9
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-scsi_tape
@@ -0,0 +1,109 @@
1What: /sys/class/scsi_tape/*/stats/in_flight
2Date: Apr 2015
3KernelVersion: 4.2
4Contact: Shane Seymour <shane.seymour@hp.com>
5Description:
6 Show the number of I/Os currently in-flight between the st
7 module and the SCSI mid-layer.
8Users:
9
10
11What: /sys/class/scsi_tape/*/stats/io_ns
12Date: Apr 2015
13KernelVersion: 4.2
14Contact: Shane Seymour <shane.seymour@hp.com>
15Description:
16 Shows the total amount of time spent waiting for all I/O
17 to and from the tape drive to complete. This includes all
18 reads, writes, and other SCSI commands issued to the tape
19 drive. An example of other SCSI commands would be tape
20 movement such as a rewind when a rewind tape device is
21 closed. This item is measured in nanoseconds.
22
23 To determine the amount of time spent waiting for other I/O
24 to complete subtract read_ns and write_ns from this value.
25Users:
26
27
28What: /sys/class/scsi_tape/*/stats/other_cnt
29Date: Apr 2015
30KernelVersion: 4.2
31Contact: Shane Seymour <shane.seymour@hp.com>
32Description:
33 The number of I/O requests issued to the tape drive other
34 than SCSI read/write requests.
35Users:
36
37
38What: /sys/class/scsi_tape/*/stats/read_byte_cnt
39Date: Apr 2015
40KernelVersion: 4.2
41Contact: Shane Seymour <shane.seymour@hp.com>
42Description:
43 Shows the total number of bytes requested from the tape drive.
44 This value is presented in bytes because tape drives support
45 variable length block sizes.
46Users:
47
48
49What: /sys/class/scsi_tape/*/stats/read_cnt
50Date: Apr 2015
51KernelVersion: 4.2
52Contact: Shane Seymour <shane.seymour@hp.com>
53Description:
54 Shows the total number of read requests issued to the tape
55 drive.
56Users:
57
58
59What: /sys/class/scsi_tape/*/stats/read_ns
60Date: Apr 2015
61KernelVersion: 4.2
62Contact: Shane Seymour <shane.seymour@hp.com>
63Description:
64 Shows the total amount of time in nanoseconds waiting for
65 read I/O requests to complete.
66Users:
67
68
69What: /sys/class/scsi_tape/*/stats/write_byte_cnt
70Date: Apr 2015
71KernelVersion: 4.2
72Contact: Shane Seymour <shane.seymour@hp.com>
73Description:
74 Shows the total number of bytes written to the tape drive.
75 This value is presented in bytes because tape drives support
76 variable length block sizes.
77Users:
78
79
80What: /sys/class/scsi_tape/*/stats/write_cnt
81Date: Apr 2015
82KernelVersion: 4.2
83Contact: Shane Seymour <shane.seymour@hp.com>
84Description:
85 Shows the total number of write requests issued to the tape
86 drive.
87Users:
88
89
90What: /sys/class/scsi_tape/*/stats/write_ms
91Date: Apr 2015
92KernelVersion: 4.2
93Contact: Shane Seymour <shane.seymour@hp.com>
94Description:
95 Shows the total amount of time in nanoseconds waiting for
96 write I/O requests to complete.
97Users:
98
99
100What: /sys/class/scsi_tape/*/stats/resid_cnt
101Date: Apr 2015
102KernelVersion: 4.2
103Contact: Shane Seymour <shane.seymour@hp.com>
104Description:
105 Shows the number of times we found that a residual >0
106 was found when the SCSI midlayer indicated that there was
107 an error. For reads this may be a case of someone issuing
108 reads greater than the block size.
109Users:
diff --git a/Documentation/ABI/testing/sysfs-class-zram b/Documentation/ABI/testing/sysfs-class-zram
new file mode 100644
index 000000000000..48ddacbe0e69
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-zram
@@ -0,0 +1,24 @@
1What: /sys/class/zram-control/
2Date: August 2015
3KernelVersion: 4.2
4Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
5Description:
6 The zram-control/ class sub-directory belongs to zram
7 device class
8
9What: /sys/class/zram-control/hot_add
10Date: August 2015
11KernelVersion: 4.2
12Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
13Description:
14 RO attribute. Read operation will cause zram to add a new
15 device and return its device id back to user (so one can
16 use /dev/zram<id>), or error code.
17
18What: /sys/class/zram-control/hot_remove
19Date: August 2015
20KernelVersion: 4.2
21Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
22Description:
23 WO attribute. Remove a specific /dev/zramX device, where X
24 is a device_id provided by user.
diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu
index 99983e67c13c..b683e8ee69ec 100644
--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
@@ -162,7 +162,7 @@ Description: Discover CPUs in the same CPU frequency coordination domain
162What: /sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1} 162What: /sys/devices/system/cpu/cpu*/cache/index3/cache_disable_{0,1}
163Date: August 2008 163Date: August 2008
164KernelVersion: 2.6.27 164KernelVersion: 2.6.27
165Contact: discuss@x86-64.org 165Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
166Description: Disable L3 cache indices 166Description: Disable L3 cache indices
167 167
168 These files exist in every CPU's cache/index3 directory. Each 168 These files exist in every CPU's cache/index3 directory. Each
@@ -243,7 +243,7 @@ Description: Parameters for the CPU cache attributes
243 coherency_line_size: the minimum amount of data in bytes that gets 243 coherency_line_size: the minimum amount of data in bytes that gets
244 transferred from memory to cache 244 transferred from memory to cache
245 245
246 level: the cache hierarcy in the multi-level cache configuration 246 level: the cache hierarchy in the multi-level cache configuration
247 247
248 number_of_sets: total number of sets in the cache, a set is a 248 number_of_sets: total number of sets in the cache, a set is a
249 collection of cache lines with the same cache index 249 collection of cache lines with the same cache index
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-logitech-lg4ff b/Documentation/ABI/testing/sysfs-driver-hid-logitech-lg4ff
index b3f6a2ac5007..db197a879580 100644
--- a/Documentation/ABI/testing/sysfs-driver-hid-logitech-lg4ff
+++ b/Documentation/ABI/testing/sysfs-driver-hid-logitech-lg4ff
@@ -1,7 +1,7 @@
1What: /sys/module/hid_logitech/drivers/hid:logitech/<dev>/range. 1What: /sys/bus/hid/drivers/logitech/<dev>/range
2Date: July 2011 2Date: July 2011
3KernelVersion: 3.2 3KernelVersion: 3.2
4Contact: Michal Malý <madcatxster@gmail.com> 4Contact: Michal Malý <madcatxster@devoid-pointer.net>
5Description: Display minimum, maximum and current range of the steering 5Description: Display minimum, maximum and current range of the steering
6 wheel. Writing a value within min and max boundaries sets the 6 wheel. Writing a value within min and max boundaries sets the
7 range of the wheel. 7 range of the wheel.
@@ -9,7 +9,7 @@ Description: Display minimum, maximum and current range of the steering
9What: /sys/bus/hid/drivers/logitech/<dev>/alternate_modes 9What: /sys/bus/hid/drivers/logitech/<dev>/alternate_modes
10Date: Feb 2015 10Date: Feb 2015
11KernelVersion: 4.1 11KernelVersion: 4.1
12Contact: Michal Malý <madcatxster@gmail.com> 12Contact: Michal Malý <madcatxster@devoid-pointer.net>
13Description: Displays a set of alternate modes supported by a wheel. Each 13Description: Displays a set of alternate modes supported by a wheel. Each
14 mode is listed as follows: 14 mode is listed as follows:
15 Tag: Mode Name 15 Tag: Mode Name
@@ -45,7 +45,7 @@ Description: Displays a set of alternate modes supported by a wheel. Each
45What: /sys/bus/hid/drivers/logitech/<dev>/real_id 45What: /sys/bus/hid/drivers/logitech/<dev>/real_id
46Date: Feb 2015 46Date: Feb 2015
47KernelVersion: 4.1 47KernelVersion: 4.1
48Contact: Michal Malý <madcatxster@gmail.com> 48Contact: Michal Malý <madcatxster@devoid-pointer.net>
49Description: Displays the real model of the wheel regardless of any 49Description: Displays the real model of the wheel regardless of any
50 alternate mode the wheel might be switched to. 50 alternate mode the wheel might be switched to.
51 It is a read-only value. 51 It is a read-only value.
diff --git a/Documentation/ABI/testing/sysfs-driver-toshiba_haps b/Documentation/ABI/testing/sysfs-driver-toshiba_haps
new file mode 100644
index 000000000000..a662370b4dbf
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-toshiba_haps
@@ -0,0 +1,20 @@
1What: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS620A:00/protection_level
2Date: August 16, 2014
3KernelVersion: 3.17
4Contact: Azael Avalos <coproscefalo@gmail.com>
5Description: This file controls the built-in accelerometer protection level,
6 valid values are:
7 * 0 -> Disabled
8 * 1 -> Low
9 * 2 -> Medium
10 * 3 -> High
11 The default potection value is set to 2 (Medium).
12Users: KToshiba
13
14What: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/TOS620A:00/reset_protection
15Date: August 16, 2014
16KernelVersion: 3.17
17Contact: Azael Avalos <coproscefalo@gmail.com>
18Description: This file turns off the built-in accelerometer for a few
19 seconds and then restore normal operation. Accepting 1 as the
20 only parameter.
diff --git a/Documentation/ABI/testing/sysfs-firmware-dmi b/Documentation/ABI/testing/sysfs-firmware-dmi-entries
index c78f9ab01e56..210ad44b95a5 100644
--- a/Documentation/ABI/testing/sysfs-firmware-dmi
+++ b/Documentation/ABI/testing/sysfs-firmware-dmi-entries
@@ -1,4 +1,4 @@
1What: /sys/firmware/dmi/ 1What: /sys/firmware/dmi/entries/
2Date: February 2011 2Date: February 2011
3Contact: Mike Waychison <mikew@google.com> 3Contact: Mike Waychison <mikew@google.com>
4Description: 4Description:
diff --git a/Documentation/ABI/testing/sysfs-firmware-dmi-tables b/Documentation/ABI/testing/sysfs-firmware-dmi-tables
new file mode 100644
index 000000000000..ff3cac8ed0bd
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-firmware-dmi-tables
@@ -0,0 +1,22 @@
1What: /sys/firmware/dmi/tables/
2Date: April 2015
3Contact: Ivan Khoronzhuk <ivan.khoronzhuk@globallogic.com>
4Description:
5 The firmware provides DMI structures as a packed list of
6 data referenced by a SMBIOS table entry point. The SMBIOS
7 entry point contains general information, like SMBIOS
8 version, DMI table size, etc. The structure, content and
9 size of SMBIOS entry point is dependent on SMBIOS version.
10 The format of SMBIOS entry point and DMI structures
11 can be read in SMBIOS specification.
12
13 The dmi/tables provides raw SMBIOS entry point and DMI tables
14 through sysfs as an alternative to utilities reading them
15 from /dev/mem. The raw SMBIOS entry point and DMI table are
16 presented as binary attributes and are accessible via:
17
18 /sys/firmware/dmi/tables/smbios_entry_point
19 /sys/firmware/dmi/tables/DMI
20
21 The complete DMI information can be obtained using these two
22 tables.
diff --git a/Documentation/ABI/testing/sysfs-firmware-efi b/Documentation/ABI/testing/sysfs-firmware-efi
index 05874da7ce80..e794eac32a90 100644
--- a/Documentation/ABI/testing/sysfs-firmware-efi
+++ b/Documentation/ABI/testing/sysfs-firmware-efi
@@ -18,3 +18,13 @@ Contact: Dave Young <dyoung@redhat.com>
18Description: It shows the physical address of config table entry in the EFI 18Description: It shows the physical address of config table entry in the EFI
19 system table. 19 system table.
20Users: Kexec 20Users: Kexec
21
22What: /sys/firmware/efi/systab
23Date: April 2005
24Contact: linux-efi@vger.kernel.org
25Description: Displays the physical addresses of all EFI Configuration
26 Tables found via the EFI System Table. The order in
27 which the tables are printed forms an ABI and newer
28 versions are always printed first, i.e. ACPI20 comes
29 before ACPI.
30Users: dmidecode
diff --git a/Documentation/ABI/testing/sysfs-firmware-efi-esrt b/Documentation/ABI/testing/sysfs-firmware-efi-esrt
new file mode 100644
index 000000000000..6e431d1a4e79
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-firmware-efi-esrt
@@ -0,0 +1,81 @@
1What: /sys/firmware/efi/esrt/
2Date: February 2015
3Contact: Peter Jones <pjones@redhat.com>
4Description: Provides userland access to read the EFI System Resource Table
5 (ESRT), a catalog of firmware for which can be updated with
6 the UEFI UpdateCapsule mechanism described in section 7.5 of
7 the UEFI Standard.
8Users: fwupdate - https://github.com/rhinstaller/fwupdate
9
10What: /sys/firmware/efi/esrt/fw_resource_count
11Date: February 2015
12Contact: Peter Jones <pjones@redhat.com>
13Description: The number of entries in the ESRT
14
15What: /sys/firmware/efi/esrt/fw_resource_count_max
16Date: February 2015
17Contact: Peter Jones <pjones@redhat.com>
18Description: The maximum number of entries that /could/ be registered
19 in the allocation the table is currently in. This is
20 really only useful to the system firmware itself.
21
22What: /sys/firmware/efi/esrt/fw_resource_version
23Date: February 2015
24Contact: Peter Jones <pjones@redhat.com>
25Description: The version of the ESRT structure provided by the firmware.
26
27What: /sys/firmware/efi/esrt/entries/entry$N/
28Date: February 2015
29Contact: Peter Jones <pjones@redhat.com>
30Description: Each ESRT entry is identified by a GUID, and each gets a
31 subdirectory under entries/ .
32 example: /sys/firmware/efi/esrt/entries/entry0/
33
34What: /sys/firmware/efi/esrt/entries/entry$N/fw_type
35Date: February 2015
36Contact: Peter Jones <pjones@redhat.com>
37Description: What kind of firmware entry this is:
38 0 - Unknown
39 1 - System Firmware
40 2 - Device Firmware
41 3 - UEFI Driver
42
43What: /sys/firmware/efi/esrt/entries/entry$N/fw_class
44Date: February 2015
45Contact: Peter Jones <pjones@redhat.com>
46Description: This is the entry's guid, and will match the directory name.
47
48What: /sys/firmware/efi/esrt/entries/entry$N/fw_version
49Date: February 2015
50Contact: Peter Jones <pjones@redhat.com>
51Description: The version of the firmware currently installed. This is a
52 32-bit unsigned integer.
53
54What: /sys/firmware/efi/esrt/entries/entry$N/lowest_supported_fw_version
55Date: February 2015
56Contact: Peter Jones <pjones@redhat.com>
57Description: The lowest version of the firmware that can be installed.
58
59What: /sys/firmware/efi/esrt/entries/entry$N/capsule_flags
60Date: February 2015
61Contact: Peter Jones <pjones@redhat.com>
62Description: Flags that must be passed to UpdateCapsule()
63
64What: /sys/firmware/efi/esrt/entries/entry$N/last_attempt_version
65Date: February 2015
66Contact: Peter Jones <pjones@redhat.com>
67Description: The last firmware version for which an update was attempted.
68
69What: /sys/firmware/efi/esrt/entries/entry$N/last_attempt_status
70Date: February 2015
71Contact: Peter Jones <pjones@redhat.com>
72Description: The result of the last firmware update attempt for the
73 firmware resource entry.
74 0 - Success
75 1 - Insufficient resources
76 2 - Incorrect version
77 3 - Invalid format
78 4 - Authentication error
79 5 - AC power event
80 6 - Battery power event
81
diff --git a/Documentation/ABI/testing/sysfs-platform-twl4030-usb b/Documentation/ABI/testing/sysfs-platform-twl4030-usb
new file mode 100644
index 000000000000..512c51be64ae
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-platform-twl4030-usb
@@ -0,0 +1,8 @@
1What: /sys/bus/platform/devices/*twl4030-usb/vbus
2Description:
3 Read-only status reporting if VBUS (approx 5V)
4 is being supplied by the USB bus.
5
6 Possible values: "on", "off".
7
8 Changes are notified via select/poll.
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle
index f4b78eafd92a..b713c35f8543 100644
--- a/Documentation/CodingStyle
+++ b/Documentation/CodingStyle
@@ -670,7 +670,7 @@ functions:
670 typeof(x) ret; \ 670 typeof(x) ret; \
671 ret = calc_ret(x); \ 671 ret = calc_ret(x); \
672 (ret); \ 672 (ret); \
673)} 673})
674 674
675ret is a common name for a local variable - __foo_ret is less likely 675ret is a common name for a local variable - __foo_ret is less likely
676to collide with an existing variable. 676to collide with an existing variable.
diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt
index 0f7afb2bb442..55b70b903ead 100644
--- a/Documentation/DMA-API-HOWTO.txt
+++ b/Documentation/DMA-API-HOWTO.txt
@@ -25,13 +25,18 @@ physical addresses. These are the addresses in /proc/iomem. The physical
25address is not directly useful to a driver; it must use ioremap() to map 25address is not directly useful to a driver; it must use ioremap() to map
26the space and produce a virtual address. 26the space and produce a virtual address.
27 27
28I/O devices use a third kind of address: a "bus address" or "DMA address". 28I/O devices use a third kind of address: a "bus address". If a device has
29If a device has registers at an MMIO address, or if it performs DMA to read 29registers at an MMIO address, or if it performs DMA to read or write system
30or write system memory, the addresses used by the device are bus addresses. 30memory, the addresses used by the device are bus addresses. In some
31In some systems, bus addresses are identical to CPU physical addresses, but 31systems, bus addresses are identical to CPU physical addresses, but in
32in general they are not. IOMMUs and host bridges can produce arbitrary 32general they are not. IOMMUs and host bridges can produce arbitrary
33mappings between physical and bus addresses. 33mappings between physical and bus addresses.
34 34
35From a device's point of view, DMA uses the bus address space, but it may
36be restricted to a subset of that space. For example, even if a system
37supports 64-bit addresses for main memory and PCI BARs, it may use an IOMMU
38so devices only need to use 32-bit DMA addresses.
39
35Here's a picture and some examples: 40Here's a picture and some examples:
36 41
37 CPU CPU Bus 42 CPU CPU Bus
@@ -72,11 +77,11 @@ can use virtual address X to access the buffer, but the device itself
72cannot because DMA doesn't go through the CPU virtual memory system. 77cannot because DMA doesn't go through the CPU virtual memory system.
73 78
74In some simple systems, the device can do DMA directly to physical address 79In some simple systems, the device can do DMA directly to physical address
75Y. But in many others, there is IOMMU hardware that translates bus 80Y. But in many others, there is IOMMU hardware that translates DMA
76addresses to physical addresses, e.g., it translates Z to Y. This is part 81addresses 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 82of 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 83an 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 84mapping and returns the DMA 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 85do DMA to Z, and the IOMMU maps it to the buffer at address Y in system
81RAM. 86RAM.
82 87
@@ -98,7 +103,7 @@ First of all, you should make sure
98#include <linux/dma-mapping.h> 103#include <linux/dma-mapping.h>
99 104
100is in your driver, which provides the definition of dma_addr_t. This type 105is in your driver, which provides the definition of dma_addr_t. This type
101can hold any valid DMA or bus address for the platform and should be used 106can hold any valid DMA address for the platform and should be used
102everywhere you hold a DMA address returned from the DMA mapping functions. 107everywhere you hold a DMA address returned from the DMA mapping functions.
103 108
104 What memory is DMA'able? 109 What memory is DMA'able?
@@ -240,7 +245,7 @@ the case would look like this:
240 245
241 if (!dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64))) { 246 if (!dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64))) {
242 using_dac = 1; 247 using_dac = 1;
243 consistent_using_dac = 1; 248 consistent_using_dac = 1;
244 } else if (!dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32))) { 249 } else if (!dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32))) {
245 using_dac = 0; 250 using_dac = 0;
246 consistent_using_dac = 0; 251 consistent_using_dac = 0;
@@ -316,7 +321,7 @@ There are two types of DMA mappings:
316 Think of "consistent" as "synchronous" or "coherent". 321 Think of "consistent" as "synchronous" or "coherent".
317 322
318 The current default is to return consistent memory in the low 32 323 The current default is to return consistent memory in the low 32
319 bits of the bus space. However, for future compatibility you should 324 bits of the DMA space. However, for future compatibility you should
320 set the consistent mask even if this default is fine for your 325 set the consistent mask even if this default is fine for your
321 driver. 326 driver.
322 327
@@ -353,7 +358,7 @@ There are two types of DMA mappings:
353 transfer, unmapped right after it (unless you use dma_sync_* below) 358 transfer, unmapped right after it (unless you use dma_sync_* below)
354 and for which hardware can optimize for sequential accesses. 359 and for which hardware can optimize for sequential accesses.
355 360
356 This of "streaming" as "asynchronous" or "outside the coherency 361 Think of "streaming" as "asynchronous" or "outside the coherency
357 domain". 362 domain".
358 363
359 Good examples of what to use streaming mappings for are: 364 Good examples of what to use streaming mappings for are:
@@ -403,7 +408,7 @@ dma_alloc_coherent() returns two values: the virtual address which you
403can use to access it from the CPU and dma_handle which you pass to the 408can use to access it from the CPU and dma_handle which you pass to the
404card. 409card.
405 410
406The CPU virtual address and the DMA bus address are both 411The CPU virtual address and the DMA address are both
407guaranteed to be aligned to the smallest PAGE_SIZE order which 412guaranteed to be aligned to the smallest PAGE_SIZE order which
408is greater than or equal to the requested size. This invariant 413is greater than or equal to the requested size. This invariant
409exists (for example) to guarantee that if you allocate a chunk 414exists (for example) to guarantee that if you allocate a chunk
@@ -645,8 +650,8 @@ PLEASE NOTE: The 'nents' argument to the dma_unmap_sg call must be
645 dma_map_sg call. 650 dma_map_sg call.
646 651
647Every dma_map_{single,sg}() call should have its dma_unmap_{single,sg}() 652Every dma_map_{single,sg}() call should have its dma_unmap_{single,sg}()
648counterpart, because the bus address space is a shared resource and 653counterpart, because the DMA address space is a shared resource and
649you could render the machine unusable by consuming all bus addresses. 654you could render the machine unusable by consuming all DMA addresses.
650 655
651If you need to use the same streaming DMA region multiple times and touch 656If you need to use the same streaming DMA region multiple times and touch
652the data in between the DMA transfers, the buffer needs to be synced 657the data in between the DMA transfers, the buffer needs to be synced
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt
index 52088408668a..7eba542eff7c 100644
--- a/Documentation/DMA-API.txt
+++ b/Documentation/DMA-API.txt
@@ -18,10 +18,10 @@ Part I - dma_ API
18To get the dma_ API, you must #include <linux/dma-mapping.h>. This 18To get the dma_ API, you must #include <linux/dma-mapping.h>. This
19provides dma_addr_t and the interfaces described below. 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 21A dma_addr_t can hold any valid DMA address for the platform. It can be
22can be given to a device to use as a DMA source or target. A CPU cannot 22given to a device to use as a DMA source or target. A CPU cannot reference
23reference a dma_addr_t directly because there may be translation between 23a dma_addr_t directly because there may be translation between its physical
24its physical address space and the bus address space. 24address space and the DMA address space.
25 25
26Part Ia - Using large DMA-coherent buffers 26Part Ia - Using large DMA-coherent buffers
27------------------------------------------ 27------------------------------------------
@@ -42,7 +42,7 @@ It returns a pointer to the allocated region (in the processor's virtual
42address space) or NULL if the allocation failed. 42address space) or NULL if the allocation failed.
43 43
44It also returns a <dma_handle> which may be cast to an unsigned integer the 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 45same width as the bus and given to the device as the DMA address base of
46the region. 46the region.
47 47
48Note: consistent memory can be expensive on some platforms, and the 48Note: consistent memory can be expensive on some platforms, and the
@@ -193,7 +193,7 @@ dma_map_single(struct device *dev, void *cpu_addr, size_t size,
193 enum dma_data_direction direction) 193 enum dma_data_direction direction)
194 194
195Maps 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
196device and returns the bus address of the memory. 196device and returns the DMA address of the memory.
197 197
198The direction for both APIs may be converted freely by casting. 198The direction for both APIs may be converted freely by casting.
199However the dma_ API uses a strongly typed enumerator for its 199However the dma_ API uses a strongly typed enumerator for its
@@ -212,20 +212,20 @@ contiguous piece of memory. For this reason, memory to be mapped by
212this API should be obtained from sources which guarantee it to be 212this API should be obtained from sources which guarantee it to be
213physically contiguous (like kmalloc). 213physically contiguous (like kmalloc).
214 214
215Further, the bus address of the memory must be within the 215Further, the DMA address of the memory must be within the
216dma_mask of the device (the dma_mask is a bit mask of the 216dma_mask of the device (the dma_mask is a bit mask of the
217addressable region for the device, i.e., if the bus address of 217addressable region for the device, i.e., if the DMA address of
218the memory ANDed with the dma_mask is still equal to the bus 218the memory ANDed with the dma_mask is still equal to the DMA
219address, then the device can perform DMA to the memory). To 219address, then the device can perform DMA to the memory). To
220ensure that the memory allocated by kmalloc is within the dma_mask, 220ensure that the memory allocated by kmalloc is within the dma_mask,
221the driver may specify various platform-dependent flags to restrict 221the driver may specify various platform-dependent flags to restrict
222the bus address range of the allocation (e.g., on x86, GFP_DMA 222the DMA address range of the allocation (e.g., on x86, GFP_DMA
223guarantees to be within the first 16MB of available bus addresses, 223guarantees to be within the first 16MB of available DMA addresses,
224as required by ISA devices). 224as required by ISA devices).
225 225
226Note also that the above constraints on physical contiguity and 226Note also that the above constraints on physical contiguity and
227dma_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
228maps an I/O bus address to a physical memory address). However, to be 228maps an I/O DMA address to a physical memory address). However, to be
229portable, device driver writers may *not* assume that such an IOMMU 229portable, device driver writers may *not* assume that such an IOMMU
230exists. 230exists.
231 231
@@ -296,7 +296,7 @@ reduce current DMA mapping usage or delay and try again later).
296 dma_map_sg(struct device *dev, struct scatterlist *sg, 296 dma_map_sg(struct device *dev, struct scatterlist *sg,
297 int nents, enum dma_data_direction direction) 297 int nents, enum dma_data_direction direction)
298 298
299Returns: the number of bus address segments mapped (this may be shorter 299Returns: the number of DMA address segments mapped (this may be shorter
300than <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
301physically or virtually adjacent and an IOMMU maps them with a single 301physically or virtually adjacent and an IOMMU maps them with a single
302entry). 302entry).
@@ -340,7 +340,7 @@ must be the same as those and passed in to the scatter/gather mapping
340API. 340API.
341 341
342Note: <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
343bus address entries returned. 343DMA address entries returned.
344 344
345void 345void
346dma_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,
@@ -507,7 +507,7 @@ it's asked for coherent memory for this device.
507phys_addr is the CPU physical address to which the memory is currently 507phys_addr is the CPU physical address to which the memory is currently
508assigned (this will be ioremapped so the CPU can access the region). 508assigned (this will be ioremapped so the CPU can access the region).
509 509
510device_addr is the bus address the device needs to be programmed 510device_addr is the DMA address the device needs to be programmed
511with to actually address this memory (this will be handed out as the 511with to actually address this memory (this will be handed out as the
512dma_addr_t in dma_alloc_coherent()). 512dma_addr_t in dma_alloc_coherent()).
513 513
diff --git a/Documentation/DocBook/crypto-API.tmpl b/Documentation/DocBook/crypto-API.tmpl
index efc8d90a9a3f..0992531ffefb 100644
--- a/Documentation/DocBook/crypto-API.tmpl
+++ b/Documentation/DocBook/crypto-API.tmpl
@@ -119,7 +119,7 @@
119 119
120 <para> 120 <para>
121 Note: The terms "transformation" and cipher algorithm are used 121 Note: The terms "transformation" and cipher algorithm are used
122 interchangably. 122 interchangeably.
123 </para> 123 </para>
124 </sect1> 124 </sect1>
125 125
@@ -536,8 +536,8 @@
536 536
537 <para> 537 <para>
538 For other use cases of AEAD ciphers, the ASCII art applies as 538 For other use cases of AEAD ciphers, the ASCII art applies as
539 well, but the caller may not use the GIVCIPHER interface. In 539 well, but the caller may not use the AEAD cipher with a separate
540 this case, the caller must generate the IV. 540 IV generator. In this case, the caller must generate the IV.
541 </para> 541 </para>
542 542
543 <para> 543 <para>
@@ -584,8 +584,8 @@ kernel crypto API | IPSEC Layer
584 | 584 |
585+-----------+ | 585+-----------+ |
586| | (1) 586| | (1)
587| givcipher | <----------------------------------- esp_output 587| aead | <----------------------------------- esp_output
588| (seqiv) | ---+ 588| (seqniv) | ---+
589+-----------+ | 589+-----------+ |
590 | (2) 590 | (2)
591+-----------+ | 591+-----------+ |
@@ -620,8 +620,8 @@ kernel crypto API | IPSEC Layer
620 <orderedlist> 620 <orderedlist>
621 <listitem> 621 <listitem>
622 <para> 622 <para>
623 esp_output() invokes crypto_aead_givencrypt() to trigger an encryption 623 esp_output() invokes crypto_aead_encrypt() to trigger an encryption
624 operation of the GIVCIPHER implementation. 624 operation of the AEAD cipher with IV generator.
625 </para> 625 </para>
626 626
627 <para> 627 <para>
@@ -1563,7 +1563,7 @@ struct sockaddr_alg sa = {
1563 1563
1564 <sect1><title>Zero-Copy Interface</title> 1564 <sect1><title>Zero-Copy Interface</title>
1565 <para> 1565 <para>
1566 In addition to the send/write/read/recv system call familty, the AF_ALG 1566 In addition to the send/write/read/recv system call family, the AF_ALG
1567 interface can be accessed with the zero-copy interface of splice/vmsplice. 1567 interface can be accessed with the zero-copy interface of splice/vmsplice.
1568 As the name indicates, the kernel tries to avoid a copy operation into 1568 As the name indicates, the kernel tries to avoid a copy operation into
1569 kernel space. 1569 kernel space.
@@ -1669,9 +1669,19 @@ read(opfd, out, outlen);
1669 </chapter> 1669 </chapter>
1670 1670
1671 <chapter id="API"><title>Programming Interface</title> 1671 <chapter id="API"><title>Programming Interface</title>
1672 <para>
1673 Please note that the kernel crypto API contains the AEAD givcrypt
1674 API (crypto_aead_giv* and aead_givcrypt_* function calls in
1675 include/crypto/aead.h). This API is obsolete and will be removed
1676 in the future. To obtain the functionality of an AEAD cipher with
1677 internal IV generation, use the IV generator as a regular cipher.
1678 For example, rfc4106(gcm(aes)) is the AEAD cipher with external
1679 IV generation and seqniv(rfc4106(gcm(aes))) implies that the kernel
1680 crypto API generates the IV. Different IV generators are available.
1681 </para>
1672 <sect1><title>Block Cipher Context Data Structures</title> 1682 <sect1><title>Block Cipher Context Data Structures</title>
1673!Pinclude/linux/crypto.h Block Cipher Context Data Structures 1683!Pinclude/linux/crypto.h Block Cipher Context Data Structures
1674!Finclude/linux/crypto.h aead_request 1684!Finclude/crypto/aead.h aead_request
1675 </sect1> 1685 </sect1>
1676 <sect1><title>Block Cipher Algorithm Definitions</title> 1686 <sect1><title>Block Cipher Algorithm Definitions</title>
1677!Pinclude/linux/crypto.h Block Cipher Algorithm Definitions 1687!Pinclude/linux/crypto.h Block Cipher Algorithm Definitions
@@ -1680,7 +1690,7 @@ read(opfd, out, outlen);
1680!Finclude/linux/crypto.h aead_alg 1690!Finclude/linux/crypto.h aead_alg
1681!Finclude/linux/crypto.h blkcipher_alg 1691!Finclude/linux/crypto.h blkcipher_alg
1682!Finclude/linux/crypto.h cipher_alg 1692!Finclude/linux/crypto.h cipher_alg
1683!Finclude/linux/crypto.h rng_alg 1693!Finclude/crypto/rng.h rng_alg
1684 </sect1> 1694 </sect1>
1685 <sect1><title>Asynchronous Block Cipher API</title> 1695 <sect1><title>Asynchronous Block Cipher API</title>
1686!Pinclude/linux/crypto.h Asynchronous Block Cipher API 1696!Pinclude/linux/crypto.h Asynchronous Block Cipher API
@@ -1704,26 +1714,27 @@ read(opfd, out, outlen);
1704!Finclude/linux/crypto.h ablkcipher_request_set_crypt 1714!Finclude/linux/crypto.h ablkcipher_request_set_crypt
1705 </sect1> 1715 </sect1>
1706 <sect1><title>Authenticated Encryption With Associated Data (AEAD) Cipher API</title> 1716 <sect1><title>Authenticated Encryption With Associated Data (AEAD) Cipher API</title>
1707!Pinclude/linux/crypto.h Authenticated Encryption With Associated Data (AEAD) Cipher API 1717!Pinclude/crypto/aead.h Authenticated Encryption With Associated Data (AEAD) Cipher API
1708!Finclude/linux/crypto.h crypto_alloc_aead 1718!Finclude/crypto/aead.h crypto_alloc_aead
1709!Finclude/linux/crypto.h crypto_free_aead 1719!Finclude/crypto/aead.h crypto_free_aead
1710!Finclude/linux/crypto.h crypto_aead_ivsize 1720!Finclude/crypto/aead.h crypto_aead_ivsize
1711!Finclude/linux/crypto.h crypto_aead_authsize 1721!Finclude/crypto/aead.h crypto_aead_authsize
1712!Finclude/linux/crypto.h crypto_aead_blocksize 1722!Finclude/crypto/aead.h crypto_aead_blocksize
1713!Finclude/linux/crypto.h crypto_aead_setkey 1723!Finclude/crypto/aead.h crypto_aead_setkey
1714!Finclude/linux/crypto.h crypto_aead_setauthsize 1724!Finclude/crypto/aead.h crypto_aead_setauthsize
1715!Finclude/linux/crypto.h crypto_aead_encrypt 1725!Finclude/crypto/aead.h crypto_aead_encrypt
1716!Finclude/linux/crypto.h crypto_aead_decrypt 1726!Finclude/crypto/aead.h crypto_aead_decrypt
1717 </sect1> 1727 </sect1>
1718 <sect1><title>Asynchronous AEAD Request Handle</title> 1728 <sect1><title>Asynchronous AEAD Request Handle</title>
1719!Pinclude/linux/crypto.h Asynchronous AEAD Request Handle 1729!Pinclude/crypto/aead.h Asynchronous AEAD Request Handle
1720!Finclude/linux/crypto.h crypto_aead_reqsize 1730!Finclude/crypto/aead.h crypto_aead_reqsize
1721!Finclude/linux/crypto.h aead_request_set_tfm 1731!Finclude/crypto/aead.h aead_request_set_tfm
1722!Finclude/linux/crypto.h aead_request_alloc 1732!Finclude/crypto/aead.h aead_request_alloc
1723!Finclude/linux/crypto.h aead_request_free 1733!Finclude/crypto/aead.h aead_request_free
1724!Finclude/linux/crypto.h aead_request_set_callback 1734!Finclude/crypto/aead.h aead_request_set_callback
1725!Finclude/linux/crypto.h aead_request_set_crypt 1735!Finclude/crypto/aead.h aead_request_set_crypt
1726!Finclude/linux/crypto.h aead_request_set_assoc 1736!Finclude/crypto/aead.h aead_request_set_assoc
1737!Finclude/crypto/aead.h aead_request_set_ad
1727 </sect1> 1738 </sect1>
1728 <sect1><title>Synchronous Block Cipher API</title> 1739 <sect1><title>Synchronous Block Cipher API</title>
1729!Pinclude/linux/crypto.h Synchronous Block Cipher API 1740!Pinclude/linux/crypto.h Synchronous Block Cipher API
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl
index 9765a4c0829d..c0312cbd023d 100644
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/drm.tmpl
@@ -2439,6 +2439,18 @@ void intel_crt_init(struct drm_device *dev)
2439 <title>Tile group</title> 2439 <title>Tile group</title>
2440!Pdrivers/gpu/drm/drm_crtc.c Tile group 2440!Pdrivers/gpu/drm/drm_crtc.c Tile group
2441 </sect2> 2441 </sect2>
2442 <sect2>
2443 <title>Bridges</title>
2444 <sect3>
2445 <title>Overview</title>
2446!Pdrivers/gpu/drm/drm_bridge.c overview
2447 </sect3>
2448 <sect3>
2449 <title>Default bridge callback sequence</title>
2450!Pdrivers/gpu/drm/drm_bridge.c bridge callbacks
2451 </sect3>
2452!Edrivers/gpu/drm/drm_bridge.c
2453 </sect2>
2442 </sect1> 2454 </sect1>
2443 2455
2444 <!-- Internals: kms properties --> 2456 <!-- Internals: kms properties -->
@@ -2573,7 +2585,22 @@ void intel_crt_init(struct drm_device *dev)
2573 <td valign="top" >Description/Restrictions</td> 2585 <td valign="top" >Description/Restrictions</td>
2574 </tr> 2586 </tr>
2575 <tr> 2587 <tr>
2576 <td rowspan="36" valign="top" >DRM</td> 2588 <td rowspan="37" valign="top" >DRM</td>
2589 <td valign="top" >Generic</td>
2590 <td valign="top" >“rotation”</td>
2591 <td valign="top" >BITMASK</td>
2592 <td valign="top" >{ 0, "rotate-0" },
2593 { 1, "rotate-90" },
2594 { 2, "rotate-180" },
2595 { 3, "rotate-270" },
2596 { 4, "reflect-x" },
2597 { 5, "reflect-y" }</td>
2598 <td valign="top" >CRTC, Plane</td>
2599 <td valign="top" >rotate-(degrees) rotates the image by the specified amount in degrees
2600 in counter clockwise direction. reflect-x and reflect-y reflects the
2601 image along the specified axis prior to rotation</td>
2602 </tr>
2603 <tr>
2577 <td rowspan="5" valign="top" >Connector</td> 2604 <td rowspan="5" valign="top" >Connector</td>
2578 <td valign="top" >“EDID”</td> 2605 <td valign="top" >“EDID”</td>
2579 <td valign="top" >BLOB | IMMUTABLE</td> 2606 <td valign="top" >BLOB | IMMUTABLE</td>
@@ -2834,7 +2861,7 @@ void intel_crt_init(struct drm_device *dev)
2834 <td valign="top" >TBD</td> 2861 <td valign="top" >TBD</td>
2835 </tr> 2862 </tr>
2836 <tr> 2863 <tr>
2837 <td rowspan="21" valign="top" >i915</td> 2864 <td rowspan="20" valign="top" >i915</td>
2838 <td rowspan="2" valign="top" >Generic</td> 2865 <td rowspan="2" valign="top" >Generic</td>
2839 <td valign="top" >"Broadcast RGB"</td> 2866 <td valign="top" >"Broadcast RGB"</td>
2840 <td valign="top" >ENUM</td> 2867 <td valign="top" >ENUM</td>
@@ -2850,14 +2877,6 @@ void intel_crt_init(struct drm_device *dev)
2850 <td valign="top" >TBD</td> 2877 <td valign="top" >TBD</td>
2851 </tr> 2878 </tr>
2852 <tr> 2879 <tr>
2853 <td rowspan="1" valign="top" >Plane</td>
2854 <td valign="top" >“rotation”</td>
2855 <td valign="top" >BITMASK</td>
2856 <td valign="top" >{ 0, "rotate-0" }, { 2, "rotate-180" }</td>
2857 <td valign="top" >Plane</td>
2858 <td valign="top" >TBD</td>
2859 </tr>
2860 <tr>
2861 <td rowspan="17" valign="top" >SDVO-TV</td> 2880 <td rowspan="17" valign="top" >SDVO-TV</td>
2862 <td valign="top" >“mode”</td> 2881 <td valign="top" >“mode”</td>
2863 <td valign="top" >ENUM</td> 2882 <td valign="top" >ENUM</td>
@@ -3365,19 +3384,7 @@ void intel_crt_init(struct drm_device *dev)
3365 </tr> 3384 </tr>
3366 <tr> 3385 <tr>
3367 <td rowspan="2" valign="top" >omap</td> 3386 <td rowspan="2" valign="top" >omap</td>
3368 <td rowspan="2" valign="top" >Generic</td> 3387 <td valign="top" >Generic</td>
3369 <td valign="top" >“rotation”</td>
3370 <td valign="top" >BITMASK</td>
3371 <td valign="top" >{ 0, "rotate-0" },
3372 { 1, "rotate-90" },
3373 { 2, "rotate-180" },
3374 { 3, "rotate-270" },
3375 { 4, "reflect-x" },
3376 { 5, "reflect-y" }</td>
3377 <td valign="top" >CRTC, Plane</td>
3378 <td valign="top" >TBD</td>
3379 </tr>
3380 <tr>
3381 <td valign="top" >“zorder”</td> 3388 <td valign="top" >“zorder”</td>
3382 <td valign="top" >RANGE</td> 3389 <td valign="top" >RANGE</td>
3383 <td valign="top" >Min=0, Max=3</td> 3390 <td valign="top" >Min=0, Max=3</td>
@@ -4067,7 +4074,7 @@ int num_ioctls;</synopsis>
4067 <title>DPIO</title> 4074 <title>DPIO</title>
4068!Pdrivers/gpu/drm/i915/i915_reg.h DPIO 4075!Pdrivers/gpu/drm/i915/i915_reg.h DPIO
4069 <table id="dpiox2"> 4076 <table id="dpiox2">
4070 <title>Dual channel PHY (VLV/CHV)</title> 4077 <title>Dual channel PHY (VLV/CHV/BXT)</title>
4071 <tgroup cols="8"> 4078 <tgroup cols="8">
4072 <colspec colname="c0" /> 4079 <colspec colname="c0" />
4073 <colspec colname="c1" /> 4080 <colspec colname="c1" />
@@ -4118,7 +4125,7 @@ int num_ioctls;</synopsis>
4118 </tgroup> 4125 </tgroup>
4119 </table> 4126 </table>
4120 <table id="dpiox1"> 4127 <table id="dpiox1">
4121 <title>Single channel PHY (CHV)</title> 4128 <title>Single channel PHY (CHV/BXT)</title>
4122 <tgroup cols="4"> 4129 <tgroup cols="4">
4123 <colspec colname="c0" /> 4130 <colspec colname="c0" />
4124 <colspec colname="c1" /> 4131 <colspec colname="c1" />
@@ -4153,6 +4160,12 @@ int num_ioctls;</synopsis>
4153 </tgroup> 4160 </tgroup>
4154 </table> 4161 </table>
4155 </sect2> 4162 </sect2>
4163
4164 <sect2>
4165 <title>CSR firmware support for DMC</title>
4166!Pdrivers/gpu/drm/i915/intel_csr.c csr support for dmc
4167!Idrivers/gpu/drm/i915/intel_csr.c
4168 </sect2>
4156 </sect1> 4169 </sect1>
4157 4170
4158 <sect1> 4171 <sect1>
@@ -4204,7 +4217,6 @@ int num_ioctls;</synopsis>
4204!Idrivers/gpu/drm/i915/i915_gem_shrinker.c 4217!Idrivers/gpu/drm/i915/i915_gem_shrinker.c
4205 </sect2> 4218 </sect2>
4206 </sect1> 4219 </sect1>
4207
4208 <sect1> 4220 <sect1>
4209 <title> Tracing </title> 4221 <title> Tracing </title>
4210 <para> 4222 <para>
diff --git a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl
index e84f09467cd7..589b40cc5eb5 100644
--- a/Documentation/DocBook/kernel-hacking.tmpl
+++ b/Documentation/DocBook/kernel-hacking.tmpl
@@ -954,6 +954,8 @@ printk(KERN_INFO "my ip: %pI4\n", &amp;ipaddress);
954 <function>MODULE_LICENSE()</function> that specifies a GPL 954 <function>MODULE_LICENSE()</function> that specifies a GPL
955 compatible license. It implies that the function is considered 955 compatible license. It implies that the function is considered
956 an internal implementation issue, and not really an interface. 956 an internal implementation issue, and not really an interface.
957 Some maintainers and developers may however
958 require EXPORT_SYMBOL_GPL() when adding any new APIs or functionality.
957 </para> 959 </para>
958 </sect1> 960 </sect1>
959 </chapter> 961 </chapter>
diff --git a/Documentation/DocBook/media/.gitignore b/Documentation/DocBook/media/.gitignore
new file mode 100644
index 000000000000..e461c585fde8
--- /dev/null
+++ b/Documentation/DocBook/media/.gitignore
@@ -0,0 +1 @@
!*.svg
diff --git a/Documentation/DocBook/media/Makefile b/Documentation/DocBook/media/Makefile
index 8bf7c6191296..23996f88cd58 100644
--- a/Documentation/DocBook/media/Makefile
+++ b/Documentation/DocBook/media/Makefile
@@ -65,29 +65,31 @@ IOCTLS = \
65 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/video.h) \ 65 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/video.h) \
66 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/media.h) \ 66 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/media.h) \
67 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/v4l2-subdev.h) \ 67 $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/v4l2-subdev.h) \
68 VIDIOC_SUBDEV_G_FRAME_INTERVAL \ 68
69 VIDIOC_SUBDEV_S_FRAME_INTERVAL \ 69DEFINES = \
70 VIDIOC_SUBDEV_ENUM_MBUS_CODE \ 70 $(shell perl -ne 'print "$$1 " if /\#define\s+(DTV_[^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/frontend.h) \
71 VIDIOC_SUBDEV_ENUM_FRAME_SIZE \
72 VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL \
73 VIDIOC_SUBDEV_G_SELECTION \
74 VIDIOC_SUBDEV_S_SELECTION \
75 71
76TYPES = \ 72TYPES = \
77 $(shell perl -ne 'print "$$1 " if /^typedef\s+[^\s]+\s+([^\s]+)\;/' $(srctree)/include/uapi/linux/videodev2.h) \ 73 $(shell perl -ne 'print "$$1 " if /^typedef\s+.*\s+(\S+)\;/' $(srctree)/include/uapi/linux/videodev2.h) \
78 $(shell perl -ne 'print "$$1 " if /^}\s+([a-z0-9_]+_t)/' $(srctree)/include/uapi/linux/dvb/frontend.h) 74 $(shell perl -ne 'print "$$1 " if /^typedef\s+.*\s+(\S+)\;/' $(srctree)/include/uapi/linux/dvb/frontend.h)
79 75
80ENUMS = \ 76ENUMS = \
81 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/videodev2.h) \ 77 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' \
82 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/audio.h) \ 78 $(srctree)/include/uapi/linux/videodev2.h \
83 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/ca.h) \ 79 $(srctree)/include/uapi/linux/dvb/audio.h \
84 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/dmx.h) \ 80 $(srctree)/include/uapi/linux/dvb/ca.h \
85 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/frontend.h) \ 81 $(srctree)/include/uapi/linux/dvb/dmx.h \
86 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/net.h) \ 82 $(srctree)/include/uapi/linux/dvb/frontend.h \
87 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/video.h) \ 83 $(srctree)/include/uapi/linux/dvb/net.h \
88 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/media.h) \ 84 $(srctree)/include/uapi/linux/dvb/video.h \
89 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-mediabus.h) \ 85 $(srctree)/include/uapi/linux/media.h \
90 $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-subdev.h) 86 $(srctree)/include/uapi/linux/v4l2-mediabus.h \
87 $(srctree)/include/uapi/linux/v4l2-subdev.h)
88
89ENUM_DEFS = \
90 $(shell perl -e 'open IN,"cat @ARGV| cpp -fpreprocessed |"; while (<IN>) { if ($$enum) {print "$$1\n" if (/\s*([A-Z]\S+)\b/); } $$enum = 0 if ($$enum && /^\}/); $$enum = 1 if(/^\s*enum\s/); }; close IN;' \
91 $(srctree)/include/uapi/linux/dvb/dmx.h \
92 $(srctree)/include/uapi/linux/dvb/frontend.h)
91 93
92STRUCTS = \ 94STRUCTS = \
93 $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/videodev2.h) \ 95 $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/videodev2.h) \
@@ -95,7 +97,7 @@ STRUCTS = \
95 $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/ca.h) \ 97 $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/ca.h) \
96 $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/dmx.h) \ 98 $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/dmx.h) \
97 $(shell perl -ne 'print "$$1 " if (!/dtv\_cmds\_h/ && /^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/frontend.h) \ 99 $(shell perl -ne 'print "$$1 " if (!/dtv\_cmds\_h/ && /^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/frontend.h) \
98 $(shell perl -ne 'print "$$1 " if (/^struct\s+([A-Z][^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/net.h) \ 100 $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/ && !/_old/)' $(srctree)/include/uapi/linux/dvb/net.h) \
99 $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/video.h) \ 101 $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/video.h) \
100 $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/media.h) \ 102 $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/media.h) \
101 $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-subdev.h) \ 103 $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-subdev.h) \
@@ -179,7 +181,6 @@ DOCUMENTED = \
179 -e "s/v4l2\-mpeg\-vbi\-ITV0/v4l2-mpeg-vbi-itv0-1/g" 181 -e "s/v4l2\-mpeg\-vbi\-ITV0/v4l2-mpeg-vbi-itv0-1/g"
180 182
181DVB_DOCUMENTED = \ 183DVB_DOCUMENTED = \
182 -e "s/\(linkend\=\"\)FE_SET_PROPERTY/\1FE_GET_PROPERTY/g" \
183 -e "s,\(struct\s\+\)\([a-z0-9_]\+\)\(\s\+{\),\1\<link linkend=\"\2\">\2\<\/link\>\3,g" \ 184 -e "s,\(struct\s\+\)\([a-z0-9_]\+\)\(\s\+{\),\1\<link linkend=\"\2\">\2\<\/link\>\3,g" \
184 -e "s,\(}\s\+\)\([a-z0-9_]\+_t\+\),\1\<link linkend=\"\2\">\2\<\/link\>,g" \ 185 -e "s,\(}\s\+\)\([a-z0-9_]\+_t\+\),\1\<link linkend=\"\2\">\2\<\/link\>,g" \
185 -e "s,\(define\s\+\)\(DTV_[A-Z0-9_]\+\)\(\s\+[0-9]\+\),\1\<link linkend=\"\2\">\2\<\/link\>\3,g" \ 186 -e "s,\(define\s\+\)\(DTV_[A-Z0-9_]\+\)\(\s\+[0-9]\+\),\1\<link linkend=\"\2\">\2\<\/link\>\3,g" \
@@ -188,14 +189,17 @@ DVB_DOCUMENTED = \
188 -e "s,\(audio-mixer\|audio-karaoke\|audio-status\|ca-slot-info\|ca-descr-info\|ca-caps\|ca-msg\|ca-descr\|ca-pid\|dmx-filter\|dmx-caps\|video-system\|video-highlight\|video-spu\|video-spu-palette\|video-navi-pack\)-t,\1,g" \ 189 -e "s,\(audio-mixer\|audio-karaoke\|audio-status\|ca-slot-info\|ca-descr-info\|ca-caps\|ca-msg\|ca-descr\|ca-pid\|dmx-filter\|dmx-caps\|video-system\|video-highlight\|video-spu\|video-spu-palette\|video-navi-pack\)-t,\1,g" \
189 -e "s,DTV-ISDBT-LAYER[A-C],DTV-ISDBT-LAYER,g" \ 190 -e "s,DTV-ISDBT-LAYER[A-C],DTV-ISDBT-LAYER,g" \
190 -e "s,\(define\s\+\)\([A-Z0-9_]\+\)\(\s\+_IO\),\1\<link linkend=\"\2\">\2\<\/link\>\3,g" \ 191 -e "s,\(define\s\+\)\([A-Z0-9_]\+\)\(\s\+_IO\),\1\<link linkend=\"\2\">\2\<\/link\>\3,g" \
192 -e "s,\(define\s\+\)\(DTV_[A-Z0-9_]\+\)\(\s\+\),\1\<link linkend=\"\2\">\2\<\/link\>\3,g" \
191 -e "s,<link\s\+linkend=\".*\">\(__.*_OLD\)<\/link>,\1,g" \ 193 -e "s,<link\s\+linkend=\".*\">\(__.*_OLD\)<\/link>,\1,g" \
194 -e "s/\(linkend\=\"\)FE_SET_PROPERTY/\1FE_GET_PROPERTY/g" \
195 -e "s,<link\s\+linkend=\".*\">\(DTV_ISDBS_TS_ID_LEGACY\|DTV_MAX_COMMAND\|DTV_IOCTL_MAX_MSGS\)<\/link>,\1,g" \
192 196
193# 197#
194# Media targets and dependencies 198# Media targets and dependencies
195# 199#
196 200
197install_media_images = \ 201install_media_images = \
198 $(Q)-cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api 202 $(Q)-cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/*.svg $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api
199 203
200$(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64 204$(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64
201 $(Q)base64 -d $< >$@ 205 $(Q)base64 -d $< >$@
@@ -243,9 +247,14 @@ $(MEDIA_OBJ_DIR)/dmx.h.xml: $(srctree)/include/uapi/linux/dvb/dmx.h $(MEDIA_OBJ_
243 @( \ 247 @( \
244 echo "<programlisting>") > $@ 248 echo "<programlisting>") > $@
245 @( \ 249 @( \
250 for ident in $(ENUM_DEFS) ; do \
251 entity=`echo $$ident | tr _ -` ; \
252 r="$$r s/([^\w\-])$$ident([^\w\-])/\1\&$$entity\;\2/g;";\
253 done; \
246 expand --tabs=8 < $< | \ 254 expand --tabs=8 < $< | \
247 sed $(ESCAPE) $(DVB_DOCUMENTED) | \ 255 sed $(ESCAPE) $(DVB_DOCUMENTED) | \
248 sed 's/i\.e\./&ie;/') >> $@ 256 sed 's/i\.e\./&ie;/' | \
257 perl -ne "$$r print $$_;") >> $@
249 @( \ 258 @( \
250 echo "</programlisting>") >> $@ 259 echo "</programlisting>") >> $@
251 260
@@ -254,9 +263,14 @@ $(MEDIA_OBJ_DIR)/frontend.h.xml: $(srctree)/include/uapi/linux/dvb/frontend.h $(
254 @( \ 263 @( \
255 echo "<programlisting>") > $@ 264 echo "<programlisting>") > $@
256 @( \ 265 @( \
266 for ident in $(ENUM_DEFS) ; do \
267 entity=`echo $$ident | tr _ -` ; \
268 r="$$r s/([^\w\-])$$ident([^\w\-])/\1\&$$entity\;\2/g;";\
269 done; \
257 expand --tabs=8 < $< | \ 270 expand --tabs=8 < $< | \
258 sed $(ESCAPE) $(DVB_DOCUMENTED) | \ 271 sed $(ESCAPE) $(DVB_DOCUMENTED) | \
259 sed 's/i\.e\./&ie;/') >> $@ 272 sed 's/i\.e\./&ie;/' | \
273 perl -ne "$$r print $$_;") >> $@
260 @( \ 274 @( \
261 echo "</programlisting>") >> $@ 275 echo "</programlisting>") >> $@
262 276
@@ -298,11 +312,22 @@ $(MEDIA_OBJ_DIR)/media-entities.tmpl: $(MEDIA_OBJ_DIR)/v4l2.xml
298 @( \ 312 @( \
299 echo -e "\n<!-- Ioctls -->") >>$@ 313 echo -e "\n<!-- Ioctls -->") >>$@
300 @( \ 314 @( \
301 for ident in $(IOCTLS) ; do \ 315 for ident in `echo $(IOCTLS) | sed -e "s,VIDIOC_RESERVED,,"`; do\
302 entity=`echo $$ident | tr _ -` ; \ 316 entity=`echo $$ident | tr _ -` ; \
303 id=`grep "<refname>$$ident" $(MEDIA_OBJ_DIR)/vidioc-*.xml $(MEDIA_OBJ_DIR)/media-ioc-*.xml | sed -r s,"^.*/(.*).xml.*","\1",` ; \ 317 id=`grep -e "<refname>$$ident" -e "<section id=\"$$ident\"" $$(find $(MEDIA_SRC_DIR) -name *.xml -type f)| sed -r s,"^.*/(.*).xml.*","\1",` ; \
304 echo "<!ENTITY $$entity \"<link" \ 318 if [ "$$id" != "" ]; then echo "<!ENTITY $$entity \"<link" \
305 "linkend='$$id'><constant>$$ident</constant></link>\">" \ 319 "linkend='$$id'><constant>$$ident</constant></link>\">" \
320 >>$@ ; else \
321 echo "Warning: undocumented ioctl: $$ident. Please document it at the media DocBook!" >&2; \
322 fi; \
323 done)
324 @( \
325 echo -e "\n<!-- Defines -->") >>$@
326 @( \
327 for ident in $(DEFINES) ; do \
328 entity=`echo $$ident | tr _ -` ; \
329 echo "<!ENTITY $$entity \"<link" \
330 "linkend='$$entity'><constant>$$ident</constant></link>\">" \
306 >>$@ ; \ 331 >>$@ ; \
307 done) 332 done)
308 @( \ 333 @( \
@@ -322,6 +347,15 @@ $(MEDIA_OBJ_DIR)/media-entities.tmpl: $(MEDIA_OBJ_DIR)/v4l2.xml
322 "linkend='$$entity'>$$ident</link>\">" >>$@ ; \ 347 "linkend='$$entity'>$$ident</link>\">" >>$@ ; \
323 done) 348 done)
324 @( \ 349 @( \
350 echo -e "\n<!-- Enum definitions -->") >>$@
351 @( \
352 for ident in $(ENUM_DEFS) ; do \
353 entity=`echo $$ident | tr _ -` ; \
354 echo "<!ENTITY $$entity \"<link" \
355 "linkend='$$entity'><constant>$$ident</constant></link>\">" \
356 >>$@ ; \
357 done)
358 @( \
325 echo -e "\n<!-- Structures -->") >>$@ 359 echo -e "\n<!-- Structures -->") >>$@
326 @( \ 360 @( \
327 for ident in $(STRUCTS) ; do \ 361 for ident in $(STRUCTS) ; do \
diff --git a/Documentation/DocBook/media/dvb/audio.xml b/Documentation/DocBook/media/dvb/audio.xml
index a7ea56c71a27..ea56743ddbe7 100644
--- a/Documentation/DocBook/media/dvb/audio.xml
+++ b/Documentation/DocBook/media/dvb/audio.xml
@@ -1,7 +1,7 @@
1<title>DVB Audio Device</title> 1<title>DVB Audio Device</title>
2<para>The DVB audio device controls the MPEG2 audio decoder of the DVB hardware. It 2<para>The DVB audio device controls the MPEG2 audio decoder of the DVB hardware. It
3can be accessed through <emphasis role="tt">/dev/dvb/adapter0/audio0</emphasis>. Data types and and 3can be accessed through <constant>/dev/dvb/adapter?/audio?</constant>. Data types and and
4ioctl definitions can be accessed by including <emphasis role="tt">linux/dvb/audio.h</emphasis> in your 4ioctl definitions can be accessed by including <constant>linux/dvb/audio.h</constant> in your
5application. 5application.
6</para> 6</para>
7<para>Please note that some DVB cards don&#8217;t have their own MPEG decoder, which results in 7<para>Please note that some DVB cards don&#8217;t have their own MPEG decoder, which results in
@@ -32,7 +32,7 @@ typedef enum {
32</programlisting> 32</programlisting>
33<para>AUDIO_SOURCE_DEMUX selects the demultiplexer (fed either by the frontend or the 33<para>AUDIO_SOURCE_DEMUX selects the demultiplexer (fed either by the frontend or the
34DVR device) as the source of the video stream. If AUDIO_SOURCE_MEMORY 34DVR device) as the source of the video stream. If AUDIO_SOURCE_MEMORY
35is selected the stream comes from the application through the <emphasis role="tt">write()</emphasis> system 35is selected the stream comes from the application through the <constant>write()</constant> system
36call. 36call.
37</para> 37</para>
38 38
diff --git a/Documentation/DocBook/media/dvb/ca.xml b/Documentation/DocBook/media/dvb/ca.xml
index 85eaf4fe2931..d0b07e763908 100644
--- a/Documentation/DocBook/media/dvb/ca.xml
+++ b/Documentation/DocBook/media/dvb/ca.xml
@@ -1,7 +1,7 @@
1<title>DVB CA Device</title> 1<title>DVB CA Device</title>
2<para>The DVB CA device controls the conditional access hardware. It can be accessed through 2<para>The DVB CA device controls the conditional access hardware. It can be accessed through
3<emphasis role="tt">/dev/dvb/adapter0/ca0</emphasis>. Data types and and ioctl definitions can be accessed by 3<constant>/dev/dvb/adapter?/ca?</constant>. Data types and and ioctl definitions can be accessed by
4including <emphasis role="tt">linux/dvb/ca.h</emphasis> in your application. 4including <constant>linux/dvb/ca.h</constant> in your application.
5</para> 5</para>
6 6
7<section id="ca_data_types"> 7<section id="ca_data_types">
diff --git a/Documentation/DocBook/media/dvb/demux.xml b/Documentation/DocBook/media/dvb/demux.xml
index c8683d66f059..34f2fb1cd601 100644
--- a/Documentation/DocBook/media/dvb/demux.xml
+++ b/Documentation/DocBook/media/dvb/demux.xml
@@ -1,33 +1,50 @@
1<title>DVB Demux Device</title> 1<title>DVB Demux Device</title>
2 2
3<para>The DVB demux device controls the filters of the DVB hardware/software. It can be 3<para>The DVB demux device controls the filters of the DVB hardware/software. It can be
4accessed through <emphasis role="tt">/dev/adapter0/demux0</emphasis>. Data types and and ioctl definitions can be 4accessed through <constant>/dev/adapter?/demux?</constant>. Data types and and ioctl definitions can be
5accessed by including <emphasis role="tt">linux/dvb/dmx.h</emphasis> in your application. 5accessed by including <constant>linux/dvb/dmx.h</constant> in your application.
6</para> 6</para>
7<section id="dmx_types"> 7<section id="dmx_types">
8<title>Demux Data Types</title> 8<title>Demux Data Types</title>
9 9
10<section id="dmx-output-t"> 10<section id="dmx-output-t">
11<title>dmx_output_t</title> 11<title>Output for the demux</title>
12<programlisting> 12
13typedef enum 13<table pgwide="1" frame="none" id="dmx-output">
14{ 14 <title>enum dmx_output</title>
15 DMX_OUT_DECODER, /&#x22C6; Streaming directly to decoder. &#x22C6;/ 15 <tgroup cols="2">
16 DMX_OUT_TAP, /&#x22C6; Output going to a memory buffer &#x22C6;/ 16 &cs-def;
17 /&#x22C6; (to be retrieved via the read command).&#x22C6;/ 17 <thead>
18 DMX_OUT_TS_TAP, /&#x22C6; Output multiplexed into a new TS &#x22C6;/ 18 <row>
19 /&#x22C6; (to be retrieved by reading from the &#x22C6;/ 19 <entry>ID</entry>
20 /&#x22C6; logical DVR device). &#x22C6;/ 20 <entry>Description</entry>
21 DMX_OUT_TSDEMUX_TAP /&#x22C6; Like TS_TAP but retrieved from the DMX device &#x22C6;/ 21 </row>
22} dmx_output_t; 22 </thead>
23</programlisting> 23 <tbody valign="top">
24<para><emphasis role="tt">DMX_OUT_TAP</emphasis> delivers the stream output to the demux device on which the ioctl is 24 <row>
25called. 25 <entry align="char" id="DMX-OUT-DECODER">DMX_OUT_DECODER</entry>
26</para> 26 <entry>Streaming directly to decoder.</entry>
27<para><emphasis role="tt">DMX_OUT_TS_TAP</emphasis> routes output to the logical DVR device <emphasis role="tt">/dev/dvb/adapter0/dvr0</emphasis>, 27 </row><row>
28which delivers a TS multiplexed from all filters for which <emphasis role="tt">DMX_OUT_TS_TAP</emphasis> was 28 <entry align="char" id="DMX-OUT-TAP">DMX_OUT_TAP</entry>
29specified. 29 <entry>Output going to a memory buffer (to be retrieved via the
30</para> 30 read command). Delivers the stream output to the demux
31 device on which the ioctl is called.</entry>
32 </row><row>
33 <entry align="char" id="DMX-OUT-TS-TAP">DMX_OUT_TS_TAP</entry>
34 <entry>Output multiplexed into a new TS (to be retrieved by
35 reading from the logical DVR device). Routes output to the
36 logical DVR device <constant>/dev/dvb/adapter?/dvr?</constant>,
37 which delivers a TS multiplexed from all filters for which
38 <constant>DMX_OUT_TS_TAP</constant> was specified.</entry>
39 </row><row>
40 <entry align="char" id="DMX-OUT-TSDEMUX-TAP">DMX_OUT_TSDEMUX_TAP</entry>
41 <entry>Like &DMX-OUT-TS-TAP; but retrieved from the DMX
42 device.</entry>
43 </row>
44 </tbody>
45 </tgroup>
46</table>
47
31</section> 48</section>
32 49
33<section id="dmx-input-t"> 50<section id="dmx-input-t">
diff --git a/Documentation/DocBook/media/dvb/dvbapi.xml b/Documentation/DocBook/media/dvb/dvbapi.xml
index 4c15396c67e5..858fd7d17104 100644
--- a/Documentation/DocBook/media/dvb/dvbapi.xml
+++ b/Documentation/DocBook/media/dvb/dvbapi.xml
@@ -28,13 +28,23 @@
28 <holder>Convergence GmbH</holder> 28 <holder>Convergence GmbH</holder>
29</copyright> 29</copyright>
30<copyright> 30<copyright>
31 <year>2009-2014</year> 31 <year>2009-2015</year>
32 <holder>Mauro Carvalho Chehab</holder> 32 <holder>Mauro Carvalho Chehab</holder>
33</copyright> 33</copyright>
34 34
35<revhistory> 35<revhistory>
36<!-- Put document revisions here, newest first. --> 36<!-- Put document revisions here, newest first. -->
37<revision> 37<revision>
38 <revnumber>2.1.0</revnumber>
39 <date>2015-05-29</date>
40 <authorinitials>mcc</authorinitials>
41 <revremark>
42 DocBook improvements and cleanups, in order to document the
43 system calls on a more standard way and provide more description
44 about the current DVB API.
45 </revremark>
46</revision>
47<revision>
38 <revnumber>2.0.4</revnumber> 48 <revnumber>2.0.4</revnumber>
39 <date>2011-05-06</date> 49 <date>2011-05-06</date>
40 <authorinitials>mcc</authorinitials> 50 <authorinitials>mcc</authorinitials>
@@ -95,18 +105,26 @@ Added ISDB-T test originally written by Patrick Boettcher
95 <chapter id="dvb_demux"> 105 <chapter id="dvb_demux">
96 &sub-demux; 106 &sub-demux;
97 </chapter> 107 </chapter>
98 <chapter id="dvb_video">
99 &sub-video;
100 </chapter>
101 <chapter id="dvb_audio">
102 &sub-audio;
103 </chapter>
104 <chapter id="dvb_ca"> 108 <chapter id="dvb_ca">
105 &sub-ca; 109 &sub-ca;
106 </chapter> 110 </chapter>
107 <chapter id="dvb_net"> 111 <chapter id="net">
108 &sub-net; 112 &sub-net;
109 </chapter> 113 </chapter>
114 <chapter id="legacy_dvb_apis">
115 <title>DVB Deprecated APIs</title>
116 <para>The APIs described here are kept only for historical reasons. There's
117 just one driver for a very legacy hardware that uses this API. No
118 modern drivers should use it. Instead, audio and video should be using
119 the V4L2 and ALSA APIs, and the pipelines should be set using the
120 Media Controller API</para>
121 <section id="dvb_video">
122 &sub-video;
123 </section>
124 <section id="dvb_audio">
125 &sub-audio;
126 </section>
127 </chapter>
110 <chapter id="dvb_kdapi"> 128 <chapter id="dvb_kdapi">
111 &sub-kdapi; 129 &sub-kdapi;
112 </chapter> 130 </chapter>
diff --git a/Documentation/DocBook/media/dvb/dvbproperty.xml b/Documentation/DocBook/media/dvb/dvbproperty.xml
index 3018564ddfd9..08227d4e9150 100644
--- a/Documentation/DocBook/media/dvb/dvbproperty.xml
+++ b/Documentation/DocBook/media/dvb/dvbproperty.xml
@@ -1,14 +1,88 @@
1<section id="FE_GET_SET_PROPERTY"> 1<section id="frontend-properties">
2<title><constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant></title> 2<title>DVB Frontend properties</title>
3<para>This section describes the DVB version 5 extension of the DVB-API, also 3<para>Tuning into a Digital TV physical channel and starting decoding it
4called "S2API", as this API were added to provide support for DVB-S2. It was 4 requires changing a set of parameters, in order to control the
5designed to be able to replace the old frontend API. Yet, the DISEQC and 5 tuner, the demodulator, the Linear Low-noise Amplifier (LNA) and to set the
6the capability ioctls weren't implemented yet via the new way.</para> 6 antenna subsystem via Satellite Equipment Control (SEC), on satellite
7<para>The typical usage for the <constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant> 7 systems. The actual parameters are specific to each particular digital
8API is to replace the ioctl's were the <link linkend="dvb-frontend-parameters"> 8 TV standards, and may change as the digital TV specs evolves.</para>
9struct <constant>dvb_frontend_parameters</constant></link> were used.</para> 9<para>In the past, the strategy used was to have a union with the parameters
10 needed to tune for DVB-S, DVB-C, DVB-T and ATSC delivery systems grouped
11 there. The problem is that, as the second generation standards appeared,
12 those structs were not big enough to contain the additional parameters.
13 Also, the union didn't have any space left to be expanded without breaking
14 userspace. So, the decision was to deprecate the legacy union/struct based
15 approach, in favor of a properties set approach.</para>
16
17<para>NOTE: on Linux DVB API version 3, setting a frontend were done via
18 <link linkend="dvb-frontend-parameters">struct <constant>dvb_frontend_parameters</constant></link>.
19 This got replaced on version 5 (also called "S2API", as this API were
20 added originally_enabled to provide support for DVB-S2), because the old
21 API has a very limited support to new standards and new hardware. This
22 section describes the new and recommended way to set the frontend, with
23 suppports all digital TV delivery systems.</para>
24
25<para>Example: with the properties based approach, in order to set the tuner
26 to a DVB-C channel at 651 kHz, modulated with 256-QAM, FEC 3/4 and symbol
27 rate of 5.217 Mbauds, those properties should be sent to
28 <link linkend="FE_GET_PROPERTY"><constant>FE_SET_PROPERTY</constant></link> ioctl:</para>
29 <itemizedlist>
30 <listitem><para>&DTV-DELIVERY-SYSTEM; = SYS_DVBC_ANNEX_A</para></listitem>
31 <listitem><para>&DTV-FREQUENCY; = 651000000</para></listitem>
32 <listitem><para>&DTV-MODULATION; = QAM_256</para></listitem>
33 <listitem><para>&DTV-INVERSION; = INVERSION_AUTO</para></listitem>
34 <listitem><para>&DTV-SYMBOL-RATE; = 5217000</para></listitem>
35 <listitem><para>&DTV-INNER-FEC; = FEC_3_4</para></listitem>
36 <listitem><para>&DTV-TUNE;</para></listitem>
37 </itemizedlist>
38
39<para>The code that would do the above is:</para>
40<programlisting>
41#include &lt;stdio.h&gt;
42#include &lt;fcntl.h&gt;
43#include &lt;sys/ioctl.h&gt;
44#include &lt;linux/dvb/frontend.h&gt;
45
46static struct dtv_property props[] = {
47 { .cmd = DTV_DELIVERY_SYSTEM, .u.data = SYS_DVBC_ANNEX_A },
48 { .cmd = DTV_FREQUENCY, .u.data = 651000000 },
49 { .cmd = DTV_MODULATION, .u.data = QAM_256 },
50 { .cmd = DTV_INVERSION, .u.data = INVERSION_AUTO },
51 { .cmd = DTV_SYMBOL_RATE, .u.data = 5217000 },
52 { .cmd = DTV_INNER_FEC, .u.data = FEC_3_4 },
53 { .cmd = DTV_TUNE }
54};
55
56static struct dtv_properties dtv_prop = {
57 .num = 6, .props = props
58};
59
60int main(void)
61{
62 int fd = open("/dev/dvb/adapter0/frontend0", O_RDWR);
63
64 if (!fd) {
65 perror ("open");
66 return -1;
67 }
68 if (ioctl(fd, FE_SET_PROPERTY, &amp;dtv_prop) == -1) {
69 perror("ioctl");
70 return -1;
71 }
72 printf("Frontend set\n");
73 return 0;
74}
75</programlisting>
76
77<para>NOTE: While it is possible to directly call the Kernel code like the
78 above example, it is strongly recommended to use
79 <ulink url="http://linuxtv.org/docs/libdvbv5/index.html">libdvbv5</ulink>,
80 as it provides abstraction to work with the supported digital TV standards
81 and provides methods for usual operations like program scanning and to
82 read/write channel descriptor files.</para>
83
10<section id="dtv-stats"> 84<section id="dtv-stats">
11<title>DTV stats type</title> 85<title>struct <structname>dtv_stats</structname></title>
12<programlisting> 86<programlisting>
13struct dtv_stats { 87struct dtv_stats {
14 __u8 scale; /* enum fecap_scale_params type */ 88 __u8 scale; /* enum fecap_scale_params type */
@@ -20,19 +94,19 @@ struct dtv_stats {
20</programlisting> 94</programlisting>
21</section> 95</section>
22<section id="dtv-fe-stats"> 96<section id="dtv-fe-stats">
23<title>DTV stats type</title> 97<title>struct <structname>dtv_fe_stats</structname></title>
24<programlisting> 98<programlisting>
25#define MAX_DTV_STATS 4 99#define MAX_DTV_STATS 4
26 100
27struct dtv_fe_stats { 101struct dtv_fe_stats {
28 __u8 len; 102 __u8 len;
29 struct dtv_stats stat[MAX_DTV_STATS]; 103 &dtv-stats; stat[MAX_DTV_STATS];
30} __packed; 104} __packed;
31</programlisting> 105</programlisting>
32</section> 106</section>
33 107
34<section id="dtv-property"> 108<section id="dtv-property">
35<title>DTV property type</title> 109<title>struct <structname>dtv_property</structname></title>
36<programlisting> 110<programlisting>
37/* Reserved fields should be set to 0 */ 111/* Reserved fields should be set to 0 */
38 112
@@ -41,7 +115,7 @@ struct dtv_property {
41 __u32 reserved[3]; 115 __u32 reserved[3];
42 union { 116 union {
43 __u32 data; 117 __u32 data;
44 struct dtv_fe_stats st; 118 &dtv-fe-stats; st;
45 struct { 119 struct {
46 __u8 data[32]; 120 __u8 data[32];
47 __u32 len; 121 __u32 len;
@@ -57,115 +131,19 @@ struct dtv_property {
57</programlisting> 131</programlisting>
58</section> 132</section>
59<section id="dtv-properties"> 133<section id="dtv-properties">
60<title>DTV properties type</title> 134<title>struct <structname>dtv_properties</structname></title>
61<programlisting> 135<programlisting>
62struct dtv_properties { 136struct dtv_properties {
63 __u32 num; 137 __u32 num;
64 struct dtv_property *props; 138 &dtv-property; *props;
65}; 139};
66</programlisting> 140</programlisting>
67</section> 141</section>
68 142
69<section id="FE_GET_PROPERTY">
70<title>FE_GET_PROPERTY</title>
71<para>DESCRIPTION
72</para>
73<informaltable><tgroup cols="1"><tbody><row><entry
74 align="char">
75<para>This ioctl call returns one or more frontend properties. This call only
76 requires read-only access to the device.</para>
77</entry>
78 </row></tbody></tgroup></informaltable>
79<para>SYNOPSIS
80</para>
81<informaltable><tgroup cols="1"><tbody><row><entry
82 align="char">
83<para>int ioctl(int fd, int request = <link linkend="FE_GET_PROPERTY">FE_GET_PROPERTY</link>,
84 dtv_properties &#x22C6;props);</para>
85</entry>
86 </row></tbody></tgroup></informaltable>
87<para>PARAMETERS
88</para>
89<informaltable><tgroup cols="2"><tbody><row><entry align="char">
90<para>int fd</para>
91</entry><entry
92 align="char">
93<para>File descriptor returned by a previous call to open().</para>
94</entry>
95 </row><row><entry
96 align="char">
97<para>int num</para>
98</entry><entry
99 align="char">
100<para>Equals <link linkend="FE_GET_PROPERTY">FE_GET_PROPERTY</link> for this command.</para>
101</entry>
102 </row><row><entry
103 align="char">
104<para>struct dtv_property *props</para>
105</entry><entry
106 align="char">
107<para>Points to the location where the front-end property commands are stored.</para>
108</entry>
109 </row></tbody></tgroup></informaltable>
110&return-value-dvb;
111<informaltable><tgroup cols="2"><tbody><row>
112 <entry align="char"><para>EOPNOTSUPP</para></entry>
113 <entry align="char"><para>Property type not supported.</para></entry>
114 </row></tbody></tgroup></informaltable>
115</section>
116
117<section id="FE_SET_PROPERTY">
118<title>FE_SET_PROPERTY</title>
119<para>DESCRIPTION
120</para>
121<informaltable><tgroup cols="1"><tbody><row><entry
122 align="char">
123<para>This ioctl call sets one or more frontend properties. This call
124 requires read/write access to the device.</para>
125</entry>
126 </row></tbody></tgroup></informaltable>
127<para>SYNOPSIS
128</para>
129<informaltable><tgroup cols="1"><tbody><row><entry
130 align="char">
131<para>int ioctl(int fd, int request = <link linkend="FE_SET_PROPERTY">FE_SET_PROPERTY</link>,
132 dtv_properties &#x22C6;props);</para>
133</entry>
134 </row></tbody></tgroup></informaltable>
135<para>PARAMETERS
136</para>
137<informaltable><tgroup cols="2"><tbody><row><entry align="char">
138<para>int fd</para>
139</entry><entry
140 align="char">
141<para>File descriptor returned by a previous call to open().</para>
142</entry>
143 </row><row><entry
144 align="char">
145<para>int num</para>
146</entry><entry
147 align="char">
148<para>Equals <link linkend="FE_SET_PROPERTY">FE_SET_PROPERTY</link> for this command.</para>
149</entry>
150 </row><row><entry
151 align="char">
152<para>struct dtv_property *props</para>
153</entry><entry
154 align="char">
155<para>Points to the location where the front-end property commands are stored.</para>
156</entry>
157 </row></tbody></tgroup></informaltable>
158&return-value-dvb;
159<informaltable><tgroup cols="2"><tbody><row>
160 <entry align="char"><para>EOPNOTSUPP</para></entry>
161 <entry align="char"><para>Property type not supported.</para></entry>
162 </row></tbody></tgroup></informaltable>
163</section>
164
165<section> 143<section>
166 <title>Property types</title> 144 <title>Property types</title>
167<para> 145<para>
168On <link linkend="FE_GET_PROPERTY">FE_GET_PROPERTY</link>/<link linkend="FE_SET_PROPERTY">FE_SET_PROPERTY</link>, 146On <link linkend="FE_GET_PROPERTY">FE_GET_PROPERTY and FE_SET_PROPERTY</link>,
169the actual action is determined by the dtv_property cmd/data pairs. With one single ioctl, is possible to 147the actual action is determined by the dtv_property cmd/data pairs. With one single ioctl, is possible to
170get/set up to 64 properties. The actual meaning of each property is described on the next sections. 148get/set up to 64 properties. The actual meaning of each property is described on the next sections.
171</para> 149</para>
@@ -193,7 +171,7 @@ get/set up to 64 properties. The actual meaning of each property is described on
193 <para>Central frequency of the channel.</para> 171 <para>Central frequency of the channel.</para>
194 172
195 <para>Notes:</para> 173 <para>Notes:</para>
196 <para>1)For satellital delivery systems, it is measured in kHz. 174 <para>1)For satellite delivery systems, it is measured in kHz.
197 For the other ones, it is measured in Hz.</para> 175 For the other ones, it is measured in Hz.</para>
198 <para>2)For ISDB-T, the channels are usually transmitted with an offset of 143kHz. 176 <para>2)For ISDB-T, the channels are usually transmitted with an offset of 143kHz.
199 E.g. a valid frequency could be 474143 kHz. The stepping is bound to the bandwidth of 177 E.g. a valid frequency could be 474143 kHz. The stepping is bound to the bandwidth of
@@ -205,25 +183,78 @@ get/set up to 64 properties. The actual meaning of each property is described on
205 </section> 183 </section>
206 <section id="DTV-MODULATION"> 184 <section id="DTV-MODULATION">
207 <title><constant>DTV_MODULATION</constant></title> 185 <title><constant>DTV_MODULATION</constant></title>
208<para>Specifies the frontend modulation type for cable and satellite types. The modulation can be one of the types bellow:</para> 186<para>Specifies the frontend modulation type for delivery systems that supports
209<programlisting> 187 more than one modulation type. The modulation can be one of the types
210 typedef enum fe_modulation { 188 defined by &fe-modulation;.</para>
211 QPSK, 189
212 QAM_16, 190
213 QAM_32, 191<section id="fe-modulation-t">
214 QAM_64, 192<title>Modulation property</title>
215 QAM_128, 193
216 QAM_256, 194<para>Most of the digital TV standards currently offers more than one possible
217 QAM_AUTO, 195 modulation (sometimes called as "constellation" on some standards). This
218 VSB_8, 196 enum contains the values used by the Kernel. Please note that not all
219 VSB_16, 197 modulations are supported by a given standard.</para>
220 PSK_8, 198
221 APSK_16, 199<table pgwide="1" frame="none" id="fe-modulation">
222 APSK_32, 200 <title>enum fe_modulation</title>
223 DQPSK, 201 <tgroup cols="2">
224 QAM_4_NR, 202 &cs-def;
225 } fe_modulation_t; 203 <thead>
226</programlisting> 204 <row>
205 <entry>ID</entry>
206 <entry>Description</entry>
207 </row>
208 </thead>
209 <tbody valign="top">
210 <row>
211 <entry id="QPSK"><constant>QPSK</constant></entry>
212 <entry>QPSK modulation</entry>
213 </row><row>
214 <entry id="QAM-16"><constant>QAM_16</constant></entry>
215 <entry>16-QAM modulation</entry>
216 </row><row>
217 <entry id="QAM-32"><constant>QAM_32</constant></entry>
218 <entry>32-QAM modulation</entry>
219 </row><row>
220 <entry id="QAM-64"><constant>QAM_64</constant></entry>
221 <entry>64-QAM modulation</entry>
222 </row><row>
223 <entry id="QAM-128"><constant>QAM_128</constant></entry>
224 <entry>128-QAM modulation</entry>
225 </row><row>
226 <entry id="QAM-256"><constant>QAM_256</constant></entry>
227 <entry>256-QAM modulation</entry>
228 </row><row>
229 <entry id="QAM-AUTO"><constant>QAM_AUTO</constant></entry>
230 <entry>Autodetect QAM modulation</entry>
231 </row><row>
232 <entry id="VSB-8"><constant>VSB_8</constant></entry>
233 <entry>8-VSB modulation</entry>
234 </row><row>
235 <entry id="VSB-16"><constant>VSB_16</constant></entry>
236 <entry>16-VSB modulation</entry>
237 </row><row>
238 <entry id="PSK-8"><constant>PSK_8</constant></entry>
239 <entry>8-PSK modulation</entry>
240 </row><row>
241 <entry id="APSK-16"><constant>APSK_16</constant></entry>
242 <entry>16-APSK modulation</entry>
243 </row><row>
244 <entry id="APSK-32"><constant>APSK_32</constant></entry>
245 <entry>32-APSK modulation</entry>
246 </row><row>
247 <entry id="DQPSK"><constant>DQPSK</constant></entry>
248 <entry>DQPSK modulation</entry>
249 </row><row>
250 <entry id="QAM-4-NR"><constant>QAM_4_NR</constant></entry>
251 <entry>4-QAM-NR modulation</entry>
252 </row>
253 </tbody>
254 </tgroup>
255</table>
256</section>
257
227 </section> 258 </section>
228 <section id="DTV-BANDWIDTH-HZ"> 259 <section id="DTV-BANDWIDTH-HZ">
229 <title><constant>DTV_BANDWIDTH_HZ</constant></title> 260 <title><constant>DTV_BANDWIDTH_HZ</constant></title>
@@ -253,19 +284,45 @@ get/set up to 64 properties. The actual meaning of each property is described on
253 </section> 284 </section>
254 <section id="DTV-INVERSION"> 285 <section id="DTV-INVERSION">
255 <title><constant>DTV_INVERSION</constant></title> 286 <title><constant>DTV_INVERSION</constant></title>
256 <para>The Inversion field can take one of these values: 287
257 </para> 288 <para>Specifies if the frontend should do spectral inversion or not.</para>
258 <programlisting> 289
259 typedef enum fe_spectral_inversion { 290<section id="fe-spectral-inversion-t">
260 INVERSION_OFF, 291<title>enum fe_modulation: Frontend spectral inversion</title>
261 INVERSION_ON, 292
262 INVERSION_AUTO 293<para>This parameter indicates if spectral inversion should be presumed or not.
263 } fe_spectral_inversion_t; 294 In the automatic setting (<constant>INVERSION_AUTO</constant>) the hardware
264 </programlisting> 295 will try to figure out the correct setting by itself. If the hardware
265 <para>It indicates if spectral inversion should be presumed or not. In the automatic setting 296 doesn't support, the DVB core will try to lock at the carrier first with
266 (<constant>INVERSION_AUTO</constant>) the hardware will try to figure out the correct setting by 297 inversion off. If it fails, it will try to enable inversion.
267 itself. 298</para>
268 </para> 299
300<table pgwide="1" frame="none" id="fe-spectral-inversion">
301 <title>enum fe_modulation</title>
302 <tgroup cols="2">
303 &cs-def;
304 <thead>
305 <row>
306 <entry>ID</entry>
307 <entry>Description</entry>
308 </row>
309 </thead>
310 <tbody valign="top">
311 <row>
312 <entry id="INVERSION-OFF"><constant>INVERSION_OFF</constant></entry>
313 <entry>Don't do spectral band inversion.</entry>
314 </row><row>
315 <entry id="INVERSION-ON"><constant>INVERSION_ON</constant></entry>
316 <entry>Do spectral band inversion.</entry>
317 </row><row>
318 <entry id="INVERSION-AUTO"><constant>INVERSION_AUTO</constant></entry>
319 <entry>Autodetect spectral band inversion.</entry>
320 </row>
321 </tbody>
322 </tgroup>
323</table>
324</section>
325
269 </section> 326 </section>
270 <section id="DTV-DISEQC-MASTER"> 327 <section id="DTV-DISEQC-MASTER">
271 <title><constant>DTV_DISEQC_MASTER</constant></title> 328 <title><constant>DTV_DISEQC_MASTER</constant></title>
@@ -279,25 +336,64 @@ get/set up to 64 properties. The actual meaning of each property is described on
279 <title><constant>DTV_INNER_FEC</constant></title> 336 <title><constant>DTV_INNER_FEC</constant></title>
280 <para>Used cable/satellite transmissions. The acceptable values are: 337 <para>Used cable/satellite transmissions. The acceptable values are:
281 </para> 338 </para>
282 <programlisting> 339<section id="fe-code-rate-t">
283typedef enum fe_code_rate { 340<title>enum fe_code_rate: type of the Forward Error Correction.</title>
284 FEC_NONE = 0, 341
285 FEC_1_2, 342<table pgwide="1" frame="none" id="fe-code-rate">
286 FEC_2_3, 343 <title>enum fe_code_rate</title>
287 FEC_3_4, 344 <tgroup cols="2">
288 FEC_4_5, 345 &cs-def;
289 FEC_5_6, 346 <thead>
290 FEC_6_7, 347 <row>
291 FEC_7_8, 348 <entry>ID</entry>
292 FEC_8_9, 349 <entry>Description</entry>
293 FEC_AUTO, 350 </row>
294 FEC_3_5, 351 </thead>
295 FEC_9_10, 352 <tbody valign="top">
296 FEC_2_5, 353 <row>
297} fe_code_rate_t; 354 <entry id="FEC-NONE"><constant>FEC_NONE</constant></entry>
298 </programlisting> 355 <entry>No Forward Error Correction Code</entry>
299 <para>which correspond to error correction rates of 1/2, 2/3, etc., 356 </row><row>
300 no error correction or auto detection.</para> 357 <entry id="FEC-AUTO"><constant>FEC_AUTO</constant></entry>
358 <entry>Autodetect Error Correction Code</entry>
359 </row><row>
360 <entry id="FEC-1-2"><constant>FEC_1_2</constant></entry>
361 <entry>Forward Error Correction Code 1/2</entry>
362 </row><row>
363 <entry id="FEC-2-3"><constant>FEC_2_3</constant></entry>
364 <entry>Forward Error Correction Code 2/3</entry>
365 </row><row>
366 <entry id="FEC-3-4"><constant>FEC_3_4</constant></entry>
367 <entry>Forward Error Correction Code 3/4</entry>
368 </row><row>
369 <entry id="FEC-4-5"><constant>FEC_4_5</constant></entry>
370 <entry>Forward Error Correction Code 4/5</entry>
371 </row><row>
372 <entry id="FEC-5-6"><constant>FEC_5_6</constant></entry>
373 <entry>Forward Error Correction Code 5/6</entry>
374 </row><row>
375 <entry id="FEC-6-7"><constant>FEC_6_7</constant></entry>
376 <entry>Forward Error Correction Code 6/7</entry>
377 </row><row>
378 <entry id="FEC-7-8"><constant>FEC_7_8</constant></entry>
379 <entry>Forward Error Correction Code 7/8</entry>
380 </row><row>
381 <entry id="FEC-8-9"><constant>FEC_8_9</constant></entry>
382 <entry>Forward Error Correction Code 8/9</entry>
383 </row><row>
384 <entry id="FEC-9-10"><constant>FEC_9_10</constant></entry>
385 <entry>Forward Error Correction Code 9/10</entry>
386 </row><row>
387 <entry id="FEC-2-5"><constant>FEC_2_5</constant></entry>
388 <entry>Forward Error Correction Code 2/5</entry>
389 </row><row>
390 <entry id="FEC-3-5"><constant>FEC_3_5</constant></entry>
391 <entry>Forward Error Correction Code 3/5</entry>
392 </row>
393 </tbody>
394 </tgroup>
395</table>
396</section>
301 </section> 397 </section>
302 <section id="DTV-VOLTAGE"> 398 <section id="DTV-VOLTAGE">
303 <title><constant>DTV_VOLTAGE</constant></title> 399 <title><constant>DTV_VOLTAGE</constant></title>
@@ -305,12 +401,31 @@ typedef enum fe_code_rate {
305 the polarzation (horizontal/vertical). When using DiSEqC epuipment this 401 the polarzation (horizontal/vertical). When using DiSEqC epuipment this
306 voltage has to be switched consistently to the DiSEqC commands as 402 voltage has to be switched consistently to the DiSEqC commands as
307 described in the DiSEqC spec.</para> 403 described in the DiSEqC spec.</para>
308 <programlisting> 404
309 typedef enum fe_sec_voltage { 405<table pgwide="1" frame="none" id="fe-sec-voltage">
310 SEC_VOLTAGE_13, 406 <title id="fe-sec-voltage-t">enum fe_sec_voltage</title>
311 SEC_VOLTAGE_18 407 <tgroup cols="2">
312 } fe_sec_voltage_t; 408 &cs-def;
313 </programlisting> 409 <thead>
410 <row>
411 <entry>ID</entry>
412 <entry>Description</entry>
413 </row>
414 </thead>
415 <tbody valign="top">
416 <row>
417 <entry align="char" id="SEC-VOLTAGE-13"><constant>SEC_VOLTAGE_13</constant></entry>
418 <entry align="char">Set DC voltage level to 13V</entry>
419 </row><row>
420 <entry align="char" id="SEC-VOLTAGE-18"><constant>SEC_VOLTAGE_18</constant></entry>
421 <entry align="char">Set DC voltage level to 18V</entry>
422 </row><row>
423 <entry align="char" id="SEC-VOLTAGE-OFF"><constant>SEC_VOLTAGE_OFF</constant></entry>
424 <entry align="char">Don't send any voltage to the antenna</entry>
425 </row>
426 </tbody>
427 </tgroup>
428</table>
314 </section> 429 </section>
315 <section id="DTV-TONE"> 430 <section id="DTV-TONE">
316 <title><constant>DTV_TONE</constant></title> 431 <title><constant>DTV_TONE</constant></title>
@@ -321,13 +436,30 @@ typedef enum fe_code_rate {
321 <para>Sets DVB-S2 pilot</para> 436 <para>Sets DVB-S2 pilot</para>
322 <section id="fe-pilot-t"> 437 <section id="fe-pilot-t">
323 <title>fe_pilot type</title> 438 <title>fe_pilot type</title>
324 <programlisting> 439<table pgwide="1" frame="none" id="fe-pilot">
325typedef enum fe_pilot { 440 <title>enum fe_pilot</title>
326 PILOT_ON, 441 <tgroup cols="2">
327 PILOT_OFF, 442 &cs-def;
328 PILOT_AUTO, 443 <thead>
329} fe_pilot_t; 444 <row>
330 </programlisting> 445 <entry>ID</entry>
446 <entry>Description</entry>
447 </row>
448 </thead>
449 <tbody valign="top">
450 <row>
451 <entry align="char" id="PILOT-ON"><constant>PILOT_ON</constant></entry>
452 <entry align="char">Pilot tones enabled</entry>
453 </row><row>
454 <entry align="char" id="PILOT-OFF"><constant>PILOT_OFF</constant></entry>
455 <entry align="char">Pilot tones disabled</entry>
456 </row><row>
457 <entry align="char" id="PILOT-AUTO"><constant>PILOT_AUTO</constant></entry>
458 <entry align="char">Autodetect pilot tones</entry>
459 </row>
460 </tbody>
461 </tgroup>
462</table>
331 </section> 463 </section>
332 </section> 464 </section>
333 <section id="DTV-ROLLOFF"> 465 <section id="DTV-ROLLOFF">
@@ -336,14 +468,33 @@ typedef enum fe_pilot {
336 468
337 <section id="fe-rolloff-t"> 469 <section id="fe-rolloff-t">
338 <title>fe_rolloff type</title> 470 <title>fe_rolloff type</title>
339 <programlisting> 471<table pgwide="1" frame="none" id="fe-rolloff">
340typedef enum fe_rolloff { 472 <title>enum fe_rolloff</title>
341 ROLLOFF_35, /* Implied value in DVB-S, default for DVB-S2 */ 473 <tgroup cols="2">
342 ROLLOFF_20, 474 &cs-def;
343 ROLLOFF_25, 475 <thead>
344 ROLLOFF_AUTO, 476 <row>
345} fe_rolloff_t; 477 <entry>ID</entry>
346 </programlisting> 478 <entry>Description</entry>
479 </row>
480 </thead>
481 <tbody valign="top">
482 <row>
483 <entry align="char" id="ROLLOFF-35"><constant>ROLLOFF_35</constant></entry>
484 <entry align="char">Roloff factor: &alpha;=35%</entry>
485 </row><row>
486 <entry align="char" id="ROLLOFF-20"><constant>ROLLOFF_20</constant></entry>
487 <entry align="char">Roloff factor: &alpha;=20%</entry>
488 </row><row>
489 <entry align="char" id="ROLLOFF-25"><constant>ROLLOFF_25</constant></entry>
490 <entry align="char">Roloff factor: &alpha;=25%</entry>
491 </row><row>
492 <entry align="char" id="ROLLOFF-AUTO"><constant>ROLLOFF_AUTO</constant></entry>
493 <entry align="char">Auto-detect the roloff factor.</entry>
494 </row>
495 </tbody>
496 </tgroup>
497</table>
347 </section> 498 </section>
348 </section> 499 </section>
349 <section id="DTV-DISEQC-SLAVE-REPLY"> 500 <section id="DTV-DISEQC-SLAVE-REPLY">
@@ -364,31 +515,82 @@ typedef enum fe_rolloff {
364 <section id="fe-delivery-system-t"> 515 <section id="fe-delivery-system-t">
365 <title>fe_delivery_system type</title> 516 <title>fe_delivery_system type</title>
366 <para>Possible values: </para> 517 <para>Possible values: </para>
367<programlisting>
368 518
369typedef enum fe_delivery_system { 519<table pgwide="1" frame="none" id="fe-delivery-system">
370 SYS_UNDEFINED, 520 <title>enum fe_delivery_system</title>
371 SYS_DVBC_ANNEX_A, 521 <tgroup cols="2">
372 SYS_DVBC_ANNEX_B, 522 &cs-def;
373 SYS_DVBT, 523 <thead>
374 SYS_DSS, 524 <row>
375 SYS_DVBS, 525 <entry>ID</entry>
376 SYS_DVBS2, 526 <entry>Description</entry>
377 SYS_DVBH, 527 </row>
378 SYS_ISDBT, 528 </thead>
379 SYS_ISDBS, 529 <tbody valign="top">
380 SYS_ISDBC, 530 <row>
381 SYS_ATSC, 531 <entry id="SYS-UNDEFINED"><constant>SYS_UNDEFINED</constant></entry>
382 SYS_ATSCMH, 532 <entry>Undefined standard. Generally, indicates an error</entry>
383 SYS_DTMB, 533 </row><row>
384 SYS_CMMB, 534 <entry id="SYS-DVBC-ANNEX-A"><constant>SYS_DVBC_ANNEX_A</constant></entry>
385 SYS_DAB, 535 <entry>Cable TV: DVB-C following ITU-T J.83 Annex A spec</entry>
386 SYS_DVBT2, 536 </row><row>
387 SYS_TURBO, 537 <entry id="SYS-DVBC-ANNEX-B"><constant>SYS_DVBC_ANNEX_B</constant></entry>
388 SYS_DVBC_ANNEX_C, 538 <entry>Cable TV: DVB-C following ITU-T J.83 Annex B spec (ClearQAM)</entry>
389} fe_delivery_system_t; 539 </row><row>
390</programlisting> 540 <entry id="SYS-DVBC-ANNEX-C"><constant>SYS_DVBC_ANNEX_C</constant></entry>
391 </section> 541 <entry>Cable TV: DVB-C following ITU-T J.83 Annex C spec</entry>
542 </row><row>
543 <entry id="SYS-ISDBC"><constant>SYS_ISDBC</constant></entry>
544 <entry>Cable TV: ISDB-C (no drivers yet)</entry>
545 </row><row>
546 <entry id="SYS-DVBT"><constant>SYS_DVBT</constant></entry>
547 <entry>Terrestral TV: DVB-T</entry>
548 </row><row>
549 <entry id="SYS-DVBT2"><constant>SYS_DVBT2</constant></entry>
550 <entry>Terrestral TV: DVB-T2</entry>
551 </row><row>
552 <entry id="SYS-ISDBT"><constant>SYS_ISDBT</constant></entry>
553 <entry>Terrestral TV: ISDB-T</entry>
554 </row><row>
555 <entry id="SYS-ATSC"><constant>SYS_ATSC</constant></entry>
556 <entry>Terrestral TV: ATSC</entry>
557 </row><row>
558 <entry id="SYS-ATSCMH"><constant>SYS_ATSCMH</constant></entry>
559 <entry>Terrestral TV (mobile): ATSC-M/H</entry>
560 </row><row>
561 <entry id="SYS-DTMB"><constant>SYS_DTMB</constant></entry>
562 <entry>Terrestrial TV: DTMB</entry>
563 </row><row>
564 <entry id="SYS-DVBS"><constant>SYS_DVBS</constant></entry>
565 <entry>Satellite TV: DVB-S</entry>
566 </row><row>
567 <entry id="SYS-DVBS2"><constant>SYS_DVBS2</constant></entry>
568 <entry>Satellite TV: DVB-S2</entry>
569 </row><row>
570 <entry id="SYS-TURBO"><constant>SYS_TURBO</constant></entry>
571 <entry>Satellite TV: DVB-S Turbo</entry>
572 </row><row>
573 <entry id="SYS-ISDBS"><constant>SYS_ISDBS</constant></entry>
574 <entry>Satellite TV: ISDB-S</entry>
575 </row><row>
576 <entry id="SYS-DAB"><constant>SYS_DAB</constant></entry>
577 <entry>Digital audio: DAB (not fully supported)</entry>
578 </row><row>
579 <entry id="SYS-DSS"><constant>SYS_DSS</constant></entry>
580 <entry>Satellite TV:"DSS (not fully supported)</entry>
581 </row><row>
582 <entry id="SYS-CMMB"><constant>SYS_CMMB</constant></entry>
583 <entry>Terrestral TV (mobile):CMMB (not fully supported)</entry>
584 </row><row>
585 <entry id="SYS-DVBH"><constant>SYS_DVBH</constant></entry>
586 <entry>Terrestral TV (mobile): DVB-H (standard deprecated)</entry>
587 </row>
588 </tbody>
589 </tgroup>
590</table>
591
592
593</section>
392 </section> 594 </section>
393 <section id="DTV-ISDBT-PARTIAL-RECEPTION"> 595 <section id="DTV-ISDBT-PARTIAL-RECEPTION">
394 <title><constant>DTV_ISDBT_PARTIAL_RECEPTION</constant></title> 596 <title><constant>DTV_ISDBT_PARTIAL_RECEPTION</constant></title>
@@ -630,114 +832,177 @@ typedef enum fe_delivery_system {
630 </section> 832 </section>
631 <section id="DTV-ATSCMH-RS-FRAME-MODE"> 833 <section id="DTV-ATSCMH-RS-FRAME-MODE">
632 <title><constant>DTV_ATSCMH_RS_FRAME_MODE</constant></title> 834 <title><constant>DTV_ATSCMH_RS_FRAME_MODE</constant></title>
633 <para>RS frame mode.</para> 835 <para>Reed Solomon (RS) frame mode.</para>
634 <para>Possible values are:</para> 836 <para>Possible values are:</para>
635 <para id="atscmh-rs-frame-mode"> 837<table pgwide="1" frame="none" id="atscmh-rs-frame-mode">
636<programlisting> 838 <title>enum atscmh_rs_frame_mode</title>
637typedef enum atscmh_rs_frame_mode { 839 <tgroup cols="2">
638 ATSCMH_RSFRAME_PRI_ONLY = 0, 840 &cs-def;
639 ATSCMH_RSFRAME_PRI_SEC = 1, 841 <thead>
640} atscmh_rs_frame_mode_t; 842 <row>
641</programlisting> 843 <entry>ID</entry>
642 </para> 844 <entry>Description</entry>
845 </row>
846 </thead>
847 <tbody valign="top">
848 <row>
849 <entry id="ATSCMH-RSFRAME-PRI-ONLY"><constant>ATSCMH_RSFRAME_PRI_ONLY</constant></entry>
850 <entry>Single Frame: There is only a primary RS Frame for all
851 Group Regions.</entry>
852 </row><row>
853 <entry id="ATSCMH-RSFRAME-PRI-SEC"><constant>ATSCMH_RSFRAME_PRI_SEC</constant></entry>
854 <entry>Dual Frame: There are two separate RS Frames: Primary RS
855 Frame for Group Region A and B and Secondary RS Frame for Group
856 Region C and D.</entry>
857 </row>
858 </tbody>
859 </tgroup>
860</table>
643 </section> 861 </section>
644 <section id="DTV-ATSCMH-RS-FRAME-ENSEMBLE"> 862 <section id="DTV-ATSCMH-RS-FRAME-ENSEMBLE">
645 <title><constant>DTV_ATSCMH_RS_FRAME_ENSEMBLE</constant></title> 863 <title><constant>DTV_ATSCMH_RS_FRAME_ENSEMBLE</constant></title>
646 <para>RS frame ensemble.</para> 864 <para>Reed Solomon(RS) frame ensemble.</para>
647 <para>Possible values are:</para> 865 <para>Possible values are:</para>
648 <para id="atscmh-rs-frame-ensemble"> 866<table pgwide="1" frame="none" id="atscmh-rs-frame-ensemble">
649<programlisting> 867 <title>enum atscmh_rs_frame_ensemble</title>
650typedef enum atscmh_rs_frame_ensemble { 868 <tgroup cols="2">
651 ATSCMH_RSFRAME_ENS_PRI = 0, 869 &cs-def;
652 ATSCMH_RSFRAME_ENS_SEC = 1, 870 <thead>
653} atscmh_rs_frame_ensemble_t; 871 <row>
654</programlisting> 872 <entry>ID</entry>
655 </para> 873 <entry>Description</entry>
874 </row>
875 </thead>
876 <tbody valign="top">
877 <row>
878 <entry id="ATSCMH-RSFRAME-ENS-PRI"><constant>ATSCMH_RSFRAME_ENS_PRI</constant></entry>
879 <entry>Primary Ensemble.</entry>
880 </row><row>
881 <entry id="ATSCMH-RSFRAME-ENS-SEC"><constant>AATSCMH_RSFRAME_PRI_SEC</constant></entry>
882 <entry>Secondary Ensemble.</entry>
883 </row><row>
884 <entry id="ATSCMH-RSFRAME-RES"><constant>AATSCMH_RSFRAME_RES</constant></entry>
885 <entry>Reserved. Shouldn't be used.</entry>
886 </row>
887 </tbody>
888 </tgroup>
889</table>
656 </section> 890 </section>
657 <section id="DTV-ATSCMH-RS-CODE-MODE-PRI"> 891 <section id="DTV-ATSCMH-RS-CODE-MODE-PRI">
658 <title><constant>DTV_ATSCMH_RS_CODE_MODE_PRI</constant></title> 892 <title><constant>DTV_ATSCMH_RS_CODE_MODE_PRI</constant></title>
659 <para>RS code mode (primary).</para> 893 <para>Reed Solomon (RS) code mode (primary).</para>
660 <para>Possible values are:</para> 894 <para>Possible values are:</para>
661 <para id="atscmh-rs-code-mode"> 895<table pgwide="1" frame="none" id="atscmh-rs-code-mode">
662<programlisting> 896 <title>enum atscmh_rs_code_mode</title>
663typedef enum atscmh_rs_code_mode { 897 <tgroup cols="2">
664 ATSCMH_RSCODE_211_187 = 0, 898 &cs-def;
665 ATSCMH_RSCODE_223_187 = 1, 899 <thead>
666 ATSCMH_RSCODE_235_187 = 2, 900 <row>
667} atscmh_rs_code_mode_t; 901 <entry>ID</entry>
668</programlisting> 902 <entry>Description</entry>
669 </para> 903 </row>
904 </thead>
905 <tbody valign="top">
906 <row>
907 <entry id="ATSCMH-RSCODE-211-187"><constant>ATSCMH_RSCODE_211_187</constant></entry>
908 <entry>Reed Solomon code (211,187).</entry>
909 </row><row>
910 <entry id="ATSCMH-RSCODE-223-187"><constant>ATSCMH_RSCODE_223_187</constant></entry>
911 <entry>Reed Solomon code (223,187).</entry>
912 </row><row>
913 <entry id="ATSCMH-RSCODE-235-187"><constant>ATSCMH_RSCODE_235_187</constant></entry>
914 <entry>Reed Solomon code (235,187).</entry>
915 </row><row>
916 <entry id="ATSCMH-RSCODE-RES"><constant>ATSCMH_RSCODE_RES</constant></entry>
917 <entry>Reserved. Shouldn't be used.</entry>
918 </row>
919 </tbody>
920 </tgroup>
921</table>
670 </section> 922 </section>
671 <section id="DTV-ATSCMH-RS-CODE-MODE-SEC"> 923 <section id="DTV-ATSCMH-RS-CODE-MODE-SEC">
672 <title><constant>DTV_ATSCMH_RS_CODE_MODE_SEC</constant></title> 924 <title><constant>DTV_ATSCMH_RS_CODE_MODE_SEC</constant></title>
673 <para>RS code mode (secondary).</para> 925 <para>Reed Solomon (RS) code mode (secondary).</para>
674 <para>Possible values are:</para> 926 <para>Possible values are the same as documented on
675<programlisting> 927 &atscmh-rs-code-mode;:</para>
676typedef enum atscmh_rs_code_mode {
677 ATSCMH_RSCODE_211_187 = 0,
678 ATSCMH_RSCODE_223_187 = 1,
679 ATSCMH_RSCODE_235_187 = 2,
680} atscmh_rs_code_mode_t;
681</programlisting>
682 </section> 928 </section>
683 <section id="DTV-ATSCMH-SCCC-BLOCK-MODE"> 929 <section id="DTV-ATSCMH-SCCC-BLOCK-MODE">
684 <title><constant>DTV_ATSCMH_SCCC_BLOCK_MODE</constant></title> 930 <title><constant>DTV_ATSCMH_SCCC_BLOCK_MODE</constant></title>
685 <para>Series Concatenated Convolutional Code Block Mode.</para> 931 <para>Series Concatenated Convolutional Code Block Mode.</para>
686 <para>Possible values are:</para> 932 <para>Possible values are:</para>
687 <para id="atscmh-sccc-block-mode"> 933<table pgwide="1" frame="none" id="atscmh-sccc-block-mode">
688<programlisting> 934 <title>enum atscmh_scc_block_mode</title>
689typedef enum atscmh_sccc_block_mode { 935 <tgroup cols="2">
690 ATSCMH_SCCC_BLK_SEP = 0, 936 &cs-def;
691 ATSCMH_SCCC_BLK_COMB = 1, 937 <thead>
692} atscmh_sccc_block_mode_t; 938 <row>
693</programlisting> 939 <entry>ID</entry>
694 </para> 940 <entry>Description</entry>
941 </row>
942 </thead>
943 <tbody valign="top">
944 <row>
945 <entry id="ATSCMH-SCCC-BLK-SEP"><constant>ATSCMH_SCCC_BLK_SEP</constant></entry>
946 <entry>Separate SCCC: the SCCC outer code mode shall be set independently
947 for each Group Region (A, B, C, D)</entry>
948 </row><row>
949 <entry id="ATSCMH-SCCC-BLK-COMB"><constant>ATSCMH_SCCC_BLK_COMB</constant></entry>
950 <entry>Combined SCCC: all four Regions shall have the same SCCC outer
951 code mode.</entry>
952 </row><row>
953 <entry id="ATSCMH-SCCC-BLK-RES"><constant>ATSCMH_SCCC_BLK_RES</constant></entry>
954 <entry>Reserved. Shouldn't be used.</entry>
955 </row>
956 </tbody>
957 </tgroup>
958</table>
695 </section> 959 </section>
696 <section id="DTV-ATSCMH-SCCC-CODE-MODE-A"> 960 <section id="DTV-ATSCMH-SCCC-CODE-MODE-A">
697 <title><constant>DTV_ATSCMH_SCCC_CODE_MODE_A</constant></title> 961 <title><constant>DTV_ATSCMH_SCCC_CODE_MODE_A</constant></title>
698 <para>Series Concatenated Convolutional Code Rate.</para> 962 <para>Series Concatenated Convolutional Code Rate.</para>
699 <para>Possible values are:</para> 963 <para>Possible values are:</para>
700 <para id="atscmh-sccc-code-mode"> 964<table pgwide="1" frame="none" id="atscmh-sccc-code-mode">
701<programlisting> 965 <title>enum atscmh_sccc_code_mode</title>
702typedef enum atscmh_sccc_code_mode { 966 <tgroup cols="2">
703 ATSCMH_SCCC_CODE_HLF = 0, 967 &cs-def;
704 ATSCMH_SCCC_CODE_QTR = 1, 968 <thead>
705} atscmh_sccc_code_mode_t; 969 <row>
706</programlisting> 970 <entry>ID</entry>
707 </para> 971 <entry>Description</entry>
972 </row>
973 </thead>
974 <tbody valign="top">
975 <row>
976 <entry id="ATSCMH-SCCC-CODE-HLF"><constant>ATSCMH_SCCC_CODE_HLF</constant></entry>
977 <entry>The outer code rate of a SCCC Block is 1/2 rate.</entry>
978 </row><row>
979 <entry id="ATSCMH-SCCC-CODE-QTR"><constant>ATSCMH_SCCC_CODE_QTR</constant></entry>
980 <entry>The outer code rate of a SCCC Block is 1/4 rate.</entry>
981 </row><row>
982 <entry id="ATSCMH-SCCC-CODE-RES"><constant>ATSCMH_SCCC_CODE_RES</constant></entry>
983 <entry>to be documented.</entry>
984 </row>
985 </tbody>
986 </tgroup>
987</table>
708 </section> 988 </section>
709 <section id="DTV-ATSCMH-SCCC-CODE-MODE-B"> 989 <section id="DTV-ATSCMH-SCCC-CODE-MODE-B">
710 <title><constant>DTV_ATSCMH_SCCC_CODE_MODE_B</constant></title> 990 <title><constant>DTV_ATSCMH_SCCC_CODE_MODE_B</constant></title>
711 <para>Series Concatenated Convolutional Code Rate.</para> 991 <para>Series Concatenated Convolutional Code Rate.</para>
712 <para>Possible values are:</para> 992 <para>Possible values are the same as documented on
713<programlisting> 993 &atscmh-sccc-code-mode;.</para>
714typedef enum atscmh_sccc_code_mode {
715 ATSCMH_SCCC_CODE_HLF = 0,
716 ATSCMH_SCCC_CODE_QTR = 1,
717} atscmh_sccc_code_mode_t;
718</programlisting>
719 </section> 994 </section>
720 <section id="DTV-ATSCMH-SCCC-CODE-MODE-C"> 995 <section id="DTV-ATSCMH-SCCC-CODE-MODE-C">
721 <title><constant>DTV_ATSCMH_SCCC_CODE_MODE_C</constant></title> 996 <title><constant>DTV_ATSCMH_SCCC_CODE_MODE_C</constant></title>
722 <para>Series Concatenated Convolutional Code Rate.</para> 997 <para>Series Concatenated Convolutional Code Rate.</para>
723 <para>Possible values are:</para> 998 <para>Possible values are the same as documented on
724<programlisting> 999 &atscmh-sccc-code-mode;.</para>
725typedef enum atscmh_sccc_code_mode {
726 ATSCMH_SCCC_CODE_HLF = 0,
727 ATSCMH_SCCC_CODE_QTR = 1,
728} atscmh_sccc_code_mode_t;
729</programlisting>
730 </section> 1000 </section>
731 <section id="DTV-ATSCMH-SCCC-CODE-MODE-D"> 1001 <section id="DTV-ATSCMH-SCCC-CODE-MODE-D">
732 <title><constant>DTV_ATSCMH_SCCC_CODE_MODE_D</constant></title> 1002 <title><constant>DTV_ATSCMH_SCCC_CODE_MODE_D</constant></title>
733 <para>Series Concatenated Convolutional Code Rate.</para> 1003 <para>Series Concatenated Convolutional Code Rate.</para>
734 <para>Possible values are:</para> 1004 <para>Possible values are the same as documented on
735<programlisting> 1005 &atscmh-sccc-code-mode;.</para>
736typedef enum atscmh_sccc_code_mode {
737 ATSCMH_SCCC_CODE_HLF = 0,
738 ATSCMH_SCCC_CODE_QTR = 1,
739} atscmh_sccc_code_mode_t;
740</programlisting>
741 </section> 1006 </section>
742 </section> 1007 </section>
743 <section id="DTV-API-VERSION"> 1008 <section id="DTV-API-VERSION">
@@ -746,65 +1011,74 @@ typedef enum atscmh_sccc_code_mode {
746 </section> 1011 </section>
747 <section id="DTV-CODE-RATE-HP"> 1012 <section id="DTV-CODE-RATE-HP">
748 <title><constant>DTV_CODE_RATE_HP</constant></title> 1013 <title><constant>DTV_CODE_RATE_HP</constant></title>
749 <para>Used on terrestrial transmissions. The acceptable values are: 1014 <para>Used on terrestrial transmissions. The acceptable values are
1015 the ones described at &fe-transmit-mode-t;.
750 </para> 1016 </para>
751 <programlisting>
752typedef enum fe_code_rate {
753 FEC_NONE = 0,
754 FEC_1_2,
755 FEC_2_3,
756 FEC_3_4,
757 FEC_4_5,
758 FEC_5_6,
759 FEC_6_7,
760 FEC_7_8,
761 FEC_8_9,
762 FEC_AUTO,
763 FEC_3_5,
764 FEC_9_10,
765} fe_code_rate_t;
766 </programlisting>
767 </section> 1017 </section>
768 <section id="DTV-CODE-RATE-LP"> 1018 <section id="DTV-CODE-RATE-LP">
769 <title><constant>DTV_CODE_RATE_LP</constant></title> 1019 <title><constant>DTV_CODE_RATE_LP</constant></title>
770 <para>Used on terrestrial transmissions. The acceptable values are: 1020 <para>Used on terrestrial transmissions. The acceptable values are
1021 the ones described at &fe-transmit-mode-t;.
771 </para> 1022 </para>
772 <programlisting> 1023
773typedef enum fe_code_rate {
774 FEC_NONE = 0,
775 FEC_1_2,
776 FEC_2_3,
777 FEC_3_4,
778 FEC_4_5,
779 FEC_5_6,
780 FEC_6_7,
781 FEC_7_8,
782 FEC_8_9,
783 FEC_AUTO,
784 FEC_3_5,
785 FEC_9_10,
786} fe_code_rate_t;
787 </programlisting>
788 </section> 1024 </section>
1025
789 <section id="DTV-GUARD-INTERVAL"> 1026 <section id="DTV-GUARD-INTERVAL">
790 <title><constant>DTV_GUARD_INTERVAL</constant></title> 1027 <title><constant>DTV_GUARD_INTERVAL</constant></title>
791 1028
792 <para>Possible values are:</para> 1029 <para>Possible values are:</para>
793<programlisting> 1030
794typedef enum fe_guard_interval { 1031<section id="fe-guard-interval-t">
795 GUARD_INTERVAL_1_32, 1032<title>Modulation guard interval</title>
796 GUARD_INTERVAL_1_16, 1033
797 GUARD_INTERVAL_1_8, 1034<table pgwide="1" frame="none" id="fe-guard-interval">
798 GUARD_INTERVAL_1_4, 1035 <title>enum fe_guard_interval</title>
799 GUARD_INTERVAL_AUTO, 1036 <tgroup cols="2">
800 GUARD_INTERVAL_1_128, 1037 &cs-def;
801 GUARD_INTERVAL_19_128, 1038 <thead>
802 GUARD_INTERVAL_19_256, 1039 <row>
803 GUARD_INTERVAL_PN420, 1040 <entry>ID</entry>
804 GUARD_INTERVAL_PN595, 1041 <entry>Description</entry>
805 GUARD_INTERVAL_PN945, 1042 </row>
806} fe_guard_interval_t; 1043 </thead>
807</programlisting> 1044 <tbody valign="top">
1045 <row>
1046 <entry id="GUARD-INTERVAL-AUTO"><constant>GUARD_INTERVAL_AUTO</constant></entry>
1047 <entry>Autodetect the guard interval</entry>
1048 </row><row>
1049 <entry id="GUARD-INTERVAL-1-128"><constant>GUARD_INTERVAL_1_128</constant></entry>
1050 <entry>Guard interval 1/128</entry>
1051 </row><row>
1052 <entry id="GUARD-INTERVAL-1-32"><constant>GUARD_INTERVAL_1_32</constant></entry>
1053 <entry>Guard interval 1/32</entry>
1054 </row><row>
1055 <entry id="GUARD-INTERVAL-1-16"><constant>GUARD_INTERVAL_1_16</constant></entry>
1056 <entry>Guard interval 1/16</entry>
1057 </row><row>
1058 <entry id="GUARD-INTERVAL-1-8"><constant>GUARD_INTERVAL_1_8</constant></entry>
1059 <entry>Guard interval 1/8</entry>
1060 </row><row>
1061 <entry id="GUARD-INTERVAL-1-4"><constant>GUARD_INTERVAL_1_4</constant></entry>
1062 <entry>Guard interval 1/4</entry>
1063 </row><row>
1064 <entry id="GUARD-INTERVAL-19-128"><constant>GUARD_INTERVAL_19_128</constant></entry>
1065 <entry>Guard interval 19/128</entry>
1066 </row><row>
1067 <entry id="GUARD-INTERVAL-19-256"><constant>GUARD_INTERVAL_19_256</constant></entry>
1068 <entry>Guard interval 19/256</entry>
1069 </row><row>
1070 <entry id="GUARD-INTERVAL-PN420"><constant>GUARD_INTERVAL_PN420</constant></entry>
1071 <entry>PN length 420 (1/4)</entry>
1072 </row><row>
1073 <entry id="GUARD-INTERVAL-PN595"><constant>GUARD_INTERVAL_PN595</constant></entry>
1074 <entry>PN length 595 (1/6)</entry>
1075 </row><row>
1076 <entry id="GUARD-INTERVAL-PN945"><constant>GUARD_INTERVAL_PN945</constant></entry>
1077 <entry>PN length 945 (1/9)</entry>
1078 </row>
1079 </tbody>
1080 </tgroup>
1081</table>
808 1082
809 <para>Notes:</para> 1083 <para>Notes:</para>
810 <para>1) If <constant>DTV_GUARD_INTERVAL</constant> is set the <constant>GUARD_INTERVAL_AUTO</constant> the hardware will 1084 <para>1) If <constant>DTV_GUARD_INTERVAL</constant> is set the <constant>GUARD_INTERVAL_AUTO</constant> the hardware will
@@ -812,26 +1086,64 @@ typedef enum fe_guard_interval {
812 in the missing parameters.</para> 1086 in the missing parameters.</para>
813 <para>2) Intervals 1/128, 19/128 and 19/256 are used only for DVB-T2 at present</para> 1087 <para>2) Intervals 1/128, 19/128 and 19/256 are used only for DVB-T2 at present</para>
814 <para>3) DTMB specifies PN420, PN595 and PN945.</para> 1088 <para>3) DTMB specifies PN420, PN595 and PN945.</para>
1089</section>
815 </section> 1090 </section>
816 <section id="DTV-TRANSMISSION-MODE"> 1091 <section id="DTV-TRANSMISSION-MODE">
817 <title><constant>DTV_TRANSMISSION_MODE</constant></title> 1092 <title><constant>DTV_TRANSMISSION_MODE</constant></title>
818 1093
819 <para>Specifies the number of carriers used by the standard</para> 1094 <para>Specifies the number of carriers used by the standard.
1095 This is used only on OFTM-based standards, e. g.
1096 DVB-T/T2, ISDB-T, DTMB</para>
1097
1098<section id="fe-transmit-mode-t">
1099<title>enum fe_transmit_mode: Number of carriers per channel</title>
1100
1101<table pgwide="1" frame="none" id="fe-transmit-mode">
1102 <title>enum fe_transmit_mode</title>
1103 <tgroup cols="2">
1104 &cs-def;
1105 <thead>
1106 <row>
1107 <entry>ID</entry>
1108 <entry>Description</entry>
1109 </row>
1110 </thead>
1111 <tbody valign="top">
1112 <row>
1113 <entry id="TRANSMISSION-MODE-AUTO"><constant>TRANSMISSION_MODE_AUTO</constant></entry>
1114 <entry>Autodetect transmission mode. The hardware will try to find
1115 the correct FFT-size (if capable) to fill in the missing
1116 parameters.</entry>
1117 </row><row>
1118 <entry id="TRANSMISSION-MODE-1K"><constant>TRANSMISSION_MODE_1K</constant></entry>
1119 <entry>Transmission mode 1K</entry>
1120 </row><row>
1121 <entry id="TRANSMISSION-MODE-2K"><constant>TRANSMISSION_MODE_2K</constant></entry>
1122 <entry>Transmission mode 2K</entry>
1123 </row><row>
1124 <entry id="TRANSMISSION-MODE-8K"><constant>TRANSMISSION_MODE_8K</constant></entry>
1125 <entry>Transmission mode 8K</entry>
1126 </row><row>
1127 <entry id="TRANSMISSION-MODE-4K"><constant>TRANSMISSION_MODE_4K</constant></entry>
1128 <entry>Transmission mode 4K</entry>
1129 </row><row>
1130 <entry id="TRANSMISSION-MODE-16K"><constant>TRANSMISSION_MODE_16K</constant></entry>
1131 <entry>Transmission mode 16K</entry>
1132 </row><row>
1133 <entry id="TRANSMISSION-MODE-32K"><constant>TRANSMISSION_MODE_32K</constant></entry>
1134 <entry>Transmission mode 32K</entry>
1135 </row><row>
1136 <entry id="TRANSMISSION-MODE-C1"><constant>TRANSMISSION_MODE_C1</constant></entry>
1137 <entry>Single Carrier (C=1) transmission mode (DTMB)</entry>
1138 </row><row>
1139 <entry id="TRANSMISSION-MODE-C3780"><constant>TRANSMISSION_MODE_C3780</constant></entry>
1140 <entry>Multi Carrier (C=3780) transmission mode (DTMB)</entry>
1141 </row>
1142 </tbody>
1143 </tgroup>
1144</table>
1145
820 1146
821 <para>Possible values are:</para>
822<programlisting>
823typedef enum fe_transmit_mode {
824 TRANSMISSION_MODE_2K,
825 TRANSMISSION_MODE_8K,
826 TRANSMISSION_MODE_AUTO,
827 TRANSMISSION_MODE_4K,
828 TRANSMISSION_MODE_1K,
829 TRANSMISSION_MODE_16K,
830 TRANSMISSION_MODE_32K,
831 TRANSMISSION_MODE_C1,
832 TRANSMISSION_MODE_C3780,
833} fe_transmit_mode_t;
834</programlisting>
835 <para>Notes:</para> 1147 <para>Notes:</para>
836 <para>1) ISDB-T supports three carrier/symbol-size: 8K, 4K, 2K. It is called 1148 <para>1) ISDB-T supports three carrier/symbol-size: 8K, 4K, 2K. It is called
837 'mode' in the standard: Mode 1 is 2K, mode 2 is 4K, mode 3 is 8K</para> 1149 'mode' in the standard: Mode 1 is 2K, mode 2 is 4K, mode 3 is 8K</para>
@@ -842,19 +1154,48 @@ typedef enum fe_transmit_mode {
842 <para>3) DVB-T specifies 2K and 8K as valid sizes.</para> 1154 <para>3) DVB-T specifies 2K and 8K as valid sizes.</para>
843 <para>4) DVB-T2 specifies 1K, 2K, 4K, 8K, 16K and 32K.</para> 1155 <para>4) DVB-T2 specifies 1K, 2K, 4K, 8K, 16K and 32K.</para>
844 <para>5) DTMB specifies C1 and C3780.</para> 1156 <para>5) DTMB specifies C1 and C3780.</para>
1157</section>
845 </section> 1158 </section>
846 <section id="DTV-HIERARCHY"> 1159 <section id="DTV-HIERARCHY">
847 <title><constant>DTV_HIERARCHY</constant></title> 1160 <title><constant>DTV_HIERARCHY</constant></title>
848 <para>Frontend hierarchy</para> 1161 <para>Frontend hierarchy</para>
849 <programlisting> 1162
850typedef enum fe_hierarchy { 1163
851 HIERARCHY_NONE, 1164<section id="fe-hierarchy-t">
852 HIERARCHY_1, 1165<title>Frontend hierarchy</title>
853 HIERARCHY_2, 1166
854 HIERARCHY_4, 1167<table pgwide="1" frame="none" id="fe-hierarchy">
855 HIERARCHY_AUTO 1168 <title>enum fe_hierarchy</title>
856 } fe_hierarchy_t; 1169 <tgroup cols="2">
857 </programlisting> 1170 &cs-def;
1171 <thead>
1172 <row>
1173 <entry>ID</entry>
1174 <entry>Description</entry>
1175 </row>
1176 </thead>
1177 <tbody valign="top">
1178 <row>
1179 <entry id="HIERARCHY-NONE"><constant>HIERARCHY_NONE</constant></entry>
1180 <entry>No hierarchy</entry>
1181 </row><row>
1182 <entry id="HIERARCHY-AUTO"><constant>HIERARCHY_AUTO</constant></entry>
1183 <entry>Autodetect hierarchy (if supported)</entry>
1184 </row><row>
1185 <entry id="HIERARCHY-1"><constant>HIERARCHY_1</constant></entry>
1186 <entry>Hierarchy 1</entry>
1187 </row><row>
1188 <entry id="HIERARCHY-2"><constant>HIERARCHY_2</constant></entry>
1189 <entry>Hierarchy 2</entry>
1190 </row><row>
1191 <entry id="HIERARCHY-4"><constant>HIERARCHY_4</constant></entry>
1192 <entry>Hierarchy 4</entry>
1193 </row>
1194 </tbody>
1195 </tgroup>
1196</table>
1197</section>
1198
858 </section> 1199 </section>
859 <section id="DTV-STREAM-ID"> 1200 <section id="DTV-STREAM-ID">
860 <title><constant>DTV_STREAM_ID</constant></title> 1201 <title><constant>DTV_STREAM_ID</constant></title>
@@ -891,15 +1232,37 @@ typedef enum fe_hierarchy {
891 </section> 1232 </section>
892 <section id="DTV-INTERLEAVING"> 1233 <section id="DTV-INTERLEAVING">
893 <title><constant>DTV_INTERLEAVING</constant></title> 1234 <title><constant>DTV_INTERLEAVING</constant></title>
894 <para id="fe-interleaving">Interleaving mode</para> 1235
895 <programlisting> 1236<para>Time interleaving to be used. Currently, used only on DTMB.</para>
896enum fe_interleaving { 1237
897 INTERLEAVING_NONE, 1238<table pgwide="1" frame="none" id="fe-interleaving">
898 INTERLEAVING_AUTO, 1239 <title>enum fe_interleaving</title>
899 INTERLEAVING_240, 1240 <tgroup cols="2">
900 INTERLEAVING_720, 1241 &cs-def;
901}; 1242 <thead>
902 </programlisting> 1243 <row>
1244 <entry>ID</entry>
1245 <entry>Description</entry>
1246 </row>
1247 </thead>
1248 <tbody valign="top">
1249 <row>
1250 <entry id="INTERLEAVING-NONE"><constant>INTERLEAVING_NONE</constant></entry>
1251 <entry>No interleaving.</entry>
1252 </row><row>
1253 <entry id="INTERLEAVING-AUTO"><constant>INTERLEAVING_AUTO</constant></entry>
1254 <entry>Auto-detect interleaving.</entry>
1255 </row><row>
1256 <entry id="INTERLEAVING-240"><constant>INTERLEAVING_240</constant></entry>
1257 <entry>Interleaving of 240 symbols.</entry>
1258 </row><row>
1259 <entry id="INTERLEAVING-720"><constant>INTERLEAVING_720</constant></entry>
1260 <entry>Interleaving of 720 symbols.</entry>
1261 </row>
1262 </tbody>
1263 </tgroup>
1264</table>
1265
903 </section> 1266 </section>
904 <section id="DTV-LNA"> 1267 <section id="DTV-LNA">
905 <title><constant>DTV_LNA</constant></title> 1268 <title><constant>DTV_LNA</constant></title>
@@ -921,7 +1284,7 @@ enum fe_interleaving {
921 <para>For most delivery systems, <constant>dtv_property.stat.len</constant> 1284 <para>For most delivery systems, <constant>dtv_property.stat.len</constant>
922 will be 1 if the stats is supported, and the properties will 1285 will be 1 if the stats is supported, and the properties will
923 return a single value for each parameter.</para> 1286 return a single value for each parameter.</para>
924 <para>It should be noticed, however, that new OFDM delivery systems 1287 <para>It should be noted, however, that new OFDM delivery systems
925 like ISDB can use different modulation types for each group of 1288 like ISDB can use different modulation types for each group of
926 carriers. On such standards, up to 3 groups of statistics can be 1289 carriers. On such standards, up to 3 groups of statistics can be
927 provided, and <constant>dtv_property.stat.len</constant> is updated 1290 provided, and <constant>dtv_property.stat.len</constant> is updated
@@ -940,10 +1303,10 @@ enum fe_interleaving {
940 and <constant>uvalue</constant> is for unsigned values (counters, relative scale)</para></listitem> 1303 and <constant>uvalue</constant> is for unsigned values (counters, relative scale)</para></listitem>
941 <listitem><para><constant>scale</constant> - Scale for the value. It can be:</para> 1304 <listitem><para><constant>scale</constant> - Scale for the value. It can be:</para>
942 <itemizedlist mark='bullet' id="fecap-scale-params"> 1305 <itemizedlist mark='bullet' id="fecap-scale-params">
943 <listitem><para><constant>FE_SCALE_NOT_AVAILABLE</constant> - The parameter is supported by the frontend, but it was not possible to collect it (could be a transitory or permanent condition)</para></listitem> 1306 <listitem id="FE-SCALE-NOT-AVAILABLE"><para><constant>FE_SCALE_NOT_AVAILABLE</constant> - The parameter is supported by the frontend, but it was not possible to collect it (could be a transitory or permanent condition)</para></listitem>
944 <listitem><para><constant>FE_SCALE_DECIBEL</constant> - parameter is a signed value, measured in 1/1000 dB</para></listitem> 1307 <listitem id="FE-SCALE-DECIBEL"><para><constant>FE_SCALE_DECIBEL</constant> - parameter is a signed value, measured in 1/1000 dB</para></listitem>
945 <listitem><para><constant>FE_SCALE_RELATIVE</constant> - parameter is a unsigned value, where 0 means 0% and 65535 means 100%.</para></listitem> 1308 <listitem id="FE-SCALE-RELATIVE"><para><constant>FE_SCALE_RELATIVE</constant> - parameter is a unsigned value, where 0 means 0% and 65535 means 100%.</para></listitem>
946 <listitem><para><constant>FE_SCALE_COUNTER</constant> - parameter is a unsigned value that counts the occurrence of an event, like bit error, block error, or lapsed time.</para></listitem> 1309 <listitem id="FE-SCALE-COUNTER"><para><constant>FE_SCALE_COUNTER</constant> - parameter is a unsigned value that counts the occurrence of an event, like bit error, block error, or lapsed time.</para></listitem>
947 </itemizedlist> 1310 </itemizedlist>
948 </listitem> 1311 </listitem>
949 </itemizedlist> 1312 </itemizedlist>
@@ -953,7 +1316,7 @@ enum fe_interleaving {
953 <para>Possible scales for this metric are:</para> 1316 <para>Possible scales for this metric are:</para>
954 <itemizedlist mark='bullet'> 1317 <itemizedlist mark='bullet'>
955 <listitem><para><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</para></listitem> 1318 <listitem><para><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</para></listitem>
956 <listitem><para><constant>FE_SCALE_DECIBEL</constant> - signal strength is in 0.0001 dBm units, power measured in miliwatts. This value is generally negative.</para></listitem> 1319 <listitem><para><constant>FE_SCALE_DECIBEL</constant> - signal strength is in 0.001 dBm units, power measured in miliwatts. This value is generally negative.</para></listitem>
957 <listitem><para><constant>FE_SCALE_RELATIVE</constant> - The frontend provides a 0% to 100% measurement for power (actually, 0 to 65535).</para></listitem> 1320 <listitem><para><constant>FE_SCALE_RELATIVE</constant> - The frontend provides a 0% to 100% measurement for power (actually, 0 to 65535).</para></listitem>
958 </itemizedlist> 1321 </itemizedlist>
959 </section> 1322 </section>
@@ -963,7 +1326,7 @@ enum fe_interleaving {
963 <para>Possible scales for this metric are:</para> 1326 <para>Possible scales for this metric are:</para>
964 <itemizedlist mark='bullet'> 1327 <itemizedlist mark='bullet'>
965 <listitem><para><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</para></listitem> 1328 <listitem><para><constant>FE_SCALE_NOT_AVAILABLE</constant> - it failed to measure it, or the measurement was not complete yet.</para></listitem>
966 <listitem><para><constant>FE_SCALE_DECIBEL</constant> - Signal/Noise ratio is in 0.0001 dB units.</para></listitem> 1329 <listitem><para><constant>FE_SCALE_DECIBEL</constant> - Signal/Noise ratio is in 0.001 dB units.</para></listitem>
967 <listitem><para><constant>FE_SCALE_RELATIVE</constant> - The frontend provides a 0% to 100% measurement for Signal/Noise (actually, 0 to 65535).</para></listitem> 1330 <listitem><para><constant>FE_SCALE_RELATIVE</constant> - The frontend provides a 0% to 100% measurement for Signal/Noise (actually, 0 to 65535).</para></listitem>
968 </itemizedlist> 1331 </itemizedlist>
969 </section> 1332 </section>
@@ -985,7 +1348,7 @@ enum fe_interleaving {
985 <title><constant>DTV_STAT_PRE_TOTAL_BIT_COUNT</constant></title> 1348 <title><constant>DTV_STAT_PRE_TOTAL_BIT_COUNT</constant></title>
986 <para>Measures the amount of bits received before the inner code block, during the same period as 1349 <para>Measures the amount of bits received before the inner code block, during the same period as
987 <link linkend="DTV-STAT-PRE-ERROR-BIT-COUNT"><constant>DTV_STAT_PRE_ERROR_BIT_COUNT</constant></link> measurement was taken.</para> 1350 <link linkend="DTV-STAT-PRE-ERROR-BIT-COUNT"><constant>DTV_STAT_PRE_ERROR_BIT_COUNT</constant></link> measurement was taken.</para>
988 <para>It should be noticed that this measurement can be smaller than the total amount of bits on the transport stream, 1351 <para>It should be noted that this measurement can be smaller than the total amount of bits on the transport stream,
989 as the frontend may need to manually restart the measurement, losing some data between each measurement interval.</para> 1352 as the frontend may need to manually restart the measurement, losing some data between each measurement interval.</para>
990 <para>This measurement is monotonically increased, as the frontend gets more bit count measurements. 1353 <para>This measurement is monotonically increased, as the frontend gets more bit count measurements.
991 The frontend may reset it when a channel/transponder is tuned.</para> 1354 The frontend may reset it when a channel/transponder is tuned.</para>
@@ -1014,7 +1377,7 @@ enum fe_interleaving {
1014 <title><constant>DTV_STAT_POST_TOTAL_BIT_COUNT</constant></title> 1377 <title><constant>DTV_STAT_POST_TOTAL_BIT_COUNT</constant></title>
1015 <para>Measures the amount of bits received after the inner coding, during the same period as 1378 <para>Measures the amount of bits received after the inner coding, during the same period as
1016 <link linkend="DTV-STAT-POST-ERROR-BIT-COUNT"><constant>DTV_STAT_POST_ERROR_BIT_COUNT</constant></link> measurement was taken.</para> 1379 <link linkend="DTV-STAT-POST-ERROR-BIT-COUNT"><constant>DTV_STAT_POST_ERROR_BIT_COUNT</constant></link> measurement was taken.</para>
1017 <para>It should be noticed that this measurement can be smaller than the total amount of bits on the transport stream, 1380 <para>It should be noted that this measurement can be smaller than the total amount of bits on the transport stream,
1018 as the frontend may need to manually restart the measurement, losing some data between each measurement interval.</para> 1381 as the frontend may need to manually restart the measurement, losing some data between each measurement interval.</para>
1019 <para>This measurement is monotonically increased, as the frontend gets more bit count measurements. 1382 <para>This measurement is monotonically increased, as the frontend gets more bit count measurements.
1020 The frontend may reset it when a channel/transponder is tuned.</para> 1383 The frontend may reset it when a channel/transponder is tuned.</para>
@@ -1255,8 +1618,8 @@ enum fe_interleaving {
1255 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para> 1618 <para>In addition, the <link linkend="frontend-stat-properties">DTV QoS statistics</link> are also valid.</para>
1256 </section> 1619 </section>
1257 </section> 1620 </section>
1258 <section id="frontend-property-satellital-systems"> 1621 <section id="frontend-property-satellite-systems">
1259 <title>Properties used on satellital delivery systems</title> 1622 <title>Properties used on satellite delivery systems</title>
1260 <section id="dvbs-params"> 1623 <section id="dvbs-params">
1261 <title>DVB-S delivery system</title> 1624 <title>DVB-S delivery system</title>
1262 <para>The following parameters are valid for DVB-S:</para> 1625 <para>The following parameters are valid for DVB-S:</para>
diff --git a/Documentation/DocBook/media/dvb/examples.xml b/Documentation/DocBook/media/dvb/examples.xml
index f037e568eb6e..c9f68c7183cc 100644
--- a/Documentation/DocBook/media/dvb/examples.xml
+++ b/Documentation/DocBook/media/dvb/examples.xml
@@ -1,8 +1,10 @@
1<title>Examples</title> 1<title>Examples</title>
2<para>In this section we would like to present some examples for using the DVB API. 2<para>In this section we would like to present some examples for using the DVB API.
3</para> 3</para>
4<para>Maintainer note: This section is out of date. Please refer to the sample programs packaged 4<para>NOTE: This section is out of date, and the code below won't even
5with the driver distribution from <ulink url="http://linuxtv.org/hg/dvb-apps" />. 5 compile. Please refer to the
6 <ulink url="http://linuxtv.org/docs/libdvbv5/index.html">libdvbv5</ulink>
7 for updated/recommended examples.
6</para> 8</para>
7 9
8<section id="tuning"> 10<section id="tuning">
diff --git a/Documentation/DocBook/media/dvb/fe-diseqc-recv-slave-reply.xml b/Documentation/DocBook/media/dvb/fe-diseqc-recv-slave-reply.xml
new file mode 100644
index 000000000000..4595dbfff208
--- /dev/null
+++ b/Documentation/DocBook/media/dvb/fe-diseqc-recv-slave-reply.xml
@@ -0,0 +1,78 @@
1<refentry id="FE_DISEQC_RECV_SLAVE_REPLY">
2 <refmeta>
3 <refentrytitle>ioctl FE_DISEQC_RECV_SLAVE_REPLY</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>FE_DISEQC_RECV_SLAVE_REPLY</refname>
9 <refpurpose>Receives reply from a DiSEqC 2.0 command</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct dvb_diseqc_slave_reply *<parameter>argp</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24 <title>Arguments</title>
25 <variablelist>
26 <varlistentry>
27 <term><parameter>fd</parameter></term>
28 <listitem>
29 <para>&fe_fd;</para>
30 </listitem>
31 </varlistentry>
32 <varlistentry>
33 <term><parameter>request</parameter></term>
34 <listitem>
35 <para>FE_DISEQC_RECV_SLAVE_REPLY</para>
36 </listitem>
37 </varlistentry>
38 <varlistentry>
39 <term><parameter>argp</parameter></term>
40 <listitem>
41 <para>pointer to &dvb-diseqc-slave-reply;</para>
42 </listitem>
43 </varlistentry>
44 </variablelist>
45 </refsect1>
46
47 <refsect1>
48 <title>Description</title>
49
50 <para>Receives reply from a DiSEqC 2.0 command.</para>
51&return-value-dvb;
52
53<table pgwide="1" frame="none" id="dvb-diseqc-slave-reply">
54 <title>struct <structname>dvb_diseqc_slave_reply</structname></title>
55 <tgroup cols="3">
56 &cs-str;
57 <tbody valign="top">
58 <row>
59 <entry>uint8_t</entry>
60 <entry>msg[4]</entry>
61 <entry>DiSEqC message (framing, data[3])</entry>
62 </row><row>
63 <entry>uint8_t</entry>
64 <entry>msg_len</entry>
65 <entry>Length of the DiSEqC message. Valid values are 0 to 4,
66 where 0 means no msg</entry>
67 </row><row>
68 <entry>int</entry>
69 <entry>timeout</entry>
70 <entry>Return from ioctl after timeout ms with errorcode when no
71 message was received</entry>
72 </row>
73 </tbody>
74 </tgroup>
75</table>
76
77</refsect1>
78</refentry>
diff --git a/Documentation/DocBook/media/dvb/fe-diseqc-reset-overload.xml b/Documentation/DocBook/media/dvb/fe-diseqc-reset-overload.xml
new file mode 100644
index 000000000000..c104df77ecd0
--- /dev/null
+++ b/Documentation/DocBook/media/dvb/fe-diseqc-reset-overload.xml
@@ -0,0 +1,51 @@
1<refentry id="FE_DISEQC_RESET_OVERLOAD">
2 <refmeta>
3 <refentrytitle>ioctl FE_DISEQC_RESET_OVERLOAD</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>FE_DISEQC_RESET_OVERLOAD</refname>
9 <refpurpose>Restores the power to the antenna subsystem, if it was powered
10 off due to power overload.</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>NULL</paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 </refsynopsisdiv>
23
24 <refsect1>
25 <title>Arguments</title>
26 <variablelist>
27 <varlistentry>
28 <term><parameter>fd</parameter></term>
29 <listitem>
30 <para>&fe_fd;</para>
31 </listitem>
32 </varlistentry>
33 <varlistentry>
34 <term><parameter>request</parameter></term>
35 <listitem>
36 <para>FE_DISEQC_RESET_OVERLOAD</para>
37 </listitem>
38 </varlistentry>
39 </variablelist>
40 </refsect1>
41
42 <refsect1>
43 <title>Description</title>
44
45 <para>If the bus has been automatically powered off due to power overload, this ioctl
46 call restores the power to the bus. The call requires read/write access to the
47 device. This call has no effect if the device is manually powered off. Not all
48 DVB adapters support this ioctl.</para>
49&return-value-dvb;
50</refsect1>
51</refentry>
diff --git a/Documentation/DocBook/media/dvb/fe-diseqc-send-burst.xml b/Documentation/DocBook/media/dvb/fe-diseqc-send-burst.xml
new file mode 100644
index 000000000000..9f6a68f32de3
--- /dev/null
+++ b/Documentation/DocBook/media/dvb/fe-diseqc-send-burst.xml
@@ -0,0 +1,89 @@
1<refentry id="FE_DISEQC_SEND_BURST">
2 <refmeta>
3 <refentrytitle>ioctl FE_DISEQC_SEND_BURST</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>FE_DISEQC_SEND_BURST</refname>
9 <refpurpose>Sends a 22KHz tone burst for 2x1 mini DiSEqC satellite selection.</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>enum fe_sec_mini_cmd *<parameter>tone</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24 <title>Arguments</title>
25 <variablelist>
26 <varlistentry>
27 <term><parameter>fd</parameter></term>
28 <listitem>
29 <para>&fe_fd;</para>
30 </listitem>
31 </varlistentry>
32 <varlistentry>
33 <term><parameter>request</parameter></term>
34 <listitem>
35 <para>FE_DISEQC_SEND_BURST</para>
36 </listitem>
37 </varlistentry>
38 <varlistentry>
39 <term><parameter>tone</parameter></term>
40 <listitem>
41 <para>pointer to &fe-sec-mini-cmd;</para>
42 </listitem>
43 </varlistentry>
44 </variablelist>
45 </refsect1>
46
47 <refsect1>
48 <title>Description</title>
49
50<para>This ioctl is used to set the generation of a 22kHz tone burst for mini
51 DiSEqC satellite
52 selection for 2x1 switches.
53 This call requires read/write permissions.</para>
54<para>It provides support for what's specified at
55 <ulink url="http://www.eutelsat.com/files/contributed/satellites/pdf/Diseqc/associated%20docs/simple_tone_burst_detec.pdf">Digital Satellite Equipment Control
56 (DiSEqC) - Simple "ToneBurst" Detection Circuit specification.</ulink>
57 </para>
58&return-value-dvb;
59</refsect1>
60
61<refsect1 id="fe-sec-mini-cmd-t">
62<title>enum fe_sec_mini_cmd</title>
63
64<table pgwide="1" frame="none" id="fe-sec-mini-cmd">
65 <title>enum fe_sec_mini_cmd</title>
66 <tgroup cols="2">
67 &cs-def;
68 <thead>
69 <row>
70 <entry>ID</entry>
71 <entry>Description</entry>
72 </row>
73 </thead>
74 <tbody valign="top">
75 <row>
76 <entry align="char" id="SEC-MINI-A"><constant>SEC_MINI_A</constant></entry>
77 <entry align="char">Sends a mini-DiSEqC 22kHz '0' Tone Burst to
78 select satellite-A</entry>
79 </row><row>
80 <entry align="char" id="SEC-MINI-B"><constant>SEC_MINI_B</constant></entry>
81 <entry align="char">Sends a mini-DiSEqC 22kHz '1' Data Burst to
82 select satellite-B</entry>
83 </row>
84 </tbody>
85 </tgroup>
86</table>
87</refsect1>
88
89</refentry>
diff --git a/Documentation/DocBook/media/dvb/fe-diseqc-send-master-cmd.xml b/Documentation/DocBook/media/dvb/fe-diseqc-send-master-cmd.xml
new file mode 100644
index 000000000000..38cf313e121b
--- /dev/null
+++ b/Documentation/DocBook/media/dvb/fe-diseqc-send-master-cmd.xml
@@ -0,0 +1,72 @@
1<refentry id="FE_DISEQC_SEND_MASTER_CMD">
2 <refmeta>
3 <refentrytitle>ioctl FE_DISEQC_SEND_MASTER_CMD</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>FE_DISEQC_SEND_MASTER_CMD</refname>
9 <refpurpose>Sends a DiSEqC command</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>struct dvb_diseqc_master_cmd *<parameter>argp</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24 <title>Arguments</title>
25 <variablelist>
26 <varlistentry>
27 <term><parameter>fd</parameter></term>
28 <listitem>
29 <para>&fe_fd;</para>
30 </listitem>
31 </varlistentry>
32 <varlistentry>
33 <term><parameter>request</parameter></term>
34 <listitem>
35 <para>FE_DISEQC_SEND_MASTER_CMD</para>
36 </listitem>
37 </varlistentry>
38 <varlistentry>
39 <term><parameter>argp</parameter></term>
40 <listitem>
41 <para>pointer to &dvb-diseqc-master-cmd;</para>
42 </listitem>
43 </varlistentry>
44 </variablelist>
45 </refsect1>
46
47 <refsect1>
48 <title>Description</title>
49
50 <para>Sends a DiSEqC command to the antenna subsystem.</para>
51&return-value-dvb;
52
53<table pgwide="1" frame="none" id="dvb-diseqc-master-cmd">
54 <title>struct <structname>dvb_diseqc_master_cmd</structname></title>
55 <tgroup cols="3">
56 &cs-str;
57 <tbody valign="top">
58 <row>
59 <entry>uint8_t</entry>
60 <entry>msg[6]</entry>
61 <entry>DiSEqC message (framing, address, command, data[3])</entry>
62 </row><row>
63 <entry>uint8_t</entry>
64 <entry>msg_len</entry>
65 <entry>Length of the DiSEqC message. Valid values are 3 to 6</entry>
66 </row>
67 </tbody>
68 </tgroup>
69</table>
70
71</refsect1>
72</refentry>
diff --git a/Documentation/DocBook/media/dvb/fe-enable-high-lnb-voltage.xml b/Documentation/DocBook/media/dvb/fe-enable-high-lnb-voltage.xml
new file mode 100644
index 000000000000..c11890b184ad
--- /dev/null
+++ b/Documentation/DocBook/media/dvb/fe-enable-high-lnb-voltage.xml
@@ -0,0 +1,61 @@
1<refentry id="FE_ENABLE_HIGH_LNB_VOLTAGE">
2 <refmeta>
3 <refentrytitle>ioctl FE_ENABLE_HIGH_LNB_VOLTAGE</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>FE_ENABLE_HIGH_LNB_VOLTAGE</refname>
9 <refpurpose>Select output DC level between normal LNBf voltages or higher
10 LNBf voltages.</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>unsigned int <parameter>high</parameter></paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 </refsynopsisdiv>
23
24 <refsect1>
25 <title>Arguments</title>
26 <variablelist>
27 <varlistentry>
28 <term><parameter>fd</parameter></term>
29 <listitem>
30 <para>&fe_fd;</para>
31 </listitem>
32 </varlistentry>
33 <varlistentry>
34 <term><parameter>request</parameter></term>
35 <listitem>
36 <para>FE_ENABLE_HIGH_LNB_VOLTAGE</para>
37 </listitem>
38 </varlistentry>
39 <varlistentry>
40 <term><parameter>high</parameter></term>
41 <listitem>
42 <para>Valid flags:</para>
43 <itemizedlist>
44 <listitem><para>0 - normal 13V and 18V.</para></listitem>
45 <listitem><para>&gt;0 - enables slightly higher voltages instead of
46 13/18V, in order to compensate for long antenna cables.</para></listitem>
47 </itemizedlist>
48 </listitem>
49 </varlistentry>
50 </variablelist>
51 </refsect1>
52
53 <refsect1>
54 <title>Description</title>
55
56 <para>Select output DC level between normal LNBf voltages or higher
57 LNBf voltages between 0 (normal) or a value grater than 0 for higher
58 voltages.</para>
59&return-value-dvb;
60</refsect1>
61</refentry>
diff --git a/Documentation/DocBook/media/dvb/fe-get-info.xml b/Documentation/DocBook/media/dvb/fe-get-info.xml
new file mode 100644
index 000000000000..ed0eeb29dd65
--- /dev/null
+++ b/Documentation/DocBook/media/dvb/fe-get-info.xml
@@ -0,0 +1,266 @@
1<refentry id="FE_GET_INFO">
2 <refmeta>
3 <refentrytitle>ioctl FE_GET_INFO</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>FE_GET_INFO</refname>
9 <refpurpose>Query DVB frontend capabilities and returns information about
10 the front-end. This call only requires read-only access to the device</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>struct dvb_frontend_info *<parameter>argp</parameter></paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 </refsynopsisdiv>
23
24 <refsect1>
25 <title>Arguments</title>
26 <variablelist>
27 <varlistentry>
28 <term><parameter>fd</parameter></term>
29 <listitem>
30 <para>&fe_fd;</para>
31 </listitem>
32 </varlistentry>
33 <varlistentry>
34 <term><parameter>request</parameter></term>
35 <listitem>
36 <para>FE_GET_INFO</para>
37 </listitem>
38 </varlistentry>
39 <varlistentry>
40 <term><parameter>argp</parameter></term>
41 <listitem>
42 <para>pointer to struct &dvb-frontend-info;</para>
43 </listitem>
44 </varlistentry>
45 </variablelist>
46 </refsect1>
47
48 <refsect1>
49 <title>Description</title>
50
51 <para>All DVB frontend devices support the
52<constant>FE_GET_INFO</constant> ioctl. It is used to identify
53kernel devices compatible with this specification and to obtain
54information about driver and hardware capabilities. The ioctl takes a
55pointer to dvb_frontend_info which is filled by the driver. When the
56driver is not compatible with this specification the ioctl returns an error.
57</para>
58&return-value-dvb;
59
60 <table pgwide="1" frame="none" id="dvb-frontend-info">
61 <title>struct <structname>dvb_frontend_info</structname></title>
62 <tgroup cols="3">
63 &cs-str;
64 <tbody valign="top">
65 <row>
66 <entry>char</entry>
67 <entry>name[128]</entry>
68 <entry>Name of the frontend</entry>
69 </row><row>
70 <entry>fe_type_t</entry>
71 <entry>type</entry>
72 <entry><emphasis role="bold">DEPRECATED</emphasis>. DVBv3 type. Should not be used on modern programs, as a
73 frontend may have more than one type. So, the DVBv5 API should
74 be used instead to enumerate and select the frontend type.</entry>
75 </row><row>
76 <entry>uint32_t</entry>
77 <entry>frequency_min</entry>
78 <entry>Minimal frequency supported by the frontend</entry>
79 </row><row>
80 <entry>uint32_t</entry>
81 <entry>frequency_max</entry>
82 <entry>Maximal frequency supported by the frontend</entry>
83 </row><row>
84 <entry>uint32_t</entry>
85 <entry>frequency_stepsize</entry>
86 <entry>Frequency step - all frequencies are multiple of this value</entry>
87 </row><row>
88 <entry>uint32_t</entry>
89 <entry>frequency_tolerance</entry>
90 <entry>Tolerance of the frequency</entry>
91 </row><row>
92 <entry>uint32_t</entry>
93 <entry>symbol_rate_min</entry>
94 <entry>Minimal symbol rate (for Cable/Satellite systems), in bauds</entry>
95 </row><row>
96 <entry>uint32_t</entry>
97 <entry>symbol_rate_max</entry>
98 <entry>Maximal symbol rate (for Cable/Satellite systems), in bauds</entry>
99 </row><row>
100 <entry>uint32_t</entry>
101 <entry>symbol_rate_tolerance</entry>
102 <entry>Maximal symbol rate tolerance, in ppm</entry>
103 </row><row>
104 <entry>uint32_t</entry>
105 <entry>notifier_delay</entry>
106 <entry><emphasis role="bold">DEPRECATED</emphasis>. Not used by any driver.</entry>
107 </row><row>
108 <entry>&fe-caps;</entry>
109 <entry>caps</entry>
110 <entry>Capabilities supported by the frontend</entry>
111 </row>
112 </tbody>
113 </tgroup>
114 </table>
115
116 <para>NOTE: The frequencies are specified in Hz for Terrestrial and Cable
117 systems. They're specified in kHz for Satellite systems</para>
118 </refsect1>
119
120<refsect1 id="fe-caps-t">
121<title>frontend capabilities</title>
122
123<para>Capabilities describe what a frontend can do. Some capabilities are
124 supported only on some specific frontend types.</para>
125
126<table pgwide="1" frame="none" id="fe-caps">
127 <title>enum fe_caps</title>
128 <tgroup cols="2">
129 &cs-def;
130 <thead>
131 <row>
132 <entry>ID</entry>
133 <entry>Description</entry>
134 </row>
135 </thead>
136 <tbody valign="top">
137 <row>
138 <entry id="FE-IS-STUPID"><constant>FE_IS_STUPID</constant></entry>
139 <entry>There's something wrong at the frontend, and it can't
140 report its capabilities</entry>
141 </row>
142 <row>
143 <entry id="FE-CAN-INVERSION-AUTO"><constant>FE_CAN_INVERSION_AUTO</constant></entry>
144 <entry>The frontend is capable of auto-detecting inversion</entry>
145 </row>
146 <row>
147 <entry id="FE-CAN-FEC-1-2"><constant>FE_CAN_FEC_1_2</constant></entry>
148 <entry>The frontend supports FEC 1/2</entry>
149 </row>
150 <row>
151 <entry id="FE-CAN-FEC-2-3"><constant>FE_CAN_FEC_2_3</constant></entry>
152 <entry>The frontend supports FEC 2/3</entry>
153 </row>
154 <row>
155 <entry id="FE-CAN-FEC-3-4"><constant>FE_CAN_FEC_3_4</constant></entry>
156 <entry>The frontend supports FEC 3/4</entry>
157 </row>
158 <row>
159 <entry id="FE-CAN-FEC-4-5"><constant>FE_CAN_FEC_4_5</constant></entry>
160 <entry>The frontend supports FEC 4/5</entry>
161 </row>
162 <row>
163 <entry id="FE-CAN-FEC-5-6"><constant>FE_CAN_FEC_5_6</constant></entry>
164 <entry>The frontend supports FEC 5/6</entry>
165 </row>
166 <row>
167 <entry id="FE-CAN-FEC-6-7"><constant>FE_CAN_FEC_6_7</constant></entry>
168 <entry>The frontend supports FEC 6/7</entry>
169 </row>
170 <row>
171 <entry id="FE-CAN-FEC-7-8"><constant>FE_CAN_FEC_7_8</constant></entry>
172 <entry>The frontend supports FEC 7/8</entry>
173 </row>
174 <row>
175 <entry id="FE-CAN-FEC-8-9"><constant>FE_CAN_FEC_8_9</constant></entry>
176 <entry>The frontend supports FEC 8/9</entry>
177 </row>
178 <row>
179 <entry id="FE-CAN-FEC-AUTO"><constant>FE_CAN_FEC_AUTO</constant></entry>
180 <entry>The frontend can autodetect FEC.</entry>
181 </row>
182 <row>
183 <entry id="FE-CAN-QPSK"><constant>FE_CAN_QPSK</constant></entry>
184 <entry>The frontend supports QPSK modulation</entry>
185 </row>
186 <row>
187 <entry id="FE-CAN-QAM-16"><constant>FE_CAN_QAM_16</constant></entry>
188 <entry>The frontend supports 16-QAM modulation</entry>
189 </row>
190 <row>
191 <entry id="FE-CAN-QAM-32"><constant>FE_CAN_QAM_32</constant></entry>
192 <entry>The frontend supports 32-QAM modulation</entry>
193 </row>
194 <row>
195 <entry id="FE-CAN-QAM-64"><constant>FE_CAN_QAM_64</constant></entry>
196 <entry>The frontend supports 64-QAM modulation</entry>
197 </row>
198 <row>
199 <entry id="FE-CAN-QAM-128"><constant>FE_CAN_QAM_128</constant></entry>
200 <entry>The frontend supports 128-QAM modulation</entry>
201 </row>
202 <row>
203 <entry id="FE-CAN-QAM-256"><constant>FE_CAN_QAM_256</constant></entry>
204 <entry>The frontend supports 256-QAM modulation</entry>
205 </row>
206 <row>
207 <entry id="FE-CAN-QAM-AUTO"><constant>FE_CAN_QAM_AUTO</constant></entry>
208 <entry>The frontend can autodetect modulation</entry>
209 </row>
210 <row>
211 <entry id="FE-CAN-TRANSMISSION-MODE-AUTO"><constant>FE_CAN_TRANSMISSION_MODE_AUTO</constant></entry>
212 <entry>The frontend can autodetect the transmission mode</entry>
213 </row>
214 <row>
215 <entry id="FE-CAN-BANDWIDTH-AUTO"><constant>FE_CAN_BANDWIDTH_AUTO</constant></entry>
216 <entry>The frontend can autodetect the bandwidth</entry>
217 </row>
218 <row>
219 <entry id="FE-CAN-GUARD-INTERVAL-AUTO"><constant>FE_CAN_GUARD_INTERVAL_AUTO</constant></entry>
220 <entry>The frontend can autodetect the guard interval</entry>
221 </row>
222 <row>
223 <entry id="FE-CAN-HIERARCHY-AUTO"><constant>FE_CAN_HIERARCHY_AUTO</constant></entry>
224 <entry>The frontend can autodetect hierarch</entry>
225 </row>
226 <row>
227 <entry id="FE-CAN-8VSB"><constant>FE_CAN_8VSB</constant></entry>
228 <entry>The frontend supports 8-VSB modulation</entry>
229 </row>
230 <row>
231 <entry id="FE-CAN-16VSB"><constant>FE_CAN_16VSB</constant></entry>
232 <entry>The frontend supports 16-VSB modulation</entry>
233 </row>
234 <row>
235 <entry id="FE-HAS-EXTENDED-CAPS"><constant>FE_HAS_EXTENDED_CAPS</constant></entry>
236 <entry>Currently, unused</entry>
237 </row>
238 <row>
239 <entry id="FE-CAN-MULTISTREAM"><constant>FE_CAN_MULTISTREAM</constant></entry>
240 <entry>The frontend supports multistream filtering</entry>
241 </row>
242 <row>
243 <entry id="FE-CAN-TURBO-FEC"><constant>FE_CAN_TURBO_FEC</constant></entry>
244 <entry>The frontend supports turbo FEC modulation</entry>
245 </row>
246 <row>
247 <entry id="FE-CAN-2G-MODULATION"><constant>FE_CAN_2G_MODULATION</constant></entry>
248 <entry>The frontend supports "2nd generation modulation" (DVB-S2/T2)></entry>
249 </row>
250 <row>
251 <entry id="FE-NEEDS-BENDING"><constant>FE_NEEDS_BENDING</constant></entry>
252 <entry>Not supported anymore, don't use it</entry>
253 </row>
254 <row>
255 <entry id="FE-CAN-RECOVER"><constant>FE_CAN_RECOVER</constant></entry>
256 <entry>The frontend can recover from a cable unplug automatically</entry>
257 </row>
258 <row>
259 <entry id="FE-CAN-MUTE-TS"><constant>FE_CAN_MUTE_TS</constant></entry>
260 <entry>The frontend can stop spurious TS data output</entry>
261 </row>
262 </tbody>
263 </tgroup>
264</table>
265</refsect1>
266</refentry>
diff --git a/Documentation/DocBook/media/dvb/fe-get-property.xml b/Documentation/DocBook/media/dvb/fe-get-property.xml
new file mode 100644
index 000000000000..53a170ed3bd1
--- /dev/null
+++ b/Documentation/DocBook/media/dvb/fe-get-property.xml
@@ -0,0 +1,81 @@
1<refentry id="FE_GET_PROPERTY">
2 <refmeta>
3 <refentrytitle>ioctl FE_SET_PROPERTY, FE_GET_PROPERTY</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>FE_SET_PROPERTY</refname>
9 <refname>FE_GET_PROPERTY</refname>
10 <refpurpose>FE_SET_PROPERTY sets one or more frontend properties.
11 FE_GET_PROPERTY returns one or more frontend properties.</refpurpose>
12 </refnamediv>
13
14 <refsynopsisdiv>
15 <funcsynopsis>
16 <funcprototype>
17 <funcdef>int <function>ioctl</function></funcdef>
18 <paramdef>int <parameter>fd</parameter></paramdef>
19 <paramdef>int <parameter>request</parameter></paramdef>
20 <paramdef>struct dtv_properties *<parameter>argp</parameter></paramdef>
21 </funcprototype>
22 </funcsynopsis>
23 </refsynopsisdiv>
24
25 <refsect1>
26 <title>Arguments</title>
27 <variablelist>
28 <varlistentry>
29 <term><parameter>fd</parameter></term>
30 <listitem>
31 <para>&fe_fd;</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term><parameter>request</parameter></term>
36 <listitem>
37 <para>FE_SET_PROPERTY, FE_GET_PROPERTY</para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term><parameter>argp</parameter></term>
42 <listitem>
43 <para>pointer to &dtv-properties;</para>
44 </listitem>
45 </varlistentry>
46 </variablelist>
47 </refsect1>
48
49 <refsect1>
50 <title>Description</title>
51
52 <para>All DVB frontend devices support the
53<constant>FE_SET_PROPERTY</constant> and <constant>FE_GET_PROPERTY</constant>
54ioctls. The supported properties and statistics depends on the delivery system
55and on the device:</para>
56<itemizedlist>
57<listitem>
58 <para><constant>FE_SET_PROPERTY:</constant></para>
59<itemizedlist>
60<listitem><para>This ioctl is used to set one or more
61 frontend properties.</para></listitem>
62<listitem><para>This is the basic command to request the frontend to tune into some
63 frequency and to start decoding the digital TV signal.</para></listitem>
64<listitem><para>This call requires read/write access to the device.</para></listitem>
65<listitem><para>At return, the values are updated to reflect the
66 actual parameters used.</para></listitem>
67</itemizedlist>
68</listitem>
69<listitem>
70 <para><constant>FE_GET_PROPERTY:</constant></para>
71<itemizedlist>
72<listitem><para>This ioctl is used to get properties and
73statistics from the frontend.</para></listitem>
74<listitem><para>No properties are changed, and statistics aren't reset.</para></listitem>
75<listitem><para>This call only requires read-only access to the device.</para></listitem>
76</itemizedlist>
77</listitem>
78</itemizedlist>
79&return-value-dvb;
80</refsect1>
81</refentry>
diff --git a/Documentation/DocBook/media/dvb/fe-read-status.xml b/Documentation/DocBook/media/dvb/fe-read-status.xml
new file mode 100644
index 000000000000..bc0dc2a55f19
--- /dev/null
+++ b/Documentation/DocBook/media/dvb/fe-read-status.xml
@@ -0,0 +1,107 @@
1<refentry id="FE_READ_STATUS">
2 <refmeta>
3 <refentrytitle>ioctl FE_READ_STATUS</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>FE_READ_STATUS</refname>
9 <refpurpose>Returns status information about the front-end. This call only
10 requires read-only access to the device</refpurpose>
11 </refnamediv>
12
13 <refsynopsisdiv>
14 <funcsynopsis>
15 <funcprototype>
16 <funcdef>int <function>ioctl</function></funcdef>
17 <paramdef>int <parameter>fd</parameter></paramdef>
18 <paramdef>int <parameter>request</parameter></paramdef>
19 <paramdef>unsigned int *<parameter>status</parameter></paramdef>
20 </funcprototype>
21 </funcsynopsis>
22 </refsynopsisdiv>
23
24 <refsect1>
25 <title>Arguments</title>
26 <variablelist>
27 <varlistentry>
28 <term><parameter>fd</parameter></term>
29 <listitem>
30 <para>&fe_fd;</para>
31 </listitem>
32 </varlistentry>
33 <varlistentry>
34 <term><parameter>request</parameter></term>
35 <listitem>
36 <para>FE_READ_STATUS</para>
37 </listitem>
38 </varlistentry>
39 <varlistentry>
40 <term><parameter>status</parameter></term>
41 <listitem>
42 <para>pointer to a bitmask integer filled with the values defined by
43 &fe-status;.</para>
44 </listitem>
45 </varlistentry>
46 </variablelist>
47 </refsect1>
48
49 <refsect1>
50 <title>Description</title>
51
52 <para>All DVB frontend devices support the
53<constant>FE_READ_STATUS</constant> ioctl. It is used to check about the
54locking status of the frontend after being tuned. The ioctl takes a
55pointer to an integer where the status will be written.
56</para>
57<para>NOTE: the size of status is actually sizeof(enum fe_status), with varies
58 according with the architecture. This needs to be fixed in the future.</para>
59&return-value-dvb;
60</refsect1>
61
62<refsect1 id="fe-status-t">
63<title>int fe_status</title>
64
65<para>The fe_status parameter is used to indicate the current state
66 and/or state changes of the frontend hardware. It is produced using
67 the &fe-status; values on a bitmask</para>
68
69<table pgwide="1" frame="none" id="fe-status">
70 <title>enum fe_status</title>
71 <tgroup cols="2">
72 &cs-def;
73 <thead>
74 <row>
75 <entry>ID</entry>
76 <entry>Description</entry>
77 </row>
78 </thead>
79 <tbody valign="top">
80 <row>
81 <entry align="char" id="FE-HAS-SIGNAL"><constant>FE_HAS_SIGNAL</constant></entry>
82 <entry align="char">The frontend has found something above the noise level</entry>
83 </row><row>
84 <entry align="char" id="FE-HAS-CARRIER"><constant>FE_HAS_CARRIER</constant></entry>
85 <entry align="char">The frontend has found a DVB signal</entry>
86 </row><row>
87 <entry align="char" id="FE-HAS-VITERBI"><constant>FE_HAS_VITERBI</constant></entry>
88 <entry align="char">The frontend FEC inner coding (Viterbi, LDPC or other inner code) is stable</entry>
89 </row><row>
90 <entry align="char" id="FE-HAS-SYNC"><constant>FE_HAS_SYNC</constant></entry>
91 <entry align="char">Synchronization bytes was found</entry>
92 </row><row>
93 <entry align="char" id="FE-HAS-LOCK"><constant>FE_HAS_LOCK</constant></entry>
94 <entry align="char">The DVB were locked and everything is working</entry>
95 </row><row>
96 <entry align="char" id="FE-TIMEDOUT"><constant>FE_TIMEDOUT</constant></entry>
97 <entry align="char">no lock within the last about 2 seconds</entry>
98 </row><row>
99 <entry align="char" id="FE-REINIT"><constant>FE_REINIT</constant></entry>
100 <entry align="char">The frontend was reinitialized, application is
101 recommended to reset DiSEqC, tone and parameters</entry>
102 </row>
103 </tbody>
104 </tgroup>
105</table>
106</refsect1>
107</refentry>
diff --git a/Documentation/DocBook/media/dvb/fe-set-frontend-tune-mode.xml b/Documentation/DocBook/media/dvb/fe-set-frontend-tune-mode.xml
new file mode 100644
index 000000000000..99fa8a015c7a
--- /dev/null
+++ b/Documentation/DocBook/media/dvb/fe-set-frontend-tune-mode.xml
@@ -0,0 +1,64 @@
1<refentry id="FE_SET_FRONTEND_TUNE_MODE">
2 <refmeta>
3 <refentrytitle>ioctl FE_SET_FRONTEND_TUNE_MODE</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>FE_SET_FRONTEND_TUNE_MODE</refname>
9 <refpurpose>Allow setting tuner mode flags to the frontend.</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>unsigned int <parameter>flags</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24 <title>Arguments</title>
25 <variablelist>
26 <varlistentry>
27 <term><parameter>fd</parameter></term>
28 <listitem>
29 <para>&fe_fd;</para>
30 </listitem>
31 </varlistentry>
32 <varlistentry>
33 <term><parameter>request</parameter></term>
34 <listitem>
35 <para>FE_SET_FRONTEND_TUNE_MODE</para>
36 </listitem>
37 </varlistentry>
38 <varlistentry>
39 <term><parameter>flags</parameter></term>
40 <listitem>
41 <para>Valid flags:</para>
42 <itemizedlist>
43 <listitem><para>0 - normal tune mode</para></listitem>
44 <listitem><para>FE_TUNE_MODE_ONESHOT - When set, this flag will
45 disable any zigzagging or other "normal" tuning behaviour.
46 Additionally, there will be no automatic monitoring of the
47 lock status, and hence no frontend events will be
48 generated. If a frontend device is closed, this flag will
49 be automatically turned off when the device is reopened
50 read-write.</para></listitem>
51 </itemizedlist>
52 </listitem>
53 </varlistentry>
54 </variablelist>
55 </refsect1>
56
57 <refsect1>
58 <title>Description</title>
59
60 <para>Allow setting tuner mode flags to the frontend, between 0 (normal)
61 or FE_TUNE_MODE_ONESHOT mode</para>
62&return-value-dvb;
63</refsect1>
64</refentry>
diff --git a/Documentation/DocBook/media/dvb/fe-set-tone.xml b/Documentation/DocBook/media/dvb/fe-set-tone.xml
new file mode 100644
index 000000000000..62d44e4ccc39
--- /dev/null
+++ b/Documentation/DocBook/media/dvb/fe-set-tone.xml
@@ -0,0 +1,91 @@
1<refentry id="FE_SET_TONE">
2 <refmeta>
3 <refentrytitle>ioctl FE_SET_TONE</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>FE_SET_TONE</refname>
9 <refpurpose>Sets/resets the generation of the continuous 22kHz tone.</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>enum fe_sec_tone_mode *<parameter>tone</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24 <title>Arguments</title>
25 <variablelist>
26 <varlistentry>
27 <term><parameter>fd</parameter></term>
28 <listitem>
29 <para>&fe_fd;</para>
30 </listitem>
31 </varlistentry>
32 <varlistentry>
33 <term><parameter>request</parameter></term>
34 <listitem>
35 <para>FE_SET_TONE</para>
36 </listitem>
37 </varlistentry>
38 <varlistentry>
39 <term><parameter>tone</parameter></term>
40 <listitem>
41 <para>pointer to &fe-sec-tone-mode;</para>
42 </listitem>
43 </varlistentry>
44 </variablelist>
45 </refsect1>
46
47 <refsect1>
48 <title>Description</title>
49
50<para>This ioctl is used to set the generation of the continuous 22kHz tone.
51 This call requires read/write permissions.</para>
52<para>Usually, satellite antenna subsystems require that the digital TV
53 device to send a 22kHz tone in order to select between high/low band on
54 some dual-band LNBf. It is also used to send signals to DiSEqC equipment,
55 but this is done using the DiSEqC ioctls.</para>
56<para>NOTE: if more than one device is connected to the same antenna,
57 setting a tone may interfere on other devices, as they may lose
58 the capability of selecting the band. So, it is recommended that
59 applications would change to SEC_TONE_OFF when the device is not used.</para>
60
61&return-value-dvb;
62</refsect1>
63
64<refsect1 id="fe-sec-tone-mode-t">
65<title>enum fe_sec_tone_mode</title>
66
67<table pgwide="1" frame="none" id="fe-sec-tone-mode">
68 <title>enum fe_sec_tone_mode</title>
69 <tgroup cols="2">
70 &cs-def;
71 <thead>
72 <row>
73 <entry>ID</entry>
74 <entry>Description</entry>
75 </row>
76 </thead>
77 <tbody valign="top">
78 <row>
79 <entry align="char" id="SEC-TONE-ON"><constant>SEC_TONE_ON</constant></entry>
80 <entry align="char">Sends a 22kHz tone burst to the antenna</entry>
81 </row><row>
82 <entry align="char" id="SEC-TONE-OFF"><constant>SEC_TONE_OFF</constant></entry>
83 <entry align="char">Don't send a 22kHz tone to the antenna
84 (except if the FE_DISEQC_* ioctls are called)</entry>
85 </row>
86 </tbody>
87 </tgroup>
88</table>
89</refsect1>
90
91</refentry>
diff --git a/Documentation/DocBook/media/dvb/fe-set-voltage.xml b/Documentation/DocBook/media/dvb/fe-set-voltage.xml
new file mode 100644
index 000000000000..c89a6f79b5af
--- /dev/null
+++ b/Documentation/DocBook/media/dvb/fe-set-voltage.xml
@@ -0,0 +1,69 @@
1<refentry id="FE_SET_VOLTAGE">
2 <refmeta>
3 <refentrytitle>ioctl FE_SET_VOLTAGE</refentrytitle>
4 &manvol;
5 </refmeta>
6
7 <refnamediv>
8 <refname>FE_SET_VOLTAGE</refname>
9 <refpurpose>Allow setting the DC level sent to the antenna subsystem.</refpurpose>
10 </refnamediv>
11
12 <refsynopsisdiv>
13 <funcsynopsis>
14 <funcprototype>
15 <funcdef>int <function>ioctl</function></funcdef>
16 <paramdef>int <parameter>fd</parameter></paramdef>
17 <paramdef>int <parameter>request</parameter></paramdef>
18 <paramdef>enum fe_sec_voltage *<parameter>voltage</parameter></paramdef>
19 </funcprototype>
20 </funcsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24 <title>Arguments</title>
25 <variablelist>
26 <varlistentry>
27 <term><parameter>fd</parameter></term>
28 <listitem>
29 <para>&fe_fd;</para>
30 </listitem>
31 </varlistentry>
32 <varlistentry>
33 <term><parameter>request</parameter></term>
34 <listitem>
35 <para>FE_SET_VOLTAGE</para>
36 </listitem>
37 </varlistentry>
38 <varlistentry>
39 <term><parameter>voltage</parameter></term>
40 <listitem>
41 <para>pointer to &fe-sec-voltage;</para>
42 <para>Valid values are described at &fe-sec-voltage;.</para>
43 </listitem>
44 </varlistentry>
45 </variablelist>
46 </refsect1>
47
48 <refsect1>
49 <title>Description</title>
50
51<para>This ioctl allows to set the DC voltage level sent through the antenna
52 cable to 13V, 18V or off.</para>
53<para>Usually, a satellite antenna subsystems require that the digital TV
54 device to send a DC voltage to feed power to the LNBf. Depending on the
55 LNBf type, the polarization or the intermediate frequency (IF) of the LNBf
56 can controlled by the voltage level. Other devices (for example, the ones
57 that implement DISEqC and multipoint LNBf's don't need to control the
58 voltage level, provided that either 13V or 18V is sent to power up the
59 LNBf.</para>
60<para>NOTE: if more than one device is connected to the same antenna,
61 setting a voltage level may interfere on other devices, as they may lose
62 the capability of setting polarization or IF. So, on those
63 cases, setting the voltage to SEC_VOLTAGE_OFF while the device is not is
64 used is recommended.</para>
65
66&return-value-dvb;
67</refsect1>
68
69</refentry>
diff --git a/Documentation/DocBook/media/dvb/frontend.xml b/Documentation/DocBook/media/dvb/frontend.xml
index 8a6a6ff27af5..01210b33c130 100644
--- a/Documentation/DocBook/media/dvb/frontend.xml
+++ b/Documentation/DocBook/media/dvb/frontend.xml
@@ -1,485 +1,112 @@
1<title>DVB Frontend API</title> 1<title>DVB Frontend API</title>
2 2
3<para>The DVB frontend device controls the tuner and DVB demodulator 3<para>The DVB frontend API was designed to support three types of delivery systems:</para>
4hardware. It can be accessed through <emphasis 4<itemizedlist>
5role="tt">/dev/dvb/adapter0/frontend0</emphasis>. Data types and and 5 <listitem><para>Terrestrial systems: DVB-T, DVB-T2, ATSC, ATSC M/H, ISDB-T, DVB-H, DTMB, CMMB</para></listitem>
6ioctl definitions can be accessed by including <emphasis 6 <listitem><para>Cable systems: DVB-C Annex A/C, ClearQAM (DVB-C Annex B), ISDB-C</para></listitem>
7role="tt">linux/dvb/frontend.h</emphasis> in your application.</para> 7 <listitem><para>Satellite systems: DVB-S, DVB-S2, DVB Turbo, ISDB-S, DSS</para></listitem>
8 8</itemizedlist>
9<para>DVB frontends come in three varieties: DVB-S (satellite), DVB-C 9<para>The DVB frontend controls several sub-devices including:</para>
10(cable) and DVB-T (terrestrial). Transmission via the internet (DVB-IP) 10<itemizedlist>
11is not yet handled by this API but a future extension is possible. For 11 <listitem><para>Tuner</para></listitem>
12DVB-S the frontend device also supports satellite equipment control 12 <listitem><para>Digital TV demodulator</para></listitem>
13(SEC) via DiSEqC and V-SEC protocols. The DiSEqC (digital SEC) 13 <listitem><para>Low noise amplifier (LNA)</para></listitem>
14specification is available from 14 <listitem><para>Satellite Equipment Control (SEC) hardware (only for Satellite).</para></listitem>
15</itemizedlist>
16<para>The frontend can be accessed through
17 <constant>/dev/dvb/adapter?/frontend?</constant>. Data types and
18 ioctl definitions can be accessed by including
19 <constant>linux/dvb/frontend.h</constant> in your application.
20</para>
21
22<para>NOTE: Transmission via the internet (DVB-IP)
23 is not yet handled by this API but a future extension is possible.</para>
24<para>On Satellite systems, the API support for the Satellite Equipment Control
25 (SEC) allows to power control and to send/receive signals to control the
26 antenna subsystem, selecting the polarization and choosing the Intermediate
27 Frequency IF) of the Low Noise Block Converter Feed Horn (LNBf). It
28 supports the DiSEqC and V-SEC protocols. The DiSEqC (digital SEC)
29specification is available at
15<ulink url="http://www.eutelsat.com/satellites/4_5_5.html">Eutelsat</ulink>.</para> 30<ulink url="http://www.eutelsat.com/satellites/4_5_5.html">Eutelsat</ulink>.</para>
16 31
17<para>Note that the DVB API may also be used for MPEG decoder-only PCI 32<section id="query-dvb-frontend-info">
18cards, in which case there exists no frontend device.</para> 33<title>Querying frontend information</title>
19
20<section id="frontend_types">
21<title>Frontend Data Types</title>
22
23<section id="fe-type-t">
24<title>Frontend type</title>
25
26<para>For historical reasons, frontend types are named by the type of modulation used in
27transmission. The fontend types are given by fe_type_t type, defined as:</para>
28
29<table pgwide="1" frame="none" id="fe-type">
30<title>Frontend types</title>
31<tgroup cols="3">
32 &cs-def;
33 <thead>
34 <row>
35 <entry>fe_type</entry>
36 <entry>Description</entry>
37 <entry><link linkend="DTV-DELIVERY-SYSTEM">DTV_DELIVERY_SYSTEM</link> equivalent type</entry>
38 </row>
39 </thead>
40 <tbody valign="top">
41 <row>
42 <entry id="FE_QPSK"><constant>FE_QPSK</constant></entry>
43 <entry>For DVB-S standard</entry>
44 <entry><constant>SYS_DVBS</constant></entry>
45 </row>
46 <row>
47 <entry id="FE_QAM"><constant>FE_QAM</constant></entry>
48 <entry>For DVB-C annex A standard</entry>
49 <entry><constant>SYS_DVBC_ANNEX_A</constant></entry>
50 </row>
51 <row>
52 <entry id="FE_OFDM"><constant>FE_OFDM</constant></entry>
53 <entry>For DVB-T standard</entry>
54 <entry><constant>SYS_DVBT</constant></entry>
55 </row>
56 <row>
57 <entry id="FE_ATSC"><constant>FE_ATSC</constant></entry>
58 <entry>For ATSC standard (terrestrial) or for DVB-C Annex B (cable) used in US.</entry>
59 <entry><constant>SYS_ATSC</constant> (terrestrial) or <constant>SYS_DVBC_ANNEX_B</constant> (cable)</entry>
60 </row>
61</tbody></tgroup></table>
62
63<para>Newer formats like DVB-S2, ISDB-T, ISDB-S and DVB-T2 are not described at the above, as they're
64supported via the new <link linkend="FE_GET_SET_PROPERTY">FE_GET_PROPERTY/FE_GET_SET_PROPERTY</link> ioctl's, using the <link linkend="DTV-DELIVERY-SYSTEM">DTV_DELIVERY_SYSTEM</link> parameter.
65</para>
66
67<para>The usage of this field is deprecated, as it doesn't report all supported standards, and
68will provide an incomplete information for frontends that support multiple delivery systems.
69Please use <link linkend="DTV-ENUM-DELSYS">DTV_ENUM_DELSYS</link> instead.</para>
70</section>
71
72<section id="fe-caps-t">
73<title>frontend capabilities</title>
74
75<para>Capabilities describe what a frontend can do. Some capabilities can only be supported for
76a specific frontend type.</para>
77<programlisting>
78 typedef enum fe_caps {
79 FE_IS_STUPID = 0,
80 FE_CAN_INVERSION_AUTO = 0x1,
81 FE_CAN_FEC_1_2 = 0x2,
82 FE_CAN_FEC_2_3 = 0x4,
83 FE_CAN_FEC_3_4 = 0x8,
84 FE_CAN_FEC_4_5 = 0x10,
85 FE_CAN_FEC_5_6 = 0x20,
86 FE_CAN_FEC_6_7 = 0x40,
87 FE_CAN_FEC_7_8 = 0x80,
88 FE_CAN_FEC_8_9 = 0x100,
89 FE_CAN_FEC_AUTO = 0x200,
90 FE_CAN_QPSK = 0x400,
91 FE_CAN_QAM_16 = 0x800,
92 FE_CAN_QAM_32 = 0x1000,
93 FE_CAN_QAM_64 = 0x2000,
94 FE_CAN_QAM_128 = 0x4000,
95 FE_CAN_QAM_256 = 0x8000,
96 FE_CAN_QAM_AUTO = 0x10000,
97 FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
98 FE_CAN_BANDWIDTH_AUTO = 0x40000,
99 FE_CAN_GUARD_INTERVAL_AUTO = 0x80000,
100 FE_CAN_HIERARCHY_AUTO = 0x100000,
101 FE_CAN_8VSB = 0x200000,
102 FE_CAN_16VSB = 0x400000,
103 FE_HAS_EXTENDED_CAPS = 0x800000,
104 FE_CAN_MULTISTREAM = 0x4000000,
105 FE_CAN_TURBO_FEC = 0x8000000,
106 FE_CAN_2G_MODULATION = 0x10000000,
107 FE_NEEDS_BENDING = 0x20000000,
108 FE_CAN_RECOVER = 0x40000000,
109 FE_CAN_MUTE_TS = 0x80000000
110 } fe_caps_t;
111</programlisting>
112</section>
113
114<section id="dvb-frontend-info">
115<title>frontend information</title>
116
117<para>Information about the frontend ca be queried with
118 <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
119
120<programlisting>
121 struct dvb_frontend_info {
122 char name[128];
123 fe_type_t type;
124 uint32_t frequency_min;
125 uint32_t frequency_max;
126 uint32_t frequency_stepsize;
127 uint32_t frequency_tolerance;
128 uint32_t symbol_rate_min;
129 uint32_t symbol_rate_max;
130 uint32_t symbol_rate_tolerance; /&#x22C6; ppm &#x22C6;/
131 uint32_t notifier_delay; /&#x22C6; ms &#x22C6;/
132 fe_caps_t caps;
133 };
134</programlisting>
135</section>
136
137<section id="dvb-diseqc-master-cmd">
138<title>diseqc master command</title>
139
140<para>A message sent from the frontend to DiSEqC capable equipment.</para>
141<programlisting>
142 struct dvb_diseqc_master_cmd {
143 uint8_t msg [6]; /&#x22C6; { framing, address, command, data[3] } &#x22C6;/
144 uint8_t msg_len; /&#x22C6; valid values are 3...6 &#x22C6;/
145 };
146</programlisting>
147</section>
148<section role="subsection" id="dvb-diseqc-slave-reply">
149<title>diseqc slave reply</title>
150
151<para>A reply to the frontend from DiSEqC 2.0 capable equipment.</para>
152<programlisting>
153 struct dvb_diseqc_slave_reply {
154 uint8_t msg [4]; /&#x22C6; { framing, data [3] } &#x22C6;/
155 uint8_t msg_len; /&#x22C6; valid values are 0...4, 0 means no msg &#x22C6;/
156 int timeout; /&#x22C6; return from ioctl after timeout ms with &#x22C6;/
157 }; /&#x22C6; errorcode when no message was received &#x22C6;/
158</programlisting>
159</section>
160
161<section id="fe-sec-voltage-t">
162<title>diseqc slave reply</title>
163<para>The voltage is usually used with non-DiSEqC capable LNBs to switch the polarzation
164(horizontal/vertical). When using DiSEqC epuipment this voltage has to be switched
165consistently to the DiSEqC commands as described in the DiSEqC spec.</para>
166<programlisting>
167 typedef enum fe_sec_voltage {
168 SEC_VOLTAGE_13,
169 SEC_VOLTAGE_18
170 } fe_sec_voltage_t;
171</programlisting>
172</section>
173
174<section id="fe-sec-tone-mode-t">
175<title>SEC continuous tone</title>
176 34
177<para>The continuous 22KHz tone is usually used with non-DiSEqC capable LNBs to switch the 35<para>Usually, the first thing to do when the frontend is opened is to
178high/low band of a dual-band LNB. When using DiSEqC epuipment this voltage has to 36 check the frontend capabilities. This is done using <link linkend="FE_GET_INFO">FE_GET_INFO</link>. This ioctl will enumerate
179be switched consistently to the DiSEqC commands as described in the DiSEqC 37 the DVB API version and other characteristics about the frontend, and
180spec.</para> 38 can be opened either in read only or read/write mode.</para>
181<programlisting>
182 typedef enum fe_sec_tone_mode {
183 SEC_TONE_ON,
184 SEC_TONE_OFF
185 } fe_sec_tone_mode_t;
186</programlisting>
187</section> 39</section>
188 40
189<section id="fe-sec-mini-cmd-t"> 41<section id="dvb-fe-read-status">
190<title>SEC tone burst</title> 42<title>Querying frontend status and statistics</title>
191
192<para>The 22KHz tone burst is usually used with non-DiSEqC capable switches to select
193between two connected LNBs/satellites. When using DiSEqC epuipment this voltage has to
194be switched consistently to the DiSEqC commands as described in the DiSEqC
195spec.</para>
196<programlisting>
197 typedef enum fe_sec_mini_cmd {
198 SEC_MINI_A,
199 SEC_MINI_B
200 } fe_sec_mini_cmd_t;
201</programlisting>
202
203<para></para>
204</section>
205
206<section id="fe-status-t">
207<title>frontend status</title>
208<para>Several functions of the frontend device use the fe_status data type defined
209by</para>
210<programlisting>
211typedef enum fe_status {
212 FE_HAS_SIGNAL = 0x01,
213 FE_HAS_CARRIER = 0x02,
214 FE_HAS_VITERBI = 0x04,
215 FE_HAS_SYNC = 0x08,
216 FE_HAS_LOCK = 0x10,
217 FE_TIMEDOUT = 0x20,
218 FE_REINIT = 0x40,
219} fe_status_t;
220</programlisting>
221<para>to indicate the current state and/or state changes of the frontend hardware:
222</para>
223
224<informaltable><tgroup cols="2"><tbody>
225<row>
226<entry align="char">FE_HAS_SIGNAL</entry>
227<entry align="char">The frontend has found something above the noise level</entry>
228</row><row>
229<entry align="char">FE_HAS_CARRIER</entry>
230<entry align="char">The frontend has found a DVB signal</entry>
231</row><row>
232<entry align="char">FE_HAS_VITERBI</entry>
233<entry align="char">The frontend FEC inner coding (Viterbi, LDPC or other inner code) is stable</entry>
234</row><row>
235<entry align="char">FE_HAS_SYNC</entry>
236<entry align="char">Synchronization bytes was found</entry>
237</row><row>
238<entry align="char">FE_HAS_LOCK</entry>
239<entry align="char">The DVB were locked and everything is working</entry>
240</row><row>
241<entry align="char">FE_TIMEDOUT</entry>
242<entry align="char">no lock within the last about 2 seconds</entry>
243</row><row>
244<entry align="char">FE_REINIT</entry>
245<entry align="char">The frontend was reinitialized, application is
246recommended to reset DiSEqC, tone and parameters</entry>
247</row>
248</tbody></tgroup></informaltable>
249 43
44<para>Once <link linkend="FE_GET_PROPERTY"><constant>FE_SET_PROPERTY</constant></link>
45 is called, the frontend will run a kernel thread that will periodically
46 check for the tuner lock status and provide statistics about the quality
47 of the signal.</para>
48<para>The information about the frontend tuner locking status can be queried
49 using <link linkend="FE_READ_STATUS">FE_READ_STATUS</link>.</para>
50<para>Signal statistics are provided via <link linkend="FE_GET_PROPERTY"><constant>FE_GET_PROPERTY</constant></link>.
51 Please note that several statistics require the demodulator to be fully
52 locked (e. g. with FE_HAS_LOCK bit set). See
53 <link linkend="frontend-stat-properties">Frontend statistics indicators</link>
54 for more details.</para>
250</section> 55</section>
251 56
252<section id="dvb-frontend-parameters"> 57&sub-dvbproperty;
253<title>frontend parameters</title>
254<para>The kind of parameters passed to the frontend device for tuning depend on
255the kind of hardware you are using.</para>
256<para>The struct <constant>dvb_frontend_parameters</constant> uses an
257union with specific per-system parameters. However, as newer delivery systems
258required more data, the structure size weren't enough to fit, and just
259extending its size would break the existing applications. So, those parameters
260were replaced by the usage of <link linkend="FE_GET_SET_PROPERTY">
261<constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant></link> ioctl's. The
262new API is flexible enough to add new parameters to existing delivery systems,
263and to add newer delivery systems.</para>
264<para>So, newer applications should use <link linkend="FE_GET_SET_PROPERTY">
265<constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant></link> instead, in
266order to be able to support the newer System Delivery like DVB-S2, DVB-T2,
267DVB-C2, ISDB, etc.</para>
268<para>All kinds of parameters are combined as an union in the FrontendParameters structure:
269<programlisting>
270struct dvb_frontend_parameters {
271 uint32_t frequency; /&#x22C6; (absolute) frequency in Hz for QAM/OFDM &#x22C6;/
272 /&#x22C6; intermediate frequency in kHz for QPSK &#x22C6;/
273 fe_spectral_inversion_t inversion;
274 union {
275 struct dvb_qpsk_parameters qpsk;
276 struct dvb_qam_parameters qam;
277 struct dvb_ofdm_parameters ofdm;
278 struct dvb_vsb_parameters vsb;
279 } u;
280};
281</programlisting></para>
282<para>In the case of QPSK frontends the <constant>frequency</constant> field specifies the intermediate
283frequency, i.e. the offset which is effectively added to the local oscillator frequency (LOF) of
284the LNB. The intermediate frequency has to be specified in units of kHz. For QAM and
285OFDM frontends the <constant>frequency</constant> specifies the absolute frequency and is given in Hz.
286</para>
287
288<section id="dvb-qpsk-parameters">
289<title>QPSK parameters</title>
290<para>For satellite QPSK frontends you have to use the <constant>dvb_qpsk_parameters</constant> structure:</para>
291<programlisting>
292 struct dvb_qpsk_parameters {
293 uint32_t symbol_rate; /&#x22C6; symbol rate in Symbols per second &#x22C6;/
294 fe_code_rate_t fec_inner; /&#x22C6; forward error correction (see above) &#x22C6;/
295 };
296</programlisting>
297</section>
298<section id="dvb-qam-parameters">
299<title>QAM parameters</title>
300<para>for cable QAM frontend you use the <constant>dvb_qam_parameters</constant> structure:</para>
301<programlisting>
302 struct dvb_qam_parameters {
303 uint32_t symbol_rate; /&#x22C6; symbol rate in Symbols per second &#x22C6;/
304 fe_code_rate_t fec_inner; /&#x22C6; forward error correction (see above) &#x22C6;/
305 fe_modulation_t modulation; /&#x22C6; modulation type (see above) &#x22C6;/
306 };
307</programlisting>
308</section>
309<section id="dvb-vsb-parameters">
310<title>VSB parameters</title>
311<para>ATSC frontends are supported by the <constant>dvb_vsb_parameters</constant> structure:</para>
312<programlisting>
313struct dvb_vsb_parameters {
314 fe_modulation_t modulation; /&#x22C6; modulation type (see above) &#x22C6;/
315};
316</programlisting>
317</section>
318<section id="dvb-ofdm-parameters">
319<title>OFDM parameters</title>
320<para>DVB-T frontends are supported by the <constant>dvb_ofdm_parameters</constant> structure:</para>
321<programlisting>
322 struct dvb_ofdm_parameters {
323 fe_bandwidth_t bandwidth;
324 fe_code_rate_t code_rate_HP; /&#x22C6; high priority stream code rate &#x22C6;/
325 fe_code_rate_t code_rate_LP; /&#x22C6; low priority stream code rate &#x22C6;/
326 fe_modulation_t constellation; /&#x22C6; modulation type (see above) &#x22C6;/
327 fe_transmit_mode_t transmission_mode;
328 fe_guard_interval_t guard_interval;
329 fe_hierarchy_t hierarchy_information;
330 };
331</programlisting>
332</section>
333<section id="fe-spectral-inversion-t">
334<title>frontend spectral inversion</title>
335<para>The Inversion field can take one of these values:
336</para>
337<programlisting>
338typedef enum fe_spectral_inversion {
339 INVERSION_OFF,
340 INVERSION_ON,
341 INVERSION_AUTO
342} fe_spectral_inversion_t;
343</programlisting>
344<para>It indicates if spectral inversion should be presumed or not. In the automatic setting
345(<constant>INVERSION_AUTO</constant>) the hardware will try to figure out the correct setting by
346itself.
347</para>
348</section>
349<section id="fe-code-rate-t">
350<title>frontend code rate</title>
351<para>The possible values for the <constant>fec_inner</constant> field used on
352<link linkend="dvb-qpsk-parameters"><constant>struct dvb_qpsk_parameters</constant></link> and
353<link linkend="dvb-qam-parameters"><constant>struct dvb_qam_parameters</constant></link> are:
354</para>
355<programlisting>
356typedef enum fe_code_rate {
357 FEC_NONE = 0,
358 FEC_1_2,
359 FEC_2_3,
360 FEC_3_4,
361 FEC_4_5,
362 FEC_5_6,
363 FEC_6_7,
364 FEC_7_8,
365 FEC_8_9,
366 FEC_AUTO,
367 FEC_3_5,
368 FEC_9_10,
369} fe_code_rate_t;
370</programlisting>
371<para>which correspond to error correction rates of 1/2, 2/3, etc., no error correction or auto
372detection.
373</para>
374</section>
375<section id="fe-modulation-t">
376<title>frontend modulation type for QAM, OFDM and VSB</title>
377<para>For cable and terrestrial frontends, e. g. for
378<link linkend="dvb-qam-parameters"><constant>struct dvb_qpsk_parameters</constant></link>,
379<link linkend="dvb-ofdm-parameters"><constant>struct dvb_qam_parameters</constant></link> and
380<link linkend="dvb-vsb-parameters"><constant>struct dvb_qam_parameters</constant></link>,
381it needs to specify the quadrature modulation mode which can be one of the following:
382</para>
383<programlisting>
384 typedef enum fe_modulation {
385 QPSK,
386 QAM_16,
387 QAM_32,
388 QAM_64,
389 QAM_128,
390 QAM_256,
391 QAM_AUTO,
392 VSB_8,
393 VSB_16,
394 PSK_8,
395 APSK_16,
396 APSK_32,
397 DQPSK,
398 } fe_modulation_t;
399</programlisting>
400</section>
401<section>
402<title>More OFDM parameters</title>
403<section id="fe-transmit-mode-t">
404<title>Number of carriers per channel</title>
405<programlisting>
406typedef enum fe_transmit_mode {
407 TRANSMISSION_MODE_2K,
408 TRANSMISSION_MODE_8K,
409 TRANSMISSION_MODE_AUTO,
410 TRANSMISSION_MODE_4K,
411 TRANSMISSION_MODE_1K,
412 TRANSMISSION_MODE_16K,
413 TRANSMISSION_MODE_32K,
414 } fe_transmit_mode_t;
415</programlisting>
416</section>
417<section id="fe-bandwidth-t">
418<title>frontend bandwidth</title>
419<programlisting>
420typedef enum fe_bandwidth {
421 BANDWIDTH_8_MHZ,
422 BANDWIDTH_7_MHZ,
423 BANDWIDTH_6_MHZ,
424 BANDWIDTH_AUTO,
425 BANDWIDTH_5_MHZ,
426 BANDWIDTH_10_MHZ,
427 BANDWIDTH_1_712_MHZ,
428} fe_bandwidth_t;
429</programlisting>
430</section>
431<section id="fe-guard-interval-t">
432<title>frontend guard inverval</title>
433<programlisting>
434typedef enum fe_guard_interval {
435 GUARD_INTERVAL_1_32,
436 GUARD_INTERVAL_1_16,
437 GUARD_INTERVAL_1_8,
438 GUARD_INTERVAL_1_4,
439 GUARD_INTERVAL_AUTO,
440 GUARD_INTERVAL_1_128,
441 GUARD_INTERVAL_19_128,
442 GUARD_INTERVAL_19_256,
443} fe_guard_interval_t;
444</programlisting>
445</section>
446<section id="fe-hierarchy-t">
447<title>frontend hierarchy</title>
448<programlisting>
449typedef enum fe_hierarchy {
450 HIERARCHY_NONE,
451 HIERARCHY_1,
452 HIERARCHY_2,
453 HIERARCHY_4,
454 HIERARCHY_AUTO
455 } fe_hierarchy_t;
456</programlisting>
457</section>
458</section>
459
460</section>
461
462<section id="dvb-frontend-event">
463<title>frontend events</title>
464 <programlisting>
465 struct dvb_frontend_event {
466 fe_status_t status;
467 struct dvb_frontend_parameters parameters;
468 };
469</programlisting>
470 </section>
471</section>
472
473 58
474<section id="frontend_fcalls"> 59<section id="frontend_fcalls">
475<title>Frontend Function Calls</title> 60<title>Frontend Function Calls</title>
476 61
477<section id="frontend_f_open"> 62<refentry id="frontend_f_open">
478<title>open()</title> 63 <refmeta>
479<para>DESCRIPTION</para> 64 <refentrytitle>DVB frontend open()</refentrytitle>
480<informaltable><tgroup cols="1"><tbody><row> 65 &manvol;
481<entry align="char"> 66 </refmeta>
482<para>This system call opens a named frontend device (/dev/dvb/adapter0/frontend0) 67
68 <refnamediv>
69 <refname>fe-open</refname>
70 <refpurpose>Open a frontend device</refpurpose>
71 </refnamediv>
72
73 <refsynopsisdiv>
74 <funcsynopsis>
75 <funcsynopsisinfo>#include &lt;fcntl.h&gt;</funcsynopsisinfo>
76 <funcprototype>
77 <funcdef>int <function>open</function></funcdef>
78 <paramdef>const char *<parameter>device_name</parameter></paramdef>
79 <paramdef>int <parameter>flags</parameter></paramdef>
80 </funcprototype>
81 </funcsynopsis>
82 </refsynopsisdiv>
83
84 <refsect1>
85 <title>Arguments</title>
86
87 <variablelist>
88 <varlistentry>
89 <term><parameter>device_name</parameter></term>
90 <listitem>
91 <para>Device to be opened.</para>
92 </listitem>
93 </varlistentry>
94 <varlistentry>
95 <term><parameter>flags</parameter></term>
96 <listitem>
97 <para>Open flags. Access can either be
98 <constant>O_RDWR</constant> or <constant>O_RDONLY</constant>.</para>
99 <para>Multiple opens are allowed with <constant>O_RDONLY</constant>. In this mode, only query and read ioctls are allowed.</para>
100 <para>Only one open is allowed in <constant>O_RDWR</constant>. In this mode, all ioctls are allowed.</para>
101 <para>When the <constant>O_NONBLOCK</constant> flag is given, the system calls may return &EAGAIN; when no data is available or when the device driver is temporarily busy.</para>
102 <para>Other flags have no effect.</para>
103 </listitem>
104 </varlistentry>
105 </variablelist>
106 </refsect1>
107 <refsect1>
108 <title>Description</title>
109 <para>This system call opens a named frontend device (<constant>/dev/dvb/adapter?/frontend?</constant>)
483 for subsequent use. Usually the first thing to do after a successful open is to 110 for subsequent use. Usually the first thing to do after a successful open is to
484 find out the frontend type with <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para> 111 find out the frontend type with <link linkend="FE_GET_INFO">FE_GET_INFO</link>.</para>
485<para>The device can be opened in read-only mode, which only allows monitoring of 112<para>The device can be opened in read-only mode, which only allows monitoring of
@@ -497,1052 +124,146 @@ typedef enum fe_hierarchy {
497 for use in the specified mode. This implies that the corresponding hardware is 124 for use in the specified mode. This implies that the corresponding hardware is
498 powered up, and that other front-ends may have been powered down to make 125 powered up, and that other front-ends may have been powered down to make
499 that possible.</para> 126 that possible.</para>
500</entry> 127 </refsect1>
501 </row></tbody></tgroup></informaltable> 128
502 129 <refsect1>
503<para>SYNOPSIS</para> 130 <title>Return Value</title>
504<informaltable><tgroup cols="1"><tbody><row><entry 131
505 align="char"> 132 <para>On success <function>open</function> returns the new file
506<para>int open(const char &#x22C6;deviceName, int flags);</para> 133descriptor. On error -1 is returned, and the <varname>errno</varname>
507</entry> 134variable is set appropriately. Possible error codes are:</para>
508 </row></tbody></tgroup></informaltable> 135
509<para>PARAMETERS 136 <variablelist>
510</para> 137 <varlistentry>
511<informaltable><tgroup cols="2"><tbody><row><entry 138 <term><errorcode>EACCES</errorcode></term>
512 align="char"> 139 <listitem>
513<para>const char 140 <para>The caller has no permission to access the
514 *deviceName</para> 141device.</para>
515</entry><entry 142 </listitem>
516 align="char"> 143 </varlistentry>
517<para>Name of specific video device.</para> 144 <varlistentry>
518</entry> 145 <term><errorcode>EBUSY</errorcode></term>
519 </row><row><entry 146 <listitem>
520 align="char"> 147 <para>The the device driver is already in use.</para>
521<para>int flags</para> 148 </listitem>
522</entry><entry 149 </varlistentry>
523 align="char"> 150 <varlistentry>
524<para>A bit-wise OR of the following flags:</para> 151 <term><errorcode>ENXIO</errorcode></term>
525</entry> 152 <listitem>
526 </row><row><entry 153 <para>No device corresponding to this device special file
527 align="char"> 154exists.</para>
528</entry><entry 155 </listitem>
529 align="char"> 156 </varlistentry>
530<para>O_RDONLY read-only access</para> 157 <varlistentry>
531</entry> 158 <term><errorcode>ENOMEM</errorcode></term>
532 </row><row><entry 159 <listitem>
533 align="char"> 160 <para>Not enough kernel memory was available to complete the
534</entry><entry 161request.</para>
535 align="char"> 162 </listitem>
536<para>O_RDWR read/write access</para> 163 </varlistentry>
537</entry> 164 <varlistentry>
538 </row><row><entry 165 <term><errorcode>EMFILE</errorcode></term>
539 align="char"> 166 <listitem>
540</entry><entry 167 <para>The process already has the maximum number of
541 align="char"> 168files open.</para>
542<para>O_NONBLOCK open in non-blocking mode</para> 169 </listitem>
543</entry> 170 </varlistentry>
544 </row><row><entry 171 <varlistentry>
545 align="char"> 172 <term><errorcode>ENFILE</errorcode></term>
546</entry><entry 173 <listitem>
547 align="char"> 174 <para>The limit on the total number of files open on the
548<para>(blocking mode is the default)</para> 175system has been reached.</para>
549</entry> 176 </listitem>
550 </row></tbody></tgroup></informaltable> 177 </varlistentry>
551<para>RETURN VALUE</para> 178 <varlistentry>
552<informaltable><tgroup cols="2"><tbody><row><entry 179 <term><errorcode>ENODEV</errorcode></term>
553 align="char"> 180 <listitem>
554<para>ENODEV</para> 181 <para>The device got removed.</para>
555</entry><entry 182 </listitem>
556 align="char"> 183 </varlistentry>
557<para>Device driver not loaded/available.</para> 184 </variablelist>
558</entry> 185 </refsect1>
559 </row><row><entry 186</refentry>
560 align="char"> 187
561<para>EINTERNAL</para> 188<refentry id="frontend_f_close">
562</entry><entry 189 <refmeta>
563 align="char"> 190 <refentrytitle>DVB frontend close()</refentrytitle>
564<para>Internal error.</para> 191 &manvol;
565</entry> 192 </refmeta>
566 </row><row><entry 193
567 align="char"> 194 <refnamediv>
568<para>EBUSY</para> 195 <refname>fe-close</refname>
569</entry><entry 196 <refpurpose>Close a frontend device</refpurpose>
570 align="char"> 197 </refnamediv>
571<para>Device or resource busy.</para> 198
572</entry> 199 <refsynopsisdiv>
573 </row><row><entry 200 <funcsynopsis>
574 align="char"> 201 <funcsynopsisinfo>#include &lt;unistd.h&gt;</funcsynopsisinfo>
575<para>EINVAL</para> 202 <funcprototype>
576</entry><entry 203 <funcdef>int <function>close</function></funcdef>
577 align="char"> 204 <paramdef>int <parameter>fd</parameter></paramdef>
578<para>Invalid argument.</para> 205 </funcprototype>
579</entry> 206 </funcsynopsis>
580 </row></tbody></tgroup></informaltable> 207 </refsynopsisdiv>
581</section> 208
582 209 <refsect1>
583<section id="frontend_f_close"> 210 <title>Arguments</title>
584<title>close()</title> 211
585<para>DESCRIPTION 212 <variablelist>
586</para> 213 <varlistentry>
587<informaltable><tgroup cols="1"><tbody><row><entry 214 <term><parameter>fd</parameter></term>
588 align="char"> 215 <listitem>
216 <para>&fd;</para>
217 </listitem>
218 </varlistentry>
219 </variablelist>
220 </refsect1>
221
222 <refsect1>
223 <title>Description</title>
589<para>This system call closes a previously opened front-end device. After closing 224<para>This system call closes a previously opened front-end device. After closing
590 a front-end device, its corresponding hardware might be powered down 225 a front-end device, its corresponding hardware might be powered down
591 automatically.</para> 226 automatically.</para>
592</entry> 227</refsect1>
593 </row></tbody></tgroup></informaltable> 228 <refsect1>
594<para>SYNOPSIS 229 <title>Return Value</title>
595</para> 230
596<informaltable><tgroup cols="1"><tbody><row><entry 231 <para>The function returns <returnvalue>0</returnvalue> on
597 align="char"> 232success, <returnvalue>-1</returnvalue> on failure and the
598<para>int close(int fd);</para> 233<varname>errno</varname> is set appropriately. Possible error
599</entry> 234codes:</para>
600 </row></tbody></tgroup></informaltable> 235
601<para>PARAMETERS 236 <variablelist>
602</para> 237 <varlistentry>
603<informaltable><tgroup cols="2"><tbody><row><entry 238 <term><errorcode>EBADF</errorcode></term>
604 align="char"> 239 <listitem>
605<para>int fd</para> 240 <para><parameter>fd</parameter> is not a valid open file
606</entry><entry 241descriptor.</para>
607 align="char"> 242 </listitem>
608<para>File descriptor returned by a previous call to open().</para> 243 </varlistentry>
609</entry> 244 </variablelist>
610 </row></tbody></tgroup></informaltable> 245 </refsect1>
611<para>RETURN VALUE</para> 246</refentry>
612<informaltable><tgroup cols="2"><tbody><row><entry 247
613 align="char"> 248&sub-fe-get-info;
614<para>EBADF</para> 249&sub-fe-read-status;
615</entry><entry 250&sub-fe-get-property;
616 align="char"> 251&sub-fe-diseqc-reset-overload;
617<para>fd is not a valid open file descriptor.</para> 252&sub-fe-diseqc-send-master-cmd;
618</entry> 253&sub-fe-diseqc-recv-slave-reply;
619 </row></tbody></tgroup></informaltable> 254&sub-fe-diseqc-send-burst;
620</section> 255&sub-fe-set-tone;
621 256&sub-fe-set-voltage;
622<section id="FE_READ_STATUS"> 257&sub-fe-enable-high-lnb-voltage;
623<title>FE_READ_STATUS</title> 258&sub-fe-set-frontend-tune-mode;
624<para>DESCRIPTION 259
625</para> 260</section>
626<informaltable><tgroup cols="1"><tbody><row><entry 261
627 align="char"> 262<section id="frontend_legacy_dvbv3_api">
628<para>This ioctl call returns status information about the front-end. This call only 263<title>DVB Frontend legacy API (a. k. a. DVBv3)</title>
629 requires read-only access to the device.</para> 264<para>The usage of this API is deprecated, as it doesn't support all digital
630</entry> 265 TV standards, doesn't provide good statistics measurements and provides
631 </row></tbody></tgroup></informaltable> 266 incomplete information. This is kept only to support legacy applications.</para>
632<para>SYNOPSIS 267
633</para> 268&sub-frontend_legacy_api;
634<informaltable><tgroup cols="1"><tbody><row><entry
635 align="char">
636<para>int ioctl(int fd, int request = <link linkend="FE_READ_STATUS">FE_READ_STATUS</link>,
637 fe_status_t &#x22C6;status);</para>
638</entry>
639 </row></tbody></tgroup></informaltable>
640<para>PARAMETERS
641</para>
642
643<informaltable><tgroup cols="2"><tbody><row><entry
644 align="char">
645<para>int fd</para>
646</entry><entry
647 align="char">
648<para>File descriptor returned by a previous call to open().</para>
649</entry>
650 </row><row><entry
651 align="char">
652<para>int request</para>
653</entry><entry
654 align="char">
655<para>Equals <link linkend="FE_READ_STATUS">FE_READ_STATUS</link> for this command.</para>
656</entry>
657 </row><row><entry
658 align="char">
659<para>struct fe_status_t
660 *status</para>
661</entry><entry
662 align="char">
663<para>Points to the location where the front-end status word is
664 to be stored.</para>
665</entry>
666 </row></tbody></tgroup></informaltable>
667<para>RETURN VALUE</para>
668<informaltable><tgroup cols="2"><tbody><row><entry
669 align="char">
670<para>EBADF</para>
671</entry><entry
672 align="char">
673<para>fd is not a valid open file descriptor.</para>
674</entry>
675 </row><row><entry
676 align="char">
677<para>EFAULT</para>
678</entry><entry
679 align="char">
680<para>status points to invalid address.</para>
681</entry>
682 </row></tbody></tgroup></informaltable>
683</section>
684
685<section id="FE_READ_BER">
686<title>FE_READ_BER</title>
687<para>DESCRIPTION
688</para>
689<informaltable><tgroup cols="1"><tbody><row><entry
690 align="char">
691<para>This ioctl call returns the bit error rate for the signal currently
692 received/demodulated by the front-end. For this command, read-only access to
693 the device is sufficient.</para>
694</entry>
695 </row></tbody></tgroup></informaltable>
696<para>SYNOPSIS
697</para>
698<informaltable><tgroup cols="1"><tbody><row><entry
699 align="char">
700<para>int ioctl(int fd, int request = <link linkend="FE_READ_BER">FE_READ_BER</link>,
701 uint32_t &#x22C6;ber);</para>
702</entry>
703 </row></tbody></tgroup></informaltable>
704<para>PARAMETERS
705</para>
706<informaltable><tgroup cols="2"><tbody><row><entry
707 align="char">
708<para>int fd</para>
709</entry><entry
710 align="char">
711<para>File descriptor returned by a previous call to open().</para>
712</entry>
713 </row><row><entry
714 align="char">
715<para>int request</para>
716</entry><entry
717 align="char">
718<para>Equals <link linkend="FE_READ_BER">FE_READ_BER</link> for this command.</para>
719</entry>
720 </row><row><entry
721 align="char">
722<para>uint32_t *ber</para>
723</entry><entry
724 align="char">
725<para>The bit error rate is stored into *ber.</para>
726</entry>
727 </row></tbody></tgroup></informaltable>
728
729&return-value-dvb;
730</section>
731
732<section id="FE_READ_SNR">
733<title>FE_READ_SNR</title>
734
735<para>DESCRIPTION
736</para>
737<informaltable><tgroup cols="1"><tbody><row><entry
738 align="char">
739<para>This ioctl call returns the signal-to-noise ratio for the signal currently received
740 by the front-end. For this command, read-only access to the device is sufficient.</para>
741</entry>
742 </row></tbody></tgroup></informaltable>
743<para>SYNOPSIS
744</para>
745<informaltable><tgroup cols="1"><tbody><row><entry
746 align="char">
747<para>int ioctl(int fd, int request = <link linkend="FE_READ_SNR">FE_READ_SNR</link>, uint16_t
748 &#x22C6;snr);</para>
749</entry>
750 </row></tbody></tgroup></informaltable>
751<para>PARAMETERS
752</para>
753<informaltable><tgroup cols="2"><tbody><row><entry
754 align="char">
755<para>int fd</para>
756</entry><entry
757 align="char">
758<para>File descriptor returned by a previous call to open().</para>
759</entry>
760 </row><row><entry
761 align="char">
762<para>int request</para>
763</entry><entry
764 align="char">
765<para>Equals <link linkend="FE_READ_SNR">FE_READ_SNR</link> for this command.</para>
766</entry>
767 </row><row><entry
768 align="char">
769<para>uint16_t *snr</para>
770</entry><entry
771 align="char">
772<para>The signal-to-noise ratio is stored into *snr.</para>
773</entry>
774 </row></tbody></tgroup></informaltable>
775
776&return-value-dvb;
777</section>
778
779<section id="FE_READ_SIGNAL_STRENGTH">
780<title>FE_READ_SIGNAL_STRENGTH</title>
781<para>DESCRIPTION
782</para>
783<informaltable><tgroup cols="1"><tbody><row><entry
784 align="char">
785<para>This ioctl call returns the signal strength value for the signal currently received
786 by the front-end. For this command, read-only access to the device is sufficient.</para>
787</entry>
788 </row></tbody></tgroup></informaltable>
789<para>SYNOPSIS
790</para>
791<informaltable><tgroup cols="1"><tbody><row><entry
792 align="char">
793<para>int ioctl( int fd, int request =
794 <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, uint16_t &#x22C6;strength);</para>
795</entry>
796 </row></tbody></tgroup></informaltable>
797
798<para>PARAMETERS
799</para>
800<informaltable><tgroup cols="2"><tbody><row><entry
801 align="char">
802<para>int fd</para>
803</entry><entry
804 align="char">
805<para>File descriptor returned by a previous call to open().</para>
806</entry>
807 </row><row><entry
808 align="char">
809<para>int request</para>
810</entry><entry
811 align="char">
812<para>Equals <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> for this
813 command.</para>
814</entry>
815 </row><row><entry
816 align="char">
817<para>uint16_t *strength</para>
818</entry><entry
819 align="char">
820<para>The signal strength value is stored into *strength.</para>
821</entry>
822 </row></tbody></tgroup></informaltable>
823
824&return-value-dvb;
825</section>
826
827<section id="FE_READ_UNCORRECTED_BLOCKS">
828<title>FE_READ_UNCORRECTED_BLOCKS</title>
829<para>DESCRIPTION
830</para>
831<informaltable><tgroup cols="1"><tbody><row><entry
832 align="char">
833<para>This ioctl call returns the number of uncorrected blocks detected by the device
834 driver during its lifetime. For meaningful measurements, the increment in block
835 count during a specific time interval should be calculated. For this command,
836 read-only access to the device is sufficient.</para>
837</entry>
838 </row><row><entry
839 align="char">
840<para>Note that the counter will wrap to zero after its maximum count has been
841 reached.</para>
842</entry>
843 </row></tbody></tgroup></informaltable>
844<para>SYNOPSIS
845</para>
846<informaltable><tgroup cols="1"><tbody><row><entry
847 align="char">
848<para>int ioctl( int fd, int request =
849 <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link>, uint32_t &#x22C6;ublocks);</para>
850</entry>
851 </row></tbody></tgroup></informaltable>
852<para>PARAMETERS
853</para>
854<informaltable><tgroup cols="2"><tbody><row><entry
855 align="char">
856<para>int fd</para>
857</entry><entry
858 align="char">
859<para>File descriptor returned by a previous call to open().</para>
860</entry>
861 </row><row><entry
862 align="char">
863<para>int request</para>
864</entry><entry
865 align="char">
866<para>Equals <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> for this
867 command.</para>
868</entry>
869 </row><row><entry
870 align="char">
871<para>uint32_t *ublocks</para>
872</entry><entry
873 align="char">
874<para>The total number of uncorrected blocks seen by the driver
875 so far.</para>
876</entry>
877 </row></tbody></tgroup></informaltable>
878
879&return-value-dvb;
880</section>
881
882<section id="FE_SET_FRONTEND">
883<title>FE_SET_FRONTEND</title>
884<para>DESCRIPTION
885</para>
886<informaltable><tgroup cols="1"><tbody><row><entry
887 align="char">
888<para>This ioctl call starts a tuning operation using specified parameters. The result
889 of this call will be successful if the parameters were valid and the tuning could
890 be initiated. The result of the tuning operation in itself, however, will arrive
891 asynchronously as an event (see documentation for <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> and
892 FrontendEvent.) If a new <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> operation is initiated before
893 the previous one was completed, the previous operation will be aborted in favor
894 of the new one. This command requires read/write access to the device.</para>
895</entry>
896 </row></tbody></tgroup></informaltable>
897
898<para>SYNOPSIS
899</para>
900<informaltable><tgroup cols="1"><tbody><row><entry
901 align="char">
902<para>int ioctl(int fd, int request = <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link>,
903 struct dvb_frontend_parameters &#x22C6;p);</para>
904</entry>
905 </row></tbody></tgroup></informaltable>
906<para>PARAMETERS
907</para>
908<informaltable><tgroup cols="2"><tbody><row><entry
909 align="char">
910<para>int fd</para>
911</entry><entry
912 align="char">
913<para>File descriptor returned by a previous call to open().</para>
914</entry>
915 </row><row><entry
916 align="char">
917<para>int request</para>
918</entry><entry
919 align="char">
920<para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
921</entry>
922 </row><row><entry
923 align="char">
924<para>struct
925 dvb_frontend_parameters
926 *p</para>
927</entry><entry
928 align="char">
929<para>Points to parameters for tuning operation.</para>
930</entry>
931 </row></tbody></tgroup></informaltable>
932
933&return-value-dvb;
934<informaltable><tgroup cols="2"><tbody><row><entry
935 align="char">
936<para>EINVAL</para>
937</entry><entry
938 align="char">
939<para>Maximum supported symbol rate reached.</para>
940</entry>
941</row></tbody></tgroup></informaltable>
942</section>
943
944<section id="FE_GET_FRONTEND">
945<title>FE_GET_FRONTEND</title>
946<para>DESCRIPTION
947</para>
948<informaltable><tgroup cols="1"><tbody><row><entry
949 align="char">
950<para>This ioctl call queries the currently effective frontend parameters. For this
951 command, read-only access to the device is sufficient.</para>
952</entry>
953 </row></tbody></tgroup></informaltable>
954
955<para>SYNOPSIS
956</para>
957<informaltable><tgroup cols="1"><tbody><row><entry
958 align="char">
959<para>int ioctl(int fd, int request = <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link>,
960 struct dvb_frontend_parameters &#x22C6;p);</para>
961</entry>
962 </row></tbody></tgroup></informaltable>
963
964<para>PARAMETERS
965</para>
966<informaltable><tgroup cols="2"><tbody><row><entry
967 align="char">
968<para>int fd</para>
969</entry><entry
970 align="char">
971<para>File descriptor returned by a previous call to open().</para>
972</entry>
973 </row><row><entry
974 align="char">
975<para>int request</para>
976</entry><entry
977 align="char">
978<para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
979</entry>
980 </row><row><entry
981 align="char">
982<para>struct
983 dvb_frontend_parameters
984 *p</para>
985</entry><entry
986 align="char">
987<para>Points to parameters for tuning operation.</para>
988</entry>
989 </row></tbody></tgroup></informaltable>
990
991&return-value-dvb;
992<informaltable><tgroup cols="2"><tbody><row><entry
993 align="char">
994<para>EINVAL</para>
995</entry><entry
996 align="char">
997<para>Maximum supported symbol rate reached.</para>
998</entry>
999 </row></tbody></tgroup></informaltable>
1000
1001</section>
1002
1003<section id="FE_GET_EVENT">
1004<title>FE_GET_EVENT</title>
1005<para>DESCRIPTION
1006</para>
1007<informaltable><tgroup cols="1"><tbody><row><entry
1008 align="char">
1009<para>This ioctl call returns a frontend event if available. If an event is not
1010 available, the behavior depends on whether the device is in blocking or
1011 non-blocking mode. In the latter case, the call fails immediately with errno
1012 set to EWOULDBLOCK. In the former case, the call blocks until an event
1013 becomes available.</para>
1014</entry>
1015 </row><row><entry
1016 align="char">
1017<para>The standard Linux poll() and/or select() system calls can be used with the
1018 device file descriptor to watch for new events. For select(), the file descriptor
1019 should be included in the exceptfds argument, and for poll(), POLLPRI should
1020 be specified as the wake-up condition. Since the event queue allocated is
1021 rather small (room for 8 events), the queue must be serviced regularly to avoid
1022 overflow. If an overflow happens, the oldest event is discarded from the queue,
1023 and an error (EOVERFLOW) occurs the next time the queue is read. After
1024 reporting the error condition in this fashion, subsequent
1025 <link linkend="FE_GET_EVENT">FE_GET_EVENT</link>
1026 calls will return events from the queue as usual.</para>
1027</entry>
1028 </row><row><entry
1029 align="char">
1030<para>For the sake of implementation simplicity, this command requires read/write
1031 access to the device.</para>
1032</entry>
1033 </row></tbody></tgroup></informaltable>
1034
1035<para>SYNOPSIS
1036</para>
1037<informaltable><tgroup cols="1"><tbody><row><entry
1038 align="char">
1039<para>int ioctl(int fd, int request = QPSK_GET_EVENT,
1040 struct dvb_frontend_event &#x22C6;ev);</para>
1041</entry>
1042 </row></tbody></tgroup></informaltable>
1043
1044<para>PARAMETERS
1045</para>
1046<informaltable><tgroup cols="2"><tbody><row><entry
1047 align="char">
1048<para>int fd</para>
1049</entry><entry
1050 align="char">
1051<para>File descriptor returned by a previous call to open().</para>
1052</entry>
1053 </row><row><entry
1054 align="char">
1055<para>int request</para>
1056</entry><entry
1057 align="char">
1058<para>Equals <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> for this command.</para>
1059</entry>
1060 </row><row><entry
1061 align="char">
1062<para>struct
1063 dvb_frontend_event
1064 *ev</para>
1065</entry><entry
1066 align="char">
1067<para>Points to the location where the event,</para>
1068</entry>
1069 </row><row><entry
1070 align="char">
1071</entry><entry
1072 align="char">
1073<para>if any, is to be stored.</para>
1074</entry>
1075 </row></tbody></tgroup></informaltable>
1076
1077&return-value-dvb;
1078<informaltable><tgroup cols="2"><tbody><row><entry
1079 align="char">
1080<para>EWOULDBLOCK</para>
1081</entry><entry
1082 align="char">
1083<para>There is no event pending, and the device is in
1084 non-blocking mode.</para>
1085</entry>
1086 </row><row><entry
1087 align="char">
1088<para>EOVERFLOW</para>
1089</entry><entry
1090 align="char">
1091<para>Overflow in event queue - one or more events were lost.</para>
1092</entry>
1093</row></tbody></tgroup></informaltable>
1094</section>
1095
1096<section id="FE_GET_INFO">
1097<title>FE_GET_INFO</title>
1098<para>DESCRIPTION
1099</para>
1100<informaltable><tgroup cols="1"><tbody><row><entry
1101 align="char">
1102<para>This ioctl call returns information about the front-end. This call only requires
1103 read-only access to the device.</para>
1104</entry>
1105 </row></tbody></tgroup></informaltable>
1106<para>SYNOPSIS
1107</para>
1108
1109<informaltable><tgroup cols="1"><tbody><row><entry
1110 align="char">
1111<para> int ioctl(int fd, int request = <link linkend="FE_GET_INFO">FE_GET_INFO</link>, struct
1112 dvb_frontend_info &#x22C6;info);</para>
1113</entry>
1114 </row></tbody></tgroup></informaltable>
1115<para>PARAMETERS
1116</para>
1117
1118<informaltable><tgroup cols="2"><tbody><row><entry
1119 align="char">
1120<para>int fd</para>
1121</entry><entry
1122 align="char">
1123<para>File descriptor returned by a previous call to open().</para>
1124</entry>
1125 </row><row><entry
1126 align="char">
1127<para>int request</para>
1128</entry><entry
1129 align="char">
1130<para>Equals <link linkend="FE_GET_INFO">FE_GET_INFO</link> for this command.</para>
1131</entry>
1132 </row><row><entry
1133 align="char">
1134<para>struct
1135 dvb_frontend_info
1136 *info</para>
1137</entry><entry
1138 align="char">
1139<para>Points to the location where the front-end information is
1140 to be stored.</para>
1141</entry>
1142 </row></tbody></tgroup></informaltable>
1143&return-value-dvb;
1144</section>
1145
1146<section id="FE_DISEQC_RESET_OVERLOAD">
1147<title>FE_DISEQC_RESET_OVERLOAD</title>
1148<para>DESCRIPTION
1149</para>
1150<informaltable><tgroup cols="1"><tbody><row><entry
1151 align="char">
1152<para>If the bus has been automatically powered off due to power overload, this ioctl
1153 call restores the power to the bus. The call requires read/write access to the
1154 device. This call has no effect if the device is manually powered off. Not all
1155 DVB adapters support this ioctl.</para>
1156</entry>
1157 </row></tbody></tgroup></informaltable>
1158
1159<para>SYNOPSIS
1160</para>
1161<informaltable><tgroup cols="1"><tbody><row><entry
1162 align="char">
1163<para>int ioctl(int fd, int request =
1164 <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link>);</para>
1165</entry>
1166 </row></tbody></tgroup></informaltable>
1167<para>PARAMETERS
1168</para>
1169<informaltable><tgroup cols="2"><tbody><row><entry
1170 align="char">
1171<para>int fd</para>
1172</entry><entry
1173 align="char">
1174<para>File descriptor returned by a previous call to open().</para>
1175</entry>
1176 </row><row><entry
1177 align="char">
1178<para>int request</para>
1179</entry><entry
1180 align="char">
1181<para>Equals <link linkend="FE_DISEQC_RESET_OVERLOAD">FE_DISEQC_RESET_OVERLOAD</link> for this
1182 command.</para>
1183</entry>
1184 </row></tbody></tgroup></informaltable>
1185
1186&return-value-dvb;
1187</section>
1188
1189<section id="FE_DISEQC_SEND_MASTER_CMD">
1190<title>FE_DISEQC_SEND_MASTER_CMD</title>
1191<para>DESCRIPTION
1192</para>
1193<informaltable><tgroup cols="1"><tbody><row><entry
1194 align="char">
1195<para>This ioctl call is used to send a a DiSEqC command.</para>
1196</entry>
1197 </row></tbody></tgroup></informaltable>
1198<para>SYNOPSIS
1199</para>
1200<informaltable><tgroup cols="1"><tbody><row><entry
1201 align="char">
1202<para>int ioctl(int fd, int request =
1203 <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link>, struct
1204 dvb_diseqc_master_cmd &#x22C6;cmd);</para>
1205</entry>
1206 </row></tbody></tgroup></informaltable>
1207
1208<para>PARAMETERS
1209</para>
1210<informaltable><tgroup cols="2"><tbody><row><entry
1211 align="char">
1212<para>int fd</para>
1213</entry><entry
1214 align="char">
1215<para>File descriptor returned by a previous call to open().</para>
1216</entry>
1217 </row><row><entry
1218 align="char">
1219<para>int request</para>
1220</entry><entry
1221 align="char">
1222<para>Equals <link linkend="FE_DISEQC_SEND_MASTER_CMD">FE_DISEQC_SEND_MASTER_CMD</link> for this
1223 command.</para>
1224</entry>
1225 </row><row><entry
1226 align="char">
1227<para>struct
1228 dvb_diseqc_master_cmd
1229 *cmd</para>
1230</entry><entry
1231 align="char">
1232<para>Pointer to the command to be transmitted.</para>
1233</entry>
1234 </row></tbody></tgroup></informaltable>
1235
1236&return-value-dvb;
1237</section> 269</section>
1238
1239<section id="FE_DISEQC_RECV_SLAVE_REPLY">
1240<title>FE_DISEQC_RECV_SLAVE_REPLY</title>
1241<para>DESCRIPTION
1242</para>
1243<informaltable><tgroup cols="1"><tbody><row><entry
1244 align="char">
1245<para>This ioctl call is used to receive reply to a DiSEqC 2.0 command.</para>
1246</entry>
1247 </row></tbody></tgroup></informaltable>
1248
1249<para>SYNOPSIS
1250</para>
1251<informaltable><tgroup cols="1"><tbody><row><entry
1252 align="char">
1253<para>int ioctl(int fd, int request =
1254 <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link>, struct
1255 dvb_diseqc_slave_reply &#x22C6;reply);</para>
1256</entry>
1257 </row></tbody></tgroup></informaltable>
1258
1259<para>PARAMETERS
1260</para>
1261<informaltable><tgroup cols="2"><tbody><row><entry
1262 align="char">
1263<para>int fd</para>
1264</entry><entry
1265 align="char">
1266<para>File descriptor returned by a previous call to open().</para>
1267</entry>
1268 </row><row><entry
1269 align="char">
1270<para>int request</para>
1271</entry><entry
1272 align="char">
1273<para>Equals <link linkend="FE_DISEQC_RECV_SLAVE_REPLY">FE_DISEQC_RECV_SLAVE_REPLY</link> for this
1274 command.</para>
1275</entry>
1276 </row><row><entry
1277 align="char">
1278<para>struct
1279 dvb_diseqc_slave_reply
1280 *reply</para>
1281</entry><entry
1282 align="char">
1283<para>Pointer to the command to be received.</para>
1284</entry>
1285 </row></tbody></tgroup></informaltable>
1286&return-value-dvb;
1287</section>
1288
1289<section id="FE_DISEQC_SEND_BURST">
1290<title>FE_DISEQC_SEND_BURST</title>
1291<para>DESCRIPTION
1292</para>
1293<informaltable><tgroup cols="1"><tbody><row><entry
1294 align="char">
1295<para>This ioctl call is used to send a 22KHz tone burst.</para>
1296</entry>
1297 </row></tbody></tgroup></informaltable>
1298
1299<para>SYNOPSIS
1300</para>
1301<informaltable><tgroup cols="1"><tbody><row><entry
1302 align="char">
1303<para>int ioctl(int fd, int request =
1304 <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link>, fe_sec_mini_cmd_t burst);</para>
1305</entry>
1306 </row></tbody></tgroup></informaltable>
1307
1308<para>PARAMETERS
1309</para>
1310<informaltable><tgroup cols="2"><tbody><row><entry
1311 align="char">
1312<para>int fd</para>
1313</entry><entry
1314 align="char">
1315<para>File descriptor returned by a previous call to open().</para>
1316</entry>
1317 </row><row><entry
1318 align="char">
1319<para>int request</para>
1320</entry><entry
1321 align="char">
1322<para>Equals <link linkend="FE_DISEQC_SEND_BURST">FE_DISEQC_SEND_BURST</link> for this command.</para>
1323</entry>
1324 </row><row><entry
1325 align="char">
1326<para>fe_sec_mini_cmd_t
1327 burst</para>
1328</entry><entry
1329 align="char">
1330<para>burst A or B.</para>
1331</entry>
1332 </row></tbody></tgroup></informaltable>
1333
1334&return-value-dvb;
1335</section>
1336
1337<section id="FE_SET_TONE">
1338<title>FE_SET_TONE</title>
1339<para>DESCRIPTION
1340</para>
1341<informaltable><tgroup cols="1"><tbody><row><entry
1342 align="char">
1343<para>This call is used to set the generation of the continuous 22kHz tone. This call
1344 requires read/write permissions.</para>
1345</entry>
1346 </row></tbody></tgroup></informaltable>
1347<para>SYNOPSIS
1348</para>
1349<informaltable><tgroup cols="1"><tbody><row><entry
1350 align="char">
1351<para>int ioctl(int fd, int request = <link linkend="FE_SET_TONE">FE_SET_TONE</link>,
1352 fe_sec_tone_mode_t tone);</para>
1353</entry>
1354 </row></tbody></tgroup></informaltable>
1355<para>PARAMETERS
1356</para>
1357<informaltable><tgroup cols="2"><tbody><row><entry
1358 align="char">
1359<para>int fd</para>
1360</entry><entry
1361 align="char">
1362<para>File descriptor returned by a previous call to open().</para>
1363</entry>
1364 </row><row><entry
1365 align="char">
1366<para>int request</para>
1367</entry><entry
1368 align="char">
1369<para>Equals <link linkend="FE_SET_TONE">FE_SET_TONE</link> for this command.</para>
1370</entry>
1371 </row><row><entry
1372 align="char">
1373<para>fe_sec_tone_mode_t
1374 tone</para>
1375</entry><entry
1376 align="char">
1377<para>The requested tone generation mode (on/off).</para>
1378</entry>
1379 </row></tbody></tgroup></informaltable>
1380&return-value-dvb;
1381</section>
1382
1383<section id="FE_SET_VOLTAGE">
1384<title>FE_SET_VOLTAGE</title>
1385<para>DESCRIPTION
1386</para>
1387<informaltable><tgroup cols="1"><tbody><row><entry
1388 align="char">
1389<para>This call is used to set the bus voltage. This call requires read/write
1390 permissions.</para>
1391</entry>
1392 </row></tbody></tgroup></informaltable>
1393<para>SYNOPSIS
1394</para>
1395<informaltable><tgroup cols="1"><tbody><row><entry
1396 align="char">
1397<para>int ioctl(int fd, int request = <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link>,
1398 fe_sec_voltage_t voltage);</para>
1399</entry>
1400 </row></tbody></tgroup></informaltable>
1401
1402<para>PARAMETERS
1403</para>
1404<informaltable><tgroup cols="2"><tbody><row><entry
1405 align="char">
1406<para>int fd</para>
1407</entry><entry
1408 align="char">
1409<para>File descriptor returned by a previous call to open().</para>
1410</entry>
1411 </row><row><entry
1412 align="char">
1413<para>int request</para>
1414</entry><entry
1415 align="char">
1416<para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
1417</entry>
1418 </row><row><entry
1419 align="char">
1420<para>fe_sec_voltage_t
1421 voltage</para>
1422</entry><entry
1423 align="char">
1424<para>The requested bus voltage.</para>
1425</entry>
1426 </row></tbody></tgroup></informaltable>
1427
1428&return-value-dvb;
1429</section>
1430
1431<section id="FE_ENABLE_HIGH_LNB_VOLTAGE">
1432<title>FE_ENABLE_HIGH_LNB_VOLTAGE</title>
1433<para>DESCRIPTION
1434</para>
1435<informaltable><tgroup cols="1"><tbody><row><entry
1436 align="char">
1437<para>If high != 0 enables slightly higher voltages instead of 13/18V (to compensate
1438 for long cables). This call requires read/write permissions. Not all DVB
1439 adapters support this ioctl.</para>
1440</entry>
1441 </row></tbody></tgroup></informaltable>
1442
1443<para>SYNOPSIS
1444</para>
1445<informaltable><tgroup cols="1"><tbody><row><entry
1446 align="char">
1447<para>int ioctl(int fd, int request =
1448 <link linkend="FE_ENABLE_HIGH_LNB_VOLTAGE">FE_ENABLE_HIGH_LNB_VOLTAGE</link>, int high);</para>
1449</entry>
1450 </row></tbody></tgroup></informaltable>
1451
1452<para>PARAMETERS
1453</para>
1454<informaltable><tgroup cols="2"><tbody><row><entry
1455 align="char">
1456<para>int fd</para>
1457</entry><entry
1458 align="char">
1459<para>File descriptor returned by a previous call to open().</para>
1460</entry>
1461 </row><row><entry
1462 align="char">
1463<para>int request</para>
1464</entry><entry
1465 align="char">
1466<para>Equals <link linkend="FE_SET_VOLTAGE">FE_SET_VOLTAGE</link> for this command.</para>
1467</entry>
1468 </row><row><entry
1469 align="char">
1470<para>int high</para>
1471</entry><entry
1472 align="char">
1473<para>The requested bus voltage.</para>
1474</entry>
1475 </row></tbody></tgroup></informaltable>
1476
1477&return-value-dvb;
1478</section>
1479
1480<section id="FE_SET_FRONTEND_TUNE_MODE">
1481<title>FE_SET_FRONTEND_TUNE_MODE</title>
1482<para>DESCRIPTION</para>
1483<informaltable><tgroup cols="1"><tbody><row>
1484<entry align="char">
1485<para>Allow setting tuner mode flags to the frontend.</para>
1486</entry>
1487</row></tbody></tgroup></informaltable>
1488
1489<para>SYNOPSIS</para>
1490<informaltable><tgroup cols="1"><tbody><row>
1491<entry align="char">
1492<para>int ioctl(int fd, int request =
1493<link linkend="FE_SET_FRONTEND_TUNE_MODE">FE_SET_FRONTEND_TUNE_MODE</link>, unsigned int flags);</para>
1494</entry>
1495</row></tbody></tgroup></informaltable>
1496
1497<para>PARAMETERS</para>
1498<informaltable><tgroup cols="2"><tbody><row>
1499<entry align="char">
1500 <para>unsigned int flags</para>
1501</entry>
1502<entry align="char">
1503<para>
1504FE_TUNE_MODE_ONESHOT When set, this flag will disable any zigzagging or other "normal" tuning behaviour. Additionally, there will be no automatic monitoring of the lock status, and hence no frontend events will be generated. If a frontend device is closed, this flag will be automatically turned off when the device is reopened read-write.
1505</para>
1506</entry>
1507 </row></tbody></tgroup></informaltable>
1508
1509&return-value-dvb;
1510</section>
1511
1512<section id="FE_DISHNETWORK_SEND_LEGACY_CMD">
1513 <title>FE_DISHNETWORK_SEND_LEGACY_CMD</title>
1514<para>DESCRIPTION</para>
1515<informaltable><tgroup cols="1"><tbody><row>
1516<entry align="char">
1517<para>WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers.</para>
1518<para>It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches.</para>
1519<para>As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004.</para>
1520</entry>
1521</row></tbody></tgroup></informaltable>
1522
1523<para>SYNOPSIS</para>
1524<informaltable><tgroup cols="1"><tbody><row>
1525<entry align="char">
1526<para>int ioctl(int fd, int request =
1527 <link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link>, unsigned long cmd);</para>
1528</entry>
1529</row></tbody></tgroup></informaltable>
1530
1531<para>PARAMETERS</para>
1532<informaltable><tgroup cols="2"><tbody><row>
1533<entry align="char">
1534 <para>unsigned long cmd</para>
1535</entry>
1536<entry align="char">
1537<para>
1538sends the specified raw cmd to the dish via DISEqC.
1539</para>
1540</entry>
1541 </row></tbody></tgroup></informaltable>
1542
1543&return-value-dvb;
1544</section>
1545
1546</section>
1547
1548&sub-dvbproperty;
diff --git a/Documentation/DocBook/media/dvb/frontend_legacy_api.xml b/Documentation/DocBook/media/dvb/frontend_legacy_api.xml
new file mode 100644
index 000000000000..8fadf3a4ba44
--- /dev/null
+++ b/Documentation/DocBook/media/dvb/frontend_legacy_api.xml
@@ -0,0 +1,654 @@
1<section id="frontend_legacy_types">
2<title>Frontend Legacy Data Types</title>
3
4<section id="fe-type-t">
5<title>Frontend type</title>
6
7<para>For historical reasons, frontend types are named by the type of modulation
8 used in transmission. The fontend types are given by fe_type_t type, defined as:</para>
9
10<table pgwide="1" frame="none" id="fe-type">
11<title>Frontend types</title>
12<tgroup cols="3">
13 &cs-def;
14 <thead>
15 <row>
16 <entry>fe_type</entry>
17 <entry>Description</entry>
18 <entry><link linkend="DTV-DELIVERY-SYSTEM">DTV_DELIVERY_SYSTEM</link> equivalent type</entry>
19 </row>
20 </thead>
21 <tbody valign="top">
22 <row>
23 <entry id="FE-QPSK"><constant>FE_QPSK</constant></entry>
24 <entry>For DVB-S standard</entry>
25 <entry><constant>SYS_DVBS</constant></entry>
26 </row>
27 <row>
28 <entry id="FE-QAM"><constant>FE_QAM</constant></entry>
29 <entry>For DVB-C annex A standard</entry>
30 <entry><constant>SYS_DVBC_ANNEX_A</constant></entry>
31 </row>
32 <row>
33 <entry id="FE-OFDM"><constant>FE_OFDM</constant></entry>
34 <entry>For DVB-T standard</entry>
35 <entry><constant>SYS_DVBT</constant></entry>
36 </row>
37 <row>
38 <entry id="FE-ATSC"><constant>FE_ATSC</constant></entry>
39 <entry>For ATSC standard (terrestrial) or for DVB-C Annex B (cable) used in US.</entry>
40 <entry><constant>SYS_ATSC</constant> (terrestrial) or <constant>SYS_DVBC_ANNEX_B</constant> (cable)</entry>
41 </row>
42</tbody></tgroup></table>
43
44<para>Newer formats like DVB-S2, ISDB-T, ISDB-S and DVB-T2 are not described at the above, as they're
45supported via the new <link linkend="FE_GET_PROPERTY">FE_GET_PROPERTY/FE_GET_SET_PROPERTY</link> ioctl's, using the <link linkend="DTV-DELIVERY-SYSTEM">DTV_DELIVERY_SYSTEM</link> parameter.
46</para>
47
48<para>In the old days, &dvb-frontend-info; used to contain
49 <constant>fe_type_t</constant> field to indicate the delivery systems,
50 filled with either FE_QPSK, FE_QAM, FE_OFDM or FE_ATSC. While this is
51 still filled to keep backward compatibility, the usage of this
52 field is deprecated, as it can report just one delivery system, but some
53 devices support multiple delivery systems. Please use
54 <link linkend="DTV-ENUM-DELSYS">DTV_ENUM_DELSYS</link> instead.
55</para>
56<para>On devices that support multiple delivery systems,
57 &dvb-frontend-info;::<constant>fe_type_t</constant> is filled with the
58 currently standard, as selected by the last call to
59 <link linkend="FE_GET_PROPERTY">FE_SET_PROPERTY</link>
60 using the &DTV-DELIVERY-SYSTEM; property.</para>
61</section>
62
63<section id="fe-bandwidth-t">
64<title>Frontend bandwidth</title>
65
66<table pgwide="1" frame="none" id="fe-bandwidth">
67 <title>enum fe_bandwidth</title>
68 <tgroup cols="2">
69 &cs-def;
70 <thead>
71 <row>
72 <entry>ID</entry>
73 <entry>Description</entry>
74 </row>
75 </thead>
76 <tbody valign="top">
77 <row>
78 <entry id="BANDWIDTH-AUTO"><constant>BANDWIDTH_AUTO</constant></entry>
79 <entry>Autodetect bandwidth (if supported)</entry>
80 </row><row>
81 <entry id="BANDWIDTH-1-712-MHZ"><constant>BANDWIDTH_1_712_MHZ</constant></entry>
82 <entry>1.712 MHz</entry>
83 </row><row>
84 <entry id="BANDWIDTH-5-MHZ"><constant>BANDWIDTH_5_MHZ</constant></entry>
85 <entry>5 MHz</entry>
86 </row><row>
87 <entry id="BANDWIDTH-6-MHZ"><constant>BANDWIDTH_6_MHZ</constant></entry>
88 <entry>6 MHz</entry>
89 </row><row>
90 <entry id="BANDWIDTH-7-MHZ"><constant>BANDWIDTH_7_MHZ</constant></entry>
91 <entry>7 MHz</entry>
92 </row><row>
93 <entry id="BANDWIDTH-8-MHZ"><constant>BANDWIDTH_8_MHZ</constant></entry>
94 <entry>8 MHz</entry>
95 </row><row>
96 <entry id="BANDWIDTH-10-MHZ"><constant>BANDWIDTH_10_MHZ</constant></entry>
97 <entry>10 MHz</entry>
98 </row>
99 </tbody>
100 </tgroup>
101</table>
102
103</section>
104
105<section id="dvb-frontend-parameters">
106<title>frontend parameters</title>
107<para>The kind of parameters passed to the frontend device for tuning depend on
108the kind of hardware you are using.</para>
109<para>The struct <constant>dvb_frontend_parameters</constant> uses an
110union with specific per-system parameters. However, as newer delivery systems
111required more data, the structure size weren't enough to fit, and just
112extending its size would break the existing applications. So, those parameters
113were replaced by the usage of <link linkend="FE_GET_PROPERTY">
114<constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant></link> ioctl's. The
115new API is flexible enough to add new parameters to existing delivery systems,
116and to add newer delivery systems.</para>
117<para>So, newer applications should use <link linkend="FE_GET_PROPERTY">
118<constant>FE_GET_PROPERTY/FE_SET_PROPERTY</constant></link> instead, in
119order to be able to support the newer System Delivery like DVB-S2, DVB-T2,
120DVB-C2, ISDB, etc.</para>
121<para>All kinds of parameters are combined as an union in the FrontendParameters structure:
122<programlisting>
123struct dvb_frontend_parameters {
124 uint32_t frequency; /&#x22C6; (absolute) frequency in Hz for QAM/OFDM &#x22C6;/
125 /&#x22C6; intermediate frequency in kHz for QPSK &#x22C6;/
126 &fe-spectral-inversion-t; inversion;
127 union {
128 struct dvb_qpsk_parameters qpsk;
129 struct dvb_qam_parameters qam;
130 struct dvb_ofdm_parameters ofdm;
131 struct dvb_vsb_parameters vsb;
132 } u;
133};
134</programlisting></para>
135<para>In the case of QPSK frontends the <constant>frequency</constant> field specifies the intermediate
136frequency, i.e. the offset which is effectively added to the local oscillator frequency (LOF) of
137the LNB. The intermediate frequency has to be specified in units of kHz. For QAM and
138OFDM frontends the <constant>frequency</constant> specifies the absolute frequency and is given in Hz.
139</para>
140
141<section id="dvb-qpsk-parameters">
142<title>QPSK parameters</title>
143<para>For satellite QPSK frontends you have to use the <constant>dvb_qpsk_parameters</constant> structure:</para>
144<programlisting>
145 struct dvb_qpsk_parameters {
146 uint32_t symbol_rate; /&#x22C6; symbol rate in Symbols per second &#x22C6;/
147 &fe-code-rate-t; fec_inner; /&#x22C6; forward error correction (see above) &#x22C6;/
148 };
149</programlisting>
150</section>
151
152<section id="dvb-qam-parameters">
153<title>QAM parameters</title>
154<para>for cable QAM frontend you use the <constant>dvb_qam_parameters</constant> structure:</para>
155<programlisting>
156 struct dvb_qam_parameters {
157 uint32_t symbol_rate; /&#x22C6; symbol rate in Symbols per second &#x22C6;/
158 &fe-code-rate-t; fec_inner; /&#x22C6; forward error correction (see above) &#x22C6;/
159 &fe-modulation-t; modulation; /&#x22C6; modulation type (see above) &#x22C6;/
160 };
161</programlisting>
162</section>
163
164<section id="dvb-vsb-parameters">
165<title>VSB parameters</title>
166<para>ATSC frontends are supported by the <constant>dvb_vsb_parameters</constant> structure:</para>
167<programlisting>
168struct dvb_vsb_parameters {
169 &fe-modulation-t; modulation; /&#x22C6; modulation type (see above) &#x22C6;/
170};
171</programlisting>
172</section>
173
174<section id="dvb-ofdm-parameters">
175<title>OFDM parameters</title>
176<para>DVB-T frontends are supported by the <constant>dvb_ofdm_parameters</constant> structure:</para>
177<programlisting>
178 struct dvb_ofdm_parameters {
179 &fe-bandwidth-t; bandwidth;
180 &fe-code-rate-t; code_rate_HP; /&#x22C6; high priority stream code rate &#x22C6;/
181 &fe-code-rate-t; code_rate_LP; /&#x22C6; low priority stream code rate &#x22C6;/
182 &fe-modulation-t; constellation; /&#x22C6; modulation type (see above) &#x22C6;/
183 &fe-transmit-mode-t; transmission_mode;
184 &fe-guard-interval-t; guard_interval;
185 &fe-hierarchy-t; hierarchy_information;
186 };
187</programlisting>
188</section>
189</section>
190
191<section id="dvb-frontend-event">
192<title>frontend events</title>
193 <programlisting>
194 struct dvb_frontend_event {
195 fe_status_t status;
196 struct dvb_frontend_parameters parameters;
197 };
198</programlisting>
199 </section>
200</section>
201
202<section id="frontend_legacy_fcalls">
203<title>Frontend Legacy Function Calls</title>
204
205<para>Those functions are defined at DVB version 3. The support is kept in
206 the kernel due to compatibility issues only. Their usage is strongly
207 not recommended</para>
208
209<section id="FE_READ_BER">
210<title>FE_READ_BER</title>
211<para>DESCRIPTION
212</para>
213<informaltable><tgroup cols="1"><tbody><row><entry
214 align="char">
215<para>This ioctl call returns the bit error rate for the signal currently
216 received/demodulated by the front-end. For this command, read-only access to
217 the device is sufficient.</para>
218</entry>
219 </row></tbody></tgroup></informaltable>
220<para>SYNOPSIS
221</para>
222<informaltable><tgroup cols="1"><tbody><row><entry
223 align="char">
224<para>int ioctl(int fd, int request = <link linkend="FE_READ_BER">FE_READ_BER</link>,
225 uint32_t &#x22C6;ber);</para>
226</entry>
227 </row></tbody></tgroup></informaltable>
228<para>PARAMETERS
229</para>
230<informaltable><tgroup cols="2"><tbody><row><entry
231 align="char">
232<para>int fd</para>
233</entry><entry
234 align="char">
235<para>File descriptor returned by a previous call to open().</para>
236</entry>
237 </row><row><entry
238 align="char">
239<para>int request</para>
240</entry><entry
241 align="char">
242<para>Equals <link linkend="FE_READ_BER">FE_READ_BER</link> for this command.</para>
243</entry>
244 </row><row><entry
245 align="char">
246<para>uint32_t *ber</para>
247</entry><entry
248 align="char">
249<para>The bit error rate is stored into *ber.</para>
250</entry>
251 </row></tbody></tgroup></informaltable>
252
253&return-value-dvb;
254</section>
255
256<section id="FE_READ_SNR">
257<title>FE_READ_SNR</title>
258
259<para>DESCRIPTION
260</para>
261<informaltable><tgroup cols="1"><tbody><row><entry
262 align="char">
263<para>This ioctl call returns the signal-to-noise ratio for the signal currently received
264 by the front-end. For this command, read-only access to the device is sufficient.</para>
265</entry>
266 </row></tbody></tgroup></informaltable>
267<para>SYNOPSIS
268</para>
269<informaltable><tgroup cols="1"><tbody><row><entry
270 align="char">
271<para>int ioctl(int fd, int request = <link linkend="FE_READ_SNR">FE_READ_SNR</link>, uint16_t
272 &#x22C6;snr);</para>
273</entry>
274 </row></tbody></tgroup></informaltable>
275<para>PARAMETERS
276</para>
277<informaltable><tgroup cols="2"><tbody><row><entry
278 align="char">
279<para>int fd</para>
280</entry><entry
281 align="char">
282<para>File descriptor returned by a previous call to open().</para>
283</entry>
284 </row><row><entry
285 align="char">
286<para>int request</para>
287</entry><entry
288 align="char">
289<para>Equals <link linkend="FE_READ_SNR">FE_READ_SNR</link> for this command.</para>
290</entry>
291 </row><row><entry
292 align="char">
293<para>uint16_t *snr</para>
294</entry><entry
295 align="char">
296<para>The signal-to-noise ratio is stored into *snr.</para>
297</entry>
298 </row></tbody></tgroup></informaltable>
299
300&return-value-dvb;
301</section>
302
303<section id="FE_READ_SIGNAL_STRENGTH">
304<title>FE_READ_SIGNAL_STRENGTH</title>
305<para>DESCRIPTION
306</para>
307<informaltable><tgroup cols="1"><tbody><row><entry
308 align="char">
309<para>This ioctl call returns the signal strength value for the signal currently received
310 by the front-end. For this command, read-only access to the device is sufficient.</para>
311</entry>
312 </row></tbody></tgroup></informaltable>
313<para>SYNOPSIS
314</para>
315<informaltable><tgroup cols="1"><tbody><row><entry
316 align="char">
317<para>int ioctl( int fd, int request =
318 <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, uint16_t &#x22C6;strength);</para>
319</entry>
320 </row></tbody></tgroup></informaltable>
321
322<para>PARAMETERS
323</para>
324<informaltable><tgroup cols="2"><tbody><row><entry
325 align="char">
326<para>int fd</para>
327</entry><entry
328 align="char">
329<para>File descriptor returned by a previous call to open().</para>
330</entry>
331 </row><row><entry
332 align="char">
333<para>int request</para>
334</entry><entry
335 align="char">
336<para>Equals <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link> for this
337 command.</para>
338</entry>
339 </row><row><entry
340 align="char">
341<para>uint16_t *strength</para>
342</entry><entry
343 align="char">
344<para>The signal strength value is stored into *strength.</para>
345</entry>
346 </row></tbody></tgroup></informaltable>
347
348&return-value-dvb;
349</section>
350
351<section id="FE_READ_UNCORRECTED_BLOCKS">
352<title>FE_READ_UNCORRECTED_BLOCKS</title>
353<para>DESCRIPTION
354</para>
355<informaltable><tgroup cols="1"><tbody><row><entry
356 align="char">
357<para>This ioctl call returns the number of uncorrected blocks detected by the device
358 driver during its lifetime. For meaningful measurements, the increment in block
359 count during a specific time interval should be calculated. For this command,
360 read-only access to the device is sufficient.</para>
361</entry>
362 </row><row><entry
363 align="char">
364<para>Note that the counter will wrap to zero after its maximum count has been
365 reached.</para>
366</entry>
367 </row></tbody></tgroup></informaltable>
368<para>SYNOPSIS
369</para>
370<informaltable><tgroup cols="1"><tbody><row><entry
371 align="char">
372<para>int ioctl( int fd, int request =
373 <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link>, uint32_t &#x22C6;ublocks);</para>
374</entry>
375 </row></tbody></tgroup></informaltable>
376<para>PARAMETERS
377</para>
378<informaltable><tgroup cols="2"><tbody><row><entry
379 align="char">
380<para>int fd</para>
381</entry><entry
382 align="char">
383<para>File descriptor returned by a previous call to open().</para>
384</entry>
385 </row><row><entry
386 align="char">
387<para>int request</para>
388</entry><entry
389 align="char">
390<para>Equals <link linkend="FE_READ_UNCORRECTED_BLOCKS">FE_READ_UNCORRECTED_BLOCKS</link> for this
391 command.</para>
392</entry>
393 </row><row><entry
394 align="char">
395<para>uint32_t *ublocks</para>
396</entry><entry
397 align="char">
398<para>The total number of uncorrected blocks seen by the driver
399 so far.</para>
400</entry>
401 </row></tbody></tgroup></informaltable>
402
403&return-value-dvb;
404</section>
405
406<section id="FE_SET_FRONTEND">
407<title>FE_SET_FRONTEND</title>
408<para>DESCRIPTION
409</para>
410<informaltable><tgroup cols="1"><tbody><row><entry
411 align="char">
412<para>This ioctl call starts a tuning operation using specified parameters. The result
413 of this call will be successful if the parameters were valid and the tuning could
414 be initiated. The result of the tuning operation in itself, however, will arrive
415 asynchronously as an event (see documentation for <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> and
416 FrontendEvent.) If a new <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> operation is initiated before
417 the previous one was completed, the previous operation will be aborted in favor
418 of the new one. This command requires read/write access to the device.</para>
419</entry>
420 </row></tbody></tgroup></informaltable>
421
422<para>SYNOPSIS
423</para>
424<informaltable><tgroup cols="1"><tbody><row><entry
425 align="char">
426<para>int ioctl(int fd, int request = <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link>,
427 struct dvb_frontend_parameters &#x22C6;p);</para>
428</entry>
429 </row></tbody></tgroup></informaltable>
430<para>PARAMETERS
431</para>
432<informaltable><tgroup cols="2"><tbody><row><entry
433 align="char">
434<para>int fd</para>
435</entry><entry
436 align="char">
437<para>File descriptor returned by a previous call to open().</para>
438</entry>
439 </row><row><entry
440 align="char">
441<para>int request</para>
442</entry><entry
443 align="char">
444<para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
445</entry>
446 </row><row><entry
447 align="char">
448<para>struct
449 dvb_frontend_parameters
450 *p</para>
451</entry><entry
452 align="char">
453<para>Points to parameters for tuning operation.</para>
454</entry>
455 </row></tbody></tgroup></informaltable>
456
457&return-value-dvb;
458<informaltable><tgroup cols="2"><tbody><row><entry
459 align="char">
460<para>EINVAL</para>
461</entry><entry
462 align="char">
463<para>Maximum supported symbol rate reached.</para>
464</entry>
465</row></tbody></tgroup></informaltable>
466</section>
467
468<section id="FE_GET_FRONTEND">
469<title>FE_GET_FRONTEND</title>
470<para>DESCRIPTION
471</para>
472<informaltable><tgroup cols="1"><tbody><row><entry
473 align="char">
474<para>This ioctl call queries the currently effective frontend parameters. For this
475 command, read-only access to the device is sufficient.</para>
476</entry>
477 </row></tbody></tgroup></informaltable>
478
479<para>SYNOPSIS
480</para>
481<informaltable><tgroup cols="1"><tbody><row><entry
482 align="char">
483<para>int ioctl(int fd, int request = <link linkend="FE_GET_FRONTEND">FE_GET_FRONTEND</link>,
484 struct dvb_frontend_parameters &#x22C6;p);</para>
485</entry>
486 </row></tbody></tgroup></informaltable>
487
488<para>PARAMETERS
489</para>
490<informaltable><tgroup cols="2"><tbody><row><entry
491 align="char">
492<para>int fd</para>
493</entry><entry
494 align="char">
495<para>File descriptor returned by a previous call to open().</para>
496</entry>
497 </row><row><entry
498 align="char">
499<para>int request</para>
500</entry><entry
501 align="char">
502<para>Equals <link linkend="FE_SET_FRONTEND">FE_SET_FRONTEND</link> for this command.</para>
503</entry>
504 </row><row><entry
505 align="char">
506<para>struct
507 dvb_frontend_parameters
508 *p</para>
509</entry><entry
510 align="char">
511<para>Points to parameters for tuning operation.</para>
512</entry>
513 </row></tbody></tgroup></informaltable>
514
515&return-value-dvb;
516<informaltable><tgroup cols="2"><tbody><row><entry
517 align="char">
518<para>EINVAL</para>
519</entry><entry
520 align="char">
521<para>Maximum supported symbol rate reached.</para>
522</entry>
523 </row></tbody></tgroup></informaltable>
524
525</section>
526
527<section id="FE_GET_EVENT">
528<title>FE_GET_EVENT</title>
529<para>DESCRIPTION
530</para>
531<informaltable><tgroup cols="1"><tbody><row><entry
532 align="char">
533<para>This ioctl call returns a frontend event if available. If an event is not
534 available, the behavior depends on whether the device is in blocking or
535 non-blocking mode. In the latter case, the call fails immediately with errno
536 set to EWOULDBLOCK. In the former case, the call blocks until an event
537 becomes available.</para>
538</entry>
539 </row><row><entry
540 align="char">
541<para>The standard Linux poll() and/or select() system calls can be used with the
542 device file descriptor to watch for new events. For select(), the file descriptor
543 should be included in the exceptfds argument, and for poll(), POLLPRI should
544 be specified as the wake-up condition. Since the event queue allocated is
545 rather small (room for 8 events), the queue must be serviced regularly to avoid
546 overflow. If an overflow happens, the oldest event is discarded from the queue,
547 and an error (EOVERFLOW) occurs the next time the queue is read. After
548 reporting the error condition in this fashion, subsequent
549 <link linkend="FE_GET_EVENT">FE_GET_EVENT</link>
550 calls will return events from the queue as usual.</para>
551</entry>
552 </row><row><entry
553 align="char">
554<para>For the sake of implementation simplicity, this command requires read/write
555 access to the device.</para>
556</entry>
557 </row></tbody></tgroup></informaltable>
558
559<para>SYNOPSIS
560</para>
561<informaltable><tgroup cols="1"><tbody><row><entry
562 align="char">
563<para>int ioctl(int fd, int request = QPSK_GET_EVENT,
564 struct dvb_frontend_event &#x22C6;ev);</para>
565</entry>
566 </row></tbody></tgroup></informaltable>
567
568<para>PARAMETERS
569</para>
570<informaltable><tgroup cols="2"><tbody><row><entry
571 align="char">
572<para>int fd</para>
573</entry><entry
574 align="char">
575<para>File descriptor returned by a previous call to open().</para>
576</entry>
577 </row><row><entry
578 align="char">
579<para>int request</para>
580</entry><entry
581 align="char">
582<para>Equals <link linkend="FE_GET_EVENT">FE_GET_EVENT</link> for this command.</para>
583</entry>
584 </row><row><entry
585 align="char">
586<para>struct
587 dvb_frontend_event
588 *ev</para>
589</entry><entry
590 align="char">
591<para>Points to the location where the event,</para>
592</entry>
593 </row><row><entry
594 align="char">
595</entry><entry
596 align="char">
597<para>if any, is to be stored.</para>
598</entry>
599 </row></tbody></tgroup></informaltable>
600
601&return-value-dvb;
602<informaltable><tgroup cols="2"><tbody><row><entry
603 align="char">
604<para>EWOULDBLOCK</para>
605</entry><entry
606 align="char">
607<para>There is no event pending, and the device is in
608 non-blocking mode.</para>
609</entry>
610 </row><row><entry
611 align="char">
612<para>EOVERFLOW</para>
613</entry><entry
614 align="char">
615<para>Overflow in event queue - one or more events were lost.</para>
616</entry>
617</row></tbody></tgroup></informaltable>
618</section>
619
620<section id="FE_DISHNETWORK_SEND_LEGACY_CMD">
621 <title>FE_DISHNETWORK_SEND_LEGACY_CMD</title>
622<para>DESCRIPTION</para>
623<informaltable><tgroup cols="1"><tbody><row>
624<entry align="char">
625<para>WARNING: This is a very obscure legacy command, used only at stv0299 driver. Should not be used on newer drivers.</para>
626<para>It provides a non-standard method for selecting Diseqc voltage on the frontend, for Dish Network legacy switches.</para>
627<para>As support for this ioctl were added in 2004, this means that such dishes were already legacy in 2004.</para>
628</entry>
629</row></tbody></tgroup></informaltable>
630
631<para>SYNOPSIS</para>
632<informaltable><tgroup cols="1"><tbody><row>
633<entry align="char">
634<para>int ioctl(int fd, int request =
635 <link linkend="FE_DISHNETWORK_SEND_LEGACY_CMD">FE_DISHNETWORK_SEND_LEGACY_CMD</link>, unsigned long cmd);</para>
636</entry>
637</row></tbody></tgroup></informaltable>
638
639<para>PARAMETERS</para>
640<informaltable><tgroup cols="2"><tbody><row>
641<entry align="char">
642 <para>unsigned long cmd</para>
643</entry>
644<entry align="char">
645<para>
646sends the specified raw cmd to the dish via DISEqC.
647</para>
648</entry>
649 </row></tbody></tgroup></informaltable>
650
651&return-value-dvb;
652</section>
653
654</section>
diff --git a/Documentation/DocBook/media/dvb/intro.xml b/Documentation/DocBook/media/dvb/intro.xml
index 2048b53d19b9..bcc72c216402 100644
--- a/Documentation/DocBook/media/dvb/intro.xml
+++ b/Documentation/DocBook/media/dvb/intro.xml
@@ -129,41 +129,41 @@ hardware. It can depend on the individual security requirements of the
129platform, if and how many of the CA functions are made available to the 129platform, if and how many of the CA functions are made available to the
130application through this device.</para> 130application through this device.</para>
131 131
132<para>All devices can be found in the <emphasis role="tt">/dev</emphasis> 132<para>All devices can be found in the <constant>/dev</constant>
133tree under <emphasis role="tt">/dev/dvb</emphasis>. The individual devices 133tree under <constant>/dev/dvb</constant>. The individual devices
134are called:</para> 134are called:</para>
135 135
136<itemizedlist> 136<itemizedlist>
137<listitem> 137<listitem>
138 138
139<para><emphasis role="tt">/dev/dvb/adapterN/audioM</emphasis>,</para> 139<para><constant>/dev/dvb/adapterN/audioM</constant>,</para>
140</listitem> 140</listitem>
141<listitem> 141<listitem>
142<para><emphasis role="tt">/dev/dvb/adapterN/videoM</emphasis>,</para> 142<para><constant>/dev/dvb/adapterN/videoM</constant>,</para>
143</listitem> 143</listitem>
144<listitem> 144<listitem>
145<para><emphasis role="tt">/dev/dvb/adapterN/frontendM</emphasis>,</para> 145<para><constant>/dev/dvb/adapterN/frontendM</constant>,</para>
146</listitem> 146</listitem>
147 <listitem> 147 <listitem>
148 148
149<para><emphasis role="tt">/dev/dvb/adapterN/netM</emphasis>,</para> 149<para><constant>/dev/dvb/adapterN/netM</constant>,</para>
150</listitem> 150</listitem>
151 <listitem> 151 <listitem>
152 152
153<para><emphasis role="tt">/dev/dvb/adapterN/demuxM</emphasis>,</para> 153<para><constant>/dev/dvb/adapterN/demuxM</constant>,</para>
154</listitem> 154</listitem>
155 <listitem> 155 <listitem>
156 156
157<para><emphasis role="tt">/dev/dvb/adapterN/dvrM</emphasis>,</para> 157<para><constant>/dev/dvb/adapterN/dvrM</constant>,</para>
158</listitem> 158</listitem>
159 <listitem> 159 <listitem>
160 160
161<para><emphasis role="tt">/dev/dvb/adapterN/caM</emphasis>,</para></listitem></itemizedlist> 161<para><constant>/dev/dvb/adapterN/caM</constant>,</para></listitem></itemizedlist>
162 162
163<para>where N enumerates the DVB PCI cards in a system starting 163<para>where N enumerates the DVB PCI cards in a system starting
164from&#x00A0;0, and M enumerates the devices of each type within each 164from&#x00A0;0, and M enumerates the devices of each type within each
165adapter, starting from&#x00A0;0, too. We will omit the &#8220;<emphasis 165adapter, starting from&#x00A0;0, too. We will omit the &#8220;
166role="tt">/dev/dvb/adapterN/</emphasis>&#8221; in the further dicussion 166<constant>/dev/dvb/adapterN/</constant>&#8221; in the further dicussion
167of these devices. The naming scheme for the devices is the same wheter 167of these devices. The naming scheme for the devices is the same wheter
168devfs is used or not.</para> 168devfs is used or not.</para>
169 169
@@ -202,10 +202,10 @@ a partial path like:</para>
202</programlisting> 202</programlisting>
203 203
204<para>To enable applications to support different API version, an 204<para>To enable applications to support different API version, an
205additional include file <emphasis 205additional include file
206role="tt">linux/dvb/version.h</emphasis> exists, which defines the 206<constant>linux/dvb/version.h</constant> exists, which defines the
207constant <emphasis role="tt">DVB_API_VERSION</emphasis>. This document 207constant <constant>DVB_API_VERSION</constant>. This document
208describes <emphasis role="tt">DVB_API_VERSION 5.8</emphasis>. 208describes <constant>DVB_API_VERSION 5.10</constant>.
209</para> 209</para>
210 210
211</section> 211</section>
diff --git a/Documentation/DocBook/media/dvb/kdapi.xml b/Documentation/DocBook/media/dvb/kdapi.xml
index 6c11ec52cbee..68bcd33a82c3 100644
--- a/Documentation/DocBook/media/dvb/kdapi.xml
+++ b/Documentation/DocBook/media/dvb/kdapi.xml
@@ -1,8 +1,8 @@
1<title>Kernel Demux API</title> 1<title>Kernel Demux API</title>
2<para>The kernel demux API defines a driver-internal interface for registering low-level, 2<para>The kernel demux API defines a driver-internal interface for registering low-level,
3hardware specific driver to a hardware independent demux layer. It is only of interest for 3hardware specific driver to a hardware independent demux layer. It is only of interest for
4DVB device driver writers. The header file for this API is named <emphasis role="tt">demux.h</emphasis> and located in 4DVB device driver writers. The header file for this API is named <constant>demux.h</constant> and located in
5<emphasis role="tt">drivers/media/dvb-core</emphasis>. 5<constant>">drivers/media/dvb-core</constant>.
6</para> 6</para>
7<para>Maintainer note: This section must be reviewed. It is probably out of date. 7<para>Maintainer note: This section must be reviewed. It is probably out of date.
8</para> 8</para>
diff --git a/Documentation/DocBook/media/dvb/net.xml b/Documentation/DocBook/media/dvb/net.xml
index a193e86941b5..d2e44b7e07df 100644
--- a/Documentation/DocBook/media/dvb/net.xml
+++ b/Documentation/DocBook/media/dvb/net.xml
@@ -1,156 +1,238 @@
1<title>DVB Network API</title> 1<title>DVB Network API</title>
2<para>The DVB net device enables feeding of MPE (multi protocol encapsulation) packets 2<para>The DVB net device controls the mapping of data packages that are
3received via DVB into the Linux network protocol stack, e.g. for internet via satellite 3 part of a transport stream to be mapped into a virtual network interface,
4applications. It can be accessed through <emphasis role="tt">/dev/dvb/adapter0/net0</emphasis>. Data types and 4 visible through the standard Linux network protocol stack.</para>
5and ioctl definitions can be accessed by including <emphasis role="tt">linux/dvb/net.h</emphasis> in your 5<para>Currently, two encapsulations are supported:</para>
6application. 6<itemizedlist>
7</para> 7 <listitem><para><ulink url="http://en.wikipedia.org/wiki/Multiprotocol_Encapsulation">
8<section id="dvb_net_types"> 8 Multi Protocol Encapsulation (MPE)</ulink></para></listitem>
9<title>DVB Net Data Types</title> 9 <listitem><para><ulink url="http://en.wikipedia.org/wiki/Unidirectional_Lightweight_Encapsulation">
10 10 Ultra Lightweight Encapsulation (ULE)</ulink></para></listitem>
11<section id="dvb-net-if"> 11</itemizedlist>
12<title>struct dvb_net_if</title> 12
13<programlisting> 13<para>In order to create the Linux virtual network interfaces, an application
14struct dvb_net_if { 14 needs to tell to the Kernel what are the PIDs and the encapsulation types
15 __u16 pid; 15 that are present on the transport stream. This is done through
16 __u16 if_num; 16 <constant>/dev/dvb/adapter?/net?</constant> device node.
17 __u8 feedtype; 17 The data will be available via virtual <constant>dvb?_?</constant>
18#define DVB_NET_FEEDTYPE_MPE 0 /&#x22C6; multi protocol encapsulation &#x22C6;/ 18 network interfaces, and will be controled/routed via the standard
19#define DVB_NET_FEEDTYPE_ULE 1 /&#x22C6; ultra lightweight encapsulation &#x22C6;/ 19 ip tools (like ip, route, netstat, ifconfig, etc).</para>
20}; 20<para> Data types and and ioctl definitions are defined via
21</programlisting> 21 <constant>linux/dvb/net.h</constant> header.</para>
22</section>
23 22
24</section>
25<section id="net_fcalls"> 23<section id="net_fcalls">
26<title>DVB net Function Calls</title> 24<title>DVB net Function Calls</title>
27<para>To be written&#x2026; 25
28</para> 26
29 27<refentry id="NET_ADD_IF">
30<section id="NET_ADD_IF" 28 <refmeta>
31role="subsection"><title>NET_ADD_IF</title> 29 <refentrytitle>ioctl NET_ADD_IF</refentrytitle>
32<para>DESCRIPTION 30 &manvol;
33</para> 31 </refmeta>
34<informaltable><tgroup cols="1"><tbody><row><entry 32
35 align="char"> 33 <refnamediv>
36<para>This ioctl is undocumented. Documentation is welcome.</para> 34 <refname>NET_ADD_IF</refname>
37</entry> 35 <refpurpose>Creates a new network interface for a given Packet ID.</refpurpose>
38 </row></tbody></tgroup></informaltable> 36 </refnamediv>
39<para>SYNOPSIS 37
40</para> 38 <refsynopsisdiv>
41<informaltable><tgroup cols="1"><tbody><row><entry 39 <funcsynopsis>
42 align="char"> 40 <funcprototype>
43<para>int ioctl(fd, int request = NET_ADD_IF, 41 <funcdef>int <function>ioctl</function></funcdef>
44 struct dvb_net_if *if);</para> 42 <paramdef>int <parameter>fd</parameter></paramdef>
45</entry> 43 <paramdef>int <parameter>request</parameter></paramdef>
46 </row></tbody></tgroup></informaltable> 44 <paramdef>struct dvb_net_if *<parameter>net_if</parameter></paramdef>
47<para>PARAMETERS 45 </funcprototype>
48</para> 46 </funcsynopsis>
49<informaltable><tgroup cols="2"><tbody><row><entry 47 </refsynopsisdiv>
50 align="char"> 48
51<para>int fd</para> 49 <refsect1>
52</entry><entry 50 <title>Arguments</title>
53 align="char"> 51 <variablelist>
54<para>File descriptor returned by a previous call to open().</para> 52 <varlistentry>
55</entry> 53 <term><parameter>fd</parameter></term>
56 </row><row><entry 54 <listitem>
57 align="char"> 55 <para>&fe_fd;</para>
58<para>int request</para> 56 </listitem>
59</entry><entry 57 </varlistentry>
60 align="char"> 58 <varlistentry>
61<para>Equals NET_ADD_IF for this command.</para> 59 <term><parameter>request</parameter></term>
62</entry> 60 <listitem>
63 </row><row><entry 61 <para>FE_SET_TONE</para>
64 align="char"> 62 </listitem>
65<para>struct dvb_net_if *if 63 </varlistentry>
66</para> 64 <varlistentry>
67</entry><entry 65 <term><parameter>net_if</parameter></term>
68 align="char"> 66 <listitem>
69<para>Undocumented.</para> 67 <para>pointer to &dvb-net-if;</para>
70</entry> 68 </listitem>
71 </row></tbody></tgroup></informaltable> 69 </varlistentry>
70 </variablelist>
71 </refsect1>
72
73 <refsect1>
74 <title>Description</title>
75
76<para>The NET_ADD_IF ioctl system call selects the Packet ID (PID) that
77 contains a TCP/IP traffic, the type of encapsulation to be used (MPE or ULE)
78 and the interface number for the new interface to be created. When the
79 system call successfully returns, a new virtual network interface is created.</para>
80<para>The &dvb-net-if;::ifnum field will be filled with the number of the
81 created interface.</para>
82
72&return-value-dvb; 83&return-value-dvb;
73</section> 84</refsect1>
85
86<refsect1 id="dvb-net-if-t">
87<title>struct <structname>dvb_net_if</structname> description</title>
88
89<table pgwide="1" frame="none" id="dvb-net-if">
90 <title>struct <structname>dvb_net_if</structname></title>
91 <tgroup cols="2">
92 &cs-def;
93 <thead>
94 <row>
95 <entry>ID</entry>
96 <entry>Description</entry>
97 </row>
98 </thead>
99 <tbody valign="top">
100 <row>
101 <entry align="char">pid</entry>
102 <entry align="char">Packet ID (PID) of the MPEG-TS that contains
103 data</entry>
104 </row><row>
105 <entry align="char">ifnum</entry>
106 <entry align="char">number of the DVB interface.</entry>
107 </row><row>
108 <entry align="char">feedtype</entry>
109 <entry align="char">Encapsulation type of the feed. It can be:
110 <constant>DVB_NET_FEEDTYPE_MPE</constant> for MPE encoding
111 or
112 <constant>DVB_NET_FEEDTYPE_ULE</constant> for ULE encoding.
113 </entry>
114 </row>
115 </tbody>
116 </tgroup>
117</table>
118</refsect1>
119</refentry>
120
121<refentry id="NET_REMOVE_IF">
122 <refmeta>
123 <refentrytitle>ioctl NET_REMOVE_IF</refentrytitle>
124 &manvol;
125 </refmeta>
126
127 <refnamediv>
128 <refname>NET_REMOVE_IF</refname>
129 <refpurpose>Removes a network interface.</refpurpose>
130 </refnamediv>
131
132 <refsynopsisdiv>
133 <funcsynopsis>
134 <funcprototype>
135 <funcdef>int <function>ioctl</function></funcdef>
136 <paramdef>int <parameter>fd</parameter></paramdef>
137 <paramdef>int <parameter>request</parameter></paramdef>
138 <paramdef>int <parameter>ifnum</parameter></paramdef>
139 </funcprototype>
140 </funcsynopsis>
141 </refsynopsisdiv>
142
143 <refsect1>
144 <title>Arguments</title>
145 <variablelist>
146 <varlistentry>
147 <term><parameter>fd</parameter></term>
148 <listitem>
149 <para>&fe_fd;</para>
150 </listitem>
151 </varlistentry>
152 <varlistentry>
153 <term><parameter>request</parameter></term>
154 <listitem>
155 <para>FE_SET_TONE</para>
156 </listitem>
157 </varlistentry>
158 <varlistentry>
159 <term><parameter>net_if</parameter></term>
160 <listitem>
161 <para>number of the interface to be removed</para>
162 </listitem>
163 </varlistentry>
164 </variablelist>
165 </refsect1>
166
167 <refsect1>
168 <title>Description</title>
169
170<para>The NET_REMOVE_IF ioctl deletes an interface previously created
171 via &NET-ADD-IF;.</para>
74 172
75<section id="NET_REMOVE_IF"
76role="subsection"><title>NET_REMOVE_IF</title>
77<para>DESCRIPTION
78</para>
79<informaltable><tgroup cols="1"><tbody><row><entry
80 align="char">
81<para>This ioctl is undocumented. Documentation is welcome.</para>
82</entry>
83 </row></tbody></tgroup></informaltable>
84<para>SYNOPSIS
85</para>
86<informaltable><tgroup cols="1"><tbody><row><entry
87 align="char">
88<para>int ioctl(fd, int request = NET_REMOVE_IF);
89</para>
90</entry>
91 </row></tbody></tgroup></informaltable>
92<para>PARAMETERS
93</para>
94<informaltable><tgroup cols="2"><tbody><row><entry
95 align="char">
96<para>int fd</para>
97</entry><entry
98 align="char">
99<para>File descriptor returned by a previous call to open().</para>
100</entry>
101 </row><row><entry
102 align="char">
103<para>int request</para>
104</entry><entry
105 align="char">
106<para>Equals NET_REMOVE_IF for this command.</para>
107</entry>
108 </row></tbody></tgroup></informaltable>
109&return-value-dvb; 173&return-value-dvb;
110</section> 174</refsect1>
175</refentry>
176
177
178<refentry id="NET_GET_IF">
179 <refmeta>
180 <refentrytitle>ioctl NET_GET_IF</refentrytitle>
181 &manvol;
182 </refmeta>
183
184 <refnamediv>
185 <refname>NET_GET_IF</refname>
186 <refpurpose>Read the configuration data of an interface created via
187 &NET-ADD-IF;.</refpurpose>
188 </refnamediv>
189
190 <refsynopsisdiv>
191 <funcsynopsis>
192 <funcprototype>
193 <funcdef>int <function>ioctl</function></funcdef>
194 <paramdef>int <parameter>fd</parameter></paramdef>
195 <paramdef>int <parameter>request</parameter></paramdef>
196 <paramdef>struct dvb_net_if *<parameter>net_if</parameter></paramdef>
197 </funcprototype>
198 </funcsynopsis>
199 </refsynopsisdiv>
200
201 <refsect1>
202 <title>Arguments</title>
203 <variablelist>
204 <varlistentry>
205 <term><parameter>fd</parameter></term>
206 <listitem>
207 <para>&fe_fd;</para>
208 </listitem>
209 </varlistentry>
210 <varlistentry>
211 <term><parameter>request</parameter></term>
212 <listitem>
213 <para>FE_SET_TONE</para>
214 </listitem>
215 </varlistentry>
216 <varlistentry>
217 <term><parameter>net_if</parameter></term>
218 <listitem>
219 <para>pointer to &dvb-net-if;</para>
220 </listitem>
221 </varlistentry>
222 </variablelist>
223 </refsect1>
224
225 <refsect1>
226 <title>Description</title>
227
228<para>The NET_GET_IF ioctl uses the interface number given by the
229 &dvb-net-if;::ifnum field and fills the content of &dvb-net-if; with
230 the packet ID and encapsulation type used on such interface. If the
231 interface was not created yet with &NET-ADD-IF;, it will return -1 and
232 fill the <constant>errno</constant> with <constant>EINVAL</constant>
233 error code.</para>
111 234
112<section id="NET_GET_IF"
113role="subsection"><title>NET_GET_IF</title>
114<para>DESCRIPTION
115</para>
116<informaltable><tgroup cols="1"><tbody><row><entry
117 align="char">
118<para>This ioctl is undocumented. Documentation is welcome.</para>
119</entry>
120 </row></tbody></tgroup></informaltable>
121<para>SYNOPSIS
122</para>
123<informaltable><tgroup cols="1"><tbody><row><entry
124 align="char">
125<para>int ioctl(fd, int request = NET_GET_IF,
126 struct dvb_net_if *if);</para>
127</entry>
128 </row></tbody></tgroup></informaltable>
129<para>PARAMETERS
130</para>
131<informaltable><tgroup cols="2"><tbody><row><entry
132 align="char">
133<para>int fd</para>
134</entry><entry
135 align="char">
136<para>File descriptor returned by a previous call to open().</para>
137</entry>
138 </row><row><entry
139 align="char">
140<para>int request</para>
141</entry><entry
142 align="char">
143<para>Equals NET_GET_IF for this command.</para>
144</entry>
145 </row><row><entry
146 align="char">
147<para>struct dvb_net_if *if
148</para>
149</entry><entry
150 align="char">
151<para>Undocumented.</para>
152</entry>
153 </row></tbody></tgroup></informaltable>
154&return-value-dvb; 235&return-value-dvb;
155</section> 236</refsect1>
237</refentry>
156</section> 238</section>
diff --git a/Documentation/DocBook/media/dvb/video.xml b/Documentation/DocBook/media/dvb/video.xml
index 3ea1ca7e785e..71547fcd7ba0 100644
--- a/Documentation/DocBook/media/dvb/video.xml
+++ b/Documentation/DocBook/media/dvb/video.xml
@@ -1,12 +1,12 @@
1<title>DVB Video Device</title> 1<title>DVB Video Device</title>
2<para>The DVB video device controls the MPEG2 video decoder of the DVB hardware. It 2<para>The DVB video device controls the MPEG2 video decoder of the DVB hardware. It
3can be accessed through <emphasis role="tt">/dev/dvb/adapter0/video0</emphasis>. Data types and and 3can be accessed through <emphasis role="bold">/dev/dvb/adapter0/video0</emphasis>. Data types and and
4ioctl definitions can be accessed by including <emphasis role="tt">linux/dvb/video.h</emphasis> in your 4ioctl definitions can be accessed by including <emphasis role="bold">linux/dvb/video.h</emphasis> in your
5application. 5application.
6</para> 6</para>
7<para>Note that the DVB video device only controls decoding of the MPEG video stream, not 7<para>Note that the DVB video device only controls decoding of the MPEG video stream, not
8its presentation on the TV or computer screen. On PCs this is typically handled by an 8its presentation on the TV or computer screen. On PCs this is typically handled by an
9associated video4linux device, e.g. <emphasis role="tt">/dev/video</emphasis>, which allows scaling and defining output 9associated video4linux device, e.g. <emphasis role="bold">/dev/video</emphasis>, which allows scaling and defining output
10windows. 10windows.
11</para> 11</para>
12<para>Some DVB cards don&#8217;t have their own MPEG decoder, which results in the omission of 12<para>Some DVB cards don&#8217;t have their own MPEG decoder, which results in the omission of
@@ -24,7 +24,7 @@ have been created to replace that functionality.</para>
24 24
25<section id="video-format-t"> 25<section id="video-format-t">
26<title>video_format_t</title> 26<title>video_format_t</title>
27<para>The <emphasis role="tt">video_format_t</emphasis> data type defined by 27<para>The <constant>video_format_t</constant> data type defined by
28</para> 28</para>
29<programlisting> 29<programlisting>
30typedef enum { 30typedef enum {
@@ -74,7 +74,7 @@ typedef enum {
74</programlisting> 74</programlisting>
75<para>VIDEO_SOURCE_DEMUX selects the demultiplexer (fed either by the frontend or the 75<para>VIDEO_SOURCE_DEMUX selects the demultiplexer (fed either by the frontend or the
76DVR device) as the source of the video stream. If VIDEO_SOURCE_MEMORY 76DVR device) as the source of the video stream. If VIDEO_SOURCE_MEMORY
77is selected the stream comes from the application through the <emphasis role="tt">write()</emphasis> system 77is selected the stream comes from the application through the <emphasis role="bold">write()</emphasis> system
78call. 78call.
79</para> 79</para>
80</section> 80</section>
diff --git a/Documentation/DocBook/media/typical_media_device.svg b/Documentation/DocBook/media/typical_media_device.svg
new file mode 100644
index 000000000000..f0c82f72c4b6
--- /dev/null
+++ b/Documentation/DocBook/media/typical_media_device.svg
@@ -0,0 +1,28 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<svg stroke-linejoin="round" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" clip-path="url(#a)" xml:space="preserve" fill-rule="evenodd" height="178.78mm" viewBox="0 0 24285.662 17877.829" width="251.99mm" version="1.2" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" preserveAspectRatio="xMidYMid" stroke-width="28.222"><defs><clipPath id="a" clipPathUnits="userSpaceOnUse"><rect y="0" x="0" width="28000" height="21000"/></clipPath></defs><g transform="matrix(1.004 0 0 1 -2185.6 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#fcf" d="m12231 4800c-516 0-1031 515-1031 1031v4124c0 516 515 1032 1031 1032h8538c516 0 1032-516 1032-1032v-4124c0-516-516-1031-1032-1031h-8538z"/></g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#ffc" d="m3595 15607c-293 0-585 292-585 585v2340c0 293 292 586 585 586h3275c293 0 586-293 586-586v-2340c0-293-293-585-586-585h-3275z"/></g><g transform="translate(-2197.3 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#e6e6e6" d="m2663 2186c-461 0-922 461-922 922v11169c0 461 461 923 922 923h3692c461 0 922-462 922-923v-11169c0-461-461-922-922-922h-3692z"/></g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.RectangleShape"><path fill="#ff8080" d="m4461 8602h-2260v-1086h4520v1086h-2260z"/><path fill="none" d="m4461 8602h-2260v-1086h4520v1086h-2260z" stroke="#3465af"/><text class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="8275" x="2579" class="TextPosition"><tspan fill="#000000">Audio decoder</tspan></tspan></tspan></text>
3</g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.RectangleShape"><path fill="#ff8080" d="m4461 11772h-2260v-1270h4520v1270h-2260z"/><path fill="none" d="m4461 11772h-2260v-1270h4520v1270h-2260z" stroke="#3465af"/><text class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="11353" x="2617" class="TextPosition"><tspan fill="#000000">Video decoder</tspan></tspan></tspan></text>
4</g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.RectangleShape"><path fill="#ff8080" d="m4453 10217h-2269v-1224h4537v1224h-2268z"/><path fill="none" d="m4453 10217h-2269v-1224h4537v1224h-2268z" stroke="#3465af"/><text class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="9821" x="2571" class="TextPosition"><tspan fill="#000000">Audio encoder</tspan></tspan></tspan></text>
5</g><g transform="translate(-2140.9 -2468.2)" class="com.sun.star.drawing.RectangleShape"><path fill="#cfc" d="m15711 12832h-3810v-1281h7620v1281h-3810z"/><path fill="none" d="m15711 12832h-3810v-1281h7620v1281h-3810z" stroke="#3465af"/><text class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="12407" x="12377" class="TextPosition"><tspan fill="#000000">Button Key/IR input logic</tspan></tspan></tspan></text>
6</g><g transform="translate(-2140.9 -2411.8)" class="com.sun.star.drawing.RectangleShape"><path fill="#cfe7f5" d="m14169 14572h-2268v-1412h4536v1412h-2268z"/><path fill="none" d="m14169 14572h-2268v-1412h4536v1412h-2268z" stroke="#3465af"/><text class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="14082" x="12882" class="TextPosition"><tspan fill="#000000">EEPROM</tspan></tspan></tspan></text>
7</g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.RectangleShape"><path fill="#fc9" d="m5140 17662h-1563v-1715h3126v1715h-1563z"/><path fill="none" d="m5140 17662h-1563v-1715h3126v1715h-1563z" stroke="#3465af"/><text class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="17020" x="4276" class="TextPosition"><tspan fill="#000000">Sensor</tspan></tspan></tspan></text>
8</g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#729fcf" d="m6719 8030 385-353v176h1167v-176l386 353-386 354v-177h-1167v177l-385-354z"/><path fill="none" d="m6719 8030 385-353v176h1167v-176l386 353-386 354v-177h-1167v177l-385-354z" stroke="#3465af"/></g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#729fcf" d="m6719 9612 385-353v176h1167v-176l386 353-386 354v-177h-1167v177l-385-354z"/><path fill="none" d="m6719 9612 385-353v176h1167v-176l386 353-386 354v-177h-1167v177l-385-354z" stroke="#3465af"/></g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#729fcf" d="m6721 11100 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z"/><path fill="none" d="m6721 11100 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z" stroke="#3465af"/></g><g transform="translate(-2140.9 -2411.8)" class="com.sun.star.drawing.CustomShape"><path fill="#729fcf" d="m9962 13854 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z"/><path fill="none" d="m9962 13854 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z" stroke="#3465af"/></g><g transform="translate(-2140.9 -2468.2)" class="com.sun.star.drawing.CustomShape"><path fill="#729fcf" d="m9962 12163 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z"/><path fill="none" d="m9962 12163 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z" stroke="#3465af"/></g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#729fcf" d="m9962 17158 670-353v176h2028v-176l671 353-671 354v-177h-2028v177l-670-354z"/><path fill="none" d="m9962 17158 670-353v176h2028v-176l671 353-671 354v-177h-2028v177l-670-354z" stroke="#3465af"/></g><g transform="matrix(0 .83339 -1.0005 0 30268 -5276.3)" class="com.sun.star.drawing.CustomShape"><path fill="#729fcf" d="m23229 12779 1009-978 1009 978h-505v2959h505l-1009 979-1009-979h504v-2959h-504z"/><path fill="none" d="m23229 12779 1009-978 1009 978h-505v2959h505l-1009 979-1009-979h504v-2959h-504z" stroke="#3465af"/></g><g transform="translate(-9973.6 -666.6)" class="com.sun.star.drawing.TextShape"><text class="TextShape"><tspan font-size="706px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="15832" x="24341" class="TextPosition" transform="matrix(0,-1,1,0,8509,40173)"><tspan fill="#000000">System Bus</tspan></tspan></tspan></text>
9</g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.RectangleShape"><path fill="#cff" d="m13151 9262h-1250v-875h2499v875h-1249z"/><path fill="none" d="m13151 9262h-1250v-875h2499v875h-1249z" stroke="#3465af"/><text class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="9040" x="12215" class="TextPosition"><tspan fill="#000000">Demux</tspan></tspan></tspan></text>
10</g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#729fcf" d="m9996 8765 373-357v178h1130v-178l374 357-374 358v-179h-1130v179l-373-358z"/><path fill="none" d="m9996 8765 373-357v178h1130v-178l374 357-374 358v-179h-1130v179l-373-358z" stroke="#3465af"/></g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#729fcf" d="m9996 7378 373-358v179h1130v-179l374 358-374 358v-179h-1130v179l-373-358z"/><path fill="none" d="m9996 7378 373-358v179h1130v-179l374 358-374 358v-179h-1130v179l-373-358z" stroke="#3465af"/></g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.RectangleShape"><path fill="#cff" d="m16322 7992h-4421v-1270h8841v1270h-4420z"/><path fill="none" d="m16322 7992h-4421v-1270h8841v1270h-4420z" stroke="#3465af"/><text class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="7573" x="12786" class="TextPosition"><tspan fill="#000000">Conditional Access Module</tspan></tspan></tspan></text>
11</g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.RectangleShape"><path fill="#ff8080" d="m4445 13287h-2269v-1224h4537v1224h-2268z"/><path fill="none" d="m4445 13287h-2269v-1224h4537v1224h-2268z" stroke="#3465af"/><text class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="12891" x="2601" class="TextPosition"><tspan fill="#000000">Video encoder</tspan></tspan></tspan></text>
12</g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#729fcf" d="m6721 12634 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z"/><path fill="none" d="m6721 12634 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z" stroke="#3465af"/></g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#729fcf" d="m20791 7545 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z"/><path fill="none" d="m20791 7545 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z" stroke="#3465af"/></g><g transform="translate(-2028 -2186)" class="com.sun.star.drawing.TextShape"><text class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="14478" x="1990" class="TextPosition"><tspan fill="#000000">Radio / Analog TV</tspan></tspan></tspan></text>
13</g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.TextShape"><text class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="700" class="TextParagraph"><tspan y="10724" x="14956" class="TextPosition"><tspan fill="#000000">Digital TV</tspan></tspan></tspan></text>
14</g><g transform="translate(-8970.5 -1395.8)" class="com.sun.star.drawing.TextShape"><text class="TextShape"><tspan font-size="494px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="19167" x="14724" class="TextPosition"><tspan fill="#000000">PS.: picture is not complete: other blocks may be present</tspan></tspan></tspan></text>
15</g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.TextShape"><text class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="18561" x="4199" class="TextPosition"><tspan fill="#000000">Webcam</tspan></tspan></tspan></text>
16</g><g transform="translate(-2140.9 -2468.2)" class="com.sun.star.drawing.RectangleShape"><path fill="#f90" d="m14552 16372h-2650v-1412h5299v1412h-2649z"/><path fill="none" d="m14552 16372h-2650v-1412h5299v1412h-2649z" stroke="#3465af"/><text class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="15882" x="12265" class="TextPosition"><tspan fill="#000000">Processing blocks</tspan></tspan></tspan></text>
17</g><g transform="translate(-2140.9 -2468.2)" class="com.sun.star.drawing.CustomShape"><path fill="#729fcf" d="m9962 15654 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z"/><path fill="none" d="m9962 15654 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z" stroke="#3465af"/></g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#729fcf" d="m6702 16954 397-353v176h1201v-176l398 353-398 354v-177h-1201v177l-397-354z"/><path fill="none" d="m6702 16954 397-353v176h1201v-176l398 353-398 354v-177h-1201v177l-397-354z" stroke="#3465af"/></g><g transform="translate(-2479.5 -2186)" class="com.sun.star.drawing.TextShape"><text class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="8792" x="22850" class="TextPosition"><tspan fill="#000000">Smartcard</tspan></tspan></tspan></text>
18</g><g transform="matrix(1.0048 0 0 1 -2207.4 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#fcf" d="m2766 2600c-333 0-666 333-666 666v2668c0 333 333 666 666 666h18368c333 0 667-333 667-666v-2668c0-333-334-666-667-666h-18368z"/></g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.RectangleShape"><path fill="#ff8080" d="m5121 5155h-1614v-1816h3227v1816h-1613z"/><path fill="none" d="m5121 5155h-1614v-1816h3227v1816h-1613z" stroke="#3465af"/><text font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextShape"><tspan class="TextParagraph"><tspan y="4111" x="4374" class="TextPosition"><tspan fill="#000000">Tuner</tspan></tspan></tspan><tspan class="TextParagraph"><tspan y="4814" x="4151" class="TextPosition"><tspan fill="#000000">FM/TV</tspan></tspan></tspan></text>
19</g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#ff8080" d="m2902 3702c0 111 40 202 88 202h530c48 0 89-91 89-202 0-110-41-202-89-202h-530c-48 0-88 92-88 202z"/><path fill="none" d="m2902 3702c0 111 40 202 88 202h530c48 0 89-91 89-202 0-110-41-202-89-202h-530c-48 0-88 92-88 202z" stroke="#3465af"/><path fill="#ffb3b3" d="m2902 3702c0 111 40 202 88 202s88-91 88-202c0-110-40-202-88-202s-88 92-88 202z"/><path fill="none" d="m2902 3702c0 111 40 202 88 202s88-91 88-202c0-110-40-202-88-202s-88 92-88 202z" stroke="#3465af"/></g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#ff8080" d="m2903 4267c0 110 40 202 88 202h530c48 0 89-92 89-202s-41-203-89-203h-530c-48 0-88 93-88 203z"/><path fill="none" d="m2903 4267c0 110 40 202 88 202h530c48 0 89-92 89-202s-41-203-89-203h-530c-48 0-88 93-88 203z" stroke="#3465af"/><path fill="#ffb3b3" d="m2903 4267c0 110 40 202 88 202s88-92 88-202-40-203-88-203-88 93-88 203z"/><path fill="none" d="m2903 4267c0 110 40 202 88 202s88-92 88-202-40-203-88-203-88 93-88 203z" stroke="#3465af"/></g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#729fcf" d="m6719 4196 385-353v176h1167v-176l386 353-386 354v-177h-1167v177l-385-354z"/><path fill="none" d="m6719 4196 385-353v176h1167v-176l386 353-386 354v-177h-1167v177l-385-354z" stroke="#3465af"/></g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#729fcf" d="m9979 4150 402-368v184h1217v-184l403 368-403 369v-185h-1217v185l-402-369z"/><path fill="none" d="m9979 4150 402-368v184h1217v-184l403 368-403 369v-185h-1217v185l-402-369z" stroke="#3465af"/></g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.RectangleShape"><path fill="#cff" d="m16500 6189h-4500v-1389h9e3v1389h-4500z"/><path fill="none" d="m16500 6189h-4500v-1389h9e3v1389h-4500z" stroke="#3465af"/><text class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="5710" x="12051" class="TextPosition"><tspan fill="#000000">Satellite Equipment Control (SEC)</tspan></tspan></tspan></text>
20</g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#cff" d="m13400 4600h-1400v-1e3h2800v1e3h-1400z"/><path fill="none" d="m13400 4600h-1400v-1e3h2800v1e3h-1400z" stroke="#3465af"/><text class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="4316" x="12465" class="TextPosition"><tspan fill="#000000">Demod</tspan></tspan></tspan></text>
21</g><g transform="translate(-2140.9 -2186)" class="com.sun.star.drawing.CustomShape"><path fill="#729fcf" d="m9979 5451 402-368v184h1217v-184l403 368-403 369v-185h-1217v185l-402-369z"/><path fill="none" d="m9979 5451 402-368v184h1217v-184l403 368-403 369v-185h-1217v185l-402-369z" stroke="#3465af"/></g><path fill="#ff9" d="m7855.1 9099v7302h-1270v-14605h1270v7303z"/><path fill="none" d="m7855.1 9099v7302h-1270v-14605h1270v7303z" stroke="#3465af"/><text y="-6640.4663" x="-20770.572" transform="rotate(-90)" class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="7409.5396" x="-11193.634" class="TextPosition" transform="matrix(0,-1,1,0,-4473,23627)"><tspan fill="#000000">I2C Bus (control bus)</tspan></tspan></tspan></text>
22<g transform="translate(-2197.3 -2186)" class="com.sun.star.drawing.TextShape"><text class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="3278" x="9391" class="TextPosition"><tspan fill="#000000">Digital TV Frontend</tspan></tspan></tspan></text>
23</g><g transform="matrix(1.015 0 0 .99994 -2233.3 -2185.7)" class="com.sun.star.drawing.CustomShape"><g stroke="#3465af" fill="none"><path d="m3e3 2800c-18 0-35 1-53 3"/><path d="m2915 2808c-17 3-35 7-52 12"/><path d="m2832 2830c-16 6-33 12-49 20"/><path d="m2754 2864c-15 8-31 17-46 27"/><path d="m2681 2909c-14 10-28 21-42 32"/><path d="m2614 2962c-13 12-26 24-38 37"/><path d="m2554 3023c-11 13-22 27-33 41"/><path d="m2502 3091c-10 14-19 29-28 45"/><path d="m2459 3164c-8 16-15 32-22 49"/><path d="m2426 3243c-5 17-10 34-14 51"/><path d="m2406 3326c-3 18-5 35-6 53"/><path d="m2400 3411v53"/><path d="m2400 3497v53"/><path d="m2400 3582v53"/><path d="m2400 3668v53"/><path d="m2400 3753v53"/><path d="m2400 3839v53"/><path d="m2400 3924v53"/><path d="m2400 4009v54"/><path d="m2400 4095v53"/><path d="m2400 4180v53"/><path d="m2400 4266v53"/><path d="m2400 4351v53"/><path d="m2400 4437v53"/><path d="m2400 4522v53"/><path d="m2400 4607v54"/><path d="m2400 4693v53"/><path d="m2400 4778v53"/><path d="m2400 4864v53"/><path d="m2400 4949v53"/><path d="m2400 5035v53"/><path d="m2400 5120v53"/><path d="m2400 5205v54"/><path d="m2400 5291v53"/><path d="m2400 5376v53"/><path d="m2400 5462v53"/><path d="m2400 5547v53"/><path d="m2400 5633v53"/><path d="m2400 5718v53"/><path d="m2400 5803c0 18 1 36 3 53"/><path d="m2408 5888c4 18 8 35 13 52"/><path d="m2431 5971c6 16 13 33 20 49"/><path d="m2466 6049c8 15 17 31 27 46"/><path d="m2511 6122c10 14 21 28 32 42"/><path d="m2564 6188c12 13 25 26 38 38"/><path d="m2626 6248c13 11 27 23 41 33"/><path d="m2694 6300c14 10 29 19 45 27"/><path d="m2768 6343c15 7 32 15 48 21"/><path d="m2847 6375c17 5 34 10 51 14"/><path d="m2930 6395c17 2 35 4 53 5"/><path d="m3015 6400h53"/><path d="m3100 6400h53"/><path d="m3186 6400h53"/><path d="m3271 6400h53"/><path d="m3357 6400h53"/><path d="m3442 6400h53"/><path d="m3527 6400h54"/><path d="m3613 6400h53"/><path d="m3698 6400h53"/><path d="m3784 6400h53"/><path d="m3869 6400h53"/><path d="m3955 6400h53"/><path d="m4040 6400h53"/><path d="m4125 6400h54"/><path d="m4211 6400h53"/><path d="m4296 6400h53"/><path d="m4382 6400h53"/><path d="m4467 6400h53"/><path d="m4553 6400h53"/><path d="m4638 6400h53"/><path d="m4723 6400h54"/><path d="m4809 6400h53"/><path d="m4894 6400h53"/><path d="m4980 6400h53"/><path d="m5065 6400h53"/><path d="m5151 6400h53"/><path d="m5236 6400h53"/><path d="m5322 6400h53"/><path d="m5407 6400h53"/><path d="m5492 6400h53"/><path d="m5578 6400h53"/><path d="m5663 6400h53"/><path d="m5749 6400h53"/><path d="m5834 6400h53"/><path d="m5920 6400h53"/><path d="m6005 6400h53"/><path d="m6090 6400h53"/><path d="m6176 6400h53"/><path d="m6261 6400h53"/><path d="m6347 6400h53"/><path d="m6432 6400h53"/><path d="m6518 6400h53"/><path d="m6603 6400h53"/><path d="m6688 6400h54"/><path d="m6774 6400h53"/><path d="m6859 6400h53"/><path d="m6945 6400h53"/><path d="m7030 6400h53"/><path d="m7116 6400h53"/><path d="m7201 6400h53"/><path d="m7286 6400h54"/><path d="m7372 6400h53"/><path d="m7457 6400h53"/><path d="m7543 6400h53"/><path d="m7628 6400h53"/><path d="m7714 6400h53"/><path d="m7799 6400h53"/><path d="m7884 6400h54"/><path d="m7970 6400h53"/><path d="m8055 6400h53"/><path d="m8141 6400h53"/><path d="m8226 6400h53"/><path d="m8312 6400h53"/><path d="m8397 6400h53"/><path d="m8482 6400h54"/><path d="m8568 6400h53"/><path d="m8653 6400h53"/><path d="m8739 6400h53"/><path d="m8824 6400h53"/><path d="m8910 6400h53"/><path d="m8995 6400h53"/><path d="m9081 6400h53"/><path d="m9166 6400h53"/><path d="m9251 6400h53"/><path d="m9337 6400h53"/><path d="m9422 6400h53"/><path d="m9508 6400h53"/><path d="m9593 6400h53"/><path d="m9679 6400h53"/><path d="m9764 6400h53"/><path d="m9849 6400h53"/><path d="m9935 6400h53"/><path d="m10020 6400h53"/><path d="m10106 6400h53"/><path d="m10191 6400h53"/><path d="m10277 6400h53"/><path d="m10362 6400h53"/><path d="m10447 6400h53"/><path d="m10533 6400h53"/><path d="m10618 6400h53"/><path d="m10704 6400h53"/><path d="m10789 6400h53"/><path d="m10875 6400h53"/><path d="m10960 6400h53"/><path d="m11045 6400h54"/><path d="m11131 6400h53"/><path d="m11216 6400h53"/><path d="m11302 6400h53"/><path d="m11387 6400h53"/><path d="m11473 6400h53"/><path d="m11558 6400h53"/><path d="m11643 6400h54"/><path d="m11729 6400h53"/><path d="m11814 6400h53"/><path d="m11900 6400h53"/><path d="m11985 6400h53"/><path d="m12071 6400h53"/><path d="m12156 6400h53"/><path d="m12241 6400h54"/><path d="m12327 6400h53"/><path d="m12412 6400h53"/><path d="m12498 6400h53"/><path d="m12583 6400h53"/><path d="m12669 6400h53"/><path d="m12754 6400h53"/><path d="m12839 6400h54"/><path d="m12925 6400h53"/><path d="m13010 6400h53"/><path d="m13096 6400h53"/><path d="m13181 6400h53"/><path d="m13267 6400h53"/><path d="m13352 6400h53"/><path d="m13438 6400h53"/><path d="m13523 6400h53"/><path d="m13608 6400h53"/><path d="m13694 6400h53"/><path d="m13779 6400h53"/><path d="m13865 6400h53"/><path d="m13950 6400h53"/><path d="m14036 6400h53"/><path d="m14121 6400h53"/><path d="m14206 6400h53"/><path d="m14292 6400h53"/><path d="m14377 6400h53"/><path d="m14463 6400h53"/><path d="m14548 6400h53"/><path d="m14634 6400h53"/><path d="m14719 6400h53"/><path d="m14804 6400h54"/><path d="m14890 6400h53"/><path d="m14975 6400h53"/><path d="m15061 6400h53"/><path d="m15146 6400h53"/><path d="m15232 6400h53"/><path d="m15317 6400h53"/><path d="m15402 6400h54"/><path d="m15488 6400h53"/><path d="m15573 6400h53"/><path d="m15659 6400h53"/><path d="m15744 6400h53"/><path d="m15830 6400h53"/><path d="m15915 6400h53"/><path d="m16000 6400h54"/><path d="m16086 6400h53"/><path d="m16171 6400h53"/><path d="m16257 6400h53"/><path d="m16342 6400h53"/><path d="m16428 6400h53"/><path d="m16513 6400h53"/><path d="m16598 6400h54"/><path d="m16684 6400h53"/><path d="m16769 6400h53"/><path d="m16855 6400h53"/><path d="m16940 6400h53"/><path d="m17026 6400h53"/><path d="m17111 6400h53"/><path d="m17196 6400h54"/><path d="m17282 6400h53"/><path d="m17367 6400h53"/><path d="m17453 6400h53"/><path d="m17538 6400h53"/><path d="m17624 6400h53"/><path d="m17709 6400h53"/><path d="m17795 6400h53"/><path d="m17880 6400h53"/><path d="m17965 6400h53"/><path d="m18051 6400h53"/><path d="m18136 6400h53"/><path d="m18222 6400h53"/><path d="m18307 6400h53"/><path d="m18393 6400h53"/><path d="m18478 6400h53"/><path d="m18563 6400h53"/><path d="m18649 6400h53"/><path d="m18734 6400h53"/><path d="m18820 6400h53"/><path d="m18905 6400h53"/><path d="m18991 6400h53"/><path d="m19076 6400h53"/><path d="m19161 6400h54"/><path d="m19247 6400h53"/><path d="m19332 6400h53"/><path d="m19418 6400h53"/><path d="m19503 6400h53"/><path d="m19589 6400h53"/><path d="m19674 6400h53"/><path d="m19759 6400h54"/><path d="m19845 6400h53"/><path d="m19930 6400h53"/><path d="m20016 6400h53"/><path d="m20101 6400h53"/><path d="m20187 6400h53"/><path d="m20272 6400h53"/><path d="m20357 6400h54"/><path d="m20443 6400h53"/><path d="m20528 6400h53"/><path d="m20614 6400c17-1 35-2 53-5"/><path d="m20699 6390c17-4 34-9 51-14"/><path d="m20781 6365c16-6 32-13 48-21"/><path d="m20858 6329c15-8 31-17 45-27"/><path d="m20930 6283c14-10 28-21 42-32"/><path d="m20996 6229c13-12 25-25 37-38"/><path d="m21055 6167c11-14 22-28 33-42"/><path d="m21106 6098c10-15 19-30 27-45"/><path d="m21148 6024c7-16 14-33 20-49"/><path d="m21179 5944c5-17 9-34 13-51"/><path d="m21197 5861c2-18 4-35 4-53"/><path d="m21201 5776v-54"/><path d="m21201 5690v-53"/><path d="m21201 5605v-53"/><path d="m21201 5519v-53"/><path d="m21201 5434v-53"/><path d="m21201 5348v-53"/><path d="m21201 5263v-53"/><path d="m21201 5178v-54"/><path d="m21201 5092v-53"/><path d="m21201 5007v-53"/><path d="m21201 4921v-53"/><path d="m21201 4836v-53"/><path d="m21201 4750v-53"/><path d="m21201 4665v-53"/><path d="m21201 4579v-53"/><path d="m21201 4494v-53"/><path d="m21201 4409v-53"/><path d="m21201 4323v-53"/><path d="m21201 4238v-53"/><path d="m21201 4152v-53"/><path d="m21201 4067v-53"/><path d="m21201 3981v-53"/><path d="m21201 3896v-53"/><path d="m21201 3811v-53"/><path d="m21201 3725v-53"/><path d="m21201 3640v-53"/><path d="m21201 3554v-53"/><path d="m21201 3469v-53"/><path d="m21201 3383c-1-17-3-35-5-52"/><path d="m21190 3299c-4-17-8-35-14-51"/><path d="m21165 3217c-6-16-13-33-21-49"/><path d="m21129 3140c-9-16-18-31-28-46"/><path d="m21082 3068c-10-14-21-28-33-42"/><path d="m21027 3002c-12-13-24-25-37-37"/><path d="m20965 2944c-14-12-28-22-42-33"/><path d="m20896 2893c-15-9-30-18-46-27"/><path d="m20821 2852c-16-8-32-14-49-20"/><path d="m20741 2821c-17-5-34-9-51-12"/><path d="m20658 2804c-18-3-35-4-53-4"/><path d="m20573 2800h-53"/><path d="m20487 2800h-53"/><path d="m20402 2800h-53"/><path d="m20316 2800h-53"/><path d="m20231 2800h-53"/><path d="m20146 2800h-54"/><path d="m20060 2800h-53"/><path d="m19975 2800h-53"/><path d="m19889 2800h-53"/><path d="m19804 2800h-53"/><path d="m19718 2800h-53"/><path d="m19633 2800h-53"/><path d="m19548 2800h-54"/><path d="m19462 2800h-53"/><path d="m19377 2800h-53"/><path d="m19291 2800h-53"/><path d="m19206 2800h-53"/><path d="m19120 2800h-53"/><path d="m19035 2800h-53"/><path d="m18950 2800h-54"/><path d="m18864 2800h-53"/><path d="m18779 2800h-53"/><path d="m18693 2800h-53"/><path d="m18608 2800h-53"/><path d="m18522 2800h-53"/><path d="m18437 2800h-53"/><path d="m18352 2800h-54"/><path d="m18266 2800h-53"/><path d="m18181 2800h-53"/><path d="m18095 2800h-53"/><path d="m18010 2800h-53"/><path d="m17924 2800h-53"/><path d="m17839 2800h-53"/><path d="m17753 2800h-53"/><path d="m17668 2800h-53"/><path d="m17583 2800h-53"/><path d="m17497 2800h-53"/><path d="m17412 2800h-53"/><path d="m17326 2800h-53"/><path d="m17241 2800h-53"/><path d="m17155 2800h-53"/><path d="m17070 2800h-53"/><path d="m16985 2800h-53"/><path d="m16899 2800h-53"/><path d="m16814 2800h-53"/><path d="m16728 2800h-53"/><path d="m16643 2800h-53"/><path d="m16557 2800h-53"/><path d="m16472 2800h-53"/><path d="m16387 2800h-54"/><path d="m16301 2800h-53"/><path d="m16216 2800h-53"/><path d="m16130 2800h-53"/><path d="m16045 2800h-53"/><path d="m15959 2800h-53"/><path d="m15874 2800h-53"/><path d="m15789 2800h-54"/><path d="m15703 2800h-53"/><path d="m15618 2800h-53"/><path d="m15532 2800h-53"/><path d="m15447 2800h-53"/><path d="m15361 2800h-53"/><path d="m15276 2800h-53"/><path d="m15191 2800h-54"/><path d="m15105 2800h-53"/><path d="m15020 2800h-53"/><path d="m14934 2800h-53"/><path d="m14849 2800h-53"/><path d="m14763 2800h-53"/><path d="m14678 2800h-53"/><path d="m14593 2800h-54"/><path d="m14507 2800h-53"/><path d="m14422 2800h-53"/><path d="m14336 2800h-53"/><path d="m14251 2800h-53"/><path d="m14165 2800h-53"/><path d="m14080 2800h-53"/><path d="m13994 2800h-53"/><path d="m13909 2800h-53"/><path d="m13824 2800h-53"/><path d="m13738 2800h-53"/><path d="m13653 2800h-53"/><path d="m13567 2800h-53"/><path d="m13482 2800h-53"/><path d="m13396 2800h-53"/><path d="m13311 2800h-53"/><path d="m13226 2800h-53"/><path d="m13140 2800h-53"/><path d="m13055 2800h-53"/><path d="m12969 2800h-53"/><path d="m12884 2800h-53"/><path d="m12798 2800h-53"/><path d="m12713 2800h-53"/><path d="m12628 2800h-53"/><path d="m12542 2800h-53"/><path d="m12457 2800h-53"/><path d="m12371 2800h-53"/><path d="m12286 2800h-53"/><path d="m12200 2800h-53"/><path d="m12115 2800h-53"/><path d="m12030 2800h-54"/><path d="m11944 2800h-53"/><path d="m11859 2800h-53"/><path d="m11773 2800h-53"/><path d="m11688 2800h-53"/><path d="m11602 2800h-53"/><path d="m11517 2800h-53"/><path d="m11432 2800h-54"/><path d="m11346 2800h-53"/><path d="m11261 2800h-53"/><path d="m11175 2800h-53"/><path d="m11090 2800h-53"/><path d="m11004 2800h-53"/><path d="m10919 2800h-53"/><path d="m10834 2800h-54"/><path d="m10748 2800h-53"/><path d="m10663 2800h-53"/><path d="m10577 2800h-53"/><path d="m10492 2800h-53"/><path d="m10406 2800h-53"/><path d="m10321 2800h-53"/><path d="m10236 2800h-54"/><path d="m10150 2800h-53"/><path d="m10065 2800h-53"/><path d="m9979 2800h-53"/><path d="m9894 2800h-53"/><path d="m9808 2800h-53"/><path d="m9723 2800h-53"/><path d="m9637 2800h-53"/><path d="m9552 2800h-53"/><path d="m9467 2800h-53"/><path d="m9381 2800h-53"/><path d="m9296 2800h-53"/><path d="m9210 2800h-53"/><path d="m9125 2800h-53"/><path d="m9039 2800h-53"/><path d="m8954 2800h-53"/><path d="m8869 2800h-53"/><path d="m8783 2800h-53"/><path d="m8698 2800h-53"/><path d="m8612 2800h-53"/><path d="m8527 2800h-53"/><path d="m8441 2800h-53"/><path d="m8356 2800h-53"/><path d="m8271 2800h-54"/><path d="m8185 2800h-53"/><path d="m8100 2800h-53"/><path d="m8014 2800h-53"/><path d="m7929 2800h-53"/><path d="m7843 2800h-53"/><path d="m7758 2800h-53"/><path d="m7673 2800h-54"/><path d="m7587 2800h-53"/><path d="m7502 2800h-53"/><path d="m7416 2800h-53"/><path d="m7331 2800h-53"/><path d="m7245 2800h-53"/><path d="m7160 2800h-53"/><path d="m7075 2800h-54"/><path d="m6989 2800h-53"/><path d="m6904 2800h-53"/><path d="m6818 2800h-53"/><path d="m6733 2800h-53"/><path d="m6647 2800h-53"/><path d="m6562 2800h-53"/><path d="m6477 2800h-54"/><path d="m6391 2800h-53"/><path d="m6306 2800h-53"/><path d="m6220 2800h-53"/><path d="m6135 2800h-53"/><path d="m6049 2800h-53"/><path d="m5964 2800h-53"/><path d="m5879 2800h-54"/><path d="m5793 2800h-53"/><path d="m5708 2800h-53"/><path d="m5622 2800h-53"/><path d="m5537 2800h-53"/><path d="m5451 2800h-53"/><path d="m5366 2800h-53"/><path d="m5280 2800h-53"/><path d="m5195 2800h-53"/><path d="m5110 2800h-53"/><path d="m5024 2800h-53"/><path d="m4939 2800h-53"/><path d="m4853 2800h-53"/><path d="m4768 2800h-53"/><path d="m4682 2800h-53"/><path d="m4597 2800h-53"/><path d="m4512 2800h-53"/><path d="m4426 2800h-53"/><path d="m4341 2800h-53"/><path d="m4255 2800h-53"/><path d="m4170 2800h-53"/><path d="m4084 2800h-53"/><path d="m3999 2800h-53"/><path d="m3914 2800h-54"/><path d="m3828 2800h-53"/><path d="m3743 2800h-53"/><path d="m3657 2800h-53"/><path d="m3572 2800h-53"/><path d="m3486 2800h-53"/><path d="m3401 2800h-53"/><path d="m3316 2800h-54"/><path d="m3230 2800h-53"/><path d="m3145 2800h-53"/><path d="m3059 2800h-53"/></g></g><g transform="translate(-2197.3 -2186)"><rect height="1100.7" width="1213.6" y="6917.1" x="23255" fill="#f3e777"/><path fill="#ca4677" d="m22802 7700.4v-405.46l150.7-169.16c82.886-93.039 170.53-186.62 194.77-207.96l44.069-38.798 783.23-0.086 783.23-0.086v613.5 613.5h-978-978v-405.46zm1027.7 136.98v-78.372l-169.91 4.925-169.91 4.9249-5.09 45.854c-8.249 74.303 46.711 101.04 207.69 101.04h137.21v-78.372zm235.86-262.94 4.495-341.31 207.2-8.6408 207.2-8.6408 5.144-46.443c9.596-86.615-41.863-102.05-322.02-96.607l-246.71 4.7956-4.438 419.08-4.439 419.08h74.537 74.538l4.494-341.31zm391.3 313.72c26.41-19.286 36.255-41.399 32.697-73.447l-5.09-45.854h-174.05-174.05l-5.38 48.984c-9.97 90.771 0.993 97.91 150.36 97.91 99.305 0 148.27-7.6982 175.52-27.594zm-627.16-274.84v-77.768h-174.05-174.05v66.246c0 36.436 4.973 71.431 11.051 77.768 6.078 6.3366 84.401 11.521 174.05 11.521h163v-77.768zm659.89-4.9154 5.125-74.042-179.18 4.9155-179.18 4.9155-5.38 48.984c-10.473 95.348-2.259 99.57 183.28 94.197l170.2-4.9284 5.125-74.042zm-659.89-237.63v-78.372l-169.91 4.925-169.91 4.925-5.097 73.447-5.097 73.447h175 175v-78.372zm659.86 4.925-5.097-73.447h-174.05-174.05l-5.38 48.984c-10.289 93.673-2.146 97.91 188.15 97.91h175.52l-5.097-73.447zm-659.86-228.98v-77.768h-137.21c-97.358 0-147.91 7.8138-174.05 26.902-34.952 25.523-49.645 92.242-25.79 117.11 6.078 6.3366 84.401 11.521 174.05 11.521h163v-77.768z"/></g><g transform="matrix(.84874 0 0 .76147 2408.1 3615.3)"><rect height="3076.2" width="2734.3" y="13264" x="19249" fill="#6076b3"/><g stroke-linejoin="round" fill-rule="evenodd" stroke-width="28.222" fill="#e0ee2c"><rect y="13369" width="356.65" x="18937" height="180.95"/><rect y="13708" width="356.65" x="18937" height="180.95"/><rect y="14048" width="356.65" x="18937" height="180.95"/><rect y="14387" width="356.65" x="18937" height="180.95"/><rect y="14726" width="356.65" x="18937" height="180.95"/><rect y="15066" width="356.65" x="18937" height="180.95"/><rect y="15405" width="356.65" x="18937" height="180.95"/><rect y="15744" width="356.65" x="18937" height="180.95"/><rect y="16083" width="356.65" x="18937" height="180.95"/><rect y="13324" width="356.65" x="21939" height="180.95"/><rect y="13663" width="356.65" x="21939" height="180.95"/><rect y="14002" width="356.65" x="21939" height="180.95"/><rect y="14342" width="356.65" x="21939" height="180.95"/><rect y="14681" width="356.65" x="21939" height="180.95"/><rect y="15020" width="356.65" x="21939" height="180.95"/><rect y="15360" width="356.65" x="21939" height="180.95"/><rect y="15699" width="356.65" x="21939" height="180.95"/><rect y="16038" width="356.65" x="21939" height="180.95"/></g><g stroke-linejoin="round" fill-rule="evenodd" transform="matrix(.98702 0 0 .90336 -2675 7020.8)" class="com.sun.star.drawing.TextShape" stroke-width="28.222"><text class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"/></text>
24<text style="word-spacing:0px;letter-spacing:0px" xml:space="preserve" font-size="1128.9px" y="9042.0264" x="22439.668" font-family="Sans" line-height="125%" fill="#000000"><tspan y="9042.0264" x="22439.668">CPU</tspan></text>
25</g></g><g stroke-linejoin="round" fill-rule="evenodd" transform="translate(-11752 543.6)" class="com.sun.star.drawing.TextShape" stroke-width="28.222"><text class="TextShape"><tspan font-size="706px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="15832" x="24341" class="TextPosition" transform="matrix(0,-1,1,0,8509,40173)"><tspan fill="#000000">PCI, USB, SPI, I2C, ...</tspan></tspan></tspan></text>
26</g><g stroke-linejoin="round" fill-rule="evenodd" transform="translate(-655.31 963.83)" class="com.sun.star.drawing.RectangleShape" stroke-width="28.222"><g transform="matrix(.49166 0 0 1.0059 6045.6 -82.24)"><path fill="#cfe7f5" d="m14169 14572h-2268v-1412h4536v1412h-2268z"/><path fill="none" d="m14169 14572h-2268v-1412h4536v1412h-2268z" stroke="#3465af"/></g><text y="-395.11282" x="-790.22229" class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="13686.9" x="12091.779" class="TextPosition"><tspan fill="#000000">Bridge</tspan></tspan></tspan></text>
27<text y="338.66486" x="-846.66675" class="TextShape"><tspan font-size="635px" font-family="&apos;Times New Roman&apos;, serif" font-weight="400" class="TextParagraph"><tspan y="14420.677" x="12035.335" class="TextPosition"><tspan fill="#000000"> DMA</tspan></tspan></tspan></text>
28</g></svg>
diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
index 4e9462f1ab4c..6e1667b5f3eb 100644
--- a/Documentation/DocBook/media/v4l/controls.xml
+++ b/Documentation/DocBook/media/v4l/controls.xml
@@ -4863,7 +4863,7 @@ interface and may change in the future.</para>
4863 </note> 4863 </note>
4864 4864
4865 <para> 4865 <para>
4866 The Image Source control class is intended for low-level control of 4866 The Image Process control class is intended for low-level control of
4867 image processing functions. Unlike 4867 image processing functions. Unlike
4868 <constant>V4L2_CID_IMAGE_SOURCE_CLASS</constant>, the controls in 4868 <constant>V4L2_CID_IMAGE_SOURCE_CLASS</constant>, the controls in
4869 this class affect processing the image, and do not control capturing 4869 this class affect processing the image, and do not control capturing
@@ -4871,7 +4871,7 @@ interface and may change in the future.</para>
4871 </para> 4871 </para>
4872 4872
4873 <table pgwide="1" frame="none" id="image-process-control-id"> 4873 <table pgwide="1" frame="none" id="image-process-control-id">
4874 <title>Image Source Control IDs</title> 4874 <title>Image Process Control IDs</title>
4875 4875
4876 <tgroup cols="4"> 4876 <tgroup cols="4">
4877 <colspec colname="c1" colwidth="1*" /> 4877 <colspec colname="c1" colwidth="1*" />
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml
index 1c17f802b471..7bbc2a48911e 100644
--- a/Documentation/DocBook/media/v4l/io.xml
+++ b/Documentation/DocBook/media/v4l/io.xml
@@ -841,15 +841,15 @@ is the file descriptor associated with a DMABUF buffer.</entry>
841 <entry>__u32</entry> 841 <entry>__u32</entry>
842 <entry><structfield>reserved2</structfield></entry> 842 <entry><structfield>reserved2</structfield></entry>
843 <entry></entry> 843 <entry></entry>
844 <entry>A place holder for future extensions. Applications 844 <entry>A place holder for future extensions. Drivers and applications
845should set this to 0.</entry> 845must set this to 0.</entry>
846 </row> 846 </row>
847 <row> 847 <row>
848 <entry>__u32</entry> 848 <entry>__u32</entry>
849 <entry><structfield>reserved</structfield></entry> 849 <entry><structfield>reserved</structfield></entry>
850 <entry></entry> 850 <entry></entry>
851 <entry>A place holder for future extensions. Applications 851 <entry>A place holder for future extensions. Drivers and applications
852should set this to 0.</entry> 852must set this to 0.</entry>
853 </row> 853 </row>
854 </tbody> 854 </tbody>
855 </tgroup> 855 </tgroup>
@@ -930,8 +930,8 @@ should set this to 0.</entry>
930 <entry>__u32</entry> 930 <entry>__u32</entry>
931 <entry><structfield>reserved[11]</structfield></entry> 931 <entry><structfield>reserved[11]</structfield></entry>
932 <entry></entry> 932 <entry></entry>
933 <entry>Reserved for future use. Should be zeroed by an 933 <entry>Reserved for future use. Should be zeroed by drivers and
934 application.</entry> 934 applications.</entry>
935 </row> 935 </row>
936 </tbody> 936 </tbody>
937 </tgroup> 937 </tgroup>
@@ -1129,6 +1129,18 @@ in this buffer has not been created by the CPU but by some DMA-capable unit,
1129in which case caches have not been used.</entry> 1129in which case caches have not been used.</entry>
1130 </row> 1130 </row>
1131 <row> 1131 <row>
1132 <entry><constant>V4L2_BUF_FLAG_LAST</constant></entry>
1133 <entry>0x00100000</entry>
1134 <entry>Last buffer produced by the hardware. mem2mem codec drivers
1135set this flag on the capture queue for the last buffer when the
1136<link linkend="vidioc-querybuf">VIDIOC_QUERYBUF</link> or
1137<link linkend="vidioc-qbuf">VIDIOC_DQBUF</link> ioctl is called. Due to hardware
1138limitations, the last buffer may be empty. In this case the driver will set the
1139<structfield>bytesused</structfield> field to 0, regardless of the format. Any
1140Any subsequent call to the <link linkend="vidioc-qbuf">VIDIOC_DQBUF</link> ioctl
1141will not block anymore, but return an &EPIPE;.</entry>
1142 </row>
1143 <row>
1132 <entry><constant>V4L2_BUF_FLAG_TIMESTAMP_MASK</constant></entry> 1144 <entry><constant>V4L2_BUF_FLAG_TIMESTAMP_MASK</constant></entry>
1133 <entry>0x0000e000</entry> 1145 <entry>0x0000e000</entry>
1134 <entry>Mask for timestamp types below. To test the 1146 <entry>Mask for timestamp types below. To test the
@@ -1155,7 +1167,7 @@ in which case caches have not been used.</entry>
1155 <entry>The buffer timestamp has been taken from the 1167 <entry>The buffer timestamp has been taken from the
1156 <constant>CLOCK_MONOTONIC</constant> clock. To access the 1168 <constant>CLOCK_MONOTONIC</constant> clock. To access the
1157 same clock outside V4L2, use 1169 same clock outside V4L2, use
1158 <function>clock_gettime(2)</function> .</entry> 1170 <function>clock_gettime(2)</function>.</entry>
1159 </row> 1171 </row>
1160 <row> 1172 <row>
1161 <entry><constant>V4L2_BUF_FLAG_TIMESTAMP_COPY</constant></entry> 1173 <entry><constant>V4L2_BUF_FLAG_TIMESTAMP_COPY</constant></entry>
diff --git a/Documentation/DocBook/media/v4l/media-func-open.xml b/Documentation/DocBook/media/v4l/media-func-open.xml
index f7df034dc9ed..122374a3e894 100644
--- a/Documentation/DocBook/media/v4l/media-func-open.xml
+++ b/Documentation/DocBook/media/v4l/media-func-open.xml
@@ -44,7 +44,7 @@
44 <para>To open a media device applications call <function>open()</function> 44 <para>To open a media device applications call <function>open()</function>
45 with the desired device name. The function has no side effects; the device 45 with the desired device name. The function has no side effects; the device
46 configuration remain unchanged.</para> 46 configuration remain unchanged.</para>
47 <para>When the device is opened in read-only mode, attemps to modify its 47 <para>When the device is opened in read-only mode, attempts to modify its
48 configuration will result in an error, and <varname>errno</varname> will be 48 configuration will result in an error, and <varname>errno</varname> will be
49 set to <errorcode>EBADF</errorcode>.</para> 49 set to <errorcode>EBADF</errorcode>.</para>
50 </refsect1> 50 </refsect1>
diff --git a/Documentation/DocBook/media/v4l/pixfmt-y16-be.xml b/Documentation/DocBook/media/v4l/pixfmt-y16-be.xml
new file mode 100644
index 000000000000..cea53e1eaa43
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/pixfmt-y16-be.xml
@@ -0,0 +1,81 @@
1<refentry id="V4L2-PIX-FMT-Y16-BE">
2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_Y16_BE ('Y16 ' | (1 &lt;&lt; 31))</refentrytitle>
4 &manvol;
5 </refmeta>
6 <refnamediv>
7 <refname><constant>V4L2_PIX_FMT_Y16_BE</constant></refname>
8 <refpurpose>Grey-scale image</refpurpose>
9 </refnamediv>
10 <refsect1>
11 <title>Description</title>
12
13 <para>This is a grey-scale image with a depth of 16 bits per
14pixel. The most significant byte is stored at lower memory addresses
15(big-endian). Note the actual sampling precision may be lower than
1616 bits, for example 10 bits per pixel with values in range 0 to
171023.</para>
18
19 <example>
20 <title><constant>V4L2_PIX_FMT_Y16_BE</constant> 4 &times; 4
21pixel image</title>
22
23 <formalpara>
24 <title>Byte Order.</title>
25 <para>Each cell is one byte.
26 <informaltable frame="none">
27 <tgroup cols="9" align="center">
28 <colspec align="left" colwidth="2*" />
29 <tbody valign="top">
30 <row>
31 <entry>start&nbsp;+&nbsp;0:</entry>
32 <entry>Y'<subscript>00high</subscript></entry>
33 <entry>Y'<subscript>00low</subscript></entry>
34 <entry>Y'<subscript>01high</subscript></entry>
35 <entry>Y'<subscript>01low</subscript></entry>
36 <entry>Y'<subscript>02high</subscript></entry>
37 <entry>Y'<subscript>02low</subscript></entry>
38 <entry>Y'<subscript>03high</subscript></entry>
39 <entry>Y'<subscript>03low</subscript></entry>
40 </row>
41 <row>
42 <entry>start&nbsp;+&nbsp;8:</entry>
43 <entry>Y'<subscript>10high</subscript></entry>
44 <entry>Y'<subscript>10low</subscript></entry>
45 <entry>Y'<subscript>11high</subscript></entry>
46 <entry>Y'<subscript>11low</subscript></entry>
47 <entry>Y'<subscript>12high</subscript></entry>
48 <entry>Y'<subscript>12low</subscript></entry>
49 <entry>Y'<subscript>13high</subscript></entry>
50 <entry>Y'<subscript>13low</subscript></entry>
51 </row>
52 <row>
53 <entry>start&nbsp;+&nbsp;16:</entry>
54 <entry>Y'<subscript>20high</subscript></entry>
55 <entry>Y'<subscript>20low</subscript></entry>
56 <entry>Y'<subscript>21high</subscript></entry>
57 <entry>Y'<subscript>21low</subscript></entry>
58 <entry>Y'<subscript>22high</subscript></entry>
59 <entry>Y'<subscript>22low</subscript></entry>
60 <entry>Y'<subscript>23high</subscript></entry>
61 <entry>Y'<subscript>23low</subscript></entry>
62 </row>
63 <row>
64 <entry>start&nbsp;+&nbsp;24:</entry>
65 <entry>Y'<subscript>30high</subscript></entry>
66 <entry>Y'<subscript>30low</subscript></entry>
67 <entry>Y'<subscript>31high</subscript></entry>
68 <entry>Y'<subscript>31low</subscript></entry>
69 <entry>Y'<subscript>32high</subscript></entry>
70 <entry>Y'<subscript>32low</subscript></entry>
71 <entry>Y'<subscript>33high</subscript></entry>
72 <entry>Y'<subscript>33low</subscript></entry>
73 </row>
74 </tbody>
75 </tgroup>
76 </informaltable>
77 </para>
78 </formalpara>
79 </example>
80 </refsect1>
81</refentry>
diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml
index fcde4e20205e..965ea916784a 100644
--- a/Documentation/DocBook/media/v4l/pixfmt.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt.xml
@@ -157,6 +157,14 @@ see <xref linkend="colorspaces" />.</entry>
157capture streams and by the application for output streams, 157capture streams and by the application for output streams,
158see <xref linkend="colorspaces" />.</entry> 158see <xref linkend="colorspaces" />.</entry>
159 </row> 159 </row>
160 <row>
161 <entry>&v4l2-xfer-func;</entry>
162 <entry><structfield>xfer_func</structfield></entry>
163 <entry>This information supplements the
164<structfield>colorspace</structfield> and must be set by the driver for
165capture streams and by the application for output streams,
166see <xref linkend="colorspaces" />.</entry>
167 </row>
160 </tbody> 168 </tbody>
161 </tgroup> 169 </tgroup>
162 </table> 170 </table>
@@ -190,8 +198,8 @@ see <xref linkend="colorspaces" />.</entry>
190 <row> 198 <row>
191 <entry>__u16</entry> 199 <entry>__u16</entry>
192 <entry><structfield>reserved[6]</structfield></entry> 200 <entry><structfield>reserved[6]</structfield></entry>
193 <entry>Reserved for future extensions. Should be zeroed by the 201 <entry>Reserved for future extensions. Should be zeroed by drivers and
194 application.</entry> 202 applications.</entry>
195 </row> 203 </row>
196 </tbody> 204 </tbody>
197 </tgroup> 205 </tgroup>
@@ -264,11 +272,19 @@ see <xref linkend="colorspaces" />.</entry>
264capture streams and by the application for output streams, 272capture streams and by the application for output streams,
265see <xref linkend="colorspaces" />.</entry> 273see <xref linkend="colorspaces" />.</entry>
266 </row> 274 </row>
275 <row>
276 <entry>&v4l2-xfer-func;</entry>
277 <entry><structfield>xfer_func</structfield></entry>
278 <entry>This information supplements the
279<structfield>colorspace</structfield> and must be set by the driver for
280capture streams and by the application for output streams,
281see <xref linkend="colorspaces" />.</entry>
282 </row>
267 <row> 283 <row>
268 <entry>__u8</entry> 284 <entry>__u8</entry>
269 <entry><structfield>reserved[8]</structfield></entry> 285 <entry><structfield>reserved[7]</structfield></entry>
270 <entry>Reserved for future extensions. Should be zeroed by the 286 <entry>Reserved for future extensions. Should be zeroed by drivers
271 application.</entry> 287 and applications.</entry>
272 </row> 288 </row>
273 </tbody> 289 </tbody>
274 </tgroup> 290 </tgroup>
@@ -476,15 +492,16 @@ is also very useful.</para>
476 492
477 <section> 493 <section>
478 <title>Defining Colorspaces in V4L2</title> 494 <title>Defining Colorspaces in V4L2</title>
479 <para>In V4L2 colorspaces are defined by three values. The first is the colorspace 495 <para>In V4L2 colorspaces are defined by four values. The first is the colorspace
480identifier (&v4l2-colorspace;) which defines the chromaticities, the transfer 496identifier (&v4l2-colorspace;) which defines the chromaticities, the default transfer
481function, the default Y'CbCr encoding and the default quantization method. The second 497function, the default Y'CbCr encoding and the default quantization method. The second
482is the Y'CbCr encoding identifier (&v4l2-ycbcr-encoding;) to specify non-standard 498is the transfer function identifier (&v4l2-xfer-func;) to specify non-standard
483Y'CbCr encodings and the third is the quantization identifier (&v4l2-quantization;) 499transfer functions. The third is the Y'CbCr encoding identifier (&v4l2-ycbcr-encoding;)
484to specify non-standard quantization methods. Most of the time only the colorspace 500to specify non-standard Y'CbCr encodings and the fourth is the quantization identifier
485field of &v4l2-pix-format; or &v4l2-pix-format-mplane; needs to be filled in. Note 501(&v4l2-quantization;) to specify non-standard quantization methods. Most of the time
486that the default R'G'B' quantization is full range for all colorspaces except for 502only the colorspace field of &v4l2-pix-format; or &v4l2-pix-format-mplane; needs to
487BT.2020 which uses limited range R'G'B' quantization.</para> 503be filled in. Note that the default R'G'B' quantization is full range for all
504colorspaces except for BT.2020 which uses limited range R'G'B' quantization.</para>
488 505
489 <table pgwide="1" frame="none" id="v4l2-colorspace"> 506 <table pgwide="1" frame="none" id="v4l2-colorspace">
490 <title>V4L2 Colorspaces</title> 507 <title>V4L2 Colorspaces</title>
@@ -498,6 +515,11 @@ BT.2020 which uses limited range R'G'B' quantization.</para>
498 </thead> 515 </thead>
499 <tbody valign="top"> 516 <tbody valign="top">
500 <row> 517 <row>
518 <entry><constant>V4L2_COLORSPACE_DEFAULT</constant></entry>
519 <entry>The default colorspace. This can be used by applications to let the
520 driver fill in the colorspace.</entry>
521 </row>
522 <row>
501 <entry><constant>V4L2_COLORSPACE_SMPTE170M</constant></entry> 523 <entry><constant>V4L2_COLORSPACE_SMPTE170M</constant></entry>
502 <entry>See <xref linkend="col-smpte-170m" />.</entry> 524 <entry>See <xref linkend="col-smpte-170m" />.</entry>
503 </row> 525 </row>
@@ -533,6 +555,52 @@ BT.2020 which uses limited range R'G'B' quantization.</para>
533 <entry><constant>V4L2_COLORSPACE_JPEG</constant></entry> 555 <entry><constant>V4L2_COLORSPACE_JPEG</constant></entry>
534 <entry>See <xref linkend="col-jpeg" />.</entry> 556 <entry>See <xref linkend="col-jpeg" />.</entry>
535 </row> 557 </row>
558 <row>
559 <entry><constant>V4L2_COLORSPACE_RAW</constant></entry>
560 <entry>The raw colorspace. This is used for raw image capture where
561 the image is minimally processed and is using the internal colorspace
562 of the device. The software that processes an image using this
563 'colorspace' will have to know the internals of the capture device.</entry>
564 </row>
565 </tbody>
566 </tgroup>
567 </table>
568
569 <table pgwide="1" frame="none" id="v4l2-xfer-func">
570 <title>V4L2 Transfer Function</title>
571 <tgroup cols="2" align="left">
572 &cs-def;
573 <thead>
574 <row>
575 <entry>Identifier</entry>
576 <entry>Details</entry>
577 </row>
578 </thead>
579 <tbody valign="top">
580 <row>
581 <entry><constant>V4L2_XFER_FUNC_DEFAULT</constant></entry>
582 <entry>Use the default transfer function as defined by the colorspace.</entry>
583 </row>
584 <row>
585 <entry><constant>V4L2_XFER_FUNC_709</constant></entry>
586 <entry>Use the Rec. 709 transfer function.</entry>
587 </row>
588 <row>
589 <entry><constant>V4L2_XFER_FUNC_SRGB</constant></entry>
590 <entry>Use the sRGB transfer function.</entry>
591 </row>
592 <row>
593 <entry><constant>V4L2_XFER_FUNC_ADOBERGB</constant></entry>
594 <entry>Use the AdobeRGB transfer function.</entry>
595 </row>
596 <row>
597 <entry><constant>V4L2_XFER_FUNC_SMPTE240M</constant></entry>
598 <entry>Use the SMPTE 240M transfer function.</entry>
599 </row>
600 <row>
601 <entry><constant>V4L2_XFER_FUNC_NONE</constant></entry>
602 <entry>Do not use a transfer function (i.e. use linear RGB values).</entry>
603 </row>
536 </tbody> 604 </tbody>
537 </tgroup> 605 </tgroup>
538 </table> 606 </table>
@@ -624,7 +692,8 @@ is mapped to [16&hellip;235]. Cb and Cr are mapped from [-0.5&hellip;0.5] to [16
624 <section id="col-smpte-170m"> 692 <section id="col-smpte-170m">
625 <title>Colorspace SMPTE 170M (<constant>V4L2_COLORSPACE_SMPTE170M</constant>)</title> 693 <title>Colorspace SMPTE 170M (<constant>V4L2_COLORSPACE_SMPTE170M</constant>)</title>
626 <para>The <xref linkend="smpte170m" /> standard defines the colorspace used by NTSC and PAL and by SDTV 694 <para>The <xref linkend="smpte170m" /> standard defines the colorspace used by NTSC and PAL and by SDTV
627in general. The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_601</constant>. 695in general. The default transfer function is <constant>V4L2_XFER_FUNC_709</constant>.
696The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_601</constant>.
628The default Y'CbCr quantization is limited range. The chromaticities of the primary colors and 697The default Y'CbCr quantization is limited range. The chromaticities of the primary colors and
629the white reference are:</para> 698the white reference are:</para>
630 <table frame="none"> 699 <table frame="none">
@@ -706,7 +775,8 @@ rarely seen.</para>
706 775
707 <section id="col-rec709"> 776 <section id="col-rec709">
708 <title>Colorspace Rec. 709 (<constant>V4L2_COLORSPACE_REC709</constant>)</title> 777 <title>Colorspace Rec. 709 (<constant>V4L2_COLORSPACE_REC709</constant>)</title>
709 <para>The <xref linkend="itu709" /> standard defines the colorspace used by HDTV in general. The default 778 <para>The <xref linkend="itu709" /> standard defines the colorspace used by HDTV in general.
779The default transfer function is <constant>V4L2_XFER_FUNC_709</constant>. The default
710Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_709</constant>. The default Y'CbCr quantization is 780Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_709</constant>. The default Y'CbCr quantization is
711limited range. The chromaticities of the primary colors and the white reference are:</para> 781limited range. The chromaticities of the primary colors and the white reference are:</para>
712 <table frame="none"> 782 <table frame="none">
@@ -817,9 +887,11 @@ The xvYCC encodings always use full range quantization.</para>
817 887
818 <section id="col-srgb"> 888 <section id="col-srgb">
819 <title>Colorspace sRGB (<constant>V4L2_COLORSPACE_SRGB</constant>)</title> 889 <title>Colorspace sRGB (<constant>V4L2_COLORSPACE_SRGB</constant>)</title>
820 <para>The <xref linkend="srgb" /> standard defines the colorspace used by most webcams and computer graphics. The 890 <para>The <xref linkend="srgb" /> standard defines the colorspace used by most webcams
821default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_SYCC</constant>. The default Y'CbCr quantization 891and computer graphics. The default transfer function is <constant>V4L2_XFER_FUNC_SRGB</constant>.
822is full range. The chromaticities of the primary colors and the white reference are:</para> 892The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_SYCC</constant>. The default Y'CbCr
893quantization is full range. The chromaticities of the primary colors and the white
894reference are:</para>
823 <table frame="none"> 895 <table frame="none">
824 <title>sRGB Chromaticities</title> 896 <title>sRGB Chromaticities</title>
825 <tgroup cols="3" align="left"> 897 <tgroup cols="3" align="left">
@@ -896,6 +968,7 @@ values before quantization, but this encoding does not do that.</para>
896 <title>Colorspace Adobe RGB (<constant>V4L2_COLORSPACE_ADOBERGB</constant>)</title> 968 <title>Colorspace Adobe RGB (<constant>V4L2_COLORSPACE_ADOBERGB</constant>)</title>
897 <para>The <xref linkend="adobergb" /> standard defines the colorspace used by computer graphics 969 <para>The <xref linkend="adobergb" /> standard defines the colorspace used by computer graphics
898that use the AdobeRGB colorspace. This is also known as the <xref linkend="oprgb" /> standard. 970that use the AdobeRGB colorspace. This is also known as the <xref linkend="oprgb" /> standard.
971The default transfer function is <constant>V4L2_XFER_FUNC_ADOBERGB</constant>.
899The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_601</constant>. The default Y'CbCr 972The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_601</constant>. The default Y'CbCr
900quantization is limited range. The chromaticities of the primary colors and the white reference 973quantization is limited range. The chromaticities of the primary colors and the white reference
901are:</para> 974are:</para>
@@ -967,7 +1040,8 @@ SMPTE 170M/BT.601. The Y'CbCr quantization is limited range.</para>
967 <section id="col-bt2020"> 1040 <section id="col-bt2020">
968 <title>Colorspace BT.2020 (<constant>V4L2_COLORSPACE_BT2020</constant>)</title> 1041 <title>Colorspace BT.2020 (<constant>V4L2_COLORSPACE_BT2020</constant>)</title>
969 <para>The <xref linkend="itu2020" /> standard defines the colorspace used by Ultra-high definition 1042 <para>The <xref linkend="itu2020" /> standard defines the colorspace used by Ultra-high definition
970television (UHDTV). The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_BT2020</constant>. 1043television (UHDTV). The default transfer function is <constant>V4L2_XFER_FUNC_709</constant>.
1044The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_BT2020</constant>.
971The default R'G'B' quantization is limited range (!), and so is the default Y'CbCr quantization. 1045The default R'G'B' quantization is limited range (!), and so is the default Y'CbCr quantization.
972The chromaticities of the primary colors and the white reference are:</para> 1046The chromaticities of the primary colors and the white reference are:</para>
973 <table frame="none"> 1047 <table frame="none">
@@ -1082,8 +1156,10 @@ clamped to the range [-0.5&hellip;0.5]. The Yc'CbcCrc quantization is limited ra
1082 1156
1083 <section id="col-smpte-240m"> 1157 <section id="col-smpte-240m">
1084 <title>Colorspace SMPTE 240M (<constant>V4L2_COLORSPACE_SMPTE240M</constant>)</title> 1158 <title>Colorspace SMPTE 240M (<constant>V4L2_COLORSPACE_SMPTE240M</constant>)</title>
1085 <para>The <xref linkend="smpte240m" /> standard was an interim standard used during the early days of HDTV (1988-1998). 1159 <para>The <xref linkend="smpte240m" /> standard was an interim standard used during
1086It has been superseded by Rec. 709. The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_SMPTE240M</constant>. 1160the early days of HDTV (1988-1998). It has been superseded by Rec. 709.
1161The default transfer function is <constant>V4L2_XFER_FUNC_SMPTE240M</constant>.
1162The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_SMPTE240M</constant>.
1087The default Y'CbCr quantization is limited range. The chromaticities of the primary colors and the 1163The default Y'CbCr quantization is limited range. The chromaticities of the primary colors and the
1088white reference are:</para> 1164white reference are:</para>
1089 <table frame="none"> 1165 <table frame="none">
@@ -1156,8 +1232,10 @@ clamped to the range [-0.5&hellip;0.5]. The Y'CbCr quantization is limited range
1156 <section id="col-sysm"> 1232 <section id="col-sysm">
1157 <title>Colorspace NTSC 1953 (<constant>V4L2_COLORSPACE_470_SYSTEM_M</constant>)</title> 1233 <title>Colorspace NTSC 1953 (<constant>V4L2_COLORSPACE_470_SYSTEM_M</constant>)</title>
1158 <para>This standard defines the colorspace used by NTSC in 1953. In practice this 1234 <para>This standard defines the colorspace used by NTSC in 1953. In practice this
1159colorspace is obsolete and SMPTE 170M should be used instead. The default Y'CbCr encoding 1235colorspace is obsolete and SMPTE 170M should be used instead.
1160is <constant>V4L2_YCBCR_ENC_601</constant>. The default Y'CbCr quantization is limited range. 1236The default transfer function is <constant>V4L2_XFER_FUNC_709</constant>.
1237The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_601</constant>.
1238The default Y'CbCr quantization is limited range.
1161The chromaticities of the primary colors and the white reference are:</para> 1239The chromaticities of the primary colors and the white reference are:</para>
1162 <table frame="none"> 1240 <table frame="none">
1163 <title>NTSC 1953 Chromaticities</title> 1241 <title>NTSC 1953 Chromaticities</title>
@@ -1234,8 +1312,10 @@ This transform is identical to one defined in SMPTE 170M/BT.601.</para>
1234 <section id="col-sysbg"> 1312 <section id="col-sysbg">
1235 <title>Colorspace EBU Tech. 3213 (<constant>V4L2_COLORSPACE_470_SYSTEM_BG</constant>)</title> 1313 <title>Colorspace EBU Tech. 3213 (<constant>V4L2_COLORSPACE_470_SYSTEM_BG</constant>)</title>
1236 <para>The <xref linkend="tech3213" /> standard defines the colorspace used by PAL/SECAM in 1975. In practice this 1314 <para>The <xref linkend="tech3213" /> standard defines the colorspace used by PAL/SECAM in 1975. In practice this
1237colorspace is obsolete and SMPTE 170M should be used instead. The default Y'CbCr encoding 1315colorspace is obsolete and SMPTE 170M should be used instead.
1238is <constant>V4L2_YCBCR_ENC_601</constant>. The default Y'CbCr quantization is limited range. 1316The default transfer function is <constant>V4L2_XFER_FUNC_709</constant>.
1317The default Y'CbCr encoding is <constant>V4L2_YCBCR_ENC_601</constant>.
1318The default Y'CbCr quantization is limited range.
1239The chromaticities of the primary colors and the white reference are:</para> 1319The chromaticities of the primary colors and the white reference are:</para>
1240 <table frame="none"> 1320 <table frame="none">
1241 <title>EBU Tech. 3213 Chromaticities</title> 1321 <title>EBU Tech. 3213 Chromaticities</title>
@@ -1308,7 +1388,8 @@ This transform is identical to one defined in SMPTE 170M/BT.601.</para>
1308 <section id="col-jpeg"> 1388 <section id="col-jpeg">
1309 <title>Colorspace JPEG (<constant>V4L2_COLORSPACE_JPEG</constant>)</title> 1389 <title>Colorspace JPEG (<constant>V4L2_COLORSPACE_JPEG</constant>)</title>
1310 <para>This colorspace defines the colorspace used by most (Motion-)JPEG formats. The chromaticities 1390 <para>This colorspace defines the colorspace used by most (Motion-)JPEG formats. The chromaticities
1311of the primary colors and the white reference are identical to sRGB. The Y'CbCr encoding is 1391of the primary colors and the white reference are identical to sRGB. The transfer
1392function use is <constant>V4L2_XFER_FUNC_SRGB</constant>. The Y'CbCr encoding is
1312<constant>V4L2_YCBCR_ENC_601</constant> with full range quantization where 1393<constant>V4L2_YCBCR_ENC_601</constant> with full range quantization where
1313Y' is scaled to [0&hellip;255] and Cb/Cr are scaled to [-128&hellip;128] and 1394Y' is scaled to [0&hellip;255] and Cb/Cr are scaled to [-128&hellip;128] and
1314then clipped to [-128&hellip;127].</para> 1395then clipped to [-128&hellip;127].</para>
@@ -1429,6 +1510,7 @@ information.</para>
1429 &sub-y12; 1510 &sub-y12;
1430 &sub-y10b; 1511 &sub-y10b;
1431 &sub-y16; 1512 &sub-y16;
1513 &sub-y16-be;
1432 &sub-uv8; 1514 &sub-uv8;
1433 &sub-yuyv; 1515 &sub-yuyv;
1434 &sub-uyvy; 1516 &sub-uyvy;
diff --git a/Documentation/DocBook/media/v4l/remote_controllers.xml b/Documentation/DocBook/media/v4l/remote_controllers.xml
index 5124a6c4daa8..b86844e80257 100644
--- a/Documentation/DocBook/media/v4l/remote_controllers.xml
+++ b/Documentation/DocBook/media/v4l/remote_controllers.xml
@@ -284,7 +284,7 @@ different IR's. Due to that, V4L2 API now specifies a standard for mapping Media
284</tgroup> 284</tgroup>
285</table> 285</table>
286 286
287<para>It should be noticed that, sometimes, there some fundamental missing keys at some cheaper IR's. Due to that, it is recommended to:</para> 287<para>It should be noted that, sometimes, there some fundamental missing keys at some cheaper IR's. Due to that, it is recommended to:</para>
288 288
289<table pgwide="1" frame="none" id="rc_keymap_notes"> 289<table pgwide="1" frame="none" id="rc_keymap_notes">
290<title>Notes</title> 290<title>Notes</title>
diff --git a/Documentation/DocBook/media/v4l/subdev-formats.xml b/Documentation/DocBook/media/v4l/subdev-formats.xml
index 2588ad781242..4e73345e3eab 100644
--- a/Documentation/DocBook/media/v4l/subdev-formats.xml
+++ b/Documentation/DocBook/media/v4l/subdev-formats.xml
@@ -50,8 +50,16 @@ capture streams and by the application for output streams,
50see <xref linkend="colorspaces" />.</entry> 50see <xref linkend="colorspaces" />.</entry>
51 </row> 51 </row>
52 <row> 52 <row>
53 <entry>__u32</entry> 53 <entry>&v4l2-xfer-func;</entry>
54 <entry><structfield>reserved</structfield>[6]</entry> 54 <entry><structfield>xfer_func</structfield></entry>
55 <entry>This information supplements the
56<structfield>colorspace</structfield> and must be set by the driver for
57capture streams and by the application for output streams,
58see <xref linkend="colorspaces" />.</entry>
59 </row>
60 <row>
61 <entry>__u16</entry>
62 <entry><structfield>reserved</structfield>[11]</entry>
55 <entry>Reserved for future extensions. Applications and drivers must 63 <entry>Reserved for future extensions. Applications and drivers must
56 set the array to zero.</entry> 64 set the array to zero.</entry>
57 </row> 65 </row>
diff --git a/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml b/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml
index 9b700a5f4df7..8ffe74f84af1 100644
--- a/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-create-bufs.xml
@@ -134,7 +134,8 @@ information.</para>
134 <row> 134 <row>
135 <entry>__u32</entry> 135 <entry>__u32</entry>
136 <entry><structfield>reserved</structfield>[8]</entry> 136 <entry><structfield>reserved</structfield>[8]</entry>
137 <entry>A place holder for future extensions.</entry> 137 <entry>A place holder for future extensions. Drivers and applications
138must set the array to zero.</entry>
138 </row> 139 </row>
139 </tbody> 140 </tbody>
140 </tgroup> 141 </tgroup>
diff --git a/Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml b/Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml
index 9215627b04c7..73eb5cfe698a 100644
--- a/Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-decoder-cmd.xml
@@ -197,7 +197,17 @@ be muted when playing back at a non-standard speed.
197this command does nothing. This command has two flags: 197this command does nothing. This command has two flags:
198if <constant>V4L2_DEC_CMD_STOP_TO_BLACK</constant> is set, then the decoder will 198if <constant>V4L2_DEC_CMD_STOP_TO_BLACK</constant> is set, then the decoder will
199set the picture to black after it stopped decoding. Otherwise the last image will 199set the picture to black after it stopped decoding. Otherwise the last image will
200repeat. If <constant>V4L2_DEC_CMD_STOP_IMMEDIATELY</constant> is set, then the decoder 200repeat. mem2mem decoders will stop producing new frames altogether. They will send
201a <constant>V4L2_EVENT_EOS</constant> event when the last frame has been decoded
202and all frames are ready to be dequeued and will set the
203<constant>V4L2_BUF_FLAG_LAST</constant> buffer flag on the last buffer of the
204capture queue to indicate there will be no new buffers produced to dequeue. This
205buffer may be empty, indicated by the driver setting the
206<structfield>bytesused</structfield> field to 0. Once the
207<constant>V4L2_BUF_FLAG_LAST</constant> flag was set, the
208<link linkend="vidioc-qbuf">VIDIOC_DQBUF</link> ioctl will not block anymore,
209but return an &EPIPE;.
210If <constant>V4L2_DEC_CMD_STOP_IMMEDIATELY</constant> is set, then the decoder
201stops immediately (ignoring the <structfield>pts</structfield> value), otherwise it 211stops immediately (ignoring the <structfield>pts</structfield> value), otherwise it
202will keep decoding until timestamp >= pts or until the last of the pending data from 212will keep decoding until timestamp >= pts or until the last of the pending data from
203its internal buffers was decoded. 213its internal buffers was decoded.
diff --git a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
index 50ccd33948c1..c9c3c7713832 100644
--- a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml
@@ -133,7 +133,10 @@
133 <entry>struct timespec</entry> 133 <entry>struct timespec</entry>
134 <entry><structfield>timestamp</structfield></entry> 134 <entry><structfield>timestamp</structfield></entry>
135 <entry></entry> 135 <entry></entry>
136 <entry>Event timestamp.</entry> 136 <entry>Event timestamp. The timestamp has been taken from the
137 <constant>CLOCK_MONOTONIC</constant> clock. To access the
138 same clock outside V4L2, use <function>clock_gettime(2)</function>.
139 </entry>
137 </row> 140 </row>
138 <row> 141 <row>
139 <entry>u32</entry> 142 <entry>u32</entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml b/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml
index 0619ca5d2d36..fc1d4625a78c 100644
--- a/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-encoder-cmd.xml
@@ -129,7 +129,15 @@ this command.</entry>
129encoding will continue until the end of the current <wordasword>Group 129encoding will continue until the end of the current <wordasword>Group
130Of Pictures</wordasword>, otherwise encoding will stop immediately. 130Of Pictures</wordasword>, otherwise encoding will stop immediately.
131When the encoder is already stopped, this command does 131When the encoder is already stopped, this command does
132nothing.</entry> 132nothing. mem2mem encoders will send a <constant>V4L2_EVENT_EOS</constant> event
133when the last frame has been decoded and all frames are ready to be dequeued and
134will set the <constant>V4L2_BUF_FLAG_LAST</constant> buffer flag on the last
135buffer of the capture queue to indicate there will be no new buffers produced to
136dequeue. This buffer may be empty, indicated by the driver setting the
137<structfield>bytesused</structfield> field to 0. Once the
138<constant>V4L2_BUF_FLAG_LAST</constant> flag was set, the
139<link linkend="vidioc-qbuf">VIDIOC_DQBUF</link> ioctl will not block anymore,
140but return an &EPIPE;.</entry>
133 </row> 141 </row>
134 <row> 142 <row>
135 <entry><constant>V4L2_ENC_CMD_PAUSE</constant></entry> 143 <entry><constant>V4L2_ENC_CMD_PAUSE</constant></entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-enum-frameintervals.xml b/Documentation/DocBook/media/v4l/vidioc-enum-frameintervals.xml
index 5fd72c4c33e3..7c839ab0afbb 100644
--- a/Documentation/DocBook/media/v4l/vidioc-enum-frameintervals.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-enum-frameintervals.xml
@@ -217,7 +217,8 @@ enumerated.</entry>
217 <entry>__u32</entry> 217 <entry>__u32</entry>
218 <entry><structfield>reserved[2]</structfield></entry> 218 <entry><structfield>reserved[2]</structfield></entry>
219 <entry></entry> 219 <entry></entry>
220 <entry>Reserved space for future use.</entry> 220 <entry>Reserved space for future use. Must be zeroed by drivers and
221 applications.</entry>
221 </row> 222 </row>
222 </tbody> 223 </tbody>
223 </tgroup> 224 </tgroup>
diff --git a/Documentation/DocBook/media/v4l/vidioc-enum-framesizes.xml b/Documentation/DocBook/media/v4l/vidioc-enum-framesizes.xml
index a78454b5abcd..9ed68ac8f474 100644
--- a/Documentation/DocBook/media/v4l/vidioc-enum-framesizes.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-enum-framesizes.xml
@@ -223,7 +223,8 @@ application should zero out all members except for the
223 <entry>__u32</entry> 223 <entry>__u32</entry>
224 <entry><structfield>reserved[2]</structfield></entry> 224 <entry><structfield>reserved[2]</structfield></entry>
225 <entry></entry> 225 <entry></entry>
226 <entry>Reserved space for future use.</entry> 226 <entry>Reserved space for future use. Must be zeroed by drivers and
227 applications.</entry>
227 </row> 228 </row>
228 </tbody> 229 </tbody>
229 </tgroup> 230 </tgroup>
diff --git a/Documentation/DocBook/media/v4l/vidioc-expbuf.xml b/Documentation/DocBook/media/v4l/vidioc-expbuf.xml
index 4165e7bfa4ff..a78c9207422f 100644
--- a/Documentation/DocBook/media/v4l/vidioc-expbuf.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-expbuf.xml
@@ -184,7 +184,8 @@ of open() for more details.</entry>
184 <row> 184 <row>
185 <entry>__u32</entry> 185 <entry>__u32</entry>
186 <entry><structfield>reserved[11]</structfield></entry> 186 <entry><structfield>reserved[11]</structfield></entry>
187 <entry>Reserved field for future use. Must be set to zero.</entry> 187 <entry>Reserved field for future use. Drivers and applications must
188set the array to zero.</entry>
188 </row> 189 </row>
189 </tbody> 190 </tbody>
190 </tgroup> 191 </tgroup>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-dv-timings.xml b/Documentation/DocBook/media/v4l/vidioc-g-dv-timings.xml
index 764b635ed4cf..06952d7cc770 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-dv-timings.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-dv-timings.xml
@@ -7,6 +7,8 @@
7 <refnamediv> 7 <refnamediv>
8 <refname>VIDIOC_G_DV_TIMINGS</refname> 8 <refname>VIDIOC_G_DV_TIMINGS</refname>
9 <refname>VIDIOC_S_DV_TIMINGS</refname> 9 <refname>VIDIOC_S_DV_TIMINGS</refname>
10 <refname>VIDIOC_SUBDEV_G_DV_TIMINGS</refname>
11 <refname>VIDIOC_SUBDEV_S_DV_TIMINGS</refname>
10 <refpurpose>Get or set DV timings for input or output</refpurpose> 12 <refpurpose>Get or set DV timings for input or output</refpurpose>
11 </refnamediv> 13 </refnamediv>
12 14
@@ -34,7 +36,7 @@
34 <varlistentry> 36 <varlistentry>
35 <term><parameter>request</parameter></term> 37 <term><parameter>request</parameter></term>
36 <listitem> 38 <listitem>
37 <para>VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS</para> 39 <para>VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS, VIDIOC_SUBDEV_G_DV_TIMINGS, VIDIOC_SUBDEV_S_DV_TIMINGS</para>
38 </listitem> 40 </listitem>
39 </varlistentry> 41 </varlistentry>
40 <varlistentry> 42 <varlistentry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-edid.xml b/Documentation/DocBook/media/v4l/vidioc-g-edid.xml
index 6df40db4c8ba..2702536bbc7c 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-edid.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-edid.xml
@@ -7,6 +7,8 @@
7 <refnamediv> 7 <refnamediv>
8 <refname>VIDIOC_G_EDID</refname> 8 <refname>VIDIOC_G_EDID</refname>
9 <refname>VIDIOC_S_EDID</refname> 9 <refname>VIDIOC_S_EDID</refname>
10 <refname>VIDIOC_SUBDEV_G_EDID</refname>
11 <refname>VIDIOC_SUBDEV_S_EDID</refname>
10 <refpurpose>Get or set the EDID of a video receiver/transmitter</refpurpose> 12 <refpurpose>Get or set the EDID of a video receiver/transmitter</refpurpose>
11 </refnamediv> 13 </refnamediv>
12 14
@@ -42,7 +44,7 @@
42 <varlistentry> 44 <varlistentry>
43 <term><parameter>request</parameter></term> 45 <term><parameter>request</parameter></term>
44 <listitem> 46 <listitem>
45 <para>VIDIOC_G_EDID, VIDIOC_S_EDID</para> 47 <para>VIDIOC_G_EDID, VIDIOC_S_EDID, VIDIOC_SUBDEV_G_EDID, VIDIOC_SUBDEV_S_EDID</para>
46 </listitem> 48 </listitem>
47 </varlistentry> 49 </varlistentry>
48 <varlistentry> 50 <varlistentry>
@@ -82,6 +84,13 @@
82 <para>If blocks have to be retrieved from the sink, then this call will block until they 84 <para>If blocks have to be retrieved from the sink, then this call will block until they
83 have been read.</para> 85 have been read.</para>
84 86
87 <para>If <structfield>start_block</structfield> and <structfield>blocks</structfield> are
88 both set to 0 when <constant>VIDIOC_G_EDID</constant> is called, then the driver will
89 set <structfield>blocks</structfield> to the total number of available EDID blocks
90 and it will return 0 without copying any data. This is an easy way to discover how many
91 EDID blocks there are. Note that if there are no EDID blocks available at all, then
92 the driver will set <structfield>blocks</structfield> to 0 and it returns 0.</para>
93
85 <para>To set the EDID blocks of a receiver the application has to fill in the <structfield>pad</structfield>, 94 <para>To set the EDID blocks of a receiver the application has to fill in the <structfield>pad</structfield>,
86 <structfield>blocks</structfield> and <structfield>edid</structfield> fields and set 95 <structfield>blocks</structfield> and <structfield>edid</structfield> fields and set
87 <structfield>start_block</structfield> to 0. It is not possible to set part of an EDID, 96 <structfield>start_block</structfield> to 0. It is not possible to set part of an EDID,
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
index 0bb5c060db27..7865351688da 100644
--- a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
@@ -199,7 +199,7 @@ exist no rectangle</emphasis> that satisfies the constraints.</para>
199 <row> 199 <row>
200 <entry>__u32</entry> 200 <entry>__u32</entry>
201 <entry><structfield>reserved[9]</structfield></entry> 201 <entry><structfield>reserved[9]</structfield></entry>
202 <entry>Reserved fields for future use.</entry> 202 <entry>Reserved fields for future use. Drivers and applications must zero this array.</entry>
203 </row> 203 </row>
204 </tbody> 204 </tbody>
205 </tgroup> 205 </tgroup>
diff --git a/Documentation/DocBook/media/v4l/vidioc-qbuf.xml b/Documentation/DocBook/media/v4l/vidioc-qbuf.xml
index 3504a7f2f382..8b98a0e421fc 100644
--- a/Documentation/DocBook/media/v4l/vidioc-qbuf.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-qbuf.xml
@@ -187,6 +187,16 @@ continue streaming.
187 </para> 187 </para>
188 </listitem> 188 </listitem>
189 </varlistentry> 189 </varlistentry>
190 <varlistentry>
191 <term><errorcode>EPIPE</errorcode></term>
192 <listitem>
193 <para><constant>VIDIOC_DQBUF</constant> returns this on an empty
194capture queue for mem2mem codecs if a buffer with the
195<constant>V4L2_BUF_FLAG_LAST</constant> was already dequeued and no new buffers
196are expected to become available.
197 </para>
198 </listitem>
199 </varlistentry>
190 </variablelist> 200 </variablelist>
191 </refsect1> 201 </refsect1>
192</refentry> 202</refentry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-query-dv-timings.xml b/Documentation/DocBook/media/v4l/vidioc-query-dv-timings.xml
index e185f149e0a1..e9c70a8f3476 100644
--- a/Documentation/DocBook/media/v4l/vidioc-query-dv-timings.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-query-dv-timings.xml
@@ -6,6 +6,7 @@
6 6
7 <refnamediv> 7 <refnamediv>
8 <refname>VIDIOC_QUERY_DV_TIMINGS</refname> 8 <refname>VIDIOC_QUERY_DV_TIMINGS</refname>
9 <refname>VIDIOC_SUBDEV_QUERY_DV_TIMINGS</refname>
9 <refpurpose>Sense the DV preset received by the current 10 <refpurpose>Sense the DV preset received by the current
10input</refpurpose> 11input</refpurpose>
11 </refnamediv> 12 </refnamediv>
@@ -34,7 +35,7 @@ input</refpurpose>
34 <varlistentry> 35 <varlistentry>
35 <term><parameter>request</parameter></term> 36 <term><parameter>request</parameter></term>
36 <listitem> 37 <listitem>
37 <para>VIDIOC_QUERY_DV_TIMINGS</para> 38 <para>VIDIOC_QUERY_DV_TIMINGS, VIDIOC_SUBDEV_QUERY_DV_TIMINGS</para>
38 </listitem> 39 </listitem>
39 </varlistentry> 40 </varlistentry>
40 <varlistentry> 41 <varlistentry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-querybuf.xml b/Documentation/DocBook/media/v4l/vidioc-querybuf.xml
index a597155c052d..50bfcb5e8508 100644
--- a/Documentation/DocBook/media/v4l/vidioc-querybuf.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-querybuf.xml
@@ -60,7 +60,8 @@ buffer at any time after buffers have been allocated with the
60 field. Valid index numbers range from zero 60 field. Valid index numbers range from zero
61to the number of buffers allocated with &VIDIOC-REQBUFS; 61to the number of buffers allocated with &VIDIOC-REQBUFS;
62 (&v4l2-requestbuffers; <structfield>count</structfield>) minus one. 62 (&v4l2-requestbuffers; <structfield>count</structfield>) minus one.
63The <structfield>reserved</structfield> field should to set to 0. 63The <structfield>reserved</structfield> and <structfield>reserved2 </structfield>
64fields must be set to 0.
64When using the <link linkend="planar-apis">multi-planar API</link>, the 65When using the <link linkend="planar-apis">multi-planar API</link>, the
65<structfield>m.planes</structfield> field must contain a userspace pointer to an 66<structfield>m.planes</structfield> field must contain a userspace pointer to an
66array of &v4l2-plane; and the <structfield>length</structfield> field has 67array of &v4l2-plane; and the <structfield>length</structfield> field has
diff --git a/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml b/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml
index 78a06a9a5ece..0f193fda0470 100644
--- a/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-reqbufs.xml
@@ -112,8 +112,8 @@ as the &v4l2-format; <structfield>type</structfield> field. See <xref
112 <row> 112 <row>
113 <entry>__u32</entry> 113 <entry>__u32</entry>
114 <entry><structfield>reserved</structfield>[2]</entry> 114 <entry><structfield>reserved</structfield>[2]</entry>
115 <entry>A place holder for future extensions. This array should 115 <entry>A place holder for future extensions. Drivers and applications
116be zeroed by applications.</entry> 116must set the array to zero.</entry>
117 </row> 117 </row>
118 </tbody> 118 </tbody>
119 </tgroup> 119 </tgroup>
diff --git a/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml b/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml
index d0332f610929..5fd0ee78f880 100644
--- a/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml
@@ -5,7 +5,8 @@
5 </refmeta> 5 </refmeta>
6 6
7 <refnamediv> 7 <refnamediv>
8 <refname>VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT</refname> 8 <refname>VIDIOC_SUBSCRIBE_EVENT</refname>
9 <refname>VIDIOC_UNSUBSCRIBE_EVENT</refname>
9 <refpurpose>Subscribe or unsubscribe event</refpurpose> 10 <refpurpose>Subscribe or unsubscribe event</refpurpose>
10 </refnamediv> 11 </refnamediv>
11 12
diff --git a/Documentation/DocBook/media_api.tmpl b/Documentation/DocBook/media_api.tmpl
index 03f9a1f8d413..f3f5fe5b64c9 100644
--- a/Documentation/DocBook/media_api.tmpl
+++ b/Documentation/DocBook/media_api.tmpl
@@ -1,12 +1,13 @@
1<?xml version="1.0"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 2<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ 3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4<!ENTITY % media-entities SYSTEM "./media-entities.tmpl"> %media-entities; 4<!ENTITY % media-entities SYSTEM "./media-entities.tmpl"> %media-entities;
5<!ENTITY media-indices SYSTEM "./media-indices.tmpl"> 5<!ENTITY media-indices SYSTEM "./media-indices.tmpl">
6 6
7<!ENTITY eg "e.&nbsp;g."> 7<!ENTITY eg "e.&nbsp;g.">
8<!ENTITY ie "i.&nbsp;e."> 8<!ENTITY ie "i.&nbsp;e.">
9<!ENTITY fd "File descriptor returned by <link linkend='func-open'><function>open()</function></link>."> 9<!ENTITY fd "File descriptor returned by <link linkend='func-open'><function>open()</function></link>.">
10<!ENTITY fe_fd "File descriptor returned by <link linkend='frontend_f_open'><function>open()</function></link>.">
10<!ENTITY i2c "I<superscript>2</superscript>C"> 11<!ENTITY i2c "I<superscript>2</superscript>C">
11<!ENTITY return-value "<title>Return Value</title><para>On success <returnvalue>0</returnvalue> is returned, on error <returnvalue>-1</returnvalue> and the <varname>errno</varname> variable is set appropriately. The generic error codes are described at the <link linkend='gen-errors'>Generic Error Codes</link> chapter.</para>"> 12<!ENTITY return-value "<title>Return Value</title><para>On success <returnvalue>0</returnvalue> is returned, on error <returnvalue>-1</returnvalue> and the <varname>errno</varname> variable is set appropriately. The generic error codes are described at the <link linkend='gen-errors'>Generic Error Codes</link> chapter.</para>">
12<!ENTITY return-value-dvb "<para>RETURN VALUE</para><para>On success <returnvalue>0</returnvalue> is returned, on error <returnvalue>-1</returnvalue> and the <varname>errno</varname> variable is set appropriately. The generic error codes are described at the <link linkend='gen-errors'>Generic Error Codes</link> chapter.</para>"> 13<!ENTITY return-value-dvb "<para>RETURN VALUE</para><para>On success <returnvalue>0</returnvalue> is returned, on error <returnvalue>-1</returnvalue> and the <varname>errno</varname> variable is set appropriately. The generic error codes are described at the <link linkend='gen-errors'>Generic Error Codes</link> chapter.</para>">
@@ -32,7 +33,7 @@
32<!ENTITY dash-ent-24 "<entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry>"> 33<!ENTITY dash-ent-24 "<entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry><entry>-</entry>">
33]> 34]>
34 35
35<book id="media_api"> 36<book id="media_api" lang="en">
36<bookinfo> 37<bookinfo>
37 <title>LINUX MEDIA INFRASTRUCTURE API</title> 38 <title>LINUX MEDIA INFRASTRUCTURE API</title>
38 39
@@ -60,28 +61,56 @@
60 analog and digital TV receiver cards, AM/FM receiver cards, 61 analog and digital TV receiver cards, AM/FM receiver cards,
61 streaming capture and output devices, codec devices and remote 62 streaming capture and output devices, codec devices and remote
62 controllers.</para> 63 controllers.</para>
63 <para>It is divided into four parts.</para> 64 <para>A typical media device hardware is shown at
65 <xref linkend="typical_media_device" />.</para>
66 <figure id="typical_media_device">
67 <title>Typical Media Device</title>
68 <mediaobject>
69 <imageobject>
70 <imagedata fileref="typical_media_device.svg" format="SVG" />
71 </imageobject>
72 <textobject>
73 <phrase>Typical Media Device Block Diagram</phrase>
74 </textobject>
75 </mediaobject>
76 </figure>
77 <para>The media infrastructure API was designed to control such
78 devices. It is divided into four parts.</para>
64 <para>The first part covers radio, video capture and output, 79 <para>The first part covers radio, video capture and output,
65 cameras, analog TV devices and codecs.</para> 80 cameras, analog TV devices and codecs.</para>
66 <para>The second part covers the 81 <para>The second part covers the
67 API used for digital TV and Internet reception via one of the 82 API used for digital TV and Internet reception via one of the
68 several digital tv standards. While it is called as DVB API, 83 several digital tv standards. While it is called as DVB API,
69 in fact it covers several different video standards including 84 in fact it covers several different video standards including
70 DVB-T, DVB-S, DVB-C and ATSC. The API is currently being updated 85 DVB-T/T2, DVB-S/S2, DVB-C, ATSC, ISDB-T, ISDB-S,etc. The complete
71 to document support also for DVB-S2, ISDB-T and ISDB-S.</para> 86 list of supported standards can be found at
87 <xref linkend="fe-delivery-system-t" />.</para>
72 <para>The third part covers the Remote Controller API.</para> 88 <para>The third part covers the Remote Controller API.</para>
73 <para>The fourth part covers the Media Controller API.</para> 89 <para>The fourth part covers the Media Controller API.</para>
90 <para>It should also be noted that a media device may also have audio
91 components, like mixers, PCM capture, PCM playback, etc, which
92 are controlled via ALSA API.</para>
74 <para>For additional information and for the latest development code, 93 <para>For additional information and for the latest development code,
75 see: <ulink url="http://linuxtv.org">http://linuxtv.org</ulink>.</para> 94 see: <ulink url="http://linuxtv.org">http://linuxtv.org</ulink>.</para>
76 <para>For discussing improvements, reporting troubles, sending new drivers, etc, please mail to: <ulink url="http://vger.kernel.org/vger-lists.html#linux-media">Linux Media Mailing List (LMML).</ulink>.</para> 95 <para>For discussing improvements, reporting troubles, sending new drivers, etc, please mail to: <ulink url="http://vger.kernel.org/vger-lists.html#linux-media">Linux Media Mailing List (LMML).</ulink>.</para>
77</preface> 96</preface>
78 97
79<part id="v4l2spec">&sub-v4l2;</part> 98<part id="v4l2spec">
80<part id="dvbapi">&sub-dvbapi;</part> 99&sub-v4l2;
81<part id="remotes">&sub-remote_controllers;</part> 100</part>
82<part id="media_common">&sub-media-controller;</part> 101<part id="dvbapi">
102&sub-dvbapi;
103</part>
104<part id="remotes">
105&sub-remote_controllers;
106</part>
107<part id="media_common">
108&sub-media-controller;
109</part>
83 110
84<chapter id="gen_errors">&sub-gen-errors;</chapter> 111<chapter id="gen_errors">
112&sub-gen-errors;
113</chapter>
85 114
86&sub-fdl-appendix; 115&sub-fdl-appendix;
87 116
diff --git a/Documentation/DocBook/scsi.tmpl b/Documentation/DocBook/scsi.tmpl
index 324b53494f08..4b9b9b286cea 100644
--- a/Documentation/DocBook/scsi.tmpl
+++ b/Documentation/DocBook/scsi.tmpl
@@ -81,7 +81,7 @@
81 SAS, Fibre Channel, FireWire, and ATAPI devices. SCSI packets are 81 SAS, Fibre Channel, FireWire, and ATAPI devices. SCSI packets are
82 also commonly exchanged over Infiniband, 82 also commonly exchanged over Infiniband,
83 <ulink url='http://i2o.shadowconnect.com/faq.php'>I20</ulink>, TCP/IP 83 <ulink url='http://i2o.shadowconnect.com/faq.php'>I20</ulink>, TCP/IP
84 (<ulink url='http://en.wikipedia.org/wiki/ISCSI'>iSCSI</ulink>), even 84 (<ulink url='https://en.wikipedia.org/wiki/ISCSI'>iSCSI</ulink>), even
85 <ulink url='http://cyberelk.net/tim/parport/parscsi.html'>Parallel 85 <ulink url='http://cyberelk.net/tim/parport/parscsi.html'>Parallel
86 ports</ulink>. 86 ports</ulink>.
87 </para> 87 </para>
diff --git a/Documentation/IPMI.txt b/Documentation/IPMI.txt
index 653d5d739d7f..31d1d658827f 100644
--- a/Documentation/IPMI.txt
+++ b/Documentation/IPMI.txt
@@ -505,7 +505,10 @@ at module load time (for a module) with:
505 505
506The addresses are normal I2C addresses. The adapter is the string 506The addresses are normal I2C addresses. The adapter is the string
507name of the adapter, as shown in /sys/class/i2c-adapter/i2c-<n>/name. 507name of the adapter, as shown in /sys/class/i2c-adapter/i2c-<n>/name.
508It is *NOT* i2c-<n> itself. 508It is *NOT* i2c-<n> itself. Also, the comparison is done ignoring
509spaces, so if the name is "This is an I2C chip" you can say
510adapter_name=ThisisanI2cchip. This is because it's hard to pass in
511spaces in kernel parameters.
509 512
510The debug flags are bit flags for each BMC found, they are: 513The debug flags are bit flags for each BMC found, they are:
511IPMI messages: 1, driver state: 2, timing: 4, I2C probe: 8 514IPMI messages: 1, driver state: 2, timing: 4, I2C probe: 8
diff --git a/Documentation/RCU/RTFP.txt b/Documentation/RCU/RTFP.txt
index f29bcbc463e7..370ca006db7a 100644
--- a/Documentation/RCU/RTFP.txt
+++ b/Documentation/RCU/RTFP.txt
@@ -1496,7 +1496,7 @@ Canis Rufus and Zoicon5 and Anome and Hal Eisen"
1496,month="July" 1496,month="July"
1497,day="8" 1497,day="8"
1498,year="2006" 1498,year="2006"
1499,note="\url{http://en.wikipedia.org/wiki/Read-copy-update}" 1499,note="\url{https://en.wikipedia.org/wiki/Read-copy-update}"
1500,annotation={ 1500,annotation={
1501 Wikipedia RCU page as of July 8 2006. 1501 Wikipedia RCU page as of July 8 2006.
1502 [Viewed August 21, 2006] 1502 [Viewed August 21, 2006]
diff --git a/Documentation/RCU/arrayRCU.txt b/Documentation/RCU/arrayRCU.txt
index 453ebe6953ee..f05a9afb2c39 100644
--- a/Documentation/RCU/arrayRCU.txt
+++ b/Documentation/RCU/arrayRCU.txt
@@ -10,7 +10,19 @@ also be used to protect arrays. Three situations are as follows:
10 10
113. Resizeable Arrays 113. Resizeable Arrays
12 12
13Each of these situations are discussed below. 13Each of these three situations involves an RCU-protected pointer to an
14array that is separately indexed. It might be tempting to consider use
15of RCU to instead protect the index into an array, however, this use
16case is -not- supported. The problem with RCU-protected indexes into
17arrays is that compilers can play way too many optimization games with
18integers, which means that the rules governing handling of these indexes
19are far more trouble than they are worth. If RCU-protected indexes into
20arrays prove to be particularly valuable (which they have not thus far),
21explicit cooperation from the compiler will be required to permit them
22to be safely used.
23
24That aside, each of the three RCU-protected pointer situations are
25described in the following sections.
14 26
15 27
16Situation 1: Hash Tables 28Situation 1: Hash Tables
@@ -36,9 +48,9 @@ Quick Quiz: Why is it so important that updates be rare when
36Situation 3: Resizeable Arrays 48Situation 3: Resizeable Arrays
37 49
38Use of RCU for resizeable arrays is demonstrated by the grow_ary() 50Use of RCU for resizeable arrays is demonstrated by the grow_ary()
39function used by the System V IPC code. The array is used to map from 51function formerly used by the System V IPC code. The array is used
40semaphore, message-queue, and shared-memory IDs to the data structure 52to map from semaphore, message-queue, and shared-memory IDs to the data
41that represents the corresponding IPC construct. The grow_ary() 53structure that represents the corresponding IPC construct. The grow_ary()
42function does not acquire any locks; instead its caller must hold the 54function does not acquire any locks; instead its caller must hold the
43ids->sem semaphore. 55ids->sem semaphore.
44 56
diff --git a/Documentation/RCU/lockdep.txt b/Documentation/RCU/lockdep.txt
index cd83d2348fef..da51d3068850 100644
--- a/Documentation/RCU/lockdep.txt
+++ b/Documentation/RCU/lockdep.txt
@@ -47,11 +47,6 @@ checking of rcu_dereference() primitives:
47 Use explicit check expression "c" along with 47 Use explicit check expression "c" along with
48 srcu_read_lock_held()(). This is useful in code that 48 srcu_read_lock_held()(). This is useful in code that
49 is invoked by both SRCU readers and updaters. 49 is invoked by both SRCU readers and updaters.
50 rcu_dereference_index_check(p, c):
51 Use explicit check expression "c", but the caller
52 must supply one of the rcu_read_lock_held() functions.
53 This is useful in code that uses RCU-protected arrays
54 that is invoked by both RCU readers and updaters.
55 rcu_dereference_raw(p): 50 rcu_dereference_raw(p):
56 Don't check. (Use sparingly, if at all.) 51 Don't check. (Use sparingly, if at all.)
57 rcu_dereference_protected(p, c): 52 rcu_dereference_protected(p, c):
@@ -64,11 +59,6 @@ checking of rcu_dereference() primitives:
64 but retain the compiler constraints that prevent duplicating 59 but retain the compiler constraints that prevent duplicating
65 or coalescsing. This is useful when when testing the 60 or coalescsing. This is useful when when testing the
66 value of the pointer itself, for example, against NULL. 61 value of the pointer itself, for example, against NULL.
67 rcu_access_index(idx):
68 Return the value of the index and omit all barriers, but
69 retain the compiler constraints that prevent duplicating
70 or coalescsing. This is useful when when testing the
71 value of the index itself, for example, against -1.
72 62
73The rcu_dereference_check() check expression can be any boolean 63The rcu_dereference_check() check expression can be any boolean
74expression, but would normally include a lockdep expression. However, 64expression, but would normally include a lockdep expression. However,
diff --git a/Documentation/RCU/rcu_dereference.txt b/Documentation/RCU/rcu_dereference.txt
index ceb05da5a5ac..1e6c0da994f5 100644
--- a/Documentation/RCU/rcu_dereference.txt
+++ b/Documentation/RCU/rcu_dereference.txt
@@ -25,17 +25,6 @@ o You must use one of the rcu_dereference() family of primitives
25 for an example where the compiler can in fact deduce the exact 25 for an example where the compiler can in fact deduce the exact
26 value of the pointer, and thus cause misordering. 26 value of the pointer, and thus cause misordering.
27 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 28o Avoid cancellation when using the "+" and "-" infix arithmetic
40 operators. For example, for a given variable "x", avoid 29 operators. For example, for a given variable "x", avoid
41 "(x-x)". There are similar arithmetic pitfalls from other 30 "(x-x)". There are similar arithmetic pitfalls from other
@@ -76,14 +65,15 @@ o Do not use the results from the boolean "&&" and "||" when
76 dereferencing. For example, the following (rather improbable) 65 dereferencing. For example, the following (rather improbable)
77 code is buggy: 66 code is buggy:
78 67
79 int a[2]; 68 int *p;
80 int index; 69 int *q;
81 int force_zero_index = 1;
82 70
83 ... 71 ...
84 72
85 r1 = rcu_dereference(i1) 73 p = rcu_dereference(gp)
86 r2 = a[r1 && force_zero_index]; /* BUGGY!!! */ 74 q = &global_q;
75 q += p != &oom_p1 && p != &oom_p2;
76 r1 = *q; /* BUGGY!!! */
87 77
88 The reason this is buggy is that "&&" and "||" are often compiled 78 The reason this is buggy is that "&&" and "||" are often compiled
89 using branches. While weak-memory machines such as ARM or PowerPC 79 using branches. While weak-memory machines such as ARM or PowerPC
@@ -94,14 +84,15 @@ o Do not use the results from relational operators ("==", "!=",
94 ">", ">=", "<", or "<=") when dereferencing. For example, 84 ">", ">=", "<", or "<=") when dereferencing. For example,
95 the following (quite strange) code is buggy: 85 the following (quite strange) code is buggy:
96 86
97 int a[2]; 87 int *p;
98 int index; 88 int *q;
99 int flip_index = 0;
100 89
101 ... 90 ...
102 91
103 r1 = rcu_dereference(i1) 92 p = rcu_dereference(gp)
104 r2 = a[r1 != flip_index]; /* BUGGY!!! */ 93 q = &global_q;
94 q += p > &oom_p;
95 r1 = *q; /* BUGGY!!! */
105 96
106 As before, the reason this is buggy is that relational operators 97 As before, the reason this is buggy is that relational operators
107 are often compiled using branches. And as before, although 98 are often compiled using branches. And as before, although
@@ -193,6 +184,11 @@ o Be very careful about comparing pointers obtained from
193 pointer. Note that the volatile cast in rcu_dereference() 184 pointer. Note that the volatile cast in rcu_dereference()
194 will normally prevent the compiler from knowing too much. 185 will normally prevent the compiler from knowing too much.
195 186
187 However, please note that if the compiler knows that the
188 pointer takes on only one of two values, a not-equal
189 comparison will provide exactly the information that the
190 compiler needs to deduce the value of the pointer.
191
196o Disable any value-speculation optimizations that your compiler 192o Disable any value-speculation optimizations that your compiler
197 might provide, especially if you are making use of feedback-based 193 might provide, especially if you are making use of feedback-based
198 optimizations that take data collected from prior runs. Such 194 optimizations that take data collected from prior runs. Such
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt
index 88dfce182f66..5746b0c77f3e 100644
--- a/Documentation/RCU/whatisRCU.txt
+++ b/Documentation/RCU/whatisRCU.txt
@@ -256,7 +256,9 @@ rcu_dereference()
256 If you are going to be fetching multiple fields from the 256 If you are going to be fetching multiple fields from the
257 RCU-protected structure, using the local variable is of 257 RCU-protected structure, using the local variable is of
258 course preferred. Repeated rcu_dereference() calls look 258 course preferred. Repeated rcu_dereference() calls look
259 ugly and incur unnecessary overhead on Alpha CPUs. 259 ugly, do not guarantee that the same pointer will be returned
260 if an update happened while in the critical section, and incur
261 unnecessary overhead on Alpha CPUs.
260 262
261 Note that the value returned by rcu_dereference() is valid 263 Note that the value returned by rcu_dereference() is valid
262 only within the enclosing RCU read-side critical section. 264 only within the enclosing RCU read-side critical section.
@@ -879,9 +881,7 @@ SRCU: Initialization/cleanup
879 881
880All: lockdep-checked RCU-protected pointer access 882All: lockdep-checked RCU-protected pointer access
881 883
882 rcu_access_index
883 rcu_access_pointer 884 rcu_access_pointer
884 rcu_dereference_index_check
885 rcu_dereference_raw 885 rcu_dereference_raw
886 rcu_lockdep_assert 886 rcu_lockdep_assert
887 rcu_sleep_check 887 rcu_sleep_check
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index b03a832a08e2..27e7e5edeca8 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -299,7 +299,9 @@ toward the stable maintainers by putting a line like this:
299 299
300 Cc: stable@vger.kernel.org 300 Cc: stable@vger.kernel.org
301 301
302into your patch. 302into the sign-off area of your patch (note, NOT an email recipient). You
303should also read Documentation/stable_kernel_rules.txt in addition to this
304file.
303 305
304Note, however, that some subsystem maintainers want to come to their own 306Note, however, that some subsystem maintainers want to come to their own
305conclusions on which patches should go to the stable trees. The networking 307conclusions on which patches should go to the stable trees. The networking
diff --git a/Documentation/acpi/enumeration.txt b/Documentation/acpi/enumeration.txt
index 750401f91341..b731b292e812 100644
--- a/Documentation/acpi/enumeration.txt
+++ b/Documentation/acpi/enumeration.txt
@@ -42,7 +42,7 @@ Adding ACPI support for an existing driver should be pretty
42straightforward. Here is the simplest example: 42straightforward. Here is the simplest example:
43 43
44 #ifdef CONFIG_ACPI 44 #ifdef CONFIG_ACPI
45 static struct acpi_device_id mydrv_acpi_match[] = { 45 static const struct acpi_device_id mydrv_acpi_match[] = {
46 /* ACPI IDs here */ 46 /* ACPI IDs here */
47 { } 47 { }
48 }; 48 };
@@ -166,7 +166,7 @@ the platform device drivers. Below is an example where we add ACPI support
166to at25 SPI eeprom driver (this is meant for the above ACPI snippet): 166to at25 SPI eeprom driver (this is meant for the above ACPI snippet):
167 167
168 #ifdef CONFIG_ACPI 168 #ifdef CONFIG_ACPI
169 static struct acpi_device_id at25_acpi_match[] = { 169 static const struct acpi_device_id at25_acpi_match[] = {
170 { "AT25", 0 }, 170 { "AT25", 0 },
171 { }, 171 { },
172 }; 172 };
@@ -230,7 +230,7 @@ Below is an example of how to add ACPI support to the existing mpu3050
230input driver: 230input driver:
231 231
232 #ifdef CONFIG_ACPI 232 #ifdef CONFIG_ACPI
233 static struct acpi_device_id mpu3050_acpi_match[] = { 233 static const struct acpi_device_id mpu3050_acpi_match[] = {
234 { "MPU3050", 0 }, 234 { "MPU3050", 0 },
235 { }, 235 { },
236 }; 236 };
@@ -253,7 +253,7 @@ input driver:
253GPIO support 253GPIO support
254~~~~~~~~~~~~ 254~~~~~~~~~~~~
255ACPI 5 introduced two new resources to describe GPIO connections: GpioIo 255ACPI 5 introduced two new resources to describe GPIO connections: GpioIo
256and GpioInt. These resources are used be used to pass GPIO numbers used by 256and GpioInt. These resources can be used to pass GPIO numbers used by
257the device to the driver. ACPI 5.1 extended this with _DSD (Device 257the device to the driver. ACPI 5.1 extended this with _DSD (Device
258Specific Data) which made it possible to name the GPIOs among other things. 258Specific Data) which made it possible to name the GPIOs among other things.
259 259
@@ -359,3 +359,54 @@ the id should be set like:
359The ACPI id "XYZ0001" is then used to lookup an ACPI device directly under 359The ACPI id "XYZ0001" is then used to lookup an ACPI device directly under
360the MFD device and if found, that ACPI companion device is bound to the 360the MFD device and if found, that ACPI companion device is bound to the
361resulting child platform device. 361resulting child platform device.
362
363Device Tree namespace link device ID
364~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
365The Device Tree protocol uses device indentification based on the "compatible"
366property whose value is a string or an array of strings recognized as device
367identifiers by drivers and the driver core. The set of all those strings may be
368regarded as a device indentification namespace analogous to the ACPI/PNP device
369ID namespace. Consequently, in principle it should not be necessary to allocate
370a new (and arguably redundant) ACPI/PNP device ID for a devices with an existing
371identification string in the Device Tree (DT) namespace, especially if that ID
372is only needed to indicate that a given device is compatible with another one,
373presumably having a matching driver in the kernel already.
374
375In ACPI, the device identification object called _CID (Compatible ID) is used to
376list the IDs of devices the given one is compatible with, but those IDs must
377belong to one of the namespaces prescribed by the ACPI specification (see
378Section 6.1.2 of ACPI 6.0 for details) and the DT namespace is not one of them.
379Moreover, the specification mandates that either a _HID or an _ADR identificaion
380object be present for all ACPI objects representing devices (Section 6.1 of ACPI
3816.0). For non-enumerable bus types that object must be _HID and its value must
382be a device ID from one of the namespaces prescribed by the specification too.
383
384The special DT namespace link device ID, PRP0001, provides a means to use the
385existing DT-compatible device identification in ACPI and to satisfy the above
386requirements following from the ACPI specification at the same time. Namely,
387if PRP0001 is returned by _HID, the ACPI subsystem will look for the
388"compatible" property in the device object's _DSD and will use the value of that
389property to identify the corresponding device in analogy with the original DT
390device identification algorithm. If the "compatible" property is not present
391or its value is not valid, the device will not be enumerated by the ACPI
392subsystem. Otherwise, it will be enumerated automatically as a platform device
393(except when an I2C or SPI link from the device to its parent is present, in
394which case the ACPI core will leave the device enumeration to the parent's
395driver) and the identification strings from the "compatible" property value will
396be used to find a driver for the device along with the device IDs listed by _CID
397(if present).
398
399Analogously, if PRP0001 is present in the list of device IDs returned by _CID,
400the identification strings listed by the "compatible" property value (if present
401and valid) will be used to look for a driver matching the device, but in that
402case their relative priority with respect to the other device IDs listed by
403_HID and _CID depends on the position of PRP0001 in the _CID return package.
404Specifically, the device IDs returned by _HID and preceding PRP0001 in the _CID
405return package will be checked first. Also in that case the bus type the device
406will be enumerated to depends on the device ID returned by _HID.
407
408It is valid to define device objects with a _HID returning PRP0001 and without
409the "compatible" property in the _DSD or a _CID as long as one of their
410ancestors provides a _DSD with a valid "compatible" property. Such device
411objects are then simply regarded as additional "blocks" providing hierarchical
412configuration information to the driver of the composite ancestor device.
diff --git a/Documentation/acpi/gpio-properties.txt b/Documentation/acpi/gpio-properties.txt
index ae36fcf86dc7..f35dad11f0de 100644
--- a/Documentation/acpi/gpio-properties.txt
+++ b/Documentation/acpi/gpio-properties.txt
@@ -1,9 +1,9 @@
1_DSD Device Properties Related to GPIO 1_DSD Device Properties Related to GPIO
2-------------------------------------- 2--------------------------------------
3 3
4With the release of ACPI 5.1 and the _DSD configuration objecte names 4With the release of ACPI 5.1, the _DSD configuration object finally
5can finally be given to GPIOs (and other things as well) returned by 5allows names to be given to GPIOs (and other things as well) returned
6_CRS. Previously, we were only able to use an integer index to find 6by _CRS. Previously, we were only able to use an integer index to find
7the corresponding GPIO, which is pretty error prone (it depends on 7the corresponding GPIO, which is pretty error prone (it depends on
8the _CRS output ordering, for example). 8the _CRS output ordering, for example).
9 9
diff --git a/Documentation/arm/CCN.txt b/Documentation/arm/CCN.txt
index 0632b3aad83e..ffca443a19b4 100644
--- a/Documentation/arm/CCN.txt
+++ b/Documentation/arm/CCN.txt
@@ -33,20 +33,23 @@ directory, with first 8 configurable by user and additional
33Cycle counter is described by a "type" value 0xff and does 33Cycle counter is described by a "type" value 0xff and does
34not require any other settings. 34not require any other settings.
35 35
36The driver also provides a "cpumask" sysfs attribute, which contains
37a single CPU ID, of the processor which will be used to handle all
38the CCN PMU events. It is recommended that the user space tools
39request the events on this processor (if not, the perf_event->cpu value
40will be overwritten anyway). In case of this processor being offlined,
41the events are migrated to another one and the attribute is updated.
42
36Example of perf tool use: 43Example of perf tool use:
37 44
38/ # perf list | grep ccn 45/ # perf list | grep ccn
39 ccn/cycles/ [Kernel PMU event] 46 ccn/cycles/ [Kernel PMU event]
40<...> 47<...>
41 ccn/xp_valid_flit/ [Kernel PMU event] 48 ccn/xp_valid_flit,xp=?,port=?,vc=?,dir=?/ [Kernel PMU event]
42<...> 49<...>
43 50
44/ # perf stat -C 0 -e ccn/cycles/,ccn/xp_valid_flit,xp=1,port=0,vc=1,dir=1/ \ 51/ # perf stat -a -e ccn/cycles/,ccn/xp_valid_flit,xp=1,port=0,vc=1,dir=1/ \
45 sleep 1 52 sleep 1
46 53
47The driver does not support sampling, therefore "perf record" will 54The driver does not support sampling, therefore "perf record" will
48not work. Also notice that only single cpu is being selected 55not work. Per-task (without "-a") perf sessions are not supported.
49("-C 0") - this is because perf framework does not support
50"non-CPU related" counters (yet?) so system-wide session ("-a")
51would try (and in most cases fail) to set up the same event
52per each CPU.
diff --git a/Documentation/arm/Samsung/Bootloader-interface.txt b/Documentation/arm/Samsung/Bootloader-interface.txt
new file mode 100644
index 000000000000..b96ead9a6919
--- /dev/null
+++ b/Documentation/arm/Samsung/Bootloader-interface.txt
@@ -0,0 +1,53 @@
1 Interface between kernel and boot loaders on Exynos boards
2 ==========================================================
3
4Author: Krzysztof Kozlowski
5Date : 6 June 2015
6
7The document tries to describe currently used interface between Linux kernel
8and boot loaders on Samsung Exynos based boards. This is not a definition
9of interface but rather a description of existing state, a reference
10for information purpose only.
11
12In the document "boot loader" means any of following: U-boot, proprietary
13SBOOT or any other firmware for ARMv7 and ARMv8 initializing the board before
14executing kernel.
15
16
171. Non-Secure mode
18Address: sysram_ns_base_addr
19Offset Value Purpose
20=============================================================================
210x08 exynos_cpu_resume_ns System suspend
220x0c 0x00000bad (Magic cookie) System suspend
230x1c exynos4_secondary_startup Secondary CPU boot
240x1c + 4*cpu exynos4_secondary_startup (Exynos4412) Secondary CPU boot
250x20 0xfcba0d10 (Magic cookie) AFTR
260x24 exynos_cpu_resume_ns AFTR
270x28 + 4*cpu 0x8 (Magic cookie, Exynos3250) AFTR
28
29
302. Secure mode
31Address: sysram_base_addr
32Offset Value Purpose
33=============================================================================
340x00 exynos4_secondary_startup Secondary CPU boot
350x04 exynos4_secondary_startup (Exynos542x) Secondary CPU boot
364*cpu exynos4_secondary_startup (Exynos4412) Secondary CPU boot
370x20 exynos_cpu_resume (Exynos4210 r1.0) AFTR
380x24 0xfcba0d10 (Magic cookie, Exynos4210 r1.0) AFTR
39
40Address: pmu_base_addr
41Offset Value Purpose
42=============================================================================
430x0800 exynos_cpu_resume AFTR
440x0814 exynos4_secondary_startup (Exynos4210 r1.1) Secondary CPU boot
450x0818 0xfcba0d10 (Magic cookie, Exynos4210 r1.1) AFTR
460x081C exynos_cpu_resume (Exynos4210 r1.1) AFTR
47
48
493. Other (regardless of secure/non-secure mode)
50Address: pmu_base_addr
51Offset Value Purpose
52=============================================================================
530x0908 Non-zero (only Exynos3250) Secondary CPU boot up indicator
diff --git a/Documentation/arm/stm32/overview.txt b/Documentation/arm/stm32/overview.txt
new file mode 100644
index 000000000000..09aed5588d7c
--- /dev/null
+++ b/Documentation/arm/stm32/overview.txt
@@ -0,0 +1,32 @@
1 STM32 ARM Linux Overview
2 ========================
3
4Introduction
5------------
6
7 The STMicroelectronics family of Cortex-M based MCUs are supported by the
8 'STM32' platform of ARM Linux. Currently only the STM32F429 is supported.
9
10
11Configuration
12-------------
13
14 A generic configuration is provided for STM32 family, and can be used as the
15 default by
16 make stm32_defconfig
17
18Layout
19------
20
21 All the files for multiple machine families are located in the platform code
22 contained in arch/arm/mach-stm32
23
24 There is a generic board board-dt.c in the mach folder which support
25 Flattened Device Tree, which means, it works with any compatible board with
26 Device Trees.
27
28
29Document Author
30---------------
31
32 Maxime Coquelin <mcoquelin.stm32@gmail.com>
diff --git a/Documentation/arm/stm32/stm32f429-overview.txt b/Documentation/arm/stm32/stm32f429-overview.txt
new file mode 100644
index 000000000000..5206822bd8ef
--- /dev/null
+++ b/Documentation/arm/stm32/stm32f429-overview.txt
@@ -0,0 +1,22 @@
1 STM32F429 Overview
2 ==================
3
4 Introduction
5 ------------
6 The STM32F429 is a Cortex-M4 MCU aimed at various applications.
7 It features:
8 - ARM Cortex-M4 up to 180MHz with FPU
9 - 2MB internal Flash Memory
10 - External memory support through FMC controller (PSRAM, SDRAM, NOR, NAND)
11 - I2C, SPI, SAI, CAN, USB OTG, Ethernet controllers
12 - LCD controller & Camera interface
13 - Cryptographic processor
14
15 Resources
16 ---------
17 Datasheet and reference manual are publicly available on ST website:
18 - http://www.st.com/web/en/catalog/mmc/FM141/SC1169/SS1577/LN1806?ecmp=stm32f429-439_pron_pr-ces2014_nov2013
19
20 Document Author
21 ---------------
22 Maxime Coquelin <mcoquelin.stm32@gmail.com>
diff --git a/Documentation/arm/vlocks.txt b/Documentation/arm/vlocks.txt
index 415960a9bab0..45731672c564 100644
--- a/Documentation/arm/vlocks.txt
+++ b/Documentation/arm/vlocks.txt
@@ -206,6 +206,6 @@ References
206[1] Lamport, L. "A New Solution of Dijkstra's Concurrent Programming 206[1] Lamport, L. "A New Solution of Dijkstra's Concurrent Programming
207 Problem", Communications of the ACM 17, 8 (August 1974), 453-455. 207 Problem", Communications of the ACM 17, 8 (August 1974), 453-455.
208 208
209 http://en.wikipedia.org/wiki/Lamport%27s_bakery_algorithm 209 https://en.wikipedia.org/wiki/Lamport%27s_bakery_algorithm
210 210
211[2] linux/arch/arm/common/vlock.S, www.kernel.org. 211[2] linux/arch/arm/common/vlock.S, www.kernel.org.
diff --git a/Documentation/arm64/booting.txt b/Documentation/arm64/booting.txt
index f3c05b5f9f08..1690350f16e7 100644
--- a/Documentation/arm64/booting.txt
+++ b/Documentation/arm64/booting.txt
@@ -45,11 +45,13 @@ sees fit.)
45 45
46Requirement: MANDATORY 46Requirement: MANDATORY
47 47
48The device tree blob (dtb) must be placed on an 8-byte boundary within 48The device tree blob (dtb) must be placed on an 8-byte boundary and must
49the first 512 megabytes from the start of the kernel image and must not 49not exceed 2 megabytes in size. Since the dtb will be mapped cacheable
50cross a 2-megabyte boundary. This is to allow the kernel to map the 50using blocks of up to 2 megabytes in size, it must not be placed within
51blob using a single section mapping in the initial page tables. 51any 2M region which must be mapped with any specific attributes.
52 52
53NOTE: versions prior to v4.2 also require that the DTB be placed within
54the 512 MB region starting at text_offset bytes below the kernel Image.
53 55
543. Decompress the kernel image 563. Decompress the kernel image
55------------------------------ 57------------------------------
diff --git a/Documentation/blackfin/gptimers-example.c b/Documentation/blackfin/gptimers-example.c
index b1bd6340e748..283eba993d9d 100644
--- a/Documentation/blackfin/gptimers-example.c
+++ b/Documentation/blackfin/gptimers-example.c
@@ -17,6 +17,12 @@
17 17
18#define DRIVER_NAME "gptimer_example" 18#define DRIVER_NAME "gptimer_example"
19 19
20#ifdef IRQ_TIMER5
21#define SAMPLE_IRQ_TIMER IRQ_TIMER5
22#else
23#define SAMPLE_IRQ_TIMER IRQ_TIMER2
24#endif
25
20struct gptimer_data { 26struct gptimer_data {
21 uint32_t period, width; 27 uint32_t period, width;
22}; 28};
@@ -57,7 +63,8 @@ static int __init gptimer_example_init(void)
57 } 63 }
58 64
59 /* grab the IRQ for the timer */ 65 /* grab the IRQ for the timer */
60 ret = request_irq(IRQ_TIMER5, gptimer_example_irq, IRQF_SHARED, DRIVER_NAME, &data); 66 ret = request_irq(SAMPLE_IRQ_TIMER, gptimer_example_irq,
67 IRQF_SHARED, DRIVER_NAME, &data);
61 if (ret) { 68 if (ret) {
62 printk(KERN_NOTICE DRIVER_NAME ": IRQ request failed\n"); 69 printk(KERN_NOTICE DRIVER_NAME ": IRQ request failed\n");
63 peripheral_free(P_TMR5); 70 peripheral_free(P_TMR5);
@@ -65,7 +72,8 @@ static int __init gptimer_example_init(void)
65 } 72 }
66 73
67 /* setup the timer and enable it */ 74 /* setup the timer and enable it */
68 set_gptimer_config(TIMER5_id, WDTH_CAP | PULSE_HI | PERIOD_CNT | IRQ_ENA); 75 set_gptimer_config(TIMER5_id,
76 WDTH_CAP | PULSE_HI | PERIOD_CNT | IRQ_ENA);
69 enable_gptimers(TIMER5bit); 77 enable_gptimers(TIMER5bit);
70 78
71 return 0; 79 return 0;
@@ -75,7 +83,7 @@ module_init(gptimer_example_init);
75static void __exit gptimer_example_exit(void) 83static void __exit gptimer_example_exit(void)
76{ 84{
77 disable_gptimers(TIMER5bit); 85 disable_gptimers(TIMER5bit);
78 free_irq(IRQ_TIMER5, &data); 86 free_irq(SAMPLE_IRQ_TIMER, &data);
79 peripheral_free(P_TMR5); 87 peripheral_free(P_TMR5);
80} 88}
81module_exit(gptimer_example_exit); 89module_exit(gptimer_example_exit);
diff --git a/Documentation/blockdev/zram.txt b/Documentation/blockdev/zram.txt
index 48a183e29988..c4de576093af 100644
--- a/Documentation/blockdev/zram.txt
+++ b/Documentation/blockdev/zram.txt
@@ -19,7 +19,9 @@ Following shows a typical sequence of steps for using zram.
191) Load Module: 191) Load Module:
20 modprobe zram num_devices=4 20 modprobe zram num_devices=4
21 This creates 4 devices: /dev/zram{0,1,2,3} 21 This creates 4 devices: /dev/zram{0,1,2,3}
22 (num_devices parameter is optional. Default: 1) 22
23num_devices parameter is optional and tells zram how many devices should be
24pre-created. Default: 1.
23 25
242) Set max number of compression streams 262) Set max number of compression streams
25 Compression backend may use up to max_comp_streams compression streams, 27 Compression backend may use up to max_comp_streams compression streams,
@@ -97,7 +99,24 @@ size of the disk when not in use so a huge zram is wasteful.
97 mkfs.ext4 /dev/zram1 99 mkfs.ext4 /dev/zram1
98 mount /dev/zram1 /tmp 100 mount /dev/zram1 /tmp
99 101
1007) Stats: 1027) Add/remove zram devices
103
104zram provides a control interface, which enables dynamic (on-demand) device
105addition and removal.
106
107In order to add a new /dev/zramX device, perform read operation on hot_add
108attribute. This will return either new device's device id (meaning that you
109can use /dev/zram<id>) or error code.
110
111Example:
112 cat /sys/class/zram-control/hot_add
113 1
114
115To remove the existing /dev/zramX device (where X is a device id)
116execute
117 echo X > /sys/class/zram-control/hot_remove
118
1198) Stats:
101Per-device statistics are exported as various nodes under /sys/block/zram<id>/ 120Per-device statistics are exported as various nodes under /sys/block/zram<id>/
102 121
103A brief description of exported device attritbutes. For more details please 122A brief description of exported device attritbutes. For more details please
@@ -126,7 +145,7 @@ mem_used_max RW the maximum amount memory zram have consumed to
126mem_limit RW the maximum amount of memory ZRAM can use to store 145mem_limit RW the maximum amount of memory ZRAM can use to store
127 the compressed data 146 the compressed data
128num_migrated RO the number of objects migrated migrated by compaction 147num_migrated RO the number of objects migrated migrated by compaction
129 148compact WO trigger memory compaction
130 149
131WARNING 150WARNING
132======= 151=======
@@ -172,11 +191,11 @@ line of text and contains the following stats separated by whitespace:
172 zero_pages 191 zero_pages
173 num_migrated 192 num_migrated
174 193
1758) Deactivate: 1949) Deactivate:
176 swapoff /dev/zram0 195 swapoff /dev/zram0
177 umount /dev/zram1 196 umount /dev/zram1
178 197
1799) Reset: 19810) Reset:
180 Write any positive value to 'reset' sysfs node 199 Write any positive value to 'reset' sysfs node
181 echo 1 > /sys/block/zram0/reset 200 echo 1 > /sys/block/zram0/reset
182 echo 1 > /sys/block/zram1/reset 201 echo 1 > /sys/block/zram1/reset
diff --git a/Documentation/cgroups/blkio-controller.txt b/Documentation/cgroups/blkio-controller.txt
index cd556b914786..68b6a6a470b0 100644
--- a/Documentation/cgroups/blkio-controller.txt
+++ b/Documentation/cgroups/blkio-controller.txt
@@ -387,8 +387,81 @@ groups and put applications in that group which are not driving enough
387IO to keep disk busy. In that case set group_idle=0, and CFQ will not idle 387IO to keep disk busy. In that case set group_idle=0, and CFQ will not idle
388on individual groups and throughput should improve. 388on individual groups and throughput should improve.
389 389
390What works 390Writeback
391========== 391=========
392- Currently only sync IO queues are support. All the buffered writes are 392
393 still system wide and not per group. Hence we will not see service 393Page cache is dirtied through buffered writes and shared mmaps and
394 differentiation between buffered writes between groups. 394written asynchronously to the backing filesystem by the writeback
395mechanism. Writeback sits between the memory and IO domains and
396regulates the proportion of dirty memory by balancing dirtying and
397write IOs.
398
399On traditional cgroup hierarchies, relationships between different
400controllers cannot be established making it impossible for writeback
401to operate accounting for cgroup resource restrictions and all
402writeback IOs are attributed to the root cgroup.
403
404If both the blkio and memory controllers are used on the v2 hierarchy
405and the filesystem supports cgroup writeback, writeback operations
406correctly follow the resource restrictions imposed by both memory and
407blkio controllers.
408
409Writeback examines both system-wide and per-cgroup dirty memory status
410and enforces the more restrictive of the two. Also, writeback control
411parameters which are absolute values - vm.dirty_bytes and
412vm.dirty_background_bytes - are distributed across cgroups according
413to their current writeback bandwidth.
414
415There's a peculiarity stemming from the discrepancy in ownership
416granularity between memory controller and writeback. While memory
417controller tracks ownership per page, writeback operates on inode
418basis. cgroup writeback bridges the gap by tracking ownership by
419inode but migrating ownership if too many foreign pages, pages which
420don't match the current inode ownership, have been encountered while
421writing back the inode.
422
423This is a conscious design choice as writeback operations are
424inherently tied to inodes making strictly following page ownership
425complicated and inefficient. The only use case which suffers from
426this compromise is multiple cgroups concurrently dirtying disjoint
427regions of the same inode, which is an unlikely use case and decided
428to be unsupported. Note that as memory controller assigns page
429ownership on the first use and doesn't update it until the page is
430released, even if cgroup writeback strictly follows page ownership,
431multiple cgroups dirtying overlapping areas wouldn't work as expected.
432In general, write-sharing an inode across multiple cgroups is not well
433supported.
434
435Filesystem support for cgroup writeback
436---------------------------------------
437
438A filesystem can make writeback IOs cgroup-aware by updating
439address_space_operations->writepage[s]() to annotate bio's using the
440following two functions.
441
442* wbc_init_bio(@wbc, @bio)
443
444 Should be called for each bio carrying writeback data and associates
445 the bio with the inode's owner cgroup. Can be called anytime
446 between bio allocation and submission.
447
448* wbc_account_io(@wbc, @page, @bytes)
449
450 Should be called for each data segment being written out. While
451 this function doesn't care exactly when it's called during the
452 writeback session, it's the easiest and most natural to call it as
453 data segments are added to a bio.
454
455With writeback bio's annotated, cgroup support can be enabled per
456super_block by setting MS_CGROUPWB in ->s_flags. This allows for
457selective disabling of cgroup writeback support which is helpful when
458certain filesystem features, e.g. journaled data mode, are
459incompatible.
460
461wbc_init_bio() binds the specified bio to its cgroup. Depending on
462the configuration, the bio may be executed at a lower priority and if
463the writeback session is holding shared resources, e.g. a journal
464entry, may lead to priority inversion. There is no one easy solution
465for the problem. Filesystems can try to work around specific problem
466cases by skipping wbc_init_bio() or using bio_associate_blkcg()
467directly.
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index f456b4315e86..ff71e16cc752 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -493,6 +493,7 @@ pgpgin - # of charging events to the memory cgroup. The charging
493pgpgout - # of uncharging events to the memory cgroup. The uncharging 493pgpgout - # of uncharging events to the memory cgroup. The uncharging
494 event happens each time a page is unaccounted from the cgroup. 494 event happens each time a page is unaccounted from the cgroup.
495swap - # of bytes of swap usage 495swap - # of bytes of swap usage
496dirty - # of bytes that are waiting to get written back to the disk.
496writeback - # of bytes of file/anon cache that are queued for syncing to 497writeback - # of bytes of file/anon cache that are queued for syncing to
497 disk. 498 disk.
498inactive_anon - # of bytes of anonymous and swap cache memory on inactive 499inactive_anon - # of bytes of anonymous and swap cache memory on inactive
diff --git a/Documentation/cgroups/unified-hierarchy.txt b/Documentation/cgroups/unified-hierarchy.txt
index eb102fb72213..86847a7647ab 100644
--- a/Documentation/cgroups/unified-hierarchy.txt
+++ b/Documentation/cgroups/unified-hierarchy.txt
@@ -17,15 +17,18 @@ CONTENTS
173. Structural Constraints 173. Structural Constraints
18 3-1. Top-down 18 3-1. Top-down
19 3-2. No internal tasks 19 3-2. No internal tasks
204. Other Changes 204. Delegation
21 4-1. [Un]populated Notification 21 4-1. Model of delegation
22 4-2. Other Core Changes 22 4-2. Common ancestor rule
23 4-3. Per-Controller Changes 235. Other Changes
24 4-3-1. blkio 24 5-1. [Un]populated Notification
25 4-3-2. cpuset 25 5-2. Other Core Changes
26 4-3-3. memory 26 5-3. Per-Controller Changes
275. Planned Changes 27 5-3-1. blkio
28 5-1. CAP for resource control 28 5-3-2. cpuset
29 5-3-3. memory
306. Planned Changes
31 6-1. CAP for resource control
29 32
30 33
311. Background 341. Background
@@ -245,9 +248,72 @@ cgroup must create children and transfer all its tasks to the children
245before enabling controllers in its "cgroup.subtree_control" file. 248before enabling controllers in its "cgroup.subtree_control" file.
246 249
247 250
2484. Other Changes 2514. Delegation
249 252
2504-1. [Un]populated Notification 2534-1. Model of delegation
254
255A cgroup can be delegated to a less privileged user by granting write
256access of the directory and its "cgroup.procs" file to the user. Note
257that the resource control knobs in a given directory concern the
258resources of the parent and thus must not be delegated along with the
259directory.
260
261Once delegated, the user can build sub-hierarchy under the directory,
262organize processes as it sees fit and further distribute the resources
263it got from the parent. The limits and other settings of all resource
264controllers are hierarchical and regardless of what happens in the
265delegated sub-hierarchy, nothing can escape the resource restrictions
266imposed by the parent.
267
268Currently, cgroup doesn't impose any restrictions on the number of
269cgroups in or nesting depth of a delegated sub-hierarchy; however,
270this may in the future be limited explicitly.
271
272
2734-2. Common ancestor rule
274
275On the unified hierarchy, to write to a "cgroup.procs" file, in
276addition to the usual write permission to the file and uid match, the
277writer must also have write access to the "cgroup.procs" file of the
278common ancestor of the source and destination cgroups. This prevents
279delegatees from smuggling processes across disjoint sub-hierarchies.
280
281Let's say cgroups C0 and C1 have been delegated to user U0 who created
282C00, C01 under C0 and C10 under C1 as follows.
283
284 ~~~~~~~~~~~~~ - C0 - C00
285 ~ cgroup ~ \ C01
286 ~ hierarchy ~
287 ~~~~~~~~~~~~~ - C1 - C10
288
289C0 and C1 are separate entities in terms of resource distribution
290regardless of their relative positions in the hierarchy. The
291resources the processes under C0 are entitled to are controlled by
292C0's ancestors and may be completely different from C1. It's clear
293that the intention of delegating C0 to U0 is allowing U0 to organize
294the processes under C0 and further control the distribution of C0's
295resources.
296
297On traditional hierarchies, if a task has write access to "tasks" or
298"cgroup.procs" file of a cgroup and its uid agrees with the target, it
299can move the target to the cgroup. In the above example, U0 will not
300only be able to move processes in each sub-hierarchy but also across
301the two sub-hierarchies, effectively allowing it to violate the
302organizational and resource restrictions implied by the hierarchical
303structure above C0 and C1.
304
305On the unified hierarchy, let's say U0 wants to write the pid of a
306process which has a matching uid and is currently in C10 into
307"C00/cgroup.procs". U0 obviously has write access to the file and
308migration permission on the process; however, the common ancestor of
309the source cgroup C10 and the destination cgroup C00 is above the
310points of delegation and U0 would not have write access to its
311"cgroup.procs" and thus be denied with -EACCES.
312
313
3145. Other Changes
315
3165-1. [Un]populated Notification
251 317
252cgroup users often need a way to determine when a cgroup's 318cgroup users often need a way to determine when a cgroup's
253subhierarchy becomes empty so that it can be cleaned up. cgroup 319subhierarchy becomes empty so that it can be cleaned up. cgroup
@@ -289,7 +355,7 @@ supported and the interface files "release_agent" and
289"notify_on_release" do not exist. 355"notify_on_release" do not exist.
290 356
291 357
2924-2. Other Core Changes 3585-2. Other Core Changes
293 359
294- None of the mount options is allowed. 360- None of the mount options is allowed.
295 361
@@ -306,14 +372,14 @@ supported and the interface files "release_agent" and
306- The "cgroup.clone_children" file is removed. 372- The "cgroup.clone_children" file is removed.
307 373
308 374
3094-3. Per-Controller Changes 3755-3. Per-Controller Changes
310 376
3114-3-1. blkio 3775-3-1. blkio
312 378
313- blk-throttle becomes properly hierarchical. 379- blk-throttle becomes properly hierarchical.
314 380
315 381
3164-3-2. cpuset 3825-3-2. cpuset
317 383
318- Tasks are kept in empty cpusets after hotplug and take on the masks 384- Tasks are kept in empty cpusets after hotplug and take on the masks
319 of the nearest non-empty ancestor, instead of being moved to it. 385 of the nearest non-empty ancestor, instead of being moved to it.
@@ -322,7 +388,7 @@ supported and the interface files "release_agent" and
322 masks of the nearest non-empty ancestor. 388 masks of the nearest non-empty ancestor.
323 389
324 390
3254-3-3. memory 3915-3-3. memory
326 392
327- use_hierarchy is on by default and the cgroup file for the flag is 393- use_hierarchy is on by default and the cgroup file for the flag is
328 not created. 394 not created.
@@ -407,9 +473,9 @@ supported and the interface files "release_agent" and
407 memory.low, memory.high, and memory.max will use the string "max" to 473 memory.low, memory.high, and memory.max will use the string "max" to
408 indicate and set the highest possible value. 474 indicate and set the highest possible value.
409 475
4105. Planned Changes 4766. Planned Changes
411 477
4125-1. CAP for resource control 4786-1. CAP for resource control
413 479
414Unified hierarchy will require one of the capabilities(7), which is 480Unified hierarchy will require one of the capabilities(7), which is
415yet to be decided, for all resource control related knobs. Process 481yet to be decided, for all resource control related knobs. Process
diff --git a/Documentation/clk.txt b/Documentation/clk.txt
index 0e4f90aa1c13..f463bdc37f88 100644
--- a/Documentation/clk.txt
+++ b/Documentation/clk.txt
@@ -230,30 +230,7 @@ clk_register(...)
230 230
231See the basic clock types in drivers/clk/clk-*.c for examples. 231See the basic clock types in drivers/clk/clk-*.c for examples.
232 232
233 Part 5 - static initialization of clock data 233 Part 5 - Disabling clock gating of unused clocks
234
235For platforms with many clocks (often numbering into the hundreds) it
236may be desirable to statically initialize some clock data. This
237presents a problem since the definition of struct clk should be hidden
238from everyone except for the clock core in drivers/clk/clk.c.
239
240To get around this problem struct clk's definition is exposed in
241include/linux/clk-private.h along with some macros for more easily
242initializing instances of the basic clock types. These clocks must
243still be initialized with the common clock framework via a call to
244__clk_init.
245
246clk-private.h must NEVER be included by code which implements struct
247clk_ops callbacks, nor must it be included by any logic which pokes
248around inside of struct clk at run-time. To do so is a layering
249violation.
250
251To better enforce this policy, always follow this simple rule: any
252statically initialized clock data MUST be defined in a separate file
253from the logic that implements its ops. Basically separate the logic
254from the data and all is well.
255
256 Part 6 - Disabling clock gating of unused clocks
257 234
258Sometimes during development it can be useful to be able to bypass the 235Sometimes during development it can be useful to be able to bypass the
259default disabling of unused clocks. For example, if drivers aren't enabling 236default disabling of unused clocks. For example, if drivers aren't enabling
@@ -264,7 +241,7 @@ are sorted out.
264To bypass this disabling, include "clk_ignore_unused" in the bootargs to the 241To bypass this disabling, include "clk_ignore_unused" in the bootargs to the
265kernel. 242kernel.
266 243
267 Part 7 - Locking 244 Part 6 - Locking
268 245
269The common clock framework uses two global locks, the prepare lock and the 246The common clock framework uses two global locks, the prepare lock and the
270enable lock. 247enable lock.
diff --git a/Documentation/cpu-freq/governors.txt b/Documentation/cpu-freq/governors.txt
index 77ec21574fb1..c15aa75f5227 100644
--- a/Documentation/cpu-freq/governors.txt
+++ b/Documentation/cpu-freq/governors.txt
@@ -36,7 +36,7 @@ Contents:
361. What Is A CPUFreq Governor? 361. What Is A CPUFreq Governor?
37============================== 37==============================
38 38
39Most cpufreq drivers (in fact, all except one, longrun) or even most 39Most cpufreq drivers (except the intel_pstate and longrun) or even most
40cpu frequency scaling algorithms only offer the CPU to be set to one 40cpu frequency scaling algorithms only offer the CPU to be set to one
41frequency. In order to offer dynamic frequency scaling, the cpufreq 41frequency. In order to offer dynamic frequency scaling, the cpufreq
42core must be able to tell these drivers of a "target frequency". So 42core must be able to tell these drivers of a "target frequency". So
diff --git a/Documentation/cpu-freq/intel-pstate.txt b/Documentation/cpu-freq/intel-pstate.txt
index 655750743fb0..be8d4006bf76 100644
--- a/Documentation/cpu-freq/intel-pstate.txt
+++ b/Documentation/cpu-freq/intel-pstate.txt
@@ -3,24 +3,25 @@ Intel P-state driver
3 3
4This driver provides an interface to control the P state selection for 4This driver provides an interface to control the P state selection for
5SandyBridge+ Intel processors. The driver can operate two different 5SandyBridge+ Intel processors. The driver can operate two different
6modes based on the processor model legacy and Hardware P state (HWP) 6modes based on the processor model, legacy mode and Hardware P state (HWP)
7mode. 7mode.
8 8
9In legacy mode the driver implements a scaling driver with an internal 9In legacy mode, the Intel P-state implements two internal governors,
10governor for Intel Core processors. The driver follows the same model 10performance and powersave, that differ from the general cpufreq governors of
11as the Transmeta scaling driver (longrun.c) and implements the 11the same name (the general cpufreq governors implement target(), whereas the
12setpolicy() instead of target(). Scaling drivers that implement 12internal Intel P-state governors implement setpolicy()). The internal
13setpolicy() are assumed to implement internal governors by the cpufreq 13performance governor sets the max_perf_pct and min_perf_pct to 100; that is,
14core. All the logic for selecting the current P state is contained 14the governor selects the highest available P state to maximize the performance
15within the driver; no external governor is used by the cpufreq core. 15of the core. The internal powersave governor selects the appropriate P state
16based on the current load on the CPU.
16 17
17In HWP mode P state selection is implemented in the processor 18In HWP mode P state selection is implemented in the processor
18itself. The driver provides the interfaces between the cpufreq core and 19itself. The driver provides the interfaces between the cpufreq core and
19the processor to control P state selection based on user preferences 20the processor to control P state selection based on user preferences
20and reporting frequency to the cpufreq core. In this mode the 21and reporting frequency to the cpufreq core. In this mode the
21internal governor code is disabled. 22internal Intel P-state governor code is disabled.
22 23
23In addtion to the interfaces provided by the cpufreq core for 24In addition to the interfaces provided by the cpufreq core for
24controlling frequency the driver provides sysfs files for 25controlling frequency the driver provides sysfs files for
25controlling P state selection. These files have been added to 26controlling P state selection. These files have been added to
26/sys/devices/system/cpu/intel_pstate/ 27/sys/devices/system/cpu/intel_pstate/
diff --git a/Documentation/cpu-freq/user-guide.txt b/Documentation/cpu-freq/user-guide.txt
index ff2f28332cc4..109e97bbab77 100644
--- a/Documentation/cpu-freq/user-guide.txt
+++ b/Documentation/cpu-freq/user-guide.txt
@@ -196,8 +196,6 @@ affected_cpus : List of Online CPUs that require software
196related_cpus : List of Online + Offline CPUs that need software 196related_cpus : List of Online + Offline CPUs that need software
197 coordination of frequency. 197 coordination of frequency.
198 198
199scaling_driver : Hardware driver for cpufreq.
200
201scaling_cur_freq : Current frequency of the CPU as determined by 199scaling_cur_freq : Current frequency of the CPU as determined by
202 the governor and cpufreq core, in KHz. This is 200 the governor and cpufreq core, in KHz. This is
203 the frequency the kernel thinks the CPU runs 201 the frequency the kernel thinks the CPU runs
diff --git a/Documentation/cputopology.txt b/Documentation/cputopology.txt
index 0aad6deb2d96..12b1b25b4da9 100644
--- a/Documentation/cputopology.txt
+++ b/Documentation/cputopology.txt
@@ -1,6 +1,6 @@
1 1
2Export CPU topology info via sysfs. Items (attributes) are similar 2Export CPU topology info via sysfs. Items (attributes) are similar
3to /proc/cpuinfo. 3to /proc/cpuinfo output of some architectures:
4 4
51) /sys/devices/system/cpu/cpuX/topology/physical_package_id: 51) /sys/devices/system/cpu/cpuX/topology/physical_package_id:
6 6
@@ -23,20 +23,35 @@ to /proc/cpuinfo.
234) /sys/devices/system/cpu/cpuX/topology/thread_siblings: 234) /sys/devices/system/cpu/cpuX/topology/thread_siblings:
24 24
25 internal kernel map of cpuX's hardware threads within the same 25 internal kernel map of cpuX's hardware threads within the same
26 core as cpuX 26 core as cpuX.
27 27
285) /sys/devices/system/cpu/cpuX/topology/core_siblings: 285) /sys/devices/system/cpu/cpuX/topology/thread_siblings_list:
29
30 human-readable list of cpuX's hardware threads within the same
31 core as cpuX.
32
336) /sys/devices/system/cpu/cpuX/topology/core_siblings:
29 34
30 internal kernel map of cpuX's hardware threads within the same 35 internal kernel map of cpuX's hardware threads within the same
31 physical_package_id. 36 physical_package_id.
32 37
336) /sys/devices/system/cpu/cpuX/topology/book_siblings: 387) /sys/devices/system/cpu/cpuX/topology/core_siblings_list:
39
40 human-readable list of cpuX's hardware threads within the same
41 physical_package_id.
42
438) /sys/devices/system/cpu/cpuX/topology/book_siblings:
34 44
35 internal kernel map of cpuX's hardware threads within the same 45 internal kernel map of cpuX's hardware threads within the same
36 book_id. 46 book_id.
37 47
489) /sys/devices/system/cpu/cpuX/topology/book_siblings_list:
49
50 human-readable list of cpuX's hardware threads within the same
51 book_id.
52
38To implement it in an architecture-neutral way, a new source file, 53To implement it in an architecture-neutral way, a new source file,
39drivers/base/topology.c, is to export the 4 or 6 attributes. The two book 54drivers/base/topology.c, is to export the 6 or 9 attributes. The three book
40related sysfs files will only be created if CONFIG_SCHED_BOOK is selected. 55related sysfs files will only be created if CONFIG_SCHED_BOOK is selected.
41 56
42For an architecture to support this feature, it must define some of 57For an architecture to support this feature, it must define some of
@@ -44,20 +59,22 @@ these macros in include/asm-XXX/topology.h:
44#define topology_physical_package_id(cpu) 59#define topology_physical_package_id(cpu)
45#define topology_core_id(cpu) 60#define topology_core_id(cpu)
46#define topology_book_id(cpu) 61#define topology_book_id(cpu)
47#define topology_thread_cpumask(cpu) 62#define topology_sibling_cpumask(cpu)
48#define topology_core_cpumask(cpu) 63#define topology_core_cpumask(cpu)
49#define topology_book_cpumask(cpu) 64#define topology_book_cpumask(cpu)
50 65
51The type of **_id is int. 66The type of **_id macros is int.
52The type of siblings is (const) struct cpumask *. 67The type of **_cpumask macros is (const) struct cpumask *. The latter
68correspond with appropriate **_siblings sysfs attributes (except for
69topology_sibling_cpumask() which corresponds with thread_siblings).
53 70
54To be consistent on all architectures, include/linux/topology.h 71To be consistent on all architectures, include/linux/topology.h
55provides default definitions for any of the above macros that are 72provides default definitions for any of the above macros that are
56not defined by include/asm-XXX/topology.h: 73not defined by include/asm-XXX/topology.h:
571) physical_package_id: -1 741) physical_package_id: -1
582) core_id: 0 752) core_id: 0
593) thread_siblings: just the given CPU 763) sibling_cpumask: just the given CPU
604) core_siblings: just the given CPU 774) core_cpumask: just the given CPU
61 78
62For architectures that don't support books (CONFIG_SCHED_BOOK) there are no 79For architectures that don't support books (CONFIG_SCHED_BOOK) there are no
63default definitions for topology_book_id() and topology_book_cpumask(). 80default definitions for topology_book_id() and topology_book_cpumask().
diff --git a/Documentation/debugging-via-ohci1394.txt b/Documentation/debugging-via-ohci1394.txt
index 5c9a567b3fac..03703afc4d30 100644
--- a/Documentation/debugging-via-ohci1394.txt
+++ b/Documentation/debugging-via-ohci1394.txt
@@ -181,4 +181,4 @@ Notes
181Documentation and specifications: http://halobates.de/firewire/ 181Documentation and specifications: http://halobates.de/firewire/
182 182
183FireWire is a trademark of Apple Inc. - for more information please refer to: 183FireWire is a trademark of Apple Inc. - for more information please refer to:
184http://en.wikipedia.org/wiki/FireWire 184https://en.wikipedia.org/wiki/FireWire
diff --git a/Documentation/device-mapper/cache-policies.txt b/Documentation/device-mapper/cache-policies.txt
index 0d124a971801..d9246a32e673 100644
--- a/Documentation/device-mapper/cache-policies.txt
+++ b/Documentation/device-mapper/cache-policies.txt
@@ -25,10 +25,10 @@ trying to see when the io scheduler has let the ios run.
25Overview of supplied cache replacement policies 25Overview of supplied cache replacement policies
26=============================================== 26===============================================
27 27
28multiqueue 28multiqueue (mq)
29---------- 29---------------
30 30
31This policy is the default. 31This policy has been deprecated in favor of the smq policy (see below).
32 32
33The multiqueue policy has three sets of 16 queues: one set for entries 33The multiqueue policy has three sets of 16 queues: one set for entries
34waiting for the cache and another two for those in the cache (a set for 34waiting for the cache and another two for those in the cache (a set for
@@ -73,6 +73,67 @@ If you're trying to quickly warm a new cache device you may wish to
73reduce these to encourage promotion. Remember to switch them back to 73reduce these to encourage promotion. Remember to switch them back to
74their defaults after the cache fills though. 74their defaults after the cache fills though.
75 75
76Stochastic multiqueue (smq)
77---------------------------
78
79This policy is the default.
80
81The stochastic multi-queue (smq) policy addresses some of the problems
82with the multiqueue (mq) policy.
83
84The smq policy (vs mq) offers the promise of less memory utilization,
85improved performance and increased adaptability in the face of changing
86workloads. SMQ also does not have any cumbersome tuning knobs.
87
88Users may switch from "mq" to "smq" simply by appropriately reloading a
89DM table that is using the cache target. Doing so will cause all of the
90mq policy's hints to be dropped. Also, performance of the cache may
91degrade slightly until smq recalculates the origin device's hotspots
92that should be cached.
93
94Memory usage:
95The mq policy uses a lot of memory; 88 bytes per cache block on a 64
96bit machine.
97
98SMQ uses 28bit indexes to implement it's data structures rather than
99pointers. It avoids storing an explicit hit count for each block. It
100has a 'hotspot' queue rather than a pre cache which uses a quarter of
101the entries (each hotspot block covers a larger area than a single
102cache block).
103
104All these mean smq uses ~25bytes per cache block. Still a lot of
105memory, but a substantial improvement nontheless.
106
107Level balancing:
108MQ places entries in different levels of the multiqueue structures
109based on their hit count (~ln(hit count)). This means the bottom
110levels generally have the most entries, and the top ones have very
111few. Having unbalanced levels like this reduces the efficacy of the
112multiqueue.
113
114SMQ does not maintain a hit count, instead it swaps hit entries with
115the least recently used entry from the level above. The over all
116ordering being a side effect of this stochastic process. With this
117scheme we can decide how many entries occupy each multiqueue level,
118resulting in better promotion/demotion decisions.
119
120Adaptability:
121The MQ policy maintains a hit count for each cache block. For a
122different block to get promoted to the cache it's hit count has to
123exceed the lowest currently in the cache. This means it can take a
124long time for the cache to adapt between varying IO patterns.
125Periodically degrading the hit counts could help with this, but I
126haven't found a nice general solution.
127
128SMQ doesn't maintain hit counts, so a lot of this problem just goes
129away. In addition it tracks performance of the hotspot queue, which
130is used to decide which blocks to promote. If the hotspot queue is
131performing badly then it starts moving entries more quickly between
132levels. This lets it adapt to new IO patterns very quickly.
133
134Performance:
135Testing SMQ shows substantially better performance than MQ.
136
76cleaner 137cleaner
77------- 138-------
78 139
diff --git a/Documentation/device-mapper/cache.txt b/Documentation/device-mapper/cache.txt
index 68c0f517c60e..82960cffbad3 100644
--- a/Documentation/device-mapper/cache.txt
+++ b/Documentation/device-mapper/cache.txt
@@ -221,6 +221,7 @@ Status
221<#read hits> <#read misses> <#write hits> <#write misses> 221<#read hits> <#read misses> <#write hits> <#write misses>
222<#demotions> <#promotions> <#dirty> <#features> <features>* 222<#demotions> <#promotions> <#dirty> <#features> <features>*
223<#core args> <core args>* <policy name> <#policy args> <policy args>* 223<#core args> <core args>* <policy name> <#policy args> <policy args>*
224<cache metadata mode>
224 225
225metadata block size : Fixed block size for each metadata block in 226metadata block size : Fixed block size for each metadata block in
226 sectors 227 sectors
@@ -251,8 +252,12 @@ core args : Key/value pairs for tuning the core
251 e.g. migration_threshold 252 e.g. migration_threshold
252policy name : Name of the policy 253policy name : Name of the policy
253#policy args : Number of policy arguments to follow (must be even) 254#policy args : Number of policy arguments to follow (must be even)
254policy args : Key/value pairs 255policy args : Key/value pairs e.g. sequential_threshold
255 e.g. sequential_threshold 256cache metadata mode : ro if read-only, rw if read-write
257 In serious cases where even a read-only mode is deemed unsafe
258 no further I/O will be permitted and the status will just
259 contain the string 'Fail'. The userspace recovery tools
260 should then be used.
256 261
257Messages 262Messages
258-------- 263--------
diff --git a/Documentation/device-mapper/dm-raid.txt b/Documentation/device-mapper/dm-raid.txt
index ef8ba9fa58c4..cb12af3b51c2 100644
--- a/Documentation/device-mapper/dm-raid.txt
+++ b/Documentation/device-mapper/dm-raid.txt
@@ -224,3 +224,5 @@ Version History
224 New status (STATUSTYPE_INFO) fields: sync_action and mismatch_cnt. 224 New status (STATUSTYPE_INFO) fields: sync_action and mismatch_cnt.
2251.5.1 Add ability to restore transiently failed devices on resume. 2251.5.1 Add ability to restore transiently failed devices on resume.
2261.5.2 'mismatch_cnt' is zero unless [last_]sync_action is "check". 2261.5.2 'mismatch_cnt' is zero unless [last_]sync_action is "check".
2271.6.0 Add discard support (and devices_handle_discard_safely module param).
2281.7.0 Add support for MD RAID0 mappings.
diff --git a/Documentation/device-mapper/statistics.txt b/Documentation/device-mapper/statistics.txt
index 2a1673adc200..4919b2dfd1b3 100644
--- a/Documentation/device-mapper/statistics.txt
+++ b/Documentation/device-mapper/statistics.txt
@@ -13,9 +13,14 @@ the range specified.
13The I/O statistics counters for each step-sized area of a region are 13The I/O statistics counters for each step-sized area of a region are
14in the same format as /sys/block/*/stat or /proc/diskstats (see: 14in the same format as /sys/block/*/stat or /proc/diskstats (see:
15Documentation/iostats.txt). But two extra counters (12 and 13) are 15Documentation/iostats.txt). But two extra counters (12 and 13) are
16provided: total time spent reading and writing in milliseconds. All 16provided: total time spent reading and writing. When the histogram
17these counters may be accessed by sending the @stats_print message to 17argument is used, the 14th parameter is reported that represents the
18the appropriate DM device via dmsetup. 18histogram of latencies. All these counters may be accessed by sending
19the @stats_print message to the appropriate DM device via dmsetup.
20
21The reported times are in milliseconds and the granularity depends on
22the kernel ticks. When the option precise_timestamps is used, the
23reported times are in nanoseconds.
19 24
20Each region has a corresponding unique identifier, which we call a 25Each region has a corresponding unique identifier, which we call a
21region_id, that is assigned when the region is created. The region_id 26region_id, that is assigned when the region is created. The region_id
@@ -33,7 +38,9 @@ memory is used by reading
33Messages 38Messages
34======== 39========
35 40
36 @stats_create <range> <step> [<program_id> [<aux_data>]] 41 @stats_create <range> <step>
42 [<number_of_optional_arguments> <optional_arguments>...]
43 [<program_id> [<aux_data>]]
37 44
38 Create a new region and return the region_id. 45 Create a new region and return the region_id.
39 46
@@ -48,6 +55,29 @@ Messages
48 "/<number_of_areas>" - the range is subdivided into the specified 55 "/<number_of_areas>" - the range is subdivided into the specified
49 number of areas. 56 number of areas.
50 57
58 <number_of_optional_arguments>
59 The number of optional arguments
60
61 <optional_arguments>
62 The following optional arguments are supported
63 precise_timestamps - use precise timer with nanosecond resolution
64 instead of the "jiffies" variable. When this argument is
65 used, the resulting times are in nanoseconds instead of
66 milliseconds. Precise timestamps are a little bit slower
67 to obtain than jiffies-based timestamps.
68 histogram:n1,n2,n3,n4,... - collect histogram of latencies. The
69 numbers n1, n2, etc are times that represent the boundaries
70 of the histogram. If precise_timestamps is not used, the
71 times are in milliseconds, otherwise they are in
72 nanoseconds. For each range, the kernel will report the
73 number of requests that completed within this range. For
74 example, if we use "histogram:10,20,30", the kernel will
75 report four numbers a:b:c:d. a is the number of requests
76 that took 0-10 ms to complete, b is the number of requests
77 that took 10-20 ms to complete, c is the number of requests
78 that took 20-30 ms to complete and d is the number of
79 requests that took more than 30 ms to complete.
80
51 <program_id> 81 <program_id>
52 An optional parameter. A name that uniquely identifies 82 An optional parameter. A name that uniquely identifies
53 the userspace owner of the range. This groups ranges together 83 the userspace owner of the range. This groups ranges together
@@ -55,6 +85,9 @@ Messages
55 created and ignore those created by others. 85 created and ignore those created by others.
56 The kernel returns this string back in the output of 86 The kernel returns this string back in the output of
57 @stats_list message, but it doesn't use it for anything else. 87 @stats_list message, but it doesn't use it for anything else.
88 If we omit the number of optional arguments, program id must not
89 be a number, otherwise it would be interpreted as the number of
90 optional arguments.
58 91
59 <aux_data> 92 <aux_data>
60 An optional parameter. A word that provides auxiliary data 93 An optional parameter. A word that provides auxiliary data
diff --git a/Documentation/devicetree/bindings/arc/archs-idu-intc.txt b/Documentation/devicetree/bindings/arc/archs-idu-intc.txt
new file mode 100644
index 000000000000..0dcb7c7d3e40
--- /dev/null
+++ b/Documentation/devicetree/bindings/arc/archs-idu-intc.txt
@@ -0,0 +1,46 @@
1* ARC-HS Interrupt Distribution Unit
2
3 This optional 2nd level interrupt controller can be used in SMP configurations for
4 dynamic IRQ routing, load balancing of common/external IRQs towards core intc.
5
6Properties:
7
8- compatible: "snps,archs-idu-intc"
9- interrupt-controller: This is an interrupt controller.
10- interrupt-parent: <reference to parent core intc>
11- #interrupt-cells: Must be <2>.
12- interrupts: <...> specifies the upstream core irqs
13
14 First cell specifies the "common" IRQ from peripheral to IDU
15 Second cell specifies the irq distribution mode to cores
16 0=Round Robin; 1=cpu0, 2=cpu1, 4=cpu2, 8=cpu3
17
18 intc accessed via the special ARC AUX register interface, hence "reg" property
19 is not specified.
20
21Example:
22 core_intc: core-interrupt-controller {
23 compatible = "snps,archs-intc";
24 interrupt-controller;
25 #interrupt-cells = <1>;
26 };
27
28 idu_intc: idu-interrupt-controller {
29 compatible = "snps,archs-idu-intc";
30 interrupt-controller;
31 interrupt-parent = <&core_intc>;
32
33 /*
34 * <hwirq distribution>
35 * distribution: 0=RR; 1=cpu0, 2=cpu1, 4=cpu2, 8=cpu3
36 */
37 #interrupt-cells = <2>;
38
39 /* upstream core irqs: downstream these are "COMMON" irq 0,1.. */
40 interrupts = <24 25 26 27 28 29 30 31>;
41 };
42
43 some_device: serial@c0fc1000 {
44 interrupt-parent = <&idu_intc>;
45 interrupts = <0 0>; /* upstream idu IRQ #24, Round Robin */
46 };
diff --git a/Documentation/devicetree/bindings/arc/archs-intc.txt b/Documentation/devicetree/bindings/arc/archs-intc.txt
new file mode 100644
index 000000000000..69f326d6a5ad
--- /dev/null
+++ b/Documentation/devicetree/bindings/arc/archs-intc.txt
@@ -0,0 +1,22 @@
1* ARC-HS incore Interrupt Controller (Provided by cores implementing ARCv2 ISA)
2
3Properties:
4
5- compatible: "snps,archs-intc"
6- interrupt-controller: This is an interrupt controller.
7- #interrupt-cells: Must be <1>.
8
9 Single Cell "interrupts" property of a device specifies the IRQ number
10 between 16 to 256
11
12 intc accessed via the special ARC AUX register interface, hence "reg" property
13 is not specified.
14
15Example:
16
17 intc: interrupt-controller {
18 compatible = "snps,archs-intc";
19 interrupt-controller;
20 #interrupt-cells = <1>;
21 interrupts = <16 17 18 19 20 21 22 23 24 25>;
22 };
diff --git a/Documentation/devicetree/bindings/arc/axs101.txt b/Documentation/devicetree/bindings/arc/axs101.txt
new file mode 100644
index 000000000000..48290d5178b5
--- /dev/null
+++ b/Documentation/devicetree/bindings/arc/axs101.txt
@@ -0,0 +1,7 @@
1Synopsys DesignWare ARC Software Development Platforms Device Tree Bindings
2---------------------------------------------------------------------------
3
4SDP Main Board with an AXC001 CPU Card hoisting ARC700 core in silicon
5
6Required root node properties:
7 - compatible = "snps,axs101", "snps,arc-sdp";
diff --git a/Documentation/devicetree/bindings/arc/axs103.txt b/Documentation/devicetree/bindings/arc/axs103.txt
new file mode 100644
index 000000000000..6eea862e72b9
--- /dev/null
+++ b/Documentation/devicetree/bindings/arc/axs103.txt
@@ -0,0 +1,8 @@
1Synopsys DesignWare ARC Software Development Platforms Device Tree Bindings
2---------------------------------------------------------------------------
3
4SDP Main Board with an AXC003 FPGA Card which can contain various flavours of
5HS38x cores.
6
7Required root node properties:
8 - compatible = "snps,axs103", "snps,arc-sdp";
diff --git a/Documentation/devicetree/bindings/arm/altera/socfpga-sdram-controller.txt b/Documentation/devicetree/bindings/arm/altera/socfpga-sdram-controller.txt
new file mode 100644
index 000000000000..77ca635765e1
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/altera/socfpga-sdram-controller.txt
@@ -0,0 +1,12 @@
1Altera SOCFPGA SDRAM Controller
2
3Required properties:
4- compatible : Should contain "altr,sdr-ctl" and "syscon".
5 syscon is required by the Altera SOCFPGA SDRAM EDAC.
6- reg : Should contain 1 register range (address and length)
7
8Example:
9 sdr: sdr@ffc25000 {
10 compatible = "altr,sdr-ctl", "syscon";
11 reg = <0xffc25000 0x1000>;
12 };
diff --git a/Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.txt b/Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.txt
index d0ce01da5c59..f5ad0ff69fae 100644
--- a/Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.txt
+++ b/Documentation/devicetree/bindings/arm/altera/socfpga-sdram-edac.txt
@@ -2,7 +2,7 @@ Altera SOCFPGA SDRAM Error Detection & Correction [EDAC]
2The EDAC accesses a range of registers in the SDRAM controller. 2The EDAC accesses a range of registers in the SDRAM controller.
3 3
4Required properties: 4Required properties:
5- compatible : should contain "altr,sdram-edac"; 5- compatible : should contain "altr,sdram-edac" or "altr,sdram-edac-a10"
6- altr,sdr-syscon : phandle of the sdr module 6- altr,sdr-syscon : phandle of the sdr module
7- interrupts : Should contain the SDRAM ECC IRQ in the 7- interrupts : Should contain the SDRAM ECC IRQ in the
8 appropriate format for the IRQ controller. 8 appropriate format for the IRQ controller.
diff --git a/Documentation/devicetree/bindings/arm/arm-boards b/Documentation/devicetree/bindings/arm/arm-boards
index b78564b2b201..1a709970e7f7 100644
--- a/Documentation/devicetree/bindings/arm/arm-boards
+++ b/Documentation/devicetree/bindings/arm/arm-boards
@@ -157,3 +157,69 @@ Example:
157 157
158 }; 158 };
159}; 159};
160
161ARM Versatile Express Boards
162-----------------------------
163For details on the device tree bindings for ARM Versatile Express boards
164please consult the vexpress.txt file in the same directory as this file.
165
166ARM Juno Boards
167----------------
168The Juno boards are targeting development for AArch64 systems. The first
169iteration, Juno r0, is a vehicle for evaluating big.LITTLE on AArch64,
170with the second iteration, Juno r1, mainly aimed at development of PCIe
171based systems. Juno r1 also has support for AXI masters placed on the TLX
172connectors to join the coherency domain.
173
174Juno boards are described in a similar way to ARM Versatile Express boards,
175with the motherboard part of the hardware being described in a separate file
176to highlight the fact that is part of the support infrastructure for the SoC.
177Juno device tree bindings also share the Versatile Express bindings as
178described under the RS1 memory mapping.
179
180Required properties (in root node):
181 compatible = "arm,juno"; /* For Juno r0 board */
182 compatible = "arm,juno-r1"; /* For Juno r1 board */
183
184Required nodes:
185The description for the board must include:
186 - a "psci" node describing the boot method used for the secondary CPUs.
187 A detailed description of the bindings used for "psci" nodes is present
188 in the psci.txt file.
189 - a "cpus" node describing the available cores and their associated
190 "enable-method"s. For more details see cpus.txt file.
191
192Example:
193
194/dts-v1/;
195/ {
196 model = "ARM Juno development board (r0)";
197 compatible = "arm,juno", "arm,vexpress";
198 interrupt-parent = <&gic>;
199 #address-cells = <2>;
200 #size-cells = <2>;
201
202 cpus {
203 #address-cells = <2>;
204 #size-cells = <0>;
205
206 A57_0: cpu@0 {
207 compatible = "arm,cortex-a57","arm,armv8";
208 reg = <0x0 0x0>;
209 device_type = "cpu";
210 enable-method = "psci";
211 };
212
213 .....
214
215 A53_0: cpu@100 {
216 compatible = "arm,cortex-a53","arm,armv8";
217 reg = <0x0 0x100>;
218 device_type = "cpu";
219 enable-method = "psci";
220 };
221
222 .....
223 };
224
225};
diff --git a/Documentation/devicetree/bindings/arm/armv7m_systick.txt b/Documentation/devicetree/bindings/arm/armv7m_systick.txt
new file mode 100644
index 000000000000..7cf4a24601eb
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/armv7m_systick.txt
@@ -0,0 +1,26 @@
1* ARMv7M System Timer
2
3ARMv7-M includes a system timer, known as SysTick. Current driver only
4implements the clocksource feature.
5
6Required properties:
7- compatible : Should be "arm,armv7m-systick"
8- reg : The address range of the timer
9
10Required clocking property, have to be one of:
11- clocks : The input clock of the timer
12- clock-frequency : The rate in HZ in input of the ARM SysTick
13
14Examples:
15
16systick: timer@e000e010 {
17 compatible = "arm,armv7m-systick";
18 reg = <0xe000e010 0x10>;
19 clocks = <&clk_systick>;
20};
21
22systick: timer@e000e010 {
23 compatible = "arm,armv7m-systick";
24 reg = <0xe000e010 0x10>;
25 clock-frequency = <90000000>;
26};
diff --git a/Documentation/devicetree/bindings/arm/atmel-at91.txt b/Documentation/devicetree/bindings/arm/atmel-at91.txt
index 2e99b5b57350..424ac8cbfa08 100644
--- a/Documentation/devicetree/bindings/arm/atmel-at91.txt
+++ b/Documentation/devicetree/bindings/arm/atmel-at91.txt
@@ -98,7 +98,7 @@ Example:
98 }; 98 };
99 99
100RAMC SDRAM/DDR Controller required properties: 100RAMC SDRAM/DDR Controller required properties:
101- compatible: Should be "atmel,at91rm9200-sdramc", 101- compatible: Should be "atmel,at91rm9200-sdramc", "syscon"
102 "atmel,at91sam9260-sdramc", 102 "atmel,at91sam9260-sdramc",
103 "atmel,at91sam9g45-ddramc", 103 "atmel,at91sam9g45-ddramc",
104 "atmel,sama5d3-ddramc", 104 "atmel,sama5d3-ddramc",
diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
index ac683480c486..c78576bb7729 100644
--- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
+++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
@@ -1,8 +1,35 @@
1Broadcom BCM2835 device tree bindings 1Broadcom BCM2835 device tree bindings
2------------------------------------------- 2-------------------------------------------
3 3
4Boards with the BCM2835 SoC shall have the following properties: 4Raspberry Pi Model A
5Required root node properties:
6compatible = "raspberrypi,model-a", "brcm,bcm2835";
5 7
6Required root node property: 8Raspberry Pi Model A+
9Required root node properties:
10compatible = "raspberrypi,model-a-plus", "brcm,bcm2835";
7 11
12Raspberry Pi Model B
13Required root node properties:
14compatible = "raspberrypi,model-b", "brcm,bcm2835";
15
16Raspberry Pi Model B (no P5)
17early model B with I2C0 rather than I2C1 routed to the expansion header
18Required root node properties:
19compatible = "raspberrypi,model-b-i2c0", "brcm,bcm2835";
20
21Raspberry Pi Model B rev2
22Required root node properties:
23compatible = "raspberrypi,model-b-rev2", "brcm,bcm2835";
24
25Raspberry Pi Model B+
26Required root node properties:
27compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
28
29Raspberry Pi Compute Module
30Required root node properties:
31compatible = "raspberrypi,compute-module", "brcm,bcm2835";
32
33Generic BCM2835 board
34Required root node properties:
8compatible = "brcm,bcm2835"; 35compatible = "brcm,bcm2835";
diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm63138.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm63138.txt
index bd49987a8812..b82b6a0ae6f7 100644
--- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm63138.txt
+++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm63138.txt
@@ -7,3 +7,79 @@ following properties:
7Required root node property: 7Required root node property:
8 8
9compatible: should be "brcm,bcm63138" 9compatible: should be "brcm,bcm63138"
10
11An optional Boot lookup table Device Tree node is required for secondary CPU
12initialization as well as a 'resets' phandle to the correct PMB controller as
13defined in reset/brcm,bcm63138-pmb.txt for this secondary CPU, and an
14'enable-method' property.
15
16Required properties for the Boot lookup table node:
17- compatible: should be "brcm,bcm63138-bootlut"
18- reg: register base address and length for the Boot Lookup table
19
20Optional properties for the primary CPU node:
21- enable-method: should be "brcm,bcm63138"
22
23Optional properties for the secondary CPU node:
24- enable-method: should be "brcm,bcm63138"
25- resets: phandle to the relevant PMB controller, one integer indicating the internal
26 bus number, and a second integer indicating the address of the CPU in the PMB
27 internal bus number.
28
29Example:
30
31 cpus {
32 cpu@0 {
33 compatible = "arm,cotex-a9";
34 reg = <0>;
35 ...
36 enable-method = "brcm,bcm63138";
37 };
38
39 cpu@1 {
40 compatible = "arm,cortex-a9";
41 reg = <1>;
42 ...
43 enable-method = "brcm,bcm63138";
44 resets = <&pmb0 4 1>;
45 };
46 };
47
48 bootlut: bootlut@8000 {
49 compatible = "brcm,bcm63138-bootlut";
50 reg = <0x8000 0x50>;
51 };
52
53=======
54reboot
55------
56Two nodes are required for software reboot: a timer node and a syscon-reboot node.
57
58Timer node:
59
60- compatible: Must be "brcm,bcm6328-timer", "syscon"
61- reg: Register base address and length
62
63Syscon reboot node:
64
65See Documentation/devicetree/bindings/power/reset/syscon-reboot.txt for the
66detailed list of properties, the two values defined below are specific to the
67BCM6328-style timer:
68
69- offset: Should be 0x34 to denote the offset of the TIMER_WD_TIMER_RESET register
70 from the beginning of the TIMER block
71- mask: Should be 1 for the SoftRst bit.
72
73Example:
74
75 timer: timer@80 {
76 compatible = "brcm,bcm6328-timer", "syscon";
77 reg = <0x80 0x3c>;
78 };
79
80 reboot {
81 compatible = "syscon-reboot";
82 regmap = <&timer>;
83 offset = <0x34>;
84 mask = <0x1>;
85 };
diff --git a/Documentation/devicetree/bindings/arm/cci.txt b/Documentation/devicetree/bindings/arm/cci.txt
index 3c5c631328d3..aef1d200a9b2 100644
--- a/Documentation/devicetree/bindings/arm/cci.txt
+++ b/Documentation/devicetree/bindings/arm/cci.txt
@@ -31,8 +31,9 @@ specific to ARM.
31 - compatible 31 - compatible
32 Usage: required 32 Usage: required
33 Value type: <string> 33 Value type: <string>
34 Definition: must be set to 34 Definition: must contain one of the following:
35 "arm,cci-400" 35 "arm,cci-400"
36 "arm,cci-500"
36 37
37 - reg 38 - reg
38 Usage: required 39 Usage: required
@@ -99,6 +100,7 @@ specific to ARM.
99 "arm,cci-400-pmu,r1" 100 "arm,cci-400-pmu,r1"
100 "arm,cci-400-pmu" - DEPRECATED, permitted only where OS has 101 "arm,cci-400-pmu" - DEPRECATED, permitted only where OS has
101 secure acces to CCI registers 102 secure acces to CCI registers
103 "arm,cci-500-pmu,r0"
102 - reg: 104 - reg:
103 Usage: required 105 Usage: required
104 Value type: Integer cells. A register entry, expressed 106 Value type: Integer cells. A register entry, expressed
diff --git a/Documentation/devicetree/bindings/arm/coresight.txt b/Documentation/devicetree/bindings/arm/coresight.txt
index 88602b75418e..65a6db2271a2 100644
--- a/Documentation/devicetree/bindings/arm/coresight.txt
+++ b/Documentation/devicetree/bindings/arm/coresight.txt
@@ -17,15 +17,19 @@ its hardware characteristcs.
17 - "arm,coresight-tmc", "arm,primecell"; 17 - "arm,coresight-tmc", "arm,primecell";
18 - "arm,coresight-funnel", "arm,primecell"; 18 - "arm,coresight-funnel", "arm,primecell";
19 - "arm,coresight-etm3x", "arm,primecell"; 19 - "arm,coresight-etm3x", "arm,primecell";
20 - "qcom,coresight-replicator1x", "arm,primecell";
20 21
21 * reg: physical base address and length of the register 22 * reg: physical base address and length of the register
22 set(s) of the component. 23 set(s) of the component.
23 24
24 * clocks: the clock associated to this component. 25 * clocks: the clocks associated to this component.
25 26
26 * clock-names: the name of the clock as referenced by the code. 27 * clock-names: the name of the clocks referenced by the code.
27 Since we are using the AMBA framework, the name should be 28 Since we are using the AMBA framework, the name of the clock
28 "apb_pclk". 29 providing the interconnect should be "apb_pclk", and some
30 coresight blocks also have an additional clock "atclk", which
31 clocks the core of that coresight component. The latter clock
32 is optional.
29 33
30 * port or ports: The representation of the component's port 34 * port or ports: The representation of the component's port
31 layout using the generic DT graph presentation found in 35 layout using the generic DT graph presentation found in
diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt
index 6aa331d11c5e..d6b794cef0b8 100644
--- a/Documentation/devicetree/bindings/arm/cpus.txt
+++ b/Documentation/devicetree/bindings/arm/cpus.txt
@@ -188,6 +188,7 @@ nodes to be present and contain the properties described below.
188 # On ARM 32-bit systems this property is optional and 188 # On ARM 32-bit systems this property is optional and
189 can be one of: 189 can be one of:
190 "allwinner,sun6i-a31" 190 "allwinner,sun6i-a31"
191 "allwinner,sun8i-a23"
191 "arm,psci" 192 "arm,psci"
192 "brcm,brahma-b15" 193 "brcm,brahma-b15"
193 "marvell,armada-375-smp" 194 "marvell,armada-375-smp"
diff --git a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
index 5da38c5ed476..e151057d92f0 100644
--- a/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
+++ b/Documentation/devicetree/bindings/arm/exynos/power_domain.txt
@@ -19,9 +19,10 @@ Optional Properties:
19 domains. 19 domains.
20- clock-names: The following clocks can be specified: 20- clock-names: The following clocks can be specified:
21 - oscclk: Oscillator clock. 21 - oscclk: Oscillator clock.
22 - pclkN, clkN: Pairs of parent of input clock and input clock to the 22 - clkN: Input clocks to the devices in this power domain. These clocks
23 devices in this power domain. Maximum of 4 pairs (N = 0 to 3) 23 will be reparented to oscclk before swithing power domain off.
24 are supported currently. 24 Their original parent will be brought back after turning on
25 the domain. Maximum of 4 clocks (N = 0 to 3) are supported.
25 - asbN: Clocks required by asynchronous bridges (ASB) present in 26 - asbN: Clocks required by asynchronous bridges (ASB) present in
26 the power domain. These clock should be enabled during power 27 the power domain. These clock should be enabled during power
27 domain on/off operations. 28 domain on/off operations.
diff --git a/Documentation/devicetree/bindings/arm/fsl.txt b/Documentation/devicetree/bindings/arm/fsl.txt
index a5462b6b3c30..2a3ba73f0c5c 100644
--- a/Documentation/devicetree/bindings/arm/fsl.txt
+++ b/Documentation/devicetree/bindings/arm/fsl.txt
@@ -81,12 +81,15 @@ Freescale Vybrid Platform Device Tree Bindings
81For the Vybrid SoC familiy all variants with DDR controller are supported, 81For the Vybrid SoC familiy all variants with DDR controller are supported,
82which is the VF5xx and VF6xx series. Out of historical reasons, in most 82which is the VF5xx and VF6xx series. Out of historical reasons, in most
83places the kernel uses vf610 to refer to the whole familiy. 83places the kernel uses vf610 to refer to the whole familiy.
84The compatible string "fsl,vf610m4" is used for the secondary Cortex-M4
85core support.
84 86
85Required root node compatible property (one of them): 87Required root node compatible property (one of them):
86 - compatible = "fsl,vf500"; 88 - compatible = "fsl,vf500";
87 - compatible = "fsl,vf510"; 89 - compatible = "fsl,vf510";
88 - compatible = "fsl,vf600"; 90 - compatible = "fsl,vf600";
89 - compatible = "fsl,vf610"; 91 - compatible = "fsl,vf610";
92 - compatible = "fsl,vf610m4";
90 93
91Freescale LS1021A Platform Device Tree Bindings 94Freescale LS1021A Platform Device Tree Bindings
92------------------------------------------------ 95------------------------------------------------
diff --git a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
index 35b1bd49cfa1..c431c67524d6 100644
--- a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
+++ b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
@@ -1,5 +1,8 @@
1Hisilicon Platforms Device Tree Bindings 1Hisilicon Platforms Device Tree Bindings
2---------------------------------------------------- 2----------------------------------------------------
3Hi6220 SoC
4Required root node properties:
5 - compatible = "hisilicon,hi6220";
3 6
4Hi4511 Board 7Hi4511 Board
5Required root node properties: 8Required root node properties:
@@ -13,6 +16,9 @@ HiP01 ca9x2 Board
13Required root node properties: 16Required root node properties:
14 - compatible = "hisilicon,hip01-ca9x2"; 17 - compatible = "hisilicon,hip01-ca9x2";
15 18
19HiKey Board
20Required root node properties:
21 - compatible = "hisilicon,hi6220-hikey", "hisilicon,hi6220";
16 22
17Hisilicon system controller 23Hisilicon system controller
18 24
@@ -41,6 +47,87 @@ Example:
41 }; 47 };
42 48
43----------------------------------------------------------------------- 49-----------------------------------------------------------------------
50Hisilicon Hi6220 system controller
51
52Required properties:
53- compatible : "hisilicon,hi6220-sysctrl"
54- reg : Register address and size
55- #clock-cells: should be set to 1, many clock registers are defined
56 under this controller and this property must be present.
57
58Hisilicon designs this controller as one of the system controllers,
59its main functions are the same as Hisilicon system controller, but
60the register offset of some core modules are different.
61
62Example:
63 /*for Hi6220*/
64 sys_ctrl: sys_ctrl@f7030000 {
65 compatible = "hisilicon,hi6220-sysctrl", "syscon";
66 reg = <0x0 0xf7030000 0x0 0x2000>;
67 #clock-cells = <1>;
68 };
69
70
71Hisilicon Hi6220 Power Always ON domain controller
72
73Required properties:
74- compatible : "hisilicon,hi6220-aoctrl"
75- reg : Register address and size
76- #clock-cells: should be set to 1, many clock registers are defined
77 under this controller and this property must be present.
78
79Hisilicon designs this system controller to control the power always
80on domain for mobile platform.
81
82Example:
83 /*for Hi6220*/
84 ao_ctrl: ao_ctrl@f7800000 {
85 compatible = "hisilicon,hi6220-aoctrl", "syscon";
86 reg = <0x0 0xf7800000 0x0 0x2000>;
87 #clock-cells = <1>;
88 };
89
90
91Hisilicon Hi6220 Media domain controller
92
93Required properties:
94- compatible : "hisilicon,hi6220-mediactrl"
95- reg : Register address and size
96- #clock-cells: should be set to 1, many clock registers are defined
97 under this controller and this property must be present.
98
99Hisilicon designs this system controller to control the multimedia
100domain(e.g. codec, G3D ...) for mobile platform.
101
102Example:
103 /*for Hi6220*/
104 media_ctrl: media_ctrl@f4410000 {
105 compatible = "hisilicon,hi6220-mediactrl", "syscon";
106 reg = <0x0 0xf4410000 0x0 0x1000>;
107 #clock-cells = <1>;
108 };
109
110
111Hisilicon Hi6220 Power Management domain controller
112
113Required properties:
114- compatible : "hisilicon,hi6220-pmctrl"
115- reg : Register address and size
116- #clock-cells: should be set to 1, some clock registers are define
117 under this controller and this property must be present.
118
119Hisilicon designs this system controller to control the power management
120domain for mobile platform.
121
122Example:
123 /*for Hi6220*/
124 pm_ctrl: pm_ctrl@f7032000 {
125 compatible = "hisilicon,hi6220-pmctrl", "syscon";
126 reg = <0x0 0xf7032000 0x0 0x1000>;
127 #clock-cells = <1>;
128 };
129
130-----------------------------------------------------------------------
44Hisilicon HiP01 system controller 131Hisilicon HiP01 system controller
45 132
46Required properties: 133Required properties:
diff --git a/Documentation/devicetree/bindings/arm/l2cc.txt b/Documentation/devicetree/bindings/arm/l2cc.txt
index 0dbabe9a6b0a..2251dccb141e 100644
--- a/Documentation/devicetree/bindings/arm/l2cc.txt
+++ b/Documentation/devicetree/bindings/arm/l2cc.txt
@@ -67,6 +67,11 @@ Optional properties:
67 disable if zero. 67 disable if zero.
68- arm,prefetch-offset : Override prefetch offset value. Valid values are 68- arm,prefetch-offset : Override prefetch offset value. Valid values are
69 0-7, 15, 23, and 31. 69 0-7, 15, 23, and 31.
70- prefetch-data : Data prefetch. Value: <0> (forcibly disable), <1>
71 (forcibly enable), property absent (retain settings set by firmware)
72- prefetch-instr : Instruction prefetch. Value: <0> (forcibly disable),
73 <1> (forcibly enable), property absent (retain settings set by
74 firmware)
70 75
71Example: 76Example:
72 77
diff --git a/Documentation/devicetree/bindings/arm/marvell,berlin.txt b/Documentation/devicetree/bindings/arm/marvell,berlin.txt
index a99eb9eb14c0..3bab18409b7a 100644
--- a/Documentation/devicetree/bindings/arm/marvell,berlin.txt
+++ b/Documentation/devicetree/bindings/arm/marvell,berlin.txt
@@ -1,6 +1,18 @@
1Marvell Berlin SoC Family Device Tree Bindings 1Marvell Berlin SoC Family Device Tree Bindings
2--------------------------------------------------------------- 2---------------------------------------------------------------
3 3
4Work in progress statement:
5
6Device tree files and bindings applying to Marvell Berlin SoCs and boards are
7considered "unstable". Any Marvell Berlin device tree binding may change at any
8time. Be sure to use a device tree binary and a kernel image generated from the
9same source tree.
10
11Please refer to Documentation/devicetree/bindings/ABI.txt for a definition of a
12stable binding/ABI.
13
14---------------------------------------------------------------
15
4Boards with a SoC of the Marvell Berlin family, e.g. Armada 1500 16Boards with a SoC of the Marvell Berlin family, e.g. Armada 1500
5shall have the following properties: 17shall have the following properties:
6 18
@@ -49,10 +61,9 @@ chip control registers, so there should be a single DT node only providing the
49different functions which are described below. 61different functions which are described below.
50 62
51Required properties: 63Required properties:
52- compatible: shall be one of 64- compatible:
53 "marvell,berlin2-chip-ctrl" for BG2 65 * the first and second values must be:
54 "marvell,berlin2cd-chip-ctrl" for BG2CD 66 "simple-mfd", "syscon"
55 "marvell,berlin2q-chip-ctrl" for BG2Q
56- reg: address and length of following register sets for 67- reg: address and length of following register sets for
57 BG2/BG2CD: chip control register set 68 BG2/BG2CD: chip control register set
58 BG2Q: chip control register set and cpu pll registers 69 BG2Q: chip control register set and cpu pll registers
@@ -63,90 +74,23 @@ Marvell Berlin SoCs have a system control register set providing several
63individual registers dealing with pinmux, padmux, and reset. 74individual registers dealing with pinmux, padmux, and reset.
64 75
65Required properties: 76Required properties:
66- compatible: should be one of 77- compatible:
67 "marvell,berlin2-system-ctrl" for BG2 78 * the first and second values must be:
68 "marvell,berlin2cd-system-ctrl" for BG2CD 79 "simple-mfd", "syscon"
69 "marvell,berlin2q-system-ctrl" for BG2Q
70- reg: address and length of the system control register set 80- reg: address and length of the system control register set
71 81
72* Clock provider binding
73
74As clock related registers are spread among the chip control registers, the
75chip control node also provides the clocks. Marvell Berlin2 (BG2, BG2CD, BG2Q)
76SoCs share the same IP for PLLs and clocks, with some minor differences in
77features and register layout.
78
79Required properties:
80- #clock-cells: shall be set to 1
81- clocks: clock specifiers referencing the core clock input clocks
82- clock-names: array of strings describing the input clock specifiers above.
83 Allowed clock-names for the reference clocks are
84 "refclk" for the SoCs osciallator input on all SoCs,
85 and SoC-specific input clocks for
86 BG2/BG2CD: "video_ext0" for the external video clock input
87
88Clocks provided by core clocks shall be referenced by a clock specifier
89indexing one of the provided clocks. Refer to dt-bindings/clock/berlin<soc>.h
90for the corresponding index mapping.
91
92* Pin controller binding
93
94Pin control registers are part of both register sets, chip control and system
95control. The pins controlled are organized in groups, so no actual pin
96information is needed.
97
98A pin-controller node should contain subnodes representing the pin group
99configurations, one per function. Each subnode has the group name and the muxing
100function used.
101
102Be aware the Marvell Berlin datasheets use the keyword 'mode' for what is called
103a 'function' in the pin-controller subsystem.
104
105Required subnode-properties:
106- groups: a list of strings describing the group names.
107- function: a string describing the function used to mux the groups.
108
109* Reset controller binding
110
111A reset controller is part of the chip control registers set. The chip control
112node also provides the reset. The register set is not at the same offset between
113Berlin SoCs.
114
115Required property:
116- #reset-cells: must be set to 2
117
118Example: 82Example:
119 83
120chip: chip-control@ea0000 { 84chip: chip-control@ea0000 {
121 compatible = "marvell,berlin2-chip-ctrl"; 85 compatible = "simple-mfd", "syscon";
122 #clock-cells = <1>;
123 #reset-cells = <2>;
124 reg = <0xea0000 0x400>; 86 reg = <0xea0000 0x400>;
125 clocks = <&refclk>, <&externaldev 0>;
126 clock-names = "refclk", "video_ext0";
127 87
128 spi1_pmux: spi1-pmux { 88 /* sub-device nodes */
129 groups = "G0";
130 function = "spi1";
131 };
132}; 89};
133 90
134sysctrl: system-controller@d000 { 91sysctrl: system-controller@d000 {
135 compatible = "marvell,berlin2-system-ctrl"; 92 compatible = "simple-mfd", "syscon";
136 reg = <0xd000 0x100>; 93 reg = <0xd000 0x100>;
137 94
138 uart0_pmux: uart0-pmux { 95 /* sub-device nodes */
139 groups = "GSM4";
140 function = "uart0";
141 };
142
143 uart1_pmux: uart1-pmux {
144 groups = "GSM5";
145 function = "uart1";
146 };
147
148 uart2_pmux: uart2-pmux {
149 groups = "GSM3";
150 function = "uart2";
151 };
152}; 96};
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
new file mode 100644
index 000000000000..936166fbee09
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,apmixedsys.txt
@@ -0,0 +1,23 @@
1Mediatek apmixedsys controller
2==============================
3
4The Mediatek apmixedsys controller provides the PLLs to the system.
5
6Required Properties:
7
8- compatible: Should be:
9 - "mediatek,mt8135-apmixedsys"
10 - "mediatek,mt8173-apmixedsys"
11- #clock-cells: Must be 1
12
13The apmixedsys controller uses the common clk binding from
14Documentation/devicetree/bindings/clock/clock-bindings.txt
15The available clocks are defined in dt-bindings/clock/mt*-clk.h.
16
17Example:
18
19apmixedsys: clock-controller@10209000 {
20 compatible = "mediatek,mt8173-apmixedsys";
21 reg = <0 0x10209000 0 0x1000>;
22 #clock-cells = <1>;
23};
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
new file mode 100644
index 000000000000..f6cd3e4192ff
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.txt
@@ -0,0 +1,30 @@
1Mediatek infracfg controller
2============================
3
4The Mediatek infracfg controller provides various clocks and reset
5outputs to the system.
6
7Required Properties:
8
9- compatible: Should be:
10 - "mediatek,mt8135-infracfg", "syscon"
11 - "mediatek,mt8173-infracfg", "syscon"
12- #clock-cells: Must be 1
13- #reset-cells: Must be 1
14
15The infracfg controller uses the common clk binding from
16Documentation/devicetree/bindings/clock/clock-bindings.txt
17The available clocks are defined in dt-bindings/clock/mt*-clk.h.
18Also it uses the common reset controller binding from
19Documentation/devicetree/bindings/reset/reset.txt.
20The available reset outputs are defined in
21dt-bindings/reset-controller/mt*-resets.h
22
23Example:
24
25infracfg: power-controller@10001000 {
26 compatible = "mediatek,mt8173-infracfg", "syscon";
27 reg = <0 0x10001000 0 0x1000>;
28 #clock-cells = <1>;
29 #reset-cells = <1>;
30};
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
new file mode 100644
index 000000000000..f25b85499a6f
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,pericfg.txt
@@ -0,0 +1,30 @@
1Mediatek pericfg controller
2===========================
3
4The Mediatek pericfg controller provides various clocks and reset
5outputs to the system.
6
7Required Properties:
8
9- compatible: Should be:
10 - "mediatek,mt8135-pericfg", "syscon"
11 - "mediatek,mt8173-pericfg", "syscon"
12- #clock-cells: Must be 1
13- #reset-cells: Must be 1
14
15The pericfg controller uses the common clk binding from
16Documentation/devicetree/bindings/clock/clock-bindings.txt
17The available clocks are defined in dt-bindings/clock/mt*-clk.h.
18Also it uses the common reset controller binding from
19Documentation/devicetree/bindings/reset/reset.txt.
20The available reset outputs are defined in
21dt-bindings/reset-controller/mt*-resets.h
22
23Example:
24
25pericfg: power-controller@10003000 {
26 compatible = "mediatek,mt8173-pericfg", "syscon";
27 reg = <0 0x10003000 0 0x1000>;
28 #clock-cells = <1>;
29 #reset-cells = <1>;
30};
diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
new file mode 100644
index 000000000000..f9e917994ced
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,topckgen.txt
@@ -0,0 +1,23 @@
1Mediatek topckgen controller
2============================
3
4The Mediatek topckgen controller provides various clocks to the system.
5
6Required Properties:
7
8- compatible: Should be:
9 - "mediatek,mt8135-topckgen"
10 - "mediatek,mt8173-topckgen"
11- #clock-cells: Must be 1
12
13The topckgen controller uses the common clk binding from
14Documentation/devicetree/bindings/clock/clock-bindings.txt
15The available clocks are defined in dt-bindings/clock/mt*-clk.h.
16
17Example:
18
19topckgen: power-controller@10000000 {
20 compatible = "mediatek,mt8173-topckgen";
21 reg = <0 0x10000000 0 0x1000>;
22 #clock-cells = <1>;
23};
diff --git a/Documentation/devicetree/bindings/arm/omap/l3-noc.txt b/Documentation/devicetree/bindings/arm/omap/l3-noc.txt
index 974624ea68f6..161448da959d 100644
--- a/Documentation/devicetree/bindings/arm/omap/l3-noc.txt
+++ b/Documentation/devicetree/bindings/arm/omap/l3-noc.txt
@@ -6,6 +6,7 @@ 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,omap5-l3-noc" for OMAP5 family
9 Should be "ti,dra7-l3-noc" for DRA7 family 10 Should be "ti,dra7-l3-noc" for DRA7 family
10 Should be "ti,am4372-l3-noc" for AM43 family 11 Should be "ti,am4372-l3-noc" for AM43 family
11- reg: Contains L3 register address range for each noc domain. 12- reg: Contains L3 register address range for each noc domain.
diff --git a/Documentation/devicetree/bindings/arm/scu.txt b/Documentation/devicetree/bindings/arm/scu.txt
new file mode 100644
index 000000000000..c447680519bb
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/scu.txt
@@ -0,0 +1,25 @@
1* ARM Snoop Control Unit (SCU)
2
3As part of the MPCore complex, Cortex-A5 and Cortex-A9 are provided
4with a Snoop Control Unit. The register range is usually 256 (0x100)
5bytes.
6
7References:
8
9- Cortex-A9: see DDI0407E Cortex-A9 MPCore Technical Reference Manual
10 Revision r2p0
11- Cortex-A5: see DDI0434B Cortex-A5 MPCore Technical Reference Manual
12 Revision r0p1
13
14- compatible : Should be:
15 "arm,cortex-a9-scu"
16 "arm,cortex-a5-scu"
17
18- reg : Specify the base address and the size of the SCU register window.
19
20Example:
21
22scu@a04100000 {
23 compatible = "arm,cortex-a9-scu";
24 reg = <0xa0410000 0x100>;
25};
diff --git a/Documentation/devicetree/bindings/arm/ux500/boards.txt b/Documentation/devicetree/bindings/arm/ux500/boards.txt
new file mode 100644
index 000000000000..b8737a8de718
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/ux500/boards.txt
@@ -0,0 +1,83 @@
1ST-Ericsson Ux500 boards
2------------------------
3
4Required properties (in root node) one of these:
5 compatible = "st-ericsson,mop500" (legacy)
6 compatible = "st-ericsson,u8500"
7
8Required node (under root node):
9
10soc: represents the system-on-chip and contains the chip
11peripherals
12
13Required property of soc node, one of these:
14 compatible = "stericsson,db8500"
15
16Required subnodes under soc node:
17
18backupram: (used for CPU spin tables and for storing data
19during retention, system won't boot without this):
20 compatible = "ste,dbx500-backupram"
21
22scu:
23 see binding for arm/scu.txt
24
25interrupt-controller:
26 see binding for arm/gic.txt
27
28timer:
29 see binding for arm/twd.txt
30
31clocks:
32 see binding for clocks/ux500.txt
33
34Example:
35
36/dts-v1/;
37
38/ {
39 model = "ST-Ericsson HREF (pre-v60) and ST UIB";
40 compatible = "st-ericsson,mop500", "st-ericsson,u8500";
41
42 soc {
43 #address-cells = <1>;
44 #size-cells = <1>;
45 compatible = "stericsson,db8500";
46 interrupt-parent = <&intc>;
47 ranges;
48
49 backupram@80150000 {
50 compatible = "ste,dbx500-backupram";
51 reg = <0x80150000 0x2000>;
52 };
53
54 intc: interrupt-controller@a0411000 {
55 compatible = "arm,cortex-a9-gic";
56 #interrupt-cells = <3>;
57 #address-cells = <1>;
58 interrupt-controller;
59 reg = <0xa0411000 0x1000>,
60 <0xa0410100 0x100>;
61 };
62
63 scu@a04100000 {
64 compatible = "arm,cortex-a9-scu";
65 reg = <0xa0410000 0x100>;
66 };
67
68 timer@a0410600 {
69 compatible = "arm,cortex-a9-twd-timer";
70 reg = <0xa0410600 0x20>;
71 interrupts = <1 13 0x304>; /* IRQ level high per-CPU */
72 clocks = <&smp_twd_clk>;
73 };
74
75 clocks {
76 compatible = "stericsson,u8500-clks";
77
78 smp_twd_clk: smp-twd-clock {
79 #clock-cells = <0>;
80 };
81 };
82 };
83};
diff --git a/Documentation/devicetree/bindings/arm/zte.txt b/Documentation/devicetree/bindings/arm/zte.txt
new file mode 100644
index 000000000000..3ff5c9e85c1c
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/zte.txt
@@ -0,0 +1,15 @@
1ZTE platforms device tree bindings
2---------------------------------------
3
4- ZX296702 board:
5 Required root node properties:
6 - compatible = "zte,zx296702-ad1", "zte,zx296702"
7
8System management required properties:
9 - compatible = "zte,sysctrl"
10
11Low power management required properties:
12 - compatible = "zte,zx296702-pcu"
13
14Bus matrix required properties:
15 - compatible = "zte,zx-bus-matrix"
diff --git a/Documentation/devicetree/bindings/ata/ahci-ceva.txt b/Documentation/devicetree/bindings/ata/ahci-ceva.txt
new file mode 100644
index 000000000000..7ca8b976c13a
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/ahci-ceva.txt
@@ -0,0 +1,20 @@
1Binding for CEVA AHCI SATA Controller
2
3Required properties:
4 - reg: Physical base address and size of the controller's register area.
5 - compatible: Compatibility string. Must be 'ceva,ahci-1v84'.
6 - clocks: Input clock specifier. Refer to common clock bindings.
7 - interrupts: Interrupt specifier. Refer to interrupt binding.
8
9Optional properties:
10 - ceva,broken-gen2: limit to gen1 speed instead of gen2.
11
12Examples:
13 ahci@fd0c0000 {
14 compatible = "ceva,ahci-1v84";
15 reg = <0xfd0c0000 0x200>;
16 interrupt-parent = <&gic>;
17 interrupts = <0 133 4>;
18 clocks = <&clkc SATA_CLK_ID>;
19 ceva,broken-gen2;
20 };
diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt
index c2340eeeb97f..a2321819e7f5 100644
--- a/Documentation/devicetree/bindings/ata/ahci-platform.txt
+++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt
@@ -16,6 +16,8 @@ Required properties:
16 - "snps,dwc-ahci" 16 - "snps,dwc-ahci"
17 - "snps,exynos5440-ahci" 17 - "snps,exynos5440-ahci"
18 - "snps,spear-ahci" 18 - "snps,spear-ahci"
19 - "fsl,qoriq-ahci" : for qoriq series socs which include ls1021, ls2085, etc.
20 - "fsl,<chip>-ahci" : chip could be ls1021, ls2085 etc.
19 - "generic-ahci" 21 - "generic-ahci"
20- interrupts : <interrupt mapping for SATA IRQ> 22- interrupts : <interrupt mapping for SATA IRQ>
21- reg : <registers mapping> 23- reg : <registers mapping>
diff --git a/Documentation/devicetree/bindings/ata/brcm,sata-brcmstb.txt b/Documentation/devicetree/bindings/ata/brcm,sata-brcmstb.txt
new file mode 100644
index 000000000000..20ac9bbfa1fd
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/brcm,sata-brcmstb.txt
@@ -0,0 +1,34 @@
1* Broadcom SATA3 AHCI Controller for STB
2
3SATA nodes are defined to describe on-chip Serial ATA controllers.
4Each SATA controller should have its own node.
5
6Required properties:
7- compatible : compatible list, may contain "brcm,bcm7445-ahci" and/or
8 "brcm,sata3-ahci"
9- reg : register mappings for AHCI and SATA_TOP_CTRL
10- reg-names : "ahci" and "top-ctrl"
11- interrupts : interrupt mapping for SATA IRQ
12
13Also see ahci-platform.txt.
14
15Example:
16
17 sata@f045a000 {
18 compatible = "brcm,bcm7445-ahci", "brcm,sata3-ahci";
19 reg = <0xf045a000 0xa9c>, <0xf0458040 0x24>;
20 reg-names = "ahci", "top-ctrl";
21 interrupts = <0 30 0>;
22 #address-cells = <1>;
23 #size-cells = <0>;
24
25 sata0: sata-port@0 {
26 reg = <0>;
27 phys = <&sata_phy 0>;
28 };
29
30 sata1: sata-port@1 {
31 reg = <1>;
32 phys = <&sata_phy 1>;
33 };
34 };
diff --git a/Documentation/devicetree/bindings/clock/amlogic,meson8b-clkc.txt b/Documentation/devicetree/bindings/clock/amlogic,meson8b-clkc.txt
new file mode 100644
index 000000000000..2b7b3fa588d7
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/amlogic,meson8b-clkc.txt
@@ -0,0 +1,40 @@
1* Amlogic Meson8b Clock and Reset Unit
2
3The Amlogic Meson8b clock controller generates and supplies clock to various
4controllers within the SoC.
5
6Required Properties:
7
8- compatible: should be "amlogic,meson8b-clkc"
9- reg: it must be composed by two tuples:
10 0) physical base address of the xtal register and length of memory
11 mapped region.
12 1) physical base address of the clock controller and length of memory
13 mapped region.
14
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. All available clocks are defined as
19preprocessor macros in the dt-bindings/clock/meson8b-clkc.h header and can be
20used in device tree sources.
21
22Example: Clock controller node:
23
24 clkc: clock-controller@c1104000 {
25 #clock-cells = <1>;
26 compatible = "amlogic,meson8b-clkc";
27 reg = <0xc1108000 0x4>, <0xc1104000 0x460>;
28 };
29
30
31Example: UART controller node that consumes the clock generated by the clock
32 controller:
33
34 uart_AO: serial@c81004c0 {
35 compatible = "amlogic,meson-uart";
36 reg = <0xc81004c0 0x14>;
37 interrupts = <0 90 1>;
38 clocks = <&clkc CLKID_CLK81>;
39 status = "disabled";
40 };
diff --git a/Documentation/devicetree/bindings/clock/at91-clock.txt b/Documentation/devicetree/bindings/clock/at91-clock.txt
index 7a4d4926f44e..5ba6450693b9 100644
--- a/Documentation/devicetree/bindings/clock/at91-clock.txt
+++ b/Documentation/devicetree/bindings/clock/at91-clock.txt
@@ -248,7 +248,7 @@ Required properties for peripheral clocks:
248- #address-cells : shall be 1 (reg is used to encode clk id). 248- #address-cells : shall be 1 (reg is used to encode clk id).
249- clocks : shall be the master clock phandle. 249- clocks : shall be the master clock phandle.
250 e.g. clocks = <&mck>; 250 e.g. clocks = <&mck>;
251- name: device tree node describing a specific system clock. 251- name: device tree node describing a specific peripheral clock.
252 * #clock-cells : from common clock binding; shall be set to 0. 252 * #clock-cells : from common clock binding; shall be set to 0.
253 * reg: peripheral id. See Atmel's datasheets to get a full 253 * reg: peripheral id. See Atmel's datasheets to get a full
254 list of peripheral ids. 254 list of peripheral ids.
diff --git a/Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt b/Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt
deleted file mode 100644
index 00d26edec8bc..000000000000
--- a/Documentation/devicetree/bindings/clock/bcm-cygnus-clock.txt
+++ /dev/null
@@ -1,34 +0,0 @@
1Broadcom Cygnus Clocks
2
3This binding uses the common clock binding:
4Documentation/devicetree/bindings/clock/clock-bindings.txt
5
6Currently various "fixed" clocks are declared for peripheral drivers that use
7the common clock framework to reference their core clocks. Proper support of
8these clocks will be added later
9
10Device tree example:
11
12 clocks {
13 #address-cells = <1>;
14 #size-cells = <1>;
15 ranges;
16
17 osc: oscillator {
18 compatible = "fixed-clock";
19 #clock-cells = <1>;
20 clock-frequency = <25000000>;
21 };
22
23 apb_clk: apb_clk {
24 compatible = "fixed-clock";
25 #clock-cells = <0>;
26 clock-frequency = <1000000000>;
27 };
28
29 periph_clk: periph_clk {
30 compatible = "fixed-clock";
31 #clock-cells = <0>;
32 clock-frequency = <500000000>;
33 };
34 };
diff --git a/Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt b/Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt
new file mode 100644
index 000000000000..da8d9bb5751c
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/brcm,iproc-clocks.txt
@@ -0,0 +1,132 @@
1Broadcom iProc Family Clocks
2
3This binding uses the common clock binding:
4 Documentation/devicetree/bindings/clock/clock-bindings.txt
5
6The iProc clock controller manages clocks that are common to the iProc family.
7An SoC from the iProc family may have several PPLs, e.g., ARMPLL, GENPLL,
8LCPLL0, MIPIPLL, and etc., all derived from an onboard crystal. Each PLL
9comprises of several leaf clocks
10
11Required properties for a PLL and its leaf clocks:
12
13- compatible:
14 Should have a value of the form "brcm,<soc>-<pll>". For example, GENPLL on
15Cygnus has a compatible string of "brcm,cygnus-genpll"
16
17- #clock-cells:
18 Have a value of <1> since there are more than 1 leaf clock of a given PLL
19
20- reg:
21 Define the base and range of the I/O address space that contain the iProc
22clock control registers required for the PLL
23
24- clocks:
25 The input parent clock phandle for the PLL. For most iProc PLLs, this is an
26onboard crystal with a fixed rate
27
28- clock-output-names:
29 An ordered list of strings defining the names of the clocks
30
31Example:
32
33 osc: oscillator {
34 #clock-cells = <0>;
35 compatible = "fixed-clock";
36 clock-frequency = <25000000>;
37 };
38
39 genpll: genpll {
40 #clock-cells = <1>;
41 compatible = "brcm,cygnus-genpll";
42 reg = <0x0301d000 0x2c>, <0x0301c020 0x4>;
43 clocks = <&osc>;
44 clock-output-names = "genpll", "axi21", "250mhz", "ihost_sys",
45 "enet_sw", "audio_125", "can";
46 };
47
48Required properties for ASIU clocks:
49
50ASIU clocks are a special case. These clocks are derived directly from the
51reference clock of the onboard crystal
52
53- compatible:
54 Should have a value of the form "brcm,<soc>-asiu-clk". For example, ASIU
55clocks for Cygnus have a compatible string of "brcm,cygnus-asiu-clk"
56
57- #clock-cells:
58 Have a value of <1> since there are more than 1 ASIU clocks
59
60- reg:
61 Define the base and range of the I/O address space that contain the iProc
62clock control registers required for ASIU clocks
63
64- clocks:
65 The input parent clock phandle for the ASIU clock, i.e., the onboard
66crystal
67
68- clock-output-names:
69 An ordered list of strings defining the names of the ASIU clocks
70
71Example:
72
73 osc: oscillator {
74 #clock-cells = <0>;
75 compatible = "fixed-clock";
76 clock-frequency = <25000000>;
77 };
78
79 asiu_clks: asiu_clks {
80 #clock-cells = <1>;
81 compatible = "brcm,cygnus-asiu-clk";
82 reg = <0x0301d048 0xc>, <0x180aa024 0x4>;
83 clocks = <&osc>;
84 clock-output-names = "keypad", "adc/touch", "pwm";
85 };
86
87Cygnus
88------
89PLL and leaf clock compatible strings for Cygnus are:
90 "brcm,cygnus-armpll"
91 "brcm,cygnus-genpll"
92 "brcm,cygnus-lcpll0"
93 "brcm,cygnus-mipipll"
94 "brcm,cygnus-asiu-clk"
95
96The following table defines the set of PLL/clock index and ID for Cygnus.
97These clock IDs are defined in:
98 "include/dt-bindings/clock/bcm-cygnus.h"
99
100 Clock Source (Parent) Index ID
101 --- ----- ----- ---------
102 crystal N/A N/A N/A
103
104 armpll crystal N/A N/A
105
106 keypad crystal (ASIU) 0 BCM_CYGNUS_ASIU_KEYPAD_CLK
107 adc/tsc crystal (ASIU) 1 BCM_CYGNUS_ASIU_ADC_CLK
108 pwm crystal (ASIU) 2 BCM_CYGNUS_ASIU_PWM_CLK
109
110 genpll crystal 0 BCM_CYGNUS_GENPLL
111 axi21 genpll 1 BCM_CYGNUS_GENPLL_AXI21_CLK
112 250mhz genpll 2 BCM_CYGNUS_GENPLL_250MHZ_CLK
113 ihost_sys genpll 3 BCM_CYGNUS_GENPLL_IHOST_SYS_CLK
114 enet_sw genpll 4 BCM_CYGNUS_GENPLL_ENET_SW_CLK
115 audio_125 genpll 5 BCM_CYGNUS_GENPLL_AUDIO_125_CLK
116 can genpll 6 BCM_CYGNUS_GENPLL_CAN_CLK
117
118 lcpll0 crystal 0 BCM_CYGNUS_LCPLL0
119 pcie_phy lcpll0 1 BCM_CYGNUS_LCPLL0_PCIE_PHY_REF_CLK
120 ddr_phy lcpll0 2 BCM_CYGNUS_LCPLL0_DDR_PHY_CLK
121 sdio lcpll0 3 BCM_CYGNUS_LCPLL0_SDIO_CLK
122 usb_phy lcpll0 4 BCM_CYGNUS_LCPLL0_USB_PHY_REF_CLK
123 smart_card lcpll0 5 BCM_CYGNUS_LCPLL0_SMART_CARD_CLK
124 ch5_unused lcpll0 6 BCM_CYGNUS_LCPLL0_CH5_UNUSED
125
126 mipipll crystal 0 BCM_CYGNUS_MIPIPLL
127 ch0_unused mipipll 1 BCM_CYGNUS_MIPIPLL_CH0_UNUSED
128 ch1_lcd mipipll 2 BCM_CYGNUS_MIPIPLL_CH1_LCD
129 ch2_v3d mipipll 3 BCM_CYGNUS_MIPIPLL_CH2_V3D
130 ch3_unused mipipll 4 BCM_CYGNUS_MIPIPLL_CH3_UNUSED
131 ch4_unused mipipll 5 BCM_CYGNUS_MIPIPLL_CH4_UNUSED
132 ch5_unused mipipll 6 BCM_CYGNUS_MIPIPLL_CH5_UNUSED
diff --git a/Documentation/devicetree/bindings/clock/clock-bindings.txt b/Documentation/devicetree/bindings/clock/clock-bindings.txt
index 06fc6d541c89..2ec489eebe72 100644
--- a/Documentation/devicetree/bindings/clock/clock-bindings.txt
+++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt
@@ -138,9 +138,10 @@ Some platforms may require initial configuration of default parent clocks
138and clock frequencies. Such a configuration can be specified in a device tree 138and clock frequencies. Such a configuration can be specified in a device tree
139node through assigned-clocks, assigned-clock-parents and assigned-clock-rates 139node through assigned-clocks, assigned-clock-parents and assigned-clock-rates
140properties. The assigned-clock-parents property should contain a list of parent 140properties. The assigned-clock-parents property should contain a list of parent
141clocks in form of phandle and clock specifier pairs, the assigned-clock-parents 141clocks in the form of a phandle and clock specifier pair and the
142property the list of assigned clock frequency values - corresponding to clocks 142assigned-clock-rates property should contain a list of frequencies in Hz. Both
143listed in the assigned-clocks property. 143these properties should correspond to the clocks listed in the assigned-clocks
144property.
144 145
145To skip setting parent or rate of a clock its corresponding entry should be 146To skip setting parent or rate of a clock its corresponding entry should be
146set to 0, or can be omitted if it is not followed by any non-zero entry. 147set to 0, or can be omitted if it is not followed by any non-zero entry.
diff --git a/Documentation/devicetree/bindings/clock/csr,atlas7-car.txt b/Documentation/devicetree/bindings/clock/csr,atlas7-car.txt
new file mode 100644
index 000000000000..54d6d1358339
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/csr,atlas7-car.txt
@@ -0,0 +1,55 @@
1* Clock and reset bindings for CSR atlas7
2
3Required properties:
4- compatible: Should be "sirf,atlas7-car"
5- reg: Address and length of the register set
6- #clock-cells: Should be <1>
7- #reset-cells: Should be <1>
8
9The clock consumer should specify the desired clock by having the clock
10ID in its "clocks" phandle cell.
11The ID list atlas7_clks defined in drivers/clk/sirf/clk-atlas7.c
12
13The reset consumer should specify the desired reset by having the reset
14ID in its "reset" phandle cell.
15The ID list atlas7_reset_unit defined in drivers/clk/sirf/clk-atlas7.c
16
17Examples: Clock and reset controller node:
18
19car: clock-controller@18620000 {
20 compatible = "sirf,atlas7-car";
21 reg = <0x18620000 0x1000>;
22 #clock-cells = <1>;
23 #reset-cells = <1>;
24};
25
26Examples: Consumers using clock or reset:
27
28timer@10dc0000 {
29 compatible = "sirf,macro-tick";
30 reg = <0x10dc0000 0x1000>;
31 clocks = <&car 54>;
32 interrupts = <0 0 0>,
33 <0 1 0>,
34 <0 2 0>,
35 <0 49 0>,
36 <0 50 0>,
37 <0 51 0>;
38};
39
40uart1: uart@18020000 {
41 cell-index = <1>;
42 compatible = "sirf,macro-uart";
43 reg = <0x18020000 0x1000>;
44 clocks = <&clks 95>;
45 interrupts = <0 18 0>;
46 fifosize = <32>;
47};
48
49vpp@13110000 {
50 compatible = "sirf,prima2-vpp";
51 reg = <0x13110000 0x10000>;
52 interrupts = <0 31 0>;
53 clocks = <&car 85>;
54 resets = <&car 29>;
55};
diff --git a/Documentation/devicetree/bindings/clock/emev2-clock.txt b/Documentation/devicetree/bindings/clock/emev2-clock.txt
index 60bbb1a8c69a..268ca615459e 100644
--- a/Documentation/devicetree/bindings/clock/emev2-clock.txt
+++ b/Documentation/devicetree/bindings/clock/emev2-clock.txt
@@ -52,7 +52,7 @@ usia_u0_sclk: usia_u0_sclk {
52 52
53Example of consumer: 53Example of consumer:
54 54
55uart@e1020000 { 55serial@e1020000 {
56 compatible = "renesas,em-uart"; 56 compatible = "renesas,em-uart";
57 reg = <0xe1020000 0x38>; 57 reg = <0xe1020000 0x38>;
58 interrupts = <0 8 0>; 58 interrupts = <0 8 0>;
diff --git a/Documentation/devicetree/bindings/clock/hi6220-clock.txt b/Documentation/devicetree/bindings/clock/hi6220-clock.txt
new file mode 100644
index 000000000000..259e30af9597
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/hi6220-clock.txt
@@ -0,0 +1,34 @@
1* Hisilicon Hi6220 Clock Controller
2
3Clock control registers reside in different Hi6220 system controllers,
4please refer the following document to know more about the binding rules
5for these system controllers:
6
7Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
8
9Required Properties:
10
11- compatible: the compatible should be one of the following strings to
12 indicate the clock controller functionality.
13
14 - "hisilicon,hi6220-aoctrl"
15 - "hisilicon,hi6220-sysctrl"
16 - "hisilicon,hi6220-mediactrl"
17 - "hisilicon,hi6220-pmctrl"
18
19- reg: physical base address of the controller and length of memory mapped
20 region.
21
22- #clock-cells: should be 1.
23
24For example:
25 sys_ctrl: sys_ctrl@f7030000 {
26 compatible = "hisilicon,hi6220-sysctrl", "syscon";
27 reg = <0x0 0xf7030000 0x0 0x2000>;
28 #clock-cells = <1>;
29 };
30
31Each clock is assigned an identifier and client nodes use this identifier
32to specify the clock which they consume.
33
34All these identifier could be found in <dt-bindings/clock/hi6220-clock.h>.
diff --git a/Documentation/devicetree/bindings/clock/imx7d-clock.txt b/Documentation/devicetree/bindings/clock/imx7d-clock.txt
new file mode 100644
index 000000000000..9d3026d81a68
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/imx7d-clock.txt
@@ -0,0 +1,13 @@
1* Clock bindings for Freescale i.MX7 Dual
2
3Required properties:
4- compatible: Should be "fsl,imx7d-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"
10
11The clock consumer should specify the desired clock by having the clock
12ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx7d-clock.h
13for the full list of i.MX7 Dual clock IDs.
diff --git a/Documentation/devicetree/bindings/clock/ingenic,cgu.txt b/Documentation/devicetree/bindings/clock/ingenic,cgu.txt
new file mode 100644
index 000000000000..f8d4134ae409
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/ingenic,cgu.txt
@@ -0,0 +1,53 @@
1Ingenic SoC CGU binding
2
3The CGU in an Ingenic SoC provides all the clocks generated on-chip. It
4typically includes a variety of PLLs, multiplexers, dividers & gates in order
5to provide many different clock signals derived from only 2 external source
6clocks.
7
8Required properties:
9- compatible : Should be "ingenic,<soctype>-cgu".
10 For example "ingenic,jz4740-cgu" or "ingenic,jz4780-cgu".
11- reg : The address & length of the CGU registers.
12- clocks : List of phandle & clock specifiers for clocks external to the CGU.
13 Two such external clocks should be specified - first the external crystal
14 "ext" and second the RTC clock source "rtc".
15- clock-names : List of name strings for the external clocks.
16- #clock-cells: Should be 1.
17 Clock consumers specify this argument to identify a clock. The valid values
18 may be found in <dt-bindings/clock/<soctype>-cgu.h>.
19
20Example SoC include file:
21
22/ {
23 cgu: jz4740-cgu {
24 compatible = "ingenic,jz4740-cgu";
25 reg = <0x10000000 0x100>;
26 #clock-cells = <1>;
27 };
28
29 uart0: serial@10030000 {
30 clocks = <&cgu JZ4740_CLK_UART0>;
31 };
32};
33
34Example board file:
35
36/ {
37 ext: clock@0 {
38 compatible = "fixed-clock";
39 #clock-cells = <0>;
40 clock-frequency = <12000000>;
41 };
42
43 rtc: clock@1 {
44 compatible = "fixed-clock";
45 #clock-cells = <0>;
46 clock-frequency = <32768>;
47 };
48
49 &cgu {
50 clocks = <&ext> <&rtc>;
51 clock-names: "ext", "rtc";
52 };
53};
diff --git a/Documentation/devicetree/bindings/clock/keystone-pll.txt b/Documentation/devicetree/bindings/clock/keystone-pll.txt
index 225990f79b7c..47570d207215 100644
--- a/Documentation/devicetree/bindings/clock/keystone-pll.txt
+++ b/Documentation/devicetree/bindings/clock/keystone-pll.txt
@@ -15,8 +15,8 @@ Required properties:
15- compatible : shall be "ti,keystone,main-pll-clock" or "ti,keystone,pll-clock" 15- compatible : shall be "ti,keystone,main-pll-clock" or "ti,keystone,pll-clock"
16- clocks : parent clock phandle 16- clocks : parent clock phandle
17- reg - pll control0 and pll multipler registers 17- reg - pll control0 and pll multipler registers
18- reg-names : control and multiplier. The multiplier is applicable only for 18- reg-names : control, multiplier and post-divider. The multiplier and
19 main pll clock 19 post-divider registers are applicable only for main pll clock
20- fixed-postdiv : fixed post divider value. If absent, use clkod register bits 20- fixed-postdiv : fixed post divider value. If absent, use clkod register bits
21 for postdiv 21 for postdiv
22 22
@@ -25,8 +25,8 @@ Example:
25 #clock-cells = <0>; 25 #clock-cells = <0>;
26 compatible = "ti,keystone,main-pll-clock"; 26 compatible = "ti,keystone,main-pll-clock";
27 clocks = <&refclksys>; 27 clocks = <&refclksys>;
28 reg = <0x02620350 4>, <0x02310110 4>; 28 reg = <0x02620350 4>, <0x02310110 4>, <0x02310108 4>;
29 reg-names = "control", "multiplier"; 29 reg-names = "control", "multiplier", "post-divider";
30 fixed-postdiv = <2>; 30 fixed-postdiv = <2>;
31 }; 31 };
32 32
diff --git a/Documentation/devicetree/bindings/clock/lpc1850-ccu.txt b/Documentation/devicetree/bindings/clock/lpc1850-ccu.txt
new file mode 100644
index 000000000000..fa97c12014ac
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/lpc1850-ccu.txt
@@ -0,0 +1,77 @@
1* NXP LPC1850 Clock Control Unit (CCU)
2
3Each CGU base clock has several clock branches which can be turned on
4or off independently by the Clock Control Units CCU1 or CCU2. The
5branch clocks are distributed between CCU1 and CCU2.
6
7 - Above text taken from NXP LPC1850 User Manual.
8
9This binding uses the common clock binding:
10 Documentation/devicetree/bindings/clock/clock-bindings.txt
11
12Required properties:
13- compatible:
14 Should be "nxp,lpc1850-ccu"
15- reg:
16 Shall define the base and range of the address space
17 containing clock control registers
18- #clock-cells:
19 Shall have value <1>. The permitted clock-specifier values
20 are the branch clock names defined in table below.
21- clocks:
22 Shall contain a list of phandles for the base clocks routed
23 from the CGU to the specific CCU. See mapping of base clocks
24 and CCU in table below.
25- clock-names:
26 Shall contain a list of names for the base clock routed
27 from the CGU to the specific CCU. Valid CCU clock names:
28 "base_usb0_clk", "base_periph_clk", "base_usb1_clk",
29 "base_cpu_clk", "base_spifi_clk", "base_spi_clk",
30 "base_apb1_clk", "base_apb3_clk", "base_adchs_clk",
31 "base_sdio_clk", "base_ssp0_clk", "base_ssp1_clk",
32 "base_uart0_clk", "base_uart1_clk", "base_uart2_clk",
33 "base_uart3_clk", "base_audio_clk"
34
35Which branch clocks that are available on the CCU depends on the
36specific LPC part. Check the user manual for your specific part.
37
38A list of CCU clocks can be found in dt-bindings/clock/lpc18xx-ccu.h.
39
40Example board file:
41
42soc {
43 ccu1: clock-controller@40051000 {
44 compatible = "nxp,lpc1850-ccu";
45 reg = <0x40051000 0x1000>;
46 #clock-cells = <1>;
47 clocks = <&cgu BASE_APB3_CLK>, <&cgu BASE_APB1_CLK>,
48 <&cgu BASE_SPIFI_CLK>, <&cgu BASE_CPU_CLK>,
49 <&cgu BASE_PERIPH_CLK>, <&cgu BASE_USB0_CLK>,
50 <&cgu BASE_USB1_CLK>, <&cgu BASE_SPI_CLK>;
51 clock-names = "base_apb3_clk", "base_apb1_clk",
52 "base_spifi_clk", "base_cpu_clk",
53 "base_periph_clk", "base_usb0_clk",
54 "base_usb1_clk", "base_spi_clk";
55 };
56
57 ccu2: clock-controller@40052000 {
58 compatible = "nxp,lpc1850-ccu";
59 reg = <0x40052000 0x1000>;
60 #clock-cells = <1>;
61 clocks = <&cgu BASE_AUDIO_CLK>, <&cgu BASE_UART3_CLK>,
62 <&cgu BASE_UART2_CLK>, <&cgu BASE_UART1_CLK>,
63 <&cgu BASE_UART0_CLK>, <&cgu BASE_SSP1_CLK>,
64 <&cgu BASE_SSP0_CLK>, <&cgu BASE_SDIO_CLK>;
65 clock-names = "base_audio_clk", "base_uart3_clk",
66 "base_uart2_clk", "base_uart1_clk",
67 "base_uart0_clk", "base_ssp1_clk",
68 "base_ssp0_clk", "base_sdio_clk";
69 };
70
71 /* A user of CCU brach clocks */
72 uart1: serial@40082000 {
73 ...
74 clocks = <&ccu2 CLK_APB0_UART1>, <&ccu1 CLK_CPU_UART1>;
75 ...
76 };
77};
diff --git a/Documentation/devicetree/bindings/clock/lpc1850-cgu.txt b/Documentation/devicetree/bindings/clock/lpc1850-cgu.txt
new file mode 100644
index 000000000000..2cc32a9a945a
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/lpc1850-cgu.txt
@@ -0,0 +1,131 @@
1* NXP LPC1850 Clock Generation Unit (CGU)
2
3The CGU generates multiple independent clocks for the core and the
4peripheral blocks of the LPC18xx. Each independent clock is called
5a base clock and itself is one of the inputs to the two Clock
6Control Units (CCUs) which control the branch clocks to the
7individual peripherals.
8
9The CGU selects the inputs to the clock generators from multiple
10clock sources, controls the clock generation, and routes the outputs
11of the clock generators through the clock source bus to the output
12stages. Each output stage provides an independent clock source and
13corresponds to one of the base clocks for the LPC18xx.
14
15 - Above text taken from NXP LPC1850 User Manual.
16
17
18This binding uses the common clock binding:
19 Documentation/devicetree/bindings/clock/clock-bindings.txt
20
21Required properties:
22- compatible:
23 Should be "nxp,lpc1850-cgu"
24- reg:
25 Shall define the base and range of the address space
26 containing clock control registers
27- #clock-cells:
28 Shall have value <1>. The permitted clock-specifier values
29 are the base clock numbers defined below.
30- clocks:
31 Shall contain a list of phandles for the external input
32 sources to the CGU. The list shall be in the following
33 order: xtal, 32khz, enet_rx_clk, enet_tx_clk, gp_clkin.
34- clock-indices:
35 Shall be an ordered list of numbers defining the base clock
36 number provided by the CGU.
37- clock-output-names:
38 Shall be an ordered list of strings defining the names of
39 the clocks provided by the CGU.
40
41Which base clocks that are available on the CGU depends on the
42specific LPC part. Base clocks are numbered from 0 to 27.
43
44Number: Name: Description:
45 0 BASE_SAFE_CLK Base safe clock (always on) for WWDT
46 1 BASE_USB0_CLK Base clock for USB0
47 2 BASE_PERIPH_CLK Base clock for Cortex-M0SUB subsystem,
48 SPI, and SGPIO
49 3 BASE_USB1_CLK Base clock for USB1
50 4 BASE_CPU_CLK System base clock for ARM Cortex-M core
51 and APB peripheral blocks #0 and #2
52 5 BASE_SPIFI_CLK Base clock for SPIFI
53 6 BASE_SPI_CLK Base clock for SPI
54 7 BASE_PHY_RX_CLK Base clock for Ethernet PHY Receive clock
55 8 BASE_PHY_TX_CLK Base clock for Ethernet PHY Transmit clock
56 9 BASE_APB1_CLK Base clock for APB peripheral block # 1
5710 BASE_APB3_CLK Base clock for APB peripheral block # 3
5811 BASE_LCD_CLK Base clock for LCD
5912 BASE_ADCHS_CLK Base clock for ADCHS
6013 BASE_SDIO_CLK Base clock for SD/MMC
6114 BASE_SSP0_CLK Base clock for SSP0
6215 BASE_SSP1_CLK Base clock for SSP1
6316 BASE_UART0_CLK Base clock for UART0
6417 BASE_UART1_CLK Base clock for UART1
6518 BASE_UART2_CLK Base clock for UART2
6619 BASE_UART3_CLK Base clock for UART3
6720 BASE_OUT_CLK Base clock for CLKOUT pin
6824-21 - Reserved
6925 BASE_AUDIO_CLK Base clock for audio system (I2S)
7026 BASE_CGU_OUT0_CLK Base clock for CGU_OUT0 clock output
7127 BASE_CGU_OUT1_CLK Base clock for CGU_OUT1 clock output
72
73BASE_PERIPH_CLK and BASE_SPI_CLK is only available on LPC43xx.
74BASE_ADCHS_CLK is only available on LPC4370.
75
76
77Example board file:
78
79/ {
80 clocks {
81 xtal: xtal {
82 compatible = "fixed-clock";
83 #clock-cells = <0>;
84 clock-frequency = <12000000>;
85 };
86
87 xtal32: xtal32 {
88 compatible = "fixed-clock";
89 #clock-cells = <0>;
90 clock-frequency = <32768>;
91 };
92
93 enet_rx_clk: enet_rx_clk {
94 compatible = "fixed-clock";
95 #clock-cells = <0>;
96 clock-frequency = <0>;
97 clock-output-names = "enet_rx_clk";
98 };
99
100 enet_tx_clk: enet_tx_clk {
101 compatible = "fixed-clock";
102 #clock-cells = <0>;
103 clock-frequency = <0>;
104 clock-output-names = "enet_tx_clk";
105 };
106
107 gp_clkin: gp_clkin {
108 compatible = "fixed-clock";
109 #clock-cells = <0>;
110 clock-frequency = <0>;
111 clock-output-names = "gp_clkin";
112 };
113 };
114
115 soc {
116 cgu: clock-controller@40050000 {
117 compatible = "nxp,lpc1850-cgu";
118 reg = <0x40050000 0x1000>;
119 #clock-cells = <1>;
120 clocks = <&xtal>, <&creg_clk 1>, <&enet_rx_clk>, <&enet_tx_clk>, <&gp_clkin>;
121 };
122
123 /* A CGU and CCU clock consumer */
124 lcdc: lcdc@40008000 {
125 ...
126 clocks = <&cgu BASE_LCD_CLK>, <&ccu1 CLK_CPU_LCD>;
127 clock-names = "clcdclk", "apb_pclk";
128 ...
129 };
130 };
131};
diff --git a/Documentation/devicetree/bindings/clock/marvell,berlin.txt b/Documentation/devicetree/bindings/clock/marvell,berlin.txt
new file mode 100644
index 000000000000..c611c495f3ff
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/marvell,berlin.txt
@@ -0,0 +1,31 @@
1Device Tree Clock bindings for Marvell Berlin
2
3This binding uses the common clock binding[1].
4
5[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
6
7Clock related registers are spread among the chip control registers. Berlin
8clock node should be a sub-node of the chip controller node. Marvell Berlin2
9(BG2, BG2CD, BG2Q) SoCs share the same IP for PLLs and clocks, with some
10minor differences in features and register layout.
11
12Required properties:
13- compatible: must be "marvell,berlin2-clk" or "marvell,berlin2q-clk"
14- #clock-cells: must be 1
15- clocks: must be the input parent clock phandle
16- clock-names: name of the input parent clock
17 Allowed clock-names for the reference clocks are
18 "refclk" for the SoCs oscillator input on all SoCs,
19 and SoC-specific input clocks for
20 BG2/BG2CD: "video_ext0" for the external video clock input
21
22
23Example:
24
25chip_clk: clock {
26 compatible = "marvell,berlin2q-clk";
27
28 #clock-cells = <1>;
29 clocks = <&refclk>;
30 clock-names = "refclk";
31};
diff --git a/Documentation/devicetree/bindings/clock/marvell,pxa1928.txt b/Documentation/devicetree/bindings/clock/marvell,pxa1928.txt
new file mode 100644
index 000000000000..809c5a2d8d9d
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/marvell,pxa1928.txt
@@ -0,0 +1,21 @@
1* Marvell PXA1928 Clock Controllers
2
3The PXA1928 clock subsystem generates and supplies clock to various
4controllers within the PXA1928 SoC. The PXA1928 contains 3 clock controller
5blocks called APMU, MPMU, and APBC roughly corresponding to internal buses.
6
7Required Properties:
8
9- compatible: should be one of the following.
10 - "marvell,pxa1928-apmu" - APMU controller compatible
11 - "marvell,pxa1928-mpmu" - MPMU controller compatible
12 - "marvell,pxa1928-apbc" - APBC controller compatible
13- reg: physical base address of the clock controller and length of memory mapped
14 region.
15- #clock-cells: should be 1.
16- #reset-cells: should be 1.
17
18Each clock is assigned an identifier and client nodes use the clock controller
19phandle and this identifier to specify the clock which they consume.
20
21All these identifiers can be found in <dt-bindings/clock/marvell,pxa1928.h>.
diff --git a/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt
index 31c7c0c1ce8f..660e64912cce 100644
--- a/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt
+++ b/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt
@@ -19,6 +19,7 @@ ID Clock Peripheral
199 pex1 PCIe Cntrl 1 199 pex1 PCIe Cntrl 1
2015 sata0 SATA Host 0 2015 sata0 SATA Host 0
2117 sdio SDHCI Host 2117 sdio SDHCI Host
2223 crypto CESA (crypto engine)
2225 tdm Time Division Mplx 2325 tdm Time Division Mplx
2328 ddr DDR Cntrl 2428 ddr DDR Cntrl
2430 sata1 SATA Host 0 2530 sata1 SATA Host 0
diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra124-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra124-car.txt
index c6620bc96703..7f02fb4ca4ad 100644
--- a/Documentation/devicetree/bindings/clock/nvidia,tegra124-car.txt
+++ b/Documentation/devicetree/bindings/clock/nvidia,tegra124-car.txt
@@ -20,15 +20,38 @@ Required properties :
20- #reset-cells : Should be 1. 20- #reset-cells : Should be 1.
21 In clock consumers, this cell represents the bit number in the CAR's 21 In clock consumers, this cell represents the bit number in the CAR's
22 array of CLK_RST_CONTROLLER_RST_DEVICES_* registers. 22 array of CLK_RST_CONTROLLER_RST_DEVICES_* registers.
23- nvidia,external-memory-controller : phandle of the EMC driver.
24
25The node should contain a "emc-timings" subnode for each supported RAM type (see
26field RAM_CODE in register PMC_STRAPPING_OPT_A).
27
28Required properties for "emc-timings" nodes :
29- nvidia,ram-code : Should contain the value of RAM_CODE this timing set
30 is used for.
31
32Each "emc-timings" node should contain a "timing" subnode for every supported
33EMC clock rate.
34
35Required properties for "timing" nodes :
36- clock-frequency : Should contain the memory clock rate to which this timing
37relates.
38- nvidia,parent-clock-frequency : Should contain the rate at which the current
39parent of the EMC clock should be running at this timing.
40- clocks : Must contain an entry for each entry in clock-names.
41 See ../clocks/clock-bindings.txt for details.
42- clock-names : Must include the following entries:
43 - emc-parent : the clock that should be the parent of the EMC clock at this
44timing.
23 45
24Example SoC include file: 46Example SoC include file:
25 47
26/ { 48/ {
27 tegra_car: clock { 49 tegra_car: clock@60006000 {
28 compatible = "nvidia,tegra124-car"; 50 compatible = "nvidia,tegra124-car";
29 reg = <0x60006000 0x1000>; 51 reg = <0x60006000 0x1000>;
30 #clock-cells = <1>; 52 #clock-cells = <1>;
31 #reset-cells = <1>; 53 #reset-cells = <1>;
54 nvidia,external-memory-controller = <&emc>;
32 }; 55 };
33 56
34 usb@c5004000 { 57 usb@c5004000 {
@@ -62,4 +85,23 @@ Example board file:
62 &tegra_car { 85 &tegra_car {
63 clocks = <&clk_32k> <&osc>; 86 clocks = <&clk_32k> <&osc>;
64 }; 87 };
88
89 clock@60006000 {
90 emc-timings-3 {
91 nvidia,ram-code = <3>;
92
93 timing-12750000 {
94 clock-frequency = <12750000>;
95 nvidia,parent-clock-frequency = <408000000>;
96 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
97 clock-names = "emc-parent";
98 };
99 timing-20400000 {
100 clock-frequency = <20400000>;
101 nvidia,parent-clock-frequency = <408000000>;
102 clocks = <&tegra_car TEGRA124_CLK_PLL_P>;
103 clock-names = "emc-parent";
104 };
105 };
106 };
65}; 107};
diff --git a/Documentation/devicetree/bindings/clock/qca,ath79-pll.txt b/Documentation/devicetree/bindings/clock/qca,ath79-pll.txt
new file mode 100644
index 000000000000..e0fc2c11dd00
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/qca,ath79-pll.txt
@@ -0,0 +1,33 @@
1Binding for Qualcomm Atheros AR7xxx/AR9XXX PLL controller
2
3The PPL controller provides the 3 main clocks of the SoC: CPU, DDR and AHB.
4
5Required Properties:
6- compatible: has to be "qca,<soctype>-cpu-intc" and one of the following
7 fallbacks:
8 - "qca,ar7100-pll"
9 - "qca,ar7240-pll"
10 - "qca,ar9130-pll"
11 - "qca,ar9330-pll"
12 - "qca,ar9340-pll"
13 - "qca,qca9550-pll"
14- reg: Base address and size of the controllers memory area
15- clock-names: Name of the input clock, has to be "ref"
16- clocks: phandle of the external reference clock
17- #clock-cells: has to be one
18
19Optional properties:
20- clock-output-names: should be "cpu", "ddr", "ahb"
21
22Example:
23
24 memory-controller@18050000 {
25 compatible = "qca,ar9132-ppl", "qca,ar9130-pll";
26 reg = <0x18050000 0x20>;
27
28 clock-names = "ref";
29 clocks = <&extosc>;
30
31 #clock-cells = <1>;
32 clock-output-names = "cpu", "ddr", "ahb";
33 };
diff --git a/Documentation/devicetree/bindings/clock/renesas,cpg-div6-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,cpg-div6-clocks.txt
index 054f65f9319c..5ddb68418655 100644
--- a/Documentation/devicetree/bindings/clock/renesas,cpg-div6-clocks.txt
+++ b/Documentation/devicetree/bindings/clock/renesas,cpg-div6-clocks.txt
@@ -10,9 +10,11 @@ Required Properties:
10 - "renesas,r8a73a4-div6-clock" for R8A73A4 (R-Mobile APE6) DIV6 clocks 10 - "renesas,r8a73a4-div6-clock" for R8A73A4 (R-Mobile APE6) DIV6 clocks
11 - "renesas,r8a7740-div6-clock" for R8A7740 (R-Mobile A1) DIV6 clocks 11 - "renesas,r8a7740-div6-clock" for R8A7740 (R-Mobile A1) DIV6 clocks
12 - "renesas,r8a7790-div6-clock" for R8A7790 (R-Car H2) DIV6 clocks 12 - "renesas,r8a7790-div6-clock" for R8A7790 (R-Car H2) DIV6 clocks
13 - "renesas,r8a7791-div6-clock" for R8A7791 (R-Car M2) DIV6 clocks 13 - "renesas,r8a7791-div6-clock" for R8A7791 (R-Car M2-W) DIV6 clocks
14 - "renesas,r8a7793-div6-clock" for R8A7793 (R-Car M2-N) DIV6 clocks
15 - "renesas,r8a7794-div6-clock" for R8A7794 (R-Car E2) DIV6 clocks
14 - "renesas,sh73a0-div6-clock" for SH73A0 (SH-Mobile AG5) DIV6 clocks 16 - "renesas,sh73a0-div6-clock" for SH73A0 (SH-Mobile AG5) DIV6 clocks
15 - "renesas,cpg-div6-clock" for generic DIV6 clocks 17 and "renesas,cpg-div6-clock" as a fallback.
16 - reg: Base address and length of the memory resource used by the DIV6 clock 18 - reg: Base address and length of the memory resource used by the DIV6 clock
17 - clocks: Reference to the parent clock(s); either one, four, or eight 19 - clocks: Reference to the parent clock(s); either one, four, or eight
18 clocks must be specified. For clocks with multiple parents, invalid 20 clocks must be specified. For clocks with multiple parents, invalid
diff --git a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
index 0a80fa70ca26..16ed18155160 100644
--- a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
+++ b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
@@ -13,12 +13,14 @@ Required Properties:
13 - "renesas,r7s72100-mstp-clocks" for R7S72100 (RZ) MSTP gate clocks 13 - "renesas,r7s72100-mstp-clocks" for R7S72100 (RZ) MSTP gate clocks
14 - "renesas,r8a73a4-mstp-clocks" for R8A73A4 (R-Mobile APE6) MSTP gate clocks 14 - "renesas,r8a73a4-mstp-clocks" for R8A73A4 (R-Mobile APE6) MSTP gate clocks
15 - "renesas,r8a7740-mstp-clocks" for R8A7740 (R-Mobile A1) MSTP gate clocks 15 - "renesas,r8a7740-mstp-clocks" for R8A7740 (R-Mobile A1) MSTP gate clocks
16 - "renesas,r8a7778-mstp-clocks" for R8A7778 (R-Car M1) MSTP gate clocks
16 - "renesas,r8a7779-mstp-clocks" for R8A7779 (R-Car H1) MSTP gate clocks 17 - "renesas,r8a7779-mstp-clocks" for R8A7779 (R-Car H1) MSTP gate clocks
17 - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks 18 - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks
18 - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2) MSTP gate clocks 19 - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2-W) MSTP gate clocks
20 - "renesas,r8a7793-mstp-clocks" for R8A7793 (R-Car M2-N) MSTP gate clocks
19 - "renesas,r8a7794-mstp-clocks" for R8A7794 (R-Car E2) MSTP gate clocks 21 - "renesas,r8a7794-mstp-clocks" for R8A7794 (R-Car E2) MSTP gate clocks
20 - "renesas,sh73a0-mstp-clocks" for SH73A0 (SH-MobileAG5) MSTP gate clocks 22 - "renesas,sh73a0-mstp-clocks" for SH73A0 (SH-MobileAG5) MSTP gate clocks
21 - "renesas,cpg-mstp-clock" for generic MSTP gate clocks 23 and "renesas,cpg-mstp-clocks" as a fallback.
22 - reg: Base address and length of the I/O mapped registers used by the MSTP 24 - reg: Base address and length of the I/O mapped registers used by the MSTP
23 clocks. The first register is the clock control register and is mandatory. 25 clocks. The first register is the clock control register and is mandatory.
24 The second register is the clock status register and is optional when not 26 The second register is the clock status register and is optional when not
diff --git a/Documentation/devicetree/bindings/clock/renesas,h8300-div-clock.txt b/Documentation/devicetree/bindings/clock/renesas,h8300-div-clock.txt
new file mode 100644
index 000000000000..36c2b528245c
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/renesas,h8300-div-clock.txt
@@ -0,0 +1,24 @@
1* Renesas H8/300 divider clock
2
3Required Properties:
4
5 - compatible: Must be "renesas,sh73a0-h8300-div-clock"
6
7 - clocks: Reference to the parent clocks ("extal1" and "extal2")
8
9 - #clock-cells: Must be 1
10
11 - reg: Base address and length of the divide rate selector
12
13 - renesas,width: bit width of selector
14
15Example
16-------
17
18 cclk: cclk {
19 compatible = "renesas,h8300-div-clock";
20 clocks = <&xclk>;
21 #clock-cells = <0>;
22 reg = <0xfee01b 2>;
23 renesas,width = <2>;
24 };
diff --git a/Documentation/devicetree/bindings/clock/renesas,h8s2678-pll-clock.txt b/Documentation/devicetree/bindings/clock/renesas,h8s2678-pll-clock.txt
new file mode 100644
index 000000000000..500cdadbceb7
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/renesas,h8s2678-pll-clock.txt
@@ -0,0 +1,23 @@
1Renesas H8S2678 PLL clock
2
3This device is Clock multiplyer
4
5Required Properties:
6
7 - compatible: Must be "renesas,h8s2678-pll-clock"
8
9 - clocks: Reference to the parent clocks
10
11 - #clock-cells: Must be 0
12
13 - reg: Two rate selector (Multiply / Divide) register address
14
15Example
16-------
17
18 pllclk: pllclk {
19 compatible = "renesas,h8s2678-pll-clock";
20 clocks = <&xclk>;
21 #clock-cells = <0>;
22 reg = <0xfee03b 2>, <0xfee045 2>;
23 };
diff --git a/Documentation/devicetree/bindings/clock/renesas,rcar-gen2-cpg-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,rcar-gen2-cpg-clocks.txt
index b02944fba9de..56f111bd3e45 100644
--- a/Documentation/devicetree/bindings/clock/renesas,rcar-gen2-cpg-clocks.txt
+++ b/Documentation/devicetree/bindings/clock/renesas,rcar-gen2-cpg-clocks.txt
@@ -10,7 +10,7 @@ Required Properties:
10 - "renesas,r8a7791-cpg-clocks" for the r8a7791 CPG 10 - "renesas,r8a7791-cpg-clocks" for the r8a7791 CPG
11 - "renesas,r8a7793-cpg-clocks" for the r8a7793 CPG 11 - "renesas,r8a7793-cpg-clocks" for the r8a7793 CPG
12 - "renesas,r8a7794-cpg-clocks" for the r8a7794 CPG 12 - "renesas,r8a7794-cpg-clocks" for the r8a7794 CPG
13 - "renesas,rcar-gen2-cpg-clocks" for the generic R-Car Gen2 CPG 13 and "renesas,rcar-gen2-cpg-clocks" as a fallback.
14 14
15 - reg: Base address and length of the memory resource used by the CPG 15 - reg: Base address and length of the memory resource used by the CPG
16 16
diff --git a/Documentation/devicetree/bindings/clock/renesas,rz-cpg-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,rz-cpg-clocks.txt
index 98a257492522..b0f7ddb8cdb1 100644
--- a/Documentation/devicetree/bindings/clock/renesas,rz-cpg-clocks.txt
+++ b/Documentation/devicetree/bindings/clock/renesas,rz-cpg-clocks.txt
@@ -7,7 +7,7 @@ Required Properties:
7 7
8 - compatible: Must be one of 8 - compatible: Must be one of
9 - "renesas,r7s72100-cpg-clocks" for the r7s72100 CPG 9 - "renesas,r7s72100-cpg-clocks" for the r7s72100 CPG
10 - "renesas,rz-cpg-clocks" for the generic RZ CPG 10 and "renesas,rz-cpg-clocks" as a fallback.
11 - reg: Base address and length of the memory resource used by the CPG 11 - reg: Base address and length of the memory resource used by the CPG
12 - clocks: References to possible parent clocks. Order must match clock modes 12 - clocks: References to possible parent clocks. Order must match clock modes
13 in the datasheet. For the r7s72100, this is extal, usb_x1. 13 in the datasheet. For the r7s72100, this is extal, usb_x1.
diff --git a/Documentation/devicetree/bindings/clock/silabs,si5351.txt b/Documentation/devicetree/bindings/clock/silabs,si5351.txt
index c40711e8e8f7..28b28309f535 100644
--- a/Documentation/devicetree/bindings/clock/silabs,si5351.txt
+++ b/Documentation/devicetree/bindings/clock/silabs,si5351.txt
@@ -17,7 +17,8 @@ Required properties:
17- #clock-cells: from common clock binding; shall be set to 1. 17- #clock-cells: from common clock binding; shall be set to 1.
18- clocks: from common clock binding; list of parent clock 18- clocks: from common clock binding; list of parent clock
19 handles, shall be xtal reference clock or xtal and clkin for 19 handles, shall be xtal reference clock or xtal and clkin for
20 si5351c only. 20 si5351c only. Corresponding clock input names are "xtal" and
21 "clkin" respectively.
21- #address-cells: shall be set to 1. 22- #address-cells: shall be set to 1.
22- #size-cells: shall be set to 0. 23- #size-cells: shall be set to 0.
23 24
@@ -71,6 +72,7 @@ i2c-master-node {
71 72
72 /* connect xtal input to 25MHz reference */ 73 /* connect xtal input to 25MHz reference */
73 clocks = <&ref25>; 74 clocks = <&ref25>;
75 clock-names = "xtal";
74 76
75 /* connect xtal input as source of pll0 and pll1 */ 77 /* connect xtal input as source of pll0 and pll1 */
76 silabs,pll-source = <0 0>, <1 0>; 78 silabs,pll-source = <0 0>, <1 0>;
diff --git a/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt b/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt
new file mode 100644
index 000000000000..fee3205cdff9
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt
@@ -0,0 +1,65 @@
1STMicroelectronics STM32 Reset and Clock Controller
2===================================================
3
4The RCC IP is both a reset and a clock controller. This documentation only
5describes the clock part.
6
7Please also refer to clock-bindings.txt in this directory for common clock
8controller binding usage.
9
10Required properties:
11- compatible: Should be "st,stm32f42xx-rcc"
12- reg: should be register base and length as documented in the
13 datasheet
14- #clock-cells: 2, device nodes should specify the clock in their "clocks"
15 property, containing a phandle to the clock device node, an index selecting
16 between gated clocks and other clocks and an index specifying the clock to
17 use.
18
19Example:
20
21 rcc: rcc@40023800 {
22 #clock-cells = <2>
23 compatible = "st,stm32f42xx-rcc", "st,stm32-rcc";
24 reg = <0x40023800 0x400>;
25 };
26
27Specifying gated clocks
28=======================
29
30The primary index must be set to 0.
31
32The secondary index is the bit number within the RCC register bank, starting
33from the first RCC clock enable register (RCC_AHB1ENR, address offset 0x30).
34
35It is calculated as: index = register_offset / 4 * 32 + bit_offset.
36Where bit_offset is the bit offset within the register (LSB is 0, MSB is 31).
37
38Example:
39
40 /* Gated clock, AHB1 bit 0 (GPIOA) */
41 ... {
42 clocks = <&rcc 0 0>
43 };
44
45 /* Gated clock, AHB2 bit 4 (CRYP) */
46 ... {
47 clocks = <&rcc 0 36>
48 };
49
50Specifying other clocks
51=======================
52
53The primary index must be set to 1.
54
55The secondary index is bound with the following magic numbers:
56
57 0 SYSTICK
58 1 FCLK
59
60Example:
61
62 /* Misc clock, FCLK */
63 ... {
64 clocks = <&rcc 1 1>
65 };
diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt
index 4fa11af3d378..8a47b77abfca 100644
--- a/Documentation/devicetree/bindings/clock/sunxi.txt
+++ b/Documentation/devicetree/bindings/clock/sunxi.txt
@@ -67,6 +67,7 @@ Required properties:
67 "allwinner,sun4i-a10-usb-clk" - for usb gates + resets on A10 / A20 67 "allwinner,sun4i-a10-usb-clk" - for usb gates + resets on A10 / A20
68 "allwinner,sun5i-a13-usb-clk" - for usb gates + resets on A13 68 "allwinner,sun5i-a13-usb-clk" - for usb gates + resets on A13
69 "allwinner,sun6i-a31-usb-clk" - for usb gates + resets on A31 69 "allwinner,sun6i-a31-usb-clk" - for usb gates + resets on A31
70 "allwinner,sun8i-a23-usb-clk" - for usb gates + resets on A23
70 "allwinner,sun9i-a80-usb-mod-clk" - for usb gates + resets on A80 71 "allwinner,sun9i-a80-usb-mod-clk" - for usb gates + resets on A80
71 "allwinner,sun9i-a80-usb-phy-clk" - for usb phy gates + resets on A80 72 "allwinner,sun9i-a80-usb-phy-clk" - for usb phy gates + resets on A80
72 73
diff --git a/Documentation/devicetree/bindings/clock/ti,cdce925.txt b/Documentation/devicetree/bindings/clock/ti,cdce925.txt
new file mode 100644
index 000000000000..4c7669ad681b
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/ti,cdce925.txt
@@ -0,0 +1,42 @@
1Binding for TO CDCE925 programmable I2C clock synthesizers.
2
3Reference
4This binding uses the common clock binding[1].
5
6[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
7[2] http://www.ti.com/product/cdce925
8
9The driver provides clock sources for each output Y1 through Y5.
10
11Required properties:
12 - compatible: Shall be "ti,cdce925"
13 - reg: I2C device address.
14 - clocks: Points to a fixed parent clock that provides the input frequency.
15 - #clock-cells: From common clock bindings: Shall be 1.
16
17Optional properties:
18 - xtal-load-pf: Crystal load-capacitor value to fine-tune performance on a
19 board, or to compensate for external influences.
20
21For both PLL1 and PLL2 an optional child node can be used to specify spread
22spectrum clocking parameters for a board.
23 - spread-spectrum: SSC mode as defined in the data sheet.
24 - spread-spectrum-center: Use "centered" mode instead of "max" mode. When
25 present, the clock runs at the requested frequency on average. Otherwise
26 the requested frequency is the maximum value of the SCC range.
27
28
29Example:
30
31 clockgen: cdce925pw@64 {
32 compatible = "cdce925";
33 reg = <0x64>;
34 clocks = <&xtal_27Mhz>;
35 #clock-cells = <1>;
36 xtal-load-pf = <5>;
37 /* PLL options to get SSC 1% centered */
38 PLL2 {
39 spread-spectrum = <4>;
40 spread-spectrum-center;
41 };
42 };
diff --git a/Documentation/devicetree/bindings/clock/zx296702-clk.txt b/Documentation/devicetree/bindings/clock/zx296702-clk.txt
new file mode 100644
index 000000000000..750442b65505
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/zx296702-clk.txt
@@ -0,0 +1,35 @@
1Device Tree Clock bindings for ZTE zx296702
2
3This binding uses the common clock binding[1].
4
5[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
6
7Required properties:
8- compatible : shall be one of the following:
9 "zte,zx296702-topcrm-clk":
10 zx296702 top clock selection, divider and gating
11
12 "zte,zx296702-lsp0crpm-clk" and
13 "zte,zx296702-lsp1crpm-clk":
14 zx296702 device level clock selection and gating
15
16- reg: Address and length of the register set
17
18The clock consumer should specify the desired clock by having the clock
19ID in its "clocks" phandle cell. See include/dt-bindings/clock/zx296702-clock.h
20for the full list of zx296702 clock IDs.
21
22
23topclk: topcrm@0x09800000 {
24 compatible = "zte,zx296702-topcrm-clk";
25 reg = <0x09800000 0x1000>;
26 #clock-cells = <1>;
27};
28
29uart0: serial@0x09405000 {
30 compatible = "zte,zx296702-uart";
31 reg = <0x09405000 0x1000>;
32 interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
33 clocks = <&lsp1clk ZX296702_UART0_PCLK>;
34 status = "disabled";
35};
diff --git a/Documentation/devicetree/bindings/crypto/fsl-sec2.txt b/Documentation/devicetree/bindings/crypto/fsl-sec2.txt
index 38988ef1336b..f0d926bf9f36 100644
--- a/Documentation/devicetree/bindings/crypto/fsl-sec2.txt
+++ b/Documentation/devicetree/bindings/crypto/fsl-sec2.txt
@@ -1,9 +1,11 @@
1Freescale SoC SEC Security Engines versions 2.x-3.x 1Freescale SoC SEC Security Engines versions 1.x-2.x-3.x
2 2
3Required properties: 3Required properties:
4 4
5- compatible : Should contain entries for this and backward compatible 5- compatible : Should contain entries for this and backward compatible
6 SEC versions, high to low, e.g., "fsl,sec2.1", "fsl,sec2.0" 6 SEC versions, high to low, e.g., "fsl,sec2.1", "fsl,sec2.0" (SEC2/3)
7 e.g., "fsl,sec1.2", "fsl,sec1.0" (SEC1)
8 warning: SEC1 and SEC2 are mutually exclusive
7- reg : Offset and length of the register set for the device 9- reg : Offset and length of the register set for the device
8- interrupts : the SEC's interrupt number 10- interrupts : the SEC's interrupt number
9- fsl,num-channels : An integer representing the number of channels 11- fsl,num-channels : An integer representing the number of channels
diff --git a/Documentation/devicetree/bindings/crypto/marvell-cesa.txt b/Documentation/devicetree/bindings/crypto/marvell-cesa.txt
new file mode 100644
index 000000000000..c6c6a4a045bd
--- /dev/null
+++ b/Documentation/devicetree/bindings/crypto/marvell-cesa.txt
@@ -0,0 +1,45 @@
1Marvell Cryptographic Engines And Security Accelerator
2
3Required properties:
4- compatible: should be one of the following string
5 "marvell,orion-crypto"
6 "marvell,kirkwood-crypto"
7 "marvell,dove-crypto"
8 "marvell,armada-370-crypto"
9 "marvell,armada-xp-crypto"
10 "marvell,armada-375-crypto"
11 "marvell,armada-38x-crypto"
12- reg: base physical address of the engine and length of memory mapped
13 region. Can also contain an entry for the SRAM attached to the CESA,
14 but this representation is deprecated and marvell,crypto-srams should
15 be used instead
16- reg-names: "regs". Can contain an "sram" entry, but this representation
17 is deprecated and marvell,crypto-srams should be used instead
18- interrupts: interrupt number
19- clocks: reference to the crypto engines clocks. This property is not
20 required for orion and kirkwood platforms
21- clock-names: "cesaX" and "cesazX", X should be replaced by the crypto engine
22 id.
23 This property is not required for the orion and kirkwoord
24 platforms.
25 "cesazX" clocks are not required on armada-370 platforms
26- marvell,crypto-srams: phandle to crypto SRAM definitions
27
28Optional properties:
29- marvell,crypto-sram-size: SRAM size reserved for crypto operations, if not
30 specified the whole SRAM is used (2KB)
31
32
33Examples:
34
35 crypto@90000 {
36 compatible = "marvell,armada-xp-crypto";
37 reg = <0x90000 0x10000>;
38 reg-names = "regs";
39 interrupts = <48>, <49>;
40 clocks = <&gateclk 23>, <&gateclk 23>;
41 clock-names = "cesa0", "cesa1";
42 marvell,crypto-srams = <&crypto_sram0>, <&crypto_sram1>;
43 marvell,crypto-sram-size = <0x600>;
44 status = "okay";
45 };
diff --git a/Documentation/devicetree/bindings/crypto/mv_cesa.txt b/Documentation/devicetree/bindings/crypto/mv_cesa.txt
index 47229b1a594b..c0c35f00335b 100644
--- a/Documentation/devicetree/bindings/crypto/mv_cesa.txt
+++ b/Documentation/devicetree/bindings/crypto/mv_cesa.txt
@@ -1,20 +1,33 @@
1Marvell Cryptographic Engines And Security Accelerator 1Marvell Cryptographic Engines And Security Accelerator
2 2
3Required properties: 3Required properties:
4- compatible : should be "marvell,orion-crypto" 4- compatible: should be one of the following string
5- reg : base physical address of the engine and length of memory mapped 5 "marvell,orion-crypto"
6 region, followed by base physical address of sram and its memory 6 "marvell,kirkwood-crypto"
7 length 7 "marvell,dove-crypto"
8- reg-names : "regs" , "sram"; 8- reg: base physical address of the engine and length of memory mapped
9- interrupts : interrupt number 9 region. Can also contain an entry for the SRAM attached to the CESA,
10 but this representation is deprecated and marvell,crypto-srams should
11 be used instead
12- reg-names: "regs". Can contain an "sram" entry, but this representation
13 is deprecated and marvell,crypto-srams should be used instead
14- interrupts: interrupt number
15- clocks: reference to the crypto engines clocks. This property is only
16 required for Dove platforms
17- marvell,crypto-srams: phandle to crypto SRAM definitions
18
19Optional properties:
20- marvell,crypto-sram-size: SRAM size reserved for crypto operations, if not
21 specified the whole SRAM is used (2KB)
10 22
11Examples: 23Examples:
12 24
13 crypto@30000 { 25 crypto@30000 {
14 compatible = "marvell,orion-crypto"; 26 compatible = "marvell,orion-crypto";
15 reg = <0x30000 0x10000>, 27 reg = <0x30000 0x10000>;
16 <0x4000000 0x800>; 28 reg-names = "regs";
17 reg-names = "regs" , "sram";
18 interrupts = <22>; 29 interrupts = <22>;
30 marvell,crypto-srams = <&crypto_sram>;
31 marvell,crypto-sram-size = <0x600>;
19 status = "okay"; 32 status = "okay";
20 }; 33 };
diff --git a/Documentation/devicetree/bindings/dma/dma.txt b/Documentation/devicetree/bindings/dma/dma.txt
index 82104271e754..6312fb00ce8d 100644
--- a/Documentation/devicetree/bindings/dma/dma.txt
+++ b/Documentation/devicetree/bindings/dma/dma.txt
@@ -31,6 +31,34 @@ Example:
31 dma-requests = <127>; 31 dma-requests = <127>;
32 }; 32 };
33 33
34* DMA router
35
36DMA routers are transparent IP blocks used to route DMA request lines from
37devices to the DMA controller. Some SoCs (like TI DRA7x) have more peripherals
38integrated with DMA requests than what the DMA controller can handle directly.
39
40Required property:
41- dma-masters: phandle of the DMA controller or list of phandles for
42 the DMA controllers the router can direct the signal to.
43- #dma-cells: Must be at least 1. Used to provide DMA router specific
44 information. See DMA client binding below for more
45 details.
46
47Optional properties:
48- dma-requests: Number of incoming request lines the router can handle.
49- In the node pointed by the dma-masters:
50 - dma-requests: The router driver might need to look for this in order
51 to configure the routing.
52
53Example:
54 sdma_xbar: dma-router@4a002b78 {
55 compatible = "ti,dra7-dma-crossbar";
56 reg = <0x4a002b78 0xfc>;
57 #dma-cells = <1>;
58 dma-requests = <205>;
59 ti,dma-safe-map = <0>;
60 dma-masters = <&sdma>;
61 };
34 62
35* DMA client 63* DMA client
36 64
diff --git a/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt b/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt
index a4873e5e3e36..e30e184f50c7 100644
--- a/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt
+++ b/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt
@@ -38,7 +38,7 @@ dma_apbx: dma-apbx@80024000 {
38 80 81 68 69 38 80 81 68 69
39 70 71 72 73 39 70 71 72 73
40 74 75 76 77>; 40 74 75 76 77>;
41 interrupt-names = "auart4-rx", "aurat4-tx", "spdif-tx", "empty", 41 interrupt-names = "auart4-rx", "auart4-tx", "spdif-tx", "empty",
42 "saif0", "saif1", "i2c0", "i2c1", 42 "saif0", "saif1", "i2c0", "i2c1",
43 "auart0-rx", "auart0-tx", "auart1-rx", "auart1-tx", 43 "auart0-rx", "auart0-tx", "auart1-rx", "auart1-tx",
44 "auart2-rx", "auart2-tx", "auart3-rx", "auart3-tx"; 44 "auart2-rx", "auart2-tx", "auart3-rx", "auart3-tx";
diff --git a/Documentation/devicetree/bindings/dma/mv-xor.txt b/Documentation/devicetree/bindings/dma/mv-xor.txt
index 7c6cb7fcecd2..cc29c35266e2 100644
--- a/Documentation/devicetree/bindings/dma/mv-xor.txt
+++ b/Documentation/devicetree/bindings/dma/mv-xor.txt
@@ -1,7 +1,7 @@
1* Marvell XOR engines 1* Marvell XOR engines
2 2
3Required properties: 3Required properties:
4- compatible: Should be "marvell,orion-xor" 4- compatible: Should be "marvell,orion-xor" or "marvell,armada-380-xor"
5- reg: Should contain registers location and length (two sets) 5- reg: Should contain registers location and length (two sets)
6 the first set is the low registers, the second set the high 6 the first set is the low registers, the second set the high
7 registers for the XOR engine. 7 registers for the XOR engine.
diff --git a/Documentation/devicetree/bindings/dma/sirfsoc-dma.txt b/Documentation/devicetree/bindings/dma/sirfsoc-dma.txt
index ecbc96ad36f8..ccd52d6a231a 100644
--- a/Documentation/devicetree/bindings/dma/sirfsoc-dma.txt
+++ b/Documentation/devicetree/bindings/dma/sirfsoc-dma.txt
@@ -3,7 +3,8 @@
3See dma.txt first 3See dma.txt first
4 4
5Required properties: 5Required properties:
6- compatible: Should be "sirf,prima2-dmac" or "sirf,marco-dmac" 6- compatible: Should be "sirf,prima2-dmac", "sirf,atlas7-dmac" or
7 "sirf,atlas7-dmac-v2"
7- reg: Should contain DMA registers location and length. 8- reg: Should contain DMA registers location and length.
8- interrupts: Should contain one interrupt shared by all channel 9- interrupts: Should contain one interrupt shared by all channel
9- #dma-cells: must be <1>. used to represent the number of integer 10- #dma-cells: must be <1>. used to represent the number of integer
diff --git a/Documentation/devicetree/bindings/dma/sun6i-dma.txt b/Documentation/devicetree/bindings/dma/sun6i-dma.txt
index 9cdcba24d7c3..d13c136cef8c 100644
--- a/Documentation/devicetree/bindings/dma/sun6i-dma.txt
+++ b/Documentation/devicetree/bindings/dma/sun6i-dma.txt
@@ -4,7 +4,10 @@ This driver follows the generic DMA bindings defined in dma.txt.
4 4
5Required properties: 5Required properties:
6 6
7- compatible: Must be "allwinner,sun6i-a31-dma" or "allwinner,sun8i-a23-dma" 7- compatible: Must be one of
8 "allwinner,sun6i-a31-dma"
9 "allwinner,sun8i-a23-dma"
10 "allwinner,sun8i-h3-dma"
8- reg: Should contain the registers base address and length 11- reg: Should contain the registers base address and length
9- interrupts: Should contain a reference to the interrupt used by this device 12- interrupts: Should contain a reference to the interrupt used by this device
10- clocks: Should contain a reference to the parent AHB clock 13- clocks: Should contain a reference to the parent AHB clock
diff --git a/Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt b/Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt
new file mode 100644
index 000000000000..63a48928f3a8
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/ti-dma-crossbar.txt
@@ -0,0 +1,52 @@
1Texas Instruments DMA Crossbar (DMA request router)
2
3Required properties:
4- compatible: "ti,dra7-dma-crossbar" for DRA7xx DMA crossbar
5- reg: Memory map for accessing module
6- #dma-cells: Should be set to <1>.
7 Clients should use the crossbar request number (input)
8- dma-requests: Number of DMA requests the crossbar can receive
9- dma-masters: phandle pointing to the DMA controller
10
11The DMA controller node need to have the following poroperties:
12- dma-requests: Number of DMA requests the controller can handle
13
14Optional properties:
15- ti,dma-safe-map: Safe routing value for unused request lines
16
17Example:
18
19/* DMA controller */
20sdma: dma-controller@4a056000 {
21 compatible = "ti,omap4430-sdma";
22 reg = <0x4a056000 0x1000>;
23 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
24 <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
25 <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
26 <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
27 #dma-cells = <1>;
28 dma-channels = <32>;
29 dma-requests = <127>;
30};
31
32/* DMA crossbar */
33sdma_xbar: dma-router@4a002b78 {
34 compatible = "ti,dra7-dma-crossbar";
35 reg = <0x4a002b78 0xfc>;
36 #dma-cells = <1>;
37 dma-requests = <205>;
38 ti,dma-safe-map = <0>;
39 dma-masters = <&sdma>;
40};
41
42/* DMA client */
43uart1: serial@4806a000 {
44 compatible = "ti,omap4-uart";
45 reg = <0x4806a000 0x100>;
46 interrupts-extended = <&gic GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
47 ti,hwmods = "uart1";
48 clock-frequency = <48000000>;
49 status = "disabled";
50 dmas = <&sdma_xbar 49>, <&sdma_xbar 50>;
51 dma-names = "tx", "rx";
52};
diff --git a/Documentation/devicetree/bindings/drm/msm/dsi.txt b/Documentation/devicetree/bindings/drm/msm/dsi.txt
new file mode 100644
index 000000000000..cd8fe6cf536c
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/msm/dsi.txt
@@ -0,0 +1,120 @@
1Qualcomm Technologies Inc. adreno/snapdragon DSI output
2
3DSI Controller:
4Required properties:
5- compatible:
6 * "qcom,mdss-dsi-ctrl"
7- reg: Physical base address and length of the registers of controller
8- reg-names: The names of register regions. The following regions are required:
9 * "dsi_ctrl"
10- qcom,dsi-host-index: The ID of DSI controller hardware instance. This should
11 be 0 or 1, since we have 2 DSI controllers at most for now.
12- interrupts: The interrupt signal from the DSI block.
13- power-domains: Should be <&mmcc MDSS_GDSC>.
14- clocks: device clocks
15 See Documentation/devicetree/bindings/clocks/clock-bindings.txt for details.
16- clock-names: the following clocks are required:
17 * "bus_clk"
18 * "byte_clk"
19 * "core_clk"
20 * "core_mmss_clk"
21 * "iface_clk"
22 * "mdp_core_clk"
23 * "pixel_clk"
24- vdd-supply: phandle to vdd regulator device node
25- vddio-supply: phandle to vdd-io regulator device node
26- vdda-supply: phandle to vdda regulator device node
27- qcom,dsi-phy: phandle to DSI PHY device node
28
29Optional properties:
30- panel@0: Node of panel connected to this DSI controller.
31 See files in Documentation/devicetree/bindings/panel/ for each supported
32 panel.
33- qcom,dual-panel-mode: Boolean value indicating if the DSI controller is
34 driving a panel which needs 2 DSI links.
35- qcom,master-panel: Boolean value indicating if the DSI controller is driving
36 the master link of the 2-DSI panel.
37- qcom,sync-dual-panel: Boolean value indicating if the DSI controller is
38 driving a 2-DSI panel whose 2 links need receive command simultaneously.
39- interrupt-parent: phandle to the MDP block if the interrupt signal is routed
40 through MDP block
41
42DSI PHY:
43Required properties:
44- compatible: Could be the following
45 * "qcom,dsi-phy-28nm-hpm"
46 * "qcom,dsi-phy-28nm-lp"
47- reg: Physical base address and length of the registers of PLL, PHY and PHY
48 regulator
49- reg-names: The names of register regions. The following regions are required:
50 * "dsi_pll"
51 * "dsi_phy"
52 * "dsi_phy_regulator"
53- qcom,dsi-phy-index: The ID of DSI PHY hardware instance. This should
54 be 0 or 1, since we have 2 DSI PHYs at most for now.
55- power-domains: Should be <&mmcc MDSS_GDSC>.
56- clocks: device clocks
57 See Documentation/devicetree/bindings/clocks/clock-bindings.txt for details.
58- clock-names: the following clocks are required:
59 * "iface_clk"
60- vddio-supply: phandle to vdd-io regulator device node
61
62Example:
63 mdss_dsi0: qcom,mdss_dsi@fd922800 {
64 compatible = "qcom,mdss-dsi-ctrl";
65 qcom,dsi-host-index = <0>;
66 interrupt-parent = <&mdss_mdp>;
67 interrupts = <4 0>;
68 reg-names = "dsi_ctrl";
69 reg = <0xfd922800 0x200>;
70 power-domains = <&mmcc MDSS_GDSC>;
71 clock-names =
72 "bus_clk",
73 "byte_clk",
74 "core_clk",
75 "core_mmss_clk",
76 "iface_clk",
77 "mdp_core_clk",
78 "pixel_clk";
79 clocks =
80 <&mmcc MDSS_AXI_CLK>,
81 <&mmcc MDSS_BYTE0_CLK>,
82 <&mmcc MDSS_ESC0_CLK>,
83 <&mmcc MMSS_MISC_AHB_CLK>,
84 <&mmcc MDSS_AHB_CLK>,
85 <&mmcc MDSS_MDP_CLK>,
86 <&mmcc MDSS_PCLK0_CLK>;
87 vdda-supply = <&pma8084_l2>;
88 vdd-supply = <&pma8084_l22>;
89 vddio-supply = <&pma8084_l12>;
90
91 qcom,dsi-phy = <&mdss_dsi_phy0>;
92
93 qcom,dual-panel-mode;
94 qcom,master-panel;
95 qcom,sync-dual-panel;
96
97 panel: panel@0 {
98 compatible = "sharp,lq101r1sx01";
99 reg = <0>;
100 link2 = <&secondary>;
101
102 power-supply = <...>;
103 backlight = <...>;
104 };
105 };
106
107 mdss_dsi_phy0: qcom,mdss_dsi_phy@fd922a00 {
108 compatible = "qcom,dsi-phy-28nm-hpm";
109 qcom,dsi-phy-index = <0>;
110 reg-names =
111 "dsi_pll",
112 "dsi_phy",
113 "dsi_phy_regulator";
114 reg = <0xfd922a00 0xd4>,
115 <0xfd922b00 0x2b0>,
116 <0xfd922d80 0x7b>;
117 clock-names = "iface_clk";
118 clocks = <&mmcc MDSS_AHB_CLK>;
119 vddio-supply = <&pma8084_l12>;
120 };
diff --git a/Documentation/devicetree/bindings/drm/msm/edp.txt b/Documentation/devicetree/bindings/drm/msm/edp.txt
new file mode 100644
index 000000000000..3a20f6ea5898
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/msm/edp.txt
@@ -0,0 +1,60 @@
1Qualcomm Technologies Inc. adreno/snapdragon eDP output
2
3Required properties:
4- compatible:
5 * "qcom,mdss-edp"
6- reg: Physical base address and length of the registers of controller and PLL
7- reg-names: The names of register regions. The following regions are required:
8 * "edp"
9 * "pll_base"
10- interrupts: The interrupt signal from the eDP block.
11- power-domains: Should be <&mmcc MDSS_GDSC>.
12- clocks: device clocks
13 See Documentation/devicetree/bindings/clocks/clock-bindings.txt for details.
14- clock-names: the following clocks are required:
15 * "core_clk"
16 * "iface_clk"
17 * "mdp_core_clk"
18 * "pixel_clk"
19 * "link_clk"
20- #clock-cells: The value should be 1.
21- vdda-supply: phandle to vdda regulator device node
22- lvl-vdd-supply: phandle to regulator device node which is used to supply power
23 to HPD receiving chip
24- panel-en-gpios: GPIO pin to supply power to panel.
25- panel-hpd-gpios: GPIO pin used for eDP hpd.
26
27
28Optional properties:
29- interrupt-parent: phandle to the MDP block if the interrupt signal is routed
30 through MDP block
31
32Example:
33 mdss_edp: qcom,mdss_edp@fd923400 {
34 compatible = "qcom,mdss-edp";
35 reg-names =
36 "edp",
37 "pll_base";
38 reg = <0xfd923400 0x700>,
39 <0xfd923a00 0xd4>;
40 interrupt-parent = <&mdss_mdp>;
41 interrupts = <12 0>;
42 power-domains = <&mmcc MDSS_GDSC>;
43 clock-names =
44 "core_clk",
45 "pixel_clk",
46 "iface_clk",
47 "link_clk",
48 "mdp_core_clk";
49 clocks =
50 <&mmcc MDSS_EDPAUX_CLK>,
51 <&mmcc MDSS_EDPPIXEL_CLK>,
52 <&mmcc MDSS_AHB_CLK>,
53 <&mmcc MDSS_EDPLINK_CLK>,
54 <&mmcc MDSS_MDP_CLK>;
55 #clock-cells = <1>;
56 vdda-supply = <&pma8084_l12>;
57 lvl-vdd-supply = <&lvl_vreg>;
58 panel-en-gpios = <&tlmm 137 0>;
59 panel-hpd-gpios = <&tlmm 103 0>;
60 };
diff --git a/Documentation/devicetree/bindings/drm/msm/hdmi.txt b/Documentation/devicetree/bindings/drm/msm/hdmi.txt
index a29a55f3d937..c43aa53debed 100644
--- a/Documentation/devicetree/bindings/drm/msm/hdmi.txt
+++ b/Documentation/devicetree/bindings/drm/msm/hdmi.txt
@@ -20,6 +20,9 @@ Required properties:
20Optional properties: 20Optional properties:
21- qcom,hdmi-tx-mux-en-gpio: hdmi mux enable pin 21- qcom,hdmi-tx-mux-en-gpio: hdmi mux enable pin
22- qcom,hdmi-tx-mux-sel-gpio: hdmi mux select pin 22- qcom,hdmi-tx-mux-sel-gpio: hdmi mux select pin
23- pinctrl-names: the pin control state names; should contain "default"
24- pinctrl-0: the default pinctrl state (active)
25- pinctrl-1: the "sleep" pinctrl state
23 26
24Example: 27Example:
25 28
@@ -44,5 +47,8 @@ Example:
44 qcom,hdmi-tx-hpd = <&msmgpio 72 GPIO_ACTIVE_HIGH>; 47 qcom,hdmi-tx-hpd = <&msmgpio 72 GPIO_ACTIVE_HIGH>;
45 core-vdda-supply = <&pm8921_hdmi_mvs>; 48 core-vdda-supply = <&pm8921_hdmi_mvs>;
46 hdmi-mux-supply = <&ext_3p3v>; 49 hdmi-mux-supply = <&ext_3p3v>;
50 pinctrl-names = "default", "sleep";
51 pinctrl-0 = <&hpd_active &ddc_active &cec_active>;
52 pinctrl-1 = <&hpd_suspend &ddc_suspend &cec_suspend>;
47 }; 53 };
48}; 54};
diff --git a/Documentation/devicetree/bindings/drm/tilcdc/slave.txt b/Documentation/devicetree/bindings/drm/tilcdc/slave.txt
deleted file mode 100644
index 3d2c52460dca..000000000000
--- a/Documentation/devicetree/bindings/drm/tilcdc/slave.txt
+++ /dev/null
@@ -1,18 +0,0 @@
1Device-Tree bindings for tilcdc DRM encoder slave output driver
2
3Required properties:
4 - compatible: value should be "ti,tilcdc,slave".
5 - i2c: the phandle for the i2c device the encoder slave is connected to
6
7Recommended properties:
8 - pinctrl-names, pinctrl-0: the pincontrol settings to configure
9 muxing properly for pins that connect to TFP410 device
10
11Example:
12
13 hdmi {
14 compatible = "ti,tilcdc,slave";
15 i2c = <&i2c0>;
16 pinctrl-names = "default";
17 pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
18 };
diff --git a/Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt b/Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt
index fff10da5e927..2136ee81e061 100644
--- a/Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt
+++ b/Documentation/devicetree/bindings/drm/tilcdc/tilcdc.txt
@@ -18,6 +18,12 @@ Optional properties:
18 - max-pixelclock: The maximum pixel clock that can be supported 18 - max-pixelclock: The maximum pixel clock that can be supported
19 by the lcd controller in KHz. 19 by the lcd controller in KHz.
20 20
21Optional nodes:
22
23 - port/ports: to describe a connection to an external encoder. The
24 binding follows Documentation/devicetree/bindings/graph.txt and
25 suppors a single port with a single endpoint.
26
21Example: 27Example:
22 28
23 fb: fb@4830e000 { 29 fb: fb@4830e000 {
@@ -26,4 +32,25 @@ Example:
26 interrupt-parent = <&intc>; 32 interrupt-parent = <&intc>;
27 interrupts = <36>; 33 interrupts = <36>;
28 ti,hwmods = "lcdc"; 34 ti,hwmods = "lcdc";
35
36 port {
37 lcdc_0: endpoint@0 {
38 remote-endpoint = <&hdmi_0>;
39 };
40 };
41 };
42
43 tda19988: tda19988 {
44 compatible = "nxp,tda998x";
45 reg = <0x70>;
46
47 pinctrl-names = "default", "off";
48 pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
49 pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;
50
51 port {
52 hdmi_0: endpoint@0 {
53 remote-endpoint = <&lcdc_0>;
54 };
55 };
29 }; 56 };
diff --git a/Documentation/devicetree/bindings/edac/apm-xgene-edac.txt b/Documentation/devicetree/bindings/edac/apm-xgene-edac.txt
new file mode 100644
index 000000000000..78edb80002c8
--- /dev/null
+++ b/Documentation/devicetree/bindings/edac/apm-xgene-edac.txt
@@ -0,0 +1,79 @@
1* APM X-Gene SoC EDAC node
2
3EDAC node is defined to describe on-chip error detection and correction.
4The follow error types are supported:
5
6 memory controller - Memory controller
7 PMD (L1/L2) - Processor module unit (PMD) L1/L2 cache
8
9The following section describes the EDAC DT node binding.
10
11Required properties:
12- compatible : Shall be "apm,xgene-edac".
13- regmap-csw : Regmap of the CPU switch fabric (CSW) resource.
14- regmap-mcba : Regmap of the MCB-A (memory bridge) resource.
15- regmap-mcbb : Regmap of the MCB-B (memory bridge) resource.
16- regmap-efuse : Regmap of the PMD efuse resource.
17- reg : First resource shall be the CPU bus (PCP) resource.
18- interrupts : Interrupt-specifier for MCU, PMD, L3, or SoC error
19 IRQ(s).
20
21Required properties for memory controller subnode:
22- compatible : Shall be "apm,xgene-edac-mc".
23- reg : First resource shall be the memory controller unit
24 (MCU) resource.
25- memory-controller : Instance number of the memory controller.
26
27Required properties for PMD subnode:
28- compatible : Shall be "apm,xgene-edac-pmd" or
29 "apm,xgene-edac-pmd-v2".
30- reg : First resource shall be the PMD resource.
31- pmd-controller : Instance number of the PMD controller.
32
33Example:
34 csw: csw@7e200000 {
35 compatible = "apm,xgene-csw", "syscon";
36 reg = <0x0 0x7e200000 0x0 0x1000>;
37 };
38
39 mcba: mcba@7e700000 {
40 compatible = "apm,xgene-mcb", "syscon";
41 reg = <0x0 0x7e700000 0x0 0x1000>;
42 };
43
44 mcbb: mcbb@7e720000 {
45 compatible = "apm,xgene-mcb", "syscon";
46 reg = <0x0 0x7e720000 0x0 0x1000>;
47 };
48
49 efuse: efuse@1054a000 {
50 compatible = "apm,xgene-efuse", "syscon";
51 reg = <0x0 0x1054a000 0x0 0x20>;
52 };
53
54 edac@78800000 {
55 compatible = "apm,xgene-edac";
56 #address-cells = <2>;
57 #size-cells = <2>;
58 ranges;
59 regmap-csw = <&csw>;
60 regmap-mcba = <&mcba>;
61 regmap-mcbb = <&mcbb>;
62 regmap-efuse = <&efuse>;
63 reg = <0x0 0x78800000 0x0 0x100>;
64 interrupts = <0x0 0x20 0x4>,
65 <0x0 0x21 0x4>,
66 <0x0 0x27 0x4>;
67
68 edacmc@7e800000 {
69 compatible = "apm,xgene-edac-mc";
70 reg = <0x0 0x7e800000 0x0 0x1000>;
71 memory-controller = <0>;
72 };
73
74 edacpmd@7c000000 {
75 compatible = "apm,xgene-edac-pmd";
76 reg = <0x0 0x7c000000 0x0 0x200000>;
77 pmd-controller = <0>;
78 };
79 };
diff --git a/Documentation/devicetree/bindings/fuse/nvidia,tegra20-fuse.txt b/Documentation/devicetree/bindings/fuse/nvidia,tegra20-fuse.txt
index 23e1d3194174..41372d441131 100644
--- a/Documentation/devicetree/bindings/fuse/nvidia,tegra20-fuse.txt
+++ b/Documentation/devicetree/bindings/fuse/nvidia,tegra20-fuse.txt
@@ -29,7 +29,7 @@ Example:
29 29
30 fuse@7000f800 { 30 fuse@7000f800 {
31 compatible = "nvidia,tegra20-efuse"; 31 compatible = "nvidia,tegra20-efuse";
32 reg = <0x7000F800 0x400>, 32 reg = <0x7000f800 0x400>,
33 <0x70000000 0x400>; 33 <0x70000000 0x400>;
34 clocks = <&tegra_car TEGRA20_CLK_FUSE>; 34 clocks = <&tegra_car TEGRA20_CLK_FUSE>;
35 clock-names = "fuse"; 35 clock-names = "fuse";
diff --git a/Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt b/Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt
new file mode 100644
index 000000000000..435f1bcca341
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt
@@ -0,0 +1,65 @@
1Broadcom STB "UPG GIO" GPIO controller
2
3The controller's registers are organized as sets of eight 32-bit
4registers with each set controlling a bank of up to 32 pins. A single
5interrupt is shared for all of the banks handled by the controller.
6
7Required properties:
8
9- compatible:
10 Must be "brcm,brcmstb-gpio"
11
12- reg:
13 Define the base and range of the I/O address space containing
14 the brcmstb GPIO controller registers
15
16- #gpio-cells:
17 Should be <2>. The first cell is the pin number (within the controller's
18 pin space), and the second is used for the following:
19 bit[0]: polarity (0 for active-high, 1 for active-low)
20
21- gpio-controller:
22 Specifies that the node is a GPIO controller.
23
24- brcm,gpio-bank-widths:
25 Number of GPIO lines for each bank. Number of elements must
26 correspond to number of banks suggested by the 'reg' property.
27
28Optional properties:
29
30- interrupts:
31 The interrupt shared by all GPIO lines for this controller.
32
33- interrupt-parent:
34 phandle of the parent interrupt controller
35
36- #interrupt-cells:
37 Should be <2>. The first cell is the GPIO number, the second should specify
38 flags. The following subset of flags is supported:
39 - bits[3:0] trigger type and level flags
40 1 = low-to-high edge triggered
41 2 = high-to-low edge triggered
42 4 = active high level-sensitive
43 8 = active low level-sensitive
44 Valid combinations are 1, 2, 3, 4, 8.
45 See also Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
46
47- interrupt-controller:
48 Marks the device node as an interrupt controller
49
50- interrupt-names:
51 The name of the IRQ resource used by this controller
52
53Example:
54 upg_gio: gpio@f040a700 {
55 #gpio-cells = <0x2>;
56 #interrupt-cells = <0x2>;
57 compatible = "brcm,bcm7445-gpio", "brcm,brcmstb-gpio";
58 gpio-controller;
59 interrupt-controller;
60 reg = <0xf040a700 0x80>;
61 interrupt-parent = <0xf>;
62 interrupts = <0x6>;
63 interrupt-names = "upg_gio";
64 brcm,gpio-bank-widths = <0x20 0x20 0x20 0x18>;
65 };
diff --git a/Documentation/devicetree/bindings/gpio/gpio-ath79.txt b/Documentation/devicetree/bindings/gpio/gpio-ath79.txt
new file mode 100644
index 000000000000..c522851017ae
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-ath79.txt
@@ -0,0 +1,38 @@
1Binding for Qualcomm Atheros AR7xxx/AR9xxx GPIO controller
2
3Required properties:
4- compatible: has to be "qca,<soctype>-gpio" and one of the following
5 fallbacks:
6 - "qca,ar7100-gpio"
7 - "qca,ar9340-gpio"
8- reg: Base address and size of the controllers memory area
9- gpio-controller : Marks the device node as a GPIO controller.
10- #gpio-cells : Should be two. The first cell is the pin number and the
11 second cell is used to specify optional parameters.
12- ngpios: Should be set to the number of GPIOs available on the SoC.
13
14Optional properties:
15- interrupt-parent: phandle of the parent interrupt controller.
16- interrupts: Interrupt specifier for the controllers interrupt.
17- interrupt-controller : Identifies the node as an interrupt controller
18- #interrupt-cells : Specifies the number of cells needed to encode interrupt
19 source, should be 2
20
21Please refer to interrupts.txt in this directory for details of the common
22Interrupt Controllers bindings used by client devices.
23
24Example:
25
26 gpio@18040000 {
27 compatible = "qca,ar9132-gpio", "qca,ar7100-gpio";
28 reg = <0x18040000 0x30>;
29 interrupts = <2>;
30
31 ngpios = <22>;
32
33 gpio-controller;
34 #gpio-cells = <2>;
35
36 interrupt-controller;
37 #interrupt-cells = <2>;
38 };
diff --git a/Documentation/devicetree/bindings/gpio/gpio-atlas7.txt b/Documentation/devicetree/bindings/gpio/gpio-atlas7.txt
new file mode 100644
index 000000000000..d7e123fc90b5
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-atlas7.txt
@@ -0,0 +1,50 @@
1CSR SiRFatlas7 GPIO controller bindings
2
3Required properties:
4- compatible : "sirf,atlas7-gpio"
5- reg : Address range of the pinctrl registers
6- interrupts : Interrupts used by every GPIO group
7- gpio-banks : How many gpio banks on this controller
8- gpio-controller : Indicates this device is a GPIO controller
9- interrupt-controller : Marks the device node as an interrupt controller
10
11The GPIO controller also acts as an interrupt controller. It uses the default
12two cells specifier as described in Documentation/devicetree/bindings/
13interrupt-controller/interrupts.txt.
14
15Example:
16
17 gpio_0: gpio_mediam@17040000 {
18 compatible = "sirf,atlas7-gpio";
19 reg = <0x17040000 0x1000>;
20 interrupts = <0 13 0>, <0 14 0>;
21
22 #gpio-cells = <2>;
23 #interrupt-cells = <2>;
24
25 gpio-controller;
26 interrupt-controller;
27
28 gpio-banks = <2>;
29 gpio-ranges = <&pinctrl 0 0 0>,
30 <&pinctrl 32 0 0>;
31 gpio-ranges-group-names = "lvds_gpio_grp",
32 "uart_nand_gpio_grp";
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 led1 {
39 gpios = <&gpio_1 15 0>;
40 ...
41 };
42
43 led2 {
44 gpios = <&gpio_2 34 0>;
45 ...
46 };
47 };
48
49Please refer to gpio.txt in this directory for details of the common
50gpio properties used by devices.
diff --git a/Documentation/devicetree/bindings/gpio/gpio-etraxfs.txt b/Documentation/devicetree/bindings/gpio/gpio-etraxfs.txt
new file mode 100644
index 000000000000..abf4db736c6e
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-etraxfs.txt
@@ -0,0 +1,21 @@
1Axis ETRAX FS General I/O controller bindings
2
3Required properties:
4
5- compatible:
6 - "axis,etraxfs-gio"
7- reg: Physical base address and length of the controller's registers.
8- #gpio-cells: Should be 3
9 - The first cell is the gpio offset number.
10 - The second cell is reserved and is currently unused.
11 - The third cell is the port number (hex).
12- gpio-controller: Marks the device node as a GPIO controller.
13
14Example:
15
16 gio: gpio@b001a000 {
17 compatible = "axis,etraxfs-gio";
18 reg = <0xb001a000 0x1000>;
19 gpio-controller;
20 #gpio-cells = <3>;
21 };
diff --git a/Documentation/devicetree/bindings/gpio/gpio-xlp.txt b/Documentation/devicetree/bindings/gpio/gpio-xlp.txt
new file mode 100644
index 000000000000..262ee4ddf2cb
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-xlp.txt
@@ -0,0 +1,47 @@
1Netlogic XLP Family GPIO
2========================
3
4This GPIO driver is used for following Netlogic XLP SoCs:
5 XLP832, XLP316, XLP208, XLP980, XLP532
6
7Required properties:
8-------------------
9
10- compatible: Should be one of the following:
11 - "netlogic,xlp832-gpio": For Netlogic XLP832
12 - "netlogic,xlp316-gpio": For Netlogic XLP316
13 - "netlogic,xlp208-gpio": For Netlogic XLP208
14 - "netlogic,xlp980-gpio": For Netlogic XLP980
15 - "netlogic,xlp532-gpio": For Netlogic XLP532
16- reg: Physical base address and length of the controller's registers.
17- #gpio-cells: Should be two. The first cell is the pin number and the second
18 cell is used to specify optional parameters (currently unused).
19- gpio-controller: Marks the device node as a GPIO controller.
20- nr-gpios: Number of GPIO pins supported by the controller.
21- interrupt-cells: Should be two. The first cell is the GPIO Number. The
22 second cell is used to specify flags. The following subset of flags is
23 supported:
24 - trigger type:
25 1 = low to high edge triggered.
26 2 = high to low edge triggered.
27 4 = active high level-sensitive.
28 8 = active low level-sensitive.
29- interrupts: Interrupt number for this device.
30- interrupt-parent: phandle of the parent interrupt controller.
31- interrupt-controller: Identifies the node as an interrupt controller.
32
33Example:
34
35 gpio: xlp_gpio@34000 {
36 compatible = "netlogic,xlp316-gpio";
37 reg = <0 0x34100 0x1000
38 0 0x35100 0x1000>;
39 #gpio-cells = <2>;
40 gpio-controller;
41 nr-gpios = <57>;
42
43 #interrupt-cells = <2>;
44 interrupt-parent = <&pic>;
45 interrupts = <39>;
46 interrupt-controller;
47 };
diff --git a/Documentation/devicetree/bindings/gpio/gpio-zynq.txt b/Documentation/devicetree/bindings/gpio/gpio-zynq.txt
index 986371a4be2c..db4c6a663c03 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-zynq.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-zynq.txt
@@ -6,7 +6,7 @@ Required properties:
6 - First cell is the GPIO line number 6 - First cell is the GPIO line number
7 - Second cell is used to specify optional 7 - Second cell is used to specify optional
8 parameters (unused) 8 parameters (unused)
9- compatible : Should be "xlnx,zynq-gpio-1.0" 9- compatible : Should be "xlnx,zynq-gpio-1.0" or "xlnx,zynqmp-gpio-1.0"
10- clocks : Clock specifier (see clock bindings for details) 10- clocks : Clock specifier (see clock bindings for details)
11- gpio-controller : Marks the device node as a GPIO controller. 11- gpio-controller : Marks the device node as a GPIO controller.
12- interrupts : Interrupt specifier (see interrupt bindings for 12- interrupts : Interrupt specifier (see interrupt bindings for
diff --git a/Documentation/devicetree/bindings/gpio/nxp,lpc1850-gpio.txt b/Documentation/devicetree/bindings/gpio/nxp,lpc1850-gpio.txt
new file mode 100644
index 000000000000..eb7cdd69e10b
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/nxp,lpc1850-gpio.txt
@@ -0,0 +1,39 @@
1NXP LPC18xx/43xx GPIO controller Device Tree Bindings
2-----------------------------------------------------
3
4Required properties:
5- compatible : Should be "nxp,lpc1850-gpio"
6- reg : Address and length of the register set for the device
7- clocks : Clock specifier (see clock bindings for details)
8- gpio-controller : Marks the device node as a GPIO controller.
9- #gpio-cells : Should be two
10 - First cell is the GPIO line number
11 - Second cell is used to specify polarity
12
13Optional properties:
14- gpio-ranges : Mapping between GPIO and pinctrl
15
16Example:
17#define LPC_GPIO(port, pin) (port * 32 + pin)
18#define LPC_PIN(port, pin) (0x##port * 32 + pin)
19
20gpio: gpio@400f4000 {
21 compatible = "nxp,lpc1850-gpio";
22 reg = <0x400f4000 0x4000>;
23 clocks = <&ccu1 CLK_CPU_GPIO>;
24 gpio-controller;
25 #gpio-cells = <2>;
26 gpio-ranges = <&pinctrl LPC_GPIO(0,0) LPC_PIN(0,0) 2>,
27 ...
28 <&pinctrl LPC_GPIO(7,19) LPC_PIN(f,5) 7>;
29};
30
31gpio_joystick {
32 compatible = "gpio-keys-polled";
33 ...
34
35 button@0 {
36 ...
37 gpios = <&gpio LPC_GPIO(4,8) GPIO_ACTIVE_LOW>;
38 };
39};
diff --git a/Documentation/devicetree/bindings/h8300/cpu.txt b/Documentation/devicetree/bindings/h8300/cpu.txt
new file mode 100644
index 000000000000..70cd58608f4b
--- /dev/null
+++ b/Documentation/devicetree/bindings/h8300/cpu.txt
@@ -0,0 +1,13 @@
1* H8/300 CPU bindings
2
3Required properties:
4
5- compatible: Compatible property value should be "renesas,h8300".
6- clock-frequency: Contains the clock frequency for CPU, in Hz.
7
8Example:
9
10 cpu@0 {
11 compatible = "renesas,h8300";
12 clock-frequency = <20000000>;
13 };
diff --git a/Documentation/devicetree/bindings/hwlock/hwlock.txt b/Documentation/devicetree/bindings/hwlock/hwlock.txt
new file mode 100644
index 000000000000..085d1f5c916a
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwlock/hwlock.txt
@@ -0,0 +1,59 @@
1Generic hwlock bindings
2=======================
3
4Generic bindings that are common to all the hwlock platform specific driver
5implementations.
6
7Please also look through the individual platform specific hwlock binding
8documentations for identifying any additional properties specific to that
9platform.
10
11hwlock providers:
12=================
13
14Required properties:
15- #hwlock-cells: Specifies the number of cells needed to represent a
16 specific lock.
17
18hwlock users:
19=============
20
21Consumers that require specific hwlock(s) should specify them using the
22property "hwlocks", and an optional "hwlock-names" property.
23
24Required properties:
25- hwlocks: List of phandle to a hwlock provider node and an
26 associated hwlock args specifier as indicated by
27 #hwlock-cells. The list can have just a single hwlock
28 or multiple hwlocks, with each hwlock represented by
29 a phandle and a corresponding args specifier.
30
31Optional properties:
32- hwlock-names: List of hwlock name strings defined in the same order
33 as the hwlocks, with one name per hwlock. Consumers can
34 use the hwlock-names to match and get a specific hwlock.
35
36
371. Example of a node using a single specific hwlock:
38
39The following example has a node requesting a hwlock in the bank defined by
40the node hwlock1. hwlock1 is a hwlock provider with an argument specifier
41of length 1.
42
43 node {
44 ...
45 hwlocks = <&hwlock1 2>;
46 ...
47 };
48
492. Example of a node using multiple specific hwlocks:
50
51The following example has a node requesting two hwlocks, a hwlock within
52the hwlock device node 'hwlock1' with #hwlock-cells value of 1, and another
53hwlock within the hwlock device node 'hwlock2' with #hwlock-cells value of 2.
54
55 node {
56 ...
57 hwlocks = <&hwlock1 2>, <&hwlock2 0 3>;
58 ...
59 };
diff --git a/Documentation/devicetree/bindings/hwlock/omap-hwspinlock.txt b/Documentation/devicetree/bindings/hwlock/omap-hwspinlock.txt
new file mode 100644
index 000000000000..2c9804f4f4ac
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwlock/omap-hwspinlock.txt
@@ -0,0 +1,26 @@
1OMAP4+ HwSpinlock Driver
2========================
3
4Required properties:
5- compatible: Should be "ti,omap4-hwspinlock" for
6 OMAP44xx, OMAP54xx, AM33xx, AM43xx, DRA7xx SoCs
7- reg: Contains the hwspinlock module register address space
8 (base address and length)
9- ti,hwmods: Name of the hwmod associated with the hwspinlock device
10- #hwlock-cells: Should be 1. The OMAP hwspinlock users will use a
11 0-indexed relative hwlock number as the argument
12 specifier value for requesting a specific hwspinlock
13 within a hwspinlock bank.
14
15Please look at the generic hwlock binding for usage information for consumers,
16"Documentation/devicetree/bindings/hwlock/hwlock.txt"
17
18Example:
19
20/* OMAP4 */
21hwspinlock: spinlock@4a0f6000 {
22 compatible = "ti,omap4-hwspinlock";
23 reg = <0x4a0f6000 0x1000>;
24 ti,hwmods = "spinlock";
25 #hwlock-cells = <1>;
26};
diff --git a/Documentation/devicetree/bindings/hwlock/qcom-hwspinlock.txt b/Documentation/devicetree/bindings/hwlock/qcom-hwspinlock.txt
new file mode 100644
index 000000000000..4563f524556b
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwlock/qcom-hwspinlock.txt
@@ -0,0 +1,39 @@
1Qualcomm Hardware Mutex Block:
2
3The hardware block provides mutexes utilized between different processors on
4the SoC as part of the communication protocol used by these processors.
5
6- compatible:
7 Usage: required
8 Value type: <string>
9 Definition: must be one of:
10 "qcom,sfpb-mutex",
11 "qcom,tcsr-mutex"
12
13- syscon:
14 Usage: required
15 Value type: <prop-encoded-array>
16 Definition: one cell containing:
17 syscon phandle
18 offset of the hwmutex block within the syscon
19 stride of the hwmutex registers
20
21- #hwlock-cells:
22 Usage: required
23 Value type: <u32>
24 Definition: must be 1, the specified cell represent the lock id
25 (hwlock standard property, see hwlock.txt)
26
27Example:
28
29 tcsr_mutex_block: syscon@fd484000 {
30 compatible = "syscon";
31 reg = <0xfd484000 0x2000>;
32 };
33
34 hwlock@fd484000 {
35 compatible = "qcom,tcsr-mutex";
36 syscon = <&tcsr_mutex_block 0 0x80>;
37
38 #hwlock-cells = <1>;
39 };
diff --git a/Documentation/devicetree/bindings/hwlock/sirf,hwspinlock.txt b/Documentation/devicetree/bindings/hwlock/sirf,hwspinlock.txt
new file mode 100644
index 000000000000..9bb1240a68e0
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwlock/sirf,hwspinlock.txt
@@ -0,0 +1,28 @@
1SIRF Hardware spinlock device Binding
2-----------------------------------------------
3
4Required properties :
5- compatible : shall contain only one of the following:
6 "sirf,hwspinlock"
7
8- reg : the register address of hwspinlock
9
10- #hwlock-cells : hwlock users only use the hwlock id to represent a specific
11 hwlock, so the number of cells should be <1> here.
12
13Please look at the generic hwlock binding for usage information for consumers,
14"Documentation/devicetree/bindings/hwlock/hwlock.txt"
15
16Example of hwlock provider:
17 hwlock {
18 compatible = "sirf,hwspinlock";
19 reg = <0x13240000 0x00010000>;
20 #hwlock-cells = <1>;
21 };
22
23Example of hwlock users:
24 node {
25 ...
26 hwlocks = <&hwlock 2>;
27 ...
28 };
diff --git a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
index fcca8e744f41..a04a80f9cc70 100644
--- a/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
+++ b/Documentation/devicetree/bindings/hwmon/ntc_thermistor.txt
@@ -9,6 +9,7 @@ Requires node properties:
9 "murata,ncp21wb473" 9 "murata,ncp21wb473"
10 "murata,ncp03wb473" 10 "murata,ncp03wb473"
11 "murata,ncp15wl333" 11 "murata,ncp15wl333"
12 "murata,ncp03wf104"
12 13
13/* Usage of vendor name "ntc" is deprecated */ 14/* Usage of vendor name "ntc" is deprecated */
14<DEPRECATED> "ntc,ncp15wb473" 15<DEPRECATED> "ntc,ncp15wb473"
diff --git a/Documentation/devicetree/bindings/i2c/i2c-at91.txt b/Documentation/devicetree/bindings/i2c/i2c-at91.txt
index 388f0a275fba..6e81dc153f3b 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-at91.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-at91.txt
@@ -2,8 +2,8 @@ I2C for Atmel platforms
2 2
3Required properties : 3Required properties :
4- compatible : Must be "atmel,at91rm9200-i2c", "atmel,at91sam9261-i2c", 4- compatible : Must be "atmel,at91rm9200-i2c", "atmel,at91sam9261-i2c",
5 "atmel,at91sam9260-i2c", "atmel,at91sam9g20-i2c", "atmel,at91sam9g10-i2c" 5 "atmel,at91sam9260-i2c", "atmel,at91sam9g20-i2c", "atmel,at91sam9g10-i2c",
6 or "atmel,at91sam9x5-i2c" 6 "atmel,at91sam9x5-i2c" or "atmel,sama5d2-i2c"
7- reg: physical base address of the controller and length of memory mapped 7- reg: physical base address of the controller and length of memory mapped
8 region. 8 region.
9- interrupts: interrupt number to the cpu. 9- interrupts: interrupt number to the cpu.
@@ -13,6 +13,10 @@ Required properties :
13 13
14Optional properties: 14Optional properties:
15- clock-frequency: Desired I2C bus frequency in Hz, otherwise defaults to 100000 15- clock-frequency: Desired I2C bus frequency in Hz, otherwise defaults to 100000
16- dmas: A list of two dma specifiers, one for each entry in dma-names.
17- dma-names: should contain "tx" and "rx".
18- atmel,fifo-size: maximum number of data the RX and TX FIFOs can store for FIFO
19 capable I2C controllers.
16- Child nodes conforming to i2c bus binding 20- Child nodes conforming to i2c bus binding
17 21
18Examples : 22Examples :
@@ -32,3 +36,25 @@ i2c0: i2c@fff84000 {
32 pagesize = <128>; 36 pagesize = <128>;
33 } 37 }
34} 38}
39
40i2c0: i2c@f8034600 {
41 compatible = "atmel,sama5d2-i2c";
42 reg = <0xf8034600 0x100>;
43 interrupts = <19 IRQ_TYPE_LEVEL_HIGH 7>;
44 dmas = <&dma0
45 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1))
46 AT91_XDMAC_DT_PERID(11)>,
47 <&dma0
48 (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1))
49 AT91_XDMAC_DT_PERID(12)>;
50 dma-names = "tx", "rx";
51 #address-cells = <1>;
52 #size-cells = <0>;
53 clocks = <&flx0>;
54 atmel,fifo-size = <16>;
55
56 wm8731: wm8731@1a {
57 compatible = "wm8731";
58 reg = <0x1a>;
59 };
60};
diff --git a/Documentation/devicetree/bindings/i2c/i2c-brcmstb.txt b/Documentation/devicetree/bindings/i2c/i2c-brcmstb.txt
new file mode 100644
index 000000000000..d6f724efdcf2
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-brcmstb.txt
@@ -0,0 +1,28 @@
1Broadcom stb bsc iic master controller
2
3Required properties:
4
5- compatible: should be "brcm,brcmstb-i2c"
6- clock-frequency: 32-bit decimal value of iic master clock freqency in Hz
7 valid values are 375000, 390000, 187500, 200000
8 93750, 97500, 46875 and 50000
9- reg: specifies the base physical address and size of the registers
10
11Optional properties :
12
13- interrupt-parent: specifies the phandle to the parent interrupt controller
14 this one is cascaded from
15- interrupts: specifies the interrupt number, the irq line to be used
16- interrupt-names: Interrupt name string
17
18Example:
19
20bsca: i2c@f0406200 {
21 clock-frequency = <390000>;
22 compatible = "brcm,brcmstb-i2c";
23 interrupt-parent = <&irq0_intc>;
24 reg = <0xf0406200 0x58>;
25 interrupts = <0x18>;
26 interrupt-names = "upg_bsca";
27};
28
diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt b/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
new file mode 100644
index 000000000000..0ce6fa3242f0
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
@@ -0,0 +1,41 @@
1* Mediatek's I2C controller
2
3The Mediatek's I2C controller is used to interface with I2C devices.
4
5Required properties:
6 - compatible: value should be either of the following.
7 (a) "mediatek,mt6577-i2c", for i2c compatible with mt6577 i2c.
8 (b) "mediatek,mt6589-i2c", for i2c compatible with mt6589 i2c.
9 (c) "mediatek,mt8127-i2c", for i2c compatible with mt8127 i2c.
10 (d) "mediatek,mt8135-i2c", for i2c compatible with mt8135 i2c.
11 (e) "mediatek,mt8173-i2c", for i2c compatible with mt8173 i2c.
12 - reg: physical base address of the controller and dma base, length of memory
13 mapped region.
14 - interrupts: interrupt number to the cpu.
15 - clock-div: the fixed value for frequency divider of clock source in i2c
16 module. Each IC may be different.
17 - clocks: clock name from clock manager
18 - clock-names: Must include "main" and "dma", if enable have-pmic need include
19 "pmic" extra.
20
21Optional properties:
22 - clock-frequency: Frequency in Hz of the bus when transfer, the default value
23 is 100000.
24 - mediatek,have-pmic: platform can control i2c form special pmic side.
25 Only mt6589 and mt8135 support this feature.
26 - mediatek,use-push-pull: IO config use push-pull mode.
27
28Example:
29
30 i2c0: i2c@1100d000 {
31 compatible = "mediatek,mt6577-i2c";
32 reg = <0x1100d000 0x70>,
33 <0x11000300 0x80>;
34 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_LOW>;
35 clock-frequency = <400000>;
36 mediatek,have-pmic;
37 clock-div = <16>;
38 clocks = <&i2c0_ck>, <&ap_dma_ck>;
39 clock-names = "main", "dma";
40 };
41
diff --git a/Documentation/devicetree/bindings/i2c/i2c-xgene-slimpro.txt b/Documentation/devicetree/bindings/i2c/i2c-xgene-slimpro.txt
new file mode 100644
index 000000000000..f6b2c20cfbf6
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-xgene-slimpro.txt
@@ -0,0 +1,15 @@
1APM X-Gene SLIMpro Mailbox I2C Driver
2
3An I2C controller accessed over the "SLIMpro" mailbox.
4
5Required properties :
6
7 - compatible : should be "apm,xgene-slimpro-i2c"
8 - mboxes : use the label reference for the mailbox as the first parameter.
9 The second parameter is the channel number.
10
11Example :
12 i2cslimpro {
13 compatible = "apm,xgene-slimpro-i2c";
14 mboxes = <&mailbox 0>;
15 };
diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
index ad0c4ac916dd..00f8652e193a 100644
--- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt
+++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt
@@ -19,8 +19,7 @@ adi,adt7475 +/-1C TDM Extended Temp Range I.C
19adi,adt7476 +/-1C TDM Extended Temp Range I.C 19adi,adt7476 +/-1C TDM Extended Temp Range I.C
20adi,adt7490 +/-1C TDM Extended Temp Range I.C 20adi,adt7490 +/-1C TDM Extended Temp Range I.C
21adi,adxl345 Three-Axis Digital Accelerometer 21adi,adxl345 Three-Axis Digital Accelerometer
22adi,adxl346 Three-Axis Digital Accelerometer 22adi,adxl346 Three-Axis Digital Accelerometer (backward-compatibility value "adi,adxl345" must be listed too)
23adi,adxl34x Three-Axis Digital Accelerometer
24at,24c08 i2c serial eeprom (24cxx) 23at,24c08 i2c serial eeprom (24cxx)
25atmel,24c00 i2c serial eeprom (24cxx) 24atmel,24c00 i2c serial eeprom (24cxx)
26atmel,24c01 i2c serial eeprom (24cxx) 25atmel,24c01 i2c serial eeprom (24cxx)
diff --git a/Documentation/devicetree/bindings/iio/adc/berlin2_adc.txt b/Documentation/devicetree/bindings/iio/adc/berlin2_adc.txt
new file mode 100644
index 000000000000..908334c6b07f
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/berlin2_adc.txt
@@ -0,0 +1,19 @@
1* Berlin Analog to Digital Converter (ADC)
2
3The Berlin ADC has 8 channels, with one connected to a temperature sensor.
4It is part of the system controller register set. The ADC node should be a
5sub-node of the system controller node.
6
7Required properties:
8- compatible: must be "marvell,berlin2-adc"
9- interrupts: the interrupts for the ADC and the temperature sensor
10- interrupt-names: should be "adc" and "tsen"
11
12Example:
13
14adc: adc {
15 compatible = "marvell,berlin2-adc";
16 interrupt-parent = <&sic>;
17 interrupts = <12>, <14>;
18 interrupt-names = "adc", "tsen";
19};
diff --git a/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt b/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt
index 42ca7deec97d..15ca6b47958e 100644
--- a/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt
+++ b/Documentation/devicetree/bindings/iio/adc/ti-adc128s052.txt
@@ -1,7 +1,7 @@
1* Texas Instruments' ADC128S052 ADC chip 1* Texas Instruments' ADC128S052 and ADC122S021 ADC chip
2 2
3Required properties: 3Required properties:
4 - compatible: Should be "ti,adc128s052" 4 - compatible: Should be "ti,adc128s052" or "ti,adc122s021"
5 - reg: spi chip select number for the device 5 - reg: spi chip select number for the device
6 - vref-supply: The regulator supply for ADC reference voltage 6 - vref-supply: The regulator supply for ADC reference voltage
7 7
diff --git a/Documentation/devicetree/bindings/iio/adc/vf610-adc.txt b/Documentation/devicetree/bindings/iio/adc/vf610-adc.txt
index 1a4a43d5c9ea..3eb40e20c143 100644
--- a/Documentation/devicetree/bindings/iio/adc/vf610-adc.txt
+++ b/Documentation/devicetree/bindings/iio/adc/vf610-adc.txt
@@ -11,6 +11,13 @@ Required properties:
11- clock-names: Must contain "adc", matching entry in the clocks property. 11- clock-names: Must contain "adc", matching entry in the clocks property.
12- vref-supply: The regulator supply ADC reference voltage. 12- vref-supply: The regulator supply ADC reference voltage.
13 13
14Recommended properties:
15- fsl,adck-max-frequency: Maximum frequencies according to datasheets operating
16 requirements. Three values are required, depending on conversion mode:
17 - Frequency in normal mode (ADLPC=0, ADHSC=0)
18 - Frequency in high-speed mode (ADLPC=0, ADHSC=1)
19 - Frequency in low-power mode (ADLPC=1, ADHSC=0)
20
14Example: 21Example:
15adc0: adc@4003b000 { 22adc0: adc@4003b000 {
16 compatible = "fsl,vf610-adc"; 23 compatible = "fsl,vf610-adc";
@@ -18,5 +25,7 @@ adc0: adc@4003b000 {
18 interrupts = <0 53 0x04>; 25 interrupts = <0 53 0x04>;
19 clocks = <&clks VF610_CLK_ADC0>; 26 clocks = <&clks VF610_CLK_ADC0>;
20 clock-names = "adc"; 27 clock-names = "adc";
28 fsl,adck-max-frequency = <30000000>, <40000000>,
29 <20000000>;
21 vref-supply = <&reg_vcc_3v3_mcu>; 30 vref-supply = <&reg_vcc_3v3_mcu>;
22}; 31};
diff --git a/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt b/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt
new file mode 100644
index 000000000000..e4d8f1c52f4a
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/imu/inv_mpu6050.txt
@@ -0,0 +1,17 @@
1InvenSense MPU-6050 Six-Axis (Gyro + Accelerometer) MEMS MotionTracking Device
2
3http://www.invensense.com/mems/gyro/mpu6050.html
4
5Required properties:
6 - compatible : should be "invensense,mpu6050"
7 - reg : the I2C address of the sensor
8 - interrupt-parent : should be the phandle for the interrupt controller
9 - interrupts : interrupt mapping for GPIO IRQ
10
11Example:
12 mpu6050@68 {
13 compatible = "invensense,mpu6050";
14 reg = <0x68>;
15 interrupt-parent = <&gpio1>;
16 interrupts = <18 1>;
17 };
diff --git a/Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt b/Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt
new file mode 100644
index 000000000000..9f263b7df162
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/magnetometer/bmc150_magn.txt
@@ -0,0 +1,22 @@
1* Bosch BMC150 magnetometer sensor
2
3http://ae-bst.resource.bosch.com/media/products/dokumente/bmc150/BST-BMC150-DS000-04.pdf
4
5Required properties:
6
7 - compatible : should be "bosch,bmc150_magn"
8 - reg : the I2C address of the magnetometer
9
10Optional properties:
11
12 - interrupt-parent : phandle to the parent interrupt controller
13 - interrupts : interrupt mapping for GPIO IRQ
14
15Example:
16
17bmc150_magn@12 {
18 compatible = "bosch,bmc150_magn";
19 reg = <0x12>;
20 interrupt-parent = <&gpio1>;
21 interrupts = <0 1>;
22};
diff --git a/Documentation/devicetree/bindings/iio/st-sensors.txt b/Documentation/devicetree/bindings/iio/st-sensors.txt
index d2aaca974531..8a6be3bdf267 100644
--- a/Documentation/devicetree/bindings/iio/st-sensors.txt
+++ b/Documentation/devicetree/bindings/iio/st-sensors.txt
@@ -30,6 +30,7 @@ Accelerometers:
30- st,lsm330d-accel 30- st,lsm330d-accel
31- st,lsm330dl-accel 31- st,lsm330dl-accel
32- st,lsm330dlc-accel 32- st,lsm330dlc-accel
33- st,lis331dl-accel
33- st,lis331dlh-accel 34- st,lis331dlh-accel
34- st,lsm303dl-accel 35- st,lsm303dl-accel
35- st,lsm303dlm-accel 36- st,lsm303dlm-accel
@@ -45,6 +46,7 @@ Gyroscopes:
45- st,lsm330-gyro 46- st,lsm330-gyro
46 47
47Magnetometers: 48Magnetometers:
49- st,lsm303dlh-magn
48- st,lsm303dlhc-magn 50- st,lsm303dlhc-magn
49- st,lsm303dlm-magn 51- st,lsm303dlm-magn
50- st,lis3mdl-magn 52- st,lis3mdl-magn
diff --git a/Documentation/devicetree/bindings/iio/temperature/mlx90614.txt b/Documentation/devicetree/bindings/iio/temperature/mlx90614.txt
new file mode 100644
index 000000000000..9be57b036092
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/temperature/mlx90614.txt
@@ -0,0 +1,24 @@
1* Melexis MLX90614 contactless IR temperature sensor
2
3http://melexis.com/Infrared-Thermometer-Sensors/Infrared-Thermometer-Sensors/MLX90614-615.aspx
4
5Required properties:
6
7 - compatible: should be "melexis,mlx90614"
8 - reg: the I2C address of the sensor
9
10Optional properties:
11
12 - wakeup-gpios: device tree identifier of the GPIO connected to the SDA line
13 to hold low in order to wake up the device. In normal operation, the
14 GPIO is set as input and will not interfere in I2C communication. There
15 is no need for a GPIO driving the SCL line. If no GPIO is given, power
16 management is disabled.
17
18Example:
19
20mlx90614@5a {
21 compatible = "melexis,mlx90614";
22 reg = <0x5a>;
23 wakeup-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
24};
diff --git a/Documentation/devicetree/bindings/input/ti,drv2665.txt b/Documentation/devicetree/bindings/input/ti,drv2665.txt
new file mode 100644
index 000000000000..1ba97ac04305
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/ti,drv2665.txt
@@ -0,0 +1,17 @@
1* Texas Instruments - drv2665 Haptics driver
2
3Required properties:
4 - compatible - "ti,drv2665" - DRV2665
5 - reg - I2C slave address
6 - vbat-supply - Required supply regulator
7
8Example:
9
10haptics: haptics@59 {
11 compatible = "ti,drv2665";
12 reg = <0x59>;
13 vbat-supply = <&vbat>;
14};
15
16For more product information please see the link below:
17http://www.ti.com/product/drv2665
diff --git a/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt b/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt
index 6c4fb34823d3..b1163bf97146 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt
@@ -42,6 +42,27 @@ Optional properties:
42 hardware knob for adjusting the amount of "settling 42 hardware knob for adjusting the amount of "settling
43 time". 43 time".
44 44
45- child "adc"
46 ti,chan-step-opendelay: List of open delays for each channel of
47 ADC in the order of ti,adc-channels. The
48 value corresponds to the number of ADC
49 clock cycles to wait after applying the
50 step configuration registers and before
51 sending the start of ADC conversion.
52 Maximum value is 0x3FFFF.
53 ti,chan-step-sampledelay: List of sample delays for each channel
54 of ADC in the order of ti,adc-channels.
55 The value corresponds to the number of
56 ADC clock cycles to sample (to hold
57 start of conversion high).
58 Maximum value is 0xFF.
59 ti,chan-step-avg: Number of averages to be performed for each
60 channel of ADC. If average is 16 then input
61 is sampled 16 times and averaged to get more
62 accurate value. This increases the time taken
63 by ADC to generate a sample. Valid range is 0
64 average to 16 averages. Maximum value is 16.
65
45Example: 66Example:
46 tscadc: tscadc@44e0d000 { 67 tscadc: tscadc@44e0d000 {
47 compatible = "ti,am3359-tscadc"; 68 compatible = "ti,am3359-tscadc";
@@ -55,5 +76,8 @@ Example:
55 76
56 adc { 77 adc {
57 ti,adc-channels = <4 5 6 7>; 78 ti,adc-channels = <4 5 6 7>;
79 ti,chan-step-opendelay = <0x098 0x3ffff 0x098 0x0>;
80 ti,chan-step-sampledelay = <0xff 0x0 0xf 0x0>;
81 ti,chan-step-avg = <16 2 4 8>;
58 }; 82 };
59 } 83 }
diff --git a/Documentation/devicetree/bindings/input/touchscreen/tsc2005.txt b/Documentation/devicetree/bindings/input/touchscreen/tsc2005.txt
index 4b641c7bf1c2..09089a6d69ed 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/tsc2005.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/tsc2005.txt
@@ -32,8 +32,8 @@ Example:
32 touchscreen-fuzz-x = <4>; 32 touchscreen-fuzz-x = <4>;
33 touchscreen-fuzz-y = <7>; 33 touchscreen-fuzz-y = <7>;
34 touchscreen-fuzz-pressure = <2>; 34 touchscreen-fuzz-pressure = <2>;
35 touchscreen-max-x = <4096>; 35 touchscreen-size-x = <4096>;
36 touchscreen-max-y = <4096>; 36 touchscreen-size-y = <4096>;
37 touchscreen-max-pressure = <2048>; 37 touchscreen-max-pressure = <2048>;
38 38
39 ti,x-plate-ohms = <280>; 39 ti,x-plate-ohms = <280>;
diff --git a/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.txt b/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.txt
index f292917fa00d..0e9f09a6a2fe 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/atmel,aic.txt
@@ -2,7 +2,7 @@
2 2
3Required properties: 3Required properties:
4- compatible: Should be "atmel,<chip>-aic" 4- compatible: Should be "atmel,<chip>-aic"
5 <chip> can be "at91rm9200", "sama5d3" or "sama5d4" 5 <chip> can be "at91rm9200", "sama5d2", "sama5d3" or "sama5d4"
6- interrupt-controller: Identifies the node as an interrupt controller. 6- interrupt-controller: Identifies the node as an interrupt controller.
7- interrupt-parent: For single AIC system, it is an empty property. 7- interrupt-parent: For single AIC system, it is an empty property.
8- #interrupt-cells: The number of cells to define the interrupts. It should be 3. 8- #interrupt-cells: The number of cells to define the interrupts. It should be 3.
diff --git a/Documentation/devicetree/bindings/interrupt-controller/ingenic,intc.txt b/Documentation/devicetree/bindings/interrupt-controller/ingenic,intc.txt
new file mode 100644
index 000000000000..5f89fb635a1b
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/ingenic,intc.txt
@@ -0,0 +1,28 @@
1Ingenic SoC Interrupt Controller
2
3Required properties:
4
5- compatible : should be "ingenic,<socname>-intc". Valid strings are:
6 ingenic,jz4740-intc
7 ingenic,jz4770-intc
8 ingenic,jz4775-intc
9 ingenic,jz4780-intc
10- reg : Specifies base physical address and size of the registers.
11- interrupt-controller : Identifies the node as an interrupt controller
12- #interrupt-cells : Specifies the number of cells needed to encode an
13 interrupt source. The value shall be 1.
14- interrupt-parent : phandle of the CPU interrupt controller.
15- interrupts : Specifies the CPU interrupt the controller is connected to.
16
17Example:
18
19intc: interrupt-controller@10001000 {
20 compatible = "ingenic,jz4740-intc";
21 reg = <0x10001000 0x14>;
22
23 interrupt-controller;
24 #interrupt-cells = <1>;
25
26 interrupt-parent = <&cpuintc>;
27 interrupts = <2>;
28};
diff --git a/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-cpu-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-cpu-intc.txt
new file mode 100644
index 000000000000..aabce7810d29
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-cpu-intc.txt
@@ -0,0 +1,44 @@
1Binding for Qualcomm Atheros AR7xxx/AR9XXX CPU interrupt controller
2
3On most SoC the IRQ controller need to flush the DDR FIFO before running
4the interrupt handler of some devices. This is configured using the
5qca,ddr-wb-channels and qca,ddr-wb-channel-interrupts properties.
6
7Required Properties:
8
9- compatible: has to be "qca,<soctype>-cpu-intc", "qca,ar7100-cpu-intc"
10 as fallback
11- interrupt-controller : Identifies the node as an interrupt controller
12- #interrupt-cells : Specifies the number of cells needed to encode interrupt
13 source, should be 1 for intc
14
15Please refer to interrupts.txt in this directory for details of the common
16Interrupt Controllers bindings used by client devices.
17
18Optional Properties:
19
20- qca,ddr-wb-channel-interrupts: List of the interrupts needing a write
21 buffer flush
22- qca,ddr-wb-channels: List of phandles to the write buffer channels for
23 each interrupt. If qca,ddr-wb-channel-interrupts is not present the interrupt
24 default to the entry's index.
25
26Example:
27
28 interrupt-controller {
29 compatible = "qca,ar9132-cpu-intc", "qca,ar7100-cpu-intc";
30
31 interrupt-controller;
32 #interrupt-cells = <1>;
33
34 qca,ddr-wb-channel-interrupts = <2>, <3>, <4>, <5>;
35 qca,ddr-wb-channels = <&ddr_ctrl 3>, <&ddr_ctrl 2>,
36 <&ddr_ctrl 0>, <&ddr_ctrl 1>;
37 };
38
39 ...
40
41 ddr_ctrl: memory-controller@18000000 {
42 ...
43 #qca,ddr-wb-channel-cells = <1>;
44 };
diff --git a/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt
new file mode 100644
index 000000000000..391717a68f3b
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/qca,ath79-misc-intc.txt
@@ -0,0 +1,30 @@
1Binding for Qualcomm Atheros AR7xxx/AR9XXX MISC interrupt controller
2
3The MISC interrupt controller is a secondary controller for lower priority
4interrupt.
5
6Required Properties:
7- compatible: has to be "qca,<soctype>-cpu-intc", "qca,ar7100-misc-intc"
8 as fallback
9- reg: Base address and size of the controllers memory area
10- interrupt-parent: phandle of the parent interrupt controller.
11- interrupts: Interrupt specifier for the controllers interrupt.
12- interrupt-controller : Identifies the node as an interrupt controller
13- #interrupt-cells : Specifies the number of cells needed to encode interrupt
14 source, should be 1
15
16Please refer to interrupts.txt in this directory for details of the common
17Interrupt Controllers bindings used by client devices.
18
19Example:
20
21 interrupt-controller@18060010 {
22 compatible = "qca,ar9132-misc-intc", qca,ar7100-misc-intc";
23 reg = <0x18060010 0x4>;
24
25 interrupt-parent = <&cpuintc>;
26 interrupts = <6>;
27
28 interrupt-controller;
29 #interrupt-cells = <1>;
30 };
diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,h8300h-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/renesas,h8300h-intc.txt
new file mode 100644
index 000000000000..56e8d82aff34
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,h8300h-intc.txt
@@ -0,0 +1,22 @@
1* H8/300H Interrupt controller
2
3Required properties:
4
5- compatible: has to be "renesas,h8300h-intc", "renesas,h8300-intc" as fallback.
6- #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in
7 interrupts.txt in this directory
8- regs: Base address of interrupt controller registers.
9
10Optional properties:
11
12- any properties, listed in interrupts.txt, and any standard resource allocation
13 properties
14
15Example:
16
17 h8intc: interrupt-controller@fee012 {
18 compatible = "renesas,h8300h-intc", "renesas,h8300-intc";
19 #interrupt-cells = <2>;
20 interrupt-controller;
21 reg = <0xfee012 7>;
22 };
diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,h8s-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/renesas,h8s-intc.txt
new file mode 100644
index 000000000000..faded2b1559b
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,h8s-intc.txt
@@ -0,0 +1,22 @@
1* H8S Interrupt controller
2
3Required properties:
4
5- compatible: has to be "renesas,h8s-intc", "renesas,h8300-intc" as fallback.
6- #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in
7 interrupts.txt in this directory
8- regs: Base address of interrupt controller registers.
9
10Optional properties:
11
12- any properties, listed in interrupts.txt, and any standard resource allocation
13 properties
14
15Example:
16
17 h8intc: interrupt-controller@fffe00 {
18 compatible = "renesas,h8s-intc", "renesas,h8300-intc";
19 #interrupt-cells = <2>;
20 interrupt-controller;
21 reg = <0xfffe00 24>;
22 };
diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt
index 4f7946ae8adc..772c550d3b4b 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt
@@ -13,9 +13,12 @@ Required properties:
13- reg: Base address and length of each register bank used by the external 13- reg: Base address and length of each register bank used by the external
14 IRQ pins driven by the interrupt controller hardware module. The base 14 IRQ pins driven by the interrupt controller hardware module. The base
15 addresses, length and number of required register banks varies with soctype. 15 addresses, length and number of required register banks varies with soctype.
16 16- interrupt-controller: Identifies the node as an interrupt controller.
17- #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in 17- #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in
18 interrupts.txt in this directory 18 interrupts.txt in this directory.
19- interrupts: Must contain a list of interrupt specifiers. For each interrupt
20 provided by this irqpin controller instance, there must be one entry,
21 referring to the corresponding parent interrupt.
19 22
20Optional properties: 23Optional properties:
21 24
@@ -25,3 +28,35 @@ Optional properties:
25 if different from the default 4 bits 28 if different from the default 4 bits
26- control-parent: disable and enable interrupts on the parent interrupt 29- control-parent: disable and enable interrupts on the parent interrupt
27 controller, needed for some broken implementations 30 controller, needed for some broken implementations
31- clocks: Must contain a reference to the functional clock. This property is
32 mandatory if the hardware implements a controllable functional clock for
33 the irqpin controller instance.
34- power-domains: Must contain a reference to the power domain. This property is
35 mandatory if the irqpin controller instance is part of a controllable power
36 domain.
37
38
39Example
40-------
41
42 irqpin1: interrupt-controller@e6900004 {
43 compatible = "renesas,intc-irqpin-r8a7740",
44 "renesas,intc-irqpin";
45 #interrupt-cells = <2>;
46 interrupt-controller;
47 reg = <0xe6900004 4>,
48 <0xe6900014 4>,
49 <0xe6900024 1>,
50 <0xe6900044 1>,
51 <0xe6900064 1>;
52 interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH
53 0 149 IRQ_TYPE_LEVEL_HIGH
54 0 149 IRQ_TYPE_LEVEL_HIGH
55 0 149 IRQ_TYPE_LEVEL_HIGH
56 0 149 IRQ_TYPE_LEVEL_HIGH
57 0 149 IRQ_TYPE_LEVEL_HIGH
58 0 149 IRQ_TYPE_LEVEL_HIGH
59 0 149 IRQ_TYPE_LEVEL_HIGH>;
60 clocks = <&mstp2_clks R8A7740_CLK_INTCA>;
61 power-domains = <&pd_a4s>;
62 };
diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt b/Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt
new file mode 100644
index 000000000000..c03eec116872
--- /dev/null
+++ b/Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt
@@ -0,0 +1,37 @@
1* ARM SMMUv3 Architecture Implementation
2
3The SMMUv3 architecture is a significant deparature from previous
4revisions, replacing the MMIO register interface with in-memory command
5and event queues and adding support for the ATS and PRI components of
6the PCIe specification.
7
8** SMMUv3 required properties:
9
10- compatible : Should include:
11
12 * "arm,smmu-v3" for any SMMUv3 compliant
13 implementation. This entry should be last in the
14 compatible list.
15
16- reg : Base address and size of the SMMU.
17
18- interrupts : Non-secure interrupt list describing the wired
19 interrupt sources corresponding to entries in
20 interrupt-names. If no wired interrupts are
21 present then this property may be omitted.
22
23- interrupt-names : When the interrupts property is present, should
24 include the following:
25 * "eventq" - Event Queue not empty
26 * "priq" - PRI Queue not empty
27 * "cmdq-sync" - CMD_SYNC complete
28 * "gerror" - Global Error activated
29
30** SMMUv3 optional properties:
31
32- dma-coherent : Present if DMA operations made by the SMMU (page
33 table walks, stream table accesses etc) are cache
34 coherent with the CPU.
35
36 NOTE: this only applies to the SMMU itself, not
37 masters connected upstream of the SMMU.
diff --git a/Documentation/devicetree/bindings/leds/leds-aat1290.txt b/Documentation/devicetree/bindings/leds/leds-aat1290.txt
new file mode 100644
index 000000000000..c05ed91a4e42
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-aat1290.txt
@@ -0,0 +1,73 @@
1* Skyworks Solutions, Inc. AAT1290 Current Regulator for Flash LEDs
2
3The device is controlled through two pins: FL_EN and EN_SET. The pins when,
4asserted high, enable flash strobe and movie mode (max 1/2 of flash current)
5respectively. In order to add a capability of selecting the strobe signal source
6(e.g. CPU or camera sensor) there is an additional switch required, independent
7of the flash chip. The switch is controlled with pin control.
8
9Required properties:
10
11- compatible : Must be "skyworks,aat1290".
12- flen-gpios : Must be device tree identifier of the flash device FL_EN pin.
13- enset-gpios : Must be device tree identifier of the flash device EN_SET pin.
14
15Optional properties:
16- pinctrl-names : Must contain entries: "default", "host", "isp". Entries
17 "default" and "host" must refer to the same pin configuration
18 node, which sets the host as a strobe signal provider. Entry
19 "isp" must refer to the pin configuration node, which sets the
20 ISP as a strobe signal provider.
21
22A discrete LED element connected to the device must be represented by a child
23node - see Documentation/devicetree/bindings/leds/common.txt.
24
25Required properties of the LED child node:
26- led-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
27- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
28 Maximum flash LED supply current can be calculated using
29 following formula: I = 1A * 162kohm / Rset.
30- flash-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
31 Maximum flash timeout can be calculated using following
32 formula: T = 8.82 * 10^9 * Ct.
33
34Optional properties of the LED child node:
35- label : see Documentation/devicetree/bindings/leds/common.txt
36
37Example (by Ct = 220nF, Rset = 160kohm and exynos4412-trats2 board with
38a switch that allows for routing strobe signal either from the host or from
39the camera sensor):
40
41#include "exynos4412.dtsi"
42
43aat1290 {
44 compatible = "skyworks,aat1290";
45 flen-gpios = <&gpj1 1 GPIO_ACTIVE_HIGH>;
46 enset-gpios = <&gpj1 2 GPIO_ACTIVE_HIGH>;
47
48 pinctrl-names = "default", "host", "isp";
49 pinctrl-0 = <&camera_flash_host>;
50 pinctrl-1 = <&camera_flash_host>;
51 pinctrl-2 = <&camera_flash_isp>;
52
53 camera_flash: flash-led {
54 label = "aat1290-flash";
55 led-max-microamp = <520833>;
56 flash-max-microamp = <1012500>;
57 flash-timeout-us = <1940000>;
58 };
59};
60
61&pinctrl_0 {
62 camera_flash_host: camera-flash-host {
63 samsung,pins = "gpj1-0";
64 samsung,pin-function = <1>;
65 samsung,pin-val = <0>;
66 };
67
68 camera_flash_isp: camera-flash-isp {
69 samsung,pins = "gpj1-0";
70 samsung,pin-function = <1>;
71 samsung,pin-val = <1>;
72 };
73};
diff --git a/Documentation/devicetree/bindings/leds/leds-bcm6328.txt b/Documentation/devicetree/bindings/leds/leds-bcm6328.txt
new file mode 100644
index 000000000000..f9e36adc0ebf
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-bcm6328.txt
@@ -0,0 +1,309 @@
1LEDs connected to Broadcom BCM6328 controller
2
3This controller is present on BCM6318, BCM6328, BCM6362 and BCM63268.
4In these SoCs it's possible to control LEDs both as GPIOs or by hardware.
5However, on some devices there are Serial LEDs (LEDs connected to a 74x164
6controller), which can either be controlled by software (exporting the 74x164
7as spi-gpio. See Documentation/devicetree/bindings/gpio/gpio-74x164.txt), or
8by hardware using this driver.
9Some of these Serial LEDs are hardware controlled (e.g. ethernet LEDs) and
10exporting the 74x164 as spi-gpio prevents those LEDs to be hardware
11controlled, so the only chance to keep them working is by using this driver.
12
13BCM6328 LED controller has a HWDIS register, which controls whether a LED
14should be controlled by a hardware signal instead of the MODE register value,
15with 0 meaning hardware control enabled and 1 hardware control disabled. This
16is usually 1:1 for hardware to LED signals, but through the activity/link
17registers you have some limited control over rerouting the LEDs (as
18explained later in brcm,link-signal-sources). Even if a LED is hardware
19controlled you are still able to make it blink or light it up if it isn't,
20but you can't turn it off if the hardware decides to light it up. For this
21reason, hardware controlled LEDs aren't registered as LED class devices.
22
23Required properties:
24 - compatible : should be "brcm,bcm6328-leds".
25 - #address-cells : must be 1.
26 - #size-cells : must be 0.
27 - reg : BCM6328 LED controller address and size.
28
29Optional properties:
30 - brcm,serial-leds : Boolean, enables Serial LEDs.
31 Default : false
32
33Each LED is represented as a sub-node of the brcm,bcm6328-leds device.
34
35LED sub-node required properties:
36 - reg : LED pin number (only LEDs 0 to 23 are valid).
37
38LED sub-node optional properties:
39 a) Optional properties for sub-nodes related to software controlled LEDs:
40 - label : see Documentation/devicetree/bindings/leds/common.txt
41 - active-low : Boolean, makes LED active low.
42 Default : false
43 - default-state : see
44 Documentation/devicetree/bindings/leds/leds-gpio.txt
45 - linux,default-trigger : see
46 Documentation/devicetree/bindings/leds/common.txt
47
48 b) Optional properties for sub-nodes related to hardware controlled LEDs:
49 - brcm,hardware-controlled : Boolean, makes this LED hardware controlled.
50 Default : false
51 - brcm,link-signal-sources : An array of hardware link
52 signal sources. Up to four link hardware signals can get muxed into
53 these LEDs. Only valid for LEDs 0 to 7, where LED signals 0 to 3 may
54 be muxed to LEDs 0 to 3, and signals 4 to 7 may be muxed to LEDs
55 4 to 7. A signal can be muxed to more than one LED, and one LED can
56 have more than one source signal.
57 - brcm,activity-signal-sources : An array of hardware activity
58 signal sources. Up to four activity hardware signals can get muxed into
59 these LEDs. Only valid for LEDs 0 to 7, where LED signals 0 to 3 may
60 be muxed to LEDs 0 to 3, and signals 4 to 7 may be muxed to LEDs
61 4 to 7. A signal can be muxed to more than one LED, and one LED can
62 have more than one source signal.
63
64Examples:
65Scenario 1 : BCM6328 with 4 EPHY LEDs
66 leds0: led-controller@10000800 {
67 compatible = "brcm,bcm6328-leds";
68 #address-cells = <1>;
69 #size-cells = <0>;
70 reg = <0x10000800 0x24>;
71
72 alarm_red@2 {
73 reg = <2>;
74 active-low;
75 label = "red:alarm";
76 };
77 inet_green@3 {
78 reg = <3>;
79 active-low;
80 label = "green:inet";
81 };
82 power_green@4 {
83 reg = <4>;
84 active-low;
85 label = "green:power";
86 default-state = "on";
87 };
88 ephy0_spd@17 {
89 reg = <17>;
90 brcm,hardware-controlled;
91 };
92 ephy1_spd@18 {
93 reg = <18>;
94 brcm,hardware-controlled;
95 };
96 ephy2_spd@19 {
97 reg = <19>;
98 brcm,hardware-controlled;
99 };
100 ephy3_spd@20 {
101 reg = <20>;
102 brcm,hardware-controlled;
103 };
104 };
105
106Scenario 2 : BCM63268 with Serial/GPHY0 LEDs
107 leds0: led-controller@10001900 {
108 compatible = "brcm,bcm6328-leds";
109 #address-cells = <1>;
110 #size-cells = <0>;
111 reg = <0x10001900 0x24>;
112 brcm,serial-leds;
113
114 gphy0_spd0@0 {
115 reg = <0>;
116 brcm,hardware-controlled;
117 brcm,link-signal-sources = <0>;
118 };
119 gphy0_spd1@1 {
120 reg = <1>;
121 brcm,hardware-controlled;
122 brcm,link-signal-sources = <1>;
123 };
124 inet_red@2 {
125 reg = <2>;
126 active-low;
127 label = "red:inet";
128 };
129 dsl_green@3 {
130 reg = <3>;
131 active-low;
132 label = "green:dsl";
133 };
134 usb_green@4 {
135 reg = <4>;
136 active-low;
137 label = "green:usb";
138 };
139 wps_green@7 {
140 reg = <7>;
141 active-low;
142 label = "green:wps";
143 };
144 inet_green@8 {
145 reg = <8>;
146 active-low;
147 label = "green:inet";
148 };
149 ephy0_act@9 {
150 reg = <9>;
151 brcm,hardware-controlled;
152 };
153 ephy1_act@10 {
154 reg = <10>;
155 brcm,hardware-controlled;
156 };
157 ephy2_act@11 {
158 reg = <11>;
159 brcm,hardware-controlled;
160 };
161 gphy0_act@12 {
162 reg = <12>;
163 brcm,hardware-controlled;
164 };
165 ephy0_spd@13 {
166 reg = <13>;
167 brcm,hardware-controlled;
168 };
169 ephy1_spd@14 {
170 reg = <14>;
171 brcm,hardware-controlled;
172 };
173 ephy2_spd@15 {
174 reg = <15>;
175 brcm,hardware-controlled;
176 };
177 power_green@20 {
178 reg = <20>;
179 active-low;
180 label = "green:power";
181 default-state = "on";
182 };
183 };
184
185Scenario 3 : BCM6362 with 1 LED for each EPHY
186 leds0: led-controller@10001900 {
187 compatible = "brcm,bcm6328-leds";
188 #address-cells = <1>;
189 #size-cells = <0>;
190 reg = <0x10001900 0x24>;
191
192 usb@0 {
193 reg = <0>;
194 brcm,hardware-controlled;
195 brcm,link-signal-sources = <0>;
196 brcm,activity-signal-sources = <0>;
197 /* USB link/activity routed to USB LED */
198 };
199 inet@1 {
200 reg = <1>;
201 brcm,hardware-controlled;
202 brcm,activity-signal-sources = <1>;
203 /* INET activity routed to INET LED */
204 };
205 ephy0@4 {
206 reg = <4>;
207 brcm,hardware-controlled;
208 brcm,link-signal-sources = <4>;
209 /* EPHY0 link routed to EPHY0 LED */
210 };
211 ephy1@5 {
212 reg = <5>;
213 brcm,hardware-controlled;
214 brcm,link-signal-sources = <5>;
215 /* EPHY1 link routed to EPHY1 LED */
216 };
217 ephy2@6 {
218 reg = <6>;
219 brcm,hardware-controlled;
220 brcm,link-signal-sources = <6>;
221 /* EPHY2 link routed to EPHY2 LED */
222 };
223 ephy3@7 {
224 reg = <7>;
225 brcm,hardware-controlled;
226 brcm,link-signal-sources = <7>;
227 /* EPHY3 link routed to EPHY3 LED */
228 };
229 power_green@20 {
230 reg = <20>;
231 active-low;
232 label = "green:power";
233 default-state = "on";
234 };
235 };
236
237Scenario 4 : BCM6362 with 1 LED for all EPHYs
238 leds0: led-controller@10001900 {
239 compatible = "brcm,bcm6328-leds";
240 #address-cells = <1>;
241 #size-cells = <0>;
242 reg = <0x10001900 0x24>;
243
244 usb@0 {
245 reg = <0>;
246 brcm,hardware-controlled;
247 brcm,link-signal-sources = <0 1>;
248 brcm,activity-signal-sources = <0 1>;
249 /* USB/INET link/activity routed to USB LED */
250 };
251 ephy@4 {
252 reg = <4>;
253 brcm,hardware-controlled;
254 brcm,link-signal-sources = <4 5 6 7>;
255 /* EPHY0/1/2/3 link routed to EPHY0 LED */
256 };
257 power_green@20 {
258 reg = <20>;
259 active-low;
260 label = "green:power";
261 default-state = "on";
262 };
263 };
264
265Scenario 5 : BCM6362 with EPHY LEDs swapped
266 leds0: led-controller@10001900 {
267 compatible = "brcm,bcm6328-leds";
268 #address-cells = <1>;
269 #size-cells = <0>;
270 reg = <0x10001900 0x24>;
271
272 usb@0 {
273 reg = <0>;
274 brcm,hardware-controlled;
275 brcm,link-signal-sources = <0>;
276 brcm,activity-signal-sources = <0 1>;
277 /* USB link/act and INET act routed to USB LED */
278 };
279 ephy0@4 {
280 reg = <4>;
281 brcm,hardware-controlled;
282 brcm,link-signal-sources = <7>;
283 /* EPHY3 link routed to EPHY0 LED */
284 };
285 ephy1@5 {
286 reg = <5>;
287 brcm,hardware-controlled;
288 brcm,link-signal-sources = <6>;
289 /* EPHY2 link routed to EPHY1 LED */
290 };
291 ephy2@6 {
292 reg = <6>;
293 brcm,hardware-controlled;
294 brcm,link-signal-sources = <5>;
295 /* EPHY1 link routed to EPHY2 LED */
296 };
297 ephy3@7 {
298 reg = <7>;
299 brcm,hardware-controlled;
300 brcm,link-signal-sources = <4>;
301 /* EPHY0 link routed to EPHY3 LED */
302 };
303 power_green@20 {
304 reg = <20>;
305 active-low;
306 label = "green:power";
307 default-state = "on";
308 };
309 };
diff --git a/Documentation/devicetree/bindings/leds/leds-bcm6358.txt b/Documentation/devicetree/bindings/leds/leds-bcm6358.txt
new file mode 100644
index 000000000000..b22a55bcc65d
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-bcm6358.txt
@@ -0,0 +1,145 @@
1LEDs connected to Broadcom BCM6358 controller
2
3This controller is present on BCM6358 and BCM6368.
4In these SoCs there are Serial LEDs (LEDs connected to a 74x164 controller),
5which can either be controlled by software (exporting the 74x164 as spi-gpio.
6See Documentation/devicetree/bindings/gpio/gpio-74x164.txt), or
7by hardware using this driver.
8
9Required properties:
10 - compatible : should be "brcm,bcm6358-leds".
11 - #address-cells : must be 1.
12 - #size-cells : must be 0.
13 - reg : BCM6358 LED controller address and size.
14
15Optional properties:
16 - brcm,clk-div : SCK signal divider. Possible values are 1, 2, 4 and 8.
17 Default : 1
18 - brcm,clk-dat-low : Boolean, makes clock and data signals active low.
19 Default : false
20
21Each LED is represented as a sub-node of the brcm,bcm6358-leds device.
22
23LED sub-node required properties:
24 - reg : LED pin number (only LEDs 0 to 31 are valid).
25
26LED sub-node optional properties:
27 - label : see Documentation/devicetree/bindings/leds/common.txt
28 - active-low : Boolean, makes LED active low.
29 Default : false
30 - default-state : see
31 Documentation/devicetree/bindings/leds/leds-gpio.txt
32 - linux,default-trigger : see
33 Documentation/devicetree/bindings/leds/common.txt
34
35Examples:
36Scenario 1 : BCM6358
37 leds0: led-controller@fffe00d0 {
38 compatible = "brcm,bcm6358-leds";
39 #address-cells = <1>;
40 #size-cells = <0>;
41 reg = <0xfffe00d0 0x8>;
42
43 alarm_white {
44 reg = <0>;
45 active-low;
46 label = "white:alarm";
47 };
48 tv_white {
49 reg = <2>;
50 active-low;
51 label = "white:tv";
52 };
53 tel_white {
54 reg = <3>;
55 active-low;
56 label = "white:tel";
57 };
58 adsl_white {
59 reg = <4>;
60 active-low;
61 label = "white:adsl";
62 };
63 };
64
65Scenario 2 : BCM6368
66 leds0: led-controller@100000d0 {
67 compatible = "brcm,bcm6358-leds";
68 #address-cells = <1>;
69 #size-cells = <0>;
70 reg = <0x100000d0 0x8>;
71 brcm,pol-low;
72 brcm,clk-div = <4>;
73
74 power_red {
75 reg = <0>;
76 active-low;
77 label = "red:power";
78 };
79 power_green {
80 reg = <1>;
81 active-low;
82 label = "green:power";
83 default-state = "on";
84 };
85 power_blue {
86 reg = <2>;
87 label = "blue:power";
88 };
89 broadband_red {
90 reg = <3>;
91 active-low;
92 label = "red:broadband";
93 };
94 broadband_green {
95 reg = <4>;
96 label = "green:broadband";
97 };
98 broadband_blue {
99 reg = <5>;
100 active-low;
101 label = "blue:broadband";
102 };
103 wireless_red {
104 reg = <6>;
105 active-low;
106 label = "red:wireless";
107 };
108 wireless_green {
109 reg = <7>;
110 active-low;
111 label = "green:wireless";
112 };
113 wireless_blue {
114 reg = <8>;
115 label = "blue:wireless";
116 };
117 phone_red {
118 reg = <9>;
119 active-low;
120 label = "red:phone";
121 };
122 phone_green {
123 reg = <10>;
124 active-low;
125 label = "green:phone";
126 };
127 phone_blue {
128 reg = <11>;
129 label = "blue:phone";
130 };
131 upgrading_red {
132 reg = <12>;
133 active-low;
134 label = "red:upgrading";
135 };
136 upgrading_green {
137 reg = <13>;
138 active-low;
139 label = "green:upgrading";
140 };
141 upgrading_blue {
142 reg = <14>;
143 label = "blue:upgrading";
144 };
145 };
diff --git a/Documentation/devicetree/bindings/leds/leds-ktd2692.txt b/Documentation/devicetree/bindings/leds/leds-ktd2692.txt
new file mode 100644
index 000000000000..853737452580
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-ktd2692.txt
@@ -0,0 +1,50 @@
1* Kinetic Technologies - KTD2692 Flash LED Driver
2
3KTD2692 is the ideal power solution for high-power flash LEDs.
4It uses ExpressWire single-wire programming for maximum flexibility.
5
6The ExpressWire interface through CTRL pin can control LED on/off and
7enable/disable the IC, Movie(max 1/3 of Flash current) / Flash mode current,
8Flash timeout, LVP(low voltage protection).
9
10Also, When the AUX pin is pulled high while CTRL pin is high,
11LED current will be ramped up to the flash-mode current level.
12
13Required properties:
14- compatible : Should be "kinetic,ktd2692".
15- ctrl-gpios : Specifier of the GPIO connected to CTRL pin.
16- aux-gpios : Specifier of the GPIO connected to AUX pin.
17
18Optional properties:
19- vin-supply : "vin" LED supply (2.7V to 5.5V).
20 See Documentation/devicetree/bindings/regulator/regulator.txt
21
22A discrete LED element connected to the device must be represented by a child
23node - See Documentation/devicetree/bindings/leds/common.txt
24
25Required properties for flash LED child nodes:
26 See Documentation/devicetree/bindings/leds/common.txt
27- led-max-microamp : Minimum Threshold for Timer protection
28 is defined internally (Maximum 300mA).
29- flash-max-microamp : Flash LED maximum current
30 Formula : I(mA) = 15000 / Rset.
31- flash-max-timeout-us : Flash LED maximum timeout.
32
33Optional properties for flash LED child nodes:
34- label : See Documentation/devicetree/bindings/leds/common.txt
35
36Example:
37
38ktd2692 {
39 compatible = "kinetic,ktd2692";
40 ctrl-gpios = <&gpc0 1 0>;
41 aux-gpios = <&gpc0 2 0>;
42 vin-supply = <&vbat>;
43
44 flash-led {
45 label = "ktd2692-flash";
46 led-max-microamp = <300000>;
47 flash-max-microamp = <1500000>;
48 flash-max-timeout-us = <1835000>;
49 };
50};
diff --git a/Documentation/devicetree/bindings/leds/leds-tlc591xx.txt b/Documentation/devicetree/bindings/leds/leds-tlc591xx.txt
new file mode 100644
index 000000000000..3bbbf7024411
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/leds-tlc591xx.txt
@@ -0,0 +1,40 @@
1LEDs connected to tlc59116 or tlc59108
2
3Required properties
4- compatible: should be "ti,tlc59116" or "ti,tlc59108"
5- #address-cells: must be 1
6- #size-cells: must be 0
7- reg: typically 0x68
8
9Each led is represented as a sub-node of the ti,tlc59116.
10See Documentation/devicetree/bindings/leds/common.txt
11
12LED sub-node properties:
13- reg: number of LED line, 0 to 15 or 0 to 7
14- label: (optional) name of LED
15- linux,default-trigger : (optional)
16
17Examples:
18
19tlc59116@68 {
20 #address-cells = <1>;
21 #size-cells = <0>;
22 compatible = "ti,tlc59116";
23 reg = <0x68>;
24
25 wan@0 {
26 label = "wrt1900ac:amber:wan";
27 reg = <0x0>;
28 };
29
30 2g@2 {
31 label = "wrt1900ac:white:2g";
32 reg = <0x2>;
33 };
34
35 alive@9 {
36 label = "wrt1900ac:green:alive";
37 reg = <0x9>;
38 linux,default_trigger = "heartbeat";
39 };
40};
diff --git a/Documentation/devicetree/bindings/mailbox/brcm,bcm2835-mbox.txt b/Documentation/devicetree/bindings/mailbox/brcm,bcm2835-mbox.txt
new file mode 100644
index 000000000000..e893615ef635
--- /dev/null
+++ b/Documentation/devicetree/bindings/mailbox/brcm,bcm2835-mbox.txt
@@ -0,0 +1,26 @@
1Broadcom BCM2835 VideoCore mailbox IPC
2
3Required properties:
4
5- compatible: Should be "brcm,bcm2835-mbox"
6- reg: Specifies base physical address and size of the registers
7- interrupts: The interrupt number
8 See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
9- #mbox-cells: Specifies the number of cells needed to encode a mailbox
10 channel. The value shall be 0, since there is only one
11 mailbox channel implemented by the device.
12
13Example:
14
15mailbox: mailbox@7e00b800 {
16 compatible = "brcm,bcm2835-mbox";
17 reg = <0x7e00b880 0x40>;
18 interrupts = <0 1>;
19 #mbox-cells = <0>;
20};
21
22firmware: firmware {
23 compatible = "raspberrypi,firmware";
24 mboxes = <&mailbox>;
25 #power-domain-cells = <1>;
26};
diff --git a/Documentation/devicetree/bindings/mailbox/mailbox.txt b/Documentation/devicetree/bindings/mailbox/mailbox.txt
index 1a2cd3d266db..be05b9746c69 100644
--- a/Documentation/devicetree/bindings/mailbox/mailbox.txt
+++ b/Documentation/devicetree/bindings/mailbox/mailbox.txt
@@ -22,17 +22,11 @@ Required property:
22- mboxes: List of phandle and mailbox channel specifiers. 22- mboxes: List of phandle and mailbox channel specifiers.
23 23
24Optional property: 24Optional property:
25- mbox-names: List of identifier strings for each mailbox channel 25- mbox-names: List of identifier strings for each mailbox channel.
26 required by the client. The use of this property
27 is discouraged in favor of using index in list of
28 'mboxes' while requesting a mailbox. Instead the
29 platforms may define channel indices, in DT headers,
30 to something legible.
31 26
32Example: 27Example:
33 pwr_cntrl: power { 28 pwr_cntrl: power {
34 ... 29 ...
35 mbox-names = "pwr-ctrl", "rpc"; 30 mbox-names = "pwr-ctrl", "rpc";
36 mboxes = <&mailbox 0 31 mboxes = <&mailbox 0 &mailbox 1>;
37 &mailbox 1>;
38 }; 32 };
diff --git a/Documentation/devicetree/bindings/media/i2c/adp1653.txt b/Documentation/devicetree/bindings/media/i2c/adp1653.txt
new file mode 100644
index 000000000000..5ce66f2104e3
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/adp1653.txt
@@ -0,0 +1,37 @@
1* Analog Devices ADP1653 flash LED driver
2
3Required Properties:
4
5 - compatible: Must contain "adi,adp1653"
6
7 - reg: I2C slave address
8
9 - enable-gpios: Specifier of the GPIO connected to EN pin
10
11There are two LED outputs available - flash and indicator. One LED is
12represented by one child node, nodes need to be named "flash" and "indicator".
13
14Required properties of the LED child node:
15- max-microamp : see Documentation/devicetree/bindings/leds/common.txt
16
17Required properties of the flash LED child node:
18
19- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
20- flash-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
21
22Example:
23
24 adp1653: led-controller@30 {
25 compatible = "adi,adp1653";
26 reg = <0x30>;
27 enable-gpios = <&gpio3 24 GPIO_ACTIVE_HIGH>; /* 88 */
28
29 flash {
30 flash-timeout-us = <500000>;
31 flash-max-microamp = <320000>;
32 max-microamp = <50000>;
33 };
34 indicator {
35 max-microamp = <17500>;
36 };
37 };
diff --git a/Documentation/devicetree/bindings/media/st,stih4xx.txt b/Documentation/devicetree/bindings/media/st,stih4xx.txt
new file mode 100644
index 000000000000..df655cd3a4f8
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/st,stih4xx.txt
@@ -0,0 +1,32 @@
1STMicroelectronics stih4xx platforms
2
3bdisp: 2D blitter for STMicroelectronics SoC.
4
5Required properties:
6- compatible: should be "st,stih407-bdisp".
7- reg: BDISP physical address location and length.
8- interrupts: BDISP interrupt number.
9- clocks: from common clock binding: handle hardware IP needed clocks, the
10 number of clocks may depend on the SoC type.
11 See ../clocks/clock-bindings.txt for details.
12- clock-names: names of the clocks listed in clocks property in the same order.
13
14Example:
15
16 bdisp0:bdisp@9f10000 {
17 compatible = "st,stih407-bdisp";
18 reg = <0x9f10000 0x1000>;
19 interrupts = <GIC_SPI 38 IRQ_TYPE_NONE>;
20 clock-names = "bdisp";
21 clocks = <&clk_s_c0_flexgen CLK_IC_BDISP_0>;
22 };
23
24Aliases:
25Each BDISP should have a numbered alias in the aliases node, in the form of
26bdispN, N = 0 or 1.
27
28Example:
29
30 aliases {
31 bdisp0 = &bdisp0;
32 };
diff --git a/Documentation/devicetree/bindings/memory-controllers/ath79-ddr-controller.txt b/Documentation/devicetree/bindings/memory-controllers/ath79-ddr-controller.txt
new file mode 100644
index 000000000000..efe35a065714
--- /dev/null
+++ b/Documentation/devicetree/bindings/memory-controllers/ath79-ddr-controller.txt
@@ -0,0 +1,35 @@
1Binding for Qualcomm Atheros AR7xxx/AR9xxx DDR controller
2
3The DDR controller of the ARxxx and AR9xxx families provides an interface
4to flush the FIFO between various devices and the DDR. This is mainly used
5by the IRQ controller to flush the FIFO before running the interrupt handler
6of such devices.
7
8Required properties:
9
10- compatible: has to be "qca,<soc-type>-ddr-controller",
11 "qca,[ar7100|ar7240]-ddr-controller" as fallback.
12 On SoC with PCI support "qca,ar7100-ddr-controller" should be used as
13 fallback, otherwise "qca,ar7240-ddr-controller" should be used.
14- reg: Base address and size of the controllers memory area
15- #qca,ddr-wb-channel-cells: has to be 1, the index of the write buffer
16 channel
17
18Example:
19
20 ddr_ctrl: memory-controller@18000000 {
21 compatible = "qca,ar9132-ddr-controller",
22 "qca,ar7240-ddr-controller";
23 reg = <0x18000000 0x100>;
24
25 #qca,ddr-wb-channel-cells = <1>;
26 };
27
28 ...
29
30 interrupt-controller {
31 ...
32 qca,ddr-wb-channel-interrupts = <2>, <3>, <4>, <5>;
33 qca,ddr-wb-channels = <&ddr_ctrl 3>, <&ddr_ctrl 2>,
34 <&ddr_ctrl 0>, <&ddr_ctrl 1>;
35 };
diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra-mc.txt b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra-mc.txt
index f3db93c85eea..3338a2834ad7 100644
--- a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra-mc.txt
+++ b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra-mc.txt
@@ -1,6 +1,9 @@
1NVIDIA Tegra Memory Controller device tree bindings 1NVIDIA Tegra Memory Controller device tree bindings
2=================================================== 2===================================================
3 3
4memory-controller node
5----------------------
6
4Required properties: 7Required properties:
5- compatible: Should be "nvidia,tegra<chip>-mc" 8- compatible: Should be "nvidia,tegra<chip>-mc"
6- reg: Physical base address and length of the controller's registers. 9- reg: Physical base address and length of the controller's registers.
@@ -15,9 +18,49 @@ Required properties:
15This device implements an IOMMU that complies with the generic IOMMU binding. 18This device implements an IOMMU that complies with the generic IOMMU binding.
16See ../iommu/iommu.txt for details. 19See ../iommu/iommu.txt for details.
17 20
18Example: 21emc-timings subnode
19-------- 22-------------------
23
24The node should contain a "emc-timings" subnode for each supported RAM type (see field RAM_CODE in
25register PMC_STRAPPING_OPT_A).
26
27Required properties for "emc-timings" nodes :
28- nvidia,ram-code : Should contain the value of RAM_CODE this timing set is used for.
29
30timing subnode
31--------------
32
33Each "emc-timings" node should contain a subnode for every supported EMC clock rate.
34
35Required properties for timing nodes :
36- clock-frequency : Should contain the memory clock rate in Hz.
37- nvidia,emem-configuration : Values to be written to the EMEM register block. For the Tegra124 SoC
38(see section "15.6.1 MC Registers" in the TRM), these are the registers whose values need to be
39specified, according to the board documentation:
40
41 MC_EMEM_ARB_CFG
42 MC_EMEM_ARB_OUTSTANDING_REQ
43 MC_EMEM_ARB_TIMING_RCD
44 MC_EMEM_ARB_TIMING_RP
45 MC_EMEM_ARB_TIMING_RC
46 MC_EMEM_ARB_TIMING_RAS
47 MC_EMEM_ARB_TIMING_FAW
48 MC_EMEM_ARB_TIMING_RRD
49 MC_EMEM_ARB_TIMING_RAP2PRE
50 MC_EMEM_ARB_TIMING_WAP2PRE
51 MC_EMEM_ARB_TIMING_R2R
52 MC_EMEM_ARB_TIMING_W2W
53 MC_EMEM_ARB_TIMING_R2W
54 MC_EMEM_ARB_TIMING_W2R
55 MC_EMEM_ARB_DA_TURNS
56 MC_EMEM_ARB_DA_COVERS
57 MC_EMEM_ARB_MISC0
58 MC_EMEM_ARB_MISC1
59 MC_EMEM_ARB_RING1_THROTTLE
20 60
61Example SoC include file:
62
63/ {
21 mc: memory-controller@0,70019000 { 64 mc: memory-controller@0,70019000 {
22 compatible = "nvidia,tegra124-mc"; 65 compatible = "nvidia,tegra124-mc";
23 reg = <0x0 0x70019000 0x0 0x1000>; 66 reg = <0x0 0x70019000 0x0 0x1000>;
@@ -34,3 +77,40 @@ Example:
34 ... 77 ...
35 iommus = <&mc TEGRA_SWGROUP_SDMMC1A>; 78 iommus = <&mc TEGRA_SWGROUP_SDMMC1A>;
36 }; 79 };
80};
81
82Example board file:
83
84/ {
85 memory-controller@0,70019000 {
86 emc-timings-3 {
87 nvidia,ram-code = <3>;
88
89 timing-12750000 {
90 clock-frequency = <12750000>;
91
92 nvidia,emem-configuration = <
93 0x40040001 /* MC_EMEM_ARB_CFG */
94 0x8000000a /* MC_EMEM_ARB_OUTSTANDING_REQ */
95 0x00000001 /* MC_EMEM_ARB_TIMING_RCD */
96 0x00000001 /* MC_EMEM_ARB_TIMING_RP */
97 0x00000002 /* MC_EMEM_ARB_TIMING_RC */
98 0x00000000 /* MC_EMEM_ARB_TIMING_RAS */
99 0x00000002 /* MC_EMEM_ARB_TIMING_FAW */
100 0x00000001 /* MC_EMEM_ARB_TIMING_RRD */
101 0x00000002 /* MC_EMEM_ARB_TIMING_RAP2PRE */
102 0x00000008 /* MC_EMEM_ARB_TIMING_WAP2PRE */
103 0x00000003 /* MC_EMEM_ARB_TIMING_R2R */
104 0x00000002 /* MC_EMEM_ARB_TIMING_W2W */
105 0x00000003 /* MC_EMEM_ARB_TIMING_R2W */
106 0x00000006 /* MC_EMEM_ARB_TIMING_W2R */
107 0x06030203 /* MC_EMEM_ARB_DA_TURNS */
108 0x000a0402 /* MC_EMEM_ARB_DA_COVERS */
109 0x77e30303 /* MC_EMEM_ARB_MISC0 */
110 0x70000f03 /* MC_EMEM_ARB_MISC1 */
111 0x001f0000 /* MC_EMEM_ARB_RING1_THROTTLE */
112 >;
113 };
114 };
115 };
116};
diff --git a/Documentation/devicetree/bindings/memory-controllers/renesas,h8300-bsc.txt b/Documentation/devicetree/bindings/memory-controllers/renesas,h8300-bsc.txt
new file mode 100644
index 000000000000..cdf406c902e2
--- /dev/null
+++ b/Documentation/devicetree/bindings/memory-controllers/renesas,h8300-bsc.txt
@@ -0,0 +1,12 @@
1* H8/300 bus controller
2
3Required properties:
4 - compatible: Must be "renesas,h8300-bsc".
5 - reg: Base address and length of BSC registers.
6
7Example.
8 bsc: memory-controller@fee01e {
9 compatible = "renesas,h8300h-bsc", "renesas,h8300-bsc";
10 reg = <0xfee01e 8>;
11 };
12
diff --git a/Documentation/devicetree/bindings/memory-controllers/tegra-emc.txt b/Documentation/devicetree/bindings/memory-controllers/tegra-emc.txt
new file mode 100644
index 000000000000..b59c625d6336
--- /dev/null
+++ b/Documentation/devicetree/bindings/memory-controllers/tegra-emc.txt
@@ -0,0 +1,374 @@
1NVIDIA Tegra124 SoC EMC (external memory controller)
2====================================================
3
4Required properties :
5- compatible : Should be "nvidia,tegra124-emc".
6- reg : physical base address and length of the controller's registers.
7- nvidia,memory-controller : phandle of the MC driver.
8
9The node should contain a "emc-timings" subnode for each supported RAM type
10(see field RAM_CODE in register PMC_STRAPPING_OPT_A), with its unit address
11being its RAM_CODE.
12
13Required properties for "emc-timings" nodes :
14- nvidia,ram-code : Should contain the value of RAM_CODE this timing set is
15used for.
16
17Each "emc-timings" node should contain a "timing" subnode for every supported
18EMC clock rate. The "timing" subnodes should have the clock rate in Hz as
19their unit address.
20
21Required properties for "timing" nodes :
22- clock-frequency : Should contain the memory clock rate in Hz.
23- The following properties contain EMC timing characterization values
24(specified in the board documentation) :
25 - nvidia,emc-auto-cal-config : EMC_AUTO_CAL_CONFIG
26 - nvidia,emc-auto-cal-config2 : EMC_AUTO_CAL_CONFIG2
27 - nvidia,emc-auto-cal-config3 : EMC_AUTO_CAL_CONFIG3
28 - nvidia,emc-auto-cal-interval : EMC_AUTO_CAL_INTERVAL
29 - nvidia,emc-bgbias-ctl0 : EMC_BGBIAS_CTL0
30 - nvidia,emc-cfg : EMC_CFG
31 - nvidia,emc-cfg-2 : EMC_CFG_2
32 - nvidia,emc-ctt-term-ctrl : EMC_CTT_TERM_CTRL
33 - nvidia,emc-mode-1 : Mode Register 1
34 - nvidia,emc-mode-2 : Mode Register 2
35 - nvidia,emc-mode-4 : Mode Register 4
36 - nvidia,emc-mode-reset : Mode Register 0
37 - nvidia,emc-mrs-wait-cnt : EMC_MRS_WAIT_CNT
38 - nvidia,emc-sel-dpd-ctrl : EMC_SEL_DPD_CTRL
39 - nvidia,emc-xm2dqspadctrl2 : EMC_XM2DQSPADCTRL2
40 - nvidia,emc-zcal-cnt-long : EMC_ZCAL_WAIT_CNT after clock change
41 - nvidia,emc-zcal-interval : EMC_ZCAL_INTERVAL
42- nvidia,emc-configuration : EMC timing characterization data. These are the
43registers (see section "15.6.2 EMC Registers" in the TRM) whose values need to
44be specified, according to the board documentation:
45
46 EMC_RC
47 EMC_RFC
48 EMC_RFC_SLR
49 EMC_RAS
50 EMC_RP
51 EMC_R2W
52 EMC_W2R
53 EMC_R2P
54 EMC_W2P
55 EMC_RD_RCD
56 EMC_WR_RCD
57 EMC_RRD
58 EMC_REXT
59 EMC_WEXT
60 EMC_WDV
61 EMC_WDV_MASK
62 EMC_QUSE
63 EMC_QUSE_WIDTH
64 EMC_IBDLY
65 EMC_EINPUT
66 EMC_EINPUT_DURATION
67 EMC_PUTERM_EXTRA
68 EMC_PUTERM_WIDTH
69 EMC_PUTERM_ADJ
70 EMC_CDB_CNTL_1
71 EMC_CDB_CNTL_2
72 EMC_CDB_CNTL_3
73 EMC_QRST
74 EMC_QSAFE
75 EMC_RDV
76 EMC_RDV_MASK
77 EMC_REFRESH
78 EMC_BURST_REFRESH_NUM
79 EMC_PRE_REFRESH_REQ_CNT
80 EMC_PDEX2WR
81 EMC_PDEX2RD
82 EMC_PCHG2PDEN
83 EMC_ACT2PDEN
84 EMC_AR2PDEN
85 EMC_RW2PDEN
86 EMC_TXSR
87 EMC_TXSRDLL
88 EMC_TCKE
89 EMC_TCKESR
90 EMC_TPD
91 EMC_TFAW
92 EMC_TRPAB
93 EMC_TCLKSTABLE
94 EMC_TCLKSTOP
95 EMC_TREFBW
96 EMC_FBIO_CFG6
97 EMC_ODT_WRITE
98 EMC_ODT_READ
99 EMC_FBIO_CFG5
100 EMC_CFG_DIG_DLL
101 EMC_CFG_DIG_DLL_PERIOD
102 EMC_DLL_XFORM_DQS0
103 EMC_DLL_XFORM_DQS1
104 EMC_DLL_XFORM_DQS2
105 EMC_DLL_XFORM_DQS3
106 EMC_DLL_XFORM_DQS4
107 EMC_DLL_XFORM_DQS5
108 EMC_DLL_XFORM_DQS6
109 EMC_DLL_XFORM_DQS7
110 EMC_DLL_XFORM_DQS8
111 EMC_DLL_XFORM_DQS9
112 EMC_DLL_XFORM_DQS10
113 EMC_DLL_XFORM_DQS11
114 EMC_DLL_XFORM_DQS12
115 EMC_DLL_XFORM_DQS13
116 EMC_DLL_XFORM_DQS14
117 EMC_DLL_XFORM_DQS15
118 EMC_DLL_XFORM_QUSE0
119 EMC_DLL_XFORM_QUSE1
120 EMC_DLL_XFORM_QUSE2
121 EMC_DLL_XFORM_QUSE3
122 EMC_DLL_XFORM_QUSE4
123 EMC_DLL_XFORM_QUSE5
124 EMC_DLL_XFORM_QUSE6
125 EMC_DLL_XFORM_QUSE7
126 EMC_DLL_XFORM_ADDR0
127 EMC_DLL_XFORM_ADDR1
128 EMC_DLL_XFORM_ADDR2
129 EMC_DLL_XFORM_ADDR3
130 EMC_DLL_XFORM_ADDR4
131 EMC_DLL_XFORM_ADDR5
132 EMC_DLL_XFORM_QUSE8
133 EMC_DLL_XFORM_QUSE9
134 EMC_DLL_XFORM_QUSE10
135 EMC_DLL_XFORM_QUSE11
136 EMC_DLL_XFORM_QUSE12
137 EMC_DLL_XFORM_QUSE13
138 EMC_DLL_XFORM_QUSE14
139 EMC_DLL_XFORM_QUSE15
140 EMC_DLI_TRIM_TXDQS0
141 EMC_DLI_TRIM_TXDQS1
142 EMC_DLI_TRIM_TXDQS2
143 EMC_DLI_TRIM_TXDQS3
144 EMC_DLI_TRIM_TXDQS4
145 EMC_DLI_TRIM_TXDQS5
146 EMC_DLI_TRIM_TXDQS6
147 EMC_DLI_TRIM_TXDQS7
148 EMC_DLI_TRIM_TXDQS8
149 EMC_DLI_TRIM_TXDQS9
150 EMC_DLI_TRIM_TXDQS10
151 EMC_DLI_TRIM_TXDQS11
152 EMC_DLI_TRIM_TXDQS12
153 EMC_DLI_TRIM_TXDQS13
154 EMC_DLI_TRIM_TXDQS14
155 EMC_DLI_TRIM_TXDQS15
156 EMC_DLL_XFORM_DQ0
157 EMC_DLL_XFORM_DQ1
158 EMC_DLL_XFORM_DQ2
159 EMC_DLL_XFORM_DQ3
160 EMC_DLL_XFORM_DQ4
161 EMC_DLL_XFORM_DQ5
162 EMC_DLL_XFORM_DQ6
163 EMC_DLL_XFORM_DQ7
164 EMC_XM2CMDPADCTRL
165 EMC_XM2CMDPADCTRL4
166 EMC_XM2CMDPADCTRL5
167 EMC_XM2DQPADCTRL2
168 EMC_XM2DQPADCTRL3
169 EMC_XM2CLKPADCTRL
170 EMC_XM2CLKPADCTRL2
171 EMC_XM2COMPPADCTRL
172 EMC_XM2VTTGENPADCTRL
173 EMC_XM2VTTGENPADCTRL2
174 EMC_XM2VTTGENPADCTRL3
175 EMC_XM2DQSPADCTRL3
176 EMC_XM2DQSPADCTRL4
177 EMC_XM2DQSPADCTRL5
178 EMC_XM2DQSPADCTRL6
179 EMC_DSR_VTTGEN_DRV
180 EMC_TXDSRVTTGEN
181 EMC_FBIO_SPARE
182 EMC_ZCAL_WAIT_CNT
183 EMC_MRS_WAIT_CNT2
184 EMC_CTT
185 EMC_CTT_DURATION
186 EMC_CFG_PIPE
187 EMC_DYN_SELF_REF_CONTROL
188 EMC_QPOP
189
190Example SoC include file:
191
192/ {
193 emc@0,7001b000 {
194 compatible = "nvidia,tegra124-emc";
195 reg = <0x0 0x7001b000 0x0 0x1000>;
196
197 nvidia,memory-controller = <&mc>;
198 };
199};
200
201Example board file:
202
203/ {
204 emc@0,7001b000 {
205 emc-timings-3 {
206 nvidia,ram-code = <3>;
207
208 timing-12750000 {
209 clock-frequency = <12750000>;
210
211 nvidia,emc-zcal-cnt-long = <0x00000042>;
212 nvidia,emc-auto-cal-interval = <0x001fffff>;
213 nvidia,emc-ctt-term-ctrl = <0x00000802>;
214 nvidia,emc-cfg = <0x73240000>;
215 nvidia,emc-cfg-2 = <0x000008c5>;
216 nvidia,emc-sel-dpd-ctrl = <0x00040128>;
217 nvidia,emc-bgbias-ctl0 = <0x00000008>;
218 nvidia,emc-auto-cal-config = <0xa1430000>;
219 nvidia,emc-auto-cal-config2 = <0x00000000>;
220 nvidia,emc-auto-cal-config3 = <0x00000000>;
221 nvidia,emc-mode-reset = <0x80001221>;
222 nvidia,emc-mode-1 = <0x80100003>;
223 nvidia,emc-mode-2 = <0x80200008>;
224 nvidia,emc-mode-4 = <0x00000000>;
225
226 nvidia,emc-configuration = <
227 0x00000000 /* EMC_RC */
228 0x00000003 /* EMC_RFC */
229 0x00000000 /* EMC_RFC_SLR */
230 0x00000000 /* EMC_RAS */
231 0x00000000 /* EMC_RP */
232 0x00000004 /* EMC_R2W */
233 0x0000000a /* EMC_W2R */
234 0x00000003 /* EMC_R2P */
235 0x0000000b /* EMC_W2P */
236 0x00000000 /* EMC_RD_RCD */
237 0x00000000 /* EMC_WR_RCD */
238 0x00000003 /* EMC_RRD */
239 0x00000003 /* EMC_REXT */
240 0x00000000 /* EMC_WEXT */
241 0x00000006 /* EMC_WDV */
242 0x00000006 /* EMC_WDV_MASK */
243 0x00000006 /* EMC_QUSE */
244 0x00000002 /* EMC_QUSE_WIDTH */
245 0x00000000 /* EMC_IBDLY */
246 0x00000005 /* EMC_EINPUT */
247 0x00000005 /* EMC_EINPUT_DURATION */
248 0x00010000 /* EMC_PUTERM_EXTRA */
249 0x00000003 /* EMC_PUTERM_WIDTH */
250 0x00000000 /* EMC_PUTERM_ADJ */
251 0x00000000 /* EMC_CDB_CNTL_1 */
252 0x00000000 /* EMC_CDB_CNTL_2 */
253 0x00000000 /* EMC_CDB_CNTL_3 */
254 0x00000004 /* EMC_QRST */
255 0x0000000c /* EMC_QSAFE */
256 0x0000000d /* EMC_RDV */
257 0x0000000f /* EMC_RDV_MASK */
258 0x00000060 /* EMC_REFRESH */
259 0x00000000 /* EMC_BURST_REFRESH_NUM */
260 0x00000018 /* EMC_PRE_REFRESH_REQ_CNT */
261 0x00000002 /* EMC_PDEX2WR */
262 0x00000002 /* EMC_PDEX2RD */
263 0x00000001 /* EMC_PCHG2PDEN */
264 0x00000000 /* EMC_ACT2PDEN */
265 0x00000007 /* EMC_AR2PDEN */
266 0x0000000f /* EMC_RW2PDEN */
267 0x00000005 /* EMC_TXSR */
268 0x00000005 /* EMC_TXSRDLL */
269 0x00000004 /* EMC_TCKE */
270 0x00000005 /* EMC_TCKESR */
271 0x00000004 /* EMC_TPD */
272 0x00000000 /* EMC_TFAW */
273 0x00000000 /* EMC_TRPAB */
274 0x00000005 /* EMC_TCLKSTABLE */
275 0x00000005 /* EMC_TCLKSTOP */
276 0x00000064 /* EMC_TREFBW */
277 0x00000000 /* EMC_FBIO_CFG6 */
278 0x00000000 /* EMC_ODT_WRITE */
279 0x00000000 /* EMC_ODT_READ */
280 0x106aa298 /* EMC_FBIO_CFG5 */
281 0x002c00a0 /* EMC_CFG_DIG_DLL */
282 0x00008000 /* EMC_CFG_DIG_DLL_PERIOD */
283 0x00064000 /* EMC_DLL_XFORM_DQS0 */
284 0x00064000 /* EMC_DLL_XFORM_DQS1 */
285 0x00064000 /* EMC_DLL_XFORM_DQS2 */
286 0x00064000 /* EMC_DLL_XFORM_DQS3 */
287 0x00064000 /* EMC_DLL_XFORM_DQS4 */
288 0x00064000 /* EMC_DLL_XFORM_DQS5 */
289 0x00064000 /* EMC_DLL_XFORM_DQS6 */
290 0x00064000 /* EMC_DLL_XFORM_DQS7 */
291 0x00064000 /* EMC_DLL_XFORM_DQS8 */
292 0x00064000 /* EMC_DLL_XFORM_DQS9 */
293 0x00064000 /* EMC_DLL_XFORM_DQS10 */
294 0x00064000 /* EMC_DLL_XFORM_DQS11 */
295 0x00064000 /* EMC_DLL_XFORM_DQS12 */
296 0x00064000 /* EMC_DLL_XFORM_DQS13 */
297 0x00064000 /* EMC_DLL_XFORM_DQS14 */
298 0x00064000 /* EMC_DLL_XFORM_DQS15 */
299 0x00000000 /* EMC_DLL_XFORM_QUSE0 */
300 0x00000000 /* EMC_DLL_XFORM_QUSE1 */
301 0x00000000 /* EMC_DLL_XFORM_QUSE2 */
302 0x00000000 /* EMC_DLL_XFORM_QUSE3 */
303 0x00000000 /* EMC_DLL_XFORM_QUSE4 */
304 0x00000000 /* EMC_DLL_XFORM_QUSE5 */
305 0x00000000 /* EMC_DLL_XFORM_QUSE6 */
306 0x00000000 /* EMC_DLL_XFORM_QUSE7 */
307 0x00000000 /* EMC_DLL_XFORM_ADDR0 */
308 0x00000000 /* EMC_DLL_XFORM_ADDR1 */
309 0x00000000 /* EMC_DLL_XFORM_ADDR2 */
310 0x00000000 /* EMC_DLL_XFORM_ADDR3 */
311 0x00000000 /* EMC_DLL_XFORM_ADDR4 */
312 0x00000000 /* EMC_DLL_XFORM_ADDR5 */
313 0x00000000 /* EMC_DLL_XFORM_QUSE8 */
314 0x00000000 /* EMC_DLL_XFORM_QUSE9 */
315 0x00000000 /* EMC_DLL_XFORM_QUSE10 */
316 0x00000000 /* EMC_DLL_XFORM_QUSE11 */
317 0x00000000 /* EMC_DLL_XFORM_QUSE12 */
318 0x00000000 /* EMC_DLL_XFORM_QUSE13 */
319 0x00000000 /* EMC_DLL_XFORM_QUSE14 */
320 0x00000000 /* EMC_DLL_XFORM_QUSE15 */
321 0x00000000 /* EMC_DLI_TRIM_TXDQS0 */
322 0x00000000 /* EMC_DLI_TRIM_TXDQS1 */
323 0x00000000 /* EMC_DLI_TRIM_TXDQS2 */
324 0x00000000 /* EMC_DLI_TRIM_TXDQS3 */
325 0x00000000 /* EMC_DLI_TRIM_TXDQS4 */
326 0x00000000 /* EMC_DLI_TRIM_TXDQS5 */
327 0x00000000 /* EMC_DLI_TRIM_TXDQS6 */
328 0x00000000 /* EMC_DLI_TRIM_TXDQS7 */
329 0x00000000 /* EMC_DLI_TRIM_TXDQS8 */
330 0x00000000 /* EMC_DLI_TRIM_TXDQS9 */
331 0x00000000 /* EMC_DLI_TRIM_TXDQS10 */
332 0x00000000 /* EMC_DLI_TRIM_TXDQS11 */
333 0x00000000 /* EMC_DLI_TRIM_TXDQS12 */
334 0x00000000 /* EMC_DLI_TRIM_TXDQS13 */
335 0x00000000 /* EMC_DLI_TRIM_TXDQS14 */
336 0x00000000 /* EMC_DLI_TRIM_TXDQS15 */
337 0x000fc000 /* EMC_DLL_XFORM_DQ0 */
338 0x000fc000 /* EMC_DLL_XFORM_DQ1 */
339 0x000fc000 /* EMC_DLL_XFORM_DQ2 */
340 0x000fc000 /* EMC_DLL_XFORM_DQ3 */
341 0x0000fc00 /* EMC_DLL_XFORM_DQ4 */
342 0x0000fc00 /* EMC_DLL_XFORM_DQ5 */
343 0x0000fc00 /* EMC_DLL_XFORM_DQ6 */
344 0x0000fc00 /* EMC_DLL_XFORM_DQ7 */
345 0x10000280 /* EMC_XM2CMDPADCTRL */
346 0x00000000 /* EMC_XM2CMDPADCTRL4 */
347 0x00111111 /* EMC_XM2CMDPADCTRL5 */
348 0x00000000 /* EMC_XM2DQPADCTRL2 */
349 0x00000000 /* EMC_XM2DQPADCTRL3 */
350 0x77ffc081 /* EMC_XM2CLKPADCTRL */
351 0x00000e0e /* EMC_XM2CLKPADCTRL2 */
352 0x81f1f108 /* EMC_XM2COMPPADCTRL */
353 0x07070004 /* EMC_XM2VTTGENPADCTRL */
354 0x0000003f /* EMC_XM2VTTGENPADCTRL2 */
355 0x016eeeee /* EMC_XM2VTTGENPADCTRL3 */
356 0x51451400 /* EMC_XM2DQSPADCTRL3 */
357 0x00514514 /* EMC_XM2DQSPADCTRL4 */
358 0x00514514 /* EMC_XM2DQSPADCTRL5 */
359 0x51451400 /* EMC_XM2DQSPADCTRL6 */
360 0x0000003f /* EMC_DSR_VTTGEN_DRV */
361 0x00000007 /* EMC_TXDSRVTTGEN */
362 0x00000000 /* EMC_FBIO_SPARE */
363 0x00000042 /* EMC_ZCAL_WAIT_CNT */
364 0x000e000e /* EMC_MRS_WAIT_CNT2 */
365 0x00000000 /* EMC_CTT */
366 0x00000003 /* EMC_CTT_DURATION */
367 0x0000f2f3 /* EMC_CFG_PIPE */
368 0x800001c5 /* EMC_DYN_SELF_REF_CONTROL */
369 0x0000000a /* EMC_QPOP */
370 >;
371 };
372 };
373 };
374};
diff --git a/Documentation/devicetree/bindings/memory-controllers/ti/emif.txt b/Documentation/devicetree/bindings/memory-controllers/ti/emif.txt
index 938f8e1ba205..0db60470ebb6 100644
--- a/Documentation/devicetree/bindings/memory-controllers/ti/emif.txt
+++ b/Documentation/devicetree/bindings/memory-controllers/ti/emif.txt
@@ -8,6 +8,7 @@ of the EMIF IP and memory parts attached to it.
8Required properties: 8Required properties:
9- compatible : Should be of the form "ti,emif-<ip-rev>" where <ip-rev> 9- compatible : Should be of the form "ti,emif-<ip-rev>" where <ip-rev>
10 is the IP revision of the specific EMIF instance. 10 is the IP revision of the specific EMIF instance.
11 For am437x should be ti,emif-am4372.
11 12
12- phy-type : <u32> indicating the DDR phy type. Following are the 13- phy-type : <u32> indicating the DDR phy type. Following are the
13 allowed values 14 allowed values
diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt
index 7665aa95979f..a8fee60dc20d 100644
--- a/Documentation/devicetree/bindings/mfd/arizona.txt
+++ b/Documentation/devicetree/bindings/mfd/arizona.txt
@@ -10,6 +10,9 @@ Required properties:
10 "wlf,wm5110" 10 "wlf,wm5110"
11 "wlf,wm8280" 11 "wlf,wm8280"
12 "wlf,wm8997" 12 "wlf,wm8997"
13 "wlf,wm8998"
14 "wlf,wm1814"
15
13 - reg : I2C slave address when connected using I2C, chip select number when 16 - reg : I2C slave address when connected using I2C, chip select number when
14 using SPI. 17 using SPI.
15 18
@@ -31,10 +34,10 @@ Required properties:
31 as covered in Documentation/devicetree/bindings/regulator/regulator.txt 34 as covered in Documentation/devicetree/bindings/regulator/regulator.txt
32 35
33 - DBVDD2-supply, DBVDD3-supply : Additional databus power supplies (wm5102, 36 - DBVDD2-supply, DBVDD3-supply : Additional databus power supplies (wm5102,
34 wm5110, wm8280) 37 wm5110, wm8280, wm8998, wm1814)
35 38
36 - SPKVDDL-supply, SPKVDDR-supply : Speaker driver power supplies (wm5102, 39 - SPKVDDL-supply, SPKVDDR-supply : Speaker driver power supplies (wm5102,
37 wm5110, wm8280) 40 wm5110, wm8280, wm8998, wm1814)
38 41
39 - SPKVDD-supply : Speaker driver power supply (wm8997) 42 - SPKVDD-supply : Speaker driver power supply (wm8997)
40 43
@@ -53,8 +56,10 @@ Optional properties:
53 of input signals. Valid values are 0 (Differential), 1 (Single-ended) and 56 of input signals. Valid values are 0 (Differential), 1 (Single-ended) and
54 2 (Digital Microphone). If absent, INn_MODE registers set to 0 by default. 57 2 (Digital Microphone). If absent, INn_MODE registers set to 0 by default.
55 If present, values must be specified less than or equal to the number of 58 If present, values must be specified less than or equal to the number of
56 input singals. If values less than the number of input signals, elements 59 input signals. If values less than the number of input signals, elements
57 that has not been specifed are set to 0 by default. 60 that have not been specified are set to 0 by default. Entries are:
61 <IN1, IN2, IN3, IN4> (wm5102, wm5110, wm8280, wm8997)
62 <IN1A, IN2A, IN1B, IN2B> (wm8998, wm1814)
58 63
59 - wlf,dmic-ref : DMIC reference voltage source for each input, can be 64 - wlf,dmic-ref : DMIC reference voltage source for each input, can be
60 selected from either MICVDD or one of the MICBIAS's, defines 65 selected from either MICVDD or one of the MICBIAS's, defines
@@ -62,6 +67,12 @@ Optional properties:
62 present, the number of values should be less than or equal to the 67 present, the number of values should be less than or equal to the
63 number of inputs, unspecified inputs will use the chip default. 68 number of inputs, unspecified inputs will use the chip default.
64 69
70 - wlf,hpdet-channel : Headphone detection channel.
71 ARIZONA_ACCDET_MODE_HPL or 1 - Headphone detect mode is set to HPDETL
72 ARIZONA_ACCDET_MODE_HPR or 2 - Headphone detect mode is set to HPDETR
73 If this node is not mentioned or if the value is unknown, then
74 headphone detection mode is set to HPDETL.
75
65 - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if 76 - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if
66 they are being externally supplied. As covered in 77 they are being externally supplied. As covered in
67 Documentation/devicetree/bindings/regulator/regulator.txt 78 Documentation/devicetree/bindings/regulator/regulator.txt
diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt b/Documentation/devicetree/bindings/mfd/axp20x.txt
index 98685f291a72..753f14f46e85 100644
--- a/Documentation/devicetree/bindings/mfd/axp20x.txt
+++ b/Documentation/devicetree/bindings/mfd/axp20x.txt
@@ -1,15 +1,16 @@
1AXP202/AXP209 device tree bindings 1AXP family PMIC device tree bindings
2 2
3The axp20x family current members : 3The axp20x family current members :
4axp202 (X-Powers) 4axp202 (X-Powers)
5axp209 (X-Powers) 5axp209 (X-Powers)
6axp221 (X-Powers)
6 7
7Required properties: 8Required properties:
8- compatible: "x-powers,axp202" or "x-powers,axp209" 9- compatible: "x-powers,axp202", "x-powers,axp209", "x-powers,axp221"
9- reg: The I2C slave address for the AXP chip 10- reg: The I2C slave address for the AXP chip
10- interrupt-parent: The parent interrupt controller 11- interrupt-parent: The parent interrupt controller
11- interrupts: SoC NMI / GPIO interrupt connected to the PMIC's IRQ pin 12- interrupts: SoC NMI / GPIO interrupt connected to the PMIC's IRQ pin
12- interrupt-controller: axp20x has its own internal IRQs 13- interrupt-controller: The PMIC has its own internal IRQs
13- #interrupt-cells: Should be set to 1 14- #interrupt-cells: Should be set to 1
14 15
15Optional properties: 16Optional properties:
@@ -48,6 +49,31 @@ LDO3 : LDO : ldo3in-supply
48LDO4 : LDO : ldo24in-supply : shared supply 49LDO4 : LDO : ldo24in-supply : shared supply
49LDO5 : LDO : ldo5in-supply 50LDO5 : LDO : ldo5in-supply
50 51
52AXP221 regulators, type, and corresponding input supply names:
53
54Regulator Type Supply Name Notes
55--------- ---- ----------- -----
56DCDC1 : DC-DC buck : vin1-supply
57DCDC2 : DC-DC buck : vin2-supply
58DCDC3 : DC-DC buck : vin3-supply
59DCDC4 : DC-DC buck : vin4-supply
60DCDC5 : DC-DC buck : vin5-supply
61DC1SW : On/Off Switch : dcdc1-supply : DCDC1 secondary output
62DC5LDO : LDO : dcdc5-supply : input from DCDC5
63ALDO1 : LDO : aldoin-supply : shared supply
64ALDO2 : LDO : aldoin-supply : shared supply
65ALDO3 : LDO : aldoin-supply : shared supply
66DLDO1 : LDO : dldoin-supply : shared supply
67DLDO2 : LDO : dldoin-supply : shared supply
68DLDO3 : LDO : dldoin-supply : shared supply
69DLDO4 : LDO : dldoin-supply : shared supply
70ELDO1 : LDO : eldoin-supply : shared supply
71ELDO2 : LDO : eldoin-supply : shared supply
72ELDO3 : LDO : eldoin-supply : shared supply
73LDO_IO0 : LDO : ips-supply : GPIO 0
74LDO_IO1 : LDO : ips-supply : GPIO 1
75RTC_LDO : LDO : ips-supply : always on
76
51Example: 77Example:
52 78
53axp209: pmic@34 { 79axp209: pmic@34 {
diff --git a/Documentation/devicetree/bindings/mfd/cros-ec.txt b/Documentation/devicetree/bindings/mfd/cros-ec.txt
index 8009c3d87f33..1777916e9e28 100644
--- a/Documentation/devicetree/bindings/mfd/cros-ec.txt
+++ b/Documentation/devicetree/bindings/mfd/cros-ec.txt
@@ -18,6 +18,10 @@ Required properties (SPI):
18- reg: SPI chip select 18- reg: SPI chip select
19 19
20Optional properties (SPI): 20Optional properties (SPI):
21- google,cros-ec-spi-pre-delay: Some implementations of the EC need a little
22 time to wake up from sleep before they can receive SPI transfers at a high
23 clock rate. This property specifies the delay, in usecs, between the
24 assertion of the CS to the start of the first clock pulse.
21- google,cros-ec-spi-msg-delay: Some implementations of the EC require some 25- google,cros-ec-spi-msg-delay: Some implementations of the EC require some
22 additional processing time in order to accept new transactions. If the delay 26 additional processing time in order to accept new transactions. If the delay
23 between transactions is not long enough the EC may not be able to respond 27 between transactions is not long enough the EC may not be able to respond
diff --git a/Documentation/devicetree/bindings/mfd/da9063.txt b/Documentation/devicetree/bindings/mfd/da9063.txt
index 42c6fa6f1c9a..05b21bcb8543 100644
--- a/Documentation/devicetree/bindings/mfd/da9063.txt
+++ b/Documentation/devicetree/bindings/mfd/da9063.txt
@@ -5,6 +5,7 @@ DA9093 consists of a large and varied group of sub-devices (I2C Only):
5Device Supply Names Description 5Device Supply Names Description
6------ ------------ ----------- 6------ ------------ -----------
7da9063-regulator : : LDOs & BUCKs 7da9063-regulator : : LDOs & BUCKs
8da9063-onkey : : On Key
8da9063-rtc : : Real-Time Clock 9da9063-rtc : : Real-Time Clock
9da9063-watchdog : : Watchdog 10da9063-watchdog : : Watchdog
10 11
@@ -51,6 +52,18 @@ Sub-nodes:
51 the DA9063. There are currently no entries in this binding, however 52 the DA9063. There are currently no entries in this binding, however
52 compatible = "dlg,da9063-rtc" should be added if a node is created. 53 compatible = "dlg,da9063-rtc" should be added if a node is created.
53 54
55- onkey : This node defines the OnKey settings for controlling the key
56 functionality of the device. The node should contain the compatible property
57 with the value "dlg,da9063-onkey".
58
59 Optional onkey properties:
60
61 - dlg,disable-key-power : Disable power-down using a long key-press. If this
62 entry exists the OnKey driver will remove support for the KEY_POWER key
63 press. If this entry does not exist then by default the key-press
64 triggered power down is enabled and the OnKey will support both KEY_POWER
65 and KEY_SLEEP.
66
54- watchdog : This node defines settings for the Watchdog timer associated 67- watchdog : This node defines settings for the Watchdog timer associated
55 with the DA9063. There are currently no entries in this binding, however 68 with the DA9063. There are currently no entries in this binding, however
56 compatible = "dlg,da9063-watchdog" should be added if a node is created. 69 compatible = "dlg,da9063-watchdog" should be added if a node is created.
@@ -73,6 +86,11 @@ Example:
73 compatible = "dlg,da9063-watchdog"; 86 compatible = "dlg,da9063-watchdog";
74 }; 87 };
75 88
89 onkey {
90 compatible = "dlg,da9063-onkey";
91 dlg,disable-key-power;
92 };
93
76 regulators { 94 regulators {
77 DA9063_BCORE1: bcore1 { 95 DA9063_BCORE1: bcore1 {
78 regulator-name = "BCORE1"; 96 regulator-name = "BCORE1";
diff --git a/Documentation/devicetree/bindings/mfd/max77686.txt b/Documentation/devicetree/bindings/mfd/max77686.txt
index e39f0bc1f55e..163bd81a4607 100644
--- a/Documentation/devicetree/bindings/mfd/max77686.txt
+++ b/Documentation/devicetree/bindings/mfd/max77686.txt
@@ -1,6 +1,6 @@
1Maxim MAX77686 multi-function device 1Maxim MAX77686 multi-function device
2 2
3MAX77686 is a Mulitifunction device with PMIC, RTC and Charger on chip. It is 3MAX77686 is a Multifunction device with PMIC, RTC and Charger on chip. It is
4interfaced to host controller using i2c interface. PMIC and Charger submodules 4interfaced to host controller using i2c interface. PMIC and Charger submodules
5are addressed using same i2c slave address whereas RTC submodule uses 5are addressed using same i2c slave address whereas RTC submodule uses
6different i2c slave address,presently for which we are statically creating i2c 6different i2c slave address,presently for which we are statically creating i2c
diff --git a/Documentation/devicetree/bindings/mfd/max77693.txt b/Documentation/devicetree/bindings/mfd/max77693.txt
index 38e64405e98d..d3425846aa5b 100644
--- a/Documentation/devicetree/bindings/mfd/max77693.txt
+++ b/Documentation/devicetree/bindings/mfd/max77693.txt
@@ -76,7 +76,60 @@ Optional properties:
76 Valid values: 4300000, 4700000, 4800000, 4900000 76 Valid values: 4300000, 4700000, 4800000, 4900000
77 Default: 4300000 77 Default: 4300000
78 78
79- led : the LED submodule device node
80
81There are two LED outputs available - FLED1 and FLED2. Each of them can
82control a separate LED or they can be connected together to double
83the maximum current for a single connected LED. One LED is represented
84by one child node.
85
86Required properties:
87- compatible : Must be "maxim,max77693-led".
88
89Optional properties:
90- maxim,boost-mode :
91 In boost mode the device can produce up to 1.2A of total current
92 on both outputs. The maximum current on each output is reduced
93 to 625mA then. If not enabled explicitly, boost setting defaults to
94 LEDS_BOOST_FIXED in case both current sources are used.
95 Possible values:
96 LEDS_BOOST_OFF (0) - no boost,
97 LEDS_BOOST_ADAPTIVE (1) - adaptive mode,
98 LEDS_BOOST_FIXED (2) - fixed mode.
99- maxim,boost-mvout : Output voltage of the boost module in millivolts.
100 Valid values: 3300 - 5500, step by 25 (rounded down)
101 Default: 3300
102- maxim,mvsys-min : Low input voltage level in millivolts. Flash is not fired
103 if chip estimates that system voltage could drop below this level due
104 to flash power consumption.
105 Valid values: 2400 - 3400, step by 33 (rounded down)
106 Default: 2400
107
108Required properties for the LED child node:
109- led-sources : see Documentation/devicetree/bindings/leds/common.txt;
110 device current output identifiers: 0 - FLED1, 1 - FLED2
111- led-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
112 Valid values for a LED connected to one FLED output:
113 15625 - 250000, step by 15625 (rounded down)
114 Valid values for a LED connected to both FLED outputs:
115 15625 - 500000, step by 15625 (rounded down)
116- flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
117 Valid values for a single LED connected to one FLED output
118 (boost mode must be turned off):
119 15625 - 1000000, step by 15625 (rounded down)
120 Valid values for a single LED connected to both FLED outputs:
121 15625 - 1250000, step by 15625 (rounded down)
122 Valid values for two LEDs case:
123 15625 - 625000, step by 15625 (rounded down)
124- flash-max-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
125 Valid values: 62500 - 1000000, step by 62500 (rounded down)
126
127Optional properties for the LED child node:
128- label : see Documentation/devicetree/bindings/leds/common.txt
129
79Example: 130Example:
131#include <dt-bindings/leds/common.h>
132
80 max77693@66 { 133 max77693@66 {
81 compatible = "maxim,max77693"; 134 compatible = "maxim,max77693";
82 reg = <0x66>; 135 reg = <0x66>;
@@ -117,5 +170,19 @@ Example:
117 maxim,thermal-regulation-celsius = <75>; 170 maxim,thermal-regulation-celsius = <75>;
118 maxim,battery-overcurrent-microamp = <3000000>; 171 maxim,battery-overcurrent-microamp = <3000000>;
119 maxim,charge-input-threshold-microvolt = <4300000>; 172 maxim,charge-input-threshold-microvolt = <4300000>;
173
174 led {
175 compatible = "maxim,max77693-led";
176 maxim,boost-mode = <LEDS_BOOST_FIXED>;
177 maxim,boost-mvout = <5000>;
178 maxim,mvsys-min = <2400>;
179
180 camera_flash: flash-led {
181 label = "max77693-flash";
182 led-sources = <0>, <1>;
183 led-max-microamp = <500000>;
184 flash-max-microamp = <1250000>;
185 flash-max-timeout-us = <1000000>;
186 };
120 }; 187 };
121 }; 188 };
diff --git a/Documentation/devicetree/bindings/mfd/mfd.txt b/Documentation/devicetree/bindings/mfd/mfd.txt
new file mode 100644
index 000000000000..af9d6931a1a2
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/mfd.txt
@@ -0,0 +1,41 @@
1Multi-Function Devices (MFD)
2
3These devices comprise a nexus for heterogeneous hardware blocks containing
4more than one non-unique yet varying hardware functionality.
5
6A typical MFD can be:
7
8- A mixed signal ASIC on an external bus, sometimes a PMIC (Power Management
9 Integrated Circuit) that is manufactured in a lower technology node (rough
10 silicon) that handles analog drivers for things like audio amplifiers, LED
11 drivers, level shifters, PHY (physical interfaces to things like USB or
12 ethernet), regulators etc.
13
14- A range of memory registers containing "miscellaneous system registers" also
15 known as a system controller "syscon" or any other memory range containing a
16 mix of unrelated hardware devices.
17
18Optional properties:
19
20- compatible : "simple-mfd" - this signifies that the operating system should
21 consider all subnodes of the MFD device as separate devices akin to how
22 "simple-bus" inidicates when to see subnodes as children for a simple
23 memory-mapped bus. For more complex devices, when the nexus driver has to
24 probe registers to figure out what child devices exist etc, this should not
25 be used. In the latter case the child devices will be determined by the
26 operating system.
27
28Example:
29
30foo@1000 {
31 compatible = "syscon", "simple-mfd";
32 reg = <0x01000 0x1000>;
33
34 led@08.0 {
35 compatible = "register-bit-led";
36 offset = <0x08>;
37 mask = <0x01>;
38 label = "myled";
39 default-state = "on";
40 };
41};
diff --git a/Documentation/devicetree/bindings/mfd/tps6507x.txt b/Documentation/devicetree/bindings/mfd/tps6507x.txt
index 8fffa3c5ed40..8fffa3c5ed40 100755..100644
--- a/Documentation/devicetree/bindings/mfd/tps6507x.txt
+++ b/Documentation/devicetree/bindings/mfd/tps6507x.txt
diff --git a/Documentation/devicetree/bindings/mips/ath79-soc.txt b/Documentation/devicetree/bindings/mips/ath79-soc.txt
new file mode 100644
index 000000000000..88a12a43e44e
--- /dev/null
+++ b/Documentation/devicetree/bindings/mips/ath79-soc.txt
@@ -0,0 +1,21 @@
1Binding for Qualcomm Atheros AR7xxx/AR9XXX SoC
2
3Each device tree must specify a compatible value for the AR SoC
4it uses in the compatible property of the root node. The compatible
5value must be one of the following values:
6
7- qca,ar7130
8- qca,ar7141
9- qca,ar7161
10- qca,ar7240
11- qca,ar7241
12- qca,ar7242
13- qca,ar9130
14- qca,ar9132
15- qca,ar9330
16- qca,ar9331
17- qca,ar9341
18- qca,ar9342
19- qca,ar9344
20- qca,qca9556
21- qca,qca9558
diff --git a/Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt b/Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt
index 47b205cc9cc7..4556359c5876 100644
--- a/Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt
+++ b/Documentation/devicetree/bindings/misc/nvidia,tegra20-apbmisc.txt
@@ -10,3 +10,5 @@ Required properties:
10 The second entry gives the physical address and length of the 10 The second entry gives the physical address and length of the
11 registers indicating the strapping options. 11 registers indicating the strapping options.
12 12
13Optional properties:
14- nvidia,long-ram-code: If present, the RAM code is long (4 bit). If not, short (2 bit).
diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt
index 98ee2abbe138..7e9490313d5a 100644
--- a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt
+++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt
@@ -8,7 +8,8 @@ Device Tree Bindings for the Arasan SDHCI Controller
8 [3] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt 8 [3] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
9 9
10Required Properties: 10Required Properties:
11 - compatible: Compatibility string. Must be 'arasan,sdhci-8.9a' 11 - compatible: Compatibility string. Must be 'arasan,sdhci-8.9a' or
12 'arasan,sdhci-4.9a'
12 - reg: From mmc bindings: Register location and length. 13 - reg: From mmc bindings: Register location and length.
13 - clocks: From clock bindings: Handles to clock inputs. 14 - clocks: From clock bindings: Handles to clock inputs.
14 - clock-names: From clock bindings: Tuple including "clk_xin" and "clk_ahb" 15 - clock-names: From clock bindings: Tuple including "clk_xin" and "clk_ahb"
diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
index 415c5575cbf7..5d0376b8f202 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
+++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.txt
@@ -7,7 +7,14 @@ This file documents differences between the core properties described
7by mmc.txt and the properties used by the sdhci-esdhc-imx driver. 7by mmc.txt and the properties used by the sdhci-esdhc-imx driver.
8 8
9Required properties: 9Required properties:
10- compatible : Should be "fsl,<chip>-esdhc" 10- compatible : Should be "fsl,<chip>-esdhc", the supported chips include
11 "fsl,imx25-esdhc"
12 "fsl,imx35-esdhc"
13 "fsl,imx51-esdhc"
14 "fsl,imx53-esdhc"
15 "fsl,imx6q-usdhc"
16 "fsl,imx6sl-usdhc"
17 "fsl,imx6sx-usdhc"
11 18
12Optional properties: 19Optional properties:
13- fsl,cd-controller : Indicate to use controller internal card detection 20- fsl,cd-controller : Indicate to use controller internal card detection
diff --git a/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt
index 3b3544931437..df370585cbcc 100644
--- a/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt
+++ b/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt
@@ -13,6 +13,10 @@ Required 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 extensions. 15 - "hisilicon,hi4511-dw-mshc": for controllers with hi4511 specific extensions.
16 - "hisilicon,hi6220-dw-mshc": for controllers with hi6220 specific extensions.
17
18Optional Properties:
19- hisilicon,peripheral-syscon: phandle of syscon used to control peripheral.
16 20
17Example: 21Example:
18 22
@@ -42,3 +46,27 @@ Example:
42 cap-mmc-highspeed; 46 cap-mmc-highspeed;
43 cap-sd-highspeed; 47 cap-sd-highspeed;
44 }; 48 };
49
50 /* for Hi6220 */
51
52 dwmmc_1: dwmmc1@f723e000 {
53 compatible = "hisilicon,hi6220-dw-mshc";
54 num-slots = <0x1>;
55 bus-width = <0x4>;
56 disable-wp;
57 cap-sd-highspeed;
58 sd-uhs-sdr12;
59 sd-uhs-sdr25;
60 card-detect-delay = <200>;
61 hisilicon,peripheral-syscon = <&ao_ctrl>;
62 reg = <0x0 0xf723e000 0x0 0x1000>;
63 interrupts = <0x0 0x49 0x4>;
64 clocks = <&clock_sys HI6220_MMC1_CIUCLK>, <&clock_sys HI6220_MMC1_CLK>;
65 clock-names = "ciu", "biu";
66 cd-gpios = <&gpio1 0 1>;
67 pinctrl-names = "default", "idle";
68 pinctrl-0 = <&sd_pmx_func &sd_clk_cfg_func &sd_cfg_func>;
69 pinctrl-1 = <&sd_pmx_idle &sd_clk_cfg_idle &sd_cfg_idle>;
70 vqmmc-supply = <&ldo7>;
71 vmmc-supply = <&ldo10>;
72 };
diff --git a/Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt b/Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt
index a462c50f19a8..ce0e76749671 100644
--- a/Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt
+++ b/Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.txt
@@ -21,5 +21,7 @@ Example:
21 21
22 sdhci0_pwrseq { 22 sdhci0_pwrseq {
23 compatible = "mmc-pwrseq-simple"; 23 compatible = "mmc-pwrseq-simple";
24 reset-gpios = <&gpio1 12 0>; 24 reset-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
25 clocks = <&clk_32768_ck>;
26 clock-names = "ext_clock";
25 } 27 }
diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt
index 438899e8829b..0384fc3f64e8 100644
--- a/Documentation/devicetree/bindings/mmc/mmc.txt
+++ b/Documentation/devicetree/bindings/mmc/mmc.txt
@@ -21,6 +21,11 @@ Optional properties:
21 below for the case, when a GPIO is used for the CD line 21 below for the case, when a GPIO is used for the CD line
22- wp-inverted: when present, polarity on the WP line is inverted. See the note 22- wp-inverted: when present, polarity on the WP line is inverted. See the note
23 below for the case, when a GPIO is used for the WP line 23 below for the case, when a GPIO is used for the WP line
24- disable-wp: When set no physical WP line is present. This property should
25 only be specified when the controller has a dedicated write-protect
26 detection logic. If a GPIO is always used for the write-protect detection
27 logic it is sufficient to not specify wp-gpios property in the absence of a WP
28 line.
24- max-frequency: maximum operating clock frequency 29- max-frequency: maximum operating clock frequency
25- no-1-8-v: when present, denotes that 1.8v card voltage is not supported on 30- no-1-8-v: when present, denotes that 1.8v card voltage is not supported on
26 this system, even if the controller claims it is. 31 this system, even if the controller claims it is.
diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
new file mode 100644
index 000000000000..a1adfa495ad3
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
@@ -0,0 +1,32 @@
1* MTK MMC controller
2
3The MTK MSDC can act as a MMC controller
4to support MMC, SD, and SDIO types of memory cards.
5
6This file documents differences between the core properties in mmc.txt
7and the properties used by the msdc driver.
8
9Required properties:
10- compatible: Should be "mediatek,mt8173-mmc","mediatek,mt8135-mmc"
11- interrupts: Should contain MSDC interrupt number
12- clocks: MSDC source clock, HCLK
13- clock-names: "source", "hclk"
14- pinctrl-names: should be "default", "state_uhs"
15- pinctrl-0: should contain default/high speed pin ctrl
16- pinctrl-1: should contain uhs mode pin ctrl
17- vmmc-supply: power to the Core
18- vqmmc-supply: power to the IO
19
20Examples:
21mmc0: mmc@11230000 {
22 compatible = "mediatek,mt8173-mmc", "mediatek,mt8135-mmc";
23 reg = <0 0x11230000 0 0x108>;
24 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_LOW>;
25 vmmc-supply = <&mt6397_vemc_3v3_reg>;
26 vqmmc-supply = <&mt6397_vio18_reg>;
27 clocks = <&pericfg CLK_PERI_MSDC30_0>, <&topckgen CLK_TOP_MSDC50_0_H_SEL>;
28 clock-names = "source", "hclk";
29 pinctrl-names = "default", "state_uhs";
30 pinctrl-0 = <&mmc0_pins_default>;
31 pinctrl-1 = <&mmc0_pins_uhs>;
32};
diff --git a/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt b/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
index 299081f94abd..d38942f6c5ae 100644
--- a/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
+++ b/Documentation/devicetree/bindings/mmc/renesas,mmcif.txt
@@ -18,6 +18,8 @@ Required properties:
18 dma-names property. 18 dma-names property.
19- dma-names: must contain "tx" for the transmit DMA channel and "rx" for the 19- dma-names: must contain "tx" for the transmit DMA channel and "rx" for the
20 receive DMA channel. 20 receive DMA channel.
21- max-frequency: Maximum operating clock frequency, driver uses default clock
22 frequency if it is not set.
21 23
22 24
23Example: R8A7790 (R-Car H2) MMCIF0 25Example: R8A7790 (R-Car H2) MMCIF0
@@ -29,4 +31,5 @@ Example: R8A7790 (R-Car H2) MMCIF0
29 clocks = <&mstp3_clks R8A7790_CLK_MMCIF0>; 31 clocks = <&mstp3_clks R8A7790_CLK_MMCIF0>;
30 dmas = <&dmac0 0xd1>, <&dmac0 0xd2>; 32 dmas = <&dmac0 0xd1>, <&dmac0 0xd2>;
31 dma-names = "tx", "rx"; 33 dma-names = "tx", "rx";
34 max-frequency = <97500000>;
32 }; 35 };
diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.txt b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.txt
new file mode 100644
index 000000000000..4ff7128ee3b2
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.txt
@@ -0,0 +1,150 @@
1* Broadcom STB NAND Controller
2
3The Broadcom Set-Top Box NAND controller supports low-level access to raw NAND
4flash chips. It has a memory-mapped register interface for both control
5registers and for its data input/output buffer. On some SoCs, this controller is
6paired with a custom DMA engine (inventively named "Flash DMA") which supports
7basic PROGRAM and READ functions, among other features.
8
9This controller was originally designed for STB SoCs (BCM7xxx) but is now
10available on a variety of Broadcom SoCs, including some BCM3xxx, BCM63xx, and
11iProc/Cygnus. Its history includes several similar (but not fully register
12compatible) versions.
13
14Required properties:
15- compatible : May contain an SoC-specific compatibility string (see below)
16 to account for any SoC-specific hardware bits that may be
17 added on top of the base core controller.
18 In addition, must contain compatibility information about
19 the core NAND controller, of the following form:
20 "brcm,brcmnand" and an appropriate version compatibility
21 string, like "brcm,brcmnand-v7.0"
22 Possible values:
23 brcm,brcmnand-v4.0
24 brcm,brcmnand-v5.0
25 brcm,brcmnand-v6.0
26 brcm,brcmnand-v6.1
27 brcm,brcmnand-v7.0
28 brcm,brcmnand-v7.1
29 brcm,brcmnand
30- reg : the register start and length for NAND register region.
31 (optional) Flash DMA register range (if present)
32 (optional) NAND flash cache range (if at non-standard offset)
33- reg-names : a list of the names corresponding to the previous register
34 ranges. Should contain "nand" and (optionally)
35 "flash-dma" and/or "nand-cache".
36- interrupts : The NAND CTLRDY interrupt and (if Flash DMA is available)
37 FLASH_DMA_DONE
38- interrupt-names : May be "nand_ctlrdy" or "flash_dma_done", if broken out as
39 individual interrupts.
40 May be "nand", if the SoC has the individual NAND
41 interrupts multiplexed behind another custom piece of
42 hardware
43- interrupt-parent : See standard interrupt bindings
44- #address-cells : <1> - subnodes give the chip-select number
45- #size-cells : <0>
46
47Optional properties:
48- brcm,nand-has-wp : Some versions of this IP include a write-protect
49 (WP) control bit. It is always available on >=
50 v7.0. Use this property to describe the rare
51 earlier versions of this core that include WP
52
53 -- Additonal SoC-specific NAND controller properties --
54
55The NAND controller is integrated differently on the variety of SoCs on which it
56is found. Part of this integration involves providing status and enable bits
57with which to control the 8 exposed NAND interrupts, as well as hardware for
58configuring the endianness of the data bus. On some SoCs, these features are
59handled via standard, modular components (e.g., their interrupts look like a
60normal IRQ chip), but on others, they are controlled in unique and interesting
61ways, sometimes with registers that lump multiple NAND-related functions
62together. The former case can be described simply by the standard interrupts
63properties in the main controller node. But for the latter exceptional cases,
64we define additional 'compatible' properties and associated register resources within the NAND controller node above.
65
66 - compatible: Can be one of several SoC-specific strings. Each SoC may have
67 different requirements for its additional properties, as described below each
68 bullet point below.
69
70 * "brcm,nand-bcm63138"
71 - reg: (required) the 'NAND_INT_BASE' register range, with separate status
72 and enable registers
73 - reg-names: (required) "nand-int-base"
74
75 * "brcm,nand-iproc"
76 - reg: (required) the "IDM" register range, for interrupt enable and APB
77 bus access endianness configuration, and the "EXT" register range,
78 for interrupt status/ack.
79 - reg-names: (required) a list of the names corresponding to the previous
80 register ranges. Should contain "iproc-idm" and "iproc-ext".
81
82
83* NAND chip-select
84
85Each controller (compatible: "brcm,brcmnand") may contain one or more subnodes
86to represent enabled chip-selects which (may) contain NAND flash chips. Their
87properties are as follows.
88
89Required properties:
90- compatible : should contain "brcm,nandcs"
91- reg : a single integer representing the chip-select
92 number (e.g., 0, 1, 2, etc.)
93- #address-cells : see partition.txt
94- #size-cells : see partition.txt
95- nand-ecc-strength : see nand.txt
96- nand-ecc-step-size : must be 512 or 1024. See nand.txt
97
98Optional properties:
99- nand-on-flash-bbt : boolean, to enable the on-flash BBT for this
100 chip-select. See nand.txt
101- brcm,nand-oob-sector-size : integer, to denote the spare area sector size
102 expected for the ECC layout in use. This size, in
103 addition to the strength and step-size,
104 determines how the hardware BCH engine will lay
105 out the parity bytes it stores on the flash.
106 This property can be automatically determined by
107 the flash geometry (particularly the NAND page
108 and OOB size) in many cases, but when booting
109 from NAND, the boot controller has only a limited
110 number of available options for its default ECC
111 layout.
112
113Each nandcs device node may optionally contain sub-nodes describing the flash
114partition mapping. See partition.txt for more detail.
115
116
117Example:
118
119nand@f0442800 {
120 compatible = "brcm,brcmnand-v7.0", "brcm,brcmnand";
121 reg = <0xF0442800 0x600>,
122 <0xF0443000 0x100>;
123 reg-names = "nand", "flash-dma";
124 interrupt-parent = <&hif_intr2_intc>;
125 interrupts = <24>, <4>;
126
127 #address-cells = <1>;
128 #size-cells = <0>;
129
130 nandcs@1 {
131 compatible = "brcm,nandcs";
132 reg = <1>; // Chip select 1
133 nand-on-flash-bbt;
134 nand-ecc-strength = <12>;
135 nand-ecc-step-size = <512>;
136
137 // Partitions
138 #address-cells = <1>; // <2>, for 64-bit offset
139 #size-cells = <1>; // <2>, for 64-bit length
140 flash0.rootfs@0 {
141 reg = <0 0x10000000>;
142 };
143 flash0@0 {
144 reg = <0 0>; // MTDPART_SIZ_FULL
145 };
146 flash0.kernel@10000000 {
147 reg = <0x10000000 0x400000>;
148 };
149 };
150};
diff --git a/Documentation/devicetree/bindings/mtd/m25p80.txt b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt
index f20b111b502a..2bee68103b01 100644
--- a/Documentation/devicetree/bindings/mtd/m25p80.txt
+++ b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt
@@ -8,8 +8,8 @@ Required properties:
8 is not Linux-only, but in case of Linux, see the "m25p_ids" 8 is not Linux-only, but in case of Linux, see the "m25p_ids"
9 table in drivers/mtd/devices/m25p80.c for the list of supported 9 table in drivers/mtd/devices/m25p80.c for the list of supported
10 chips. 10 chips.
11 Must also include "nor-jedec" for any SPI NOR flash that can be 11 Must also include "jedec,spi-nor" for any SPI NOR flash that can
12 identified by the JEDEC READ ID opcode (0x9F). 12 be identified by the JEDEC READ ID opcode (0x9F).
13- reg : Chip-Select number 13- reg : Chip-Select number
14- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at 14- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
15 15
@@ -25,7 +25,7 @@ Example:
25 flash: m25p80@0 { 25 flash: m25p80@0 {
26 #address-cells = <1>; 26 #address-cells = <1>;
27 #size-cells = <1>; 27 #size-cells = <1>;
28 compatible = "spansion,m25p80", "nor-jedec"; 28 compatible = "spansion,m25p80", "jedec,spi-nor";
29 reg = <0>; 29 reg = <0>;
30 spi-max-frequency = <40000000>; 30 spi-max-frequency = <40000000>;
31 m25p,fast-read; 31 m25p,fast-read;
diff --git a/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt b/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt
deleted file mode 100644
index 8db32384a486..000000000000
--- a/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt
+++ /dev/null
@@ -1,48 +0,0 @@
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- interrupt-parent: Should be the phandle for the interrupt controller
11 that services interrupts for this device
12- interrupts: Should contain the amd-xgbe-phy interrupt.
13
14Optional properties:
15- amd,speed-set: Speed capabilities of the device
16 0 - 1GbE and 10GbE (default)
17 1 - 2.5GbE and 10GbE
18
19The following optional properties are represented by an array with each
20value corresponding to a particular speed. The first array value represents
21the setting for the 1GbE speed, the second value for the 2.5GbE speed and
22the third value for the 10GbE speed. All three values are required if the
23property is used.
24- amd,serdes-blwc: Baseline wandering correction enablement
25 0 - Off
26 1 - On
27- amd,serdes-cdr-rate: CDR rate speed selection
28- amd,serdes-pq-skew: PQ (data sampling) skew
29- amd,serdes-tx-amp: TX amplitude boost
30- amd,serdes-dfe-tap-config: DFE taps available to run
31- amd,serdes-dfe-tap-enable: DFE taps to enable
32
33Example:
34 xgbe_phy@e1240800 {
35 compatible = "amd,xgbe-phy-seattle-v1a", "ethernet-phy-ieee802.3-c45";
36 reg = <0 0xe1240800 0 0x00400>,
37 <0 0xe1250000 0 0x00060>,
38 <0 0xe1250080 0 0x00004>;
39 interrupt-parent = <&gic>;
40 interrupts = <0 323 4>;
41 amd,speed-set = <0>;
42 amd,serdes-blwc = <1>, <1>, <0>;
43 amd,serdes-cdr-rate = <2>, <2>, <7>;
44 amd,serdes-pq-skew = <10>, <10>, <30>;
45 amd,serdes-tx-amp = <15>, <15>, <10>;
46 amd,serdes-dfe-tap-config = <3>, <3>, <1>;
47 amd,serdes-dfe-tap-enable = <0>, <0>, <127>;
48 };
diff --git a/Documentation/devicetree/bindings/net/amd-xgbe.txt b/Documentation/devicetree/bindings/net/amd-xgbe.txt
index 26efd526d16c..4bb624a73b54 100644
--- a/Documentation/devicetree/bindings/net/amd-xgbe.txt
+++ b/Documentation/devicetree/bindings/net/amd-xgbe.txt
@@ -5,12 +5,16 @@ Required properties:
5- reg: Address and length of the register sets for the device 5- reg: Address and length of the register sets for the device
6 - MAC registers 6 - MAC registers
7 - PCS registers 7 - PCS registers
8 - SerDes Rx/Tx registers
9 - SerDes integration registers (1/2)
10 - SerDes integration registers (2/2)
8- interrupt-parent: Should be the phandle for the interrupt controller 11- interrupt-parent: Should be the phandle for the interrupt controller
9 that services interrupts for this device 12 that services interrupts for this device
10- interrupts: Should contain the amd-xgbe interrupt(s). The first interrupt 13- interrupts: Should contain the amd-xgbe interrupt(s). The first interrupt
11 listed is required and is the general device interrupt. If the optional 14 listed is required and is the general device interrupt. If the optional
12 amd,per-channel-interrupt property is specified, then one additional 15 amd,per-channel-interrupt property is specified, then one additional
13 interrupt for each DMA channel supported by the device should be specified 16 interrupt for each DMA channel supported by the device should be specified.
17 The last interrupt listed should be the PCS auto-negotiation interrupt.
14- clocks: 18- clocks:
15 - DMA clock for the amd-xgbe device (used for calculating the 19 - DMA clock for the amd-xgbe device (used for calculating the
16 correct Rx interrupt watchdog timer value on a DMA channel 20 correct Rx interrupt watchdog timer value on a DMA channel
@@ -19,7 +23,6 @@ Required properties:
19- clock-names: Should be the names of the clocks 23- clock-names: Should be the names of the clocks
20 - "dma_clk" for the DMA clock 24 - "dma_clk" for the DMA clock
21 - "ptp_clk" for the PTP clock 25 - "ptp_clk" for the PTP clock
22- phy-handle: See ethernet.txt file in the same directory
23- phy-mode: See ethernet.txt file in the same directory 26- phy-mode: See ethernet.txt file in the same directory
24 27
25Optional properties: 28Optional properties:
@@ -29,19 +32,46 @@ Optional properties:
29- amd,per-channel-interrupt: Indicates that Rx and Tx complete will generate 32- amd,per-channel-interrupt: Indicates that Rx and Tx complete will generate
30 a unique interrupt for each DMA channel - this requires an additional 33 a unique interrupt for each DMA channel - this requires an additional
31 interrupt be configured for each DMA channel 34 interrupt be configured for each DMA channel
35- amd,speed-set: Speed capabilities of the device
36 0 - 1GbE and 10GbE (default)
37 1 - 2.5GbE and 10GbE
38
39The following optional properties are represented by an array with each
40value corresponding to a particular speed. The first array value represents
41the setting for the 1GbE speed, the second value for the 2.5GbE speed and
42the third value for the 10GbE speed. All three values are required if the
43property is used.
44- amd,serdes-blwc: Baseline wandering correction enablement
45 0 - Off
46 1 - On
47- amd,serdes-cdr-rate: CDR rate speed selection
48- amd,serdes-pq-skew: PQ (data sampling) skew
49- amd,serdes-tx-amp: TX amplitude boost
50- amd,serdes-dfe-tap-config: DFE taps available to run
51- amd,serdes-dfe-tap-enable: DFE taps to enable
32 52
33Example: 53Example:
34 xgbe@e0700000 { 54 xgbe@e0700000 {
35 compatible = "amd,xgbe-seattle-v1a"; 55 compatible = "amd,xgbe-seattle-v1a";
36 reg = <0 0xe0700000 0 0x80000>, 56 reg = <0 0xe0700000 0 0x80000>,
37 <0 0xe0780000 0 0x80000>; 57 <0 0xe0780000 0 0x80000>,
58 <0 0xe1240800 0 0x00400>,
59 <0 0xe1250000 0 0x00060>,
60 <0 0xe1250080 0 0x00004>;
38 interrupt-parent = <&gic>; 61 interrupt-parent = <&gic>;
39 interrupts = <0 325 4>, 62 interrupts = <0 325 4>,
40 <0 326 1>, <0 327 1>, <0 328 1>, <0 329 1>; 63 <0 326 1>, <0 327 1>, <0 328 1>, <0 329 1>,
64 <0 323 4>;
41 amd,per-channel-interrupt; 65 amd,per-channel-interrupt;
42 clocks = <&xgbe_dma_clk>, <&xgbe_ptp_clk>; 66 clocks = <&xgbe_dma_clk>, <&xgbe_ptp_clk>;
43 clock-names = "dma_clk", "ptp_clk"; 67 clock-names = "dma_clk", "ptp_clk";
44 phy-handle = <&phy>;
45 phy-mode = "xgmii"; 68 phy-mode = "xgmii";
46 mac-address = [ 02 a1 a2 a3 a4 a5 ]; 69 mac-address = [ 02 a1 a2 a3 a4 a5 ];
70 amd,speed-set = <0>;
71 amd,serdes-blwc = <1>, <1>, <0>;
72 amd,serdes-cdr-rate = <2>, <2>, <7>;
73 amd,serdes-pq-skew = <10>, <10>, <30>;
74 amd,serdes-tx-amp = <15>, <15>, <10>;
75 amd,serdes-dfe-tap-config = <3>, <3>, <1>;
76 amd,serdes-dfe-tap-enable = <0>, <0>, <127>;
47 }; 77 };
diff --git a/Documentation/devicetree/bindings/net/cdns-emac.txt b/Documentation/devicetree/bindings/net/cdns-emac.txt
index abd67c13d344..4451ee973223 100644
--- a/Documentation/devicetree/bindings/net/cdns-emac.txt
+++ b/Documentation/devicetree/bindings/net/cdns-emac.txt
@@ -3,7 +3,8 @@
3Required properties: 3Required properties:
4- compatible: Should be "cdns,[<chip>-]{emac}" 4- compatible: Should be "cdns,[<chip>-]{emac}"
5 Use "cdns,at91rm9200-emac" Atmel at91rm9200 SoC. 5 Use "cdns,at91rm9200-emac" Atmel at91rm9200 SoC.
6 or the generic form: "cdns,emac". 6 Use "cdns,zynq-gem" Xilinx Zynq-7xxx SoC.
7 Or the generic form: "cdns,emac".
7- reg: Address and length of the register set for the device 8- reg: Address and length of the register set for the device
8- interrupts: Should contain macb interrupt 9- interrupts: Should contain macb interrupt
9- phy-mode: see ethernet.txt file in the same directory. 10- phy-mode: see ethernet.txt file in the same directory.
diff --git a/Documentation/devicetree/bindings/net/ezchip_enet.txt b/Documentation/devicetree/bindings/net/ezchip_enet.txt
new file mode 100644
index 000000000000..4e29b2b82873
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/ezchip_enet.txt
@@ -0,0 +1,15 @@
1* EZchip NPS Management Ethernet port driver
2
3Required properties:
4- compatible: Should be "ezchip,nps-mgt-enet"
5- reg: Address and length of the register set for the device
6- interrupts: Should contain the ENET interrupt
7
8Examples:
9
10 ethernet@f0003000 {
11 compatible = "ezchip,nps-mgt-enet";
12 reg = <0xf0003000 0x44>;
13 interrupts = <7>;
14 mac-address = [ 00 11 22 33 44 55 ];
15 };
diff --git a/Documentation/devicetree/bindings/net/ipq806x-dwmac.txt b/Documentation/devicetree/bindings/net/ipq806x-dwmac.txt
new file mode 100644
index 000000000000..6d7ab4e524d4
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/ipq806x-dwmac.txt
@@ -0,0 +1,35 @@
1* IPQ806x DWMAC Ethernet controller
2
3The device inherits all the properties of the dwmac/stmmac devices
4described in the file net/stmmac.txt with the following changes.
5
6Required properties:
7
8- compatible: should be "qcom,ipq806x-gmac" along with "snps,dwmac"
9 and any applicable more detailed version number
10 described in net/stmmac.txt
11
12- qcom,nss-common: should contain a phandle to a syscon device mapping the
13 nss-common registers.
14
15- qcom,qsgmii-csr: should contain a phandle to a syscon device mapping the
16 qsgmii-csr registers.
17
18Example:
19
20 gmac: ethernet@37000000 {
21 device_type = "network";
22 compatible = "qcom,ipq806x-gmac";
23 reg = <0x37000000 0x200000>;
24 interrupts = <GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>;
25 interrupt-names = "macirq";
26
27 qcom,nss-common = <&nss_common>;
28 qcom,qsgmii-csr = <&qsgmii_csr>;
29
30 clocks = <&gcc GMAC_CORE1_CLK>;
31 clock-names = "stmmaceth";
32
33 resets = <&gcc GMAC_CORE1_RESET>;
34 reset-names = "stmmaceth";
35 };
diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net/macb.txt
index ba19d671e808..b5d79761ac97 100644
--- a/Documentation/devicetree/bindings/net/macb.txt
+++ b/Documentation/devicetree/bindings/net/macb.txt
@@ -7,8 +7,10 @@ Required properties:
7 Use "cdns,at32ap7000-macb" for other 10/100 usage or use the generic form: "cdns,macb". 7 Use "cdns,at32ap7000-macb" for other 10/100 usage or use the generic form: "cdns,macb".
8 Use "cdns,pc302-gem" for Picochip picoXcell pc302 and later devices based on 8 Use "cdns,pc302-gem" for Picochip picoXcell pc302 and later devices based on
9 the Cadence GEM, or the generic form: "cdns,gem". 9 the Cadence GEM, or the generic form: "cdns,gem".
10 Use "cdns,sama5d3-gem" for the Gigabit IP available on Atmel sama5d3 SoCs. 10 Use "atmel,sama5d2-gem" for the GEM IP (10/100) available on Atmel sama5d2 SoCs.
11 Use "cdns,sama5d4-gem" for the Gigabit IP available on Atmel sama5d4 SoCs. 11 Use "atmel,sama5d3-gem" for the Gigabit IP available on Atmel sama5d3 SoCs.
12 Use "atmel,sama5d4-gem" for the GEM IP (10/100) available on Atmel sama5d4 SoCs.
13 Use "cdns,zynqmp-gem" for Zynq Ultrascale+ MPSoC.
12- reg: Address and length of the register set for the device 14- reg: Address and length of the register set for the device
13- interrupts: Should contain macb interrupt 15- interrupts: Should contain macb interrupt
14- phy-mode: See ethernet.txt file in the same directory. 16- phy-mode: See ethernet.txt file in the same directory.
diff --git a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt
index 750d577e8083..f5a8ca29aff0 100644
--- a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt
+++ b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt
@@ -1,7 +1,7 @@
1* Marvell Armada 370 / Armada XP Ethernet Controller (NETA) 1* Marvell Armada 370 / Armada XP Ethernet Controller (NETA)
2 2
3Required properties: 3Required properties:
4- compatible: should be "marvell,armada-370-neta". 4- compatible: "marvell,armada-370-neta" or "marvell,armada-xp-neta".
5- reg: address and length of the register set for the device. 5- reg: address and length of the register set for the device.
6- interrupts: interrupt for the device 6- interrupts: interrupt for the device
7- phy: See ethernet.txt file in the same directory. 7- phy: See ethernet.txt file in the same directory.
diff --git a/Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt b/Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt
new file mode 100644
index 000000000000..7c4a0cc370cf
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/nfc/nfcmrvl.txt
@@ -0,0 +1,29 @@
1* Marvell International Ltd. NCI NFC Controller
2
3Required properties:
4- compatible: Should be "mrvl,nfc-uart".
5
6Optional SoC specific properties:
7- pinctrl-names: Contains only one value - "default".
8- pintctrl-0: Specifies the pin control groups used for this controller.
9- reset-n-io: Output GPIO pin used to reset the chip (active low).
10- hci-muxed: Specifies that the chip is muxing NCI over HCI frames.
11
12Optional UART-based chip specific properties:
13- flow-control: Specifies that the chip is using RTS/CTS.
14- break-control: Specifies that the chip needs specific break management.
15
16Example (for ARM-based BeagleBoard Black with 88W8887 on UART5):
17
18&uart5 {
19 status = "okay";
20
21 nfcmrvluart: nfcmrvluart@5 {
22 compatible = "mrvl,nfc-uart";
23
24 reset-n-io = <&gpio3 16 0>;
25
26 hci-muxed;
27 flow-control;
28 }
29};
diff --git a/Documentation/devicetree/bindings/net/nfc/st21nfcb.txt b/Documentation/devicetree/bindings/net/nfc/st-nci.txt
index bb237072dbe9..d707588ed734 100644
--- a/Documentation/devicetree/bindings/net/nfc/st21nfcb.txt
+++ b/Documentation/devicetree/bindings/net/nfc/st-nci.txt
@@ -1,7 +1,7 @@
1* STMicroelectronics SAS. ST21NFCB NFC Controller 1* STMicroelectronics SAS. ST NCI NFC Controller
2 2
3Required properties: 3Required properties:
4- compatible: Should be "st,st21nfcb-i2c". 4- compatible: Should be "st,st21nfcb-i2c" or "st,st21nfcc-i2c".
5- clock-frequency: I²C work frequency. 5- clock-frequency: I²C work frequency.
6- reg: address on the bus 6- reg: address on the bus
7- interrupt-parent: phandle for the interrupt gpio controller 7- interrupt-parent: phandle for the interrupt gpio controller
diff --git a/Documentation/devicetree/bindings/net/nfc/trf7970a.txt b/Documentation/devicetree/bindings/net/nfc/trf7970a.txt
index 7c89ca290ced..32b35a07abe4 100644
--- a/Documentation/devicetree/bindings/net/nfc/trf7970a.txt
+++ b/Documentation/devicetree/bindings/net/nfc/trf7970a.txt
@@ -18,6 +18,9 @@ Optional SoC Specific Properties:
18 "IRQ Status Read" erratum. 18 "IRQ Status Read" erratum.
19- en2-rf-quirk: Specify that the trf7970a being used has the "EN2 RF" 19- en2-rf-quirk: Specify that the trf7970a being used has the "EN2 RF"
20 erratum. 20 erratum.
21- t5t-rmb-extra-byte-quirk: Specify that the trf7970a has the erratum
22 where an extra byte is returned by Read Multiple Block commands issued
23 to Type 5 tags.
21 24
22Example (for ARM-based BeagleBone with TRF7970A on SPI1): 25Example (for ARM-based BeagleBone with TRF7970A on SPI1):
23 26
@@ -39,6 +42,7 @@ Example (for ARM-based BeagleBone with TRF7970A on SPI1):
39 autosuspend-delay = <30000>; 42 autosuspend-delay = <30000>;
40 irq-status-read-quirk; 43 irq-status-read-quirk;
41 en2-rf-quirk; 44 en2-rf-quirk;
45 t5t-rmb-extra-byte-quirk;
42 status = "okay"; 46 status = "okay";
43 }; 47 };
44}; 48};
diff --git a/Documentation/devicetree/bindings/net/nxp,lpc1850-dwmac.txt b/Documentation/devicetree/bindings/net/nxp,lpc1850-dwmac.txt
new file mode 100644
index 000000000000..7edba1264f6f
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/nxp,lpc1850-dwmac.txt
@@ -0,0 +1,20 @@
1* NXP LPC1850 GMAC ethernet controller
2
3This device is a platform glue layer for stmmac.
4Please see stmmac.txt for the other unchanged properties.
5
6Required properties:
7 - compatible: Should contain "nxp,lpc1850-dwmac"
8
9Examples:
10
11mac: ethernet@40010000 {
12 compatible = "nxp,lpc1850-dwmac", "snps,dwmac-3.611", "snps,dwmac";
13 reg = <0x40010000 0x2000>;
14 interrupts = <5>;
15 interrupt-names = "macirq";
16 clocks = <&ccu1 CLK_CPU_ETHERNET>;
17 clock-names = "stmmaceth";
18 resets = <&rgu 22>;
19 reset-names = "stmmaceth";
20}
diff --git a/Documentation/devicetree/bindings/net/phy.txt b/Documentation/devicetree/bindings/net/phy.txt
index 40831fbaff72..525e1658f2da 100644
--- a/Documentation/devicetree/bindings/net/phy.txt
+++ b/Documentation/devicetree/bindings/net/phy.txt
@@ -30,6 +30,9 @@ Optional Properties:
30 30
31- max-speed: Maximum PHY supported speed (10, 100, 1000...) 31- max-speed: Maximum PHY supported speed (10, 100, 1000...)
32 32
33- broken-turn-around: If set, indicates the PHY device does not correctly
34 release the turn around line low at the end of a MDIO transaction.
35
33Example: 36Example:
34 37
35ethernet-phy@0 { 38ethernet-phy@0 {
diff --git a/Documentation/devicetree/bindings/net/renesas,ravb.txt b/Documentation/devicetree/bindings/net/renesas,ravb.txt
new file mode 100644
index 000000000000..1fd8831437bf
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/renesas,ravb.txt
@@ -0,0 +1,48 @@
1* Renesas Electronics Ethernet AVB
2
3This file provides information on what the device node for the Ethernet AVB
4interface contains.
5
6Required properties:
7- compatible: "renesas,etheravb-r8a7790" if the device is a part of R8A7790 SoC.
8 "renesas,etheravb-r8a7794" if the device is a part of R8A7794 SoC.
9- reg: offset and length of (1) the register block and (2) the stream buffer.
10- interrupts: interrupt specifier for the sole interrupt.
11- phy-mode: see ethernet.txt file in the same directory.
12- phy-handle: see ethernet.txt file in the same directory.
13- #address-cells: number of address cells for the MDIO bus, must be equal to 1.
14- #size-cells: number of size cells on the MDIO bus, must be equal to 0.
15- clocks: clock phandle and specifier pair.
16- pinctrl-0: phandle, referring to a default pin configuration node.
17
18Optional properties:
19- interrupt-parent: the phandle for the interrupt controller that services
20 interrupts for this device.
21- pinctrl-names: pin configuration state name ("default").
22- renesas,no-ether-link: boolean, specify when a board does not provide a proper
23 AVB_LINK signal.
24- renesas,ether-link-active-low: boolean, specify when the AVB_LINK signal is
25 active-low instead of normal active-high.
26
27Example:
28
29 ethernet@e6800000 {
30 compatible = "renesas,etheravb-r8a7790";
31 reg = <0 0xe6800000 0 0x800>, <0 0xee0e8000 0 0x4000>;
32 interrupt-parent = <&gic>;
33 interrupts = <0 163 IRQ_TYPE_LEVEL_HIGH>;
34 clocks = <&mstp8_clks R8A7790_CLK_ETHERAVB>;
35 phy-mode = "rmii";
36 phy-handle = <&phy0>;
37 pinctrl-0 = <&ether_pins>;
38 pinctrl-names = "default";
39 renesas,no-ether-link;
40 #address-cells = <1>;
41 #size-cells = <0>;
42
43 phy0: ethernet-phy@0 {
44 reg = <0>;
45 interrupt-parent = <&gpio2>;
46 interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
47 };
48 };
diff --git a/Documentation/devicetree/bindings/net/rockchip-dwmac.txt b/Documentation/devicetree/bindings/net/rockchip-dwmac.txt
index 21fd199e89b5..93eac7ce1446 100644
--- a/Documentation/devicetree/bindings/net/rockchip-dwmac.txt
+++ b/Documentation/devicetree/bindings/net/rockchip-dwmac.txt
@@ -3,7 +3,7 @@ Rockchip SoC RK3288 10/100/1000 Ethernet driver(GMAC)
3The device node has following properties. 3The device node has following properties.
4 4
5Required properties: 5Required properties:
6 - compatible: Can be "rockchip,rk3288-gmac". 6 - compatible: Can be one of "rockchip,rk3288-gmac", "rockchip,rk3368-gmac"
7 - reg: addresses and length of the register sets for the device. 7 - reg: addresses and length of the register sets for the device.
8 - interrupts: Should contain the GMAC interrupts. 8 - interrupts: Should contain the GMAC interrupts.
9 - interrupt-names: Should contain the interrupt names "macirq". 9 - interrupt-names: Should contain the interrupt names "macirq".
diff --git a/Documentation/devicetree/bindings/net/ti,dp83867.txt b/Documentation/devicetree/bindings/net/ti,dp83867.txt
new file mode 100644
index 000000000000..58d935b58598
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/ti,dp83867.txt
@@ -0,0 +1,25 @@
1* Texas Instruments - dp83867 Giga bit ethernet phy
2
3Required properties:
4 - reg - The ID number for the phy, usually a small integer
5 - ti,rx-internal-delay - RGMII Recieve Clock Delay - see dt-bindings/net/ti-dp83867.h
6 for applicable values
7 - ti,tx-internal-delay - RGMII Transmit Clock Delay - see dt-bindings/net/ti-dp83867.h
8 for applicable values
9 - ti,fifo-depth - Transmitt FIFO depth- see dt-bindings/net/ti-dp83867.h
10 for applicable values
11
12Default child nodes are standard Ethernet PHY device
13nodes as described in Documentation/devicetree/bindings/net/phy.txt
14
15Example:
16
17 ethernet-phy@0 {
18 reg = <0>;
19 ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
20 ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>;
21 ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
22 };
23
24Datasheet can be found:
25http://www.ti.com/product/DP83867IR/datasheet
diff --git a/Documentation/devicetree/bindings/panel/hannstar,hsd100pxn1.txt b/Documentation/devicetree/bindings/panel/hannstar,hsd100pxn1.txt
new file mode 100644
index 000000000000..8270319a99de
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/hannstar,hsd100pxn1.txt
@@ -0,0 +1,7 @@
1HannStar Display Corp. HSD100PXN1 10.1" XGA LVDS panel
2
3Required properties:
4- compatible: should be "hannstar,hsd100pxn1"
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/lg,lb070wv8.txt b/Documentation/devicetree/bindings/panel/lg,lb070wv8.txt
new file mode 100644
index 000000000000..a7588e5259cf
--- /dev/null
+++ b/Documentation/devicetree/bindings/panel/lg,lb070wv8.txt
@@ -0,0 +1,7 @@
1LG 7" (800x480 pixels) TFT LCD panel
2
3Required properties:
4- compatible: should be "lg,lb070wv8"
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/pci/xgene-pci-msi.txt b/Documentation/devicetree/bindings/pci/xgene-pci-msi.txt
new file mode 100644
index 000000000000..36d881c8e6d4
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/xgene-pci-msi.txt
@@ -0,0 +1,68 @@
1* AppliedMicro X-Gene v1 PCIe MSI controller
2
3Required properties:
4
5- compatible: should be "apm,xgene1-msi" to identify
6 X-Gene v1 PCIe MSI controller block.
7- msi-controller: indicates that this is X-Gene v1 PCIe MSI controller node
8- reg: physical base address (0x79000000) and length (0x900000) for controller
9 registers. These registers include the MSI termination address and data
10 registers as well as the MSI interrupt status registers.
11- reg-names: not required
12- interrupts: A list of 16 interrupt outputs of the controller, starting from
13 interrupt number 0x10 to 0x1f.
14- interrupt-names: not required
15
16Each PCIe node needs to have property msi-parent that points to msi controller node
17
18Examples:
19
20SoC DTSI:
21
22 + MSI node:
23 msi@79000000 {
24 compatible = "apm,xgene1-msi";
25 msi-controller;
26 reg = <0x00 0x79000000 0x0 0x900000>;
27 interrupts = <0x0 0x10 0x4>
28 <0x0 0x11 0x4>
29 <0x0 0x12 0x4>
30 <0x0 0x13 0x4>
31 <0x0 0x14 0x4>
32 <0x0 0x15 0x4>
33 <0x0 0x16 0x4>
34 <0x0 0x17 0x4>
35 <0x0 0x18 0x4>
36 <0x0 0x19 0x4>
37 <0x0 0x1a 0x4>
38 <0x0 0x1b 0x4>
39 <0x0 0x1c 0x4>
40 <0x0 0x1d 0x4>
41 <0x0 0x1e 0x4>
42 <0x0 0x1f 0x4>;
43 };
44
45 + PCIe controller node with msi-parent property pointing to MSI node:
46 pcie0: pcie@1f2b0000 {
47 status = "disabled";
48 device_type = "pci";
49 compatible = "apm,xgene-storm-pcie", "apm,xgene-pcie";
50 #interrupt-cells = <1>;
51 #size-cells = <2>;
52 #address-cells = <3>;
53 reg = < 0x00 0x1f2b0000 0x0 0x00010000 /* Controller registers */
54 0xe0 0xd0000000 0x0 0x00040000>; /* PCI config space */
55 reg-names = "csr", "cfg";
56 ranges = <0x01000000 0x00 0x00000000 0xe0 0x10000000 0x00 0x00010000 /* io */
57 0x02000000 0x00 0x80000000 0xe1 0x80000000 0x00 0x80000000>; /* mem */
58 dma-ranges = <0x42000000 0x80 0x00000000 0x80 0x00000000 0x00 0x80000000
59 0x42000000 0x00 0x00000000 0x00 0x00000000 0x80 0x00000000>;
60 interrupt-map-mask = <0x0 0x0 0x0 0x7>;
61 interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0xc2 0x1
62 0x0 0x0 0x0 0x2 &gic 0x0 0xc3 0x1
63 0x0 0x0 0x0 0x3 &gic 0x0 0xc4 0x1
64 0x0 0x0 0x0 0x4 &gic 0x0 0xc5 0x1>;
65 dma-coherent;
66 clocks = <&pcie0clk 0>;
67 msi-parent= <&msi>;
68 };
diff --git a/Documentation/devicetree/bindings/pci/xilinx-pcie.txt b/Documentation/devicetree/bindings/pci/xilinx-pcie.txt
index 3e2c88d97ad4..02f979a48aeb 100644
--- a/Documentation/devicetree/bindings/pci/xilinx-pcie.txt
+++ b/Documentation/devicetree/bindings/pci/xilinx-pcie.txt
@@ -58,5 +58,5 @@ Example:
58 interrupt-controller; 58 interrupt-controller;
59 #address-cells = <0>; 59 #address-cells = <0>;
60 #interrupt-cells = <1>; 60 #interrupt-cells = <1>;
61 } 61 };
62 }; 62 };
diff --git a/Documentation/devicetree/bindings/phy/brcm,brcmstb-sata-phy.txt b/Documentation/devicetree/bindings/phy/brcm,brcmstb-sata-phy.txt
new file mode 100644
index 000000000000..7f81ef90146a
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/brcm,brcmstb-sata-phy.txt
@@ -0,0 +1,40 @@
1* Broadcom SATA3 PHY for STB
2
3Required properties:
4- compatible: should be one or more of
5 "brcm,bcm7445-sata-phy"
6 "brcm,phy-sata3"
7- address-cells: should be 1
8- size-cells: should be 0
9- reg: register range for the PHY PCB interface
10- reg-names: should be "phy"
11
12Sub-nodes:
13 Each port's PHY should be represented as a sub-node.
14
15Sub-nodes required properties:
16- reg: the PHY number
17- phy-cells: generic PHY binding; must be 0
18Optional:
19- brcm,enable-ssc: use spread spectrum clocking (SSC) on this port
20
21
22Example:
23
24 sata-phy@f0458100 {
25 compatible = "brcm,bcm7445-sata-phy", "brcm,phy-sata3";
26 reg = <0xf0458100 0x1e00>, <0xf045804c 0x10>;
27 reg-names = "phy";
28 #address-cells = <1>;
29 #size-cells = <0>;
30
31 sata-phy@0 {
32 reg = <0>;
33 #phy-cells = <0>;
34 };
35
36 sata-phy@1 {
37 reg = <1>;
38 #phy-cells = <0>;
39 };
40 };
diff --git a/Documentation/devicetree/bindings/phy/pistachio-usb-phy.txt b/Documentation/devicetree/bindings/phy/pistachio-usb-phy.txt
new file mode 100644
index 000000000000..afbc7e24a3de
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/pistachio-usb-phy.txt
@@ -0,0 +1,29 @@
1IMG Pistachio USB PHY
2=====================
3
4Required properties:
5--------------------
6 - compatible: Must be "img,pistachio-usb-phy".
7 - #phy-cells: Must be 0. See ./phy-bindings.txt for details.
8 - clocks: Must contain an entry for each entry in clock-names.
9 See ../clock/clock-bindings.txt for details.
10 - clock-names: Must include "usb_phy".
11 - img,cr-top: Must constain a phandle to the CR_TOP syscon node.
12 - img,refclk: Indicates the reference clock source for the USB PHY.
13 See <dt-bindings/phy/phy-pistachio-usb.h> for a list of valid values.
14
15Optional properties:
16--------------------
17 - phy-supply: USB VBUS supply. Must supply 5.0V.
18
19Example:
20--------
21usb_phy: usb-phy {
22 compatible = "img,pistachio-usb-phy";
23 clocks = <&clk_core CLK_USB_PHY>;
24 clock-names = "usb_phy";
25 phy-supply = <&usb_vbus>;
26 img,refclk = <REFCLK_CLK_CORE>;
27 img,cr-top = <&cr_top>;
28 #phy-cells = <0>;
29};
diff --git a/Documentation/devicetree/bindings/phy/pxa1928-usb-phy.txt b/Documentation/devicetree/bindings/phy/pxa1928-usb-phy.txt
new file mode 100644
index 000000000000..660a13ca90b3
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/pxa1928-usb-phy.txt
@@ -0,0 +1,18 @@
1* Marvell PXA1928 USB and HSIC PHYs
2
3Required properties:
4- compatible: "marvell,pxa1928-usb-phy" or "marvell,pxa1928-hsic-phy"
5- reg: base address and length of the registers
6- clocks - A single clock. From common clock binding.
7- #phys-cells: should be 0. From commmon phy binding.
8- resets: reference to the reset controller
9
10Example:
11
12 usbphy: phy@7000 {
13 compatible = "marvell,pxa1928-usb-phy";
14 reg = <0x7000 0xe0>;
15 clocks = <&apmu_clocks PXA1928_CLK_USB>;
16 #phy-cells = <0>;
17 };
18
diff --git a/Documentation/devicetree/bindings/phy/rcar-gen2-phy.txt b/Documentation/devicetree/bindings/phy/rcar-gen2-phy.txt
index 00fc52a034b7..d564ba4f1cf6 100644
--- a/Documentation/devicetree/bindings/phy/rcar-gen2-phy.txt
+++ b/Documentation/devicetree/bindings/phy/rcar-gen2-phy.txt
@@ -6,6 +6,7 @@ This file provides information on what the device node for the R-Car generation
6Required properties: 6Required properties:
7- compatible: "renesas,usb-phy-r8a7790" if the device is a part of R8A7790 SoC. 7- compatible: "renesas,usb-phy-r8a7790" if the device is a part of R8A7790 SoC.
8 "renesas,usb-phy-r8a7791" if the device is a part of R8A7791 SoC. 8 "renesas,usb-phy-r8a7791" if the device is a part of R8A7791 SoC.
9 "renesas,usb-phy-r8a7794" if the device is a part of R8A7794 SoC.
9- reg: offset and length of the register block. 10- reg: offset and length of the register block.
10- #address-cells: number of address cells for the USB channel subnodes, must 11- #address-cells: number of address cells for the USB channel subnodes, must
11 be <1>. 12 be <1>.
diff --git a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
index fdd8046e650a..9462ab7ddd1f 100644
--- a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
@@ -16,6 +16,8 @@ Required properties:
16 "allwinner,sun7i-a20-pinctrl" 16 "allwinner,sun7i-a20-pinctrl"
17 "allwinner,sun8i-a23-pinctrl" 17 "allwinner,sun8i-a23-pinctrl"
18 "allwinner,sun8i-a23-r-pinctrl" 18 "allwinner,sun8i-a23-r-pinctrl"
19 "allwinner,sun8i-a33-pinctrl"
20
19- reg: Should contain the register physical address and length for the 21- reg: Should contain the register physical address and length for the
20 pin controller. 22 pin controller.
21 23
diff --git a/Documentation/devicetree/bindings/pinctrl/berlin,pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/berlin,pinctrl.txt
new file mode 100644
index 000000000000..a8bb5e26019c
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/berlin,pinctrl.txt
@@ -0,0 +1,43 @@
1* Pin-controller driver for the Marvell Berlin SoCs
2
3Pin control registers are part of both chip controller and system
4controller register sets. Pin controller nodes should be a sub-node of
5either the chip controller or system controller node. The pins
6controlled are organized in groups, so no actual pin information is
7needed.
8
9A pin-controller node should contain subnodes representing the pin group
10configurations, one per function. Each subnode has the group name and
11the muxing function used.
12
13Be aware the Marvell Berlin datasheets use the keyword 'mode' for what
14is called a 'function' in the pin-controller subsystem.
15
16Required properties:
17- compatible: should be one of:
18 "marvell,berlin2-soc-pinctrl",
19 "marvell,berlin2-system-pinctrl",
20 "marvell,berlin2cd-soc-pinctrl",
21 "marvell,berlin2cd-system-pinctrl",
22 "marvell,berlin2q-soc-pinctrl",
23 "marvell,berlin2q-system-pinctrl"
24
25Required subnode-properties:
26- groups: a list of strings describing the group names.
27- function: a string describing the function used to mux the groups.
28
29Example:
30
31sys_pinctrl: pin-controller {
32 compatible = "marvell,berlin2q-system-pinctrl";
33
34 uart0_pmux: uart0-pmux {
35 groups = "GSM12";
36 function = "uart0";
37 };
38};
39
40&uart0 {
41 pinctrl-0 = <&uart0_pmux>;
42 pinctrl-names = "default";
43};
diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt
new file mode 100644
index 000000000000..8bbf25d58656
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.txt
@@ -0,0 +1,27 @@
1* Freescale i.MX7 Dual 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,imx7d-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 imx7d-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.MX7 Dual
13 Reference Manual for detailed CONFIG settings.
14
15CONFIG bits definition:
16PAD_CTL_PUS_100K_DOWN (0 << 5)
17PAD_CTL_PUS_5K_UP (1 << 5)
18PAD_CTL_PUS_47K_UP (2 << 5)
19PAD_CTL_PUS_100K_UP (3 << 5)
20PAD_CTL_PUE (1 << 4)
21PAD_CTL_HYS (1 << 3)
22PAD_CTL_SRE_SLOW (1 << 2)
23PAD_CTL_SRE_FAST (0 << 2)
24PAD_CTL_DSE_X1 (0 << 0)
25PAD_CTL_DSE_X2 (1 << 0)
26PAD_CTL_DSE_X3 (2 << 0)
27PAD_CTL_DSE_X4 (3 << 0)
diff --git a/Documentation/devicetree/bindings/pinctrl/img,pistachio-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/img,pistachio-pinctrl.txt
new file mode 100644
index 000000000000..08a4a32c8eb0
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/img,pistachio-pinctrl.txt
@@ -0,0 +1,217 @@
1Imagination Technologies Pistachio SoC pin controllers
2======================================================
3
4The pin controllers on Pistachio are a combined GPIO controller, (GPIO)
5interrupt controller, and pinmux + pinconf device. The system ("east") pin
6controller on Pistachio has 99 pins, 90 of which are MFIOs which can be
7configured as GPIOs. The 90 GPIOs are divided into 6 banks of up to 16 GPIOs
8each. The GPIO banks are represented as sub-nodes of the pad controller node.
9
10Please refer to pinctrl-bindings.txt, ../gpio/gpio.txt, and
11../interrupt-controller/interrupts.txt for generic information regarding
12pin controller, GPIO, and interrupt bindings.
13
14Required properties for pin controller node:
15--------------------------------------------
16 - compatible: "img,pistachio-system-pinctrl".
17 - reg: Address range of the pinctrl registers.
18
19Required properties for GPIO bank sub-nodes:
20--------------------------------------------
21 - interrupts: Interrupt line for the GPIO bank.
22 - gpio-controller: Indicates the device is a GPIO controller.
23 - #gpio-cells: Must be two. The first cell is the GPIO pin number and the
24 second cell indicates the polarity. See <dt-bindings/gpio/gpio.h> for
25 a list of possible values.
26 - interrupt-controller: Indicates the device is an interrupt controller.
27 - #interrupt-cells: Must be two. The first cell is the GPIO pin number and
28 the second cell encodes the interrupt flags. See
29 <dt-bindings/interrupt-controller/irq.h> for a list of valid flags.
30
31Note that the N GPIO bank sub-nodes *must* be named gpio0, gpio1, ... gpioN-1.
32
33Required properties for pin configuration sub-nodes:
34----------------------------------------------------
35 - pins: List of pins to which the configuration applies. See below for a
36 list of possible pins.
37
38Optional properties for pin configuration sub-nodes:
39----------------------------------------------------
40 - function: Mux function for the specified pins. This is not applicable for
41 non-MFIO pins. See below for a list of valid functions for each pin.
42 - bias-high-impedance: Enable high-impedance mode.
43 - bias-pull-up: Enable weak pull-up.
44 - bias-pull-down: Enable weak pull-down.
45 - bias-bus-hold: Enable bus-keeper mode.
46 - drive-strength: Drive strength in mA. Supported values: 2, 4, 8, 12.
47 - input-schmitt-enable: Enable Schmitt trigger.
48 - input-schmitt-disable: Disable Schmitt trigger.
49 - slew-rate: Slew rate control. 0 for slow, 1 for fast.
50
51Pin Functions
52--- ---------
53mfio0 spim1
54mfio1 spim1, spim0, uart1
55mfio2 spim1, spim0, uart1
56mfio3 spim1
57mfio4 spim1
58mfio5 spim1
59mfio6 spim1
60mfio7 spim1
61mfio8 spim0
62mfio9 spim0
63mfio10 spim0
64mfio11 spis
65mfio12 spis
66mfio13 spis
67mfio14 spis
68mfio15 sdhost, mips_trace_clk, mips_trace_data
69mfio16 sdhost, mips_trace_dint, mips_trace_data
70mfio17 sdhost, mips_trace_trigout, mips_trace_data
71mfio18 sdhost, mips_trace_trigin, mips_trace_data
72mfio19 sdhost, mips_trace_dm, mips_trace_data
73mfio20 sdhost, mips_trace_probe_n, mips_trace_data
74mfio21 sdhost, mips_trace_data
75mfio22 sdhost, mips_trace_data
76mfio23 sdhost
77mfio24 sdhost
78mfio25 sdhost
79mfio26 sdhost
80mfio27 sdhost
81mfio28 i2c0, spim0
82mfio29 i2c0, spim0
83mfio30 i2c1, spim0
84mfio31 i2c1, spim1
85mfio32 i2c2
86mfio33 i2c2
87mfio34 i2c3
88mfio35 i2c3
89mfio36 i2s_out, audio_clk_in
90mfio37 i2s_out, debug_raw_cca_ind
91mfio38 i2s_out, debug_ed_sec20_cca_ind
92mfio39 i2s_out, debug_ed_sec40_cca_ind
93mfio40 i2s_out, debug_agc_done_0
94mfio41 i2s_out, debug_agc_done_1
95mfio42 i2s_out, debug_ed_cca_ind
96mfio43 i2s_out, debug_s2l_done
97mfio44 i2s_out
98mfio45 i2s_dac_clk, audio_sync
99mfio46 audio_trigger
100mfio47 i2s_in
101mfio48 i2s_in
102mfio49 i2s_in
103mfio50 i2s_in
104mfio51 i2s_in
105mfio52 i2s_in
106mfio53 i2s_in
107mfio54 i2s_in, spdif_in
108mfio55 uart0, spim0, spim1
109mfio56 uart0, spim0, spim1
110mfio57 uart0, spim0, spim1
111mfio58 uart0, spim1
112mfio59 uart1
113mfio60 uart1
114mfio61 spdif_out
115mfio62 spdif_in
116mfio63 eth, mips_trace_clk, mips_trace_data
117mfio64 eth, mips_trace_dint, mips_trace_data
118mfio65 eth, mips_trace_trigout, mips_trace_data
119mfio66 eth, mips_trace_trigin, mips_trace_data
120mfio67 eth, mips_trace_dm, mips_trace_data
121mfio68 eth, mips_trace_probe_n, mips_trace_data
122mfio69 eth, mips_trace_data
123mfio70 eth, mips_trace_data
124mfio71 eth
125mfio72 ir
126mfio73 pwmpdm, mips_trace_clk, sram_debug
127mfio74 pwmpdm, mips_trace_dint, sram_debug
128mfio75 pwmpdm, mips_trace_trigout, rom_debug
129mfio76 pwmpdm, mips_trace_trigin, rom_debug
130mfio77 mdc_debug, mips_trace_dm, rpu_debug
131mfio78 mdc_debug, mips_trace_probe_n, rpu_debug
132mfio79 ddr_debug, mips_trace_data, mips_debug
133mfio80 ddr_debug, mips_trace_data, mips_debug
134mfio81 dreq0, mips_trace_data, eth_debug
135mfio82 dreq1, mips_trace_data, eth_debug
136mfio83 mips_pll_lock, mips_trace_data, usb_debug
137mfio84 sys_pll_lock, mips_trace_data, usb_debug
138mfio85 wifi_pll_lock, mips_trace_data, sdhost_debug
139mfio86 bt_pll_lock, mips_trace_data, sdhost_debug
140mfio87 rpu_v_pll_lock, dreq2, socif_debug
141mfio88 rpu_l_pll_lock, dreq3, socif_debug
142mfio89 audio_pll_lock, dreq4, dreq5
143tck
144trstn
145tdi
146tms
147tdo
148jtag_comply
149safe_mode
150por_disable
151resetn
152
153Example:
154--------
155pinctrl@18101C00 {
156 compatible = "img,pistachio-system-pinctrl";
157 reg = <0x18101C00 0x400>;
158
159 gpio0: gpio0 {
160 interrupts = <GIC_SHARED 71 IRQ_TYPE_LEVEL_HIGH>;
161
162 gpio-controller;
163 #gpio-cells = <2>;
164
165 interrupt-controller;
166 #interrupt-cells = <2>;
167 };
168
169 ...
170
171 gpio5: gpio5 {
172 interrupts = <GIC_SHARED 76 IRQ_TYPE_LEVEL_HIGH>;
173
174 gpio-controller;
175 #gpio-cells = <2>;
176
177 interrupt-controller;
178 #interrupt-cells = <2>;
179 };
180
181 ...
182
183 uart0_xfer: uart0-xfer {
184 uart0-rxd {
185 pins = "mfio55";
186 function = "uart0";
187 };
188 uart0-txd {
189 pins = "mfio56";
190 function = "uart0";
191 };
192 };
193
194 uart0_rts_cts: uart0-rts-cts {
195 uart0-rts {
196 pins = "mfio57";
197 function = "uart0";
198 };
199 uart0-cts {
200 pins = "mfio58";
201 function = "uart0";
202 };
203 };
204};
205
206uart@... {
207 ...
208 pinctrl-names = "default";
209 pinctrl-0 = <&uart0_xfer>, <&uart0_rts_cts>;
210 ...
211};
212
213usb_vbus: fixed-regulator {
214 ...
215 gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
216 ...
217};
diff --git a/Documentation/devicetree/bindings/pinctrl/lantiq,falcon-pinumx.txt b/Documentation/devicetree/bindings/pinctrl/lantiq,pinctrl-falcon.txt
index ac4da9fe07bd..ac4da9fe07bd 100644
--- a/Documentation/devicetree/bindings/pinctrl/lantiq,falcon-pinumx.txt
+++ b/Documentation/devicetree/bindings/pinctrl/lantiq,pinctrl-falcon.txt
diff --git a/Documentation/devicetree/bindings/pinctrl/lantiq,xway-pinumx.txt b/Documentation/devicetree/bindings/pinctrl/lantiq,pinctrl-xway.txt
index e89b4677567d..e89b4677567d 100644
--- a/Documentation/devicetree/bindings/pinctrl/lantiq,xway-pinumx.txt
+++ b/Documentation/devicetree/bindings/pinctrl/lantiq,pinctrl-xway.txt
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,armada-370-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,armada-370-pinctrl.txt
index adda2a8d1d52..add7c38ec7d8 100644
--- a/Documentation/devicetree/bindings/pinctrl/marvell,armada-370-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/marvell,armada-370-pinctrl.txt
@@ -17,10 +17,10 @@ mpp0 0 gpio, uart0(rxd)
17mpp1 1 gpo, uart0(txd) 17mpp1 1 gpo, uart0(txd)
18mpp2 2 gpio, i2c0(sck), uart0(txd) 18mpp2 2 gpio, i2c0(sck), uart0(txd)
19mpp3 3 gpio, i2c0(sda), uart0(rxd) 19mpp3 3 gpio, i2c0(sda), uart0(rxd)
20mpp4 4 gpio, cpu_pd(vdd) 20mpp4 4 gpio, vdd(cpu-pd)
21mpp5 5 gpo, ge0(txclko), uart1(txd), spi1(clk), audio(mclk) 21mpp5 5 gpo, ge0(txclkout), uart1(txd), spi1(sck), audio(mclk)
22mpp6 6 gpio, ge0(txd0), sata0(prsnt), tdm(rst), audio(sdo) 22mpp6 6 gpio, ge0(txd0), sata0(prsnt), tdm(rst), audio(sdo)
23mpp7 7 gpo, ge0(txd1), tdm(tdx), audio(lrclk) 23mpp7 7 gpo, ge0(txd1), tdm(dtx), audio(lrclk)
24mpp8 8 gpio, ge0(txd2), uart0(rts), tdm(drx), audio(bclk) 24mpp8 8 gpio, ge0(txd2), uart0(rts), tdm(drx), audio(bclk)
25mpp9 9 gpo, ge0(txd3), uart1(txd), sd0(clk), audio(spdifo) 25mpp9 9 gpo, ge0(txd3), uart1(txd), sd0(clk), audio(spdifo)
26mpp10 10 gpio, ge0(txctl), uart0(cts), tdm(fsync), audio(sdi) 26mpp10 10 gpio, ge0(txctl), uart0(cts), tdm(fsync), audio(sdi)
@@ -52,8 +52,8 @@ mpp30 30 gpio, ge0(rxd7), ge1(rxclk), i2c1(sck)
52mpp31 31 gpio, tclk, ge0(txerr) 52mpp31 31 gpio, tclk, ge0(txerr)
53mpp32 32 gpio, spi0(cs0) 53mpp32 32 gpio, spi0(cs0)
54mpp33 33 gpio, dev(bootcs), spi0(cs0) 54mpp33 33 gpio, dev(bootcs), spi0(cs0)
55mpp34 34 gpo, dev(wen0), spi0(mosi) 55mpp34 34 gpo, dev(we0), spi0(mosi)
56mpp35 35 gpo, dev(oen), spi0(sck) 56mpp35 35 gpo, dev(oe), spi0(sck)
57mpp36 36 gpo, dev(a1), spi0(miso) 57mpp36 36 gpo, dev(a1), spi0(miso)
58mpp37 37 gpo, dev(a0), sata0(prsnt) 58mpp37 37 gpo, dev(a0), sata0(prsnt)
59mpp38 38 gpio, dev(ready), uart1(cts), uart0(cts) 59mpp38 38 gpio, dev(ready), uart1(cts), uart0(cts)
@@ -86,11 +86,11 @@ mpp57 57 gpio, dev(cs3), uart1(rxd), tdm(fsync), sata0(prsnt),
86mpp58 58 gpio, dev(cs0), uart1(rts), tdm(int), audio(extclk), 86mpp58 58 gpio, dev(cs0), uart1(rts), tdm(int), audio(extclk),
87 uart0(rts) 87 uart0(rts)
88mpp59 59 gpo, dev(ale0), uart1(rts), uart0(rts), audio(bclk) 88mpp59 59 gpo, dev(ale0), uart1(rts), uart0(rts), audio(bclk)
89mpp60 60 gpio, dev(ale1), uart1(rxd), sata0(prsnt), pcie(rst-out), 89mpp60 60 gpio, dev(ale1), uart1(rxd), sata0(prsnt), pcie(rstout),
90 audio(sdi) 90 audio(sdi)
91mpp61 61 gpo, dev(wen1), uart1(txd), audio(rclk) 91mpp61 61 gpo, dev(we1), uart1(txd), audio(lrclk)
92mpp62 62 gpio, dev(a2), uart1(cts), tdm(drx), pcie(clkreq0), 92mpp62 62 gpio, dev(a2), uart1(cts), tdm(drx), pcie(clkreq0),
93 audio(mclk), uart0(cts) 93 audio(mclk), uart0(cts)
94mpp63 63 gpo, spi0(sck), tclk 94mpp63 63 gpo, spi0(sck), tclk
95mpp64 64 gpio, spi0(miso), spi0-1(cs1) 95mpp64 64 gpio, spi0(miso), spi0(cs1)
96mpp65 65 gpio, spi0(mosi), spi0-1(cs2) 96mpp65 65 gpio, spi0(mosi), spi0(cs2)
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,armada-375-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,armada-375-pinctrl.txt
index 7de0cda4a379..06e5bb0367f5 100644
--- a/Documentation/devicetree/bindings/pinctrl/marvell,armada-375-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/marvell,armada-375-pinctrl.txt
@@ -15,24 +15,24 @@ name pins functions
15================================================================================ 15================================================================================
16mpp0 0 gpio, dev(ad2), spi0(cs1), spi1(cs1) 16mpp0 0 gpio, dev(ad2), spi0(cs1), spi1(cs1)
17mpp1 1 gpio, dev(ad3), spi0(mosi), spi1(mosi) 17mpp1 1 gpio, dev(ad3), spi0(mosi), spi1(mosi)
18mpp2 2 gpio, dev(ad4), ptp(eventreq), led(c0), audio(sdi) 18mpp2 2 gpio, dev(ad4), ptp(evreq), led(c0), audio(sdi)
19mpp3 3 gpio, dev(ad5), ptp(triggen), led(p3), audio(mclk) 19mpp3 3 gpio, dev(ad5), ptp(trig), led(p3), audio(mclk)
20mpp4 4 gpio, dev(ad6), spi0(miso), spi1(miso) 20mpp4 4 gpio, dev(ad6), spi0(miso), spi1(miso)
21mpp5 5 gpio, dev(ad7), spi0(cs2), spi1(cs2) 21mpp5 5 gpio, dev(ad7), spi0(cs2), spi1(cs2)
22mpp6 6 gpio, dev(ad0), led(p1), audio(rclk) 22mpp6 6 gpio, dev(ad0), led(p1), audio(lrclk)
23mpp7 7 gpio, dev(ad1), ptp(clk), led(p2), audio(extclk) 23mpp7 7 gpio, dev(ad1), ptp(clk), led(p2), audio(extclk)
24mpp8 8 gpio, dev (bootcs), spi0(cs0), spi1(cs0) 24mpp8 8 gpio, dev (bootcs), spi0(cs0), spi1(cs0)
25mpp9 9 gpio, nf(wen), spi0(sck), spi1(sck) 25mpp9 9 gpio, spi0(sck), spi1(sck), nand(we)
26mpp10 10 gpio, nf(ren), dram(vttctrl), led(c1) 26mpp10 10 gpio, dram(vttctrl), led(c1), nand(re)
27mpp11 11 gpio, dev(a0), led(c2), audio(sdo) 27mpp11 11 gpio, dev(a0), led(c2), audio(sdo)
28mpp12 12 gpio, dev(a1), audio(bclk) 28mpp12 12 gpio, dev(a1), audio(bclk)
29mpp13 13 gpio, dev(readyn), pcie0(rstoutn), pcie1(rstoutn) 29mpp13 13 gpio, dev(ready), pcie0(rstout), pcie1(rstout)
30mpp14 14 gpio, i2c0(sda), uart1(txd) 30mpp14 14 gpio, i2c0(sda), uart1(txd)
31mpp15 15 gpio, i2c0(sck), uart1(rxd) 31mpp15 15 gpio, i2c0(sck), uart1(rxd)
32mpp16 16 gpio, uart0(txd) 32mpp16 16 gpio, uart0(txd)
33mpp17 17 gpio, uart0(rxd) 33mpp17 17 gpio, uart0(rxd)
34mpp18 18 gpio, tdm(intn) 34mpp18 18 gpio, tdm(int)
35mpp19 19 gpio, tdm(rstn) 35mpp19 19 gpio, tdm(rst)
36mpp20 20 gpio, tdm(pclk) 36mpp20 20 gpio, tdm(pclk)
37mpp21 21 gpio, tdm(fsync) 37mpp21 21 gpio, tdm(fsync)
38mpp22 22 gpio, tdm(drx) 38mpp22 22 gpio, tdm(drx)
@@ -45,12 +45,12 @@ mpp28 28 gpio, led(p3), ge1(txctl), sd(clk)
45mpp29 29 gpio, pcie1(clkreq), ge1(rxclk), sd(d3) 45mpp29 29 gpio, pcie1(clkreq), ge1(rxclk), sd(d3)
46mpp30 30 gpio, ge1(txd0), spi1(cs0) 46mpp30 30 gpio, ge1(txd0), spi1(cs0)
47mpp31 31 gpio, ge1(txd1), spi1(mosi) 47mpp31 31 gpio, ge1(txd1), spi1(mosi)
48mpp32 32 gpio, ge1(txd2), spi1(sck), ptp(triggen) 48mpp32 32 gpio, ge1(txd2), spi1(sck), ptp(trig)
49mpp33 33 gpio, ge1(txd3), spi1(miso) 49mpp33 33 gpio, ge1(txd3), spi1(miso)
50mpp34 34 gpio, ge1(txclkout), spi1(sck) 50mpp34 34 gpio, ge1(txclkout), spi1(sck)
51mpp35 35 gpio, ge1(rxctl), spi1(cs1), spi0(cs2) 51mpp35 35 gpio, ge1(rxctl), spi1(cs1), spi0(cs2)
52mpp36 36 gpio, pcie0(clkreq) 52mpp36 36 gpio, pcie0(clkreq)
53mpp37 37 gpio, pcie0(clkreq), tdm(intn), ge(mdc) 53mpp37 37 gpio, pcie0(clkreq), tdm(int), ge(mdc)
54mpp38 38 gpio, pcie1(clkreq), ge(mdio) 54mpp38 38 gpio, pcie1(clkreq), ge(mdio)
55mpp39 39 gpio, ref(clkout) 55mpp39 39 gpio, ref(clkout)
56mpp40 40 gpio, uart1(txd) 56mpp40 40 gpio, uart1(txd)
@@ -58,25 +58,25 @@ mpp41 41 gpio, uart1(rxd)
58mpp42 42 gpio, spi1(cs2), led(c0) 58mpp42 42 gpio, spi1(cs2), led(c0)
59mpp43 43 gpio, sata0(prsnt), dram(vttctrl) 59mpp43 43 gpio, sata0(prsnt), dram(vttctrl)
60mpp44 44 gpio, sata0(prsnt) 60mpp44 44 gpio, sata0(prsnt)
61mpp45 45 gpio, spi0(cs2), pcie0(rstoutn) 61mpp45 45 gpio, spi0(cs2), pcie0(rstout)
62mpp46 46 gpio, led(p0), ge0(txd0), ge1(txd0) 62mpp46 46 gpio, led(p0), ge0(txd0), ge1(txd0), dev(we1)
63mpp47 47 gpio, led(p1), ge0(txd1), ge1(txd1) 63mpp47 47 gpio, led(p1), ge0(txd1), ge1(txd1)
64mpp48 48 gpio, led(p2), ge0(txd2), ge1(txd2) 64mpp48 48 gpio, led(p2), ge0(txd2), ge1(txd2)
65mpp49 49 gpio, led(p3), ge0(txd3), ge1(txd3) 65mpp49 49 gpio, led(p3), ge0(txd3), ge1(txd3)
66mpp50 50 gpio, led(c0), ge0(rxd0), ge1(rxd0) 66mpp50 50 gpio, led(c0), ge0(rxd0), ge1(rxd0)
67mpp51 51 gpio, led(c1), ge0(rxd1), ge1(rxd1) 67mpp51 51 gpio, led(c1), ge0(rxd1), ge1(rxd1)
68mpp52 52 gpio, led(c2), ge0(rxd2), ge1(rxd2) 68mpp52 52 gpio, led(c2), ge0(rxd2), ge1(rxd2)
69mpp53 53 gpio, pcie1(rstoutn), ge0(rxd3), ge1(rxd3) 69mpp53 53 gpio, pcie1(rstout), ge0(rxd3), ge1(rxd3)
70mpp54 54 gpio, pcie0(rstoutn), ge0(rxctl), ge1(rxctl) 70mpp54 54 gpio, pcie0(rstout), ge0(rxctl), ge1(rxctl)
71mpp55 55 gpio, ge0(rxclk), ge1(rxclk) 71mpp55 55 gpio, ge0(rxclk), ge1(rxclk)
72mpp56 56 gpio, ge0(txclkout), ge1(txclkout) 72mpp56 56 gpio, ge0(txclkout), ge1(txclkout)
73mpp57 57 gpio, ge0(txctl), ge1(txctl) 73mpp57 57 gpio, ge0(txctl), ge1(txctl), dev(we0)
74mpp58 58 gpio, led(c0) 74mpp58 58 gpio, led(c0)
75mpp59 59 gpio, led(c1) 75mpp59 59 gpio, led(c1)
76mpp60 60 gpio, uart1(txd), led(c2) 76mpp60 60 gpio, uart1(txd), led(c2)
77mpp61 61 gpio, i2c1(sda), uart1(rxd), spi1(cs2), led(p0) 77mpp61 61 gpio, i2c1(sda), uart1(rxd), spi1(cs2), led(p0)
78mpp62 62 gpio, i2c1(sck), led(p1) 78mpp62 62 gpio, i2c1(sck), led(p1)
79mpp63 63 gpio, ptp(triggen), led(p2) 79mpp63 63 gpio, ptp(trig), led(p2), dev(burst/last)
80mpp64 64 gpio, dram(vttctrl), led(p3) 80mpp64 64 gpio, dram(vttctrl), led(p3)
81mpp65 65 gpio, sata1(prsnt) 81mpp65 65 gpio, sata1(prsnt)
82mpp66 66 gpio, ptp(eventreq), spi1(cs3) 82mpp66 66 gpio, ptp(evreq), spi1(cs3)
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,armada-38x-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,armada-38x-pinctrl.txt
index b17c96849fc9..54ec4c0a0d0e 100644
--- a/Documentation/devicetree/bindings/pinctrl/marvell,armada-38x-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/marvell,armada-38x-pinctrl.txt
@@ -27,16 +27,16 @@ mpp8 8 gpio, ge0(txd1), dev(ad10)
27mpp9 9 gpio, ge0(txd2), dev(ad11) 27mpp9 9 gpio, ge0(txd2), dev(ad11)
28mpp10 10 gpio, ge0(txd3), dev(ad12) 28mpp10 10 gpio, ge0(txd3), dev(ad12)
29mpp11 11 gpio, ge0(txctl), dev(ad13) 29mpp11 11 gpio, ge0(txctl), dev(ad13)
30mpp12 12 gpio, ge0(rxd0), pcie0(rstout), pcie1(rstout) [1], spi0(cs1), dev(ad14) 30mpp12 12 gpio, ge0(rxd0), pcie0(rstout), spi0(cs1), dev(ad14), pcie3(clkreq)
31mpp13 13 gpio, ge0(rxd1), pcie0(clkreq), pcie1(clkreq) [1], spi0(cs2), dev(ad15) 31mpp13 13 gpio, ge0(rxd1), pcie0(clkreq), pcie1(clkreq) [1], spi0(cs2), dev(ad15), pcie2(clkreq)
32mpp14 14 gpio, ge0(rxd2), ptp(clk), m(vtt_ctrl), spi0(cs3), dev(wen1) 32mpp14 14 gpio, ge0(rxd2), ptp(clk), dram(vttctrl), spi0(cs3), dev(we1), pcie3(clkreq)
33mpp15 15 gpio, ge0(rxd3), ge(mdc slave), pcie0(rstout), spi0(mosi), pcie1(rstout) [1] 33mpp15 15 gpio, ge0(rxd3), ge(mdc slave), pcie0(rstout), spi0(mosi)
34mpp16 16 gpio, ge0(rxctl), ge(mdio slave), m(decc_err), spi0(miso), pcie0(clkreq) 34mpp16 16 gpio, ge0(rxctl), ge(mdio slave), dram(deccerr), spi0(miso), pcie0(clkreq), pcie1(clkreq) [1]
35mpp17 17 gpio, ge0(rxclk), ptp(clk), ua1(rxd), spi0(sck), sata1(prsnt) 35mpp17 17 gpio, ge0(rxclk), ptp(clk), ua1(rxd), spi0(sck), sata1(prsnt), sata0(prsnt)
36mpp18 18 gpio, ge0(rxerr), ptp(trig_gen), ua1(txd), spi0(cs0), pcie1(rstout) [1] 36mpp18 18 gpio, ge0(rxerr), ptp(trig), ua1(txd), spi0(cs0)
37mpp19 19 gpio, ge0(col), ptp(event_req), pcie0(clkreq), sata1(prsnt), ua0(cts) 37mpp19 19 gpio, ge0(col), ptp(evreq), ge0(txerr), sata1(prsnt), ua0(cts)
38mpp20 20 gpio, ge0(txclk), ptp(clk), pcie1(rstout) [1], sata0(prsnt), ua0(rts) 38mpp20 20 gpio, ge0(txclk), ptp(clk), sata0(prsnt), ua0(rts)
39mpp21 21 gpio, spi0(cs1), ge1(rxd0), sata0(prsnt), sd0(cmd), dev(bootcs) 39mpp21 21 gpio, spi0(cs1), ge1(rxd0), sata0(prsnt), sd0(cmd), dev(bootcs), sata1(prsnt)
40mpp22 22 gpio, spi0(mosi), dev(ad0) 40mpp22 22 gpio, spi0(mosi), dev(ad0)
41mpp23 23 gpio, spi0(sck), dev(ad2) 41mpp23 23 gpio, spi0(sck), dev(ad2)
42mpp24 24 gpio, spi0(miso), ua0(cts), ua1(rxd), sd0(d4), dev(ready) 42mpp24 24 gpio, spi0(miso), ua0(cts), ua1(rxd), sd0(d4), dev(ready)
@@ -45,36 +45,36 @@ mpp26 26 gpio, spi0(cs2), i2c1(sck), sd0(d6), dev(cs1)
45mpp27 27 gpio, spi0(cs3), ge1(txclkout), i2c1(sda), sd0(d7), dev(cs2) 45mpp27 27 gpio, spi0(cs3), ge1(txclkout), i2c1(sda), sd0(d7), dev(cs2)
46mpp28 28 gpio, ge1(txd0), sd0(clk), dev(ad5) 46mpp28 28 gpio, ge1(txd0), sd0(clk), dev(ad5)
47mpp29 29 gpio, ge1(txd1), dev(ale0) 47mpp29 29 gpio, ge1(txd1), dev(ale0)
48mpp30 30 gpio, ge1(txd2), dev(oen) 48mpp30 30 gpio, ge1(txd2), dev(oe)
49mpp31 31 gpio, ge1(txd3), dev(ale1) 49mpp31 31 gpio, ge1(txd3), dev(ale1)
50mpp32 32 gpio, ge1(txctl), dev(wen0) 50mpp32 32 gpio, ge1(txctl), dev(we0)
51mpp33 33 gpio, m(decc_err), dev(ad3) 51mpp33 33 gpio, dram(deccerr), dev(ad3)
52mpp34 34 gpio, dev(ad1) 52mpp34 34 gpio, dev(ad1)
53mpp35 35 gpio, ref(clk_out1), dev(a1) 53mpp35 35 gpio, ref(clk_out1), dev(a1)
54mpp36 36 gpio, ptp(trig_gen), dev(a0) 54mpp36 36 gpio, ptp(trig), dev(a0)
55mpp37 37 gpio, ptp(clk), ge1(rxclk), sd0(d3), dev(ad8) 55mpp37 37 gpio, ptp(clk), ge1(rxclk), sd0(d3), dev(ad8)
56mpp38 38 gpio, ptp(event_req), ge1(rxd1), ref(clk_out0), sd0(d0), dev(ad4) 56mpp38 38 gpio, ptp(evreq), ge1(rxd1), ref(clk_out0), sd0(d0), dev(ad4)
57mpp39 39 gpio, i2c1(sck), ge1(rxd2), ua0(cts), sd0(d1), dev(a2) 57mpp39 39 gpio, i2c1(sck), ge1(rxd2), ua0(cts), sd0(d1), dev(a2)
58mpp40 40 gpio, i2c1(sda), ge1(rxd3), ua0(rts), sd0(d2), dev(ad6) 58mpp40 40 gpio, i2c1(sda), ge1(rxd3), ua0(rts), sd0(d2), dev(ad6)
59mpp41 41 gpio, ua1(rxd), ge1(rxctl), ua0(cts), spi1(cs3), dev(burst/last) 59mpp41 41 gpio, ua1(rxd), ge1(rxctl), ua0(cts), spi1(cs3), dev(burst/last), nand(rb0)
60mpp42 42 gpio, ua1(txd), ua0(rts), dev(ad7) 60mpp42 42 gpio, ua1(txd), ua0(rts), dev(ad7)
61mpp43 43 gpio, pcie0(clkreq), m(vtt_ctrl), m(decc_err), pcie0(rstout), dev(clkout) 61mpp43 43 gpio, pcie0(clkreq), dram(vttctrl), dram(deccerr), spi1(cs2), dev(clkout), nand(rb1)
62mpp44 44 gpio, sata0(prsnt), sata1(prsnt), sata2(prsnt) [2], sata3(prsnt) [3], pcie0(rstout) 62mpp44 44 gpio, sata0(prsnt), sata1(prsnt), sata2(prsnt) [2], sata3(prsnt) [3]
63mpp45 45 gpio, ref(clk_out0), pcie0(rstout), pcie1(rstout) [1], pcie2(rstout), pcie3(rstout) 63mpp45 45 gpio, ref(clk_out0), pcie0(rstout), ua1(rxd)
64mpp46 46 gpio, ref(clk_out1), pcie0(rstout), pcie1(rstout) [1], pcie2(rstout), pcie3(rstout) 64mpp46 46 gpio, ref(clk_out1), pcie0(rstout), ua1(txd)
65mpp47 47 gpio, sata0(prsnt), sata1(prsnt), sata2(prsnt) [2], spi1(cs2), sata3(prsnt) [2] 65mpp47 47 gpio, sata0(prsnt), sata1(prsnt), sata2(prsnt) [2], sata3(prsnt) [2]
66mpp48 48 gpio, sata0(prsnt), m(vtt_ctrl), tdm2c(pclk), audio(mclk), sd0(d4) 66mpp48 48 gpio, sata0(prsnt), dram(vttctrl), tdm(pclk), audio(mclk), sd0(d4), pcie0(clkreq)
67mpp49 49 gpio, sata2(prsnt) [2], sata3(prsnt) [2], tdm2c(fsync), audio(lrclk), sd0(d5) 67mpp49 49 gpio, sata2(prsnt) [2], sata3(prsnt) [2], tdm(fsync), audio(lrclk), sd0(d5), pcie1(clkreq)
68mpp50 50 gpio, pcie0(rstout), pcie1(rstout) [1], tdm2c(drx), audio(extclk), sd0(cmd) 68mpp50 50 gpio, pcie0(rstout), tdm(drx), audio(extclk), sd0(cmd)
69mpp51 51 gpio, tdm2c(dtx), audio(sdo), m(decc_err) 69mpp51 51 gpio, tdm(dtx), audio(sdo), dram(deccerr), ptp(trig)
70mpp52 52 gpio, pcie0(rstout), pcie1(rstout) [1], tdm2c(intn), audio(sdi), sd0(d6) 70mpp52 52 gpio, pcie0(rstout), tdm(int), audio(sdi), sd0(d6), ptp(clk)
71mpp53 53 gpio, sata1(prsnt), sata0(prsnt), tdm2c(rstn), audio(bclk), sd0(d7) 71mpp53 53 gpio, sata1(prsnt), sata0(prsnt), tdm(rst), audio(bclk), sd0(d7), ptp(evreq)
72mpp54 54 gpio, sata0(prsnt), sata1(prsnt), pcie0(rstout), pcie1(rstout) [1], sd0(d3) 72mpp54 54 gpio, sata0(prsnt), sata1(prsnt), pcie0(rstout), ge0(txerr), sd0(d3)
73mpp55 55 gpio, ua1(cts), ge(mdio), pcie1(clkreq) [1], spi1(cs1), sd0(d0) 73mpp55 55 gpio, ua1(cts), ge(mdio), pcie1(clkreq) [1], spi1(cs1), sd0(d0), ua1(rxd)
74mpp56 56 gpio, ua1(rts), ge(mdc), m(decc_err), spi1(mosi) 74mpp56 56 gpio, ua1(rts), ge(mdc), dram(deccerr), spi1(mosi), ua1(txd)
75mpp57 57 gpio, spi1(sck), sd0(clk) 75mpp57 57 gpio, spi1(sck), sd0(clk), ua1(txd)
76mpp58 58 gpio, pcie1(clkreq) [1], i2c1(sck), pcie2(clkreq), spi1(miso), sd0(d1) 76mpp58 58 gpio, pcie1(clkreq) [1], i2c1(sck), pcie2(clkreq), spi1(miso), sd0(d1), ua1(rxd)
77mpp59 59 gpio, pcie0(rstout), i2c1(sda), pcie1(rstout) [1], spi1(cs0), sd0(d2) 77mpp59 59 gpio, pcie0(rstout), i2c1(sda), spi1(cs0), sd0(d2)
78 78
79[1]: only available on 88F6820 and 88F6828 79[1]: only available on 88F6820 and 88F6828
80[2]: only available on 88F6828 80[2]: only available on 88F6828
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,armada-39x-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,armada-39x-pinctrl.txt
index 5b1a9dc004f4..a40b60f1ca4c 100644
--- a/Documentation/devicetree/bindings/pinctrl/marvell,armada-39x-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/marvell,armada-39x-pinctrl.txt
@@ -4,8 +4,9 @@ Please refer to marvell,mvebu-pinctrl.txt in this directory for common binding
4part and usage. 4part and usage.
5 5
6Required properties: 6Required properties:
7- compatible: "marvell,88f6920-pinctrl", "marvell,88f6928-pinctrl" 7- compatible: "marvell,88f6920-pinctrl", "marvell,88f6925-pinctrl" or
8 depending on the specific variant of the SoC being used. 8 "marvell,88f6928-pinctrl" depending on the specific variant of the
9 SoC being used.
9- reg: register specifier of MPP registers 10- reg: register specifier of MPP registers
10 11
11Available mpp pins/groups and functions: 12Available mpp pins/groups and functions:
@@ -24,55 +25,60 @@ mpp6 6 gpio, dev(cs3), xsmi(mdio)
24mpp7 7 gpio, dev(ad9), xsmi(mdc) 25mpp7 7 gpio, dev(ad9), xsmi(mdc)
25mpp8 8 gpio, dev(ad10), ptp(trig) 26mpp8 8 gpio, dev(ad10), ptp(trig)
26mpp9 9 gpio, dev(ad11), ptp(clk) 27mpp9 9 gpio, dev(ad11), ptp(clk)
27mpp10 10 gpio, dev(ad12), ptp(event) 28mpp10 10 gpio, dev(ad12), ptp(evreq)
28mpp11 11 gpio, dev(ad13), led(clk) 29mpp11 11 gpio, dev(ad13), led(clk)
29mpp12 12 gpio, pcie0(rstout), dev(ad14), led(stb) 30mpp12 12 gpio, pcie0(rstout), dev(ad14), led(stb)
30mpp13 13 gpio, dev(ad15), led(data) 31mpp13 13 gpio, dev(ad15), pcie2(clkreq), led(data)
31mpp14 14 gpio, m(vtt), dev(wen1), ua1(txd) 32mpp14 14 gpio, dram(vttctrl), dev(we1), ua1(txd)
32mpp15 15 gpio, pcie0(rstout), spi0(mosi), i2c1(sck) 33mpp15 15 gpio, pcie0(rstout), spi0(mosi), i2c1(sck)
33mpp16 16 gpio, m(decc), spi0(miso), i2c1(sda) 34mpp16 16 gpio, dram(deccerr), spi0(miso), pcie0(clkreq), i2c1(sda)
34mpp17 17 gpio, ua1(rxd), spi0(sck), smi(mdio) 35mpp17 17 gpio, ua1(rxd), spi0(sck), sata1(prsnt) [1], sata0(prsnt) [1], smi(mdio)
35mpp18 18 gpio, ua1(txd), spi0(cs0), i2c2(sck) 36mpp18 18 gpio, ua1(txd), spi0(cs0), i2c2(sck)
36mpp19 19 gpio, sata1(present) [1], ua0(cts), ua1(rxd), i2c2(sda) 37mpp19 19 gpio, sata1(prsnt) [1], ua0(cts), ua1(rxd), i2c2(sda)
37mpp20 20 gpio, sata0(present) [1], ua0(rts), ua1(txd), smi(mdc) 38mpp20 20 gpio, sata0(prsnt) [1], ua0(rts), ua1(txd), smi(mdc)
38mpp21 21 gpio, spi0(cs1), sata0(present) [1], sd(cmd), dev(bootcs), ge(rxd0) 39mpp21 21 gpio, spi0(cs1), sata0(prsnt) [1], sd0(cmd), dev(bootcs),
40 sata1(prsnt) [1], ge(rxd0)
39mpp22 22 gpio, spi0(mosi), dev(ad0) 41mpp22 22 gpio, spi0(mosi), dev(ad0)
40mpp23 23 gpio, spi0(sck), dev(ad2) 42mpp23 23 gpio, spi0(sck), dev(ad2)
41mpp24 24 gpio, spi0(miso), ua0(cts), ua1(rxd), sd(d4), dev(readyn) 43mpp24 24 gpio, spi0(miso), ua0(cts), ua1(rxd), sd0(d4), dev(ready)
42mpp25 25 gpio, spi0(cs0), ua0(rts), ua1(txd), sd(d5), dev(cs0) 44mpp25 25 gpio, spi0(cs0), ua0(rts), ua1(txd), sd0(d5), dev(cs0)
43mpp26 26 gpio, spi0(cs2), i2c1(sck), sd(d6), dev(cs1) 45mpp26 26 gpio, spi0(cs2), i2c1(sck), sd0(d6), dev(cs1)
44mpp27 27 gpio, spi0(cs3), i2c1(sda), sd(d7), dev(cs2), ge(txclkout) 46mpp27 27 gpio, spi0(cs3), i2c1(sda), sd0(d7), dev(cs2), ge(txclkout)
45mpp28 28 gpio, sd(clk), dev(ad5), ge(txd0) 47mpp28 28 gpio, sd0(clk), dev(ad5), ge(txd0)
46mpp29 29 gpio, dev(ale0), ge(txd1) 48mpp29 29 gpio, dev(ale0), ge(txd1)
47mpp30 30 gpio, dev(oen), ge(txd2) 49mpp30 30 gpio, dev(oe), ge(txd2)
48mpp31 31 gpio, dev(ale1), ge(txd3) 50mpp31 31 gpio, dev(ale1), ge(txd3)
49mpp32 32 gpio, dev(wen0), ge(txctl) 51mpp32 32 gpio, dev(we0), ge(txctl)
50mpp33 33 gpio, m(decc), dev(ad3) 52mpp33 33 gpio, dram(deccerr), dev(ad3)
51mpp34 34 gpio, dev(ad1) 53mpp34 34 gpio, dev(ad1)
52mpp35 35 gpio, ref(clk), dev(a1) 54mpp35 35 gpio, ref(clk), dev(a1)
53mpp36 36 gpio, dev(a0) 55mpp36 36 gpio, dev(a0)
54mpp37 37 gpio, sd(d3), dev(ad8), ge(rxclk) 56mpp37 37 gpio, sd0(d3), dev(ad8), ge(rxclk)
55mpp38 38 gpio, ref(clk), sd(d0), dev(ad4), ge(rxd1) 57mpp38 38 gpio, ref(clk), sd0(d0), dev(ad4), ge(rxd1)
56mpp39 39 gpio, i2c1(sck), ua0(cts), sd(d1), dev(a2), ge(rxd2) 58mpp39 39 gpio, i2c1(sck), ua0(cts), sd0(d1), dev(a2), ge(rxd2)
57mpp40 40 gpio, i2c1(sda), ua0(rts), sd(d2), dev(ad6), ge(rxd3) 59mpp40 40 gpio, i2c1(sda), ua0(rts), sd0(d2), dev(ad6), ge(rxd3)
58mpp41 41 gpio, ua1(rxd), ua0(cts), spi1(cs3), dev(burstn), nd(rbn0), ge(rxctl) 60mpp41 41 gpio, ua1(rxd), ua0(cts), spi1(cs3), dev(burst/last), nand(rb0), ge(rxctl)
59mpp42 42 gpio, ua1(txd), ua0(rts), dev(ad7) 61mpp42 42 gpio, ua1(txd), ua0(rts), dev(ad7)
60mpp43 43 gpio, pcie0(clkreq), m(vtt), m(decc), spi1(cs2), dev(clkout), nd(rbn1) 62mpp43 43 gpio, pcie0(clkreq), dram(vttctrl), dram(deccerr), spi1(cs2), dev(clkout), nand(rb1)
61mpp44 44 gpio, sata0(present) [1], sata1(present) [1], led(clk) 63mpp44 44 gpio, sata0(prsnt) [1], sata1(prsnt) [1], sata2(prsnt) [2],
64 sata3(prsnt) [2], led(clk)
62mpp45 45 gpio, ref(clk), pcie0(rstout), ua1(rxd) 65mpp45 45 gpio, ref(clk), pcie0(rstout), ua1(rxd)
63mpp46 46 gpio, ref(clk), pcie0(rstout), ua1(txd), led(stb) 66mpp46 46 gpio, ref(clk), pcie0(rstout), ua1(txd), led(stb)
64mpp47 47 gpio, sata0(present) [1], sata1(present) [1], led(data) 67mpp47 47 gpio, sata0(prsnt) [1], sata1(prsnt) [1], sata2(prsnt) [2],
65mpp48 48 gpio, sata0(present) [1], m(vtt), tdm(pclk) [1], audio(mclk) [1], sd(d4), pcie0(clkreq), ua1(txd) 68 sata3(prsnt) [2], led(data)
66mpp49 49 gpio, tdm(fsync) [1], audio(lrclk) [1], sd(d5), ua2(rxd) 69mpp48 48 gpio, sata0(prsnt) [1], dram(vttctrl), tdm(pclk) [2], audio(mclk) [2], sd0(d4), pcie0(clkreq), ua1(txd)
67mpp50 50 gpio, pcie0(rstout), tdm(drx) [1], audio(extclk) [1], sd(cmd), ua2(rxd) 70mpp49 49 gpio, sata2(prsnt) [2], sata3(prsnt) [2], tdm(fsync) [2],
68mpp51 51 gpio, tdm(dtx) [1], audio(sdo) [1], m(decc), ua2(txd) 71 audio(lrclk) [2], sd0(d5), ua2(rxd)
69mpp52 52 gpio, pcie0(rstout), tdm(intn) [1], audio(sdi) [1], sd(d6), i2c3(sck) 72mpp50 50 gpio, pcie0(rstout), tdm(drx) [2], audio(extclk) [2], sd0(cmd), ua2(rxd)
70mpp53 53 gpio, sata1(present) [1], sata0(present) [1], tdm(rstn) [1], audio(bclk) [1], sd(d7), i2c3(sda) 73mpp51 51 gpio, tdm(dtx) [2], audio(sdo) [2], dram(deccerr), ua2(txd)
71mpp54 54 gpio, sata0(present) [1], sata1(present) [1], pcie0(rstout), sd(d3), ua3(txd) 74mpp52 52 gpio, pcie0(rstout), tdm(int) [2], audio(sdi) [2], sd0(d6), i2c3(sck)
72mpp55 55 gpio, ua1(cts), spi1(cs1), sd(d0), ua1(rxd), ua3(rxd) 75mpp53 53 gpio, sata1(prsnt) [1], sata0(prsnt) [1], tdm(rst) [2], audio(bclk) [2], sd0(d7), i2c3(sda)
73mpp56 56 gpio, ua1(rts), m(decc), spi1(mosi), ua1(txd) 76mpp54 54 gpio, sata0(prsnt) [1], sata1(prsnt) [1], pcie0(rstout), sd0(d3), ua3(txd)
74mpp57 57 gpio, spi1(sck), sd(clk), ua1(txd) 77mpp55 55 gpio, ua1(cts), spi1(cs1), sd0(d0), ua1(rxd), ua3(rxd)
75mpp58 58 gpio, i2c1(sck), pcie2(clkreq), spi1(miso), sd(d1), ua1(rxd) 78mpp56 56 gpio, ua1(rts), dram(deccerr), spi1(mosi), ua1(txd)
76mpp59 59 gpio, pcie0(rstout), i2c1(sda), spi1(cs0), sd(d2) 79mpp57 57 gpio, spi1(sck), sd0(clk), ua1(txd)
80mpp58 58 gpio, i2c1(sck), pcie2(clkreq), spi1(miso), sd0(d1), ua1(rxd)
81mpp59 59 gpio, pcie0(rstout), i2c1(sda), spi1(cs0), sd0(d2)
77 82
78[1]: only available on 88F6928 83[1]: only available on 88F6925/88F6928
84[2]: only available on 88F6928
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,armada-xp-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,armada-xp-pinctrl.txt
index 373dbccd7ab0..76da7222ff92 100644
--- a/Documentation/devicetree/bindings/pinctrl/marvell,armada-xp-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/marvell,armada-xp-pinctrl.txt
@@ -18,7 +18,7 @@ only for more detailed description in this document.
18 18
19name pins functions 19name pins functions
20================================================================================ 20================================================================================
21mpp0 0 gpio, ge0(txclko), lcd(d0) 21mpp0 0 gpio, ge0(txclkout), lcd(d0)
22mpp1 1 gpio, ge0(txd0), lcd(d1) 22mpp1 1 gpio, ge0(txd0), lcd(d1)
23mpp2 2 gpio, ge0(txd1), lcd(d2) 23mpp2 2 gpio, ge0(txd1), lcd(d2)
24mpp3 3 gpio, ge0(txd2), lcd(d3) 24mpp3 3 gpio, ge0(txd2), lcd(d3)
@@ -30,49 +30,50 @@ mpp8 8 gpio, ge0(rxd2), lcd(d8)
30mpp9 9 gpio, ge0(rxd3), lcd(d9) 30mpp9 9 gpio, ge0(rxd3), lcd(d9)
31mpp10 10 gpio, ge0(rxctl), lcd(d10) 31mpp10 10 gpio, ge0(rxctl), lcd(d10)
32mpp11 11 gpio, ge0(rxclk), lcd(d11) 32mpp11 11 gpio, ge0(rxclk), lcd(d11)
33mpp12 12 gpio, ge0(txd4), ge1(txd0), lcd(d12) 33mpp12 12 gpio, ge0(txd4), ge1(txclkout), lcd(d12)
34mpp13 13 gpio, ge0(txd5), ge1(txd1), lcd(d13) 34mpp13 13 gpio, ge0(txd5), ge1(txd0), spi1(mosi), lcd(d13)
35mpp14 14 gpio, ge0(txd6), ge1(txd2), lcd(d15) 35mpp14 14 gpio, ge0(txd6), ge1(txd1), spi1(sck), lcd(d15)
36mpp15 15 gpio, ge0(txd7), ge1(txd3), lcd(d16) 36mpp15 15 gpio, ge0(txd7), ge1(txd2), lcd(d16)
37mpp16 16 gpio, ge0(txd7), ge1(txd3), lcd(d16) 37mpp16 16 gpio, ge0(txd7), ge1(txd3), spi1(cs0), lcd(d16)
38mpp17 17 gpio, ge0(col), ge1(txctl), lcd(d17) 38mpp17 17 gpio, ge0(col), ge1(txctl), spi1(miso), lcd(d17)
39mpp18 18 gpio, ge0(rxerr), ge1(rxd0), lcd(d18), ptp(trig) 39mpp18 18 gpio, ge0(rxerr), ge1(rxd0), lcd(d18), ptp(trig)
40mpp19 19 gpio, ge0(crs), ge1(rxd1), lcd(d19), ptp(evreq) 40mpp19 19 gpio, ge0(crs), ge1(rxd1), lcd(d19), ptp(evreq)
41mpp20 20 gpio, ge0(rxd4), ge1(rxd2), lcd(d20), ptp(clk) 41mpp20 20 gpio, ge0(rxd4), ge1(rxd2), lcd(d20), ptp(clk)
42mpp21 21 gpio, ge0(rxd5), ge1(rxd3), lcd(d21), mem(bat) 42mpp21 21 gpio, ge0(rxd5), ge1(rxd3), lcd(d21), dram(bat)
43mpp22 22 gpio, ge0(rxd6), ge1(rxctl), lcd(d22), sata0(prsnt) 43mpp22 22 gpio, ge0(rxd6), ge1(rxctl), lcd(d22), sata0(prsnt)
44mpp23 23 gpio, ge0(rxd7), ge1(rxclk), lcd(d23), sata1(prsnt) 44mpp23 23 gpio, ge0(rxd7), ge1(rxclk), lcd(d23), sata1(prsnt)
45mpp24 24 gpio, lcd(hsync), sata1(prsnt), nf(bootcs-re), tdm(rst) 45mpp24 24 gpio, lcd(hsync), sata1(prsnt), tdm(rst)
46mpp25 25 gpio, lcd(vsync), sata0(prsnt), nf(bootcs-we), tdm(pclk) 46mpp25 25 gpio, lcd(vsync), sata0(prsnt), tdm(pclk)
47mpp26 26 gpio, lcd(clk), tdm(fsync), vdd(cpu1-pd) 47mpp26 26 gpio, lcd(clk), tdm(fsync)
48mpp27 27 gpio, lcd(e), tdm(dtx), ptp(trig) 48mpp27 27 gpio, lcd(e), tdm(dtx), ptp(trig)
49mpp28 28 gpio, lcd(pwm), tdm(drx), ptp(evreq) 49mpp28 28 gpio, lcd(pwm), tdm(drx), ptp(evreq)
50mpp29 29 gpio, lcd(ref-clk), tdm(int0), ptp(clk), vdd(cpu0-pd) 50mpp29 29 gpio, lcd(ref-clk), tdm(int0), ptp(clk)
51mpp30 30 gpio, tdm(int1), sd0(clk) 51mpp30 30 gpio, tdm(int1), sd0(clk)
52mpp31 31 gpio, tdm(int2), sd0(cmd), vdd(cpu0-pd) 52mpp31 31 gpio, tdm(int2), sd0(cmd)
53mpp32 32 gpio, tdm(int3), sd0(d0), vdd(cpu1-pd) 53mpp32 32 gpio, tdm(int3), sd0(d0)
54mpp33 33 gpio, tdm(int4), sd0(d1), mem(bat) 54mpp33 33 gpio, tdm(int4), sd0(d1), dram(bat), dram(vttctrl)
55mpp34 34 gpio, tdm(int5), sd0(d2), sata0(prsnt) 55mpp34 34 gpio, tdm(int5), sd0(d2), sata0(prsnt), dram(deccerr)
56mpp35 35 gpio, tdm(int6), sd0(d3), sata1(prsnt) 56mpp35 35 gpio, tdm(int6), sd0(d3), sata1(prsnt)
57mpp36 36 gpio, spi(mosi) 57mpp36 36 gpio, spi0(mosi)
58mpp37 37 gpio, spi(miso) 58mpp37 37 gpio, spi0(miso)
59mpp38 38 gpio, spi(sck) 59mpp38 38 gpio, spi0(sck)
60mpp39 39 gpio, spi(cs0) 60mpp39 39 gpio, spi0(cs0)
61mpp40 40 gpio, spi(cs1), uart2(cts), lcd(vga-hsync), vdd(cpu1-pd), 61mpp40 40 gpio, spi0(cs1), uart2(cts), lcd(vga-hsync), pcie(clkreq0),
62 pcie(clkreq0) 62 spi1(cs1)
63mpp41 41 gpio, spi(cs2), uart2(rts), lcd(vga-vsync), sata1(prsnt), 63mpp41 41 gpio, spi0(cs2), uart2(rts), lcd(vga-vsync), sata1(prsnt),
64 pcie(clkreq1) 64 pcie(clkreq1), spi1(cs2)
65mpp42 42 gpio, uart2(rxd), uart0(cts), tdm(int7), tdm-1(timer), 65mpp42 42 gpio, uart2(rxd), uart0(cts), tdm(int7), tdm(timer)
66 vdd(cpu0-pd) 66mpp43 43 gpio, uart2(txd), uart0(rts), spi0(cs3), pcie(rstout),
67mpp43 43 gpio, uart2(txd), uart0(rts), spi(cs3), pcie(rstout), 67 spi1(cs3)
68 vdd(cpu2-3-pd){1} 68mpp44 44 gpio, uart2(cts), uart3(rxd), spi0(cs4), pcie(clkreq2),
69mpp44 44 gpio, uart2(cts), uart3(rxd), spi(cs4), pcie(clkreq2), 69 dram(bat), spi1(cs4)
70 mem(bat) 70mpp45 45 gpio, uart2(rts), uart3(txd), spi0(cs5), sata1(prsnt),
71mpp45 45 gpio, uart2(rts), uart3(txd), spi(cs5), sata1(prsnt) 71 spi1(cs5), dram(vttctrl)
72mpp46 46 gpio, uart3(rts), uart1(rts), spi(cs6), sata0(prsnt) 72mpp46 46 gpio, uart3(rts), uart1(rts), spi0(cs6), sata0(prsnt),
73mpp47 47 gpio, uart3(cts), uart1(cts), spi(cs7), pcie(clkreq3), 73 spi1(cs6)
74 ref(clkout) 74mpp47 47 gpio, uart3(cts), uart1(cts), spi0(cs7), pcie(clkreq3),
75mpp48 48 gpio, tclk, dev(burst/last) 75 ref(clkout), spi1(cs7)
76mpp48 48 gpio, dev(clkout), dev(burst/last), nand(rb)
76 77
77* Marvell Armada XP (mv78260 and mv78460 only) 78* Marvell Armada XP (mv78260 and mv78460 only)
78 79
@@ -84,9 +85,9 @@ mpp51 51 gpio, dev(ad16)
84mpp52 52 gpio, dev(ad17) 85mpp52 52 gpio, dev(ad17)
85mpp53 53 gpio, dev(ad18) 86mpp53 53 gpio, dev(ad18)
86mpp54 54 gpio, dev(ad19) 87mpp54 54 gpio, dev(ad19)
87mpp55 55 gpio, dev(ad20), vdd(cpu0-pd) 88mpp55 55 gpio, dev(ad20)
88mpp56 56 gpio, dev(ad21), vdd(cpu1-pd) 89mpp56 56 gpio, dev(ad21)
89mpp57 57 gpio, dev(ad22), vdd(cpu2-3-pd){1} 90mpp57 57 gpio, dev(ad22)
90mpp58 58 gpio, dev(ad23) 91mpp58 58 gpio, dev(ad23)
91mpp59 59 gpio, dev(ad24) 92mpp59 59 gpio, dev(ad24)
92mpp60 60 gpio, dev(ad25) 93mpp60 60 gpio, dev(ad25)
@@ -96,6 +97,3 @@ mpp63 63 gpio, dev(ad28)
96mpp64 64 gpio, dev(ad29) 97mpp64 64 gpio, dev(ad29)
97mpp65 65 gpio, dev(ad30) 98mpp65 65 gpio, dev(ad30)
98mpp66 66 gpio, dev(ad31) 99mpp66 66 gpio, dev(ad31)
99
100Notes:
101* {1} vdd(cpu2-3-pd) only available on mv78460.
diff --git a/Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.txt b/Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.txt
new file mode 100644
index 000000000000..df0309c57505
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.txt
@@ -0,0 +1,57 @@
1NXP LPC18xx/43xx SCU pin controller Device Tree Bindings
2--------------------------------------------------------
3
4Required properties:
5- compatible : Should be "nxp,lpc1850-scu"
6- reg : Address and length of the register set for the device
7- clocks : Clock specifier (see clock bindings for details)
8
9The lpc1850-scu driver uses the generic pin multiplexing and generic pin
10configuration documented in pinctrl-bindings.txt.
11
12The following generic nodes are supported:
13 - function
14 - pins
15 - bias-disable
16 - bias-pull-up
17 - bias-pull-down
18 - drive-strength
19 - input-enable
20 - input-disable
21 - input-schmitt-enable
22 - input-schmitt-disable
23 - slew-rate
24
25Not all pins support all properties so either refer to the NXP 1850/4350
26user manual or the pin table in the pinctrl-lpc18xx driver for supported
27pin properties.
28
29Example:
30pinctrl: pinctrl@40086000 {
31 compatible = "nxp,lpc1850-scu";
32 reg = <0x40086000 0x1000>;
33 clocks = <&ccu1 CLK_CPU_SCU>;
34
35 i2c0_pins: i2c0-pins {
36 i2c0_pins_cfg {
37 pins = "i2c0_scl", "i2c0_sda";
38 function = "i2c0";
39 input-enable;
40 };
41 };
42
43 uart0_pins: uart0-pins {
44 uart0_rx_cfg {
45 pins = "pf_11";
46 function = "uart0";
47 bias-disable;
48 input-enable;
49 };
50
51 uart0_tx_cfg {
52 pins = "pf_10";
53 function = "uart0";
54 bias-disable;
55 };
56 };
57};
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-atlas7.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-atlas7.txt
new file mode 100644
index 000000000000..eecf028ff485
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-atlas7.txt
@@ -0,0 +1,109 @@
1CSR SiRFatlas7 pinmux controller
2
3Required properties:
4- compatible : "sirf,atlas7-ioc"
5- reg : Address range of the pinctrl registers
6
7For example, pinctrl might have properties like the following:
8 pinctrl: ioc@18880000 {
9 compatible = "sirf,atlas7-ioc";
10 reg = <0x18880000 0x1000>;
11
12 a_ac97_pmx: ac97@0 {
13 ac97 {
14 groups = "audio_ac97_grp";
15 function = "audio_ac97";
16 };
17 };
18
19 ...
20
21 sd2_pmx: sd2@0 {
22 sd2 {
23 groups = "sd2_grp0";
24 function = "sd2";
25 };
26 };
27
28 ...
29
30
31 sample0_cfg: sample0@0 {
32 sample0 {
33 pins = "ldd_0", "ldd_1";
34 bias-pull-up;
35 };
36 };
37
38 sample1_cfg: sample1@0 {
39 sample1 {
40 pins = "ldd_2", "ldd_3";
41 input-schmitt-enable;
42 };
43 };
44
45 sample2_cfg: sample2@0 {
46 sample2 {
47 groups = "uart4_nopause_grp";
48 bias-pull-down;
49 };
50 };
51
52 sample3_cfg: sample3@0 {
53 sample3 {
54 pins = "ldd_4", "ldd_5";
55 drive-strength = <2>;
56 };
57 };
58 };
59
60Please refer to pinctrl-bindings.txt in this directory for details of the common
61pinctrl bindings used by client devices.
62
63SiRFatlas7's pinmux nodes act as a container for an abitrary number of subnodes.
64Each of these subnodes represents some desired configuration for a group of pins.
65
66Required subnode-properties:
67- groups : An array of strings. Each string contains the name of a group.
68- function: A string containing the name of the function to mux to the
69 group.
70
71 Valid values for group and function names can be found from looking at the
72 group and function arrays in driver files:
73 drivers/pinctrl/pinctrl-sirf.c
74
75For example, pinctrl might have subnodes like the following:
76 sd0_pmx: sd0@0 {
77 sd0 {
78 groups = "sd0_grp";
79 function = "sd0";
80 };
81 };
82
83 sd1_pmx0: sd1@0 {
84 sd1 {
85 groups = "sd1_grp0";
86 function = "sd1_m0";
87 };
88 };
89
90 sd1_pmx1: sd1@1 {
91 sd1 {
92 groups = "sd1_grp1";
93 function = "sd1_m1";
94 };
95 };
96
97For a specific board, if it wants to use sd1,
98it can add the following to its board-specific .dts file.
99sd1: sd@0x12340000 {
100 pinctrl-names = "default";
101 pinctrl-0 = <&sd1_pmx0>;
102}
103
104or
105
106sd1: sd@0x12340000 {
107 pinctrl-names = "default";
108 pinctrl-0 = <&sd1_pmx1>;
109}
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt
index 5868a0f7255d..0480bc31bfd7 100644
--- a/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt
+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt
@@ -3,9 +3,11 @@
3The Mediatek's Pin controller is used to control SoC pins. 3The Mediatek's Pin controller is used to control SoC pins.
4 4
5Required properties: 5Required properties:
6- compatible: value should be either of the following. 6- compatible: value should be one of the following.
7 (a) "mediatek,mt8135-pinctrl", compatible with mt8135 pinctrl. 7 (a) "mediatek,mt8135-pinctrl", compatible with mt8135 pinctrl.
8- mediatek,pctl-regmap: Should be a phandle of the syscfg node. 8 (b) "mediatek,mt8173-pinctrl", compatible with mt8173 pinctrl.
9 (c) "mediatek,mt6397-pinctrl", compatible with mt6397 pinctrl.
10 (d) "mediatek,mt8127-pinctrl", compatible with mt8127 pinctrl.
9- pins-are-numbered: Specify the subnodes are using numbered pinmux to 11- pins-are-numbered: Specify the subnodes are using numbered pinmux to
10 specify pins. 12 specify pins.
11- gpio-controller : Marks the device node as a gpio controller. 13- gpio-controller : Marks the device node as a gpio controller.
@@ -24,6 +26,9 @@ Required properties:
24 Only the following flags are supported: 26 Only the following flags are supported:
25 0 - GPIO_ACTIVE_HIGH 27 0 - GPIO_ACTIVE_HIGH
26 1 - GPIO_ACTIVE_LOW 28 1 - GPIO_ACTIVE_LOW
29
30Optional properties:
31- mediatek,pctl-regmap: Should be a phandle of the syscfg node.
27- reg: physicall address base for EINT registers 32- reg: physicall address base for EINT registers
28- interrupt-controller: Marks the device node as an interrupt controller 33- interrupt-controller: Marks the device node as an interrupt controller
29- #interrupt-cells: Should be two. 34- #interrupt-cells: Should be two.
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8660-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,msm8660-pinctrl.txt
new file mode 100644
index 000000000000..77aa11790163
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8660-pinctrl.txt
@@ -0,0 +1,90 @@
1Qualcomm MSM8660 TLMM block
2
3Required properties:
4- compatible: "qcom,msm8660-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 arbitrary 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-gpio172, sdc3_clk, sdc3_cmd, sdc3_data sdc4_clk, sdc4_cmd, sdc4_data
47
48Valid values for function are:
49 gpio, cam_mclk, dsub, ext_gps, gp_clk_0a, gp_clk_0b, gp_clk_1a, gp_clk_1b,
50 gp_clk_2a, gp_clk_2b, gp_mn, gsbi1, gsbi1_spi_cs1_n, gsbi1_spi_cs2a_n,
51 gsbi1_spi_cs2b_n, gsbi1_spi_cs3_n, gsbi2, gsbi2_spi_cs1_n, gsbi2_spi_cs2_n,
52 gsbi2_spi_cs3_n, gsbi3, gsbi3_spi_cs1_n, gsbi3_spi_cs2_n, gsbi3_spi_cs3_n,
53 gsbi4, gsbi5, gsbi6, gsbi7, gsbi8, gsbi9, gsbi10, gsbi11, gsbi12, hdmi, i2s,
54 lcdc, mdp_vsync, mi2s, pcm, ps_hold, sdc1, sdc2, sdc5, tsif1, tsif2, usb_fs1,
55 usb_fs1_oe_n, usb_fs2, usb_fs2_oe_n, vfe, vsens_alarm,
56
57Example:
58
59 msmgpio: pinctrl@800000 {
60 compatible = "qcom,msm8660-pinctrl";
61 reg = <0x800000 0x4000>;
62
63 gpio-controller;
64 #gpio-cells = <2>;
65 interrupt-controller;
66 #interrupt-cells = <2>;
67 interrupts = <0 16 0x4>;
68
69 pinctrl-names = "default";
70 pinctrl-0 = <&gsbi12_uart>;
71
72 gsbi12_uart: gsbi12-uart {
73 mux {
74 pins = "gpio117", "gpio118";
75 function = "gsbi12";
76 };
77
78 tx {
79 pins = "gpio118";
80 drive-strength = <8>;
81 bias-disable;
82 };
83
84 rx {
85 pins = "gpio117";
86 drive-strength = <2>;
87 bias-pull-up;
88 };
89 };
90 };
diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
index bfe72ec055e3..51cee44fc140 100644
--- a/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
@@ -16,7 +16,9 @@ Required Properties:
16 - "renesas,pfc-r8a7778": for R8A7778 (R-Mobile M1) compatible pin-controller. 16 - "renesas,pfc-r8a7778": for R8A7778 (R-Mobile M1) compatible pin-controller.
17 - "renesas,pfc-r8a7779": for R8A7779 (R-Car H1) compatible pin-controller. 17 - "renesas,pfc-r8a7779": for R8A7779 (R-Car H1) compatible pin-controller.
18 - "renesas,pfc-r8a7790": for R8A7790 (R-Car H2) compatible pin-controller. 18 - "renesas,pfc-r8a7790": for R8A7790 (R-Car H2) compatible pin-controller.
19 - "renesas,pfc-r8a7791": for R8A7791 (R-Car M2) compatible pin-controller. 19 - "renesas,pfc-r8a7791": for R8A7791 (R-Car M2-W) compatible pin-controller.
20 - "renesas,pfc-r8a7793": for R8A7793 (R-Car M2-N) compatible pin-controller.
21 - "renesas,pfc-r8a7794": for R8A7794 (R-Car E2) compatible pin-controller.
20 - "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller. 22 - "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller.
21 23
22 - reg: Base address and length of each memory resource used by the pin 24 - reg: Base address and length of each memory resource used by the pin
diff --git a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
index 388b213249fd..391ef4be8d50 100644
--- a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
@@ -21,14 +21,15 @@ 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,rk3288-pinctrl" 24 "rockchip,rk3288-pinctrl", "rockchip,rk3368-pinctrl"
25 - rockchip,grf: phandle referencing a syscon providing the 25 - rockchip,grf: phandle referencing a syscon providing the
26 "general register files" 26 "general register files"
27 27
28Optional properties for iomux controller: 28Optional properties for iomux controller:
29 - rockchip,pmu: phandle referencing a syscon providing the pmu registers 29 - rockchip,pmu: phandle referencing a syscon providing the pmu registers
30 as some SoCs carry parts of the iomux controller registers there. 30 as some SoCs carry parts of the iomux controller registers there.
31 Required for at least rk3188 and rk3288. 31 Required for at least rk3188 and rk3288. On the rk3368 this should
32 point to the PMUGRF syscon.
32 33
33Deprecated properties for iomux controller: 34Deprecated properties for iomux controller:
34 - reg: first element is the general register space of the iomux controller 35 - reg: first element is the general register space of the iomux controller
diff --git a/Documentation/devicetree/bindings/pinctrl/xlnx,zynq-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/xlnx,zynq-pinctrl.txt
index b7b55a964f65..f488b0f77406 100644
--- a/Documentation/devicetree/bindings/pinctrl/xlnx,zynq-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/xlnx,zynq-pinctrl.txt
@@ -45,8 +45,9 @@ to specify in a pinconf subnode:
45 45
46 Valid values for groups are: 46 Valid values for groups are:
47 ethernet0_0_grp, ethernet1_0_grp, mdio0_0_grp, mdio1_0_grp, 47 ethernet0_0_grp, ethernet1_0_grp, mdio0_0_grp, mdio1_0_grp,
48 qspi0_0_grp, qspi1_0_grp, qspi_fbclk, qspi_cs1_grp, spi0_0_grp, 48 qspi0_0_grp, qspi1_0_grp, qspi_fbclk, qspi_cs1_grp, spi0_0_grp - spi0_2_grp,
49 spi0_1_grp - spi0_2_grp, spi1_0_grp - spi1_3_grp, sdio0_0_grp - sdio0_2_grp, 49 spi0_X_ssY (X=0..2, Y=0..2), spi1_0_grp - spi1_3_grp,
50 spi1_X_ssY (X=0..3, Y=0..2), sdio0_0_grp - sdio0_2_grp,
50 sdio1_0_grp - sdio1_3_grp, sdio0_emio_wp, sdio0_emio_cd, sdio1_emio_wp, 51 sdio1_0_grp - sdio1_3_grp, sdio0_emio_wp, sdio0_emio_cd, sdio1_emio_wp,
51 sdio1_emio_cd, smc0_nor, smc0_nor_cs1_grp, smc0_nor_addr25_grp, smc0_nand, 52 sdio1_emio_cd, smc0_nor, smc0_nor_cs1_grp, smc0_nor_addr25_grp, smc0_nand,
52 can0_0_grp - can0_10_grp, can1_0_grp - can1_11_grp, uart0_0_grp - uart0_10_grp, 53 can0_0_grp - can0_10_grp, can1_0_grp - can1_11_grp, uart0_0_grp - uart0_10_grp,
@@ -59,7 +60,7 @@ to specify in a pinconf subnode:
59 60
60 Valid values for function are: 61 Valid values for function are:
61 ethernet0, ethernet1, mdio0, mdio1, qspi0, qspi1, qspi_fbclk, qspi_cs1, 62 ethernet0, ethernet1, mdio0, mdio1, qspi0, qspi1, qspi_fbclk, qspi_cs1,
62 spi0, spi1, sdio0, sdio0_pc, sdio0_cd, sdio0_wp, 63 spi0, spi0_ss, spi1, spi1_ss, sdio0, sdio0_pc, sdio0_cd, sdio0_wp,
63 sdio1, sdio1_pc, sdio1_cd, sdio1_wp, 64 sdio1, sdio1_pc, sdio1_cd, sdio1_wp,
64 smc0_nor, smc0_nor_cs1, smc0_nor_addr25, smc0_nand, can0, can1, uart0, uart1, 65 smc0_nor, smc0_nor_cs1, smc0_nor_addr25, smc0_nand, can0, can1, uart0, uart1,
65 i2c0, i2c1, ttc0, ttc1, swdt0, gpio0, usb0, usb1 66 i2c0, i2c1, ttc0, ttc1, swdt0, gpio0, usb0, usb1
diff --git a/Documentation/devicetree/bindings/power/bq24257.txt b/Documentation/devicetree/bindings/power/bq24257.txt
new file mode 100644
index 000000000000..5c9d3940d07c
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/bq24257.txt
@@ -0,0 +1,21 @@
1Binding for TI bq24257 Li-Ion Charger
2
3Required properties:
4- compatible: Should contain one of the following:
5 * "ti,bq24257"
6- reg: integer, i2c address of the device.
7- ti,battery-regulation-voltage: integer, maximum charging voltage in uV.
8- ti,charge-current: integer, maximum charging current in uA.
9- ti,termination-current: integer, charge will be terminated when current in
10 constant-voltage phase drops below this value (in uA).
11
12Example:
13
14bq24257 {
15 compatible = "ti,bq24257";
16 reg = <0x6a>;
17
18 ti,battery-regulation-voltage = <4200000>;
19 ti,charge-current = <1000000>;
20 ti,termination-current = <50000>;
21};
diff --git a/Documentation/devicetree/bindings/power/bq25890.txt b/Documentation/devicetree/bindings/power/bq25890.txt
new file mode 100644
index 000000000000..c9dd17d142ad
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/bq25890.txt
@@ -0,0 +1,46 @@
1Binding for TI bq25890 Li-Ion Charger
2
3Required properties:
4- compatible: Should contain one of the following:
5 * "ti,bq25890"
6- reg: integer, i2c address of the device.
7- ti,battery-regulation-voltage: integer, maximum charging voltage (in uV);
8- ti,charge-current: integer, maximum charging current (in uA);
9- ti,termination-current: integer, charge will be terminated when current in
10 constant-voltage phase drops below this value (in uA);
11- ti,precharge-current: integer, maximum charge current during precharge
12 phase (in uA);
13- ti,minimum-sys-voltage: integer, when battery is charging and it is below
14 minimum system voltage, the system will be regulated above
15 minimum-sys-voltage setting (in uV);
16- ti,boost-voltage: integer, VBUS voltage level in boost mode (in uV);
17- ti,boost-max-current: integer, maximum allowed current draw in boost mode
18 (in uA).
19
20Optional properties:
21- ti,boost-low-freq: boolean, if present boost mode frequency will be 500kHz,
22 otherwise 1.5MHz;
23- ti,use-ilim-pin: boolean, if present the ILIM resistor will be used and the
24 input current will be the lower between the resistor setting and the IINLIM
25 register setting;
26- ti,thermal-regulation-threshold: integer, temperature above which the charge
27 current is lowered, to avoid overheating (in degrees Celsius). If omitted,
28 the default setting will be used (120 degrees);
29
30Example:
31
32bq25890 {
33 compatible = "ti,bq25890";
34 reg = <0x6a>;
35
36 ti,battery-regulation-voltage = <4200000>;
37 ti,charge-current = <1000000>;
38 ti,termination-current = <50000>;
39 ti,precharge-current = <128000>;
40 ti,minimum-sys-voltage = <3600000>;
41 ti,boost-voltage = <5000000>;
42 ti,boost-max-current = <1000000>;
43
44 ti,use-ilim-pin;
45 ti,thermal-regulation-threshold = <120>;
46};
diff --git a/Documentation/devicetree/bindings/power/opp.txt b/Documentation/devicetree/bindings/power/opp.txt
index 74499e5033fc..0d5e7c978121 100644
--- a/Documentation/devicetree/bindings/power/opp.txt
+++ b/Documentation/devicetree/bindings/power/opp.txt
@@ -1,8 +1,19 @@
1* Generic OPP Interface 1Generic OPP (Operating Performance Points) Bindings
2----------------------------------------------------
2 3
3SoCs have a standard set of tuples consisting of frequency and 4Devices work at voltage-current-frequency combinations and some implementations
4voltage pairs that the device will support per voltage domain. These 5have the liberty of choosing these. These combinations are called Operating
5are called Operating Performance Points or OPPs. 6Performance Points aka OPPs. This document defines bindings for these OPPs
7applicable across wide range of devices. For illustration purpose, this document
8uses CPU as a device.
9
10This document contain multiple versions of OPP binding and only one of them
11should be used per device.
12
13Binding 1: operating-points
14============================
15
16This binding only supports voltage-frequency pairs.
6 17
7Properties: 18Properties:
8- operating-points: An array of 2-tuples items, and each item consists 19- operating-points: An array of 2-tuples items, and each item consists
@@ -23,3 +34,432 @@ cpu@0 {
23 198000 850000 34 198000 850000
24 >; 35 >;
25}; 36};
37
38
39Binding 2: operating-points-v2
40============================
41
42* Property: operating-points-v2
43
44Devices supporting OPPs must set their "operating-points-v2" property with
45phandle to a OPP table in their DT node. The OPP core will use this phandle to
46find the operating points for the device.
47
48Devices may want to choose OPP tables at runtime and so can provide a list of
49phandles here. But only *one* of them should be chosen at runtime. This must be
50accompanied by a corresponding "operating-points-names" property, to uniquely
51identify the OPP tables.
52
53If required, this can be extended for SoC vendor specfic bindings. Such bindings
54should be documented as Documentation/devicetree/bindings/power/<vendor>-opp.txt
55and should have a compatible description like: "operating-points-v2-<vendor>".
56
57Optional properties:
58- operating-points-names: Names of OPP tables (required if multiple OPP
59 tables are present), to uniquely identify them. The same list must be present
60 for all the CPUs which are sharing clock/voltage rails and hence the OPP
61 tables.
62
63* OPP Table Node
64
65This describes the OPPs belonging to a device. This node can have following
66properties:
67
68Required properties:
69- compatible: Allow OPPs to express their compatibility. It should be:
70 "operating-points-v2".
71
72- OPP nodes: One or more OPP nodes describing voltage-current-frequency
73 combinations. Their name isn't significant but their phandle can be used to
74 reference an OPP.
75
76Optional properties:
77- opp-shared: Indicates that device nodes using this OPP Table Node's phandle
78 switch their DVFS state together, i.e. they share clock/voltage/current lines.
79 Missing property means devices have independent clock/voltage/current lines,
80 but they share OPP tables.
81
82- status: Marks the OPP table enabled/disabled.
83
84
85* OPP Node
86
87This defines voltage-current-frequency combinations along with other related
88properties.
89
90Required properties:
91- opp-hz: Frequency in Hz
92
93Optional properties:
94- opp-microvolt: voltage in micro Volts.
95
96 A single regulator's voltage is specified with an array of size one or three.
97 Single entry is for target voltage and three entries are for <target min max>
98 voltages.
99
100 Entries for multiple regulators must be present in the same order as
101 regulators are specified in device's DT node.
102
103- opp-microamp: The maximum current drawn by the device in microamperes
104 considering system specific parameters (such as transients, process, aging,
105 maximum operating temperature range etc.) as necessary. This may be used to
106 set the most efficient regulator operating mode.
107
108 Should only be set if opp-microvolt is set for the OPP.
109
110 Entries for multiple regulators must be present in the same order as
111 regulators are specified in device's DT node. If this property isn't required
112 for few regulators, then this should be marked as zero for them. If it isn't
113 required for any regulator, then this property need not be present.
114
115- clock-latency-ns: Specifies the maximum possible transition latency (in
116 nanoseconds) for switching to this OPP from any other OPP.
117
118- turbo-mode: Marks the OPP to be used only for turbo modes. Turbo mode is
119 available on some platforms, where the device can run over its operating
120 frequency for a short duration of time limited by the device's power, current
121 and thermal limits.
122
123- opp-suspend: Marks the OPP to be used during device suspend. Only one OPP in
124 the table should have this.
125
126- status: Marks the node enabled/disabled.
127
128Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together.
129
130/ {
131 cpus {
132 #address-cells = <1>;
133 #size-cells = <0>;
134
135 cpu@0 {
136 compatible = "arm,cortex-a9";
137 reg = <0>;
138 next-level-cache = <&L2>;
139 clocks = <&clk_controller 0>;
140 clock-names = "cpu";
141 cpu-supply = <&cpu_supply0>;
142 operating-points-v2 = <&cpu0_opp_table>;
143 };
144
145 cpu@1 {
146 compatible = "arm,cortex-a9";
147 reg = <1>;
148 next-level-cache = <&L2>;
149 clocks = <&clk_controller 0>;
150 clock-names = "cpu";
151 cpu-supply = <&cpu_supply0>;
152 operating-points-v2 = <&cpu0_opp_table>;
153 };
154 };
155
156 cpu0_opp_table: opp_table0 {
157 compatible = "operating-points-v2";
158 opp-shared;
159
160 opp00 {
161 opp-hz = <1000000000>;
162 opp-microvolt = <970000 975000 985000>;
163 opp-microamp = <70000>;
164 clock-latency-ns = <300000>;
165 opp-suspend;
166 };
167 opp01 {
168 opp-hz = <1100000000>;
169 opp-microvolt = <980000 1000000 1010000>;
170 opp-microamp = <80000>;
171 clock-latency-ns = <310000>;
172 };
173 opp02 {
174 opp-hz = <1200000000>;
175 opp-microvolt = <1025000>;
176 clock-latency-ns = <290000>;
177 turbo-mode;
178 };
179 };
180};
181
182Example 2: Single cluster, Quad-core Qualcom-krait, switches DVFS states
183independently.
184
185/ {
186 cpus {
187 #address-cells = <1>;
188 #size-cells = <0>;
189
190 cpu@0 {
191 compatible = "qcom,krait";
192 reg = <0>;
193 next-level-cache = <&L2>;
194 clocks = <&clk_controller 0>;
195 clock-names = "cpu";
196 cpu-supply = <&cpu_supply0>;
197 operating-points-v2 = <&cpu_opp_table>;
198 };
199
200 cpu@1 {
201 compatible = "qcom,krait";
202 reg = <1>;
203 next-level-cache = <&L2>;
204 clocks = <&clk_controller 1>;
205 clock-names = "cpu";
206 cpu-supply = <&cpu_supply1>;
207 operating-points-v2 = <&cpu_opp_table>;
208 };
209
210 cpu@2 {
211 compatible = "qcom,krait";
212 reg = <2>;
213 next-level-cache = <&L2>;
214 clocks = <&clk_controller 2>;
215 clock-names = "cpu";
216 cpu-supply = <&cpu_supply2>;
217 operating-points-v2 = <&cpu_opp_table>;
218 };
219
220 cpu@3 {
221 compatible = "qcom,krait";
222 reg = <3>;
223 next-level-cache = <&L2>;
224 clocks = <&clk_controller 3>;
225 clock-names = "cpu";
226 cpu-supply = <&cpu_supply3>;
227 operating-points-v2 = <&cpu_opp_table>;
228 };
229 };
230
231 cpu_opp_table: opp_table {
232 compatible = "operating-points-v2";
233
234 /*
235 * Missing opp-shared property means CPUs switch DVFS states
236 * independently.
237 */
238
239 opp00 {
240 opp-hz = <1000000000>;
241 opp-microvolt = <970000 975000 985000>;
242 opp-microamp = <70000>;
243 clock-latency-ns = <300000>;
244 opp-suspend;
245 };
246 opp01 {
247 opp-hz = <1100000000>;
248 opp-microvolt = <980000 1000000 1010000>;
249 opp-microamp = <80000>;
250 clock-latency-ns = <310000>;
251 };
252 opp02 {
253 opp-hz = <1200000000>;
254 opp-microvolt = <1025000>;
255 opp-microamp = <90000;
256 lock-latency-ns = <290000>;
257 turbo-mode;
258 };
259 };
260};
261
262Example 3: Dual-cluster, Dual-core per cluster. CPUs within a cluster switch
263DVFS state together.
264
265/ {
266 cpus {
267 #address-cells = <1>;
268 #size-cells = <0>;
269
270 cpu@0 {
271 compatible = "arm,cortex-a7";
272 reg = <0>;
273 next-level-cache = <&L2>;
274 clocks = <&clk_controller 0>;
275 clock-names = "cpu";
276 cpu-supply = <&cpu_supply0>;
277 operating-points-v2 = <&cluster0_opp>;
278 };
279
280 cpu@1 {
281 compatible = "arm,cortex-a7";
282 reg = <1>;
283 next-level-cache = <&L2>;
284 clocks = <&clk_controller 0>;
285 clock-names = "cpu";
286 cpu-supply = <&cpu_supply0>;
287 operating-points-v2 = <&cluster0_opp>;
288 };
289
290 cpu@100 {
291 compatible = "arm,cortex-a15";
292 reg = <100>;
293 next-level-cache = <&L2>;
294 clocks = <&clk_controller 1>;
295 clock-names = "cpu";
296 cpu-supply = <&cpu_supply1>;
297 operating-points-v2 = <&cluster1_opp>;
298 };
299
300 cpu@101 {
301 compatible = "arm,cortex-a15";
302 reg = <101>;
303 next-level-cache = <&L2>;
304 clocks = <&clk_controller 1>;
305 clock-names = "cpu";
306 cpu-supply = <&cpu_supply1>;
307 operating-points-v2 = <&cluster1_opp>;
308 };
309 };
310
311 cluster0_opp: opp_table0 {
312 compatible = "operating-points-v2";
313 opp-shared;
314
315 opp00 {
316 opp-hz = <1000000000>;
317 opp-microvolt = <970000 975000 985000>;
318 opp-microamp = <70000>;
319 clock-latency-ns = <300000>;
320 opp-suspend;
321 };
322 opp01 {
323 opp-hz = <1100000000>;
324 opp-microvolt = <980000 1000000 1010000>;
325 opp-microamp = <80000>;
326 clock-latency-ns = <310000>;
327 };
328 opp02 {
329 opp-hz = <1200000000>;
330 opp-microvolt = <1025000>;
331 opp-microamp = <90000>;
332 clock-latency-ns = <290000>;
333 turbo-mode;
334 };
335 };
336
337 cluster1_opp: opp_table1 {
338 compatible = "operating-points-v2";
339 opp-shared;
340
341 opp10 {
342 opp-hz = <1300000000>;
343 opp-microvolt = <1045000 1050000 1055000>;
344 opp-microamp = <95000>;
345 clock-latency-ns = <400000>;
346 opp-suspend;
347 };
348 opp11 {
349 opp-hz = <1400000000>;
350 opp-microvolt = <1075000>;
351 opp-microamp = <100000>;
352 clock-latency-ns = <400000>;
353 };
354 opp12 {
355 opp-hz = <1500000000>;
356 opp-microvolt = <1010000 1100000 1110000>;
357 opp-microamp = <95000>;
358 clock-latency-ns = <400000>;
359 turbo-mode;
360 };
361 };
362};
363
364Example 4: Handling multiple regulators
365
366/ {
367 cpus {
368 cpu@0 {
369 compatible = "arm,cortex-a7";
370 ...
371
372 cpu-supply = <&cpu_supply0>, <&cpu_supply1>, <&cpu_supply2>;
373 operating-points-v2 = <&cpu0_opp_table>;
374 };
375 };
376
377 cpu0_opp_table: opp_table0 {
378 compatible = "operating-points-v2";
379 opp-shared;
380
381 opp00 {
382 opp-hz = <1000000000>;
383 opp-microvolt = <970000>, /* Supply 0 */
384 <960000>, /* Supply 1 */
385 <960000>; /* Supply 2 */
386 opp-microamp = <70000>, /* Supply 0 */
387 <70000>, /* Supply 1 */
388 <70000>; /* Supply 2 */
389 clock-latency-ns = <300000>;
390 };
391
392 /* OR */
393
394 opp00 {
395 opp-hz = <1000000000>;
396 opp-microvolt = <970000 975000 985000>, /* Supply 0 */
397 <960000 965000 975000>, /* Supply 1 */
398 <960000 965000 975000>; /* Supply 2 */
399 opp-microamp = <70000>, /* Supply 0 */
400 <70000>, /* Supply 1 */
401 <70000>; /* Supply 2 */
402 clock-latency-ns = <300000>;
403 };
404
405 /* OR */
406
407 opp00 {
408 opp-hz = <1000000000>;
409 opp-microvolt = <970000 975000 985000>, /* Supply 0 */
410 <960000 965000 975000>, /* Supply 1 */
411 <960000 965000 975000>; /* Supply 2 */
412 opp-microamp = <70000>, /* Supply 0 */
413 <0>, /* Supply 1 doesn't need this */
414 <70000>; /* Supply 2 */
415 clock-latency-ns = <300000>;
416 };
417 };
418};
419
420Example 5: Multiple OPP tables
421
422/ {
423 cpus {
424 cpu@0 {
425 compatible = "arm,cortex-a7";
426 ...
427
428 cpu-supply = <&cpu_supply>
429 operating-points-v2 = <&cpu0_opp_table_slow>, <&cpu0_opp_table_fast>;
430 operating-points-names = "slow", "fast";
431 };
432 };
433
434 cpu0_opp_table_slow: opp_table_slow {
435 compatible = "operating-points-v2";
436 status = "okay";
437 opp-shared;
438
439 opp00 {
440 opp-hz = <600000000>;
441 ...
442 };
443
444 opp01 {
445 opp-hz = <800000000>;
446 ...
447 };
448 };
449
450 cpu0_opp_table_fast: opp_table_fast {
451 compatible = "operating-points-v2";
452 status = "okay";
453 opp-shared;
454
455 opp10 {
456 opp-hz = <1000000000>;
457 ...
458 };
459
460 opp11 {
461 opp-hz = <1100000000>;
462 ...
463 };
464 };
465};
diff --git a/Documentation/devicetree/bindings/power/rt9455_charger.txt b/Documentation/devicetree/bindings/power/rt9455_charger.txt
new file mode 100644
index 000000000000..5d9ad5cf2c5a
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/rt9455_charger.txt
@@ -0,0 +1,48 @@
1Binding for Richtek rt9455 battery charger
2
3Required properties:
4- compatible: it should contain one of the following:
5 "richtek,rt9455".
6- reg: integer, i2c address of the device.
7- interrupt-parent: the phandle for the interrupt controller that
8 services interrupts for this device.
9- interrupts: interrupt mapping for GPIO IRQ, it should be
10 configured with IRQ_TYPE_LEVEL_LOW flag.
11- richtek,output-charge-current: integer, output current from the charger to the
12 battery, in uA.
13- richtek,end-of-charge-percentage: integer, percent of the output charge current.
14 When the current in constant-voltage phase drops
15 below output_charge_current x end-of-charge-percentage,
16 charge is terminated.
17- richtek,battery-regulation-voltage: integer, maximum battery voltage in uV.
18- richtek,boost-output-voltage: integer, maximum voltage provided to consumer
19 devices, when the charger is in boost mode, in uV.
20
21Optional properties:
22- richtek,min-input-voltage-regulation: integer, input voltage level in uV, used to
23 decrease voltage level when the over current
24 of the input power source occurs.
25 This prevents input voltage drop due to insufficient
26 current provided by the power source.
27 Default: 4500000 uV (4.5V)
28- richtek,avg-input-current-regulation: integer, input current value in uA drained by the
29 charger from the power source.
30 Default: 500000 uA (500mA)
31
32Example:
33
34rt9455@22 {
35 compatible = "richtek,rt9455";
36 reg = <0x22>;
37
38 interrupt-parent = <&gpio1>;
39 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
40
41 richtek,output-charge-current = <500000>;
42 richtek,end-of-charge-percentage = <10>;
43 richtek,battery-regulation-voltage = <4200000>;
44 richtek,boost-output-voltage = <5050000>;
45
46 richtek,min-input-voltage-regulation = <4500000>;
47 richtek,avg-input-current-regulation = <500000>;
48};
diff --git a/Documentation/devicetree/bindings/power/twl-charger.txt b/Documentation/devicetree/bindings/power/twl-charger.txt
index d5c706216df5..3b4ea1b73b38 100644
--- a/Documentation/devicetree/bindings/power/twl-charger.txt
+++ b/Documentation/devicetree/bindings/power/twl-charger.txt
@@ -1,5 +1,15 @@
1TWL BCI (Battery Charger Interface) 1TWL BCI (Battery Charger Interface)
2 2
3The battery charger needs to interact with the USB phy in order
4to know when charging is permissible, and when there is a connection
5or disconnection.
6
7The choice of phy cannot be configured at a hardware level, so there
8is no value in explicit configuration in device-tree. Rather
9if there is a sibling of the BCI node which is compatible with
10"ti,twl4030-usb", then that is used to determine when and how
11use USB power for charging.
12
3Required properties: 13Required properties:
4- compatible: 14- compatible:
5 - "ti,twl4030-bci" 15 - "ti,twl4030-bci"
diff --git a/Documentation/devicetree/bindings/power_supply/max17042_battery.txt b/Documentation/devicetree/bindings/power_supply/max17042_battery.txt
index 5bc9b685cf8a..3f3894aaeebc 100644
--- a/Documentation/devicetree/bindings/power_supply/max17042_battery.txt
+++ b/Documentation/devicetree/bindings/power_supply/max17042_battery.txt
@@ -9,10 +9,23 @@ Optional properties :
9 (datasheet-recommended value is 10000). 9 (datasheet-recommended value is 10000).
10 Defining this property enables current-sense functionality. 10 Defining this property enables current-sense functionality.
11 11
12Optional threshold properties :
13 If skipped the condition won't be reported.
14 - maxim,cold-temp : Temperature threshold to report battery
15 as cold (in tenths of degree Celsius).
16 - maxim,over-heat-temp : Temperature threshold to report battery
17 as over heated (in tenths of degree Celsius).
18 - maxim,dead-volt : Voltage threshold to report battery
19 as dead (in mV).
20 - maxim,over-volt : Voltage threshold to report battery
21 as over voltage (in mV).
22
12Example: 23Example:
13 24
14 battery-charger@36 { 25 battery-charger@36 {
15 compatible = "maxim,max17042"; 26 compatible = "maxim,max17042";
16 reg = <0x36>; 27 reg = <0x36>;
17 maxim,rsns-microohm = <10000>; 28 maxim,rsns-microohm = <10000>;
29 maxim,over-heat-temp = <600>;
30 maxim,over-volt = <4300>;
18 }; 31 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
index edda55f74004..1fc5328c0651 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/fman.txt
@@ -189,6 +189,19 @@ PROPERTIES
189 Definition: There is one reg region describing the port 189 Definition: There is one reg region describing the port
190 configuration registers. 190 configuration registers.
191 191
192- fsl,fman-10g-port
193 Usage: optional
194 Value type: boolean
195 Definition: The default port rate is 1G.
196 If this property exists, the port is s 10G port.
197
198- fsl,fman-best-effort-port
199 Usage: optional
200 Value type: boolean
201 Definition: Can be defined only if 10G-support is set.
202 This property marks a best-effort 10G port (10G port that
203 may not be capable of line rate).
204
192EXAMPLE 205EXAMPLE
193 206
194port@a8000 { 207port@a8000 {
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt b/Documentation/devicetree/bindings/powerpc/fsl/guts.txt
index 7f150b5012cc..b71b2039e112 100644
--- a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt
+++ b/Documentation/devicetree/bindings/powerpc/fsl/guts.txt
@@ -9,6 +9,11 @@ Required properties:
9 9
10 - compatible : Should define the compatible device type for 10 - compatible : Should define the compatible device type for
11 global-utilities. 11 global-utilities.
12 Possible compatibles:
13 "fsl,qoriq-device-config-1.0"
14 "fsl,qoriq-device-config-2.0"
15 "fsl,<chip>-device-config"
16 "fsl,<chip>-guts"
12 - reg : Offset and length of the register set for the device. 17 - reg : Offset and length of the register set for the device.
13 18
14Recommended properties: 19Recommended properties:
diff --git a/Documentation/devicetree/bindings/regulator/max8973-regulator.txt b/Documentation/devicetree/bindings/regulator/max8973-regulator.txt
index 4f15d8a1bfd0..55efb24e5683 100644
--- a/Documentation/devicetree/bindings/regulator/max8973-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/max8973-regulator.txt
@@ -2,12 +2,30 @@
2 2
3Required properties: 3Required properties:
4 4
5- compatible: must be "maxim,max8973" 5- compatible: must be one of following:
6 "maxim,max8973"
7 "maxim,max77621".
6- reg: the i2c slave address of the regulator. It should be 0x1b. 8- reg: the i2c slave address of the regulator. It should be 0x1b.
7 9
8Any standard regulator properties can be used to configure the single max8973 10Any standard regulator properties can be used to configure the single max8973
9DCDC. 11DCDC.
10 12
13Optional properties:
14
15-maxim,externally-enable: boolean, externally control the regulator output
16 enable/disable.
17-maxim,enable-gpio: GPIO for enable control. If the valid GPIO is provided
18 then externally enable control will be considered.
19-maxim,dvs-gpio: GPIO which is connected to DVS pin of device.
20-maxim,dvs-default-state: Default state of GPIO during initialisation.
21 1 for HIGH and 0 for LOW.
22-maxim,enable-remote-sense: boolean, enable reote sense.
23-maxim,enable-falling-slew-rate: boolean, enable falling slew rate.
24-maxim,enable-active-discharge: boolean: enable active discharge.
25-maxim,enable-frequency-shift: boolean, enable 9% frequency shift.
26-maxim,enable-bias-control: boolean, enable bias control. By enabling this
27 startup delay can be reduce to 20us from 220us.
28
11Example: 29Example:
12 30
13 max8973@1b { 31 max8973@1b {
diff --git a/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt
new file mode 100644
index 000000000000..75b4604bad07
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/qcom,spmi-regulator.txt
@@ -0,0 +1,121 @@
1Qualcomm SPMI Regulators
2
3- compatible:
4 Usage: required
5 Value type: <string>
6 Definition: must be one of:
7 "qcom,pm8841-regulators"
8 "qcom,pm8916-regulators"
9 "qcom,pm8941-regulators"
10
11- interrupts:
12 Usage: optional
13 Value type: <prop-encoded-array>
14 Definition: List of OCP interrupts.
15
16- interrupt-names:
17 Usage: required if 'interrupts' property present
18 Value type: <string-array>
19 Definition: List of strings defining the names of the
20 interrupts in the 'interrupts' property 1-to-1.
21 Supported values are "ocp-<regulator_name>", where
22 <regulator_name> corresponds to a voltage switch
23 type regulator.
24
25- vdd_s1-supply:
26- vdd_s2-supply:
27- vdd_s3-supply:
28- vdd_s4-supply:
29- vdd_s5-supply:
30- vdd_s6-supply:
31- vdd_s7-supply:
32- vdd_s8-supply:
33 Usage: optional (pm8841 only)
34 Value type: <phandle>
35 Definition: Reference to regulator supplying the input pin, as
36 described in the data sheet.
37
38- vdd_s1-supply:
39- vdd_s2-supply:
40- vdd_s3-supply:
41- vdd_s4-supply:
42- vdd_l1_l3-supply:
43- vdd_l2-supply:
44- vdd_l4_l5_l6-supply:
45- vdd_l7-supply:
46- vdd_l8_l11_l14_l15_l16-supply:
47- vdd_l9_l10_l12_l13_l17_l18-supply:
48 Usage: optional (pm8916 only)
49 Value type: <phandle>
50 Definition: Reference to regulator supplying the input pin, as
51 described in the data sheet.
52
53- vdd_s1-supply:
54- vdd_s2-supply:
55- vdd_s3-supply:
56- vdd_l1_l3-supply:
57- vdd_l2_lvs_1_2_3-supply:
58- vdd_l4_l11-supply:
59- vdd_l5_l7-supply:
60- vdd_l6_l12_l14_l15-supply:
61- vdd_l8_l16_l18_19-supply:
62- vdd_l9_l10_l17_l22-supply:
63- vdd_l13_l20_l23_l24-supply:
64- vdd_l21-supply:
65- vin_5vs-supply:
66 Usage: optional (pm8941 only)
67 Value type: <phandle>
68 Definition: Reference to regulator supplying the input pin, as
69 described in the data sheet.
70
71
72The regulator node houses sub-nodes for each regulator within the device. Each
73sub-node is identified using the node's name, with valid values listed for each
74of the PMICs below.
75
76pm8841:
77 s1, s2, s3, s4, s5, s6, s7, s8
78
79pm8916:
80 s1, s2, s3, s4, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13,
81 l14, l15, l16, l17, l18
82
83pm8941:
84 s1, s2, s3, l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, l11, l12, l13, l14,
85 l15, l16, l17, l18, l19, l20, l21, l22, l23, l24, lvs1, lvs2, lvs3,
86 mvs1, mvs2
87
88The content of each sub-node is defined by the standard binding for regulators -
89see regulator.txt - with additional custom properties described below:
90
91- regulator-initial-mode:
92 Usage: optional
93 Value type: <u32>
94 Descrption: 1 = Set initial mode to high power mode (HPM), also referred
95 to as NPM. HPM consumes more ground current than LPM, but
96 it can source significantly higher load current. HPM is not
97 available on boost type regulators. For voltage switch type
98 regulators, HPM implies that over current protection and
99 soft start are active all the time. 0 = Set initial mode to
100 low power mode (LPM).
101
102Example:
103
104 regulators {
105 compatible = "qcom,pm8941-regulators";
106 vdd_l1_l3-supply = <&s1>;
107
108 s1: s1 {
109 regulator-min-microvolt = <1300000>;
110 regulator-max-microvolt = <1400000>;
111 };
112
113 ...
114
115 l1: l1 {
116 regulator-min-microvolt = <1225000>;
117 regulator-max-microvolt = <1300000>;
118 };
119
120 ....
121 };
diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt
index abb26b58c83e..db88feb28c03 100644
--- a/Documentation/devicetree/bindings/regulator/regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/regulator.txt
@@ -7,18 +7,20 @@ Optional properties:
7- regulator-microvolt-offset: Offset applied to voltages to compensate for voltage drops 7- regulator-microvolt-offset: Offset applied to voltages to compensate for voltage drops
8- regulator-min-microamp: smallest current consumers may set 8- regulator-min-microamp: smallest current consumers may set
9- regulator-max-microamp: largest current consumers may set 9- regulator-max-microamp: largest current consumers may set
10- regulator-input-current-limit-microamp: maximum input current regulator allows
10- regulator-always-on: boolean, regulator should never be disabled 11- regulator-always-on: boolean, regulator should never be disabled
11- regulator-boot-on: bootloader/firmware enabled regulator 12- regulator-boot-on: bootloader/firmware enabled regulator
12- regulator-allow-bypass: allow the regulator to go into bypass mode 13- regulator-allow-bypass: allow the regulator to go into bypass mode
13- <name>-supply: phandle to the parent supply/regulator node 14- <name>-supply: phandle to the parent supply/regulator node
14- regulator-ramp-delay: ramp delay for regulator(in uV/uS) 15- regulator-ramp-delay: ramp delay for regulator(in uV/uS)
15 For hardware which supports disabling ramp rate, it should be explicitly 16 For hardware which supports disabling ramp rate, it should be explicitly
16 intialised to zero (regulator-ramp-delay = <0>) for disabling ramp delay. 17 initialised to zero (regulator-ramp-delay = <0>) for disabling ramp delay.
17- regulator-enable-ramp-delay: The time taken, in microseconds, for the supply 18- 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 19 rail to reach the target voltage, plus/minus whatever tolerance the board
19 design requires. This property describes the total system ramp time 20 design requires. This property describes the total system ramp time
20 required due to the combination of internal ramping of the regulator itself, 21 required due to the combination of internal ramping of the regulator itself,
21 and board design issues such as trace capacitance and load on the supply. 22 and board design issues such as trace capacitance and load on the supply.
23- regulator-soft-start: Enable soft start so that voltage ramps slowly
22- regulator-state-mem sub-root node for Suspend-to-RAM mode 24- regulator-state-mem sub-root node for Suspend-to-RAM mode
23 : suspend to memory, the device goes to sleep, but all data stored in memory, 25 : suspend to memory, the device goes to sleep, but all data stored in memory,
24 only some external interrupt can wake the device. 26 only some external interrupt can wake the device.
@@ -37,6 +39,9 @@ Optional properties:
37- regulator-initial-mode: initial operating mode. The set of possible operating 39- regulator-initial-mode: initial operating mode. The set of possible operating
38 modes depends on the capabilities of every hardware so each device binding 40 modes depends on the capabilities of every hardware so each device binding
39 documentation explains which values the regulator supports. 41 documentation explains which values the regulator supports.
42- regulator-system-load: Load in uA present on regulator that is not captured by
43 any consumer request.
44- regulator-pull-down: Enable pull down resistor when the regulator is disabled.
40 45
41Deprecated properties: 46Deprecated properties:
42- regulator-compatible: If a regulator chip contains multiple 47- regulator-compatible: If a regulator chip contains multiple
diff --git a/Documentation/devicetree/bindings/remoteproc/wkup_m3_rproc.txt b/Documentation/devicetree/bindings/remoteproc/wkup_m3_rproc.txt
new file mode 100644
index 000000000000..3a70073797eb
--- /dev/null
+++ b/Documentation/devicetree/bindings/remoteproc/wkup_m3_rproc.txt
@@ -0,0 +1,52 @@
1TI Wakeup M3 Remoteproc Driver
2==============================
3
4The TI AM33xx and AM43xx family of devices use a small Cortex M3 co-processor
5(commonly referred to as Wakeup M3 or CM3) to help with various low power tasks
6that cannot be controlled from the MPU. This CM3 processor requires a firmware
7binary to accomplish this. The wkup_m3 remoteproc driver handles the loading of
8the firmware and booting of the CM3.
9
10Wkup M3 Device Node:
11====================
12A wkup_m3 device node is used to represent the Wakeup M3 processor instance
13within the SoC. It is added as a child node of the parent interconnect bus
14(l4_wkup) through which it is accessible to the MPU.
15
16Required properties:
17--------------------
18- compatible: Should be one of,
19 "ti,am3352-wkup-m3" for AM33xx SoCs
20 "ti,am4372-wkup-m3" for AM43xx SoCs
21- reg: Should contain the address ranges for the two internal
22 memory regions, UMEM and DMEM. The parent node should
23 provide an appropriate ranges property for properly
24 translating these into bus addresses.
25- reg-names: Contains the corresponding names for the two memory
26 regions. These should be named "umem" & "dmem".
27- ti,hwmods: Name of the hwmod associated with the wkupm3 device.
28- ti,pm-firmware: Name of firmware file to be used for loading and
29 booting the wkup_m3 remote processor.
30
31Example:
32--------
33/* AM33xx */
34ocp {
35 l4_wkup: l4_wkup@44c00000 {
36 compatible = "am335-l4-wkup", "simple-bus";
37 ranges = <0 0x44c00000 0x400000>;
38 #address-cells = <1>;
39 #size-cells = <1>;
40
41 wkup_m3: wkup_m3@100000 {
42 compatible = "ti,am3352-wkup-m3";
43 reg = <0x100000 0x4000>,
44 <0x180000 0x2000>;
45 reg-names = "umem", "dmem";
46 ti,hwmods = "wkup_m3";
47 ti,pm-firmware = "am335x-pm-firmware.elf";
48 };
49 };
50
51 ...
52};
diff --git a/Documentation/devicetree/bindings/reset/berlin,reset.txt b/Documentation/devicetree/bindings/reset/berlin,reset.txt
new file mode 100644
index 000000000000..514fee098b4b
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/berlin,reset.txt
@@ -0,0 +1,23 @@
1Marvell Berlin reset controller
2===============================
3
4Please also refer to reset.txt in this directory for common reset
5controller binding usage.
6
7The reset controller node must be a sub-node of the chip controller
8node on Berlin SoCs.
9
10Required properties:
11- compatible: should be "marvell,berlin2-reset"
12- #reset-cells: must be set to 2
13
14Example:
15
16chip_rst: reset {
17 compatible = "marvell,berlin2-reset";
18 #reset-cells = <2>;
19};
20
21&usb_phy0 {
22 resets = <&chip_rst 0x104 12>;
23};
diff --git a/Documentation/devicetree/bindings/reset/brcm,bcm63138-pmb.txt b/Documentation/devicetree/bindings/reset/brcm,bcm63138-pmb.txt
new file mode 100644
index 000000000000..a98872d27872
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/brcm,bcm63138-pmb.txt
@@ -0,0 +1,19 @@
1Broadcom BCM63138 Processor Monitor Bus binding
2===============================================
3
4Please also refer to reset.txt in this directory for common reset
5controller binding usage.
6
7Require properties:
8
9- compatible: must be "brcm,bcm63138-pmb"
10- reg: base register address and size for this bus controller
11- #reset-cells: must be 2 first cell is the address within the bus instance designated
12 by the phandle, and the second is the number of zones for this peripheral
13
14Example:
15 pmb0: reset-controller@4800c0 {
16 compatible = "brcm,bcm63138-pmb";
17 reg = <0x4800c0 0x10>;
18 #reset-cells = <2>;
19 };
diff --git a/Documentation/devicetree/bindings/rtc/abracon,abx80x.txt b/Documentation/devicetree/bindings/rtc/abracon,abx80x.txt
new file mode 100644
index 000000000000..be789685a1c2
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/abracon,abx80x.txt
@@ -0,0 +1,30 @@
1Abracon ABX80X I2C ultra low power RTC/Alarm chip
2
3The Abracon ABX80X family consist of the ab0801, ab0803, ab0804, ab0805, ab1801,
4ab1803, ab1804 and ab1805. The ab0805 is the superset of ab080x and the ab1805
5is the superset of ab180x.
6
7Required properties:
8
9 - "compatible": should one of:
10 "abracon,abx80x"
11 "abracon,ab0801"
12 "abracon,ab0803"
13 "abracon,ab0804"
14 "abracon,ab0805"
15 "abracon,ab1801"
16 "abracon,ab1803"
17 "abracon,ab1804"
18 "abracon,ab1805"
19 Using "abracon,abx80x" will enable chip autodetection.
20 - "reg": I2C bus address of the device
21
22Optional properties:
23
24The abx804 and abx805 have a trickle charger that is able to charge the
25connected battery or supercap. Both the following properties have to be defined
26and valid to enable charging:
27
28 - "abracon,tc-diode": should be "standard" (0.6V) or "schottky" (0.3V)
29 - "abracon,tc-resistor": should be <0>, <3>, <6> or <11>. 0 disables the output
30 resistor, the other values are in ohm.
diff --git a/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt b/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt
index 5c199ee044cb..a8934fe2ab4c 100644
--- a/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt
+++ b/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt
@@ -6,11 +6,11 @@ as well as a clock output of up to 32kHz.
6Required properties: 6Required properties:
7- compatible: should be: "haoyu,hym8563" 7- compatible: should be: "haoyu,hym8563"
8- reg: i2c address 8- reg: i2c address
9- interrupts: rtc alarm/event interrupt
10- #clock-cells: the value should be 0 9- #clock-cells: the value should be 0
11 10
12Optional properties: 11Optional properties:
13- clock-output-names: From common clock binding 12- clock-output-names: From common clock binding
13- interrupts: rtc alarm/event interrupt
14 14
15Example: 15Example:
16 16
diff --git a/Documentation/devicetree/bindings/rtc/rtc-st-lpc.txt b/Documentation/devicetree/bindings/rtc/rtc-st-lpc.txt
new file mode 100644
index 000000000000..73407f502e4e
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc-st-lpc.txt
@@ -0,0 +1,25 @@
1STMicroelectronics Low Power Controller (LPC) - RTC
2===================================================
3
4LPC currently supports Watchdog OR Real Time Clock functionality.
5
6[See: ../watchdog/st_lpc_wdt.txt for Watchdog options]
7
8Required properties
9
10- compatible : Must be one of: "st,stih407-lpc" "st,stih416-lpc"
11 "st,stih415-lpc" "st,stid127-lpc"
12- reg : LPC registers base address + size
13- interrupts : LPC interrupt line number and associated flags
14- clocks : Clock used by LPC device (See: ../clock/clock-bindings.txt)
15- st,lpc-mode : The LPC can run either one of two modes ST_LPC_MODE_RTC [0] or
16 ST_LPC_MODE_WDT [1]. One (and only one) mode must be
17 selected.
18
19Example:
20 lpc@fde05000 {
21 compatible = "st,stih407-lpc";
22 reg = <0xfde05000 0x1000>;
23 clocks = <&clk_s_d3_flexgen CLK_LPC_0>;
24 st,lpc-mode = <ST_LPC_MODE_RTC>;
25 };
diff --git a/Documentation/devicetree/bindings/rtc/s3c-rtc.txt b/Documentation/devicetree/bindings/rtc/s3c-rtc.txt
index ab757b84daa7..ac2fcd6ff4b8 100644
--- a/Documentation/devicetree/bindings/rtc/s3c-rtc.txt
+++ b/Documentation/devicetree/bindings/rtc/s3c-rtc.txt
@@ -6,7 +6,8 @@ Required properties:
6 * "samsung,s3c2416-rtc" - for controllers compatible with s3c2416 rtc. 6 * "samsung,s3c2416-rtc" - for controllers compatible with s3c2416 rtc.
7 * "samsung,s3c2443-rtc" - for controllers compatible with s3c2443 rtc. 7 * "samsung,s3c2443-rtc" - for controllers compatible with s3c2443 rtc.
8 * "samsung,s3c6410-rtc" - for controllers compatible with s3c6410 rtc. 8 * "samsung,s3c6410-rtc" - for controllers compatible with s3c6410 rtc.
9 * "samsung,exynos3250-rtc" - for controllers compatible with exynos3250 rtc. 9 * "samsung,exynos3250-rtc" - (deprecated) for controllers compatible with
10 exynos3250 rtc (use "samsung,s3c6410-rtc").
10- reg: physical base address of the controller and length of memory mapped 11- reg: physical base address of the controller and length of memory mapped
11 region. 12 region.
12- interrupts: Two interrupt numbers to the cpu should be specified. First 13- interrupts: Two interrupt numbers to the cpu should be specified. First
diff --git a/Documentation/devicetree/bindings/serial/arm_sbsa_uart.txt b/Documentation/devicetree/bindings/serial/arm_sbsa_uart.txt
new file mode 100644
index 000000000000..4163e7eb7763
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/arm_sbsa_uart.txt
@@ -0,0 +1,10 @@
1* ARM SBSA defined generic UART
2This UART uses a subset of the PL011 registers and consequently lives
3in the PL011 driver. It's baudrate and other communication parameters
4cannot be adjusted at runtime, so it lacks a clock specifier here.
5
6Required properties:
7- compatible: must be "arm,sbsa-uart"
8- reg: exactly one register range
9- interrupts: exactly one interrupt specifier
10- current-speed: the (fixed) baud rate set by the firmware
diff --git a/Documentation/devicetree/bindings/serial/ingenic,uart.txt b/Documentation/devicetree/bindings/serial/ingenic,uart.txt
new file mode 100644
index 000000000000..c2d3b3abe7d9
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/ingenic,uart.txt
@@ -0,0 +1,22 @@
1* Ingenic SoC UART
2
3Required properties:
4- compatible : "ingenic,jz4740-uart" or "ingenic,jz4780-uart"
5- reg : offset and length of the register set for the device.
6- interrupts : should contain uart interrupt.
7- clocks : phandles to the module & baud clocks.
8- clock-names: tuple listing input clock names.
9 Required elements: "baud", "module"
10
11Example:
12
13uart0: serial@10030000 {
14 compatible = "ingenic,jz4740-uart";
15 reg = <0x10030000 0x100>;
16
17 interrupt-parent = <&intc>;
18 interrupts = <9>;
19
20 clocks = <&ext>, <&cgu JZ4740_CLK_UART0>;
21 clock-names = "baud", "module";
22};
diff --git a/Documentation/devicetree/bindings/serial/mtk-uart.txt b/Documentation/devicetree/bindings/serial/mtk-uart.txt
index 44152261e5c5..8d63f1da07aa 100644
--- a/Documentation/devicetree/bindings/serial/mtk-uart.txt
+++ b/Documentation/devicetree/bindings/serial/mtk-uart.txt
@@ -14,7 +14,14 @@ Required properties:
14 14
15- interrupts: A single interrupt specifier. 15- interrupts: A single interrupt specifier.
16 16
17- clocks: Clock driving the hardware. 17- clocks : Must contain an entry for each entry in clock-names.
18 See ../clocks/clock-bindings.txt for details.
19- clock-names:
20 - "baud": The clock the baudrate is derived from
21 - "bus": The bus clock for register accesses (optional)
22
23For compatibility with older device trees an unnamed clock is used for the
24baud clock if the baudclk does not exist. Do not use this for new designs.
18 25
19Example: 26Example:
20 27
@@ -22,5 +29,6 @@ Example:
22 compatible = "mediatek,mt6589-uart", "mediatek,mt6577-uart"; 29 compatible = "mediatek,mt6589-uart", "mediatek,mt6577-uart";
23 reg = <0x11006000 0x400>; 30 reg = <0x11006000 0x400>;
24 interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_LOW>; 31 interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_LOW>;
25 clocks = <&uart_clk>; 32 clocks = <&uart_clk>, <&bus_clk>;
33 clock-names = "baud", "bus";
26 }; 34 };
diff --git a/Documentation/devicetree/bindings/serial/nxp,lpc1850-uart.txt b/Documentation/devicetree/bindings/serial/nxp,lpc1850-uart.txt
new file mode 100644
index 000000000000..04e23e63ee4f
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/nxp,lpc1850-uart.txt
@@ -0,0 +1,28 @@
1* NXP LPC1850 UART
2
3Required properties:
4- compatible : "nxp,lpc1850-uart", "ns16550a".
5- reg : offset and length of the register set for the device.
6- interrupts : should contain uart interrupt.
7- clocks : phandle to the input clocks.
8- clock-names : required elements: "uartclk", "reg".
9
10Optional properties:
11- dmas : Two or more DMA channel specifiers following the
12 convention outlined in bindings/dma/dma.txt
13- dma-names : Names for the dma channels, if present. There must
14 be at least one channel named "tx" for transmit
15 and named "rx" for receive.
16
17Since it's also possible to also use the of_serial.c driver all
18parameters from 8250.txt also apply but are optional.
19
20Example:
21uart0: serial@40081000 {
22 compatible = "nxp,lpc1850-uart", "ns16550a";
23 reg = <0x40081000 0x1000>;
24 reg-shift = <2>;
25 interrupts = <24>;
26 clocks = <&ccu2 CLK_APB0_UART0>, <&ccu1 CLK_CPU_UART0>;
27 clock-names = "uartclk", "reg";
28};
diff --git a/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.txt b/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.txt
index 246c795668dc..fbfe53635a3a 100644
--- a/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.txt
+++ b/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.txt
@@ -1,4 +1,5 @@
1* NXP SC16IS7xx advanced Universal Asynchronous Receiver-Transmitter (UART) 1* NXP SC16IS7xx advanced Universal Asynchronous Receiver-Transmitter (UART)
2* i2c as bus
2 3
3Required properties: 4Required properties:
4- compatible: Should be one of the following: 5- compatible: Should be one of the following:
@@ -31,3 +32,39 @@ Example:
31 gpio-controller; 32 gpio-controller;
32 #gpio-cells = <2>; 33 #gpio-cells = <2>;
33 }; 34 };
35
36* spi as bus
37
38Required properties:
39- compatible: Should be one of the following:
40 - "nxp,sc16is740" for NXP SC16IS740,
41 - "nxp,sc16is741" for NXP SC16IS741,
42 - "nxp,sc16is750" for NXP SC16IS750,
43 - "nxp,sc16is752" for NXP SC16IS752,
44 - "nxp,sc16is760" for NXP SC16IS760,
45 - "nxp,sc16is762" for NXP SC16IS762.
46- reg: SPI chip select number.
47- interrupt-parent: The phandle for the interrupt controller that
48 services interrupts for this IC.
49- interrupts: Specifies the interrupt source of the parent interrupt
50 controller. The format of the interrupt specifier depends on the
51 parent interrupt controller.
52- clocks: phandle to the IC source clock.
53
54Optional properties:
55- gpio-controller: Marks the device node as a GPIO controller.
56- #gpio-cells: Should be two. The first cell is the GPIO number and
57 the second cell is used to specify the GPIO polarity:
58 0 = active high,
59 1 = active low.
60
61Example:
62 sc16is750: sc16is750@0 {
63 compatible = "nxp,sc16is750";
64 reg = <0>;
65 clocks = <&clk20m>;
66 interrupt-parent = <&gpio3>;
67 interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
68 gpio-controller;
69 #gpio-cells = <2>;
70 };
diff --git a/Documentation/devicetree/bindings/serial/pl011.txt b/Documentation/devicetree/bindings/serial/pl011.txt
index ba3ecb8cb5a1..cbae3d9a0278 100644
--- a/Documentation/devicetree/bindings/serial/pl011.txt
+++ b/Documentation/devicetree/bindings/serial/pl011.txt
@@ -1,7 +1,7 @@
1* ARM AMBA Primecell PL011 serial UART 1* ARM AMBA Primecell PL011 serial UART
2 2
3Required properties: 3Required properties:
4- compatible: must be "arm,primecell", "arm,pl011" 4- compatible: must be "arm,primecell", "arm,pl011", "zte,zx296702-uart"
5- reg: exactly one register range with length 0x1000 5- reg: exactly one register range with length 0x1000
6- interrupts: exactly one interrupt specifier 6- interrupts: exactly one interrupt specifier
7 7
diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
index ae73bb0e9ad9..e84b13a8eda3 100644
--- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
@@ -29,6 +29,7 @@ Required properties:
29 - "renesas,scifa" for generic SCIFA compatible UART. 29 - "renesas,scifa" for generic SCIFA compatible UART.
30 - "renesas,scifb" for generic SCIFB compatible UART. 30 - "renesas,scifb" for generic SCIFB compatible UART.
31 - "renesas,hscif" for generic HSCIF compatible UART. 31 - "renesas,hscif" for generic HSCIF compatible UART.
32 - "renesas,sci" for generic SCI compatible UART.
32 33
33 When compatible with the generic version, nodes must list the 34 When compatible with the generic version, nodes must list the
34 SoC-specific version corresponding to the platform first followed by the 35 SoC-specific version corresponding to the platform first followed by the
@@ -44,6 +45,11 @@ Required properties:
44Note: Each enabled SCIx UART should have an alias correctly numbered in the 45Note: Each enabled SCIx UART should have an alias correctly numbered in the
45"aliases" node. 46"aliases" node.
46 47
48Optional properties:
49 - dmas: Must contain a list of two references to DMA specifiers, one for
50 transmission, and one for reception.
51 - dma-names: Must contain a list of two DMA names, "tx" and "rx".
52
47Example: 53Example:
48 aliases { 54 aliases {
49 serial0 = &scifa0; 55 serial0 = &scifa0;
@@ -56,4 +62,6 @@ Example:
56 interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>; 62 interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>;
57 clocks = <&mstp2_clks R8A7790_CLK_SCIFA0>; 63 clocks = <&mstp2_clks R8A7790_CLK_SCIFA0>;
58 clock-names = "sci_ick"; 64 clock-names = "sci_ick";
65 dmas = <&dmac0 0x21>, <&dmac0 0x22>;
66 dma-names = "tx", "rx";
59 }; 67 };
diff --git a/Documentation/devicetree/bindings/serial/sirf-uart.txt b/Documentation/devicetree/bindings/serial/sirf-uart.txt
index f0c39261c5d4..67e2a0aeb042 100644
--- a/Documentation/devicetree/bindings/serial/sirf-uart.txt
+++ b/Documentation/devicetree/bindings/serial/sirf-uart.txt
@@ -2,8 +2,7 @@
2 2
3Required properties: 3Required properties:
4- compatible : Should be "sirf,prima2-uart", "sirf, prima2-usp-uart", 4- compatible : Should be "sirf,prima2-uart", "sirf, prima2-usp-uart",
5 "sirf,atlas7-uart" or "sirf,atlas7-bt-uart" which means 5 "sirf,atlas7-uart" or "sirf,atlas7-usp-uart".
6 uart located in BT module and used for BT.
7- reg : Offset and length of the register set for the device 6- reg : Offset and length of the register set for the device
8- interrupts : Should contain uart interrupt 7- interrupts : Should contain uart interrupt
9- fifosize : Should define hardware rx/tx fifo size 8- fifosize : Should define hardware rx/tx fifo size
@@ -33,15 +32,3 @@ usp@b0090000 {
33 rts-gpios = <&gpio 15 0>; 32 rts-gpios = <&gpio 15 0>;
34 cts-gpios = <&gpio 46 0>; 33 cts-gpios = <&gpio 46 0>;
35}; 34};
36
37for uart use in BT module,
38uart6: uart@11000000 {
39 cell-index = <6>;
40 compatible = "sirf,atlas7-bt-uart", "sirf,atlas7-uart";
41 reg = <0x11000000 0x1000>;
42 interrupts = <0 100 0>;
43 clocks = <&clks 138>, <&clks 140>, <&clks 141>;
44 clock-names = "uart", "general", "noc";
45 fifosize = <128>;
46 status = "disabled";
47}
diff --git a/Documentation/devicetree/bindings/serial/uniphier-uart.txt b/Documentation/devicetree/bindings/serial/uniphier-uart.txt
new file mode 100644
index 000000000000..0b3892a7a528
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/uniphier-uart.txt
@@ -0,0 +1,23 @@
1UniPhier UART controller
2
3Required properties:
4- compatible: should be "socionext,uniphier-uart".
5- reg: offset and length of the register set for the device.
6- interrupts: a single interrupt specifier.
7- clocks: phandle to the input clock.
8
9Optional properties:
10- fifo-size: the RX/TX FIFO size. Defaults to 64 if not specified.
11
12Example:
13 aliases {
14 serial0 = &serial0;
15 };
16
17 serial0: serial@54006800 {
18 compatible = "socionext,uniphier-uart";
19 reg = <0x54006800 0x40>;
20 interrupts = <0 33 4>;
21 clocks = <&uart_clk>;
22 fifo-size = <64>;
23 };
diff --git a/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt b/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt
index 48c4dae5d6f9..47e46ccbc170 100644
--- a/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt
+++ b/Documentation/devicetree/bindings/soc/fsl/qman-portals.txt
@@ -47,7 +47,7 @@ PROPERTIES
47 47
48 For additional details about the PAMU/LIODN binding(s) see pamu.txt 48 For additional details about the PAMU/LIODN binding(s) see pamu.txt
49 49
50- fsl,qman-channel-id 50- cell-index
51 Usage: Required 51 Usage: Required
52 Value type: <u32> 52 Value type: <u32>
53 Definition: The hardware index of the channel. This can also be 53 Definition: The hardware index of the channel. This can also be
@@ -136,7 +136,7 @@ The example below shows a (P4080) QMan portals container/bus node with two porta
136 reg = <0x4000 0x4000>, <0x101000 0x1000>; 136 reg = <0x4000 0x4000>, <0x101000 0x1000>;
137 interrupts = <106 2 0 0>; 137 interrupts = <106 2 0 0>;
138 fsl,liodn = <3 4>; 138 fsl,liodn = <3 4>;
139 fsl,qman-channel-id = <1>; 139 cell-index = <1>;
140 140
141 fman0 { 141 fman0 {
142 fsl,liodn = <0x22>; 142 fsl,liodn = <0x22>;
diff --git a/Documentation/devicetree/bindings/soc/sunxi/sram.txt b/Documentation/devicetree/bindings/soc/sunxi/sram.txt
new file mode 100644
index 000000000000..067698112f5f
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/sunxi/sram.txt
@@ -0,0 +1,72 @@
1Allwinnner SoC SRAM controllers
2-----------------------------------------------------
3
4The SRAM controller found on most Allwinner devices is represented by
5a regular node for the SRAM controller itself, with sub-nodes
6reprensenting the SRAM handled by the SRAM controller.
7
8Controller Node
9---------------
10
11Required properties:
12- compatible : "allwinner,sun4i-a10-sram-controller"
13- reg : sram controller register offset + length
14
15SRAM nodes
16----------
17
18Each SRAM is described using the mmio-sram bindings documented in
19Documentation/devicetree/bindings/misc/sram.txt
20
21Each SRAM will have SRAM sections that are going to be handled by the
22SRAM controller as subnodes. These sections are represented following
23once again the representation described in the mmio-sram binding.
24
25The valid sections compatible are:
26 - allwinner,sun4i-a10-sram-a3-a4
27 - allwinner,sun4i-a10-sram-d
28
29Devices using SRAM sections
30---------------------------
31
32Some devices need to request to the SRAM controller to map an SRAM for
33their exclusive use.
34
35The relationship between such a device and an SRAM section is
36expressed through the allwinner,sram property, that will take a
37phandle and an argument.
38
39This valid values for this argument are:
40 - 0: CPU
41 - 1: Device
42
43Example
44-------
45sram-controller@01c00000 {
46 compatible = "allwinner,sun4i-a10-sram-controller";
47 reg = <0x01c00000 0x30>;
48 #address-cells = <1>;
49 #size-cells = <1>;
50 ranges;
51
52 sram_a: sram@00000000 {
53 compatible = "mmio-sram";
54 reg = <0x00000000 0xc000>;
55 #address-cells = <1>;
56 #size-cells = <1>;
57 ranges = <0 0x00000000 0xc000>;
58
59 emac_sram: sram-section@8000 {
60 compatible = "allwinner,sun4i-a10-sram-a3-a4";
61 reg = <0x8000 0x4000>;
62 status = "disabled";
63 };
64 };
65};
66
67emac: ethernet@01c0b000 {
68 compatible = "allwinner,sun4i-a10-emac";
69 ...
70
71 allwinner,sram = <&emac_sram 1>;
72};
diff --git a/Documentation/devicetree/bindings/sound/adi,adau1701.txt b/Documentation/devicetree/bindings/sound/adi,adau1701.txt
index 547a49b56a62..0d1128ce2ea7 100644
--- a/Documentation/devicetree/bindings/sound/adi,adau1701.txt
+++ b/Documentation/devicetree/bindings/sound/adi,adau1701.txt
@@ -20,6 +20,8 @@ Optional properties:
20 pin configurations as described in the datasheet, 20 pin configurations as described in the datasheet,
21 table 53. Note that the value of this property has 21 table 53. Note that the value of this property has
22 to be prefixed with '/bits/ 8'. 22 to be prefixed with '/bits/ 8'.
23 - avdd-supply: Power supply for AVDD, providing 3.3V
24 - dvdd-supply: Power supply for DVDD, providing 3.3V
23 25
24Examples: 26Examples:
25 27
@@ -28,6 +30,8 @@ Examples:
28 compatible = "adi,adau1701"; 30 compatible = "adi,adau1701";
29 reg = <0x34>; 31 reg = <0x34>;
30 reset-gpio = <&gpio 23 0>; 32 reset-gpio = <&gpio 23 0>;
33 avdd-supply = <&vdd_3v3_reg>;
34 dvdd-supply = <&vdd_3v3_reg>;
31 adi,pll-mode-gpios = <&gpio 24 0 &gpio 25 0>; 35 adi,pll-mode-gpios = <&gpio 24 0 &gpio 25 0>;
32 adi,pin-config = /bits/ 8 <0x4 0x7 0x5 0x5 0x4 0x4 36 adi,pin-config = /bits/ 8 <0x4 0x7 0x5 0x5 0x4 0x4
33 0x4 0x4 0x4 0x4 0x4 0x4>; 37 0x4 0x4 0x4 0x4 0x4 0x4>;
diff --git a/Documentation/devicetree/bindings/sound/bt-sco.txt b/Documentation/devicetree/bindings/sound/bt-sco.txt
new file mode 100644
index 000000000000..29b8e5d40203
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/bt-sco.txt
@@ -0,0 +1,13 @@
1Bluetooth-SCO audio CODEC
2
3This device support generic Bluetooth SCO link.
4
5Required properties:
6
7 - compatible : "delta,dfbmcs320"
8
9Example:
10
11codec: bt_sco {
12 compatible = "delta,dfbmcs320";
13};
diff --git a/Documentation/devicetree/bindings/sound/gtm601.txt b/Documentation/devicetree/bindings/sound/gtm601.txt
new file mode 100644
index 000000000000..5efc8c068de0
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/gtm601.txt
@@ -0,0 +1,13 @@
1GTM601 UMTS modem audio interface CODEC
2
3This device has no configuration interface. Sample rate is fixed - 8kHz.
4
5Required properties:
6
7 - compatible : "option,gtm601"
8
9Example:
10
11codec: gtm601_codec {
12 compatible = "option,gtm601";
13};
diff --git a/Documentation/devicetree/bindings/sound/max98090.txt b/Documentation/devicetree/bindings/sound/max98090.txt
index aa802a274520..4e3be6682c98 100644
--- a/Documentation/devicetree/bindings/sound/max98090.txt
+++ b/Documentation/devicetree/bindings/sound/max98090.txt
@@ -18,6 +18,12 @@ Optional properties:
18 18
19- maxim,dmic-freq: Frequency at which to clock DMIC 19- maxim,dmic-freq: Frequency at which to clock DMIC
20 20
21- maxim,micbias: Micbias voltage applies to the analog mic, valid voltages value are:
22 0 - 2.2v
23 1 - 2.55v
24 2 - 2.4v
25 3 - 2.8v
26
21Pins on the device (for linking into audio routes): 27Pins on the device (for linking into audio routes):
22 28
23 * MIC1 29 * MIC1
diff --git a/Documentation/devicetree/bindings/sound/mt8173-max98090.txt b/Documentation/devicetree/bindings/sound/mt8173-max98090.txt
new file mode 100644
index 000000000000..829bd26d17f8
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/mt8173-max98090.txt
@@ -0,0 +1,13 @@
1MT8173 with MAX98090 CODEC
2
3Required properties:
4- compatible : "mediatek,mt8173-max98090"
5- mediatek,audio-codec: the phandle of the MAX98090 audio codec
6
7Example:
8
9 sound {
10 compatible = "mediatek,mt8173-max98090";
11 mediatek,audio-codec = <&max98090>;
12 };
13
diff --git a/Documentation/devicetree/bindings/sound/mt8173-rt5650-rt5676.txt b/Documentation/devicetree/bindings/sound/mt8173-rt5650-rt5676.txt
new file mode 100644
index 000000000000..61e98c976bd4
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/mt8173-rt5650-rt5676.txt
@@ -0,0 +1,13 @@
1MT8173 with RT5650 RT5676 CODECS
2
3Required properties:
4- compatible : "mediatek,mt8173-rt5650-rt5676"
5- mediatek,audio-codec: the phandles of rt5650 and rt5676 codecs
6
7Example:
8
9 sound {
10 compatible = "mediatek,mt8173-rt5650-rt5676";
11 mediatek,audio-codec = <&rt5650 &rt5676>;
12 };
13
diff --git a/Documentation/devicetree/bindings/sound/mtk-afe-pcm.txt b/Documentation/devicetree/bindings/sound/mtk-afe-pcm.txt
new file mode 100644
index 000000000000..e302c7f43b95
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/mtk-afe-pcm.txt
@@ -0,0 +1,45 @@
1Mediatek AFE PCM controller
2
3Required properties:
4- compatible = "mediatek,mt8173-afe-pcm";
5- reg: register location and size
6- interrupts: Should contain AFE interrupt
7- clock-names: should have these clock names:
8 "infra_sys_audio_clk",
9 "top_pdn_audio",
10 "top_pdn_aud_intbus",
11 "bck0",
12 "bck1",
13 "i2s0_m",
14 "i2s1_m",
15 "i2s2_m",
16 "i2s3_m",
17 "i2s3_b";
18
19Example:
20
21 afe: mt8173-afe-pcm@11220000 {
22 compatible = "mediatek,mt8173-afe-pcm";
23 reg = <0 0x11220000 0 0x1000>;
24 interrupts = <GIC_SPI 134 IRQ_TYPE_EDGE_FALLING>;
25 clocks = <&infracfg INFRA_AUDIO>,
26 <&topckgen TOP_AUDIO_SEL>,
27 <&topckgen TOP_AUD_INTBUS_SEL>,
28 <&topckgen TOP_APLL1_DIV0>,
29 <&topckgen TOP_APLL2_DIV0>,
30 <&topckgen TOP_I2S0_M_CK_SEL>,
31 <&topckgen TOP_I2S1_M_CK_SEL>,
32 <&topckgen TOP_I2S2_M_CK_SEL>,
33 <&topckgen TOP_I2S3_M_CK_SEL>,
34 <&topckgen TOP_I2S3_B_CK_SEL>;
35 clock-names = "infra_sys_audio_clk",
36 "top_pdn_audio",
37 "top_pdn_aud_intbus",
38 "bck0",
39 "bck1",
40 "i2s0_m",
41 "i2s1_m",
42 "i2s2_m",
43 "i2s3_m",
44 "i2s3_b";
45 };
diff --git a/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt
new file mode 100644
index 000000000000..48129368d4d9
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qcom,apq8016-sbc.txt
@@ -0,0 +1,60 @@
1* Qualcomm Technologies APQ8016 SBC ASoC machine driver
2
3This node models the Qualcomm Technologies APQ8016 SBC ASoC machine driver
4
5Required properties:
6
7- compatible : "qcom,apq8016-sbc-sndcard"
8
9- pinctrl-N : One property must exist for each entry in
10 pinctrl-names. See ../pinctrl/pinctrl-bindings.txt
11 for details of the property values.
12- pinctrl-names : Must contain a "default" entry.
13- reg : Must contain an address for each entry in reg-names.
14- reg-names : A list which must include the following entries:
15 * "mic-iomux"
16 * "spkr-iomux"
17- qcom,model : Name of the sound card.
18
19Dai-link subnode properties and subnodes:
20
21Required dai-link subnodes:
22
23- cpu : CPU sub-node
24- codec : CODEC sub-node
25
26Required CPU/CODEC subnodes properties:
27
28-link-name : Name of the dai link.
29-sound-dai : phandle and port of CPU/CODEC
30-capture-dai : phandle and port of CPU/CODEC
31
32Example:
33
34sound: sound {
35 compatible = "qcom,apq8016-sbc-sndcard";
36 reg = <0x07702000 0x4>, <0x07702004 0x4>;
37 reg-names = "mic-iomux", "spkr-iomux";
38 qcom,model = "DB410c";
39
40 /* I2S - Internal codec */
41 internal-dai-link@0 {
42 cpu { /* PRIMARY */
43 sound-dai = <&lpass MI2S_PRIMARY>;
44 };
45 codec {
46 sound-dai = <&wcd_codec 0>;
47 };
48 };
49
50 /* External Primary or External Secondary -ADV7533 HDMI */
51 external-dai-link@0 {
52 link-name = "ADV7533";
53 cpu { /* QUAT */
54 sound-dai = <&lpass MI2S_QUATERNARY>;
55 };
56 codec {
57 sound-dai = <&adv_bridge 0>;
58 };
59 };
60};
diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-cpu.txt b/Documentation/devicetree/bindings/sound/qcom,lpass-cpu.txt
index e00732dac939..21c648328be9 100644
--- a/Documentation/devicetree/bindings/sound/qcom,lpass-cpu.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,lpass-cpu.txt
@@ -4,12 +4,21 @@ This node models the Qualcomm Technologies Low-Power Audio SubSystem (LPASS).
4 4
5Required properties: 5Required properties:
6 6
7- compatible : "qcom,lpass-cpu" 7- compatible : "qcom,lpass-cpu" or "qcom,apq8016-lpass-cpu"
8- clocks : Must contain an entry for each entry in clock-names. 8- clocks : Must contain an entry for each entry in clock-names.
9- clock-names : A list which must include the following entries: 9- clock-names : A list which must include the following entries:
10 * "ahbix-clk" 10 * "ahbix-clk"
11 * "mi2s-osr-clk" 11 * "mi2s-osr-clk"
12 * "mi2s-bit-clk" 12 * "mi2s-bit-clk"
13 : required clocks for "qcom,lpass-cpu-apq8016"
14 * "ahbix-clk"
15 * "mi2s-bit-clk0"
16 * "mi2s-bit-clk1"
17 * "mi2s-bit-clk2"
18 * "mi2s-bit-clk3"
19 * "pcnoc-mport-clk"
20 * "pcnoc-sway-clk"
21
13- interrupts : Must contain an entry for each entry in 22- interrupts : Must contain an entry for each entry in
14 interrupt-names. 23 interrupt-names.
15- interrupt-names : A list which must include the following entries: 24- interrupt-names : A list which must include the following entries:
@@ -22,6 +31,8 @@ Required properties:
22- reg-names : A list which must include the following entries: 31- reg-names : A list which must include the following entries:
23 * "lpass-lpaif" 32 * "lpass-lpaif"
24 33
34
35
25Optional properties: 36Optional properties:
26 37
27- qcom,adsp : Phandle for the audio DSP node 38- qcom,adsp : Phandle for the audio DSP node
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
index f316ce1f214a..b6b3a786855f 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
@@ -5,6 +5,7 @@ Required properties:
5 "renesas,rcar_sound-gen1" if generation1, and 5 "renesas,rcar_sound-gen1" if generation1, and
6 "renesas,rcar_sound-gen2" if generation2 6 "renesas,rcar_sound-gen2" if generation2
7 Examples with soctypes are: 7 Examples with soctypes are:
8 - "renesas,rcar_sound-r8a7778" (R-Car M1A)
8 - "renesas,rcar_sound-r8a7790" (R-Car H2) 9 - "renesas,rcar_sound-r8a7790" (R-Car H2)
9 - "renesas,rcar_sound-r8a7791" (R-Car M2-W) 10 - "renesas,rcar_sound-r8a7791" (R-Car M2-W)
10- reg : Should contain the register physical address. 11- reg : Should contain the register physical address.
@@ -47,7 +48,7 @@ DAI subnode properties:
47 48
48Example: 49Example:
49 50
50rcar_sound: rcar_sound@ec500000 { 51rcar_sound: sound@ec500000 {
51 #sound-dai-cells = <1>; 52 #sound-dai-cells = <1>;
52 compatible = "renesas,rcar_sound-r8a7791", "renesas,rcar_sound-gen2"; 53 compatible = "renesas,rcar_sound-r8a7791", "renesas,rcar_sound-gen2";
53 reg = <0 0xec500000 0 0x1000>, /* SCU */ 54 reg = <0 0xec500000 0 0x1000>, /* SCU */
diff --git a/Documentation/devicetree/bindings/sound/rt5645.txt b/Documentation/devicetree/bindings/sound/rt5645.txt
new file mode 100644
index 000000000000..7cee1f518f59
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/rt5645.txt
@@ -0,0 +1,72 @@
1RT5650/RT5645 audio CODEC
2
3This device supports I2C only.
4
5Required properties:
6
7- compatible : One of "realtek,rt5645" or "realtek,rt5650".
8
9- reg : The I2C address of the device.
10
11- interrupts : The CODEC's interrupt output.
12
13Optional properties:
14
15- hp-detect-gpios:
16 a GPIO spec for the external headphone detect pin. If jd-mode = 0,
17 we will get the JD status by getting the value of hp-detect-gpios.
18
19- realtek,in2-differential
20 Boolean. Indicate MIC2 input are differential, rather than single-ended.
21
22- realtek,dmic1-data-pin
23 0: dmic1 is not used
24 1: using IN2P pin as dmic1 data pin
25 2: using GPIO6 pin as dmic1 data pin
26 3: using GPIO10 pin as dmic1 data pin
27 4: using GPIO12 pin as dmic1 data pin
28
29- realtek,dmic2-data-pin
30 0: dmic2 is not used
31 1: using IN2N pin as dmic2 data pin
32 2: using GPIO5 pin as dmic2 data pin
33 3: using GPIO11 pin as dmic2 data pin
34
35-- realtek,jd-mode : The JD mode of rt5645/rt5650
36 0 : rt5645/rt5650 JD function is not used
37 1 : Mode-0 (VDD=3.3V), two port jack detection
38 2 : Mode-1 (VDD=3.3V), one port jack detection
39 3 : Mode-2 (VDD=1.8V), one port jack detection
40
41Pins on the device (for linking into audio routes) for RT5645/RT5650:
42
43 * DMIC L1
44 * DMIC R1
45 * DMIC L2
46 * DMIC R2
47 * IN1P
48 * IN1N
49 * IN2P
50 * IN2N
51 * Haptic Generator
52 * HPOL
53 * HPOR
54 * LOUTL
55 * LOUTR
56 * PDM1L
57 * PDM1R
58 * SPOL
59 * SPOR
60
61Example:
62
63codec: rt5650@1a {
64 compatible = "realtek,rt5650";
65 reg = <0x1a>;
66 hp-detect-gpios = <&gpio 19 0>;
67 interrupt-parent = <&gpio>;
68 interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
69 realtek,dmic-en = "true";
70 realtek,en-jd-func = "true";
71 realtek,jd-mode = <3>;
72}; \ No newline at end of file
diff --git a/Documentation/devicetree/bindings/sound/rt5677.txt b/Documentation/devicetree/bindings/sound/rt5677.txt
index 740ff771aa8b..f07078997f87 100644
--- a/Documentation/devicetree/bindings/sound/rt5677.txt
+++ b/Documentation/devicetree/bindings/sound/rt5677.txt
@@ -18,6 +18,7 @@ Required properties:
18Optional properties: 18Optional properties:
19 19
20- realtek,pow-ldo2-gpio : The GPIO that controls the CODEC's POW_LDO2 pin. 20- realtek,pow-ldo2-gpio : The GPIO that controls the CODEC's POW_LDO2 pin.
21- realtek,reset-gpio : The GPIO that controls the CODEC's RESET pin.
21 22
22- realtek,in1-differential 23- realtek,in1-differential
23- realtek,in2-differential 24- realtek,in2-differential
@@ -70,6 +71,7 @@ rt5677 {
70 71
71 realtek,pow-ldo2-gpio = 72 realtek,pow-ldo2-gpio =
72 <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>; 73 <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
74 realtek,reset-gpio = <&gpio TEGRA_GPIO(BB, 3) GPIO_ACTIVE_LOW>;
73 realtek,in1-differential = "true"; 75 realtek,in1-differential = "true";
74 realtek,gpio-config = /bits/ 8 <0 0 0 0 0 2>; /* pull up GPIO6 */ 76 realtek,gpio-config = /bits/ 8 <0 0 0 0 0 2>; /* pull up GPIO6 */
75 realtek,jd2-gpio = <3>; /* Enables Jack detection for GPIO6 */ 77 realtek,jd2-gpio = <3>; /* Enables Jack detection for GPIO6 */
diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
index 73bf314f7240..cf3979eb3578 100644
--- a/Documentation/devicetree/bindings/sound/simple-card.txt
+++ b/Documentation/devicetree/bindings/sound/simple-card.txt
@@ -16,7 +16,8 @@ Optional properties:
16 connection's sink, the second being the connection's 16 connection's sink, the second being the connection's
17 source. 17 source.
18- simple-audio-card,mclk-fs : Multiplication factor between stream rate and codec 18- simple-audio-card,mclk-fs : Multiplication factor between stream rate and codec
19 mclk. 19 mclk. When defined, mclk-fs property defined in
20 dai-link sub nodes are ignored.
20- simple-audio-card,hp-det-gpio : Reference to GPIO that signals when 21- simple-audio-card,hp-det-gpio : Reference to GPIO that signals when
21 headphones are attached. 22 headphones are attached.
22- simple-audio-card,mic-det-gpio : Reference to GPIO that signals when 23- simple-audio-card,mic-det-gpio : Reference to GPIO that signals when
@@ -55,6 +56,9 @@ Optional dai-link subnode properties:
55 dai-link uses bit clock inversion. 56 dai-link uses bit clock inversion.
56- frame-inversion : bool property. Add this if the 57- frame-inversion : bool property. Add this if the
57 dai-link uses frame clock inversion. 58 dai-link uses frame clock inversion.
59- mclk-fs : Multiplication factor between stream
60 rate and codec mclk, applied only for
61 the dai-link.
58 62
59For backward compatibility the frame-master and bitclock-master 63For backward compatibility the frame-master and bitclock-master
60properties can be used as booleans in codec subnode to indicate if the 64properties can be used as booleans in codec subnode to indicate if the
diff --git a/Documentation/devicetree/bindings/sound/tas2552.txt b/Documentation/devicetree/bindings/sound/tas2552.txt
index 55e2a0af5645..c49992c0b62a 100644
--- a/Documentation/devicetree/bindings/sound/tas2552.txt
+++ b/Documentation/devicetree/bindings/sound/tas2552.txt
@@ -14,6 +14,12 @@ Required properties:
14Optional properties: 14Optional properties:
15 - enable-gpio - gpio pin to enable/disable the device 15 - enable-gpio - gpio pin to enable/disable the device
16 16
17tas2552 can receive it's reference clock via MCLK, BCLK, IVCLKIN pin or use the
18internal 1.8MHz. This CLKIN is used by the PLL. In addition to PLL, the PDM
19reference clock is also selectable: PLL, IVCLKIN, BCLK or MCLK.
20For system integration the dt-bindings/sound/tas2552.h header file provides
21defined values to selct and configure the PLL and PDM reference clocks.
22
17Example: 23Example:
18 24
19tas2552: tas2552@41 { 25tas2552: tas2552@41 {
diff --git a/Documentation/devicetree/bindings/sound/tas571x.txt b/Documentation/devicetree/bindings/sound/tas571x.txt
new file mode 100644
index 000000000000..0ac31d8d5ac4
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/tas571x.txt
@@ -0,0 +1,41 @@
1Texas Instruments TAS5711/TAS5717/TAS5719 stereo power amplifiers
2
3The codec is controlled through an I2C interface. It also has two other
4signals that can be wired up to GPIOs: reset (strongly recommended), and
5powerdown (optional).
6
7Required properties:
8
9- compatible: "ti,tas5711", "ti,tas5717", or "ti,tas5719"
10- reg: The I2C address of the device
11- #sound-dai-cells: must be equal to 0
12
13Optional properties:
14
15- reset-gpios: GPIO specifier for the TAS571x's active low reset line
16- pdn-gpios: GPIO specifier for the TAS571x's active low powerdown line
17- clocks: clock phandle for the MCLK input
18- clock-names: should be "mclk"
19- AVDD-supply: regulator phandle for the AVDD supply (all chips)
20- DVDD-supply: regulator phandle for the DVDD supply (all chips)
21- HPVDD-supply: regulator phandle for the HPVDD supply (5717/5719)
22- PVDD_AB-supply: regulator phandle for the PVDD_AB supply (5717/5719)
23- PVDD_CD-supply: regulator phandle for the PVDD_CD supply (5717/5719)
24- PVDD_A-supply: regulator phandle for the PVDD_A supply (5711)
25- PVDD_B-supply: regulator phandle for the PVDD_B supply (5711)
26- PVDD_C-supply: regulator phandle for the PVDD_C supply (5711)
27- PVDD_D-supply: regulator phandle for the PVDD_D supply (5711)
28
29Example:
30
31 tas5717: audio-codec@2a {
32 compatible = "ti,tas5717";
33 reg = <0x2a>;
34 #sound-dai-cells = <0>;
35
36 reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
37 pdn-gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
38
39 clocks = <&clk_core CLK_I2S>;
40 clock-names = "mclk";
41 };
diff --git a/Documentation/devicetree/bindings/sound/wm8741.txt b/Documentation/devicetree/bindings/sound/wm8741.txt
index 74bda58c1bcf..a13315408719 100644
--- a/Documentation/devicetree/bindings/sound/wm8741.txt
+++ b/Documentation/devicetree/bindings/sound/wm8741.txt
@@ -10,9 +10,20 @@ Required properties:
10 - reg : the I2C address of the device for I2C, the chip select 10 - reg : the I2C address of the device for I2C, the chip select
11 number for SPI. 11 number for SPI.
12 12
13Optional properties:
14
15 - diff-mode: Differential output mode configuration. Default value for field
16 DIFF in register R8 (MODE_CONTROL_2). If absent, the default is 0, shall be:
17 0 = stereo
18 1 = mono left
19 2 = stereo reversed
20 3 = mono right
21
13Example: 22Example:
14 23
15codec: wm8741@1a { 24codec: wm8741@1a {
16 compatible = "wlf,wm8741"; 25 compatible = "wlf,wm8741";
17 reg = <0x1a>; 26 reg = <0x1a>;
27
28 diff-mode = <3>;
18}; 29};
diff --git a/Documentation/devicetree/bindings/sound/zte,zx-i2s.txt b/Documentation/devicetree/bindings/sound/zte,zx-i2s.txt
new file mode 100644
index 000000000000..7e5aa6f6b5a1
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/zte,zx-i2s.txt
@@ -0,0 +1,44 @@
1ZTE ZX296702 I2S controller
2
3Required properties:
4 - compatible : Must be "zte,zx296702-i2s"
5 - reg : Must contain I2S core's registers location and length
6 - clocks : Pairs of phandle and specifier referencing the controller's clocks.
7 - clock-names: "tx" for the clock to the I2S interface.
8 - dmas: Pairs of phandle and specifier for the DMA channel that is used by
9 the core. The core expects two dma channels for transmit.
10 - dma-names : Must be "tx" and "rx"
11
12For more details on the 'dma', 'dma-names', 'clock' and 'clock-names' properties
13please check:
14 * resource-names.txt
15 * clock/clock-bindings.txt
16 * dma/dma.txt
17
18Example:
19 i2s0: i2s0@0b005000 {
20 #sound-dai-cells = <0>;
21 compatible = "zte,zx296702-i2s";
22 reg = <0x0b005000 0x1000>;
23 clocks = <&lsp0clk ZX296702_I2S0_DIV>;
24 clock-names = "tx";
25 interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
26 dmas = <&dma 5>, <&dma 6>;
27 dma-names = "tx", "rx";
28 status = "okay";
29 };
30
31 sound {
32 compatible = "simple-audio-card";
33 simple-audio-card,name = "zx296702_snd";
34 simple-audio-card,format = "left_j";
35 simple-audio-card,bitclock-master = <&sndcodec>;
36 simple-audio-card,frame-master = <&sndcodec>;
37 sndcpu: simple-audio-card,cpu {
38 sound-dai = <&i2s0>;
39 };
40
41 sndcodec: simple-audio-card,codec {
42 sound-dai = <&acodec>;
43 };
44 };
diff --git a/Documentation/devicetree/bindings/sound/zte,zx-spdif.txt b/Documentation/devicetree/bindings/sound/zte,zx-spdif.txt
new file mode 100644
index 000000000000..989544ea6eb5
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/zte,zx-spdif.txt
@@ -0,0 +1,28 @@
1ZTE ZX296702 SPDIF controller
2
3Required properties:
4 - compatible : Must be "zte,zx296702-spdif"
5 - reg : Must contain SPDIF core's registers location and length
6 - clocks : Pairs of phandle and specifier referencing the controller's clocks.
7 - clock-names: "tx" for the clock to the SPDIF interface.
8 - dmas: Pairs of phandle and specifier for the DMA channel that is used by
9 the core. The core expects one dma channel for transmit.
10 - dma-names : Must be "tx"
11
12For more details on the 'dma', 'dma-names', 'clock' and 'clock-names' properties
13please check:
14 * resource-names.txt
15 * clock/clock-bindings.txt
16 * dma/dma.txt
17
18Example:
19 spdif0: spdif0@0b004000 {
20 compatible = "zte,zx296702-spdif";
21 reg = <0x0b004000 0x1000>;
22 clocks = <&lsp0clk ZX296702_SPDIF0_DIV>;
23 clock-names = "tx";
24 interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
25 dmas = <&dma 4>;
26 dma-names = "tx";
27 status = "okay";
28 };
diff --git a/Documentation/devicetree/bindings/spi/sh-msiof.txt b/Documentation/devicetree/bindings/spi/sh-msiof.txt
index 4c388bb2f0a2..8f771441be60 100644
--- a/Documentation/devicetree/bindings/spi/sh-msiof.txt
+++ b/Documentation/devicetree/bindings/spi/sh-msiof.txt
@@ -60,7 +60,7 @@ Example:
60 60
61 msiof0: spi@e6e20000 { 61 msiof0: spi@e6e20000 {
62 compatible = "renesas,msiof-r8a7791"; 62 compatible = "renesas,msiof-r8a7791";
63 reg = <0 0xe6e20000 0 0x0064>, <0 0xe7e20000 0 0x0064>; 63 reg = <0 0xe6e20000 0 0x0064>;
64 interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>; 64 interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
65 clocks = <&mstp0_clks R8A7791_CLK_MSIOF0>; 65 clocks = <&mstp0_clks R8A7791_CLK_MSIOF0>;
66 dmas = <&dmac0 0x51>, <&dmac0 0x52>; 66 dmas = <&dmac0 0x51>, <&dmac0 0x52>;
diff --git a/Documentation/devicetree/bindings/spi/spi-ath79.txt b/Documentation/devicetree/bindings/spi/spi-ath79.txt
new file mode 100644
index 000000000000..f1ad9c367532
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-ath79.txt
@@ -0,0 +1,24 @@
1Binding for Qualcomm Atheros AR7xxx/AR9xxx SPI controller
2
3Required properties:
4- compatible: has to be "qca,<soc-type>-spi", "qca,ar7100-spi" as fallback.
5- reg: Base address and size of the controllers memory area
6- clocks: phandle to the AHB clock.
7- clock-names: has to be "ahb".
8- #address-cells: <1>, as required by generic SPI binding.
9- #size-cells: <0>, also as required by generic SPI binding.
10
11Child nodes as per the generic SPI binding.
12
13Example:
14
15 spi@1F000000 {
16 compatible = "qca,ar9132-spi", "qca,ar7100-spi";
17 reg = <0x1F000000 0x10>;
18
19 clocks = <&pll 2>;
20 clock-names = "ahb";
21
22 #address-cells = <1>;
23 #size-cells = <0>;
24 };
diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
index 70af78a9185e..fa77f874e321 100644
--- a/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
+++ b/Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
@@ -1,7 +1,7 @@
1ARM Freescale DSPI controller 1ARM Freescale DSPI controller
2 2
3Required properties: 3Required properties:
4- compatible : "fsl,vf610-dspi" 4- compatible : "fsl,vf610-dspi", "fsl,ls1021a-v1.0-dspi", "fsl,ls2085a-dspi"
5- reg : Offset and length of the register set for the device 5- reg : Offset and length of the register set for the device
6- interrupts : Should contain SPI controller interrupt 6- interrupts : Should contain SPI controller interrupt
7- clocks: from common clock binding: handle to dspi clock. 7- clocks: from common clock binding: handle to dspi clock.
diff --git a/Documentation/devicetree/bindings/spi/spi-orion.txt b/Documentation/devicetree/bindings/spi/spi-orion.txt
index 50c3a3de61c1..98bc69815eb3 100644
--- a/Documentation/devicetree/bindings/spi/spi-orion.txt
+++ b/Documentation/devicetree/bindings/spi/spi-orion.txt
@@ -1,7 +1,13 @@
1Marvell Orion SPI device 1Marvell Orion SPI device
2 2
3Required properties: 3Required properties:
4- compatible : should be "marvell,orion-spi" or "marvell,armada-370-spi". 4- compatible : should be on of the following:
5 - "marvell,orion-spi" for the Orion, mv78x00, Kirkwood and Dove SoCs
6 - "marvell,armada-370-spi", for the Armada 370 SoCs
7 - "marvell,armada-375-spi", for the Armada 375 SoCs
8 - "marvell,armada-380-spi", for the Armada 38x SoCs
9 - "marvell,armada-390-spi", for the Armada 39x SoCs
10 - "marvell,armada-xp-spi", for the Armada XP SoCs
5- reg : offset and length of the register set for the device 11- reg : offset and length of the register set for the device
6- cell-index : Which of multiple SPI controllers is this. 12- cell-index : Which of multiple SPI controllers is this.
7Optional properties: 13Optional properties:
diff --git a/Documentation/devicetree/bindings/spi/spi-sirf.txt b/Documentation/devicetree/bindings/spi/spi-sirf.txt
index 4c7adb8f777c..ddd78ff68fae 100644
--- a/Documentation/devicetree/bindings/spi/spi-sirf.txt
+++ b/Documentation/devicetree/bindings/spi/spi-sirf.txt
@@ -1,7 +1,8 @@
1* CSR SiRFprimaII Serial Peripheral Interface 1* CSR SiRFprimaII Serial Peripheral Interface
2 2
3Required properties: 3Required properties:
4- compatible : Should be "sirf,prima2-spi" 4- compatible : Should be "sirf,prima2-spi", "sirf,prima2-usp"
5 or "sirf,atlas7-usp"
5- reg : Offset and length of the register set for the device 6- reg : Offset and length of the register set for the device
6- interrupts : Should contain SPI interrupt 7- interrupts : Should contain SPI interrupt
7- resets: phandle to the reset controller asserting this device in 8- resets: phandle to the reset controller asserting this device in
diff --git a/Documentation/devicetree/bindings/spi/spi-zynqmp-qspi.txt b/Documentation/devicetree/bindings/spi/spi-zynqmp-qspi.txt
new file mode 100644
index 000000000000..c8f50e5cf70b
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-zynqmp-qspi.txt
@@ -0,0 +1,26 @@
1Xilinx Zynq UltraScale+ MPSoC GQSPI controller Device Tree Bindings
2-------------------------------------------------------------------
3
4Required properties:
5- compatible : Should be "xlnx,zynqmp-qspi-1.0".
6- reg : Physical base address and size of GQSPI 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
17Example:
18 qspi: spi@ff0f0000 {
19 compatible = "xlnx,zynqmp-qspi-1.0";
20 clock-names = "ref_clk", "pclk";
21 clocks = <&misc_clk &misc_clk>;
22 interrupts = <0 15 4>;
23 interrupt-parent = <&gic>;
24 num-cs = <1>;
25 reg = <0x0 0xff0f0000 0x1000>,<0x0 0xc0000000 0x8000000>;
26 };
diff --git a/Documentation/devicetree/bindings/spi/spi_atmel.txt b/Documentation/devicetree/bindings/spi/spi_atmel.txt
index 4f8184d069cb..fb588b3e6a9a 100644
--- a/Documentation/devicetree/bindings/spi/spi_atmel.txt
+++ b/Documentation/devicetree/bindings/spi/spi_atmel.txt
@@ -4,11 +4,16 @@ Required properties:
4- compatible : should be "atmel,at91rm9200-spi". 4- compatible : should be "atmel,at91rm9200-spi".
5- reg: Address and length of the register set for the device 5- reg: Address and length of the register set for the device
6- interrupts: Should contain spi interrupt 6- interrupts: Should contain spi interrupt
7- cs-gpios: chipselects 7- cs-gpios: chipselects (optional for SPI controller version >= 2 with the
8 Chip Select Active After Transfer feature).
8- clock-names: tuple listing input clock names. 9- clock-names: tuple listing input clock names.
9 Required elements: "spi_clk" 10 Required elements: "spi_clk"
10- clocks: phandles to input clocks. 11- clocks: phandles to input clocks.
11 12
13Optional properties:
14- atmel,fifo-size: maximum number of data the RX and TX FIFOs can store for FIFO
15 capable SPI controllers.
16
12Example: 17Example:
13 18
14spi1: spi@fffcc000 { 19spi1: spi@fffcc000 {
@@ -20,6 +25,7 @@ spi1: spi@fffcc000 {
20 clocks = <&spi1_clk>; 25 clocks = <&spi1_clk>;
21 clock-names = "spi_clk"; 26 clock-names = "spi_clk";
22 cs-gpios = <&pioB 3 0>; 27 cs-gpios = <&pioB 3 0>;
28 atmel,fifo-size = <32>;
23 status = "okay"; 29 status = "okay";
24 30
25 mmc-slot@0 { 31 mmc-slot@0 {
diff --git a/Documentation/devicetree/bindings/spi/spi_pl022.txt b/Documentation/devicetree/bindings/spi/spi_pl022.txt
index 22ed6797216d..4d1673ca8cf8 100644
--- a/Documentation/devicetree/bindings/spi/spi_pl022.txt
+++ b/Documentation/devicetree/bindings/spi/spi_pl022.txt
@@ -4,9 +4,9 @@ Required properties:
4- compatible : "arm,pl022", "arm,primecell" 4- compatible : "arm,pl022", "arm,primecell"
5- reg : Offset and length of the register set for the device 5- reg : Offset and length of the register set for the device
6- interrupts : Should contain SPI controller interrupt 6- interrupts : Should contain SPI controller interrupt
7- num-cs : total number of chipselects
7 8
8Optional properties: 9Optional properties:
9- num-cs : total number of chipselects
10- cs-gpios : should specify GPIOs used for chipselects. 10- cs-gpios : should specify GPIOs used for chipselects.
11 The gpios will be referred to as reg = <index> in the SPI child nodes. 11 The gpios will be referred to as reg = <index> in the SPI child nodes.
12 If unspecified, a single SPI device without a chip select can be used. 12 If unspecified, a single SPI device without a chip select can be used.
diff --git a/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt b/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt
new file mode 100644
index 000000000000..d48fc5280d5a
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt
@@ -0,0 +1,23 @@
1* Temperature Sensor on hisilicon SoCs
2
3** Required properties :
4
5- compatible: "hisilicon,tsensor".
6- reg: physical base address of thermal sensor and length of memory mapped
7 region.
8- interrupt: The interrupt number to the cpu. Defines the interrupt used
9 by /SOCTHERM/tsensor.
10- clock-names: Input clock name, should be 'thermal_clk'.
11- clocks: phandles for clock specified in "clock-names" property.
12- #thermal-sensor-cells: Should be 1. See ./thermal.txt for a description.
13
14Example :
15
16 tsensor: tsensor@0,f7030700 {
17 compatible = "hisilicon,tsensor";
18 reg = <0x0 0xf7030700 0x0 0x1000>;
19 interrupts = <0 7 0x4>;
20 clocks = <&sys_ctrl HI6220_TSENSOR_CLK>;
21 clock-names = "thermal_clk";
22 #thermal-sensor-cells = <1>;
23 }
diff --git a/Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt b/Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt
new file mode 100644
index 000000000000..290ec06fa33a
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/qcom-spmi-temp-alarm.txt
@@ -0,0 +1,57 @@
1Qualcomm QPNP PMIC Temperature Alarm
2
3QPNP temperature alarm peripherals are found inside of Qualcomm PMIC chips
4that utilize the Qualcomm SPMI implementation. These peripherals provide an
5interrupt signal and status register to identify high PMIC die temperature.
6
7Required properties:
8- compatible: Should contain "qcom,spmi-temp-alarm".
9- reg: Specifies the SPMI address and length of the controller's
10 registers.
11- interrupts: PMIC temperature alarm interrupt.
12- #thermal-sensor-cells: Should be 0. See thermal.txt for a description.
13
14Optional properties:
15- io-channels: Should contain IIO channel specifier for the ADC channel,
16 which report chip die temperature.
17- io-channel-names: Should contain "thermal".
18
19Example:
20
21 pm8941_temp: thermal-alarm@2400 {
22 compatible = "qcom,spmi-temp-alarm";
23 reg = <0x2400 0x100>;
24 interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
25 #thermal-sensor-cells = <0>;
26
27 io-channels = <&pm8941_vadc VADC_DIE_TEMP>;
28 io-channel-names = "thermal";
29 };
30
31 thermal-zones {
32 pm8941 {
33 polling-delay-passive = <250>;
34 polling-delay = <1000>;
35
36 thermal-sensors = <&pm8941_temp>;
37
38 trips {
39 passive {
40 temperature = <1050000>;
41 hysteresis = <2000>;
42 type = "passive";
43 };
44 alert {
45 temperature = <125000>;
46 hysteresis = <2000>;
47 type = "hot";
48 };
49 crit {
50 temperature = <145000>;
51 hysteresis = <2000>;
52 type = "critical";
53 };
54 };
55 };
56 };
57
diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt
index 29fe0bfae38e..8a49362dea6e 100644
--- a/Documentation/devicetree/bindings/thermal/thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/thermal.txt
@@ -167,6 +167,13 @@ Optional property:
167 by means of sensor ID. Additional coefficients are 167 by means of sensor ID. Additional coefficients are
168 interpreted as constant offset. 168 interpreted as constant offset.
169 169
170- sustainable-power: An estimate of the sustainable power (in mW) that the
171 Type: unsigned thermal zone can dissipate at the desired
172 Size: one cell control temperature. For reference, the
173 sustainable power of a 4'' phone is typically
174 2000mW, while on a 10'' tablet is around
175 4500mW.
176
170Note: The delay properties are bound to the maximum dT/dt (temperature 177Note: The delay properties are bound to the maximum dT/dt (temperature
171derivative over time) in two situations for a thermal zone: 178derivative over time) in two situations for a thermal zone:
172(i) - when passive cooling is activated (polling-delay-passive); and 179(i) - when passive cooling is activated (polling-delay-passive); and
@@ -546,6 +553,8 @@ thermal-zones {
546 */ 553 */
547 coefficients = <1200 -345 890>; 554 coefficients = <1200 -345 890>;
548 555
556 sustainable-power = <2500>;
557
549 trips { 558 trips {
550 /* Trips are based on resulting linear equation */ 559 /* Trips are based on resulting linear equation */
551 cpu_trip: cpu-trip { 560 cpu_trip: cpu-trip {
diff --git a/Documentation/devicetree/bindings/timer/cadence,ttc-timer.txt b/Documentation/devicetree/bindings/timer/cadence,ttc-timer.txt
index 993695c659e1..eeee6cd51e5c 100644
--- a/Documentation/devicetree/bindings/timer/cadence,ttc-timer.txt
+++ b/Documentation/devicetree/bindings/timer/cadence,ttc-timer.txt
@@ -6,6 +6,9 @@ Required properties:
6- interrupts : A list of 3 interrupts; one per timer channel. 6- interrupts : A list of 3 interrupts; one per timer channel.
7- clocks: phandle to the source clock 7- clocks: phandle to the source clock
8 8
9Optional properties:
10- timer-width: Bit width of the timer, necessary if not 16.
11
9Example: 12Example:
10 13
11ttc0: ttc0@f8001000 { 14ttc0: ttc0@f8001000 {
@@ -14,4 +17,5 @@ ttc0: ttc0@f8001000 {
14 compatible = "cdns,ttc"; 17 compatible = "cdns,ttc";
15 reg = <0xF8001000 0x1000>; 18 reg = <0xF8001000 0x1000>;
16 clocks = <&cpu_clk 3>; 19 clocks = <&cpu_clk 3>;
20 timer-width = <32>;
17}; 21};
diff --git a/Documentation/devicetree/bindings/timer/nxp,lpc3220-timer.txt b/Documentation/devicetree/bindings/timer/nxp,lpc3220-timer.txt
new file mode 100644
index 000000000000..51b05a0e70d1
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/nxp,lpc3220-timer.txt
@@ -0,0 +1,26 @@
1* NXP LPC3220 timer
2
3The NXP LPC3220 timer is used on a wide range of NXP SoCs. This
4includes LPC32xx, LPC178x, LPC18xx and LPC43xx parts.
5
6Required properties:
7- compatible:
8 Should be "nxp,lpc3220-timer".
9- reg:
10 Address and length of the register set.
11- interrupts:
12 Reference to the timer interrupt
13- clocks:
14 Should contain a reference to timer clock.
15- clock-names:
16 Should contain "timerclk".
17
18Example:
19
20timer1: timer@40085000 {
21 compatible = "nxp,lpc3220-timer";
22 reg = <0x40085000 0x1000>;
23 interrupts = <13>;
24 clocks = <&ccu1 CLK_CPU_TIMER1>;
25 clock-names = "timerclk";
26};
diff --git a/Documentation/devicetree/bindings/timer/renesas,16bit-timer.txt b/Documentation/devicetree/bindings/timer/renesas,16bit-timer.txt
new file mode 100644
index 000000000000..e8792447a199
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/renesas,16bit-timer.txt
@@ -0,0 +1,25 @@
1* Renesas H8/300 16bit timer
2
3The 16bit timer is a 16bit timer/counter with configurable clock inputs and
4programmable compare match.
5
6Required Properties:
7
8 - compatible: must contain "renesas,16bit-timer"
9 - reg: base address and length of the registers block for the timer module.
10 - interrupts: interrupt-specifier for the timer, IMIA
11 - clocks: a list of phandle, one for each entry in clock-names.
12 - clock-names: must contain "peripheral_clk" for the functional clock.
13 - renesas,channel: timer channel number.
14
15Example:
16
17 timer16: timer@ffff68 {
18 compatible = "reneas,16bit-timer";
19 reg = <0xffff68 8>, <0xffff60 8>;
20 interrupts = <24>;
21 renesas,channel = <0>;
22 clocks = <&pclk>;
23 clock-names = "peripheral_clk";
24 };
25
diff --git a/Documentation/devicetree/bindings/timer/renesas,8bit-timer.txt b/Documentation/devicetree/bindings/timer/renesas,8bit-timer.txt
new file mode 100644
index 000000000000..9dca3759a0f0
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/renesas,8bit-timer.txt
@@ -0,0 +1,25 @@
1* Renesas H8/300 8bit timer
2
3The 8bit timer is a 8bit timer/counter with configurable clock inputs and
4programmable compare match.
5
6This implement only supported cascade mode.
7
8Required Properties:
9
10 - compatible: must contain "renesas,8bit-timer"
11 - reg: base address and length of the registers block for the timer module.
12 - interrupts: interrupt-specifier for the timer, CMIA and TOVI
13 - clocks: a list of phandle, one for each entry in clock-names.
14 - clock-names: must contain "fck" for the functional clock.
15
16Example:
17
18 timer8_0: timer@ffff80 {
19 compatible = "renesas,8bit-timer";
20 reg = <0xffff80 10>;
21 interrupts = <36>;
22 clocks = <&fclk>;
23 clock-names = "fck";
24 };
25
diff --git a/Documentation/devicetree/bindings/timer/renesas,tpu.txt b/Documentation/devicetree/bindings/timer/renesas,tpu.txt
new file mode 100644
index 000000000000..f8b25897fb31
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/renesas,tpu.txt
@@ -0,0 +1,21 @@
1* Renesas H8/300 Timer Pluse Unit
2
3The TPU is a 16bit timer/counter with configurable clock inputs and
4programmable compare match.
5This implementation support only cascade mode.
6
7Required Properties:
8
9 - compatible: must contain "renesas,tpu"
10 - reg: base address and length of the registers block in 2 channel.
11 - clocks: a list of phandle, one for each entry in clock-names.
12 - clock-names: must contain "peripheral_clk" for the functional clock.
13
14
15Example:
16 tpu: tpu@ffffe0 {
17 compatible = "renesas,tpu";
18 reg = <0xffffe0 16>, <0xfffff0 12>;
19 clocks = <&pclk>;
20 clock-names = "peripheral_clk";
21 };
diff --git a/Documentation/devicetree/bindings/timer/st,stm32-timer.txt b/Documentation/devicetree/bindings/timer/st,stm32-timer.txt
new file mode 100644
index 000000000000..8ef28e70d6e8
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/st,stm32-timer.txt
@@ -0,0 +1,22 @@
1. STMicroelectronics STM32 timer
2
3The STM32 MCUs family has several general-purpose 16 and 32 bits timers.
4
5Required properties:
6- compatible : Should be "st,stm32-timer"
7- reg : Address and length of the register set
8- clocks : Reference on the timer input clock
9- interrupts : Reference to the timer interrupt
10
11Optional properties:
12- resets: Reference to a reset controller asserting the timer
13
14Example:
15
16timer5: timer@40000c00 {
17 compatible = "st,stm32-timer";
18 reg = <0x40000c00 0x400>;
19 interrupts = <50>;
20 resets = <&rrc 259>;
21 clocks = <&clk_pmtr1>;
22};
diff --git a/Documentation/devicetree/bindings/usb/atmel-usb.txt b/Documentation/devicetree/bindings/usb/atmel-usb.txt
index e180d56c75db..5883b73ea1b5 100644
--- a/Documentation/devicetree/bindings/usb/atmel-usb.txt
+++ b/Documentation/devicetree/bindings/usb/atmel-usb.txt
@@ -5,6 +5,13 @@ OHCI
5Required properties: 5Required properties:
6 - compatible: Should be "atmel,at91rm9200-ohci" for USB controllers 6 - compatible: Should be "atmel,at91rm9200-ohci" for USB controllers
7 used in host mode. 7 used in host mode.
8 - reg: Address and length of the register set for the device
9 - interrupts: Should contain ehci interrupt
10 - clocks: Should reference the peripheral, host and system clocks
11 - clock-names: Should contains two strings
12 "ohci_clk" for the peripheral clock
13 "hclk" for the host clock
14 "uhpck" for the system clock
8 - num-ports: Number of ports. 15 - num-ports: Number of ports.
9 - atmel,vbus-gpio: If present, specifies a gpio that needs to be 16 - atmel,vbus-gpio: If present, specifies a gpio that needs to be
10 activated for the bus to be powered. 17 activated for the bus to be powered.
@@ -14,6 +21,8 @@ Required properties:
14usb0: ohci@00500000 { 21usb0: ohci@00500000 {
15 compatible = "atmel,at91rm9200-ohci", "usb-ohci"; 22 compatible = "atmel,at91rm9200-ohci", "usb-ohci";
16 reg = <0x00500000 0x100000>; 23 reg = <0x00500000 0x100000>;
24 clocks = <&uhphs_clk>, <&uhphs_clk>, <&uhpck>;
25 clock-names = "ohci_clk", "hclk", "uhpck";
17 interrupts = <20 4>; 26 interrupts = <20 4>;
18 num-ports = <2>; 27 num-ports = <2>;
19}; 28};
@@ -23,11 +32,19 @@ EHCI
23Required properties: 32Required properties:
24 - compatible: Should be "atmel,at91sam9g45-ehci" for USB controllers 33 - compatible: Should be "atmel,at91sam9g45-ehci" for USB controllers
25 used in host mode. 34 used in host mode.
35 - reg: Address and length of the register set for the device
36 - interrupts: Should contain ehci interrupt
37 - clocks: Should reference the peripheral and the UTMI clocks
38 - clock-names: Should contains two strings
39 "ehci_clk" for the peripheral clock
40 "usb_clk" for the UTMI clock
26 41
27usb1: ehci@00800000 { 42usb1: ehci@00800000 {
28 compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; 43 compatible = "atmel,at91sam9g45-ehci", "usb-ehci";
29 reg = <0x00800000 0x100000>; 44 reg = <0x00800000 0x100000>;
30 interrupts = <22 4>; 45 interrupts = <22 4>;
46 clocks = <&utmi>, <&uhphs_clk>;
47 clock-names = "usb_clk", "ehci_clk";
31}; 48};
32 49
33AT91 USB device controller 50AT91 USB device controller
@@ -53,6 +70,8 @@ usb1: gadget@fffa4000 {
53 compatible = "atmel,at91rm9200-udc"; 70 compatible = "atmel,at91rm9200-udc";
54 reg = <0xfffa4000 0x4000>; 71 reg = <0xfffa4000 0x4000>;
55 interrupts = <10 4>; 72 interrupts = <10 4>;
73 clocks = <&udc_clk>, <&udpck>;
74 clock-names = "pclk", "hclk";
56 atmel,vbus-gpio = <&pioC 5 0>; 75 atmel,vbus-gpio = <&pioC 5 0>;
57}; 76};
58 77
@@ -60,11 +79,15 @@ Atmel High-Speed USB device controller
60 79
61Required properties: 80Required properties:
62 - compatible: Should be one of the following 81 - compatible: Should be one of the following
63 "at91sam9rl-udc" 82 "atmel,at91sam9rl-udc"
64 "at91sam9g45-udc" 83 "atmel,at91sam9g45-udc"
65 "sama5d3-udc" 84 "atmel,sama5d3-udc"
66 - reg: Address and length of the register set for the device 85 - reg: Address and length of the register set for the device
67 - interrupts: Should contain usba interrupt 86 - interrupts: Should contain usba interrupt
87 - clocks: Should reference the peripheral and host clocks
88 - clock-names: Should contains two strings
89 "pclk" for the peripheral clock
90 "hclk" for the host clock
68 - ep childnode: To specify the number of endpoints and their properties. 91 - ep childnode: To specify the number of endpoints and their properties.
69 92
70Optional properties: 93Optional properties:
@@ -86,6 +109,8 @@ usb2: gadget@fff78000 {
86 reg = <0x00600000 0x80000 109 reg = <0x00600000 0x80000
87 0xfff78000 0x400>; 110 0xfff78000 0x400>;
88 interrupts = <27 4 0>; 111 interrupts = <27 4 0>;
112 clocks = <&utmi>, <&udphs_clk>;
113 clock-names = "hclk", "pclk";
89 atmel,vbus-gpio = <&pioB 19 0>; 114 atmel,vbus-gpio = <&pioB 19 0>;
90 115
91 ep0 { 116 ep0 {
diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt
deleted file mode 100644
index 38a548001e3a..000000000000
--- a/Documentation/devicetree/bindings/usb/ci-hdrc-imx.txt
+++ /dev/null
@@ -1,35 +0,0 @@
1* Freescale i.MX ci13xxx usb controllers
2
3Required properties:
4- compatible: Should be "fsl,imx27-usb"
5- reg: Should contain registers location and length
6- interrupts: Should contain controller interrupt
7- fsl,usbphy: phandle of usb phy that connects to the port
8
9Recommended properies:
10- phy_type: the type of the phy connected to the core. Should be one
11 of "utmi", "utmi_wide", "ulpi", "serial" or "hsic". Without this
12 property the PORTSC register won't be touched
13- dr_mode: One of "host", "peripheral" or "otg". Defaults to "otg"
14
15Optional properties:
16- fsl,usbmisc: phandler of non-core register device, with one argument
17 that indicate usb controller index
18- vbus-supply: regulator for vbus
19- disable-over-current: disable over current detect
20- external-vbus-divider: enables off-chip resistor divider for Vbus
21- maximum-speed: limit the maximum connection speed to "full-speed".
22- tpl-support: TPL (Targeted Peripheral List) feature for targeted hosts
23
24Examples:
25usb@02184000 { /* USB OTG */
26 compatible = "fsl,imx6q-usb", "fsl,imx27-usb";
27 reg = <0x02184000 0x200>;
28 interrupts = <0 43 0x04>;
29 fsl,usbphy = <&usbphy1>;
30 fsl,usbmisc = <&usbmisc 0>;
31 disable-over-current;
32 external-vbus-divider;
33 maximum-speed = "full-speed";
34 tpl-support;
35};
diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt
deleted file mode 100644
index f2899b550939..000000000000
--- a/Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt
+++ /dev/null
@@ -1,17 +0,0 @@
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/ci-hdrc-usb2.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
index 27f8b1e5ee46..553e2fae3a76 100644
--- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
+++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
@@ -1,15 +1,35 @@
1* USB2 ChipIdea USB controller for ci13xxx 1* USB2 ChipIdea USB controller for ci13xxx
2 2
3Required properties: 3Required properties:
4- compatible: should be "chipidea,usb2" 4- compatible: should be one of:
5 "fsl,imx27-usb"
6 "lsi,zevio-usb"
7 "qcom,ci-hdrc"
8 "chipidea,usb2"
5- reg: base address and length of the registers 9- reg: base address and length of the registers
6- interrupts: interrupt for the USB controller 10- interrupts: interrupt for the USB controller
7 11
12Recommended properies:
13- phy_type: the type of the phy connected to the core. Should be one
14 of "utmi", "utmi_wide", "ulpi", "serial" or "hsic". Without this
15 property the PORTSC register won't be touched.
16- dr_mode: One of "host", "peripheral" or "otg". Defaults to "otg"
17
18Deprecated properties:
19- usb-phy: phandle for the PHY device. Use "phys" instead.
20- fsl,usbphy: phandle of usb phy that connects to the port. Use "phys" instead.
21
8Optional properties: 22Optional properties:
9- clocks: reference to the USB clock 23- clocks: reference to the USB clock
10- phys: reference to the USB PHY 24- phys: reference to the USB PHY
11- phy-names: should be "usb-phy" 25- phy-names: should be "usb-phy"
12- vbus-supply: reference to the VBUS regulator 26- vbus-supply: reference to the VBUS regulator
27- maximum-speed: limit the maximum connection speed to "full-speed".
28- tpl-support: TPL (Targeted Peripheral List) feature for targeted hosts
29- fsl,usbmisc: (FSL only) phandler of non-core register device, with one
30 argument that indicate usb controller index
31- disable-over-current: (FSL only) disable over current detect
32- external-vbus-divider: (FSL only) enables off-chip resistor divider for Vbus
13 33
14Example: 34Example:
15 35
diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-zevio.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-zevio.txt
deleted file mode 100644
index abbcb2aea38c..000000000000
--- a/Documentation/devicetree/bindings/usb/ci-hdrc-zevio.txt
+++ /dev/null
@@ -1,17 +0,0 @@
1* LSI Zevio USB OTG Controller
2
3Required properties:
4- compatible: Should be "lsi,zevio-usb"
5- reg: Should contain registers location and length
6- interrupts: Should contain controller interrupt
7
8Optional properties:
9- vbus-supply: regulator for vbus
10
11Examples:
12 usb0: usb@b0000000 {
13 reg = <0xb0000000 0x1000>;
14 compatible = "lsi,zevio-usb";
15 interrupts = <8>;
16 vbus-supply = <&vbus_reg>;
17 };
diff --git a/Documentation/devicetree/bindings/usb/dwc3-st.txt b/Documentation/devicetree/bindings/usb/dwc3-st.txt
index f9d70252bbb2..01c71b1258f4 100644
--- a/Documentation/devicetree/bindings/usb/dwc3-st.txt
+++ b/Documentation/devicetree/bindings/usb/dwc3-st.txt
@@ -49,8 +49,7 @@ st_dwc3: dwc3@8f94000 {
49 st,syscfg = <&syscfg_core>; 49 st,syscfg = <&syscfg_core>;
50 resets = <&powerdown STIH407_USB3_POWERDOWN>, 50 resets = <&powerdown STIH407_USB3_POWERDOWN>,
51 <&softreset STIH407_MIPHY2_SOFTRESET>; 51 <&softreset STIH407_MIPHY2_SOFTRESET>;
52 reset-names = "powerdown", 52 reset-names = "powerdown", "softreset";
53 "softreset";
54 #address-cells = <1>; 53 #address-cells = <1>;
55 #size-cells = <1>; 54 #size-cells = <1>;
56 pinctrl-names = "default"; 55 pinctrl-names = "default";
@@ -62,7 +61,7 @@ st_dwc3: dwc3@8f94000 {
62 reg = <0x09900000 0x100000>; 61 reg = <0x09900000 0x100000>;
63 interrupts = <GIC_SPI 155 IRQ_TYPE_NONE>; 62 interrupts = <GIC_SPI 155 IRQ_TYPE_NONE>;
64 dr_mode = "host"; 63 dr_mode = "host";
65 phys-names = "usb2-phy", "usb3-phy"; 64 phy-names = "usb2-phy", "usb3-phy";
66 phys = <&usb2_picophy2>, <&phy_port2 MIPHY_TYPE_USB>; 65 phys = <&usb2_picophy2>, <&phy_port2 PHY_TYPE_USB3>;
67 }; 66 };
68}; 67};
diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt
index 5cc364309edb..0815eac5b185 100644
--- a/Documentation/devicetree/bindings/usb/dwc3.txt
+++ b/Documentation/devicetree/bindings/usb/dwc3.txt
@@ -38,6 +38,8 @@ Optional properties:
38 - snps,is-utmi-l1-suspend: true when DWC3 asserts output signal 38 - snps,is-utmi-l1-suspend: true when DWC3 asserts output signal
39 utmi_l1_suspend_n, false when asserts utmi_sleep_n 39 utmi_l1_suspend_n, false when asserts utmi_sleep_n
40 - snps,hird-threshold: HIRD threshold 40 - snps,hird-threshold: HIRD threshold
41 - snps,hsphy_interface: High-Speed PHY interface selection between "utmi" for
42 UTMI+ and "ulpi" for ULPI when the DWC_USB3_HSPHY_INTERFACE has value 3.
41 43
42This is usually a subnode to DWC3 glue to which it is connected. 44This is usually a subnode to DWC3 glue to which it is connected.
43 45
diff --git a/Documentation/devicetree/bindings/usb/msm-hsusb.txt b/Documentation/devicetree/bindings/usb/msm-hsusb.txt
index 2826f2af503a..bd8d9e753029 100644
--- a/Documentation/devicetree/bindings/usb/msm-hsusb.txt
+++ b/Documentation/devicetree/bindings/usb/msm-hsusb.txt
@@ -69,6 +69,17 @@ Optional properties:
69 (no, min, max) where each value represents either a voltage 69 (no, min, max) where each value represents either a voltage
70 in microvolts or a value corresponding to voltage corner. 70 in microvolts or a value corresponding to voltage corner.
71 71
72- qcom,manual-pullup: If present, vbus is not routed to USB controller/phy
73 and controller driver therefore enables pull-up explicitly
74 before starting controller using usbcmd run/stop bit.
75
76- extcon: phandles to external connector devices. First phandle
77 should point to external connector, which provide "USB"
78 cable events, the second should point to external connector
79 device, which provide "USB-HOST" cable events. If one of
80 the external connector devices is not required empty <0>
81 phandle should be specified.
82
72Example HSUSB OTG controller device node: 83Example HSUSB OTG controller device node:
73 84
74 usb@f9a55000 { 85 usb@f9a55000 {
diff --git a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
index dc2a18f0b3a1..64a4ca6cf96f 100644
--- a/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
+++ b/Documentation/devicetree/bindings/usb/renesas_usbhs.txt
@@ -4,6 +4,7 @@ Required properties:
4 - compatible: Must contain one of the following: 4 - compatible: Must contain one of the following:
5 - "renesas,usbhs-r8a7790" 5 - "renesas,usbhs-r8a7790"
6 - "renesas,usbhs-r8a7791" 6 - "renesas,usbhs-r8a7791"
7 - "renesas,usbhs-r8a7794"
7 - reg: Base address and length of the register for the USBHS 8 - reg: Base address and length of the register for the USBHS
8 - interrupts: Interrupt specifier for the USBHS 9 - interrupts: Interrupt specifier for the USBHS
9 - clocks: A list of phandle + clock specifier pairs 10 - clocks: A list of phandle + clock specifier pairs
@@ -15,10 +16,8 @@ Optional properties:
15 - phys: phandle + phy specifier pair 16 - phys: phandle + phy specifier pair
16 - phy-names: must be "usb" 17 - phy-names: must be "usb"
17 - dmas: Must contain a list of references to DMA specifiers. 18 - dmas: Must contain a list of references to DMA specifiers.
18 - dma-names : Must contain a list of DMA names: 19 - dma-names : named "ch%d", where %d is the channel number ranging from zero
19 - tx0 ... tx<n> 20 to the number of channels (DnFIFOs) minus one.
20 - rx0 ... rx<n>
21 - This <n> means DnFIFO in USBHS module.
22 21
23Example: 22Example:
24 usbhs: usb@e6590000 { 23 usbhs: usb@e6590000 {
diff --git a/Documentation/devicetree/bindings/usb/twlxxxx-usb.txt b/Documentation/devicetree/bindings/usb/twlxxxx-usb.txt
index 0aee0ad3f035..17327a296110 100644
--- a/Documentation/devicetree/bindings/usb/twlxxxx-usb.txt
+++ b/Documentation/devicetree/bindings/usb/twlxxxx-usb.txt
@@ -30,6 +30,9 @@ TWL4030 USB PHY AND COMPARATOR
30 - usb_mode : The mode used by the phy to connect to the controller. "1" 30 - usb_mode : The mode used by the phy to connect to the controller. "1"
31 specifies "ULPI" mode and "2" specifies "CEA2011_3PIN" mode. 31 specifies "ULPI" mode and "2" specifies "CEA2011_3PIN" mode.
32 32
33If a sibling node is compatible "ti,twl4030-bci", then it will find
34this device and query it for USB power status.
35
33twl4030-usb { 36twl4030-usb {
34 compatible = "ti,twl4030-usb"; 37 compatible = "ti,twl4030-usb";
35 interrupts = < 10 4 >; 38 interrupts = < 10 4 >;
diff --git a/Documentation/devicetree/bindings/usb/usb-ehci.txt b/Documentation/devicetree/bindings/usb/usb-ehci.txt
index 0b04fdff9d5a..a12d6012a40f 100644
--- a/Documentation/devicetree/bindings/usb/usb-ehci.txt
+++ b/Documentation/devicetree/bindings/usb/usb-ehci.txt
@@ -13,6 +13,8 @@ Optional properties:
13 - big-endian-desc : boolean, set this for hcds with big-endian descriptors 13 - big-endian-desc : boolean, set this for hcds with big-endian descriptors
14 - big-endian : boolean, for hcds with big-endian-regs + big-endian-desc 14 - big-endian : boolean, for hcds with big-endian-regs + big-endian-desc
15 - needs-reset-on-resume : boolean, set this to force EHCI reset after resume 15 - needs-reset-on-resume : boolean, set this to force EHCI reset after resume
16 - has-transaction-translator : boolean, set this if EHCI have a Transaction
17 Translator built into the root hub.
16 - clocks : a list of phandle + clock specifier pairs 18 - clocks : a list of phandle + clock specifier pairs
17 - phys : phandle + phy specifier pair 19 - phys : phandle + phy specifier pair
18 - phy-names : "usb" 20 - phy-names : "usb"
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 80339192c93e..d444757c4d9e 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -40,6 +40,7 @@ calxeda Calxeda
40capella Capella Microsystems, Inc 40capella Capella Microsystems, Inc
41cavium Cavium, Inc. 41cavium Cavium, Inc.
42cdns Cadence Design Systems Inc. 42cdns Cadence Design Systems Inc.
43ceva Ceva, Inc.
43chipidea Chipidea, Inc 44chipidea Chipidea, Inc
44chipone ChipOne 45chipone ChipOne
45chipspark ChipSPARK 46chipspark ChipSPARK
@@ -52,14 +53,17 @@ cnxt Conexant Systems, Inc.
52cortina Cortina Systems, Inc. 53cortina Cortina Systems, Inc.
53cosmic Cosmic Circuits 54cosmic Cosmic Circuits
54crystalfontz Crystalfontz America, Inc. 55crystalfontz Crystalfontz America, Inc.
56cubietech Cubietech, Ltd.
55dallas Maxim Integrated Products (formerly Dallas Semiconductor) 57dallas Maxim Integrated Products (formerly Dallas Semiconductor)
56davicom DAVICOM Semiconductor, Inc. 58davicom DAVICOM Semiconductor, Inc.
59delta Delta Electronics, Inc.
57denx Denx Software Engineering 60denx Denx Software Engineering
58digi Digi International Inc. 61digi Digi International Inc.
59digilent Diglent, Inc. 62digilent Diglent, Inc.
60dlg Dialog Semiconductor 63dlg Dialog Semiconductor
61dlink D-Link Corporation 64dlink D-Link Corporation
62dmo Data Modul AG 65dmo Data Modul AG
66ea Embedded Artists AB
63ebv EBV Elektronik 67ebv EBV Elektronik
64edt Emerging Display Technologies 68edt Emerging Display Technologies
65elan Elan Microelectronic Corp. 69elan Elan Microelectronic Corp.
@@ -90,9 +94,11 @@ gumstix Gumstix, Inc.
90gw Gateworks Corporation 94gw Gateworks Corporation
91hannstar HannStar Display Corporation 95hannstar HannStar Display Corporation
92haoyu Haoyu Microelectronic Co. Ltd. 96haoyu Haoyu Microelectronic Co. Ltd.
97hardkernel Hardkernel Co., Ltd
93himax Himax Technologies, Inc. 98himax Himax Technologies, Inc.
94hisilicon Hisilicon Limited. 99hisilicon Hisilicon Limited.
95hit Hitachi Ltd. 100hit Hitachi Ltd.
101hitex Hitex Development Tools
96honeywell Honeywell 102honeywell Honeywell
97hp Hewlett Packard 103hp Hewlett Packard
98i2se I2SE GmbH 104i2se I2SE GmbH
@@ -100,6 +106,7 @@ ibm International Business Machines (IBM)
100idt Integrated Device Technologies, Inc. 106idt Integrated Device Technologies, Inc.
101iom Iomega Corporation 107iom Iomega Corporation
102img Imagination Technologies Ltd. 108img Imagination Technologies Ltd.
109ingenic Ingenic Semiconductor
103innolux Innolux Corporation 110innolux Innolux Corporation
104intel Intel Corporation 111intel Intel Corporation
105intercontrol Inter Control Group 112intercontrol Inter Control Group
@@ -107,6 +114,7 @@ isee ISEE 2007 S.L.
107isil Intersil 114isil Intersil
108karo Ka-Ro electronics GmbH 115karo Ka-Ro electronics GmbH
109keymile Keymile GmbH 116keymile Keymile GmbH
117kinetic Kinetic Technologies
110lacie LaCie 118lacie LaCie
111lantiq Lantiq Semiconductor 119lantiq Lantiq Semiconductor
112lenovo Lenovo Group Ltd. 120lenovo Lenovo Group Ltd.
@@ -117,6 +125,7 @@ lltc Linear Technology Corporation
117marvell Marvell Technology Group Ltd. 125marvell Marvell Technology Group Ltd.
118maxim Maxim Integrated Products 126maxim Maxim Integrated Products
119mediatek MediaTek Inc. 127mediatek MediaTek Inc.
128melexis Melexis N.V.
120merrii Merrii Technology Co., Ltd. 129merrii Merrii Technology Co., Ltd.
121micrel Micrel Inc. 130micrel Micrel Inc.
122microchip Microchip Technology Inc. 131microchip Microchip Technology Inc.
@@ -154,13 +163,16 @@ powervr PowerVR (deprecated, use img)
154qca Qualcomm Atheros, Inc. 163qca Qualcomm Atheros, Inc.
155qcom Qualcomm Technologies, Inc 164qcom Qualcomm Technologies, Inc
156qemu QEMU, a generic and open source machine emulator and virtualizer 165qemu QEMU, a generic and open source machine emulator and virtualizer
166qi Qi Hardware
157qnap QNAP Systems, Inc. 167qnap QNAP Systems, Inc.
158radxa Radxa 168radxa Radxa
159raidsonic RaidSonic Technology GmbH 169raidsonic RaidSonic Technology GmbH
160ralink Mediatek/Ralink Technology Corp. 170ralink Mediatek/Ralink Technology Corp.
161ramtron Ramtron International 171ramtron Ramtron International
172raspberrypi Raspberry Pi Foundation
162realtek Realtek Semiconductor Corp. 173realtek Realtek Semiconductor Corp.
163renesas Renesas Electronics Corporation 174renesas Renesas Electronics Corporation
175richtek Richtek Technology Corporation
164ricoh Ricoh Co. Ltd. 176ricoh Ricoh Co. Ltd.
165rockchip Fuzhou Rockchip Electronics Co., Ltd 177rockchip Fuzhou Rockchip Electronics Co., Ltd
166samsung Samsung Semiconductor 178samsung Samsung Semiconductor
@@ -181,6 +193,7 @@ skyworks Skyworks Solutions, Inc.
181smsc Standard Microsystems Corporation 193smsc Standard Microsystems Corporation
182snps Synopsys, Inc. 194snps Synopsys, Inc.
183solidrun SolidRun 195solidrun SolidRun
196solomon Solomon Systech Limited
184sony Sony Corporation 197sony Sony Corporation
185spansion Spansion Inc. 198spansion Spansion Inc.
186sprd Spreadtrum Communications Inc. 199sprd Spreadtrum Communications Inc.
@@ -189,12 +202,14 @@ ste ST-Ericsson
189stericsson ST-Ericsson 202stericsson ST-Ericsson
190synology Synology, Inc. 203synology Synology, Inc.
191tbs TBS Technologies 204tbs TBS Technologies
205tcl Toby Churchill Ltd.
192thine THine Electronics, Inc. 206thine THine Electronics, Inc.
193ti Texas Instruments 207ti Texas Instruments
194tlm Trusted Logic Mobility 208tlm Trusted Logic Mobility
195toradex Toradex AG 209toradex Toradex AG
196toshiba Toshiba Corporation 210toshiba Toshiba Corporation
197toumaz Toumaz 211toumaz Toumaz
212tplink TP-LINK Technologies Co., Ltd.
198truly Truly Semiconductors Limited 213truly Truly Semiconductors Limited
199usi Universal Scientific Industrial Co., Ltd. 214usi Universal Scientific Industrial Co., Ltd.
200v3 V3 Semiconductor 215v3 V3 Semiconductor
@@ -202,6 +217,7 @@ variscite Variscite Ltd.
202via VIA Technologies, Inc. 217via VIA Technologies, Inc.
203virtio Virtual I/O Device Specification, developed by the OASIS consortium 218virtio Virtual I/O Device Specification, developed by the OASIS consortium
204voipac Voipac Technologies s.r.o. 219voipac Voipac Technologies s.r.o.
220wexler Wexler
205winbond Winbond Electronics corp. 221winbond Winbond Electronics corp.
206wlf Wolfson Microelectronics 222wlf Wolfson Microelectronics
207wm Wondermedia Technologies, Inc. 223wm Wondermedia Technologies, Inc.
@@ -211,3 +227,5 @@ xillybus Xillybus Ltd.
211xlnx Xilinx 227xlnx Xilinx
212zyxel ZyXEL Communications Corp. 228zyxel ZyXEL Communications Corp.
213zarlink Zarlink Semiconductor 229zarlink Zarlink Semiconductor
230zii Zodiac Inflight Innovations
231zte ZTE Corp.
diff --git a/Documentation/devicetree/bindings/video/exynos-mic.txt b/Documentation/devicetree/bindings/video/exynos-mic.txt
new file mode 100644
index 000000000000..0fba2ee6440a
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/exynos-mic.txt
@@ -0,0 +1,51 @@
1Device-Tree bindings for Samsung Exynos SoC mobile image compressor (MIC)
2
3MIC (mobile image compressor) resides between decon and mipi dsi. Mipi dsi is
4not capable to transfer high resoltuion frame data as decon can send. MIC
5solves this problem by compressing the frame data by 1/2 before it is
6transferred through mipi dsi. The compressed frame data must be uncompressed in
7the panel PCB.
8
9Required properties:
10- compatible: value should be "samsung,exynos5433-mic".
11- reg: physical base address and length of the MIC registers set and system
12 register of mic.
13- clocks: must include clock specifiers corresponding to entries in the
14 clock-names property.
15- clock-names: list of clock names sorted in the same order as the clocks
16 property. Must contain "pclk_mic0", "sclk_rgb_vclk_to_mic0".
17- samsung,disp-syscon: the reference node for syscon for DISP block.
18- ports: contains a port which is connected to decon node and dsi node.
19 address-cells and size-cells must 1 and 0, respectively.
20- port: contains an endpoint node which is connected to the endpoint in the
21 decon node or dsi node. The reg value must be 0 and 1 respectively.
22
23Example:
24SoC specific DT entry:
25mic: mic@13930000 {
26 compatible = "samsung,exynos5433-mic";
27 reg = <0x13930000 0x48>;
28 clocks = <&cmu_disp CLK_PCLK_MIC0>,
29 <&cmu_disp CLK_SCLK_RGB_VCLK_TO_MIC0>;
30 clock-names = "pclk_mic0", "sclk_rgb_vclk_to_mic0";
31 samsung,disp-syscon = <&syscon_disp>;
32
33 ports {
34 #address-cells = <1>;
35 #size-cells = <0>;
36
37 port@0 {
38 reg = <0>;
39 mic_to_decon: endpoint {
40 remote-endpoint = <&decon_to_mic>;
41 };
42 };
43
44 port@1 {
45 reg = <1>;
46 mic_to_dsi: endpoint {
47 remote-endpoint = <&dsi_to_mic>;
48 };
49 };
50 };
51};
diff --git a/Documentation/devicetree/bindings/video/exynos5433-decon.txt b/Documentation/devicetree/bindings/video/exynos5433-decon.txt
new file mode 100644
index 000000000000..377afbf5122a
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/exynos5433-decon.txt
@@ -0,0 +1,65 @@
1Device-Tree bindings for Samsung Exynos SoC display controller (DECON)
2
3DECON (Display and Enhancement Controller) is the Display Controller for the
4Exynos series of SoCs which transfers the image data from a video memory
5buffer to an external LCD interface.
6
7Required properties:
8- compatible: value should be "samsung,exynos5433-decon";
9- reg: physical base address and length of the DECON registers set.
10- interrupts: should contain a list of all DECON IP block interrupts in the
11 order: VSYNC, LCD_SYSTEM. The interrupt specifier format
12 depends on the interrupt controller used.
13- interrupt-names: should contain the interrupt names: "vsync", "lcd_sys"
14 in the same order as they were listed in the interrupts
15 property.
16- clocks: must include clock specifiers corresponding to entries in the
17 clock-names property.
18- clock-names: list of clock names sorted in the same order as the clocks
19 property. Must contain "aclk_decon", "aclk_smmu_decon0x",
20 "aclk_xiu_decon0x", "pclk_smmu_decon0x", clk_decon_vclk",
21 "sclk_decon_eclk"
22- ports: contains a port which is connected to mic node. address-cells and
23 size-cells must 1 and 0, respectively.
24- port: contains an endpoint node which is connected to the endpoint in the mic
25 node. The reg value muset be 0.
26- i80-if-timings: specify whether the panel which is connected to decon uses
27 i80 lcd interface or mipi video interface. This node contains
28 no timing information as that of fimd does. Because there is
29 no register in decon to specify i80 interface timing value,
30 it is not needed, but make it remain to use same kind of node
31 in fimd and exynos7 decon.
32
33Example:
34SoC specific DT entry:
35decon: decon@13800000 {
36 compatible = "samsung,exynos5433-decon";
37 reg = <0x13800000 0x2104>;
38 clocks = <&cmu_disp CLK_ACLK_DECON>, <&cmu_disp CLK_ACLK_SMMU_DECON0X>,
39 <&cmu_disp CLK_ACLK_XIU_DECON0X>,
40 <&cmu_disp CLK_PCLK_SMMU_DECON0X>,
41 <&cmu_disp CLK_SCLK_DECON_VCLK>,
42 <&cmu_disp CLK_SCLK_DECON_ECLK>;
43 clock-names = "aclk_decon", "aclk_smmu_decon0x", "aclk_xiu_decon0x",
44 "pclk_smmu_decon0x", "sclk_decon_vclk", "sclk_decon_eclk";
45 interrupt-names = "vsync", "lcd_sys";
46 interrupts = <0 202 0>, <0 203 0>;
47
48 ports {
49 #address-cells = <1>;
50 #size-cells = <0>;
51
52 port@0 {
53 reg = <0>;
54 decon_to_mic: endpoint {
55 remote-endpoint = <&mic_to_decon>;
56 };
57 };
58 };
59};
60
61Board specific DT entry:
62&decon {
63 i80-if-timings {
64 };
65};
diff --git a/Documentation/devicetree/bindings/video/exynos_dsim.txt b/Documentation/devicetree/bindings/video/exynos_dsim.txt
index 802aa7ef64e5..0be036270661 100644
--- a/Documentation/devicetree/bindings/video/exynos_dsim.txt
+++ b/Documentation/devicetree/bindings/video/exynos_dsim.txt
@@ -6,17 +6,19 @@ Required properties:
6 "samsung,exynos4210-mipi-dsi" /* for Exynos4 SoCs */ 6 "samsung,exynos4210-mipi-dsi" /* for Exynos4 SoCs */
7 "samsung,exynos4415-mipi-dsi" /* for Exynos4415 SoC */ 7 "samsung,exynos4415-mipi-dsi" /* for Exynos4415 SoC */
8 "samsung,exynos5410-mipi-dsi" /* for Exynos5410/5420/5440 SoCs */ 8 "samsung,exynos5410-mipi-dsi" /* for Exynos5410/5420/5440 SoCs */
9 "samsung,exynos5433-mipi-dsi" /* for Exynos5433 SoCs */
9 - reg: physical base address and length of the registers set for the device 10 - reg: physical base address and length of the registers set for the device
10 - interrupts: should contain DSI interrupt 11 - interrupts: should contain DSI interrupt
11 - clocks: list of clock specifiers, must contain an entry for each required 12 - clocks: list of clock specifiers, must contain an entry for each required
12 entry in clock-names 13 entry in clock-names
13 - clock-names: should include "bus_clk"and "pll_clk" entries 14 - clock-names: should include "bus_clk"and "sclk_mipi" entries
15 the use of "pll_clk" is deprecated
14 - phys: list of phy specifiers, must contain an entry for each required 16 - phys: list of phy specifiers, must contain an entry for each required
15 entry in phy-names 17 entry in phy-names
16 - phy-names: should include "dsim" entry 18 - phy-names: should include "dsim" entry
17 - vddcore-supply: MIPI DSIM Core voltage supply (e.g. 1.1V) 19 - vddcore-supply: MIPI DSIM Core voltage supply (e.g. 1.1V)
18 - vddio-supply: MIPI DSIM I/O and PLL voltage supply (e.g. 1.8V) 20 - vddio-supply: MIPI DSIM I/O and PLL voltage supply (e.g. 1.8V)
19 - samsung,pll-clock-frequency: specifies frequency of the "pll_clk" clock 21 - samsung,pll-clock-frequency: specifies frequency of the oscillator clock
20 - #address-cells, #size-cells: should be set respectively to <1> and <0> 22 - #address-cells, #size-cells: should be set respectively to <1> and <0>
21 according to DSI host bindings (see MIPI DSI bindings [1]) 23 according to DSI host bindings (see MIPI DSI bindings [1])
22 24
@@ -30,10 +32,19 @@ Video interfaces:
30 Device node can contain video interface port nodes according to [2]. 32 Device node can contain video interface port nodes according to [2].
31 The following are properties specific to those nodes: 33 The following are properties specific to those nodes:
32 34
33 port node: 35 port node inbound:
34 - reg: (required) can be 0 for input RGB/I80 port or 1 for DSI port; 36 - reg: (required) must be 0.
37 port node outbound:
38 - reg: (required) must be 1.
35 39
36 endpoint node of DSI port (reg = 1): 40 endpoint node connected from mic node (reg = 0):
41 - remote-endpoint: specifies the endpoint in mic node. This node is required
42 for Exynos5433 mipi dsi. So mic can access to panel node
43 thoughout this dsi node.
44 endpoint node connected to panel node (reg = 1):
45 - remote-endpoint: specifies the endpoint in panel node. This node is
46 required in all kinds of exynos mipi dsi to represent
47 the connection between mipi dsi and panel.
37 - samsung,burst-clock-frequency: specifies DSI frequency in high-speed burst 48 - samsung,burst-clock-frequency: specifies DSI frequency in high-speed burst
38 mode 49 mode
39 - samsung,esc-clock-frequency: specifies DSI frequency in escape mode 50 - samsung,esc-clock-frequency: specifies DSI frequency in escape mode
@@ -48,7 +59,7 @@ Example:
48 reg = <0x11C80000 0x10000>; 59 reg = <0x11C80000 0x10000>;
49 interrupts = <0 79 0>; 60 interrupts = <0 79 0>;
50 clocks = <&clock 286>, <&clock 143>; 61 clocks = <&clock 286>, <&clock 143>;
51 clock-names = "bus_clk", "pll_clk"; 62 clock-names = "bus_clk", "sclk_mipi";
52 phys = <&mipi_phy 1>; 63 phys = <&mipi_phy 1>;
53 phy-names = "dsim"; 64 phy-names = "dsim";
54 vddcore-supply = <&vusb_reg>; 65 vddcore-supply = <&vusb_reg>;
@@ -72,7 +83,15 @@ Example:
72 #address-cells = <1>; 83 #address-cells = <1>;
73 #size-cells = <0>; 84 #size-cells = <0>;
74 85
86 port@0 {
87 reg = <0>;
88 decon_to_mic: endpoint {
89 remote-endpoint = <&mic_to_decon>;
90 };
91 };
92
75 port@1 { 93 port@1 {
94 reg = <1>;
76 dsi_ep: endpoint { 95 dsi_ep: endpoint {
77 reg = <0>; 96 reg = <0>;
78 samsung,burst-clock-frequency = <500000000>; 97 samsung,burst-clock-frequency = <500000000>;
diff --git a/Documentation/devicetree/bindings/video/ssd1307fb.txt b/Documentation/devicetree/bindings/video/ssd1307fb.txt
index 7a125427ff4b..d1be78db63f5 100644
--- a/Documentation/devicetree/bindings/video/ssd1307fb.txt
+++ b/Documentation/devicetree/bindings/video/ssd1307fb.txt
@@ -2,7 +2,7 @@
2 2
3Required properties: 3Required properties:
4 - compatible: Should be "solomon,<chip>fb-<bus>". The only supported bus for 4 - compatible: Should be "solomon,<chip>fb-<bus>". The only supported bus for
5 now is i2c, and the supported chips are ssd1306 and ssd1307. 5 now is i2c, and the supported chips are ssd1305, ssd1306 and ssd1307.
6 - reg: Should contain address of the controller on the I2C bus. Most likely 6 - reg: Should contain address of the controller on the I2C bus. Most likely
7 0x3c or 0x3d 7 0x3c or 0x3d
8 - pwm: Should contain the pwm to use according to the OF device tree PWM 8 - pwm: Should contain the pwm to use according to the OF device tree PWM
@@ -15,6 +15,16 @@ Required properties:
15 15
16Optional properties: 16Optional properties:
17 - reset-active-low: Is the reset gpio is active on physical low? 17 - reset-active-low: Is the reset gpio is active on physical low?
18 - solomon,segment-no-remap: Display needs normal (non-inverted) data column
19 to segment mapping
20 - solomon,com-seq: Display uses sequential COM pin configuration
21 - solomon,com-lrremap: Display uses left-right COM pin remap
22 - solomon,com-invdir: Display uses inverted COM pin scan direction
23 - solomon,com-offset: Number of the COM pin wired to the first display line
24 - solomon,prechargep1: Length of deselect period (phase 1) in clock cycles.
25 - solomon,prechargep2: Length of precharge period (phase 2) in clock cycles.
26 This needs to be the higher, the higher the capacitance
27 of the OLED's pixels is
18 28
19[0]: Documentation/devicetree/bindings/pwm/pwm.txt 29[0]: Documentation/devicetree/bindings/pwm/pwm.txt
20 30
@@ -26,3 +36,14 @@ ssd1307: oled@3c {
26 reset-gpios = <&gpio2 7>; 36 reset-gpios = <&gpio2 7>;
27 reset-active-low; 37 reset-active-low;
28}; 38};
39
40ssd1306: oled@3c {
41 compatible = "solomon,ssd1306fb-i2c";
42 reg = <0x3c>;
43 pwms = <&pwm 4 3000>;
44 reset-gpios = <&gpio2 7>;
45 reset-active-low;
46 solomon,com-lrremap;
47 solomon,com-invdir;
48 solomon,com-offset = <32>;
49};
diff --git a/Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt b/Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt
new file mode 100644
index 000000000000..a882967e17d4
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/digicolor-wdt.txt
@@ -0,0 +1,25 @@
1Conexant Digicolor SoCs Watchdog timer
2
3The watchdog functionality in Conexant Digicolor SoCs relies on the so called
4"Agent Communication" block. This block includes the eight programmable system
5timer counters. The first timer (called "Timer A") is the only one that can be
6used as watchdog.
7
8Required properties:
9
10- compatible : Should be "cnxt,cx92755-wdt"
11- reg : Specifies base physical address and size of the registers
12- clocks : phandle; specifies the clock that drives the timer
13
14Optional properties:
15
16- timeout-sec : Contains the watchdog timeout in seconds
17
18Example:
19
20 watchdog@f0000fc0 {
21 compatible = "cnxt,cx92755-wdt";
22 reg = <0xf0000fc0 0x8>;
23 clocks = <&main_clk>;
24 timeout-sec = <15>;
25 };
diff --git a/Documentation/devicetree/bindings/watchdog/omap-wdt.txt b/Documentation/devicetree/bindings/watchdog/omap-wdt.txt
index c227970671ea..1fa20e453a2d 100644
--- a/Documentation/devicetree/bindings/watchdog/omap-wdt.txt
+++ b/Documentation/devicetree/bindings/watchdog/omap-wdt.txt
@@ -1,10 +1,11 @@
1TI Watchdog Timer (WDT) Controller for OMAP 1TI Watchdog Timer (WDT) Controller for OMAP
2 2
3Required properties: 3Required properties:
4compatible: 4- compatible : "ti,omap3-wdt" for OMAP3 or "ti,omap4-wdt" for OMAP4
5- "ti,omap3-wdt" for OMAP3 5- ti,hwmods : Name of the hwmod associated to the WDT
6- "ti,omap4-wdt" for OMAP4 6
7- ti,hwmods: Name of the hwmod associated to the WDT 7Optional properties:
8- timeout-sec : default watchdog timeout in seconds
8 9
9Examples: 10Examples:
10 11
diff --git a/Documentation/devicetree/bindings/watchdog/st_lpc_wdt.txt b/Documentation/devicetree/bindings/watchdog/st_lpc_wdt.txt
new file mode 100644
index 000000000000..388c88a01222
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/st_lpc_wdt.txt
@@ -0,0 +1,38 @@
1STMicroelectronics Low Power Controller (LPC) - Watchdog
2========================================================
3
4LPC currently supports Watchdog OR Real Time Clock functionality.
5
6[See: ../rtc/rtc-st-lpc.txt for RTC options]
7
8Required properties
9
10- compatible : Must be one of: "st,stih407-lpc" "st,stih416-lpc"
11 "st,stih415-lpc" "st,stid127-lpc"
12- reg : LPC registers base address + size
13- interrupts : LPC interrupt line number and associated flags
14- clocks : Clock used by LPC device (See: ../clock/clock-bindings.txt)
15- st,lpc-mode : The LPC can run either one of two modes ST_LPC_MODE_RTC [0] or
16 ST_LPC_MODE_WDT [1]. One (and only one) mode must be
17 selected.
18
19Required properties [watchdog mode]
20
21- st,syscfg : Phandle to syscfg node used to enable watchdog and configure
22 CPU reset type.
23- timeout-sec : Watchdog timeout in seconds
24
25Optional properties [watchdog mode]
26
27- st,warm-reset : If present reset type will be 'warm' - if not it will be cold
28
29Example:
30 lpc@fde05000 {
31 compatible = "st,stih407-lpc";
32 reg = <0xfde05000 0x1000>;
33 clocks = <&clk_s_d3_flexgen CLK_LPC_0>;
34 st,syscfg = <&syscfg_core>;
35 timeout-sec = <120>;
36 st,lpc-mode = <ST_LPC_MODE_WDT>;
37 st,warm-reset;
38 };
diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt
index e49e423268c0..04d34f6a58f3 100644
--- a/Documentation/devicetree/booting-without-of.txt
+++ b/Documentation/devicetree/booting-without-of.txt
@@ -856,6 +856,10 @@ address which can extend beyond that limit.
856 name may clash with standard defined ones, you prefix them with your 856 name may clash with standard defined ones, you prefix them with your
857 vendor name and a comma. 857 vendor name and a comma.
858 858
859 Additional properties for the root node:
860
861 - serial-number : a string representing the device's serial number
862
859 b) The /cpus node 863 b) The /cpus node
860 864
861 This node is the parent of all individual CPU nodes. It doesn't 865 This node is the parent of all individual CPU nodes. It doesn't
diff --git a/Documentation/dmaengine/provider.txt b/Documentation/dmaengine/provider.txt
index 05d2280190f1..ca67b0f04c6e 100644
--- a/Documentation/dmaengine/provider.txt
+++ b/Documentation/dmaengine/provider.txt
@@ -345,11 +345,12 @@ where to put them)
345 that abstracts it away. 345 that abstracts it away.
346 346
347 * DMA_CTRL_ACK 347 * DMA_CTRL_ACK
348 - Undocumented feature 348 - If set, the transfer can be reused after being completed.
349 - No one really has an idea of what it's about, besides being 349 - There is a guarantee the transfer won't be freed until it is acked
350 related to reusing the DMA transaction descriptors or having 350 by async_tx_ack().
351 additional transactions added to it in the async-tx API 351 - As a consequence, if a device driver wants to skip the dma_map_sg() and
352 - Useless in the case of the slave API 352 dma_unmap_sg() in between 2 transfers, because the DMA'd data wasn't used,
353 it can resubmit the transfer right after its completion.
353 354
354General Design Notes 355General Design Notes
355-------------------- 356--------------------
diff --git a/Documentation/dmaengine/pxa_dma.txt b/Documentation/dmaengine/pxa_dma.txt
new file mode 100644
index 000000000000..413ef9cfaa4d
--- /dev/null
+++ b/Documentation/dmaengine/pxa_dma.txt
@@ -0,0 +1,153 @@
1PXA/MMP - DMA Slave controller
2==============================
3
4Constraints
5-----------
6 a) Transfers hot queuing
7 A driver submitting a transfer and issuing it should be granted the transfer
8 is queued even on a running DMA channel.
9 This implies that the queuing doesn't wait for the previous transfer end,
10 and that the descriptor chaining is not only done in the irq/tasklet code
11 triggered by the end of the transfer.
12 A transfer which is submitted and issued on a phy doesn't wait for a phy to
13 stop and restart, but is submitted on a "running channel". The other
14 drivers, especially mmp_pdma waited for the phy to stop before relaunching
15 a new transfer.
16
17 b) All transfers having asked for confirmation should be signaled
18 Any issued transfer with DMA_PREP_INTERRUPT should trigger a callback call.
19 This implies that even if an irq/tasklet is triggered by end of tx1, but
20 at the time of irq/dma tx2 is already finished, tx1->complete() and
21 tx2->complete() should be called.
22
23 c) Channel running state
24 A driver should be able to query if a channel is running or not. For the
25 multimedia case, such as video capture, if a transfer is submitted and then
26 a check of the DMA channel reports a "stopped channel", the transfer should
27 not be issued until the next "start of frame interrupt", hence the need to
28 know if a channel is in running or stopped state.
29
30 d) Bandwidth guarantee
31 The PXA architecture has 4 levels of DMAs priorities : high, normal, low.
32 The high prorities get twice as much bandwidth as the normal, which get twice
33 as much as the low priorities.
34 A driver should be able to request a priority, especially the real-time
35 ones such as pxa_camera with (big) throughputs.
36
37Design
38------
39 a) Virtual channels
40 Same concept as in sa11x0 driver, ie. a driver was assigned a "virtual
41 channel" linked to the requestor line, and the physical DMA channel is
42 assigned on the fly when the transfer is issued.
43
44 b) Transfer anatomy for a scatter-gather transfer
45 +------------+-----+---------------+----------------+-----------------+
46 | desc-sg[0] | ... | desc-sg[last] | status updater | finisher/linker |
47 +------------+-----+---------------+----------------+-----------------+
48
49 This structure is pointed by dma->sg_cpu.
50 The descriptors are used as follows :
51 - desc-sg[i]: i-th descriptor, transferring the i-th sg
52 element to the video buffer scatter gather
53 - status updater
54 Transfers a single u32 to a well known dma coherent memory to leave
55 a trace that this transfer is done. The "well known" is unique per
56 physical channel, meaning that a read of this value will tell which
57 is the last finished transfer at that point in time.
58 - finisher: has ddadr=DADDR_STOP, dcmd=ENDIRQEN
59 - linker: has ddadr= desc-sg[0] of next transfer, dcmd=0
60
61 c) Transfers hot-chaining
62 Suppose the running chain is :
63 Buffer 1 Buffer 2
64 +---------+----+---+ +----+----+----+---+
65 | d0 | .. | dN | l | | d0 | .. | dN | f |
66 +---------+----+-|-+ ^----+----+----+---+
67 | |
68 +----+
69
70 After a call to dmaengine_submit(b3), the chain will look like :
71 Buffer 1 Buffer 2 Buffer 3
72 +---------+----+---+ +----+----+----+---+ +----+----+----+---+
73 | d0 | .. | dN | l | | d0 | .. | dN | l | | d0 | .. | dN | f |
74 +---------+----+-|-+ ^----+----+----+-|-+ ^----+----+----+---+
75 | | | |
76 +----+ +----+
77 new_link
78
79 If while new_link was created the DMA channel stopped, it is _not_
80 restarted. Hot-chaining doesn't break the assumption that
81 dma_async_issue_pending() is to be used to ensure the transfer is actually started.
82
83 One exception to this rule :
84 - if Buffer1 and Buffer2 had all their addresses 8 bytes aligned
85 - and if Buffer3 has at least one address not 4 bytes aligned
86 - then hot-chaining cannot happen, as the channel must be stopped, the
87 "align bit" must be set, and the channel restarted As a consequence,
88 such a transfer tx_submit() will be queued on the submitted queue, and
89 this specific case if the DMA is already running in aligned mode.
90
91 d) Transfers completion updater
92 Each time a transfer is completed on a channel, an interrupt might be
93 generated or not, up to the client's request. But in each case, the last
94 descriptor of a transfer, the "status updater", will write the latest
95 transfer being completed into the physical channel's completion mark.
96
97 This will speed up residue calculation, for large transfers such as video
98 buffers which hold around 6k descriptors or more. This also allows without
99 any lock to find out what is the latest completed transfer in a running
100 DMA chain.
101
102 e) Transfers completion, irq and tasklet
103 When a transfer flagged as "DMA_PREP_INTERRUPT" is finished, the dma irq
104 is raised. Upon this interrupt, a tasklet is scheduled for the physical
105 channel.
106 The tasklet is responsible for :
107 - reading the physical channel last updater mark
108 - calling all the transfer callbacks of finished transfers, based on
109 that mark, and each transfer flags.
110 If a transfer is completed while this handling is done, a dma irq will
111 be raised, and the tasklet will be scheduled once again, having a new
112 updater mark.
113
114 f) Residue
115 Residue granularity will be descriptor based. The issued but not completed
116 transfers will be scanned for all of their descriptors against the
117 currently running descriptor.
118
119 g) Most complicated case of driver's tx queues
120 The most tricky situation is when :
121 - there are not "acked" transfers (tx0)
122 - a driver submitted an aligned tx1, not chained
123 - a driver submitted an aligned tx2 => tx2 is cold chained to tx1
124 - a driver issued tx1+tx2 => channel is running in aligned mode
125 - a driver submitted an aligned tx3 => tx3 is hot-chained
126 - a driver submitted an unaligned tx4 => tx4 is put in submitted queue,
127 not chained
128 - a driver issued tx4 => tx4 is put in issued queue, not chained
129 - a driver submitted an aligned tx5 => tx5 is put in submitted queue, not
130 chained
131 - a driver submitted an aligned tx6 => tx6 is put in submitted queue,
132 cold chained to tx5
133
134 This translates into (after tx4 is issued) :
135 - issued queue
136 +-----+ +-----+ +-----+ +-----+
137 | tx1 | | tx2 | | tx3 | | tx4 |
138 +---|-+ ^---|-+ ^-----+ +-----+
139 | | | |
140 +---+ +---+
141 - submitted queue
142 +-----+ +-----+
143 | tx5 | | tx6 |
144 +---|-+ ^-----+
145 | |
146 +---+
147 - completed queue : empty
148 - allocated queue : tx0
149
150 It should be noted that after tx3 is completed, the channel is stopped, and
151 restarted in "unaligned mode" to handle tx4.
152
153Author: Robert Jarzmik <robert.jarzmik@free.fr>
diff --git a/Documentation/edac.txt b/Documentation/edac.txt
index 73fff13e848f..0cf27a3544a5 100644
--- a/Documentation/edac.txt
+++ b/Documentation/edac.txt
@@ -1,53 +1,34 @@
1
2
3EDAC - Error Detection And Correction 1EDAC - Error Detection And Correction
4 2=====================================
5Written by Doug Thompson <dougthompson@xmission.com>
67 Dec 2005
717 Jul 2007 Updated
8
9(c) Mauro Carvalho Chehab
1005 Aug 2009 Nehalem interface
11
12EDAC is maintained and written by:
13
14 Doug Thompson, Dave Jiang, Dave Peterson et al,
15 original author: Thayne Harbaugh,
16
17Contact:
18 website: bluesmoke.sourceforge.net
19 mailing list: bluesmoke-devel@lists.sourceforge.net
20 3
21"bluesmoke" was the name for this device driver when it was "out-of-tree" 4"bluesmoke" was the name for this device driver when it was "out-of-tree"
22and maintained at sourceforge.net. When it was pushed into 2.6.16 for the 5and maintained at sourceforge.net. When it was pushed into 2.6.16 for the
23first time, it was renamed to 'EDAC'. 6first time, it was renamed to 'EDAC'.
24 7
25The bluesmoke project at sourceforge.net is now utilized as a 'staging area' 8PURPOSE
26for EDAC development, before it is sent upstream to kernel.org 9-------
27
28At the bluesmoke/EDAC project site is a series of quilt patches against
29recent kernels, stored in a SVN repository. For easier downloading, there
30is also a tarball snapshot available.
31 10
32============================================================================ 11The 'edac' kernel module's goal is to detect and report hardware errors
33EDAC PURPOSE 12that occur within the computer system running under linux.
34
35The 'edac' kernel module goal is to detect and report errors that occur
36within the computer system running under linux.
37 13
38MEMORY 14MEMORY
15------
39 16
40In the initial release, memory Correctable Errors (CE) and Uncorrectable 17Memory Correctable Errors (CE) and Uncorrectable Errors (UE) are the
41Errors (UE) are the primary errors being harvested. These types of errors 18primary errors being harvested. These types of errors are harvested by
42are harvested by the 'edac_mc' class of device. 19the 'edac_mc' device.
43 20
44Detecting CE events, then harvesting those events and reporting them, 21Detecting CE events, then harvesting those events and reporting them,
45CAN be a predictor of future UE events. With CE events, the system can 22*can* but must not necessarily be a predictor of future UE events. With
46continue to operate, but with less safety. Preventive maintenance and 23CE events only, the system can and will continue to operate as no data
47proactive part replacement of memory DIMMs exhibiting CEs can reduce 24has been damaged yet.
48the likelihood of the dreaded UE events and system 'panics'. 25
26However, preventive maintenance and proactive part replacement of memory
27DIMMs exhibiting CEs can reduce the likelihood of the dreaded UE events
28and system panics.
49 29
50NON-MEMORY 30OTHER HARDWARE ELEMENTS
31-----------------------
51 32
52A new feature for EDAC, the edac_device class of device, was added in 33A new feature for EDAC, the edac_device class of device, was added in
53the 2.6.23 version of the kernel. 34the 2.6.23 version of the kernel.
@@ -56,70 +37,57 @@ This new device type allows for non-memory type of ECC hardware detectors
56to have their states harvested and presented to userspace via the sysfs 37to have their states harvested and presented to userspace via the sysfs
57interface. 38interface.
58 39
59Some architectures have ECC detectors for L1, L2 and L3 caches, along with DMA 40Some architectures have ECC detectors for L1, L2 and L3 caches,
60engines, fabric switches, main data path switches, interconnections, 41along with DMA engines, fabric switches, main data path switches,
61and various other hardware data paths. If the hardware reports it, then 42interconnections, and various other hardware data paths. If the hardware
62a edac_device device probably can be constructed to harvest and present 43reports it, then a edac_device device probably can be constructed to
63that to userspace. 44harvest and present that to userspace.
64 45
65 46
66PCI BUS SCANNING 47PCI BUS SCANNING
48----------------
67 49
68In addition, PCI Bus Parity and SERR Errors are scanned for on PCI devices 50In addition, PCI devices are scanned for PCI Bus Parity and SERR Errors
69in order to determine if errors are occurring on data transfers. 51in order to determine if errors are occurring during data transfers.
70 52
71The presence of PCI Parity errors must be examined with a grain of salt. 53The presence of PCI Parity errors must be examined with a grain of salt.
72There are several add-in adapters that do NOT follow the PCI specification 54There are several add-in adapters that do *not* follow the PCI specification
73with regards to Parity generation and reporting. The specification says 55with regards to Parity generation and reporting. The specification says
74the vendor should tie the parity status bits to 0 if they do not intend 56the vendor should tie the parity status bits to 0 if they do not intend
75to generate parity. Some vendors do not do this, and thus the parity bit 57to generate parity. Some vendors do not do this, and thus the parity bit
76can "float" giving false positives. 58can "float" giving false positives.
77 59
78In the kernel there is a PCI device attribute located in sysfs that is 60There is a PCI device attribute located in sysfs that is checked by
79checked by the EDAC PCI scanning code. If that attribute is set, 61the EDAC PCI scanning code. If that attribute is set, PCI parity/error
80PCI parity/error scanning is skipped for that device. The attribute 62scanning is skipped for that device. The attribute is:
81is:
82 63
83 broken_parity_status 64 broken_parity_status
84 65
85as is located in /sys/devices/pci<XXX>/0000:XX:YY.Z directories for 66and is located in /sys/devices/pci<XXX>/0000:XX:YY.Z directories for
86PCI devices. 67PCI devices.
87 68
88FUTURE HARDWARE SCANNING
89 69
90EDAC will have future error detectors that will be integrated with 70VERSIONING
91EDAC or added to it, in the following list: 71----------
92
93 MCE Machine Check Exception
94 MCA Machine Check Architecture
95 NMI NMI notification of ECC errors
96 MSRs Machine Specific Register error cases
97 and other mechanisms.
98
99These errors are usually bus errors, ECC errors, thermal throttling
100and the like.
101
102
103============================================================================
104EDAC VERSIONING
105 72
106EDAC is composed of a "core" module (edac_core.ko) and several Memory 73EDAC is composed of a "core" module (edac_core.ko) and several Memory
107Controller (MC) driver modules. On a given system, the CORE 74Controller (MC) driver modules. On a given system, the CORE is loaded
108is loaded and one MC driver will be loaded. Both the CORE and 75and one MC driver will be loaded. Both the CORE and the MC driver (or
109the MC driver (or edac_device driver) have individual versions that reflect 76edac_device driver) have individual versions that reflect current
110current release level of their respective modules. 77release level of their respective modules.
111 78
112Thus, to "report" on what version a system is running, one must report both 79Thus, to "report" on what version a system is running, one must report
113the CORE's and the MC driver's versions. 80both the CORE's and the MC driver's versions.
114 81
115 82
116LOADING 83LOADING
84-------
117 85
118If 'edac' was statically linked with the kernel then no loading is 86If 'edac' was statically linked with the kernel then no loading
119necessary. If 'edac' was built as modules then simply modprobe the 87is necessary. If 'edac' was built as modules then simply modprobe
120'edac' pieces that you need. You should be able to modprobe 88the 'edac' pieces that you need. You should be able to modprobe
121hardware-specific modules and have the dependencies load the necessary core 89hardware-specific modules and have the dependencies load the necessary
122modules. 90core modules.
123 91
124Example: 92Example:
125 93
@@ -129,35 +97,33 @@ loads both the amd76x_edac.ko memory controller module and the edac_mc.ko
129core module. 97core module.
130 98
131 99
132============================================================================ 100SYSFS INTERFACE
133EDAC sysfs INTERFACE 101---------------
134
135EDAC presents a 'sysfs' interface for control, reporting and attribute
136reporting purposes.
137 102
138EDAC lives in the /sys/devices/system/edac directory. 103EDAC presents a 'sysfs' interface for control and reporting purposes. It
104lives in the /sys/devices/system/edac directory.
139 105
140Within this directory there currently reside 2 'edac' components: 106Within this directory there currently reside 2 components:
141 107
142 mc memory controller(s) system 108 mc memory controller(s) system
143 pci PCI control and status system 109 pci PCI control and status system
144 110
145 111
146============================================================================ 112
147Memory Controller (mc) Model 113Memory Controller (mc) Model
114----------------------------
148 115
149First a background on the memory controller's model abstracted in EDAC. 116Each 'mc' device controls a set of DIMM memory modules. These modules
150Each 'mc' device controls a set of DIMM memory modules. These modules are 117are laid out in a Chip-Select Row (csrowX) and Channel table (chX).
151laid out in a Chip-Select Row (csrowX) and Channel table (chX). There can 118There can be multiple csrows and multiple channels.
152be multiple csrows and multiple channels.
153 119
154Memory controllers allow for several csrows, with 8 csrows being a typical value. 120Memory controllers allow for several csrows, with 8 csrows being a
155Yet, the actual number of csrows depends on the electrical "loading" 121typical value. Yet, the actual number of csrows depends on the layout of
156of a given motherboard, memory controller and DIMM characteristics. 122a given motherboard, memory controller and DIMM characteristics.
157 123
158Dual channels allows for 128 bit data transfers to the CPU from memory. 124Dual channels allows for 128 bit data transfers to/from the CPU from/to
159Some newer chipsets allow for more than 2 channels, like Fully Buffered DIMMs 125memory. Some newer chipsets allow for more than 2 channels, like Fully
160(FB-DIMMs). The following example will assume 2 channels: 126Buffered DIMMs (FB-DIMMs). The following example will assume 2 channels:
161 127
162 128
163 Channel 0 Channel 1 129 Channel 0 Channel 1
@@ -179,12 +145,12 @@ for memory DIMMs:
179 DIMM_A1 145 DIMM_A1
180 DIMM_B1 146 DIMM_B1
181 147
182Labels for these slots are usually silk screened on the motherboard. Slots 148Labels for these slots are usually silk-screened on the motherboard.
183labeled 'A' are channel 0 in this example. Slots labeled 'B' 149Slots labeled 'A' are channel 0 in this example. Slots labeled 'B' are
184are channel 1. Notice that there are two csrows possible on a 150channel 1. Notice that there are two csrows possible on a physical DIMM.
185physical DIMM. These csrows are allocated their csrow assignment 151These csrows are allocated their csrow assignment based on the slot into
186based on the slot into which the memory DIMM is placed. Thus, when 1 DIMM 152which the memory DIMM is placed. Thus, when 1 DIMM is placed in each
187is placed in each Channel, the csrows cross both DIMMs. 153Channel, the csrows cross both DIMMs.
188 154
189Memory DIMMs come single or dual "ranked". A rank is a populated csrow. 155Memory DIMMs come single or dual "ranked". A rank is a populated csrow.
190Thus, 2 single ranked DIMMs, placed in slots DIMM_A0 and DIMM_B0 above 156Thus, 2 single ranked DIMMs, placed in slots DIMM_A0 and DIMM_B0 above
@@ -193,8 +159,8 @@ when 2 dual ranked DIMMs are similarly placed, then both csrow0 and
193csrow1 will be populated. The pattern repeats itself for csrow2 and 159csrow1 will be populated. The pattern repeats itself for csrow2 and
194csrow3. 160csrow3.
195 161
196The representation of the above is reflected in the directory tree 162The representation of the above is reflected in the directory
197in EDAC's sysfs interface. Starting in directory 163tree in EDAC's sysfs interface. Starting in directory
198/sys/devices/system/edac/mc each memory controller will be represented 164/sys/devices/system/edac/mc each memory controller will be represented
199by its own 'mcX' directory, where 'X' is the index of the MC. 165by its own 'mcX' directory, where 'X' is the index of the MC.
200 166
@@ -217,34 +183,35 @@ Under each 'mcX' directory each 'csrowX' is again represented by a
217 |->csrow3 183 |->csrow3
218 .... 184 ....
219 185
220Notice that there is no csrow1, which indicates that csrow0 is 186Notice that there is no csrow1, which indicates that csrow0 is composed
221composed of a single ranked DIMMs. This should also apply in both 187of a single ranked DIMMs. This should also apply in both Channels, in
222Channels, in order to have dual-channel mode be operational. Since 188order to have dual-channel mode be operational. Since both csrow2 and
223both csrow2 and csrow3 are populated, this indicates a dual ranked 189csrow3 are populated, this indicates a dual ranked set of DIMMs for
224set of DIMMs for channels 0 and 1. 190channels 0 and 1.
225 191
226 192
227Within each of the 'mcX' and 'csrowX' directories are several 193Within each of the 'mcX' and 'csrowX' directories are several EDAC
228EDAC control and attribute files. 194control and attribute files.
229 195
230============================================================================
231'mcX' DIRECTORIES
232 196
197'mcX' directories
198-----------------
233 199
234In 'mcX' directories are EDAC control and attribute files for 200In 'mcX' directories are EDAC control and attribute files for
235this 'X' instance of the memory controllers. 201this 'X' instance of the memory controllers.
236 202
237For a description of the sysfs API, please see: 203For a description of the sysfs API, please see:
238 Documentation/ABI/testing/sysfs/devices-edac 204 Documentation/ABI/testing/sysfs-devices-edac
205
239 206
240 207
241============================================================================ 208'csrowX' directories
242'csrowX' DIRECTORIES 209--------------------
243 210
244When CONFIG_EDAC_LEGACY_SYSFS is enabled, the sysfs will contain the 211When CONFIG_EDAC_LEGACY_SYSFS is enabled, sysfs will contain the csrowX
245csrowX directories. As this API doesn't work properly for Rambus, FB-DIMMs 212directories. As this API doesn't work properly for Rambus, FB-DIMMs and
246and modern Intel Memory Controllers, this is being deprecated in favor 213modern Intel Memory Controllers, this is being deprecated in favor of
247of dimmX directories. 214dimmX directories.
248 215
249In the 'csrowX' directories are EDAC control and attribute files for 216In the 'csrowX' directories are EDAC control and attribute files for
250this 'X' instance of csrow: 217this 'X' instance of csrow:
@@ -265,18 +232,18 @@ Total Correctable Errors count attribute file:
265 'ce_count' 232 'ce_count'
266 233
267 This attribute file displays the total count of correctable 234 This attribute file displays the total count of correctable
268 errors that have occurred on this csrow. This 235 errors that have occurred on this csrow. This count is very
269 count is very important to examine. CEs provide early 236 important to examine. CEs provide early indications that a
270 indications that a DIMM is beginning to fail. This count 237 DIMM is beginning to fail. This count field should be
271 field should be monitored for non-zero values and report 238 monitored for non-zero values and report such information
272 such information to the system administrator. 239 to the system administrator.
273 240
274 241
275Total memory managed by this csrow attribute file: 242Total memory managed by this csrow attribute file:
276 243
277 'size_mb' 244 'size_mb'
278 245
279 This attribute file displays, in count of megabytes, of memory 246 This attribute file displays, in count of megabytes, the memory
280 that this csrow contains. 247 that this csrow contains.
281 248
282 249
@@ -377,11 +344,13 @@ Channel 1 DIMM Label control file:
377 motherboard specific and determination of this information 344 motherboard specific and determination of this information
378 must occur in userland at this time. 345 must occur in userland at this time.
379 346
380============================================================================ 347
348
381SYSTEM LOGGING 349SYSTEM LOGGING
350--------------
382 351
383If logging for UEs and CEs are enabled then system logs will have 352If logging for UEs and CEs is enabled, then system logs will contain
384error notices indicating errors that have been detected: 353information indicating that errors have been detected:
385 354
386EDAC MC0: CE page 0x283, offset 0xce0, grain 8, syndrome 0x6ec3, row 0, 355EDAC MC0: CE page 0x283, offset 0xce0, grain 8, syndrome 0x6ec3, row 0,
387channel 1 "DIMM_B1": amd76x_edac 356channel 1 "DIMM_B1": amd76x_edac
@@ -404,24 +373,23 @@ The structure of the message is:
404 and then an optional, driver-specific message that may 373 and then an optional, driver-specific message that may
405 have additional information. 374 have additional information.
406 375
407Both UEs and CEs with no info will lack all but memory controller, 376Both UEs and CEs with no info will lack all but memory controller, error
408error type, a notice of "no info" and then an optional, 377type, a notice of "no info" and then an optional, driver-specific error
409driver-specific error message. 378message.
410 379
411 380
412============================================================================
413PCI Bus Parity Detection 381PCI Bus Parity Detection
382------------------------
414 383
415 384On Header Type 00 devices, the primary status is looked at for any
416On Header Type 00 devices the primary status is looked at 385parity error regardless of whether parity is enabled on the device or
417for any parity error regardless of whether Parity is enabled on the 386not. (The spec indicates parity is generated in some cases). On Header
418device. (The spec indicates parity is generated in some cases). 387Type 01 bridges, the secondary status register is also looked at to see
419On Header Type 01 bridges, the secondary status register is also 388if parity occurred on the bus on the other side of the bridge.
420looked at to see if parity occurred on the bus on the other side of
421the bridge.
422 389
423 390
424SYSFS CONFIGURATION 391SYSFS CONFIGURATION
392-------------------
425 393
426Under /sys/devices/system/edac/pci are control and attribute files as follows: 394Under /sys/devices/system/edac/pci are control and attribute files as follows:
427 395
@@ -450,8 +418,9 @@ Parity Count:
450 have been detected. 418 have been detected.
451 419
452 420
453============================================================================ 421
454MODULE PARAMETERS 422MODULE PARAMETERS
423-----------------
455 424
456Panic on UE control file: 425Panic on UE control file:
457 426
@@ -516,7 +485,7 @@ Panic on PCI PARITY Error:
516 'panic_on_pci_parity' 485 'panic_on_pci_parity'
517 486
518 487
519 This control files enables or disables panicking when a parity 488 This control file enables or disables panicking when a parity
520 error has been detected. 489 error has been detected.
521 490
522 491
@@ -530,10 +499,8 @@ Panic on PCI PARITY Error:
530 499
531 500
532 501
533======================================================================= 502EDAC device type
534 503----------------
535
536EDAC_DEVICE type of device
537 504
538In the header file, edac_core.h, there is a series of edac_device structures 505In the header file, edac_core.h, there is a series of edac_device structures
539and APIs for the EDAC_DEVICE. 506and APIs for the EDAC_DEVICE.
@@ -573,6 +540,7 @@ The test_device_edac device adds at least one of its own custom control:
573The symlink points to the 'struct dev' that is registered for this edac_device. 540The symlink points to the 'struct dev' that is registered for this edac_device.
574 541
575INSTANCES 542INSTANCES
543---------
576 544
577One or more instance directories are present. For the 'test_device_edac' case: 545One or more instance directories are present. For the 'test_device_edac' case:
578 546
@@ -586,6 +554,7 @@ counter in deeper subdirectories.
586 ue_count total of UE events of subdirectories 554 ue_count total of UE events of subdirectories
587 555
588BLOCKS 556BLOCKS
557------
589 558
590At the lowest directory level is the 'block' directory. There can be 0, 1 559At the lowest directory level is the 'block' directory. There can be 0, 1
591or more blocks specified in each instance. 560or more blocks specified in each instance.
@@ -617,14 +586,15 @@ The 'test_device_edac' device adds 4 attributes and 1 control:
617 reset all the above counters. 586 reset all the above counters.
618 587
619 588
620Use of the 'test_device_edac' driver should any others to create their own 589Use of the 'test_device_edac' driver should enable any others to create their own
621unique drivers for their hardware systems. 590unique drivers for their hardware systems.
622 591
623The 'test_device_edac' sample driver is located at the 592The 'test_device_edac' sample driver is located at the
624bluesmoke.sourceforge.net project site for EDAC. 593bluesmoke.sourceforge.net project site for EDAC.
625 594
626======================================================================= 595
627NEHALEM USAGE OF EDAC APIs 596NEHALEM USAGE OF EDAC APIs
597--------------------------
628 598
629This chapter documents some EXPERIMENTAL mappings for EDAC API to handle 599This chapter documents some EXPERIMENTAL mappings for EDAC API to handle
630Nehalem EDAC driver. They will likely be changed on future versions 600Nehalem EDAC driver. They will likely be changed on future versions
@@ -633,7 +603,7 @@ of the driver.
633Due to the way Nehalem exports Memory Controller data, some adjustments 603Due to the way Nehalem exports Memory Controller data, some adjustments
634were done at i7core_edac driver. This chapter will cover those differences 604were done at i7core_edac driver. This chapter will cover those differences
635 605
6361) On Nehalem, there are one Memory Controller per Quick Patch Interconnect 6061) On Nehalem, there is one Memory Controller per Quick Patch Interconnect
637 (QPI). At the driver, the term "socket" means one QPI. This is 607 (QPI). At the driver, the term "socket" means one QPI. This is
638 associated with a physical CPU socket. 608 associated with a physical CPU socket.
639 609
@@ -642,7 +612,7 @@ were done at i7core_edac driver. This chapter will cover those differences
642 Each channel can have up to 3 DIMMs. 612 Each channel can have up to 3 DIMMs.
643 613
644 The minimum known unity is DIMMs. There are no information about csrows. 614 The minimum known unity is DIMMs. There are no information about csrows.
645 As EDAC API maps the minimum unity is csrows, the driver sequencially 615 As EDAC API maps the minimum unity is csrows, the driver sequentially
646 maps channel/dimm into different csrows. 616 maps channel/dimm into different csrows.
647 617
648 For example, supposing the following layout: 618 For example, supposing the following layout:
@@ -664,7 +634,7 @@ exports one
664 634
665 Each QPI is exported as a different memory controller. 635 Each QPI is exported as a different memory controller.
666 636
6672) Nehalem MC has the hability to generate errors. The driver implements this 6372) Nehalem MC has the ability to generate errors. The driver implements this
668 functionality via some error injection nodes: 638 functionality via some error injection nodes:
669 639
670 For injecting a memory error, there are some sysfs nodes, under 640 For injecting a memory error, there are some sysfs nodes, under
@@ -771,5 +741,22 @@ exports one
771 741
772 The standard error counters are generated when an mcelog error is received 742 The standard error counters are generated when an mcelog error is received
773 by the driver. Since, with udimm, this is counted by software, it is 743 by the driver. Since, with udimm, this is counted by software, it is
774 possible that some errors could be lost. With rdimm's, they displays the 744 possible that some errors could be lost. With rdimm's, they display the
775 contents of the registers 745 contents of the registers
746
747CREDITS:
748========
749
750Written by Doug Thompson <dougthompson@xmission.com>
7517 Dec 2005
75217 Jul 2007 Updated
753
754(c) Mauro Carvalho Chehab
75505 Aug 2009 Nehalem interface
756
757EDAC authors/maintainers:
758
759 Doug Thompson, Dave Jiang, Dave Peterson et al,
760 Mauro Carvalho Chehab
761 Borislav Petkov
762 original author: Thayne Harbaugh
diff --git a/Documentation/features/arch-support.txt b/Documentation/features/arch-support.txt
new file mode 100644
index 000000000000..d22a1095e661
--- /dev/null
+++ b/Documentation/features/arch-support.txt
@@ -0,0 +1,11 @@
1
2For generic kernel features that need architecture support, the
3arch-support.txt file in each feature directory shows the arch
4support matrix, for all upstream Linux architectures.
5
6The meaning of entries in the tables is:
7
8 | ok | # feature supported by the architecture
9 |TODO| # feature not yet supported by the architecture
10 | .. | # feature cannot be supported by the hardware
11
diff --git a/Documentation/features/core/BPF-JIT/arch-support.txt b/Documentation/features/core/BPF-JIT/arch-support.txt
new file mode 100644
index 000000000000..c1b4f917238f
--- /dev/null
+++ b/Documentation/features/core/BPF-JIT/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: BPF-JIT
3# Kconfig: HAVE_BPF_JIT
4# description: arch supports BPF JIT optimizations
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | ok |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/core/generic-idle-thread/arch-support.txt b/Documentation/features/core/generic-idle-thread/arch-support.txt
new file mode 100644
index 000000000000..6d930fcbe519
--- /dev/null
+++ b/Documentation/features/core/generic-idle-thread/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: generic-idle-thread
3# Kconfig: GENERIC_SMP_IDLE_THREAD
4# description: arch makes use of the generic SMP idle thread facility
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | ok |
10 | arc: | ok |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | ok |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | ok |
20 | ia64: | ok |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | ok |
24 | microblaze: | TODO |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | ok |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | ok |
34 | sparc: | ok |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | ok |
40 -----------------------
diff --git a/Documentation/features/core/jump-labels/arch-support.txt b/Documentation/features/core/jump-labels/arch-support.txt
new file mode 100644
index 000000000000..136868b636e6
--- /dev/null
+++ b/Documentation/features/core/jump-labels/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: jump-labels
3# Kconfig: HAVE_ARCH_JUMP_LABEL
4# description: arch supports live patched, high efficiency branches
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | ok |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/core/tracehook/arch-support.txt b/Documentation/features/core/tracehook/arch-support.txt
new file mode 100644
index 000000000000..728061d763b1
--- /dev/null
+++ b/Documentation/features/core/tracehook/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: tracehook
3# Kconfig: HAVE_ARCH_TRACEHOOK
4# description: arch supports tracehook (ptrace) register handling APIs
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | ok |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | ok |
15 | c6x: | ok |
16 | cris: | TODO |
17 | frv: | ok |
18 | h8300: | TODO |
19 | hexagon: | ok |
20 | ia64: | ok |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | ok |
24 | microblaze: | TODO |
25 | mips: | ok |
26 | mn10300: | ok |
27 | nios2: | ok |
28 | openrisc: | ok |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | ok |
34 | sparc: | ok |
35 | tile: | ok |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/debug/KASAN/arch-support.txt b/Documentation/features/debug/KASAN/arch-support.txt
new file mode 100644
index 000000000000..14531da2fb54
--- /dev/null
+++ b/Documentation/features/debug/KASAN/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: KASAN
3# Kconfig: HAVE_ARCH_KASAN
4# description: arch supports the KASAN runtime memory checker
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | TODO |
12 | arm64: | TODO |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | TODO |
31 | s390: | TODO |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/debug/gcov-profile-all/arch-support.txt b/Documentation/features/debug/gcov-profile-all/arch-support.txt
new file mode 100644
index 000000000000..38dea8eeba0a
--- /dev/null
+++ b/Documentation/features/debug/gcov-profile-all/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: gcov-profile-all
3# Kconfig: ARCH_HAS_GCOV_PROFILE_ALL
4# description: arch supports whole-kernel GCOV code coverage profiling
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | ok |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | ok |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/debug/kgdb/arch-support.txt b/Documentation/features/debug/kgdb/arch-support.txt
new file mode 100644
index 000000000000..862e15d6f79e
--- /dev/null
+++ b/Documentation/features/debug/kgdb/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: kgdb
3# Kconfig: HAVE_ARCH_KGDB
4# description: arch supports the kGDB kernel debugger
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | ok |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | ok |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | ok |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | ok |
25 | mips: | ok |
26 | mn10300: | ok |
27 | nios2: | ok |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | TODO |
32 | score: | TODO |
33 | sh: | ok |
34 | sparc: | ok |
35 | tile: | ok |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/debug/kprobes-on-ftrace/arch-support.txt b/Documentation/features/debug/kprobes-on-ftrace/arch-support.txt
new file mode 100644
index 000000000000..40f44d041fb4
--- /dev/null
+++ b/Documentation/features/debug/kprobes-on-ftrace/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: kprobes-on-ftrace
3# Kconfig: HAVE_KPROBES_ON_FTRACE
4# description: arch supports combined kprobes and ftrace live patching
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | TODO |
12 | arm64: | TODO |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | TODO |
31 | s390: | TODO |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/debug/kprobes/arch-support.txt b/Documentation/features/debug/kprobes/arch-support.txt
new file mode 100644
index 000000000000..a44bfff6940b
--- /dev/null
+++ b/Documentation/features/debug/kprobes/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: kprobes
3# Kconfig: HAVE_KPROBES
4# description: arch supports live patched kernel probe
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | ok |
11 | arm: | ok |
12 | arm64: | TODO |
13 | avr32: | ok |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | ok |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | ok |
34 | sparc: | ok |
35 | tile: | ok |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/debug/kretprobes/arch-support.txt b/Documentation/features/debug/kretprobes/arch-support.txt
new file mode 100644
index 000000000000..d87c1ce24204
--- /dev/null
+++ b/Documentation/features/debug/kretprobes/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: kretprobes
3# Kconfig: HAVE_KRETPROBES
4# description: arch supports kernel function-return probes
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | ok |
11 | arm: | ok |
12 | arm64: | TODO |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | ok |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | ok |
34 | sparc: | ok |
35 | tile: | ok |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/debug/optprobes/arch-support.txt b/Documentation/features/debug/optprobes/arch-support.txt
new file mode 100644
index 000000000000..b8999d8544ca
--- /dev/null
+++ b/Documentation/features/debug/optprobes/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: optprobes
3# Kconfig: HAVE_OPTPROBES
4# description: arch supports live patched optprobes
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | TODO |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | TODO |
31 | s390: | TODO |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | TODO |
35 | tile: | ok |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/debug/stackprotector/arch-support.txt b/Documentation/features/debug/stackprotector/arch-support.txt
new file mode 100644
index 000000000000..0fa423313409
--- /dev/null
+++ b/Documentation/features/debug/stackprotector/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: stackprotector
3# Kconfig: HAVE_CC_STACKPROTECTOR
4# description: arch supports compiler driven stack overflow protection
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | TODO |
31 | s390: | TODO |
32 | score: | TODO |
33 | sh: | ok |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/debug/uprobes/arch-support.txt b/Documentation/features/debug/uprobes/arch-support.txt
new file mode 100644
index 000000000000..4efe36c3ace9
--- /dev/null
+++ b/Documentation/features/debug/uprobes/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: uprobes
3# Kconfig: ARCH_SUPPORTS_UPROBES
4# description: arch supports live patched user probes
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | TODO |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/debug/user-ret-profiler/arch-support.txt b/Documentation/features/debug/user-ret-profiler/arch-support.txt
new file mode 100644
index 000000000000..44cc1ff3f603
--- /dev/null
+++ b/Documentation/features/debug/user-ret-profiler/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: user-ret-profiler
3# Kconfig: HAVE_USER_RETURN_NOTIFIER
4# description: arch supports user-space return from system call profiler
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | TODO |
12 | arm64: | TODO |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | TODO |
31 | s390: | TODO |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | TODO |
35 | tile: | ok |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/io/dma-api-debug/arch-support.txt b/Documentation/features/io/dma-api-debug/arch-support.txt
new file mode 100644
index 000000000000..4f4a3443b114
--- /dev/null
+++ b/Documentation/features/io/dma-api-debug/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: dma-api-debug
3# Kconfig: HAVE_DMA_API_DEBUG
4# description: arch supports DMA debug facilities
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | ok |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | ok |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | ok |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | ok |
34 | sparc: | ok |
35 | tile: | ok |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/io/dma-contiguous/arch-support.txt b/Documentation/features/io/dma-contiguous/arch-support.txt
new file mode 100644
index 000000000000..a97e8e3f4ebb
--- /dev/null
+++ b/Documentation/features/io/dma-contiguous/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: dma-contiguous
3# Kconfig: HAVE_DMA_CONTIGUOUS
4# description: arch supports the DMA CMA (continuous memory allocator)
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | TODO |
31 | s390: | TODO |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/io/dma_map_attrs/arch-support.txt b/Documentation/features/io/dma_map_attrs/arch-support.txt
new file mode 100644
index 000000000000..51d0f1c02a3e
--- /dev/null
+++ b/Documentation/features/io/dma_map_attrs/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: dma_map_attrs
3# Kconfig: HAVE_DMA_ATTRS
4# description: arch provides dma_*map*_attrs() APIs
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | ok |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | ok |
19 | hexagon: | ok |
20 | ia64: | ok |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | ok |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | ok |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | ok |
34 | sparc: | ok |
35 | tile: | ok |
36 | um: | TODO |
37 | unicore32: | ok |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/io/sg-chain/arch-support.txt b/Documentation/features/io/sg-chain/arch-support.txt
new file mode 100644
index 000000000000..b9b675539b9d
--- /dev/null
+++ b/Documentation/features/io/sg-chain/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: sg-chain
3# Kconfig: ARCH_HAS_SG_CHAIN
4# description: arch supports chained scatter-gather lists
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | ok |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | ok |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/lib/strncasecmp/arch-support.txt b/Documentation/features/lib/strncasecmp/arch-support.txt
new file mode 100644
index 000000000000..12b1c9358e57
--- /dev/null
+++ b/Documentation/features/lib/strncasecmp/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: strncasecmp
3# Kconfig: __HAVE_ARCH_STRNCASECMP
4# description: arch provides an optimized strncasecmp() function
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | TODO |
12 | arm64: | TODO |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | TODO |
31 | s390: | TODO |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | TODO |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/list-arch.sh b/Documentation/features/list-arch.sh
new file mode 100755
index 000000000000..6065124a072f
--- /dev/null
+++ b/Documentation/features/list-arch.sh
@@ -0,0 +1,24 @@
1#
2# Small script that visualizes the kernel feature support status
3# of an architecture.
4#
5# (If no arguments are given then it will print the host architecture's status.)
6#
7
8ARCH=${1:-$(arch | sed 's/x86_64/x86/' | sed 's/i386/x86/')}
9
10cd $(dirname $0)
11echo "#"
12echo "# Kernel feature support matrix of the '$ARCH' architecture:"
13echo "#"
14
15for F in */*/arch-support.txt; do
16 SUBSYS=$(echo $F | cut -d/ -f1)
17 N=$(grep -h "^# Feature name:" $F | cut -c25-)
18 C=$(grep -h "^# Kconfig:" $F | cut -c25-)
19 D=$(grep -h "^# description:" $F | cut -c25-)
20 S=$(grep -hw $ARCH $F | cut -d\| -f3)
21
22 printf "%10s/%-22s:%s| %35s # %s\n" "$SUBSYS" "$N" "$S" "$C" "$D"
23done
24
diff --git a/Documentation/features/locking/cmpxchg-local/arch-support.txt b/Documentation/features/locking/cmpxchg-local/arch-support.txt
new file mode 100644
index 000000000000..d9c310889bc1
--- /dev/null
+++ b/Documentation/features/locking/cmpxchg-local/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: cmpxchg-local
3# Kconfig: HAVE_CMPXCHG_LOCAL
4# description: arch supports the this_cpu_cmpxchg() API
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | TODO |
12 | arm64: | TODO |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | TODO |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/locking/lockdep/arch-support.txt b/Documentation/features/locking/lockdep/arch-support.txt
new file mode 100644
index 000000000000..cf90635bdcbb
--- /dev/null
+++ b/Documentation/features/locking/lockdep/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: lockdep
3# Kconfig: LOCKDEP_SUPPORT
4# description: arch supports the runtime locking correctness debug facility
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | ok |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | ok |
14 | blackfin: | ok |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | ok |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | ok |
24 | microblaze: | ok |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | ok |
33 | sh: | ok |
34 | sparc: | ok |
35 | tile: | ok |
36 | um: | ok |
37 | unicore32: | ok |
38 | x86: | ok |
39 | xtensa: | ok |
40 -----------------------
diff --git a/Documentation/features/locking/queued-rwlocks/arch-support.txt b/Documentation/features/locking/queued-rwlocks/arch-support.txt
new file mode 100644
index 000000000000..68c3a5ddd9b9
--- /dev/null
+++ b/Documentation/features/locking/queued-rwlocks/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: queued-rwlocks
3# Kconfig: ARCH_USE_QUEUED_RWLOCKS
4# description: arch supports queued rwlocks
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | TODO |
12 | arm64: | TODO |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | TODO |
31 | s390: | TODO |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/locking/queued-spinlocks/arch-support.txt b/Documentation/features/locking/queued-spinlocks/arch-support.txt
new file mode 100644
index 000000000000..e973b1a9572f
--- /dev/null
+++ b/Documentation/features/locking/queued-spinlocks/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: queued-spinlocks
3# Kconfig: ARCH_USE_QUEUED_SPINLOCKS
4# description: arch supports queued spinlocks
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | TODO |
12 | arm64: | TODO |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | TODO |
31 | s390: | TODO |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/locking/rwsem-optimized/arch-support.txt b/Documentation/features/locking/rwsem-optimized/arch-support.txt
new file mode 100644
index 000000000000..ac93d7ab66c4
--- /dev/null
+++ b/Documentation/features/locking/rwsem-optimized/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: rwsem-optimized
3# Kconfig: Optimized asm/rwsem.h
4# description: arch provides optimized rwsem APIs
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | ok |
10 | arc: | TODO |
11 | arm: | TODO |
12 | arm64: | TODO |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | ok |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | TODO |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | ok |
34 | sparc: | ok |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | ok |
40 -----------------------
diff --git a/Documentation/features/perf/kprobes-event/arch-support.txt b/Documentation/features/perf/kprobes-event/arch-support.txt
new file mode 100644
index 000000000000..9855ad044386
--- /dev/null
+++ b/Documentation/features/perf/kprobes-event/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: kprobes-event
3# Kconfig: HAVE_REGS_AND_STACK_ACCESS_API
4# description: arch supports kprobes with perf events
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | TODO |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | ok |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | ok |
34 | sparc: | TODO |
35 | tile: | ok |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/perf/perf-regs/arch-support.txt b/Documentation/features/perf/perf-regs/arch-support.txt
new file mode 100644
index 000000000000..e2b4a78ec543
--- /dev/null
+++ b/Documentation/features/perf/perf-regs/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: perf-regs
3# Kconfig: HAVE_PERF_REGS
4# description: arch supports perf events register access
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | TODO |
31 | s390: | TODO |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/perf/perf-stackdump/arch-support.txt b/Documentation/features/perf/perf-stackdump/arch-support.txt
new file mode 100644
index 000000000000..3dc24b0673c0
--- /dev/null
+++ b/Documentation/features/perf/perf-stackdump/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: perf-stackdump
3# Kconfig: HAVE_PERF_USER_STACK_DUMP
4# description: arch supports perf events stack dumps
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | TODO |
31 | s390: | TODO |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/sched/numa-balancing/arch-support.txt b/Documentation/features/sched/numa-balancing/arch-support.txt
new file mode 100644
index 000000000000..ac7cd6b1502b
--- /dev/null
+++ b/Documentation/features/sched/numa-balancing/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: numa-balancing
3# Kconfig: ARCH_SUPPORTS_NUMA_BALANCING
4# description: arch supports NUMA balancing
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | .. |
11 | arm: | .. |
12 | arm64: | .. |
13 | avr32: | .. |
14 | blackfin: | .. |
15 | c6x: | .. |
16 | cris: | .. |
17 | frv: | .. |
18 | h8300: | .. |
19 | hexagon: | .. |
20 | ia64: | TODO |
21 | m32r: | .. |
22 | m68k: | .. |
23 | metag: | .. |
24 | microblaze: | .. |
25 | mips: | TODO |
26 | mn10300: | .. |
27 | nios2: | .. |
28 | openrisc: | .. |
29 | parisc: | .. |
30 | powerpc: | ok |
31 | s390: | .. |
32 | score: | .. |
33 | sh: | .. |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | .. |
37 | unicore32: | .. |
38 | x86: | ok |
39 | xtensa: | .. |
40 -----------------------
diff --git a/Documentation/features/seccomp/seccomp-filter/arch-support.txt b/Documentation/features/seccomp/seccomp-filter/arch-support.txt
new file mode 100644
index 000000000000..bea800910342
--- /dev/null
+++ b/Documentation/features/seccomp/seccomp-filter/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: seccomp-filter
3# Kconfig: HAVE_ARCH_SECCOMP_FILTER
4# description: arch supports seccomp filters
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | TODO |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/time/arch-tick-broadcast/arch-support.txt b/Documentation/features/time/arch-tick-broadcast/arch-support.txt
new file mode 100644
index 000000000000..8acb439a4a17
--- /dev/null
+++ b/Documentation/features/time/arch-tick-broadcast/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: arch-tick-broadcast
3# Kconfig: ARCH_HAS_TICK_BROADCAST
4# description: arch provides tick_broadcast()
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | TODO |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | TODO |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/time/clockevents/arch-support.txt b/Documentation/features/time/clockevents/arch-support.txt
new file mode 100644
index 000000000000..ff670b2207f1
--- /dev/null
+++ b/Documentation/features/time/clockevents/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: clockevents
3# Kconfig: GENERIC_CLOCKEVENTS
4# description: arch support generic clock events
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | ok |
10 | arc: | ok |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | ok |
14 | blackfin: | ok |
15 | c6x: | ok |
16 | cris: | ok |
17 | frv: | TODO |
18 | h8300: | ok |
19 | hexagon: | ok |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | ok |
23 | metag: | ok |
24 | microblaze: | ok |
25 | mips: | ok |
26 | mn10300: | ok |
27 | nios2: | ok |
28 | openrisc: | ok |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | ok |
33 | sh: | ok |
34 | sparc: | ok |
35 | tile: | ok |
36 | um: | ok |
37 | unicore32: | ok |
38 | x86: | ok |
39 | xtensa: | ok |
40 -----------------------
diff --git a/Documentation/features/time/context-tracking/arch-support.txt b/Documentation/features/time/context-tracking/arch-support.txt
new file mode 100644
index 000000000000..a1e3eea7003f
--- /dev/null
+++ b/Documentation/features/time/context-tracking/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: context-tracking
3# Kconfig: HAVE_CONTEXT_TRACKING
4# description: arch supports context tracking for NO_HZ_FULL
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | TODO |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | ok |
35 | tile: | ok |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/time/irq-time-acct/arch-support.txt b/Documentation/features/time/irq-time-acct/arch-support.txt
new file mode 100644
index 000000000000..e63316239938
--- /dev/null
+++ b/Documentation/features/time/irq-time-acct/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: irq-time-acct
3# Kconfig: HAVE_IRQ_TIME_ACCOUNTING
4# description: arch supports precise IRQ time accounting
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | .. |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | .. |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | .. |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | .. |
30 | powerpc: | .. |
31 | s390: | .. |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | .. |
35 | tile: | .. |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | ok |
40 -----------------------
diff --git a/Documentation/features/time/modern-timekeeping/arch-support.txt b/Documentation/features/time/modern-timekeeping/arch-support.txt
new file mode 100644
index 000000000000..17f68a02e84d
--- /dev/null
+++ b/Documentation/features/time/modern-timekeeping/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: modern-timekeeping
3# Kconfig: !ARCH_USES_GETTIMEOFFSET
4# description: arch does not use arch_gettimeoffset() anymore
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | ok |
10 | arc: | ok |
11 | arm: | TODO |
12 | arm64: | ok |
13 | avr32: | ok |
14 | blackfin: | TODO |
15 | c6x: | ok |
16 | cris: | TODO |
17 | frv: | ok |
18 | h8300: | ok |
19 | hexagon: | ok |
20 | ia64: | ok |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | ok |
24 | microblaze: | ok |
25 | mips: | ok |
26 | mn10300: | ok |
27 | nios2: | ok |
28 | openrisc: | ok |
29 | parisc: | ok |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | ok |
33 | sh: | ok |
34 | sparc: | ok |
35 | tile: | ok |
36 | um: | ok |
37 | unicore32: | ok |
38 | x86: | ok |
39 | xtensa: | ok |
40 -----------------------
diff --git a/Documentation/features/time/virt-cpuacct/arch-support.txt b/Documentation/features/time/virt-cpuacct/arch-support.txt
new file mode 100644
index 000000000000..cf3c3e383d15
--- /dev/null
+++ b/Documentation/features/time/virt-cpuacct/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: virt-cpuacct
3# Kconfig: HAVE_VIRT_CPU_ACCOUNTING
4# description: arch supports precise virtual CPU time accounting
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | ok |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | ok |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | ok |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | ok |
35 | tile: | ok |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/vm/ELF-ASLR/arch-support.txt b/Documentation/features/vm/ELF-ASLR/arch-support.txt
new file mode 100644
index 000000000000..ec4dd28e1297
--- /dev/null
+++ b/Documentation/features/vm/ELF-ASLR/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: ELF-ASLR
3# Kconfig: ARCH_HAS_ELF_RANDOMIZE
4# description: arch randomizes the stack, heap and binary images of ELF binaries
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/vm/PG_uncached/arch-support.txt b/Documentation/features/vm/PG_uncached/arch-support.txt
new file mode 100644
index 000000000000..991974275a3e
--- /dev/null
+++ b/Documentation/features/vm/PG_uncached/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: PG_uncached
3# Kconfig: ARCH_USES_PG_UNCACHED
4# description: arch supports the PG_uncached page flag
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | TODO |
12 | arm64: | TODO |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | ok |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | TODO |
31 | s390: | TODO |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/vm/THP/arch-support.txt b/Documentation/features/vm/THP/arch-support.txt
new file mode 100644
index 000000000000..972d02c2a74c
--- /dev/null
+++ b/Documentation/features/vm/THP/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: THP
3# Kconfig: HAVE_ARCH_TRANSPARENT_HUGEPAGE
4# description: arch supports transparent hugepages
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | .. |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | .. |
14 | blackfin: | .. |
15 | c6x: | .. |
16 | cris: | .. |
17 | frv: | .. |
18 | h8300: | .. |
19 | hexagon: | .. |
20 | ia64: | TODO |
21 | m32r: | .. |
22 | m68k: | .. |
23 | metag: | .. |
24 | microblaze: | .. |
25 | mips: | ok |
26 | mn10300: | .. |
27 | nios2: | .. |
28 | openrisc: | .. |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | .. |
33 | sh: | .. |
34 | sparc: | ok |
35 | tile: | TODO |
36 | um: | .. |
37 | unicore32: | .. |
38 | x86: | ok |
39 | xtensa: | .. |
40 -----------------------
diff --git a/Documentation/features/vm/huge-vmap/arch-support.txt b/Documentation/features/vm/huge-vmap/arch-support.txt
new file mode 100644
index 000000000000..af6816bccb43
--- /dev/null
+++ b/Documentation/features/vm/huge-vmap/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: huge-vmap
3# Kconfig: HAVE_ARCH_HUGE_VMAP
4# description: arch supports the ioremap_pud_enabled() and ioremap_pmd_enabled() VM APIs
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | TODO |
12 | arm64: | TODO |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | TODO |
31 | s390: | TODO |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/vm/ioremap_prot/arch-support.txt b/Documentation/features/vm/ioremap_prot/arch-support.txt
new file mode 100644
index 000000000000..90c53749fde7
--- /dev/null
+++ b/Documentation/features/vm/ioremap_prot/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: ioremap_prot
3# Kconfig: HAVE_IOREMAP_PROT
4# description: arch has ioremap_prot()
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | ok |
11 | arm: | TODO |
12 | arm64: | TODO |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | TODO |
32 | score: | TODO |
33 | sh: | ok |
34 | sparc: | TODO |
35 | tile: | ok |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/vm/numa-memblock/arch-support.txt b/Documentation/features/vm/numa-memblock/arch-support.txt
new file mode 100644
index 000000000000..e7c252a0c531
--- /dev/null
+++ b/Documentation/features/vm/numa-memblock/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: numa-memblock
3# Kconfig: HAVE_MEMBLOCK_NODE_MAP
4# description: arch supports NUMA aware memblocks
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | .. |
11 | arm: | .. |
12 | arm64: | .. |
13 | avr32: | .. |
14 | blackfin: | .. |
15 | c6x: | .. |
16 | cris: | .. |
17 | frv: | .. |
18 | h8300: | .. |
19 | hexagon: | .. |
20 | ia64: | ok |
21 | m32r: | TODO |
22 | m68k: | .. |
23 | metag: | ok |
24 | microblaze: | ok |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | .. |
28 | openrisc: | .. |
29 | parisc: | .. |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | ok |
33 | sh: | ok |
34 | sparc: | ok |
35 | tile: | TODO |
36 | um: | .. |
37 | unicore32: | .. |
38 | x86: | ok |
39 | xtensa: | .. |
40 -----------------------
diff --git a/Documentation/features/vm/pmdp_splitting_flush/arch-support.txt b/Documentation/features/vm/pmdp_splitting_flush/arch-support.txt
new file mode 100644
index 000000000000..26f74b457e0b
--- /dev/null
+++ b/Documentation/features/vm/pmdp_splitting_flush/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: pmdp_splitting_flush
3# Kconfig: __HAVE_ARCH_PMDP_SPLITTING_FLUSH
4# description: arch supports the pmdp_splitting_flush() VM API
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | ok |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | TODO |
34 | sparc: | TODO |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/features/vm/pte_special/arch-support.txt b/Documentation/features/vm/pte_special/arch-support.txt
new file mode 100644
index 000000000000..aaaa21db6226
--- /dev/null
+++ b/Documentation/features/vm/pte_special/arch-support.txt
@@ -0,0 +1,40 @@
1#
2# Feature name: pte_special
3# Kconfig: __HAVE_ARCH_PTE_SPECIAL
4# description: arch supports the pte_special()/pte_mkspecial() VM APIs
5#
6 -----------------------
7 | arch |status|
8 -----------------------
9 | alpha: | TODO |
10 | arc: | TODO |
11 | arm: | ok |
12 | arm64: | ok |
13 | avr32: | TODO |
14 | blackfin: | TODO |
15 | c6x: | TODO |
16 | cris: | TODO |
17 | frv: | TODO |
18 | h8300: | TODO |
19 | hexagon: | TODO |
20 | ia64: | TODO |
21 | m32r: | TODO |
22 | m68k: | TODO |
23 | metag: | TODO |
24 | microblaze: | TODO |
25 | mips: | TODO |
26 | mn10300: | TODO |
27 | nios2: | TODO |
28 | openrisc: | TODO |
29 | parisc: | TODO |
30 | powerpc: | ok |
31 | s390: | ok |
32 | score: | TODO |
33 | sh: | ok |
34 | sparc: | ok |
35 | tile: | TODO |
36 | um: | TODO |
37 | unicore32: | TODO |
38 | x86: | ok |
39 | xtensa: | TODO |
40 -----------------------
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 0a926e2ba3ab..6a34a0f4d37c 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -50,8 +50,8 @@ prototypes:
50 int (*rename2) (struct inode *, struct dentry *, 50 int (*rename2) (struct inode *, struct dentry *,
51 struct inode *, struct dentry *, unsigned int); 51 struct inode *, struct dentry *, unsigned int);
52 int (*readlink) (struct dentry *, char __user *,int); 52 int (*readlink) (struct dentry *, char __user *,int);
53 void * (*follow_link) (struct dentry *, struct nameidata *); 53 const char *(*follow_link) (struct dentry *, void **);
54 void (*put_link) (struct dentry *, struct nameidata *, void *); 54 void (*put_link) (struct inode *, void *);
55 void (*truncate) (struct inode *); 55 void (*truncate) (struct inode *);
56 int (*permission) (struct inode *, int, unsigned int); 56 int (*permission) (struct inode *, int, unsigned int);
57 int (*get_acl)(struct inode *, int); 57 int (*get_acl)(struct inode *, int);
diff --git a/Documentation/filesystems/automount-support.txt b/Documentation/filesystems/automount-support.txt
index 7cac200e2a85..7eb762eb3136 100644
--- a/Documentation/filesystems/automount-support.txt
+++ b/Documentation/filesystems/automount-support.txt
@@ -1,41 +1,15 @@
1Support is available for filesystems that wish to do automounting support (such 1Support is available for filesystems that wish to do automounting
2as kAFS which can be found in fs/afs/). This facility includes allowing 2support (such as kAFS which can be found in fs/afs/ and NFS in
3in-kernel mounts to be performed and mountpoint degradation to be 3fs/nfs/). This facility includes allowing in-kernel mounts to be
4requested. The latter can also be requested by userspace. 4performed and mountpoint degradation to be requested. The latter can
5also be requested by userspace.
5 6
6 7
7====================== 8======================
8IN-KERNEL AUTOMOUNTING 9IN-KERNEL AUTOMOUNTING
9====================== 10======================
10 11
11A filesystem can now mount another filesystem on one of its directories by the 12See section "Mount Traps" of Documentation/filesystems/autofs4.txt
12following procedure:
13
14 (1) Give the directory a follow_link() operation.
15
16 When the directory is accessed, the follow_link op will be called, and
17 it will be provided with the location of the mountpoint in the nameidata
18 structure (vfsmount and dentry).
19
20 (2) Have the follow_link() op do the following steps:
21
22 (a) Call vfs_kern_mount() to call the appropriate filesystem to set up a
23 superblock and gain a vfsmount structure representing it.
24
25 (b) Copy the nameidata provided as an argument and substitute the dentry
26 argument into it the copy.
27
28 (c) Call do_add_mount() to install the new vfsmount into the namespace's
29 mountpoint tree, thus making it accessible to userspace. Use the
30 nameidata set up in (b) as the destination.
31
32 If the mountpoint will be automatically expired, then do_add_mount()
33 should also be given the location of an expiration list (see further
34 down).
35
36 (d) Release the path in the nameidata argument and substitute in the new
37 vfsmount and its root dentry. The ref counts on these will need
38 incrementing.
39 13
40Then from userspace, you can just do something like: 14Then from userspace, you can just do something like:
41 15
@@ -61,17 +35,18 @@ AUTOMATIC MOUNTPOINT EXPIRY
61=========================== 35===========================
62 36
63Automatic expiration of mountpoints is easy, provided you've mounted the 37Automatic expiration of mountpoints is easy, provided you've mounted the
64mountpoint to be expired in the automounting procedure outlined above. 38mountpoint to be expired in the automounting procedure outlined separately.
65 39
66To do expiration, you need to follow these steps: 40To do expiration, you need to follow these steps:
67 41
68 (3) Create at least one list off which the vfsmounts to be expired can be 42 (1) Create at least one list off which the vfsmounts to be expired can be
69 hung. Access to this list will be governed by the vfsmount_lock. 43 hung.
70 44
71 (4) In step (2c) above, the call to do_add_mount() should be provided with a 45 (2) When a new mountpoint is created in the ->d_automount method, add
72 pointer to this list. It will hang the vfsmount off of it if it succeeds. 46 the mnt to the list using mnt_set_expiry()
47 mnt_set_expiry(newmnt, &afs_vfsmounts);
73 48
74 (5) When you want mountpoints to be expired, call mark_mounts_for_expiry() 49 (3) When you want mountpoints to be expired, call mark_mounts_for_expiry()
75 with a pointer to this list. This will process the list, marking every 50 with a pointer to this list. This will process the list, marking every
76 vfsmount thereon for potential expiry on the next call. 51 vfsmount thereon for potential expiry on the next call.
77 52
diff --git a/Documentation/filesystems/caching/backend-api.txt b/Documentation/filesystems/caching/backend-api.txt
index 277d1e810670..c0bd5677271b 100644
--- a/Documentation/filesystems/caching/backend-api.txt
+++ b/Documentation/filesystems/caching/backend-api.txt
@@ -676,6 +676,29 @@ FS-Cache provides some utilities that a cache backend may make use of:
676 as possible. 676 as possible.
677 677
678 678
679 (*) Indicate that a stale object was found and discarded:
680
681 void fscache_object_retrying_stale(struct fscache_object *object);
682
683 This is called to indicate that the lookup procedure found an object in
684 the cache that the netfs decided was stale. The object has been
685 discarded from the cache and the lookup will be performed again.
686
687
688 (*) Indicate that the caching backend killed an object:
689
690 void fscache_object_mark_killed(struct fscache_object *object,
691 enum fscache_why_object_killed why);
692
693 This is called to indicate that the cache backend preemptively killed an
694 object. The why parameter should be set to indicate the reason:
695
696 FSCACHE_OBJECT_IS_STALE - the object was stale and needs discarding.
697 FSCACHE_OBJECT_NO_SPACE - there was insufficient cache space
698 FSCACHE_OBJECT_WAS_RETIRED - the object was retired when relinquished.
699 FSCACHE_OBJECT_WAS_CULLED - the object was culled to make space.
700
701
679 (*) Get and release references on a retrieval record: 702 (*) Get and release references on a retrieval record:
680 703
681 void fscache_get_retrieval(struct fscache_retrieval *op); 704 void fscache_get_retrieval(struct fscache_retrieval *op);
diff --git a/Documentation/filesystems/caching/fscache.txt b/Documentation/filesystems/caching/fscache.txt
index 770267af5b3e..50f0a5757f48 100644
--- a/Documentation/filesystems/caching/fscache.txt
+++ b/Documentation/filesystems/caching/fscache.txt
@@ -284,8 +284,9 @@ proc files.
284 enq=N Number of times async ops queued for processing 284 enq=N Number of times async ops queued for processing
285 can=N Number of async ops cancelled 285 can=N Number of async ops cancelled
286 rej=N Number of async ops rejected due to object lookup/create failure 286 rej=N Number of async ops rejected due to object lookup/create failure
287 ini=N Number of async ops initialised
287 dfr=N Number of async ops queued for deferred release 288 dfr=N Number of async ops queued for deferred release
288 rel=N Number of async ops released 289 rel=N Number of async ops released (should equal ini=N when idle)
289 gc=N Number of deferred-release async ops garbage collected 290 gc=N Number of deferred-release async ops garbage collected
290 CacheOp alo=N Number of in-progress alloc_object() cache ops 291 CacheOp alo=N Number of in-progress alloc_object() cache ops
291 luo=N Number of in-progress lookup_object() cache ops 292 luo=N Number of in-progress lookup_object() cache ops
@@ -303,6 +304,10 @@ proc files.
303 wrp=N Number of in-progress write_page() cache ops 304 wrp=N Number of in-progress write_page() cache ops
304 ucp=N Number of in-progress uncache_page() cache ops 305 ucp=N Number of in-progress uncache_page() cache ops
305 dsp=N Number of in-progress dissociate_pages() cache ops 306 dsp=N Number of in-progress dissociate_pages() cache ops
307 CacheEv nsp=N Number of object lookups/creations rejected due to lack of space
308 stl=N Number of stale objects deleted
309 rtr=N Number of objects retired when relinquished
310 cul=N Number of objects culled
306 311
307 312
308 (*) /proc/fs/fscache/histogram 313 (*) /proc/fs/fscache/histogram
diff --git a/Documentation/filesystems/dax.txt b/Documentation/filesystems/dax.txt
index baf41118660d..7af2851d667c 100644
--- a/Documentation/filesystems/dax.txt
+++ b/Documentation/filesystems/dax.txt
@@ -18,8 +18,10 @@ Usage
18----- 18-----
19 19
20If you have a block device which supports DAX, you can make a filesystem 20If you have a block device which supports DAX, you can make a filesystem
21on it as usual. When mounting it, use the -o dax option manually 21on it as usual. The DAX code currently only supports files with a block
22or add 'dax' to the options in /etc/fstab. 22size equal to your kernel's PAGE_SIZE, so you may need to specify a block
23size when creating the filesystem. When mounting it, use the "-o dax"
24option on the command line or add 'dax' to the options in /etc/fstab.
23 25
24 26
25Implementation Tips for Block Driver Writers 27Implementation Tips for Block Driver Writers
diff --git a/Documentation/filesystems/nfs/knfsd-stats.txt b/Documentation/filesystems/nfs/knfsd-stats.txt
index 64ced5149d37..1a5d82180b84 100644
--- a/Documentation/filesystems/nfs/knfsd-stats.txt
+++ b/Documentation/filesystems/nfs/knfsd-stats.txt
@@ -68,16 +68,10 @@ sockets-enqueued
68 rate of change for this counter is zero; significantly non-zero 68 rate of change for this counter is zero; significantly non-zero
69 values may indicate a performance limitation. 69 values may indicate a performance limitation.
70 70
71 This can happen either because there are too few nfsd threads in the 71 This can happen because there are too few nfsd threads in the thread
72 thread pool for the NFS workload (the workload is thread-limited), 72 pool for the NFS workload (the workload is thread-limited), in which
73 or because the NFS workload needs more CPU time than is available in 73 case configuring more nfsd threads will probably improve the
74 the thread pool (the workload is CPU-limited). In the former case, 74 performance of the NFS workload.
75 configuring more nfsd threads will probably improve the performance
76 of the NFS workload. In the latter case, the sunrpc server layer is
77 already choosing not to wake idle nfsd threads because there are too
78 many nfsd threads which want to run but cannot, so configuring more
79 nfsd threads will make no difference whatsoever. The overloads-avoided
80 statistic (see below) can be used to distinguish these cases.
81 75
82threads-woken 76threads-woken
83 Counts how many times an idle nfsd thread is woken to try to 77 Counts how many times an idle nfsd thread is woken to try to
@@ -88,36 +82,6 @@ threads-woken
88 thing. The ideal rate of change for this counter will be close 82 thing. The ideal rate of change for this counter will be close
89 to but less than the rate of change of the packets-arrived counter. 83 to but less than the rate of change of the packets-arrived counter.
90 84
91overloads-avoided
92 Counts how many times the sunrpc server layer chose not to wake an
93 nfsd thread, despite the presence of idle nfsd threads, because
94 too many nfsd threads had been recently woken but could not get
95 enough CPU time to actually run.
96
97 This statistic counts a circumstance where the sunrpc layer
98 heuristically avoids overloading the CPU scheduler with too many
99 runnable nfsd threads. The ideal rate of change for this counter
100 is zero. Significant non-zero values indicate that the workload
101 is CPU limited. Usually this is associated with heavy CPU usage
102 on all the CPUs in the nfsd thread pool.
103
104 If a sustained large overloads-avoided rate is detected on a pool,
105 the top(1) utility should be used to check for the following
106 pattern of CPU usage on all the CPUs associated with the given
107 nfsd thread pool.
108
109 - %us ~= 0 (as you're *NOT* running applications on your NFS server)
110
111 - %wa ~= 0
112
113 - %id ~= 0
114
115 - %sy + %hi + %si ~= 100
116
117 If this pattern is seen, configuring more nfsd threads will *not*
118 improve the performance of the workload. If this patten is not
119 seen, then something more subtle is wrong.
120
121threads-timedout 85threads-timedout
122 Counts how many times an nfsd thread triggered an idle timeout, 86 Counts how many times an nfsd thread triggered an idle timeout,
123 i.e. was not woken to handle any incoming network packets for 87 i.e. was not woken to handle any incoming network packets for
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index e69274de8d0c..f24d1b833957 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -379,10 +379,10 @@ may now be called in rcu-walk mode (nd->flags & LOOKUP_RCU). -ECHILD should be
379returned if the filesystem cannot handle rcu-walk. See 379returned if the filesystem cannot handle rcu-walk. See
380Documentation/filesystems/vfs.txt for more details. 380Documentation/filesystems/vfs.txt for more details.
381 381
382 permission and check_acl are inode permission checks that are called 382 permission is an inode permission check that is called on many or all
383on many or all directory inodes on the way down a path walk (to check for 383directory inodes on the way down a path walk (to check for exec permission). It
384exec permission). These must now be rcu-walk aware (flags & IPERM_FLAG_RCU). 384must now be rcu-walk aware (mask & MAY_NOT_BLOCK). See
385See Documentation/filesystems/vfs.txt for more details. 385Documentation/filesystems/vfs.txt for more details.
386 386
387-- 387--
388[mandatory] 388[mandatory]
@@ -483,3 +483,24 @@ in your dentry operations instead.
483-- 483--
484[mandatory] 484[mandatory]
485 ->aio_read/->aio_write are gone. Use ->read_iter/->write_iter. 485 ->aio_read/->aio_write are gone. Use ->read_iter/->write_iter.
486---
487[recommended]
488 for embedded ("fast") symlinks just set inode->i_link to wherever the
489 symlink body is and use simple_follow_link() as ->follow_link().
490--
491[mandatory]
492 calling conventions for ->follow_link() have changed. Instead of returning
493 cookie and using nd_set_link() to store the body to traverse, we return
494 the body to traverse and store the cookie using explicit void ** argument.
495 nameidata isn't passed at all - nd_jump_link() doesn't need it and
496 nd_[gs]et_link() is gone.
497--
498[mandatory]
499 calling conventions for ->put_link() have changed. It gets inode instead of
500 dentry, it does not get nameidata at all and it gets called only when cookie
501 is non-NULL. Note that link body isn't available anymore, so if you need it,
502 store it as cookie.
503--
504[mandatory]
505 __fd_install() & fd_install() can now sleep. Callers should not
506 hold a spinlock or other resources that do not allow a schedule.
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index c3b6b301d8b0..6f7fafde0884 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -205,7 +205,7 @@ asynchronous manner and the value may not be very precise. To see a precise
205snapshot of a moment, you can see /proc/<pid>/smaps file and scan page table. 205snapshot of a moment, you can see /proc/<pid>/smaps file and scan page table.
206It's slow but very precise. 206It's slow but very precise.
207 207
208Table 1-2: Contents of the status files (as of 3.20.0) 208Table 1-2: Contents of the status files (as of 4.1)
209.............................................................................. 209..............................................................................
210 Field Content 210 Field Content
211 Name filename of the executable 211 Name filename of the executable
@@ -235,6 +235,7 @@ Table 1-2: Contents of the status files (as of 3.20.0)
235 VmExe size of text segment 235 VmExe size of text segment
236 VmLib size of shared library code 236 VmLib size of shared library code
237 VmPTE size of page table entries 237 VmPTE size of page table entries
238 VmPMD size of second level page tables
238 VmSwap size of swap usage (the number of referred swapents) 239 VmSwap size of swap usage (the number of referred swapents)
239 Threads number of threads 240 Threads number of threads
240 SigQ number of signals queued/max. number for queue 241 SigQ number of signals queued/max. number for queue
diff --git a/Documentation/filesystems/quota.txt b/Documentation/filesystems/quota.txt
index 5e8de25bf0f1..29fc01552646 100644
--- a/Documentation/filesystems/quota.txt
+++ b/Documentation/filesystems/quota.txt
@@ -32,7 +32,10 @@ The interface uses generic netlink framework (see
32http://lwn.net/Articles/208755/ and http://people.suug.ch/~tgr/libnl/ for more 32http://lwn.net/Articles/208755/ and http://people.suug.ch/~tgr/libnl/ for more
33details about this layer). The name of the quota generic netlink interface 33details about this layer). The name of the quota generic netlink interface
34is "VFS_DQUOT". Definitions of constants below are in <linux/quota.h>. 34is "VFS_DQUOT". Definitions of constants below are in <linux/quota.h>.
35 Currently, the interface supports only one message type QUOTA_NL_C_WARNING. 35Since the quota netlink protocol is not namespace aware, quota netlink messages
36are sent only in initial network namespace.
37
38Currently, the interface supports only one message type QUOTA_NL_C_WARNING.
36This command is used to send a notification about any of the above mentioned 39This command is used to send a notification about any of the above mentioned
37events. Each message has six attributes. These are (type of the argument is 40events. Each message has six attributes. These are (type of the argument is
38in parentheses): 41in parentheses):
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index 5d833b32bbcd..5eb8456fc41e 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -350,8 +350,8 @@ struct inode_operations {
350 int (*rename2) (struct inode *, struct dentry *, 350 int (*rename2) (struct inode *, struct dentry *,
351 struct inode *, struct dentry *, unsigned int); 351 struct inode *, struct dentry *, unsigned int);
352 int (*readlink) (struct dentry *, char __user *,int); 352 int (*readlink) (struct dentry *, char __user *,int);
353 void * (*follow_link) (struct dentry *, struct nameidata *); 353 const char *(*follow_link) (struct dentry *, void **);
354 void (*put_link) (struct dentry *, struct nameidata *, void *); 354 void (*put_link) (struct inode *, void *);
355 int (*permission) (struct inode *, int); 355 int (*permission) (struct inode *, int);
356 int (*get_acl)(struct inode *, int); 356 int (*get_acl)(struct inode *, int);
357 int (*setattr) (struct dentry *, struct iattr *); 357 int (*setattr) (struct dentry *, struct iattr *);
@@ -436,16 +436,18 @@ otherwise noted.
436 436
437 follow_link: called by the VFS to follow a symbolic link to the 437 follow_link: called by the VFS to follow a symbolic link to the
438 inode it points to. Only required if you want to support 438 inode it points to. Only required if you want to support
439 symbolic links. This method returns a void pointer cookie 439 symbolic links. This method returns the symlink body
440 that is passed to put_link(). 440 to traverse (and possibly resets the current position with
441 nd_jump_link()). If the body won't go away until the inode
442 is gone, nothing else is needed; if it needs to be otherwise
443 pinned, the data needed to release whatever we'd grabbed
444 is to be stored in void * variable passed by address to
445 follow_link() instance.
441 446
442 put_link: called by the VFS to release resources allocated by 447 put_link: called by the VFS to release resources allocated by
443 follow_link(). The cookie returned by follow_link() is passed 448 follow_link(). The cookie stored by follow_link() is passed
444 to this method as the last parameter. It is used by 449 to this method as the last parameter; only called when
445 filesystems such as NFS where page cache is not stable 450 cookie isn't NULL.
446 (i.e. page that was installed when the symbolic link walk
447 started might not be in the page cache at the end of the
448 walk).
449 451
450 permission: called by the VFS to check for access rights on a POSIX-like 452 permission: called by the VFS to check for access rights on a POSIX-like
451 filesystem. 453 filesystem.
@@ -797,7 +799,7 @@ struct file_operations
797---------------------- 799----------------------
798 800
799This describes how the VFS can manipulate an open file. As of kernel 801This describes how the VFS can manipulate an open file. As of kernel
8003.12, the following members are defined: 8024.1, the following members are defined:
801 803
802struct file_operations { 804struct file_operations {
803 struct module *owner; 805 struct module *owner;
@@ -811,8 +813,9 @@ struct file_operations {
811 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); 813 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
812 long (*compat_ioctl) (struct file *, unsigned int, unsigned long); 814 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
813 int (*mmap) (struct file *, struct vm_area_struct *); 815 int (*mmap) (struct file *, struct vm_area_struct *);
816 int (*mremap)(struct file *, struct vm_area_struct *);
814 int (*open) (struct inode *, struct file *); 817 int (*open) (struct inode *, struct file *);
815 int (*flush) (struct file *); 818 int (*flush) (struct file *, fl_owner_t id);
816 int (*release) (struct inode *, struct file *); 819 int (*release) (struct inode *, struct file *);
817 int (*fsync) (struct file *, loff_t, loff_t, int datasync); 820 int (*fsync) (struct file *, loff_t, loff_t, int datasync);
818 int (*aio_fsync) (struct kiocb *, int datasync); 821 int (*aio_fsync) (struct kiocb *, int datasync);
@@ -822,11 +825,15 @@ struct file_operations {
822 unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); 825 unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
823 int (*check_flags)(int); 826 int (*check_flags)(int);
824 int (*flock) (struct file *, int, struct file_lock *); 827 int (*flock) (struct file *, int, struct file_lock *);
825 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int); 828 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
826 ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); 829 ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
827 int (*setlease)(struct file *, long arg, struct file_lock **, void **); 830 int (*setlease)(struct file *, long, struct file_lock **, void **);
828 long (*fallocate)(struct file *, int mode, loff_t offset, loff_t len); 831 long (*fallocate)(struct file *file, int mode, loff_t offset,
832 loff_t len);
829 void (*show_fdinfo)(struct seq_file *m, struct file *f); 833 void (*show_fdinfo)(struct seq_file *m, struct file *f);
834#ifndef CONFIG_MMU
835 unsigned (*mmap_capabilities)(struct file *);
836#endif
830}; 837};
831 838
832Again, all methods are called without any locks being held, unless 839Again, all methods are called without any locks being held, unless
diff --git a/Documentation/filesystems/xfs.txt b/Documentation/filesystems/xfs.txt
index 5a5a05582b58..8146e9fd5ffc 100644
--- a/Documentation/filesystems/xfs.txt
+++ b/Documentation/filesystems/xfs.txt
@@ -236,10 +236,10 @@ Removed Mount Options
236 236
237 Name Removed 237 Name Removed
238 ---- ------- 238 ---- -------
239 delaylog/nodelaylog v3.20 239 delaylog/nodelaylog v4.0
240 ihashsize v3.20 240 ihashsize v4.0
241 irixsgid v3.20 241 irixsgid v4.0
242 osyncisdsync/osyncisosync v3.20 242 osyncisdsync/osyncisosync v4.0
243 243
244 244
245sysctls 245sysctls
@@ -346,5 +346,5 @@ Removed Sysctls
346 346
347 Name Removed 347 Name Removed
348 ---- ------- 348 ---- -------
349 fs.xfs.xfsbufd_centisec v3.20 349 fs.xfs.xfsbufd_centisec v4.0
350 fs.xfs.age_buffer_centisecs v3.20 350 fs.xfs.age_buffer_centisecs v4.0
diff --git a/Documentation/gpio/consumer.txt b/Documentation/gpio/consumer.txt
index c21c1313f09e..75542b91b766 100644
--- a/Documentation/gpio/consumer.txt
+++ b/Documentation/gpio/consumer.txt
@@ -241,18 +241,18 @@ Set multiple GPIO outputs with a single function call
241----------------------------------------------------- 241-----------------------------------------------------
242The following functions set the output values of an array of GPIOs: 242The following functions set the output values of an array of GPIOs:
243 243
244 void gpiod_set_array(unsigned int array_size, 244 void gpiod_set_array_value(unsigned int array_size,
245 struct gpio_desc **desc_array, 245 struct gpio_desc **desc_array,
246 int *value_array) 246 int *value_array)
247 void gpiod_set_raw_array(unsigned int array_size, 247 void gpiod_set_raw_array_value(unsigned int array_size,
248 struct gpio_desc **desc_array, 248 struct gpio_desc **desc_array,
249 int *value_array) 249 int *value_array)
250 void gpiod_set_array_cansleep(unsigned int array_size, 250 void gpiod_set_array_value_cansleep(unsigned int array_size,
251 struct gpio_desc **desc_array, 251 struct gpio_desc **desc_array,
252 int *value_array) 252 int *value_array)
253 void gpiod_set_raw_array_cansleep(unsigned int array_size, 253 void gpiod_set_raw_array_value_cansleep(unsigned int array_size,
254 struct gpio_desc **desc_array, 254 struct gpio_desc **desc_array,
255 int *value_array) 255 int *value_array)
256 256
257The array can be an arbitrary set of GPIOs. The functions will try to set 257The array can be an arbitrary set of GPIOs. The functions will try to set
258GPIOs belonging to the same bank or chip simultaneously if supported by the 258GPIOs belonging to the same bank or chip simultaneously if supported by the
@@ -271,8 +271,8 @@ matches the desired group of GPIOs, those GPIOs can be set by simply using
271the struct gpio_descs returned by gpiod_get_array(): 271the struct gpio_descs returned by gpiod_get_array():
272 272
273 struct gpio_descs *my_gpio_descs = gpiod_get_array(...); 273 struct gpio_descs *my_gpio_descs = gpiod_get_array(...);
274 gpiod_set_array(my_gpio_descs->ndescs, my_gpio_descs->desc, 274 gpiod_set_array_value(my_gpio_descs->ndescs, my_gpio_descs->desc,
275 my_gpio_values); 275 my_gpio_values);
276 276
277It is also possible to set a completely arbitrary array of descriptors. The 277It is also possible to set a completely arbitrary array of descriptors. The
278descriptors may be obtained using any combination of gpiod_get() and 278descriptors may be obtained using any combination of gpiod_get() and
@@ -290,7 +290,7 @@ corresponding to a given GPIO using the following call:
290 290
291 int gpiod_to_irq(const struct gpio_desc *desc) 291 int gpiod_to_irq(const struct gpio_desc *desc)
292 292
293It will return an IRQ number, or an negative errno code if the mapping can't be 293It will return an IRQ number, or a negative errno code if the mapping can't be
294done (most likely because that particular GPIO cannot be used as IRQ). It is an 294done (most likely because that particular GPIO cannot be used as IRQ). It is an
295unchecked error to use a GPIO that wasn't set up as an input using 295unchecked error to use a GPIO that wasn't set up as an input using
296gpiod_direction_input(), or to use an IRQ number that didn't originally come 296gpiod_direction_input(), or to use an IRQ number that didn't originally come
diff --git a/Documentation/gpio/gpio-legacy.txt b/Documentation/gpio/gpio-legacy.txt
index 6f83fa965b4b..79ab5648d69b 100644
--- a/Documentation/gpio/gpio-legacy.txt
+++ b/Documentation/gpio/gpio-legacy.txt
@@ -751,9 +751,6 @@ requested using gpio_request():
751 int gpio_export_link(struct device *dev, const char *name, 751 int gpio_export_link(struct device *dev, const char *name,
752 unsigned gpio) 752 unsigned gpio)
753 753
754 /* change the polarity of a GPIO node in sysfs */
755 int gpio_sysfs_set_active_low(unsigned gpio, int value);
756
757After a kernel driver requests a GPIO, it may only be made available in 754After a kernel driver requests a GPIO, it may only be made available in
758the sysfs interface by gpio_export(). The driver can control whether the 755the sysfs interface by gpio_export(). The driver can control whether the
759signal direction may change. This helps drivers prevent userspace code 756signal direction may change. This helps drivers prevent userspace code
@@ -767,9 +764,3 @@ After the GPIO has been exported, gpio_export_link() allows creating
767symlinks from elsewhere in sysfs to the GPIO sysfs node. Drivers can 764symlinks from elsewhere in sysfs to the GPIO sysfs node. Drivers can
768use this to provide the interface under their own device in sysfs with 765use this to provide the interface under their own device in sysfs with
769a descriptive name. 766a descriptive name.
770
771Drivers can use gpio_sysfs_set_active_low() to hide GPIO line polarity
772differences between boards from user space. This only affects the
773sysfs interface. Polarity change can be done both before and after
774gpio_export(), and previously enabled poll(2) support for either
775rising or falling edge will be reconfigured to follow this setting.
diff --git a/Documentation/gpio/sysfs.txt b/Documentation/gpio/sysfs.txt
index c2c3a97f8ff7..535b6a8a7a7c 100644
--- a/Documentation/gpio/sysfs.txt
+++ b/Documentation/gpio/sysfs.txt
@@ -132,9 +132,6 @@ requested using gpio_request():
132 int gpiod_export_link(struct device *dev, const char *name, 132 int gpiod_export_link(struct device *dev, const char *name,
133 struct gpio_desc *desc); 133 struct gpio_desc *desc);
134 134
135 /* change the polarity of a GPIO node in sysfs */
136 int gpiod_sysfs_set_active_low(struct gpio_desc *desc, int value);
137
138After a kernel driver requests a GPIO, it may only be made available in 135After a kernel driver requests a GPIO, it may only be made available in
139the sysfs interface by gpiod_export(). The driver can control whether the 136the sysfs interface by gpiod_export(). The driver can control whether the
140signal direction may change. This helps drivers prevent userspace code 137signal direction may change. This helps drivers prevent userspace code
@@ -148,8 +145,3 @@ After the GPIO has been exported, gpiod_export_link() allows creating
148symlinks from elsewhere in sysfs to the GPIO sysfs node. Drivers can 145symlinks from elsewhere in sysfs to the GPIO sysfs node. Drivers can
149use this to provide the interface under their own device in sysfs with 146use this to provide the interface under their own device in sysfs with
150a descriptive name. 147a descriptive name.
151
152Drivers can use gpiod_sysfs_set_active_low() to hide GPIO line polarity
153differences between boards from user space. Polarity change can be done both
154before and after gpiod_export(), and previously enabled poll(2) support for
155either rising or falling edge will be reconfigured to follow this setting.
diff --git a/Documentation/hwmon/ntc_thermistor b/Documentation/hwmon/ntc_thermistor
index c5e05e2900a3..1d4cc847c6fe 100644
--- a/Documentation/hwmon/ntc_thermistor
+++ b/Documentation/hwmon/ntc_thermistor
@@ -2,8 +2,10 @@ Kernel driver ntc_thermistor
2================= 2=================
3 3
4Supported thermistors from Murata: 4Supported thermistors from Murata:
5* Murata NTC Thermistors NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, NCP15WL333 5* Murata NTC Thermistors NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473,
6 Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473', 'ncp15wl333' 6 NCP15WL333, NCP03WF104
7 Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473',
8 'ncp15wl333', 'ncp03wf104'
7 Datasheet: Publicly available at Murata 9 Datasheet: Publicly available at Murata
8 10
9Supported thermistors from EPCOS: 11Supported thermistors from EPCOS:
diff --git a/Documentation/hwmon/submitting-patches b/Documentation/hwmon/submitting-patches
index 3d1bac399a22..d201828d202f 100644
--- a/Documentation/hwmon/submitting-patches
+++ b/Documentation/hwmon/submitting-patches
@@ -81,6 +81,13 @@ increase the chances of your change being accepted.
81 81
82* Provide a detect function if and only if a chip can be detected reliably. 82* Provide a detect function if and only if a chip can be detected reliably.
83 83
84* Only the following I2C addresses shall be probed: 0x18-0x1f, 0x28-0x2f,
85 0x48-0x4f, 0x58, 0x5c, 0x73 and 0x77. Probing other addresses is strongly
86 discouraged as it is known to cause trouble with other (non-hwmon) I2C
87 chips. If your chip lives at an address which can't be probed then the
88 device will have to be instantiated explicitly (which is always better
89 anyway.)
90
84* Avoid writing to chip registers in the detect function. If you have to write, 91* Avoid writing to chip registers in the detect function. If you have to write,
85 only do it after you have already gathered enough data to be certain that the 92 only do it after you have already gathered enough data to be certain that the
86 detection is going to be successful. 93 detection is going to be successful.
diff --git a/Documentation/hwmon/tc74 b/Documentation/hwmon/tc74
new file mode 100644
index 000000000000..43027aad5f8e
--- /dev/null
+++ b/Documentation/hwmon/tc74
@@ -0,0 +1,20 @@
1Kernel driver tc74
2====================
3
4Supported chips:
5 * Microchip TC74
6 Prefix: 'tc74'
7 Datasheet: Publicly available at Microchip website.
8
9Description
10-----------
11
12Driver supports the above part.
13
14The tc74 has an 8-bit sensor, with 1 degree centigrade resolution
15and +- 2 degrees centigrade accuracy.
16
17Notes
18-----
19
20Currently entering low power standby mode is not supported.
diff --git a/Documentation/hwmon/tmp401 b/Documentation/hwmon/tmp401
index 8eb88e974055..711f75e189eb 100644
--- a/Documentation/hwmon/tmp401
+++ b/Documentation/hwmon/tmp401
@@ -20,7 +20,7 @@ Supported chips:
20 Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp432.html 20 Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp432.html
21 * Texas Instruments TMP435 21 * Texas Instruments TMP435
22 Prefix: 'tmp435' 22 Prefix: 'tmp435'
23 Addresses scanned: I2C 0x37, 0x48 - 0x4f 23 Addresses scanned: I2C 0x48 - 0x4f
24 Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp435.html 24 Datasheet: http://focus.ti.com/docs/prod/folders/print/tmp435.html
25 25
26Authors: 26Authors:
diff --git a/Documentation/hwmon/w83792d b/Documentation/hwmon/w83792d
index 53f7b6866fec..f2ffc402ea45 100644
--- a/Documentation/hwmon/w83792d
+++ b/Documentation/hwmon/w83792d
@@ -8,6 +8,7 @@ Supported chips:
8 Datasheet: http://www.winbond.com.tw 8 Datasheet: http://www.winbond.com.tw
9 9
10Author: Shane Huang (Winbond) 10Author: Shane Huang (Winbond)
11Updated: Roger Lucas
11 12
12 13
13Module Parameters 14Module Parameters
@@ -38,9 +39,16 @@ parameter; this will put it into a more well-behaved state first.
38The driver implements three temperature sensors, seven fan rotation speed 39The driver implements three temperature sensors, seven fan rotation speed
39sensors, nine voltage sensors, and two automatic fan regulation 40sensors, nine voltage sensors, and two automatic fan regulation
40strategies called: Smart Fan I (Thermal Cruise mode) and Smart Fan II. 41strategies called: Smart Fan I (Thermal Cruise mode) and Smart Fan II.
41Automatic fan control mode is possible only for fan1-fan3. Fan4-fan7 can run 42
42synchronized with selected fan (fan1-fan3). This functionality and manual PWM 43The driver also implements up to seven fan control outputs: pwm1-7. Pwm1-7
43control for fan4-fan7 is not yet implemented. 44can be configured to PWM output or Analogue DC output via their associated
45pwmX_mode. Outputs pwm4 through pwm7 may or may not be present depending on
46how the W83792AD/D was configured by the BIOS.
47
48Automatic fan control mode is possible only for fan1-fan3.
49
50For all pwmX outputs, a value of 0 means minimum fan speed and a value of
51255 means maximum fan speed.
44 52
45Temperatures are measured in degrees Celsius and measurement resolution is 1 53Temperatures are measured in degrees Celsius and measurement resolution is 1
46degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when 54degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when
@@ -157,14 +165,14 @@ for each fan.
157/sys files 165/sys files
158---------- 166----------
159 167
160pwm[1-3] - this file stores PWM duty cycle or DC value (fan speed) in range: 168pwm[1-7] - this file stores PWM duty cycle or DC value (fan speed) in range:
161 0 (stop) to 255 (full) 169 0 (stop) to 255 (full)
162pwm[1-3]_enable - this file controls mode of fan/temperature control: 170pwm[1-3]_enable - this file controls mode of fan/temperature control:
163 * 0 Disabled 171 * 0 Disabled
164 * 1 Manual mode 172 * 1 Manual mode
165 * 2 Smart Fan II 173 * 2 Smart Fan II
166 * 3 Thermal Cruise 174 * 3 Thermal Cruise
167pwm[1-3]_mode - Select PWM of DC mode 175pwm[1-7]_mode - Select PWM or DC mode
168 * 0 DC 176 * 0 DC
169 * 1 PWM 177 * 1 PWM
170thermal_cruise[1-3] - Selects the desired temperature for cruise (degC) 178thermal_cruise[1-3] - Selects the desired temperature for cruise (degC)
diff --git a/Documentation/hwspinlock.txt b/Documentation/hwspinlock.txt
index 62f7d4ea6e26..61c1ee98e59f 100644
--- a/Documentation/hwspinlock.txt
+++ b/Documentation/hwspinlock.txt
@@ -48,6 +48,16 @@ independent, drivers.
48 ids for predefined purposes. 48 ids for predefined purposes.
49 Should be called from a process context (might sleep). 49 Should be called from a process context (might sleep).
50 50
51 int of_hwspin_lock_get_id(struct device_node *np, int index);
52 - retrieve the global lock id for an OF phandle-based specific lock.
53 This function provides a means for DT users of a hwspinlock module
54 to get the global lock id of a specific hwspinlock, so that it can
55 be requested using the normal hwspin_lock_request_specific() API.
56 The function returns a lock id number on success, -EPROBE_DEFER if
57 the hwspinlock device is not yet registered with the core, or other
58 error values.
59 Should be called from a process context (might sleep).
60
51 int hwspin_lock_free(struct hwspinlock *hwlock); 61 int hwspin_lock_free(struct hwspinlock *hwlock);
52 - free a previously-assigned hwspinlock; returns 0 on success, or an 62 - free a previously-assigned hwspinlock; returns 0 on success, or an
53 appropriate error code on failure (e.g. -EINVAL if the hwspinlock 63 appropriate error code on failure (e.g. -EINVAL if the hwspinlock
diff --git a/Documentation/i2c/slave-interface b/Documentation/i2c/slave-interface
index 389bb5d61854..2dee4e2d62df 100644
--- a/Documentation/i2c/slave-interface
+++ b/Documentation/i2c/slave-interface
@@ -3,16 +3,16 @@ Linux I2C slave interface description
3 3
4by Wolfram Sang <wsa@sang-engineering.com> in 2014-15 4by Wolfram Sang <wsa@sang-engineering.com> in 2014-15
5 5
6Linux can also be an I2C slave in case I2C controllers have slave support. 6Linux can also be an I2C slave if the I2C controller in use has slave
7Besides this HW requirement, one also needs a software backend providing the 7functionality. For that to work, one needs slave support in the bus driver plus
8actual functionality. An example for this is the slave-eeprom driver, which 8a hardware independent software backend providing the actual functionality. An
9acts as a dual memory driver. While another I2C master on the bus can access it 9example for the latter is the slave-eeprom driver, which acts as a dual memory
10like a regular EEPROM, the Linux I2C slave can access the content via sysfs and 10driver. While another I2C master on the bus can access it like a regular
11retrieve/provide information as needed. The software backend driver and the I2C 11EEPROM, the Linux I2C slave can access the content via sysfs and handle data as
12bus driver communicate via events. Here is a small graph visualizing the data 12needed. The backend driver and the I2C bus driver communicate via events. Here
13flow and the means by which data is transported. The dotted line marks only one 13is a small graph visualizing the data flow and the means by which data is
14example. The backend could also use e.g. a character device, be in-kernel 14transported. The dotted line marks only one example. The backend could also
15only, or something completely different: 15use a character device, be in-kernel only, or something completely different:
16 16
17 17
18 e.g. sysfs I2C slave events I/O registers 18 e.g. sysfs I2C slave events I/O registers
@@ -31,10 +31,10 @@ User manual
31=========== 31===========
32 32
33I2C slave backends behave like standard I2C clients. So, you can instantiate 33I2C slave backends behave like standard I2C clients. So, you can instantiate
34them like described in the document 'instantiating-devices'. A quick example 34them as described in the document 'instantiating-devices'. A quick example for
35for instantiating the slave-eeprom driver from userspace: 35instantiating the slave-eeprom driver from userspace at address 0x64 on bus 1:
36 36
37 # echo 0-0064 > /sys/bus/i2c/drivers/i2c-slave-eeprom/bind 37 # echo slave-24c02 0x64 > /sys/bus/i2c/devices/i2c-1/new_device
38 38
39Each backend should come with separate documentation to describe its specific 39Each backend should come with separate documentation to describe its specific
40behaviour and setup. 40behaviour and setup.
@@ -43,6 +43,11 @@ behaviour and setup.
43Developer manual 43Developer manual
44================ 44================
45 45
46First, the events which are used by the bus driver and the backend will be
47described in detail. After that, some implementation hints for extending bus
48drivers and writing backends will be given.
49
50
46I2C slave events 51I2C slave events
47---------------- 52----------------
48 53
diff --git a/Documentation/input/rotary-encoder.txt b/Documentation/input/rotary-encoder.txt
index 92e68bce13a4..5737e3590adb 100644
--- a/Documentation/input/rotary-encoder.txt
+++ b/Documentation/input/rotary-encoder.txt
@@ -33,7 +33,7 @@ The phase diagram of these two outputs look like this:
33 one step (half-period mode) 33 one step (half-period mode)
34 34
35For more information, please see 35For more information, please see
36 http://en.wikipedia.org/wiki/Rotary_encoder 36 https://en.wikipedia.org/wiki/Rotary_encoder
37 37
38 38
391. Events / state machine 391. Events / state machine
diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index 51f4221657bf..611c52267d24 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -321,6 +321,7 @@ Code Seq#(hex) Include File Comments
3210xDB 00-0F drivers/char/mwave/mwavepub.h 3210xDB 00-0F drivers/char/mwave/mwavepub.h
3220xDD 00-3F ZFCP device driver see drivers/s390/scsi/ 3220xDD 00-3F ZFCP device driver see drivers/s390/scsi/
323 <mailto:aherrman@de.ibm.com> 323 <mailto:aherrman@de.ibm.com>
3240xE5 00-3F linux/fuse.h
3240xEC 00-01 drivers/platform/chrome/cros_ec_dev.h ChromeOS EC driver 3250xEC 00-01 drivers/platform/chrome/cros_ec_dev.h ChromeOS EC driver
3250xF3 00-3F drivers/usb/misc/sisusbvga/sisusb.h sisfb (in development) 3260xF3 00-3F drivers/usb/misc/sisusbvga/sisusb.h sisfb (in development)
326 <mailto:thomas@winischhofer.net> 327 <mailto:thomas@winischhofer.net>
diff --git a/Documentation/ja_JP/HOWTO b/Documentation/ja_JP/HOWTO
index b61885c35ce1..5a0f2bdc2cf9 100644
--- a/Documentation/ja_JP/HOWTO
+++ b/Documentation/ja_JP/HOWTO
@@ -445,7 +445,7 @@ MAINTAINERS ファイルにリストがありますので参照してくださ
445メールの先頭でなく、各引用行の間にあなたの言いたいことを追加するべきで 445メールの先頭でなく、各引用行の間にあなたの言いたいことを追加するべきで
446す。 446す。
447 447
448もしパッチをメールに付ける場合は、Documentaion/SubmittingPatches に提 448もしパッチをメールに付ける場合は、Documentation/SubmittingPatches に提
449示されているように、それは プレーンな可読テキストにすることを忘れない 449示されているように、それは プレーンな可読テキストにすることを忘れない
450ようにしましょう。カーネル開発者は 添付や圧縮したパッチを扱いたがりま 450ようにしましょう。カーネル開発者は 添付や圧縮したパッチを扱いたがりま
451せん- 451せん-
diff --git a/Documentation/kasan.txt b/Documentation/kasan.txt
index 092fc10961fe..0d32355a4c34 100644
--- a/Documentation/kasan.txt
+++ b/Documentation/kasan.txt
@@ -9,7 +9,9 @@ a fast and comprehensive solution for finding use-after-free and out-of-bounds
9bugs. 9bugs.
10 10
11KASan uses compile-time instrumentation for checking every memory access, 11KASan uses compile-time instrumentation for checking every memory access,
12therefore you will need a certain version of GCC > 4.9.2 12therefore you will need a gcc version of 4.9.2 or later. KASan could detect out
13of bounds accesses to stack or global variables, but only if gcc 5.0 or later was
14used to built the kernel.
13 15
14Currently KASan is supported only for x86_64 architecture and requires that the 16Currently KASan is supported only for x86_64 architecture and requires that the
15kernel be built with the SLUB allocator. 17kernel be built with the SLUB allocator.
@@ -23,8 +25,8 @@ To enable KASAN configure kernel with:
23 25
24and choose between CONFIG_KASAN_OUTLINE and CONFIG_KASAN_INLINE. Outline/inline 26and choose between CONFIG_KASAN_OUTLINE and CONFIG_KASAN_INLINE. Outline/inline
25is compiler instrumentation types. The former produces smaller binary the 27is compiler instrumentation types. The former produces smaller binary the
26latter is 1.1 - 2 times faster. Inline instrumentation requires GCC 5.0 or 28latter is 1.1 - 2 times faster. Inline instrumentation requires a gcc version
27latter. 29of 5.0 or later.
28 30
29Currently KASAN works only with the SLUB memory allocator. 31Currently KASAN works only with the SLUB memory allocator.
30For better bug detection and nicer report, enable CONFIG_STACKTRACE and put 32For better bug detection and nicer report, enable CONFIG_STACKTRACE and put
@@ -148,7 +150,7 @@ AddressSanitizer dedicates 1/8 of kernel memory to its shadow memory
148(e.g. 16TB to cover 128TB on x86_64) and uses direct mapping with a scale and 150(e.g. 16TB to cover 128TB on x86_64) and uses direct mapping with a scale and
149offset to translate a memory address to its corresponding shadow address. 151offset to translate a memory address to its corresponding shadow address.
150 152
151Here is the function witch translate an address to its corresponding shadow 153Here is the function which translates an address to its corresponding shadow
152address: 154address:
153 155
154static inline void *kasan_mem_to_shadow(const void *addr) 156static inline void *kasan_mem_to_shadow(const void *addr)
diff --git a/Documentation/kbuild/headers_install.txt b/Documentation/kbuild/headers_install.txt
index 951eb9f1e040..f0153adb95e2 100644
--- a/Documentation/kbuild/headers_install.txt
+++ b/Documentation/kbuild/headers_install.txt
@@ -24,7 +24,7 @@ The "make headers_install" command can be run in the top level directory of the
24kernel source code (or using a standard out-of-tree build). It takes two 24kernel source code (or using a standard out-of-tree build). It takes two
25optional arguments: 25optional arguments:
26 26
27 make headers_install ARCH=i386 INSTALL_HDR_PATH=/usr/include 27 make headers_install ARCH=i386 INSTALL_HDR_PATH=/usr
28 28
29ARCH indicates which architecture to produce headers for, and defaults to the 29ARCH indicates which architecture to produce headers for, and defaults to the
30current architecture. The linux/asm directory of the exported kernel headers 30current architecture. The linux/asm directory of the exported kernel headers
@@ -33,8 +33,11 @@ the command:
33 33
34 ls -d include/asm-* | sed 's/.*-//' 34 ls -d include/asm-* | sed 's/.*-//'
35 35
36INSTALL_HDR_PATH indicates where to install the headers. It defaults to 36INSTALL_HDR_PATH indicates where to install the headers. It defaults to
37"./usr/include". 37"./usr".
38
39An 'include' directory is automatically created inside INSTALL_HDR_PATH and
40headers are installed in 'INSTALL_HDR_PATH/include'.
38 41
39The command "make headers_install_all" exports headers for all architectures 42The command "make headers_install_all" exports headers for all architectures
40simultaneously. (This is mostly of interest to distribution maintainers, 43simultaneously. (This is mostly of interest to distribution maintainers,
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index 74b6c6d97210..e63b446d973c 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -755,8 +755,8 @@ Additional files can be specified in kbuild makefiles by use of $(clean-files).
755 #lib/Makefile 755 #lib/Makefile
756 clean-files := crc32table.h 756 clean-files := crc32table.h
757 757
758When executing "make clean", the two files "devlist.h classlist.h" will be 758When executing "make clean", the file "crc32table.h" will be deleted.
759deleted. Kbuild will assume files to be in the same relative directory as the 759Kbuild will assume files to be in the same relative directory as the
760Makefile, except if prefixed with $(objtree). 760Makefile, except if prefixed with $(objtree).
761 761
762To delete a directory hierarchy use: 762To delete a directory hierarchy use:
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index f6befa9855c1..1d6f0459cd7b 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -179,11 +179,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
179 179
180 See also Documentation/power/runtime_pm.txt, pci=noacpi 180 See also Documentation/power/runtime_pm.txt, pci=noacpi
181 181
182 acpi_rsdp= [ACPI,EFI,KEXEC]
183 Pass the RSDP address to the kernel, mostly used
184 on machines running EFI runtime service to boot the
185 second kernel for kdump.
186
187 acpi_apic_instance= [ACPI, IOAPIC] 182 acpi_apic_instance= [ACPI, IOAPIC]
188 Format: <int> 183 Format: <int>
189 2: use 2nd APIC table, if available 184 2: use 2nd APIC table, if available
@@ -197,6 +192,14 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
197 (e.g. thinkpad_acpi, sony_acpi, etc.) instead 192 (e.g. thinkpad_acpi, sony_acpi, etc.) instead
198 of the ACPI video.ko driver. 193 of the ACPI video.ko driver.
199 194
195 acpica_no_return_repair [HW, ACPI]
196 Disable AML predefined validation mechanism
197 This mechanism can repair the evaluation result to make
198 the return objects more ACPI specification compliant.
199 This option is useful for developers to identify the
200 root cause of an AML interpreter issue when the issue
201 has something to do with the repair mechanism.
202
200 acpi.debug_layer= [HW,ACPI,ACPI_DEBUG] 203 acpi.debug_layer= [HW,ACPI,ACPI_DEBUG]
201 acpi.debug_level= [HW,ACPI,ACPI_DEBUG] 204 acpi.debug_level= [HW,ACPI,ACPI_DEBUG]
202 Format: <int> 205 Format: <int>
@@ -225,6 +228,22 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
225 unusable. The "log_buf_len" parameter may be useful 228 unusable. The "log_buf_len" parameter may be useful
226 if you need to capture more output. 229 if you need to capture more output.
227 230
231 acpi_enforce_resources= [ACPI]
232 { strict | lax | no }
233 Check for resource conflicts between native drivers
234 and ACPI OperationRegions (SystemIO and SystemMemory
235 only). IO ports and memory declared in ACPI might be
236 used by the ACPI subsystem in arbitrary AML code and
237 can interfere with legacy drivers.
238 strict (default): access to resources claimed by ACPI
239 is denied; legacy drivers trying to access reserved
240 resources will fail to bind to device using them.
241 lax: access to resources claimed by ACPI is allowed;
242 legacy drivers trying to access reserved resources
243 will bind successfully but a warning message is logged.
244 no: ACPI OperationRegions are not marked as reserved,
245 no further checks are performed.
246
228 acpi_force_table_verification [HW,ACPI] 247 acpi_force_table_verification [HW,ACPI]
229 Enable table checksum verification during early stage. 248 Enable table checksum verification during early stage.
230 By default, this is disabled due to x86 early mapping 249 By default, this is disabled due to x86 early mapping
@@ -253,6 +272,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
253 This feature is enabled by default. 272 This feature is enabled by default.
254 This option allows to turn off the feature. 273 This option allows to turn off the feature.
255 274
275 acpi_no_memhotplug [ACPI] Disable memory hotplug. Useful for kdump
276 kernels.
277
256 acpi_no_static_ssdt [HW,ACPI] 278 acpi_no_static_ssdt [HW,ACPI]
257 Disable installation of static SSDTs at early boot time 279 Disable installation of static SSDTs at early boot time
258 By default, SSDTs contained in the RSDT/XSDT will be 280 By default, SSDTs contained in the RSDT/XSDT will be
@@ -263,17 +285,20 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
263 dynamic table installation which will install SSDT 285 dynamic table installation which will install SSDT
264 tables to /sys/firmware/acpi/tables/dynamic. 286 tables to /sys/firmware/acpi/tables/dynamic.
265 287
266 acpica_no_return_repair [HW, ACPI] 288 acpi_rsdp= [ACPI,EFI,KEXEC]
267 Disable AML predefined validation mechanism 289 Pass the RSDP address to the kernel, mostly used
268 This mechanism can repair the evaluation result to make 290 on machines running EFI runtime service to boot the
269 the return objects more ACPI specification compliant. 291 second kernel for kdump.
270 This option is useful for developers to identify the
271 root cause of an AML interpreter issue when the issue
272 has something to do with the repair mechanism.
273 292
274 acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS 293 acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS
275 Format: To spoof as Windows 98: ="Microsoft Windows" 294 Format: To spoof as Windows 98: ="Microsoft Windows"
276 295
296 acpi_rev_override [ACPI] Override the _REV object to return 5 (instead
297 of 2 which is mandated by ACPI 6) as the supported ACPI
298 specification revision (when using this switch, it may
299 be necessary to carry out a cold reboot _twice_ in a
300 row to make it take effect on the platform firmware).
301
277 acpi_osi= [HW,ACPI] Modify list of supported OS interface strings 302 acpi_osi= [HW,ACPI] Modify list of supported OS interface strings
278 acpi_osi="string1" # add string1 303 acpi_osi="string1" # add string1
279 acpi_osi="!string2" # remove string2 304 acpi_osi="!string2" # remove string2
@@ -365,25 +390,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
365 Use timer override. For some broken Nvidia NF5 boards 390 Use timer override. For some broken Nvidia NF5 boards
366 that require a timer override, but don't have HPET 391 that require a timer override, but don't have HPET
367 392
368 acpi_enforce_resources= [ACPI]
369 { strict | lax | no }
370 Check for resource conflicts between native drivers
371 and ACPI OperationRegions (SystemIO and SystemMemory
372 only). IO ports and memory declared in ACPI might be
373 used by the ACPI subsystem in arbitrary AML code and
374 can interfere with legacy drivers.
375 strict (default): access to resources claimed by ACPI
376 is denied; legacy drivers trying to access reserved
377 resources will fail to bind to device using them.
378 lax: access to resources claimed by ACPI is allowed;
379 legacy drivers trying to access reserved resources
380 will bind successfully but a warning message is logged.
381 no: ACPI OperationRegions are not marked as reserved,
382 no further checks are performed.
383
384 acpi_no_memhotplug [ACPI] Disable memory hotplug. Useful for kdump
385 kernels.
386
387 add_efi_memmap [EFI; X86] Include EFI memory map in 393 add_efi_memmap [EFI; X86] Include EFI memory map in
388 kernel's map of available physical RAM. 394 kernel's map of available physical RAM.
389 395
@@ -746,6 +752,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
746 cpuidle.off=1 [CPU_IDLE] 752 cpuidle.off=1 [CPU_IDLE]
747 disable the cpuidle sub-system 753 disable the cpuidle sub-system
748 754
755 cpu_init_udelay=N
756 [X86] Delay for N microsec between assert and de-assert
757 of APIC INIT to start processors. This delay occurs
758 on every CPU online, such as boot, and resume from suspend.
759 Default: 10000
760
749 cpcihp_generic= [HW,PCI] Generic port I/O CompactPCI driver 761 cpcihp_generic= [HW,PCI] Generic port I/O CompactPCI driver
750 Format: 762 Format:
751 <first_slot>,<last_slot>,<port>,<enum_bit>[,<debug>] 763 <first_slot>,<last_slot>,<port>,<enum_bit>[,<debug>]
@@ -937,12 +949,19 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
937 Enable debug messages at boot time. See 949 Enable debug messages at boot time. See
938 Documentation/dynamic-debug-howto.txt for details. 950 Documentation/dynamic-debug-howto.txt for details.
939 951
952 nompx [X86] Disables Intel Memory Protection Extensions.
953 See Documentation/x86/intel_mpx.txt for more
954 information about the feature.
955
940 eagerfpu= [X86] 956 eagerfpu= [X86]
941 on enable eager fpu restore 957 on enable eager fpu restore
942 off disable eager fpu restore 958 off disable eager fpu restore
943 auto selects the default scheme, which automatically 959 auto selects the default scheme, which automatically
944 enables eagerfpu restore for xsaveopt. 960 enables eagerfpu restore for xsaveopt.
945 961
962 module.async_probe [KNL]
963 Enable asynchronous probe on this module.
964
946 early_ioremap_debug [KNL] 965 early_ioremap_debug [KNL]
947 Enable debug messages in early_ioremap support. This 966 Enable debug messages in early_ioremap support. This
948 is useful for tracking down temporary early mappings 967 is useful for tracking down temporary early mappings
@@ -959,14 +978,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
959 uart[8250],io,<addr>[,options] 978 uart[8250],io,<addr>[,options]
960 uart[8250],mmio,<addr>[,options] 979 uart[8250],mmio,<addr>[,options]
961 uart[8250],mmio32,<addr>[,options] 980 uart[8250],mmio32,<addr>[,options]
981 uart[8250],mmio32be,<addr>[,options]
962 uart[8250],0x<addr>[,options] 982 uart[8250],0x<addr>[,options]
963 Start an early, polled-mode console on the 8250/16550 983 Start an early, polled-mode console on the 8250/16550
964 UART at the specified I/O port or MMIO address. 984 UART at the specified I/O port or MMIO address.
965 MMIO inter-register address stride is either 8-bit 985 MMIO inter-register address stride is either 8-bit
966 (mmio) or 32-bit (mmio32). 986 (mmio) or 32-bit (mmio32 or mmio32be).
967 If none of [io|mmio|mmio32], <addr> is assumed to be 987 If none of [io|mmio|mmio32|mmio32be], <addr> is assumed
968 equivalent to 'mmio'. 'options' are specified in the 988 to be equivalent to 'mmio'. 'options' are specified
969 same format described for "console=ttyS<n>"; if 989 in the same format described for "console=ttyS<n>"; if
970 unspecified, the h/w is not initialized. 990 unspecified, the h/w is not initialized.
971 991
972 pl011,<addr> 992 pl011,<addr>
@@ -1009,6 +1029,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1009 earlyprintk=serial[,0x...[,baudrate]] 1029 earlyprintk=serial[,0x...[,baudrate]]
1010 earlyprintk=ttySn[,baudrate] 1030 earlyprintk=ttySn[,baudrate]
1011 earlyprintk=dbgp[debugController#] 1031 earlyprintk=dbgp[debugController#]
1032 earlyprintk=pciserial,bus:device.function[,baudrate]
1012 1033
1013 earlyprintk is useful when the kernel crashes before 1034 earlyprintk is useful when the kernel crashes before
1014 the normal console is initialized. It is not enabled by 1035 the normal console is initialized. It is not enabled by
@@ -1398,7 +1419,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1398 The list of supported hash algorithms is defined 1419 The list of supported hash algorithms is defined
1399 in crypto/hash_info.h. 1420 in crypto/hash_info.h.
1400 1421
1401 ima_tcb [IMA] 1422 ima_policy= [IMA]
1423 The builtin measurement policy to load during IMA
1424 setup. Specyfing "tcb" as the value, measures all
1425 programs exec'd, files mmap'd for exec, and all files
1426 opened with the read mode bit set by either the
1427 effective uid (euid=0) or uid=0.
1428 Format: "tcb"
1429
1430 ima_tcb [IMA] Deprecated. Use ima_policy= instead.
1402 Load a policy which meets the needs of the Trusted 1431 Load a policy which meets the needs of the Trusted
1403 Computing Base. This means IMA will measure all 1432 Computing Base. This means IMA will measure all
1404 programs exec'd, files mmap'd for exec, and all files 1433 programs exec'd, files mmap'd for exec, and all files
@@ -1406,7 +1435,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1406 1435
1407 ima_template= [IMA] 1436 ima_template= [IMA]
1408 Select one of defined IMA measurements template formats. 1437 Select one of defined IMA measurements template formats.
1409 Formats: { "ima" | "ima-ng" } 1438 Formats: { "ima" | "ima-ng" | "ima-sig" }
1410 Default: "ima-ng" 1439 Default: "ima-ng"
1411 1440
1412 ima_template_fmt= 1441 ima_template_fmt=
@@ -1481,6 +1510,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1481 By default, super page will be supported if Intel IOMMU 1510 By default, super page will be supported if Intel IOMMU
1482 has the capability. With this option, super page will 1511 has the capability. With this option, super page will
1483 not be supported. 1512 not be supported.
1513 ecs_off [Default Off]
1514 By default, extended context tables will be supported if
1515 the hardware advertises that it has support both for the
1516 extended tables themselves, and also PASID support. With
1517 this option set, extended tables will not be used even
1518 on hardware which claims to support them.
1484 1519
1485 intel_idle.max_cstate= [KNL,HW,ACPI,X86] 1520 intel_idle.max_cstate= [KNL,HW,ACPI,X86]
1486 0 disables intel_idle and fall back on acpi_idle. 1521 0 disables intel_idle and fall back on acpi_idle.
@@ -1774,6 +1809,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
1774 1809
1775 * [no]ncq: Turn on or off NCQ. 1810 * [no]ncq: Turn on or off NCQ.
1776 1811
1812 * [no]ncqtrim: Turn off queued DSM TRIM.
1813
1777 * nohrst, nosrst, norst: suppress hard, soft 1814 * nohrst, nosrst, norst: suppress hard, soft
1778 and both resets. 1815 and both resets.
1779 1816
@@ -2437,7 +2474,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2437 2474
2438 nomca [IA-64] Disable machine check abort handling 2475 nomca [IA-64] Disable machine check abort handling
2439 2476
2440 nomce [X86-32] Machine Check Exception 2477 nomce [X86-32] Disable Machine Check Exception
2441 2478
2442 nomfgpt [X86-32] Disable Multi-Function General Purpose 2479 nomfgpt [X86-32] Disable Multi-Function General Purpose
2443 Timer usage (for AMD Geode machines). 2480 Timer usage (for AMD Geode machines).
@@ -2992,11 +3029,34 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
2992 Set maximum number of finished RCU callbacks to 3029 Set maximum number of finished RCU callbacks to
2993 process in one batch. 3030 process in one batch.
2994 3031
3032 rcutree.dump_tree= [KNL]
3033 Dump the structure of the rcu_node combining tree
3034 out at early boot. This is used for diagnostic
3035 purposes, to verify correct tree setup.
3036
3037 rcutree.gp_cleanup_delay= [KNL]
3038 Set the number of jiffies to delay each step of
3039 RCU grace-period cleanup. This only has effect
3040 when CONFIG_RCU_TORTURE_TEST_SLOW_CLEANUP is set.
3041
2995 rcutree.gp_init_delay= [KNL] 3042 rcutree.gp_init_delay= [KNL]
2996 Set the number of jiffies to delay each step of 3043 Set the number of jiffies to delay each step of
2997 RCU grace-period initialization. This only has 3044 RCU grace-period initialization. This only has
2998 effect when CONFIG_RCU_TORTURE_TEST_SLOW_INIT is 3045 effect when CONFIG_RCU_TORTURE_TEST_SLOW_INIT
2999 set. 3046 is set.
3047
3048 rcutree.gp_preinit_delay= [KNL]
3049 Set the number of jiffies to delay each step of
3050 RCU grace-period pre-initialization, that is,
3051 the propagation of recent CPU-hotplug changes up
3052 the rcu_node combining tree. This only has effect
3053 when CONFIG_RCU_TORTURE_TEST_SLOW_PREINIT is set.
3054
3055 rcutree.rcu_fanout_exact= [KNL]
3056 Disable autobalancing of the rcu_node combining
3057 tree. This is used by rcutorture, and might
3058 possibly be useful for architectures having high
3059 cache-to-cache transfer latencies.
3000 3060
3001 rcutree.rcu_fanout_leaf= [KNL] 3061 rcutree.rcu_fanout_leaf= [KNL]
3002 Increase the number of CPUs assigned to each 3062 Increase the number of CPUs assigned to each
@@ -3101,7 +3161,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3101 test, hence the "fake". 3161 test, hence the "fake".
3102 3162
3103 rcutorture.nreaders= [KNL] 3163 rcutorture.nreaders= [KNL]
3104 Set number of RCU readers. 3164 Set number of RCU readers. The value -1 selects
3165 N-1, where N is the number of CPUs. A value
3166 "n" less than -1 selects N-n-2, where N is again
3167 the number of CPUs. For example, -2 selects N
3168 (the number of CPUs), -3 selects N+1, and so on.
3105 3169
3106 rcutorture.object_debug= [KNL] 3170 rcutorture.object_debug= [KNL]
3107 Enable debug-object double-call_rcu() testing. 3171 Enable debug-object double-call_rcu() testing.
@@ -3787,6 +3851,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3787 READ_CAPACITY_16 command); 3851 READ_CAPACITY_16 command);
3788 f = NO_REPORT_OPCODES (don't use report opcodes 3852 f = NO_REPORT_OPCODES (don't use report opcodes
3789 command, uas only); 3853 command, uas only);
3854 g = MAX_SECTORS_240 (don't transfer more than
3855 240 sectors at a time, uas only);
3790 h = CAPACITY_HEURISTICS (decrease the 3856 h = CAPACITY_HEURISTICS (decrease the
3791 reported device capacity by one 3857 reported device capacity by one
3792 sector if the number is odd); 3858 sector if the number is odd);
diff --git a/Documentation/kmemleak.txt b/Documentation/kmemleak.txt
index 45e777f4e41d..18e24abb3ecf 100644
--- a/Documentation/kmemleak.txt
+++ b/Documentation/kmemleak.txt
@@ -6,7 +6,7 @@ Introduction
6 6
7Kmemleak provides a way of detecting possible kernel memory leaks in a 7Kmemleak provides a way of detecting possible kernel memory leaks in a
8way similar to a tracing garbage collector 8way similar to a tracing garbage collector
9(http://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29#Tracing_garbage_collectors), 9(https://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29#Tracing_garbage_collectors),
10with the difference that the orphan objects are not freed but only 10with the difference that the orphan objects are not freed but only
11reported via /sys/kernel/debug/kmemleak. A similar method is used by the 11reported via /sys/kernel/debug/kmemleak. A similar method is used by the
12Valgrind tool (memcheck --leak-check) to detect the memory leaks in 12Valgrind tool (memcheck --leak-check) to detect the memory leaks in
diff --git a/Documentation/laptops/.gitignore b/Documentation/laptops/.gitignore
index da2bd065f4bc..9fc984e64386 100644
--- a/Documentation/laptops/.gitignore
+++ b/Documentation/laptops/.gitignore
@@ -1,2 +1 @@
1dslm dslm
2freefall
diff --git a/Documentation/laptops/00-INDEX b/Documentation/laptops/00-INDEX
index a3b4f209e562..7c0ac2a26b9e 100644
--- a/Documentation/laptops/00-INDEX
+++ b/Documentation/laptops/00-INDEX
@@ -8,8 +8,6 @@ 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
11freefall.c
12 - (HP/DELL) laptop accelerometer program for disk protection.
13laptop-mode.txt 11laptop-mode.txt
14 - how to conserve battery power using laptop-mode. 12 - how to conserve battery power using laptop-mode.
15sony-laptop.txt 13sony-laptop.txt
diff --git a/Documentation/laptops/Makefile b/Documentation/laptops/Makefile
index 2b0fa5edf1d3..0abe44f68965 100644
--- a/Documentation/laptops/Makefile
+++ b/Documentation/laptops/Makefile
@@ -1,5 +1,5 @@
1# List of programs to build 1# List of programs to build
2hostprogs-y := dslm freefall 2hostprogs-y := dslm
3 3
4# Tell kbuild to always build the programs 4# Tell kbuild to always build the programs
5always := $(hostprogs-y) 5always := $(hostprogs-y)
diff --git a/Documentation/laptops/freefall.c b/Documentation/laptops/freefall.c
deleted file mode 100644
index 5e44b20b1848..000000000000
--- a/Documentation/laptops/freefall.c
+++ /dev/null
@@ -1,174 +0,0 @@
1/* Disk protection for HP/DELL machines.
2 *
3 * Copyright 2008 Eric Piel
4 * Copyright 2009 Pavel Machek <pavel@ucw.cz>
5 * Copyright 2012 Sonal Santan
6 * Copyright 2014 Pali Rohár <pali.rohar@gmail.com>
7 *
8 * GPLv2.
9 */
10
11#include <stdio.h>
12#include <stdlib.h>
13#include <unistd.h>
14#include <fcntl.h>
15#include <sys/stat.h>
16#include <sys/types.h>
17#include <string.h>
18#include <stdint.h>
19#include <errno.h>
20#include <signal.h>
21#include <sys/mman.h>
22#include <sched.h>
23#include <syslog.h>
24
25static int noled;
26static char unload_heads_path[64];
27static char device_path[32];
28static const char app_name[] = "FREE FALL";
29
30static int set_unload_heads_path(char *device)
31{
32 if (strlen(device) <= 5 || strncmp(device, "/dev/", 5) != 0)
33 return -EINVAL;
34 strncpy(device_path, device, sizeof(device_path) - 1);
35
36 snprintf(unload_heads_path, sizeof(unload_heads_path) - 1,
37 "/sys/block/%s/device/unload_heads", device+5);
38 return 0;
39}
40
41static int valid_disk(void)
42{
43 int fd = open(unload_heads_path, O_RDONLY);
44
45 if (fd < 0) {
46 perror(unload_heads_path);
47 return 0;
48 }
49
50 close(fd);
51 return 1;
52}
53
54static void write_int(char *path, int i)
55{
56 char buf[1024];
57 int fd = open(path, O_RDWR);
58
59 if (fd < 0) {
60 perror("open");
61 exit(1);
62 }
63
64 sprintf(buf, "%d", i);
65
66 if (write(fd, buf, strlen(buf)) != strlen(buf)) {
67 perror("write");
68 exit(1);
69 }
70
71 close(fd);
72}
73
74static void set_led(int on)
75{
76 if (noled)
77 return;
78 write_int("/sys/class/leds/hp::hddprotect/brightness", on);
79}
80
81static void protect(int seconds)
82{
83 const char *str = (seconds == 0) ? "Unparked" : "Parked";
84
85 write_int(unload_heads_path, seconds*1000);
86 syslog(LOG_INFO, "%s %s disk head\n", str, device_path);
87}
88
89static int on_ac(void)
90{
91 /* /sys/class/power_supply/AC0/online */
92 return 1;
93}
94
95static int lid_open(void)
96{
97 /* /proc/acpi/button/lid/LID/state */
98 return 1;
99}
100
101static void ignore_me(int signum)
102{
103 protect(0);
104 set_led(0);
105}
106
107int main(int argc, char **argv)
108{
109 int fd, ret;
110 struct stat st;
111 struct sched_param param;
112
113 if (argc == 1)
114 ret = set_unload_heads_path("/dev/sda");
115 else if (argc == 2)
116 ret = set_unload_heads_path(argv[1]);
117 else
118 ret = -EINVAL;
119
120 if (ret || !valid_disk()) {
121 fprintf(stderr, "usage: %s <device> (default: /dev/sda)\n",
122 argv[0]);
123 exit(1);
124 }
125
126 fd = open("/dev/freefall", O_RDONLY);
127 if (fd < 0) {
128 perror("/dev/freefall");
129 return EXIT_FAILURE;
130 }
131
132 if (stat("/sys/class/leds/hp::hddprotect/brightness", &st))
133 noled = 1;
134
135 if (daemon(0, 0) != 0) {
136 perror("daemon");
137 return EXIT_FAILURE;
138 }
139
140 openlog(app_name, LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
141
142 param.sched_priority = sched_get_priority_max(SCHED_FIFO);
143 sched_setscheduler(0, SCHED_FIFO, &param);
144 mlockall(MCL_CURRENT|MCL_FUTURE);
145
146 signal(SIGALRM, ignore_me);
147
148 for (;;) {
149 unsigned char count;
150
151 ret = read(fd, &count, sizeof(count));
152 alarm(0);
153 if ((ret == -1) && (errno == EINTR)) {
154 /* Alarm expired, time to unpark the heads */
155 continue;
156 }
157
158 if (ret != sizeof(count)) {
159 perror("read");
160 break;
161 }
162
163 protect(21);
164 set_led(1);
165 if (1 || on_ac() || lid_open())
166 alarm(2);
167 else
168 alarm(20);
169 }
170
171 closelog();
172 close(fd);
173 return EXIT_SUCCESS;
174}
diff --git a/Documentation/leds/leds-class-flash.txt b/Documentation/leds/leds-class-flash.txt
index 19bb67355424..8da3c6f4b60b 100644
--- a/Documentation/leds/leds-class-flash.txt
+++ b/Documentation/leds/leds-class-flash.txt
@@ -20,3 +20,54 @@ Following sysfs attributes are exposed for controlling flash LED devices:
20 - max_flash_timeout 20 - max_flash_timeout
21 - flash_strobe 21 - flash_strobe
22 - flash_fault 22 - flash_fault
23
24
25V4L2 flash wrapper for flash LEDs
26=================================
27
28A LED subsystem driver can be controlled also from the level of VideoForLinux2
29subsystem. In order to enable this CONFIG_V4L2_FLASH_LED_CLASS symbol has to
30be defined in the kernel config.
31
32The driver must call the v4l2_flash_init function to get registered in the
33V4L2 subsystem. The function takes six arguments:
34- dev : flash device, e.g. an I2C device
35- of_node : of_node of the LED, may be NULL if the same as device's
36- fled_cdev : LED flash class device to wrap
37- iled_cdev : LED flash class device representing indicator LED associated with
38 fled_cdev, may be NULL
39- ops : V4L2 specific ops
40 * external_strobe_set - defines the source of the flash LED strobe -
41 V4L2_CID_FLASH_STROBE control or external source, typically
42 a sensor, which makes it possible to synchronise the flash
43 strobe start with exposure start,
44 * intensity_to_led_brightness and led_brightness_to_intensity - perform
45 enum led_brightness <-> V4L2 intensity conversion in a device
46 specific manner - they can be used for devices with non-linear
47 LED current scale.
48- config : configuration for V4L2 Flash sub-device
49 * dev_name - the name of the media entity, unique in the system,
50 * flash_faults - bitmask of flash faults that the LED flash class
51 device can report; corresponding LED_FAULT* bit definitions are
52 available in <linux/led-class-flash.h>,
53 * torch_intensity - constraints for the LED in TORCH mode
54 in microamperes,
55 * indicator_intensity - constraints for the indicator LED
56 in microamperes,
57 * has_external_strobe - determines whether the flash strobe source
58 can be switched to external,
59
60On remove the v4l2_flash_release function has to be called, which takes one
61argument - struct v4l2_flash pointer returned previously by v4l2_flash_init.
62This function can be safely called with NULL or error pointer argument.
63
64Please refer to drivers/leds/leds-max77693.c for an exemplary usage of the
65v4l2 flash wrapper.
66
67Once the V4L2 sub-device is registered by the driver which created the Media
68controller device, the sub-device node acts just as a node of a native V4L2
69flash API device would. The calls are simply routed to the LED flash API.
70
71Opening the V4L2 flash sub-device makes the LED subsystem sysfs interface
72unavailable. The interface is re-enabled after the V4L2 flash sub-device
73is closed.
diff --git a/Documentation/leds/leds-class.txt b/Documentation/leds/leds-class.txt
index 79699c200766..62261c04060a 100644
--- a/Documentation/leds/leds-class.txt
+++ b/Documentation/leds/leds-class.txt
@@ -2,9 +2,6 @@
2LED handling under Linux 2LED handling under Linux
3======================== 3========================
4 4
5If you're reading this and thinking about keyboard leds, these are
6handled by the input subsystem and the led class is *not* needed.
7
8In its simplest form, the LED class just allows control of LEDs from 5In its simplest form, the LED class just allows control of LEDs from
9userspace. LEDs appear in /sys/class/leds/. The maximum brightness of the 6userspace. LEDs appear in /sys/class/leds/. The maximum brightness of the
10LED is defined in max_brightness file. The brightness file will set the brightness 7LED is defined in max_brightness file. The brightness file will set the brightness
diff --git a/Documentation/leds/leds-lp5523.txt b/Documentation/leds/leds-lp5523.txt
index 5b3e91d4ac59..0dbbd279c9b9 100644
--- a/Documentation/leds/leds-lp5523.txt
+++ b/Documentation/leds/leds-lp5523.txt
@@ -49,6 +49,36 @@ There are two ways to run LED patterns.
492) Firmware interface - LP55xx common interface 492) Firmware interface - LP55xx common interface
50 For the details, please refer to 'firmware' section in leds-lp55xx.txt 50 For the details, please refer to 'firmware' section in leds-lp55xx.txt
51 51
52LP5523 has three master faders. If a channel is mapped to one of
53the master faders, its output is dimmed based on the value of the master
54fader.
55
56For example,
57
58 echo "123000123" > master_fader_leds
59
60creates the following channel-fader mappings:
61
62 channel 0,6 to master_fader1
63 channel 1,7 to master_fader2
64 channel 2,8 to master_fader3
65
66Then, to have 25% of the original output on channel 0,6:
67
68 echo 64 > master_fader1
69
70To have 0% of the original output (i.e. no output) channel 1,7:
71
72 echo 0 > master_fader2
73
74To have 100% of the original output (i.e. no dimming) on channel 2,8:
75
76 echo 255 > master_fader3
77
78To clear all master fader controls:
79
80 echo "000000000" > master_fader_leds
81
52Selftest uses always the current from the platform data. 82Selftest uses always the current from the platform data.
53 83
54Each channel contains led current settings. 84Each channel contains led current settings.
diff --git a/Documentation/lockup-watchdogs.txt b/Documentation/lockup-watchdogs.txt
index ab0baa692c13..22dd6af2e4bd 100644
--- a/Documentation/lockup-watchdogs.txt
+++ b/Documentation/lockup-watchdogs.txt
@@ -61,3 +61,21 @@ As explained above, a kernel knob is provided that allows
61administrators to configure the period of the hrtimer and the perf 61administrators to configure the period of the hrtimer and the perf
62event. The right value for a particular environment is a trade-off 62event. The right value for a particular environment is a trade-off
63between fast response to lockups and detection overhead. 63between fast response to lockups and detection overhead.
64
65By default, the watchdog runs on all online cores. However, on a
66kernel configured with NO_HZ_FULL, by default the watchdog runs only
67on the housekeeping cores, not the cores specified in the "nohz_full"
68boot argument. If we allowed the watchdog to run by default on
69the "nohz_full" cores, we would have to run timer ticks to activate
70the scheduler, which would prevent the "nohz_full" functionality
71from protecting the user code on those cores from the kernel.
72Of course, disabling it by default on the nohz_full cores means that
73when those cores do enter the kernel, by default we will not be
74able to detect if they lock up. However, allowing the watchdog
75to continue to run on the housekeeping (non-tickless) cores means
76that we will continue to detect lockups properly on those cores.
77
78In either case, the set of cores excluded from running the watchdog
79may be adjusted via the kernel.watchdog_cpumask sysctl. For
80nohz_full cores, this may be useful for debugging a case where the
81kernel seems to be hanging on the nohz_full cores.
diff --git a/Documentation/magic-number.txt b/Documentation/magic-number.txt
index 4c8e142db2ef..28befed9f610 100644
--- a/Documentation/magic-number.txt
+++ b/Documentation/magic-number.txt
@@ -116,7 +116,6 @@ COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c
116I810_CARD_MAGIC 0x5072696E i810_card sound/oss/i810_audio.c 116I810_CARD_MAGIC 0x5072696E i810_card sound/oss/i810_audio.c
117TRIDENT_CARD_MAGIC 0x5072696E trident_card sound/oss/trident.c 117TRIDENT_CARD_MAGIC 0x5072696E trident_card sound/oss/trident.c
118ROUTER_MAGIC 0x524d4157 wan_device [in wanrouter.h pre 3.9] 118ROUTER_MAGIC 0x524d4157 wan_device [in wanrouter.h pre 3.9]
119SCC_MAGIC 0x52696368 gs_port drivers/char/scc.h
120SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c 119SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c
121GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h 120GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h
122RED_MAGIC1 0x5a2cf071 (any) mm/slab.c 121RED_MAGIC1 0x5a2cf071 (any) mm/slab.c
@@ -138,7 +137,6 @@ KMALLOC_MAGIC 0x87654321 snd_alloc_track sound/core/memory.c
138PWC_MAGIC 0x89DC10AB pwc_device drivers/usb/media/pwc.h 137PWC_MAGIC 0x89DC10AB pwc_device drivers/usb/media/pwc.h
139NBD_REPLY_MAGIC 0x96744668 nbd_reply include/linux/nbd.h 138NBD_REPLY_MAGIC 0x96744668 nbd_reply include/linux/nbd.h
140ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h 139ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h
141SCI_MAGIC 0xbabeface gs_port drivers/char/sh-sci.h
142CODA_MAGIC 0xC0DAC0DA coda_file_info fs/coda/coda_fs_i.h 140CODA_MAGIC 0xC0DAC0DA coda_file_info fs/coda/coda_fs_i.h
143DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h 141DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h
144YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c 142YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c
diff --git a/Documentation/md.txt b/Documentation/md.txt
index f925666e4342..1a2ada46aaed 100644
--- a/Documentation/md.txt
+++ b/Documentation/md.txt
@@ -549,7 +549,7 @@ also have
549 sync_speed_max 549 sync_speed_max
550 This are similar to /proc/sys/dev/raid/speed_limit_{min,max} 550 This are similar to /proc/sys/dev/raid/speed_limit_{min,max}
551 however they only apply to the particular array. 551 however they only apply to the particular array.
552 If no value has been written to these, of if the word 'system' 552 If no value has been written to these, or if the word 'system'
553 is written, then the system-wide value is used. If a value, 553 is written, then the system-wide value is used. If a value,
554 in kibibytes-per-second is written, then it is used. 554 in kibibytes-per-second is written, then it is used.
555 When the files are read, they show the currently active value 555 When the files are read, they show the currently active value
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
index f95746189b5d..13feb697271f 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -617,16 +617,16 @@ case what's actually required is:
617However, stores are not speculated. This means that ordering -is- provided 617However, stores are not speculated. This means that ordering -is- provided
618for load-store control dependencies, as in the following example: 618for load-store control dependencies, as in the following example:
619 619
620 q = ACCESS_ONCE(a); 620 q = READ_ONCE_CTRL(a);
621 if (q) { 621 if (q) {
622 ACCESS_ONCE(b) = p; 622 ACCESS_ONCE(b) = p;
623 } 623 }
624 624
625Control dependencies pair normally with other types of barriers. 625Control dependencies pair normally with other types of barriers. That
626That said, please note that ACCESS_ONCE() is not optional! Without the 626said, please note that READ_ONCE_CTRL() is not optional! Without the
627ACCESS_ONCE(), might combine the load from 'a' with other loads from 627READ_ONCE_CTRL(), the compiler might combine the load from 'a' with
628'a', and the store to 'b' with other stores to 'b', with possible highly 628other loads from 'a', and the store to 'b' with other stores to 'b',
629counterintuitive effects on ordering. 629with possible highly counterintuitive effects on ordering.
630 630
631Worse yet, if the compiler is able to prove (say) that the value of 631Worse yet, if the compiler is able to prove (say) that the value of
632variable 'a' is always non-zero, it would be well within its rights 632variable 'a' is always non-zero, it would be well within its rights
@@ -636,12 +636,15 @@ as follows:
636 q = a; 636 q = a;
637 b = p; /* BUG: Compiler and CPU can both reorder!!! */ 637 b = p; /* BUG: Compiler and CPU can both reorder!!! */
638 638
639So don't leave out the ACCESS_ONCE(). 639Finally, the READ_ONCE_CTRL() includes an smp_read_barrier_depends()
640that DEC Alpha needs in order to respect control depedencies.
641
642So don't leave out the READ_ONCE_CTRL().
640 643
641It is tempting to try to enforce ordering on identical stores on both 644It is tempting to try to enforce ordering on identical stores on both
642branches of the "if" statement as follows: 645branches of the "if" statement as follows:
643 646
644 q = ACCESS_ONCE(a); 647 q = READ_ONCE_CTRL(a);
645 if (q) { 648 if (q) {
646 barrier(); 649 barrier();
647 ACCESS_ONCE(b) = p; 650 ACCESS_ONCE(b) = p;
@@ -655,7 +658,7 @@ branches of the "if" statement as follows:
655Unfortunately, current compilers will transform this as follows at high 658Unfortunately, current compilers will transform this as follows at high
656optimization levels: 659optimization levels:
657 660
658 q = ACCESS_ONCE(a); 661 q = READ_ONCE_CTRL(a);
659 barrier(); 662 barrier();
660 ACCESS_ONCE(b) = p; /* BUG: No ordering vs. load from a!!! */ 663 ACCESS_ONCE(b) = p; /* BUG: No ordering vs. load from a!!! */
661 if (q) { 664 if (q) {
@@ -685,7 +688,7 @@ memory barriers, for example, smp_store_release():
685In contrast, without explicit memory barriers, two-legged-if control 688In contrast, without explicit memory barriers, two-legged-if control
686ordering is guaranteed only when the stores differ, for example: 689ordering is guaranteed only when the stores differ, for example:
687 690
688 q = ACCESS_ONCE(a); 691 q = READ_ONCE_CTRL(a);
689 if (q) { 692 if (q) {
690 ACCESS_ONCE(b) = p; 693 ACCESS_ONCE(b) = p;
691 do_something(); 694 do_something();
@@ -694,14 +697,14 @@ ordering is guaranteed only when the stores differ, for example:
694 do_something_else(); 697 do_something_else();
695 } 698 }
696 699
697The initial ACCESS_ONCE() is still required to prevent the compiler from 700The initial READ_ONCE_CTRL() is still required to prevent the compiler
698proving the value of 'a'. 701from proving the value of 'a'.
699 702
700In addition, you need to be careful what you do with the local variable 'q', 703In addition, you need to be careful what you do with the local variable 'q',
701otherwise the compiler might be able to guess the value and again remove 704otherwise the compiler might be able to guess the value and again remove
702the needed conditional. For example: 705the needed conditional. For example:
703 706
704 q = ACCESS_ONCE(a); 707 q = READ_ONCE_CTRL(a);
705 if (q % MAX) { 708 if (q % MAX) {
706 ACCESS_ONCE(b) = p; 709 ACCESS_ONCE(b) = p;
707 do_something(); 710 do_something();
@@ -714,7 +717,7 @@ If MAX is defined to be 1, then the compiler knows that (q % MAX) is
714equal to zero, in which case the compiler is within its rights to 717equal to zero, in which case the compiler is within its rights to
715transform the above code into the following: 718transform the above code into the following:
716 719
717 q = ACCESS_ONCE(a); 720 q = READ_ONCE_CTRL(a);
718 ACCESS_ONCE(b) = p; 721 ACCESS_ONCE(b) = p;
719 do_something_else(); 722 do_something_else();
720 723
@@ -725,7 +728,7 @@ is gone, and the barrier won't bring it back. Therefore, if you are
725relying on this ordering, you should make sure that MAX is greater than 728relying on this ordering, you should make sure that MAX is greater than
726one, perhaps as follows: 729one, perhaps as follows:
727 730
728 q = ACCESS_ONCE(a); 731 q = READ_ONCE_CTRL(a);
729 BUILD_BUG_ON(MAX <= 1); /* Order load from a with store to b. */ 732 BUILD_BUG_ON(MAX <= 1); /* Order load from a with store to b. */
730 if (q % MAX) { 733 if (q % MAX) {
731 ACCESS_ONCE(b) = p; 734 ACCESS_ONCE(b) = p;
@@ -742,14 +745,15 @@ of the 'if' statement.
742You must also be careful not to rely too much on boolean short-circuit 745You must also be careful not to rely too much on boolean short-circuit
743evaluation. Consider this example: 746evaluation. Consider this example:
744 747
745 q = ACCESS_ONCE(a); 748 q = READ_ONCE_CTRL(a);
746 if (a || 1 > 0) 749 if (a || 1 > 0)
747 ACCESS_ONCE(b) = 1; 750 ACCESS_ONCE(b) = 1;
748 751
749Because the second condition is always true, the compiler can transform 752Because the first condition cannot fault and the second condition is
750this example as following, defeating control dependency: 753always true, the compiler can transform this example as following,
754defeating control dependency:
751 755
752 q = ACCESS_ONCE(a); 756 q = READ_ONCE_CTRL(a);
753 ACCESS_ONCE(b) = 1; 757 ACCESS_ONCE(b) = 1;
754 758
755This example underscores the need to ensure that the compiler cannot 759This example underscores the need to ensure that the compiler cannot
@@ -762,8 +766,8 @@ demonstrated by two related examples, with the initial values of
762x and y both being zero: 766x and y both being zero:
763 767
764 CPU 0 CPU 1 768 CPU 0 CPU 1
765 ===================== ===================== 769 ======================= =======================
766 r1 = ACCESS_ONCE(x); r2 = ACCESS_ONCE(y); 770 r1 = READ_ONCE_CTRL(x); r2 = READ_ONCE_CTRL(y);
767 if (r1 > 0) if (r2 > 0) 771 if (r1 > 0) if (r2 > 0)
768 ACCESS_ONCE(y) = 1; ACCESS_ONCE(x) = 1; 772 ACCESS_ONCE(y) = 1; ACCESS_ONCE(x) = 1;
769 773
@@ -783,7 +787,8 @@ But because control dependencies do -not- provide transitivity, the above
783assertion can fail after the combined three-CPU example completes. If you 787assertion can fail after the combined three-CPU example completes. If you
784need the three-CPU example to provide ordering, you will need smp_mb() 788need the three-CPU example to provide ordering, you will need smp_mb()
785between the loads and stores in the CPU 0 and CPU 1 code fragments, 789between the loads and stores in the CPU 0 and CPU 1 code fragments,
786that is, just before or just after the "if" statements. 790that is, just before or just after the "if" statements. Furthermore,
791the original two-CPU example is very fragile and should be avoided.
787 792
788These two examples are the LB and WWC litmus tests from this paper: 793These two examples are the LB and WWC litmus tests from this paper:
789http://www.cl.cam.ac.uk/users/pes20/ppc-supplemental/test6.pdf and this 794http://www.cl.cam.ac.uk/users/pes20/ppc-supplemental/test6.pdf and this
@@ -791,6 +796,12 @@ site: https://www.cl.cam.ac.uk/~pes20/ppcmem/index.html.
791 796
792In summary: 797In summary:
793 798
799 (*) Control dependencies must be headed by READ_ONCE_CTRL().
800 Or, as a much less preferable alternative, interpose
801 be headed by READ_ONCE() or an ACCESS_ONCE() read and must
802 have smp_read_barrier_depends() between this read and the
803 control-dependent write.
804
794 (*) Control dependencies can order prior loads against later stores. 805 (*) Control dependencies can order prior loads against later stores.
795 However, they do -not- guarantee any other sort of ordering: 806 However, they do -not- guarantee any other sort of ordering:
796 Not prior loads against later loads, nor prior stores against 807 Not prior loads against later loads, nor prior stores against
@@ -1662,7 +1673,7 @@ CPU from reordering them.
1662 1673
1663There are some more advanced barrier functions: 1674There are some more advanced barrier functions:
1664 1675
1665 (*) set_mb(var, value) 1676 (*) smp_store_mb(var, value)
1666 1677
1667 This assigns the value to the variable and then inserts a full memory 1678 This assigns the value to the variable and then inserts a full memory
1668 barrier after it, depending on the function. It isn't guaranteed to 1679 barrier after it, depending on the function. It isn't guaranteed to
@@ -1784,10 +1795,9 @@ for each construct. These operations all imply certain barriers:
1784 1795
1785 Memory operations issued before the ACQUIRE may be completed after 1796 Memory operations issued before the ACQUIRE may be completed after
1786 the ACQUIRE operation has completed. An smp_mb__before_spinlock(), 1797 the ACQUIRE operation has completed. An smp_mb__before_spinlock(),
1787 combined with a following ACQUIRE, orders prior loads against 1798 combined with a following ACQUIRE, orders prior stores against
1788 subsequent loads and stores and also orders prior stores against 1799 subsequent loads and stores. Note that this is weaker than smp_mb()!
1789 subsequent stores. Note that this is weaker than smp_mb()! The 1800 The smp_mb__before_spinlock() primitive is free on many architectures.
1790 smp_mb__before_spinlock() primitive is free on many architectures.
1791 1801
1792 (2) RELEASE operation implication: 1802 (2) RELEASE operation implication:
1793 1803
@@ -1975,7 +1985,7 @@ after it has altered the task state:
1975 CPU 1 1985 CPU 1
1976 =============================== 1986 ===============================
1977 set_current_state(); 1987 set_current_state();
1978 set_mb(); 1988 smp_store_mb();
1979 STORE current->state 1989 STORE current->state
1980 <general barrier> 1990 <general barrier>
1981 LOAD event_indicated 1991 LOAD event_indicated
@@ -2016,7 +2026,7 @@ between the STORE to indicate the event and the STORE to set TASK_RUNNING:
2016 CPU 1 CPU 2 2026 CPU 1 CPU 2
2017 =============================== =============================== 2027 =============================== ===============================
2018 set_current_state(); STORE event_indicated 2028 set_current_state(); STORE event_indicated
2019 set_mb(); wake_up(); 2029 smp_store_mb(); wake_up();
2020 STORE current->state <write barrier> 2030 STORE current->state <write barrier>
2021 <general barrier> STORE current->state 2031 <general barrier> STORE current->state
2022 LOAD event_indicated 2032 LOAD event_indicated
diff --git a/Documentation/mic/mic_overview.txt b/Documentation/mic/mic_overview.txt
index 77c541802ad9..1a2f2c8ec59e 100644
--- a/Documentation/mic/mic_overview.txt
+++ b/Documentation/mic/mic_overview.txt
@@ -24,6 +24,10 @@ a virtual bus called mic bus is created and virtual dma devices are
24created on it by the host/card drivers. On host the channels are private 24created on it by the host/card drivers. On host the channels are private
25and used only by the host driver to transfer data for the virtio devices. 25and used only by the host driver to transfer data for the virtio devices.
26 26
27The Symmetric Communication Interface (SCIF (pronounced as skiff)) is a
28low level communications API across PCIe currently implemented for MIC.
29More details are available at scif_overview.txt.
30
27Here is a block diagram of the various components described above. The 31Here is a block diagram of the various components described above. The
28virtio backends are situated on the host rather than the card given better 32virtio backends are situated on the host rather than the card given better
29single threaded performance for the host compared to MIC, the ability of 33single threaded performance for the host compared to MIC, the ability of
@@ -47,18 +51,18 @@ the fact that the virtio block storage backend can only be on the host.
47 | | | Virtio over PCIe IOCTLs | 51 | | | Virtio over PCIe IOCTLs |
48 | | +--------------------------+ 52 | | +--------------------------+
49+-----------+ | | | +-----------+ 53+-----------+ | | | +-----------+
50| MIC DMA | | | | | MIC DMA | 54| MIC DMA | | +----------+ | +-----------+ | | MIC DMA |
51| Driver | | | | | Driver | 55| Driver | | | SCIF | | | SCIF | | | Driver |
52+-----------+ | | | +-----------+ 56+-----------+ | +----------+ | +-----------+ | +-----------+
53 | | | | | 57 | | | | | | |
54+---------------+ | | | +----------------+ 58+---------------+ | +-----+-----+ | +-----+-----+ | +---------------+
55|MIC virtual Bus| | | | |MIC virtual Bus | 59|MIC virtual Bus| | |SCIF HW Bus| | |SCIF HW BUS| | |MIC virtual Bus|
56+---------------+ | | | +----------------+ 60+---------------+ | +-----------+ | +-----+-----+ | +---------------+
57 | | | | | 61 | | | | | | |
58 | +--------------+ | +---------------+ | 62 | +--------------+ | | | +---------------+ |
59 | |Intel MIC | | |Intel MIC | | 63 | |Intel MIC | | | | |Intel MIC | |
60 +---|Card Driver | | |Host Driver | | 64 +---|Card Driver +----+ | | |Host Driver | |
61 +--------------+ | +---------------+-----+ 65 +--------------+ | +----+---------------+-----+
62 | | | 66 | | |
63 +-------------------------------------------------------------+ 67 +-------------------------------------------------------------+
64 | | 68 | |
diff --git a/Documentation/mic/mpssd/Makefile b/Documentation/mic/mpssd/Makefile
index f47fe6ba7300..06871b0c08a6 100644
--- a/Documentation/mic/mpssd/Makefile
+++ b/Documentation/mic/mpssd/Makefile
@@ -1,3 +1,4 @@
1ifndef CROSS_COMPILE
1# List of programs to build 2# List of programs to build
2hostprogs-$(CONFIG_X86_64) := mpssd 3hostprogs-$(CONFIG_X86_64) := mpssd
3 4
@@ -17,3 +18,4 @@ HOSTLOADLIBES_mpssd := -lpthread
17install: 18install:
18 install mpssd /usr/sbin/mpssd 19 install mpssd /usr/sbin/mpssd
19 install micctrl /usr/sbin/micctrl 20 install micctrl /usr/sbin/micctrl
21endif
diff --git a/Documentation/mic/mpssd/mpss b/Documentation/mic/mpssd/mpss
index cacbdb0aefb9..582aad4811ae 100755
--- a/Documentation/mic/mpssd/mpss
+++ b/Documentation/mic/mpssd/mpss
@@ -35,6 +35,7 @@
35 35
36exec=/usr/sbin/mpssd 36exec=/usr/sbin/mpssd
37sysfs="/sys/class/mic" 37sysfs="/sys/class/mic"
38mic_modules="mic_host mic_x100_dma scif"
38 39
39start() 40start()
40{ 41{
@@ -48,18 +49,15 @@ start()
48 fi 49 fi
49 50
50 echo -e $"Starting MPSS Stack" 51 echo -e $"Starting MPSS Stack"
51 echo -e $"Loading MIC_X100_DMA & MIC_HOST Modules" 52 echo -e $"Loading MIC drivers:" $mic_modules
52 53
53 for f in "mic_host" "mic_x100_dma" 54 modprobe -a $mic_modules
54 do 55 RETVAL=$?
55 modprobe $f 56 if [ $RETVAL -ne 0 ]; then
56 RETVAL=$? 57 failure
57 if [ $RETVAL -ne 0 ]; then 58 echo
58 failure 59 return $RETVAL
59 echo 60 fi
60 return $RETVAL
61 fi
62 done
63 61
64 # Start the daemon 62 # Start the daemon
65 echo -n $"Starting MPSSD " 63 echo -n $"Starting MPSSD "
@@ -170,8 +168,8 @@ unload()
170 stop 168 stop
171 169
172 sleep 5 170 sleep 5
173 echo -n $"Removing MIC_HOST & MIC_X100_DMA Modules: " 171 echo -n $"Removing MIC drivers:" $mic_modules
174 modprobe -r mic_host mic_x100_dma 172 modprobe -r $mic_modules
175 RETVAL=$? 173 RETVAL=$?
176 [ $RETVAL -ne 0 ] && failure || success 174 [ $RETVAL -ne 0 ] && failure || success
177 echo 175 echo
diff --git a/Documentation/mic/scif_overview.txt b/Documentation/mic/scif_overview.txt
new file mode 100644
index 000000000000..0a280d986731
--- /dev/null
+++ b/Documentation/mic/scif_overview.txt
@@ -0,0 +1,98 @@
1The Symmetric Communication Interface (SCIF (pronounced as skiff)) is a low
2level communications API across PCIe currently implemented for MIC. Currently
3SCIF provides inter-node communication within a single host platform, where a
4node is a MIC Coprocessor or Xeon based host. SCIF abstracts the details of
5communicating over the PCIe bus while providing an API that is symmetric
6across all the nodes in the PCIe network. An important design objective for SCIF
7is to deliver the maximum possible performance given the communication
8abilities of the hardware. SCIF has been used to implement an offload compiler
9runtime and OFED support for MPI implementations for MIC coprocessors.
10
11==== SCIF API Components ====
12The SCIF API has the following parts:
131. Connection establishment using a client server model
142. Byte stream messaging intended for short messages
153. Node enumeration to determine online nodes
164. Poll semantics for detection of incoming connections and messages
175. Memory registration to pin down pages
186. Remote memory mapping for low latency CPU accesses via mmap
197. Remote DMA (RDMA) for high bandwidth DMA transfers
208. Fence APIs for RDMA synchronization
21
22SCIF exposes the notion of a connection which can be used by peer processes on
23nodes in a SCIF PCIe "network" to share memory "windows" and to communicate. A
24process in a SCIF node initiates a SCIF connection to a peer process on a
25different node via a SCIF "endpoint". SCIF endpoints support messaging APIs
26which are similar to connection oriented socket APIs. Connected SCIF endpoints
27can also register local memory which is followed by data transfer using either
28DMA, CPU copies or remote memory mapping via mmap. SCIF supports both user and
29kernel mode clients which are functionally equivalent.
30
31==== SCIF Performance for MIC ====
32DMA bandwidth comparison between the TCP (over ethernet over PCIe) stack versus
33SCIF shows the performance advantages of SCIF for HPC applications and runtimes.
34
35 Comparison of TCP and SCIF based BW
36
37 Throughput (GB/sec)
38 8 + PCIe Bandwidth ******
39 + TCP ######
40 7 + ************************************** SCIF %%%%%%
41 | %%%%%%%%%%%%%%%%%%%
42 6 + %%%%
43 | %%
44 | %%%
45 5 + %%
46 | %%
47 4 + %%
48 | %%
49 3 + %%
50 | %
51 2 + %%
52 | %%
53 | %
54 1 +
55 + ######################################
56 0 +++---+++--+--+-+--+--+-++-+--+-++-+--+-++-+-
57 1 10 100 1000 10000 100000
58 Transfer Size (KBytes)
59
60SCIF allows memory sharing via mmap(..) between processes on different PCIe
61nodes and thus provides bare-metal PCIe latency. The round trip SCIF mmap
62latency from the host to an x100 MIC for an 8 byte message is 0.44 usecs.
63
64SCIF has a user space library which is a thin IOCTL wrapper providing a user
65space API similar to the kernel API in scif.h. The SCIF user space library
66is distributed @ https://software.intel.com/en-us/mic-developer
67
68Here is some pseudo code for an example of how two applications on two PCIe
69nodes would typically use the SCIF API:
70
71Process A (on node A) Process B (on node B)
72
73/* get online node information */
74scif_get_node_ids(..) scif_get_node_ids(..)
75scif_open(..) scif_open(..)
76scif_bind(..) scif_bind(..)
77scif_listen(..)
78scif_accept(..) scif_connect(..)
79/* SCIF connection established */
80
81/* Send and receive short messages */
82scif_send(..)/scif_recv(..) scif_send(..)/scif_recv(..)
83
84/* Register memory */
85scif_register(..) scif_register(..)
86
87/* RDMA */
88scif_readfrom(..)/scif_writeto(..) scif_readfrom(..)/scif_writeto(..)
89
90/* Fence DMAs */
91scif_fence_signal(..) scif_fence_signal(..)
92
93mmap(..) mmap(..)
94
95/* Access remote registered memory */
96
97/* Close the endpoints */
98scif_close(..) scif_close(..)
diff --git a/Documentation/misc-devices/spear-pcie-gadget.txt b/Documentation/misc-devices/spear-pcie-gadget.txt
index 02c13ef5e908..89b88dee4143 100644
--- a/Documentation/misc-devices/spear-pcie-gadget.txt
+++ b/Documentation/misc-devices/spear-pcie-gadget.txt
@@ -2,7 +2,7 @@ Spear PCIe Gadget Driver:
2 2
3Author 3Author
4============= 4=============
5Pratyush Anand (pratyush.anand@st.com) 5Pratyush Anand (pratyush.anand@gmail.com)
6 6
7Location 7Location
8============ 8============
diff --git a/Documentation/module-signing.txt b/Documentation/module-signing.txt
index 09c2382ad055..c72702ec1ded 100644
--- a/Documentation/module-signing.txt
+++ b/Documentation/module-signing.txt
@@ -119,9 +119,9 @@ Most notably, in the x509.genkey file, the req_distinguished_name section
119should be altered from the default: 119should be altered from the default:
120 120
121 [ req_distinguished_name ] 121 [ req_distinguished_name ]
122 O = Magrathea 122 #O = Unspecified company
123 CN = Glacier signing key 123 CN = Build time autogenerated kernel key
124 emailAddress = slartibartfast@magrathea.h2g2 124 #emailAddress = unspecified.user@unspecified.company
125 125
126The generated RSA key size can also be set with: 126The generated RSA key size can also be set with:
127 127
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index 83bf4986baea..334b49ef02d1 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -51,6 +51,7 @@ Table of Contents
513.4 Configuring Bonding Manually via Sysfs 513.4 Configuring Bonding Manually via Sysfs
523.5 Configuration with Interfaces Support 523.5 Configuration with Interfaces Support
533.6 Overriding Configuration for Special Cases 533.6 Overriding Configuration for Special Cases
543.7 Configuring LACP for 802.3ad mode in a more secure way
54 55
554. Querying Bonding Configuration 564. Querying Bonding Configuration
564.1 Bonding Configuration 574.1 Bonding Configuration
@@ -178,6 +179,27 @@ active_slave
178 active slave, or the empty string if there is no active slave or 179 active slave, or the empty string if there is no active slave or
179 the current mode does not use an active slave. 180 the current mode does not use an active slave.
180 181
182ad_actor_sys_prio
183
184 In an AD system, this specifies the system priority. The allowed range
185 is 1 - 65535. If the value is not specified, it takes 65535 as the
186 default value.
187
188 This parameter has effect only in 802.3ad mode and is available through
189 SysFs interface.
190
191ad_actor_system
192
193 In an AD system, this specifies the mac-address for the actor in
194 protocol packet exchanges (LACPDUs). The value cannot be NULL or
195 multicast. It is preferred to have the local-admin bit set for this
196 mac but driver does not enforce it. If the value is not given then
197 system defaults to using the masters' mac address as actors' system
198 address.
199
200 This parameter has effect only in 802.3ad mode and is available through
201 SysFs interface.
202
181ad_select 203ad_select
182 204
183 Specifies the 802.3ad aggregation selection logic to use. The 205 Specifies the 802.3ad aggregation selection logic to use. The
@@ -220,6 +242,21 @@ ad_select
220 242
221 This option was added in bonding version 3.4.0. 243 This option was added in bonding version 3.4.0.
222 244
245ad_user_port_key
246
247 In an AD system, the port-key has three parts as shown below -
248
249 Bits Use
250 00 Duplex
251 01-05 Speed
252 06-15 User-defined
253
254 This defines the upper 10 bits of the port key. The values can be
255 from 0 - 1023. If not given, the system defaults to 0.
256
257 This parameter has effect only in 802.3ad mode and is available through
258 SysFs interface.
259
223all_slaves_active 260all_slaves_active
224 261
225 Specifies that duplicate frames (received on inactive ports) should be 262 Specifies that duplicate frames (received on inactive ports) should be
@@ -1622,6 +1659,53 @@ output port selection.
1622This feature first appeared in bonding driver version 3.7.0 and support for 1659This feature first appeared in bonding driver version 3.7.0 and support for
1623output slave selection was limited to round-robin and active-backup modes. 1660output slave selection was limited to round-robin and active-backup modes.
1624 1661
16623.7 Configuring LACP for 802.3ad mode in a more secure way
1663----------------------------------------------------------
1664
1665When using 802.3ad bonding mode, the Actor (host) and Partner (switch)
1666exchange LACPDUs. These LACPDUs cannot be sniffed, because they are
1667destined to link local mac addresses (which switches/bridges are not
1668supposed to forward). However, most of the values are easily predictable
1669or are simply the machine's MAC address (which is trivially known to all
1670other hosts in the same L2). This implies that other machines in the L2
1671domain can spoof LACPDU packets from other hosts to the switch and potentially
1672cause mayhem by joining (from the point of view of the switch) another
1673machine's aggregate, thus receiving a portion of that hosts incoming
1674traffic and / or spoofing traffic from that machine themselves (potentially
1675even successfully terminating some portion of flows). Though this is not
1676a likely scenario, one could avoid this possibility by simply configuring
1677few bonding parameters:
1678
1679 (a) ad_actor_system : You can set a random mac-address that can be used for
1680 these LACPDU exchanges. The value can not be either NULL or Multicast.
1681 Also it's preferable to set the local-admin bit. Following shell code
1682 generates a random mac-address as described above.
1683
1684 # sys_mac_addr=$(printf '%02x:%02x:%02x:%02x:%02x:%02x' \
1685 $(( (RANDOM & 0xFE) | 0x02 )) \
1686 $(( RANDOM & 0xFF )) \
1687 $(( RANDOM & 0xFF )) \
1688 $(( RANDOM & 0xFF )) \
1689 $(( RANDOM & 0xFF )) \
1690 $(( RANDOM & 0xFF )))
1691 # echo $sys_mac_addr > /sys/class/net/bond0/bonding/ad_actor_system
1692
1693 (b) ad_actor_sys_prio : Randomize the system priority. The default value
1694 is 65535, but system can take the value from 1 - 65535. Following shell
1695 code generates random priority and sets it.
1696
1697 # sys_prio=$(( 1 + RANDOM + RANDOM ))
1698 # echo $sys_prio > /sys/class/net/bond0/bonding/ad_actor_sys_prio
1699
1700 (c) ad_user_port_key : Use the user portion of the port-key. The default
1701 keeps this empty. These are the upper 10 bits of the port-key and value
1702 ranges from 0 - 1023. Following shell code generates these 10 bits and
1703 sets it.
1704
1705 # usr_port_key=$(( RANDOM & 0x3FF ))
1706 # echo $usr_port_key > /sys/class/net/bond0/bonding/ad_user_port_key
1707
1708
16254 Querying Bonding Configuration 17094 Querying Bonding Configuration
1626================================= 1710=================================
1627 1711
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
index 5abad1e921ca..b48d4a149411 100644
--- a/Documentation/networking/can.txt
+++ b/Documentation/networking/can.txt
@@ -268,6 +268,9 @@ solution for a couple of reasons:
268 struct can_frame { 268 struct can_frame {
269 canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */ 269 canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */
270 __u8 can_dlc; /* frame payload length in byte (0 .. 8) */ 270 __u8 can_dlc; /* frame payload length in byte (0 .. 8) */
271 __u8 __pad; /* padding */
272 __u8 __res0; /* reserved / padding */
273 __u8 __res1; /* reserved / padding */
271 __u8 data[8] __attribute__((aligned(8))); 274 __u8 data[8] __attribute__((aligned(8)));
272 }; 275 };
273 276
diff --git a/Documentation/networking/dctcp.txt b/Documentation/networking/dctcp.txt
index 0d5dfbc89ec9..13a857753208 100644
--- a/Documentation/networking/dctcp.txt
+++ b/Documentation/networking/dctcp.txt
@@ -8,6 +8,7 @@ the data center network to provide multi-bit feedback to the end hosts.
8To enable it on end hosts: 8To enable it on end hosts:
9 9
10 sysctl -w net.ipv4.tcp_congestion_control=dctcp 10 sysctl -w net.ipv4.tcp_congestion_control=dctcp
11 sysctl -w net.ipv4.tcp_ecn_fallback=0 (optional)
11 12
12All switches in the data center network running DCTCP must support ECN 13All switches in the data center network running DCTCP must support ECN
13marking and be configured for marking when reaching defined switch buffer 14marking and be configured for marking when reaching defined switch buffer
diff --git a/Documentation/networking/fore200e.txt b/Documentation/networking/fore200e.txt
index d52af53efdc5..1f98f62b4370 100644
--- a/Documentation/networking/fore200e.txt
+++ b/Documentation/networking/fore200e.txt
@@ -37,7 +37,7 @@ version. Alternative binary firmware images can be found somewhere on the
37ForeThought CD-ROM supplied with your adapter by FORE Systems. 37ForeThought CD-ROM supplied with your adapter by FORE Systems.
38 38
39You can also get the latest firmware images from FORE Systems at 39You can also get the latest firmware images from FORE Systems at
40http://en.wikipedia.org/wiki/FORE_Systems. Register TACTics Online and go to 40https://en.wikipedia.org/wiki/FORE_Systems. Register TACTics Online and go to
41the 'software updates' pages. The firmware binaries are part of 41the 'software updates' pages. The firmware binaries are part of
42the various ForeThought software distributions. 42the various ForeThought software distributions.
43 43
diff --git a/Documentation/networking/ieee802154.txt b/Documentation/networking/ieee802154.txt
index 22bbc7225f8e..1700756af057 100644
--- a/Documentation/networking/ieee802154.txt
+++ b/Documentation/networking/ieee802154.txt
@@ -30,8 +30,8 @@ int sd = socket(PF_IEEE802154, SOCK_DGRAM, 0);
30 30
31The address family, socket addresses etc. are defined in the 31The address family, socket addresses etc. are defined in the
32include/net/af_ieee802154.h header or in the special header 32include/net/af_ieee802154.h header or in the special header
33in our userspace package (see either linux-zigbee sourceforge download page 33in the userspace package (see either http://wpan.cakelab.org/ or the
34or git tree at git://linux-zigbee.git.sourceforge.net/gitroot/linux-zigbee). 34git tree at https://github.com/linux-wpan/wpan-tools).
35 35
36One can use SOCK_RAW for passing raw data towards device xmit function. YMMV. 36One can use SOCK_RAW for passing raw data towards device xmit function. YMMV.
37 37
@@ -49,15 +49,6 @@ Like with WiFi, there are several types of devices implementing IEEE 802.15.4.
49Those types of devices require different approach to be hooked into Linux kernel. 49Those types of devices require different approach to be hooked into Linux kernel.
50 50
51 51
52MLME - MAC Level Management
53============================
54
55Most of IEEE 802.15.4 MLME interfaces are directly mapped on netlink commands.
56See the include/net/nl802154.h header. Our userspace tools package
57(see above) provides CLI configuration utility for radio interfaces and simple
58coordinator for IEEE 802.15.4 networks as an example users of MLME protocol.
59
60
61HardMAC 52HardMAC
62======= 53=======
63 54
@@ -75,8 +66,6 @@ net_device with a pointer to struct ieee802154_mlme_ops instance. The fields
75assoc_req, assoc_resp, disassoc_req, start_req, and scan_req are optional. 66assoc_req, assoc_resp, disassoc_req, start_req, and scan_req are optional.
76All other fields are required. 67All other fields are required.
77 68
78We provide an example of simple HardMAC driver at drivers/ieee802154/fakehard.c
79
80 69
81SoftMAC 70SoftMAC
82======= 71=======
@@ -89,7 +78,8 @@ stack interface for network sniffers (e.g. WireShark).
89 78
90This layer is going to be extended soon. 79This layer is going to be extended soon.
91 80
92See header include/net/mac802154.h and several drivers in drivers/ieee802154/. 81See header include/net/mac802154.h and several drivers in
82drivers/net/ieee802154/.
93 83
94 84
95Device drivers API 85Device drivers API
@@ -114,18 +104,17 @@ Moreover IEEE 802.15.4 device operations structure should be filled.
114Fake drivers 104Fake drivers
115============ 105============
116 106
117In addition there are two drivers available which simulate real devices with 107In addition there is a driver available which simulates a real device with
118HardMAC (fakehard) and SoftMAC (fakelb - IEEE 802.15.4 loopback driver) 108SoftMAC (fakelb - IEEE 802.15.4 loopback driver) interface. This option
119interfaces. This option provides possibility to test and debug stack without 109provides possibility to test and debug stack without usage of real hardware.
120usage of real hardware.
121 110
122See sources in drivers/ieee802154 folder for more details. 111See sources in drivers/net/ieee802154 folder for more details.
123 112
124 113
1256LoWPAN Linux implementation 1146LoWPAN Linux implementation
126============================ 115============================
127 116
128The IEEE 802.15.4 standard specifies an MTU of 128 bytes, yielding about 80 117The IEEE 802.15.4 standard specifies an MTU of 127 bytes, yielding about 80
129octets of actual MAC payload once security is turned on, on a wireless link 118octets of actual MAC payload once security is turned on, on a wireless link
130with a link throughput of 250 kbps or less. The 6LoWPAN adaptation format 119with a link throughput of 250 kbps or less. The 6LoWPAN adaptation format
131[RFC4944] was specified to carry IPv6 datagrams over such constrained links, 120[RFC4944] was specified to carry IPv6 datagrams over such constrained links,
@@ -140,7 +129,8 @@ In Semptember 2011 the standard update was published - [RFC6282].
140It deprecates HC1 and HC2 compression and defines IPHC encoding format which is 129It deprecates HC1 and HC2 compression and defines IPHC encoding format which is
141used in this Linux implementation. 130used in this Linux implementation.
142 131
143All the code related to 6lowpan you may find in files: net/ieee802154/6lowpan.* 132All the code related to 6lowpan you may find in files: net/6lowpan/*
133and net/ieee802154/6lowpan/*
144 134
145To setup 6lowpan interface you need (busybox release > 1.17.0): 135To setup 6lowpan interface you need (busybox release > 1.17.0):
1461. Add IEEE802.15.4 interface and initialize PANid; 1361. Add IEEE802.15.4 interface and initialize PANid;
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index 071fb18dc57c..5fae7704daab 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -267,6 +267,15 @@ tcp_ecn - INTEGER
267 but do not request ECN on outgoing connections. 267 but do not request ECN on outgoing connections.
268 Default: 2 268 Default: 2
269 269
270tcp_ecn_fallback - BOOLEAN
271 If the kernel detects that ECN connection misbehaves, enable fall
272 back to non-ECN. Currently, this knob implements the fallback
273 from RFC3168, section 6.1.1.1., but we reserve that in future,
274 additional detection mechanisms could be implemented under this
275 knob. The value is not used, if tcp_ecn or per route (or congestion
276 control) ECN settings are disabled.
277 Default: 1 (fallback enabled)
278
270tcp_fack - BOOLEAN 279tcp_fack - BOOLEAN
271 Enable FACK congestion avoidance and fast retransmission. 280 Enable FACK congestion avoidance and fast retransmission.
272 The value is not used, if tcp_sack is not enabled. 281 The value is not used, if tcp_sack is not enabled.
@@ -742,8 +751,10 @@ IP Variables:
742ip_local_port_range - 2 INTEGERS 751ip_local_port_range - 2 INTEGERS
743 Defines the local port range that is used by TCP and UDP to 752 Defines the local port range that is used by TCP and UDP to
744 choose the local port. The first number is the first, the 753 choose the local port. The first number is the first, the
745 second the last local port number. The default values are 754 second the last local port number.
746 32768 and 61000 respectively. 755 If possible, it is better these numbers have different parity.
756 (one even and one odd values)
757 The default values are 32768 and 60999 respectively.
747 758
748ip_local_reserved_ports - list of comma separated ranges 759ip_local_reserved_ports - list of comma separated ranges
749 Specify the ports which are reserved for known third-party 760 Specify the ports which are reserved for known third-party
@@ -766,7 +777,7 @@ ip_local_reserved_ports - list of comma separated ranges
766 ip_local_port_range, e.g.: 777 ip_local_port_range, e.g.:
767 778
768 $ cat /proc/sys/net/ipv4/ip_local_port_range 779 $ cat /proc/sys/net/ipv4/ip_local_port_range
769 32000 61000 780 32000 60999
770 $ cat /proc/sys/net/ipv4/ip_local_reserved_ports 781 $ cat /proc/sys/net/ipv4/ip_local_reserved_ports
771 8080,9148 782 8080,9148
772 783
@@ -1213,6 +1224,14 @@ auto_flowlabels - BOOLEAN
1213 FALSE: disabled 1224 FALSE: disabled
1214 Default: false 1225 Default: false
1215 1226
1227flowlabel_state_ranges - BOOLEAN
1228 Split the flow label number space into two ranges. 0-0x7FFFF is
1229 reserved for the IPv6 flow manager facility, 0x80000-0xFFFFF
1230 is reserved for stateless flow labels as described in RFC6437.
1231 TRUE: enabled
1232 FALSE: disabled
1233 Default: true
1234
1216anycast_src_echo_reply - BOOLEAN 1235anycast_src_echo_reply - BOOLEAN
1217 Controls the use of anycast addresses as source addresses for ICMPv6 1236 Controls the use of anycast addresses as source addresses for ICMPv6
1218 echo reply 1237 echo reply
diff --git a/Documentation/networking/mpls-sysctl.txt b/Documentation/networking/mpls-sysctl.txt
index 639ddf0ece9b..9ed15f86c17c 100644
--- a/Documentation/networking/mpls-sysctl.txt
+++ b/Documentation/networking/mpls-sysctl.txt
@@ -18,3 +18,12 @@ platform_labels - INTEGER
18 18
19 Possible values: 0 - 1048575 19 Possible values: 0 - 1048575
20 Default: 0 20 Default: 0
21
22conf/<interface>/input - BOOL
23 Control whether packets can be input on this interface.
24
25 If disabled, packets will be discarded without further
26 processing.
27
28 0 - disabled (default)
29 not 0 - enabled
diff --git a/Documentation/networking/netconsole.txt b/Documentation/networking/netconsole.txt
index a5d574a9ae09..30409a36e95d 100644
--- a/Documentation/networking/netconsole.txt
+++ b/Documentation/networking/netconsole.txt
@@ -2,6 +2,7 @@
2started by Ingo Molnar <mingo@redhat.com>, 2001.09.17 2started by Ingo Molnar <mingo@redhat.com>, 2001.09.17
32.6 port and netpoll api by Matt Mackall <mpm@selenic.com>, Sep 9 2003 32.6 port and netpoll api by Matt Mackall <mpm@selenic.com>, Sep 9 2003
4IPv6 support by Cong Wang <xiyou.wangcong@gmail.com>, Jan 1 2013 4IPv6 support by Cong Wang <xiyou.wangcong@gmail.com>, Jan 1 2013
5Extended console support by Tejun Heo <tj@kernel.org>, May 1 2015
5 6
6Please send bug reports to Matt Mackall <mpm@selenic.com> 7Please send bug reports to Matt Mackall <mpm@selenic.com>
7Satyam Sharma <satyam.sharma@gmail.com>, and Cong Wang <xiyou.wangcong@gmail.com> 8Satyam Sharma <satyam.sharma@gmail.com>, and Cong Wang <xiyou.wangcong@gmail.com>
@@ -24,9 +25,10 @@ Sender and receiver configuration:
24It takes a string configuration parameter "netconsole" in the 25It takes a string configuration parameter "netconsole" in the
25following format: 26following format:
26 27
27 netconsole=[src-port]@[src-ip]/[<dev>],[tgt-port]@<tgt-ip>/[tgt-macaddr] 28 netconsole=[+][src-port]@[src-ip]/[<dev>],[tgt-port]@<tgt-ip>/[tgt-macaddr]
28 29
29 where 30 where
31 + if present, enable extended console support
30 src-port source for UDP packets (defaults to 6665) 32 src-port source for UDP packets (defaults to 6665)
31 src-ip source IP to use (interface address) 33 src-ip source IP to use (interface address)
32 dev network interface (eth0) 34 dev network interface (eth0)
@@ -107,6 +109,7 @@ To remove a target:
107The interface exposes these parameters of a netconsole target to userspace: 109The interface exposes these parameters of a netconsole target to userspace:
108 110
109 enabled Is this target currently enabled? (read-write) 111 enabled Is this target currently enabled? (read-write)
112 extended Extended mode enabled (read-write)
110 dev_name Local network interface name (read-write) 113 dev_name Local network interface name (read-write)
111 local_port Source UDP port to use (read-write) 114 local_port Source UDP port to use (read-write)
112 remote_port Remote agent's UDP port (read-write) 115 remote_port Remote agent's UDP port (read-write)
@@ -132,6 +135,36 @@ You can also update the local interface dynamically. This is especially
132useful if you want to use interfaces that have newly come up (and may not 135useful if you want to use interfaces that have newly come up (and may not
133have existed when netconsole was loaded / initialized). 136have existed when netconsole was loaded / initialized).
134 137
138Extended console:
139=================
140
141If '+' is prefixed to the configuration line or "extended" config file
142is set to 1, extended console support is enabled. An example boot
143param follows.
144
145 linux netconsole=+4444@10.0.0.1/eth1,9353@10.0.0.2/12:34:56:78:9a:bc
146
147Log messages are transmitted with extended metadata header in the
148following format which is the same as /dev/kmsg.
149
150 <level>,<sequnum>,<timestamp>,<contflag>;<message text>
151
152Non printable characters in <message text> are escaped using "\xff"
153notation. If the message contains optional dictionary, verbatim
154newline is used as the delimeter.
155
156If a message doesn't fit in certain number of bytes (currently 1000),
157the message is split into multiple fragments by netconsole. These
158fragments are transmitted with "ncfrag" header field added.
159
160 ncfrag=<byte-offset>/<total-bytes>
161
162For example, assuming a lot smaller chunk size, a message "the first
163chunk, the 2nd chunk." may be split as follows.
164
165 6,416,1758426,-,ncfrag=0/31;the first chunk,
166 6,416,1758426,-,ncfrag=16/31; the 2nd chunk.
167
135Miscellaneous notes: 168Miscellaneous notes:
136==================== 169====================
137 170
diff --git a/Documentation/networking/pktgen.txt b/Documentation/networking/pktgen.txt
index 0344f1d45b37..f4be85e96005 100644
--- a/Documentation/networking/pktgen.txt
+++ b/Documentation/networking/pktgen.txt
@@ -1,6 +1,6 @@
1 1
2 2
3 HOWTO for the linux packet generator 3 HOWTO for the linux packet generator
4 ------------------------------------ 4 ------------------------------------
5 5
6Enable CONFIG_NET_PKTGEN to compile and build pktgen either in-kernel 6Enable CONFIG_NET_PKTGEN to compile and build pktgen either in-kernel
@@ -50,17 +50,33 @@ For ixgbe use e.g. "30" resulting in approx 33K interrupts/sec (1/30*10^6):
50 # ethtool -C ethX rx-usecs 30 50 # ethtool -C ethX rx-usecs 30
51 51
52 52
53Viewing threads 53Kernel threads
54=============== 54==============
55/proc/net/pktgen/kpktgend_0 55Pktgen creates a thread for each CPU with affinity to that CPU.
56Name: kpktgend_0 max_before_softirq: 10000 56Which is controlled through procfile /proc/net/pktgen/kpktgend_X.
57Running: 57
58Stopped: eth1 58Example: /proc/net/pktgen/kpktgend_0
59Result: OK: max_before_softirq=10000 59
60 Running:
61 Stopped: eth4@0
62 Result: OK: add_device=eth4@0
63
64Most important are the devices assigned to the thread.
65
66The two basic thread commands are:
67 * add_device DEVICE@NAME -- adds a single device
68 * rem_device_all -- remove all associated devices
69
70When adding a device to a thread, a corrosponding procfile is created
71which is used for configuring this device. Thus, device names need to
72be unique.
60 73
61Most important are the devices assigned to the thread. Note that a 74To support adding the same device to multiple threads, which is useful
62device can only belong to one thread. 75with multi queue NICs, a the device naming scheme is extended with "@":
76 device@something
63 77
78The part after "@" can be anything, but it is custom to use the thread
79number.
64 80
65Viewing devices 81Viewing devices
66=============== 82===============
@@ -69,29 +85,32 @@ The Params section holds configured information. The Current section
69holds running statistics. The Result is printed after a run or after 85holds running statistics. The Result is printed after a run or after
70interruption. Example: 86interruption. Example:
71 87
72/proc/net/pktgen/eth1 88/proc/net/pktgen/eth4@0
73 89
74Params: count 10000000 min_pkt_size: 60 max_pkt_size: 60 90 Params: count 100000 min_pkt_size: 60 max_pkt_size: 60
75 frags: 0 delay: 0 clone_skb: 1000000 ifname: eth1 91 frags: 0 delay: 0 clone_skb: 64 ifname: eth4@0
76 flows: 0 flowlen: 0 92 flows: 0 flowlen: 0
77 dst_min: 10.10.11.2 dst_max: 93 queue_map_min: 0 queue_map_max: 0
78 src_min: src_max: 94 dst_min: 192.168.81.2 dst_max:
79 src_mac: 00:00:00:00:00:00 dst_mac: 00:04:23:AC:FD:82 95 src_min: src_max:
80 udp_src_min: 9 udp_src_max: 9 udp_dst_min: 9 udp_dst_max: 9 96 src_mac: 90:e2:ba:0a:56:b4 dst_mac: 00:1b:21:3c:9d:f8
81 src_mac_count: 0 dst_mac_count: 0 97 udp_src_min: 9 udp_src_max: 109 udp_dst_min: 9 udp_dst_max: 9
82 Flags: 98 src_mac_count: 0 dst_mac_count: 0
83Current: 99 Flags: UDPSRC_RND NO_TIMESTAMP QUEUE_MAP_CPU
84 pkts-sofar: 10000000 errors: 39664 100 Current:
85 started: 1103053986245187us stopped: 1103053999346329us idle: 880401us 101 pkts-sofar: 100000 errors: 0
86 seq_num: 10000011 cur_dst_mac_offset: 0 cur_src_mac_offset: 0 102 started: 623913381008us stopped: 623913396439us idle: 25us
87 cur_saddr: 0x10a0a0a cur_daddr: 0x20b0a0a 103 seq_num: 100001 cur_dst_mac_offset: 0 cur_src_mac_offset: 0
88 cur_udp_dst: 9 cur_udp_src: 9 104 cur_saddr: 192.168.8.3 cur_daddr: 192.168.81.2
105 cur_udp_dst: 9 cur_udp_src: 42
106 cur_queue_map: 0
89 flows: 0 107 flows: 0
90Result: OK: 13101142(c12220741+d880401) usec, 10000000 (60byte,0frags) 108 Result: OK: 15430(c15405+d25) usec, 100000 (60byte,0frags)
91 763292pps 390Mb/sec (390805504bps) errors: 39664 109 6480562pps 3110Mb/sec (3110669760bps) errors: 0
92 110
93Configuring threads and devices 111
94================================ 112Configuring devices
113===================
95This is done via the /proc interface, and most easily done via pgset 114This is done via the /proc interface, and most easily done via pgset
96as defined in the sample scripts. 115as defined in the sample scripts.
97 116
@@ -126,7 +145,7 @@ Examples:
126 To select queue 1 of a given device, 145 To select queue 1 of a given device,
127 use queue_map_min=1 and queue_map_max=1 146 use queue_map_min=1 and queue_map_max=1
128 147
129 pgset "src_mac_count 1" Sets the number of MACs we'll range through. 148 pgset "src_mac_count 1" Sets the number of MACs we'll range through.
130 The 'minimum' MAC is what you set with srcmac. 149 The 'minimum' MAC is what you set with srcmac.
131 150
132 pgset "dst_mac_count 1" Sets the number of MACs we'll range through. 151 pgset "dst_mac_count 1" Sets the number of MACs we'll range through.
@@ -145,6 +164,7 @@ Examples:
145 UDPCSUM, 164 UDPCSUM,
146 IPSEC # IPsec encapsulation (needs CONFIG_XFRM) 165 IPSEC # IPsec encapsulation (needs CONFIG_XFRM)
147 NODE_ALLOC # node specific memory allocation 166 NODE_ALLOC # node specific memory allocation
167 NO_TIMESTAMP # disable timestamping
148 168
149 pgset spi SPI_VALUE Set specific SA used to transform packet. 169 pgset spi SPI_VALUE Set specific SA used to transform packet.
150 170
@@ -192,24 +212,43 @@ Examples:
192 pgset "rate 300M" set rate to 300 Mb/s 212 pgset "rate 300M" set rate to 300 Mb/s
193 pgset "ratep 1000000" set rate to 1Mpps 213 pgset "ratep 1000000" set rate to 1Mpps
194 214
215 pgset "xmit_mode netif_receive" RX inject into stack netif_receive_skb()
216 Works with "burst" but not with "clone_skb".
217 Default xmit_mode is "start_xmit".
218
195Sample scripts 219Sample scripts
196============== 220==============
197 221
198A collection of small tutorial scripts for pktgen is in the 222A collection of tutorial scripts and helpers for pktgen is in the
199samples/pktgen directory: 223samples/pktgen directory. The helper parameters.sh file support easy
224and consistant parameter parsing across the sample scripts.
225
226Usage example and help:
227 ./pktgen_sample01_simple.sh -i eth4 -m 00:1B:21:3C:9D:F8 -d 192.168.8.2
228
229Usage: ./pktgen_sample01_simple.sh [-vx] -i ethX
230 -i : ($DEV) output interface/device (required)
231 -s : ($PKT_SIZE) packet size
232 -d : ($DEST_IP) destination IP
233 -m : ($DST_MAC) destination MAC-addr
234 -t : ($THREADS) threads to start
235 -c : ($SKB_CLONE) SKB clones send before alloc new SKB
236 -b : ($BURST) HW level bursting of SKBs
237 -v : ($VERBOSE) verbose
238 -x : ($DEBUG) debug
239
240The global variables being set are also listed. E.g. the required
241interface/device parameter "-i" sets variable $DEV. Copy the
242pktgen_sampleXX scripts and modify them to fit your own needs.
243
244The old scripts:
200 245
201pktgen.conf-1-1 # 1 CPU 1 dev
202pktgen.conf-1-2 # 1 CPU 2 dev 246pktgen.conf-1-2 # 1 CPU 2 dev
203pktgen.conf-2-1 # 2 CPU's 1 dev
204pktgen.conf-2-2 # 2 CPU's 2 dev
205pktgen.conf-1-1-rdos # 1 CPU 1 dev w. route DoS 247pktgen.conf-1-1-rdos # 1 CPU 1 dev w. route DoS
206pktgen.conf-1-1-ip6 # 1 CPU 1 dev ipv6 248pktgen.conf-1-1-ip6 # 1 CPU 1 dev ipv6
207pktgen.conf-1-1-ip6-rdos # 1 CPU 1 dev ipv6 w. route DoS 249pktgen.conf-1-1-ip6-rdos # 1 CPU 1 dev ipv6 w. route DoS
208pktgen.conf-1-1-flows # 1 CPU 1 dev multiple flows. 250pktgen.conf-1-1-flows # 1 CPU 1 dev multiple flows.
209 251
210Run in shell: ./pktgen.conf-X-Y
211This does all the setup including sending.
212
213 252
214Interrupt affinity 253Interrupt affinity
215=================== 254===================
@@ -217,6 +256,9 @@ Note that when adding devices to a specific CPU it is a good idea to
217also assign /proc/irq/XX/smp_affinity so that the TX interrupts are bound 256also assign /proc/irq/XX/smp_affinity so that the TX interrupts are bound
218to the same CPU. This reduces cache bouncing when freeing skbs. 257to the same CPU. This reduces cache bouncing when freeing skbs.
219 258
259Plus using the device flag QUEUE_MAP_CPU, which maps the SKBs TX queue
260to the running threads CPU (directly from smp_processor_id()).
261
220Enable IPsec 262Enable IPsec
221============ 263============
222Default IPsec transformation with ESP encapsulation plus transport mode 264Default IPsec transformation with ESP encapsulation plus transport mode
@@ -237,18 +279,19 @@ Current commands and configuration options
237 279
238start 280start
239stop 281stop
282reset
240 283
241** Thread commands: 284** Thread commands:
242 285
243add_device 286add_device
244rem_device_all 287rem_device_all
245max_before_softirq
246 288
247 289
248** Device commands: 290** Device commands:
249 291
250count 292count
251clone_skb 293clone_skb
294burst
252debug 295debug
253 296
254frags 297frags
@@ -257,10 +300,17 @@ delay
257src_mac_count 300src_mac_count
258dst_mac_count 301dst_mac_count
259 302
260pkt_size 303pkt_size
261min_pkt_size 304min_pkt_size
262max_pkt_size 305max_pkt_size
263 306
307queue_map_min
308queue_map_max
309skb_priority
310
311tos (ipv4)
312traffic_class (ipv6)
313
264mpls 314mpls
265 315
266udp_src_min 316udp_src_min
@@ -269,6 +319,8 @@ udp_src_max
269udp_dst_min 319udp_dst_min
270udp_dst_max 320udp_dst_max
271 321
322node
323
272flag 324flag
273 IPSRC_RND 325 IPSRC_RND
274 IPDST_RND 326 IPDST_RND
@@ -287,6 +339,9 @@ flag
287 UDPCSUM 339 UDPCSUM
288 IPSEC 340 IPSEC
289 NODE_ALLOC 341 NODE_ALLOC
342 NO_TIMESTAMP
343
344spi (ipsec)
290 345
291dst_min 346dst_min
292dst_max 347dst_max
@@ -299,8 +354,10 @@ src_mac
299 354
300clear_counters 355clear_counters
301 356
302dst6
303src6 357src6
358dst6
359dst6_max
360dst6_min
304 361
305flows 362flows
306flowlen 363flowlen
@@ -308,6 +365,17 @@ flowlen
308rate 365rate
309ratep 366ratep
310 367
368xmit_mode <start_xmit|netif_receive>
369
370vlan_cfi
371vlan_id
372vlan_p
373
374svlan_cfi
375svlan_id
376svlan_p
377
378
311References: 379References:
312ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/ 380ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/
313ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/examples/ 381ftp://robur.slu.se/pub/Linux/net-development/pktgen-testing/examples/
diff --git a/Documentation/networking/scaling.txt b/Documentation/networking/scaling.txt
index cbfac0949635..59f4db2a0c85 100644
--- a/Documentation/networking/scaling.txt
+++ b/Documentation/networking/scaling.txt
@@ -282,7 +282,7 @@ following is true:
282 282
283- The current CPU's queue head counter >= the recorded tail counter 283- The current CPU's queue head counter >= the recorded tail counter
284 value in rps_dev_flow[i] 284 value in rps_dev_flow[i]
285- The current CPU is unset (equal to RPS_NO_CPU) 285- The current CPU is unset (>= nr_cpu_ids)
286- The current CPU is offline 286- The current CPU is offline
287 287
288After this check, the packet is sent to the (possibly updated) current 288After this check, the packet is sent to the (possibly updated) current
diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt
index f981a9295a39..c5d7ade10ff2 100644
--- a/Documentation/networking/switchdev.txt
+++ b/Documentation/networking/switchdev.txt
@@ -1,59 +1,360 @@
1Switch (and switch-ish) device drivers HOWTO 1Ethernet switch device driver model (switchdev)
2=========================== 2===============================================
3 3Copyright (c) 2014 Jiri Pirko <jiri@resnulli.us>
4Please note that the word "switch" is here used in very generic meaning. 4Copyright (c) 2014-2015 Scott Feldman <sfeldma@gmail.com>
5This include devices supporting L2/L3 but also various flow offloading chips, 5
6including switches embedded into SR-IOV NICs. 6
7 7The Ethernet switch device driver model (switchdev) is an in-kernel driver
8Lets describe a topology a bit. Imagine the following example: 8model for switch devices which offload the forwarding (data) plane from the
9 9kernel.
10 +----------------------------+ +---------------+ 10
11 | SOME switch chip | | CPU | 11Figure 1 is a block diagram showing the components of the switchdev model for
12 +----------------------------+ +---------------+ 12an example setup using a data-center-class switch ASIC chip. Other setups
13 port1 port2 port3 port4 MNGMNT | PCI-E | 13with SR-IOV or soft switches, such as OVS, are possible.
14 | | | | | +---------------+ 14
15 PHY PHY | | | | NIC0 NIC1 15
16 | | | | | | 16                             User-space tools                                 
17 | | +- PCI-E -+ | | 17                                                                              
18 | +------- MII -------+ | 18       user space                   |                                         
19 +------------- MII ------------+ 19      +-------------------------------------------------------------------+   
20 20       kernel                       | Netlink                                 
21In this example, there are two independent lines between the switch silicon 21                                    |                                         
22and CPU. NIC0 and NIC1 drivers are not aware of a switch presence. They are 22                     +--------------+-------------------------------+         
23separate from the switch driver. SOME switch chip is by managed by a driver 23                     |         Network stack                        |         
24via PCI-E device MNGMNT. Note that MNGMNT device, NIC0 and NIC1 may be 24                     |           (Linux)                            |         
25connected to some other type of bus. 25                     |                                              |         
26 26                     +----------------------------------------------+         
27Now, for the previous example show the representation in kernel: 27                                                                              
28 28 sw1p2 sw1p4 sw1p6
29 +----------------------------+ +---------------+ 29                      sw1p1  + sw1p3 +  sw1p5 +         eth1             
30 | SOME switch chip | | CPU | 30                        +    |    +    |    +    |            +               
31 +----------------------------+ +---------------+ 31                        |    |    |    |    |    |            |               
32 sw0p0 sw0p1 sw0p2 sw0p3 MNGMNT | PCI-E | 32                     +--+----+----+----+-+--+----+---+  +-----+-----+         
33 | | | | | +---------------+ 33                     |         Switch driver         |  |    mgmt   |         
34 PHY PHY | | | | eth0 eth1 34                     |        (this document)        |  |   driver  |         
35 | | | | | | 35                     |                               |  |           |         
36 | | +- PCI-E -+ | | 36                     +--------------+----------------+  +-----------+         
37 | +------- MII -------+ | 37                                    |                                         
38 +------------- MII ------------+ 38       kernel                       | HW bus (eg PCI)                         
39 39      +-------------------------------------------------------------------+   
40Lets call the example switch driver for SOME switch chip "SOMEswitch". This 40       hardware                     |                                         
41driver takes care of PCI-E device MNGMNT. There is a netdevice instance sw0pX 41                     +--------------+---+------------+                        
42created for each port of a switch. These netdevices are instances 42                     |         Switch device (sw1)   |                        
43of "SOMEswitch" driver. sw0pX netdevices serve as a "representation" 43                     |  +----+                       +--------+               
44of the switch chip. eth0 and eth1 are instances of some other existing driver. 44                     |  |    v offloaded data path   | mgmt port              
45 45                     |  |    |                       |                        
46The only difference of the switch-port netdevice from the ordinary netdevice 46                     +--|----|----+----+----+----+---+                        
47is that is implements couple more NDOs: 47                        |    |    |    |    |    |                            
48 48                        +    +    +    +    +    +                            
49 ndo_switch_parent_id_get - This returns the same ID for two port netdevices 49                       p1   p2   p3   p4   p5   p6
50 of the same physical switch chip. This is 50                                       
51 mandatory to be implemented by all switch drivers 51                             front-panel ports                                
52 and serves the caller for recognition of a port 52                                                                              
53 netdevice. 53
54 ndo_switch_parent_* - Functions that serve for a manipulation of the switch 54 Fig 1.
55 chip itself (it can be though of as a "parent" of the 55
56 port, therefore the name). They are not port-specific. 56
57 Caller might use arbitrary port netdevice of the same 57Include Files
58 switch and it will make no difference. 58-------------
59 ndo_switch_port_* - Functions that serve for a port-specific manipulation. 59
60#include <linux/netdevice.h>
61#include <net/switchdev.h>
62
63
64Configuration
65-------------
66
67Use "depends NET_SWITCHDEV" in driver's Kconfig to ensure switchdev model
68support is built for driver.
69
70
71Switch Ports
72------------
73
74On switchdev driver initialization, the driver will allocate and register a
75struct net_device (using register_netdev()) for each enumerated physical switch
76port, called the port netdev. A port netdev is the software representation of
77the physical port and provides a conduit for control traffic to/from the
78controller (the kernel) and the network, as well as an anchor point for higher
79level constructs such as bridges, bonds, VLANs, tunnels, and L3 routers. Using
80standard netdev tools (iproute2, ethtool, etc), the port netdev can also
81provide to the user access to the physical properties of the switch port such
82as PHY link state and I/O statistics.
83
84There is (currently) no higher-level kernel object for the switch beyond the
85port netdevs. All of the switchdev driver ops are netdev ops or switchdev ops.
86
87A switch management port is outside the scope of the switchdev driver model.
88Typically, the management port is not participating in offloaded data plane and
89is loaded with a different driver, such as a NIC driver, on the management port
90device.
91
92Port Netdev Naming
93^^^^^^^^^^^^^^^^^^
94
95Udev rules should be used for port netdev naming, using some unique attribute
96of the port as a key, for example the port MAC address or the port PHYS name.
97Hard-coding of kernel netdev names within the driver is discouraged; let the
98kernel pick the default netdev name, and let udev set the final name based on a
99port attribute.
100
101Using port PHYS name (ndo_get_phys_port_name) for the key is particularly
102useful for dynamically-named ports where the device names its ports based on
103external configuration. For example, if a physical 40G port is split logically
104into 4 10G ports, resulting in 4 port netdevs, the device can give a unique
105name for each port using port PHYS name. The udev rule would be:
106
107SUBSYSTEM=="net", ACTION=="add", DRIVER="<driver>", ATTR{phys_port_name}!="", \
108 NAME="$attr{phys_port_name}"
109
110Suggested naming convention is "swXpYsZ", where X is the switch name or ID, Y
111is the port name or ID, and Z is the sub-port name or ID. For example, sw1p1s0
112would be sub-port 0 on port 1 on switch 1.
113
114Switch ID
115^^^^^^^^^
116
117The switchdev driver must implement the switchdev op switchdev_port_attr_get
118for SWITCHDEV_ATTR_PORT_PARENT_ID for each port netdev, returning the same
119physical ID for each port of a switch. The ID must be unique between switches
120on the same system. The ID does not need to be unique between switches on
121different systems.
122
123The switch ID is used to locate ports on a switch and to know if aggregated
124ports belong to the same switch.
125
126Port Features
127^^^^^^^^^^^^^
128
129NETIF_F_NETNS_LOCAL
130
131If the switchdev driver (and device) only supports offloading of the default
132network namespace (netns), the driver should set this feature flag to prevent
133the port netdev from being moved out of the default netns. A netns-aware
134driver/device would not set this flag and be responsible for partitioning
135hardware to preserve netns containment. This means hardware cannot forward
136traffic from a port in one namespace to another port in another namespace.
137
138Port Topology
139^^^^^^^^^^^^^
140
141The port netdevs representing the physical switch ports can be organized into
142higher-level switching constructs. The default construct is a standalone
143router port, used to offload L3 forwarding. Two or more ports can be bonded
144together to form a LAG. Two or more ports (or LAGs) can be bridged to bridge
145L2 networks. VLANs can be applied to sub-divide L2 networks. L2-over-L3
146tunnels can be built on ports. These constructs are built using standard Linux
147tools such as the bridge driver, the bonding/team drivers, and netlink-based
148tools such as iproute2.
149
150The switchdev driver can know a particular port's position in the topology by
151monitoring NETDEV_CHANGEUPPER notifications. For example, a port moved into a
152bond will see it's upper master change. If that bond is moved into a bridge,
153the bond's upper master will change. And so on. The driver will track such
154movements to know what position a port is in in the overall topology by
155registering for netdevice events and acting on NETDEV_CHANGEUPPER.
156
157L2 Forwarding Offload
158---------------------
159
160The idea is to offload the L2 data forwarding (switching) path from the kernel
161to the switchdev device by mirroring bridge FDB entries down to the device. An
162FDB entry is the {port, MAC, VLAN} tuple forwarding destination.
163
164To offloading L2 bridging, the switchdev driver/device should support:
165
166 - Static FDB entries installed on a bridge port
167 - Notification of learned/forgotten src mac/vlans from device
168 - STP state changes on the port
169 - VLAN flooding of multicast/broadcast and unknown unicast packets
170
171Static FDB Entries
172^^^^^^^^^^^^^^^^^^
173
174The switchdev driver should implement ndo_fdb_add, ndo_fdb_del and ndo_fdb_dump
175to support static FDB entries installed to the device. Static bridge FDB
176entries are installed, for example, using iproute2 bridge cmd:
177
178 bridge fdb add ADDR dev DEV [vlan VID] [self]
179
180The driver should use the helper switchdev_port_fdb_xxx ops for ndo_fdb_xxx
181ops, and handle add/delete/dump of SWITCHDEV_OBJ_PORT_FDB object using
182switchdev_port_obj_xxx ops.
183
184XXX: what should be done if offloading this rule to hardware fails (for
185example, due to full capacity in hardware tables) ?
186
187Note: by default, the bridge does not filter on VLAN and only bridges untagged
188traffic. To enable VLAN support, turn on VLAN filtering:
189
190 echo 1 >/sys/class/net/<bridge>/bridge/vlan_filtering
191
192Notification of Learned/Forgotten Source MAC/VLANs
193^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
194
195The switch device will learn/forget source MAC address/VLAN on ingress packets
196and notify the switch driver of the mac/vlan/port tuples. The switch driver,
197in turn, will notify the bridge driver using the switchdev notifier call:
198
199 err = call_switchdev_notifiers(val, dev, info);
200
201Where val is SWITCHDEV_FDB_ADD when learning and SWITCHDEV_FDB_DEL when
202forgetting, and info points to a struct switchdev_notifier_fdb_info. On
203SWITCHDEV_FDB_ADD, the bridge driver will install the FDB entry into the
204bridge's FDB and mark the entry as NTF_EXT_LEARNED. The iproute2 bridge
205command will label these entries "offload":
206
207 $ bridge fdb
208 52:54:00:12:35:01 dev sw1p1 master br0 permanent
209 00:02:00:00:02:00 dev sw1p1 master br0 offload
210 00:02:00:00:02:00 dev sw1p1 self
211 52:54:00:12:35:02 dev sw1p2 master br0 permanent
212 00:02:00:00:03:00 dev sw1p2 master br0 offload
213 00:02:00:00:03:00 dev sw1p2 self
214 33:33:00:00:00:01 dev eth0 self permanent
215 01:00:5e:00:00:01 dev eth0 self permanent
216 33:33:ff:00:00:00 dev eth0 self permanent
217 01:80:c2:00:00:0e dev eth0 self permanent
218 33:33:00:00:00:01 dev br0 self permanent
219 01:00:5e:00:00:01 dev br0 self permanent
220 33:33:ff:12:35:01 dev br0 self permanent
221
222Learning on the port should be disabled on the bridge using the bridge command:
223
224 bridge link set dev DEV learning off
225
226Learning on the device port should be enabled, as well as learning_sync:
227
228 bridge link set dev DEV learning on self
229 bridge link set dev DEV learning_sync on self
230
231Learning_sync attribute enables syncing of the learned/forgotton FDB entry to
232the bridge's FDB. It's possible, but not optimal, to enable learning on the
233device port and on the bridge port, and disable learning_sync.
234
235To support learning and learning_sync port attributes, the driver implements
236switchdev op switchdev_port_attr_get/set for SWITCHDEV_ATTR_PORT_BRIDGE_FLAGS.
237The driver should initialize the attributes to the hardware defaults.
238
239FDB Ageing
240^^^^^^^^^^
241
242There are two FDB ageing models supported: 1) ageing by the device, and 2)
243ageing by the kernel. Ageing by the device is preferred if many FDB entries
244are supported. The driver calls call_switchdev_notifiers(SWITCHDEV_FDB_DEL,
245...) to age out the FDB entry. In this model, ageing by the kernel should be
246turned off. XXX: how to turn off ageing in kernel on a per-port basis or
247otherwise prevent the kernel from ageing out the FDB entry?
248
249In the kernel ageing model, the standard bridge ageing mechanism is used to age
250out stale FDB entries. To keep an FDB entry "alive", the driver should refresh
251the FDB entry by calling call_switchdev_notifiers(SWITCHDEV_FDB_ADD, ...). The
252notification will reset the FDB entry's last-used time to now. The driver
253should rate limit refresh notifications, for example, no more than once a
254second. If the FDB entry expires, fdb_delete is called to remove entry from
255the device.
256
257STP State Change on Port
258^^^^^^^^^^^^^^^^^^^^^^^^
259
260Internally or with a third-party STP protocol implementation (e.g. mstpd), the
261bridge driver maintains the STP state for ports, and will notify the switch
262driver of STP state change on a port using the switchdev op
263switchdev_attr_port_set for SWITCHDEV_ATTR_PORT_STP_UPDATE.
264
265State is one of BR_STATE_*. The switch driver can use STP state updates to
266update ingress packet filter list for the port. For example, if port is
267DISABLED, no packets should pass, but if port moves to BLOCKED, then STP BPDUs
268and other IEEE 01:80:c2:xx:xx:xx link-local multicast packets can pass.
269
270Note that STP BDPUs are untagged and STP state applies to all VLANs on the port
271so packet filters should be applied consistently across untagged and tagged
272VLANs on the port.
273
274Flooding L2 domain
275^^^^^^^^^^^^^^^^^^
276
277For a given L2 VLAN domain, the switch device should flood multicast/broadcast
278and unknown unicast packets to all ports in domain, if allowed by port's
279current STP state. The switch driver, knowing which ports are within which
280vlan L2 domain, can program the switch device for flooding. The packet should
281also be sent to the port netdev for processing by the bridge driver. The
282bridge should not reflood the packet to the same ports the device flooded.
283XXX: the mechanism to avoid duplicate flood packets is being discuseed.
284
285It is possible for the switch device to not handle flooding and push the
286packets up to the bridge driver for flooding. This is not ideal as the number
287of ports scale in the L2 domain as the device is much more efficient at
288flooding packets that software.
289
290IGMP Snooping
291^^^^^^^^^^^^^
292
293XXX: complete this section
294
295
296L3 Routing Offload
297------------------
298
299Offloading L3 routing requires that device be programmed with FIB entries from
300the kernel, with the device doing the FIB lookup and forwarding. The device
301does a longest prefix match (LPM) on FIB entries matching route prefix and
302forwards the packet to the matching FIB entry's nexthop(s) egress ports.
303
304To program the device, the driver implements support for
305SWITCHDEV_OBJ_IPV[4|6]_FIB object using switchdev_port_obj_xxx ops.
306switchdev_port_obj_add is used for both adding a new FIB entry to the device,
307or modifying an existing entry on the device.
308
309XXX: Currently, only SWITCHDEV_OBJ_IPV4_FIB objects are supported.
310
311SWITCHDEV_OBJ_IPV4_FIB object passes:
312
313 struct switchdev_obj_ipv4_fib { /* IPV4_FIB */
314 u32 dst;
315 int dst_len;
316 struct fib_info *fi;
317 u8 tos;
318 u8 type;
319 u32 nlflags;
320 u32 tb_id;
321 } ipv4_fib;
322
323to add/modify/delete IPv4 dst/dest_len prefix on table tb_id. The *fi
324structure holds details on the route and route's nexthops. *dev is one of the
325port netdevs mentioned in the routes next hop list. If the output port netdevs
326referenced in the route's nexthop list don't all have the same switch ID, the
327driver is not called to add/modify/delete the FIB entry.
328
329Routes offloaded to the device are labeled with "offload" in the ip route
330listing:
331
332 $ ip route show
333 default via 192.168.0.2 dev eth0
334 11.0.0.0/30 dev sw1p1 proto kernel scope link src 11.0.0.2 offload
335 11.0.0.4/30 via 11.0.0.1 dev sw1p1 proto zebra metric 20 offload
336 11.0.0.8/30 dev sw1p2 proto kernel scope link src 11.0.0.10 offload
337 11.0.0.12/30 via 11.0.0.9 dev sw1p2 proto zebra metric 20 offload
338 12.0.0.2 proto zebra metric 30 offload
339 nexthop via 11.0.0.1 dev sw1p1 weight 1
340 nexthop via 11.0.0.9 dev sw1p2 weight 1
341 12.0.0.3 via 11.0.0.1 dev sw1p1 proto zebra metric 20 offload
342 12.0.0.4 via 11.0.0.9 dev sw1p2 proto zebra metric 20 offload
343 192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.15
344
345XXX: add/mod/del IPv6 FIB API
346
347Nexthop Resolution
348^^^^^^^^^^^^^^^^^^
349
350The FIB entry's nexthop list contains the nexthop tuple (gateway, dev), but for
351the switch device to forward the packet with the correct dst mac address, the
352nexthop gateways must be resolved to the neighbor's mac address. Neighbor mac
353address discovery comes via the ARP (or ND) process and is available via the
354arp_tbl neighbor table. To resolve the routes nexthop gateways, the driver
355should trigger the kernel's neighbor resolution process. See the rocker
356driver's rocker_port_ipv4_resolve() for an example.
357
358The driver can monitor for updates to arp_tbl using the netevent notifier
359NETEVENT_NEIGH_UPDATE. The device can be programmed with resolved nexthops
360for the routes as arp_tbl updates.
diff --git a/Documentation/networking/tc-actions-env-rules.txt b/Documentation/networking/tc-actions-env-rules.txt
index 70d6cf608251..f37814693ad3 100644
--- a/Documentation/networking/tc-actions-env-rules.txt
+++ b/Documentation/networking/tc-actions-env-rules.txt
@@ -8,14 +8,8 @@ For example if your action queues a packet to be processed later,
8or intentionally branches by redirecting a packet, then you need to 8or intentionally branches by redirecting a packet, then you need to
9clone the packet. 9clone the packet.
10 10
11There are certain fields in the skb tc_verd that need to be reset so we
12avoid loops, etc. A few are generic enough that skb_act_clone()
13resets them for you, so invoke skb_act_clone() rather than skb_clone().
14
152) If you munge any packet thou shalt call pskb_expand_head in the case 112) If you munge any packet thou shalt call pskb_expand_head in the case
16someone else is referencing the skb. After that you "own" the skb. 12someone else is referencing the skb. After that you "own" the skb.
17You must also tell us if it is ok to munge the packet (TC_OK2MUNGE),
18this way any action downstream can stomp on the packet.
19 13
203) Dropping packets you don't own is a no-no. You simply return 143) Dropping packets you don't own is a no-no. You simply return
21TC_ACT_SHOT to the caller and they will drop it. 15TC_ACT_SHOT to the caller and they will drop it.
diff --git a/Documentation/networking/timestamping/txtimestamp.c b/Documentation/networking/timestamping/txtimestamp.c
index 8217510d3842..5df07047ca86 100644
--- a/Documentation/networking/timestamping/txtimestamp.c
+++ b/Documentation/networking/timestamping/txtimestamp.c
@@ -36,6 +36,7 @@
36#include <asm/types.h> 36#include <asm/types.h>
37#include <error.h> 37#include <error.h>
38#include <errno.h> 38#include <errno.h>
39#include <inttypes.h>
39#include <linux/errqueue.h> 40#include <linux/errqueue.h>
40#include <linux/if_ether.h> 41#include <linux/if_ether.h>
41#include <linux/net_tstamp.h> 42#include <linux/net_tstamp.h>
@@ -49,7 +50,6 @@
49#include <poll.h> 50#include <poll.h>
50#include <stdarg.h> 51#include <stdarg.h>
51#include <stdbool.h> 52#include <stdbool.h>
52#include <stdint.h>
53#include <stdio.h> 53#include <stdio.h>
54#include <stdlib.h> 54#include <stdlib.h>
55#include <string.h> 55#include <string.h>
@@ -96,7 +96,7 @@ static void __print_timestamp(const char *name, struct timespec *cur,
96 prev_ms = (long) ts_prev.tv_sec * 1000 * 1000; 96 prev_ms = (long) ts_prev.tv_sec * 1000 * 1000;
97 prev_ms += ts_prev.tv_nsec / 1000; 97 prev_ms += ts_prev.tv_nsec / 1000;
98 98
99 fprintf(stderr, " (%+ld us)", cur_ms - prev_ms); 99 fprintf(stderr, " (%+" PRId64 " us)", cur_ms - prev_ms);
100 } 100 }
101 101
102 ts_prev = *cur; 102 ts_prev = *cur;
diff --git a/Documentation/networking/udplite.txt b/Documentation/networking/udplite.txt
index d727a3829100..53a726855e49 100644
--- a/Documentation/networking/udplite.txt
+++ b/Documentation/networking/udplite.txt
@@ -20,7 +20,7 @@
20 files/UDP-Lite-HOWTO.txt 20 files/UDP-Lite-HOWTO.txt
21 21
22 o The Wireshark UDP-Lite WiKi (with capture files): 22 o The Wireshark UDP-Lite WiKi (with capture files):
23 http://wiki.wireshark.org/Lightweight_User_Datagram_Protocol 23 https://wiki.wireshark.org/Lightweight_User_Datagram_Protocol
24 24
25 o The Protocol Spec, RFC 3828, http://www.ietf.org/rfc/rfc3828.txt 25 o The Protocol Spec, RFC 3828, http://www.ietf.org/rfc/rfc3828.txt
26 26
diff --git a/Documentation/nfc/nfc-hci.txt b/Documentation/nfc/nfc-hci.txt
index 0686c9e211c2..0dc078cab972 100644
--- a/Documentation/nfc/nfc-hci.txt
+++ b/Documentation/nfc/nfc-hci.txt
@@ -122,7 +122,7 @@ This must be done from a context that can sleep.
122PHY Management 122PHY Management
123-------------- 123--------------
124 124
125The physical link (i2c, ...) management is defined by the following struture: 125The physical link (i2c, ...) management is defined by the following structure:
126 126
127struct nfc_phy_ops { 127struct nfc_phy_ops {
128 int (*write)(void *dev_id, struct sk_buff *skb); 128 int (*write)(void *dev_id, struct sk_buff *skb);
diff --git a/Documentation/ntb.txt b/Documentation/ntb.txt
new file mode 100644
index 000000000000..1d9bbabb6c79
--- /dev/null
+++ b/Documentation/ntb.txt
@@ -0,0 +1,127 @@
1# NTB Drivers
2
3NTB (Non-Transparent Bridge) is a type of PCI-Express bridge chip that connects
4the separate memory systems of two computers to the same PCI-Express fabric.
5Existing NTB hardware supports a common feature set, including scratchpad
6registers, doorbell registers, and memory translation windows. Scratchpad
7registers are read-and-writable registers that are accessible from either side
8of the device, so that peers can exchange a small amount of information at a
9fixed address. Doorbell registers provide a way for peers to send interrupt
10events. Memory windows allow translated read and write access to the peer
11memory.
12
13## NTB Core Driver (ntb)
14
15The NTB core driver defines an api wrapping the common feature set, and allows
16clients interested in NTB features to discover NTB the devices supported by
17hardware drivers. The term "client" is used here to mean an upper layer
18component making use of the NTB api. The term "driver," or "hardware driver,"
19is used here to mean a driver for a specific vendor and model of NTB hardware.
20
21## NTB Client Drivers
22
23NTB client drivers should register with the NTB core driver. After
24registering, the client probe and remove functions will be called appropriately
25as ntb hardware, or hardware drivers, are inserted and removed. The
26registration uses the Linux Device framework, so it should feel familiar to
27anyone who has written a pci driver.
28
29### NTB Transport Client (ntb\_transport) and NTB Netdev (ntb\_netdev)
30
31The primary client for NTB is the Transport client, used in tandem with NTB
32Netdev. These drivers function together to create a logical link to the peer,
33across the ntb, to exchange packets of network data. The Transport client
34establishes a logical link to the peer, and creates queue pairs to exchange
35messages and data. The NTB Netdev then creates an ethernet device using a
36Transport queue pair. Network data is copied between socket buffers and the
37Transport queue pair buffer. The Transport client may be used for other things
38besides Netdev, however no other applications have yet been written.
39
40### NTB Ping Pong Test Client (ntb\_pingpong)
41
42The Ping Pong test client serves as a demonstration to exercise the doorbell
43and scratchpad registers of NTB hardware, and as an example simple NTB client.
44Ping Pong enables the link when started, waits for the NTB link to come up, and
45then proceeds to read and write the doorbell scratchpad registers of the NTB.
46The peers interrupt each other using a bit mask of doorbell bits, which is
47shifted by one in each round, to test the behavior of multiple doorbell bits
48and interrupt vectors. The Ping Pong driver also reads the first local
49scratchpad, and writes the value plus one to the first peer scratchpad, each
50round before writing the peer doorbell register.
51
52Module Parameters:
53
54* unsafe - Some hardware has known issues with scratchpad and doorbell
55 registers. By default, Ping Pong will not attempt to exercise such
56 hardware. You may override this behavior at your own risk by setting
57 unsafe=1.
58* delay\_ms - Specify the delay between receiving a doorbell
59 interrupt event and setting the peer doorbell register for the next
60 round.
61* init\_db - Specify the doorbell bits to start new series of rounds. A new
62 series begins once all the doorbell bits have been shifted out of
63 range.
64* dyndbg - It is suggested to specify dyndbg=+p when loading this module, and
65 then to observe debugging output on the console.
66
67### NTB Tool Test Client (ntb\_tool)
68
69The Tool test client serves for debugging, primarily, ntb hardware and drivers.
70The Tool provides access through debugfs for reading, setting, and clearing the
71NTB doorbell, and reading and writing scratchpads.
72
73The Tool does not currently have any module parameters.
74
75Debugfs Files:
76
77* *debugfs*/ntb\_tool/*hw*/ - A directory in debugfs will be created for each
78 NTB device probed by the tool. This directory is shortened to *hw*
79 below.
80* *hw*/db - This file is used to read, set, and clear the local doorbell. Not
81 all operations may be supported by all hardware. To read the doorbell,
82 read the file. To set the doorbell, write `s` followed by the bits to
83 set (eg: `echo 's 0x0101' > db`). To clear the doorbell, write `c`
84 followed by the bits to clear.
85* *hw*/mask - This file is used to read, set, and clear the local doorbell mask.
86 See *db* for details.
87* *hw*/peer\_db - This file is used to read, set, and clear the peer doorbell.
88 See *db* for details.
89* *hw*/peer\_mask - This file is used to read, set, and clear the peer doorbell
90 mask. See *db* for details.
91* *hw*/spad - This file is used to read and write local scratchpads. To read
92 the values of all scratchpads, read the file. To write values, write a
93 series of pairs of scratchpad number and value
94 (eg: `echo '4 0x123 7 0xabc' > spad`
95 # to set scratchpads `4` and `7` to `0x123` and `0xabc`, respectively).
96* *hw*/peer\_spad - This file is used to read and write peer scratchpads. See
97 *spad* for details.
98
99## NTB Hardware Drivers
100
101NTB hardware drivers should register devices with the NTB core driver. After
102registering, clients probe and remove functions will be called.
103
104### NTB Intel Hardware Driver (ntb\_hw\_intel)
105
106The Intel hardware driver supports NTB on Xeon and Atom CPUs.
107
108Module Parameters:
109
110* b2b\_mw\_idx - If the peer ntb is to be accessed via a memory window, then use
111 this memory window to access the peer ntb. A value of zero or positive
112 starts from the first mw idx, and a negative value starts from the last
113 mw idx. Both sides MUST set the same value here! The default value is
114 `-1`.
115* b2b\_mw\_share - If the peer ntb is to be accessed via a memory window, and if
116 the memory window is large enough, still allow the client to use the
117 second half of the memory window for address translation to the peer.
118* xeon\_b2b\_usd\_bar2\_addr64 - If using B2B topology on Xeon hardware, use
119 this 64 bit address on the bus between the NTB devices for the window
120 at BAR2, on the upstream side of the link.
121* xeon\_b2b\_usd\_bar4\_addr64 - See *xeon\_b2b\_bar2\_addr64*.
122* xeon\_b2b\_usd\_bar4\_addr32 - See *xeon\_b2b\_bar2\_addr64*.
123* xeon\_b2b\_usd\_bar5\_addr32 - See *xeon\_b2b\_bar2\_addr64*.
124* xeon\_b2b\_dsd\_bar2\_addr64 - See *xeon\_b2b\_bar2\_addr64*.
125* xeon\_b2b\_dsd\_bar4\_addr64 - See *xeon\_b2b\_bar2\_addr64*.
126* xeon\_b2b\_dsd\_bar4\_addr32 - See *xeon\_b2b\_bar2\_addr64*.
127* xeon\_b2b\_dsd\_bar5\_addr32 - See *xeon\_b2b\_bar2\_addr64*.
diff --git a/Documentation/nvdimm/btt.txt b/Documentation/nvdimm/btt.txt
new file mode 100644
index 000000000000..b91443f577dc
--- /dev/null
+++ b/Documentation/nvdimm/btt.txt
@@ -0,0 +1,283 @@
1BTT - Block Translation Table
2=============================
3
4
51. Introduction
6---------------
7
8Persistent memory based storage is able to perform IO at byte (or more
9accurately, cache line) granularity. However, we often want to expose such
10storage as traditional block devices. The block drivers for persistent memory
11will do exactly this. However, they do not provide any atomicity guarantees.
12Traditional SSDs typically provide protection against torn sectors in hardware,
13using stored energy in capacitors to complete in-flight block writes, or perhaps
14in firmware. We don't have this luxury with persistent memory - if a write is in
15progress, and we experience a power failure, the block will contain a mix of old
16and new data. Applications may not be prepared to handle such a scenario.
17
18The Block Translation Table (BTT) provides atomic sector update semantics for
19persistent memory devices, so that applications that rely on sector writes not
20being torn can continue to do so. The BTT manifests itself as a stacked block
21device, and reserves a portion of the underlying storage for its metadata. At
22the heart of it, is an indirection table that re-maps all the blocks on the
23volume. It can be thought of as an extremely simple file system that only
24provides atomic sector updates.
25
26
272. Static Layout
28----------------
29
30The underlying storage on which a BTT can be laid out is not limited in any way.
31The BTT, however, splits the available space into chunks of up to 512 GiB,
32called "Arenas".
33
34Each arena follows the same layout for its metadata, and all references in an
35arena are internal to it (with the exception of one field that points to the
36next arena). The following depicts the "On-disk" metadata layout:
37
38
39 Backing Store +-------> Arena
40+---------------+ | +------------------+
41| | | | Arena info block |
42| Arena 0 +---+ | 4K |
43| 512G | +------------------+
44| | | |
45+---------------+ | |
46| | | |
47| Arena 1 | | Data Blocks |
48| 512G | | |
49| | | |
50+---------------+ | |
51| . | | |
52| . | | |
53| . | | |
54| | | |
55| | | |
56+---------------+ +------------------+
57 | |
58 | BTT Map |
59 | |
60 | |
61 +------------------+
62 | |
63 | BTT Flog |
64 | |
65 +------------------+
66 | Info block copy |
67 | 4K |
68 +------------------+
69
70
713. Theory of Operation
72----------------------
73
74
75a. The BTT Map
76--------------
77
78The map is a simple lookup/indirection table that maps an LBA to an internal
79block. Each map entry is 32 bits. The two most significant bits are special
80flags, and the remaining form the internal block number.
81
82Bit Description
8331 - 30 : Error and Zero flags - Used in the following way:
84 Bit Description
85 31 30
86 -----------------------------------------------------------------------
87 00 Initial state. Reads return zeroes; Premap = Postmap
88 01 Zero state: Reads return zeroes
89 10 Error state: Reads fail; Writes clear 'E' bit
90 11 Normal Block – has valid postmap
91
92
9329 - 0 : Mappings to internal 'postmap' blocks
94
95
96Some of the terminology that will be subsequently used:
97
98External LBA : LBA as made visible to upper layers.
99ABA : Arena Block Address - Block offset/number within an arena
100Premap ABA : The block offset into an arena, which was decided upon by range
101 checking the External LBA
102Postmap ABA : The block number in the "Data Blocks" area obtained after
103 indirection from the map
104nfree : The number of free blocks that are maintained at any given time.
105 This is the number of concurrent writes that can happen to the
106 arena.
107
108
109For example, after adding a BTT, we surface a disk of 1024G. We get a read for
110the external LBA at 768G. This falls into the second arena, and of the 512G
111worth of blocks that this arena contributes, this block is at 256G. Thus, the
112premap ABA is 256G. We now refer to the map, and find out the mapping for block
113'X' (256G) points to block 'Y', say '64'. Thus the postmap ABA is 64.
114
115
116b. The BTT Flog
117---------------
118
119The BTT provides sector atomicity by making every write an "allocating write",
120i.e. Every write goes to a "free" block. A running list of free blocks is
121maintained in the form of the BTT flog. 'Flog' is a combination of the words
122"free list" and "log". The flog contains 'nfree' entries, and an entry contains:
123
124lba : The premap ABA that is being written to
125old_map : The old postmap ABA - after 'this' write completes, this will be a
126 free block.
127new_map : The new postmap ABA. The map will up updated to reflect this
128 lba->postmap_aba mapping, but we log it here in case we have to
129 recover.
130seq : Sequence number to mark which of the 2 sections of this flog entry is
131 valid/newest. It cycles between 01->10->11->01 (binary) under normal
132 operation, with 00 indicating an uninitialized state.
133lba' : alternate lba entry
134old_map': alternate old postmap entry
135new_map': alternate new postmap entry
136seq' : alternate sequence number.
137
138Each of the above fields is 32-bit, making one entry 32 bytes. Entries are also
139padded to 64 bytes to avoid cache line sharing or aliasing. Flog updates are
140done such that for any entry being written, it:
141a. overwrites the 'old' section in the entry based on sequence numbers
142b. writes the 'new' section such that the sequence number is written last.
143
144
145c. The concept of lanes
146-----------------------
147
148While 'nfree' describes the number of concurrent IOs an arena can process
149concurrently, 'nlanes' is the number of IOs the BTT device as a whole can
150process.
151 nlanes = min(nfree, num_cpus)
152A lane number is obtained at the start of any IO, and is used for indexing into
153all the on-disk and in-memory data structures for the duration of the IO. If
154there are more CPUs than the max number of available lanes, than lanes are
155protected by spinlocks.
156
157
158d. In-memory data structure: Read Tracking Table (RTT)
159------------------------------------------------------
160
161Consider a case where we have two threads, one doing reads and the other,
162writes. We can hit a condition where the writer thread grabs a free block to do
163a new IO, but the (slow) reader thread is still reading from it. In other words,
164the reader consulted a map entry, and started reading the corresponding block. A
165writer started writing to the same external LBA, and finished the write updating
166the map for that external LBA to point to its new postmap ABA. At this point the
167internal, postmap block that the reader is (still) reading has been inserted
168into the list of free blocks. If another write comes in for the same LBA, it can
169grab this free block, and start writing to it, causing the reader to read
170incorrect data. To prevent this, we introduce the RTT.
171
172The RTT is a simple, per arena table with 'nfree' entries. Every reader inserts
173into rtt[lane_number], the postmap ABA it is reading, and clears it after the
174read is complete. Every writer thread, after grabbing a free block, checks the
175RTT for its presence. If the postmap free block is in the RTT, it waits till the
176reader clears the RTT entry, and only then starts writing to it.
177
178
179e. In-memory data structure: map locks
180--------------------------------------
181
182Consider a case where two writer threads are writing to the same LBA. There can
183be a race in the following sequence of steps:
184
185free[lane] = map[premap_aba]
186map[premap_aba] = postmap_aba
187
188Both threads can update their respective free[lane] with the same old, freed
189postmap_aba. This has made the layout inconsistent by losing a free entry, and
190at the same time, duplicating another free entry for two lanes.
191
192To solve this, we could have a single map lock (per arena) that has to be taken
193before performing the above sequence, but we feel that could be too contentious.
194Instead we use an array of (nfree) map_locks that is indexed by
195(premap_aba modulo nfree).
196
197
198f. Reconstruction from the Flog
199-------------------------------
200
201On startup, we analyze the BTT flog to create our list of free blocks. We walk
202through all the entries, and for each lane, of the set of two possible
203'sections', we always look at the most recent one only (based on the sequence
204number). The reconstruction rules/steps are simple:
205- Read map[log_entry.lba].
206- If log_entry.new matches the map entry, then log_entry.old is free.
207- If log_entry.new does not match the map entry, then log_entry.new is free.
208 (This case can only be caused by power-fails/unsafe shutdowns)
209
210
211g. Summarizing - Read and Write flows
212-------------------------------------
213
214Read:
215
2161. Convert external LBA to arena number + pre-map ABA
2172. Get a lane (and take lane_lock)
2183. Read map to get the entry for this pre-map ABA
2194. Enter post-map ABA into RTT[lane]
2205. If TRIM flag set in map, return zeroes, and end IO (go to step 8)
2216. If ERROR flag set in map, end IO with EIO (go to step 8)
2227. Read data from this block
2238. Remove post-map ABA entry from RTT[lane]
2249. Release lane (and lane_lock)
225
226Write:
227
2281. Convert external LBA to Arena number + pre-map ABA
2292. Get a lane (and take lane_lock)
2303. Use lane to index into in-memory free list and obtain a new block, next flog
231 index, next sequence number
2324. Scan the RTT to check if free block is present, and spin/wait if it is.
2335. Write data to this free block
2346. Read map to get the existing post-map ABA entry for this pre-map ABA
2357. Write flog entry: [premap_aba / old postmap_aba / new postmap_aba / seq_num]
2368. Write new post-map ABA into map.
2379. Write old post-map entry into the free list
23810. Calculate next sequence number and write into the free list entry
23911. Release lane (and lane_lock)
240
241
2424. Error Handling
243=================
244
245An arena would be in an error state if any of the metadata is corrupted
246irrecoverably, either due to a bug or a media error. The following conditions
247indicate an error:
248- Info block checksum does not match (and recovering from the copy also fails)
249- All internal available blocks are not uniquely and entirely addressed by the
250 sum of mapped blocks and free blocks (from the BTT flog).
251- Rebuilding free list from the flog reveals missing/duplicate/impossible
252 entries
253- A map entry is out of bounds
254
255If any of these error conditions are encountered, the arena is put into a read
256only state using a flag in the info block.
257
258
2595. In-kernel usage
260==================
261
262Any block driver that supports byte granularity IO to the storage may register
263with the BTT. It will have to provide the rw_bytes interface in its
264block_device_operations struct:
265
266 int (*rw_bytes)(struct gendisk *, void *, size_t, off_t, int rw);
267
268It may register with the BTT after it adds its own gendisk, using btt_init:
269
270 struct btt *btt_init(struct gendisk *disk, unsigned long long rawsize,
271 u32 lbasize, u8 uuid[], int maxlane);
272
273note that maxlane is the maximum amount of concurrency the driver wishes to
274allow the BTT to use.
275
276The BTT 'disk' appears as a stacked block device that grabs the underlying block
277device in the O_EXCL mode.
278
279When the driver wishes to remove the backing disk, it should similarly call
280btt_fini using the same struct btt* handle that was provided to it by btt_init.
281
282 void btt_fini(struct btt *btt);
283
diff --git a/Documentation/nvdimm/nvdimm.txt b/Documentation/nvdimm/nvdimm.txt
new file mode 100644
index 000000000000..197a0b6b0582
--- /dev/null
+++ b/Documentation/nvdimm/nvdimm.txt
@@ -0,0 +1,808 @@
1 LIBNVDIMM: Non-Volatile Devices
2 libnvdimm - kernel / libndctl - userspace helper library
3 linux-nvdimm@lists.01.org
4 v13
5
6
7 Glossary
8 Overview
9 Supporting Documents
10 Git Trees
11 LIBNVDIMM PMEM and BLK
12 Why BLK?
13 PMEM vs BLK
14 BLK-REGIONs, PMEM-REGIONs, Atomic Sectors, and DAX
15 Example NVDIMM Platform
16 LIBNVDIMM Kernel Device Model and LIBNDCTL Userspace API
17 LIBNDCTL: Context
18 libndctl: instantiate a new library context example
19 LIBNVDIMM/LIBNDCTL: Bus
20 libnvdimm: control class device in /sys/class
21 libnvdimm: bus
22 libndctl: bus enumeration example
23 LIBNVDIMM/LIBNDCTL: DIMM (NMEM)
24 libnvdimm: DIMM (NMEM)
25 libndctl: DIMM enumeration example
26 LIBNVDIMM/LIBNDCTL: Region
27 libnvdimm: region
28 libndctl: region enumeration example
29 Why Not Encode the Region Type into the Region Name?
30 How Do I Determine the Major Type of a Region?
31 LIBNVDIMM/LIBNDCTL: Namespace
32 libnvdimm: namespace
33 libndctl: namespace enumeration example
34 libndctl: namespace creation example
35 Why the Term "namespace"?
36 LIBNVDIMM/LIBNDCTL: Block Translation Table "btt"
37 libnvdimm: btt layout
38 libndctl: btt creation example
39 Summary LIBNDCTL Diagram
40
41
42Glossary
43--------
44
45PMEM: A system-physical-address range where writes are persistent. A
46block device composed of PMEM is capable of DAX. A PMEM address range
47may span an interleave of several DIMMs.
48
49BLK: A set of one or more programmable memory mapped apertures provided
50by a DIMM to access its media. This indirection precludes the
51performance benefit of interleaving, but enables DIMM-bounded failure
52modes.
53
54DPA: DIMM Physical Address, is a DIMM-relative offset. With one DIMM in
55the system there would be a 1:1 system-physical-address:DPA association.
56Once more DIMMs are added a memory controller interleave must be
57decoded to determine the DPA associated with a given
58system-physical-address. BLK capacity always has a 1:1 relationship
59with a single-DIMM's DPA range.
60
61DAX: File system extensions to bypass the page cache and block layer to
62mmap persistent memory, from a PMEM block device, directly into a
63process address space.
64
65BTT: Block Translation Table: Persistent memory is byte addressable.
66Existing software may have an expectation that the power-fail-atomicity
67of writes is at least one sector, 512 bytes. The BTT is an indirection
68table with atomic update semantics to front a PMEM/BLK block device
69driver and present arbitrary atomic sector sizes.
70
71LABEL: Metadata stored on a DIMM device that partitions and identifies
72(persistently names) storage between PMEM and BLK. It also partitions
73BLK storage to host BTTs with different parameters per BLK-partition.
74Note that traditional partition tables, GPT/MBR, are layered on top of a
75BLK or PMEM device.
76
77
78Overview
79--------
80
81The LIBNVDIMM subsystem provides support for three types of NVDIMMs, namely,
82PMEM, BLK, and NVDIMM devices that can simultaneously support both PMEM
83and BLK mode access. These three modes of operation are described by
84the "NVDIMM Firmware Interface Table" (NFIT) in ACPI 6. While the LIBNVDIMM
85implementation is generic and supports pre-NFIT platforms, it was guided
86by the superset of capabilities need to support this ACPI 6 definition
87for NVDIMM resources. The bulk of the kernel implementation is in place
88to handle the case where DPA accessible via PMEM is aliased with DPA
89accessible via BLK. When that occurs a LABEL is needed to reserve DPA
90for exclusive access via one mode a time.
91
92Supporting Documents
93ACPI 6: http://www.uefi.org/sites/default/files/resources/ACPI_6.0.pdf
94NVDIMM Namespace: http://pmem.io/documents/NVDIMM_Namespace_Spec.pdf
95DSM Interface Example: http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf
96Driver Writer's Guide: http://pmem.io/documents/NVDIMM_Driver_Writers_Guide.pdf
97
98Git Trees
99LIBNVDIMM: https://git.kernel.org/cgit/linux/kernel/git/djbw/nvdimm.git
100LIBNDCTL: https://github.com/pmem/ndctl.git
101PMEM: https://github.com/01org/prd
102
103
104LIBNVDIMM PMEM and BLK
105------------------
106
107Prior to the arrival of the NFIT, non-volatile memory was described to a
108system in various ad-hoc ways. Usually only the bare minimum was
109provided, namely, a single system-physical-address range where writes
110are expected to be durable after a system power loss. Now, the NFIT
111specification standardizes not only the description of PMEM, but also
112BLK and platform message-passing entry points for control and
113configuration.
114
115For each NVDIMM access method (PMEM, BLK), LIBNVDIMM provides a block
116device driver:
117
118 1. PMEM (nd_pmem.ko): Drives a system-physical-address range. This
119 range is contiguous in system memory and may be interleaved (hardware
120 memory controller striped) across multiple DIMMs. When interleaved the
121 platform may optionally provide details of which DIMMs are participating
122 in the interleave.
123
124 Note that while LIBNVDIMM describes system-physical-address ranges that may
125 alias with BLK access as ND_NAMESPACE_PMEM ranges and those without
126 alias as ND_NAMESPACE_IO ranges, to the nd_pmem driver there is no
127 distinction. The different device-types are an implementation detail
128 that userspace can exploit to implement policies like "only interface
129 with address ranges from certain DIMMs". It is worth noting that when
130 aliasing is present and a DIMM lacks a label, then no block device can
131 be created by default as userspace needs to do at least one allocation
132 of DPA to the PMEM range. In contrast ND_NAMESPACE_IO ranges, once
133 registered, can be immediately attached to nd_pmem.
134
135 2. BLK (nd_blk.ko): This driver performs I/O using a set of platform
136 defined apertures. A set of apertures will all access just one DIMM.
137 Multiple windows allow multiple concurrent accesses, much like
138 tagged-command-queuing, and would likely be used by different threads or
139 different CPUs.
140
141 The NFIT specification defines a standard format for a BLK-aperture, but
142 the spec also allows for vendor specific layouts, and non-NFIT BLK
143 implementations may other designs for BLK I/O. For this reason "nd_blk"
144 calls back into platform-specific code to perform the I/O. One such
145 implementation is defined in the "Driver Writer's Guide" and "DSM
146 Interface Example".
147
148
149Why BLK?
150--------
151
152While PMEM provides direct byte-addressable CPU-load/store access to
153NVDIMM storage, it does not provide the best system RAS (recovery,
154availability, and serviceability) model. An access to a corrupted
155system-physical-address address causes a cpu exception while an access
156to a corrupted address through an BLK-aperture causes that block window
157to raise an error status in a register. The latter is more aligned with
158the standard error model that host-bus-adapter attached disks present.
159Also, if an administrator ever wants to replace a memory it is easier to
160service a system at DIMM module boundaries. Compare this to PMEM where
161data could be interleaved in an opaque hardware specific manner across
162several DIMMs.
163
164PMEM vs BLK
165BLK-apertures solve this RAS problem, but their presence is also the
166major contributing factor to the complexity of the ND subsystem. They
167complicate the implementation because PMEM and BLK alias in DPA space.
168Any given DIMM's DPA-range may contribute to one or more
169system-physical-address sets of interleaved DIMMs, *and* may also be
170accessed in its entirety through its BLK-aperture. Accessing a DPA
171through a system-physical-address while simultaneously accessing the
172same DPA through a BLK-aperture has undefined results. For this reason,
173DIMMs with this dual interface configuration include a DSM function to
174store/retrieve a LABEL. The LABEL effectively partitions the DPA-space
175into exclusive system-physical-address and BLK-aperture accessible
176regions. For simplicity a DIMM is allowed a PMEM "region" per each
177interleave set in which it is a member. The remaining DPA space can be
178carved into an arbitrary number of BLK devices with discontiguous
179extents.
180
181BLK-REGIONs, PMEM-REGIONs, Atomic Sectors, and DAX
182--------------------------------------------------
183
184One of the few
185reasons to allow multiple BLK namespaces per REGION is so that each
186BLK-namespace can be configured with a BTT with unique atomic sector
187sizes. While a PMEM device can host a BTT the LABEL specification does
188not provide for a sector size to be specified for a PMEM namespace.
189This is due to the expectation that the primary usage model for PMEM is
190via DAX, and the BTT is incompatible with DAX. However, for the cases
191where an application or filesystem still needs atomic sector update
192guarantees it can register a BTT on a PMEM device or partition. See
193LIBNVDIMM/NDCTL: Block Translation Table "btt"
194
195
196Example NVDIMM Platform
197-----------------------
198
199For the remainder of this document the following diagram will be
200referenced for any example sysfs layouts.
201
202
203 (a) (b) DIMM BLK-REGION
204 +-------------------+--------+--------+--------+
205+------+ | pm0.0 | blk2.0 | pm1.0 | blk2.1 | 0 region2
206| imc0 +--+- - - region0- - - +--------+ +--------+
207+--+---+ | pm0.0 | blk3.0 | pm1.0 | blk3.1 | 1 region3
208 | +-------------------+--------v v--------+
209+--+---+ | |
210| cpu0 | region1
211+--+---+ | |
212 | +----------------------------^ ^--------+
213+--+---+ | blk4.0 | pm1.0 | blk4.0 | 2 region4
214| imc1 +--+----------------------------| +--------+
215+------+ | blk5.0 | pm1.0 | blk5.0 | 3 region5
216 +----------------------------+--------+--------+
217
218In this platform we have four DIMMs and two memory controllers in one
219socket. Each unique interface (BLK or PMEM) to DPA space is identified
220by a region device with a dynamically assigned id (REGION0 - REGION5).
221
222 1. The first portion of DIMM0 and DIMM1 are interleaved as REGION0. A
223 single PMEM namespace is created in the REGION0-SPA-range that spans
224 DIMM0 and DIMM1 with a user-specified name of "pm0.0". Some of that
225 interleaved system-physical-address range is reclaimed as BLK-aperture
226 accessed space starting at DPA-offset (a) into each DIMM. In that
227 reclaimed space we create two BLK-aperture "namespaces" from REGION2 and
228 REGION3 where "blk2.0" and "blk3.0" are just human readable names that
229 could be set to any user-desired name in the LABEL.
230
231 2. In the last portion of DIMM0 and DIMM1 we have an interleaved
232 system-physical-address range, REGION1, that spans those two DIMMs as
233 well as DIMM2 and DIMM3. Some of REGION1 allocated to a PMEM namespace
234 named "pm1.0" the rest is reclaimed in 4 BLK-aperture namespaces (for
235 each DIMM in the interleave set), "blk2.1", "blk3.1", "blk4.0", and
236 "blk5.0".
237
238 3. The portion of DIMM2 and DIMM3 that do not participate in the REGION1
239 interleaved system-physical-address range (i.e. the DPA address below
240 offset (b) are also included in the "blk4.0" and "blk5.0" namespaces.
241 Note, that this example shows that BLK-aperture namespaces don't need to
242 be contiguous in DPA-space.
243
244 This bus is provided by the kernel under the device
245 /sys/devices/platform/nfit_test.0 when CONFIG_NFIT_TEST is enabled and
246 the nfit_test.ko module is loaded. This not only test LIBNVDIMM but the
247 acpi_nfit.ko driver as well.
248
249
250LIBNVDIMM Kernel Device Model and LIBNDCTL Userspace API
251----------------------------------------------------
252
253What follows is a description of the LIBNVDIMM sysfs layout and a
254corresponding object hierarchy diagram as viewed through the LIBNDCTL
255api. The example sysfs paths and diagrams are relative to the Example
256NVDIMM Platform which is also the LIBNVDIMM bus used in the LIBNDCTL unit
257test.
258
259LIBNDCTL: Context
260Every api call in the LIBNDCTL library requires a context that holds the
261logging parameters and other library instance state. The library is
262based on the libabc template:
263https://git.kernel.org/cgit/linux/kernel/git/kay/libabc.git/
264
265LIBNDCTL: instantiate a new library context example
266
267 struct ndctl_ctx *ctx;
268
269 if (ndctl_new(&ctx) == 0)
270 return ctx;
271 else
272 return NULL;
273
274LIBNVDIMM/LIBNDCTL: Bus
275-------------------
276
277A bus has a 1:1 relationship with an NFIT. The current expectation for
278ACPI based systems is that there is only ever one platform-global NFIT.
279That said, it is trivial to register multiple NFITs, the specification
280does not preclude it. The infrastructure supports multiple busses and
281we we use this capability to test multiple NFIT configurations in the
282unit test.
283
284LIBNVDIMM: control class device in /sys/class
285
286This character device accepts DSM messages to be passed to DIMM
287identified by its NFIT handle.
288
289 /sys/class/nd/ndctl0
290 |-- dev
291 |-- device -> ../../../ndbus0
292 |-- subsystem -> ../../../../../../../class/nd
293
294
295
296LIBNVDIMM: bus
297
298 struct nvdimm_bus *nvdimm_bus_register(struct device *parent,
299 struct nvdimm_bus_descriptor *nfit_desc);
300
301 /sys/devices/platform/nfit_test.0/ndbus0
302 |-- commands
303 |-- nd
304 |-- nfit
305 |-- nmem0
306 |-- nmem1
307 |-- nmem2
308 |-- nmem3
309 |-- power
310 |-- provider
311 |-- region0
312 |-- region1
313 |-- region2
314 |-- region3
315 |-- region4
316 |-- region5
317 |-- uevent
318 `-- wait_probe
319
320LIBNDCTL: bus enumeration example
321Find the bus handle that describes the bus from Example NVDIMM Platform
322
323 static struct ndctl_bus *get_bus_by_provider(struct ndctl_ctx *ctx,
324 const char *provider)
325 {
326 struct ndctl_bus *bus;
327
328 ndctl_bus_foreach(ctx, bus)
329 if (strcmp(provider, ndctl_bus_get_provider(bus)) == 0)
330 return bus;
331
332 return NULL;
333 }
334
335 bus = get_bus_by_provider(ctx, "nfit_test.0");
336
337
338LIBNVDIMM/LIBNDCTL: DIMM (NMEM)
339---------------------------
340
341The DIMM device provides a character device for sending commands to
342hardware, and it is a container for LABELs. If the DIMM is defined by
343NFIT then an optional 'nfit' attribute sub-directory is available to add
344NFIT-specifics.
345
346Note that the kernel device name for "DIMMs" is "nmemX". The NFIT
347describes these devices via "Memory Device to System Physical Address
348Range Mapping Structure", and there is no requirement that they actually
349be physical DIMMs, so we use a more generic name.
350
351LIBNVDIMM: DIMM (NMEM)
352
353 struct nvdimm *nvdimm_create(struct nvdimm_bus *nvdimm_bus, void *provider_data,
354 const struct attribute_group **groups, unsigned long flags,
355 unsigned long *dsm_mask);
356
357 /sys/devices/platform/nfit_test.0/ndbus0
358 |-- nmem0
359 | |-- available_slots
360 | |-- commands
361 | |-- dev
362 | |-- devtype
363 | |-- driver -> ../../../../../bus/nd/drivers/nvdimm
364 | |-- modalias
365 | |-- nfit
366 | | |-- device
367 | | |-- format
368 | | |-- handle
369 | | |-- phys_id
370 | | |-- rev_id
371 | | |-- serial
372 | | `-- vendor
373 | |-- state
374 | |-- subsystem -> ../../../../../bus/nd
375 | `-- uevent
376 |-- nmem1
377 [..]
378
379
380LIBNDCTL: DIMM enumeration example
381
382Note, in this example we are assuming NFIT-defined DIMMs which are
383identified by an "nfit_handle" a 32-bit value where:
384Bit 3:0 DIMM number within the memory channel
385Bit 7:4 memory channel number
386Bit 11:8 memory controller ID
387Bit 15:12 socket ID (within scope of a Node controller if node controller is present)
388Bit 27:16 Node Controller ID
389Bit 31:28 Reserved
390
391 static struct ndctl_dimm *get_dimm_by_handle(struct ndctl_bus *bus,
392 unsigned int handle)
393 {
394 struct ndctl_dimm *dimm;
395
396 ndctl_dimm_foreach(bus, dimm)
397 if (ndctl_dimm_get_handle(dimm) == handle)
398 return dimm;
399
400 return NULL;
401 }
402
403 #define DIMM_HANDLE(n, s, i, c, d) \
404 (((n & 0xfff) << 16) | ((s & 0xf) << 12) | ((i & 0xf) << 8) \
405 | ((c & 0xf) << 4) | (d & 0xf))
406
407 dimm = get_dimm_by_handle(bus, DIMM_HANDLE(0, 0, 0, 0, 0));
408
409LIBNVDIMM/LIBNDCTL: Region
410----------------------
411
412A generic REGION device is registered for each PMEM range orBLK-aperture
413set. Per the example there are 6 regions: 2 PMEM and 4 BLK-aperture
414sets on the "nfit_test.0" bus. The primary role of regions are to be a
415container of "mappings". A mapping is a tuple of <DIMM,
416DPA-start-offset, length>.
417
418LIBNVDIMM provides a built-in driver for these REGION devices. This driver
419is responsible for reconciling the aliased DPA mappings across all
420regions, parsing the LABEL, if present, and then emitting NAMESPACE
421devices with the resolved/exclusive DPA-boundaries for the nd_pmem or
422nd_blk device driver to consume.
423
424In addition to the generic attributes of "mapping"s, "interleave_ways"
425and "size" the REGION device also exports some convenience attributes.
426"nstype" indicates the integer type of namespace-device this region
427emits, "devtype" duplicates the DEVTYPE variable stored by udev at the
428'add' event, "modalias" duplicates the MODALIAS variable stored by udev
429at the 'add' event, and finally, the optional "spa_index" is provided in
430the case where the region is defined by a SPA.
431
432LIBNVDIMM: region
433
434 struct nd_region *nvdimm_pmem_region_create(struct nvdimm_bus *nvdimm_bus,
435 struct nd_region_desc *ndr_desc);
436 struct nd_region *nvdimm_blk_region_create(struct nvdimm_bus *nvdimm_bus,
437 struct nd_region_desc *ndr_desc);
438
439 /sys/devices/platform/nfit_test.0/ndbus0
440 |-- region0
441 | |-- available_size
442 | |-- btt0
443 | |-- btt_seed
444 | |-- devtype
445 | |-- driver -> ../../../../../bus/nd/drivers/nd_region
446 | |-- init_namespaces
447 | |-- mapping0
448 | |-- mapping1
449 | |-- mappings
450 | |-- modalias
451 | |-- namespace0.0
452 | |-- namespace_seed
453 | |-- numa_node
454 | |-- nfit
455 | | `-- spa_index
456 | |-- nstype
457 | |-- set_cookie
458 | |-- size
459 | |-- subsystem -> ../../../../../bus/nd
460 | `-- uevent
461 |-- region1
462 [..]
463
464LIBNDCTL: region enumeration example
465
466Sample region retrieval routines based on NFIT-unique data like
467"spa_index" (interleave set id) for PMEM and "nfit_handle" (dimm id) for
468BLK.
469
470 static struct ndctl_region *get_pmem_region_by_spa_index(struct ndctl_bus *bus,
471 unsigned int spa_index)
472 {
473 struct ndctl_region *region;
474
475 ndctl_region_foreach(bus, region) {
476 if (ndctl_region_get_type(region) != ND_DEVICE_REGION_PMEM)
477 continue;
478 if (ndctl_region_get_spa_index(region) == spa_index)
479 return region;
480 }
481 return NULL;
482 }
483
484 static struct ndctl_region *get_blk_region_by_dimm_handle(struct ndctl_bus *bus,
485 unsigned int handle)
486 {
487 struct ndctl_region *region;
488
489 ndctl_region_foreach(bus, region) {
490 struct ndctl_mapping *map;
491
492 if (ndctl_region_get_type(region) != ND_DEVICE_REGION_BLOCK)
493 continue;
494 ndctl_mapping_foreach(region, map) {
495 struct ndctl_dimm *dimm = ndctl_mapping_get_dimm(map);
496
497 if (ndctl_dimm_get_handle(dimm) == handle)
498 return region;
499 }
500 }
501 return NULL;
502 }
503
504
505Why Not Encode the Region Type into the Region Name?
506----------------------------------------------------
507
508At first glance it seems since NFIT defines just PMEM and BLK interface
509types that we should simply name REGION devices with something derived
510from those type names. However, the ND subsystem explicitly keeps the
511REGION name generic and expects userspace to always consider the
512region-attributes for 4 reasons:
513
514 1. There are already more than two REGION and "namespace" types. For
515 PMEM there are two subtypes. As mentioned previously we have PMEM where
516 the constituent DIMM devices are known and anonymous PMEM. For BLK
517 regions the NFIT specification already anticipates vendor specific
518 implementations. The exact distinction of what a region contains is in
519 the region-attributes not the region-name or the region-devtype.
520
521 2. A region with zero child-namespaces is a possible configuration. For
522 example, the NFIT allows for a DCR to be published without a
523 corresponding BLK-aperture. This equates to a DIMM that can only accept
524 control/configuration messages, but no i/o through a descendant block
525 device. Again, this "type" is advertised in the attributes ('mappings'
526 == 0) and the name does not tell you much.
527
528 3. What if a third major interface type arises in the future? Outside
529 of vendor specific implementations, it's not difficult to envision a
530 third class of interface type beyond BLK and PMEM. With a generic name
531 for the REGION level of the device-hierarchy old userspace
532 implementations can still make sense of new kernel advertised
533 region-types. Userspace can always rely on the generic region
534 attributes like "mappings", "size", etc and the expected child devices
535 named "namespace". This generic format of the device-model hierarchy
536 allows the LIBNVDIMM and LIBNDCTL implementations to be more uniform and
537 future-proof.
538
539 4. There are more robust mechanisms for determining the major type of a
540 region than a device name. See the next section, How Do I Determine the
541 Major Type of a Region?
542
543How Do I Determine the Major Type of a Region?
544----------------------------------------------
545
546Outside of the blanket recommendation of "use libndctl", or simply
547looking at the kernel header (/usr/include/linux/ndctl.h) to decode the
548"nstype" integer attribute, here are some other options.
549
550 1. module alias lookup:
551
552 The whole point of region/namespace device type differentiation is to
553 decide which block-device driver will attach to a given LIBNVDIMM namespace.
554 One can simply use the modalias to lookup the resulting module. It's
555 important to note that this method is robust in the presence of a
556 vendor-specific driver down the road. If a vendor-specific
557 implementation wants to supplant the standard nd_blk driver it can with
558 minimal impact to the rest of LIBNVDIMM.
559
560 In fact, a vendor may also want to have a vendor-specific region-driver
561 (outside of nd_region). For example, if a vendor defined its own LABEL
562 format it would need its own region driver to parse that LABEL and emit
563 the resulting namespaces. The output from module resolution is more
564 accurate than a region-name or region-devtype.
565
566 2. udev:
567
568 The kernel "devtype" is registered in the udev database
569 # udevadm info --path=/devices/platform/nfit_test.0/ndbus0/region0
570 P: /devices/platform/nfit_test.0/ndbus0/region0
571 E: DEVPATH=/devices/platform/nfit_test.0/ndbus0/region0
572 E: DEVTYPE=nd_pmem
573 E: MODALIAS=nd:t2
574 E: SUBSYSTEM=nd
575
576 # udevadm info --path=/devices/platform/nfit_test.0/ndbus0/region4
577 P: /devices/platform/nfit_test.0/ndbus0/region4
578 E: DEVPATH=/devices/platform/nfit_test.0/ndbus0/region4
579 E: DEVTYPE=nd_blk
580 E: MODALIAS=nd:t3
581 E: SUBSYSTEM=nd
582
583 ...and is available as a region attribute, but keep in mind that the
584 "devtype" does not indicate sub-type variations and scripts should
585 really be understanding the other attributes.
586
587 3. type specific attributes:
588
589 As it currently stands a BLK-aperture region will never have a
590 "nfit/spa_index" attribute, but neither will a non-NFIT PMEM region. A
591 BLK region with a "mappings" value of 0 is, as mentioned above, a DIMM
592 that does not allow I/O. A PMEM region with a "mappings" value of zero
593 is a simple system-physical-address range.
594
595
596LIBNVDIMM/LIBNDCTL: Namespace
597-------------------------
598
599A REGION, after resolving DPA aliasing and LABEL specified boundaries,
600surfaces one or more "namespace" devices. The arrival of a "namespace"
601device currently triggers either the nd_blk or nd_pmem driver to load
602and register a disk/block device.
603
604LIBNVDIMM: namespace
605Here is a sample layout from the three major types of NAMESPACE where
606namespace0.0 represents DIMM-info-backed PMEM (note that it has a 'uuid'
607attribute), namespace2.0 represents a BLK namespace (note it has a
608'sector_size' attribute) that, and namespace6.0 represents an anonymous
609PMEM namespace (note that has no 'uuid' attribute due to not support a
610LABEL).
611
612 /sys/devices/platform/nfit_test.0/ndbus0/region0/namespace0.0
613 |-- alt_name
614 |-- devtype
615 |-- dpa_extents
616 |-- force_raw
617 |-- modalias
618 |-- numa_node
619 |-- resource
620 |-- size
621 |-- subsystem -> ../../../../../../bus/nd
622 |-- type
623 |-- uevent
624 `-- uuid
625 /sys/devices/platform/nfit_test.0/ndbus0/region2/namespace2.0
626 |-- alt_name
627 |-- devtype
628 |-- dpa_extents
629 |-- force_raw
630 |-- modalias
631 |-- numa_node
632 |-- sector_size
633 |-- size
634 |-- subsystem -> ../../../../../../bus/nd
635 |-- type
636 |-- uevent
637 `-- uuid
638 /sys/devices/platform/nfit_test.1/ndbus1/region6/namespace6.0
639 |-- block
640 | `-- pmem0
641 |-- devtype
642 |-- driver -> ../../../../../../bus/nd/drivers/pmem
643 |-- force_raw
644 |-- modalias
645 |-- numa_node
646 |-- resource
647 |-- size
648 |-- subsystem -> ../../../../../../bus/nd
649 |-- type
650 `-- uevent
651
652LIBNDCTL: namespace enumeration example
653Namespaces are indexed relative to their parent region, example below.
654These indexes are mostly static from boot to boot, but subsystem makes
655no guarantees in this regard. For a static namespace identifier use its
656'uuid' attribute.
657
658static struct ndctl_namespace *get_namespace_by_id(struct ndctl_region *region,
659 unsigned int id)
660{
661 struct ndctl_namespace *ndns;
662
663 ndctl_namespace_foreach(region, ndns)
664 if (ndctl_namespace_get_id(ndns) == id)
665 return ndns;
666
667 return NULL;
668}
669
670LIBNDCTL: namespace creation example
671Idle namespaces are automatically created by the kernel if a given
672region has enough available capacity to create a new namespace.
673Namespace instantiation involves finding an idle namespace and
674configuring it. For the most part the setting of namespace attributes
675can occur in any order, the only constraint is that 'uuid' must be set
676before 'size'. This enables the kernel to track DPA allocations
677internally with a static identifier.
678
679static int configure_namespace(struct ndctl_region *region,
680 struct ndctl_namespace *ndns,
681 struct namespace_parameters *parameters)
682{
683 char devname[50];
684
685 snprintf(devname, sizeof(devname), "namespace%d.%d",
686 ndctl_region_get_id(region), paramaters->id);
687
688 ndctl_namespace_set_alt_name(ndns, devname);
689 /* 'uuid' must be set prior to setting size! */
690 ndctl_namespace_set_uuid(ndns, paramaters->uuid);
691 ndctl_namespace_set_size(ndns, paramaters->size);
692 /* unlike pmem namespaces, blk namespaces have a sector size */
693 if (parameters->lbasize)
694 ndctl_namespace_set_sector_size(ndns, parameters->lbasize);
695 ndctl_namespace_enable(ndns);
696}
697
698
699Why the Term "namespace"?
700
701 1. Why not "volume" for instance? "volume" ran the risk of confusing ND
702 as a volume manager like device-mapper.
703
704 2. The term originated to describe the sub-devices that can be created
705 within a NVME controller (see the nvme specification:
706 http://www.nvmexpress.org/specifications/), and NFIT namespaces are
707 meant to parallel the capabilities and configurability of
708 NVME-namespaces.
709
710
711LIBNVDIMM/LIBNDCTL: Block Translation Table "btt"
712---------------------------------------------
713
714A BTT (design document: http://pmem.io/2014/09/23/btt.html) is a stacked
715block device driver that fronts either the whole block device or a
716partition of a block device emitted by either a PMEM or BLK NAMESPACE.
717
718LIBNVDIMM: btt layout
719Every region will start out with at least one BTT device which is the
720seed device. To activate it set the "namespace", "uuid", and
721"sector_size" attributes and then bind the device to the nd_pmem or
722nd_blk driver depending on the region type.
723
724 /sys/devices/platform/nfit_test.1/ndbus0/region0/btt0/
725 |-- namespace
726 |-- delete
727 |-- devtype
728 |-- modalias
729 |-- numa_node
730 |-- sector_size
731 |-- subsystem -> ../../../../../bus/nd
732 |-- uevent
733 `-- uuid
734
735LIBNDCTL: btt creation example
736Similar to namespaces an idle BTT device is automatically created per
737region. Each time this "seed" btt device is configured and enabled a new
738seed is created. Creating a BTT configuration involves two steps of
739finding and idle BTT and assigning it to consume a PMEM or BLK namespace.
740
741 static struct ndctl_btt *get_idle_btt(struct ndctl_region *region)
742 {
743 struct ndctl_btt *btt;
744
745 ndctl_btt_foreach(region, btt)
746 if (!ndctl_btt_is_enabled(btt)
747 && !ndctl_btt_is_configured(btt))
748 return btt;
749
750 return NULL;
751 }
752
753 static int configure_btt(struct ndctl_region *region,
754 struct btt_parameters *parameters)
755 {
756 btt = get_idle_btt(region);
757
758 ndctl_btt_set_uuid(btt, parameters->uuid);
759 ndctl_btt_set_sector_size(btt, parameters->sector_size);
760 ndctl_btt_set_namespace(btt, parameters->ndns);
761 /* turn off raw mode device */
762 ndctl_namespace_disable(parameters->ndns);
763 /* turn on btt access */
764 ndctl_btt_enable(btt);
765 }
766
767Once instantiated a new inactive btt seed device will appear underneath
768the region.
769
770Once a "namespace" is removed from a BTT that instance of the BTT device
771will be deleted or otherwise reset to default values. This deletion is
772only at the device model level. In order to destroy a BTT the "info
773block" needs to be destroyed. Note, that to destroy a BTT the media
774needs to be written in raw mode. By default, the kernel will autodetect
775the presence of a BTT and disable raw mode. This autodetect behavior
776can be suppressed by enabling raw mode for the namespace via the
777ndctl_namespace_set_raw_mode() api.
778
779
780Summary LIBNDCTL Diagram
781------------------------
782
783For the given example above, here is the view of the objects as seen by the LIBNDCTL api:
784 +---+
785 |CTX| +---------+ +--------------+ +---------------+
786 +-+-+ +-> REGION0 +---> NAMESPACE0.0 +--> PMEM8 "pm0.0" |
787 | | +---------+ +--------------+ +---------------+
788+-------+ | | +---------+ +--------------+ +---------------+
789| DIMM0 <-+ | +-> REGION1 +---> NAMESPACE1.0 +--> PMEM6 "pm1.0" |
790+-------+ | | | +---------+ +--------------+ +---------------+
791| DIMM1 <-+ +-v--+ | +---------+ +--------------+ +---------------+
792+-------+ +-+BUS0+---> REGION2 +-+-> NAMESPACE2.0 +--> ND6 "blk2.0" |
793| DIMM2 <-+ +----+ | +---------+ | +--------------+ +----------------------+
794+-------+ | | +-> NAMESPACE2.1 +--> ND5 "blk2.1" | BTT2 |
795| DIMM3 <-+ | +--------------+ +----------------------+
796+-------+ | +---------+ +--------------+ +---------------+
797 +-> REGION3 +-+-> NAMESPACE3.0 +--> ND4 "blk3.0" |
798 | +---------+ | +--------------+ +----------------------+
799 | +-> NAMESPACE3.1 +--> ND3 "blk3.1" | BTT1 |
800 | +--------------+ +----------------------+
801 | +---------+ +--------------+ +---------------+
802 +-> REGION4 +---> NAMESPACE4.0 +--> ND2 "blk4.0" |
803 | +---------+ +--------------+ +---------------+
804 | +---------+ +--------------+ +----------------------+
805 +-> REGION5 +---> NAMESPACE5.0 +--> ND1 "blk5.0" | BTT0 |
806 +---------+ +--------------+ +---------------+------+
807
808
diff --git a/Documentation/phy.txt b/Documentation/phy.txt
index 371361c69a4b..b388c5af9e72 100644
--- a/Documentation/phy.txt
+++ b/Documentation/phy.txt
@@ -76,6 +76,8 @@ struct phy *phy_get(struct device *dev, const char *string);
76struct phy *phy_optional_get(struct device *dev, const char *string); 76struct phy *phy_optional_get(struct device *dev, const char *string);
77struct phy *devm_phy_get(struct device *dev, const char *string); 77struct phy *devm_phy_get(struct device *dev, const char *string);
78struct phy *devm_phy_optional_get(struct device *dev, const char *string); 78struct phy *devm_phy_optional_get(struct device *dev, const char *string);
79struct phy *devm_of_phy_get_by_index(struct device *dev, struct device_node *np,
80 int index);
79 81
80phy_get, phy_optional_get, devm_phy_get and devm_phy_optional_get can 82phy_get, phy_optional_get, devm_phy_get and devm_phy_optional_get can
81be used to get the PHY. In the case of dt boot, the string arguments 83be used to get the PHY. In the case of dt boot, the string arguments
@@ -86,7 +88,10 @@ successful PHY get. On driver detach, release function is invoked on
86the the devres data and devres data is freed. phy_optional_get and 88the the devres data and devres data is freed. phy_optional_get and
87devm_phy_optional_get should be used when the phy is optional. These 89devm_phy_optional_get should be used when the phy is optional. These
88two functions will never return -ENODEV, but instead returns NULL when 90two functions will never return -ENODEV, but instead returns NULL when
89the phy cannot be found. 91the phy cannot be found.Some generic drivers, such as ehci, may use multiple
92phys and for such drivers referencing phy(s) by name(s) does not make sense. In
93this case, devm_of_phy_get_by_index can be used to get a phy reference based on
94the index.
90 95
91It should be noted that NULL is a valid phy reference. All phy 96It should be noted that NULL is a valid phy reference. All phy
92consumer calls on the NULL phy become NOPs. That is the release calls, 97consumer calls on the NULL phy become NOPs. That is the release calls,
diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt
index a9b47163bb5d..4976389e432d 100644
--- a/Documentation/pinctrl.txt
+++ b/Documentation/pinctrl.txt
@@ -714,6 +714,7 @@ static struct pinmux_ops foo_pmxops = {
714 .get_function_name = foo_get_fname, 714 .get_function_name = foo_get_fname,
715 .get_function_groups = foo_get_groups, 715 .get_function_groups = foo_get_groups,
716 .set_mux = foo_set_mux, 716 .set_mux = foo_set_mux,
717 .strict = true,
717}; 718};
718 719
719/* Pinmux operations are handled by some pin controller */ 720/* Pinmux operations are handled by some pin controller */
@@ -830,6 +831,11 @@ separate memory range only intended for GPIO driving, and the register
830range dealing with pin config and pin multiplexing get placed into a 831range dealing with pin config and pin multiplexing get placed into a
831different memory range and a separate section of the data sheet. 832different memory range and a separate section of the data sheet.
832 833
834A flag "strict" in struct pinctrl_desc is available to check and deny
835simultaneous access to the same pin from GPIO and pin multiplexing
836consumers on hardware of this type. The pinctrl driver should set this flag
837accordingly.
838
833(B) 839(B)
834 840
835 pin config 841 pin config
@@ -850,6 +856,11 @@ possible that the GPIO, pin config and pin multiplex registers are placed into
850the same memory range and the same section of the data sheet, although that 856the same memory range and the same section of the data sheet, although that
851need not be the case. 857need not be the case.
852 858
859In some pin controllers, although the physical pins are designed in the same
860way as (B), the GPIO function still can't be enabled at the same time as the
861peripheral functions. So again the "strict" flag should be set, denying
862simultaneous activation by GPIO and other muxed in devices.
863
853From a kernel point of view, however, these are different aspects of the 864From a kernel point of view, however, these are different aspects of the
854hardware and shall be put into different subsystems: 865hardware and shall be put into different subsystems:
855 866
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index 44fe1d28a163..e76dc0ad4d2b 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -556,6 +556,12 @@ helper functions described in Section 4. In that case, pm_runtime_resume()
556should be used. Of course, for this purpose the device's runtime PM has to be 556should be used. Of course, for this purpose the device's runtime PM has to be
557enabled earlier by calling pm_runtime_enable(). 557enabled earlier by calling pm_runtime_enable().
558 558
559Note, if the device may execute pm_runtime calls during the probe (such as
560if it is registers with a subsystem that may call back in) then the
561pm_runtime_get_sync() call paired with a pm_runtime_put() call will be
562appropriate to ensure that the device is not put back to sleep during the
563probe. This can happen with systems such as the network device layer.
564
559It may be desirable to suspend the device once ->probe() has finished. 565It may be desirable to suspend the device once ->probe() has finished.
560Therefore the driver core uses the asyncronous pm_request_idle() to submit a 566Therefore the driver core uses the asyncronous pm_request_idle() to submit a
561request to execute the subsystem-level idle callback for the device at that 567request to execute the subsystem-level idle callback for the device at that
diff --git a/Documentation/powerpc/00-INDEX b/Documentation/powerpc/00-INDEX
index 6fd0e8bb8140..9dc845cf7d88 100644
--- a/Documentation/powerpc/00-INDEX
+++ b/Documentation/powerpc/00-INDEX
@@ -30,3 +30,5 @@ ptrace.txt
30 - Information on the ptrace interfaces for hardware debug registers. 30 - Information on the ptrace interfaces for hardware debug registers.
31transactional_memory.txt 31transactional_memory.txt
32 - Overview of the Power8 transactional memory support. 32 - Overview of the Power8 transactional memory support.
33dscr.txt
34 - Overview DSCR (Data Stream Control Register) support.
diff --git a/Documentation/powerpc/cxl.txt b/Documentation/powerpc/cxl.txt
index 2c71ecc519d9..2a230d01cd8c 100644
--- a/Documentation/powerpc/cxl.txt
+++ b/Documentation/powerpc/cxl.txt
@@ -133,6 +133,9 @@ User API
133 The following file operations are supported on both slave and 133 The following file operations are supported on both slave and
134 master devices. 134 master devices.
135 135
136 A userspace library libcxl is avaliable here:
137 https://github.com/ibm-capi/libcxl
138 This provides a C interface to this kernel API.
136 139
137open 140open
138---- 141----
@@ -366,6 +369,7 @@ Sysfs Class
366 enumeration and tuning of the accelerators. Its layout is 369 enumeration and tuning of the accelerators. Its layout is
367 described in Documentation/ABI/testing/sysfs-class-cxl 370 described in Documentation/ABI/testing/sysfs-class-cxl
368 371
372
369Udev rules 373Udev rules
370========== 374==========
371 375
diff --git a/Documentation/powerpc/dscr.txt b/Documentation/powerpc/dscr.txt
new file mode 100644
index 000000000000..1ff4400c57b3
--- /dev/null
+++ b/Documentation/powerpc/dscr.txt
@@ -0,0 +1,83 @@
1 DSCR (Data Stream Control Register)
2 ================================================
3
4DSCR register in powerpc allows user to have some control of prefetch of data
5stream in the processor. Please refer to the ISA documents or related manual
6for more detailed information regarding how to use this DSCR to attain this
7control of the pefetches . This document here provides an overview of kernel
8support for DSCR, related kernel objects, it's functionalities and exported
9user interface.
10
11(A) Data Structures:
12
13 (1) thread_struct:
14 dscr /* Thread DSCR value */
15 dscr_inherit /* Thread has changed default DSCR */
16
17 (2) PACA:
18 dscr_default /* per-CPU DSCR default value */
19
20 (3) sysfs.c:
21 dscr_default /* System DSCR default value */
22
23(B) Scheduler Changes:
24
25 Scheduler will write the per-CPU DSCR default which is stored in the
26 CPU's PACA value into the register if the thread has dscr_inherit value
27 cleared which means that it has not changed the default DSCR till now.
28 If the dscr_inherit value is set which means that it has changed the
29 default DSCR value, scheduler will write the changed value which will
30 now be contained in thread struct's dscr into the register instead of
31 the per-CPU default PACA based DSCR value.
32
33 NOTE: Please note here that the system wide global DSCR value never
34 gets used directly in the scheduler process context switch at all.
35
36(C) SYSFS Interface:
37
38 Global DSCR default: /sys/devices/system/cpu/dscr_default
39 CPU specific DSCR default: /sys/devices/system/cpu/cpuN/dscr
40
41 Changing the global DSCR default in the sysfs will change all the CPU
42 specific DSCR defaults immediately in their PACA structures. Again if
43 the current process has the dscr_inherit clear, it also writes the new
44 value into every CPU's DSCR register right away and updates the current
45 thread's DSCR value as well.
46
47 Changing the CPU specif DSCR default value in the sysfs does exactly
48 the same thing as above but unlike the global one above, it just changes
49 stuff for that particular CPU instead for all the CPUs on the system.
50
51(D) User Space Instructions:
52
53 The DSCR register can be accessed in the user space using any of these
54 two SPR numbers available for that purpose.
55
56 (1) Problem state SPR: 0x03 (Un-privileged, POWER8 only)
57 (2) Privileged state SPR: 0x11 (Privileged)
58
59 Accessing DSCR through privileged SPR number (0x11) from user space
60 works, as it is emulated following an illegal instruction exception
61 inside the kernel. Both mfspr and mtspr instructions are emulated.
62
63 Accessing DSCR through user level SPR (0x03) from user space will first
64 create a facility unavailable exception. Inside this exception handler
65 all mfspr isntruction based read attempts will get emulated and returned
66 where as the first mtspr instruction based write attempts will enable
67 the DSCR facility for the next time around (both for read and write) by
68 setting DSCR facility in the FSCR register.
69
70(E) Specifics about 'dscr_inherit':
71
72 The thread struct element 'dscr_inherit' represents whether the thread
73 in question has attempted and changed the DSCR itself using any of the
74 following methods. This element signifies whether the thread wants to
75 use the CPU default DSCR value or its own changed DSCR value in the
76 kernel.
77
78 (1) mtspr instruction (SPR number 0x03)
79 (2) mtspr instruction (SPR number 0x11)
80 (3) ptrace interface (Explicitly set user DSCR value)
81
82 Any child of the process created after this event in the process inherits
83 this same behaviour as well.
diff --git a/Documentation/pps/pps.txt b/Documentation/pps/pps.txt
index c03b1be5eb15..c508cceeee7d 100644
--- a/Documentation/pps/pps.txt
+++ b/Documentation/pps/pps.txt
@@ -166,7 +166,7 @@ Testing the PPS support
166 166
167In order to test the PPS support even without specific hardware you can use 167In order to test the PPS support even without specific hardware you can use
168the ktimer driver (see the client subsection in the PPS configuration menu) 168the ktimer driver (see the client subsection in the PPS configuration menu)
169and the userland tools provided into Documentaion/pps/ directory. 169and the userland tools provided in the Documentation/pps/ directory.
170 170
171Once you have enabled the compilation of ktimer just modprobe it (if 171Once you have enabled the compilation of ktimer just modprobe it (if
172not statically compiled): 172not statically compiled):
diff --git a/Documentation/prctl/Makefile b/Documentation/prctl/Makefile
index 2948b7b124b9..44de3080c7f2 100644
--- a/Documentation/prctl/Makefile
+++ b/Documentation/prctl/Makefile
@@ -1,3 +1,4 @@
1ifndef CROSS_COMPILE
1# List of programs to build 2# List of programs to build
2hostprogs-$(CONFIG_X86) := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test disable-tsc-test 3hostprogs-$(CONFIG_X86) := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test disable-tsc-test
3# Tell kbuild to always build the programs 4# Tell kbuild to always build the programs
@@ -6,3 +7,4 @@ always := $(hostprogs-y)
6HOSTCFLAGS_disable-tsc-ctxt-sw-stress-test.o += -I$(objtree)/usr/include 7HOSTCFLAGS_disable-tsc-ctxt-sw-stress-test.o += -I$(objtree)/usr/include
7HOSTCFLAGS_disable-tsc-on-off-stress-test.o += -I$(objtree)/usr/include 8HOSTCFLAGS_disable-tsc-on-off-stress-test.o += -I$(objtree)/usr/include
8HOSTCFLAGS_disable-tsc-test.o += -I$(objtree)/usr/include 9HOSTCFLAGS_disable-tsc-test.o += -I$(objtree)/usr/include
10endif
diff --git a/Documentation/preempt-locking.txt b/Documentation/preempt-locking.txt
index 57883ca2498b..e89ce6624af2 100644
--- a/Documentation/preempt-locking.txt
+++ b/Documentation/preempt-locking.txt
@@ -48,7 +48,7 @@ preemption must be disabled around such regions.
48 48
49Note, some FPU functions are already explicitly preempt safe. For example, 49Note, some FPU functions are already explicitly preempt safe. For example,
50kernel_fpu_begin and kernel_fpu_end will disable and enable preemption. 50kernel_fpu_begin and kernel_fpu_end will disable and enable preemption.
51However, math_state_restore must be called with preemption disabled. 51However, fpu__restore() must be called with preemption disabled.
52 52
53 53
54RULE #3: Lock acquire and release must be performed by same task 54RULE #3: Lock acquire and release must be performed by same task
diff --git a/Documentation/remoteproc.txt b/Documentation/remoteproc.txt
index e6469fdcf89a..ef0219fa4bb4 100644
--- a/Documentation/remoteproc.txt
+++ b/Documentation/remoteproc.txt
@@ -51,6 +51,12 @@ cost.
51 rproc_shutdown() returns, and users can still use it with a subsequent 51 rproc_shutdown() returns, and users can still use it with a subsequent
52 rproc_boot(), if needed. 52 rproc_boot(), if needed.
53 53
54 struct rproc *rproc_get_by_phandle(phandle phandle)
55 - Find an rproc handle using a device tree phandle. Returns the rproc
56 handle on success, and NULL on failure. This function increments
57 the remote processor's refcount, so always use rproc_put() to
58 decrement it back once rproc isn't needed anymore.
59
543. Typical usage 603. Typical usage
55 61
56#include <linux/remoteproc.h> 62#include <linux/remoteproc.h>
diff --git a/Documentation/s390/qeth.txt b/Documentation/s390/qeth.txt
index 74122ada9949..aa06fcf5f8c2 100644
--- a/Documentation/s390/qeth.txt
+++ b/Documentation/s390/qeth.txt
@@ -1,6 +1,6 @@
1IBM s390 QDIO Ethernet Driver 1IBM s390 QDIO Ethernet Driver
2 2
3HiperSockets Bridge Port Support 3OSA and HiperSockets Bridge Port Support
4 4
5Uevents 5Uevents
6 6
@@ -8,7 +8,7 @@ To generate the events the device must be assigned a role of either
8a primary or a secondary Bridge Port. For more information, see 8a primary or a secondary Bridge Port. For more information, see
9"z/VM Connectivity, SC24-6174". 9"z/VM Connectivity, SC24-6174".
10 10
11When run on HiperSockets Bridge Capable Port hardware, and the state 11When run on an OSA or HiperSockets Bridge Capable Port hardware, and the state
12of some configured Bridge Port device on the channel changes, a udev 12of some configured Bridge Port device on the channel changes, a udev
13event with ACTION=CHANGE is emitted on behalf of the corresponding 13event with ACTION=CHANGE is emitted on behalf of the corresponding
14ccwgroup device. The event has the following attributes: 14ccwgroup device. The event has the following attributes:
diff --git a/Documentation/scheduler/sched-deadline.txt b/Documentation/scheduler/sched-deadline.txt
index 21461a0441c1..e114513a2731 100644
--- a/Documentation/scheduler/sched-deadline.txt
+++ b/Documentation/scheduler/sched-deadline.txt
@@ -8,6 +8,10 @@ CONTENTS
8 1. Overview 8 1. Overview
9 2. Scheduling algorithm 9 2. Scheduling algorithm
10 3. Scheduling Real-Time Tasks 10 3. Scheduling Real-Time Tasks
11 3.1 Definitions
12 3.2 Schedulability Analysis for Uniprocessor Systems
13 3.3 Schedulability Analysis for Multiprocessor Systems
14 3.4 Relationship with SCHED_DEADLINE Parameters
11 4. Bandwidth management 15 4. Bandwidth management
12 4.1 System-wide settings 16 4.1 System-wide settings
13 4.2 Task interface 17 4.2 Task interface
@@ -43,7 +47,7 @@ CONTENTS
43 "deadline", to schedule tasks. A SCHED_DEADLINE task should receive 47 "deadline", to schedule tasks. A SCHED_DEADLINE task should receive
44 "runtime" microseconds of execution time every "period" microseconds, and 48 "runtime" microseconds of execution time every "period" microseconds, and
45 these "runtime" microseconds are available within "deadline" microseconds 49 these "runtime" microseconds are available within "deadline" microseconds
46 from the beginning of the period. In order to implement this behaviour, 50 from the beginning of the period. In order to implement this behavior,
47 every time the task wakes up, the scheduler computes a "scheduling deadline" 51 every time the task wakes up, the scheduler computes a "scheduling deadline"
48 consistent with the guarantee (using the CBS[2,3] algorithm). Tasks are then 52 consistent with the guarantee (using the CBS[2,3] algorithm). Tasks are then
49 scheduled using EDF[1] on these scheduling deadlines (the task with the 53 scheduled using EDF[1] on these scheduling deadlines (the task with the
@@ -52,7 +56,7 @@ CONTENTS
52 "admission control" strategy (see Section "4. Bandwidth management") is used 56 "admission control" strategy (see Section "4. Bandwidth management") is used
53 (clearly, if the system is overloaded this guarantee cannot be respected). 57 (clearly, if the system is overloaded this guarantee cannot be respected).
54 58
55 Summing up, the CBS[2,3] algorithms assigns scheduling deadlines to tasks so 59 Summing up, the CBS[2,3] algorithm assigns scheduling deadlines to tasks so
56 that each task runs for at most its runtime every period, avoiding any 60 that each task runs for at most its runtime every period, avoiding any
57 interference between different tasks (bandwidth isolation), while the EDF[1] 61 interference between different tasks (bandwidth isolation), while the EDF[1]
58 algorithm selects the task with the earliest scheduling deadline as the one 62 algorithm selects the task with the earliest scheduling deadline as the one
@@ -63,7 +67,7 @@ CONTENTS
63 In more details, the CBS algorithm assigns scheduling deadlines to 67 In more details, the CBS algorithm assigns scheduling deadlines to
64 tasks in the following way: 68 tasks in the following way:
65 69
66 - Each SCHED_DEADLINE task is characterised by the "runtime", 70 - Each SCHED_DEADLINE task is characterized by the "runtime",
67 "deadline", and "period" parameters; 71 "deadline", and "period" parameters;
68 72
69 - The state of the task is described by a "scheduling deadline", and 73 - The state of the task is described by a "scheduling deadline", and
@@ -78,7 +82,7 @@ CONTENTS
78 82
79 then, if the scheduling deadline is smaller than the current time, or 83 then, if the scheduling deadline is smaller than the current time, or
80 this condition is verified, the scheduling deadline and the 84 this condition is verified, the scheduling deadline and the
81 remaining runtime are re-initialised as 85 remaining runtime are re-initialized as
82 86
83 scheduling deadline = current time + deadline 87 scheduling deadline = current time + deadline
84 remaining runtime = runtime 88 remaining runtime = runtime
@@ -126,31 +130,37 @@ CONTENTS
126 suited for periodic or sporadic real-time tasks that need guarantees on their 130 suited for periodic or sporadic real-time tasks that need guarantees on their
127 timing behavior, e.g., multimedia, streaming, control applications, etc. 131 timing behavior, e.g., multimedia, streaming, control applications, etc.
128 132
1333.1 Definitions
134------------------------
135
129 A typical real-time task is composed of a repetition of computation phases 136 A typical real-time task is composed of a repetition of computation phases
130 (task instances, or jobs) which are activated on a periodic or sporadic 137 (task instances, or jobs) which are activated on a periodic or sporadic
131 fashion. 138 fashion.
132 Each job J_j (where J_j is the j^th job of the task) is characterised by an 139 Each job J_j (where J_j is the j^th job of the task) is characterized by an
133 arrival time r_j (the time when the job starts), an amount of computation 140 arrival time r_j (the time when the job starts), an amount of computation
134 time c_j needed to finish the job, and a job absolute deadline d_j, which 141 time c_j needed to finish the job, and a job absolute deadline d_j, which
135 is the time within which the job should be finished. The maximum execution 142 is the time within which the job should be finished. The maximum execution
136 time max_j{c_j} is called "Worst Case Execution Time" (WCET) for the task. 143 time max{c_j} is called "Worst Case Execution Time" (WCET) for the task.
137 A real-time task can be periodic with period P if r_{j+1} = r_j + P, or 144 A real-time task can be periodic with period P if r_{j+1} = r_j + P, or
138 sporadic with minimum inter-arrival time P is r_{j+1} >= r_j + P. Finally, 145 sporadic with minimum inter-arrival time P is r_{j+1} >= r_j + P. Finally,
139 d_j = r_j + D, where D is the task's relative deadline. 146 d_j = r_j + D, where D is the task's relative deadline.
140 The utilisation of a real-time task is defined as the ratio between its 147 Summing up, a real-time task can be described as
148 Task = (WCET, D, P)
149
150 The utilization of a real-time task is defined as the ratio between its
141 WCET and its period (or minimum inter-arrival time), and represents 151 WCET and its period (or minimum inter-arrival time), and represents
142 the fraction of CPU time needed to execute the task. 152 the fraction of CPU time needed to execute the task.
143 153
144 If the total utilisation sum_i(WCET_i/P_i) is larger than M (with M equal 154 If the total utilization U=sum(WCET_i/P_i) is larger than M (with M equal
145 to the number of CPUs), then the scheduler is unable to respect all the 155 to the number of CPUs), then the scheduler is unable to respect all the
146 deadlines. 156 deadlines.
147 Note that total utilisation is defined as the sum of the utilisations 157 Note that total utilization is defined as the sum of the utilizations
148 WCET_i/P_i over all the real-time tasks in the system. When considering 158 WCET_i/P_i over all the real-time tasks in the system. When considering
149 multiple real-time tasks, the parameters of the i-th task are indicated 159 multiple real-time tasks, the parameters of the i-th task are indicated
150 with the "_i" suffix. 160 with the "_i" suffix.
151 Moreover, if the total utilisation is larger than M, then we risk starving 161 Moreover, if the total utilization is larger than M, then we risk starving
152 non- real-time tasks by real-time tasks. 162 non- real-time tasks by real-time tasks.
153 If, instead, the total utilisation is smaller than M, then non real-time 163 If, instead, the total utilization is smaller than M, then non real-time
154 tasks will not be starved and the system might be able to respect all the 164 tasks will not be starved and the system might be able to respect all the
155 deadlines. 165 deadlines.
156 As a matter of fact, in this case it is possible to provide an upper bound 166 As a matter of fact, in this case it is possible to provide an upper bound
@@ -159,38 +169,119 @@ CONTENTS
159 More precisely, it can be proven that using a global EDF scheduler the 169 More precisely, it can be proven that using a global EDF scheduler the
160 maximum tardiness of each task is smaller or equal than 170 maximum tardiness of each task is smaller or equal than
161 ((M − 1) · WCET_max − WCET_min)/(M − (M − 2) · U_max) + WCET_max 171 ((M − 1) · WCET_max − WCET_min)/(M − (M − 2) · U_max) + WCET_max
162 where WCET_max = max_i{WCET_i} is the maximum WCET, WCET_min=min_i{WCET_i} 172 where WCET_max = max{WCET_i} is the maximum WCET, WCET_min=min{WCET_i}
163 is the minimum WCET, and U_max = max_i{WCET_i/P_i} is the maximum utilisation. 173 is the minimum WCET, and U_max = max{WCET_i/P_i} is the maximum
174 utilization[12].
175
1763.2 Schedulability Analysis for Uniprocessor Systems
177------------------------
164 178
165 If M=1 (uniprocessor system), or in case of partitioned scheduling (each 179 If M=1 (uniprocessor system), or in case of partitioned scheduling (each
166 real-time task is statically assigned to one and only one CPU), it is 180 real-time task is statically assigned to one and only one CPU), it is
167 possible to formally check if all the deadlines are respected. 181 possible to formally check if all the deadlines are respected.
168 If D_i = P_i for all tasks, then EDF is able to respect all the deadlines 182 If D_i = P_i for all tasks, then EDF is able to respect all the deadlines
169 of all the tasks executing on a CPU if and only if the total utilisation 183 of all the tasks executing on a CPU if and only if the total utilization
170 of the tasks running on such a CPU is smaller or equal than 1. 184 of the tasks running on such a CPU is smaller or equal than 1.
171 If D_i != P_i for some task, then it is possible to define the density of 185 If D_i != P_i for some task, then it is possible to define the density of
172 a task as C_i/min{D_i,T_i}, and EDF is able to respect all the deadlines 186 a task as WCET_i/min{D_i,P_i}, and EDF is able to respect all the deadlines
173 of all the tasks running on a CPU if the sum sum_i C_i/min{D_i,T_i} of the 187 of all the tasks running on a CPU if the sum of the densities of the tasks
174 densities of the tasks running on such a CPU is smaller or equal than 1 188 running on such a CPU is smaller or equal than 1:
175 (notice that this condition is only sufficient, and not necessary). 189 sum(WCET_i / min{D_i, P_i}) <= 1
190 It is important to notice that this condition is only sufficient, and not
191 necessary: there are task sets that are schedulable, but do not respect the
192 condition. For example, consider the task set {Task_1,Task_2} composed by
193 Task_1=(50ms,50ms,100ms) and Task_2=(10ms,100ms,100ms).
194 EDF is clearly able to schedule the two tasks without missing any deadline
195 (Task_1 is scheduled as soon as it is released, and finishes just in time
196 to respect its deadline; Task_2 is scheduled immediately after Task_1, hence
197 its response time cannot be larger than 50ms + 10ms = 60ms) even if
198 50 / min{50,100} + 10 / min{100, 100} = 50 / 50 + 10 / 100 = 1.1
199 Of course it is possible to test the exact schedulability of tasks with
200 D_i != P_i (checking a condition that is both sufficient and necessary),
201 but this cannot be done by comparing the total utilization or density with
202 a constant. Instead, the so called "processor demand" approach can be used,
203 computing the total amount of CPU time h(t) needed by all the tasks to
204 respect all of their deadlines in a time interval of size t, and comparing
205 such a time with the interval size t. If h(t) is smaller than t (that is,
206 the amount of time needed by the tasks in a time interval of size t is
207 smaller than the size of the interval) for all the possible values of t, then
208 EDF is able to schedule the tasks respecting all of their deadlines. Since
209 performing this check for all possible values of t is impossible, it has been
210 proven[4,5,6] that it is sufficient to perform the test for values of t
211 between 0 and a maximum value L. The cited papers contain all of the
212 mathematical details and explain how to compute h(t) and L.
213 In any case, this kind of analysis is too complex as well as too
214 time-consuming to be performed on-line. Hence, as explained in Section
215 4 Linux uses an admission test based on the tasks' utilizations.
216
2173.3 Schedulability Analysis for Multiprocessor Systems
218------------------------
176 219
177 On multiprocessor systems with global EDF scheduling (non partitioned 220 On multiprocessor systems with global EDF scheduling (non partitioned
178 systems), a sufficient test for schedulability can not be based on the 221 systems), a sufficient test for schedulability can not be based on the
179 utilisations (it can be shown that task sets with utilisations slightly 222 utilizations or densities: it can be shown that even if D_i = P_i task
180 larger than 1 can miss deadlines regardless of the number of CPUs M). 223 sets with utilizations slightly larger than 1 can miss deadlines regardless
181 However, as previously stated, enforcing that the total utilisation is smaller 224 of the number of CPUs.
182 than M is enough to guarantee that non real-time tasks are not starved and 225
183 that the tardiness of real-time tasks has an upper bound. 226 Consider a set {Task_1,...Task_{M+1}} of M+1 tasks on a system with M
227 CPUs, with the first task Task_1=(P,P,P) having period, relative deadline
228 and WCET equal to P. The remaining M tasks Task_i=(e,P-1,P-1) have an
229 arbitrarily small worst case execution time (indicated as "e" here) and a
230 period smaller than the one of the first task. Hence, if all the tasks
231 activate at the same time t, global EDF schedules these M tasks first
232 (because their absolute deadlines are equal to t + P - 1, hence they are
233 smaller than the absolute deadline of Task_1, which is t + P). As a
234 result, Task_1 can be scheduled only at time t + e, and will finish at
235 time t + e + P, after its absolute deadline. The total utilization of the
236 task set is U = M · e / (P - 1) + P / P = M · e / (P - 1) + 1, and for small
237 values of e this can become very close to 1. This is known as "Dhall's
238 effect"[7]. Note: the example in the original paper by Dhall has been
239 slightly simplified here (for example, Dhall more correctly computed
240 lim_{e->0}U).
241
242 More complex schedulability tests for global EDF have been developed in
243 real-time literature[8,9], but they are not based on a simple comparison
244 between total utilization (or density) and a fixed constant. If all tasks
245 have D_i = P_i, a sufficient schedulability condition can be expressed in
246 a simple way:
247 sum(WCET_i / P_i) <= M - (M - 1) · U_max
248 where U_max = max{WCET_i / P_i}[10]. Notice that for U_max = 1,
249 M - (M - 1) · U_max becomes M - M + 1 = 1 and this schedulability condition
250 just confirms the Dhall's effect. A more complete survey of the literature
251 about schedulability tests for multi-processor real-time scheduling can be
252 found in [11].
253
254 As seen, enforcing that the total utilization is smaller than M does not
255 guarantee that global EDF schedules the tasks without missing any deadline
256 (in other words, global EDF is not an optimal scheduling algorithm). However,
257 a total utilization smaller than M is enough to guarantee that non real-time
258 tasks are not starved and that the tardiness of real-time tasks has an upper
259 bound[12] (as previously noted). Different bounds on the maximum tardiness
260 experienced by real-time tasks have been developed in various papers[13,14],
261 but the theoretical result that is important for SCHED_DEADLINE is that if
262 the total utilization is smaller or equal than M then the response times of
263 the tasks are limited.
264
2653.4 Relationship with SCHED_DEADLINE Parameters
266------------------------
184 267
185 SCHED_DEADLINE can be used to schedule real-time tasks guaranteeing that 268 Finally, it is important to understand the relationship between the
186 the jobs' deadlines of a task are respected. In order to do this, a task 269 SCHED_DEADLINE scheduling parameters described in Section 2 (runtime,
187 must be scheduled by setting: 270 deadline and period) and the real-time task parameters (WCET, D, P)
271 described in this section. Note that the tasks' temporal constraints are
272 represented by its absolute deadlines d_j = r_j + D described above, while
273 SCHED_DEADLINE schedules the tasks according to scheduling deadlines (see
274 Section 2).
275 If an admission test is used to guarantee that the scheduling deadlines
276 are respected, then SCHED_DEADLINE can be used to schedule real-time tasks
277 guaranteeing that all the jobs' deadlines of a task are respected.
278 In order to do this, a task must be scheduled by setting:
188 279
189 - runtime >= WCET 280 - runtime >= WCET
190 - deadline = D 281 - deadline = D
191 - period <= P 282 - period <= P
192 283
193 IOW, if runtime >= WCET and if period is >= P, then the scheduling deadlines 284 IOW, if runtime >= WCET and if period is <= P, then the scheduling deadlines
194 and the absolute deadlines (d_j) coincide, so a proper admission control 285 and the absolute deadlines (d_j) coincide, so a proper admission control
195 allows to respect the jobs' absolute deadlines for this task (this is what is 286 allows to respect the jobs' absolute deadlines for this task (this is what is
196 called "hard schedulability property" and is an extension of Lemma 1 of [2]). 287 called "hard schedulability property" and is an extension of Lemma 1 of [2]).
@@ -206,6 +297,39 @@ CONTENTS
206 Symposium, 1998. http://retis.sssup.it/~giorgio/paps/1998/rtss98-cbs.pdf 297 Symposium, 1998. http://retis.sssup.it/~giorgio/paps/1998/rtss98-cbs.pdf
207 3 - L. Abeni. Server Mechanisms for Multimedia Applications. ReTiS Lab 298 3 - L. Abeni. Server Mechanisms for Multimedia Applications. ReTiS Lab
208 Technical Report. http://disi.unitn.it/~abeni/tr-98-01.pdf 299 Technical Report. http://disi.unitn.it/~abeni/tr-98-01.pdf
300 4 - J. Y. Leung and M.L. Merril. A Note on Preemptive Scheduling of
301 Periodic, Real-Time Tasks. Information Processing Letters, vol. 11,
302 no. 3, pp. 115-118, 1980.
303 5 - S. K. Baruah, A. K. Mok and L. E. Rosier. Preemptively Scheduling
304 Hard-Real-Time Sporadic Tasks on One Processor. Proceedings of the
305 11th IEEE Real-time Systems Symposium, 1990.
306 6 - S. K. Baruah, L. E. Rosier and R. R. Howell. Algorithms and Complexity
307 Concerning the Preemptive Scheduling of Periodic Real-Time tasks on
308 One Processor. Real-Time Systems Journal, vol. 4, no. 2, pp 301-324,
309 1990.
310 7 - S. J. Dhall and C. L. Liu. On a real-time scheduling problem. Operations
311 research, vol. 26, no. 1, pp 127-140, 1978.
312 8 - T. Baker. Multiprocessor EDF and Deadline Monotonic Schedulability
313 Analysis. Proceedings of the 24th IEEE Real-Time Systems Symposium, 2003.
314 9 - T. Baker. An Analysis of EDF Schedulability on a Multiprocessor.
315 IEEE Transactions on Parallel and Distributed Systems, vol. 16, no. 8,
316 pp 760-768, 2005.
317 10 - J. Goossens, S. Funk and S. Baruah, Priority-Driven Scheduling of
318 Periodic Task Systems on Multiprocessors. Real-Time Systems Journal,
319 vol. 25, no. 2–3, pp. 187–205, 2003.
320 11 - R. Davis and A. Burns. A Survey of Hard Real-Time Scheduling for
321 Multiprocessor Systems. ACM Computing Surveys, vol. 43, no. 4, 2011.
322 http://www-users.cs.york.ac.uk/~robdavis/papers/MPSurveyv5.0.pdf
323 12 - U. C. Devi and J. H. Anderson. Tardiness Bounds under Global EDF
324 Scheduling on a Multiprocessor. Real-Time Systems Journal, vol. 32,
325 no. 2, pp 133-189, 2008.
326 13 - P. Valente and G. Lipari. An Upper Bound to the Lateness of Soft
327 Real-Time Tasks Scheduled by EDF on Multiprocessors. Proceedings of
328 the 26th IEEE Real-Time Systems Symposium, 2005.
329 14 - J. Erickson, U. Devi and S. Baruah. Improved tardiness bounds for
330 Global EDF. Proceedings of the 22nd Euromicro Conference on
331 Real-Time Systems, 2010.
332
209 333
2104. Bandwidth management 3344. Bandwidth management
211======================= 335=======================
@@ -218,10 +342,10 @@ CONTENTS
218 no guarantee can be given on the actual scheduling of the -deadline tasks. 342 no guarantee can be given on the actual scheduling of the -deadline tasks.
219 343
220 As already stated in Section 3, a necessary condition to be respected to 344 As already stated in Section 3, a necessary condition to be respected to
221 correctly schedule a set of real-time tasks is that the total utilisation 345 correctly schedule a set of real-time tasks is that the total utilization
222 is smaller than M. When talking about -deadline tasks, this requires that 346 is smaller than M. When talking about -deadline tasks, this requires that
223 the sum of the ratio between runtime and period for all tasks is smaller 347 the sum of the ratio between runtime and period for all tasks is smaller
224 than M. Notice that the ratio runtime/period is equivalent to the utilisation 348 than M. Notice that the ratio runtime/period is equivalent to the utilization
225 of a "traditional" real-time task, and is also often referred to as 349 of a "traditional" real-time task, and is also often referred to as
226 "bandwidth". 350 "bandwidth".
227 The interface used to control the CPU bandwidth that can be allocated 351 The interface used to control the CPU bandwidth that can be allocated
@@ -251,7 +375,7 @@ CONTENTS
251 The system wide settings are configured under the /proc virtual file system. 375 The system wide settings are configured under the /proc virtual file system.
252 376
253 For now the -rt knobs are used for -deadline admission control and the 377 For now the -rt knobs are used for -deadline admission control and the
254 -deadline runtime is accounted against the -rt runtime. We realise that this 378 -deadline runtime is accounted against the -rt runtime. We realize that this
255 isn't entirely desirable; however, it is better to have a small interface for 379 isn't entirely desirable; however, it is better to have a small interface for
256 now, and be able to change it easily later. The ideal situation (see 5.) is to 380 now, and be able to change it easily later. The ideal situation (see 5.) is to
257 run -rt tasks from a -deadline server; in which case the -rt bandwidth is a 381 run -rt tasks from a -deadline server; in which case the -rt bandwidth is a
diff --git a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt
index 731bc4f4c5e6..255075157511 100644
--- a/Documentation/scsi/scsi_mid_low_api.txt
+++ b/Documentation/scsi/scsi_mid_low_api.txt
@@ -1269,7 +1269,7 @@ Members of interest:
1269 request_buffer - either contains data buffer or scatter gather list 1269 request_buffer - either contains data buffer or scatter gather list
1270 depending on the setting of use_sg. Scatter gather 1270 depending on the setting of use_sg. Scatter gather
1271 elements are defined by 'struct scatterlist' found 1271 elements are defined by 'struct scatterlist' found
1272 in include/asm/scatterlist.h . 1272 in include/linux/scatterlist.h .
1273 done - function pointer that should be invoked by LLD when the 1273 done - function pointer that should be invoked by LLD when the
1274 SCSI command is completed (successfully or otherwise). 1274 SCSI command is completed (successfully or otherwise).
1275 Should only be called by an LLD if the LLD has accepted 1275 Should only be called by an LLD if the LLD has accepted
diff --git a/Documentation/scsi/st.txt b/Documentation/scsi/st.txt
index 0d5bdb153d3b..f29fa550665a 100644
--- a/Documentation/scsi/st.txt
+++ b/Documentation/scsi/st.txt
@@ -151,6 +151,65 @@ A link named 'tape' is made from the SCSI device directory to the class
151directory corresponding to the mode 0 auto-rewind device (e.g., st0). 151directory corresponding to the mode 0 auto-rewind device (e.g., st0).
152 152
153 153
154SYSFS AND STATISTICS FOR TAPE DEVICES
155
156The st driver maintains statistics for tape drives inside the sysfs filesystem.
157The following method can be used to locate the statistics that are
158available (assuming that sysfs is mounted at /sys):
159
1601. Use opendir(3) on the directory /sys/class/scsi_tape
1612. Use readdir(3) to read the directory contents
1623. Use regcomp(3)/regexec(3) to match directory entries to the extended
163 regular expression "^st[0-9]+$"
1644. Access the statistics from the /sys/class/scsi_tape/<match>/stats
165 directory (where <match> is a directory entry from /sys/class/scsi_tape
166 that matched the extended regular expression)
167
168The reason for using this approach is that all the character devices
169pointing to the same tape drive use the same statistics. That means
170that st0 would have the same statistics as nst0.
171
172The directory contains the following statistics files:
173
1741. in_flight - The number of I/Os currently outstanding to this device.
1752. io_ns - The amount of time spent waiting (in nanoseconds) for all I/O
176 to complete (including read and write). This includes tape movement
177 commands such as seeking between file or set marks and implicit tape
178 movement such as when rewind on close tape devices are used.
1793. other_cnt - The number of I/Os issued to the tape drive other than read or
180 write commands. The time taken to complete these commands uses the
181 following calculation io_ms-read_ms-write_ms.
1824. read_byte_cnt - The number of bytes read from the tape drive.
1835. read_cnt - The number of read requests issued to the tape drive.
1846. read_ns - The amount of time (in nanoseconds) spent waiting for read
185 requests to complete.
1867. write_byte_cnt - The number of bytes written to the tape drive.
1878. write_cnt - The number of write requests issued to the tape drive.
1889. write_ns - The amount of time (in nanoseconds) spent waiting for write
189 requests to complete.
19010. resid_cnt - The number of times during a read or write we found
191 the residual amount to be non-zero. This should mean that a program
192 is issuing a read larger thean the block size on tape. For write
193 not all data made it to tape.
194
195Note: The in_flight value is incremented when an I/O starts the I/O
196itself is not added to the statistics until it completes.
197
198The total of read_cnt, write_cnt, and other_cnt may not total to the same
199value as iodone_cnt at the device level. The tape statistics only count
200I/O issued via the st module.
201
202When read the statistics may not be temporally consistent while I/O is in
203progress. The individual values are read and written to atomically however
204when reading them back via sysfs they may be in the process of being
205updated when starting an I/O or when it is completed.
206
207The value shown in in_flight is incremented before any statstics are
208updated and decremented when an I/O completes after updating statistics.
209The value of in_flight is 0 when there are no I/Os outstanding that are
210issued by the st driver. Tape statistics do not take into account any
211I/O performed via the sg device.
212
154BSD AND SYS V SEMANTICS 213BSD AND SYS V SEMANTICS
155 214
156The user can choose between these two behaviours of the tape driver by 215The user can choose between these two behaviours of the tape driver by
diff --git a/Documentation/security/Smack.txt b/Documentation/security/Smack.txt
index abc82f85215b..de5e1aeca7fb 100644
--- a/Documentation/security/Smack.txt
+++ b/Documentation/security/Smack.txt
@@ -206,11 +206,11 @@ netlabel
206 label. The format accepted on write is: 206 label. The format accepted on write is:
207 "%d.%d.%d.%d label" or "%d.%d.%d.%d/%d label". 207 "%d.%d.%d.%d label" or "%d.%d.%d.%d/%d label".
208onlycap 208onlycap
209 This contains the label processes must have for CAP_MAC_ADMIN 209 This contains labels processes must have for CAP_MAC_ADMIN
210 and CAP_MAC_OVERRIDE to be effective. If this file is empty 210 and CAP_MAC_OVERRIDE to be effective. If this file is empty
211 these capabilities are effective at for processes with any 211 these capabilities are effective at for processes with any
212 label. The value is set by writing the desired label to the 212 label. The values are set by writing the desired labels, separated
213 file or cleared by writing "-" to the file. 213 by spaces, to the file or cleared by writing "-" to the file.
214ptrace 214ptrace
215 This is used to define the current ptrace policy 215 This is used to define the current ptrace policy
216 0 - default: this is the policy that relies on Smack access rules. 216 0 - default: this is the policy that relies on Smack access rules.
diff --git a/Documentation/serial/serial-rs485.txt b/Documentation/serial/serial-rs485.txt
index 39dac95422a3..2253b8b45a74 100644
--- a/Documentation/serial/serial-rs485.txt
+++ b/Documentation/serial/serial-rs485.txt
@@ -33,50 +33,10 @@
33 the values given by the device tree. 33 the values given by the device tree.
34 34
35 Any driver for devices capable of working both as RS232 and RS485 should 35 Any driver for devices capable of working both as RS232 and RS485 should
36 provide at least the following ioctls: 36 implement the rs485_config callback in the uart_port structure. The
37 37 serial_core calls rs485_config to do the device specific part in response
38 - TIOCSRS485 (typically associated with number 0x542F). This ioctl is used 38 to TIOCSRS485 and TIOCGRS485 ioctls (see below). The rs485_config callback
39 to enable/disable RS485 mode from user-space 39 receives a pointer to struct serial_rs485.
40
41 - TIOCGRS485 (typically associated with number 0x542E). This ioctl is used
42 to get RS485 mode from kernel-space (i.e., driver) to user-space.
43
44 In other words, the serial driver should contain a code similar to the next
45 one:
46
47 static struct uart_ops atmel_pops = {
48 /* ... */
49 .ioctl = handle_ioctl,
50 };
51
52 static int handle_ioctl(struct uart_port *port,
53 unsigned int cmd,
54 unsigned long arg)
55 {
56 struct serial_rs485 rs485conf;
57
58 switch (cmd) {
59 case TIOCSRS485:
60 if (copy_from_user(&rs485conf,
61 (struct serial_rs485 *) arg,
62 sizeof(rs485conf)))
63 return -EFAULT;
64
65 /* ... */
66 break;
67
68 case TIOCGRS485:
69 if (copy_to_user((struct serial_rs485 *) arg,
70 ...,
71 sizeof(rs485conf)))
72 return -EFAULT;
73 /* ... */
74 break;
75
76 /* ... */
77 }
78 }
79
80 40
814. USAGE FROM USER-LEVEL 414. USAGE FROM USER-LEVEL
82 42
@@ -85,7 +45,7 @@
85 45
86 #include <linux/serial.h> 46 #include <linux/serial.h>
87 47
88 /* Driver-specific ioctls: */ 48 /* RS485 ioctls: */
89 #define TIOCGRS485 0x542E 49 #define TIOCGRS485 0x542E
90 #define TIOCSRS485 0x542F 50 #define TIOCSRS485 0x542F
91 51
diff --git a/Documentation/serial/tty.txt b/Documentation/serial/tty.txt
index 1e52d67d0abf..973c8ad3f959 100644
--- a/Documentation/serial/tty.txt
+++ b/Documentation/serial/tty.txt
@@ -4,9 +4,6 @@
4Your guide to the ancient and twisted locking policies of the tty layer and 4Your guide to the ancient and twisted locking policies of the tty layer and
5the warped logic behind them. Beware all ye who read on. 5the warped logic behind them. Beware all ye who read on.
6 6
7FIXME: still need to work out the full set of BKL assumptions and document
8them so they can eventually be killed off.
9
10 7
11Line Discipline 8Line Discipline
12--------------- 9---------------
@@ -198,6 +195,9 @@ TTY_IO_ERROR If set, causes all subsequent userspace read/write
198 195
199TTY_OTHER_CLOSED Device is a pty and the other side has closed. 196TTY_OTHER_CLOSED Device is a pty and the other side has closed.
200 197
198TTY_OTHER_DONE Device is a pty and the other side has closed and
199 all pending input processing has been completed.
200
201TTY_NO_WRITE_SPLIT Prevent driver from splitting up writes into 201TTY_NO_WRITE_SPLIT Prevent driver from splitting up writes into
202 smaller chunks. 202 smaller chunks.
203 203
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt
index 5a3163cac6c3..ec099d4343f2 100644
--- a/Documentation/sound/alsa/HD-Audio-Models.txt
+++ b/Documentation/sound/alsa/HD-Audio-Models.txt
@@ -11,7 +11,10 @@ ALC880
11 11
12ALC260 12ALC260
13====== 13======
14 N/A 14 gpio1 Enable GPIO1
15 coef Enable EAPD via COEF table
16 fujitsu Quirk for FSC S7020
17 fujitsu-jwse Quirk for FSC S7020 with jack modes and HP mic support
15 18
16ALC262 19ALC262
17====== 20======
@@ -20,8 +23,9 @@ ALC262
20ALC267/268 23ALC267/268
21========== 24==========
22 inv-dmic Inverted internal mic workaround 25 inv-dmic Inverted internal mic workaround
26 hp-eapd Disable HP EAPD on NID 0x15
23 27
24ALC269/270/275/276/28x/29x 28ALC22x/23x/25x/269/27x/28x/29x (and vendor-specific ALC3xxx models)
25====== 29======
26 laptop-amic Laptops with analog-mic input 30 laptop-amic Laptops with analog-mic input
27 laptop-dmic Laptops with digital-mic input 31 laptop-dmic Laptops with digital-mic input
@@ -29,9 +33,15 @@ ALC269/270/275/276/28x/29x
29 alc271-dmic Enable ALC271X digital mic workaround 33 alc271-dmic Enable ALC271X digital mic workaround
30 inv-dmic Inverted internal mic workaround 34 inv-dmic Inverted internal mic workaround
31 headset-mic Indicates a combined headset (headphone+mic) jack 35 headset-mic Indicates a combined headset (headphone+mic) jack
36 headset-mode More comprehensive headset support for ALC269 & co
37 headset-mode-no-hp-mic Headset mode support without headphone mic
32 lenovo-dock Enables docking station I/O for some Lenovos 38 lenovo-dock Enables docking station I/O for some Lenovos
39 hp-gpio-led GPIO LED support on HP laptops
33 dell-headset-multi Headset jack, which can also be used as mic-in 40 dell-headset-multi Headset jack, which can also be used as mic-in
34 dell-headset-dock Headset jack (without mic-in), and also dock I/O 41 dell-headset-dock Headset jack (without mic-in), and also dock I/O
42 alc283-dac-wcaps Fixups for Chromebook with ALC283
43 alc283-sense-combo Combo jack sensing on ALC283
44 tpt440-dock Pin configs for Lenovo Thinkpad Dock support
35 45
36ALC66x/67x/892 46ALC66x/67x/892
37============== 47==============
diff --git a/Documentation/sound/alsa/Jack-Controls.txt b/Documentation/sound/alsa/Jack-Controls.txt
new file mode 100644
index 000000000000..fe1c5e0c8555
--- /dev/null
+++ b/Documentation/sound/alsa/Jack-Controls.txt
@@ -0,0 +1,43 @@
1Why we need Jack kcontrols
2==========================
3
4ALSA uses kcontrols to export audio controls(switch, volume, Mux, ...)
5to user space. This means userspace applications like pulseaudio can
6switch off headphones and switch on speakers when no headphones are
7pluged in.
8
9The old ALSA jack code only created input devices for each registered
10jack. These jack input devices are not readable by userspace devices
11that run as non root.
12
13The new jack code creates embedded jack kcontrols for each jack that
14can be read by any process.
15
16This can be combined with UCM to allow userspace to route audio more
17intelligently based on jack insertion or removal events.
18
19Jack Kcontrol Internals
20=======================
21
22Each jack will have a kcontrol list, so that we can create a kcontrol
23and attach it to the jack, at jack creation stage. We can also add a
24kcontrol to an existing jack, at anytime when required.
25
26Those kcontrols will be freed automatically when the Jack is freed.
27
28How to use jack kcontrols
29=========================
30
31In order to keep compatibility, snd_jack_new() has been modified by
32adding two params :-
33
34 - @initial_kctl: if true, create a kcontrol and add it to the jack
35 list.
36 - @phantom_jack: Don't create a input device for phantom jacks.
37
38HDA jacks can set phantom_jack to true in order to create a phantom
39jack and set initial_kctl to true to create an initial kcontrol with
40the correct id.
41
42ASoC jacks should set initial_kctl as false. The pin name will be
43assigned as the jack kcontrol name.
diff --git a/Documentation/sound/oss/PSS-updates b/Documentation/sound/oss/PSS-updates
index c84dd7597e64..11914a1dc7e7 100644
--- a/Documentation/sound/oss/PSS-updates
+++ b/Documentation/sound/oss/PSS-updates
@@ -41,7 +41,7 @@ pss_no_sound
41 41
42 This module parameter is a flag that can be used to tell the driver to 42 This module parameter is a flag that can be used to tell the driver to
43just configure non-sound components. 0 configures all components, a non-0 43just configure non-sound components. 0 configures all components, a non-0
44value will only attept to configure the CDROM and joystick ports. This 44value will only attempt to configure the CDROM and joystick ports. This
45parameter can be used by a user who only wished to use the builtin joystick 45parameter can be used by a user who only wished to use the builtin joystick
46and/or CDROM port(s) of his PSS sound card. If this driver is loaded with this 46and/or CDROM port(s) of his PSS sound card. If this driver is loaded with this
47parameter and with the parameter below set to true then a user can safely unload 47parameter and with the parameter below set to true then a user can safely unload
diff --git a/Documentation/sound/oss/README.OSS b/Documentation/sound/oss/README.OSS
index 4be259428a1c..a085ea3611a1 100644
--- a/Documentation/sound/oss/README.OSS
+++ b/Documentation/sound/oss/README.OSS
@@ -1346,7 +1346,7 @@ implement nice real-time signal processing audio effect software and
1346network telephones. The ACI mixer has to be switched into the "solo" 1346network telephones. The ACI mixer has to be switched into the "solo"
1347mode for duplex operation in order to avoid feedback caused by the 1347mode for duplex operation in order to avoid feedback caused by the
1348mixer (input hears output signal). You can de-/activate this mode 1348mixer (input hears output signal). You can de-/activate this mode
1349through toggleing the record button for the wave controller with an 1349through toggling the record button for the wave controller with an
1350OSS-mixer. 1350OSS-mixer.
1351 1351
1352The PCM20 contains a radio tuner, which is also controlled by 1352The PCM20 contains a radio tuner, which is also controlled by
diff --git a/Documentation/sound/oss/btaudio b/Documentation/sound/oss/btaudio
index 1a693e69d44b..effdb9a3f898 100644
--- a/Documentation/sound/oss/btaudio
+++ b/Documentation/sound/oss/btaudio
@@ -29,7 +29,7 @@ Driver Status
29 29
30Still somewhat experimental. The driver should work stable, i.e. it 30Still somewhat experimental. The driver should work stable, i.e. it
31should'nt crash your box. It might not work as expected, have bugs, 31should'nt crash your box. It might not work as expected, have bugs,
32not being fully OSS API compilant, ... 32not being fully OSS API compliant, ...
33 33
34Latest versions are available from http://bytesex.org/bttv/, the 34Latest versions are available from http://bytesex.org/bttv/, the
35driver is in the bttv tarball. Kernel patches might be available too, 35driver is in the bttv tarball. Kernel patches might be available too,
diff --git a/Documentation/stable_kernel_rules.txt b/Documentation/stable_kernel_rules.txt
index 58d0ac4df946..3049a612291b 100644
--- a/Documentation/stable_kernel_rules.txt
+++ b/Documentation/stable_kernel_rules.txt
@@ -59,11 +59,20 @@ For all other submissions, choose one of the following procedures:
59 changelog of your submission, as well as the kernel version you wish 59 changelog of your submission, as well as the kernel version you wish
60 it to be applied to. 60 it to be applied to.
61 61
62Option 1 is probably the easiest and most common. Options 2 and 3 are more 62Option 1 is *strongly* preferred, is the easiest and most common. Options 2 and
63useful if the patch isn't deemed worthy at the time it is applied to a public 633 are more useful if the patch isn't deemed worthy at the time it is applied to
64git tree (for instance, because it deserves more regression testing first). 64a public git tree (for instance, because it deserves more regression testing
65Option 3 is especially useful if the patch needs some special handling to apply 65first). Option 3 is especially useful if the patch needs some special handling
66to an older kernel (e.g., if API's have changed in the meantime). 66to apply to an older kernel (e.g., if API's have changed in the meantime).
67
68Note that for Option 3, if the patch deviates from the original upstream patch
69(for example because it had to be backported) this must be very clearly
70documented and justified in the patch description.
71
72The upstream commit ID must be specified with a separate line above the commit
73text, like this:
74
75 commit <sha1> upstream.
67 76
68Additionally, some patches submitted via Option 1 may have additional patch 77Additionally, some patches submitted via Option 1 may have additional patch
69prerequisites which can be cherry-picked. This can be specified in the following 78prerequisites which can be cherry-picked. This can be specified in the following
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index c831001c45f1..6fccb69c03e7 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -197,8 +197,8 @@ core_pattern is used to specify a core dumpfile pattern name.
197 %P global pid (init PID namespace) 197 %P global pid (init PID namespace)
198 %i tid 198 %i tid
199 %I global tid (init PID namespace) 199 %I global tid (init PID namespace)
200 %u uid 200 %u uid (in initial user namespace)
201 %g gid 201 %g gid (in initial user namespace)
202 %d dump mode, matches PR_SET_DUMPABLE and 202 %d dump mode, matches PR_SET_DUMPABLE and
203 /proc/sys/fs/suid_dumpable 203 /proc/sys/fs/suid_dumpable
204 %s signal number 204 %s signal number
@@ -923,6 +923,27 @@ and nmi_watchdog.
923 923
924============================================================== 924==============================================================
925 925
926watchdog_cpumask:
927
928This value can be used to control on which cpus the watchdog may run.
929The default cpumask is all possible cores, but if NO_HZ_FULL is
930enabled in the kernel config, and cores are specified with the
931nohz_full= boot argument, those cores are excluded by default.
932Offline cores can be included in this mask, and if the core is later
933brought online, the watchdog will be started based on the mask value.
934
935Typically this value would only be touched in the nohz_full case
936to re-enable cores that by default were not running the watchdog,
937if a kernel lockup was suspected on those cores.
938
939The argument value is the standard cpulist format for cpumasks,
940so for example to enable the watchdog on cores 0, 2, 3, and 4 you
941might say:
942
943 echo 0,2-4 > /proc/sys/kernel/watchdog_cpumask
944
945==============================================================
946
926watchdog_thresh: 947watchdog_thresh:
927 948
928This value can be used to control the frequency of hrtimer and NMI 949This value can be used to control the frequency of hrtimer and NMI
diff --git a/Documentation/target/tcm_mod_builder.py b/Documentation/target/tcm_mod_builder.py
index 2ba71cea0172..949de191fcdc 100755
--- a/Documentation/target/tcm_mod_builder.py
+++ b/Documentation/target/tcm_mod_builder.py
@@ -50,15 +50,6 @@ def tcm_mod_build_FC_include(fabric_mod_dir_var, fabric_mod_name):
50 buf = "#define " + fabric_mod_name.upper() + "_VERSION \"v0.1\"\n" 50 buf = "#define " + fabric_mod_name.upper() + "_VERSION \"v0.1\"\n"
51 buf += "#define " + fabric_mod_name.upper() + "_NAMELEN 32\n" 51 buf += "#define " + fabric_mod_name.upper() + "_NAMELEN 32\n"
52 buf += "\n" 52 buf += "\n"
53 buf += "struct " + fabric_mod_name + "_nacl {\n"
54 buf += " /* Binary World Wide unique Port Name for FC Initiator Nport */\n"
55 buf += " u64 nport_wwpn;\n"
56 buf += " /* ASCII formatted WWPN for FC Initiator Nport */\n"
57 buf += " char nport_name[" + fabric_mod_name.upper() + "_NAMELEN];\n"
58 buf += " /* Returned by " + fabric_mod_name + "_make_nodeacl() */\n"
59 buf += " struct se_node_acl se_node_acl;\n"
60 buf += "};\n"
61 buf += "\n"
62 buf += "struct " + fabric_mod_name + "_tpg {\n" 53 buf += "struct " + fabric_mod_name + "_tpg {\n"
63 buf += " /* FC lport target portal group tag for TCM */\n" 54 buf += " /* FC lport target portal group tag for TCM */\n"
64 buf += " u16 lport_tpgt;\n" 55 buf += " u16 lport_tpgt;\n"
@@ -69,8 +60,6 @@ def tcm_mod_build_FC_include(fabric_mod_dir_var, fabric_mod_name):
69 buf += "};\n" 60 buf += "};\n"
70 buf += "\n" 61 buf += "\n"
71 buf += "struct " + fabric_mod_name + "_lport {\n" 62 buf += "struct " + fabric_mod_name + "_lport {\n"
72 buf += " /* SCSI protocol the lport is providing */\n"
73 buf += " u8 lport_proto_id;\n"
74 buf += " /* Binary World Wide unique Port Name for FC Target Lport */\n" 63 buf += " /* Binary World Wide unique Port Name for FC Target Lport */\n"
75 buf += " u64 lport_wwpn;\n" 64 buf += " u64 lport_wwpn;\n"
76 buf += " /* ASCII formatted WWPN for FC Target Lport */\n" 65 buf += " /* ASCII formatted WWPN for FC Target Lport */\n"
@@ -105,14 +94,6 @@ def tcm_mod_build_SAS_include(fabric_mod_dir_var, fabric_mod_name):
105 buf = "#define " + fabric_mod_name.upper() + "_VERSION \"v0.1\"\n" 94 buf = "#define " + fabric_mod_name.upper() + "_VERSION \"v0.1\"\n"
106 buf += "#define " + fabric_mod_name.upper() + "_NAMELEN 32\n" 95 buf += "#define " + fabric_mod_name.upper() + "_NAMELEN 32\n"
107 buf += "\n" 96 buf += "\n"
108 buf += "struct " + fabric_mod_name + "_nacl {\n"
109 buf += " /* Binary World Wide unique Port Name for SAS Initiator port */\n"
110 buf += " u64 iport_wwpn;\n"
111 buf += " /* ASCII formatted WWPN for Sas Initiator port */\n"
112 buf += " char iport_name[" + fabric_mod_name.upper() + "_NAMELEN];\n"
113 buf += " /* Returned by " + fabric_mod_name + "_make_nodeacl() */\n"
114 buf += " struct se_node_acl se_node_acl;\n"
115 buf += "};\n\n"
116 buf += "struct " + fabric_mod_name + "_tpg {\n" 97 buf += "struct " + fabric_mod_name + "_tpg {\n"
117 buf += " /* SAS port target portal group tag for TCM */\n" 98 buf += " /* SAS port target portal group tag for TCM */\n"
118 buf += " u16 tport_tpgt;\n" 99 buf += " u16 tport_tpgt;\n"
@@ -122,8 +103,6 @@ def tcm_mod_build_SAS_include(fabric_mod_dir_var, fabric_mod_name):
122 buf += " struct se_portal_group se_tpg;\n" 103 buf += " struct se_portal_group se_tpg;\n"
123 buf += "};\n\n" 104 buf += "};\n\n"
124 buf += "struct " + fabric_mod_name + "_tport {\n" 105 buf += "struct " + fabric_mod_name + "_tport {\n"
125 buf += " /* SCSI protocol the tport is providing */\n"
126 buf += " u8 tport_proto_id;\n"
127 buf += " /* Binary World Wide unique Port Name for SAS Target port */\n" 106 buf += " /* Binary World Wide unique Port Name for SAS Target port */\n"
128 buf += " u64 tport_wwpn;\n" 107 buf += " u64 tport_wwpn;\n"
129 buf += " /* ASCII formatted WWPN for SAS Target port */\n" 108 buf += " /* ASCII formatted WWPN for SAS Target port */\n"
@@ -158,12 +137,6 @@ def tcm_mod_build_iSCSI_include(fabric_mod_dir_var, fabric_mod_name):
158 buf = "#define " + fabric_mod_name.upper() + "_VERSION \"v0.1\"\n" 137 buf = "#define " + fabric_mod_name.upper() + "_VERSION \"v0.1\"\n"
159 buf += "#define " + fabric_mod_name.upper() + "_NAMELEN 32\n" 138 buf += "#define " + fabric_mod_name.upper() + "_NAMELEN 32\n"
160 buf += "\n" 139 buf += "\n"
161 buf += "struct " + fabric_mod_name + "_nacl {\n"
162 buf += " /* ASCII formatted InitiatorName */\n"
163 buf += " char iport_name[" + fabric_mod_name.upper() + "_NAMELEN];\n"
164 buf += " /* Returned by " + fabric_mod_name + "_make_nodeacl() */\n"
165 buf += " struct se_node_acl se_node_acl;\n"
166 buf += "};\n\n"
167 buf += "struct " + fabric_mod_name + "_tpg {\n" 140 buf += "struct " + fabric_mod_name + "_tpg {\n"
168 buf += " /* iSCSI target portal group tag for TCM */\n" 141 buf += " /* iSCSI target portal group tag for TCM */\n"
169 buf += " u16 tport_tpgt;\n" 142 buf += " u16 tport_tpgt;\n"
@@ -173,8 +146,6 @@ def tcm_mod_build_iSCSI_include(fabric_mod_dir_var, fabric_mod_name):
173 buf += " struct se_portal_group se_tpg;\n" 146 buf += " struct se_portal_group se_tpg;\n"
174 buf += "};\n\n" 147 buf += "};\n\n"
175 buf += "struct " + fabric_mod_name + "_tport {\n" 148 buf += "struct " + fabric_mod_name + "_tport {\n"
176 buf += " /* SCSI protocol the tport is providing */\n"
177 buf += " u8 tport_proto_id;\n"
178 buf += " /* ASCII formatted TargetName for IQN */\n" 149 buf += " /* ASCII formatted TargetName for IQN */\n"
179 buf += " char tport_name[" + fabric_mod_name.upper() + "_NAMELEN];\n" 150 buf += " char tport_name[" + fabric_mod_name.upper() + "_NAMELEN];\n"
180 buf += " /* Returned by " + fabric_mod_name + "_make_tport() */\n" 151 buf += " /* Returned by " + fabric_mod_name + "_make_tport() */\n"
@@ -232,61 +203,12 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
232 buf += "#include <target/target_core_base.h>\n" 203 buf += "#include <target/target_core_base.h>\n"
233 buf += "#include <target/target_core_fabric.h>\n" 204 buf += "#include <target/target_core_fabric.h>\n"
234 buf += "#include <target/target_core_fabric_configfs.h>\n" 205 buf += "#include <target/target_core_fabric_configfs.h>\n"
235 buf += "#include <target/target_core_configfs.h>\n"
236 buf += "#include <target/configfs_macros.h>\n\n" 206 buf += "#include <target/configfs_macros.h>\n\n"
237 buf += "#include \"" + fabric_mod_name + "_base.h\"\n" 207 buf += "#include \"" + fabric_mod_name + "_base.h\"\n"
238 buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n" 208 buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n"
239 209
240 buf += "static const struct target_core_fabric_ops " + fabric_mod_name + "_ops;\n\n" 210 buf += "static const struct target_core_fabric_ops " + fabric_mod_name + "_ops;\n\n"
241 211
242 buf += "static struct se_node_acl *" + fabric_mod_name + "_make_nodeacl(\n"
243 buf += " struct se_portal_group *se_tpg,\n"
244 buf += " struct config_group *group,\n"
245 buf += " const char *name)\n"
246 buf += "{\n"
247 buf += " struct se_node_acl *se_nacl, *se_nacl_new;\n"
248 buf += " struct " + fabric_mod_name + "_nacl *nacl;\n"
249
250 if proto_ident == "FC" or proto_ident == "SAS":
251 buf += " u64 wwpn = 0;\n"
252
253 buf += " u32 nexus_depth;\n\n"
254 buf += " /* " + fabric_mod_name + "_parse_wwn(name, &wwpn, 1) < 0)\n"
255 buf += " return ERR_PTR(-EINVAL); */\n"
256 buf += " se_nacl_new = " + fabric_mod_name + "_alloc_fabric_acl(se_tpg);\n"
257 buf += " if (!se_nacl_new)\n"
258 buf += " return ERR_PTR(-ENOMEM);\n"
259 buf += "//#warning FIXME: Hardcoded nexus depth in " + fabric_mod_name + "_make_nodeacl()\n"
260 buf += " nexus_depth = 1;\n"
261 buf += " /*\n"
262 buf += " * se_nacl_new may be released by core_tpg_add_initiator_node_acl()\n"
263 buf += " * when converting a NodeACL from demo mode -> explict\n"
264 buf += " */\n"
265 buf += " se_nacl = core_tpg_add_initiator_node_acl(se_tpg, se_nacl_new,\n"
266 buf += " name, nexus_depth);\n"
267 buf += " if (IS_ERR(se_nacl)) {\n"
268 buf += " " + fabric_mod_name + "_release_fabric_acl(se_tpg, se_nacl_new);\n"
269 buf += " return se_nacl;\n"
270 buf += " }\n"
271 buf += " /*\n"
272 buf += " * Locate our struct " + fabric_mod_name + "_nacl and set the FC Nport WWPN\n"
273 buf += " */\n"
274 buf += " nacl = container_of(se_nacl, struct " + fabric_mod_name + "_nacl, se_node_acl);\n"
275
276 if proto_ident == "FC" or proto_ident == "SAS":
277 buf += " nacl->" + fabric_mod_init_port + "_wwpn = wwpn;\n"
278
279 buf += " /* " + fabric_mod_name + "_format_wwn(&nacl->" + fabric_mod_init_port + "_name[0], " + fabric_mod_name.upper() + "_NAMELEN, wwpn); */\n\n"
280 buf += " return se_nacl;\n"
281 buf += "}\n\n"
282 buf += "static void " + fabric_mod_name + "_drop_nodeacl(struct se_node_acl *se_acl)\n"
283 buf += "{\n"
284 buf += " struct " + fabric_mod_name + "_nacl *nacl = container_of(se_acl,\n"
285 buf += " struct " + fabric_mod_name + "_nacl, se_node_acl);\n"
286 buf += " core_tpg_del_initiator_node_acl(se_acl->se_tpg, se_acl, 1);\n"
287 buf += " kfree(nacl);\n"
288 buf += "}\n\n"
289
290 buf += "static struct se_portal_group *" + fabric_mod_name + "_make_tpg(\n" 212 buf += "static struct se_portal_group *" + fabric_mod_name + "_make_tpg(\n"
291 buf += " struct se_wwn *wwn,\n" 213 buf += " struct se_wwn *wwn,\n"
292 buf += " struct config_group *group,\n" 214 buf += " struct config_group *group,\n"
@@ -309,8 +231,7 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
309 buf += " tpg->" + fabric_mod_port + " = " + fabric_mod_port + ";\n" 231 buf += " tpg->" + fabric_mod_port + " = " + fabric_mod_port + ";\n"
310 buf += " tpg->" + fabric_mod_port + "_tpgt = tpgt;\n\n" 232 buf += " tpg->" + fabric_mod_port + "_tpgt = tpgt;\n\n"
311 buf += " ret = core_tpg_register(&" + fabric_mod_name + "_ops, wwn,\n" 233 buf += " ret = core_tpg_register(&" + fabric_mod_name + "_ops, wwn,\n"
312 buf += " &tpg->se_tpg, tpg,\n" 234 buf += " &tpg->se_tpg, SCSI_PROTOCOL_SAS);\n"
313 buf += " TRANSPORT_TPG_TYPE_NORMAL);\n"
314 buf += " if (ret < 0) {\n" 235 buf += " if (ret < 0) {\n"
315 buf += " kfree(tpg);\n" 236 buf += " kfree(tpg);\n"
316 buf += " return NULL;\n" 237 buf += " return NULL;\n"
@@ -372,21 +293,13 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
372 buf += "static const struct target_core_fabric_ops " + fabric_mod_name + "_ops = {\n" 293 buf += "static const struct target_core_fabric_ops " + fabric_mod_name + "_ops = {\n"
373 buf += " .module = THIS_MODULE,\n" 294 buf += " .module = THIS_MODULE,\n"
374 buf += " .name = " + fabric_mod_name + ",\n" 295 buf += " .name = " + fabric_mod_name + ",\n"
375 buf += " .get_fabric_proto_ident = " + fabric_mod_name + "_get_fabric_proto_ident,\n"
376 buf += " .get_fabric_name = " + fabric_mod_name + "_get_fabric_name,\n" 296 buf += " .get_fabric_name = " + fabric_mod_name + "_get_fabric_name,\n"
377 buf += " .get_fabric_proto_ident = " + fabric_mod_name + "_get_fabric_proto_ident,\n"
378 buf += " .tpg_get_wwn = " + fabric_mod_name + "_get_fabric_wwn,\n" 297 buf += " .tpg_get_wwn = " + fabric_mod_name + "_get_fabric_wwn,\n"
379 buf += " .tpg_get_tag = " + fabric_mod_name + "_get_tag,\n" 298 buf += " .tpg_get_tag = " + fabric_mod_name + "_get_tag,\n"
380 buf += " .tpg_get_default_depth = " + fabric_mod_name + "_get_default_depth,\n"
381 buf += " .tpg_get_pr_transport_id = " + fabric_mod_name + "_get_pr_transport_id,\n"
382 buf += " .tpg_get_pr_transport_id_len = " + fabric_mod_name + "_get_pr_transport_id_len,\n"
383 buf += " .tpg_parse_pr_out_transport_id = " + fabric_mod_name + "_parse_pr_out_transport_id,\n"
384 buf += " .tpg_check_demo_mode = " + fabric_mod_name + "_check_false,\n" 299 buf += " .tpg_check_demo_mode = " + fabric_mod_name + "_check_false,\n"
385 buf += " .tpg_check_demo_mode_cache = " + fabric_mod_name + "_check_true,\n" 300 buf += " .tpg_check_demo_mode_cache = " + fabric_mod_name + "_check_true,\n"
386 buf += " .tpg_check_demo_mode_write_protect = " + fabric_mod_name + "_check_true,\n" 301 buf += " .tpg_check_demo_mode_write_protect = " + fabric_mod_name + "_check_true,\n"
387 buf += " .tpg_check_prod_mode_write_protect = " + fabric_mod_name + "_check_false,\n" 302 buf += " .tpg_check_prod_mode_write_protect = " + fabric_mod_name + "_check_false,\n"
388 buf += " .tpg_alloc_fabric_acl = " + fabric_mod_name + "_alloc_fabric_acl,\n"
389 buf += " .tpg_release_fabric_acl = " + fabric_mod_name + "_release_fabric_acl,\n"
390 buf += " .tpg_get_inst_index = " + fabric_mod_name + "_tpg_get_inst_index,\n" 303 buf += " .tpg_get_inst_index = " + fabric_mod_name + "_tpg_get_inst_index,\n"
391 buf += " .release_cmd = " + fabric_mod_name + "_release_cmd,\n" 304 buf += " .release_cmd = " + fabric_mod_name + "_release_cmd,\n"
392 buf += " .shutdown_session = " + fabric_mod_name + "_shutdown_session,\n" 305 buf += " .shutdown_session = " + fabric_mod_name + "_shutdown_session,\n"
@@ -396,7 +309,6 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
396 buf += " .write_pending = " + fabric_mod_name + "_write_pending,\n" 309 buf += " .write_pending = " + fabric_mod_name + "_write_pending,\n"
397 buf += " .write_pending_status = " + fabric_mod_name + "_write_pending_status,\n" 310 buf += " .write_pending_status = " + fabric_mod_name + "_write_pending_status,\n"
398 buf += " .set_default_node_attributes = " + fabric_mod_name + "_set_default_node_attrs,\n" 311 buf += " .set_default_node_attributes = " + fabric_mod_name + "_set_default_node_attrs,\n"
399 buf += " .get_task_tag = " + fabric_mod_name + "_get_task_tag,\n"
400 buf += " .get_cmd_state = " + fabric_mod_name + "_get_cmd_state,\n" 312 buf += " .get_cmd_state = " + fabric_mod_name + "_get_cmd_state,\n"
401 buf += " .queue_data_in = " + fabric_mod_name + "_queue_data_in,\n" 313 buf += " .queue_data_in = " + fabric_mod_name + "_queue_data_in,\n"
402 buf += " .queue_status = " + fabric_mod_name + "_queue_status,\n" 314 buf += " .queue_status = " + fabric_mod_name + "_queue_status,\n"
@@ -409,12 +321,6 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
409 buf += " .fabric_drop_wwn = " + fabric_mod_name + "_drop_" + fabric_mod_port + ",\n" 321 buf += " .fabric_drop_wwn = " + fabric_mod_name + "_drop_" + fabric_mod_port + ",\n"
410 buf += " .fabric_make_tpg = " + fabric_mod_name + "_make_tpg,\n" 322 buf += " .fabric_make_tpg = " + fabric_mod_name + "_make_tpg,\n"
411 buf += " .fabric_drop_tpg = " + fabric_mod_name + "_drop_tpg,\n" 323 buf += " .fabric_drop_tpg = " + fabric_mod_name + "_drop_tpg,\n"
412 buf += " .fabric_post_link = NULL,\n"
413 buf += " .fabric_pre_unlink = NULL,\n"
414 buf += " .fabric_make_np = NULL,\n"
415 buf += " .fabric_drop_np = NULL,\n"
416 buf += " .fabric_make_nodeacl = " + fabric_mod_name + "_make_nodeacl,\n"
417 buf += " .fabric_drop_nodeacl = " + fabric_mod_name + "_drop_nodeacl,\n"
418 buf += "\n" 324 buf += "\n"
419 buf += " .tfc_wwn_attrs = " + fabric_mod_name + "_wwn_attrs;\n" 325 buf += " .tfc_wwn_attrs = " + fabric_mod_name + "_wwn_attrs;\n"
420 buf += "};\n\n" 326 buf += "};\n\n"
@@ -503,14 +409,10 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
503 buf += "#include <linux/string.h>\n" 409 buf += "#include <linux/string.h>\n"
504 buf += "#include <linux/ctype.h>\n" 410 buf += "#include <linux/ctype.h>\n"
505 buf += "#include <asm/unaligned.h>\n" 411 buf += "#include <asm/unaligned.h>\n"
506 buf += "#include <scsi/scsi.h>\n" 412 buf += "#include <scsi/scsi_common.h>\n"
507 buf += "#include <scsi/scsi_host.h>\n" 413 buf += "#include <scsi/scsi_proto.h>\n"
508 buf += "#include <scsi/scsi_device.h>\n"
509 buf += "#include <scsi/scsi_cmnd.h>\n"
510 buf += "#include <scsi/libfc.h>\n\n"
511 buf += "#include <target/target_core_base.h>\n" 414 buf += "#include <target/target_core_base.h>\n"
512 buf += "#include <target/target_core_fabric.h>\n" 415 buf += "#include <target/target_core_fabric.h>\n"
513 buf += "#include <target/target_core_configfs.h>\n\n"
514 buf += "#include \"" + fabric_mod_name + "_base.h\"\n" 416 buf += "#include \"" + fabric_mod_name + "_base.h\"\n"
515 buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n" 417 buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n"
516 418
@@ -542,35 +444,6 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
542 bufi += "char *" + fabric_mod_name + "_get_fabric_name(void);\n" 444 bufi += "char *" + fabric_mod_name + "_get_fabric_name(void);\n"
543 continue 445 continue
544 446
545 if re.search('get_fabric_proto_ident', fo):
546 buf += "u8 " + fabric_mod_name + "_get_fabric_proto_ident(struct se_portal_group *se_tpg)\n"
547 buf += "{\n"
548 buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
549 buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n"
550 buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + " *" + fabric_mod_port + " = tpg->" + fabric_mod_port + ";\n"
551 buf += " u8 proto_id;\n\n"
552 buf += " switch (" + fabric_mod_port + "->" + fabric_mod_port + "_proto_id) {\n"
553 if proto_ident == "FC":
554 buf += " case SCSI_PROTOCOL_FCP:\n"
555 buf += " default:\n"
556 buf += " proto_id = fc_get_fabric_proto_ident(se_tpg);\n"
557 buf += " break;\n"
558 elif proto_ident == "SAS":
559 buf += " case SCSI_PROTOCOL_SAS:\n"
560 buf += " default:\n"
561 buf += " proto_id = sas_get_fabric_proto_ident(se_tpg);\n"
562 buf += " break;\n"
563 elif proto_ident == "iSCSI":
564 buf += " case SCSI_PROTOCOL_ISCSI:\n"
565 buf += " default:\n"
566 buf += " proto_id = iscsi_get_fabric_proto_ident(se_tpg);\n"
567 buf += " break;\n"
568
569 buf += " }\n\n"
570 buf += " return proto_id;\n"
571 buf += "}\n\n"
572 bufi += "u8 " + fabric_mod_name + "_get_fabric_proto_ident(struct se_portal_group *);\n"
573
574 if re.search('get_wwn', fo): 447 if re.search('get_wwn', fo):
575 buf += "char *" + fabric_mod_name + "_get_fabric_wwn(struct se_portal_group *se_tpg)\n" 448 buf += "char *" + fabric_mod_name + "_get_fabric_wwn(struct se_portal_group *se_tpg)\n"
576 buf += "{\n" 449 buf += "{\n"
@@ -590,150 +463,6 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
590 buf += "}\n\n" 463 buf += "}\n\n"
591 bufi += "u16 " + fabric_mod_name + "_get_tag(struct se_portal_group *);\n" 464 bufi += "u16 " + fabric_mod_name + "_get_tag(struct se_portal_group *);\n"
592 465
593 if re.search('get_default_depth', fo):
594 buf += "u32 " + fabric_mod_name + "_get_default_depth(struct se_portal_group *se_tpg)\n"
595 buf += "{\n"
596 buf += " return 1;\n"
597 buf += "}\n\n"
598 bufi += "u32 " + fabric_mod_name + "_get_default_depth(struct se_portal_group *);\n"
599
600 if re.search('get_pr_transport_id\)\(', fo):
601 buf += "u32 " + fabric_mod_name + "_get_pr_transport_id(\n"
602 buf += " struct se_portal_group *se_tpg,\n"
603 buf += " struct se_node_acl *se_nacl,\n"
604 buf += " struct t10_pr_registration *pr_reg,\n"
605 buf += " int *format_code,\n"
606 buf += " unsigned char *buf)\n"
607 buf += "{\n"
608 buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
609 buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n"
610 buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + " *" + fabric_mod_port + " = tpg->" + fabric_mod_port + ";\n"
611 buf += " int ret = 0;\n\n"
612 buf += " switch (" + fabric_mod_port + "->" + fabric_mod_port + "_proto_id) {\n"
613 if proto_ident == "FC":
614 buf += " case SCSI_PROTOCOL_FCP:\n"
615 buf += " default:\n"
616 buf += " ret = fc_get_pr_transport_id(se_tpg, se_nacl, pr_reg,\n"
617 buf += " format_code, buf);\n"
618 buf += " break;\n"
619 elif proto_ident == "SAS":
620 buf += " case SCSI_PROTOCOL_SAS:\n"
621 buf += " default:\n"
622 buf += " ret = sas_get_pr_transport_id(se_tpg, se_nacl, pr_reg,\n"
623 buf += " format_code, buf);\n"
624 buf += " break;\n"
625 elif proto_ident == "iSCSI":
626 buf += " case SCSI_PROTOCOL_ISCSI:\n"
627 buf += " default:\n"
628 buf += " ret = iscsi_get_pr_transport_id(se_tpg, se_nacl, pr_reg,\n"
629 buf += " format_code, buf);\n"
630 buf += " break;\n"
631
632 buf += " }\n\n"
633 buf += " return ret;\n"
634 buf += "}\n\n"
635 bufi += "u32 " + fabric_mod_name + "_get_pr_transport_id(struct se_portal_group *,\n"
636 bufi += " struct se_node_acl *, struct t10_pr_registration *,\n"
637 bufi += " int *, unsigned char *);\n"
638
639 if re.search('get_pr_transport_id_len\)\(', fo):
640 buf += "u32 " + fabric_mod_name + "_get_pr_transport_id_len(\n"
641 buf += " struct se_portal_group *se_tpg,\n"
642 buf += " struct se_node_acl *se_nacl,\n"
643 buf += " struct t10_pr_registration *pr_reg,\n"
644 buf += " int *format_code)\n"
645 buf += "{\n"
646 buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
647 buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n"
648 buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + " *" + fabric_mod_port + " = tpg->" + fabric_mod_port + ";\n"
649 buf += " int ret = 0;\n\n"
650 buf += " switch (" + fabric_mod_port + "->" + fabric_mod_port + "_proto_id) {\n"
651 if proto_ident == "FC":
652 buf += " case SCSI_PROTOCOL_FCP:\n"
653 buf += " default:\n"
654 buf += " ret = fc_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg,\n"
655 buf += " format_code);\n"
656 buf += " break;\n"
657 elif proto_ident == "SAS":
658 buf += " case SCSI_PROTOCOL_SAS:\n"
659 buf += " default:\n"
660 buf += " ret = sas_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg,\n"
661 buf += " format_code);\n"
662 buf += " break;\n"
663 elif proto_ident == "iSCSI":
664 buf += " case SCSI_PROTOCOL_ISCSI:\n"
665 buf += " default:\n"
666 buf += " ret = iscsi_get_pr_transport_id_len(se_tpg, se_nacl, pr_reg,\n"
667 buf += " format_code);\n"
668 buf += " break;\n"
669
670
671 buf += " }\n\n"
672 buf += " return ret;\n"
673 buf += "}\n\n"
674 bufi += "u32 " + fabric_mod_name + "_get_pr_transport_id_len(struct se_portal_group *,\n"
675 bufi += " struct se_node_acl *, struct t10_pr_registration *,\n"
676 bufi += " int *);\n"
677
678 if re.search('parse_pr_out_transport_id\)\(', fo):
679 buf += "char *" + fabric_mod_name + "_parse_pr_out_transport_id(\n"
680 buf += " struct se_portal_group *se_tpg,\n"
681 buf += " const char *buf,\n"
682 buf += " u32 *out_tid_len,\n"
683 buf += " char **port_nexus_ptr)\n"
684 buf += "{\n"
685 buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n"
686 buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n"
687 buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + " *" + fabric_mod_port + " = tpg->" + fabric_mod_port + ";\n"
688 buf += " char *tid = NULL;\n\n"
689 buf += " switch (" + fabric_mod_port + "->" + fabric_mod_port + "_proto_id) {\n"
690 if proto_ident == "FC":
691 buf += " case SCSI_PROTOCOL_FCP:\n"
692 buf += " default:\n"
693 buf += " tid = fc_parse_pr_out_transport_id(se_tpg, buf, out_tid_len,\n"
694 buf += " port_nexus_ptr);\n"
695 elif proto_ident == "SAS":
696 buf += " case SCSI_PROTOCOL_SAS:\n"
697 buf += " default:\n"
698 buf += " tid = sas_parse_pr_out_transport_id(se_tpg, buf, out_tid_len,\n"
699 buf += " port_nexus_ptr);\n"
700 elif proto_ident == "iSCSI":
701 buf += " case SCSI_PROTOCOL_ISCSI:\n"
702 buf += " default:\n"
703 buf += " tid = iscsi_parse_pr_out_transport_id(se_tpg, buf, out_tid_len,\n"
704 buf += " port_nexus_ptr);\n"
705
706 buf += " }\n\n"
707 buf += " return tid;\n"
708 buf += "}\n\n"
709 bufi += "char *" + fabric_mod_name + "_parse_pr_out_transport_id(struct se_portal_group *,\n"
710 bufi += " const char *, u32 *, char **);\n"
711
712 if re.search('alloc_fabric_acl\)\(', fo):
713 buf += "struct se_node_acl *" + fabric_mod_name + "_alloc_fabric_acl(struct se_portal_group *se_tpg)\n"
714 buf += "{\n"
715 buf += " struct " + fabric_mod_name + "_nacl *nacl;\n\n"
716 buf += " nacl = kzalloc(sizeof(struct " + fabric_mod_name + "_nacl), GFP_KERNEL);\n"
717 buf += " if (!nacl) {\n"
718 buf += " printk(KERN_ERR \"Unable to allocate struct " + fabric_mod_name + "_nacl\\n\");\n"
719 buf += " return NULL;\n"
720 buf += " }\n\n"
721 buf += " return &nacl->se_node_acl;\n"
722 buf += "}\n\n"
723 bufi += "struct se_node_acl *" + fabric_mod_name + "_alloc_fabric_acl(struct se_portal_group *);\n"
724
725 if re.search('release_fabric_acl\)\(', fo):
726 buf += "void " + fabric_mod_name + "_release_fabric_acl(\n"
727 buf += " struct se_portal_group *se_tpg,\n"
728 buf += " struct se_node_acl *se_nacl)\n"
729 buf += "{\n"
730 buf += " struct " + fabric_mod_name + "_nacl *nacl = container_of(se_nacl,\n"
731 buf += " struct " + fabric_mod_name + "_nacl, se_node_acl);\n"
732 buf += " kfree(nacl);\n"
733 buf += "}\n\n"
734 bufi += "void " + fabric_mod_name + "_release_fabric_acl(struct se_portal_group *,\n"
735 bufi += " struct se_node_acl *);\n"
736
737 if re.search('tpg_get_inst_index\)\(', fo): 466 if re.search('tpg_get_inst_index\)\(', fo):
738 buf += "u32 " + fabric_mod_name + "_tpg_get_inst_index(struct se_portal_group *se_tpg)\n" 467 buf += "u32 " + fabric_mod_name + "_tpg_get_inst_index(struct se_portal_group *se_tpg)\n"
739 buf += "{\n" 468 buf += "{\n"
@@ -790,13 +519,6 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
790 buf += "}\n\n" 519 buf += "}\n\n"
791 bufi += "void " + fabric_mod_name + "_set_default_node_attrs(struct se_node_acl *);\n" 520 bufi += "void " + fabric_mod_name + "_set_default_node_attrs(struct se_node_acl *);\n"
792 521
793 if re.search('get_task_tag\)\(', fo):
794 buf += "u32 " + fabric_mod_name + "_get_task_tag(struct se_cmd *se_cmd)\n"
795 buf += "{\n"
796 buf += " return 0;\n"
797 buf += "}\n\n"
798 bufi += "u32 " + fabric_mod_name + "_get_task_tag(struct se_cmd *);\n"
799
800 if re.search('get_cmd_state\)\(', fo): 522 if re.search('get_cmd_state\)\(', fo):
801 buf += "int " + fabric_mod_name + "_get_cmd_state(struct se_cmd *se_cmd)\n" 523 buf += "int " + fabric_mod_name + "_get_cmd_state(struct se_cmd *se_cmd)\n"
802 buf += "{\n" 524 buf += "{\n"
diff --git a/Documentation/target/tcm_mod_builder.txt b/Documentation/target/tcm_mod_builder.txt
index 84533d8e747f..ae22f7005540 100644
--- a/Documentation/target/tcm_mod_builder.txt
+++ b/Documentation/target/tcm_mod_builder.txt
@@ -13,8 +13,8 @@ fabric skeleton, by simply using:
13This script will create a new drivers/target/$TCM_NEW_MOD/, and will do the following 13This script will create a new drivers/target/$TCM_NEW_MOD/, and will do the following
14 14
15 *) Generate new API callers for drivers/target/target_core_fabric_configs.c logic 15 *) Generate new API callers for drivers/target/target_core_fabric_configs.c logic
16 ->make_nodeacl(), ->drop_nodeacl(), ->make_tpg(), ->drop_tpg() 16 ->make_tpg(), ->drop_tpg(), ->make_wwn(), ->drop_wwn(). These are created
17 ->make_wwn(), ->drop_wwn(). These are created into $TCM_NEW_MOD/$TCM_NEW_MOD_configfs.c 17 into $TCM_NEW_MOD/$TCM_NEW_MOD_configfs.c
18 *) Generate basic infrastructure for loading/unloading LKMs and TCM/ConfigFS fabric module 18 *) Generate basic infrastructure for loading/unloading LKMs and TCM/ConfigFS fabric module
19 using a skeleton struct target_core_fabric_ops API template. 19 using a skeleton struct target_core_fabric_ops API template.
20 *) Based on user defined T10 Proto_Ident for the new fabric module being built, 20 *) Based on user defined T10 Proto_Ident for the new fabric module being built,
diff --git a/Documentation/target/tcmu-design.txt b/Documentation/target/tcmu-design.txt
index 43e94ea6d2ca..bef81e42788f 100644
--- a/Documentation/target/tcmu-design.txt
+++ b/Documentation/target/tcmu-design.txt
@@ -15,8 +15,7 @@ Contents:
15 a) Discovering and configuring TCMU uio devices 15 a) Discovering and configuring TCMU uio devices
16 b) Waiting for events on the device(s) 16 b) Waiting for events on the device(s)
17 c) Managing the command ring 17 c) Managing the command ring
183) Command filtering and pass_level 183) A final note
194) A final note
20 19
21 20
22TCM Userspace Design 21TCM Userspace Design
@@ -153,7 +152,7 @@ overall shared memory region, not the entry. The data in/out buffers
153are accessible via tht req.iov[] array. iov_cnt contains the number of 152are accessible via tht req.iov[] array. iov_cnt contains the number of
154entries in iov[] needed to describe either the Data-In or Data-Out 153entries in iov[] needed to describe either the Data-In or Data-Out
155buffers. For bidirectional commands, iov_cnt specifies how many iovec 154buffers. For bidirectional commands, iov_cnt specifies how many iovec
156entries cover the Data-Out area, and iov_bidi_count specifies how many 155entries cover the Data-Out area, and iov_bidi_cnt specifies how many
157iovec entries immediately after that in iov[] cover the Data-In 156iovec entries immediately after that in iov[] cover the Data-In
158area. Just like other fields, iov.iov_base is an offset from the start 157area. Just like other fields, iov.iov_base is an offset from the start
159of the region. 158of the region.
@@ -324,7 +323,7 @@ int handle_device_events(int fd, void *map)
324 /* Process events from cmd ring until we catch up with cmd_head */ 323 /* Process events from cmd ring until we catch up with cmd_head */
325 while (ent != (void *)mb + mb->cmdr_off + mb->cmd_head) { 324 while (ent != (void *)mb + mb->cmdr_off + mb->cmd_head) {
326 325
327 if (tcmu_hdr_get_op(&ent->hdr) == TCMU_OP_CMD) { 326 if (tcmu_hdr_get_op(ent->hdr.len_op) == TCMU_OP_CMD) {
328 uint8_t *cdb = (void *)mb + ent->req.cdb_off; 327 uint8_t *cdb = (void *)mb + ent->req.cdb_off;
329 bool success = true; 328 bool success = true;
330 329
@@ -339,8 +338,12 @@ int handle_device_events(int fd, void *map)
339 ent->rsp.scsi_status = SCSI_CHECK_CONDITION; 338 ent->rsp.scsi_status = SCSI_CHECK_CONDITION;
340 } 339 }
341 } 340 }
341 else if (tcmu_hdr_get_op(ent->hdr.len_op) != TCMU_OP_PAD) {
342 /* Tell the kernel we didn't handle unknown opcodes */
343 ent->hdr.uflags |= TCMU_UFLAG_UNKNOWN_OP;
344 }
342 else { 345 else {
343 /* Do nothing for PAD entries */ 346 /* Do nothing for PAD entries except update cmd_tail */
344 } 347 }
345 348
346 /* update cmd_tail */ 349 /* update cmd_tail */
@@ -360,28 +363,6 @@ int handle_device_events(int fd, void *map)
360} 363}
361 364
362 365
363Command filtering and pass_level
364--------------------------------
365
366TCMU supports a "pass_level" option with valid values of 0 or 1. When
367the value is 0 (the default), nearly all SCSI commands received for
368the device are passed through to the handler. This allows maximum
369flexibility but increases the amount of code required by the handler,
370to support all mandatory SCSI commands. If pass_level is set to 1,
371then only IO-related commands are presented, and the rest are handled
372by LIO's in-kernel command emulation. The commands presented at level
3731 include all versions of:
374
375READ
376WRITE
377WRITE_VERIFY
378XDWRITEREAD
379WRITE_SAME
380COMPARE_AND_WRITE
381SYNCHRONIZE_CACHE
382UNMAP
383
384
385A final note 366A final note
386------------ 367------------
387 368
diff --git a/Documentation/thermal/cpu-cooling-api.txt b/Documentation/thermal/cpu-cooling-api.txt
index 753e47cc2e20..71653584cd03 100644
--- a/Documentation/thermal/cpu-cooling-api.txt
+++ b/Documentation/thermal/cpu-cooling-api.txt
@@ -36,8 +36,162 @@ the user. The registration APIs returns the cooling device pointer.
36 np: pointer to the cooling device device tree node 36 np: pointer to the cooling device device tree node
37 clip_cpus: cpumask of cpus where the frequency constraints will happen. 37 clip_cpus: cpumask of cpus where the frequency constraints will happen.
38 38
391.1.3 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) 391.1.3 struct thermal_cooling_device *cpufreq_power_cooling_register(
40 const struct cpumask *clip_cpus, u32 capacitance,
41 get_static_t plat_static_func)
42
43Similar to cpufreq_cooling_register, this function registers a cpufreq
44cooling device. Using this function, the cooling device will
45implement the power extensions by using a simple cpu power model. The
46cpus must have registered their OPPs using the OPP library.
47
48The additional parameters are needed for the power model (See 2. Power
49models). "capacitance" is the dynamic power coefficient (See 2.1
50Dynamic power). "plat_static_func" is a function to calculate the
51static power consumed by these cpus (See 2.2 Static power).
52
531.1.4 struct thermal_cooling_device *of_cpufreq_power_cooling_register(
54 struct device_node *np, const struct cpumask *clip_cpus, u32 capacitance,
55 get_static_t plat_static_func)
56
57Similar to cpufreq_power_cooling_register, this function register a
58cpufreq cooling device with power extensions using the device tree
59information supplied by the np parameter.
60
611.1.5 void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
40 62
41 This interface function unregisters the "thermal-cpufreq-%x" cooling device. 63 This interface function unregisters the "thermal-cpufreq-%x" cooling device.
42 64
43 cdev: Cooling device pointer which has to be unregistered. 65 cdev: Cooling device pointer which has to be unregistered.
66
672. Power models
68
69The power API registration functions provide a simple power model for
70CPUs. The current power is calculated as dynamic + (optionally)
71static power. This power model requires that the operating-points of
72the CPUs are registered using the kernel's opp library and the
73`cpufreq_frequency_table` is assigned to the `struct device` of the
74cpu. If you are using CONFIG_CPUFREQ_DT then the
75`cpufreq_frequency_table` should already be assigned to the cpu
76device.
77
78The `plat_static_func` parameter of `cpufreq_power_cooling_register()`
79and `of_cpufreq_power_cooling_register()` is optional. If you don't
80provide it, only dynamic power will be considered.
81
822.1 Dynamic power
83
84The dynamic power consumption of a processor depends on many factors.
85For a given processor implementation the primary factors are:
86
87- The time the processor spends running, consuming dynamic power, as
88 compared to the time in idle states where dynamic consumption is
89 negligible. Herein we refer to this as 'utilisation'.
90- The voltage and frequency levels as a result of DVFS. The DVFS
91 level is a dominant factor governing power consumption.
92- In running time the 'execution' behaviour (instruction types, memory
93 access patterns and so forth) causes, in most cases, a second order
94 variation. In pathological cases this variation can be significant,
95 but typically it is of a much lesser impact than the factors above.
96
97A high level dynamic power consumption model may then be represented as:
98
99Pdyn = f(run) * Voltage^2 * Frequency * Utilisation
100
101f(run) here represents the described execution behaviour and its
102result has a units of Watts/Hz/Volt^2 (this often expressed in
103mW/MHz/uVolt^2)
104
105The detailed behaviour for f(run) could be modelled on-line. However,
106in practice, such an on-line model has dependencies on a number of
107implementation specific processor support and characterisation
108factors. Therefore, in initial implementation that contribution is
109represented as a constant coefficient. This is a simplification
110consistent with the relative contribution to overall power variation.
111
112In this simplified representation our model becomes:
113
114Pdyn = Capacitance * Voltage^2 * Frequency * Utilisation
115
116Where `capacitance` is a constant that represents an indicative
117running time dynamic power coefficient in fundamental units of
118mW/MHz/uVolt^2. Typical values for mobile CPUs might lie in range
119from 100 to 500. For reference, the approximate values for the SoC in
120ARM's Juno Development Platform are 530 for the Cortex-A57 cluster and
121140 for the Cortex-A53 cluster.
122
123
1242.2 Static power
125
126Static leakage power consumption depends on a number of factors. For a
127given circuit implementation the primary factors are:
128
129- Time the circuit spends in each 'power state'
130- Temperature
131- Operating voltage
132- Process grade
133
134The time the circuit spends in each 'power state' for a given
135evaluation period at first order means OFF or ON. However,
136'retention' states can also be supported that reduce power during
137inactive periods without loss of context.
138
139Note: The visibility of state entries to the OS can vary, according to
140platform specifics, and this can then impact the accuracy of a model
141based on OS state information alone. It might be possible in some
142cases to extract more accurate information from system resources.
143
144The temperature, operating voltage and process 'grade' (slow to fast)
145of the circuit are all significant factors in static leakage power
146consumption. All of these have complex relationships to static power.
147
148Circuit implementation specific factors include the chosen silicon
149process as well as the type, number and size of transistors in both
150the logic gates and any RAM elements included.
151
152The static power consumption modelling must take into account the
153power managed regions that are implemented. Taking the example of an
154ARM processor cluster, the modelling would take into account whether
155each CPU can be powered OFF separately or if only a single power
156region is implemented for the complete cluster.
157
158In one view, there are others, a static power consumption model can
159then start from a set of reference values for each power managed
160region (e.g. CPU, Cluster/L2) in each state (e.g. ON, OFF) at an
161arbitrary process grade, voltage and temperature point. These values
162are then scaled for all of the following: the time in each state, the
163process grade, the current temperature and the operating voltage.
164However, since both implementation specific and complex relationships
165dominate the estimate, the appropriate interface to the model from the
166cpu cooling device is to provide a function callback that calculates
167the static power in this platform. When registering the cpu cooling
168device pass a function pointer that follows the `get_static_t`
169prototype:
170
171 int plat_get_static(cpumask_t *cpumask, int interval,
172 unsigned long voltage, u32 &power);
173
174`cpumask` is the cpumask of the cpus involved in the calculation.
175`voltage` is the voltage at which they are operating. The function
176should calculate the average static power for the last `interval`
177milliseconds. It returns 0 on success, -E* on error. If it
178succeeds, it should store the static power in `power`. Reading the
179temperature of the cpus described by `cpumask` is left for
180plat_get_static() to do as the platform knows best which thermal
181sensor is closest to the cpu.
182
183If `plat_static_func` is NULL, static power is considered to be
184negligible for this platform and only dynamic power is considered.
185
186The platform specific callback can then use any combination of tables
187and/or equations to permute the estimated value. Process grade
188information is not passed to the model since access to such data, from
189on-chip measurement capability or manufacture time data, is platform
190specific.
191
192Note: the significance of static power for CPUs in comparison to
193dynamic power is highly dependent on implementation. Given the
194potential complexity in implementation, the importance and accuracy of
195its inclusion when using cpu cooling devices should be assessed on a
196case by case basis.
197
diff --git a/Documentation/thermal/power_allocator.txt b/Documentation/thermal/power_allocator.txt
new file mode 100644
index 000000000000..c3797b529991
--- /dev/null
+++ b/Documentation/thermal/power_allocator.txt
@@ -0,0 +1,247 @@
1Power allocator governor tunables
2=================================
3
4Trip points
5-----------
6
7The governor requires the following two passive trip points:
8
91. "switch on" trip point: temperature above which the governor
10 control loop starts operating. This is the first passive trip
11 point of the thermal zone.
12
132. "desired temperature" trip point: it should be higher than the
14 "switch on" trip point. This the target temperature the governor
15 is controlling for. This is the last passive trip point of the
16 thermal zone.
17
18PID Controller
19--------------
20
21The power allocator governor implements a
22Proportional-Integral-Derivative controller (PID controller) with
23temperature as the control input and power as the controlled output:
24
25 P_max = k_p * e + k_i * err_integral + k_d * diff_err + sustainable_power
26
27where
28 e = desired_temperature - current_temperature
29 err_integral is the sum of previous errors
30 diff_err = e - previous_error
31
32It is similar to the one depicted below:
33
34 k_d
35 |
36current_temp |
37 | v
38 | +----------+ +---+
39 | +----->| diff_err |-->| X |------+
40 | | +----------+ +---+ |
41 | | | tdp actor
42 | | k_i | | get_requested_power()
43 | | | | | | |
44 | | | | | | | ...
45 v | v v v v v
46 +---+ | +-------+ +---+ +---+ +---+ +----------+
47 | S |-------+----->| sum e |----->| X |--->| S |-->| S |-->|power |
48 +---+ | +-------+ +---+ +---+ +---+ |allocation|
49 ^ | ^ +----------+
50 | | | | |
51 | | +---+ | | |
52 | +------->| X |-------------------+ v v
53 | +---+ granted performance
54desired_temperature ^
55 |
56 |
57 k_po/k_pu
58
59Sustainable power
60-----------------
61
62An estimate of the sustainable dissipatable power (in mW) should be
63provided while registering the thermal zone. This estimates the
64sustained power that can be dissipated at the desired control
65temperature. This is the maximum sustained power for allocation at
66the desired maximum temperature. The actual sustained power can vary
67for a number of reasons. The closed loop controller will take care of
68variations such as environmental conditions, and some factors related
69to the speed-grade of the silicon. `sustainable_power` is therefore
70simply an estimate, and may be tuned to affect the aggressiveness of
71the thermal ramp. For reference, the sustainable power of a 4" phone
72is typically 2000mW, while on a 10" tablet is around 4500mW (may vary
73depending on screen size).
74
75If you are using device tree, do add it as a property of the
76thermal-zone. For example:
77
78 thermal-zones {
79 soc_thermal {
80 polling-delay = <1000>;
81 polling-delay-passive = <100>;
82 sustainable-power = <2500>;
83 ...
84
85Instead, if the thermal zone is registered from the platform code, pass a
86`thermal_zone_params` that has a `sustainable_power`. If no
87`thermal_zone_params` were being passed, then something like below
88will suffice:
89
90 static const struct thermal_zone_params tz_params = {
91 .sustainable_power = 3500,
92 };
93
94and then pass `tz_params` as the 5th parameter to
95`thermal_zone_device_register()`
96
97k_po and k_pu
98-------------
99
100The implementation of the PID controller in the power allocator
101thermal governor allows the configuration of two proportional term
102constants: `k_po` and `k_pu`. `k_po` is the proportional term
103constant during temperature overshoot periods (current temperature is
104above "desired temperature" trip point). Conversely, `k_pu` is the
105proportional term constant during temperature undershoot periods
106(current temperature below "desired temperature" trip point).
107
108These controls are intended as the primary mechanism for configuring
109the permitted thermal "ramp" of the system. For instance, a lower
110`k_pu` value will provide a slower ramp, at the cost of capping
111available capacity at a low temperature. On the other hand, a high
112value of `k_pu` will result in the governor granting very high power
113whilst temperature is low, and may lead to temperature overshooting.
114
115The default value for `k_pu` is:
116
117 2 * sustainable_power / (desired_temperature - switch_on_temp)
118
119This means that at `switch_on_temp` the output of the controller's
120proportional term will be 2 * `sustainable_power`. The default value
121for `k_po` is:
122
123 sustainable_power / (desired_temperature - switch_on_temp)
124
125Focusing on the proportional and feed forward values of the PID
126controller equation we have:
127
128 P_max = k_p * e + sustainable_power
129
130The proportional term is proportional to the difference between the
131desired temperature and the current one. When the current temperature
132is the desired one, then the proportional component is zero and
133`P_max` = `sustainable_power`. That is, the system should operate in
134thermal equilibrium under constant load. `sustainable_power` is only
135an estimate, which is the reason for closed-loop control such as this.
136
137Expanding `k_pu` we get:
138 P_max = 2 * sustainable_power * (T_set - T) / (T_set - T_on) +
139 sustainable_power
140
141where
142 T_set is the desired temperature
143 T is the current temperature
144 T_on is the switch on temperature
145
146When the current temperature is the switch_on temperature, the above
147formula becomes:
148
149 P_max = 2 * sustainable_power * (T_set - T_on) / (T_set - T_on) +
150 sustainable_power = 2 * sustainable_power + sustainable_power =
151 3 * sustainable_power
152
153Therefore, the proportional term alone linearly decreases power from
1543 * `sustainable_power` to `sustainable_power` as the temperature
155rises from the switch on temperature to the desired temperature.
156
157k_i and integral_cutoff
158-----------------------
159
160`k_i` configures the PID loop's integral term constant. This term
161allows the PID controller to compensate for long term drift and for
162the quantized nature of the output control: cooling devices can't set
163the exact power that the governor requests. When the temperature
164error is below `integral_cutoff`, errors are accumulated in the
165integral term. This term is then multiplied by `k_i` and the result
166added to the output of the controller. Typically `k_i` is set low (1
167or 2) and `integral_cutoff` is 0.
168
169k_d
170---
171
172`k_d` configures the PID loop's derivative term constant. It's
173recommended to leave it as the default: 0.
174
175Cooling device power API
176========================
177
178Cooling devices controlled by this governor must supply the additional
179"power" API in their `cooling_device_ops`. It consists on three ops:
180
1811. int get_requested_power(struct thermal_cooling_device *cdev,
182 struct thermal_zone_device *tz, u32 *power);
183@cdev: The `struct thermal_cooling_device` pointer
184@tz: thermal zone in which we are currently operating
185@power: pointer in which to store the calculated power
186
187`get_requested_power()` calculates the power requested by the device
188in milliwatts and stores it in @power . It should return 0 on
189success, -E* on failure. This is currently used by the power
190allocator governor to calculate how much power to give to each cooling
191device.
192
1932. int state2power(struct thermal_cooling_device *cdev, struct
194 thermal_zone_device *tz, unsigned long state, u32 *power);
195@cdev: The `struct thermal_cooling_device` pointer
196@tz: thermal zone in which we are currently operating
197@state: A cooling device state
198@power: pointer in which to store the equivalent power
199
200Convert cooling device state @state into power consumption in
201milliwatts and store it in @power. It should return 0 on success, -E*
202on failure. This is currently used by thermal core to calculate the
203maximum power that an actor can consume.
204
2053. int power2state(struct thermal_cooling_device *cdev, u32 power,
206 unsigned long *state);
207@cdev: The `struct thermal_cooling_device` pointer
208@power: power in milliwatts
209@state: pointer in which to store the resulting state
210
211Calculate a cooling device state that would make the device consume at
212most @power mW and store it in @state. It should return 0 on success,
213-E* on failure. This is currently used by the thermal core to convert
214a given power set by the power allocator governor to a state that the
215cooling device can set. It is a function because this conversion may
216depend on external factors that may change so this function should the
217best conversion given "current circumstances".
218
219Cooling device weights
220----------------------
221
222Weights are a mechanism to bias the allocation among cooling
223devices. They express the relative power efficiency of different
224cooling devices. Higher weight can be used to express higher power
225efficiency. Weighting is relative such that if each cooling device
226has a weight of one they are considered equal. This is particularly
227useful in heterogeneous systems where two cooling devices may perform
228the same kind of compute, but with different efficiency. For example,
229a system with two different types of processors.
230
231If the thermal zone is registered using
232`thermal_zone_device_register()` (i.e., platform code), then weights
233are passed as part of the thermal zone's `thermal_bind_parameters`.
234If the platform is registered using device tree, then they are passed
235as the `contribution` property of each map in the `cooling-maps` node.
236
237Limitations of the power allocator governor
238===========================================
239
240The power allocator governor's PID controller works best if there is a
241periodic tick. If you have a driver that calls
242`thermal_zone_device_update()` (or anything that ends up calling the
243governor's `throttle()` function) repetitively, the governor response
244won't be very good. Note that this is not particular to this
245governor, step-wise will also misbehave if you call its throttle()
246faster than the normal thermal framework tick (due to interrupts for
247example) as it will overreact.
diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
index 87519cb379ee..c1f6864a8c5d 100644
--- a/Documentation/thermal/sysfs-api.txt
+++ b/Documentation/thermal/sysfs-api.txt
@@ -95,7 +95,7 @@ temperature) and throttle appropriate devices.
951.3 interface for binding a thermal zone device with a thermal cooling device 951.3 interface for binding a thermal zone device with a thermal cooling device
961.3.1 int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, 961.3.1 int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
97 int trip, struct thermal_cooling_device *cdev, 97 int trip, struct thermal_cooling_device *cdev,
98 unsigned long upper, unsigned long lower); 98 unsigned long upper, unsigned long lower, unsigned int weight);
99 99
100 This interface function bind a thermal cooling device to the certain trip 100 This interface function bind a thermal cooling device to the certain trip
101 point of a thermal zone device. 101 point of a thermal zone device.
@@ -110,6 +110,8 @@ temperature) and throttle appropriate devices.
110 lower:the Minimum cooling state can be used for this trip point. 110 lower:the Minimum cooling state can be used for this trip point.
111 THERMAL_NO_LIMIT means no lower limit, 111 THERMAL_NO_LIMIT means no lower limit,
112 and the cooling device can be in cooling state 0. 112 and the cooling device can be in cooling state 0.
113 weight: the influence of this cooling device in this thermal
114 zone. See 1.4.1 below for more information.
113 115
1141.3.2 int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz, 1161.3.2 int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz,
115 int trip, struct thermal_cooling_device *cdev); 117 int trip, struct thermal_cooling_device *cdev);
@@ -127,9 +129,15 @@ temperature) and throttle appropriate devices.
127 This structure defines the following parameters that are used to bind 129 This structure defines the following parameters that are used to bind
128 a zone with a cooling device for a particular trip point. 130 a zone with a cooling device for a particular trip point.
129 .cdev: The cooling device pointer 131 .cdev: The cooling device pointer
130 .weight: The 'influence' of a particular cooling device on this zone. 132 .weight: The 'influence' of a particular cooling device on this
131 This is on a percentage scale. The sum of all these weights 133 zone. This is relative to the rest of the cooling
132 (for a particular zone) cannot exceed 100. 134 devices. For example, if all cooling devices have a
135 weight of 1, then they all contribute the same. You can
136 use percentages if you want, but it's not mandatory. A
137 weight of 0 means that this cooling device doesn't
138 contribute to the cooling of this zone unless all cooling
139 devices have a weight of 0. If all weights are 0, then
140 they all contribute the same.
133 .trip_mask:This is a bit mask that gives the binding relation between 141 .trip_mask:This is a bit mask that gives the binding relation between
134 this thermal zone and cdev, for a particular trip point. 142 this thermal zone and cdev, for a particular trip point.
135 If nth bit is set, then the cdev and thermal zone are bound 143 If nth bit is set, then the cdev and thermal zone are bound
@@ -176,6 +184,14 @@ Thermal zone device sys I/F, created once it's registered:
176 |---trip_point_[0-*]_type: Trip point type 184 |---trip_point_[0-*]_type: Trip point type
177 |---trip_point_[0-*]_hyst: Hysteresis value for this trip point 185 |---trip_point_[0-*]_hyst: Hysteresis value for this trip point
178 |---emul_temp: Emulated temperature set node 186 |---emul_temp: Emulated temperature set node
187 |---sustainable_power: Sustainable dissipatable power
188 |---k_po: Proportional term during temperature overshoot
189 |---k_pu: Proportional term during temperature undershoot
190 |---k_i: PID's integral term in the power allocator gov
191 |---k_d: PID's derivative term in the power allocator
192 |---integral_cutoff: Offset above which errors are accumulated
193 |---slope: Slope constant applied as linear extrapolation
194 |---offset: Offset constant applied as linear extrapolation
179 195
180Thermal cooling device sys I/F, created once it's registered: 196Thermal cooling device sys I/F, created once it's registered:
181/sys/class/thermal/cooling_device[0-*]: 197/sys/class/thermal/cooling_device[0-*]:
@@ -192,6 +208,8 @@ thermal_zone_bind_cooling_device/thermal_zone_unbind_cooling_device.
192/sys/class/thermal/thermal_zone[0-*]: 208/sys/class/thermal/thermal_zone[0-*]:
193 |---cdev[0-*]: [0-*]th cooling device in current thermal zone 209 |---cdev[0-*]: [0-*]th cooling device in current thermal zone
194 |---cdev[0-*]_trip_point: Trip point that cdev[0-*] is associated with 210 |---cdev[0-*]_trip_point: Trip point that cdev[0-*] is associated with
211 |---cdev[0-*]_weight: Influence of the cooling device in
212 this thermal zone
195 213
196Besides the thermal zone device sysfs I/F and cooling device sysfs I/F, 214Besides the thermal zone device sysfs I/F and cooling device sysfs I/F,
197the generic thermal driver also creates a hwmon sysfs I/F for each _type_ 215the generic thermal driver also creates a hwmon sysfs I/F for each _type_
@@ -265,6 +283,14 @@ cdev[0-*]_trip_point
265 point. 283 point.
266 RO, Optional 284 RO, Optional
267 285
286cdev[0-*]_weight
287 The influence of cdev[0-*] in this thermal zone. This value
288 is relative to the rest of cooling devices in the thermal
289 zone. For example, if a cooling device has a weight double
290 than that of other, it's twice as effective in cooling the
291 thermal zone.
292 RW, Optional
293
268passive 294passive
269 Attribute is only present for zones in which the passive cooling 295 Attribute is only present for zones in which the passive cooling
270 policy is not supported by native thermal driver. Default is zero 296 policy is not supported by native thermal driver. Default is zero
@@ -289,6 +315,66 @@ emul_temp
289 because userland can easily disable the thermal policy by simply 315 because userland can easily disable the thermal policy by simply
290 flooding this sysfs node with low temperature values. 316 flooding this sysfs node with low temperature values.
291 317
318sustainable_power
319 An estimate of the sustained power that can be dissipated by
320 the thermal zone. Used by the power allocator governor. For
321 more information see Documentation/thermal/power_allocator.txt
322 Unit: milliwatts
323 RW, Optional
324
325k_po
326 The proportional term of the power allocator governor's PID
327 controller during temperature overshoot. Temperature overshoot
328 is when the current temperature is above the "desired
329 temperature" trip point. For more information see
330 Documentation/thermal/power_allocator.txt
331 RW, Optional
332
333k_pu
334 The proportional term of the power allocator governor's PID
335 controller during temperature undershoot. Temperature undershoot
336 is when the current temperature is below the "desired
337 temperature" trip point. For more information see
338 Documentation/thermal/power_allocator.txt
339 RW, Optional
340
341k_i
342 The integral term of the power allocator governor's PID
343 controller. This term allows the PID controller to compensate
344 for long term drift. For more information see
345 Documentation/thermal/power_allocator.txt
346 RW, Optional
347
348k_d
349 The derivative term of the power allocator governor's PID
350 controller. For more information see
351 Documentation/thermal/power_allocator.txt
352 RW, Optional
353
354integral_cutoff
355 Temperature offset from the desired temperature trip point
356 above which the integral term of the power allocator
357 governor's PID controller starts accumulating errors. For
358 example, if integral_cutoff is 0, then the integral term only
359 accumulates error when temperature is above the desired
360 temperature trip point. For more information see
361 Documentation/thermal/power_allocator.txt
362 RW, Optional
363
364slope
365 The slope constant used in a linear extrapolation model
366 to determine a hotspot temperature based off the sensor's
367 raw readings. It is up to the device driver to determine
368 the usage of these values.
369 RW, Optional
370
371offset
372 The offset constant used in a linear extrapolation model
373 to determine a hotspot temperature based off the sensor's
374 raw readings. It is up to the device driver to determine
375 the usage of these values.
376 RW, Optional
377
292***************************** 378*****************************
293* Cooling device attributes * 379* Cooling device attributes *
294***************************** 380*****************************
@@ -318,7 +404,8 @@ passive, active. If an ACPI thermal zone supports critical, passive,
318active[0] and active[1] at the same time, it may register itself as a 404active[0] and active[1] at the same time, it may register itself as a
319thermal_zone_device (thermal_zone1) with 4 trip points in all. 405thermal_zone_device (thermal_zone1) with 4 trip points in all.
320It has one processor and one fan, which are both registered as 406It has one processor and one fan, which are both registered as
321thermal_cooling_device. 407thermal_cooling_device. Both are considered to have the same
408effectiveness in cooling the thermal zone.
322 409
323If the processor is listed in _PSL method, and the fan is listed in _AL0 410If the processor is listed in _PSL method, and the fan is listed in _AL0
324method, the sys I/F structure will be built like this: 411method, the sys I/F structure will be built like this:
@@ -340,8 +427,10 @@ method, the sys I/F structure will be built like this:
340 |---trip_point_3_type: active1 427 |---trip_point_3_type: active1
341 |---cdev0: --->/sys/class/thermal/cooling_device0 428 |---cdev0: --->/sys/class/thermal/cooling_device0
342 |---cdev0_trip_point: 1 /* cdev0 can be used for passive */ 429 |---cdev0_trip_point: 1 /* cdev0 can be used for passive */
430 |---cdev0_weight: 1024
343 |---cdev1: --->/sys/class/thermal/cooling_device3 431 |---cdev1: --->/sys/class/thermal/cooling_device3
344 |---cdev1_trip_point: 2 /* cdev1 can be used for active[0]*/ 432 |---cdev1_trip_point: 2 /* cdev1 can be used for active[0]*/
433 |---cdev1_weight: 1024
345 434
346|cooling_device0: 435|cooling_device0:
347 |---type: Processor 436 |---type: Processor
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt
index 572ca923631a..7ddb1e319f84 100644
--- a/Documentation/trace/ftrace.txt
+++ b/Documentation/trace/ftrace.txt
@@ -108,8 +108,8 @@ of ftrace. Here is a list of some of the key files:
108 data is read from this file, it is consumed, and 108 data is read from this file, it is consumed, and
109 will not be read again with a sequential read. The 109 will not be read again with a sequential read. The
110 "trace" file is static, and if the tracer is not 110 "trace" file is static, and if the tracer is not
111 adding more data,they will display the same 111 adding more data, it will display the same
112 information every time they are read. 112 information every time it is read.
113 113
114 trace_options: 114 trace_options:
115 115
diff --git a/Documentation/usb/gadget-testing.txt b/Documentation/usb/gadget-testing.txt
index f45b2bf4b41d..592678009c15 100644
--- a/Documentation/usb/gadget-testing.txt
+++ b/Documentation/usb/gadget-testing.txt
@@ -526,8 +526,6 @@ Except for ifname they can be written to until the function is linked to a
526configuration. The ifname is read-only and contains the name of the interface 526configuration. The ifname is read-only and contains the name of the interface
527which was assigned by the net core, e. g. usb0. 527which was assigned by the net core, e. g. usb0.
528 528
529By default there can be only 1 RNDIS interface in the system.
530
531Testing the RNDIS function 529Testing the RNDIS function
532-------------------------- 530--------------------------
533 531
@@ -629,7 +627,7 @@ Function-specific configfs interface
629The function name to use when creating the function directory is "uac2". 627The function name to use when creating the function directory is "uac2".
630The uac2 function provides these attributes in its function directory: 628The uac2 function provides these attributes in its function directory:
631 629
632 chmask - capture channel mask 630 c_chmask - capture channel mask
633 c_srate - capture sampling rate 631 c_srate - capture sampling rate
634 c_ssize - capture sample size (bytes) 632 c_ssize - capture sample size (bytes)
635 p_chmask - playback channel mask 633 p_chmask - playback channel mask
diff --git a/Documentation/usb/usb-serial.txt b/Documentation/usb/usb-serial.txt
index 947fa62bccf2..349f3104fa4f 100644
--- a/Documentation/usb/usb-serial.txt
+++ b/Documentation/usb/usb-serial.txt
@@ -465,12 +465,14 @@ Generic Serial driver
465 device, and does not support any kind of device flow control. All that 465 device, and does not support any kind of device flow control. All that
466 is required of your device is that it has at least one bulk in endpoint, 466 is required of your device is that it has at least one bulk in endpoint,
467 or one bulk out endpoint. 467 or one bulk out endpoint.
468 468
469 To enable the generic driver to recognize your device, build the driver 469 To enable the generic driver to recognize your device, provide
470 as a module and load it by the following invocation: 470 echo <vid> <pid> >/sys/bus/usb-serial/drivers/generic/new_id
471 where the <vid> and <pid> is replaced with the hex representation of your
472 device's vendor id and product id.
473 If the driver is compiled as a module you can also provide one id when
474 loading the module
471 insmod usbserial vendor=0x#### product=0x#### 475 insmod usbserial vendor=0x#### product=0x####
472 where the #### is replaced with the hex representation of your device's
473 vendor id and product id.
474 476
475 This driver has been successfully used to connect to the NetChip USB 477 This driver has been successfully used to connect to the NetChip USB
476 development board, providing a way to develop USB firmware without 478 development board, providing a way to develop USB firmware without
diff --git a/Documentation/vDSO/Makefile b/Documentation/vDSO/Makefile
index ee075c3d2124..b12e98770e1f 100644
--- a/Documentation/vDSO/Makefile
+++ b/Documentation/vDSO/Makefile
@@ -1,3 +1,4 @@
1ifndef CROSS_COMPILE
1# vdso_test won't build for glibc < 2.16, so disable it 2# vdso_test won't build for glibc < 2.16, so disable it
2# hostprogs-y := vdso_test 3# hostprogs-y := vdso_test
3hostprogs-$(CONFIG_X86) := vdso_standalone_test_x86 4hostprogs-$(CONFIG_X86) := vdso_standalone_test_x86
@@ -13,3 +14,4 @@ HOSTLOADLIBES_vdso_standalone_test_x86 := -nostdlib
13ifeq ($(CONFIG_X86_32),y) 14ifeq ($(CONFIG_X86_32),y)
14HOSTLOADLIBES_vdso_standalone_test_x86 += -lgcc_s 15HOSTLOADLIBES_vdso_standalone_test_x86 += -lgcc_s
15endif 16endif
17endif
diff --git a/Documentation/vfio.txt b/Documentation/vfio.txt
index 96978eced341..1dd3fddfd3a1 100644
--- a/Documentation/vfio.txt
+++ b/Documentation/vfio.txt
@@ -289,10 +289,12 @@ PPC64 sPAPR implementation note
289 289
290This implementation has some specifics: 290This implementation has some specifics:
291 291
2921) Only one IOMMU group per container is supported as an IOMMU group 2921) On older systems (POWER7 with P5IOC2/IODA1) only one IOMMU group per
293represents the minimal entity which isolation can be guaranteed for and 293container is supported as an IOMMU table is allocated at the boot time,
294groups are allocated statically, one per a Partitionable Endpoint (PE) 294one table per a IOMMU group which is a Partitionable Endpoint (PE)
295(PE is often a PCI domain but not always). 295(PE is often a PCI domain but not always).
296Newer systems (POWER8 with IODA2) have improved hardware design which allows
297to remove this limitation and have multiple IOMMU groups per a VFIO container.
296 298
2972) The hardware supports so called DMA windows - the PCI address range 2992) The hardware supports so called DMA windows - the PCI address range
298within which DMA transfer is allowed, any attempt to access address space 300within which DMA transfer is allowed, any attempt to access address space
@@ -385,6 +387,18 @@ The code flow from the example above should be slightly changed:
385 387
386 .... 388 ....
387 389
390 /* Inject EEH error, which is expected to be caused by 32-bits
391 * config load.
392 */
393 pe_op.op = VFIO_EEH_PE_INJECT_ERR;
394 pe_op.err.type = EEH_ERR_TYPE_32;
395 pe_op.err.func = EEH_ERR_FUNC_LD_CFG_ADDR;
396 pe_op.err.addr = 0ul;
397 pe_op.err.mask = 0ul;
398 ioctl(container, VFIO_EEH_PE_OP, &pe_op);
399
400 ....
401
388 /* When 0xFF's returned from reading PCI config space or IO BARs 402 /* When 0xFF's returned from reading PCI config space or IO BARs
389 * of the PCI device. Check the PE's state to see if that has been 403 * of the PCI device. Check the PE's state to see if that has been
390 * frozen. 404 * frozen.
@@ -427,6 +441,48 @@ The code flow from the example above should be slightly changed:
427 441
428 .... 442 ....
429 443
4445) There is v2 of SPAPR TCE IOMMU. It deprecates VFIO_IOMMU_ENABLE/
445VFIO_IOMMU_DISABLE and implements 2 new ioctls:
446VFIO_IOMMU_SPAPR_REGISTER_MEMORY and VFIO_IOMMU_SPAPR_UNREGISTER_MEMORY
447(which are unsupported in v1 IOMMU).
448
449PPC64 paravirtualized guests generate a lot of map/unmap requests,
450and the handling of those includes pinning/unpinning pages and updating
451mm::locked_vm counter to make sure we do not exceed the rlimit.
452The v2 IOMMU splits accounting and pinning into separate operations:
453
454- VFIO_IOMMU_SPAPR_REGISTER_MEMORY/VFIO_IOMMU_SPAPR_UNREGISTER_MEMORY ioctls
455receive a user space address and size of the block to be pinned.
456Bisecting is not supported and VFIO_IOMMU_UNREGISTER_MEMORY is expected to
457be called with the exact address and size used for registering
458the memory block. The userspace is not expected to call these often.
459The ranges are stored in a linked list in a VFIO container.
460
461- VFIO_IOMMU_MAP_DMA/VFIO_IOMMU_UNMAP_DMA ioctls only update the actual
462IOMMU table and do not do pinning; instead these check that the userspace
463address is from pre-registered range.
464
465This separation helps in optimizing DMA for guests.
466
4676) sPAPR specification allows guests to have an additional DMA window(s) on
468a PCI bus with a variable page size. Two ioctls have been added to support
469this: VFIO_IOMMU_SPAPR_TCE_CREATE and VFIO_IOMMU_SPAPR_TCE_REMOVE.
470The platform has to support the functionality or error will be returned to
471the userspace. The existing hardware supports up to 2 DMA windows, one is
4722GB long, uses 4K pages and called "default 32bit window"; the other can
473be as big as entire RAM, use different page size, it is optional - guests
474create those in run-time if the guest driver supports 64bit DMA.
475
476VFIO_IOMMU_SPAPR_TCE_CREATE receives a page shift, a DMA window size and
477a number of TCE table levels (if a TCE table is going to be big enough and
478the kernel may not be able to allocate enough of physically contiguous memory).
479It creates a new window in the available slot and returns the bus address where
480the new window starts. Due to hardware limitation, the user space cannot choose
481the location of DMA windows.
482
483VFIO_IOMMU_SPAPR_TCE_REMOVE receives the bus start address of the window
484and removes it.
485
430------------------------------------------------------------------------------- 486-------------------------------------------------------------------------------
431 487
432[1] VFIO was originally an acronym for "Virtual Function I/O" in its 488[1] VFIO was originally an acronym for "Virtual Function I/O" in its
diff --git a/Documentation/video4linux/CARDLIST.cx23885 b/Documentation/video4linux/CARDLIST.cx23885
index 4c84ec853265..44a4cfbfdc40 100644
--- a/Documentation/video4linux/CARDLIST.cx23885
+++ b/Documentation/video4linux/CARDLIST.cx23885
@@ -36,7 +36,7 @@
36 35 -> TeVii S471 [d471:9022] 36 35 -> TeVii S471 [d471:9022]
37 36 -> Hauppauge WinTV-HVR1255 [0070:2259] 37 36 -> Hauppauge WinTV-HVR1255 [0070:2259]
38 37 -> Prof Revolution DVB-S2 8000 [8000:3034] 38 37 -> Prof Revolution DVB-S2 8000 [8000:3034]
39 38 -> Hauppauge WinTV-HVR4400 [0070:c108,0070:c138,0070:c12a,0070:c1f8] 39 38 -> Hauppauge WinTV-HVR4400/HVR5500 [0070:c108,0070:c138,0070:c1f8]
40 39 -> AVerTV Hybrid Express Slim HC81R [1461:d939] 40 39 -> AVerTV Hybrid Express Slim HC81R [1461:d939]
41 40 -> TurboSight TBS 6981 [6981:8888] 41 40 -> TurboSight TBS 6981 [6981:8888]
42 41 -> TurboSight TBS 6980 [6980:8888] 42 41 -> TurboSight TBS 6980 [6980:8888]
@@ -45,3 +45,10 @@
45 44 -> DViCO FusionHDTV DVB-T Dual Express2 [18ac:db98] 45 44 -> DViCO FusionHDTV DVB-T Dual Express2 [18ac:db98]
46 45 -> DVBSky T9580 [4254:9580] 46 45 -> DVBSky T9580 [4254:9580]
47 46 -> DVBSky T980C [4254:980c] 47 46 -> DVBSky T980C [4254:980c]
48 47 -> DVBSky S950C [4254:950c]
49 48 -> Technotrend TT-budget CT2-4500 CI [13c2:3013]
50 49 -> DVBSky S950 [4254:0950]
51 50 -> DVBSky S952 [4254:0952]
52 51 -> DVBSky T982 [4254:0982]
53 52 -> Hauppauge WinTV-HVR5525 [0070:f038]
54 53 -> Hauppauge WinTV Starburst [0070:c12a]
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx
index 3700edb81db2..9e57ce43c4f4 100644
--- a/Documentation/video4linux/CARDLIST.em28xx
+++ b/Documentation/video4linux/CARDLIST.em28xx
@@ -94,3 +94,5 @@
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) 95 94 -> PCTV tripleStick (292e) (em28178)
96 95 -> Leadtek VC100 (em2861) [0413:6f07] 96 95 -> Leadtek VC100 (em2861) [0413:6f07]
97 96 -> Terratec Cinergy T2 Stick HD (em28178)
98 97 -> Elgato EyeTV Hybrid 2008 INT (em2884) [0fd9:0018]
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134
index a93d86455233..f4b395bdc090 100644
--- a/Documentation/video4linux/CARDLIST.saa7134
+++ b/Documentation/video4linux/CARDLIST.saa7134
@@ -192,3 +192,4 @@
192191 -> Hawell HW-9004V1 192191 -> Hawell HW-9004V1
193192 -> AverMedia AverTV Satellite Hybrid+FM A706 [1461:2055] 193192 -> AverMedia AverTV Satellite Hybrid+FM A706 [1461:2055]
194193 -> WIS Voyager or compatible [1905:7007] 194193 -> WIS Voyager or compatible [1905:7007]
195194 -> AverMedia AverTV/505 [1461:a10a]
diff --git a/Documentation/video4linux/CARDLIST.saa7164 b/Documentation/video4linux/CARDLIST.saa7164
index 2205e8d55537..6eb057220474 100644
--- a/Documentation/video4linux/CARDLIST.saa7164
+++ b/Documentation/video4linux/CARDLIST.saa7164
@@ -9,3 +9,6 @@
9 8 -> Hauppauge WinTV-HVR2250 [0070:88A1] 9 8 -> Hauppauge WinTV-HVR2250 [0070:88A1]
10 9 -> Hauppauge WinTV-HVR2200 [0070:8940] 10 9 -> Hauppauge WinTV-HVR2200 [0070:8940]
11 10 -> Hauppauge WinTV-HVR2200 [0070:8953] 11 10 -> Hauppauge WinTV-HVR2200 [0070:8953]
12 11 -> Hauppauge WinTV-HVR2255(proto)
13 12 -> Hauppauge WinTV-HVR2255 [0070:f111]
14 13 -> Hauppauge WinTV-HVR2205 [0070:f123,0070:f120]
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index 59e619f9bbf5..75d5c18d689a 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -1129,6 +1129,10 @@ available event type is 'class base + 1'.
1129An example on how the V4L2 events may be used can be found in the OMAP 1129An example on how the V4L2 events may be used can be found in the OMAP
11303 ISP driver (drivers/media/platform/omap3isp). 11303 ISP driver (drivers/media/platform/omap3isp).
1131 1131
1132A subdev can directly send an event to the v4l2_device notify function with
1133V4L2_DEVICE_NOTIFY_EVENT. This allows the bridge to map the subdev that sends
1134the event to the video node(s) associated with the subdev that need to be
1135informed about such an event.
1132 1136
1133V4L2 clocks 1137V4L2 clocks
1134----------- 1138-----------
diff --git a/Documentation/video4linux/v4l2-pci-skeleton.c b/Documentation/video4linux/v4l2-pci-skeleton.c
index 7bd1b975bfd2..9c80c090e92d 100644
--- a/Documentation/video4linux/v4l2-pci-skeleton.c
+++ b/Documentation/video4linux/v4l2-pci-skeleton.c
@@ -406,9 +406,7 @@ static int skeleton_enum_fmt_vid_cap(struct file *file, void *priv,
406 if (f->index != 0) 406 if (f->index != 0)
407 return -EINVAL; 407 return -EINVAL;
408 408
409 strlcpy(f->description, "4:2:2, packed, YUYV", sizeof(f->description));
410 f->pixelformat = V4L2_PIX_FMT_YUYV; 409 f->pixelformat = V4L2_PIX_FMT_YUYV;
411 f->flags = 0;
412 return 0; 410 return 0;
413} 411}
414 412
diff --git a/Documentation/video4linux/vivid.txt b/Documentation/video4linux/vivid.txt
index cd4b5a1ac529..e35d376b7f64 100644
--- a/Documentation/video4linux/vivid.txt
+++ b/Documentation/video4linux/vivid.txt
@@ -631,26 +631,33 @@ Timestamp Source: selects when the timestamp for each buffer is taken.
631 631
632Colorspace: selects which colorspace should be used when generating the image. 632Colorspace: selects which colorspace should be used when generating the image.
633 This only applies if the CSC Colorbar test pattern is selected, 633 This only applies if the CSC Colorbar test pattern is selected,
634 otherwise the test pattern will go through unconverted (except for 634 otherwise the test pattern will go through unconverted.
635 the so-called 'Transfer Function' corrections and the R'G'B' to Y'CbCr 635 This behavior is also what you want, since a 75% Colorbar
636 conversion). This behavior is also what you want, since a 75% Colorbar
637 should really have 75% signal intensity and should not be affected 636 should really have 75% signal intensity and should not be affected
638 by colorspace conversions. 637 by colorspace conversions.
639 638
640 Changing the colorspace will result in the V4L2_EVENT_SOURCE_CHANGE 639 Changing the colorspace will result in the V4L2_EVENT_SOURCE_CHANGE
641 to be sent since it emulates a detected colorspace change. 640 to be sent since it emulates a detected colorspace change.
642 641
642Transfer Function: selects which colorspace transfer function should be used when
643 generating an image. This only applies if the CSC Colorbar test pattern is
644 selected, otherwise the test pattern will go through unconverted.
645 This behavior is also what you want, since a 75% Colorbar
646 should really have 75% signal intensity and should not be affected
647 by colorspace conversions.
648
649 Changing the transfer function will result in the V4L2_EVENT_SOURCE_CHANGE
650 to be sent since it emulates a detected colorspace change.
651
643Y'CbCr Encoding: selects which Y'CbCr encoding should be used when generating 652Y'CbCr Encoding: selects which Y'CbCr encoding should be used when generating
644 a Y'CbCr image. This only applies if the CSC Colorbar test pattern is 653 a Y'CbCr image. This only applies if the format is set to a Y'CbCr format
645 selected, and if the format is set to a Y'CbCr format as opposed to an 654 as opposed to an RGB format.
646 RGB format.
647 655
648 Changing the Y'CbCr encoding will result in the V4L2_EVENT_SOURCE_CHANGE 656 Changing the Y'CbCr encoding will result in the V4L2_EVENT_SOURCE_CHANGE
649 to be sent since it emulates a detected colorspace change. 657 to be sent since it emulates a detected colorspace change.
650 658
651Quantization: selects which quantization should be used for the RGB or Y'CbCr 659Quantization: selects which quantization should be used for the RGB or Y'CbCr
652 encoding when generating the test pattern. This only applies if the CSC 660 encoding when generating the test pattern.
653 Colorbar test pattern is selected.
654 661
655 Changing the quantization will result in the V4L2_EVENT_SOURCE_CHANGE 662 Changing the quantization will result in the V4L2_EVENT_SOURCE_CHANGE
656 to be sent since it emulates a detected colorspace change. 663 to be sent since it emulates a detected colorspace change.
@@ -888,7 +895,7 @@ Section 10.1: Video and Sliced VBI looping
888 895
889The way to enable video/VBI looping is currently fairly crude. A 'Loop Video' 896The way to enable video/VBI looping is currently fairly crude. A 'Loop Video'
890control is available in the "Vivid" control class of the video 897control is available in the "Vivid" control class of the video
891output and VBI output devices. When checked the video looping will be enabled. 898capture and VBI capture devices. When checked the video looping will be enabled.
892Once enabled any video S-Video or HDMI input will show a static test pattern 899Once enabled any video S-Video or HDMI input will show a static test pattern
893until the video output has started. At that time the video output will be 900until the video output has started. At that time the video output will be
894looped to the video input provided that: 901looped to the video input provided that:
@@ -985,8 +992,9 @@ to change crop and compose rectangles on the fly.
985Section 12: Formats 992Section 12: Formats
986------------------- 993-------------------
987 994
988The driver supports all the regular packed YUYV formats, 16, 24 and 32 RGB 995The driver supports all the regular packed and planar 4:4:4, 4:2:2 and 4:2:0
989packed formats and two multiplanar formats (one luma and one chroma plane). 996YUYV formats, 8, 16, 24 and 32 RGB packed formats and various multiplanar
997formats.
990 998
991The alpha component can be set through the 'Alpha Component' User control 999The alpha component can be set through the 'Alpha Component' User control
992for those formats that support it. If the 'Apply Alpha To Red Only' control 1000for those formats that support it. If the 'Apply Alpha To Red Only' control
@@ -1119,11 +1127,9 @@ Just as a reminder and in no particular order:
1119- Use per-queue locks and/or per-device locks to improve throughput 1127- Use per-queue locks and/or per-device locks to improve throughput
1120- Add support to loop from a specific output to a specific input across 1128- Add support to loop from a specific output to a specific input across
1121 vivid instances 1129 vivid instances
1122- Add support for VIDIOC_EXPBUF once support for that has been added to vb2
1123- The SDR radio should use the same 'frequencies' for stations as the normal 1130- The SDR radio should use the same 'frequencies' for stations as the normal
1124 radio receiver, and give back noise if the frequency doesn't match up with 1131 radio receiver, and give back noise if the frequency doesn't match up with
1125 a station frequency 1132 a station frequency
1126- Improve the sine generation of the SDR radio.
1127- Make a thread for the RDS generation, that would help in particular for the 1133- Make a thread for the RDS generation, that would help in particular for the
1128 "Controls" RDS Rx I/O Mode as the read-only RDS controls could be updated 1134 "Controls" RDS Rx I/O Mode as the read-only RDS controls could be updated
1129 in real-time. 1135 in real-time.
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 9fa2bf8c3f6f..a7926a90156f 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -254,6 +254,11 @@ since the last call to this ioctl. Bit 0 is the first page in the
254memory slot. Ensure the entire structure is cleared to avoid padding 254memory slot. Ensure the entire structure is cleared to avoid padding
255issues. 255issues.
256 256
257If KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 specifies
258the address space for which you want to return the dirty bitmap.
259They must be less than the value that KVM_CHECK_EXTENSION returns for
260the KVM_CAP_MULTI_ADDRESS_SPACE capability.
261
257 262
2584.9 KVM_SET_MEMORY_ALIAS 2634.9 KVM_SET_MEMORY_ALIAS
259 264
@@ -820,11 +825,21 @@ struct kvm_vcpu_events {
820 } nmi; 825 } nmi;
821 __u32 sipi_vector; 826 __u32 sipi_vector;
822 __u32 flags; 827 __u32 flags;
828 struct {
829 __u8 smm;
830 __u8 pending;
831 __u8 smm_inside_nmi;
832 __u8 latched_init;
833 } smi;
823}; 834};
824 835
825KVM_VCPUEVENT_VALID_SHADOW may be set in the flags field to signal that 836Only two fields are defined in the flags field:
826interrupt.shadow contains a valid state. Otherwise, this field is undefined. 837
838- KVM_VCPUEVENT_VALID_SHADOW may be set in the flags field to signal that
839 interrupt.shadow contains a valid state.
827 840
841- KVM_VCPUEVENT_VALID_SMM may be set in the flags field to signal that
842 smi contains a valid state.
828 843
8294.32 KVM_SET_VCPU_EVENTS 8444.32 KVM_SET_VCPU_EVENTS
830 845
@@ -841,17 +856,20 @@ vcpu.
841See KVM_GET_VCPU_EVENTS for the data structure. 856See KVM_GET_VCPU_EVENTS for the data structure.
842 857
843Fields that may be modified asynchronously by running VCPUs can be excluded 858Fields that may be modified asynchronously by running VCPUs can be excluded
844from the update. These fields are nmi.pending and sipi_vector. Keep the 859from the update. These fields are nmi.pending, sipi_vector, smi.smm,
845corresponding bits in the flags field cleared to suppress overwriting the 860smi.pending. Keep the corresponding bits in the flags field cleared to
846current in-kernel state. The bits are: 861suppress overwriting the current in-kernel state. The bits are:
847 862
848KVM_VCPUEVENT_VALID_NMI_PENDING - transfer nmi.pending to the kernel 863KVM_VCPUEVENT_VALID_NMI_PENDING - transfer nmi.pending to the kernel
849KVM_VCPUEVENT_VALID_SIPI_VECTOR - transfer sipi_vector 864KVM_VCPUEVENT_VALID_SIPI_VECTOR - transfer sipi_vector
865KVM_VCPUEVENT_VALID_SMM - transfer the smi sub-struct.
850 866
851If KVM_CAP_INTR_SHADOW is available, KVM_VCPUEVENT_VALID_SHADOW can be set in 867If KVM_CAP_INTR_SHADOW is available, KVM_VCPUEVENT_VALID_SHADOW can be set in
852the flags field to signal that interrupt.shadow contains a valid state and 868the flags field to signal that interrupt.shadow contains a valid state and
853shall be written into the VCPU. 869shall be written into the VCPU.
854 870
871KVM_VCPUEVENT_VALID_SMM can only be set if KVM_CAP_X86_SMM is available.
872
855 873
8564.33 KVM_GET_DEBUGREGS 8744.33 KVM_GET_DEBUGREGS
857 875
@@ -911,6 +929,13 @@ slot. When changing an existing slot, it may be moved in the guest
911physical memory space, or its flags may be modified. It may not be 929physical memory space, or its flags may be modified. It may not be
912resized. Slots may not overlap in guest physical address space. 930resized. Slots may not overlap in guest physical address space.
913 931
932If KVM_CAP_MULTI_ADDRESS_SPACE is available, bits 16-31 of "slot"
933specifies the address space which is being modified. They must be
934less than the value that KVM_CHECK_EXTENSION returns for the
935KVM_CAP_MULTI_ADDRESS_SPACE capability. Slots in separate address spaces
936are unrelated; the restriction on overlapping slots only applies within
937each address space.
938
914Memory for the region is taken starting at the address denoted by the 939Memory for the region is taken starting at the address denoted by the
915field userspace_addr, which must point at user addressable memory for 940field userspace_addr, which must point at user addressable memory for
916the entire memory slot size. Any object may back this memory, including 941the entire memory slot size. Any object may back this memory, including
@@ -959,7 +984,8 @@ documentation when it pops into existence).
9594.37 KVM_ENABLE_CAP 9844.37 KVM_ENABLE_CAP
960 985
961Capability: KVM_CAP_ENABLE_CAP, KVM_CAP_ENABLE_CAP_VM 986Capability: KVM_CAP_ENABLE_CAP, KVM_CAP_ENABLE_CAP_VM
962Architectures: ppc, s390 987Architectures: x86 (only KVM_CAP_ENABLE_CAP_VM),
988 mips (only KVM_CAP_ENABLE_CAP), ppc, s390
963Type: vcpu ioctl, vm ioctl (with KVM_CAP_ENABLE_CAP_VM) 989Type: vcpu ioctl, vm ioctl (with KVM_CAP_ENABLE_CAP_VM)
964Parameters: struct kvm_enable_cap (in) 990Parameters: struct kvm_enable_cap (in)
965Returns: 0 on success; -1 on error 991Returns: 0 on success; -1 on error
@@ -1268,7 +1294,7 @@ The flags bitmap is defined as:
1268 /* the host supports the ePAPR idle hcall 1294 /* the host supports the ePAPR idle hcall
1269 #define KVM_PPC_PVINFO_FLAGS_EV_IDLE (1<<0) 1295 #define KVM_PPC_PVINFO_FLAGS_EV_IDLE (1<<0)
1270 1296
12714.48 KVM_ASSIGN_PCI_DEVICE 12974.48 KVM_ASSIGN_PCI_DEVICE (deprecated)
1272 1298
1273Capability: none 1299Capability: none
1274Architectures: x86 1300Architectures: x86
@@ -1318,7 +1344,7 @@ Errors:
1318 have their standard meanings. 1344 have their standard meanings.
1319 1345
1320 1346
13214.49 KVM_DEASSIGN_PCI_DEVICE 13474.49 KVM_DEASSIGN_PCI_DEVICE (deprecated)
1322 1348
1323Capability: none 1349Capability: none
1324Architectures: x86 1350Architectures: x86
@@ -1337,7 +1363,7 @@ Errors:
1337 Other error conditions may be defined by individual device types or 1363 Other error conditions may be defined by individual device types or
1338 have their standard meanings. 1364 have their standard meanings.
1339 1365
13404.50 KVM_ASSIGN_DEV_IRQ 13664.50 KVM_ASSIGN_DEV_IRQ (deprecated)
1341 1367
1342Capability: KVM_CAP_ASSIGN_DEV_IRQ 1368Capability: KVM_CAP_ASSIGN_DEV_IRQ
1343Architectures: x86 1369Architectures: x86
@@ -1377,7 +1403,7 @@ Errors:
1377 have their standard meanings. 1403 have their standard meanings.
1378 1404
1379 1405
13804.51 KVM_DEASSIGN_DEV_IRQ 14064.51 KVM_DEASSIGN_DEV_IRQ (deprecated)
1381 1407
1382Capability: KVM_CAP_ASSIGN_DEV_IRQ 1408Capability: KVM_CAP_ASSIGN_DEV_IRQ
1383Architectures: x86 1409Architectures: x86
@@ -1451,7 +1477,7 @@ struct kvm_irq_routing_s390_adapter {
1451}; 1477};
1452 1478
1453 1479
14544.53 KVM_ASSIGN_SET_MSIX_NR 14804.53 KVM_ASSIGN_SET_MSIX_NR (deprecated)
1455 1481
1456Capability: none 1482Capability: none
1457Architectures: x86 1483Architectures: x86
@@ -1473,7 +1499,7 @@ struct kvm_assigned_msix_nr {
1473#define KVM_MAX_MSIX_PER_DEV 256 1499#define KVM_MAX_MSIX_PER_DEV 256
1474 1500
1475 1501
14764.54 KVM_ASSIGN_SET_MSIX_ENTRY 15024.54 KVM_ASSIGN_SET_MSIX_ENTRY (deprecated)
1477 1503
1478Capability: none 1504Capability: none
1479Architectures: x86 1505Architectures: x86
@@ -1629,7 +1655,7 @@ should skip processing the bitmap and just invalidate everything. It must
1629be set to the number of set bits in the bitmap. 1655be set to the number of set bits in the bitmap.
1630 1656
1631 1657
16324.61 KVM_ASSIGN_SET_INTX_MASK 16584.61 KVM_ASSIGN_SET_INTX_MASK (deprecated)
1633 1659
1634Capability: KVM_CAP_PCI_2_3 1660Capability: KVM_CAP_PCI_2_3
1635Architectures: x86 1661Architectures: x86
@@ -2978,6 +3004,16 @@ len must be a multiple of sizeof(struct kvm_s390_irq). It must be > 0
2978and it must not exceed (max_vcpus + 32) * sizeof(struct kvm_s390_irq), 3004and it must not exceed (max_vcpus + 32) * sizeof(struct kvm_s390_irq),
2979which is the maximum number of possibly pending cpu-local interrupts. 3005which is the maximum number of possibly pending cpu-local interrupts.
2980 3006
30074.90 KVM_SMI
3008
3009Capability: KVM_CAP_X86_SMM
3010Architectures: x86
3011Type: vcpu ioctl
3012Parameters: none
3013Returns: 0 on success, -1 on error
3014
3015Queues an SMI on the thread's vcpu.
3016
29815. The kvm_run structure 30175. The kvm_run structure
2982------------------------ 3018------------------------
2983 3019
@@ -3013,7 +3049,12 @@ an interrupt can be injected now with KVM_INTERRUPT.
3013The value of the current interrupt flag. Only valid if in-kernel 3049The value of the current interrupt flag. Only valid if in-kernel
3014local APIC is not used. 3050local APIC is not used.
3015 3051
3016 __u8 padding2[2]; 3052 __u16 flags;
3053
3054More architecture-specific flags detailing state of the VCPU that may
3055affect the device's behavior. The only currently defined flag is
3056KVM_RUN_X86_SMM, which is valid on x86 machines and is set if the
3057VCPU is in system management mode.
3017 3058
3018 /* in (pre_kvm_run), out (post_kvm_run) */ 3059 /* in (pre_kvm_run), out (post_kvm_run) */
3019 __u64 cr8; 3060 __u64 cr8;
diff --git a/Documentation/virtual/kvm/mmu.txt b/Documentation/virtual/kvm/mmu.txt
index 53838d9c6295..3a4d681c3e98 100644
--- a/Documentation/virtual/kvm/mmu.txt
+++ b/Documentation/virtual/kvm/mmu.txt
@@ -169,6 +169,16 @@ Shadow pages contain the following information:
169 Contains the value of cr4.smep && !cr0.wp for which the page is valid 169 Contains the value of cr4.smep && !cr0.wp for which the page is valid
170 (pages for which this is true are different from other pages; see the 170 (pages for which this is true are different from other pages; see the
171 treatment of cr0.wp=0 below). 171 treatment of cr0.wp=0 below).
172 role.smap_andnot_wp:
173 Contains the value of cr4.smap && !cr0.wp for which the page is valid
174 (pages for which this is true are different from other pages; see the
175 treatment of cr0.wp=0 below).
176 role.smm:
177 Is 1 if the page is valid in system management mode. This field
178 determines which of the kvm_memslots array was used to build this
179 shadow page; it is also used to go back from a struct kvm_mmu_page
180 to a memslot, through the kvm_memslots_for_spte_role macro and
181 __gfn_to_memslot.
172 gfn: 182 gfn:
173 Either the guest page table containing the translations shadowed by this 183 Either the guest page table containing the translations shadowed by this
174 page, or the base page frame for linear translations. See role.direct. 184 page, or the base page frame for linear translations. See role.direct.
@@ -344,10 +354,16 @@ on fault type:
344 354
345(user write faults generate a #PF) 355(user write faults generate a #PF)
346 356
347In the first case there is an additional complication if CR4.SMEP is 357In the first case there are two additional complications:
348enabled: since we've turned the page into a kernel page, the kernel may now 358- if CR4.SMEP is enabled: since we've turned the page into a kernel page,
349execute it. We handle this by also setting spte.nx. If we get a user 359 the kernel may now execute it. We handle this by also setting spte.nx.
350fetch or read fault, we'll change spte.u=1 and spte.nx=gpte.nx back. 360 If we get a user fetch or read fault, we'll change spte.u=1 and
361 spte.nx=gpte.nx back.
362- if CR4.SMAP is disabled: since the page has been changed to a kernel
363 page, it can not be reused when CR4.SMAP is enabled. We set
364 CR4.SMAP && !CR0.WP into shadow page's role to avoid this case. Note,
365 here we do not care the case that CR4.SMAP is enabled since KVM will
366 directly inject #PF to guest due to failed permission check.
351 367
352To prevent an spte that was converted into a kernel page with cr0.wp=0 368To prevent an spte that was converted into a kernel page with cr0.wp=0
353from being written by the kernel after cr0.wp has changed to 1, we make 369from being written by the kernel after cr0.wp has changed to 1, we make
diff --git a/Documentation/vm/unevictable-lru.txt b/Documentation/vm/unevictable-lru.txt
index 3be0bfc4738d..32ee3a67dba2 100644
--- a/Documentation/vm/unevictable-lru.txt
+++ b/Documentation/vm/unevictable-lru.txt
@@ -467,7 +467,13 @@ mmap(MAP_LOCKED) SYSTEM CALL HANDLING
467 467
468In addition the mlock()/mlockall() system calls, an application can request 468In addition the mlock()/mlockall() system calls, an application can request
469that a region of memory be mlocked supplying the MAP_LOCKED flag to the mmap() 469that a region of memory be mlocked supplying the MAP_LOCKED flag to the mmap()
470call. Furthermore, any mmap() call or brk() call that expands the heap by a 470call. There is one important and subtle difference here, though. mmap() + mlock()
471will fail if the range cannot be faulted in (e.g. because mm_populate fails)
472and returns with ENOMEM while mmap(MAP_LOCKED) will not fail. The mmaped
473area will still have properties of the locked area - aka. pages will not get
474swapped out - but major page faults to fault memory in might still happen.
475
476Furthermore, any mmap() call or brk() call that expands the heap by a
471task that has previously called mlockall() with the MCL_FUTURE flag will result 477task that has previously called mlockall() with the MCL_FUTURE flag will result
472in the newly mapped memory being mlocked. Before the unevictable/mlock 478in the newly mapped memory being mlocked. Before the unevictable/mlock
473changes, the kernel simply called make_pages_present() to allocate pages and 479changes, the kernel simply called make_pages_present() to allocate pages and
diff --git a/Documentation/vm/zswap.txt b/Documentation/vm/zswap.txt
index 00c3d31e7971..8458c0861e4e 100644
--- a/Documentation/vm/zswap.txt
+++ b/Documentation/vm/zswap.txt
@@ -26,8 +26,22 @@ Zswap evicts pages from compressed cache on an LRU basis to the backing swap
26device when the compressed pool reaches its size limit. This requirement had 26device when the compressed pool reaches its size limit. This requirement had
27been identified in prior community discussions. 27been identified in prior community discussions.
28 28
29To enabled zswap, the "enabled" attribute must be set to 1 at boot time. e.g. 29Zswap is disabled by default but can be enabled at boot time by setting
30zswap.enabled=1 30the "enabled" attribute to 1 at boot time. ie: zswap.enabled=1. Zswap
31can also be enabled and disabled at runtime using the sysfs interface.
32An example command to enable zswap at runtime, assuming sysfs is mounted
33at /sys, is:
34
35echo 1 > /sys/modules/zswap/parameters/enabled
36
37When zswap is disabled at runtime it will stop storing pages that are
38being swapped out. However, it will _not_ immediately write out or fault
39back into memory all of the pages stored in the compressed pool. The
40pages stored in zswap will remain in the compressed pool until they are
41either invalidated or faulted back into memory. In order to force all
42pages out of the compressed pool, a swapoff on the swap device(s) will
43fault back into memory all swapped out pages, including those in the
44compressed pool.
31 45
32Design: 46Design:
33 47
diff --git a/Documentation/vme_api.txt b/Documentation/vme_api.txt
index ffe6e22a2ccd..ca5b82797f6c 100644
--- a/Documentation/vme_api.txt
+++ b/Documentation/vme_api.txt
@@ -171,6 +171,12 @@ This functions by reading the offset, applying the mask. If the bits selected in
171the mask match with the values of the corresponding bits in the compare field, 171the mask match with the values of the corresponding bits in the compare field,
172the value of swap is written the specified offset. 172the value of swap is written the specified offset.
173 173
174Parts of a VME window can be mapped into user space memory using the following
175function:
176
177 int vme_master_mmap(struct vme_resource *resource,
178 struct vm_area_struct *vma)
179
174 180
175Slave windows 181Slave windows
176============= 182=============
diff --git a/Documentation/w1/slaves/w1_therm b/Documentation/w1/slaves/w1_therm
index cc62a95e4776..13411fe52f7f 100644
--- a/Documentation/w1/slaves/w1_therm
+++ b/Documentation/w1/slaves/w1_therm
@@ -11,12 +11,14 @@ Author: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
11Description 11Description
12----------- 12-----------
13 13
14w1_therm provides basic temperature conversion for ds18*20 devices. 14w1_therm provides basic temperature conversion for ds18*20 devices, and the
15ds28ea00 device.
15supported family codes: 16supported family codes:
16W1_THERM_DS18S20 0x10 17W1_THERM_DS18S20 0x10
17W1_THERM_DS1822 0x22 18W1_THERM_DS1822 0x22
18W1_THERM_DS18B20 0x28 19W1_THERM_DS18B20 0x28
19W1_THERM_DS1825 0x3B 20W1_THERM_DS1825 0x3B
21W1_THERM_DS28EA00 0x42
20 22
21Support is provided through the sysfs w1_slave file. Each open and 23Support is provided through the sysfs w1_slave file. Each open and
22read sequence will initiate a temperature conversion then provide two 24read sequence will initiate a temperature conversion then provide two
@@ -48,3 +50,10 @@ resistor). The DS18b20 temperature sensor specification lists a
48maximum current draw of 1.5mA and that a 5k pullup resistor is not 50maximum current draw of 1.5mA and that a 5k pullup resistor is not
49sufficient. The strong pullup is designed to provide the additional 51sufficient. The strong pullup is designed to provide the additional
50current required. 52current required.
53
54The DS28EA00 provides an additional two pins for implementing a sequence
55detection algorithm. This feature allows you to determine the physical
56location of the chip in the 1-wire bus without needing pre-existing
57knowledge of the bus ordering. Support is provided through the sysfs
58w1_seq file. The file will contain a single line with an integer value
59representing the device index in the bus starting at 0.
diff --git a/Documentation/w1/w1.generic b/Documentation/w1/w1.generic
index b2033c64c7da..b3ffaf8cfab2 100644
--- a/Documentation/w1/w1.generic
+++ b/Documentation/w1/w1.generic
@@ -76,21 +76,24 @@ See struct w1_bus_master definition in w1.h for details.
76 76
77w1 master sysfs interface 77w1 master sysfs interface
78------------------------------------------------------------------ 78------------------------------------------------------------------
79<xx-xxxxxxxxxxxxx> - a directory for a found device. The format is family-serial 79<xx-xxxxxxxxxxxxx> - A directory for a found device. The format is family-serial
80bus - (standard) symlink to the w1 bus 80bus - (standard) symlink to the w1 bus
81driver - (standard) symlink to the w1 driver 81driver - (standard) symlink to the w1 driver
82w1_master_add - Manually register a slave device 82w1_master_add - (rw) manually register a slave device
83w1_master_attempts - the number of times a search was attempted 83w1_master_attempts - (ro) the number of times a search was attempted
84w1_master_max_slave_count 84w1_master_max_slave_count
85 - maximum number of slaves to search for at a time 85 - (rw) maximum number of slaves to search for at a time
86w1_master_name - the name of the device (w1_bus_masterX) 86w1_master_name - (ro) the name of the device (w1_bus_masterX)
87w1_master_pullup - 5V strong pullup 0 enabled, 1 disabled 87w1_master_pullup - (rw) 5V strong pullup 0 enabled, 1 disabled
88w1_master_remove - Manually remove a slave device 88w1_master_remove - (rw) manually remove a slave device
89w1_master_search - the number of searches left to do, -1=continual (default) 89w1_master_search - (rw) the number of searches left to do,
90 -1=continual (default)
90w1_master_slave_count 91w1_master_slave_count
91 - the number of slaves found 92 - (ro) the number of slaves found
92w1_master_slaves - the names of the slaves, one per line 93w1_master_slaves - (ro) the names of the slaves, one per line
93w1_master_timeout - the delay in seconds between searches 94w1_master_timeout - (ro) the delay in seconds between searches
95w1_master_timeout_us
96 - (ro) the delay in microseconds beetwen searches
94 97
95If you have a w1 bus that never changes (you don't add or remove devices), 98If you have a w1 bus that never changes (you don't add or remove devices),
96you can set the module parameter search_count to a small positive number 99you can set the module parameter search_count to a small positive number
@@ -101,6 +104,11 @@ generally only make sense when searching is disabled, as a search will
101redetect manually removed devices that are present and timeout manually 104redetect manually removed devices that are present and timeout manually
102added devices that aren't on the bus. 105added devices that aren't on the bus.
103 106
107Bus searches occur at an interval, specified as a summ of timeout and
108timeout_us module parameters (either of which may be 0) for as long as
109w1_master_search remains greater than 0 or is -1. Each search attempt
110decrements w1_master_search by 1 (down to 0) and increments
111w1_master_attempts by 1.
104 112
105w1 slave sysfs interface 113w1 slave sysfs interface
106------------------------------------------------------------------ 114------------------------------------------------------------------
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt
index a0438f3957ca..d8b0d3367706 100644
--- a/Documentation/watchdog/watchdog-kernel-api.txt
+++ b/Documentation/watchdog/watchdog-kernel-api.txt
@@ -36,6 +36,10 @@ The watchdog_unregister_device routine deregisters a registered watchdog timer
36device. The parameter of this routine is the pointer to the registered 36device. The parameter of this routine is the pointer to the registered
37watchdog_device structure. 37watchdog_device structure.
38 38
39The watchdog subsystem includes an registration deferral mechanism,
40which allows you to register an watchdog as early as you wish during
41the boot process.
42
39The watchdog device structure looks like this: 43The watchdog device structure looks like this:
40 44
41struct watchdog_device { 45struct watchdog_device {
@@ -52,6 +56,7 @@ struct watchdog_device {
52 void *driver_data; 56 void *driver_data;
53 struct mutex lock; 57 struct mutex lock;
54 unsigned long status; 58 unsigned long status;
59 struct list_head deferred;
55}; 60};
56 61
57It contains following fields: 62It contains following fields:
@@ -80,6 +85,8 @@ It contains following fields:
80 information about the status of the device (Like: is the watchdog timer 85 information about the status of the device (Like: is the watchdog timer
81 running/active, is the nowayout bit set, is the device opened via 86 running/active, is the nowayout bit set, is the device opened via
82 the /dev/watchdog interface or not, ...). 87 the /dev/watchdog interface or not, ...).
88* deferred: entry in wtd_deferred_reg_list which is used to
89 register early initialized watchdogs.
83 90
84The list of watchdog operations is defined as: 91The list of watchdog operations is defined as:
85 92
diff --git a/Documentation/watchdog/watchdog-parameters.txt b/Documentation/watchdog/watchdog-parameters.txt
index 692791cc674c..9f9ec9f76039 100644
--- a/Documentation/watchdog/watchdog-parameters.txt
+++ b/Documentation/watchdog/watchdog-parameters.txt
@@ -208,6 +208,9 @@ nowayout: Watchdog cannot be stopped once started
208------------------------------------------------- 208-------------------------------------------------
209omap_wdt: 209omap_wdt:
210timer_margin: initial watchdog timeout (in seconds) 210timer_margin: initial watchdog timeout (in seconds)
211early_enable: Watchdog is started on module insertion (default=0
212nowayout: Watchdog cannot be stopped once started
213 (default=kernel config parameter)
211------------------------------------------------- 214-------------------------------------------------
212orion_wdt: 215orion_wdt:
213heartbeat: Initial watchdog heartbeat in seconds 216heartbeat: Initial watchdog heartbeat in seconds
diff --git a/Documentation/workqueue.txt b/Documentation/workqueue.txt
index f81a65b54c29..5e0e05c5183e 100644
--- a/Documentation/workqueue.txt
+++ b/Documentation/workqueue.txt
@@ -365,7 +365,7 @@ root 5674 0.0 0.0 0 0 ? S 12:13 0:00 [kworker/1:0]
365If kworkers are going crazy (using too much cpu), there are two types 365If kworkers are going crazy (using too much cpu), there are two types
366of possible problems: 366of possible problems:
367 367
368 1. Something beeing scheduled in rapid succession 368 1. Something being scheduled in rapid succession
369 2. A single work item that consumes lots of cpu cycles 369 2. A single work item that consumes lots of cpu cycles
370 370
371The first one can be tracked using tracing: 371The first one can be tracked using tracing:
diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
index 88b85899d309..9da6f3512249 100644
--- a/Documentation/x86/boot.txt
+++ b/Documentation/x86/boot.txt
@@ -406,7 +406,7 @@ Protocol: 2.00+
406 - If 0, the protected-mode code is loaded at 0x10000. 406 - If 0, the protected-mode code is loaded at 0x10000.
407 - If 1, the protected-mode code is loaded at 0x100000. 407 - If 1, the protected-mode code is loaded at 0x100000.
408 408
409 Bit 1 (kernel internal): ALSR_FLAG 409 Bit 1 (kernel internal): KASLR_FLAG
410 - Used internally by the compressed kernel to communicate 410 - Used internally by the compressed kernel to communicate
411 KASLR status to kernel proper. 411 KASLR status to kernel proper.
412 If 1, KASLR enabled. 412 If 1, KASLR enabled.
@@ -1124,7 +1124,6 @@ The boot loader *must* fill out the following fields in bp,
1124 1124
1125 o hdr.code32_start 1125 o hdr.code32_start
1126 o hdr.cmd_line_ptr 1126 o hdr.cmd_line_ptr
1127 o hdr.cmdline_size
1128 o hdr.ramdisk_image (if applicable) 1127 o hdr.ramdisk_image (if applicable)
1129 o hdr.ramdisk_size (if applicable) 1128 o hdr.ramdisk_size (if applicable)
1130 1129
diff --git a/Documentation/x86/entry_64.txt b/Documentation/x86/entry_64.txt
index 9132b86176a3..c1df8eba9dfd 100644
--- a/Documentation/x86/entry_64.txt
+++ b/Documentation/x86/entry_64.txt
@@ -1,14 +1,14 @@
1This file documents some of the kernel entries in 1This file documents some of the kernel entries in
2arch/x86/kernel/entry_64.S. A lot of this explanation is adapted from 2arch/x86/entry/entry_64.S. A lot of this explanation is adapted from
3an email from Ingo Molnar: 3an email from Ingo Molnar:
4 4
5http://lkml.kernel.org/r/<20110529191055.GC9835%40elte.hu> 5http://lkml.kernel.org/r/<20110529191055.GC9835%40elte.hu>
6 6
7The x86 architecture has quite a few different ways to jump into 7The x86 architecture has quite a few different ways to jump into
8kernel code. Most of these entry points are registered in 8kernel code. Most of these entry points are registered in
9arch/x86/kernel/traps.c and implemented in arch/x86/kernel/entry_64.S 9arch/x86/kernel/traps.c and implemented in arch/x86/entry/entry_64.S
10for 64-bit, arch/x86/kernel/entry_32.S for 32-bit and finally 10for 64-bit, arch/x86/entry/entry_32.S for 32-bit and finally
11arch/x86/ia32/ia32entry.S which implements the 32-bit compatibility 11arch/x86/entry/entry_64_compat.S which implements the 32-bit compatibility
12syscall entry points and thus provides for 32-bit processes the 12syscall entry points and thus provides for 32-bit processes the
13ability to execute syscalls when running on 64-bit kernels. 13ability to execute syscalls when running on 64-bit kernels.
14 14
@@ -18,10 +18,10 @@ Some of these entries are:
18 18
19 - system_call: syscall instruction from 64-bit code. 19 - system_call: syscall instruction from 64-bit code.
20 20
21 - ia32_syscall: int 0x80 from 32-bit or 64-bit code; compat syscall 21 - entry_INT80_compat: int 0x80 from 32-bit or 64-bit code; compat syscall
22 either way. 22 either way.
23 23
24 - ia32_syscall, ia32_sysenter: syscall and sysenter from 32-bit 24 - entry_INT80_compat, ia32_sysenter: syscall and sysenter from 32-bit
25 code 25 code
26 26
27 - interrupt: An array of entries. Every IDT vector that doesn't 27 - interrupt: An array of entries. Every IDT vector that doesn't
diff --git a/Documentation/x86/x86_64/kernel-stacks b/Documentation/x86/kernel-stacks
index e3c8a49d1a2f..0f3a6c201943 100644
--- a/Documentation/x86/x86_64/kernel-stacks
+++ b/Documentation/x86/kernel-stacks
@@ -1,3 +1,6 @@
1Kernel stacks on x86-64 bit
2---------------------------
3
1Most of the text from Keith Owens, hacked by AK 4Most of the text from Keith Owens, hacked by AK
2 5
3x86_64 page size (PAGE_SIZE) is 4K. 6x86_64 page size (PAGE_SIZE) is 4K.
@@ -56,13 +59,6 @@ If that assumption is ever broken then the stacks will become corrupt.
56 59
57The currently assigned IST stacks are :- 60The currently assigned IST stacks are :-
58 61
59* STACKFAULT_STACK. EXCEPTION_STKSZ (PAGE_SIZE).
60
61 Used for interrupt 12 - Stack Fault Exception (#SS).
62
63 This allows the CPU to recover from invalid stack segments. Rarely
64 happens.
65
66* DOUBLEFAULT_STACK. EXCEPTION_STKSZ (PAGE_SIZE). 62* DOUBLEFAULT_STACK. EXCEPTION_STKSZ (PAGE_SIZE).
67 63
68 Used for interrupt 8 - Double Fault Exception (#DF). 64 Used for interrupt 8 - Double Fault Exception (#DF).
@@ -99,3 +95,47 @@ The currently assigned IST stacks are :-
99 assumptions about the previous state of the kernel stack. 95 assumptions about the previous state of the kernel stack.
100 96
101For more details see the Intel IA32 or AMD AMD64 architecture manuals. 97For more details see the Intel IA32 or AMD AMD64 architecture manuals.
98
99
100Printing backtraces on x86
101--------------------------
102
103The question about the '?' preceding function names in an x86 stacktrace
104keeps popping up, here's an indepth explanation. It helps if the reader
105stares at print_context_stack() and the whole machinery in and around
106arch/x86/kernel/dumpstack.c.
107
108Adapted from Ingo's mail, Message-ID: <20150521101614.GA10889@gmail.com>:
109
110We always scan the full kernel stack for return addresses stored on
111the kernel stack(s) [*], from stack top to stack bottom, and print out
112anything that 'looks like' a kernel text address.
113
114If it fits into the frame pointer chain, we print it without a question
115mark, knowing that it's part of the real backtrace.
116
117If the address does not fit into our expected frame pointer chain we
118still print it, but we print a '?'. It can mean two things:
119
120 - either the address is not part of the call chain: it's just stale
121 values on the kernel stack, from earlier function calls. This is
122 the common case.
123
124 - or it is part of the call chain, but the frame pointer was not set
125 up properly within the function, so we don't recognize it.
126
127This way we will always print out the real call chain (plus a few more
128entries), regardless of whether the frame pointer was set up correctly
129or not - but in most cases we'll get the call chain right as well. The
130entries printed are strictly in stack order, so you can deduce more
131information from that as well.
132
133The most important property of this method is that we _never_ lose
134information: we always strive to print _all_ addresses on the stack(s)
135that look like kernel text addresses, so if debug information is wrong,
136we still print out the real call chain as well - just with more question
137marks than ideal.
138
139[*] For things like IRQ and IST stacks, we also scan those stacks, in
140 the right order, and try to cross from one stack into another
141 reconstructing the call chain. This works most of the time.
diff --git a/Documentation/x86/mtrr.txt b/Documentation/x86/mtrr.txt
index cc071dc333c2..860bc3adc223 100644
--- a/Documentation/x86/mtrr.txt
+++ b/Documentation/x86/mtrr.txt
@@ -1,7 +1,19 @@
1MTRR (Memory Type Range Register) control 1MTRR (Memory Type Range Register) control
23 Jun 1999 2
3Richard Gooch 3Richard Gooch <rgooch@atnf.csiro.au> - 3 Jun 1999
4<rgooch@atnf.csiro.au> 4Luis R. Rodriguez <mcgrof@do-not-panic.com> - April 9, 2015
5
6===============================================================================
7Phasing out MTRR use
8
9MTRR use is replaced on modern x86 hardware with PAT. Over time the only type
10of effective MTRR that is expected to be supported will be for write-combining.
11As MTRR use is phased out device drivers should use arch_phys_wc_add() to make
12MTRR effective on non-PAT systems while a no-op on PAT enabled systems.
13
14For details refer to Documentation/x86/pat.txt.
15
16===============================================================================
5 17
6 On Intel P6 family processors (Pentium Pro, Pentium II and later) 18 On Intel P6 family processors (Pentium Pro, Pentium II and later)
7 the Memory Type Range Registers (MTRRs) may be used to control 19 the Memory Type Range Registers (MTRRs) may be used to control
diff --git a/Documentation/x86/pat.txt b/Documentation/x86/pat.txt
index cf08c9fff3cd..54944c71b819 100644
--- a/Documentation/x86/pat.txt
+++ b/Documentation/x86/pat.txt
@@ -12,7 +12,7 @@ virtual addresses.
12 12
13PAT allows for different types of memory attributes. The most commonly used 13PAT allows for different types of memory attributes. The most commonly used
14ones that will be supported at this time are Write-back, Uncached, 14ones that will be supported at this time are Write-back, Uncached,
15Write-combined and Uncached Minus. 15Write-combined, Write-through and Uncached Minus.
16 16
17 17
18PAT APIs 18PAT APIs
@@ -34,16 +34,23 @@ ioremap | -- | UC- | UC- |
34 | | | | 34 | | | |
35ioremap_cache | -- | WB | WB | 35ioremap_cache | -- | WB | WB |
36 | | | | 36 | | | |
37ioremap_uc | -- | UC | UC |
38 | | | |
37ioremap_nocache | -- | UC- | UC- | 39ioremap_nocache | -- | UC- | UC- |
38 | | | | 40 | | | |
39ioremap_wc | -- | -- | WC | 41ioremap_wc | -- | -- | WC |
40 | | | | 42 | | | |
43ioremap_wt | -- | -- | WT |
44 | | | |
41set_memory_uc | UC- | -- | -- | 45set_memory_uc | UC- | -- | -- |
42 set_memory_wb | | | | 46 set_memory_wb | | | |
43 | | | | 47 | | | |
44set_memory_wc | WC | -- | -- | 48set_memory_wc | WC | -- | -- |
45 set_memory_wb | | | | 49 set_memory_wb | | | |
46 | | | | 50 | | | |
51set_memory_wt | WT | -- | -- |
52 set_memory_wb | | | |
53 | | | |
47pci sysfs resource | -- | -- | UC- | 54pci sysfs resource | -- | -- | UC- |
48 | | | | 55 | | | |
49pci sysfs resource_wc | -- | -- | WC | 56pci sysfs resource_wc | -- | -- | WC |
@@ -102,7 +109,38 @@ wants to export a RAM region, it has to do set_memory_uc() or set_memory_wc()
102as step 0 above and also track the usage of those pages and use set_memory_wb() 109as step 0 above and also track the usage of those pages and use set_memory_wb()
103before the page is freed to free pool. 110before the page is freed to free pool.
104 111
105 112MTRR effects on PAT / non-PAT systems
113-------------------------------------
114
115The following table provides the effects of using write-combining MTRRs when
116using ioremap*() calls on x86 for both non-PAT and PAT systems. Ideally
117mtrr_add() usage will be phased out in favor of arch_phys_wc_add() which will
118be a no-op on PAT enabled systems. The region over which a arch_phys_wc_add()
119is made, should already have been ioremapped with WC attributes or PAT entries,
120this can be done by using ioremap_wc() / set_memory_wc(). Devices which
121combine areas of IO memory desired to remain uncacheable with areas where
122write-combining is desirable should consider use of ioremap_uc() followed by
123set_memory_wc() to white-list effective write-combined areas. Such use is
124nevertheless discouraged as the effective memory type is considered
125implementation defined, yet this strategy can be used as last resort on devices
126with size-constrained regions where otherwise MTRR write-combining would
127otherwise not be effective.
128
129----------------------------------------------------------------------
130MTRR Non-PAT PAT Linux ioremap value Effective memory type
131----------------------------------------------------------------------
132 Non-PAT | PAT
133 PAT
134 |PCD
135 ||PWT
136 |||
137WC 000 WB _PAGE_CACHE_MODE_WB WC | WC
138WC 001 WC _PAGE_CACHE_MODE_WC WC* | WC
139WC 010 UC- _PAGE_CACHE_MODE_UC_MINUS WC* | UC
140WC 011 UC _PAGE_CACHE_MODE_UC UC | UC
141----------------------------------------------------------------------
142
143(*) denotes implementation defined and is discouraged
106 144
107Notes: 145Notes:
108 146
@@ -115,8 +153,8 @@ can be more restrictive, in case of any existing aliasing for that address.
115For example: If there is an existing uncached mapping, a new ioremap_wc can 153For example: If there is an existing uncached mapping, a new ioremap_wc can
116return uncached mapping in place of write-combine requested. 154return uncached mapping in place of write-combine requested.
117 155
118set_memory_[uc|wc] and set_memory_wb should be used in pairs, where driver will 156set_memory_[uc|wc|wt] and set_memory_wb should be used in pairs, where driver
119first make a region uc or wc and switch it back to wb after use. 157will first make a region uc, wc or wt and switch it back to wb after use.
120 158
121Over time writes to /proc/mtrr will be deprecated in favor of using PAT based 159Over time writes to /proc/mtrr will be deprecated in favor of using PAT based
122interfaces. Users writing to /proc/mtrr are suggested to use above interfaces. 160interfaces. Users writing to /proc/mtrr are suggested to use above interfaces.
@@ -124,7 +162,7 @@ interfaces. Users writing to /proc/mtrr are suggested to use above interfaces.
124Drivers should use ioremap_[uc|wc] to access PCI BARs with [uc|wc] access 162Drivers should use ioremap_[uc|wc] to access PCI BARs with [uc|wc] access
125types. 163types.
126 164
127Drivers should use set_memory_[uc|wc] to set access type for RAM ranges. 165Drivers should use set_memory_[uc|wc|wt] to set access type for RAM ranges.
128 166
129 167
130PAT debugging 168PAT debugging
diff --git a/Documentation/x86/x86_64/boot-options.txt b/Documentation/x86/x86_64/boot-options.txt
index 5223479291a2..68ed3114c363 100644
--- a/Documentation/x86/x86_64/boot-options.txt
+++ b/Documentation/x86/x86_64/boot-options.txt
@@ -31,6 +31,9 @@ Machine check
31 (e.g. BIOS or hardware monitoring applications), conflicting 31 (e.g. BIOS or hardware monitoring applications), conflicting
32 with OS's error handling, and you cannot deactivate the agent, 32 with OS's error handling, and you cannot deactivate the agent,
33 then this option will be a help. 33 then this option will be a help.
34 mce=no_lmce
35 Do not opt-in to Local MCE delivery. Use legacy method
36 to broadcast MCEs.
34 mce=bootlog 37 mce=bootlog
35 Enable logging of machine checks left over from booting. 38 Enable logging of machine checks left over from booting.
36 Disabled by default on AMD because some BIOS leave bogus ones. 39 Disabled by default on AMD because some BIOS leave bogus ones.
diff --git a/Documentation/zh_CN/gpio.txt b/Documentation/zh_CN/gpio.txt
index d5b8f01833f4..bce972521065 100644
--- a/Documentation/zh_CN/gpio.txt
+++ b/Documentation/zh_CN/gpio.txt
@@ -638,9 +638,6 @@ GPIO 控制器的路径类似 /sys/class/gpio/gpiochip42/ (对于从#42 GPIO
638 int gpio_export_link(struct device *dev, const char *name, 638 int gpio_export_link(struct device *dev, const char *name,
639 unsigned gpio) 639 unsigned gpio)
640 640
641 /* 改变 sysfs 中的一个 GPIO 节点的极性 */
642 int gpio_sysfs_set_active_low(unsigned gpio, int value);
643
644在一个内核驱动申请一个 GPIO 之后,它可以通过 gpio_export()使其在 sysfs 641在一个内核驱动申请一个 GPIO 之后,它可以通过 gpio_export()使其在 sysfs
645接口中可见。该驱动可以控制信号方向是否可修改。这有助于防止用户空间代码无意间 642接口中可见。该驱动可以控制信号方向是否可修改。这有助于防止用户空间代码无意间
646破坏重要的系统状态。 643破坏重要的系统状态。
@@ -651,8 +648,3 @@ GPIO 控制器的路径类似 /sys/class/gpio/gpiochip42/ (对于从#42 GPIO
651在 GPIO 被导出之后,gpio_export_link()允许在 sysfs 文件系统的任何地方 648在 GPIO 被导出之后,gpio_export_link()允许在 sysfs 文件系统的任何地方
652创建一个到这个 GPIO sysfs 节点的符号链接。这样驱动就可以通过一个描述性的 649创建一个到这个 GPIO sysfs 节点的符号链接。这样驱动就可以通过一个描述性的
653名字,在 sysfs 中他们所拥有的设备下提供一个(到这个 GPIO sysfs 节点的)接口。 650名字,在 sysfs 中他们所拥有的设备下提供一个(到这个 GPIO sysfs 节点的)接口。
654
655驱动可以使用 gpio_sysfs_set_active_low() 来在用户空间隐藏电路板之间
656GPIO 线的极性差异。这个仅对 sysfs 接口起作用。极性的改变可以在 gpio_export()
657前后进行,且之前使能的轮询操作(poll(2))支持(上升或下降沿)将会被重新配置来遵循
658这个设置。
diff --git a/Documentation/zh_CN/magic-number.txt b/Documentation/zh_CN/magic-number.txt
index dfb72a5c63e9..e9db693c0a23 100644
--- a/Documentation/zh_CN/magic-number.txt
+++ b/Documentation/zh_CN/magic-number.txt
@@ -116,7 +116,6 @@ COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c
116I810_CARD_MAGIC 0x5072696E i810_card sound/oss/i810_audio.c 116I810_CARD_MAGIC 0x5072696E i810_card sound/oss/i810_audio.c
117TRIDENT_CARD_MAGIC 0x5072696E trident_card sound/oss/trident.c 117TRIDENT_CARD_MAGIC 0x5072696E trident_card sound/oss/trident.c
118ROUTER_MAGIC 0x524d4157 wan_device [in wanrouter.h pre 3.9] 118ROUTER_MAGIC 0x524d4157 wan_device [in wanrouter.h pre 3.9]
119SCC_MAGIC 0x52696368 gs_port drivers/char/scc.h
120SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c 119SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c
121GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h 120GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h
122RED_MAGIC1 0x5a2cf071 (any) mm/slab.c 121RED_MAGIC1 0x5a2cf071 (any) mm/slab.c
@@ -138,7 +137,6 @@ KMALLOC_MAGIC 0x87654321 snd_alloc_track sound/core/memory.c
138PWC_MAGIC 0x89DC10AB pwc_device drivers/usb/media/pwc.h 137PWC_MAGIC 0x89DC10AB pwc_device drivers/usb/media/pwc.h
139NBD_REPLY_MAGIC 0x96744668 nbd_reply include/linux/nbd.h 138NBD_REPLY_MAGIC 0x96744668 nbd_reply include/linux/nbd.h
140ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h 139ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h
141SCI_MAGIC 0xbabeface gs_port drivers/char/sh-sci.h
142CODA_MAGIC 0xC0DAC0DA coda_file_info include/linux/coda_fs_i.h 140CODA_MAGIC 0xC0DAC0DA coda_file_info include/linux/coda_fs_i.h
143DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h 141DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h
144YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c 142YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c