sparc: Remove SBUS layer resource and irq handling.
[firefly-linux-kernel-4.4.55.git] / arch / sparc / include / asm / sbus_64.h
index b606c14343fbb5c72e9fa8a8f69e81a96a9a4c6b..75f95ff6d01c0a53406abcaa8fd5e3c79609f917 100644 (file)
@@ -51,17 +51,6 @@ struct sbus_dev {
        int prom_node;
        char prom_name[64];
        int slot;
-
-       struct resource resource[PROMREG_MAX];
-
-       struct linux_prom_registers reg_addrs[PROMREG_MAX];
-       int num_registers;
-
-       struct linux_prom_ranges device_ranges[PROMREG_MAX];
-       int num_device_ranges;
-
-       unsigned int irqs[4];
-       int num_irqs;
 };
 #define to_sbus_device(d) container_of(d, struct sbus_dev, ofdev.dev)
 
@@ -73,10 +62,6 @@ struct sbus_bus {
        int                     prom_node;      /* OBP node of SBUS     */
        char                    prom_name[64];  /* Usually "sbus" or "sbi" */
        int                     clock_freq;
-
-       struct linux_prom_ranges sbus_ranges[PROMREG_MAX];
-       int num_sbus_ranges;
-
        int portid;
 };
 #define to_sbus(d) container_of(d, struct sbus_bus, ofdev.dev)
@@ -94,96 +79,7 @@ extern struct sbus_bus *sbus_root;
        for ((bus) = sbus_root; (bus); (bus) = (bus)->next) \
                for ((device) = (bus)->devices; (device); (device) = (device)->next)
 
-/* Driver DVMA interfaces. */
-#define sbus_can_dma_64bit(sdev)       (1)
-#define sbus_can_burst64(sdev)         (1)
-extern void sbus_set_sbus64(struct sbus_dev *, int);
-extern void sbus_fill_device_irq(struct sbus_dev *);
-
-static inline void *sbus_alloc_consistent(struct sbus_dev *sdev , size_t size,
-                                         dma_addr_t *dma_handle)
-{
-       return dma_alloc_coherent(&sdev->ofdev.dev, size,
-                                 dma_handle, GFP_ATOMIC);
-}
-
-static inline void sbus_free_consistent(struct sbus_dev *sdev, size_t size,
-                                       void *vaddr, dma_addr_t dma_handle)
-{
-       return dma_free_coherent(&sdev->ofdev.dev, size, vaddr, dma_handle);
-}
-
-#define SBUS_DMA_BIDIRECTIONAL DMA_BIDIRECTIONAL
-#define SBUS_DMA_TODEVICE      DMA_TO_DEVICE
-#define SBUS_DMA_FROMDEVICE    DMA_FROM_DEVICE
-#define        SBUS_DMA_NONE           DMA_NONE
-
-/* All the rest use streaming mode mappings. */
-static inline dma_addr_t sbus_map_single(struct sbus_dev *sdev, void *ptr,
-                                        size_t size, int direction)
-{
-       return dma_map_single(&sdev->ofdev.dev, ptr, size,
-                             (enum dma_data_direction) direction);
-}
-
-static inline void sbus_unmap_single(struct sbus_dev *sdev,
-                                    dma_addr_t dma_addr, size_t size,
-                                    int direction)
-{
-       dma_unmap_single(&sdev->ofdev.dev, dma_addr, size,
-                        (enum dma_data_direction) direction);
-}
-
-static inline int sbus_map_sg(struct sbus_dev *sdev, struct scatterlist *sg,
-                             int nents, int direction)
-{
-       return dma_map_sg(&sdev->ofdev.dev, sg, nents,
-                         (enum dma_data_direction) direction);
-}
-
-static inline void sbus_unmap_sg(struct sbus_dev *sdev, struct scatterlist *sg,
-                                int nents, int direction)
-{
-       dma_unmap_sg(&sdev->ofdev.dev, sg, nents,
-                    (enum dma_data_direction) direction);
-}
-
-/* Finally, allow explicit synchronization of streamable mappings. */
-static inline void sbus_dma_sync_single_for_cpu(struct sbus_dev *sdev,
-                                               dma_addr_t dma_handle,
-                                               size_t size, int direction)
-{
-       dma_sync_single_for_cpu(&sdev->ofdev.dev, dma_handle, size,
-                               (enum dma_data_direction) direction);
-}
-#define sbus_dma_sync_single sbus_dma_sync_single_for_cpu
-
-static inline void sbus_dma_sync_single_for_device(struct sbus_dev *sdev,
-                                                  dma_addr_t dma_handle,
-                                                  size_t size, int direction)
-{
-       /* No flushing needed to sync cpu writes to the device.  */
-}
-
-static inline void sbus_dma_sync_sg_for_cpu(struct sbus_dev *sdev,
-                                           struct scatterlist *sg,
-                                           int nents, int direction)
-{
-       dma_sync_sg_for_cpu(&sdev->ofdev.dev, sg, nents,
-                           (enum dma_data_direction) direction);
-}
-#define sbus_dma_sync_sg sbus_dma_sync_sg_for_cpu
-
-static inline void sbus_dma_sync_sg_for_device(struct sbus_dev *sdev,
-                                              struct scatterlist *sg,
-                                              int nents, int direction)
-{
-       /* No flushing needed to sync cpu writes to the device.  */
-}
-
-extern void sbus_arch_bus_ranges_init(struct device_node *, struct sbus_bus *);
 extern void sbus_setup_iommu(struct sbus_bus *, struct device_node *);
-extern void sbus_setup_arch_props(struct sbus_bus *, struct device_node *);
 extern int sbus_arch_preinit(void);
 extern void sbus_arch_postinit(void);