omap24xx: remove 2.6.38 support

SVN-Revision: 31426
This commit is contained in:
Gabor Juhos 2012-04-21 17:16:40 +00:00
parent 76448ed5cf
commit 96b5d437d6
32 changed files with 0 additions and 12106 deletions

View file

@ -1,704 +0,0 @@
# CONFIG_AD2S120X is not set
# CONFIG_AD2S1210 is not set
# CONFIG_AD2S90 is not set
# CONFIG_AD5446 is not set
# CONFIG_AD5624R_SPI is not set
# CONFIG_AD5930 is not set
# CONFIG_AD7150 is not set
# CONFIG_AD7152 is not set
# CONFIG_AD7291 is not set
# CONFIG_AD7298 is not set
# CONFIG_AD7314 is not set
# CONFIG_AD7476 is not set
# CONFIG_AD7745 is not set
# CONFIG_AD7816 is not set
# CONFIG_AD7887 is not set
# CONFIG_AD799X is not set
# CONFIG_AD9832 is not set
# CONFIG_AD9834 is not set
# CONFIG_AD9850 is not set
# CONFIG_AD9852 is not set
# CONFIG_AD9910 is not set
# CONFIG_AD9951 is not set
# CONFIG_ADE7753 is not set
# CONFIG_ADE7754 is not set
# CONFIG_ADE7758 is not set
# CONFIG_ADE7759 is not set
# CONFIG_ADE7854 is not set
# CONFIG_ADIS16060 is not set
# CONFIG_ADIS16080 is not set
# CONFIG_ADIS16130 is not set
CONFIG_ADIS16201=m
CONFIG_ADIS16203=m
CONFIG_ADIS16204=m
# CONFIG_ADIS16209 is not set
# CONFIG_ADIS16220 is not set
# CONFIG_ADIS16240 is not set
# CONFIG_ADIS16251 is not set
# CONFIG_ADIS16260 is not set
# CONFIG_ADIS16300 is not set
# CONFIG_ADIS16350 is not set
# CONFIG_ADIS16400 is not set
# CONFIG_ADT7310 is not set
# CONFIG_ADT7316 is not set
# CONFIG_ADT7410 is not set
# CONFIG_ADT75 is not set
CONFIG_ALIGNMENT_TRAP=y
CONFIG_APM_EMULATION=y
CONFIG_ARCH_HAS_CPUFREQ=y
CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y
CONFIG_ARCH_OMAP=y
# CONFIG_ARCH_OMAP1 is not set
CONFIG_ARCH_OMAP2=y
CONFIG_ARCH_OMAP2420=y
# CONFIG_ARCH_OMAP2430 is not set
CONFIG_ARCH_OMAP2PLUS=y
CONFIG_ARCH_OMAP2PLUS_TYPICAL=y
# CONFIG_ARCH_OMAP3 is not set
# CONFIG_ARCH_OMAP4 is not set
CONFIG_ARCH_OMAP_OTG=y
CONFIG_ARCH_REQUIRE_GPIOLIB=y
# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
# CONFIG_ARCH_SUPPORTS_MSI is not set
CONFIG_ARCH_SUSPEND_POSSIBLE=y
# CONFIG_ARCH_USES_GETTIMEOFFSET is not set
CONFIG_ARM=y
CONFIG_ARM_ERRATA_411920=y
CONFIG_ARM_L1_CACHE_SHIFT=5
CONFIG_ARM_THUMB=y
CONFIG_ARM_UNWIND=y
# CONFIG_ARPD is not set
CONFIG_ATAGS_PROC=y
# CONFIG_AUTO_IRQ_AFFINITY is not set
CONFIG_BINFMT_MISC=y
# CONFIG_BKL is not set
# CONFIG_BLK_CGROUP is not set
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_SD=y
CONFIG_BRIDGE=m
CONFIG_BT=m
CONFIG_BT_BNEP=m
# CONFIG_BT_BNEP_MC_FILTER is not set
# CONFIG_BT_BNEP_PROTO_FILTER is not set
# CONFIG_BT_HCIH4P is not set
CONFIG_BT_HCIUART=m
# CONFIG_BT_HCIUART_BCSP is not set
CONFIG_BT_HIDP=m
CONFIG_BT_L2CAP=m
CONFIG_BT_RFCOMM=m
# CONFIG_BT_RFCOMM_TTY is not set
CONFIG_BT_SCO=m
CONFIG_CBUS=y
CONFIG_CBUS_RETU=y
CONFIG_CBUS_RETU_HEADSET=y
CONFIG_CBUS_RETU_POWERBUTTON=y
CONFIG_CBUS_RETU_WDT=y
CONFIG_CBUS_TAHVO=y
# CONFIG_CBUS_TAHVO_USB is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_CGROUPS=y
# CONFIG_CGROUP_CPUACCT is not set
# CONFIG_CGROUP_DEBUG is not set
# CONFIG_CGROUP_DEVICE is not set
# CONFIG_CGROUP_FREEZER is not set
# CONFIG_CGROUP_NS is not set
CONFIG_CGROUP_SCHED=y
CONFIG_CLKDEV_LOOKUP=y
CONFIG_CMDLINE="root=/dev/mmcblk0p1 rootfstype=ext4,ext3,ext2,squashfs,jffs2 console=tty0 console=ttyO2,115200n8 earlyprintk"
CONFIG_CMDLINE_FORCE=y
CONFIG_CONSOLE_TRANSLATIONS=y
# CONFIG_CPUSETS is not set
CONFIG_CPU_32v6=y
# CONFIG_CPU_32v6K is not set
CONFIG_CPU_ABRT_EV6=y
# CONFIG_CPU_BPREDICT_DISABLE is not set
CONFIG_CPU_CACHE_V6=y
CONFIG_CPU_CACHE_VIPT=y
CONFIG_CPU_COPY_V6=y
CONFIG_CPU_CP15=y
CONFIG_CPU_CP15_MMU=y
CONFIG_CPU_FREQ=y
# CONFIG_CPU_FREQ_DEBUG is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_STAT=y
# CONFIG_CPU_FREQ_STAT_DETAILS is not set
CONFIG_CPU_FREQ_TABLE=y
CONFIG_CPU_HAS_ASID=y
CONFIG_CPU_HAS_PMU=y
# CONFIG_CPU_ICACHE_DISABLE is not set
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
CONFIG_CPU_PABRT_V6=y
CONFIG_CPU_TLB_V6=y
CONFIG_CPU_USE_DOMAINS=y
CONFIG_CPU_V6=y
CONFIG_CRC16=y
CONFIG_CRC7=y
CONFIG_CRC_CCITT=y
CONFIG_CRC_ITU_T=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_ARC4=m
CONFIG_CRYPTO_BLKCIPHER=m
CONFIG_CRYPTO_BLKCIPHER2=y
CONFIG_CRYPTO_CBC=m
CONFIG_CRYPTO_DES=m
CONFIG_CRYPTO_DEV_OMAP_AES=y
CONFIG_CRYPTO_DEV_OMAP_SHAM=y
CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_HW=y
CONFIG_CRYPTO_MANAGER=m
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_PCOMP2=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_WORKQUEUE=y
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_ERRORS=y
# CONFIG_DEBUG_FS is not set
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_USER is not set
CONFIG_DEFAULT_CFQ=y
CONFIG_DEFAULT_IOSCHED="cfq"
CONFIG_DEFAULT_TCP_CONG="cubic"
CONFIG_DEVKMEM=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_DNOTIFY=y
CONFIG_DNS_RESOLVER=y
CONFIG_DUMMY_CONSOLE=y
# CONFIG_ECRYPT_FS is not set
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_EXPERT=y
CONFIG_EXPORTFS=m
CONFIG_EXT4_FS=y
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_FAT_FS=y
CONFIG_FB=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_IMAGEBLIT=y
CONFIG_FB_OMAP=y
# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=2
CONFIG_FB_OMAP_LCDC_BLIZZARD=y
CONFIG_FB_OMAP_LCDC_EXTERNAL=y
# CONFIG_FB_OMAP_LCDC_HWA742 is not set
CONFIG_FB_OMAP_LCD_MIPID=y
# CONFIG_FB_OMAP_MANUAL_UPDATE is not set
# CONFIG_FB_SM7XX is not set
# CONFIG_FB_WMT_GE_ROPS is not set
# CONFIG_FIRMWARE_EDID is not set
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_FONTS=y
# CONFIG_FONT_10x18 is not set
# CONFIG_FONT_6x11 is not set
# CONFIG_FONT_7x14 is not set
CONFIG_FONT_8x16=y
CONFIG_FONT_8x8=y
# CONFIG_FONT_ACORN_8x8 is not set
# CONFIG_FONT_MINI_4x6 is not set
# CONFIG_FONT_PEARL_8x8 is not set
# CONFIG_FONT_SUN12x22 is not set
# CONFIG_FONT_SUN8x16 is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
CONFIG_FREEZER=y
CONFIG_FS_MBCACHE=y
CONFIG_FS_POSIX_ACL=y
CONFIG_GENERIC_ACL=y
CONFIG_GENERIC_ATOMIC64=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_GENERIC_FIND_LAST_BIT=y
CONFIG_GENERIC_GPIO=y
# CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED is not set
# CONFIG_GENERIC_PENDING_IRQ is not set
CONFIG_GPIOLIB=y
CONFIG_GPIO_SYSFS=y
# CONFIG_HAMRADIO is not set
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_HAS_DMA=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAVE_AOUT=y
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_HAVE_CLK=y
CONFIG_HAVE_C_RECORDMCOUNT=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_HAVE_GENERIC_HARDIRQS=y
CONFIG_HAVE_IDE=y
CONFIG_HAVE_IRQ_WORK=y
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_HAVE_MEMBLOCK=y
CONFIG_HAVE_MTD_OTP=y
CONFIG_HAVE_OPROFILE=y
CONFIG_HAVE_PERF_EVENTS=y
CONFIG_HAVE_PROC_CPU=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_SCHED_CLOCK=y
CONFIG_HAVE_SPARSE_IRQ=y
CONFIG_HID=y
CONFIG_HID_APPLE=m
CONFIG_HID_SUPPORT=y
CONFIG_HID_WACOM=m
# CONFIG_HID_WACOM_POWER_SUPPLY is not set
CONFIG_HWMON=m
# CONFIG_HWMON_DEBUG_CHIP is not set
CONFIG_HW_CONSOLE=y
CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_OMAP=y
CONFIG_HZ=128
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_COMPAT=y
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_OMAP=y
CONFIG_IIO=y
# CONFIG_IIO_RING_BUFFER is not set
# CONFIG_IIO_TRIGGER is not set
CONFIG_INET6_XFRM_MODE_BEET=m
CONFIG_INET6_XFRM_MODE_TRANSPORT=m
CONFIG_INET6_XFRM_MODE_TUNNEL=m
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
CONFIG_INET_TUNNEL=m
# CONFIG_INLINE_READ_UNLOCK is not set
# CONFIG_INLINE_READ_UNLOCK_IRQ is not set
# CONFIG_INLINE_SPIN_UNLOCK is not set
# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set
# CONFIG_INLINE_WRITE_UNLOCK is not set
# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set
CONFIG_INOTIFY_USER=y
CONFIG_INPUT=y
# CONFIG_INPUT_APMPOWER is not set
CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_GPIO_BUTTONS is not set
CONFIG_INPUT_JOYSTICK=y
CONFIG_INPUT_KEYBOARD=y
CONFIG_INPUT_MOUSE=y
CONFIG_INPUT_MOUSEDEV=y
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
CONFIG_INPUT_MOUSEDEV_SCREEN_X=800
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
CONFIG_INPUT_TABLET=y
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_IOSCHED_DEADLINE is not set
CONFIG_IPV6=y
CONFIG_IPV6_MIP6=m
CONFIG_IPV6_PRIVACY=y
CONFIG_IPV6_ROUTER_PREF=y
CONFIG_IPV6_SIT=m
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_IRQ_PER_CPU is not set
CONFIG_IR_LIRC_CODEC=m
CONFIG_IR_RC5_SZ_DECODER=m
# CONFIG_ISDN is not set
# CONFIG_ISP1301_OMAP is not set
CONFIG_JBD2=y
CONFIG_JFFS2_LZO=y
CONFIG_JFFS2_ZLIB=y
# CONFIG_JOYSTICK_A3D is not set
# CONFIG_JOYSTICK_ADI is not set
# CONFIG_JOYSTICK_ANALOG is not set
# CONFIG_JOYSTICK_AS5011 is not set
# CONFIG_JOYSTICK_COBRA is not set
# CONFIG_JOYSTICK_GF2K is not set
# CONFIG_JOYSTICK_GRIP is not set
# CONFIG_JOYSTICK_GRIP_MP is not set
# CONFIG_JOYSTICK_GUILLEMOT is not set
# CONFIG_JOYSTICK_IFORCE is not set
# CONFIG_JOYSTICK_INTERACT is not set
# CONFIG_JOYSTICK_JOYDUMP is not set
# CONFIG_JOYSTICK_MAGELLAN is not set
# CONFIG_JOYSTICK_SIDEWINDER is not set
# CONFIG_JOYSTICK_SPACEBALL is not set
# CONFIG_JOYSTICK_SPACEORB is not set
# CONFIG_JOYSTICK_STINGER is not set
# CONFIG_JOYSTICK_TMDC is not set
# CONFIG_JOYSTICK_TWIDJOY is not set
# CONFIG_JOYSTICK_WARRIOR is not set
# CONFIG_JOYSTICK_XPAD is not set
# CONFIG_JOYSTICK_ZHENHUA is not set
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_KEXEC=y
# CONFIG_KEYBOARD_GPIO is not set
CONFIG_KEYBOARD_LM8323=y
# CONFIG_KEYBOARD_OMAP is not set
CONFIG_KEYS=y
# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
# CONFIG_KXSD9 is not set
# CONFIG_LEDS is not set
# CONFIG_LEDS_GPIO is not set
# CONFIG_LEDS_REGULATOR is not set
CONFIG_LEDS_TRIGGER_BACKLIGHT=y
CONFIG_LEDS_TRIGGER_GPIO=y
CONFIG_LIRC=m
# CONFIG_LIS3L02DQ is not set
CONFIG_LLC=m
CONFIG_LOCKD=m
CONFIG_LOG_BUF_SHIFT=18
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
CONFIG_MACH_NOKIA_N800=y
CONFIG_MACH_NOKIA_N810=y
CONFIG_MACH_NOKIA_N810_WIMAX=y
CONFIG_MACH_NOKIA_N8X0=y
CONFIG_MACH_NO_WESTBRIDGE=y
CONFIG_MACH_OMAP2_TUSB6010=y
# CONFIG_MACH_OMAP_APOLLON is not set
# CONFIG_MACH_OMAP_GENERIC is not set
# CONFIG_MACH_OMAP_H4 is not set
CONFIG_MACVLAN=m
CONFIG_MAC_PARTITION=y
# CONFIG_MAX1363 is not set
CONFIG_MEDIA_ATTACH=y
CONFIG_MEDIA_SUPPORT=m
CONFIG_MEDIA_TUNER=m
CONFIG_MEDIA_TUNER_MC44S803=m
CONFIG_MEDIA_TUNER_MT20XX=m
CONFIG_MEDIA_TUNER_SIMPLE=m
CONFIG_MEDIA_TUNER_TDA18271=m
CONFIG_MEDIA_TUNER_TDA827X=m
CONFIG_MEDIA_TUNER_TDA8290=m
CONFIG_MEDIA_TUNER_TDA9887=m
CONFIG_MEDIA_TUNER_TEA5761=m
CONFIG_MEDIA_TUNER_TEA5767=m
CONFIG_MEDIA_TUNER_XC2028=m
CONFIG_MEDIA_TUNER_XC5000=m
CONFIG_MENELAUS=y
# CONFIG_MFD_T7L66XB is not set
# CONFIG_MFD_WL1273_CORE is not set
# CONFIG_MISC_DEVICES is not set
CONFIG_MMC=y
CONFIG_MMC_BLOCK=y
CONFIG_MMC_OMAP=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SPI=y
CONFIG_MMC_UNSAFE_RESUME=y
# CONFIG_MOUSE_BCM5974 is not set
# CONFIG_MOUSE_GPIO is not set
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_PS2_ALPS=y
# CONFIG_MOUSE_PS2_ELANTECH is not set
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
CONFIG_MOUSE_PS2_TRACKPOINT=y
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_VSXXXAA is not set
CONFIG_MSDOS_FS=y
CONFIG_MTD_BLOCK2MTD=y
# CONFIG_MTD_CFI is not set
CONFIG_MTD_CMDLINE_PARTS=y
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
CONFIG_MTD_ONENAND=y
# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
# CONFIG_MTD_ONENAND_GENERIC is not set
CONFIG_MTD_ONENAND_OMAP2=y
CONFIG_MTD_ONENAND_OTP=y
# CONFIG_MTD_ONENAND_SIM is not set
# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set
# CONFIG_MTD_ROOTFS_ROOT_DEV is not set
# CONFIG_MTD_ROOTFS_SPLIT is not set
# CONFIG_MUSB_PIO_ONLY is not set
# CONFIG_N810BM is not set
CONFIG_NAMESPACES=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_PER_CPU_KM=y
CONFIG_NETDEV_10000=y
# CONFIG_NET_NS is not set
# CONFIG_NET_SCHED is not set
CONFIG_NFSD=m
CONFIG_NFSD_DEPRECATED=y
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
CONFIG_NFS_ACL_SUPPORT=m
CONFIG_NFS_FS=m
CONFIG_NFS_USE_KERNEL_DNS=y
# CONFIG_NFS_USE_LEGACY_DNS is not set
# CONFIG_NFS_USE_NEW_IDMAPPER is not set
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
CONFIG_NFS_V4_1=y
CONFIG_NLS=y
CONFIG_NOP_USB_XCEIV=m
CONFIG_NO_HZ=y
# CONFIG_OMAP2_DSS is not set
CONFIG_OMAP_32K_TIMER=y
CONFIG_OMAP_32K_TIMER_HZ=128
CONFIG_OMAP_BOOT_REASON=y
CONFIG_OMAP_BOOT_TAG=y
CONFIG_OMAP_COMPONENT_VERSION=y
CONFIG_OMAP_DM_TIMER=y
CONFIG_OMAP_GPIO_SWITCH=y
CONFIG_OMAP_MBOX_FWK=y
CONFIG_OMAP_MBOX_KFIFO_SIZE=256
CONFIG_OMAP_MCBSP=y
CONFIG_OMAP_MUX=y
# CONFIG_OMAP_MUX_DEBUG is not set
CONFIG_OMAP_MUX_WARNINGS=y
CONFIG_OMAP_PACKAGE_ZAC=y
# CONFIG_OMAP_PM_NONE is not set
CONFIG_OMAP_PM_NOOP=y
CONFIG_OMAP_RESET_CLOCKS=y
# CONFIG_OMAP_WATCHDOG is not set
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_PAGE_OFFSET=0xC0000000
# CONFIG_PCI_SYSCALL is not set
CONFIG_PERF_USE_VMALLOC=y
CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
CONFIG_PM_OPS=y
CONFIG_PM_RUNTIME=y
CONFIG_PM_SLEEP=y
CONFIG_PNFS_FILE_LAYOUT=m
CONFIG_POSIX_MQUEUE=y
CONFIG_POSIX_MQUEUE_SYSCTL=y
CONFIG_PPP=m
CONFIG_PPP_ASYNC=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_MPPE=m
# CONFIG_PPP_MULTILINK is not set
CONFIG_PPP_SYNC_TTY=m
CONFIG_PREEMPT=y
# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_RCU=y
CONFIG_PRINTK_TIME=y
CONFIG_PROC_PAGE_MONITOR=y
# CONFIG_QUOTACTL is not set
# CONFIG_RCU_BOOST is not set
CONFIG_RC_CORE=m
# CONFIG_RC_LOOPBACK is not set
CONFIG_REGULATOR=y
# CONFIG_REGULATOR_AD5398 is not set
# CONFIG_REGULATOR_DEBUG is not set
# CONFIG_REGULATOR_DUMMY is not set
# CONFIG_REGULATOR_ISL6271A is not set
# CONFIG_REGULATOR_LP3971 is not set
# CONFIG_REGULATOR_LP3972 is not set
# CONFIG_REGULATOR_MAX1586 is not set
# CONFIG_REGULATOR_MAX8649 is not set
# CONFIG_REGULATOR_MAX8660 is not set
# CONFIG_REGULATOR_MAX8952 is not set
# CONFIG_REGULATOR_TPS65023 is not set
# CONFIG_REGULATOR_TPS6507X is not set
# CONFIG_REGULATOR_TPS6524X is not set
# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
# CONFIG_RESOURCE_COUNTERS is not set
CONFIG_RPCSEC_GSS_KRB5=m
# CONFIG_RT_GROUP_SCHED is not set
CONFIG_SCHED_AUTOGROUP=y
CONFIG_SCSI=y
# CONFIG_SCSI_LOWLEVEL is not set
# CONFIG_SDIO_UART is not set
# CONFIG_SENSORS_AK8975 is not set
# CONFIG_SENSORS_HMC5843 is not set
# CONFIG_SENSORS_ISL29018 is not set
CONFIG_SENSORS_LM75=m
CONFIG_SENSORS_TSL2563=m
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_IFX6X60 is not set
CONFIG_SERIAL_OMAP=y
CONFIG_SERIAL_OMAP_CONSOLE=y
CONFIG_SERIO=y
CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_PS2MULT is not set
# CONFIG_SERIO_RAW is not set
CONFIG_SERIO_SERPORT=y
# CONFIG_SLAB is not set
CONFIG_SLHC=m
CONFIG_SLUB=y
CONFIG_SND=m
CONFIG_SND_ARM=y
# CONFIG_SND_EMU10K1_SEQ is not set
CONFIG_SND_JACK=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_OMAP_SOC=m
CONFIG_SND_OMAP_SOC_MCBSP=m
CONFIG_SND_OMAP_SOC_N810=m
# CONFIG_SND_OPL3_LIB_SEQ is not set
# CONFIG_SND_OPL4_LIB_SEQ is not set
CONFIG_SND_PCM=m
CONFIG_SND_PCM_OSS=m
# CONFIG_SND_RAWMIDI_SEQ is not set
# CONFIG_SND_SBAWE_SEQ is not set
CONFIG_SND_SOC=m
# CONFIG_SND_SOC_ALL_CODECS is not set
CONFIG_SND_SOC_CACHE_LZO=y
CONFIG_SND_SOC_I2C_AND_SPI=m
CONFIG_SND_SOC_TLV320AIC3X=m
CONFIG_SND_SPI=y
CONFIG_SND_SUPPORT_OLD_API=y
CONFIG_SND_TIMER=m
CONFIG_SOUND=m
CONFIG_SOUND_OSS_CORE=y
CONFIG_SOUND_OSS_CORE_PRECLAIM=y
CONFIG_SPEAKUP=m
CONFIG_SPEAKUP_SYNTH_ACNTPC=m
CONFIG_SPEAKUP_SYNTH_ACNTSA=m
CONFIG_SPEAKUP_SYNTH_APOLLO=m
CONFIG_SPEAKUP_SYNTH_AUDPTR=m
CONFIG_SPEAKUP_SYNTH_BNS=m
CONFIG_SPEAKUP_SYNTH_DECEXT=m
CONFIG_SPEAKUP_SYNTH_DECPC=m
CONFIG_SPEAKUP_SYNTH_DECTLK=m
CONFIG_SPEAKUP_SYNTH_DTLK=m
CONFIG_SPEAKUP_SYNTH_DUMMY=m
CONFIG_SPEAKUP_SYNTH_KEYPC=m
CONFIG_SPEAKUP_SYNTH_LTLK=m
CONFIG_SPEAKUP_SYNTH_SOFT=m
CONFIG_SPEAKUP_SYNTH_SPKOUT=m
CONFIG_SPEAKUP_SYNTH_TXPRT=m
CONFIG_SPI=y
# CONFIG_SPI_BITBANG is not set
# CONFIG_SPI_GPIO is not set
CONFIG_SPI_MASTER=y
CONFIG_SPI_OMAP24XX=y
# CONFIG_SPI_PXA2XX_PCI is not set
CONFIG_STP=m
# CONFIG_STRIP_ASM_SYMS is not set
CONFIG_SUNRPC=m
CONFIG_SUNRPC_GSS=m
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
# CONFIG_SYN_COOKIES is not set
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
# CONFIG_TABLET_USB_ACECAD is not set
# CONFIG_TABLET_USB_AIPTEK is not set
# CONFIG_TABLET_USB_GTCO is not set
# CONFIG_TABLET_USB_HANWANG is not set
# CONFIG_TABLET_USB_KBTAB is not set
# CONFIG_TABLET_USB_WACOM is not set
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_TINY_PREEMPT_RCU=y
# CONFIG_TINY_RCU is not set
CONFIG_TMPFS_POSIX_ACL=y
# CONFIG_TOUCHSCREEN_BU21013 is not set
# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set
# CONFIG_TOUCHSCREEN_DYNAPRO is not set
# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set
# CONFIG_TOUCHSCREEN_ST1232 is not set
CONFIG_TOUCHSCREEN_TSC2005=y
CONFIG_TUN=m
CONFIG_UACCESS_WITH_MEMCPY=y
CONFIG_UID16=y
CONFIG_USB=m
# CONFIG_USB_ARCH_HAS_EHCI is not set
# CONFIG_USB_AUDIO is not set
# CONFIG_USB_CDC_COMPOSITE is not set
CONFIG_USB_ETH=m
# CONFIG_USB_ETH_EEM is not set
# CONFIG_USB_ETH_RNDIS is not set
# CONFIG_USB_FILE_STORAGE is not set
# CONFIG_USB_FUNCTIONFS is not set
CONFIG_USB_GADGET=m
# CONFIG_USB_GADGETFS is not set
# CONFIG_USB_GADGET_DEBUG_FILES is not set
CONFIG_USB_GADGET_DUALSPEED=y
# CONFIG_USB_GADGET_DUMMY_HCD is not set
# CONFIG_USB_GADGET_M66592 is not set
CONFIG_USB_GADGET_MUSB_HDRC=y
# CONFIG_USB_GADGET_OMAP is not set
# CONFIG_USB_GADGET_PXA_U2O is not set
# CONFIG_USB_GADGET_R8A66597 is not set
CONFIG_USB_GADGET_SELECTED=y
CONFIG_USB_GADGET_VBUS_DRAW=100
CONFIG_USB_GSPCA=m
# CONFIG_USB_G_DBGP is not set
# CONFIG_USB_G_HID is not set
CONFIG_USB_G_NCM=m
# CONFIG_USB_G_PRINTER is not set
# CONFIG_USB_G_SERIAL is not set
# CONFIG_USB_G_WEBCAM is not set
CONFIG_USB_HID=m
# CONFIG_USB_INVENTRA_DMA is not set
# CONFIG_USB_MIDI_GADGET is not set
# CONFIG_USB_MUSB_AM35X is not set
# CONFIG_USB_MUSB_DEBUG is not set
CONFIG_USB_MUSB_HDRC=m
CONFIG_USB_MUSB_HDRC_HCD=y
# CONFIG_USB_MUSB_HOST is not set
# CONFIG_USB_MUSB_OMAP2PLUS is not set
CONFIG_USB_MUSB_OTG=y
# CONFIG_USB_MUSB_PERIPHERAL is not set
CONFIG_USB_MUSB_TUSB6010=y
CONFIG_USB_NET_CDC_NCM=m
CONFIG_USB_OTG=y
CONFIG_USB_OTG_UTILS=y
# CONFIG_USB_PWC is not set
CONFIG_USB_SERIAL=m
CONFIG_USB_SUPPORT=y
# CONFIG_USB_TI_CPPI_DMA is not set
CONFIG_USB_TUSB_OMAP_DMA=y
CONFIG_USB_USBNET=m
# CONFIG_USB_ZERO is not set
# CONFIG_USER_NS is not set
CONFIG_V4L_USB_DRIVERS=y
CONFIG_VECTORS_BASE=0xffff0000
CONFIG_VFAT_FS=y
CONFIG_VFP=y
CONFIG_VIDEO_CAPTURE_DRIVERS=y
# CONFIG_VIDEO_CPIA2 is not set
CONFIG_VIDEO_DEV=m
CONFIG_VIDEO_IR_I2C=m
CONFIG_VIDEO_MEDIA=m
# CONFIG_VIDEO_OMAP2 is not set
# CONFIG_VIDEO_OMAP2_VOUT is not set
CONFIG_VIDEO_TCM825X=m
CONFIG_VIDEO_V4L2=m
CONFIG_VIDEO_V4L2_COMMON=m
CONFIG_VLAN_8021Q=m
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not set
CONFIG_WATCHDOG_NOWAYOUT=y
# CONFIG_WEXT_PRIV is not set
# CONFIG_WEXT_SPY is not set
CONFIG_XZ_DEC=y
CONFIG_XZ_DEC_ARM=y
CONFIG_XZ_DEC_ARMTHUMB=y
CONFIG_XZ_DEC_BCJ=y
# CONFIG_ZBOOT_ROM is not set
CONFIG_ZBOOT_ROM_BSS=0x10200000
CONFIG_ZBOOT_ROM_TEXT=0x10C08000
CONFIG_ZONE_DMA_FLAG=0

View file

@ -1,896 +0,0 @@
--- /dev/null
+++ b/arch/arm/plat-omap/bootreason.c
@@ -0,0 +1,79 @@
+/*
+ * linux/arch/arm/plat-omap/bootreason.c
+ *
+ * OMAP Bootreason passing
+ *
+ * Copyright (c) 2004 Nokia
+ *
+ * Written by David Weinehall <david.weinehall@nokia.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <linux/proc_fs.h>
+#include <linux/errno.h>
+#include <plat/board.h>
+
+static char boot_reason[16];
+
+static int omap_bootreason_read_proc(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
+{
+ int len = 0;
+
+ len += sprintf(page + len, "%s\n", boot_reason);
+
+ *start = page + off;
+
+ if (len > off)
+ len -= off;
+ else
+ len = 0;
+
+ return len < count ? len : count;
+}
+
+static int __init bootreason_init(void)
+{
+ const struct omap_boot_reason_config *cfg;
+ int reason_valid = 0;
+
+ cfg = omap_get_config(OMAP_TAG_BOOT_REASON, struct omap_boot_reason_config);
+ if (cfg != NULL) {
+ strncpy(boot_reason, cfg->reason_str, sizeof(cfg->reason_str));
+ boot_reason[sizeof(cfg->reason_str)] = 0;
+ reason_valid = 1;
+ } else {
+ /* Read the boot reason from the OMAP registers */
+ }
+
+ if (!reason_valid)
+ return -ENOENT;
+
+ printk(KERN_INFO "Bootup reason: %s\n", boot_reason);
+
+ if (!create_proc_read_entry("bootreason", S_IRUGO, NULL,
+ omap_bootreason_read_proc, NULL))
+ return -ENOMEM;
+
+ return 0;
+}
+
+late_initcall(bootreason_init);
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -21,17 +21,89 @@
#include <plat/vram.h>
#include <plat/dsp.h>
+#include <asm/setup.h>
+
#define NO_LENGTH_CHECK 0xffffffff
struct omap_board_config_kernel *omap_board_config;
int omap_board_config_size;
+unsigned char omap_bootloader_tag[1024];
+int omap_bootloader_tag_len;
+
+/* used by omap-smp.c and board-4430sdp.c */
+void __iomem *gic_cpu_base_addr;
+
+#ifdef CONFIG_OMAP_BOOT_TAG
+
+static int __init parse_tag_omap(const struct tag *tag)
+{
+ u32 size = tag->hdr.size - (sizeof(tag->hdr) >> 2);
+
+ size <<= 2;
+ if (size > sizeof(omap_bootloader_tag))
+ return -1;
+
+ memcpy(omap_bootloader_tag, tag->u.omap.data, size);
+ omap_bootloader_tag_len = size;
+
+ return 0;
+}
+
+__tagtable(ATAG_BOARD, parse_tag_omap);
+
+#endif
+
static const void *get_config(u16 tag, size_t len, int skip, size_t *len_out)
{
struct omap_board_config_kernel *kinfo = NULL;
int i;
+#ifdef CONFIG_OMAP_BOOT_TAG
+ struct omap_board_config_entry *info = NULL;
+
+ if (omap_bootloader_tag_len > 4)
+ info = (struct omap_board_config_entry *) omap_bootloader_tag;
+ while (info != NULL) {
+ u8 *next;
+
+ if (info->tag == tag) {
+ if (skip == 0)
+ break;
+ skip--;
+ }
+
+ if ((info->len & 0x03) != 0) {
+ /* We bail out to avoid an alignment fault */
+ printk(KERN_ERR "OMAP peripheral config: Length (%d) not word-aligned (tag %04x)\n",
+ info->len, info->tag);
+ return NULL;
+ }
+ next = (u8 *) info + sizeof(*info) + info->len;
+ if (next >= omap_bootloader_tag + omap_bootloader_tag_len)
+ info = NULL;
+ else
+ info = (struct omap_board_config_entry *) next;
+ }
+ if (info != NULL) {
+ /* Check the length as a lame attempt to check for
+ * binary inconsistency. */
+ if (len != NO_LENGTH_CHECK) {
+ /* Word-align len */
+ if (len & 0x03)
+ len = (len + 3) & ~0x03;
+ if (info->len != len) {
+ printk(KERN_ERR "OMAP peripheral config: Length mismatch with tag %x (want %d, got %d)\n",
+ tag, len, info->len);
+ return NULL;
+ }
+ }
+ if (len_out != NULL)
+ *len_out = info->len;
+ return info->data;
+ }
+#endif
/* Try to find the config from the board-specific structures
* in the kernel. */
for (i = 0; i < omap_board_config_size; i++) {
--- /dev/null
+++ b/arch/arm/plat-omap/component-version.c
@@ -0,0 +1,64 @@
+/*
+ * linux/arch/arm/plat-omap/component-version.c
+ *
+ * Copyright (C) 2005 Nokia Corporation
+ * Written by Juha Yrjölä <juha.yrjola@nokia.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/err.h>
+#include <linux/proc_fs.h>
+#include <plat/board.h>
+
+static int component_version_read_proc(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
+{
+ int len, i;
+ const struct omap_version_config *ver;
+ char *p;
+
+ i = 0;
+ p = page;
+ while ((ver = omap_get_nr_config(OMAP_TAG_VERSION_STR,
+ struct omap_version_config, i)) != NULL) {
+ p += sprintf(p, "%-12s%s\n", ver->component, ver->version);
+ i++;
+ }
+
+ len = (p - page) - off;
+ if (len < 0)
+ len = 0;
+
+ *eof = (len <= count) ? 1 : 0;
+ *start = page + off;
+
+ return len;
+}
+
+static int __init component_version_init(void)
+{
+ if (omap_get_config(OMAP_TAG_VERSION_STR, struct omap_version_config) == NULL)
+ return -ENODEV;
+ if (!create_proc_read_entry("component_version", S_IRUGO, NULL,
+ component_version_read_proc, NULL))
+ return -ENOMEM;
+
+ return 0;
+}
+
+static void __exit component_version_exit(void)
+{
+ remove_proc_entry("component_version", NULL);
+}
+
+late_initcall(component_version_init);
+module_exit(component_version_exit);
+
+MODULE_AUTHOR("Juha Yrjölä <juha.yrjola@nokia.com>");
+MODULE_DESCRIPTION("Component version driver");
+MODULE_LICENSE("GPL");
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -79,6 +79,38 @@ config OMAP_RESET_CLOCKS
probably do not want this option enabled until your
device drivers work properly.
+config OMAP_BOOT_TAG
+ bool "OMAP bootloader information passing"
+ depends on ARCH_OMAP
+ default n
+ help
+ Say Y, if you have a bootloader which passes information
+ about your board and its peripheral configuration.
+
+config OMAP_BOOT_REASON
+ bool "Support for boot reason"
+ depends on OMAP_BOOT_TAG
+ default n
+ help
+ Say Y, if you want to have a procfs entry for reading the boot
+ reason in user-space.
+
+config OMAP_COMPONENT_VERSION
+ bool "Support for component version display"
+ depends on OMAP_BOOT_TAG && PROC_FS
+ default n
+ help
+ Say Y, if you want to have a procfs entry for reading component
+ versions (supplied by the bootloader) in user-space.
+
+config OMAP_GPIO_SWITCH
+ bool "GPIO switch support"
+ help
+ Say Y, if you want to have support for reporting of GPIO
+ switches (e.g. cover switches) via sysfs. Your bootloader has
+ to provide information about the switches to the kernel via the
+ ATAG_BOARD mechanism if they're not defined by the board config.
+
config OMAP_MUX
bool "OMAP multiplexing support"
depends on ARCH_OMAP
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -23,6 +23,9 @@ obj-$(CONFIG_OMAP_IOMMU_DEBUG) += iommu-
obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
+obj-$(CONFIG_OMAP_BOOT_REASON) += bootreason.o
+obj-$(CONFIG_OMAP_COMPONENT_VERSION) += component-version.o
+obj-$(CONFIG_OMAP_GPIO_SWITCH) += gpio-switch.o
obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o
obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o
i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o
--- a/arch/arm/include/asm/setup.h
+++ b/arch/arm/include/asm/setup.h
@@ -136,6 +136,13 @@ struct tag_acorn {
__u8 adfsdrives;
};
+/* TI OMAP specific information */
+#define ATAG_BOARD 0x414f4d50
+
+struct tag_omap {
+ u8 data[0];
+};
+
/* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */
#define ATAG_MEMCLK 0x41000402
@@ -162,6 +169,11 @@ struct tag {
struct tag_acorn acorn;
/*
+ * OMAP specific
+ */
+ struct tag_omap omap;
+
+ /*
* DC21285 specific
*/
struct tag_memclk memclk;
--- /dev/null
+++ b/arch/arm/plat-omap/gpio-switch.c
@@ -0,0 +1,554 @@
+/*
+ * linux/arch/arm/plat-omap/gpio-switch.c
+ *
+ * Copyright (C) 2004-2006 Nokia Corporation
+ * Written by Juha Yrjölä <juha.yrjola@nokia.com>
+ * and Paul Mundt <paul.mundt@nokia.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/sched.h>
+#include <linux/init.h>
+#include <linux/list.h>
+#include <linux/irq.h>
+#include <linux/interrupt.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/timer.h>
+#include <linux/err.h>
+#include <linux/slab.h>
+#include <linux/gpio.h>
+#include <plat/hardware.h>
+#include <plat/irqs.h>
+#include <plat/mux.h>
+#include <plat/board.h>
+#include <plat/gpio-switch.h>
+
+struct gpio_switch {
+ char name[14];
+ u16 gpio;
+ unsigned flags:4;
+ unsigned type:4;
+ unsigned state:1;
+ unsigned both_edges:1;
+
+ u16 debounce_rising;
+ u16 debounce_falling;
+
+ void (* notify)(void *data, int state);
+ void *notify_data;
+
+ struct work_struct work;
+ struct timer_list timer;
+ struct platform_device pdev;
+
+ struct list_head node;
+};
+
+static LIST_HEAD(gpio_switches);
+static struct platform_device *gpio_sw_platform_dev;
+static struct platform_driver gpio_sw_driver;
+
+static const struct omap_gpio_switch *board_gpio_sw_table;
+static int board_gpio_sw_count;
+
+static const char *cover_str[2] = { "open", "closed" };
+static const char *connection_str[2] = { "disconnected", "connected" };
+static const char *activity_str[2] = { "inactive", "active" };
+
+/*
+ * GPIO switch state default debounce delay in ms
+ */
+#define OMAP_GPIO_SW_DEFAULT_DEBOUNCE 10
+
+static const char **get_sw_str(struct gpio_switch *sw)
+{
+ switch (sw->type) {
+ case OMAP_GPIO_SWITCH_TYPE_COVER:
+ return cover_str;
+ case OMAP_GPIO_SWITCH_TYPE_CONNECTION:
+ return connection_str;
+ case OMAP_GPIO_SWITCH_TYPE_ACTIVITY:
+ return activity_str;
+ default:
+ BUG();
+ return NULL;
+ }
+}
+
+static const char *get_sw_type(struct gpio_switch *sw)
+{
+ switch (sw->type) {
+ case OMAP_GPIO_SWITCH_TYPE_COVER:
+ return "cover";
+ case OMAP_GPIO_SWITCH_TYPE_CONNECTION:
+ return "connection";
+ case OMAP_GPIO_SWITCH_TYPE_ACTIVITY:
+ return "activity";
+ default:
+ BUG();
+ return NULL;
+ }
+}
+
+static void print_sw_state(struct gpio_switch *sw, int state)
+{
+ const char **str;
+
+ str = get_sw_str(sw);
+ if (str != NULL)
+ printk(KERN_INFO "%s (GPIO %d) is now %s\n", sw->name, sw->gpio, str[state]);
+}
+
+static int gpio_sw_get_state(struct gpio_switch *sw)
+{
+ int state;
+
+ state = gpio_get_value(sw->gpio);
+ if (sw->flags & OMAP_GPIO_SWITCH_FLAG_INVERTED)
+ state = !state;
+
+ return state;
+}
+
+static ssize_t gpio_sw_state_store(struct device *dev,
+ struct device_attribute *attr,
+ const char *buf,
+ size_t count)
+{
+ struct gpio_switch *sw = dev_get_drvdata(dev);
+ const char **str;
+ char state[16];
+ int enable;
+
+ if (!(sw->flags & OMAP_GPIO_SWITCH_FLAG_OUTPUT))
+ return -EPERM;
+
+ if (sscanf(buf, "%15s", state) != 1)
+ return -EINVAL;
+
+ str = get_sw_str(sw);
+ if (strcmp(state, str[0]) == 0)
+ sw->state = enable = 0;
+ else if (strcmp(state, str[1]) == 0)
+ sw->state = enable = 1;
+ else
+ return -EINVAL;
+
+ if (sw->flags & OMAP_GPIO_SWITCH_FLAG_INVERTED)
+ enable = !enable;
+ gpio_set_value(sw->gpio, enable);
+
+ return count;
+}
+
+static ssize_t gpio_sw_state_show(struct device *dev,
+ struct device_attribute *attr,
+ char *buf)
+{
+ struct gpio_switch *sw = dev_get_drvdata(dev);
+ const char **str;
+
+ str = get_sw_str(sw);
+ return sprintf(buf, "%s\n", str[sw->state]);
+}
+
+static DEVICE_ATTR(state, S_IRUGO | S_IWUSR, gpio_sw_state_show,
+ gpio_sw_state_store);
+
+static ssize_t gpio_sw_type_show(struct device *dev,
+ struct device_attribute *attr,
+ char *buf)
+{
+ struct gpio_switch *sw = dev_get_drvdata(dev);
+
+ return sprintf(buf, "%s\n", get_sw_type(sw));
+}
+
+static DEVICE_ATTR(type, S_IRUGO, gpio_sw_type_show, NULL);
+
+static ssize_t gpio_sw_direction_show(struct device *dev,
+ struct device_attribute *attr,
+ char *buf)
+{
+ struct gpio_switch *sw = dev_get_drvdata(dev);
+ int is_output;
+
+ is_output = sw->flags & OMAP_GPIO_SWITCH_FLAG_OUTPUT;
+ return sprintf(buf, "%s\n", is_output ? "output" : "input");
+}
+
+static DEVICE_ATTR(direction, S_IRUGO, gpio_sw_direction_show, NULL);
+
+
+static irqreturn_t gpio_sw_irq_handler(int irq, void *arg)
+{
+ struct gpio_switch *sw = arg;
+ unsigned long timeout;
+ int state;
+
+ if (!sw->both_edges) {
+ if (gpio_get_value(sw->gpio))
+ set_irq_type(OMAP_GPIO_IRQ(sw->gpio), IRQ_TYPE_EDGE_FALLING);
+ else
+ set_irq_type(OMAP_GPIO_IRQ(sw->gpio), IRQ_TYPE_EDGE_RISING);
+ }
+
+ state = gpio_sw_get_state(sw);
+ if (sw->state == state)
+ return IRQ_HANDLED;
+
+ if (state)
+ timeout = sw->debounce_rising;
+ else
+ timeout = sw->debounce_falling;
+ if (!timeout)
+ schedule_work(&sw->work);
+ else
+ mod_timer(&sw->timer, jiffies + msecs_to_jiffies(timeout));
+
+ return IRQ_HANDLED;
+}
+
+static void gpio_sw_timer(unsigned long arg)
+{
+ struct gpio_switch *sw = (struct gpio_switch *) arg;
+
+ schedule_work(&sw->work);
+}
+
+static void gpio_sw_handler(struct work_struct *work)
+{
+ struct gpio_switch *sw = container_of(work, struct gpio_switch, work);
+ int state;
+
+ state = gpio_sw_get_state(sw);
+ if (sw->state == state)
+ return;
+
+ sw->state = state;
+ if (sw->notify != NULL)
+ sw->notify(sw->notify_data, state);
+ sysfs_notify(&sw->pdev.dev.kobj, NULL, "state");
+ print_sw_state(sw, state);
+}
+
+static int __init can_do_both_edges(struct gpio_switch *sw)
+{
+ if (!cpu_class_is_omap1())
+ return 1;
+ if (OMAP_GPIO_IS_MPUIO(sw->gpio))
+ return 0;
+ else
+ return 1;
+}
+
+static void gpio_sw_release(struct device *dev)
+{
+}
+
+static int __init new_switch(struct gpio_switch *sw)
+{
+ int r, direction, trigger;
+
+ switch (sw->type) {
+ case OMAP_GPIO_SWITCH_TYPE_COVER:
+ case OMAP_GPIO_SWITCH_TYPE_CONNECTION:
+ case OMAP_GPIO_SWITCH_TYPE_ACTIVITY:
+ break;
+ default:
+ printk(KERN_ERR "invalid GPIO switch type: %d\n", sw->type);
+ return -EINVAL;
+ }
+
+ sw->pdev.name = sw->name;
+ sw->pdev.id = -1;
+
+ sw->pdev.dev.parent = &gpio_sw_platform_dev->dev;
+ sw->pdev.dev.driver = &gpio_sw_driver.driver;
+ sw->pdev.dev.release = gpio_sw_release;
+
+ r = platform_device_register(&sw->pdev);
+ if (r) {
+ printk(KERN_ERR "gpio-switch: platform device registration "
+ "failed for %s", sw->name);
+ return r;
+ }
+ dev_set_drvdata(&sw->pdev.dev, sw);
+
+ r = gpio_request(sw->gpio, "gpio-switch");
+ if (r < 0) {
+ platform_device_unregister(&sw->pdev);
+ return r;
+ }
+
+ /* input: 1, output: 0 */
+ direction = !(sw->flags & OMAP_GPIO_SWITCH_FLAG_OUTPUT);
+ if (direction)
+ gpio_direction_input(sw->gpio);
+ else
+ gpio_direction_output(sw->gpio, 0);
+
+ sw->state = gpio_sw_get_state(sw);
+
+ r = 0;
+ r |= device_create_file(&sw->pdev.dev, &dev_attr_state);
+ r |= device_create_file(&sw->pdev.dev, &dev_attr_type);
+ r |= device_create_file(&sw->pdev.dev, &dev_attr_direction);
+ if (r)
+ printk(KERN_ERR "gpio-switch: attribute file creation "
+ "failed for %s\n", sw->name);
+
+ if (!direction)
+ return 0;
+
+ if (can_do_both_edges(sw)) {
+ trigger = IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING;
+ sw->both_edges = 1;
+ } else {
+ if (gpio_get_value(sw->gpio))
+ trigger = IRQF_TRIGGER_FALLING;
+ else
+ trigger = IRQF_TRIGGER_RISING;
+ }
+ r = request_irq(OMAP_GPIO_IRQ(sw->gpio), gpio_sw_irq_handler,
+ IRQF_SHARED | trigger, sw->name, sw);
+ if (r < 0) {
+ printk(KERN_ERR "gpio-switch: request_irq() failed "
+ "for GPIO %d\n", sw->gpio);
+ platform_device_unregister(&sw->pdev);
+ gpio_free(sw->gpio);
+ return r;
+ }
+
+ INIT_WORK(&sw->work, gpio_sw_handler);
+ init_timer(&sw->timer);
+
+ sw->timer.function = gpio_sw_timer;
+ sw->timer.data = (unsigned long)sw;
+
+ list_add(&sw->node, &gpio_switches);
+
+ return 0;
+}
+
+static int __init add_atag_switches(void)
+{
+ const struct omap_gpio_switch_config *cfg;
+ struct gpio_switch *sw;
+ int i, r;
+
+ for (i = 0; ; i++) {
+ cfg = omap_get_nr_config(OMAP_TAG_GPIO_SWITCH,
+ struct omap_gpio_switch_config, i);
+ if (cfg == NULL)
+ break;
+ sw = kzalloc(sizeof(*sw), GFP_KERNEL);
+ if (sw == NULL) {
+ printk(KERN_ERR "gpio-switch: kmalloc failed\n");
+ return -ENOMEM;
+ }
+ strncpy(sw->name, cfg->name, sizeof(cfg->name));
+ sw->gpio = cfg->gpio;
+ sw->flags = cfg->flags;
+ sw->type = cfg->type;
+ sw->debounce_rising = OMAP_GPIO_SW_DEFAULT_DEBOUNCE;
+ sw->debounce_falling = OMAP_GPIO_SW_DEFAULT_DEBOUNCE;
+ if ((r = new_switch(sw)) < 0) {
+ kfree(sw);
+ return r;
+ }
+ }
+ return 0;
+}
+
+static struct gpio_switch * __init find_switch(int gpio, const char *name)
+{
+ struct gpio_switch *sw;
+
+ list_for_each_entry(sw, &gpio_switches, node) {
+ if ((gpio < 0 || sw->gpio != gpio) &&
+ (name == NULL || strcmp(sw->name, name) != 0))
+ continue;
+
+ if (gpio < 0 || name == NULL)
+ goto no_check;
+
+ if (strcmp(sw->name, name) != 0)
+ printk("gpio-switch: name mismatch for %d (%s, %s)\n",
+ gpio, name, sw->name);
+ else if (sw->gpio != gpio)
+ printk("gpio-switch: GPIO mismatch for %s (%d, %d)\n",
+ name, gpio, sw->gpio);
+no_check:
+ return sw;
+ }
+ return NULL;
+}
+
+static int __init add_board_switches(void)
+{
+ int i;
+
+ for (i = 0; i < board_gpio_sw_count; i++) {
+ const struct omap_gpio_switch *cfg;
+ struct gpio_switch *sw;
+ int r;
+
+ cfg = board_gpio_sw_table + i;
+ if (strlen(cfg->name) > sizeof(sw->name) - 1)
+ return -EINVAL;
+ /* Check whether we only update an existing switch
+ * or add a new switch. */
+ sw = find_switch(cfg->gpio, cfg->name);
+ if (sw != NULL) {
+ sw->debounce_rising = cfg->debounce_rising;
+ sw->debounce_falling = cfg->debounce_falling;
+ sw->notify = cfg->notify;
+ sw->notify_data = cfg->notify_data;
+ continue;
+ } else {
+ if (cfg->gpio < 0 || cfg->name == NULL) {
+ printk("gpio-switch: required switch not "
+ "found (%d, %s)\n", cfg->gpio,
+ cfg->name);
+ continue;
+ }
+ }
+ sw = kzalloc(sizeof(*sw), GFP_KERNEL);
+ if (sw == NULL) {
+ printk(KERN_ERR "gpio-switch: kmalloc failed\n");
+ return -ENOMEM;
+ }
+ strlcpy(sw->name, cfg->name, sizeof(sw->name));
+ sw->gpio = cfg->gpio;
+ sw->flags = cfg->flags;
+ sw->type = cfg->type;
+ sw->debounce_rising = cfg->debounce_rising;
+ sw->debounce_falling = cfg->debounce_falling;
+ sw->notify = cfg->notify;
+ sw->notify_data = cfg->notify_data;
+ if ((r = new_switch(sw)) < 0) {
+ kfree(sw);
+ return r;
+ }
+ }
+ return 0;
+}
+
+static void gpio_sw_cleanup(void)
+{
+ struct gpio_switch *sw = NULL, *old = NULL;
+
+ list_for_each_entry(sw, &gpio_switches, node) {
+ if (old != NULL)
+ kfree(old);
+ flush_scheduled_work();
+ del_timer_sync(&sw->timer);
+
+ free_irq(OMAP_GPIO_IRQ(sw->gpio), sw);
+
+ device_remove_file(&sw->pdev.dev, &dev_attr_state);
+ device_remove_file(&sw->pdev.dev, &dev_attr_type);
+ device_remove_file(&sw->pdev.dev, &dev_attr_direction);
+
+ platform_device_unregister(&sw->pdev);
+ gpio_free(sw->gpio);
+ old = sw;
+ }
+ kfree(old);
+}
+
+static void __init report_initial_state(void)
+{
+ struct gpio_switch *sw;
+
+ list_for_each_entry(sw, &gpio_switches, node) {
+ int state;
+
+ state = gpio_get_value(sw->gpio);
+ if (sw->flags & OMAP_GPIO_SWITCH_FLAG_INVERTED)
+ state = !state;
+ if (sw->notify != NULL)
+ sw->notify(sw->notify_data, state);
+ print_sw_state(sw, state);
+ }
+}
+
+static int gpio_sw_remove(struct platform_device *dev)
+{
+ return 0;
+}
+
+static struct platform_driver gpio_sw_driver = {
+ .remove = gpio_sw_remove,
+ .driver = {
+ .name = "gpio-switch",
+ },
+};
+
+void __init omap_register_gpio_switches(const struct omap_gpio_switch *tbl,
+ int count)
+{
+ BUG_ON(board_gpio_sw_table != NULL);
+
+ board_gpio_sw_table = tbl;
+ board_gpio_sw_count = count;
+}
+
+static int __init gpio_sw_init(void)
+{
+ int r;
+
+ printk(KERN_INFO "OMAP GPIO switch handler initializing\n");
+
+ r = platform_driver_register(&gpio_sw_driver);
+ if (r)
+ return r;
+
+ gpio_sw_platform_dev = platform_device_register_simple("gpio-switch",
+ -1, NULL, 0);
+ if (IS_ERR(gpio_sw_platform_dev)) {
+ r = PTR_ERR(gpio_sw_platform_dev);
+ goto err1;
+ }
+
+ r = add_atag_switches();
+ if (r < 0)
+ goto err2;
+
+ r = add_board_switches();
+ if (r < 0)
+ goto err2;
+
+ report_initial_state();
+
+ return 0;
+err2:
+ gpio_sw_cleanup();
+ platform_device_unregister(gpio_sw_platform_dev);
+err1:
+ platform_driver_unregister(&gpio_sw_driver);
+ return r;
+}
+
+static void __exit gpio_sw_exit(void)
+{
+ gpio_sw_cleanup();
+ platform_device_unregister(gpio_sw_platform_dev);
+ platform_driver_unregister(&gpio_sw_driver);
+}
+
+#ifndef MODULE
+late_initcall(gpio_sw_init);
+#else
+module_init(gpio_sw_init);
+#endif
+module_exit(gpio_sw_exit);
+
+MODULE_AUTHOR("Juha Yrjölä <juha.yrjola@nokia.com>, Paul Mundt <paul.mundt@nokia.com");
+MODULE_DESCRIPTION("GPIO switch driver");
+MODULE_LICENSE("GPL");
--- a/arch/arm/plat-omap/include/plat/board.h
+++ b/arch/arm/plat-omap/include/plat/board.h
@@ -151,6 +151,14 @@ struct omap_board_config_kernel {
const void *data;
};
+struct omap_gpio_switch_config {
+ char name[12];
+ u16 gpio;
+ int flags:4;
+ int type:4;
+ int key_code:24; /* Linux key code */
+};
+
extern const void *__omap_get_config(u16 tag, size_t len, int nr);
#define omap_get_config(tag, type) \

View file

@ -1,195 +0,0 @@
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -15,8 +15,10 @@
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/init.h>
+#include <linux/irq.h>
#include <linux/io.h>
#include <linux/stddef.h>
+#include <linux/platform_device.h>
#include <linux/i2c.h>
#include <linux/spi/spi.h>
#include <linux/usb/musb.h>
@@ -33,6 +35,7 @@
#include <plat/onenand.h>
#include <plat/mmc.h>
#include <plat/serial.h>
+#include <plat/cbus.h>
#include "mux.h"
@@ -194,6 +197,114 @@ static struct omap_onenand_platform_data
};
#endif
+#if defined(CONFIG_CBUS) || defined(CONFIG_CBUS_MODULE)
+
+static struct cbus_host_platform_data n8x0_cbus_data = {
+ .clk_gpio = 66,
+ .dat_gpio = 65,
+ .sel_gpio = 64,
+};
+
+static struct platform_device n8x0_cbus_device = {
+ .name = "cbus",
+ .id = -1,
+ .dev = {
+ .platform_data = &n8x0_cbus_data,
+ },
+};
+
+static struct resource retu_resource[] = {
+ {
+ .start = -EINVAL, /* set later */
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct cbus_retu_platform_data n8x0_retu_data = {
+ .irq_base = CBUS_RETU_IRQ_BASE,
+ .irq_end = CBUS_RETU_IRQ_END,
+ .devid = CBUS_RETU_DEVICE_ID,
+};
+
+static struct platform_device retu_device = {
+ .name = "retu",
+ .id = -1,
+ .resource = retu_resource,
+ .num_resources = ARRAY_SIZE(retu_resource),
+ .dev = {
+ .platform_data = &n8x0_retu_data,
+ },
+};
+
+static struct resource tahvo_resource[] = {
+ {
+ .start = -EINVAL, /* set later */
+ .flags = IORESOURCE_IRQ,
+ }
+};
+
+static struct platform_device tahvo_device = {
+ .name = "tahvo",
+ .id = -1,
+ .resource = tahvo_resource,
+ .num_resources = ARRAY_SIZE(tahvo_resource),
+};
+
+static struct platform_device tahvo_usb_device = {
+ .name = "tahvo-usb",
+ .id = -1,
+};
+
+static void __init n8x0_cbus_init(void)
+{
+ int ret;
+
+ platform_device_register(&n8x0_cbus_device);
+
+ ret = gpio_request(108, "RETU irq");
+ if (ret < 0) {
+ pr_err("retu: Unable to reserve IRQ GPIO\n");
+ return;
+ }
+
+ ret = gpio_direction_input(108);
+ if (ret < 0) {
+ pr_err("retu: Unable to change gpio direction\n");
+ gpio_free(108);
+ return;
+ }
+
+ set_irq_type(gpio_to_irq(108), IRQ_TYPE_EDGE_RISING);
+ retu_resource[0].start = gpio_to_irq(108);
+ platform_device_register(&retu_device);
+
+ ret = gpio_request(111, "TAHVO irq");
+ if (ret) {
+ pr_err("tahvo: Unable to reserve IRQ GPIO\n");
+ gpio_free(108);
+ return;
+ }
+
+ /* Set the pin as input */
+ ret = gpio_direction_input(111);
+ if (ret) {
+ pr_err("tahvo: Unable to change direction\n");
+ gpio_free(108);
+ gpio_free(111);
+ return;
+ }
+
+ tahvo_resource[0].start = gpio_to_irq(111);
+ platform_device_register(&tahvo_device);
+ platform_device_register(&tahvo_usb_device);
+}
+
+#else
+static inline void __init n8x0_cbus_init(void)
+{
+}
+#endif
+
#if defined(CONFIG_MENELAUS) && \
(defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE))
@@ -628,11 +739,10 @@ static void __init n8x0_map_io(void)
omap242x_map_common_io();
}
-static void __init n8x0_init_irq(void)
+static void __init n8x0_init_early(void)
{
omap2_init_common_infrastructure();
omap2_init_common_devices(NULL, NULL);
- omap_init_irq();
}
#ifdef CONFIG_OMAP_MUX
@@ -686,6 +796,8 @@ static inline void board_serial_init(voi
static void __init n8x0_init_machine(void)
{
omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC);
+ n8x0_cbus_init();
+
/* FIXME: add n810 spi devices */
spi_register_board_info(n800_spi_board_info,
ARRAY_SIZE(n800_spi_board_info));
@@ -703,27 +815,30 @@ static void __init n8x0_init_machine(voi
MACHINE_START(NOKIA_N800, "Nokia N800")
.boot_params = 0x80000100,
- .map_io = n8x0_map_io,
.reserve = omap_reserve,
- .init_irq = n8x0_init_irq,
+ .map_io = n8x0_map_io,
+ .init_early = n8x0_init_early,
+ .init_irq = omap_init_irq,
.init_machine = n8x0_init_machine,
.timer = &omap_timer,
MACHINE_END
MACHINE_START(NOKIA_N810, "Nokia N810")
.boot_params = 0x80000100,
- .map_io = n8x0_map_io,
.reserve = omap_reserve,
- .init_irq = n8x0_init_irq,
+ .map_io = n8x0_map_io,
+ .init_early = n8x0_init_early,
+ .init_irq = omap_init_irq,
.init_machine = n8x0_init_machine,
.timer = &omap_timer,
MACHINE_END
MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
.boot_params = 0x80000100,
- .map_io = n8x0_map_io,
.reserve = omap_reserve,
- .init_irq = n8x0_init_irq,
+ .map_io = n8x0_map_io,
+ .init_early = n8x0_init_early,
+ .init_irq = omap_init_irq,
.init_machine = n8x0_init_machine,
.timer = &omap_timer,
MACHINE_END

View file

@ -1,537 +0,0 @@
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -23,6 +23,9 @@
#include <linux/spi/spi.h>
#include <linux/usb/musb.h>
#include <sound/tlv320aic3x.h>
+#include <linux/input.h>
+#include <linux/i2c/lm8323.h>
+#include <linux/spi/tsc2005.h>
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
@@ -36,6 +39,7 @@
#include <plat/mmc.h>
#include <plat/serial.h>
#include <plat/cbus.h>
+#include <plat/gpio-switch.h>
#include "mux.h"
@@ -43,6 +47,221 @@ static int slot1_cover_open;
static int slot2_cover_open;
static struct device *mmc_device;
+/* We map the FN key as LALT to workaround an X keycode problem.
+ * The XKB map needs to be adjusted to support this. */
+#define MAP_FN_AS_LEFTALT
+
+static s16 rx44_keymap[LM8323_KEYMAP_SIZE] = {
+ [0x01] = KEY_Q,
+ [0x02] = KEY_K,
+ [0x03] = KEY_O,
+ [0x04] = KEY_P,
+ [0x05] = KEY_BACKSPACE,
+ [0x06] = KEY_A,
+ [0x07] = KEY_S,
+ [0x08] = KEY_D,
+ [0x09] = KEY_F,
+ [0x0a] = KEY_G,
+ [0x0b] = KEY_H,
+ [0x0c] = KEY_J,
+
+ [0x11] = KEY_W,
+ [0x12] = KEY_F4,
+ [0x13] = KEY_L,
+ [0x14] = KEY_APOSTROPHE,
+ [0x16] = KEY_Z,
+ [0x17] = KEY_X,
+ [0x18] = KEY_C,
+ [0x19] = KEY_V,
+ [0x1a] = KEY_B,
+ [0x1b] = KEY_N,
+ [0x1c] = KEY_LEFTSHIFT, /* Actually, this is both shift keys */
+ [0x1f] = KEY_F7,
+
+ [0x21] = KEY_E,
+ [0x22] = KEY_SEMICOLON,
+ [0x23] = KEY_MINUS,
+ [0x24] = KEY_EQUAL,
+#ifdef MAP_FN_AS_LEFTALT
+ [0x2b] = KEY_LEFTALT,
+#else
+ [0x2b] = KEY_FN,
+#endif
+ [0x2c] = KEY_M,
+ [0x2f] = KEY_F8,
+
+ [0x31] = KEY_R,
+ [0x32] = KEY_RIGHTCTRL,
+ [0x34] = KEY_SPACE,
+ [0x35] = KEY_COMMA,
+ [0x37] = KEY_UP,
+ [0x3c] = KEY_COMPOSE,
+ [0x3f] = KEY_F6,
+
+ [0x41] = KEY_T,
+ [0x44] = KEY_DOT,
+ [0x46] = KEY_RIGHT,
+ [0x4f] = KEY_F5,
+ [0x51] = KEY_Y,
+ [0x53] = KEY_DOWN,
+ [0x55] = KEY_ENTER,
+ [0x5f] = KEY_ESC,
+
+ [0x61] = KEY_U,
+ [0x64] = KEY_LEFT,
+
+ [0x71] = KEY_I,
+ [0x75] = KEY_KPENTER,
+};
+
+static struct lm8323_platform_data lm8323_pdata = {
+ .repeat = 0, /* Repeat is handled in userspace for now. */
+ .keymap = rx44_keymap,
+ .size_x = 8,
+ .size_y = 12,
+ .debounce_time = 12,
+ .active_time = 500,
+
+ .name = "Internal keyboard",
+ .pwm_names[0] = "n810::keyboard",
+ .pwm_names[1] = "n810::cover",
+};
+
+#define OMAP_TAG_NOKIA_BT 0x4e01
+
+struct omap_bluetooth_config {
+ u8 chip_type;
+ u8 bt_wakeup_gpio;
+ u8 host_wakeup_gpio;
+ u8 reset_gpio;
+ u8 bt_uart;
+ u8 bd_addr[6];
+ u8 bt_sysclk;
+};
+
+static struct platform_device n8x0_bt_device = {
+ .name = "hci_h4p",
+ .id = -1,
+ .num_resources = 0,
+};
+
+void __init n8x0_bt_init(void)
+{
+ const struct omap_bluetooth_config *bt_config;
+
+ bt_config = (void *) omap_get_config(OMAP_TAG_NOKIA_BT,
+ struct omap_bluetooth_config);
+ n8x0_bt_device.dev.platform_data = (void *) bt_config;
+ if (platform_device_register(&n8x0_bt_device) < 0)
+ BUG();
+}
+
+#define RX51_TSC2005_RESET_GPIO 94
+#define RX51_TSC2005_IRQ_GPIO 106
+
+#ifdef CONFIG_TOUCHSCREEN_TSC2005
+static struct tsc2005_platform_data tsc2005_config;
+static void rx51_tsc2005_set_reset(bool enable)
+{
+ gpio_set_value(RX51_TSC2005_RESET_GPIO, enable);
+}
+
+static struct omap2_mcspi_device_config tsc2005_mcspi_config = {
+ .turbo_mode = 0,
+ .single_channel = 1,
+};
+#endif
+
+static void __init tsc2005_set_config(void)
+{
+ const struct omap_lcd_config *conf;
+
+ conf = omap_get_config(OMAP_TAG_LCD, struct omap_lcd_config);
+ if (conf != NULL) {
+#ifdef CONFIG_TOUCHSCREEN_TSC2005
+ if (strcmp(conf->panel_name, "lph8923") == 0) {
+ tsc2005_config.ts_x_plate_ohm = 180;
+ tsc2005_config.ts_hw_avg = 0;
+ tsc2005_config.ts_ignore_last = 0;
+ tsc2005_config.ts_touch_pressure = 1500;
+ tsc2005_config.ts_stab_time = 100;
+ tsc2005_config.ts_pressure_max = 2048;
+ tsc2005_config.ts_pressure_fudge = 2;
+ tsc2005_config.ts_x_max = 4096;
+ tsc2005_config.ts_x_fudge = 4;
+ tsc2005_config.ts_y_max = 4096;
+ tsc2005_config.ts_y_fudge = 7;
+ tsc2005_config.set_reset = rx51_tsc2005_set_reset;
+ } else if (strcmp(conf->panel_name, "ls041y3") == 0) {
+ tsc2005_config.ts_x_plate_ohm = 280;
+ tsc2005_config.ts_hw_avg = 0;
+ tsc2005_config.ts_ignore_last = 0;
+ tsc2005_config.ts_touch_pressure = 1500;
+ tsc2005_config.ts_stab_time = 1000;
+ tsc2005_config.ts_pressure_max = 2048;
+ tsc2005_config.ts_pressure_fudge = 2;
+ tsc2005_config.ts_x_max = 4096;
+ tsc2005_config.ts_x_fudge = 4;
+ tsc2005_config.ts_y_max = 4096;
+ tsc2005_config.ts_y_fudge = 7;
+ tsc2005_config.set_reset = rx51_tsc2005_set_reset;
+ } else {
+ printk(KERN_ERR "Unknown panel type, set default "
+ "touchscreen configuration\n");
+ tsc2005_config.ts_x_plate_ohm = 200;
+ tsc2005_config.ts_stab_time = 100;
+ }
+#endif
+ }
+}
+
+static struct omap2_mcspi_device_config mipid_mcspi_config = {
+ .turbo_mode = 0,
+ .single_channel = 1,
+};
+
+extern struct mipid_platform_data n8x0_mipid_platform_data;
+
+extern void n8x0_mipid_init(void);
+extern void n8x0_blizzard_init(void);
+
+static struct omap_gpio_switch n8x0_gpio_switches[] __initdata = {
+ {
+ .name = "headphone",
+ .gpio = -1,
+ .debounce_rising = 200,
+ .debounce_falling = 200,
+ }, {
+ .name = "cam_act",
+ .gpio = -1,
+ .debounce_rising = 200,
+ .debounce_falling = 200,
+ }, {
+ .name = "cam_turn",
+ .gpio = -1,
+ .debounce_rising = 100,
+ .debounce_falling = 100,
+ }, {
+ .name = "slide",
+ .gpio = -1,
+ .debounce_rising = 200,
+ .debounce_falling = 200,
+ }, {
+ .name = "kb_lock",
+ .gpio = -1,
+ .debounce_rising = 200,
+ .debounce_falling = 200,
+ },
+};
+
+static void __init n8x0_gpio_switches_init(void)
+{
+ /* The switches are actually registered through ATAG mechanism.
+ * This just updates the parameters (thus .gpio is -1) */
+ omap_register_gpio_switches(n8x0_gpio_switches,
+ ARRAY_SIZE(n8x0_gpio_switches));
+}
+
#define TUSB6010_ASYNC_CS 1
#define TUSB6010_SYNC_CS 4
#define TUSB6010_GPIO_INT 58
@@ -146,12 +365,29 @@ static struct omap2_mcspi_device_config
static struct spi_board_info n800_spi_board_info[] __initdata = {
{
+ .modalias = "lcd_mipid",
+ .bus_num = 1,
+ .chip_select = 1,
+ .max_speed_hz = 4000000,
+ .controller_data= &mipid_mcspi_config,
+ .platform_data = &n8x0_mipid_platform_data,
+ },
+ {
.modalias = "p54spi",
.bus_num = 2,
.chip_select = 0,
.max_speed_hz = 48000000,
.controller_data = &p54spi_mcspi_config,
},
+ {
+ .modalias = "tsc2005",
+ .bus_num = 1,
+ .chip_select = 0,
+ .irq = OMAP_GPIO_IRQ(RX51_TSC2005_IRQ_GPIO),
+ .max_speed_hz = 6000000,
+ .controller_data = &tsc2005_mcspi_config,
+ .platform_data = &tsc2005_config,
+ },
};
#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
@@ -727,6 +963,11 @@ static struct aic3x_pdata n810_aic33_dat
};
static struct i2c_board_info n810_i2c_board_info_2[] __initdata = {
+ {
+ I2C_BOARD_INFO("lm8323", 0x45),
+ .irq = OMAP_GPIO_IRQ(109),
+ .platform_data = &lm8323_pdata,
+ },
{
I2C_BOARD_INFO("tlv320aic3x", 0x18),
.platform_data = &n810_aic33_data,
@@ -796,9 +1037,12 @@ static inline void board_serial_init(voi
static void __init n8x0_init_machine(void)
{
omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC);
+ n8x0_gpio_switches_init();
n8x0_cbus_init();
+ n8x0_bt_init();
/* FIXME: add n810 spi devices */
+ tsc2005_set_config();
spi_register_board_info(n800_spi_board_info,
ARRAY_SIZE(n800_spi_board_info));
omap_register_i2c_bus(1, 400, n8x0_i2c_board_info_1,
@@ -808,6 +1052,8 @@ static void __init n8x0_init_machine(voi
i2c_register_board_info(2, n810_i2c_board_info_2,
ARRAY_SIZE(n810_i2c_board_info_2));
board_serial_init();
+ n8x0_mipid_init();
+ n8x0_blizzard_init();
gpmc_onenand_init(board_onenand_data);
n8x0_mmc_init();
n8x0_usb_init();
--- /dev/null
+++ b/arch/arm/mach-omap2/board-n8x0-lcd.c
@@ -0,0 +1,141 @@
+/*
+ * linux/arch/arm/mach-omap2/board-n8x0.c
+ *
+ * Copyright (C) 2005-2009 Nokia Corporation
+ * Author: Juha Yrjola <juha.yrjola@nokia.com>
+ *
+ * Modified from mach-omap2/board-generic.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/clk.h>
+#include <linux/delay.h>
+#include <linux/gpio.h>
+#include <linux/omapfb.h>
+
+#include <plat/lcd_mipid.h>
+#include <plat/blizzard.h>
+
+#include <../drivers/cbus/tahvo.h>
+
+#define N8X0_BLIZZARD_POWERDOWN_GPIO 15
+
+// MIPID LCD Panel
+
+static void mipid_shutdown(struct mipid_platform_data *pdata)
+{
+ if (pdata->nreset_gpio != -1) {
+ pr_info("shutdown LCD\n");
+ gpio_set_value(pdata->nreset_gpio, 0);
+ msleep(120);
+ }
+}
+
+struct mipid_platform_data n8x0_mipid_platform_data = {
+ .shutdown = mipid_shutdown,
+};
+
+void __init n8x0_mipid_init(void)
+{
+ const struct omap_lcd_config *conf;
+ int err;
+
+ conf = omap_get_config(OMAP_TAG_LCD, struct omap_lcd_config);
+ if (conf != NULL) {
+ n8x0_mipid_platform_data.nreset_gpio = conf->nreset_gpio;
+ n8x0_mipid_platform_data.data_lines = conf->data_lines;
+ if (conf->nreset_gpio != -1) {
+ err = gpio_request(conf->nreset_gpio, "MIPID nreset");
+ if (err) {
+ printk(KERN_ERR "N8x0 MIPID failed to request nreset GPIO %d\n",
+ conf->nreset_gpio);
+ } else {
+ err = gpio_direction_output(conf->nreset_gpio, 1);
+ if (err) {
+ printk(KERN_ERR "N8x0 MIPID failed to set nreset GPIO %d\n",
+ conf->nreset_gpio);
+ }
+ }
+ }
+ printk(KERN_INFO "N8x0 MIPID config loaded");
+ }
+ else
+ printk(KERN_INFO "N8x0 MIPID config not provided");
+}
+
+
+// Epson Blizzard LCD Controller
+
+static struct {
+ struct clk *sys_ck;
+} blizzard;
+
+static int blizzard_get_clocks(void)
+{
+ blizzard.sys_ck = clk_get(0, "osc_ck");
+ if (IS_ERR(blizzard.sys_ck)) {
+ printk(KERN_ERR "can't get Blizzard clock\n");
+ return PTR_ERR(blizzard.sys_ck);
+ }
+ return 0;
+}
+
+static unsigned long blizzard_get_clock_rate(struct device *dev)
+{
+ return clk_get_rate(blizzard.sys_ck);
+}
+
+static void blizzard_enable_clocks(int enable)
+{
+ if (enable)
+ clk_enable(blizzard.sys_ck);
+ else
+ clk_disable(blizzard.sys_ck);
+}
+
+static void blizzard_power_up(struct device *dev)
+{
+ /* Vcore to 1.475V */
+ tahvo_set_clear_reg_bits(0x07, 0, 0xf);
+ msleep(10);
+
+ blizzard_enable_clocks(1);
+ gpio_set_value(N8X0_BLIZZARD_POWERDOWN_GPIO, 1);
+}
+
+static void blizzard_power_down(struct device *dev)
+{
+ gpio_set_value(N8X0_BLIZZARD_POWERDOWN_GPIO, 0);
+ blizzard_enable_clocks(0);
+
+ /* Vcore to 1.005V */
+ tahvo_set_clear_reg_bits(0x07, 0xf, 0);
+}
+
+static struct blizzard_platform_data n8x0_blizzard_data = {
+ .power_up = blizzard_power_up,
+ .power_down = blizzard_power_down,
+ .get_clock_rate = blizzard_get_clock_rate,
+ .te_connected = 1,
+};
+
+void __init n8x0_blizzard_init(void)
+{
+ int r;
+
+ r = gpio_request(N8X0_BLIZZARD_POWERDOWN_GPIO, "Blizzard pd");
+ if (r < 0)
+ {
+ printk(KERN_ERR "Can't get N8x0 Blizzard powerdown GPIO %d\n", N8X0_BLIZZARD_POWERDOWN_GPIO);
+ return;
+ }
+ gpio_direction_output(N8X0_BLIZZARD_POWERDOWN_GPIO, 1);
+
+ blizzard_get_clocks();
+ omapfb_set_ctrl_platform_data(&n8x0_blizzard_data);
+
+ printk(KERN_INFO "N8x0 Blizzard initialized");
+}
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -177,6 +177,7 @@ obj-$(CONFIG_MACH_OMAP_3430SDP) += boar
hsmmc.o \
board-flash.o
obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o
+obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0-lcd.o
obj-$(CONFIG_MACH_NOKIA_RM680) += board-rm680.o \
sdram-nokia.o \
hsmmc.o
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/cbus.h
@@ -0,0 +1,40 @@
+/*
+ * cbus.h - CBUS platform_data definition
+ *
+ * Copyright (C) 2004 - 2009 Nokia Corporation
+ *
+ * Written by Felipe Balbi <felipe.balbi@nokia.com>
+ *
+ * This file is subject to the terms and conditions of the GNU General
+ * Public License. See the file "COPYING" in the main directory of this
+ * archive for more details.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __PLAT_CBUS_H
+#define __PLAT_CBUS_H
+
+#define CBUS_RETU_DEVICE_ID 0x01
+#define CBUS_TAHVO_DEVICE_ID 0x02
+
+struct cbus_host_platform_data {
+ int dat_gpio;
+ int clk_gpio;
+ int sel_gpio;
+};
+
+struct cbus_retu_platform_data {
+ int irq_base;
+ int irq_end;
+ int devid;
+};
+
+#endif /* __PLAT_CBUS_H */
--- a/arch/arm/plat-omap/include/plat/irqs.h
+++ b/arch/arm/plat-omap/include/plat/irqs.h
@@ -411,7 +411,20 @@
#define TWL_IRQ_END TWL6030_IRQ_END
#endif
-#define NR_IRQS TWL_IRQ_END
+/* GPMC related */
+#define OMAP_GPMC_IRQ_BASE (TWL_IRQ_END)
+#define OMAP_GPMC_NR_IRQS 7
+#define OMAP_GPMC_IRQ_END (OMAP_GPMC_IRQ_BASE + OMAP_GPMC_NR_IRQS)
+
+#define CBUS_RETU_IRQ_BASE OMAP_GPMC_IRQ_END
+#ifdef CONFIG_CBUS_RETU
+#define CBUS_RETU_NR_IRQS 16
+#else
+#define CBUS_RETU_NR_IRQS 0
+#endif
+#define CBUS_RETU_IRQ_END (CBUS_RETU_IRQ_BASE + CBUS_RETU_NR_IRQS)
+
+#define NR_IRQS CBUS_RETU_IRQ_END
#define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32))
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -673,6 +673,7 @@ static struct omap_hwmod_ocp_if *omap242
static struct omap_hwmod omap2420_gpio1_hwmod = {
.name = "gpio1",
+ .flags = HWMOD_INIT_NO_RESET, /* Workaround: Don't reset the n810 MIPID */
.mpu_irqs = omap242x_gpio1_irqs,
.mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio1_irqs),
.main_clk = "gpios_fck",

View file

@ -1,98 +0,0 @@
---
arch/arm/mach-omap2/board-n8x0.c | 73 +++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -225,6 +225,77 @@ extern struct mipid_platform_data n8x0_m
extern void n8x0_mipid_init(void);
extern void n8x0_blizzard_init(void);
+struct gpio_switch_input_dev {
+ struct input_dev *idev;
+ unsigned int swcode;
+};
+
+static struct gpio_switch_input_dev *slide_input;
+static struct gpio_switch_input_dev *kblock_input;
+
+static void n8x0_gpio_switch_input_notify(struct gpio_switch_input_dev *gdev,
+ int state)
+{
+ if (gdev) {
+ input_report_switch(gdev->idev, gdev->swcode, state);
+ input_sync(gdev->idev);
+ }
+}
+
+static void n8x0_slide_notify(void *data, int state)
+{
+ n8x0_gpio_switch_input_notify(slide_input, state);
+}
+
+static void n8x0_kb_lock_notify(void *data, int state)
+{
+ n8x0_gpio_switch_input_notify(kblock_input, state);
+}
+
+static struct gpio_switch_input_dev * __init gpioswitch_input_init(
+ const char *name,
+ unsigned int swcode)
+{
+ struct gpio_switch_input_dev *gdev;
+ int err;
+
+ gdev = kzalloc(sizeof(*gdev), GFP_KERNEL);
+ if (!gdev)
+ goto error;
+ gdev->swcode = swcode;
+
+ gdev->idev = input_allocate_device();
+ if (!gdev->idev)
+ goto err_free;
+
+ gdev->idev->evbit[0] = BIT_MASK(EV_SW);
+ gdev->idev->swbit[BIT_WORD(swcode)] = BIT_MASK(swcode);
+ gdev->idev->name = name;
+
+ err = input_register_device(gdev->idev);
+ if (err)
+ goto err_free_idev;
+
+ return gdev;
+
+err_free_idev:
+ input_free_device(gdev->idev);
+err_free:
+ kfree(gdev);
+error:
+ return NULL;
+}
+
+static int __init n8x0_gpio_switches_input_init(void)
+{
+ slide_input = gpioswitch_input_init("slide", SW_KEYPAD_SLIDE);
+ kblock_input = gpioswitch_input_init("kb_lock", SW_LID);
+ if (WARN_ON(!slide_input || !kblock_input))
+ return -ENODEV;
+ return 0;
+}
+late_initcall(n8x0_gpio_switches_input_init);
+
static struct omap_gpio_switch n8x0_gpio_switches[] __initdata = {
{
.name = "headphone",
@@ -246,11 +317,13 @@ static struct omap_gpio_switch n8x0_gpio
.gpio = -1,
.debounce_rising = 200,
.debounce_falling = 200,
+ .notify = n8x0_slide_notify,
}, {
.name = "kb_lock",
.gpio = -1,
.debounce_rising = 200,
.debounce_falling = 200,
+ .notify = n8x0_kb_lock_notify,
},
};

View file

@ -1,46 +0,0 @@
--- a/drivers/bluetooth/hci_h4p/core.c
+++ b/drivers/bluetooth/hci_h4p/core.c
@@ -36,9 +36,9 @@
#include <linux/clk.h>
#include <linux/gpio.h>
-#include <mach/hardware.h>
-#include <mach/board.h>
-#include <mach/irqs.h>
+#include <plat/hardware.h>
+#include <plat/board.h>
+#include <plat/irqs.h>
#include <plat/serial.h>
#include <net/bluetooth/bluetooth.h>
--- a/drivers/bluetooth/hci_h4p/hci_h4p.h
+++ b/drivers/bluetooth/hci_h4p/hci_h4p.h
@@ -21,7 +21,7 @@
*
*/
-#include <mach/board.h>
+#include <plat/board.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
--- a/drivers/bluetooth/hci_h4p/sysfs.c
+++ b/drivers/bluetooth/hci_h4p/sysfs.c
@@ -48,15 +48,8 @@ static ssize_t hci_h4p_store_bdaddr(stru
return -EINVAL;
}
- //for (i = 0; i < 6; i++)
- //info->bdaddr[i] = bdaddr[i] & 0xff;
-
- info->bdaddr[0] = 0x00;
- info->bdaddr[1] = 0x1D;
- info->bdaddr[2] = 0x6E;
- info->bdaddr[3] = 0xD4;
- info->bdaddr[4] = 0xF0;
- info->bdaddr[5] = 0x37;
+ for (i = 0; i < 6; i++)
+ info->bdaddr[i] = bdaddr[i] & 0xff;
return count;
}

View file

@ -1,54 +0,0 @@
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -362,7 +362,7 @@ static struct omap_hwmod_class uart_clas
/* UART1 */
static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
- { .irq = INT_24XX_UART1_IRQ, },
+ { .irq = 0, },
};
static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -546,10 +546,12 @@ static void omap_uart_idle_init(struct o
uart->padconf = 0;
}
- uart->irqflags |= IRQF_SHARED;
- ret = request_threaded_irq(uart->irq, NULL, omap_uart_interrupt,
- IRQF_SHARED, "serial idle", (void *)uart);
- WARN_ON(ret);
+ if (uart->irq) {
+ uart->irqflags |= IRQF_SHARED;
+ ret = request_threaded_irq(uart->irq, NULL, omap_uart_interrupt,
+ IRQF_SHARED, "serial idle", (void *)uart);
+ WARN_ON(ret);
+ }
}
void omap_uart_enable_irqs(int enable)
@@ -560,14 +562,17 @@ void omap_uart_enable_irqs(int enable)
list_for_each_entry(uart, &uart_list, node) {
if (enable) {
pm_runtime_put_sync(&uart->pdev->dev);
- ret = request_threaded_irq(uart->irq, NULL,
- omap_uart_interrupt,
- IRQF_SHARED,
- "serial idle",
- (void *)uart);
+ if (uart->irq) {
+ ret = request_threaded_irq(uart->irq, NULL,
+ omap_uart_interrupt,
+ IRQF_SHARED,
+ "serial idle",
+ (void *)uart);
+ }
} else {
pm_runtime_get_noresume(&uart->pdev->dev);
- free_irq(uart->irq, (void *)uart);
+ if (uart->irq)
+ free_irq(uart->irq, (void *)uart);
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,11 +0,0 @@
--- a/drivers/cbus/retu.c
+++ b/drivers/cbus/retu.c
@@ -205,7 +205,7 @@ static irqreturn_t retu_irq_handler(int
return IRQ_NONE;
}
- for (i = 0; idr != 0; i++, idr >>= 1) {
+ for (i = retu->irq_base; idr != 0; i++, idr >>= 1) {
if (!(idr & 1))
continue;

View file

@ -1,12 +0,0 @@
--- a/drivers/cbus/retu.c
+++ b/drivers/cbus/retu.c
@@ -120,7 +120,9 @@ void retu_write_reg(struct device *child
{
struct retu *retu = dev_get_drvdata(child->parent);
+ mutex_lock(&retu->mutex);
__retu_write_reg(retu, reg, val);
+ mutex_unlock(&retu->mutex);
}
EXPORT_SYMBOL_GPL(retu_write_reg);

View file

@ -1,16 +0,0 @@
--- a/drivers/cbus/retu.c
+++ b/drivers/cbus/retu.c
@@ -198,10 +198,12 @@ static irqreturn_t retu_irq_handler(int
u16 idr;
u16 imr;
+ mutex_lock(&retu->mutex);
idr = __retu_read_reg(retu, RETU_REG_IDR);
imr = __retu_read_reg(retu, RETU_REG_IMR);
- idr &= ~imr;
+ mutex_unlock(&retu->mutex);
+ idr &= ~imr;
if (!idr) {
dev_vdbg(retu->dev, "No IRQ, spurious?\n");
return IRQ_NONE;

View file

@ -1,35 +0,0 @@
--- a/drivers/cbus/retu.h
+++ b/drivers/cbus/retu.h
@@ -40,6 +40,8 @@
#define RETU_REG_CTRL_CLR 0x0f /* Regulator clear register */
#define RETU_REG_CTRL_SET 0x10 /* Regulator set register */
#define RETU_REG_STATUS 0x16 /* Status register */
+#define RETU_REG_STATUS_BATAVAIL 0x0100 /* Battery available */
+#define RETU_REG_STATUS_CHGPLUG 0x1000 /* Charger is plugged in */
#define RETU_REG_WATCHDOG 0x17 /* Watchdog register */
#define RETU_REG_AUDTXR 0x18 /* Audio Codec Tx register */
#define RETU_REG_MAX 0x1f
@@ -57,6 +59,23 @@
#define MAX_RETU_IRQ_HANDLERS 16
+/* ADC channels */
+#define RETU_ADC_GND 0x00 /* Ground */
+#define RETU_ADC_BSI 0x01 /* Battery Size Indicator */
+#define RETU_ADC_BATTEMP 0x02 /* Battery temperature */
+#define RETU_ADC_CHGVOLT 0x03 /* Charger voltage */
+#define RETU_ADC_HEADSET 0x04 /* Headset detection */
+#define RETU_ADC_HOOKDET 0x05 /* Hook detection */
+#define RETU_ADC_RFGP 0x06 /* RF GP */
+#define RETU_ADC_WBTX 0x07 /* Wideband Tx detection */
+#define RETU_ADC_BATTVOLT 0x08 /* Battery voltage measurement */
+#define RETU_ADC_GND2 0x09 /* Ground */
+#define RETU_ADC_LIGHTSENS 0x0A /* Light sensor */
+#define RETU_ADC_LIGHTTEMP 0x0B /* Light sensor temperature */
+#define RETU_ADC_BKUPVOLT 0x0C /* Backup battery voltage */
+#define RETU_ADC_TEMP 0x0D /* RETU temperature */
+
+
int retu_read_reg(struct device *child, unsigned reg);
void retu_write_reg(struct device *child, unsigned reg, u16 val);
void retu_set_clear_reg_bits(struct device *child, unsigned reg, u16 set,

View file

@ -1,26 +0,0 @@
--- a/drivers/cbus/tahvo.h
+++ b/drivers/cbus/tahvo.h
@@ -30,12 +30,23 @@
#define TAHVO_REG_IDR 0x01 /* Interrupt ID */
#define TAHVO_REG_IDSR 0x02 /* Interrupt status */
#define TAHVO_REG_IMR 0x03 /* Interrupt mask */
+#define TAHVO_REG_CHGCURR 0x04 /* Charge current control PWM (8-bit) */
#define TAHVO_REG_LEDPWMR 0x05 /* LED PWM */
#define TAHVO_REG_USBR 0x06 /* USB control */
+#define TAHVO_REG_CHGCTL 0x08 /* Charge control register */
+#define TAHVO_REG_CHGCTL_EN 0x0001 /* Global charge enable */
+#define TAHVO_REG_CHGCTL_PWMOVR 0x0004 /* PWM override. Force charge PWM to 0%/100% duty cycle. */
+#define TAHVO_REG_CHGCTL_PWMOVRZERO 0x0008 /* If set, PWM override is 0% (If unset -> 100%) */
+#define TAHVO_REG_CHGCTL_CURMEAS 0x0040 /* Enable battery current measurement. */
+#define TAHVO_REG_CHGCTL_CURTIMRST 0x0080 /* Current measure timer reset. */
+#define TAHVO_REG_BATCURRTIMER 0x0c /* Battery current measure timer (8-bit) */
+#define TAHVO_REG_BATCURR 0x0d /* Battery (dis)charge current (signed 16-bit) */
+
#define TAHVO_REG_MAX 0x0d
/* Interrupt sources */
#define TAHVO_INT_VBUSON 0
+#define TAHVO_INT_BATCURR 7 /* Battery current measure timer */
#define MAX_TAHVO_IRQ_HANDLERS 8

View file

@ -1,125 +0,0 @@
--- a/drivers/cbus/retu-wdt.c
+++ b/drivers/cbus/retu-wdt.c
@@ -58,13 +58,11 @@ struct retu_wdt_dev {
struct device *dev;
int users;
struct miscdevice retu_wdt_miscdev;
- struct timer_list ping_timer;
+ struct delayed_work ping_work;
};
static struct retu_wdt_dev *retu_wdt;
-static void retu_wdt_set_ping_timer(unsigned long enable);
-
static int _retu_modify_counter(unsigned int new)
{
if (retu_wdt)
@@ -86,6 +84,31 @@ static int retu_modify_counter(unsigned
return 0;
}
+/*
+ * Since retu watchdog cannot be disabled in hardware, we must kick it
+ * with a timer until userspace watchdog software takes over. Do this
+ * unless /dev/watchdog is open or CONFIG_WATCHDOG_NOWAYOUT is set.
+ */
+static void retu_wdt_ping_enable(struct retu_wdt_dev *wdev)
+{
+ _retu_modify_counter(RETU_WDT_MAX_TIMER);
+ schedule_delayed_work(&wdev->ping_work,
+ round_jiffies_relative(RETU_WDT_DEFAULT_TIMER * HZ));
+}
+
+static void retu_wdt_ping_disable(struct retu_wdt_dev *wdev)
+{
+ _retu_modify_counter(RETU_WDT_MAX_TIMER);
+ cancel_delayed_work_sync(&wdev->ping_work);
+}
+
+static void retu_wdt_ping_work(struct work_struct *work)
+{
+ struct retu_wdt_dev *wdev = container_of(to_delayed_work(work),
+ struct retu_wdt_dev, ping_work);
+ retu_wdt_ping_enable(wdev);
+}
+
static ssize_t retu_wdt_period_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
@@ -105,7 +128,7 @@ static ssize_t retu_wdt_period_store(str
int ret;
#ifdef CONFIG_WATCHDOG_NOWAYOUT
- retu_wdt_set_ping_timer(0);
+ retu_wdt_ping_disable(retu_wdt);
#endif
if (sscanf(buf, "%u", &new_period) != 1) {
@@ -136,30 +159,13 @@ static DEVICE_ATTR(period, S_IRUGO | S_I
retu_wdt_period_store);
static DEVICE_ATTR(counter, S_IRUGO, retu_wdt_counter_show, NULL);
-/*----------------------------------------------------------------------------*/
-
-/*
- * Since retu watchdog cannot be disabled in hardware, we must kick it
- * with a timer until userspace watchdog software takes over. Do this
- * unless /dev/watchdog is open or CONFIG_WATCHDOG_NOWAYOUT is set.
- */
-static void retu_wdt_set_ping_timer(unsigned long enable)
-{
- _retu_modify_counter(RETU_WDT_MAX_TIMER);
- if (enable)
- mod_timer(&retu_wdt->ping_timer,
- jiffies + RETU_WDT_DEFAULT_TIMER * HZ);
- else
- del_timer_sync(&retu_wdt->ping_timer);
-}
-
static int retu_wdt_open(struct inode *inode, struct file *file)
{
if (test_and_set_bit(1, (unsigned long *)&(retu_wdt->users)))
return -EBUSY;
file->private_data = (void *)retu_wdt;
- retu_wdt_set_ping_timer(0);
+ retu_wdt_ping_disable(retu_wdt);
return nonseekable_open(inode, file);
}
@@ -169,7 +175,7 @@ static int retu_wdt_release(struct inode
struct retu_wdt_dev *wdev = file->private_data;
#ifndef CONFIG_WATCHDOG_NOWAYOUT
- retu_wdt_set_ping_timer(1);
+ retu_wdt_ping_enable(retu_wdt);
#endif
wdev->users = 0;
@@ -232,7 +238,7 @@ static int __devinit retu_wdt_ping(void)
#ifdef CONFIG_WATCHDOG_NOWAYOUT
retu_modify_counter(RETU_WDT_MAX_TIMER);
#else
- retu_wdt_set_ping_timer(1);
+ retu_wdt_ping_enable(retu_wdt);
#endif
return 0;
@@ -283,7 +289,7 @@ static int __init retu_wdt_probe(struct
if (ret)
goto free3;
- setup_timer(&wdev->ping_timer, retu_wdt_set_ping_timer, 1);
+ INIT_DELAYED_WORK(&wdev->ping_work, retu_wdt_ping_work);
/* passed as module parameter? */
ret = retu_modify_counter(counter_param);
@@ -326,6 +332,7 @@ static int __devexit retu_wdt_remove(str
misc_deregister(&wdev->retu_wdt_miscdev);
device_remove_file(&pdev->dev, &dev_attr_period);
device_remove_file(&pdev->dev, &dev_attr_counter);
+ cancel_delayed_work_sync(&wdev->ping_work);
kfree(wdev);
return 0;

View file

@ -1,37 +0,0 @@
--- a/drivers/cbus/retu-wdt.c
+++ b/drivers/cbus/retu-wdt.c
@@ -56,7 +56,7 @@ static int counter_param = RETU_WDT_MAX_
struct retu_wdt_dev {
struct device *dev;
- int users;
+ unsigned long users;
struct miscdevice retu_wdt_miscdev;
struct delayed_work ping_work;
};
@@ -161,7 +161,7 @@ static DEVICE_ATTR(counter, S_IRUGO, ret
static int retu_wdt_open(struct inode *inode, struct file *file)
{
- if (test_and_set_bit(1, (unsigned long *)&(retu_wdt->users)))
+ if (test_and_set_bit(0, &retu_wdt->users))
return -EBUSY;
file->private_data = (void *)retu_wdt;
@@ -177,7 +177,7 @@ static int retu_wdt_release(struct inode
#ifndef CONFIG_WATCHDOG_NOWAYOUT
retu_wdt_ping_enable(retu_wdt);
#endif
- wdev->users = 0;
+ clear_bit(0, &retu_wdt->users);
return 0;
}
@@ -264,7 +264,6 @@ static int __init retu_wdt_probe(struct
return -ENOMEM;
wdev->dev = &pdev->dev;
- wdev->users = 0;
ret = device_create_file(&pdev->dev, &dev_attr_period);
if (ret) {

View file

@ -1,180 +0,0 @@
--- a/drivers/cbus/retu-wdt.c
+++ b/drivers/cbus/retu-wdt.c
@@ -52,7 +52,6 @@ static DEFINE_MUTEX(retu_wdt_mutex);
/* Current period of watchdog */
static unsigned int period_val = RETU_WDT_DEFAULT_TIMER;
-static int counter_param = RETU_WDT_MAX_TIMER;
struct retu_wdt_dev {
struct device *dev;
@@ -109,56 +108,6 @@ static void retu_wdt_ping_work(struct wo
retu_wdt_ping_enable(wdev);
}
-static ssize_t retu_wdt_period_show(struct device *dev,
- struct device_attribute *attr, char *buf)
-{
- /* Show current max counter */
- return sprintf(buf, "%u\n", (u16)period_val);
-}
-
-/*
- * Note: This inteface is non-standard and likely to disappear!
- * Use /dev/watchdog instead, that's the standard.
- */
-static ssize_t retu_wdt_period_store(struct device *dev,
- struct device_attribute *attr,
- const char *buf, size_t count)
-{
- unsigned int new_period;
- int ret;
-
-#ifdef CONFIG_WATCHDOG_NOWAYOUT
- retu_wdt_ping_disable(retu_wdt);
-#endif
-
- if (sscanf(buf, "%u", &new_period) != 1) {
- printk(KERN_ALERT "retu_wdt_period_store: Invalid input\n");
- return -EINVAL;
- }
-
- ret = retu_modify_counter(new_period);
- if (ret < 0)
- return ret;
-
- return strnlen(buf, count);
-}
-
-static ssize_t retu_wdt_counter_show(struct device *dev,
- struct device_attribute *attr, char *buf)
-{
- u16 counter;
-
- /* Show current value in watchdog counter */
- counter = retu_read_reg(dev, RETU_REG_WATCHDOG);
-
- /* Only the 5 LSB are important */
- return snprintf(buf, PAGE_SIZE, "%u\n", (counter & 0x3F));
-}
-
-static DEVICE_ATTR(period, S_IRUGO | S_IWUSR, retu_wdt_period_show, \
- retu_wdt_period_store);
-static DEVICE_ATTR(counter, S_IRUGO, retu_wdt_counter_show, NULL);
-
static int retu_wdt_open(struct inode *inode, struct file *file)
{
if (test_and_set_bit(0, &retu_wdt->users))
@@ -232,18 +181,6 @@ static long retu_wdt_ioctl(struct file *
return 0;
}
-/* Start kicking retu watchdog until user space starts doing the kicking */
-static int __devinit retu_wdt_ping(void)
-{
-#ifdef CONFIG_WATCHDOG_NOWAYOUT
- retu_modify_counter(RETU_WDT_MAX_TIMER);
-#else
- retu_wdt_ping_enable(retu_wdt);
-#endif
-
- return 0;
-}
-
static const struct file_operations retu_wdt_fops = {
.owner = THIS_MODULE,
.write = retu_wdt_write,
@@ -252,8 +189,6 @@ static const struct file_operations retu
.release = retu_wdt_release,
};
-/*----------------------------------------------------------------------------*/
-
static int __init retu_wdt_probe(struct platform_device *pdev)
{
struct retu_wdt_dev *wdev;
@@ -265,18 +200,6 @@ static int __init retu_wdt_probe(struct
wdev->dev = &pdev->dev;
- ret = device_create_file(&pdev->dev, &dev_attr_period);
- if (ret) {
- dev_err(&pdev->dev, "Error creating sysfs period\n");
- goto free1;
- }
-
- ret = device_create_file(&pdev->dev, &dev_attr_counter);
- if (ret) {
- dev_err(&pdev->dev, "Error creating sysfs counter\n");
- goto free2;
- }
-
platform_set_drvdata(pdev, wdev);
retu_wdt = wdev;
wdev->retu_wdt_miscdev.parent = &pdev->dev;
@@ -286,38 +209,21 @@ static int __init retu_wdt_probe(struct
ret = misc_register(&(wdev->retu_wdt_miscdev));
if (ret)
- goto free3;
+ goto err_free_wdev;
INIT_DELAYED_WORK(&wdev->ping_work, retu_wdt_ping_work);
- /* passed as module parameter? */
- ret = retu_modify_counter(counter_param);
- if (ret == -EINVAL) {
- ret = retu_modify_counter(RETU_WDT_DEFAULT_TIMER);
- dev_dbg(&pdev->dev, "Initializing to default value\n");
- }
-
- /* Kick the watchdog for kernel booting to finish */
+ /* Kick the watchdog for kernel booting to finish.
+ * If nowayout is not set, we start the ping work. */
+#ifdef CONFIG_WATCHDOG_NOWAYOUT
retu_modify_counter(RETU_WDT_MAX_TIMER);
-
- ret = retu_wdt_ping();
- if (ret < 0) {
- dev_err(&pdev->dev, "Failed to ping\n");
- goto free4;
- }
+#else
+ retu_wdt_ping_enable(retu_wdt);
+#endif
return 0;
-free4:
- misc_deregister(&wdev->retu_wdt_miscdev);
-
-free3:
- device_remove_file(&pdev->dev, &dev_attr_counter);
-
-free2:
- device_remove_file(&pdev->dev, &dev_attr_period);
-
-free1:
+err_free_wdev:
kfree(wdev);
return ret;
@@ -329,8 +235,6 @@ static int __devexit retu_wdt_remove(str
wdev = platform_get_drvdata(pdev);
misc_deregister(&wdev->retu_wdt_miscdev);
- device_remove_file(&pdev->dev, &dev_attr_period);
- device_remove_file(&pdev->dev, &dev_attr_counter);
cancel_delayed_work_sync(&wdev->ping_work);
kfree(wdev);
@@ -356,9 +260,7 @@ static void __exit retu_wdt_exit(void)
module_init(retu_wdt_init);
module_exit(retu_wdt_exit);
-module_param(counter_param, int, 0);
MODULE_DESCRIPTION("Retu WatchDog");
MODULE_AUTHOR("Amit Kucheria");
MODULE_LICENSE("GPL");
-

View file

@ -1,14 +0,0 @@
--- a/drivers/cbus/retu-wdt.c
+++ b/drivers/cbus/retu-wdt.c
@@ -124,9 +124,9 @@ static int retu_wdt_release(struct inode
struct retu_wdt_dev *wdev = file->private_data;
#ifndef CONFIG_WATCHDOG_NOWAYOUT
- retu_wdt_ping_enable(retu_wdt);
+ retu_wdt_ping_enable(wdev);
#endif
- clear_bit(0, &retu_wdt->users);
+ clear_bit(0, &wdev->users);
return 0;
}

View file

@ -1,189 +0,0 @@
--- a/drivers/cbus/retu-wdt.c
+++ b/drivers/cbus/retu-wdt.c
@@ -7,6 +7,8 @@
*
* Written by Amit Kucheria <amit.kucheria@nokia.com>
*
+ * Cleanups by Michael Buesch <mb@bu3sch.de> (C) 2011
+ *
* This file is subject to the terms and conditions of the GNU General
* Public License. See the file "COPYING" in the main directory of this
* archive for more details.
@@ -48,37 +50,31 @@
#define RETU_WDT_DEFAULT_TIMER 32
#define RETU_WDT_MAX_TIMER 63
-static DEFINE_MUTEX(retu_wdt_mutex);
-
-/* Current period of watchdog */
-static unsigned int period_val = RETU_WDT_DEFAULT_TIMER;
-
struct retu_wdt_dev {
struct device *dev;
+ unsigned int period_val; /* Current period of watchdog */
unsigned long users;
- struct miscdevice retu_wdt_miscdev;
+ struct miscdevice miscdev;
struct delayed_work ping_work;
+ struct mutex mutex;
};
-static struct retu_wdt_dev *retu_wdt;
-static int _retu_modify_counter(unsigned int new)
+static inline void _retu_modify_counter(struct retu_wdt_dev *wdev,
+ unsigned int new)
{
- if (retu_wdt)
- retu_write_reg(retu_wdt->dev, RETU_REG_WATCHDOG, (u16)new);
-
- return 0;
+ retu_write_reg(wdev->dev, RETU_REG_WATCHDOG, (u16)new);
}
-static int retu_modify_counter(unsigned int new)
+static int retu_modify_counter(struct retu_wdt_dev *wdev, unsigned int new)
{
if (new < RETU_WDT_MIN_TIMER || new > RETU_WDT_MAX_TIMER)
return -EINVAL;
- mutex_lock(&retu_wdt_mutex);
- period_val = new;
- _retu_modify_counter(period_val);
- mutex_unlock(&retu_wdt_mutex);
+ mutex_lock(&wdev->mutex);
+ wdev->period_val = new;
+ _retu_modify_counter(wdev, wdev->period_val);
+ mutex_unlock(&wdev->mutex);
return 0;
}
@@ -90,14 +86,14 @@ static int retu_modify_counter(unsigned
*/
static void retu_wdt_ping_enable(struct retu_wdt_dev *wdev)
{
- _retu_modify_counter(RETU_WDT_MAX_TIMER);
+ _retu_modify_counter(wdev, RETU_WDT_MAX_TIMER);
schedule_delayed_work(&wdev->ping_work,
round_jiffies_relative(RETU_WDT_DEFAULT_TIMER * HZ));
}
static void retu_wdt_ping_disable(struct retu_wdt_dev *wdev)
{
- _retu_modify_counter(RETU_WDT_MAX_TIMER);
+ _retu_modify_counter(wdev, RETU_WDT_MAX_TIMER);
cancel_delayed_work_sync(&wdev->ping_work);
}
@@ -110,18 +106,21 @@ static void retu_wdt_ping_work(struct wo
static int retu_wdt_open(struct inode *inode, struct file *file)
{
- if (test_and_set_bit(0, &retu_wdt->users))
+ struct miscdevice *mdev = file->private_data;
+ struct retu_wdt_dev *wdev = container_of(mdev, struct retu_wdt_dev, miscdev);
+
+ if (test_and_set_bit(0, &wdev->users))
return -EBUSY;
- file->private_data = (void *)retu_wdt;
- retu_wdt_ping_disable(retu_wdt);
+ retu_wdt_ping_disable(wdev);
return nonseekable_open(inode, file);
}
static int retu_wdt_release(struct inode *inode, struct file *file)
{
- struct retu_wdt_dev *wdev = file->private_data;
+ struct miscdevice *mdev = file->private_data;
+ struct retu_wdt_dev *wdev = container_of(mdev, struct retu_wdt_dev, miscdev);
#ifndef CONFIG_WATCHDOG_NOWAYOUT
retu_wdt_ping_enable(wdev);
@@ -134,8 +133,11 @@ static int retu_wdt_release(struct inode
static ssize_t retu_wdt_write(struct file *file, const char __user *data,
size_t len, loff_t *ppos)
{
+ struct miscdevice *mdev = file->private_data;
+ struct retu_wdt_dev *wdev = container_of(mdev, struct retu_wdt_dev, miscdev);
+
if (len)
- retu_modify_counter(RETU_WDT_MAX_TIMER);
+ retu_modify_counter(wdev, RETU_WDT_MAX_TIMER);
return len;
}
@@ -143,6 +145,8 @@ static ssize_t retu_wdt_write(struct fil
static long retu_wdt_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
+ struct miscdevice *mdev = file->private_data;
+ struct retu_wdt_dev *wdev = container_of(mdev, struct retu_wdt_dev, miscdev);
int new_margin;
static struct watchdog_info ident = {
@@ -167,15 +171,15 @@ static long retu_wdt_ioctl(struct file *
return put_user(omap_prcm_get_reset_sources(),
(int __user *)arg);
case WDIOC_KEEPALIVE:
- retu_modify_counter(RETU_WDT_MAX_TIMER);
+ retu_modify_counter(wdev, RETU_WDT_MAX_TIMER);
break;
case WDIOC_SETTIMEOUT:
if (get_user(new_margin, (int __user *)arg))
return -EFAULT;
- retu_modify_counter(new_margin);
+ retu_modify_counter(wdev, new_margin);
/* Fall through */
case WDIOC_GETTIMEOUT:
- return put_user(period_val, (int __user *)arg);
+ return put_user(wdev->period_val, (int __user *)arg);
}
return 0;
@@ -199,15 +203,17 @@ static int __init retu_wdt_probe(struct
return -ENOMEM;
wdev->dev = &pdev->dev;
+ wdev->period_val = RETU_WDT_DEFAULT_TIMER;
+ mutex_init(&wdev->mutex);
platform_set_drvdata(pdev, wdev);
- retu_wdt = wdev;
- wdev->retu_wdt_miscdev.parent = &pdev->dev;
- wdev->retu_wdt_miscdev.minor = WATCHDOG_MINOR;
- wdev->retu_wdt_miscdev.name = "watchdog";
- wdev->retu_wdt_miscdev.fops = &retu_wdt_fops;
- ret = misc_register(&(wdev->retu_wdt_miscdev));
+ wdev->miscdev.parent = &pdev->dev;
+ wdev->miscdev.minor = WATCHDOG_MINOR;
+ wdev->miscdev.name = "watchdog";
+ wdev->miscdev.fops = &retu_wdt_fops;
+
+ ret = misc_register(&wdev->miscdev);
if (ret)
goto err_free_wdev;
@@ -216,9 +222,9 @@ static int __init retu_wdt_probe(struct
/* Kick the watchdog for kernel booting to finish.
* If nowayout is not set, we start the ping work. */
#ifdef CONFIG_WATCHDOG_NOWAYOUT
- retu_modify_counter(RETU_WDT_MAX_TIMER);
+ retu_modify_counter(wdev, RETU_WDT_MAX_TIMER);
#else
- retu_wdt_ping_enable(retu_wdt);
+ retu_wdt_ping_enable(wdev);
#endif
return 0;
@@ -234,7 +240,7 @@ static int __devexit retu_wdt_remove(str
struct retu_wdt_dev *wdev;
wdev = platform_get_drvdata(pdev);
- misc_deregister(&wdev->retu_wdt_miscdev);
+ misc_deregister(&wdev->miscdev);
cancel_delayed_work_sync(&wdev->ping_work);
kfree(wdev);

View file

@ -1,11 +0,0 @@
--- a/drivers/cbus/retu-wdt.c
+++ b/drivers/cbus/retu-wdt.c
@@ -149,7 +149,7 @@ static long retu_wdt_ioctl(struct file *
struct retu_wdt_dev *wdev = container_of(mdev, struct retu_wdt_dev, miscdev);
int new_margin;
- static struct watchdog_info ident = {
+ static const struct watchdog_info ident = {
.identity = "Retu Watchdog",
.options = WDIOF_SETTIMEOUT,
.firmware_version = 0,

View file

@ -1,69 +0,0 @@
--- a/drivers/cbus/tahvo-usb.c
+++ b/drivers/cbus/tahvo-usb.c
@@ -99,7 +99,7 @@ struct tahvo_usb {
int tahvo_mode;
#endif
};
-static struct platform_device tahvo_usb_device;
+static struct tahvo_usb *tahvo_usb_device;
/*
* ---------------------------------------------------------------------------
@@ -114,8 +114,7 @@ static struct platform_device *tahvo_otg
static irqreturn_t omap_otg_irq(int irq, void *arg)
{
- struct platform_device *otg_dev = arg;
- struct tahvo_usb *tu = platform_get_drvdata(otg_dev);
+ struct tahvo_usb *tu = arg;
u16 otg_irq;
otg_irq = omap_readw(OTG_IRQ_SRC);
@@ -201,12 +200,12 @@ static int __init omap_otg_probe(struct
return request_irq(tahvo_otg_dev->resource[1].start,
omap_otg_irq, IRQF_DISABLED, DRIVER_NAME,
- &tahvo_usb_device);
+ tahvo_usb_device);
}
static int __exit omap_otg_remove(struct platform_device *pdev)
{
- free_irq(tahvo_otg_dev->resource[1].start, &tahvo_usb_device);
+ free_irq(tahvo_otg_dev->resource[1].start, tahvo_usb_device);
tahvo_otg_dev = NULL;
return 0;
@@ -659,6 +658,7 @@ static int __init tahvo_usb_probe(struct
tu = kzalloc(sizeof(*tu), GFP_KERNEL);
if (!tu)
return -ENOMEM;
+ tahvo_usb_device = tu;
tu->pt_dev = container_of(dev, struct platform_device, dev);
#ifdef CONFIG_USB_OTG
@@ -682,6 +682,7 @@ static int __init tahvo_usb_probe(struct
(unsigned long) tu, "vbus_interrupt");
if (ret != 0) {
kfree(tu);
+ tahvo_usb_device = NULL;
printk(KERN_ERR "Could not register Tahvo interrupt for VBUS\n");
return ret;
}
@@ -708,6 +709,7 @@ static int __init tahvo_usb_probe(struct
ret = otg_set_transceiver(&tu->otg);
if (ret < 0) {
printk(KERN_ERR "Cannot register USB transceiver\n");
+ tahvo_usb_device = NULL;
kfree(tu);
tahvo_free_irq(TAHVO_INT_VBUSON);
return ret;
@@ -732,6 +734,8 @@ static int __exit tahvo_usb_remove(struc
#ifdef CONFIG_USB_OTG
device_remove_file(&pdev->dev, &dev_attr_otg_mode);
#endif
+ tahvo_usb_device = NULL;
+
return 0;
}

View file

@ -1,20 +0,0 @@
--- a/drivers/cbus/tahvo-usb.c
+++ b/drivers/cbus/tahvo-usb.c
@@ -725,6 +725,8 @@ static int __init tahvo_usb_probe(struct
static int __exit tahvo_usb_remove(struct platform_device *pdev)
{
+ struct tahvo_usb *tu = platform_get_drvdata(pdev);
+
dev_dbg(&pdev->dev, "remove\n");
tahvo_free_irq(TAHVO_INT_VBUSON);
@@ -734,6 +736,8 @@ static int __exit tahvo_usb_remove(struc
#ifdef CONFIG_USB_OTG
device_remove_file(&pdev->dev, &dev_attr_otg_mode);
#endif
+
+ kfree(tu);
tahvo_usb_device = NULL;
return 0;

View file

@ -1,76 +0,0 @@
--- a/drivers/cbus/tahvo-usb.c
+++ b/drivers/cbus/tahvo-usb.c
@@ -98,6 +98,7 @@ struct tahvo_usb {
#ifdef CONFIG_USB_OTG
int tahvo_mode;
#endif
+ struct clk *ick;
};
static struct tahvo_usb *tahvo_usb_device;
@@ -673,6 +674,14 @@ static int __init tahvo_usb_probe(struct
INIT_WORK(&tu->irq_work, tahvo_usb_irq_work);
mutex_init(&tu->serialize);
+ tu->ick = clk_get(NULL, "usb_l4_ick");
+ if (IS_ERR(tu->ick)) {
+ dev_err(dev, "Failed to get usb_l4_ick\n");
+ ret = PTR_ERR(tu->ick);
+ goto err_free_tu;
+ }
+ clk_enable(tu->ick);
+
/* Set initial state, so that we generate kevents only on
* state changes */
tu->vbus_state = tahvo_read_reg(TAHVO_REG_IDSR) & 0x01;
@@ -681,10 +690,8 @@ static int __init tahvo_usb_probe(struct
ret = tahvo_request_irq(TAHVO_INT_VBUSON, tahvo_usb_vbus_interrupt,
(unsigned long) tu, "vbus_interrupt");
if (ret != 0) {
- kfree(tu);
- tahvo_usb_device = NULL;
printk(KERN_ERR "Could not register Tahvo interrupt for VBUS\n");
- return ret;
+ goto err_release_clk;
}
/* Attributes */
@@ -709,10 +716,7 @@ static int __init tahvo_usb_probe(struct
ret = otg_set_transceiver(&tu->otg);
if (ret < 0) {
printk(KERN_ERR "Cannot register USB transceiver\n");
- tahvo_usb_device = NULL;
- kfree(tu);
- tahvo_free_irq(TAHVO_INT_VBUSON);
- return ret;
+ goto err_free_irq;
}
dev_set_drvdata(dev, tu);
@@ -721,6 +725,17 @@ static int __init tahvo_usb_probe(struct
* may not be generated in addition to this. */
schedule_work(&tu->irq_work);
return 0;
+
+err_free_irq:
+ tahvo_free_irq(TAHVO_INT_VBUSON);
+err_release_clk:
+ clk_disable(tu->ick);
+ clk_put(tu->ick);
+err_free_tu:
+ kfree(tu);
+ tahvo_usb_device = NULL;
+
+ return ret;
}
static int __exit tahvo_usb_remove(struct platform_device *pdev)
@@ -736,6 +751,8 @@ static int __exit tahvo_usb_remove(struc
#ifdef CONFIG_USB_OTG
device_remove_file(&pdev->dev, &dev_attr_otg_mode);
#endif
+ clk_disable(tu->ick);
+ clk_put(tu->ick);
kfree(tu);
tahvo_usb_device = NULL;

View file

@ -1,34 +0,0 @@
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -40,6 +40,7 @@
#include <plat/serial.h>
#include <plat/cbus.h>
#include <plat/gpio-switch.h>
+#include <plat/usb.h>
#include "mux.h"
@@ -395,6 +396,14 @@ static struct musb_hdrc_platform_data tu
.config = &musb_config,
};
+static struct omap_usb_config n8x0_omap_usb_config __initdata = {
+ .otg = 1,
+ .register_host = 1,
+ .register_dev = 1,
+ .hmc_mode = 16,
+ .pins[0] = 6,
+};
+
static void __init n8x0_usb_init(void)
{
int ret = 0;
@@ -417,6 +426,8 @@ static void __init n8x0_usb_init(void)
if (ret != 0)
goto err;
+ omap2_usbfs_init(&n8x0_omap_usb_config);
+
printk(announce);
return;

File diff suppressed because it is too large Load diff

View file

@ -1,31 +0,0 @@
---
drivers/input/evdev.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -78,7 +78,7 @@ static void evdev_event(struct input_han
unsigned int type, unsigned int code, int value)
{
struct evdev *evdev = handle->private;
- struct evdev_client *client;
+ struct evdev_client *client, *c;
struct input_event event;
do_gettimeofday(&event.time);
@@ -89,9 +89,13 @@ static void evdev_event(struct input_han
rcu_read_lock();
client = rcu_dereference(evdev->grab);
- if (client)
+ if (client) {
evdev_pass_event(client, &event);
- else
+ /* Also pass events to clients that did not grab the device. */
+ list_for_each_entry_rcu(c, &evdev->client_list, node)
+ if (c != client)
+ evdev_pass_event(c, &event);
+ } else
list_for_each_entry_rcu(client, &evdev->client_list, node)
evdev_pass_event(client, &event);

View file

@ -1,49 +0,0 @@
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1456,6 +1456,7 @@ static int __init mmc_omap_probe(struct
host->dma_ch = -1;
host->irq = irq;
+ host->reg_shift = (cpu_is_omap7xx() ? 1 : 2);
host->phys_base = host->mem_res->start;
host->virt_base = ioremap(res->start, res->end - res->start + 1);
if (!host->virt_base)
@@ -1495,7 +1496,9 @@ static int __init mmc_omap_probe(struct
}
}
- host->reg_shift = (cpu_is_omap7xx() ? 1 : 2);
+ /* Make sure the detect workqueue was run at least once. */
+ printk(KERN_INFO "OMAP-mmc: waiting for cards...\n");
+ mmc_flush_scheduled_work();
return 0;
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -75,12 +75,13 @@ static int mmc_schedule_delayed_work(str
}
/*
- * Internal function. Flush all scheduled work from the MMC work queue.
+ * Flush all scheduled work from the MMC work queue.
*/
-static void mmc_flush_scheduled_work(void)
+void mmc_flush_scheduled_work(void)
{
flush_workqueue(workqueue);
}
+EXPORT_SYMBOL(mmc_flush_scheduled_work);
/**
* mmc_request_done - finish processing an MMC request
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -325,5 +325,7 @@ static inline int mmc_card_is_powered_re
return host->pm_flags & MMC_PM_KEEP_POWER;
}
+void mmc_flush_scheduled_work(void);
+
#endif

View file

@ -1,11 +0,0 @@
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -832,7 +832,7 @@ static irqreturn_t mmc_omap_irq(int irq,
return IRQ_HANDLED;
}
- if (end_command)
+ if (end_command && host->cmd)
mmc_omap_cmd_done(host, host->cmd);
if (host->data != NULL) {
if (transfer_error)

View file

@ -1,33 +0,0 @@
---
arch/arm/mach-omap2/board-n8x0-lcd.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
--- a/arch/arm/mach-omap2/board-n8x0-lcd.c
+++ b/arch/arm/mach-omap2/board-n8x0-lcd.c
@@ -34,8 +34,26 @@ static void mipid_shutdown(struct mipid_
}
}
+static int n8x0_get_backlight_level(struct mipid_platform_data *pdata)
+{
+ return tahvo_get_backlight_level();
+}
+
+static int n8x0_get_max_backlight_level(struct mipid_platform_data *pdata)
+{
+ return tahvo_get_max_backlight_level();
+}
+
+static void n8x0_set_backlight_level(struct mipid_platform_data *pdata, int level)
+{
+ tahvo_set_backlight_level(level);
+}
+
struct mipid_platform_data n8x0_mipid_platform_data = {
.shutdown = mipid_shutdown,
+ .get_bklight_level = n8x0_get_backlight_level,
+ .set_bklight_level = n8x0_set_backlight_level,
+ .get_bklight_max = n8x0_get_max_backlight_level,
};
void __init n8x0_mipid_init(void)

View file

@ -1,23 +0,0 @@
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -660,6 +660,8 @@ static void serial_out_override(struct u
}
#endif
+static struct omap_uart_state statebuf[4];
+
void __init omap_serial_early_init(void)
{
int i = 0;
@@ -675,9 +677,9 @@ void __init omap_serial_early_init(void)
if (!oh)
break;
- uart = kzalloc(sizeof(struct omap_uart_state), GFP_KERNEL);
- if (WARN_ON(!uart))
+ if (WARN_ON(i >= ARRAY_SIZE(statebuf)))
return;
+ uart = &statebuf[i];
uart->oh = oh;
uart->num = i++;

View file

@ -1,137 +0,0 @@
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -66,7 +66,7 @@ obj-$(CONFIG_TC) += tc/
obj-$(CONFIG_UWB) += uwb/
obj-$(CONFIG_USB_OTG_UTILS) += usb/otg/
obj-$(CONFIG_USB) += usb/
-obj-$(CONFIG_USB_MUSB_HDRC) += usb/musb/
+obj-y += usb/musb/
obj-$(CONFIG_PCI) += usb/
obj-$(CONFIG_USB_GADGET) += usb/gadget/
obj-$(CONFIG_SERIO) += input/serio/
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -46,7 +46,7 @@ config USB_MUSB_DA8XX
depends on ARCH_DAVINCI_DA8XX
config USB_MUSB_TUSB6010
- bool "TUSB6010"
+ tristate "TUSB6010"
depends on ARCH_OMAP
config USB_MUSB_OMAP2PLUS
--- a/drivers/usb/musb/tusb6010.c
+++ b/drivers/usb/musb/tusb6010.c
@@ -55,6 +55,7 @@ u8 tusb_get_revision(struct musb *musb)
return rev;
}
+EXPORT_SYMBOL(tusb_get_revision);
static int tusb_print_revision(struct musb *musb)
{
@@ -218,6 +219,7 @@ void musb_write_fifo(struct musb_hw_ep *
if (len > 0)
tusb_fifo_write_unaligned(fifo, buf, len);
}
+EXPORT_SYMBOL(musb_write_fifo);
void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *buf)
{
@@ -264,6 +266,7 @@ void musb_read_fifo(struct musb_hw_ep *h
if (len > 0)
tusb_fifo_read_unaligned(fifo, buf, len);
}
+EXPORT_SYMBOL(musb_read_fifo);
static struct musb *the_musb;
@@ -1259,18 +1262,16 @@ static struct platform_driver tusb_drive
},
};
-MODULE_DESCRIPTION("TUSB6010 MUSB Glue Layer");
-MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
-MODULE_LICENSE("GPL v2");
+//MODULE_DESCRIPTION("TUSB6010 MUSB Glue Layer");
+//MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>");
+//MODULE_LICENSE("GPL v2");
-static int __init tusb_init(void)
+int musb_hdrc_glue_init(void)
{
return platform_driver_probe(&tusb_driver, tusb_probe);
}
-subsys_initcall(tusb_init);
-static void __exit tusb_exit(void)
+void musb_hdrc_glue_exit(void)
{
platform_driver_unregister(&tusb_driver);
}
-module_exit(tusb_exit);
--- a/drivers/usb/musb/Makefile
+++ b/drivers/usb/musb/Makefile
@@ -13,13 +13,13 @@ musb_hdrc-$(CONFIG_USB_MUSB_HDRC_HCD) +
musb_hdrc-$(CONFIG_DEBUG_FS) += musb_debugfs.o
# Hardware Glue Layer
-obj-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o
-obj-$(CONFIG_USB_MUSB_AM35X) += am35x.o
-obj-$(CONFIG_USB_MUSB_TUSB6010) += tusb6010.o
-obj-$(CONFIG_USB_MUSB_DAVINCI) += davinci.o
-obj-$(CONFIG_USB_MUSB_DA8XX) += da8xx.o
-obj-$(CONFIG_USB_MUSB_BLACKFIN) += blackfin.o
-obj-$(CONFIG_USB_MUSB_UX500) += ux500.o
+musb_hdrc-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o
+musb_hdrc-$(CONFIG_USB_MUSB_AM35X) += am35x.o
+musb_hdrc-$(CONFIG_USB_MUSB_TUSB6010) += tusb6010.o
+musb_hdrc-$(CONFIG_USB_MUSB_DAVINCI) += davinci.o
+musb_hdrc-$(CONFIG_USB_MUSB_DA8XX) += da8xx.o
+musb_hdrc-$(CONFIG_USB_MUSB_BLACKFIN) += blackfin.o
+musb_hdrc-$(CONFIG_USB_MUSB_UX500) += ux500.o
# the kconfig must guarantee that only one of the
# possible I/O schemes will be enabled at a time ...
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2427,8 +2427,13 @@ static struct platform_driver musb_drive
/*-------------------------------------------------------------------------*/
+extern int musb_hdrc_glue_init(void);
+extern void musb_hdrc_glue_exit(void);
+
static int __init musb_init(void)
{
+ int err;
+
#ifdef CONFIG_USB_MUSB_HDRC_HCD
if (usb_disabled())
return 0;
@@ -2456,7 +2461,17 @@ static int __init musb_init(void)
#endif
", debug=%d\n",
musb_driver_name, musb_debug);
- return platform_driver_probe(&musb_driver, musb_probe);
+
+ err = musb_hdrc_glue_init();
+ if (err)
+ return err;
+ err = platform_driver_probe(&musb_driver, musb_probe);
+ if (err) {
+ musb_hdrc_glue_exit();
+ return err;
+ }
+
+ return 0;
}
/* make us init after usbcore and i2c (transceivers, regulators, etc)
@@ -2467,5 +2482,6 @@ fs_initcall(musb_init);
static void __exit musb_cleanup(void)
{
platform_driver_unregister(&musb_driver);
+ musb_hdrc_glue_exit();
}
module_exit(musb_cleanup);