summaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci_xgene.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-10-10 07:23:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-10 07:23:11 -0400
commitd9428f09763d307a6d2220c4bbb01d8fc5c55b52 (patch)
treebe02ed22b6630d6a40706b2e09cc8b13fa3e3e7c /drivers/ata/ahci_xgene.c
parent0cf744bc7ae8e0072159a901f6e1a159bbc30ffa (diff)
parent37017ac6849e772e67dd187ba2fbd056c4afa533 (diff)
downloadlinux-d9428f09763d307a6d2220c4bbb01d8fc5c55b52.tar.bz2
Merge branch 'for-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
Pull libata update from Tejun Heo: "AHCI is getting per-port irq handling and locks for better scalability. The gain is not huge but measureable with multiple high iops devices connected to the same host; however, the value of threaded IRQ handling seems negligible for AHCI and it likely will revert to non-threaded handling soon. Another noteworthy change is George Spelvin's "libata: Un-break ATA blacklist". During 3.17 devel cycle, the libata blacklist glob matching got generalized and rewritten; unfortunately, the patch forgot to swap arguments to match the new match function and ended up breaking blacklist matching completely. It got noticed only a couple days ago so it couldn't make for-3.17-fixes either. :( Other than the above two, nothing too interesting - the usual cleanup churns and device-specific changes" * 'for-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (22 commits) pata_serverworks: disable 64-KB DMA transfers on Broadcom OSB4 IDE Controller libata: Un-break ATA blacklist AHCI: Do not acquire ata_host::lock from single IRQ handler AHCI: Optimize single IRQ interrupt processing AHCI: Do not read HOST_IRQ_STAT reg in multi-MSI mode AHCI: Make few function names more descriptive AHCI: Move host activation code into ahci_host_activate() AHCI: Move ahci_host_activate() function to libahci.c AHCI: Pass SCSI host template as arg to ahci_host_activate() ata: pata_imx: Use the SIMPLE_DEV_PM_OPS() macro AHCI: Cleanup checking of multiple MSIs/SLM modes libata-sff: Fix controllers with no ctl port ahci_xgene: Fix the error print invalid resource for APM X-Gene SoC AHCI SATA Host Controller driver. libata: change ata_<foo>_printk routines to return void ata: qcom: Add device tree bindings information ahci-platform: Bump max number of clocks to 5 ahci: ahci_p5wdh_workaround - constify DMI table libahci_platform: Staticize ahci_platform_<en/dis>able_phys() pata_platform: Remove useless irq_flags field pata_of_platform: Remove "electra-ide" quirk ...
Diffstat (limited to 'drivers/ata/ahci_xgene.c')
-rw-r--r--drivers/ata/ahci_xgene.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
index f03aab187f4d..0f8538f238b6 100644
--- a/drivers/ata/ahci_xgene.c
+++ b/drivers/ata/ahci_xgene.c
@@ -434,7 +434,7 @@ static int xgene_ahci_mux_select(struct xgene_ahci_context *ctx)
u32 val;
/* Check for optional MUX resource */
- if (IS_ERR(ctx->csr_mux))
+ if (!ctx->csr_mux)
return 0;
val = readl(ctx->csr_mux + SATA_ENET_CONFIG_REG);
@@ -484,7 +484,13 @@ static int xgene_ahci_probe(struct platform_device *pdev)
/* Retrieve the optional IP mux resource */
res = platform_get_resource(pdev, IORESOURCE_MEM, 4);
- ctx->csr_mux = devm_ioremap_resource(dev, res);
+ if (res) {
+ void __iomem *csr = devm_ioremap_resource(dev, res);
+ if (IS_ERR(csr))
+ return PTR_ERR(csr);
+
+ ctx->csr_mux = csr;
+ }
dev_dbg(dev, "VAddr 0x%p Mmio VAddr 0x%p\n", ctx->csr_core,
hpriv->mmio);