2 * linux/arch/arm/mach-pxa/htcalpine/htcalpine.c
4 * Support for the Intel XScale based Palm PDAs. Only the LifeDrive is
5 * supported at the moment.
7 * Author: Alex Osborne <bobofdoom@gmail.com>
9 * USB stubs based on aximx30.c (Michael Opdenacker)
13 #include <linux/kernel.h>
14 #include <linux/init.h>
15 #include <linux/device.h>
17 #include <linux/platform_device.h>
19 #include <asm/mach-types.h>
20 #include <asm/mach/arch.h>
22 #include <asm/arch/hardware.h>
23 #include <asm/arch/pxafb.h>
24 #include <asm/arch/pxa-regs.h>
25 #include <asm/arch/udc.h>
27 #include <asm/arch/htcalpine-gpio.h>
29 #include "tsc2046_ts.h"
31 #include "../generic.h"
33 #define GPSR_BIT(n) (GPSR((n)) = GPIO_bit((n)))
34 #define GPCR_BIT(n) (GPCR((n)) = GPIO_bit((n)))
36 static struct pxafb_mach_info htcalpine_lcd __initdata
= {
48 // .sync = FB_SYNC_HOR_LOW_ACT|FB_SYNC_VERT_LOW_ACT,
50 /* fixme: this is a hack, use constants instead. */
56 static struct tsc2046_mach_info htcalpine_ts_platform_data
= {
61 .irq
= HTCALPINE_IRQ(TOUCHPANEL_IRQ_N
)
64 static struct platform_device htcalpine_ts
= {
65 .name
= "htcalpine_ts",
67 .platform_data
= &htcalpine_ts_platform_data
,
71 static struct platform_device
*devices
[] __initdata
= {
74 // &htcalpine_pxa_keys,
77 /****************************************************************
78 * USB client controller
79 ****************************************************************/
81 static void udc_command(int cmd
)
85 case PXA2XX_UDC_CMD_DISCONNECT
:
86 printk(KERN_NOTICE
"USB cmd disconnect\n");
87 GPCR_BIT(GPIO_NR_HTCALPINE_USB_PUEN
);
89 case PXA2XX_UDC_CMD_CONNECT
:
90 printk(KERN_NOTICE
"USB cmd connect\n");
91 GPSR_BIT(GPIO_NR_HTCALPINE_USB_PUEN
);
96 static struct pxa2xx_udc_mach_info htcalpine_udc_mach_info
= {
97 .udc_command
= udc_command
,
100 static void __init
htcalpine_init(void)
102 set_pxa_fb_info( &htcalpine_lcd
);
103 platform_add_devices( devices
, ARRAY_SIZE(devices
) );
104 pxa_set_udc_info( &htcalpine_udc_mach_info
);
107 MACHINE_START(HTCALPINE
, "HTC Alpine")
108 .phys_io
= 0x40000000,
109 .io_pg_offst
= io_p2v(0x40000000),
110 .boot_params
= 0xa0000100,
111 .map_io
= pxa_map_io
,
112 .init_irq
= pxa_init_irq
,
114 .init_machine
= htcalpine_init
,