: sparc64: Start commonizing code common between SABRE
PATCH 1/3 : sparc64: Start commonizing code common between SABRE
sparc64: Start commonizing code common between SABRE and PSYCHO.
These are very similar chips, in fact they are identical in some macro blocks.
So start commonizing code which they can share. We begin with the IOMMU initialization sequence.
Signed-off-by David S. Miller <[email protected]>
--- arch/sparc64/kernel/Makefile | 2 +- arch/sparc64/kernel/pci_psycho.c | 65 +++---------------------- arch/sparc64/kernel/pci_sabre.c | 63 +----------------------- arch/sparc64/kernel/psycho_common.c | 93 +++++++++++++++++++++++++++++++++++ arch/sparc64/kernel/psycho_common.h | 8 +++ 5 files changed, 111 insertions(+), 120 deletions(-) create mode 100644 arch/sparc64/kernel/psycho_common.c create mode 100644 arch/sparc64/kernel/psycho_common.h
arch/sparc64/kernel/Makefile +1 -1
@@ -16,7 +16,7 @@ obj-y := process.o setup.o cpu.o idprom.o reboot.o \ obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o obj-$(CONFIG_STACKTRACE) += stacktrace.o -obj-$(CONFIG_PCI) += pci.o pci_common.o \ +obj-$(CONFIG_PCI) += pci.o pci_common.o psycho_common.o \ pci_psycho.o pci_sabre.o pci_schizo.o \ pci_sun4v.o pci_sun4v_asm.o pci_fire.o obj-$(CONFIG_PCI_MSI) += pci_msi.o
arch/sparc64/kernel/pci_psycho.c +7 -58
85 lines not on this page · raw message
arch/sparc64/kernel/pci_sabre.c +2 -61
81 lines not on this page · raw message
arch/sparc64/kernel/psycho_common.c new file +93 -0
93 lines not on this page · raw message
arch/sparc64/kernel/psycho_common.h new file +8 -0
@@ -0,0 +1,8 @@ +#ifndef _PSYCHO_COMMON_H +#define _PSYCHO_COMMON_H + +extern int psycho_iommu_init (struct pci_pbm_info *pbm,int tsbsize, +u32 dvma_offset,u32 dma_mask, +unsigned long write_complete_offset); + +#endif /* _PSYCHO_COMMON_H */
Signature · 1 line
1.5.6.5.GIT