]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/linux/linux-h6300-omap1-2.6.12-rc5/h6300_omap1_2612rc5.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / linux / linux-h6300-omap1-2.6.12-rc5 / h6300_omap1_2612rc5.patch
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
4 @@ -21,6 +21,7 @@
5  #include <asm/arch/usb.h>
6  
7  #include "clock.h"
8 +#include <asm/mach-types.h>
9  
10  static LIST_HEAD(clocks);
11  static DECLARE_MUTEX(clocks_sem);
12 @@ -447,8 +448,17 @@
13  static struct clk mclk_1510 = {
14         .name           = "mclk",
15         /* Direct from ULPD, no parent. May be enabled by ext hardware. */
16 +#if 0
17         .rate           = 12000000,
18         .flags          = CLOCK_IN_OMAP1510 | RATE_FIXED,
19 +#else
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,
26 +#endif
27  };
28  
29  static struct clk mclk_16xx = {
30 @@ -1247,6 +1257,9 @@
31         clk_use(&armxor_ck);
32         clk_use(&armtim_ck);
33  
34 +       if (machine_is_h6300())
35 +               clk_enable(&lcd_ck);
36 +
37         if (cpu_is_omap1510())
38                 clk_enable(&arm_gpio_ck);
39  
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
43 @@ -671,6 +671,7 @@
44         unsigned long top, bottom;
45         int es;
46         u16 w;
47 +       u16 l;
48         unsigned long en, fn;
49         long ei, fi;
50         unsigned long vxres;
51 @@ -769,6 +770,10 @@
52         }
53  
54         if (omap_dma_in_1510_mode()) {
55 +               l = omap_readw(OMAP1510_DMA_LCD_CTRL);
56 +               l &= ~(1 << 6);
57 +               omap_writew (l, OMAP1510_DMA_LCD_CTRL);
58 +
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);
62 @@ -893,7 +898,6 @@
63         w = omap_readw(OMAP1610_DMA_LCD_CCR);
64         w |= 1 << 7;
65         omap_writew(w, OMAP1610_DMA_LCD_CCR);
66 -
67         lcd_dma.active = 1;
68  }
69  
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
73 @@ -760,3 +760,4 @@
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
81 @@ -0,0 +1,143 @@
82 +/*
83 + * linux/arch/arm/mach-omap/board-generic.c
84 + *
85 + * Modified from board-h6300.c
86 + *
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.
91 + *
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.
95 + */
96 +
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>
103 +
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>
109 +
110 +#include <asm/arch/gpio.h>
111 +#include <asm/arch/tc.h>
112 +#include <asm/arch/usb.h>
113 +
114 +#include "../common.h"
115 +
116 +static int __initdata h6300_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
117 +
118 +static struct mtd_partition h6300_partitions[] = {
119 +       /* bootloader (U-Boot, etc) in first sector */
120 +       {
121 +             .name             = "bootloader",
122 +             .offset           = 0,
123 +             .size             = SZ_128K,
124 +             .mask_flags       = MTD_WRITEABLE, /* force read-only */
125 +       },
126 +       /* bootloader params in the next sector */
127 +       {
128 +             .name             = "params",
129 +             .offset           = MTDPART_OFS_APPEND,
130 +             .size             = SZ_128K,
131 +             .mask_flags       = 0,
132 +       },
133 +       /* kernel */
134 +       {
135 +             .name             = "kernel",
136 +             .offset           = MTDPART_OFS_APPEND,
137 +             .size             = SZ_2M,
138 +             .mask_flags       = 0
139 +       },
140 +       /* rest of flash1 is a file system */
141 +       {
142 +             .name             = "rootfs",
143 +             .offset           = MTDPART_OFS_APPEND,
144 +             .size             = SZ_16M - SZ_2M - 2 * SZ_128K,
145 +             .mask_flags       = 0
146 +       },
147 +       /* file system */
148 +       {
149 +             .name             = "filesystem",
150 +             .offset           = MTDPART_OFS_APPEND,
151 +             .size             = MTDPART_SIZ_FULL,
152 +             .mask_flags       = 0
153 +       }
154 +};
155 +
156 +static struct flash_platform_data h6300_flash_data = {
157 +       .map_name       = "cfi_probe",
158 +       .width          = 2,
159 +       .parts          = h6300_partitions,
160 +       .nr_parts       = ARRAY_SIZE(h6300_partitions),
161 +};
162 +
163 +static struct resource h6300_flash_resource = {
164 +       .start          = OMAP_CS0_PHYS,
165 +       .end            = OMAP_CS0_PHYS + SZ_32M - 1,
166 +       .flags          = IORESOURCE_MEM,
167 +};
168 +
169 +static struct platform_device h6300_flash_device = {
170 +       .name           = "omapflash",
171 +       .id             = 0,
172 +       .dev            = {
173 +               .platform_data  = &h6300_flash_data,
174 +       },
175 +       .num_resources  = 1,
176 +       .resource       = &h6300_flash_resource,
177 +};
178 +
179 +static struct platform_device *h6300_devices[] __initdata = {
180 +       &h6300_flash_device,
181 +};
182 +
183 +static void __init h6300_init_irq(void)
184 +{
185 +       omap_init_irq();
186 +       omap_gpio_init();
187 +}
188 +
189 +/* assume no Mini-AB port */
190 +
191 +static struct omap_usb_config h6300_usb_config __initdata = {
192 +       .hmc_mode             = 0,
193 +       .register_dev     = 1,
194 +       .pins[0]        = 0,
195 +};
196 +
197 +static struct omap_board_config_kernel h6300_config[] = {
198 +       { OMAP_TAG_USB,           &h6300_usb_config },
199 +};
200 +
201 +static void __init h6300_init(void)
202 +{
203 +       platform_add_devices(h6300_devices, ARRAY_SIZE(h6300_devices));
204 +       h6300_config[0].data = &h6300_usb_config;
205 +
206 +       omap_board_config = h6300_config;
207 +       omap_board_config_size = ARRAY_SIZE(h6300_config);
208 +}
209 +
210 +static void __init h6300_map_io(void)
211 +{
212 +       omap_map_common_io();
213 +       omap_serial_init(h6300_serial_ports);
214 +}
215 +
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,
224 +MACHINE_END
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
228 @@ -26,6 +26,12 @@
229            TI OMAP 1510 or 1610 Innovator board support. Say Y here if you
230            have such a board.
231  
232 +config MACH_H6300
233 +       bool "HP IPaq H6300"
234 +       depends on ARCH_OMAP1 && ARCH_OMAP1510
235 +       help
236 +                       HP IPaq H6300 series
237 +
238  config MACH_OMAP_H2
239         bool "TI H2 Support"
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
244 @@ -9,6 +9,7 @@
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
255 @@ -8,5 +8,6 @@
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
260  
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
265 @@ -39,14 +39,14 @@
266  
267  #include <asm/mach-types.h>
268  
269 -//#define DEBUG
270 +#define DEBUG
271  
272  #include "omap_ts.h"
273  
274  #define OMAP_TS_NAME   "omap_ts"
275  
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)
279         &hx_ts,
280  #endif
281  #ifdef CONFIG_MACH_OMAP_OSK
282 @@ -70,8 +70,7 @@
283         input_report_abs(&(ts_omap.inputdevice), ABS_PRESSURE, data[2]);
284         input_sync(&(ts_omap.inputdevice));
285  
286 -       DEBUG_TS("omap_ts_read: read x=%d,y=%d,p=%d\n", data[0], data[1],
287 -                data[2]);
288 +       //DEBUG_TS("omap_ts_read: read x=%d,y=%d,p=%d\n", data[0], data[1], data[2]);
289  
290         return 0;
291  }
292 @@ -84,7 +83,7 @@
293  
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);
299                 }
300                 ts_omap.touched = 1;
301 @@ -93,7 +92,7 @@
302                 add_timer(&(ts_omap.ts_timer));
303         } else {
304                 if (ts_omap.touched) {
305 -                       DEBUG_TS("omap_ts_timer: pen up\n");
306 +                       //DEBUG_TS("omap_ts_timer: pen up\n");
307                         ts_omap.touched = 0;
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
313 @@ -33,6 +33,7 @@
314  #include <asm/arch/mux.h>
315  #include <asm/arch/hardware.h>
316  #include <asm/hardware/tsc2101.h>
317 +#include <linux/delay.h>
318  
319  #include "../drivers/ssi/omap-tsc2101.h"
320  #include "omap_ts.h"
321 @@ -88,6 +89,9 @@
322         } else if (machine_is_omap_h3()) {
323                 gpio = H3_GPIO_NUM;
324                 omap_cfg_reg(W19_1610_GPIO48);
325 +       }else if (machine_is_h6300()) {
326 +               gpio = 2;
327 +               omap_cfg_reg(M14_1510_GPIO2);
328         } else
329                 return -ENODEV;
330  
331 @@ -180,5 +184,8 @@
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())
336 +               omap_free_gpio(2);
337 +
338  }
339  #endif
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
343 @@ -25,6 +25,7 @@
344  #include <linux/delay.h>
345  
346  #include <asm/system.h>
347 +#include <asm/arch/gpio.h>
348  #include <asm/irq.h>
349  #include <asm/io.h>
350  #include <asm/mach-types.h>
351 @@ -39,7 +40,7 @@
352  
353  #include "omap-tsc2101.h"
354  
355 -#if CONFIG_ARCH_OMAP16XX
356 +#if CONFIG_ARCH_OMAP1
357  #include <../drivers/ssi/omap-uwire.h>
358  #else
359  #error "Unsupported configuration"
360 @@ -47,7 +48,7 @@
361  
362  #define SPIO 1
363  
364 -static int count;
365 +static int count = 0;
366  static spinlock_t tsc2101_lock = SPIN_LOCK_UNLOCKED;
367  static struct clk  * tsc2101_mclk_ck;
368  
369 @@ -66,13 +67,12 @@
370         if (count++ == 0) {
371                 int ret = 0;
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);
376 -               } else {
377 -                       if (machine_is_omap_h2()) {
378 -                               ret = omap_cfg_reg(R10_1610_MCLK_ON);
379 -                       }
380 -               }
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
385  
386                 /* Get the MCLK */
387                 tsc2101_mclk_ck = clk_get(NULL, "mclk");
388 @@ -108,19 +108,22 @@
389         if (--count == 0) {
390                 int ret = 0;
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);
395 -               } else {
396 -                       if (machine_is_omap_h2()) {
397 -                               ret = omap_cfg_reg(R10_1610_MCLK_OFF);
398 -                       }
399 -               }
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
404  
405                 /* Release the MCLK */
406                 clk_disable(tsc2101_mclk_ck);
407                 clk_put(tsc2101_mclk_ck);
408                 tsc2101_mclk_ck = NULL;
409  
410 +#if defined(CONFIG_MACH_H6300)
411 +               omap_free_gpio(8);
412 +#endif
413 +
414                 module_put(THIS_MODULE);
415         }
416         spin_unlock(&tsc2101_lock);
417 @@ -130,57 +133,57 @@
418  {
419  
420         int ret = 0;
421 +       int cs  = 0;
422  
423 -       if (machine_is_omap_h2()) {
424 -               ret =
425 -                   omap_uwire_data_transfer(1, 
426 -                                            (((page) << 11) | (address << 5)),
427 -                                            16, 0, NULL, 1);
428 -               if (ret) {
429 -                       printk(KERN_ERR
430 -                              "uwire-write returned error for address %x\n",
431 -                              address);
432 -                       return;
433 -               }
434 -               ret = omap_uwire_data_transfer(1, data, 16, 0, NULL, 0);
435 -               if (ret) {
436 -                       printk(KERN_ERR
437 -                              "uwire-write returned error for address %x\n",
438 -                              address);
439 -                       return;
440 -               }
441 +       if (cpu_is_omap16xx ()) {
442 +               if (machine_is_omap_h2())
443 +                       cs=1;
444 +               if (machine_is_omap_h3())
445 +                       cs=0;
446 +       } else if (cpu_is_omap15xx ()) {
447 +               cs=0;
448         }
449 -       if (machine_is_omap_h3()) {
450  
451 -               ret =
452 -                   omap_uwire_data_transfer(0, ((page << 11) | (address << 5)),
453 -                                            16, 0, NULL, 1);
454 -               if (ret) {
455 -                       printk(KERN_ERR
456 -                              "uwire-write returned error for address %x\n",
457 -                              address);
458 -                       return;
459 -               }
460 -               ret = omap_uwire_data_transfer(0, data, 16, 0, NULL, 0);
461 -               if (ret) {
462 -                       printk(KERN_ERR
463 -                              "uwire-write returned error for address %x\n",
464 -                              address);
465 -                       return;
466 -               }
467 +#if defined(CONFIG_MACH_H6300)
468 +       omap_set_gpio_dataout(8, 0);
469 +#endif
470 +
471 +       ret = omap_uwire_data_transfer(cs, 
472 +                       (((page) << 11) | (address << 5)),
473 +                       16, 0, NULL, 1);
474 +       if (ret) {
475 +               printk(KERN_ERR
476 +                       "uwire-write returned error for address %x\n",
477 +                       address);
478 +               omap_set_gpio_dataout(8, 1);
479 +               return;
480 +       }
481 +       ret = omap_uwire_data_transfer(cs, data, 16, 0, NULL, 0);
482 +       if (ret) {
483 +               printk(KERN_ERR
484 +                       "uwire-write returned error for address %x\n",
485 +                       address);
486 +               omap_set_gpio_dataout(8, 1);
487 +               return;
488         }
489  
490 +#if defined(CONFIG_MACH_H6300)
491 +       omap_set_gpio_dataout(8, 1);
492 +#endif
493  }
494  
495  void omap_tsc2101_reads(int page, u8 startaddress, u16 * data, int numregs)
496  {
497         int cs = 0, i;
498 -       if (machine_is_omap_h2()) {
499 +       if (machine_is_omap_h2())
500                 cs = 1;
501 -       }
502 -       if (machine_is_omap_h3()) {
503 +       if (machine_is_omap_h3())
504                 cs = 0;
505 -       }
506 +
507 +#if defined(CONFIG_MACH_H6300)
508 +       omap_set_gpio_dataout(8, 0);
509 +#endif
510 +
511         (void)omap_uwire_data_transfer(cs, (0x8000 | (page << 11)
512                                             | (startaddress << 5)),
513                                        16, 0, NULL, 1);
514 @@ -188,11 +191,15 @@
515                 omap_uwire_data_transfer(cs, 0, 0, 16, data, 1);
516         }
517         omap_uwire_data_transfer(cs, 0, 0, 16, data, 0);
518 +
519 +#if defined(CONFIG_MACH_H6300)
520 +       omap_set_gpio_dataout(8, 1);
521 +#endif
522  }
523  
524  u16 omap_tsc2101_read(int page, u8 address)
525  {
526 -       u16 ret;
527 +       u16 ret=0;
528         omap_tsc2101_reads(page, address, &ret, 1);
529         return ret;
530  }
531 @@ -217,7 +224,6 @@
532                 return err;
533         }
534  #endif
535 -
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);
539 @@ -228,9 +234,22 @@
540                 omap_cfg_reg(N14_1610_UWIRE_CS0);
541                 omap_uwire_configure_mode(0, uwire_flags);
542         }
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);
547 +
548 +               omap_request_gpio(8);
549 +               omap_set_gpio_dataout(8, 0);
550 +                omap_set_gpio_direction (8, 0);
551 +       }
552 +
553  
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);
560  
561         return 0;
562  }
563 @@ -243,5 +262,5 @@
564  
565  MODULE_AUTHOR("Texas Instruments");
566  MODULE_DESCRIPTION
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
573 @@ -205,6 +205,11 @@
574                 omap_cfg_reg(N14_1610_UWIRE_CS0);
575                 omap_cfg_reg(N15_1610_UWIRE_CS1);
576         }
577 +
578 +       if (machine_is_h6300 ()) {
579 +               omap_cfg_reg(X1_1510_UWIRE_CS0);
580 +               omap_cfg_reg(X1_1510_UWIRE_CS3);
581 +       }
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.
591          */
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);
595  
596  done:
597 @@ -2119,7 +2119,7 @@
598         if (!driver || driver != udc->driver)
599                 return -EINVAL;
600  
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);
604  
605         if (udc->transceiver)
606 @@ -2727,7 +2727,7 @@
607                 hmc = HMC_1510;
608                 type = "(unknown)";
609  
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 @@
616  
617  static int __init udc_init(void)
618  {
619 +#ifdef USE_DMA
620 +       if (machine_is_h6300())
621 +               use_dma=0;
622 +#endif
623 +
624         INFO("%s, version: " DRIVER_VERSION
625  #ifdef USE_ISO
626                 " (iso)"
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
630 @@ -174,6 +174,7 @@
631         unsigned                        ep0_set_config:1;
632         unsigned                        ep0_reset_config:1;
633         unsigned                        ep0_setup:1;
634 +
635         struct completion               *done;
636  };
637  
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
641 @@ -0,0 +1,90 @@
642 +/*
643 + * File: drivers/video/omap_new/lcd-inn1510.c
644 + *
645 + * LCD panel support for the TI OMAP1510 Innovator board
646 + *
647 + * Copyright (C) 2004 Nokia Corporation
648 + * Author: Imre Deak <imre.deak@nokia.com>
649 + *
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.
654 + *
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.
659 + *
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.
663 + */
664 +
665 +#include <linux/module.h>
666 +#include <asm/io.h>
667 +
668 +
669 +#include "omapfb.h"
670 +
671 +// #define OMAPFB_DBG 1
672 +
673 +#include "debug.h"
674 +
675 +static int h6300_panel_init(struct lcd_panel *panel)
676 +{
677 +       DBGENTER(1);
678 +       DBGLEAVE(1);
679 +       return 0;
680 +}
681 +
682 +static void h6300_panel_cleanup(struct lcd_panel *panel)
683 +{
684 +       DBGENTER(1);
685 +       DBGLEAVE(1);
686 +}
687 +
688 +static int h6300_panel_enable(struct lcd_panel *panel)
689 +{
690 +       DBGENTER(1);
691 +       DBGLEAVE(1);
692 +       return 0;
693 +}
694 +
695 +static void h6300_panel_disable(struct lcd_panel *panel)
696 +{
697 +       DBGENTER(1);
698 +       DBGLEAVE(1);
699 +}
700 +
701 +static unsigned long h6300_panel_get_caps(struct lcd_panel *panel)
702 +{
703 +       return 0;
704 +}
705 +
706 +static struct lcdc_video_mode mode240x320 = {
707 +       .x_res = 240,
708 +       .y_res = 320,
709 +       .pixel_clock = 12500,
710 +       .bpp = 16,
711 +       .hsw = 12,
712 +       .hfp = 10,
713 +       .hbp = 10,
714 +       .vsw = 3,
715 +       .vfp = 10,
716 +       .vbp = 3,
717 +       .pcd = 4,
718 +};
719 +
720 +struct lcd_panel h6300_panel = {
721 +       .name       = "h6300",
722 +       .config     = LCD_PANEL_TFT,
723 +       .video_mode = &mode240x320,
724 +
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,
730 +};
731 +
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
735 @@ -11,6 +11,7 @@
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
742  
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
746 @@ -316,6 +316,7 @@
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;
751  
752  extern struct lcd_ctrl omapfb_lcdc_ctrl;
753  
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
757 @@ -108,6 +108,9 @@
758         &innovator1610_panel,
759  #endif
760  #endif
761 +#ifdef CONFIG_MACH_H6300
762 +       &h6300_panel,
763 +#endif
764  };
765  
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)
774                         return -1;
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
779 @@ -0,0 +1,40 @@
780 +/*
781 + * linux/include/asm-arm/arch-omap/board-innovator.h
782 + *
783 + * Copyright (C) 2001 RidgeRun, Inc.
784 + *
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.
789 + *
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.
800 + *
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.
804 + */
805 +#ifndef __ASM_ARCH_H6300_H
806 +#define __ASM_ARCH_H6300_H
807 +
808 +#ifndef OMAP_SDRAM_DEVICE
809 +#define OMAP_SDRAM_DEVICE                      D256M_1X16_4B
810 +#endif
811 +
812 +#define OMAP1510P1_IMIF_PRI_VALUE              0x00
813 +#define OMAP1510P1_EMIFS_PRI_VALUE             0x00
814 +#define OMAP1510P1_EMIFF_PRI_VALUE             0x00
815 +
816 +#define NR_FPGA_IRQS           24
817 +#define NR_IRQS                 IH_BOARD_BASE + NR_FPGA_IRQS
818 +
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
823 @@ -299,6 +299,10 @@
824  #include "board-innovator.h"
825  #endif
826  
827 +#ifdef CONFIG_MACH_H6300
828 +#include "board-h6300.h"
829 +#endif
830 +
831  #ifdef CONFIG_MACH_OMAP_H2
832  #include "board-h2.h"
833  #endif
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
837 @@ -250,9 +250,16 @@
838         U18_1610_UWIRE_SDI,
839         W21_1610_UWIRE_SDO,
840         N14_1610_UWIRE_CS0,
841 -       P15_1610_UWIRE_CS0,
842 +       P15_1610_UWIRE_CS3,
843         N15_1610_UWIRE_CS1,
844  
845 +       /* OMAP-1510 uWire */
846 +       X1_1510_UWIRE_CS3,
847 +       X1_1510_UWIRE_CS0,
848 +       X1_1510_UWIRE_SCLK,
849 +       X1_1510_UWIRE_SDO,
850 +       X1_1510_UWIRE_SDI,
851 +
852         /* OMAP-1610 Flash */
853         L3_1610_FLASH_CS2B_OE,
854         M8_1610_FLASH_CS2B_WE,
855 @@ -481,6 +488,13 @@
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)
858  
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)
865 +
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)
869 @@ -545,7 +559,8 @@
870  /* MCLK Settings */
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)
877  
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
882 @@ -41,4 +41,4 @@
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
891 @@ -11,7 +11,7 @@
892  # expect to learn how to build the kernel reading this file.
893  
894  # Add custom flags here to avoid conflict with updates
895 -EXTRAVERSION := $(EXTRAVERSION)-omap2
896 +EXTRAVERSION := $(EXTRAVERSION)-omap1-h6300
897  
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
903 @@ -12,7 +12,7 @@
904  
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
909         select OMAP_TSC2101
910         select OMAP_UWIRE if ARCH_OMAP
911         ---help---
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
915 @@ -56,8 +56,8 @@
916  
917  /***************************** MACROS ************************************/
918  
919 -#undef DEBUG
920 -//#define DEBUG
921 +//#undef DEBUG
922 +#define DEBUG
923  #ifdef DEBUG
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
929 @@ -48,7 +48,7 @@
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>
937  #else
938 @@ -70,12 +70,14 @@
939  
940  #define CODEC_NAME              "TSC2101"
941  
942 -#if CONFIG_ARCH_OMAP16XX
943 -#define PLATFORM_NAME "OMAP16XX"
944 +#if CONFIG_ARCH_OMAP1
945 +#define PLATFORM_NAME "OMAP"
946  #endif
947  
948  #if CONFIG_ARCH_OMAP16XX
949  #define OMAP_DSP_BASE        0xE0000000
950 +#elif CONFIG_ARCH_OMAP1510
951 +#define OMAP_DSP_BASE        0xE0000000
952  #endif
953  
954  /* Define to set the tsc as the master w.r.t McBSP */
955 @@ -91,9 +93,15 @@
956  
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
967  #else
968 -#error "UnSupported Configuration"
969 +#      error "UnSupported Configuration"
970  #endif
971  
972  #define REC_MASK                                 (SOUND_MASK_LINE | SOUND_MASK_MIC)
973 @@ -123,18 +131,18 @@
974  
975  /*********** Debug Macros ********/
976  /* To Generate a rather shrill tone -test the entire path */
977 -//#define TONE_GEN
978 +#define TONE_GEN
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
985  
986  #ifdef DPRINTK
987  #undef DPRINTK
988  #endif
989  #undef DEBUG
990  
991 -//#define DEBUG
992 +#define DEBUG
993  #ifdef DEBUG
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 @@
997  
998  static audio_stream_t output_stream = {
999         .id              = "TSC2101 out",
1000 -       .dma_dev         = OMAP_DMA_MCBSP1_TX,
1001 +       .dma_dev         = AUDIO_DMA_TX,
1002         .input_or_output = FMODE_WRITE
1003  };
1004  
1005  static audio_stream_t input_stream = {
1006         .id              = "TSC2101 in",
1007 -       .dma_dev         = OMAP_DMA_MCBSP1_RX,
1008 +       .dma_dev         = AUDIO_DMA_RX,
1009         .input_or_output = FMODE_READ
1010  };
1011  
1012 @@ -215,6 +223,17 @@
1013  };
1014  
1015  static struct omap_mcbsp_reg_cfg initial_config = {
1016 +#if CONFIG_MACH_H6300
1017 +       .spcr2 = 0x0005,
1018 +       .spcr1 = 0x0005,
1019 +       .rcr2  = 0x8041,
1020 +       .rcr1  = 0x8041,
1021 +       .xcr2  = 0x00a1,
1022 +       .xcr1  = 0x00a1,
1023 +       .srgr2 = 0xb000,
1024 +       .srgr1 = 0xb000,
1025 +       .pcr0  = 0x0081,
1026 +#else
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
1034 -
1035 -#ifndef TSC_MASTER
1036 +#      ifndef TSC_MASTER
1037         .pcr0  = FSXM | FSRM | CLKXM | CLKRM | CLKXP | CLKRP,
1038 -#else
1039 +#              else
1040         .pcr0  = CLKRM | SCLKME | FSXP | FSRP | CLKXP | CLKRP,
1041 -#endif                         /* tsc Master defs */
1042 -
1043 +#      endif                           /* tsc Master defs */
1044  #endif                         /* platform specific inits */
1045 +#endif
1046  };
1047  
1048  /***************************** MODULES SPECIFIC FUNCTION PROTOTYPES ********************/
1049 @@ -1218,5 +1236,5 @@
1050  
1051  MODULE_AUTHOR("Texas Instruments");
1052  MODULE_DESCRIPTION
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");