sparc: Remove SBUS layer resource and irq handling.
[firefly-linux-kernel-4.4.55.git] / arch / sparc64 / kernel / sbus.c
index fa2827c4a3adb267109f1634b3a5e982ca78399c..0193e38231963624bd49544fc290ba97a562609e 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: sbus.c,v 1.19 2002/01/23 11:27:32 davem Exp $
+/*
  * sbus.c: UltraSparc SBUS controller support.
  *
  * Copyright (C) 1999 David S. Miller (davem@redhat.com)
 #define STRBUF_TAG_VALID       0x02UL
 
 /* Enable 64-bit DVMA mode for the given device. */
-void sbus_set_sbus64(struct sbus_dev *sdev, int bursts)
+void sbus_set_sbus64(struct device *dev, int bursts)
 {
-       struct iommu *iommu = sdev->ofdev.dev.archdata.iommu;
-       int slot = sdev->slot;
+       struct iommu *iommu = dev->archdata.iommu;
+       struct of_device *op = to_of_device(dev);
+       const struct linux_prom_registers *regs;
        unsigned long cfg_reg;
+       int slot;
        u64 val;
 
+       regs = of_get_property(op->node, "reg", NULL);
+       if (!regs) {
+               printk(KERN_ERR "sbus_set_sbus64: Cannot find regs for %s\n",
+                      op->node->full_name);
+               return;
+       }
+       slot = regs->which_io;
+
        cfg_reg = iommu->write_complete_reg;
        switch (slot) {
        case 0:
@@ -640,39 +650,11 @@ fatal_memory_error:
        prom_printf("sbus_iommu_init: Fatal memory allocation error.\n");
 }
 
-void sbus_fill_device_irq(struct sbus_dev *sdev)
-{
-       struct device_node *dp = of_find_node_by_phandle(sdev->prom_node);
-       const struct linux_prom_irqs *irqs;
-
-       irqs = of_get_property(dp, "interrupts", NULL);
-       if (!irqs) {
-               sdev->irqs[0] = 0;
-               sdev->num_irqs = 0;
-       } else {
-               unsigned int pri = irqs[0].pri;
-
-               sdev->num_irqs = 1;
-               if (pri < 0x20)
-                       pri += sdev->slot * 8;
-
-               sdev->irqs[0] = sbus_build_irq(sdev->bus, pri);
-       }
-}
-
-void __init sbus_arch_bus_ranges_init(struct device_node *pn, struct sbus_bus *sbus)
-{
-}
-
 void __init sbus_setup_iommu(struct sbus_bus *sbus, struct device_node *dp)
 {
        sbus_iommu_init(dp->node, sbus);
 }
 
-void __init sbus_setup_arch_props(struct sbus_bus *sbus, struct device_node *dp)
-{
-}
-
 int __init sbus_arch_preinit(void)
 {
        return 0;