|
From: <bob...@us...> - 2007-07-14 08:12:45
|
Revision: 1147
http://svn.sourceforge.net/hackndev/?rev=1147&view=rev
Author: bobofdoom
Date: 2007-07-14 01:12:41 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
PalmT650: USB gadget now works.
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650.c
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650.c 2007-07-14 08:12:10 UTC (rev 1146)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650.c 2007-07-14 08:12:41 UTC (rev 1147)
@@ -1,9 +1,9 @@
/*
* linux/arch/arm/mach-pxa/palmt650/palmt650.c
*
- * Support for the Palm Treo 650.
+ * Support for the Palm Treo 650 PDA phone.
*
- * Author: Alex Osborne <bob...@gm...> 2005-2006
+ * Author: Alex Osborne <bob...@gm...> 2005-2007
* P3T3, Petr Blaha <pb...@p3...> 2007
*
*/
@@ -153,25 +153,25 @@
static int udc_is_connected(void)
{
- return 1111; /* GPLR(GPIO_PALMLD_USB_DETECT) &
- GPIO_bit(GPIO_PALMLD_USB_DETECT); */
+ /* TODO: Implement this. (Check bit 3 of register 0x36 of ASIC6). */
+ /* Note: The current version PXA27x UDC does not actually ever call
+ * udc_is_connected so for the moment this can be left unimplemented.
+ */
+ return 1;
}
static void udc_enable(int cmd)
{
- /**
- * TODO: find the GPIO line which powers up the USB.
- */
switch (cmd)
{
case PXA2XX_UDC_CMD_DISCONNECT:
printk (KERN_NOTICE "USB cmd disconnect\n");
- /* SET_X30_GPIO(USB_PUEN, 0); */
+ SET_PALMT650_GPIO(USB_PULLUP, 1);
break;
case PXA2XX_UDC_CMD_CONNECT:
printk (KERN_NOTICE "USB cmd connect\n");
- /* SET_X30_GPIO(USB_PUEN, 1); */
+ SET_PALMT650_GPIO(USB_PULLUP, 1);
break;
}
}
@@ -190,7 +190,7 @@
.keycodes = {
{ /* row 0 */
KEY_O, /* "O" */
- KEY_DOWN, /* "5-Way Left" */
+ KEY_LEFT, /* "5-Way Left" */
-1, /* "Alternate" */
KEY_L, /* "L" */
KEY_A, /* "A" */
@@ -198,7 +198,7 @@
KEY_LEFTCTRL, /* "Right Shift" */
}, { /* row 1 */
KEY_P, /* "P" */
- KEY_UP, /* "5-Way Right" */
+ KEY_RIGHT, /* "5-Way Right" */
KEY_LEFTSHIFT, /* "Left Shift" */
KEY_Z, /* "Z" */
KEY_S, /* "S" */
@@ -206,7 +206,7 @@
-1, /* "Unused" */
}, { /* row 2 */
-1, /* "Phone" */
- KEY_LEFT, /* "5-Way Up" */
+ KEY_UP, /* "5-Way Up" */
KEY_0, /* "0" */
KEY_X, /* "X" */
KEY_D, /* "D" */
@@ -214,7 +214,7 @@
-1, /* "Unused" */
}, { /* row 3 */
KEY_F10, /* "Calendar" */
- KEY_RIGHT, /* "5-Way Down" */
+ KEY_DOWN, /* "5-Way Down" */
KEY_SPACE, /* "Space" */
KEY_C, /* "C" */
KEY_F, /* "F" */
@@ -347,12 +347,14 @@
GCR &= ~GCR_PRIRDY_IEN;
/* set AC97's GPIOs */
-
pxa_gpio_mode(GPIO28_BITCLK_AC97_MD);
pxa_gpio_mode(GPIO29_SDATA_IN_AC97_MD);
pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD);
pxa_gpio_mode(GPIO31_SYNC_AC97_MD);
+ /* Other GPIOs */
+ pxa_gpio_mode(GPIO_NR_PALMT650_USB_PULLUP_MD);
+
set_pxa_fb_info(&palmt650_lcd);
pxa_set_mci_info(&palmt650_mci_platform_data);
pxa_set_ficp_info(&palmt650_ficp_platform_data);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|