aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-arm')
-rw-r--r--include/asm-arm/arch-omap/blizzard.h12
-rw-r--r--include/asm-arm/arch-omap/eac.h101
-rw-r--r--include/asm-arm/arch-omap/menelaus.h20
-rw-r--r--include/asm-arm/arch-omap/mmc.h66
-rw-r--r--include/asm-arm/arch-omap/onenand.h21
5 files changed, 219 insertions, 1 deletions
diff --git a/include/asm-arm/arch-omap/blizzard.h b/include/asm-arm/arch-omap/blizzard.h
new file mode 100644
index 000000000000..8d160f171372
--- /dev/null
+++ b/include/asm-arm/arch-omap/blizzard.h
@@ -0,0 +1,12 @@
1#ifndef _BLIZZARD_H
2#define _BLIZZARD_H
3
4struct blizzard_platform_data {
5 void (*power_up)(struct device *dev);
6 void (*power_down)(struct device *dev);
7 unsigned long (*get_clock_rate)(struct device *dev);
8
9 unsigned te_connected : 1;
10};
11
12#endif
diff --git a/include/asm-arm/arch-omap/eac.h b/include/asm-arm/arch-omap/eac.h
new file mode 100644
index 000000000000..6662cb02bafc
--- /dev/null
+++ b/include/asm-arm/arch-omap/eac.h
@@ -0,0 +1,101 @@
1/*
2 * linux/include/asm-arm/arch-omap2/eac.h
3 *
4 * Defines for Enhanced Audio Controller
5 *
6 * Contact: Jarkko Nikula <jarkko.nikula@nokia.com>
7 *
8 * Copyright (C) 2006 Nokia Corporation
9 * Copyright (C) 2004 Texas Instruments, Inc.
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * version 2 as published by the Free Software Foundation.
14 *
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
23 * 02110-1301 USA
24 *
25 */
26
27#ifndef __ASM_ARM_ARCH_OMAP2_EAC_H
28#define __ASM_ARM_ARCH_OMAP2_EAC_H
29
30#include <asm/arch/io.h>
31#include <asm/arch/hardware.h>
32#include <asm/irq.h>
33
34#include <sound/driver.h>
35#include <sound/core.h>
36
37/* master codec clock source */
38#define EAC_MCLK_EXT_MASK 0x100
39enum eac_mclk_src {
40 EAC_MCLK_INT_11290000, /* internal 96 MHz / 8.5 = 11.29 Mhz */
41 EAC_MCLK_EXT_11289600 = EAC_MCLK_EXT_MASK,
42 EAC_MCLK_EXT_12288000,
43 EAC_MCLK_EXT_2x11289600,
44 EAC_MCLK_EXT_2x12288000,
45};
46
47/* codec port interface mode */
48enum eac_codec_mode {
49 EAC_CODEC_PCM,
50 EAC_CODEC_AC97,
51 EAC_CODEC_I2S_MASTER, /* codec port, I.e. EAC is the master */
52 EAC_CODEC_I2S_SLAVE,
53};
54
55/* configuration structure for I2S mode */
56struct eac_i2s_conf {
57 /* if enabled, then first data slot (left channel) is signaled as
58 * positive level of frame sync EAC.AC_FS */
59 unsigned polarity_changed_mode:1;
60 /* if enabled, then serial data starts one clock cycle after the
61 * of EAC.AC_FS for first audio slot */
62 unsigned sync_delay_enable:1;
63};
64
65/* configuration structure for EAC codec port */
66struct eac_codec {
67 enum eac_mclk_src mclk_src;
68
69 enum eac_codec_mode codec_mode;
70 union {
71 struct eac_i2s_conf i2s;
72 } codec_conf;
73
74 int default_rate; /* audio sampling rate */
75
76 int (* set_power)(void *private_data, int dac, int adc);
77 int (* register_controls)(void *private_data,
78 struct snd_card *card);
79 const char *short_name;
80
81 void *private_data;
82};
83
84/* structure for passing platform dependent data to the EAC driver */
85struct eac_platform_data {
86 int (* init)(struct device *eac_dev);
87 void (* cleanup)(struct device *eac_dev);
88 /* these callbacks are used to configure & control external MCLK
89 * source. NULL if not used */
90 int (* enable_ext_clocks)(struct device *eac_dev);
91 void (* disable_ext_clocks)(struct device *eac_dev);
92};
93
94extern void omap_init_eac(struct eac_platform_data *pdata);
95
96extern int eac_register_codec(struct device *eac_dev, struct eac_codec *codec);
97extern void eac_unregister_codec(struct device *eac_dev);
98
99extern int eac_set_mode(struct device *eac_dev, int play, int rec);
100
101#endif /* __ASM_ARM_ARCH_OMAP2_EAC_H */
diff --git a/include/asm-arm/arch-omap/menelaus.h b/include/asm-arm/arch-omap/menelaus.h
index 82d276a6bd95..69ed7ee40179 100644
--- a/include/asm-arm/arch-omap/menelaus.h
+++ b/include/asm-arm/arch-omap/menelaus.h
@@ -7,6 +7,12 @@
7#ifndef __ASM_ARCH_MENELAUS_H 7#ifndef __ASM_ARCH_MENELAUS_H
8#define __ASM_ARCH_MENELAUS_H 8#define __ASM_ARCH_MENELAUS_H
9 9
10struct device;
11
12struct menelaus_platform_data {
13 int (* late_init)(struct device *dev);
14};
15
10extern int menelaus_register_mmc_callback(void (*callback)(void *data, u8 card_mask), 16extern int menelaus_register_mmc_callback(void (*callback)(void *data, u8 card_mask),
11 void *data); 17 void *data);
12extern void menelaus_unregister_mmc_callback(void); 18extern void menelaus_unregister_mmc_callback(void);
@@ -20,6 +26,19 @@ extern int menelaus_set_vaux(unsigned int mV);
20extern int menelaus_set_vdcdc(int dcdc, unsigned int mV); 26extern int menelaus_set_vdcdc(int dcdc, unsigned int mV);
21extern int menelaus_set_slot_sel(int enable); 27extern int menelaus_set_slot_sel(int enable);
22extern int menelaus_get_slot_pin_states(void); 28extern int menelaus_get_slot_pin_states(void);
29extern int menelaus_set_vcore_sw(unsigned int mV);
30extern int menelaus_set_vcore_hw(unsigned int roof_mV, unsigned int floor_mV);
31
32#define EN_VPLL_SLEEP (1 << 7)
33#define EN_VMMC_SLEEP (1 << 6)
34#define EN_VAUX_SLEEP (1 << 5)
35#define EN_VIO_SLEEP (1 << 4)
36#define EN_VMEM_SLEEP (1 << 3)
37#define EN_DC3_SLEEP (1 << 2)
38#define EN_DC2_SLEEP (1 << 1)
39#define EN_VC_SLEEP (1 << 0)
40
41extern int menelaus_set_regulator_sleep(int enable, u32 val);
23 42
24#if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_MENELAUS) 43#if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_MENELAUS)
25#define omap_has_menelaus() 1 44#define omap_has_menelaus() 1
@@ -28,4 +47,3 @@ extern int menelaus_get_slot_pin_states(void);
28#endif 47#endif
29 48
30#endif 49#endif
31
diff --git a/include/asm-arm/arch-omap/mmc.h b/include/asm-arm/arch-omap/mmc.h
new file mode 100644
index 000000000000..b70e37b61242
--- /dev/null
+++ b/include/asm-arm/arch-omap/mmc.h
@@ -0,0 +1,66 @@
1/*
2 * MMC definitions for OMAP2
3 *
4 * Copyright (C) 2006 Nokia Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __OMAP2_MMC_H
12#define __OMAP2_MMC_H
13
14#include <linux/types.h>
15#include <linux/device.h>
16#include <linux/mmc/host.h>
17
18#define OMAP_MMC_MAX_SLOTS 2
19
20struct omap_mmc_platform_data {
21 unsigned enabled:1;
22 /* number of slots on board */
23 unsigned nr_slots:2;
24 /* nomux means "standard" muxing is wrong on this board, and that
25 * board-specific code handled it before common init logic.
26 */
27 unsigned nomux:1;
28 /* 4 wire signaling is optional, and is only used for SD/SDIO and
29 * MMCv4 */
30 unsigned wire4:1;
31 /* set if your board has components or wiring that limits the
32 * maximum frequency on the MMC bus */
33 unsigned int max_freq;
34
35 /* switch the bus to a new slot */
36 int (* switch_slot)(struct device *dev, int slot);
37 /* initialize board-specific MMC functionality, can be NULL if
38 * not supported */
39 int (* init)(struct device *dev);
40 void (* cleanup)(struct device *dev);
41
42 struct omap_mmc_slot_data {
43 int (* set_bus_mode)(struct device *dev, int slot, int bus_mode);
44 int (* set_power)(struct device *dev, int slot, int power_on, int vdd);
45 int (* get_ro)(struct device *dev, int slot);
46
47 /* return MMC cover switch state, can be NULL if not supported.
48 *
49 * possible return values:
50 * 0 - open
51 * 1 - closed
52 */
53 int (* get_cover_state)(struct device *dev, int slot);
54
55 const char *name;
56 u32 ocr_mask;
57 } slots[OMAP_MMC_MAX_SLOTS];
58};
59
60extern void omap_set_mmc_info(int host, const struct omap_mmc_platform_data *info);
61
62/* called from board-specific card detection service routine */
63extern void omap_mmc_notify_card_detect(struct device *dev, int slot, int detected);
64extern void omap_mmc_notify_cover_event(struct device *dev, int slot, int is_closed);
65
66#endif
diff --git a/include/asm-arm/arch-omap/onenand.h b/include/asm-arm/arch-omap/onenand.h
new file mode 100644
index 000000000000..6c959d0ce470
--- /dev/null
+++ b/include/asm-arm/arch-omap/onenand.h
@@ -0,0 +1,21 @@
1/*
2 * include/asm-arm/arch-omap/onenand.h
3 *
4 * Copyright (C) 2006 Nokia Corporation
5 * Author: Juha Yrjola
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/mtd/partitions.h>
13
14struct omap_onenand_platform_data {
15 int cs;
16 int gpio_irq;
17 struct mtd_partition *parts;
18 int nr_parts;
19 int (*onenand_setup)(void __iomem *);
20 int dma_channel;
21};