aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc/gsc.c
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@parisc-linux.org>2005-10-21 22:33:38 -0400
committerKyle McMartin <kyle@parisc-linux.org>2005-10-21 22:33:38 -0400
commit5658374766d9e0249bd04e9d62bdb8456b916b64 (patch)
tree61ae77a2c8faf7bb420be00d989b89c5ffd1f4ee /drivers/parisc/gsc.c
parent63172cb3d5ef762dcb60a292bc7f016b85cf6e1f (diff)
[PARISC] Convert parisc_device tree to use struct device klists
Fix parse_tree_node. much more needs to be done to fix this file. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Make drivers.c compile based on a patch from Pat Mochel. From: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org> Fix drivers.c to create new device tree nodes when no match is found. Signed-off-by: Richard Hirst <rhirst@parisc-linux.org> Do a proper depth-first search returning parents before children, using the new klist infrastructure. Signed-off-by: Richard Hirst <rhirst@parisc-linux.org> Fixed parisc_device traversal so that pdc_stable works again Fixed check_dev so it doesn't dereference a parisc_device until it has verified the bus type Signed-off-by: Randolph Chung <tausq@parisc-linux.org> Convert pa_dev->hpa from an unsigned long to a struct resource. Use insert_resource() instead of request_mem_region(). Request resources at bus walk time instead of driver probe time. Don't release the resources as we don't have any hotplug parisc_device support yet. Add parisc_pathname() to conveniently get the textual representation of the hwpath used in sysfs. Inline the remnants of claim_device() into its caller. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> I noticed that some of the STI regions weren't showing up in iomem. Reading the STI spec indicated that all STI devices occupy at least 32MB. So check for STI HPAs and give them 32MB instead of 4kB. Signed-off-by: Matthew Wilcox <willy@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'drivers/parisc/gsc.c')
-rw-r--r--drivers/parisc/gsc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/parisc/gsc.c b/drivers/parisc/gsc.c
index af5e02526a18..16d40f95978d 100644
--- a/drivers/parisc/gsc.c
+++ b/drivers/parisc/gsc.c
@@ -183,12 +183,20 @@ void gsc_asic_assign_irq(struct gsc_asic *asic, int local_irq, int *irqp)
183 *irqp = irq; 183 *irqp = irq;
184} 184}
185 185
186static struct device *next_device(struct klist_iter *i)
187{
188 struct klist_node * n = klist_next(i);
189 return n ? container_of(n, struct device, knode_parent) : NULL;
190}
191
186void gsc_fixup_irqs(struct parisc_device *parent, void *ctrl, 192void gsc_fixup_irqs(struct parisc_device *parent, void *ctrl,
187 void (*choose_irq)(struct parisc_device *, void *)) 193 void (*choose_irq)(struct parisc_device *, void *))
188{ 194{
189 struct device *dev; 195 struct device *dev;
196 struct klist_iter i;
190 197
191 list_for_each_entry(dev, &parent->dev.children, node) { 198 klist_iter_init(&parent->dev.klist_children, &i);
199 while ((dev = next_device(&i))) {
192 struct parisc_device *padev = to_parisc_device(dev); 200 struct parisc_device *padev = to_parisc_device(dev);
193 201
194 /* work-around for 715/64 and others which have parent 202 /* work-around for 715/64 and others which have parent
@@ -197,6 +205,7 @@ void gsc_fixup_irqs(struct parisc_device *parent, void *ctrl,
197 return gsc_fixup_irqs(padev, ctrl, choose_irq); 205 return gsc_fixup_irqs(padev, ctrl, choose_irq);
198 choose_irq(padev, ctrl); 206 choose_irq(padev, ctrl);
199 } 207 }
208 klist_iter_exit(&i);
200} 209}
201 210
202int gsc_common_setup(struct parisc_device *parent, struct gsc_asic *gsc_asic) 211int gsc_common_setup(struct parisc_device *parent, struct gsc_asic *gsc_asic)