1 diff -Naur linux-2.6.12-rc5_omap1/arch/arm/mach-omap/clock.c linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/clock.c
2 --- linux-2.6.12-rc5_omap1/arch/arm/mach-omap/clock.c 2005-08-23 22:36:30.426733413 +0300
3 +++ linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/clock.c 2005-08-23 22:38:07.446289831 +0300
5 #include <asm/arch/usb.h>
8 +#include <asm/mach-types.h>
10 static LIST_HEAD(clocks);
11 static DECLARE_MUTEX(clocks_sem);
13 static struct clk mclk_1510 = {
15 /* Direct from ULPD, no parent. May be enabled by ext hardware. */
18 .flags = CLOCK_IN_OMAP1510 | RATE_FIXED,
20 + .flags = CLOCK_IN_OMAP1510,
21 + .enable_reg = COM_CLK_DIV_CTRL_SEL,
22 + .enable_bit = COM_ULPD_PLL_CLK_REQ,
23 + .set_rate = &set_ext_clk_rate,
24 + .round_rate = &round_ext_clk_rate,
25 + .init = &init_ext_clk,
29 static struct clk mclk_16xx = {
34 + if (machine_is_h6300())
35 + clk_enable(&lcd_ck);
37 if (cpu_is_omap1510())
38 clk_enable(&arm_gpio_ck);
40 diff -Naur linux-2.6.12-rc5_omap1/arch/arm/mach-omap/dma.c linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/dma.c
41 --- linux-2.6.12-rc5_omap1/arch/arm/mach-omap/dma.c 2005-08-23 22:36:30.615703332 +0300
42 +++ linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/dma.c 2005-08-23 22:38:07.480284420 +0300
44 unsigned long top, bottom;
54 if (omap_dma_in_1510_mode()) {
55 + l = omap_readw(OMAP1510_DMA_LCD_CTRL);
57 + omap_writew (l, OMAP1510_DMA_LCD_CTRL);
59 omap_writew(top >> 16, OMAP1510_DMA_LCD_TOP_F1_U);
60 omap_writew(top, OMAP1510_DMA_LCD_TOP_F1_L);
61 omap_writew(bottom >> 16, OMAP1510_DMA_LCD_BOT_F1_U);
63 w = omap_readw(OMAP1610_DMA_LCD_CCR);
65 omap_writew(w, OMAP1610_DMA_LCD_CCR);
70 diff -Naur linux-2.6.12-rc5_omap1/arch/arm/mach-omap/mcbsp.c linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/mcbsp.c
71 --- linux-2.6.12-rc5_omap1/arch/arm/mach-omap/mcbsp.c 2005-08-23 22:36:31.270599085 +0300
72 +++ linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/mcbsp.c 2005-08-23 22:38:07.481284261 +0300
74 EXPORT_SYMBOL(omap_mcbsp_xmit_buffer);
75 EXPORT_SYMBOL(omap_mcbsp_recv_buffer);
76 EXPORT_SYMBOL(omap_mcbsp_set_spi_mode);
77 +EXPORT_SYMBOL(omap_mcbsp_pollwrite);
78 diff -Naur linux-2.6.12-rc5_omap1/arch/arm/mach-omap/omap1/board-h6300.c linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/omap1/board-h6300.c
79 --- linux-2.6.12-rc5_omap1/arch/arm/mach-omap/omap1/board-h6300.c 1970-01-01 02:00:00.000000000 +0200
80 +++ linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/omap1/board-h6300.c 2005-08-23 22:38:07.482284102 +0300
83 + * linux/arch/arm/mach-omap/board-generic.c
85 + * Modified from board-h6300.c
87 + * Code for generic OMAP board. Should work on many OMAP systems where
88 + * the device drivers take care of all the necessary hardware initialization.
89 + * Do not put any board specific code to this file; create a new machine
90 + * type if you need custom low-level initializations.
92 + * This program is free software; you can redistribute it and/or modify
93 + * it under the terms of the GNU General Public License version 2 as
94 + * published by the Free Software Foundation.
97 +#include <linux/kernel.h>
98 +#include <linux/init.h>
99 +#include <linux/device.h>
100 +#include <linux/delay.h>
101 +#include <linux/mtd/mtd.h>
102 +#include <linux/mtd/partitions.h>
104 +#include <asm/hardware.h>
105 +#include <asm/mach-types.h>
106 +#include <asm/mach/arch.h>
107 +#include <asm/mach/flash.h>
108 +#include <asm/mach/map.h>
110 +#include <asm/arch/gpio.h>
111 +#include <asm/arch/tc.h>
112 +#include <asm/arch/usb.h>
114 +#include "../common.h"
116 +static int __initdata h6300_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
118 +static struct mtd_partition h6300_partitions[] = {
119 + /* bootloader (U-Boot, etc) in first sector */
121 + .name = "bootloader",
124 + .mask_flags = MTD_WRITEABLE, /* force read-only */
126 + /* bootloader params in the next sector */
129 + .offset = MTDPART_OFS_APPEND,
136 + .offset = MTDPART_OFS_APPEND,
140 + /* rest of flash1 is a file system */
143 + .offset = MTDPART_OFS_APPEND,
144 + .size = SZ_16M - SZ_2M - 2 * SZ_128K,
149 + .name = "filesystem",
150 + .offset = MTDPART_OFS_APPEND,
151 + .size = MTDPART_SIZ_FULL,
156 +static struct flash_platform_data h6300_flash_data = {
157 + .map_name = "cfi_probe",
159 + .parts = h6300_partitions,
160 + .nr_parts = ARRAY_SIZE(h6300_partitions),
163 +static struct resource h6300_flash_resource = {
164 + .start = OMAP_CS0_PHYS,
165 + .end = OMAP_CS0_PHYS + SZ_32M - 1,
166 + .flags = IORESOURCE_MEM,
169 +static struct platform_device h6300_flash_device = {
170 + .name = "omapflash",
173 + .platform_data = &h6300_flash_data,
175 + .num_resources = 1,
176 + .resource = &h6300_flash_resource,
179 +static struct platform_device *h6300_devices[] __initdata = {
180 + &h6300_flash_device,
183 +static void __init h6300_init_irq(void)
189 +/* assume no Mini-AB port */
191 +static struct omap_usb_config h6300_usb_config __initdata = {
197 +static struct omap_board_config_kernel h6300_config[] = {
198 + { OMAP_TAG_USB, &h6300_usb_config },
201 +static void __init h6300_init(void)
203 + platform_add_devices(h6300_devices, ARRAY_SIZE(h6300_devices));
204 + h6300_config[0].data = &h6300_usb_config;
206 + omap_board_config = h6300_config;
207 + omap_board_config_size = ARRAY_SIZE(h6300_config);
210 +static void __init h6300_map_io(void)
212 + omap_map_common_io();
213 + omap_serial_init(h6300_serial_ports);
216 +MACHINE_START(H6300, "HP IPaq H6300")
217 + MAINTAINER("Everett Coleman II <gcc80x86@fuzzyneural.net>")
218 + BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000)
219 + BOOT_PARAMS(0x10000100)
220 + MAPIO(h6300_map_io)
221 + INITIRQ(h6300_init_irq)
222 + INIT_MACHINE(h6300_init)
223 + .timer = &omap_timer,
225 diff -Naur linux-2.6.12-rc5_omap1/arch/arm/mach-omap/omap1/Kconfig linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/omap1/Kconfig
226 --- linux-2.6.12-rc5_omap1/arch/arm/mach-omap/omap1/Kconfig 2005-08-23 22:36:31.495563275 +0300
227 +++ linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/omap1/Kconfig 2005-08-23 22:38:07.515278850 +0300
229 TI OMAP 1510 or 1610 Innovator board support. Say Y here if you
233 + bool "HP IPaq H6300"
234 + depends on ARCH_OMAP1 && ARCH_OMAP1510
236 + HP IPaq H6300 series
240 depends on ARCH_OMAP1 && ARCH_OMAP16XX
241 diff -Naur linux-2.6.12-rc5_omap1/arch/arm/mach-omap/omap1/Makefile linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/omap1/Makefile
242 --- linux-2.6.12-rc5_omap1/arch/arm/mach-omap/omap1/Makefile 2005-08-23 22:36:31.564552293 +0300
243 +++ linux-2.6.12-rc5_omap1_h6300/arch/arm/mach-omap/omap1/Makefile 2005-08-23 22:38:07.516278691 +0300
245 # Specific board support
246 obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o
247 obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o
248 +obj-$(CONFIG_MACH_H6300) += board-h6300.o
249 obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
250 obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o
251 obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o
252 diff -Naur linux-2.6.12-rc5_omap1/drivers/input/touchscreen/omap/Makefile linux-2.6.12-rc5_omap1_h6300/drivers/input/touchscreen/omap/Makefile
253 --- linux-2.6.12-rc5_omap1/drivers/input/touchscreen/omap/Makefile 2005-08-23 22:36:32.554394729 +0300
254 +++ linux-2.6.12-rc5_omap1_h6300/drivers/input/touchscreen/omap/Makefile 2005-08-23 22:38:07.550273279 +0300
256 objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_H3) += ts_hx.o
257 objs-$(CONFIG_ARCH_OMAP1510)$(CONFIG_MACH_OMAP_INNOVATOR) += ts_inn1510.o
258 objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_OSK) += ts_osk.o
259 +objs-$(CONFIG_ARCH_OMAP1510)$(CONFIG_MACH_H6300) += ts_hx.o
261 omapts-objs := omap_ts.o $(objs-yy)
262 diff -Naur linux-2.6.12-rc5_omap1/drivers/input/touchscreen/omap/omap_ts.c linux-2.6.12-rc5_omap1_h6300/drivers/input/touchscreen/omap/omap_ts.c
263 --- linux-2.6.12-rc5_omap1/drivers/input/touchscreen/omap/omap_ts.c 2005-08-23 22:36:32.555394570 +0300
264 +++ linux-2.6.12-rc5_omap1_h6300/drivers/input/touchscreen/omap/omap_ts.c 2005-08-23 22:38:07.551273120 +0300
267 #include <asm/mach-types.h>
274 #define OMAP_TS_NAME "omap_ts"
276 static struct ts_device *__initdata ts_devs[] = {
277 -#if defined(CONFIG_MACH_OMAP_H2) || defined(CONFIG_MACH_OMAP_H3)
278 +#if defined(CONFIG_MACH_OMAP_H2) || defined(CONFIG_MACH_OMAP_H3) || defined(CONFIG_MACH_H6300)
281 #ifdef CONFIG_MACH_OMAP_OSK
283 input_report_abs(&(ts_omap.inputdevice), ABS_PRESSURE, data[2]);
284 input_sync(&(ts_omap.inputdevice));
286 - DEBUG_TS("omap_ts_read: read x=%d,y=%d,p=%d\n", data[0], data[1],
288 + //DEBUG_TS("omap_ts_read: read x=%d,y=%d,p=%d\n", data[0], data[1], data[2]);
294 if (!ts_omap.dev->penup()) {
295 if (!ts_omap.touched) {
296 - DEBUG_TS("omap_ts_timer: pen down\n");
297 + //DEBUG_TS("omap_ts_timer: pen down\n");
298 input_report_key(&(ts_omap.inputdevice), BTN_TOUCH, 1);
302 add_timer(&(ts_omap.ts_timer));
304 if (ts_omap.touched) {
305 - DEBUG_TS("omap_ts_timer: pen up\n");
306 + //DEBUG_TS("omap_ts_timer: pen up\n");
308 input_report_abs(&(ts_omap.inputdevice), ABS_X, 0);
309 input_report_abs(&(ts_omap.inputdevice), ABS_Y, 0);
310 diff -Naur linux-2.6.12-rc5_omap1/drivers/input/touchscreen/omap/ts_hx.c linux-2.6.12-rc5_omap1_h6300/drivers/input/touchscreen/omap/ts_hx.c
311 --- linux-2.6.12-rc5_omap1/drivers/input/touchscreen/omap/ts_hx.c 2005-08-23 22:36:32.588389317 +0300
312 +++ linux-2.6.12-rc5_omap1_h6300/drivers/input/touchscreen/omap/ts_hx.c 2005-08-23 22:38:07.585267709 +0300
314 #include <asm/arch/mux.h>
315 #include <asm/arch/hardware.h>
316 #include <asm/hardware/tsc2101.h>
317 +#include <linux/delay.h>
319 #include "../drivers/ssi/omap-tsc2101.h"
322 } else if (machine_is_omap_h3()) {
324 omap_cfg_reg(W19_1610_GPIO48);
325 + }else if (machine_is_h6300()) {
327 + omap_cfg_reg(M14_1510_GPIO2);
332 omap_free_gpio(H2_GPIO_NUM);
333 else if (machine_is_omap_h3())
334 omap_free_gpio(H3_GPIO_NUM);
335 + else if (machine_is_h6300())
340 diff -Naur linux-2.6.12-rc5_omap1/drivers/ssi/omap-tsc2101.c linux-2.6.12-rc5_omap1_h6300/drivers/ssi/omap-tsc2101.c
341 --- linux-2.6.12-rc5_omap1/drivers/ssi/omap-tsc2101.c 2005-08-23 22:36:33.800196420 +0300
342 +++ linux-2.6.12-rc5_omap1_h6300/drivers/ssi/omap-tsc2101.c 2005-08-23 22:38:07.586267550 +0300
344 #include <linux/delay.h>
346 #include <asm/system.h>
347 +#include <asm/arch/gpio.h>
350 #include <asm/mach-types.h>
353 #include "omap-tsc2101.h"
355 -#if CONFIG_ARCH_OMAP16XX
356 +#if CONFIG_ARCH_OMAP1
357 #include <../drivers/ssi/omap-uwire.h>
359 #error "Unsupported configuration"
365 +static int count = 0;
366 static spinlock_t tsc2101_lock = SPIN_LOCK_UNLOCKED;
367 static struct clk * tsc2101_mclk_ck;
372 /* set the Mux to provide MCLK to TSC2101 */
373 - if (machine_is_omap_h3()) {
374 + if (machine_is_omap_h3())
375 ret = omap_cfg_reg(V5_1710_MCLK_ON);
377 - if (machine_is_omap_h2()) {
378 - ret = omap_cfg_reg(R10_1610_MCLK_ON);
381 + else if (machine_is_omap_h2())
382 + ret = omap_cfg_reg(R10_1610_MCLK_ON);
383 + else if (machine_is_h6300 ())
384 + ret = omap_cfg_reg(R10_1610_MCLK_ON); // TODO: for now use the 1610 mux
387 tsc2101_mclk_ck = clk_get(NULL, "mclk");
388 @@ -108,19 +108,22 @@
391 /* Remove the Mux to Stop MCLK to TSC2101 */
392 - if (machine_is_omap_h3()) {
393 + if (machine_is_omap_h3())
394 ret = omap_cfg_reg(V5_1710_MCLK_OFF);
396 - if (machine_is_omap_h2()) {
397 - ret = omap_cfg_reg(R10_1610_MCLK_OFF);
400 + else if (machine_is_omap_h2())
401 + ret = omap_cfg_reg(R10_1610_MCLK_OFF);
402 +// else if (machine_is_h6300 ())
403 +// ret = omap_cfg_reg(R10_1610_MCLK_OFF); // TODO: for now use the 1610 mux
405 /* Release the MCLK */
406 clk_disable(tsc2101_mclk_ck);
407 clk_put(tsc2101_mclk_ck);
408 tsc2101_mclk_ck = NULL;
410 +#if defined(CONFIG_MACH_H6300)
414 module_put(THIS_MODULE);
416 spin_unlock(&tsc2101_lock);
417 @@ -130,57 +133,57 @@
423 - if (machine_is_omap_h2()) {
425 - omap_uwire_data_transfer(1,
426 - (((page) << 11) | (address << 5)),
430 - "uwire-write returned error for address %x\n",
434 - ret = omap_uwire_data_transfer(1, data, 16, 0, NULL, 0);
437 - "uwire-write returned error for address %x\n",
441 + if (cpu_is_omap16xx ()) {
442 + if (machine_is_omap_h2())
444 + if (machine_is_omap_h3())
446 + } else if (cpu_is_omap15xx ()) {
449 - if (machine_is_omap_h3()) {
452 - omap_uwire_data_transfer(0, ((page << 11) | (address << 5)),
456 - "uwire-write returned error for address %x\n",
460 - ret = omap_uwire_data_transfer(0, data, 16, 0, NULL, 0);
463 - "uwire-write returned error for address %x\n",
467 +#if defined(CONFIG_MACH_H6300)
468 + omap_set_gpio_dataout(8, 0);
471 + ret = omap_uwire_data_transfer(cs,
472 + (((page) << 11) | (address << 5)),
476 + "uwire-write returned error for address %x\n",
478 + omap_set_gpio_dataout(8, 1);
481 + ret = omap_uwire_data_transfer(cs, data, 16, 0, NULL, 0);
484 + "uwire-write returned error for address %x\n",
486 + omap_set_gpio_dataout(8, 1);
490 +#if defined(CONFIG_MACH_H6300)
491 + omap_set_gpio_dataout(8, 1);
495 void omap_tsc2101_reads(int page, u8 startaddress, u16 * data, int numregs)
498 - if (machine_is_omap_h2()) {
499 + if (machine_is_omap_h2())
502 - if (machine_is_omap_h3()) {
503 + if (machine_is_omap_h3())
507 +#if defined(CONFIG_MACH_H6300)
508 + omap_set_gpio_dataout(8, 0);
511 (void)omap_uwire_data_transfer(cs, (0x8000 | (page << 11)
512 | (startaddress << 5)),
514 @@ -188,11 +191,15 @@
515 omap_uwire_data_transfer(cs, 0, 0, 16, data, 1);
517 omap_uwire_data_transfer(cs, 0, 0, 16, data, 0);
519 +#if defined(CONFIG_MACH_H6300)
520 + omap_set_gpio_dataout(8, 1);
524 u16 omap_tsc2101_read(int page, u8 address)
528 omap_tsc2101_reads(page, address, &ret, 1);
536 if (machine_is_omap_h2()) {
537 uwire_flags = UWIRE_READ_RISING_EDGE | UWIRE_WRITE_RISING_EDGE;
538 omap_cfg_reg(N15_1610_UWIRE_CS1);
540 omap_cfg_reg(N14_1610_UWIRE_CS0);
541 omap_uwire_configure_mode(0, uwire_flags);
543 + if (machine_is_h6300()) {
544 + uwire_flags = UWIRE_READ_RISING_EDGE | UWIRE_WRITE_RISING_EDGE;
545 + omap_cfg_reg(X1_1510_UWIRE_CS0);
546 + omap_uwire_configure_mode(0, uwire_flags);
548 + omap_request_gpio(8);
549 + omap_set_gpio_dataout(8, 0);
550 + omap_set_gpio_direction (8, 0);
554 /* Configure MCLK enable */
555 - omap_writel(omap_readl(PU_PD_SEL_2) | (1 << 22), PU_PD_SEL_2);
556 + if (cpu_is_omap16xx ())
557 + omap_writel(omap_readl(PU_PD_SEL_2) | (1 << 22), PU_PD_SEL_2);
558 + if (machine_is_h6300())
559 + omap_cfg_reg(X1_1510_UWIRE_SDI);
565 MODULE_AUTHOR("Texas Instruments");
567 - ("Glue audio driver for the TI OMAP1610/OMAP1710 TSC2101 codec.");
568 + ("Glue audio driver for the TI TSC2101 codec.");
569 MODULE_LICENSE("GPL");
570 diff -Naur linux-2.6.12-rc5_omap1/drivers/ssi/omap-uwire.c linux-2.6.12-rc5_omap1_h6300/drivers/ssi/omap-uwire.c
571 --- linux-2.6.12-rc5_omap1/drivers/ssi/omap-uwire.c 2005-08-23 22:36:33.827192123 +0300
572 +++ linux-2.6.12-rc5_omap1_h6300/drivers/ssi/omap-uwire.c 2005-08-23 22:38:07.586267550 +0300
574 omap_cfg_reg(N14_1610_UWIRE_CS0);
575 omap_cfg_reg(N15_1610_UWIRE_CS1);
578 + if (machine_is_h6300 ()) {
579 + omap_cfg_reg(X1_1510_UWIRE_CS0);
580 + omap_cfg_reg(X1_1510_UWIRE_CS3);
582 if (machine_is_omap_perseus2()) {
583 /* configure pins: MPU_UW_nSCS1, MPU_UW_SDO, MPU_UW_SCLK */
584 int val = omap_readl(OMAP730_IO_CONF_9) & ~0x00EEE000;
585 diff -Naur linux-2.6.12-rc5_omap1/drivers/usb/gadget/omap_udc.c linux-2.6.12-rc5_omap1_h6300/drivers/usb/gadget/omap_udc.c
586 --- linux-2.6.12-rc5_omap1/drivers/usb/gadget/omap_udc.c 2005-08-23 22:36:33.937174616 +0300
587 +++ linux-2.6.12-rc5_omap1_h6300/drivers/usb/gadget/omap_udc.c 2005-08-23 22:38:07.653256887 +0300
588 @@ -2101,7 +2101,7 @@
589 /* boards that don't have VBUS sensing can't autogate 48MHz;
590 * can't enter deep sleep while a gadget driver is active.
592 - if (machine_is_omap_innovator() || machine_is_omap_osk())
593 + if (machine_is_omap_innovator() || machine_is_omap_osk() || machine_is_h6300())
594 omap_vbus_session(&udc->gadget, 1);
597 @@ -2119,7 +2119,7 @@
598 if (!driver || driver != udc->driver)
601 - if (machine_is_omap_innovator() || machine_is_omap_osk())
602 + if (machine_is_omap_innovator() || machine_is_omap_osk() || machine_is_h6300())
603 omap_vbus_session(&udc->gadget, 0);
605 if (udc->transceiver)
606 @@ -2727,7 +2727,7 @@
610 - if (machine_is_omap_innovator()) {
611 + if (machine_is_omap_innovator() || machine_is_h6300()) {
612 /* just set up software VBUS detect, and then
613 * later rig it so we always report VBUS.
614 * FIXME without really sensing VBUS, we can't
615 @@ -2957,6 +2957,11 @@
617 static int __init udc_init(void)
620 + if (machine_is_h6300())
624 INFO("%s, version: " DRIVER_VERSION
627 diff -Naur linux-2.6.12-rc5_omap1/drivers/usb/gadget/omap_udc.h linux-2.6.12-rc5_omap1_h6300/drivers/usb/gadget/omap_udc.h
628 --- linux-2.6.12-rc5_omap1/drivers/usb/gadget/omap_udc.h 2005-08-23 22:36:33.939174298 +0300
629 +++ linux-2.6.12-rc5_omap1_h6300/drivers/usb/gadget/omap_udc.h 2005-08-23 22:37:10.616335999 +0300
631 unsigned ep0_set_config:1;
632 unsigned ep0_reset_config:1;
633 unsigned ep0_setup:1;
635 struct completion *done;
638 diff -Naur linux-2.6.12-rc5_omap1/drivers/video/omap/lcd_h6300.c linux-2.6.12-rc5_omap1_h6300/drivers/video/omap/lcd_h6300.c
639 --- linux-2.6.12-rc5_omap1/drivers/video/omap/lcd_h6300.c 1970-01-01 02:00:00.000000000 +0200
640 +++ linux-2.6.12-rc5_omap1_h6300/drivers/video/omap/lcd_h6300.c 2005-08-23 22:38:07.655256568 +0300
643 + * File: drivers/video/omap_new/lcd-inn1510.c
645 + * LCD panel support for the TI OMAP1510 Innovator board
647 + * Copyright (C) 2004 Nokia Corporation
648 + * Author: Imre Deak <imre.deak@nokia.com>
650 + * This program is free software; you can redistribute it and/or modify it
651 + * under the terms of the GNU General Public License as published by the
652 + * Free Software Foundation; either version 2 of the License, or (at your
653 + * option) any later version.
655 + * This program is distributed in the hope that it will be useful, but
656 + * WITHOUT ANY WARRANTY; without even the implied warranty of
657 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
658 + * General Public License for more details.
660 + * You should have received a copy of the GNU General Public License along
661 + * with this program; if not, write to the Free Software Foundation, Inc.,
662 + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
665 +#include <linux/module.h>
671 +// #define OMAPFB_DBG 1
675 +static int h6300_panel_init(struct lcd_panel *panel)
682 +static void h6300_panel_cleanup(struct lcd_panel *panel)
688 +static int h6300_panel_enable(struct lcd_panel *panel)
695 +static void h6300_panel_disable(struct lcd_panel *panel)
701 +static unsigned long h6300_panel_get_caps(struct lcd_panel *panel)
706 +static struct lcdc_video_mode mode240x320 = {
709 + .pixel_clock = 12500,
720 +struct lcd_panel h6300_panel = {
722 + .config = LCD_PANEL_TFT,
723 + .video_mode = &mode240x320,
725 + .init = h6300_panel_init,
726 + .cleanup = h6300_panel_cleanup,
727 + .enable = h6300_panel_enable,
728 + .disable = h6300_panel_disable,
729 + .get_caps= h6300_panel_get_caps,
732 diff -Naur linux-2.6.12-rc5_omap1/drivers/video/omap/Makefile linux-2.6.12-rc5_omap1_h6300/drivers/video/omap/Makefile
733 --- linux-2.6.12-rc5_omap1/drivers/video/omap/Makefile 2005-08-23 22:36:34.395101723 +0300
734 +++ linux-2.6.12-rc5_omap1_h6300/drivers/video/omap/Makefile 2005-08-23 22:38:07.656256409 +0300
736 objs-y$(CONFIG_MACH_OMAP_H2) += lcd_h2.o
737 objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1610.o
738 objs-$(CONFIG_ARCH_OMAP1510)$(CONFIG_MACH_OMAP_INNOVATOR) += lcd_inn1510.o
739 +objs-$(CONFIG_ARCH_OMAP1510)$(CONFIG_MACH_H6300) += lcd_h6300.o
740 objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_OSK) += lcd_osk.o
741 objs-$(CONFIG_ARCH_OMAP730)$(CONFIG_MACH_OMAP_PERSEUS2) += lcd_p2.o
743 diff -Naur linux-2.6.12-rc5_omap1/drivers/video/omap/omapfb.h linux-2.6.12-rc5_omap1_h6300/drivers/video/omap/omapfb.h
744 --- linux-2.6.12-rc5_omap1/drivers/video/omap/omapfb.h 2005-08-23 22:36:34.397101404 +0300
745 +++ linux-2.6.12-rc5_omap1_h6300/drivers/video/omap/omapfb.h 2005-08-23 22:38:07.688251316 +0300
747 extern struct lcd_panel osk_panel;
748 extern struct lcd_panel innovator1610_panel;
749 extern struct lcd_panel innovator1510_panel;
750 +extern struct lcd_panel h6300_panel;
752 extern struct lcd_ctrl omapfb_lcdc_ctrl;
754 diff -Naur linux-2.6.12-rc5_omap1/drivers/video/omap/omapfb_main.c linux-2.6.12-rc5_omap1_h6300/drivers/video/omap/omapfb_main.c
755 --- linux-2.6.12-rc5_omap1/drivers/video/omap/omapfb_main.c 2005-08-23 22:36:34.472089467 +0300
756 +++ linux-2.6.12-rc5_omap1_h6300/drivers/video/omap/omapfb_main.c 2005-08-23 22:38:07.690250998 +0300
758 &innovator1610_panel,
761 +#ifdef CONFIG_MACH_H6300
766 static struct lcd_ctrl *ctrls[] = {
767 @@ -1881,6 +1884,8 @@
768 def_name = "inn1610";
769 if (machine_is_omap_innovator() && cpu_is_omap1510())
770 def_name = "inn1510";
771 + if (machine_is_h6300())
772 + def_name = "h6300";
773 if (def_name == NULL)
775 strncpy(name, def_name, sizeof(name) - 1);
776 diff -Naur linux-2.6.12-rc5_omap1/include/asm-arm/arch-omap/board-h6300.h linux-2.6.12-rc5_omap1_h6300/include/asm-arm/arch-omap/board-h6300.h
777 --- linux-2.6.12-rc5_omap1/include/asm-arm/arch-omap/board-h6300.h 1970-01-01 02:00:00.000000000 +0200
778 +++ linux-2.6.12-rc5_omap1_h6300/include/asm-arm/arch-omap/board-h6300.h 2005-08-23 22:38:07.726245268 +0300
781 + * linux/include/asm-arm/arch-omap/board-innovator.h
783 + * Copyright (C) 2001 RidgeRun, Inc.
785 + * This program is free software; you can redistribute it and/or modify it
786 + * under the terms of the GNU General Public License as published by the
787 + * Free Software Foundation; either version 2 of the License, or (at your
788 + * option) any later version.
790 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
791 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
792 + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
793 + * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
794 + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
795 + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
796 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
797 + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
798 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
799 + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
801 + * You should have received a copy of the GNU General Public License along
802 + * with this program; if not, write to the Free Software Foundation, Inc.,
803 + * 675 Mass Ave, Cambridge, MA 02139, USA.
805 +#ifndef __ASM_ARCH_H6300_H
806 +#define __ASM_ARCH_H6300_H
808 +#ifndef OMAP_SDRAM_DEVICE
809 +#define OMAP_SDRAM_DEVICE D256M_1X16_4B
812 +#define OMAP1510P1_IMIF_PRI_VALUE 0x00
813 +#define OMAP1510P1_EMIFS_PRI_VALUE 0x00
814 +#define OMAP1510P1_EMIFF_PRI_VALUE 0x00
816 +#define NR_FPGA_IRQS 24
817 +#define NR_IRQS IH_BOARD_BASE + NR_FPGA_IRQS
819 +#endif /* __ASM_ARCH_H6300_H */
820 diff -Naur linux-2.6.12-rc5_omap1/include/asm-arm/arch-omap/hardware.h linux-2.6.12-rc5_omap1_h6300/include/asm-arm/arch-omap/hardware.h
821 --- linux-2.6.12-rc5_omap1/include/asm-arm/arch-omap/hardware.h 2005-08-23 22:36:34.980008616 +0300
822 +++ linux-2.6.12-rc5_omap1_h6300/include/asm-arm/arch-omap/hardware.h 2005-08-23 22:38:07.727245109 +0300
824 #include "board-innovator.h"
827 +#ifdef CONFIG_MACH_H6300
828 +#include "board-h6300.h"
831 #ifdef CONFIG_MACH_OMAP_H2
832 #include "board-h2.h"
834 diff -Naur linux-2.6.12-rc5_omap1/include/asm-arm/arch-omap/mux.h linux-2.6.12-rc5_omap1_h6300/include/asm-arm/arch-omap/mux.h
835 --- linux-2.6.12-rc5_omap1/include/asm-arm/arch-omap/mux.h 2005-08-23 22:36:35.014003205 +0300
836 +++ linux-2.6.12-rc5_omap1_h6300/include/asm-arm/arch-omap/mux.h 2005-08-23 22:38:07.795234287 +0300
841 - P15_1610_UWIRE_CS0,
842 + P15_1610_UWIRE_CS3,
845 + /* OMAP-1510 uWire */
848 + X1_1510_UWIRE_SCLK,
852 /* OMAP-1610 Flash */
853 L3_1610_FLASH_CS2B_OE,
854 M8_1610_FLASH_CS2B_WE,
856 MUX_CFG("P15_1610_UWIRE_CS3", 8, 12, 1, 1, 22, 0, 1, 1, 1)
857 MUX_CFG("N15_1610_UWIRE_CS1", 7, 18, 2, 1, 14, 0, NA, 0, 1)
859 +/* OMAP-1510 uWire */
860 +MUX_CFG("X1_1510_UWIRE_CS3", 8, 12, 1, NA, 0, 0, NA, 0, 1)
861 +MUX_CFG("X1_1510_UWIRE_CS0", 8, 9, 1, NA, 0, 0, NA, 0, 1)
862 +MUX_CFG("X1_1510_UWIRE_SCLK", 8, 6, 0, NA, 0, 0, NA, 0, 1)
863 +MUX_CFG("X1_1510_UWIRE_SDO", 8, 3, 0, NA, 0, 0, NA, 0, 1)
864 +MUX_CFG("X1_1510_UWIRE_SDI", 8, 0, 0, 1, 18, 1, NA, 0, 1)
866 /* OMAP-1610 Flash */
867 MUX_CFG("L3_1610_FLASH_CS2B_OE",10, 6, 1, NA, 0, 0, NA, 0, 1)
868 MUX_CFG("M8_1610_FLASH_CS2B_WE",10, 3, 1, NA, 0, 0, NA, 0, 1)
871 MUX_CFG("V5_1710_MCLK_ON", B, 15, 0, NA, 0, 0, NA, 0, 0)
872 MUX_CFG("V5_1710_MCLK_OFF", B, 15, 6, NA, 0, 0, NA, 0, 0)
873 -MUX_CFG("R10_1610_MCLK_ON", B, 18, 0, NA, 22, 0, NA, 1, 0)
874 +/* orig: MUX_CFG("R10_1610_MCLK_ON", B, 18, 0, NA, 22, 0, NA, 1, 0) */
875 +MUX_CFG("R10_1610_MCLK_ON", B, 18, 0, NA, 22, 0, NA, 1, 1)
876 MUX_CFG("R10_1610_MCLK_OFF", B, 18, 6, 2, 22, 1, 2, 1, 1)
878 /* CompactFlash controller, conflicts with MMC1 */
879 diff -Naur linux-2.6.12-rc5_omap1/include/asm-arm/cpu-single.h linux-2.6.12-rc5_omap1_h6300/include/asm-arm/cpu-single.h
880 --- linux-2.6.12-rc5_omap1/include/asm-arm/cpu-single.h 2005-05-25 06:31:20.000000000 +0300
881 +++ linux-2.6.12-rc5_omap1_h6300/include/asm-arm/cpu-single.h 2005-08-23 22:38:07.817230785 +0300
883 extern void cpu_dcache_clean_area(void *, int);
884 extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm);
885 extern void cpu_set_pte(pte_t *ptep, pte_t pte);
886 -extern volatile void cpu_reset(unsigned long addr);
887 +extern void cpu_reset(unsigned long addr);
888 diff -Naur linux-2.6.12-rc5_omap1/Makefile linux-2.6.12-rc5_omap1_h6300/Makefile
889 --- linux-2.6.12-rc5_omap1/Makefile 2005-08-23 22:36:35.409940179 +0300
890 +++ linux-2.6.12-rc5_omap1_h6300/Makefile 2005-08-23 22:38:07.818230626 +0300
892 # expect to learn how to build the kernel reading this file.
894 # Add custom flags here to avoid conflict with updates
895 -EXTRAVERSION := $(EXTRAVERSION)-omap2
896 +EXTRAVERSION := $(EXTRAVERSION)-omap1-h6300
898 # Do not print "Entering directory ..."
899 MAKEFLAGS += --no-print-directory
900 diff -Naur linux-2.6.12-rc5_omap1/sound/oss/Kconfig linux-2.6.12-rc5_omap1_h6300/sound/oss/Kconfig
901 --- linux-2.6.12-rc5_omap1/sound/oss/Kconfig 2005-08-23 22:36:35.439935405 +0300
902 +++ linux-2.6.12-rc5_omap1_h6300/sound/oss/Kconfig 2005-08-23 22:38:07.849225692 +0300
905 config SOUND_OMAP_TSC2101
906 tristate "TSC2101 Stereo Codec"
907 - depends on SOUND_OMAP && ( MACH_OMAP_H2 || MACH_OMAP_H3 )
908 + depends on SOUND_OMAP && ARCH_OMAP1
910 select OMAP_UWIRE if ARCH_OMAP
912 diff -Naur linux-2.6.12-rc5_omap1/sound/oss/omap-audio.c linux-2.6.12-rc5_omap1_h6300/sound/oss/omap-audio.c
913 --- linux-2.6.12-rc5_omap1/sound/oss/omap-audio.c 2005-08-23 22:36:35.498926014 +0300
914 +++ linux-2.6.12-rc5_omap1_h6300/sound/oss/omap-audio.c 2005-08-23 22:38:07.895218371 +0300
917 /***************************** MACROS ************************************/
924 #define DPRINTK printk
925 #define FN_IN printk("[omap_audio.c:[%s] start\n", __FUNCTION__)
926 diff -Naur linux-2.6.12-rc5_omap1/sound/oss/omap-audio-tsc2101.c linux-2.6.12-rc5_omap1_h6300/sound/oss/omap-audio-tsc2101.c
927 --- linux-2.6.12-rc5_omap1/sound/oss/omap-audio-tsc2101.c 2005-08-23 22:36:35.557916624 +0300
928 +++ linux-2.6.12-rc5_omap1_h6300/sound/oss/omap-audio-tsc2101.c 2005-08-23 22:38:07.897218053 +0300
930 #include "omap-audio.h"
931 #include "omap-audio-dma-intfc.h"
932 #include <asm/arch/mcbsp.h>
933 -#if CONFIG_ARCH_OMAP16XX
934 +#if CONFIG_ARCH_OMAP1
935 #include <../drivers/ssi/omap-uwire.h>
936 #include <asm/arch/dsp_common.h>
940 #define CODEC_NAME "TSC2101"
942 -#if CONFIG_ARCH_OMAP16XX
943 -#define PLATFORM_NAME "OMAP16XX"
944 +#if CONFIG_ARCH_OMAP1
945 +#define PLATFORM_NAME "OMAP"
948 #if CONFIG_ARCH_OMAP16XX
949 #define OMAP_DSP_BASE 0xE0000000
950 +#elif CONFIG_ARCH_OMAP1510
951 +#define OMAP_DSP_BASE 0xE0000000
954 /* Define to set the tsc as the master w.r.t McBSP */
957 /* Select the McBSP For Audio */
958 #if CONFIG_ARCH_OMAP16XX
959 -#define AUDIO_MCBSP OMAP_MCBSP1
960 +# define AUDIO_MCBSP OMAP_MCBSP1
961 +# define AUDIO_DMA_TX OMAP_DMA_MCBSP1_TX
962 +# define AUDIO_DMA_RX OMAP_DMA_MCBSP1_RX
963 +#elif CONFIG_ARCH_OMAP1510
964 +# define AUDIO_MCBSP OMAP_MCBSP1
965 +# define AUDIO_DMA_TX OMAP_DMA_MCBSP1_TX
966 +# define AUDIO_DMA_RX OMAP_DMA_MCBSP1_RX
968 -#error "UnSupported Configuration"
969 +# error "UnSupported Configuration"
972 #define REC_MASK (SOUND_MASK_LINE | SOUND_MASK_MIC)
973 @@ -123,18 +131,18 @@
975 /*********** Debug Macros ********/
976 /* To Generate a rather shrill tone -test the entire path */
979 /* To Generate a tone for each keyclick - test the tsc,spi paths*/
980 -//#define TEST_KEYCLICK
981 +#define TEST_KEYCLICK
982 /* To dump the tsc registers for debug */
983 -//#define TSC_DUMP_REGISTERS
984 +#define TSC_DUMP_REGISTERS
994 #define DPRINTK(ARGS...) printk(KERN_INFO "<%s>: ",__FUNCTION__);printk(ARGS)
995 #define FN_IN printk(KERN_INFO "[%s]: start\n", __FUNCTION__)
996 @@ -149,13 +157,13 @@
998 static audio_stream_t output_stream = {
1000 - .dma_dev = OMAP_DMA_MCBSP1_TX,
1001 + .dma_dev = AUDIO_DMA_TX,
1002 .input_or_output = FMODE_WRITE
1005 static audio_stream_t input_stream = {
1007 - .dma_dev = OMAP_DMA_MCBSP1_RX,
1008 + .dma_dev = AUDIO_DMA_RX,
1009 .input_or_output = FMODE_READ
1012 @@ -215,6 +223,17 @@
1015 static struct omap_mcbsp_reg_cfg initial_config = {
1016 +#if CONFIG_MACH_H6300
1027 .spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
1028 .spcr1 = RINTM(3) | RRST,
1029 .rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
1030 @@ -230,14 +249,13 @@
1031 #if CONFIG_MACH_OMAP_H2
1032 .pcr0 = CLKXM | CLKRM | FSXP | FSRP | CLKXP | CLKRP,
1033 #elif CONFIG_MACH_OMAP_H3
1036 +# ifndef TSC_MASTER
1037 .pcr0 = FSXM | FSRM | CLKXM | CLKRM | CLKXP | CLKRP,
1040 .pcr0 = CLKRM | SCLKME | FSXP | FSRP | CLKXP | CLKRP,
1041 -#endif /* tsc Master defs */
1043 +# endif /* tsc Master defs */
1044 #endif /* platform specific inits */
1048 /***************************** MODULES SPECIFIC FUNCTION PROTOTYPES ********************/
1049 @@ -1218,5 +1236,5 @@
1051 MODULE_AUTHOR("Texas Instruments");
1053 - ("Glue audio driver for the TI OMAP1610/OMAP1710 TSC2101 codec.");
1054 + ("Glue audio driver for the TI OMAP TSC2101 codec.");
1055 MODULE_LICENSE("GPL");