summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/board-mop500.c
diff options
context:
space:
mode:
authorPhilippe Langlais <philippe.langlais@stericsson.com>2011-10-19 10:15:48 +0200
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:02:17 +0200
commit55d7da7daecfea352df6f4200e4ce78753f82175 (patch)
tree35854de2a76189d380240a52ca78593a0315f7af /arch/arm/mach-ux500/board-mop500.c
parent7651851d2ac2383dc4a4b7e5aca9773131e083fc (diff)
mach-ux500: arm: add ST-E HSI controller
Signed-off-by: Pawel Szyszuk <pawel.szyszuk@stericsson.com>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500.c')
-rw-r--r--arch/arm/mach-ux500/board-mop500.c75
1 files changed, 75 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 1f1cec128cd..792d684eb8d 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -19,6 +19,7 @@
#include <linux/amba/pl022.h>
#include <linux/amba/serial.h>
#include <linux/spi/spi.h>
+#include <linux/hsi/hsi.h>
#include <linux/mfd/abx500/ab8500.h>
#include <linux/regulator/ab8500.h>
#include <linux/mfd/tc3589x.h>
@@ -785,6 +786,62 @@ static struct platform_device ste_ff_vibra_device = {
.name = "ste_ff_vibra"
};
+#ifdef CONFIG_HSI
+static struct hsi_board_info __initdata u8500_hsi_devices[] = {
+ {
+ .name = "hsi_char",
+ .hsi_id = 0,
+ .port = 0,
+ .tx_cfg = {
+ .mode = HSI_MODE_STREAM,
+ .channels = 2,
+ .speed = 100000,
+ {.arb_mode = HSI_ARB_RR},
+ },
+ .rx_cfg = {
+ .mode = HSI_MODE_STREAM,
+ .channels = 2,
+ .speed = 200000,
+ {.flow = HSI_FLOW_SYNC},
+ },
+ },
+ {
+ .name = "hsi_test",
+ .hsi_id = 0,
+ .port = 0,
+ .tx_cfg = {
+ .mode = HSI_MODE_FRAME,
+ .channels = 2,
+ .speed = 100000,
+ {.arb_mode = HSI_ARB_RR},
+ },
+ .rx_cfg = {
+ .mode = HSI_MODE_FRAME,
+ .channels = 2,
+ .speed = 200000,
+ {.flow = HSI_FLOW_SYNC},
+ },
+ },
+ {
+ .name = "cfhsi_v3_driver",
+ .hsi_id = 0,
+ .port = 0,
+ .tx_cfg = {
+ .mode = HSI_MODE_STREAM,
+ .channels = 2,
+ .speed = 20000,
+ {.arb_mode = HSI_ARB_RR},
+ },
+ .rx_cfg = {
+ .mode = HSI_MODE_STREAM,
+ .channels = 2,
+ .speed = 200000,
+ {.flow = HSI_FLOW_SYNC},
+ },
+ },
+};
+#endif
+
#ifdef CONFIG_U8500_SIM_DETECT
static struct sim_detect_platform_data sim_detect_pdata = {
.irq_num = MOP500_AB8500_VIR_GPIO_IRQ(6),
@@ -889,6 +946,9 @@ static struct platform_device *mop500_platform_devs[] __initdata = {
#ifdef CONFIG_DB8500_MLOADER
&mloader_fw_device,
#endif
+#ifdef CONFIG_HSI
+ &u8500_hsi_device,
+#endif
#ifdef CONFIG_MODEM_U8500
&u8500_modem_dev,
#endif
@@ -1149,6 +1209,11 @@ static void __init mop500_init_machine(void)
u8500_cryp1_hash1_init();
+#ifdef CONFIG_HSI
+ hsi_register_board_info(u8500_hsi_devices,
+ ARRAY_SIZE(u8500_hsi_devices));
+#endif
+
/* FIXME: parent of ab8500 should be prcmu */
for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
mop500_platform_devs[i]->dev.parent = parent;
@@ -1194,6 +1259,11 @@ ifdef CONFIG_REGULATOR
u8500_cryp1_hash1_init();
+#ifdef CONFIG_HSI
+ hsi_register_board_info(u8500_hsi_devices,
+ ARRAY_SIZE(u8500_hsi_devices));
+#endif
+
for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++)
snowball_platform_devs[i]->dev.parent = parent;
@@ -1236,6 +1306,11 @@ static void __init hrefv60_init_machine(void)
u8500_cryp1_hash1_init();
+#ifdef CONFIG_HSI
+ hsi_register_board_info(u8500_hsi_devices,
+ ARRAY_SIZE(u8500_hsi_devices));
+#endif
+
for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
mop500_platform_devs[i]->dev.parent = parent;