aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorSebastien Jan <s-jan@ti.com>2011-08-30 12:02:32 -0400
committerPaolo Pisati <paolo.pisati@canonical.com>2012-08-17 04:19:17 -0400
commite3696eca8424c9921779acfa7b16b771dfccc815 (patch)
tree265a041a308a52e52345c1331e4801381664aff1 /arch/arm/mach-omap2
parentaa1a747e2e01b5967bf6612807b9a2e2c3498e26 (diff)
fix: remove duplicate hwspinlock source
Signed-off-by: Sebastien Jan <s-jan@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/Makefile1
-rw-r--r--arch/arm/mach-omap2/hwspinlocks.c82
2 files changed, 0 insertions, 83 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 249f3a46f21..9da34c18f42 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -272,7 +272,6 @@ obj-y += $(nand-m) $(nand-y)
272 272
273smc91x-$(CONFIG_SMC91X) := gpmc-smc91x.o 273smc91x-$(CONFIG_SMC91X) := gpmc-smc91x.o
274obj-y += $(smc91x-m) $(smc91x-y) 274obj-y += $(smc91x-m) $(smc91x-y)
275obj-$(CONFIG_ARCH_OMAP4) += hwspinlocks.o
276 275
277smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o 276smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o
278obj-y += $(smsc911x-m) $(smsc911x-y) 277obj-y += $(smsc911x-m) $(smsc911x-y)
diff --git a/arch/arm/mach-omap2/hwspinlocks.c b/arch/arm/mach-omap2/hwspinlocks.c
deleted file mode 100644
index 3c71b92a482..00000000000
--- a/arch/arm/mach-omap2/hwspinlocks.c
+++ /dev/null
@@ -1,82 +0,0 @@
1/*
2 * OMAP hardware spinlock device initialization
3 *
4 * Copyright (C) 2010 Texas Instruments. All rights reserved.
5 *
6 * Contact: Simon Que <sque@ti.com>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
21 *
22 */
23
24#include <linux/module.h>
25#include <linux/interrupt.h>
26#include <linux/device.h>
27#include <linux/delay.h>
28#include <linux/io.h>
29#include <linux/slab.h>
30
31#include <plat/hwspinlock.h>
32#include <plat/omap_device.h>
33#include <plat/omap_hwmod.h>
34
35/* Spinlock register offsets */
36#define REVISION_OFFSET 0x0000
37#define SYSCONFIG_OFFSET 0x0010
38#define SYSSTATUS_OFFSET 0x0014
39#define LOCK_BASE_OFFSET 0x0800
40#define LOCK_OFFSET(i) (LOCK_BASE_OFFSET + 0x4 * (i))
41
42struct omap_device_pm_latency omap_spinlock_latency[] = {
43 {
44 .deactivate_func = omap_device_idle_hwmods,
45 .activate_func = omap_device_enable_hwmods,
46 .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
47 }
48};
49
50/* Initialization function */
51int __init hwspinlocks_init(void)
52{
53 int retval = 0;
54
55 struct hwspinlock_plat_info *pdata;
56 struct omap_hwmod *oh;
57 char *oh_name, *pdev_name;
58
59 if (!cpu_is_omap44xx())
60 return -EINVAL;
61
62 oh_name = "spinlock";
63 oh = omap_hwmod_lookup(oh_name);
64 if (WARN_ON(oh == NULL))
65 return -EINVAL;
66
67 pdev_name = "hwspinlock";
68
69 /* Pass data to device initialization */
70 pdata = kzalloc(sizeof(struct hwspinlock_plat_info), GFP_KERNEL);
71 if (WARN_ON(pdata == NULL))
72 return -ENOMEM;
73 pdata->sysstatus_offset = SYSSTATUS_OFFSET;
74 pdata->lock_base_offset = LOCK_BASE_OFFSET;
75
76 omap_device_build(pdev_name, 0, oh, pdata,
77 sizeof(struct hwspinlock_plat_info), omap_spinlock_latency,
78 ARRAY_SIZE(omap_spinlock_latency), false);
79
80 return retval;
81}
82postcore_initcall(hwspinlocks_init);