diff --git a/arch/arm/configs/htckaiser_defconfig b/arch/arm/configs/htckaiser_defconfig new file mode 100644 index 0000000..a418c6e --- /dev/null +++ b/arch/arm/configs/htckaiser_defconfig @@ -0,0 +1,769 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.24 +# Sun May 18 17:21:36 2008 +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +# CONFIG_GENERIC_GPIO is not set +CONFIG_GENERIC_TIME=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_MMU=y +# CONFIG_NO_IOPORT is not set +CONFIG_GENERIC_HARDIRQS=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=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_ZONE_DMA=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +# CONFIG_SYSVIPC is not set +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_USER_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_AUDIT is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=17 +# CONFIG_CGROUPS is not set +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_FAIR_USER_SCHED=y +# CONFIG_FAIR_CGROUP_SCHED is not set +CONFIG_SYSFS_DEPRECATED=y +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_PANIC_TIMEOUT=0 +# CONFIG_EMBEDDED is not set +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# 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_ANON_INODES=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +# CONFIG_ASHMEM is not set +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_SLAB=y +# CONFIG_SLUB is not set +# CONFIG_SLOB is not set +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +# CONFIG_MODULES is not set +CONFIG_BLOCK=y +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set +# CONFIG_BLK_DEV_BSG is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_DEFAULT_AS=y +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="anticipatory" + +# +# System Type +# +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_GOLDFISH 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_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_NS9XXX is not set +# CONFIG_ARCH_MXC is not set +# CONFIG_ARCH_PNX4008 is not set +# CONFIG_ARCH_PXA is not set +# 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_DAVINCI is not set +# CONFIG_ARCH_OMAP is not set +CONFIG_ARCH_MSM7X00A=y + +# +# Boot options +# + +# +# Power management +# + +# +# MSM7X00A Board Type +# +# CONFIG_MACH_HALIBUT is not set +CONFIG_MSM7X00=y +# CONFIG_MACH_HTCVOGUE is not set +CONFIG_MACH_HTCKAISER=y +# CONFIG_MACH_HTCTITAN is not set +CONFIG_MSM_KAISERSMD=y +# CONFIG_MSM_7X00SMD is not set +# CONFIG_MSM_LL_DEBUG_UART1 is not set +# CONFIG_MSM_LL_DEBUG_UART2 is not set +# CONFIG_MSM_LL_DEBUG_UART3 is not set +CONFIG_MSM_LL_DEBUG_NONE=y +# CONFIG_MSM7X00A_IDLE is not set +# CONFIG_MSM7X00A_SLEEP_MODE_POWER_COLLAPSE_SUSPEND is not set +# CONFIG_MSM7X00A_SLEEP_MODE_POWER_COLLAPSE is not set +# CONFIG_MSM7X00A_SLEEP_MODE_APPS_SLEEP is not set +# CONFIG_MSM7X00A_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT is not set +CONFIG_MSM7X00A_SLEEP_WAIT_FOR_INTERRUPT=y +CONFIG_MSM7X00A_SLEEP_MODE=4 +CONFIG_MSM_FIQ_SUPPORT=y +# CONFIG_MSM_SERIAL_DEBUGGER is not set +# CONFIG_MSM_SMD is not set +# CONFIG_MSM_HW3D is not set +# CONFIG_MSM_ADSP is not set +# CONFIG_MSM_PERF is not set + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_V6=y +# CONFIG_CPU_32v6K is not set +CONFIG_CPU_32v6=y +CONFIG_CPU_ABRT_EV6=y +CONFIG_CPU_CACHE_V6=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V6=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +# CONFIG_OUTER_CACHE is not set + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +# CONFIG_ARCH_SUPPORTS_MSI is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_PREEMPT=y +CONFIG_HZ=100 +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# 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_SPARSEMEM_VMEMMAP_ENABLE is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_RESOURCES_64BIT=y +CONFIG_ZONE_DMA_FLAG=1 +CONFIG_BOUNCE=y +CONFIG_VIRT_TO_BUS=y +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="" +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +# CONFIG_VFP 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 is not set +CONFIG_SUSPEND_UP_POSSIBLE=y + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_PACKET is not set +CONFIG_UNIX=y +# 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 is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# 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 +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# 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 +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set + +# +# Wireless +# +# CONFIG_CFG80211 is not set +# CONFIG_WIRELESS_EXT is not set +# CONFIG_MAC80211 is not set +# CONFIG_IEEE80211 is not set +# CONFIG_RFKILL is not set +# CONFIG_NET_9P is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +# CONFIG_MTD is not set +# CONFIG_PARPORT is not set +# CONFIG_BLK_DEV is not set +# CONFIG_MISC_DEVICES is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +# CONFIG_SCSI is not set +# CONFIG_SCSI_DMA is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_ATA is not set +# CONFIG_MD is not set +CONFIG_NETDEVICES=y +# CONFIG_ISDN is not set +CONFIG_PPP=y +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set +CONFIG_PPP_ASYNC=y +# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_DEFLATE=y +CONFIG_PPP_BSDCOMP=y +# CONFIG_PPP_MPPE is not set +# CONFIG_PPPOE is not set +# CONFIG_PPPOL2TP is not set +# CONFIG_SLIP is not set +CONFIG_SLHC=y +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_MSM_RMNET is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set +# CONFIG_INPUT_POLLDEV 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=240 +# CONFIG_INPUT_JOYDEV is not set +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 is not set +# CONFIG_KEYBOARD_GOLDFISH_EVENTS is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_FUJITSU is not set +# 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_SYNAPTICS_I2C_RMI=y +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +# CONFIG_TOUCHSCREEN_UCB1400 is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_UINPUT is not set +CONFIG_INPUT_GPIO=y + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_MSM=y +CONFIG_SERIAL_MSM_CONSOLE=y +CONFIG_UNIX98_PTYS=y +# CONFIG_LEGACY_PTYS is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_NVRAM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_DEVMEM is not set +# CONFIG_DCC_TTY is not set +# CONFIG_GOLDFISH_TTY is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_CHARDEV=y + +# +# I2C Algorithms +# +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# +CONFIG_I2C_MSM=y +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_TAOS_EVM is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_DS1337 is not set +# CONFIG_SENSORS_DS1374 is not set +# CONFIG_DS1682 is not set +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_MAX6875 is not set +# CONFIG_SENSORS_TSL2550 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 +# CONFIG_W1 is not set +# CONFIG_POWER_SUPPLY is not set +# CONFIG_HWMON is not set +# CONFIG_WATCHDOG is not set + +# +# Sonics Silicon Backplane +# +CONFIG_SSB_POSSIBLE=y +# CONFIG_SSB is not set + +# +# Multifunction device drivers +# +# CONFIG_MFD_SM501 is not set +CONFIG_HTC_EGPIO=y + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set +# CONFIG_DVB_CORE is not set +CONFIG_DAB=y + +# +# Graphics support +# +# CONFIG_VGASTATE is not set +CONFIG_VIDEO_OUTPUT_CONTROL=y +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_SYS_FOPS is not set +CONFIG_FB_DEFERRED_IO=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_TILEBLITTING=y + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +CONFIG_FB_MSM=y +# CONFIG_FB_GOLDFISH is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +# CONFIG_FONT_8x16 is not set +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +CONFIG_FONT_MINI_4x6=y +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set +# CONFIG_LOGO is not set + +# +# Sound +# +# CONFIG_SOUND is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +# CONFIG_HID_DEBUG is not set +# CONFIG_HIDRAW is not set +# CONFIG_USB_SUPPORT is not set +# CONFIG_MMC is not set +# CONFIG_NEW_LEDS is not set +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set + +# +# Android +# +CONFIG_ANDROID_PMEM=y +CONFIG_ANDROID_BINDER_IPC=y +CONFIG_ANDROID_LOGGER=y +# CONFIG_ANDROID_RAM_CONSOLE is not set +# CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION is not set + +# +# File systems +# +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_EXT4DEV_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set +# CONFIG_XFS_FS 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=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# 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_CONFIGFS_FS is not set + +# +# 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_CRAMFS 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_NETWORK_FILESYSTEMS=y +# CONFIG_NFS_FS is not set +# CONFIG_NFSD is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_NLS is not set +# CONFIG_DLM is not set +# CONFIG_INSTRUMENTATION is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +CONFIG_DETECT_SOFTLOCKUP=y +CONFIG_SCHED_DEBUG=y +CONFIG_SCHEDSTATS=y +# CONFIG_TIMER_STATS is not set +# CONFIG_DEBUG_SLAB is not set +CONFIG_DEBUG_PREEMPT=y +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +CONFIG_DEBUG_MUTEXES=y +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +CONFIG_DEBUG_SPINLOCK_SLEEP=y +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_DEBUG_SG is not set +CONFIG_FRAME_POINTER=y +# CONFIG_FORCED_INLINING is not set +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_SAMPLES is not set +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_ERRORS is not set +CONFIG_DEBUG_LL=y +# CONFIG_DEBUG_ICEDCC is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITY_FILE_CAPABILITIES is not set +# CONFIG_CRYPTO is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_CRC_CCITT=y +# CONFIG_CRC16 is not set +# CONFIG_CRC_ITU_T is not set +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_PLIST=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y \ No newline at end of file diff --git a/arch/arm/configs/htcpolaris_defconfig b/arch/arm/configs/htcpolaris_defconfig new file mode 100644 index 0000000..ce109f1 --- /dev/null +++ b/arch/arm/configs/htcpolaris_defconfig @@ -0,0 +1,789 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.24 +# Sun May 18 17:21:36 2008 +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +# CONFIG_GENERIC_GPIO is not set +CONFIG_GENERIC_TIME=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_MMU=y +# CONFIG_NO_IOPORT is not set +CONFIG_GENERIC_HARDIRQS=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=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_ZONE_DMA=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +# CONFIG_SYSVIPC is not set +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_USER_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_AUDIT is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=17 +# CONFIG_CGROUPS is not set +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_FAIR_USER_SCHED=y +# CONFIG_FAIR_CGROUP_SCHED is not set +CONFIG_SYSFS_DEPRECATED=y +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_PANIC_TIMEOUT=0 +# CONFIG_EMBEDDED is not set +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# 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_ANON_INODES=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_ASHMEM=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_SLAB=y +# CONFIG_SLUB is not set +# CONFIG_SLOB is not set +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +# CONFIG_MODULES is not set +CONFIG_BLOCK=y +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set +# CONFIG_BLK_DEV_BSG is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_DEFAULT_AS=y +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="anticipatory" + +# +# System Type +# +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_GOLDFISH 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_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_NS9XXX is not set +# CONFIG_ARCH_MXC is not set +# CONFIG_ARCH_PNX4008 is not set +# CONFIG_ARCH_PXA is not set +# 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_DAVINCI is not set +# CONFIG_ARCH_OMAP is not set +CONFIG_ARCH_MSM7X00A=y + +# +# Boot options +# + +# +# Power management +# + +# +# MSM7X00A Board Type +# +# CONFIG_MACH_HALIBUT is not set +CONFIG_MSM7X00=y +# CONFIG_MACH_HTCVOGUE is not set +# CONFIG_MACH_HTCKAISER is not set +# CONFIG_MACH_HTCTITAN is not set +CONFIG_MACH_HTCPOLARIS=y +# CONFIG_MSM_KAISERSMD is not set +# CONFIG_MSM_7X00SMD is not set +# CONFIG_MSM_LL_DEBUG_UART1 is not set +# CONFIG_MSM_LL_DEBUG_UART2 is not set +# CONFIG_MSM_LL_DEBUG_UART3 is not set +CONFIG_MSM_LL_DEBUG_NONE=y +# CONFIG_MSM7X00A_IDLE is not set +# CONFIG_MSM7X00A_SLEEP_MODE_POWER_COLLAPSE_SUSPEND is not set +# CONFIG_MSM7X00A_SLEEP_MODE_POWER_COLLAPSE is not set +# CONFIG_MSM7X00A_SLEEP_MODE_APPS_SLEEP is not set +# CONFIG_MSM7X00A_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT is not set +CONFIG_MSM7X00A_SLEEP_WAIT_FOR_INTERRUPT=y +CONFIG_MSM7X00A_SLEEP_MODE=4 +CONFIG_MSM_FIQ_SUPPORT=y +# CONFIG_MSM_SERIAL_DEBUGGER is not set +# CONFIG_MSM_SMD is not set +# CONFIG_MSM_HW3D is not set +# CONFIG_MSM_ADSP is not set +# CONFIG_MSM_PERF is not set + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_V6=y +# CONFIG_CPU_32v6K is not set +CONFIG_CPU_32v6=y +CONFIG_CPU_ABRT_EV6=y +CONFIG_CPU_CACHE_V6=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V6=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +# CONFIG_OUTER_CACHE is not set + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +# CONFIG_ARCH_SUPPORTS_MSI is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_PREEMPT=y +CONFIG_HZ=100 +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# 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_SPARSEMEM_VMEMMAP_ENABLE is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_RESOURCES_64BIT=y +CONFIG_ZONE_DMA_FLAG=1 +CONFIG_BOUNCE=y +CONFIG_VIRT_TO_BUS=y +CONFIG_ALIGNMENT_TRAP=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="" +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +# CONFIG_VFP 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 is not set +CONFIG_SUSPEND_UP_POSSIBLE=y + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +# CONFIG_PACKET is not set +CONFIG_UNIX=y +# 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 is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# 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 +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# 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 +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set + +# +# Wireless +# +# CONFIG_CFG80211 is not set +# CONFIG_WIRELESS_EXT is not set +# CONFIG_MAC80211 is not set +# CONFIG_IEEE80211 is not set +# CONFIG_RFKILL is not set +# CONFIG_NET_9P is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +# CONFIG_MTD is not set +# CONFIG_PARPORT is not set +# CONFIG_BLK_DEV is not set +# CONFIG_MISC_DEVICES is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +# CONFIG_SCSI is not set +# CONFIG_SCSI_DMA is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_ATA is not set +# CONFIG_MD is not set +CONFIG_NETDEVICES=y +# CONFIG_ISDN is not set + +CONFIG_PPP=y +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set +CONFIG_PPP_ASYNC=y +# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_DEFLATE=y +CONFIG_PPP_BSDCOMP=y +# CONFIG_PPP_MPPE is not set +# CONFIG_PPPOE is not set +# CONFIG_PPPOL2TP is not set +# CONFIG_SLIP is not set +CONFIG_SLHC=y +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_MSM_RMNET is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set +# CONFIG_INPUT_POLLDEV 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=240 +# CONFIG_INPUT_JOYDEV is not set +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 is not set +# CONFIG_KEYBOARD_GOLDFISH_EVENTS is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_FUJITSU is not set +# 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_SYNAPTICS_I2C_RMI=y +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +# CONFIG_TOUCHSCREEN_UCB1400 is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_UINPUT is not set +CONFIG_INPUT_GPIO=y + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_MSM=y +CONFIG_SERIAL_MSM_CONSOLE=y +CONFIG_UNIX98_PTYS=y +# CONFIG_LEGACY_PTYS is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_NVRAM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_DEVMEM is not set +# CONFIG_DCC_TTY is not set +# CONFIG_GOLDFISH_TTY is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_CHARDEV=y + +# +# I2C Algorithms +# +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# +CONFIG_I2C_MSM=y +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_TAOS_EVM is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_DS1337 is not set +# CONFIG_SENSORS_DS1374 is not set +# CONFIG_DS1682 is not set +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_MAX6875 is not set +# CONFIG_SENSORS_TSL2550 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 +# CONFIG_W1 is not set +# CONFIG_POWER_SUPPLY is not set +# CONFIG_HWMON is not set +# CONFIG_WATCHDOG is not set + +# +# Sonics Silicon Backplane +# +CONFIG_SSB_POSSIBLE=y +# CONFIG_SSB is not set + +# +# Multifunction device drivers +# +# CONFIG_MFD_SM501 is not set +CONFIG_HTC_EGPIO=y + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set +# CONFIG_DVB_CORE is not set +CONFIG_DAB=y + +# +# Graphics support +# +# CONFIG_VGASTATE is not set +CONFIG_VIDEO_OUTPUT_CONTROL=y +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_SYS_FOPS is not set +CONFIG_FB_DEFERRED_IO=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_TILEBLITTING=y + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +CONFIG_FB_MSM=y +# CONFIG_FB_GOLDFISH is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +# CONFIG_FONT_8x16 is not set +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +CONFIG_FONT_MINI_4x6=y +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set +# CONFIG_LOGO is not set + +# +# Sound +# +# CONFIG_SOUND is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +# CONFIG_HID_DEBUG is not set +# CONFIG_HIDRAW is not set +# CONFIG_USB_SUPPORT is not set +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_UNSAFE_RESUME is not set +CONFIG_MMC_EMBEDDED_SDIO=y + +# +# MMC/SD Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_BOUNCE=y +# CONFIG_SDIO_UART is not set + +# +# MMC/SD Host Controller Drivers +# +CONFIG_MMC_MSM7X00A=y +CONFIG_MSMSDCC_TRACE=y +#CONFIG_NEW_LEDS is not set + +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set + +# +# Android +# +CONFIG_ANDROID_PMEM=y +CONFIG_ANDROID_BINDER_IPC=y +CONFIG_ANDROID_LOGGER=y +# CONFIG_ANDROID_RAM_CONSOLE is not set +# CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION is not set + +# +# File systems +# +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_EXT4DEV_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set +# CONFIG_XFS_FS 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=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_MSDOS_FS is not set +CONFIG_VFAT_FS=y +# 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_CONFIGFS_FS is not set + +# +# 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_CRAMFS 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_NETWORK_FILESYSTEMS=y +# CONFIG_NFS_FS is not set +# CONFIG_NFSD is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_NLS is not set +# CONFIG_DLM is not set +# CONFIG_INSTRUMENTATION is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +CONFIG_DETECT_SOFTLOCKUP=y +CONFIG_SCHED_DEBUG=y +CONFIG_SCHEDSTATS=y +# CONFIG_TIMER_STATS is not set +# CONFIG_DEBUG_SLAB is not set +CONFIG_DEBUG_PREEMPT=y +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +CONFIG_DEBUG_MUTEXES=y +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +CONFIG_DEBUG_SPINLOCK_SLEEP=y +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_DEBUG_SG is not set +CONFIG_FRAME_POINTER=y +# CONFIG_FORCED_INLINING is not set +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_SAMPLES is not set +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_ERRORS is not set +CONFIG_DEBUG_LL=y +# CONFIG_DEBUG_ICEDCC is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITY_FILE_CAPABILITIES is not set +# CONFIG_CRYPTO is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_CRC_CCITT=y +# CONFIG_CRC16 is not set +# CONFIG_CRC_ITU_T is not set +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_PLIST=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y diff --git a/arch/arm/mach-msm/7x00-irq.c b/arch/arm/mach-msm/7x00-irq.c new file mode 100644 index 0000000..176dff4 --- /dev/null +++ b/arch/arm/mach-msm/7x00-irq.c @@ -0,0 +1,205 @@ +/* linux/arch/arm/mach-msm/7x00-irq.c + * Author: Martin Johnson + * Based on irq.c by Brian Swetland + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include + +#define VIC_REG(off) (MSM_VIC_BASE + (off)) + +// just a guess but it works + +#define VIC_INT_0 VIC_REG(0x0000) +#define VIC_INT_1 VIC_REG(0x0004) + +#define VIC_INT_EN0 VIC_REG(0x0028) +#define VIC_INT_EN1 VIC_REG(0x002c) + +#define VIC_INT_CLEAR0 VIC_REG(0x0018) +#define VIC_INT_CLEAR1 VIC_REG(0x001c) + +#define VIC_INT_MASK0 VIC_REG(0x0040) +#define VIC_INT_MASK1 VIC_REG(0x0044) + +// these are wrong +#define VIC_INT_POLARITY0 VIC_REG(0x0070) +#define VIC_INT_POLARITY1 VIC_REG(0x0074) + +#define VIC_INT_TYPE0 VIC_REG(0x0070) +#define VIC_INT_TYPE1 VIC_REG(0x0074) + + +static uint32_t msm_irq_wake_enable[2]; +static struct { + uint32_t int_en; + uint32_t int_type; + uint32_t int_polarity; +} msm_irq_shadow_reg[2]; + +static void msm_irq_ack(unsigned int irq) +{ + unsigned reg = VIC_INT_CLEAR0 + ((irq & 32) ? 4 : 0); + irq = 1 << (irq & 31); + writel(irq, reg); +} + +static void msm_irq_mask(unsigned int irq) +{ + unsigned reg = VIC_INT_MASK0 + ((irq & 32) ? 4 : 0); + unsigned index = (irq >> 5) & 1; + uint32_t mask = 1UL << (irq & 31); + msm_irq_shadow_reg[index].int_en &= ~mask; + writel(mask, reg); +} + +static void msm_irq_unmask(unsigned int irq) +{ + unsigned reg = VIC_INT_EN0 + ((irq & 32) ? 4 : 0); + unsigned index = (irq >> 5) & 1; + uint32_t mask = 1UL << (irq & 31); + msm_irq_shadow_reg[index].int_en |= mask; + writel(readl(reg) | mask, reg); +} + +static int msm_irq_set_wake(unsigned int irq, unsigned int on) +{ + unsigned index = (irq >> 5) & 1; + uint32_t mask = 1UL << (irq & 31); + if (on) + msm_irq_wake_enable[index] |= mask; + else + msm_irq_wake_enable[index] &= ~mask; + return 0; +} + +static int msm_irq_set_type(unsigned int irq, unsigned int flow_type) +{ + printk("set_type %d %d\n",irq,flow_type); + unsigned treg = VIC_INT_TYPE0 + ((irq & 32) ? 4 : 0); + unsigned preg = VIC_INT_POLARITY0 + ((irq & 32) ? 4 : 0); + unsigned index = (irq >> 5) & 1; + int b = 1 << (irq & 31); + uint32_t polarity; + uint32_t type; + + polarity = msm_irq_shadow_reg[index].int_polarity; + if (flow_type & (IRQF_TRIGGER_FALLING | IRQF_TRIGGER_LOW)) + polarity |= b; + if (flow_type & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_HIGH)) + polarity &= ~b; + //writel(polarity, preg); + msm_irq_shadow_reg[index].int_polarity = polarity; + + type = msm_irq_shadow_reg[index].int_type; + if (flow_type & (IRQF_TRIGGER_RISING)) { // | IRQF_TRIGGER_FALLING)) { + type |= b; + // irq_desc[irq].handle_irq = handle_edge_irq; + } + /* + if (flow_type & (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW)) { + type &= ~b; + irq_desc[irq].handle_irq = handle_level_irq; + } + */ + writel(type, treg); + msm_irq_shadow_reg[index].int_type = type; + return 0; + return 0; +} + +void msm_irq_enter_sleep(bool arm9_wake) +{ + writel(0, VIC_INT_EN0); + writel(0, VIC_INT_EN1); + + /* + if (arm9_wake) { + msm_irq_set_type(INT_A9_M2A_6, IRQF_TRIGGER_RISING); + writel(1U << INT_A9_M2A_6, VIC_INT_EN0); + } else { + writel(msm_irq_wake_enable[0], VIC_INT_EN0); + writel(msm_irq_wake_enable[1], VIC_INT_EN1); + } + */ + writel(1U<<3, VIC_INT_EN0); // enable modem irq + writel(2,VIC_INT_EN1); // enable gpio irq +// disable_irq(33+64); +} + +void msm_irq_exit_sleep(void) +{ + int i; + msm_irq_ack(INT_A9_M2A_6); + for (i = 0; i < 2; i++) { +// writel(msm_irq_shadow_reg[i].int_type, VIC_INT_TYPE0 + i * 4); +// writel(msm_irq_shadow_reg[i].int_polarity, VIC_INT_POLARITY0 + i * 4); + writel(msm_irq_shadow_reg[i].int_en, VIC_INT_EN0 + i * 4); +// writel(msm_irq_shadow_reg[i].int_select, VIC_INT_SELECT0 + i * 4); + } +// enable_irq(33+64); +} + +static struct irq_chip msm_irq_chip = { + .name = "msm", + .ack = msm_irq_ack, + .mask = msm_irq_mask, + .unmask = msm_irq_unmask, + .set_wake = msm_irq_set_wake, + .set_type = msm_irq_set_type, +}; + +void __init msm_init_irq(void) +{ + unsigned n; + /* disable all INTs */ + writel(0, VIC_INT_EN0); + writel(0, VIC_INT_EN1); + // clear any pending ints + writel(-1, VIC_INT_CLEAR0); + writel(-1, VIC_INT_CLEAR1); + + // set correct triggering for interrupts 0-7 + // edge or level, positive or nagative, who knows! + writel(/*readl(VIC_INT_TYPE0)*/0 | 0xff,VIC_INT_TYPE0); + // writel(0xff,VIC_INT_TYPE0); + // writel(0,VIC_INT_TYPE1); + msm_irq_shadow_reg[0].int_type=readl(VIC_INT_TYPE0); + msm_irq_shadow_reg[1].int_type=readl(VIC_INT_TYPE1); + + /* + writel(-1,VIC_INT_POLARITY0); + writel(-1,VIC_INT_POLARITY1); + */ +// writel(-1,VIC_INT_TYPE0); // if set this triggers on rising otherwise rising and falling +// writel(-1,VIC_INT_TYPE1); + + + for (n = 0; n < NR_MSM_IRQS; n++) { + set_irq_chip(n, &msm_irq_chip); + set_irq_handler(n, handle_level_irq); + set_irq_flags(n, IRQF_VALID); + } +} diff --git a/arch/arm/mach-msm/board-htckaiser.c b/arch/arm/mach-msm/board-htckaiser.c new file mode 100644 index 0000000..351073b --- /dev/null +++ b/arch/arm/mach-msm/board-htckaiser.c @@ -0,0 +1,550 @@ +/* linux/arch/arm/mach-msm/board-kaiser.c + * + * Author: Martin Johnson, Lukas Gorris , Waylon Grange + * Based on board-halibut.c by Brian Swetland + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + +#define MSM_SMI_BASE 0x00000000 +#define MSM_SMI_SIZE 0x900000 + +#define MSM_EBI_BASE 0x10000000 +#define MSM_EBI_SIZE 0x6e00000 + +#define MSM_PMEM_GPU0_BASE 0x0 +#define MSM_PMEM_GPU0_SIZE 0x800000 + +#define MSM_LINUX_BASE MSM_EBI_BASE +#define MSM_LINUX_SIZE 0x4c00000 + +#define MSM_PMEM_MDP_BASE MSM_LINUX_BASE + MSM_LINUX_SIZE +#define MSM_PMEM_MDP_SIZE 0x800000 + +#define MSM_PMEM_ADSP_BASE MSM_PMEM_MDP_BASE + MSM_PMEM_MDP_SIZE +#define MSM_PMEM_ADSP_SIZE 0x800000 + +#define MSM_PMEM_GPU1_BASE MSM_PMEM_ADSP_BASE + MSM_PMEM_ADSP_SIZE +#define MSM_PMEM_GPU1_SIZE 0x800000 + +// #define MSM_FB_BASE MSM_PMEM_GPU1_BASE + MSM_PMEM_GPU1_SIZE +#define MSM_FB_BASE 0x00000000 +#define MSM_FB_SIZE 0x9b000 + +#ifdef CONFIG_FB_MSM + +#define MDDI_CLIENT_CORE_BASE 0x108000 +#define LCD_CONTROL_BLOCK_BASE 0x110000 +#define PWM_BLOCK_BASE 0x140000 +#define DPSUS (MDDI_CLIENT_CORE_BASE|0x24) +#define SYSCLKENA (MDDI_CLIENT_CORE_BiASE|0x2C) +#define START (LCD_CONTROL_BLOCK_BASE|0x08) +#define PWM0OFF (PWM_BLOCK_BASE|0x1C) + + +struct mddi_regs { + int reg; + int val; + int time; +}; + +void write_mddi_regs(struct mddi_panel_info *panel, struct mddi_regs *regs) { + while(regs->reg>=0) { + mddi_remote_write(panel->mddi, regs->val, regs->reg); + if(regs->time) + udelay(regs->time); + else udelay(5); + regs++; + } +} + +void mddi0_panel_power(struct mddi_panel_info *panel, int on) +{ + int i; + const struct mddi_regs regs_off[]={ + {0x7,0x12}, + {0x11,0xf1a}, + {0x11,0x712}, + {0x11,0x312}, + {0x7,0x110,150}, + {0x7,0x0}, + {-1,-1} + }; + const struct mddi_regs regs_on[]={ + {0x0,0x501}, + {0x11,0x1a}, + {0x12,0x2000}, + {0x13,0x70}, + {0x14,0x24e9}, + {0x15,0x70,50}, + {0x10,0x710}, + {0x11,0x110}, + {0x11,0x312}, + {0x11,0x712}, + {0x11,0xf1a}, + {0x11,0xf3a}, + {0x1,0x528,50}, + {0x2,0x100}, + {0x3,0x1130}, + {0x7,0x0}, + {0x8,0x808}, + {0xb,0x2107}, + {0xc,0x0}, + {0xe,0x200,100}, + {0xf,0x1801}, + {0x50,0x500}, + {0x51,0xb}, + {0x52,0x200}, + {0x53,0x3}, + {0x54,0x2,50}, + {0x55,0xb00}, + {0x56,0x5}, + {0x57,0x300}, + {0x58,0x0}, + {0x59,0x0}, + {0x30,0x0}, + {0x31,0x13f,100}, + {0x32,0x0}, + {0x33,0x0}, + {0x36,0xef}, + {0x37,0x0}, + {0x38,0x13f}, + {0x39,0x0}, + {0x7,0x12,50}, + {0x7,0x1013}, + {0x20,0x0}, + {0x21,0x0}, + {-1,-1} + }; + const struct mddi_regs regs_on1[]={ + {0x36,0xef}, + {0x37,0x0,50}, + {0x38,0x13f}, + {0x39,0x0}, + {0x20,0x0}, + {0x21,0x0}, + {-1,-1} + }; +/* + for(i=0;i<0x60;i++) { + printk("mddi(%x)=%x\n",i,mddi_remote_read(panel->mddi,i)); + udelay(1000); + } +*/ + const int MSM_BACKLIGHT_BRIGHTNESS=MSM_CLK_CTL_BASE+0x54; + const int MSM_BACKLIGHT_POWER=MSM_CLK_CTL_BASE+0x58; + void msm_irq_enter_sleep(bool arm9_wake, int from_idle); + void msm_irq_exit_sleep(void); + void msm_gpio_enter_sleep(int from_idle); + void msm_gpio_exit_sleep(void); + void msm_button_enable(int); + + + if(!on) { + writel(0xf8fa0b60,MSM_BACKLIGHT_POWER); + writel(0x003ff39,MSM_BACKLIGHT_BRIGHTNESS); + gpio_set_value(28,0); // 1-12 + // vogue_set_egpio_byte(1,0x18); + writel(0x0030000,MSM_BACKLIGHT_BRIGHTNESS); + writel(0,MSM_BACKLIGHT_BRIGHTNESS); + writel(0xb60,MSM_BACKLIGHT_POWER); + writel(0xbe0,MSM_BACKLIGHT_POWER); + writel(0xae0,MSM_BACKLIGHT_POWER); + writel(0x8e0,MSM_BACKLIGHT_POWER); + writel(0xe0,MSM_BACKLIGHT_POWER); + gpio_set_value(27,0); // 1-12 = leds + // msm_gpio_enter_sleep(0); + + +/* + msm_proc_comm(0x11d,0,0); + write_mddi_regs(panel,(struct mddi_regs *)regs_off); + gpio_set_value(80,0); // 3-12 = mddi power? + msm_proc_comm(0x116,0x200,0); +*/ + } else { +/* + msm_proc_comm(0x115,0x200,0); + gpio_set_value(80,1); + udelay(200); + write_mddi_regs(panel,(struct mddi_regs *)regs_on); + msm_proc_comm(0x11d,0x1,0); + udelay(100); + write_mddi_regs(panel,(struct mddi_regs *)regs_on1); +*/ + msm_button_enable(1); + gpio_set_value(27,1); + writel(0x1e0,MSM_BACKLIGHT_POWER); + writel(0xf8fa0b60,MSM_BACKLIGHT_POWER); + writel(0x3f357,MSM_BACKLIGHT_BRIGHTNESS); + } + + printk("mddi0_panel_power(%d)\n", on); +} + + +/* +static void mddi0_panel_power(struct mddi_panel_info *panel, int on) +{*/ + /*if(on) { + mddi_remote_write(panel->mddi, 0, DPSUS); + udelay(122); + mddi_remote_write(panel->mddi, 1, SYSCLKENA); + mddi_remote_write(panel->mddi, kaiser_ffa ? 0 : 0x00001387, PWM0OFF); + } + else { + mddi_remote_write(panel->mddi, kaiser_ffa ? 0x00001387 : 0, PWM0OFF); + udelay(122); + mddi_remote_write(panel->mddi, 0, SYSCLKENA); + mddi_remote_write(panel->mddi, 1, DPSUS); + } + */ +/* printk("mddi0_panel_power(%d)\n", on); +} +*/ +static struct msm_mddi_platform_data msm_mddi0_pdata = { + .panel_power = mddi0_panel_power, + .has_vsync_irq = 0, + .fb_base = MSM_FB_BASE, + .fb_size = MSM_FB_SIZE, +}; + +static struct platform_device msm_mddi0_device = { + .name = "msm_mddi", + .id = 0, + .dev = { + .platform_data = &msm_mddi0_pdata + }, +}; + +#endif + +static struct platform_device msm_rtc_device = { + .name = "msm_rtc", +}; + +static struct resource msm_serial0_resources[] = { + { + .start = INT_UART1, + .end = INT_UART1, + .flags = IORESOURCE_IRQ, + }, + { + .start = MSM_UART1_PHYS, + .end = MSM_UART1_PHYS + MSM_UART1_SIZE - 1, + .flags = IORESOURCE_MEM, + }, +}; + +static struct platform_device msm_serial0_device = { + .name = "msm_serial", + .id = 0, + .num_resources = ARRAY_SIZE(msm_serial0_resources), + .resource = msm_serial0_resources, +}; + +static struct resource usb_resources[] = { + { + .start = MSM_HSUSB_PHYS, + .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE, + .flags = IORESOURCE_MEM, + }, + { + .start = INT_USB_HS, + .end = INT_USB_HS, + .flags = IORESOURCE_IRQ, + }, +}; + +/* The HSUSB PHY on kaiser has a hardware bug where VBUS + * interrupts can lock up the ULPI bus, causing USB to fail. + * Disable these interrupts to avoid this issue. + */ +static int kaiser_phy_init_seq[] = { 0x1D, 0x0D, 0x1D, 0x10, -1 }; + +static char *halibut_usb_functions[] = { + "diag", + "adb", +}; + +static struct msm_hsusb_platform_data msm_hsusb_pdata = { + .phy_init_seq = kaiser_phy_init_seq, + .vendor_id = 0x18d1, + .product_id = 0xd00d, + .version = 0x0100, + .product_name = "kaiser",/* + .functions = halibut_usb_functions, + .num_functions = ARRAY_SIZE(halibut_usb_functions),*/ +}; + +static struct platform_device msm_hsusb_device = { + .name = "msm_hsusb", + .id = -1, + .num_resources = ARRAY_SIZE(usb_resources), + .resource = usb_resources, + .dev = { + .coherent_dma_mask = 0xffffffff, + .platform_data = &msm_hsusb_pdata, + }, +}; + +static struct android_pmem_platform_data android_pmem_pdata = { + .name = "pmem", + .start = MSM_PMEM_MDP_BASE, + .size = MSM_PMEM_MDP_SIZE, + .no_allocator = 1, + .cached = 1, +}; + +static struct android_pmem_platform_data android_pmem_adsp_pdata = { + .name = "pmem_adsp", + .start = MSM_PMEM_ADSP_BASE, + .size = MSM_PMEM_ADSP_SIZE, + .no_allocator = 0, + .cached = 0, +}; + +static struct android_pmem_platform_data android_pmem_gpu0_pdata = { + .name = "pmem_gpu0", + .start = MSM_PMEM_GPU0_BASE, + .size = MSM_PMEM_GPU0_SIZE, + .no_allocator = 1, + .cached = 0, +}; + +static struct android_pmem_platform_data android_pmem_gpu1_pdata = { + .name = "pmem_gpu1", + .start = MSM_PMEM_GPU1_BASE, + .size = MSM_PMEM_GPU1_SIZE, + .no_allocator = 1, + .cached = 0, +}; + +static struct platform_device android_pmem_device = { + .name = "android_pmem", + .id = 0, + .dev = { .platform_data = &android_pmem_pdata }, +}; + +static struct platform_device android_pmem_adsp_device = { + .name = "android_pmem", + .id = 1, + .dev = { .platform_data = &android_pmem_adsp_pdata }, +}; + +static struct platform_device android_pmem_gpu0_device = { + .name = "android_pmem", + .id = 2, + .dev = { .platform_data = &android_pmem_gpu0_pdata }, +}; + +static struct platform_device android_pmem_gpu1_device = { + .name = "android_pmem", + .id = 3, + .dev = { .platform_data = &android_pmem_gpu1_pdata }, +}; + +/*****************************************************************/ +/* EGPIOs */ + +static struct resource egpio_resources[] = { + [0] = { + .start = 0x98000000, + .end = 0x98000000 + 0x2*9, /* 8 regs */ + .flags = IORESOURCE_MEM, + }, +}; + +struct htc_egpio_pinInfo pins[] = { + {.gpio = EGPIO_7_3_INIT + , .type = HTC_EGPIO_TYPE_OUTPUT + , .output_initial = 1}, // INIT=1 + {.gpio = EGPIO_1_0_SD_PWR + , .type = HTC_EGPIO_TYPE_OUTPUT + , .output_initial = 1}, // SDPWR + {.gpio = EGPIO_1_2_KBD_BAKLIGHT + , .type = HTC_EGPIO_TYPE_OUTPUT + , .output_initial = 0}, // Keybard backlight + {.gpio = EGPIO_2_1_RESET_PERMIT + , .type = HTC_EGPIO_TYPE_OUTPUT + , .output_initial = 1}, // Reset permit + {.gpio = EGPIO_2_4_LCD_PWR1 + , .type = HTC_EGPIO_TYPE_OUTPUT + , .output_initial = 1}, // LCD PWR + {.gpio = EGPIO_3_2_FN_LED + , .type = HTC_EGPIO_TYPE_OUTPUT + , .output_initial = 0}, // Fn led + {.gpio = EGPIO_3_3_CAPS_LED + , .type = HTC_EGPIO_TYPE_OUTPUT + , .output_initial = 0}, // Caps led +}; + +struct htc_egpio_platform_data egpio_data = { + .gpio_base = KAISER_EGPIO_BASE, + .nrRegs = 8, + .pins = pins, + .nr_pins = ARRAY_SIZE(pins), +// .reg_width=8, +// .bus_width=16, +}; + +struct platform_device kaiser_egpio = { + .name = "htc-egpio", + .id = -1, + .dev = { + .platform_data = &egpio_data, + }, + .resource = egpio_resources, + .num_resources = ARRAY_SIZE(egpio_resources), +}; + +static struct platform_device *devices[] __initdata = { +#if !defined(CONFIG_MSM_SERIAL_DEBUGGER) +// &msm_serial0_device, +#endif +#ifdef CONFIG_FB_MSM + &kaiser_egpio, + &msm_mddi0_device, +#endif + &msm_rtc_device, + &msm_hsusb_device, + &android_pmem_device, + &android_pmem_adsp_device, + &android_pmem_gpu0_device, + &android_pmem_gpu1_device, +}; + +static struct i2c_board_info __initdata kaiser_i2c_board_info[] = { + { + I2C_BOARD_INFO("kaiser-ts", 0x48), + .type = "vtsc2003-ts", + .irq = MSM_GPIO_TO_INT(99), + }, +}; + + +static unsigned int kaiser_sdcc_slot_status(struct device *dev) +{ + int slot=1-gpio_get_value(94); + // printk("sdcc_slot_status=%d\n",slot); + return slot; +} + +static struct mmc_platform_data kaiser_sdcc_data = { + .ocr_mask = MMC_VDD_28_29, + .status = kaiser_sdcc_slot_status, +}; + +extern struct sys_timer msm_timer; + +static void __init kaiser_init_irq(void) +{ + msm_init_irq(); +} + +static struct msm_clock_platform_data kaiser_clock_data = { + .acpu_switch_time_us = 50, + .max_speed_delta_khz = 256000, + .vdd_switch_time_us = 62, +}; + +void msm_serial_debug_init(unsigned int base, int irq, + const char *clkname, int signal_irq); + +static void __init kaiser_init_mmc(void) +{ + + struct vreg *vreg_mmc; + int rc; + + vreg_mmc = vreg_get(0, "mmc"); + rc = vreg_enable(vreg_mmc); + if (rc) + printk(KERN_ERR "%s: vreg enable failed (%d)\n", __func__, rc); + + msm_add_sdcc(2, &kaiser_sdcc_data); + +/* TODO: Enable these once we have support for the SDC mux + * msm_add_sdcc(2, &kaiser_sdcc_data); + * msm_add_sdcc(3, &kaiser_sdcc_data); + * msm_add_sdcc(4, &kaiser_sdcc_data); + */ + +} + +static void __init kaiser_init(void) +{ +#if defined(CONFIG_MSM_SERIAL_DEBUGGER) + msm_serial_debug_init(MSM_UART1_PHYS, INT_UART1, + "uart1_clk", 1); +#endif + msm_init_gpio(); + platform_add_devices(devices, ARRAY_SIZE(devices)); + msm_add_devices(); + kaiser_init_mmc(); + i2c_register_board_info(0, kaiser_i2c_board_info, + ARRAY_SIZE(kaiser_i2c_board_info)); + /* TODO: detect vbus and correctly notify USB about its presence + * For now we just declare that VBUS is present at boot and USB + * copes, but this is not ideal. + */ + //msm_hsusb_set_vbus_state(1); +} + +static void __init kaiser_map_io(void) +{ + msm_map_common_io(); + msm_clock_init(&kaiser_clock_data); +} + +MACHINE_START(HTCKAISER, "HTC Kaiser") +/* Maintainer: Lukas Gorris*/ + /* UART for LL DEBUG */ + .phys_io = MSM_UART1_PHYS, + .io_pg_offst = ((MSM_UART1_BASE) >> 18) & 0xfffc, + + .boot_params = 0x10000100, + .map_io = kaiser_map_io, + .init_irq = kaiser_init_irq, + .init_machine = kaiser_init, + .timer = &msm_timer, +MACHINE_END diff --git a/arch/arm/mach-msm/board-kaiser-keypad.c b/arch/arm/mach-msm/board-kaiser-keypad.c new file mode 100644 index 0000000..e4f1d31 --- /dev/null +++ b/arch/arm/mach-msm/board-kaiser-keypad.c @@ -0,0 +1,697 @@ +/* +* HTC Kaiser Keyboard based on: +* Palm TC hardware buttons (Holger Bocklet, Bitz.Email@gmx.net, ) +* +* Author: Marcin Baliniak +* +* Tips: +* WinMenu key = Ctrl +* Camera = Backslash +* Camera + Shift = +* PAD Center = KEY_OK +* PAD OK = KEY_BACK //<- we don need 2 OK buttons, OK remaped to BACK, PAD_CENTER = OK +*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +//#define USE_RELEASE_TIMER + +#define MODULE_NAME "kaiser_kbd" + +//#define KAISER_KEYBOARD_DEBUG + +#ifdef KAISER_KEYBOARD_DEBUG +#define DBG(x...) \ + printk(KERN_INFO MODULE_NAME ": " x) +#else +#define DBG(x...) do { } while (0) +#endif + +#define FALSE 0 +#define TRUE 1 +#define PERMANENT 2 + +#define PRESSED_BIT 0x01 +#define ALT_BIT 0x02 +#define CAPS_BIT 0x04 +#define CTRL_BIT 0x08 +#define SHIFT_BIT 0x80 + +#define KEY_ANDROID_OK 232 +#define KEY_ANDROID_MENU 229 + +#ifdef USE_RELEASE_TIMER +static void release_timer_went_off (unsigned long); +static struct timer_list key_release_timer; +#endif + +static u8 alternate_key = FALSE; +static u8 shift_key = FALSE; +static u8 ctrl_key = FALSE; +static u8 col_gpio[] = { 36, 37, 38, 39, 40, 41, 42 }; +static u8 row_gpio[] = {23, 30, 31, 32, 33, 34, 35, 78}; + +#define RELEASE_CHECK_TIME_MS 50 +#define MAX_ROW ARRAY_SIZE(row_gpio) +#define MAX_COL ARRAY_SIZE(col_gpio) +#define KEYBOARD_TILT (KEY_MAX+1) +#define BACKLIGHT_TIMEOUT (15*20) //15s + +static struct { + struct input_dev *idev; + struct workqueue_struct *workqueue; + struct work_struct task; + struct semaphore sem; + struct platform_device *platform_dev; + struct timer_list timer20Hz; // timer 20Hz to read gpio changes + spinlock_t lock;// = SPIN_LOCK_UNLOCKED; + unsigned int backlight_timer; +} kbd_data; + + + +static struct //gpio buttons +{ + unsigned short key; //key + unsigned short alt_key; //alternative key + unsigned short gpio; //gpio num + unsigned char state; //to remember old state + char *desc; +} gpio_buttons[]={ + //{KEY_VOLUMEUP, 18, 0, "Vol UP"}, + //{KEY_VOLUMEDOWN, 19, 0, "Vol Down"}, + {KEY_POWER, KEY_POWER, 20, 0, "Power"}, + {KEY_UP, KEY_UP, EGPIO_5_0_PAD_UP, 0, "PAD UP"}, + {KEY_DOWN, KEY_DOWN, EGPIO_5_1_PAD_DOWN, 0, "PAD DOWN"}, + {KEY_LEFT, KEY_LEFT, EGPIO_5_2_PAD_LEFT, 0, "PAD LEFT"}, + {KEY_RIGHT, KEY_RIGHT, EGPIO_5_3_PAD_RIGHT, 0, "PAD RIGHT"}, + {KEY_ANDROID_OK, KEY_ANDROID_OK, EGPIO_5_4_PAD_CENTER, 0, "PAD CENTER"}, + + {KEY_UP, KEY_PAGEUP, EGPIO_6_0_KBD_UP, 0, "KBD UP/PAGE UP"}, + {KEY_DOWN, KEY_PAGEDOWN, EGPIO_6_1_KBD_DOWN, 0, "KBD DOWN/PAGE DOWN"}, + {KEY_LEFT, KEY_COMMA, EGPIO_6_2_KBD_LEFT, 0, "KBD LEFT/COMMA"}, + {KEY_RIGHT, KEY_DOCUMENTS, EGPIO_6_3_KBD_RIGHT, 0, "KBD RIGHT/DOC."}, + + {KEY_BACKSLASH, KEY_CAMERA, EGPIO_6_4_KEY_CAM0, 0, "BACKSLASH/Camera 0"}, + {KEY_CAMERA, KEY_CAMERA, EGPIO_6_5_KEY_CAM1, 0, "Camera 1"}, + + {KEYBOARD_TILT, KEYBOARD_TILT, EGPIO_5_5_TILT, 0, "Tilt"}, +}; + +static struct +{ // matrix for real buttons + unsigned short key; + unsigned short alt_key; + u8 flags; // for recording last status (lowest) and shift_bit (highest) + char *desc; +} matrix_buttons[MAX_ROW][MAX_COL] = { +//0 + { + {KEY_LEFTCTRL, KEY_SEMICOLON, FALSE, "Menu/;"}, //<- I repleace this key with ctrl + {KEY_ANDROID_OK, KEY_WLAN, FALSE, "OK/WLAN"}, + {KEY_TAB, KEY_TAB, FALSE, "TAB"}, + {KEY_V, KEY_8, SHIFT_BIT, "V/*"}, + {KEY_SPACE, KEY_SPACE, FALSE, "SPACE"}, + {KEY_DOT, KEY_0, FALSE, "DOT/0"}, + {KEY_ENTER, KEY_ENTER, FALSE, "ENTER"} + }, +//1 + { + {KEY_MAX, KEY_MAX, FALSE, "none"}, + {KEY_MAX, KEY_MAX, FALSE, "none"}, + {KEY_MAX, KEY_MAX, FALSE, "none"}, + {KEY_MENU, KEY_MENU, FALSE, "Pad Menu"}, + {KEY_END, KEY_END, FALSE, "End"}, //red + {KEY_BACK, KEY_BACK, FALSE, "Pad OK"},//we don't have Back or C key ,so I remaped OK + {KEY_SEND, KEY_SEND, FALSE, "Send"} //call + }, +//2 + { + {KEY_FN, KEY_FN, FALSE, "Fn"}, + {KEY_X, KEY_7, SHIFT_BIT, "X/&"}, + {KEY_C, KEY_SEMICOLON, SHIFT_BIT, "C/:"}, + {KEY_G, KEY_EQUAL, SHIFT_BIT, "G/+"}, + {KEY_B, KEY_7, FALSE, "B/7"}, + {KEY_M, KEY_9, FALSE, "M/9"}, + {KEY_BACKSPACE, KEY_DELETE, FALSE, "Back./Del"} + }, +//3 + { + {KEY_RIGHTSHIFT, KEY_RIGHTSHIFT, FALSE, "Shift"}, + {KEY_Z, KEY_APOSTROPHE, FALSE, "Z/'"}, + {KEY_F, KEY_MINUS, FALSE, "F/-"}, + {KEY_Y, KEY_1, FALSE, "Y/1"}, + {KEY_H, KEY_4, FALSE, "H/4"}, + {KEY_N, KEY_8, FALSE, "N/8"}, + {KEY_L, KEY_EQUAL, FALSE, "L/="} + }, +//4 + { + {KEY_A, KEY_MINUS, SHIFT_BIT, "A/_"}, + {KEY_S, KEY_APOSTROPHE, SHIFT_BIT, "S/\""}, + {KEY_D, KEY_5, SHIFT_BIT, "D/%"}, + {KEY_T, KEY_3, SHIFT_BIT, "T/#"}, + {KEY_J, KEY_5, FALSE, "J/5"}, + {KEY_K, KEY_6, FALSE, "K/6"}, + {KEY_P, KEY_0, SHIFT_BIT, "P/)"} + }, +//5 + { + {KEY_Q, KEY_2, SHIFT_BIT, "Q/@"}, + {KEY_W, KEY_1, SHIFT_BIT, "W/!"}, + {KEY_E, KEY_SLASH, SHIFT_BIT, "E/?"}, + {KEY_R, KEY_SLASH, FALSE, "R//"}, + {KEY_U, KEY_2, FALSE, "U/2"}, + {KEY_I, KEY_3, FALSE, "I/3"}, + {KEY_O, KEY_9, SHIFT_BIT, "0/("} + }, +//6 + { + {KEY_MAX, KEY_MAX, FALSE, "61"}, + {KEY_MAX, KEY_MAX, FALSE, "62"}, + {KEY_MAX, KEY_MAX, FALSE, "63"}, + {KEY_TAB, KEY_F7, FALSE, "Kbd LeftSoft"}, + {KEY_MAX, KEY_MAX, FALSE, "65"}, + {KEY_TAB, KEY_F7, FALSE, "Kbd RightSoft"}, + {KEY_MAX, KEY_MAX, FALSE, "67"} + }, +//7 + { + {KEY_MENU, KEY_SEMICOLON, FALSE, "Left side OK"}, + {KEY_MAX, KEY_MAX, FALSE, "72"}, + {KEY_TAB, KEY_F7, FALSE, "VoiceMemo"}, + {KEY_TAB, KEY_F7, FALSE, "Pad IE"}, + {KEY_TAB, KEY_F7, FALSE, "Pad RightSoft"}, + {KEY_TAB, KEY_F7, FALSE, "Pad Mail"}, + {KEY_V, KEY_F8, FALSE, "Pad LeftSoft"} + }, +}; + +static void kaiser_kbd_enable_irqs(void) +{ + int i; + for (i=0;i2) + alternate_key=0; + shift_key=0; + ctrl_key=0; + } + else if (matrix_buttons[row][col].key == KEY_RIGHTSHIFT) + { + shift_key++; + if (shift_key>2) + shift_key=0; + alternate_key=0; + ctrl_key=0; + } + else if (matrix_buttons[row][col].key == KEY_LEFTCTRL && alternate_key == 0) + { + ctrl_key++; + if (ctrl_key>2) + ctrl_key=0; + shift_key=0; + } + else + { + if (alternate_key) + { + if (matrix_buttons[row][col].alt_key < KEY_MAX) + { + matrix_buttons[row][col].flags |= ALT_BIT; + if (matrix_buttons[row][col].flags & SHIFT_BIT) + input_report_key (kbd_data.idev, KEY_RIGHTSHIFT, 1); + input_report_key (kbd_data.idev, matrix_buttons[row][col].alt_key, 1); + input_sync (kbd_data.idev); + } + if (alternate_key != PERMANENT) + alternate_key = FALSE; + } + else if (shift_key) + { + if (matrix_buttons[row][col].key < KEY_MAX) + { + matrix_buttons[row][col].flags |= CAPS_BIT; + input_report_key (kbd_data.idev, KEY_RIGHTSHIFT, 1); + input_report_key (kbd_data.idev, matrix_buttons[row][col].key, 1); + input_sync (kbd_data.idev); + } + if (shift_key != PERMANENT) + shift_key = FALSE; + } + else if (ctrl_key) + { + if (matrix_buttons[row][col].key < KEY_MAX) + { + matrix_buttons[row][col].flags |= CTRL_BIT; + input_report_key (kbd_data.idev, KEY_LEFTCTRL, 1); + input_report_key (kbd_data.idev, matrix_buttons[row][col].key, 1); + input_sync (kbd_data.idev); + } + if (ctrl_key != PERMANENT) + ctrl_key = FALSE; + } + else + { + if (matrix_buttons[row][col].key < KEY_MAX) + { + input_report_key (kbd_data.idev, matrix_buttons[row][col].key, 1); + input_sync (kbd_data.idev); + } + } + } + kaiser_update_leds(); + } +#ifdef USE_RELEASE_TIMER + spin_lock_irqsave (&kbd_data.lock, flags); + if (timer_pending (&key_release_timer)) + { + mod_timer (&key_release_timer, jiffies + msecs_to_jiffies (RELEASE_CHECK_TIME_MS)); + } + else + { + key_release_timer.expires = (jiffies + msecs_to_jiffies (RELEASE_CHECK_TIME_MS)); + add_timer (&key_release_timer); + } + spin_unlock_irqrestore (&kbd_data.lock, flags); +#endif + } + else + { // not pressed branch + if (matrix_buttons[row][col].flags & PRESSED_BIT) + { + matrix_buttons[row][col].flags ^= PRESSED_BIT; //xor bit to 0 + if (matrix_buttons[row][col].key < KEY_MAX) + { + //alt key release + if (matrix_buttons[row][col].flags & ALT_BIT) + { + matrix_buttons[row][col].flags ^= ALT_BIT; //xor bit to 0 + input_report_key (kbd_data.idev, matrix_buttons[row][col].alt_key, 0); + if (matrix_buttons[row][col].flags & SHIFT_BIT) + input_report_key (kbd_data.idev, KEY_RIGHTSHIFT, 0); + } + else + { + input_report_key (kbd_data.idev, matrix_buttons[row][col].key, 0); + if (matrix_buttons[row][col].flags & CAPS_BIT) + { + matrix_buttons[row][col].flags ^= CAPS_BIT; //xor bit to 0 + input_report_key (kbd_data.idev, KEY_RIGHTSHIFT, 0); + } + if (matrix_buttons[row][col].flags & CTRL_BIT) + { + matrix_buttons[row][col].flags ^= CTRL_BIT; //xor bit to 0 + input_report_key (kbd_data.idev, KEY_LEFTCTRL, 0); + } + } + input_sync (kbd_data.idev); + } + } + } + } + // back to high for this row + spin_lock_irqsave (&kbd_data.lock, flags); + gpio_set_value (row_gpio[row], 1); + spin_unlock_irqrestore (&kbd_data.lock, flags); + } + + // set row-gpios low again + spin_lock_irqsave (&kbd_data.lock, flags); + for (row = 0; row < MAX_ROW; row++) + gpio_set_value (row_gpio[row], 0); + + spin_unlock_irqrestore (&kbd_data.lock, flags); + + // restore irqs + kaiser_kbd_enable_irqs(); +} + + +#ifdef USE_RELEASE_TIMER +/* +* This is called when the key release timer goes off. That's the +* only time it should be called. Check for changes in what keys +* are down. +*/ +static void release_timer_went_off (unsigned long unused) +{ + unsigned long flags; + + spin_lock_irqsave (&kbd_data.lock, flags); + + queue_work (kbd_data.workqueue, &kbd_data.task); + + spin_unlock_irqrestore (&kbd_data.lock, flags); +} +#endif + +//we need to read gpio buttons in pooling mode, no irq fo EGPIO +static void kbd_handle_timer20Hz(unsigned long __data) +{ + int i,state; + unsigned long flags; + + spin_lock_irqsave (&kbd_data.lock, flags); + + for (i = 0; i < ARRAY_SIZE(gpio_buttons); i++) + { + state = gpio_get_value(gpio_buttons[i].gpio); + if (gpio_buttons[i].state != state) + { + gpio_buttons[i].state = state; + DBG("New state of %s:%d\n",gpio_buttons[i].desc,state); + if (!state)//key pressed + { + if (gpio_buttons[i].key == KEYBOARD_TILT) + kbd_data.backlight_timer = 0; + + if (shift_key) + input_report_key (kbd_data.idev, KEY_RIGHTSHIFT, 1); + + if (alternate_key) + { + input_report_key (kbd_data.idev, gpio_buttons[i].alt_key, 1); + DBG("Alt key press: %s\n",gpio_buttons[i].desc); + } + else + { + input_report_key (kbd_data.idev, gpio_buttons[i].key, 1); + DBG("Key press: %s\n",gpio_buttons[i].desc); + } + } + else + { + kbd_data.backlight_timer = BACKLIGHT_TIMEOUT; + gpio_set_value(EGPIO_1_2_KBD_BAKLIGHT,1); + + if (alternate_key) + { + input_report_key (kbd_data.idev, gpio_buttons[i].alt_key, 0); + DBG("Alt key rel: %s\n",gpio_buttons[i].desc); + } + else + { + input_report_key (kbd_data.idev, gpio_buttons[i].key, 0); + DBG("Key rel: %s\n",gpio_buttons[i].desc); + } + if (shift_key) + input_report_key (kbd_data.idev, KEY_RIGHTSHIFT, 0); + + if (shift_key != PERMANENT) + shift_key = FALSE; + + if (alternate_key != PERMANENT) + alternate_key = FALSE; + + } + input_sync(kbd_data.idev); + kaiser_update_leds(); + } + } + + if (kbd_data.backlight_timer) + kbd_data.backlight_timer--; + else + gpio_set_value(EGPIO_1_2_KBD_BAKLIGHT,0); + + spin_unlock_irqrestore (&kbd_data.lock, flags); + + kbd_data.timer20Hz.expires = jiffies+(HZ/20); + add_timer(&kbd_data.timer20Hz); +} + +static int kaiser_kbd_open (struct input_dev *idev) +{ + int ret,i; + unsigned long flags; + DBG("Open!!!\n"); + kbd_data.workqueue = create_workqueue ("kaiserkbdw"); + INIT_WORK (&kbd_data.task, kaiser_kbd_queuework); + + //init timer to read gpio changes + init_timer(&kbd_data.timer20Hz); + kbd_data.timer20Hz.function = kbd_handle_timer20Hz; + kbd_data.timer20Hz.expires = jiffies+(HZ/20); + add_timer(&kbd_data.timer20Hz); + +#ifdef USE_RELEASE_TIMER + init_timer (&key_release_timer); + key_release_timer.function = release_timer_went_off; +#endif + + // Set all GPIOS low + spin_lock_irqsave (&kbd_data.lock, flags); + for (i = 0; i < MAX_ROW; i++) + gpio_set_value (row_gpio[i], 0); + gpio_set_value (18, 0); + gpio_set_value (19, 0); + + + spin_unlock_irqrestore (&kbd_data.lock, flags); + + //ret = request_irq (INT_KEYSENSE, kaiser_kbd_irq_handler, IRQF_DISABLED, "kaiser-kbd",NULL); + for (i = 0; i < ARRAY_SIZE(col_gpio);i++) + { + ret = request_irq (gpio_to_irq(col_gpio[i]), kaiser_kbd_irq_handler, IRQF_DISABLED, "kaiser-kbd",NULL); + if (ret) + { + printk(KERN_ERR "Unable to register KBD IRQ!!!\n"); + return ret; + } + set_irq_type(gpio_to_irq(col_gpio[i]), IRQ_TYPE_EDGE_BOTH); + } + ret = request_irq (gpio_to_irq(18), kaiser_kbd_irq_handler, IRQF_DISABLED, "kaiser-kbd",NULL); + ret = request_irq (gpio_to_irq(19), kaiser_kbd_irq_handler, IRQF_DISABLED, "kaiser-kbd",NULL); + + //set_irq_type(INT_KEYSENSE, IRQ_TYPE_EDGE_BOTH); + return 0; +} + +static void kaiser_kbd_close (struct input_dev *idev) +{ + int i; + DBG("Close !!!\n"); + destroy_workqueue (kbd_data.workqueue); + + for (i=0;iname = MODULE_NAME; + kbd_data.idev->open = kaiser_kbd_open; + kbd_data.idev->close = kaiser_kbd_close; + kbd_data.idev->id.bustype = BUS_HOST; + set_bit(EV_KEY, kbd_data.idev->evbit); + set_bit(EV_REP, kbd_data.idev->evbit); + for (row = 0; row < MAX_ROW; row++) + for (col = 0; col < MAX_COL; col++) + { + if (matrix_buttons[row][col].key < KEY_MAX) + set_bit(matrix_buttons[row][col].key, kbd_data.idev->keybit); + + if (matrix_buttons[row][col].alt_key < KEY_MAX) + set_bit(matrix_buttons[row][col].alt_key, kbd_data.idev->keybit);; + } + + for (col = 0; col < ARRAY_SIZE(gpio_buttons); col++) + { + if (gpio_buttons[col].key < KEY_MAX) + set_bit(gpio_buttons[col].key, kbd_data.idev->keybit); + if (gpio_buttons[col].alt_key < KEY_MAX) + set_bit(gpio_buttons[col].alt_key, kbd_data.idev->keybit); + } + + if (input_register_device (kbd_data.idev)) + { + input_free_device(kbd_data.idev); + return -ENODEV; + } + + return 0; +} + +static int __init kaiser_kbd_remove(struct platform_device *pdev) +{ + DBG ("removing device...\n"); + input_unregister_device (kbd_data.idev); + return 0; +} + +static struct platform_driver kaiser_kbd_driver = { + .probe = kaiser_kbd_probe, + .remove = kaiser_kbd_remove, + .driver = { + .name = MODULE_NAME, + }, +}; + +static int __init kaiser_kbd_init (void) +{ + int ret; + + ret = platform_driver_register(&kaiser_kbd_driver); + if (ret) + { + printk(KERN_ERR "Cant register platform_driver:" MODULE_NAME); + return ret; + } + + kbd_data.platform_dev = platform_device_register_simple(MODULE_NAME, -1, NULL, 0); + + if (IS_ERR(kbd_data.platform_dev)) + { + platform_driver_unregister(&kaiser_kbd_driver); + printk(KERN_ERR "Cant register device " MODULE_NAME); + return PTR_ERR(kbd_data.platform_dev);; + } + return ret; +} + +static void __exit kaiser_kbd_cleanup (void) +{ + platform_device_unregister(kbd_data.platform_dev); + platform_driver_unregister(&kaiser_kbd_driver); +} + +module_init (kaiser_kbd_init); +module_exit (kaiser_kbd_cleanup); + +MODULE_AUTHOR ("Marcin Baliniak"); +MODULE_DESCRIPTION ("Support for HTC Kaiser Keyboard"); +MODULE_LICENSE ("GPL"); diff --git a/arch/arm/mach-msm/kaiser-pm.c b/arch/arm/mach-msm/kaiser-pm.c new file mode 100644 index 0000000..9bcfecc --- /dev/null +++ b/arch/arm/mach-msm/kaiser-pm.c @@ -0,0 +1,439 @@ +/* arch/arm/mach-msm/pm.c + * + * MSM Power Management Routines + * + * Copyright (C) 2007 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "smd_private.h" +#include "clock.h" +#include "proc_comm.h" +// #include "vogue-hw.h" +#include + +enum { + MSM_PM_DEBUG_SUSPEND = 1U << 0, + MSM_PM_DEBUG_POWER_COLLAPSE = 1U << 1, + MSM_PM_DEBUG_STATE = 1U << 2, + MSM_PM_DEBUG_CLOCK = 1U << 3, + MSM_PM_DEBUG_RESET_VECTOR = 1U << 4, + MSM_PM_DEBUG_SMSM_STATE = 1U << 5, +}; +static int msm_pm_debug_mask = MSM_PM_DEBUG_SUSPEND | MSM_PM_DEBUG_POWER_COLLAPSE; +module_param_named(debug_mask, msm_pm_debug_mask, int, S_IRUGO | S_IWUSR | S_IWGRP); + +enum { + MSM_PM_SLEEP_MODE_POWER_COLLAPSE_SUSPEND, + MSM_PM_SLEEP_MODE_POWER_COLLAPSE, + MSM_PM_SLEEP_MODE_APPS_SLEEP, + MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT, + MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT, +}; +static int msm_pm_sleep_mode = CONFIG_MSM7X00A_SLEEP_MODE; +module_param_named(sleep_mode, msm_pm_sleep_mode, int, S_IRUGO | S_IWUSR | S_IWGRP); + +#define A11S_CLK_SLEEP_EN (MSM_CSR_BASE + 0x11c) +#define A11S_CLK_CTL (MSM_CSR_BASE + 0x100) +#define A11S_CLK_SEL (MSM_CSR_BASE + 0x104) +#define A11S_PWRDOWN (MSM_CSR_BASE + 0x440) +#define A11S_STANDBY_CTL (MSM_CSR_BASE + 0x108) +#define A11RAMBACKBIAS (MSM_CSR_BASE + 0x508) + +static struct clk *acpu_clk; +unsigned long pm_saved_acpu_clk_rate; + +int acpuclk_set_rate(struct clk *clk, unsigned long rate, int for_power_collapse); + +int msm_pm_collapse(void); +void msm_pm_collapse_exit(void); + +static uint32_t *msm_pm_reset_vector; + +#define TARGET_CLOCK_RATE 19200000 +/* +static int +msm_pm_wait_state(uint32_t wait_state_all_set, uint32_t wait_state_all_clear, + uint32_t wait_state_any_set, uint32_t wait_state_any_clear) +{ + int i; + uint32_t state; + + for (i = 0; i < 100000; i++) { + state = smsm_get_state(); + if (((state & wait_state_all_set) == wait_state_all_set) && + ((~state & wait_state_all_clear) == wait_state_all_clear) && + (wait_state_any_set == 0 || (state & wait_state_any_set) || + wait_state_any_clear == 0 || (state & wait_state_any_clear))) + return 0; + } + printk(KERN_ERR "msm_pm_wait_state(%x, %x, %x, %x) failed %x\n", + wait_state_all_set, wait_state_all_clear, + wait_state_any_set, wait_state_any_clear, state); + return -ETIMEDOUT; +} +*/ +static int setclock(int on) { + unsigned sel=readl(A11S_CLK_SEL)&1; + unsigned clk=readl(A11S_CLK_CTL); + unsigned shift=sel*8; + if(on) + { + writel(6 | (sel ^ 1),A11S_CLK_SEL); + writel(0x11<>shift)), A11S_CLK_CTL); + } else { + writel((clk & (0xff00>>shift)), A11S_CLK_CTL); + writel((sel ^ 1),A11S_CLK_SEL); + } + printk("A11 CLK %x %x\n",readl(A11S_CLK_CTL),readl(A11S_CLK_SEL)); +} + +static int msm_sleep(int sleep_mode, uint32_t sleep_delay, int from_idle) +{ + unsigned clocks; + void msm_irq_enter_sleep(bool arm9_wake, int from_idle); + void msm_irq_exit_sleep(void); + void msm_gpio_enter_sleep(int from_idle); + void msm_gpio_exit_sleep(void); + void msm_button_enable(int); + extern int gpios_setup; + return 0; + gpios_setup=1; + msm_button_enable(0); + // msm_gpio_enter_sleep(from_idle); + msm_irq_enter_sleep(0, from_idle); + // pm_saved_acpu_clk_rate = clk_get_rate(acpu_clk); + // acpuclk_set_rate(acpu_clk, TARGET_CLOCK_RATE, 1); + + printk("Going to sleep\n"); + setclock(0); // set clock to slow while suspended + // clocks=readl(MSM_CLK_CTL_BASE); + // disable them there pesky clocks + // writel(0,MSM_CLK_CTL_BASE); + +// writel(0,MSM_CSR_BASE+0x440); // don't know what this does! +// vogue_set_egpio(1,4,0); +// vogue_set_egpio(1,5,1); + arch_idle(); +// vogue_set_egpio(1,5,0); +// vogue_set_egpio(1,4,1); + // enable them again + //writel(clocks,MSM_CLK_CTL_BASE); + setclock(1); // clck back up to speed + // acpuclk_set_rate(acpu_clk, pm_saved_acpu_clk_rate, 1); + printk("Wake up sleepy head\n"); + msm_irq_exit_sleep(); + // msm_gpio_exit_sleep(); + +/* + uint32_t saved_vector[2]; + int collapsed; + void msm_irq_enter_sleep1(bool arm9_wake, int from_idle); + void msm_irq_enter_sleep2(bool arm9_wake, int from_idle); + void msm_irq_exit_sleep1(void); + void msm_irq_exit_sleep2(void); + void msm_irq_exit_sleep3(void); + void msm_gpio_enter_sleep(int from_idle); + void msm_gpio_exit_sleep(void); + uint32_t enter_state; + uint32_t enter_wait_set = 0; + uint32_t enter_wait_clear = 0; + uint32_t exit_state; + uint32_t exit_wait_clear = 0; + uint32_t exit_wait_set = 0; + int ret; + + if (msm_pm_debug_mask & MSM_PM_DEBUG_SUSPEND) + printk(KERN_INFO "msm_pm_enter(): mode %d delay %u idle %d\n", + sleep_mode, sleep_delay, from_idle); + + switch (sleep_mode) { + case MSM_PM_SLEEP_MODE_POWER_COLLAPSE: + enter_state = SMSM_PWRC; + enter_wait_set = SMSM_RSA; + exit_state = SMSM_WFPI; + exit_wait_clear = SMSM_RSA; + break; + case MSM_PM_SLEEP_MODE_POWER_COLLAPSE_SUSPEND: + enter_state = SMSM_PWRC_SUSPEND; + enter_wait_set = SMSM_RSA; + exit_state = SMSM_WFPI; + exit_wait_clear = SMSM_RSA; + break; + case MSM_PM_SLEEP_MODE_APPS_SLEEP: + enter_state = SMSM_SLEEP; + exit_state = SMSM_SLEEPEXIT; + exit_wait_set = SMSM_SLEEPEXIT; + break; + default: + enter_state = 0; + exit_state = 0; + } + + msm_irq_enter_sleep1(!!enter_state, from_idle); + msm_gpio_enter_sleep(from_idle); + + if (enter_state) { + if (sleep_delay == 0 && sleep_mode >= MSM_PM_SLEEP_MODE_APPS_SLEEP) + sleep_delay = 192000*5; + smsm_set_sleep_duration(sleep_delay); + ret = smsm_change_state(SMSM_RUN, enter_state); + if (ret) { + printk(KERN_ERR "msm_pm_enter(): smsm_change_state %x failed\n", enter_state); + enter_state = 0; + exit_state = 0; + } + ret = msm_pm_wait_state(enter_wait_set, enter_wait_clear, 0, 0); + if (ret) { + printk(KERN_INFO "msm_pm_enter(): msm_pm_wait_state failed, %x\n", smsm_get_state()); + goto enter_failed; + } + } + msm_irq_enter_sleep2(!!enter_state, from_idle); + + if (enter_state) { + writel(0x1f, A11S_CLK_SLEEP_EN); + writel(1, A11S_PWRDOWN); + + writel(0, A11S_STANDBY_CTL); + writel(0, A11RAMBACKBIAS); + + if (msm_pm_debug_mask & MSM_PM_DEBUG_STATE) + printk(KERN_INFO "msm_pm_enter(): enter " + "A11S_CLK_SLEEP_EN %x, A11S_PWRDOWN %x, " + "smsm_get_state %x\n", readl(A11S_CLK_SLEEP_EN), + readl(A11S_PWRDOWN), smsm_get_state()); + } + + if (sleep_mode <= MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT) { + pm_saved_acpu_clk_rate = clk_get_rate(acpu_clk); + if (msm_pm_debug_mask & MSM_PM_DEBUG_CLOCK) + printk(KERN_INFO "msm_pm_enter(): change clk %ld -> %d" + "\n", pm_saved_acpu_clk_rate, TARGET_CLOCK_RATE); + acpuclk_set_rate(acpu_clk, TARGET_CLOCK_RATE, 1); + } + if (sleep_mode < MSM_PM_SLEEP_MODE_APPS_SLEEP) { + if (msm_pm_debug_mask & MSM_PM_DEBUG_SMSM_STATE) + smsm_print_sleep_info(); + saved_vector[0] = msm_pm_reset_vector[0]; + saved_vector[1] = msm_pm_reset_vector[1]; + msm_pm_reset_vector[0] = 0xE51FF004; // ldr pc, 4 + msm_pm_reset_vector[1] = virt_to_phys(msm_pm_collapse_exit); + if (msm_pm_debug_mask & MSM_PM_DEBUG_RESET_VECTOR) + printk(KERN_INFO "msm_pm_enter: vector %x %x -> " + "%x %x\n", saved_vector[0], saved_vector[1], + msm_pm_reset_vector[0], msm_pm_reset_vector[1]); + collapsed = msm_pm_collapse(); + msm_pm_reset_vector[0] = saved_vector[0]; + msm_pm_reset_vector[1] = saved_vector[1]; + if (collapsed) { + cpu_init(); + local_fiq_enable(); + } + if (msm_pm_debug_mask & MSM_PM_DEBUG_POWER_COLLAPSE) + printk(KERN_INFO "msm_pm_collapse(): returned %d\n", + collapsed); + if (msm_pm_debug_mask & MSM_PM_DEBUG_SMSM_STATE) + smsm_print_sleep_info(); + } else + arch_idle(); + + if (sleep_mode <= MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT) { + if (msm_pm_debug_mask & MSM_PM_DEBUG_CLOCK) + printk(KERN_INFO "msm_pm_enter(): change clk %d -> %ld" + "\n", TARGET_CLOCK_RATE, pm_saved_acpu_clk_rate); + if (acpuclk_set_rate(acpu_clk, pm_saved_acpu_clk_rate, 1) < 0) + printk(KERN_ERR "msm_pm_enter(): clk_set_rate %ld " + "failed\n", pm_saved_acpu_clk_rate); + } + if (msm_pm_debug_mask & MSM_PM_DEBUG_STATE) + printk(KERN_INFO "msm_pm_enter(): exit A11S_CLK_SLEEP_EN %x, " + "A11S_PWRDOWN %x, smsm_get_state %x\n", + readl(A11S_CLK_SLEEP_EN), readl(A11S_PWRDOWN), + smsm_get_state()); +enter_failed: + msm_irq_exit_sleep1(); + if (enter_state) { + writel(0x00, A11S_CLK_SLEEP_EN); + writel(0, A11S_PWRDOWN); + smsm_change_state(enter_state, exit_state); + msm_pm_wait_state(exit_wait_set, exit_wait_clear, 0, 0); + if (msm_pm_debug_mask & MSM_PM_DEBUG_STATE) + printk(KERN_INFO "msm_pm_enter(): sleep exit " + "A11S_CLK_SLEEP_EN %x, A11S_PWRDOWN %x, " + "smsm_get_state %x\n", readl(A11S_CLK_SLEEP_EN), + readl(A11S_PWRDOWN), smsm_get_state()); + if (msm_pm_debug_mask & MSM_PM_DEBUG_SMSM_STATE) + smsm_print_sleep_info(); + } + msm_irq_exit_sleep2(); + if (enter_state) { + smsm_change_state(exit_state, SMSM_RUN); + msm_pm_wait_state(SMSM_RUN, 0, 0, 0); + if (msm_pm_debug_mask & MSM_PM_DEBUG_STATE) + printk(KERN_INFO "msm_pm_enter(): sleep exit " + "A11S_CLK_SLEEP_EN %x, A11S_PWRDOWN %x, " + "smsm_get_state %x\n", readl(A11S_CLK_SLEEP_EN), + readl(A11S_PWRDOWN), smsm_get_state()); + } + msm_irq_exit_sleep3(); + msm_gpio_exit_sleep(); + return 0; +*/ +} +int msm_arch_idle(void); +void arch_idle(void) +{ + int ret; + int64_t sleep_time; + int low_power = 0; + msm_arch_idle(); + /* +#ifdef CONFIG_MSM_IDLE_STATS + int64_t t1; + static int64_t t2; + int exit_stat; +#endif + int allow_sleep = + msm_pm_idle_sleep_mode < MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT && + msm_irq_idle_sleep_allowed(); + sleep_time = msm_timer_enter_idle(); +#ifdef CONFIG_MSM_IDLE_STATS + t1 = ktime_to_ns(ktime_get()); + msm_pm_add_stat(MSM_PM_STAT_NOT_IDLE, t1 - t2); + msm_pm_add_stat(MSM_PM_STAT_REQUESTED_IDLE, sleep_time); +#endif + if (msm_pm_debug_mask & MSM_PM_DEBUG_IDLE) + printk(KERN_INFO "arch_idle: sleep time %llu, allow_sleep %d\n", + sleep_time, allow_sleep); + if (sleep_time < msm_pm_idle_sleep_min_time || !allow_sleep) { + msm_arch_idle(); +#ifdef CONFIG_MSM_IDLE_STATS + exit_stat = MSM_PM_STAT_IDLE_WFI; +#endif + } else { + low_power = 1; + do_div(sleep_time, NSEC_PER_SEC / 32768); + if (sleep_time > 0x6DDD000) { + printk("sleep_time too big %lld\n", sleep_time); + sleep_time = 0x6DDD000; + } + ret = msm_sleep(msm_pm_idle_sleep_mode, sleep_time, 1); +#ifdef CONFIG_MSM_IDLE_STATS + if (ret) + exit_stat = MSM_PM_STAT_IDLE_FAILED_SLEEP; + else + exit_stat = MSM_PM_STAT_IDLE_SLEEP; +#endif + } + msm_timer_exit_idle(low_power); +#ifdef CONFIG_MSM_IDLE_STATS + t2 = ktime_to_ns(ktime_get()); + msm_pm_add_stat(exit_stat, t2 - t1); +#endif + */ +} +static int msm_pm_enter(suspend_state_t state) +{ + msm_sleep(msm_pm_sleep_mode, 0, 0); + return 0; +} + +static struct platform_suspend_ops msm_pm_ops = { + .enter = msm_pm_enter, + .valid = suspend_valid_only_mem, +}; + +static uint32_t restart_reason = 0x776655AA; + +static void msm_pm_power_off(void) +{ +// msm_proc_comm(PCOM_POWER_DOWN, 0, 0); +// for (;;) ; +} + +static void msm_pm_restart(char str) +{ + /* If there's a hard reset hook and the restart_reason + * is the default, prefer that to the (slower) proc_comm + * reset command. + */ +/* + if ((restart_reason == 0x776655AA) && msm_reset_hook) { + msm_reset_hook(str); + } else { + msm_proc_comm(PCOM_RESET_CHIP, &restart_reason, 0); + } + for (;;) ; +*/ +} + +static int msm_reboot_call(struct notifier_block *this, unsigned long code, void *_cmd) +{ + if((code == SYS_RESTART) && _cmd) { + char *cmd = _cmd; + if (!strcmp(cmd, "bootloader")) { + restart_reason = 0x77665500; + } else if (!strcmp(cmd, "recovery")) { + restart_reason = 0x77665502; + } else if (!strcmp(cmd, "eraseflash")) { + restart_reason = 0x776655EF; + } else if (!strncmp(cmd, "oem-", 4)) { + unsigned code = simple_strtoul(cmd + 4, 0, 16) & 0xff; + restart_reason = 0x6f656d00 | code; + } else { + restart_reason = 0x77665501; + } + } + return NOTIFY_DONE; +} + +static struct notifier_block msm_reboot_notifier = +{ + .notifier_call = msm_reboot_call, +}; + +static int __init msm_pm_init(void) +{ + pm_power_off = msm_pm_power_off; + arm_pm_restart = msm_pm_restart; + + register_reboot_notifier(&msm_reboot_notifier); + + acpu_clk = clk_get(NULL, "acpu_clk"); + if (acpu_clk == NULL) { + printk(KERN_ERR "msm_pm_init: failed get acpu_clk\n"); + //return -ENODEV; + } + + msm_pm_reset_vector = ioremap(0, PAGE_SIZE); + if (msm_pm_reset_vector == NULL) { + printk(KERN_ERR "msm_pm_init: failed to map reset vector\n"); + return -ENODEV; + } + + suspend_set_ops(&msm_pm_ops); + return 0; +} + +__initcall(msm_pm_init); diff --git a/arch/arm/mach-msm/kaiser-smd.c b/arch/arm/mach-msm/kaiser-smd.c new file mode 100644 index 0000000..c246f7c --- /dev/null +++ b/arch/arm/mach-msm/kaiser-smd.c @@ -0,0 +1,580 @@ +/* arch/arm/mach-msm/kaiser-smd.c - MSM7200 shared memory communications. + * + * Authors: Martin Johnson , + * Lukas Gorris , + * Martin Ling , + * Patrick Remy + * + * Based on smd.c by Brian Swetland + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "smd_private.h" +#include "proc_comm.h" + +#define MODULE_NAME "msm_smd" + +// Toggle to enable debug printks. +#ifdef KAISER_SMD_DEBUG +#define D(x...) printk(x) +#else +#define D(x...) do {} while (0) +#endif + +/* This spinlock is used to synchronize between the + * irq handler and code that mutates the channel + * list or fiddles with channel state. */ +static DEFINE_SPINLOCK(smd_lock); + +/* This mutex is used during open() and close() + * operations to avoid races while creating or + * destroying smd_channel structures. */ +static DEFINE_MUTEX(smd_creation_mutex); + +// Flag set when smd_core_init() has been called successfully. +static int smd_initialized = 0; + +// FIFO states. +#define SMD_SS_CLOSED 0x00000000 +#define SMD_SS_OPENING 0x00000001 +#define SMD_SS_OPENED 0x00000002 +#define SMD_SS_FLUSHING 0x00000003 +#define SMD_SS_CLOSING 0x00000004 +#define SMD_SS_RESET 0x00000005 +#define SMD_SS_RESET_OPENING 0x00000006 + +// Size of the circular buffer in each shared memory FIFO. +#define BUF_SIZE 0x2000 + +// Maximum number of bytes to read/write before notifying. +#define BURST_SIZE 0xf4 + +// FIFO structure located in shared memory. +struct smd_fifo +{ + volatile unsigned int state; + volatile unsigned char fDSR; + volatile unsigned char fCTS; + volatile unsigned char fCD; + volatile unsigned char fRI; + volatile unsigned char fHEAD; + volatile unsigned char fTAIL; + volatile unsigned char fSTATE; + volatile unsigned char fUNUSED; + volatile unsigned int tail; + volatile unsigned int head; + volatile unsigned int padding; + volatile char buffer[BUF_SIZE]; +}; + +// Bidirectional channel implemented using two FIFOs. +struct smd_channel +{ + volatile struct smd_fifo *send; + volatile struct smd_fifo *recv; + struct list_head ch_list; + + unsigned n; + void *priv; + void (*notify)(void *priv, unsigned flags); +}; + +// List of currently open channels. +static LIST_HEAD(smd_ch_list); + +// How many bytes are available for reading from a channel. +int smd_read_avail(struct smd_channel *ch) +{ + if (ch->recv == NULL) + return 0; + + return (ch->recv->head - ch->recv->tail + BUF_SIZE) % BUF_SIZE; +} + +// How many bytes we are free to write to a channel. +int smd_write_avail(struct smd_channel *ch) +{ + if (ch->send == NULL) + return 0; + + return (BUF_SIZE - 1) - + ((ch->send->head- ch->send->tail + BUF_SIZE) % BUF_SIZE); +} + +#define MSM_A2M_INT(n) (MSM_CSR_BASE + 0x400 + (n) * 4) + +// Interrupt the ARM9 to tell it we have written to the shared memory. +static inline void notify_other_smd(int ch) +{ + /* TODO: Isolate which line is used for which channel and set + * only the appropriate one for the given channel. */ + writel(1,MSM_A2M_INT(0)); + writel(1,MSM_A2M_INT(1)); + writel(1,MSM_A2M_INT(2)); +} + +static DEFINE_SPINLOCK(proc_comm_lock); +static DECLARE_WAIT_QUEUE_HEAD(proc_comm_queue); + +int irq6_received; + +static inline void notify_other_proc_comm(void) +{ + writel(1, MSM_A2M_INT(6)); +} + +static irqreturn_t proc_comm_isr(int irq, void *data) { + irq6_received=1; + wake_up(&proc_comm_queue); + return IRQ_HANDLED; +} + +#define PC_COMMAND 0x00 +#define PC_STATUS 0x04 +#define PC_DATA1 0x20 +#define PC_DATA2 0x30 +#define PC_NUMBER 0x08 +#define PC_RESP_NUMBER 0x0c +#define PC_RESULT_DATA1 0x24 +// wild guess.... +#define PC_RESULT_DATA2 0x34 + +int msm_proc_comm(unsigned cmd, unsigned *data1, unsigned *data2) +{ + unsigned long flags; + unsigned base = MSM_SHARED_RAM_BASE+0xfc100; + unsigned timeout = (2000000 / 10); + unsigned int number; + + +/* printk("msm_proc_comm(%x,%x,%x)\n", cmd, */ +/* (data1 ? *data1 : 0), */ +/* (data2 ? *data2 : 0)); */ + + // for the moment, the only commands we've identified are + // 0x17 and 0x18. In order not to break existing code, it's best + // to not do anything for other commands. + if (cmd != 0x17 && cmd !=0x18 && cmd != 0x181 && cmd != 0x182) + return -1; + + spin_lock_irqsave(&proc_comm_lock, flags); + irq6_received=0; + number = readl(base + PC_NUMBER); + writel(data1 ? *data1 : 0, base + PC_DATA1); + writel(data2 ? *data2 : 0, base + PC_DATA2); + writel(cmd, base + PC_COMMAND); + writel(number + 1, base + PC_NUMBER); + spin_unlock_irqrestore(&proc_comm_lock, flags); + notify_other_proc_comm(); + + // unclear how to fetch the command return value + // irq6 or polling PC_RESP_NUMBER + // (wince seems to poll PC_RESP_NUMBER, though) + do { + if (readl(base+PC_RESP_NUMBER) == (number+1)) { + break; + } + udelay(5); + } while (--timeout != 0); + + wait_event_interruptible(proc_comm_queue, irq6_received); + + if (readl(base + PC_STATUS) == cmd) { + if (data1) + *data1 = readl(base + PC_RESULT_DATA1); + if (data2) + *data2 = readl(base + PC_RESULT_DATA2); + } + + // wince seems to reset this + writel(0, base + PC_STATUS); + writel(0, base + PC_RESULT_DATA1); + writel(0, base + PC_RESULT_DATA2); + + return 0; +} + +// Check for changes to the FIFOs of all currently open channels. +void check_for_smd_data(void) +{ + struct smd_channel *ch; + unsigned long flags; + + spin_lock_irqsave(&smd_lock, flags); + list_for_each_entry(ch, &smd_ch_list, ch_list) { + if(ch->recv->head != ch->recv->tail) + ch->notify(ch->priv, SMD_EVENT_DATA); + if(ch->send->head != ch->send->tail) + notify_other_smd(ch->n); + } + spin_unlock_irqrestore(&smd_lock, flags); +} + +// Interrupt handler called when the ARM9 has written to us. +static irqreturn_t smd_irq_handler(int irq, void *data) +{ + D("smd: irq %d\n", irq); + /* TODO: work out which interrupt actually relates to + * each FIFO. For now, just check all of them. */ + check_for_smd_data(); + return IRQ_HANDLED; +} + +// Write data to a channel. +int smd_write(smd_channel_t *ch, const void *_data, int len) +{ + const unsigned char *buf = _data; + unsigned int myhead; + int sent = 0; + + if (ch->send == NULL) + return -ENODEV; + + if (len < 0) + return -EINVAL; + + myhead = ch->send->head; + + while (sent < len) { + ch->send->buffer[myhead] = *buf++; + + if ((sent++ % BURST_SIZE) == 0) { + ch->send->head = myhead; + ch->send->fHEAD = 1; + notify_other_smd(ch->n); + } + + myhead = (myhead + 1) % BUF_SIZE; + } + + ch->send->head = myhead; + ch->send->fHEAD = 1; + + notify_other_smd(ch->n); + + return sent; +} + +// Read data from a channel. +int smd_read(smd_channel_t *ch, void *data, int len) +{ + unsigned char *buf = data; + unsigned int mytail; + int recvd = 0; + + if (ch->recv == NULL) + return -ENODEV; + + if (len < 0) + return -EINVAL; + + mytail = ch->recv->tail; + + while (recvd < len) { + if (buf) + *buf++ = ch->recv->buffer[mytail]; + + if ((recvd++ % BURST_SIZE) == 0) { + ch->recv->tail = mytail; + ch->recv->fTAIL = 1; + notify_other_smd(ch->n); + } + + mytail = (mytail + 1) % BUF_SIZE; + } + + ch->recv->tail = mytail; + ch->recv->fTAIL = 1; + + notify_other_smd(ch->n); + + return recvd; +} + +// Set the state of a FIFO. +static void smd_set_state(volatile struct smd_fifo *hc, + unsigned state, unsigned ch) +{ + if (state == SMD_SS_OPENED) { + hc->fDSR = 1; + hc->fCTS = 1; + hc->fCD = 1; + } else { + hc->fDSR = 0; + hc->fCTS = 0; + hc->fCD = 0; + } + hc->state = state; + hc->fSTATE = 1; + notify_other_smd(ch); +} + +// Force both sides of a channel to check for data. +void smd_kick(smd_channel_t *ch) +{ + unsigned long flags; + + spin_lock_irqsave(&smd_lock, flags); + ch->notify(ch->priv, SMD_EVENT_DATA); + notify_other_smd(ch->n); + spin_unlock_irqrestore(&smd_lock, flags); +} + +// Empty default notify function. +static void do_nothing_notify(void *priv, unsigned flags) {} + +// Open an shared memory channel. +int smd_open(int n, smd_channel_t **_ch, void *priv, + void (*notify)(void *, unsigned)) +{ + struct smd_channel *ch; + unsigned long flags; + int res = 0; + + if (!smd_initialized) { + printk(KERN_INFO "smd_open() before smd_core_init()\n"); + return -ENODEV; + } + + if (notify == 0) + notify = do_nothing_notify; + + mutex_lock(&smd_creation_mutex); + + spin_lock_irqsave(&smd_lock, flags); + list_for_each_entry(ch, &smd_ch_list, ch_list) { + if (ch->n == n) { + res = -ENODEV; + break; + } + } + spin_unlock_irqrestore(&smd_lock, flags); + if (res) goto out; + + ch = kzalloc(sizeof(struct smd_channel), GFP_KERNEL); + if (ch == 0) { + res = -ENOMEM; + goto out; + } + + switch (n) { + case 0: + // AT command channel to GSM modem. + ch->send = (struct smd_fifo *)(MSM_SHARED_RAM_BASE+0x041f0); + ch->recv = (struct smd_fifo *)(MSM_SHARED_RAM_BASE+0x32418); + break; + case 1: + // Data channel to GSM modem. + ch->send = (struct smd_fifo *)(MSM_SHARED_RAM_BASE+0x12298); + ch->recv = (struct smd_fifo *)(MSM_SHARED_RAM_BASE+0x404c0); + break; + case 2: + // unknown channel 1 + ch->send = (struct smd_fifo *)(MSM_SHARED_RAM_BASE+0x8220); + ch->recv = (struct smd_fifo *)(MSM_SHARED_RAM_BASE+0x36448); + break; + case 3: + // unknown channel 2 + ch->send = (struct smd_fifo *)(MSM_SHARED_RAM_BASE+0xa238); + ch->recv = (struct smd_fifo *)(MSM_SHARED_RAM_BASE+0x38460); + break; + case 7: + // Read-only channel from GPS. + ch->send = NULL; + ch->recv = (struct smd_fifo *)(MSM_SHARED_RAM_BASE+0x545b0); + break; + default: + res = -ENODEV; + goto out; + } + + ch->priv = priv; + ch->notify = notify; + ch->n = n; + + *_ch = ch; + + // TODO: Set recv state, do other state changes... + smd_set_state(ch->send, SMD_SS_OPENED, ch->n); + + spin_lock_irqsave(&smd_lock, flags); + list_add(&ch->ch_list, &smd_ch_list); + spin_unlock_irqrestore(&smd_lock, flags); + + // Trigger handling of any data already waiting in the FIFOs. + smd_kick(ch); + +out: + mutex_unlock(&smd_creation_mutex); + return res; +} + +// Close an SMD channel. +int smd_close(smd_channel_t *ch) +{ + unsigned long flags; + + if (ch == NULL) + return -EINVAL; + + mutex_lock(&smd_creation_mutex); + spin_lock_irqsave(&smd_lock, flags); + + list_del(&ch->ch_list); + D("smd_close: closing ch %d\n", ch->n); + + spin_unlock_irqrestore(&smd_lock, flags); + mutex_unlock(&smd_creation_mutex); + + return 0; +} + +// Init for Kaiser SMD driver. +int smd_core_init(void) +{ + int r; + int i; + printk(KERN_INFO "smd_core_init()\n"); + + r = request_irq(INT_A9_M2A_6,proc_comm_isr, IRQF_TRIGGER_RISING, + "proc_comm", 0); + if(r<0) return r; + r=enable_irq_wake(INT_A9_M2A_6); + if (r < 0) + printk(KERN_ERR "smd_core_init: " + "enable_irq_wake failed for INT_A9_M2A_6\n"); + + /* TODO: These interrupts are used by the ARM9 to tell us that it has + * written to the shared memory. They are associated with particular + * channels and should really be requested only when those channels + * are opened. */ + for (i = 0; i < 6; i++) { + r = request_irq(INT_A9_M2A_0+i, smd_irq_handler, + IRQF_TRIGGER_RISING, "smd_dev", 0); + if (r < 0) + return r; + r = enable_irq_wake(INT_A9_M2A_0+i); + if (r < 0) + printk(KERN_ERR "smd_core_init: " + "enable_irq_wake failed for INT_A9_M2A_%d\n",i); + } + + smd_initialized = 1; + + printk(KERN_INFO "smd_core_init() done\n"); + + return 0; +} + +/* Generic driver glue follows below... */ + +static int __init msm_smd_probe(struct platform_device *pdev) +{ + printk(KERN_INFO "smd_init()\n"); + + if (smd_core_init()) { + printk(KERN_ERR "smd_core_init() failed\n"); + return -1; + } + + return 0; +} + +static struct platform_driver msm_smd_driver = { + .probe = msm_smd_probe, + .driver = { + .name = MODULE_NAME, + .owner = THIS_MODULE, + }, +}; + +static int __init msm_smd_init(void) +{ + return platform_driver_register(&msm_smd_driver); +} + +module_init(msm_smd_init); + +MODULE_DESCRIPTION("MSM Shared Memory Core for Kaiser"); +MODULE_AUTHOR("Martin Johnson <>"); +MODULE_LICENSE("GPL"); + +/* Unimplemented stubs for Kaiser that live here for lack of a better home... */ + +void *smem_alloc(unsigned id, unsigned size) +{ + return 0; +} +static DEFINE_SPINLOCK(smem_lock); +uint32_t smsm_get_state(void) +{ + unsigned long flags; + struct smsm_shared *smsm; + uint32_t rv; + + spin_lock_irqsave(&smem_lock, flags); + + smsm = smem_alloc(ID_SHARED_STATE, + 2 * sizeof(struct smsm_shared)); + + if (smsm) + rv = smsm[1].state; + else + rv = 0; + + spin_unlock_irqrestore(&smem_lock, flags); + + if (smsm == NULL) + printk(KERN_ERR "smsm_get_state \n"); + return rv; +} + +enum { + MSM_SMD_DEBUG = 1U << 0, + MSM_SMSM_DEBUG = 1U << 0, +}; +static int msm_smd_debug_mask; +module_param_named(debug_mask, msm_smd_debug_mask, int, S_IRUGO | S_IWUSR | S_IWGRP); + +int smsm_set_interrupt_info(struct smsm_interrupt_info *info) +{ + struct smsm_interrupt_info *ptr; + + ptr = smem_alloc(SMEM_SMSM_INT_INFO, sizeof(*ptr)); + if (ptr == NULL) { + printk(KERN_ERR "smsm_set_sleep_duration \n"); + return -EIO; + } + if (msm_smd_debug_mask & MSM_SMSM_DEBUG) + printk(KERN_INFO "smsm_set_interrupt_info %x %x -> %x %x\n", + ptr->aArm_en_mask, ptr->aArm_interrupts_pending, + info->aArm_en_mask, info->aArm_interrupts_pending); + *ptr = *info; + return 0; +} \ No newline at end of file diff --git a/arch/arm/mach-msm/tsc2003.c b/arch/arm/mach-msm/tsc2003.c new file mode 100644 index 0000000..c1bf142 --- /dev/null +++ b/arch/arm/mach-msm/tsc2003.c @@ -0,0 +1,439 @@ +/* +kaiser Touch Screen Driver +Based on TSC2003 driver by Bill Gatliff + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define DRIVER_NAME "kaiser-ts" + +enum ts_pd { + PD_POWERDOWN = 0, /* penirq */ + PD_IREFOFF_ADCON = 1, /* no penirq */ + PD_IREFON_ADCOFF = 2, /* penirq */ + PD_IREFON_ADCON = 3, /* no penirq */ + PD_PENIRQ_ARM = PD_IREFON_ADCOFF, + PD_PENIRQ_DISARM = PD_IREFON_ADCON, +}; + +enum ts_m { + M_12BIT = 0, + M_8BIT = 1 +}; + +enum ts_cmd { + MEAS_TEMP0 = 0, + MEAS_VBAT1 = 1, + MEAS_IN1 = 2, + MEAS_TEMP1 = 4, + MEAS_VBAT2 = 5, + MEAS_IN2 = 6, + ACTIVATE_NX_DRIVERS = 8, + ACTIVATE_NY_DRIVERS = 9, + ACTIVATE_YNX_DRIVERS = 10, + MEAS_XPOS = 12, + MEAS_YPOS = 13, + MEAS_Z1POS = 14, + MEAS_Z2POS = 15 +}; + +#define TS_CMD(cn,pdn,m) (((cn) << 4) | ((pdn) << 2) | ((m) << 1)) + +#define ADC_MAX ((1 << 12) - 1) + +#define MAX_X 240 +#define MAX_Y 320 + +int df_MIN_X=447; +int df_MAX_X=3807; + + +//we read Y from p1 is X < 50% +int df_MIN_Y1=864; //624 at 50% of X pos - diff ~240 +int df_MAX_Y1=2448;//2240 at 50% of X pos - diff ~220 + +//we read Y from y is X > 50% +int df_MIN_Y2=2850; +int df_MAX_Y2=3820; + +#define X_diff (df_MAX_X-df_MIN_X) +#define Y_diff ((df_MIN_Y2-df_MIN_Y1)+(df_MAX_Y2-df_MAX_Y1)) + + +struct ts_data { + struct i2c_client *client; + struct input_dev *idev; + struct timer_list penirq_timer; + struct semaphore sem; + struct task_struct *tstask; + struct completion tstask_completion; + enum ts_pd pd; + enum ts_m m; + int vbat1; + int vbat2; + int temp0; + int temp1; + int in1; + int in2; + int x; + int y; +}; + + +static inline int ts_command (struct ts_data *data, + enum ts_cmd cmd, + enum ts_pd pd) +{ + char c; + int ret; + down(&data->sem); + c = TS_CMD(cmd, pd, data->m); + ret = i2c_master_send(data->client, &c, 1); + up(&data->sem); + return ret; +} + +static int ts_read (struct ts_data *data, + enum ts_cmd cmd, + enum ts_pd pd, + int *val) +{ + char c; + char d[2]; + int ret; + + c = TS_CMD(cmd, pd, data->m); + ret = i2c_master_send(data->client, &c, 1); + + udelay(20); + ret = i2c_master_recv(data->client, d, data->m == M_12BIT ? 2 : 1); + + if (val) + { + *val = d[0]; + *val <<= 4; + if (data->m == M_12BIT) + *val += (d[1] >> 4); + } + +#if defined(CONFIG_I2C_DEBUG_CHIP) + printk(KERN_ALERT "%s: val[%x] = %d\n", + __FUNCTION__, cmd, (((int)d[0]) << 8) + d[1]); +#endif + + return 0; + if (!ret) ret = -ENODEV; + return ret; +} + +static inline int ts_read_temp0 (struct ts_data *d, enum + ts_pd pd, int *t) +{ + return ts_read(d, MEAS_TEMP0, pd, t); +} + +static inline int ts_read_temp1 (struct ts_data *d, enum + ts_pd pd, int *t) +{ + return ts_read(d, MEAS_TEMP1, pd, t); +} + +static inline int ts_read_xpos (struct ts_data *d, enum + ts_pd pd, int *x) +{ + return ts_read(d, MEAS_XPOS, pd, x); +} + +static inline int ts_read_ypos (struct ts_data *d, enum + ts_pd pd, int *y) +{ + return ts_read(d, MEAS_YPOS, pd, y); +} + +static inline int ts_read_pressure (struct ts_data *d, enum + ts_pd pd, int *p) +{ + return ts_read(d, MEAS_Z1POS, pd, p); +} + +static inline int ts_read_p2 (struct ts_data *d, enum ts_pd pd, int *p) +{ + return ts_read(d, MEAS_Z2POS, pd, p); +} +static inline int ts_read_in1 (struct ts_data *d, enum + ts_pd pd, int *t) +{ + return ts_read(d, MEAS_IN1, pd, t); +} + +static inline int ts_read_in2 (struct ts_data *d, enum + ts_pd pd, int *t) +{ + return ts_read(d, MEAS_IN2, pd, t); +} + +static inline int ts_read_vbat1 (struct ts_data *d, enum + ts_pd pd, int *t) +{ + return ts_read(d, MEAS_VBAT1, pd, t); +} + +static inline int ts_read_vbat2 (struct ts_data *d, enum + ts_pd pd, int *t) +{ + return ts_read(d, MEAS_VBAT2, pd, t); +} + +static inline int ts_powerdown (struct ts_data *d) +{ + /* we don't have a distinct powerdown command, + so do a benign read with the PD bits cleared */ + //char c=0xB2; + //return i2c_master_send(d->client, &c, 1); + return ts_read(d, 11, PD_POWERDOWN, 0); +} + +void ts_init_client (struct i2c_client *client) +{ + struct ts_data *data = i2c_get_clientdata(client); + + data->pd = PD_PENIRQ_DISARM; + data->m = M_8BIT; + return; +} + +static int tsts_thread (void *v) +{ + struct ts_data *d = v; + struct task_struct *tsk = current; + int pendown=0; + + d->tstask = tsk; + + daemonize(DRIVER_NAME "tsd"); + allow_signal(SIGKILL); + + complete(&d->tstask_completion); + + printk(KERN_INFO "%s: address 0x%x\n", + __FUNCTION__, d->client->addr); + + while (!signal_pending(tsk)) + { + unsigned int x, y, p, p1, p2; + int xc,yc,corr; + ts_read_xpos(d, PD_PENIRQ_DISARM, &x); + ts_read_ypos(d, PD_PENIRQ_DISARM, &y); + ts_read_pressure(d, PD_PENIRQ_DISARM, &p1); + ts_read_p2(d, PD_PENIRQ_DISARM, &p2); + x=ADC_MAX-x; + //y=y-2200; + //y=ADC_MAX-y; + p=((x/41)* (p2*100/p1 -100)); + + if (p > 100) { + xc = x; + xc = ((xc - df_MIN_X) * MAX_X)/(df_MAX_X-df_MIN_X); //X calibrated is ranges 0-320 + + yc = p1+xc*2; //strange but should works ;) + yc = ((yc - df_MIN_Y1) * MAX_Y)/(df_MAX_Y1-df_MIN_Y1); //X calibrated is ranges 0-320 + corr = (MAX_Y/2 - abs(MAX_Y/2 - yc))/4; + + if (d->x != xc || d->y != yc) + { + d->x = xc; + d->y = yc; +#ifdef CONFIG_INPUT_EVBUG + printk(KERN_ALERT "%d %d %d\n", xc, yc, corr); +#endif + pendown = 1; + input_report_abs(d->idev, ABS_X, xc); + input_report_abs(d->idev, ABS_Y, yc - corr); + input_report_abs(d->idev, ABS_PRESSURE, p); + input_report_key(d->idev, BTN_TOUCH, 1); + input_sync(d->idev); + } + } else if (pendown == 1) { + d->x = 0; + d->y = 0; + pendown = 0; + input_report_key(d->idev, BTN_TOUCH, 0); + input_report_abs(d->idev, ABS_PRESSURE, 0); + input_sync(d->idev); + } +#ifdef CONFIG_INPUT_EVBUG + schedule_timeout_interruptible(msecs_to_jiffies(100)); +#else + schedule_timeout_interruptible(msecs_to_jiffies(30)); +#endif + } + + d->tstask = NULL; + complete_and_exit(&d->tstask_completion, 0); +} + +static int ts_idev_open (struct input_dev *idev) +{ + struct ts_data *d = idev->private; + int ret = 0; + + if (down_interruptible(&d->sem)) + return -EINTR; + + if (d->tstask) + panic(DRIVER_NAME "tsd already running (!). abort."); + + init_completion(&d->tstask_completion); + + ret = kernel_thread(tsts_thread, d, CLONE_KERNEL); + if (ret >= 0) { + wait_for_completion(&d->tstask_completion); + ret = 0; + } + + up(&d->sem); + return ret; +} + +static void ts_idev_close (struct input_dev *idev) +{ + struct ts_data *d = idev->private; + down_interruptible(&d->sem); + if (d->tstask) + { + send_sig(SIGKILL, d->tstask, 1); + wait_for_completion(&d->tstask_completion); + } + up(&d->sem); + return; +} + +static int ts_driver_register (struct ts_data *data) +{ + int ret = 0; + + init_MUTEX(&data->sem); + + data->idev = input_allocate_device(); + if(!data->idev) + { + return -ENOMEM; + } + data->idev->private = data; + data->idev->name = DRIVER_NAME; + set_bit(EV_SYN, data->idev->evbit); + set_bit(EV_KEY, data->idev->evbit); + set_bit(BTN_TOUCH, data->idev->keybit); + set_bit(EV_ABS, data->idev->evbit); + + data->idev->open = ts_idev_open; + data->idev->close = ts_idev_close; + data->idev->absbit[ABS_X] = BIT(ABS_X); + data->idev->absbit[ABS_Y] = BIT(ABS_Y); + data->idev->absbit[ABS_PRESSURE] = BIT(ABS_PRESSURE); + input_set_abs_params(data->idev, ABS_X, 0, MAX_X, 4, 2); + input_set_abs_params(data->idev, ABS_Y, 0, MAX_Y, 4, 2); + input_set_abs_params(data->idev, ABS_PRESSURE, 0, 1, 4, 2); + + ret = input_register_device(data->idev); + if(ret) + { + input_free_device(data->idev); + return ret; + } + return ret; +} + +static int kaiser_ts_probe(struct i2c_client *client) +{ + int ret; + struct ts_data *data; + + printk(KERN_INFO "kaiser i2c touch screen\n"); + + if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { + printk(KERN_ERR "kaiser_ts_probe: need I2C_FUNC_I2C\n"); + ret = -ENODEV; + goto err; + } + data = kcalloc(1, sizeof(*data), GFP_KERNEL); + if (!data) { + ret = -ENOMEM; + goto err; + } + + data->client = client; + i2c_set_clientdata(client, data); + + ts_init_client(client); + + ts_powerdown(data); + + ret = ts_driver_register(data); + if(ret < 0) { + printk(KERN_ALERT "driver_register failed\n"); + goto err; + } + + return ret; + +err: + kfree(client); + return ret; +} + +#define kaiser_ts_suspend NULL +#define kaiser_ts_resume NULL + + +static int __devexit kaiser_ts_remove(struct i2c_client *client) +{ + printk(KERN_ALERT "raven goodbye!\n"); + struct ts_data *ts = i2c_get_clientdata(client); + input_unregister_device(ts->idev); + kfree(ts); + return 0; +} + +static struct i2c_driver kaiser_ts_driver = { + .probe = kaiser_ts_probe, + .remove = kaiser_ts_remove, + .suspend = kaiser_ts_suspend, + .resume = kaiser_ts_resume, + .driver = { + .name = DRIVER_NAME, + }, +}; + +static int __devinit kaiser_ts_init(void) +{ + printk("kaiser ts_init\n"); + return i2c_add_driver(&kaiser_ts_driver); +} + +static void __exit kaiser_ts_exit(void) +{ + i2c_del_driver(&kaiser_ts_driver); +} + +MODULE_AUTHOR("Martin Johnson <>"); +MODULE_DESCRIPTION("kaiser Touch Screen"); +MODULE_LICENSE("GPL"); + +module_init(kaiser_ts_init); +module_exit(kaiser_ts_exit); diff --git a/drivers/mfd/htc-egpio.c b/drivers/mfd/htc-egpio.c new file mode 100644 index 0000000..ce6ed71 --- /dev/null +++ b/drivers/mfd/htc-egpio.c @@ -0,0 +1,357 @@ +/* + * Support for the EGPIO chip present on several HTC phones. This + * is believed to be related to the CPLD chip present on the board. + * + * (c) Copyright 2007 Kevin O'Connor + * + * This file may be distributed under the terms of the GNU GPL license. + */ + +#include +#include /* ENODEV */ +#include /* enable_irq_wake */ +#include /* spinlock_t */ +#include /* platform_device */ +#include +#include +#include + +#include /* IRQT_RISING */ +#include /* ioremap_nocache */ +#include /* struct irq_chip */ + +struct egpio_info { + spinlock_t lock; + u16 *addrBase; + int bus_shift; + + /* irq info */ + int ackRegister; + int ackWrite; + u16 irqsEnabled; + uint irqStart; + uint chainedirq; + + /* output info */ + int maxRegs; + u16 cached_values[MAX_EGPIO_REGS]; +}; + + +/**************************************************************** + * Irqs + ****************************************************************/ + +static inline void ackirqs(struct egpio_info *ei) +{ + writew(ei->ackWrite, &ei->addrBase[ei->ackRegister << ei->bus_shift]); + /* printk("EGPIO ack\n"); */ +} + +/* There does not appear to be a way to proactively mask interrupts + * on the egpio chip itself. So, we simply ignore interrupts that + * aren't desired. */ +static void egpio_mask(unsigned int irq) +{ + struct egpio_info *ei = get_irq_chip_data(irq); + ei->irqsEnabled &= ~(1 << (irq - ei->irqStart)); + /* printk("EGPIO mask %d %04x\n", irq, ei->irqsEnabled); */ +} +static void egpio_unmask(unsigned int irq) +{ + struct egpio_info *ei = get_irq_chip_data(irq); + ei->irqsEnabled |= 1 << (irq - ei->irqStart); + /* printk("EGPIO unmask %d %04x\n", irq, ei->irqsEnabled); */ +} + +static struct irq_chip egpio_muxed_chip = { + .name = "htc-egpio", + .mask = egpio_mask, + .unmask = egpio_unmask, +}; + +static void egpio_handler(unsigned int irq, struct irq_desc *desc) +{ + struct egpio_info *ei = get_irq_data(irq); + int irqpin; + + /* Read current pins. */ + u16 readval = readw(&ei->addrBase[ei->ackRegister << ei->bus_shift]); + /* Ack/unmask interrupts. */ + ackirqs(ei); + /* Process all set pins. */ + for (irqpin=0; irqpinirqsEnabled & (1<irqStart + irqpin; + desc = &irq_desc[irq]; + desc->handle_irq(irq, desc); + } +} + +int htc_egpio_get_wakeup_irq(struct device *dev) +{ + struct egpio_info *ei = dev_get_drvdata(dev); + int irqpin; + + /* Read current pins. */ + u16 readval = readw(&ei->addrBase[ei->ackRegister << ei->bus_shift]); + /* Ack/unmask interrupts. */ + ackirqs(ei); + /* Process all set pins. */ + for (irqpin=0; irqpinirqsEnabled & (1<irqStart + irqpin; + } + return 0; +} +EXPORT_SYMBOL(htc_egpio_get_wakeup_irq); + + +/**************************************************************** + * Input pins + ****************************************************************/ + +static inline int u16pos(int bit) { + return bit/16; +} +static inline int u16bit(int bit) { + return 1<<(bit & (16-1)); +} + +/* Check an input pin to see if it is active. */ +static int egpio_get(struct device *dev, unsigned gpio) +{ + unsigned bit = gpio & GPIO_BASE_MASK; + struct egpio_info *ei = dev_get_drvdata(dev); + u16 readval = readw(&ei->addrBase[u16pos(bit) << ei->bus_shift]); + return readval & u16bit(bit); +} + +static int egpio_to_irq(struct device *dev, unsigned gpio_no) +{ + struct egpio_info *ei = dev_get_drvdata(dev); + struct htc_egpio_platform_data *pdata = dev->platform_data; + int i; + for (i=0; inr_pins; i++) { + struct htc_egpio_pinInfo *pi = &pdata->pins[i]; + if (pi->type == HTC_EGPIO_TYPE_INPUT + && pi->gpio == gpio_no + && pi->input_irq >= 0) + return (pi->input_irq & 0xf) + ei->irqStart; + } + return -ENODEV; +} + + +/**************************************************************** + * Output pins + ****************************************************************/ + +static void egpio_set(struct device *dev, unsigned gpio, int val) +{ + unsigned bit = gpio & GPIO_BASE_MASK; + struct egpio_info *ei = dev_get_drvdata(dev); + int pos = u16pos(bit); + unsigned long flag; + + spin_lock_irqsave(&ei->lock, flag); + if (val) { + ei->cached_values[pos] |= u16bit(bit); + //printk("egpio set: reg %d = 0x%04x\n", pos, ei->cached_values[pos]); + } else { + ei->cached_values[pos] &= ~u16bit(bit); + //printk("egpio clear: reg %d = 0x%04x\n", pos, ei->cached_values[pos]); + } + writew(ei->cached_values[pos], &ei->addrBase[pos << ei->bus_shift]); + spin_unlock_irqrestore(&ei->lock, flag); +} + + +/**************************************************************** + * Setup + ****************************************************************/ + +static void setup_pin(struct egpio_info *ei, struct htc_egpio_pinInfo *pi) +{ + int pin = pi->gpio & GPIO_BASE_MASK; + + if (pi->gpio < 0 || pin > 16*MAX_EGPIO_REGS) { + printk(KERN_ERR "EGPIO invalid pin %d\n", pi->gpio); + return; + } + + switch (pi->type) { + case HTC_EGPIO_TYPE_INPUT: + if (pi->input_irq < 0) + break; + pin = pi->input_irq & GPIO_BASE_MASK; + if (ei->ackRegister != u16pos(pin)) { + printk(KERN_ERR "EGPIO irq conflict %d vs %d\n" + , ei->ackRegister, u16pos(pin)); + return; + } + break; + case HTC_EGPIO_TYPE_OUTPUT: + if (ei->maxRegs < u16pos(pin)) + ei->maxRegs = u16pos(pin); + if (pi->output_initial) + ei->cached_values[u16pos(pin)] |= u16bit(pin); + break; + default: + printk(KERN_ERR "EGPIO unknown type %d\n", pi->type); + } +} + +static int egpio_probe(struct platform_device *pdev) +{ + struct htc_egpio_platform_data *pdata = pdev->dev.platform_data; + struct resource *res; + struct egpio_info *ei; + int irq, i, ret; + struct gpio_ops ops; + + /* Initialize ei data structure. */ + ei = kzalloc(sizeof(*ei), GFP_KERNEL); + if (!ei) + return -ENOMEM; + + spin_lock_init(&ei->lock); + + /* Find chained irq */ + ret = -EINVAL; + res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); + if (res) + ei->chainedirq = res->start; + + /* Map egpio chip into virtual address space. */ + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) + goto fail; + ei->addrBase = (u16 *)ioremap_nocache(res->start, res->end - res->start); + if (!ei->addrBase) + goto fail; + printk(KERN_NOTICE "EGPIO phys=0x%08X virt=%p\n", res->start, (unsigned int)ei->addrBase); + ei->bus_shift = pdata->bus_shift; + + platform_set_drvdata(pdev, ei); + + ops.get_value = egpio_get; + ops.set_value = egpio_set; + ops.to_irq = egpio_to_irq; + gpiodev_register(pdata->gpio_base, &pdev->dev, &ops); + + /* Go through list of pins. */ + ei->irqStart = pdata->irq_base; + ei->maxRegs = pdata->nrRegs - 1; + ei->ackRegister = pdata->ackRegister; + for (i = 0; i < pdata->nr_pins; i++) + setup_pin(ei, &pdata->pins[i]); + + if (ei->chainedirq) { + /* Setup irq handlers */ + ei->ackWrite = 0xFFFF; + if (pdata->invertAcks) + ei->ackWrite = 0; + for (irq = ei->irqStart; irq < ei->irqStart+MAX_EGPIO_IRQS; irq++) { + set_irq_chip(irq, &egpio_muxed_chip); + set_irq_chip_data(irq, ei); + set_irq_handler(irq, handle_simple_irq); + set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); + } + set_irq_type(ei->chainedirq, IRQT_RISING); + set_irq_data(ei->chainedirq, ei); + set_irq_chained_handler(ei->chainedirq, egpio_handler); + ackirqs(ei); + + device_init_wakeup(&pdev->dev, 1); + } + + /* Setup initial output pin values. */ + for (i = 0; i<=ei->maxRegs; i++) + if (i != ei->ackRegister) + writew(ei->cached_values[i], &ei->addrBase[i << ei->bus_shift]); + + return 0; + +fail: + printk(KERN_NOTICE "EGPIO failed to setup\n"); + kfree(ei); + return ret; +} + +static int egpio_remove(struct platform_device *pdev) +{ + struct egpio_info *ei = platform_get_drvdata(pdev); + unsigned int irq; + if (ei->chainedirq) { + for (irq = ei->irqStart; irq < ei->irqStart+MAX_EGPIO_IRQS; irq++) { + set_irq_chip(irq, NULL); + set_irq_handler(irq, NULL); + set_irq_flags(irq, 0); + } + set_irq_chained_handler(ei->chainedirq, NULL); + device_init_wakeup(&pdev->dev, 0); + } + iounmap(ei->addrBase); + kfree(ei); + + return 0; +} + +#ifdef CONFIG_PM +static int egpio_suspend(struct platform_device *pdev, pm_message_t state) +{ + struct egpio_info *ei = platform_get_drvdata(pdev); + + if (ei->chainedirq && device_may_wakeup(&pdev->dev)) + enable_irq_wake(ei->chainedirq); + return 0; +} + +static int egpio_resume(struct platform_device *pdev) +{ + struct egpio_info *ei = platform_get_drvdata(pdev); + + if (ei->chainedirq && device_may_wakeup(&pdev->dev)) + disable_irq_wake(ei->chainedirq); + return 0; +} +#else +#define egpio_suspend NULL +#define egpio_resume NULL +#endif + + +static struct platform_driver egpio_driver = { + .driver = { + .name = "htc-egpio", + }, + .probe = egpio_probe, + .remove = egpio_remove, + .suspend = egpio_suspend, + .resume = egpio_resume, +}; + +static int __init egpio_init(void) +{ + return platform_driver_register(&egpio_driver); +} + +static void __exit egpio_exit(void) +{ + platform_driver_unregister(&egpio_driver); +} + +#ifdef MODULE +module_init(egpio_init); +#else /* start early for dependencies */ +subsys_initcall(egpio_init); +#endif +module_exit(egpio_exit) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Kevin O'Connor "); diff --git a/drivers/rtc/rtc-msm7x00.c b/drivers/rtc/rtc-msm7x00.c new file mode 100644 index 0000000..cf16332 --- /dev/null +++ b/drivers/rtc/rtc-msm7x00.c @@ -0,0 +1,100 @@ +/* drivers/rtc/rtc-msm7x00.c + * + * Author: Martin Johnson + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include +#include + +#include +#include +#include +#include +#include + +#define PDEV_NAME "msm_rtc" + +#define SECSFROM_1970_TO_1980 315532800 + +struct rtc_device *rtc; + +int msm_proc_comm(unsigned cmd, unsigned data1, unsigned data2); + +static int +msmrtc_pmlib_set_time(struct device *dev, struct rtc_time *tm) +{ + unsigned long unix_time; + + if (rtc_valid_tm(tm)) + return -EINVAL; + + rtc_tm_to_time(tm, &unix_time); + unix_time=unix_time-SECSFROM_1970_TO_1980; // MSM RTC starts 10 years after unix time + + msm_proc_comm(0x182,unix_time,0); + + return 0; +} + +static int +msmrtc_pmlib_read_time(struct device *dev, struct rtc_time *tm) +{ + unsigned long secs; + + secs=msm_proc_comm(0x181,0,0); + secs=secs+SECSFROM_1970_TO_1980; // MSM RTC starts 10 years after unix time + rtc_time_to_tm(secs, tm); + return 0; +} + +static struct rtc_class_ops msm_rtc_ops = { + .read_time = msmrtc_pmlib_read_time, + .set_time = msmrtc_pmlib_set_time, +}; + +static int +msmrtc_probe(struct platform_device *pdev) +{ + printk("RTC probe\n"); + rtc = rtc_device_register("msm_rtc", + &pdev->dev, + &msm_rtc_ops, + THIS_MODULE); + if (IS_ERR(rtc)) { + printk(KERN_ERR "%s: Can't register RTC device (%ld)\n", + pdev->name, PTR_ERR(rtc)); + return PTR_ERR(rtc); + } + printk("MSM RTC started\n"); + return 0; +} + + +static struct platform_driver msmrtc_driver = { + .probe = msmrtc_probe, + .driver = { + .name = "msm_rtc", + }, +}; + +static int __init msmrtc_init(void) +{ + printk("MSM RTC init\n"); + return platform_driver_register(&msmrtc_driver); +} + +module_init(msmrtc_init); + +MODULE_DESCRIPTION("RTC driver for Qualcomm MSM7x00 chipsets"); +MODULE_AUTHOR("Martin Johnson "); +MODULE_LICENSE("GPL"); diff --git a/include/linux/gpiodev2.h b/include/linux/gpiodev2.h new file mode 100644 index 0000000..5a78895 --- /dev/null +++ b/include/linux/gpiodev2.h @@ -0,0 +1,72 @@ +#ifndef __GPIODEV2_H +#define __GPIODEV2_H + +#include + +struct gpio_ops { + struct device *this; + int (*get_value)(struct device *this, unsigned gpio_no); + void (*set_value)(struct device *this, unsigned gpio_no, int val); + int (*to_irq)(struct device *this, unsigned gpio_no); +}; + +#define GPIO_BASE_INCREMENT 0x100 +#define GPIO_BASE_MASK 0xff + +extern struct gpio_ops gpio_desc[16]; + +/* API functions */ + +static inline void gpiodev_register(unsigned gpio_base, struct device *this, struct gpio_ops *ops) +{ + int i = gpio_base >> 8; + gpio_desc[i].this = this; + gpio_desc[i].get_value = ops->get_value; + gpio_desc[i].set_value = ops->set_value; + gpio_desc[i].to_irq = ops->to_irq; +} + +static inline int gpiodev2_get_value(unsigned gpio) +{ + int (*get_value)(struct device *this, unsigned gpio_no); + int i = gpio >> 8; + get_value = gpio_desc[i].get_value; + if (!get_value) { + printk(KERN_ERR "gpio_get_value() call for uninitialized GPIO device\n"); + BUG(); + return 0; + } + + return get_value(gpio_desc[i].this, gpio); +} + +static inline void gpiodev2_set_value(unsigned gpio, int val) +{ + void (*set_value)(struct device *this, unsigned gpio_no, int val); + int i = gpio >> 8; + set_value = gpio_desc[gpio >> 8].set_value; + if (!set_value) { + printk(KERN_ERR "gpio_set_value() call for uninitialized GPIO device\n"); + BUG(); + return; + } + + return set_value(gpio_desc[i].this, gpio, val); +} + +static inline int gpiodev2_to_irq(unsigned gpio) +{ + int (*to_irq)(struct device *this, unsigned gpio_no); + int i = gpio >> 8; + to_irq = gpio_desc[gpio >> 8].to_irq; + if (!to_irq) { + printk(KERN_ERR "gpio_to_irq() call for uninitialized GPIO device\n"); + BUG(); + return 0; + } + + return to_irq(gpio_desc[i].this, gpio); +} + + +#endif /* __GPIODEV2_H */ diff --git a/include/linux/mfd/htc-egpio.h b/include/linux/mfd/htc-egpio.h new file mode 100644 index 0000000..5776ecb --- /dev/null +++ b/include/linux/mfd/htc-egpio.h @@ -0,0 +1,63 @@ +/* + * HTC simple EGPIO irq and gpio extender + */ + +#ifndef __HTC_EGPIO_H__ +#define __HTC_EGPIO_H__ + +enum { + /* Maximum number of 16 bit registers a chip may have. */ + MAX_EGPIO_REGS = 9, + /* Number of IRQS the EGPIO chip will claim. */ + MAX_EGPIO_IRQS = 16, +}; + +/* Available pin types. */ +enum { + /* This pin corresponds to an input gpio */ + HTC_EGPIO_TYPE_INPUT, + /* This pin corresponds to an output gpio */ + HTC_EGPIO_TYPE_OUTPUT, +}; + +/* Information on each pin on the chip. */ +struct htc_egpio_pinInfo { + /* The gpio id of the pin (eg, gpio_base+18 is the third bit + * of the second register). */ + int gpio; + /* The type - input, irq, output */ + int type; + /* For output pins - the poweron default */ + int output_initial; + /* For input pins with a corresponding irq, the irqs bit offset. */ + int input_irq; +}; + +/* Platform data description provided by the arch */ +struct htc_egpio_platform_data { + /* Beginning of available irqs (eg, IRQ_BOARD_START) */ + int irq_base; + /* Beginning of available gpios (eg, GPIO_BASE_INCREMENT) */ + int gpio_base; + /* Shift register number by this value (bus_shift=1 for 32bit register alignment) */ + int bus_shift; + /* Set if chip requires writing '0' to ack an irq */ + int invertAcks; + /* Number of registers (optional if all output pins specified + * below) */ + int nrRegs; + /* The location of the irq ack register */ + int ackRegister; + + /* List of pin descriptions. One must specify all input pins + * that have a corresponding irq pin and all output pins with + * a non-zero start value. Specifying other pins is + * optional. */ + struct htc_egpio_pinInfo *pins; + int nr_pins; +}; + +/* Determine the wakeup irq, to be called during early resume */ +extern int htc_egpio_get_wakeup_irq(struct device *dev); + +#endif