Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146661
b: refs/heads/master
c: 5160d3f
h: refs/heads/master
i:
  146659: 052d8cd
v: v3
  • Loading branch information
Paul Mundt committed Apr 20, 2009
1 parent cd5ed7b commit f57dddf
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 46 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 09cfeb133e3cac39b8b9a2cb1d8ab4f77e396248
refs/heads/master: 5160d3f782a5e0cdb3bdaa8a891a1fb9d9ab83ec
31 changes: 31 additions & 0 deletions trunk/arch/sh/drivers/pci/pci-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,37 @@ void pcibios_align_resource(void *data, struct resource *res,
res->start = start;
}

void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
struct resource *res)
{
struct pci_channel *hose = dev->sysdata;
unsigned long offset = 0;

if (res->flags & IORESOURCE_IO)
offset = hose->io_offset;
else if (res->flags & IORESOURCE_MEM)
offset = hose->mem_offset;

region->start = res->start - offset;
region->end = res->end - offset;
}

void __devinit
pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
struct pci_bus_region *region)
{
struct pci_channel *hose = dev->sysdata;
unsigned long offset = 0;

if (res->flags & IORESOURCE_IO)
offset = hose->io_offset;
else if (res->flags & IORESOURCE_MEM)
offset = hose->mem_offset;

res->start = region->start + offset;
res->end = region->end + offset;
}

int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state, int write_combine)
{
Expand Down
31 changes: 0 additions & 31 deletions trunk/arch/sh/drivers/pci/pci-new.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,37 +147,6 @@ void __devinit __weak pcibios_fixup_bus(struct pci_bus *bus)
}
}

void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
struct resource *res)
{
struct pci_channel *hose = dev->sysdata;
unsigned long offset = 0;

if (res->flags & IORESOURCE_IO)
offset = hose->io_offset;
else if (res->flags & IORESOURCE_MEM)
offset = hose->mem_offset;

region->start = res->start - offset;
region->end = res->end - offset;
}

void __devinit
pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
struct pci_bus_region *region)
{
struct pci_channel *hose = dev->sysdata;
unsigned long offset = 0;

if (res->flags & IORESOURCE_IO)
offset = hose->io_offset;
else if (res->flags & IORESOURCE_MEM)
offset = hose->mem_offset;

res->start = region->start + offset;
res->end = region->end + offset;
}

int pcibios_enable_device(struct pci_dev *dev, int mask)
{
u16 cmd, old_cmd;
Expand Down
14 changes: 0 additions & 14 deletions trunk/arch/sh/drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,6 @@ void __devinit __weak pcibios_fixup_bus(struct pci_bus *bus)
pci_read_bridge_bases(bus);
}

void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
struct resource *res)
{
region->start = res->start;
region->end = res->end;
}

void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
struct pci_bus_region *region)
{
res->start = region->start;
res->end = region->end;
}

int pcibios_enable_device(struct pci_dev *dev, int mask)
{
u16 cmd, old_cmd;
Expand Down

0 comments on commit f57dddf

Please sign in to comment.