aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/Kconfig10
-rw-r--r--arch/arm/plat-omap/devices.c96
-rw-r--r--arch/arm/plat-omap/include/plat/dsscomp.h2
-rw-r--r--arch/arm/plat-omap/include/plat/temperature_sensor.h65
4 files changed, 76 insertions, 97 deletions
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index e85abd8..77a1f82 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -220,6 +220,16 @@ config OMAP_SERIAL_WAKE
to data on the serial RX line. This allows you to wake the
system from serial console.
+config OMAP_TEMP_SENSOR
+ bool "OMAP Temp Sensor Support"
+ depends on ARCH_OMAP4
+ default n
+ help
+ Say Y here if you want support for the temp sensor on OMAP4460.
+ This provides the temperature of the MPU
+ subsystem. Only one instance of on die temperature
+ sensor is present.
+
# this carveout should probably become generic and not omap specific
config OMAP_REMOTEPROC_MEMPOOL_SIZE
hex "Physical carveout memory pool size (Byte)"
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index bb60ff7..d8add7e7 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -30,12 +30,9 @@
#include <mach/gpio.h>
#include <plat/menelaus.h>
#include <plat/mcbsp.h>
-#include <plat/mcpdm.h>
#include <plat/remoteproc.h>
#include <plat/omap44xx.h>
-#include <sound/omap-abe-dsp.h>
-
/*-------------------------------------------------------------------------*/
#if defined(CONFIG_OMAP_MCBSP) || defined(CONFIG_OMAP_MCBSP_MODULE)
@@ -81,48 +78,6 @@ void omap_mcbsp_register_board_cfg(struct resource *res, int res_count,
/*-------------------------------------------------------------------------*/
-#if defined(CONFIG_SND_OMAP_SOC_MCPDM) || \
- defined(CONFIG_SND_OMAP_SOC_MCPDM_MODULE)
-
-static struct omap_device_pm_latency omap_mcpdm_latency[] = {
- {
- .deactivate_func = omap_device_idle_hwmods,
- .activate_func = omap_device_enable_hwmods,
- .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
- },
-};
-
-static void omap_init_mcpdm(void)
-{
- struct omap_hwmod *oh;
- struct omap_device *od;
- struct omap_mcpdm_platform_data *pdata;
-
- oh = omap_hwmod_lookup("mcpdm");
- if (!oh) {
- printk(KERN_ERR "Could not look up mcpdm hw_mod\n");
- return;
- }
-
- pdata = kzalloc(sizeof(struct omap_mcpdm_platform_data), GFP_KERNEL);
- if (!pdata) {
- printk(KERN_ERR "Could not allocate platform data\n");
- return;
- }
-
- od = omap_device_build("omap-mcpdm", -1, oh, pdata,
- sizeof(struct omap_mcpdm_platform_data),
- omap_mcpdm_latency,
- ARRAY_SIZE(omap_mcpdm_latency), 0);
- if (IS_ERR(od))
- printk(KERN_ERR "Could not build omap_device for omap-mcpdm-dai\n");
-}
-#else
-static inline void omap_init_mcpdm(void) {}
-#endif
-
-/*-------------------------------------------------------------------------*/
-
#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \
defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
@@ -173,55 +128,6 @@ fail:
/*-------------------------------------------------------------------------*/
-#if defined(CONFIG_SND_OMAP_SOC_ABE_DSP) || \
- defined(CONFIG_SND_OMAP_SOC_ABE_DSP_MODULE)
-
-static struct omap_device_pm_latency omap_aess_latency[] = {
- {
- .deactivate_func = omap_device_idle_hwmods,
- .activate_func = omap_device_enable_hwmods,
- .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
- },
-};
-
-static void omap_init_aess(void)
-{
- struct omap_hwmod *oh;
- struct omap_device *od;
- struct omap4_abe_dsp_pdata *pdata;
-
- oh = omap_hwmod_lookup("aess");
- if (!oh) {
- printk (KERN_ERR "Could not look up aess hw_mod\n");
- return;
- }
-
- pdata = kzalloc(sizeof(struct omap4_abe_dsp_pdata), GFP_KERNEL);
- if (!pdata) {
- printk(KERN_ERR "Could not allocate platform data\n");
- return;
- }
-
- /* FIXME: Add correct context loss counter */
- //pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count;
-
- od = omap_device_build("aess", -1, oh, pdata,
- sizeof(struct omap4_abe_dsp_pdata),
- omap_aess_latency,
- ARRAY_SIZE(omap_aess_latency), 0);
-
- kfree(pdata);
-
- if (IS_ERR(od))
- printk(KERN_ERR "Could not build omap_device for omap-aess-audio\n");
-}
-#else
-static inline void omap_init_aess(void) {}
-#endif
-
-
-/*-------------------------------------------------------------------------*/
-
#if defined(CONFIG_HW_RANDOM_OMAP) || defined(CONFIG_HW_RANDOM_OMAP_MODULE)
#ifdef CONFIG_ARCH_OMAP2
@@ -421,8 +327,6 @@ static int __init omap_init_devices(void)
* in alphabetical order so they're easier to sort through.
*/
omap_init_rng();
- omap_init_mcpdm();
- omap_init_aess();
omap_init_uwire();
return 0;
}
diff --git a/arch/arm/plat-omap/include/plat/dsscomp.h b/arch/arm/plat-omap/include/plat/dsscomp.h
index b9f5773..f9f87cb 100644
--- a/arch/arm/plat-omap/include/plat/dsscomp.h
+++ b/arch/arm/plat-omap/include/plat/dsscomp.h
@@ -18,7 +18,7 @@ int dsscomp_delayed_apply(dsscomp_t comp);
void dsscomp_drop(dsscomp_t c);
struct tiler_pa_info;
-int dsscomp_gralloc_queue(struct dsscomp_setup_mgr_data *d,
+int dsscomp_gralloc_queue(struct dsscomp_setup_dispc_data *d,
struct tiler_pa_info **pas,
void (*cb_fn)(void *, int), void *cb_arg);
#endif
diff --git a/arch/arm/plat-omap/include/plat/temperature_sensor.h b/arch/arm/plat-omap/include/plat/temperature_sensor.h
new file mode 100644
index 0000000..5f0d6b3
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/temperature_sensor.h
@@ -0,0 +1,65 @@
+/*
+ * OMAP446x Temperature sensor header file
+ *
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ * Author: J Keerthy <j-keerthy@ti.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_TEMPERATURE_SENSOR_H
+#define __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_TEMPERATURE_SENSOR_H
+
+/*
+ * Offsets from the base of temperature sensor registers
+ */
+#define TEMP_SENSOR_CTRL_OFFSET 0x00
+#define BGAP_CTRL_OFFSET 0x4c
+#define BGAP_COUNTER_OFFSET 0x50
+#define BGAP_THRESHOLD_OFFSET 0x54
+#define BGAP_TSHUT_OFFSET 0x58
+#define BGAP_STATUS_OFFSET 0x5c
+
+#define OMAP_TSHUT_GPIO 86
+
+
+/*
+ * omap_temp_sensor platform data
+ * @name - name
+ * @irq - Irq number for thermal alertemp_sensor
+ * @offset - offset of the temp sensor ctrl register
+ */
+struct omap_temp_sensor_pdata {
+ char *name;
+ u32 offset;
+ int irq;
+};
+
+#ifdef CONFIG_OMAP_TEMP_SENSOR
+void omap_temp_sensor_resume_idle(void);
+void omap_temp_sensor_prepare_idle(void);
+#else
+static inline void omap_temp_sensor_resume_idle(void) { }
+static inline void omap_temp_sensor_prepare_idle(void) { }
+#endif
+
+#ifdef CONFIG_OMAP_DIE_TEMP_SENSOR
+void omap_temp_sensor_idle(int idle_state);
+#else
+static inline void omap_temp_sensor_idle(int idle_state) { }
+#endif
+
+#endif