Palm T|E2 Linux Port Status
It is currently possible to boot Linux on your Palm T|E2. Just follow the instructions at the Handhelds.org Palm T|E2 HOW-TO. If you look at the status there, you will find that there are a few things left to be done. That's why this page exists :)
Development Status
16 February 2007
No, we're not dead :)
I've been on a small sabbatical from development, studying the Familiar Linux distro and becoming more familiar (no pun intended) with the implications of developing a kernel for a PDA. Not only that, but I've been reading the 3rd Edition of Linux Device Drivers. Now I understand more fully how to develop a battery driver.
Here's a small milestone: I've managed to find out EXACTLY where the "scheduling while atomic" bug occurs. It turns out that wm97xx_reg_read() and wm97xx_reg_write() make calls to wm_codec->ac97->bus->ops->read() and wm_codec->ac97->bus->ops->write(), respectively. Both of these functions are function pointers to pxa2xx_ac97_read() and pxa2xx_ac97_write(), respectively. These functions, in turn, make calls to wait_event_timeout() to make sure that a read or write operation is completed before the code continues. wait_event_timeout(), in turn, calls schedule(). Eureka! This explains why wm97xx_read_aux_adc() crashes: it uses semaphore locking to enter an atomic state and calls wm97xx_reg_read() and wm97xx_reg_write() (thus calling schedule()) without first unlocking, hence "scheduling while atomic!"
New problem, however: I've modified palmte2_battery_update() in my module to call wm97xx_reg_read(wm, AC97_WM9712_POWER) to read the power state rather than wm97xx_read_aux_adc(). Also, I'm not even sure that the latter function will work in the first place, because aux3 is always zero in /sys. Unfortunately, now palmte2_battery_update() either is never called, or never completes. I think the process may be falling asleep in wait_event_timeout() and not returning properly...will look more into this (or will fix up wm97xx_read_aux_adc() to handle locking properly).
11 November 2006
Gaah! Too...much...homework!
Anyway, I did manage to find out that the call to wm->codec->poll_sample() in wm97xx_read_aux_adc() was causing most of the "scheduling while atomic" bugs. The call to wm->codec->digitiser_ioctl() is still to blame for some of them, however. The plot thickens...
7 November 2006
Okay, we traced the bug in wm97xx_read_aux_adc() to the call to wm->codec->digitiser_ioctl(). I'm working with Alex on the PalmLD port (both the T|E2 and the LD have the same battery monitoring hardware); hopefully one of us finds out why we get "scheduling while atomic" errors soon :)
4 November 2006
Thanks to orange for setting up a trac page for Palm T|E2 Linux development :)
My goal for now is to develop a kernel module that will read the battery state and power from the wm9712 chipset, based off of the Palm LD's experimental module (Thank you Alex!). Currently we are experiencing difficulties with wm97xx_read_aux_adc() in /drivers/input/touchscreen/wm97xx_core.c, one of the functions the module calls to read the battery power level: this function has been known to cause "scheduling while atomic" errors. Otherwise the module works, as far as I know.
Downloads
You can get my kernel config, palmte2_battery.c module code, and hacked wm97xx-core.c code and experiment with them, if you want. All contributions welcome :)