summaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_rcar.c
Commit message (Collapse)AuthorAgeFilesLines
* ata: sata_rcar: Remove obsolete sata-r8a779* platform_device_id entriesGeert Uytterhoeven2015-07-141-4/+0
| | | | | | | | | | | | Since commit a483dcbfa21f919c ("ARM: shmobile: lager: Remove legacy board support"), R-Car Gen2 SoCs are only supported in generic DT-only ARM multi-platform builds. The driver doesn't need to match platform devices by name anymore, hence remove the corresponding platform_device_id entry. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Tejun Heo <tj@kernel.org>
* sata_rcar: extend PM methodsMikhail Ulyanov2015-01-191-2/+23
| | | | | | | | | | | | In order to make it possible to restore from hibernation not only in Linux but also in e.g. U-Boot, we have to extend sata_rcar_{suspend|resume}() to {freeze| thaw}() PM methods and implement the restore() PM method. Signed-off-by: Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com> [Sergei: killed unused variable, changed the order of initializers, modified copyrights, renamed, modified changelog.] Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds2014-12-141-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
| * ata: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | | | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* | ata: sata_rcar: Add r8a7793 device supportKoji Matsuoka2014-10-271-0/+5
| | | | | | | | | | | | Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* | ata: sata_rcar: Disable DIPM mode for r8a7790 ES1Simon Horman2014-10-271-0/+10
|/ | | | | | | | | Unlike other SATA R-Car r8a7790 controllers the r8a7790 ES1 SATA R-Car controller needs to be run with DIPM disabled. Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Tejun Heo <tj@kernel.org> Cc: stable@vger.kernel.org
* ata: use CONFIG_PM_SLEEP instead of CONFIG_PM where applicable in host driversBartlomiej Zolnierkiewicz2014-05-091-2/+2
| | | | | | | | | | | | | | | | | | | | This patch fixes host drivers to use CONFIG_PM_SLEEP instead of CONFIG_PM where applicable. Benefits of this change: * unused code is not being compiled in for CONFIG_PM=y, CONFIG_PM_SLEEP=n and CONFIG_PM_RUNTIME=y configurations * easier transition to use struct dev_pm_ops and SIMPLE_DEV_PM_OPS() in the future * more consistent code (there are host drivers which are using the correct CONFIG_PM_SLEEP checks already) The patch leaves the core libata code and ->port_[suspend,resume] support in sata_[inic162x,nv,sil24].c alone for now. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* sata_rcar: Add R-Car Gen2 SATA PHY supportValentine Barshak2013-11-291-16/+102
| | | | | | | | | | | | | | | | | | | R-Car Gen2 SoCs have a different PHY which is not compatible with the older R-Car H1 (R8A7779) version. This adds OF/platform device id tables and PHY initialization callbacks for the following Gen2 SoCs: * R-Car H2: R8A7790; * R-Car M2: R8A7791. PHY initialization method is chosen based on the device id. Default PHY settings are applied for Gen2 SoCs, which should suit the Gen2 boards available. While at it, this also adds "sata-r8a7779" compatibility string for R8A7779 SATA, while keeping the old one for compatibility. Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* sata_rcar: Convert to clk_prepare/unprepareLaurent Pinchart2013-10-291-5/+5
| | | | | | | | | | Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework. Cc: linux-ide@vger.kernel.org Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* drivers/ata/sata_rcar.c: simplify use of devm_ioremap_resourceJulia Lawall2013-08-141-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression pdev,res,n,e,e1; expression ret != 0; identifier l; @@ - res = platform_get_resource(pdev, IORESOURCE_MEM, n); ... when != res - if (res == NULL) { ... \(goto l;\|return ret;\) } ... when != res + res = platform_get_resource(pdev, IORESOURCE_MEM, n); e = devm_ioremap_resource(e1, res); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Tejun Heo <tj@kernel.org>
* Merge branch 'libata/for-3.10-fixes' into libata/for-3.11Tejun Heo2013-07-021-12/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libata/for-3.10-fixes never got submitted during v3.10 cycle. Merge it into for-3.11 so that it can be routed together with other changes scheduled for v3.11. Three trivial conflicts in drivers/ata/sata_rcar.c. All are caused by 1b20f6a9ad ("sata_rcar: add 'base' local variable to some functions") conflicting with logic updates in for-3.10-fixes. The offending commit simply adds local variable @base on functions which dereferences sata_rcar_priv->base multiple times. The resolutions are trivial - applying s/priv->base/base/ in the conflicting logic updates. Signed-off-by: Tejun Heo <tj@kernel.org>
| * sata_rcar: fix compilation warning in sata_rcar_thaw()Sergei Shtylyov2013-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When compiling the driver with gcc 4.8, it gives the following warning: drivers/ata/sata_rcar.c: In function `sata_rcar_thaw': drivers/ata/sata_rcar.c:183:2: warning: large integer implicitly truncated to unsigned type [-Woverflow] Fix the warning by explicit cast of the 'unsigned long' value to 'u32'. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * sata_rcar: fix interrupt handlingSergei Shtylyov2013-06-021-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver's interrupt handling code is too picky in deciding whether it should handle an interrupt or not which causes completely unneeded spurious interrupts. Thus make sata_rcar_{ata|serr}_interrupt() *void*; add ATA status register read to sata_rcar_ata_interrupt() to clear an unexpected ATA interrupt -- it doesn't get cleared by writing to the SATAINTSTAT register in the interrupt mode we use. Also, in sata_rcar_ata_interrupt() we should check SATAINTSTAT register only for enabled interrupts and we should clear only those interrupts that we have read as active first time around, because else we have a race and risk clearing an interrupt that can occur between read and write of the SATAINTSTAT register and never registering it... Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Tejun Heo <tj@kernel.org> Cc: stable@vger.kernel.org
| * sata_rcar: clear STOP bit in bmdma_start() methodSergei Shtylyov2013-05-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Iff bmdma_setup() has to stop a DMA transfer before starting a new one, then the STOP bit in the ATAPI_CONTROL1 register will remain set (it's only cleared when setting the START bit to 1) and then bmdma_start() method will set both START and STOP bits simultaneously which should abort the transfer being just started. Avoid that by explicitly clearing the STOP bit in bmdma_start() method (in this case it will be ignored on write). Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Tejun Heo <tj@kernel.org> Cc: stable@vger.kernel.org
* | sata_rcar: add 'base' local variable to some functionsSergei Shtylyov2013-05-281-45/+57
| | | | | | | | | | | | | | | | | | | | | | | | The 'base' field of 'struct sata_rcar_priv' is used very often throughout the driver, so it seems worth loading it into a local variable if it's used more than once in a function. While at it, put some unitialized variables after intialized ones for aesthetic reasons. :-) Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* | sata_rcar: correct 'sata_rcar_sht'Sergei Shtylyov2013-05-281-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | Using ATA_BMDMA_SHT() to intialize 'sata_rcar_sht' was suboptimal as the R-Car descriptor table transfer counter is 28 bits wide (bit 1 to bit 28), so that the 'dma_boundary' field of 0xFFFF is just too small, as well as the 'sg_tablesize' field of 128. Use ATA_BASE_SHT() to initialize 'sata_rcar_sht' instead and give proper values to the 'dma_boundary' and 'sg_tablesize' fields explicitly. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* | sata_rcar: kill superfluous code in sata_rcar_bmdma_fill_sg()Sergei Shtylyov2013-05-281-18/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've modified sata_rcar_bmdma_fill_sg() to take care of splitting long scatter/ gather segments due to the descriptor table transfer counter being only 28 bits wide (bit 1 to bit 28) but that was in vain as even if 'sata_rcar_sht' specified a correct 'dma_boundary' field, the DMA and block layers would have split the S/G segments on the necassary boundaries. Since the driver uses ATA_BMDMA_SHT() to initilaize 'sata_rcar_sht', the boundary is much smaller, only 0xFFFF, so the code I've added is even more useless, and it's better to just remove it. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* | ata: use platform_{get,set}_drvdata()Jingoo Han2013-05-241-1/+1
|/ | | | | | | | | | | | Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Also, unnecessary dev_set_drvdata() is removed, because the driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* sata_rcar: Convert to devm_ioremap_resource()Sachin Kamat2013-04-111-3/+4
| | | | | | | | | Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* libata: add R-Car SATA driverVladimir Barinov2013-02-201-0/+910
Add Renesas R-Car on-chip 3Gbps SATA controller driver. Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com> [Sergei: few bugs fixed, significant cleanup] Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
OpenPOWER on IntegriCloud