aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCyril Chemparathy <cyril@ti.com>2012-01-19 18:32:30 -0500
committerCyril Chemparathy <cyril@ti.com>2012-09-21 10:44:05 -0400
commitcbf7672f21f6828694ae75177ab563ff2ef6bd25 (patch)
treeec5ece5b1f23cf37d64d7e5c057b5c9178b7017c
parent5e3977384086281f967b977ff395a338b8682cbc (diff)
downloadlinux-keystone-cbf7672f21f6828694ae75177ab563ff2ef6bd25.tar.gz
tci6614: add hardware semaphore device
This patch adds device definitions for the hardware semaphore.
-rw-r--r--arch/arm/mach-davinci/devices-tci6614.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/devices-tci6614.c b/arch/arm/mach-davinci/devices-tci6614.c
index 4b15b7577f7810..a97f48494af3a9 100644
--- a/arch/arm/mach-davinci/devices-tci6614.c
+++ b/arch/arm/mach-davinci/devices-tci6614.c
@@ -18,6 +18,7 @@
#include <linux/dma-mapping.h>
#include <linux/clk.h>
#include <linux/slab.h>
+#include <linux/hwspinlock.h>
#include <mach/common.h>
#include <mach/irqs.h>
@@ -33,6 +34,7 @@
#define TCI6614_WDOG_BASE 0x02280000
#define TCI6614_I2C_BASE 0x02530000
#define TCI6614_SPI_BASE 0x20BF0000
+#define TCI6614_SEM_BASE 0x02640000
#define TCI6614_ASYNC_EMIF_CNTRL_BASE 0x20C00000
#define TCI6614_ASYNC_EMIF_DATA_CE0_BASE 0x70000000
#define TCI6614_ASYNC_EMIF_DATA_CE1_BASE 0x74000000
@@ -157,6 +159,26 @@ struct platform_device tci6614_wdt_device = {
.resource = wdt_resources,
};
+static struct hwspinlock_pdata sem_data = {
+ .base_id = 0,
+};
+
+static struct resource sem_resources[] = {
+ {
+ .start = TCI6614_SEM_BASE,
+ .end = TCI6614_SEM_BASE + 0x7ff,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+struct platform_device tci6614_sem_device = {
+ .name = "keystone_hwspinlock",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(sem_resources),
+ .resource = sem_resources,
+ .dev.platform_data = &sem_data,
+};
+
static int __init nand_init(int chipsel, struct davinci_nand_pdata *data)
{
struct resource res[2];
@@ -206,6 +228,7 @@ void __init tci6614_devices_init(struct tci6614_device_info *info)
davinci_serial_init(info->serial_config);
platform_device_register(&tci6614_wdt_device);
+ platform_device_register(&tci6614_sem_device);
for (i = 0; i < 4; i++)
if (info->nand_config[i])