You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(26) |
Sep
(22) |
Oct
(55) |
Nov
(24) |
Dec
(30) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(68) |
Feb
(85) |
Mar
(54) |
Apr
(12) |
May
(52) |
Jun
(75) |
Jul
(116) |
Aug
(71) |
Sep
(54) |
Oct
|
Nov
(2) |
Dec
|
From: <mar...@us...> - 2007-03-10 00:13:50
|
Revision: 902 http://svn.sourceforge.net/hackndev/?rev=902&view=rev Author: marex_z71 Date: 2007-03-09 16:13:47 -0800 (Fri, 09 Mar 2007) Log Message: ----------- l4p: fixed double definition in pxa-regs Modified Paths: -------------- linux4palm/linux/trunk/include/asm-arm/arch-pxa/pxa-regs.h Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/pxa-regs.h =================================================================== --- linux4palm/linux/trunk/include/asm-arm/arch-pxa/pxa-regs.h 2007-03-09 21:25:11 UTC (rev 901) +++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/pxa-regs.h 2007-03-10 00:13:47 UTC (rev 902) @@ -100,7 +100,7 @@ #define DCSR_CLRCMPST (1 << 24) /* Clear Descriptor Compare Status */ #define DCSR_CMPST (1 << 10) /* The Descriptor Compare Status */ #define DCSR_EORINTR (1 << 9) /* The end of Receive */ -#define DCSR_EORINTR (1 << 9) /* The end of Receive */ +#define DCSR_ENRINTR (1 << 9) /* The end of Receive */ #endif #define DCSR_REQPEND (1 << 8) /* Request Pending (read-only) */ #define DCSR_STOPSTATE (1 << 3) /* Stop State (read-only) */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-03-09 21:25:29
|
Revision: 901 http://svn.sourceforge.net/hackndev/?rev=901&view=rev Author: marex_z71 Date: 2007-03-09 13:25:11 -0800 (Fri, 09 Mar 2007) Log Message: ----------- PalmLD: Fixed backlight oops problem Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c 2007-03-09 20:57:22 UTC (rev 900) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c 2007-03-09 21:25:11 UTC (rev 901) @@ -169,11 +169,11 @@ static struct pxapwmbl_platform_data palmld_backlight_data = { .pwm = 0, - .max_intensity = 0x120, - .default_intensity = 0x11a, + .max_intensity = 0xff, + .default_intensity = 0x7f, .limit_mask = 0x7f, - .prescaler = 7, - .period = 0x16c, + .prescaler = 1, + .period = 0x12c, }; static struct platform_device palmld_backlight = { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-03-09 20:57:27
|
Revision: 900 http://svn.sourceforge.net/hackndev/?rev=900&view=rev Author: keddar Date: 2007-03-09 12:57:22 -0800 (Fri, 09 Mar 2007) Log Message: ----------- l4p: my config used for unofficial tt3 builds with BFUGarux Added Paths: ----------- linux4palm/BFUGarux/init/palmt3_kedconfig Added: linux4palm/BFUGarux/init/palmt3_kedconfig =================================================================== --- linux4palm/BFUGarux/init/palmt3_kedconfig (rev 0) +++ linux4palm/BFUGarux/init/palmt3_kedconfig 2007-03-09 20:57:22 UTC (rev 900) @@ -0,0 +1,1387 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.20-hnd0 +# Mon Mar 5 09:59:47 2007 +# +CONFIG_ARM=y +# CONFIG_GENERIC_TIME is not set +CONFIG_MMU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_ARCH_HAS_ILOG2_U32 is not set +# CONFIG_ARCH_HAS_ILOG2_U64 is not set +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_ARCH_MTD_XIP=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_IPC_NS is not set +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_UTS_NS is not set +# CONFIG_AUDIT is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_SYSFS_DEPRECATED=y +# CONFIG_RELAY is not set +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +# CONFIG_EMBEDDED is not set +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SHMEM=y +CONFIG_SLAB=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_RT_MUTEXES=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +# CONFIG_SLOB is not set + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_MODVERSIONS=y +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y + +# +# Block layer +# +CONFIG_BLOCK=y +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=m +CONFIG_IOSCHED_DEADLINE=m +CONFIG_IOSCHED_CFQ=m +# CONFIG_DEFAULT_AS is not set +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +CONFIG_DEFAULT_NOOP=y +CONFIG_DEFAULT_IOSCHED="noop" + +# +# System Type +# +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IMX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_PNX4008 is not set +CONFIG_ARCH_PXA=y +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_OMAP is not set + +# +# Intel PXA2xx Implementations +# +# CONFIG_ARCH_LUBBOCK is not set +# CONFIG_MACH_LOGICPD_PXA270 is not set +# CONFIG_MACH_MAINSTONE is not set +# CONFIG_ARCH_PXA_IDP is not set +# CONFIG_TOSHIBA_TMIO_OHCI is not set +# CONFIG_ARCH_ESERIES is not set +# CONFIG_MACH_A620 is not set +# CONFIG_MACH_A716 is not set +# CONFIG_MACH_A730 is not set +# CONFIG_ARCH_H1900 is not set +# CONFIG_ARCH_H2200 is not set +# CONFIG_MACH_H3900 is not set +# CONFIG_MACH_H4000 is not set +# CONFIG_MACH_H4700 is not set +# CONFIG_MACH_HX2750 is not set +# CONFIG_ARCH_H5400 is not set +# CONFIG_MACH_HIMALAYA is not set +# CONFIG_MACH_HTCUNIVERSAL is not set +# CONFIG_MACH_HTCALPINE is not set +# CONFIG_MACH_MAGICIAN is not set +# CONFIG_MACH_HTCAPACHE is not set +# CONFIG_MACH_BLUEANGEL is not set +# CONFIG_MACH_HTCBEETLES is not set +# CONFIG_MACH_HW6900 is not set +# CONFIG_ARCH_AXIMX3 is not set +# CONFIG_ARCH_AXIMX5 is not set +# CONFIG_MACH_X50 is not set +# CONFIG_ARCH_ROVERP1 is not set +# CONFIG_ARCH_ROVERP5P is not set +# CONFIG_MACH_XSCALE_PALMLD is not set +# CONFIG_MACH_XSCALE_PALMTREO650 is not set +# CONFIG_MACH_XSCALE_TREO680 is not set +# CONFIG_MACH_T700WX is not set +# CONFIG_MACH_TUNGE2 is not set +CONFIG_MACH_T3XSCALE=y +CONFIG_PALM_T3_BUTTONS=y +CONFIG_PALM_T3_BATTERY=m +# CONFIG_PALM_T3_GPIOED is not set +# CONFIG_PALM_T3_GPIOEDNG is not set +# CONFIG_MACH_XSCALE_PALMTT5 is not set +# CONFIG_MACH_XSCALE_PALMTX is not set +# CONFIG_MACH_PALMZ72 is not set +CONFIG_GPIOED=m +CONFIG_GPIOEDNG=m +# CONFIG_MACH_OMAP_PALMTC is not set +# CONFIG_MACH_ZIRE31 is not set +# CONFIG_PXA_SHARPSL is not set +# CONFIG_MACH_TRIZEPS4 is not set +CONFIG_PXA25x=y +CONFIG_PXA_RTC_EPOCH=1904 + +# +# Linux As Bootloader +# +# CONFIG_LAB is not set + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_XSCALE=y +CONFIG_CPU_32v5=y +CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_CACHE_VIVT=y +CONFIG_CPU_TLB_V4WBI=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_IWMMXT is not set +# CONFIG_ARMBOOT_PROC is not set +CONFIG_XSCALE_PMU=y +# CONFIG_KEXEC is not set + +# +# Compaq/iPAQ Drivers +# + +# +# Compaq/HP iPAQ Drivers +# + +# +# Bus support +# + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +# CONFIG_PREEMPT is not set +CONFIG_NO_IDLE_HZ=y +CONFIG_HZ=100 +CONFIG_AEABI=y +CONFIG_OABI_COMPAT=y +# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4096 +# CONFIG_RESOURCES_64BIT is not set +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="mem=64M root=/dev/ram0 init=/linuxrc initrd=0xA0400000,900332 max_loop=255" +# CONFIG_XIP_KERNEL is not set + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_DEBUG is not set +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_PERFORMANCE=m +CONFIG_CPU_FREQ_GOV_POWERSAVE=m +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=m +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m +CONFIG_CPU_FREQ_PXA=y +CONFIG_PXA25x_ALTERNATE_FREQS=y + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set + +# +# Power management options +# +CONFIG_PM=y +CONFIG_PM_LEGACY=y +# CONFIG_PM_DEBUG is not set +# CONFIG_DPM_DEBUG is not set +# CONFIG_PM_SYSFS_DEPRECATED is not set +CONFIG_APM=m + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_NETDEBUG is not set +CONFIG_PACKET=m +CONFIG_PACKET_MMAP=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_DIAG=m +CONFIG_INET_TCP_DIAG=m +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set + +# +# DCCP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +# CONFIG_IP_SCTP is not set + +# +# TIPC Configuration (EXPERIMENTAL) +# +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +CONFIG_IRDA=m + +# +# IrDA protocols +# +CONFIG_IRLAN=m +CONFIG_IRNET=m +CONFIG_IRCOMM=m +CONFIG_IRDA_ULTRA=y + +# +# IrDA options +# +CONFIG_IRDA_CACHE_LAST_LSAP=y +CONFIG_IRDA_FAST_RR=y +CONFIG_IRDA_DEBUG=y + +# +# Infrared-port device drivers +# + +# +# SIR device drivers +# +# CONFIG_IRTTY_SIR is not set + +# +# Dongle support +# + +# +# Old SIR device drivers +# +# CONFIG_IRPORT_SIR is not set + +# +# Old Serial dongle support +# + +# +# FIR device drivers +# +CONFIG_PXA_FICP=m +CONFIG_BT=m +CONFIG_BT_L2CAP=m +CONFIG_BT_SCO=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m + +# +# Bluetooth device drivers +# +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIVHCI=m +# CONFIG_IEEE80211 is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_FW_LOADER is not set +# CONFIG_SYS_HYPERVISOR is not set + +# +# Connector - unified userspace <-> kernelspace linker +# +# CONFIG_CONNECTOR is not set + +# +# Memory Technology Devices (MTD) +# +CONFIG_MTD=m +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_CONCAT=m +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=m +CONFIG_MTD_BLKDEVS=m +CONFIG_MTD_BLOCK=m +# CONFIG_MTD_BLOCK_RO is not set +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=m +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=m +# CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +CONFIG_MTD_CFI_INTELEXT=m +# CONFIG_MTD_CFI_AMDSTD is not set +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=m +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_XIP is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PHYSMAP is not set +# CONFIG_MTD_ARM_INTEGRATOR is not set +# CONFIG_MTD_PALMT3 is not set +# CONFIG_MTD_SHARP_SL is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set + +# +# OneNAND Flash Device Drivers +# +# CONFIG_MTD_ONENAND is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Plug and Play support +# + +# +# Block devices +# +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=1 +CONFIG_BLK_DEV_RAM_SIZE=3072 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 +CONFIG_BLK_DEV_INITRD=y +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set + +# +# ATA/ATAPI/MFM/RLL support +# +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +# CONFIG_SCSI is not set +# CONFIG_SCSI_NETLINK is not set + +# +# Serial ATA (prod) and Parallel ATA (experimental) drivers +# +# CONFIG_ATA is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Network device support +# +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set + +# +# PHY device support +# + +# +# Ethernet (10 or 100Mbit) +# +# CONFIG_NET_ETHERNET is not set + +# +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set +CONFIG_PPP=m +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +# CONFIG_PPP_DEFLATE is not set +# CONFIG_PPP_BSDCOMP is not set +# CONFIG_PPP_MPPE is not set +# CONFIG_PPPOE is not set +# CONFIG_SLIP is not set +CONFIG_SLHC=m +# CONFIG_SHAPER is not set +CONFIG_NETCONSOLE=m +CONFIG_NETPOLL=y +CONFIG_NETPOLL_RX=y +CONFIG_NETPOLL_TRAP=y +CONFIG_NET_POLL_CONTROLLER=y + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=320 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_TSDEV=y +CONFIG_INPUT_TSDEV_SCREEN_X=320 +CONFIG_INPUT_TSDEV_SCREEN_Y=480 +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_KEYBOARD_STOWAWAY=m +CONFIG_GPIO_KEYS=y +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_TSC2101=m +# CONFIG_TOUCHSCREEN_GUNZE is not set +# CONFIG_TOUCHSCREEN_ELO is not set +# CONFIG_TOUCHSCREEN_MTOUCH is not set +# CONFIG_TOUCHSCREEN_MK712 is not set +# 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_WM97XX is not set +CONFIG_INPUT_MISC=y +CONFIG_INPUT_UINPUT=y + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +CONFIG_SERIO_RAW=y +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_PXA=y +# CONFIG_SERIAL_PXA_CONSOLE is not set +CONFIG_SERIAL_PXA_COUNT=4 +# CONFIG_SERIAL_PXA_IR is not set +CONFIG_SERIAL_CORE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +CONFIG_HW_RANDOM=m +# CONFIG_NVRAM is not set +CONFIG_SA1100_RTC=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# +# CONFIG_TCG_TPM is not set + +# +# I2C support +# +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=m + +# +# I2C Algorithms +# +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set +CONFIG_I2C_ALGOPXA=y + +# +# I2C Hardware Bus support +# +CONFIG_I2C_PXA=y +# CONFIG_I2C_PXA_SLAVE is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_PCA_ISA is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_DS1337 is not set +# CONFIG_SENSORS_DS1374 is not set +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_I2C_ADCM2650 is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_PCA9535 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_RTC8564 is not set +CONFIG_TPS65010=m +# CONFIG_SENSORS_MAX6875 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# SPI support +# +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set + +# +# Dallas's 1-wire bus +# +# CONFIG_W1 is not set + +# +# Hardware Monitoring support +# +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set + +# +# Hardware Monitoring - Battery +# +# CONFIG_BATTERY_MONITOR is not set + +# +# L3 serial bus support +# +# CONFIG_L3 is not set + +# +# SoC drivers +# +# 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_TSC2101=m +# CONFIG_SOC_TSC2200 is not set + +# +# Misc devices +# +CONFIG_BATTCHARGE_MONITOR=m + +# +# 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 +CONFIG_LEDS_CLASS=m + +# +# LED drivers +# + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_SHARED=y + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# Graphics support +# +CONFIG_FIRMWARE_EDID=y +CONFIG_FB=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +# CONFIG_FB_IMAGEON is not set +# CONFIG_FB_S1D13XXX is not set +CONFIG_FB_PXA=y +CONFIG_FB_PXA_PARAMETERS=y +# CONFIG_FB_MBX is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_VSFB is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +# CONFIG_FONT_8x16 is not set +CONFIG_FONT_6x11=y +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set + +# +# Logo configuration +# +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_LOGO_LINUX_CLUT224=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_DEVICE=y +# CONFIG_LCD_CLASS_DEVICE is not set +# CONFIG_BACKLIGHT_CORGI is not set +CONFIG_BACKLIGHT_PXAPWM=y + +# +# Sound +# +CONFIG_SOUND=m + +# +# Advanced Linux Sound Architecture +# +CONFIG_SND=m +CONFIG_SND_TIMER=m +CONFIG_SND_PCM=m +# CONFIG_SND_SEQUENCER is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_PCM_OSS_PLUGINS=y +# CONFIG_SND_DYNAMIC_MINORS is not set +CONFIG_SND_SUPPORT_OLD_API=y +# CONFIG_SND_VERBOSE_PROCFS is not set +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set + +# +# Generic devices +# +CONFIG_SND_AC97_CODEC=m +CONFIG_SND_DUMMY=m +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set + +# +# ALSA ARM devices +# +CONFIG_SND_PXA2xx_I2SOUND=m +CONFIG_SND_PXA2XX_PCM=m +CONFIG_SND_PXA2XX_AC97=m + +# +# SoC audio support +# +# CONFIG_SND_SOC is not set + +# +# Open Sound System +# +# CONFIG_SOUND_PRIME is not set +CONFIG_AC97_BUS=m + +# +# HID Devices +# +CONFIG_HID=y + +# +# USB support +# +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB_ARCH_HAS_EHCI is not set +# CONFIG_USB is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# USB Gadget Support +# +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG_FILES is not set +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_NET2280 is not set +CONFIG_USB_GADGET_PXA2XX=y +CONFIG_USB_PXA2XX=y +# CONFIG_USB_PXA2XX_SMALL is not set +# CONFIG_USB_GADGET_PXA27X is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_MQ11XX is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_S3C2410 is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_AT91 is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +# CONFIG_USB_GADGET_DUALSPEED is not set +# CONFIG_USB_ZERO is not set +CONFIG_USB_ETH=m +CONFIG_USB_ETH_RNDIS=y +# CONFIG_USB_GADGETFS is not set +CONFIG_USB_FILE_STORAGE=m +# CONFIG_USB_FILE_STORAGE_TEST is not set +CONFIG_USB_G_SERIAL=m +# CONFIG_USB_MIDI_GADGET is not set +# CONFIG_USB_G_CHAR is not set + +# +# MMC/SD Card support +# +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_BLOCK=y +# CONFIG_MMC_PXA is not set +# CONFIG_MMC_TIFM_SD is not set +# CONFIG_MMC_TMIO is not set +# CONFIG_MMC_SAMCOP is not set +CONFIG_MMC_WBSD_PALMT3=m + +# +# Real Time Clock +# +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set + +# +# RTC drivers +# +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_M48T86 is not set +CONFIG_RTC_DRV_SA1100=m +# CONFIG_RTC_DRV_TEST is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT2_FS_XIP=y +CONFIG_FS_XIP=y +# CONFIG_EXT3_FS is not set +# CONFIG_EXT4DEV_FS is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +# CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set +CONFIG_XFS_FS=m +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_XFS_POSIX_ACL is not set +# CONFIG_XFS_RT is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_INOTIFY is not set +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=m + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=m +CONFIG_FAT_DEFAULT_CODEPAGE=852 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-2" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +CONFIG_CONFIGFS_FS=m + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_JFFS2_FS=m +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_SUMMARY is not set +# CONFIG_JFFS2_FS_XATTR is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +CONFIG_CRAMFS=y +# CONFIG_SQUASHFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +CONFIG_UNION_FS=m +CONFIG_UNION_FS_XATTR=y + +# +# Network File Systems +# +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=m +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V3_ACL is not set +# CONFIG_NFSD_V4 is not set +CONFIG_NFSD_TCP=y +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=m +CONFIG_SMB_NLS_DEFAULT=y +CONFIG_SMB_NLS_REMOTE="cp1250" +CONFIG_CIFS=m +CONFIG_CIFS_STATS=y +# CONFIG_CIFS_STATS2 is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +CONFIG_CODA_FS=m +# CONFIG_CODA_FS_OLD_API is not set +# CONFIG_AFS_FS is not set +# CONFIG_9P_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_EFI_PARTITION is not set + +# +# Native Language Support +# +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-2" +CONFIG_NLS_CODEPAGE_437=m +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +CONFIG_NLS_CODEPAGE_852=y +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +CONFIG_NLS_CODEPAGE_866=m +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +CONFIG_NLS_CODEPAGE_1250=y +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=m +CONFIG_NLS_ISO8859_2=y +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +CONFIG_NLS_KOI8_R=m +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=y + +# +# Distributed Lock Manager +# +# CONFIG_DLM is not set +CONFIG_AUFS=m + +# +# These options are generated automatically for 2.6.20-hnd0 +# +CONFIG_AUFS_FAKE_DM=y +CONFIG_AUFS_BRANCH_MAX_127=y +# CONFIG_AUFS_BRANCH_MAX_511 is not set +# CONFIG_AUFS_BRANCH_MAX_1023 is not set +# CONFIG_AUFS_BRANCH_MAX_32767 is not set + +# +# INOTIFY and AUFS_HINOTIFY are disabled +# +# CONFIG_AUFS_KSIZE_PATCH is not set +# CONFIG_AUFS_LHASH_PATCH is not set +# CONFIG_AUFS_DEBUG is not set +# CONFIG_AUFS_DEBUG_RWSEM is not set +CONFIG_AUFS_COMPAT=y + +# +# Profiling support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +CONFIG_ENABLE_MUST_CHECK=y +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +# CONFIG_SMALLOOPS is not set +# CONFIG_DEBUG_KERNEL is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_FRAME_POINTER=y +# CONFIG_DEBUG_USER is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +CONFIG_CRYPTO=y +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_BLKCIPHER=m +CONFIG_CRYPTO_MANAGER=m +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_GF128MUL is not set +CONFIG_CRYPTO_ECB=m +CONFIG_CRYPTO_CBC=m +# CONFIG_CRYPTO_LRW is not set +CONFIG_CRYPTO_DES=m +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_AES is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Hardware crypto devices +# + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_CRC_CCITT=m +# CONFIG_CRC16 is not set +CONFIG_CRC32=y +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m +CONFIG_PLIST=y +CONFIG_IOMAP_COPY=y This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-03-09 20:25:44
|
Revision: 899 http://svn.sourceforge.net/hackndev/?rev=899&view=rev Author: keddar Date: 2007-03-09 12:24:34 -0800 (Fri, 09 Mar 2007) Log Message: ----------- l4p: init script and kernel config (not only) for BFUGarux addition Added Paths: ----------- linux4palm/BFUGarux/init/ linux4palm/BFUGarux/init/linuxrc linux4palm/BFUGarux/init/live-lib Added: linux4palm/BFUGarux/init/linuxrc =================================================================== --- linux4palm/BFUGarux/init/linuxrc (rev 0) +++ linux4palm/BFUGarux/init/linuxrc 2007-03-09 20:24:34 UTC (rev 899) @@ -0,0 +1,44 @@ +#!/bin/sh + +export PATH="/bin:/sbin" + +. $PREFIX/live-lib + +do_banner +#do_insmod_base + +do_initial_mnt + +do_cmdline_check +do_bfu_check +do_cmdline_show + +do_insmod_base + +do_ramdisk +do_kernel_init + +do_stowaway + +do_network_init + +$DEBUGCMD + +do_start_default + +#do_usb_power 0 # MAYBE is req. with Win2k ? TEST: WXP on 2pc = OK +#do_usb_power 1 + +do_plug_mod +do_unionfs +#do_aufs +$DEBUGCMD + +do_load_live_changes +do_unioncopy +do_rootcopy + +do_mmc_move +$DEBUGCMD + +do_chroot Property changes on: linux4palm/BFUGarux/init/linuxrc ___________________________________________________________________ Name: svn:executable + * Added: linux4palm/BFUGarux/init/live-lib =================================================================== --- linux4palm/BFUGarux/init/live-lib (rev 0) +++ linux4palm/BFUGarux/init/live-lib 2007-03-09 20:24:34 UTC (rev 899) @@ -0,0 +1,1159 @@ +#!/bin/sh +# info: this live-lib is based on Farcallers Garux 0.6.1 (based on linux-live.org) +# kEdAR.palmlinux.cz + +######### RELEASE INFO +. $PREFIX/relinfo +KERNEL_VER="2.6.20-hnd0" + +######### MISC PARAMS +## DEFAULT BACKLIGHT (fix for 0 backlight in some cases) +LCDBLDEF="40" + +######### UNIONFS PARAMS +UNION=/union +MEMORY=/memory +MOUNTDIR=mnt +CHANGES=$MEMORY/changes +IMAGES=$MEMORY/images +COPY2RAM=$MEMORY/copy2ram + +######### for MMC PARAMS +MMC_MNT=$MEMORY/mmc +MMC_MNT_ROOT=/mnt/mmc +MMC_MNTNEW="$UNION/mnt/mmc" +LINUX2RAM=/linux2ram ### replaced with BFU if found... (DON'T USE /$LINUX2RAM :) +CMD_MMC="$MMC_MNT$LINUX2RAM/cmdline" +LIVE_CHANGES="$MMC_MNT/live_changes.squashfs" + +######### REFLASH PARAMS +BIN2FLASH="$MMC_MNT_ROOT/bin2flash" +MTD_FREE_MD5="41d2e2c0c0edfccf76fa1c3e38bc1cf2 -" +MTD_PROC_MD5="14208aa9a7579355d19537326f22da8b -" +PREFIX="/mnt/live" # used after pivot_root + +######### LOGGING FUNCTIONS +C_OFF="\033[0;0m" +C_GRE="\033[01;32m" +C_BLU="\033[01;34m" +C_YEL="\033[01;33m" +C_RED="\033[01;41m" +C_REDY="\033[01;33;41m" +C_REDW="\033[01;37;41m" +C_WHIT="\033[01;37m" +INFO=" ${C_YEL}*${C_WHIT}" +WARN=" ${C_GRE}*${C_YEL}" +ERRO=" ${C_REDY}*${C_REDW}" + +## efetchall used for critical part, show info also if SilentBoot is used +efetchall() { + echo -e " ${C_WHIT}>> $1${C_OFF}" +} + +## don't show if SilentBoot is used +efetch() { + if [ "$SILENT" = "" ]; then echo -e " ${C_WHIT}>> $1${C_OFF}"; fi +} + +einfo() { + echo -e "$INFO $1${C_OFF}" +} + +ewarn() { + echo -e "$WARN $1${C_OFF}" +} + +eerr() { + echo -e "$ERRO $1${C_OFF}" +} + +edie() { + eerr "$1" + echo -e "\n" + eerr "System Halted." + while [ 1 -eq 1 ]; do + /bin/sleep 1000000 + done +} + +do_die() { + if [ $? -ne 0 ]; then + edie "Failed" + fi +} + +do_die_msg() { + if [ $? -ne 0 ]; then + edie "$1" + fi +} + +######### COMMON FUNCTIONS +do_banner() { + echo + einfo "Linux4Palm ${C_BLU}http://www.hackndev.com/${C_OFF}" + einfo "Release codename : ${C_RED}${L4P_RELEASE}${C_OFF}" + einfo "Version : $L4P_VERSION" + einfo "Kernel : $KERNEL_VER" + einfo "Bootloader: $BOOTL" + einfo "Unofficial rev.: ${C_GRE}$UNOFF${C_OFF}" + einfo "Unofficial homepage : http://kedar.palmlinux.cz\n\n" +} + +## insert base kernel modules +do_insmod_base() { + ewarn "Loading core modules" + if [ -e /lib/modules/$KERNEL_VER/kernel/fs/aufs/aufs.ko ]; then + efetchall "aufs" ### change efetchall to efetch after test aufs... + modprobe aufs + else + efetch "unionfs" + modprobe unionfs + fi + if [ -e /lib/modules/$KERNEL_VER/kernel/arch/arm/mach-pxa/palmt3/palmt3_battery.ko ]; then + efetch "palmt3_battery" + modprobe palmt3_battery + fi + if [ -e /lib/modules/$KERNEL_VER/kernel/drivers/i2c/chips/tps65010.ko ]; then + efetch "tps65010" + modprobe tps65010 + fi + if [ -e /lib/modules/$KERNEL_VER/kernel/fs/squashfs/squashfs.ko ]; then + efetch "squashfs" + modprobe squashfs + fi + + efetch "gpioed" + modprobe gpioed + do_die_msg "modprobe gpioed failed" +} + +## probe modules from modules-???.squashfs, after unionfs is created +do_insmod_ext() { + ewarn "Probing some modules from real root" + modprobe -s -q tsc2101 + $DEBUGCMD +} + +## mount initial filesystems +do_initial_mnt() { +# /union unionfs +# /memory/ is tmpfs (50% RAM ~32Mb) +# rootfs rootfs (sqashfs dump) +# changes/ changed files in rootfs +# mnt/root/ bound to / + ewarn "Mounting initial filesystems" + mount -t proc none /proc + mount -t sysfs sysfs /sys +} + +## mount ramdisk as tmpfs (used ram in real = used space in ramdisk !) +do_ramdisk() { + ewarn "Mounting Ramdisk..." + RAMSIZE="$BFURAMDiskSize" + if [ "$RAMSIZE" = "" ]; then RAMSIZE="`cmdline_value ramsize`"; fi + if [ "$RAMSIZE" = "" ]; then RAMSIZE="80%"; fi + mount -t tmpfs -o size=$RAMSIZE tmpfs $MEMORY + efetch "mounted with max size $RAMSIZE" +} + +## some settings for kernel +do_kernel_init() { + ewarn "Kernel settings..." + efetch "enabling dynamic tick timer" + echo 1 > /sys/devices/system/timer/timer0/dyn_tick + do_lcdbl_set +} + +## set backlight, read from cmdline(mmc) or use default value 40 +do_lcdbl_set() { + efetch "current backlight: `cat /sys/class/backlight/pxapwm-bl/brightness`" + if [ "$LCDBL" != "" ]; then + efetch "setting backlight from cmdline..." + echo $LCDBL >/sys/class/backlight/pxapwm-bl/brightness + else + efetch "setting backlight to init default: $LCDBLDEF" + echo $LCDBLDEF >/sys/class/backlight/pxapwm-bl/brightness + fi + efetch "backlight after set: `cat /sys/class/backlight/pxapwm-bl/brightness`" +} + +## power on usb port, used for usb network +do_usb_power() { + if [ $1 -eq 1 ]; then + efetch "Powering on USB" + echo "h 85" > /proc/gpioed 2>/dev/null + else + efetch "Powering off USB" + echo "l 53" > /proc/gpioed $SILENT0 + echo "l 85" > /proc/gpioed $SILENT0 + fi +} + +## power on serial port, used for ext.keyboard +do_serial_power() { + if [ $1 -eq 1 ]; then + efetch "Powering on serial" + echo "l 35" > /proc/gpioed $SILENT0 + echo "h 35" > /proc/gpioed $SILENT0 + else + efetch "Powering off serial" + echo "l 35" > /proc/gpioed $SILENT0 + fi +} + +## initialize usb network interface +do_network_init() { + if [ "$usenet" != "0" ]; then + ewarn "Initializing network" + do_usb_power 0 + modprobe -s -q g_ether + do_die_msg "modprobe g_ether failed" + do_usb_power 1 + fi +} + +## network configure in text mode - not used for BFUSettings +do_network_conf() { + ewarn "Configure network:" + einfo "Press 'Center' for network as\n\tHost: 192.168.0.1/24\n\tPalm: 192.161.0.231/24" + einfo "Press 'Address(c)', 'Center' for network as\n\tHost: 10.0.7.1/24\n\tPalm: 10.0.7.231/24" + ewarn "Don't forget to apply network configuration\n\t on your host before continue..." + read netpref + if [ "$netpref" = "c" ]; then + NET_HOST_IP="10.0.7.1" + NET_PALM_IP="10.0.7.231" + NET_NETMASK="255.255.255.0" + else + NET_HOST_IP="192.168.0.1" + NET_PALM_IP="192.168.0.231" + NET_NETMASK="255.255.255.0" + fi + unset netpref + export NET_HOST_IP NET_PALM_IP NET_NETMASK + ewarn "Configuring network" + ifconfig usb0 $NET_PALM_IP netmask $NET_NETMASK up + do_die_msg "ifconfig failed for \"$NET_PALM_IP netmask $NET_NETMASK\"" + route del default gw $NET_HOST_IP 2>/dev/null + route add default gw $NET_HOST_IP + if [ $? -ne 0 ]; then + eerr "failed routing\n\t$NET_HOST_IP\n\trestart configure.." + do_configure + fi + sleep 2 +} + +## configure network +do_network_def() { + if [ "$usenet" != "0" ]; then + ## set default net + NET_HOST_IP="192.168.0.1" + NET_PALM_IP="192.168.0.231" + NET_NETMASK="255.255.255.0" + if [ "$BFUPalmIP" != "" ]; then ## if BFUSettings present, replace previous defaults + NET_HOST_IP="$BFUPCIP" + NET_PALM_IP="$BFUPalmIP" + NET_NETMASK="$BFUNetMask" + fi + export NET_HOST_IP NET_PALM_IP NET_NETMASK + ewarn "Configuring network" + efetch "PalmIP: $NET_PALM_IP" + efetch "HostIP: $NET_HOST_IP" + efetch "Mask: $NET_NETMASK" + if [ "$NET_NETMASK" = "255.255.255.255" ]; then + efetch "pointopoint used" + ifconfig usb0 $NET_PALM_IP pointopoint $NET_HOST_IP netmask $NET_NETMASK up + do_die_msg "ifconfig failed for \"$NET_PALM_IP pointopoint $NET_HOST_IP\"" + else + ifconfig usb0 $NET_PALM_IP netmask $NET_NETMASK up + do_die_msg "ifconfig failed for \"$NET_PALM_IP netmask $NET_NETMASK\"" + fi + route add default gw $NET_HOST_IP + if [ $? -ne 0 ]; then + eerr "failed routing\n\t$NET_HOST_IP\n\t(re)start configure.." + do_configure + fi + fi +} + +## select file with list of modules for boot, if not found create modlist-all.txt from all squashfs files +do_select_modlist() { + if [ "`ls $MMC_MNT$LINUX2RAM/modlist*.txt`" != "" ]; then + modporadi="1" + CWD=`pwd` ### xxx + cd $MMC_MNT$LINUX2RAM ### + for modtxt in `ls -1 modlist*.txt` ; do + if [ "$modporadi" = "$BFUModList" ]; then + MODLIST="$modtxt" + export MODLIST + return 0 + else + modporadi=$(($modporadi+1)) + fi + done + unset modtxt + cd $CWD ### + else + if [ -e "$MMC_MNT$LINUX2RAM" ]; then + efetch "modlist: $MODLIST - NOT FOUND/OR SELECTED" + efetch "make modlist-all.txt in memory..." + efetch "... from $LINUX2RAM/*.squashfs" + CWD=`pwd` + cd $MMC_MNT$LINUX2RAM + ls -1 *.squashfs >"$MEMORY/modlist-all.txt" + cd $CWD + MODLIST="modlist-all.txt" + export MODLIST + else + einfo "Directory $LINUX2RAM NOT FOUND :-(" + fi + fi +} + + +## choice default start: +## - if found config cmdline - run old textmode configure +## - if BFUSource is empty - run default configured => SD-GPE-NET192 +## - in other case - run BFUSettings configure +do_start_default() { + echo + if [ `cmdline_parameter config` ]; then + if [ `cmdline_parameter mmc` ]; then do_mmc_mount; fi + do_configure + else + if [ "$BFUSource" = "" ]; then + ewarn "Start Default: SD/MMC-GPE" + BFUPalmIP="" ## reset -> do_network_def use default + do_network_def + MODLIST="modlist-gpe.txt" + do_mmc_mount + do_get_modules_mmc + else + do_configure_bfu + fi + fi +} + +## old configure on linux side in text mode +do_configure() { + do_network_conf + ewarn "Select start method:" + efetchall "MMC: 'Center'\n\t" + efetchall "WWW: 'Memo(m)','Center'" + efetchall "NFS: 'Address(c)','Center'" + efetchall "MMCpart: 'ToDo(t)','Center'" + read via + if [ "$via" = "" ]; then + efetch "partition ? for p1(vfat):'Center'\n\t\t for p2(ext2):'Memo','Center'" + read wpart + if [ "$wpart" = "" ]; then + export part=p1 + VFSTYPE="vfat" + fi + if [ "$wpart" = "m" ]; then + export part=p2 + VFSTYPE="ext2" + fi + unset wpart + do_mmc_mount + do_select_modlist + do_get_modules_mmc + fi + if [ "$via" = "m" ]; then + do_network_def + do_get_modules_www + fi + if [ "$via" = "c" ]; then + do_mount_nfs + do_chroot_nfs + fi + if [ "$via" = "t" ]; then + do_mmc_mount + do_chroot_oncard + fi + unset via +} + +## configure boot process from BFUSettings parameters +do_configure_bfu() { + #### configure network + if [ $BFUUseNet = "1" ]; then do_network_def; fi + + #### type of partition + if [ "$BFUFS" = "0" ]; then VFSTYPE="vfat"; fi + if [ "$BFUFS" = "1" ]; then VFSTYPE="ext2"; fi + if [ "$BFUFS" = "2" ]; then VFSTYPE="ext3"; fi + + + #### source is modules on card(memory) + if [ "$BFUSource" = "0" ]; then + do_mmc_mount + do_select_modlist + do_get_modules_mmc + fi + + #### source is modules from www + if [ "$BFUSource" = "1" ]; then + ewarn "Don't forget config usb0 on HOST..." + sleep 3 + WWW="$BFUAddress" + if [ "$BFUUseNet" = "0" ]; then usenet="1"; do_network_def; fi ### replace BFUUseNet=0 + do_get_modules_www + fi + + #### source is real rootfs on nfs share + if [ "$BFUSource" = "2" ]; then + ewarn "Don't forget config usb0 on HOST..." + sleep 3 + NFS="$BFUAddress" + if [ $BFUUseNet = "0" ]; then do_network_def; fi ### replace BFUUseNet=0 + do_mount_nfs + do_chroot_nfs + fi + + #### source is real rootfs on nfs share + if [ "$BFUSource" = "3" ]; then + do_mmc_mount + do_mmc_move ### xxxxx + do_chroot_oncard + fi +} + +## get modules from www server, from modlist.txt, or modlist-gpe.txt +do_get_modules_www() { + $DEBUGCMD + ewarn "Getting module list:"; efetch "$WWW/modlist.txt" + cd $MEMORY + wget "$WWW/modlist.txt" -P $MEMORY + if [ -e modlist.txt ]; then + MODLIST="modlist.txt" + else + efetch "try modlist-gpe.txt" + wget "$WWW/modlist-gpe.txt" + MODLIST="modlist-gpe.txt" + fi + export MOD_STR + do_die + MOD_STR="" + mkdir -p $COPY2RAM + for mod in `cat $MEMORY/$MODLIST` ; do + if [ -e $MMC_MNT$LINUX2RAM/$mod ]; then + efetch "$mod" + wget "$WWW/$mod" -P $COPY2RAM + MOD_STR="$mod $MOD_STR" + else + efetch "$mod" + wget "$WWW/$mod" -P $COPY2RAM + MOD_STR="$mod $MOD_STR" + fi + done + export MOD_STR + MODDIR="$COPY2RAM" + start_from_www="1" + $DEBUGCMD +} + +## get modules from mmc card +do_get_modules_mmc() { + $DEBUGCMD + ewarn "Getting modules list..." + cd $MEMORY + MOD_STR="" + ## don't try copy modlist from mmc, if found in memory + if [ ! -e $MEMORY/modlist-all.txt ]; then + efetch "$MMC_MNT$LINUX2RAM/$MODLIST" + cp "$MMC_MNT$LINUX2RAM/$MODLIST" . + do_die + fi + + ## get MOD_STR from MODLIST + if [ "$copy2ram" = "1" ]; then efetch "modules will be copied to ram. wait..."; fi + for mod in `cat $MODLIST` ; do + if [ "$copy2ram" = "1" ]; then + efetch "$mod" + mkdir -p $COPY2RAM + cp $MMC_MNT$LINUX2RAM/$mod $COPY2RAM + MOD_STR="$mod $MOD_STR" + export MOD_STR + MODDIR="$COPY2RAM" + else + MOD_STR="$mod $MOD_STR" + export MOD_STR + MODDIR="$MMC_MNT$LINUX2RAM" + fi + done + export MOD_STR + start_from_mmc="1" + $DEBUGCMD +} + +## mount mmc partition for boot, with or without run fsck +do_mmc_mount() { + do_cpufreq_scale + ewarn "Initializing MMC..." + modprobe -s -q wbsd-palmt3 + sleep 9 + + if [ "$BFUDevice" = "" ]; then + if [ "$part" = "" ]; then part="p1"; fi + MMC_PART="/dev/mmcblk0"$part + else + MMC_PART="$BFUDevice" + fi + export MMC_PART + + if [ "$VFSTYPE" = "vfat" ]; then modprobe vfat; fi + if [ "$VFSTYPE" = "ext2" ]; then modprobe ext2; fi + + if [ ! -e $MMC_MNT ]; then mkdir -p $MMC_MNT; fi + + if [ "$fsckon" = "1" ]; then + echo + ewarn "MANUALLY run 'fsck' on $MMC_PART ?" + if [ "$VFSTYPE" = "vfat" ] ; then + if message_skipped "\t...dosfsck..." 9 "SKIP"; then efetch "autorepair,save unused,verify write"; dosfsck -fyvVw $MMC_PART; fi + else + if message_skipped "\t...e2fsck..." 9 "SKIP"; then e2fsck $MMC_PART; fi + fi + fi + + efetch "mount $MMC_PART to $MMC_MNT" + efetch "(filesystem: $VFSTYPE, readmode: $rmode)" + + ### only for vfat set umask + if [ "$VFSTYPE" = "vfat" ]; then + mount -t $VFSTYPE $MMC_PART $MMC_MNT -o $rmode,noatime,umask=0000 + else + mount -t $VFSTYPE $MMC_PART $MMC_MNT -o $rmode,noatime + fi + + if [ $? -ne 0 ]; then + eerr "Error while mounting: $MMC_PART\n\tNOTE: Try run Garux again, after reinsert card...\n" + showbfu="1"; do_bfu_check; sleep 7 + ewarn "Remove mmc modules, run configure..." + rmmod wbsd-palmt3 + do_configure + fi + + do_cmdline_check_mmc + do_cpufreq_scale_mmc +} + +## try reinitialize mmc, if mmc/sd don't mount [if say PowerDown don't work] +do_mmc_reini() { + einfo "DEInitializing MMC..." + umount -l $MMC_PART $MMC_MNT + rmmod wbsd-palmt3 + einfo "MAYBE: try change, add missed file\n\t or reinsert card ?\n\tafter this try press 'Center'" + read key + do_mmc_mount + unset key +} + +## mount NFS share for boot +do_mount_nfs() { + ewarn "Mounting NFS - $NFS" + ewarn "${C_REDY} WARNING: ${C_OFF}${C_WHIT}boot is ssSlLOoooWww" + mkdir -p $MEMORY/nfs + + ## only for test + ### efetch "run portmap:"; portmap + ### efetch "run inetd: "; inetd + ### efetch "ifconfig" loopback; ifconfig lo 127.0.0.1 netmask 255.0.0.0 up + + modprobe -v nfs + mount -t nfs $NFS $MEMORY/nfs + efetch "list $NFS:"; ls $MEMORY/nfs; efetch "wait for enter......"; read enter ### + $DEBUGCMD + if [ $? -ne 0 ]; then + eerr "Error while mounting:\n\t$NFS" + via="" + do_configure + fi +} + +## create unionfs from modules, with writing support to changes dir in memory +do_unionfs() { + ewarn "Creating unionfs" + mkdir -p $CHANGES + unionarg="dirs=$CHANGES=rw" + for mod in $MOD_STR ; do + unionarg="$unionarg:$IMAGES/$mod=ro" + done + mount -t unionfs -o $unionarg unionfs $UNION + do_die_msg "mount unionfs failed, mount args:\n$unionarg" +} + +## create aufs from modules, with writing support to changes dir in memory +do_aufs() { + ewarn "Creating unionfs (aufs)" + mkdir -p $CHANGES + unionarg="br:$CHANGES=rw" + for mod in $MOD_STR ; do + unionarg="$unionarg:$IMAGES/$mod=ro" + done + mount -t aufs -o $unionarg aufs $UNION + do_die_msg "mount aufs failed, mount args:\n$unionarg" +} + +## insert squashfs modules into unionfs +do_plug_mod() { + ewarn "Mounting modules" + cd $MEMORY + for mod in $MOD_STR ; do + if [ -e $MODDIR/$mod ]; then + efetch "$mod" + mkdir -p $IMAGES/$mod + mount -t squashfs -o ro,loop $MODDIR/$mod "$IMAGES/$mod" + else + ewarn "${C_REDY} WARNING: ${C_OFF}${C_WHIT} $mod not found\n\t ... put it in $LINUX2RAM\n\t ..or remove line from modlist-???.txt" + sleep 9 + fi + + done +} + +## re-rooted to directory with new root +do_chroot() { + cd $UNION + mkdir -p mnt/live + umount /sys + if [ ! -e $UNION/dev/console ]; then mknod $UNION/dev/console c 5 1; fi + if [ ! -e $UNION/dev/initctl ]; then mknod $UNION/dev/initctl p; fi + pivot_root . mnt/live + do_bin2flash_check + do_insmod_ext + ewarn "Running init..." + exec /usr/sbin/chroot . /sbin/init 5 <dev/console >dev/console 2>&1 + do_die +} + +do_chroot_nfs() { + cd $MEMORY/nfs + mkdir -p mnt/live + umount /sys + if [ ! -e $MEMORY/nfs/dev/console ]; then mknod $MEMORY/nfs/dev/console c 5 1; fi + if [ ! -e $MEMORY/nfs/dev/initctl ]; then mknod $MEMORY/nfs/dev/initctl p; fi + pivot_root . mnt/live + do_insmod_ext + ewarn "Running init..." + exec /usr/sbin/chroot . /sbin/init 5 <dev/console >dev/console 2>&1 + do_die +} + +do_chroot_oncard() { + cd $MMC_MNT + mkdir -p mnt/live + umount /sys + if [ ! -e dev/console ]; then mknod dev/console c 5 1; fi + if [ ! -e dev/initctl ]; then mknod dev/initctl p; fi + pivot_root . mnt/live + do_insmod_ext + ewarn "Running init..." + exec /usr/sbin/chroot . /sbin/init 5 <dev/console >dev/console 2>&1 + do_die +} + +######### MISC ######### + +## initialise stowaway/docota keyboard +do_stowaway() { + if [ "$usekbd" != "0" ]; then + ewarn "Initializing Stowaway compatible keyboard" + modprobe stowaway + do_serial_power 1 + inputattach --stowaway /dev/ttyS3 & + fi +} + +## copy files from unioncopy dir (in init) [ for now is used only for inputattach ] +do_unioncopy(){ + if [ -e /unioncopy ]; then +### einfo "Copying some file from init to real root (/)" +### cp -a /unioncopy/* $UNION 2>/dev/null + if [ "$usekbd" != "0" ]; then ### fixme - rewrite for separated copy !? + ewarn "Copying ...resume.d/inputtattach to real root (/)" + cp -a /unioncopy/* $UNION 2>/dev/null + fi + fi + +} + +## if found rootcopy (in source dir for modules), recursive copy all to / +do_rootcopy() { + if [ -e $MMC_MNT$LINUX2RAM/rootcopy ]; then + ewarn "Copying 'rootcopy' to real root (/)" + cp -a $MMC_MNT$LINUX2RAM/rootcopy/* $UNION 2>/dev/null + fi + if [ "$start_from_www" = "1" ]; then + cd $COPY2RAM + einfo "Look for 'rootcopy.zip' on:"; efetch "$WWW" + wget "$WWW/rootcopy.zip" -P $COPY2RAM + if [ -e $COPY2RAM/rootcopy.zip ]; then + efetch "found, unpack to real root (/)..." + unzip -o -q $COPY2RAM/rootcopy.zip -d $UNION + else + efetch "not found...skiping" + fi + fi +} + +## unpack live_changes.squashfs if found (created if reboot, or manualy run Live_Save icon in GPE) +do_load_live_changes() { + if [ "$start_from_mmc" = "1" ]; then + if [ "$liveskip" != "1" ]; then + if [ -e $LIVE_CHANGES ]; then + if message_skipped "$WARN Loading live_changes... " 3 "${C_REDY}SKIP${C_OFF}"; then + efetch "unpacking ..." + unsquashfs -f -dest $CHANGES $LIVE_CHANGES >/dev/null + else + efetchall "skiping ..." + fi + fi + fi + fi +} + +## move mmc mountpoint to /mnt/mmc after finish init +do_mmc_move() { + if [ "$start_from_mmc" = "1" ]; then + ewarn "Move MMC mountpoint to /mnt/mmc" + mkdir -p $MMC_MNTNEW + ### xxx if [ $rmode="rw" ]; then mount $MMC_PART $MMC_MNT -o remount,$rmode; fi + mount --move $MMC_MNT $MMC_MNTNEW + rm -r -f $MMC_MNT + fi + + ## mount also p1, if for boot is used p2 + if [ "$MMC_PART" != "/dev/mmcblk0p1" ]; then + modprobe vfat + efetch "For boot not used p1, mounting p1(FAT) for data" + if [ "$start_from_mmc" = "1" ]; then + mkdir -p $MMC_MNTNEW'1' + mount /dev/mmcblk0p1 $MMC_MNTNEW'1' -o $rmode,noatime,umask=0000 + else + mkdir -p $MMC_MNT/mnt/mmc1 + mount /dev/mmcblk0p1 $MMC_MNT/mnt/mmc1 -o $rmode,noatime,umask=0000 + fi + fi +} + +## set cpufreq to fixed or auto frequency, using cpufreq governors +do_cpufreq_scale() { + ewarn "Setting CPU speed..." + efetch "minimal frequency: "`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq`" kHz" + efetch "maximal frequency: "`cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq`" kHz" + efetch "speed before is: "`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed`" kHz" + if [ `cmdline_parameter cpufreq` ]; then + CPUFREQ="`cmdline_value cpufreq`" + efetch "read cpufreq from /proc/cmdline: $CPUFREQ'000' kHz" + fi + if [ "$CPUFREQ" = "" ]; then CPUFREQ="133"; efetch "set default value from init..."; fi + if [ "$CPUFREQ" != "auto" ]; then + echo $CPUFREQ'000' >/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed + efetchall "after set is speed: "`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed`" kHz" + else + GOVERNOR="conservative"; export GOVERNOR ; modprobe -q "cpufreq_$GOVERNOR" + echo "$GOVERNOR" >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor + efetchall "cpufreq is set to auto ($GOVERNOR)" + fi +} + +## change cpufreq from text file 'cmdline' in source dir for modules/real root (if found file & cpu=) +do_cpufreq_scale_mmc() { + echo + if [ -e $CMD_MMC ]; then + if [ `cmdline_parameter cpufreq $CMD_MMC` ]; then + ewarn "ReSetting CPU speed, from:"; efetch " $CMD_MMC" + efetch "speed before is: "`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed`" kHz" + CPUFREQ="`cmdline_value cpufreq $CMD_MMC`" + if [ "$CPUFREQ" != "auto" ]; then + echo $CPUFREQ'000' >/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed + efetch "after set is speed: "`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed`" kHz" + else + GOVERNOR="conservative"; export GOVERNOR ; modprobe -q "cpufreq_$GOVERNOR" + echo "$GOVERNOR" >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor + efetch "cpufreq is set to auto ($GOVERNOR)" + fi + fi + fi + echo +} + +## show kernel cmdline +do_cmdline_show() { + if [ "$SILENT" = "" ]; then + einfo "CMDLine" + echo `cat /proc/cmdline` + fi +} + +## check kernel/garux cmdline parameters +do_cmdline_check() { + if [ -e /proc/cmdline ]; then + if [ `cmdline_parameter nokbd` ]; then usekbd="0"; fi + if [ `cmdline_parameter debug` ]; then DEBUGCMD="debug"; fi + if [ `cmdline_parameter mmcrw` ]; then rmode="rw"; else rmode="ro"; fi + if [ `cmdline_parameter copy2ram` ]; then copy2ram="1"; fi + if [ `cmdline_parameter nfs` ]; then NFS="`cmdline_value nfs`"; else NFS="$NET_HOST_IP:/home/palmlinux/nfs"; fi + if [ `cmdline_parameter www` ]; then WWW="`cmdline_value www`"; else WWW="http://$NET_HOST_IP$LINUX2RAM"; fi + if [ `cmdline_parameter lcdbl` ]; then LCDBL="`cmdline_value lcdbl`"; fi + if [ `cmdline_parameter fsck` ]; then fsckon="1"; fi + if [ `cmdline_parameter ss` ]; then liveskip="1"; fi + fi +} + +## check parameters from text file 'cmdline' in source dir for modules/real root +do_cmdline_check_mmc() { + if [ -e $CMD_MMC ]; then + if [ `cmdline_parameter nokbd $CMD_MMC` ]; then usekbd="0"; fi + if [ `cmdline_parameter debug $CMD_MMC` ]; then DEBUGCMD="debug"; fi + if [ `cmdline_parameter mmcrw $CMD_MMC` ]; then rmode="rw"; fi + if [ `cmdline_parameter copy2ram $CMD_MMC` ]; then copy2ram="1"; fi + if [ `cmdline_parameter lcdbl $CMD_MMC` ]; then LCDBL="`cmdline_value lcdbl $CMD_MMC`"; do_lcdbl_set; fi + if [ `cmdline_parameter skipsaves $CMD_MMC` ]; then liveskip="1"; fi + fi +} + +## import BFUSettings via BFULinuxHelper, and set value from it +do_bfu_check() { + ewarn "Importing BFUSettings..." + ### replace showbfu, if run again + if [ "$showbfu" = "" ]; then if [ "`BFULinuxHelper | grep "BFUSilentBoot=1"`" = "" ]; then showbfu="1"; fi; fi + if [ "$showbfu" = "1" ]; then einfo "Show BFUSettings... "; fi + for bfu in `BFULinuxHelper` ; do + if [ "$showbfu" = "1" ]; then efetchall "$bfu" 5; fi + export $bfu + done + + ## BFUSilentBoot + ## for BFUSilentBoot=1 MUST be set SILENT ! + if [ "$BFUSilentBoot" = "1" ]; then + echo "0" > /proc/sys/kernel/printk + SILENT="1>/dev/null" + SILENT0=">/dev/null" + SILENT2="2>/dev/null" + # <dev/stdout >/dev/null <dev/console >/dev/null + fi + if [ "$BFUAddress" != "" ]; then LINUX2RAM="$BFUAddress"; fi + if [ "$BFUUseNet" = "0" ]; then usenet="0"; fi + if [ "$BFUKeyboard" = "0" ]; then usekbd="0"; fi + if [ "$BFUDebug" = "1" ]; then DEBUGCMD="debug"; fi + if [ "$BFUCardRO" = "0" ]; then rmode="rw"; else rmode="ro"; fi + if [ "$BFUCPUspeed" = "0" ]; then CPUFREQ="auto"; fi + if [ "$BFUCPUspeed" = "1" ]; then CPUFREQ="133"; fi + if [ "$BFUCPUspeed" = "2" ]; then CPUFREQ="266"; fi + if [ "$BFUCPUspeed" = "3" ]; then CPUFREQ="399"; fi + if [ "$BFUCopy2RAM" = "1" ]; then copy2ram="1"; fi + if [ "$BFUFSCK" = "1" ]; then fsckon="1"; fi + if [ "$BFULive" = "0" ]; then liveskip="1"; fi +} + +## run shell for debuging init, test problebs etc.. need stowaway/dicota keyboard +debug() { + ewarn ": Debugging started [CTRL+C for END]" + sh < /dev/console + echo +} + +## workaround for compare md5 +md5_of() { + + echo "`/mnt/live/bin/md5sum < $1`" +} + +## workaround for compare md5 +cat_of() { + + echo "`/mnt/live/bin/cat $1` -" +} + +######## FROM SLAX(LIVE-SCRIPTS) +egrep_o() { +# egrep_o is a replacement for "egrep -o". It prints only the last +# matching text. $1 = regular expression + cat | egrep "$1" | sed -r "s/.*($1).*/\\1/" +} + +cmdline_parameter() { +# look into cmdline and echo $1 back if $1 is set +# $1 = value name, case sensitive, for example livecd_subdir +# $2 = file to use instead /proc/cmdline, optional + CMDLINE=/proc/cmdline + if [ "$2" != "" ]; then CMDLINE="$2"; fi + cat "$CMDLINE" | egrep_o "(^|[[:space:]]+)$1(\$|=|[[:space:]]+)" | egrep_o "$1" +} + +cmdline_value() { +# look into cmdline and echo value of $1 option +# $1 = value name, case sensitive, for example livecd_subdir +# $2 = file to use instead /proc/cmdline, optional + CMDLINE=/proc/cmdline + if [ "$2" != "" ]; then CMDLINE="$2"; fi + cat "$CMDLINE" | egrep_o "(^|[[:space:]]+)$1=([^[:space:]]+)" | egrep_o "=.*" | cut -b 2- | tail -n 1 +} + +message_skipped() { +# use: $1 - text, $2 - timeout, $3 - text for 'center' + + i=$2; echo -ne "$1" "[${C_YEL} center=$3 ${C_WHIT}] ${C_RED}"$i"s${C_OFF}" + while [ $i -gt 0 ]; do + i=$(($i-1)) + read -t 1 -s -n 1 CHAR + if [ $? = 0 -a "$CHAR" = "" ]; then echo; return 1; fi + echo -e -n "${C_RED}"$i"s${C_OFF}" + done + echo + return 0 +} + +######### AUTOFLASH start +do_flash_start() { + mount -t proc none /proc 2>/dev/null + mount -t sysfs sysfs /sys 2>/dev/null + do_mtdutils_check + do_init_mtd + do_setup_mtd1 + do_flash_prepare + do_setup_mtd0 + do_flash_prepare + ewarn "${C_REDY}YOU SURE START WRITE INTO FLASH ???\n\t${C_YEL}('Address(c)', 'Center' for YES)" + read key + if [ "$key" = "c" ]; then + do_setup_mtd1 + do_flash_write + do_setup_mtd0 + do_flash_write + ewarn "Flashing is ended ${C_GRE}OK${C_OFF}" + fi + unset key + do_continue_boot +} + +do_flash_restore() { + efetchall "restore from backup..." + mount -t proc none /proc 2>/dev/null + mount -t sysfs sysfs /sys 2>/dev/null + do_mtdutils_check + do_init_mtd + do_setup_mtd1_restore + do_flash_prepare + do_setup_mtd0_restore + do_flash_prepare + ewarn "${C_REDY}YOU SURE START WRITE INTO FLASH ???\n\t${C_YEL}('Address(c)', 'Center' for YES)${C_OFF}" + read key + if [ "$key" = "c" ]; then + do_setup_mtd1_restore + do_flash_write + do_setup_mtd0_restore + do_flash_write + ewarn "Flashing is ended ${C_GRE}OK${C_OFF}" + fi + unset key + do_continue_boot +} + +do_init_mtd() { + efetchall "probing modules for flash memory" + $PREFIX/sbin/modprobe -s -q palmt3-flash + do_die_msg "modprobe palmt3-flash failed" + $PREFIX/sbin/modprobe -s -q mtdchar + if [ ! -e /dev/mtd0 ]; then mknod /dev/mtd0 c 90 0; fi + if [ ! -e /dev/mtd1 ]; then mknod /dev/mtd1 c 90 2; fi + do_die_msg "modprobe mtdchar failed" + efetchall "check flash partition..." + do_compare "$MTD_PROC_MD5" "`md5_of /proc/mtd`" "MD5: " +} + +do_uninit_mtd() { + efetchall "remove modules for flash memory" + $PREFIX/sbin/modprobe -r -q mtdchar 2>/dev/null + $PREFIX/sbin/modprobe -r -q palmt3-flash 2>/dev/null + $PREFIX/sbin/modprobe -r -q cfi_cmdset_0001 2>/dev/null + $PREFIX/sbin/modprobe -r -q cfi_probe 2>/dev/null +# rm /dev/mtd0 +# rm /dev/mtd1 +} + +do_flash_prepare() { + if [ "$MTD_NEW" != "skip" ]; then + efetchall "prepare for: ${C_YEL}$MTD_NEW${C_OFF} ..." + +## temporary(?) disabled - because MTD_DEV_MD5_AFTER is fixed, and MD5 for 0.1 and 0.2 is present in do_mtdX_setup +# if [ ! -e "$BIN2FLASH/$MTD_NEW.md5" ]; then +# efetch "${C_REDY}NOT FOUND: $MTD_NEW.md5" +# efetch "${C_YEL}create it, ONLY with MD5 number." +# efetch "${C_YEL}because flashing is DANGEROUS..." +# efetch "${C_YEL}without this is ${C_REDW}STOPED${C_OFF}" +# $PREFIX/bin/sleep 10 +# do_mmc_reini +# do_flash_restart +# fi + + ## don't create backup if restore ;) + if [ "$backup" != "NO" ]; then do_flash_backup; fi + + efetchall "copy ${C_YEL}$MTD_NEW${C_OFF} to ${C_YEL}ramdisk${C_OFF}..." + if [ -e $PREFIX/memory/$MTD_NEW ]; then $PREFIX/bin/rm $PREFIX/memory/$MTD_NEW; fi + $PREFIX/bin/cp $BIN2FLASH/$MTD_NEW $PREFIX/memory + do_compare "`md5_of $BIN2FLASH/$MTD_NEW`" "`md5_of /mnt/live/memory/$MTD_NEW`" "MD5: " + fi +} + +do_flash_backup() { + if [ ! -e $BIN2FLASH/$MTD_BAK ]; then + efetchall "backup ${C_YEL}$MTD_DEV${C_OFF} to ${C_YEL}$MTD_BAK${C_OFF}" + dd if=$MTD_DEV of=$BIN2FLASH/$MTD_BAK 2>/dev/nul + do_compare "`md5_of $MTD_DEV`" "`md5_of $BIN2FLASH/$MTD_BAK`" "MD5: " + efetchall "create ${C_YEL}$MTD_BAK.md5${C_OFF}..." + echo "`md5_of $MTD_DEV`" >$BIN2FLASH/$MTD_BAK.md5 + ## FIXME change $PREFIX/bin/cat to cat_of AFTER fix " -" + do_compare "`md5_of $MTD_DEV`" "`$PREFIX/bin/cat $BIN2FLASH/$MTD_BAK.md5`" "MD5: " + else + efetchall "backup of ${C_YEL}$MTD_DEV${C_WHIT} found, check it${C_OFF}" + do_compare "`$PREFIX/bin/cat $BIN2FLASH/$MTD_BAK.md5`" "`md5_of $BIN2FLASH/$MTD_BAK`" "MD5: " ## FIXME change $PREFIX/bin/cat to cat_of AFTER fix " -" + if [ "`md5_of $BIN2FLASH/$MTD_BAK`" = "`md5_of $MTD_DEV`" ]; then + efetchall "... is same as ${C_YEL}$MTD_DEV" + else + efetchall "${C_YEL}... already flashed. Switch to 'restore'..." + if message_skipped "\t..." 9 "NoSwitch"; then do_flash_restore; fi + fi + fi +} + +do_flash_write() { + if [ "$MTD_NEW" != "skip" ]; then + efetchall "prepare ${C_YEL}$MTD_DEV${C_OFF}..." + $PREFIX/sbin/flash_eraseall $MTD_DEV + efetchall "${C_RED}writing${C_OFF} ${C_YEL}$MTD_NEW${C_OFF} ..." + $PREFIX/bin/dd if=/mnt/live/memory/$MTD_NEW of=$MTD_DEV bs=128k conv=sync + if [ "$MTD_DEV_MD5_AFTER" != "" ]; then + efetchall "check ${C_YEL}$MTD_DEV${C_OFF} result:" + do_compare "$MTD_DEV_MD5_AFTER" "`md5_of $MTD_DEV`" "MD5: " + efetchall "${C_YEL}$MTD_NEW ${C_RED}writen fine ${C_OFF}"; echo + else + efetchall "${C_YEL}RESULT NOT BE CHECKED${C_OFF}" + fi + fi +} + +do_mtdutils_check() { + if [ ! -e $PREFIX/sbin/flash_eraseall ]; then + efetchall "${C_RED}flash _eraseall not found${C_OFF}" + echo + do_flash_restart + fi +} + +do_setup_mtd1() { + MTD_NEW="u-boot.bin" + if [ -e $BIN2FLASH/$MTD_NEW ]; then + MTD_DEV="/dev/mtd1" + MTD_BAK="backup_mtd1.bin" + if [ "`md5_of $BIN2FLASH/$MTD_NEW`" = "45155b0514406643a89c2e8a90fbfa65 -" ]; then + efetchall "found ${C_YEL}u-boot for 0x20000${C_OFF}" + MTD_DEV_MD5_AFTER="d7daf9494db0c5703855fbd37cb8dea5 -" + else + efetchall "${C_YEL}unknown ${C_RED}$MTD_NEW${C_WHIT}, continue at YOUR RISK${C_OFF}" + efetchall "${C_RED}AFTER FLASH, RESULT NOT BE CHECKED${C_OFF}" + MTD_DEV_MD5_AFTER="" + fi + else + MTD_NEW="skip" + fi +} + +do_setup_mtd0() { + MTD_NEW="smallrom.bin" + if [ -e $BIN2FLASH/$MTD_NEW ]; then + MTD_DEV="/dev/mtd0" + MTD_BAK="backup_mtd0.bin" + + if [ "`md5_of $BIN2FLASH/$MTD_NEW`" = "13d5b80e6fa7e130afc026e3a298aa2d -" ]; then + efetchall "found ${C_YEL}updated smallrom image (patch 0.1)${C_OFF}" + MTD_DEV_MD5_AFTER="a6a3ddcf1603b1f5227cac525f01f180 -" + else + if [ "`md5_of $BIN2FLASH/$MTD_NEW`" = "536311dacb78c013bdab518fac8f2ee7 -" ]; then + efetchall "found ${C_YEL}updated smallrom image (patch 0.2)${C_OFF}" + MTD_DEV_MD5_AFTER="e3cb68ee435cb8cdd7291f2ad30d97c6 -" + else + efetchall "${C_YEL}unknown ${C_RED}$MTD_NEW${C_WHIT}, continue at YOUR RISK${C_OFF}" + efetchall "${C_RED}AFTER FLASH, RESULT NOT BE CHECKED${C_OFF}" + MTD_DEV_MD5_AFTER="" + fi + fi + + else + MTD_NEW="skip" + fi +} + +do_setup_mtd1_restore() { + backup="NO" + MTD_NEW="backup_mtd1.bin" + MTD_DEV="/dev/mtd1" + MTD_DEV_MD5_AFTER="`$PREFIX/bin/cat $BIN2FLASH/$MTD_NEW.md5`" ## FIXME change $PREFIX/bin/cat to cat_of AFTER fix " -" +} + +do_setup_mtd0_restore() { + backup="NO" + MTD_NEW="backup_mtd0.bin" + MTD_DEV="/dev/mtd0" + MTD_DEV_MD5_AFTER="`$PREFIX/bin/cat $BIN2FLASH/$MTD_NEW.md5`" ## FIXME change $PREFIX/bin/cat to cat_of AFTER fix " -" +} + +do_bin2flash_check() { + + if [ "$BFUReflash" = "1" ]; then + if [ -e "$BIN2FLASH" ]; then + ewarn "Found bin2flash dir, run autoreflash ?" + if message_skipped "\t..." 9 "SKIP"; then + if [ "`ls $BIN2FLASH|grep backup_mtd`" != "" ]; then + efetchall "found ${C_YEL}backup files${C_WHIT}, use it for RESTORE?" + if ! message_skipped "\t..." 9 "restore"; then do_flash_restore; else do_flash_start;fi + fi + else + efetchall "skiped" + fi + else + ewarn "${C_REDY}/bin2flash not found..${C_OFF}" + sleep 5 + fi + fi +} + +do_compare() { +# use: $1 - from, $2 - to, $3 - text before result + if [ "$1" = "$2" ]; then + efetchall "${C_OFF}$3$1 ${C_GRE}OK${C_OFF}" + else + efetchall "${C_OFF}$3$2 ${C_REDY}BAD${C_OFF}" + do_flash_restart + fi +} + +do_flash_restart() { + echo -e "${C_REDY} PROBLEM FOUND ${C_OFF}" + do_uninit_mtd + efetchall "${C_YEL}'Address(c)', 'Center' for restart${C_OFF}" + efetchall "${C_YEL}'Center' for continue normal boot...${C_OFF}" + read key + if [ "$key" = "c" ]; then + do_bin2flash_check + else + do_continue_boot + fi + unset key +} + +do_continue_boot() { + do_uninit_mtd + ewarn "For continue in normal boot press 'Center'${C_OFF}" + read enter + umount /sys + ## end part of do_chroot + ewarn "Running init..." + exec /usr/sbin/chroot . /sbin/init 5 <dev/console >dev/console 2>&1 + do_die +} +######### AUTOFLASH end Property changes on: linux4palm/BFUGarux/init/live-lib ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-03-09 20:11:48
|
Revision: 898 http://svn.sourceforge.net/hackndev/?rev=898&view=rev Author: keddar Date: 2007-03-09 12:11:00 -0800 (Fri, 09 Mar 2007) Log Message: ----------- l4p: max_loop defined, some changes in text of BFUGarux Modified Paths: -------------- linux4palm/BFUGarux/BFUSettings.Rsrc linux4palm/BFUGarux/garux.h.sh Modified: linux4palm/BFUGarux/BFUSettings.Rsrc =================================================================== --- linux4palm/BFUGarux/BFUSettings.Rsrc 2007-03-09 18:38:08 UTC (rev 897) +++ linux4palm/BFUGarux/BFUSettings.Rsrc 2007-03-09 20:11:00 UTC (rev 898) @@ -36,7 +36,7 @@ BUTTON "OK" ID BFUOKButton AT (5 140 30 15) USABLE RIGHTANCHOR FRAME BUTTON "Save" ID BFUSaveButton AT (41 140 30 15) USABLE RIGHTANCHOR FRAME BUTTON "Cancel" ID BFUCancelButton AT (126 140 30 15) USABLE RIGHTANCHOR FRAME - POPUPTRIGGER "Global" ID BFUPartTrigger AT (56 15 51 15) USABLE LEFTANCHOR + POPUPTRIGGER "Network" ID BFUPartTrigger AT (56 15 51 15) USABLE LEFTANCHOR LIST "Global" "Network" "Modules" "Tools" "Advanced" ID BFUPartList AT (56 15 60 55) NONUSABLE DISABLED POPUPLIST ID BFUPartTrigger BFUPartList LABEL "Set:" ID 8035 AT (9 16) USABLE FONT 1 @@ -89,7 +89,7 @@ FORM ID BFUToolsForm AT (0 0 160 160) FRAME MODAL NOSAVEBEHIND USABLE - HELPID 8605 DEFAULTBTNID BFUOKButton + HELPID 8604 DEFAULTBTNID BFUOKButton BEGIN TITLE "BFUSettings - Tools" BUTTON "OK" ID BFUOKButton AT (5 140 30 15) USABLE RIGHTANCHOR FRAME @@ -135,114 +135,114 @@ // --------------- Resources of type 'tSTR' --------------- STRING ID 8601 "BFUSettings - Global\n" \ "(Bootloader for users)\n\n" \ - "This window is dedicated to set source of modules.\n\n\n" \ - "Set:\n\n" \ - "Switches to other part of settings - global, network, modules and advanced.\n\n\n" \ - "Source:\n\n" \ + "This window is dedicated to set source of real root or modules.\n\n" \ + "Source:\n" \ "Here you can select method.\n" \ "Possible choices:\n" \ "\x09- Modules on card - mount modules located on card\n" \ "\x09- HTTP - get modules from HTTP server and mount them\n" \ - "\x09- NFS - get modules from NFS server\n" \ - "\x09- Card partition - mount card partition as root\n\n\n" \ - "Address or path:\n\n" \ - "Here you should enter address of NFS server, address of modlist.txt file or path to " \ - "directory on card containing modules.\n\n\n" \ - "Device:\n\n" \ - "Here you should specify device which are modules loaded from.\n\n\n" \ - "OK\n\n" \ - "Prepare settings to be sent and leave BFUSettings\n\n\n" \ - "Save\n\n" \ - "Save preferences for next use.\n\n\n" \ + "\x09- NFS - mount NFS share as root\n" \ + "\x09- Card partition - mount card partition as root\n\n" \ + "Address or path:\n" \ + "Here you should enter address of NFS server, path or address of modlist.txt file or path to " \ + "directory on card containing modules.\n\n" \ + "Device:\n" \ + "Here you should specify device which are modules loaded from.\n\n" \ + "OK\n" \ + "Prepare settings to be sent and leave BFUSettings\n\n" \ + "Save\n" \ + "Save preferences for next use.\n\n" \ "To card\n" \ "If disabled, preferences are saved just to RAM database. If enabled it will " \ - "replace previously found preferences on card or save it on first volume\n\n\n" \ + "replace previously found preferences on card or save it on first volume\n\n" \ "Cancel\n" \ - "Exit and no BFUSettings will be used." + "Exit and no BFUSettings will be used.\n\n" \ + "Set:\n" \ + "Switches to other part of settings - network, modules, tools and advanced.\n\n" STRING ID 8602 "BFUSettings - Network\n" \ "(Bootloader for users)\n\n" \ - "This window is dedicated to set network properties.\n\n\n" \ - "Set:\n\n" \ - "Switches to other part of settings - global, network, modules and advanced.\n\n\n" \ - "Use network\n\n" \ - "Enable or disable network set up during boot. It is required for HTTP or NFS way of boot.\n\n\n" \ - "OK\n\n" \ - "Prepare settings to be sent and leave BFUSettings\n\n\n" \ - "Save\n\n" \ - "Save preferences for next use.\n\n\n" \ + "This window is dedicated to set network properties.\n\n" \ + "Use network:\n" \ + "Enable or disable network set up during boot. It is required for HTTP or NFS way of boot.\n\n" \ + "OK\n" \ + "Prepare settings to be sent and leave BFUSettings\n\n" \ + "Save\n" \ + "Save preferences for next use.\n\n" \ "To card\n" \ "If disabled, preferences are saved just to RAM database. If enabled it will " \ - "replace previously found preferences on card or save it on first volume\n\n\n" \ + "replace previously found preferences on card or save it on first volume\n\n" \ "Cancel\n" \ - "Exit and no BFUSettings will be used." + "Exit and no BFUSettings will be used.\n\n" \ + "Set:\n" \ + "Switches to other part of settings - global, modules, tools and advanced.\n\n" STRING ID 8603 "BFUSettings - Modules\n" \ "(Bootloader for users)\n\n" \ - "This window is dedicated to select modules to be loaded.\n\n\n" \ - "Set:\n\n" \ - "Switches to other part " \ - "of settings - global, network, modules and advanced.\n\n\n" \ - "In this table you can select which \n\n" \ - "OK\n\n" \ - "Prepare settings to be sent and leave BFUSettings\n\n\n" \ - "Save\n\n" \ - "Save preferences for next use.\n\n\n" \ + "This window is dedicated to select modules to be loaded.\n\n" \ + "For now, only possible is select your modlist*.txt.\n\n" \ + "NOTE: used only if start from Card, if start from WWW create modlist.txt and put in same dir on WWW as modules.\n\n" \ + "OK\n" \ + "Prepare settings to be sent and leave BFUSettings\n\n" \ + "Save\n" \ + "Save preferences for next use.\n\n" \ "To card\n" \ "If disabled, preferences are saved just to RAM database. If enabled it will " \ - "replace previously found preferences on card or save it on first volume\n\n\n" \ + "replace previously found preferences on card or save it on first volume\n\n" \ "Cancel\n" \ - "Exit and no BFUSettings will be used." + "Exit and no BFUSettings will be used.\n\n" \ + "Set:\n" \ + "Switches to other part of settings - global, network, tools and advanced.\n\n" STRING ID 8604 "BFUSettings - Tools\n" \ "(Bootloader for users)\n\n" \ - "This window is dedicated to enable useful things.\n\n\n" \ - "Set:\n\nSwitches to other part of settings - global, network, modules, tools and " \ - "advanced.\n\n\n" \ - "Silent boot\n\n" \ - "This will produce no output during boot.\n\n\n" \ - "Keyboard\n\n" \ - "This enable running external keyboard handling program. Currently Stowaway (PPK) and compatibile supported.\n\n\n" \ - "SmallROM reflash\n\n" \ - "This will reflash your SmallROM for suspend/resume support. Read more before enabling that...\n\n\n" \ - "Run fsck for card\n\n" \ - "This will run dosfsck on first partition of card. Usefull for checking errors after bad unmount...\n\n\n" \ - "OK\n\n" \ - "Prepare settings to be sent and leave BFUSettings\n\n\n" \ - "Save\n\n" \ - "Save preferences for next use.\n\n\n" \ + "This window is dedicated to enable useful things.\n\n" \ + "Silent boot:\n" \ + "This will produce no output during boot.\n\n" \ + "Keyboard:\n" \ + "This enable running external keyboard handling program. Currently Stowaway (PPK) and compatible supported.\n\n" \ + "SmallROM reflash:\n" \ + "This will reflash your SmallROM for suspend/resume support. Read more before enabling that...\n\n" \ + "Run fsck for card:\n" \ + "This will run dosfsck on first partition of card. Usefull for checking errors after bad unmount...\n\n" \ + "OK\n" \ + "Prepare settings to be sent and leave BFUSettings\n\n" \ + "Save\n" \ + "Save preferences for next use.\n\n" \ "To card\n" \ "If disabled, preferences are saved just to RAM database. If enabled it will " \ - "replace previously found preferences on card or save it on first volume\n\n\n" \ + "replace previously found preferences on card or save it on first volume\n\n" \ "Cancel\n" \ - "Exit and no BFUSettings will be used." + "Exit and no BFUSettings will be used.\n\n" \ + "Set:\n" \ + "Switches to other part of settings - global, network, modules and advanced.\n\n" STRING ID 8605 "BFUSettings - Advanced\n" \ "(Bootloader for users)\n\n" \ - "This window is dedicated to set advanced settings.\n\n\n" \ - "Set:\n\nSwitches to other part of settings - global, network, modules and " \ - "advanced.\n\n\n" \ - "CPU Frequency\n\n" \ - "You can select CPU speed. Less speed means less battery needs.\n\n\n" \ - "RAMdisk size:\n\n" \ - "You can specify here how much RAM will be used for RAMdisk. Bigger " \ - "RAMdisk means less RAM for running applications.\n\n" \ - "SD/MMC read-only\n\n" \ - "With this option you can mount card as read only (if it is mounted).\n\n\n" \ - "Copy modules to RAM\n\n" \ - "This will mount modules directly from card without copying first to RAM.\n\n\n" \ - "Debug\n\n" \ - "This option will produce debug informations of BFUSettings script part." \ - " Usefull for developers.\n\n" \ - "OK\n\n" \ - "Prepare settings to be sent and leave BFUSettings\n\n\n" \ - "Save\n\n" \ - "Save preferences for next use.\n\n\n" \ + "This window is dedicated to set advanced settings.\n\n" \ + "CPU Frequency:\n" \ + "You can select CPU speed. Less speed means less battery needs.\n\n" \ + "NOTE: some SD card only work with CPU speed 133. Test it if you see many squashfs errors...\n\n" \ + "RAMdisk size:\n" \ + "You can specify MAXIMUM size of RAM will be used for RAMdisk.\n\n" \ + "SD/MMC read-only:\n" \ + "With this option you can mount card as read only (if it is mounted).\n\n" \ + "Copy modules to RAM:\n" \ + "This will copy modules first to RAM, and mount from memory.\n\n" \ + "NOTE: Don't forget set RAMdisk size MINIMAL as total size of all your used modules.\n\n" \ + "Debug:\n" \ + "This option will switch to shell in some important part of initscript.\n" \ + "Usefull for developers.\n" \ + "NOTE: need Stowaway compatible keyboard.\n\n" \ + "OK\n" \ + "Prepare settings to be sent and leave BFUSettings\n\n" \ + "Save\n" \ + "Save preferences for next use.\n\n" \ "To card\n" \ "If disabled, preferences are saved just to RAM database. If enabled it will " \ - "replace previously found preferences on card or save it on first volume\n\n\n" \ + "replace previously found preferences on card or save it on first volume\n\n" \ "Cancel\n" \ - "Exit and no BFUSettings will be used." - - + "Exit and no BFUSettings will be used.\n\n" \ + "Set:\n" \ + "Switches to other part of settings - global, network, modules and tools.\n\n" Modified: linux4palm/BFUGarux/garux.h.sh =================================================================== --- linux4palm/BFUGarux/garux.h.sh 2007-03-09 18:38:08 UTC (rev 897) +++ linux4palm/BFUGarux/garux.h.sh 2007-03-09 20:11:00 UTC (rev 898) @@ -43,7 +43,7 @@ INITRD_BASE_ADDRESS=`echo $RAM_BASE_ADDRESS | cut -f2 -dx` INITRD_BASE_ADDRESS=`echo "obase=16; ibase=16; $INITRD_BASE_ADDRESS + 0400000"|bc` echo -n $INITRD_BASE_ADDRESS >> garux.h #rcp -echo -n ",$NUM_INITRD root=/dev/ram0 init=/linuxrc\"" >> garux.h #rcp +echo -n ",$NUM_INITRD root=/dev/ram0 init=/linuxrc max_loop=255\"" >> garux.h #rcp NUM_IMAGE=`echo $NUM_IMAGE/1024 |bc` echo "Num page " $NUM_PAGES echo "Size image " $NUM_IMAGE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2007-03-09 18:38:12
|
Revision: 897 http://svn.sourceforge.net/hackndev/?rev=897&view=rev Author: sleep_walker Date: 2007-03-09 10:38:08 -0800 (Fri, 09 Mar 2007) Log Message: ----------- l4p: T|T3 GPIOED remove - duplicity with drivers/misc Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig Removed Paths: ------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/gpioed-ng.c linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/gpioed.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig 2007-03-09 16:53:42 UTC (rev 896) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig 2007-03-09 18:38:08 UTC (rev 897) @@ -16,20 +16,6 @@ help Adds battery driver support -config PALM_T3_GPIOED - tristate "GPIOED" - depends on MACH_T3XSCALE - default n - help - Gpioed: only for debuging and testing! - -config PALM_T3_GPIOEDNG - tristate "GPIOEDNG" - depends on MACH_T3XSCALE - default n - help - Gpioed-ng: only for debuging and testing! - config PALM_T3_FBKEYBOARD bool "On-screen keyboard (BROKEN)" depends on PALM_T3_TSC2101 Deleted: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/gpioed-ng.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/gpioed-ng.c 2007-03-09 16:53:42 UTC (rev 896) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/gpioed-ng.c 2007-03-09 18:38:08 UTC (rev 897) @@ -1,175 +0,0 @@ -#include <linux/module.h> -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/proc_fs.h> - -#include <linux/interrupt.h> -#include <asm/irq.h> -#include <asm/mach/arch.h> -#include <asm/mach/map.h> -#include <asm/mach-types.h> -#include <asm/hardware.h> -#include <linux/sched.h> -#include <linux/workqueue.h> -#include <asm/arch/pxa-regs.h> -#include <asm/arch/irqs.h> -#include <asm/uaccess.h> - -#include <linux/debugfs.h> -#include <linux/seq_file.h> - -#define PROCFS_NAME "gpio" -#define DEBUGFS_NAME "gpio" - -static struct proc_dir_entry *proc_intf; -static struct dentry *debugfs_intf; - -#define PROCFS_MAX_SIZE 20 - -static char procfs_buffer[PROCFS_MAX_SIZE]; -static unsigned long procfs_buffer_size = 0; - -#define GPIO_TEST(reg, gp) (reg(gp) & GPIO_bit(gp)) -static int dfs_show(struct seq_file *s, void *_) -{ - int i,afn; - seq_printf(s, "GPIO lines status:\n"); - - for(i=0;i<121;i++) { - afn = (GAFR(i) & (0x3 << (((i) & 0xf)*2))) >> (((i) & 0xf)*2); - seq_printf(s, "%s%d: %s %s %s %s %lx\n", - i<10?"0":"", - i, - GPIO_TEST(GPLR, i)?"*":" ", - GPIO_TEST(GPDR, i)?"->":"<-", - GPIO_TEST(GRER, i)?"_/":" ", - GPIO_TEST(GFER, i)?"\\_":" ", - afn); - - } - - return 0; -} - -static int dfs_open(struct inode *inode, struct file *file) -{ - return single_open(file, dfs_show, inode->u.generic_ip); -} - -static struct file_operations debug_fops = { - .open = dfs_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; - -static void gpio_set(int id, int on) -{ - do { - if (on) - GPSR(id) = GPIO_bit(id); - else - GPCR(id) = GPIO_bit(id); - } while (0); -} - -void set_afn(int gpio, int fn) -{ - int gafr; - gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2)); - GAFR(gpio) = gafr | (fn << (((gpio) & 0xf)*2)); -} - -void handle_request() -{ - char *p = NULL; - unsigned long id = simple_strtoul(procfs_buffer+2, &p, 10); - switch(procfs_buffer[0]) { - case 'L': - gpio_set(id, 1); - printk(KERN_ERR "GPIOed: GPIO %lu set high\n", id); - break; - case 'l': - gpio_set(id, 0); - printk(KERN_ERR "GPIOed: GPIO %lu set low\n", id); - break; - case 'd': - GPDR(id) &= ~(GPIO_bit(id)); - break; - case 'D': - GPDR(id) |= GPIO_bit(id); - break; - case '0': - set_afn(id, 0); - break; - case '1': - set_afn(id, 1); - break; - case '2': - set_afn(id, 2); - break; - default: - printk(KERN_ERR "GPIOed: Unknown request\n"); - break; - } -} - - -int procfile_write(struct file *file, const char *buffer, unsigned long count, void *data) -{ - procfs_buffer_size = count; - if (procfs_buffer_size > PROCFS_MAX_SIZE ) { - procfs_buffer_size = PROCFS_MAX_SIZE; - } - - /* write data to the buffer */ - if ( copy_from_user(procfs_buffer, buffer, procfs_buffer_size) ) { - return -EFAULT; - } - - handle_request(); - - return procfs_buffer_size; -} - - -static int __init gpioed_init(void) -{ - proc_intf = create_proc_entry(PROCFS_NAME, 0644, NULL); - if (proc_intf == NULL) { - remove_proc_entry(PROCFS_NAME, &proc_root); - printk(KERN_ALERT "Error: Could not initialize /proc/%s\n", PROCFS_NAME); - return -ENOMEM; - } - - /*proc_intf->read_proc = procfile_read;*/ - proc_intf->write_proc = procfile_write; - proc_intf->owner = THIS_MODULE; - proc_intf->mode = S_IFREG | S_IRUGO; - proc_intf->uid = 0; - proc_intf->gid = 0; - proc_intf->size = 37; - - debugfs_intf = debugfs_create_file(DEBUGFS_NAME, S_IRUGO, NULL, NULL, &debug_fops); - - printk(KERN_INFO "/proc/%s created\n", PROCFS_NAME); - - return 0; -} - -static void __exit gpioed_exit(void) -{ - debugfs_remove(debugfs_intf); - remove_proc_entry(PROCFS_NAME, &proc_root); - printk(KERN_INFO "/proc/%s removed\n", PROCFS_NAME); -} - - -/*** Some more stuff ***/ -module_init(gpioed_init); -module_exit(gpioed_exit); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Vladimir \"Farcaller\" Pouzanov <far...@gm...>"); -MODULE_DESCRIPTION("GPIO editor for PXA26x, second edition"); - Deleted: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/gpioed.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/gpioed.c 2007-03-09 16:53:42 UTC (rev 896) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/gpioed.c 2007-03-09 18:38:08 UTC (rev 897) @@ -1,227 +0,0 @@ -/*** Basic includes ***/ -#include <linux/module.h> -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/proc_fs.h> -#include <linux/irq.h> - -#include <linux/interrupt.h> -#include <asm/irq.h> -#include <asm/mach/arch.h> -#include <asm/mach/map.h> -#include <asm/mach-types.h> -#include <asm/hardware.h> -#include <linux/sched.h> -#include <linux/workqueue.h> -#include <asm/arch/pxa-regs.h> -#include <asm/arch/irqs.h> -#include <asm/uaccess.h> - -/*** GPIO macros ***/ -#define GET_PALMT3_GPIO(gpio) \ - (GPLR(GPIO_NR_PALMT3_ ## gpio) & GPIO_bit(GPIO_NR_PALMT3_ ## gpio)) - -#define SET_PALMT3_GPIO(gpio, setp) \ - do { \ - if (setp) \ - GPSR(GPIO_NR_PALMT3_ ## gpio) = GPIO_bit(GPIO_NR_PALMT3_ ## gpio); \ - else \ - GPCR(GPIO_NR_PALMT3_ ## gpio) = GPIO_bit(GPIO_NR_PALMT3_ ## gpio); \ - } while (0) - -#define SET_PALMT3_GPIO_N(gpio, setp) \ - do { \ - if (setp) \ - GPCR(GPIO_NR_PALMT3_ ## gpio) = GPIO_bit(GPIO_NR_PALMT3_ ## gpio); \ - else \ - GPSR(GPIO_NR_PALMT3_ ## gpio) = GPIO_bit(GPIO_NR_PALMT3_ ## gpio); \ - } while (0) - -#define GET_GPIO_REG(reg,gpio) (GP##reg(gpio) & GPIO_bit(gpio)) -#define GET_GPIO(gpio) GET_GPIO_REG(LR, gpio) - -/*** /proc interface ***/ -static struct proc_dir_entry *proc_intf; -#define procfs_name "gpioed" -#define PROCFS_MAX_SIZE 20 - -static char procfs_buffer[PROCFS_MAX_SIZE]; -static unsigned long procfs_buffer_size = 0; - -int procfile_read(char *buffer, char **buffer_location, off_t offset, int buffer_length, int *eof, void *data) -{ - int ret; - - if (offset > 0) { - /* we have finished to read, return 0 */ - ret = 0; - } else { - /* fill the buffer, return the buffer size */ - ret = sprintf(buffer, "HelloWorld!\n"); - } - return ret; -} - -void handle_request(void); - -int procfile_write(struct file *file, const char *buffer, unsigned long count, void *data) -{ - procfs_buffer_size = count; - if (procfs_buffer_size > PROCFS_MAX_SIZE ) { - procfs_buffer_size = PROCFS_MAX_SIZE; - } - - /* write data to the buffer */ - if ( copy_from_user(procfs_buffer, buffer, procfs_buffer_size) ) { - return -EFAULT; - } - - handle_request(); - - return procfs_buffer_size; -} - -/*** IRQ (GPIO) handling ***/ -static struct workqueue_struct *my_workqueue; -#define MY_WORK_QUEUE_NAME "GPIOed" - -static void handle_gpio(void* irq) -{ - int gpn = (int)irq; - printk(KERN_ERR "*** GPIO *** %d *** is *** %s ***\n", gpn, GET_GPIO(gpn) ? "high" : "low "); -} - -irqreturn_t gpio_irq(int irq, void *dev_id, struct pt_regs *regs) -{ - static int initialised = 0; - static struct work_struct task; - - if (initialised == 0) { - INIT_WORK(&task, handle_gpio); - initialised = 1; - } else { - PREPARE_WORK(&task, handle_gpio); - } - - queue_work(my_workqueue, &task); - - return IRQ_HANDLED; -} - -/*** GPIO R/W ***/ -static int gpio_get(int id) -{ - return GET_GPIO(id); -} - -static void gpio_set(int id, int on) -{ - do { - if (on) - GPSR(id) = GPIO_bit(id); - else - GPCR(id) = GPIO_bit(id); - } while (0); -} - -static int gpio_watch(int x) -{ - int ret; - ret = request_irq (IRQ_GPIO(x), gpio_irq, SA_SAMPLE_RANDOM, "test_handler", (void*)x); - set_irq_type (IRQ_GPIO(x), IRQT_BOTHEDGE); - if(ret!=0) { - printk(KERN_ERR "GPIOed: failed to register for GPIO %d\n", x); - return 1; - } else { - printk(KERN_ERR "GPIOed: Registered GPIO %d\n", x); - return 0; - } -} - -/*** Request handler ***/ -void handle_request() -{ - char *p = NULL; - unsigned long base = 10; - unsigned long id; - - if((procfs_buffer[0] == 'P') || (procfs_buffer[0] == 'V')) - base = 16; - id = simple_strtoul(procfs_buffer+2, &p, base); - switch(procfs_buffer[0]) { - case 'r': - printk(KERN_ERR "GPIOed: GPIO %lu is %s\n", id, gpio_get(id)?"high":"low "); - break; - case 's': - gpio_watch(id); - break; - case 'h': - gpio_set(id, 1); - printk(KERN_ERR "GPIOed: GPIO %lu set high\n", id); - break; - case 'l': - gpio_set(id, 0); - printk(KERN_ERR "GPIOed: GPIO %lu set low\n", id); - break; - case 'd': - printk(KERN_ERR "GPIOed: GPIO %lu is %s\n", id, GET_GPIO_REG(DR,id)?"output":"input"); - break; - - case 'P': - printk(KERN_ERR "GPIOed: P-V for 0x%x is 0x%x\n", id, (unsigned int)phys_to_virt(id)); - break; - case 'V': - printk(KERN_ERR "GPIOed: V-P for 0x%x is 0x%x\n", id, (unsigned int)virt_to_phys(id)); - break; - case 'D': - base = *((unsigned int*)id); - printk(KERN_ERR "GPIOed: 0x%x = 0x%x\n", id, base); - break; - default: - printk(KERN_ERR "GPIOed: Unknown request\n"); - break; - } -} - -/*** init&exit ***/ -static int __init gpioed_init(void) -{ - my_workqueue = create_workqueue(MY_WORK_QUEUE_NAME); - - proc_intf = create_proc_entry(procfs_name, 0644, NULL); - if (proc_intf == NULL) { - remove_proc_entry(procfs_name, &proc_root); - printk(KERN_ALERT "Error: Could not initialize /proc/%s\n", - procfs_name); - return -ENOMEM; - } - - proc_intf->read_proc = procfile_read; - proc_intf->write_proc = procfile_write; - proc_intf->owner = THIS_MODULE; - proc_intf->mode = S_IFREG | S_IRUGO; - proc_intf->uid = 0; - proc_intf->gid = 0; - proc_intf->size = 37; - - printk(KERN_INFO "/proc/%s created\n", procfs_name); - - return 0; -} - -static void __exit gpioed_exit(void) -{ - destroy_workqueue(my_workqueue); - remove_proc_entry(procfs_name, &proc_root); - printk(KERN_INFO "/proc/%s removed\n", procfs_name); -} - - -/*** Some more stuff ***/ -module_init(gpioed_init); -module_exit(gpioed_exit); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Vladimir \"Farcaller\" Pouzanov <far...@gm...>"); -MODULE_DESCRIPTION("GPIO editor for PXA26x"); - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2007-03-05 03:32:00
|
Revision: 895 http://svn.sourceforge.net/hackndev/?rev=895&view=rev Author: sleep_walker Date: 2007-03-04 19:31:57 -0800 (Sun, 04 Mar 2007) Log Message: ----------- OE: 2.6.20 can now be built for T|T3, removing SRCDATE Modified Paths: -------------- OE/com.hackndev/conf/machine/palmtt3.conf Modified: OE/com.hackndev/conf/machine/palmtt3.conf =================================================================== --- OE/com.hackndev/conf/machine/palmtt3.conf 2007-03-05 02:06:35 UTC (rev 894) +++ OE/com.hackndev/conf/machine/palmtt3.conf 2007-03-05 03:31:57 UTC (rev 895) @@ -8,7 +8,7 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-hackndev-2.6" PREFERRED_PROVIDER_linux = "linux-hackndev-2.6" PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive" -SRCDATE_linux-hackndev-2.6 = "20070217" +#SRCDATE_linux-hackndev-2.6 = "20070217" MACHINE_FEATURES = "kernel26 touchscreen apm alsa irda bluetooth ext2 usbgadget screen" @@ -25,7 +25,7 @@ IMAGE_FSTYPES = "squashfs squashfs-lzma tar ext2" -EXTRA_IMAGECMD_jffs2 = "--pad --little-endian --squash --eraseblock=0x10000 -n" +#EXTRA_IMAGECMD_jffs2 = "--pad --little-endian --squash --eraseblock=0x10000 -n" # squashfs-lzma image type (could be in bitbake.conf like the others) IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2007-03-05 02:06:39
|
Revision: 894 http://svn.sourceforge.net/hackndev/?rev=894&view=rev Author: sleep_walker Date: 2007-03-04 18:06:35 -0800 (Sun, 04 Mar 2007) Log Message: ----------- l4p: palmt3_buttons.c cleaning and warning removal Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_buttons.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_buttons.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_buttons.c 2007-03-03 21:05:09 UTC (rev 893) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_buttons.c 2007-03-05 02:06:35 UTC (rev 894) @@ -84,7 +84,7 @@ u16 key_status; u8 slider; -static irqreturn_t palmt3_btn_handle(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t palmt3_btn_handle(int irq, void *dev_id) { if((int) dev_id == 3) slider = 1; @@ -93,7 +93,7 @@ return IRQ_HANDLED; } -static void palmt3_irq_queuework(void *data) +static void palmt3_irq_queuework(struct work_struct *data) { unsigned long flags; int row, gpio, i; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-03-03 21:05:11
|
Revision: 893 http://svn.sourceforge.net/hackndev/?rev=893&view=rev Author: keddar Date: 2007-03-03 13:05:09 -0800 (Sat, 03 Mar 2007) Log Message: ----------- TT3: copy from git Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c 2007-03-03 20:52:11 UTC (rev 892) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c 2007-03-03 21:05:09 UTC (rev 893) @@ -70,7 +70,8 @@ put_device(tscdev); put_driver(tscdrv); - battery_update_charge_link(bat); + // TODO: does this screw up sysfs so bad? + // battery_update_charge_link(bat); /* Vbat = B/{2^N} * 5 * VREF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-03-03 20:52:13
|
Revision: 892 http://svn.sourceforge.net/hackndev/?rev=892&view=rev Author: marex_z71 Date: 2007-03-03 12:52:11 -0800 (Sat, 03 Mar 2007) Log Message: ----------- PalmLD: update defconfig Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/configs/palmld_defconfig Modified: linux4palm/linux/trunk/arch/arm/configs/palmld_defconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/configs/palmld_defconfig 2007-03-01 08:30:28 UTC (rev 891) +++ linux4palm/linux/trunk/arch/arm/configs/palmld_defconfig 2007-03-03 20:52:11 UTC (rev 892) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.20-hnd0 -# Sun Feb 18 18:46:45 2007 +# Tue Feb 27 17:46:56 2007 # CONFIG_ARM=y # CONFIG_GENERIC_TIME is not set @@ -165,13 +165,13 @@ CONFIG_PALMLD_PCMCIA=m # CONFIG_PALMLD_USB is not set CONFIG_PALMLD_IDE=m -# CONFIG_GPIOED is not set -# CONFIG_GPIOEDNG is not set # CONFIG_MACH_XSCALE_PALMTREO650 is not set # CONFIG_MACH_XSCALE_TREO680 is not set # CONFIG_MACH_T700WX is not set # CONFIG_MACH_TUNGE2 is not set # CONFIG_MACH_T3XSCALE is not set +CONFIG_GPIOED=m +CONFIG_GPIOEDNG=m # CONFIG_MACH_XSCALE_PALMTT5 is not set # CONFIG_MACH_XSCALE_PALMTX is not set # CONFIG_MACH_PALMZ72 is not set @@ -467,9 +467,87 @@ # # Memory Technology Devices (MTD) # -# CONFIG_MTD is not set +CONFIG_MTD=m +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set +# CONFIG_MTD_PARTITIONS is not set # +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=m +# CONFIG_MTD_BLKDEVS is not set +# CONFIG_MTD_BLOCK is not set +# CONFIG_MTD_BLOCK_RO is not set +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=m +CONFIG_MTD_JEDECPROBE=m +CONFIG_MTD_GEN_PROBE=m +# CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +CONFIG_MTD_CFI_INTELEXT=m +CONFIG_MTD_CFI_AMDSTD=m +CONFIG_MTD_CFI_STAA=m +CONFIG_MTD_CFI_UTIL=m +CONFIG_MTD_RAM=m +CONFIG_MTD_ROM=m +CONFIG_MTD_ABSENT=m +# CONFIG_MTD_OBSOLETE_CHIPS is not set +# CONFIG_MTD_XIP is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PHYSMAP is not set +# CONFIG_MTD_ARM_INTEGRATOR is not set +# CONFIG_MTD_IMPA7 is not set +# CONFIG_MTD_SHARP_SL is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# +# CONFIG_MTD_NAND is not set + +# +# OneNAND Flash Device Drivers +# +# CONFIG_MTD_ONENAND is not set + +# # Parallel port support # # CONFIG_PARPORT is not set @@ -790,6 +868,7 @@ # Hardware Monitoring - Battery # CONFIG_BATTERY_MONITOR=y +# CONFIG_ADC_BATTERY is not set # # L3 serial bus support @@ -813,7 +892,7 @@ # # Misc devices # -# CONFIG_BATTCHARGE_MONITOR is not set +CONFIG_BATTCHARGE_MONITOR=m # # Multimedia Capabilities Port drivers @@ -840,6 +919,7 @@ CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_TIMER=m CONFIG_LEDS_TRIGGER_IDE_DISK=y +# CONFIG_LEDS_TRIGGER_MMC_CARD is not set CONFIG_LEDS_TRIGGER_HEARTBEAT=m # CONFIG_LEDS_TRIGGER_SHARED is not set @@ -864,7 +944,7 @@ # CONFIG_FB_MACMODES is not set # CONFIG_FB_BACKLIGHT is not set # CONFIG_FB_MODE_HELPERS is not set -# CONFIG_FB_TILEBLITTING is not set +CONFIG_FB_TILEBLITTING=y # CONFIG_FB_IMAGEON is not set # CONFIG_FB_S1D13XXX is not set CONFIG_FB_PXA=y @@ -986,7 +1066,6 @@ # CONFIG_MMC_TIFM_SD is not set # CONFIG_MMC_TMIO is not set # CONFIG_MMC_SAMCOP is not set -# CONFIG_MMC_WBSD_PALMT3 is not set # # Real Time Clock @@ -1056,6 +1135,7 @@ # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set +# CONFIG_JFFS2_FS is not set # CONFIG_CRAMFS is not set # CONFIG_SQUASHFS is not set # CONFIG_VXFS_FS is not set This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <z7...@us...> - 2007-03-01 08:30:33
|
Revision: 891 http://svn.sourceforge.net/hackndev/?rev=891&view=rev Author: z72ka Date: 2007-03-01 00:30:28 -0800 (Thu, 01 Mar 2007) Log Message: ----------- Palmz72: Added support for Voice Memo button via gpio-keys Palmz72: small change with key-mapping pxa-keypad Palmz72: gpio-keys added to defconfig Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/configs/palmz72_defconfig linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c Modified: linux4palm/linux/trunk/arch/arm/configs/palmz72_defconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/configs/palmz72_defconfig 2007-02-28 11:35:22 UTC (rev 890) +++ linux4palm/linux/trunk/arch/arm/configs/palmz72_defconfig 2007-03-01 08:30:28 UTC (rev 891) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.20-hnd0 -# Thu Feb 22 15:30:54 2007 +# Thu Mar 1 09:20:29 2007 # CONFIG_ARM=y # CONFIG_GENERIC_TIME is not set @@ -164,8 +164,6 @@ # CONFIG_ARCH_ROVERP1 is not set # CONFIG_ARCH_ROVERP5P is not set # CONFIG_MACH_XSCALE_PALMLD is not set -# CONFIG_GPIOED is not set -# CONFIG_GPIOEDNG is not set # CONFIG_MACH_XSCALE_PALMTREO650 is not set # CONFIG_MACH_XSCALE_TREO680 is not set # CONFIG_MACH_T700WX is not set @@ -176,6 +174,8 @@ CONFIG_MACH_PALMZ72=y CONFIG_PALMZ72_PM=y CONFIG_PALMZ72_BATTERY=m +# CONFIG_GPIOED is not set +# CONFIG_GPIOEDNG is not set # CONFIG_MACH_OMAP_PALMTC is not set # CONFIG_MACH_ZIRE31 is not set # CONFIG_PXA_SHARPSL is not set @@ -605,7 +605,7 @@ # 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_GPIO_KEYS=y CONFIG_KEYBOARD_PXA27x=y # CONFIG_KEYBOARD_PALMIR is not set CONFIG_KEYBOARD_PALMWK=m @@ -773,6 +773,7 @@ # CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_MMC_CARD=y # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set # CONFIG_LEDS_TRIGGER_SHARED is not set @@ -962,7 +963,6 @@ # CONFIG_MMC_TIFM_SD is not set # CONFIG_MMC_TMIO is not set # CONFIG_MMC_SAMCOP is not set -# CONFIG_MMC_WBSD_PALMT3 is not set # # Real Time Clock Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c 2007-02-28 11:35:22 UTC (rev 890) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmz72/palmz72.c 2007-03-01 08:30:28 UTC (rev 891) @@ -32,6 +32,7 @@ #include <asm/arch/pxapwm-bl.h> #include <asm/arch/irda.h> #include <asm/arch/serial.h> +#include <asm/hardware/gpio_keys.h> @@ -145,7 +146,7 @@ .keycodes = { { /* row 0 */ KEY_POWER, /* Power key */ - KEY_F13, /* Photos */ + KEY_F11, /* Photos */ KEY_ENTER, /* DPAD Center */ }, { /* row 1 */ @@ -185,7 +186,27 @@ }, }; +/******************************** + * GPIO Key - Voice Memo Button * + ********************************/ +static struct gpio_keys_button palmz72_pxa_buttons[] = { + {KEY_F7, GPIO_NR_PALMZ72_KP_DKIN7, 1, "Voice Memo Button" }, +}; + +static struct gpio_keys_platform_data palmz72_pxa_keys_data = { + .buttons = palmz72_pxa_buttons, + .nbuttons = ARRAY_SIZE(palmz72_pxa_buttons), +}; + +static struct platform_device palmz72_pxa_keys = { + .name = "gpio-keys", + .dev = { + .platform_data = &palmz72_pxa_keys_data, + }, +}; + + /******** * IRDA * ********/ @@ -355,6 +376,7 @@ &palmz72_pm, &palmz72_backlight, &palmz72_keypad, + &palmz72_pxa_keys, &palmz72_led_device, }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <z7...@us...> - 2007-02-28 11:36:45
|
Revision: 890 http://svn.sourceforge.net/hackndev/?rev=890&view=rev Author: z72ka Date: 2007-02-28 03:35:22 -0800 (Wed, 28 Feb 2007) Log Message: ----------- Added missing files for unionfs Added Paths: ----------- linux4palm/linux/trunk/fs/unionfs/fanout.h linux4palm/linux/trunk/fs/unionfs/sioq.c linux4palm/linux/trunk/fs/unionfs/sioq.h Added: linux4palm/linux/trunk/fs/unionfs/fanout.h =================================================================== --- linux4palm/linux/trunk/fs/unionfs/fanout.h (rev 0) +++ linux4palm/linux/trunk/fs/unionfs/fanout.h 2007-02-28 11:35:22 UTC (rev 890) @@ -0,0 +1,210 @@ +/* + * Copyright (c) 2003-2007 Erez Zadok + * Copyright (c) 2003-2006 Charles P. Wright + * Copyright (c) 2005-2007 Josef 'Jeff' Sipek + * Copyright (c) 2005 Arun M. Krishnakumar + * Copyright (c) 2004-2006 David P. Quigley + * Copyright (c) 2003-2004 Mohammad Nayyer Zubair + * Copyright (c) 2003 Puja Gupta + * Copyright (c) 2003 Harikesavan Krishnan + * Copyright (c) 2003-2007 Stony Brook University + * Copyright (c) 2003-2007 The Research Foundation of State University of New York + * + * 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 _FANOUT_H_ +#define _FANOUT_H_ + +/* Inode to private data */ +static inline struct unionfs_inode_info *UNIONFS_I(const struct inode *inode) +{ + return container_of(inode, struct unionfs_inode_info, vfs_inode); +} + +#define ibstart(ino) (UNIONFS_I(ino)->bstart) +#define ibend(ino) (UNIONFS_I(ino)->bend) + +/* Superblock to private data */ +#define UNIONFS_SB(super) ((struct unionfs_sb_info *)(super)->s_fs_info) +#define sbstart(sb) 0 +#define sbend(sb) (UNIONFS_SB(sb)->bend) +#define sbmax(sb) (UNIONFS_SB(sb)->bend + 1) + +/* File to private Data */ +#define UNIONFS_F(file) ((struct unionfs_file_info *)((file)->private_data)) +#define fbstart(file) (UNIONFS_F(file)->bstart) +#define fbend(file) (UNIONFS_F(file)->bend) + +/* File to lower file. */ +static inline struct file *unionfs_lower_file(const struct file *f) +{ + return UNIONFS_F(f)->lower_files[fbstart(f)]; +} + +static inline struct file *unionfs_lower_file_idx(const struct file *f, int index) +{ + return UNIONFS_F(f)->lower_files[index]; +} + +static inline void unionfs_set_lower_file_idx(struct file *f, int index, struct file *val) +{ + UNIONFS_F(f)->lower_files[index] = val; +} + +static inline void unionfs_set_lower_file(struct file *f, struct file *val) +{ + UNIONFS_F(f)->lower_files[fbstart(f)] = val; +} + +/* Inode to lower inode. */ +static inline struct inode *unionfs_lower_inode(const struct inode *i) +{ + return UNIONFS_I(i)->lower_inodes[ibstart(i)]; +} + +static inline struct inode *unionfs_lower_inode_idx(const struct inode *i, int index) +{ + return UNIONFS_I(i)->lower_inodes[index]; +} + +static inline void unionfs_set_lower_inode_idx(struct inode *i, int index, + struct inode *val) +{ + UNIONFS_I(i)->lower_inodes[index] = val; +} + +static inline void unionfs_set_lower_inode(struct inode *i, struct inode *val) +{ + UNIONFS_I(i)->lower_inodes[ibstart(i)] = val; +} + +/* Superblock to lower superblock. */ +static inline struct super_block *unionfs_lower_super(const struct super_block *sb) +{ + return UNIONFS_SB(sb)->data[sbstart(sb)].sb; +} + +static inline struct super_block *unionfs_lower_super_idx(const struct super_block *sb, int index) +{ + return UNIONFS_SB(sb)->data[index].sb; +} + +static inline void unionfs_set_lower_super_idx(struct super_block *sb, int index, + struct super_block *val) +{ + UNIONFS_SB(sb)->data[index].sb = val; +} + +static inline void unionfs_set_lower_super(struct super_block *sb, struct super_block *val) +{ + UNIONFS_SB(sb)->data[sbstart(sb)].sb = val; +} + +/* Branch count macros. */ +static inline int branch_count(const struct super_block *sb, int index) +{ + return atomic_read(&UNIONFS_SB(sb)->data[index].sbcount); +} + +static inline void set_branch_count(struct super_block *sb, int index, int val) +{ + atomic_set(&UNIONFS_SB(sb)->data[index].sbcount, val); +} + +static inline void branchget(struct super_block *sb, int index) +{ + atomic_inc(&UNIONFS_SB(sb)->data[index].sbcount); +} + +static inline void branchput(struct super_block *sb, int index) +{ + atomic_dec(&UNIONFS_SB(sb)->data[index].sbcount); +} + +/* Dentry macros */ +static inline struct unionfs_dentry_info *UNIONFS_D(const struct dentry *dent) +{ + return dent->d_fsdata; +} + +static inline int dbstart(const struct dentry *dent) +{ + return UNIONFS_D(dent)->bstart; +} + +static inline void set_dbstart(struct dentry *dent, int val) +{ + UNIONFS_D(dent)->bstart = val; +} + +static inline int dbend(const struct dentry *dent) +{ + return UNIONFS_D(dent)->bend; +} + +static inline void set_dbend(struct dentry *dent, int val) +{ + UNIONFS_D(dent)->bend = val; +} + +static inline int dbopaque(const struct dentry *dent) +{ + return UNIONFS_D(dent)->bopaque; +} + +static inline void set_dbopaque(struct dentry *dent, int val) +{ + UNIONFS_D(dent)->bopaque = val; +} + +static inline void unionfs_set_lower_dentry_idx(struct dentry *dent, int index, + struct dentry *val) +{ + UNIONFS_D(dent)->lower_paths[index].dentry = val; +} + +static inline struct dentry *unionfs_lower_dentry_idx(const struct dentry *dent, int index) +{ + return UNIONFS_D(dent)->lower_paths[index].dentry; +} + +static inline struct dentry *unionfs_lower_dentry(const struct dentry *dent) +{ + return unionfs_lower_dentry_idx(dent, dbstart(dent)); +} + +static inline void unionfs_set_lower_mnt_idx(struct dentry *dent, int index, + struct vfsmount *mnt) +{ + UNIONFS_D(dent)->lower_paths[index].mnt = mnt; +} + +static inline struct vfsmount *unionfs_lower_mnt_idx(const struct dentry *dent, int index) +{ + return UNIONFS_D(dent)->lower_paths[index].mnt; +} + +static inline struct vfsmount *unionfs_lower_mnt(const struct dentry *dent) +{ + return unionfs_lower_mnt_idx(dent,dbstart(dent)); +} + +/* Macros for locking a dentry. */ +static inline void unionfs_lock_dentry(struct dentry *d) +{ + mutex_lock(&UNIONFS_D(d)->lock); +} + +static inline void unionfs_unlock_dentry(struct dentry *d) +{ + mutex_unlock(&UNIONFS_D(d)->lock); +} + +static inline void verify_locked(struct dentry *d) +{ +} + +#endif /* _FANOUT_H */ Added: linux4palm/linux/trunk/fs/unionfs/sioq.c =================================================================== --- linux4palm/linux/trunk/fs/unionfs/sioq.c (rev 0) +++ linux4palm/linux/trunk/fs/unionfs/sioq.c 2007-02-28 11:35:22 UTC (rev 890) @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2003-2007 Erez Zadok + * Copyright (c) 2003-2006 Charles P. Wright + * Copyright (c) 2005-2007 Josef 'Jeff' Sipek + * Copyright (c) 2005-2006 Junjiro Okajima + * Copyright (c) 2005 Arun M. Krishnakumar + * Copyright (c) 2004-2006 David P. Quigley + * Copyright (c) 2003-2004 Mohammad Nayyer Zubair + * Copyright (c) 2003 Puja Gupta + * Copyright (c) 2003 Harikesavan Krishnan + * Copyright (c) 2003-2007 Stony Brook University + * Copyright (c) 2003-2007 The Research Foundation of State University of New York + * + * 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 "union.h" + +/* Super-user IO work Queue - sometimes we need to perform actions which + * would fail due to the unix permissions on the parent directory (e.g., + * rmdir a directory which appears empty, but in reality contains + * whiteouts). + */ + +static struct workqueue_struct *superio_workqueue; + +int __init init_sioq(void) +{ + int err; + + superio_workqueue = create_workqueue("unionfs_siod"); + if (!IS_ERR(superio_workqueue)) + return 0; + + err = PTR_ERR(superio_workqueue); + printk(KERN_ERR "create_workqueue failed %d\n", err); + superio_workqueue = NULL; + return err; +} + +void __exit stop_sioq(void) +{ + if (superio_workqueue) + destroy_workqueue(superio_workqueue); +} + +void run_sioq(work_func_t func, struct sioq_args *args) +{ + INIT_WORK(&args->work, func); + + init_completion(&args->comp); + while (!queue_work(superio_workqueue, &args->work)) { + /* TODO: do accounting if needed */ + schedule(); + } + wait_for_completion(&args->comp); +} + +void __unionfs_create(struct work_struct *work) +{ + struct sioq_args *args = container_of(work, struct sioq_args, work); + struct create_args *c = &args->create; + + args->err = vfs_create(c->parent, c->dentry, c->mode, c->nd); + complete(&args->comp); +} + +void __unionfs_mkdir(struct work_struct *work) +{ + struct sioq_args *args = container_of(work, struct sioq_args, work); + struct mkdir_args *m = &args->mkdir; + + args->err = vfs_mkdir(m->parent, m->dentry, m->mode); + complete(&args->comp); +} + +void __unionfs_mknod(struct work_struct *work) +{ + struct sioq_args *args = container_of(work, struct sioq_args, work); + struct mknod_args *m = &args->mknod; + + args->err = vfs_mknod(m->parent, m->dentry, m->mode, m->dev); + complete(&args->comp); +} + +void __unionfs_symlink(struct work_struct *work) +{ + struct sioq_args *args = container_of(work, struct sioq_args, work); + struct symlink_args *s = &args->symlink; + + args->err = vfs_symlink(s->parent, s->dentry, s->symbuf, s->mode); + complete(&args->comp); +} + +void __unionfs_unlink(struct work_struct *work) +{ + struct sioq_args *args = container_of(work, struct sioq_args, work); + struct unlink_args *u = &args->unlink; + + args->err = vfs_unlink(u->parent, u->dentry); + complete(&args->comp); +} + +void __delete_whiteouts(struct work_struct *work) +{ + struct sioq_args *args = container_of(work, struct sioq_args, work); + struct deletewh_args *d = &args->deletewh; + + args->err = do_delete_whiteouts(d->dentry, d->bindex, d->namelist); + complete(&args->comp); +} + +void __is_opaque_dir(struct work_struct *work) +{ + struct sioq_args *args = container_of(work, struct sioq_args, work); + + args->ret = lookup_one_len(UNIONFS_DIR_OPAQUE, args->is_opaque.dentry, + sizeof(UNIONFS_DIR_OPAQUE) - 1); + complete(&args->comp); +} + Added: linux4palm/linux/trunk/fs/unionfs/sioq.h =================================================================== --- linux4palm/linux/trunk/fs/unionfs/sioq.h (rev 0) +++ linux4palm/linux/trunk/fs/unionfs/sioq.h 2007-02-28 11:35:22 UTC (rev 890) @@ -0,0 +1,78 @@ +#ifndef _SIOQ_H +#define _SIOQ_H + +struct deletewh_args { + struct unionfs_dir_state *namelist; + struct dentry *dentry; + int bindex; +}; + +struct is_opaque_args { + struct dentry *dentry; +}; + +struct create_args { + struct inode *parent; + struct dentry *dentry; + umode_t mode; + struct nameidata *nd; +}; + +struct mkdir_args { + struct inode *parent; + struct dentry *dentry; + umode_t mode; +}; + +struct mknod_args { + struct inode *parent; + struct dentry *dentry; + umode_t mode; + dev_t dev; +}; + +struct symlink_args { + struct inode *parent; + struct dentry *dentry; + char *symbuf; + umode_t mode; +}; + +struct unlink_args { + struct inode *parent; + struct dentry *dentry; +}; + + +struct sioq_args { + struct completion comp; + struct work_struct work; + int err; + void *ret; + + union { + struct deletewh_args deletewh; + struct is_opaque_args is_opaque; + struct create_args create; + struct mkdir_args mkdir; + struct mknod_args mknod; + struct symlink_args symlink; + struct unlink_args unlink; + }; +}; + +extern int __init init_sioq(void); +extern __exit void stop_sioq(void); +extern void run_sioq(work_func_t func, struct sioq_args *args); + +/* Extern definitions for our privlege escalation helpers */ +extern void __unionfs_create(struct work_struct *work); +extern void __unionfs_mkdir(struct work_struct *work); +extern void __unionfs_mknod(struct work_struct *work); +extern void __unionfs_symlink(struct work_struct *work); +extern void __unionfs_unlink(struct work_struct *work); +extern void __delete_whiteouts(struct work_struct *work); +extern void __is_opaque_dir(struct work_struct *work); + +#endif /* _SIOQ_H */ + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <z7...@us...> - 2007-02-28 11:30:25
|
Revision: 889 http://svn.sourceforge.net/hackndev/?rev=889&view=rev Author: z72ka Date: 2007-02-28 03:30:13 -0800 (Wed, 28 Feb 2007) Log Message: ----------- Added missing header for unionfs Added Paths: ----------- linux4palm/linux/trunk/fs/unionfs/union.h Added: linux4palm/linux/trunk/fs/unionfs/union.h =================================================================== --- linux4palm/linux/trunk/fs/unionfs/union.h (rev 0) +++ linux4palm/linux/trunk/fs/unionfs/union.h 2007-02-28 11:30:13 UTC (rev 889) @@ -0,0 +1,439 @@ +/* + * Copyright (c) 2003-2007 Erez Zadok + * Copyright (c) 2003-2006 Charles P. Wright + * Copyright (c) 2005-2007 Josef 'Jeff' Sipek + * Copyright (c) 2005 Arun M. Krishnakumar + * Copyright (c) 2004-2006 David P. Quigley + * Copyright (c) 2003-2004 Mohammad Nayyer Zubair + * Copyright (c) 2003 Puja Gupta + * Copyright (c) 2003 Harikesavan Krishnan + * Copyright (c) 2003-2007 Stony Brook University + * Copyright (c) 2003-2007 The Research Foundation of State University of New York + * + * 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 _UNION_H_ +#define _UNION_H_ + +#include <linux/dcache.h> +#include <linux/file.h> +#include <linux/list.h> +#include <linux/fs.h> +#include <linux/mm.h> +#include <linux/module.h> +#include <linux/mount.h> +#include <linux/namei.h> +#include <linux/page-flags.h> +#include <linux/pagemap.h> +#include <linux/poll.h> +#include <linux/security.h> +#include <linux/seq_file.h> +#include <linux/slab.h> +#include <linux/spinlock.h> +#include <linux/smp_lock.h> +#include <linux/statfs.h> +#include <linux/string.h> +#include <linux/vmalloc.h> +#include <linux/writeback.h> +#include <linux/xattr.h> +#include <linux/fs_stack.h> +#include <linux/magic.h> +#include <linux/log2.h> + +#include <asm/mman.h> +#include <asm/system.h> + +#include <linux/union_fs.h> + +/* the file system name */ +#define UNIONFS_NAME "unionfs" + +/* unionfs root inode number */ +#define UNIONFS_ROOT_INO 1 + +/* Mount time flags */ +#define MOUNT_FLAG(sb) (UNIONFS_SB(sb)->mount_flag) + +/* number of characters while generating unique temporary file names */ +#define UNIONFS_TMPNAM_LEN 12 + +/* number of times we try to get a unique temporary file name */ +#define GET_TMPNAM_MAX_RETRY 5 + +/* Operations vectors defined in specific files. */ +extern struct file_operations unionfs_main_fops; +extern struct file_operations unionfs_dir_fops; +extern struct inode_operations unionfs_main_iops; +extern struct inode_operations unionfs_dir_iops; +extern struct inode_operations unionfs_symlink_iops; +extern struct super_operations unionfs_sops; +extern struct dentry_operations unionfs_dops; + +/* How long should an entry be allowed to persist */ +#define RDCACHE_JIFFIES (5*HZ) + +/* file private data. */ +struct unionfs_file_info { + int bstart; + int bend; + atomic_t generation; + + struct unionfs_dir_state *rdstate; + struct file **lower_files; +}; + +/* unionfs inode data in memory */ +struct unionfs_inode_info { + int bstart; + int bend; + atomic_t generation; + int stale; + /* Stuff for readdir over NFS. */ + spinlock_t rdlock; + struct list_head readdircache; + int rdcount; + int hashsize; + int cookie; + + /* The hidden inodes */ + struct inode **lower_inodes; + /* to keep track of reads/writes for unlinks before closes */ + atomic_t totalopens; + + struct inode vfs_inode; +}; + +/* unionfs dentry data in memory */ +struct unionfs_dentry_info { + /* The semaphore is used to lock the dentry as soon as we get into a + * unionfs function from the VFS. Our lock ordering is that children + * go before their parents. + */ + struct mutex lock; + int bstart; + int bend; + int bopaque; + int bcount; + atomic_t generation; + struct path *lower_paths; +}; + +/* These are the pointers to our various objects. */ +struct unionfs_data { + struct super_block *sb; + struct vfsmount *hidden_mnt; + atomic_t sbcount; + int branchperms; +}; + +/* unionfs super-block data in memory */ +struct unionfs_sb_info { + int bend; + + atomic_t generation; + unsigned long mount_flag; + struct rw_semaphore rwsem; + + struct unionfs_data *data; +}; + +/* + * structure for making the linked list of entries by readdir on left branch + * to compare with entries on right branch + */ +struct filldir_node { + struct list_head file_list; /* list for directory entries */ + char *name; /* name entry */ + int hash; /* name hash */ + int namelen; /* name len since name is not 0 terminated */ + + /* we can check for duplicate whiteouts and files in the same branch + * in order to return -EIO. + */ + int bindex; + + /* is this a whiteout entry? */ + int whiteout; + + /* Inline name, so we don't need to separately kmalloc small ones */ + char iname[DNAME_INLINE_LEN_MIN]; +}; + +/* Directory hash table. */ +struct unionfs_dir_state { + unsigned int cookie; /* The cookie, which is based off of rdversion */ + unsigned int offset; /* The entry we have returned. */ + int bindex; + loff_t dirpos; /* The offset within the lower level directory. */ + int size; /* How big is the hash table? */ + int hashentries; /* How many entries have been inserted? */ + unsigned long access; + + /* This cache list is used when the inode keeps us around. */ + struct list_head cache; + struct list_head list[0]; +}; + +/* include miscellaneous macros */ +#include "fanout.h" +#include "sioq.h" + +/* Cache creation/deletion routines. */ +void unionfs_destroy_filldir_cache(void); +int unionfs_init_filldir_cache(void); +int unionfs_init_inode_cache(void); +void unionfs_destroy_inode_cache(void); +int unionfs_init_dentry_cache(void); +void unionfs_destroy_dentry_cache(void); + +/* Initialize and free readdir-specific state. */ +int init_rdstate(struct file *file); +struct unionfs_dir_state *alloc_rdstate(struct inode *inode, int bindex); +struct unionfs_dir_state *find_rdstate(struct inode *inode, loff_t fpos); +void free_rdstate(struct unionfs_dir_state *state); +int add_filldir_node(struct unionfs_dir_state *rdstate, const char *name, + int namelen, int bindex, int whiteout); +struct filldir_node *find_filldir_node(struct unionfs_dir_state *rdstate, + const char *name, int namelen); + +struct dentry **alloc_new_dentries(int objs); +struct unionfs_data *alloc_new_data(int objs); + +/* We can only use 32-bits of offset for rdstate --- blech! */ +#define DIREOF (0xfffff) +#define RDOFFBITS 20 /* This is the number of bits in DIREOF. */ +#define MAXRDCOOKIE (0xfff) +/* Turn an rdstate into an offset. */ +static inline off_t rdstate2offset(struct unionfs_dir_state *buf) +{ + off_t tmp; + tmp = ((buf->cookie & MAXRDCOOKIE) << RDOFFBITS) + | (buf->offset & DIREOF); + return tmp; +} + +#define unionfs_read_lock(sb) down_read(&UNIONFS_SB(sb)->rwsem) +#define unionfs_read_unlock(sb) up_read(&UNIONFS_SB(sb)->rwsem) +#define unionfs_write_lock(sb) down_write(&UNIONFS_SB(sb)->rwsem) +#define unionfs_write_unlock(sb) up_write(&UNIONFS_SB(sb)->rwsem) + +static inline void double_lock_dentry(struct dentry *d1, struct dentry *d2) +{ + if (d2 < d1) { + struct dentry *tmp = d1; + d1 = d2; + d2 = tmp; + } + unionfs_lock_dentry(d1); + unionfs_lock_dentry(d2); +} + +extern int new_dentry_private_data(struct dentry *dentry); +void free_dentry_private_data(struct unionfs_dentry_info *udi); +void update_bstart(struct dentry *dentry); + +/* + * EXTERNALS: + */ + +/* replicates the directory structure upto given dentry in given branch */ +extern struct dentry *create_parents(struct inode *dir, struct dentry *dentry, + int bindex); + +/* partial lookup */ +extern int unionfs_partial_lookup(struct dentry *dentry); + +/* Pass an unionfs dentry and an index and it will try to create a whiteout + * in branch 'index'. + * + * On error, it will proceed to a branch to the left + */ +extern int create_whiteout(struct dentry *dentry, int start); +/* copies a file from dbstart to newbindex branch */ +extern int copyup_file(struct inode *dir, struct file *file, int bstart, + int newbindex, loff_t size); +extern int copyup_named_file(struct inode *dir, struct file *file, + char *name, int bstart, int new_bindex, + loff_t len); +/* copies a dentry from dbstart to newbindex branch */ +extern int copyup_dentry(struct inode *dir, struct dentry *dentry, int bstart, + int new_bindex, struct file **copyup_file, loff_t len); + +extern int remove_whiteouts(struct dentry *dentry, struct dentry *hidden_dentry, + int bindex); + +extern int do_delete_whiteouts(struct dentry *dentry, int bindex, + struct unionfs_dir_state *namelist); + +extern int unionfs_get_nlinks(struct inode *inode); + +/* Is this directory empty: 0 if it is empty, -ENOTEMPTY if not. */ +extern int check_empty(struct dentry *dentry, + struct unionfs_dir_state **namelist); +/* Delete whiteouts from this directory in branch bindex. */ +extern int delete_whiteouts(struct dentry *dentry, int bindex, + struct unionfs_dir_state *namelist); + +/* Re-lookup a hidden dentry. */ +extern int unionfs_refresh_hidden_dentry(struct dentry *dentry, int bindex); + +extern void unionfs_reinterpose(struct dentry *this_dentry); +extern struct super_block *unionfs_duplicate_super(struct super_block *sb); + +/* Locking functions. */ +extern int unionfs_setlk(struct file *file, int cmd, struct file_lock *fl); +extern int unionfs_getlk(struct file *file, struct file_lock *fl); + +/* Common file operations. */ +extern int unionfs_file_revalidate(struct file *file, int willwrite); +extern int unionfs_open(struct inode *inode, struct file *file); +extern int unionfs_file_release(struct inode *inode, struct file *file); +extern int unionfs_flush(struct file *file, fl_owner_t id); +extern long unionfs_ioctl(struct file *file, unsigned int cmd, + unsigned long arg); + +/* Inode operations */ +extern int unionfs_rename(struct inode *old_dir, struct dentry *old_dentry, + struct inode *new_dir, struct dentry *new_dentry); +int unionfs_unlink(struct inode *dir, struct dentry *dentry); +int unionfs_rmdir(struct inode *dir, struct dentry *dentry); + +int unionfs_d_revalidate(struct dentry *dentry, struct nameidata *nd); + +/* The values for unionfs_interpose's flag. */ +#define INTERPOSE_DEFAULT 0 +#define INTERPOSE_LOOKUP 1 +#define INTERPOSE_REVAL 2 +#define INTERPOSE_REVAL_NEG 3 +#define INTERPOSE_PARTIAL 4 + +extern int unionfs_interpose(struct dentry *this_dentry, struct super_block *sb, + int flag); + +/* Branch management ioctls. */ +int unionfs_ioctl_incgen(struct file *file, unsigned int cmd, + unsigned long arg); +int unionfs_ioctl_queryfile(struct file *file, unsigned int cmd, + unsigned long arg); + +#ifdef CONFIG_UNION_FS_XATTR +/* Extended attribute functions. */ +extern void *unionfs_xattr_alloc(size_t size, size_t limit); +extern void unionfs_xattr_free(void *ptr, size_t size); + +extern ssize_t unionfs_getxattr(struct dentry *dentry, const char *name, + void *value, size_t size); +extern int unionfs_removexattr(struct dentry *dentry, const char *name); +extern ssize_t unionfs_listxattr(struct dentry *dentry, char *list, + size_t size); +extern int unionfs_setxattr(struct dentry *dentry, const char *name, + const void *value, size_t size, int flags); +#endif /* CONFIG_UNION_FS_XATTR */ + +/* The root directory is unhashed, but isn't deleted. */ +static inline int d_deleted(struct dentry *d) +{ + return d_unhashed(d) && (d != d->d_sb->s_root); +} + +struct dentry *unionfs_lookup_backend(struct dentry *dentry, struct nameidata *nd, int lookupmode); + +#define IS_SET(sb, check_flag) ((check_flag) & MOUNT_FLAG(sb)) + +/* unionfs_permission, check if we should bypass error to facilitate copyup */ +#define IS_COPYUP_ERR(err) ((err) == -EROFS) + +/* unionfs_open, check if we need to copyup the file */ +#define OPEN_WRITE_FLAGS (O_WRONLY | O_RDWR | O_APPEND) +#define IS_WRITE_FLAG(flag) ((flag) & OPEN_WRITE_FLAGS) + +static inline int branchperms(const struct super_block *sb, int index) +{ + BUG_ON(index < 0); + + return UNIONFS_SB(sb)->data[index].branchperms; +} + +static inline int set_branchperms(struct super_block *sb, int index, int perms) +{ + BUG_ON(index < 0); + + UNIONFS_SB(sb)->data[index].branchperms = perms; + + return perms; +} + +/* Is this file on a read-only branch? */ +static inline int is_robranch_super(const struct super_block *sb, int index) +{ + return (!(branchperms(sb, index) & MAY_WRITE)) ? -EROFS : 0; +} + +/* Is this file on a read-only branch? */ +static inline int is_robranch_idx(const struct dentry *dentry, int index) +{ + int err = 0; + + BUG_ON(index < 0); + + if ((!(branchperms(dentry->d_sb, index) & MAY_WRITE)) || + IS_RDONLY(unionfs_lower_dentry_idx(dentry, index)->d_inode)) + err = -EROFS; + + return err; +} + +static inline int is_robranch(const struct dentry *dentry) +{ + int index; + + index = UNIONFS_D(dentry)->bstart; + BUG_ON(index < 0); + + return is_robranch_idx(dentry, index); +} + +/* What do we use for whiteouts. */ +#define UNIONFS_WHPFX ".wh." +#define UNIONFS_WHLEN 4 +/* If a directory contains this file, then it is opaque. We start with the + * .wh. flag so that it is blocked by lookup. + */ +#define UNIONFS_DIR_OPAQUE_NAME "__dir_opaque" +#define UNIONFS_DIR_OPAQUE UNIONFS_WHPFX UNIONFS_DIR_OPAQUE_NAME + +#define VALID_MOUNT_FLAGS (0) + +#ifndef DEFAULT_POLLMASK +#define DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM) +#endif + +/* + * EXTERNALS: + */ +extern char *alloc_whname(const char *name, int len); + +/* These two functions are here because it is kind of daft to copy and paste the + * contents of the two functions to 32+ places in unionfs + */ +static inline struct dentry *lock_parent(struct dentry *dentry) +{ + struct dentry *dir = dget(dentry->d_parent); + + mutex_lock(&dir->d_inode->i_mutex); + return dir; +} + +static inline void unlock_dir(struct dentry *dir) +{ + mutex_unlock(&dir->d_inode->i_mutex); + dput(dir); +} + +extern int make_dir_opaque(struct dentry *dir, int bindex); + +#endif /* not _UNION_H_ */ + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bal...@us...> - 2007-02-27 23:28:54
|
Revision: 888 http://svn.sourceforge.net/hackndev/?rev=888&view=rev Author: balrog-kun Date: 2007-02-27 15:28:53 -0800 (Tue, 27 Feb 2007) Log Message: ----------- l4p: pxapwm-bl API update attempt. Modified Paths: -------------- linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c Modified: linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c =================================================================== --- linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c 2007-02-27 22:02:26 UTC (rev 887) +++ linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c 2007-02-27 23:28:53 UTC (rev 888) @@ -117,7 +117,7 @@ #define pxapwmbl_resume NULL #endif -static int pxapwmbl_set_intensity(struct backlight_device *bd) +static int pxapwmbl_update_status(struct backlight_device *bd) { int intensity; struct pxapwmbl_platform_data *bl = class_get_devdata(&bd->class_dev); @@ -157,8 +157,8 @@ static struct backlight_properties pxapwmbl_data = { .owner = THIS_MODULE, - .get_brightness = pxapwmbl_get_intensity, - .update_status = pxapwmbl_set_intensity, + .get_brightness = pxapwmbl_get_intensity, + .update_status = pxapwmbl_update_status, }; static int pxapwmbl_probe(struct platform_device *pdev) @@ -180,10 +180,12 @@ bl->off_threshold = 5; bl->dev = backlight_device_register ("pxapwm-bl", &pdev->dev, - NULL, &pxapwmbl_data); + bl, &pxapwmbl_data); 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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-27 22:02:28
|
Revision: 887 http://svn.sourceforge.net/hackndev/?rev=887&view=rev Author: keddar Date: 2007-02-27 14:02:26 -0800 (Tue, 27 Feb 2007) Log Message: ----------- TT3: add PALM_T3 prefix to GPIOED* Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Makefile Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig 2007-02-27 21:51:24 UTC (rev 886) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig 2007-02-27 22:02:26 UTC (rev 887) @@ -16,14 +16,14 @@ help Adds battery driver support -config GPIOED +config PALM_T3_GPIOED tristate "GPIOED" depends on MACH_T3XSCALE default n help Gpioed: only for debuging and testing! -config GPIOEDNG +config PALM_T3_GPIOEDNG tristate "GPIOEDNG" depends on MACH_T3XSCALE default n Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Makefile =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Makefile 2007-02-27 21:51:24 UTC (rev 886) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Makefile 2007-02-27 22:02:26 UTC (rev 887) @@ -5,5 +5,5 @@ obj-$(CONFIG_MACH_T3XSCALE) += palmt3.o obj-$(CONFIG_PALM_T3_BUTTONS) += palmt3_buttons.o obj-$(CONFIG_PALM_T3_BATTERY) += palmt3_battery.o -obj-$(CONFIG_GPIOED) += gpioed.o -obj-$(CONFIG_GPIOEDNG) += gpioed-ng.o +obj-$(CONFIG_PALM_T3_GPIOED) += gpioed.o +obj-$(CONFIG_PALM_T3_GPIOEDNG) += gpioed-ng.o This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-02-27 21:51:43
|
Revision: 886 http://svn.sourceforge.net/hackndev/?rev=886&view=rev Author: marex_z71 Date: 2007-02-27 13:51:24 -0800 (Tue, 27 Feb 2007) Log Message: ----------- l4p: revert kedar's changes as he wished Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Makefile linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig 2007-02-27 21:32:11 UTC (rev 885) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig 2007-02-27 21:51:24 UTC (rev 886) @@ -16,14 +16,14 @@ help Adds battery driver support -config PALM_T3_GPIOED +config GPIOED tristate "GPIOED" depends on MACH_T3XSCALE default n help Gpioed: only for debuging and testing! -config PALM_T3_GPIOEDNG +config GPIOEDNG tristate "GPIOEDNG" depends on MACH_T3XSCALE default n Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Makefile =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Makefile 2007-02-27 21:32:11 UTC (rev 885) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Makefile 2007-02-27 21:51:24 UTC (rev 886) @@ -5,5 +5,5 @@ obj-$(CONFIG_MACH_T3XSCALE) += palmt3.o obj-$(CONFIG_PALM_T3_BUTTONS) += palmt3_buttons.o obj-$(CONFIG_PALM_T3_BATTERY) += palmt3_battery.o -obj-$(CONFIG_PALM_T3_GPIOED) += gpioed.o -obj-$(CONFIG_PALM_T3_GPIOEDNG) += gpioed-ng.o +obj-$(CONFIG_GPIOED) += gpioed.o +obj-$(CONFIG_GPIOEDNG) += gpioed-ng.o Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c 2007-02-27 21:32:11 UTC (rev 885) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c 2007-02-27 21:51:24 UTC (rev 886) @@ -45,9 +45,7 @@ int palmt3_battery_get_min_voltage(struct battery *bat) { - //return 3710; // 3.71 V, Critical Threshold set by PalmOS - return 3680; // 3.68 test kEd - + return 3710; // 3.71 V, Critical Threshold set by PalmOS } static int match_tsc(struct device * dev, void * data) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-27 21:32:13
|
Revision: 885 http://svn.sourceforge.net/hackndev/?rev=885&view=rev Author: keddar Date: 2007-02-27 13:32:11 -0800 (Tue, 27 Feb 2007) Log Message: ----------- TT3: add PALM_T3 prefix to GPIOED* Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Makefile linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Makefile =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Makefile 2007-02-27 21:25:28 UTC (rev 884) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Makefile 2007-02-27 21:32:11 UTC (rev 885) @@ -5,5 +5,5 @@ obj-$(CONFIG_MACH_T3XSCALE) += palmt3.o obj-$(CONFIG_PALM_T3_BUTTONS) += palmt3_buttons.o obj-$(CONFIG_PALM_T3_BATTERY) += palmt3_battery.o -obj-$(CONFIG_GPIOED) += gpioed.o -obj-$(CONFIG_GPIOEDNG) += gpioed-ng.o +obj-$(CONFIG_PALM_T3_GPIOED) += gpioed.o +obj-$(CONFIG_PALM_T3_GPIOEDNG) += gpioed-ng.o Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c 2007-02-27 21:25:28 UTC (rev 884) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3_battery.c 2007-02-27 21:32:11 UTC (rev 885) @@ -45,7 +45,9 @@ int palmt3_battery_get_min_voltage(struct battery *bat) { - return 3710; // 3.71 V, Critical Threshold set by PalmOS + //return 3710; // 3.71 V, Critical Threshold set by PalmOS + return 3680; // 3.68 test kEd + } static int match_tsc(struct device * dev, void * data) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-27 21:25:34
|
Revision: 884 http://svn.sourceforge.net/hackndev/?rev=884&view=rev Author: keddar Date: 2007-02-27 13:25:28 -0800 (Tue, 27 Feb 2007) Log Message: ----------- TT3: add PALM_T3 prefix to GPIOED* Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig 2007-02-27 16:28:55 UTC (rev 883) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig 2007-02-27 21:25:28 UTC (rev 884) @@ -16,14 +16,14 @@ help Adds battery driver support -config GPIOED +config PALM_T3_GPIOED tristate "GPIOED" depends on MACH_T3XSCALE default n help Gpioed: only for debuging and testing! -config GPIOEDNG +config PALM_T3_GPIOEDNG tristate "GPIOEDNG" depends on MACH_T3XSCALE default n This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mar...@us...> - 2007-02-27 16:28:58
|
Revision: 883 http://svn.sourceforge.net/hackndev/?rev=883&view=rev Author: marex_z71 Date: 2007-02-27 08:28:55 -0800 (Tue, 27 Feb 2007) Log Message: ----------- l4p: Fix GPIOed and GPIOed-NG and make them a self-standing module available under DRIVERS->MISC, also remove them from palmld Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/Kconfig linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/Makefile linux4palm/linux/trunk/drivers/misc/Kconfig linux4palm/linux/trunk/drivers/misc/Makefile Added Paths: ----------- linux4palm/linux/trunk/drivers/misc/gpioed-ng.c linux4palm/linux/trunk/drivers/misc/gpioed.c Removed Paths: ------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/gpioed-ng.c linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/gpioed.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/Kconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/Kconfig 2007-02-27 13:58:12 UTC (rev 882) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/Kconfig 2007-02-27 16:28:55 UTC (rev 883) @@ -21,17 +21,3 @@ config PALMLD_IDE tristate "Palm LifeDrive IDE driver" depends on MACH_XSCALE_PALMLD - -config GPIOED - tristate "GPIOED" - depends on MACH_XSCALE_PALMLD - default n - help - Gpioed: only for debuging and testing! - -config GPIOEDNG - tristate "GPIOEDNG" - depends on MACH_XSCALE_PALMLD - default n - help - Gpioed-ng: only for debuging and testing! Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/Makefile =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/Makefile 2007-02-27 13:58:12 UTC (rev 882) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/Makefile 2007-02-27 16:28:55 UTC (rev 883) @@ -7,6 +7,4 @@ obj-$(CONFIG_PALMLD_USB) += palmld_usb.o obj-$(CONFIG_PALMLD_IDE) += palmld_ide.o obj-$(CONFIG_PM) += palmld_pm.o -obj-$(CONFIG_GPIOED) += gpioed.o -obj-$(CONFIG_GPIOEDNG) += gpioed-ng.o Deleted: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/gpioed-ng.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/gpioed-ng.c 2007-02-27 13:58:12 UTC (rev 882) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/gpioed-ng.c 2007-02-27 16:28:55 UTC (rev 883) @@ -1,175 +0,0 @@ -#include <linux/module.h> -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/proc_fs.h> - -#include <linux/interrupt.h> -#include <asm/irq.h> -#include <asm/mach/arch.h> -#include <asm/mach/map.h> -#include <asm/mach-types.h> -#include <asm/hardware.h> -#include <linux/sched.h> -#include <linux/workqueue.h> -#include <asm/arch/pxa-regs.h> -#include <asm/arch/irqs.h> -#include <asm/uaccess.h> - -#include <linux/debugfs.h> -#include <linux/seq_file.h> - -#define PROCFS_NAME "gpio" -#define DEBUGFS_NAME "gpio" - -static struct proc_dir_entry *proc_intf; -static struct dentry *debugfs_intf; - -#define PROCFS_MAX_SIZE 20 - -static char procfs_buffer[PROCFS_MAX_SIZE]; -static unsigned long procfs_buffer_size = 0; - -#define GPIO_TEST(reg, gp) (reg(gp) & GPIO_bit(gp)) -static int dfs_show(struct seq_file *s, void *_) -{ - int i,afn; - seq_printf(s, "GPIO lines status:\n"); - - for(i=0;i<121;i++) { - afn = (GAFR(i) & (0x3 << (((i) & 0xf)*2))) >> (((i) & 0xf)*2); - seq_printf(s, "%s%d: %s %s %s %s %lx\n", - i<10?"0":"", - i, - GPIO_TEST(GPLR, i)?"*":" ", - GPIO_TEST(GPDR, i)?"->":"<-", - GPIO_TEST(GRER, i)?"_/":" ", - GPIO_TEST(GFER, i)?"\\_":" ", - afn); - - } - - return 0; -} - -static int dfs_open(struct inode *inode, struct file *file) -{ - return single_open(file, dfs_show, inode->u.generic_ip); -} - -static struct file_operations debug_fops = { - .open = dfs_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; - -static void gpio_set(int id, int on) -{ - do { - if (on) - GPSR(id) = GPIO_bit(id); - else - GPCR(id) = GPIO_bit(id); - } while (0); -} - -void set_afn(int gpio, int fn) -{ - int gafr; - gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2)); - GAFR(gpio) = gafr | (fn << (((gpio) & 0xf)*2)); -} - -void handle_request() -{ - char *p = NULL; - unsigned long id = simple_strtoul(procfs_buffer+2, &p, 10); - switch(procfs_buffer[0]) { - case 'L': - gpio_set(id, 1); - printk(KERN_ERR "GPIOed: GPIO %lu set high\n", id); - break; - case 'l': - gpio_set(id, 0); - printk(KERN_ERR "GPIOed: GPIO %lu set low\n", id); - break; - case 'd': - GPDR(id) &= ~(GPIO_bit(id)); - break; - case 'D': - GPDR(id) |= GPIO_bit(id); - break; - case '0': - set_afn(id, 0); - break; - case '1': - set_afn(id, 1); - break; - case '2': - set_afn(id, 2); - break; - default: - printk(KERN_ERR "GPIOed: Unknown request\n"); - break; - } -} - - -int procfile_write(struct file *file, const char *buffer, unsigned long count, void *data) -{ - procfs_buffer_size = count; - if (procfs_buffer_size > PROCFS_MAX_SIZE ) { - procfs_buffer_size = PROCFS_MAX_SIZE; - } - - /* write data to the buffer */ - if ( copy_from_user(procfs_buffer, buffer, procfs_buffer_size) ) { - return -EFAULT; - } - - handle_request(); - - return procfs_buffer_size; -} - - -static int __init gpioed_init(void) -{ - proc_intf = create_proc_entry(PROCFS_NAME, 0644, NULL); - if (proc_intf == NULL) { - remove_proc_entry(PROCFS_NAME, &proc_root); - printk(KERN_ALERT "Error: Could not initialize /proc/%s\n", PROCFS_NAME); - return -ENOMEM; - } - - /*proc_intf->read_proc = procfile_read;*/ - proc_intf->write_proc = procfile_write; - proc_intf->owner = THIS_MODULE; - proc_intf->mode = S_IFREG | S_IRUGO; - proc_intf->uid = 0; - proc_intf->gid = 0; - proc_intf->size = 37; - - debugfs_intf = debugfs_create_file(DEBUGFS_NAME, S_IRUGO, NULL, NULL, &debug_fops); - - printk(KERN_INFO "/proc/%s created\n", PROCFS_NAME); - - return 0; -} - -static void __exit gpioed_exit(void) -{ - debugfs_remove(debugfs_intf); - remove_proc_entry(PROCFS_NAME, &proc_root); - printk(KERN_INFO "/proc/%s removed\n", PROCFS_NAME); -} - - -/*** Some more stuff ***/ -module_init(gpioed_init); -module_exit(gpioed_exit); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Vladimir \"Farcaller\" Pouzanov <far...@gm...>"); -MODULE_DESCRIPTION("GPIO editor for PXA26x, second edition"); - Deleted: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/gpioed.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/gpioed.c 2007-02-27 13:58:12 UTC (rev 882) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/gpioed.c 2007-02-27 16:28:55 UTC (rev 883) @@ -1,227 +0,0 @@ -/*** Basic includes ***/ -#include <linux/module.h> -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/proc_fs.h> -#include <linux/irq.h> - -#include <linux/interrupt.h> -#include <asm/irq.h> -#include <asm/mach/arch.h> -#include <asm/mach/map.h> -#include <asm/mach-types.h> -#include <asm/hardware.h> -#include <linux/sched.h> -#include <linux/workqueue.h> -#include <asm/arch/pxa-regs.h> -#include <asm/arch/irqs.h> -#include <asm/uaccess.h> - -/*** GPIO macros ***/ -#define GET_PALMT3_GPIO(gpio) \ - (GPLR(GPIO_NR_PALMT3_ ## gpio) & GPIO_bit(GPIO_NR_PALMT3_ ## gpio)) - -#define SET_PALMT3_GPIO(gpio, setp) \ - do { \ - if (setp) \ - GPSR(GPIO_NR_PALMT3_ ## gpio) = GPIO_bit(GPIO_NR_PALMT3_ ## gpio); \ - else \ - GPCR(GPIO_NR_PALMT3_ ## gpio) = GPIO_bit(GPIO_NR_PALMT3_ ## gpio); \ - } while (0) - -#define SET_PALMT3_GPIO_N(gpio, setp) \ - do { \ - if (setp) \ - GPCR(GPIO_NR_PALMT3_ ## gpio) = GPIO_bit(GPIO_NR_PALMT3_ ## gpio); \ - else \ - GPSR(GPIO_NR_PALMT3_ ## gpio) = GPIO_bit(GPIO_NR_PALMT3_ ## gpio); \ - } while (0) - -#define GET_GPIO_REG(reg,gpio) (GP##reg(gpio) & GPIO_bit(gpio)) -#define GET_GPIO(gpio) GET_GPIO_REG(LR, gpio) - -/*** /proc interface ***/ -static struct proc_dir_entry *proc_intf; -#define procfs_name "gpioed" -#define PROCFS_MAX_SIZE 20 - -static char procfs_buffer[PROCFS_MAX_SIZE]; -static unsigned long procfs_buffer_size = 0; - -int procfile_read(char *buffer, char **buffer_location, off_t offset, int buffer_length, int *eof, void *data) -{ - int ret; - - if (offset > 0) { - /* we have finished to read, return 0 */ - ret = 0; - } else { - /* fill the buffer, return the buffer size */ - ret = sprintf(buffer, "HelloWorld!\n"); - } - return ret; -} - -void handle_request(void); - -int procfile_write(struct file *file, const char *buffer, unsigned long count, void *data) -{ - procfs_buffer_size = count; - if (procfs_buffer_size > PROCFS_MAX_SIZE ) { - procfs_buffer_size = PROCFS_MAX_SIZE; - } - - /* write data to the buffer */ - if ( copy_from_user(procfs_buffer, buffer, procfs_buffer_size) ) { - return -EFAULT; - } - - handle_request(); - - return procfs_buffer_size; -} - -/*** IRQ (GPIO) handling ***/ -static struct workqueue_struct *my_workqueue; -#define MY_WORK_QUEUE_NAME "GPIOed" - -static void handle_gpio(void* irq) -{ - int gpn = (int)irq; - printk(KERN_ERR "*** GPIO *** %d *** is *** %s ***\n", gpn, GET_GPIO(gpn) ? "high" : "low "); -} - -irqreturn_t gpio_irq(int irq, void *dev_id, struct pt_regs *regs) -{ - static int initialised = 0; - static struct work_struct task; - - if (initialised == 0) { - INIT_WORK(&task, handle_gpio); - initialised = 1; - } else { - PREPARE_WORK(&task, handle_gpio, dev_id); - } - - queue_work(my_workqueue, &task); - - return IRQ_HANDLED; -} - -/*** GPIO R/W ***/ -static int gpio_get(int id) -{ - return GET_GPIO(id); -} - -static void gpio_set(int id, int on) -{ - do { - if (on) - GPSR(id) = GPIO_bit(id); - else - GPCR(id) = GPIO_bit(id); - } while (0); -} - -static int gpio_watch(int x) -{ - int ret; - ret = request_irq (IRQ_GPIO(x), gpio_irq, SA_SAMPLE_RANDOM, "test_handler", (void*)x); - set_irq_type (IRQ_GPIO(x), IRQT_BOTHEDGE); - if(ret!=0) { - printk(KERN_ERR "GPIOed: failed to register for GPIO %d\n", x); - return 1; - } else { - printk(KERN_ERR "GPIOed: Registered GPIO %d\n", x); - return 0; - } -} - -/*** Request handler ***/ -void handle_request() -{ - char *p = NULL; - unsigned long base = 10; - unsigned long id; - - if((procfs_buffer[0] == 'P') || (procfs_buffer[0] == 'V')) - base = 16; - id = simple_strtoul(procfs_buffer+2, &p, base); - switch(procfs_buffer[0]) { - case 'r': - printk(KERN_ERR "GPIOed: GPIO %lu is %s\n", id, gpio_get(id)?"high":"low "); - break; - case 's': - gpio_watch(id); - break; - case 'h': - gpio_set(id, 1); - printk(KERN_ERR "GPIOed: GPIO %lu set high\n", id); - break; - case 'l': - gpio_set(id, 0); - printk(KERN_ERR "GPIOed: GPIO %lu set low\n", id); - break; - case 'd': - printk(KERN_ERR "GPIOed: GPIO %lu is %s\n", id, GET_GPIO_REG(DR,id)?"output":"input"); - break; - - case 'P': - printk(KERN_ERR "GPIOed: P-V for 0x%x is 0x%x\n", id, (unsigned int)phys_to_virt(id)); - break; - case 'V': - printk(KERN_ERR "GPIOed: V-P for 0x%x is 0x%x\n", id, (unsigned int)virt_to_phys(id)); - break; - case 'D': - base = *((unsigned int*)id); - printk(KERN_ERR "GPIOed: 0x%x = 0x%x\n", id, base); - break; - default: - printk(KERN_ERR "GPIOed: Unknown request\n"); - break; - } -} - -/*** init&exit ***/ -static int __init gpioed_init(void) -{ - my_workqueue = create_workqueue(MY_WORK_QUEUE_NAME); - - proc_intf = create_proc_entry(procfs_name, 0644, NULL); - if (proc_intf == NULL) { - remove_proc_entry(procfs_name, &proc_root); - printk(KERN_ALERT "Error: Could not initialize /proc/%s\n", - procfs_name); - return -ENOMEM; - } - - proc_intf->read_proc = procfile_read; - proc_intf->write_proc = procfile_write; - proc_intf->owner = THIS_MODULE; - proc_intf->mode = S_IFREG | S_IRUGO; - proc_intf->uid = 0; - proc_intf->gid = 0; - proc_intf->size = 37; - - printk(KERN_INFO "/proc/%s created\n", procfs_name); - - return 0; -} - -static void __exit gpioed_exit(void) -{ - destroy_workqueue(my_workqueue); - remove_proc_entry(procfs_name, &proc_root); - printk(KERN_INFO "/proc/%s removed\n", procfs_name); -} - - -/*** Some more stuff ***/ -module_init(gpioed_init); -module_exit(gpioed_exit); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Vladimir \"Farcaller\" Pouzanov <far...@gm...>"); -MODULE_DESCRIPTION("GPIO editor for PXA26x"); - Modified: linux4palm/linux/trunk/drivers/misc/Kconfig =================================================================== --- linux4palm/linux/trunk/drivers/misc/Kconfig 2007-02-27 13:58:12 UTC (rev 882) +++ linux4palm/linux/trunk/drivers/misc/Kconfig 2007-02-27 16:28:55 UTC (rev 883) @@ -34,6 +34,20 @@ Say Y here to enable monitoring of battery and charger using sysfs interface. +config GPIOED + tristate "GPIOED" + depends on ARCH_PXA + default n + help + Gpioed: only for debuging and testing! + +config GPIOEDNG + tristate "GPIOEDNG" + depends on ARCH_PXA + default n + help + Gpioed-ng: only for debuging and testing! + menu "Multimedia Capabilities Port drivers" config MCP Modified: linux4palm/linux/trunk/drivers/misc/Makefile =================================================================== --- linux4palm/linux/trunk/drivers/misc/Makefile 2007-02-27 13:58:12 UTC (rev 882) +++ linux4palm/linux/trunk/drivers/misc/Makefile 2007-02-27 16:28:55 UTC (rev 883) @@ -13,6 +13,8 @@ obj-$(CONFIG_BATTCHARGE_MONITOR) += battchargemon.o +obj-$(CONFIG_GPIOED) += gpioed.o +obj-$(CONFIG_GPIOEDNG) += gpioed-ng.o obj-$(CONFIG_MCP) += mcp-core.o obj-$(CONFIG_MCP_SA1100) += mcp-sa1100.o Added: linux4palm/linux/trunk/drivers/misc/gpioed-ng.c =================================================================== --- linux4palm/linux/trunk/drivers/misc/gpioed-ng.c (rev 0) +++ linux4palm/linux/trunk/drivers/misc/gpioed-ng.c 2007-02-27 16:28:55 UTC (rev 883) @@ -0,0 +1,175 @@ +#include <linux/module.h> +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/proc_fs.h> + +#include <linux/interrupt.h> +#include <asm/irq.h> +#include <asm/mach/arch.h> +#include <asm/mach/map.h> +#include <asm/mach-types.h> +#include <asm/hardware.h> +#include <linux/sched.h> +#include <linux/workqueue.h> +#include <asm/arch/pxa-regs.h> +#include <asm/arch/irqs.h> +#include <asm/uaccess.h> + +#include <linux/debugfs.h> +#include <linux/seq_file.h> + +#define PROCFS_NAME "gpio" +#define DEBUGFS_NAME "gpio" + +static struct proc_dir_entry *proc_intf; +static struct dentry *debugfs_intf; + +#define PROCFS_MAX_SIZE 20 + +static char procfs_buffer[PROCFS_MAX_SIZE]; +static unsigned long procfs_buffer_size = 0; + +#define GPIO_TEST(reg, gp) (reg(gp) & GPIO_bit(gp)) +static int dfs_show(struct seq_file *s, void *_) +{ + int i,afn; + seq_printf(s, "GPIO lines status:\n"); + + for(i=0;i<121;i++) { + afn = (GAFR(i) & (0x3 << (((i) & 0xf)*2))) >> (((i) & 0xf)*2); + seq_printf(s, "%s%d: %s %s %s %s %08x\n", + i<10?"0":"", + i, + GPIO_TEST(GPLR, i)?"*":" ", + GPIO_TEST(GPDR, i)?"->":"<-", + GPIO_TEST(GRER, i)?"_/":" ", + GPIO_TEST(GFER, i)?"\\_":" ", + afn); + + } + + return 0; +} + +static int dfs_open(struct inode *inode, struct file *file) +{ + return single_open(file, dfs_show, inode->i_private); +} + +static struct file_operations debug_fops = { + .open = dfs_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +static void gpio_set(int id, int on) +{ + do { + if (on) + GPSR(id) = GPIO_bit(id); + else + GPCR(id) = GPIO_bit(id); + } while (0); +} + +void set_afn(int gpio, int fn) +{ + int gafr; + gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2)); + GAFR(gpio) = gafr | (fn << (((gpio) & 0xf)*2)); +} + +void handle_request(void) +{ + char *p = NULL; + unsigned long id = simple_strtoul(procfs_buffer+2, &p, 10); + switch(procfs_buffer[0]) { + case 'L': + gpio_set(id, 1); + printk(KERN_ERR "GPIOed: GPIO %lu set high\n", id); + break; + case 'l': + gpio_set(id, 0); + printk(KERN_ERR "GPIOed: GPIO %lu set low\n", id); + break; + case 'd': + GPDR(id) &= ~(GPIO_bit(id)); + break; + case 'D': + GPDR(id) |= GPIO_bit(id); + break; + case '0': + set_afn(id, 0); + break; + case '1': + set_afn(id, 1); + break; + case '2': + set_afn(id, 2); + break; + default: + printk(KERN_ERR "GPIOed: Unknown request\n"); + break; + } +} + + +int procfile_write(struct file *file, const char *buffer, unsigned long count, void *data) +{ + procfs_buffer_size = count; + if (procfs_buffer_size > PROCFS_MAX_SIZE ) { + procfs_buffer_size = PROCFS_MAX_SIZE; + } + + /* write data to the buffer */ + if ( copy_from_user(procfs_buffer, buffer, procfs_buffer_size) ) { + return -EFAULT; + } + + handle_request(); + + return procfs_buffer_size; +} + + +static int __init gpioed_init(void) +{ + proc_intf = create_proc_entry(PROCFS_NAME, 0644, NULL); + if (proc_intf == NULL) { + remove_proc_entry(PROCFS_NAME, &proc_root); + printk(KERN_ALERT "Error: Could not initialize /proc/%s\n", PROCFS_NAME); + return -ENOMEM; + } + + /*proc_intf->read_proc = procfile_read;*/ + proc_intf->write_proc = procfile_write; + proc_intf->owner = THIS_MODULE; + proc_intf->mode = S_IFREG | S_IRUGO; + proc_intf->uid = 0; + proc_intf->gid = 0; + proc_intf->size = 37; + + debugfs_intf = debugfs_create_file(DEBUGFS_NAME, S_IRUGO, NULL, NULL, &debug_fops); + + printk(KERN_INFO "/proc/%s created\n", PROCFS_NAME); + + return 0; +} + +static void __exit gpioed_exit(void) +{ + debugfs_remove(debugfs_intf); + remove_proc_entry(PROCFS_NAME, &proc_root); + printk(KERN_INFO "/proc/%s removed\n", PROCFS_NAME); +} + + +/*** Some more stuff ***/ +module_init(gpioed_init); +module_exit(gpioed_exit); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Vladimir \"Farcaller\" Pouzanov <far...@gm...>"); +MODULE_DESCRIPTION("GPIO editor for PXA26x, second edition"); + Added: linux4palm/linux/trunk/drivers/misc/gpioed.c =================================================================== --- linux4palm/linux/trunk/drivers/misc/gpioed.c (rev 0) +++ linux4palm/linux/trunk/drivers/misc/gpioed.c 2007-02-27 16:28:55 UTC (rev 883) @@ -0,0 +1,210 @@ +/*** Basic includes ***/ +#include <linux/module.h> +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/proc_fs.h> +#include <linux/irq.h> + +#include <linux/interrupt.h> +#include <asm/irq.h> +#include <asm/mach/arch.h> +#include <asm/mach/map.h> +#include <asm/mach-types.h> +#include <asm/hardware.h> +#include <linux/sched.h> +#include <linux/workqueue.h> +#include <asm/arch/pxa-regs.h> +#include <asm/arch/irqs.h> +#include <asm/uaccess.h> + +#define GET_GPIO_REG(reg,gpio) (GP##reg(gpio) & GPIO_bit(gpio)) +#define GET_GPIO(gpio) GET_GPIO_REG(LR, gpio) + +/*** /proc interface ***/ +static struct proc_dir_entry *proc_intf; +#define procfs_name "gpioed" +#define PROCFS_MAX_SIZE 20 + +static char procfs_buffer[PROCFS_MAX_SIZE]; +static unsigned long procfs_buffer_size = 0; +unsigned int gpioed_irq; + +int procfile_read(char *buffer, char **buffer_location, off_t offset, int buffer_length, int *eof, void *data) +{ + int ret; + + if (offset > 0) { + /* we have finished to read, return 0 */ + ret = 0; + } else { + /* fill the buffer, return the buffer size */ + ret = sprintf(buffer, "HelloWorld!\n"); + } + return ret; +} + +void handle_request(void); + +int procfile_write(struct file *file, const char *buffer, unsigned long count, void *data) +{ + procfs_buffer_size = count; + if (procfs_buffer_size > PROCFS_MAX_SIZE ) { + procfs_buffer_size = PROCFS_MAX_SIZE; + } + + /* write data to the buffer */ + if ( copy_from_user(procfs_buffer, buffer, procfs_buffer_size) ) { + return -EFAULT; + } + + handle_request(); + + return procfs_buffer_size; +} + +/*** IRQ (GPIO) handling ***/ +static struct workqueue_struct *my_workqueue; +#define MY_WORK_QUEUE_NAME "GPIOed" + +static void handle_gpio(struct work_struct *work) +{ + printk(KERN_ERR "*** GPIO *** %d *** is *** %s ***\n", + gpioed_irq, GET_GPIO(gpioed_irq) ? "high" : "low "); +} + +irqreturn_t gpio_irq(int irq, void *dev_id) +{ + static int initialised = 0; + struct work_struct gpioed_ws; + + gpioed_irq=(int)irq; + + if (initialised == 0) { + INIT_WORK(&gpioed_ws, handle_gpio); + initialised = 1; + } else { + PREPARE_WORK(&gpioed_ws, handle_gpio); + } + + queue_work(my_workqueue, &gpioed_ws); + + return IRQ_HANDLED; +} + +/*** GPIO R/W ***/ +static int gpio_get(int id) +{ + return GET_GPIO(id); +} + +static void gpio_set(int id, int on) +{ + do { + if (on) + GPSR(id) = GPIO_bit(id); + else + GPCR(id) = GPIO_bit(id); + } while (0); +} + +static int gpio_watch(int x) +{ + int ret; + ret = request_irq (IRQ_GPIO(x), gpio_irq, SA_SAMPLE_RANDOM, "test_handler", (void*)x); + set_irq_type (IRQ_GPIO(x), IRQT_BOTHEDGE); + if(ret!=0) { + printk(KERN_ERR "GPIOed: failed to register for GPIO %d\n", x); + return 1; + } else { + printk(KERN_ERR "GPIOed: Registered GPIO %d\n", x); + return 0; + } +} + +/*** Request handler ***/ +void handle_request() +{ + char *p = NULL; + unsigned long base = 10; + unsigned long id; + + if((procfs_buffer[0] == 'P') || (procfs_buffer[0] == 'V')) + base = 16; + id = simple_strtoul(procfs_buffer+2, &p, base); + switch(procfs_buffer[0]) { + case 'r': + printk(KERN_ERR "GPIOed: GPIO %lu is %s\n", id, gpio_get(id)?"high":"low "); + break; + case 's': + gpio_watch(id); + break; + case 'h': + gpio_set(id, 1); + printk(KERN_ERR "GPIOed: GPIO %lu set high\n", id); + break; + case 'l': + gpio_set(id, 0); + printk(KERN_ERR "GPIOed: GPIO %lu set low\n", id); + break; + case 'd': + printk(KERN_ERR "GPIOed: GPIO %lu is %s\n", id, GET_GPIO_REG(DR,id)?"output":"input"); + break; + + case 'P': + printk(KERN_ERR "GPIOed: P-V for 0x%lu is 0x%x\n", id, (unsigned int)phys_to_virt(id)); + break; + case 'V': + printk(KERN_ERR "GPIOed: V-P for 0x%lu is 0x%x\n", id, (unsigned int)virt_to_phys(&id)); + break; + case 'D': + base = *((unsigned int*)id); + printk(KERN_ERR "GPIOed: 0x%lu = 0x%lu\n", id, base); + break; + default: + printk(KERN_ERR "GPIOed: Unknown request\n"); + break; + } +} + +/*** init&exit ***/ +static int __init gpioed_init(void) +{ + my_workqueue = create_workqueue(MY_WORK_QUEUE_NAME); + + proc_intf = create_proc_entry(procfs_name, 0644, NULL); + if (proc_intf == NULL) { + remove_proc_entry(procfs_name, &proc_root); + printk(KERN_ALERT "Error: Could not initialize /proc/%s\n", + procfs_name); + return -ENOMEM; + } + + proc_intf->read_proc = procfile_read; + proc_intf->write_proc = procfile_write; + proc_intf->owner = THIS_MODULE; + proc_intf->mode = S_IFREG | S_IRUGO; + proc_intf->uid = 0; + proc_intf->gid = 0; + proc_intf->size = 37; + + printk(KERN_INFO "/proc/%s created\n", procfs_name); + + return 0; +} + +static void __exit gpioed_exit(void) +{ + destroy_workqueue(my_workqueue); + remove_proc_entry(procfs_name, &proc_root); + printk(KERN_INFO "/proc/%s removed\n", procfs_name); +} + + +/*** Some more stuff ***/ +module_init(gpioed_init); +module_exit(gpioed_exit); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Vladimir \"Farcaller\" Pouzanov <far...@gm...>"); +MODULE_DESCRIPTION("GPIO editor for PXA2xx"); + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-02-27 13:58:23
|
Revision: 882 http://svn.sourceforge.net/hackndev/?rev=882&view=rev Author: keddar Date: 2007-02-27 05:58:12 -0800 (Tue, 27 Feb 2007) Log Message: ----------- TT3: show gpioed under palmtt3... Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig 2007-02-27 11:24:05 UTC (rev 881) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig 2007-02-27 13:58:12 UTC (rev 882) @@ -16,12 +16,6 @@ help Adds battery driver support -config PALM_T3_FBKEYBOARD - bool "On-screen keyboard (BROKEN)" - depends on PALM_T3_TSC2101 - help - On-screen framebuffer keyboard - config GPIOED tristate "GPIOED" depends on MACH_T3XSCALE @@ -35,3 +29,9 @@ default n help Gpioed-ng: only for debuging and testing! + +config PALM_T3_FBKEYBOARD + bool "On-screen keyboard (BROKEN)" + depends on PALM_T3_TSC2101 + help + On-screen framebuffer keyboard This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sle...@us...> - 2007-02-27 11:24:29
|
Revision: 881 http://svn.sourceforge.net/hackndev/?rev=881&view=rev Author: sleep_walker Date: 2007-02-27 03:24:05 -0800 (Tue, 27 Feb 2007) Log Message: ----------- l4p: gpioed for T|T3 in the same way as LD Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/gpioed.c linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Makefile Added Paths: ----------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/gpioed-ng.c linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/gpioed.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/gpioed.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/gpioed.c 2007-02-27 10:43:04 UTC (rev 880) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/gpioed.c 2007-02-27 11:24:05 UTC (rev 881) @@ -3,6 +3,7 @@ #include <linux/kernel.h> #include <linux/init.h> #include <linux/proc_fs.h> +#include <linux/irq.h> #include <linux/interrupt.h> #include <asm/irq.h> @@ -96,7 +97,7 @@ static struct work_struct task; if (initialised == 0) { - INIT_WORK(&task, handle_gpio, dev_id); + INIT_WORK(&task, handle_gpio); initialised = 1; } else { PREPARE_WORK(&task, handle_gpio, dev_id); Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig 2007-02-27 10:43:04 UTC (rev 880) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Kconfig 2007-02-27 11:24:05 UTC (rev 881) @@ -21,3 +21,17 @@ depends on PALM_T3_TSC2101 help On-screen framebuffer keyboard + +config GPIOED + tristate "GPIOED" + depends on MACH_T3XSCALE + default n + help + Gpioed: only for debuging and testing! + +config GPIOEDNG + tristate "GPIOEDNG" + depends on MACH_T3XSCALE + default n + help + Gpioed-ng: only for debuging and testing! Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Makefile =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Makefile 2007-02-27 10:43:04 UTC (rev 880) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/Makefile 2007-02-27 11:24:05 UTC (rev 881) @@ -5,3 +5,5 @@ obj-$(CONFIG_MACH_T3XSCALE) += palmt3.o obj-$(CONFIG_PALM_T3_BUTTONS) += palmt3_buttons.o obj-$(CONFIG_PALM_T3_BATTERY) += palmt3_battery.o +obj-$(CONFIG_GPIOED) += gpioed.o +obj-$(CONFIG_GPIOEDNG) += gpioed-ng.o Added: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/gpioed-ng.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/gpioed-ng.c (rev 0) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/gpioed-ng.c 2007-02-27 11:24:05 UTC (rev 881) @@ -0,0 +1,175 @@ +#include <linux/module.h> +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/proc_fs.h> + +#include <linux/interrupt.h> +#include <asm/irq.h> +#include <asm/mach/arch.h> +#include <asm/mach/map.h> +#include <asm/mach-types.h> +#include <asm/hardware.h> +#include <linux/sched.h> +#include <linux/workqueue.h> +#include <asm/arch/pxa-regs.h> +#include <asm/arch/irqs.h> +#include <asm/uaccess.h> + +#include <linux/debugfs.h> +#include <linux/seq_file.h> + +#define PROCFS_NAME "gpio" +#define DEBUGFS_NAME "gpio" + +static struct proc_dir_entry *proc_intf; +static struct dentry *debugfs_intf; + +#define PROCFS_MAX_SIZE 20 + +static char procfs_buffer[PROCFS_MAX_SIZE]; +static unsigned long procfs_buffer_size = 0; + +#define GPIO_TEST(reg, gp) (reg(gp) & GPIO_bit(gp)) +static int dfs_show(struct seq_file *s, void *_) +{ + int i,afn; + seq_printf(s, "GPIO lines status:\n"); + + for(i=0;i<121;i++) { + afn = (GAFR(i) & (0x3 << (((i) & 0xf)*2))) >> (((i) & 0xf)*2); + seq_printf(s, "%s%d: %s %s %s %s %lx\n", + i<10?"0":"", + i, + GPIO_TEST(GPLR, i)?"*":" ", + GPIO_TEST(GPDR, i)?"->":"<-", + GPIO_TEST(GRER, i)?"_/":" ", + GPIO_TEST(GFER, i)?"\\_":" ", + afn); + + } + + return 0; +} + +static int dfs_open(struct inode *inode, struct file *file) +{ + return single_open(file, dfs_show, inode->u.generic_ip); +} + +static struct file_operations debug_fops = { + .open = dfs_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +static void gpio_set(int id, int on) +{ + do { + if (on) + GPSR(id) = GPIO_bit(id); + else + GPCR(id) = GPIO_bit(id); + } while (0); +} + +void set_afn(int gpio, int fn) +{ + int gafr; + gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2)); + GAFR(gpio) = gafr | (fn << (((gpio) & 0xf)*2)); +} + +void handle_request() +{ + char *p = NULL; + unsigned long id = simple_strtoul(procfs_buffer+2, &p, 10); + switch(procfs_buffer[0]) { + case 'L': + gpio_set(id, 1); + printk(KERN_ERR "GPIOed: GPIO %lu set high\n", id); + break; + case 'l': + gpio_set(id, 0); + printk(KERN_ERR "GPIOed: GPIO %lu set low\n", id); + break; + case 'd': + GPDR(id) &= ~(GPIO_bit(id)); + break; + case 'D': + GPDR(id) |= GPIO_bit(id); + break; + case '0': + set_afn(id, 0); + break; + case '1': + set_afn(id, 1); + break; + case '2': + set_afn(id, 2); + break; + default: + printk(KERN_ERR "GPIOed: Unknown request\n"); + break; + } +} + + +int procfile_write(struct file *file, const char *buffer, unsigned long count, void *data) +{ + procfs_buffer_size = count; + if (procfs_buffer_size > PROCFS_MAX_SIZE ) { + procfs_buffer_size = PROCFS_MAX_SIZE; + } + + /* write data to the buffer */ + if ( copy_from_user(procfs_buffer, buffer, procfs_buffer_size) ) { + return -EFAULT; + } + + handle_request(); + + return procfs_buffer_size; +} + + +static int __init gpioed_init(void) +{ + proc_intf = create_proc_entry(PROCFS_NAME, 0644, NULL); + if (proc_intf == NULL) { + remove_proc_entry(PROCFS_NAME, &proc_root); + printk(KERN_ALERT "Error: Could not initialize /proc/%s\n", PROCFS_NAME); + return -ENOMEM; + } + + /*proc_intf->read_proc = procfile_read;*/ + proc_intf->write_proc = procfile_write; + proc_intf->owner = THIS_MODULE; + proc_intf->mode = S_IFREG | S_IRUGO; + proc_intf->uid = 0; + proc_intf->gid = 0; + proc_intf->size = 37; + + debugfs_intf = debugfs_create_file(DEBUGFS_NAME, S_IRUGO, NULL, NULL, &debug_fops); + + printk(KERN_INFO "/proc/%s created\n", PROCFS_NAME); + + return 0; +} + +static void __exit gpioed_exit(void) +{ + debugfs_remove(debugfs_intf); + remove_proc_entry(PROCFS_NAME, &proc_root); + printk(KERN_INFO "/proc/%s removed\n", PROCFS_NAME); +} + + +/*** Some more stuff ***/ +module_init(gpioed_init); +module_exit(gpioed_exit); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Vladimir \"Farcaller\" Pouzanov <far...@gm...>"); +MODULE_DESCRIPTION("GPIO editor for PXA26x, second edition"); + Added: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/gpioed.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/gpioed.c (rev 0) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/gpioed.c 2007-02-27 11:24:05 UTC (rev 881) @@ -0,0 +1,227 @@ +/*** Basic includes ***/ +#include <linux/module.h> +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/proc_fs.h> +#include <linux/irq.h> + +#include <linux/interrupt.h> +#include <asm/irq.h> +#include <asm/mach/arch.h> +#include <asm/mach/map.h> +#include <asm/mach-types.h> +#include <asm/hardware.h> +#include <linux/sched.h> +#include <linux/workqueue.h> +#include <asm/arch/pxa-regs.h> +#include <asm/arch/irqs.h> +#include <asm/uaccess.h> + +/*** GPIO macros ***/ +#define GET_PALMT3_GPIO(gpio) \ + (GPLR(GPIO_NR_PALMT3_ ## gpio) & GPIO_bit(GPIO_NR_PALMT3_ ## gpio)) + +#define SET_PALMT3_GPIO(gpio, setp) \ + do { \ + if (setp) \ + GPSR(GPIO_NR_PALMT3_ ## gpio) = GPIO_bit(GPIO_NR_PALMT3_ ## gpio); \ + else \ + GPCR(GPIO_NR_PALMT3_ ## gpio) = GPIO_bit(GPIO_NR_PALMT3_ ## gpio); \ + } while (0) + +#define SET_PALMT3_GPIO_N(gpio, setp) \ + do { \ + if (setp) \ + GPCR(GPIO_NR_PALMT3_ ## gpio) = GPIO_bit(GPIO_NR_PALMT3_ ## gpio); \ + else \ + GPSR(GPIO_NR_PALMT3_ ## gpio) = GPIO_bit(GPIO_NR_PALMT3_ ## gpio); \ + } while (0) + +#define GET_GPIO_REG(reg,gpio) (GP##reg(gpio) & GPIO_bit(gpio)) +#define GET_GPIO(gpio) GET_GPIO_REG(LR, gpio) + +/*** /proc interface ***/ +static struct proc_dir_entry *proc_intf; +#define procfs_name "gpioed" +#define PROCFS_MAX_SIZE 20 + +static char procfs_buffer[PROCFS_MAX_SIZE]; +static unsigned long procfs_buffer_size = 0; + +int procfile_read(char *buffer, char **buffer_location, off_t offset, int buffer_length, int *eof, void *data) +{ + int ret; + + if (offset > 0) { + /* we have finished to read, return 0 */ + ret = 0; + } else { + /* fill the buffer, return the buffer size */ + ret = sprintf(buffer, "HelloWorld!\n"); + } + return ret; +} + +void handle_request(void); + +int procfile_write(struct file *file, const char *buffer, unsigned long count, void *data) +{ + procfs_buffer_size = count; + if (procfs_buffer_size > PROCFS_MAX_SIZE ) { + procfs_buffer_size = PROCFS_MAX_SIZE; + } + + /* write data to the buffer */ + if ( copy_from_user(procfs_buffer, buffer, procfs_buffer_size) ) { + return -EFAULT; + } + + handle_request(); + + return procfs_buffer_size; +} + +/*** IRQ (GPIO) handling ***/ +static struct workqueue_struct *my_workqueue; +#define MY_WORK_QUEUE_NAME "GPIOed" + +static void handle_gpio(void* irq) +{ + int gpn = (int)irq; + printk(KERN_ERR "*** GPIO *** %d *** is *** %s ***\n", gpn, GET_GPIO(gpn) ? "high" : "low "); +} + +irqreturn_t gpio_irq(int irq, void *dev_id, struct pt_regs *regs) +{ + static int initialised = 0; + static struct work_struct task; + + if (initialised == 0) { + INIT_WORK(&task, handle_gpio); + initialised = 1; + } else { + PREPARE_WORK(&task, handle_gpio); + } + + queue_work(my_workqueue, &task); + + return IRQ_HANDLED; +} + +/*** GPIO R/W ***/ +static int gpio_get(int id) +{ + return GET_GPIO(id); +} + +static void gpio_set(int id, int on) +{ + do { + if (on) + GPSR(id) = GPIO_bit(id); + else + GPCR(id) = GPIO_bit(id); + } while (0); +} + +static int gpio_watch(int x) +{ + int ret; + ret = request_irq (IRQ_GPIO(x), gpio_irq, SA_SAMPLE_RANDOM, "test_handler", (void*)x); + set_irq_type (IRQ_GPIO(x), IRQT_BOTHEDGE); + if(ret!=0) { + printk(KERN_ERR "GPIOed: failed to register for GPIO %d\n", x); + return 1; + } else { + printk(KERN_ERR "GPIOed: Registered GPIO %d\n", x); + return 0; + } +} + +/*** Request handler ***/ +void handle_request() +{ + char *p = NULL; + unsigned long base = 10; + unsigned long id; + + if((procfs_buffer[0] == 'P') || (procfs_buffer[0] == 'V')) + base = 16; + id = simple_strtoul(procfs_buffer+2, &p, base); + switch(procfs_buffer[0]) { + case 'r': + printk(KERN_ERR "GPIOed: GPIO %lu is %s\n", id, gpio_get(id)?"high":"low "); + break; + case 's': + gpio_watch(id); + break; + case 'h': + gpio_set(id, 1); + printk(KERN_ERR "GPIOed: GPIO %lu set high\n", id); + break; + case 'l': + gpio_set(id, 0); + printk(KERN_ERR "GPIOed: GPIO %lu set low\n", id); + break; + case 'd': + printk(KERN_ERR "GPIOed: GPIO %lu is %s\n", id, GET_GPIO_REG(DR,id)?"output":"input"); + break; + + case 'P': + printk(KERN_ERR "GPIOed: P-V for 0x%x is 0x%x\n", id, (unsigned int)phys_to_virt(id)); + break; + case 'V': + printk(KERN_ERR "GPIOed: V-P for 0x%x is 0x%x\n", id, (unsigned int)virt_to_phys(id)); + break; + case 'D': + base = *((unsigned int*)id); + printk(KERN_ERR "GPIOed: 0x%x = 0x%x\n", id, base); + break; + default: + printk(KERN_ERR "GPIOed: Unknown request\n"); + break; + } +} + +/*** init&exit ***/ +static int __init gpioed_init(void) +{ + my_workqueue = create_workqueue(MY_WORK_QUEUE_NAME); + + proc_intf = create_proc_entry(procfs_name, 0644, NULL); + if (proc_intf == NULL) { + remove_proc_entry(procfs_name, &proc_root); + printk(KERN_ALERT "Error: Could not initialize /proc/%s\n", + procfs_name); + return -ENOMEM; + } + + proc_intf->read_proc = procfile_read; + proc_intf->write_proc = procfile_write; + proc_intf->owner = THIS_MODULE; + proc_intf->mode = S_IFREG | S_IRUGO; + proc_intf->uid = 0; + proc_intf->gid = 0; + proc_intf->size = 37; + + printk(KERN_INFO "/proc/%s created\n", procfs_name); + + return 0; +} + +static void __exit gpioed_exit(void) +{ + destroy_workqueue(my_workqueue); + remove_proc_entry(procfs_name, &proc_root); + printk(KERN_INFO "/proc/%s removed\n", procfs_name); +} + + +/*** Some more stuff ***/ +module_init(gpioed_init); +module_exit(gpioed_exit); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Vladimir \"Farcaller\" Pouzanov <far...@gm...>"); +MODULE_DESCRIPTION("GPIO editor for PXA26x"); + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bal...@us...> - 2007-02-27 10:43:06
|
Revision: 880 http://svn.sourceforge.net/hackndev/?rev=880&view=rev Author: balrog-kun Date: 2007-02-27 02:43:04 -0800 (Tue, 27 Feb 2007) Log Message: ----------- TT3: section mismatch fix and a new Kconfig dependency. Modified Paths: -------------- linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c linux4palm/linux/trunk/drivers/mmc/Kconfig linux4palm/linux/trunk/drivers/soc/tsc2101.c Modified: linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c =================================================================== --- linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c 2007-02-27 03:20:00 UTC (rev 879) +++ linux4palm/linux/trunk/drivers/i2c/chips/tps65010.c 2007-02-27 10:43:04 UTC (rev 880) @@ -471,7 +471,7 @@ static struct tps65010 *the_tps; -static int __exit tps65010_detach_client(struct i2c_client *client) +static int tps65010_detach_client(struct i2c_client *client) { struct tps65010 *tps; @@ -510,8 +510,7 @@ } /* no error returns, they'd just make bus scanning stop */ -static int __init -tps65010_probe(struct i2c_adapter *bus, int address, int kind) +static int tps65010_probe(struct i2c_adapter *bus, int address, int kind) { struct tps65010 *tps; int status; @@ -666,7 +665,7 @@ return 0; } -static int __init tps65010_scan_bus(struct i2c_adapter *bus) +static int tps65010_scan_bus(struct i2c_adapter *bus) { if (!i2c_check_functionality(bus, I2C_FUNC_SMBUS_BYTE_DATA)) return -EINVAL; Modified: linux4palm/linux/trunk/drivers/mmc/Kconfig =================================================================== --- linux4palm/linux/trunk/drivers/mmc/Kconfig 2007-02-27 03:20:00 UTC (rev 879) +++ linux4palm/linux/trunk/drivers/mmc/Kconfig 2007-02-27 10:43:04 UTC (rev 880) @@ -157,9 +157,10 @@ config MMC_WBSD_PALMT3 tristate "Winbond W86488Y on Palm T|T3 Interface support" depends on MMC + depends on TPS65010 select MMC_BLOCK help - This module let you use SD cards on Palm T|T3. + This module let you use SD cards on Palm T|T3. endmenu Modified: linux4palm/linux/trunk/drivers/soc/tsc2101.c =================================================================== --- linux4palm/linux/trunk/drivers/soc/tsc2101.c 2007-02-27 03:20:00 UTC (rev 879) +++ linux4palm/linux/trunk/drivers/soc/tsc2101.c 2007-02-27 10:43:04 UTC (rev 880) @@ -22,6 +22,7 @@ #include <linux/slab.h> #include <linux/soc/tsc2101.h> #include <linux/platform_device.h> +#include <linux/irq.h> #include <sound/control.h> #include <asm/arch/pxa-regs.h> #include <asm/arch/irqs.h> @@ -813,7 +814,7 @@ } -static int __init tsc2101_probe(struct device *dev) +static int tsc2101_probe(struct device *dev) { struct tsc2101_data *devdata; struct tsc2101_ts_event ts_data; @@ -855,7 +856,7 @@ } -static int __exit tsc2101_remove(struct device *dev) +static int tsc2101_remove(struct device *dev) { struct tsc2101_data *devdata = dev_get_drvdata(dev); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bal...@us...> - 2007-02-27 03:20:04
|
Revision: 879 http://svn.sourceforge.net/hackndev/?rev=879&view=rev Author: balrog-kun Date: 2007-02-26 19:20:00 -0800 (Mon, 26 Feb 2007) Log Message: ----------- TT3: tsc2101: SSP API usage fix. Modified Paths: -------------- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c =================================================================== --- linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c 2007-02-27 03:12:35 UTC (rev 878) +++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmt3/palmt3.c 2007-02-27 03:20:00 UTC (rev 879) @@ -156,16 +156,15 @@ GPCR0 = GPIO_bit(PALMT3_GPIO_TSC2101_SS); ssp_write_word(&palmt3_ssp_dev, command | read); - /* dummy read */ - ssp_read_word(&palmt3_ssp_dev, &ret); + ssp_read_word(&palmt3_ssp_dev, &ret); /* Dummy read */ - for (i=0; i < numval; i++) { + for (i = 0; i < numval; i++) { if (read) { ssp_write_word(&palmt3_ssp_dev, 0); - values[i]=ssp_read_word(&palmt3_ssp_dev, &ret); + ssp_read_word(&palmt3_ssp_dev, &values[i]); } else { ssp_write_word(&palmt3_ssp_dev, values[i]); - ssp_read_word(&palmt3_ssp_dev, &ret); + ssp_read_word(&palmt3_ssp_dev, &ret); /* Dummy read */ } } GPSR0 = GPIO_bit(PALMT3_GPIO_TSC2101_SS); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bal...@us...> - 2007-02-27 03:12:37
|
Revision: 878 http://svn.sourceforge.net/hackndev/?rev=878&view=rev Author: balrog-kun Date: 2007-02-26 19:12:35 -0800 (Mon, 26 Feb 2007) Log Message: ----------- TT3: tsc2101 and flash update and minor cleanup. Modified Paths: -------------- linux4palm/linux/trunk/drivers/mmc/wbsd-palmt3.c linux4palm/linux/trunk/drivers/mtd/maps/palmt3-flash.c linux4palm/linux/trunk/drivers/soc/tsc2101.c linux4palm/linux/trunk/include/linux/soc/tsc2101.h linux4palm/linux/trunk/sound/arm/pxa2xx-i2sound.h Modified: linux4palm/linux/trunk/drivers/mmc/wbsd-palmt3.c =================================================================== --- linux4palm/linux/trunk/drivers/mmc/wbsd-palmt3.c 2007-02-27 02:48:01 UTC (rev 877) +++ linux4palm/linux/trunk/drivers/mmc/wbsd-palmt3.c 2007-02-27 03:12:35 UTC (rev 878) @@ -1465,7 +1465,7 @@ if (!host->irq) return; -#define UREG(x) free_irq(IRQ_GPIO(x), (void*) x); +#define UREG(x) free_irq(IRQ_GPIO(x), (void *) x) UREG(2); UREG(8); Modified: linux4palm/linux/trunk/drivers/mtd/maps/palmt3-flash.c =================================================================== --- linux4palm/linux/trunk/drivers/mtd/maps/palmt3-flash.c 2007-02-27 02:48:01 UTC (rev 877) +++ linux4palm/linux/trunk/drivers/mtd/maps/palmt3-flash.c 2007-02-27 03:12:35 UTC (rev 878) @@ -10,7 +10,6 @@ * Thomas Gleixner <tg...@li...> */ -#include <linux/config.h> #include <linux/module.h> #include <linux/types.h> #include <linux/kernel.h> Modified: linux4palm/linux/trunk/drivers/soc/tsc2101.c =================================================================== --- linux4palm/linux/trunk/drivers/soc/tsc2101.c 2007-02-27 02:48:01 UTC (rev 877) +++ linux4palm/linux/trunk/drivers/soc/tsc2101.c 2007-02-27 03:12:35 UTC (rev 878) @@ -95,13 +95,14 @@ } } -static irqreturn_t tsc2101_headset_int(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t tsc2101_headset_int(int irq, void *dev_id) { tsc2101_set_route(); return IRQ_HANDLED; } -static int tsc2101_snd_activate(void) { +static int tsc2101_snd_activate(void) +{ u32 data; if(snd_data == NULL) @@ -135,11 +136,16 @@ tsc2101_regwrite(snd_data, TSC2101_REG_MICAGC, TSC2101_MMPGA(0) | TSC2101_MDEBNS(0x03) | TSC2101_MDEBSN(0x03) ); - //Hack - PalmOS sets that, so cleaning it + /* + * Hack - PalmOS sets that, so cleaning it. + * + * XXX: shouldn't we be just resetting the chip instead? + */ tsc2101_regwrite(snd_data, TSC2101_REG_HEADSETPGA, 0x0000); - data = request_irq (IRQ_GPIO(55), tsc2101_headset_int, SA_SAMPLE_RANDOM, "TSC2101 Headphones", (void*)55); - set_irq_type (IRQ_GPIO(55), IRQT_RISING); + data = request_irq(IRQ_GPIO(55), tsc2101_headset_int, + SA_INTERRUPT | SA_TRIGGER_RISING, + "TSC2101 Headphones", (void *) 55); if(data) return data; @@ -148,12 +154,14 @@ return 0; } -static void tsc2101_snd_deactivate(void) { +static void tsc2101_snd_deactivate(void) +{ snd_pxa2xx_i2sound_i2slink_free(); - free_irq(IRQ_GPIO(55), (void*) 55); + free_irq(IRQ_GPIO(55), (void *) 55); } -static int tsc2101_snd_set_rate(unsigned int rate) { +static int tsc2101_snd_set_rate(unsigned int rate) +{ uint div, fs_44; u32 data; @@ -529,39 +537,54 @@ return 0; } +#ifdef CONFIG_PM +static int tsc2101_snd_suspend(pm_message_t state) +{ + tsc2101_snd_deactivate(); + return 0; +} + +static int tsc2101_snd_resume(void) +{ + return tsc2101_snd_activate(); +} +#else +# define tsc2101_snd_suspend 0 +# define tsc2101_snd_resume 0 +#endif + static struct snd_pxa2xx_i2sound_board tsc2101_audio = { - .name = "tsc2101 Audio", - .desc = "TI tsc2101 Audio driver", - .acard_id = "tsc2101", - .info = SND_PXA2xx_I2SOUND_INFO_CAN_CAPTURE | SND_PXA2xx_I2SOUND_INFO_CLOCK_FROM_PXA | - SND_PXA2xx_I2SOUND_INFO_SYSCLOCK_DISABLE, - .activate = tsc2101_snd_activate, - .deactivate = tsc2101_snd_deactivate, - .set_rate = tsc2101_snd_set_rate, - .open_stream = tsc2101_snd_open_stream, - .close_stream = tsc2101_snd_close_stream, - .add_mixer_controls = tsc2101_snd_add_mixer_controls, + .name = "tsc2101 Audio", + .desc = "TI tsc2101 Audio driver", + .acard_id = "tsc2101", + .info = SND_PXA2xx_I2SOUND_INFO_CAN_CAPTURE | + SND_PXA2xx_I2SOUND_INFO_CLOCK_FROM_PXA | + SND_PXA2xx_I2SOUND_INFO_SYSCLOCK_DISABLE, + .activate = tsc2101_snd_activate, + .deactivate = tsc2101_snd_deactivate, + .set_rate = tsc2101_snd_set_rate, + .open_stream = tsc2101_snd_open_stream, + .close_stream = tsc2101_snd_close_stream, + .add_mixer_controls = tsc2101_snd_add_mixer_controls, - .streams_hw = { - { - .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 | - SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | - SNDRV_PCM_RATE_48000, + .streams_hw = { + { + .rates = SNDRV_PCM_RATE_8000 | + SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | + SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000, .rate_min = 8000, .rate_max = 48000, - }, - { - .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 | - SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 | - SNDRV_PCM_RATE_48000, + }, + { + .rates = SNDRV_PCM_RATE_8000 | + SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | + SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000, .rate_min = 8000, .rate_max = 48000, - } - }, -#ifdef CONFIG_PM - .suspend = tsc2101_snd_activate, - .resume = tsc2101_snd_deactivate -#endif + } + }, + .suspend = tsc2101_snd_suspend, + .resume = tsc2101_snd_resume, }; @@ -570,9 +593,11 @@ */ extern void tsc2101_ts_setup(struct device *dev); -extern void tsc2101_ts_report(struct tsc2101_data *devdata, int x, int y, int p, int pendown); +extern void tsc2101_ts_report(struct tsc2101_data *devdata, + int x, int y, int p, int pendown); -static void tsc2101_readdata(struct tsc2101_data *devdata, struct tsc2101_ts_event *ts_data) +static void tsc2101_readdata(struct tsc2101_data *devdata, + struct tsc2101_ts_event *ts_data) { int z1,z2,fixadc=0; u32 values[4],status; @@ -689,7 +714,7 @@ devdata->pendown = 0; - set_irq_type(devdata->platform->irq,IRQT_FALLING); + set_irq_type(devdata->platform->irq, IRQT_FALLING); /* This must be checked after set_irq_type() to make sure no data was missed */ if (devdata->platform->pendown()) { @@ -712,8 +737,8 @@ static irqreturn_t tsc2101_handler(int irq, void *dev_id, struct pt_regs *regs) { struct tsc2101_data *devdata = dev_id; - - set_irq_type(devdata->platform->irq,IRQT_NOEDGE); + + set_irq_type(devdata->platform->irq, IRQT_NOEDGE); ts_interrupt_main(devdata, 0, regs); return IRQ_HANDLED; } @@ -818,7 +843,7 @@ tsc2101_ts_setup(dev); tsc2101_ts_enable(devdata); - set_irq_type(devdata->platform->irq,IRQT_FALLING); + set_irq_type(devdata->platform->irq, IRQT_FALLING); /* Check there is no pending data */ tsc2101_readdata(devdata, &ts_data); Modified: linux4palm/linux/trunk/include/linux/soc/tsc2101.h =================================================================== --- linux4palm/linux/trunk/include/linux/soc/tsc2101.h 2007-02-27 02:48:01 UTC (rev 877) +++ linux4palm/linux/trunk/include/linux/soc/tsc2101.h 2007-02-27 03:12:35 UTC (rev 878) @@ -42,7 +42,3 @@ int irq; int (*pendown) (void); }; - - - - Modified: linux4palm/linux/trunk/sound/arm/pxa2xx-i2sound.h =================================================================== --- linux4palm/linux/trunk/sound/arm/pxa2xx-i2sound.h 2007-02-27 02:48:01 UTC (rev 877) +++ linux4palm/linux/trunk/sound/arm/pxa2xx-i2sound.h 2007-02-27 03:12:35 UTC (rev 878) @@ -55,8 +55,8 @@ #ifdef CONFIG_PM /* Power Management */ - int (*suspend) (pm_message_t state); - int (*resume) (void); + int (*suspend)(pm_message_t state); + int (*resume)(void); #endif }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bal...@us...> - 2007-02-27 02:48:06
|
Revision: 877 http://svn.sourceforge.net/hackndev/?rev=877&view=rev Author: balrog-kun Date: 2007-02-26 18:48:01 -0800 (Mon, 26 Feb 2007) Log Message: ----------- TT3: MMC: work_queue and irq API updates. Modified Paths: -------------- linux4palm/linux/trunk/drivers/mmc/wbsd-palmt3.c Modified: linux4palm/linux/trunk/drivers/mmc/wbsd-palmt3.c =================================================================== --- linux4palm/linux/trunk/drivers/mmc/wbsd-palmt3.c 2007-02-27 02:30:14 UTC (rev 876) +++ linux4palm/linux/trunk/drivers/mmc/wbsd-palmt3.c 2007-02-27 02:48:01 UTC (rev 877) @@ -11,7 +11,6 @@ * */ -#include <linux/config.h> #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/init.h> @@ -673,19 +672,15 @@ static void wbsd_prepare_data(struct mmc_data* data) { - u16 blksize; - //u16 ier; - //unsigned long dmaflags; - DBGF("blksz %04x blks %04x flags %08x\n", - 1 << data->blksz_bits, data->blocks, data->flags); + data->blksz, data->blocks, data->flags); DBGF("tsac %d ms nsac %d clk\n", data->timeout_ns / 1000000, data->timeout_clks); /* * Calculate size. */ - host->size = data->blocks << data->blksz_bits; + host->size = data->blocks * data->blksz; /* * Check timeout values for overflow. @@ -708,13 +703,11 @@ * sent. It needs this to determine when to * calculate CRC. */ - blksize = (1 << data->blksz_bits); - wbsd_write_idx_reg(WBIR_MDFR, (blksize & 0x0FFF) | 0x0000); - //wbsd_write_wb_index(WBIR_SDFR, (blksize & 0x0FFF) | 0x0000); - + wbsd_write_idx_reg(WBIR_MDFR, (data->blksz & 0x0FFF) | 0x0000); + //wbsd_write_wb_index(WBIR_MDFR, 0x0008); //wbsd_write_wb_index(WBIR_SDFR, 0x0008); - + wbsd_write_idx_reg(WBIR_MDCB, data->blocks & 0x01FF); //wbsd_write_wb_index(WBIR_SDCB, data->blocks & 0x01FF); @@ -1263,16 +1256,14 @@ spin_unlock(&host->lock); } -static void wbsd_tasklet_tps(void *param) +static void wbsd_tasklet_tps(struct work_struct *work) { - if(host->tps_duty & TPS_POWER_OFF) { DBG("Powering down card\n"); tps65010_set_gpio_out_value(GPIO3, LOW); } - else - if(host->tps_duty & TPS_POWER_ON) + else if(host->tps_duty & TPS_POWER_ON) { DBG("Powering card up\n"); tps65010_set_gpio_out_value(GPIO3, HIGH); @@ -1283,8 +1274,7 @@ DBG("Turning led off\n"); tps65010_set_led(LED2, OFF); } - else - if(host->tps_duty & TPS_LED_ON) + else if(host->tps_duty & TPS_LED_ON) { DBG("Blinking led\n"); tps65010_set_led(LED2, ON); @@ -1297,7 +1287,7 @@ * Interrupt handling */ -static irqreturn_t wbsd_irq(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t wbsd_irq(int irq, void *dev_id) { u16 isr; @@ -1439,18 +1429,21 @@ * Allocate interrupt. */ -#define REG(x) ret = request_irq (IRQ_GPIO(x), wbsd_irq, SA_SAMPLE_RANDOM, DRIVER_NAME, (void*)x);\ - set_irq_type (IRQ_GPIO(x), IRQT_BOTHEDGE);\ - if (ret)\ +#define REG(x) \ + ret = request_irq(IRQ_GPIO(x), wbsd_irq, \ + SA_INTERRUPT | SA_TRIGGER_RISING | \ + SA_TRIGGER_FALLING, DRIVER_NAME, (void *) x); \ + if (ret) \ return ret; - //Chip interrupt - ret = request_irq (IRQ_GPIO(8), wbsd_irq, SA_SAMPLE_RANDOM, DRIVER_NAME, (void*)8); - set_irq_type (IRQ_GPIO(8), IRQT_FALLING); + /* Chip interrupt */ + ret = request_irq(IRQ_GPIO(8), wbsd_irq, + SA_INTERRUPT | SA_TRIGGER_FALLING, + DRIVER_NAME, (void *) 8); if (ret) return ret; - //Card insert/release + /* Card insert/release */ REG(2); host->irq = 8; @@ -1462,7 +1455,7 @@ tasklet_init(&host->crc_tasklet, wbsd_tasklet_crc, (unsigned long)host); tasklet_init(&host->timeout_tasklet, wbsd_tasklet_timeout, (unsigned long)host); tasklet_init(&host->finish_tasklet, wbsd_tasklet_finish, (unsigned long)host); - INIT_WORK(&host->tps_work, wbsd_tasklet_tps, NULL); + INIT_WORK(&host->tps_work, wbsd_tasklet_tps); return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |