Commit 1327e9b6 authored by David S. Miller's avatar David S. Miller

[SPARC64] ebus: Convert to use pci_device_to_OF_node().

Also, we don't need to store or use the PBM so kill that
from the linux_ebus.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9b1caafe
...@@ -438,11 +438,9 @@ static struct pci_dev *find_next_ebus(struct pci_dev *start, int *is_rio_p) ...@@ -438,11 +438,9 @@ static struct pci_dev *find_next_ebus(struct pci_dev *start, int *is_rio_p)
void __init ebus_init(void) void __init ebus_init(void)
{ {
struct pci_pbm_info *pbm;
struct linux_ebus_device *dev; struct linux_ebus_device *dev;
struct linux_ebus *ebus; struct linux_ebus *ebus;
struct pci_dev *pdev; struct pci_dev *pdev;
struct pcidev_cookie *cookie;
struct device_node *dp; struct device_node *dp;
int is_rio; int is_rio;
int num_ebus = 0; int num_ebus = 0;
...@@ -453,8 +451,7 @@ void __init ebus_init(void) ...@@ -453,8 +451,7 @@ void __init ebus_init(void)
return; return;
} }
cookie = pdev->sysdata; dp = pci_device_to_OF_node(pdev);
dp = cookie->prom_node;
ebus_chain = ebus = ebus_alloc(sizeof(struct linux_ebus)); ebus_chain = ebus = ebus_alloc(sizeof(struct linux_ebus));
ebus->next = NULL; ebus->next = NULL;
...@@ -480,8 +477,7 @@ void __init ebus_init(void) ...@@ -480,8 +477,7 @@ void __init ebus_init(void)
break; break;
} }
ebus->is_rio = is_rio; ebus->is_rio = is_rio;
cookie = pdev->sysdata; dp = pci_device_to_OF_node(pdev);
dp = cookie->prom_node;
continue; continue;
} }
printk("ebus%d:", num_ebus); printk("ebus%d:", num_ebus);
...@@ -489,7 +485,6 @@ void __init ebus_init(void) ...@@ -489,7 +485,6 @@ void __init ebus_init(void)
ebus->index = num_ebus; ebus->index = num_ebus;
ebus->prom_node = dp; ebus->prom_node = dp;
ebus->self = pdev; ebus->self = pdev;
ebus->parent = pbm = cookie->pbm;
ebus->ofdev.node = dp; ebus->ofdev.node = dp;
ebus->ofdev.dev.parent = &pdev->dev; ebus->ofdev.dev.parent = &pdev->dev;
...@@ -531,8 +526,7 @@ void __init ebus_init(void) ...@@ -531,8 +526,7 @@ void __init ebus_init(void)
if (!pdev) if (!pdev)
break; break;
cookie = pdev->sysdata; dp = pci_device_to_OF_node(pdev);
dp = cookie->prom_node;
ebus->next = ebus_alloc(sizeof(struct linux_ebus)); ebus->next = ebus_alloc(sizeof(struct linux_ebus));
ebus = ebus->next; ebus = ebus->next;
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#ifndef __SPARC64_EBUS_H #ifndef __SPARC64_EBUS_H
#define __SPARC64_EBUS_H #define __SPARC64_EBUS_H
#include <asm/pbm.h>
#include <asm/oplib.h> #include <asm/oplib.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/of_device.h> #include <asm/of_device.h>
...@@ -41,7 +40,6 @@ struct linux_ebus { ...@@ -41,7 +40,6 @@ struct linux_ebus {
struct of_device ofdev; struct of_device ofdev;
struct linux_ebus *next; struct linux_ebus *next;
struct linux_ebus_device *devices; struct linux_ebus_device *devices;
struct pci_pbm_info *parent;
struct pci_dev *self; struct pci_dev *self;
int index; int index;
int is_rio; int is_rio;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment