summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuhiro Iwamatsu <iwamatsu@nigauri.org>2008-03-24 02:11:26 +0900
committerNobuhiro Iwamatsu <iwamatsu@nigauri.org>2008-03-28 14:16:13 +0900
commitab8f4d40d069cd3cbe7563ddfe3e5f03b0c7c721 (patch)
tree0e30cc5147918e198607fd0d4f99b0332fe9b82d
parent566933278101c144d75361ea682678a326c1290d (diff)
sh: Move SuperH PCI driver from cpu/sh4 to drivers/pci
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
-rw-r--r--cpu/sh4/Makefile3
-rw-r--r--drivers/pci/Makefile2
-rw-r--r--drivers/pci/pci_sh4.c (renamed from cpu/sh4/pci-sh4.c)7
-rw-r--r--drivers/pci/pci_sh7780.c (renamed from cpu/sh4/pci-sh7780.c)6
-rw-r--r--include/configs/r7780mp.h1
5 files changed, 6 insertions, 13 deletions
diff --git a/cpu/sh4/Makefile b/cpu/sh4/Makefile
index 7a53cb6dc..1bb8bd772 100644
--- a/cpu/sh4/Makefile
+++ b/cpu/sh4/Makefile
@@ -29,8 +29,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(CPU).a
START = start.o
-OBJS = cpu.o interrupts.o watchdog.o time.o cache.o \
- pci-sh4.o pci-sh7780.o
+OBJS = cpu.o interrupts.o watchdog.o time.o cache.o
all: .depend $(START) $(LIB)
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index fe4583946..ef7781f89 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -31,6 +31,8 @@ COBJS-y += pci_auto.o
COBJS-y += pci_indirect.o
COBJS-y += tsi108_pci.o
COBJS-y += w83c553f.o
+COBJS-$(CONFIG_SH4_PCI) += pci_sh4.o
+COBJS-$(CONFIG_SH7780_PCI) +=pci_sh7780.o
COBJS := $(COBJS-y)
SRCS := $(COBJS:.o=.c)
diff --git a/cpu/sh4/pci-sh4.c b/drivers/pci/pci_sh4.c
index 9d14f8d0f..1290c0a79 100644
--- a/cpu/sh4/pci-sh4.c
+++ b/drivers/pci/pci_sh4.c
@@ -1,7 +1,7 @@
/*
* SH4 PCI Controller (PCIC) for U-Boot.
* (C) Dustin McIntire (dustin@sensoria.com)
- * (C) 2007 Nobuhiro Iwamatsu
+ * (C) 2007,2008 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
* (C) 2008 Yusuke Goda <goda.yusuke@renesas.com>
*
* u-boot/cpu/sh4/pci-sh4.c
@@ -27,9 +27,6 @@
#include <common.h>
-#if defined(CONFIG_PCI) && \
- defined(CONFIG_SH4_PCI)
-
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/pci.h>
@@ -77,5 +74,3 @@ int pci_sh4_init(struct pci_controller *hose)
hose->last_busno = pci_hose_scan(hose);
return 0;
}
-
-#endif /* defined(CONFIG_PCI) && defined(CONFIG_SH4_PCI) */
diff --git a/cpu/sh4/pci-sh7780.c b/drivers/pci/pci_sh7780.c
index 851d767e0..d63d67d2d 100644
--- a/cpu/sh4/pci-sh7780.c
+++ b/drivers/pci/pci_sh7780.c
@@ -1,7 +1,7 @@
/*
* SH7780 PCI Controller (PCIC) for U-Boot.
* (C) Dustin McIntire (dustin@sensoria.com)
- * (C) 2007 Nobuhiro Iwamatsu
+ * (C) 2007,2008 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
* (C) 2008 Yusuke Goda <goda.yusuke@renesas.com>
*
* See file CREDITS for list of people who contributed to this
@@ -25,9 +25,6 @@
#include <common.h>
-#if defined(CONFIG_PCI) && defined(CONFIG_SH4_PCI) \
- && defined(CONFIG_CPU_SH7780)
-
#include <asm/processor.h>
#include <asm/io.h>
#include <pci.h>
@@ -108,4 +105,3 @@ int pci_sh7780_init(struct pci_controller *hose)
pci_sh4_init(hose);
return 0;
}
-#endif /* defined(CONFIG_PCI) && defined(CONFIG_CPU_SH7780) */
diff --git a/include/configs/r7780mp.h b/include/configs/r7780mp.h
index 3ddb2f46a..42787f4fd 100644
--- a/include/configs/r7780mp.h
+++ b/include/configs/r7780mp.h
@@ -125,6 +125,7 @@
#if defined(CONFIG_CMD_PCI)
#define CONFIG_PCI
#define CONFIG_SH4_PCI
+#define CONFIG_SH7780_PCI
#define CONFIG_PCI_PNP
#define CONFIG_PCI_SCAN_SHOW 1
#define __io