From 0cb7b2afd79c5715cbd1d4eee826571fb17fdd65 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Sat, 29 Oct 2005 22:07:56 +1000 Subject: [PATCH] powerpc: Merge maple support code to arch/powerpc/platforms/maple Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/Makefile | 1 + arch/powerpc/platforms/maple/Makefile | 1 + arch/powerpc/platforms/maple/maple.h | 12 ++++++++++++ .../maple_pci.c => powerpc/platforms/maple/pci.c} | 2 ++ .../platforms/maple/setup.c} | 11 +++-------- .../maple_time.c => powerpc/platforms/maple/time.c} | 2 ++ arch/ppc64/kernel/Makefile | 3 +-- 7 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 arch/powerpc/platforms/maple/Makefile create mode 100644 arch/powerpc/platforms/maple/maple.h rename arch/{ppc64/kernel/maple_pci.c => powerpc/platforms/maple/pci.c} (99%) rename arch/{ppc64/kernel/maple_setup.c => powerpc/platforms/maple/setup.c} (95%) rename arch/{ppc64/kernel/maple_time.c => powerpc/platforms/maple/time.c} (99%) diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile index 01723d491b..172c0db635 100644 --- a/arch/powerpc/platforms/Makefile +++ b/arch/powerpc/platforms/Makefile @@ -10,3 +10,4 @@ obj-$(CONFIG_4xx) += 4xx/ obj-$(CONFIG_85xx) += 85xx/ obj-$(CONFIG_PPC_PSERIES) += pseries/ obj-$(CONFIG_PPC_ISERIES) += iseries/ +obj-$(CONFIG_PPC_MAPLE) += maple/ diff --git a/arch/powerpc/platforms/maple/Makefile b/arch/powerpc/platforms/maple/Makefile new file mode 100644 index 0000000000..1be1a993c5 --- /dev/null +++ b/arch/powerpc/platforms/maple/Makefile @@ -0,0 +1 @@ +obj-y += setup.o pci.o time.o diff --git a/arch/powerpc/platforms/maple/maple.h b/arch/powerpc/platforms/maple/maple.h new file mode 100644 index 0000000000..0657c579b8 --- /dev/null +++ b/arch/powerpc/platforms/maple/maple.h @@ -0,0 +1,12 @@ +/* + * Declarations for maple-specific code. + * + * Maple is the name of a PPC970 evaluation board. + */ +extern int maple_set_rtc_time(struct rtc_time *tm); +extern void maple_get_rtc_time(struct rtc_time *tm); +extern unsigned long maple_get_boot_time(void); +extern void maple_calibrate_decr(void); +extern void maple_pci_init(void); +extern void maple_pcibios_fixup(void); +extern int maple_pci_get_legacy_ide_irq(struct pci_dev *dev, int channel); diff --git a/arch/ppc64/kernel/maple_pci.c b/arch/powerpc/platforms/maple/pci.c similarity index 99% rename from arch/ppc64/kernel/maple_pci.c rename to arch/powerpc/platforms/maple/pci.c index 633324b5e6..340c21caea 100644 --- a/arch/ppc64/kernel/maple_pci.c +++ b/arch/powerpc/platforms/maple/pci.c @@ -25,6 +25,8 @@ #include #include +#include "maple.h" + #ifdef DEBUG #define DBG(x...) printk(x) #else diff --git a/arch/ppc64/kernel/maple_setup.c b/arch/powerpc/platforms/maple/setup.c similarity index 95% rename from arch/ppc64/kernel/maple_setup.c rename to arch/powerpc/platforms/maple/setup.c index a107ed69a3..7ece8983a1 100644 --- a/arch/ppc64/kernel/maple_setup.c +++ b/arch/powerpc/platforms/maple/setup.c @@ -1,5 +1,5 @@ /* - * arch/ppc64/kernel/maple_setup.c + * Maple (970 eval board) setup code * * (c) Copyright 2004 Benjamin Herrenschmidt (benh@kernel.crashing.org), * IBM Corp. @@ -62,19 +62,14 @@ #include #include +#include "maple.h" + #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) #else #define DBG(fmt...) #endif -extern int maple_set_rtc_time(struct rtc_time *tm); -extern void maple_get_rtc_time(struct rtc_time *tm); -extern unsigned long maple_get_boot_time(void); -extern void maple_calibrate_decr(void); -extern void maple_pci_init(void); -extern void maple_pcibios_fixup(void); -extern int maple_pci_get_legacy_ide_irq(struct pci_dev *dev, int channel); extern void generic_find_legacy_serial_ports(u64 *physport, unsigned int *default_speed); diff --git a/arch/ppc64/kernel/maple_time.c b/arch/powerpc/platforms/maple/time.c similarity index 99% rename from arch/ppc64/kernel/maple_time.c rename to arch/powerpc/platforms/maple/time.c index 445cb7470b..40fc07a8e6 100644 --- a/arch/ppc64/kernel/maple_time.c +++ b/arch/powerpc/platforms/maple/time.c @@ -36,6 +36,8 @@ #include #include +#include "maple.h" + #ifdef DEBUG #define DBG(x...) printk(x) #else diff --git a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile index 3cf7f3dab5..327c08ce42 100644 --- a/arch/ppc64/kernel/Makefile +++ b/arch/ppc64/kernel/Makefile @@ -55,8 +55,7 @@ obj-$(CONFIG_HVCS) += hvcserver.o obj-$(CONFIG_PPC_PMAC) += udbg_scc.o -obj-$(CONFIG_PPC_MAPLE) += maple_setup.o maple_pci.o maple_time.o \ - udbg_16550.o +obj-$(CONFIG_PPC_MAPLE) += udbg_16550.o ifdef CONFIG_SMP obj-$(CONFIG_PPC_PMAC) += smp-tbsync.o -- 2.39.5