logo       

[Patch] 2.6 support for the Palm LifeDrive: msg#00009

handhelds.linux.kernel

Subject: [Patch] 2.6 support for the Palm LifeDrive

Working:
- full boot (ie I can start busybox via an initrd)
- pxa framebuffer
- serial console

Partially implemented:
- USB (yet to find the GPIO to activate USB with)

Also, this patch includes a bunch of new mach-types from http://www.arm.linux.org.uk/developer/machines/ (including the LifeDrive, of course). I didn't include the several machs that were renamed however, as I didn't want to break any code that relied on the old names.
diff --exclude=CVS -uNr kernel26/arch/arm/mach-pxa/Kconfig
kernel26-ld/arch/arm/mach-pxa/Kconfig
--- kernel26/arch/arm/mach-pxa/Kconfig 2005-08-04 07:43:45.000000000 +1000
+++ kernel26-ld/arch/arm/mach-pxa/Kconfig 2005-09-11 19:32:34.684569027
+1000
@@ -44,6 +44,7 @@
source "arch/arm/mach-pxa/axim/Kconfig"
source "arch/arm/mach-pxa/aximx30/Kconfig"
source "arch/arm/mach-pxa/rover/Kconfig"
+source "arch/arm/mach-pxa/palm/Kconfig"

config PXA_SHARPSL
bool "SHARP SL-5600 and SL-C7xx Models"
diff --exclude=CVS -uNr kernel26/arch/arm/mach-pxa/Makefile
kernel26-ld/arch/arm/mach-pxa/Makefile
--- kernel26/arch/arm/mach-pxa/Makefile 2005-08-27 05:27:17.000000000 +1000
+++ kernel26-ld/arch/arm/mach-pxa/Makefile 2005-09-11 20:12:43.848998420
+1000
@@ -23,6 +23,7 @@
obj-$(CONFIG_MACH_HX2750) += ssp.o hx2750/
obj-$(CONFIG_ARCH_H5400) += h5400/
obj-$(CONFIG_MACH_HIMALAYA) += himalaya/
+obj-$(CONFIG_ARCH_PALM_PXA) += palm/
obj-y += axim/
obj-y += aximx30/
obj-y += rover/
diff --exclude=CVS -uNr kernel26/arch/arm/mach-pxa/palm/Kconfig
kernel26-ld/arch/arm/mach-pxa/palm/Kconfig
--- kernel26/arch/arm/mach-pxa/palm/Kconfig 1970-01-01 10:00:00.000000000
+1000
+++ kernel26-ld/arch/arm/mach-pxa/palm/Kconfig 2005-09-11 20:14:02.027904902
+1000
@@ -0,0 +1,15 @@
+menuconfig ARCH_PALM_PXA
+ bool "Palm PDA"
+ help
+ Say Y here if you intend to run this kernel on a
+ PXA2xx based Palm.
+
+config MACH_XSCALE_PALMLD
+ bool "Palm LifeDrive"
+ depends on ARCH_PALM_PXA
+ select PXA27x
+ help
+ Say Y here if you intend to run this kernel on a
+ Palm LifeDrive. Currently there is only basic support
+ for this PDA.
+
diff --exclude=CVS -uNr kernel26/arch/arm/mach-pxa/palm/Makefile
kernel26-ld/arch/arm/mach-pxa/palm/Makefile
--- kernel26/arch/arm/mach-pxa/palm/Makefile 1970-01-01 10:00:00.000000000
+1000
+++ kernel26-ld/arch/arm/mach-pxa/palm/Makefile 2005-09-11 20:14:29.808475441
+1000
@@ -0,0 +1,6 @@
+#
+# Makefile for XScale based Palm supprt
+#
+
+obj-$(CONFIG_ARCH_PALM_PXA) += palm.o
+
diff --exclude=CVS -uNr kernel26/arch/arm/mach-pxa/palm/palm.c
kernel26-ld/arch/arm/mach-pxa/palm/palm.c
--- kernel26/arch/arm/mach-pxa/palm/palm.c 1970-01-01 10:00:00.000000000
+1000
+++ kernel26-ld/arch/arm/mach-pxa/palm/palm.c 2005-09-12 17:05:40.665276038
+1000
@@ -0,0 +1,109 @@
+/*
+ * linux/arch/arm/mach-pxa/palm/palm.c
+ *
+ * Support for the Intel XScale based Palm PDAs. Only the LifeDrive is
+ * supported at the moment.
+ *
+ * Author: Alex Osborne <bobofdoom-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx>
+ *
+ * USB stubs based on aximx30.c (Michael Opdenacker)
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/device.h>
+#include <linux/fb.h>
+
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+
+#include <asm/arch/hardware.h>
+#include <asm/arch/pxafb.h>
+#include <asm/arch/pxa-regs.h>
+#include <asm/arch/udc.h>
+#include <asm/arch/palm-gpio.h>
+
+#include "../generic.h"
+
+static void palm_backlight_power(int on)
+{
+ /**
+ * TODO: check which particular PWM controls the backlight on the
LifeDrive
+ * and enable and disable it here. It's PWM1 on the Tungsten T3. Quite
+ * likely to be the same.
+ */
+}
+
+
+/* USB Device Controller */
+
+static int udc_is_connected(void)
+{
+ return GPLR(GPIO_PALMLD_USB_DETECT) & GPIO_bit(GPIO_PALMLD_USB_DETECT);
+}
+
+static void udc_enable(int cmd)
+{
+ switch (cmd)
+ {
+ case PXA2XX_UDC_CMD_DISCONNECT:
+ printk (KERN_NOTICE "USB cmd disconnect\n");
+ /* SET_X30_GPIO(USB_PUEN, 0); */
+ break;
+
+ case PXA2XX_UDC_CMD_CONNECT:
+ printk (KERN_NOTICE "USB cmd connect\n");
+ /* SET_X30_GPIO(USB_PUEN, 1); */
+ break;
+ }
+}
+static struct pxa2xx_udc_mach_info palm_udc_mach_info = {
+ .udc_is_connected = udc_is_connected,
+ .udc_command = udc_enable,
+};
+
+
+#ifdef CONFIG_MACH_XSCALE_PALMLD /* Palm LifeDrive support */
+static struct pxafb_mach_info palmld_lcd __initdata = {
+ /* pixclock is set by lccr3 below */
+ .pixclock = 0,
+ .xres = 320,
+ .yres = 480,
+ .bpp = 16,
+ .hsync_len = 4,
+ .vsync_len = 1,
+
+ /* fixme: these are the margins PalmOS has set,
+ * they seem to work but could be better.
+ */
+ .left_margin = 31,
+ .right_margin = 3,
+ .upper_margin = 7, //5,
+ .lower_margin = 8, //3,
+
+ .sync = FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT,
+
+ /* fixme: this is a hack, use constants instead. */
+ .lccr0 = 0x7b008f8,
+ .lccr3 = 0x4700004,
+
+ .pxafb_backlight_power = palm_backlight_power,
+};
+
+static void __init palmld_init(void)
+{
+ set_pxa_fb_info( &palmld_lcd );
+ pxa_set_udc_info( &palm_udc_mach_info );
+}
+
+MACHINE_START(XSCALE_PALMLD, "Palm LifeDrive")
+ MAINTAINER("Alex Osborne
(bobofdoom-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx)")
+ BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
+ BOOT_PARAMS(0xa0000100)
+ MAPIO(pxa_map_io)
+ INITIRQ(pxa_init_irq)
+ .timer = &pxa_timer,
+ INIT_MACHINE(palmld_init)
+MACHINE_END
+#endif /* CONFIG_MACH_XSCALE_PALMLD */
diff --exclude=CVS -uNr kernel26/arch/arm/tools/mach-types
kernel26-ld/arch/arm/tools/mach-types
--- kernel26/arch/arm/tools/mach-types 2005-06-24 18:25:44.000000000 +1000
+++ kernel26-ld/arch/arm/tools/mach-types 2005-09-11 19:32:35.454390862
+1000
@@ -2,11 +2,17 @@
#
# This file is linux/arch/arm/tools/mach-types
#
+# Up to date versions of this file can be obtained from:
+#
+# http://www.arm.linux.org.uk/developer/machines/?action=download
+#
# Please do not send patches to this file; it is automatically generated!
# To add an entry into this database, please see Documentation/arm/README,
-# or contact rmk-lFZ/pmaqli7XmaaqVzeoHQ@xxxxxxxxxxxxxxxx
+# or visit:
+#
+# http://www.arm.linux.org.uk/developer/machines/?action=new
#
-# Last update: Fri May 13 20:30:17 2005
+# Last update: Thu Sep 8 01:28:16 2005
#
# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
#
@@ -759,3 +765,87 @@
ds_tiger MACH_DS_TIGER DS_TIGER 751
e310 MACH_E310 E310 752
e330 MACH_E330 E330 753
+rt3000 MACH_RT3000 RT3000 754
+nokia770 MACH_NOKIA770 NOKIA770 755
+pnx0106 MACH_PNX0106 PNX0106
756
+hx21xx MACH_HX21XX HX21XX 757
+faraday MACH_FARADAY FARADAY
758
+sbc9312 MACH_SBC9312 SBC9312
759
+batman MACH_BATMAN BATMAN 760
+jpd201 MACH_JPD201 JPD201 761
+mipsa MACH_MIPSA MIPSA 762
+kacom MACH_KACOM KACOM 763
+swarcocpu MACH_SWARCOCPU SWARCOCPU 764
+swarcodsl MACH_SWARCODSL SWARCODSL 765
+blueangel MACH_BLUEANGEL BLUEANGEL 766
+hairygrama MACH_HAIRYGRAMA HAIRYGRAMA 767
+banff MACH_BANFF BANFF 768
+carmeva MACH_CARMEVA CARMEVA
769
+sam255 MACH_SAM255 SAM255 770
+ppm10 MACH_PPM10 PPM10 771
+edb9315a MACH_EDB9315A EDB9315A 772
+sunset MACH_SUNSET SUNSET 773
+stargate2 MACH_STARGATE2 STARGATE2 774
+intelmote2 MACH_INTELMOTE2 INTELMOTE2 775
+trizeps4 MACH_TRIZEPS4 TRIZEPS4 776
+mainstone2 MACH_MAINSTONE2 MAINSTONE2 777
+ez_ixp42x MACH_EZ_IXP42X EZ_IXP42X 778
+tapwave_zodiac MACH_TAPWAVE_ZODIAC TAPWAVE_ZODIAC 779
+universalmeter MACH_UNIVERSALMETER UNIVERSALMETER 780
+hicoarm9 MACH_HICOARM9 HICOARM9 781
+pnx4008 MACH_PNX4008 PNX4008
782
+kws6000 MACH_KWS6000 KWS6000
783
+portux920t MACH_PORTUX920T PORTUX920T 784
+ez_x5 MACH_EZ_X5 EZ_X5 785
+omap_rudolph MACH_OMAP_RUDOLPH OMAP_RUDOLPH 786
+cpuat91 MACH_CPUAT91 CPUAT91
787
+rea9200 MACH_REA9200 REA9200
788
+acts_pune_sa1110 MACH_ACTS_PUNE_SA1110 ACTS_PUNE_SA1110 789
+ixp425 MACH_IXP425 IXP425 790
+argonplusodyssey MACH_ODYSSEY ODYSSEY 791
+perch MACH_PERCH PERCH 792
+eis05r1 MACH_EIS05R1 EIS05R1
793
+pepperpad MACH_PEPPERPAD PEPPERPAD 794
+sb3010 MACH_SB3010 SB3010 795
+rm9200 MACH_RM9200 RM9200 796
+dma03 MACH_DMA03 DMA03 797
+road_s101 MACH_ROAD_S101 ROAD_S101 798
+iq_nextgen_a MACH_IQ_NEXTGEN_A IQ_NEXTGEN_A 799
+iq_nextgen_b MACH_IQ_NEXTGEN_B IQ_NEXTGEN_B 800
+iq_nextgen_c MACH_IQ_NEXTGEN_C IQ_NEXTGEN_C 801
+iq_nextgen_d MACH_IQ_NEXTGEN_D IQ_NEXTGEN_D 802
+iq_nextgen_e MACH_IQ_NEXTGEN_E IQ_NEXTGEN_E 803
+mallow_at91 MACH_MALLOW_AT91 MALLOW_AT91 804
+cybertracker MACH_CYBERTRACKER CYBERTRACKER 805
+gesbc931x MACH_GESBC931X GESBC931X 806
+centipad MACH_CENTIPAD CENTIPAD 807
+armsoc MACH_ARMSOC ARMSOC 808
+se4200 MACH_SE4200 SE4200 809
+ems197a MACH_EMS197A EMS197A
810
+micro9 MACH_MICRO9 MICRO9 811
+micro9l MACH_MICRO9L MICRO9L
812
+uc5471dsp MACH_UC5471DSP UC5471DSP 813
+sj5471eng MACH_SJ5471ENG SJ5471ENG 814
+none MACH_CMPXA26X CMPXA26X 815
+nc MACH_NC NC 816
+omap_palmte MACH_OMAP_PALMTE OMAP_PALMTE 817
+ajax52x MACH_AJAX52X AJAX52X
818
+siriustar MACH_SIRIUSTAR SIRIUSTAR 819
+iodata_hdlg MACH_IODATA_HDLG IODATA_HDLG 820
+at91rm9200utl MACH_AT91RM9200UTL AT91RM9200UTL 821
+biosafe MACH_BIOSAFE BIOSAFE
822
+mp1000 MACH_MP1000 MP1000 823
+parsy MACH_PARSY PARSY 824
+ccxp270 MACH_CCXP CCXP
825
+omap_gsample MACH_OMAP_GSAMPLE OMAP_GSAMPLE 826
+versatile_eb MACH_VERSATILE_EB VERSATILE_EB 827
+samoa MACH_SAMOA SAMOA 828
+t3xscale MACH_T3XSCALE T3XSCALE 829
+i878 MACH_I878 I878 830
+borzoi MACH_BORZOI BORZOI 831
+gecko MACH_GECKO GECKO 832
+ds101 MACH_DS101 DS101 833
+omap_palmtt2 MACH_OMAP_PALMTT2 OMAP_PALMTT2 834
+xscale_palmld MACH_XSCALE_PALMLD XSCALE_PALMLD 835
+cc9c MACH_CC9C CC9C 836
+sbc1670 MACH_SBC1670 SBC1670
837
diff --exclude=CVS -uNr kernel26/include/asm-arm/arch-pxa/palm-gpio.h
kernel26-ld/include/asm-arm/arch-pxa/palm-gpio.h
--- kernel26/include/asm-arm/arch-pxa/palm-gpio.h 1970-01-01
10:00:00.000000000 +1000
+++ kernel26-ld/include/asm-arm/arch-pxa/palm-gpio.h 2005-09-12
17:02:58.509804869 +1000
@@ -0,0 +1,12 @@
+
+/* Palm LifeDrive GPIOs */
+#define GPIO_PALMLD_USB_DETECT 3
+#define GPIO_PALMLD_POWER_DETECT 4
+
+#define GPIO_PALMLD_HOTSYNC_BUTTON_N 10
+#define GPIO_PALMLD_POWER_SWITCH 11
+
+#define GPIO_PALMLD_EARPHONE_DETECT 13
+
+#define GPIO_PALMLD_LOCK_SWITCH 11 /* keypad lock
*/
+
_______________________________________________
Kernel-discuss mailing list
Kernel-discuss-CN5wO63fgwogsBAKwltoeQ@xxxxxxxxxxxxxxxx
https://handhelds.org/mailman/listinfo/kernel-discuss
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise