aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/00-INDEX2
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget81
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-acm8
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-ecm16
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-eem14
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-ncm15
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-obex9
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-phonet8
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-rndis14
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-serial9
-rw-r--r--Documentation/ABI/testing/configfs-usb-gadget-subset14
-rw-r--r--Documentation/ABI/testing/sysfs-bus-event_source-devices-events32
-rw-r--r--Documentation/ABI/testing/sysfs-bus-event_source-devices-format6
-rw-r--r--Documentation/ABI/testing/sysfs-bus-iio90
-rw-r--r--Documentation/ABI/testing/sysfs-bus-pci5
-rw-r--r--Documentation/ABI/testing/sysfs-bus-usb27
-rw-r--r--Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc19
-rw-r--r--Documentation/DocBook/genericirq.tmpl13
-rw-r--r--Documentation/HOWTO2
-rw-r--r--Documentation/RCU/checklist.txt6
-rw-r--r--Documentation/RCU/torture.txt6
-rw-r--r--Documentation/RCU/trace.txt100
-rw-r--r--Documentation/RCU/whatisRCU.txt22
-rw-r--r--Documentation/SubmitChecklist2
-rw-r--r--Documentation/acpi/apei/einj.txt9
-rw-r--r--Documentation/arm/sti/overview.txt33
-rw-r--r--Documentation/arm/sti/stih415-overview.txt12
-rw-r--r--Documentation/arm/sti/stih416-overview.txt12
-rw-r--r--Documentation/arm/sunxi/README23
-rw-r--r--Documentation/cgroups/cpusets.txt2
-rw-r--r--Documentation/console/console.txt28
-rw-r--r--Documentation/cpu-hotplug.txt2
-rw-r--r--Documentation/devicetree/bindings/arm/cci.txt172
-rw-r--r--Documentation/devicetree/bindings/arm/keystone/keystone.txt10
-rw-r--r--Documentation/devicetree/bindings/arm/nspire.txt14
-rw-r--r--Documentation/devicetree/bindings/arm/omap/omap.txt3
-rw-r--r--Documentation/devicetree/bindings/arm/rtsm-dcscb.txt19
-rw-r--r--Documentation/devicetree/bindings/arm/ste-nomadik.txt5
-rw-r--r--Documentation/devicetree/bindings/arm/ste-u300.txt46
-rw-r--r--Documentation/devicetree/bindings/ata/atmel-at91_cf.txt19
-rw-r--r--Documentation/devicetree/bindings/bus/imx-weim.txt49
-rw-r--r--Documentation/devicetree/bindings/bus/ti-gpmc.txt1
-rw-r--r--Documentation/devicetree/bindings/clock/altr_socfpga.txt7
-rw-r--r--Documentation/devicetree/bindings/clock/clk-exynos-audss.txt64
-rw-r--r--Documentation/devicetree/bindings/clock/exynos4-clock.txt3
-rw-r--r--Documentation/devicetree/bindings/clock/exynos5420-clock.txt201
-rw-r--r--Documentation/devicetree/bindings/clock/imx5-clock.txt13
-rw-r--r--Documentation/devicetree/bindings/clock/imx6q-clock.txt1
-rw-r--r--Documentation/devicetree/bindings/clock/imx6sl-clock.txt10
-rw-r--r--Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt252
-rw-r--r--Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt154
-rw-r--r--Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt211
-rw-r--r--Documentation/devicetree/bindings/clock/st,nomadik.txt104
-rw-r--r--Documentation/devicetree/bindings/clock/ste-u300-syscon-clock.txt80
-rw-r--r--Documentation/devicetree/bindings/clock/vf610-clock.txt26
-rw-r--r--Documentation/devicetree/bindings/clock/zynq-7000.txt123
-rw-r--r--Documentation/devicetree/bindings/dma/ste-coh901318.txt32
-rw-r--r--Documentation/devicetree/bindings/dma/ste-dma40.txt66
-rw-r--r--Documentation/devicetree/bindings/dma/ti-edma.txt34
-rw-r--r--Documentation/devicetree/bindings/extcon/extcon-twl.txt15
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-clps711x.txt28
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-msm.txt26
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-samsung.txt43
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-stericsson-coh901.txt7
-rw-r--r--Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt46
-rw-r--r--Documentation/devicetree/bindings/gpu/samsung-g2d.txt5
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-st-ddci2c.txt15
-rw-r--r--Documentation/devicetree/bindings/iio/dac/ad7303.txt23
-rw-r--r--Documentation/devicetree/bindings/iio/frequency/adf4350.txt86
-rw-r--r--Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt18
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/abilis,tb10x-ictl.txt38
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt87
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/marvell,orion-intc.txt48
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt16
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/sunxi/sun4i-a10.txt89
-rw-r--r--Documentation/devicetree/bindings/interrupt-controller/sunxi/sun5i-a13.txt55
-rw-r--r--Documentation/devicetree/bindings/media/s5p-mfc.txt5
-rw-r--r--Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt156
-rw-r--r--Documentation/devicetree/bindings/mfd/ab8500.txt2
-rw-r--r--Documentation/devicetree/bindings/mmc/bcm,kona-sdhci.txt16
-rw-r--r--Documentation/devicetree/bindings/mtd/gpmc-nand.txt8
-rw-r--r--Documentation/devicetree/bindings/pci/designware-pcie.txt73
-rw-r--r--Documentation/devicetree/bindings/pci/mvebu-pci.txt221
-rw-r--r--Documentation/devicetree/bindings/pci/pci.txt9
-rw-r--r--Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt15
-rw-r--r--Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt2
-rw-r--r--Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt53
-rw-r--r--Documentation/devicetree/bindings/rtc/dw-apb.txt19
-rw-r--r--Documentation/devicetree/bindings/sound/samsung-i2s.txt46
-rw-r--r--Documentation/devicetree/bindings/staging/imx-drm/ldb.txt99
-rw-r--r--Documentation/devicetree/bindings/timer/stericsson-u300-apptimer.txt18
-rw-r--r--Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt3
-rw-r--r--Documentation/devicetree/bindings/tty/serial/fsl-lpuart.txt14
-rw-r--r--Documentation/devicetree/bindings/usb/atmel-usb.txt82
-rw-r--r--Documentation/devicetree/bindings/usb/ci13xxx-imx.txt6
-rw-r--r--Documentation/devicetree/bindings/usb/exynos-usb.txt34
-rw-r--r--Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt27
-rw-r--r--Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt41
-rw-r--r--Documentation/devicetree/bindings/usb/usb3503.txt5
-rw-r--r--Documentation/devicetree/bindings/usb/ux500-usb.txt50
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt2
-rw-r--r--Documentation/devicetree/bindings/video/exynos_dp.txt6
-rw-r--r--Documentation/devicetree/bindings/watchdog/stericsson-coh901327.txt19
-rw-r--r--Documentation/filesystems/Locking43
-rw-r--r--Documentation/filesystems/f2fs.txt9
-rw-r--r--Documentation/filesystems/porting6
-rw-r--r--Documentation/filesystems/vfs.txt48
-rw-r--r--Documentation/fmc/00-INDEX38
-rw-r--r--Documentation/fmc/API.txt47
-rw-r--r--Documentation/fmc/FMC-and-SDB.txt88
-rw-r--r--Documentation/fmc/carrier.txt311
-rw-r--r--Documentation/fmc/fmc-chardev.txt64
-rw-r--r--Documentation/fmc/fmc-fakedev.txt36
-rw-r--r--Documentation/fmc/fmc-trivial.txt17
-rw-r--r--Documentation/fmc/fmc-write-eeprom.txt125
-rw-r--r--Documentation/fmc/identifiers.txt168
-rw-r--r--Documentation/fmc/mezzanine.txt123
-rw-r--r--Documentation/fmc/parameters.txt56
-rw-r--r--Documentation/hwmon/submitting-patches3
-rw-r--r--Documentation/kbuild/kconfig.txt2
-rw-r--r--Documentation/kernel-parameters.txt15
-rw-r--r--Documentation/kernel-per-CPU-kthreads.txt47
-rw-r--r--Documentation/networking/ip-sysctl.txt4
-rw-r--r--Documentation/rt-mutex-design.txt2
-rw-r--r--Documentation/scheduler/sched-domains.txt4
-rw-r--r--Documentation/serial/00-INDEX2
-rw-r--r--Documentation/serial/stallion.txt392
-rw-r--r--Documentation/spinlocks.txt2
-rw-r--r--Documentation/sysctl/kernel.txt50
-rw-r--r--Documentation/timers/NO_HZ.txt79
-rw-r--r--Documentation/trace/events-nmi.txt43
-rw-r--r--Documentation/usb/gadget_configfs.txt384
-rw-r--r--Documentation/usb/hotplug.txt6
-rw-r--r--Documentation/virtual/uml/UserModeLinux-HOWTO.txt4
-rw-r--r--Documentation/w1/w1.generic4
-rw-r--r--Documentation/ww-mutex-design.txt344
-rw-r--r--Documentation/x86/early-microcode.txt11
137 files changed, 5103 insertions, 1510 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index 45b3df936d2f..0c4cc688e89a 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -187,6 +187,8 @@ firmware_class/
187 - request_firmware() hotplug interface info. 187 - request_firmware() hotplug interface info.
188flexible-arrays.txt 188flexible-arrays.txt
189 - how to make use of flexible sized arrays in linux 189 - how to make use of flexible sized arrays in linux
190fmc/
191 - information about the FMC bus abstraction
190frv/ 192frv/
191 - Fujitsu FR-V Linux documentation. 193 - Fujitsu FR-V Linux documentation.
192futex-requeue-pi.txt 194futex-requeue-pi.txt
diff --git a/Documentation/ABI/testing/configfs-usb-gadget b/Documentation/ABI/testing/configfs-usb-gadget
new file mode 100644
index 000000000000..01e769d6984d
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget
@@ -0,0 +1,81 @@
1What: /config/usb-gadget
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5 This group contains sub-groups corresponding to created
6 USB gadgets.
7
8What: /config/usb-gadget/gadget
9Date: Jun 2013
10KenelVersion: 3.11
11Description:
12
13 The attributes of a gadget:
14
15 UDC - bind a gadget to UDC/unbind a gadget;
16 write UDC's name found in /sys/class/udc/*
17 to bind a gadget, empty string "" to unbind.
18
19 bDeviceClass - USB device class code
20 bDeviceSubClass - USB device subclass code
21 bDeviceProtocol - USB device protocol code
22 bMaxPacketSize0 - maximum endpoint 0 packet size
23 bcdDevice - bcd device release number
24 bcdUSB - bcd USB specification version number
25 idProduct - product ID
26 idVendor - vendor ID
27
28What: /config/usb-gadget/gadget/configs
29Date: Jun 2013
30KenelVersion: 3.11
31Description:
32 This group contains a USB gadget's configurations
33
34What: /config/usb-gadget/gadget/configs/config
35Date: Jun 2013
36KernelVersion: 3.11
37Description:
38 The attributes of a configuration:
39
40 bmAttributes - configuration characteristics
41 MaxPower - maximum power consumption from the bus
42
43What: /config/usb-gadget/gadget/configs/config/strings
44Date: Jun 2013
45KernelVersion: 3.11
46Description:
47 This group contains subdirectories for language-specific
48 strings for this configuration.
49
50What: /config/usb-gadget/gadget/configs/config/strings/language
51Date: Jun 2013
52KernelVersion: 3.11
53Description:
54 The attributes:
55
56 configuration - configuration description
57
58
59What: /config/usb-gadget/gadget/functions
60Date: Jun 2013
61KenelVersion: 3.11
62Description:
63 This group contains functions available to this USB gadget.
64
65What: /config/usb-gadget/gadget/strings
66Date: Jun 2013
67KenelVersion: 3.11
68Description:
69 This group contains subdirectories for language-specific
70 strings for this gadget.
71
72What: /config/usb-gadget/gadget/strings/language
73Date: Jun 2013
74KenelVersion: 3.11
75Description:
76 The attributes:
77
78 serialnumber - gadget's serial number (string)
79 product - gadget's product description
80 manufacturer - gadget's manufacturer description
81
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-acm b/Documentation/ABI/testing/configfs-usb-gadget-acm
new file mode 100644
index 000000000000..5708a568b5f6
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-acm
@@ -0,0 +1,8 @@
1What: /config/usb-gadget/gadget/functions/acm.name
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5
6 This item contains just one readonly attribute: port_num.
7 It contains the port number of the /dev/ttyGS<n> device
8 associated with acm function's instance "name".
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-ecm b/Documentation/ABI/testing/configfs-usb-gadget-ecm
new file mode 100644
index 000000000000..6b9a582ce0b5
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-ecm
@@ -0,0 +1,16 @@
1What: /config/usb-gadget/gadget/functions/ecm.name
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5 The attributes:
6
7 ifname - network device interface name associated with
8 this function instance
9 qmult - queue length multiplier for high and
10 super speed
11 host_addr - MAC address of host's end of this
12 Ethernet over USB link
13 dev_addr - MAC address of device's end of this
14 Ethernet over USB link
15
16
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-eem b/Documentation/ABI/testing/configfs-usb-gadget-eem
new file mode 100644
index 000000000000..dbddf36b48b3
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-eem
@@ -0,0 +1,14 @@
1What: /config/usb-gadget/gadget/functions/eem.name
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5 The attributes:
6
7 ifname - network device interface name associated with
8 this function instance
9 qmult - queue length multiplier for high and
10 super speed
11 host_addr - MAC address of host's end of this
12 Ethernet over USB link
13 dev_addr - MAC address of device's end of this
14 Ethernet over USB link
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-ncm b/Documentation/ABI/testing/configfs-usb-gadget-ncm
new file mode 100644
index 000000000000..bc309f42357d
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-ncm
@@ -0,0 +1,15 @@
1What: /config/usb-gadget/gadget/functions/ncm.name
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5 The attributes:
6
7 ifname - network device interface name associated with
8 this function instance
9 qmult - queue length multiplier for high and
10 super speed
11 host_addr - MAC address of host's end of this
12 Ethernet over USB link
13 dev_addr - MAC address of device's end of this
14 Ethernet over USB link
15
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-obex b/Documentation/ABI/testing/configfs-usb-gadget-obex
new file mode 100644
index 000000000000..aaa5c96fb7c6
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-obex
@@ -0,0 +1,9 @@
1What: /config/usb-gadget/gadget/functions/obex.name
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5
6 This item contains just one readonly attribute: port_num.
7 It contains the port number of the /dev/ttyGS<n> device
8 associated with obex function's instance "name".
9
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-phonet b/Documentation/ABI/testing/configfs-usb-gadget-phonet
new file mode 100644
index 000000000000..3e3b742cdfd7
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-phonet
@@ -0,0 +1,8 @@
1What: /config/usb-gadget/gadget/functions/phonet.name
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5
6 This item contains just one readonly attribute: ifname.
7 It contains the network interface name assigned during
8 network device registration.
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-rndis b/Documentation/ABI/testing/configfs-usb-gadget-rndis
new file mode 100644
index 000000000000..822e6dad8fc0
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-rndis
@@ -0,0 +1,14 @@
1What: /config/usb-gadget/gadget/functions/rndis.name
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5 The attributes:
6
7 ifname - network device interface name associated with
8 this function instance
9 qmult - queue length multiplier for high and
10 super speed
11 host_addr - MAC address of host's end of this
12 Ethernet over USB link
13 dev_addr - MAC address of device's end of this
14 Ethernet over USB link
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-serial b/Documentation/ABI/testing/configfs-usb-gadget-serial
new file mode 100644
index 000000000000..16f130c1501f
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-serial
@@ -0,0 +1,9 @@
1What: /config/usb-gadget/gadget/functions/gser.name
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5
6 This item contains just one readonly attribute: port_num.
7 It contains the port number of the /dev/ttyGS<n> device
8 associated with gser function's instance "name".
9
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-subset b/Documentation/ABI/testing/configfs-usb-gadget-subset
new file mode 100644
index 000000000000..154ae597cd99
--- /dev/null
+++ b/Documentation/ABI/testing/configfs-usb-gadget-subset
@@ -0,0 +1,14 @@
1What: /config/usb-gadget/gadget/functions/geth.name
2Date: Jun 2013
3KenelVersion: 3.11
4Description:
5 The attributes:
6
7 ifname - network device interface name associated with
8 this function instance
9 qmult - queue length multiplier for high and
10 super speed
11 host_addr - MAC address of host's end of this
12 Ethernet over USB link
13 dev_addr - MAC address of device's end of this
14 Ethernet over USB link
diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
index 0adeb524c0d4..8b25ffb42562 100644
--- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
+++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-events
@@ -27,14 +27,36 @@ Description: Generic performance monitoring events
27 "basename". 27 "basename".
28 28
29 29
30What: /sys/devices/cpu/events/PM_LD_MISS_L1 30What: /sys/devices/cpu/events/PM_1PLUS_PPC_CMPL
31 /sys/devices/cpu/events/PM_LD_REF_L1
32 /sys/devices/cpu/events/PM_CYC
33 /sys/devices/cpu/events/PM_BRU_FIN 31 /sys/devices/cpu/events/PM_BRU_FIN
34 /sys/devices/cpu/events/PM_GCT_NOSLOT_CYC
35 /sys/devices/cpu/events/PM_BRU_MPRED 32 /sys/devices/cpu/events/PM_BRU_MPRED
36 /sys/devices/cpu/events/PM_INST_CMPL
37 /sys/devices/cpu/events/PM_CMPLU_STALL 33 /sys/devices/cpu/events/PM_CMPLU_STALL
34 /sys/devices/cpu/events/PM_CMPLU_STALL_BRU
35 /sys/devices/cpu/events/PM_CMPLU_STALL_DCACHE_MISS
36 /sys/devices/cpu/events/PM_CMPLU_STALL_DFU
37 /sys/devices/cpu/events/PM_CMPLU_STALL_DIV
38 /sys/devices/cpu/events/PM_CMPLU_STALL_ERAT_MISS
39 /sys/devices/cpu/events/PM_CMPLU_STALL_FXU
40 /sys/devices/cpu/events/PM_CMPLU_STALL_IFU
41 /sys/devices/cpu/events/PM_CMPLU_STALL_LSU
42 /sys/devices/cpu/events/PM_CMPLU_STALL_REJECT
43 /sys/devices/cpu/events/PM_CMPLU_STALL_SCALAR
44 /sys/devices/cpu/events/PM_CMPLU_STALL_SCALAR_LONG
45 /sys/devices/cpu/events/PM_CMPLU_STALL_STORE
46 /sys/devices/cpu/events/PM_CMPLU_STALL_THRD
47 /sys/devices/cpu/events/PM_CMPLU_STALL_VECTOR
48 /sys/devices/cpu/events/PM_CMPLU_STALL_VECTOR_LONG
49 /sys/devices/cpu/events/PM_CYC
50 /sys/devices/cpu/events/PM_GCT_NOSLOT_BR_MPRED
51 /sys/devices/cpu/events/PM_GCT_NOSLOT_BR_MPRED_IC_MISS
52 /sys/devices/cpu/events/PM_GCT_NOSLOT_CYC
53 /sys/devices/cpu/events/PM_GCT_NOSLOT_IC_MISS
54 /sys/devices/cpu/events/PM_GRP_CMPL
55 /sys/devices/cpu/events/PM_INST_CMPL
56 /sys/devices/cpu/events/PM_LD_MISS_L1
57 /sys/devices/cpu/events/PM_LD_REF_L1
58 /sys/devices/cpu/events/PM_RUN_CYC
59 /sys/devices/cpu/events/PM_RUN_INST_CMPL
38 60
39Date: 2013/01/08 61Date: 2013/01/08
40 62
diff --git a/Documentation/ABI/testing/sysfs-bus-event_source-devices-format b/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
index 079afc71363d..77f47ff5ee02 100644
--- a/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
+++ b/Documentation/ABI/testing/sysfs-bus-event_source-devices-format
@@ -9,6 +9,12 @@ Description:
9 we want to export, so that userspace can deal with sane 9 we want to export, so that userspace can deal with sane
10 name/value pairs. 10 name/value pairs.
11 11
12 Userspace must be prepared for the possibility that attributes
13 define overlapping bit ranges. For example:
14 attr1 = 'config:0-23'
15 attr2 = 'config:0-7'
16 attr3 = 'config:12-35'
17
12 Example: 'config1:1,6-10,44' 18 Example: 'config1:1,6-10,44'
13 Defines contents of attribute that occupies bits 1,6-10,44 of 19 Defines contents of attribute that occupies bits 1,6-10,44 of
14 perf_event_attr::config1. 20 perf_event_attr::config1.
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index 2e33dc6b2346..dda81ffae5cf 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -690,45 +690,45 @@ Description:
690 Actually start the buffer capture up. Will start trigger 690 Actually start the buffer capture up. Will start trigger
691 if first device and appropriate. 691 if first device and appropriate.
692 692
693What: /sys/bus/iio/devices/iio:deviceX/buffer/scan_elements 693What: /sys/bus/iio/devices/iio:deviceX/scan_elements
694KernelVersion: 2.6.37 694KernelVersion: 2.6.37
695Contact: linux-iio@vger.kernel.org 695Contact: linux-iio@vger.kernel.org
696Description: 696Description:
697 Directory containing interfaces for elements that will be 697 Directory containing interfaces for elements that will be
698 captured for a single triggered sample set in the buffer. 698 captured for a single triggered sample set in the buffer.
699 699
700What: /sys/.../buffer/scan_elements/in_accel_x_en 700What: /sys/.../iio:deviceX/scan_elements/in_accel_x_en
701What: /sys/.../buffer/scan_elements/in_accel_y_en 701What: /sys/.../iio:deviceX/scan_elements/in_accel_y_en
702What: /sys/.../buffer/scan_elements/in_accel_z_en 702What: /sys/.../iio:deviceX/scan_elements/in_accel_z_en
703What: /sys/.../buffer/scan_elements/in_anglvel_x_en 703What: /sys/.../iio:deviceX/scan_elements/in_anglvel_x_en
704What: /sys/.../buffer/scan_elements/in_anglvel_y_en 704What: /sys/.../iio:deviceX/scan_elements/in_anglvel_y_en
705What: /sys/.../buffer/scan_elements/in_anglvel_z_en 705What: /sys/.../iio:deviceX/scan_elements/in_anglvel_z_en
706What: /sys/.../buffer/scan_elements/in_magn_x_en 706What: /sys/.../iio:deviceX/scan_elements/in_magn_x_en
707What: /sys/.../buffer/scan_elements/in_magn_y_en 707What: /sys/.../iio:deviceX/scan_elements/in_magn_y_en
708What: /sys/.../buffer/scan_elements/in_magn_z_en 708What: /sys/.../iio:deviceX/scan_elements/in_magn_z_en
709What: /sys/.../buffer/scan_elements/in_timestamp_en 709What: /sys/.../iio:deviceX/scan_elements/in_timestamp_en
710What: /sys/.../buffer/scan_elements/in_voltageY_supply_en 710What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_en
711What: /sys/.../buffer/scan_elements/in_voltageY_en 711What: /sys/.../iio:deviceX/scan_elements/in_voltageY_en
712What: /sys/.../buffer/scan_elements/in_voltageY-voltageZ_en 712What: /sys/.../iio:deviceX/scan_elements/in_voltageY-voltageZ_en
713What: /sys/.../buffer/scan_elements/in_incli_x_en 713What: /sys/.../iio:deviceX/scan_elements/in_incli_x_en
714What: /sys/.../buffer/scan_elements/in_incli_y_en 714What: /sys/.../iio:deviceX/scan_elements/in_incli_y_en
715What: /sys/.../buffer/scan_elements/in_pressureY_en 715What: /sys/.../iio:deviceX/scan_elements/in_pressureY_en
716What: /sys/.../buffer/scan_elements/in_pressure_en 716What: /sys/.../iio:deviceX/scan_elements/in_pressure_en
717KernelVersion: 2.6.37 717KernelVersion: 2.6.37
718Contact: linux-iio@vger.kernel.org 718Contact: linux-iio@vger.kernel.org
719Description: 719Description:
720 Scan element control for triggered data capture. 720 Scan element control for triggered data capture.
721 721
722What: /sys/.../buffer/scan_elements/in_accel_type 722What: /sys/.../iio:deviceX/scan_elements/in_accel_type
723What: /sys/.../buffer/scan_elements/in_anglvel_type 723What: /sys/.../iio:deviceX/scan_elements/in_anglvel_type
724What: /sys/.../buffer/scan_elements/in_magn_type 724What: /sys/.../iio:deviceX/scan_elements/in_magn_type
725What: /sys/.../buffer/scan_elements/in_incli_type 725What: /sys/.../iio:deviceX/scan_elements/in_incli_type
726What: /sys/.../buffer/scan_elements/in_voltageY_type 726What: /sys/.../iio:deviceX/scan_elements/in_voltageY_type
727What: /sys/.../buffer/scan_elements/in_voltage_type 727What: /sys/.../iio:deviceX/scan_elements/in_voltage_type
728What: /sys/.../buffer/scan_elements/in_voltageY_supply_type 728What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_type
729What: /sys/.../buffer/scan_elements/in_timestamp_type 729What: /sys/.../iio:deviceX/scan_elements/in_timestamp_type
730What: /sys/.../buffer/scan_elements/in_pressureY_type 730What: /sys/.../iio:deviceX/scan_elements/in_pressureY_type
731What: /sys/.../buffer/scan_elements/in_pressure_type 731What: /sys/.../iio:deviceX/scan_elements/in_pressure_type
732KernelVersion: 2.6.37 732KernelVersion: 2.6.37
733Contact: linux-iio@vger.kernel.org 733Contact: linux-iio@vger.kernel.org
734Description: 734Description:
@@ -752,29 +752,29 @@ Description:
752 For other storage combinations this attribute will be extended 752 For other storage combinations this attribute will be extended
753 appropriately. 753 appropriately.
754 754
755What: /sys/.../buffer/scan_elements/in_accel_type_available 755What: /sys/.../iio:deviceX/scan_elements/in_accel_type_available
756KernelVersion: 2.6.37 756KernelVersion: 2.6.37
757Contact: linux-iio@vger.kernel.org 757Contact: linux-iio@vger.kernel.org
758Description: 758Description:
759 If the type parameter can take one of a small set of values, 759 If the type parameter can take one of a small set of values,
760 this attribute lists them. 760 this attribute lists them.
761 761
762What: /sys/.../buffer/scan_elements/in_voltageY_index 762What: /sys/.../iio:deviceX/scan_elements/in_voltageY_index
763What: /sys/.../buffer/scan_elements/in_voltageY_supply_index 763What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_index
764What: /sys/.../buffer/scan_elements/in_accel_x_index 764What: /sys/.../iio:deviceX/scan_elements/in_accel_x_index
765What: /sys/.../buffer/scan_elements/in_accel_y_index 765What: /sys/.../iio:deviceX/scan_elements/in_accel_y_index
766What: /sys/.../buffer/scan_elements/in_accel_z_index 766What: /sys/.../iio:deviceX/scan_elements/in_accel_z_index
767What: /sys/.../buffer/scan_elements/in_anglvel_x_index 767What: /sys/.../iio:deviceX/scan_elements/in_anglvel_x_index
768What: /sys/.../buffer/scan_elements/in_anglvel_y_index 768What: /sys/.../iio:deviceX/scan_elements/in_anglvel_y_index
769What: /sys/.../buffer/scan_elements/in_anglvel_z_index 769What: /sys/.../iio:deviceX/scan_elements/in_anglvel_z_index
770What: /sys/.../buffer/scan_elements/in_magn_x_index 770What: /sys/.../iio:deviceX/scan_elements/in_magn_x_index
771What: /sys/.../buffer/scan_elements/in_magn_y_index 771What: /sys/.../iio:deviceX/scan_elements/in_magn_y_index
772What: /sys/.../buffer/scan_elements/in_magn_z_index 772What: /sys/.../iio:deviceX/scan_elements/in_magn_z_index
773What: /sys/.../buffer/scan_elements/in_incli_x_index 773What: /sys/.../iio:deviceX/scan_elements/in_incli_x_index
774What: /sys/.../buffer/scan_elements/in_incli_y_index 774What: /sys/.../iio:deviceX/scan_elements/in_incli_y_index
775What: /sys/.../buffer/scan_elements/in_timestamp_index 775What: /sys/.../iio:deviceX/scan_elements/in_timestamp_index
776What: /sys/.../buffer/scan_elements/in_pressureY_index 776What: /sys/.../iio:deviceX/scan_elements/in_pressureY_index
777What: /sys/.../buffer/scan_elements/in_pressure_index 777What: /sys/.../iio:deviceX/scan_elements/in_pressure_index
778KernelVersion: 2.6.37 778KernelVersion: 2.6.37
779Contact: linux-iio@vger.kernel.org 779Contact: linux-iio@vger.kernel.org
780Description: 780Description:
diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
index 1ce5ae329c04..5210a51c90fd 100644
--- a/Documentation/ABI/testing/sysfs-bus-pci
+++ b/Documentation/ABI/testing/sysfs-bus-pci
@@ -64,7 +64,6 @@ Description:
64 Writing a non-zero value to this attribute will 64 Writing a non-zero value to this attribute will
65 force a rescan of all PCI buses in the system, and 65 force a rescan of all PCI buses in the system, and
66 re-discover previously removed devices. 66 re-discover previously removed devices.
67 Depends on CONFIG_HOTPLUG.
68 67
69What: /sys/bus/pci/devices/.../msi_irqs/ 68What: /sys/bus/pci/devices/.../msi_irqs/
70Date: September, 2011 69Date: September, 2011
@@ -90,7 +89,6 @@ Contact: Linux PCI developers <linux-pci@vger.kernel.org>
90Description: 89Description:
91 Writing a non-zero value to this attribute will 90 Writing a non-zero value to this attribute will
92 hot-remove the PCI device and any of its children. 91 hot-remove the PCI device and any of its children.
93 Depends on CONFIG_HOTPLUG.
94 92
95What: /sys/bus/pci/devices/.../pci_bus/.../rescan 93What: /sys/bus/pci/devices/.../pci_bus/.../rescan
96Date: May 2011 94Date: May 2011
@@ -99,7 +97,7 @@ Description:
99 Writing a non-zero value to this attribute will 97 Writing a non-zero value to this attribute will
100 force a rescan of the bus and all child buses, 98 force a rescan of the bus and all child buses,
101 and re-discover devices removed earlier from this 99 and re-discover devices removed earlier from this
102 part of the device tree. Depends on CONFIG_HOTPLUG. 100 part of the device tree.
103 101
104What: /sys/bus/pci/devices/.../rescan 102What: /sys/bus/pci/devices/.../rescan
105Date: January 2009 103Date: January 2009
@@ -109,7 +107,6 @@ Description:
109 force a rescan of the device's parent bus and all 107 force a rescan of the device's parent bus and all
110 child buses, and re-discover devices removed earlier 108 child buses, and re-discover devices removed earlier
111 from this part of the device tree. 109 from this part of the device tree.
112 Depends on CONFIG_HOTPLUG.
113 110
114What: /sys/bus/pci/devices/.../reset 111What: /sys/bus/pci/devices/.../reset
115Date: July 2009 112Date: July 2009
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb
index f093e59cbe5f..9759b8c91332 100644
--- a/Documentation/ABI/testing/sysfs-bus-usb
+++ b/Documentation/ABI/testing/sysfs-bus-usb
@@ -236,3 +236,30 @@ Description:
236 This attribute is to expose these information to user space. 236 This attribute is to expose these information to user space.
237 The file will read "hotplug", "wired" and "not used" if the 237 The file will read "hotplug", "wired" and "not used" if the
238 information is available, and "unknown" otherwise. 238 information is available, and "unknown" otherwise.
239
240What: /sys/bus/usb/devices/.../power/usb2_lpm_l1_timeout
241Date: May 2013
242Contact: Mathias Nyman <mathias.nyman@linux.intel.com>
243Description:
244 USB 2.0 devices may support hardware link power management (LPM)
245 L1 sleep state. The usb2_lpm_l1_timeout attribute allows
246 tuning the timeout for L1 inactivity timer (LPM timer), e.g.
247 needed inactivity time before host requests the device to go to L1 sleep.
248 Useful for power management tuning.
249 Supported values are 0 - 65535 microseconds.
250
251What: /sys/bus/usb/devices/.../power/usb2_lpm_besl
252Date: May 2013
253Contact: Mathias Nyman <mathias.nyman@linux.intel.com>
254Description:
255 USB 2.0 devices that support hardware link power management (LPM)
256 L1 sleep state now use a best effort service latency value (BESL) to
257 indicate the best effort to resumption of service to the device after the
258 initiation of the resume event.
259 If the device does not have a preferred besl value then the host can select
260 one instead. This usb2_lpm_besl attribute allows to tune the host selected besl
261 value in order to tune power saving and service latency.
262
263 Supported values are 0 - 15.
264 More information on how besl values map to microseconds can be found in
265 USB 2.0 ECN Errata for Link Power Management, section 4.10)
diff --git a/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc b/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc
index 25b1e751b777..5977e2875325 100644
--- a/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc
+++ b/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc
@@ -36,3 +36,22 @@ Description:
36 36
37 Refer to [ECMA-368] section 10.3.1.1 for the value to 37 Refer to [ECMA-368] section 10.3.1.1 for the value to
38 use. 38 use.
39
40What: /sys/class/uwb_rc/uwbN/wusbhc/wusb_dnts
41Date: June 2013
42KernelVersion: 3.11
43Contact: Thomas Pugliese <thomas.pugliese@gmail.com>
44Description:
45 The device notification time slot (DNTS) count and inverval in
46 milliseconds that the WUSB host should use. This controls how
47 often the devices will have the opportunity to send
48 notifications to the host.
49
50What: /sys/class/uwb_rc/uwbN/wusbhc/wusb_retry_count
51Date: June 2013
52KernelVersion: 3.11
53Contact: Thomas Pugliese <thomas.pugliese@gmail.com>
54Description:
55 The number of retries that the WUSB host should attempt
56 before reporting an error for a bus transaction. The range of
57 valid values is [0..15], where 0 indicates infinite retries.
diff --git a/Documentation/DocBook/genericirq.tmpl b/Documentation/DocBook/genericirq.tmpl
index b3422341d65c..d16d21b7a3b7 100644
--- a/Documentation/DocBook/genericirq.tmpl
+++ b/Documentation/DocBook/genericirq.tmpl
@@ -464,6 +464,19 @@ if (desc->irq_data.chip->irq_eoi)
464 protected via desc->lock, by the generic layer. 464 protected via desc->lock, by the generic layer.
465 </para> 465 </para>
466 </chapter> 466 </chapter>
467
468 <chapter id="genericchip">
469 <title>Generic interrupt chip</title>
470 <para>
471 To avoid copies of identical implementations of irq chips the
472 core provides a configurable generic interrupt chip
473 implementation. Developers should check carefuly whether the
474 generic chip fits their needs before implementing the same
475 functionality slightly different themself.
476 </para>
477!Ekernel/irq/generic-chip.c
478 </chapter>
479
467 <chapter id="structs"> 480 <chapter id="structs">
468 <title>Structures</title> 481 <title>Structures</title>
469 <para> 482 <para>
diff --git a/Documentation/HOWTO b/Documentation/HOWTO
index a9f288ff54f9..27faae3e3846 100644
--- a/Documentation/HOWTO
+++ b/Documentation/HOWTO
@@ -112,7 +112,7 @@ required reading:
112 112
113 Other excellent descriptions of how to create patches properly are: 113 Other excellent descriptions of how to create patches properly are:
114 "The Perfect Patch" 114 "The Perfect Patch"
115 http://userweb.kernel.org/~akpm/stuff/tpp.txt 115 http://kerneltrap.org/node/3737
116 "Linux kernel patch submission format" 116 "Linux kernel patch submission format"
117 http://linux.yyz.us/patch-format.html 117 http://linux.yyz.us/patch-format.html
118 118
diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt
index 79e789b8b8ea..7703ec73a9bb 100644
--- a/Documentation/RCU/checklist.txt
+++ b/Documentation/RCU/checklist.txt
@@ -354,12 +354,6 @@ over a rather long period of time, but improvements are always welcome!
354 using RCU rather than SRCU, because RCU is almost always faster 354 using RCU rather than SRCU, because RCU is almost always faster
355 and easier to use than is SRCU. 355 and easier to use than is SRCU.
356 356
357 If you need to enter your read-side critical section in a
358 hardirq or exception handler, and then exit that same read-side
359 critical section in the task that was interrupted, then you need
360 to srcu_read_lock_raw() and srcu_read_unlock_raw(), which avoid
361 the lockdep checking that would otherwise this practice illegal.
362
363 Also unlike other forms of RCU, explicit initialization 357 Also unlike other forms of RCU, explicit initialization
364 and cleanup is required via init_srcu_struct() and 358 and cleanup is required via init_srcu_struct() and
365 cleanup_srcu_struct(). These are passed a "struct srcu_struct" 359 cleanup_srcu_struct(). These are passed a "struct srcu_struct"
diff --git a/Documentation/RCU/torture.txt b/Documentation/RCU/torture.txt
index 7dce8a17eac2..d8a502387397 100644
--- a/Documentation/RCU/torture.txt
+++ b/Documentation/RCU/torture.txt
@@ -182,12 +182,6 @@ torture_type The type of RCU to test, with string values as follows:
182 "srcu_expedited": srcu_read_lock(), srcu_read_unlock() and 182 "srcu_expedited": srcu_read_lock(), srcu_read_unlock() and
183 synchronize_srcu_expedited(). 183 synchronize_srcu_expedited().
184 184
185 "srcu_raw": srcu_read_lock_raw(), srcu_read_unlock_raw(),
186 and call_srcu().
187
188 "srcu_raw_sync": srcu_read_lock_raw(), srcu_read_unlock_raw(),
189 and synchronize_srcu().
190
191 "sched": preempt_disable(), preempt_enable(), and 185 "sched": preempt_disable(), preempt_enable(), and
192 call_rcu_sched(). 186 call_rcu_sched().
193 187
diff --git a/Documentation/RCU/trace.txt b/Documentation/RCU/trace.txt
index c776968f4463..f3778f8952da 100644
--- a/Documentation/RCU/trace.txt
+++ b/Documentation/RCU/trace.txt
@@ -530,113 +530,21 @@ o "nos" counts the number of times we balked for other
530 reasons, e.g., the grace period ended first. 530 reasons, e.g., the grace period ended first.
531 531
532 532
533CONFIG_TINY_RCU and CONFIG_TINY_PREEMPT_RCU debugfs Files and Formats 533CONFIG_TINY_RCU debugfs Files and Formats
534 534
535These implementations of RCU provides a single debugfs file under the 535These implementations of RCU provides a single debugfs file under the
536top-level directory RCU, namely rcu/rcudata, which displays fields in 536top-level directory RCU, namely rcu/rcudata, which displays fields in
537rcu_bh_ctrlblk, rcu_sched_ctrlblk and, for CONFIG_TINY_PREEMPT_RCU, 537rcu_bh_ctrlblk and rcu_sched_ctrlblk.
538rcu_preempt_ctrlblk.
539 538
540The output of "cat rcu/rcudata" is as follows: 539The output of "cat rcu/rcudata" is as follows:
541 540
542rcu_preempt: qlen=24 gp=1097669 g197/p197/c197 tasks=...
543 ttb=. btg=no ntb=184 neb=0 nnb=183 j=01f7 bt=0274
544 normal balk: nt=1097669 gt=0 bt=371 b=0 ny=25073378 nos=0
545 exp balk: bt=0 nos=0
546rcu_sched: qlen: 0 541rcu_sched: qlen: 0
547rcu_bh: qlen: 0 542rcu_bh: qlen: 0
548 543
549This is split into rcu_preempt, rcu_sched, and rcu_bh sections, with the 544This is split into rcu_sched and rcu_bh sections. The field is as
550rcu_preempt section appearing only in CONFIG_TINY_PREEMPT_RCU builds. 545follows:
551The last three lines of the rcu_preempt section appear only in
552CONFIG_RCU_BOOST kernel builds. The fields are as follows:
553 546
554o "qlen" is the number of RCU callbacks currently waiting either 547o "qlen" is the number of RCU callbacks currently waiting either
555 for an RCU grace period or waiting to be invoked. This is the 548 for an RCU grace period or waiting to be invoked. This is the
556 only field present for rcu_sched and rcu_bh, due to the 549 only field present for rcu_sched and rcu_bh, due to the
557 short-circuiting of grace period in those two cases. 550 short-circuiting of grace period in those two cases.
558
559o "gp" is the number of grace periods that have completed.
560
561o "g197/p197/c197" displays the grace-period state, with the
562 "g" number being the number of grace periods that have started
563 (mod 256), the "p" number being the number of grace periods
564 that the CPU has responded to (also mod 256), and the "c"
565 number being the number of grace periods that have completed
566 (once again mode 256).
567
568 Why have both "gp" and "g"? Because the data flowing into
569 "gp" is only present in a CONFIG_RCU_TRACE kernel.
570
571o "tasks" is a set of bits. The first bit is "T" if there are
572 currently tasks that have recently blocked within an RCU
573 read-side critical section, the second bit is "N" if any of the
574 aforementioned tasks are blocking the current RCU grace period,
575 and the third bit is "E" if any of the aforementioned tasks are
576 blocking the current expedited grace period. Each bit is "."
577 if the corresponding condition does not hold.
578
579o "ttb" is a single bit. It is "B" if any of the blocked tasks
580 need to be priority boosted and "." otherwise.
581
582o "btg" indicates whether boosting has been carried out during
583 the current grace period, with "exp" indicating that boosting
584 is in progress for an expedited grace period, "no" indicating
585 that boosting has not yet started for a normal grace period,
586 "begun" indicating that boosting has bebug for a normal grace
587 period, and "done" indicating that boosting has completed for
588 a normal grace period.
589
590o "ntb" is the total number of tasks subjected to RCU priority boosting
591 periods since boot.
592
593o "neb" is the number of expedited grace periods that have had
594 to resort to RCU priority boosting since boot.
595
596o "nnb" is the number of normal grace periods that have had
597 to resort to RCU priority boosting since boot.
598
599o "j" is the low-order 16 bits of the jiffies counter in hexadecimal.
600
601o "bt" is the low-order 16 bits of the value that the jiffies counter
602 will have at the next time that boosting is scheduled to begin.
603
604o In the line beginning with "normal balk", the fields are as follows:
605
606 o "nt" is the number of times that the system balked from
607 boosting because there were no blocked tasks to boost.
608 Note that the system will balk from boosting even if the
609 grace period is overdue when the currently running task
610 is looping within an RCU read-side critical section.
611 There is no point in boosting in this case, because
612 boosting a running task won't make it run any faster.
613
614 o "gt" is the number of times that the system balked
615 from boosting because, although there were blocked tasks,
616 none of them were preventing the current grace period
617 from completing.
618
619 o "bt" is the number of times that the system balked
620 from boosting because boosting was already in progress.
621
622 o "b" is the number of times that the system balked from
623 boosting because boosting had already completed for
624 the grace period in question.
625
626 o "ny" is the number of times that the system balked from
627 boosting because it was not yet time to start boosting
628 the grace period in question.
629
630 o "nos" is the number of times that the system balked from
631 boosting for inexplicable ("not otherwise specified")
632 reasons. This can actually happen due to races involving
633 increments of the jiffies counter.
634
635o In the line beginning with "exp balk", the fields are as follows:
636
637 o "bt" is the number of times that the system balked from
638 boosting because there were no blocked tasks to boost.
639
640 o "nos" is the number of times that the system balked from
641 boosting for inexplicable ("not otherwise specified")
642 reasons.
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt
index 10df0b82f459..0f0fb7c432c2 100644
--- a/Documentation/RCU/whatisRCU.txt
+++ b/Documentation/RCU/whatisRCU.txt
@@ -842,9 +842,7 @@ SRCU: Critical sections Grace period Barrier
842 842
843 srcu_read_lock synchronize_srcu srcu_barrier 843 srcu_read_lock synchronize_srcu srcu_barrier
844 srcu_read_unlock call_srcu 844 srcu_read_unlock call_srcu
845 srcu_read_lock_raw synchronize_srcu_expedited 845 srcu_dereference synchronize_srcu_expedited
846 srcu_read_unlock_raw
847 srcu_dereference
848 846
849SRCU: Initialization/cleanup 847SRCU: Initialization/cleanup
850 init_srcu_struct 848 init_srcu_struct
@@ -865,38 +863,32 @@ list can be helpful:
865 863
866a. Will readers need to block? If so, you need SRCU. 864a. Will readers need to block? If so, you need SRCU.
867 865
868b. Is it necessary to start a read-side critical section in a 866b. What about the -rt patchset? If readers would need to block
869 hardirq handler or exception handler, and then to complete
870 this read-side critical section in the task that was
871 interrupted? If so, you need SRCU's srcu_read_lock_raw() and
872 srcu_read_unlock_raw() primitives.
873
874c. What about the -rt patchset? If readers would need to block
875 in an non-rt kernel, you need SRCU. If readers would block 867 in an non-rt kernel, you need SRCU. If readers would block
876 in a -rt kernel, but not in a non-rt kernel, SRCU is not 868 in a -rt kernel, but not in a non-rt kernel, SRCU is not
877 necessary. 869 necessary.
878 870
879d. Do you need to treat NMI handlers, hardirq handlers, 871c. Do you need to treat NMI handlers, hardirq handlers,
880 and code segments with preemption disabled (whether 872 and code segments with preemption disabled (whether
881 via preempt_disable(), local_irq_save(), local_bh_disable(), 873 via preempt_disable(), local_irq_save(), local_bh_disable(),
882 or some other mechanism) as if they were explicit RCU readers? 874 or some other mechanism) as if they were explicit RCU readers?
883 If so, RCU-sched is the only choice that will work for you. 875 If so, RCU-sched is the only choice that will work for you.
884 876
885e. Do you need RCU grace periods to complete even in the face 877d. Do you need RCU grace periods to complete even in the face
886 of softirq monopolization of one or more of the CPUs? For 878 of softirq monopolization of one or more of the CPUs? For
887 example, is your code subject to network-based denial-of-service 879 example, is your code subject to network-based denial-of-service
888 attacks? If so, you need RCU-bh. 880 attacks? If so, you need RCU-bh.
889 881
890f. Is your workload too update-intensive for normal use of 882e. Is your workload too update-intensive for normal use of
891 RCU, but inappropriate for other synchronization mechanisms? 883 RCU, but inappropriate for other synchronization mechanisms?
892 If so, consider SLAB_DESTROY_BY_RCU. But please be careful! 884 If so, consider SLAB_DESTROY_BY_RCU. But please be careful!
893 885
894g. Do you need read-side critical sections that are respected 886f. Do you need read-side critical sections that are respected
895 even though they are in the middle of the idle loop, during 887 even though they are in the middle of the idle loop, during
896 user-mode execution, or on an offlined CPU? If so, SRCU is the 888 user-mode execution, or on an offlined CPU? If so, SRCU is the
897 only choice that will work for you. 889 only choice that will work for you.
898 890
899h. Otherwise, use RCU. 891g. Otherwise, use RCU.
900 892
901Of course, this all assumes that you have determined that RCU is in fact 893Of course, this all assumes that you have determined that RCU is in fact
902the right tool for your job. 894the right tool for your job.
diff --git a/Documentation/SubmitChecklist b/Documentation/SubmitChecklist
index dc0e33210d7e..2b7e32dfe00d 100644
--- a/Documentation/SubmitChecklist
+++ b/Documentation/SubmitChecklist
@@ -105,5 +105,5 @@ kernel patches.
105 same time, just various/random combinations of them]: 105 same time, just various/random combinations of them]:
106 106
107 CONFIG_SMP, CONFIG_SYSFS, CONFIG_PROC_FS, CONFIG_INPUT, CONFIG_PCI, 107 CONFIG_SMP, CONFIG_SYSFS, CONFIG_PROC_FS, CONFIG_INPUT, CONFIG_PCI,
108 CONFIG_BLOCK, CONFIG_PM, CONFIG_HOTPLUG, CONFIG_MAGIC_SYSRQ, 108 CONFIG_BLOCK, CONFIG_PM, CONFIG_MAGIC_SYSRQ,
109 CONFIG_NET, CONFIG_INET=n (but latter with CONFIG_NET=y) 109 CONFIG_NET, CONFIG_INET=n (but latter with CONFIG_NET=y)
diff --git a/Documentation/acpi/apei/einj.txt b/Documentation/acpi/apei/einj.txt
index e20b6daaced4..a58b63da1a36 100644
--- a/Documentation/acpi/apei/einj.txt
+++ b/Documentation/acpi/apei/einj.txt
@@ -47,11 +47,16 @@ directory apei/einj. The following files are provided.
47 47
48- param1 48- param1
49 This file is used to set the first error parameter value. Effect of 49 This file is used to set the first error parameter value. Effect of
50 parameter depends on error_type specified. 50 parameter depends on error_type specified. For example, if error
51 type is memory related type, the param1 should be a valid physical
52 memory address.
51 53
52- param2 54- param2
53 This file is used to set the second error parameter value. Effect of 55 This file is used to set the second error parameter value. Effect of
54 parameter depends on error_type specified. 56 parameter depends on error_type specified. For example, if error
57 type is memory related type, the param2 should be a physical memory
58 address mask. Linux requires page or narrower granularity, say,
59 0xfffffffffffff000.
55 60
56- notrigger 61- notrigger
57 The EINJ mechanism is a two step process. First inject the error, then 62 The EINJ mechanism is a two step process. First inject the error, then
diff --git a/Documentation/arm/sti/overview.txt b/Documentation/arm/sti/overview.txt
new file mode 100644
index 000000000000..1a4e93d6027f
--- /dev/null
+++ b/Documentation/arm/sti/overview.txt
@@ -0,0 +1,33 @@
1 STi ARM Linux Overview
2 ==========================
3
4Introduction
5------------
6
7 The ST Microelectronics Multimedia and Application Processors range of
8 CortexA9 System-on-Chip are supported by the 'STi' platform of
9 ARM Linux. Currently STiH415, STiH416 SOCs are supported with both
10 B2000 and B2020 Reference boards.
11
12
13 configuration
14 -------------
15
16 A generic configuration is provided for both STiH415/416, and can be used as the
17 default by
18 make stih41x_defconfig
19
20 Layout
21 ------
22 All the files for multiple machine families (STiH415, STiH416, and STiG125)
23 are located in the platform code contained in arch/arm/mach-sti
24
25 There is a generic board board-dt.c in the mach folder which support
26 Flattened Device Tree, which means, It works with any compatible board with
27 Device Trees.
28
29
30 Document Author
31 ---------------
32
33 Srinivas Kandagatla <srinivas.kandagatla@st.com>, (c) 2013 ST Microelectronics
diff --git a/Documentation/arm/sti/stih415-overview.txt b/Documentation/arm/sti/stih415-overview.txt
new file mode 100644
index 000000000000..1383e33f265d
--- /dev/null
+++ b/Documentation/arm/sti/stih415-overview.txt
@@ -0,0 +1,12 @@
1 STiH415 Overview
2 ================
3
4Introduction
5------------
6
7 The STiH415 is the next generation of HD, AVC set-top box processors
8 for satellite, cable, terrestrial and IP-STB markets.
9
10 Features
11 - ARM Cortex-A9 1.0 GHz, dual-core CPU
12 - SATA2x2,USB 2.0x3, PCIe, Gbit Ethernet MACx2
diff --git a/Documentation/arm/sti/stih416-overview.txt b/Documentation/arm/sti/stih416-overview.txt
new file mode 100644
index 000000000000..558444c201c6
--- /dev/null
+++ b/Documentation/arm/sti/stih416-overview.txt
@@ -0,0 +1,12 @@
1 STiH416 Overview
2 ================
3
4Introduction
5------------
6
7 The STiH416 is the next generation of HD, AVC set-top box processors
8 for satellite, cable, terrestrial and IP-STB markets.
9
10 Features
11 - ARM Cortex-A9 1.2 GHz dual core CPU
12 - SATA2x2,USB 2.0x3, PCIe, Gbit Ethernet MACx2
diff --git a/Documentation/arm/sunxi/README b/Documentation/arm/sunxi/README
index 87a1e8fb6242..e3f93fb9224e 100644
--- a/Documentation/arm/sunxi/README
+++ b/Documentation/arm/sunxi/README
@@ -3,17 +3,26 @@ ARM Allwinner SoCs
3 3
4This document lists all the ARM Allwinner SoCs that are currently 4This document lists all the ARM Allwinner SoCs that are currently
5supported in mainline by the Linux kernel. This document will also 5supported in mainline by the Linux kernel. This document will also
6provide links to documentation and or datasheet for these SoCs. 6provide links to documentation and/or datasheet for these SoCs.
7 7
8SunXi family 8SunXi family
9------------ 9------------
10 Linux kernel mach directory: arch/arm/mach-sunxi
10 11
11 Flavors: 12 Flavors:
12 Allwinner A10 (sun4i) 13 * ARM Cortex-A8 based SoCs
13 Datasheet : http://dl.linux-sunxi.org/A10/A10%20Datasheet%20-%20v1.21%20%282012-04-06%29.pdf 14 - Allwinner A10 (sun4i)
15 + Datasheet
16 http://dl.linux-sunxi.org/A10/A10%20Datasheet%20-%20v1.21%20%282012-04-06%29.pdf
17 + User Manual
18 http://dl.linux-sunxi.org/A10/A10%20User%20Manual%20-%20v1.20%20%282012-04-09%2c%20DECRYPTED%29.pdf
14 19
15 Allwinner A13 (sun5i) 20 - Allwinner A10s (sun5i)
16 Datasheet : http://dl.linux-sunxi.org/A13/A13%20Datasheet%20-%20v1.12%20%282012-03-29%29.pdf 21 + Datasheet
22 http://dl.linux-sunxi.org/A10s/A10s%20Datasheet%20-%20v1.20%20%282012-03-27%29.pdf
17 23
18 Core: Cortex A8 24 - Allwinner A13 (sun5i)
19 Linux kernel mach directory: arch/arm/mach-sunxi \ No newline at end of file 25 + Datasheet
26 http://dl.linux-sunxi.org/A13/A13%20Datasheet%20-%20v1.12%20%282012-03-29%29.pdf
27 + User Manual
28 http://dl.linux-sunxi.org/A13/A13%20User%20Manual%20-%20v1.2%20%282013-08-08%29.pdf
diff --git a/Documentation/cgroups/cpusets.txt b/Documentation/cgroups/cpusets.txt
index 12e01d432bfe..7740038d82bc 100644
--- a/Documentation/cgroups/cpusets.txt
+++ b/Documentation/cgroups/cpusets.txt
@@ -373,7 +373,7 @@ can become very uneven.
3731.7 What is sched_load_balance ? 3731.7 What is sched_load_balance ?
374-------------------------------- 374--------------------------------
375 375
376The kernel scheduler (kernel/sched.c) automatically load balances 376The kernel scheduler (kernel/sched/core.c) automatically load balances
377tasks. If one CPU is underutilized, kernel code running on that 377tasks. If one CPU is underutilized, kernel code running on that
378CPU will look for tasks on other more overloaded CPUs and move those 378CPU will look for tasks on other more overloaded CPUs and move those
379tasks to itself, within the constraints of such placement mechanisms 379tasks to itself, within the constraints of such placement mechanisms
diff --git a/Documentation/console/console.txt b/Documentation/console/console.txt
index 926cf1b5e63e..f93810d599ad 100644
--- a/Documentation/console/console.txt
+++ b/Documentation/console/console.txt
@@ -12,20 +12,20 @@ The second type has to be explicitly loaded and unloaded. This will be called
12any time with each driver sharing the console with other drivers including 12any time with each driver sharing the console with other drivers including
13the system driver. However, modular drivers cannot take over the console 13the system driver. However, modular drivers cannot take over the console
14that is currently occupied by another modular driver. (Exception: Drivers that 14that is currently occupied by another modular driver. (Exception: Drivers that
15call take_over_console() will succeed in the takeover regardless of the type 15call do_take_over_console() will succeed in the takeover regardless of the type
16of driver occupying the consoles.) They can only take over the console that is 16of driver occupying the consoles.) They can only take over the console that is
17occupied by the system driver. In the same token, if the modular driver is 17occupied by the system driver. In the same token, if the modular driver is
18released by the console, the system driver will take over. 18released by the console, the system driver will take over.
19 19
20Modular drivers, from the programmer's point of view, has to call: 20Modular drivers, from the programmer's point of view, has to call:
21 21
22 take_over_console() - load and bind driver to console layer 22 do_take_over_console() - load and bind driver to console layer
23 give_up_console() - unbind and unload driver 23 give_up_console() - unload driver, it will only work if driver is fully unbond
24 24
25In newer kernels, the following are also available: 25In newer kernels, the following are also available:
26 26
27 register_con_driver() 27 do_register_con_driver()
28 unregister_con_driver() 28 do_unregister_con_driver()
29 29
30If sysfs is enabled, the contents of /sys/class/vtconsole can be 30If sysfs is enabled, the contents of /sys/class/vtconsole can be
31examined. This shows the console backends currently registered by the 31examined. This shows the console backends currently registered by the
@@ -94,12 +94,12 @@ for more details).
94Notes for developers: 94Notes for developers:
95===================== 95=====================
96 96
97take_over_console() is now broken up into: 97do_take_over_console() is now broken up into:
98 98
99 register_con_driver() 99 do_register_con_driver()
100 bind_con_driver() - private function 100 do_bind_con_driver() - private function
101 101
102give_up_console() is a wrapper to unregister_con_driver(), and a driver must 102give_up_console() is a wrapper to do_unregister_con_driver(), and a driver must
103be fully unbound for this call to succeed. con_is_bound() will check if the 103be fully unbound for this call to succeed. con_is_bound() will check if the
104driver is bound or not. 104driver is bound or not.
105 105
@@ -109,10 +109,10 @@ Guidelines for console driver writers:
109In order for binding to and unbinding from the console to properly work, 109In order for binding to and unbinding from the console to properly work,
110console drivers must follow these guidelines: 110console drivers must follow these guidelines:
111 111
1121. All drivers, except system drivers, must call either register_con_driver() 1121. All drivers, except system drivers, must call either do_register_con_driver()
113 or take_over_console(). register_con_driver() will just add the driver to 113 or do_take_over_console(). do_register_con_driver() will just add the driver to
114 the console's internal list. It won't take over the 114 the console's internal list. It won't take over the
115 console. take_over_console(), as it name implies, will also take over (or 115 console. do_take_over_console(), as it name implies, will also take over (or
116 bind to) the console. 116 bind to) the console.
117 117
1182. All resources allocated during con->con_init() must be released in 1182. All resources allocated during con->con_init() must be released in
@@ -128,10 +128,10 @@ console drivers must follow these guidelines:
128 rebind the driver to the console arrives. 128 rebind the driver to the console arrives.
129 129
1304. Upon exit of the driver, ensure that the driver is totally unbound. If the 1304. Upon exit of the driver, ensure that the driver is totally unbound. If the
131 condition is satisfied, then the driver must call unregister_con_driver() 131 condition is satisfied, then the driver must call do_unregister_con_driver()
132 or give_up_console(). 132 or give_up_console().
133 133
1345. unregister_con_driver() can also be called on conditions which make it 1345. do_unregister_con_driver() can also be called on conditions which make it
135 impossible for the driver to service console requests. This can happen 135 impossible for the driver to service console requests. This can happen
136 with the framebuffer console that suddenly lost all of its drivers. 136 with the framebuffer console that suddenly lost all of its drivers.
137 137
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt
index 9f401350f502..0efd1b905b9d 100644
--- a/Documentation/cpu-hotplug.txt
+++ b/Documentation/cpu-hotplug.txt
@@ -128,7 +128,7 @@ A: When doing make defconfig, Enable CPU hotplug support
128 128
129 "Processor type and Features" -> Support for Hotpluggable CPUs 129 "Processor type and Features" -> Support for Hotpluggable CPUs
130 130
131Make sure that you have CONFIG_HOTPLUG, and CONFIG_SMP turned on as well. 131Make sure that you have CONFIG_SMP turned on as well.
132 132
133You would need to enable CONFIG_HOTPLUG_CPU for SMP suspend/resume support 133You would need to enable CONFIG_HOTPLUG_CPU for SMP suspend/resume support
134as well. 134as well.
diff --git a/Documentation/devicetree/bindings/arm/cci.txt b/Documentation/devicetree/bindings/arm/cci.txt
new file mode 100644
index 000000000000..92d36e2aa877
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/cci.txt
@@ -0,0 +1,172 @@
1=======================================================
2ARM CCI cache coherent interconnect binding description
3=======================================================
4
5ARM multi-cluster systems maintain intra-cluster coherency through a
6cache coherent interconnect (CCI) that is capable of monitoring bus
7transactions and manage coherency, TLB invalidations and memory barriers.
8
9It allows snooping and distributed virtual memory message broadcast across
10clusters, through memory mapped interface, with a global control register
11space and multiple sets of interface control registers, one per slave
12interface.
13
14Bindings for the CCI node follow the ePAPR standard, available from:
15
16www.power.org/documentation/epapr-version-1-1/
17
18with the addition of the bindings described in this document which are
19specific to ARM.
20
21* CCI interconnect node
22
23 Description: Describes a CCI cache coherent Interconnect component
24
25 Node name must be "cci".
26 Node's parent must be the root node /, and the address space visible
27 through the CCI interconnect is the same as the one seen from the
28 root node (ie from CPUs perspective as per DT standard).
29 Every CCI node has to define the following properties:
30
31 - compatible
32 Usage: required
33 Value type: <string>
34 Definition: must be set to
35 "arm,cci-400"
36
37 - reg
38 Usage: required
39 Value type: <prop-encoded-array>
40 Definition: A standard property. Specifies base physical
41 address of CCI control registers common to all
42 interfaces.
43
44 - ranges:
45 Usage: required
46 Value type: <prop-encoded-array>
47 Definition: A standard property. Follow rules in the ePAPR for
48 hierarchical bus addressing. CCI interfaces
49 addresses refer to the parent node addressing
50 scheme to declare their register bases.
51
52 CCI interconnect node can define the following child nodes:
53
54 - CCI control interface nodes
55
56 Node name must be "slave-if".
57 Parent node must be CCI interconnect node.
58
59 A CCI control interface node must contain the following
60 properties:
61
62 - compatible
63 Usage: required
64 Value type: <string>
65 Definition: must be set to
66 "arm,cci-400-ctrl-if"
67
68 - interface-type:
69 Usage: required
70 Value type: <string>
71 Definition: must be set to one of {"ace", "ace-lite"}
72 depending on the interface type the node
73 represents.
74
75 - reg:
76 Usage: required
77 Value type: <prop-encoded-array>
78 Definition: the base address and size of the
79 corresponding interface programming
80 registers.
81
82* CCI interconnect bus masters
83
84 Description: masters in the device tree connected to a CCI port
85 (inclusive of CPUs and their cpu nodes).
86
87 A CCI interconnect bus master node must contain the following
88 properties:
89
90 - cci-control-port:
91 Usage: required
92 Value type: <phandle>
93 Definition: a phandle containing the CCI control interface node
94 the master is connected to.
95
96Example:
97
98 cpus {
99 #size-cells = <0>;
100 #address-cells = <1>;
101
102 CPU0: cpu@0 {
103 device_type = "cpu";
104 compatible = "arm,cortex-a15";
105 cci-control-port = <&cci_control1>;
106 reg = <0x0>;
107 };
108
109 CPU1: cpu@1 {
110 device_type = "cpu";
111 compatible = "arm,cortex-a15";
112 cci-control-port = <&cci_control1>;
113 reg = <0x1>;
114 };
115
116 CPU2: cpu@100 {
117 device_type = "cpu";
118 compatible = "arm,cortex-a7";
119 cci-control-port = <&cci_control2>;
120 reg = <0x100>;
121 };
122
123 CPU3: cpu@101 {
124 device_type = "cpu";
125 compatible = "arm,cortex-a7";
126 cci-control-port = <&cci_control2>;
127 reg = <0x101>;
128 };
129
130 };
131
132 dma0: dma@3000000 {
133 compatible = "arm,pl330", "arm,primecell";
134 cci-control-port = <&cci_control0>;
135 reg = <0x0 0x3000000 0x0 0x1000>;
136 interrupts = <10>;
137 #dma-cells = <1>;
138 #dma-channels = <8>;
139 #dma-requests = <32>;
140 };
141
142 cci@2c090000 {
143 compatible = "arm,cci-400";
144 #address-cells = <1>;
145 #size-cells = <1>;
146 reg = <0x0 0x2c090000 0 0x1000>;
147 ranges = <0x0 0x0 0x2c090000 0x6000>;
148
149 cci_control0: slave-if@1000 {
150 compatible = "arm,cci-400-ctrl-if";
151 interface-type = "ace-lite";
152 reg = <0x1000 0x1000>;
153 };
154
155 cci_control1: slave-if@4000 {
156 compatible = "arm,cci-400-ctrl-if";
157 interface-type = "ace";
158 reg = <0x4000 0x1000>;
159 };
160
161 cci_control2: slave-if@5000 {
162 compatible = "arm,cci-400-ctrl-if";
163 interface-type = "ace";
164 reg = <0x5000 0x1000>;
165 };
166 };
167
168This CCI node corresponds to a CCI component whose control registers sits
169at address 0x000000002c090000.
170CCI slave interface @0x000000002c091000 is connected to dma controller dma0.
171CCI slave interface @0x000000002c094000 is connected to CPUs {CPU0, CPU1};
172CCI slave interface @0x000000002c095000 is connected to CPUs {CPU2, CPU3};
diff --git a/Documentation/devicetree/bindings/arm/keystone/keystone.txt b/Documentation/devicetree/bindings/arm/keystone/keystone.txt
new file mode 100644
index 000000000000..63c0e6ae5cf7
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/keystone/keystone.txt
@@ -0,0 +1,10 @@
1TI Keystone Platforms Device Tree Bindings
2-----------------------------------------------
3
4Boards with Keystone2 based devices (TCI66xxK2H) SOC shall have the
5following properties.
6
7Required properties:
8 - compatible: All TI specific devices present in Keystone SOC should be in
9 the form "ti,keystone-*". Generic devices like gic, arch_timers, ns16550
10 type UART should use the specified compatible for those devices.
diff --git a/Documentation/devicetree/bindings/arm/nspire.txt b/Documentation/devicetree/bindings/arm/nspire.txt
new file mode 100644
index 000000000000..4d08518bd176
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/nspire.txt
@@ -0,0 +1,14 @@
1TI-NSPIRE calculators
2
3Required properties:
4- compatible: Compatible property value should contain "ti,nspire".
5 CX models should have "ti,nspire-cx"
6 Touchpad models should have "ti,nspire-tp"
7 Clickpad models should have "ti,nspire-clp"
8
9Example:
10
11/ {
12 model = "TI-NSPIRE CX";
13 compatible = "ti,nspire-cx";
14 ...
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
index f8288ea1b530..6d498c758b45 100644
--- a/Documentation/devicetree/bindings/arm/omap/omap.txt
+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
@@ -56,3 +56,6 @@ Boards:
56 56
57- OMAP5 EVM : Evaluation Module 57- OMAP5 EVM : Evaluation Module
58 compatible = "ti,omap5-evm", "ti,omap5" 58 compatible = "ti,omap5-evm", "ti,omap5"
59
60- AM43x EPOS EVM
61 compatible = "ti,am43x-epos-evm", "ti,am4372", "ti,am43"
diff --git a/Documentation/devicetree/bindings/arm/rtsm-dcscb.txt b/Documentation/devicetree/bindings/arm/rtsm-dcscb.txt
new file mode 100644
index 000000000000..3b8fbf3c00c5
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/rtsm-dcscb.txt
@@ -0,0 +1,19 @@
1ARM Dual Cluster System Configuration Block
2-------------------------------------------
3
4The Dual Cluster System Configuration Block (DCSCB) provides basic
5functionality for controlling clocks, resets and configuration pins in
6the Dual Cluster System implemented by the Real-Time System Model (RTSM).
7
8Required properties:
9
10- compatible : should be "arm,rtsm,dcscb"
11
12- reg : physical base address and the size of the registers window
13
14Example:
15
16 dcscb@60000000 {
17 compatible = "arm,rtsm,dcscb";
18 reg = <0x60000000 0x1000>;
19 };
diff --git a/Documentation/devicetree/bindings/arm/ste-nomadik.txt b/Documentation/devicetree/bindings/arm/ste-nomadik.txt
index 19bca04b81c9..6256ec31666d 100644
--- a/Documentation/devicetree/bindings/arm/ste-nomadik.txt
+++ b/Documentation/devicetree/bindings/arm/ste-nomadik.txt
@@ -3,6 +3,11 @@ ST-Ericsson Nomadik Device Tree Bindings
3For various board the "board" node may contain specific properties 3For various board the "board" node may contain specific properties
4that pertain to this particular board, such as board-specific GPIOs. 4that pertain to this particular board, such as board-specific GPIOs.
5 5
6Required root node property: src
7- Nomadik System and reset controller used for basic chip control, clock
8 and reset line control.
9- compatible: must be "stericsson,nomadik,src"
10
6Boards with the Nomadik SoC include: 11Boards with the Nomadik SoC include:
7 12
8S8815 "MiniKit" manufactured by Calao Systems: 13S8815 "MiniKit" manufactured by Calao Systems:
diff --git a/Documentation/devicetree/bindings/arm/ste-u300.txt b/Documentation/devicetree/bindings/arm/ste-u300.txt
new file mode 100644
index 000000000000..69b5ab0b5f4b
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/ste-u300.txt
@@ -0,0 +1,46 @@
1ST-Ericsson U300 Device Tree Bindings
2
3For various board the "board" node may contain specific properties
4that pertain to this particular board, such as board-specific GPIOs
5or board power regulator supplies.
6
7Required root node property:
8
9compatible="stericsson,u300";
10
11Required node: syscon
12This contains the system controller.
13- compatible: must be "stericsson,u300-syscon".
14- reg: the base address and size of the system controller.
15
16Boards with the U300 SoC include:
17
18S365 "Small Board U365":
19
20Required node: s365
21This contains the board-specific information.
22- compatible: must be "stericsson,s365".
23- vana15-supply: the regulator supplying the 1.5V to drive the
24 board.
25- syscon: a pointer to the syscon node so we can acccess the
26 syscon registers to set the board as self-powered.
27
28Example:
29
30/ {
31 model = "ST-Ericsson U300";
32 compatible = "stericsson,u300";
33 #address-cells = <1>;
34 #size-cells = <1>;
35
36 s365 {
37 compatible = "stericsson,s365";
38 vana15-supply = <&ab3100_ldo_d_reg>;
39 syscon = <&syscon>;
40 };
41
42 syscon: syscon@c0011000 {
43 compatible = "stericsson,u300-syscon";
44 reg = <0xc0011000 0x1000>;
45 };
46};
diff --git a/Documentation/devicetree/bindings/ata/atmel-at91_cf.txt b/Documentation/devicetree/bindings/ata/atmel-at91_cf.txt
new file mode 100644
index 000000000000..c1d22b3ae134
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/atmel-at91_cf.txt
@@ -0,0 +1,19 @@
1Atmel AT91RM9200 CompactFlash
2
3Required properties:
4- compatible : "atmel,at91rm9200-cf".
5- reg : should specify localbus address and size used.
6- gpios : specifies the gpio pins to control the CF device. Detect
7 and reset gpio's are mandatory while irq and vcc gpio's are
8 optional and may be set to 0 if not present.
9
10Example:
11compact-flash@50000000 {
12 compatible = "atmel,at91rm9200-cf";
13 reg = <0x50000000 0x30000000>;
14 gpios = <&pioC 13 0 /* irq */
15 &pioC 15 0 /* detect */
16 0 /* vcc */
17 &pioC 5 0 /* reset */
18 >;
19};
diff --git a/Documentation/devicetree/bindings/bus/imx-weim.txt b/Documentation/devicetree/bindings/bus/imx-weim.txt
new file mode 100644
index 000000000000..cedc2a9c4785
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/imx-weim.txt
@@ -0,0 +1,49 @@
1Device tree bindings for i.MX Wireless External Interface Module (WEIM)
2
3The term "wireless" does not imply that the WEIM is literally an interface
4without wires. It simply means that this module was originally designed for
5wireless and mobile applications that use low-power technology.
6
7The actual devices are instantiated from the child nodes of a WEIM node.
8
9Required properties:
10
11 - compatible: Should be set to "fsl,imx6q-weim"
12 - reg: A resource specifier for the register space
13 (see the example below)
14 - clocks: the clock, see the example below.
15 - #address-cells: Must be set to 2 to allow memory address translation
16 - #size-cells: Must be set to 1 to allow CS address passing
17 - ranges: Must be set up to reflect the memory layout with four
18 integer values for each chip-select line in use:
19
20 <cs-number> 0 <physical address of mapping> <size>
21
22Timing property for child nodes. It is mandatory, not optional.
23
24 - fsl,weim-cs-timing: The timing array, contains 6 timing values for the
25 child node. We can get the CS index from the child
26 node's "reg" property. This property contains the values
27 for the registers EIM_CSnGCR1, EIM_CSnGCR2, EIM_CSnRCR1,
28 EIM_CSnRCR2, EIM_CSnWCR1, EIM_CSnWCR2 in this order.
29
30Example for an imx6q-sabreauto board, the NOR flash connected to the WEIM:
31
32 weim: weim@021b8000 {
33 compatible = "fsl,imx6q-weim";
34 reg = <0x021b8000 0x4000>;
35 clocks = <&clks 196>;
36 #address-cells = <2>;
37 #size-cells = <1>;
38 ranges = <0 0 0x08000000 0x08000000>;
39
40 nor@0,0 {
41 compatible = "cfi-flash";
42 reg = <0 0 0x02000000>;
43 #address-cells = <1>;
44 #size-cells = <1>;
45 bank-width = <2>;
46 fsl,weim-cs-timing = <0x00620081 0x00000001 0x1c022000
47 0x0000c000 0x1404a38e 0x00000000>;
48 };
49 };
diff --git a/Documentation/devicetree/bindings/bus/ti-gpmc.txt b/Documentation/devicetree/bindings/bus/ti-gpmc.txt
index 4b87ea1194e3..704be9306c9f 100644
--- a/Documentation/devicetree/bindings/bus/ti-gpmc.txt
+++ b/Documentation/devicetree/bindings/bus/ti-gpmc.txt
@@ -95,7 +95,6 @@ GPMC chip-select settings properties for child nodes. All are optional.
95- gpmc,burst-wrap Enables wrap bursting 95- gpmc,burst-wrap Enables wrap bursting
96- gpmc,burst-read Enables read page/burst mode 96- gpmc,burst-read Enables read page/burst mode
97- gpmc,burst-write Enables write page/burst mode 97- gpmc,burst-write Enables write page/burst mode
98- gpmc,device-nand Device is NAND
99- gpmc,device-width Total width of device(s) connected to a GPMC 98- gpmc,device-width Total width of device(s) connected to a GPMC
100 chip-select in bytes. The GPMC supports 8-bit 99 chip-select in bytes. The GPMC supports 8-bit
101 and 16-bit devices and so this property must be 100 and 16-bit devices and so this property must be
diff --git a/Documentation/devicetree/bindings/clock/altr_socfpga.txt b/Documentation/devicetree/bindings/clock/altr_socfpga.txt
index bd0c8416a5c8..0045433eae1f 100644
--- a/Documentation/devicetree/bindings/clock/altr_socfpga.txt
+++ b/Documentation/devicetree/bindings/clock/altr_socfpga.txt
@@ -9,6 +9,9 @@ Required properties:
9 "altr,socfpga-pll-clock" - for a PLL clock 9 "altr,socfpga-pll-clock" - for a PLL clock
10 "altr,socfpga-perip-clock" - The peripheral clock divided from the 10 "altr,socfpga-perip-clock" - The peripheral clock divided from the
11 PLL clock. 11 PLL clock.
12 "altr,socfpga-gate-clk" - Clocks that directly feed peripherals and
13 can get gated.
14
12- reg : shall be the control register offset from CLOCK_MANAGER's base for the clock. 15- reg : shall be the control register offset from CLOCK_MANAGER's base for the clock.
13- clocks : shall be the input parent clock phandle for the clock. This is 16- clocks : shall be the input parent clock phandle for the clock. This is
14 either an oscillator or a pll output. 17 either an oscillator or a pll output.
@@ -16,3 +19,7 @@ Required properties:
16 19
17Optional properties: 20Optional properties:
18- fixed-divider : If clocks have a fixed divider value, use this property. 21- fixed-divider : If clocks have a fixed divider value, use this property.
22- clk-gate : For "socfpga-gate-clk", clk-gate contains the gating register
23 and the bit index.
24- div-reg : For "socfpga-gate-clk", div-reg contains the divider register, bit shift,
25 and width.
diff --git a/Documentation/devicetree/bindings/clock/clk-exynos-audss.txt b/Documentation/devicetree/bindings/clock/clk-exynos-audss.txt
new file mode 100644
index 000000000000..a1201802f90d
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/clk-exynos-audss.txt
@@ -0,0 +1,64 @@
1* Samsung Audio Subsystem Clock Controller
2
3The Samsung Audio Subsystem clock controller generates and supplies clocks
4to Audio Subsystem block available in the S5PV210 and Exynos SoCs. The clock
5binding described here is applicable to all SoC's in Exynos family.
6
7Required Properties:
8
9- compatible: should be one of the following:
10 - "samsung,exynos4210-audss-clock" - controller compatible with all Exynos4 SoCs.
11 - "samsung,exynos5250-audss-clock" - controller compatible with all Exynos5 SoCs.
12
13- reg: physical base address and length of the controller's register set.
14
15- #clock-cells: should be 1.
16
17The following is the list of clocks generated by the controller. Each clock is
18assigned an identifier and client nodes use this identifier to specify the
19clock which they consume. Some of the clocks are available only on a particular
20Exynos4 SoC and this is specified where applicable.
21
22Provided clocks:
23
24Clock ID SoC (if specific)
25-----------------------------------------------
26
27mout_audss 0
28mout_i2s 1
29dout_srp 2
30dout_aud_bus 3
31dout_i2s 4
32srp_clk 5
33i2s_bus 6
34sclk_i2s 7
35pcm_bus 8
36sclk_pcm 9
37
38Example 1: An example of a clock controller node is listed below.
39
40clock_audss: audss-clock-controller@3810000 {
41 compatible = "samsung,exynos5250-audss-clock";
42 reg = <0x03810000 0x0C>;
43 #clock-cells = <1>;
44};
45
46Example 2: I2S controller node that consumes the clock generated by the clock
47 controller. Refer to the standard clock bindings for information
48 about 'clocks' and 'clock-names' property.
49
50i2s0: i2s@03830000 {
51 compatible = "samsung,i2s-v5";
52 reg = <0x03830000 0x100>;
53 dmas = <&pdma0 10
54 &pdma0 9
55 &pdma0 8>;
56 dma-names = "tx", "rx", "tx-sec";
57 clocks = <&clock_audss EXYNOS_I2S_BUS>,
58 <&clock_audss EXYNOS_I2S_BUS>,
59 <&clock_audss EXYNOS_SCLK_I2S>,
60 <&clock_audss EXYNOS_MOUT_AUDSS>,
61 <&clock_audss EXYNOS_MOUT_I2S>;
62 clock-names = "iis", "i2s_opclk0", "i2s_opclk1",
63 "mout_audss", "mout_i2s";
64};
diff --git a/Documentation/devicetree/bindings/clock/exynos4-clock.txt b/Documentation/devicetree/bindings/clock/exynos4-clock.txt
index ea5e26f16aec..14d5c2af26f4 100644
--- a/Documentation/devicetree/bindings/clock/exynos4-clock.txt
+++ b/Documentation/devicetree/bindings/clock/exynos4-clock.txt
@@ -102,6 +102,7 @@ Exynos4 SoC and this is specified where applicable.
102 sclk_spi0_isp 174 Exynos4x12 102 sclk_spi0_isp 174 Exynos4x12
103 sclk_spi1_isp 175 Exynos4x12 103 sclk_spi1_isp 175 Exynos4x12
104 sclk_uart_isp 176 Exynos4x12 104 sclk_uart_isp 176 Exynos4x12
105 sclk_fimg2d 177
105 106
106 [Peripheral Clock Gates] 107 [Peripheral Clock Gates]
107 108
@@ -129,7 +130,7 @@ Exynos4 SoC and this is specified where applicable.
129 smmu_mfcl 274 130 smmu_mfcl 274
130 smmu_mfcr 275 131 smmu_mfcr 275
131 g3d 276 132 g3d 276
132 g2d 277 Exynos4210 133 g2d 277
133 rotator 278 Exynos4210 134 rotator 278 Exynos4210
134 mdma 279 Exynos4210 135 mdma 279 Exynos4210
135 smmu_g2d 280 Exynos4210 136 smmu_g2d 280 Exynos4210
diff --git a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt
new file mode 100644
index 000000000000..9bcc4b1bff51
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt
@@ -0,0 +1,201 @@
1* Samsung Exynos5420 Clock Controller
2
3The Exynos5420 clock controller generates and supplies clock to various
4controllers within the Exynos5420 SoC.
5
6Required Properties:
7
8- comptible: should be one of the following.
9 - "samsung,exynos5420-clock" - controller compatible with Exynos5420 SoC.
10
11- reg: physical base address of the controller and length of memory mapped
12 region.
13
14- #clock-cells: should be 1.
15
16The following is the list of clocks generated by the controller. Each clock is
17assigned an identifier and client nodes use this identifier to specify the
18clock which they consume.
19
20
21 [Core Clocks]
22
23 Clock ID
24 ----------------------------
25
26 fin_pll 1
27
28 [Clock Gate for Special Clocks]
29
30 Clock ID
31 ----------------------------
32 sclk_uart0 128
33 sclk_uart1 129
34 sclk_uart2 130
35 sclk_uart3 131
36 sclk_mmc0 132
37 sclk_mmc1 133
38 sclk_mmc2 134
39 sclk_spi0 135
40 sclk_spi1 136
41 sclk_spi2 137
42 sclk_i2s1 138
43 sclk_i2s2 139
44 sclk_pcm1 140
45 sclk_pcm2 141
46 sclk_spdif 142
47 sclk_hdmi 143
48 sclk_pixel 144
49 sclk_dp1 145
50 sclk_mipi1 146
51 sclk_fimd1 147
52 sclk_maudio0 148
53 sclk_maupcm0 149
54 sclk_usbd300 150
55 sclk_usbd301 151
56 sclk_usbphy300 152
57 sclk_usbphy301 153
58 sclk_unipro 154
59 sclk_pwm 155
60 sclk_gscl_wa 156
61 sclk_gscl_wb 157
62
63 [Peripheral Clock Gates]
64
65 Clock ID
66 ----------------------------
67
68 aclk66_peric 256
69 uart0 257
70 uart1 258
71 uart2 259
72 uart3 260
73 i2c0 261
74 i2c1 262
75 i2c2 263
76 i2c3 264
77 i2c4 265
78 i2c5 266
79 i2c6 267
80 i2c7 268
81 i2c_hdmi 269
82 tsadc 270
83 spi0 271
84 spi1 272
85 spi2 273
86 keyif 274
87 i2s1 275
88 i2s2 276
89 pcm1 277
90 pcm2 278
91 pwm 279
92 spdif 280
93 i2c8 281
94 i2c9 282
95 i2c10 283
96 aclk66_psgen 300
97 chipid 301
98 sysreg 302
99 tzpc0 303
100 tzpc1 304
101 tzpc2 305
102 tzpc3 306
103 tzpc4 307
104 tzpc5 308
105 tzpc6 309
106 tzpc7 310
107 tzpc8 311
108 tzpc9 312
109 hdmi_cec 313
110 seckey 314
111 mct 315
112 wdt 316
113 rtc 317
114 tmu 318
115 tmu_gpu 319
116 pclk66_gpio 330
117 aclk200_fsys2 350
118 mmc0 351
119 mmc1 352
120 mmc2 353
121 sromc 354
122 ufs 355
123 aclk200_fsys 360
124 tsi 361
125 pdma0 362
126 pdma1 363
127 rtic 364
128 usbh20 365
129 usbd300 366
130 usbd301 377
131 aclk400_mscl 380
132 mscl0 381
133 mscl1 382
134 mscl2 383
135 smmu_mscl0 384
136 smmu_mscl1 385
137 smmu_mscl2 386
138 aclk333 400
139 mfc 401
140 smmu_mfcl 402
141 smmu_mfcr 403
142 aclk200_disp1 410
143 dsim1 411
144 dp1 412
145 hdmi 413
146 aclk300_disp1 420
147 fimd1 421
148 smmu_fimd1 422
149 aclk166 430
150 mixer 431
151 aclk266 440
152 rotator 441
153 mdma1 442
154 smmu_rotator 443
155 smmu_mdma1 444
156 aclk300_jpeg 450
157 jpeg 451
158 jpeg2 452
159 smmu_jpeg 453
160 aclk300_gscl 460
161 smmu_gscl0 461
162 smmu_gscl1 462
163 gscl_wa 463
164 gscl_wb 464
165 gscl0 465
166 gscl1 466
167 clk_3aa 467
168 aclk266_g2d 470
169 sss 471
170 slim_sss 472
171 mdma0 473
172 aclk333_g2d 480
173 g2d 481
174 aclk333_432_gscl 490
175 smmu_3aa 491
176 smmu_fimcl0 492
177 smmu_fimcl1 493
178 smmu_fimcl3 494
179 fimc_lite3 495
180 aclk_g3d 500
181 g3d 501
182
183Example 1: An example of a clock controller node is listed below.
184
185 clock: clock-controller@0x10010000 {
186 compatible = "samsung,exynos5420-clock";
187 reg = <0x10010000 0x30000>;
188 #clock-cells = <1>;
189 };
190
191Example 2: UART controller node that consumes the clock generated by the clock
192 controller. Refer to the standard clock bindings for information
193 about 'clocks' and 'clock-names' property.
194
195 serial@13820000 {
196 compatible = "samsung,exynos4210-uart";
197 reg = <0x13820000 0x100>;
198 interrupts = <0 54 0>;
199 clocks = <&clock 259>, <&clock 130>;
200 clock-names = "uart", "clk_uart_baud0";
201 };
diff --git a/Documentation/devicetree/bindings/clock/imx5-clock.txt b/Documentation/devicetree/bindings/clock/imx5-clock.txt
index d71b4b2c077d..f46f5625d8ad 100644
--- a/Documentation/devicetree/bindings/clock/imx5-clock.txt
+++ b/Documentation/devicetree/bindings/clock/imx5-clock.txt
@@ -184,6 +184,19 @@ clocks and IDs.
184 cko2 170 184 cko2 170
185 srtc_gate 171 185 srtc_gate 171
186 pata_gate 172 186 pata_gate 172
187 sata_gate 173
188 spdif_xtal_sel 174
189 spdif0_sel 175
190 spdif1_sel 176
191 spdif0_pred 177
192 spdif0_podf 178
193 spdif1_pred 179
194 spdif1_podf 180
195 spdif0_com_sel 181
196 spdif1_com_sel 182
197 spdif0_gate 183
198 spdif1_gate 184
199 spdif_ipg_gate 185
187 200
188Examples (for mx53): 201Examples (for mx53):
189 202
diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.txt b/Documentation/devicetree/bindings/clock/imx6q-clock.txt
index 6deb6fd1c7cd..a0e104f0527e 100644
--- a/Documentation/devicetree/bindings/clock/imx6q-clock.txt
+++ b/Documentation/devicetree/bindings/clock/imx6q-clock.txt
@@ -208,6 +208,7 @@ clocks and IDs.
208 pll4_post_div 193 208 pll4_post_div 193
209 pll5_post_div 194 209 pll5_post_div 194
210 pll5_video_div 195 210 pll5_video_div 195
211 eim_slow 196
211 212
212Examples: 213Examples:
213 214
diff --git a/Documentation/devicetree/bindings/clock/imx6sl-clock.txt b/Documentation/devicetree/bindings/clock/imx6sl-clock.txt
new file mode 100644
index 000000000000..15e40bdf147d
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/imx6sl-clock.txt
@@ -0,0 +1,10 @@
1* Clock bindings for Freescale i.MX6 SoloLite
2
3Required properties:
4- compatible: Should be "fsl,imx6sl-ccm"
5- reg: Address and length of the register set
6- #clock-cells: Should be <1>
7
8The clock consumer should specify the desired clock by having the clock
9ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx6sl-clock.h
10for the full list of i.MX6 SoloLite clock IDs.
diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt
index d6cb083b90a2..0c80c2677104 100644
--- a/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt
+++ b/Documentation/devicetree/bindings/clock/nvidia,tegra114-car.txt
@@ -12,253 +12,9 @@ Required properties :
12- clocks : Should contain phandle and clock specifiers for two clocks: 12- clocks : Should contain phandle and clock specifiers for two clocks:
13 the 32 KHz "32k_in", and the board-specific oscillator "osc". 13 the 32 KHz "32k_in", and the board-specific oscillator "osc".
14- #clock-cells : Should be 1. 14- #clock-cells : Should be 1.
15 In clock consumers, this cell represents the clock ID exposed by the CAR. 15 In clock consumers, this cell represents the clock ID exposed by the
16 16 CAR. The assignments may be found in header file
17 The first 160 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB 17 <dt-bindings/clock/tegra114-car.h>.
18 registers. These IDs often match those in the CAR's RST_DEVICES registers,
19 but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In
20 this case, those clocks are assigned IDs above 160 in order to highlight
21 this issue. Implementations that interpret these clock IDs as bit values
22 within the CLK_OUT_ENB or RST_DEVICES registers should be careful to
23 explicitly handle these special cases.
24
25 The balance of the clocks controlled by the CAR are assigned IDs of 160 and
26 above.
27
28 0 unassigned
29 1 unassigned
30 2 unassigned
31 3 unassigned
32 4 rtc
33 5 timer
34 6 uarta
35 7 unassigned (register bit affects uartb and vfir)
36 8 unassigned
37 9 sdmmc2
38 10 unassigned (register bit affects spdif_in and spdif_out)
39 11 i2s1
40 12 i2c1
41 13 ndflash
42 14 sdmmc1
43 15 sdmmc4
44 16 unassigned
45 17 pwm
46 18 i2s2
47 19 epp
48 20 unassigned (register bit affects vi and vi_sensor)
49 21 2d
50 22 usbd
51 23 isp
52 24 3d
53 25 unassigned
54 26 disp2
55 27 disp1
56 28 host1x
57 29 vcp
58 30 i2s0
59 31 unassigned
60
61 32 unassigned
62 33 unassigned
63 34 apbdma
64 35 unassigned
65 36 kbc
66 37 unassigned
67 38 unassigned
68 39 unassigned (register bit affects fuse and fuse_burn)
69 40 kfuse
70 41 sbc1
71 42 nor
72 43 unassigned
73 44 sbc2
74 45 unassigned
75 46 sbc3
76 47 i2c5
77 48 dsia
78 49 unassigned
79 50 mipi
80 51 hdmi
81 52 csi
82 53 unassigned
83 54 i2c2
84 55 uartc
85 56 mipi-cal
86 57 emc
87 58 usb2
88 59 usb3
89 60 msenc
90 61 vde
91 62 bsea
92 63 bsev
93
94 64 unassigned
95 65 uartd
96 66 unassigned
97 67 i2c3
98 68 sbc4
99 69 sdmmc3
100 70 unassigned
101 71 owr
102 72 afi
103 73 csite
104 74 unassigned
105 75 unassigned
106 76 la
107 77 trace
108 78 soc_therm
109 79 dtv
110 80 ndspeed
111 81 i2cslow
112 82 dsib
113 83 tsec
114 84 unassigned
115 85 unassigned
116 86 unassigned
117 87 unassigned
118 88 unassigned
119 89 xusb_host
120 90 unassigned
121 91 msenc
122 92 csus
123 93 unassigned
124 94 unassigned
125 95 unassigned (bit affects xusb_dev and xusb_dev_src)
126
127 96 unassigned
128 97 unassigned
129 98 unassigned
130 99 mselect
131 100 tsensor
132 101 i2s3
133 102 i2s4
134 103 i2c4
135 104 sbc5
136 105 sbc6
137 106 d_audio
138 107 apbif
139 108 dam0
140 109 dam1
141 110 dam2
142 111 hda2codec_2x
143 112 unassigned
144 113 audio0_2x
145 114 audio1_2x
146 115 audio2_2x
147 116 audio3_2x
148 117 audio4_2x
149 118 spdif_2x
150 119 actmon
151 120 extern1
152 121 extern2
153 122 extern3
154 123 unassigned
155 124 unassigned
156 125 hda
157 126 unassigned
158 127 se
159
160 128 hda2hdmi
161 129 unassigned
162 130 unassigned
163 131 unassigned
164 132 unassigned
165 133 unassigned
166 134 unassigned
167 135 unassigned
168 136 unassigned
169 137 unassigned
170 138 unassigned
171 139 unassigned
172 140 unassigned
173 141 unassigned
174 142 unassigned
175 143 unassigned (bit affects xusb_falcon_src, xusb_fs_src,
176 xusb_host_src and xusb_ss_src)
177 144 cilab
178 145 cilcd
179 146 cile
180 147 dsialp
181 148 dsiblp
182 149 unassigned
183 150 dds
184 151 unassigned
185 152 dp2
186 153 amx
187 154 adx
188 155 unassigned (bit affects dfll_ref and dfll_soc)
189 156 xusb_ss
190
191 192 uartb
192 193 vfir
193 194 spdif_in
194 195 spdif_out
195 196 vi
196 197 vi_sensor
197 198 fuse
198 199 fuse_burn
199 200 clk_32k
200 201 clk_m
201 202 clk_m_div2
202 203 clk_m_div4
203 204 pll_ref
204 205 pll_c
205 206 pll_c_out1
206 207 pll_c2
207 208 pll_c3
208 209 pll_m
209 210 pll_m_out1
210 211 pll_p
211 212 pll_p_out1
212 213 pll_p_out2
213 214 pll_p_out3
214 215 pll_p_out4
215 216 pll_a
216 217 pll_a_out0
217 218 pll_d
218 219 pll_d_out0
219 220 pll_d2
220 221 pll_d2_out0
221 222 pll_u
222 223 pll_u_480M
223 224 pll_u_60M
224 225 pll_u_48M
225 226 pll_u_12M
226 227 pll_x
227 228 pll_x_out0
228 229 pll_re_vco
229 230 pll_re_out
230 231 pll_e_out0
231 232 spdif_in_sync
232 233 i2s0_sync
233 234 i2s1_sync
234 235 i2s2_sync
235 236 i2s3_sync
236 237 i2s4_sync
237 238 vimclk_sync
238 239 audio0
239 240 audio1
240 241 audio2
241 242 audio3
242 243 audio4
243 244 spdif
244 245 clk_out_1
245 246 clk_out_2
246 247 clk_out_3
247 248 blink
248 252 xusb_host_src
249 253 xusb_falcon_src
250 254 xusb_fs_src
251 255 xusb_ss_src
252 256 xusb_dev_src
253 257 xusb_dev
254 258 xusb_hs_src
255 259 sclk
256 260 hclk
257 261 pclk
258 262 cclk_g
259 263 cclk_lp
260 264 dfll_ref
261 265 dfll_soc
262 18
263Example SoC include file: 19Example SoC include file:
264 20
@@ -270,7 +26,7 @@ Example SoC include file:
270 }; 26 };
271 27
272 usb@c5004000 { 28 usb@c5004000 {
273 clocks = <&tegra_car 58>; /* usb2 */ 29 clocks = <&tegra_car TEGRA114_CLK_USB2>;
274 }; 30 };
275}; 31};
276 32
diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt
index e885680f6b45..fcfed5bf73fb 100644
--- a/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt
+++ b/Documentation/devicetree/bindings/clock/nvidia,tegra20-car.txt
@@ -12,155 +12,9 @@ Required properties :
12- clocks : Should contain phandle and clock specifiers for two clocks: 12- clocks : Should contain phandle and clock specifiers for two clocks:
13 the 32 KHz "32k_in", and the board-specific oscillator "osc". 13 the 32 KHz "32k_in", and the board-specific oscillator "osc".
14- #clock-cells : Should be 1. 14- #clock-cells : Should be 1.
15 In clock consumers, this cell represents the clock ID exposed by the CAR. 15 In clock consumers, this cell represents the clock ID exposed by the
16 16 CAR. The assignments may be found in header file
17 The first 96 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB 17 <dt-bindings/clock/tegra20-car.h>.
18 registers. These IDs often match those in the CAR's RST_DEVICES registers,
19 but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In
20 this case, those clocks are assigned IDs above 95 in order to highlight
21 this issue. Implementations that interpret these clock IDs as bit values
22 within the CLK_OUT_ENB or RST_DEVICES registers should be careful to
23 explicitly handle these special cases.
24
25 The balance of the clocks controlled by the CAR are assigned IDs of 96 and
26 above.
27
28 0 cpu
29 1 unassigned
30 2 unassigned
31 3 ac97
32 4 rtc
33 5 tmr
34 6 uart1
35 7 unassigned (register bit affects uart2 and vfir)
36 8 gpio
37 9 sdmmc2
38 10 unassigned (register bit affects spdif_in and spdif_out)
39 11 i2s1
40 12 i2c1
41 13 ndflash
42 14 sdmmc1
43 15 sdmmc4
44 16 twc
45 17 pwm
46 18 i2s2
47 19 epp
48 20 unassigned (register bit affects vi and vi_sensor)
49 21 2d
50 22 usbd
51 23 isp
52 24 3d
53 25 ide
54 26 disp2
55 27 disp1
56 28 host1x
57 29 vcp
58 30 unassigned
59 31 cache2
60
61 32 mem
62 33 ahbdma
63 34 apbdma
64 35 unassigned
65 36 kbc
66 37 stat_mon
67 38 pmc
68 39 fuse
69 40 kfuse
70 41 sbc1
71 42 snor
72 43 spi1
73 44 sbc2
74 45 xio
75 46 sbc3
76 47 dvc
77 48 dsi
78 49 unassigned (register bit affects tvo and cve)
79 50 mipi
80 51 hdmi
81 52 csi
82 53 tvdac
83 54 i2c2
84 55 uart3
85 56 unassigned
86 57 emc
87 58 usb2
88 59 usb3
89 60 mpe
90 61 vde
91 62 bsea
92 63 bsev
93
94 64 speedo
95 65 uart4
96 66 uart5
97 67 i2c3
98 68 sbc4
99 69 sdmmc3
100 70 pcie
101 71 owr
102 72 afi
103 73 csite
104 74 unassigned
105 75 avpucq
106 76 la
107 77 unassigned
108 78 unassigned
109 79 unassigned
110 80 unassigned
111 81 unassigned
112 82 unassigned
113 83 unassigned
114 84 irama
115 85 iramb
116 86 iramc
117 87 iramd
118 88 cram2
119 89 audio_2x a/k/a audio_2x_sync_clk
120 90 clk_d
121 91 unassigned
122 92 sus
123 93 cdev2
124 94 cdev1
125 95 unassigned
126
127 96 uart2
128 97 vfir
129 98 spdif_in
130 99 spdif_out
131 100 vi
132 101 vi_sensor
133 102 tvo
134 103 cve
135 104 osc
136 105 clk_32k a/k/a clk_s
137 106 clk_m
138 107 sclk
139 108 cclk
140 109 hclk
141 110 pclk
142 111 blink
143 112 pll_a
144 113 pll_a_out0
145 114 pll_c
146 115 pll_c_out1
147 116 pll_d
148 117 pll_d_out0
149 118 pll_e
150 119 pll_m
151 120 pll_m_out1
152 121 pll_p
153 122 pll_p_out1
154 123 pll_p_out2
155 124 pll_p_out3
156 125 pll_p_out4
157 126 pll_s
158 127 pll_u
159 128 pll_x
160 129 cop a/k/a avp
161 130 audio a/k/a audio_sync_clk
162 131 pll_ref
163 132 twd
164 18
165Example SoC include file: 19Example SoC include file:
166 20
@@ -172,7 +26,7 @@ Example SoC include file:
172 }; 26 };
173 27
174 usb@c5004000 { 28 usb@c5004000 {
175 clocks = <&tegra_car 58>; /* usb2 */ 29 clocks = <&tegra_car TEGRA20_CLK_USB2>;
176 }; 30 };
177}; 31};
178 32
diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt
index f3da3be5fcad..0f714081e986 100644
--- a/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt
+++ b/Documentation/devicetree/bindings/clock/nvidia,tegra30-car.txt
@@ -12,212 +12,9 @@ Required properties :
12- clocks : Should contain phandle and clock specifiers for two clocks: 12- clocks : Should contain phandle and clock specifiers for two clocks:
13 the 32 KHz "32k_in", and the board-specific oscillator "osc". 13 the 32 KHz "32k_in", and the board-specific oscillator "osc".
14- #clock-cells : Should be 1. 14- #clock-cells : Should be 1.
15 In clock consumers, this cell represents the clock ID exposed by the CAR. 15 In clock consumers, this cell represents the clock ID exposed by the
16 16 CAR. The assignments may be found in header file
17 The first 130 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB 17 <dt-bindings/clock/tegra30-car.h>.
18 registers. These IDs often match those in the CAR's RST_DEVICES registers,
19 but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In
20 this case, those clocks are assigned IDs above 160 in order to highlight
21 this issue. Implementations that interpret these clock IDs as bit values
22 within the CLK_OUT_ENB or RST_DEVICES registers should be careful to
23 explicitly handle these special cases.
24
25 The balance of the clocks controlled by the CAR are assigned IDs of 160 and
26 above.
27
28 0 cpu
29 1 unassigned
30 2 unassigned
31 3 unassigned
32 4 rtc
33 5 timer
34 6 uarta
35 7 unassigned (register bit affects uartb and vfir)
36 8 gpio
37 9 sdmmc2
38 10 unassigned (register bit affects spdif_in and spdif_out)
39 11 i2s1
40 12 i2c1
41 13 ndflash
42 14 sdmmc1
43 15 sdmmc4
44 16 unassigned
45 17 pwm
46 18 i2s2
47 19 epp
48 20 unassigned (register bit affects vi and vi_sensor)
49 21 2d
50 22 usbd
51 23 isp
52 24 3d
53 25 unassigned
54 26 disp2
55 27 disp1
56 28 host1x
57 29 vcp
58 30 i2s0
59 31 cop_cache
60
61 32 mc
62 33 ahbdma
63 34 apbdma
64 35 unassigned
65 36 kbc
66 37 statmon
67 38 pmc
68 39 unassigned (register bit affects fuse and fuse_burn)
69 40 kfuse
70 41 sbc1
71 42 nor
72 43 unassigned
73 44 sbc2
74 45 unassigned
75 46 sbc3
76 47 i2c5
77 48 dsia
78 49 unassigned (register bit affects cve and tvo)
79 50 mipi
80 51 hdmi
81 52 csi
82 53 tvdac
83 54 i2c2
84 55 uartc
85 56 unassigned
86 57 emc
87 58 usb2
88 59 usb3
89 60 mpe
90 61 vde
91 62 bsea
92 63 bsev
93
94 64 speedo
95 65 uartd
96 66 uarte
97 67 i2c3
98 68 sbc4
99 69 sdmmc3
100 70 pcie
101 71 owr
102 72 afi
103 73 csite
104 74 pciex
105 75 avpucq
106 76 la
107 77 unassigned
108 78 unassigned
109 79 dtv
110 80 ndspeed
111 81 i2cslow
112 82 dsib
113 83 unassigned
114 84 irama
115 85 iramb
116 86 iramc
117 87 iramd
118 88 cram2
119 89 unassigned
120 90 audio_2x a/k/a audio_2x_sync_clk
121 91 unassigned
122 92 csus
123 93 cdev2
124 94 cdev1
125 95 unassigned
126
127 96 cpu_g
128 97 cpu_lp
129 98 3d2
130 99 mselect
131 100 tsensor
132 101 i2s3
133 102 i2s4
134 103 i2c4
135 104 sbc5
136 105 sbc6
137 106 d_audio
138 107 apbif
139 108 dam0
140 109 dam1
141 110 dam2
142 111 hda2codec_2x
143 112 atomics
144 113 audio0_2x
145 114 audio1_2x
146 115 audio2_2x
147 116 audio3_2x
148 117 audio4_2x
149 118 audio5_2x
150 119 actmon
151 120 extern1
152 121 extern2
153 122 extern3
154 123 sata_oob
155 124 sata
156 125 hda
157 127 se
158 128 hda2hdmi
159 129 sata_cold
160
161 160 uartb
162 161 vfir
163 162 spdif_in
164 163 spdif_out
165 164 vi
166 165 vi_sensor
167 166 fuse
168 167 fuse_burn
169 168 cve
170 169 tvo
171
172 170 clk_32k
173 171 clk_m
174 172 clk_m_div2
175 173 clk_m_div4
176 174 pll_ref
177 175 pll_c
178 176 pll_c_out1
179 177 pll_m
180 178 pll_m_out1
181 179 pll_p
182 180 pll_p_out1
183 181 pll_p_out2
184 182 pll_p_out3
185 183 pll_p_out4
186 184 pll_a
187 185 pll_a_out0
188 186 pll_d
189 187 pll_d_out0
190 188 pll_d2
191 189 pll_d2_out0
192 190 pll_u
193 191 pll_x
194 192 pll_x_out0
195 193 pll_e
196 194 spdif_in_sync
197 195 i2s0_sync
198 196 i2s1_sync
199 197 i2s2_sync
200 198 i2s3_sync
201 199 i2s4_sync
202 200 vimclk
203 201 audio0
204 202 audio1
205 203 audio2
206 204 audio3
207 205 audio4
208 206 audio5
209 207 clk_out_1 (extern1)
210 208 clk_out_2 (extern2)
211 209 clk_out_3 (extern3)
212 210 sclk
213 211 blink
214 212 cclk_g
215 213 cclk_lp
216 214 twd
217 215 cml0
218 216 cml1
219 217 hclk
220 218 pclk
221 18
222Example SoC include file: 19Example SoC include file:
223 20
@@ -229,7 +26,7 @@ Example SoC include file:
229 }; 26 };
230 27
231 usb@c5004000 { 28 usb@c5004000 {
232 clocks = <&tegra_car 58>; /* usb2 */ 29 clocks = <&tegra_car TEGRA30_CLK_USB2>;
233 }; 30 };
234}; 31};
235 32
diff --git a/Documentation/devicetree/bindings/clock/st,nomadik.txt b/Documentation/devicetree/bindings/clock/st,nomadik.txt
new file mode 100644
index 000000000000..7fc09773de46
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/st,nomadik.txt
@@ -0,0 +1,104 @@
1ST Microelectronics Nomadik SRC System Reset and Control
2
3This binding uses the common clock binding:
4Documentation/devicetree/bindings/clock/clock-bindings.txt
5
6The Nomadik SRC controller is responsible of controlling chrystals,
7PLLs and clock gates.
8
9Required properties for the SRC node:
10- compatible: must be "stericsson,nomadik-src"
11- reg: must contain the SRC register base and size
12
13Optional properties for the SRC node:
14- disable-sxtalo: if present this will disable the SXTALO
15 i.e. the driver output for the slow 32kHz chrystal, if the
16 board has its own circuitry for providing this oscillator
17- disable-mxtal: if present this will disable the MXTALO,
18 i.e. the driver output for the main (~19.2 MHz) chrystal,
19 if the board has its own circuitry for providing this
20 osciallator
21
22
23PLL nodes: these nodes represent the two PLLs on the system,
24which should both have the main chrystal, represented as a
25fixed frequency clock, as parent.
26
27Required properties for the two PLL nodes:
28- compatible: must be "st,nomadik-pll-clock"
29- clock-cells: must be 0
30- clock-id: must be 1 or 2 for PLL1 and PLL2 respectively
31- clocks: this clock will have main chrystal as parent
32
33
34HCLK nodes: these represent the clock gates on individual
35lines from the HCLK clock tree and the gate for individual
36lines from the PCLK clock tree.
37
38Requires properties for the HCLK nodes:
39- compatible: must be "st,nomadik-hclk-clock"
40- clock-cells: must be 0
41- clock-id: must be the clock ID from 0 to 63 according to
42 this table:
43
44 0: HCLKDMA0
45 1: HCLKSMC
46 2: HCLKSDRAM
47 3: HCLKDMA1
48 4: HCLKCLCD
49 5: PCLKIRDA
50 6: PCLKSSP
51 7: PCLKUART0
52 8: PCLKSDI
53 9: PCLKI2C0
54 10: PCLKI2C1
55 11: PCLKUART1
56 12: PCLMSP0
57 13: HCLKUSB
58 14: HCLKDIF
59 15: HCLKSAA
60 16: HCLKSVA
61 17: PCLKHSI
62 18: PCLKXTI
63 19: PCLKUART2
64 20: PCLKMSP1
65 21: PCLKMSP2
66 22: PCLKOWM
67 23: HCLKHPI
68 24: PCLKSKE
69 25: PCLKHSEM
70 26: HCLK3D
71 27: HCLKHASH
72 28: HCLKCRYP
73 29: PCLKMSHC
74 30: HCLKUSBM
75 31: HCLKRNG
76 (32, 33, 34, 35 RESERVED)
77 36: CLDCLK
78 37: IRDACLK
79 38: SSPICLK
80 39: UART0CLK
81 40: SDICLK
82 41: I2C0CLK
83 42: I2C1CLK
84 43: UART1CLK
85 44: MSPCLK0
86 45: USBCLK
87 46: DIFCLK
88 47: IPI2CCLK
89 48: IPBMCCLK
90 49: HSICLKRX
91 50: HSICLKTX
92 51: UART2CLK
93 52: MSPCLK1
94 53: MSPCLK2
95 54: OWMCLK
96 (55 RESERVED)
97 56: SKECLK
98 (57 RESERVED)
99 58: 3DCLK
100 59: PCLKMSP3
101 60: MSPCLK3
102 61: MSHCCLK
103 62: USBMCLK
104 63: RNGCCLK
diff --git a/Documentation/devicetree/bindings/clock/ste-u300-syscon-clock.txt b/Documentation/devicetree/bindings/clock/ste-u300-syscon-clock.txt
new file mode 100644
index 000000000000..7cafcb98ead7
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/ste-u300-syscon-clock.txt
@@ -0,0 +1,80 @@
1Clock bindings for ST-Ericsson U300 System Controller Clocks
2
3Bindings for the gated system controller clocks:
4
5Required properties:
6- compatible: must be "stericsson,u300-syscon-clk"
7- #clock-cells: must be <0>
8- clock-type: specifies the type of clock:
9 0 = slow clock
10 1 = fast clock
11 2 = rest/remaining clock
12- clock-id: specifies the clock in the type range
13
14Optional properties:
15- clocks: parent clock(s)
16
17The available clocks per type are as follows:
18
19Type: ID: Clock:
20-------------------
210 0 Slow peripheral bridge clock
220 1 UART0 clock
230 4 GPIO clock
240 6 RTC clock
250 7 Application timer clock
260 8 Access timer clock
27
281 0 Fast peripheral bridge clock
291 1 I2C bus 0 clock
301 2 I2C bus 1 clock
311 5 MMC interface peripheral (silicon) clock
321 6 SPI clock
33
342 3 CPU clock
352 4 DMA controller clock
362 5 External Memory Interface (EMIF) clock
372 6 NAND flask interface clock
382 8 XGAM graphics engine clock
392 9 Shared External Memory Interface (SEMI) clock
402 10 AHB Subsystem Bridge clock
412 12 Interrupt controller clock
42
43Example:
44
45gpio_clk: gpio_clk@13M {
46 #clock-cells = <0>;
47 compatible = "stericsson,u300-syscon-clk";
48 clock-type = <0>; /* Slow */
49 clock-id = <4>;
50 clocks = <&slow_clk>;
51};
52
53gpio: gpio@c0016000 {
54 compatible = "stericsson,gpio-coh901";
55 (...)
56 clocks = <&gpio_clk>;
57};
58
59
60Bindings for the MMC/SD card clock:
61
62Required properties:
63- compatible: must be "stericsson,u300-syscon-mclk"
64- #clock-cells: must be <0>
65
66Optional properties:
67- clocks: parent clock(s)
68
69mmc_mclk: mmc_mclk {
70 #clock-cells = <0>;
71 compatible = "stericsson,u300-syscon-mclk";
72 clocks = <&mmc_pclk>;
73};
74
75mmcsd: mmcsd@c0001000 {
76 compatible = "arm,pl18x", "arm,primecell";
77 clocks = <&mmc_pclk>, <&mmc_mclk>;
78 clock-names = "apb_pclk", "mclk";
79 (...)
80};
diff --git a/Documentation/devicetree/bindings/clock/vf610-clock.txt b/Documentation/devicetree/bindings/clock/vf610-clock.txt
new file mode 100644
index 000000000000..c80863d344ac
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/vf610-clock.txt
@@ -0,0 +1,26 @@
1* Clock bindings for Freescale Vybrid VF610 SOC
2
3Required properties:
4- compatible: Should be "fsl,vf610-ccm"
5- reg: Address and length of the register set
6- #clock-cells: Should be <1>
7
8The clock consumer should specify the desired clock by having the clock
9ID in its "clocks" phandle cell. See include/dt-bindings/clock/vf610-clock.h
10for the full list of VF610 clock IDs.
11
12Examples:
13
14clks: ccm@4006b000 {
15 compatible = "fsl,vf610-ccm";
16 reg = <0x4006b000 0x1000>;
17 #clock-cells = <1>;
18};
19
20uart1: serial@40028000 {
21 compatible = "fsl,vf610-uart";
22 reg = <0x40028000 0x1000>;
23 interrupts = <0 62 0x04>;
24 clocks = <&clks VF610_CLK_UART1>;
25 clock-names = "ipg";
26};
diff --git a/Documentation/devicetree/bindings/clock/zynq-7000.txt b/Documentation/devicetree/bindings/clock/zynq-7000.txt
index 23ae1db1bc13..d99af878f5d7 100644
--- a/Documentation/devicetree/bindings/clock/zynq-7000.txt
+++ b/Documentation/devicetree/bindings/clock/zynq-7000.txt
@@ -6,50 +6,99 @@ The purpose of this document is to document their usage.
6See clock_bindings.txt for more information on the generic clock bindings. 6See clock_bindings.txt for more information on the generic clock bindings.
7See Chapter 25 of Zynq TRM for more information about Zynq clocks. 7See Chapter 25 of Zynq TRM for more information about Zynq clocks.
8 8
9== PLLs == 9== Clock Controller ==
10 10The clock controller is a logical abstraction of Zynq's clock tree. It reads
11Used to describe the ARM_PLL, DDR_PLL, and IO_PLL. 11required input clock frequencies from the devicetree and acts as clock provider
12for all clock consumers of PS clocks.
12 13
13Required properties: 14Required properties:
14- #clock-cells : shall be 0 (only one clock is output from this node) 15 - #clock-cells : Must be 1
15- compatible : "xlnx,zynq-pll" 16 - compatible : "xlnx,ps7-clkc"
16- reg : pair of u32 values, which are the address offsets within the SLCR 17 - ps-clk-frequency : Frequency of the oscillator providing ps_clk in HZ
17 of the relevant PLL_CTRL register and PLL_CFG register respectively 18 (usually 33 MHz oscillators are used for Zynq platforms)
18- clocks : phandle for parent clock. should be the phandle for ps_clk 19 - clock-output-names : List of strings used to name the clock outputs. Shall be
20 a list of the outputs given below.
19 21
20Optional properties: 22Optional properties:
21- clock-output-names : name of the output clock 23 - clocks : as described in the clock bindings
22 24 - clock-names : as described in the clock bindings
23Example:
24 armpll: armpll {
25 #clock-cells = <0>;
26 compatible = "xlnx,zynq-pll";
27 clocks = <&ps_clk>;
28 reg = <0x100 0x110>;
29 clock-output-names = "armpll";
30 };
31
32== Peripheral clocks ==
33 25
34Describes clock node for the SDIO, SMC, SPI, QSPI, and UART clocks. 26Clock inputs:
27The following strings are optional parameters to the 'clock-names' property in
28order to provide an optional (E)MIO clock source.
29 - swdt_ext_clk
30 - gem0_emio_clk
31 - gem1_emio_clk
32 - mio_clk_XX # with XX = 00..53
33...
35 34
36Required properties: 35Clock outputs:
37- #clock-cells : shall be 1 36 0: armpll
38- compatible : "xlnx,zynq-periph-clock" 37 1: ddrpll
39- reg : a single u32 value, describing the offset within the SLCR where 38 2: iopll
40 the CLK_CTRL register is found for this peripheral 39 3: cpu_6or4x
41- clocks : phandle for parent clocks. should hold phandles for 40 4: cpu_3or2x
42 the IO_PLL, ARM_PLL, and DDR_PLL in order 41 5: cpu_2x
43- clock-output-names : names of the output clock(s). For peripherals that have 42 6: cpu_1x
44 two output clocks (for example, the UART), two clocks 43 7: ddr2x
45 should be listed. 44 8: ddr3x
45 9: dci
46 10: lqspi
47 11: smc
48 12: pcap
49 13: gem0
50 14: gem1
51 15: fclk0
52 16: fclk1
53 17: fclk2
54 18: fclk3
55 19: can0
56 20: can1
57 21: sdio0
58 22: sdio1
59 23: uart0
60 24: uart1
61 25: spi0
62 26: spi1
63 27: dma
64 28: usb0_aper
65 29: usb1_aper
66 30: gem0_aper
67 31: gem1_aper
68 32: sdio0_aper
69 33: sdio1_aper
70 34: spi0_aper
71 35: spi1_aper
72 36: can0_aper
73 37: can1_aper
74 38: i2c0_aper
75 39: i2c1_aper
76 40: uart0_aper
77 41: uart1_aper
78 42: gpio_aper
79 43: lqspi_aper
80 44: smc_aper
81 45: swdt
82 46: dbg_trc
83 47: dbg_apb
46 84
47Example: 85Example:
48 uart_clk: uart_clk { 86 clkc: clkc {
49 #clock-cells = <1>; 87 #clock-cells = <1>;
50 compatible = "xlnx,zynq-periph-clock"; 88 compatible = "xlnx,ps7-clkc";
51 clocks = <&iopll &armpll &ddrpll>; 89 ps-clk-frequency = <33333333>;
52 reg = <0x154>; 90 clock-output-names = "armpll", "ddrpll", "iopll", "cpu_6or4x",
53 clock-output-names = "uart0_ref_clk", 91 "cpu_3or2x", "cpu_2x", "cpu_1x", "ddr2x", "ddr3x",
54 "uart1_ref_clk"; 92 "dci", "lqspi", "smc", "pcap", "gem0", "gem1",
93 "fclk0", "fclk1", "fclk2", "fclk3", "can0", "can1",
94 "sdio0", "sdio1", "uart0", "uart1", "spi0", "spi1",
95 "dma", "usb0_aper", "usb1_aper", "gem0_aper",
96 "gem1_aper", "sdio0_aper", "sdio1_aper",
97 "spi0_aper", "spi1_aper", "can0_aper", "can1_aper",
98 "i2c0_aper", "i2c1_aper", "uart0_aper", "uart1_aper",
99 "gpio_aper", "lqspi_aper", "smc_aper", "swdt",
100 "dbg_trc", "dbg_apb";
101 # optional props
102 clocks = <&clkc 16>, <&clk_foo>;
103 clock-names = "gem1_emio_clk", "can_mio_clk_23";
55 }; 104 };
diff --git a/Documentation/devicetree/bindings/dma/ste-coh901318.txt b/Documentation/devicetree/bindings/dma/ste-coh901318.txt
new file mode 100644
index 000000000000..091ad057e9cf
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/ste-coh901318.txt
@@ -0,0 +1,32 @@
1ST-Ericsson COH 901 318 DMA Controller
2
3This is a DMA controller which has begun as a fork of the
4ARM PL08x PrimeCell VHDL code.
5
6Required properties:
7- compatible: should be "stericsson,coh901318"
8- reg: register locations and length
9- interrupts: the single DMA IRQ
10- #dma-cells: must be set to <1>, as the channels on the
11 COH 901 318 are simple and identified by a single number
12- dma-channels: the number of DMA channels handled
13
14Example:
15
16dmac: dma-controller@c00020000 {
17 compatible = "stericsson,coh901318";
18 reg = <0xc0020000 0x1000>;
19 interrupt-parent = <&vica>;
20 interrupts = <2>;
21 #dma-cells = <1>;
22 dma-channels = <40>;
23};
24
25Consumers example:
26
27uart0: serial@c0013000 {
28 compatible = "...";
29 (...)
30 dmas = <&dmac 17 &dmac 18>;
31 dma-names = "tx", "rx";
32};
diff --git a/Documentation/devicetree/bindings/dma/ste-dma40.txt b/Documentation/devicetree/bindings/dma/ste-dma40.txt
new file mode 100644
index 000000000000..bea5b73a7390
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/ste-dma40.txt
@@ -0,0 +1,66 @@
1* DMA40 DMA Controller
2
3Required properties:
4- compatible: "stericsson,dma40"
5- reg: Address range of the DMAC registers
6- reg-names: Names of the above areas to use during resource look-up
7- interrupt: Should contain the DMAC interrupt number
8- #dma-cells: must be <3>
9- memcpy-channels: Channels to be used for memcpy
10
11Optional properties:
12- dma-channels: Number of channels supported by hardware - if not present
13 the driver will attempt to obtain the information from H/W
14- disabled-channels: Channels which can not be used
15
16Example:
17
18 dma: dma-controller@801C0000 {
19 compatible = "stericsson,db8500-dma40", "stericsson,dma40";
20 reg = <0x801C0000 0x1000 0x40010000 0x800>;
21 reg-names = "base", "lcpa";
22 interrupt-parent = <&intc>;
23 interrupts = <0 25 0x4>;
24
25 #dma-cells = <2>;
26 memcpy-channels = <56 57 58 59 60>;
27 disabled-channels = <12>;
28 dma-channels = <8>;
29 };
30
31Clients
32Required properties:
33- dmas: Comma separated list of dma channel requests
34- dma-names: Names of the aforementioned requested channels
35
36Each dmas request consists of 4 cells:
37 1. A phandle pointing to the DMA controller
38 2. Device Type
39 3. The DMA request line number (only when 'use fixed channel' is set)
40 4. A 32bit mask specifying; mode, direction and endianess [NB: This list will grow]
41 0x00000001: Mode:
42 Logical channel when unset
43 Physical channel when set
44 0x00000002: Direction:
45 Memory to Device when unset
46 Device to Memory when set
47 0x00000004: Endianess:
48 Little endian when unset
49 Big endian when set
50 0x00000008: Use fixed channel:
51 Use automatic channel selection when unset
52 Use DMA request line number when set
53
54Example:
55
56 uart@80120000 {
57 compatible = "arm,pl011", "arm,primecell";
58 reg = <0x80120000 0x1000>;
59 interrupts = <0 11 0x4>;
60
61 dmas = <&dma 13 0 0x2>, /* Logical - DevToMem */
62 <&dma 13 0 0x0>; /* Logical - MemToDev */
63 dma-names = "rx", "rx";
64
65 status = "disabled";
66 };
diff --git a/Documentation/devicetree/bindings/dma/ti-edma.txt b/Documentation/devicetree/bindings/dma/ti-edma.txt
new file mode 100644
index 000000000000..9fbbdb783a72
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/ti-edma.txt
@@ -0,0 +1,34 @@
1TI EDMA
2
3Required properties:
4- compatible : "ti,edma3"
5- ti,edma-regions: Number of regions
6- ti,edma-slots: Number of slots
7- #dma-cells: Should be set to <1>
8 Clients should use a single channel number per DMA request.
9- dma-channels: Specify total DMA channels per CC
10- reg: Memory map for accessing module
11- interrupt-parent: Interrupt controller the interrupt is routed through
12- interrupts: Exactly 3 interrupts need to be specified in the order:
13 1. Transfer completion interrupt.
14 2. Memory protection interrupt.
15 3. Error interrupt.
16Optional properties:
17- ti,hwmods: Name of the hwmods associated to the EDMA
18- ti,edma-xbar-event-map: Crossbar event to channel map
19
20Example:
21
22edma: edma@49000000 {
23 reg = <0x49000000 0x10000>;
24 interrupt-parent = <&intc>;
25 interrupts = <12 13 14>;
26 compatible = "ti,edma3";
27 ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";
28 #dma-cells = <1>;
29 dma-channels = <64>;
30 ti,edma-regions = <4>;
31 ti,edma-slots = <256>;
32 ti,edma-xbar-event-map = <1 12
33 2 13>;
34};
diff --git a/Documentation/devicetree/bindings/extcon/extcon-twl.txt b/Documentation/devicetree/bindings/extcon/extcon-twl.txt
new file mode 100644
index 000000000000..58f531ab4df3
--- /dev/null
+++ b/Documentation/devicetree/bindings/extcon/extcon-twl.txt
@@ -0,0 +1,15 @@
1EXTCON FOR TWL CHIPS
2
3PALMAS USB COMPARATOR
4Required Properties:
5 - compatible : Should be "ti,palmas-usb" or "ti,twl6035-usb"
6 - vbus-supply : phandle to the regulator device tree node.
7
8Optional Properties:
9 - ti,wakeup : To enable the wakeup comparator in probe
10
11palmas-usb {
12 compatible = "ti,twl6035-usb", "ti,palmas-usb";
13 vbus-supply = <&smps10_reg>;
14 ti,wakeup;
15};
diff --git a/Documentation/devicetree/bindings/gpio/gpio-clps711x.txt b/Documentation/devicetree/bindings/gpio/gpio-clps711x.txt
new file mode 100644
index 000000000000..e0d0446a6b78
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-clps711x.txt
@@ -0,0 +1,28 @@
1Cirrus Logic CLPS711X GPIO controller
2
3Required properties:
4- compatible: Should be "cirrus,clps711x-gpio"
5- reg: Physical base GPIO controller registers location and length.
6 There should be two registers, first is DATA register, the second
7 is DIRECTION.
8- gpio-controller: Marks the device node as a gpio controller.
9- #gpio-cells: Should be two. The first cell is the pin number and
10 the second cell is used to specify the gpio polarity:
11 0 = active high
12 1 = active low
13
14Note: Each GPIO port should have an alias correctly numbered in "aliases"
15node.
16
17Example:
18
19aliases {
20 gpio0 = &porta;
21};
22
23porta: gpio@80000000 {
24 compatible = "cirrus,clps711x-gpio";
25 reg = <0x80000000 0x1>, <0x80000040 0x1>;
26 gpio-controller;
27 #gpio-cells = <2>;
28};
diff --git a/Documentation/devicetree/bindings/gpio/gpio-msm.txt b/Documentation/devicetree/bindings/gpio/gpio-msm.txt
new file mode 100644
index 000000000000..ac20e68a004e
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-msm.txt
@@ -0,0 +1,26 @@
1MSM GPIO controller bindings
2
3Required properties:
4- compatible:
5 - "qcom,msm-gpio" for MSM controllers
6- #gpio-cells : Should be two.
7 - first cell is the pin number
8 - second cell is used to specify optional parameters (unused)
9- gpio-controller : Marks the device node as a GPIO controller.
10- #interrupt-cells : Should be 2.
11- interrupt-controller: Mark the device node as an interrupt controller
12- interrupts : Specify the TLMM summary interrupt number
13- ngpio : Specify the number of MSM GPIOs
14
15Example:
16
17 msmgpio: gpio@fd510000 {
18 compatible = "qcom,msm-gpio";
19 gpio-controller;
20 #gpio-cells = <2>;
21 interrupt-controller;
22 #interrupt-cells = <2>;
23 reg = <0xfd510000 0x4000>;
24 interrupts = <0 208 0>;
25 ngpio = <150>;
26 };
diff --git a/Documentation/devicetree/bindings/gpio/gpio-samsung.txt b/Documentation/devicetree/bindings/gpio/gpio-samsung.txt
index f1e5dfecf55d..5375625e8cd2 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-samsung.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio-samsung.txt
@@ -39,46 +39,3 @@ Example:
39 #gpio-cells = <4>; 39 #gpio-cells = <4>;
40 gpio-controller; 40 gpio-controller;
41 }; 41 };
42
43
44Samsung S3C24XX GPIO Controller
45
46Required properties:
47- compatible: Compatible property value should be "samsung,s3c24xx-gpio".
48
49- reg: Physical base address of the controller and length of memory mapped
50 region.
51
52- #gpio-cells: Should be 3. The syntax of the gpio specifier used by client nodes
53 should be the following with values derived from the SoC user manual.
54 <[phandle of the gpio controller node]
55 [pin number within the gpio controller]
56 [mux function]
57 [flags and pull up/down]
58
59 Values for gpio specifier:
60 - Pin number: depending on the controller a number from 0 up to 15.
61 - Mux function: Depending on the SoC and the gpio bank the gpio can be set
62 as input, output or a special function
63 - Flags and Pull Up/Down: the values to use differ for the individual SoCs
64 example S3C2416/S3C2450:
65 0 - Pull Up/Down Disabled.
66 1 - Pull Down Enabled.
67 2 - Pull Up Enabled.
68 Bit 16 (0x00010000) - Input is active low.
69 Consult the user manual for the correct values of Mux and Pull Up/Down.
70
71- gpio-controller: Specifies that the node is a gpio controller.
72- #address-cells: should be 1.
73- #size-cells: should be 1.
74
75Example:
76
77 gpa: gpio-controller@56000000 {
78 #address-cells = <1>;
79 #size-cells = <1>;
80 compatible = "samsung,s3c24xx-gpio";
81 reg = <0x56000000 0x10>;
82 #gpio-cells = <3>;
83 gpio-controller;
84 };
diff --git a/Documentation/devicetree/bindings/gpio/gpio-stericsson-coh901.txt b/Documentation/devicetree/bindings/gpio/gpio-stericsson-coh901.txt
new file mode 100644
index 000000000000..fd665b44d767
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-stericsson-coh901.txt
@@ -0,0 +1,7 @@
1ST-Ericsson COH 901 571/3 GPIO controller
2
3Required properties:
4- compatible: Compatible property value should be "stericsson,gpio-coh901"
5- reg: Physical base address of the controller and length of memory mapped
6 region.
7- interrupts: the 0...n interrupts assigned to the different GPIO ports/banks.
diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
new file mode 100644
index 000000000000..cb3dc7bcd8e6
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
@@ -0,0 +1,46 @@
1* Renesas R-Car GPIO Controller
2
3Required Properties:
4
5 - compatible: should be one of the following.
6 - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO controller.
7 - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller.
8 - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller.
9 - "renesas,gpio-rcar": for generic R-Car GPIO controller.
10
11 - reg: Base address and length of each memory resource used by the GPIO
12 controller hardware module.
13
14 - interrupt-parent: phandle of the parent interrupt controller.
15 - interrupts: Interrupt specifier for the controllers interrupt.
16
17 - gpio-controller: Marks the device node as a gpio controller.
18 - #gpio-cells: Should be 2. The first cell is the GPIO number and the second
19 cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>. Only the
20 GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported.
21 - gpio-ranges: Range of pins managed by the GPIO controller.
22
23Please refer to gpio.txt in this directory for details of gpio-ranges property
24and the common GPIO bindings used by client devices.
25
26Example: R8A7779 (R-Car H1) GPIO controller nodes
27
28 gpio0: gpio@ffc40000 {
29 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
30 reg = <0xffc40000 0x2c>;
31 interrupt-parent = <&gic>;
32 interrupts = <0 141 0x4>;
33 #gpio-cells = <2>;
34 gpio-controller;
35 gpio-ranges = <&pfc 0 0 32>;
36 };
37 ...
38 gpio6: gpio@ffc46000 {
39 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
40 reg = <0xffc46000 0x2c>;
41 interrupt-parent = <&gic>;
42 interrupts = <0 147 0x4>;
43 #gpio-cells = <2>;
44 gpio-controller;
45 gpio-ranges = <&pfc 0 192 9>;
46 };
diff --git a/Documentation/devicetree/bindings/gpu/samsung-g2d.txt b/Documentation/devicetree/bindings/gpu/samsung-g2d.txt
index 2b14a940eb75..3f454ffc654a 100644
--- a/Documentation/devicetree/bindings/gpu/samsung-g2d.txt
+++ b/Documentation/devicetree/bindings/gpu/samsung-g2d.txt
@@ -10,11 +10,16 @@ Required properties:
10 mapped region. 10 mapped region.
11 11
12 - interrupts : G2D interrupt number to the CPU. 12 - interrupts : G2D interrupt number to the CPU.
13 - clocks : from common clock binding: handle to G2D clocks.
14 - clock-names : from common clock binding: must contain "sclk_fimg2d" and
15 "fimg2d", corresponding to entries in the clocks property.
13 16
14Example: 17Example:
15 g2d@12800000 { 18 g2d@12800000 {
16 compatible = "samsung,s5pv210-g2d"; 19 compatible = "samsung,s5pv210-g2d";
17 reg = <0x12800000 0x1000>; 20 reg = <0x12800000 0x1000>;
18 interrupts = <0 89 0>; 21 interrupts = <0 89 0>;
22 clocks = <&clock 177>, <&clock 277>;
23 clock-names = "sclk_fimg2d", "fimg2d";
19 status = "disabled"; 24 status = "disabled";
20 }; 25 };
diff --git a/Documentation/devicetree/bindings/i2c/i2c-st-ddci2c.txt b/Documentation/devicetree/bindings/i2c/i2c-st-ddci2c.txt
new file mode 100644
index 000000000000..bd81a482634f
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-st-ddci2c.txt
@@ -0,0 +1,15 @@
1ST Microelectronics DDC I2C
2
3Required properties :
4- compatible : Must be "st,ddci2c"
5- reg: physical base address of the controller and length of memory mapped
6 region.
7- interrupts: interrupt number to the cpu.
8- #address-cells = <1>;
9- #size-cells = <0>;
10
11Optional properties:
12- Child nodes conforming to i2c bus binding
13
14Examples :
15
diff --git a/Documentation/devicetree/bindings/iio/dac/ad7303.txt b/Documentation/devicetree/bindings/iio/dac/ad7303.txt
new file mode 100644
index 000000000000..914610f0556e
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/ad7303.txt
@@ -0,0 +1,23 @@
1Analog Devices AD7303 DAC device driver
2
3Required properties:
4 - compatible: Must be "adi,ad7303"
5 - reg: SPI chip select number for the device
6 - spi-max-frequency: Max SPI frequency to use (< 30000000)
7 - Vdd-supply: Phandle to the Vdd power supply
8
9Optional properties:
10 - REF-supply: Phandle to the external reference voltage supply. This should
11 only be set if there is an external reference voltage connected to the REF
12 pin. If the property is not set Vdd/2 is used as the reference voltage.
13
14Example:
15
16 ad7303@4 {
17 compatible = "adi,ad7303";
18 reg = <4>;
19 spi-max-frequency = <10000000>;
20 Vdd-supply = <&vdd_supply>;
21 adi,use-external-reference;
22 REF-supply = <&vref_supply>;
23 };
diff --git a/Documentation/devicetree/bindings/iio/frequency/adf4350.txt b/Documentation/devicetree/bindings/iio/frequency/adf4350.txt
new file mode 100644
index 000000000000..f8c181d81d2d
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/frequency/adf4350.txt
@@ -0,0 +1,86 @@
1Analog Devices ADF4350/ADF4351 device driver
2
3Required properties:
4 - compatible: Should be one of
5 * "adi,adf4350": When using the ADF4350 device
6 * "adi,adf4351": When using the ADF4351 device
7 - reg: SPI chip select numbert for the device
8 - spi-max-frequency: Max SPI frequency to use (< 20000000)
9 - clocks: From common clock binding. Clock is phandle to clock for
10 ADF435x Reference Clock (CLKIN).
11
12Optional properties:
13 - gpios: GPIO Lock detect - If set with a valid phandle and GPIO number,
14 pll lock state is tested upon read.
15 - adi,channel-spacing: Channel spacing in Hz (influences MODULUS).
16 - adi,power-up-frequency: If set in Hz the PLL tunes to
17 the desired frequency on probe.
18 - adi,reference-div-factor: If set the driver skips dynamic calculation
19 and uses this default value instead.
20 - adi,reference-doubler-enable: Enables reference doubler.
21 - adi,reference-div2-enable: Enables reference divider.
22 - adi,phase-detector-polarity-positive-enable: Enables positive phase
23 detector polarity. Default = negative.
24 - adi,lock-detect-precision-6ns-enable: Enables 6ns lock detect precision.
25 Default = 10ns.
26 - adi,lock-detect-function-integer-n-enable: Enables lock detect
27 for integer-N mode. Default = factional-N mode.
28 - adi,charge-pump-current: Charge pump current in mA.
29 Default = 2500mA.
30 - adi,muxout-select: On chip multiplexer output selection.
31 Valid values for the multiplexer output are:
32 0: Three-State Output (default)
33 1: DVDD
34 2: DGND
35 3: R-Counter output
36 4: N-Divider output
37 5: Analog lock detect
38 6: Digital lock detect
39 - adi,low-spur-mode-enable: Enables low spur mode.
40 Default = Low noise mode.
41 - adi,cycle-slip-reduction-enable: Enables cycle slip reduction.
42 - adi,charge-cancellation-enable: Enabled charge pump
43 charge cancellation for integer-N modes.
44 - adi,anti-backlash-3ns-enable: Enables 3ns antibacklash pulse width
45 for integer-N modes.
46 - adi,band-select-clock-mode-high-enable: Enables faster band
47 selection logic.
48 - adi,12bit-clk-divider: Clock divider value used when
49 adi,12bit-clkdiv-mode != 0
50 - adi,clk-divider-mode:
51 Valid values for the clkdiv mode are:
52 0: Clock divider off (default)
53 1: Fast lock enable
54 2: Phase resync enable
55 - adi,aux-output-enable: Enables auxiliary RF output.
56 - adi,aux-output-fundamental-enable: Selects fundamental VCO output on
57 the auxiliary RF output. Default = Output of RF dividers.
58 - adi,mute-till-lock-enable: Enables Mute-Till-Lock-Detect function.
59 - adi,output-power: Output power selection.
60 Valid values for the power mode are:
61 0: -4dBm (default)
62 1: -1dBm
63 2: +2dBm
64 3: +5dBm
65 - adi,aux-output-power: Auxiliary output power selection.
66 Valid values for the power mode are:
67 0: -4dBm (default)
68 1: -1dBm
69 2: +2dBm
70 3: +5dBm
71
72
73Example:
74 lo_pll0_rx_adf4351: adf4351-rx-lpc@4 {
75 compatible = "adi,adf4351";
76 reg = <4>;
77 spi-max-frequency = <10000000>;
78 clocks = <&clk0_ad9523 9>;
79 clock-names = "clkin";
80 adi,channel-spacing = <10000>;
81 adi,power-up-frequency = <2400000000>;
82 adi,phase-detector-polarity-positive-enable;
83 adi,charge-pump-current = <2500>;
84 adi,output-power = <3>;
85 adi,mute-till-lock-enable;
86 };
diff --git a/Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt b/Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt
new file mode 100644
index 000000000000..011679f1a425
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/magnetometer/ak8975.txt
@@ -0,0 +1,18 @@
1* AsahiKASEI AK8975 magnetometer sensor
2
3Required properties:
4
5 - compatible : should be "asahi-kasei,ak8975"
6 - reg : the I2C address of the magnetometer
7
8Optional properties:
9
10 - gpios : should be device tree identifier of the magnetometer DRDY pin
11
12Example:
13
14ak8975@0c {
15 compatible = "asahi-kasei,ak8975";
16 reg = <0x0c>;
17 gpios = <&gpj0 7 0>;
18};
diff --git a/Documentation/devicetree/bindings/interrupt-controller/abilis,tb10x-ictl.txt b/Documentation/devicetree/bindings/interrupt-controller/abilis,tb10x-ictl.txt
new file mode 100644
index 000000000000..9d52d5afe3e9
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/abilis,tb10x-ictl.txt
@@ -0,0 +1,38 @@
1TB10x Top Level Interrupt Controller
2====================================
3
4The Abilis TB10x SOC contains a custom interrupt controller. It performs
5one-to-one mapping of external interrupt sources to CPU interrupts and
6provides support for reconfigurable trigger modes.
7
8Required properties
9-------------------
10
11- compatible: Should be "abilis,tb10x-ictl"
12- reg: specifies physical base address and size of register range.
13- interrupt-congroller: Identifies the node as an interrupt controller.
14- #interrupt cells: Specifies the number of cells used to encode an interrupt
15 source connected to this controller. The value shall be 2.
16- interrupt-parent: Specifies the parent interrupt controller.
17- interrupts: Specifies the list of interrupt lines which are handled by
18 the interrupt controller in the parent controller's notation. Interrupts
19 are mapped one-to-one to parent interrupts.
20
21Example
22-------
23
24intc: interrupt-controller { /* Parent interrupt controller */
25 interrupt-controller;
26 #interrupt-cells = <1>; /* For example below */
27 /* ... */
28};
29
30tb10x_ictl: pic@2000 { /* TB10x interrupt controller */
31 compatible = "abilis,tb10x-ictl";
32 reg = <0x2000 0x20>;
33 interrupt-controller;
34 #interrupt-cells = <2>;
35 interrupt-parent = <&intc>;
36 interrupts = <5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
37 20 21 22 23 24 25 26 27 28 29 30 31>;
38};
diff --git a/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt
index e7f4dc14eff2..57edb30dbbca 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt
+++ b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt
@@ -8,91 +8,8 @@ Required properties:
8- #interrupt-cells : Specifies the number of cells needed to encode an 8- #interrupt-cells : Specifies the number of cells needed to encode an
9 interrupt source. The value shall be 1. 9 interrupt source. The value shall be 1.
10 10
11The interrupt sources are as follows: 11For the valid interrupt sources for your SoC, see the documentation in
12 12sunxi/<soc>.txt
130: ENMI
141: UART0
152: UART1
163: UART2
174: UART3
185: IR0
196: IR1
207: I2C0
218: I2C1
229: I2C2
2310: SPI0
2411: SPI1
2512: SPI2
2613: SPDIF
2714: AC97
2815: TS
2916: I2S
3017: UART4
3118: UART5
3219: UART6
3320: UART7
3421: KEYPAD
3522: TIMER0
3623: TIMER1
3724: TIMER2
3825: TIMER3
3926: CAN
4027: DMA
4128: PIO
4229: TOUCH_PANEL
4330: AUDIO_CODEC
4431: LRADC
4532: SDMC0
4633: SDMC1
4734: SDMC2
4835: SDMC3
4936: MEMSTICK
5037: NAND
5138: USB0
5239: USB1
5340: USB2
5441: SCR
5542: CSI0
5643: CSI1
5744: LCDCTRL0
5845: LCDCTRL1
5946: MP
6047: DEFEBE0
6148: DEFEBE1
6249: PMU
6350: SPI3
6451: TZASC
6552: PATA
6653: VE
6754: SS
6855: EMAC
6956: SATA
7057: GPS
7158: HDMI
7259: TVE
7360: ACE
7461: TVD
7562: PS2_0
7663: PS2_1
7764: USB3
7865: USB4
7966: PLE_PFM
8067: TIMER4
8168: TIMER5
8269: GPU_GP
8370: GPU_GPMMU
8471: GPU_PP0
8572: GPU_PPMMU0
8673: GPU_PMU
8774: GPU_RSV0
8875: GPU_RSV1
8976: GPU_RSV2
9077: GPU_RSV3
9178: GPU_RSV4
9279: GPU_RSV5
9380: GPU_RSV6
9482: SYNC_TIMER0
9583: SYNC_TIMER1
96 13
97Example: 14Example:
98 15
diff --git a/Documentation/devicetree/bindings/interrupt-controller/marvell,orion-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/marvell,orion-intc.txt
new file mode 100644
index 000000000000..2c11ac76fac9
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/marvell,orion-intc.txt
@@ -0,0 +1,48 @@
1Marvell Orion SoC interrupt controllers
2
3* Main interrupt controller
4
5Required properties:
6- compatible: shall be "marvell,orion-intc"
7- reg: base address(es) of interrupt registers starting with CAUSE register
8- interrupt-controller: identifies the node as an interrupt controller
9- #interrupt-cells: number of cells to encode an interrupt source, shall be 1
10
11The interrupt sources map to the corresponding bits in the interrupt
12registers, i.e.
13- 0 maps to bit 0 of first base address,
14- 1 maps to bit 1 of first base address,
15- 32 maps to bit 0 of second base address, and so on.
16
17Example:
18 intc: interrupt-controller {
19 compatible = "marvell,orion-intc";
20 interrupt-controller;
21 #interrupt-cells = <1>;
22 /* Dove has 64 first level interrupts */
23 reg = <0x20200 0x10>, <0x20210 0x10>;
24 };
25
26* Bridge interrupt controller
27
28Required properties:
29- compatible: shall be "marvell,orion-bridge-intc"
30- reg: base address of bridge interrupt registers starting with CAUSE register
31- interrupts: bridge interrupt of the main interrupt controller
32- interrupt-controller: identifies the node as an interrupt controller
33- #interrupt-cells: number of cells to encode an interrupt source, shall be 1
34
35Optional properties:
36- marvell,#interrupts: number of interrupts provided by bridge interrupt
37 controller, defaults to 32 if not set
38
39Example:
40 bridge_intc: interrupt-controller {
41 compatible = "marvell,orion-bridge-intc";
42 interrupt-controller;
43 #interrupt-cells = <1>;
44 reg = <0x20110 0x8>;
45 interrupts = <0>;
46 /* Dove bridge provides 5 interrupts */
47 marvell,#interrupts = <5>;
48 };
diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt
new file mode 100644
index 000000000000..1f8b0c507c26
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt
@@ -0,0 +1,16 @@
1DT bindings for the R-/SH-Mobile irqpin controller
2
3Required properties:
4
5- compatible: has to be "renesas,intc-irqpin"
6- #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in
7 interrupts.txt in this directory
8
9Optional properties:
10
11- any properties, listed in interrupts.txt, and any standard resource allocation
12 properties
13- sense-bitfield-width: width of a single sense bitfield in the SENSE register,
14 if different from the default 4 bits
15- control-parent: disable and enable interrupts on the parent interrupt
16 controller, needed for some broken implementations
diff --git a/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun4i-a10.txt b/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun4i-a10.txt
new file mode 100644
index 000000000000..76b98c834499
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun4i-a10.txt
@@ -0,0 +1,89 @@
1Allwinner A10 (sun4i) interrupt sources
2---------------------------------------
3
4The interrupt sources available for the Allwinner A10 SoC are the
5following one:
6
70: ENMI
81: UART0
92: UART1
103: UART2
114: UART3
125: IR0
136: IR1
147: I2C0
158: I2C1
169: I2C2
1710: SPI0
1811: SPI1
1912: SPI2
2013: SPDIF
2114: AC97
2215: TS
2316: I2S
2417: UART4
2518: UART5
2619: UART6
2720: UART7
2821: KEYPAD
2922: TIMER0
3023: TIMER1
3124: TIMER2
3225: TIMER3
3326: CAN
3427: DMA
3528: PIO
3629: TOUCH_PANEL
3730: AUDIO_CODEC
3831: LRADC
3932: MMC0
4033: MMC1
4134: MMC2
4235: MMC3
4336: MEMSTICK
4437: NAND
4538: USB0
4639: USB1
4740: USB2
4841: SCR
4942: CSI0
5043: CSI1
5144: LCDCTRL0
5245: LCDCTRL1
5346: MP
5447: DEFEBE0
5548: DEFEBE1
5649: PMU
5750: SPI3
5851: TZASC
5952: PATA
6053: VE
6154: SS
6255: EMAC
6356: SATA
6457: GPS
6558: HDMI
6659: TVE
6760: ACE
6861: TVD
6962: PS2_0
7063: PS2_1
7164: USB3
7265: USB4
7366: PLE_PFM
7467: TIMER4
7568: TIMER5
7669: GPU_GP
7770: GPU_GPMMU
7871: GPU_PP0
7972: GPU_PPMMU0
8073: GPU_PMU
8174: GPU_RSV0
8275: GPU_RSV1
8376: GPU_RSV2
8477: GPU_RSV3
8578: GPU_RSV4
8679: GPU_RSV5
8780: GPU_RSV6
8882: SYNC_TIMER0
8983: SYNC_TIMER1
diff --git a/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun5i-a13.txt b/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun5i-a13.txt
new file mode 100644
index 000000000000..2ec3b5ce1a0b
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun5i-a13.txt
@@ -0,0 +1,55 @@
1Allwinner A13 (sun5i) interrupt sources
2---------------------------------------
3
4The interrupt sources available for the Allwinner A13 SoC are the
5following one:
6
70: ENMI
82: UART1
94: UART3
105: IR
117: I2C0
128: I2C1
139: I2C2
1410: SPI0
1511: SPI1
1612: SPI2
1722: TIMER0
1823: TIMER1
1924: TIMER2
2025: TIMER3
2127: DMA
2228: PIO
2329: TOUCH_PANEL
2430: AUDIO_CODEC
2531: LRADC
2632: MMC0
2733: MMC1
2834: MMC2
2937: NAND
3038: USB OTG
3139: USB EHCI
3240: USB OHCI
3342: CSI
3444: LCDCTRL
3547: DEFEBE
3649: PMU
3753: VE
3854: SS
3966: PLE_PFM
4067: TIMER4
4168: TIMER5
4269: GPU_GP
4370: GPU_GPMMU
4471: GPU_PP0
4572: GPU_PPMMU0
4673: GPU_PMU
4774: GPU_RSV0
4875: GPU_RSV1
4976: GPU_RSV2
5077: GPU_RSV3
5178: GPU_RSV4
5279: GPU_RSV5
5380: GPU_RSV6
5482: SYNC_TIMER0
5583: SYNC_TIMER1
diff --git a/Documentation/devicetree/bindings/media/s5p-mfc.txt b/Documentation/devicetree/bindings/media/s5p-mfc.txt
index bf0182d8da25..df37b0230c75 100644
--- a/Documentation/devicetree/bindings/media/s5p-mfc.txt
+++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt
@@ -15,6 +15,9 @@ Required properties:
15 mapped region. 15 mapped region.
16 16
17 - interrupts : MFC interrupt number to the CPU. 17 - interrupts : MFC interrupt number to the CPU.
18 - clocks : from common clock binding: handle to mfc clocks.
19 - clock-names : from common clock binding: must contain "sclk_mfc" and "mfc",
20 corresponding to entries in the clocks property.
18 21
19 - samsung,mfc-r : Base address of the first memory bank used by MFC 22 - samsung,mfc-r : Base address of the first memory bank used by MFC
20 for DMA contiguous memory allocation and its size. 23 for DMA contiguous memory allocation and its size.
@@ -34,6 +37,8 @@ mfc: codec@13400000 {
34 reg = <0x13400000 0x10000>; 37 reg = <0x13400000 0x10000>;
35 interrupts = <0 94 0>; 38 interrupts = <0 94 0>;
36 samsung,power-domain = <&pd_mfc>; 39 samsung,power-domain = <&pd_mfc>;
40 clocks = <&clock 170>, <&clock 273>;
41 clock-names = "sclk_mfc", "mfc";
37}; 42};
38 43
39Board specific DT entry: 44Board specific DT entry:
diff --git a/Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt b/Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt
new file mode 100644
index 000000000000..653c90c34a71
--- /dev/null
+++ b/Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt
@@ -0,0 +1,156 @@
1Device tree bindings for MVEBU Device Bus controllers
2
3The Device Bus controller available in some Marvell's SoC allows to control
4different types of standard memory and I/O devices such as NOR, NAND, and FPGA.
5The actual devices are instantiated from the child nodes of a Device Bus node.
6
7Required properties:
8
9 - compatible: Currently only Armada 370/XP SoC are supported,
10 with this compatible string:
11
12 marvell,mvebu-devbus
13
14 - reg: A resource specifier for the register space.
15 This is the base address of a chip select within
16 the controller's register space.
17 (see the example below)
18
19 - #address-cells: Must be set to 1
20 - #size-cells: Must be set to 1
21 - ranges: Must be set up to reflect the memory layout with four
22 integer values for each chip-select line in use:
23 0 <physical address of mapping> <size>
24
25Mandatory timing properties for child nodes:
26
27Read parameters:
28
29 - devbus,turn-off-ps: Defines the time during which the controller does not
30 drive the AD bus after the completion of a device read.
31 This prevents contentions on the Device Bus after a read
32 cycle from a slow device.
33
34 - devbus,bus-width: Defines the bus width (e.g. <16>)
35
36 - devbus,badr-skew-ps: Defines the time delay from from A[2:0] toggle,
37 to read data sample. This parameter is useful for
38 synchronous pipelined devices, where the address
39 precedes the read data by one or two cycles.
40
41 - devbus,acc-first-ps: Defines the time delay from the negation of
42 ALE[0] to the cycle that the first read data is sampled
43 by the controller.
44
45 - devbus,acc-next-ps: Defines the time delay between the cycle that
46 samples data N and the cycle that samples data N+1
47 (in burst accesses).
48
49 - devbus,rd-setup-ps: Defines the time delay between DEV_CSn assertion to
50 DEV_OEn assertion. If set to 0 (default),
51 DEV_OEn and DEV_CSn are asserted at the same cycle.
52 This parameter has no affect on <acc-first-ps> parameter
53 (no affect on first data sample). Set <rd-setup-ps>
54 to a value smaller than <acc-first-ps>.
55
56 - devbus,rd-hold-ps: Defines the time between the last data sample to the
57 de-assertion of DEV_CSn. If set to 0 (default),
58 DEV_OEn and DEV_CSn are de-asserted at the same cycle
59 (the cycle of the last data sample).
60 This parameter has no affect on DEV_OEn de-assertion.
61 DEV_OEn is always de-asserted the next cycle after
62 last data sampled. Also this parameter has no
63 affect on <turn-off-ps> parameter.
64 Set <rd-hold-ps> to a value smaller than <turn-off-ps>.
65
66Write parameters:
67
68 - devbus,ale-wr-ps: Defines the time delay from the ALE[0] negation cycle
69 to the DEV_WEn assertion.
70
71 - devbus,wr-low-ps: Defines the time during which DEV_WEn is active.
72 A[2:0] and Data are kept valid as long as DEV_WEn
73 is active. This parameter defines the setup time of
74 address and data to DEV_WEn rise.
75
76 - devbus,wr-high-ps: Defines the time during which DEV_WEn is kept
77 inactive (high) between data beats of a burst write.
78 DEV_A[2:0] and Data are kept valid (do not toggle) for
79 <wr-high-ps> - <tick> ps.
80 This parameter defines the hold time of address and
81 data after DEV_WEn rise.
82
83 - devbus,sync-enable: Synchronous device enable.
84 1: True
85 0: False
86
87An example for an Armada XP GP board, with a 16 MiB NOR device as child
88is showed below. Note that the Device Bus driver is in charge of allocating
89the mbus address decoding window for each of its child devices.
90The window is created using the chip select specified in the child
91device node together with the base address and size specified in the ranges
92property. For instance, in the example below the allocated decoding window
93will start at base address 0xf0000000, with a size 0x1000000 (16 MiB)
94for chip select 0 (a.k.a DEV_BOOTCS).
95
96This address window handling is done in this mvebu-devbus only as a temporary
97solution. It will be removed when the support for mbus device tree binding is
98added.
99
100The reg property implicitly specifies the chip select as this:
101
102 0x10400: DEV_BOOTCS
103 0x10408: DEV_CS0
104 0x10410: DEV_CS1
105 0x10418: DEV_CS2
106 0x10420: DEV_CS3
107
108Example:
109
110 devbus-bootcs@d0010400 {
111 status = "okay";
112 ranges = <0 0xf0000000 0x1000000>; /* @addr 0xf0000000, size 0x1000000 */
113 #address-cells = <1>;
114 #size-cells = <1>;
115
116 /* Device Bus parameters are required */
117
118 /* Read parameters */
119 devbus,bus-width = <8>;
120 devbus,turn-off-ps = <60000>;
121 devbus,badr-skew-ps = <0>;
122 devbus,acc-first-ps = <124000>;
123 devbus,acc-next-ps = <248000>;
124 devbus,rd-setup-ps = <0>;
125 devbus,rd-hold-ps = <0>;
126
127 /* Write parameters */
128 devbus,sync-enable = <0>;
129 devbus,wr-high-ps = <60000>;
130 devbus,wr-low-ps = <60000>;
131 devbus,ale-wr-ps = <60000>;
132
133 flash@0 {
134 compatible = "cfi-flash";
135
136 /* 16 MiB */
137 reg = <0 0x1000000>;
138 bank-width = <2>;
139 #address-cells = <1>;
140 #size-cells = <1>;
141
142 /*
143 * We split the 16 MiB in two partitions,
144 * just as an example.
145 */
146 partition@0 {
147 label = "First";
148 reg = <0 0x800000>;
149 };
150
151 partition@800000 {
152 label = "Second";
153 reg = <0x800000 0x800000>;
154 };
155 };
156 };
diff --git a/Documentation/devicetree/bindings/mfd/ab8500.txt b/Documentation/devicetree/bindings/mfd/ab8500.txt
index c3a14e0ad0ad..cd9e90c5d171 100644
--- a/Documentation/devicetree/bindings/mfd/ab8500.txt
+++ b/Documentation/devicetree/bindings/mfd/ab8500.txt
@@ -120,7 +120,7 @@ ab8500 {
120 "USB_LINK_STATUS", 120 "USB_LINK_STATUS",
121 "USB_ADP_PROBE_PLUG", 121 "USB_ADP_PROBE_PLUG",
122 "USB_ADP_PROBE_UNPLUG"; 122 "USB_ADP_PROBE_UNPLUG";
123 vddulpivio18-supply = <&ab8500_ldo_initcore_reg>; 123 vddulpivio18-supply = <&ab8500_ldo_intcore_reg>;
124 v-ape-supply = <&db8500_vape_reg>; 124 v-ape-supply = <&db8500_vape_reg>;
125 musb_1v8-supply = <&db8500_vsmps2_reg>; 125 musb_1v8-supply = <&db8500_vsmps2_reg>;
126 }; 126 };
diff --git a/Documentation/devicetree/bindings/mmc/bcm,kona-sdhci.txt b/Documentation/devicetree/bindings/mmc/bcm,kona-sdhci.txt
new file mode 100644
index 000000000000..094ae010f2fb
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/bcm,kona-sdhci.txt
@@ -0,0 +1,16 @@
1Broadcom BCM281xx SDHCI
2
3This file documents differences between the core properties in mmc.txt
4and the properties present in the bcm281xx SDHCI
5
6Required properties:
7- compatible : Should be "bcm,kona-sdhci"
8
9Example:
10
11sdio2: sdio@0x3f1a0000 {
12 compatible = "bcm,kona-sdhci";
13 reg = <0x3f1a0000 0x10000>;
14 interrupts = <0x0 74 0x4>;
15};
16
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
index 6a983c1d87cd..df338cb5059c 100644
--- a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
@@ -29,6 +29,13 @@ Optional properties:
29 "bch4" 4-bit BCH ecc code 29 "bch4" 4-bit BCH ecc code
30 "bch8" 8-bit BCH ecc code 30 "bch8" 8-bit BCH ecc code
31 31
32 - ti,nand-xfer-type: A string setting the data transfer type. One of:
33
34 "prefetch-polled" Prefetch polled mode (default)
35 "polled" Polled mode, without prefetch
36 "prefetch-dma" Prefetch enabled sDMA mode
37 "prefetch-irq" Prefetch enabled irq mode
38
32 - elm_id: Specifies elm device node. This is required to support BCH 39 - elm_id: Specifies elm device node. This is required to support BCH
33 error correction using ELM module. 40 error correction using ELM module.
34 41
@@ -55,6 +62,7 @@ Example for an AM33xx board:
55 reg = <0 0 0>; /* CS0, offset 0 */ 62 reg = <0 0 0>; /* CS0, offset 0 */
56 nand-bus-width = <16>; 63 nand-bus-width = <16>;
57 ti,nand-ecc-opt = "bch8"; 64 ti,nand-ecc-opt = "bch8";
65 ti,nand-xfer-type = "polled";
58 66
59 gpmc,sync-clk-ps = <0>; 67 gpmc,sync-clk-ps = <0>;
60 gpmc,cs-on-ns = <0>; 68 gpmc,cs-on-ns = <0>;
diff --git a/Documentation/devicetree/bindings/pci/designware-pcie.txt b/Documentation/devicetree/bindings/pci/designware-pcie.txt
new file mode 100644
index 000000000000..e2371f5cdebe
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/designware-pcie.txt
@@ -0,0 +1,73 @@
1* Synopsis Designware PCIe interface
2
3Required properties:
4- compatible: should contain "snps,dw-pcie" to identify the
5 core, plus an identifier for the specific instance, such
6 as "samsung,exynos5440-pcie".
7- reg: base addresses and lengths of the pcie controller,
8 the phy controller, additional register for the phy controller.
9- interrupts: interrupt values for level interrupt,
10 pulse interrupt, special interrupt.
11- clocks: from common clock binding: handle to pci clock.
12- clock-names: from common clock binding: should be "pcie" and "pcie_bus".
13- #address-cells: set to <3>
14- #size-cells: set to <2>
15- device_type: set to "pci"
16- ranges: ranges for the PCI memory and I/O regions
17- #interrupt-cells: set to <1>
18- interrupt-map-mask and interrupt-map: standard PCI properties
19 to define the mapping of the PCIe interface to interrupt
20 numbers.
21- reset-gpio: gpio pin number of power good signal
22
23Example:
24
25SoC specific DT Entry:
26
27 pcie@290000 {
28 compatible = "samsung,exynos5440-pcie", "snps,dw-pcie";
29 reg = <0x290000 0x1000
30 0x270000 0x1000
31 0x271000 0x40>;
32 interrupts = <0 20 0>, <0 21 0>, <0 22 0>;
33 clocks = <&clock 28>, <&clock 27>;
34 clock-names = "pcie", "pcie_bus";
35 #address-cells = <3>;
36 #size-cells = <2>;
37 device_type = "pci";
38 ranges = <0x00000800 0 0x40000000 0x40000000 0 0x00001000 /* configuration space */
39 0x81000000 0 0 0x40001000 0 0x00010000 /* downstream I/O */
40 0x82000000 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */
41 #interrupt-cells = <1>;
42 interrupt-map-mask = <0 0 0 0>;
43 interrupt-map = <0x0 0 &gic 53>;
44 };
45
46 pcie@2a0000 {
47 compatible = "samsung,exynos5440-pcie", "snps,dw-pcie";
48 reg = <0x2a0000 0x1000
49 0x272000 0x1000
50 0x271040 0x40>;
51 interrupts = <0 23 0>, <0 24 0>, <0 25 0>;
52 clocks = <&clock 29>, <&clock 27>;
53 clock-names = "pcie", "pcie_bus";
54 #address-cells = <3>;
55 #size-cells = <2>;
56 device_type = "pci";
57 ranges = <0x00000800 0 0x60000000 0x60000000 0 0x00001000 /* configuration space */
58 0x81000000 0 0 0x60001000 0 0x00010000 /* downstream I/O */
59 0x82000000 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */
60 #interrupt-cells = <1>;
61 interrupt-map-mask = <0 0 0 0>;
62 interrupt-map = <0x0 0 &gic 56>;
63 };
64
65Board specific DT Entry:
66
67 pcie@290000 {
68 reset-gpio = <&pin_ctrl 5 0>;
69 };
70
71 pcie@2a0000 {
72 reset-gpio = <&pin_ctrl 22 0>;
73 };
diff --git a/Documentation/devicetree/bindings/pci/mvebu-pci.txt b/Documentation/devicetree/bindings/pci/mvebu-pci.txt
new file mode 100644
index 000000000000..f8d405897a94
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/mvebu-pci.txt
@@ -0,0 +1,221 @@
1* Marvell EBU PCIe interfaces
2
3Mandatory properties:
4- compatible: one of the following values:
5 marvell,armada-370-pcie
6 marvell,armada-xp-pcie
7 marvell,kirkwood-pcie
8- #address-cells, set to <3>
9- #size-cells, set to <2>
10- #interrupt-cells, set to <1>
11- bus-range: PCI bus numbers covered
12- device_type, set to "pci"
13- ranges: ranges for the PCI memory and I/O regions, as well as the
14 MMIO registers to control the PCIe interfaces.
15
16In addition, the Device Tree node must have sub-nodes describing each
17PCIe interface, having the following mandatory properties:
18- reg: used only for interrupt mapping, so only the first four bytes
19 are used to refer to the correct bus number and device number.
20- assigned-addresses: reference to the MMIO registers used to control
21 this PCIe interface.
22- clocks: the clock associated to this PCIe interface
23- marvell,pcie-port: the physical PCIe port number
24- status: either "disabled" or "okay"
25- device_type, set to "pci"
26- #address-cells, set to <3>
27- #size-cells, set to <2>
28- #interrupt-cells, set to <1>
29- ranges, empty property.
30- interrupt-map-mask and interrupt-map, standard PCI properties to
31 define the mapping of the PCIe interface to interrupt numbers.
32
33and the following optional properties:
34- marvell,pcie-lane: the physical PCIe lane number, for ports having
35 multiple lanes. If this property is not found, we assume that the
36 value is 0.
37
38Example:
39
40pcie-controller {
41 compatible = "marvell,armada-xp-pcie";
42 status = "disabled";
43 device_type = "pci";
44
45 #address-cells = <3>;
46 #size-cells = <2>;
47
48 bus-range = <0x00 0xff>;
49
50 ranges = <0x82000000 0 0xd0040000 0xd0040000 0 0x00002000 /* Port 0.0 registers */
51 0x82000000 0 0xd0042000 0xd0042000 0 0x00002000 /* Port 2.0 registers */
52 0x82000000 0 0xd0044000 0xd0044000 0 0x00002000 /* Port 0.1 registers */
53 0x82000000 0 0xd0048000 0xd0048000 0 0x00002000 /* Port 0.2 registers */
54 0x82000000 0 0xd004c000 0xd004c000 0 0x00002000 /* Port 0.3 registers */
55 0x82000000 0 0xd0080000 0xd0080000 0 0x00002000 /* Port 1.0 registers */
56 0x82000000 0 0xd0082000 0xd0082000 0 0x00002000 /* Port 3.0 registers */
57 0x82000000 0 0xd0084000 0xd0084000 0 0x00002000 /* Port 1.1 registers */
58 0x82000000 0 0xd0088000 0xd0088000 0 0x00002000 /* Port 1.2 registers */
59 0x82000000 0 0xd008c000 0xd008c000 0 0x00002000 /* Port 1.3 registers */
60 0x82000000 0 0xe0000000 0xe0000000 0 0x08000000 /* non-prefetchable memory */
61 0x81000000 0 0 0xe8000000 0 0x00100000>; /* downstream I/O */
62
63 pcie@1,0 {
64 device_type = "pci";
65 assigned-addresses = <0x82000800 0 0xd0040000 0 0x2000>;
66 reg = <0x0800 0 0 0 0>;
67 #address-cells = <3>;
68 #size-cells = <2>;
69 #interrupt-cells = <1>;
70 ranges;
71 interrupt-map-mask = <0 0 0 0>;
72 interrupt-map = <0 0 0 0 &mpic 58>;
73 marvell,pcie-port = <0>;
74 marvell,pcie-lane = <0>;
75 clocks = <&gateclk 5>;
76 status = "disabled";
77 };
78
79 pcie@2,0 {
80 device_type = "pci";
81 assigned-addresses = <0x82001000 0 0xd0044000 0 0x2000>;
82 reg = <0x1000 0 0 0 0>;
83 #address-cells = <3>;
84 #size-cells = <2>;
85 #interrupt-cells = <1>;
86 ranges;
87 interrupt-map-mask = <0 0 0 0>;
88 interrupt-map = <0 0 0 0 &mpic 59>;
89 marvell,pcie-port = <0>;
90 marvell,pcie-lane = <1>;
91 clocks = <&gateclk 6>;
92 status = "disabled";
93 };
94
95 pcie@3,0 {
96 device_type = "pci";
97 assigned-addresses = <0x82001800 0 0xd0048000 0 0x2000>;
98 reg = <0x1800 0 0 0 0>;
99 #address-cells = <3>;
100 #size-cells = <2>;
101 #interrupt-cells = <1>;
102 ranges;
103 interrupt-map-mask = <0 0 0 0>;
104 interrupt-map = <0 0 0 0 &mpic 60>;
105 marvell,pcie-port = <0>;
106 marvell,pcie-lane = <2>;
107 clocks = <&gateclk 7>;
108 status = "disabled";
109 };
110
111 pcie@4,0 {
112 device_type = "pci";
113 assigned-addresses = <0x82002000 0 0xd004c000 0 0x2000>;
114 reg = <0x2000 0 0 0 0>;
115 #address-cells = <3>;
116 #size-cells = <2>;
117 #interrupt-cells = <1>;
118 ranges;
119 interrupt-map-mask = <0 0 0 0>;
120 interrupt-map = <0 0 0 0 &mpic 61>;
121 marvell,pcie-port = <0>;
122 marvell,pcie-lane = <3>;
123 clocks = <&gateclk 8>;
124 status = "disabled";
125 };
126
127 pcie@5,0 {
128 device_type = "pci";
129 assigned-addresses = <0x82002800 0 0xd0080000 0 0x2000>;
130 reg = <0x2800 0 0 0 0>;
131 #address-cells = <3>;
132 #size-cells = <2>;
133 #interrupt-cells = <1>;
134 ranges;
135 interrupt-map-mask = <0 0 0 0>;
136 interrupt-map = <0 0 0 0 &mpic 62>;
137 marvell,pcie-port = <1>;
138 marvell,pcie-lane = <0>;
139 clocks = <&gateclk 9>;
140 status = "disabled";
141 };
142
143 pcie@6,0 {
144 device_type = "pci";
145 assigned-addresses = <0x82003000 0 0xd0084000 0 0x2000>;
146 reg = <0x3000 0 0 0 0>;
147 #address-cells = <3>;
148 #size-cells = <2>;
149 #interrupt-cells = <1>;
150 ranges;
151 interrupt-map-mask = <0 0 0 0>;
152 interrupt-map = <0 0 0 0 &mpic 63>;
153 marvell,pcie-port = <1>;
154 marvell,pcie-lane = <1>;
155 clocks = <&gateclk 10>;
156 status = "disabled";
157 };
158
159 pcie@7,0 {
160 device_type = "pci";
161 assigned-addresses = <0x82003800 0 0xd0088000 0 0x2000>;
162 reg = <0x3800 0 0 0 0>;
163 #address-cells = <3>;
164 #size-cells = <2>;
165 #interrupt-cells = <1>;
166 ranges;
167 interrupt-map-mask = <0 0 0 0>;
168 interrupt-map = <0 0 0 0 &mpic 64>;
169 marvell,pcie-port = <1>;
170 marvell,pcie-lane = <2>;
171 clocks = <&gateclk 11>;
172 status = "disabled";
173 };
174
175 pcie@8,0 {
176 device_type = "pci";
177 assigned-addresses = <0x82004000 0 0xd008c000 0 0x2000>;
178 reg = <0x4000 0 0 0 0>;
179 #address-cells = <3>;
180 #size-cells = <2>;
181 #interrupt-cells = <1>;
182 ranges;
183 interrupt-map-mask = <0 0 0 0>;
184 interrupt-map = <0 0 0 0 &mpic 65>;
185 marvell,pcie-port = <1>;
186 marvell,pcie-lane = <3>;
187 clocks = <&gateclk 12>;
188 status = "disabled";
189 };
190 pcie@9,0 {
191 device_type = "pci";
192 assigned-addresses = <0x82004800 0 0xd0042000 0 0x2000>;
193 reg = <0x4800 0 0 0 0>;
194 #address-cells = <3>;
195 #size-cells = <2>;
196 #interrupt-cells = <1>;
197 ranges;
198 interrupt-map-mask = <0 0 0 0>;
199 interrupt-map = <0 0 0 0 &mpic 99>;
200 marvell,pcie-port = <2>;
201 marvell,pcie-lane = <0>;
202 clocks = <&gateclk 26>;
203 status = "disabled";
204 };
205
206 pcie@10,0 {
207 device_type = "pci";
208 assigned-addresses = <0x82005000 0 0xd0082000 0 0x2000>;
209 reg = <0x5000 0 0 0 0>;
210 #address-cells = <3>;
211 #size-cells = <2>;
212 #interrupt-cells = <1>;
213 ranges;
214 interrupt-map-mask = <0 0 0 0>;
215 interrupt-map = <0 0 0 0 &mpic 103>;
216 marvell,pcie-port = <3>;
217 marvell,pcie-lane = <0>;
218 clocks = <&gateclk 27>;
219 status = "disabled";
220 };
221};
diff --git a/Documentation/devicetree/bindings/pci/pci.txt b/Documentation/devicetree/bindings/pci/pci.txt
new file mode 100644
index 000000000000..41aeed38926d
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/pci.txt
@@ -0,0 +1,9 @@
1PCI bus bridges have standardized Device Tree bindings:
2
3PCI Bus Binding to: IEEE Std 1275-1994
4http://www.openfirmware.org/ofwg/bindings/pci/pci2_1.pdf
5
6And for the interrupt mapping part:
7
8Open Firmware Recommended Practice: Interrupt Mapping
9http://www.openfirmware.org/1275/practice/imap/imap0_9d.pdf
diff --git a/Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt b/Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt
new file mode 100644
index 000000000000..30b364e504ba
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt
@@ -0,0 +1,15 @@
1V3 Semiconductor V360 EPC PCI bridge
2
3This bridge is found in the ARM Integrator/AP (Application Platform)
4
5Integrator-specific notes:
6
7- syscon: should contain a link to the syscon device node (since
8 on the Integrator, some registers in the syscon are required to
9 operate the V3).
10
11V360 EPC specific notes:
12
13- reg: should contain the base address of the V3 adapter.
14- interrupts: should contain a reference to the V3 error interrupt
15 as routed on the system.
diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt
index bcfdab5d442e..3a7caf7a744a 100644
--- a/Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt
@@ -58,7 +58,7 @@ Some requirements for using fsl,imx-pinctrl binding:
58 58
59Examples: 59Examples:
60usdhc@0219c000 { /* uSDHC4 */ 60usdhc@0219c000 { /* uSDHC4 */
61 fsl,card-wired; 61 non-removable;
62 vmmc-supply = <&reg_3p3v>; 62 vmmc-supply = <&reg_3p3v>;
63 status = "okay"; 63 status = "okay";
64 pinctrl-names = "default"; 64 pinctrl-names = "default";
diff --git a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
index c70fca146e91..36281e7a2a46 100644
--- a/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
@@ -7,10 +7,15 @@ on-chip controllers onto these pads.
7 7
8Required Properties: 8Required Properties:
9- compatible: should be one of the following. 9- compatible: should be one of the following.
10 - "samsung,s3c2412-pinctrl": for S3C2412-compatible pin-controller,
11 - "samsung,s3c2416-pinctrl": for S3C2416-compatible pin-controller,
12 - "samsung,s3c2440-pinctrl": for S3C2440-compatible pin-controller,
13 - "samsung,s3c2450-pinctrl": for S3C2450-compatible pin-controller,
10 - "samsung,s3c64xx-pinctrl": for S3C64xx-compatible pin-controller, 14 - "samsung,s3c64xx-pinctrl": for S3C64xx-compatible pin-controller,
11 - "samsung,exynos4210-pinctrl": for Exynos4210 compatible pin-controller. 15 - "samsung,exynos4210-pinctrl": for Exynos4210 compatible pin-controller.
12 - "samsung,exynos4x12-pinctrl": for Exynos4x12 compatible pin-controller. 16 - "samsung,exynos4x12-pinctrl": for Exynos4x12 compatible pin-controller.
13 - "samsung,exynos5250-pinctrl": for Exynos5250 compatible pin-controller. 17 - "samsung,exynos5250-pinctrl": for Exynos5250 compatible pin-controller.
18 - "samsung,exynos5420-pinctrl": for Exynos5420 compatible pin-controller.
14 19
15- reg: Base address of the pin controller hardware module and length of 20- reg: Base address of the pin controller hardware module and length of
16 the address space it occupies. 21 the address space it occupies.
@@ -21,8 +26,18 @@ Required Properties:
21 26
22 - gpio-controller: identifies the node as a gpio controller and pin bank. 27 - gpio-controller: identifies the node as a gpio controller and pin bank.
23 - #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO 28 - #gpio-cells: number of cells in GPIO specifier. Since the generic GPIO
24 binding is used, the amount of cells must be specified as 2. See generic 29 binding is used, the amount of cells must be specified as 2. See the below
25 GPIO binding documentation for description of particular cells. 30 mentioned gpio binding representation for description of particular cells.
31
32 Eg: <&gpx2 6 0>
33 <[phandle of the gpio controller node]
34 [pin number within the gpio controller]
35 [flags]>
36
37 Values for gpio specifier:
38 - Pin number: is a value between 0 to 7.
39 - Flags: 0 - Active High
40 1 - Active Low
26 41
27- Pin mux/config groups as child nodes: The pin mux (selecting pin function 42- Pin mux/config groups as child nodes: The pin mux (selecting pin function
28 mode) and pin config (pull up/down, driver strength) settings are represented 43 mode) and pin config (pull up/down, driver strength) settings are represented
@@ -106,6 +121,10 @@ B. External Wakeup Interrupts: For supporting external wakeup interrupts, a
106 121
107 - compatible: identifies the type of the external wakeup interrupt controller 122 - compatible: identifies the type of the external wakeup interrupt controller
108 The possible values are: 123 The possible values are:
124 - samsung,s3c2410-wakeup-eint: represents wakeup interrupt controller
125 found on Samsung S3C24xx SoCs except S3C2412 and S3C2413,
126 - samsung,s3c2412-wakeup-eint: represents wakeup interrupt controller
127 found on Samsung S3C2412 and S3C2413 SoCs,
109 - samsung,s3c64xx-wakeup-eint: represents wakeup interrupt controller 128 - samsung,s3c64xx-wakeup-eint: represents wakeup interrupt controller
110 found on Samsung S3C64xx SoCs, 129 found on Samsung S3C64xx SoCs,
111 - samsung,exynos4210-wakeup-eint: represents wakeup interrupt controller 130 - samsung,exynos4210-wakeup-eint: represents wakeup interrupt controller
@@ -266,3 +285,33 @@ Example 4: Set up the default pin state for uart controller.
266 285
267 pinctrl = devm_pinctrl_get_select_default(&pdev->dev); 286 pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
268 } 287 }
288
289Example 5: A display port client node that supports 'default' pinctrl state
290 and gpio binding.
291
292 display-port-controller {
293 /* ... */
294
295 samsung,hpd-gpio = <&gpx2 6 0>;
296 pinctrl-names = "default";
297 pinctrl-0 = <&dp_hpd>;
298 };
299
300Example 6: Request the gpio for display port controller
301
302 static int exynos_dp_probe(struct platform_device *pdev)
303 {
304 int hpd_gpio, ret;
305 struct device *dev = &pdev->dev;
306 struct device_node *dp_node = dev->of_node;
307
308 /* ... */
309
310 hpd_gpio = of_get_named_gpio(dp_node, "samsung,hpd-gpio", 0);
311
312 /* ... */
313
314 ret = devm_gpio_request_one(&pdev->dev, hpd_gpio, GPIOF_IN,
315 "hpd_gpio");
316 /* ... */
317 }
diff --git a/Documentation/devicetree/bindings/rtc/dw-apb.txt b/Documentation/devicetree/bindings/rtc/dw-apb.txt
index 93e2b0f048e6..eb2327b2bdb3 100644
--- a/Documentation/devicetree/bindings/rtc/dw-apb.txt
+++ b/Documentation/devicetree/bindings/rtc/dw-apb.txt
@@ -5,9 +5,20 @@ Required properties:
5- reg: physical base address of the controller and length of memory mapped 5- reg: physical base address of the controller and length of memory mapped
6 region. 6 region.
7- interrupts: IRQ line for the timer. 7- interrupts: IRQ line for the timer.
8- either clocks+clock-names or clock-frequency properties
9
10Optional properties:
11- clocks : list of clock specifiers, corresponding to entries in
12 the clock-names property;
13- clock-names : should contain "timer" and "pclk" entries, matching entries
14 in the clocks property.
8- clock-frequency: The frequency in HZ of the timer. 15- clock-frequency: The frequency in HZ of the timer.
9- clock-freq: For backwards compatibility with picoxcell 16- clock-freq: For backwards compatibility with picoxcell
10 17
18If using the clock specifiers, the pclk clock is optional, as not all
19systems may use one.
20
21
11Example: 22Example:
12 23
13 timer1: timer@ffc09000 { 24 timer1: timer@ffc09000 {
@@ -23,3 +34,11 @@ Example:
23 clock-frequency = <200000000>; 34 clock-frequency = <200000000>;
24 reg = <0xffd00000 0x1000>; 35 reg = <0xffd00000 0x1000>;
25 }; 36 };
37
38 timer3: timer@ffe00000 {
39 compatible = "snps,dw-apb-timer-osc";
40 interrupts = <0 170 4>;
41 reg = <0xffe00000 0x1000>;
42 clocks = <&timer_clk>, <&timer_pclk>;
43 clock-names = "timer", "pclk";
44 };
diff --git a/Documentation/devicetree/bindings/sound/samsung-i2s.txt b/Documentation/devicetree/bindings/sound/samsung-i2s.txt
index 3070046da2e5..025e66b85a43 100644
--- a/Documentation/devicetree/bindings/sound/samsung-i2s.txt
+++ b/Documentation/devicetree/bindings/sound/samsung-i2s.txt
@@ -8,6 +8,16 @@ Required SoC Specific Properties:
8- dmas: list of DMA controller phandle and DMA request line ordered pairs. 8- dmas: list of DMA controller phandle and DMA request line ordered pairs.
9- dma-names: identifier string for each DMA request line in the dmas property. 9- dma-names: identifier string for each DMA request line in the dmas property.
10 These strings correspond 1:1 with the ordered pairs in dmas. 10 These strings correspond 1:1 with the ordered pairs in dmas.
11- clocks: Handle to iis clock and RCLK source clk.
12- clock-names:
13 i2s0 uses some base clks from CMU and some are from audio subsystem internal
14 clock controller. The clock names for i2s0 should be "iis", "i2s_opclk0" and
15 "i2s_opclk1" as shown in the example below.
16 i2s1 and i2s2 uses clocks from CMU. The clock names for i2s1 and i2s2 should
17 be "iis" and "i2s_opclk0".
18 "iis" is the i2s bus clock and i2s_opclk0, i2s_opclk1 are sources of the root
19 clk. i2s0 has internal mux to select the source of root clk and i2s1 and i2s2
20 doesn't have any such mux.
11 21
12Optional SoC Specific Properties: 22Optional SoC Specific Properties:
13 23
@@ -20,44 +30,26 @@ Optional SoC Specific Properties:
20 then this flag is enabled. 30 then this flag is enabled.
21- samsung,idma-addr: Internal DMA register base address of the audio 31- samsung,idma-addr: Internal DMA register base address of the audio
22 sub system(used in secondary sound source). 32 sub system(used in secondary sound source).
23 33- pinctrl-0: Should specify pin control groups used for this controller.
24Required Board Specific Properties: 34- pinctrl-names: Should contain only one value - "default".
25
26- gpios: The gpio specifier for data out,data in, LRCLK, CDCLK and SCLK
27 interface lines. The format of the gpio specifier depends on the gpio
28 controller.
29 The syntax of samsung gpio specifier is
30 <[phandle of the gpio controller node]
31 [pin number within the gpio controller]
32 [mux function]
33 [flags and pull up/down]
34 [drive strength]>
35 35
36Example: 36Example:
37 37
38- SoC Specific Portion: 38i2s0: i2s@03830000 {
39
40i2s@03830000 {
41 compatible = "samsung,i2s-v5"; 39 compatible = "samsung,i2s-v5";
42 reg = <0x03830000 0x100>; 40 reg = <0x03830000 0x100>;
43 dmas = <&pdma0 10 41 dmas = <&pdma0 10
44 &pdma0 9 42 &pdma0 9
45 &pdma0 8>; 43 &pdma0 8>;
46 dma-names = "tx", "rx", "tx-sec"; 44 dma-names = "tx", "rx", "tx-sec";
45 clocks = <&clock_audss EXYNOS_I2S_BUS>,
46 <&clock_audss EXYNOS_I2S_BUS>,
47 <&clock_audss EXYNOS_SCLK_I2S>;
48 clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
47 samsung,supports-6ch; 49 samsung,supports-6ch;
48 samsung,supports-rstclr; 50 samsung,supports-rstclr;
49 samsung,supports-secdai; 51 samsung,supports-secdai;
50 samsung,idma-addr = <0x03000000>; 52 samsung,idma-addr = <0x03000000>;
51}; 53 pinctrl-names = "default";
52 54 pinctrl-0 = <&i2s0_bus>;
53- Board Specific Portion:
54
55i2s@03830000 {
56 gpios = <&gpz 0 2 0 0>, /* I2S_0_SCLK */
57 <&gpz 1 2 0 0>, /* I2S_0_CDCLK */
58 <&gpz 2 2 0 0>, /* I2S_0_LRCK */
59 <&gpz 3 2 0 0>, /* I2S_0_SDI */
60 <&gpz 4 2 0 0>, /* I2S_0_SDO[1] */
61 <&gpz 5 2 0 0>, /* I2S_0_SDO[2] */
62 <&gpz 6 2 0 0>; /* I2S_0_SDO[3] */
63}; 55};
diff --git a/Documentation/devicetree/bindings/staging/imx-drm/ldb.txt b/Documentation/devicetree/bindings/staging/imx-drm/ldb.txt
new file mode 100644
index 000000000000..ed9377811ee2
--- /dev/null
+++ b/Documentation/devicetree/bindings/staging/imx-drm/ldb.txt
@@ -0,0 +1,99 @@
1Device-Tree bindings for LVDS Display Bridge (ldb)
2
3LVDS Display Bridge
4===================
5
6The LVDS Display Bridge device tree node contains up to two lvds-channel
7nodes describing each of the two LVDS encoder channels of the bridge.
8
9Required properties:
10 - #address-cells : should be <1>
11 - #size-cells : should be <0>
12 - compatible : should be "fsl,imx53-ldb" or "fsl,imx6q-ldb".
13 Both LDB versions are similar, but i.MX6 has an additional
14 multiplexer in the front to select any of the four IPU display
15 interfaces as input for each LVDS channel.
16 - gpr : should be <&gpr> on i.MX53 and i.MX6q.
17 The phandle points to the iomuxc-gpr region containing the LVDS
18 control register.
19- clocks, clock-names : phandles to the LDB divider and selector clocks and to
20 the display interface selector clocks, as described in
21 Documentation/devicetree/bindings/clock/clock-bindings.txt
22 The following clocks are expected on i.MX53:
23 "di0_pll" - LDB LVDS channel 0 mux
24 "di1_pll" - LDB LVDS channel 1 mux
25 "di0" - LDB LVDS channel 0 gate
26 "di1" - LDB LVDS channel 1 gate
27 "di0_sel" - IPU1 DI0 mux
28 "di1_sel" - IPU1 DI1 mux
29 On i.MX6q the following additional clocks are needed:
30 "di2_sel" - IPU2 DI0 mux
31 "di3_sel" - IPU2 DI1 mux
32 The needed clock numbers for each are documented in
33 Documentation/devicetree/bindings/clock/imx5-clock.txt, and in
34 Documentation/devicetree/bindings/clock/imx6q-clock.txt.
35
36Optional properties:
37 - pinctrl-names : should be "default" on i.MX53, not used on i.MX6q
38 - pinctrl-0 : a phandle pointing to LVDS pin settings on i.MX53,
39 not used on i.MX6q
40 - fsl,dual-channel : boolean. if it exists, only LVDS channel 0 should
41 be configured - one input will be distributed on both outputs in dual
42 channel mode
43
44LVDS Channel
45============
46
47Each LVDS Channel has to contain a display-timings node that describes the
48video timings for the connected LVDS display. For detailed information, also
49have a look at Documentation/devicetree/bindings/video/display-timing.txt.
50
51Required properties:
52 - reg : should be <0> or <1>
53 - crtcs : a list of phandles with index pointing to the IPU display interfaces
54 that can be used as video source for this channel.
55 - fsl,data-mapping : should be "spwg" or "jeida"
56 This describes how the color bits are laid out in the
57 serialized LVDS signal.
58 - fsl,data-width : should be <18> or <24>
59
60example:
61
62gpr: iomuxc-gpr@53fa8000 {
63 /* ... */
64};
65
66ldb: ldb@53fa8008 {
67 #address-cells = <1>;
68 #size-cells = <0>;
69 compatible = "fsl,imx53-ldb";
70 gpr = <&gpr>;
71 clocks = <&clks 122>, <&clks 120>,
72 <&clks 115>, <&clks 116>,
73 <&clks 123>, <&clks 85>;
74 clock-names = "di0_pll", "di1_pll",
75 "di0_sel", "di1_sel",
76 "di0", "di1";
77
78 lvds-channel@0 {
79 reg = <0>;
80 crtcs = <&ipu 0>;
81 fsl,data-mapping = "spwg";
82 fsl,data-width = <24>;
83
84 display-timings {
85 /* ... */
86 };
87 };
88
89 lvds-channel@1 {
90 reg = <1>;
91 crtcs = <&ipu 1>;
92 fsl,data-mapping = "spwg";
93 fsl,data-width = <24>;
94
95 display-timings {
96 /* ... */
97 };
98 };
99};
diff --git a/Documentation/devicetree/bindings/timer/stericsson-u300-apptimer.txt b/Documentation/devicetree/bindings/timer/stericsson-u300-apptimer.txt
new file mode 100644
index 000000000000..9499bc8ee9e3
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/stericsson-u300-apptimer.txt
@@ -0,0 +1,18 @@
1ST-Ericsson U300 apptimer
2
3Required properties:
4
5- compatible : should be "stericsson,u300-apptimer"
6- reg : Specifies base physical address and size of the registers.
7- interrupts : A list of 4 interrupts; one for each subtimer. These
8 are, in order: OS (operating system), DD (device driver) both
9 adopted for EPOC/Symbian with two specific IRQs for these tasks,
10 then GP1 and GP2, which are general-purpose timers.
11
12Example:
13
14timer {
15 compatible = "stericsson,u300-apptimer";
16 reg = <0xc0014000 0x1000>;
17 interrupts = <24 25 26 27>;
18};
diff --git a/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt b/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt
index b462d0c54823..c662eb36be29 100644
--- a/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt
+++ b/Documentation/devicetree/bindings/tty/serial/fsl-imx-uart.txt
@@ -8,6 +8,8 @@ Required properties:
8Optional properties: 8Optional properties:
9- fsl,uart-has-rtscts : Indicate the uart has rts and cts 9- fsl,uart-has-rtscts : Indicate the uart has rts and cts
10- fsl,irda-mode : Indicate the uart supports irda mode 10- fsl,irda-mode : Indicate the uart supports irda mode
11- fsl,dte-mode : Indicate the uart works in DTE mode. The uart works
12 is DCE mode by default.
11 13
12Example: 14Example:
13 15
@@ -16,4 +18,5 @@ serial@73fbc000 {
16 reg = <0x73fbc000 0x4000>; 18 reg = <0x73fbc000 0x4000>;
17 interrupts = <31>; 19 interrupts = <31>;
18 fsl,uart-has-rtscts; 20 fsl,uart-has-rtscts;
21 fsl,dte-mode;
19}; 22};
diff --git a/Documentation/devicetree/bindings/tty/serial/fsl-lpuart.txt b/Documentation/devicetree/bindings/tty/serial/fsl-lpuart.txt
new file mode 100644
index 000000000000..6fd1dd1638dd
--- /dev/null
+++ b/Documentation/devicetree/bindings/tty/serial/fsl-lpuart.txt
@@ -0,0 +1,14 @@
1* Freescale low power universal asynchronous receiver/transmitter (lpuart)
2
3Required properties:
4- compatible : Should be "fsl,<soc>-lpuart"
5- reg : Address and length of the register set for the device
6- interrupts : Should contain uart interrupt
7
8Example:
9
10uart0: serial@40027000 {
11 compatible = "fsl,vf610-lpuart";
12 reg = <0x40027000 0x1000>;
13 interrupts = <0 61 0x00>;
14 };
diff --git a/Documentation/devicetree/bindings/usb/atmel-usb.txt b/Documentation/devicetree/bindings/usb/atmel-usb.txt
index 60bd2150a3e6..55f51af08bc7 100644
--- a/Documentation/devicetree/bindings/usb/atmel-usb.txt
+++ b/Documentation/devicetree/bindings/usb/atmel-usb.txt
@@ -47,3 +47,85 @@ usb1: gadget@fffa4000 {
47 interrupts = <10 4>; 47 interrupts = <10 4>;
48 atmel,vbus-gpio = <&pioC 5 0>; 48 atmel,vbus-gpio = <&pioC 5 0>;
49}; 49};
50
51Atmel High-Speed USB device controller
52
53Required properties:
54 - compatible: Should be "atmel,at91sam9rl-udc"
55 - reg: Address and length of the register set for the device
56 - interrupts: Should contain usba interrupt
57 - ep childnode: To specify the number of endpoints and their properties.
58
59Optional properties:
60 - atmel,vbus-gpio: If present, specifies a gpio that needs to be
61 activated for the bus to be powered.
62
63Required child node properties:
64 - name: Name of the endpoint.
65 - reg: Num of the endpoint.
66 - atmel,fifo-size: Size of the fifo.
67 - atmel,nb-banks: Number of banks.
68 - atmel,can-dma: Boolean to specify if the endpoint support DMA.
69 - atmel,can-isoc: Boolean to specify if the endpoint support ISOC.
70
71usb2: gadget@fff78000 {
72 #address-cells = <1>;
73 #size-cells = <0>;
74 compatible = "atmel,at91sam9rl-udc";
75 reg = <0x00600000 0x80000
76 0xfff78000 0x400>;
77 interrupts = <27 4 0>;
78 atmel,vbus-gpio = <&pioB 19 0>;
79
80 ep0 {
81 reg = <0>;
82 atmel,fifo-size = <64>;
83 atmel,nb-banks = <1>;
84 };
85
86 ep1 {
87 reg = <1>;
88 atmel,fifo-size = <1024>;
89 atmel,nb-banks = <2>;
90 atmel,can-dma;
91 atmel,can-isoc;
92 };
93
94 ep2 {
95 reg = <2>;
96 atmel,fifo-size = <1024>;
97 atmel,nb-banks = <2>;
98 atmel,can-dma;
99 atmel,can-isoc;
100 };
101
102 ep3 {
103 reg = <3>;
104 atmel,fifo-size = <1024>;
105 atmel,nb-banks = <3>;
106 atmel,can-dma;
107 };
108
109 ep4 {
110 reg = <4>;
111 atmel,fifo-size = <1024>;
112 atmel,nb-banks = <3>;
113 atmel,can-dma;
114 };
115
116 ep5 {
117 reg = <5>;
118 atmel,fifo-size = <1024>;
119 atmel,nb-banks = <3>;
120 atmel,can-dma;
121 atmel,can-isoc;
122 };
123
124 ep6 {
125 reg = <6>;
126 atmel,fifo-size = <1024>;
127 atmel,nb-banks = <3>;
128 atmel,can-dma;
129 atmel,can-isoc;
130 };
131};
diff --git a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt
index 1c04a4c9515f..b4b5b7906c88 100644
--- a/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt
+++ b/Documentation/devicetree/bindings/usb/ci13xxx-imx.txt
@@ -5,6 +5,12 @@ Required properties:
5- reg: Should contain registers location and length 5- reg: Should contain registers location and length
6- interrupts: Should contain controller interrupt 6- interrupts: Should contain controller interrupt
7 7
8Recommended properies:
9- phy_type: the type of the phy connected to the core. Should be one
10 of "utmi", "utmi_wide", "ulpi", "serial" or "hsic". Without this
11 property the PORTSC register won't be touched
12- dr_mode: One of "host", "peripheral" or "otg". Defaults to "otg"
13
8Optional properties: 14Optional properties:
9- fsl,usbphy: phandler of usb phy that connects to the only one port 15- fsl,usbphy: phandler of usb phy that connects to the only one port
10- fsl,usbmisc: phandler of non-core register device, with one argument 16- fsl,usbmisc: phandler of non-core register device, with one argument
diff --git a/Documentation/devicetree/bindings/usb/exynos-usb.txt b/Documentation/devicetree/bindings/usb/exynos-usb.txt
index b3abde736017..d967ba16de60 100644
--- a/Documentation/devicetree/bindings/usb/exynos-usb.txt
+++ b/Documentation/devicetree/bindings/usb/exynos-usb.txt
@@ -48,3 +48,37 @@ Example:
48 clocks = <&clock 285>; 48 clocks = <&clock 285>;
49 clock-names = "usbhost"; 49 clock-names = "usbhost";
50 }; 50 };
51
52DWC3
53Required properties:
54 - compatible: should be "samsung,exynos5250-dwusb3" for USB 3.0 DWC3
55 controller.
56 - #address-cells, #size-cells : should be '1' if the device has sub-nodes
57 with 'reg' property.
58 - ranges: allows valid 1:1 translation between child's address space and
59 parent's address space
60 - clocks: Clock IDs array as required by the controller.
61 - clock-names: names of clocks correseponding to IDs in the clock property
62
63Sub-nodes:
64The dwc3 core should be added as subnode to Exynos dwc3 glue.
65- dwc3 :
66 The binding details of dwc3 can be found in:
67 Documentation/devicetree/bindings/usb/dwc3.txt
68
69Example:
70 usb@12000000 {
71 compatible = "samsung,exynos5250-dwusb3";
72 clocks = <&clock 286>;
73 clock-names = "usbdrd30";
74 #address-cells = <1>;
75 #size-cells = <1>;
76 ranges;
77
78 dwc3 {
79 compatible = "synopsys,dwc3";
80 reg = <0x12000000 0x10000>;
81 interrupts = <0 72 0>;
82 usb-phy = <&usb2_phy &usb3_phy>;
83 };
84 };
diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt b/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt
index 34c952883276..df0933043a5b 100644
--- a/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt
+++ b/Documentation/devicetree/bindings/usb/nvidia,tegra20-ehci.txt
@@ -6,27 +6,10 @@ Practice : Universal Serial Bus" with the following modifications
6and additions : 6and additions :
7 7
8Required properties : 8Required properties :
9 - compatible : Should be "nvidia,tegra20-ehci" for USB controllers 9 - compatible : Should be "nvidia,tegra20-ehci".
10 used in host mode. 10 - nvidia,phy : phandle of the PHY that the controller is connected to.
11 - phy_type : Should be one of "ulpi" or "utmi". 11 - clocks : Contains a single entry which defines the USB controller's clock.
12 - nvidia,vbus-gpio : If present, specifies a gpio that needs to be
13 activated for the bus to be powered.
14 - nvidia,phy : phandle of the PHY instance, the controller is connected to.
15
16Required properties for phy_type == ulpi:
17 - nvidia,phy-reset-gpio : The GPIO used to reset the PHY.
18 12
19Optional properties: 13Optional properties:
20 - dr_mode : dual role mode. Indicates the working mode for 14 - nvidia,needs-double-reset : boolean is to be set for some of the Tegra20
21 nvidia,tegra20-ehci compatible controllers. Can be "host", "peripheral", 15 USB ports, which need reset twice due to hardware issues.
22 or "otg". Default to "host" if not defined for backward compatibility.
23 host means this is a host controller
24 peripheral means it is device controller
25 otg means it can operate as either ("on the go")
26 - nvidia,has-legacy-mode : boolean indicates whether this controller can
27 operate in legacy mode (as APX 2500 / 2600). In legacy mode some
28 registers are accessed through the APB_MISC base address instead of
29 the USB controller. Since this is a legacy issue it probably does not
30 warrant a compatible string of its own.
31 - nvidia,needs-double-reset : boolean is to be set for some of the Tegra2
32 USB ports, which need reset twice due to hardware issues.
diff --git a/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt b/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt
index 6bdaba2f0aa1..c4c9e9e664aa 100644
--- a/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt
+++ b/Documentation/devicetree/bindings/usb/nvidia,tegra20-usb-phy.txt
@@ -4,14 +4,49 @@ The device node for Tegra SOC USB PHY:
4 4
5Required properties : 5Required properties :
6 - compatible : Should be "nvidia,tegra20-usb-phy". 6 - compatible : Should be "nvidia,tegra20-usb-phy".
7 - reg : Address and length of the register set for the USB PHY interface. 7 - reg : Defines the following set of registers, in the order listed:
8 - phy_type : Should be one of "ulpi" or "utmi". 8 - The PHY's own register set.
9 Always present.
10 - The register set of the PHY containing the UTMI pad control registers.
11 Present if-and-only-if phy_type == utmi.
12 - phy_type : Should be one of "utmi", "ulpi" or "hsic".
13 - clocks : Defines the clocks listed in the clock-names property.
14 - clock-names : The following clock names must be present:
15 - reg: The clock needed to access the PHY's own registers. This is the
16 associated EHCI controller's clock. Always present.
17 - pll_u: PLL_U. Always present.
18 - timer: The timeout clock (clk_m). Present if phy_type == utmi.
19 - utmi-pads: The clock needed to access the UTMI pad control registers.
20 Present if phy_type == utmi.
21 - ulpi-link: The clock Tegra provides to the ULPI PHY (cdev2).
22 Present if phy_type == ulpi, and ULPI link mode is in use.
9 23
10Required properties for phy_type == ulpi: 24Required properties for phy_type == ulpi:
11 - nvidia,phy-reset-gpio : The GPIO used to reset the PHY. 25 - nvidia,phy-reset-gpio : The GPIO used to reset the PHY.
12 26
27Required PHY timing params for utmi phy:
28 - nvidia,hssync-start-delay : Number of 480 Mhz clock cycles to wait before
29 start of sync launches RxActive
30 - nvidia,elastic-limit : Variable FIFO Depth of elastic input store
31 - nvidia,idle-wait-delay : Number of 480 Mhz clock cycles of idle to wait
32 before declare IDLE.
33 - nvidia,term-range-adj : Range adjusment on terminations
34 - nvidia,xcvr-setup : HS driver output control
35 - nvidia,xcvr-lsfslew : LS falling slew rate control.
36 - nvidia,xcvr-lsrslew : LS rising slew rate control.
37
13Optional properties: 38Optional properties:
14 - nvidia,has-legacy-mode : boolean indicates whether this controller can 39 - nvidia,has-legacy-mode : boolean indicates whether this controller can
15 operate in legacy mode (as APX 2500 / 2600). In legacy mode some 40 operate in legacy mode (as APX 2500 / 2600). In legacy mode some
16 registers are accessed through the APB_MISC base address instead of 41 registers are accessed through the APB_MISC base address instead of
17 the USB controller. \ No newline at end of file 42 the USB controller.
43 - nvidia,is-wired : boolean. Indicates whether we can do certain kind of power
44 optimizations for the devices that are always connected. e.g. modem.
45 - dr_mode : dual role mode. Indicates the working mode for the PHY. Can be
46 "host", "peripheral", or "otg". Defaults to "host" if not defined.
47 host means this is a host controller
48 peripheral means it is device controller
49 otg means it can operate as either ("on the go")
50
51Required properties for dr_mode == otg:
52 - vbus-supply: regulator for VBUS
diff --git a/Documentation/devicetree/bindings/usb/usb3503.txt b/Documentation/devicetree/bindings/usb/usb3503.txt
index 6813a715fc7d..8c5be48b43c8 100644
--- a/Documentation/devicetree/bindings/usb/usb3503.txt
+++ b/Documentation/devicetree/bindings/usb/usb3503.txt
@@ -4,6 +4,10 @@ Required properties:
4- compatible: Should be "smsc,usb3503". 4- compatible: Should be "smsc,usb3503".
5- reg: Specifies the i2c slave address, it should be 0x08. 5- reg: Specifies the i2c slave address, it should be 0x08.
6- connect-gpios: Should specify GPIO for connect. 6- connect-gpios: Should specify GPIO for connect.
7- disabled-ports: Should specify the ports unused.
8 '1' or '2' or '3' are availe for this property to describe the port
9 number. 1~3 property values are possible to be desribed.
10 Do not describe this property if all ports have to be enabled.
7- intn-gpios: Should specify GPIO for interrupt. 11- intn-gpios: Should specify GPIO for interrupt.
8- reset-gpios: Should specify GPIO for reset. 12- reset-gpios: Should specify GPIO for reset.
9- initial-mode: Should specify initial mode. 13- initial-mode: Should specify initial mode.
@@ -14,6 +18,7 @@ Examples:
14 compatible = "smsc,usb3503"; 18 compatible = "smsc,usb3503";
15 reg = <0x08>; 19 reg = <0x08>;
16 connect-gpios = <&gpx3 0 1>; 20 connect-gpios = <&gpx3 0 1>;
21 disabled-ports = <2 3>;
17 intn-gpios = <&gpx3 4 1>; 22 intn-gpios = <&gpx3 4 1>;
18 reset-gpios = <&gpx3 5 1>; 23 reset-gpios = <&gpx3 5 1>;
19 initial-mode = <1>; 24 initial-mode = <1>;
diff --git a/Documentation/devicetree/bindings/usb/ux500-usb.txt b/Documentation/devicetree/bindings/usb/ux500-usb.txt
new file mode 100644
index 000000000000..330d6ec15401
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/ux500-usb.txt
@@ -0,0 +1,50 @@
1Ux500 MUSB
2
3Required properties:
4 - compatible : Should be "stericsson,db8500-musb"
5 - reg : Offset and length of registers
6 - interrupts : Interrupt; mode, number and trigger
7 - dr_mode : Dual-role; either host mode "host", peripheral mode "peripheral"
8 or both "otg"
9
10Optional properties:
11 - dmas : A list of dma channels;
12 dma-controller, event-line, fixed-channel, flags
13 - dma-names : An ordered list of channel names affiliated to the above
14
15Example:
16
17usb_per5@a03e0000 {
18 compatible = "stericsson,db8500-musb", "mentor,musb";
19 reg = <0xa03e0000 0x10000>;
20 interrupts = <0 23 0x4>;
21 interrupt-names = "mc";
22
23 dr_mode = "otg";
24
25 dmas = <&dma 38 0 0x2>, /* Logical - DevToMem */
26 <&dma 38 0 0x0>, /* Logical - MemToDev */
27 <&dma 37 0 0x2>, /* Logical - DevToMem */
28 <&dma 37 0 0x0>, /* Logical - MemToDev */
29 <&dma 36 0 0x2>, /* Logical - DevToMem */
30 <&dma 36 0 0x0>, /* Logical - MemToDev */
31 <&dma 19 0 0x2>, /* Logical - DevToMem */
32 <&dma 19 0 0x0>, /* Logical - MemToDev */
33 <&dma 18 0 0x2>, /* Logical - DevToMem */
34 <&dma 18 0 0x0>, /* Logical - MemToDev */
35 <&dma 17 0 0x2>, /* Logical - DevToMem */
36 <&dma 17 0 0x0>, /* Logical - MemToDev */
37 <&dma 16 0 0x2>, /* Logical - DevToMem */
38 <&dma 16 0 0x0>, /* Logical - MemToDev */
39 <&dma 39 0 0x2>, /* Logical - DevToMem */
40 <&dma 39 0 0x0>; /* Logical - MemToDev */
41
42 dma-names = "iep_1_9", "oep_1_9",
43 "iep_2_10", "oep_2_10",
44 "iep_3_11", "oep_3_11",
45 "iep_4_12", "oep_4_12",
46 "iep_5_13", "oep_5_13",
47 "iep_6_14", "oep_6_14",
48 "iep_7_15", "oep_7_15",
49 "iep_8", "oep_8";
50};
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 6931c4348d24..db0457d61682 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -31,6 +31,7 @@ idt Integrated Device Technologies, Inc.
31img Imagination Technologies Ltd. 31img Imagination Technologies Ltd.
32intercontrol Inter Control Group 32intercontrol Inter Control Group
33linux Linux-specific binding 33linux Linux-specific binding
34lsi LSI Corp. (LSI Logic)
34marvell Marvell Technology Group Ltd. 35marvell Marvell Technology Group Ltd.
35maxim Maxim Integrated Products 36maxim Maxim Integrated Products
36mosaixtech Mosaix Technologies, Inc. 37mosaixtech Mosaix Technologies, Inc.
@@ -59,6 +60,7 @@ ste ST-Ericsson
59stericsson ST-Ericsson 60stericsson ST-Ericsson
60ti Texas Instruments 61ti Texas Instruments
61toshiba Toshiba Corporation 62toshiba Toshiba Corporation
63v3 V3 Semiconductor
62via VIA Technologies, Inc. 64via VIA Technologies, Inc.
63wlf Wolfson Microelectronics 65wlf Wolfson Microelectronics
64wm Wondermedia Technologies, Inc. 66wm Wondermedia Technologies, Inc.
diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/video/exynos_dp.txt
index c60da67a5d76..84f10c16cb38 100644
--- a/Documentation/devicetree/bindings/video/exynos_dp.txt
+++ b/Documentation/devicetree/bindings/video/exynos_dp.txt
@@ -21,6 +21,10 @@ Required properties for dp-controller:
21 of memory mapped region. 21 of memory mapped region.
22 -interrupts: 22 -interrupts:
23 interrupt combiner values. 23 interrupt combiner values.
24 -clocks:
25 from common clock binding: handle to dp clock.
26 -clock-names:
27 from common clock binding: Shall be "dp".
24 -interrupt-parent: 28 -interrupt-parent:
25 phandle to Interrupt combiner node. 29 phandle to Interrupt combiner node.
26 -samsung,color-space: 30 -samsung,color-space:
@@ -61,6 +65,8 @@ SOC specific portion:
61 reg = <0x145b0000 0x10000>; 65 reg = <0x145b0000 0x10000>;
62 interrupts = <10 3>; 66 interrupts = <10 3>;
63 interrupt-parent = <&combiner>; 67 interrupt-parent = <&combiner>;
68 clocks = <&clock 342>;
69 clock-names = "dp";
64 70
65 dptx-phy { 71 dptx-phy {
66 reg = <0x10040720>; 72 reg = <0x10040720>;
diff --git a/Documentation/devicetree/bindings/watchdog/stericsson-coh901327.txt b/Documentation/devicetree/bindings/watchdog/stericsson-coh901327.txt
new file mode 100644
index 000000000000..8ffb88e39e76
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/stericsson-coh901327.txt
@@ -0,0 +1,19 @@
1ST-Ericsson COH 901 327 Watchdog timer
2
3Required properties:
4- compatible: must be "stericsson,coh901327".
5- reg: physical base address of the controller and length of memory mapped
6 region.
7- interrupts: the interrupt used for the watchdog timeout warning.
8
9Optional properties:
10- timeout-sec: contains the watchdog timeout in seconds.
11
12Example:
13
14watchdog: watchdog@c0012000 {
15 compatible = "stericsson,coh901327";
16 reg = <0xc0012000 0x1000>;
17 interrupts = <3>;
18 timeout-sec = <60>;
19};
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 0706d32a61e6..fe7afe225381 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -11,10 +11,8 @@ be able to use diff(1).
11prototypes: 11prototypes:
12 int (*d_revalidate)(struct dentry *, unsigned int); 12 int (*d_revalidate)(struct dentry *, unsigned int);
13 int (*d_weak_revalidate)(struct dentry *, unsigned int); 13 int (*d_weak_revalidate)(struct dentry *, unsigned int);
14 int (*d_hash)(const struct dentry *, const struct inode *, 14 int (*d_hash)(const struct dentry *, struct qstr *);
15 struct qstr *); 15 int (*d_compare)(const struct dentry *, const struct dentry *,
16 int (*d_compare)(const struct dentry *, const struct inode *,
17 const struct dentry *, const struct inode *,
18 unsigned int, const char *, const struct qstr *); 16 unsigned int, const char *, const struct qstr *);
19 int (*d_delete)(struct dentry *); 17 int (*d_delete)(struct dentry *);
20 void (*d_release)(struct dentry *); 18 void (*d_release)(struct dentry *);
@@ -66,6 +64,7 @@ prototypes:
66 int (*atomic_open)(struct inode *, struct dentry *, 64 int (*atomic_open)(struct inode *, struct dentry *,
67 struct file *, unsigned open_flag, 65 struct file *, unsigned open_flag,
68 umode_t create_mode, int *opened); 66 umode_t create_mode, int *opened);
67 int (*tmpfile) (struct inode *, struct dentry *, umode_t);
69 68
70locking rules: 69locking rules:
71 all may block 70 all may block
@@ -93,6 +92,7 @@ removexattr: yes
93fiemap: no 92fiemap: no
94update_time: no 93update_time: no
95atomic_open: yes 94atomic_open: yes
95tmpfile: no
96 96
97 Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on 97 Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
98victim. 98victim.
@@ -189,7 +189,7 @@ prototypes:
189 loff_t pos, unsigned len, unsigned copied, 189 loff_t pos, unsigned len, unsigned copied,
190 struct page *page, void *fsdata); 190 struct page *page, void *fsdata);
191 sector_t (*bmap)(struct address_space *, sector_t); 191 sector_t (*bmap)(struct address_space *, sector_t);
192 int (*invalidatepage) (struct page *, unsigned long); 192 void (*invalidatepage) (struct page *, unsigned int, unsigned int);
193 int (*releasepage) (struct page *, int); 193 int (*releasepage) (struct page *, int);
194 void (*freepage)(struct page *); 194 void (*freepage)(struct page *);
195 int (*direct_IO)(int, struct kiocb *, const struct iovec *iov, 195 int (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
@@ -310,8 +310,8 @@ filesystems and by the swapper. The latter will eventually go away. Please,
310keep it that way and don't breed new callers. 310keep it that way and don't breed new callers.
311 311
312 ->invalidatepage() is called when the filesystem must attempt to drop 312 ->invalidatepage() is called when the filesystem must attempt to drop
313some or all of the buffers from the page when it is being truncated. It 313some or all of the buffers from the page when it is being truncated. It
314returns zero on success. If ->invalidatepage is zero, the kernel uses 314returns zero on success. If ->invalidatepage is zero, the kernel uses
315block_invalidatepage() instead. 315block_invalidatepage() instead.
316 316
317 ->releasepage() is called when the kernel is about to try to drop the 317 ->releasepage() is called when the kernel is about to try to drop the
@@ -344,25 +344,38 @@ prototypes:
344 344
345 345
346locking rules: 346locking rules:
347 file_lock_lock may block 347 inode->i_lock may block
348fl_copy_lock: yes no 348fl_copy_lock: yes no
349fl_release_private: maybe no 349fl_release_private: maybe no
350 350
351----------------------- lock_manager_operations --------------------------- 351----------------------- lock_manager_operations ---------------------------
352prototypes: 352prototypes:
353 int (*lm_compare_owner)(struct file_lock *, struct file_lock *); 353 int (*lm_compare_owner)(struct file_lock *, struct file_lock *);
354 unsigned long (*lm_owner_key)(struct file_lock *);
354 void (*lm_notify)(struct file_lock *); /* unblock callback */ 355 void (*lm_notify)(struct file_lock *); /* unblock callback */
355 int (*lm_grant)(struct file_lock *, struct file_lock *, int); 356 int (*lm_grant)(struct file_lock *, struct file_lock *, int);
356 void (*lm_break)(struct file_lock *); /* break_lease callback */ 357 void (*lm_break)(struct file_lock *); /* break_lease callback */
357 int (*lm_change)(struct file_lock **, int); 358 int (*lm_change)(struct file_lock **, int);
358 359
359locking rules: 360locking rules:
360 file_lock_lock may block 361
361lm_compare_owner: yes no 362 inode->i_lock blocked_lock_lock may block
362lm_notify: yes no 363lm_compare_owner: yes[1] maybe no
363lm_grant: no no 364lm_owner_key yes[1] yes no
364lm_break: yes no 365lm_notify: yes yes no
365lm_change yes no 366lm_grant: no no no
367lm_break: yes no no
368lm_change yes no no
369
370[1]: ->lm_compare_owner and ->lm_owner_key are generally called with
371*an* inode->i_lock held. It may not be the i_lock of the inode
372associated with either file_lock argument! This is the case with deadlock
373detection, since the code has to chase down the owners of locks that may
374be entirely unrelated to the one on which the lock is being acquired.
375For deadlock detection however, the blocked_lock_lock is also held. The
376fact that these locks are held ensures that the file_locks do not
377disappear out from under you while doing the comparison or generating an
378owner key.
366 379
367--------------------------- buffer_head ----------------------------------- 380--------------------------- buffer_head -----------------------------------
368prototypes: 381prototypes:
@@ -414,7 +427,7 @@ prototypes:
414 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); 427 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
415 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 428 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
416 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 429 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
417 int (*readdir) (struct file *, void *, filldir_t); 430 int (*iterate) (struct file *, struct dir_context *);
418 unsigned int (*poll) (struct file *, struct poll_table_struct *); 431 unsigned int (*poll) (struct file *, struct poll_table_struct *);
419 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); 432 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
420 long (*compat_ioctl) (struct file *, unsigned int, unsigned long); 433 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt
index bd3c56c67380..b91e2f26b672 100644
--- a/Documentation/filesystems/f2fs.txt
+++ b/Documentation/filesystems/f2fs.txt
@@ -98,8 +98,13 @@ Cleaning Overhead
98MOUNT OPTIONS 98MOUNT OPTIONS
99================================================================================ 99================================================================================
100 100
101background_gc_off Turn off cleaning operations, namely garbage collection, 101background_gc=%s Turn on/off cleaning operations, namely garbage
102 triggered in background when I/O subsystem is idle. 102 collection, triggered in background when I/O subsystem is
103 idle. If background_gc=on, it will turn on the garbage
104 collection and if background_gc=off, garbage collection
105 will be truned off.
106 Default value for this option is on. So garbage
107 collection is on by default.
103disable_roll_forward Disable the roll-forward recovery routine 108disable_roll_forward Disable the roll-forward recovery routine
104discard Issue discard/TRIM commands when a segment is cleaned. 109discard Issue discard/TRIM commands when a segment is cleaned.
105no_heap Disable heap-style segment allocation which finds free 110no_heap Disable heap-style segment allocation which finds free
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 4db22f6491e0..206a1bdc7321 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -445,3 +445,9 @@ object doesn't exist. It's remote/distributed ones that might care...
445[mandatory] 445[mandatory]
446 FS_REVAL_DOT is gone; if you used to have it, add ->d_weak_revalidate() 446 FS_REVAL_DOT is gone; if you used to have it, add ->d_weak_revalidate()
447in your dentry operations instead. 447in your dentry operations instead.
448--
449[mandatory]
450 vfs_readdir() is gone; switch to iterate_dir() instead
451--
452[mandatory]
453 ->readdir() is gone now; switch to ->iterate()
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index bc4b06b3160a..1f0ba30ae47e 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -360,6 +360,8 @@ struct inode_operations {
360 int (*removexattr) (struct dentry *, const char *); 360 int (*removexattr) (struct dentry *, const char *);
361 void (*update_time)(struct inode *, struct timespec *, int); 361 void (*update_time)(struct inode *, struct timespec *, int);
362 int (*atomic_open)(struct inode *, struct dentry *, 362 int (*atomic_open)(struct inode *, struct dentry *,
363 int (*tmpfile) (struct inode *, struct dentry *, umode_t);
364} ____cacheline_aligned;
363 struct file *, unsigned open_flag, 365 struct file *, unsigned open_flag,
364 umode_t create_mode, int *opened); 366 umode_t create_mode, int *opened);
365}; 367};
@@ -472,6 +474,9 @@ otherwise noted.
472 component is negative or needs lookup. Cached positive dentries are 474 component is negative or needs lookup. Cached positive dentries are
473 still handled by f_op->open(). 475 still handled by f_op->open().
474 476
477 tmpfile: called in the end of O_TMPFILE open(). Optional, equivalent to
478 atomically creating, opening and unlinking a file in given directory.
479
475The Address Space Object 480The Address Space Object
476======================== 481========================
477 482
@@ -549,7 +554,7 @@ struct address_space_operations
549------------------------------- 554-------------------------------
550 555
551This describes how the VFS can manipulate mapping of a file to page cache in 556This describes how the VFS can manipulate mapping of a file to page cache in
552your filesystem. As of kernel 2.6.22, the following members are defined: 557your filesystem. The following members are defined:
553 558
554struct address_space_operations { 559struct address_space_operations {
555 int (*writepage)(struct page *page, struct writeback_control *wbc); 560 int (*writepage)(struct page *page, struct writeback_control *wbc);
@@ -566,7 +571,7 @@ struct address_space_operations {
566 loff_t pos, unsigned len, unsigned copied, 571 loff_t pos, unsigned len, unsigned copied,
567 struct page *page, void *fsdata); 572 struct page *page, void *fsdata);
568 sector_t (*bmap)(struct address_space *, sector_t); 573 sector_t (*bmap)(struct address_space *, sector_t);
569 int (*invalidatepage) (struct page *, unsigned long); 574 void (*invalidatepage) (struct page *, unsigned int, unsigned int);
570 int (*releasepage) (struct page *, int); 575 int (*releasepage) (struct page *, int);
571 void (*freepage)(struct page *); 576 void (*freepage)(struct page *);
572 ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, 577 ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov,
@@ -685,14 +690,14 @@ struct address_space_operations {
685 invalidatepage: If a page has PagePrivate set, then invalidatepage 690 invalidatepage: If a page has PagePrivate set, then invalidatepage
686 will be called when part or all of the page is to be removed 691 will be called when part or all of the page is to be removed
687 from the address space. This generally corresponds to either a 692 from the address space. This generally corresponds to either a
688 truncation or a complete invalidation of the address space 693 truncation, punch hole or a complete invalidation of the address
689 (in the latter case 'offset' will always be 0). 694 space (in the latter case 'offset' will always be 0 and 'length'
690 Any private data associated with the page should be updated 695 will be PAGE_CACHE_SIZE). Any private data associated with the page
691 to reflect this truncation. If offset is 0, then 696 should be updated to reflect this truncation. If offset is 0 and
692 the private data should be released, because the page 697 length is PAGE_CACHE_SIZE, then the private data should be released,
693 must be able to be completely discarded. This may be done by 698 because the page must be able to be completely discarded. This may
694 calling the ->releasepage function, but in this case the 699 be done by calling the ->releasepage function, but in this case the
695 release MUST succeed. 700 release MUST succeed.
696 701
697 releasepage: releasepage is called on PagePrivate pages to indicate 702 releasepage: releasepage is called on PagePrivate pages to indicate
698 that the page should be freed if possible. ->releasepage 703 that the page should be freed if possible. ->releasepage
@@ -777,7 +782,7 @@ struct file_operations {
777 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); 782 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
778 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 783 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
779 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); 784 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
780 int (*readdir) (struct file *, void *, filldir_t); 785 int (*iterate) (struct file *, struct dir_context *);
781 unsigned int (*poll) (struct file *, struct poll_table_struct *); 786 unsigned int (*poll) (struct file *, struct poll_table_struct *);
782 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); 787 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
783 long (*compat_ioctl) (struct file *, unsigned int, unsigned long); 788 long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
@@ -815,7 +820,7 @@ otherwise noted.
815 820
816 aio_write: called by io_submit(2) and other asynchronous I/O operations 821 aio_write: called by io_submit(2) and other asynchronous I/O operations
817 822
818 readdir: called when the VFS needs to read the directory contents 823 iterate: called when the VFS needs to read the directory contents
819 824
820 poll: called by the VFS when a process wants to check if there is 825 poll: called by the VFS when a process wants to check if there is
821 activity on this file and (optionally) go to sleep until there 826 activity on this file and (optionally) go to sleep until there
@@ -901,10 +906,8 @@ defined:
901struct dentry_operations { 906struct dentry_operations {
902 int (*d_revalidate)(struct dentry *, unsigned int); 907 int (*d_revalidate)(struct dentry *, unsigned int);
903 int (*d_weak_revalidate)(struct dentry *, unsigned int); 908 int (*d_weak_revalidate)(struct dentry *, unsigned int);
904 int (*d_hash)(const struct dentry *, const struct inode *, 909 int (*d_hash)(const struct dentry *, struct qstr *);
905 struct qstr *); 910 int (*d_compare)(const struct dentry *, const struct dentry *,
906 int (*d_compare)(const struct dentry *, const struct inode *,
907 const struct dentry *, const struct inode *,
908 unsigned int, const char *, const struct qstr *); 911 unsigned int, const char *, const struct qstr *);
909 int (*d_delete)(const struct dentry *); 912 int (*d_delete)(const struct dentry *);
910 void (*d_release)(struct dentry *); 913 void (*d_release)(struct dentry *);
@@ -949,25 +952,24 @@ struct dentry_operations {
949 952
950 d_hash: called when the VFS adds a dentry to the hash table. The first 953 d_hash: called when the VFS adds a dentry to the hash table. The first
951 dentry passed to d_hash is the parent directory that the name is 954 dentry passed to d_hash is the parent directory that the name is
952 to be hashed into. The inode is the dentry's inode. 955 to be hashed into.
953 956
954 Same locking and synchronisation rules as d_compare regarding 957 Same locking and synchronisation rules as d_compare regarding
955 what is safe to dereference etc. 958 what is safe to dereference etc.
956 959
957 d_compare: called to compare a dentry name with a given name. The first 960 d_compare: called to compare a dentry name with a given name. The first
958 dentry is the parent of the dentry to be compared, the second is 961 dentry is the parent of the dentry to be compared, the second is
959 the parent's inode, then the dentry and inode (may be NULL) of the 962 the child dentry. len and name string are properties of the dentry
960 child dentry. len and name string are properties of the dentry to be 963 to be compared. qstr is the name to compare it with.
961 compared. qstr is the name to compare it with.
962 964
963 Must be constant and idempotent, and should not take locks if 965 Must be constant and idempotent, and should not take locks if
964 possible, and should not or store into the dentry or inodes. 966 possible, and should not or store into the dentry.
965 Should not dereference pointers outside the dentry or inodes without 967 Should not dereference pointers outside the dentry without
966 lots of care (eg. d_parent, d_inode, d_name should not be used). 968 lots of care (eg. d_parent, d_inode, d_name should not be used).
967 969
968 However, our vfsmount is pinned, and RCU held, so the dentries and 970 However, our vfsmount is pinned, and RCU held, so the dentries and
969 inodes won't disappear, neither will our sb or filesystem module. 971 inodes won't disappear, neither will our sb or filesystem module.
970 ->i_sb and ->d_sb may be used. 972 ->d_sb may be used.
971 973
972 It is a tricky calling convention because it needs to be called under 974 It is a tricky calling convention because it needs to be called under
973 "rcu-walk", ie. without any locks or references on things. 975 "rcu-walk", ie. without any locks or references on things.
diff --git a/Documentation/fmc/00-INDEX b/Documentation/fmc/00-INDEX
new file mode 100644
index 000000000000..431c69570f43
--- /dev/null
+++ b/Documentation/fmc/00-INDEX
@@ -0,0 +1,38 @@
1
2Documentation in this directory comes from sections of the manual we
3wrote for the externally-developed fmc-bus package. The complete
4manual as of today (2013-02) is available in PDF format at
5http://www.ohwr.org/projects/fmc-bus/files
6
700-INDEX
8 - this file.
9
10FMC-and-SDB.txt
11 - What are FMC and SDB, basic concepts for this framework
12
13API.txt
14 - The functions that are exported by the bus driver
15
16parameters.txt
17 - The module parameters
18
19carrier.txt
20 - writing a carrier (a device)
21
22mezzanine.txt
23 - writing code for your mezzanine (a driver)
24
25identifiers.txt
26 - how identification and matching works
27
28fmc-fakedev.txt
29 - about drivers/fmc/fmc-fakedev.ko
30
31fmc-trivial.txt
32 - about drivers/fmc/fmc-trivial.ko
33
34fmc-write-eeprom.txt
35 - about drivers/fmc/fmc-write-eeprom.ko
36
37fmc-chardev.txt
38 - about drivers/fmc/fmc-chardev.ko
diff --git a/Documentation/fmc/API.txt b/Documentation/fmc/API.txt
new file mode 100644
index 000000000000..06b06b92c794
--- /dev/null
+++ b/Documentation/fmc/API.txt
@@ -0,0 +1,47 @@
1Functions Exported by fmc.ko
2****************************
3
4The FMC core exports the usual 4 functions that are needed for a bus to
5work, and a few more:
6
7 int fmc_driver_register(struct fmc_driver *drv);
8 void fmc_driver_unregister(struct fmc_driver *drv);
9 int fmc_device_register(struct fmc_device *fmc);
10 void fmc_device_unregister(struct fmc_device *fmc);
11
12 int fmc_device_register_n(struct fmc_device **fmc, int n);
13 void fmc_device_unregister_n(struct fmc_device **fmc, int n);
14
15 uint32_t fmc_readl(struct fmc_device *fmc, int offset);
16 void fmc_writel(struct fmc_device *fmc, uint32_t val, int off);
17 void *fmc_get_drvdata(struct fmc_device *fmc);
18 void fmc_set_drvdata(struct fmc_device *fmc, void *data);
19
20 int fmc_reprogram(struct fmc_device *f, struct fmc_driver *d, char *gw,
21 int sdb_entry);
22
23The data structure that describe a device is detailed in *note FMC
24Device::, the one that describes a driver is detailed in *note FMC
25Driver::. Please note that structures of type fmc_device must be
26allocated by the caller, but must not be released after unregistering.
27The fmc-bus itself takes care of releasing the structure when their use
28count reaches zero - actually, the device model does that in lieu of us.
29
30The functions to register and unregister n devices are meant to be used
31by carriers that host more than one mezzanine. The devices must all be
32registered at the same time because if the FPGA is reprogrammed, all
33devices in the array are affected. Usually, the driver matching the
34first device will reprogram the FPGA, so other devices must know they
35are already driven by a reprogrammed FPGA.
36
37If a carrier hosts slots that are driven by different FPGA devices, it
38should register as a group only mezzanines that are driven by the same
39FPGA, for the reason outlined above.
40
41Finally, the fmc_reprogram function calls the reprogram method (see
42*note The API Offered by Carriers:: and also scans the memory area for
43an SDB tree. You can pass -1 as sdb_entry to disable such scan.
44Otherwise, the function fails if no tree is found at the specified
45entry point. The function is meant to factorize common code, and by
46the time you read this it is already used by the spec-sw and fine-delay
47modules.
diff --git a/Documentation/fmc/FMC-and-SDB.txt b/Documentation/fmc/FMC-and-SDB.txt
new file mode 100644
index 000000000000..fa14e0b24521
--- /dev/null
+++ b/Documentation/fmc/FMC-and-SDB.txt
@@ -0,0 +1,88 @@
1
2FMC (FPGA Mezzanine Card) is the standard we use for our I/O devices,
3in the context of White Rabbit and related hardware.
4
5In our I/O environments we need to write drivers for each mezzanine
6card, and such drivers must work regardless of the carrier being used.
7To achieve this, we abstract the FMC interface.
8
9We have a carrier for PCI-E called SPEC and one for VME called SVEC,
10but more are planned. Also, we support stand-alone devices (usually
11plugged on a SPEC card), controlled through Etherbone, developed by GSI.
12
13Code and documentation for the FMC bus was born as part of the spec-sw
14project, but now it lives in its own project. Other projects, i.e.
15software support for the various carriers, should include this as a
16submodule.
17
18The most up to date version of code and documentation is always
19available from the repository you can clone from:
20
21 git://ohwr.org/fmc-projects/fmc-bus.git (read-only)
22 git@ohwr.org:fmc-projects/fmc-bus.git (read-write for developers)
23
24Selected versions of the documentation, as well as complete tar
25archives for selected revisions are placed to the Files section of the
26project: `http://www.ohwr.org/projects/fmc-bus/files'
27
28
29What is FMC
30***********
31
32FMC, as said, stands for "FPGA Mezzanine Card". It is a standard
33developed by the VME consortium called VITA (VMEbus International Trade
34Association and ratified by ANSI, the American National Standard
35Institute. The official documentation is called "ANSI-VITA 57.1".
36
37The FMC card is an almost square PCB, around 70x75 millimeters, that is
38called mezzanine in this document. It usually lives plugged into
39another PCB for power supply and control; such bigger circuit board is
40called carrier from now on, and a single carrier may host more than one
41mezzanine.
42
43In the typical application the mezzanine is mostly analog while the
44carrier is mostly digital, and hosts an FPGA that must be configured to
45match the specific mezzanine and the desired application. Thus, you may
46need to load different FPGA images to drive different instances of the
47same mezzanine.
48
49FMC, as such, is not a bus in the usual meaning of the term, because
50most carriers have only one connector, and carriers with several
51connectors have completely separate electrical connections to them.
52This package, however, implements a bus as a software abstraction.
53
54
55What is SDB
56***********
57
58SDB (Self Describing Bus) is a set of data structures that we use for
59enumerating the internal structure of an FPGA image. We also use it as
60a filesystem inside the FMC EEPROM.
61
62SDB is not mandatory for use of this FMC kernel bus, but if you have SDB
63this package can make good use of it. SDB itself is developed in the
64fpga-config-space OHWR project. The link to the repository is
65`git://ohwr.org/hdl-core-lib/fpga-config-space.git' and what is used in
66this project lives in the sdbfs subdirectory in there.
67
68SDB support for FMC is described in *note FMC Identification:: and
69*note SDB Support::
70
71
72SDB Support
73***********
74
75The fmc.ko bus driver exports a few functions to help drivers taking
76advantage of the SDB information that may be present in your own FPGA
77memory image.
78
79The module exports the following functions, in the special header
80<linux/fmc-sdb.h>. The linux/ prefix in the name is there because we
81plan to submit it upstream in the future, and don't want to force
82changes on our drivers if that happens.
83
84 int fmc_scan_sdb_tree(struct fmc_device *fmc, unsigned long address);
85 void fmc_show_sdb_tree(struct fmc_device *fmc);
86 signed long fmc_find_sdb_device(struct sdb_array *tree, uint64_t vendor,
87 uint32_t device, unsigned long *sz);
88 int fmc_free_sdb_tree(struct fmc_device *fmc);
diff --git a/Documentation/fmc/carrier.txt b/Documentation/fmc/carrier.txt
new file mode 100644
index 000000000000..173f6d65c88d
--- /dev/null
+++ b/Documentation/fmc/carrier.txt
@@ -0,0 +1,311 @@
1FMC Device
2**********
3
4Within the Linux bus framework, the FMC device is created and
5registered by the carrier driver. For example, the PCI driver for the
6SPEC card fills a data structure for each SPEC that it drives, and
7registers an associated FMC device for each card. The SVEC driver can
8do exactly the same for the VME carrier (actually, it should do it
9twice, because the SVEC carries two FMC mezzanines). Similarly, an
10Etherbone driver will be able to register its own FMC devices, offering
11communication primitives through frame exchange.
12
13The contents of the EEPROM within the FMC are used for identification
14purposes, i.e. for matching the device with its own driver. For this
15reason the device structure includes a complete copy of the EEPROM
16(actually, the carrier driver may choose whether or not to return it -
17for example we most likely won't have the whole EEPROM available for
18Etherbone devices.
19
20The following listing shows the current structure defining a device.
21Please note that all the machinery is in place but some details may
22still change in the future. For this reason, there is a version field
23at the beginning of the structure. As usual, the minor number will
24change for compatible changes (like a new flag) and the major number
25will increase when an incompatible change happens (for example, a
26change in layout of some fmc data structures). Device writers should
27just set it to the value FMC_VERSION, and be ready to get back -EINVAL
28at registration time.
29
30 struct fmc_device {
31 unsigned long version;
32 unsigned long flags;
33 struct module *owner; /* char device must pin it */
34 struct fmc_fru_id id; /* for EEPROM-based match */
35 struct fmc_operations *op; /* carrier-provided */
36 int irq; /* according to host bus. 0 == none */
37 int eeprom_len; /* Usually 8kB, may be less */
38 int eeprom_addr; /* 0x50, 0x52 etc */
39 uint8_t *eeprom; /* Full contents or leading part */
40 char *carrier_name; /* "SPEC" or similar, for special use */
41 void *carrier_data; /* "struct spec *" or equivalent */
42 __iomem void *fpga_base; /* May be NULL (Etherbone) */
43 __iomem void *slot_base; /* Set by the driver */
44 struct fmc_device **devarray; /* Allocated by the bus */
45 int slot_id; /* Index in the slot array */
46 int nr_slots; /* Number of slots in this carrier */
47 unsigned long memlen; /* Used for the char device */
48 struct device dev; /* For Linux use */
49 struct device *hwdev; /* The underlying hardware device */
50 unsigned long sdbfs_entry;
51 struct sdb_array *sdb;
52 uint32_t device_id; /* Filled by the device */
53 char *mezzanine_name; /* Defaults to ``fmc'' */
54 void *mezzanine_data;
55 };
56
57The meaning of most fields is summarized in the code comment above.
58
59The following fields must be filled by the carrier driver before
60registration:
61
62 * version: must be set to FMC_VERSION.
63
64 * owner: set to MODULE_OWNER.
65
66 * op: the operations to act on the device.
67
68 * irq: number for the mezzanine; may be zero.
69
70 * eeprom_len: length of the following array.
71
72 * eeprom_addr: 0x50 for first mezzanine and so on.
73
74 * eeprom: the full content of the I2C EEPROM.
75
76 * carrier_name.
77
78 * carrier_data: a unique pointer for the carrier.
79
80 * fpga_base: the I/O memory address (may be NULL).
81
82 * slot_id: the index of this slot (starting from zero).
83
84 * memlen: if fpga_base is valid, the length of I/O memory.
85
86 * hwdev: to be used in some dev_err() calls.
87
88 * device_id: a slot-specific unique integer number.
89
90
91Please note that the carrier should read its own EEPROM memory before
92registering the device, as well as fill all other fields listed above.
93
94The following fields should not be assigned, because they are filled
95later by either the bus or the device driver:
96
97 * flags.
98
99 * fru_id: filled by the bus, parsing the eeprom.
100
101 * slot_base: filled and used by the driver, if useful to it.
102
103 * devarray: an array og all mezzanines driven by a singe FPGA.
104
105 * nr_slots: set by the core at registration time.
106
107 * dev: used by Linux.
108
109 * sdb: FPGA contents, scanned according to driver's directions.
110
111 * sdbfs_entry: SDB entry point in EEPROM: autodetected.
112
113 * mezzanine_data: available for the driver.
114
115 * mezzanine_name: filled by fmc-bus during identification.
116
117
118Note: mezzanine_data may be redundant, because Linux offers the drvdata
119approach, so the field may be removed in later versions of this bus
120implementation.
121
122As I write this, she SPEC carrier is already completely functional in
123the fmc-bus environment, and is a good reference to look at.
124
125
126The API Offered by Carriers
127===========================
128
129The carrier provides a number of methods by means of the
130`fmc_operations' structure, which currently is defined like this
131(again, it is a moving target, please refer to the header rather than
132this document):
133
134 struct fmc_operations {
135 uint32_t (*readl)(struct fmc_device *fmc, int offset);
136 void (*writel)(struct fmc_device *fmc, uint32_t value, int offset);
137 int (*reprogram)(struct fmc_device *f, struct fmc_driver *d, char *gw);
138 int (*validate)(struct fmc_device *fmc, struct fmc_driver *drv);
139 int (*irq_request)(struct fmc_device *fmc, irq_handler_t h,
140 char *name, int flags);
141 void (*irq_ack)(struct fmc_device *fmc);
142 int (*irq_free)(struct fmc_device *fmc);
143 int (*gpio_config)(struct fmc_device *fmc, struct fmc_gpio *gpio,
144 int ngpio);
145 int (*read_ee)(struct fmc_device *fmc, int pos, void *d, int l);
146 int (*write_ee)(struct fmc_device *fmc, int pos, const void *d, int l);
147 };
148
149The individual methods perform the following tasks:
150
151`readl'
152`writel'
153 These functions access FPGA registers by whatever means the
154 carrier offers. They are not expected to fail, and most of the time
155 they will just make a memory access to the host bus. If the
156 carrier provides a fpga_base pointer, the driver may use direct
157 access through that pointer. For this reason the header offers the
158 inline functions fmc_readl and fmc_writel that access fpga_base if
159 the respective method is NULL. A driver that wants to be portable
160 and efficient should use fmc_readl and fmc_writel. For Etherbone,
161 or other non-local carriers, error-management is still to be
162 defined.
163
164`validate'
165 Module parameters are used to manage different applications for
166 two or more boards of the same kind. Validation is based on the
167 busid module parameter, if provided, and returns the matching
168 index in the associated array. See *note Module Parameters:: in in
169 doubt. If no match is found, `-ENOENT' is returned; if the user
170 didn't pass `busid=', all devices will pass validation. The value
171 returned by the validate method can be used as index into other
172 parameters (for example, some drivers use the `lm32=' parameter in
173 this way). Such "generic parameters" are documented in *note
174 Module Parameters::, below. The validate method is used by
175 `fmc-trivial.ko', described in *note fmc-trivial::.
176
177`reprogram'
178 The carrier enumerates FMC devices by loading a standard (or
179 golden) FPGA binary that allows EEPROM access. Each driver, then,
180 will need to reprogram the FPGA by calling this function. If the
181 name argument is NULL, the carrier should reprogram the golden
182 binary. If the gateware name has been overridden through module
183 parameters (in a carrier-specific way) the file loaded will match
184 the parameters. Per-device gateware names can be specified using
185 the `gateware=' parameter, see *note Module Parameters::. Note:
186 Clients should call rhe new helper, fmc_reprogram, which both
187 calls this method and parse the SDB tree of the FPGA.
188
189`irq_request'
190`irq_ack'
191`irq_free'
192 Interrupt management is carrier-specific, so it is abstracted as
193 operations. The interrupt number is listed in the device
194 structure, and for the mezzanine driver the number is only
195 informative. The handler will receive the fmc pointer as dev_id;
196 the flags argument is passed to the Linux request_irq function,
197 but fmc-specific flags may be added in the future. You'll most
198 likely want to pass the `IRQF_SHARED' flag.
199
200`gpio_config'
201 The method allows to configure a GPIO pin in the carrier, and read
202 its current value if it is configured as input. See *note The GPIO
203 Abstraction:: for details.
204
205`read_ee'
206`write_ee'
207 Read or write the EEPROM. The functions are expected to be only
208 called before reprogramming and the carrier should refuse them
209 with `ENODEV' after reprogramming. The offset is expected to be
210 within 8kB (the current size), but addresses up to 1MB are
211 reserved to fit bigger I2C devices in the future. Carriers may
212 offer access to other internal flash memories using these same
213 methods: for example the SPEC driver may define that its carrier
214 I2C memory is seen at offset 1M and the internal SPI flash is seen
215 at offset 16M. This multiplexing of several flash memories in the
216 same address space is is carrier-specific and should only be used
217 by a driver that has verified the `carrier_name' field.
218
219
220
221The GPIO Abstraction
222====================
223
224Support for GPIO pins in the fmc-bus environment is not very
225straightforward and deserves special discussion.
226
227While the general idea of a carrier-independent driver seems to fly,
228configuration of specific signals within the carrier needs at least
229some knowledge of the carrier itself. For this reason, the specific
230driver can request to configure carrier-specific GPIO pins, numbered
231from 0 to at most 4095. Configuration is performed by passing a
232pointer to an array of struct fmc_gpio items, as well as the length of
233the array. This is the data structure:
234
235 struct fmc_gpio {
236 char *carrier_name;
237 int gpio;
238 int _gpio; /* internal use by the carrier */
239 int mode; /* GPIOF_DIR_OUT etc, from <linux/gpio.h> */
240 int irqmode; /* IRQF_TRIGGER_LOW and so on */
241 };
242
243By specifying a carrier_name for each pin, the driver may access
244different pins in different carriers. The gpio_config method is
245expected to return the number of pins successfully configured, ignoring
246requests for other carriers. However, if no pin is configured (because
247no structure at all refers to the current carrier_name), the operation
248returns an error so the caller will know that it is running under a
249yet-unsupported carrier.
250
251So, for example, a driver that has been developed and tested on both
252the SPEC and the SVEC may request configuration of two different GPIO
253pins, and expect one such configuration to succeed - if none succeeds
254it most likely means that the current carrier is a still-unknown one.
255
256If, however, your GPIO pin has a specific known role, you can pass a
257special number in the gpio field, using one of the following macros:
258
259 #define FMC_GPIO_RAW(x) (x) /* 4096 of them */
260 #define FMC_GPIO_IRQ(x) ((x) + 0x1000) /* 256 of them */
261 #define FMC_GPIO_LED(x) ((x) + 0x1100) /* 256 of them */
262 #define FMC_GPIO_KEY(x) ((x) + 0x1200) /* 256 of them */
263 #define FMC_GPIO_TP(x) ((x) + 0x1300) /* 256 of them */
264 #define FMC_GPIO_USER(x) ((x) + 0x1400) /* 256 of them */
265
266Use of virtual GPIO numbers (anything but FMC_GPIO_RAW) is allowed
267provided the carrier_name field in the data structure is left
268unspecified (NULL). Each carrier is responsible for providing a mapping
269between virtual and physical GPIO numbers. The carrier may then use the
270_gpio field to cache the result of this mapping.
271
272All carriers must map their I/O lines to the sets above starting from
273zero. The SPEC, for example, maps interrupt pins 0 and 1, and test
274points 0 through 3 (even if the test points on the PCB are called
2755,6,7,8).
276
277If, for example, a driver requires a free LED and a test point (for a
278scope probe to be plugged at some point during development) it may ask
279for FMC_GPIO_LED(0) and FMC_GPIO_TP(0). Each carrier will provide
280suitable GPIO pins. Clearly, the person running the drivers will know
281the order used by the specific carrier driver in assigning leds and
282testpoints, so to make a carrier-dependent use of the diagnostic tools.
283
284In theory, some form of autodetection should be possible: a driver like
285the wr-nic (which uses IRQ(1) on the SPEC card) should configure
286IRQ(0), make a test with software-generated interrupts and configure
287IRQ(1) if the test fails. This probing step should be used because even
288if the wr-nic gateware is known to use IRQ1 on the SPEC, the driver
289should be carrier-independent and thus use IRQ(0) as a first bet -
290actually, the knowledge that IRQ0 may fail is carrier-dependent
291information, but using it doesn't make the driver unsuitable for other
292carriers.
293
294The return value of gpio_config is defined as follows:
295
296 * If no pin in the array can be used by the carrier, `-ENODEV'.
297
298 * If at least one virtual GPIO number cannot be mapped, `-ENOENT'.
299
300 * On success, 0 or positive. The value returned is the number of
301 high input bits (if no input is configured, the value for success
302 is 0).
303
304While I admit the procedure is not completely straightforward, it
305allows configuration, input and output with a single carrier operation.
306Given the typical use case of FMC devices, GPIO operations are not
307expected to ever by in hot paths, and GPIO access so fare has only been
308used to configure the interrupt pin, mode and polarity. Especially
309reading inputs is not expected to be common. If your device has GPIO
310capabilities in the hot path, you should consider using the kernel's
311GPIO mechanisms.
diff --git a/Documentation/fmc/fmc-chardev.txt b/Documentation/fmc/fmc-chardev.txt
new file mode 100644
index 000000000000..d9ccb278e597
--- /dev/null
+++ b/Documentation/fmc/fmc-chardev.txt
@@ -0,0 +1,64 @@
1fmc-chardev
2===========
3
4This is a simple generic driver, that allows user access by means of a
5character device (actually, one for each mezzanine it takes hold of).
6
7The char device is created as a misc device. Its name in /dev (as
8created by udev) is the same name as the underlying FMC device. Thus,
9the name can be a silly fmc-0000 look-alike if the device has no
10identifiers nor bus_id, a more specific fmc-0400 if the device has a
11bus-specific address but no associated name, or something like
12fdelay-0400 if the FMC core can rely on both a mezzanine name and a bus
13address.
14
15Currently the driver only supports read and write: you can lseek to the
16desired address and read or write a register.
17
18The driver assumes all registers are 32-bit in size, and only accepts a
19single read or write per system call. However, as a result of Unix read
20and write semantics, users can simply fread or fwrite bigger areas in
21order to dump or store bigger memory areas.
22
23There is currently no support for mmap, user-space interrupt management
24and DMA buffers. They may be added in later versions, if the need
25arises.
26
27The example below shows raw access to a SPEC card programmed with its
28golden FPGA file, that features an SDB structure at offset 256 - i.e.
2964 words. The mezzanine's EEPROM in this case is not programmed, so the
30default name is fmc-<bus><devfn>, and there are two cards in the system:
31
32 spusa.root# insmod fmc-chardev.ko
33 [ 1073.339332] spec 0000:02:00.0: Driver has no ID: matches all
34 [ 1073.345051] spec 0000:02:00.0: Created misc device "fmc-0200"
35 [ 1073.350821] spec 0000:04:00.0: Driver has no ID: matches all
36 [ 1073.356525] spec 0000:04:00.0: Created misc device "fmc-0400"
37 spusa.root# ls -l /dev/fmc*
38 crw------- 1 root root 10, 58 Nov 20 19:23 /dev/fmc-0200
39 crw------- 1 root root 10, 57 Nov 20 19:23 /dev/fmc-0400
40 spusa.root# dd bs=4 skip=64 count=1 if=/dev/fmc-0200 2> /dev/null | od -t x1z
41 0000000 2d 42 44 53 >-BDS<
42 0000004
43
44The simple program tools/fmc-mem in this package can access an FMC char
45device and read or write a word or a whole area. Actually, the program
46is not specific to FMC at all, it just uses lseek, read and write.
47
48Its first argument is the device name, the second the offset, the third
49(if any) the value to write and the optional last argument that must
50begin with "+" is the number of bytes to read or write. In case of
51repeated reading data is written to stdout; repeated writes read from
52stdin and the value argument is ignored.
53
54The following examples show reading the SDB magic number and the first
55SDB record from a SPEC device programmed with its golden image:
56
57 spusa.root# ./fmc-mem /dev/fmc-0200 100
58 5344422d
59 spusa.root# ./fmc-mem /dev/fmc-0200 100 +40 | od -Ax -t x1z
60 000000 2d 42 44 53 00 01 02 00 00 00 00 00 00 00 00 00 >-BDS............<
61 000010 00 00 00 00 ff 01 00 00 00 00 00 00 51 06 00 00 >............Q...<
62 000020 c9 42 a5 e6 02 00 00 00 11 05 12 20 2d 34 42 57 >.B......... -4BW<
63 000030 73 6f 72 43 72 61 62 73 49 53 47 2d 00 20 20 20 >sorCrabsISG-. <
64 000040
diff --git a/Documentation/fmc/fmc-fakedev.txt b/Documentation/fmc/fmc-fakedev.txt
new file mode 100644
index 000000000000..e85b74a4ae30
--- /dev/null
+++ b/Documentation/fmc/fmc-fakedev.txt
@@ -0,0 +1,36 @@
1fmc-fakedev
2===========
3
4This package includes a software-only device, called fmc-fakedev, which
5is able to register up to 4 mezzanines (by default it registers one).
6Unlike the SPEC driver, which creates an FMC device for each PCI cards
7it manages, this module creates a single instance of its set of
8mezzanines.
9
10It is meant as the simplest possible example of how a driver should be
11written, and it includes a fake EEPROM image (built using the tools
12described in *note FMC Identification::),, which by default is
13replicated for each fake mezzanine.
14
15You can also use this device to verify the match algorithms, by asking
16it to test your own EEPROM image. You can provide the image by means of
17the eeprom= module parameter: the new EEPROM image is loaded, as usual,
18by means of the firmware loader. This example shows the defaults and a
19custom EEPROM image:
20
21 spusa.root# insmod fmc-fakedev.ko
22 [ 99.971247] fake-fmc-carrier: mezzanine 0
23 [ 99.975393] Manufacturer: fake-vendor
24 [ 99.979624] Product name: fake-design-for-testing
25 spusa.root# rmmod fmc-fakedev
26 spusa.root# insmod fmc-fakedev.ko eeprom=fdelay-eeprom.bin
27 [ 121.447464] fake-fmc-carrier: Mezzanine 0: eeprom "fdelay-eeprom.bin"
28 [ 121.462725] fake-fmc-carrier: mezzanine 0
29 [ 121.466858] Manufacturer: CERN
30 [ 121.470477] Product name: FmcDelay1ns4cha
31 spusa.root# rmmod fmc-fakedev
32
33After loading the device, you can use the write_ee method do modify its
34own internal fake EEPROM: whenever the image is overwritten starting at
35offset 0, the module will unregister and register again the FMC device.
36This is shown in fmc-write-eeprom.txt
diff --git a/Documentation/fmc/fmc-trivial.txt b/Documentation/fmc/fmc-trivial.txt
new file mode 100644
index 000000000000..d1910bc67159
--- /dev/null
+++ b/Documentation/fmc/fmc-trivial.txt
@@ -0,0 +1,17 @@
1fmc-trivial
2===========
3
4The simple module fmc-trivial is just a simple client that registers an
5interrupt handler. I used it to verify the basic mechanism of the FMC
6bus and how interrupts worked.
7
8The module implements the generic FMC parameters, so it can program a
9different gateware file in each card. The whole list of parameters it
10accepts are:
11
12`busid='
13`gateware='
14 Generic parameters. See mezzanine.txt
15
16
17This driver is worth reading, in my opinion.
diff --git a/Documentation/fmc/fmc-write-eeprom.txt b/Documentation/fmc/fmc-write-eeprom.txt
new file mode 100644
index 000000000000..44a3bc678bf0
--- /dev/null
+++ b/Documentation/fmc/fmc-write-eeprom.txt
@@ -0,0 +1,125 @@
1fmc-write-eeprom
2================
3
4This module is designed to load a binary file from /lib/firmware and to
5write it to the internal EEPROM of the mezzanine card. This driver uses
6the `busid' generic parameter.
7
8Overwriting the EEPROM is not something you should do daily, and it is
9expected to only happen during manufacturing. For this reason, the
10module makes it unlikely for the random user to change a working EEPROM.
11
12The module takes the following measures:
13
14 * It accepts a `file=' argument (within /lib/firmware) and if no
15 such argument is received, it doesn't write anything to EEPROM
16 (i.e. there is no default file name).
17
18 * If the file name ends with `.bin' it is written verbatim starting
19 at offset 0.
20
21 * If the file name ends with `.tlv' it is interpreted as
22 type-length-value (i.e., it allows writev(2)-like operation).
23
24 * If the file name doesn't match any of the patterns above, it is
25 ignored and no write is performed.
26
27 * Only cards listed with `busid=' are written to. If no busid is
28 specified, no programming is done (and the probe function of the
29 driver will fail).
30
31
32Each TLV tuple is formatted in this way: the header is 5 bytes,
33followed by data. The first byte is `w' for write, the next two bytes
34represent the address, in little-endian byte order, and the next two
35represent the data length, in little-endian order. The length does not
36include the header (it is the actual number of bytes to be written).
37
38This is a real example: that writes 5 bytes at position 0x110:
39
40 spusa.root# od -t x1 -Ax /lib/firmware/try.tlv
41 000000 77 10 01 05 00 30 31 32 33 34
42 00000a
43 spusa.root# insmod /tmp/fmc-write-eeprom.ko busid=0x0200 file=try.tlv
44 [19983.391498] spec 0000:03:00.0: write 5 bytes at 0x0110
45 [19983.414615] spec 0000:03:00.0: write_eeprom: success
46
47Please note that you'll most likely want to use SDBFS to build your
48EEPROM image, at least if your mezzanines are being used in the White
49Rabbit environment. For this reason the TLV format is not expected to
50be used much and is not expected to be developed further.
51
52If you want to try reflashing fake EEPROM devices, you can use the
53fmc-fakedev.ko module (see *note fmc-fakedev::). Whenever you change
54the image starting at offset 0, it will deregister and register again
55after two seconds. Please note, however, that if fmc-write-eeprom is
56still loaded, the system will associate it to the new device, which
57will be reprogrammed and thus will be unloaded after two seconds. The
58following example removes the module after it reflashed fakedev the
59first time.
60
61 spusa.root# insmod fmc-fakedev.ko
62 [ 72.984733] fake-fmc: Manufacturer: fake-vendor
63 [ 72.989434] fake-fmc: Product name: fake-design-for-testing
64 spusa.root# insmod fmc-write-eeprom.ko busid=0 file=fdelay-eeprom.bin; \
65 rmmod fmc-write-eeprom
66 [ 130.874098] fake-fmc: Matching a generic driver (no ID)
67 [ 130.887845] fake-fmc: programming 6155 bytes
68 [ 130.894567] fake-fmc: write_eeprom: success
69 [ 132.895794] fake-fmc: Manufacturer: CERN
70 [ 132.899872] fake-fmc: Product name: FmcDelay1ns4cha
71
72
73Writing to the EEPROM
74=====================
75
76Once you have created a binary file for your EEPROM, you can write it
77to the storage medium using the fmc-write-eeprom (See *note
78fmc-write-eeprom::, while relying on a carrier driver. The procedure
79here shown here uses the SPEC driver
80(`http://www.ohwr.org/projects/spec-sw').
81
82The example assumes no driver is already loaded (actually, I unloaded
83them by hand as everything loads automatically at boot time after you
84installed the modules), and shows kernel messages together with
85commands. Here the prompt is spusa.root# and two SPEC cards are plugged
86in the system.
87
88 spusa.root# insmod fmc.ko
89 spusa.root# insmod spec.ko
90 [13972.382818] spec 0000:02:00.0: probe for device 0002:0000
91 [13972.392773] spec 0000:02:00.0: got file "fmc/spec-init.bin", 1484404 (0x16a674) bytes
92 [13972.591388] spec 0000:02:00.0: FPGA programming successful
93 [13972.883011] spec 0000:02:00.0: EEPROM has no FRU information
94 [13972.888719] spec 0000:02:00.0: No device_id filled, using index
95 [13972.894676] spec 0000:02:00.0: No mezzanine_name found
96 [13972.899863] /home/rubini/wip/spec-sw/kernel/spec-gpio.c - spec_gpio_init
97 [13972.906578] spec 0000:04:00.0: probe for device 0004:0000
98 [13972.916509] spec 0000:04:00.0: got file "fmc/spec-init.bin", 1484404 (0x16a674) bytes
99 [13973.115096] spec 0000:04:00.0: FPGA programming successful
100 [13973.401798] spec 0000:04:00.0: EEPROM has no FRU information
101 [13973.407474] spec 0000:04:00.0: No device_id filled, using index
102 [13973.413417] spec 0000:04:00.0: No mezzanine_name found
103 [13973.418600] /home/rubini/wip/spec-sw/kernel/spec-gpio.c - spec_gpio_init
104 spusa.root# ls /sys/bus/fmc/devices
105 fmc-0000 fmc-0001
106 spusa.root# insmod fmc-write-eeprom.ko busid=0x0200 file=fdelay-eeprom.bin
107 [14103.966259] spec 0000:02:00.0: Matching an generic driver (no ID)
108 [14103.975519] spec 0000:02:00.0: programming 6155 bytes
109 [14126.373762] spec 0000:02:00.0: write_eeprom: success
110 [14126.378770] spec 0000:04:00.0: Matching an generic driver (no ID)
111 [14126.384903] spec 0000:04:00.0: fmc_write_eeprom: no filename given: not programming
112 [14126.392600] fmc_write_eeprom: probe of fmc-0001 failed with error -2
113
114Reading back the EEPROM
115=======================
116
117In order to read back the binary content of the EEPROM of your
118mezzanine device, the bus creates a read-only sysfs file called eeprom
119for each mezzanine it knows about:
120
121 spusa.root# cd /sys/bus/fmc/devices; ls -l */eeprom
122 -r--r--r-- 1 root root 8192 Apr 9 16:53 FmcDelay1ns4cha-f001/eeprom
123 -r--r--r-- 1 root root 8192 Apr 9 17:19 fake-design-for-testing-f002/eeprom
124 -r--r--r-- 1 root root 8192 Apr 9 17:19 fake-design-for-testing-f003/eeprom
125 -r--r--r-- 1 root root 8192 Apr 9 17:19 fmc-f004/eeprom
diff --git a/Documentation/fmc/identifiers.txt b/Documentation/fmc/identifiers.txt
new file mode 100644
index 000000000000..3bb577ff0d52
--- /dev/null
+++ b/Documentation/fmc/identifiers.txt
@@ -0,0 +1,168 @@
1FMC Identification
2******************
3
4The FMC standard requires every compliant mezzanine to carry
5identification information in an I2C EEPROM. The information must be
6laid out according to the "IPMI Platform Management FRU Information",
7where IPMI is a lie I'd better not expand, and FRU means "Field
8Replaceable Unit".
9
10The FRU information is an intricate unreadable binary blob that must
11live at offset 0 of the EEPROM, and typically extends for a few hundred
12bytes. The standard allows the application to use all the remaining
13storage area of the EEPROM as it wants.
14
15This chapter explains how to create your own EEPROM image and how to
16write it in your mezzanine, as well as how devices and drivers are
17paired at run time. EEPROM programming uses tools that are part of this
18package and SDB (part of the fpga-config-space package).
19
20The first sections are only interesting for manufacturers who need to
21write the EEPROM. If you are just a software developer writing an FMC
22device or driver, you may jump straight to *note SDB Support::.
23
24
25Building the FRU Structure
26==========================
27
28If you want to know the internals of the FRU structure and despair, you
29can retrieve the document from
30`http://download.intel.com/design/servers/ipmi/FRU1011.pdf' . The
31standard is awful and difficult without reason, so we only support the
32minimum mandatory subset - we create a simple structure and parse it
33back at run time, but we are not able to either generate or parse more
34arcane features like non-english languages and 6-bit text. If you need
35more items of the FRU standard for your boards, please submit patches.
36
37This package includes the Python script that Matthieu Cattin wrote to
38generate the FRU binary blob, based on an helper libipmi by Manohar
39Vanga and Matthieu himself. I changed the test script to receive
40parameters from the command line or from the environment (the command
41line takes precedence)
42
43To make a long story short, in order to build a standard-compliant
44binary file to be burned in your EEPROM, you need the following items:
45
46 Environment Opt Official Name Default
47---------------------------------------------------------------------
48 FRU_VENDOR -v "Board Manufacturer" fmc-example
49 FRU_NAME -n "Board Product Name" mezzanine
50 FRU_SERIAL -s `Board Serial Number" 0001
51 FRU_PART -p "Board Part Number" sample-part
52 FRU_OUTPUT -o not applicable /dev/stdout
53
54The "Official Name" above is what you find in the FRU official
55documentation, chapter 11, page 7 ("Board Info Area Format"). The
56output option is used to save the generated binary to a specific file
57name instead of stdout.
58
59You can pass the items to the FRU generator either in the environment
60or on the command line. This package has currently no support for
61specifying power consumption or such stuff, but I plan to add it as
62soon as I find some time for that.
63
64FIXME: consumption etc for FRU are here or in PTS?
65
66The following example creates a binary image for a specific board:
67
68 ./tools/fru-generator -v CERN -n FmcAdc100m14b4cha \
69 -s HCCFFIA___-CR000003 -p EDA-02063-V5-0 > eeprom.bin
70
71The following example shows a script that builds several binary EEPROM
72images for a series of boards, changing the serial number for each of
73them. The script uses a mix of environment variables and command line
74options, and uses the same string patterns shown above.
75
76 #!/bin/sh
77
78 export FRU_VENDOR="CERN"
79 export FRU_NAME="FmcAdc100m14b4cha"
80 export FRU_PART="EDA-02063-V5-0"
81
82 serial="HCCFFIA___-CR"
83
84 for number in $(seq 1 50); do
85 # build number-string "ns"
86 ns="$(printf %06d $number)"
87 ./fru-generator -s "${serial}${ns}" > eeprom-${ns}.bin
88 done
89
90
91Using SDB-FS in the EEPROM
92==========================
93
94If you want to use SDB as a filesystem in the EEPROM device within the
95mezzanine, you should create one such filesystem using gensdbfs, from
96the fpga-config-space package on OHWR.
97
98By using an SBD filesystem you can cluster several files in a single
99EEPROM, so both the host system and a soft-core running in the FPGA (if
100any) can access extra production-time information.
101
102We chose to use SDB as a storage filesystem because the format is very
103simple, and both the host system and the soft-core will likely already
104include support code for such format. The SDB library offered by the
105fpga-config-space is less than 1kB under LM32, so it proves quite up to
106the task.
107
108The SDB entry point (which acts as a directory listing) cannot live at
109offset zero in the flash device, because the FRU information must live
110there. To avoid wasting precious storage space while still allowing
111for more-than-minimal FRU structures, the fmc.ko will look for the SDB
112record at address 256, 512 and 1024.
113
114In order to generate the complete EEPROM image you'll need a
115configuration file for gensdbfs: you tell the program where to place
116the sdb entry point, and you must force the FRU data file to be placed
117at the beginning of the storage device. If needed, you can also place
118other files at a special offset (we sometimes do it for backward
119compatibility with drivers we wrote before implementing SDB for flash
120memory).
121
122The directory tools/sdbfs of this package includes a well-commented
123example that you may want to use as a starting point (the comments are
124in the file called -SDB-CONFIG-). Reading documentation for gensdbfs
125is a suggested first step anyways.
126
127This package (generic FMC bus support) only accesses two files in the
128EEPROM: the FRU information, at offset zero, with a suggested filename
129of IPMI-FRU and the short name for the mezzanine, in a file called
130name. The IPMI-FRU name is not mandatory, but a strongly suggested
131choice; the name filename is mandatory, because this is the preferred
132short name used by the FMC core. For example, a name of "fdelay" may
133supplement a Product Name like "FmcDelay1ns4cha" - exactly as
134demonstrated in `tools/sdbfs'.
135
136Note: SDB access to flash memory is not yet supported, so the short
137name currently in use is just the "Product Name" FRU string.
138
139The example in tools/sdbfs includes an extra file, that is needed by
140the fine-delay driver, and must live at a known address of 0x1800. By
141running gensdbfs on that directory you can output your binary EEPROM
142image (here below spusa$ is the shell prompt):
143
144 spusa$ ../fru-generator -v CERN -n FmcDelay1ns4cha -s proto-0 \
145 -p EDA-02267-V3 > IPMI-FRU
146 spusa$ ls -l
147 total 16
148 -rw-rw-r-- 1 rubini staff 975 Nov 19 18:08 --SDB-CONFIG--
149 -rw-rw-r-- 1 rubini staff 216 Nov 19 18:13 IPMI-FRU
150 -rw-rw-r-- 1 rubini staff 11 Nov 19 18:04 fd-calib
151 -rw-rw-r-- 1 rubini staff 7 Nov 19 18:04 name
152 spusa$ sudo gensdbfs . /lib/firmware/fdelay-eeprom.bin
153 spusa$ sdb-read -l -e 0x100 /lib/firmware/fdelay-eeprom.bin
154 /home/rubini/wip/sdbfs/userspace/sdb-read: listing format is to be defined
155 46696c6544617461:2e202020 00000100-000018ff .
156 46696c6544617461:6e616d65 00000200-00000206 name
157 46696c6544617461:66642d63 00001800-000018ff fd-calib
158 46696c6544617461:49504d49 00000000-000000d7 IPMI-FRU
159 spusa$ ../fru-dump /lib/firmware/fdelay-eeprom.bin
160 /lib/firmware/fdelay-eeprom.bin: manufacturer: CERN
161 /lib/firmware/fdelay-eeprom.bin: product-name: FmcDelay1ns4cha
162 /lib/firmware/fdelay-eeprom.bin: serial-number: proto-0
163 /lib/firmware/fdelay-eeprom.bin: part-number: EDA-02267-V3
164
165As expected, the output file is both a proper sdbfs object and an IPMI
166FRU information blob. The fd-calib file lives at offset 0x1800 and is
167over-allocated to 256 bytes, according to the configuration file for
168gensdbfs.
diff --git a/Documentation/fmc/mezzanine.txt b/Documentation/fmc/mezzanine.txt
new file mode 100644
index 000000000000..87910dbfc91e
--- /dev/null
+++ b/Documentation/fmc/mezzanine.txt
@@ -0,0 +1,123 @@
1FMC Driver
2**********
3
4An FMC driver is concerned with the specific mezzanine and associated
5gateware. As such, it is expected to be independent of the carrier
6being used: it will perform I/O accesses only by means of
7carrier-provided functions.
8
9The matching between device and driver is based on the content of the
10EEPROM (as mandated by the FMC standard) or by the actual cores
11configured in the FPGA; the latter technique is used when the FPGA is
12already programmed when the device is registered to the bus core.
13
14In some special cases it is possible for a driver to directly access
15FPGA registers, by means of the `fpga_base' field of the device
16structure. This may be needed for high-bandwidth peripherals like fast
17ADC cards. If the device module registered a remote device (for example
18by means of Etherbone), the `fpga_base' pointer will be NULL.
19Therefore, drivers must be ready to deal with NULL base pointers, and
20fail gracefully. Most driver, however, are not expected to access the
21pointer directly but run fmc_readl and fmc_writel instead, which will
22work in any case.
23
24In even more special cases, the driver may access carrier-specific
25functionality: the `carrier_name' string allows the driver to check
26which is the current carrier and make use of the `carrier_data'
27pointer. We chose to use carrier names rather than numeric identifiers
28for greater flexibility, but also to avoid a central registry within
29the `fmc.h' file - we hope other users will exploit our framework with
30their own carriers. An example use of carrier names is in GPIO setup
31(see *note The GPIO Abstraction::), although the name match is not
32expected to be performed by the driver. If you depend on specific
33carriers, please check the carrier name and fail gracefully if your
34driver finds it is running in a yet-unknown-to-it environment.
35
36
37ID Table
38========
39
40Like most other Linux drivers, and FMC driver must list all the devices
41which it is able to drive. This is usually done by means of a device
42table, but in FMC we can match hardware based either on the contents of
43their EEPROM or on the actual FPGA cores that can be enumerated.
44Therefore, we have two tables of identifiers.
45
46Matching of FRU information depends on two names, the manufacturer (or
47vendor) and the device (see *note FMC Identification::); for
48flexibility during production (i.e. before writing to the EEPROM) the
49bus supports a catch-all driver that specifies NULL strings. For this
50reason, the table is specified as pointer-and-length, not a a
51null-terminated array - the entry with NULL names can be a valid entry.
52
53Matching on FPGA cores depends on two numeric fields: the 64-bit vendor
54number and the 32-bit device number. Support for matching based on
55class is not yet implemented. Each device is expected to be uniquely
56identified by an array of cores (it matches if all of the cores are
57instantiated), and for consistency the list is passed as
58pointer-and-length. Several similar devices can be driven by the same
59driver, and thus the driver specifies and array of such arrays.
60
61The complete set of involved data structures is thus the following:
62
63 struct fmc_fru_id { char *manufacturer; char *product_name; };
64 struct fmc_sdb_one_id { uint64_t vendor; uint32_t device; };
65 struct fmc_sdb_id { struct fmc_sdb_one_id *cores; int cores_nr; };
66
67 struct fmc_device_id {
68 struct fmc_fru_id *fru_id; int fru_id_nr;
69 struct fmc_sdb_id *sdb_id; int sdb_id_nr;
70 };
71
72A better reference, with full explanation, is the <linux/fmc.h> header.
73
74
75Module Parameters
76=================
77
78Most of the FMC drivers need the same set of kernel parameters. This
79package includes support to implement common parameters by means of
80fields in the `fmc_driver' structure and simple macro definitions.
81
82The parameters are carrier-specific, in that they rely on the busid
83concept, that varies among carriers. For the SPEC, the identifier is a
84PCI bus and devfn number, 16 bits wide in total; drivers for other
85carriers will most likely offer something similar but not identical,
86and some code duplication is unavoidable.
87
88This is the list of parameters that are common to several modules to
89see how they are actually used, please look at spec-trivial.c.
90
91`busid='
92 This is an array of integers, listing carrier-specific
93 identification numbers. For PIC, for example, `0x0400' represents
94 bus 4, slot 0. If any such ID is specified, the driver will only
95 accept to drive cards that appear in the list (even if the FMC ID
96 matches). This is accomplished by the validate carrier method.
97
98`gateware='
99 The argument is an array of strings. If no busid= is specified,
100 the first string of gateware= is used for all cards; otherwise the
101 identifiers and gateware names are paired one by one, in the order
102 specified.
103
104`show_sdb='
105 For modules supporting it, this parameter asks to show the SDB
106 internal structure by means of kernel messages. It is disabled by
107 default because those lines tend to hide more important messages,
108 if you look at the system console while loading the drivers.
109 Note: the parameter is being obsoleted, because fmc.ko itself now
110 supports dump_sdb= that applies to every client driver.
111
112
113For example, if you are using the trivial driver to load two different
114gateware files to two different cards, you can use the following
115parameters to load different binaries to the cards, after looking up
116the PCI identifiers. This has been tested with a SPEC carrier.
117
118 insmod fmc-trivial.ko \
119 busid=0x0200,0x0400 \
120 gateware=fmc/fine-delay.bin,fmc/simple-dio.bin
121
122Please note that not all sub-modules support all of those parameters.
123You can use modinfo to check what is supported by each module.
diff --git a/Documentation/fmc/parameters.txt b/Documentation/fmc/parameters.txt
new file mode 100644
index 000000000000..59edf088e3a4
--- /dev/null
+++ b/Documentation/fmc/parameters.txt
@@ -0,0 +1,56 @@
1Module Parameters in fmc.ko
2***************************
3
4The core driver receives two module parameters, meant to help debugging
5client modules. Both parameters can be modified by writing to
6/sys/module/fmc/parameters/, because they are used when client drivers
7are devices are registered, not when fmc.ko is loaded.
8
9`dump_eeprom='
10 If not zero, the parameter asks the bus controller to dump the
11 EEPROM of any device that is registered, using printk.
12
13`dump_sdb='
14 If not zero, the parameter prints the SDB tree of every FPGA it is
15 loaded by fmc_reprogram(). If greater than one, it asks to dump
16 the binary content of SDB records. This currently only dumps the
17 top-level SDB array, though.
18
19
20EEPROM dumping avoids repeating lines, since most of the contents is
21usually empty and all bits are one or zero. This is an example of the
22output:
23
24 [ 6625.850480] spec 0000:02:00.0: FPGA programming successful
25 [ 6626.139949] spec 0000:02:00.0: Manufacturer: CERN
26 [ 6626.144666] spec 0000:02:00.0: Product name: FmcDelay1ns4cha
27 [ 6626.150370] FMC: mezzanine 0: 0000:02:00.0 on SPEC
28 [ 6626.155179] FMC: dumping eeprom 0x2000 (8192) bytes
29 [ 6626.160087] 0000: 01 00 00 01 00 0b 00 f3 01 0a 00 a5 85 87 c4 43
30 [ 6626.167069] 0010: 45 52 4e cf 46 6d 63 44 65 6c 61 79 31 6e 73 34
31 [ 6626.174019] 0020: 63 68 61 c7 70 72 6f 74 6f 2d 30 cc 45 44 41 2d
32 [ 6626.180975] 0030: 30 32 32 36 37 2d 56 33 da 32 30 31 32 2d 31 31
33 [...]
34 [ 6626.371366] 0200: 66 64 65 6c 61 79 0a 00 00 00 00 00 00 00 00 00
35 [ 6626.378359] 0210: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
36 [ 6626.385361] [...]
37 [ 6626.387308] 1800: 70 6c 61 63 65 68 6f 6c 64 65 72 ff ff ff ff ff
38 [ 6626.394259] 1810: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
39 [ 6626.401250] [...]
40
41The dump of SDB looks like the following; the example shows the simple
42golden gateware for the SPEC card, removing the leading timestamps to
43fit the page:
44
45 spec 0000:02:00.0: SDB: 00000651:e6a542c9 WB4-Crossbar-GSI
46 spec 0000:02:00.0: SDB: 0000ce42:ff07fc47 WR-Periph-Syscon (00000000-000000ff)
47 FMC: mezzanine 0: 0000:02:00.0 on SPEC
48 FMC: poor dump of sdb first level:
49 0000: 53 44 42 2d 00 02 01 00 00 00 00 00 00 00 00 00
50 0010: 00 00 00 00 00 00 01 ff 00 00 00 00 00 00 06 51
51 0020: e6 a5 42 c9 00 00 00 02 20 12 05 11 57 42 34 2d
52 0030: 43 72 6f 73 73 62 61 72 2d 47 53 49 20 20 20 00
53 0040: 00 00 01 01 00 00 00 07 00 00 00 00 00 00 00 00
54 0050: 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 ce 42
55 0060: ff 07 fc 47 00 00 00 01 20 12 03 05 57 52 2d 50
56 0070: 65 72 69 70 68 2d 53 79 73 63 6f 6e 20 20 20 01
diff --git a/Documentation/hwmon/submitting-patches b/Documentation/hwmon/submitting-patches
index 843751c41fea..46286460462b 100644
--- a/Documentation/hwmon/submitting-patches
+++ b/Documentation/hwmon/submitting-patches
@@ -27,8 +27,7 @@ increase the chances of your change being accepted.
27 explicitly below the patch header. 27 explicitly below the patch header.
28 28
29* If your patch (or the driver) is affected by configuration options such as 29* If your patch (or the driver) is affected by configuration options such as
30 CONFIG_SMP or CONFIG_HOTPLUG, make sure it compiles for all configuration 30 CONFIG_SMP, make sure it compiles for all configuration variants.
31 variants.
32 31
33 32
342. Adding functionality to existing drivers 332. Adding functionality to existing drivers
diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt
index 3f429ed8b3b8..213859e69e88 100644
--- a/Documentation/kbuild/kconfig.txt
+++ b/Documentation/kbuild/kconfig.txt
@@ -165,7 +165,7 @@ Searching in menuconfig:
165 Example: 165 Example:
166 /hotplug 166 /hotplug
167 This lists all config symbols that contain "hotplug", 167 This lists all config symbols that contain "hotplug",
168 e.g., HOTPLUG, HOTPLUG_CPU, MEMORY_HOTPLUG. 168 e.g., HOTPLUG_CPU, MEMORY_HOTPLUG.
169 169
170 For search help, enter / followed TAB-TAB-TAB (to highlight 170 For search help, enter / followed TAB-TAB-TAB (to highlight
171 <Help>) and Enter. This will tell you that you can also use 171 <Help>) and Enter. This will tell you that you can also use
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 2fe6e767b3d6..81732b8abd3a 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -3341,6 +3341,21 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
3341 that this also can be controlled per-workqueue for 3341 that this also can be controlled per-workqueue for
3342 workqueues visible under /sys/bus/workqueue/. 3342 workqueues visible under /sys/bus/workqueue/.
3343 3343
3344 workqueue.power_efficient
3345 Per-cpu workqueues are generally preferred because
3346 they show better performance thanks to cache
3347 locality; unfortunately, per-cpu workqueues tend to
3348 be more power hungry than unbound workqueues.
3349
3350 Enabling this makes the per-cpu workqueues which
3351 were observed to contribute significantly to power
3352 consumption unbound, leading to measurably lower
3353 power usage at the cost of small performance
3354 overhead.
3355
3356 The default value of this parameter is determined by
3357 the config option CONFIG_WQ_POWER_EFFICIENT_DEFAULT.
3358
3344 x2apic_phys [X86-64,APIC] Use x2apic physical mode instead of 3359 x2apic_phys [X86-64,APIC] Use x2apic physical mode instead of
3345 default x2apic cluster mode on platforms 3360 default x2apic cluster mode on platforms
3346 supporting x2apic. 3361 supporting x2apic.
diff --git a/Documentation/kernel-per-CPU-kthreads.txt b/Documentation/kernel-per-CPU-kthreads.txt
index cbf7ae412da4..5f39ef55c6f6 100644
--- a/Documentation/kernel-per-CPU-kthreads.txt
+++ b/Documentation/kernel-per-CPU-kthreads.txt
@@ -157,6 +157,53 @@ RCU_SOFTIRQ: Do at least one of the following:
157 calls and by forcing both kernel threads and interrupts 157 calls and by forcing both kernel threads and interrupts
158 to execute elsewhere. 158 to execute elsewhere.
159 159
160Name: kworker/%u:%d%s (cpu, id, priority)
161Purpose: Execute workqueue requests
162To reduce its OS jitter, do any of the following:
1631. Run your workload at a real-time priority, which will allow
164 preempting the kworker daemons.
1652. Do any of the following needed to avoid jitter that your
166 application cannot tolerate:
167 a. Build your kernel with CONFIG_SLUB=y rather than
168 CONFIG_SLAB=y, thus avoiding the slab allocator's periodic
169 use of each CPU's workqueues to run its cache_reap()
170 function.
171 b. Avoid using oprofile, thus avoiding OS jitter from
172 wq_sync_buffer().
173 c. Limit your CPU frequency so that a CPU-frequency
174 governor is not required, possibly enlisting the aid of
175 special heatsinks or other cooling technologies. If done
176 correctly, and if you CPU architecture permits, you should
177 be able to build your kernel with CONFIG_CPU_FREQ=n to
178 avoid the CPU-frequency governor periodically running
179 on each CPU, including cs_dbs_timer() and od_dbs_timer().
180 WARNING: Please check your CPU specifications to
181 make sure that this is safe on your particular system.
182 d. It is not possible to entirely get rid of OS jitter
183 from vmstat_update() on CONFIG_SMP=y systems, but you
184 can decrease its frequency by writing a large value to
185 /proc/sys/vm/stat_interval. The default value is HZ,
186 for an interval of one second. Of course, larger values
187 will make your virtual-memory statistics update more
188 slowly. Of course, you can also run your workload at
189 a real-time priority, thus preempting vmstat_update().
190 e. If running on high-end powerpc servers, build with
191 CONFIG_PPC_RTAS_DAEMON=n. This prevents the RTAS
192 daemon from running on each CPU every second or so.
193 (This will require editing Kconfig files and will defeat
194 this platform's RAS functionality.) This avoids jitter
195 due to the rtas_event_scan() function.
196 WARNING: Please check your CPU specifications to
197 make sure that this is safe on your particular system.
198 f. If running on Cell Processor, build your kernel with
199 CBE_CPUFREQ_SPU_GOVERNOR=n to avoid OS jitter from
200 spu_gov_work().
201 WARNING: Please check your CPU specifications to
202 make sure that this is safe on your particular system.
203 g. If running on PowerMAC, build your kernel with
204 CONFIG_PMAC_RACKMETER=n to disable the CPU-meter,
205 avoiding OS jitter from rackmeter_do_timer().
206
160Name: rcuc/%u 207Name: rcuc/%u
161Purpose: Execute RCU callbacks in CONFIG_RCU_BOOST=y kernels. 208Purpose: Execute RCU callbacks in CONFIG_RCU_BOOST=y kernels.
162To reduce its OS jitter, do at least one of the following: 209To reduce its OS jitter, do at least one of the following:
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index f98ca633b528..3458d6343e01 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -420,10 +420,10 @@ tcp_synack_retries - INTEGER
420 for a passive TCP connection will happen after 63seconds. 420 for a passive TCP connection will happen after 63seconds.
421 421
422tcp_syncookies - BOOLEAN 422tcp_syncookies - BOOLEAN
423 Only valid when the kernel was compiled with CONFIG_SYNCOOKIES 423 Only valid when the kernel was compiled with CONFIG_SYN_COOKIES
424 Send out syncookies when the syn backlog queue of a socket 424 Send out syncookies when the syn backlog queue of a socket
425 overflows. This is to prevent against the common 'SYN flood attack' 425 overflows. This is to prevent against the common 'SYN flood attack'
426 Default: FALSE 426 Default: 1
427 427
428 Note, that syncookies is fallback facility. 428 Note, that syncookies is fallback facility.
429 It MUST NOT be used to help highly loaded servers to stand 429 It MUST NOT be used to help highly loaded servers to stand
diff --git a/Documentation/rt-mutex-design.txt b/Documentation/rt-mutex-design.txt
index 33ed8007a845..a5bcd7f5c33f 100644
--- a/Documentation/rt-mutex-design.txt
+++ b/Documentation/rt-mutex-design.txt
@@ -384,7 +384,7 @@ priority back.
384__rt_mutex_adjust_prio examines the result of rt_mutex_getprio, and if the 384__rt_mutex_adjust_prio examines the result of rt_mutex_getprio, and if the
385result does not equal the task's current priority, then rt_mutex_setprio 385result does not equal the task's current priority, then rt_mutex_setprio
386is called to adjust the priority of the task to the new priority. 386is called to adjust the priority of the task to the new priority.
387Note that rt_mutex_setprio is defined in kernel/sched.c to implement the 387Note that rt_mutex_setprio is defined in kernel/sched/core.c to implement the
388actual change in priority. 388actual change in priority.
389 389
390It is interesting to note that __rt_mutex_adjust_prio can either increase 390It is interesting to note that __rt_mutex_adjust_prio can either increase
diff --git a/Documentation/scheduler/sched-domains.txt b/Documentation/scheduler/sched-domains.txt
index 443f0c76bab4..4af80b1c05aa 100644
--- a/Documentation/scheduler/sched-domains.txt
+++ b/Documentation/scheduler/sched-domains.txt
@@ -25,7 +25,7 @@ is treated as one entity. The load of a group is defined as the sum of the
25load of each of its member CPUs, and only when the load of a group becomes 25load of each of its member CPUs, and only when the load of a group becomes
26out of balance are tasks moved between groups. 26out of balance are tasks moved between groups.
27 27
28In kernel/sched.c, trigger_load_balance() is run periodically on each CPU 28In kernel/sched/core.c, trigger_load_balance() is run periodically on each CPU
29through scheduler_tick(). It raises a softirq after the next regularly scheduled 29through scheduler_tick(). It raises a softirq after the next regularly scheduled
30rebalancing event for the current runqueue has arrived. The actual load 30rebalancing event for the current runqueue has arrived. The actual load
31balancing workhorse, run_rebalance_domains()->rebalance_domains(), is then run 31balancing workhorse, run_rebalance_domains()->rebalance_domains(), is then run
@@ -62,7 +62,7 @@ struct sched_domain fields, SD_FLAG_*, SD_*_INIT to get an idea of
62the specifics and what to tune. 62the specifics and what to tune.
63 63
64Architectures may retain the regular override the default SD_*_INIT flags 64Architectures may retain the regular override the default SD_*_INIT flags
65while using the generic domain builder in kernel/sched.c if they wish to 65while using the generic domain builder in kernel/sched/core.c if they wish to
66retain the traditional SMT->SMP->NUMA topology (or some subset of that). This 66retain the traditional SMT->SMP->NUMA topology (or some subset of that). This
67can be done by #define'ing ARCH_HASH_SCHED_TUNE. 67can be done by #define'ing ARCH_HASH_SCHED_TUNE.
68 68
diff --git a/Documentation/serial/00-INDEX b/Documentation/serial/00-INDEX
index f7b0c7dc25ef..1f1b22fbd739 100644
--- a/Documentation/serial/00-INDEX
+++ b/Documentation/serial/00-INDEX
@@ -16,8 +16,6 @@ serial-rs485.txt
16 - info about RS485 structures and support in the kernel. 16 - info about RS485 structures and support in the kernel.
17specialix.txt 17specialix.txt
18 - info on hardware/driver for specialix IO8+ multiport serial card. 18 - info on hardware/driver for specialix IO8+ multiport serial card.
19stallion.txt
20 - info on using the Stallion multiport serial driver.
21sx.txt 19sx.txt
22 - info on the Specialix SX/SI multiport serial driver. 20 - info on the Specialix SX/SI multiport serial driver.
23tty.txt 21tty.txt
diff --git a/Documentation/serial/stallion.txt b/Documentation/serial/stallion.txt
deleted file mode 100644
index 4d798c0cb5cb..000000000000
--- a/Documentation/serial/stallion.txt
+++ /dev/null
@@ -1,392 +0,0 @@
1* NOTE - This is an unmaintained driver. Lantronix, which bought Stallion
2technologies, is not active in driver maintenance, and they have no information
3on when or if they will have a 2.6 driver.
4
5James Nelson <james4765@gmail.com> - 12-12-2004
6
7Stallion Multiport Serial Driver Readme
8---------------------------------------
9
10Copyright (C) 1994-1999, Stallion Technologies.
11
12Version: 5.5.1
13Date: 28MAR99
14
15
16
171. INTRODUCTION
18
19There are two drivers that work with the different families of Stallion
20multiport serial boards. One is for the Stallion smart boards - that is
21EasyIO, EasyConnection 8/32 and EasyConnection 8/64-PCI, the other for
22the true Stallion intelligent multiport boards - EasyConnection 8/64
23(ISA, EISA), EasyConnection/RA-PCI, ONboard and Brumby.
24
25If you are using any of the Stallion intelligent multiport boards (Brumby,
26ONboard, EasyConnection 8/64 (ISA, EISA), EasyConnection/RA-PCI) with
27Linux you will need to get the driver utility package. This contains a
28firmware loader and the firmware images necessary to make the devices operate.
29
30The Stallion Technologies ftp site, ftp.stallion.com, will always have
31the latest version of the driver utility package.
32
33ftp://ftp.stallion.com/drivers/ata5/Linux/ata-linux-550.tar.gz
34
35As of the printing of this document the latest version of the driver
36utility package is 5.5.0. If a later version is now available then you
37should use the latest version.
38
39If you are using the EasyIO, EasyConnection 8/32 or EasyConnection 8/64-PCI
40boards then you don't need this package, although it does have a serial stats
41display program.
42
43If you require DIP switch settings, or EISA configuration files, or any
44other information related to Stallion boards then have a look at Stallion's
45web pages at http://www.stallion.com.
46
47
48
492. INSTALLATION
50
51The drivers can be used as loadable modules or compiled into the kernel.
52You can choose which when doing a "config" on the kernel.
53
54All ISA, and EISA boards that you want to use need to be configured into
55the driver(s). All PCI boards will be automatically detected when you load
56the driver - so they do not need to be entered into the driver(s)
57configuration structure. Note that kernel PCI support is required to use PCI
58boards.
59
60There are two methods of configuring ISA and EISA boards into the drivers.
61If using the driver as a loadable module then the simplest method is to pass
62the driver configuration as module arguments. The other method is to modify
63the driver source to add configuration lines for each board in use.
64
65If you have pre-built Stallion driver modules then the module argument
66configuration method should be used. A lot of Linux distributions come with
67pre-built driver modules in /lib/modules/X.Y.Z/misc for the kernel in use.
68That makes things pretty simple to get going.
69
70
712.1 MODULE DRIVER CONFIGURATION:
72
73The simplest configuration for modules is to use the module load arguments
74to configure any ISA or EISA boards. PCI boards are automatically
75detected, so do not need any additional configuration at all.
76
77If using EasyIO, EasyConnection 8/32 ISA, or EasyConnection 8/63-PCI
78boards then use the "stallion" driver module, Otherwise if you are using
79an EasyConnection 8/64 ISA or EISA, EasyConnection/RA-PCI, ONboard,
80Brumby or original Stallion board then use the "istallion" driver module.
81
82Typically to load up the smart board driver use:
83
84 modprobe stallion
85
86This will load the EasyIO and EasyConnection 8/32 driver. It will output a
87message to say that it loaded and print the driver version number. It will
88also print out whether it found the configured boards or not. These messages
89may not appear on the console, but typically are always logged to
90/var/adm/messages or /var/log/syslog files - depending on how the klogd and
91syslogd daemons are setup on your system.
92
93To load the intelligent board driver use:
94
95 modprobe istallion
96
97It will output similar messages to the smart board driver.
98
99If not using an auto-detectable board type (that is a PCI board) then you
100will also need to supply command line arguments to the modprobe command
101when loading the driver. The general form of the configuration argument is
102
103 board?=<name>[,<ioaddr>[,<addr>][,<irq>]]
104
105where:
106
107 board? -- specifies the arbitrary board number of this board,
108 can be in the range 0 to 3.
109
110 name -- textual name of this board. The board name is the common
111 board name, or any "shortened" version of that. The board
112 type number may also be used here.
113
114 ioaddr -- specifies the I/O address of this board. This argument is
115 optional, but should generally be specified.
116
117 addr -- optional second address argument. Some board types require
118 a second I/O address, some require a memory address. The
119 exact meaning of this argument depends on the board type.
120
121 irq -- optional IRQ line used by this board.
122
123Up to 4 board configuration arguments can be specified on the load line.
124Here is some examples:
125
126 modprobe stallion board0=easyio,0x2a0,5
127
128This configures an EasyIO board as board 0 at I/O address 0x2a0 and IRQ 5.
129
130 modprobe istallion board3=ec8/64,0x2c0,0xcc000
131
132This configures an EasyConnection 8/64 ISA as board 3 at I/O address 0x2c0 at
133memory address 0xcc000.
134
135 modprobe stallion board1=ec8/32-at,0x2a0,0x280,10
136
137This configures an EasyConnection 8/32 ISA board at primary I/O address 0x2a0,
138secondary address 0x280 and IRQ 10.
139
140You will probably want to enter this module load and configuration information
141into your system startup scripts so that the drivers are loaded and configured
142on each system boot. Typically configuration files are put in the
143/etc/modprobe.d/ directory.
144
145
1462.2 STATIC DRIVER CONFIGURATION:
147
148For static driver configuration you need to modify the driver source code.
149Entering ISA and EISA boards into the driver(s) configuration structure
150involves editing the driver(s) source file. It's pretty easy if you follow
151the instructions below. Both drivers can support up to 4 boards. The smart
152card driver (the stallion.c driver) supports any combination of EasyIO and
153EasyConnection 8/32 boards (up to a total of 4). The intelligent driver
154supports any combination of ONboards, Brumbys, Stallions and EasyConnection
1558/64 (ISA and EISA) boards (up to a total of 4).
156
157To set up the driver(s) for the boards that you want to use you need to
158edit the appropriate driver file and add configuration entries.
159
160If using EasyIO or EasyConnection 8/32 ISA boards,
161 In drivers/char/stallion.c:
162 - find the definition of the stl_brdconf array (of structures)
163 near the top of the file
164 - modify this to match the boards you are going to install
165 (the comments before this structure should help)
166 - save and exit
167
168If using ONboard, Brumby, Stallion or EasyConnection 8/64 (ISA or EISA)
169boards,
170 In drivers/char/istallion.c:
171 - find the definition of the stli_brdconf array (of structures)
172 near the top of the file
173 - modify this to match the boards you are going to install
174 (the comments before this structure should help)
175 - save and exit
176
177Once you have set up the board configurations then you are ready to build
178the kernel or modules.
179
180When the new kernel is booted, or the loadable module loaded then the
181driver will emit some kernel trace messages about whether the configured
182boards were detected or not. Depending on how your system logger is set
183up these may come out on the console, or just be logged to
184/var/adm/messages or /var/log/syslog. You should check the messages to
185confirm that all is well.
186
187
1882.3 SHARING INTERRUPTS
189
190It is possible to share interrupts between multiple EasyIO and
191EasyConnection 8/32 boards in an EISA system. To do this you must be using
192static driver configuration, modifying the driver source code to add driver
193configuration. Then a couple of extra things are required:
194
1951. When entering the board resources into the stallion.c file you need to
196 mark the boards as using level triggered interrupts. Do this by replacing
197 the "0" entry at field position 6 (the last field) in the board
198 configuration structure with a "1". (This is the structure that defines
199 the board type, I/O locations, etc. for each board). All boards that are
200 sharing an interrupt must be set this way, and each board should have the
201 same interrupt number specified here as well. Now build the module or
202 kernel as you would normally.
203
2042. When physically installing the boards into the system you must enter
205 the system EISA configuration utility. You will need to install the EISA
206 configuration files for *all* the EasyIO and EasyConnection 8/32 boards
207 that are sharing interrupts. The Stallion EasyIO and EasyConnection 8/32
208 EISA configuration files required are supplied by Stallion Technologies
209 on the EASY Utilities floppy diskette (usually supplied in the box with
210 the board when purchased. If not, you can pick it up from Stallion's FTP
211 site, ftp.stallion.com). You will need to edit the board resources to
212 choose level triggered interrupts, and make sure to set each board's
213 interrupt to the same IRQ number.
214
215You must complete both the above steps for this to work. When you reboot
216or load the driver your EasyIO and EasyConnection 8/32 boards will be
217sharing interrupts.
218
219
2202.4 USING HIGH SHARED MEMORY
221
222The EasyConnection 8/64-EI, ONboard and Stallion boards are capable of
223using shared memory addresses above the usual 640K - 1Mb range. The ONboard
224ISA and the Stallion boards can be programmed to use memory addresses up to
22516Mb (the ISA bus addressing limit), and the EasyConnection 8/64-EI and
226ONboard/E can be programmed for memory addresses up to 4Gb (the EISA bus
227addressing limit).
228
229The higher than 1Mb memory addresses are fully supported by this driver.
230Just enter the address as you normally would for a lower than 1Mb address
231(in the driver's board configuration structure).
232
233
234
2352.5 TROUBLE SHOOTING
236
237If a board is not found by the driver but is actually in the system then the
238most likely problem is that the I/O address is wrong. Change the module load
239argument for the loadable module form. Or change it in the driver stallion.c
240or istallion.c configuration structure and rebuild the kernel or modules, or
241change it on the board.
242
243On EasyIO and EasyConnection 8/32 boards the IRQ is software programmable, so
244if there is a conflict you may need to change the IRQ used for a board. There
245are no interrupts to worry about for ONboard, Brumby or EasyConnection 8/64
246(ISA and EISA) boards. The memory region on EasyConnection 8/64 and
247ONboard boards is software programmable, but not on the Brumby boards.
248
249
250
2513. USING THE DRIVERS
252
2533.1 INTELLIGENT DRIVER OPERATION
254
255The intelligent boards also need to have their "firmware" code downloaded
256to them. This is done via a user level application supplied in the driver
257utility package called "stlload". Compile this program wherever you dropped
258the package files, by typing "make". In its simplest form you can then type
259
260 ./stlload -i cdk.sys
261
262in this directory and that will download board 0 (assuming board 0 is an
263EasyConnection 8/64 or EasyConnection/RA board). To download to an
264ONboard, Brumby or Stallion do:
265
266 ./stlload -i 2681.sys
267
268Normally you would want all boards to be downloaded as part of the standard
269system startup. To achieve this, add one of the lines above into the
270/etc/rc.d/rc.S or /etc/rc.d/rc.serial file. To download each board just add
271the "-b <brd-number>" option to the line. You will need to download code for
272every board. You should probably move the stlload program into a system
273directory, such as /usr/sbin. Also, the default location of the cdk.sys image
274file in the stlload down-loader is /usr/lib/stallion. Create that directory
275and put the cdk.sys and 2681.sys files in it. (It's a convenient place to put
276them anyway). As an example your /etc/rc.d/rc.S file might have the
277following lines added to it (if you had 3 boards):
278
279 /usr/sbin/stlload -b 0 -i /usr/lib/stallion/cdk.sys
280 /usr/sbin/stlload -b 1 -i /usr/lib/stallion/2681.sys
281 /usr/sbin/stlload -b 2 -i /usr/lib/stallion/2681.sys
282
283The image files cdk.sys and 2681.sys are specific to the board types. The
284cdk.sys will only function correctly on an EasyConnection 8/64 board. Similarly
285the 2681.sys image fill only operate on ONboard, Brumby and Stallion boards.
286If you load the wrong image file into a board it will fail to start up, and
287of course the ports will not be operational!
288
289If you are using the modularized version of the driver you might want to put
290the modprobe calls in the startup script as well (before the download lines
291obviously).
292
293
2943.2 USING THE SERIAL PORTS
295
296Once the driver is installed you will need to setup some device nodes to
297access the serial ports. The simplest method is to use the /dev/MAKEDEV program.
298It will automatically create device entries for Stallion boards. This will
299create the normal serial port devices as /dev/ttyE# where# is the port number
300starting from 0. A bank of 64 minor device numbers is allocated to each board,
301so the first port on the second board is port 64,etc. A set of callout type
302devices may also be created. They are created as the devices /dev/cue# where #
303is the same as for the ttyE devices.
304
305For the most part the Stallion driver tries to emulate the standard PC system
306COM ports and the standard Linux serial driver. The idea is that you should
307be able to use Stallion board ports and COM ports interchangeably without
308modifying anything but the device name. Anything that doesn't work like that
309should be considered a bug in this driver!
310
311If you look at the driver code you will notice that it is fairly closely
312based on the Linux serial driver (linux/drivers/char/serial.c). This is
313intentional, obviously this is the easiest way to emulate its behavior!
314
315Since this driver tries to emulate the standard serial ports as much as
316possible, most system utilities should work as they do for the standard
317COM ports. Most importantly "stty" works as expected and "setserial" can
318also be used (excepting the ability to auto-configure the I/O and IRQ
319addresses of boards). Higher baud rates are supported in the usual fashion
320through setserial or using the CBAUDEX extensions. Note that the EasyIO and
321EasyConnection (all types) support at least 57600 and 115200 baud. The newer
322EasyConnection XP modules and new EasyIO boards support 230400 and 460800
323baud as well. The older boards including ONboard and Brumby support a
324maximum baud rate of 38400.
325
326If you are unfamiliar with how to use serial ports, then get the Serial-HOWTO
327by Greg Hankins. It will explain everything you need to know!
328
329
330
3314. NOTES
332
333You can use both drivers at once if you have a mix of board types installed
334in a system. However to do this you will need to change the major numbers
335used by one of the drivers. Currently both drivers use major numbers 24, 25
336and 28 for their devices. Change one driver to use some other major numbers,
337and then modify the mkdevnods script to make device nodes based on those new
338major numbers. For example, you could change the istallion.c driver to use
339major numbers 60, 61 and 62. You will also need to create device nodes with
340different names for the ports, for example ttyF# and cuf#.
341
342The original Stallion board is no longer supported by Stallion Technologies.
343Although it is known to work with the istallion driver.
344
345Finding a free physical memory address range can be a problem. The older
346boards like the Stallion and ONboard need large areas (64K or even 128K), so
347they can be very difficult to get into a system. If you have 16 Mb of RAM
348then you have no choice but to put them somewhere in the 640K -> 1Mb range.
349ONboards require 64K, so typically 0xd0000 is good, or 0xe0000 on some
350systems. If you have an original Stallion board, "V4.0" or Rev.O, then you
351need a 64K memory address space, so again 0xd0000 and 0xe0000 are good.
352Older Stallion boards are a much bigger problem. They need 128K of address
353space and must be on a 128K boundary. If you don't have a VGA card then
3540xc0000 might be usable - there is really no other place you can put them
355below 1Mb.
356
357Both the ONboard and old Stallion boards can use higher memory addresses as
358well, but you must have less than 16Mb of RAM to be able to use them. Usual
359high memory addresses used include 0xec0000 and 0xf00000.
360
361The Brumby boards only require 16Kb of address space, so you can usually
362squeeze them in somewhere. Common addresses are 0xc8000, 0xcc000, or in
363the 0xd0000 range. EasyConnection 8/64 boards are even better, they only
364require 4Kb of address space, again usually 0xc8000, 0xcc000 or 0xd0000
365are good.
366
367If you are using an EasyConnection 8/64-EI or ONboard/E then usually the
3680xd0000 or 0xe0000 ranges are the best options below 1Mb. If neither of
369them can be used then the high memory support to use the really high address
370ranges is the best option. Typically the 2Gb range is convenient for them,
371and gets them well out of the way.
372
373The ports of the EasyIO-8M board do not have DCD or DTR signals. So these
374ports cannot be used as real modem devices. Generally, when using these
375ports you should only use the cueX devices.
376
377The driver utility package contains a couple of very useful programs. One
378is a serial port statistics collection and display program - very handy
379for solving serial port problems. The other is an extended option setting
380program that works with the intelligent boards.
381
382
383
3845. DISCLAIMER
385
386The information contained in this document is believed to be accurate and
387reliable. However, no responsibility is assumed by Stallion Technologies
388Pty. Ltd. for its use, nor any infringements of patents or other rights
389of third parties resulting from its use. Stallion Technologies reserves
390the right to modify the design of its products and will endeavour to change
391the information in manuals and accompanying documentation accordingly.
392
diff --git a/Documentation/spinlocks.txt b/Documentation/spinlocks.txt
index 9dbe885ecd8d..97eaf5727178 100644
--- a/Documentation/spinlocks.txt
+++ b/Documentation/spinlocks.txt
@@ -137,7 +137,7 @@ don't block on each other (and thus there is no dead-lock wrt interrupts.
137But when you do the write-lock, you have to use the irq-safe version. 137But when you do the write-lock, you have to use the irq-safe version.
138 138
139For an example of being clever with rw-locks, see the "waitqueue_lock" 139For an example of being clever with rw-locks, see the "waitqueue_lock"
140handling in kernel/sched.c - nothing ever _changes_ a wait-queue from 140handling in kernel/sched/core.c - nothing ever _changes_ a wait-queue from
141within an interrupt, they only read the queue in order to know whom to 141within an interrupt, they only read the queue in order to know whom to
142wake up. So read-locks are safe (which is good: they are very common 142wake up. So read-locks are safe (which is good: they are very common
143indeed), while write-locks need to protect themselves against interrupts. 143indeed), while write-locks need to protect themselves against interrupts.
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
index ccd42589e124..ab7d16efa96b 100644
--- a/Documentation/sysctl/kernel.txt
+++ b/Documentation/sysctl/kernel.txt
@@ -70,12 +70,12 @@ show up in /proc/sys/kernel:
70- shmall 70- shmall
71- shmmax [ sysv ipc ] 71- shmmax [ sysv ipc ]
72- shmmni 72- shmmni
73- softlockup_thresh
74- stop-a [ SPARC only ] 73- stop-a [ SPARC only ]
75- sysrq ==> Documentation/sysrq.txt 74- sysrq ==> Documentation/sysrq.txt
76- tainted 75- tainted
77- threads-max 76- threads-max
78- unknown_nmi_panic 77- unknown_nmi_panic
78- watchdog_thresh
79- version 79- version
80 80
81============================================================== 81==============================================================
@@ -427,6 +427,32 @@ This file shows up if CONFIG_DEBUG_STACKOVERFLOW is enabled.
427 427
428============================================================== 428==============================================================
429 429
430perf_cpu_time_max_percent:
431
432Hints to the kernel how much CPU time it should be allowed to
433use to handle perf sampling events. If the perf subsystem
434is informed that its samples are exceeding this limit, it
435will drop its sampling frequency to attempt to reduce its CPU
436usage.
437
438Some perf sampling happens in NMIs. If these samples
439unexpectedly take too long to execute, the NMIs can become
440stacked up next to each other so much that nothing else is
441allowed to execute.
442
4430: disable the mechanism. Do not monitor or correct perf's
444 sampling rate no matter how CPU time it takes.
445
4461-100: attempt to throttle perf's sample rate to this
447 percentage of CPU. Note: the kernel calculates an
448 "expected" length of each sample event. 100 here means
449 100% of that expected length. Even if this is set to
450 100, you may still see sample throttling if this
451 length is exceeded. Set to 0 if you truly do not care
452 how much CPU is consumed.
453
454==============================================================
455
430 456
431pid_max: 457pid_max:
432 458
@@ -604,15 +630,6 @@ without users and with a dead originative process will be destroyed.
604 630
605============================================================== 631==============================================================
606 632
607softlockup_thresh:
608
609This value can be used to lower the softlockup tolerance threshold. The
610default threshold is 60 seconds. If a cpu is locked up for 60 seconds,
611the kernel complains. Valid values are 1-60 seconds. Setting this
612tunable to zero will disable the softlockup detection altogether.
613
614==============================================================
615
616tainted: 633tainted:
617 634
618Non-zero if the kernel has been tainted. Numeric values, which 635Non-zero if the kernel has been tainted. Numeric values, which
@@ -648,3 +665,16 @@ that time, kernel debugging information is displayed on console.
648 665
649NMI switch that most IA32 servers have fires unknown NMI up, for 666NMI switch that most IA32 servers have fires unknown NMI up, for
650example. If a system hangs up, try pressing the NMI switch. 667example. If a system hangs up, try pressing the NMI switch.
668
669==============================================================
670
671watchdog_thresh:
672
673This value can be used to control the frequency of hrtimer and NMI
674events and the soft and hard lockup thresholds. The default threshold
675is 10 seconds.
676
677The softlockup threshold is (2 * watchdog_thresh). Setting this
678tunable to zero will disable lockup detection altogether.
679
680==============================================================
diff --git a/Documentation/timers/NO_HZ.txt b/Documentation/timers/NO_HZ.txt
index 5b5322024067..88697584242b 100644
--- a/Documentation/timers/NO_HZ.txt
+++ b/Documentation/timers/NO_HZ.txt
@@ -7,21 +7,59 @@ efficiency and reducing OS jitter. Reducing OS jitter is important for
7some types of computationally intensive high-performance computing (HPC) 7some types of computationally intensive high-performance computing (HPC)
8applications and for real-time applications. 8applications and for real-time applications.
9 9
10There are two main contexts in which the number of scheduling-clock 10There are three main ways of managing scheduling-clock interrupts
11interrupts can be reduced compared to the old-school approach of sending 11(also known as "scheduling-clock ticks" or simply "ticks"):
12a scheduling-clock interrupt to all CPUs every jiffy whether they need
13it or not (CONFIG_HZ_PERIODIC=y or CONFIG_NO_HZ=n for older kernels):
14 12
151. Idle CPUs (CONFIG_NO_HZ_IDLE=y or CONFIG_NO_HZ=y for older kernels). 131. Never omit scheduling-clock ticks (CONFIG_HZ_PERIODIC=y or
14 CONFIG_NO_HZ=n for older kernels). You normally will -not-
15 want to choose this option.
16 16
172. CPUs having only one runnable task (CONFIG_NO_HZ_FULL=y). 172. Omit scheduling-clock ticks on idle CPUs (CONFIG_NO_HZ_IDLE=y or
18 CONFIG_NO_HZ=y for older kernels). This is the most common
19 approach, and should be the default.
18 20
19These two cases are described in the following two sections, followed 213. Omit scheduling-clock ticks on CPUs that are either idle or that
22 have only one runnable task (CONFIG_NO_HZ_FULL=y). Unless you
23 are running realtime applications or certain types of HPC
24 workloads, you will normally -not- want this option.
25
26These three cases are described in the following three sections, followed
20by a third section on RCU-specific considerations and a fourth and final 27by a third section on RCU-specific considerations and a fourth and final
21section listing known issues. 28section listing known issues.
22 29
23 30
24IDLE CPUs 31NEVER OMIT SCHEDULING-CLOCK TICKS
32
33Very old versions of Linux from the 1990s and the very early 2000s
34are incapable of omitting scheduling-clock ticks. It turns out that
35there are some situations where this old-school approach is still the
36right approach, for example, in heavy workloads with lots of tasks
37that use short bursts of CPU, where there are very frequent idle
38periods, but where these idle periods are also quite short (tens or
39hundreds of microseconds). For these types of workloads, scheduling
40clock interrupts will normally be delivered any way because there
41will frequently be multiple runnable tasks per CPU. In these cases,
42attempting to turn off the scheduling clock interrupt will have no effect
43other than increasing the overhead of switching to and from idle and
44transitioning between user and kernel execution.
45
46This mode of operation can be selected using CONFIG_HZ_PERIODIC=y (or
47CONFIG_NO_HZ=n for older kernels).
48
49However, if you are instead running a light workload with long idle
50periods, failing to omit scheduling-clock interrupts will result in
51excessive power consumption. This is especially bad on battery-powered
52devices, where it results in extremely short battery lifetimes. If you
53are running light workloads, you should therefore read the following
54section.
55
56In addition, if you are running either a real-time workload or an HPC
57workload with short iterations, the scheduling-clock interrupts can
58degrade your applications performance. If this describes your workload,
59you should read the following two sections.
60
61
62OMIT SCHEDULING-CLOCK TICKS FOR IDLE CPUs
25 63
26If a CPU is idle, there is little point in sending it a scheduling-clock 64If a CPU is idle, there is little point in sending it a scheduling-clock
27interrupt. After all, the primary purpose of a scheduling-clock interrupt 65interrupt. After all, the primary purpose of a scheduling-clock interrupt
@@ -59,10 +97,12 @@ By default, CONFIG_NO_HZ_IDLE=y kernels boot with "nohz=on", enabling
59dyntick-idle mode. 97dyntick-idle mode.
60 98
61 99
62CPUs WITH ONLY ONE RUNNABLE TASK 100OMIT SCHEDULING-CLOCK TICKS FOR CPUs WITH ONLY ONE RUNNABLE TASK
63 101
64If a CPU has only one runnable task, there is little point in sending it 102If a CPU has only one runnable task, there is little point in sending it
65a scheduling-clock interrupt because there is no other task to switch to. 103a scheduling-clock interrupt because there is no other task to switch to.
104Note that omitting scheduling-clock ticks for CPUs with only one runnable
105task implies also omitting them for idle CPUs.
66 106
67The CONFIG_NO_HZ_FULL=y Kconfig option causes the kernel to avoid 107The CONFIG_NO_HZ_FULL=y Kconfig option causes the kernel to avoid
68sending scheduling-clock interrupts to CPUs with a single runnable task, 108sending scheduling-clock interrupts to CPUs with a single runnable task,
@@ -238,6 +278,11 @@ o Adaptive-ticks does not do anything unless there is only one
238 single runnable SCHED_FIFO task and multiple runnable SCHED_OTHER 278 single runnable SCHED_FIFO task and multiple runnable SCHED_OTHER
239 tasks, even though these interrupts are unnecessary. 279 tasks, even though these interrupts are unnecessary.
240 280
281 And even when there are multiple runnable tasks on a given CPU,
282 there is little point in interrupting that CPU until the current
283 running task's timeslice expires, which is almost always way
284 longer than the time of the next scheduling-clock interrupt.
285
241 Better handling of these sorts of situations is future work. 286 Better handling of these sorts of situations is future work.
242 287
243o A reboot is required to reconfigure both adaptive idle and RCU 288o A reboot is required to reconfigure both adaptive idle and RCU
@@ -268,6 +313,16 @@ o Unless all CPUs are idle, at least one CPU must keep the
268 scheduling-clock interrupt going in order to support accurate 313 scheduling-clock interrupt going in order to support accurate
269 timekeeping. 314 timekeeping.
270 315
271o If there are adaptive-ticks CPUs, there will be at least one 316o If there might potentially be some adaptive-ticks CPUs, there
272 CPU keeping the scheduling-clock interrupt going, even if all 317 will be at least one CPU keeping the scheduling-clock interrupt
273 CPUs are otherwise idle. 318 going, even if all CPUs are otherwise idle.
319
320 Better handling of this situation is ongoing work.
321
322o Some process-handling operations still require the occasional
323 scheduling-clock tick. These operations include calculating CPU
324 load, maintaining sched average, computing CFS entity vruntime,
325 computing avenrun, and carrying out load balancing. They are
326 currently accommodated by scheduling-clock tick every second
327 or so. On-going work will eliminate the need even for these
328 infrequent scheduling-clock ticks.
diff --git a/Documentation/trace/events-nmi.txt b/Documentation/trace/events-nmi.txt
new file mode 100644
index 000000000000..c03c8c89f08d
--- /dev/null
+++ b/Documentation/trace/events-nmi.txt
@@ -0,0 +1,43 @@
1NMI Trace Events
2
3These events normally show up here:
4
5 /sys/kernel/debug/tracing/events/nmi
6
7--
8
9nmi_handler:
10
11You might want to use this tracepoint if you suspect that your
12NMI handlers are hogging large amounts of CPU time. The kernel
13will warn if it sees long-running handlers:
14
15 INFO: NMI handler took too long to run: 9.207 msecs
16
17and this tracepoint will allow you to drill down and get some
18more details.
19
20Let's say you suspect that perf_event_nmi_handler() is causing
21you some problems and you only want to trace that handler
22specifically. You need to find its address:
23
24 $ grep perf_event_nmi_handler /proc/kallsyms
25 ffffffff81625600 t perf_event_nmi_handler
26
27Let's also say you are only interested in when that function is
28really hogging a lot of CPU time, like a millisecond at a time.
29Note that the kernel's output is in milliseconds, but the input
30to the filter is in nanoseconds! You can filter on 'delta_ns':
31
32cd /sys/kernel/debug/tracing/events/nmi/nmi_handler
33echo 'handler==0xffffffff81625600 && delta_ns>1000000' > filter
34echo 1 > enable
35
36Your output would then look like:
37
38$ cat /sys/kernel/debug/tracing/trace_pipe
39<idle>-0 [000] d.h3 505.397558: nmi_handler: perf_event_nmi_handler() delta_ns: 3236765 handled: 1
40<idle>-0 [000] d.h3 505.805893: nmi_handler: perf_event_nmi_handler() delta_ns: 3174234 handled: 1
41<idle>-0 [000] d.h3 506.158206: nmi_handler: perf_event_nmi_handler() delta_ns: 3084642 handled: 1
42<idle>-0 [000] d.h3 506.334346: nmi_handler: perf_event_nmi_handler() delta_ns: 3080351 handled: 1
43
diff --git a/Documentation/usb/gadget_configfs.txt b/Documentation/usb/gadget_configfs.txt
new file mode 100644
index 000000000000..8ec2a67c39b7
--- /dev/null
+++ b/Documentation/usb/gadget_configfs.txt
@@ -0,0 +1,384 @@
1
2
3
4
5 Linux USB gadget configured through configfs
6
7
8 25th April 2013
9
10
11
12
13Overview
14========
15
16A USB Linux Gadget is a device which has a UDC (USB Device Controller) and can
17be connected to a USB Host to extend it with additional functions like a serial
18port or a mass storage capability.
19
20A gadget is seen by its host as a set of configurations, each of which contains
21a number of interfaces which, from the gadget's perspective, are known as
22functions, each function representing e.g. a serial connection or a SCSI disk.
23
24Linux provides a number of functions for gadgets to use.
25
26Creating a gadget means deciding what configurations there will be
27and which functions each configuration will provide.
28
29Configfs (please see Documentation/filesystems/configfs/*) lends itslef nicely
30for the purpose of telling the kernel about the above mentioned decision.
31This document is about how to do it.
32
33It also describes how configfs integration into gadget is designed.
34
35
36
37
38Requirements
39============
40
41In order for this to work configfs must be available, so CONFIGFS_FS must be
42'y' or 'm' in .config. As of this writing USB_LIBCOMPOSITE selects CONFIGFS_FS.
43
44
45
46
47Usage
48=====
49
50(The original post describing the first function
51made available through configfs can be seen here:
52http://www.spinics.net/lists/linux-usb/msg76388.html)
53
54$ modprobe libcomposite
55$ mount none $CONFIGFS_HOME -t configfs
56
57where CONFIGFS_HOME is the mount point for configfs
58
591. Creating the gadgets
60-----------------------
61
62For each gadget to be created its corresponding directory must be created:
63
64$ mkdir $CONFIGFS_HOME/usb_gadget/<gadget name>
65
66e.g.:
67
68$ mkdir $CONFIGFS_HOME/usb_gadget/g1
69
70...
71...
72...
73
74$ cd $CONFIGFS_HOME/usb_gadget/g1
75
76Each gadget needs to have its vendor id <VID> and product id <PID> specified:
77
78$ echo <VID> > idVendor
79$ echo <PID> > idProduct
80
81A gadget also needs its serial number, manufacturer and product strings.
82In order to have a place to store them, a strings subdirectory must be created
83for each language, e.g.:
84
85$ mkdir strings/0x409
86
87Then the strings can be specified:
88
89$ echo <serial number> > strings/0x409/serialnumber
90$ echo <manufacturer> > strings/0x409/manufacturer
91$ echo <product> > strings/0x409/product
92
932. Creating the configurations
94------------------------------
95
96Each gadget will consist of a number of configurations, their corresponding
97directories must be created:
98
99$ mkdir configs/<name>.<number>
100
101where <name> can be any string which is legal in a filesystem and the
102<numebr> is the configuration's number, e.g.:
103
104$ mkdir configs/c.1
105
106...
107...
108...
109
110Each configuration also needs its strings, so a subdirectory must be created
111for each language, e.g.:
112
113$ mkdir configs/c.1/strings/0x409
114
115Then the configuration string can be specified:
116
117$ echo <configuration> > configs/c.1/strings/0x409/configuration
118
119Some attributes can also be set for a configuration, e.g.:
120
121$ echo 120 > configs/c.1/MaxPower
122
1233. Creating the functions
124-------------------------
125
126The gadget will provide some functions, for each function its corresponding
127directory must be created:
128
129$ mkdir functions/<name>.<instance name>
130
131where <name> corresponds to one of allowed function names and instance name
132is an arbitrary string allowed in a filesystem, e.g.:
133
134$ mkdir functions/ncm.usb0 # usb_f_ncm.ko gets loaded with request_module()
135
136...
137...
138...
139
140Each function provides its specific set of attributes, with either read-only
141or read-write access. Where applicable they need to be written to as
142appropriate.
143Please refer to Documentation/ABI/*/configfs-usb-gadget* for more information.
144
1454. Associating the functions with their configurations
146------------------------------------------------------
147
148At this moment a number of gadgets is created, each of which has a number of
149configurations specified and a number of functions available. What remains
150is specifying which function is available in which configuration (the same
151function can be used in multiple configurations). This is achieved with
152creating symbolic links:
153
154$ ln -s functions/<name>.<instance name> configs/<name>.<number>
155
156e.g.:
157
158$ ln -s functions/ncm.usb0 configs/c.1
159
160...
161...
162...
163
1645. Enabling the gadget
165----------------------
166
167All the above steps serve the purpose of composing the gadget of
168configurations and functions.
169
170An example directory structure might look like this:
171
172.
173./strings
174./strings/0x409
175./strings/0x409/serialnumber
176./strings/0x409/product
177./strings/0x409/manufacturer
178./configs
179./configs/c.1
180./configs/c.1/ncm.usb0 -> ../../../../usb_gadget/g1/functions/ncm.usb0
181./configs/c.1/strings
182./configs/c.1/strings/0x409
183./configs/c.1/strings/0x409/configuration
184./configs/c.1/bmAttributes
185./configs/c.1/MaxPower
186./functions
187./functions/ncm.usb0
188./functions/ncm.usb0/ifname
189./functions/ncm.usb0/qmult
190./functions/ncm.usb0/host_addr
191./functions/ncm.usb0/dev_addr
192./UDC
193./bcdUSB
194./bcdDevice
195./idProduct
196./idVendor
197./bMaxPacketSize0
198./bDeviceProtocol
199./bDeviceSubClass
200./bDeviceClass
201
202
203Such a gadget must be finally enabled so that the USB host can enumerate it.
204In order to enable the gadget it must be bound to a UDC (USB Device Controller).
205
206$ echo <udc name> > UDC
207
208where <udc name> is one of those found in /sys/class/udc/*
209e.g.:
210
211$ echo s3c-hsotg > UDC
212
213
2146. Disabling the gadget
215-----------------------
216
217$ echo "" > UDC
218
2197. Cleaning up
220--------------
221
222Remove functions from configurations:
223
224$ rm configs/<config name>.<number>/<function>
225
226where <config name>.<number> specify the configuration and <function> is
227a symlink to a function being removed from the configuration, e.g.:
228
229$ rm configfs/c.1/ncm.usb0
230
231...
232...
233...
234
235Remove strings directories in configurations
236
237$ rmdir configs/<config name>.<number>/strings/<lang>
238
239e.g.:
240
241$ rmdir configs/c.1/strings/0x409
242
243...
244...
245...
246
247and remove the configurations
248
249$ rmdir configs/<config name>.<number>
250
251e.g.:
252
253rmdir configs/c.1
254
255...
256...
257...
258
259Remove functions (function modules are not unloaded, though)
260
261$ rmdir functions/<name>.<instance name>
262
263e.g.:
264
265$ rmdir functions/ncm.usb0
266
267...
268...
269...
270
271Remove strings directories in the gadget
272
273$ rmdir strings/<lang>
274
275e.g.:
276
277$ rmdir strings/0x409
278
279and finally remove the gadget:
280
281$ cd ..
282$ rmdir <gadget name>
283
284e.g.:
285
286$ rmdir g1
287
288
289
290
291Implementation design
292=====================
293
294Below the idea of how configfs works is presented.
295In configfs there are items and groups, both represented as directories.
296The difference between an item and a group is that a group can contain
297other groups. In the picture below only an item is shown.
298Both items and groups can have attributes, which are represented as files.
299The user can create and remove directories, but cannot remove files,
300which can be read-only or read-write, depending on what they represent.
301
302The filesystem part of configfs operates on config_items/groups and
303configfs_attributes which are generic and of the same type for all
304configured elements. However, they are embedded in usage-specific
305larger structures. In the picture below there is a "cs" which contains
306a config_item and an "sa" which contains a configfs_attribute.
307
308The filesystem view would be like this:
309
310./
311./cs (directory)
312 |
313 +--sa (file)
314 |
315 .
316 .
317 .
318
319Whenever a user reads/writes the "sa" file, a function is called
320which accepts a struct config_item and a struct configfs_attribute.
321In the said function the "cs" and "sa" are retrieved using the well
322known container_of technique and an appropriate sa's function (show or
323store) is called and passed the "cs" and a character buffer. The "show"
324is for displaying the file's contents (copy data from the cs to the
325buffer), while the "store" is for modifying the file's contents (copy data
326from the buffer to the cs), but it is up to the implementer of the
327two functions to decide what they actually do.
328
329typedef struct configured_structure cs;
330typedef struc specific_attribute sa;
331
332 sa
333 +----------------------------------+
334 cs | (*show)(cs *, buffer); |
335+-----------------+ | (*store)(cs *, buffer, length); |
336| | | |
337| +-------------+ | | +------------------+ |
338| | struct |-|----|------>|struct | |
339| | config_item | | | |configfs_attribute| |
340| +-------------+ | | +------------------+ |
341| | +----------------------------------+
342| data to be set | .
343| | .
344+-----------------+ .
345
346The file names are decided by the config item/group designer, while
347the directories in general can be named at will. A group can have
348a number of its default sub-groups created automatically.
349
350For more information on configfs please see
351Documentation/filesystems/configfs/*.
352
353The concepts described above translate to USB gadgets like this:
354
3551. A gadget has its config group, which has some attributes (idVendor,
356idProduct etc) and default sub-groups (configs, functions, strings).
357Writing to the attributes causes the information to be stored in
358appropriate locations. In the configs, functions and strings sub-groups
359a user can create their sub-groups to represent configurations, functions,
360and groups of strings in a given language.
361
3622. The user creates configurations and functions, in the configurations
363creates symbolic links to functions. This information is used when the
364gadget's UDC attribute is written to, which means binding the gadget
365to the UDC. The code in drivers/usb/gadget/configfs.c iterates over
366all configurations, and in each configuration it iterates over all
367functions and binds them. This way the whole gadget is bound.
368
3693. The file drivers/usb/gadget/configfs.c contains code for
370
371 - gadget's config_group
372 - gadget's default groups (configs, functions, strings)
373 - associating functions with configurations (symlinks)
374
3754. Each USB function naturally has its own view of what it wants
376configured, so config_groups for particular functions are defined
377in the functions implementation files drivers/usb/gadget/f_*.c.
378
3795. Funciton's code is written in such a way that it uses
380
381usb_get_function_instance(), which, in turn, calls request_module.
382So, provided that modprobe works, modules for particular functions
383are loaded automatically. Please note that the converse is not true:
384after a gadget is disabled and torn down, the modules remain loaded.
diff --git a/Documentation/usb/hotplug.txt b/Documentation/usb/hotplug.txt
index 4c945716a660..6424b130485c 100644
--- a/Documentation/usb/hotplug.txt
+++ b/Documentation/usb/hotplug.txt
@@ -33,9 +33,9 @@ you get the best hotplugging when you configure a highly modular system.
33 33
34KERNEL HOTPLUG HELPER (/sbin/hotplug) 34KERNEL HOTPLUG HELPER (/sbin/hotplug)
35 35
36When you compile with CONFIG_HOTPLUG, you get a new kernel parameter: 36There is a kernel parameter: /proc/sys/kernel/hotplug, which normally
37/proc/sys/kernel/hotplug, which normally holds the pathname "/sbin/hotplug". 37holds the pathname "/sbin/hotplug". That parameter names a program
38That parameter names a program which the kernel may invoke at various times. 38which the kernel may invoke at various times.
39 39
40The /sbin/hotplug program can be invoked by any subsystem as part of its 40The /sbin/hotplug program can be invoked by any subsystem as part of its
41reaction to a configuration change, from a thread in that subsystem. 41reaction to a configuration change, from a thread in that subsystem.
diff --git a/Documentation/virtual/uml/UserModeLinux-HOWTO.txt b/Documentation/virtual/uml/UserModeLinux-HOWTO.txt
index a5f8436753e7..f4099ca6b483 100644
--- a/Documentation/virtual/uml/UserModeLinux-HOWTO.txt
+++ b/Documentation/virtual/uml/UserModeLinux-HOWTO.txt
@@ -3127,7 +3127,7 @@
3127 at process_kern.c:156 3127 at process_kern.c:156
3128 #3 0x1006a052 in switch_to (prev=0x50072000, next=0x507e8000, last=0x50072000) 3128 #3 0x1006a052 in switch_to (prev=0x50072000, next=0x507e8000, last=0x50072000)
3129 at process_kern.c:161 3129 at process_kern.c:161
3130 #4 0x10001d12 in schedule () at sched.c:777 3130 #4 0x10001d12 in schedule () at core.c:777
3131 #5 0x1006a744 in __down (sem=0x507d241c) at semaphore.c:71 3131 #5 0x1006a744 in __down (sem=0x507d241c) at semaphore.c:71
3132 #6 0x1006aa10 in __down_failed () at semaphore.c:157 3132 #6 0x1006aa10 in __down_failed () at semaphore.c:157
3133 #7 0x1006c5d8 in segv_handler (sc=0x5006e940) at trap_user.c:174 3133 #7 0x1006c5d8 in segv_handler (sc=0x5006e940) at trap_user.c:174
@@ -3191,7 +3191,7 @@
3191 at process_kern.c:161 3191 at process_kern.c:161
3192 161 _switch_to(prev, next); 3192 161 _switch_to(prev, next);
3193 (gdb) 3193 (gdb)
3194 #4 0x10001d12 in schedule () at sched.c:777 3194 #4 0x10001d12 in schedule () at core.c:777
3195 777 switch_to(prev, next, prev); 3195 777 switch_to(prev, next, prev);
3196 (gdb) 3196 (gdb)
3197 #5 0x1006a744 in __down (sem=0x507d241c) at semaphore.c:71 3197 #5 0x1006a744 in __down (sem=0x507d241c) at semaphore.c:71
diff --git a/Documentation/w1/w1.generic b/Documentation/w1/w1.generic
index 212f4ac31c01..a31c5a242973 100644
--- a/Documentation/w1/w1.generic
+++ b/Documentation/w1/w1.generic
@@ -25,8 +25,8 @@ When a w1 master driver registers with the w1 subsystem, the following occurs:
25 - sysfs entries for that w1 master are created 25 - sysfs entries for that w1 master are created
26 - the w1 bus is periodically searched for new slave devices 26 - the w1 bus is periodically searched for new slave devices
27 27
28When a device is found on the bus, w1 core checks if driver for its family is 28When a device is found on the bus, w1 core tries to load the driver for its family
29loaded. If so, the family driver is attached to the slave. 29and check if it is loaded. If so, the family driver is attached to the slave.
30If there is no driver for the family, default one is assigned, which allows to perform 30If there is no driver for the family, default one is assigned, which allows to perform
31almost any kind of operations. Each logical operation is a transaction 31almost any kind of operations. Each logical operation is a transaction
32in nature, which can contain several (two or one) low-level operations. 32in nature, which can contain several (two or one) low-level operations.
diff --git a/Documentation/ww-mutex-design.txt b/Documentation/ww-mutex-design.txt
new file mode 100644
index 000000000000..8a112dc304c3
--- /dev/null
+++ b/Documentation/ww-mutex-design.txt
@@ -0,0 +1,344 @@
1Wait/Wound Deadlock-Proof Mutex Design
2======================================
3
4Please read mutex-design.txt first, as it applies to wait/wound mutexes too.
5
6Motivation for WW-Mutexes
7-------------------------
8
9GPU's do operations that commonly involve many buffers. Those buffers
10can be shared across contexts/processes, exist in different memory
11domains (for example VRAM vs system memory), and so on. And with
12PRIME / dmabuf, they can even be shared across devices. So there are
13a handful of situations where the driver needs to wait for buffers to
14become ready. If you think about this in terms of waiting on a buffer
15mutex for it to become available, this presents a problem because
16there is no way to guarantee that buffers appear in a execbuf/batch in
17the same order in all contexts. That is directly under control of
18userspace, and a result of the sequence of GL calls that an application
19makes. Which results in the potential for deadlock. The problem gets
20more complex when you consider that the kernel may need to migrate the
21buffer(s) into VRAM before the GPU operates on the buffer(s), which
22may in turn require evicting some other buffers (and you don't want to
23evict other buffers which are already queued up to the GPU), but for a
24simplified understanding of the problem you can ignore this.
25
26The algorithm that the TTM graphics subsystem came up with for dealing with
27this problem is quite simple. For each group of buffers (execbuf) that need
28to be locked, the caller would be assigned a unique reservation id/ticket,
29from a global counter. In case of deadlock while locking all the buffers
30associated with a execbuf, the one with the lowest reservation ticket (i.e.
31the oldest task) wins, and the one with the higher reservation id (i.e. the
32younger task) unlocks all of the buffers that it has already locked, and then
33tries again.
34
35In the RDBMS literature this deadlock handling approach is called wait/wound:
36The older tasks waits until it can acquire the contended lock. The younger tasks
37needs to back off and drop all the locks it is currently holding, i.e. the
38younger task is wounded.
39
40Concepts
41--------
42
43Compared to normal mutexes two additional concepts/objects show up in the lock
44interface for w/w mutexes:
45
46Acquire context: To ensure eventual forward progress it is important the a task
47trying to acquire locks doesn't grab a new reservation id, but keeps the one it
48acquired when starting the lock acquisition. This ticket is stored in the
49acquire context. Furthermore the acquire context keeps track of debugging state
50to catch w/w mutex interface abuse.
51
52W/w class: In contrast to normal mutexes the lock class needs to be explicit for
53w/w mutexes, since it is required to initialize the acquire context.
54
55Furthermore there are three different class of w/w lock acquire functions:
56
57* Normal lock acquisition with a context, using ww_mutex_lock.
58
59* Slowpath lock acquisition on the contending lock, used by the wounded task
60 after having dropped all already acquired locks. These functions have the
61 _slow postfix.
62
63 From a simple semantics point-of-view the _slow functions are not strictly
64 required, since simply calling the normal ww_mutex_lock functions on the
65 contending lock (after having dropped all other already acquired locks) will
66 work correctly. After all if no other ww mutex has been acquired yet there's
67 no deadlock potential and hence the ww_mutex_lock call will block and not
68 prematurely return -EDEADLK. The advantage of the _slow functions is in
69 interface safety:
70 - ww_mutex_lock has a __must_check int return type, whereas ww_mutex_lock_slow
71 has a void return type. Note that since ww mutex code needs loops/retries
72 anyway the __must_check doesn't result in spurious warnings, even though the
73 very first lock operation can never fail.
74 - When full debugging is enabled ww_mutex_lock_slow checks that all acquired
75 ww mutex have been released (preventing deadlocks) and makes sure that we
76 block on the contending lock (preventing spinning through the -EDEADLK
77 slowpath until the contended lock can be acquired).
78
79* Functions to only acquire a single w/w mutex, which results in the exact same
80 semantics as a normal mutex. This is done by calling ww_mutex_lock with a NULL
81 context.
82
83 Again this is not strictly required. But often you only want to acquire a
84 single lock in which case it's pointless to set up an acquire context (and so
85 better to avoid grabbing a deadlock avoidance ticket).
86
87Of course, all the usual variants for handling wake-ups due to signals are also
88provided.
89
90Usage
91-----
92
93Three different ways to acquire locks within the same w/w class. Common
94definitions for methods #1 and #2:
95
96static DEFINE_WW_CLASS(ww_class);
97
98struct obj {
99 struct ww_mutex lock;
100 /* obj data */
101};
102
103struct obj_entry {
104 struct list_head head;
105 struct obj *obj;
106};
107
108Method 1, using a list in execbuf->buffers that's not allowed to be reordered.
109This is useful if a list of required objects is already tracked somewhere.
110Furthermore the lock helper can use propagate the -EALREADY return code back to
111the caller as a signal that an object is twice on the list. This is useful if
112the list is constructed from userspace input and the ABI requires userspace to
113not have duplicate entries (e.g. for a gpu commandbuffer submission ioctl).
114
115int lock_objs(struct list_head *list, struct ww_acquire_ctx *ctx)
116{
117 struct obj *res_obj = NULL;
118 struct obj_entry *contended_entry = NULL;
119 struct obj_entry *entry;
120
121 ww_acquire_init(ctx, &ww_class);
122
123retry:
124 list_for_each_entry (entry, list, head) {
125 if (entry->obj == res_obj) {
126 res_obj = NULL;
127 continue;
128 }
129 ret = ww_mutex_lock(&entry->obj->lock, ctx);
130 if (ret < 0) {
131 contended_entry = entry;
132 goto err;
133 }
134 }
135
136 ww_acquire_done(ctx);
137 return 0;
138
139err:
140 list_for_each_entry_continue_reverse (entry, list, head)
141 ww_mutex_unlock(&entry->obj->lock);
142
143 if (res_obj)
144 ww_mutex_unlock(&res_obj->lock);
145
146 if (ret == -EDEADLK) {
147 /* we lost out in a seqno race, lock and retry.. */
148 ww_mutex_lock_slow(&contended_entry->obj->lock, ctx);
149 res_obj = contended_entry->obj;
150 goto retry;
151 }
152 ww_acquire_fini(ctx);
153
154 return ret;
155}
156
157Method 2, using a list in execbuf->buffers that can be reordered. Same semantics
158of duplicate entry detection using -EALREADY as method 1 above. But the
159list-reordering allows for a bit more idiomatic code.
160
161int lock_objs(struct list_head *list, struct ww_acquire_ctx *ctx)
162{
163 struct obj_entry *entry, *entry2;
164
165 ww_acquire_init(ctx, &ww_class);
166
167 list_for_each_entry (entry, list, head) {
168 ret = ww_mutex_lock(&entry->obj->lock, ctx);
169 if (ret < 0) {
170 entry2 = entry;
171
172 list_for_each_entry_continue_reverse (entry2, list, head)
173 ww_mutex_unlock(&entry2->obj->lock);
174
175 if (ret != -EDEADLK) {
176 ww_acquire_fini(ctx);
177 return ret;
178 }
179
180 /* we lost out in a seqno race, lock and retry.. */
181 ww_mutex_lock_slow(&entry->obj->lock, ctx);
182
183 /*
184 * Move buf to head of the list, this will point
185 * buf->next to the first unlocked entry,
186 * restarting the for loop.
187 */
188 list_del(&entry->head);
189 list_add(&entry->head, list);
190 }
191 }
192
193 ww_acquire_done(ctx);
194 return 0;
195}
196
197Unlocking works the same way for both methods #1 and #2:
198
199void unlock_objs(struct list_head *list, struct ww_acquire_ctx *ctx)
200{
201 struct obj_entry *entry;
202
203 list_for_each_entry (entry, list, head)
204 ww_mutex_unlock(&entry->obj->lock);
205
206 ww_acquire_fini(ctx);
207}
208
209Method 3 is useful if the list of objects is constructed ad-hoc and not upfront,
210e.g. when adjusting edges in a graph where each node has its own ww_mutex lock,
211and edges can only be changed when holding the locks of all involved nodes. w/w
212mutexes are a natural fit for such a case for two reasons:
213- They can handle lock-acquisition in any order which allows us to start walking
214 a graph from a starting point and then iteratively discovering new edges and
215 locking down the nodes those edges connect to.
216- Due to the -EALREADY return code signalling that a given objects is already
217 held there's no need for additional book-keeping to break cycles in the graph
218 or keep track off which looks are already held (when using more than one node
219 as a starting point).
220
221Note that this approach differs in two important ways from the above methods:
222- Since the list of objects is dynamically constructed (and might very well be
223 different when retrying due to hitting the -EDEADLK wound condition) there's
224 no need to keep any object on a persistent list when it's not locked. We can
225 therefore move the list_head into the object itself.
226- On the other hand the dynamic object list construction also means that the -EALREADY return
227 code can't be propagated.
228
229Note also that methods #1 and #2 and method #3 can be combined, e.g. to first lock a
230list of starting nodes (passed in from userspace) using one of the above
231methods. And then lock any additional objects affected by the operations using
232method #3 below. The backoff/retry procedure will be a bit more involved, since
233when the dynamic locking step hits -EDEADLK we also need to unlock all the
234objects acquired with the fixed list. But the w/w mutex debug checks will catch
235any interface misuse for these cases.
236
237Also, method 3 can't fail the lock acquisition step since it doesn't return
238-EALREADY. Of course this would be different when using the _interruptible
239variants, but that's outside of the scope of these examples here.
240
241struct obj {
242 struct ww_mutex ww_mutex;
243 struct list_head locked_list;
244};
245
246static DEFINE_WW_CLASS(ww_class);
247
248void __unlock_objs(struct list_head *list)
249{
250 struct obj *entry, *temp;
251
252 list_for_each_entry_safe (entry, temp, list, locked_list) {
253 /* need to do that before unlocking, since only the current lock holder is
254 allowed to use object */
255 list_del(&entry->locked_list);
256 ww_mutex_unlock(entry->ww_mutex)
257 }
258}
259
260void lock_objs(struct list_head *list, struct ww_acquire_ctx *ctx)
261{
262 struct obj *obj;
263
264 ww_acquire_init(ctx, &ww_class);
265
266retry:
267 /* re-init loop start state */
268 loop {
269 /* magic code which walks over a graph and decides which objects
270 * to lock */
271
272 ret = ww_mutex_lock(obj->ww_mutex, ctx);
273 if (ret == -EALREADY) {
274 /* we have that one already, get to the next object */
275 continue;
276 }
277 if (ret == -EDEADLK) {
278 __unlock_objs(list);
279
280 ww_mutex_lock_slow(obj, ctx);
281 list_add(&entry->locked_list, list);
282 goto retry;
283 }
284
285 /* locked a new object, add it to the list */
286 list_add_tail(&entry->locked_list, list);
287 }
288
289 ww_acquire_done(ctx);
290 return 0;
291}
292
293void unlock_objs(struct list_head *list, struct ww_acquire_ctx *ctx)
294{
295 __unlock_objs(list);
296 ww_acquire_fini(ctx);
297}
298
299Method 4: Only lock one single objects. In that case deadlock detection and
300prevention is obviously overkill, since with grabbing just one lock you can't
301produce a deadlock within just one class. To simplify this case the w/w mutex
302api can be used with a NULL context.
303
304Implementation Details
305----------------------
306
307Design:
308 ww_mutex currently encapsulates a struct mutex, this means no extra overhead for
309 normal mutex locks, which are far more common. As such there is only a small
310 increase in code size if wait/wound mutexes are not used.
311
312 In general, not much contention is expected. The locks are typically used to
313 serialize access to resources for devices. The only way to make wakeups
314 smarter would be at the cost of adding a field to struct mutex_waiter. This
315 would add overhead to all cases where normal mutexes are used, and
316 ww_mutexes are generally less performance sensitive.
317
318Lockdep:
319 Special care has been taken to warn for as many cases of api abuse
320 as possible. Some common api abuses will be caught with
321 CONFIG_DEBUG_MUTEXES, but CONFIG_PROVE_LOCKING is recommended.
322
323 Some of the errors which will be warned about:
324 - Forgetting to call ww_acquire_fini or ww_acquire_init.
325 - Attempting to lock more mutexes after ww_acquire_done.
326 - Attempting to lock the wrong mutex after -EDEADLK and
327 unlocking all mutexes.
328 - Attempting to lock the right mutex after -EDEADLK,
329 before unlocking all mutexes.
330
331 - Calling ww_mutex_lock_slow before -EDEADLK was returned.
332
333 - Unlocking mutexes with the wrong unlock function.
334 - Calling one of the ww_acquire_* twice on the same context.
335 - Using a different ww_class for the mutex than for the ww_acquire_ctx.
336 - Normal lockdep errors that can result in deadlocks.
337
338 Some of the lockdep errors that can result in deadlocks:
339 - Calling ww_acquire_init to initialize a second ww_acquire_ctx before
340 having called ww_acquire_fini on the first.
341 - 'normal' deadlocks that can occur.
342
343FIXME: Update this section once we have the TASK_DEADLOCK task state flag magic
344implemented.
diff --git a/Documentation/x86/early-microcode.txt b/Documentation/x86/early-microcode.txt
index 4aaf0dfb0cb8..d62bea6796da 100644
--- a/Documentation/x86/early-microcode.txt
+++ b/Documentation/x86/early-microcode.txt
@@ -11,7 +11,8 @@ file and loaded to CPUs during boot time.
11The format of the combined initrd image is microcode in cpio format followed by 11The format of the combined initrd image is microcode in cpio format followed by
12the initrd image (maybe compressed). Kernel parses the combined initrd image 12the initrd image (maybe compressed). Kernel parses the combined initrd image
13during boot time. The microcode file in cpio name space is: 13during boot time. The microcode file in cpio name space is:
14kernel/x86/microcode/GenuineIntel.bin 14on Intel: kernel/x86/microcode/GenuineIntel.bin
15on AMD : kernel/x86/microcode/AuthenticAMD.bin
15 16
16During BSP boot (before SMP starts), if the kernel finds the microcode file in 17During BSP boot (before SMP starts), if the kernel finds the microcode file in
17the initrd file, it parses the microcode and saves matching microcode in memory. 18the initrd file, it parses the microcode and saves matching microcode in memory.
@@ -34,10 +35,8 @@ original initrd image /boot/initrd-3.5.0.img.
34 35
35mkdir initrd 36mkdir initrd
36cd initrd 37cd initrd
37mkdir kernel 38mkdir -p kernel/x86/microcode
38mkdir kernel/x86 39cp ../microcode.bin kernel/x86/microcode/GenuineIntel.bin (or AuthenticAMD.bin)
39mkdir kernel/x86/microcode 40find . | cpio -o -H newc >../ucode.cpio
40cp ../microcode.bin kernel/x86/microcode/GenuineIntel.bin
41find .|cpio -oc >../ucode.cpio
42cd .. 41cd ..
43cat ucode.cpio /boot/initrd-3.5.0.img >/boot/initrd-3.5.0.ucode.img 42cat ucode.cpio /boot/initrd-3.5.0.img >/boot/initrd-3.5.0.ucode.img