pcie-altera.c (c63aed7334c21de8d626ff028ccad98cf5847a0e) | pcie-altera.c (e2dcd20b1645a7285b304bf6b9a1a6637f0f254a) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright Altera Corporation (C) 2013-2015. All rights reserved 4 * 5 * Author: Ley Foon Tan <lftan@altera.com> 6 * Description: Altera PCIe host controller driver 7 */ 8 --- 682 unchanged lines hidden (view full) --- 691 irq_domain_remove(pcie->irq_domain); 692 irq_dispose_mapping(pcie->irq); 693} 694 695static int altera_pcie_parse_dt(struct altera_pcie *pcie) 696{ 697 struct device *dev = &pcie->pdev->dev; 698 struct platform_device *pdev = pcie->pdev; | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright Altera Corporation (C) 2013-2015. All rights reserved 4 * 5 * Author: Ley Foon Tan <lftan@altera.com> 6 * Description: Altera PCIe host controller driver 7 */ 8 --- 682 unchanged lines hidden (view full) --- 691 irq_domain_remove(pcie->irq_domain); 692 irq_dispose_mapping(pcie->irq); 693} 694 695static int altera_pcie_parse_dt(struct altera_pcie *pcie) 696{ 697 struct device *dev = &pcie->pdev->dev; 698 struct platform_device *pdev = pcie->pdev; |
699 struct resource *cra; 700 struct resource *hip; | |
701 | 699 |
702 cra = platform_get_resource_byname(pdev, IORESOURCE_MEM, "Cra"); 703 pcie->cra_base = devm_ioremap_resource(dev, cra); | 700 pcie->cra_base = devm_platform_ioremap_resource_byname(pdev, "Cra"); |
704 if (IS_ERR(pcie->cra_base)) 705 return PTR_ERR(pcie->cra_base); 706 707 if (pcie->pcie_data->version == ALTERA_PCIE_V2) { | 701 if (IS_ERR(pcie->cra_base)) 702 return PTR_ERR(pcie->cra_base); 703 704 if (pcie->pcie_data->version == ALTERA_PCIE_V2) { |
708 hip = platform_get_resource_byname(pdev, IORESOURCE_MEM, "Hip"); 709 pcie->hip_base = devm_ioremap_resource(&pdev->dev, hip); | 705 pcie->hip_base = 706 devm_platform_ioremap_resource_byname(pdev, "Hip"); |
710 if (IS_ERR(pcie->hip_base)) 711 return PTR_ERR(pcie->hip_base); 712 } 713 714 /* setup IRQ */ 715 pcie->irq = platform_get_irq(pdev, 0); 716 if (pcie->irq < 0) { 717 dev_err(dev, "failed to get IRQ: %d\n", pcie->irq); --- 135 unchanged lines hidden --- | 707 if (IS_ERR(pcie->hip_base)) 708 return PTR_ERR(pcie->hip_base); 709 } 710 711 /* setup IRQ */ 712 pcie->irq = platform_get_irq(pdev, 0); 713 if (pcie->irq < 0) { 714 dev_err(dev, "failed to get IRQ: %d\n", pcie->irq); --- 135 unchanged lines hidden --- |