*/
#include <linux/kernel.h>
- -#include <linux/module.h>
+ +#include <linux/init.h>
#include <linux/of_address.h>
#include <linux/of_pci.h>
++#include <linux/pci-ecam.h>
#include <linux/platform_device.h>
--#include "../ecam.h"
--
static struct pci_ecam_ops gen_pci_cfg_cam_bus_ops = {
.bus_shift = 16,
.pci_ops = {
sys->mem_offset = pcie->offset.mem;
sys->io_offset = pcie->offset.io;
-- err = devm_request_resource(pcie->dev, &pcie->all, &pcie->io);
- if (err < 0)
- return err;
-
- err = devm_request_resource(pcie->dev, &ioport_resource, &pcie->pio);
- if (err < 0)
- return err;
-
- err = devm_request_resource(pcie->dev, &pcie->all, &pcie->mem);
++ err = devm_request_resource(pcie->dev, &iomem_resource, &pcie->io);
if (err < 0)
return err;
- err = devm_request_resource(pcie->dev, &ioport_resource, &pcie->pio);
- if (err < 0)
- return err;
-
- err = devm_request_resource(pcie->dev, &pcie->all, &pcie->mem);
- if (err < 0)
- return err;
-
-- err = devm_request_resource(pcie->dev, &pcie->all, &pcie->prefetch);
-- if (err)
-- return err;
++ pci_ioremap_io(pcie->pio.start, pcie->io.start);
pci_add_resource_offset(&sys->resources, &pcie->pio, sys->io_offset);
pci_add_resource_offset(&sys->resources, &pcie->mem, sys->mem_offset);
*/
#include <linux/kernel.h>
- -#include <linux/module.h>
+ +#include <linux/init.h>
#include <linux/of_address.h>
#include <linux/of_pci.h>
++#include <linux/pci-ecam.h>
#include <linux/platform_device.h>
--#include "../ecam.h"
--
#define PEM_CFG_WR 0x28
#define PEM_CFG_RD 0x30
{ .compatible = "renesas,pcie-r8a7795", .data = rcar_pcie_hw_init },
{},
};
- -MODULE_DEVICE_TABLE(of, rcar_pcie_of_match);
-
- static void rcar_pcie_release_of_pci_ranges(struct rcar_pcie *pci)
- {
- pci_free_resource_list(&pci->resources);
- }
- static void rcar_pcie_release_of_pci_ranges(struct rcar_pcie *pci)
- {
- pci_free_resource_list(&pci->resources);
- }
-
static int rcar_pcie_parse_request_of_pci_ranges(struct rcar_pcie *pci)
{
int err;