summaryrefslogtreecommitdiff
path: root/Documentation/DocBook
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2012-03-14 04:49:34 (GMT)
committerEmil Medve <Emilian.Medve@Freescale.com>2013-04-01 20:01:25 (GMT)
commitbc902cf1a0351d9d6c43bc9bdd9548431240a385 (patch)
tree9a2a5929ae63bac412478be4ed1e1bb1df432406 /Documentation/DocBook
parentc781ee40b6efbcedf2b719fb746c3346ace5342f (diff)
downloadlinux-fsl-qoriq-bc902cf1a0351d9d6c43bc9bdd9548431240a385.tar.xz
uio: Allow drivers to override the pgprot for mmap()
For some devices, the default behavior of pgprot_noncached() is not appropriate for all of its mappable regions. This provides a means for the kernel side of the UIO driver to override the flags without having to implement its own full mmap callback. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Geoff Thorpe <geoff@geoffthorpe.net> Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r--Documentation/DocBook/uio-howto.tmpl12
1 files changed, 12 insertions, 0 deletions
diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl
index ddb05e9..e23f986 100644
--- a/Documentation/DocBook/uio-howto.tmpl
+++ b/Documentation/DocBook/uio-howto.tmpl
@@ -510,6 +510,18 @@ interrupts from userspace by writing to <filename>/dev/uioX</filename>,
you can implement this function. The parameter <varname>irq_on</varname>
will be 0 to disable interrupts and 1 to enable them.
</para></listitem>
+
+<listitem><para>
+<varname>pgprot_t (*set_pgprot)(struct uio_info *info, unsigned int mem_idx,
+pgprot_t prot)</varname>: Optional. If special flags are required when mapping
+certain hardware regions, then this callback can be used to specify those flags.
+The default flags are given by the host architecture's definition of
+<function>pgprot_noncached()</function> and are passed to the callback as the
+<varname>prot</varname> parameter, but the return value is what is used for the
+resulting mapping. Note that this callback is only used by the built in mapping
+logic (when the <function>mmap()</function> callback has not been set), and then
+only for UIO_MEM_PHYS regions.
+</para></listitem>
</itemizedlist>
<para>