···5151 int prom_node;5252 char prom_name[64];5353 int slot;5454-5555- struct resource resource[PROMREG_MAX];5656-5757- struct linux_prom_registers reg_addrs[PROMREG_MAX];5858- int num_registers;5959-6060- struct linux_prom_ranges device_ranges[PROMREG_MAX];6161- int num_device_ranges;6262-6363- unsigned int irqs[4];6464- int num_irqs;6554};6655#define to_sbus_device(d) container_of(d, struct sbus_dev, ofdev.dev)6756···6273 int prom_node; /* PROM device tree node for this SBus */6374 char prom_name[64]; /* Usually "sbus" or "sbi" */6475 int clock_freq;6565-6666- struct linux_prom_ranges sbus_ranges[PROMREG_MAX];6767- int num_sbus_ranges;6876};6977#define to_sbus(d) container_of(d, struct sbus_bus, ofdev.dev)7078···89103void prom_adjust_ranges(struct linux_prom_ranges *, int,90104 struct linux_prom_ranges *, int);911059292-extern void sbus_arch_bus_ranges_init(struct device_node *, struct sbus_bus *);93106extern void sbus_setup_iommu(struct sbus_bus *, struct device_node *);94107extern int sbus_arch_preinit(void);95108extern void sbus_arch_postinit(void);
-16
arch/sparc/include/asm/sbus_64.h
···5151 int prom_node;5252 char prom_name[64];5353 int slot;5454-5555- struct resource resource[PROMREG_MAX];5656-5757- struct linux_prom_registers reg_addrs[PROMREG_MAX];5858- int num_registers;5959-6060- struct linux_prom_ranges device_ranges[PROMREG_MAX];6161- int num_device_ranges;6262-6363- unsigned int irqs[4];6464- int num_irqs;6554};6655#define to_sbus_device(d) container_of(d, struct sbus_dev, ofdev.dev)6756···6273 int prom_node; /* OBP node of SBUS */6374 char prom_name[64]; /* Usually "sbus" or "sbi" */6475 int clock_freq;6565-6666- struct linux_prom_ranges sbus_ranges[PROMREG_MAX];6767- int num_sbus_ranges;6868-6976 int portid;7077};7178#define to_sbus(d) container_of(d, struct sbus_bus, ofdev.dev)···7994 for ((bus) = sbus_root; (bus); (bus) = (bus)->next) \8095 for ((device) = (bus)->devices; (device); (device) = (device)->next)81968282-extern void sbus_arch_bus_ranges_init(struct device_node *, struct sbus_bus *);8397extern void sbus_setup_iommu(struct sbus_bus *, struct device_node *);8498extern int sbus_arch_preinit(void);8599extern void sbus_arch_postinit(void);
-27
arch/sparc/kernel/ioport.c
···394394}395395396396/* Support code for sbus_init(). */397397-/*398398- * XXX This functions appears to be a distorted version of399399- * prom_sbus_ranges_init(), with all sun4d stuff cut away.400400- * Ask DaveM what is going on here, how is sun4d supposed to work... XXX401401- */402402-/* added back sun4d patch from Thomas Bogendoerfer - should be OK (crn) */403403-void __init sbus_arch_bus_ranges_init(struct device_node *pn, struct sbus_bus *sbus)404404-{405405- int parent_node = pn->node;406406-407407- if (sparc_cpu_model == sun4d) {408408- struct linux_prom_ranges iounit_ranges[PROMREG_MAX];409409- int num_iounit_ranges, len;410410-411411- len = prom_getproperty(parent_node, "ranges",412412- (char *) iounit_ranges,413413- sizeof (iounit_ranges));414414- if (len != -1) {415415- num_iounit_ranges =416416- (len / sizeof(struct linux_prom_ranges));417417- prom_adjust_ranges(sbus->sbus_ranges,418418- sbus->num_sbus_ranges,419419- iounit_ranges, num_iounit_ranges);420420- }421421- }422422-}423423-424397void __init sbus_setup_iommu(struct sbus_bus *sbus, struct device_node *dp)425398{426399#ifndef CONFIG_SUN4