summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorwdenk <wdenk>2005-05-16 15:23:22 +0000
committerwdenk <wdenk>2005-05-16 15:23:22 +0000
commit7680c140af9cac62c834f30d2d3c1479723ced69 (patch)
tree5f315fe7db8e19fabd9034f6f8e44a0ba440b207 /board
parentc01766307c1140955b71a9a842d742ee6478bd24 (diff)
downloadu-boot-7680c140af9cac62c834f30d2d3c1479723ced69.tar.gz
u-boot-7680c140af9cac62c834f30d2d3c1479723ced69.tar.xz
u-boot-7680c140af9cac62c834f30d2d3c1479723ced69.zip
Add PCI support for Sorcery board.
Code cleanup (especially Sorcery / Alaska / Yukon serial driver).
Diffstat (limited to 'board')
-rw-r--r--board/alaska/Makefile2
-rw-r--r--board/alaska/extserial.c110
-rw-r--r--board/sorcery/sorcery.c17
3 files changed, 18 insertions, 111 deletions
diff --git a/board/alaska/Makefile b/board/alaska/Makefile
index e4fe11005d..a4c1d2e9ac 100644
--- a/board/alaska/Makefile
+++ b/board/alaska/Makefile
@@ -24,7 +24,7 @@ include $(TOPDIR)/config.mk
LIB = lib$(BOARD).a
-OBJS := $(BOARD).o flash.o extserial.o
+OBJS := $(BOARD).o flash.o
$(LIB): $(OBJS) $(SOBJS)
$(AR) crv $@ $(OBJS)
diff --git a/board/alaska/extserial.c b/board/alaska/extserial.c
deleted file mode 100644
index f17e06e4ea..0000000000
--- a/board/alaska/extserial.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * (C) Copyright 2004, Freescale, Inc
- * TsiChung Liew, Tsi-Chung.Liew@freescale.com.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- */
-
-/*
- * Minimal serial functions needed to use one of the PSC ports
- * as serial console interface.
- */
-
-#include <common.h>
-#include <mpc8220.h>
-
-#if defined (CONFIG_EXTUART_CONSOLE)
-# include <ns16550.h>
-
-# define PADSERIAL_BAUD_115200 0x40
-# define PADSERIAL_BAUD_57600 0x20
-# define PADSERIAL_BAUD_9600 0
-# define PADCARD_FREQ 18432000
-
-const NS16550_t com_port = (NS16550_t) CFG_NS16550_COM1;
-
-int ext_serial_init (void)
-{
- DECLARE_GLOBAL_DATA_PTR;
- volatile u8 *dipswitch = (volatile u8 *) (CFG_CPLD_BASE + 0x1002);
- int baud_divisor;
-
- /* Find out the baud rate speed on debug card dip switches */
- if (*dipswitch & PADSERIAL_BAUD_115200)
- gd->baudrate = 115200;
- else if (*dipswitch & PADSERIAL_BAUD_57600)
- gd->baudrate = 57600;
- else
- gd->baudrate = 9600;
-
- /* Debug card frequency */
- baud_divisor = PADCARD_FREQ / (16 * gd->baudrate);
-
- NS16550_init (com_port, baud_divisor);
-
- return (0);
-}
-
-void ext_serial_putc (const char c)
-{
- if (c == '\n')
- NS16550_putc (com_port, '\r');
-
- NS16550_putc (com_port, c);
-}
-
-void ext_serial_puts (const char *s)
-{
- while (*s) {
- serial_putc (*s++);
- }
-}
-
-int ext_serial_getc (void)
-{
- return NS16550_getc (com_port);
-}
-
-int ext_serial_tstc (void)
-{
- return NS16550_tstc (com_port);
-}
-
-void ext_serial_setbrg (void)
-{
- DECLARE_GLOBAL_DATA_PTR;
-
- volatile u8 *dipswitch = (volatile u8 *) (CFG_CPLD_BASE + 0x1002);
- int baud_divisor;
-
- /* Find out the baud rate speed on debug card dip switches */
- if (*dipswitch & PADSERIAL_BAUD_115200)
- gd->baudrate = 115200;
- else if (*dipswitch & PADSERIAL_BAUD_57600)
- gd->baudrate = 57600;
- else
- gd->baudrate = 9600;
-
- /* Debug card frequency */
- baud_divisor = PADCARD_FREQ / (16 * gd->baudrate);
-
- NS16550_reinit (com_port, baud_divisor);
-}
-#endif /* CONFIG_EXTUART_CONSOLE */
diff --git a/board/sorcery/sorcery.c b/board/sorcery/sorcery.c
index a7ef85c9f0..35d6a06084 100644
--- a/board/sorcery/sorcery.c
+++ b/board/sorcery/sorcery.c
@@ -25,6 +25,7 @@
#include <mpc8220.h>
#include <asm/processor.h>
#include <asm/mmu.h>
+#include <pci.h>
long int initdram (int board_type)
{
@@ -41,3 +42,19 @@ int checkboard (void)
return 0;
}
+
+#if defined(CONFIG_PCI)
+/*
+ * Initialize PCI devices, report devices found.
+ */
+static struct pci_controller hose;
+
+#endif /* CONFIG_PCI */
+
+void pci_init_board (void)
+{
+#ifdef CONFIG_PCI
+ extern void pci_mpc8220_init (struct pci_controller *hose);
+ pci_mpc8220_init (&hose);
+#endif /* CONFIG_PCI */
+}