You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(26) |
Sep
(22) |
Oct
(55) |
Nov
(24) |
Dec
(30) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(68) |
Feb
(85) |
Mar
(54) |
Apr
(12) |
May
(52) |
Jun
(75) |
Jul
(116) |
Aug
(71) |
Sep
(54) |
Oct
|
Nov
(2) |
Dec
|
From: <mar...@us...> - 2007-07-17 07:54:23
|
Revision: 1169 http://svn.sourceforge.net/hackndev/?rev=1169&view=rev Author: marex_z71 Date: 2007-07-17 00:54:20 -0700 (Tue, 17 Jul 2007) Log Message: ----------- PalmTX: migrate to corgi_bl Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/configs/palmtx_defconfig linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h Modified: linux4palm/linux/trunk/arch/arm/configs/palmtx_defconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/configs/palmtx_defconfig 2007-07-17 07:23:47 UTC (rev 1168) +++ linux4palm/linux/trunk/arch/arm/configs/palmtx_defconfig 2007-07-17 07:54:20 UTC (rev 1169) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.21-hnd2 -# Sun Jun 24 16:28:21 2007 +# Tue Jul 17 09:33:05 2007 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -50,7 +50,7 @@ CONFIG_SYSFS_DEPRECATED=y # CONFIG_RELAY is not set CONFIG_BLK_DEV_INITRD=y -CONFIG_INITRAMFS_SOURCE="" +# CONFIG_INITRAMFS_SOURCE is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y CONFIG_EMBEDDED=y @@ -184,7 +184,6 @@ # CONFIG_PALMTX_DEBUG is not set CONFIG_PALMTX_BATTERY=m CONFIG_PALMTX_PM=y -# CONFIG_PALMTX_PCMCIA is not set # CONFIG_MACH_PALMZ72 is not set # CONFIG_MACH_OMAP_PALMTC is not set # CONFIG_MACH_ZIRE31 is not set @@ -434,7 +433,6 @@ CONFIG_BT_HCIUART_H4=y # CONFIG_BT_HCIUART_BCSP is not set CONFIG_BT_BCM2035UART=m -# CONFIG_BT_BCM2035UART_DEBUG is not set # CONFIG_BT_HCIVHCI is not set # CONFIG_IEEE80211 is not set @@ -558,6 +556,7 @@ # Wireless LAN (non-hamradio) # # CONFIG_NET_RADIO is not set +# CONFIG_LIBERTAS is not set # # Wan interfaces @@ -732,10 +731,10 @@ # CONFIG_SENSORS_PC87427 is not set # CONFIG_SENSORS_VT1211 is not set # CONFIG_HWMON_DEBUG_CHIP is not set -CONFIG_POWER_SUPPLY=y +CONFIG_POWER_SUPPLY=m # CONFIG_POWER_SUPPLY_DEBUG is not set -CONFIG_PDA_POWER=y -CONFIG_APM_POWER=y +CONFIG_PDA_POWER=m +CONFIG_APM_POWER=m # CONFIG_BATTERY_DS2760 is not set # @@ -767,7 +766,6 @@ # CONFIG_SOC_T7L66XB is not set # CONFIG_SOC_TC6387XB is not set # CONFIG_SOC_TC6393XB is not set -# CONFIG_SOC_TSC2101 is not set # CONFIG_SOC_TSC2200 is not set # @@ -799,8 +797,8 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_LCD_CLASS_DEVICE is not set -# CONFIG_BACKLIGHT_CORGI is not set -CONFIG_BACKLIGHT_PXAPWM=y +CONFIG_BACKLIGHT_CORGI=m +# CONFIG_BACKLIGHT_PXAPWM is not set CONFIG_FB=y CONFIG_FIRMWARE_EDID=y # CONFIG_FB_DDC is not set Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c 2007-07-17 07:23:47 UTC (rev 1168) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c 2007-07-17 07:54:20 UTC (rev 1169) @@ -25,6 +25,7 @@ #include <linux/input.h> #include <linux/delay.h> #include <linux/irq.h> +#include <linux/corgi_bl.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -41,14 +42,11 @@ #include <asm/arch/serial.h> #include <asm/arch/bitfield.h> #include <asm/arch/pxa27x_keyboard.h> -#include <asm/arch/pxapwm-bl.h> +#include <asm/arch/palmtx-init.h> +#include <asm/arch/palmtx-gpio.h> #include "../generic.h" -#include <../drivers/pcmcia/soc_common.h> -#include "asm-arm/arch-pxa/palmtx-init.h" -#include "asm-arm/arch-pxa/palmtx-gpio.h" - #define DEBUG /************************** @@ -157,32 +155,37 @@ * Backlight * *************/ -static void palmtx_bl_on(void){ - SET_GPIO(GPIO_NR_PALMTX_BL_POWER, 1); - mdelay(50); +static void palmtx_bl_power(int on) +{ + SET_PALMTX_GPIO(BL_POWER, on); + pxa_set_cken(CKEN0_PWM0, on); + pxa_set_cken(CKEN1_PWM1, on); + mdelay(50); } -static void palmtx_bl_off(void){ - SET_GPIO(GPIO_NR_PALMTX_BL_POWER, 0); - mdelay(50); +static void palmtx_set_bl_intensity(int intensity) +{ + palmtx_bl_power(intensity ? 1 : 0); + if(intensity) { + PWM_CTRL0 = 0x7; + PWM_PERVAL0 = PALMTX_PERIOD; + PWM_PWDUTY0 = intensity; + } } -static struct pxapwmbl_platform_data palmtx_backlight_data = { - .pwm = 0, - .max_intensity = 0x16c, - .default_intensity = 0xc7, - .limit_mask = 0x6d, - .prescaler = 7, - .period = 0x16c, - .turn_bl_on = palmtx_bl_on, - .turn_bl_off = palmtx_bl_off, +static struct corgibl_machinfo palmtx_bl_machinfo = { + .max_intensity = PALMTX_MAX_INTENSITY, + .default_intensity = PALMTX_MAX_INTENSITY, + .set_bl_intensity = palmtx_set_bl_intensity, + .limit_mask = PALMTX_LIMIT_MASK, }; static struct platform_device palmtx_backlight = { - .name = "pxapwm-bl", - .dev = { - .platform_data = &palmtx_backlight_data, - }, + .name = "corgi-bl", + .id = 0, + .dev = { + .platform_data = &palmtx_bl_machinfo, + }, }; @@ -320,7 +323,7 @@ static pxa2xx_audio_ops_t palmtx_audio_ops = { /* - .startup = palmld_audio_startup, + .startup = palmtx_audio_startup, .shutdown = mst_audio_shutdown, .suspend = mst_audio_suspend, .resume = mst_audio_resume, Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h =================================================================== --- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h 2007-07-17 07:23:47 UTC (rev 1168) +++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h 2007-07-17 07:54:20 UTC (rev 1169) @@ -1,6 +1,4 @@ /* - * $Id$ - * * Init values for Palm TX Handheld Computer * * Authors: Cristiano P. <cristianop AT users DOT sourceforge DOT net> @@ -21,29 +19,23 @@ #define _INCLUDE_PALMTX_INIT_H_ -/* Various addresses */ +/* Various addresses */ #define PALMTX_PHYS_RAM_START 0xa0000000 #define PALMTX_PHYS_IO_START 0x40000000 -// LCD REGISTERS -// -// values as dumped from device +/* LCD REGISTERS */ +#define PALMTX_INIT_LCD_LLC0 LCCR0_ENB | LCCR0_Color | LCCR0_Sngl | LCCR0_LDM | \ + LCCR0_SFM | LCCR0_IUM | LCCR0_EFM | LCCR0_Act | \ + LCCR0_4PixMono | LCCR0_QDM | LCCR0_BM | LCCR0_OUM | \ + LCCR0_RDSTM | LCCR0_CMDIM | LCCR0_OUC | LCCR0_LDDALT -//#define PALMTX_INIT_LCD_LLC0 0x07b008f9 -#define PALMTX_INIT_LCD_LLC0 LCCR0_ENB | LCCR0_Color | LCCR0_Sngl | LCCR0_LDM \ - | LCCR0_SFM | LCCR0_IUM | LCCR0_EFM | LCCR0_Act | LCCR0_4PixMono | \ - LCCR0_QDM | LCCR0_BM | LCCR0_OUM | LCCR0_RDSTM | LCCR0_CMDIM | \ - LCCR0_OUC | LCCR0_LDDALT -#define PALMTX_INIT_LCD_LLC1 0x1f030d3f -#define PALMTX_INIT_LCD_LLC2 0x070801df -//#define PALMTX_INIT_LCD_LLC3 0x04700004 -#define PALMTX_INIT_LCD_LLC3 LCCR3_PixClkDiv(2) | LCCR3_HorSnchL | \ - LCCR3_VrtSnchL | LCCR3_PixFlEdg | LCCR3_OutEnH | LCCR3_Bpp(4) +#define PALMTX_INIT_LCD_LLC3 LCCR3_PixClkDiv(2) | LCCR3_HorSnchL | LCCR3_VrtSnchL | \ + LCCR3_PixFlEdg | LCCR3_OutEnH | LCCR3_Bpp(4) -// KEYPAD configuration +/* KEYPAD configuration */ #define KPASMKP(col) (col/2==0 ? KPASMKP0 : KPASMKP1) #define KPASMKPx_MKC(row, col) (1 << (row + 16*(col%2))) @@ -52,35 +44,29 @@ #define PALMTX_KM_COLS 3 -// TOUCHSCREEN +/* TOUCHSCREEN */ -#define AC97_LINK_FRAME 21 +#define AC97_LINK_FRAME 21 -// BATTERY +/* BATTERY */ -#define PALMTX_BAT_MAX_VOLTAGE 4000 // 4.00v current voltage at max charge as from ZLauncher -#define PALMTX_BAT_MIN_VOLTAGE 3500 // 3.60v critical voltage as from FileZ -#define PALMTX_BAT_MAX_CURRENT 0 // unknokn -#define PALMTX_BAT_MIN_CURRENT 0 // unknown -#define PALMTX_BAT_MAX_CHARGE 1 // unknown -#define PALMTX_BAT_MIN_CHARGE 1 // unknown -#define PALMTX_MAX_LIFE_MINS 360 // on-life in minutes +#define PALMTX_BAT_MAX_VOLTAGE 4000 /* 4.00v current voltage at max charge as from ZLauncher */ +#define PALMTX_BAT_MIN_VOLTAGE 3500 /* 3.60v critical voltage as from FileZ */ +#define PALMTX_BAT_MAX_CURRENT 0 /* unknokn */ +#define PALMTX_BAT_MIN_CURRENT 0 /* unknown */ +#define PALMTX_BAT_MAX_CHARGE 1 /* unknown */ +#define PALMTX_BAT_MIN_CHARGE 1 /* unknown */ +#define PALMTX_MAX_LIFE_MINS 360 /* on-life in minutes */ #define PALMTX_BAT_MEASURE_DELAY (HZ * 1) -// VARIOUS +/* BACKLIGHT */ -#define GET_GPIO(gpio) (GPLR(gpio) & GPIO_bit(gpio)) +#define PALMTX_MAX_INTENSITY 0xFE +#define PALMTX_DEFAULT_INTENSITY 0x7E +#define PALMTX_LIMIT_MASK 0x7F +#define PALMTX_PRESCALER 0x3F +#define PALMTX_PERIOD 0x12C -#define SET_GPIO(gpio, setp) \ - do { \ - if (setp) \ - GPSR(gpio) = GPIO_bit(gpio); \ - else \ - GPCR(gpio) = GPIO_bit(gpio); \ - } while (0) - - - #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-07-17 07:23:49
|
Revision: 1168 http://svn.sourceforge.net/hackndev/?rev=1168&view=rev Author: marex_z71 Date: 2007-07-17 00:23:47 -0700 (Tue, 17 Jul 2007) Log Message: ----------- PalmTC: migrate to corgi-bl Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/configs/palmtc_defconfig linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/palmtc.c Added Paths: ----------- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtc-init.h Modified: linux4palm/linux/trunk/arch/arm/configs/palmtc_defconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/configs/palmtc_defconfig 2007-07-17 04:44:11 UTC (rev 1167) +++ linux4palm/linux/trunk/arch/arm/configs/palmtc_defconfig 2007-07-17 07:23:47 UTC (rev 1168) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.21-hnd2 -# Sun Jul 15 05:05:07 2007 +# Tue Jul 17 09:20:33 2007 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -813,8 +813,8 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_BACKLIGHT_CLASS_DEVICE=m CONFIG_LCD_CLASS_DEVICE=m -# CONFIG_BACKLIGHT_CORGI is not set -CONFIG_BACKLIGHT_PXAPWM=m +CONFIG_BACKLIGHT_CORGI=m +# CONFIG_BACKLIGHT_PXAPWM is not set CONFIG_FB=y CONFIG_FIRMWARE_EDID=y # CONFIG_FB_DDC is not set Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/palmtc.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/palmtc.c 2007-07-17 04:44:11 UTC (rev 1167) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtc/palmtc.c 2007-07-17 07:23:47 UTC (rev 1168) @@ -20,30 +20,20 @@ #include <linux/fb.h> #include <linux/irq.h> #include <linux/delay.h> +#include <linux/corgi_bl.h> #include <asm/arch/pxa2xx_udc_gpio.h> #include <asm/arch/pxa-dmabounce.h> #include <asm/arch/pxafb.h> #include <asm/arch/pxa-regs.h> -#include <asm/arch/pxapwm-bl.h> #include <asm/arch/palmtc-gpio.h> +#include <asm/arch/palmtc-init.h> #include <asm/arch/udc.h> #include "../generic.h" #define DEBUG -static void palmtc_backlight_power(int on) -{ - if(on) { - PWM_CTRL1 = 0x1; - PWM_PWDUTY1 = 0x50; - PWM_PERVAL1 = 0x12b; - CKEN |= CKEN1_PWM1; - } else - CKEN &= ~CKEN1_PWM1; -} - static struct pxafb_mode_info palmtc_lcd_modes[] = { { /* pixclock is set by lccr3 below */ @@ -70,7 +60,7 @@ .lccr0 = 0x07B008F9, .lccr3 = 0x04700003, - .pxafb_backlight_power = palmtc_backlight_power, + .pxafb_backlight_power = NULL, }; static int palmtc_mci_init(struct device *dev, irqreturn_t (*palmtc_detect_int)(int, void *), void *data) @@ -143,16 +133,39 @@ }; /* Backlight ***/ -static struct pxapwmbl_platform_data palmtc_backlight_data = { - .pwm = 1, - .max_intensity = 0x100, - .default_intensity = 0x50, - .limit_mask = 0x7F, - .prescaler = 1, - .period = 0x12B, +static void palmtc_bl_power(int on) +{ +/* SET_PALMTC_GPIO(BL_POWER, on); */ /* to be determined */ + pxa_set_cken(CKEN0_PWM0, on); + pxa_set_cken(CKEN1_PWM1, on); + mdelay(50); +} + +static void palmtc_set_bl_intensity(int intensity) +{ + palmtc_bl_power(intensity ? 1 : 0); + if(intensity) { + PWM_CTRL1 = 0x7; + PWM_PERVAL1 = PALMTC_PERIOD; + PWM_PWDUTY1 = intensity; + } +} + +static struct corgibl_machinfo palmtc_bl_machinfo = { + .max_intensity = PALMTC_MAX_INTENSITY, + .default_intensity = PALMTC_MAX_INTENSITY, + .set_bl_intensity = palmtc_set_bl_intensity, + .limit_mask = PALMTC_LIMIT_MASK, }; + +static struct platform_device palmtc_backlight = { + .name = "corgi-bl", + .id = 0, + .dev = { + .platform_data = &palmtc_bl_machinfo, + }, +}; - static pxa2xx_audio_ops_t palmtc_audio_ops = { /* .startup = palmld_audio_startup, @@ -162,14 +175,6 @@ */ }; -static struct platform_device palmtc_backlight = { - .name = "pxapwm-bl", - .dev = { - .platform_data = &palmtc_backlight_data, - }, -}; - - static struct platform_device palmtc_ac97_device = { .name = "pxa2xx-ac97", .id = -1, Added: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtc-init.h =================================================================== --- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtc-init.h (rev 0) +++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtc-init.h 2007-07-17 07:23:47 UTC (rev 1168) @@ -0,0 +1,41 @@ +/* + * palmtc-init.h + * + * Init values for Palm Tungsten|C Handheld Computer + * + * Author: Marek Vasut <mar...@gm...> + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * + * + */ + +#ifndef _INCLUDE_PALMTC_INIT_H_ + +#define _INCLUDE_PALMTC_INIT_H_ + +/* BACKLIGHT */ + +#define PALMTC_MAX_INTENSITY 0xFE +#define PALMTC_DEFAULT_INTENSITY 0x7E +#define PALMTC_LIMIT_MASK 0x7F +#define PALMTC_PRESCALER 0x3F +#define PALMTC_PERIOD 0x12C + +/* BATTERY */ + +#define PALMTC_BAT_MAX_VOLTAGE 4000 /* 4.00V current voltage at max charge as from PalmOS */ +#define PALMTC_BAT_MIN_VOLTAGE 3550 /* 3.55V critical voltage */ +#define PALMTC_BAT_MAX_CURRENT 0 /* unknokn */ +#define PALMTC_BAT_MIN_CURRENT 0 /* unknown */ +#define PALMTC_BAT_MAX_CHARGE 1 /* unknown */ +#define PALMTC_BAT_MIN_CHARGE 1 /* unknown */ +#define PALMTC_BAT_MEASURE_DELAY (HZ * 1) +#define PALMTC_MAX_LIFE_MINS 240 /* my Tungsten|C on-life in minutes */ + + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-07-17 04:44:13
|
Revision: 1167 http://svn.sourceforge.net/hackndev/?rev=1167&view=rev Author: marex_z71 Date: 2007-07-16 21:44:11 -0700 (Mon, 16 Jul 2007) Log Message: ----------- PalmLD: switch to corgi_bl Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/configs/palmld_defconfig linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmld-init.h Modified: linux4palm/linux/trunk/arch/arm/configs/palmld_defconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/configs/palmld_defconfig 2007-07-17 04:42:39 UTC (rev 1166) +++ linux4palm/linux/trunk/arch/arm/configs/palmld_defconfig 2007-07-17 04:44:11 UTC (rev 1167) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.21-hnd2 -# Thu Jul 12 23:49:34 2007 +# Tue Jul 17 05:31:54 2007 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -974,8 +974,8 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_BACKLIGHT_CLASS_DEVICE=m CONFIG_LCD_CLASS_DEVICE=m -# CONFIG_BACKLIGHT_CORGI is not set -CONFIG_BACKLIGHT_PXAPWM=m +CONFIG_BACKLIGHT_CORGI=m +# CONFIG_BACKLIGHT_PXAPWM is not set CONFIG_FB=y CONFIG_FIRMWARE_EDID=y # CONFIG_FB_DDC is not set Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c 2007-07-17 04:42:39 UTC (rev 1166) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c 2007-07-17 04:44:11 UTC (rev 1167) @@ -16,6 +16,7 @@ #include <linux/delay.h> #include <linux/irq.h> #include <linux/gpio_keys.h> +#include <linux/corgi_bl.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -29,8 +30,8 @@ #include <asm/arch/bitfield.h> #include <asm/arch/irda.h> #include <asm/arch/palmld-gpio.h> +#include <asm/arch/palmld-init.h> #include <asm/arch/pxa27x_keyboard.h> -#include <asm/arch/pxapwm-bl.h> #include <asm/arch/pxa-pm_ll.h> #include <asm/arch/sx2.h> #include <asm/arch/serial.h> @@ -43,24 +44,6 @@ #include "../generic.h" - -static void palmld_backlight_power(int on) -{ - if(on) { - /* setup backlight PWM settings */ - PWM_CTRL0 = 0x7; - PWM_PWDUTY0 = 0x11a; - PWM_PERVAL0 = 0x16c; - - /* turn on PWMs */ - CKEN |= CKEN0_PWM0 | CKEN1_PWM1; - } else { - /* turn off PWMs */ - CKEN &= ~(CKEN0_PWM0 | CKEN1_PWM1); - } -} - - /** * SD/MMC card controller */ @@ -250,20 +233,37 @@ * Backlight */ -static struct pxapwmbl_platform_data palmld_backlight_data = { - .pwm = 0, - .max_intensity = 0xff, - .default_intensity = 0x7f, - .limit_mask = 0x7f, - .prescaler = 1, - .period = 0x12c, +static void palmld_bl_power(int on) +{ +/* SET_PALMLD_GPIO(BL_POWER, on); */ /* to be determined */ + pxa_set_cken(CKEN0_PWM0, on); + pxa_set_cken(CKEN1_PWM1, on); + mdelay(50); +} + +static void palmld_set_bl_intensity(int intensity) +{ + palmld_bl_power(intensity ? 1 : 0); + if(intensity) { + PWM_CTRL0 = 0x7; + PWM_PERVAL0 = PALMLD_PERIOD; + PWM_PWDUTY0 = intensity; + } +} + +static struct corgibl_machinfo palmld_bl_machinfo = { + .max_intensity = PALMLD_MAX_INTENSITY, + .default_intensity = PALMLD_MAX_INTENSITY, + .set_bl_intensity = palmld_set_bl_intensity, + .limit_mask = PALMLD_LIMIT_MASK, }; static struct platform_device palmld_backlight = { - .name = "pxapwm-bl", - .dev = { - .platform_data = &palmld_backlight_data, - }, + .name = "corgi-bl", + .id = 0, + .dev = { + .platform_data = &palmld_bl_machinfo, + }, }; /********************************************************* @@ -411,7 +411,7 @@ .lccr3 = LCCR3_PixClkDiv(2) | LCCR3_HorSnchL | LCCR3_VrtSnchL | LCCR3_PixFlEdg | LCCR3_Bpp(4), - .pxafb_backlight_power = palmld_backlight_power, + .pxafb_backlight_power = NULL, }; Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmld-init.h =================================================================== --- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmld-init.h 2007-07-17 04:42:39 UTC (rev 1166) +++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmld-init.h 2007-07-17 04:44:11 UTC (rev 1167) @@ -18,17 +18,24 @@ #define _INCLUDE_PALMLD_INIT_H_ +/* BACKLIGHT */ -// BATTERY +#define PALMLD_MAX_INTENSITY 0xFE +#define PALMLD_DEFAULT_INTENSITY 0x7E +#define PALMLD_LIMIT_MASK 0x7F +#define PALMLD_PRESCALER 0x3F +#define PALMLD_PERIOD 0x12C -#define PALMLD_BAT_MAX_VOLTAGE 4000 // 4.00V current voltage at max charge as from PalmOS -#define PALMLD_BAT_MIN_VOLTAGE 3550 // 3.55V critical voltage -#define PALMLD_BAT_MAX_CURRENT 0 // unknokn -#define PALMLD_BAT_MIN_CURRENT 0 // unknown -#define PALMLD_BAT_MAX_CHARGE 1 // unknown -#define PALMLD_BAT_MIN_CHARGE 1 // unknown +/* BATTERY */ + +#define PALMLD_BAT_MAX_VOLTAGE 4000 /* 4.00V current voltage at max charge as from PalmOS */ +#define PALMLD_BAT_MIN_VOLTAGE 3550 /* 3.55V critical voltage */ +#define PALMLD_BAT_MAX_CURRENT 0 /* unknokn */ +#define PALMLD_BAT_MIN_CURRENT 0 /* unknown */ +#define PALMLD_BAT_MAX_CHARGE 1 /* unknown */ +#define PALMLD_BAT_MIN_CHARGE 1 /* unknown */ #define PALMLD_BAT_MEASURE_DELAY (HZ * 1) -#define PALMLD_MAX_LIFE_MINS 240 // my LifeDrive on-life in minutes +#define PALMLD_MAX_LIFE_MINS 240 /* my LifeDrive on-life in minutes */ #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-07-17 04:42:42
|
Revision: 1166 http://svn.sourceforge.net/hackndev/?rev=1166&view=rev Author: marex_z71 Date: 2007-07-16 21:42:39 -0700 (Mon, 16 Jul 2007) Log Message: ----------- PalmLD: formating fix Modified Paths: -------------- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmld-gpio.h Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmld-gpio.h =================================================================== --- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmld-gpio.h 2007-07-17 01:07:17 UTC (rev 1165) +++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmld-gpio.h 2007-07-17 04:42:39 UTC (rev 1166) @@ -43,7 +43,7 @@ #define GPIO_NR_PALMLD_LCD_POWER 96 -#define GPIO_NR_PALMLD_KP_MKIN3 97 /* rotate-display, center, left */ +#define GPIO_NR_PALMLD_KP_MKIN3 97 /* rotate-display, center, left */ #define GPIO_NR_PALMLD_IDE_RESET 98 #define GPIO_NR_PALMLD_KP_MKIN0 100 /* folder, up */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2007-07-17 01:07:24
|
Revision: 1165 http://svn.sourceforge.net/hackndev/?rev=1165&view=rev Author: sleep_walker Date: 2007-07-16 18:07:17 -0700 (Mon, 16 Jul 2007) Log Message: ----------- palmtt3: added support for disabling white border Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/Kconfig linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/Kconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/Kconfig 2007-07-16 22:24:42 UTC (rev 1164) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/Kconfig 2007-07-17 01:07:17 UTC (rev 1165) @@ -4,6 +4,12 @@ help This enables support for Palm Tungsten|T3 handheld. +config PALMTT3_DISABLE_BORDER + bool "Disable display border" + depends on MACH_T3XSCALE + help + Some displays can disable white border. This could allow it. This makes screen bigger for 4 pixels in both directions. + config PALMTT3_BUTTONS tristate "Buttons support" depends on MACH_T3XSCALE Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c 2007-07-16 22:24:42 UTC (rev 1164) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c 2007-07-17 01:07:17 UTC (rev 1165) @@ -80,15 +80,26 @@ static struct pxafb_mode_info palmtt3_lcd_modes[] = { { .pixclock = 0, + .bpp = 16, +#ifdef CONFIG_PALMTT3_DISABLE_BORDER + .hsync_len = 6, + .vsync_len = 3, + .xres = 324, + .yres = 484, + .left_margin = 28, + .right_margin = 8, + .upper_margin = 3, + .lower_margin = 6, +#else + .hsync_len = 4, + .vsync_len = 1, .xres = 320, .yres = 480, - .bpp = 16, - .hsync_len = 4, .left_margin = 31, .right_margin = 3, - .vsync_len = 1, .upper_margin = 8, .lower_margin = 7, +#endif .sync = FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, } }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hap...@us...> - 2007-07-16 22:24:49
|
Revision: 1164 http://svn.sourceforge.net/hackndev/?rev=1164&view=rev Author: happy-slapin Date: 2007-07-16 15:24:42 -0700 (Mon, 16 Jul 2007) Log Message: ----------- z72: corgi_bl instead of pxapwm 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-07-16 13:53:09 UTC (rev 1163) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c 2007-07-16 22:24:42 UTC (rev 1164) @@ -31,7 +31,11 @@ #include <asm/arch/pxa-regs.h> #include <asm/arch/pxa27x_keyboard.h> #include <asm/arch/pxa-pm_ll.h> +#if 0 #include <asm/arch/pxapwm-bl.h> +#else +#include <linux/corgi_bl.h> +#endif #include <asm/arch/serial.h> #include <linux/gpio_keys.h> @@ -320,36 +324,22 @@ * Backlight * *************/ -static void palmz72_bl_on(void){ +static void palmz72_bl_on(void) +{ SET_PALMZ72_GPIO(BL_POWER, 1); + pxa_set_cken(CKEN0_PWM0, 1); + pxa_set_cken(CKEN1_PWM1, 1); mdelay(50); } -static void palmz72_bl_off(void){ +static void palmz72_bl_off(void) +{ SET_PALMZ72_GPIO(BL_POWER, 0); + pxa_set_cken(CKEN0_PWM0, 0); + pxa_set_cken(CKEN1_PWM1, 0); mdelay(50); } -static struct pxapwmbl_platform_data palmz72_backlight_data = { - .pwm = 0, - .max_intensity = PALMZ72_MAX_INTENSITY, - .default_intensity = PALMZ72_DEFAULT_INTENSITY, - .limit_mask = PALMZ72_LIMIT_MASK, - .prescaler = PALMZ72_PRESCALER, - .period = PALMZ72_PERIOD, - .turn_bl_on = palmz72_bl_on, - .turn_bl_off = palmz72_bl_off, -}; - -static struct platform_device palmz72_backlight = { - .name = "pxapwm-bl", - .dev = { - .platform_data = &palmz72_backlight_data, - }, -}; - - - /*************** * framebuffer * ***************/ @@ -416,6 +406,36 @@ }; #endif +/* LCD backlight */ + +static void palmz72_set_bl_intensity(int intensity) +{ + if(intensity) { + palmz72_bl_on(); + PWM_CTRL0 = 0x3f; + PWM_PERVAL0 = PALMZ72_PERIOD; + PWM_PWDUTY0 = intensity; + } else { + palmz72_bl_off(); + } +} + +static struct corgibl_machinfo palmz72_bl_machinfo = { + .max_intensity = PALMZ72_MAX_INTENSITY, + .default_intensity = PALMZ72_MAX_INTENSITY, + .set_bl_intensity = palmz72_set_bl_intensity, + .limit_mask = PALMZ72_LIMIT_MASK +}; + +static struct platform_device palmz72_backlight = { + .name = "corgi-bl", + .id = 0, + .dev = { + .platform_data = &palmz72_bl_machinfo, + }, +}; + + /**************** * Init Machine * ****************/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2007-07-16 13:53:12
|
Revision: 1163 http://svn.sourceforge.net/hackndev/?rev=1163&view=rev Author: bobofdoom Date: 2007-07-16 06:53:09 -0700 (Mon, 16 Jul 2007) Log Message: ----------- Cocoboot: Restored correct buf variable. Modified Paths: -------------- cocoboot/trunk/m68k/options.c Modified: cocoboot/trunk/m68k/options.c =================================================================== --- cocoboot/trunk/m68k/options.c 2007-07-16 13:36:17 UTC (rev 1162) +++ cocoboot/trunk/m68k/options.c 2007-07-16 13:53:09 UTC (rev 1163) @@ -85,7 +85,6 @@ { char *p = line; char *key, *value; - char buf[128]; *out_key = *out_value = NULL; @@ -172,6 +171,7 @@ FileRef f; int line_no; char *errmsg, *key, *value; + char buf[2048]; if (!search_file(CONFIG_FILE, &vol, &size)) { return -1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2007-07-16 13:36:32
|
Revision: 1162 http://svn.sourceforge.net/hackndev/?rev=1162&view=rev Author: bobofdoom Date: 2007-07-16 06:36:17 -0700 (Mon, 16 Jul 2007) Log Message: ----------- Cocoboot: Fixed skipping of blank lines and comments in cocoboot.conf. Modified Paths: -------------- cocoboot/trunk/cocoboot.conf.example cocoboot/trunk/m68k/options.c Modified: cocoboot/trunk/cocoboot.conf.example =================================================================== --- cocoboot/trunk/cocoboot.conf.example 2007-07-16 13:08:24 UTC (rev 1161) +++ cocoboot/trunk/cocoboot.conf.example 2007-07-16 13:36:17 UTC (rev 1162) @@ -1,4 +1,4 @@ -# cocoboot.conf.exaple - example configuration file for Cocboot +# cocoboot.conf.exaple - example configuration file for Cocoboot ## cmdline # The value of cmdline is the default kernel command-line. The user can Modified: cocoboot/trunk/m68k/options.c =================================================================== --- cocoboot/trunk/m68k/options.c 2007-07-16 13:08:24 UTC (rev 1161) +++ cocoboot/trunk/m68k/options.c 2007-07-16 13:36:17 UTC (rev 1162) @@ -85,6 +85,7 @@ { char *p = line; char *key, *value; + char buf[128]; *out_key = *out_value = NULL; @@ -94,7 +95,6 @@ key++; if (!*key || *key == '#') return NULL; /* error: empty line or comment */ - /* divide key and value into seperate strings */ while (*p && *p != '=') p++; if (!*p) return "no equals sign found"; @@ -170,7 +170,6 @@ UInt16 vol; UInt32 size; FileRef f; - char buf[2048]; int line_no; char *errmsg, *key, *value; @@ -193,6 +192,8 @@ continue; } + if (!key) continue; /* blank line or comment */ + if (set_option(key, value) < 0) { show_parse_error("unrecognised option", line_no); continue; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2007-07-16 13:08:26
|
Revision: 1161 http://svn.sourceforge.net/hackndev/?rev=1161&view=rev Author: bobofdoom Date: 2007-07-16 06:08:24 -0700 (Mon, 16 Jul 2007) Log Message: ----------- QEMU: Started cleanup of machine code by moving lots of stuff into a common init function. Modified Paths: -------------- qemu/trunk/hw/palm.c Modified: qemu/trunk/hw/palm.c =================================================================== --- qemu/trunk/hw/palm.c 2007-07-16 11:51:01 UTC (rev 1160) +++ qemu/trunk/hw/palm.c 2007-07-16 13:08:24 UTC (rev 1161) @@ -922,31 +922,35 @@ /* Board init. */ -static void ld_init(int ram_size, int vga_ram_size, int boot_device, - DisplayState *ds, const char **fd_filename, int snapshot, - const char *kernel_filename, const char *kernel_cmdline, - const char *initrd_filename) +static struct pxa2xx_state_s *palm_common_init(int mach_no, DisplayState *ds, + const char *cpu_model, int total_mem_size, int ram_size, + int rom_size, const char *kernel_filename, + const char *kernel_cmdline, const char *initrd_filename) { - uint32_t ld_ram = 0x02000000; - uint32_t ld_rom = 0x00080000; - uint32_t ld_ram_int = 0x00040000; - struct pxa2xx_state_s *cpu; + struct pxa2xx_state_s *cpu; + int ram_onchip_size; char *rom_file = getenv("QEMU_ROM"); - cpu = pxa270_init(ram_size, ds, "pxa270-c0"); + if (!strncmp("pxa270", cpu_model, 6)) { + cpu = pxa270_init(ram_size, ds, "pxa270-c0"); + ram_onchip_size = 0x40000; + } else { + cpu = pxa255_init(ram_size, ds); + ram_onchip_size = 0; + } - /* Setup memory */ - if (ram_size < ld_ram + ld_rom + ld_ram_int) { + if (total_mem_size < ram_size + rom_size + ram_onchip_size) { fprintf(stderr, "This platform requires %i bytes of memory\n", - ld_ram + ld_rom + ld_ram_int); - exit(1); + ram_size + rom_size + ram_onchip_size); } - cpu_register_physical_memory(PXA2XX_SDRAM_BASE, ld_ram, IO_MEM_RAM); - cpu_register_physical_memory(0, ld_rom, ld_ram | IO_MEM_ROM); + /* Setup memory */ + cpu_register_physical_memory(PXA2XX_SDRAM_BASE, ram_size, IO_MEM_RAM); + cpu_register_physical_memory(0, rom_size, ram_size | IO_MEM_ROM); + if (ram_onchip_size) + cpu_register_physical_memory(0x5c000000, ram_onchip_size, + (rom_size + ram_size) | IO_MEM_ROM); - cpu_register_physical_memory(0x5c000000, 0x40000, (ld_ram + ld_rom) | IO_MEM_RAM); - int iomemtype = cpu_register_io_memory(0, ac97_readfn, ac97_writefn, NULL); cpu_register_physical_memory(0x40500000, 0x00000fff, iomemtype); @@ -956,68 +960,61 @@ cpu_register_physical_memory(0x41500000, 0x00000fff, iomemtype); + /* Setup peripherals */ ac97_init(); - /* Setup peripherals */ - ld_gpio_setup(cpu); - - /* A 4.0 GB microdrive is permanently sitting in CF slot 0 */ - ld_microdrive_attach(cpu); - /* Setup initial (reset) machine state */ cpu->env->regs[15] = PXA2XX_SDRAM_BASE; if (rom_file) cpu->env->regs[15] = 0; - memset(phys_ram_base, 0, ld_ram); - memset(phys_ram_base + ld_ram, 0, ld_rom); + memset(phys_ram_base, 0, ram_size); + memset(phys_ram_base + ram_size, 0, rom_size); if (rom_file) - load_image(rom_file, phys_ram_base + ld_ram); - - arm_load_kernel(cpu->env, ld_ram, kernel_filename, kernel_cmdline, - initrd_filename, 835, PXA2XX_SDRAM_BASE); + load_image(rom_file, phys_ram_base + ram_size); + else + arm_load_kernel(cpu->env, ram_size, kernel_filename, kernel_cmdline, + initrd_filename, mach_no, PXA2XX_SDRAM_BASE); + return cpu; } -static void t650_init(int ram_size, int vga_ram_size, int boot_device, + +static void ld_init(int ram_size, int vga_ram_size, int boot_device, DisplayState *ds, const char **fd_filename, int snapshot, const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename) { - uint32_t t650_ram = 0x02000000; - uint32_t t650_rom = 0x00000000; - uint32_t t650_ram_int = 0x00040000; - struct pxa2xx_state_s *cpu; + struct pxa2xx_state_s *cpu; - cpu = pxa270_init(ram_size, ds, "pxa270-c0"); + cpu = palm_common_init(835, ds, "pxa270-c0", ram_size, 0x02000000, + 0x00080000, kernel_filename, + kernel_cmdline, initrd_filename); - /* Setup memory */ - if (ram_size < t650_ram + t650_rom + t650_ram_int) { - fprintf(stderr, "This platform requires %i bytes of memory\n", - t650_ram + t650_rom); - exit(1); - } - cpu_register_physical_memory(PXA2XX_SDRAM_BASE, t650_ram, IO_MEM_RAM); + /* Setup peripherals */ + ld_gpio_setup(cpu); - //cpu_register_physical_memory(0, t650_rom, t650_ram | IO_MEM_ROM); + /* A 4.0 GB microdrive is permanently sitting in CF slot 0 */ + ld_microdrive_attach(cpu); - cpu_register_physical_memory(0x5c000000, 0x40000, (t650_ram + t650_rom) | IO_MEM_RAM); +} + +static void t650_init(int ram_size, int vga_ram_size, int boot_device, + DisplayState *ds, const char **fd_filename, int snapshot, + const char *kernel_filename, const char *kernel_cmdline, + const char *initrd_filename) +{ + struct pxa2xx_state_s *cpu; + + cpu = palm_common_init(909, ds, "pxa270-c0", ram_size, 0x02000000, + 0x00080000, kernel_filename, kernel_cmdline, + initrd_filename); + /* Setup peripherals */ ld_gpio_setup(cpu); // FIXME: write t650 gpio func - /* Setup initial (reset) machine state */ - //cpu->env->regs[15] = 0; - cpu->env->regs[15] = PXA2XX_SDRAM_BASE; - //mdoc_init(); - - //memset(phys_ram_base + t650_ram, 0, t650_rom); - //load_image("palmt650.rom", phys_ram_base + t650_ram); - - arm_load_kernel(cpu->env, t650_ram, kernel_filename, kernel_cmdline, - initrd_filename, 909, PXA2XX_SDRAM_BASE); - } static void t680_init(int ram_size, int vga_ram_size, int boot_device, @@ -1025,49 +1022,13 @@ const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename) { - uint32_t t680_ram = 0x02000000; - uint32_t t680_rom = 0x02000000; - uint32_t t680_ram_int = 0x00040000; struct pxa2xx_state_s *cpu; - cpu = pxa270_init(ram_size, ds, "pxa270-c5"); - - /* Setup memory */ - if (ram_size < t680_ram + t680_rom + t680_ram_int) { - fprintf(stderr, "This platform requires %i bytes of memory\n", - t680_ram + t680_rom); - exit(1); - } - - cpu_register_physical_memory(PXA2XX_SDRAM_BASE, t680_ram, IO_MEM_RAM); - - cpu_register_physical_memory(0, t680_rom, t680_ram | IO_MEM_ROM); - - int iomemtype = cpu_register_io_memory(0, ac97_readfn, - ac97_writefn, NULL); - cpu_register_physical_memory(0x40500000, 0x00000fff, iomemtype); - - iomemtype = cpu_register_io_memory(0, key_readfn, - key_writefn, cpu); - cpu_register_physical_memory(0x41500000, 0x00000fff, iomemtype); - - ac97_init(); - + cpu = palm_common_init(1230, ds, "pxa270-c5", ram_size, 0x02000000, + 0x02000000, kernel_filename, kernel_cmdline, + initrd_filename); /* Setup peripherals */ t680_gpio_setup(cpu); - - /* Setup initial (reset) machine state */ - //cpu->env->regs[15] = 0; - cpu->env->regs[15] = PXA2XX_SDRAM_BASE; - - //mdoc_init(); - - memset(phys_ram_base + t680_ram, 0, t680_rom); - //load_image("../../BOOTROM/palmt680.rom", phys_ram_base + t680_ram); - - arm_load_kernel(cpu->env, t680_ram, kernel_filename, kernel_cmdline, - initrd_filename, 909, PXA2XX_SDRAM_BASE); - } static void tc_init(int ram_size, int vga_ram_size, int boot_device, @@ -1075,46 +1036,14 @@ const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename) { - uint32_t tc_ram = 0x04000000; - uint32_t tc_rom = 0x01000000; struct pxa2xx_state_s *cpu; - cpu = pxa255_init(ram_size, ds); - - /* Setup memory */ - if (ram_size < tc_ram + tc_rom) { - fprintf(stderr, "This platform requires %i bytes of memory\n", - tc_ram + tc_rom); - exit(1); - } - cpu_register_physical_memory(PXA2XX_SDRAM_BASE, tc_ram, IO_MEM_RAM); - - cpu_register_physical_memory(0, tc_rom, tc_ram | IO_MEM_ROM); - - int iomemtype = cpu_register_io_memory(0, ac97_readfn, - ac97_writefn, NULL); - cpu_register_physical_memory(0x40500000, 0x00000fff, iomemtype); - - iomemtype = cpu_register_io_memory(0, key_readfn, - key_writefn, cpu); - cpu_register_physical_memory(0x41500000, 0x00000fff, iomemtype); - - ac97_init(); - + cpu = palm_common_init(918, ds, "pxa255", ram_size, 0x04000000, + 0x01000000, kernel_filename, kernel_cmdline, + initrd_filename); + /* Setup peripherals */ tc_gpio_setup(cpu); - - /* Setup initial (reset) machine state */ - cpu->env->regs[15] = 0; - cpu->env->regs[15] = PXA2XX_SDRAM_BASE; - - memset(phys_ram_base, 0, tc_ram); - memset(phys_ram_base + tc_ram, 0, tc_rom); - //load_image("../../BOOTROM/palmtc.rom", phys_ram_base + tc_ram); - - arm_load_kernel(cpu->env, tc_ram, kernel_filename, kernel_cmdline, - initrd_filename, 918 /* THIS IS ARM_ID!! */ , PXA2XX_SDRAM_BASE); - } static void z72_init(int ram_size, int vga_ram_size, int boot_device, @@ -1122,50 +1051,14 @@ const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename) { - uint32_t z72_ram = 0x02000000; - uint32_t z72_rom = 0x01000000; - uint32_t z72_ram_int = 0x00040000; struct pxa2xx_state_s *cpu; - cpu = pxa270_init(ram_size, ds, "pxa270-c0"); - - /* Setup memory */ - if (ram_size < z72_ram + z72_rom + z72_ram_int) { - fprintf(stderr, "This platform requires %i bytes of memory\n", - z72_ram + z72_rom + z72_ram_int); - exit(1); - } - cpu_register_physical_memory(PXA2XX_SDRAM_BASE, z72_ram, IO_MEM_RAM); - - cpu_register_physical_memory(0, z72_rom, z72_ram | IO_MEM_ROM); - - cpu_register_physical_memory(0x5c000000, 0x40000, (z72_ram + z72_rom) | IO_MEM_RAM); - - int iomemtype = cpu_register_io_memory(0, ac97_readfn, - ac97_writefn, NULL); - cpu_register_physical_memory(0x40500000, 0x00000fff, iomemtype); - - iomemtype = cpu_register_io_memory(0, key_readfn, - key_writefn, cpu); - cpu_register_physical_memory(0x41500000, 0x00000fff, iomemtype); - - - ac97_init(); - + cpu = palm_common_init(904, ds, "pxa270-c0", ram_size, 0x02000000, + 0x01000000, kernel_filename, kernel_cmdline, + initrd_filename); + /* Setup peripherals */ z72_gpio_setup(cpu); - - /* Setup initial (reset) machine state */ -// cpu->env->regs[15] = 0; - cpu->env->regs[15] = PXA2XX_SDRAM_BASE; - - memset(phys_ram_base, 0, z72_ram); - memset(phys_ram_base + z72_ram, 0, z72_rom); -// load_image("../../BOOTROM/palmz72.rom", phys_ram_base + z72_ram); - - arm_load_kernel(cpu->env, z72_ram, kernel_filename, kernel_cmdline, - initrd_filename, 904, PXA2XX_SDRAM_BASE); - } static void tx_init(int ram_size, int vga_ram_size, int boot_device, @@ -1173,50 +1066,14 @@ const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename) { - uint32_t tx_ram = 0x02000000; - uint32_t tx_rom = 0x02000000; - uint32_t tx_ram_int = 0x00040000; struct pxa2xx_state_s *cpu; - cpu = pxa270_init(ram_size, ds, "pxa270-c5"); - - /* Setup memory */ - if (ram_size < tx_ram + tx_rom + tx_ram_int) { - fprintf(stderr, "This platform requires %i bytes of memory\n", - tx_ram + tx_rom + tx_ram_int); - exit(1); - } - cpu_register_physical_memory(PXA2XX_SDRAM_BASE, tx_ram, IO_MEM_RAM); - - cpu_register_physical_memory(0, tx_rom, tx_ram | IO_MEM_ROM); - - cpu_register_physical_memory(0x5c000000, 0x40000, (tx_ram + tx_rom) | IO_MEM_RAM); - - int iomemtype = cpu_register_io_memory(0, ac97_readfn, - ac97_writefn, NULL); - cpu_register_physical_memory(0x40500000, 0x00000fff, iomemtype); - - iomemtype = cpu_register_io_memory(0, key_readfn, - key_writefn, cpu); - cpu_register_physical_memory(0x41500000, 0x00000fff, iomemtype); - - - ac97_init(); - + cpu = palm_common_init(885, ds, "pxa270-c5", ram_size, 0x02000000, + 0x02000000, kernel_filename, kernel_cmdline, + initrd_filename); + /* Setup peripherals */ tx_gpio_setup(cpu); - - /* Setup initial (reset) machine state */ -// cpu->env->regs[15] = 0; - cpu->env->regs[15] = PXA2XX_SDRAM_BASE; - - memset(phys_ram_base, 0, tx_ram); - memset(phys_ram_base + tx_ram, 0, tx_rom); -// load_image("../../BOOTROM/palmtx.rom", phys_ram_base + tx_ram); -// - arm_load_kernel(cpu->env, tx_ram, kernel_filename, kernel_cmdline, - initrd_filename, 885, PXA2XX_SDRAM_BASE); - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2007-07-16 11:51:05
|
Revision: 1160 http://svn.sourceforge.net/hackndev/?rev=1160&view=rev Author: bobofdoom Date: 2007-07-16 04:51:01 -0700 (Mon, 16 Jul 2007) Log Message: ----------- Cocoboot: Added ability to read a config file from memory card. Name the file "cocoboot.conf" and place it in the root directory. See the file cocboot.conf.example to see the syntax and what options are available. Modified Paths: -------------- cocoboot/trunk/Changelog cocoboot/trunk/include/imgloader.h cocoboot/trunk/m68k/Makefile cocoboot/trunk/m68k/cocoboot.c cocoboot/trunk/m68k/mainform.c Added Paths: ----------- cocoboot/trunk/cocoboot.conf.example cocoboot/trunk/include/options.h cocoboot/trunk/m68k/options.c Modified: cocoboot/trunk/Changelog =================================================================== --- cocoboot/trunk/Changelog 2007-07-16 00:05:34 UTC (rev 1159) +++ cocoboot/trunk/Changelog 2007-07-16 11:51:01 UTC (rev 1160) @@ -1,4 +1,5 @@ - - Added compile option for skipping prompts. + - Added reading of a config file. + - Added option for skipping prompts. version 0.3: - Added overflow-buffer as last resort to allocation problem (slapin's idea) Added: cocoboot/trunk/cocoboot.conf.example =================================================================== --- cocoboot/trunk/cocoboot.conf.example (rev 0) +++ cocoboot/trunk/cocoboot.conf.example 2007-07-16 11:51:01 UTC (rev 1160) @@ -0,0 +1,32 @@ +# cocoboot.conf.exaple - example configuration file for Cocboot + +## cmdline +# The value of cmdline is the default kernel command-line. The user can +# edit this via the GUI unless noprompt is enabled. +# +# Default: [blank] + +cmdline = root=/dev/mmcblk0p1 + +## kernel +# Filename of the kernel zImage. Cocoboot will look for this file on all +# attached VFS disks. +# +# Defaut: /zImage + +kernel = /zImage-2.6.21 + +## initrd +# Filename of the initrd or initramfs ramdisk image. +# +# Default: /initrd.gz + +initrd = /initramfs_cpio.gz + +## noprompt +# When this option is 1, Cocoboot will not prompt for the kernel +# command-line and will instead boot Linux immediately when it is started. +# +# Default: 0 + +noprompt = 0 Modified: cocoboot/trunk/include/imgloader.h =================================================================== --- cocoboot/trunk/include/imgloader.h 2007-07-16 00:05:34 UTC (rev 1159) +++ cocoboot/trunk/include/imgloader.h 2007-07-16 11:51:01 UTC (rev 1160) @@ -1,3 +1,3 @@ Int32 search_image(char *name, char *loc, UInt16 loc_len, UInt32 *size); Int32 load_image(char *name, UInt32 size, UInt16 vol_ref, void *buffer); - +int search_file(char *name, UInt16 *vol_ref, UInt32 *size); Added: cocoboot/trunk/include/options.h =================================================================== --- cocoboot/trunk/include/options.h (rev 0) +++ cocoboot/trunk/include/options.h 2007-07-16 11:51:01 UTC (rev 1160) @@ -0,0 +1,9 @@ +#ifndef _OPTIONS_H_ +#define _OPTIONS_H_ + +#define CONFIG_FILE "/cocoboot.conf" + +char *get_option(char *key); +int set_option(char *key, char *value); +int read_config(void); +#endif Modified: cocoboot/trunk/m68k/Makefile =================================================================== --- cocoboot/trunk/m68k/Makefile 2007-07-16 00:05:34 UTC (rev 1159) +++ cocoboot/trunk/m68k/Makefile 2007-07-16 11:51:01 UTC (rev 1160) @@ -2,7 +2,7 @@ CFLAGS = -Wall -O -s -I../include ${DEFINES} LDFLAGS = -static LIBS=-L/software/apps/prc-tools/sdks/sdk-5r3/lib/m68k-palmos-coff/ -lPalmOSGlue -OBJS = cocoboot.o mainform.o mem.o cpu.o imgloader.o mach.o +OBJS = cocoboot.o mainform.o mem.o cpu.o imgloader.o mach.o options.o cocoboot.m68k: $(OBJS) Modified: cocoboot/trunk/m68k/cocoboot.c =================================================================== --- cocoboot/trunk/m68k/cocoboot.c 2007-07-16 00:05:34 UTC (rev 1159) +++ cocoboot/trunk/m68k/cocoboot.c 2007-07-16 11:51:01 UTC (rev 1160) @@ -26,6 +26,7 @@ #include <VFSMgr.h> #include "cocoboot.h" +#include "options.h" #include "cocoboot_r.h" #include "mainform.h" @@ -398,7 +399,7 @@ UInt16 start_app() { - + read_config(); arm_stack[0] = 0; FrmGotoForm(MainForm); Modified: cocoboot/trunk/m68k/mainform.c =================================================================== --- cocoboot/trunk/m68k/mainform.c 2007-07-16 00:05:34 UTC (rev 1159) +++ cocoboot/trunk/m68k/mainform.c 2007-07-16 11:51:01 UTC (rev 1160) @@ -6,6 +6,7 @@ #include "mem.h" #include "regs.h" #include "imgloader.h" +#include "options.h" #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -270,10 +271,10 @@ char *cmdline; log_clear(); - kernel_size = load_parts(0, "/zImage", &kernel); + kernel_size = load_parts(0, get_option("kernel"), &kernel); if(kernel_size) { if(use_initrd) { - initrd_size = load_parts(1, "/initrd.gz", &initrd); + initrd_size = load_parts(1, get_option("initrd"), &initrd); } if(!use_initrd || initrd_size) { @@ -372,7 +373,7 @@ cmdline_p = FrmGetObjectPtr(form, FrmGetObjectIndex(form, CommandLine)); cmdline_th = MemHandleNew(size); cmdline_tp = MemHandleLock(cmdline_th); - StrCopy(cmdline_tp, " "); /* default value */ + StrCopy(cmdline_tp, get_option("cmdline")); /* default value */ //PrefGetAppPreferences ('CcBt', 1, cmdline_tp, &size, true); MemHandleUnlock(cmdline_th); FldSetTextHandle(cmdline_p, cmdline_th); @@ -381,13 +382,13 @@ FrmDrawForm(form); handled = true; - kernel_ok = check_image("/zImage"); - use_initrd = check_image("/initrd.gz"); + kernel_ok = check_image(get_option("kernel")); + use_initrd = check_image(get_option("initrd")); + + /* boot immediately if in noprompt mode */ + if (atoi(get_option("noprompt")) != 0 && kernel_ok) + boot_linux(); -#ifdef NOPROMPT_MODE - if (kernel_ok) boot_linux(); -#endif - } else if (event->eType == menuEvent) { return mainform_menu_event(event->data.menu.itemID); } Added: cocoboot/trunk/m68k/options.c =================================================================== --- cocoboot/trunk/m68k/options.c (rev 0) +++ cocoboot/trunk/m68k/options.c 2007-07-16 11:51:01 UTC (rev 1160) @@ -0,0 +1,202 @@ +/* + * This program is free software ; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include <PalmOS.h> +#include <VFSMgr.h> +#include <ctype.h> +#include <stdio.h> +#include <string.h> +#include "cocoboot.h" +#include "options.h" +#include "imgloader.h" +#include "cocoboot_r.h" + +struct option { + char key[1024]; + char value[1024]; +} options[] = { + { + .key = "cmdline", + .value = " ", + }, + { + .key = "kernel", + .value = "/zImage", + }, + { + .key = "initrd", + .value = "/initrd.gz", + }, + { + .key = "noprompt", + .value = "0", + }, + { + .key = "", /* sentinal */ + }, +}; + +//int search_file(char *name, UInt16 *vol_ref, UInt32 *size); + +/** + * Read a single line from file f into the given buffer, stripping linefeeds. + */ +Err read_line(FileRef f, char *buf, int buflen) +{ + Err err; + char c; + int i; + + for (i=0; i<buflen; i++) { + err = VFSFileRead(f, 1, &c, NULL); + if (err != errNone) { + return err; + } + + if (c == '\n') { + buf[i] = 0; + break; + } + + if (c == '\r') { + continue; + } + + buf[i] = c; + } + return errNone; +} + +char *parse_config_line(char *line, char **out_key, char **out_value) +{ + char *p = line; + char *key, *value; + + *out_key = *out_value = NULL; + + /* skip whitespace at the start of the key */ + key = line; + while (*key && isspace(*key)) + key++; + if (!*key || *key == '#') return NULL; /* error: empty line or comment */ + + + /* divide key and value into seperate strings */ + while (*p && *p != '=') p++; + if (!*p) return "no equals sign found"; + *p = 0; + value = p + 1; + + /* work backwards to find the end of the key, again skipping spaces */ + p--; + while (p >= line && *p && isspace(*p)) + p--; + if (p < line) return "empty key"; + p++; + *p = 0; + + /* strip whitespace at the start of the value */ + while (*value && isspace(*value)) + value++; + if (!*value) return "empty value"; + p = value; + + /* find end of value */ + while (*p) p++; + p--; + + /* work backwards to find end of value, again skipping spaces */ + while (p >= value && *p && isspace(*p)) + p--; + p++; + *p = 0; + + *out_key = key; + *out_value = value; + return NULL; +} + +void show_parse_error(char *errmsg, int line_no) +{ + char s_line_no[128]; + sprintf(s_line_no, "\nLine %d of " CONFIG_FILE, line_no); + FrmCustomAlert(ErrorAlert, "Parse Error: ", errmsg, s_line_no); +} + +int set_option(char *key, char *value) +{ + struct option *opt = &options[0]; + + while (opt->key[0]) { + if (!strcmp(key, opt->key)) { + strncpy(opt->value, value, sizeof(opt->value)-1); + return 0; + } + opt++; + } + return -1; +} + +char *get_option(char *key) +{ + struct option *opt = &options[0]; + + while (opt->key[0]) { + if (!strcmp(key, opt->key)) { + return opt->value; + } + opt++; + } + return NULL; +} + +int read_config(void) +{ + Err err; + UInt16 vol; + UInt32 size; + FileRef f; + char buf[2048]; + int line_no; + char *errmsg, *key, *value; + + if (!search_file(CONFIG_FILE, &vol, &size)) { + return -1; + } + + err = VFSFileOpen(vol, CONFIG_FILE, vfsModeRead, &f); + if (err != errNone) { + return err; + } + + for (line_no = 1; 1; line_no++) { + err = read_line(f, buf, sizeof(buf)-1); + if (err != errNone) break; + + + if ((errmsg=parse_config_line(buf, &key, &value))) { + show_parse_error(errmsg, line_no); + continue; + } + + if (set_option(key, value) < 0) { + show_parse_error("unrecognised option", line_no); + continue; + } + } + return 0; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-07-16 00:05:55
|
Revision: 1159 http://svn.sourceforge.net/hackndev/?rev=1159&view=rev Author: keddar Date: 2007-07-15 17:05:34 -0700 (Sun, 15 Jul 2007) Log Message: ----------- palmtt3: change lccr0 and lccr3 value from static to LCCRman's Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtt3-init.h Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c 2007-07-15 22:44:11 UTC (rev 1158) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c 2007-07-16 00:05:34 UTC (rev 1159) @@ -20,6 +20,7 @@ #include <linux/device.h> #include <linux/fb.h> +#include <asm/arch/bitfield.h> #include <asm/arch/hardware.h> #include <asm/arch/pxa-dmabounce.h> #include <asm/arch/pxafb.h> @@ -95,8 +96,8 @@ static struct pxafb_mach_info palmtt3_lcd_screen = { .modes = palmtt3_lcd_modes, .num_modes = ARRAY_SIZE(palmtt3_lcd_modes), - .lccr0 = PALMTT3_INIT_LCD_LLC0, - .lccr3 = PALMTT3_INIT_LCD_LLC3, + .lccr0 = PALMTT3_INIT_LCD_LCCR0, + .lccr3 = PALMTT3_INIT_LCD_LCCR3, .pxafb_backlight_power = &palmtt3_pxafb_backlight_power, .pxafb_lcd_power = &palmtt3_pxafb_lcd_power, }; Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtt3-init.h =================================================================== --- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtt3-init.h 2007-07-15 22:44:11 UTC (rev 1158) +++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtt3-init.h 2007-07-16 00:05:34 UTC (rev 1159) @@ -11,8 +11,8 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * - * initial release - * + * - initial release + * - change lccr0 and lccr3 value from static to LCCRman's */ #ifndef _INCLUDE_PALMTT3_INIT_H_ @@ -44,18 +44,19 @@ // LCD REGISTERS +/* // static value -#define PALMTT3_INIT_LCD_LLC0 0x003008F9 -#define PALMTT3_INIT_LCD_LLC3 0x03700002 +#define PALMTT3_INIT_LCD_LCCR0 0x003008F9 +#define PALMTT3_INIT_LCD_LCCR3 0x03700002 +*/ -/* -// value converted using LCCRman, not work for me -#define PALMTT3_INIT_LCD_LLC0 LCCR0_ENB | LCCR0_Color | LCCR0_Sngl | LCCR0_LDM \ +// value converted using LCCRman +#define PALMTT3_INIT_LCD_LCCR0 LCCR0_ENB | LCCR0_Color | LCCR0_Sngl | LCCR0_LDM \ | LCCR0_SFM | LCCR0_IUM | LCCR0_EFM | LCCR0_Act | LCCR0_4PixMono | \ LCCR0_QDM | LCCR0_BM | LCCR0_OUM -#define PALMTT3_INIT_LCD_LLC3 LCCR3_PixClkDiv(2) | LCCR3_HorSnchL \ +#define PALMTT3_INIT_LCD_LCCR3 LCCR3_PixClkDiv(2) | LCCR3_HorSnchL \ | LCCR3_VrtSnchL | LCCR3_PixFlEdg | LCCR3_OutEnH | LCCR3_Bpp(3) -*/ + #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-07-15 22:44:13
|
Revision: 1158 http://svn.sourceforge.net/hackndev/?rev=1158&view=rev Author: keddar Date: 2007-07-15 15:44:11 -0700 (Sun, 15 Jul 2007) Log Message: ----------- palmtt3: move some value to palmtt3-init.h Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3_battery.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c 2007-07-15 22:42:36 UTC (rev 1157) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c 2007-07-15 22:44:11 UTC (rev 1158) @@ -3,7 +3,7 @@ * * Author: * Vladimir "Farcaller" Pouzanov <far...@gm...> - * + * * Based on Palm LD patch by Alex Osborne * */ @@ -40,6 +40,7 @@ #include <asm/arch/pxa-pm_ll.h> #include <asm/arch/pxapwm-bl.h> #include <asm/arch/palmtt3-gpio.h> +#include <asm/arch/palmtt3-init.h> #include <asm/arch/tps65010.h> //#include "palmtt3_bt.h" @@ -94,11 +95,10 @@ static struct pxafb_mach_info palmtt3_lcd_screen = { .modes = palmtt3_lcd_modes, .num_modes = ARRAY_SIZE(palmtt3_lcd_modes), - .lccr0 = 0x003008F9, - .lccr3 = 0x03700002, - + .lccr0 = PALMTT3_INIT_LCD_LLC0, + .lccr3 = PALMTT3_INIT_LCD_LLC3, .pxafb_backlight_power = &palmtt3_pxafb_backlight_power, - .pxafb_lcd_power = &palmtt3_pxafb_lcd_power, + .pxafb_lcd_power = &palmtt3_pxafb_lcd_power, }; /*** SSP ***/ @@ -109,7 +109,7 @@ printk(KERN_WARNING "palmtt3_tsc2101: Resetting SSP, move this to garux?\n"); SSCR0 &= ~SSCR0_SSE; SSCR1 = SSCR1 & 0x3FFC; - + if (ssp_init(&palmtt3_ssp_dev, 1, 0)) printk(KERN_ERR "palmtt3_tsc2101: Unable to register SSP handler!\n"); else { @@ -125,14 +125,14 @@ void palmtt3_ssp_suspend(void) { ssp_disable(&palmtt3_ssp_dev); - ssp_save_state(&palmtt3_ssp_dev,&ssp1); + ssp_save_state(&palmtt3_ssp_dev,&ssp1); // FIXME power off TSC2101? } void palmtt3_ssp_resume(void) { // FIXME power on TSC2101? - ssp_restore_state(&palmtt3_ssp_dev,&ssp1); + ssp_restore_state(&palmtt3_ssp_dev,&ssp1); ssp_enable(&palmtt3_ssp_dev); } @@ -143,9 +143,9 @@ u32 ret; int i; - + GPCR0 = GPIO_bit(PALMTT3_GPIO_TSC2101_SS); - + ssp_write_word(&palmtt3_ssp_dev, command | read); ssp_read_word(&palmtt3_ssp_dev, &ret); /* Dummy read */ @@ -161,10 +161,10 @@ GPSR0 = GPIO_bit(PALMTT3_GPIO_TSC2101_SS); } -static int palmtt3_tsc2101_pendown(void) +static int palmtt3_tsc2101_pendown(void) { // FIXME PALMT3_GPIO_PENDOWN - if ((GPLR(PALMTT3_GPIO_PENDOWN) & GPIO_bit(PALMTT3_GPIO_PENDOWN)) == 0) + if ((GPLR(PALMTT3_GPIO_PENDOWN) & GPIO_bit(PALMTT3_GPIO_PENDOWN)) == 0) return 1; return 0; } @@ -194,11 +194,11 @@ /* Backlight ***/ static struct pxapwmbl_platform_data palmtt3_backlight_data = { .pwm = 1, - .max_intensity = 0x100, - .default_intensity = 0x50, - .limit_mask = 0x7F, - .prescaler = 1, - .period = 0x12B, + .max_intensity = PALMTT3_MAX_INTENSITY, + .default_intensity = PALMTT3_DEFAULT_INTENSITY, + .limit_mask = PALMTT3_LIMIT_MASK, + .prescaler = PALMTT3_PRESCALER, + .period = PALMTT3_PERIOD, }; /*** LEDs ***/ @@ -223,7 +223,7 @@ if (mode & IR_SIRMODE){ printk ("IrDA: setting mode to SIR\n"); - } + } else if (mode & IR_FIRMODE){ printk ("IrDA: setting mode to FIR\n"); } @@ -265,12 +265,12 @@ printk (KERN_INFO "palmtt3_udc: device detected [USB_DETECT: %d]\n",ret); else printk (KERN_INFO "palmtt3_udc: no device detected [USB_DETECT: %d]\n",ret); - + return ret; } static void palmtt3_udc_command (int cmd){ - + switch (cmd) { case PXA2XX_UDC_CMD_DISCONNECT: SET_GPIO(GPIO_NR_PALMTT3_PUC_USB_POWER, 0); @@ -405,7 +405,7 @@ void palmtt3_resume(void) { unsigned long * addr; - + addr = (unsigned long *) 0xC0000000; *addr = _PM_backup[0]; @@ -455,7 +455,7 @@ MACHINE_START(T3XSCALE, "Palm Tungsten T3") /* Maintainer: Vladimir Pouzanov <far...@gm...> */ - .phys_io = 0x40000000, + .phys_io = PALMTT3_PHYS_IO_START, .boot_params = 0xa0000100, .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, .map_io = pxa_map_io, Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3_battery.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3_battery.c 2007-07-15 22:42:36 UTC (rev 1157) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3_battery.c 2007-07-15 22:44:11 UTC (rev 1158) @@ -34,18 +34,20 @@ #include <linux/soc/tsc2101.h> #include <asm/arch/tps65010.h> +#include <asm/arch/palmtt3-gpio.h> +#include <asm/arch/palmtt3-init.h> + #define BATTERY_CHECK_INTERVAL (HZ * 60) /* every 60 seconds */ int palmtt3_battery_get_max_voltage(struct battery *bat) { - //return 4147; // approx. 4.21 V, 2718 as returned by TSC - return 4156; // strange, but this is my current upper limit. so it be. + return PALMTT3_BAT_MAX_VOLTAGE; } int palmtt3_battery_get_min_voltage(struct battery *bat) { - return 3710; // 3.71 V, Critical Threshold set by PalmOS + return PALMTT3_BAT_MIN_VOLTAGE; } static int match_tsc(struct device * dev, void * data) @@ -99,8 +101,8 @@ static struct battery palmtt3_battery = { .name = "palmtt3_batt", .id = "Li-Ion battery", - .min_voltage = 3710, - .max_voltage = 4156, + .min_voltage = PALMTT3_BAT_MIN_VOLTAGE, + .max_voltage = PALMTT3_BAT_MAX_VOLTAGE, .v_current = -1, .temp = -1, .get_voltage = palmtt3_battery_get_voltage, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-07-15 22:42:47
|
Revision: 1157 http://svn.sourceforge.net/hackndev/?rev=1157&view=rev Author: keddar Date: 2007-07-15 15:42:36 -0700 (Sun, 15 Jul 2007) Log Message: ----------- palmtt3: add initial definitions for palmtt3 Added Paths: ----------- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtt3-init.h Added: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtt3-init.h =================================================================== --- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtt3-init.h (rev 0) +++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtt3-init.h 2007-07-15 22:42:36 UTC (rev 1157) @@ -0,0 +1,61 @@ +/* + * palmtt3-init.h + * + * Init values for Palm Tungsten|T3 Handheld Computer + * + * Based on palmz72-init.h by Jan Herman, other palmXX-init.h and T|T3 files. + * + * Authors: Radek Machacek <ke...@vo...> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * initial release + * + */ + +#ifndef _INCLUDE_PALMTT3_INIT_H_ + +#define _INCLUDE_PALMTT3_INIT_H_ + +// ADDRESSES + +#define PALMTT3_PHYS_IO_START 0x40000000 + + +// BACKLIGHT + +#define PALMTT3_MAX_INTENSITY 0x100 +#define PALMTT3_DEFAULT_INTENSITY 0x50 +#define PALMTT3_LIMIT_MASK 0x7F +#define PALMTT3_PRESCALER 1 +#define PALMTT3_PERIOD 0x12B + + +// BATTERY + +#define PALMTT3_BAT_MAX_VOLTAGE 4156 // strange, but this is my current upper limit. so it be. +#define PALMTT3_BAT_MIN_VOLTAGE 3710 // 3.71 V, Critical Threshold set by PalmOS +#define PALMTT3_BAT_MAX_CURRENT 0 // unknokn +#define PALMTT3_BAT_MIN_CURRENT 0 // unknown +#define PALMTT3_BAT_MAX_CHARGE 1 // unknown +#define PALMTT3_BAT_MIN_CHARGE 1 // unknown + +// LCD REGISTERS + +// static value +#define PALMTT3_INIT_LCD_LLC0 0x003008F9 +#define PALMTT3_INIT_LCD_LLC3 0x03700002 + +/* +// value converted using LCCRman, not work for me +#define PALMTT3_INIT_LCD_LLC0 LCCR0_ENB | LCCR0_Color | LCCR0_Sngl | LCCR0_LDM \ + | LCCR0_SFM | LCCR0_IUM | LCCR0_EFM | LCCR0_Act | LCCR0_4PixMono | \ + LCCR0_QDM | LCCR0_BM | LCCR0_OUM + +#define PALMTT3_INIT_LCD_LLC3 LCCR3_PixClkDiv(2) | LCCR3_HorSnchL \ + | LCCR3_VrtSnchL | LCCR3_PixFlEdg | LCCR3_OutEnH | LCCR3_Bpp(3) +*/ + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2007-07-15 22:37:53
|
Revision: 1156 http://svn.sourceforge.net/hackndev/?rev=1156&view=rev Author: bobofdoom Date: 2007-07-15 15:37:50 -0700 (Sun, 15 Jul 2007) Log Message: ----------- Commit: Added option for skipping prompts. Build with make DEFINES=-DNOPROMPT_MODE and Cocoboot will not prompt for kernel commmand-line etc, it'll just boot straight away. Modified Paths: -------------- cocoboot/trunk/Changelog cocoboot/trunk/m68k/mainform.c Modified: cocoboot/trunk/Changelog =================================================================== --- cocoboot/trunk/Changelog 2007-07-15 20:12:22 UTC (rev 1155) +++ cocoboot/trunk/Changelog 2007-07-15 22:37:50 UTC (rev 1156) @@ -1,3 +1,5 @@ + - Added compile option for skipping prompts. + version 0.3: - Added overflow-buffer as last resort to allocation problem (slapin's idea) - Cleaned up treo code (removed all #ifdefs) Modified: cocoboot/trunk/m68k/mainform.c =================================================================== --- cocoboot/trunk/m68k/mainform.c 2007-07-15 20:12:22 UTC (rev 1155) +++ cocoboot/trunk/m68k/mainform.c 2007-07-15 22:37:50 UTC (rev 1156) @@ -372,7 +372,7 @@ cmdline_p = FrmGetObjectPtr(form, FrmGetObjectIndex(form, CommandLine)); cmdline_th = MemHandleNew(size); cmdline_tp = MemHandleLock(cmdline_th); - StrCopy(cmdline_tp, "init=/linuxrc root=/dev/mmcblk0p2"); /* default value */ + StrCopy(cmdline_tp, " "); /* default value */ //PrefGetAppPreferences ('CcBt', 1, cmdline_tp, &size, true); MemHandleUnlock(cmdline_th); FldSetTextHandle(cmdline_p, cmdline_th); @@ -384,6 +384,10 @@ kernel_ok = check_image("/zImage"); use_initrd = check_image("/initrd.gz"); +#ifdef NOPROMPT_MODE + if (kernel_ok) boot_linux(); +#endif + } else if (event->eType == menuEvent) { return mainform_menu_event(event->data.menu.itemID); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2007-07-15 20:12:24
|
Revision: 1155 http://svn.sourceforge.net/hackndev/?rev=1155&view=rev Author: farcaller Date: 2007-07-15 13:12:22 -0700 (Sun, 15 Jul 2007) Log Message: ----------- palmtt3: moved slider keycodes to fix collision. Closes: 33 Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3_buttons.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3_buttons.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3_buttons.c 2007-07-15 15:11:22 UTC (rev 1154) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3_buttons.c 2007-07-15 20:12:22 UTC (rev 1155) @@ -68,8 +68,8 @@ #define T3KEY_RIGHT KEY_RIGHT #define T3KEY_CENTER KEY_ENTER -#define T3SLIDER_OPEN KEY_F6 -#define T3SLIDER_CLOSE KEY_F5 +#define T3SLIDER_OPEN KEY_F4 +#define T3SLIDER_CLOSE KEY_F3 #define GET_KEY_BIT(vkey, bit) ((vkey >> (bit) ) & 0x01) #define SET_KEY_BIT(vkey, bit) (vkey |= (1 << (bit)) ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <med...@us...> - 2007-07-15 15:11:25
|
Revision: 1154 http://svn.sourceforge.net/hackndev/?rev=1154&view=rev Author: medaglia Date: 2007-07-15 08:11:22 -0700 (Sun, 15 Jul 2007) Log Message: ----------- Added Bluetooth support for Palm Tungsten E2. Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmte2/palmte2.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmte2/palmte2.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmte2/palmte2.c 2007-07-15 15:09:46 UTC (rev 1153) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmte2/palmte2.c 2007-07-15 15:11:22 UTC (rev 1154) @@ -28,7 +28,8 @@ #include <asm/arch/udc.h> #include <asm/arch/mmc.h> #include <asm/arch/pxapwm-bl.h> -/*#include <asm/arch/palmte2-gpio.h>*/ +#include <asm/arch/serial.h> +#include <asm/arch/palmte2-gpio.h> #include <linux/gpio_keys.h> #include <sound/driver.h> @@ -62,7 +63,6 @@ }, }; - /* * Backlight */ @@ -83,6 +83,54 @@ }; /* + * Bluetooth + */ + +void bcm2035_bt_reset(int on) +{ + printk(KERN_NOTICE "Switch BT reset %d\n", on); + if (on) + SET_PALMTE2_GPIO(BT_RESET, 1); + else + SET_PALMTE2_GPIO(BT_RESET, 0); +} +EXPORT_SYMBOL(bcm2035_bt_reset); + +void bcm2035_bt_power(int on) +{ + printk(KERN_NOTICE "Switch BT power %d\n", on); + if (on) + SET_PALMTE2_GPIO(BT_POWER, 1); + else + SET_PALMTE2_GPIO(BT_POWER, 0); +} +EXPORT_SYMBOL(bcm2035_bt_power); + +struct bcm2035_bt_funcs { + void (*configure) (int state); +}; + +static struct bcm2035_bt_funcs bt_funcs; + +static void bcm2035_bt_configure(int state) +{ + if (bt_funcs.configure != NULL) + bt_funcs.configure(state); +} + +static struct platform_pxa_serial_funcs bcm2035_pxa_bt_funcs = { + .configure = bcm2035_bt_configure, +}; + +static struct platform_device bcm2035_bt = { + .name = "bcm2035-bt", + .id = -1, + .dev = { + .platform_data = &bt_funcs, + }, +}; + +/* * Keypad - gpio_keys */ @@ -153,15 +201,28 @@ &palmte2_pxa_keys, #endif &palmte2_backlight, + &bcm2035_bt, }; static void __init palmte2_init(void) { + /* int reg; */ + GCR &= ~GCR_PRIRDY_IEN; set_pxa_fb_info(&palmte2_lcd_screen); + pxa_set_btuart_info(&bcm2035_pxa_bt_funcs); + platform_add_devices(devices, ARRAY_SIZE(devices)); + +/* + SET_GPIO(32, 0); + SET_GPIO(80, 0); + + reg = __REG(0x40E0005C); + __REG(0x40E0005C) = (reg | 0x0FF00000); +*/ } MACHINE_START(TUNGE2, "Palm Tungsten E2") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <med...@us...> - 2007-07-15 15:09:49
|
Revision: 1153 http://svn.sourceforge.net/hackndev/?rev=1153&view=rev Author: medaglia Date: 2007-07-15 08:09:46 -0700 (Sun, 15 Jul 2007) Log Message: ----------- Add support to set the alternate function 3 in gpioed-ng. Modified Paths: -------------- linux4palm/linux/trunk/drivers/misc/gpioed-ng.c Modified: linux4palm/linux/trunk/drivers/misc/gpioed-ng.c =================================================================== --- linux4palm/linux/trunk/drivers/misc/gpioed-ng.c 2007-07-15 15:07:51 UTC (rev 1152) +++ linux4palm/linux/trunk/drivers/misc/gpioed-ng.c 2007-07-15 15:09:46 UTC (rev 1153) @@ -124,6 +124,9 @@ case '2': set_afn(id, 2); break; + case '3': + set_afn(id, 0x3); + break; default: printk(KERN_ERR "GPIOed: Unknown request\n"); break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <med...@us...> - 2007-07-15 15:07:54
|
Revision: 1152 http://svn.sourceforge.net/hackndev/?rev=1152&view=rev Author: medaglia Date: 2007-07-15 08:07:51 -0700 (Sun, 15 Jul 2007) Log Message: ----------- Added Bluetooth definitions in palmte2-gpio.h Modified Paths: -------------- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmte2-gpio.h Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmte2-gpio.h =================================================================== --- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmte2-gpio.h 2007-07-15 08:33:23 UTC (rev 1151) +++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmte2-gpio.h 2007-07-15 15:07:51 UTC (rev 1152) @@ -21,4 +21,33 @@ #define GPIO_NR_PALMTE2_KP_DKIN7 21 /* Down */ #define GPIO_NR_PALMTE2_KP_DKIN8 22 /* Up */ +/* Bluetooth */ + +#define GPIO_NR_PALMTE2_BT_RXD 42 +#define GPIO_NR_PALMTE2_BT_TXD 43 +#define GPIO_NR_PALMTE2_BT_CTS 44 +#define GPIO_NR_PALMTE2_BT_RTS 45 +#define GPIO_NR_PALMTE2_BT_RESET 80 +#define GPIO_NR_PALMTE2_BT_POWER 32 + +/* GPIO */ + +#define GET_GPIO(gpio) (GPLR(gpio) & GPIO_bit(gpio)) + +#define SET_GPIO(gpio, setp) \ + do { \ + if (setp) \ + GPSR(gpio) = GPIO_bit(gpio); \ + else \ + GPCR(gpio) = GPIO_bit(gpio); \ + } while (0) + +#define SET_PALMTE2_GPIO(gpio, setp) \ + do { \ + if (setp) \ + GPSR(GPIO_NR_PALMTE2_ ## gpio) = GPIO_bit(GPIO_NR_PALMTE2_ ## gpio); \ + else \ + GPCR(GPIO_NR_PALMTE2_ ## gpio) = GPIO_bit(GPIO_NR_PALMTE2_ ## gpio); \ + } while (0) + #endif /* _PALMTE2_GPIO_H_ */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2007-07-15 08:33:28
|
Revision: 1151 http://svn.sourceforge.net/hackndev/?rev=1151&view=rev Author: bobofdoom Date: 2007-07-15 01:33:23 -0700 (Sun, 15 Jul 2007) Log Message: ----------- Cocoboot: Reverted initrd copy removal as it's causing trouble and didn't solve the initial problem. Modified Paths: -------------- cocoboot/trunk/Changelog cocoboot/trunk/arm/boot.c cocoboot/trunk/m68k/imgloader.c cocoboot/trunk/m68k/mainform.c Modified: cocoboot/trunk/Changelog =================================================================== --- cocoboot/trunk/Changelog 2007-07-15 08:02:12 UTC (rev 1150) +++ cocoboot/trunk/Changelog 2007-07-15 08:33:23 UTC (rev 1151) @@ -1,5 +1,3 @@ - - Removed initrd relocation for speed and reliability (suggested by phire) - version 0.3: - Added overflow-buffer as last resort to allocation problem (slapin's idea) - Cleaned up treo code (removed all #ifdefs) Modified: cocoboot/trunk/arm/boot.c =================================================================== --- cocoboot/trunk/arm/boot.c 2007-07-15 08:02:12 UTC (rev 1150) +++ cocoboot/trunk/arm/boot.c 2007-07-15 08:33:23 UTC (rev 1151) @@ -24,11 +24,9 @@ #define MACH_TYPE_T3XSCALE 829 #define TAG_OFFSET 0x100 +#define INITRD_OFFSET 0x0400000 -UInt32 make_4k_aligned(UInt32 addr) -{ - return addr + 0x1000 - (addr & 0xfff); -} +#define T3_INITRD_OFFSET 0x1500000 static void jump_to_kernel(void *kernel_base, UInt32 tag_base, UInt32 mach) { @@ -86,6 +84,7 @@ if(!kernel || !cmdline) { return 0xc0ffee; } + UInt32 initrd_offset; /* since we're going to turn off the MMU, we need to translate * all out pointers to physical addresses. @@ -102,13 +101,6 @@ return 0xbadc01a; } - /* force our pointers to be 4k aligned, imgloader will have shifted - * the image forward. - */ - kernel = (void*) make_4k_aligned((UInt32)kernel); - if (initrd) - initrd = (void*) make_4k_aligned((UInt32)initrd); - /* that includes the stack pointer ... */ asm volatile ("mov %0, sp" : "=r"(vstack) ); pstack = (void *)virt_to_phys(g, (UInt32) vstack); @@ -184,10 +176,21 @@ setup_xscale_cpu(); } + if (pg->mach_num==MACH_TYPE_T3XSCALE){ + initrd_offset=T3_INITRD_OFFSET; + } else { + initrd_offset=INITRD_OFFSET; + } + /* place kernel parameters in memory */ setup_atags(pg->ram_base + TAG_OFFSET, pg->ram_base, pg->ram_size, cmdline, - initrd, initrd_size); + pg->ram_base + initrd_offset, initrd_size); + /* copy initrd into place */ + if (initrd) { + copy_image((void*)(pg->ram_base + initrd_offset), initrd, initrd_size); + } + /* bring on the penguin! */ jump_to_kernel(kernel, pg->ram_base + TAG_OFFSET, pg->mach_num); Modified: cocoboot/trunk/m68k/imgloader.c =================================================================== --- cocoboot/trunk/m68k/imgloader.c 2007-07-15 08:02:12 UTC (rev 1150) +++ cocoboot/trunk/m68k/imgloader.c 2007-07-15 08:33:23 UTC (rev 1151) @@ -56,9 +56,6 @@ err = VFSFileOpen(vol_ref, name, vfsModeRead, &f); if(err != errNone) return -2; - /* ensure the image is 4k aligned. */ - offset = 0x1000 - (((UInt32)buffer) & 0xfff); - VFSFileReadData(f, size, buffer, offset, &bytes_read); VFSFileClose(f); @@ -154,7 +151,7 @@ } } else { /* vfs */ - return load_file(name, vol_ref, size, buffer, 0x0); + return load_file(name, vol_ref, size, buffer, 0); } out_unlock: Modified: cocoboot/trunk/m68k/mainform.c =================================================================== --- cocoboot/trunk/m68k/mainform.c 2007-07-15 08:02:12 UTC (rev 1150) +++ cocoboot/trunk/m68k/mainform.c 2007-07-15 08:33:23 UTC (rev 1151) @@ -202,7 +202,7 @@ vol = search_image(name, loc, sizeof(loc), &size); if(vol < -1) goto out; - ftr_size = size + 0x1000; /* allocate an extra 4k so we can align the image */ + ftr_size = size; while (ftr_size) { if(!(err=FtrPtrNew (CREATOR_ID, FEATURE_NUM + n, ftr_size, image))) { break; @@ -372,7 +372,7 @@ cmdline_p = FrmGetObjectPtr(form, FrmGetObjectIndex(form, CommandLine)); cmdline_th = MemHandleNew(size); cmdline_tp = MemHandleLock(cmdline_th); - StrCopy(cmdline_tp, " "); /* default value */ + StrCopy(cmdline_tp, "init=/linuxrc root=/dev/mmcblk0p2"); /* default value */ //PrefGetAppPreferences ('CcBt', 1, cmdline_tp, &size, true); MemHandleUnlock(cmdline_th); FldSetTextHandle(cmdline_p, cmdline_th); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2007-07-15 08:02:16
|
Revision: 1150 http://svn.sourceforge.net/hackndev/?rev=1150&view=rev Author: bobofdoom Date: 2007-07-15 01:02:12 -0700 (Sun, 15 Jul 2007) Log Message: ----------- Cocoboot: Fixed endian of console commands. Modified Paths: -------------- cocoboot/trunk/m68k/cocoboot.c Modified: cocoboot/trunk/m68k/cocoboot.c =================================================================== --- cocoboot/trunk/m68k/cocoboot.c 2007-07-15 06:33:49 UTC (rev 1149) +++ cocoboot/trunk/m68k/cocoboot.c 2007-07-15 08:02:12 UTC (rev 1150) @@ -208,9 +208,9 @@ Err err; char *exit_text = "[Cocoboot exiting]\r\n"; if (usb_port) { - SrmSend(usb_port, exit_text, strlen(exit_text), &err), - SrmClose(usb_port); - usb_port = 0; + SrmSend(usb_port, exit_text, strlen(exit_text), &err); + //SrmClose(usb_port); + //usb_port = 0; } } @@ -227,57 +227,57 @@ void console_mw(char *args) { char *next = NULL; - UInt32 addr = strtol(args, &next, 0); + UInt32 addr = strtoul(args, &next, 0); UInt32 count = 1; UInt32 fill = 0, fill_value = 0; if (next && *next) { - count = strtol(next, &next, 0); + count = strtoul(next, &next, 0); } if (next && *next) { - fill_value = strtol(next, &next, 0); + fill_value = strtoul(next, &next, 0); fill = 1; } while (count--) { - if (fill) *((UInt32*)addr) = fill_value; - sendf("%08lx: %lx\r\n", addr, *((UInt32*)addr)); + if (fill) *((UInt32*)addr) = EndianFix32(fill_value); + sendf("%08lx: %08lx\r\n", addr, EndianFix32(*((UInt32*)addr))); addr += 4; } } void console_mh(char *args) { char *next = NULL; - UInt32 addr = strtol(args, &next, 0); + UInt32 addr = strtoul(args, &next, 0); UInt32 count = 1; UInt32 fill = 0, fill_value = 0; if (next && *next) { - count = strtol(next, &next, 0); + count = strtoul(next, &next, 0); } if (next && *next) { - fill_value = strtol(next, &next, 0); + fill_value = strtoul(next, &next, 0); fill = 1; } while (count--) { - if (fill) *((UInt16*)addr) = fill_value; - sendf("%08lx: %x\r\n", addr, *((UInt16*)addr)); + if (fill) *((UInt16*)addr) = EndianFix16(fill_value); + sendf("%08lx: %04x\r\n", addr, EndianFix16(*((UInt16*)addr))); addr += 2; } } void console_mb(char *args) { char *next = NULL; - UInt32 addr = strtol(args, &next, 0); + UInt32 addr = strtoul(args, &next, 0); UInt32 count = 1; UInt32 fill = 0, fill_value = 0; if (next && *next) { - count = strtol(next, &next, 0); + count = strtoul(next, &next, 0); } if (next && *next) { - fill_value = strtol(next, &next, 0); + fill_value = strtoul(next, &next, 0); fill = 1; } while (count--) { if (fill) *((UInt8*)addr) = fill_value; - sendf("%08lx: %x\r\n", addr, *((UInt8*)addr)); + sendf("%08lx: %02x\r\n", addr, *((UInt8*)addr)); addr += 1; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-07-15 06:33:55
|
Revision: 1149 http://svn.sourceforge.net/hackndev/?rev=1149&view=rev Author: marex_z71 Date: 2007-07-14 23:33:49 -0700 (Sat, 14 Jul 2007) Log Message: ----------- PalmTC: updated defconfig and touchscreen driver Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/configs/palmtc_defconfig linux4palm/linux/trunk/drivers/input/touchscreen/palmtc_ts.c Modified: linux4palm/linux/trunk/arch/arm/configs/palmtc_defconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/configs/palmtc_defconfig 2007-07-14 18:52:52 UTC (rev 1148) +++ linux4palm/linux/trunk/arch/arm/configs/palmtc_defconfig 2007-07-15 06:33:49 UTC (rev 1149) @@ -1,11 +1,14 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.20-hnd0 -# Mon Apr 23 22:34:55 2007 +# Linux kernel version: 2.6.21-hnd2 +# Sun Jul 15 05:05:07 2007 # CONFIG_ARM=y -# CONFIG_GENERIC_TIME is not set +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +CONFIG_GENERIC_TIME=y CONFIG_MMU=y +# CONFIG_NO_IOPORT is not set CONFIG_GENERIC_HARDIRQS=y CONFIG_TRACE_IRQFLAGS_SUPPORT=y CONFIG_HARDIRQS_SW_RESEND=y @@ -15,6 +18,7 @@ # CONFIG_ARCH_HAS_ILOG2_U64 is not set CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_ZONE_DMA=y CONFIG_ARCH_MTD_XIP=y CONFIG_VECTORS_BASE=0xffff0000 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" @@ -34,6 +38,7 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_IPC_NS is not set +CONFIG_SYSVIPC_SYSCTL=y # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_TASKSTATS is not set @@ -42,6 +47,7 @@ # CONFIG_IKCONFIG is not set CONFIG_SYSFS_DEPRECATED=y # CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y # CONFIG_INITRAMFS_SOURCE is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y @@ -120,6 +126,7 @@ # CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_IXP23XX is not set # CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_NS9XXX is not set # CONFIG_ARCH_PNX4008 is not set CONFIG_ARCH_PXA=y # CONFIG_ARCH_RPC is not set @@ -128,6 +135,8 @@ # CONFIG_ARCH_SHARK is not set # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_OMAP is not set +# CONFIG_BOARD_IRQ_MAP_SMALL is not set +# CONFIG_BOARD_IRQ_MAP_BIG is not set # # Intel PXA2xx Implementations @@ -156,6 +165,7 @@ # CONFIG_MACH_BLUEANGEL is not set # CONFIG_MACH_HTCBEETLES is not set # CONFIG_MACH_HW6900 is not set +# CONFIG_MACH_HTCATHENA is not set # CONFIG_ARCH_AXIMX3 is not set # CONFIG_ARCH_AXIMX5 is not set # CONFIG_MACH_X50 is not set @@ -177,6 +187,8 @@ # CONFIG_MACH_ZIRE31 is not set CONFIG_GPIOED=m CONFIG_GPIOEDNG=m +# CONFIG_MACH_GHI270HG is not set +# CONFIG_MACH_GHI270 is not set # CONFIG_PXA_SHARPSL is not set # CONFIG_MACH_TRIZEPS4 is not set CONFIG_PXA25x=y @@ -203,20 +215,12 @@ # CONFIG_ARM_THUMB=y # CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_OUTER_CACHE is not set CONFIG_IWMMXT=y # CONFIG_ARMBOOT_PROC is not set CONFIG_XSCALE_PMU=y -# CONFIG_KEXEC is not set # -# Compaq/iPAQ Drivers -# - -# -# Compaq/HP iPAQ Drivers -# - -# # Bus support # @@ -252,6 +256,7 @@ # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4096 # CONFIG_RESOURCES_64BIT is not set +CONFIG_ZONE_DMA_FLAG=1 CONFIG_ALIGNMENT_TRAP=y # @@ -261,6 +266,8 @@ CONFIG_ZBOOT_ROM_BSS=0x0 CONFIG_CMDLINE="" # CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set +# CONFIG_TXTOFFSET_DELTA is not set # # CPU Frequency scaling @@ -293,7 +300,7 @@ # CONFIG_PM_DEBUG is not set # CONFIG_DPM_DEBUG is not set # CONFIG_PM_SYSFS_DEPRECATED is not set -CONFIG_APM=y +CONFIG_APM_EMULATION=y # # Networking @@ -454,6 +461,7 @@ # # Plug and Play support # +# CONFIG_PNPACPI is not set # # Block devices @@ -466,7 +474,6 @@ CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 -CONFIG_BLK_DEV_INITRD=y # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set @@ -612,6 +619,7 @@ CONFIG_INPUT_TSDEV_SCREEN_Y=320 CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_EVBUG is not set +# CONFIG_INPUT_LED_TRIGGER is not set # # Input Device Drivers @@ -623,7 +631,9 @@ # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_NEWTON is not set # CONFIG_KEYBOARD_STOWAWAY is not set -# CONFIG_GPIO_KEYS is not set +# CONFIG_GPIODEV_KEYS is not set +# CONFIG_GPIODEV_DIAGONAL is not set +# CONFIG_KEYBOARD_GPIO is not set # CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_JOYSTICK is not set CONFIG_INPUT_TOUCHSCREEN=y @@ -634,8 +644,6 @@ # CONFIG_TOUCHSCREEN_PENMOUNT is not set # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set # CONFIG_TOUCHSCREEN_TOUCHWIN is not set -# CONFIG_TOUCHSCREEN_ADC is not set -# CONFIG_TOUCHSCREEN_ADC_DEBOUNCE is not set # CONFIG_TOUCHSCREEN_UCB1400 is not set CONFIG_TOUCHSCREEN_PALMTC=m CONFIG_TOUCHSCREEN_WM97XX=m @@ -678,6 +686,7 @@ # CONFIG_SERIAL_PXA_IR is not set CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_RS232_SERIAL is not set CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 @@ -693,9 +702,9 @@ # CONFIG_WATCHDOG is not set CONFIG_HW_RANDOM=m # CONFIG_NVRAM is not set - # CONFIG_DTLK is not set # CONFIG_R3964 is not set +# CONFIG_TIHTC is not set # # PCMCIA character devices @@ -731,46 +740,44 @@ # # CONFIG_HWMON is not set # CONFIG_HWMON_VID is not set +CONFIG_POWER_SUPPLY=m +# CONFIG_POWER_SUPPLY_DEBUG is not set +CONFIG_PDA_POWER=m +CONFIG_APM_POWER=m +# CONFIG_BATTERY_DS2760 is not set # -# Hardware Monitoring - Battery +# L3 serial bus support # -CONFIG_BATTERY_MONITOR=m -# CONFIG_ADC_BATTERY is not set +# CONFIG_L3 is not set # -# L3 serial bus support +# Misc devices # -# CONFIG_L3 is not set +# CONFIG_BATTCHARGE_MONITOR is not set # -# SoC drivers +# Multimedia Capabilities Port drivers # +# CONFIG_ADC is not set + +# +# Multifunction device drivers +# +# CONFIG_MFD_SM501 is not set +# CONFIG_HTC_ASIC2 is not set +# CONFIG_HTC_ASIC3 is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_ASIC3_DS1WM is not set +# CONFIG_SOC_SAMCOP is not set +# CONFIG_SOC_HAMCOP is not set # CONFIG_SOC_MQ11XX is not set # CONFIG_SOC_T7L66XB is not set # CONFIG_SOC_TC6387XB is not set # CONFIG_SOC_TC6393XB is not set -# CONFIG_SOC_SAMCOP is not set -# CONFIG_SOC_HAMCOP is not set -# CONFIG_HTC_ASIC2 is not set -# CONFIG_HTC_ASIC3 is not set -# CONFIG_HTC_ASIC3_DS1WM is not set # CONFIG_SOC_TSC2200 is not set # -# Misc devices -# -# CONFIG_BATTCHARGE_MONITOR is not set - -# -# Multimedia Capabilities Port drivers -# -# CONFIG_MCP is not set -# CONFIG_ADC_ADS7846_SSP is not set -# CONFIG_ADC_AD7877 is not set -# CONFIG_TIFM_CORE is not set - -# # LED devices # CONFIG_NEW_LEDS=y @@ -803,15 +810,26 @@ # # Graphics support # +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=m +CONFIG_LCD_CLASS_DEVICE=m +# CONFIG_BACKLIGHT_CORGI is not set +CONFIG_BACKLIGHT_PXAPWM=m +CONFIG_FB=y CONFIG_FIRMWARE_EDID=y -CONFIG_FB=y +# CONFIG_FB_DDC is not set CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_SVGALIB is not set # CONFIG_FB_MACMODES is not set # CONFIG_FB_BACKLIGHT is not set # CONFIG_FB_MODE_HELPERS is not set CONFIG_FB_TILEBLITTING=y + +# +# Frame buffer hardware drivers +# # CONFIG_FB_IMAGEON is not set # CONFIG_FB_S1D13XXX is not set CONFIG_FB_PXA=y @@ -843,13 +861,6 @@ # Logo configuration # # CONFIG_LOGO is not set -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_BACKLIGHT_CLASS_DEVICE=m -CONFIG_BACKLIGHT_DEVICE=y -CONFIG_LCD_CLASS_DEVICE=m -CONFIG_LCD_DEVICE=y -# CONFIG_BACKLIGHT_CORGI is not set -CONFIG_BACKLIGHT_PXAPWM=m # # Sound @@ -913,6 +924,7 @@ # HID Devices # CONFIG_HID=m +# CONFIG_HID_DEBUG is not set # # USB support @@ -954,6 +966,7 @@ # CONFIG_USB_G_SERIAL is not set # CONFIG_USB_MIDI_GADGET is not set # CONFIG_USB_G_CHAR is not set +# CONFIG_USB_PXA2XX_GPIO is not set # # MMC/SD Card support @@ -962,7 +975,6 @@ # CONFIG_MMC_DEBUG is not set CONFIG_MMC_BLOCK=y CONFIG_MMC_PXA=y -# CONFIG_MMC_TIFM_SD is not set # CONFIG_MMC_TMIO is not set # CONFIG_MMC_SAMCOP is not set @@ -984,6 +996,7 @@ # # RTC drivers # +# CONFIG_RTC_DRV_CMOS is not set # CONFIG_RTC_DRV_DS1553 is not set # CONFIG_RTC_DRV_DS1742 is not set # CONFIG_RTC_DRV_M48T86 is not set @@ -1048,6 +1061,7 @@ # # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set +# CONFIG_AUFS is not set # CONFIG_HFS_FS is not set # CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set @@ -1177,8 +1191,10 @@ # CONFIG_CRYPTO_GF128MUL is not set CONFIG_CRYPTO_ECB=m CONFIG_CRYPTO_CBC=m +CONFIG_CRYPTO_PCBC=m # CONFIG_CRYPTO_LRW is not set # CONFIG_CRYPTO_DES is not set +# CONFIG_CRYPTO_FCRYPT is not set # CONFIG_CRYPTO_BLOWFISH is not set # CONFIG_CRYPTO_TWOFISH is not set # CONFIG_CRYPTO_SERPENT is not set @@ -1192,6 +1208,7 @@ # CONFIG_CRYPTO_DEFLATE is not set CONFIG_CRYPTO_MICHAEL_MIC=m # CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_CAMELLIA is not set # CONFIG_CRYPTO_TEST is not set # @@ -1207,4 +1224,5 @@ CONFIG_CRC32=y # CONFIG_LIBCRC32C is not set CONFIG_PLIST=y -CONFIG_IOMAP_COPY=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y Modified: linux4palm/linux/trunk/drivers/input/touchscreen/palmtc_ts.c =================================================================== --- linux4palm/linux/trunk/drivers/input/touchscreen/palmtc_ts.c 2007-07-14 18:52:52 UTC (rev 1148) +++ linux4palm/linux/trunk/drivers/input/touchscreen/palmtc_ts.c 2007-07-15 06:33:49 UTC (rev 1149) @@ -29,7 +29,7 @@ #include <linux/freezer.h> #include <linux/ucb1400.h> #include <linux/ctype.h> -#include <linux/battery.h> +#include <linux/power_supply.h> #include <linux/leds.h> #include <linux/apm-emulation.h> @@ -418,17 +418,17 @@ }; -int ucb1400_battery_min_voltage(struct battery *b) +int ucb1400_battery_min_voltage(struct power_supply *b) { return UCB_BATT_MIN_VOLTAGE; } -int ucb1400_battery_max_voltage(struct battery *b) +int ucb1400_battery_max_voltage(struct power_supply *b) { return UCB_BATT_MAX_VOLTAGE; } -int ucb1400_battery_get_voltage(struct battery *b) +int ucb1400_battery_get_voltage(struct power_supply *b) { if (bat.battery_registered){ bat.previous_voltage = bat.current_voltage; @@ -444,7 +444,7 @@ } } -int ucb1400_battery_get_capacity(struct battery *b) +int ucb1400_battery_get_capacity(struct power_supply *b) { if (bat.battery_registered){ return (((ucb1400_battery_get_voltage(b)-ucb1400_battery_min_voltage(b)) @@ -457,69 +457,65 @@ } } -int ucb1400_battery_get_status(struct battery *b) +int ucb1400_battery_get_status(struct power_supply *b) { int ac_connected = !(gpio_get_value(GPIO_NR_PALMTC_CRADLE_DETECT_N)); int usb_connected = gpio_get_value(GPIO_NR_PALMTC_USB_DETECT); - ucb1400_adc_enable(bat.ucb); - if (ucb1400_adc_read(bat.ucb, UCB_ADC_INP_AD0) <= 0) - return BATTERY_STATUS_UNKNOWN; - ucb1400_adc_disable(bat.ucb); - - if (ac_connected || usb_connected){ - if ( ( bat.current_voltage > bat.previous_voltage ) || - ( bat.current_voltage <= UCB_BATT_MAX_VOLTAGE ) ) - return BATTERY_STATUS_CHARGING; - return BATTERY_STATUS_NOT_CHARGING; - } + if ( (ac_connected || usb_connected) && + ( ( bat.current_voltage > bat.previous_voltage ) || + ( bat.current_voltage <= UCB_BATT_MAX_VOLTAGE ) ) ) + return POWER_SUPPLY_STATUS_CHARGING; else - return BATTERY_STATUS_DISCHARGING; + return POWER_SUPPLY_STATUS_NOT_CHARGING; } int tmp; -static void *ucb1400_battery_get_property(struct battery *b, enum battery_property bp) +static int ucb1400_battery_get_property(struct power_supply *b, + enum power_supply_property psp, + union power_supply_propval *val) { - switch (bp) { - case BATTERY_PROP_VOLTAGE_MAX_DESIGN: - tmp = ucb1400_battery_max_voltage(b); - return &tmp; - case BATTERY_PROP_VOLTAGE_MIN_DESIGN: - tmp = ucb1400_battery_min_voltage(b); - return &tmp; - case BATTERY_PROP_CHARGE_FULL_DESIGN: - tmp = 100; - return &tmp; - case BATTERY_PROP_CHARGE_EMPTY_DESIGN: - tmp = 0; - return &tmp; - case BATTERY_PROP_CHARGE_NOW: - tmp = ucb1400_battery_get_capacity(b); - return &tmp; - case BATTERY_PROP_VOLTAGE_NOW: - tmp = ucb1400_battery_get_voltage(b); - return &tmp; - case BATTERY_PROP_STATUS: - tmp = ucb1400_battery_get_status(b); - return &tmp; - default: break; + switch (psp) { + case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN: + val->intval = ucb1400_battery_max_voltage(b); + break; + case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN: + val->intval = ucb1400_battery_min_voltage(b); + break; + case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN: + val->intval = 100; + break; + case POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN: + val->intval = 0; + break; + case POWER_SUPPLY_PROP_CHARGE_NOW: + val->intval = ucb1400_battery_get_capacity(b); + break; + case POWER_SUPPLY_PROP_VOLTAGE_NOW: + val->intval = ucb1400_battery_get_voltage(b); + break; + case POWER_SUPPLY_PROP_STATUS: + val->intval = ucb1400_battery_get_status(b); + break; + default: + break; }; - return NULL; + return 0; } -static enum battery_property ucb1400_battery_props[] = { - BATTERY_PROP_VOLTAGE_MAX_DESIGN, - BATTERY_PROP_VOLTAGE_MIN_DESIGN, - BATTERY_PROP_CHARGE_FULL_DESIGN, - BATTERY_PROP_CHARGE_EMPTY_DESIGN, - BATTERY_PROP_CHARGE_NOW, - BATTERY_PROP_VOLTAGE_NOW, - BATTERY_PROP_STATUS, +static enum power_supply_property ucb1400_battery_props[] = { + POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN, + POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, + POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, + POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN, + POWER_SUPPLY_PROP_CHARGE_NOW, + POWER_SUPPLY_PROP_VOLTAGE_NOW, + POWER_SUPPLY_PROP_STATUS, }; -struct battery ucb1400_battery = { +struct power_supply ucb1400_battery = { .name = "ucb1400_battery", .get_property = ucb1400_battery_get_property, .properties = ucb1400_battery_props, @@ -906,7 +902,7 @@ /* register battery to APM layer */ bat.battery_registered = 0; - if(battery_register(NULL, &ucb1400_battery)) { + if(power_supply_register(NULL, &ucb1400_battery)) { printk(KERN_ERR "ucb1400_ts: could not register battery class\n"); } else { bat.battery_registered = 1; @@ -962,7 +958,7 @@ led_classdev_unregister(&ucb1400_gpio_vibra); led_classdev_unregister(&ucb1400_gpio_led); - battery_unregister(&ucb1400_battery); + power_supply_unregister(&ucb1400_battery); free_irq(ucb->irq, ucb); input_unregister_device(ucb->ts_idev); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-07-14 18:52:54
|
Revision: 1148 http://svn.sourceforge.net/hackndev/?rev=1148&view=rev Author: marex_z71 Date: 2007-07-14 11:52:52 -0700 (Sat, 14 Jul 2007) Log Message: ----------- PalmLD: add lock key as a gpio key Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c 2007-07-14 08:12:41 UTC (rev 1147) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c 2007-07-14 18:52:52 UTC (rev 1148) @@ -322,6 +322,7 @@ #ifdef CONFIG_KEYBOARD_GPIO static struct gpio_keys_button palmld_pxa_buttons[] = { {KEY_F8, GPIO_NR_PALMLD_POWER_SWITCH, 0, "Power switch" }, + {KEY_F5, GPIO_NR_PALMLD_LOCK_SWITCH, 0, "Lock switch" }, }; static struct gpio_keys_platform_data palmld_pxa_keys_data = { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <bob...@us...> - 2007-07-14 08:12:12
|
Revision: 1146 http://svn.sourceforge.net/hackndev/?rev=1146&view=rev Author: bobofdoom Date: 2007-07-14 01:12:10 -0700 (Sat, 14 Jul 2007) Log Message: ----------- PalmT650: USB gadget now works. Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650_pm.c linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmt650-gpio.h Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650_pm.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650_pm.c 2007-07-14 01:51:44 UTC (rev 1145) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650_pm.c 2007-07-14 08:12:10 UTC (rev 1146) @@ -31,6 +31,7 @@ { /* Wake-Up on RTC event, etc. */ PWER |= PWER_RTC | PWER_WEP1; + PWER |= 2 << 19; /* wake on SD */ /* Wakeup by keyboard :-) */ PKWR = 0x01; Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmt650-gpio.h =================================================================== --- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmt650-gpio.h 2007-07-14 01:51:44 UTC (rev 1145) +++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmt650-gpio.h 2007-07-14 08:12:10 UTC (rev 1146) @@ -43,7 +43,7 @@ #define GPIO_NR_PALMT650_SD_DETECT_N 113 /* SD card inserted; RE FE; Input */ #define GPIO_NR_PALMT650_LCD_POWER 20 #define GPIO_NR_PALMT650_LCD_FADEOUT 77 /* switching this GPIO makes LCD fade out */ -#define GPIO_NR_PALMT650_USB_DETECT 9 +#define GPIO_NR_PALMT650_USB_PULLUP 114 #define GPIO_NR_PALMT650_KP_MKIN0 100 #define GPIO_NR_PALMT650_KP_MKIN1 101 @@ -82,6 +82,8 @@ #define GPIO_NR_PALMT650_KP_MKOUT5_MD (GPIO_NR_PALMT650_KP_MKOUT5 | GPIO_ALT_FN_2_OUT) #define GPIO_NR_PALMT650_KP_MKOUT6_MD (GPIO_NR_PALMT650_KP_MKOUT6 | GPIO_ALT_FN_1_OUT) +#define GPIO_NR_PALMT650_USB_PULLUP_MD (GPIO_NR_PALMT650_USB_PULLUP | GPIO_OUT) + /* Utility macros */ #define GET_PALMT650_GPIO(gpio) \ (GPLR(GPIO_NR_PALMT650_ ## gpio) & GPIO_bit(GPIO_NR_PALMT650_ ## gpio)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bob...@us...> - 2007-07-14 01:51:47
|
Revision: 1145 http://svn.sourceforge.net/hackndev/?rev=1145&view=rev Author: bobofdoom Date: 2007-07-13 18:51:44 -0700 (Fri, 13 Jul 2007) Log Message: ----------- PalmT650: Used LCCRMan make nice LCD constants for LCCR0 and 3. 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 01:17:37 UTC (rev 1144) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650.c 2007-07-14 01:51:44 UTC (rev 1145) @@ -21,6 +21,7 @@ #include <asm/mach/map.h> #include <asm/arch/audio.h> +#include <asm/arch/bitfield.h> #include <asm/arch/hardware.h> #include <asm/arch/mmc.h> #include <asm/arch/pxafb.h> @@ -316,13 +317,13 @@ }; static struct pxafb_mach_info palmt650_lcd __initdata = { - .lccr0 = 0x4000080, - .lccr3 = 0x4400003, - - .pxafb_backlight_power = NULL, - - .num_modes = 1, - .modes = &palmt650_lcd_mode, + .lccr0 = LCCR0_ENB | LCCR0_Color | LCCR0_Sngl | + LCCR0_Act | LCCR0_4PixMono | LCCR0_OUC | + LCCR0_LDDALT, + .lccr3 = LCCR3_PixClkDiv(3) | LCCR3_HorSnchL | LCCR3_VrtSnchL | + LCCR3_PixFlEdg | LCCR3_OutEnH | LCCR3_Bpp(4), + .num_modes = 1, + .modes = &palmt650_lcd_mode, }; static struct map_desc palmt650_io_desc[] __initdata = { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |