Kernel patches for Gdium
These patches apply to the kernel tree of the Linux Loongson/community project. They are based on tag v3.2.5 of this kernel. Most of it is ported from the kernel provided with G-Linux.
The first patch restores the framebuffer console on the Gdium; it was lost on commit 3a2183c888e343d187f4d5cc35533bb739f60923. Screen is still somewhat garbled and there's no visible cursor, but at least we can see what's happening and interact with the system.
Some deprecated kernel function was removed and replaced in Linux 3.2; the second patch changes the gdium_laptop driver to use the new function instead of the old one.
The R4K clock source driver doesn't build without power management. I don't really care on real use on a laptop, but for development, it's nice to build with minimal settings (and code was wrong anyway). So here comes the third patch.
A build option has disappeared. I'm not sure it's really useful, but anyway the fourth patch restores it.
The fifth patch is about GPIOs. Commit 2539387611b8b15bb2367275df9bfd3e29dc2a0e broke the GPIOs on the SM502 chip of the Gdium; some external change made the kernel support only the 4 GPIOs of the ls2f chip, leaving no room for the 64 GPIOs of the SM502. Also, the ls2f driver allocated all available GPIO entries for itself. Lots of things use GPIOs on the Gdium, so this small patch fixes lots of things.
The battery driver reports little information, not enough to make the LXDE applet work. with the sixth patch, I can have battery status in LXDE. Trivial but useful (didn't test with other desktop environments).