ARM: OMAP: Merge driver headers from N800 tree
authorKai Svahn <kai.svahn@nokia.com>
Fri, 26 Jan 2007 21:14:34 +0000 (13:14 -0800)
committerTony Lindgren <tony@atomide.com>
Mon, 6 Aug 2007 09:22:26 +0000 (02:22 -0700)
This patch merges omap specific driver headers from
N800 tree.

Signed-off-by: Kai Svahn <kai.svahn@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
include/asm-arm/arch-omap/blizzard.h [new file with mode: 0644]
include/asm-arm/arch-omap/eac.h [new file with mode: 0644]
include/asm-arm/arch-omap/menelaus.h
include/asm-arm/arch-omap/mmc.h [new file with mode: 0644]
include/asm-arm/arch-omap/onenand.h [new file with mode: 0644]

diff --git a/include/asm-arm/arch-omap/blizzard.h b/include/asm-arm/arch-omap/blizzard.h
new file mode 100644 (file)
index 0000000..8d160f1
--- /dev/null
@@ -0,0 +1,12 @@
+#ifndef _BLIZZARD_H
+#define _BLIZZARD_H
+
+struct blizzard_platform_data {
+       void            (*power_up)(struct device *dev);
+       void            (*power_down)(struct device *dev);
+       unsigned long   (*get_clock_rate)(struct device *dev);
+
+       unsigned        te_connected : 1;
+};
+
+#endif
diff --git a/include/asm-arm/arch-omap/eac.h b/include/asm-arm/arch-omap/eac.h
new file mode 100644 (file)
index 0000000..5a4c831
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ * linux/include/asm-arm/arch-omap2/eac.h
+ *
+ * Defines for Enhanced Audio Controller
+ *
+ * Contact: Jarkko Nikula <jarkko.nikula@nokia.com>
+ *
+ * Copyright (C) 2006 Nokia Corporation
+ * Copyright (C) 2004 Texas Instruments, Inc.
+ *
+ * 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 __ASM_ARM_ARCH_OMAP2_EAC_H
+#define __ASM_ARM_ARCH_OMAP2_EAC_H
+
+#include <asm/arch/io.h>
+#include <asm/arch/hardware.h>
+#include <asm/irq.h>
+
+#include <sound/driver.h>
+#include <sound/core.h>
+
+/* master codec clock source */
+#define EAC_MCLK_EXT_MASK      0x100
+enum eac_mclk_src {
+       EAC_MCLK_INT_11290000, /* internal 96 MHz / 8.5 = 11.29 Mhz */
+       EAC_MCLK_EXT_11289600 = EAC_MCLK_EXT_MASK,
+       EAC_MCLK_EXT_12288000,
+       EAC_MCLK_EXT_2x11289600,
+       EAC_MCLK_EXT_2x12288000,
+};
+
+/* codec port interface mode */
+enum eac_codec_mode {
+       EAC_CODEC_PCM,
+       EAC_CODEC_AC97,
+       EAC_CODEC_I2S,
+};
+
+/* configuration structure for I2S mode */
+struct eac_i2s_conf {
+       /* it seems according to TRM that the polarity-changed I2S mode is not
+        * only that frame sync polarity (EAC.AC_FS) is changed but also direction
+        * of it and interface serial clock (EAC.AC_SCLK) */
+       unsigned        polarity_changed_mode:1;
+       /* if enabled, then serial data starts one clock cycle after the
+        * of EAC.AC_FS for first audio slot */
+       unsigned        sync_delay_enable:1;
+};
+
+/* configuration structure for EAC codec port */
+struct eac_codec {
+       enum eac_mclk_src       mclk_src;
+
+       enum eac_codec_mode     codec_mode;
+       union {
+               struct eac_i2s_conf     i2s;
+       } codec_conf;
+
+       int             default_rate; /* audio sampling rate */
+
+       int             (* set_power)(void *private_data, int dac, int adc);
+       int             (* register_controls)(void *private_data,
+                                             struct snd_card *card);
+       const char      *short_name;
+
+       void            *private_data;
+};
+
+/* structure for passing platform dependent data to the EAC driver */
+struct eac_platform_data {
+        int    (* init)(struct device *eac_dev);
+       void    (* cleanup)(struct device *eac_dev);
+       /* these callbacks are used to configure & control external MCLK
+        * source. NULL if not used */
+       int     (* enable_ext_clocks)(struct device *eac_dev);
+       void    (* disable_ext_clocks)(struct device *eac_dev);
+};
+
+extern void omap_init_eac(struct eac_platform_data *pdata);
+
+extern int eac_register_codec(struct device *eac_dev, struct eac_codec *codec);
+extern void eac_unregister_codec(struct device *eac_dev);
+
+extern int eac_set_mode(struct device *eac_dev, int play, int rec);
+
+#endif /* __ASM_ARM_ARCH_OMAP2_EAC_H */
index 82d276a..0c401c4 100644 (file)
@@ -7,6 +7,15 @@
 #ifndef __ASM_ARCH_MENELAUS_H
 #define __ASM_ARCH_MENELAUS_H
 
+struct device;
+
+struct menelaus_platform_data {
+       int (* late_init)(struct device *dev);
+};
+
+/* Call only at init time. */
+extern void menelaus_set_platform_data(struct menelaus_platform_data *pdata);
+
 extern int menelaus_register_mmc_callback(void (*callback)(void *data, u8 card_mask),
                                          void *data);
 extern void menelaus_unregister_mmc_callback(void);
@@ -20,6 +29,19 @@ extern int menelaus_set_vaux(unsigned int mV);
 extern int menelaus_set_vdcdc(int dcdc, unsigned int mV);
 extern int menelaus_set_slot_sel(int enable);
 extern int menelaus_get_slot_pin_states(void);
+extern int menelaus_set_vcore_sw(unsigned int mV);
+extern int menelaus_set_vcore_hw(unsigned int roof_mV, unsigned int floor_mV);
+
+#define EN_VPLL_SLEEP  (1 << 7)
+#define EN_VMMC_SLEEP  (1 << 6)
+#define EN_VAUX_SLEEP  (1 << 5)
+#define EN_VIO_SLEEP   (1 << 4)
+#define EN_VMEM_SLEEP  (1 << 3)
+#define EN_DC3_SLEEP   (1 << 2)
+#define EN_DC2_SLEEP   (1 << 1)
+#define EN_VC_SLEEP    (1 << 0)
+
+extern int menelaus_set_regulator_sleep(int enable, u32 val);
 
 #if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_MENELAUS)
 #define omap_has_menelaus()    1
@@ -28,4 +50,3 @@ extern int menelaus_get_slot_pin_states(void);
 #endif
 
 #endif
-
Simple merge
Simple merge