[U-Boot-Users] [PATCH] Add the RapidIO framework for U-Boot

Zhang Wei wei.zhang at freescale.com
Tue Nov 13 08:18:38 CET 2007


The patch adds the RapidIO framework into U-Boot. The board configuration
can be added into individual rio_init_board() function. Some functions
about RapidIO can be added later.

Signed-off-by: Zhang Wei <wei.zhang at freescale.com>
---
 drivers/Makefile |    1 +
 drivers/rio.c    |   30 ++++++++++++++++++++++++++++++
 include/common.h |    3 +++
 lib_ppc/board.c  |    5 +++++
 4 files changed, 39 insertions(+), 0 deletions(-)
 create mode 100644 drivers/rio.c

diff --git a/drivers/Makefile b/drivers/Makefile
index 00978d8..c9fb135 100755
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -40,6 +40,7 @@ COBJS	= 3c589.o 5701rls.o ali512x.o at45.o ata_piix.o \
 	  ns16550.o ns8382x.o ns87308.o ns7520_eth.o omap1510_i2c.o \
 	  omap24xx_i2c.o pc_keyb.o \
 	  pci.o pci_auto.o pci_indirect.o \
+	  rio.o \
 	  pcnet.o plb2800_eth.o ps2ser.o ps2mult.o pxa_pcmcia.o \
 	  rpx_pcmcia.o rtl8019.o rtl8139.o rtl8169.o \
 	  s3c4510b_eth.o s3c4510b_uart.o \
diff --git a/drivers/rio.c b/drivers/rio.c
new file mode 100644
index 0000000..a50dde7
--- /dev/null
+++ b/drivers/rio.c
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
+ *
+ * Author: Zhang Wei, wei.zhang at freescale.com, Jun 2007
+ *
+ * Description:
+ * RapidIO initialization file.
+ *
+ * This 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.
+ *
+ */
+
+#include <common.h>
+
+#ifdef CONFIG_RAPIDIO
+
+#include <command.h>
+#include <asm/processor.h>
+#include <asm/io.h>
+
+void rio_init(void)
+{
+	/* Call board specific rio_init() */
+	rio_init_board();
+}
+
+#endif /* CONFIG_RAPIDIO */
diff --git a/include/common.h b/include/common.h
index aca281b..8e89e6b 100644
--- a/include/common.h
+++ b/include/common.h
@@ -279,6 +279,9 @@ void	pciinfo	      (int, int);
 #endif
 #endif
 
+void	rio_init      (void);
+void	rio_init_board(void);
+
 int	misc_init_f   (void);
 int	misc_init_r   (void);
 
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index 9aa67f9..c797948 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -921,6 +921,11 @@ void board_init_r (gd_t *id, ulong dest_addr)
 	pci_init ();
 #endif
 
+#if defined(CONFIG_RAPIDIO)
+	/* Do RapidIO configuration */
+	rio_init ();
+#endif
+
 /** leave this here (after malloc(), environment and PCI are working) **/
 	/* Initialize devices */
 	devices_init ();
-- 
1.5.2





More information about the U-Boot mailing list