|
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: <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: <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: <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 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 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 09:05:44
|
Revision: 1172
http://svn.sourceforge.net/hackndev/?rev=1172&view=rev
Author: marex_z71
Date: 2007-07-17 02:05:42 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
PalmTT5: migrate to corgi_bl
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/configs/palmtt5_defconfig
linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt5/palmtt5.c
linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtt5-init.h
Modified: linux4palm/linux/trunk/arch/arm/configs/palmtt5_defconfig
===================================================================
--- linux4palm/linux/trunk/arch/arm/configs/palmtt5_defconfig 2007-07-17 08:50:45 UTC (rev 1171)
+++ linux4palm/linux/trunk/arch/arm/configs/palmtt5_defconfig 2007-07-17 09:05:42 UTC (rev 1172)
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.21-hnd2
-# Fri Jul 13 01:44:04 2007
+# Tue Jul 17 10:07:03 2007
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -901,8 +901,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/palmtt5/palmtt5.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt5/palmtt5.c 2007-07-17 08:50:45 UTC (rev 1171)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt5/palmtt5.c 2007-07-17 09:05:42 UTC (rev 1172)
@@ -21,6 +21,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>
@@ -38,27 +39,10 @@
#include <asm/arch/udc.h>
#include <asm/arch/irda.h>
#include <asm/arch/pxa27x_keyboard.h>
-#include <asm/arch/pxapwm-bl.h>
#include <asm/arch/serial.h>
#include "../generic.h"
-static void palmtt5_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 *
**************************/
@@ -165,32 +149,37 @@
* Backlight *
*************/
-static void palmtt5_bl_on(void){
- SET_GPIO(GPIO_NR_PALMTT5_BL_POWER, 1);
- mdelay(50);
+static void palmtt5_bl_power(int on)
+{
+ SET_PALMTT5_GPIO(BL_POWER, on);
+ pxa_set_cken(CKEN0_PWM0, on);
+ pxa_set_cken(CKEN1_PWM1, on);
+ mdelay(50);
}
-static void palmtt5_bl_off(void){
- SET_GPIO(GPIO_NR_PALMTT5_BL_POWER, 0);
- mdelay(50);
+static void palmtt5_set_bl_intensity(int intensity)
+{
+ palmtt5_bl_power(intensity ? 1 : 0);
+ if(intensity) {
+ PWM_CTRL0 = 0x7;
+ PWM_PERVAL0 = PALMTT5_PERIOD;
+ PWM_PWDUTY0 = intensity;
+ }
}
-static struct pxapwmbl_platform_data palmtt5_backlight_data = {
- .pwm = 0,
- .max_intensity = 0x16c,
- .default_intensity = 0xc7,
- .limit_mask = 0x6d,
- .prescaler = 7,
- .period = 0x16c,
- .turn_bl_on = palmtt5_bl_on,
- .turn_bl_off = palmtt5_bl_off,
+static struct corgibl_machinfo palmtt5_bl_machinfo = {
+ .max_intensity = PALMTT5_MAX_INTENSITY,
+ .default_intensity = PALMTT5_MAX_INTENSITY,
+ .set_bl_intensity = palmtt5_set_bl_intensity,
+ .limit_mask = PALMTT5_LIMIT_MASK,
};
static struct platform_device palmtt5_backlight = {
- .name = "pxapwm-bl",
- .dev = {
- .platform_data = &palmtt5_backlight_data,
- },
+ .name = "corgi-bl",
+ .id = 0,
+ .dev = {
+ .platform_data = &palmtt5_bl_machinfo,
+ },
};
@@ -400,7 +389,7 @@
/* Set divisor to 2 to get rid of screen whining */
.lccr3 = LCCR3_PixClkDiv(2) | LCCR3_HorSnchL | LCCR3_VrtSnchL |
LCCR3_PixFlEdg | LCCR3_Bpp(4),
- .pxafb_backlight_power = palmtt5_backlight_power,
+ .pxafb_backlight_power = NULL,
};
static struct map_desc palmtt5_io_desc[] __initdata = {
Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtt5-init.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtt5-init.h 2007-07-17 08:50:45 UTC (rev 1171)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtt5-init.h 2007-07-17 09:05:42 UTC (rev 1172)
@@ -32,21 +32,29 @@
#define PALMTT5_KM_COLS 3
-// TOUCHSCREEN
+/* TOUCHSCREEN */
#define AC97_LINK_FRAME 21
-// BATTERY
+/* BATTERY */
-#define PALMTT5_BAT_MAX_VOLTAGE 4000 // 4.00v current voltage at max charge as from Filez
-#define PALMTT5_BAT_MIN_VOLTAGE 3550 // 3.55v critical voltage as from FileZ
-#define PALMTT5_BAT_MAX_CURRENT 0 // unknokn
-#define PALMTT5_BAT_MIN_CURRENT 0 // unknown
-#define PALMTT5_BAT_MAX_CHARGE 1 // unknown
-#define PALMTT5_BAT_MIN_CHARGE 1 // unknown
-#define PALMTT5_MAX_LIFE_MINS 360 // on-life in minutes
+#define PALMTT5_BAT_MAX_VOLTAGE 4000 /* 4.00v current voltage at max charge as from Filez */
+#define PALMTT5_BAT_MIN_VOLTAGE 3550 /* 3.55v critical voltage as from FileZ */
+#define PALMTT5_BAT_MAX_CURRENT 0 /* unknokn */
+#define PALMTT5_BAT_MIN_CURRENT 0 /* unknown */
+#define PALMTT5_BAT_MAX_CHARGE 1 /* unknown */
+#define PALMTT5_BAT_MIN_CHARGE 1 /* unknown */
+#define PALMTT5_MAX_LIFE_MINS 360 /* on-life in minutes */
#define PALMTT5_BAT_MEASURE_DELAY (HZ * 1)
+/* BACKLIGHT */
+
+#define PALMTT5_MAX_INTENSITY 0xFE
+#define PALMTT5_DEFAULT_INTENSITY 0x7E
+#define PALMTT5_LIMIT_MASK 0x7F
+#define PALMTT5_PRESCALER 0x3F
+#define PALMTT5_PERIOD 0x12C
+
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bob...@us...> - 2007-07-21 11:16:11
|
Revision: 1191
http://svn.sourceforge.net/hackndev/?rev=1191&view=rev
Author: bobofdoom
Date: 2007-07-21 04:16:09 -0700 (Sat, 21 Jul 2007)
Log Message:
-----------
L4P: pxa27x_keyboard: Made keypad debounce interval configurable.
* The default debounce interval of 100ms is much too long for comfortable
typing on the palmt650. 32 ms seems a more reasonable value.
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650.c
linux4palm/linux/trunk/drivers/input/keyboard/pxa27x_keyboard.c
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650.c 2007-07-21 10:27:37 UTC (rev 1190)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650.c 2007-07-21 11:16:09 UTC (rev 1191)
@@ -203,6 +203,7 @@
static struct pxa27x_keyboard_platform_data palmt650_kbd_data = {
.nr_rows = 8,
.nr_cols = 7,
+ .debounce_ms = 32,
.keycodes = {
{ /* row 0 */
KEY_O, /* "O" */
Modified: linux4palm/linux/trunk/drivers/input/keyboard/pxa27x_keyboard.c
===================================================================
--- linux4palm/linux/trunk/drivers/input/keyboard/pxa27x_keyboard.c 2007-07-21 10:27:37 UTC (rev 1190)
+++ linux4palm/linux/trunk/drivers/input/keyboard/pxa27x_keyboard.c 2007-07-21 11:16:09 UTC (rev 1191)
@@ -92,6 +92,9 @@
kpc |= KPC_MIE; /* matrix keypad interrupt enabled */
KPC = kpc;
+
+ if (pdev->debounce_ms)
+ KPKDI = pdev->debounce_ms & 0xff;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bob...@us...> - 2007-07-22 13:53:06
|
Revision: 1199
http://svn.sourceforge.net/hackndev/?rev=1199&view=rev
Author: bobofdoom
Date: 2007-07-22 06:53:01 -0700 (Sun, 22 Jul 2007)
Log Message:
-----------
PalmT650: Added GSM module management driver.
- Currently can just be used to power on/off the modem. To use
juat echo 1 or 0 into /sys/devices/platform/palmt650-gsm/power_on
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/Kconfig
linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/Makefile
linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650.c
linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmt650-gpio.h
Added Paths:
-----------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650_gsm.c
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/Kconfig
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/Kconfig 2007-07-22 10:51:55 UTC (rev 1198)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/Kconfig 2007-07-22 13:53:01 UTC (rev 1199)
@@ -1,7 +1,17 @@
menuconfig MACH_XSCALE_PALMTREO650
bool "Palm Treo 650"
select PXA27x
+ select KEYBOARD_PXA27x
help
Say Y here if you intend to run this kernel on a
Palm Treo 650. Currently there is only basic support
for this PDA.
+
+config PALMT650_GSM
+ tristate "Palm Treo 650 GSM baseband processor"
+ depends on MACH_XSCALE_PALMTREO650
+ default y
+ help
+ This module provides support for controlling power to
+ the GSM baseband processor in the Treo 650. Say Y here
+ if you are unsure.
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/Makefile
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/Makefile 2007-07-22 10:51:55 UTC (rev 1198)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/Makefile 2007-07-22 13:53:01 UTC (rev 1199)
@@ -3,3 +3,4 @@
#
obj-$(CONFIG_MACH_XSCALE_PALMTREO650) += palmt650.o palmt650_pm.o
+obj-$(CONFIG_PALMT650_GSM) += palmt650_gsm.o
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650.c 2007-07-22 10:51:55 UTC (rev 1198)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650.c 2007-07-22 13:53:01 UTC (rev 1199)
@@ -164,6 +164,17 @@
};
/*********************************************************
+ * GSM Baseband Processor
+ *********************************************************/
+struct platform_device palmt650_gsm = {
+ .name = "palmt650-gsm",
+ .id = -1,
+ .dev = {
+ .platform_data = NULL,
+ },
+};
+
+/*********************************************************
* USB Device Controller
*********************************************************/
@@ -308,6 +319,7 @@
&palmt650_kbd,
&palmt650_backlight,
&palmt650_led,
+ &palmt650_gsm,
};
/*********************************************************
Added: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650_gsm.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650_gsm.c (rev 0)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt650/palmt650_gsm.c 2007-07-22 13:53:01 UTC (rev 1199)
@@ -0,0 +1,85 @@
+/*
+ * Palm Treo 650 GSM Management
+ *
+ * Copyright (C) 2007 Alex Osborne
+ *
+ * This code is available under the GNU GPL version 2 or later.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+
+#include <asm/arch/hardware.h>
+#include <asm/arch/palmt650-gpio.h>
+
+static ssize_t gsm_power_on_write(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ unsigned long on = simple_strtoul(buf, NULL, 10);
+ SET_ASIC6_GPIO(GSM_POWER, on);
+ printk("Setting GSM power to %ld\n", on);
+ return count;
+}
+
+static ssize_t gsm_power_on_read(struct device *dev,
+ struct device_attribute *attr,
+ char *buf)
+{
+ printk("GPLR is %d\n", ASIC6_GPLR);
+ if (GET_ASIC6_GPIO(GSM_POWER)) {
+ return strlcpy(buf, "1\n", 3);
+ } else {
+ return strlcpy(buf, "0\n", 3);
+ }
+}
+
+static DEVICE_ATTR(power_on, 0644, gsm_power_on_read, gsm_power_on_write);
+
+static struct attribute *palmt650_gsm_attrs[] = {
+ &dev_attr_power_on.attr,
+ NULL
+};
+
+static struct attribute_group palmt650_gsm_attr_group = {
+ .name = NULL,
+ .attrs = palmt650_gsm_attrs,
+};
+
+static int __init palmt650_gsm_probe(struct platform_device *pdev)
+{
+ return sysfs_create_group(&pdev->dev.kobj, &palmt650_gsm_attr_group);
+}
+
+static int palmt650_gsm_remove(struct platform_device *pdev)
+{
+ sysfs_remove_group(&pdev->dev.kobj, &palmt650_gsm_attr_group);
+ return 0;
+}
+
+static struct platform_driver palmt650_gsm_driver = {
+ .probe = palmt650_gsm_probe,
+ .remove = palmt650_gsm_remove,
+ .suspend = NULL, /* not needed? */
+ .resume = NULL,
+ .driver = {
+ .name = "palmt650-gsm",
+ }
+};
+
+static int __devinit palmt650_gsm_init(void)
+{
+ return platform_driver_register(&palmt650_gsm_driver);
+}
+
+static void palmt650_gsm_exit(void)
+{
+ platform_driver_unregister(&palmt650_gsm_driver);
+}
+
+module_init(palmt650_gsm_init);
+module_exit(palmt650_gsm_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Alex Osborne <bob...@gm...>");
+MODULE_DESCRIPTION("Palm Treo 650 GSM management");
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-22 10:51:55 UTC (rev 1198)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmt650-gpio.h 2007-07-22 13:53:01 UTC (rev 1199)
@@ -17,23 +17,45 @@
#define PALMT650_ASIC6_SIZE (0x00100000)
/* ASIC 6 registers */
+/* Note: the naming and purpose of these registers is just a guess. */
-#define __REG16(x) (*((volatile u16 *)io_p2v(x)))
-#define ASIC6_LED0_TBS __REG16(0x08000080)
-#define ASIC6_LED0_U1 __REG16(0x08000082) /* unknown=0 */
-#define ASIC6_LED0_PERIOD __REG16(0x08000084)
-#define ASIC6_LED0_U2 __REG16(0x08000086) /* unknown=3 */
-#define ASIC6_LED0_DUTY __REG16(0x08000088)
-#define ASIC6_LED0_AUTOSTOP __REG16(0x0800008a)
-#define ASIC6_LED1_TBS __REG16(0x08000090)
-#define ASIC6_LED1_PERIOD __REG16(0x08000094)
-#define ASIC6_LED1_DUTY __REG16(0x08000098)
-#define ASIC6_LED1_AUTOSTOP __REG16(0x0800009a)
-#define ASIC6_LED2_TBS __REG16(0x080000a0)
-#define ASIC6_LED2_PERIOD __REG16(0x080000a4)
-#define ASIC6_LED2_DUTY __REG16(0x080000a8)
-#define ASIC6_LED2_AUTOSTOP __REG16(0x080000aa)
+#define __REG16(x) (*((volatile u16 *)(x)))
+#define __ASIC6_REG(x) __REG16(PALMT650_ASIC6_VIRT + (x))
+#define ASIC6_LED0_TBS __REG(0x80)
+#define ASIC6_LED0_U1 __ASIC6_REG(0x82) /* unknown=0 */
+#define ASIC6_LED0_PERIOD __ASIC6_REG(0x84)
+#define ASIC6_LED0_U2 __ASIC6_REG(0x86) /* unknown=3 */
+#define ASIC6_LED0_DUTY __ASIC6_REG(0x88)
+#define ASIC6_LED0_AUTOSTOP __ASIC6_REG(0x8a)
+#define ASIC6_LED1_TBS __ASIC6_REG(0x90)
+#define ASIC6_LED1_PERIOD __ASIC6_REG(0x94)
+#define ASIC6_LED1_DUTY __ASIC6_REG(0x98)
+#define ASIC6_LED1_AUTOSTOP __ASIC6_REG(0x9a)
+#define ASIC6_LED2_TBS __ASIC6_REG(0xa0)
+#define ASIC6_LED2_PERIOD __ASIC6_REG(0xa4)
+#define ASIC6_LED2_DUTY __ASIC6_REG(0xa8)
+#define ASIC6_LED2_AUTOSTOP __ASIC6_REG(0xaa)
+
+#define ASIC6_GPLR __ASIC6_REG(0x48)
+#define ASIC6_GPLR_GSM_POWER (1<<6)
+/* one of these will be reset the other power, not sure which is which */
+#define ASIC6_GPLR_BT_PW1 (1<<4)
+#define ASIC6_GPLR_BT_PW2 (1<<5)
+
+#define SET_ASIC6_GPIO(gpio, setp) \
+do { \
+if (setp) \
+ ASIC6_GPLR |= ASIC6_GPLR_ ## gpio; \
+else \
+ ASIC6_GPLR &= ~ASIC6_GPLR_ ## gpio; \
+} while (0)
+
+#define GET_ASIC6_GPIO(gpio) \
+ (ASIC6_GPLR & ASIC6_GPLR_ ## gpio)
+
+
+
/* Palm Treo 650 GPIOs */
#define GPIO_NR_PALMT650_POWER_DETECT 0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2007-07-22 20:41:02
|
Revision: 1200
http://svn.sourceforge.net/hackndev/?rev=1200&view=rev
Author: marex_z71
Date: 2007-07-22 13:40:59 -0700 (Sun, 22 Jul 2007)
Log Message:
-----------
PalmLD: add display border handling driver
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/Kconfig
linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/Makefile
linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c
linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmld-gpio.h
Added Paths:
-----------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_border.c
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/Kconfig
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/Kconfig 2007-07-22 13:53:01 UTC (rev 1199)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/Kconfig 2007-07-22 20:40:59 UTC (rev 1200)
@@ -37,4 +37,9 @@
default y if MACH_XSCALE_PALMLD
help
Enable support for suspend/resume the PalmOne LifeDrive PDA.
-
\ No newline at end of file
+
+config PALMLD_BORDER
+ tristate "Palm LifeDrive Display border switch"
+ depends on MACH_XSCALE_PALMLD
+ help
+ Enable support for turning LCD border on/off
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/Makefile
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/Makefile 2007-07-22 13:53:01 UTC (rev 1199)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/Makefile 2007-07-22 20:40:59 UTC (rev 1200)
@@ -8,4 +8,4 @@
obj-$(CONFIG_PALMLD_IDE) += palmld_ide.o
obj-$(CONFIG_PALMLD_PM) += palmld_pm.o
obj-$(CONFIG_PALMLD_BATTERY) += palmld_battery.o
-
+obj-$(CONFIG_PALMLD_BORDER) += palmld_border.o
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c 2007-07-22 13:53:01 UTC (rev 1199)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c 2007-07-22 20:40:59 UTC (rev 1200)
@@ -44,9 +44,9 @@
#include "../generic.h"
-/**
+/*********************************************************
* SD/MMC card controller
- */
+ *********************************************************/
static int palmld_mci_init(struct device *dev, irqreturn_t (*palmld_detect_int)(int, void *), void *data)
{
@@ -91,7 +91,9 @@
};
-/* Bluetooth */
+/*********************************************************
+ * Bluetooth
+ *********************************************************/
void bcm2035_bt_reset(int on)
{
@@ -139,9 +141,9 @@
},
};
-/**
+/*********************************************************
* AC97 audio controller
- */
+ *********************************************************/
static pxa2xx_audio_ops_t palmld_audio_ops = {
/*
@@ -158,9 +160,9 @@
.dev = { .platform_data = &palmld_audio_ops },
};
-/**
+/*********************************************************
* IRDA
- */
+ *********************************************************/
static void palmld_irda_transceiver_mode(struct device *dev, int mode)
{
@@ -195,19 +197,17 @@
.transceiver_mode = palmld_irda_transceiver_mode,
};
-/* platform */
-
-/*
+/*********************************************************
* LEDs
- */
+ *********************************************************/
static struct platform_device palmldled_device = {
.name = "palmld-led",
.id = -1,
};
-/*
+/*********************************************************
* Cypress EZUSB SX2 USB2.0 Controller
- */
+ *********************************************************/
static struct sx2_udc_mach_info palmldusb2_platform_data = {
.virt_base = PALMLD_USB_VIRT,
@@ -229,9 +229,21 @@
},
};
-/**
+/*********************************************************
+ * LCD Border
+ *********************************************************/
+
+struct platform_device palmld_border = {
+ .name = "palmld-border",
+ .id = -1,
+ .dev = {
+ .platform_data = NULL,
+ },
+};
+
+/*********************************************************
* Backlight
- */
+ *********************************************************/
static void palmld_bl_power(int on)
{
@@ -316,9 +328,9 @@
},
};
-/********************************
+/*********************************************************
* GPIO Key - Voice Memo Button *
- ********************************/
+ *********************************************************/
#ifdef CONFIG_KEYBOARD_GPIO
static struct gpio_keys_button palmld_pxa_buttons[] = {
{KEY_F8, GPIO_NR_PALMLD_POWER_SWITCH, 0, "Power switch" },
@@ -338,9 +350,9 @@
};
#endif
-/********************
+/*********************************************************
* Power Management *
- ********************/
+ *********************************************************/
struct platform_device palmld_pm = {
.name = "palmld-pm",
@@ -372,6 +384,7 @@
&palmldusb2_device,
&palmld_pm,
&bcm2035_bt,
+ &palmld_border,
};
/*********************************************************
@@ -388,9 +401,6 @@
.hsync_len = 4,
.vsync_len = 1,
- /* fixme: these are the margins PalmOS has set,
- * they seem to work but could be better.
- */
.left_margin = 32,
.right_margin = 1,
.upper_margin = 7, //5,
Added: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_border.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_border.c (rev 0)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_border.c 2007-07-22 20:40:59 UTC (rev 1200)
@@ -0,0 +1,100 @@
+/*
+ * Palm LifeDrive LCD Border switch
+ *
+ * Copyright (C) 2007 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.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+
+#include <asm/arch/hardware.h>
+#include <asm/arch/palmld-gpio.h>
+
+static ssize_t palmld_border_write(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ signed long state = simple_strtol(buf, NULL, 10);
+
+ if ( state >= 1 )
+ SET_PALMLD_GPIO(BORDER_SELECT, 1);
+ else
+ SET_PALMLD_GPIO(BORDER_SELECT, 0);
+
+ msleep(50);
+ SET_PALMLD_GPIO(BORDER_SWITCH, 1);
+
+ if ((state == 1) || (state == 0)) /* default - switch border on/off */
+ msleep(200);
+ else { /* hidden functionality - colored border */
+ if (state >= 0)
+ msleep(state);
+ else
+ msleep(-state);
+ }
+
+ SET_PALMLD_GPIO(BORDER_SWITCH, 0);
+
+ return count;
+}
+
+static ssize_t palmld_border_read(struct device *dev,
+ struct device_attribute *attr,
+ char *buf)
+{
+ return strlcpy(buf, GET_PALMLD_GPIO(BORDER_SELECT) ? "1\n" : "0\n", 3);
+}
+
+static DEVICE_ATTR(border_power, 0644, palmld_border_read, palmld_border_write);
+
+static struct attribute *palmld_border_attrs[] = {
+ &dev_attr_border_power.attr,
+ NULL
+};
+
+static struct attribute_group palmld_border_attr_group = {
+ .attrs = palmld_border_attrs,
+};
+
+static int __devinit palmld_border_probe(struct platform_device *pdev)
+{
+ return sysfs_create_group(&pdev->dev.kobj, &palmld_border_attr_group);
+}
+
+static int palmld_border_remove(struct platform_device *pdev)
+{
+ sysfs_remove_group(&pdev->dev.kobj, &palmld_border_attr_group);
+ return 0;
+}
+
+static struct platform_driver palmld_border_driver = {
+ .probe = palmld_border_probe,
+ .remove = palmld_border_remove,
+ .suspend = NULL,
+ .resume = NULL,
+ .driver = {
+ .name = "palmld-border",
+ }
+};
+
+static int __init palmld_border_init(void)
+{
+ return platform_driver_register(&palmld_border_driver);
+}
+
+static void palmld_border_exit(void)
+{
+ platform_driver_unregister(&palmld_border_driver);
+}
+
+module_init(palmld_border_init);
+module_exit(palmld_border_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Marek Vasut <mar...@gm...>");
+MODULE_DESCRIPTION("Palm LifeDrive Border switch");
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-22 13:53:01 UTC (rev 1199)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmld-gpio.h 2007-07-22 20:40:59 UTC (rev 1200)
@@ -30,6 +30,9 @@
#define GPIO_NR_PALMLD_LOCK_SWITCH 15 /* keypad lock */
#define GPIO_NR_PALMLD_SCREEN 19
+#define GPIO_NR_PALMLD_BORDER_SWITCH 21
+#define GPIO_NR_PALMLD_BORDER_SELECT 22
+
#define GPIO_NR_PALMLD_WM9712_IRQ 27
#define GPIO_NR_PALMLD_IR_DISABLE 40 /* IRDA */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ke...@us...> - 2007-07-29 13:28:41
|
Revision: 1217
http://hackndev.svn.sourceforge.net/hackndev/?rev=1217&view=rev
Author: keddar
Date: 2007-07-29 06:28:36 -0700 (Sun, 29 Jul 2007)
Log Message:
-----------
palmtt3: small fix's after UPDATE to 2.6.21-hnd3
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/Kconfig
linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c
linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3_battery.c
linux4palm/linux/trunk/include/linux/mfd/tsc2101.h
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/Kconfig
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/Kconfig 2007-07-29 01:22:46 UTC (rev 1216)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/Kconfig 2007-07-29 13:28:36 UTC (rev 1217)
@@ -8,7 +8,8 @@
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.
+ 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"
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c 2007-07-29 01:22:46 UTC (rev 1216)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3.c 2007-07-29 13:28:36 UTC (rev 1217)
@@ -39,7 +39,7 @@
#include <asm/arch/serial.h>
#include <linux/input.h>
-#include <linux/soc/tsc2101.h>
+#include <linux/mfd/tsc2101.h>
#include <asm/arch/pxa-pm_ll.h>
#include <asm/arch/palmtt3-gpio.h>
#include <asm/arch/palmtt3-init.h>
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-29 01:22:46 UTC (rev 1216)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtt3/palmtt3_battery.c 2007-07-29 13:28:36 UTC (rev 1217)
@@ -31,7 +31,7 @@
#include <asm/arch/hardware.h>
#include <asm/arch/pxa-regs.h>
-#include <linux/soc/tsc2101.h>
+#include <linux/mfd/tsc2101.h>
#include <asm/arch/tps65010.h>
#include <asm/arch/palmtt3-gpio.h>
Modified: linux4palm/linux/trunk/include/linux/mfd/tsc2101.h
===================================================================
--- linux4palm/linux/trunk/include/linux/mfd/tsc2101.h 2007-07-29 01:22:46 UTC (rev 1216)
+++ linux4palm/linux/trunk/include/linux/mfd/tsc2101.h 2007-07-29 13:28:36 UTC (rev 1217)
@@ -29,7 +29,7 @@
spinlock_t lock;
int pendown;
struct tsc2101_platform_info *platform;
- struct input_dev inputdevice;
+ struct input_dev *inputdevice;
struct timer_list ts_timer;
struct timer_list misc_timer;
struct tsc2101_misc_data miscdata;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2007-08-14 13:07:47
|
Revision: 1238
http://hackndev.svn.sourceforge.net/hackndev/?rev=1238&view=rev
Author: marex_z71
Date: 2007-08-14 06:07:46 -0700 (Tue, 14 Aug 2007)
Log Message:
-----------
PalmTX: complete and working PCMCIA driver
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c
linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_pcmcia.c
linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c 2007-08-13 07:41:18 UTC (rev 1237)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c 2007-08-14 13:07:46 UTC (rev 1238)
@@ -399,23 +399,16 @@
static struct map_desc palmtx_io_desc[] __initdata = {
{
.virtual = 0xf0000000,
- .pfn = __phys_to_pfn(0x20000000),
+ .pfn = __phys_to_pfn(0x28000000),
.length = 0x00100000,
.type = MT_DEVICE
},
- {
- .virtual = 0xf1000000,
- .pfn = __phys_to_pfn(0x30000000),
- .length = 0x00100000,
- .type = MT_DEVICE
- },
};
-
+
static void __init palmtx_map_io(void)
{
pxa_map_io();
-
iotable_init(palmtx_io_desc, ARRAY_SIZE(palmtx_io_desc));
}
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_pcmcia.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_pcmcia.c 2007-08-13 07:41:18 UTC (rev 1237)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_pcmcia.c 2007-08-14 13:07:46 UTC (rev 1238)
@@ -2,7 +2,7 @@
Driver for Palm T|X PCMCIA
- (C) 2007 by Marek Vasut <mar...@gm...>
+ Copyright (C) 2007 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 as published by
@@ -50,19 +50,32 @@
#define palmtx_pcmcia_dbg(format, args...) do {} while (0)
#endif
-/* GPIO defines */
-#define PALMTX_PCMCIA_IRQ 116
-#define PALMTX_PCMCIA_POWER 94
-#define PALMTX_PCMCIA_RESET 108
-/* other possible GPIOs - 46 and 70 ? */
+static struct pcmcia_irqs palmtx_socket_state_irqs[] = {
+};
static int palmtx_pcmcia_hw_init (struct soc_pcmcia_socket *skt)
{
-/* set_irq_type(PALMTX_PCMCIA_IRQ, IRQT_FALLING);*/ /* turns off backlight :-/ */
- skt->irq = IRQ_GPIO(PALMTX_PCMCIA_IRQ);
+ GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) |
+ GPIO_bit(GPIO49_nPWE) |
+ GPIO_bit(GPIO85_nPCE_1_MD) |
+ GPIO_bit(GPIO53_nPCE_2_MD) |
+ GPIO_bit(GPIO54_pSKTSEL_MD) |
+ GPIO_bit(GPIO55_nPREG_MD) |
+ GPIO_bit(GPIO56_nPWAIT_MD);
+ pxa_gpio_mode(GPIO48_nPOE_MD);
+ pxa_gpio_mode(GPIO49_nPWE_MD);
+ pxa_gpio_mode(GPIO85_nPCE_1_MD);
+ pxa_gpio_mode(GPIO53_nPCE_2_MD);
+ pxa_gpio_mode(GPIO54_pSKTSEL_MD);
+ pxa_gpio_mode(GPIO55_nPREG_MD);
+ pxa_gpio_mode(GPIO56_nPWAIT_MD);
+
+ skt->irq = IRQ_GPIO(GPIO_NR_PALMTX_PCMCIA_READY);
+
palmtx_pcmcia_dbg("%s:%i, Socket:%d\n", __FUNCTION__, __LINE__, skt->nr);
- return 0;
+ return soc_pcmcia_request_irqs(skt, palmtx_socket_state_irqs,
+ ARRAY_SIZE(palmtx_socket_state_irqs));
}
static void palmtx_pcmcia_hw_shutdown (struct soc_pcmcia_socket *skt)
@@ -75,10 +88,10 @@
palmtx_pcmcia_socket_state (struct soc_pcmcia_socket *skt, struct pcmcia_state *state)
{
state->detect = 1; /* always inserted */
- state->ready = GET_GPIO(PALMTX_PCMCIA_IRQ) ? 1 : 0;
+ state->ready = GET_PALMTX_GPIO(PCMCIA_READY) ? 1 : 0;
state->bvd1 = 1;
state->bvd2 = 1;
- state->wrprot = 1;
+ state->wrprot = 0;
state->vs_3v = 1;
state->vs_Xv = 0;
}
@@ -89,8 +102,9 @@
palmtx_pcmcia_dbg("%s:%i Reset:%d Vcc:%d\n", __FUNCTION__, __LINE__,
(state->flags & SS_RESET) ? 1 : 0, state->Vcc);
- SET_GPIO(PALMTX_PCMCIA_POWER, 1);
- SET_GPIO(PALMTX_PCMCIA_RESET, (state->flags & SS_RESET) ? 1 : 0);
+ SET_PALMTX_GPIO(PCMCIA_POWER1, 1);
+ SET_PALMTX_GPIO(PCMCIA_POWER2, 1);
+ SET_PALMTX_GPIO(PCMCIA_RESET, (state->flags & SS_RESET) ? 1 : 0);
return 0;
}
@@ -109,7 +123,7 @@
.owner = THIS_MODULE,
.first = 0,
- .nr = 2,
+ .nr = 1,
.hw_init = palmtx_pcmcia_hw_init,
.hw_shutdown = palmtx_pcmcia_hw_shutdown,
Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2007-08-13 07:41:18 UTC (rev 1237)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2007-08-14 13:07:46 UTC (rev 1238)
@@ -7,6 +7,7 @@
*
* Authors: Cristiano P. <cristianop AT users DOT sourceforge DOT net>
* Jan Herman <2hp AT seznam DOT cz>
+ * Marek Vasut <marek.vasut AT gmail DOT com>
*
* 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
@@ -83,10 +84,10 @@
#define GPIO_NR_PALMTX_BT_UART_CTS_MD (GPIO_NR_PALMTX_BT_CTS | GPIO_ALT_FN_1_IN)
#define GPIO_NR_PALMTX_BT_UART_RTS_MD (GPIO_NR_PALMTX_BT_RTS | GPIO_ALT_FN_2_OUT)
-/* WiFi */
-
-#define GPIO_NR_PALMTX_WIFI_POWER 94
-#define GPIO_NR_PALMTX_WIFI_RESET 108
+/* PCMCIA (WiFi) */
+#define GPIO_NR_PALMTX_PCMCIA_POWER1 94
+#define GPIO_NR_PALMTX_PCMCIA_POWER2 108
+#define GPIO_NR_PALMTX_PCMCIA_RESET 79
#define GPIO_NR_PALMTX_PCMCIA_READY 116
/* INTERRUPTS */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2007-08-18 16:13:49
|
Revision: 1240
http://hackndev.svn.sourceforge.net/hackndev/?rev=1240&view=rev
Author: marex_z71
Date: 2007-08-18 09:13:40 -0700 (Sat, 18 Aug 2007)
Log Message:
-----------
PalmTX: UNTESTED NAND Flash driver ... looking for stunts ;-)
Modified Paths:
--------------
linux4palm/linux/trunk/drivers/mtd/nand/Kconfig
linux4palm/linux/trunk/drivers/mtd/nand/Makefile
linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h
Added Paths:
-----------
linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c
Modified: linux4palm/linux/trunk/drivers/mtd/nand/Kconfig
===================================================================
--- linux4palm/linux/trunk/drivers/mtd/nand/Kconfig 2007-08-14 15:02:54 UTC (rev 1239)
+++ linux4palm/linux/trunk/drivers/mtd/nand/Kconfig 2007-08-18 16:13:40 UTC (rev 1240)
@@ -51,6 +51,12 @@
help
This enables the driver for the iPAQ h1900 flash.
+config MTD_NAND_PALMTX
+ tristate "Palm T|X NAND flash (!UNTESTED!)"
+ depends on MTD_NAND && ARCH_PXA && MTD_PARTITIONS
+ help
+ This enables the driver for the Palm T|X NAND flash.
+
config MTD_NAND_SPIA
tristate "NAND Flash device on SPIA board"
depends on ARCH_P720T && MTD_NAND
Modified: linux4palm/linux/trunk/drivers/mtd/nand/Makefile
===================================================================
--- linux4palm/linux/trunk/drivers/mtd/nand/Makefile 2007-08-14 15:02:54 UTC (rev 1239)
+++ linux4palm/linux/trunk/drivers/mtd/nand/Makefile 2007-08-18 16:13:40 UTC (rev 1240)
@@ -18,6 +18,7 @@
obj-$(CONFIG_MTD_NAND_HAMCOP) += hamcop_nand.o
obj-$(CONFIG_MTD_NAND_DISKONCHIP) += diskonchip.o
obj-$(CONFIG_MTD_NAND_H1900) += h1910.o
+obj-$(CONFIG_MTD_NAND_PALMTX) += palmtx.o
obj-$(CONFIG_MTD_NAND_RTC_FROM4) += rtc_from4.o
obj-$(CONFIG_MTD_NAND_SHARPSL) += sharpsl.o
obj-$(CONFIG_MTD_NAND_TS7250) += ts7250.o
Added: linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c
===================================================================
--- linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c (rev 0)
+++ linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c 2007-08-18 16:13:40 UTC (rev 1240)
@@ -0,0 +1,191 @@
+/*
+ * drivers/mtd/nand/palmtx.c
+ *
+ * Copyright (C) 2007 Marek Vasut (mar...@gm...)
+ *
+ * Derived from drivers/mtd/nand/h1910.c
+ * Copyright (C) 2003 Joshua Wise (jo...@jo...)
+ *
+ * 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.
+ *
+ * Overview:
+ * This is a device driver for the NAND flash device found on the
+ * Palm T|X board which utilizes the Samsung K9F1G08U0A part. This is
+ * a 1Gbit (128MiB x 8 bits) NAND flash device.
+ */
+
+#include <linux/slab.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/nand.h>
+#include <linux/mtd/partitions.h>
+#include <asm/io.h>
+#include <asm/sizes.h>
+#include <asm/arch/palmtx-gpio.h>
+#include <asm/arch/pxa-regs.h>
+#include <asm/setup.h>
+#include <asm/memory.h>
+#include <asm/mach-types.h>
+
+#define PALMTX_NAND_BASE 0x08000000
+
+/*
+ * MTD structure
+ */
+static struct mtd_info *palmtx_nand_mtd = NULL;
+
+/*
+ * Module stuff
+ */
+
+#ifdef CONFIG_MTD_PARTITIONS
+/*
+ * Define static partitions for flash device
+ */
+static struct mtd_partition partition_info[] = {
+ {name:"PalmTX NAND Flash",
+ offset:0,
+ size:128 * 1024 * 1024}
+};
+
+#define NUM_PARTITIONS 1
+
+#endif
+
+/*
+ * hardware specific access to control-lines
+ *
+ * NAND_NCE: bit 0 - don't care
+ * NAND_CLE: bit 1 - address bit 2
+ * NAND_ALE: bit 2 - address bit 3
+ */
+static void palmtx_hwcontrol(struct mtd_info *mtd, int cmd,
+ unsigned int ctrl)
+{
+ struct nand_chip *chip = mtd->priv;
+
+ if (cmd != NAND_CMD_NONE)
+ writeb(cmd, (void __iomem *)((unsigned long)chip->IO_ADDR_W | ((ctrl & 0x6) << 1)));
+}
+
+/*
+ * read device ready pin
+ */
+static int palmtx_device_ready(struct mtd_info *mtd)
+{
+ return GET_PALMTX_GPIO(NAND_READY);
+}
+
+/*
+ * Main initialization routine
+ */
+static int __init palmtx_init(void)
+{
+ struct nand_chip *this;
+ const char *part_type = 0;
+ int mtd_parts_nb = 0;
+ struct mtd_partition *mtd_parts = 0;
+ void __iomem *nandaddr;
+
+ if (!machine_is_xscale_palmtx())
+ return -ENODEV;
+
+ nandaddr = ioremap(PALMTX_NAND_BASE, 0x1000);
+ if (!nandaddr) {
+ printk("Failed to ioremap NAND flash.\n");
+ return -ENOMEM;
+ }
+
+ /* Allocate memory for MTD device structure and private data */
+ palmtx_nand_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL);
+ if (!palmtx_nand_mtd) {
+ printk("Unable to allocate palmtx NAND MTD device structure.\n");
+ iounmap((void *)nandaddr);
+ return -ENOMEM;
+ }
+
+ /* Get pointer to private data */
+ this = (struct nand_chip *)(&palmtx_nand_mtd[1]);
+
+ /* Initialize structures */
+ memset(palmtx_nand_mtd, 0, sizeof(struct mtd_info));
+ memset(this, 0, sizeof(struct nand_chip));
+
+ /* Link the private data with the MTD structure */
+ palmtx_nand_mtd->priv = this;
+ palmtx_nand_mtd->owner = THIS_MODULE;
+
+ /*
+ * Enable VPEN
+ */
+ SET_PALMTX_GPIO(NAND_POWER, 1);
+
+ /* insert callbacks */
+ this->IO_ADDR_R = nandaddr;
+ this->IO_ADDR_W = nandaddr;
+ this->cmd_ctrl = palmtx_hwcontrol;
+#if 0
+ this->dev_ready = palmtx_device_ready;
+#else
+ this->dev_ready = NULL;
+#endif
+ /* 15 us command delay time */
+ this->chip_delay = 50;
+ this->ecc.mode = NAND_ECC_SOFT;
+ this->options = NAND_NO_AUTOINCR;
+
+ /* Scan to find existence of the device */
+ if (nand_scan(palmtx_nand_mtd, 1)) {
+ printk(KERN_NOTICE "No NAND device - returning -ENXIO\n");
+ kfree(palmtx_nand_mtd);
+ iounmap((void *)nandaddr);
+ return -ENXIO;
+ }
+#ifdef CONFIG_MTD_CMDLINE_PARTS
+ mtd_parts_nb = parse_cmdline_partitions(palmtx_nand_mtd, &mtd_parts, "palmtx-nand");
+ if (mtd_parts_nb > 0)
+ part_type = "command line";
+ else
+ mtd_parts_nb = 0;
+#endif
+ if (mtd_parts_nb == 0) {
+ mtd_parts = partition_info;
+ mtd_parts_nb = NUM_PARTITIONS;
+ part_type = "static";
+ }
+
+ /* Register the partitions */
+ printk(KERN_NOTICE "Using %s partition definition\n", part_type);
+ add_mtd_partitions(palmtx_nand_mtd, mtd_parts, mtd_parts_nb);
+
+ /* Return happy */
+ return 0;
+}
+
+module_init(palmtx_init);
+
+/*
+ * Clean up routine
+ */
+static void __exit palmtx_cleanup(void)
+{
+ struct nand_chip *this = (struct nand_chip *)&palmtx_nand_mtd[1];
+
+ /* Release resources, unregister device */
+ nand_release(palmtx_nand_mtd);
+
+ /* Release io resource */
+ iounmap((void *)this->IO_ADDR_W);
+
+ /* Free the MTD device structure */
+ kfree(palmtx_nand_mtd);
+}
+
+module_exit(palmtx_cleanup);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Marek Vasut <mar...@gm...>");
+MODULE_DESCRIPTION("NAND flash driver for Palm T|X");
Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2007-08-14 15:02:54 UTC (rev 1239)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2007-08-18 16:13:40 UTC (rev 1240)
@@ -90,6 +90,11 @@
#define GPIO_NR_PALMTX_PCMCIA_RESET 79
#define GPIO_NR_PALMTX_PCMCIA_READY 116
+/* NAND Flash ... these GPIOs are probably incorrect! */
+#define GPIO_NR_PALMTX_NAND_POWER 19
+#define GPIO_NR_PALMTX_NAND_READY 37
+
+
/* INTERRUPTS */
#define IRQ_GPIO_PALMTX_SD_DETECT_N IRQ_GPIO(GPIO_NR_PALMTX_SD_DETECT_N)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2007-08-18 19:13:02
|
Revision: 1241
http://hackndev.svn.sourceforge.net/hackndev/?rev=1241&view=rev
Author: marex_z71
Date: 2007-08-18 12:12:55 -0700 (Sat, 18 Aug 2007)
Log Message:
-----------
PalmTX: move defines to correct place
Modified Paths:
--------------
linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c
linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h
Modified: linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c
===================================================================
--- linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c 2007-08-18 16:13:40 UTC (rev 1240)
+++ linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c 2007-08-18 19:12:55 UTC (rev 1241)
@@ -30,8 +30,6 @@
#include <asm/memory.h>
#include <asm/mach-types.h>
-#define PALMTX_NAND_BASE 0x08000000
-
/*
* MTD structure
*/
@@ -93,7 +91,7 @@
if (!machine_is_xscale_palmtx())
return -ENODEV;
- nandaddr = ioremap(PALMTX_NAND_BASE, 0x1000);
+ nandaddr = ioremap(PALMTX_PHYS_NAND_START, 0x1000);
if (!nandaddr) {
printk("Failed to ioremap NAND flash.\n");
return -ENOMEM;
Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h 2007-08-18 16:13:40 UTC (rev 1240)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h 2007-08-18 19:12:55 UTC (rev 1241)
@@ -21,9 +21,11 @@
/* Various addresses */
-#define PALMTX_PHYS_RAM_START 0xa0000000
-#define PALMTX_PHYS_IO_START 0x40000000
+#define PALMTX_PHYS_FLASH_START 0x00000000 /* ChipSelect 0 */
+#define PALMTX_PHYS_NAND_START 0x04000000 /* ChipSelect 1 */
+#define PALMTX_PHYS_RAM_START 0xa0000000
+#define PALMTX_PHYS_IO_START 0x40000000
/* LCD REGISTERS */
#define PALMTX_INIT_LCD_LLC0 LCCR0_ENB | LCCR0_Color | LCCR0_Sngl | LCCR0_LDM | \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2007-08-18 20:13:11
|
Revision: 1244
http://hackndev.svn.sourceforge.net/hackndev/?rev=1244&view=rev
Author: marex_z71
Date: 2007-08-18 13:13:05 -0700 (Sat, 18 Aug 2007)
Log Message:
-----------
PalmTX: border switch driver
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Kconfig
linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile
linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h
Added Paths:
-----------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_border.c
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Kconfig
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Kconfig 2007-08-18 19:59:45 UTC (rev 1243)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Kconfig 2007-08-18 20:13:05 UTC (rev 1244)
@@ -33,3 +33,8 @@
help
This driver handles the CF/PCCARD/PCMCIA bus.
+config PALMTX_BORDER
+ tristate "Palm TX Display border switch"
+ depends on MACH_XSCALE_PALMTX
+ help
+ Enable support for turning LCD border on/off
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile 2007-08-18 19:59:45 UTC (rev 1243)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile 2007-08-18 20:13:05 UTC (rev 1244)
@@ -6,3 +6,4 @@
obj-$(CONFIG_PALMTX_BATTERY) += palmtx_battery.o
obj-$(CONFIG_PALMTX_PM) += palmtx_pm.o
obj-$(CONFIG_PALMTX_PCMCIA) += palmtx_pcmcia.o
+obj-$(CONFIG_PALMTX_BORDER) += palmtx_border.o
Added: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_border.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_border.c (rev 0)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_border.c 2007-08-18 20:13:05 UTC (rev 1244)
@@ -0,0 +1,100 @@
+/*
+ * Palm T|X LCD Border switch
+ *
+ * Copyright (C) 2007 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.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+
+#include <asm/arch/hardware.h>
+#include <asm/arch/palmtx-gpio.h>
+
+static ssize_t palmtx_border_write(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ signed long state = simple_strtol(buf, NULL, 10);
+
+ if ( state >= 1 )
+ SET_PALMTX_GPIO(BORDER_SELECT, 1);
+ else
+ SET_PALMTX_GPIO(BORDER_SELECT, 0);
+
+ msleep(50);
+ SET_PALMTX_GPIO(BORDER_SWITCH, 1);
+
+ if ((state == 1) || (state == 0)) /* default - switch border on/off */
+ msleep(200);
+ else { /* hidden functionality - colored border */
+ if (state >= 0)
+ msleep(state);
+ else
+ msleep(-state);
+ }
+
+ SET_PALMTX_GPIO(BORDER_SWITCH, 0);
+
+ return count;
+}
+
+static ssize_t palmtx_border_read(struct device *dev,
+ struct device_attribute *attr,
+ char *buf)
+{
+ return strlcpy(buf, GET_PALMTX_GPIO(BORDER_SELECT) ? "1\n" : "0\n", 3);
+}
+
+static DEVICE_ATTR(border_power, 0644, palmtx_border_read, palmtx_border_write);
+
+static struct attribute *palmtx_border_attrs[] = {
+ &dev_attr_border_power.attr,
+ NULL
+};
+
+static struct attribute_group palmtx_border_attr_group = {
+ .attrs = palmtx_border_attrs,
+};
+
+static int __devinit palmtx_border_probe(struct platform_device *pdev)
+{
+ return sysfs_create_group(&pdev->dev.kobj, &palmtx_border_attr_group);
+}
+
+static int palmtx_border_remove(struct platform_device *pdev)
+{
+ sysfs_remove_group(&pdev->dev.kobj, &palmtx_border_attr_group);
+ return 0;
+}
+
+static struct platform_driver palmtx_border_driver = {
+ .probe = palmtx_border_probe,
+ .remove = palmtx_border_remove,
+ .suspend = NULL,
+ .resume = NULL,
+ .driver = {
+ .name = "palmtx-border",
+ }
+};
+
+static int __init palmtx_border_init(void)
+{
+ return platform_driver_register(&palmtx_border_driver);
+}
+
+static void palmtx_border_exit(void)
+{
+ platform_driver_unregister(&palmtx_border_driver);
+}
+
+module_init(palmtx_border_init);
+module_exit(palmtx_border_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Marek Vasut <mar...@gm...>");
+MODULE_DESCRIPTION("Palm T|X Border switch");
Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2007-08-18 19:59:45 UTC (rev 1243)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2007-08-18 20:13:05 UTC (rev 1244)
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* GPIOs and interrupts for Palm TX Handheld Computer
*
* Based on palmld-gpio.h by Alex Osborne
@@ -23,6 +21,7 @@
/*
* WORK IN PROGRESS
*/
+#include <asm/arch/pxa-regs.h>
#ifndef _INCLUDE_PALMTX_GPIO_H_
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2007-08-20 17:05:23
|
Revision: 1249
http://hackndev.svn.sourceforge.net/hackndev/?rev=1249&view=rev
Author: marex_z71
Date: 2007-08-20 10:05:21 -0700 (Mon, 20 Aug 2007)
Log Message:
-----------
PalmTX: add some tweaks to still not working NAND flash driver
Modified Paths:
--------------
linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c
linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h
Modified: linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c
===================================================================
--- linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c 2007-08-20 16:06:44 UTC (rev 1248)
+++ linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c 2007-08-20 17:05:21 UTC (rev 1249)
@@ -67,7 +67,7 @@
struct nand_chip *chip = mtd->priv;
if (cmd != NAND_CMD_NONE)
- writeb(cmd, (void __iomem *)((unsigned long)chip->IO_ADDR_W | ((ctrl & 0x6) << 1)));
+ writeb(cmd, (void __iomem *)((unsigned long)chip->IO_ADDR_W));
}
/*
@@ -118,9 +118,11 @@
palmtx_nand_mtd->owner = THIS_MODULE;
/*
- * Enable VPEN
+ * Enable VPEN ... isnt it on all the time?
*/
+#if 0
SET_PALMTX_GPIO(NAND_POWER, 1);
+#endif
/* insert callbacks */
this->IO_ADDR_R = nandaddr;
Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h 2007-08-20 16:06:44 UTC (rev 1248)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h 2007-08-20 17:05:21 UTC (rev 1249)
@@ -19,10 +19,12 @@
#define _INCLUDE_PALMTX_INIT_H_
+#include <asm/arch/pxa-regs.h>
+
/* Various addresses */
-#define PALMTX_PHYS_FLASH_START 0x00000000 /* ChipSelect 0 */
-#define PALMTX_PHYS_NAND_START 0x04000000 /* ChipSelect 1 */
+#define PALMTX_PHYS_FLASH_START PXA_CS0_PHYS /* ChipSelect 0 */
+#define PALMTX_PHYS_NAND_START PXA_CS1_PHYS /* ChipSelect 1 */
#define PALMTX_PHYS_RAM_START 0xa0000000
#define PALMTX_PHYS_IO_START 0x40000000
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2007-08-20 22:56:20
|
Revision: 1250
http://hackndev.svn.sourceforge.net/hackndev/?rev=1250&view=rev
Author: marex_z71
Date: 2007-08-20 15:56:19 -0700 (Mon, 20 Aug 2007)
Log Message:
-----------
PalmTX: more realistic approach of NAND flash driver ... iolines mapped to CS1 and gpio driven control lines
Modified Paths:
--------------
linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c
linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h
Modified: linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c
===================================================================
--- linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c 2007-08-20 17:05:21 UTC (rev 1249)
+++ linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c 2007-08-20 22:56:19 UTC (rev 1250)
@@ -31,6 +31,19 @@
#include <asm/memory.h>
#include <asm/mach-types.h>
+/* Select the chip by setting nCE to low */
+#define NAND_CTL_SETNCE 1
+/* Deselect the chip by setting nCE to high */
+#define NAND_CTL_CLRNCE 2
+/* Select the command latch by setting CLE to high */
+#define NAND_CTL_SETCLE 3
+/* Deselect the command latch by setting CLE to low */
+#define NAND_CTL_CLRCLE 4
+/* Select the address latch by setting ALE to high */
+#define NAND_CTL_SETALE 5
+/* Deselect the address latch by setting ALE to low */
+#define NAND_CTL_CLRALE 6
+
/*
* MTD structure
*/
@@ -56,16 +69,34 @@
/*
* hardware specific access to control-lines
- *
- * NAND_NCE: bit 0 - don't care
- * NAND_CLE: bit 1 - address bit 2
- * NAND_ALE: bit 2 - address bit 3
*/
static void palmtx_hwcontrol(struct mtd_info *mtd, int cmd,
unsigned int ctrl)
{
struct nand_chip *chip = mtd->priv;
+ if (ctrl & NAND_CTRL_CHANGE) {
+ switch (cmd) {
+ case NAND_CTL_SETCLE:
+ SET_PALMTX_GPIO(NAND_CLE,1);
+ break;
+ case NAND_CTL_CLRCLE:
+ SET_PALMTX_GPIO(NAND_CLE,0);
+ break;
+ case NAND_CTL_SETALE:
+ SET_PALMTX_GPIO(NAND_ALE,1);
+ break;
+ case NAND_CTL_CLRALE:
+ SET_PALMTX_GPIO(NAND_ALE,0);
+ break;
+ case NAND_CTL_SETNCE:
+ SET_PALMTX_GPIO(NAND_NCE,1);
+ break;
+ case NAND_CTL_CLRNCE:
+ SET_PALMTX_GPIO(NAND_NCE,0);
+ break;
+ }
+ }
if (cmd != NAND_CMD_NONE)
writeb(cmd, (void __iomem *)((unsigned long)chip->IO_ADDR_W));
}
Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2007-08-20 17:05:21 UTC (rev 1249)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2007-08-20 22:56:19 UTC (rev 1250)
@@ -97,7 +97,10 @@
/* NAND Flash ... these GPIOs are probably incorrect! */
#define GPIO_NR_PALMTX_NAND_POWER 19
-#define GPIO_NR_PALMTX_NAND_READY 37
+#define GPIO_NR_PALMTX_NAND_READY 115
+#define GPIO_NR_PALMTX_NAND_CLE 79
+#define GPIO_NR_PALMTX_NAND_ALE 113
+#define GPIO_NR_PALMTX_NAND_NCE 114
/* INTERRUPTS */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2007-08-21 10:56:35
|
Revision: 1251
http://hackndev.svn.sourceforge.net/hackndev/?rev=1251&view=rev
Author: marex_z71
Date: 2007-08-21 03:56:33 -0700 (Tue, 21 Aug 2007)
Log Message:
-----------
HTC_Beetles: major update
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/htcsable/Kconfig
linux4palm/linux/trunk/arch/arm/mach-pxa/htcsable/Makefile
linux4palm/linux/trunk/arch/arm/mach-pxa/htcsable/htcsable.c
linux4palm/linux/trunk/arch/arm/mach-pxa/htcsable/htcsable_rom.c
Removed Paths:
-------------
linux4palm/linux/trunk/arch/arm/mach-pxa/htcbeetles/
linux4palm/linux/trunk/include/asm-arm/arch-pxa/htcbeetles-asic.h
linux4palm/linux/trunk/include/asm-arm/arch-pxa/htcbeetles-gpio.h
linux4palm/linux/trunk/include/asm-arm/arch-pxa/htcbeetles.h
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/htcsable/Kconfig
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/htcsable/Kconfig 2007-08-20 22:56:19 UTC (rev 1250)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/htcsable/Kconfig 2007-08-21 10:56:33 UTC (rev 1251)
@@ -1,27 +1,64 @@
-menuconfig MACH_HW6900
- bool "HTC Sable (hPaq hw69xx)"
+menuconfig HTC_HW6X00
+ bool "HTC Beetles/Sable (hPaq hw65xx/hw69xx)"
select PXA27x
select BOARD_IRQ_MAP_BIG
select KEYBOARD_GPIO
select KEYBOARD_PXA27x
help
Say Y here if you intend to run this kernel on a
- HTC Sable (iPAQ hw691x). Currently there is only basic support
- for this PDA.
+ HTC Beetles or Sable (iPAQ hw651x or hw691x).
+ Currently there is only basic support for this PDA.
+config MACH_HTCBEETLES
+ bool "HTC Beetles (hPaq hw65xx)"
+ depends on HTC_HW6X00
+ select PXA27x
+ select BOARD_IRQ_MAP_BIG
+ select KEYBOARD_GPIO
+ select KEYBOARD_PXA27x
+ help
+ HTC Beetles (iPAQ hw651x) support.
+
+config MACH_HW6900
+ bool "HTC Sable (hPaq hw69xx)"
+ depends on HTC_HW6X00
+ select PXA27x
+ select BOARD_IRQ_MAP_BIG
+ select KEYBOARD_GPIO
+ select KEYBOARD_PXA27x
+ help
+ HTC Sable (iPAQ hw691x) support.
+
config HTCSABLE_LCD
- tristate "HTC Sable LCD"
- depends on MACH_HW6900 && HTC_ASIC3 && LCD_CLASS_DEVICE
+ tristate "HTC Beetles/Sable LCD"
+ depends on HTC_HW6X00 && ( MACH_HW6900 || MACH_HTCBEETLES ) && HTC_ASIC3 && LCD_CLASS_DEVICE
help
This driver provides support for changing power and brightness
on HTC Sable LCD display.
config HTCSABLE_BACKLIGHT
- bool "HTC Sable Backlight"
- depends on MACH_HW6900 && HTC_ASIC3 && BACKLIGHT_CLASS_DEVICE
+ bool "HTC Beetles/Sable Backlight"
+ depends on HTC_HW6X00 && ( MACH_HW6900 || MACH_HTCBEETLES ) && HTC_ASIC3 && BACKLIGHT_CLASS_DEVICE
help
This driver provides support for changing power and brightness
on HTC Sable LCD backlight.
+config HTCSABLE_ROM
+ bool "HTC Beetles/Sable ROM"
+ depends on HTC_HW6X00 && ( MACH_HW6900 || MACH_HTCBEETLES ) && HTC_ASIC3 && MTD
+ help
+ This driver provides access to devices' ROM
+ (where IPL bootloader) is stored.
+config HTCSABLE_BT
+ bool "HTC Beetles/Sable Bluetooth"
+ depends on HTC_HW6X00 && ( MACH_HW6900 || MACH_HTCBEETLES ) && HTC_ASIC3 && BT
+ help
+ This driver provides support for Bluetooth module.
+
+config HTCSABLE_PHONE
+ bool "HTC Beetles/Sable Phone"
+ depends on HTC_HW6X00 && ( MACH_HW6900 || MACH_HTCBEETLES ) && HTC_ASIC3
+ help
+ This driver provides support for Phone module.
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/htcsable/Makefile
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/htcsable/Makefile 2007-08-20 22:56:19 UTC (rev 1250)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/htcsable/Makefile 2007-08-21 10:56:33 UTC (rev 1251)
@@ -1,16 +1,17 @@
#
# Makefile for HTC Sable
#
-obj-$(CONFIG_MACH_HW6900) += htcsable.o htcsable_udc.o \
+obj-$(CONFIG_MACH_HTCBEETLES) += htcsable.o htcsable_udc.o \
htcsable_ts2.o \
htcsable_pm.o \
htcsable_core.o \
htcsable_keyboard.o \
htcsable_buttons.o \
- htcsable_kbd.o \
- htcsable_bt.o htcsable_phone.o \
- htcsable_rom.o
+ htcsable_kbd.o
-obj-$(CONFIG_HTCSABLE_LCD) += htcsable_lcd.o
-obj-$(CONFIG_HTCSABLE_BACKLIGHT) += htcsable_bl.o
+obj-$(CONFIG_HTCSABLE_BT) += htcsable_bt.o
+obj-$(CONFIG_HTCSABLE_PHONE) += htcsable_phone.o
+obj-$(CONFIG_HTCSABLE_ROM) += htcsable_rom.o
+obj-$(CONFIG_HTCSABLE_LCD) += htcsable_lcd.o
+obj-$(CONFIG_HTCSABLE_BACKLIGHT) += htcsable_bl.o
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/htcsable/htcsable.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/htcsable/htcsable.c 2007-08-20 22:56:19 UTC (rev 1250)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/htcsable/htcsable.c 2007-08-21 10:56:33 UTC (rev 1251)
@@ -33,8 +33,13 @@
#include "../generic.h"
+#ifdef CONFIG_HTCSABLE_BT
#include "htcsable_bt.h"
+#endif
+
+#ifdef CONFIG_HTCSABLE_PHONE
#include "htcsable_phone.h"
+#endif
/*
* * Bluetooth - Relies on other loadable modules, like ASIC3 and Core,
@@ -43,6 +48,7 @@
* * bluetooth (obviously).
* */
+#ifdef CONFIG_HTCSABLE_BT
static struct htcsable_bt_funcs bt_funcs;
static void
@@ -51,7 +57,9 @@
if (bt_funcs.configure != NULL)
bt_funcs.configure( state );
}
+#endif
+#ifdef CONFIG_HTCSABLE_PHONE
static struct htcsable_phone_funcs phone_funcs;
static void
@@ -60,6 +68,7 @@
if (phone_funcs.configure != NULL)
phone_funcs.configure( state );
}
+#endif
static struct pxafb_mode_info htcsable_lcd_modes[] = {
{
@@ -102,6 +111,7 @@
/* Bluetooth */
+#ifdef CONFIG_HTCSABLE_BT
static struct platform_device htcsable_bt = {
.name = "htcsable_bt",
.id = -1,
@@ -109,7 +119,9 @@
.platform_data = &bt_funcs,
},
};
+#endif
+#ifdef CONFIG_HTCSABLE_PHONE
static struct platform_device htcsable_phone = {
.name = "htcsable_phone",
.id = -1,
@@ -117,8 +129,8 @@
.platform_data = &phone_funcs,
},
};
+#endif
-
static struct platform_device *htcsable_asic3_devices[] __initdata = {
&htcsable_ts,
&htcsable_kbd,
@@ -128,8 +140,12 @@
#ifdef CONFIG_HTCSABLE_BACKLIGHT
&htcsable_bl,
#endif
+#ifdef CONFIG_HTCSABLE_BT
&htcsable_bt,
+#endif
+#ifdef CONFIG_HTCSABLE_PHONE
&htcsable_phone,
+#endif
&htcsable_udc,
};
@@ -231,15 +247,20 @@
&htcsable_core,
};
+#ifdef CONFIG_HTCSABLE_BT
static struct platform_pxa_serial_funcs htcsable_pxa_bt_funcs = {
.configure = htcsable_bt_configure,
};
+#endif
+
+#ifdef CONFIG_HTCSABLE_PHONE
static struct platform_pxa_serial_funcs htcsable_pxa_phone_funcs = {
.configure = htcsable_phone_configure,
#if 0
.ioctl = htcsable_phone_ioctl,
#endif
};
+#endif
static void __init htcsable_map_io(void)
{
@@ -248,8 +269,12 @@
pxa_map_io();
/* Is this correct? If yes, please add comment, that vendor was drunk when did soldering. */
+#ifdef CONFIG_HTCSABLE_BT
pxa_set_ffuart_info(&htcsable_pxa_bt_funcs);
+#endif
+#ifdef CONFIG_HTCSABLE_PHONE
pxa_set_btuart_info(&htcsable_pxa_phone_funcs);
+#endif
// sport = platform_get_drvdata(&ffuart device);
// printk("sport=0x%x\n", (unsigned int)sport);
@@ -272,6 +297,18 @@
platform_add_devices( devices, ARRAY_SIZE(devices) );
}
+#ifdef CONFIG_MACH_HTCBEETLES
+MACHINE_START(HTCBEETLES, "HTC Beetles")
+ .phys_io = 0x40000000,
+ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
+ .boot_params = 0xa0000100,
+ .map_io = htcsable_map_io,
+ .init_irq = pxa_init_irq,
+ .timer = &pxa_timer,
+ .init_machine = htcsable_init,
+MACHINE_END
+#endif
+#ifdef CONFIG_MACH_HW6900
MACHINE_START(HW6900, "HTC Sable")
.phys_io = 0x40000000,
.io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
@@ -281,4 +318,4 @@
.timer = &pxa_timer,
.init_machine = htcsable_init,
MACHINE_END
-
+#endif
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/htcsable/htcsable_rom.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/htcsable/htcsable_rom.c 2007-08-20 22:56:19 UTC (rev 1250)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/htcsable/htcsable_rom.c 2007-08-21 10:56:33 UTC (rev 1251)
@@ -37,10 +37,8 @@
{
int retval = 0;
-#if defined(CONFIG_MACH_BLUEANGEL)
- if (! machine_is_sable() )
+ if (!(machine_is_hw6900() || machine_is_htcbeetles()))
return -ENODEV;
-#endif
sable_map.virt = ioremap(sable_map.phys, sable_map.size);
if (!sable_map.virt) {
Deleted: linux4palm/linux/trunk/include/asm-arm/arch-pxa/htcbeetles-asic.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/htcbeetles-asic.h 2007-08-20 22:56:19 UTC (rev 1250)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/htcbeetles-asic.h 2007-08-21 10:56:33 UTC (rev 1251)
@@ -1,39 +0,0 @@
-/*
- * include/asm/arm/arch-pxa/htcbeetles-asic.h
- *
- * Authors: Giuseppe Zompatori <giu...@ya...>
- *
- * based on previews work, see below:
- *
- * include/asm/arm/arch-pxa/hx4700-asic.h
- * Copyright (c) 2004 SDG Systems, LLC
- *
- */
-
-#ifndef _HTCBEETLES_ASIC_H_
-#define _HTCBEETLES_ASIC_H_
-
-#include <asm/hardware/ipaq-asic3.h>
-
-/* ASIC3 */
-
-#define HTCBEETLES_ASIC3_GPIO_PHYS PXA_CS4_PHYS
-#define HTCBEETLES_ASIC3_MMC_PHYS PXA_CS3_PHYS+0x02000000
-
-/* TODO: some information is missing here :) */
-
-/* ASIC3 GPIO A bank */
-
-#define GPIOA_USB_PUEN 7 /* Output */
-
-/* ASIC3 GPIO B bank */
-
-#define GPIOB_USB_DETECT 6 /* Input */
-
-/* ASIC3 GPIO C bank */
-
-/* ASIC3 GPIO D bank */
-
-#endif /* _HTCBEETLES_ASIC_H_ */
-
-extern struct platform_device htcbeetles_asic3;
Deleted: linux4palm/linux/trunk/include/asm-arm/arch-pxa/htcbeetles-gpio.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/htcbeetles-gpio.h 2007-08-20 22:56:19 UTC (rev 1250)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/htcbeetles-gpio.h 2007-08-21 10:56:33 UTC (rev 1251)
@@ -1,80 +0,0 @@
-/*
- * include/asm-arm/arch-pxa/htcbeetles-gpio.h
- * History:
- *
- * 2004-12-10 Michael Opdenacker. Wrote down GPIO settings as identified by Jamey Hicks.
- * Reused the h2200-gpio.h file as a template.
- */
-
-#ifndef _HTCBEETLES_GPIO_H_
-#define _HTCBEETLES_GPIO_H_
-
-#include <asm/arch/pxa-regs.h>
-
-#define GET_HTCBEETLES_GPIO(gpio) \
- (GPLR(GPIO_NR_HTCBEETLES_ ## gpio) & GPIO_bit(GPIO_NR_HTCBEETLES_ ## gpio))
-
-#define SET_HTCBEETLES_GPIO(gpio, setp) \
-do { \
-if (setp) \
- GPSR(GPIO_NR_HTCBEETLES_ ## gpio) = GPIO_bit(GPIO_NR_HTCBEETLES_ ## gpio); \
-else \
- GPCR(GPIO_NR_HTCBEETLES_ ## gpio) = GPIO_bit(GPIO_NR_HTCBEETLES_ ## gpio); \
-} while (0)
-
-#define SET_HTCBEETLES_GPIO_N(gpio, setp) \
-do { \
-if (setp) \
- GPCR(GPIO_NR_HTCBEETLES_ ## gpio ## _N) = GPIO_bit(GPIO_NR_HTCBEETLES_ ## gpio ## _N); \
-else \
- GPSR(GPIO_NR_HTCBEETLES_ ## gpio ## _N) = GPIO_bit(GPIO_NR_HTCBEETLES_ ## gpio ## _N); \
-} while (0)
-
-#define HTCBEETLES_IRQ(gpio) \
- IRQ_GPIO(GPIO_NR_HTCBEETLES_ ## gpio)
-
-#define GPIO_NR_HTCBEETLES_KEY_ON_N 0
-#define GPIO_NR_HTCBEETLES_GP_RST_N 1
-
-#define GPIO_NR_HTCBEETLES_ASIC3_EXT_INT 9
-#define GPIO_NR_HTCBEETLES_ASIC3_SDIO_INT_N 13
-
-#define GPIO_NR_HTCBEETLES_TOUCHPANEL_IRQ_N 115
-
-/* TODO: should be checked */
-
-#define GPIO_NR_HTCBEETLES_TOUCHSCREEN_SPI_CLK_MD (23 | GPIO_ALT_FN_2_IN)
-#define GPIO_NR_HTCBEETLES_TOUCHSCREEN_SPI_CS_N_MD (24 | GPIO_ALT_FN_2_IN)
-#define GPIO_NR_HTCBEETLES_TOUCHSCREEN_SPI_DO_MD (25 | GPIO_ALT_FN_2_OUT)
-#define GPIO_NR_HTCBEETLES_TOUCHSCREEN_SPI_DI_MD (26 | GPIO_ALT_FN_1_IN)
-
-#define GPIO_NR_HTCBEETLES_I2S_BCK_MD (28 | GPIO_ALT_FN_1_OUT)
-#define GPIO_NR_HTCBEETLES_I2S_DIN_MD (29 | GPIO_ALT_FN_2_IN)
-#define GPIO_NR_HTCBEETLES_I2S_DOUT_MD (30 | GPIO_ALT_FN_1_OUT)
-#define GPIO_NR_HTCBEETLES_I2S_SYNC_MD (31 | GPIO_ALT_FN_1_OUT)
-
-#define GPIO_NR_HTCBEETLES_COM_RXD_MD (34 | GPIO_ALT_FN_1_IN)
-#define GPIO_NR_HTCBEETLES_COM_CTS_MD (35 | GPIO_ALT_FN_1_IN)
-
-#define GPIO_NR_HTCBEETLES_COM_TXD_MD (39 | GPIO_ALT_FN_2_OUT)
-#define GPIO_NR_HTCBEETLES_COM_RTS_MD (41 | GPIO_ALT_FN_2_OUT)
-
-#define GPIO_NR_HTCBEETLES_BT_RXD_MD (42 | GPIO_ALT_FN_1_IN)
-#define GPIO_NR_HTCBEETLES_BT_TXD_MD (43 | GPIO_ALT_FN_2_OUT)
-#define GPIO_NR_HTCBEETLES_BT_UART_CTS_MD (44 | GPIO_ALT_FN_1_IN)
-#define GPIO_NR_HTCBEETLES_BT_UART_RTS_MD (45 | GPIO_ALT_FN_2_OUT)
-
-#define GPIO_NR_HTCBEETLES_STD_RXD_MD (46 | GPIO_ALT_FN_2_IN)
-#define GPIO_NR_HTCBEETLES_STD_TXD_MD (47 | GPIO_ALT_FN_1_OUT)
-
-#define GPIO_NR_HTCBEETLES_POE_N_MD (48 | GPIO_ALT_FN_2_OUT | GPIO_DFLT_HIGH)
-#define GPIO_NR_HTCBEETLES_PWE_N_MD (49 | GPIO_ALT_FN_2_OUT | GPIO_DFLT_HIGH)
-
-#define GPIO_NR_HTCBEETLES_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT)
-
-#define GPIO_NR_HTCBEETLES_PWM1OUT_MD (115 | GPIO_ALT_FN_3_OUT)
-
-#define GPIO_NR_HTCBEETLES_I2C_SCL_MD (117 | GPIO_ALT_FN_1_OUT)
-#define GPIO_NR_HTCBEETLES_I2C_SDA_MD (118 | GPIO_ALT_FN_1_OUT)
-
-#endif /* _HTCBEETLES_GPIO_H */
Deleted: linux4palm/linux/trunk/include/asm-arm/arch-pxa/htcbeetles.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/htcbeetles.h 2007-08-20 22:56:19 UTC (rev 1250)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/htcbeetles.h 2007-08-21 10:56:33 UTC (rev 1251)
@@ -1,3 +0,0 @@
-#include <asm/arch/irqs.h>
-
-#define HTCBEETLES_ASIC3_IRQ_BASE IRQ_BOARD_START
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2007-08-23 17:35:33
|
Revision: 1262
http://hackndev.svn.sourceforge.net/hackndev/?rev=1262&view=rev
Author: marex_z71
Date: 2007-08-23 10:35:31 -0700 (Thu, 23 Aug 2007)
Log Message:
-----------
HnD: remove deprecated pxapwm_bl
Modified Paths:
--------------
linux4palm/linux/trunk/drivers/video/backlight/Kconfig
linux4palm/linux/trunk/drivers/video/backlight/Makefile
Removed Paths:
-------------
linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c
linux4palm/linux/trunk/include/asm-arm/arch-pxa/pxapwm-bl.h
Modified: linux4palm/linux/trunk/drivers/video/backlight/Kconfig
===================================================================
--- linux4palm/linux/trunk/drivers/video/backlight/Kconfig 2007-08-23 17:34:23 UTC (rev 1261)
+++ linux4palm/linux/trunk/drivers/video/backlight/Kconfig 2007-08-23 17:35:31 UTC (rev 1262)
@@ -78,14 +78,6 @@
If you have an iPAQ h2200, say Y to enable the backlight driver.
-config BACKLIGHT_PXAPWM
- tristate "PXA PWM Backlight Driver (deprecated)"
- depends on BACKLIGHT_CLASS_DEVICE && ARCH_PXA
- default n
- help
- If your backlight is driven by the PXA PWM, say y to enable the backlight
- driver.
-
config BACKLIGHT_S3C2410
tristate "Samsung S3C2410 Backlight Driver"
depends on (BACKLIGHT_CLASS_DEVICE || LCD_CLASS_DEVICE) && ARCH_S3C2410
Modified: linux4palm/linux/trunk/drivers/video/backlight/Makefile
===================================================================
--- linux4palm/linux/trunk/drivers/video/backlight/Makefile 2007-08-23 17:34:23 UTC (rev 1261)
+++ linux4palm/linux/trunk/drivers/video/backlight/Makefile 2007-08-23 17:35:31 UTC (rev 1262)
@@ -9,6 +9,5 @@
obj-$(CONFIG_BACKLIGHT_HX2750) += hx2750_bl.o
obj-$(CONFIG_BACKLIGHT_H2200) += h2200_bl.o
obj-$(CONFIG_LCD_H2200) += h2200_lcd.o
-obj-$(CONFIG_BACKLIGHT_PXAPWM) += pxapwm_bl.o
obj-$(CONFIG_BACKLIGHT_S3C2410) += s3c2410_lcd.o
Deleted: linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c
===================================================================
--- linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c 2007-08-23 17:34:23 UTC (rev 1261)
+++ linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c 2007-08-23 17:35:31 UTC (rev 1262)
@@ -1,240 +0,0 @@
-/*
- * Support for XScale PWM driven backlights.
- *
- * Authors: Vladimir "Farcaller" Pouzanov <far...@gm...>
- * Alex Osborne <bob...@gm...>
- *
- * Based on Sharp Corgi driver
- *
- */
-
-#warning ---------------------------------------------------------------------
-#warning PXA PWM backlight driver is deperecated, please use corgi_bl instead.
-#warning ---------------------------------------------------------------------
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/spinlock.h>
-#include <linux/fb.h>
-#include <linux/backlight.h>
-#include <asm/arch/pxa-regs.h>
-#include <asm/arch/pxapwm-bl.h>
-
-static struct backlight_ops pxapwmbl_ops;
-static void (*pxapwmbl_mach_turn_bl_on)(void);
-static void (*pxapwmbl_mach_turn_bl_off)(void);
-
-static void pxapwmbl_send_intensity(struct pxapwmbl_platform_data *bl, int intensity)
-{
- unsigned long flags;
- unsigned int period, prescaler;
-
- if (bl->limit)
- intensity &= bl->limit_mask;
-
- // set intensity to 0 if in power saving or fb is blanked
- if (bl->dev->props.power != FB_BLANK_UNBLANK)
- intensity = 0;
- if (bl->dev->props.fb_blank != FB_BLANK_UNBLANK)
- intensity = 0;
-
- /* Does the backlight frequency need to be configured on a per device basis?
- * What are sensible defaults? Farcaller had prescaler 2, period 0x12bi (~6.1khz).
- * LD is configured for 1.2khz.
- *
- * h2200_lcd says "450 Hz which is quite enough."
- */
- if (intensity) {
- period = bl->period;
- prescaler = bl->prescaler;
- } else {
- period = 0;
- prescaler=0;
- }
-
- //printk("pxapwmbl: setting intensity to %d [bl->intensity=%d]\n", intensity, bl->intensity);
- spin_lock_irqsave(&bl->lock, flags);
-
- // poweron backlight if possible and needed
- if (pxapwmbl_mach_turn_bl_on){
- if ((bl->intensity <= bl->off_threshold) && (intensity > bl->off_threshold)){
- pxapwmbl_mach_turn_bl_on();
- }
- }
-
- //printk("pxapwmbl: setting intensity to %d [bl->intensity = %d]\n", intensity, bl->intensity);
- switch (bl->pwm) {
- case 0:
- PWM_CTRL0 = prescaler;
- PWM_PWDUTY0 = intensity;
- PWM_PERVAL0 = period;
- break;
- case 1:
- PWM_CTRL1 = prescaler;
- PWM_PWDUTY1 = intensity;
- PWM_PERVAL1 = period;
- break;
-
- /* Note: PXA270 has 2 more PWMs, however the registers don't seem to be
- * defined in pxa-regs.h. If you have device which uses PWM 2 or 3,
- * you'll need to add them here.
- */
-
- default:
- printk(KERN_ERR "pxapwmbl_send_intensity: invalid PWM selected in"
- " platform data.\n");
- }
-
- // poweroff backlight if possible and needed
- if (pxapwmbl_mach_turn_bl_off){
- if ((bl->intensity > bl->off_threshold) && (intensity <= bl->off_threshold)){
- pxapwmbl_mach_turn_bl_off();
- }
- }
-
- bl->dev->props.brightness = intensity;
- bl->intensity=intensity;
-
- spin_unlock_irqrestore(&bl->lock, flags);
-}
-
-#ifdef CONFIG_PM
-static int stored_intensity = 0;
-static int pxapwmbl_suspend(struct platform_device *pdev, pm_message_t state)
-{
- struct pxapwmbl_platform_data *bl = pdev->dev.platform_data;
- stored_intensity = bl->intensity;
- pxapwmbl_send_intensity(bl, 0);
- return 0;
-}
-
-static int pxapwmbl_resume(struct platform_device *pdev)
-{
- struct pxapwmbl_platform_data *bl = pdev->dev.platform_data;
- pxapwmbl_send_intensity(bl,stored_intensity);
- return 0;
-}
-#else
-#define pxapwmbl_suspend NULL
-#define pxapwmbl_resume NULL
-#endif
-
-static int pxapwmbl_update_status(struct backlight_device *bd)
-{
- int intensity;
- struct pxapwmbl_platform_data *bl = class_get_devdata(&bd->class_dev);
-
- intensity = bd->props.brightness;
-
- if (intensity > bd->props.max_brightness)
- intensity = bd->props.max_brightness;
-
- if (intensity < 0)
- intensity = 0;
-
- pxapwmbl_send_intensity(bl, intensity);
-
- return 0;
-}
-
-static int pxapwmbl_get_intensity(struct backlight_device *bd)
-{
- struct pxapwmbl_platform_data *bl = class_get_devdata(&bd->class_dev);
- return bl->intensity;
-}
-
-/*
- * Called when the battery is low to limit the backlight intensity.
- * If limit==0 clear any limit, otherwise limit the intensity
- */
-void pxapwmbl_limit_intensity(struct platform_device *pdev, int limit)
-{
- struct pxapwmbl_platform_data *bl = pdev->dev.platform_data;
-
- bl->limit = (limit ? 1 : 0);
- pxapwmbl_send_intensity(bl, bl->intensity);
-}
-EXPORT_SYMBOL(pxapwmbl_limit_intensity);
-
-static struct backlight_ops pxapwmbl_ops = {
- .get_brightness = pxapwmbl_get_intensity,
- .update_status = pxapwmbl_update_status,
-};
-
-static int pxapwmbl_probe(struct platform_device *pdev)
-{
- struct pxapwmbl_platform_data *bl = pdev->dev.platform_data;
-
- bl->dev = backlight_device_register ("pxapwm-bl", &pdev->dev,
- bl, &pxapwmbl_ops);
-
- bl->dev->props.max_brightness = bl->max_intensity;
-
- pxapwmbl_mach_turn_bl_on = bl->turn_bl_on;
- pxapwmbl_mach_turn_bl_off = bl->turn_bl_off;
-
- bl->limit = 0;
- bl->lock = SPIN_LOCK_UNLOCKED;
-
- bl->dev->props.brightness = bl->default_intensity;
- bl->dev->props.power = FB_BLANK_UNBLANK;
- bl->dev->props.fb_blank = FB_BLANK_UNBLANK;
-
- bl->off_threshold = 5;
-
- if (IS_ERR (bl->dev))
- return PTR_ERR (bl->dev);
-
- platform_set_drvdata(pdev, bl->dev);
-
- pxapwmbl_send_intensity(bl, bl->default_intensity);
- CKEN = CKEN | (bl->pwm?CKEN1_PWM1:CKEN0_PWM0);
- bl->intensity = bl->default_intensity;
- pxapwmbl_limit_intensity(pdev, 0);
-
- printk("PXA PWM backlight driver initialized.\n");
- return 0;
-}
-
-static int pxapwmbl_remove(struct platform_device *pdev)
-{
- struct pxapwmbl_platform_data *bl = pdev->dev.platform_data;
-
- pxapwmbl_send_intensity(bl, bl->default_intensity);
-
- backlight_device_unregister(bl->dev);
-
- printk("PXA PWM backlight driver unloaded\n");
- return 0;
-}
-
-static struct platform_driver pxapwmbl_driver = {
- .probe = pxapwmbl_probe,
- .remove = pxapwmbl_remove,
- .suspend = pxapwmbl_suspend,
- .resume = pxapwmbl_resume,
- .driver = {
- .name = "pxapwm-bl",
- },
-};
-
-static int __init pxapwmbl_init(void)
-{
- int pdreg = platform_driver_register(&pxapwmbl_driver);
-
- return pdreg;
-}
-
-static void __exit pxapwmbl_exit(void)
-{
- platform_driver_unregister(&pxapwmbl_driver);
-}
-
-module_init(pxapwmbl_init);
-module_exit(pxapwmbl_exit);
-
-MODULE_AUTHOR("Vladimir Pouzanov <far...@gm...>");
-MODULE_DESCRIPTION("XScale PWM Backlight Driver");
-MODULE_LICENSE("GPL");
Deleted: linux4palm/linux/trunk/include/asm-arm/arch-pxa/pxapwm-bl.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/pxapwm-bl.h 2007-08-23 17:34:23 UTC (rev 1261)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/pxapwm-bl.h 2007-08-23 17:35:31 UTC (rev 1262)
@@ -1,42 +0,0 @@
-/*
- * linux/include/asm-arm/arch-pxa/pxa27x-keypad.h
- *
- * Support for XScale PWM driven backlights.
- *
- * Author: Alex Osborne <bob...@gm...>
- * Created: May 2006
- *
- */
-
-/*
-#define PALMT3_MAX_INTENSITY 0x100
-#define PALMT3_DEFAULT_INTENSITY 0x050
-#define PALMT3_LIMIT_MASK 0x7F
-*/
-
-#ifndef __ASM_ARCH_PXA27X_KEYPAD_H
-#define __ASM_ARCH_PXA27X_KEYPAD_H
-
-#include <linux/backlight.h>
-#include <linux/spinlock.h>
-
-struct pxapwmbl_platform_data {
- int pwm;
- int max_intensity;
- int default_intensity;
- int limit_mask;
- int period;
- int prescaler;
-
- int intensity;
- int limit;
- int off_threshold;
-
- spinlock_t lock;
- struct backlight_device *dev;
- void (*turn_bl_on)(void);
- void (*turn_bl_off)(void);
-
-};
-
-#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2007-08-23 22:32:32
|
Revision: 1264
http://hackndev.svn.sourceforge.net/hackndev/?rev=1264&view=rev
Author: marex_z71
Date: 2007-08-23 15:32:31 -0700 (Thu, 23 Aug 2007)
Log Message:
-----------
PalmLD: USB2 demo fix and cleanup
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c
linux4palm/linux/trunk/drivers/usb/gadget/sx2_udc.c
linux4palm/linux/trunk/drivers/usb/gadget/sx2_udc.h
Removed Paths:
-------------
linux4palm/linux/trunk/include/asm-arm/arch-pxa/sx2.h
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c 2007-08-23 17:55:14 UTC (rev 1263)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c 2007-08-23 22:32:31 UTC (rev 1264)
@@ -33,7 +33,6 @@
#include <asm/arch/palmld-init.h>
#include <asm/arch/pxa27x_keyboard.h>
#include <asm/arch/pxa-pm_ll.h>
-#include <asm/arch/sx2.h>
#include <asm/arch/serial.h>
#include <sound/driver.h>
@@ -208,37 +207,17 @@
/*********************************************************
* Cypress EZUSB SX2 USB2.0 Controller
*********************************************************/
-static struct sx2_udc_mach_info palmldusb2_platform_data = {
- .virt_base = PALMLD_USB_VIRT,
-
- .ready_pin = GPIO_NR_PALMLD_USB_READY,
- .int_pin = 0, // gotta detect it
- .reset_pin = GPIO_NR_PALMLD_USB_RESET,
- .power_pin = GPIO_NR_PALMLD_USB_POWER,
-
- .sloe_pin = 0, // gotta detect it
- .slrd_pin = 0, // gotta detect it
- .slwr_pin = 0, // gotta detect it
-};
-
static struct platform_device palmldusb2_device = {
.name = "sx2-udc",
.id = -1,
- .dev = {
- .platform_data = &palmldusb2_platform_data,
- },
};
/*********************************************************
* LCD Border
*********************************************************/
-
struct platform_device palmld_border = {
.name = "palmld-border",
.id = -1,
- .dev = {
- .platform_data = NULL,
- },
};
/*********************************************************
Modified: linux4palm/linux/trunk/drivers/usb/gadget/sx2_udc.c
===================================================================
--- linux4palm/linux/trunk/drivers/usb/gadget/sx2_udc.c 2007-08-23 17:55:14 UTC (rev 1263)
+++ linux4palm/linux/trunk/drivers/usb/gadget/sx2_udc.c 2007-08-23 22:32:31 UTC (rev 1264)
@@ -1,9 +1,12 @@
/*
* linux/drivers/usb/gadget/sx2_udc.c
- * Cypress EZUSB SX2 high speed USB device controller
+ * Cypress EZUSB SX2 high speed USB device controller driver for
+ * Palm LifeDrive
*
- * Copyright (C) 2007 Marek Vasut
+ * !! THIS IS JUST A DEMO !!
*
+ * Copyright (C) 2007 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 as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -47,17 +50,13 @@
#include <asm/unaligned.h>
#include <asm/hardware.h>
-#include <asm/arch/gpio.h>
+#include <asm/arch/palmld-gpio.h>
#include <linux/usb/ch9.h>
#include <linux/usb_gadget.h>
-#include <asm/arch/sx2.h>
-
#include "sx2_udc.h"
-struct sx2_udc_mach_info sx2_mach;
-
/*
TESTING STUFF
*/
@@ -266,7 +265,7 @@
printk("READING 0x%02x\n",reg);
writeb(data,SX2_ADDR_CMD);
-/* while((gpio_get_value(sx2_mach.ready_pin)?1:0)==0) {
+/* while(!GET_PALMLD_GPIO(USB_READY)) {
msleep(1);
};
*/
@@ -282,7 +281,7 @@
printk("SETTING 0x%02x\n",(reg | SX2_CMD_ADDR));
writeb((reg | SX2_CMD_ADDR),(SX2_ADDR_CMD));
/* wait for READY line */
- while((gpio_get_value(sx2_mach.ready_pin)?1:0)==0) {
+ while(!GET_PALMLD_GPIO(USB_READY)) {
};
return 0;
@@ -298,13 +297,13 @@
printk("UPPER NIBBLE %02x\n",(data1 | SX2_CMD_WRITE));
writeb((data1 | SX2_CMD_WRITE),(SX2_ADDR_CMD));
/* wait for READY line */
- while((gpio_get_value(sx2_mach.ready_pin)?1:0)==0) {
+ while(!GET_PALMLD_GPIO(USB_READY)) {
};
printk("LOWER NIBBLE %02x\n",(data2 | SX2_CMD_WRITE));
writeb((data2 | SX2_CMD_WRITE),(SX2_ADDR_CMD));
/* wait for READY line */
- while((gpio_get_value(sx2_mach.ready_pin)?1:0)==0) {
+ while(!GET_PALMLD_GPIO(USB_READY)) {
};
return 0;
@@ -317,33 +316,33 @@
for (;;) {
writeb(0x05,SX2_ADDR_CMD);
printk("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
- (gpio_get_value(0)?"X":"-"), // 1 1 1
- (gpio_get_value(9)?"X":"-"), // 0 0 0
- (gpio_get_value(11)?"X":"-"), // 0 0 0
- (gpio_get_value(18)?"X":"-"), // 1 1 1
- (gpio_get_value(20)?"X":"-"), // 0 1 1
- (gpio_get_value(23)?"X":"-"), // 1 1 1
- (gpio_get_value(24)?"X":"-"), // 1 1 1
- (gpio_get_value(34)?"X":"-"), // 1 1 1
- (gpio_get_value(37)?"X":"-"), // 1 1 1
- (gpio_get_value(39)?"X":"-"), // 1 1 1
- (gpio_get_value(53)?"X":"-"), // 1 0 0
- (gpio_get_value(82)?"X":"-"), // 1 1 1
- (gpio_get_value(86)?"X":"-"), // 1 1 X
- (gpio_get_value(87)?"X":"-"), // 0 0 0
- (gpio_get_value(88)?"X":"-"), // 1 1 1
- (gpio_get_value(90)?"X":"-"), // 0 0 0
- (gpio_get_value(93)?"X":"-"), // 1 1 1
- (gpio_get_value(99)?"X":"-"), // 0 0 0
- (gpio_get_value(106)?"X":"-"), // 0 0 0
- (gpio_get_value(107)?"X":"-"), // 0 0 0
- (gpio_get_value(113)?"X":"-"), // 1 1 1
- (gpio_get_value(114)?"X":"-"), // 0 0 0
- (gpio_get_value(116)?"X":"-"), // 1 1 1
- (gpio_get_value(117)?"X":"-"), // 1 1 1
- (gpio_get_value(118)?"X":"-"), // 1 1 1
- (gpio_get_value(119)?"X":"-"), // 1 1 1
- (gpio_get_value(120)?"X":"-") // 1 1 1
+ (GET_GPIO(0)?"X":"-"), // 1 1 1
+ (GET_GPIO(9)?"X":"-"), // 0 0 0
+ (GET_GPIO(11)?"X":"-"), // 0 0 0
+ (GET_GPIO(18)?"X":"-"), // 1 1 1
+ (GET_GPIO(20)?"X":"-"), // 0 1 1
+ (GET_GPIO(23)?"X":"-"), // 1 1 1
+ (GET_GPIO(24)?"X":"-"), // 1 1 1
+ (GET_GPIO(34)?"X":"-"), // 1 1 1
+ (GET_GPIO(37)?"X":"-"), // 1 1 1
+ (GET_GPIO(39)?"X":"-"), // 1 1 1
+ (GET_GPIO(53)?"X":"-"), // 1 0 0
+ (GET_GPIO(82)?"X":"-"), // 1 1 1
+ (GET_GPIO(86)?"X":"-"), // 1 1 X
+ (GET_GPIO(87)?"X":"-"), // 0 0 0
+ (GET_GPIO(88)?"X":"-"), // 1 1 1
+ (GET_GPIO(90)?"X":"-"), // 0 0 0
+ (GET_GPIO(93)?"X":"-"), // 1 1 1
+ (GET_GPIO(99)?"X":"-"), // 0 0 0
+ (GET_GPIO(106)?"X":"-"), // 0 0 0
+ (GET_GPIO(107)?"X":"-"), // 0 0 0
+ (GET_GPIO(113)?"X":"-"), // 1 1 1
+ (GET_GPIO(114)?"X":"-"), // 0 0 0
+ (GET_GPIO(116)?"X":"-"), // 1 1 1
+ (GET_GPIO(117)?"X":"-"), // 1 1 1
+ (GET_GPIO(118)?"X":"-"), // 1 1 1
+ (GET_GPIO(119)?"X":"-"), // 1 1 1
+ (GET_GPIO(120)?"X":"-") // 1 1 1
); // def rst wrt
}
/* printk("REG 0x%02x %02x %02x %02x %02x %02x\n",0x05,readb(SX2_ADDR_FIFO2),readb(SX2_ADDR_FIFO4),
@@ -354,22 +353,22 @@
/*
- GADGET LEVEL HANDLING STUFF
+ * GADGET LEVEL HANDLING STUFF
*/
static const char driver_name [] = "sx2_udc";
int usb_gadget_register_driver(struct usb_gadget_driver *driver)
{
-printk("SX2: usb_gadget_register_driver\n");
-return 0;
+ printk("SX2: usb_gadget_register_driver\n");
+ return 0;
}
EXPORT_SYMBOL(usb_gadget_register_driver);
int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
{
-printk("SX2: usb_gadget_unregister_driver\n");
-return 0;
+ printk("SX2: usb_gadget_unregister_driver\n");
+ return 0;
}
EXPORT_SYMBOL(usb_gadget_unregister_driver);
@@ -382,14 +381,14 @@
/*
- HARDWARE LEVEL HANDLING STUFF
+ * HARDWARE LEVEL HANDLING STUFF
*/
static int sx2_udc_probe(struct platform_device *pdev)
{
static struct sx2_dev *usb;
/*
-INIT THE CONTROLLER - POWER UP ETC
-*/
+ * INIT THE CONTROLLER - POWER UP ETC
+ */
/* FIXME - this cant be static :-E */
if(!request_mem_region(SX2_ADDR_BASE, 0x10000, "sx2-udc"))
return -EBUSY;
@@ -402,13 +401,11 @@
platform_set_drvdata(pdev, usb);
usb->dev = &(pdev->dev);
- usb->mach = pdev->dev.platform_data;
- sx2_mach = *(usb->mach);
/* Now power down and up the chip */
- gpio_set_value(usb->mach->power_pin,0);
+ SET_PALMLD_GPIO(USB_POWER,0);
udelay(100);
- gpio_set_value(usb->mach->power_pin,1);
+ SET_PALMLD_GPIO(USB_POWER,1);
udelay(500);
/* sx2_hwtest(); */
sx2_enum();
@@ -450,5 +447,5 @@
module_exit(udc_exit);
MODULE_DESCRIPTION("Cypress EZUSB SX2 Peripheral Controller");
-MODULE_AUTHOR("Marek Vasut");
+MODULE_AUTHOR("Marek Vasut <mar...@gm...>");
MODULE_LICENSE("GPL");
Modified: linux4palm/linux/trunk/drivers/usb/gadget/sx2_udc.h
===================================================================
--- linux4palm/linux/trunk/drivers/usb/gadget/sx2_udc.h 2007-08-23 17:55:14 UTC (rev 1263)
+++ linux4palm/linux/trunk/drivers/usb/gadget/sx2_udc.h 2007-08-23 22:32:31 UTC (rev 1264)
@@ -121,7 +121,6 @@
struct sx2_dev {
struct device *dev;
- struct sx2_udc_mach_info *mach;
spinlock_t lock;
/*
* EP0 write thread.
Deleted: linux4palm/linux/trunk/include/asm-arm/arch-pxa/sx2.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/sx2.h 2007-08-23 17:55:14 UTC (rev 1263)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/sx2.h 2007-08-23 22:32:31 UTC (rev 1264)
@@ -1,21 +0,0 @@
-/*
- * linux/include/asm-arm/arch-pxa/sx2.h
- *
- * This supports machine-specific differences in how the Cypress SX2
- * USB Device Controller (UDC) is wired.
- *
- */
-
-struct sx2_udc_mach_info {
- u32 virt_base;
-
- int ready_pin;
- int int_pin;
- int reset_pin;
- int power_pin;
-
- int sloe_pin;
- int slrd_pin;
- int slwr_pin;
-};
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2007-08-26 11:13:50
|
Revision: 1273
http://hackndev.svn.sourceforge.net/hackndev/?rev=1273&view=rev
Author: marex_z71
Date: 2007-08-25 18:16:28 -0700 (Sat, 25 Aug 2007)
Log Message:
-----------
PalmLD: improved pcmcia driver
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_pcmcia.c
linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmld-gpio.h
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_pcmcia.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_pcmcia.c 2007-08-25 19:48:28 UTC (rev 1272)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld_pcmcia.c 2007-08-26 01:16:28 UTC (rev 1273)
@@ -1,3 +1,27 @@
+/*
+ *
+ * Driver for Palm LifeDrive PCMCIA
+ *
+ * Copyright (C) 2007 Marek Vasut <mar...@gm...>
+ * Copyright (C) 2006 Alex Osborne <bob...@gm...>
+ *
+ * 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; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
@@ -27,18 +51,38 @@
#define palmld_pcmcia_dbg(format, args...) do {} while (0)
#endif
-/* GPIO defines */
-#define PALMLD_PCMCIA_IRQ 38
-#define PALMLD_PCMCIA_POWER 36
-#define PALMLD_PCMCIA_RESET 81
+static struct pcmcia_irqs palmld_socket_state_irqs[] = {
+};
static int palmld_pcmcia_hw_init (struct soc_pcmcia_socket *skt)
{
- set_irq_type(PALMLD_PCMCIA_IRQ, IRQT_FALLING);
- skt->irq = IRQ_GPIO(PALMLD_PCMCIA_IRQ);
+ GPSR(GPIO48_nPOE_MD) = GPIO_bit(GPIO48_nPOE_MD) |
+ GPIO_bit(GPIO49_nPWE_MD) |
+ GPIO_bit(GPIO50_nPIOR_MD) |
+ GPIO_bit(GPIO51_nPIOW_MD) |
+ GPIO_bit(GPIO85_nPCE_1_MD) |
+ GPIO_bit(GPIO54_nPCE_2_MD) |
+ GPIO_bit(GPIO79_pSKTSEL_MD) |
+ GPIO_bit(GPIO55_nPREG_MD) |
+ GPIO_bit(GPIO56_nPWAIT_MD) |
+ GPIO_bit(GPIO57_nIOIS16_MD);
+ pxa_gpio_mode(GPIO48_nPOE_MD);
+ pxa_gpio_mode(GPIO49_nPWE_MD);
+ pxa_gpio_mode(GPIO50_nPIOR_MD);
+ pxa_gpio_mode(GPIO51_nPIOW_MD);
+ pxa_gpio_mode(GPIO85_nPCE_1_MD);
+ pxa_gpio_mode(GPIO54_nPCE_2_MD);
+ pxa_gpio_mode(GPIO79_pSKTSEL_MD);
+ pxa_gpio_mode(GPIO55_nPREG_MD);
+ pxa_gpio_mode(GPIO56_nPWAIT_MD);
+ pxa_gpio_mode(GPIO57_nIOIS16_MD);
+
+ skt->irq = IRQ_GPIO(GPIO_NR_PALMLD_PCMCIA_READY);
+
palmld_pcmcia_dbg("%s:%i, Socket:%d\n", __FUNCTION__, __LINE__, skt->nr);
- return 0;
+ return soc_pcmcia_request_irqs(skt, palmld_socket_state_irqs,
+ ARRAY_SIZE(palmld_socket_state_irqs));
}
static void palmld_pcmcia_hw_shutdown (struct soc_pcmcia_socket *skt)
@@ -46,30 +90,16 @@
palmld_pcmcia_dbg("%s:%i\n", __FUNCTION__, __LINE__);
}
-
static void
palmld_pcmcia_socket_state (struct soc_pcmcia_socket *skt, struct pcmcia_state *state)
{
state->detect = 1; /* always inserted */
- state->ready = GET_GPIO(PALMLD_PCMCIA_IRQ) ? 1 : 0;
+ state->ready = GET_PALMLD_GPIO(PCMCIA_READY) ? 1 : 0;
state->bvd1 = 1;
state->bvd2 = 1;
- state->wrprot = 1;
+ state->wrprot = 0;
state->vs_3v = 1;
state->vs_Xv = 0;
-
- /*
- state->detect = GET_AXIMX5_GPIO (PCMCIA_DETECT_N) ? 0 : 1;
- state->ready = mq_base->get_GPIO (mq_base, 2) ? 1 : 0;
- state->bvd1 = GET_AXIMX5_GPIO (PCMCIA_BVD1) ? 1 : 0;
- state->bvd2 = GET_AXIMX5_GPIO (PCMCIA_BVD2) ? 1 : 0;
- state->wrprot = 0;
- state->vs_3v = mq_base->get_GPIO (mq_base, 65) ? 1 : 0;
- state->vs_Xv = 0;
- */
- /*printk ("detect:%d ready:%d vcc:%d bvd1:%d bvd2:%d\n",
- state->detect, state->ready, state->vs_3v, state->bvd1, state->bvd2);
- */
}
static int
@@ -78,11 +108,8 @@
palmld_pcmcia_dbg("%s:%i Reset:%d Vcc:%d\n", __FUNCTION__, __LINE__,
(state->flags & SS_RESET) ? 1 : 0, state->Vcc);
- /* GPIO 36 appears to control power to the chip */
- SET_GPIO(PALMLD_PCMCIA_POWER, 1);
-
- /* GPIO 81 appears to be reset */
- SET_GPIO(PALMLD_PCMCIA_RESET, (state->flags & SS_RESET) ? 1 : 0);
+ SET_PALMLD_GPIO(PCMCIA_POWER, 1);
+ SET_PALMLD_GPIO(PCMCIA_RESET, (state->flags & SS_RESET) ? 1 : 0);
return 0;
}
@@ -100,11 +127,9 @@
static struct pcmcia_low_level palmld_pcmcia_ops = {
.owner = THIS_MODULE,
- /* Setting it this way makes pcmcia-cs
- scream about memory-cs (because of
- HDD/CF memory in socket 0), but it's
- much nicer than make some weird changes
- in pxa pcmcia subsystem */
+ /* Setting it this way makes pcmcia-cs scream about memory-cs
+ (because of HDD/CF memory in socket 0), but it's much nicer
+ than make some weird changes in pxa pcmcia subsystem */
.first = 0,
.nr = 2,
@@ -124,7 +149,6 @@
palmld_pcmcia_dbg("%s:%i\n", __FUNCTION__, __LINE__);
}
-
static struct platform_device palmld_pcmcia_device = {
.name = "pxa2xx-pcmcia",
.id = 0,
@@ -154,6 +178,6 @@
module_init(palmld_pcmcia_init);
module_exit(palmld_pcmcia_exit);
-MODULE_AUTHOR ("Alex Osborne <bob...@gm...>");
+MODULE_AUTHOR ("Alex Osborne <bob...@gm...>, Marek Vasut <mar...@gm...>");
MODULE_DESCRIPTION ("PCMCIA support for Palm LifeDrive");
MODULE_LICENSE ("GPL");
Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmld-gpio.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmld-gpio.h 2007-08-25 19:48:28 UTC (rev 1272)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmld-gpio.h 2007-08-26 01:16:28 UTC (rev 1273)
@@ -96,6 +96,11 @@
#define GPIO_NR_PALMLD_BT_UART_CTS_MD (GPIO_NR_PALMLD_BT_CTS | GPIO_ALT_FN_1_IN)
#define GPIO_NR_PALMLD_BT_UART_RTS_MD (GPIO_NR_PALMLD_BT_RTS | GPIO_ALT_FN_2_OUT)
+/* PCMCIA, WiFi */
+#define GPIO_NR_PALMLD_PCMCIA_READY 38
+#define GPIO_NR_PALMLD_PCMCIA_POWER 36
+#define GPIO_NR_PALMLD_PCMCIA_RESET 81
+
/* Utility macros */
#define GET_PALMLD_GPIO(gpio) \
(GPLR(GPIO_NR_PALMLD_ ## gpio) & GPIO_bit(GPIO_NR_PALMLD_ ## gpio))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2007-08-26 11:14:10
|
Revision: 1275
http://hackndev.svn.sourceforge.net/hackndev/?rev=1275&view=rev
Author: marex_z71
Date: 2007-08-25 21:40:15 -0700 (Sat, 25 Aug 2007)
Log Message:
-----------
PalmTX: rewrote udc part, use generic gpio driven udc driver
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c
linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c 2007-08-26 04:37:17 UTC (rev 1274)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c 2007-08-26 04:40:15 UTC (rev 1275)
@@ -44,6 +44,7 @@
#include <asm/arch/pxa27x_keyboard.h>
#include <asm/arch/palmtx-init.h>
#include <asm/arch/palmtx-gpio.h>
+#include <asm/arch/pxa2xx_udc_gpio.h>
#include "../generic.h"
@@ -287,44 +288,34 @@
/*******
* USB *
*******/
-
-static int palmtx_udc_is_connected (void){
- int ret = !(GET_GPIO(GPIO_NR_PALMTX_USB_DETECT));
- if (ret)
- printk (KERN_INFO "palmtx_udc: device detected [USB_DETECT: %d]\n",ret);
- else
- printk (KERN_INFO "palmtx_udc: no device detected [USB_DETECT: %d]\n",ret);
-
- return ret;
-}
-
-
-static void palmtx_udc_command (int cmd){
-
- switch (cmd) {
- case PXA2XX_UDC_CMD_DISCONNECT:
- SET_GPIO(GPIO_NR_PALMTX_USB_PULLUP, 0);
- SET_GPIO(GPIO_NR_PALMTX_USB_POWER, 0);
- printk(KERN_INFO "palmtx_udc: got command PXA2XX_UDC_CMD_DISCONNECT\n");
- break;
- case PXA2XX_UDC_CMD_CONNECT:
- SET_GPIO(GPIO_NR_PALMTX_USB_POWER, 1);
- SET_GPIO(GPIO_NR_PALMTX_USB_PULLUP, 1);
- printk(KERN_INFO "palmtx_udc: got command PXA2XX_UDC_CMD_CONNECT\n");
- break;
- default:
- printk("palmtx_udc: unknown command '%d'\n", cmd);
+static int palmtx_udc_power( int power )
+{
+ if (power) {
+ SET_PALMTX_GPIO(USB_POWER, 1);
+ SET_PALMTX_GPIO(USB_PULLUP, 1);
+ } else {
+ SET_PALMTX_GPIO(USB_PULLUP, 0);
+ SET_PALMTX_GPIO(USB_POWER, 0);
}
+
+ return power;
}
+struct pxa2xx_udc_gpio_info palmtx_udc_info = {
+ .detect_gpio = {&pxagpio_device.dev, GPIO_NR_PALMTX_USB_DETECT_N},
+ .detect_gpio_negative = 1,
+ .power_ctrl = {
+ .power = &palmtx_udc_power,
+ },
+};
-static struct pxa2xx_udc_mach_info palmtx_udc_mach_info __initdata = {
- .udc_is_connected = palmtx_udc_is_connected,
- .udc_command = palmtx_udc_command,
+static struct platform_device palmtx_udc = {
+ .name = "pxa2xx-udc-gpio",
+ .dev = {
+ .platform_data = &palmtx_udc_info
+ }
};
-
-
/*************************
* AC97 audio controller *
*************************/
@@ -365,6 +356,7 @@
&palmtx_backlight,
&bcm2035_bt,
&palmtx_border,
+ &palmtx_udc,
};
/***************
@@ -443,7 +435,6 @@
set_pxa_fb_info ( &palmtx_lcd_screen );
pxa_set_btuart_info(&bcm2035_pxa_bt_funcs);
pxa_set_mci_info ( &palmtx_mci_platform_data );
- pxa_set_udc_info ( &palmtx_udc_mach_info );
pxa_set_ficp_info ( &palmtx_ficp_platform_data );
platform_add_devices( devices, ARRAY_SIZE(devices) );
Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2007-08-26 04:37:17 UTC (rev 1274)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2007-08-26 04:40:15 UTC (rev 1275)
@@ -63,7 +63,7 @@
#define GPIO_NR_PALMTX_ICP_TXD_MD (GPIO_NR_PALMTX_ICP_TXD | GPIO_ALT_FN_2_OUT)
/* USB */
-#define GPIO_NR_PALMTX_USB_DETECT 90
+#define GPIO_NR_PALMTX_USB_DETECT_N 13
#define GPIO_NR_PALMTX_USB_POWER 95
#define GPIO_NR_PALMTX_USB_PULLUP 93
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2007-08-29 09:55:38
|
Revision: 1286
http://hackndev.svn.sourceforge.net/hackndev/?rev=1286&view=rev
Author: marex_z71
Date: 2007-08-29 02:55:32 -0700 (Wed, 29 Aug 2007)
Log Message:
-----------
PalmTX: this is how the driver should look like according to snua12s' notes from desolderation of broken palmtx board ... yet it still doesnt work
Modified Paths:
--------------
linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c
linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h
Modified: linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c
===================================================================
--- linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c 2007-08-29 02:12:51 UTC (rev 1285)
+++ linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c 2007-08-29 09:55:32 UTC (rev 1286)
@@ -31,19 +31,6 @@
#include <asm/memory.h>
#include <asm/mach-types.h>
-/* Select the chip by setting nCE to low */
-#define NAND_CTL_SETNCE 1
-/* Deselect the chip by setting nCE to high */
-#define NAND_CTL_CLRNCE 2
-/* Select the command latch by setting CLE to high */
-#define NAND_CTL_SETCLE 3
-/* Deselect the command latch by setting CLE to low */
-#define NAND_CTL_CLRCLE 4
-/* Select the address latch by setting ALE to high */
-#define NAND_CTL_SETALE 5
-/* Deselect the address latch by setting ALE to low */
-#define NAND_CTL_CLRALE 6
-
/*
* MTD structure
*/
@@ -74,42 +61,24 @@
unsigned int ctrl)
{
struct nand_chip *chip = mtd->priv;
+ unsigned long bits = 0;
if (ctrl & NAND_CTRL_CHANGE) {
- switch (cmd) {
- case NAND_CTL_SETCLE:
- SET_PALMTX_GPIO(NAND_CLE,1);
- break;
- case NAND_CTL_CLRCLE:
- SET_PALMTX_GPIO(NAND_CLE,0);
- break;
- case NAND_CTL_SETALE:
- SET_PALMTX_GPIO(NAND_ALE,1);
- break;
- case NAND_CTL_CLRALE:
- SET_PALMTX_GPIO(NAND_ALE,0);
- break;
- case NAND_CTL_SETNCE:
- SET_PALMTX_GPIO(NAND_NCE,1);
- break;
- case NAND_CTL_CLRNCE:
- SET_PALMTX_GPIO(NAND_NCE,0);
- break;
- }
+ /* Select chip */
+ SET_PALMTX_GPIO(NAND_CS1_N, (ctrl & NAND_NCE) ? 0 : 1);
+
+ /* Set control lines */
+ if (ctrl & NAND_CLE)
+ bits |= 1<<25;
+ if (ctrl & NAND_ALE)
+ bits |= 1<<24;
+ iowrite32(bits, chip->IO_ADDR_W);
}
- if (cmd != NAND_CMD_NONE)
- writeb(cmd, (void __iomem *)((unsigned long)chip->IO_ADDR_W));
-}
-/*
- * read device ready pin
- */
-#if 0
-static int palmtx_device_ready(struct mtd_info *mtd)
-{
- return GET_PALMTX_GPIO(NAND_READY);
+ /* If there is a command for the chip, send it */
+ if (cmd != NAND_CMD_NONE)
+ iowrite32((cmd & 0xff) | bits, chip->IO_ADDR_W);
}
-#endif
/*
* Main initialization routine
@@ -125,12 +94,6 @@
if (!machine_is_xscale_palmtx())
return -ENODEV;
- nandaddr = ioremap(PALMTX_PHYS_NAND_START, 0x1000);
- if (!nandaddr) {
- printk("Failed to ioremap NAND flash.\n");
- return -ENOMEM;
- }
-
/* Allocate memory for MTD device structure and private data */
palmtx_nand_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL);
if (!palmtx_nand_mtd) {
@@ -139,6 +102,13 @@
return -ENOMEM;
}
+ /* Remap physical address of flash */
+ nandaddr = ioremap(PALMTX_PHYS_NAND_START, 0x1000);
+ if (!nandaddr) {
+ printk("Failed to ioremap NAND flash.\n");
+ return -ENOMEM;
+ }
+
/* Get pointer to private data */
this = (struct nand_chip *)(&palmtx_nand_mtd[1]);
@@ -150,24 +120,14 @@
palmtx_nand_mtd->priv = this;
palmtx_nand_mtd->owner = THIS_MODULE;
- /*
- * Enable VPEN ... isnt it on all the time?
- */
-#if 0
- SET_PALMTX_GPIO(NAND_POWER, 1);
-#endif
-
/* insert callbacks */
this->IO_ADDR_R = nandaddr;
this->IO_ADDR_W = nandaddr;
this->cmd_ctrl = palmtx_hwcontrol;
-#if 0
- this->dev_ready = palmtx_device_ready;
-#else
+ /* For the time being ... */
this->dev_ready = NULL;
-#endif
/* 15 us command delay time */
- this->chip_delay = 50;
+ this->chip_delay = 15;
this->ecc.mode = NAND_ECC_SOFT;
this->options = NAND_NO_AUTOINCR;
Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2007-08-29 02:12:51 UTC (rev 1285)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2007-08-29 09:55:32 UTC (rev 1286)
@@ -96,13 +96,9 @@
#define GPIO_NR_PALMTX_PCMCIA_READY 116
/* NAND Flash ... these GPIOs are probably incorrect! */
-#define GPIO_NR_PALMTX_NAND_POWER 19
-#define GPIO_NR_PALMTX_NAND_READY 115
-#define GPIO_NR_PALMTX_NAND_CLE 79
-#define GPIO_NR_PALMTX_NAND_ALE 113
-#define GPIO_NR_PALMTX_NAND_NCE 114
+#define GPIO_NR_PALMTX_NAND_CS1_N 15
+#define GPIO_NR_PALMTX_NAND_WE_N 49
-
/* INTERRUPTS */
#define IRQ_GPIO_PALMTX_SD_DETECT_N IRQ_GPIO(GPIO_NR_PALMTX_SD_DETECT_N)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2007-08-31 20:26:08
|
Revision: 1291
http://hackndev.svn.sourceforge.net/hackndev/?rev=1291&view=rev
Author: marex_z71
Date: 2007-08-31 13:26:04 -0700 (Fri, 31 Aug 2007)
Log Message:
-----------
PalmTX: added RnB GPIO and fixed memory freeing if something breaks
Modified Paths:
--------------
linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c
linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h
Modified: linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c
===================================================================
--- linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c 2007-08-30 02:41:10 UTC (rev 1290)
+++ linux4palm/linux/trunk/drivers/mtd/nand/palmtx.c 2007-08-31 20:26:04 UTC (rev 1291)
@@ -82,6 +82,11 @@
}
}
+static int palmtx_device_ready(struct mtd_info *mtd)
+{
+ return GET_PALMTX_GPIO(NAND_READY);
+}
+
/*
* Main initialization routine
*/
@@ -143,8 +148,7 @@
this->IO_ADDR_R = nandaddr;
this->IO_ADDR_W = nandaddr;
this->cmd_ctrl = palmtx_hwcontrol;
- /* For the time being ... */
- this->dev_ready = NULL;
+ this->dev_ready = palmtx_device_ready;
/* 15 us command delay time */
this->chip_delay = 15;
this->ecc.mode = NAND_ECC_SOFT;
@@ -154,7 +158,10 @@
if (nand_scan(palmtx_nand_mtd, 1)) {
printk(KERN_NOTICE "No NAND device - returning -ENXIO\n");
kfree(palmtx_nand_mtd);
+ iounmap((void *)palmtx_nand_mtd);
iounmap((void *)nandaddr);
+ iounmap((void *)nand_ale);
+ iounmap((void *)nand_cle);
return -ENXIO;
}
#ifdef CONFIG_MTD_CMDLINE_PARTS
Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2007-08-30 02:41:10 UTC (rev 1290)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2007-08-31 20:26:04 UTC (rev 1291)
@@ -97,6 +97,7 @@
/* NAND Flash ... these GPIOs are probably incorrect! */
#define GPIO_NR_PALMTX_NAND_CS1_N 15
+#define GPIO_NR_PALMTX_NAND_READY 18
#define GPIO_NR_PALMTX_NAND_WE_N 49
/* INTERRUPTS */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2007-09-02 13:38:35
|
Revision: 1300
http://hackndev.svn.sourceforge.net/hackndev/?rev=1300&view=rev
Author: marex_z71
Date: 2007-09-02 06:11:19 -0700 (Sun, 02 Sep 2007)
Log Message:
-----------
PalmTE2: convert palmte2 to corgi-bl, make some additional corrections
Modified Paths:
--------------
linux4palm/linux/trunk/arch/arm/mach-pxa/palmte2/palmte2.c
Added Paths:
-----------
linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmte2-init.h
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmte2/palmte2.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmte2/palmte2.c 2007-09-02 13:09:24 UTC (rev 1299)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmte2/palmte2.c 2007-09-02 13:11:19 UTC (rev 1300)
@@ -19,6 +19,7 @@
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/fb.h>
+#include <linux/corgi_bl.h>
#include <asm/arch/audio.h>
#include <asm/arch/hardware.h>
@@ -27,9 +28,9 @@
#include <asm/arch/pxa-regs.h>
#include <asm/arch/udc.h>
#include <asm/arch/mmc.h>
-#include <asm/arch/pxapwm-bl.h>
#include <asm/arch/serial.h>
#include <asm/arch/palmte2-gpio.h>
+#include <asm/arch/palmte2-init.h>
#include <linux/gpio_keys.h>
#include <sound/driver.h>
@@ -66,20 +67,29 @@
/*
* Backlight
*/
-static struct pxapwmbl_platform_data palmte2_backlight_data = {
- .pwm = 0,
- .max_intensity = 0x160,
- .default_intensity = 0x11a,
- .limit_mask = 0x7f,
- .prescaler = 7,
- .period = 0x16c,
+
+static void palmte2_set_bl_intensity(int intensity)
+{
+ if(intensity) {
+ PWM_CTRL0 = 0x7;
+ PWM_PERVAL0 = PALMTE2_PERIOD;
+ PWM_PWDUTY0 = intensity;
+ }
+}
+
+static struct corgibl_machinfo palmte2_bl_machinfo = {
+ .max_intensity = PALMTE2_MAX_INTENSITY,
+ .default_intensity = PALMTE2_MAX_INTENSITY,
+ .set_bl_intensity = palmte2_set_bl_intensity,
+ .limit_mask = PALMTE2_LIMIT_MASK,
};
static struct platform_device palmte2_backlight = {
- .name = "pxapwm-bl",
- .dev = {
- .platform_data = &palmte2_backlight_data,
- },
+ .name = "corgi-bl",
+ .id = 0,
+ .dev = {
+ .platform_data = &palmte2_bl_machinfo,
+ },
};
/*
@@ -89,20 +99,14 @@
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);
+ SET_PALMTE2_GPIO(BT_RESET, on ? 1 : 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);
+ SET_PALMTE2_GPIO(BT_POWER, on ? 1 : 0);
}
EXPORT_SYMBOL(bcm2035_bt_power);
Added: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmte2-init.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmte2-init.h (rev 0)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmte2-init.h 2007-09-02 13:11:19 UTC (rev 1300)
@@ -0,0 +1,29 @@
+/*
+ * palmte2-init.h
+ *
+ * Init values for PalmOne Tungsten E2 Handheld Computer
+ *
+ * Copyright (C) 2007 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_PALMTE2_INIT_H_
+
+#define _INCLUDE_PALMTE2_INIT_H_
+
+/* BACKLIGHT */
+
+#define PALMTE2_MAX_INTENSITY 0xFE
+#define PALMTE2_DEFAULT_INTENSITY 0x7E
+#define PALMTE2_LIMIT_MASK 0x7F
+#define PALMTE2_PRESCALER 0x3F
+#define PALMTE2_PERIOD 0x112
+
+#endif /* _INCLUDE_PALMTE2_INIT_H_ */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|