diff options
-rw-r--r-- | arch/arm/plat-omap/include/plat/uncompress.h | 1 | ||||
-rw-r--r-- | drivers/video/omap/Makefile | 1 | ||||
-rw-r--r-- | drivers/video/omap/lcd_omap2evm.c | 192 | ||||
-rw-r--r-- | sound/soc/omap/Kconfig | 8 | ||||
-rw-r--r-- | sound/soc/omap/Makefile | 1 | ||||
-rw-r--r-- | sound/soc/omap/omap2evm.c | 139 |
6 files changed, 0 insertions, 342 deletions
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h index 30b891c4a93f..2b576f1ab647 100644 --- a/arch/arm/plat-omap/include/plat/uncompress.h +++ b/arch/arm/plat-omap/include/plat/uncompress.h | |||
@@ -129,7 +129,6 @@ static inline void __arch_decomp_setup(unsigned long arch_id) | |||
129 | DEBUG_LL_OMAP1(3, sx1); | 129 | DEBUG_LL_OMAP1(3, sx1); |
130 | 130 | ||
131 | /* omap2 based boards using UART1 */ | 131 | /* omap2 based boards using UART1 */ |
132 | DEBUG_LL_OMAP2(1, omap2evm); | ||
133 | DEBUG_LL_OMAP2(1, omap_2430sdp); | 132 | DEBUG_LL_OMAP2(1, omap_2430sdp); |
134 | DEBUG_LL_OMAP2(1, omap_apollon); | 133 | DEBUG_LL_OMAP2(1, omap_apollon); |
135 | DEBUG_LL_OMAP2(1, omap_h4); | 134 | DEBUG_LL_OMAP2(1, omap_h4); |
diff --git a/drivers/video/omap/Makefile b/drivers/video/omap/Makefile index 49226a1b909e..25db55696e14 100644 --- a/drivers/video/omap/Makefile +++ b/drivers/video/omap/Makefile | |||
@@ -30,7 +30,6 @@ objs-y$(CONFIG_MACH_OMAP_APOLLON) += lcd_apollon.o | |||
30 | objs-y$(CONFIG_MACH_OMAP_2430SDP) += lcd_2430sdp.o | 30 | objs-y$(CONFIG_MACH_OMAP_2430SDP) += lcd_2430sdp.o |
31 | objs-y$(CONFIG_MACH_OMAP_3430SDP) += lcd_2430sdp.o | 31 | objs-y$(CONFIG_MACH_OMAP_3430SDP) += lcd_2430sdp.o |
32 | objs-y$(CONFIG_MACH_OMAP_LDP) += lcd_ldp.o | 32 | objs-y$(CONFIG_MACH_OMAP_LDP) += lcd_ldp.o |
33 | objs-y$(CONFIG_MACH_OMAP2EVM) += lcd_omap2evm.o | ||
34 | objs-y$(CONFIG_MACH_OMAP3EVM) += lcd_omap3evm.o | 33 | objs-y$(CONFIG_MACH_OMAP3EVM) += lcd_omap3evm.o |
35 | objs-y$(CONFIG_MACH_OMAP3_BEAGLE) += lcd_omap3beagle.o | 34 | objs-y$(CONFIG_MACH_OMAP3_BEAGLE) += lcd_omap3beagle.o |
36 | objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o | 35 | objs-y$(CONFIG_FB_OMAP_LCD_MIPID) += lcd_mipid.o |
diff --git a/drivers/video/omap/lcd_omap2evm.c b/drivers/video/omap/lcd_omap2evm.c deleted file mode 100644 index 7e7a65c08452..000000000000 --- a/drivers/video/omap/lcd_omap2evm.c +++ /dev/null | |||
@@ -1,192 +0,0 @@ | |||
1 | /* | ||
2 | * LCD panel support for the MISTRAL OMAP2EVM board | ||
3 | * | ||
4 | * Author: Arun C <arunedarath@mistralsolutions.com> | ||
5 | * | ||
6 | * Derived from drivers/video/omap/lcd_omap3evm.c | ||
7 | * Derived from drivers/video/omap/lcd-apollon.c | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, but | ||
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | * General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License along | ||
20 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
21 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
22 | */ | ||
23 | |||
24 | #include <linux/module.h> | ||
25 | #include <linux/platform_device.h> | ||
26 | #include <linux/gpio.h> | ||
27 | #include <linux/i2c/twl.h> | ||
28 | |||
29 | #include <plat/mux.h> | ||
30 | #include <asm/mach-types.h> | ||
31 | |||
32 | #include "omapfb.h" | ||
33 | |||
34 | #define LCD_PANEL_ENABLE_GPIO 154 | ||
35 | #define LCD_PANEL_LR 128 | ||
36 | #define LCD_PANEL_UD 129 | ||
37 | #define LCD_PANEL_INI 152 | ||
38 | #define LCD_PANEL_QVGA 148 | ||
39 | #define LCD_PANEL_RESB 153 | ||
40 | |||
41 | #define TWL_LED_LEDEN 0x00 | ||
42 | #define TWL_PWMA_PWMAON 0x00 | ||
43 | #define TWL_PWMA_PWMAOFF 0x01 | ||
44 | |||
45 | static unsigned int bklight_level; | ||
46 | |||
47 | static int omap2evm_panel_init(struct lcd_panel *panel, | ||
48 | struct omapfb_device *fbdev) | ||
49 | { | ||
50 | gpio_request(LCD_PANEL_ENABLE_GPIO, "LCD enable"); | ||
51 | gpio_request(LCD_PANEL_LR, "LCD lr"); | ||
52 | gpio_request(LCD_PANEL_UD, "LCD ud"); | ||
53 | gpio_request(LCD_PANEL_INI, "LCD ini"); | ||
54 | gpio_request(LCD_PANEL_QVGA, "LCD qvga"); | ||
55 | gpio_request(LCD_PANEL_RESB, "LCD resb"); | ||
56 | |||
57 | gpio_direction_output(LCD_PANEL_ENABLE_GPIO, 1); | ||
58 | gpio_direction_output(LCD_PANEL_RESB, 1); | ||
59 | gpio_direction_output(LCD_PANEL_INI, 1); | ||
60 | gpio_direction_output(LCD_PANEL_QVGA, 0); | ||
61 | gpio_direction_output(LCD_PANEL_LR, 1); | ||
62 | gpio_direction_output(LCD_PANEL_UD, 1); | ||
63 | |||
64 | twl_i2c_write_u8(TWL4030_MODULE_LED, 0x11, TWL_LED_LEDEN); | ||
65 | twl_i2c_write_u8(TWL4030_MODULE_PWMA, 0x01, TWL_PWMA_PWMAON); | ||
66 | twl_i2c_write_u8(TWL4030_MODULE_PWMA, 0x02, TWL_PWMA_PWMAOFF); | ||
67 | bklight_level = 100; | ||
68 | |||
69 | return 0; | ||
70 | } | ||
71 | |||
72 | static void omap2evm_panel_cleanup(struct lcd_panel *panel) | ||
73 | { | ||
74 | gpio_free(LCD_PANEL_RESB); | ||
75 | gpio_free(LCD_PANEL_QVGA); | ||
76 | gpio_free(LCD_PANEL_INI); | ||
77 | gpio_free(LCD_PANEL_UD); | ||
78 | gpio_free(LCD_PANEL_LR); | ||
79 | gpio_free(LCD_PANEL_ENABLE_GPIO); | ||
80 | } | ||
81 | |||
82 | static int omap2evm_panel_enable(struct lcd_panel *panel) | ||
83 | { | ||
84 | gpio_set_value(LCD_PANEL_ENABLE_GPIO, 0); | ||
85 | return 0; | ||
86 | } | ||
87 | |||
88 | static void omap2evm_panel_disable(struct lcd_panel *panel) | ||
89 | { | ||
90 | gpio_set_value(LCD_PANEL_ENABLE_GPIO, 1); | ||
91 | } | ||
92 | |||
93 | static unsigned long omap2evm_panel_get_caps(struct lcd_panel *panel) | ||
94 | { | ||
95 | return 0; | ||
96 | } | ||
97 | |||
98 | static int omap2evm_bklight_setlevel(struct lcd_panel *panel, | ||
99 | unsigned int level) | ||
100 | { | ||
101 | u8 c; | ||
102 | if ((level >= 0) && (level <= 100)) { | ||
103 | c = (125 * (100 - level)) / 100 + 2; | ||
104 | twl_i2c_write_u8(TWL4030_MODULE_PWMA, c, TWL_PWMA_PWMAOFF); | ||
105 | bklight_level = level; | ||
106 | } | ||
107 | return 0; | ||
108 | } | ||
109 | |||
110 | static unsigned int omap2evm_bklight_getlevel(struct lcd_panel *panel) | ||
111 | { | ||
112 | return bklight_level; | ||
113 | } | ||
114 | |||
115 | static unsigned int omap2evm_bklight_getmaxlevel(struct lcd_panel *panel) | ||
116 | { | ||
117 | return 100; | ||
118 | } | ||
119 | |||
120 | struct lcd_panel omap2evm_panel = { | ||
121 | .name = "omap2evm", | ||
122 | .config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC | | ||
123 | OMAP_LCDC_INV_HSYNC, | ||
124 | |||
125 | .bpp = 16, | ||
126 | .data_lines = 18, | ||
127 | .x_res = 480, | ||
128 | .y_res = 640, | ||
129 | .hsw = 3, | ||
130 | .hfp = 0, | ||
131 | .hbp = 28, | ||
132 | .vsw = 2, | ||
133 | .vfp = 1, | ||
134 | .vbp = 0, | ||
135 | |||
136 | .pixel_clock = 20000, | ||
137 | |||
138 | .init = omap2evm_panel_init, | ||
139 | .cleanup = omap2evm_panel_cleanup, | ||
140 | .enable = omap2evm_panel_enable, | ||
141 | .disable = omap2evm_panel_disable, | ||
142 | .get_caps = omap2evm_panel_get_caps, | ||
143 | .set_bklight_level = omap2evm_bklight_setlevel, | ||
144 | .get_bklight_level = omap2evm_bklight_getlevel, | ||
145 | .get_bklight_max = omap2evm_bklight_getmaxlevel, | ||
146 | }; | ||
147 | |||
148 | static int omap2evm_panel_probe(struct platform_device *pdev) | ||
149 | { | ||
150 | omapfb_register_panel(&omap2evm_panel); | ||
151 | return 0; | ||
152 | } | ||
153 | |||
154 | static int omap2evm_panel_remove(struct platform_device *pdev) | ||
155 | { | ||
156 | return 0; | ||
157 | } | ||
158 | |||
159 | static int omap2evm_panel_suspend(struct platform_device *pdev, | ||
160 | pm_message_t mesg) | ||
161 | { | ||
162 | return 0; | ||
163 | } | ||
164 | |||
165 | static int omap2evm_panel_resume(struct platform_device *pdev) | ||
166 | { | ||
167 | return 0; | ||
168 | } | ||
169 | |||
170 | struct platform_driver omap2evm_panel_driver = { | ||
171 | .probe = omap2evm_panel_probe, | ||
172 | .remove = omap2evm_panel_remove, | ||
173 | .suspend = omap2evm_panel_suspend, | ||
174 | .resume = omap2evm_panel_resume, | ||
175 | .driver = { | ||
176 | .name = "omap2evm_lcd", | ||
177 | .owner = THIS_MODULE, | ||
178 | }, | ||
179 | }; | ||
180 | |||
181 | static int __init omap2evm_panel_drv_init(void) | ||
182 | { | ||
183 | return platform_driver_register(&omap2evm_panel_driver); | ||
184 | } | ||
185 | |||
186 | static void __exit omap2evm_panel_drv_exit(void) | ||
187 | { | ||
188 | platform_driver_unregister(&omap2evm_panel_driver); | ||
189 | } | ||
190 | |||
191 | module_init(omap2evm_panel_drv_init); | ||
192 | module_exit(omap2evm_panel_drv_exit); | ||
diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig index b5922984eac6..99054cf1f68f 100644 --- a/sound/soc/omap/Kconfig +++ b/sound/soc/omap/Kconfig | |||
@@ -65,14 +65,6 @@ config SND_OMAP_SOC_OVERO | |||
65 | Say Y if you want to add support for SoC audio on the | 65 | Say Y if you want to add support for SoC audio on the |
66 | Gumstix Overo or CompuLab CM-T35 | 66 | Gumstix Overo or CompuLab CM-T35 |
67 | 67 | ||
68 | config SND_OMAP_SOC_OMAP2EVM | ||
69 | tristate "SoC Audio support for OMAP2EVM board" | ||
70 | depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP2EVM | ||
71 | select SND_OMAP_SOC_MCBSP | ||
72 | select SND_SOC_TWL4030 | ||
73 | help | ||
74 | Say Y if you want to add support for SoC audio on the omap2evm board. | ||
75 | |||
76 | config SND_OMAP_SOC_OMAP3EVM | 68 | config SND_OMAP_SOC_OMAP3EVM |
77 | tristate "SoC Audio support for OMAP3EVM board" | 69 | tristate "SoC Audio support for OMAP3EVM board" |
78 | depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP3EVM | 70 | depends on TWL4030_CORE && SND_OMAP_SOC && MACH_OMAP3EVM |
diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile index ba9fc650db28..6c2c87eed5bb 100644 --- a/sound/soc/omap/Makefile +++ b/sound/soc/omap/Makefile | |||
@@ -13,7 +13,6 @@ snd-soc-rx51-objs := rx51.o | |||
13 | snd-soc-ams-delta-objs := ams-delta.o | 13 | snd-soc-ams-delta-objs := ams-delta.o |
14 | snd-soc-osk5912-objs := osk5912.o | 14 | snd-soc-osk5912-objs := osk5912.o |
15 | snd-soc-overo-objs := overo.o | 15 | snd-soc-overo-objs := overo.o |
16 | snd-soc-omap2evm-objs := omap2evm.o | ||
17 | snd-soc-omap3evm-objs := omap3evm.o | 16 | snd-soc-omap3evm-objs := omap3evm.o |
18 | snd-soc-am3517evm-objs := am3517evm.o | 17 | snd-soc-am3517evm-objs := am3517evm.o |
19 | snd-soc-sdp3430-objs := sdp3430.o | 18 | snd-soc-sdp3430-objs := sdp3430.o |
diff --git a/sound/soc/omap/omap2evm.c b/sound/soc/omap/omap2evm.c deleted file mode 100644 index 29b60d6796e7..000000000000 --- a/sound/soc/omap/omap2evm.c +++ /dev/null | |||
@@ -1,139 +0,0 @@ | |||
1 | /* | ||
2 | * omap2evm.c -- SoC audio machine driver for omap2evm board | ||
3 | * | ||
4 | * Author: Arun KS <arunks@mistralsolutions.com> | ||
5 | * | ||
6 | * Based on sound/soc/omap/overo.c by Steve Sakoman | ||
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/clk.h> | ||
25 | #include <linux/platform_device.h> | ||
26 | #include <sound/core.h> | ||
27 | #include <sound/pcm.h> | ||
28 | #include <sound/soc.h> | ||
29 | |||
30 | #include <asm/mach-types.h> | ||
31 | #include <mach/hardware.h> | ||
32 | #include <mach/gpio.h> | ||
33 | #include <plat/mcbsp.h> | ||
34 | |||
35 | #include "omap-mcbsp.h" | ||
36 | #include "omap-pcm.h" | ||
37 | |||
38 | static int omap2evm_hw_params(struct snd_pcm_substream *substream, | ||
39 | struct snd_pcm_hw_params *params) | ||
40 | { | ||
41 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | ||
42 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | ||
43 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
44 | int ret; | ||
45 | |||
46 | /* Set codec DAI configuration */ | ||
47 | ret = snd_soc_dai_set_fmt(codec_dai, | ||
48 | SND_SOC_DAIFMT_I2S | | ||
49 | SND_SOC_DAIFMT_NB_NF | | ||
50 | SND_SOC_DAIFMT_CBM_CFM); | ||
51 | if (ret < 0) { | ||
52 | printk(KERN_ERR "can't set codec DAI configuration\n"); | ||
53 | return ret; | ||
54 | } | ||
55 | |||
56 | /* Set cpu DAI configuration */ | ||
57 | ret = snd_soc_dai_set_fmt(cpu_dai, | ||
58 | SND_SOC_DAIFMT_I2S | | ||
59 | SND_SOC_DAIFMT_NB_NF | | ||
60 | SND_SOC_DAIFMT_CBM_CFM); | ||
61 | if (ret < 0) { | ||
62 | printk(KERN_ERR "can't set cpu DAI configuration\n"); | ||
63 | return ret; | ||
64 | } | ||
65 | |||
66 | /* Set the codec system clock for DAC and ADC */ | ||
67 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, | ||
68 | SND_SOC_CLOCK_IN); | ||
69 | if (ret < 0) { | ||
70 | printk(KERN_ERR "can't set codec system clock\n"); | ||
71 | return ret; | ||
72 | } | ||
73 | |||
74 | return 0; | ||
75 | } | ||
76 | |||
77 | static struct snd_soc_ops omap2evm_ops = { | ||
78 | .hw_params = omap2evm_hw_params, | ||
79 | }; | ||
80 | |||
81 | /* Digital audio interface glue - connects codec <--> CPU */ | ||
82 | static struct snd_soc_dai_link omap2evm_dai = { | ||
83 | .name = "TWL4030", | ||
84 | .stream_name = "TWL4030", | ||
85 | .cpu_dai_name = "omap-mcbsp-dai.1", | ||
86 | .codec_dai_name = "twl4030-hifi", | ||
87 | .platform_name = "omap-pcm-audio", | ||
88 | .codec_name = "twl4030-codec", | ||
89 | .ops = &omap2evm_ops, | ||
90 | }; | ||
91 | |||
92 | /* Audio machine driver */ | ||
93 | static struct snd_soc_card snd_soc_omap2evm = { | ||
94 | .name = "omap2evm", | ||
95 | .dai_link = &omap2evm_dai, | ||
96 | .num_links = 1, | ||
97 | }; | ||
98 | |||
99 | static struct platform_device *omap2evm_snd_device; | ||
100 | |||
101 | static int __init omap2evm_soc_init(void) | ||
102 | { | ||
103 | int ret; | ||
104 | |||
105 | if (!machine_is_omap2evm()) | ||
106 | return -ENODEV; | ||
107 | printk(KERN_INFO "omap2evm SoC init\n"); | ||
108 | |||
109 | omap2evm_snd_device = platform_device_alloc("soc-audio", -1); | ||
110 | if (!omap2evm_snd_device) { | ||
111 | printk(KERN_ERR "Platform device allocation failed\n"); | ||
112 | return -ENOMEM; | ||
113 | } | ||
114 | |||
115 | platform_set_drvdata(omap2evm_snd_device, &snd_soc_omap2evm); | ||
116 | |||
117 | ret = platform_device_add(omap2evm_snd_device); | ||
118 | if (ret) | ||
119 | goto err1; | ||
120 | |||
121 | return 0; | ||
122 | |||
123 | err1: | ||
124 | printk(KERN_ERR "Unable to add platform device\n"); | ||
125 | platform_device_put(omap2evm_snd_device); | ||
126 | |||
127 | return ret; | ||
128 | } | ||
129 | module_init(omap2evm_soc_init); | ||
130 | |||
131 | static void __exit omap2evm_soc_exit(void) | ||
132 | { | ||
133 | platform_device_unregister(omap2evm_snd_device); | ||
134 | } | ||
135 | module_exit(omap2evm_soc_exit); | ||
136 | |||
137 | MODULE_AUTHOR("Arun KS <arunks@mistralsolutions.com>"); | ||
138 | MODULE_DESCRIPTION("ALSA SoC omap2evm"); | ||
139 | MODULE_LICENSE("GPL"); | ||