diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-12-05 14:44:30 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-12-05 14:44:30 -0800 |
commit | 867da837ae29fc9207a5f49781196679eda10aed (patch) | |
tree | 0d9c309417c35ca542b6bc6c95891fc0539d5726 | |
parent | 75612d3929a4c52a5c39126b427865d6e583dff9 (diff) | |
download | ltsi-kernel-867da837ae29fc9207a5f49781196679eda10aed.tar.gz |
refresh uio patches
6 files changed, 22 insertions, 64 deletions
diff --git a/patches.uio/drivers-uio-add-new-uio-device-for-dynamic-memory-allocation.patch b/patches.uio/drivers-uio-add-new-uio-device-for-dynamic-memory-allocation.patch index 1fd4f908d6f2a0..c88da6f203d2f2 100644 --- a/patches.uio/drivers-uio-add-new-uio-device-for-dynamic-memory-allocation.patch +++ b/patches.uio/drivers-uio-add-new-uio-device-for-dynamic-memory-allocation.patch @@ -25,16 +25,14 @@ DMA_ERROR_CODE. Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> --- - drivers/uio/Kconfig | 16 ++ - drivers/uio/Makefile | 1 + - drivers/uio/uio_dmem_genirq.c | 354 +++++++++++++++++++++++++ - include/linux/platform_data/uio_dmem_genirq.h | 26 ++ - 4 files changed, 397 insertions(+), 0 deletions(-) + drivers/uio/Kconfig | 16 + + drivers/uio/Makefile | 1 + drivers/uio/uio_dmem_genirq.c | 354 ++++++++++++++++++++++++++ + include/linux/platform_data/uio_dmem_genirq.h | 26 + + 4 files changed, 397 insertions(+) create mode 100644 drivers/uio/uio_dmem_genirq.c create mode 100644 include/linux/platform_data/uio_dmem_genirq.h -diff --git a/drivers/uio/Kconfig b/drivers/uio/Kconfig -index 6f3ea9b..82e2b89 100644 --- a/drivers/uio/Kconfig +++ b/drivers/uio/Kconfig @@ -44,6 +44,22 @@ config UIO_PDRV_GENIRQ @@ -60,8 +58,6 @@ index 6f3ea9b..82e2b89 100644 config UIO_AEC tristate "AEC video timestamp device" depends on PCI -diff --git a/drivers/uio/Makefile b/drivers/uio/Makefile -index d4dd9a5..b354c53 100644 --- a/drivers/uio/Makefile +++ b/drivers/uio/Makefile @@ -2,6 +2,7 @@ obj-$(CONFIG_UIO) += uio.o @@ -72,9 +68,6 @@ index d4dd9a5..b354c53 100644 obj-$(CONFIG_UIO_AEC) += uio_aec.o obj-$(CONFIG_UIO_SERCOS3) += uio_sercos3.o obj-$(CONFIG_UIO_PCI_GENERIC) += uio_pci_generic.o -diff --git a/drivers/uio/uio_dmem_genirq.c b/drivers/uio/uio_dmem_genirq.c -new file mode 100644 -index 0000000..4d4dd00 --- /dev/null +++ b/drivers/uio/uio_dmem_genirq.c @@ -0,0 +1,354 @@ @@ -432,9 +425,6 @@ index 0000000..4d4dd00 +MODULE_DESCRIPTION("Userspace I/O platform driver with dynamic memory."); +MODULE_LICENSE("GPL v2"); +MODULE_ALIAS("platform:" DRIVER_NAME); -diff --git a/include/linux/platform_data/uio_dmem_genirq.h b/include/linux/platform_data/uio_dmem_genirq.h -new file mode 100644 -index 0000000..973c1bb --- /dev/null +++ b/include/linux/platform_data/uio_dmem_genirq.h @@ -0,0 +1,26 @@ @@ -464,6 +454,3 @@ index 0000000..973c1bb + unsigned int num_dynamic_regions; +}; +#endif /* _UIO_DMEM_GENIRQ_H */ --- -1.7.5.4 - diff --git a/patches.uio/drivers-uio-add-uio_dmem_genirq-description-to-uio-documentation.patch b/patches.uio/drivers-uio-add-uio_dmem_genirq-description-to-uio-documentation.patch index 1b1bdc8bf0f20f..3c474aaa5f8e66 100644 --- a/patches.uio/drivers-uio-add-uio_dmem_genirq-description-to-uio-documentation.patch +++ b/patches.uio/drivers-uio-add-uio_dmem_genirq-description-to-uio-documentation.patch @@ -9,14 +9,12 @@ Message-ID: <1353551213-17996-3-git-send-email-dhobsong@igel.co.jp> Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> --- - Documentation/DocBook/uio-howto.tmpl | 56 ++++++++++++++++++++++++++++++++++ - 1 files changed, 56 insertions(+), 0 deletions(-) + Documentation/DocBook/uio-howto.tmpl | 56 +++++++++++++++++++++++++++++++++++ + 1 file changed, 56 insertions(+) -diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl -index ac3d001..fdbf86f 100644 --- a/Documentation/DocBook/uio-howto.tmpl +++ b/Documentation/DocBook/uio-howto.tmpl -@@ -719,6 +719,62 @@ framework to set up sysfs files for this region. Simply leave it alone. +@@ -719,6 +719,62 @@ framework to set up sysfs files for this </para> </sect1> @@ -79,6 +77,3 @@ index ac3d001..fdbf86f 100644 </chapter> <chapter id="userspace_driver" xreflabel="Writing a driver in user space"> --- -1.7.5.4 - diff --git a/patches.uio/drivers-uio-only-allocate-new-private-data-when-probing-device-tree-node.patch b/patches.uio/drivers-uio-only-allocate-new-private-data-when-probing-device-tree-node.patch index 754df8fdeefa03..ba171f51738470 100644 --- a/patches.uio/drivers-uio-only-allocate-new-private-data-when-probing-device-tree-node.patch +++ b/patches.uio/drivers-uio-only-allocate-new-private-data-when-probing-device-tree-node.patch @@ -19,11 +19,9 @@ Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> drivers/uio/uio_pdrv_genirq.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -diff --git a/drivers/uio/uio_dmem_genirq.c b/drivers/uio/uio_dmem_genirq.c -index bbdf925..252434c 100644 --- a/drivers/uio/uio_dmem_genirq.c +++ b/drivers/uio/uio_dmem_genirq.c -@@ -153,7 +153,7 @@ static int uio_dmem_genirq_probe(struct platform_device *pdev) +@@ -153,7 +153,7 @@ static int uio_dmem_genirq_probe(struct int ret = -EINVAL; int i; @@ -32,11 +30,9 @@ index bbdf925..252434c 100644 int irq; /* alloc uioinfo for one device */ -diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c -index b98371d..9c976cb 100644 --- a/drivers/uio/uio_pdrv_genirq.c +++ b/drivers/uio/uio_pdrv_genirq.c -@@ -102,7 +102,7 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev) +@@ -102,7 +102,7 @@ static int uio_pdrv_genirq_probe(struct int ret = -EINVAL; int i; @@ -45,6 +41,3 @@ index b98371d..9c976cb 100644 int irq; /* alloc uioinfo for one device */ --- -1.7.5.4 - diff --git a/patches.uio/drivers-uio_dmem_genirq-allow-partial-success-when-opening-device.patch b/patches.uio/drivers-uio_dmem_genirq-allow-partial-success-when-opening-device.patch index 278d9dc302b45a..bd53c57a656068 100644 --- a/patches.uio/drivers-uio_dmem_genirq-allow-partial-success-when-opening-device.patch +++ b/patches.uio/drivers-uio_dmem_genirq-allow-partial-success-when-opening-device.patch @@ -18,13 +18,11 @@ successfully allocated regions before dying. Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> --- drivers/uio/uio_dmem_genirq.c | 12 ++++++------ - 1 files changed, 6 insertions(+), 6 deletions(-) + 1 file changed, 6 insertions(+), 6 deletions(-) -diff --git a/drivers/uio/uio_dmem_genirq.c b/drivers/uio/uio_dmem_genirq.c -index 7be8d04..bbdf925 100644 --- a/drivers/uio/uio_dmem_genirq.c +++ b/drivers/uio/uio_dmem_genirq.c -@@ -62,8 +62,6 @@ static int uio_dmem_genirq_open(struct uio_info *info, struct inode *inode) +@@ -62,8 +62,6 @@ static int uio_dmem_genirq_open(struct u (dma_addr_t *)&uiomem->addr, GFP_KERNEL); if (!addr) { uiomem->addr = DMEM_MAP_ERROR; @@ -33,7 +31,7 @@ index 7be8d04..bbdf925 100644 } priv->dmem_region_vaddr[dmem_region++] = addr; ++uiomem; -@@ -93,11 +91,13 @@ static int uio_dmem_genirq_release(struct uio_info *info, struct inode *inode) +@@ -93,11 +91,13 @@ static int uio_dmem_genirq_release(struc while (!priv->refcnt && uiomem < &priv->uioinfo->mem[MAX_UIO_MAPS]) { if (!uiomem->size) break; @@ -51,6 +49,3 @@ index 7be8d04..bbdf925 100644 ++uiomem; } --- -1.7.5.4 - diff --git a/patches.uio/drivers-uio_dmem_genirq-don-t-mix-address-spaces-for-dynamic-region-vaddr.patch b/patches.uio/drivers-uio_dmem_genirq-don-t-mix-address-spaces-for-dynamic-region-vaddr.patch index 45683161a11d01..2470da5f204e49 100644 --- a/patches.uio/drivers-uio_dmem_genirq-don-t-mix-address-spaces-for-dynamic-region-vaddr.patch +++ b/patches.uio/drivers-uio_dmem_genirq-don-t-mix-address-spaces-for-dynamic-region-vaddr.patch @@ -25,10 +25,8 @@ Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> --- drivers/uio/uio_dmem_genirq.c | 9 ++++++--- - 1 files changed, 6 insertions(+), 3 deletions(-) + 1 file changed, 6 insertions(+), 3 deletions(-) -diff --git a/drivers/uio/uio_dmem_genirq.c b/drivers/uio/uio_dmem_genirq.c -index 4d4dd00..d8bbe07 100644 --- a/drivers/uio/uio_dmem_genirq.c +++ b/drivers/uio/uio_dmem_genirq.c @@ -37,6 +37,7 @@ struct uio_dmem_genirq_platdata { @@ -39,7 +37,7 @@ index 4d4dd00..d8bbe07 100644 struct mutex alloc_lock; unsigned int refcnt; }; -@@ -46,6 +47,7 @@ static int uio_dmem_genirq_open(struct uio_info *info, struct inode *inode) +@@ -46,6 +47,7 @@ static int uio_dmem_genirq_open(struct u struct uio_dmem_genirq_platdata *priv = info->priv; struct uio_mem *uiomem; int ret = 0; @@ -47,7 +45,7 @@ index 4d4dd00..d8bbe07 100644 uiomem = &priv->uioinfo->mem[priv->dmem_region_start]; -@@ -61,8 +63,7 @@ static int uio_dmem_genirq_open(struct uio_info *info, struct inode *inode) +@@ -61,8 +63,7 @@ static int uio_dmem_genirq_open(struct u ret = -ENOMEM; break; } @@ -57,7 +55,7 @@ index 4d4dd00..d8bbe07 100644 ++uiomem; } priv->refcnt++; -@@ -77,6 +78,7 @@ static int uio_dmem_genirq_release(struct uio_info *info, struct inode *inode) +@@ -77,6 +78,7 @@ static int uio_dmem_genirq_release(struc { struct uio_dmem_genirq_platdata *priv = info->priv; struct uio_mem *uiomem; @@ -65,7 +63,7 @@ index 4d4dd00..d8bbe07 100644 /* Tell the Runtime PM code that the device has become idle */ pm_runtime_put_sync(&priv->pdev->dev); -@@ -91,7 +93,8 @@ static int uio_dmem_genirq_release(struct uio_info *info, struct inode *inode) +@@ -91,7 +93,8 @@ static int uio_dmem_genirq_release(struc break; dma_free_coherent(&priv->pdev->dev, uiomem->size, @@ -75,6 +73,3 @@ index 4d4dd00..d8bbe07 100644 uiomem->addr = DMA_ERROR_CODE; ++uiomem; } --- -1.7.5.4 - diff --git a/patches.uio/drivers-uio_dmem_genirq-don-t-use-dma_error_code-to-indicate-unmapped-regions.patch b/patches.uio/drivers-uio_dmem_genirq-don-t-use-dma_error_code-to-indicate-unmapped-regions.patch index 81b3e22bc4d932..7ddd974664946e 100644 --- a/patches.uio/drivers-uio_dmem_genirq-don-t-use-dma_error_code-to-indicate-unmapped-regions.patch +++ b/patches.uio/drivers-uio_dmem_genirq-don-t-use-dma_error_code-to-indicate-unmapped-regions.patch @@ -19,11 +19,9 @@ Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp> drivers/uio/uio_dmem_genirq.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) -diff --git a/Documentation/DocBook/uio-howto.tmpl b/Documentation/DocBook/uio-howto.tmpl -index fdbf86f..ddb05e9 100644 --- a/Documentation/DocBook/uio-howto.tmpl +++ b/Documentation/DocBook/uio-howto.tmpl -@@ -771,7 +771,7 @@ framework to set up sysfs files for this region. Simply leave it alone. +@@ -771,7 +771,7 @@ framework to set up sysfs files for this <varname>/sys/class/uio/uioX/maps/mapY/*</varname>. The dynmaic memory regions will be freed when the UIO device file is closed. When no processes are holding the device file open, the address @@ -32,8 +30,6 @@ index fdbf86f..ddb05e9 100644 </para> </sect1> -diff --git a/drivers/uio/uio_dmem_genirq.c b/drivers/uio/uio_dmem_genirq.c -index d8bbe07..7be8d04 100644 --- a/drivers/uio/uio_dmem_genirq.c +++ b/drivers/uio/uio_dmem_genirq.c @@ -29,6 +29,7 @@ @@ -44,7 +40,7 @@ index d8bbe07..7be8d04 100644 struct uio_dmem_genirq_platdata { struct uio_info *uioinfo; -@@ -60,6 +61,7 @@ static int uio_dmem_genirq_open(struct uio_info *info, struct inode *inode) +@@ -60,6 +61,7 @@ static int uio_dmem_genirq_open(struct u addr = dma_alloc_coherent(&priv->pdev->dev, uiomem->size, (dma_addr_t *)&uiomem->addr, GFP_KERNEL); if (!addr) { @@ -52,7 +48,7 @@ index d8bbe07..7be8d04 100644 ret = -ENOMEM; break; } -@@ -95,7 +97,7 @@ static int uio_dmem_genirq_release(struct uio_info *info, struct inode *inode) +@@ -95,7 +97,7 @@ static int uio_dmem_genirq_release(struc dma_free_coherent(&priv->pdev->dev, uiomem->size, priv->dmem_region_vaddr[dmem_region++], uiomem->addr); @@ -61,7 +57,7 @@ index d8bbe07..7be8d04 100644 ++uiomem; } -@@ -238,7 +240,7 @@ static int uio_dmem_genirq_probe(struct platform_device *pdev) +@@ -238,7 +240,7 @@ static int uio_dmem_genirq_probe(struct break; } uiomem->memtype = UIO_MEM_PHYS; @@ -70,6 +66,3 @@ index d8bbe07..7be8d04 100644 uiomem->size = pdata->dynamic_region_sizes[i]; ++uiomem; } --- -1.7.5.4 - |