Skip to contentSkip to conversation

rapidio: add driver for TI KeyStone RapidIO

PATCH New jacquiot.aurelien at gmail.com 2 participants 2 messages Nov 10, 2015 – Jan 4, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/4 rapidio: add driver for TI KeyStone RapidIO

From: Aurelien Jacquiot <[email protected]>

This commit includes the KeyStone device driver for RapidIO allowing to use the RapidIO boot functionality.

Today only K2HK devices have RapidIO support.

---
 Makefile                       |    1 +
 configs/k2hk_evm_defconfig     |    2 +
 drivers/Kconfig                |    2 +
 drivers/rapidio/Kconfig        |    5 +
 drivers/rapidio/Makefile       |    8 +
 drivers/rapidio/keystone_rio.c | 1374 ++++++++++++++++++++++++++++++++++++++++
 drivers/rapidio/keystone_rio.h |  650 +++++++++++++++++++
 7 files changed, 2042 insertions(+), 0 deletions(-)
 create mode 100644 drivers/rapidio/Kconfig
 create mode 100644 drivers/rapidio/Makefile
 create mode 100644 drivers/rapidio/keystone_rio.c
 create mode 100644 drivers/rapidio/keystone_rio.h
Makefile +1 -0
index 3c21f8d..67e6b25 100644
@@ -661,6 +661,7 @@ libs-y += drivers/usb/musb/
 libs-y += drivers/usb/musb-new/
 libs-y += drivers/usb/phy/
 libs-y += drivers/usb/ulpi/
+libs-y += drivers/rapidio/
 libs-y += common/
 libs-$(CONFIG_API) += api/
 libs-$(CONFIG_HAS_POST) += post/
configs/k2hk_evm_defconfig +2 -0
index d5a4ef2..e350ea4 100644
@@ -11,3 +11,5 @@ CONFIG_SYS_PROMPT="K2HK EVM # "
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
 CONFIG_SPI_FLASH=y
+CONFIG_CMD_RIO=y
+CONFIG_KEYSTONE_RIO=y
drivers/Kconfig +2 -0
index c481e93..37a37a6 100644
@@ -70,6 +70,8 @@ source "drivers/video/Kconfig"
 
 source "drivers/watchdog/Kconfig"
 
+source "drivers/rapidio/Kconfig"
+
 config PHYS_TO_BUS
 	bool "Custom physical to bus address mapping"
 	help
drivers/rapidio/Kconfig new file +5 -0
new file mode 100644
index 0000000..2560957
@@ -0,0 +1,5 @@
+config KEYSTONE_RIO
+	bool "Support for TI KeyStone RapidIO"
+	depends on TARGET_K2HK_EVM
+        ---help---
+	  Say Y here if you want to use RapidIO to boot your board.
drivers/rapidio/Makefile new file +8 -0
new file mode 100644
index 0000000..bd7ec50
@@ -0,0 +1,8 @@
+#
+# (C) Copyright 2015
+# Texas Instruments Incorporated, <www.ti.com>
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+obj-$(CONFIG_KEYSTONE_RIO) += keystone_rio.o
drivers/rapidio/keystone_rio.c new file +1374 -0

1,374 lines not on this page · raw message

drivers/rapidio/keystone_rio.h new file +650 -0

650 lines not on this page · raw message

Signature · 1 line
1.6.2.1
#1 lore raw

PATCH 4/4 rapidio: add driver for TI KeyStone RapidIO

Quoted 8 lines · jacquiot.aurelien at gmail.com

From: Aurelien Jacquiot <[email protected]>

This commit includes the KeyStone device driver for RapidIO allowing to use the RapidIO boot functionality.

Today only K2HK devices have RapidIO support.

[snip]

Quoted 1 line

+#define debug_rio(fmt, args...) if (rio_dbg) printf(fmt, ##args)

Please use the normal debug() macro here.

[snip]

drivers/rapidio/keystone_rio.c line 176

Quoted 4 lines
drivers/rapidio/keystone_rio.c new file +4 -0
+		if (count >= KEYSTONE_RIO_TIMEOUT_CNT) {
+			debug_rio(
+				"RIO: timeout %d, ltid = %d, context = %d, lcb = %d, cc = %d\n",
+				count, ltid, context, lcb, status);

Here and elsewhere we have a bit of a funny line-break. It's OK to do:
debug("String that exceeds 80 char wide\n",
align, all, variables, on,
other, lines);

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/24b2515c/attachment.sig>