summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* HID: hiddev: reallocate hiddev's minor numberJaejoong Kim2017-03-214-13/+15
| | | | | | | | | | | | | | | | | We need to store the minor number each drivers. In case of hidraw, the minor number is stored stores in struct hidraw. But hiddev's minor is located in struct hid_device. The hid-core driver announces a kernel message which driver is loaded when HID device connected, but hiddev's minor number is always zero. To proper display hiddev's minor number, we need to store the minor number asked from usb core and do some refactoring work (move from hiddev.c to hiddev.h) to access hiddev in hid-core. [jkosina@suse.cz: rebase on top of newer codebase] Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: cp2112: use proper hidraw name with minor numberJaejoong Kim2017-03-211-1/+3
| | | | | | | | | The cp2112 driver is working on hidraw not hiddev. So we need to use proper hidraw name with hidraw's minor number. Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* HID: remove initial reading of reports at connectBenjamin Tissoires2017-03-215-73/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It looks like a bunch of devices do not like to be polled for their reports at init time. When you look into the details, it seems that for those that are requiring the quirk HID_QUIRK_NO_INIT_REPORTS, the driver fails to retrieve part of the features/inputs while others (more generic) work. IMO, it should be acceptable to remove the need for the quirk in the general case. On the small amount of cases where we actually need to read the current values, the driver in charge (hid-mt or wacom) already retrieves the features manually. There are 2 cases where we might need to retrieve the reports at init: 1. hiddev devices with specific use-space tool 2. a device that would require the driver to fetch a specific feature/input at plug For case 2, I have seen this a few time on hid-multitouch. It is solved in hid-multitouch directly by fetching the feature. I hope it won't be too common and this can be solved on a per-case basis (crossing fingers). For case 1, we moved the implementation of HID_QUIRK_NO_INIT_REPORTS in hiddev. When somebody starts calling ioctls that needs an initial update, the hiddev device will fetch the initial state of the reports to mimic the current behavior. This adds a small amount of time during the first HIDIOCGUSAGE(S), but it should be acceptable in most cases. To keep the currently known broken devices, we have to keep around HID_QUIRK_NO_INIT_REPORTS, but the scope will only be for hiddev. Note that I don't think hidraw would be affected and I checked that the FF drivers that need to interact with the report fields are all using output reports, which are not initialized by usbhid_init_reports(). NO_INIT_INPUT_REPORTS is then replaced by HID_QUIRK_NO_INIT_REPORTS: there is no point keeping it for just one device. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Merge branch 'for-linus' of ↵Linus Torvalds2017-02-211-1/+2
|\ | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fix from Jiri Kosina: "Regression fix for HID_RMI-driven synaptics touchpads in !CONFIG_HID_RMI cases" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: rmi: fallback to generic/multitouch if hid-rmi is not built
| * HID: rmi: fallback to generic/multitouch if hid-rmi is not builtJiri Kosina2017-02-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 279967a65b32 ("HID: rmi: Handle all Synaptics touchpads using hid-rmi") unconditionally switches over handling of all Synaptics touchpads to hid-rmi (to make use of extended features of the HW); in case CONFIG_HID_RMI is disabled though this renders the touchpad unusable, as the HID_DEVICE(HID_BUS_ANY, HID_GROUP_RMI, HID_ANY_ID, HID_ANY_ID) match doesn't exist and generic/multitouch doesn't bind to it either (due to hid group mismatch). Fix this by switching over to hid-rmi only if it has been actually built. Fixes: 279967a65b32 ("HID: rmi: Handle all Synaptics touchpads using hid-rmi") Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Merge branch 'for-4.11' of ↵Linus Torvalds2017-02-2124-191/+612
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata updates from Tejun Heo: - Bartlomiej added pata_falcon - Christoph is trying to remove use of static 4k buf. It's still WIP - config cleanup around HAS_DMA - other fixes and driver-specific changes * 'for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (29 commits) ata: pata_of_platform: using of_property_read_u32() helper pata_atiixp: Don't use unconnected secondary port on SB600/SB700 libata-sff: Don't scan disabled ports when checking for legacy mode. pata_octeon_cf: remove unused local variables from octeon_cf_set_piomode() ahci: qoriq: added ls2088a platforms support ahci: qoriq: report error when ecc register address is missing in dts ahci: qoriq: added a condition to enable dma coherence Revert "libata: switch to dynamic allocation instead of ata_scsi_rbuf" ahci: imx: fix building without hwmon or thermal ata: add Atari Falcon PATA controller driver ata: pass queued command to ->sff_data_xfer method ata: allow subsystem to be used on m68k arch libata: switch to dynamic allocation instead of ata_scsi_rbuf libata: don't call ata_scsi_rbuf_fill for command without a response buffer libata: call ->scsi_done from ata_scsi_simulate libata: remove the done callback from ata_scsi_args libata: move struct ata_scsi_args to libata-scsi.c libata: avoid global response buffer in atapi_qc_complete libata-eh: Use switch() instead of sparse array for protocol strings ata: sata_mv: Convert to devm_ioremap_resource() ...
| * | ata: pata_of_platform: using of_property_read_u32() helperKefeng Wang2017-01-241-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using better of_property_read_u32() than generic of_get_property(). Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | pata_atiixp: Don't use unconnected secondary port on SB600/SB700Darren Stevens2017-01-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The SB600 and SB700 southbridge chips from ATI/AMD only have connections for the primary IDE port. As these chips have unique pci device ID's use these to mark the secondary port as 'dummy' Signed-off-by: Darren Stevens <darren@stevens-zone.net> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata-sff: Don't scan disabled ports when checking for legacy mode.Darren Stevens2017-01-231-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libata-sff.c checks for legacy mode by testing if both primary and secondary ports on a controller are in legacy mode and selects legacy if either one is. However on some south bridge chips (e.g AMD SB600/SB700) the secondary port is not wired, and when it is disabled by setting the disable bit in the PCI header it appears as a fixed legacy port. Prevent incorrect detection by not testing ports that are marked as 'dummy' tj: Addressed Sergei's review points. Other style edits. Signed-off-by: Darren Stevens <darren@stevens-zone.net> Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
| * | pata_octeon_cf: remove unused local variables from octeon_cf_set_piomode()Tejun Heo2017-01-231-8/+0
| | | | | | | | | | | | | | | | | | | | | @t1 and @t2i are calculated along with @t2 but never used. Drop them. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: David Binderman <dcb314@hotmail.com>
| * | ahci: qoriq: added ls2088a platforms supportTang Yuantian2017-01-201-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ls2088a is new introduced arm-based soc with sata support with following features: 1. Complies with the serial ATA 3.0 specification and the AHCI 1.3.1 specification 2. Contains a high-speed descriptor-based DMA controller 3. Supports the following: a. Speeds of 1.5 Gb/s (first-generation SATA), 3 Gb/s (second-generation SATA), and 6 Gb/s (third-generation SATA) b. FIS-based switching c. Native command queuing (NCQ) commands d. Port multiplier operation e. Asynchronous notification f. SATA BIST mode Signed-off-by: Tang Yuantian <yuantian.tang@nxp.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ahci: qoriq: report error when ecc register address is missing in dtsTang Yuantian2017-01-201-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For ls1021a, and armv8 chasis 2 socs, sata ecc must be disabled. If ecc register is not found in sata node in dts, report error. This is a chip erratum described as bellow: The Read DMA operations get early termination indication from the controller. This issue is observed as CRC error in the status registers. The issue is due to address collision at address 0 in the dual port memory. The read is a dummy read to flush out the header, but due to collision the controller logs the mbit error reported by the ECC check logic. This results in the early termination of the Read DMA operation by the controller. The issue happens to all the interface speeds(GEN1/2/3) for all the products. Workaround: Disable ECC feature on those platforms. Signed-off-by: Tang Yuantian <yuantian.tang@nxp.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ahci: qoriq: added a condition to enable dma coherenceTang Yuantian2017-01-201-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | Enable DMA coherence in SATA controller on condition that dma-coherent property exists in sata node in DTS. Signed-off-by: Tang Yuantian <yuantian.tang@nxp.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | Revert "libata: switch to dynamic allocation instead of ata_scsi_rbuf"Tejun Heo2017-01-181-36/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a234f7395c9301a5048cb2daa4c86f15c6f02de8. The commit tried to get rid of the shared global SCSI response buffer. Unfortunately, it added blocking allocation to atomic path. Revert it for now. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Christoph Hellwig <hch@lst.de>
| * | ahci: imx: fix building without hwmon or thermalArnd Bergmann2017-01-152-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CONFIG_HWMON is disabled, we now get a link failure: ERROR: "devm_hwmon_device_register_with_groups" [drivers/ata/ahci_imx.ko] undefined! drivers/ata/ahci_imx.o: In function `imx_ahci_probe': ahci_imx.c:(.text.imx_ahci_probe+0x304): undefined reference to `devm_thermal_zone_of_sensor_register' This makes the code calling into the hwmon subsystem compile-time conditional, and adds a Kconfig dependency to avoid the corner case of having HWMON=m and AHCI_IMX=y, by forcing AHCI_IMX=m in this case. The thermal subsystem already has a check in its header, but that also doesn't cover the THERMAL=m case, so we need a somewhat complex Kconfig expression to handle all cases. Fixes: 54643a83b41a ("ahci: imx: Add imx53 SATA temperature sensor support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: add Atari Falcon PATA controller driverBartlomiej Zolnierkiewicz2017-01-103-0/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Atari Falcon PATA controller driver. The major difference when compared to legacy IDE's falconide host driver is that we are using polled PIO mode and thus avoiding the need for STDMA locking magic altogether. Tested under ARAnyM emulator. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: pass queued command to ->sff_data_xfer methodBartlomiej Zolnierkiewicz2017-01-1011-47/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Atari Falcon PATA support we need to check the current command in its ->sff_data_xfer method. Update core code and all users accordingly. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: allow subsystem to be used on m68k archBartlomiej Zolnierkiewicz2017-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | When libata was merged m68k lacked IOMAP support. This has not been true for a long time now so allow subsystem to be used on m68k. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata: switch to dynamic allocation instead of ata_scsi_rbufChristoph Hellwig2017-01-101-86/+36
| | | | | | | | | | | | | | | | | | | | | | | | Note of the emulated commands in the pageout/pagein path, so just do a GFP_NOIO dynamic allocation. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata: don't call ata_scsi_rbuf_fill for command without a response bufferChristoph Hellwig2017-01-101-21/+1
| | | | | | | | | | | | | | | | | | | | | | | | No need to copy a zeroed buffer to the caller if the command is defined to not have a response in the SCSI spec. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata: call ->scsi_done from ata_scsi_simulateChristoph Hellwig2017-01-101-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | We always need to call ->scsi_done after we've finished emulating a command, so do it in a single place at the end of ata_scsi_simulate. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata: remove the done callback from ata_scsi_argsChristoph Hellwig2017-01-101-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | It's always the scsi_done callback, and we can get at that easily in the place where ->done is called. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata: move struct ata_scsi_args to libata-scsi.cChristoph Hellwig2017-01-102-7/+7
| | | | | | | | | | | | | | | | | | | | | It's only used in libata-scsi.c, so move it closer to the users. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata: avoid global response buffer in atapi_qc_completeChristoph Hellwig2017-01-101-24/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We only need to look at 4 bytes of the inquiry response for ATAPI devices. Instead of using the global ata_scsi_rbuf just use a a stack buffer. Also factor the fixup into it's own little helper function to make it more readable. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata-eh: Use switch() instead of sparse array for protocol stringsGeert Uytterhoeven2017-01-091-13/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the sparse 256-pointer array for looking up protocol strings by a switch() statement to reduce kernel size. According to bloat-o-meter, this saves 910 bytes on m68k (32-bit), and 1892 bytes on arm64 (64-bit). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: sata_mv: Convert to devm_ioremap_resource()Andy Shevchenko2017-01-091-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert to devm_ioremap_resource() which provides more consistent error handling. Note that devm_ioremap_resource() provides its own error messages. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | Merge branch 'for-4.10-fixes' into for-4.11Tejun Heo2017-01-092-2/+7
| |\ \
| * | | ata: sata_mv: fix module license specificationUwe Kleine-König2017-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The header allows GPL v2 only, so declare "GPL v2" for MODULE_LICENSE Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | | ahci: imx: Add imx53 SATA temperature sensor supportCsaba Kertesz2017-01-061-0/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a hwmon entry to get the temperature from the die of imx53 SATA. The original patch was made by Richard Zhu for kernel 2.6.x: ENGR00134041-MX53-Add-the-SATA-AHCI-temperature-monitor.patch Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | | ata: ahci_xgene: free structure returned by acpi_get_object_info()Michał Kępień2017-01-061-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | acpi_get_object_info() allocates the returned structure, which the caller has to free when the call succeeds. Free it when appropriate. Fixes: c9802a4be661 ("ata: ahci_xgene: Add AHCI Support for 2nd HW version of APM X-Gene SoC AHCI SATA Host controller.") Signed-off-by: Michał Kępień <kernel@kempniu.pl> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | | libata: Protect DMA core code by #ifdef CONFIG_HAS_DMAGeert Uytterhoeven2017-01-061-26/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If NO_DMA=y: ERROR: "bad_dma_ops" [drivers/ata/libata.ko] undefined! To fix this, protect the DMA code by #ifdef CONFIG_HAS_DMA, and provide dummies of ata_sg_clean() and ata_sg_setup() for the !CONFIG_HAS_DMA case. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | | libata: Make ata_sg_clean() static againGeert Uytterhoeven2017-01-062-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 70e6ad0c6d1e6cb9 ("[PATCH] libata: prepare ata_sg_clean() for invocation from EH") made ata_sg_clean() global, but no user outside libata-core.c has ever materialized. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | | ata: AHCI and other non-SFF native drivers should depend on HAS_DMAGeert Uytterhoeven2017-01-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If NO_DMA=y: ERROR: "bad_dma_ops" [drivers/ata/libahci_platform.ko] undefined! ERROR: "dmam_alloc_coherent" [drivers/ata/libahci.ko] undefined! Add a block dependency on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | | ata: ATA_BMDMA should depend on HAS_DMAGeert Uytterhoeven2017-01-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If NO_DMA=y: ERROR: "dmam_alloc_coherent" [drivers/ata/libata.ko] undefined! Add a dependency on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | | ata: SATA_HIGHBANK should depend on HAS_DMAGeert Uytterhoeven2017-01-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If NO_DMA=y: ERROR: "bad_dma_ops" [drivers/ata/sata_highbank.ko] undefined! Add a dependency on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | | ata: SATA_MV should depend on HAS_DMAGeert Uytterhoeven2017-01-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If NO_DMA=y: ERROR: "dma_pool_alloc" [drivers/ata/sata_mv.ko] undefined! ERROR: "dmam_pool_create" [drivers/ata/sata_mv.ko] undefined! ERROR: "dma_pool_free" [drivers/ata/sata_mv.ko] undefined! Add a dependency on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Tejun Heo <tj@kernel.org>
* | | | Merge tag 'dmaengine-4.11-rc1' of git://git.infradead.org/users/vkoul/slave-dmaLinus Torvalds2017-02-2119-131/+338
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull dmaengine updates from Vinod Koul: "This time we fairly boring and bit small update. - Support for Intel iDMA 32-bit hardware - deprecate broken support for channel switching in async_tx - bunch of updates on stm32-dma - Cyclic support for zx dma and making in generic zx dma driver - Small updates to bunch of other drivers" * tag 'dmaengine-4.11-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (29 commits) async_tx: deprecate broken support for channel switching dmaengine: rcar-dmac: Widen DMA mask to 40 bits dmaengine: sun6i: allow build on ARM64 platforms (sun50i) dmaengine: Provide a wrapper for memcpy operations dmaengine: zx: fix build warning dmaengine: dw: we do support Merrifield SoC in PCI mode dmaengine: dw: add support of iDMA 32-bit hardware dmaengine: dw: introduce register mappings for iDMA 32-bit dmaengine: dw: introduce block2bytes() and bytes2block() dmaengine: dw: extract dwc_chan_pause() for future use dmaengine: dw: replace convert_burst() with one liner dmaengine: dw: register IRQ and DMA pool with instance ID dmaengine: dw: Fix data corruption in large device to memory transfers dmaengine: ste_dma40: indicate granularity on channels dmaengine: ste_dma40: indicate directions on channels dmaengine: stm32-dma: Add error messages if xlate fails dmaengine: dw: pci: remove LPE Audio DMA ID dmaengine: stm32-dma: Add max_burst support dmaengine: stm32-dma: Add synchronization support dmaengine: stm32-dma: Fix residue computation issue in cyclic mode ...
| * \ \ \ Merge branch 'topic/zx' into for-linusVinod Koul2017-02-213-5/+7
| |\ \ \ \
| | * | | | dmaengine: zx: fix build warningJun Nie2017-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix build warning that related to PAGE_SIZE. The maximum DMA length has nothing to do with PAGE_SIZE, just use a fix number for the definition. drivers/dma/zx_dma.c: In function 'zx_dma_prep_memcpy': drivers/dma/zx_dma.c:523:8: warning: division by zero [-Wdiv-by-zero] drivers/dma/zx_dma.c: In function 'zx_dma_prep_slave_sg': drivers/dma/zx_dma.c:567:11: warning: division by zero [-Wdiv-by-zero] Signed-off-by: Jun Nie <jun.nie@linaro.org> Tested-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
| | * | | | dmaengine: zx: fix residue calculationShawn Guo2017-01-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dma residue is defined as the free space to end of transfer buffer, which could be multiple segments chained together. So the residue calculation in zx_dma_tx_status() works for both slave_sg and cyclic case. But unfortunately, the 'index' is wrong. It should plus one, because the current segment is already occupied and shouldn't be counted into free space. This fixes the HDMI audio noise issue we see on ZX296718 with SPDIF interface. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Reviewed-by: Jun Nie <jun.nie@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
| | * | | | dmaengine: zx: set DMA_CYCLIC cap_mask bitShawn Guo2017-01-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The zx_dma driver supports cyclic transfer mode. Let's set DMA_CYCLIC cap_mask bit to make that clear, and avoid unnecessary failure when clients request channel via dma_request_chan_by_mask() with DMA_CYCLIC bit set in mask. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Reviewed-by: Jun Nie <jun.nie@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
| | * | | | dmaengine: zx: rename zx296702_dma.c to zx_dma.cShawn Guo2017-01-023-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ZTE ZX dma driver is not ZX296702 specific. It works for not only ZX296702 but also other ZTE ZX family platforms like ZX296718. Let's rename the file to reflect that. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Reviewed-by: Jun Nie <jun.nie@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
| * | | | | Merge branch 'topic/stm32-dma' into for-linusVinod Koul2017-02-213-37/+63
| |\ \ \ \ \
| | * | | | | dmaengine: stm32-dma: Add error messages if xlate failsM'boumba Cedric Madianga2017-01-101-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds some error messages when a slave device fails to request a channel. Signed-off-by: M'boumba Cedric Madianga <cedric.madianga@gmail.com> Reviewed-by: Ludovic BARRE <ludovic.barre@st.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
| | * | | | | dmaengine: stm32-dma: Add max_burst supportM'boumba Cedric Madianga2017-01-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch sets the max_burst value supported by the STM32 DMA Signed-off-by: M'boumba Cedric Madianga <cedric.madianga@gmail.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
| | * | | | | dmaengine: stm32-dma: Add synchronization supportM'boumba Cedric Madianga2017-01-031-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the new device_synchronize() callback to allow proper synchronization when stopping a channel. Signed-off-by: M'boumba Cedric Madianga <cedric.madianga@gmail.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
| | * | | | | dmaengine: stm32-dma: Fix residue computation issue in cyclic modeM'boumba Cedric Madianga2017-01-031-13/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch resolves the residue computation issue detected in cyclic mode. Now, in cyclic mode, we increment next_sg variable as soon as a period is transferred instead of after pushing a new sg request. Then, we take into account that after transferring a complete buffer, the next_sg variable is equal to 0. Signed-off-by: M'boumba Cedric Madianga <cedric.madianga@gmail.com> Reviewed-by: Ludovic BARRE <ludovic.barre@st.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
| | * | | | | dmaengine: stm32-dma: Rework starting transfer managementM'boumba Cedric Madianga2017-01-031-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reworks the way to manage transfer starting. Now, starting DMA is only allowed when the channel is not busy. Then, stm32_dma_start_transfer is declared as void. At least, after each transfer completion, we start the next transfer if a new descriptor as been queued in the issued list during an ongoing transfer. Signed-off-by: M'boumba Cedric Madianga <cedric.madianga@gmail.com> Reviewed-by: Ludovic BARRE <ludovic.barre@st.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
| | * | | | | dt-bindings: stm32-dma: Fix typo regarding DMA client bindingM'boumba Cedric Madianga2017-01-031-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only four cells are required for dma client binding not five. Signed-off-by: M'boumba Cedric Madianga <cedric.madianga@gmail.com> Reviewed-by: Ludovic BARRE <ludovic.barre@st.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
| | * | | | | dmaengine: stm32-dma: Fix typo in KconfigM'boumba Cedric Madianga2017-01-031-1/+1
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As STM32 DMA driver is only used as buit-in driver, it couldn't be used as module. Signed-off-by: M'boumba Cedric Madianga <cedric.madianga@gmail.com> Reviewed-by: Ludovic BARRE <ludovic.barre@st.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>