From: <z7...@us...> - 2007-01-08 10:29:24
|
Revision: 742 http://svn.sourceforge.net/hackndev/?rev=742&view=rev Author: z72ka Date: 2007-01-08 02:29:22 -0800 (Mon, 08 Jan 2007) Log Message: ----------- LED, TS via AC97 driver, updated Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c 2007-01-08 10:27:39 UTC (rev 741) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c 2007-01-08 10:29:22 UTC (rev 742) @@ -5,6 +5,7 @@ * Vladimir "Farcaller" Pouzanov <far...@gm...> * Sergey Lapin <sla...@gm...> * Alex Osborne <bob...@gm...> + * Jan Herman <2h...@se...> */ #include <linux/kernel.h> @@ -36,6 +37,7 @@ #include <asm/arch/irda.h> #include <asm/arch/mmc.h> #include <asm/arch/palmz72-gpio.h> +#include <asm/arch/pxa_camera.h> #include <sound/driver.h> #include <sound/core.h> @@ -54,9 +56,14 @@ #define IR_TRANSCEIVER_OFF \ SET_HX4700_GPIO_N(IR_ON, 0) -#define LED_ON SET_GPIO(GPIO_NR_ZIRE72_LED,1) -#define LED_OFF SET_GPIO(GPIO_NR_ZIRE72_LED,0) +/* * LED */ +static struct platform_device palmz72led_device = { + .name = "palmz72-led", + .id = -1, +}; + + static int palmz72_udc_is_connected(void) { int ret = !(GET_GPIO(GPIO_NR_PALMZ72_USB_DETECT)); @@ -90,41 +97,47 @@ * Keypad */ -static struct pxa27x_keyboard_platform_data palmld_kbd_data = { +static struct pxa27x_keyboard_platform_data palmz72_kbd_data = { .nr_rows = 4, .nr_cols = 3, .keycodes = { { /* row 0 */ - -1, /* unused */ - KEY_P, /* Folder */ - KEY_ENTER, /* Nav up */ + KEY_POWER, /* Power KEY */ + KEY_F13, /* Photos */ + KEY_ENTER, /* DPAD Center*/ }, { /* row 1 */ - KEY_T, /* Picture */ - KEY_C, /* Star */ - KEY_M, /* Nav right */ + KEY_F9, /* Calendar*/ + KEY_F10, /* Contacts */ + KEY_F12, /* Media */ }, { /* row 2 */ - KEY_UP, /* Home */ - -1, /* Voice memo */ - KEY_DOWN, /* Nav down */ + KEY_UP, /* D-PAD UP*/ + KEY_V, /* unused */ + KEY_DOWN, /* D-PAD DOWN */ }, { /* row 3 */ - KEY_RIGHT, /* Rotate display */ - KEY_ENTER, /* Nav centre */ - KEY_LEFT, /* Nav left */ + KEY_RIGHT, /* D-PAD RIGHT */ + KEY_S, /* ?? */ + KEY_LEFT, /* D-PAD LEFT */ }, - + { + /* row 4 */ + KEY_5, /* D-PAD RIGHT */ + KEY_6, /* ?? */ + KEY_7, /* D-PAD LEFT */ + }, }, .gpio_modes = { - GPIO_NR_ZIRE72_KP_MKIN0_MD, - GPIO_NR_ZIRE72_KP_MKIN1_MD, - GPIO_NR_ZIRE72_KP_MKIN2_MD, - GPIO_NR_ZIRE72_KP_MKIN3_MD, - GPIO_NR_ZIRE72_KP_MKOUT0_MD, - GPIO_NR_ZIRE72_KP_MKOUT1_MD, - GPIO_NR_ZIRE72_KP_MKOUT2_MD, + GPIO_NR_PALMZ72_KP_MKIN0_MD, + GPIO_NR_PALMZ72_KP_MKIN1_MD, + GPIO_NR_PALMZ72_KP_MKIN2_MD, + GPIO_NR_PALMZ72_KP_MKIN3_MD, + GPIO_NR_PALMZ72_KP_MKOUT0_MD, + GPIO_NR_PALMZ72_KP_MKOUT1_MD, + GPIO_NR_PALMZ72_KP_MKOUT2_MD, + }, }; @@ -132,7 +145,7 @@ .name = "pxa27x-keyboard", .id = -1, .dev = { - .platform_data = &palmld_kbd_data, + .platform_data = &palmz72_kbd_data, }, }; @@ -196,42 +209,46 @@ } - static struct platform_pxa_serial_funcs palmz72_pxa_irda_funcs = { .configure = palmz72_irda_configure, .set_txrx = palmz72_irda_set_txrx, .get_txrx = palmz72_irda_get_txrx, }; -#if 0 /** * AC97 audio controller */ + static pxa2xx_audio_ops_t palmz72_audio_ops = { - /* +/* .startup = palmz72_audio_startup, .shutdown = mst_audio_shutdown, .suspend = mst_audio_suspend, .resume = mst_audio_resume, - */ +*/ }; + + static struct platform_device palmz72_ac97 = { .name = "pxa2xx-ac97", .id = -1, .dev = { .platform_data = &palmz72_audio_ops }, }; -#endif + +#if 0 + /* touchscreen */ + static struct platform_device palmz72_touch = { .name = "wm97xx", .id = -1, }; - +#endif /** * Backlight */ @@ -240,7 +257,7 @@ #define PALMZ72_DEFAULT_INTENSITY 0x7E #define PALMZ72_LIMIT_MASK 0x7F -static struct pxapwmbl_platform_data palmld_backlight_data = { +static struct pxapwmbl_platform_data palmz72_backlight_data = { .pwm = 0, .max_intensity = PALMZ72_MAX_INTENSITY, .default_intensity = PALMZ72_DEFAULT_INTENSITY, @@ -252,15 +269,16 @@ static struct platform_device palmz72_backlight = { .name = "pxapwm-bl", .dev = { - .platform_data = &palmld_backlight_data, + .platform_data = &palmz72_backlight_data, }, }; static struct platform_device *devices[] __initdata = { -// &palmz72_ac97, - &palmz72_touch, + &palmz72_ac97, + //&palmz72_touch, &palmz72_backlight, - &palmz72_keypad, + &palmz72_keypad, + &palmz72led_device, }; /* framebuffer */ @@ -289,18 +307,18 @@ // disable interrupt to prevent WM9712 constantly interrupting the CPU // and preventing the boot process to complete (Thanx Alex & Shadowmite!) + 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); - pxa_gpio_mode(GPIO_NR_ZIRE72_LED_MD); // testing // GPSR(91) = GPIO_bit(91); - LED_ON; switch(palmz72lcd.bpp) { @@ -321,12 +339,13 @@ palmlz72_irda_set_txrx (NULL, PXA_SERIAL_TX); #endif #endif - LED_OFF; +// LED_OFF; } MACHINE_START(PALMZ72, "Palm Zire 72") - /* Maintainer: Vladimir Pouzanov <far...@gm...> */ + /* Maintainer: Vladimir Pouzanov <far...@gm...> */ /* Maintainer: Sergey Lapin <sla...@gm...> */ + /* Maintainer: Jan Herman <2h...@se...> */ .boot_params = 0xa0000100, .phys_io = 0x40000000, .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |