diff options
author | Sujit Reddy Thumma <sthumma@codeaurora.org> | 2014-09-25 14:32:21 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-10-01 13:11:18 +0200 |
commit | 5c0c28a84af9f9b6061bb4855a30e13d289b4ae1 (patch) | |
tree | ee8c321b644d10631c3e232692e41e26e4abe38f /drivers/scsi/ufs/ufshcd-pci.c | |
parent | scsi: don't add scsi_device if its already visible (diff) | |
download | linux-5c0c28a84af9f9b6061bb4855a30e13d289b4ae1.tar.xz linux-5c0c28a84af9f9b6061bb4855a30e13d289b4ae1.zip |
ufs: Allow vendor specific initialization
Some vendor specific controller versions might need to configure
vendor specific - registers, clocks, voltage regulators etc. to
initialize the host controller UTP layer and Uni-Pro stack.
Provide some common initialization operations that can be used
to configure vendor specifics. The methods can be extended in
future, for example, for power mode transitions.
The operations are vendor/board specific and hence determined with
the help of compatible property in device tree.
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Signed-off-by: Dolev Raviv <draviv@codeaurora.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/ufs/ufshcd-pci.c')
-rw-r--r-- | drivers/scsi/ufs/ufshcd-pci.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufshcd-pci.c b/drivers/scsi/ufs/ufshcd-pci.c index afaabe2aeac8..7a6edbc55f92 100644 --- a/drivers/scsi/ufs/ufshcd-pci.c +++ b/drivers/scsi/ufs/ufshcd-pci.c @@ -164,7 +164,13 @@ ufshcd_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) mmio_base = pcim_iomap_table(pdev)[0]; - err = ufshcd_init(&pdev->dev, &hba, mmio_base, pdev->irq); + err = ufshcd_alloc_host(&pdev->dev, &hba); + if (err) { + dev_err(&pdev->dev, "Allocation failed\n"); + return err; + } + + err = ufshcd_init(hba, mmio_base, pdev->irq); if (err) { dev_err(&pdev->dev, "Initialization failed\n"); return err; |