* [PATCH] Palm TE Touchscreen and fixes
@ 2006-01-14 21:06 andrzej zaborowski
2006-01-15 9:10 ` Komal Shah
2006-01-15 20:19 ` Tony Lindgren
0 siblings, 2 replies; 10+ messages in thread
From: andrzej zaborowski @ 2006-01-14 21:06 UTC (permalink / raw)
To: linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 2491 bytes --]
Hello,
I own a Palm Tungsten E PDA that is based on an OMAP310 motherboard.
There has already been some interest in running Linux on this device,
in particular Romain Goyet submitted a patch that made basic fixes
which were required for the kernel to boot and additionally included a
working driver for the LCD of OMAP310. This patch was applied around
Linux 2.6.13 and since then many changes broke the compatibility with
OMAP311 and even introduced compilation errors. I'm attaching three
patches against the todays GIT snapshot:
- The first one fixes the compilation errors and some clock issues
that made the kernel hang on boot on Palm Tungsten E. While these
changes make the kernel boot and work well with the device, and
hopefully don't affect other devices, I don't know how correct are my
ways of fixing it, as I'm completely inexperienced in kernel insides.
Note that the last hunk is for a compilation error introduced two days
ago here: http://www.kernel.org/git/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=89ac1ab633637032c80a5d3424120d153ff7d754
and I think today someone already proposed a different idea for
dealing with this error.
- The second patch adds support for the Touchscreen device found in
OMAP310. Again I don't know how proper is the driver, but it works and
it was written according to the documentation from Texas Instruments.
Because the DSP chipset of the OMAP310 board (called TSC2301) carries
out a big part of the task of controlling the touchscreen, in
hardware, the driver mechanism for this touchscreen is much simpler
than other OMAP touchscreens and I had to make small changes in
"omap_ts.c" which is generic for all OMAP touchscreens.
- The last patch only corrects some typos I found while browsing the sources.
I think the second and the third patch are 100% safe to apply, and the
first one needs to be reviewed by someone more experienced than
myself. I will appreciate any kind of critics.
Here's one detail I noticed: input from the touchscreen, with both
"tsdev" and "evdev" compiled in, doesn't stop the kernel srceensaver
from kicking in after five minutes from the bootup. Does someone know
what part of the system should notify the kernel to reset the timer?
Does it come from userspace or the device drivers?
Regards,
Andrzej Zaborowski
--
balrog 2oo6
Dear Outlook users: Please remove me from your address books
http://www.newsforge.com/article.pl?sid=03/08/21/143258
[-- Attachment #2: linux-palmte-errors.patch --]
[-- Type: application/octet-stream, Size: 19650 bytes --]
diff -Naur linux-omap-2.6.orig/arch/arm/mach-omap1/board-generic.c linux-omap-2.6/arch/arm/mach-omap1/board-generic.c
--- linux-omap-2.6.orig/arch/arm/mach-omap1/board-generic.c 2006-01-14 14:58:56.000000000 +0000
+++ linux-omap-2.6/arch/arm/mach-omap1/board-generic.c 2006-01-14 15:56:12.000000000 +0000
@@ -88,7 +88,7 @@
static void __init omap_generic_init(void)
{
#ifdef CONFIG_ARCH_OMAP15XX
- if (cpu_is_omap1510()) {
+ if (cpu_is_omap15xx()) {
generic_config[0].data = &generic1510_usb_config;
}
#endif
diff -Naur linux-omap-2.6.orig/arch/arm/mach-omap1/clock.c linux-omap-2.6/arch/arm/mach-omap1/clock.c
--- linux-omap-2.6.orig/arch/arm/mach-omap1/clock.c 2006-01-14 14:58:56.000000000 +0000
+++ linux-omap-2.6/arch/arm/mach-omap1/clock.c 2006-01-14 15:56:12.000000000 +0000
@@ -673,7 +673,7 @@
arm_idlect1_mask = ~0;
for (clkp = onchip_clks; clkp < onchip_clks+ARRAY_SIZE(onchip_clks); clkp++) {
- if (((*clkp)->flags &CLOCK_IN_OMAP1510) && cpu_is_omap1510()) {
+ if (((*clkp)->flags & CLOCK_IN_OMAP15XX) && cpu_is_omap15xx()) {
clk_register(*clkp);
continue;
}
@@ -784,7 +784,7 @@
clk_enable(&armxor_ck.clk);
clk_enable(&armtim_ck.clk); /* This should be done by timer code */
- if (cpu_is_omap1510())
+ if (cpu_is_omap15xx())
clk_enable(&arm_gpio_ck);
return 0;
diff -Naur linux-omap-2.6.orig/arch/arm/mach-omap1/clock.h linux-omap-2.6/arch/arm/mach-omap1/clock.h
--- linux-omap-2.6.orig/arch/arm/mach-omap1/clock.h 2006-01-14 14:58:56.000000000 +0000
+++ linux-omap-2.6/arch/arm/mach-omap1/clock.h 2006-01-14 17:57:27.000000000 +0000
@@ -150,7 +150,7 @@
static struct clk ck_ref = {
.name = "ck_ref",
.rate = 12000000,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
ALWAYS_ENABLED,
.enable = &omap1_clk_enable_generic,
.disable = &omap1_clk_disable_generic,
@@ -159,7 +159,7 @@
static struct clk ck_dpll1 = {
.name = "ck_dpll1",
.parent = &ck_ref,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
RATE_PROPAGATES | ALWAYS_ENABLED,
.enable = &omap1_clk_enable_generic,
.disable = &omap1_clk_disable_generic,
@@ -182,7 +182,7 @@
static struct clk arm_ck = {
.name = "arm_ck",
.parent = &ck_dpll1,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
RATE_CKCTL | RATE_PROPAGATES | ALWAYS_ENABLED,
.rate_offset = CKCTL_ARMDIV_OFFSET,
.recalc = &omap1_ckctl_recalc,
@@ -194,7 +194,7 @@
.clk = {
.name = "armper_ck",
.parent = &ck_dpll1,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
RATE_CKCTL | CLOCK_IDLE_CONTROL,
.enable_reg = (void __iomem *)ARM_IDLECT2,
.enable_bit = EN_PERCK,
@@ -209,7 +209,7 @@
static struct clk arm_gpio_ck = {
.name = "arm_gpio_ck",
.parent = &ck_dpll1,
- .flags = CLOCK_IN_OMAP1510,
+ .flags = CLOCK_IN_OMAP15XX,
.enable_reg = (void __iomem *)ARM_IDLECT2,
.enable_bit = EN_GPIOCK,
.recalc = &followparent_recalc,
@@ -221,7 +221,7 @@
.clk = {
.name = "armxor_ck",
.parent = &ck_ref,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
CLOCK_IDLE_CONTROL,
.enable_reg = (void __iomem *)ARM_IDLECT2,
.enable_bit = EN_XORPCK,
@@ -236,7 +236,7 @@
.clk = {
.name = "armtim_ck",
.parent = &ck_ref,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
CLOCK_IDLE_CONTROL,
.enable_reg = (void __iomem *)ARM_IDLECT2,
.enable_bit = EN_TIMCK,
@@ -251,7 +251,7 @@
.clk = {
.name = "armwdt_ck",
.parent = &ck_ref,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
CLOCK_IDLE_CONTROL,
.enable_reg = (void __iomem *)ARM_IDLECT2,
.enable_bit = EN_WDTCK,
@@ -279,7 +279,7 @@
static struct clk dsp_ck = {
.name = "dsp_ck",
.parent = &ck_dpll1,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
RATE_CKCTL,
.enable_reg = (void __iomem *)ARM_CKCTL,
.enable_bit = EN_DSPCK,
@@ -292,7 +292,7 @@
static struct clk dspmmu_ck = {
.name = "dspmmu_ck",
.parent = &ck_dpll1,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
RATE_CKCTL | ALWAYS_ENABLED,
.rate_offset = CKCTL_DSPMMUDIV_OFFSET,
.recalc = &omap1_ckctl_recalc,
@@ -303,7 +303,7 @@
static struct clk dspper_ck = {
.name = "dspper_ck",
.parent = &ck_dpll1,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
RATE_CKCTL | VIRTUAL_IO_ADDRESS,
.enable_reg = (void __iomem *)DSP_IDLECT2,
.enable_bit = EN_PERCK,
@@ -317,7 +317,7 @@
static struct clk dspxor_ck = {
.name = "dspxor_ck",
.parent = &ck_ref,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
VIRTUAL_IO_ADDRESS,
.enable_reg = (void __iomem *)DSP_IDLECT2,
.enable_bit = EN_XORPCK,
@@ -329,7 +329,7 @@
static struct clk dsptim_ck = {
.name = "dsptim_ck",
.parent = &ck_ref,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
VIRTUAL_IO_ADDRESS,
.enable_reg = (void __iomem *)DSP_IDLECT2,
.enable_bit = EN_DSPTIMCK,
@@ -343,7 +343,7 @@
.clk = {
.name = "tc_ck",
.parent = &ck_dpll1,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
CLOCK_IN_OMAP730 | RATE_CKCTL |
RATE_PROPAGATES | ALWAYS_ENABLED |
CLOCK_IDLE_CONTROL,
@@ -358,7 +358,7 @@
static struct clk arminth_ck1510 = {
.name = "arminth_ck",
.parent = &tc_ck.clk,
- .flags = CLOCK_IN_OMAP1510 | ALWAYS_ENABLED,
+ .flags = CLOCK_IN_OMAP15XX | ALWAYS_ENABLED,
.recalc = &followparent_recalc,
/* Note: On 1510 the frequency follows TC_CK
*
@@ -372,7 +372,7 @@
/* No-idle controlled by "tc_ck" */
.name = "tibp_ck",
.parent = &tc_ck.clk,
- .flags = CLOCK_IN_OMAP1510 | ALWAYS_ENABLED,
+ .flags = CLOCK_IN_OMAP15XX | ALWAYS_ENABLED,
.recalc = &followparent_recalc,
.enable = &omap1_clk_enable_generic,
.disable = &omap1_clk_disable_generic,
@@ -416,7 +416,7 @@
/* No-idle controlled by "tc_ck" */
.name = "dma_ck",
.parent = &tc_ck.clk,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
ALWAYS_ENABLED,
.recalc = &followparent_recalc,
.enable = &omap1_clk_enable_generic,
@@ -436,7 +436,7 @@
.clk = {
.name = "api_ck",
.parent = &tc_ck.clk,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
CLOCK_IDLE_CONTROL,
.enable_reg = (void __iomem *)ARM_IDLECT2,
.enable_bit = EN_APICK,
@@ -451,7 +451,7 @@
.clk = {
.name = "lb_ck",
.parent = &tc_ck.clk,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IDLE_CONTROL,
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IDLE_CONTROL,
.enable_reg = (void __iomem *)ARM_IDLECT2,
.enable_bit = EN_LBCK,
.recalc = &followparent_recalc,
@@ -495,7 +495,7 @@
.clk = {
.name = "lcd_ck",
.parent = &ck_dpll1,
- .flags = CLOCK_IN_OMAP1510 | RATE_CKCTL |
+ .flags = CLOCK_IN_OMAP15XX | RATE_CKCTL |
CLOCK_IDLE_CONTROL,
.enable_reg = (void __iomem *)ARM_IDLECT2,
.enable_bit = EN_LCDCK,
@@ -512,7 +512,7 @@
/* Direct from ULPD, no real parent */
.parent = &armper_ck.clk,
.rate = 12000000,
- .flags = CLOCK_IN_OMAP1510 | ENABLE_REG_32BIT |
+ .flags = CLOCK_IN_OMAP15XX | ENABLE_REG_32BIT |
ALWAYS_ENABLED | CLOCK_NO_IDLE_PARENT,
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
.enable_bit = 29, /* Chooses between 12MHz and 48MHz */
@@ -543,7 +543,7 @@
/* Direct from ULPD, no real parent */
.parent = &armper_ck.clk,
.rate = 12000000,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
ENABLE_REG_32BIT | ALWAYS_ENABLED |
CLOCK_NO_IDLE_PARENT,
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
@@ -559,7 +559,7 @@
/* Direct from ULPD, no real parent */
.parent = &armper_ck.clk,
.rate = 12000000,
- .flags = CLOCK_IN_OMAP1510 | ENABLE_REG_32BIT |
+ .flags = CLOCK_IN_OMAP15XX | ENABLE_REG_32BIT |
ALWAYS_ENABLED | CLOCK_NO_IDLE_PARENT,
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
.enable_bit = 31, /* Chooses between 12MHz and 48MHz */
@@ -589,7 +589,7 @@
.name = "usb_clko",
/* Direct from ULPD, no parent */
.rate = 6000000,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
RATE_FIXED | ENABLE_REG_32BIT,
.enable_reg = (void __iomem *)ULPD_CLOCK_CTRL,
.enable_bit = USB_MCLK_EN_BIT,
@@ -601,7 +601,7 @@
.name = "usb_hhc_ck",
/* Direct from ULPD, no parent */
.rate = 48000000, /* Actually 2 clocks, 12MHz and 48MHz */
- .flags = CLOCK_IN_OMAP1510 |
+ .flags = CLOCK_IN_OMAP15XX |
RATE_FIXED | ENABLE_REG_32BIT,
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
.enable_bit = USB_HOST_HHC_UHOST_EN,
@@ -637,7 +637,9 @@
.name = "mclk",
/* Direct from ULPD, no parent. May be enabled by ext hardware. */
.rate = 12000000,
- .flags = CLOCK_IN_OMAP1510 | RATE_FIXED,
+ .flags = CLOCK_IN_OMAP15XX | RATE_FIXED,
+ .enable_reg = (void __iomem *)0xfffe0834,
+ .enable_bit = 6,
.enable = &omap1_clk_enable_generic,
.disable = &omap1_clk_disable_generic,
};
@@ -659,7 +661,7 @@
.name = "bclk",
/* Direct from ULPD, no parent. May be enabled by ext hardware. */
.rate = 12000000,
- .flags = CLOCK_IN_OMAP1510 | RATE_FIXED,
+ .flags = CLOCK_IN_OMAP15XX | RATE_FIXED,
.enable = &omap1_clk_enable_generic,
.disable = &omap1_clk_disable_generic,
};
@@ -682,7 +684,7 @@
/* Functional clock is direct from ULPD, interface clock is ARMPER */
.parent = &armper_ck.clk,
.rate = 48000000,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
RATE_FIXED | ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
.enable_bit = 23,
@@ -705,7 +707,7 @@
static struct clk virtual_ck_mpu = {
.name = "mpu",
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
+ .flags = CLOCK_IN_OMAP15XX | CLOCK_IN_OMAP16XX |
VIRTUAL_CLOCK | ALWAYS_ENABLED,
.parent = &arm_ck, /* Is smarter alias for */
.recalc = &followparent_recalc,
diff -Naur linux-omap-2.6.orig/arch/arm/mach-omap1/io.c linux-omap-2.6/arch/arm/mach-omap1/io.c
--- linux-omap-2.6.orig/arch/arm/mach-omap1/io.c 2006-01-14 14:58:56.000000000 +0000
+++ linux-omap-2.6/arch/arm/mach-omap1/io.c 2006-01-14 15:56:12.000000000 +0000
@@ -110,7 +110,7 @@
}
#endif
#ifdef CONFIG_ARCH_OMAP15XX
- if (cpu_is_omap1510()) {
+ if (cpu_is_omap15xx()) {
iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc));
}
#endif
diff -Naur linux-omap-2.6.orig/arch/arm/mach-omap1/pm.c linux-omap-2.6/arch/arm/mach-omap1/pm.c
--- linux-omap-2.6.orig/arch/arm/mach-omap1/pm.c 2006-01-14 14:58:56.000000000 +0000
+++ linux-omap-2.6/arch/arm/mach-omap1/pm.c 2006-01-14 15:56:12.000000000 +0000
@@ -165,7 +165,7 @@
if ((use_idlect1 != ~0) || !do_sleep) {
__u32 saved_idlect1 = omap_readl(ARM_IDLECT1);
- if (cpu_is_omap1510())
+ if (cpu_is_omap15xx())
use_idlect1 &= OMAP1510_BIG_SLEEP_REQUEST;
else
use_idlect1 &= OMAP1610_IDLECT1_SLEEP_VAL;
@@ -204,7 +204,7 @@
if (cpu_is_omap730())
level1_wake = OMAP_IRQ_BIT(INT_730_GPIO_BANK1) |
OMAP_IRQ_BIT(INT_730_IH2_IRQ);
- else if (cpu_is_omap1510())
+ else if (cpu_is_omap15xx())
level1_wake = OMAP_IRQ_BIT(INT_GPIO_BANK1) |
OMAP_IRQ_BIT(INT_1510_IH2_IRQ);
else if (cpu_is_omap16xx())
@@ -218,7 +218,7 @@
omap_writel(~(OMAP_IRQ_BIT(INT_730_WAKE_UP_REQ) |
OMAP_IRQ_BIT(INT_730_MPUIO_KEYPAD)),
OMAP_IH2_1_MIR);
- } else if (cpu_is_omap1510()) {
+ } else if (cpu_is_omap15xx()) {
level2_wake |= OMAP_IRQ_BIT(INT_KEYBOARD);
omap_writel(~level2_wake, OMAP_IH2_MIR);
} else if (cpu_is_omap16xx()) {
@@ -283,7 +283,7 @@
MPUI730_SAVE(EMIFS_CONFIG);
MPUI730_SAVE(EMIFF_SDRAM_CONFIG);
- } else if (cpu_is_omap1510()) {
+ } else if (cpu_is_omap15xx()) {
MPUI1510_SAVE(OMAP_IH1_MIR);
MPUI1510_SAVE(OMAP_IH2_MIR);
MPUI1510_SAVE(MPUI_CTRL);
@@ -307,7 +307,7 @@
ARM_SAVE(ARM_CKCTL);
ARM_SAVE(ARM_IDLECT1);
ARM_SAVE(ARM_IDLECT2);
- if (!(cpu_is_omap1510()))
+ if (!(cpu_is_omap15xx()))
ARM_SAVE(ARM_IDLECT3);
ARM_SAVE(ARM_EWUPCT);
ARM_SAVE(ARM_RSTCT1);
@@ -395,7 +395,7 @@
* Restore ARM state, except ARM_IDLECT1/2 which omap_cpu_suspend did
*/
- if (!(cpu_is_omap1510()))
+ if (!(cpu_is_omap15xx()))
ARM_RESTORE(ARM_IDLECT3);
ARM_RESTORE(ARM_CKCTL);
ARM_RESTORE(ARM_EWUPCT);
@@ -411,7 +411,7 @@
MPUI730_RESTORE(OMAP_IH1_MIR);
MPUI730_RESTORE(OMAP_IH2_0_MIR);
MPUI730_RESTORE(OMAP_IH2_1_MIR);
- } else if (cpu_is_omap1510()) {
+ } else if (cpu_is_omap15xx()) {
MPUI1510_RESTORE(MPUI_CTRL);
MPUI1510_RESTORE(MPUI_DSP_BOOT_CONFIG);
MPUI1510_RESTORE(MPUI_DSP_API_CONFIG);
@@ -472,7 +472,7 @@
ARM_SAVE(ARM_CKCTL);
ARM_SAVE(ARM_IDLECT1);
ARM_SAVE(ARM_IDLECT2);
- if (!(cpu_is_omap1510()))
+ if (!(cpu_is_omap15xx()))
ARM_SAVE(ARM_IDLECT3);
ARM_SAVE(ARM_EWUPCT);
ARM_SAVE(ARM_RSTCT1);
@@ -493,7 +493,7 @@
MPUI730_SAVE(MPUI_DSP_API_CONFIG);
MPUI730_SAVE(EMIFF_SDRAM_CONFIG);
MPUI730_SAVE(EMIFS_CONFIG);
- } else if (cpu_is_omap1510()) {
+ } else if (cpu_is_omap15xx()) {
MPUI1510_SAVE(MPUI_CTRL);
MPUI1510_SAVE(MPUI_DSP_STATUS);
MPUI1510_SAVE(MPUI_DSP_BOOT_CONFIG);
@@ -556,7 +556,7 @@
MPUI730_SHOW(MPUI_DSP_API_CONFIG),
MPUI730_SHOW(EMIFF_SDRAM_CONFIG),
MPUI730_SHOW(EMIFS_CONFIG));
- } else if (cpu_is_omap1510()) {
+ } else if (cpu_is_omap15xx()) {
my_buffer_offset += sprintf(my_base + my_buffer_offset,
"MPUI1510_CTRL_REG 0x%-8x \n"
"MPUI1510_DSP_STATUS_REG: 0x%-8x \n"
@@ -716,7 +716,7 @@
omap730_idle_loop_suspend_sz);
omap_sram_suspend = omap_sram_push(omap730_cpu_suspend,
omap730_cpu_suspend_sz);
- } else if (cpu_is_omap1510()) {
+ } else if (cpu_is_omap15xx()) {
omap_sram_idle = omap_sram_push(omap1510_idle_loop_suspend,
omap1510_idle_loop_suspend_sz);
omap_sram_suspend = omap_sram_push(omap1510_cpu_suspend,
diff -Naur linux-omap-2.6.orig/arch/arm/plat-omap/dsp/dsp_common.c linux-omap-2.6/arch/arm/plat-omap/dsp/dsp_common.c
--- linux-omap-2.6.orig/arch/arm/plat-omap/dsp/dsp_common.c 2006-01-14 14:58:57.000000000 +0000
+++ linux-omap-2.6/arch/arm/plat-omap/dsp/dsp_common.c 2006-01-14 15:56:12.000000000 +0000
@@ -260,7 +260,7 @@
{
dspmem_size = 0;
#ifdef CONFIG_ARCH_OMAP15XX
- if (cpu_is_omap1510()) {
+ if (cpu_is_omap15xx()) {
dspmem_base = OMAP1510_DSP_BASE;
dspmem_size = OMAP1510_DSP_SIZE;
daram_base = OMAP1510_DARAM_BASE;
diff -Naur linux-omap-2.6.orig/arch/arm/plat-omap/gpio.c linux-omap-2.6/arch/arm/plat-omap/gpio.c
--- linux-omap-2.6.orig/arch/arm/plat-omap/gpio.c 2006-01-14 14:58:57.000000000 +0000
+++ linux-omap-2.6/arch/arm/plat-omap/gpio.c 2006-01-14 15:56:12.000000000 +0000
@@ -174,7 +174,7 @@
static inline struct gpio_bank *get_gpio_bank(int gpio)
{
#ifdef CONFIG_ARCH_OMAP15XX
- if (cpu_is_omap1510()) {
+ if (cpu_is_omap15xx()) {
if (OMAP_GPIO_IS_MPUIO(gpio))
return &gpio_bank[0];
return &gpio_bank[1];
@@ -223,7 +223,7 @@
return 0;
}
#ifdef CONFIG_ARCH_OMAP15XX
- if (cpu_is_omap1510() && gpio < 16)
+ if (cpu_is_omap15xx() && gpio < 16)
return 0;
#endif
#if defined(CONFIG_ARCH_OMAP16XX)
@@ -879,7 +879,7 @@
initialized = 1;
- if (cpu_is_omap1510()) {
+ if (cpu_is_omap15xx()) {
gpio_ick = clk_get(NULL, "arm_gpio_ck");
if (IS_ERR(gpio_ick))
printk("Could not get arm_gpio_ck\n");
@@ -900,7 +900,7 @@
}
#ifdef CONFIG_ARCH_OMAP15XX
- if (cpu_is_omap1510()) {
+ if (cpu_is_omap15xx()) {
printk(KERN_INFO "OMAP1510 GPIO hardware\n");
gpio_bank_count = 2;
gpio_bank = gpio_bank_1510;
diff -Naur linux-omap-2.6.orig/arch/arm/plat-omap/mcbsp.c linux-omap-2.6/arch/arm/plat-omap/mcbsp.c
--- linux-omap-2.6.orig/arch/arm/plat-omap/mcbsp.c 2006-01-14 14:58:57.000000000 +0000
+++ linux-omap-2.6/arch/arm/plat-omap/mcbsp.c 2006-01-14 16:56:46.000000000 +0000
@@ -184,7 +184,7 @@
return 0;
}
- if (cpu_is_omap1510() || cpu_is_omap16xx() || cpu_is_omap24xx()) {
+ if (cpu_is_omap15xx() || cpu_is_omap16xx() || cpu_is_omap24xx()) {
if (id > OMAP_MAX_MCBSP_COUNT) {
printk(KERN_ERR "OMAP-McBSP: McBSP%d doesn't exist\n", id + 1);
return -1;
@@ -198,7 +198,7 @@
#ifdef CONFIG_ARCH_OMAP1
static void omap_mcbsp_dsp_request(void)
{
- if (cpu_is_omap1510() || cpu_is_omap16xx()) {
+ if (cpu_is_omap15xx() || cpu_is_omap16xx()) {
omap_dsp_request_mem();
clk_enable(mcbsp_dsp_ck);
clk_enable(mcbsp_api_ck);
@@ -217,7 +217,7 @@
static void omap_mcbsp_dsp_free(void)
{
- if (cpu_is_omap1510() || cpu_is_omap16xx()) {
+ if (cpu_is_omap15xx() || cpu_is_omap16xx()) {
omap_dsp_release_mem();
clk_disable(mcbsp_dspxor_ck);
clk_disable(mcbsp_dsp_ck);
@@ -833,7 +833,7 @@
}
#endif
#ifdef CONFIG_ARCH_OMAP15XX
- if (cpu_is_omap1510()) {
+ if (cpu_is_omap15xx()) {
mcbsp_info = mcbsp_1510;
mcbsp_count = ARRAY_SIZE(mcbsp_1510);
}
diff -Naur linux-omap-2.6.orig/drivers/video/omap/lcd_palmte.c linux-omap-2.6/drivers/video/omap/lcd_palmte.c
--- linux-omap-2.6.orig/drivers/video/omap/lcd_palmte.c 2006-01-14 14:59:39.000000000 +0000
+++ linux-omap-2.6/drivers/video/omap/lcd_palmte.c 2006-01-14 15:56:12.000000000 +0000
@@ -24,9 +24,9 @@
#include <linux/module.h>
#include <asm/io.h>
-#include <asm/arch/fpga.h>
-#include "omapfb.h"
+#include <asm/arch/fpga.h>
+#include <asm/arch/omapfb.h>
/* #define OMAPFB_DBG 1 */
@@ -67,11 +67,11 @@
.name = "palmte",
.config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
OMAP_LCDC_INV_HSYNC | OMAP_LCDC_HSVS_RISING_EDGE |
- OMAP_LCDC_HSVS_OPPOSITE;
+ OMAP_LCDC_HSVS_OPPOSITE,
.data_lines = 16,
.bpp = 8,
- .pixel_clock = 12500,
+ .pixel_clock = 12000,
.x_res = 320,
.y_res = 320,
.hsw = 4,
@@ -80,7 +80,7 @@
.vsw = 1,
.vfp = 8,
.vbp = 7,
- .pcd = 5,
+ .pcd = 0,
.init = palmte_panel_init,
.cleanup = palmte_panel_cleanup,
diff -Naur linux-omap-2.6.orig/include/asm-arm/arch-omap/clock.h linux-omap-2.6/include/asm-arm/arch-omap/clock.h
--- linux-omap-2.6.orig/include/asm-arm/arch-omap/clock.h 2006-01-14 14:59:47.000000000 +0000
+++ linux-omap-2.6/include/asm-arm/arch-omap/clock.h 2006-01-14 15:56:12.000000000 +0000
@@ -81,7 +81,7 @@
#define CM_PLL_SEL2 (1 << 19)
#define CM_SYSCLKOUT_SEL1 (1 << 20)
#define CLOCK_IN_OMAP730 (1 << 21)
-#define CLOCK_IN_OMAP1510 (1 << 22)
+#define CLOCK_IN_OMAP15XX (1 << 22)
#define CLOCK_IN_OMAP16XX (1 << 23)
#define CLOCK_IN_OMAP242X (1 << 24)
#define CLOCK_IN_OMAP243X (1 << 25)
diff -Naur linux-omap-2.6.orig/include/asm-arm/arch-omap/mcbsp.h linux-omap-2.6/include/asm-arm/arch-omap/mcbsp.h
--- linux-omap-2.6.orig/include/asm-arm/arch-omap/mcbsp.h 2006-01-14 14:59:47.000000000 +0000
+++ linux-omap-2.6/include/asm-arm/arch-omap/mcbsp.h 2006-01-14 18:05:42.000000000 +0000
@@ -40,7 +40,7 @@
#define OMAP24XX_MCBSP1_BASE 0x48074000
#define OMAP24XX_MCBSP2_BASE 0x48076000
-#ifdef CONFIG_ARCH_OMAP16XX
+#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP15XX)
#define OMAP_MCBSP_REG_DRR2 0x00
#define OMAP_MCBSP_REG_DRR1 0x02
[-- Attachment #3: linux-palmte-ts.patch --]
[-- Type: application/octet-stream, Size: 24104 bytes --]
diff -Naur linux-omap-2.6.orig/arch/arm/mach-omap1/Kconfig linux-omap-2.6/arch/arm/mach-omap1/Kconfig
--- linux-omap-2.6.orig/arch/arm/mach-omap1/Kconfig 2006-01-14 14:58:56.000000000 +0000
+++ linux-omap-2.6/arch/arm/mach-omap1/Kconfig 2006-01-14 19:43:54.000000000 +0000
@@ -73,11 +73,11 @@
bool "Palm Tungsten E"
depends on ARCH_OMAP1 && ARCH_OMAP15XX
help
- Support for the Palm Tungsten E PDA. Currently only the LCD panel
- is supported. To boot the kernel, you'll need a PalmOS compatible
- bootloader; check out http://palmtelinux.sourceforge.net for more
- informations.
- Say Y here if you have such a PDA, say NO otherwise.
+ Support for the Palm Tungsten E PDA. Currently only the LCD
+ panel with the touchscreen input are supported. To boot the
+ kernel, you'll need a PalmOS compatible bootloader; check out
+ http://palmtelinux.sourceforge.net for more informations.
+ Say Y here if you have such a PDA, say N otherwise.
config MACH_OMAP_GENERIC
bool "Generic OMAP board"
diff -Naur linux-omap-2.6.orig/drivers/input/touchscreen/Kconfig linux-omap-2.6/drivers/input/touchscreen/Kconfig
--- linux-omap-2.6.orig/drivers/input/touchscreen/Kconfig 2006-01-14 14:59:17.000000000 +0000
+++ linux-omap-2.6/drivers/input/touchscreen/Kconfig 2006-01-14 15:56:12.000000000 +0000
@@ -99,7 +99,8 @@
config TOUCHSCREEN_OMAP
tristate "OMAP touchscreen input driver"
depends on INPUT && INPUT_TOUCHSCREEN && ARCH_OMAP
- select OMAP_TSC2101
+ select OMAP_TSC2101 if MACH_OMAP_H3 || MACH_OMAP_H2
+ select OMAP_TSC2301 if MACH_OMAP_PALMTE
help
Say Y here if you have an OMAP based board with touchscreen
attached to it, e.g. OMAP Innovator, OSK, H2 or H3
diff -Naur linux-omap-2.6.orig/drivers/input/touchscreen/omap/Makefile linux-omap-2.6/drivers/input/touchscreen/omap/Makefile
--- linux-omap-2.6.orig/drivers/input/touchscreen/omap/Makefile 2006-01-14 14:59:17.000000000 +0000
+++ linux-omap-2.6/drivers/input/touchscreen/omap/Makefile 2006-01-14 15:56:12.000000000 +0000
@@ -8,5 +8,6 @@
objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_H3) += ts_hx.o
objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_INNOVATOR) += ts_inn1510.o
objs-$(CONFIG_ARCH_OMAP16XX)$(CONFIG_MACH_OMAP_OSK) += ts_osk.o
+objs-$(CONFIG_ARCH_OMAP15XX)$(CONFIG_MACH_OMAP_PALMTE) += ts_palmte.o
omapts-objs := omap_ts.o $(objs-yy)
diff -Naur linux-omap-2.6.orig/drivers/input/touchscreen/omap/omap_ts.c linux-omap-2.6/drivers/input/touchscreen/omap/omap_ts.c
--- linux-omap-2.6.orig/drivers/input/touchscreen/omap/omap_ts.c 2006-01-14 14:59:17.000000000 +0000
+++ linux-omap-2.6/drivers/input/touchscreen/omap/omap_ts.c 2006-01-14 15:56:12.000000000 +0000
@@ -23,7 +23,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* History:
* 12/12/2004 Srinath Modified and intergrated code for H2 and H3
- *
+ * 13/01/2006 Added PalmTE specific code, Andrzej Zaborowski
*/
#include <linux/errno.h>
@@ -55,8 +55,17 @@
#if defined(CONFIG_MACH_OMAP_INNOVATOR) && defined(CONFIG_ARCH_OMAP15XX)
&innovator1510_ts,
#endif
+#ifdef CONFIG_MACH_OMAP_PALMTE
+ &palmte_ts,
+#endif
};
+#ifdef CONFIG_MACH_OMAP_PALMTE
+static int omap_ts_host_controlled = 1;
+#else
+static int omap_ts_host_controlled = 0;
+#endif
+
static struct omap_ts_t ts_omap;
static int omap_ts_read(void)
@@ -127,10 +136,38 @@
return IRQ_HANDLED;
}
+static irqreturn_t omap_ts_handler_host(int irq, void *dev_id,
+ struct pt_regs *regs)
+{
+ spin_lock(&ts_omap.lock);
+
+ if (!ts_omap.touched) {
+ DEBUG_TS("omap_ts_handler_host: pen down\n");
+ input_report_key(&(ts_omap.inputdevice), BTN_TOUCH, 1);
+ ts_omap.touched = 1;
+ }
+
+ omap_ts_read();
+
+ if (ts_omap.dev->penup() && ts_omap.touched) {
+ DEBUG_TS("omap_ts_handler_host: pen up\n");
+ ts_omap.touched = 0;
+ input_report_abs(&(ts_omap.inputdevice), ABS_X, 0);
+ input_report_abs(&(ts_omap.inputdevice), ABS_Y, 0);
+ input_report_abs(&(ts_omap.inputdevice), ABS_PRESSURE, 0);
+ input_sync(&(ts_omap.inputdevice));
+ input_report_key(&(ts_omap.inputdevice), BTN_TOUCH, 0);
+ }
+
+ spin_unlock(&ts_omap.lock);
+ return IRQ_HANDLED;
+}
+
static int __init omap_ts_probe(struct platform_device *pdev)
{
int i;
int status = -ENODEV;
+ irqreturn_t (*irq_handler)(int, void *, struct pt_regs *);
memset(&ts_omap, 0, sizeof(ts_omap));
spin_lock_init(&ts_omap.lock);
@@ -154,10 +191,15 @@
/* request irq */
if (ts_omap.irq != -1) {
- if (request_irq(ts_omap.irq, omap_ts_handler, 0,
+ if (omap_ts_host_controlled)
+ irq_handler = omap_ts_handler_host;
+ else
+ irq_handler = omap_ts_handler;
+
+ if (request_irq(ts_omap.irq, irq_handler, 0,
OMAP_TS_NAME, &ts_omap)) {
- printk(KERN_ERR
- "omap_ts.c: Could not allocate touchscreen IRQ!\n");
+ printk(KERN_ERR "omap_ts.c: Could not "
+ "allocate touchscreen IRQ!\n");
ts_omap.irq = -1;
return -EINVAL;
}
@@ -176,6 +218,7 @@
BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE);
input_register_device(ts_omap.inputdevice);
+ ts_omap.touched = 0;
ts_omap.dev->enable();
printk("OMAP touchscreen driver initialized\n");
@@ -211,6 +254,7 @@
{
/* Nothing */
}
+
static struct platform_driver omap_ts_driver = {
.probe = omap_ts_probe,
.remove = omap_ts_remove,
diff -Naur linux-omap-2.6.orig/drivers/input/touchscreen/omap/omap_ts.h linux-omap-2.6/drivers/input/touchscreen/omap/omap_ts.h
--- linux-omap-2.6.orig/drivers/input/touchscreen/omap/omap_ts.h 2006-01-14 14:59:17.000000000 +0000
+++ linux-omap-2.6/drivers/input/touchscreen/omap/omap_ts.h 2006-01-14 15:56:12.000000000 +0000
@@ -38,7 +38,7 @@
void (*enable) (void);
void (*disable) (void);
void (*remove) (void);
- int (*penup) (void);
+ int (*penup) (void);
};
struct omap_ts_t{
@@ -54,5 +54,6 @@
extern struct ts_device hx_ts;
extern struct ts_device osk_ts;
extern struct ts_device innovator1510_ts;
+extern struct ts_device palmte_ts;
#endif /* __OMAP_TS_H */
diff -Naur linux-omap-2.6.orig/drivers/input/touchscreen/omap/ts_palmte.c linux-omap-2.6/drivers/input/touchscreen/omap/ts_palmte.c
--- linux-omap-2.6.orig/drivers/input/touchscreen/omap/ts_palmte.c 1970-01-01 00:00:00.000000000 +0000
+++ linux-omap-2.6/drivers/input/touchscreen/omap/ts_palmte.c 2006-01-14 16:57:24.000000000 +0000
@@ -0,0 +1,186 @@
+/*
+ * drivers/input/touchscreen/omap/ts_palmte.c
+ *
+ * Touchscreen support for the OMAP 310 boards
+ *
+ * Copyright (c) 2005 Andrzej Zaborowski <balrog@zabor.org>
+ * based on the H2/H3 Touchscreen driver:
+ * Copyright (c) 2002 MontaVista Software Inc.
+ * Copyright (c) 2004 Texas Instruments, Inc.
+ * Assembled using driver code copyright the companies above.
+ *
+ * This package is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This package is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this package; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <linux/input.h>
+#include <linux/device.h>
+#include <asm/mach-types.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/mux.h>
+#include <asm/arch/hardware.h>
+#include <asm/hardware/tsc2301.h>
+
+#include "../drivers/ssi/omap-tsc2301.h"
+#include "omap_ts.h"
+
+#define PALMTE_GPIO_NUM 6
+
+#define TOUCHSCREEN_DATA_REGISTERS_PAGE 0x0
+#define TOUCHSCREEN_CONTROL_REGISTERS_PAGE 0x1
+
+#define TSC2301_XRES 320
+#define TSC2301_READ_MAX 0x4
+#define TSC2301_GETSTATUS(ret) \
+ (((ret) & 0x8000) || !((ret) & 0x4000))
+#define TSC2301_MASKVAL 0x0fff
+#define TSC2301_PRESSUREVAL(x) ((x) << 12)
+
+static int palmte_ts_penup(void);
+static int palmte_ts_probe(struct omap_ts_t *ts);
+static void palmte_ts_read(u16 *data);
+static void palmte_ts_enable(void);
+static void palmte_ts_disable(void);
+#ifdef MODULE
+static void palmte_ts_remove(void);
+#endif
+
+struct ts_device palmte_ts = {
+ .probe = palmte_ts_probe,
+ .read = palmte_ts_read,
+ .enable = palmte_ts_enable,
+ .disable = palmte_ts_disable,
+ .remove = __exit_p(palmte_ts_remove),
+ .penup = palmte_ts_penup,
+};
+
+static int palmte_ts_penup(void)
+{
+ u16 ret;
+
+ /*
+ * Read the ADC control register
+ *
+ * TODO: Instead read the DAV bit of the TSC2301_TS_CONFIG2_CTRL
+ * register that indicates actual converted data availiable.
+ */
+ ret = omap_tsc2301_read(TOUCHSCREEN_CONTROL_REGISTERS_PAGE,
+ TSC2301_TS_ADC_CTRL);
+
+ /* Check for pen status in the ADC control register */
+ ret = TSC2301_GETSTATUS(ret);
+ return !ret;
+
+}
+
+static int __init palmte_ts_probe(struct omap_ts_t *ts)
+{
+ unsigned gpio = PALMTE_GPIO_NUM;
+
+ ts->irq = OMAP_GPIO_IRQ(gpio);
+ if (omap_request_gpio(gpio) != 0) {
+ printk(KERN_ERR "palmte_ts_init.c: Could not reserve GPIO!\n");
+ return -EINVAL;
+ }
+
+ omap_set_gpio_direction(gpio, 1);
+ set_irq_type(ts->irq, IRQT_FALLING);
+ return 0;
+}
+
+static void palmte_ts_read(u16 *values)
+{
+ s32 t, p = 0;
+ int i;
+
+ /* Read X, Y, Z1 and Z2 */
+ omap_tsc2301_reads(TOUCHSCREEN_DATA_REGISTERS_PAGE, TSC2301_TS_X,
+ values, TSC2301_READ_MAX);
+
+ for (i = 0; i < TSC2301_READ_MAX; i ++)
+ values[i] &= TSC2301_MASKVAL;
+
+ /* Calculate Pressure */
+ if (values[TSC2301_TS_Z1] != 0) {
+ t = ((TSC2301_XRES * values[TSC2301_TS_X]) *
+ (values[TSC2301_TS_Z2] - values[TSC2301_TS_Z1]));
+ p = t / (u32) (TSC2301_PRESSUREVAL(values[TSC2301_TS_Z1]));
+ if (p < 0)
+ p = 0;
+ }
+
+ values[TSC2301_TS_Z1] = p;
+}
+
+static void palmte_ts_enable(void)
+{
+ int ret = omap_tsc2301_enable();
+ if (ret) {
+ printk(KERN_ERR "TSC2301 Codec initialization failed!\n");
+ return;
+ }
+
+ /* Stop all conversions */
+ omap_tsc2301_write(TOUCHSCREEN_CONTROL_REGISTERS_PAGE,
+ TSC2301_TS_ADC_CTRL,
+ TSC2301_ADC_POWERDOWN | TSC2301_ADC_CONTROL);
+
+ /*
+ * Use internal reference, 100 usec power-up delay,
+ * power down between conversions, 1.25V internal reference
+ */
+ omap_tsc2301_write(TOUCHSCREEN_CONTROL_REGISTERS_PAGE,
+ TSC2301_TS_REF_CTRL, TSC2301_REF_POWERUP);
+
+ /* Set an 84usec precharge time and 32 usec sense time */
+ omap_tsc2301_write(TOUCHSCREEN_CONTROL_REGISTERS_PAGE,
+ TSC2301_TS_CONFIG_CTRL, TSC2301_CONFIG_TIMES);
+
+ omap_tsc2301_write(TOUCHSCREEN_CONTROL_REGISTERS_PAGE,
+ TSC2301_TS_CONFIG2_CTRL, TSC2301_CONFIG_TIMES);
+
+ /*
+ * Set the TSC controlled mode and slowest rates, this is
+ * in order to work around the hardware bug documented here:
+ * http://focus.ti.com/lit/er/slaz003/slaz003.pdf
+ */
+ omap_tsc2301_write(TOUCHSCREEN_CONTROL_REGISTERS_PAGE,
+ TSC2301_TS_ADC_CTRL, TSC2301_ADC_SLOW);
+
+ /*
+ * TSC2301-controlled conversions,
+ * Continuous X, Y, Z1, Z2 scan mode,
+ * 12-bit samples,
+ * Average (mean) 4 samples per coordinate,
+ * 1 MHz internal conversion clock,
+ * 500 usec panel voltage stabilization delay
+ */
+ omap_tsc2301_write(TOUCHSCREEN_CONTROL_REGISTERS_PAGE,
+ TSC2301_TS_ADC_CTRL, TSC2301_ADC_CONTROL);
+}
+
+static void palmte_ts_disable(void)
+{
+ /* Stop conversions and power down */
+ omap_tsc2301_write(TOUCHSCREEN_CONTROL_REGISTERS_PAGE,
+ TSC2301_TS_ADC_CTRL, TSC2301_ADC_POWERDOWN);
+ omap_tsc2301_disable();
+}
+
+#ifdef MODULE
+static void __exit palmte_ts_remove(void)
+{
+ omap_free_gpio(PALMTE_GPIO_NUM);
+}
+#endif
diff -Naur linux-omap-2.6.orig/drivers/ssi/Kconfig linux-omap-2.6/drivers/ssi/Kconfig
--- linux-omap-2.6.orig/drivers/ssi/Kconfig 2006-01-14 14:59:35.000000000 +0000
+++ linux-omap-2.6/drivers/ssi/Kconfig 2006-01-14 15:56:12.000000000 +0000
@@ -15,4 +15,12 @@
---help---
Say Y here if you want support for the TSC2101 codec. It is
needed for touchscreen and audio on OMAP1610 and 1710.
+
+config OMAP_TSC2301
+ depends on ARCH_OMAP1 || ARCH_OMAP15XX
+ tristate "TSC2301 codec support for Touchscreen"
+ select OMAP_UWIRE if MACH_OMAP_PALMTE
+ ---help---
+ Say Y here if you want support for the TSC2301 codec. It is
+ needed for the touchscreen driver for OMAP310 and 311.
endmenu
diff -Naur linux-omap-2.6.orig/drivers/ssi/Makefile linux-omap-2.6/drivers/ssi/Makefile
--- linux-omap-2.6.orig/drivers/ssi/Makefile 2006-01-14 14:59:35.000000000 +0000
+++ linux-omap-2.6/drivers/ssi/Makefile 2006-01-14 15:56:12.000000000 +0000
@@ -4,3 +4,4 @@
obj-$(CONFIG_OMAP_UWIRE) += omap-uwire.o
obj-$(CONFIG_OMAP_TSC2101) += omap-tsc2101.o
+obj-$(CONFIG_OMAP_TSC2301) += omap-tsc2301.o
diff -Naur linux-omap-2.6.orig/drivers/ssi/omap-tsc2301.c linux-omap-2.6/drivers/ssi/omap-tsc2301.c
--- linux-omap-2.6.orig/drivers/ssi/omap-tsc2301.c 1970-01-01 00:00:00.000000000 +0000
+++ linux-omap-2.6/drivers/ssi/omap-tsc2301.c 2006-01-14 15:56:12.000000000 +0000
@@ -0,0 +1,184 @@
+/*
+ * drivers/ssi/omap-tsc2301.c
+ *
+ * TSC2301 codec interface driver for the OMAP platform
+ *
+ * Copyright (c) 2005 Andrzej Zaborowski <balrog@zabor.org>
+ * based on the TSC2101 codec interface driver:
+ * Copyright (C) 2004 Texas Instruments, Inc.
+ *
+ * This package is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This package is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this package; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/errno.h>
+#include <linux/delay.h>
+
+#include <asm/system.h>
+#include <asm/irq.h>
+#include <asm/io.h>
+#include <asm/mach-types.h>
+#include <asm/hardware.h>
+#include <asm/hardware/clock.h>
+
+#include <asm/arch/mux.h>
+#include <asm/arch/io.h>
+#include <asm/arch/hardware.h>
+#include <asm/hardware/tsc2301.h>
+
+#include "omap-tsc2301.h"
+
+#if CONFIG_ARCH_OMAP15XX
+#include <../drivers/ssi/omap-uwire.h>
+#else
+#error "Unsupported configuration"
+#endif
+
+#define SPIO 1
+
+static int count;
+static spinlock_t tsc2301_lock = SPIN_LOCK_UNLOCKED;
+static struct clk *tsc2301_mclk_ck;
+
+static int omap_tsc2301_configure(void);
+
+#define PALMTE_TSC2301_CS 0 /* As opposed to 3 */
+#define CLK_SOFT_REQ_REG_BASE (0xfffe0800 | 0x34)
+#define SOFT_COM_MCK0_REQ_MASK (0x1 << 6)
+
+int omap_tsc2301_enable(void)
+{
+ int ret = 0;
+
+ spin_lock(&tsc2301_lock);
+ if (count ++ == 0) {
+ int ret = 0;
+
+ /* Get the MCLK - assuming the rate is at 12000000 */
+ tsc2301_mclk_ck = clk_get(0, "mclk");
+ if (tsc2301_mclk_ck == 0) {
+ printk(KERN_ERR "Unable to get the clock MCLK!!!\n");
+ ret = -EPERM;
+ goto done;
+ }
+
+ clk_enable(tsc2301_mclk_ck);
+
+ ret = omap_tsc2301_configure();
+
+ /* Lock the module */
+ if (!ret && !try_module_get(THIS_MODULE)) {
+ printk(KERN_CRIT "Failed to get TSC module\n");
+ ret = -ESTALE;
+ }
+ }
+
+done:
+ spin_unlock(&tsc2301_lock);
+ return ret;
+}
+
+void omap_tsc2301_disable(void)
+{
+ spin_lock(&tsc2301_lock);
+ if (-- count == 0) {
+ /* Release the MCLK */
+ clk_disable(tsc2301_mclk_ck);
+ clk_put(tsc2301_mclk_ck);
+ tsc2301_mclk_ck = NULL;
+
+ module_put(THIS_MODULE);
+ }
+ spin_unlock(&tsc2301_lock);
+}
+
+void omap_tsc2301_write(int page, u8 address, u16 data)
+{
+
+ int ret = 0;
+ int cs = 0;
+ if (machine_is_omap_palmte())
+ cs = PALMTE_TSC2301_CS;
+
+ /* Address */
+ ret = omap_uwire_data_transfer(cs,
+ (((page) << 11) | (address << 5)), 16,
+ 0, NULL, 1);
+ if (ret) {
+ printk(KERN_ERR "uwire-write returned error for address %x\n",
+ address);
+ return;
+ }
+
+ /* Data */
+ ret = omap_uwire_data_transfer(cs, data, 16, 0, NULL, 0);
+ if (ret) {
+ printk(KERN_ERR "uwire-write returned error for address %x\n",
+ address);
+ return;
+ }
+}
+
+void omap_tsc2301_reads(int page, u8 startaddress, u16 *data, int numregs)
+{
+ int cs = 0, i;
+ if (machine_is_omap_palmte())
+ cs = PALMTE_TSC2301_CS;
+
+ /* Address */
+ (void) omap_uwire_data_transfer(cs, 0x8000 | (page << 11) |
+ (startaddress << 5), 16, 0, NULL, 1);
+
+ /* Data */
+ for (i = 0; i < (numregs - 1); i ++, data ++)
+ omap_uwire_data_transfer(cs, 0, 0, 16, data, 1);
+
+ omap_uwire_data_transfer(cs, 0, 0, 16, data, 0);
+}
+
+u16 omap_tsc2301_read(int page, u8 address)
+{
+ u16 ret;
+ omap_tsc2301_reads(page, address, &ret, 1);
+ return ret;
+}
+
+/* FIXME: adapt clock divisors for uwire to current ARM xor clock rate */
+static int omap_tsc2301_configure(void)
+{
+ unsigned long uwire_flags = 0;
+
+ if (machine_is_omap_palmte()) {
+ uwire_flags = UWIRE_READ_RISING_EDGE | UWIRE_WRITE_RISING_EDGE;
+ omap_uwire_configure_mode(PALMTE_TSC2301_CS, uwire_flags);
+ }
+
+ /* Configure MCLK enable */
+ omap_writel(omap_readl(PU_PD_SEL_2) | (1 << 22), PU_PD_SEL_2);
+
+ return 0;
+}
+
+EXPORT_SYMBOL(omap_tsc2301_enable);
+EXPORT_SYMBOL(omap_tsc2301_read);
+EXPORT_SYMBOL(omap_tsc2301_reads);
+EXPORT_SYMBOL(omap_tsc2301_write);
+EXPORT_SYMBOL(omap_tsc2301_disable);
+
+MODULE_AUTHOR("Andrzej Zaborowski");
+MODULE_DESCRIPTION("Interface driver for TI TSC2301 chips.");
+MODULE_LICENSE("GPL");
diff -Naur linux-omap-2.6.orig/drivers/ssi/omap-tsc2301.h linux-omap-2.6/drivers/ssi/omap-tsc2301.h
--- linux-omap-2.6.orig/drivers/ssi/omap-tsc2301.h 1970-01-01 00:00:00.000000000 +0000
+++ linux-omap-2.6/drivers/ssi/omap-tsc2301.h 2006-01-14 15:56:12.000000000 +0000
@@ -0,0 +1,36 @@
+/*
+ * drivers/ssi/omap-tsc2301.h
+ *
+ * TSC2301 codec interface driver for the OMAP platform
+ *
+ * Copyright (c) 2005 Andrzej Zaborowski <balrog@zabor.org>
+ * based on the TSC2101 codec interface driver:
+ * Copyright (C) 2004 Texas Instruments, Inc.
+ *
+ * This package is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This package is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this package; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __OMAP_TSC2301_H
+#define __OMAP_TSC2301_H
+
+extern u16 omap_tsc2301_read(int page, u8 address);
+extern void omap_tsc2301_reads(int page, u8 startaddress, u16 *data,
+ int numregs);
+extern void omap_tsc2301_write(int page, u8 address, u16 data);
+
+extern void omap_tsc2301_disable(void);
+extern int omap_tsc2301_enable(void);
+
+#endif /* __OMAP_TSC2301_H */
diff -Naur linux-omap-2.6.orig/include/asm-arm/hardware/tsc2301.h linux-omap-2.6/include/asm-arm/hardware/tsc2301.h
--- linux-omap-2.6.orig/include/asm-arm/hardware/tsc2301.h 1970-01-01 00:00:00.000000000 +0000
+++ linux-omap-2.6/include/asm-arm/hardware/tsc2301.h 2006-01-14 15:56:12.000000000 +0000
@@ -0,0 +1,116 @@
+/*
+ * include/asm-arm/hardware/tsc2301.h
+ *
+ * TI TSC2301 Touchscreen, Audio and Battery control register definitions
+ *
+ * Copyright (c) 2005 Andrzej Zaborowski <balrog@zabor.org>
+ *
+ * This package is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This package is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this package; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __ASM_HARDWARE_TSC2301_H
+#define __ASM_HARDWARE_TSC2301_H
+
+/* Page 0, Touch Screen & Keypad Data registers */
+#define TSC2301_TS_X 0x00
+#define TSC2301_TS_Y 0x01
+#define TSC2301_TS_Z1 0x02
+#define TSC2301_TS_Z2 0x03
+#define TSC2301_TS_KPDATA 0x04
+#define TSC2301_TS_BAT1 0x05
+#define TSC2301_TS_BAT2 0x06
+#define TSC2301_TS_AUX1 0x07
+#define TSC2301_TS_AUX2 0x08
+#define TSC2301_TS_TEMP1 0x09
+#define TSC2301_TS_TEMP2 0x0a
+#define TSC2301_TS_DAC 0x0b
+
+/* Page 1, Touch Screen & Keypad Control registers */
+#define TSC2301_TS_ADC_CTRL 0x00
+#define TSC2301_TS_KEY_CTRL 0x01
+#define TSC2301_TS_DAC_CTRL 0x02
+#define TSC2301_TS_REF_CTRL 0x03
+#define TSC2301_TS_RESET_CTRL 0x04
+#define TSC2301_TS_CONFIG_CTRL 0x05
+#define TSC2301_TS_CONFIG2_CTRL 0x06
+#define TSC2301_TS_KPMASK 0x10
+
+/* Page 2, Audio Control registers */
+#define TSC2301_AUDIO_CTRL 0x00
+#define TSC2301_ADC_GAIN_CTRL 0x01
+#define TSC2301_DAC_GAIN_CTRL 0x02
+#define TSC2301_ANALOG_GAIN_CTRL 0x03
+#define TSC2301_KEYCLICK_CTRL 0x04
+#define TSC2301_AUDIO_POWER_CTRL 0x05
+#define TSC2301_GPIO 0x06
+#define TSC2301_LCH_BASS_BOOST_N0 0x07
+#define TSC2301_LCH_BASS_BOOST_N1 0x08
+#define TSC2301_LCH_BASS_BOOST_N2 0x09
+#define TSC2301_LCH_BASS_BOOST_N3 0x0a
+#define TSC2301_LCH_BASS_BOOST_N4 0x0b
+#define TSC2301_LCH_BASS_BOOST_N5 0x0c
+#define TSC2301_LCH_BASS_BOOST_D1 0x0d
+#define TSC2301_LCH_BASS_BOOST_D2 0x0e
+#define TSC2301_LCH_BASS_BOOST_D4 0x0f
+#define TSC2301_LCH_BASS_BOOST_D5 0x10
+#define TSC2301_RCH_BASS_BOOST_N0 0x11
+#define TSC2301_RCH_BASS_BOOST_N1 0x12
+#define TSC2301_RCH_BASS_BOOST_N2 0x13
+#define TSC2301_RCH_BASS_BOOST_N3 0x14
+#define TSC2301_RCH_BASS_BOOST_N4 0x15
+#define TSC2301_RCH_BASS_BOOST_N5 0x16
+#define TSC2301_RCH_BASS_BOOST_D1 0x17
+#define TSC2301_RCH_BASS_BOOST_D2 0x18
+#define TSC2301_RCH_BASS_BOOST_D4 0x19
+#define TSC2301_RCH_BASS_BOOST_D5 0x1a
+
+/* Bit field definitions for TS Control */
+#define TSC2301_ADC_CONTROL 0x8874
+#define TSC2301_ADC_POWERDOWN 0x4000
+#define TSC2301_ADC_SLOW 0x07ff
+#define TSC2301_REF_POWERUP 0x0014
+#define TSC2301_CONFIG_TIMES 0x0008
+
+/* Bit position */
+#define TSC2301_BIT(ARG) (0x01 << (ARG))
+
+/* Field masks for Audio Control */
+#define TSC2301_AC_ADCHPF(ARG) (((ARG) & 0x03) << 14)
+#define TSC2301_AC_WLEN(ARG) (((ARG) & 0x03) << 10)
+#define TSC2301_AC_DATFM(ARG) (((ARG) & 0x03) << 8)
+#define TSC2301_AC_DACFS(ARG) (((ARG) & 0x07) << 3)
+#define TSC2301_AC_ADCFS(ARG) (((ARG) & 0x07))
+
+/* Field masks for TSC2301_DAC_GAIN_CTRL */
+#define TSC2301_DGC_DALMU TSC2301_BIT(15)
+#define TSC2301_DGC_DALVL(ARG) (((ARG) & 0x7F) << 8)
+#define TSC2301_DGC_DARMU TSC2301_BIT(7)
+#define TSC2301_DGC_DARVL(ARG) (((ARG) & 0x7F))
+
+/* Field masks settings for TSC2301_GPIO_CTRL */
+#define TSC2301_DIR5 TSC2301_BIT(13)
+#define TSC2301_DIR4 TSC2301_BIT(12)
+#define TSC2301_DIR3 TSC2301_BIT(11)
+#define TSC2301_DIR2 TSC2301_BIT(10)
+#define TSC2301_DIR1 TSC2301_BIT(9)
+#define TSC2301_DIR0 TSC2301_BIT(8)
+#define TSC2301_GPIO5 TSC2301_BIT(5)
+#define TSC2301_GPIO4 TSC2301_BIT(4)
+#define TSC2301_GPIO3 TSC2301_BIT(3)
+#define TSC2301_GPIO2 TSC2301_BIT(2)
+#define TSC2301_GPIO1 TSC2301_BIT(1)
+#define TSC2301_GPIO0 TSC2301_BIT(0)
+
+#endif /* __ASM_HARDWARE_TSC2301_H */
[-- Attachment #4: linux-typos.patch --]
[-- Type: application/octet-stream, Size: 2906 bytes --]
diff -Naur linux-omap-2.6.orig/Documentation/arm/Booting linux-omap-2.6/Documentation/arm/Booting
--- linux-omap-2.6.orig/Documentation/arm/Booting 2006-01-14 14:58:51.000000000 +0000
+++ linux-omap-2.6/Documentation/arm/Booting 2006-01-14 15:56:12.000000000 +0000
@@ -118,7 +118,7 @@
In either case, the following conditions must be met:
-- Quiesce all DMA capable devicess so that memory does not get
+- Quiesce all DMA capable devices so that memory does not get
corrupted by bogus network packets or disk data. This will save
you many hours of debug.
diff -Naur linux-omap-2.6.orig/Documentation/arm/README linux-omap-2.6/Documentation/arm/README
--- linux-omap-2.6.orig/Documentation/arm/README 2006-01-14 14:58:51.000000000 +0000
+++ linux-omap-2.6/Documentation/arm/README 2006-01-14 15:56:12.000000000 +0000
@@ -89,7 +89,7 @@
Although modularisation is supported (and required for the FP emulator),
each module on an ARM2/ARM250/ARM3 machine when is loaded will take
memory up to the next 32k boundary due to the size of the pages.
- Therefore, modularisation on these machines really worth it?
+ Therefore, is modularisation on these machines really worth it?
However, ARM6 and up machines allow modules to take multiples of 4k, and
as such Acorn RiscPCs and other architectures using these processors can
diff -Naur linux-omap-2.6.orig/Documentation/arm/Setup linux-omap-2.6/Documentation/arm/Setup
--- linux-omap-2.6.orig/Documentation/arm/Setup 2006-01-14 14:58:51.000000000 +0000
+++ linux-omap-2.6/Documentation/arm/Setup 2006-01-14 15:56:12.000000000 +0000
@@ -58,7 +58,7 @@
video_y
This describes the character position of cursor on VGA console, and
- is otherwise unused. (should not used for other console types, and
+ is otherwise unused. (should not be used for other console types, and
should not be used for other purposes).
memc_control_reg
diff -Naur linux-omap-2.6.orig/include/linux/timer.h linux-omap-2.6/include/linux/timer.h
--- linux-omap-2.6.orig/include/linux/timer.h 2006-01-14 15:00:00.000000000 +0000
+++ linux-omap-2.6/include/linux/timer.h 2006-01-14 15:56:12.000000000 +0000
@@ -69,13 +69,13 @@
* @timer: the timer to be added
*
* The kernel will do a ->function(->data) callback from the
- * timer interrupt at the ->expired point in the future. The
+ * timer interrupt at the ->expires point in the future. The
* current time is 'jiffies'.
*
- * The timer's ->expired, ->function (and if the handler uses it, ->data)
+ * The timer's ->expires, ->function (and if the handler uses it, ->data)
* fields must be set prior calling this function.
*
- * Timers with an ->expired field in the past will be executed in the next
+ * Timers with an ->expires field in the past will be executed in the next
* timer tick.
*/
static inline void add_timer(struct timer_list *timer)
[-- Attachment #5: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Palm TE Touchscreen and fixes
2006-01-14 21:06 [PATCH] Palm TE Touchscreen and fixes andrzej zaborowski
@ 2006-01-15 9:10 ` Komal Shah
2006-01-15 16:04 ` Juha Yrjölä
2006-01-15 17:14 ` andrzej zaborowski
2006-01-15 20:19 ` Tony Lindgren
1 sibling, 2 replies; 10+ messages in thread
From: Komal Shah @ 2006-01-15 9:10 UTC (permalink / raw)
To: andrzej zaborowski, linux-omap-open-source
--- andrzej zaborowski <balrogg@gmail.com> wrote:
>
> - The first one fixes the compilation errors and
> some clock issues
> that made the kernel hang on boot on Palm Tungsten
> E. While these
> changes make the kernel boot and work well with the
> device, and
Tony can comment on this clock changes for 15xx.
> Note that the last hunk is for a compilation error
> introduced two days
> ago here:
>
http://www.kernel.org/git/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=89ac1ab633637032c80a5d3424120d153ff7d754
> and I think today someone already proposed a
> different idea for
> dealing with this error.
Yes, as I don't like #ifdefers. Your fix is good, but for future as
more and more silicons will be popped out from TI and McBSP reamins
their standard choice for Audio Codec chip interface, it is better work
on small/thin framework which can take platform specific data, and let
audio codec chip also know from their platform specific data about
McBSP configuration.
e.g Integrating OMAP2430 and DM6446/DM6443 McBSP interface and imagine
how this mcbsp.c will look like :)
>
> - The second patch adds support for the Touchscreen
> device found in
> OMAP310. Again I don't know how proper is the
> driver, but it works and
> it was written according to the documentation from
> Texas Instruments.
> Because the DSP chipset of the OMAP310 board (called
> TSC2301) carries
> out a big part of the task of controlling the
> touchscreen, in
> hardware, the driver mechanism for this touchscreen
> is much simpler
> than other OMAP touchscreens and I had to make small
> changes in
> "omap_ts.c" which is generic for all OMAP
> touchscreens.
TSC2301 support is really good, there was no community known driver
available yet. Even this chip has audio + 2 gpios + keyboard controller
which you may want to experiment with now.
See as of know all audio codec + tsc controller drivers are specific to
OMAP, but can be used with other chips, and generally interfaced by
uWire (SPI half-duplex) or SPI or I2C for command interface to the
chip. So recently we had SPI framework developed by David Brownell,
Dmitry, Vitally wool which will make its way in 2.6.16, considering
there is no objections.
You may want to experiment more with it. David had uWire hacks to merge
with its SPI subsytem, which I will forward to you. Here is the link of
that subsystem as GIT tree.
http://www.kernel.org/git/?p=linux/kernel/git/gregkh/spi-2.6.git;a=summary
>
> - The last patch only corrects some typos I found
> while browsing the sources.
These are generic ARM typos changes, and it should be submitted to
linux-arm-kernel mailing list. But see that our tree is not synced with
linus tree as of now. So, it is better to generate those typos patches
against linus tree (if generic) than OMAP tree.
>
> I think the second and the third patch are 100% safe
> to apply, and the
--- linux-omap-2.6.orig/drivers/input/touchscreen/omap/omap_ts.c
2006-01-14 14:59:17.000000000 +0000
+++ linux-omap-2.6/drivers/input/touchscreen/omap/omap_ts.c 2006-01-14
15:56:12.000000000 +0000
@@ -23,7 +23,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
* History:
* 12/12/2004 Srinath Modified and intergrated code for H2 and H3
- *
+ * 13/01/2006 Added PalmTE specific code, Andrzej Zaborowski
*/
I would suggest to not add up History changes as above, as AUTHOR name
will be there when Tony commits in the tree, until we have create a new
file (eg. plamte_ts.c).
---Komal Shah
http://komalshah.blogspot.com/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Palm TE Touchscreen and fixes
2006-01-15 9:10 ` Komal Shah
@ 2006-01-15 16:04 ` Juha Yrjölä
2006-01-16 6:05 ` Komal Shah
2006-01-15 17:14 ` andrzej zaborowski
1 sibling, 1 reply; 10+ messages in thread
From: Juha Yrjölä @ 2006-01-15 16:04 UTC (permalink / raw)
To: Komal Shah; +Cc: linux-omap-open-source
On Sun, 2006-01-15 at 01:10 -0800, ext Komal Shah wrote:
> TSC2301 support is really good, there was no community known driver
> available yet. Even this chip has audio + 2 gpios + keyboard controller
> which you may want to experiment with now.
We have a TSC2301 driver that's in a pretty good shape now. At the
moment keypad and touchscreen are supported. The audio mixer driver is
work-in-progress.
We'll merge it whenever Dave's SPI stuff finds its way into linux-omap.
BTW, we also have a McSPI controller driver for OMAP2. It uses PIO at
the moment, but DMA support is on its way.
Cheers,
Juha
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Palm TE Touchscreen and fixes
2006-01-15 9:10 ` Komal Shah
2006-01-15 16:04 ` Juha Yrjölä
@ 2006-01-15 17:14 ` andrzej zaborowski
1 sibling, 0 replies; 10+ messages in thread
From: andrzej zaborowski @ 2006-01-15 17:14 UTC (permalink / raw)
To: linux-omap-open-source, Komal Shah
Hi,
thanks for looking at the patches,
> e.g Integrating OMAP2430 and DM6446/DM6443 McBSP interface and imagine
> how this mcbsp.c will look like :)
>
Right, that would make it a big mess and kindof hard to maintain.
Additionaly, I think the OMAP 730 definitions have been left out of
the conditional part and will produce compilation errors.
> See as of know all audio codec + tsc controller drivers are specific to
> OMAP, but can be used with other chips, and generally interfaced by
> uWire (SPI half-duplex) or SPI or I2C for command interface to the
> chip. So recently we had SPI framework developed by David Brownell,
> Dmitry, Vitally wool which will make its way in 2.6.16, considering
> there is no objections.
>
> You may want to experiment more with it. David had uWire hacks to merge
> with its SPI subsytem, which I will forward to you. Here is the link of
> that subsystem as GIT tree.
>
> http://www.kernel.org/git/?p=linux/kernel/git/gregkh/spi-2.6.git;a=summary
>
Thanks for the link. Unfortunately I only have this one PDA that
contains the TSC2301 chip, and it uses only uWire to communicate with
it. And.. I'm currently at the point of trying to mount some initrd as
root and having somethng for input (like the touchscreen) so I didn't
have space for experimenting with things like audio so far. But I
think both the TSC2301 and the Touchscreen code can be reused.
> > - The last patch only corrects some typos I found
> > while browsing the sources.
>
> These are generic ARM typos changes, and it should be submitted to
> linux-arm-kernel mailing list. But see that our tree is not synced with
> linus tree as of now. So, it is better to generate those typos patches
> against linus tree (if generic) than OMAP tree.
>
Okay, already sent it. It applied cleanly to Linus tree without rediff'ing.
> --- linux-omap-2.6.orig/drivers/input/touchscreen/omap/omap_ts.c
> 2006-01-14 14:59:17.000000000 +0000
> +++ linux-omap-2.6/drivers/input/touchscreen/omap/omap_ts.c 2006-01-14
> 15:56:12.000000000 +0000
> @@ -23,7 +23,7 @@
> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
> USA
> * History:
> * 12/12/2004 Srinath Modified and intergrated code for H2 and H3
> - *
> + * 13/01/2006 Added PalmTE specific code, Andrzej Zaborowski
> */
>
> I would suggest to not add up History changes as above, as AUTHOR name
> will be there when Tony commits in the tree, until we have create a new
> file (eg. plamte_ts.c).
>
Good point. In the end the revision system (GIT) is there to keep the history.
I am attaching a corrected version of the Touchscreen support patch
(the second one).
Regards,
Andrzej Zaborowski
--
balrog 2oo6
Dear Outlook users: Please remove me from your address books
http://www.newsforge.com/article.pl?sid=03/08/21/143258
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Palm TE Touchscreen and fixes
2006-01-14 21:06 [PATCH] Palm TE Touchscreen and fixes andrzej zaborowski
2006-01-15 9:10 ` Komal Shah
@ 2006-01-15 20:19 ` Tony Lindgren
2006-01-16 23:23 ` andrzej zaborowski
1 sibling, 1 reply; 10+ messages in thread
From: Tony Lindgren @ 2006-01-15 20:19 UTC (permalink / raw)
To: andrzej zaborowski; +Cc: linux-omap-open-source
Hi,
Good to hear you got things working against the current git tree!
* andrzej zaborowski <balrogg@gmail.com> [060115 12:00]:
>
> - The first one fixes the compilation errors and some clock issues
> that made the kernel hang on boot on Palm Tungsten E. While these
> changes make the kernel boot and work well with the device, and
> hopefully don't affect other devices, I don't know how correct are my
> ways of fixing it, as I'm completely inexperienced in kernel insides.
Regarding changes to clock.[ch], we should have CLOCK_IN_OMAP1510 and
CLOCK_IN_OMAP3XX separate. At least the DSP clocks should not be on 310
because it does not have a DSP AFAIK. They may be also other clocks that
are not on 310.
Could you please redo the clock.[ch] patch so it adds CLOCK_IN_OMAP3XX,
and masks it only for the clocks you think you have on 310?
Or if you don't know which clocks are on both 310 and 1510, you could
just leave out DSP clocks for now, and enable all other 1510 clocks
also for 310.
Regards,
Tony
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Palm TE Touchscreen and fixes
2006-01-15 16:04 ` Juha Yrjölä
@ 2006-01-16 6:05 ` Komal Shah
0 siblings, 0 replies; 10+ messages in thread
From: Komal Shah @ 2006-01-16 6:05 UTC (permalink / raw)
Cc: linux-omap-open-source
--- Juha Yrjölä <juha.yrjola@nokia.com> wrote:
>
> We have a TSC2301 driver that's in a pretty good shape now. At the
> moment keypad and touchscreen are supported. The audio mixer driver
> is
> work-in-progress.
>
> We'll merge it whenever Dave's SPI stuff finds its way into
> linux-omap.
>
> BTW, we also have a McSPI controller driver for OMAP2. It uses PIO
> at
> the moment, but DMA support is on its way.
Cool. I hope you know that Dave's SPI fwk made it to Linus tree 2 days
back. :). It is time to sync up our tree.
And I had made a attempt to write OMAP2 SPI controller driver with that
framework. Here is the work-in-progress patch.
You can re-use most of the code from that when you further implement
patch based on Dave's fwk.
http://linux.omap.com/pipermail/linux-omap-open-source/2006-January/006107.html
_or_ give me some review, so that I can change it and test it again.
You can send me your work-in-progress McSPI driver. Thanx.
---Komal Shah
http://komalshah.blogspot.com/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Palm TE Touchscreen and fixes
2006-01-15 20:19 ` Tony Lindgren
@ 2006-01-16 23:23 ` andrzej zaborowski
2006-01-20 19:53 ` tony
0 siblings, 1 reply; 10+ messages in thread
From: andrzej zaborowski @ 2006-01-16 23:23 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 1718 bytes --]
Hi there,
> Regarding changes to clock.[ch], we should have CLOCK_IN_OMAP1510 and
> CLOCK_IN_OMAP3XX separate. At least the DSP clocks should not be on 310
> because it does not have a DSP AFAIK. They may be also other clocks that
> are not on 310.
>
> Could you please redo the clock.[ch] patch so it adds CLOCK_IN_OMAP3XX,
> and masks it only for the clocks you think you have on 310?
>
> Or if you don't know which clocks are on both 310 and 1510, you could
> just leave out DSP clocks for now, and enable all other 1510 clocks
> also for 310.
Indeed, I don't know which clocks are there and I don't know if the
board has a DSP or not. There is no real documentation for OMAP310
publicly availiable. The product page
(http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&navigationId=11997&path=templatedata/cm/product/data/omap_310)
doesn't mention DSP, except the line
"Digital Phase-Locked Loop (DPLL) for MPU/DSP/TC Clocking Control",
however it is said that OMAP310 is similar to OMAP5910
(http://focus.ti.com/docs/prod/folders/print/omap5910.html) which is
fully documented and this one definitely has a DSP.
After disabling the DSP related clocks and the DSP initialisation,
McBSP fails to initialise with the message: "mcbsp: could not acquire
dsp_ck handle", nevertheless the kernel still boots and everything
works fine. (It feels bad not knowing what's inside your computer.)
I'm attaching the same patch but with CLOCK_IN_OMAP1510 and
CLOCK_IN_OMAP310 separate and everything DSP-related turned off.
Regards,
--
balrog 2oo6
Dear Outlook users: Please remove me from your address books
http://www.newsforge.com/article.pl?sid=03/08/21/143258
[-- Attachment #2: linux-palmte-errors.patch --]
[-- Type: application/octet-stream, Size: 20372 bytes --]
diff -pNaur linux-omap-2.6.orig/arch/arm/mach-omap1/board-generic.c linux-omap-2.6/arch/arm/mach-omap1/board-generic.c
--- linux-omap-2.6.orig/arch/arm/mach-omap1/board-generic.c 2006-01-14 15:58:56.000000000 +0100
+++ linux-omap-2.6/arch/arm/mach-omap1/board-generic.c 2006-01-16 05:37:51.000000000 +0100
@@ -88,7 +88,7 @@ static struct omap_board_config_kernel g
static void __init omap_generic_init(void)
{
#ifdef CONFIG_ARCH_OMAP15XX
- if (cpu_is_omap1510()) {
+ if (cpu_is_omap15xx()) {
generic_config[0].data = &generic1510_usb_config;
}
#endif
diff -pNaur linux-omap-2.6.orig/arch/arm/mach-omap1/clock.c linux-omap-2.6/arch/arm/mach-omap1/clock.c
--- linux-omap-2.6.orig/arch/arm/mach-omap1/clock.c 2006-01-14 15:58:56.000000000 +0100
+++ linux-omap-2.6/arch/arm/mach-omap1/clock.c 2006-01-16 05:37:51.000000000 +0100
@@ -687,6 +687,11 @@ int __init omap1_clk_init(void)
clk_register(*clkp);
continue;
}
+
+ if (((*clkp)->flags &CLOCK_IN_OMAP310) && cpu_is_omap310()) {
+ clk_register(*clkp);
+ continue;
+ }
}
info = omap_get_config(OMAP_TAG_CLOCK, struct omap_clock_config);
@@ -784,7 +789,7 @@ int __init omap1_clk_init(void)
clk_enable(&armxor_ck.clk);
clk_enable(&armtim_ck.clk); /* This should be done by timer code */
- if (cpu_is_omap1510())
+ if (cpu_is_omap15xx())
clk_enable(&arm_gpio_ck);
return 0;
diff -pNaur linux-omap-2.6.orig/arch/arm/mach-omap1/clock.h linux-omap-2.6/arch/arm/mach-omap1/clock.h
--- linux-omap-2.6.orig/arch/arm/mach-omap1/clock.h 2006-01-14 15:58:56.000000000 +0100
+++ linux-omap-2.6/arch/arm/mach-omap1/clock.h 2006-01-16 05:46:42.000000000 +0100
@@ -151,7 +151,7 @@ static struct clk ck_ref = {
.name = "ck_ref",
.rate = 12000000,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
- ALWAYS_ENABLED,
+ CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
.enable = &omap1_clk_enable_generic,
.disable = &omap1_clk_disable_generic,
};
@@ -160,7 +160,7 @@ static struct clk ck_dpll1 = {
.name = "ck_dpll1",
.parent = &ck_ref,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
- RATE_PROPAGATES | ALWAYS_ENABLED,
+ CLOCK_IN_OMAP310 | RATE_PROPAGATES | ALWAYS_ENABLED,
.enable = &omap1_clk_enable_generic,
.disable = &omap1_clk_disable_generic,
};
@@ -183,7 +183,8 @@ static struct clk arm_ck = {
.name = "arm_ck",
.parent = &ck_dpll1,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
- RATE_CKCTL | RATE_PROPAGATES | ALWAYS_ENABLED,
+ CLOCK_IN_OMAP310 | RATE_CKCTL | RATE_PROPAGATES |
+ ALWAYS_ENABLED,
.rate_offset = CKCTL_ARMDIV_OFFSET,
.recalc = &omap1_ckctl_recalc,
.enable = &omap1_clk_enable_generic,
@@ -195,7 +196,8 @@ static struct arm_idlect1_clk armper_ck
.name = "armper_ck",
.parent = &ck_dpll1,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
- RATE_CKCTL | CLOCK_IDLE_CONTROL,
+ CLOCK_IN_OMAP310 | RATE_CKCTL |
+ CLOCK_IDLE_CONTROL,
.enable_reg = (void __iomem *)ARM_IDLECT2,
.enable_bit = EN_PERCK,
.rate_offset = CKCTL_PERDIV_OFFSET,
@@ -209,7 +211,7 @@ static struct arm_idlect1_clk armper_ck
static struct clk arm_gpio_ck = {
.name = "arm_gpio_ck",
.parent = &ck_dpll1,
- .flags = CLOCK_IN_OMAP1510,
+ .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310,
.enable_reg = (void __iomem *)ARM_IDLECT2,
.enable_bit = EN_GPIOCK,
.recalc = &followparent_recalc,
@@ -222,7 +224,7 @@ static struct arm_idlect1_clk armxor_ck
.name = "armxor_ck",
.parent = &ck_ref,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
- CLOCK_IDLE_CONTROL,
+ CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
.enable_reg = (void __iomem *)ARM_IDLECT2,
.enable_bit = EN_XORPCK,
.recalc = &followparent_recalc,
@@ -237,7 +239,7 @@ static struct arm_idlect1_clk armtim_ck
.name = "armtim_ck",
.parent = &ck_ref,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
- CLOCK_IDLE_CONTROL,
+ CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
.enable_reg = (void __iomem *)ARM_IDLECT2,
.enable_bit = EN_TIMCK,
.recalc = &followparent_recalc,
@@ -252,7 +254,7 @@ static struct arm_idlect1_clk armwdt_ck
.name = "armwdt_ck",
.parent = &ck_ref,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
- CLOCK_IDLE_CONTROL,
+ CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
.enable_reg = (void __iomem *)ARM_IDLECT2,
.enable_bit = EN_WDTCK,
.recalc = &omap1_watchdog_recalc,
@@ -344,9 +346,9 @@ static struct arm_idlect1_clk tc_ck = {
.name = "tc_ck",
.parent = &ck_dpll1,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
- CLOCK_IN_OMAP730 | RATE_CKCTL |
- RATE_PROPAGATES | ALWAYS_ENABLED |
- CLOCK_IDLE_CONTROL,
+ CLOCK_IN_OMAP730 | CLOCK_IN_OMAP310 |
+ RATE_CKCTL | RATE_PROPAGATES |
+ ALWAYS_ENABLED | CLOCK_IDLE_CONTROL,
.rate_offset = CKCTL_TCDIV_OFFSET,
.recalc = &omap1_ckctl_recalc,
.enable = &omap1_clk_enable_generic,
@@ -358,7 +360,8 @@ static struct arm_idlect1_clk tc_ck = {
static struct clk arminth_ck1510 = {
.name = "arminth_ck",
.parent = &tc_ck.clk,
- .flags = CLOCK_IN_OMAP1510 | ALWAYS_ENABLED,
+ .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
+ ALWAYS_ENABLED,
.recalc = &followparent_recalc,
/* Note: On 1510 the frequency follows TC_CK
*
@@ -372,7 +375,8 @@ static struct clk tipb_ck = {
/* No-idle controlled by "tc_ck" */
.name = "tibp_ck",
.parent = &tc_ck.clk,
- .flags = CLOCK_IN_OMAP1510 | ALWAYS_ENABLED,
+ .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
+ ALWAYS_ENABLED,
.recalc = &followparent_recalc,
.enable = &omap1_clk_enable_generic,
.disable = &omap1_clk_disable_generic,
@@ -417,7 +421,7 @@ static struct clk dma_ck = {
.name = "dma_ck",
.parent = &tc_ck.clk,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
- ALWAYS_ENABLED,
+ CLOCK_IN_OMAP310 | ALWAYS_ENABLED,
.recalc = &followparent_recalc,
.enable = &omap1_clk_enable_generic,
.disable = &omap1_clk_disable_generic,
@@ -437,7 +441,7 @@ static struct arm_idlect1_clk api_ck = {
.name = "api_ck",
.parent = &tc_ck.clk,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
- CLOCK_IDLE_CONTROL,
+ CLOCK_IN_OMAP310 | CLOCK_IDLE_CONTROL,
.enable_reg = (void __iomem *)ARM_IDLECT2,
.enable_bit = EN_APICK,
.recalc = &followparent_recalc,
@@ -451,7 +455,8 @@ static struct arm_idlect1_clk lb_ck = {
.clk = {
.name = "lb_ck",
.parent = &tc_ck.clk,
- .flags = CLOCK_IN_OMAP1510 | CLOCK_IDLE_CONTROL,
+ .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
+ CLOCK_IDLE_CONTROL,
.enable_reg = (void __iomem *)ARM_IDLECT2,
.enable_bit = EN_LBCK,
.recalc = &followparent_recalc,
@@ -495,8 +500,8 @@ static struct arm_idlect1_clk lcd_ck_151
.clk = {
.name = "lcd_ck",
.parent = &ck_dpll1,
- .flags = CLOCK_IN_OMAP1510 | RATE_CKCTL |
- CLOCK_IDLE_CONTROL,
+ .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
+ RATE_CKCTL | CLOCK_IDLE_CONTROL,
.enable_reg = (void __iomem *)ARM_IDLECT2,
.enable_bit = EN_LCDCK,
.rate_offset = CKCTL_LCDDIV_OFFSET,
@@ -512,8 +517,9 @@ static struct clk uart1_1510 = {
/* Direct from ULPD, no real parent */
.parent = &armper_ck.clk,
.rate = 12000000,
- .flags = CLOCK_IN_OMAP1510 | ENABLE_REG_32BIT |
- ALWAYS_ENABLED | CLOCK_NO_IDLE_PARENT,
+ .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
+ ENABLE_REG_32BIT | ALWAYS_ENABLED |
+ CLOCK_NO_IDLE_PARENT,
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
.enable_bit = 29, /* Chooses between 12MHz and 48MHz */
.set_rate = &omap1_set_uart_rate,
@@ -544,8 +550,8 @@ static struct clk uart2_ck = {
.parent = &armper_ck.clk,
.rate = 12000000,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
- ENABLE_REG_32BIT | ALWAYS_ENABLED |
- CLOCK_NO_IDLE_PARENT,
+ CLOCK_IN_OMAP310 | ENABLE_REG_32BIT |
+ ALWAYS_ENABLED | CLOCK_NO_IDLE_PARENT,
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
.enable_bit = 30, /* Chooses between 12MHz and 48MHz */
.set_rate = &omap1_set_uart_rate,
@@ -559,8 +565,9 @@ static struct clk uart3_1510 = {
/* Direct from ULPD, no real parent */
.parent = &armper_ck.clk,
.rate = 12000000,
- .flags = CLOCK_IN_OMAP1510 | ENABLE_REG_32BIT |
- ALWAYS_ENABLED | CLOCK_NO_IDLE_PARENT,
+ .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
+ ENABLE_REG_32BIT | ALWAYS_ENABLED |
+ CLOCK_NO_IDLE_PARENT,
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
.enable_bit = 31, /* Chooses between 12MHz and 48MHz */
.set_rate = &omap1_set_uart_rate,
@@ -590,7 +597,7 @@ static struct clk usb_clko = { /* 6 MHz
/* Direct from ULPD, no parent */
.rate = 6000000,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
- RATE_FIXED | ENABLE_REG_32BIT,
+ CLOCK_IN_OMAP310 | RATE_FIXED | ENABLE_REG_32BIT,
.enable_reg = (void __iomem *)ULPD_CLOCK_CTRL,
.enable_bit = USB_MCLK_EN_BIT,
.enable = &omap1_clk_enable_generic,
@@ -601,7 +608,7 @@ static struct clk usb_hhc_ck1510 = {
.name = "usb_hhc_ck",
/* Direct from ULPD, no parent */
.rate = 48000000, /* Actually 2 clocks, 12MHz and 48MHz */
- .flags = CLOCK_IN_OMAP1510 |
+ .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 |
RATE_FIXED | ENABLE_REG_32BIT,
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
.enable_bit = USB_HOST_HHC_UHOST_EN,
@@ -637,7 +644,9 @@ static struct clk mclk_1510 = {
.name = "mclk",
/* Direct from ULPD, no parent. May be enabled by ext hardware. */
.rate = 12000000,
- .flags = CLOCK_IN_OMAP1510 | RATE_FIXED,
+ .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | RATE_FIXED,
+ .enable_reg = (void __iomem *)SOFT_REQ_REG,
+ .enable_bit = 6,
.enable = &omap1_clk_enable_generic,
.disable = &omap1_clk_disable_generic,
};
@@ -659,7 +668,7 @@ static struct clk bclk_1510 = {
.name = "bclk",
/* Direct from ULPD, no parent. May be enabled by ext hardware. */
.rate = 12000000,
- .flags = CLOCK_IN_OMAP1510 | RATE_FIXED,
+ .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP310 | RATE_FIXED,
.enable = &omap1_clk_enable_generic,
.disable = &omap1_clk_disable_generic,
};
@@ -683,7 +692,8 @@ static struct clk mmc1_ck = {
.parent = &armper_ck.clk,
.rate = 48000000,
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
- RATE_FIXED | ENABLE_REG_32BIT | CLOCK_NO_IDLE_PARENT,
+ CLOCK_IN_OMAP310 | RATE_FIXED | ENABLE_REG_32BIT |
+ CLOCK_NO_IDLE_PARENT,
.enable_reg = (void __iomem *)MOD_CONF_CTRL_0,
.enable_bit = 23,
.enable = &omap1_clk_enable_generic,
@@ -706,7 +716,7 @@ static struct clk mmc2_ck = {
static struct clk virtual_ck_mpu = {
.name = "mpu",
.flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
- VIRTUAL_CLOCK | ALWAYS_ENABLED,
+ CLOCK_IN_OMAP310 | VIRTUAL_CLOCK | ALWAYS_ENABLED,
.parent = &arm_ck, /* Is smarter alias for */
.recalc = &followparent_recalc,
.set_rate = &omap1_select_table_rate,
diff -pNaur linux-omap-2.6.orig/arch/arm/mach-omap1/io.c linux-omap-2.6/arch/arm/mach-omap1/io.c
--- linux-omap-2.6.orig/arch/arm/mach-omap1/io.c 2006-01-14 15:58:56.000000000 +0100
+++ linux-omap-2.6/arch/arm/mach-omap1/io.c 2006-01-16 05:37:51.000000000 +0100
@@ -110,7 +110,7 @@ void __init omap1_map_common_io(void)
}
#endif
#ifdef CONFIG_ARCH_OMAP15XX
- if (cpu_is_omap1510()) {
+ if (cpu_is_omap15xx()) {
iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc));
}
#endif
diff -pNaur linux-omap-2.6.orig/arch/arm/mach-omap1/pm.c linux-omap-2.6/arch/arm/mach-omap1/pm.c
--- linux-omap-2.6.orig/arch/arm/mach-omap1/pm.c 2006-01-14 15:58:56.000000000 +0100
+++ linux-omap-2.6/arch/arm/mach-omap1/pm.c 2006-01-16 05:37:51.000000000 +0100
@@ -165,7 +165,7 @@ void omap_pm_idle(void)
if ((use_idlect1 != ~0) || !do_sleep) {
__u32 saved_idlect1 = omap_readl(ARM_IDLECT1);
- if (cpu_is_omap1510())
+ if (cpu_is_omap15xx())
use_idlect1 &= OMAP1510_BIG_SLEEP_REQUEST;
else
use_idlect1 &= OMAP1610_IDLECT1_SLEEP_VAL;
@@ -204,7 +204,7 @@ static void omap_pm_wakeup_setup(void)
if (cpu_is_omap730())
level1_wake = OMAP_IRQ_BIT(INT_730_GPIO_BANK1) |
OMAP_IRQ_BIT(INT_730_IH2_IRQ);
- else if (cpu_is_omap1510())
+ else if (cpu_is_omap15xx())
level1_wake = OMAP_IRQ_BIT(INT_GPIO_BANK1) |
OMAP_IRQ_BIT(INT_1510_IH2_IRQ);
else if (cpu_is_omap16xx())
@@ -218,7 +218,7 @@ static void omap_pm_wakeup_setup(void)
omap_writel(~(OMAP_IRQ_BIT(INT_730_WAKE_UP_REQ) |
OMAP_IRQ_BIT(INT_730_MPUIO_KEYPAD)),
OMAP_IH2_1_MIR);
- } else if (cpu_is_omap1510()) {
+ } else if (cpu_is_omap15xx()) {
level2_wake |= OMAP_IRQ_BIT(INT_KEYBOARD);
omap_writel(~level2_wake, OMAP_IH2_MIR);
} else if (cpu_is_omap16xx()) {
@@ -283,7 +283,7 @@ void omap_pm_suspend(void)
MPUI730_SAVE(EMIFS_CONFIG);
MPUI730_SAVE(EMIFF_SDRAM_CONFIG);
- } else if (cpu_is_omap1510()) {
+ } else if (cpu_is_omap15xx()) {
MPUI1510_SAVE(OMAP_IH1_MIR);
MPUI1510_SAVE(OMAP_IH2_MIR);
MPUI1510_SAVE(MPUI_CTRL);
@@ -307,7 +307,7 @@ void omap_pm_suspend(void)
ARM_SAVE(ARM_CKCTL);
ARM_SAVE(ARM_IDLECT1);
ARM_SAVE(ARM_IDLECT2);
- if (!(cpu_is_omap1510()))
+ if (!(cpu_is_omap15xx()))
ARM_SAVE(ARM_IDLECT3);
ARM_SAVE(ARM_EWUPCT);
ARM_SAVE(ARM_RSTCT1);
@@ -395,7 +395,7 @@ void omap_pm_suspend(void)
* Restore ARM state, except ARM_IDLECT1/2 which omap_cpu_suspend did
*/
- if (!(cpu_is_omap1510()))
+ if (!(cpu_is_omap15xx()))
ARM_RESTORE(ARM_IDLECT3);
ARM_RESTORE(ARM_CKCTL);
ARM_RESTORE(ARM_EWUPCT);
@@ -411,7 +411,7 @@ void omap_pm_suspend(void)
MPUI730_RESTORE(OMAP_IH1_MIR);
MPUI730_RESTORE(OMAP_IH2_0_MIR);
MPUI730_RESTORE(OMAP_IH2_1_MIR);
- } else if (cpu_is_omap1510()) {
+ } else if (cpu_is_omap15xx()) {
MPUI1510_RESTORE(MPUI_CTRL);
MPUI1510_RESTORE(MPUI_DSP_BOOT_CONFIG);
MPUI1510_RESTORE(MPUI_DSP_API_CONFIG);
@@ -472,7 +472,7 @@ static int omap_pm_read_proc(
ARM_SAVE(ARM_CKCTL);
ARM_SAVE(ARM_IDLECT1);
ARM_SAVE(ARM_IDLECT2);
- if (!(cpu_is_omap1510()))
+ if (!(cpu_is_omap15xx()))
ARM_SAVE(ARM_IDLECT3);
ARM_SAVE(ARM_EWUPCT);
ARM_SAVE(ARM_RSTCT1);
@@ -493,7 +493,7 @@ static int omap_pm_read_proc(
MPUI730_SAVE(MPUI_DSP_API_CONFIG);
MPUI730_SAVE(EMIFF_SDRAM_CONFIG);
MPUI730_SAVE(EMIFS_CONFIG);
- } else if (cpu_is_omap1510()) {
+ } else if (cpu_is_omap15xx()) {
MPUI1510_SAVE(MPUI_CTRL);
MPUI1510_SAVE(MPUI_DSP_STATUS);
MPUI1510_SAVE(MPUI_DSP_BOOT_CONFIG);
@@ -556,7 +556,7 @@ static int omap_pm_read_proc(
MPUI730_SHOW(MPUI_DSP_API_CONFIG),
MPUI730_SHOW(EMIFF_SDRAM_CONFIG),
MPUI730_SHOW(EMIFS_CONFIG));
- } else if (cpu_is_omap1510()) {
+ } else if (cpu_is_omap15xx()) {
my_buffer_offset += sprintf(my_base + my_buffer_offset,
"MPUI1510_CTRL_REG 0x%-8x \n"
"MPUI1510_DSP_STATUS_REG: 0x%-8x \n"
@@ -716,7 +716,7 @@ static int __init omap_pm_init(void)
omap730_idle_loop_suspend_sz);
omap_sram_suspend = omap_sram_push(omap730_cpu_suspend,
omap730_cpu_suspend_sz);
- } else if (cpu_is_omap1510()) {
+ } else if (cpu_is_omap15xx()) {
omap_sram_idle = omap_sram_push(omap1510_idle_loop_suspend,
omap1510_idle_loop_suspend_sz);
omap_sram_suspend = omap_sram_push(omap1510_cpu_suspend,
diff -pNaur linux-omap-2.6.orig/arch/arm/plat-omap/gpio.c linux-omap-2.6/arch/arm/plat-omap/gpio.c
--- linux-omap-2.6.orig/arch/arm/plat-omap/gpio.c 2006-01-14 15:58:57.000000000 +0100
+++ linux-omap-2.6/arch/arm/plat-omap/gpio.c 2006-01-16 05:37:51.000000000 +0100
@@ -174,7 +174,7 @@ static int gpio_bank_count;
static inline struct gpio_bank *get_gpio_bank(int gpio)
{
#ifdef CONFIG_ARCH_OMAP15XX
- if (cpu_is_omap1510()) {
+ if (cpu_is_omap15xx()) {
if (OMAP_GPIO_IS_MPUIO(gpio))
return &gpio_bank[0];
return &gpio_bank[1];
@@ -223,7 +223,7 @@ static inline int gpio_valid(int gpio)
return 0;
}
#ifdef CONFIG_ARCH_OMAP15XX
- if (cpu_is_omap1510() && gpio < 16)
+ if (cpu_is_omap15xx() && gpio < 16)
return 0;
#endif
#if defined(CONFIG_ARCH_OMAP16XX)
@@ -879,7 +879,7 @@ static int __init _omap_gpio_init(void)
initialized = 1;
- if (cpu_is_omap1510()) {
+ if (cpu_is_omap15xx()) {
gpio_ick = clk_get(NULL, "arm_gpio_ck");
if (IS_ERR(gpio_ick))
printk("Could not get arm_gpio_ck\n");
@@ -900,7 +900,7 @@ static int __init _omap_gpio_init(void)
}
#ifdef CONFIG_ARCH_OMAP15XX
- if (cpu_is_omap1510()) {
+ if (cpu_is_omap15xx()) {
printk(KERN_INFO "OMAP1510 GPIO hardware\n");
gpio_bank_count = 2;
gpio_bank = gpio_bank_1510;
diff -pNaur linux-omap-2.6.orig/arch/arm/plat-omap/mcbsp.c linux-omap-2.6/arch/arm/plat-omap/mcbsp.c
--- linux-omap-2.6.orig/arch/arm/plat-omap/mcbsp.c 2006-01-14 15:58:57.000000000 +0100
+++ linux-omap-2.6/arch/arm/plat-omap/mcbsp.c 2006-01-16 05:37:51.000000000 +0100
@@ -184,7 +184,7 @@ static int omap_mcbsp_check(unsigned int
return 0;
}
- if (cpu_is_omap1510() || cpu_is_omap16xx() || cpu_is_omap24xx()) {
+ if (cpu_is_omap15xx() || cpu_is_omap16xx() || cpu_is_omap24xx()) {
if (id > OMAP_MAX_MCBSP_COUNT) {
printk(KERN_ERR "OMAP-McBSP: McBSP%d doesn't exist\n", id + 1);
return -1;
@@ -198,7 +198,7 @@ static int omap_mcbsp_check(unsigned int
#ifdef CONFIG_ARCH_OMAP1
static void omap_mcbsp_dsp_request(void)
{
- if (cpu_is_omap1510() || cpu_is_omap16xx()) {
+ if (cpu_is_omap15xx() || cpu_is_omap16xx()) {
omap_dsp_request_mem();
clk_enable(mcbsp_dsp_ck);
clk_enable(mcbsp_api_ck);
@@ -217,7 +217,7 @@ static void omap_mcbsp_dsp_request(void)
static void omap_mcbsp_dsp_free(void)
{
- if (cpu_is_omap1510() || cpu_is_omap16xx()) {
+ if (cpu_is_omap15xx() || cpu_is_omap16xx()) {
omap_dsp_release_mem();
clk_disable(mcbsp_dspxor_ck);
clk_disable(mcbsp_dsp_ck);
@@ -833,7 +833,7 @@ static int __init omap_mcbsp_init(void)
}
#endif
#ifdef CONFIG_ARCH_OMAP15XX
- if (cpu_is_omap1510()) {
+ if (cpu_is_omap15xx()) {
mcbsp_info = mcbsp_1510;
mcbsp_count = ARRAY_SIZE(mcbsp_1510);
}
diff -pNaur linux-omap-2.6.orig/drivers/video/omap/lcd_palmte.c linux-omap-2.6/drivers/video/omap/lcd_palmte.c
--- linux-omap-2.6.orig/drivers/video/omap/lcd_palmte.c 2006-01-14 15:59:39.000000000 +0100
+++ linux-omap-2.6/drivers/video/omap/lcd_palmte.c 2006-01-16 05:37:51.000000000 +0100
@@ -24,9 +24,9 @@
#include <linux/module.h>
#include <asm/io.h>
-#include <asm/arch/fpga.h>
-#include "omapfb.h"
+#include <asm/arch/fpga.h>
+#include <asm/arch/omapfb.h>
/* #define OMAPFB_DBG 1 */
@@ -67,11 +67,11 @@ struct lcd_panel palmte_panel = {
.name = "palmte",
.config = OMAP_LCDC_PANEL_TFT | OMAP_LCDC_INV_VSYNC |
OMAP_LCDC_INV_HSYNC | OMAP_LCDC_HSVS_RISING_EDGE |
- OMAP_LCDC_HSVS_OPPOSITE;
+ OMAP_LCDC_HSVS_OPPOSITE,
.data_lines = 16,
.bpp = 8,
- .pixel_clock = 12500,
+ .pixel_clock = 12000,
.x_res = 320,
.y_res = 320,
.hsw = 4,
@@ -80,7 +80,7 @@ struct lcd_panel palmte_panel = {
.vsw = 1,
.vfp = 8,
.vbp = 7,
- .pcd = 5,
+ .pcd = 0,
.init = palmte_panel_init,
.cleanup = palmte_panel_cleanup,
diff -pNaur linux-omap-2.6.orig/include/asm-arm/arch-omap/clock.h linux-omap-2.6/include/asm-arm/arch-omap/clock.h
--- linux-omap-2.6.orig/include/asm-arm/arch-omap/clock.h 2006-01-14 15:59:47.000000000 +0100
+++ linux-omap-2.6/include/asm-arm/arch-omap/clock.h 2006-01-16 05:37:51.000000000 +0100
@@ -80,10 +80,11 @@ extern void clk_deny_idle(struct clk *cl
#define CM_PLL_SEL1 (1 << 18)
#define CM_PLL_SEL2 (1 << 19)
#define CM_SYSCLKOUT_SEL1 (1 << 20)
-#define CLOCK_IN_OMAP730 (1 << 21)
-#define CLOCK_IN_OMAP1510 (1 << 22)
-#define CLOCK_IN_OMAP16XX (1 << 23)
-#define CLOCK_IN_OMAP242X (1 << 24)
-#define CLOCK_IN_OMAP243X (1 << 25)
+#define CLOCK_IN_OMAP310 (1 << 21)
+#define CLOCK_IN_OMAP730 (1 << 22)
+#define CLOCK_IN_OMAP1510 (1 << 23)
+#define CLOCK_IN_OMAP16XX (1 << 24)
+#define CLOCK_IN_OMAP242X (1 << 25)
+#define CLOCK_IN_OMAP243X (1 << 26)
#endif
diff -pNaur linux-omap-2.6.orig/include/asm-arm/arch-omap/mcbsp.h linux-omap-2.6/include/asm-arm/arch-omap/mcbsp.h
--- linux-omap-2.6.orig/include/asm-arm/arch-omap/mcbsp.h 2006-01-14 15:59:47.000000000 +0100
+++ linux-omap-2.6/include/asm-arm/arch-omap/mcbsp.h 2006-01-16 05:37:51.000000000 +0100
@@ -40,7 +40,7 @@
#define OMAP24XX_MCBSP1_BASE 0x48074000
#define OMAP24XX_MCBSP2_BASE 0x48076000
-#ifdef CONFIG_ARCH_OMAP16XX
+#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP15XX)
#define OMAP_MCBSP_REG_DRR2 0x00
#define OMAP_MCBSP_REG_DRR1 0x02
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH] Palm TE Touchscreen and fixes
@ 2006-01-16 23:41 Woodruff, Richard
0 siblings, 0 replies; 10+ messages in thread
From: Woodruff, Richard @ 2006-01-16 23:41 UTC (permalink / raw)
To: andrzej zaborowski, Tony Lindgren; +Cc: linux-omap-open-source
The 310 shouldn't have a DSP, however early chips may have had one (1510
perhaps with a mask tweak).
Regards,
Richard W.
> Hi there,
>
> > Regarding changes to clock.[ch], we should have CLOCK_IN_OMAP1510
and
> > CLOCK_IN_OMAP3XX separate. At least the DSP clocks should not be on
310
> > because it does not have a DSP AFAIK. They may be also other clocks
that
> > are not on 310.
> >
> > Could you please redo the clock.[ch] patch so it adds
CLOCK_IN_OMAP3XX,
> > and masks it only for the clocks you think you have on 310?
> >
> > Or if you don't know which clocks are on both 310 and 1510, you
could
> > just leave out DSP clocks for now, and enable all other 1510 clocks
> > also for 310.
>
> Indeed, I don't know which clocks are there and I don't know if the
> board has a DSP or not. There is no real documentation for OMAP310
> publicly availiable. The product page
>
(http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId
=6
> 123&navigationId=11997&path=templatedata/cm/product/data/omap_310)
> doesn't mention DSP, except the line
> "Digital Phase-Locked Loop (DPLL) for MPU/DSP/TC Clocking Control",
> however it is said that OMAP310 is similar to OMAP5910
> (http://focus.ti.com/docs/prod/folders/print/omap5910.html) which is
> fully documented and this one definitely has a DSP.
> After disabling the DSP related clocks and the DSP initialisation,
> McBSP fails to initialise with the message: "mcbsp: could not acquire
> dsp_ck handle", nevertheless the kernel still boots and everything
> works fine. (It feels bad not knowing what's inside your computer.)
> I'm attaching the same patch but with CLOCK_IN_OMAP1510 and
> CLOCK_IN_OMAP310 separate and everything DSP-related turned off.
> Regards,
> --
> balrog 2oo6
>
> Dear Outlook users: Please remove me from your address books
> http://www.newsforge.com/article.pl?sid=03/08/21/143258
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Palm TE Touchscreen and fixes
2006-01-16 23:23 ` andrzej zaborowski
@ 2006-01-20 19:53 ` tony
2006-01-21 0:41 ` andrzej zaborowski
0 siblings, 1 reply; 10+ messages in thread
From: tony @ 2006-01-20 19:53 UTC (permalink / raw)
To: andrzej zaborowski; +Cc: linux-omap-open-source
* andrzej zaborowski <balrogg@gmail.com> [060116 15:23]:
> Hi there,
>
> > Regarding changes to clock.[ch], we should have CLOCK_IN_OMAP1510 and
> > CLOCK_IN_OMAP3XX separate. At least the DSP clocks should not be on 310
> > because it does not have a DSP AFAIK. They may be also other clocks that
> > are not on 310.
> >
> > Could you please redo the clock.[ch] patch so it adds CLOCK_IN_OMAP3XX,
> > and masks it only for the clocks you think you have on 310?
> >
> > Or if you don't know which clocks are on both 310 and 1510, you could
> > just leave out DSP clocks for now, and enable all other 1510 clocks
> > also for 310.
>
> Indeed, I don't know which clocks are there and I don't know if the
> board has a DSP or not. There is no real documentation for OMAP310
> publicly availiable. The product page
> (http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?templateId=6123&navigationId=11997&path=templatedata/cm/product/data/omap_310)
> doesn't mention DSP, except the line
> "Digital Phase-Locked Loop (DPLL) for MPU/DSP/TC Clocking Control",
> however it is said that OMAP310 is similar to OMAP5910
> (http://focus.ti.com/docs/prod/folders/print/omap5910.html) which is
> fully documented and this one definitely has a DSP.
> After disabling the DSP related clocks and the DSP initialisation,
> McBSP fails to initialise with the message: "mcbsp: could not acquire
> dsp_ck handle", nevertheless the kernel still boots and everything
> works fine. (It feels bad not knowing what's inside your computer.)
> I'm attaching the same patch but with CLOCK_IN_OMAP1510 and
> CLOCK_IN_OMAP310 separate and everything DSP-related turned off.
OK, I've pushed linux-palmte-errors.patch in three separate patches.
Where did find out the mclk for 15xx entry, BTW? Just trying out the
bits?
Regards,
Tony
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Palm TE Touchscreen and fixes
2006-01-20 19:53 ` tony
@ 2006-01-21 0:41 ` andrzej zaborowski
0 siblings, 0 replies; 10+ messages in thread
From: andrzej zaborowski @ 2006-01-21 0:41 UTC (permalink / raw)
To: linux-omap-open-source
On 20/01/06, tony@atomide.com <tony@atomide.com> wrote:
> OK, I've pushed linux-palmte-errors.patch in three separate patches.
Thank you!
> Where did find out the mclk for 15xx entry, BTW? Just trying out the
> bits?
Basically yes, but it took only 3 tries since the values are #defined
in drivers/ssi/omap-tsc2101.c and for some reason unused.
Without that the TSC2301 driver wouldn't work and I wasn't sure if it
would be correct to set the values dynamically from inside the TSC2301
driver or some other place.
Regards,
Andrew
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-01-21 0:41 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-14 21:06 [PATCH] Palm TE Touchscreen and fixes andrzej zaborowski
2006-01-15 9:10 ` Komal Shah
2006-01-15 16:04 ` Juha Yrjölä
2006-01-16 6:05 ` Komal Shah
2006-01-15 17:14 ` andrzej zaborowski
2006-01-15 20:19 ` Tony Lindgren
2006-01-16 23:23 ` andrzej zaborowski
2006-01-20 19:53 ` tony
2006-01-21 0:41 ` andrzej zaborowski
-- strict thread matches above, loose matches on Subject: below --
2006-01-16 23:41 Woodruff, Richard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox