diff -pwurN linux-2.6.24.3-p2010/./arch/mips/configs/trendtacRV10_defconfig linux-2.6.24.3-RV10/./arch/mips/configs/trendtacRV10_defconfig --- linux-2.6.24.3-p2010/./arch/mips/configs/trendtacRV10_defconfig 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./arch/mips/configs/trendtacRV10_defconfig 2010-07-13 22:23:59.000000000 +0200 @@ -0,0 +1,1472 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.24.3 +# Sun Jul 4 05:09:37 2010 +# +CONFIG_MIPS=y + +# +# Machine selection +# +# CONFIG_JZ4730_PMP is not set +CONFIG_JZ4730_MINIPC=y +# CONFIG_JZ4740_PAVO is not set +# CONFIG_JZ4740_LEO is not set +# CONFIG_JZ4740_LYRA is not set +# CONFIG_JZ4725_DIPPER is not set +# CONFIG_JZ4720_VIRGO is not set +# CONFIG_JZ4750_FUWA is not set +# CONFIG_JZ4750D_FUWA1 is not set +# CONFIG_JZ4750_APUS is not set +# CONFIG_JZ4750D_CETUS is not set +# CONFIG_JZ4750L_F4750L is not set +# CONFIG_JZ4750L_VOLANS is not set +# CONFIG_MACH_ALCHEMY is not set +# CONFIG_BASLER_EXCITE is not set +# CONFIG_BCM47XX is not set +# CONFIG_MIPS_COBALT is not set +# CONFIG_MACH_DECSTATION is not set +# CONFIG_MACH_JAZZ is not set +# CONFIG_LASAT is not set +# CONFIG_LEMOTE_FULONG is not set +# CONFIG_MIPS_ATLAS is not set +# CONFIG_MIPS_MALTA is not set +# CONFIG_MIPS_SEAD is not set +# CONFIG_MIPS_SIM is not set +# CONFIG_MARKEINS is not set +# CONFIG_MACH_VR41XX is not set +# CONFIG_PNX8550_JBS is not set +# CONFIG_PNX8550_STB810 is not set +# CONFIG_PMC_MSP is not set +# CONFIG_PMC_YOSEMITE is not set +# CONFIG_QEMU is not set +# CONFIG_SGI_IP22 is not set +# CONFIG_SGI_IP27 is not set +# CONFIG_SGI_IP32 is not set +# CONFIG_SIBYTE_CRHINE is not set +# CONFIG_SIBYTE_CARMEL is not set +# CONFIG_SIBYTE_CRHONE is not set +# CONFIG_SIBYTE_RHONE is not set +# CONFIG_SIBYTE_SWARM is not set +# CONFIG_SIBYTE_LITTLESUR is not set +# CONFIG_SIBYTE_SENTOSA is not set +# CONFIG_SIBYTE_PTSWARM is not set +# CONFIG_SIBYTE_BIGSUR is not set +# CONFIG_SNI_RM is not set +# CONFIG_TOSHIBA_JMR3927 is not set +# CONFIG_TOSHIBA_RBTX4927 is not set +# CONFIG_TOSHIBA_RBTX4938 is not set +# CONFIG_WR_PPMC is not set +CONFIG_SOC_JZ4730=y +CONFIG_JZSOC=y +CONFIG_JZRISC=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_ARCH_HAS_ILOG2_U32 is not set +# CONFIG_ARCH_HAS_ILOG2_U64 is not set +CONFIG_ARCH_SUPPORTS_OPROFILE=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_TIME=y +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y +# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set +CONFIG_DMA_NONCOHERENT=y +CONFIG_DMA_NEED_PCI_MAP_STATE=y +# CONFIG_HOTPLUG_CPU is not set +# CONFIG_NO_IOPORT is not set +CONFIG_GENERIC_GPIO=y +# CONFIG_CPU_BIG_ENDIAN is not set +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y +CONFIG_MIPS_L1_CACHE_SHIFT=5 + +# +# CPU selection +# +# CONFIG_CPU_LOONGSON2 is not set +CONFIG_CPU_MIPS32_R1=y +# CONFIG_CPU_MIPS32_R2 is not set +# CONFIG_CPU_MIPS64_R1 is not set +# CONFIG_CPU_MIPS64_R2 is not set +# CONFIG_CPU_R3000 is not set +# CONFIG_CPU_TX39XX is not set +# CONFIG_CPU_VR41XX is not set +# CONFIG_CPU_R4300 is not set +# CONFIG_CPU_R4X00 is not set +# CONFIG_CPU_TX49XX is not set +# CONFIG_CPU_R5000 is not set +# CONFIG_CPU_R5432 is not set +# CONFIG_CPU_R6000 is not set +# CONFIG_CPU_NEVADA is not set +# CONFIG_CPU_R8000 is not set +# CONFIG_CPU_R10000 is not set +# CONFIG_CPU_RM7000 is not set +# CONFIG_CPU_RM9000 is not set +# CONFIG_CPU_SB1 is not set +CONFIG_SYS_HAS_CPU_MIPS32_R1=y +CONFIG_CPU_MIPS32=y +CONFIG_CPU_MIPSR1=y +CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y +CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y + +# +# Kernel type +# +CONFIG_32BIT=y +# CONFIG_64BIT is not set +CONFIG_PAGE_SIZE_4KB=y +# CONFIG_PAGE_SIZE_8KB is not set +# CONFIG_PAGE_SIZE_16KB is not set +# CONFIG_PAGE_SIZE_64KB is not set +CONFIG_CPU_HAS_PREFETCH=y +CONFIG_MIPS_MT_DISABLED=y +# CONFIG_MIPS_MT_SMP is not set +# CONFIG_MIPS_MT_SMTC is not set +CONFIG_CPU_HAS_LLSC=y +CONFIG_CPU_HAS_SYNC=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_CPU_SUPPORTS_HIGHMEM=y +CONFIG_ARCH_FLATMEM_ENABLE=y +CONFIG_ARCH_POPULATES_NODE_MAP=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_RESOURCES_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +# CONFIG_TICK_ONESHOT is not set +# CONFIG_NO_HZ is not set +# CONFIG_HIGH_RES_TIMERS is not set +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_FORCE_MAX_ZONEORDER=12 +# CONFIG_HZ_48 is not set +CONFIG_HZ_100=y +# CONFIG_HZ_128 is not set +# CONFIG_HZ_250 is not set +# CONFIG_HZ_256 is not set +# CONFIG_HZ_1000 is not set +# CONFIG_HZ_1024 is not set +CONFIG_SYS_SUPPORTS_ARBIT_HZ=y +CONFIG_HZ=100 +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +# CONFIG_PREEMPT is not set +# CONFIG_KEXEC is not set +CONFIG_SECCOMP=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_USER_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_CGROUPS is not set +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_FAIR_USER_SCHED=y +# CONFIG_FAIR_CGROUP_SCHED is not set +CONFIG_SYSFS_DEPRECATED=y +CONFIG_RELAY=y +# CONFIG_BLK_DEV_INITRD is not set +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_EMBEDDED=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_ANON_INODES=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_SLAB=y +# CONFIG_SLUB is not set +# CONFIG_SLOB is not set +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_KMOD=y +CONFIG_BLOCK=y +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set +# CONFIG_BLK_DEV_BSG is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +CONFIG_DEFAULT_AS=y +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="anticipatory" + +# +# Bus options (PCI, PCMCIA, EISA, ISA, TC) +# +# CONFIG_ARCH_SUPPORTS_MSI is not set +CONFIG_MMU=y +# CONFIG_PCCARD is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_TRAD_SIGNALS=y + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ_JZ=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_DEBUG is not set +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set + +# +# Power management options +# +CONFIG_PM=y +CONFIG_PM_LEGACY=y +# CONFIG_PM_DEBUG is not set +CONFIG_PM_SLEEP=y +CONFIG_SUSPEND_UP_POSSIBLE=y +CONFIG_SUSPEND=y + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_SCHED is not set +CONFIG_NET_SCH_FIFO=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set + +# +# Wireless +# +CONFIG_CFG80211=y +CONFIG_NL80211=y +CONFIG_WIRELESS_EXT=y +CONFIG_MAC80211=y +CONFIG_MAC80211_RCSIMPLE=y +# CONFIG_MAC80211_DEBUG is not set +CONFIG_IEEE80211=y +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_CRYPT_WEP=y +# CONFIG_IEEE80211_CRYPT_CCMP is not set +CONFIG_IEEE80211_CRYPT_TKIP=y +CONFIG_IEEE80211_SOFTMAC=y +# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set +# CONFIG_RFKILL is not set +# CONFIG_NET_9P is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_CONCAT=y +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +CONFIG_SSFDC=y +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_VERIFY_WRITE=y +# CONFIG_MTD_NAND_ECC_SMC is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_NANDSIM is not set +# CONFIG_MTD_NAND_PLATFORM is not set +# CONFIG_MTD_ALAUDA is not set +CONFIG_MTD_NAND_JZ4730=y +# CONFIG_MTD_HW_HM_ECC is not set +CONFIG_MTD_SW_HM_ECC=y +# CONFIG_MTD_HW_RS_ECC is not set +CONFIG_MTD_MTDBLOCK_WRITE_VERIFY_ENABLE=y +CONFIG_MTD_OOB_COPIES=3 +CONFIG_MTD_BADBLOCK_FLAG_PAGE=0 +# CONFIG_MTD_ONENAND is not set + +# +# UBI - Unsorted block images +# +# CONFIG_MTD_UBI is not set +# CONFIG_MTD_UBI_BLKDEVS is not set +# CONFIG_PARPORT is not set +# CONFIG_PNP is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +CONFIG_MISC_DEVICES=y +# CONFIG_EEPROM_93CX6 is not set +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_SCH is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +CONFIG_SCSI_LOWLEVEL=y +# CONFIG_ISCSI_TCP is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_ATA is not set +# CONFIG_MD is not set +CONFIG_NETDEVICES=y +# CONFIG_NETDEVICES_MULTIQUEUE is not set +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_MACVLAN is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_VETH is not set +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_BROADCOM_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +CONFIG_JZ_ETH=y +# CONFIG_AX88796 is not set +# CONFIG_DM9000 is not set +# CONFIG_IBM_NEW_EMAC_ZMII is not set +# CONFIG_IBM_NEW_EMAC_RGMII is not set +# CONFIG_IBM_NEW_EMAC_TAH is not set +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set +# CONFIG_B44 is not set +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set + +# +# Wireless LAN +# +# CONFIG_WLAN_PRE80211 is not set +CONFIG_WLAN_80211=y +# CONFIG_LIBERTAS is not set +# CONFIG_USB_ZD1201 is not set +# CONFIG_RTL8187 is not set +# CONFIG_P54_COMMON is not set +# CONFIG_HOSTAP is not set +# CONFIG_B43 is not set +# CONFIG_B43LEGACY is not set +CONFIG_ZD1211RW=y +# CONFIG_ZD1211RW_DEBUG is not set +# CONFIG_RT2X00 is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=y +CONFIG_USB_NET_CDCETHER=y +CONFIG_USB_NET_DM9601=y +# CONFIG_USB_NET_GL620A is not set +CONFIG_USB_NET_NET1080=y +CONFIG_USB_NET_PLUSB=y +# CONFIG_USB_NET_MCS7830 is not set +# CONFIG_USB_NET_RNDIS_HOST is not set +CONFIG_USB_NET_CDC_SUBSET=y +CONFIG_USB_ALI_M5632=y +# CONFIG_USB_AN2720 is not set +CONFIG_USB_BELKIN=y +CONFIG_USB_ARMLINUX=y +# CONFIG_USB_EPSON2888 is not set +# CONFIG_USB_KC2190 is not set +CONFIG_USB_NET_ZAURUS=y +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set +CONFIG_INPUT_POLLDEV=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=800 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +CONFIG_KEYBOARD_JZ=y +# CONFIG_5x5_KEYBOARD_JZ is not set +# CONFIG_KEYBOARD_GPIO is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +CONFIG_MOUSE_PS2_ALPS=y +CONFIG_MOUSE_PS2_LOGIPS2PP=y +CONFIG_MOUSE_PS2_SYNAPTICS=y +CONFIG_MOUSE_PS2_LIFEBOOK=y +CONFIG_MOUSE_PS2_TRACKPOINT=y +# CONFIG_MOUSE_PS2_TOUCHKIT is not set +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_APPLETOUCH is not set +# CONFIG_MOUSE_VSXXXAA is not set +CONFIG_MOUSE_GPIO=y +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +# CONFIG_SERIO_I8042 is not set +CONFIG_SERIO_SERPORT=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_INGENIC is not set +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_RTC is not set +CONFIG_RTC_PCF8563=y +# CONFIG_RTC_JZ is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set + +# +# JZSOC char device support +# +CONFIG_JZCHAR=y +# CONFIG_JZ_CIM is not set +# CONFIG_JZ_TPANEL_ATA2508 is not set +# CONFIG_JZ_UDC_HOTPLUG is not set +CONFIG_JZ_MINIPC_MISC=y +# CONFIG_JZ_OW is not set +# CONFIG_JZ_TCSM is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +# CONFIG_I2C_CHARDEV is not set + +# +# I2C Algorithms +# +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# +# CONFIG_I2C_JZ47XX is not set +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_DS1337 is not set +# CONFIG_SENSORS_DS1374 is not set +# CONFIG_DS1682 is not set +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_MAX6875 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# SPI support +# +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set +# CONFIG_W1 is not set +# CONFIG_POWER_SUPPLY is not set +# CONFIG_HWMON is not set +# CONFIG_WATCHDOG is not set + +# +# Sonics Silicon Backplane +# +CONFIG_SSB_POSSIBLE=y +# CONFIG_SSB is not set + +# +# Multifunction device drivers +# +# CONFIG_MFD_SM501 is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set +# CONFIG_DVB_CORE is not set +# CONFIG_DAB is not set + +# +# Graphics support +# +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_SYS_FOPS is not set +CONFIG_FB_DEFERRED_IO=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +CONFIG_FB_JZSOC=y +CONFIG_FB_JZLCD_4730_4740=y +CONFIG_JZLCD_FRAMEBUFFER_MAX=1 +# CONFIG_JZLCD_FRAMEBUFFER_ROTATE_SUPPORT is not set +# CONFIG_JZLCD_SHARP_LQ035Q7 is not set +# CONFIG_JZLCD_SAMSUNG_LTS350Q1 is not set +# CONFIG_JZLCD_SAMSUNG_LTV350QVF04 is not set +# CONFIG_JZLCD_SAMSUNG_LTP400WQF01 is not set +# CONFIG_JZLCD_SAMSUNG_LTP400WQF02 is not set +# CONFIG_JZLCD_AUO_A030FL01_V1 is not set +# CONFIG_JZLCD_TRULY_TFTG320240DTSW is not set +# CONFIG_JZLCD_TRULY_TFTG320240DTSW_SERIAL is not set +# CONFIG_JZLCD_TRULY_TFTG240320UTSW_63W_E is not set +# CONFIG_JZLCD_FOXCONN_PT035TN01 is not set +# CONFIG_JZLCD_INNOLUX_PT035TN01_SERIAL is not set +# CONFIG_JZLCD_TOSHIBA_LTM084P363 is not set +# CONFIG_JZLCD_HYNIX_HT10X21 is not set +# CONFIG_JZLCD_INNOLUX_AT080TN42 is not set +# CONFIG_JZLCD_CSTN_800x600 is not set +# CONFIG_JZLCD_CSTN_320x240 is not set +# CONFIG_JZLCD_MSTN_480x320 is not set +# CONFIG_JZLCD_MSTN_320x240 is not set +# CONFIG_JZLCD_MSTN_240x128 is not set +CONFIG_JZLCD_CHUNGHWA_CLAA070VC01=y +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_VIRTUAL is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_BACKLIGHT_CORGI is not set +CONFIG_BACKLIGHT_JZ4730_MINIPC=y + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +# CONFIG_FRAMEBUFFER_CONSOLE_CURSOR_FLASH is not set +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y + +# +# Sound +# +CONFIG_SOUND=y + +# +# Advanced Linux Sound Architecture +# +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y +CONFIG_SND_RAWMIDI=y +CONFIG_SND_SEQUENCER=y +# CONFIG_SND_SEQ_DUMMY is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=y +CONFIG_SND_PCM_OSS=y +CONFIG_SND_PCM_OSS_PLUGINS=y +CONFIG_SND_SEQUENCER_OSS=y +# CONFIG_SND_DYNAMIC_MINORS is not set +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set + +# +# Generic devices +# +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_VIRMIDI is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set + +# +# ALSA MIPS devices +# + +# +# USB devices +# +CONFIG_SND_USB_AUDIO=y +# CONFIG_SND_USB_CAIAQ is not set + +# +# System on Chip audio support +# +# CONFIG_SND_SOC is not set + +# +# SoC Audio support for SuperH +# + +# +# Open Sound System +# +CONFIG_SOUND_PRIME=y +CONFIG_OSS_OBSOLETE=y +# CONFIG_SOUND_JZ_AC97 is not set +CONFIG_SOUND_JZ_I2S=y +CONFIG_I2S_AK4642EN=y +# CONFIG_I2S_ICODEC is not set +# CONFIG_I2S_DLV is not set +# CONFIG_SOUND_MSNDCLAS is not set +# CONFIG_SOUND_MSNDPIN is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +# CONFIG_HID_DEBUG is not set +# CONFIG_HIDRAW is not set + +# +# USB Input Devices +# +CONFIG_USB_HID=y +# CONFIG_USB_HIDINPUT_POWERBOOK is not set +# CONFIG_HID_FF is not set +CONFIG_USB_HIDDEV=y +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB_ARCH_HAS_EHCI is not set +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEVICEFS is not set +CONFIG_USB_DEVICE_CLASS=y +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_SUSPEND is not set +# CONFIG_USB_PERSIST is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_OHCI_HCD=y +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=y +CONFIG_USB_PRINTER=y + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# may also be needed; see USB_STORAGE Help for more information +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set +# CONFIG_USB_MON is not set + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +CONFIG_USB_SERIAL=y +# CONFIG_USB_SERIAL_CONSOLE is not set +CONFIG_USB_SERIAL_GENERIC=y +# CONFIG_USB_SERIAL_AIRCABLE is not set +# CONFIG_USB_SERIAL_AIRPRIME is not set +# CONFIG_USB_SERIAL_ARK3116 is not set +# CONFIG_USB_SERIAL_BELKIN is not set +# CONFIG_USB_SERIAL_CH341 is not set +# CONFIG_USB_SERIAL_WHITEHEAT is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +CONFIG_USB_SERIAL_CP2101=y +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set +# CONFIG_USB_SERIAL_EMPEG is not set +CONFIG_USB_SERIAL_FTDI_SIO=y +# CONFIG_USB_SERIAL_FUNSOFT is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_GARMIN is not set +# CONFIG_USB_SERIAL_IPW is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +# CONFIG_USB_SERIAL_KEYSPAN is not set +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_MOS7720 is not set +# CONFIG_USB_SERIAL_MOS7840 is not set +# CONFIG_USB_SERIAL_NAVMAN is not set +CONFIG_USB_SERIAL_PL2303=y +# CONFIG_USB_SERIAL_OTI6858 is not set +# CONFIG_USB_SERIAL_HP4X is not set +# CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set +# CONFIG_USB_SERIAL_TI is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OPTION is not set +# CONFIG_USB_SERIAL_OMNINET is not set +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_BERRY_CHARGE is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGET is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set + +# +# USB DSL modem support +# + +# +# USB Gadget Support +# +CONFIG_USB_GADGET=m +# CONFIG_USB_GADGET_DEBUG_FILES is not set +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_JZ4740 is not set +# CONFIG_USB_GADGET_JZ4750 is not set +# CONFIG_USB_GADGET_JZ4750D is not set +# CONFIG_USB_GADGET_JZ4750L is not set +CONFIG_USB_GADGET_JZ4730=y +CONFIG_USB_JZ4730=m +# CONFIG_USB_GADGET_AMD5536UDC is not set +# CONFIG_USB_GADGET_ATMEL_USBA is not set +# CONFIG_USB_GADGET_FSL_USB2 is not set +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_PXA2XX is not set +# CONFIG_USB_GADGET_M66592 is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_S3C2410 is not set +# CONFIG_USB_GADGET_AT91 is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +# CONFIG_USB_GADGET_DUALSPEED is not set +# CONFIG_USB_ZERO is not set +# CONFIG_USB_ETH is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set +# CONFIG_USB_MIDI_GADGET is not set +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_UNSAFE_RESUME is not set + +# +# MMC/SD Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_BOUNCE=y +# CONFIG_SDIO_UART is not set + +# +# MMC/SD Host Controller Drivers +# +CONFIG_MMC_JZ=y +# CONFIG_JZ_MMC_BUS_1 is not set +CONFIG_JZ_MMC_BUS_4=y +# CONFIG_NEW_LEDS is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +# CONFIG_RTC_HCTOSYS is not set +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +# CONFIG_RTC_INTF_PROC is not set +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_X1205 is not set +CONFIG_RTC_DRV_PCF8563=y +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set + +# +# SPI RTC drivers +# + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# + +# +# Userspace I/O +# +# CONFIG_UIO is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +# CONFIG_EXT2_FS_POSIX_ACL is not set +# CONFIG_EXT2_FS_SECURITY is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +# CONFIG_EXT4DEV_FS is not set +CONFIG_JBD=y +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set +# CONFIG_JFFS2_SUMMARY is not set +# CONFIG_JFFS2_FS_XATTR is not set +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_LZO=y +CONFIG_JFFS2_RTIME=y +CONFIG_JFFS2_RUBIN=y +# CONFIG_JFFS2_CMODE_NONE is not set +CONFIG_JFFS2_CMODE_PRIORITY=y +# CONFIG_JFFS2_CMODE_SIZE is not set +# CONFIG_JFFS2_CMODE_FAVOURLZO is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NFSD is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +# CONFIG_SUNRPC_BIND34 is not set +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=y +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_CIFS=y +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +CONFIG_BSD_DISKLABEL=y +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_EFI_PARTITION is not set +# CONFIG_SYSV68_PARTITION is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +CONFIG_NLS_CODEPAGE_936=y +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set +# CONFIG_DLM is not set + +# +# Yaffs2 Filesystems +# +CONFIG_YAFFS_FS=y +CONFIG_YAFFS_YAFFS1=y +# CONFIG_YAFFS_DOES_ECC is not set +CONFIG_YAFFS_YAFFS2=y +CONFIG_YAFFS_AUTO_YAFFS2=y +# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set +# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set +CONFIG_YAFFS_DISABLE_CHUNK_ERASED_CHECK=y +CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y +CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10 +CONFIG_INSTRUMENTATION=y +# CONFIG_PROFILING is not set +# CONFIG_MARKERS is not set + +# +# Kernel hacking +# +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +# CONFIG_PRINTK_TIME is not set +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_SAMPLES is not set +CONFIG_CMDLINE="" + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITY_FILE_CAPABILITIES is not set +CONFIG_CRYPTO=y +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_MANAGER=y +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +# CONFIG_CRYPTO_MD5 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_GF128MUL is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_CBC is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_XTS is not set +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_DES is not set +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_DEFLATE is not set +CONFIG_CRYPTO_MICHAEL_MIC=y +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_TEST is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_LZO is not set +CONFIG_CRYPTO_HW=y + +# +# Library routines +# +CONFIG_BITREVERSE=y +# CONFIG_CRC_CCITT is not set +# CONFIG_CRC16 is not set +# CONFIG_CRC_ITU_T is not set +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_PLIST=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y diff -pwurN linux-2.6.24.3-p2010/./arch/mips/jz4730/board-minipc.c linux-2.6.24.3-RV10/./arch/mips/jz4730/board-minipc.c --- linux-2.6.24.3-p2010/./arch/mips/jz4730/board-minipc.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./arch/mips/jz4730/board-minipc.c 2010-07-04 15:34:48.000000000 +0200 @@ -0,0 +1,280 @@ +/* + * linux/arch/mips/jz4730/board-minipc.c + * + * JZ4730 minipc board setup routines. + * Author: + * + * Derived from: + * board-pmp.c + * Copyright (c) 2006-2007 Ingenic Semiconductor Inc. + * Author: + * and: + * skytone celinux:arc/mips/jz4730/pmpv1/ *.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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +extern void (*jz_timer_callback)(void); + +#if 0 +static void dancing(void) +{ + static unsigned int count = 0; + + count ++; + count &= 1; + if (count) + __gpio_set_pin(GPIO_LED_EN); + else + __gpio_clear_pin(GPIO_LED_EN); +} + +static void pmp_timer_ack(void) +{ + static unsigned int count = 0; + count ++; + if (count % 100 == 0) { + count = 0; + dancing(); + } +} +#endif + +static void __init board_cpm_setup(void) +{ + __cpm_start_all(); +} + +static void __init board_gpio_setup(void) +{ + /* + * Most of the gpios have been setup in the bootloader. + */ + + __harb_usb0_uhc(); + __gpio_as_emc(); + __gpio_as_uart0(); + __gpio_as_dma(); + __gpio_as_eth(); + __gpio_as_usb(); + __gpio_as_lcd_master(); +#if defined(CONFIG_I2S_AK4642EN) + __gpio_as_i2s_master(); +#endif +#if defined(CONFIG_I2S_TSC2301) || defined(CONFIG_I2S_TLC320AIC23) + __gpio_as_ssi(); +#endif + //__gpio_as_ac97(); +#if defined(CONFIG_I2S_TSC2301) || defined(CONFIG_I2S_TLC320AIC23) || defined(CONFIG_I2S_CS42L51) + __gpio_as_i2s_slave(); +#endif +// __gpio_as_msc(); + +/* skytone: + __gpio_as_output(GPIO_LED_EN); + __gpio_set_pin(GPIO_LED_EN); + __gpio_as_output(GPIO_DISP_OFF_N); + __gpio_set_pin(GPIO_DISP_OFF_N); +*/ + __gpio_as_output(GPIO_PWM0); + __gpio_set_pin(GPIO_PWM0); + __gpio_as_pwm(); + __pwm_set_duty(0, 300); + __pwm_set_period(0, 299); + __pwm_set_prescale(0, 0xbf); + +/* skytone: + __gpio_as_input(GPIO_RTC_IRQ); +*/ + __gpio_as_output(GPIO_USB_CLK_EN); + __gpio_set_pin(GPIO_USB_CLK_EN); + + /* ard: We have a uC controlling charging. */ +#if 0 + __gpio_as_input(GPIO_CHARG_STAT); + __gpio_disable_pull(GPIO_CHARG_STAT); +#endif + + /* We are not doing UDC (yet?) */ +#if 0 + __gpio_as_input(GPIO_UDC_HOTPLUG); + __gpio_disable_pull(GPIO_UDC_HOTPLUG); + __gpio_disable_pull(54); /* fixed ic bug, the pull of gpio pin 86 is as pin 54 */ +#endif +} + + void overwrite_root_name(char *root_name) + { + extern int jz_kbd_get_col(int col); + /* check GPIOs if there is a boot key pressed and override boot arguments + F1: boot from first SD partition (/dev/mmcblk0p1, ext3) + F2: boot from second SD partition (/dev/mmcblk0p2, ext3) + F3: boot minifs from internal partition (/dev/mtdblock3, jffs2) + F4: boot from internal partition (/dev/mtdblock4, yaffs2) + Fn: boot from second SD partition (/dev/mmcblk0p2, ext3) (kernel was booted from SD on Fn+Ctrl+LeftShift) + none: boot from internal partition (/dev/mtdblock4, yaffs2) + + Notes: + - the first condition in this list is taken, i.e. Fn+F4 means F4 mode + - there may be shadow keys (like F5) if Fn-Ctrl-LShift are pressed + - pressed keys return a 0 bit + - this check is done some seconds after starting the kernel + + */ + #if 0 + { + int i; + for(i=0; i <= 16; i++) { + if(jz_kbd_get_col(i) != 0xff) + printk(KERN_INFO "col %d: %02x\n", i, jz_kbd_get_col(i)); + } + } + #endif + if ((jz_kbd_get_col(16) & 0x40) == 0) // F1 + strcpy(root_name, "/dev/mmcblk0p1"); + else if ((jz_kbd_get_col(13) & 0x40) == 0) // F2 + strcpy(root_name, "/dev/mmcblk0p2"); + else if ((jz_kbd_get_col(3) & 0x02) == 0) // F3 + strcpy(root_name, "/dev/mtdblock3"); + else if ((jz_kbd_get_col(3) & 0x08) == 0) // F4 + strcpy(root_name, "/dev/mtdblock4"); + + else if ((jz_kbd_get_col(0) & 0x80) == 0) // F5 + strcpy(root_name, "/dev/mtdblock5"); +/* + else if ((jz_kbd_get_col(6) & 0x08) == 0) // F6 + strcpy(root_name, "/dev/mtdblock4"); + else if ((jz_kbd_get_col(7) & 0x02) == 0) // F7 + strcpy(root_name, "/dev/mtdblock4"); + else if ((jz_kbd_get_col(6) & 0x40) == 0) // F8 + strcpy(root_name, "/dev/mtdblock4"); + else if ((jz_kbd_get_col(9) & 0x40) == 0) // F9 + strcpy(root_name, "/dev/mtdblock4"); + else if ((jz_kbd_get_col(12) & 0x80) == 0) // F10 + strcpy(root_name, "/dev/mtdblock4"); + */ + else if ((jz_kbd_get_col(16) & 0x80) == 0) // Fn + strcpy(root_name, "/dev/mmcblk0p2"); + else // neither + strcpy (root_name, "/dev/mtdblock4"); + printk(KERN_INFO "Root file system overwritten as: %s\n", root_name); + } + + +void minipc_bl_set_intensity(int intensity) +{ + printk(KERN_ERR "MiniPC BL, set intensity to %d\n", intensity); + __pwm_set_duty(0, intensity); +} + +static struct generic_bl_info minipc_bl_machinfo = { + .name = "minipc-bl", + .max_intensity = 300, + .default_intensity = 250, + .limit_mask = 0x0b, + .set_bl_intensity = minipc_bl_set_intensity, + // .kick_battery = corgi_bl_kick_battery, +}; + +struct platform_device minipc_bl_device = { + .name = "generic-bl", + .dev = { + .platform_data = &minipc_bl_machinfo, + }, + .id = -1, +}; + +static struct i2c_board_info pcf8563_rtc_board_info[] = { + [0] = { + .type = "pcf8563", + .addr = 0x51, + } +}; + +/* touch pad buttons */ + +int gpio_get_value(int pin) +{ // poll this gpio + return __gpio_get_pin(pin); +} + +int gpio_free(int pin) +{ // release + return 0; // ignored +} + +int gpio_request(int pin, char *name) +{ // request + return 0; // ignored +} + +int gpio_direction_input(int pin) +{ + __gpio_as_input(pin); + return 0; // ignored, we assume to only have inputs... +} + +static struct gpio_mouse_platform_data touchpad_buttons_board_info[] = { + [0] = { + .scan_ms = 20, + .polarity = GPIO_MOUSE_POLARITY_ACT_HIGH, +{ { + .up = GPIO_TS_LEFT_BUTTON, + .down = GPIO_TS_LEFT_BUTTON, // should result in 0 unless the low probability event that the gpio value changes within some fraction of a us. Anyway. will only report +/-1. + .left = GPIO_TS_LEFT_BUTTON, + .right = GPIO_TS_LEFT_BUTTON, + .bleft = GPIO_TS_LEFT_BUTTON, + .bmiddle = -1, // n/a + .bright = GPIO_TS_RIGHT_BUTTON, +} } + } +}; + +struct platform_device touchpad_buttons_device = { + .name = "gpio_mouse", + .dev = { +// .num_resources = ARRAY_SIZE(touchpad_buttons_board_info), + .platform_data = touchpad_buttons_board_info, + }, + .id = -1, +}; + +/* initialization */ + +void __init jz_board_setup(void) +{ + printk("JZ4730 MINIPC board setup\n"); + + board_cpm_setup(); + board_gpio_setup(); + +/* + * ard: + * We don't have pmp timer ack led stuff + jz_timer_callback = pmp_timer_ack; + */ + + // this is how it *should* better work than the probing workaround in pcf8563_attach() + // i2c_register_board_info(0, pcf8563_rtc_board_info, 1); // before registering adapters + +} diff -pwurN linux-2.6.24.3-p2010/./arch/mips/jz4730/board-minipc.c.orig linux-2.6.24.3-RV10/./arch/mips/jz4730/board-minipc.c.orig --- linux-2.6.24.3-p2010/./arch/mips/jz4730/board-minipc.c.orig 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./arch/mips/jz4730/board-minipc.c.orig 2010-07-04 08:57:44.000000000 +0200 @@ -0,0 +1,222 @@ +/* + * linux/arch/mips/jz4730/board-minipc.c + * + * JZ4730 minipc board setup routines. + * Author: + * + * Derived from: + * board-pmp.c + * Copyright (c) 2006-2007 Ingenic Semiconductor Inc. + * Author: + * and: + * skytone celinux:arc/mips/jz4730/pmpv1/ *.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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +extern void (*jz_timer_callback)(void); + +#if 0 +static void dancing(void) +{ + static unsigned int count = 0; + + count ++; + count &= 1; + if (count) + __gpio_set_pin(GPIO_LED_EN); + else + __gpio_clear_pin(GPIO_LED_EN); +} + +static void pmp_timer_ack(void) +{ + static unsigned int count = 0; + count ++; + if (count % 100 == 0) { + count = 0; + dancing(); + } +} +#endif + +static void __init board_cpm_setup(void) +{ + __cpm_start_all(); +} + +static void __init board_gpio_setup(void) +{ + /* + * Most of the gpios have been setup in the bootloader. + */ + + __harb_usb0_uhc(); + __gpio_as_emc(); + __gpio_as_uart0(); + __gpio_as_dma(); + __gpio_as_eth(); + __gpio_as_usb(); + __gpio_as_lcd_master(); +#if defined(CONFIG_I2S_AK4642EN) + __gpio_as_i2s_master(); +#endif +#if defined(CONFIG_I2S_TSC2301) || defined(CONFIG_I2S_TLC320AIC23) + __gpio_as_ssi(); +#endif + //__gpio_as_ac97(); +#if defined(CONFIG_I2S_TSC2301) || defined(CONFIG_I2S_TLC320AIC23) || defined(CONFIG_I2S_CS42L51) + __gpio_as_i2s_slave(); +#endif +// __gpio_as_msc(); + +/* skytone: + __gpio_as_output(GPIO_LED_EN); + __gpio_set_pin(GPIO_LED_EN); + __gpio_as_output(GPIO_DISP_OFF_N); + __gpio_set_pin(GPIO_DISP_OFF_N); +*/ + __gpio_as_output(GPIO_PWM0); + __gpio_set_pin(GPIO_PWM0); + __gpio_as_pwm(); + __pwm_set_duty(0, 300); + __pwm_set_period(0, 299); + __pwm_set_prescale(0, 0xbf); + +/* skytone: + __gpio_as_input(GPIO_RTC_IRQ); +*/ + __gpio_as_output(GPIO_USB_CLK_EN); + __gpio_set_pin(GPIO_USB_CLK_EN); + + /* ard: We have a uC controlling charging. */ +#if 0 + __gpio_as_input(GPIO_CHARG_STAT); + __gpio_disable_pull(GPIO_CHARG_STAT); +#endif + + /* We are not doing UDC (yet?) */ +#if 0 + __gpio_as_input(GPIO_UDC_HOTPLUG); + __gpio_disable_pull(GPIO_UDC_HOTPLUG); + __gpio_disable_pull(54); /* fixed ic bug, the pull of gpio pin 86 is as pin 54 */ +#endif +} + +void minipc_bl_set_intensity(int intensity) +{ + printk(KERN_ERR "MiniPC BL, set intensity to %d\n", intensity); + __pwm_set_duty(0, intensity); +} + +static struct generic_bl_info minipc_bl_machinfo = { + .name = "minipc-bl", + .max_intensity = 300, + .default_intensity = 250, + .limit_mask = 0x0b, + .set_bl_intensity = minipc_bl_set_intensity, + // .kick_battery = corgi_bl_kick_battery, +}; + +struct platform_device minipc_bl_device = { + .name = "generic-bl", + .dev = { + .platform_data = &minipc_bl_machinfo, + }, + .id = -1, +}; + +static struct i2c_board_info pcf8563_rtc_board_info[] = { + [0] = { + .type = "pcf8563", + .addr = 0x51, + } +}; + +/* touch pad buttons */ + +int gpio_get_value(int pin) +{ // poll this gpio + return __gpio_get_pin(pin); +} + +int gpio_free(int pin) +{ // release + return 0; // ignored +} + +int gpio_request(int pin, char *name) +{ // request + return 0; // ignored +} + +int gpio_direction_input(int pin) +{ + __gpio_as_input(pin); + return 0; // ignored, we assume to only have inputs... +} + +static struct gpio_mouse_platform_data touchpad_buttons_board_info[] = { + [0] = { + .scan_ms = 20, + .polarity = GPIO_MOUSE_POLARITY_ACT_HIGH, +{ { + .up = GPIO_TS_LEFT_BUTTON, + .down = GPIO_TS_LEFT_BUTTON, // should result in 0 unless the low probability event that the gpio value changes within some fraction of a us. Anyway. will only report +/-1. + .left = GPIO_TS_LEFT_BUTTON, + .right = GPIO_TS_LEFT_BUTTON, + .bleft = GPIO_TS_LEFT_BUTTON, + .bmiddle = -1, // n/a + .bright = GPIO_TS_RIGHT_BUTTON, +} } + } +}; + +struct platform_device touchpad_buttons_device = { + .name = "gpio_mouse", + .dev = { +// .num_resources = ARRAY_SIZE(touchpad_buttons_board_info), + .platform_data = touchpad_buttons_board_info, + }, + .id = -1, +}; + +/* initialization */ + +void __init jz_board_setup(void) +{ + printk("JZ4730 MINIPC board setup\n"); + + board_cpm_setup(); + board_gpio_setup(); + +/* + * ard: + * We don't have pmp timer ack led stuff + jz_timer_callback = pmp_timer_ack; + */ + + // this is how it *should* better work than the probing workaround in pcf8563_attach() + // i2c_register_board_info(0, pcf8563_rtc_board_info, 1); // before registering adapters + +} diff -pwurN linux-2.6.24.3-p2010/./arch/mips/jz4730/board-minipc.c.rej linux-2.6.24.3-RV10/./arch/mips/jz4730/board-minipc.c.rej --- linux-2.6.24.3-p2010/./arch/mips/jz4730/board-minipc.c.rej 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./arch/mips/jz4730/board-minipc.c.rej 2010-07-04 09:44:59.000000000 +0200 @@ -0,0 +1,77 @@ +*************** static void __init board_gpio_setup(void) +*** 123,131 **** + #endif + } + + void minipc_bl_set_intensity(int intensity) + { +- printk(KERN_INFO "MiniPC BL, set intensity to %d\n", intensity); + __pwm_set_duty(0, intensity); + } + +--- 123,187 ---- + #endif + } + ++ void overwrite_root_name(char *root_name) ++ { ++ extern int jz_kbd_get_col(int col); ++ /* check GPIOs if there is a boot key pressed and override boot arguments ++ F1: boot from first SD partition (/dev/mmcblk0p1, ext3) ++ F2: boot from second SD partition (/dev/mmcblk0p2, ext3) ++ F3: boot minifs from internal partition (/dev/mtdblock3, jffs2) ++ F4: boot from internal partition (/dev/mtdblock4, yaffs2) ++ Fn: boot from second SD partition (/dev/mmcblk0p2, ext3) (kernel was booted from SD on Fn+Ctrl+LeftShift) ++ none: boot from internal partition (/dev/mtdblock4, yaffs2) ++ ++ Notes: ++ - the first condition in this list is taken, i.e. Fn+F4 means F4 mode ++ - there may be shadow keys (like F5) if Fn-Ctrl-LShift are pressed ++ - pressed keys return a 0 bit ++ - this check is done some seconds after starting the kernel ++ ++ */ ++ #if 0 ++ { ++ int i; ++ for(i=0; i <= 16; i++) { ++ if(jz_kbd_get_col(i) != 0xff) ++ printk(KERN_INFO "col %d: %02x\n", i, jz_kbd_get_col(i)); ++ } ++ } ++ #endif ++ if ((jz_kbd_get_col(16) & 0x40) == 0) // F1 ++ strcpy(root_name, "/dev/mmcblk0p1"); ++ else if ((jz_kbd_get_col(13) & 0x40) == 0) // F2 ++ strcpy(root_name, "/dev/mmcblk0p2"); ++ else if ((jz_kbd_get_col(3) & 0x02) == 0) // F3 ++ strcpy(root_name, "/dev/mtdblock3"); ++ else if ((jz_kbd_get_col(3) & 0x08) == 0) // F4 ++ strcpy(root_name, "/dev/mtdblock4"); ++ /* ++ else if ((jz_kbd_get_col(0) & 0x80) == 0) // F5 ++ strcpy(root_name, "/dev/mtdblock4"); ++ else if ((jz_kbd_get_col(6) & 0x08) == 0) // F6 ++ strcpy(root_name, "/dev/mtdblock4"); ++ else if ((jz_kbd_get_col(7) & 0x02) == 0) // F7 ++ strcpy(root_name, "/dev/mtdblock4"); ++ else if ((jz_kbd_get_col(6) & 0x40) == 0) // F8 ++ strcpy(root_name, "/dev/mtdblock4"); ++ else if ((jz_kbd_get_col(9) & 0x40) == 0) // F9 ++ strcpy(root_name, "/dev/mtdblock4"); ++ else if ((jz_kbd_get_col(12) & 0x80) == 0) // F10 ++ strcpy(root_name, "/dev/mtdblock4"); ++ */ ++ else if ((jz_kbd_get_col(16) & 0x80) == 0) // Fn ++ strcpy(root_name, "/dev/mmcblk0p2"); ++ else // neither ++ strcpy (root_name, "/dev/mtdblock4"); ++ printk(KERN_INFO "Root file system overwritten as: %s\n", root_name); ++ } ++ + void minipc_bl_set_intensity(int intensity) + { ++ // printk(KERN_INFO "MiniPC BL, set intensity to %d\n", intensity); + __pwm_set_duty(0, intensity); + } + diff -pwurN linux-2.6.24.3-p2010/./arch/mips/jz4730/Makefile linux-2.6.24.3-RV10/./arch/mips/jz4730/Makefile --- linux-2.6.24.3-p2010/./arch/mips/jz4730/Makefile 2010-07-05 06:41:51.000000000 +0200 +++ linux-2.6.24.3-RV10/./arch/mips/jz4730/Makefile 2010-07-04 08:54:28.000000000 +0200 @@ -13,6 +13,8 @@ obj-$(CONFIG_PROC_FS) += proc.o obj-$(CONFIG_JZ4730_PMP) += board-pmp.o +obj-$(CONFIG_JZ4730_MINIPC) += board-minipc.o + # CPU Frequency scaling support obj-$(CONFIG_CPU_FREQ_JZ) +=cpufreq.o diff -pwurN linux-2.6.24.3-p2010/./arch/mips/jz4730/platform.c linux-2.6.24.3-RV10/./arch/mips/jz4730/platform.c --- linux-2.6.24.3-p2010/./arch/mips/jz4730/platform.c 2010-07-05 06:41:51.000000000 +0200 +++ linux-2.6.24.3-RV10/./arch/mips/jz4730/platform.c 2010-07-04 10:40:33.000000000 +0200 @@ -124,12 +124,21 @@ static struct platform_device jz_mmc_dev .resource = jz_mmc_resources, }; +#ifdef CONFIG_JZ4730_MINIPC +extern struct platform_device minipc_bl_device; +extern struct platform_device touchpad_buttons_device; +#endif + /* All */ static struct platform_device *jz_platform_devices[] __initdata = { &jz_usb_ohci_device, &jz_lcd_device, &jz_usb_gdt_device, &jz_mmc_device, +#ifdef CONFIG_JZ4730_MINIPC + &minipc_bl_device, + &touchpad_buttons_device, +#endif }; static int __init jz_platform_init(void) diff -pwurN linux-2.6.24.3-p2010/./arch/mips/jz4730/platform.c.orig linux-2.6.24.3-RV10/./arch/mips/jz4730/platform.c.orig --- linux-2.6.24.3-p2010/./arch/mips/jz4730/platform.c.orig 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./arch/mips/jz4730/platform.c.orig 2010-07-04 08:54:28.000000000 +0200 @@ -0,0 +1,147 @@ +/* + * Platform device support for Jz4730 SoC. + * + * Copyright 2007, Peter + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ +#include +#include +#include +#include +#include + +#include + +/* OHCI (USB full speed host controller) */ +static struct resource jz_usb_ohci_resources[] = { + [0] = { + .start = CPHYSADDR(UHC_BASE), // phys addr for ioremap + .end = CPHYSADDR(UHC_BASE) + 0x10000 - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_UHC, + .end = IRQ_UHC, + .flags = IORESOURCE_IRQ, + }, +}; + +/* The dmamask must be set for OHCI to work */ +static u64 ohci_dmamask = ~(u32)0; + +static struct platform_device jz_usb_ohci_device = { + .name = "jz-ohci", + .id = 0, + .dev = { + .dma_mask = &ohci_dmamask, + .coherent_dma_mask = 0xffffffff, + }, + .num_resources = ARRAY_SIZE(jz_usb_ohci_resources), + .resource = jz_usb_ohci_resources, +}; + +/*** LCD controller ***/ +static struct resource jz_lcd_resources[] = { + [0] = { + .start = CPHYSADDR(LCD_BASE), + .end = CPHYSADDR(LCD_BASE) + 0x10000 - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_LCD, + .end = IRQ_LCD, + .flags = IORESOURCE_IRQ, + } +}; + +static u64 jz_lcd_dmamask = ~(u32)0; + +static struct platform_device jz_lcd_device = { + .name = "jz-lcd", + .id = 0, + .dev = { + .dma_mask = &jz_lcd_dmamask, + .coherent_dma_mask = 0xffffffff, + }, + .num_resources = ARRAY_SIZE(jz_lcd_resources), + .resource = jz_lcd_resources, +}; + +/* UDC (USB gadget controller) */ +static struct resource jz_usb_gdt_resources[] = { + [0] = { + .start = CPHYSADDR(UDC_BASE), + .end = CPHYSADDR(UDC_BASE) + 0x10000 - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_UDC, + .end = IRQ_UDC, + .flags = IORESOURCE_IRQ, + }, +}; + +static u64 udc_dmamask = ~(u32)0; + +static struct platform_device jz_usb_gdt_device = { + .name = "jz-udc", + .id = 0, + .dev = { + .dma_mask = &udc_dmamask, + .coherent_dma_mask = 0xffffffff, + }, + .num_resources = ARRAY_SIZE(jz_usb_gdt_resources), + .resource = jz_usb_gdt_resources, +}; + +/** MMC/SD controller **/ +static struct resource jz_mmc_resources[] = { + [0] = { + .start = CPHYSADDR(MSC_BASE), + .end = CPHYSADDR(MSC_BASE) + 0x10000 - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_MSC, + .end = IRQ_MSC, + .flags = IORESOURCE_IRQ, + } +}; + +static u64 jz_mmc_dmamask = ~(u32)0; + +static struct platform_device jz_mmc_device = { + .name = "jz-mmc", + .id = 0, + .dev = { + .dma_mask = &jz_mmc_dmamask, + .coherent_dma_mask = 0xffffffff, + }, + .num_resources = ARRAY_SIZE(jz_mmc_resources), + .resource = jz_mmc_resources, +}; + +#ifdef CONFIG_JZ4730_MINIPC +extern struct platform_device minipc_bl_device; +#endif + +/* All */ +static struct platform_device *jz_platform_devices[] __initdata = { + &jz_usb_ohci_device, + &jz_lcd_device, + &jz_usb_gdt_device, + &jz_mmc_device, +#ifdef CONFIG_JZ4730_MINIPC + &minipc_bl_device, +#endif +}; + +static int __init jz_platform_init(void) +{ + return platform_add_devices(jz_platform_devices, ARRAY_SIZE(jz_platform_devices)); +} + +arch_initcall(jz_platform_init); diff -pwurN linux-2.6.24.3-p2010/./arch/mips/jz4730/platform.c.rej linux-2.6.24.3-RV10/./arch/mips/jz4730/platform.c.rej --- linux-2.6.24.3-p2010/./arch/mips/jz4730/platform.c.rej 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./arch/mips/jz4730/platform.c.rej 2010-07-04 08:57:44.000000000 +0200 @@ -0,0 +1,79 @@ +*************** static struct platform_device jz_mmc_device = { +*** 125,134 **** + .resource = jz_mmc_resources, + }; + +- #ifdef CONFIG_JZ4730_MINIPC +- extern struct platform_device minipc_bl_device; +- #endif +- + /** I2C controller **/ + static struct resource jz_i2c_resources[] = { + [0] = { +--- 125,130 ---- + .resource = jz_mmc_resources, + }; + + /** I2C controller **/ + static struct resource jz_i2c_resources[] = { + [0] = { +*************** struct platform_device jz_i2c_device = { +*** 156,169 **** + .resource = jz_i2c_resources, + }; + +- static struct i2c_board_info pcf8563_rtc_board_info[] = { +- [0] = { +- .type = "pcf8563", +- .addr = 0x51, +- } +- }; +- + /* All */ + static struct platform_device *jz_platform_devices[] __initdata = { + &jz_usb_ohci_device, + &jz_lcd_device, +--- 152,164 ---- + .resource = jz_i2c_resources, + }; + + /* All */ ++ ++ #ifdef CONFIG_JZ4730_MINIPC ++ extern struct platform_device minipc_bl_device; ++ extern struct platform_device touchpad_buttons_device; ++ #endif ++ + static struct platform_device *jz_platform_devices[] __initdata = { + &jz_usb_ohci_device, + &jz_lcd_device, +*************** static struct platform_device *jz_platform_devices[] __initdata = { +*** 171,184 **** + &jz_mmc_device, + #ifdef CONFIG_JZ4730_MINIPC + &minipc_bl_device, + #endif + &jz_i2c_device, + }; + + static int __init jz_platform_init(void) + { +- // this is how it *should* better work than the probing workaround in pcf8563_attach() +- // i2c_register_board_info(0, pcf8563_rtc_board_info, 1); // before registering adapters + return platform_add_devices(jz_platform_devices, ARRAY_SIZE(jz_platform_devices)); + } + +--- 166,178 ---- + &jz_mmc_device, + #ifdef CONFIG_JZ4730_MINIPC + &minipc_bl_device, ++ &touchpad_buttons_device, + #endif + &jz_i2c_device, + }; + + static int __init jz_platform_init(void) + { + return platform_add_devices(jz_platform_devices, ARRAY_SIZE(jz_platform_devices)); + } + diff -pwurN linux-2.6.24.3-p2010/./arch/mips/jz4730/proc.c linux-2.6.24.3-RV10/./arch/mips/jz4730/proc.c --- linux-2.6.24.3-p2010/./arch/mips/jz4730/proc.c 2010-07-05 06:41:51.000000000 +0200 +++ linux-2.6.24.3-RV10/./arch/mips/jz4730/proc.c 2010-07-04 10:59:37.000000000 +0200 @@ -22,6 +22,16 @@ #include #include +#if CONFIG_JZ4730_MINIPC + +#define NETWORKLED_IO 9 //wjx network eth0 led 2008.1.29 +#define BATTERY_IO 17 //wjx check the battery capacity 2007.12.10 +#define CAPSLOCKLED_IO 27 //wjx 2008.3.31 +#define NUMLOCKLED_IO 86 +#define INTERNAL_WIFI_IO 95 //wey 2008.5.28 + +#endif + struct proc_dir_entry *proc_jz_root; /* @@ -240,6 +250,129 @@ static int jz_pwm_proc_init(void) return 0; } +#if CONFIG_JZ4730_MINIPC + +/* wjx 2007.12.10 battery status */ +static int battery_read_proc (char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + int len = 0; + + __gpio_as_input(BATTERY_IO); + + if (__gpio_get_pin(BATTERY_IO) == 1) + { + len += sprintf (page+len, "1\n"); + } + else + { + len += sprintf (page+len, "0\n"); + } + return len; +} + +static int eth0_write_proc(struct file *file, const char *buffer, unsigned long count, void *data) +{ + printk("eth0_write_proc\n"); + unsigned long val = simple_strtoul(buffer, 0, 10); + + if (val) + { + __gpio_as_output(NETWORKLED_IO); + __gpio_clear_pin(NETWORKLED_IO); //wjx 2007.12.13 up eth0 led + } + else + { + __gpio_as_output(NETWORKLED_IO); + __gpio_set_pin(NETWORKLED_IO); //wjx 2007.12.13 down eth0 led + } + return count; +} + +//wjx 2008.3.31 +static int capslock_write_proc(struct file *file, const char *buffer, unsigned long count, void *data) +{ + unsigned long val = simple_strtoul(buffer, 0, 10); + + if (val) + { + __gpio_as_output(CAPSLOCKLED_IO); + __gpio_clear_pin(CAPSLOCKLED_IO); //wjx 2007.12.13 up eth0 led + } + else + { + __gpio_as_output(CAPSLOCKLED_IO); + __gpio_set_pin(CAPSLOCKLED_IO); //wjx 2007.12.13 down eth0 led + } + return count; +} + +static int numlock_write_proc(struct file *file, const char *buffer, unsigned long count, void *data) +{ + unsigned long val = simple_strtoul(buffer, 0, 10); + + if (val) + { + __gpio_as_output(NUMLOCKLED_IO); + __gpio_clear_pin(NUMLOCKLED_IO); //wjx 2007.12.13 up eth0 led + } + else + { + __gpio_as_output(NUMLOCKLED_IO); + __gpio_set_pin(NUMLOCKLED_IO); //wjx 2007.12.13 down eth0 led + } + return count; +} + +static int lcd_write_proc(struct file *file, const char *buffer, unsigned long count, void *data) +{ + extern void minipc_bl_set_intensity(int n); + unsigned long val = simple_strtoul(buffer, 0, 10); + if (val <= 300) + { + minipc_bl_set_intensity(val); //set the lcd backlight + } + return count; +} + +/* wjx test read mcu i2c */ +static int mcu_read_proc (char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + int len = 0; + int nr; + unsigned char battery_status = 0; + + i2c_open(); + nr = i2c_read(0x50>>1, &battery_status, 0xdb, 1); // battery adc + i2c_close(); + + len += sprintf (page+len, "nr: %d\n", nr); + len += sprintf(page+len, "status: %u\n", battery_status); + + return len; +} + +/*control the internal wifi's power. wey 2008.5.28*/ +static int iwifi_write_proc (struct file *file, const char *buffer, unsigned long count, void *data) +{ + unsigned long val = simple_strtoul(buffer, 0, 10); + + if (val) + { + __gpio_as_output(INTERNAL_WIFI_IO); + __gpio_set_pin(INTERNAL_WIFI_IO); + } + else + { + __gpio_as_output(INTERNAL_WIFI_IO); + __gpio_clear_pin(INTERNAL_WIFI_IO); + } + return count; +} + +#endif + /* * /proc/jz/xxx entry * @@ -283,6 +416,78 @@ static int __init jz_proc_init(void) entry->data = NULL; } +#if CONFIG_JZ4730_MINIPC + /* wjx 2007.12.10 battery */ + entry = create_proc_entry("battery", 0644, proc_jz_root); + if (entry) { + __gpio_as_input(BATTERY_IO); + entry->read_proc = battery_read_proc; + entry->write_proc = NULL; + entry->data = NULL; + } + + /* wjx 2007.12.10 eth0 network led */ + entry = create_proc_entry("eth0_led", 0644, proc_jz_root); + if (entry) { + __gpio_as_output(NETWORKLED_IO); + __gpio_set_pin(NETWORKLED_IO); + entry->read_proc = NULL; + entry->write_proc = eth0_write_proc; + entry->data = NULL; + } + + /* wjx 2008.3.31 capslock led */ + entry = create_proc_entry("capslock_led", 0644, proc_jz_root); + if (entry) { + __gpio_as_output(CAPSLOCKLED_IO); + __gpio_set_pin(CAPSLOCKLED_IO); + /*edwin for test*/ + __gpio_as_output(95); + __gpio_set_pin(95); + /**/ + entry->read_proc = NULL; + entry->write_proc = capslock_write_proc; + entry->data = NULL; + } + + /* wjx 2008.3.31 numlock led */ + entry = create_proc_entry("numlock_led", 0644, proc_jz_root); + if (entry) { + __gpio_as_output(NUMLOCKLED_IO); + __gpio_set_pin(NUMLOCKLED_IO); + entry->read_proc = NULL; + entry->write_proc = numlock_write_proc; + entry->data = NULL; + } + + /* wjx 2007.12.14 lcd backlight */ + + entry = create_proc_entry("backlight", 0644, proc_jz_root); + if (entry) { + entry->write_proc = lcd_write_proc; + entry->read_proc = NULL; + entry->data = NULL; + } + /* wjx 2008.1.29 mcu read battery status */ + + entry = create_proc_entry("battery-level", 0644, proc_jz_root); + if (entry) { + entry->write_proc = NULL; + entry->read_proc = mcu_read_proc; + entry->data = NULL; + } + + /*wey 2008.5.28 control the internal wifi*/ + entry = create_proc_entry("wifi-power", 0644, proc_jz_root); + if (entry) { + __gpio_as_output(INTERNAL_WIFI_IO); + __gpio_clear_pin(INTERNAL_WIFI_IO);//by default turn off its power.wey 2008.5.28 + entry->read_proc = NULL; + entry->write_proc = iwifi_write_proc; + entry->data = NULL; + } +#endif + /* PWM */ jz_pwm_proc_init(); diff -pwurN linux-2.6.24.3-p2010/./arch/mips/jz4730/proc.orig.c linux-2.6.24.3-RV10/./arch/mips/jz4730/proc.orig.c --- linux-2.6.24.3-p2010/./arch/mips/jz4730/proc.orig.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./arch/mips/jz4730/proc.orig.c 2010-07-04 10:59:13.000000000 +0200 @@ -0,0 +1,292 @@ +/* + * linux/arch/mips/jz4730/proc.c + * + * /proc/jz/ procfs for on-chip peripherals. + * + * Copyright (c) 2006-2007 Ingenic Semiconductor Inc. + * Author: + * + * 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. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include + +struct proc_dir_entry *proc_jz_root; + +/* + * EMC Module + */ +static int emc_read_proc (char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + int len = 0; + + len += sprintf (page+len, "BCR: 0x%08x\n", REG_EMC_BCR); + len += sprintf (page+len, "SMCR(0-5): 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x\n", REG_EMC_SMCR0, REG_EMC_SMCR1, REG_EMC_SMCR2, REG_EMC_SMCR3, REG_EMC_SMCR4, REG_EMC_SMCR5); + len += sprintf (page+len, "SACR(0-5): 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x\n", REG_EMC_SACR0, REG_EMC_SACR1, REG_EMC_SACR2, REG_EMC_SACR3, REG_EMC_SACR4, REG_EMC_SACR5); + len += sprintf (page+len, "DMCR: 0x%08x\n", REG_EMC_DMCR); + len += sprintf (page+len, "RTCSR: 0x%04x\n", REG_EMC_RTCSR); + len += sprintf (page+len, "RTCOR: 0x%04x\n", REG_EMC_RTCOR); + len += sprintf (page+len, "DMAR(0-1): 0x%08x 0x%08x\n", REG_EMC_DMAR1, REG_EMC_DMAR2); + return len; +} + +/* + * Power Manager Module + */ +static int pmc_read_proc (char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + int len = 0; + unsigned long lpcr = REG_CPM_LPCR; + unsigned long mscr = REG_CPM_MSCR; + + len += sprintf (page+len, "LPCR : 0x%08lx\n", lpcr); + len += sprintf (page+len, "Low Power Mode : %s\n", + ((lpcr & CPM_LPCR_LPM_MASK) == (CPM_LPCR_LPM_IDLE)) ? + "idle" : (((lpcr & CPM_LPCR_LPM_MASK) == (CPM_LPCR_LPM_SLEEP)) ? "sleep" : "hibernate")); + len += sprintf (page+len, "Doze Mode : %s\n", + (lpcr & CPM_LPCR_DOZE) ? "on" : "off"); + if (lpcr & CPM_LPCR_DOZE) + len += sprintf (page+len, " duty : %d\n", (int)((lpcr & CPM_LPCR_DUTY_MASK) >> CPM_LPCR_DUTY_BIT)); + len += sprintf (page+len, "CKO1 : %s\n", + (REG_CPM_CFCR & CPM_CFCR_CKOEN1) ? "enable" : "disable"); + len += sprintf (page+len, "UART0 : %s\n", + (mscr & CPM_MSCR_MSTP_UART0) ? "stopped" : "running"); + len += sprintf (page+len, "UART1 : %s\n", + (mscr & CPM_MSCR_MSTP_UART1) ? "stopped" : "running"); + len += sprintf (page+len, "UART2 : %s\n", + (mscr & CPM_MSCR_MSTP_UART2) ? "stopped" : "running"); + len += sprintf (page+len, "UART3 : %s\n", + (mscr & CPM_MSCR_MSTP_UART3) ? "stopped" : "running"); + len += sprintf (page+len, "OST : %s\n", + (mscr & CPM_MSCR_MSTP_OST) ? "stopped" : "running"); + len += sprintf (page+len, "DMAC : %s\n", + (mscr & CPM_MSCR_MSTP_DMAC) ? "stopped" : "running"); + len += sprintf (page+len, "ETH : %s\n", + (mscr & CPM_MSCR_MSTP_ETH) ? "stopped" : "running"); + len += sprintf (page+len, "UHC/UDC : %s\n", + (mscr & CPM_MSCR_MSTP_UHC) ? "stopped" : "running"); + len += sprintf (page+len, "PWM0 : %s\n", + (mscr & CPM_MSCR_MSTP_PWM0) ? "stopped" : "running"); + len += sprintf (page+len, "PWM1 : %s\n", + (mscr & CPM_MSCR_MSTP_PWM1) ? "stopped" : "running"); + len += sprintf (page+len, "I2C : %s\n", + (mscr & CPM_MSCR_MSTP_I2C) ? "stopped" : "running"); + len += sprintf (page+len, "SSI : %s\n", + (mscr & CPM_MSCR_MSTP_SSI) ? "stopped" : "running"); + len += sprintf (page+len, "SCC : %s\n", + (mscr & CPM_MSCR_MSTP_SCC) ? "stopped" : "running"); + return len; +} + +static int pmc_write_proc(struct file *file, const char __user *buffer, unsigned long count, void *data) +{ + REG_CPM_MSCR = simple_strtoul(buffer, 0, 16); + return count; +} + +/* + * Clock Generation Module + */ +static int cgm_read_proc (char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + int len = 0; + unsigned int cfcr = REG_CPM_CFCR; + unsigned int plcr1 = REG_CPM_PLCR1; + unsigned int div[] = {1, 2, 3, 4, 6, 8, 12, 16, 24, 32}; + unsigned int od[4] = {1, 2, 2, 4}; + + + len += sprintf (page+len, "PLCR1 : 0x%08x\n", plcr1); + len += sprintf (page+len, "CFCR : 0x%08x\n", cfcr); + len += sprintf (page+len, "PLL : %s\n", + (plcr1 & CPM_PLCR1_PLL1EN) ? "ON" : "OFF"); + len += sprintf (page+len, "NF:NR:NO : %d:%d:%d\n", + __cpm_plcr1_fd() + 2, + __cpm_plcr1_rd() + 2, + od[__cpm_plcr1_od()] + ); + len += sprintf (page+len, "I:S:M:P : %d:%d:%d:%d\n", + div[(cfcr & CPM_CFCR_IFR_MASK) >> CPM_CFCR_IFR_BIT], + div[(cfcr & CPM_CFCR_SFR_MASK) >> CPM_CFCR_SFR_BIT], + div[(cfcr & CPM_CFCR_MFR_MASK) >> CPM_CFCR_MFR_BIT], + div[(cfcr & CPM_CFCR_PFR_MASK) >> CPM_CFCR_PFR_BIT] + ); + len += sprintf (page+len, "PLL Freq : %d MHz\n", __cpm_get_pllout()/1000000); + len += sprintf (page+len, "ICLK : %d MHz\n", __cpm_get_iclk()/1000000); + len += sprintf (page+len, "SCLK : %d MHz\n", __cpm_get_sclk()/1000000); + len += sprintf (page+len, "MCLK : %d MHz\n", __cpm_get_mclk()/1000000); + len += sprintf (page+len, "PCLK : %d MHz\n", __cpm_get_pclk()/1000000); + len += sprintf (page+len, "DEVCLK : %d MHz\n", __cpm_get_devclk()/1000000); + len += sprintf (page+len, "RTCCLK : %d KHz\n", __cpm_get_rtcclk()/1000); + len += sprintf (page+len, "USBCLK : %d MHz\n", __cpm_get_usbclk()/1000000); +#if defined(CONFIG_FB_JZ) + len += sprintf (page+len, "LCDCLK : %d MHz\n", __cpm_get_lcdclk()/1000000); + len += sprintf (page+len, "PIXCLK : %d MHz\n", __cpm_get_pixclk()/1000000); +#endif + return len; +} + +static int cgm_write_proc(struct file *file, const char *buffer, unsigned long count, void *data) +{ + REG_CPM_CFCR = simple_strtoul(buffer, 0, 16); + return count; +} + +/* + * WDT + */ +static int wdt_read_proc (char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + int len = 0; + + len += sprintf (page+len, "WDT_WTCSR : 0x%08x\n", REG_WDT_WTCSR); + len += sprintf (page+len, "WDT_WTCNT : 0x%08x\n", REG_WDT_WTCNT); + + return len; +} + +static int wdt_write_proc(struct file *file, const char *buffer, unsigned long count, void *data) +{ + unsigned long cnt = simple_strtoul(buffer, 0, 16); + + REG_WDT_WTCNT = cnt; + REG_WDT_WTCSR = WDT_WTCSR_START; + + return count; +} + +/* + * PWM + */ + +static int proc_jz_pwm_read_byte(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + return sprintf (page, "0x%02x\n", REG8(data)); +} + +static int proc_jz_pwm_read_word(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + return sprintf (page, "0x%04x\n", REG16(data)); +} + +static int proc_jz_pwm_write_byte(struct file *file, const char *buffer, unsigned long count, void *data) +{ + REG8(data) = simple_strtoul(buffer, 0, 16); + return count; +} + +static int proc_jz_pwm_write_word(struct file *file, const char *buffer, unsigned long count, void *data) +{ + REG16(data) = simple_strtoul(buffer, 0, 16); + return count; +} + +#define PWM_NUM 2 + +static int jz_pwm_proc_init(void) +{ + struct proc_dir_entry *proc_jz_pwm, *res; + char name[16]; + unsigned char i; + + for (i = 0; i < PWM_NUM; i++) { + sprintf(name, "pwm%d", i); + proc_jz_pwm = proc_mkdir(name, proc_jz_root); + res = create_proc_entry("control", 0600, proc_jz_pwm); + if ( res) { + res->read_proc = proc_jz_pwm_read_byte; + res->write_proc = proc_jz_pwm_write_byte; + if (i) + res->data = (void * )PWM_CTR(1); + else + res->data = (void * )PWM_CTR(0); + } + res = create_proc_entry("period", 0600, proc_jz_pwm); + if ( res) { + res->read_proc = proc_jz_pwm_read_word; + res->write_proc = proc_jz_pwm_write_word; + if (i) + res->data = (void *)PWM_PER(1); + else + res->data = (void *)PWM_PER(0); + } + res = create_proc_entry("duty", 0600, proc_jz_pwm); + if ( res) { + res->read_proc = proc_jz_pwm_read_word; + res->write_proc = proc_jz_pwm_write_word; + if (i) + res->data = (void * )PWM_DUT(1); + else + res->data = (void * )PWM_DUT(0); + } + } + return 0; +} + +/* + * /proc/jz/xxx entry + * + */ +static int __init jz_proc_init(void) +{ + struct proc_dir_entry *entry; + + /* create /proc/jz */ + proc_jz_root = proc_mkdir("jz", 0); + + /* create /proc/jz/emc */ + entry = create_proc_entry("emc", 0644, proc_jz_root); + if (entry) { + entry->read_proc = emc_read_proc; + entry->write_proc = NULL; + entry->data = NULL; + } + + /* create /proc/jz/pmc */ + entry = create_proc_entry("pmc", 0644, proc_jz_root); + if (entry) { + entry->read_proc = pmc_read_proc; + entry->write_proc = pmc_write_proc; + entry->data = NULL; + } + + /* create /proc/jz/cgm */ + entry = create_proc_entry("cgm", 0644, proc_jz_root); + if (entry) { + entry->read_proc = cgm_read_proc; + entry->write_proc = cgm_write_proc; + entry->data = NULL; + } + + /* create /proc/jz/wdt */ + entry = create_proc_entry("wdt", 0644, proc_jz_root); + if (entry) { + entry->read_proc = wdt_read_proc; + entry->write_proc = wdt_write_proc; + entry->data = NULL; + } + + /* PWM */ + jz_pwm_proc_init(); + + return 0; +} + +__initcall(jz_proc_init); diff -pwurN linux-2.6.24.3-p2010/./arch/mips/jz4730/prom.c linux-2.6.24.3-RV10/./arch/mips/jz4730/prom.c --- linux-2.6.24.3-p2010/./arch/mips/jz4730/prom.c 2010-07-05 06:41:51.000000000 +0200 +++ linux-2.6.24.3-RV10/./arch/mips/jz4730/prom.c 2010-07-04 08:54:28.000000000 +0200 @@ -76,7 +76,7 @@ void prom_init_cmdline(void) char *prom_getenv(char *envname) { -#if 0 +#if 1 /* * Return a pointer to the given environment variable. * YAMON uses "name", "value" pairs, while U-Boot uses "name=value". diff -pwurN linux-2.6.24.3-p2010/./arch/mips/Kconfig linux-2.6.24.3-RV10/./arch/mips/Kconfig --- linux-2.6.24.3-p2010/./arch/mips/Kconfig 2010-07-05 06:41:51.000000000 +0200 +++ linux-2.6.24.3-RV10/./arch/mips/Kconfig 2010-07-04 08:57:41.000000000 +0200 @@ -24,6 +24,15 @@ config JZ4730_PMP select SYS_SUPPORTS_LITTLE_ENDIAN select SOC_JZ4730 +config JZ4730_MINIPC + bool "Ingenic JZ4730 based MINIPC" + select DMA_NONCOHERENT + select SYS_HAS_CPU_MIPS32_R1 + select SYS_SUPPORTS_32BIT_KERNEL + select SYS_SUPPORTS_LITTLE_ENDIAN + select SOC_JZ4730 + select GENERIC_GPIO + config JZ4740_PAVO bool "Ingenic JZ4740 PAVO board" select DMA_NONCOHERENT diff -pwurN linux-2.6.24.3-p2010/./arch/mips/mm/c-r4k.c linux-2.6.24.3-RV10/./arch/mips/mm/c-r4k.c --- linux-2.6.24.3-p2010/./arch/mips/mm/c-r4k.c 2010-07-05 06:41:51.000000000 +0200 +++ linux-2.6.24.3-RV10/./arch/mips/mm/c-r4k.c 2010-07-04 08:54:28.000000000 +0200 @@ -626,12 +626,20 @@ static void local_r4k_flush_cache_sigtra unsigned long addr = (unsigned long) arg; R4600_HIT_CACHEOP_WAR_IMPL; - if (dc_lsize) + if (dc_lsize) { protected_writeback_dcache_line(addr & ~(dc_lsize - 1)); +#ifdef CONFIG_JZRISC + protected_writeback_dcache_line((addr & ~(dc_lsize - 1)) + 32); +#endif + } if (!cpu_icache_snoops_remote_store && scache_size) protected_writeback_scache_line(addr & ~(sc_lsize - 1)); - if (ic_lsize) + if (ic_lsize) { protected_flush_icache_line(addr & ~(ic_lsize - 1)); +#ifdef CONFIG_JZRISC + protected_flush_icache_line((addr & ~(ic_lsize - 1)) + 32); +#endif + } if (MIPS4K_ICACHE_REFILL_WAR) { __asm__ __volatile__ ( ".set push\n\t" @@ -706,7 +714,7 @@ static void __init probe_pcache(void) struct cpuinfo_mips *c = ¤t_cpu_data; unsigned int config = read_c0_config(); unsigned int prid = read_c0_prid(); - unsigned long config1; + unsigned int config1; unsigned int lsize; switch (c->cputype) { @@ -876,6 +884,7 @@ static void __init probe_pcache(void) case CPU_JZRISC: config1 = read_c0_config1(); + /* printk (KERN_ERR "c-r4k: config = 0x%08x config1 = 0x%08x\n", config, config1); */ config1 = (config1 >> 22) & 0x07; if (config1 == 0x07) config1 = 10; diff -pwurN linux-2.6.24.3-p2010/./arch/mips/mm/tlbex.c linux-2.6.24.3-RV10/./arch/mips/mm/tlbex.c --- linux-2.6.24.3-p2010/./arch/mips/mm/tlbex.c 2010-07-05 06:41:51.000000000 +0200 +++ linux-2.6.24.3-RV10/./arch/mips/mm/tlbex.c 2010-07-04 08:54:28.000000000 +0200 @@ -833,6 +833,7 @@ static __init void __maybe_unused build_ case CPU_R5000: case CPU_R5000A: case CPU_NEVADA: + case CPU_JZRISC: i_nop(p); i_tlbp(p); break; @@ -982,6 +983,10 @@ static __init void build_tlb_write_entry break; case CPU_JZRISC: + i_nop(p); + i_nop(p); + i_nop(p); + i_nop(p); tlbw(p); i_nop(p); break; diff -pwurN linux-2.6.24.3-p2010/./.config linux-2.6.24.3-RV10/./.config --- linux-2.6.24.3-p2010/./.config 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./.config 2010-07-04 11:09:37.000000000 +0200 @@ -0,0 +1,1472 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.24.3 +# Sun Jul 4 05:09:37 2010 +# +CONFIG_MIPS=y + +# +# Machine selection +# +# CONFIG_JZ4730_PMP is not set +CONFIG_JZ4730_MINIPC=y +# CONFIG_JZ4740_PAVO is not set +# CONFIG_JZ4740_LEO is not set +# CONFIG_JZ4740_LYRA is not set +# CONFIG_JZ4725_DIPPER is not set +# CONFIG_JZ4720_VIRGO is not set +# CONFIG_JZ4750_FUWA is not set +# CONFIG_JZ4750D_FUWA1 is not set +# CONFIG_JZ4750_APUS is not set +# CONFIG_JZ4750D_CETUS is not set +# CONFIG_JZ4750L_F4750L is not set +# CONFIG_JZ4750L_VOLANS is not set +# CONFIG_MACH_ALCHEMY is not set +# CONFIG_BASLER_EXCITE is not set +# CONFIG_BCM47XX is not set +# CONFIG_MIPS_COBALT is not set +# CONFIG_MACH_DECSTATION is not set +# CONFIG_MACH_JAZZ is not set +# CONFIG_LASAT is not set +# CONFIG_LEMOTE_FULONG is not set +# CONFIG_MIPS_ATLAS is not set +# CONFIG_MIPS_MALTA is not set +# CONFIG_MIPS_SEAD is not set +# CONFIG_MIPS_SIM is not set +# CONFIG_MARKEINS is not set +# CONFIG_MACH_VR41XX is not set +# CONFIG_PNX8550_JBS is not set +# CONFIG_PNX8550_STB810 is not set +# CONFIG_PMC_MSP is not set +# CONFIG_PMC_YOSEMITE is not set +# CONFIG_QEMU is not set +# CONFIG_SGI_IP22 is not set +# CONFIG_SGI_IP27 is not set +# CONFIG_SGI_IP32 is not set +# CONFIG_SIBYTE_CRHINE is not set +# CONFIG_SIBYTE_CARMEL is not set +# CONFIG_SIBYTE_CRHONE is not set +# CONFIG_SIBYTE_RHONE is not set +# CONFIG_SIBYTE_SWARM is not set +# CONFIG_SIBYTE_LITTLESUR is not set +# CONFIG_SIBYTE_SENTOSA is not set +# CONFIG_SIBYTE_PTSWARM is not set +# CONFIG_SIBYTE_BIGSUR is not set +# CONFIG_SNI_RM is not set +# CONFIG_TOSHIBA_JMR3927 is not set +# CONFIG_TOSHIBA_RBTX4927 is not set +# CONFIG_TOSHIBA_RBTX4938 is not set +# CONFIG_WR_PPMC is not set +CONFIG_SOC_JZ4730=y +CONFIG_JZSOC=y +CONFIG_JZRISC=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_ARCH_HAS_ILOG2_U32 is not set +# CONFIG_ARCH_HAS_ILOG2_U64 is not set +CONFIG_ARCH_SUPPORTS_OPROFILE=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_TIME=y +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y +# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set +CONFIG_DMA_NONCOHERENT=y +CONFIG_DMA_NEED_PCI_MAP_STATE=y +# CONFIG_HOTPLUG_CPU is not set +# CONFIG_NO_IOPORT is not set +CONFIG_GENERIC_GPIO=y +# CONFIG_CPU_BIG_ENDIAN is not set +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y +CONFIG_MIPS_L1_CACHE_SHIFT=5 + +# +# CPU selection +# +# CONFIG_CPU_LOONGSON2 is not set +CONFIG_CPU_MIPS32_R1=y +# CONFIG_CPU_MIPS32_R2 is not set +# CONFIG_CPU_MIPS64_R1 is not set +# CONFIG_CPU_MIPS64_R2 is not set +# CONFIG_CPU_R3000 is not set +# CONFIG_CPU_TX39XX is not set +# CONFIG_CPU_VR41XX is not set +# CONFIG_CPU_R4300 is not set +# CONFIG_CPU_R4X00 is not set +# CONFIG_CPU_TX49XX is not set +# CONFIG_CPU_R5000 is not set +# CONFIG_CPU_R5432 is not set +# CONFIG_CPU_R6000 is not set +# CONFIG_CPU_NEVADA is not set +# CONFIG_CPU_R8000 is not set +# CONFIG_CPU_R10000 is not set +# CONFIG_CPU_RM7000 is not set +# CONFIG_CPU_RM9000 is not set +# CONFIG_CPU_SB1 is not set +CONFIG_SYS_HAS_CPU_MIPS32_R1=y +CONFIG_CPU_MIPS32=y +CONFIG_CPU_MIPSR1=y +CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y +CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y + +# +# Kernel type +# +CONFIG_32BIT=y +# CONFIG_64BIT is not set +CONFIG_PAGE_SIZE_4KB=y +# CONFIG_PAGE_SIZE_8KB is not set +# CONFIG_PAGE_SIZE_16KB is not set +# CONFIG_PAGE_SIZE_64KB is not set +CONFIG_CPU_HAS_PREFETCH=y +CONFIG_MIPS_MT_DISABLED=y +# CONFIG_MIPS_MT_SMP is not set +# CONFIG_MIPS_MT_SMTC is not set +CONFIG_CPU_HAS_LLSC=y +CONFIG_CPU_HAS_SYNC=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_CPU_SUPPORTS_HIGHMEM=y +CONFIG_ARCH_FLATMEM_ENABLE=y +CONFIG_ARCH_POPULATES_NODE_MAP=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_RESOURCES_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +# CONFIG_TICK_ONESHOT is not set +# CONFIG_NO_HZ is not set +# CONFIG_HIGH_RES_TIMERS is not set +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_FORCE_MAX_ZONEORDER=12 +# CONFIG_HZ_48 is not set +CONFIG_HZ_100=y +# CONFIG_HZ_128 is not set +# CONFIG_HZ_250 is not set +# CONFIG_HZ_256 is not set +# CONFIG_HZ_1000 is not set +# CONFIG_HZ_1024 is not set +CONFIG_SYS_SUPPORTS_ARBIT_HZ=y +CONFIG_HZ=100 +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +# CONFIG_PREEMPT is not set +# CONFIG_KEXEC is not set +CONFIG_SECCOMP=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_USER_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_CGROUPS is not set +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_FAIR_USER_SCHED=y +# CONFIG_FAIR_CGROUP_SCHED is not set +CONFIG_SYSFS_DEPRECATED=y +CONFIG_RELAY=y +# CONFIG_BLK_DEV_INITRD is not set +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_EMBEDDED=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_ANON_INODES=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_SLAB=y +# CONFIG_SLUB is not set +# CONFIG_SLOB is not set +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_KMOD=y +CONFIG_BLOCK=y +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set +# CONFIG_BLK_DEV_BSG is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +CONFIG_DEFAULT_AS=y +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="anticipatory" + +# +# Bus options (PCI, PCMCIA, EISA, ISA, TC) +# +# CONFIG_ARCH_SUPPORTS_MSI is not set +CONFIG_MMU=y +# CONFIG_PCCARD is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_TRAD_SIGNALS=y + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ_JZ=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_DEBUG is not set +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set + +# +# Power management options +# +CONFIG_PM=y +CONFIG_PM_LEGACY=y +# CONFIG_PM_DEBUG is not set +CONFIG_PM_SLEEP=y +CONFIG_SUSPEND_UP_POSSIBLE=y +CONFIG_SUSPEND=y + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_SCHED is not set +CONFIG_NET_SCH_FIFO=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set + +# +# Wireless +# +CONFIG_CFG80211=y +CONFIG_NL80211=y +CONFIG_WIRELESS_EXT=y +CONFIG_MAC80211=y +CONFIG_MAC80211_RCSIMPLE=y +# CONFIG_MAC80211_DEBUG is not set +CONFIG_IEEE80211=y +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_CRYPT_WEP=y +# CONFIG_IEEE80211_CRYPT_CCMP is not set +CONFIG_IEEE80211_CRYPT_TKIP=y +CONFIG_IEEE80211_SOFTMAC=y +# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set +# CONFIG_RFKILL is not set +# CONFIG_NET_9P is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_CONCAT=y +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +CONFIG_SSFDC=y +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_VERIFY_WRITE=y +# CONFIG_MTD_NAND_ECC_SMC is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_NANDSIM is not set +# CONFIG_MTD_NAND_PLATFORM is not set +# CONFIG_MTD_ALAUDA is not set +CONFIG_MTD_NAND_JZ4730=y +# CONFIG_MTD_HW_HM_ECC is not set +CONFIG_MTD_SW_HM_ECC=y +# CONFIG_MTD_HW_RS_ECC is not set +CONFIG_MTD_MTDBLOCK_WRITE_VERIFY_ENABLE=y +CONFIG_MTD_OOB_COPIES=3 +CONFIG_MTD_BADBLOCK_FLAG_PAGE=0 +# CONFIG_MTD_ONENAND is not set + +# +# UBI - Unsorted block images +# +# CONFIG_MTD_UBI is not set +# CONFIG_MTD_UBI_BLKDEVS is not set +# CONFIG_PARPORT is not set +# CONFIG_PNP is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +CONFIG_MISC_DEVICES=y +# CONFIG_EEPROM_93CX6 is not set +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_SCH is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +CONFIG_SCSI_LOWLEVEL=y +# CONFIG_ISCSI_TCP is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_ATA is not set +# CONFIG_MD is not set +CONFIG_NETDEVICES=y +# CONFIG_NETDEVICES_MULTIQUEUE is not set +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_MACVLAN is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_VETH is not set +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_BROADCOM_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +CONFIG_JZ_ETH=y +# CONFIG_AX88796 is not set +# CONFIG_DM9000 is not set +# CONFIG_IBM_NEW_EMAC_ZMII is not set +# CONFIG_IBM_NEW_EMAC_RGMII is not set +# CONFIG_IBM_NEW_EMAC_TAH is not set +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set +# CONFIG_B44 is not set +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set + +# +# Wireless LAN +# +# CONFIG_WLAN_PRE80211 is not set +CONFIG_WLAN_80211=y +# CONFIG_LIBERTAS is not set +# CONFIG_USB_ZD1201 is not set +# CONFIG_RTL8187 is not set +# CONFIG_P54_COMMON is not set +# CONFIG_HOSTAP is not set +# CONFIG_B43 is not set +# CONFIG_B43LEGACY is not set +CONFIG_ZD1211RW=y +# CONFIG_ZD1211RW_DEBUG is not set +# CONFIG_RT2X00 is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=y +CONFIG_USB_NET_CDCETHER=y +CONFIG_USB_NET_DM9601=y +# CONFIG_USB_NET_GL620A is not set +CONFIG_USB_NET_NET1080=y +CONFIG_USB_NET_PLUSB=y +# CONFIG_USB_NET_MCS7830 is not set +# CONFIG_USB_NET_RNDIS_HOST is not set +CONFIG_USB_NET_CDC_SUBSET=y +CONFIG_USB_ALI_M5632=y +# CONFIG_USB_AN2720 is not set +CONFIG_USB_BELKIN=y +CONFIG_USB_ARMLINUX=y +# CONFIG_USB_EPSON2888 is not set +# CONFIG_USB_KC2190 is not set +CONFIG_USB_NET_ZAURUS=y +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set +CONFIG_INPUT_POLLDEV=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=800 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +CONFIG_KEYBOARD_JZ=y +# CONFIG_5x5_KEYBOARD_JZ is not set +# CONFIG_KEYBOARD_GPIO is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +CONFIG_MOUSE_PS2_ALPS=y +CONFIG_MOUSE_PS2_LOGIPS2PP=y +CONFIG_MOUSE_PS2_SYNAPTICS=y +CONFIG_MOUSE_PS2_LIFEBOOK=y +CONFIG_MOUSE_PS2_TRACKPOINT=y +# CONFIG_MOUSE_PS2_TOUCHKIT is not set +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_APPLETOUCH is not set +# CONFIG_MOUSE_VSXXXAA is not set +CONFIG_MOUSE_GPIO=y +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +# CONFIG_SERIO_I8042 is not set +CONFIG_SERIO_SERPORT=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_INGENIC is not set +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_RTC is not set +CONFIG_RTC_PCF8563=y +# CONFIG_RTC_JZ is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set + +# +# JZSOC char device support +# +CONFIG_JZCHAR=y +# CONFIG_JZ_CIM is not set +# CONFIG_JZ_TPANEL_ATA2508 is not set +# CONFIG_JZ_UDC_HOTPLUG is not set +CONFIG_JZ_MINIPC_MISC=y +# CONFIG_JZ_OW is not set +# CONFIG_JZ_TCSM is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +# CONFIG_I2C_CHARDEV is not set + +# +# I2C Algorithms +# +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# +# CONFIG_I2C_JZ47XX is not set +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_DS1337 is not set +# CONFIG_SENSORS_DS1374 is not set +# CONFIG_DS1682 is not set +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_MAX6875 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# SPI support +# +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set +# CONFIG_W1 is not set +# CONFIG_POWER_SUPPLY is not set +# CONFIG_HWMON is not set +# CONFIG_WATCHDOG is not set + +# +# Sonics Silicon Backplane +# +CONFIG_SSB_POSSIBLE=y +# CONFIG_SSB is not set + +# +# Multifunction device drivers +# +# CONFIG_MFD_SM501 is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set +# CONFIG_DVB_CORE is not set +# CONFIG_DAB is not set + +# +# Graphics support +# +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_SYS_FOPS is not set +CONFIG_FB_DEFERRED_IO=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +CONFIG_FB_JZSOC=y +CONFIG_FB_JZLCD_4730_4740=y +CONFIG_JZLCD_FRAMEBUFFER_MAX=1 +# CONFIG_JZLCD_FRAMEBUFFER_ROTATE_SUPPORT is not set +# CONFIG_JZLCD_SHARP_LQ035Q7 is not set +# CONFIG_JZLCD_SAMSUNG_LTS350Q1 is not set +# CONFIG_JZLCD_SAMSUNG_LTV350QVF04 is not set +# CONFIG_JZLCD_SAMSUNG_LTP400WQF01 is not set +# CONFIG_JZLCD_SAMSUNG_LTP400WQF02 is not set +# CONFIG_JZLCD_AUO_A030FL01_V1 is not set +# CONFIG_JZLCD_TRULY_TFTG320240DTSW is not set +# CONFIG_JZLCD_TRULY_TFTG320240DTSW_SERIAL is not set +# CONFIG_JZLCD_TRULY_TFTG240320UTSW_63W_E is not set +# CONFIG_JZLCD_FOXCONN_PT035TN01 is not set +# CONFIG_JZLCD_INNOLUX_PT035TN01_SERIAL is not set +# CONFIG_JZLCD_TOSHIBA_LTM084P363 is not set +# CONFIG_JZLCD_HYNIX_HT10X21 is not set +# CONFIG_JZLCD_INNOLUX_AT080TN42 is not set +# CONFIG_JZLCD_CSTN_800x600 is not set +# CONFIG_JZLCD_CSTN_320x240 is not set +# CONFIG_JZLCD_MSTN_480x320 is not set +# CONFIG_JZLCD_MSTN_320x240 is not set +# CONFIG_JZLCD_MSTN_240x128 is not set +CONFIG_JZLCD_CHUNGHWA_CLAA070VC01=y +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_VIRTUAL is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_BACKLIGHT_CORGI is not set +CONFIG_BACKLIGHT_JZ4730_MINIPC=y + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +# CONFIG_FRAMEBUFFER_CONSOLE_CURSOR_FLASH is not set +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y + +# +# Sound +# +CONFIG_SOUND=y + +# +# Advanced Linux Sound Architecture +# +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y +CONFIG_SND_RAWMIDI=y +CONFIG_SND_SEQUENCER=y +# CONFIG_SND_SEQ_DUMMY is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=y +CONFIG_SND_PCM_OSS=y +CONFIG_SND_PCM_OSS_PLUGINS=y +CONFIG_SND_SEQUENCER_OSS=y +# CONFIG_SND_DYNAMIC_MINORS is not set +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set + +# +# Generic devices +# +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_VIRMIDI is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set + +# +# ALSA MIPS devices +# + +# +# USB devices +# +CONFIG_SND_USB_AUDIO=y +# CONFIG_SND_USB_CAIAQ is not set + +# +# System on Chip audio support +# +# CONFIG_SND_SOC is not set + +# +# SoC Audio support for SuperH +# + +# +# Open Sound System +# +CONFIG_SOUND_PRIME=y +CONFIG_OSS_OBSOLETE=y +# CONFIG_SOUND_JZ_AC97 is not set +CONFIG_SOUND_JZ_I2S=y +CONFIG_I2S_AK4642EN=y +# CONFIG_I2S_ICODEC is not set +# CONFIG_I2S_DLV is not set +# CONFIG_SOUND_MSNDCLAS is not set +# CONFIG_SOUND_MSNDPIN is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +# CONFIG_HID_DEBUG is not set +# CONFIG_HIDRAW is not set + +# +# USB Input Devices +# +CONFIG_USB_HID=y +# CONFIG_USB_HIDINPUT_POWERBOOK is not set +# CONFIG_HID_FF is not set +CONFIG_USB_HIDDEV=y +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB_ARCH_HAS_EHCI is not set +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEVICEFS is not set +CONFIG_USB_DEVICE_CLASS=y +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_SUSPEND is not set +# CONFIG_USB_PERSIST is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_OHCI_HCD=y +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=y +CONFIG_USB_PRINTER=y + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# may also be needed; see USB_STORAGE Help for more information +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set +# CONFIG_USB_MON is not set + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +CONFIG_USB_SERIAL=y +# CONFIG_USB_SERIAL_CONSOLE is not set +CONFIG_USB_SERIAL_GENERIC=y +# CONFIG_USB_SERIAL_AIRCABLE is not set +# CONFIG_USB_SERIAL_AIRPRIME is not set +# CONFIG_USB_SERIAL_ARK3116 is not set +# CONFIG_USB_SERIAL_BELKIN is not set +# CONFIG_USB_SERIAL_CH341 is not set +# CONFIG_USB_SERIAL_WHITEHEAT is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +CONFIG_USB_SERIAL_CP2101=y +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set +# CONFIG_USB_SERIAL_EMPEG is not set +CONFIG_USB_SERIAL_FTDI_SIO=y +# CONFIG_USB_SERIAL_FUNSOFT is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_GARMIN is not set +# CONFIG_USB_SERIAL_IPW is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +# CONFIG_USB_SERIAL_KEYSPAN is not set +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_MOS7720 is not set +# CONFIG_USB_SERIAL_MOS7840 is not set +# CONFIG_USB_SERIAL_NAVMAN is not set +CONFIG_USB_SERIAL_PL2303=y +# CONFIG_USB_SERIAL_OTI6858 is not set +# CONFIG_USB_SERIAL_HP4X is not set +# CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set +# CONFIG_USB_SERIAL_TI is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OPTION is not set +# CONFIG_USB_SERIAL_OMNINET is not set +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_BERRY_CHARGE is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGET is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set + +# +# USB DSL modem support +# + +# +# USB Gadget Support +# +CONFIG_USB_GADGET=m +# CONFIG_USB_GADGET_DEBUG_FILES is not set +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_JZ4740 is not set +# CONFIG_USB_GADGET_JZ4750 is not set +# CONFIG_USB_GADGET_JZ4750D is not set +# CONFIG_USB_GADGET_JZ4750L is not set +CONFIG_USB_GADGET_JZ4730=y +CONFIG_USB_JZ4730=m +# CONFIG_USB_GADGET_AMD5536UDC is not set +# CONFIG_USB_GADGET_ATMEL_USBA is not set +# CONFIG_USB_GADGET_FSL_USB2 is not set +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_PXA2XX is not set +# CONFIG_USB_GADGET_M66592 is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_S3C2410 is not set +# CONFIG_USB_GADGET_AT91 is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +# CONFIG_USB_GADGET_DUALSPEED is not set +# CONFIG_USB_ZERO is not set +# CONFIG_USB_ETH is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set +# CONFIG_USB_MIDI_GADGET is not set +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_UNSAFE_RESUME is not set + +# +# MMC/SD Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_BOUNCE=y +# CONFIG_SDIO_UART is not set + +# +# MMC/SD Host Controller Drivers +# +CONFIG_MMC_JZ=y +# CONFIG_JZ_MMC_BUS_1 is not set +CONFIG_JZ_MMC_BUS_4=y +# CONFIG_NEW_LEDS is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +# CONFIG_RTC_HCTOSYS is not set +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +# CONFIG_RTC_INTF_PROC is not set +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_X1205 is not set +CONFIG_RTC_DRV_PCF8563=y +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set + +# +# SPI RTC drivers +# + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# + +# +# Userspace I/O +# +# CONFIG_UIO is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +# CONFIG_EXT2_FS_POSIX_ACL is not set +# CONFIG_EXT2_FS_SECURITY is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +# CONFIG_EXT4DEV_FS is not set +CONFIG_JBD=y +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set +# CONFIG_JFFS2_SUMMARY is not set +# CONFIG_JFFS2_FS_XATTR is not set +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_LZO=y +CONFIG_JFFS2_RTIME=y +CONFIG_JFFS2_RUBIN=y +# CONFIG_JFFS2_CMODE_NONE is not set +CONFIG_JFFS2_CMODE_PRIORITY=y +# CONFIG_JFFS2_CMODE_SIZE is not set +# CONFIG_JFFS2_CMODE_FAVOURLZO is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NFSD is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +# CONFIG_SUNRPC_BIND34 is not set +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=y +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_CIFS=y +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +CONFIG_BSD_DISKLABEL=y +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_EFI_PARTITION is not set +# CONFIG_SYSV68_PARTITION is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +CONFIG_NLS_CODEPAGE_936=y +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set +# CONFIG_DLM is not set + +# +# Yaffs2 Filesystems +# +CONFIG_YAFFS_FS=y +CONFIG_YAFFS_YAFFS1=y +# CONFIG_YAFFS_DOES_ECC is not set +CONFIG_YAFFS_YAFFS2=y +CONFIG_YAFFS_AUTO_YAFFS2=y +# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set +# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set +CONFIG_YAFFS_DISABLE_CHUNK_ERASED_CHECK=y +CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y +CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10 +CONFIG_INSTRUMENTATION=y +# CONFIG_PROFILING is not set +# CONFIG_MARKERS is not set + +# +# Kernel hacking +# +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +# CONFIG_PRINTK_TIME is not set +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_SAMPLES is not set +CONFIG_CMDLINE="" + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITY_FILE_CAPABILITIES is not set +CONFIG_CRYPTO=y +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_MANAGER=y +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +# CONFIG_CRYPTO_MD5 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_GF128MUL is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_CBC is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_XTS is not set +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_DES is not set +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_DEFLATE is not set +CONFIG_CRYPTO_MICHAEL_MIC=y +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_TEST is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_LZO is not set +CONFIG_CRYPTO_HW=y + +# +# Library routines +# +CONFIG_BITREVERSE=y +# CONFIG_CRC_CCITT is not set +# CONFIG_CRC16 is not set +# CONFIG_CRC_ITU_T is not set +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_PLIST=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y diff -pwurN linux-2.6.24.3-p2010/./.config` linux-2.6.24.3-RV10/./.config` --- linux-2.6.24.3-p2010/./.config` 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./.config` 2010-07-04 14:45:16.000000000 +0200 @@ -0,0 +1,1472 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.24.3 +# Sun Jul 4 08:45:16 2010 +# +CONFIG_MIPS=y + +# +# Machine selection +# +# CONFIG_JZ4730_PMP is not set +CONFIG_JZ4730_MINIPC=y +# CONFIG_JZ4740_PAVO is not set +# CONFIG_JZ4740_LEO is not set +# CONFIG_JZ4740_LYRA is not set +# CONFIG_JZ4725_DIPPER is not set +# CONFIG_JZ4720_VIRGO is not set +# CONFIG_JZ4750_FUWA is not set +# CONFIG_JZ4750D_FUWA1 is not set +# CONFIG_JZ4750_APUS is not set +# CONFIG_JZ4750D_CETUS is not set +# CONFIG_JZ4750L_F4750L is not set +# CONFIG_JZ4750L_VOLANS is not set +# CONFIG_MACH_ALCHEMY is not set +# CONFIG_BASLER_EXCITE is not set +# CONFIG_BCM47XX is not set +# CONFIG_MIPS_COBALT is not set +# CONFIG_MACH_DECSTATION is not set +# CONFIG_MACH_JAZZ is not set +# CONFIG_LASAT is not set +# CONFIG_LEMOTE_FULONG is not set +# CONFIG_MIPS_ATLAS is not set +# CONFIG_MIPS_MALTA is not set +# CONFIG_MIPS_SEAD is not set +# CONFIG_MIPS_SIM is not set +# CONFIG_MARKEINS is not set +# CONFIG_MACH_VR41XX is not set +# CONFIG_PNX8550_JBS is not set +# CONFIG_PNX8550_STB810 is not set +# CONFIG_PMC_MSP is not set +# CONFIG_PMC_YOSEMITE is not set +# CONFIG_QEMU is not set +# CONFIG_SGI_IP22 is not set +# CONFIG_SGI_IP27 is not set +# CONFIG_SGI_IP32 is not set +# CONFIG_SIBYTE_CRHINE is not set +# CONFIG_SIBYTE_CARMEL is not set +# CONFIG_SIBYTE_CRHONE is not set +# CONFIG_SIBYTE_RHONE is not set +# CONFIG_SIBYTE_SWARM is not set +# CONFIG_SIBYTE_LITTLESUR is not set +# CONFIG_SIBYTE_SENTOSA is not set +# CONFIG_SIBYTE_PTSWARM is not set +# CONFIG_SIBYTE_BIGSUR is not set +# CONFIG_SNI_RM is not set +# CONFIG_TOSHIBA_JMR3927 is not set +# CONFIG_TOSHIBA_RBTX4927 is not set +# CONFIG_TOSHIBA_RBTX4938 is not set +# CONFIG_WR_PPMC is not set +CONFIG_SOC_JZ4730=y +CONFIG_JZSOC=y +CONFIG_JZRISC=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_ARCH_HAS_ILOG2_U32 is not set +# CONFIG_ARCH_HAS_ILOG2_U64 is not set +CONFIG_ARCH_SUPPORTS_OPROFILE=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_TIME=y +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y +# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set +CONFIG_DMA_NONCOHERENT=y +CONFIG_DMA_NEED_PCI_MAP_STATE=y +# CONFIG_HOTPLUG_CPU is not set +# CONFIG_NO_IOPORT is not set +CONFIG_GENERIC_GPIO=y +# CONFIG_CPU_BIG_ENDIAN is not set +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y +CONFIG_MIPS_L1_CACHE_SHIFT=5 + +# +# CPU selection +# +# CONFIG_CPU_LOONGSON2 is not set +CONFIG_CPU_MIPS32_R1=y +# CONFIG_CPU_MIPS32_R2 is not set +# CONFIG_CPU_MIPS64_R1 is not set +# CONFIG_CPU_MIPS64_R2 is not set +# CONFIG_CPU_R3000 is not set +# CONFIG_CPU_TX39XX is not set +# CONFIG_CPU_VR41XX is not set +# CONFIG_CPU_R4300 is not set +# CONFIG_CPU_R4X00 is not set +# CONFIG_CPU_TX49XX is not set +# CONFIG_CPU_R5000 is not set +# CONFIG_CPU_R5432 is not set +# CONFIG_CPU_R6000 is not set +# CONFIG_CPU_NEVADA is not set +# CONFIG_CPU_R8000 is not set +# CONFIG_CPU_R10000 is not set +# CONFIG_CPU_RM7000 is not set +# CONFIG_CPU_RM9000 is not set +# CONFIG_CPU_SB1 is not set +CONFIG_SYS_HAS_CPU_MIPS32_R1=y +CONFIG_CPU_MIPS32=y +CONFIG_CPU_MIPSR1=y +CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y +CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y + +# +# Kernel type +# +CONFIG_32BIT=y +# CONFIG_64BIT is not set +CONFIG_PAGE_SIZE_4KB=y +# CONFIG_PAGE_SIZE_8KB is not set +# CONFIG_PAGE_SIZE_16KB is not set +# CONFIG_PAGE_SIZE_64KB is not set +CONFIG_CPU_HAS_PREFETCH=y +CONFIG_MIPS_MT_DISABLED=y +# CONFIG_MIPS_MT_SMP is not set +# CONFIG_MIPS_MT_SMTC is not set +CONFIG_CPU_HAS_LLSC=y +CONFIG_CPU_HAS_SYNC=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_CPU_SUPPORTS_HIGHMEM=y +CONFIG_ARCH_FLATMEM_ENABLE=y +CONFIG_ARCH_POPULATES_NODE_MAP=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_RESOURCES_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +# CONFIG_TICK_ONESHOT is not set +# CONFIG_NO_HZ is not set +# CONFIG_HIGH_RES_TIMERS is not set +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_FORCE_MAX_ZONEORDER=12 +# CONFIG_HZ_48 is not set +CONFIG_HZ_100=y +# CONFIG_HZ_128 is not set +# CONFIG_HZ_250 is not set +# CONFIG_HZ_256 is not set +# CONFIG_HZ_1000 is not set +# CONFIG_HZ_1024 is not set +CONFIG_SYS_SUPPORTS_ARBIT_HZ=y +CONFIG_HZ=100 +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +# CONFIG_PREEMPT is not set +# CONFIG_KEXEC is not set +CONFIG_SECCOMP=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_USER_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_CGROUPS is not set +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_FAIR_USER_SCHED=y +# CONFIG_FAIR_CGROUP_SCHED is not set +CONFIG_SYSFS_DEPRECATED=y +CONFIG_RELAY=y +# CONFIG_BLK_DEV_INITRD is not set +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_EMBEDDED=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_ANON_INODES=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_SLAB=y +# CONFIG_SLUB is not set +# CONFIG_SLOB is not set +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_KMOD=y +CONFIG_BLOCK=y +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set +# CONFIG_BLK_DEV_BSG is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +CONFIG_DEFAULT_AS=y +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="anticipatory" + +# +# Bus options (PCI, PCMCIA, EISA, ISA, TC) +# +# CONFIG_ARCH_SUPPORTS_MSI is not set +CONFIG_MMU=y +# CONFIG_PCCARD is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_TRAD_SIGNALS=y + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ_JZ=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_DEBUG is not set +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set + +# +# Power management options +# +CONFIG_PM=y +CONFIG_PM_LEGACY=y +# CONFIG_PM_DEBUG is not set +CONFIG_PM_SLEEP=y +CONFIG_SUSPEND_UP_POSSIBLE=y +CONFIG_SUSPEND=y + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_SCHED is not set +CONFIG_NET_SCH_FIFO=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set + +# +# Wireless +# +CONFIG_CFG80211=y +CONFIG_NL80211=y +CONFIG_WIRELESS_EXT=y +CONFIG_MAC80211=y +CONFIG_MAC80211_RCSIMPLE=y +# CONFIG_MAC80211_DEBUG is not set +CONFIG_IEEE80211=y +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_CRYPT_WEP=y +# CONFIG_IEEE80211_CRYPT_CCMP is not set +CONFIG_IEEE80211_CRYPT_TKIP=y +CONFIG_IEEE80211_SOFTMAC=y +# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set +# CONFIG_RFKILL is not set +# CONFIG_NET_9P is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_CONCAT=y +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +CONFIG_SSFDC=y +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_VERIFY_WRITE=y +# CONFIG_MTD_NAND_ECC_SMC is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_NANDSIM is not set +# CONFIG_MTD_NAND_PLATFORM is not set +# CONFIG_MTD_ALAUDA is not set +CONFIG_MTD_NAND_JZ4730=y +# CONFIG_MTD_HW_HM_ECC is not set +CONFIG_MTD_SW_HM_ECC=y +# CONFIG_MTD_HW_RS_ECC is not set +CONFIG_MTD_MTDBLOCK_WRITE_VERIFY_ENABLE=y +CONFIG_MTD_OOB_COPIES=3 +CONFIG_MTD_BADBLOCK_FLAG_PAGE=0 +# CONFIG_MTD_ONENAND is not set + +# +# UBI - Unsorted block images +# +# CONFIG_MTD_UBI is not set +# CONFIG_MTD_UBI_BLKDEVS is not set +# CONFIG_PARPORT is not set +# CONFIG_PNP is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +CONFIG_MISC_DEVICES=y +# CONFIG_EEPROM_93CX6 is not set +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_SCH is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +CONFIG_SCSI_LOWLEVEL=y +# CONFIG_ISCSI_TCP is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_ATA is not set +# CONFIG_MD is not set +CONFIG_NETDEVICES=y +# CONFIG_NETDEVICES_MULTIQUEUE is not set +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_MACVLAN is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_VETH is not set +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_BROADCOM_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +CONFIG_JZ_ETH=y +# CONFIG_AX88796 is not set +# CONFIG_DM9000 is not set +# CONFIG_IBM_NEW_EMAC_ZMII is not set +# CONFIG_IBM_NEW_EMAC_RGMII is not set +# CONFIG_IBM_NEW_EMAC_TAH is not set +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set +# CONFIG_B44 is not set +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set + +# +# Wireless LAN +# +# CONFIG_WLAN_PRE80211 is not set +CONFIG_WLAN_80211=y +# CONFIG_LIBERTAS is not set +# CONFIG_USB_ZD1201 is not set +# CONFIG_RTL8187 is not set +# CONFIG_P54_COMMON is not set +# CONFIG_HOSTAP is not set +# CONFIG_B43 is not set +# CONFIG_B43LEGACY is not set +CONFIG_ZD1211RW=y +# CONFIG_ZD1211RW_DEBUG is not set +# CONFIG_RT2X00 is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=y +CONFIG_USB_NET_CDCETHER=y +CONFIG_USB_NET_DM9601=y +# CONFIG_USB_NET_GL620A is not set +CONFIG_USB_NET_NET1080=y +CONFIG_USB_NET_PLUSB=y +# CONFIG_USB_NET_MCS7830 is not set +# CONFIG_USB_NET_RNDIS_HOST is not set +CONFIG_USB_NET_CDC_SUBSET=y +CONFIG_USB_ALI_M5632=y +# CONFIG_USB_AN2720 is not set +CONFIG_USB_BELKIN=y +CONFIG_USB_ARMLINUX=y +# CONFIG_USB_EPSON2888 is not set +# CONFIG_USB_KC2190 is not set +CONFIG_USB_NET_ZAURUS=y +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set +CONFIG_INPUT_POLLDEV=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=800 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +CONFIG_KEYBOARD_JZ=y +# CONFIG_5x5_KEYBOARD_JZ is not set +# CONFIG_KEYBOARD_GPIO is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +CONFIG_MOUSE_PS2_ALPS=y +CONFIG_MOUSE_PS2_LOGIPS2PP=y +CONFIG_MOUSE_PS2_SYNAPTICS=y +CONFIG_MOUSE_PS2_LIFEBOOK=y +CONFIG_MOUSE_PS2_TRACKPOINT=y +# CONFIG_MOUSE_PS2_TOUCHKIT is not set +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_APPLETOUCH is not set +# CONFIG_MOUSE_VSXXXAA is not set +CONFIG_MOUSE_GPIO=y +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +# CONFIG_SERIO_I8042 is not set +CONFIG_SERIO_SERPORT=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_INGENIC is not set +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_RTC is not set +CONFIG_RTC_PCF8563=y +# CONFIG_RTC_JZ is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set + +# +# JZSOC char device support +# +CONFIG_JZCHAR=y +# CONFIG_JZ_CIM is not set +# CONFIG_JZ_TPANEL_ATA2508 is not set +# CONFIG_JZ_UDC_HOTPLUG is not set +CONFIG_JZ_MINIPC_MISC=y +# CONFIG_JZ_OW is not set +# CONFIG_JZ_TCSM is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +# CONFIG_I2C_CHARDEV is not set + +# +# I2C Algorithms +# +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# +# CONFIG_I2C_JZ47XX is not set +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_DS1337 is not set +# CONFIG_SENSORS_DS1374 is not set +# CONFIG_DS1682 is not set +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_MAX6875 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# SPI support +# +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set +# CONFIG_W1 is not set +# CONFIG_POWER_SUPPLY is not set +# CONFIG_HWMON is not set +# CONFIG_WATCHDOG is not set + +# +# Sonics Silicon Backplane +# +CONFIG_SSB_POSSIBLE=y +# CONFIG_SSB is not set + +# +# Multifunction device drivers +# +# CONFIG_MFD_SM501 is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set +# CONFIG_DVB_CORE is not set +# CONFIG_DAB is not set + +# +# Graphics support +# +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_SYS_FOPS is not set +CONFIG_FB_DEFERRED_IO=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +CONFIG_FB_JZSOC=y +CONFIG_FB_JZLCD_4730_4740=y +CONFIG_JZLCD_FRAMEBUFFER_MAX=1 +# CONFIG_JZLCD_FRAMEBUFFER_ROTATE_SUPPORT is not set +# CONFIG_JZLCD_SHARP_LQ035Q7 is not set +# CONFIG_JZLCD_SAMSUNG_LTS350Q1 is not set +# CONFIG_JZLCD_SAMSUNG_LTV350QVF04 is not set +# CONFIG_JZLCD_SAMSUNG_LTP400WQF01 is not set +# CONFIG_JZLCD_SAMSUNG_LTP400WQF02 is not set +# CONFIG_JZLCD_AUO_A030FL01_V1 is not set +# CONFIG_JZLCD_TRULY_TFTG320240DTSW is not set +# CONFIG_JZLCD_TRULY_TFTG320240DTSW_SERIAL is not set +# CONFIG_JZLCD_TRULY_TFTG240320UTSW_63W_E is not set +# CONFIG_JZLCD_FOXCONN_PT035TN01 is not set +# CONFIG_JZLCD_INNOLUX_PT035TN01_SERIAL is not set +# CONFIG_JZLCD_TOSHIBA_LTM084P363 is not set +# CONFIG_JZLCD_HYNIX_HT10X21 is not set +# CONFIG_JZLCD_INNOLUX_AT080TN42 is not set +# CONFIG_JZLCD_CSTN_800x600 is not set +# CONFIG_JZLCD_CSTN_320x240 is not set +# CONFIG_JZLCD_MSTN_480x320 is not set +# CONFIG_JZLCD_MSTN_320x240 is not set +# CONFIG_JZLCD_MSTN_240x128 is not set +CONFIG_JZLCD_CHUNGHWA_CLAA070VC01=y +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_VIRTUAL is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_BACKLIGHT_CORGI is not set +CONFIG_BACKLIGHT_JZ4730_MINIPC=y + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +# CONFIG_FRAMEBUFFER_CONSOLE_CURSOR_FLASH is not set +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y + +# +# Sound +# +CONFIG_SOUND=y + +# +# Advanced Linux Sound Architecture +# +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y +CONFIG_SND_RAWMIDI=y +CONFIG_SND_SEQUENCER=y +# CONFIG_SND_SEQ_DUMMY is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=y +CONFIG_SND_PCM_OSS=y +CONFIG_SND_PCM_OSS_PLUGINS=y +CONFIG_SND_SEQUENCER_OSS=y +# CONFIG_SND_DYNAMIC_MINORS is not set +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set + +# +# Generic devices +# +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_VIRMIDI is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set + +# +# ALSA MIPS devices +# + +# +# USB devices +# +CONFIG_SND_USB_AUDIO=y +# CONFIG_SND_USB_CAIAQ is not set + +# +# System on Chip audio support +# +# CONFIG_SND_SOC is not set + +# +# SoC Audio support for SuperH +# + +# +# Open Sound System +# +CONFIG_SOUND_PRIME=y +CONFIG_OSS_OBSOLETE=y +# CONFIG_SOUND_JZ_AC97 is not set +CONFIG_SOUND_JZ_I2S=y +CONFIG_I2S_AK4642EN=y +# CONFIG_I2S_ICODEC is not set +# CONFIG_I2S_DLV is not set +# CONFIG_SOUND_MSNDCLAS is not set +# CONFIG_SOUND_MSNDPIN is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +# CONFIG_HID_DEBUG is not set +# CONFIG_HIDRAW is not set + +# +# USB Input Devices +# +CONFIG_USB_HID=y +# CONFIG_USB_HIDINPUT_POWERBOOK is not set +# CONFIG_HID_FF is not set +CONFIG_USB_HIDDEV=y +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB_ARCH_HAS_EHCI is not set +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEVICEFS is not set +CONFIG_USB_DEVICE_CLASS=y +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_SUSPEND is not set +# CONFIG_USB_PERSIST is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_OHCI_HCD=y +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=y +CONFIG_USB_PRINTER=y + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# may also be needed; see USB_STORAGE Help for more information +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set +# CONFIG_USB_MON is not set + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +CONFIG_USB_SERIAL=y +# CONFIG_USB_SERIAL_CONSOLE is not set +CONFIG_USB_SERIAL_GENERIC=y +# CONFIG_USB_SERIAL_AIRCABLE is not set +# CONFIG_USB_SERIAL_AIRPRIME is not set +# CONFIG_USB_SERIAL_ARK3116 is not set +# CONFIG_USB_SERIAL_BELKIN is not set +# CONFIG_USB_SERIAL_CH341 is not set +# CONFIG_USB_SERIAL_WHITEHEAT is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +CONFIG_USB_SERIAL_CP2101=y +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set +# CONFIG_USB_SERIAL_EMPEG is not set +CONFIG_USB_SERIAL_FTDI_SIO=y +# CONFIG_USB_SERIAL_FUNSOFT is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_GARMIN is not set +# CONFIG_USB_SERIAL_IPW is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +# CONFIG_USB_SERIAL_KEYSPAN is not set +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_MOS7720 is not set +# CONFIG_USB_SERIAL_MOS7840 is not set +# CONFIG_USB_SERIAL_NAVMAN is not set +CONFIG_USB_SERIAL_PL2303=y +# CONFIG_USB_SERIAL_OTI6858 is not set +# CONFIG_USB_SERIAL_HP4X is not set +# CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set +# CONFIG_USB_SERIAL_TI is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OPTION is not set +# CONFIG_USB_SERIAL_OMNINET is not set +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_BERRY_CHARGE is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGET is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set + +# +# USB DSL modem support +# + +# +# USB Gadget Support +# +CONFIG_USB_GADGET=m +# CONFIG_USB_GADGET_DEBUG_FILES is not set +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_JZ4740 is not set +# CONFIG_USB_GADGET_JZ4750 is not set +# CONFIG_USB_GADGET_JZ4750D is not set +# CONFIG_USB_GADGET_JZ4750L is not set +CONFIG_USB_GADGET_JZ4730=y +CONFIG_USB_JZ4730=m +# CONFIG_USB_GADGET_AMD5536UDC is not set +# CONFIG_USB_GADGET_ATMEL_USBA is not set +# CONFIG_USB_GADGET_FSL_USB2 is not set +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_PXA2XX is not set +# CONFIG_USB_GADGET_M66592 is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_S3C2410 is not set +# CONFIG_USB_GADGET_AT91 is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +# CONFIG_USB_GADGET_DUALSPEED is not set +# CONFIG_USB_ZERO is not set +# CONFIG_USB_ETH is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set +# CONFIG_USB_MIDI_GADGET is not set +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_UNSAFE_RESUME is not set + +# +# MMC/SD Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_BOUNCE=y +# CONFIG_SDIO_UART is not set + +# +# MMC/SD Host Controller Drivers +# +CONFIG_MMC_JZ=y +# CONFIG_JZ_MMC_BUS_1 is not set +CONFIG_JZ_MMC_BUS_4=y +# CONFIG_NEW_LEDS is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +# CONFIG_RTC_HCTOSYS is not set +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +# CONFIG_RTC_INTF_PROC is not set +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_X1205 is not set +CONFIG_RTC_DRV_PCF8563=y +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set + +# +# SPI RTC drivers +# + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# + +# +# Userspace I/O +# +# CONFIG_UIO is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +# CONFIG_EXT2_FS_POSIX_ACL is not set +# CONFIG_EXT2_FS_SECURITY is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +# CONFIG_EXT4DEV_FS is not set +CONFIG_JBD=y +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set +# CONFIG_JFFS2_SUMMARY is not set +# CONFIG_JFFS2_FS_XATTR is not set +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_LZO=y +CONFIG_JFFS2_RTIME=y +CONFIG_JFFS2_RUBIN=y +# CONFIG_JFFS2_CMODE_NONE is not set +CONFIG_JFFS2_CMODE_PRIORITY=y +# CONFIG_JFFS2_CMODE_SIZE is not set +# CONFIG_JFFS2_CMODE_FAVOURLZO is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NFSD is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +# CONFIG_SUNRPC_BIND34 is not set +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=y +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_CIFS=y +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +CONFIG_BSD_DISKLABEL=y +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_EFI_PARTITION is not set +# CONFIG_SYSV68_PARTITION is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +CONFIG_NLS_CODEPAGE_936=y +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set +# CONFIG_DLM is not set + +# +# Yaffs2 Filesystems +# +CONFIG_YAFFS_FS=y +CONFIG_YAFFS_YAFFS1=y +# CONFIG_YAFFS_DOES_ECC is not set +CONFIG_YAFFS_YAFFS2=y +CONFIG_YAFFS_AUTO_YAFFS2=y +# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set +# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set +CONFIG_YAFFS_DISABLE_CHUNK_ERASED_CHECK=y +CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y +CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10 +CONFIG_INSTRUMENTATION=y +# CONFIG_PROFILING is not set +# CONFIG_MARKERS is not set + +# +# Kernel hacking +# +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +# CONFIG_PRINTK_TIME is not set +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_SAMPLES is not set +CONFIG_CMDLINE="" + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITY_FILE_CAPABILITIES is not set +CONFIG_CRYPTO=y +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_MANAGER=y +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +# CONFIG_CRYPTO_MD5 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_GF128MUL is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_CBC is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_XTS is not set +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_DES is not set +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_DEFLATE is not set +CONFIG_CRYPTO_MICHAEL_MIC=y +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_TEST is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_LZO is not set +CONFIG_CRYPTO_HW=y + +# +# Library routines +# +CONFIG_BITREVERSE=y +# CONFIG_CRC_CCITT is not set +# CONFIG_CRC16 is not set +# CONFIG_CRC_ITU_T is not set +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_PLIST=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y diff -pwurN linux-2.6.24.3-p2010/./.config.old linux-2.6.24.3-RV10/./.config.old --- linux-2.6.24.3-p2010/./.config.old 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./.config.old 2010-07-04 10:51:42.000000000 +0200 @@ -0,0 +1,1472 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.24.3 +# Sun Jul 4 04:51:42 2010 +# +CONFIG_MIPS=y + +# +# Machine selection +# +# CONFIG_JZ4730_PMP is not set +CONFIG_JZ4730_MINIPC=y +# CONFIG_JZ4740_PAVO is not set +# CONFIG_JZ4740_LEO is not set +# CONFIG_JZ4740_LYRA is not set +# CONFIG_JZ4725_DIPPER is not set +# CONFIG_JZ4720_VIRGO is not set +# CONFIG_JZ4750_FUWA is not set +# CONFIG_JZ4750D_FUWA1 is not set +# CONFIG_JZ4750_APUS is not set +# CONFIG_JZ4750D_CETUS is not set +# CONFIG_JZ4750L_F4750L is not set +# CONFIG_JZ4750L_VOLANS is not set +# CONFIG_MACH_ALCHEMY is not set +# CONFIG_BASLER_EXCITE is not set +# CONFIG_BCM47XX is not set +# CONFIG_MIPS_COBALT is not set +# CONFIG_MACH_DECSTATION is not set +# CONFIG_MACH_JAZZ is not set +# CONFIG_LASAT is not set +# CONFIG_LEMOTE_FULONG is not set +# CONFIG_MIPS_ATLAS is not set +# CONFIG_MIPS_MALTA is not set +# CONFIG_MIPS_SEAD is not set +# CONFIG_MIPS_SIM is not set +# CONFIG_MARKEINS is not set +# CONFIG_MACH_VR41XX is not set +# CONFIG_PNX8550_JBS is not set +# CONFIG_PNX8550_STB810 is not set +# CONFIG_PMC_MSP is not set +# CONFIG_PMC_YOSEMITE is not set +# CONFIG_QEMU is not set +# CONFIG_SGI_IP22 is not set +# CONFIG_SGI_IP27 is not set +# CONFIG_SGI_IP32 is not set +# CONFIG_SIBYTE_CRHINE is not set +# CONFIG_SIBYTE_CARMEL is not set +# CONFIG_SIBYTE_CRHONE is not set +# CONFIG_SIBYTE_RHONE is not set +# CONFIG_SIBYTE_SWARM is not set +# CONFIG_SIBYTE_LITTLESUR is not set +# CONFIG_SIBYTE_SENTOSA is not set +# CONFIG_SIBYTE_PTSWARM is not set +# CONFIG_SIBYTE_BIGSUR is not set +# CONFIG_SNI_RM is not set +# CONFIG_TOSHIBA_JMR3927 is not set +# CONFIG_TOSHIBA_RBTX4927 is not set +# CONFIG_TOSHIBA_RBTX4938 is not set +# CONFIG_WR_PPMC is not set +CONFIG_SOC_JZ4730=y +CONFIG_JZSOC=y +CONFIG_JZRISC=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_ARCH_HAS_ILOG2_U32 is not set +# CONFIG_ARCH_HAS_ILOG2_U64 is not set +CONFIG_ARCH_SUPPORTS_OPROFILE=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_TIME=y +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y +# CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set +CONFIG_DMA_NONCOHERENT=y +CONFIG_DMA_NEED_PCI_MAP_STATE=y +# CONFIG_HOTPLUG_CPU is not set +# CONFIG_NO_IOPORT is not set +CONFIG_GENERIC_GPIO=y +# CONFIG_CPU_BIG_ENDIAN is not set +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y +CONFIG_MIPS_L1_CACHE_SHIFT=5 + +# +# CPU selection +# +# CONFIG_CPU_LOONGSON2 is not set +CONFIG_CPU_MIPS32_R1=y +# CONFIG_CPU_MIPS32_R2 is not set +# CONFIG_CPU_MIPS64_R1 is not set +# CONFIG_CPU_MIPS64_R2 is not set +# CONFIG_CPU_R3000 is not set +# CONFIG_CPU_TX39XX is not set +# CONFIG_CPU_VR41XX is not set +# CONFIG_CPU_R4300 is not set +# CONFIG_CPU_R4X00 is not set +# CONFIG_CPU_TX49XX is not set +# CONFIG_CPU_R5000 is not set +# CONFIG_CPU_R5432 is not set +# CONFIG_CPU_R6000 is not set +# CONFIG_CPU_NEVADA is not set +# CONFIG_CPU_R8000 is not set +# CONFIG_CPU_R10000 is not set +# CONFIG_CPU_RM7000 is not set +# CONFIG_CPU_RM9000 is not set +# CONFIG_CPU_SB1 is not set +CONFIG_SYS_HAS_CPU_MIPS32_R1=y +CONFIG_CPU_MIPS32=y +CONFIG_CPU_MIPSR1=y +CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y +CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y + +# +# Kernel type +# +CONFIG_32BIT=y +# CONFIG_64BIT is not set +CONFIG_PAGE_SIZE_4KB=y +# CONFIG_PAGE_SIZE_8KB is not set +# CONFIG_PAGE_SIZE_16KB is not set +# CONFIG_PAGE_SIZE_64KB is not set +CONFIG_CPU_HAS_PREFETCH=y +CONFIG_MIPS_MT_DISABLED=y +# CONFIG_MIPS_MT_SMP is not set +# CONFIG_MIPS_MT_SMTC is not set +CONFIG_CPU_HAS_LLSC=y +CONFIG_CPU_HAS_SYNC=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_CPU_SUPPORTS_HIGHMEM=y +CONFIG_ARCH_FLATMEM_ENABLE=y +CONFIG_ARCH_POPULATES_NODE_MAP=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_RESOURCES_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +# CONFIG_TICK_ONESHOT is not set +# CONFIG_NO_HZ is not set +# CONFIG_HIGH_RES_TIMERS is not set +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_FORCE_MAX_ZONEORDER=12 +# CONFIG_HZ_48 is not set +CONFIG_HZ_100=y +# CONFIG_HZ_128 is not set +# CONFIG_HZ_250 is not set +# CONFIG_HZ_256 is not set +# CONFIG_HZ_1000 is not set +# CONFIG_HZ_1024 is not set +CONFIG_SYS_SUPPORTS_ARBIT_HZ=y +CONFIG_HZ=100 +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +# CONFIG_PREEMPT is not set +# CONFIG_KEXEC is not set +CONFIG_SECCOMP=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_USER_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_CGROUPS is not set +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_FAIR_USER_SCHED=y +# CONFIG_FAIR_CGROUP_SCHED is not set +CONFIG_SYSFS_DEPRECATED=y +CONFIG_RELAY=y +# CONFIG_BLK_DEV_INITRD is not set +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_EMBEDDED=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_ANON_INODES=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_SLAB=y +# CONFIG_SLUB is not set +# CONFIG_SLOB is not set +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_KMOD=y +CONFIG_BLOCK=y +# CONFIG_LBD is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set +# CONFIG_BLK_DEV_BSG is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +CONFIG_DEFAULT_AS=y +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="anticipatory" + +# +# Bus options (PCI, PCMCIA, EISA, ISA, TC) +# +# CONFIG_ARCH_SUPPORTS_MSI is not set +CONFIG_MMU=y +# CONFIG_PCCARD is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_TRAD_SIGNALS=y + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ_JZ=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_DEBUG is not set +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set + +# +# Power management options +# +CONFIG_PM=y +CONFIG_PM_LEGACY=y +# CONFIG_PM_DEBUG is not set +CONFIG_PM_SLEEP=y +CONFIG_SUSPEND_UP_POSSIBLE=y +CONFIG_SUSPEND=y + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_SCHED is not set +CONFIG_NET_SCH_FIFO=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set + +# +# Wireless +# +CONFIG_CFG80211=y +CONFIG_NL80211=y +CONFIG_WIRELESS_EXT=y +CONFIG_MAC80211=y +CONFIG_MAC80211_RCSIMPLE=y +# CONFIG_MAC80211_DEBUG is not set +CONFIG_IEEE80211=y +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_CRYPT_WEP=y +# CONFIG_IEEE80211_CRYPT_CCMP is not set +CONFIG_IEEE80211_CRYPT_TKIP=y +CONFIG_IEEE80211_SOFTMAC=y +# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set +# CONFIG_RFKILL is not set +# CONFIG_NET_9P is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +CONFIG_MTD_CONCAT=y +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +CONFIG_SSFDC=y +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_VERIFY_WRITE=y +# CONFIG_MTD_NAND_ECC_SMC is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_NANDSIM is not set +# CONFIG_MTD_NAND_PLATFORM is not set +# CONFIG_MTD_ALAUDA is not set +CONFIG_MTD_NAND_JZ4730=y +# CONFIG_MTD_HW_HM_ECC is not set +CONFIG_MTD_SW_HM_ECC=y +# CONFIG_MTD_HW_RS_ECC is not set +CONFIG_MTD_MTDBLOCK_WRITE_VERIFY_ENABLE=y +CONFIG_MTD_OOB_COPIES=3 +CONFIG_MTD_BADBLOCK_FLAG_PAGE=0 +# CONFIG_MTD_ONENAND is not set + +# +# UBI - Unsorted block images +# +# CONFIG_MTD_UBI is not set +# CONFIG_MTD_UBI_BLKDEVS is not set +# CONFIG_PARPORT is not set +# CONFIG_PNP is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=8192 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +CONFIG_MISC_DEVICES=y +# CONFIG_EEPROM_93CX6 is not set +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_SCH is not set + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +CONFIG_SCSI_LOWLEVEL=y +# CONFIG_ISCSI_TCP is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_ATA is not set +# CONFIG_MD is not set +CONFIG_NETDEVICES=y +# CONFIG_NETDEVICES_MULTIQUEUE is not set +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_MACVLAN is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_VETH is not set +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_BROADCOM_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +CONFIG_JZ_ETH=y +# CONFIG_AX88796 is not set +# CONFIG_DM9000 is not set +# CONFIG_IBM_NEW_EMAC_ZMII is not set +# CONFIG_IBM_NEW_EMAC_RGMII is not set +# CONFIG_IBM_NEW_EMAC_TAH is not set +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set +# CONFIG_B44 is not set +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set + +# +# Wireless LAN +# +# CONFIG_WLAN_PRE80211 is not set +CONFIG_WLAN_80211=y +# CONFIG_LIBERTAS is not set +# CONFIG_USB_ZD1201 is not set +# CONFIG_RTL8187 is not set +# CONFIG_P54_COMMON is not set +# CONFIG_HOSTAP is not set +# CONFIG_B43 is not set +# CONFIG_B43LEGACY is not set +CONFIG_ZD1211RW=y +# CONFIG_ZD1211RW_DEBUG is not set +# CONFIG_RT2X00 is not set + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=y +CONFIG_USB_NET_CDCETHER=y +CONFIG_USB_NET_DM9601=y +# CONFIG_USB_NET_GL620A is not set +CONFIG_USB_NET_NET1080=y +CONFIG_USB_NET_PLUSB=y +# CONFIG_USB_NET_MCS7830 is not set +# CONFIG_USB_NET_RNDIS_HOST is not set +CONFIG_USB_NET_CDC_SUBSET=y +CONFIG_USB_ALI_M5632=y +# CONFIG_USB_AN2720 is not set +CONFIG_USB_BELKIN=y +CONFIG_USB_ARMLINUX=y +# CONFIG_USB_EPSON2888 is not set +# CONFIG_USB_KC2190 is not set +CONFIG_USB_NET_ZAURUS=y +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set +CONFIG_INPUT_POLLDEV=m + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=800 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +CONFIG_KEYBOARD_JZ=y +# CONFIG_5x5_KEYBOARD_JZ is not set +# CONFIG_KEYBOARD_GPIO is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +CONFIG_MOUSE_PS2_ALPS=y +CONFIG_MOUSE_PS2_LOGIPS2PP=y +CONFIG_MOUSE_PS2_SYNAPTICS=y +CONFIG_MOUSE_PS2_LIFEBOOK=y +CONFIG_MOUSE_PS2_TRACKPOINT=y +# CONFIG_MOUSE_PS2_TOUCHKIT is not set +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_APPLETOUCH is not set +# CONFIG_MOUSE_VSXXXAA is not set +CONFIG_MOUSE_GPIO=m +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +# CONFIG_SERIO_I8042 is not set +CONFIG_SERIO_SERPORT=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_INGENIC is not set +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_RTC is not set +CONFIG_RTC_PCF8563=y +# CONFIG_RTC_JZ is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set + +# +# JZSOC char device support +# +CONFIG_JZCHAR=y +# CONFIG_JZ_CIM is not set +# CONFIG_JZ_TPANEL_ATA2508 is not set +# CONFIG_JZ_UDC_HOTPLUG is not set +CONFIG_JZ_MINIPC_MISC=y +# CONFIG_JZ_OW is not set +# CONFIG_JZ_TCSM is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +# CONFIG_I2C_CHARDEV is not set + +# +# I2C Algorithms +# +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# +# CONFIG_I2C_JZ47XX is not set +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_DS1337 is not set +# CONFIG_SENSORS_DS1374 is not set +# CONFIG_DS1682 is not set +# CONFIG_SENSORS_EEPROM is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_MAX6875 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set + +# +# SPI support +# +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set +# CONFIG_W1 is not set +# CONFIG_POWER_SUPPLY is not set +# CONFIG_HWMON is not set +# CONFIG_WATCHDOG is not set + +# +# Sonics Silicon Backplane +# +CONFIG_SSB_POSSIBLE=y +# CONFIG_SSB is not set + +# +# Multifunction device drivers +# +# CONFIG_MFD_SM501 is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set +# CONFIG_DVB_CORE is not set +# CONFIG_DAB is not set + +# +# Graphics support +# +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_SYS_FOPS is not set +CONFIG_FB_DEFERRED_IO=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +CONFIG_FB_JZSOC=y +CONFIG_FB_JZLCD_4730_4740=y +CONFIG_JZLCD_FRAMEBUFFER_MAX=1 +# CONFIG_JZLCD_FRAMEBUFFER_ROTATE_SUPPORT is not set +# CONFIG_JZLCD_SHARP_LQ035Q7 is not set +# CONFIG_JZLCD_SAMSUNG_LTS350Q1 is not set +# CONFIG_JZLCD_SAMSUNG_LTV350QVF04 is not set +# CONFIG_JZLCD_SAMSUNG_LTP400WQF01 is not set +# CONFIG_JZLCD_SAMSUNG_LTP400WQF02 is not set +# CONFIG_JZLCD_AUO_A030FL01_V1 is not set +# CONFIG_JZLCD_TRULY_TFTG320240DTSW is not set +# CONFIG_JZLCD_TRULY_TFTG320240DTSW_SERIAL is not set +# CONFIG_JZLCD_TRULY_TFTG240320UTSW_63W_E is not set +# CONFIG_JZLCD_FOXCONN_PT035TN01 is not set +# CONFIG_JZLCD_INNOLUX_PT035TN01_SERIAL is not set +# CONFIG_JZLCD_TOSHIBA_LTM084P363 is not set +# CONFIG_JZLCD_HYNIX_HT10X21 is not set +# CONFIG_JZLCD_INNOLUX_AT080TN42 is not set +# CONFIG_JZLCD_CSTN_800x600 is not set +# CONFIG_JZLCD_CSTN_320x240 is not set +# CONFIG_JZLCD_MSTN_480x320 is not set +# CONFIG_JZLCD_MSTN_320x240 is not set +# CONFIG_JZLCD_MSTN_240x128 is not set +CONFIG_JZLCD_CHUNGHWA_CLAA070VC01=y +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_VIRTUAL is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +# CONFIG_LCD_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +# CONFIG_BACKLIGHT_CORGI is not set +CONFIG_BACKLIGHT_JZ4730_MINIPC=y + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +# CONFIG_FRAMEBUFFER_CONSOLE_CURSOR_FLASH is not set +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y + +# +# Sound +# +CONFIG_SOUND=y + +# +# Advanced Linux Sound Architecture +# +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y +CONFIG_SND_RAWMIDI=y +CONFIG_SND_SEQUENCER=y +# CONFIG_SND_SEQ_DUMMY is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=y +CONFIG_SND_PCM_OSS=y +CONFIG_SND_PCM_OSS_PLUGINS=y +CONFIG_SND_SEQUENCER_OSS=y +# CONFIG_SND_DYNAMIC_MINORS is not set +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set + +# +# Generic devices +# +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_VIRMIDI is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set + +# +# ALSA MIPS devices +# + +# +# USB devices +# +CONFIG_SND_USB_AUDIO=y +# CONFIG_SND_USB_CAIAQ is not set + +# +# System on Chip audio support +# +# CONFIG_SND_SOC is not set + +# +# SoC Audio support for SuperH +# + +# +# Open Sound System +# +CONFIG_SOUND_PRIME=y +CONFIG_OSS_OBSOLETE=y +# CONFIG_SOUND_JZ_AC97 is not set +CONFIG_SOUND_JZ_I2S=y +CONFIG_I2S_AK4642EN=y +# CONFIG_I2S_ICODEC is not set +# CONFIG_I2S_DLV is not set +# CONFIG_SOUND_MSNDCLAS is not set +# CONFIG_SOUND_MSNDPIN is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +# CONFIG_HID_DEBUG is not set +# CONFIG_HIDRAW is not set + +# +# USB Input Devices +# +CONFIG_USB_HID=y +# CONFIG_USB_HIDINPUT_POWERBOOK is not set +# CONFIG_HID_FF is not set +CONFIG_USB_HIDDEV=y +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB_ARCH_HAS_EHCI is not set +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEVICEFS is not set +CONFIG_USB_DEVICE_CLASS=y +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_SUSPEND is not set +# CONFIG_USB_PERSIST is not set +# CONFIG_USB_OTG is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_OHCI_HCD=y +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=y +CONFIG_USB_PRINTER=y + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# may also be needed; see USB_STORAGE Help for more information +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set +# CONFIG_USB_MON is not set + +# +# USB port drivers +# + +# +# USB Serial Converter support +# +CONFIG_USB_SERIAL=y +# CONFIG_USB_SERIAL_CONSOLE is not set +CONFIG_USB_SERIAL_GENERIC=y +# CONFIG_USB_SERIAL_AIRCABLE is not set +# CONFIG_USB_SERIAL_AIRPRIME is not set +# CONFIG_USB_SERIAL_ARK3116 is not set +# CONFIG_USB_SERIAL_BELKIN is not set +# CONFIG_USB_SERIAL_CH341 is not set +# CONFIG_USB_SERIAL_WHITEHEAT is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +CONFIG_USB_SERIAL_CP2101=y +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set +# CONFIG_USB_SERIAL_EMPEG is not set +CONFIG_USB_SERIAL_FTDI_SIO=y +# CONFIG_USB_SERIAL_FUNSOFT is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_GARMIN is not set +# CONFIG_USB_SERIAL_IPW is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +# CONFIG_USB_SERIAL_KEYSPAN is not set +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_MOS7720 is not set +# CONFIG_USB_SERIAL_MOS7840 is not set +# CONFIG_USB_SERIAL_NAVMAN is not set +CONFIG_USB_SERIAL_PL2303=y +# CONFIG_USB_SERIAL_OTI6858 is not set +# CONFIG_USB_SERIAL_HP4X is not set +# CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set +# CONFIG_USB_SERIAL_TI is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OPTION is not set +# CONFIG_USB_SERIAL_OMNINET is not set +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_BERRY_CHARGE is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_PHIDGET is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set + +# +# USB DSL modem support +# + +# +# USB Gadget Support +# +CONFIG_USB_GADGET=m +# CONFIG_USB_GADGET_DEBUG_FILES is not set +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_JZ4740 is not set +# CONFIG_USB_GADGET_JZ4750 is not set +# CONFIG_USB_GADGET_JZ4750D is not set +# CONFIG_USB_GADGET_JZ4750L is not set +CONFIG_USB_GADGET_JZ4730=y +CONFIG_USB_JZ4730=m +# CONFIG_USB_GADGET_AMD5536UDC is not set +# CONFIG_USB_GADGET_ATMEL_USBA is not set +# CONFIG_USB_GADGET_FSL_USB2 is not set +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_PXA2XX is not set +# CONFIG_USB_GADGET_M66592 is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_S3C2410 is not set +# CONFIG_USB_GADGET_AT91 is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +# CONFIG_USB_GADGET_DUALSPEED is not set +# CONFIG_USB_ZERO is not set +# CONFIG_USB_ETH is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set +# CONFIG_USB_MIDI_GADGET is not set +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_UNSAFE_RESUME is not set + +# +# MMC/SD Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_BOUNCE=y +# CONFIG_SDIO_UART is not set + +# +# MMC/SD Host Controller Drivers +# +CONFIG_MMC_JZ=y +# CONFIG_JZ_MMC_BUS_1 is not set +CONFIG_JZ_MMC_BUS_4=y +# CONFIG_NEW_LEDS is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +# CONFIG_RTC_HCTOSYS is not set +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +# CONFIG_RTC_INTF_PROC is not set +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_X1205 is not set +CONFIG_RTC_DRV_PCF8563=y +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set + +# +# SPI RTC drivers +# + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# + +# +# Userspace I/O +# +# CONFIG_UIO is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +# CONFIG_EXT2_FS_POSIX_ACL is not set +# CONFIG_EXT2_FS_SECURITY is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +CONFIG_EXT3_FS_XATTR=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +# CONFIG_EXT4DEV_FS is not set +CONFIG_JBD=y +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +CONFIG_MINIX_FS=y +# CONFIG_ROMFS_FS is not set +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set +# CONFIG_JFFS2_SUMMARY is not set +# CONFIG_JFFS2_FS_XATTR is not set +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_LZO=y +CONFIG_JFFS2_RTIME=y +CONFIG_JFFS2_RUBIN=y +# CONFIG_JFFS2_CMODE_NONE is not set +CONFIG_JFFS2_CMODE_PRIORITY=y +# CONFIG_JFFS2_CMODE_SIZE is not set +# CONFIG_JFFS2_CMODE_FAVOURLZO is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NFSD is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +# CONFIG_SUNRPC_BIND34 is not set +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_SMB_FS=y +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_CIFS=y +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +CONFIG_BSD_DISKLABEL=y +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_EFI_PARTITION is not set +# CONFIG_SYSV68_PARTITION is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +CONFIG_NLS_CODEPAGE_936=y +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set +# CONFIG_DLM is not set + +# +# Yaffs2 Filesystems +# +CONFIG_YAFFS_FS=y +CONFIG_YAFFS_YAFFS1=y +# CONFIG_YAFFS_DOES_ECC is not set +CONFIG_YAFFS_YAFFS2=y +CONFIG_YAFFS_AUTO_YAFFS2=y +# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set +# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set +CONFIG_YAFFS_DISABLE_CHUNK_ERASED_CHECK=y +CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y +CONFIG_YAFFS_CHECKPOINT_RESERVED_BLOCKS=10 +CONFIG_INSTRUMENTATION=y +# CONFIG_PROFILING is not set +# CONFIG_MARKERS is not set + +# +# Kernel hacking +# +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +# CONFIG_PRINTK_TIME is not set +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_SAMPLES is not set +CONFIG_CMDLINE="" + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITY_FILE_CAPABILITIES is not set +CONFIG_CRYPTO=y +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_MANAGER=y +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +# CONFIG_CRYPTO_MD5 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_GF128MUL is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_CBC is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_XTS is not set +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_DES is not set +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_DEFLATE is not set +CONFIG_CRYPTO_MICHAEL_MIC=y +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_TEST is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_LZO is not set +CONFIG_CRYPTO_HW=y + +# +# Library routines +# +CONFIG_BITREVERSE=y +# CONFIG_CRC_CCITT is not set +# CONFIG_CRC16 is not set +# CONFIG_CRC_ITU_T is not set +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_PLIST=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y diff -pwurN linux-2.6.24.3-p2010/./drivers/char/jzchar/Kconfig linux-2.6.24.3-RV10/./drivers/char/jzchar/Kconfig --- linux-2.6.24.3-p2010/./drivers/char/jzchar/Kconfig 2010-07-05 06:41:51.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/char/jzchar/Kconfig 2010-07-04 10:37:30.000000000 +0200 @@ -50,9 +50,13 @@ config JZ_UDC_HOTPLUG tristate 'JZ UDC hotplug driver support' depends on JZCHAR + config JZ_MINIPC_MISC + tristate 'Minipc poweroff and power-button support (using PIC)' + depends on JZCHAR + config JZ_POWEROFF tristate 'JZ board poweroff support' - depends on JZCHAR + depends on JZCHAR && !JZ_MINIPC_MISC config JZ_OW tristate 'JZ One-wire bus support' diff -pwurN linux-2.6.24.3-p2010/./drivers/char/jzchar/Kconfig.orig linux-2.6.24.3-RV10/./drivers/char/jzchar/Kconfig.orig --- linux-2.6.24.3-p2010/./drivers/char/jzchar/Kconfig.orig 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./drivers/char/jzchar/Kconfig.orig 2010-07-04 08:53:16.000000000 +0200 @@ -0,0 +1,70 @@ +# +# JzSOC char devices configuration +# + +menu "JZSOC char device support" + depends on SOC_JZ4740 || SOC_JZ4730 || SOC_JZ4750 || SOC_JZ4750D + +config JZCHAR + tristate 'JzSOC char device support' + +config JZ_CAMERA_SENSOR + bool + +config JZ_CIM + tristate 'JzSOC Camera Interface Module (CIM) support' + depends on JZCHAR + select JZ_CAMERA_SENSOR + +config JZ_TPANEL_ATA2508 + tristate 'JzSOC MPEG4 TOUCH PANEL ATA2508 support' + depends on JZCHAR + +#config JZ_TPANEL +# tristate 'JzSOC touchpanel driver support' +# depends on JZCHAR +# select JZ_SADC if SOC_JZ4740 +# select JZ_TPANEL_AK4182 if SOC_JZ4730 + +choice + prompt "Touch Panel ADC type" + depends on JZ_TPANEL + default JZ_SADC if SOC_JZ4740 || SOC_JZ4750 || SOC_JZ4750D + default JZ_TPANEL_AK4182 if SOC_JZ4730 + +config JZ_SADC + bool 'Select the JZ47XX internal SADC' + +config JZ_TPANEL_AK4182 + bool 'Select the AK4182 codec' + +config JZ_TPANEL_UCB1400 + bool 'Select the UCB1400 codec' + +config JZ_TPANEL_WM9712 + bool 'Select the WM9712 codec' + +endchoice + +config JZ_UDC_HOTPLUG + tristate 'JZ UDC hotplug driver support' + depends on JZCHAR + +config JZ_POWEROFF + tristate 'JZ board poweroff support' + depends on JZCHAR + +config JZ_OW + tristate 'JZ One-wire bus support' + depends on JZCHAR + +config JZ_TCSM + tristate 'JZ TCSM support' + depends on JZCHAR + +config JZ_TSSI + tristate 'JZ MPEG2-TS interface support' + depends on JZCHAR && (SOC_JZ4750 || SOC_JZ4750D) + +endmenu + diff -pwurN linux-2.6.24.3-p2010/./drivers/char/jzchar/Kconfig.rej linux-2.6.24.3-RV10/./drivers/char/jzchar/Kconfig.rej --- linux-2.6.24.3-p2010/./drivers/char/jzchar/Kconfig.rej 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./drivers/char/jzchar/Kconfig.rej 2010-07-04 08:58:14.000000000 +0200 @@ -0,0 +1,25 @@ +*************** config JZ_UDC_HOTPLUG +*** 50,58 **** + tristate 'JZ UDC hotplug driver support' + depends on JZCHAR + + config JZ_POWEROFF + tristate 'JZ board poweroff support' +- depends on JZCHAR + + config JZ_OW + tristate 'JZ One-wire bus support' +--- 50,62 ---- + tristate 'JZ UDC hotplug driver support' + depends on JZCHAR + ++ config JZ_MINIPC_MISC ++ tristate 'Minipc poweroff and power-button support (using PIC)' ++ depends on JZCHAR ++ + config JZ_POWEROFF + tristate 'JZ board poweroff support' ++ depends on JZCHAR && !JZ_MINIPC_MISC + + config JZ_OW + tristate 'JZ One-wire bus support' diff -pwurN linux-2.6.24.3-p2010/./drivers/char/jzchar/Makefile linux-2.6.24.3-RV10/./drivers/char/jzchar/Makefile --- linux-2.6.24.3-p2010/./drivers/char/jzchar/Makefile 2010-07-05 06:41:51.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/char/jzchar/Makefile 2010-07-04 08:58:14.000000000 +0200 @@ -10,6 +10,7 @@ obj-$(CONFIG_JZ_CAMERA_SENSOR) += sensor obj-$(CONFIG_JZ_I2C_EEPROM) += eeprom.o obj-$(CONFIG_JZ_EJTAG) += ejtag.o obj-$(CONFIG_JZ_POWEROFF) += poweroff.o +obj-$(CONFIG_JZ_MINIPC_MISC) += minipc-misc.o #obj-$(CONFIG_JZ_TPANEL) += jz_ts.o obj-$(CONFIG_JZ_TPANEL_UCB1400) += ucb1400.o diff -pwurN linux-2.6.24.3-p2010/./drivers/char/jzchar/Makefile.orig linux-2.6.24.3-RV10/./drivers/char/jzchar/Makefile.orig --- linux-2.6.24.3-p2010/./drivers/char/jzchar/Makefile.orig 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./drivers/char/jzchar/Makefile.orig 2010-07-04 08:53:16.000000000 +0200 @@ -0,0 +1,24 @@ +# +# Makefile for jzchar +# +obj-$(CONFIG_JZCHAR) += jzchars.o + +obj-$(CONFIG_JZ_SCC) += scc.o +obj-$(CONFIG_JZ_CIM) += cim.o +obj-$(CONFIG_JZ_TPANEL_ATA2508) += ata2508.o +obj-$(CONFIG_JZ_CAMERA_SENSOR) += sensor.o +obj-$(CONFIG_JZ_I2C_EEPROM) += eeprom.o +obj-$(CONFIG_JZ_EJTAG) += ejtag.o +obj-$(CONFIG_JZ_POWEROFF) += poweroff.o + +#obj-$(CONFIG_JZ_TPANEL) += jz_ts.o +obj-$(CONFIG_JZ_TPANEL_UCB1400) += ucb1400.o +obj-$(CONFIG_JZ_TPANEL_WM9712) += wm9712.o +obj-$(CONFIG_JZ_TPANEL_AK4182) += ak4182.o +obj-$(CONFIG_JZ_SADC) += sadc.o + +obj-$(CONFIG_JZ_SMART_LCD) += slcd.o +obj-$(CONFIG_JZ_UDC_HOTPLUG) += udc_hotplug.o +obj-$(CONFIG_JZ_OW) += jz_ow.o +obj-$(CONFIG_JZ_TCSM) += tcsm.o +obj-$(CONFIG_JZ_TSSI) += jz_tssi.o diff -pwurN linux-2.6.24.3-p2010/./drivers/char/jzchar/minipc-misc.c linux-2.6.24.3-RV10/./drivers/char/jzchar/minipc-misc.c --- linux-2.6.24.3-p2010/./drivers/char/jzchar/minipc-misc.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./drivers/char/jzchar/minipc-misc.c 2010-07-04 10:42:57.000000000 +0200 @@ -0,0 +1,474 @@ +/* + * linux/drivers/char/jzchar/minipc-misc.c + * + * Power off handling. + * + * Copyright unknown + * + * 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. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include /* get the user-level API */ + +#include +#include +#include + +// should be included somewhere... + +#define MCU_QUERY_BAT _IOR('p', 0x11, unsigned long) /*query mcu-lpc915 of the baterry value*/ +#define SCHEDULE_POWEROFF _IOR('p', 0x12, unsigned long) /*edwin*/ + +extern void (*_machine_restart)(char *command); +extern void (*_machine_halt)(void); +extern void (*pm_power_off)(void); +#define _machine_power_off pm_power_off // renamed from 2.4 to 2.6 (?) + +#if 1 +#define MINIPC_CHAR_MAJOR 239 + +#define MINIPC_CHAR_POWER_SWITCH 0 + +const static char power_down_cmd[] = "powerdown"; +#define POWER_DOWN_CMD_LEN (sizeof(power_down_cmd)-1) + +static wait_queue_head_t wait_power_sw; + +static int power_off_pending = 0; +static void pic_shutdown (void); + +/*edwin for comunicate with the mcu for bat status*/ +#define MCU_DEV_ADDR (0x50>>1) +#define I2C_CLK 10000 +#define BAT_STAT_REG 0xDB +#define BAT_CHARGE_REG 0XD9 +static int get_battery_stat(unsigned char *data, unsigned char reg) +{ + int nr; + + i2c_open(); + + i2c_setclk(I2C_CLK); + nr = i2c_read(MCU_DEV_ADDR, data, reg, 1); + i2c_close(); + return nr; +} +/**/ +int mcu_exist(void) +{ + int nr; + unsigned char data; + + i2c_open(); + + i2c_setclk(I2C_CLK); + nr=i2c_read(MCU_DEV_ADDR, &data, BAT_CHARGE_REG, 1); + i2c_close(); + return nr; +} + +static int minipc_char_open(struct inode *inode, struct file *filp) +{ + unsigned char minor = MINOR(inode->i_cdev->dev); + filp->private_data = (void*)(unsigned long)minor; + return 0; +} + +static int minipc_char_release(struct inode *inode, struct file *filp) +{ + return 0; +} + +static int minipc_char_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) +{ + unsigned char data; + int usr_time; + time_t timeout; + if( cmd == MCU_QUERY_BAT) + { + if(get_battery_stat(&data, BAT_CHARGE_REG) >= 0){ + copy_to_user((char *)arg, &data, sizeof(data)); + return sizeof(data); + } + } + if(cmd == SCHEDULE_POWEROFF){ + copy_from_user(&usr_time, (int *)arg, sizeof(usr_time)); + if(usr_time<=0) + return -EINVAL; + timeout = usr_time*100;//(jiffies=usr_time*1000(ms)/10(ms)) + set_current_state(TASK_UNINTERRUPTIBLE); + printk("slepp %d jiffies before shutdown\n", (int) timeout); + schedule_timeout(timeout); + current->state = TASK_RUNNING; + pic_shutdown(); + } + return -EINVAL; +} + +static ssize_t minipc_char_read(struct file *filp, char *buf, size_t count, loff_t *ppos) +{ + unsigned char minor = (unsigned long)filp->private_data; + unsigned char data; + + if (MINIPC_CHAR_POWER_SWITCH == minor) + { + /* + int err = count; + while (1) + { + interruptible_sleep_on(&wait_power_sw); + + if (signal_pending(current)) + { + err = -EAGAIN; + break; + } + if (power_off_pending) + break; + schedule(); + } + return err; + */ + if(get_battery_stat(&data, BAT_STAT_REG) < 0) + return -EBUSY; + copy_to_user(buf, &data, sizeof(data)); + return sizeof(data); + + } + return -EINVAL; +} + +static ssize_t minipc_char_write(struct file *filp, const char *buf, size_t count, loff_t *ppos) +{ + unsigned char minor = (unsigned long)filp->private_data; + + if (MINIPC_CHAR_POWER_SWITCH == minor && count) + { + unsigned char tmp[POWER_DOWN_CMD_LEN]; + + if (count >= POWER_DOWN_CMD_LEN)// && copy_from_user(tmp, buf, POWER_DOWN_CMD_LEN)) + { + copy_from_user(tmp, buf, POWER_DOWN_CMD_LEN);//edwin + if (0 == memcmp (tmp, power_down_cmd, POWER_DOWN_CMD_LEN)) + { + pic_shutdown(); + } + } + return -EINVAL; + } + return 0; +} + +static unsigned int minipc_char_poll(struct file* filp, poll_table* wait) +{ + unsigned char minor = (unsigned long)filp->private_data; + + if (MINIPC_CHAR_POWER_SWITCH == minor) + { + poll_wait(filp, &wait_power_sw, wait); + return 0; + } + return -EINVAL; +} + +static struct file_operations minipc_char_fops = { + open: minipc_char_open, + read: minipc_char_read, + write: minipc_char_write, + ioctl: minipc_char_ioctl, + release:minipc_char_release, + poll: minipc_char_poll, +}; + +#define PIC_GPIO (65) //wjx 2007.12.10 89 -> 65 +#define PIC_IRQ (IRQ_GPIO_0 + PIC_GPIO) + +#define LPC915 1 +#ifdef LPC915 //edwin +#define SHUTDOWN_REG 0xD8 +static void pic_shutdown (void) +{ + int nr; + unsigned char data = 1; + printk("pic_shutdown\n"); +#if 0 + while(i2c_open()== 0) + break; +#else + i2c_open(); //wjx +#endif + i2c_setclk(I2C_CLK); + nr = i2c_write(MCU_DEV_ADDR, &data, SHUTDOWN_REG, 1); + i2c_close(); +} +#else +static void pic_shutdown (void) +{ + unsigned long flags; + + printk ("MiniPC Power Off!\n"); + mdelay (200); + local_irq_save(flags); + __gpio_as_output(PIC_GPIO); + __gpio_clear_pin(PIC_GPIO); + mdelay(200); + __gpio_set_pin(PIC_GPIO); + mdelay(50); + __gpio_as_input(PIC_GPIO); + local_irq_restore(flags); +} +#endif + +static irqreturn_t pic_irq(int irq, void *dev_id) +{ + power_off_pending ++; + wake_up_interruptible (&wait_power_sw); + msleep(500); + return IRQ_HANDLED; +} + +static int power_down_read_proc (char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + int len = 0; + + len += sprintf (page+len, "Write me '%s' to power down.\n", power_down_cmd); + return len; +} + +static int power_down_write_proc(struct file *file, const char *buffer, unsigned long count, void *data) +{ + if (count >= POWER_DOWN_CMD_LEN) + { + if (0 == memcmp (power_down_cmd, buffer, POWER_DOWN_CMD_LEN)) + pic_shutdown (); + } + return count; +} + +static struct proc_dir_entry *proc_powerdown; + +static void (*_old_machine_power_off)(void); + +static int __init pic_init(void) +{ + int retval; + + __gpio_as_irq(PIC_GPIO, 2); //falling-edge + + init_waitqueue_head(&wait_power_sw); + + proc_powerdown = create_proc_entry("powerdown", 0644, NULL); + if (proc_powerdown) { + proc_powerdown->read_proc = power_down_read_proc; + proc_powerdown->write_proc = power_down_write_proc; + proc_powerdown->data = NULL; + } + + register_chrdev(MINIPC_CHAR_MAJOR, "MiniPC", &minipc_char_fops); + + // retval = request_irq (PIC_IRQ, pic_irq, 0, "Power switch", NULL); + retval=0; + if (retval) + printk ("Cannot get Power SW irq %d\n", retval); + else + { + _old_machine_power_off = _machine_power_off; + _machine_power_off = pic_shutdown; + } + printk ("MiniPC Power button initialized.\n"); + return retval; +} + +static void __exit pic_exit(void) +{ + free_irq(PIC_IRQ, NULL); + if (proc_powerdown) + remove_proc_entry("powerdown", NULL); + if (_old_machine_power_off) + _machine_power_off = _old_machine_power_off; + + unregister_chrdev(MINIPC_CHAR_MAJOR, "MiniPC"); +} + + +module_init(pic_init); +module_exit(pic_exit); + +#else + +// this is all disabled up to EOF +// I think we can remove it to cleanup the code + +#define PIC_DEVADDR (0x31) + +extern void i2c_open(void); +extern void i2c_close(void); +extern int i2c_read(unsigned char device, unsigned char *buf, + unsigned char address, int count); +extern int i2c_write(unsigned char device, unsigned char *buf, + unsigned char address, int count); + +extern int i2c_read_na(unsigned char device, unsigned char *buf, int count); +extern int i2c_write_na(unsigned char device, unsigned char *buf, int count); +extern void i2c_setclk(unsigned int i2cclk); + + +#define I2C_FRAME_LEN 2 + + +static unsigned char i2c_recv[I2C_FRAME_LEN]; +static unsigned long recv_tick; + +static unsigned char i2c_send[I2C_FRAME_LEN]; + + +static void read_pic(void) +{ + int nr; + unsigned char buff[I2C_FRAME_LEN]; + + i2c_open (); + //wjx i2c_setclk(1000); + nr = i2c_read_na (PIC_DEVADDR, buff, I2C_FRAME_LEN); + i2c_close(); + + if (nr == I2C_FRAME_LEN) + { + memcpy (i2c_recv, buff, I2C_FRAME_LEN); + recv_tick = jiffies; + } +} + +static void write_pic(void) +{ + int nr; + + i2c_open(); + //wjx i2c_setclk(1000); + nr = i2c_write_na(PIC_DEVADDR, i2c_send, I2C_FRAME_LEN); + i2c_close(); +} + +/* RTC */ +extern spinlock_t rtc_lock; +static int rtc_status = 0; +static unsigned int epoch = 1900; + +static void get_rtc_time(struct rtc_time* rtc_tm) +{ + +} + +static int set_rtc_time(struct rtc_time* rtc_tm) +{ + return 0; +} + +static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) +{ + struct rtc_time wtime, rtc_tm; + + switch (cmd) + { + case RTC_RD_TIME: + get_rtc_time(&wtime); + break; + case RTC_SET_TIME: + if (!capable(CAP_SYS_TIME)) + return -EACCES; + if (copy_from_user(&rtc_tm, (struct rtc_time*)arg, sizeof(struct rtc_time))) + return -EFAULT; + return set_rtc_time(&rtc_tm); + case RTC_EPOCH_READ: + return put_user(epoch, (unsigned long*)arg); + case RTC_EPOCH_SET: + if (arg < 1900) + return -EINVAL; + if (!capable(CAP_SYS_TIME)) + return -EACCES; + epoch = arg; + return 0; + case RTC_ALM_READ: + case RTC_ALM_SET: + default: + return -EINVAL; + } + + return copy_to_user((void*)arg, &wtime, sizeof(wtime))?-EFAULT:0; +} + + +static int rtc_open(struct inode *inode, struct file *file) +{ + spin_lock_irq(&rtc_lock); + + if(rtc_status) + goto out_busy; + + rtc_status = 1; + + spin_unlock_irq (&rtc_lock); + return 0; + +out_busy: + return -EBUSY; +} + +static int rtc_release(struct inode *inode, struct file *file) +{ + return 0; +} + +static struct file_operations rtc_fops = { + owner: THIS_MODULE, + llseek: no_llseek, + ioctl: rtc_ioctl, + open: rtc_open, + release: rtc_release, +}; + +#define RTC_MINOR 135 +static struct miscdevice rtc_dev = { + RTC_MINOR, + "rtc", + &rtc_fops, +}; + + +static int __init pic_init(void) +{ + int r; + + r = misc_register(&rtc_dev); + + return 0; +} + +static void __exit pic_exit(void) +{ + misc_deregister(&rtc_dev); +} + + +module_init(pic_init); +module_exit(pic_exit); +#endif diff -pwurN linux-2.6.24.3-p2010/./drivers/input/keyboard/jz_keypad.c linux-2.6.24.3-RV10/./drivers/input/keyboard/jz_keypad.c --- linux-2.6.24.3-p2010/./drivers/input/keyboard/jz_keypad.c 2010-07-05 06:41:51.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/input/keyboard/jz_keypad.c 2010-07-04 09:52:46.000000000 +0200 @@ -27,16 +27,58 @@ #include #include #include -#include #include #include + +// #define DEBUG + +#ifdef CONFIG_JZ4730_MINIPC + +#define CAPSLOCKLED 27 //wjx 2007.12.10 +#define NUMLOCKLED 86 + +static int capslock_flag = 0; // wjx +static int numlock_flag = 0; + +#define KB_ROWS 8 +#define KB_COLS 17 + +#define SCAN_INTERVAL (2) + +static unsigned short col[KB_COLS] = {96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 125}; +static unsigned short row[KB_ROWS] = {0, 1, 2, 3, 4, 5, 6, 7}; +static unsigned short s0[KB_COLS]; +static unsigned short s1[KB_COLS] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; + +static unsigned int jz_kbd_keycode[KB_COLS][KB_ROWS] = { +/* 0*/ {KEY_PAUSE, 0, 0, 0, 0, 0, KEY_LEFTCTRL, KEY_F5,}, +/* 1*/ {KEY_Q, KEY_TAB, KEY_A, KEY_ESC, KEY_Z, 0, KEY_GRAVE, KEY_1,}, +/* 2*/ {KEY_W, KEY_CAPSLOCK, KEY_S, KEY_102ND, KEY_X, 0, 0, KEY_2,},//CZJ delet the KEY_BACKSLASH +/* 3*/ {KEY_E, KEY_F3, KEY_D, KEY_F4, KEY_C, 0, 0, KEY_3,}, +/* 4*/ {KEY_R, KEY_T, KEY_F, KEY_G, KEY_V, KEY_B, KEY_5, KEY_4,}, +/* 5*/ {KEY_U, KEY_Y, KEY_J, KEY_H, KEY_M, KEY_N, KEY_6, KEY_7,}, +/* 6*/ {KEY_I, KEY_RIGHTBRACE, KEY_K, KEY_F6, KEY_COMMA, 0, KEY_EQUAL, KEY_8,}, +/* 7*/ {KEY_O, KEY_F7, KEY_L, 0, KEY_DOT, KEY_F19, KEY_F8, KEY_9,}, +/* 8*/ {0, 0, 0, KEY_SPACE, KEY_NUMLOCK, 0, KEY_DELETE, 0,}, +/* 9*/ {0, KEY_BACKSPACE, 0, 0, KEY_ENTER, 0, KEY_F9, 0,}, +/*10*/ {0, 0, 0, KEY_LEFTALT, 0, 0, 0, KEY_SYSRQ,}, +/*11*/ {KEY_P, KEY_LEFTBRACE, KEY_SEMICOLON, KEY_APOSTROPHE, KEY_BACKSLASH, KEY_SLASH, KEY_MINUS, KEY_0,}, +/*12*/ {KEY_KP0, KEY_F20, KEY_KP1, KEY_KP2, KEY_KP3, KEY_KP4, KEY_KP5, KEY_F10,}, //CZJ ADD NUM PACK +/*13*/ {KEY_KP6, KEY_KP7, KEY_KP8, KEY_KP9, KEY_KPPLUS, KEY_KPMINUS, KEY_F2, KEY_KPSLASH,}, //CZJ ADD NUM PACK +/*14*/ {KEY_KPDOT, KEY_KPASTERISK, 0, 0, 0, 0, KEY_INSERT, 0,}, //CZJ ADD NUM PACK +/*15*/ {0, 0, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, 0, 0,}, +/*16*/ {0, KEY_LEFTSHIFT, KEY_RIGHTSHIFT, 0, 0, 0, KEY_F1, KEY_FN} +}; + +#else + #define KB_ROWS 3 #define KB_COLS 3 -#define SCAN_INTERVAL (10) +#define SCAN_INTERVAL (5) static unsigned short col[KB_COLS] = {85,87,91}; static unsigned short row[KB_ROWS] = {60,61,62}; @@ -49,6 +91,9 @@ static const unsigned int jz_kbd_keycode KEY_2, KEY_5, 0, KEY_3, KEY_6, 0, }; +#endif + +#define NO_ROW ((1<<(KB_ROWS-1))-1) struct jz_kbd { unsigned int keycode[ARRAY_SIZE(jz_kbd_keycode)]; @@ -64,149 +109,219 @@ struct jz_kbd { static struct jz_kbd g_jz_kbd; +// NOTE: a better (but slower) interface would be to pass in a keycode and search the keycode table for the col/row to check +// i.e. jz_kbd_get_key_status(KEY_FN) +// we could speed up by building a reverse mapping table on the first call + +int jz_kbd_get_col(int col) +{ // provide key status of given column + if(col < 0 || col >= KB_COLS) + return 0; + return s0[col]; +} + +EXPORT_SYMBOL(jz_kbd_get_col); + static inline void jz_scan_kbd(unsigned short *s) { int i; + int row_cnt; if (!s) return; for (i = 0; i < KB_COLS; i++) { - - __gpio_as_input(85); /* row */ - __gpio_as_input(87); /* row */ - __gpio_as_input(91); /* row */ - - __gpio_as_input(60); /* col */ - __gpio_as_input(61); /* col */ - __gpio_as_input(62); /* col */ - +#if 0 + for (row_cnt=0; row_cntsuspended) return; - spin_lock_irqsave(&kbd_data->lock, flags); +// spin_lock_irqsave(&kbd_data->lock, flags); num_pressed = 0; jz_scan_kbd(s0); - /* look for key if pressed down on not, col & row */ - if (s0[0] == 7 && s0[1] == 7 && s0[2] == 7) { - if (s1[0] != 7 || s1[1] != 7 || s1[2] != 7) { - /* up */ - input_report_key(kbd_data->input, kbd_data->keycode[prerow * KB_COLS + precol], 0); - input_sync(kbd_data->input); - } - precol = prerow = -1; - s1[0] = s1[1] = s1[2] = 7; - spin_unlock_irqrestore(&kbd_data->lock, flags); - return; + /* we now have the new state in s0[KB_COLS] and the previous + * state in s1[KB_COLS] + * each bit in *(unsigned short)s0 represents one row + * if a bit is 0 then the key was pressed, 1 if released + * so first compare s0[] with s1[], if different a key was pressed + * or released, then find the corresponding changed bit and report + * the correspong key as pressed or released + * e.g. a 0 of bit 4 in s0[3] and 1 in the same bit of s1[3] means that + * the hey in col #4 and row #5 has been pressed which equals + * keycode = jz_kbd_keycode[4 * 5] + */ + for (col_cnt=0; col_cntlock, flags); - return; -find_row_col: - if (s1[0] == 7 && s1[1] == 7 && s1[2] == 7) { - /* down */ - input_report_key(kbd_data->input, kbd_data->keycode[row * KB_COLS + col], 1); - input_sync(kbd_data->input); - s1[0] = s0[0]; - s1[1] = s0[1]; - s1[2] = s0[2]; - - precol = col; - prerow = row; - spin_unlock_irqrestore(&kbd_data->lock, flags); - return; +#endif } - if (s1[0] != 7 || s1[1] != 7 || s1[2] != 7) { - /* is the same as the preview key */ - if (s0[0] == s1[0] && s0[1] == s1[1] && s0[2] == s1[2]) { - input_report_key(kbd_data->input, kbd_data->keycode[row * KB_COLS + col], 1); - input_sync(kbd_data->input); - s1[0] = s0[0]; - s1[1] = s0[1]; - s1[2] = s0[2]; - - precol = col; - prerow = row; - spin_unlock_irqrestore(&kbd_data->lock, flags); - return; - } else { - /* the preview key is up and other key is down */ - if (s0[0] != s1[0] || s0[1] != s1[1] || s0[2] != s1[2]) { - input_report_key(kbd_data->input, kbd_data->keycode[prerow * KB_COLS + precol], 0); - input_sync(kbd_data->input); - input_report_key(kbd_data->input, kbd_data->keycode[row * KB_COLS + col], 1); - input_sync(kbd_data->input); - s1[0] = s0[0]; - s1[1] = s0[1]; - s1[2] = s0[2]; - precol = col; - prerow = row; - spin_unlock_irqrestore(&kbd_data->lock, flags); - return; } + s1[col_cnt] = s0[col_cnt]; } +#ifdef DEBUG + printk (KERN_ERR "%02x ", s0[i]); +#endif } +#ifdef DEBUG + printk (KERN_ERR "\n"); +#endif +// spin_unlock_irqrestore(&kbd_data->lock, flags); } static void jz_kbd_timer_callback(unsigned long data) { jz_kbd_scankeyboard(&g_jz_kbd); + // here we can make LEDs blink mod_timer(&g_jz_kbd.timer, jiffies + SCAN_INTERVAL); } @@ -233,14 +348,24 @@ static int jz_kbd_resume(struct platform #define jz_kbd_resume NULL #endif -static int __init jz_kbd_probe(struct platform_device *dev) +static int __devinit jz_kbd_probe(struct platform_device *dev) { struct input_dev *input_dev; - int i, error; + int error, col_cnt, row_cnt; + +#ifdef DEBUG + printk(KERN_ERR "jz_keypad: probe() called\n"); +#endif input_dev = input_allocate_device(); - if (!input_dev) + if (!input_dev) { + printk(KERN_ERR "jz_keypad: could not allocate input device\n"); return -ENOMEM; + } +#ifdef DEBUG + else + printk(KERN_ERR "jz_keypad: allocated input device\n"); +#endif platform_set_drvdata(dev, &g_jz_kbd); @@ -262,25 +387,42 @@ static int __init jz_kbd_probe(struct pl input_dev->id.version = 0x0100; input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_SYN); - input_dev->keycode = g_jz_kbd.keycode; /* keycode array address */ + input_dev->keycode = jz_kbd_keycode /*g_jz_kbd.keycode*/; /* keycode array address */ input_dev->keycodesize = sizeof(unsigned int); - input_dev->keycodemax = ARRAY_SIZE(jz_kbd_keycode); + input_dev->keycodemax = KB_ROWS * KB_COLS /*ARRAY_SIZE(jz_kbd_keycode)*/; - memcpy(g_jz_kbd.keycode, jz_kbd_keycode, sizeof(g_jz_kbd.keycode)); + // memcpy(g_jz_kbd.keycode, jz_kbd_keycode, sizeof(g_jz_kbd.keycode)); - for (i = 0; i < ARRAY_SIZE(jz_kbd_keycode); i++) - set_bit(g_jz_kbd.keycode[i], input_dev->keybit); +// for (i = 0; i < ARRAY_SIZE(jz_kbd_keycode); i++) +// set_bit(g_jz_kbd.keycode[i], input_dev->keybit); - //clear_bit(0, input_dev->keybit); + for (col_cnt = 0; col_cnt < KB_COLS; col_cnt++) + for (row_cnt = 0; row_cnt < KB_ROWS; row_cnt++) + set_bit(jz_kbd_keycode[col_cnt][row_cnt], input_dev->keybit); - __gpio_as_input(85); - __gpio_as_input(87); - __gpio_as_input(91); + clear_bit(0, input_dev->keybit); -#if 0 - __gpio_as_input(60); - __gpio_as_input(61); - __gpio_as_input(62); + for (row_cnt=0; row_cntdev, 1); +#ifdef DEBUG + printk(KERN_ERR "jz_keypad: timer setup, probe done\n"); +#endif return 0; } -static int jz_kbd_remove(struct platform_device *dev) +static int __devexit jz_kbd_remove(struct platform_device *dev) { struct jz_kbd *jz_kbd = platform_get_drvdata(dev); + int row_cnt, col_cnt; del_timer_sync(&jz_kbd->timer); +#if 0 __gpio_as_input(85); __gpio_as_input(87); __gpio_as_input(91); @@ -313,20 +454,25 @@ static int jz_kbd_remove(struct platform __gpio_as_input(60); __gpio_as_input(61); __gpio_as_input(62); - +#else + for (row_cnt=0; row_cntinput); return 0; } -static struct platform_driver jz_kbd_driver = { +struct platform_driver jz_kbd_driver = { .probe = jz_kbd_probe, - .remove = jz_kbd_remove, + .remove = __devexit_p(jz_kbd_remove), .suspend = jz_kbd_suspend, .resume = jz_kbd_resume, .driver = { .name = "jz-keypad", - }, + } }; /* @@ -335,12 +481,28 @@ static struct platform_driver jz_kbd_dri static struct platform_device jzkbd_device = { .name = "jz-keypad", .id = -1, + .num_resources = 0, }; static int __init jz_kbd_init(void) { +int err=0; + +#ifdef DEBUG + printk(KERN_ERR "jz_keypad: registering\n"); +#endif platform_device_register(&jzkbd_device); - return platform_driver_register(&jz_kbd_driver); + err = platform_driver_register(&jz_kbd_driver); + + if (err) { + printk(KERN_ERR "jz_keypad: platform_driver_register() failed\n\n"); + } +#ifdef DEBUG + else + printk(KERN_ERR "jz_keypad: registered\n"); +#endif + + return err; } static void __exit jz_kbd_exit(void) diff -pwurN linux-2.6.24.3-p2010/./drivers/input/keyboard/jz_keypad.c.orig linux-2.6.24.3-RV10/./drivers/input/keyboard/jz_keypad.c.orig --- linux-2.6.24.3-p2010/./drivers/input/keyboard/jz_keypad.c.orig 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./drivers/input/keyboard/jz_keypad.c.orig 2010-07-04 09:22:27.000000000 +0200 @@ -0,0 +1,519 @@ +/* + * linux/drivers/input/keyboard/jz_keypad.c + * + * JZ Keypad Driver + * + * Copyright (c) 2005 - 2008 Ingenic Semiconductor Inc. + * + * Author: Richard + * + * 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 +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + + +// #define DEBUG + +#ifdef CONFIG_JZ4730_MINIPC + +#define CAPSLOCKLED 27 //wjx 2007.12.10 +#define NUMLOCKLED 86 + +static int capslock_flag = 0; // wjx +static int numlock_flag = 0; + +#define KB_ROWS 8 +#define KB_COLS 17 + +#define SCAN_INTERVAL (2) + +static unsigned short col[KB_COLS] = {96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 125}; +static unsigned short row[KB_ROWS] = {0, 1, 2, 3, 4, 5, 6, 7}; +static unsigned short s0[KB_COLS]; +static unsigned short s1[KB_COLS] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; + +static unsigned int jz_kbd_keycode[KB_COLS][KB_ROWS] = { +/* 0*/ {KEY_PAUSE, 0, 0, 0, 0, 0, KEY_LEFTCTRL, KEY_F5,}, +/* 1*/ {KEY_Q, KEY_TAB, KEY_A, KEY_ESC, KEY_Z, 0, KEY_GRAVE, KEY_1,}, +/* 2*/ {KEY_W, KEY_CAPSLOCK, KEY_S, KEY_102ND, KEY_X, 0, 0, KEY_2,},//CZJ delet the KEY_BACKSLASH +/* 3*/ {KEY_E, KEY_F3, KEY_D, KEY_F4, KEY_C, 0, 0, KEY_3,}, +/* 4*/ {KEY_R, KEY_T, KEY_F, KEY_G, KEY_V, KEY_B, KEY_5, KEY_4,}, +/* 5*/ {KEY_U, KEY_Y, KEY_J, KEY_H, KEY_M, KEY_N, KEY_6, KEY_7,}, +/* 6*/ {KEY_I, KEY_RIGHTBRACE, KEY_K, KEY_F6, KEY_COMMA, 0, KEY_EQUAL, KEY_8,}, +/* 7*/ {KEY_O, KEY_F7, KEY_L, 0, KEY_DOT, KEY_F19, KEY_F8, KEY_9,}, +/* 8*/ {0, 0, 0, KEY_SPACE, KEY_NUMLOCK, 0, KEY_DELETE, 0,}, +/* 9*/ {0, KEY_BACKSPACE, 0, 0, KEY_ENTER, 0, KEY_F9, 0,}, +/*10*/ {0, 0, 0, KEY_LEFTALT, 0, 0, 0, KEY_SYSRQ,}, +/*11*/ {KEY_P, KEY_LEFTBRACE, KEY_SEMICOLON, KEY_APOSTROPHE, KEY_BACKSLASH, KEY_SLASH, KEY_MINUS, KEY_0,}, +/*12*/ {KEY_KP0, KEY_F20, KEY_KP1, KEY_KP2, KEY_KP3, KEY_KP4, KEY_KP5, KEY_F10,}, //CZJ ADD NUM PACK +/*13*/ {KEY_KP6, KEY_KP7, KEY_KP8, KEY_KP9, KEY_KPPLUS, KEY_KPMINUS, KEY_F2, KEY_KPSLASH,}, //CZJ ADD NUM PACK +/*14*/ {KEY_KPDOT, KEY_KPASTERISK, 0, 0, 0, 0, KEY_INSERT, 0,}, //CZJ ADD NUM PACK +/*15*/ {0, 0, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, 0, 0,}, +/*16*/ {0, KEY_LEFTSHIFT, KEY_RIGHTSHIFT, 0, 0, 0, KEY_F1, KEY_FN} +}; + +#else + +#define KB_ROWS 3 +#define KB_COLS 3 + +#define SCAN_INTERVAL (5) + +static unsigned short col[KB_COLS] = {85,87,91}; +static unsigned short row[KB_ROWS] = {60,61,62}; +static unsigned short s0[KB_COLS]; +static unsigned short s1[KB_COLS]={7,7,7}; +static unsigned short precol,prerow; + +static const unsigned int jz_kbd_keycode[KB_COLS * KB_ROWS] = { + KEY_1, KEY_4, KEY_7, + KEY_2, KEY_5, 0, + KEY_3, KEY_6, 0, +}; +#endif + +#define NO_ROW ((1<<(KB_ROWS-1))-1) + +struct jz_kbd { + unsigned int keycode[ARRAY_SIZE(jz_kbd_keycode)]; + struct input_dev *input; + char phys[32]; + + spinlock_t lock; + struct timer_list timer; + + unsigned int suspended; + unsigned long suspend_jiffies; +}; + +static struct jz_kbd g_jz_kbd; + +// NOTE: a better (but slower) interface would be to pass in a keycode and search the keycode table for the col/row to check +// i.e. jz_kbd_get_key_status(KEY_FN) +// we could speed up by building a reverse mapping table on the first call + +int jz_kbd_get_col(int col) +{ // provide key status of given column + if(col < 0 || col >= KB_COLS) + return 0; + return s0[col]; +} + +EXPORT_SYMBOL(jz_kbd_get_col); + +static inline void jz_scan_kbd(unsigned short *s) +{ + int i; + int row_cnt; + + if (!s) + return; + + for (i = 0; i < KB_COLS; i++) { +#if 0 + for (row_cnt=0; row_cntsuspended) + return; + +// spin_lock_irqsave(&kbd_data->lock, flags); + + num_pressed = 0; + jz_scan_kbd(s0); + + /* we now have the new state in s0[KB_COLS] and the previous + * state in s1[KB_COLS] + * each bit in *(unsigned short)s0 represents one row + * if a bit is 0 then the key was pressed, 1 if released + * so first compare s0[] with s1[], if different a key was pressed + * or released, then find the corresponding changed bit and report + * the correspong key as pressed or released + * e.g. a 0 of bit 4 in s0[3] and 1 in the same bit of s1[3] means that + * the hey in col #4 and row #5 has been pressed which equals + * keycode = jz_kbd_keycode[4 * 5] + */ + for (col_cnt=0; col_cntlock, flags); +} + +static void jz_kbd_timer_callback(unsigned long data) +{ + jz_kbd_scankeyboard(&g_jz_kbd); + // here we can make LEDs blink + mod_timer(&g_jz_kbd.timer, jiffies + SCAN_INTERVAL); +} + +#ifdef CONFIG_PM +static int jz_kbd_suspend(struct platform_device *dev, pm_message_t state) +{ + struct jz_kbd *jz_kbd = platform_get_drvdata(dev); + jz_kbd->suspended = 1; + + return 0; +} + +static int jz_kbd_resume(struct platform_device *dev) +{ + struct jz_kbd *jz_kbd = platform_get_drvdata(dev); + + jz_kbd->suspend_jiffies = jiffies; + jz_kbd->suspended = 0; + + return 0; +} +#else +#define jz_kbd_suspend NULL +#define jz_kbd_resume NULL +#endif + +static int __devinit jz_kbd_probe(struct platform_device *dev) +{ + struct input_dev *input_dev; + int error, col_cnt, row_cnt; + +#ifdef DEBUG + printk(KERN_ERR "jz_keypad: probe() called\n"); +#endif + + input_dev = input_allocate_device(); + if (!input_dev) { + printk(KERN_ERR "jz_keypad: could not allocate input device\n"); + return -ENOMEM; + } +#ifdef DEBUG + else + printk(KERN_ERR "jz_keypad: allocated input device\n"); +#endif + + platform_set_drvdata(dev, &g_jz_kbd); + + strcpy(g_jz_kbd.phys, "input/kbd0"); + + spin_lock_init(&g_jz_kbd.lock); + + g_jz_kbd.suspend_jiffies = jiffies; + g_jz_kbd.input = input_dev; + + input_dev->private = &g_jz_kbd; + input_dev->name = "JZ Keypad"; + input_dev->phys = g_jz_kbd.phys; + input_dev->cdev.dev = &dev->dev; + + input_dev->id.bustype = BUS_PARPORT; + input_dev->id.vendor = 0x0001; + input_dev->id.product = 0x0001; + input_dev->id.version = 0x0100; + + input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_SYN); + input_dev->keycode = jz_kbd_keycode /*g_jz_kbd.keycode*/; /* keycode array address */ + input_dev->keycodesize = sizeof(unsigned int); + input_dev->keycodemax = KB_ROWS * KB_COLS /*ARRAY_SIZE(jz_kbd_keycode)*/; + + // memcpy(g_jz_kbd.keycode, jz_kbd_keycode, sizeof(g_jz_kbd.keycode)); + +// for (i = 0; i < ARRAY_SIZE(jz_kbd_keycode); i++) +// set_bit(g_jz_kbd.keycode[i], input_dev->keybit); + + for (col_cnt = 0; col_cnt < KB_COLS; col_cnt++) + for (row_cnt = 0; row_cnt < KB_ROWS; row_cnt++) + set_bit(jz_kbd_keycode[col_cnt][row_cnt], input_dev->keybit); + + clear_bit(0, input_dev->keybit); + + for (row_cnt=0; row_cntdev, 1); +#ifdef DEBUG + printk(KERN_ERR "jz_keypad: timer setup, probe done\n"); +#endif + return 0; +} + +static int __devexit jz_kbd_remove(struct platform_device *dev) +{ + struct jz_kbd *jz_kbd = platform_get_drvdata(dev); + int row_cnt, col_cnt; + + del_timer_sync(&jz_kbd->timer); + +#if 0 + __gpio_as_input(85); + __gpio_as_input(87); + __gpio_as_input(91); + + /* These pins is conficting with cs8900a's CS RD WE pins on JZ4740-PAVO board */ + __gpio_as_input(60); + __gpio_as_input(61); + __gpio_as_input(62); +#else + for (row_cnt=0; row_cntinput); + + return 0; +} + +struct platform_driver jz_kbd_driver = { + .probe = jz_kbd_probe, + .remove = __devexit_p(jz_kbd_remove), + .suspend = jz_kbd_suspend, + .resume = jz_kbd_resume, + .driver = { + .name = "jz-keypad", + } +}; + +/* + * Jz Keyboard Device + */ +static struct platform_device jzkbd_device = { + .name = "jz-keypad", + .id = -1, + .num_resources = 0, +}; + +static int __init jz_kbd_init(void) +{ +int err=0; + +#ifdef DEBUG + printk(KERN_ERR "jz_keypad: registering\n"); +#endif + platform_device_register(&jzkbd_device); + err = platform_driver_register(&jz_kbd_driver); + + if (err) { + printk(KERN_ERR "jz_keypad: platform_driver_register() failed\n\n"); + } +#ifdef DEBUG + else + printk(KERN_ERR "jz_keypad: registered\n"); +#endif + + return err; +} + +static void __exit jz_kbd_exit(void) +{ + platform_device_unregister(&jzkbd_device); + platform_driver_unregister(&jz_kbd_driver); +} + +module_init(jz_kbd_init); +module_exit(jz_kbd_exit); + +MODULE_AUTHOR("Richard"); +MODULE_DESCRIPTION("JZ keypad driver"); +MODULE_LICENSE("GPL"); diff -pwurN linux-2.6.24.3-p2010/./drivers/input/keyboard/jz_keypad.c.rej linux-2.6.24.3-RV10/./drivers/input/keyboard/jz_keypad.c.rej --- linux-2.6.24.3-p2010/./drivers/input/keyboard/jz_keypad.c.rej 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./drivers/input/keyboard/jz_keypad.c.rej 2010-07-04 08:54:28.000000000 +0200 @@ -0,0 +1,92 @@ +*************** static int jz_kbd_remove(struct platform +*** 313,346 **** + __gpio_as_input(60); + __gpio_as_input(61); + __gpio_as_input(62); +- + input_unregister_device(jz_kbd->input); + + return 0; + } + +- static struct platform_driver jz_kbd_driver = { + .probe = jz_kbd_probe, +- .remove = jz_kbd_remove, + .suspend = jz_kbd_suspend, + .resume = jz_kbd_resume, + .driver = { + .name = "jz-keypad", +- }, + }; + + /* + * Jz Keyboard Device + */ + static struct platform_device jzkbd_device = { +- .name = "jz-keyboard", + .id = -1, + }; + + static int __init jz_kbd_init(void) + { + platform_device_register(&jzkbd_device); +- return platform_driver_register(&jz_kbd_driver); + } + + static void __exit jz_kbd_exit(void) +--- 325,379 ---- + __gpio_as_input(60); + __gpio_as_input(61); + __gpio_as_input(62); ++ #else ++ for (row_cnt=0; row_cntinput); + + return 0; + } + ++ struct platform_driver jz_kbd_driver = { + .probe = jz_kbd_probe, ++ .remove = __devexit_p(jz_kbd_remove), + .suspend = jz_kbd_suspend, + .resume = jz_kbd_resume, + .driver = { + .name = "jz-keypad", ++ } + }; + + /* + * Jz Keyboard Device + */ + static struct platform_device jzkbd_device = { ++ .name = "jz-keypad", + .id = -1, ++ .num_resources = 0, + }; + + static int __init jz_kbd_init(void) + { ++ int err=0; ++ ++ #ifdef DEBUG ++ printk(KERN_ERR "jz_keypad: registering\n"); ++ #endif + platform_device_register(&jzkbd_device); ++ err = platform_driver_register(&jz_kbd_driver); ++ ++ if (err) { ++ printk(KERN_ERR "jz_keypad: platform_driver_register() failed\n\n"); ++ } ++ #ifdef DEBUG ++ else ++ printk(KERN_ERR "jz_keypad: registered\n"); ++ #endif ++ ++ return err; + } + + static void __exit jz_kbd_exit(void) diff -pwurN linux-2.6.24.3-p2010/./drivers/input/mouse/gpio_mouse.c linux-2.6.24.3-RV10/./drivers/input/mouse/gpio_mouse.c --- linux-2.6.24.3-p2010/./drivers/input/mouse/gpio_mouse.c 2008-02-26 01:20:20.000000000 +0100 +++ linux-2.6.24.3-RV10/./drivers/input/mouse/gpio_mouse.c 2010-07-04 08:57:44.000000000 +0200 @@ -27,6 +27,8 @@ static void gpio_mouse_scan(struct input struct input_dev *input = dev->input; int x, y; +// printk(KERN_EMERG "gpio_mouse_scan: left %d right %d()\n", gpio_get_value(gpio->bleft), gpio_get_value(gpio->bright)); + if (gpio->bleft >= 0) input_report_key(input, BTN_LEFT, gpio_get_value(gpio->bleft) ^ gpio->polarity); diff -pwurN linux-2.6.24.3-p2010/./drivers/mmc/host/jz_mmc.c linux-2.6.24.3-RV10/./drivers/mmc/host/jz_mmc.c --- linux-2.6.24.3-p2010/./drivers/mmc/host/jz_mmc.c 2010-07-05 06:41:51.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mmc/host/jz_mmc.c 2010-07-04 08:54:28.000000000 +0200 @@ -699,6 +699,7 @@ static int jz_mmc_slot_is_empty(int slot __gpio_as_irq_rise_edge(MSC_HOTPLUG_PIN); #endif } + __gpio_ack_irq(MSC_HOTPLUG_PIN); return empty; } @@ -882,11 +883,14 @@ static int jz_mmc_probe(struct platform_ /* Detect card during initialization */ #ifdef CONFIG_SOC_JZ4740 - if (!jz_mmc_slot_is_empty(0)) { + if (!__gpio_get_pin(MSC_HOTPLUG_PIN)) { mmc_slot_enable = 1; mmc_detect_change(host->mmc, 0); } #endif + __gpio_as_irq_low_level(MSC_HOTPLUG_PIN); + __msc_card_detected(0); + __gpio_ack_irq(MSC_HOTPLUG_PIN); return 0; err1:free_irq(IRQ_MSC, &host); diff -pwurN linux-2.6.24.3-p2010/./drivers/mmc/host/jz_mmc.c.orig linux-2.6.24.3-RV10/./drivers/mmc/host/jz_mmc.c.orig --- linux-2.6.24.3-p2010/./drivers/mmc/host/jz_mmc.c.orig 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./drivers/mmc/host/jz_mmc.c.orig 2010-07-04 08:53:16.000000000 +0200 @@ -0,0 +1,1026 @@ +/* + * linux/drivers/mmc/jz_mmc.c - JZ SD/MMC driver + * + * Copyright (C) 2005 - 2008 Ingenic Semiconductor Inc. + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "jz_mmc.h" + +#define DRIVER_NAME "jz-mmc" + +#define NR_SG 1 + +#if defined(CONFIG_SOC_JZ4725) || defined(CONFIG_SOC_JZ4720) +#undef USE_DMA +#else +#define USE_DMA +#endif + +struct jz_mmc_host { + struct mmc_host *mmc; + spinlock_t lock; + struct { + int len; + int dir; + } dma; + struct { + int index; + int offset; + int len; + } pio; + int irq; + unsigned int clkrt; + unsigned int cmdat; + unsigned int imask; + unsigned int power_mode; + struct jz_mmc_platform_data *pdata; + struct mmc_request *mrq; + struct mmc_command *cmd; + struct mmc_data *data; + dma_addr_t sg_dma; + struct jzsoc_dma_desc *sg_cpu; + unsigned int dma_len; + unsigned int dma_dir; + struct pm_dev *pmdev; +}; + +static int r_type = 0; + +#define MMC_IRQ_MASK() \ +do { \ + REG_MSC_IMASK = 0xff; \ + REG_MSC_IREG = 0xff; \ +} while (0) + +static int rxdmachan = 0; +static int txdmachan = 0; +static int mmc_slot_enable = 0; + +/* Stop the MMC clock and wait while it happens */ +static inline int jz_mmc_stop_clock(void) +{ + int timeout = 1000; + + REG_MSC_STRPCL = MSC_STRPCL_CLOCK_CONTROL_STOP; + while (timeout && (REG_MSC_STAT & MSC_STAT_CLK_EN)) { + timeout--; + if (timeout == 0) + return 0; + udelay(1); + } + return MMC_NO_ERROR; +} + +/* Start the MMC clock and operation */ +static inline int jz_mmc_start_clock(void) +{ + REG_MSC_STRPCL = + MSC_STRPCL_CLOCK_CONTROL_START | MSC_STRPCL_START_OP; + return MMC_NO_ERROR; +} + +static inline u32 jz_mmc_calc_clkrt(int is_sd, u32 rate) +{ + u32 clkrt; + u32 clk_src = is_sd ? 24000000 : 20000000; + + clkrt = 0; + while (rate < clk_src) { + clkrt++; + clk_src >>= 1; + } + return clkrt; +} + +/* Select the MMC clock frequency */ +static int jz_mmc_set_clock(u32 rate) +{ + int clkrt; + + jz_mmc_stop_clock(); + __cpm_select_msc_clk(1); /* select clock source from CPM */ + clkrt = jz_mmc_calc_clkrt(1, rate); + REG_MSC_CLKRT = clkrt; + return MMC_NO_ERROR; +} + +static void jz_mmc_enable_irq(struct jz_mmc_host *host, unsigned int mask) +{ + unsigned long flags; + spin_lock_irqsave(&host->lock, flags); + host->imask &= ~mask; + REG_MSC_IMASK = host->imask; + spin_unlock_irqrestore(&host->lock, flags); +} + +static void jz_mmc_disable_irq(struct jz_mmc_host *host, unsigned int mask) +{ + unsigned long flags; + + spin_lock_irqsave(&host->lock, flags); + host->imask |= mask; + REG_MSC_IMASK = host->imask; + spin_unlock_irqrestore(&host->lock, flags); +} + +void jz_set_dma_block_size(int dmanr, int nbyte); + +#ifdef USE_DMA +static inline void +jz_mmc_start_dma(int chan, unsigned long phyaddr, int count, int mode) +{ + unsigned long flags; + + flags = claim_dma_lock(); + disable_dma(chan); + clear_dma_ff(chan); + jz_set_dma_block_size(chan, 32); + set_dma_mode(chan, mode); + set_dma_addr(chan, phyaddr); + set_dma_count(chan, count + 31); + enable_dma(chan); + release_dma_lock(flags); +} + +static irqreturn_t jz_mmc_dma_rx_callback(int irq, void *devid) +{ + int chan = rxdmachan; + + disable_dma(chan); + if (__dmac_channel_address_error_detected(chan)) { + printk(KERN_DEBUG "%s: DMAC address error.\n", + __FUNCTION__); + __dmac_channel_clear_address_error(chan); + } + if (__dmac_channel_transmit_end_detected(chan)) { + __dmac_channel_clear_transmit_end(chan); + } + return IRQ_HANDLED; +} +static irqreturn_t jz_mmc_dma_tx_callback(int irq, void *devid) +{ + int chan = txdmachan; + + disable_dma(chan); + if (__dmac_channel_address_error_detected(chan)) { + printk(KERN_DEBUG "%s: DMAC address error.\n", + __FUNCTION__); + __dmac_channel_clear_address_error(chan); + } + if (__dmac_channel_transmit_end_detected(chan)) { + __dmac_channel_clear_transmit_end(chan); + } + return IRQ_HANDLED; +} + +/* Prepare DMA to start data transfer from the MMC card */ +static void jz_mmc_rx_setup_data(struct jz_mmc_host *host, + struct mmc_data *data) +{ + unsigned int nob = data->blocks; + int channelrx = rxdmachan; + int i; + u32 size; + + if (data->flags & MMC_DATA_STREAM) + nob = 0xffff; + + REG_MSC_NOB = nob; + REG_MSC_BLKLEN = data->blksz; + size = nob * data->blksz; + + if (data->flags & MMC_DATA_READ) { + host->dma.dir = DMA_FROM_DEVICE; + } else { + host->dma.dir = DMA_TO_DEVICE; + } + + host->dma.len = + dma_map_sg(mmc_dev(host->mmc), data->sg, data->sg_len, + host->dma.dir); + + for (i = 0; i < host->dma.len; i++) { + host->sg_cpu[i].dtadr = sg_dma_address(&data->sg[i]); + host->sg_cpu[i].dcmd = sg_dma_len(&data->sg[i]); + dma_cache_wback_inv((unsigned long) + CKSEG0ADDR(sg_dma_address(data->sg)) + + data->sg->offset, + host->sg_cpu[i].dcmd); + jz_mmc_start_dma(channelrx, host->sg_cpu[i].dtadr, + host->sg_cpu[i].dcmd, DMA_MODE_READ); + } +} + +/* Prepare DMA to start data transfer from the MMC card */ +static void jz_mmc_tx_setup_data(struct jz_mmc_host *host, + struct mmc_data *data) +{ + unsigned int nob = data->blocks; + int channeltx = txdmachan; + int i; + u32 size; + + if (data->flags & MMC_DATA_STREAM) + nob = 0xffff; + + REG_MSC_NOB = nob; + REG_MSC_BLKLEN = data->blksz; + size = nob * data->blksz; + + if (data->flags & MMC_DATA_READ) { + host->dma.dir = DMA_FROM_DEVICE; + } else { + host->dma.dir = DMA_TO_DEVICE; + } + + host->dma.len = + dma_map_sg(mmc_dev(host->mmc), data->sg, data->sg_len, + host->dma.dir); + + for (i = 0; i < host->dma.len; i++) { + host->sg_cpu[i].dtadr = sg_dma_address(&data->sg[i]); + host->sg_cpu[i].dcmd = sg_dma_len(&data->sg[i]); + dma_cache_wback_inv((unsigned long) + CKSEG0ADDR(sg_dma_address(data->sg)) + + data->sg->offset, + host->sg_cpu[i].dcmd); + jz_mmc_start_dma(channeltx, host->sg_cpu[i].dtadr, + host->sg_cpu[i].dcmd, DMA_MODE_WRITE); + } +} +#else +static void jz_mmc_receive_pio(struct jz_mmc_host *host) +{ + + struct mmc_data *data = 0; + int sg_len = 0, max = 0, count = 0; + u32 *buf = 0; + struct scatterlist *sg; + unsigned int nob; + + data = host->mrq->data; + nob = data->blocks; + REG_MSC_NOB = nob; + REG_MSC_BLKLEN = data->blksz; + + max = host->pio.len; + if (host->pio.index < host->dma.len) { + sg = &data->sg[host->pio.index]; + buf = sg_virt(sg) + host->pio.offset; + + /* This is the space left inside the buffer */ + sg_len = sg_dma_len(&data->sg[host->pio.index]) - host->pio.offset; + /* Check to if we need less then the size of the sg_buffer */ + if (sg_len < max) max = sg_len; + } + max = max / 4; + for(count = 0; count < max; count++) { + while (REG_MSC_STAT & MSC_STAT_DATA_FIFO_EMPTY) + ; + *buf++ = REG_MSC_RXFIFO; + } + host->pio.len -= count; + host->pio.offset += count; + + if (sg_len && count == sg_len) { + host->pio.index++; + host->pio.offset = 0; + } +} + +static void jz_mmc_send_pio(struct jz_mmc_host *host) +{ + + struct mmc_data *data = 0; + int sg_len, max, count = 0; + u32 *wbuf = 0; + struct scatterlist *sg; + unsigned int nob; + + data = host->mrq->data; + nob = data->blocks; + + REG_MSC_NOB = nob; + REG_MSC_BLKLEN = data->blksz; + + /* This is the pointer to the data buffer */ + sg = &data->sg[host->pio.index]; + wbuf = sg_virt(sg) + host->pio.offset; + + /* This is the space left inside the buffer */ + sg_len = data->sg[host->pio.index].length - host->pio.offset; + + /* Check to if we need less then the size of the sg_buffer */ + max = (sg_len > host->pio.len) ? host->pio.len : sg_len; + max = max / 4; + for(count = 0; count < max; count++ ) { + while (REG_MSC_STAT & MSC_STAT_DATA_FIFO_FULL) + ; + REG_MSC_TXFIFO = *wbuf++; + } + + host->pio.len -= count; + host->pio.offset += count; + + if (count == sg_len) { + host->pio.index++; + host->pio.offset = 0; + } +} + +static int +jz_mmc_prepare_data(struct jz_mmc_host *host, struct mmc_data *data) +{ + int datalen = data->blocks * data->blksz; + + host->dma.dir = DMA_BIDIRECTIONAL; + host->dma.len = dma_map_sg(mmc_dev(host->mmc), data->sg, + data->sg_len, host->dma.dir); + if (host->dma.len == 0) + return -ETIMEDOUT; + + host->pio.index = 0; + host->pio.offset = 0; + host->pio.len = datalen; + return 0; +} +#endif + +static int jz_mmc_cmd_done(struct jz_mmc_host *host, unsigned int stat); + +static void jz_mmc_finish_request(struct jz_mmc_host *host, struct mmc_request *mrq) +{ + jz_mmc_stop_clock(); + host->mrq = NULL; + host->cmd = NULL; + host->data = NULL; + mmc_request_done(host->mmc, mrq); +} + +static void jz_mmc_start_cmd(struct jz_mmc_host *host, + struct mmc_command *cmd, unsigned int cmdat) +{ + u32 timeout = 0x3fffff; + unsigned int stat; + struct jz_mmc_host *hst = host; + WARN_ON(host->cmd != NULL); + host->cmd = cmd; + + /* stop MMC clock */ + jz_mmc_stop_clock(); + + /* mask interrupts */ + REG_MSC_IMASK = 0xff; + + /* clear status */ + REG_MSC_IREG = 0xff; + + if (cmd->flags & MMC_RSP_BUSY) + cmdat |= MSC_CMDAT_BUSY; + +#define RSP_TYPE(x) ((x) & ~(MMC_RSP_BUSY|MMC_RSP_OPCODE)) + switch (RSP_TYPE(mmc_resp_type(cmd))) { + case RSP_TYPE(MMC_RSP_R1): /* r1,r1b, r6, r7 */ + cmdat |= MSC_CMDAT_RESPONSE_R1; + r_type = 1; + break; + case RSP_TYPE(MMC_RSP_R3): + cmdat |= MSC_CMDAT_RESPONSE_R3; + r_type = 1; + break; + case RSP_TYPE(MMC_RSP_R2): + cmdat |= MSC_CMDAT_RESPONSE_R2; + r_type = 2; + break; + default: + break; + } + REG_MSC_CMD = cmd->opcode; + + /* Set argument */ +#ifdef CONFIG_JZ_MMC_BUS_1 + if (cmd->opcode == 6) { + /* set 1 bit sd card bus*/ + if (cmd->arg ==2) + REG_MSC_ARG = 0; + + /* set 1 bit mmc card bus*/ + if (cmd->arg == 0x3b70101) + REG_MSC_ARG = 0x3b70001; + } else + REG_MSC_ARG = cmd->arg; +#else + REG_MSC_ARG = cmd->arg; +#endif + + /* Set command */ + REG_MSC_CMDAT = cmdat; + + /* Send command */ + jz_mmc_start_clock(); + + while (timeout-- && !(REG_MSC_STAT & MSC_STAT_END_CMD_RES)) + ; + + REG_MSC_IREG = MSC_IREG_END_CMD_RES; /* clear irq flag */ + if (cmd->opcode == 12) { + while (timeout-- && !(REG_MSC_IREG & MSC_IREG_PRG_DONE)) + ; + REG_MSC_IREG = MSC_IREG_PRG_DONE; /* clear status */ + } + if (!mmc_slot_enable) { + /* It seems that MSC can't report the MSC_STAT_TIME_OUT_RES when + * card was removed. We force to return here. + */ + cmd->error = -ETIMEDOUT; + jz_mmc_finish_request(hst, hst->mrq); + return; + } + + if (SD_IO_SEND_OP_COND == cmd->opcode) { + /* + * Don't support SDIO card currently. + */ + cmd->error = -ETIMEDOUT; + jz_mmc_finish_request(hst, hst->mrq); + return; + } + + /* Check for status */ + stat = REG_MSC_STAT; + jz_mmc_cmd_done(hst, stat); + if (host->data) { + if (cmd->opcode == MMC_WRITE_BLOCK || cmd->opcode == MMC_WRITE_MULTIPLE_BLOCK) +#ifdef USE_DMA + jz_mmc_tx_setup_data(host, host->data); +#else + jz_mmc_send_pio(host); + else + jz_mmc_receive_pio(host); +#endif + } +} + +static int jz_mmc_cmd_done(struct jz_mmc_host *host, unsigned int stat) +{ + struct mmc_command *cmd = host->cmd; + int i, temp[16]; + u8 *buf; + u32 data, v, w1, w2; + + if (!cmd) + return 0; + + host->cmd = NULL; + buf = (u8 *) temp; + switch (r_type) { + case 1: + { + data = REG_MSC_RES; + buf[0] = (data >> 8) & 0xff; + buf[1] = data & 0xff; + data = REG_MSC_RES; + buf[2] = (data >> 8) & 0xff; + buf[3] = data & 0xff; + data = REG_MSC_RES; + buf[4] = data & 0xff; + cmd->resp[0] = + buf[1] << 24 | buf[2] << 16 | buf[3] << 8 | + buf[4]; + break; + } + case 2: + { + data = REG_MSC_RES; + v = data & 0xffff; + for (i = 0; i < 4; i++) { + data = REG_MSC_RES; + w1 = data & 0xffff; + data = REG_MSC_RES; + w2 = data & 0xffff; + cmd->resp[i] = v << 24 | w1 << 8 | w2 >> 8; + v = w2; + } + break; + } + case 0: + break; + } + if (stat & MSC_STAT_TIME_OUT_RES) { + printk("MSC_STAT_TIME_OUT_RES\n"); + cmd->error = -ETIMEDOUT; + } else if (stat & MSC_STAT_CRC_RES_ERR && cmd->flags & MMC_RSP_CRC) { + printk("MSC_STAT_CRC\n"); + if (cmd->opcode == MMC_ALL_SEND_CID || + cmd->opcode == MMC_SEND_CSD || + cmd->opcode == MMC_SEND_CID) { + /* a bogus CRC error can appear if the msb of + the 15 byte response is a one */ + if ((cmd->resp[0] & 0x80000000) == 0) + cmd->error = -EILSEQ; + } + } + /* + * Did I mention this is Sick. We always need to + * discard the upper 8 bits of the first 16-bit word. + */ + if (host->data && cmd->error == 0) + jz_mmc_enable_irq(host, MSC_IMASK_DATA_TRAN_DONE); + else + jz_mmc_finish_request(host, host->mrq); + + return 1; +} + +static int jz_mmc_data_done(struct jz_mmc_host *host, unsigned int stat) +{ + struct mmc_data *data = host->data; + + if (!data) + return 0; + REG_MSC_IREG = MSC_IREG_DATA_TRAN_DONE; /* clear status */ + jz_mmc_stop_clock(); + dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_len, + host->dma_dir); + if (stat & MSC_STAT_TIME_OUT_READ) { + printk("MMC/SD timeout, MMC_STAT 0x%x\n", stat); + data->error = -ETIMEDOUT; + } else if (REG_MSC_STAT & + (MSC_STAT_CRC_READ_ERROR | MSC_STAT_CRC_WRITE_ERROR)) { + printk("MMC/SD CRC error, MMC_STAT 0x%x\n", stat); + data->error = -EILSEQ; + } + /* + * There appears to be a hardware design bug here. There seems to + * be no way to find out how much data was transferred to the card. + * This means that if there was an error on any block, we mark all + * data blocks as being in error. + */ + if (data->error == 0) + data->bytes_xfered = data->blocks * data->blksz; + else + data->bytes_xfered = 0; + + jz_mmc_disable_irq(host, MSC_IMASK_DATA_TRAN_DONE); + host->data = NULL; + if (host->mrq->stop) { + jz_mmc_stop_clock(); + jz_mmc_start_cmd(host, host->mrq->stop, 0); + } else { + jz_mmc_finish_request(host, host->mrq); + } + return 1; +} + +static void jz_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq) +{ + struct jz_mmc_host *host = mmc_priv(mmc); + unsigned int cmdat; + + /* stop MMC clock */ + jz_mmc_stop_clock(); + + /* Save current request for the future processing */ + host->mrq = mrq; + host->data = mrq->data; + cmdat = host->cmdat; + host->cmdat &= ~MSC_CMDAT_INIT; + + if (mrq->data) { + cmdat &= ~MSC_CMDAT_BUSY; +#ifdef USE_DMA + if ((mrq->cmd->opcode == 51) | (mrq->cmd->opcode == 8) | (mrq->cmd->opcode == 6)) + + cmdat |= + MSC_CMDAT_BUS_WIDTH_1BIT | MSC_CMDAT_DATA_EN | + MSC_CMDAT_DMA_EN; + else { +#ifdef CONFIG_JZ_MMC_BUS_1 + cmdat &= ~MSC_CMDAT_BUS_WIDTH_4BIT; + cmdat |= MSC_CMDAT_BUS_WIDTH_1BIT | MSC_CMDAT_DATA_EN | + MSC_CMDAT_DMA_EN; +#else + cmdat |= MSC_CMDAT_DATA_EN | MSC_CMDAT_DMA_EN; +#endif + } + if (mrq->data->flags & MMC_DATA_WRITE) + cmdat |= MSC_CMDAT_WRITE; + + if (mrq->data->flags & MMC_DATA_STREAM) + cmdat |= MSC_CMDAT_STREAM_BLOCK; + if (mrq->cmd->opcode != MMC_WRITE_BLOCK + && mrq->cmd->opcode != MMC_WRITE_MULTIPLE_BLOCK) + jz_mmc_rx_setup_data(host, mrq->data); +#else /*USE_DMA*/ + + if ((mrq->cmd->opcode == 51) | (mrq->cmd->opcode == 8) | (mrq->cmd->opcode == 6)) + cmdat |= MSC_CMDAT_BUS_WIDTH_1BIT | MSC_CMDAT_DATA_EN; + else { +#ifdef CONFIG_JZ_MMC_BUS_1 + cmdat &= ~MSC_CMDAT_BUS_WIDTH_4BIT; + cmdat |= MSC_CMDAT_BUS_WIDTH_1BIT | MSC_CMDAT_DATA_EN; +#else + cmdat |= MSC_CMDAT_DATA_EN; +#endif + } + if (mrq->data->flags & MMC_DATA_WRITE) + cmdat |= MSC_CMDAT_WRITE; + + if (mrq->data->flags & MMC_DATA_STREAM) + cmdat |= MSC_CMDAT_STREAM_BLOCK; + jz_mmc_prepare_data(host, host->data); +#endif /*USE_DMA*/ + } + jz_mmc_start_cmd(host, mrq->cmd, cmdat); +} + +static irqreturn_t jz_mmc_irq(int irq, void *devid) +{ + struct jz_mmc_host *host = devid; + unsigned int ireg; + int handled = 0; + + ireg = REG_MSC_IREG; + + if (ireg) { + unsigned stat = REG_MSC_STAT; + if (ireg & MSC_IREG_DATA_TRAN_DONE) + handled |= jz_mmc_data_done(host, stat); + } + return IRQ_RETVAL(handled); +} + +/* Returns true if MMC slot is empty */ +static int jz_mmc_slot_is_empty(int slot) +{ + int empty; + + empty = (__msc_card_detected(slot) == 0) ? 1 : 0; + + if (empty) { + /* wait for card insertion */ +#ifdef CONFIG_MIPS_JZ4740_LYRA + __gpio_as_irq_rise_edge(MSC_HOTPLUG_PIN); +#else + __gpio_as_irq_fall_edge(MSC_HOTPLUG_PIN); +#endif + } else { + /* wait for card removal */ +#ifdef CONFIG_MIPS_JZ4740_LYRA + __gpio_as_irq_fall_edge(MSC_HOTPLUG_PIN); +#else + __gpio_as_irq_rise_edge(MSC_HOTPLUG_PIN); +#endif + } + + return empty; +} + +static irqreturn_t jz_mmc_detect_irq(int irq, void *devid) +{ + struct jz_mmc_host *host = (struct jz_mmc_host *) devid; + + if (jz_mmc_slot_is_empty(0)) { + mmc_slot_enable = 0; + mmc_detect_change(host->mmc, 50); + } else { + mmc_slot_enable = 1; + mmc_detect_change(host->mmc, 50); + } + return IRQ_HANDLED; +} + +static int jz_mmc_get_ro(struct mmc_host *mmc) +{ + struct jz_mmc_host *host = mmc_priv(mmc); + + if (host->pdata && host->pdata->get_ro) + return host->pdata->get_ro(mmc_dev(mmc)); + /* Host doesn't support read only detection so assume writeable */ + return 0; +} + +/* set clock and power */ +static void jz_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) +{ + struct jz_mmc_host *host = mmc_priv(mmc); + + if (ios->clock) + jz_mmc_set_clock(ios->clock); + else + jz_mmc_stop_clock(); + + if (host->power_mode != ios->power_mode) { + host->power_mode = ios->power_mode; + + if (ios->power_mode == MMC_POWER_ON) + host->cmdat |= CMDAT_INIT; + } + + if ((ios->bus_width == MMC_BUS_WIDTH_4) || (ios->bus_width == MMC_BUS_WIDTH_8)) + host->cmdat |= MSC_CMDAT_BUS_WIDTH_4BIT; + else + host->cmdat &= ~MSC_CMDAT_BUS_WIDTH_4BIT; +} + +static const struct mmc_host_ops jz_mmc_ops = { + .request = jz_mmc_request, + .get_ro = jz_mmc_get_ro, + .set_ios = jz_mmc_set_ios, +}; +static int jz_mmc_pm_callback(struct pm_dev *pm_dev, + pm_request_t req, void *data); + +static int jz_mmc_probe(struct platform_device *pdev) +{ + int retval; + struct mmc_host *mmc; + struct jz_mmc_host *host = NULL; + int irq; + struct resource *r; + + __gpio_as_msc(); + __msc_init_io(); + __msc_enable_power(); + + __msc_reset(); + + /* On reset, stop MMC clock */ + jz_mmc_stop_clock(); + + MMC_IRQ_MASK(); + + r = platform_get_resource(pdev, IORESOURCE_MEM, 0); + irq = platform_get_irq(pdev, 0); + if (!r || irq < 0) + return -ENXIO; + + r = request_mem_region(r->start, SZ_4K, DRIVER_NAME); + if (!r) + return -EBUSY; + + mmc = mmc_alloc_host(sizeof(struct jz_mmc_host), &pdev->dev); + if (!mmc) { + retval = -ENOMEM; + goto out; + } + mmc->ops = &jz_mmc_ops; + mmc->f_min = MMC_CLOCK_SLOW; + mmc->f_max = SD_CLOCK_FAST; + /* + * We can do SG-DMA, but we don't because we never know how much + * data we successfully wrote to the card. + */ + mmc->max_phys_segs = NR_SG; + /* + * Our hardware DMA can handle a maximum of one page per SG entry. + */ + mmc->max_seg_size = PAGE_SIZE; + /* + * Block length register is 10 bits. + */ + mmc->max_blk_size = 1023; + /* + * Block count register is 16 bits. + */ + mmc->max_blk_count = 65535; + host = mmc_priv(mmc); + host->mmc = mmc; + host->pdata = pdev->dev.platform_data; + mmc->ocr_avail = host->pdata ? + host->pdata->ocr_mask : MMC_VDD_32_33 | MMC_VDD_33_34; + host->mmc->caps = + MMC_CAP_4_BIT_DATA | MMC_CAP_MULTIWRITE | MMC_CAP_SD_HIGHSPEED + | MMC_CAP_MMC_HIGHSPEED; + /* + *MMC_CAP_4_BIT_DATA (1 << 0) The host can do 4 bit transfers + * + */ + host->sg_cpu = + dma_alloc_coherent(&pdev->dev, PAGE_SIZE, &host->sg_dma, + GFP_KERNEL); + if (!host->sg_cpu) { + retval = -ENOMEM; + goto out; + } + spin_lock_init(&host->lock); + host->irq = IRQ_MSC; + host->imask = 0xff; + /* + * Ensure that the host controller is shut down, and setup + * with our defaults. + */ + retval = request_irq(IRQ_MSC, jz_mmc_irq, 0, "MMC/SD", host); + if (retval) { + printk(KERN_ERR "MMC/SD: can't request MMC/SD IRQ\n"); + return retval; + } + jz_mmc_slot_is_empty(0); + /* Request card detect interrupt */ + + retval = request_irq(MSC_HOTPLUG_IRQ, jz_mmc_detect_irq, 0, //SA_INTERRUPT, + "MMC card detect", host); + if (retval) { + printk(KERN_ERR "MMC/SD: can't request card detect IRQ\n"); + goto err1; + } +#ifdef USE_DMA + /* Request MMC Rx DMA channel */ + rxdmachan = + jz_request_dma(DMA_ID_MSC_RX, "MMC Rx", jz_mmc_dma_rx_callback, + 0, host); + if (rxdmachan < 0) { + printk(KERN_ERR "jz_request_dma failed for MMC Rx\n"); + goto err2; + } + + /* Request MMC Tx DMA channel */ + txdmachan = + jz_request_dma(DMA_ID_MSC_TX, "MMC Tx", jz_mmc_dma_tx_callback, + 0, host); + if (txdmachan < 0) { + printk(KERN_ERR "jz_request_dma failed for MMC Tx\n"); + goto err3; + } +#endif + platform_set_drvdata(pdev, mmc); + mmc_add_host(mmc); +#ifdef CONFIG_PM + /* Register MMC slot as as power-managed device */ + host->pmdev = pm_register(PM_UNKNOWN_DEV, PM_SYS_UNKNOWN, jz_mmc_pm_callback); + if (host->pmdev) + host->pmdev->data = pdev; +#endif + printk("JZ SD/MMC card driver registered\n"); + + /* Detect card during initialization */ +#ifdef CONFIG_SOC_JZ4740 + if (!jz_mmc_slot_is_empty(0)) { + mmc_slot_enable = 1; + mmc_detect_change(host->mmc, 0); + } +#endif + return 0; + +err1:free_irq(IRQ_MSC, &host); +#ifdef USE_DMA + err2:jz_free_dma(rxdmachan); + err3:jz_free_dma(txdmachan); +#endif +out: + if (host) { + if (host->sg_cpu) + dma_free_coherent(&pdev->dev, PAGE_SIZE, + host->sg_cpu, host->sg_dma); + } + if (mmc) + mmc_free_host(mmc); + return -1; +} + +static int jz_mmc_remove(struct platform_device *pdev) +{ + struct mmc_host *mmc = platform_get_drvdata(pdev); + long flags; + + platform_set_drvdata(pdev, NULL); + + if (mmc) { + struct jz_mmc_host *host = mmc_priv(mmc); + + if (host->pdata && host->pdata->exit) + host->pdata->exit(&pdev->dev, mmc); + + mmc_remove_host(mmc); + + local_irq_save(flags); + jz_mmc_stop_clock(); + __msc_disable_power(); + jz_free_dma(rxdmachan); + jz_free_dma(txdmachan); + free_irq(IRQ_MSC, host); + local_irq_restore(flags); + mmc_free_host(mmc); + } + return 0; +} + +#ifdef CONFIG_PM +pm_message_t state; +static int jz_mmc_suspend(struct platform_device *dev, pm_message_t state) +{ + struct mmc_host *mmc = platform_get_drvdata(dev); + int ret = 0; + + __msc_disable_power(); + if (mmc) + ret = mmc_suspend_host(mmc, state); + + return ret; +} + +static int jz_mmc_resume(struct platform_device *dev) +{ + struct mmc_host *mmc = platform_get_drvdata(dev); + int ret = 0; +#if 0 + /*for sandisk BB0807011816D and other strange cards*/ + int i; + + for(i = 104; i < 110; i++) + __gpio_as_input(i); + + /* perhaps you should mdelay more */ + mdelay(1000); + __gpio_as_msc(); +#endif + __msc_init_io(); + __msc_enable_power(); + __msc_reset(); + + if (!jz_mmc_slot_is_empty(0)) { + mmc_slot_enable = 1; + mmc_detect_change(mmc, 10); + } + + if (mmc) + ret = mmc_resume_host(mmc); + + return ret; +} +static int jz_mmc_pm_callback(struct pm_dev *pm_dev, + pm_request_t req, void *data) +{ + struct platform_device *pdev = (struct platform_device *)pm_dev->data; + + switch(req) { + case PM_RESUME: + jz_mmc_resume(pdev); + break; + case PM_SUSPEND: + /* state has no use */ + jz_mmc_suspend(pdev, state); + break; + default: + printk("MMC/SD: invalid PM request %d\n", req); + break; + } + return 0; +} +#else +#define jz_mmc_suspend NULL +#define jz_mmc_resume NULL +#endif + +static struct platform_driver jz_mmc_driver = { + .probe = jz_mmc_probe, + .remove = jz_mmc_remove, + .suspend = jz_mmc_suspend, + .resume = jz_mmc_resume, + .driver = { + .name = DRIVER_NAME, + }, +}; + +static int __init jz_mmc_init(void) +{ + return platform_driver_register(&jz_mmc_driver); +} + +static void __exit jz_mmc_exit(void) +{ + platform_driver_unregister(&jz_mmc_driver); +} + +module_init(jz_mmc_init); +module_exit(jz_mmc_exit); + +MODULE_DESCRIPTION("JZ47XX SD/Multimedia Card Interface Driver"); +MODULE_LICENSE("GPL"); diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/Makefile linux-2.6.24.3-RV10/./drivers/mtd/Makefile --- linux-2.6.24.3-p2010/./drivers/mtd/Makefile 2010-07-05 06:41:51.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/Makefile 2010-07-03 12:48:54.000000000 +0200 @@ -15,9 +15,10 @@ obj-$(CONFIG_MTD_AFS_PARTS) += afs.o # 'Users' - code which presents functionality to userspace. obj-$(CONFIG_MTD_CHAR) += mtdchar.o obj-$(CONFIG_MTD_BLKDEVS) += mtd_blkdevs.o -#obj-$(CONFIG_MTD_BLOCK) += mtdblock.o -obj-$(CONFIG_MTD_BLOCK) += mtdblock-jz.o -obj-$(CONFIG_UDC_USE_LB_CACHE) += udc_cache.o +obj-$(CONFIG_MTD_BLOCK) += mtdblock.o +# WTF is that supposed to include!? +# This is GPLed code, they ought to release that as SRC +#obj-$(CONFIG_MTD_BLOCK) += mtdblock-jz.o obj-$(CONFIG_MTD_BLOCK_RO) += mtdblock_ro.o obj-$(CONFIG_FTL) += ftl.o obj-$(CONFIG_NFTL) += nftl.o @@ -32,5 +33,5 @@ obj-y += chips/ maps/ devices/ nand/ on obj-$(CONFIG_MTD_UBI) += ubi/ -$(obj)/mtdblock-jz.o: $(obj)/mtdblock-jz.o.original - @cp $(obj)/mtdblock-jz.o.original $(obj)/mtdblock-jz.o +$(obj)/mtdblock-jz.o: $(obj)/mtdblock-jz.uu + uudecode $(obj)/mtdblock-jz.uu -o $(obj)/mtdblock-jz.o \ No newline at end of file diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/Makefile.orig linux-2.6.24.3-RV10/./drivers/mtd/Makefile.orig --- linux-2.6.24.3-p2010/./drivers/mtd/Makefile.orig 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./drivers/mtd/Makefile.orig 2010-07-04 08:53:16.000000000 +0200 @@ -0,0 +1,36 @@ +# +# Makefile for the memory technology device drivers. +# + +# Core functionality. +mtd-y := mtdcore.o mtdsuper.o +mtd-$(CONFIG_MTD_PARTITIONS) += mtdpart.o +obj-$(CONFIG_MTD) += $(mtd-y) + +obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o +obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o +obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o +obj-$(CONFIG_MTD_AFS_PARTS) += afs.o + +# 'Users' - code which presents functionality to userspace. +obj-$(CONFIG_MTD_CHAR) += mtdchar.o +obj-$(CONFIG_MTD_BLKDEVS) += mtd_blkdevs.o +#obj-$(CONFIG_MTD_BLOCK) += mtdblock.o +obj-$(CONFIG_MTD_BLOCK) += mtdblock-jz.o +obj-$(CONFIG_UDC_USE_LB_CACHE) += udc_cache.o +obj-$(CONFIG_MTD_BLOCK_RO) += mtdblock_ro.o +obj-$(CONFIG_FTL) += ftl.o +obj-$(CONFIG_NFTL) += nftl.o +obj-$(CONFIG_INFTL) += inftl.o +obj-$(CONFIG_RFD_FTL) += rfd_ftl.o +obj-$(CONFIG_SSFDC) += ssfdc.o + +nftl-objs := nftlcore.o nftlmount.o +inftl-objs := inftlcore.o inftlmount.o + +obj-y += chips/ maps/ devices/ nand/ onenand/ + +obj-$(CONFIG_MTD_UBI) += ubi/ + +$(obj)/mtdblock-jz.o: $(obj)/mtdblock-jz.o.original + @cp $(obj)/mtdblock-jz.o.original $(obj)/mtdblock-jz.o diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/Makefile.rej linux-2.6.24.3-RV10/./drivers/mtd/Makefile.rej --- linux-2.6.24.3-p2010/./drivers/mtd/Makefile.rej 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./drivers/mtd/Makefile.rej 2010-07-04 08:54:28.000000000 +0200 @@ -0,0 +1,21 @@ +*************** obj-$(CONFIG_MTD_AFS_PARTS) += afs.o +*** 15,22 **** + # 'Users' - code which presents functionality to userspace. + obj-$(CONFIG_MTD_CHAR) += mtdchar.o + obj-$(CONFIG_MTD_BLKDEVS) += mtd_blkdevs.o +- #obj-$(CONFIG_MTD_BLOCK) += mtdblock.o +- obj-$(CONFIG_MTD_BLOCK) += mtdblock-jz.o + obj-$(CONFIG_MTD_BLOCK_RO) += mtdblock_ro.o + obj-$(CONFIG_FTL) += ftl.o + obj-$(CONFIG_NFTL) += nftl.o +--- 15,24 ---- + # 'Users' - code which presents functionality to userspace. + obj-$(CONFIG_MTD_CHAR) += mtdchar.o + obj-$(CONFIG_MTD_BLKDEVS) += mtd_blkdevs.o ++ obj-$(CONFIG_MTD_BLOCK) += mtdblock.o ++ # WTF is that supposed to include!? ++ # This is GPLed code, they ought to release that as SRC ++ #obj-$(CONFIG_MTD_BLOCK) += mtdblock-jz.o + obj-$(CONFIG_MTD_BLOCK_RO) += mtdblock_ro.o + obj-$(CONFIG_FTL) += ftl.o + obj-$(CONFIG_NFTL) += nftl.o diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/mtd_blkdevs.c linux-2.6.24.3-RV10/./drivers/mtd/mtd_blkdevs.c --- linux-2.6.24.3-p2010/./drivers/mtd/mtd_blkdevs.c 2010-07-05 06:41:51.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/mtd_blkdevs.c 2010-07-03 12:48:54.000000000 +0200 @@ -41,8 +41,8 @@ static int do_blktrans_request(struct mt unsigned long block, nsect; char *buf; - block = ((unsigned long long)req->sector) << 9 >> tr->blkshift; - nsect = ((unsigned long long)req->current_nr_sectors) << 9 >> tr->blkshift; + block = req->sector << 9 >> tr->blkshift; + nsect = req->current_nr_sectors << 9 >> tr->blkshift; buf = req->buffer; @@ -278,7 +278,7 @@ int add_mtd_blktrans_dev(struct mtd_blkt /* 2.5 has capacity in units of 512 bytes while still having BLOCK_SIZE_BITS set to 10. Just to keep us amused. */ - set_capacity(gd, ((u_int64_t)new->size * tr->blksize) >> 9); + set_capacity(gd, (new->size * tr->blksize) >> 9); gd->private_data = new; new->blkcore_priv = gd; diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/mtdblock.c linux-2.6.24.3-RV10/./drivers/mtd/mtdblock.c --- linux-2.6.24.3-p2010/./drivers/mtd/mtdblock.c 2010-07-05 06:41:51.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/mtdblock.c 2010-07-03 12:48:54.000000000 +0200 @@ -1,7 +1,7 @@ /* * Direct MTD block device access * - * $Id: mtdblock.c,v 1.1.1.1 2008-03-28 04:29:21 jlwei Exp $ + * $Id: mtdblock.c,v 1.1.1.1 2008/03/28 04:29:21 jlwei Exp $ * * (C) 2000-2003 Nicolas Pitre * (C) 1999-2003 David Woodhouse diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/mtdblock-jz.uu linux-2.6.24.3-RV10/./drivers/mtd/mtdblock-jz.uu --- linux-2.6.24.3-p2010/./drivers/mtd/mtdblock-jz.uu 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./drivers/mtd/mtdblock-jz.uu 2010-07-03 12:48:54.000000000 +0200 @@ -0,0 +1,371 @@ +begin 644 mtdblock-jz.oo +M?T5,1@$!`0````````````$`"``!``````````````#4)@```1``4#0````` +M`"@`&0`6`````````````````#@`@XP``&F,(`!HC`$`(B4"`$(H$`!`%"0` +M8XPA(&``(3````(`AY0!`,8DP!`'`"$02``$`$.0`0!B,`(`8S`#`&`4`@"$ +M)`4`0!0A$```]/_)%``````(`.`#]/\")`@`X`,``*>L.`""C$`H!0`<`$., +M(2BC````HI3_?T,P`!0"``,4`@`#`$$$ZO\$)```PZPA(```"`#@`R$0@``` +M`(.4``"BE```@J0(`.`#``"CI.#_O2N+``HKO__4C(````, +M(2@```(P$G(H`"2.'`"_CQ@`LH\4`+&/$`"PCR$H```````((`"])]C_O2<< +M`+.O&`"RKQ0`L:\0`+"O(`"_KP```CPAF(``#`!$C"&(H``````,T``%)"&` +M0``A($``(2@``"P`!B0G`$`0I``RC@````P`````#``1KB``(HX````,'``" +MKAP``XY4`$6.@!@#`"$88@```&2,"``BCO?_I20$(*0`0A("`",01``@``*N +M```3K@0`(HX`!$(P"`!`$"$@``(@`+^/'`"SCQ@`LH\4`+&/$`"PCP````@H +M`+TG`0`")"0``JX@`+^/'`"SCQ@`LH\4`+&/$`"PCP````@H`+TG(`"_CQP` +MLX\8`+*/%`"QCQ``L(\(`.`#*`"])^C_O2<0`+^O.`"&C$!`!0`<`,*,```$ +M/"$X`@$``..4``"$)/]_8C``'`,``QP#`!D`800A2`````#BI!P`PXP@`,2, +M(1@#`0``8I3_?T(PP!`"`"$01``$`$.0`0!C-`0`0Z`,`,2,$`##C!0`PHP! +M`(0D`0!C)/__0B04`,*L#`#$K!``PZP0`+^/(1`@`0@`X`,8`+TG````#``` +M```\`0`(ZO\)).#_O2<8`+*O%`"QKQP`OZ\0`+"O.`"0C"&(H`````0\```% +M/```A"1(`*4D#```$B&0P``$``*.*A`B`@P`0!3J_P4D'`"_CQ@`LH\4`+&/ +M$`"PCR$0H``(`.`#(`"])P````P`````4@$`"`0``H[T_R`&0#`1`!P``HXA +M$,(```!#A.__8`3`.!(```!2I!P`!(X`@`,D(2#$````@I0A*```)1!#```` +M@J0@``..(1CC``0`8I#^`$(P!`!BH`P`!(X0``..%``"CO__A"3__V,D`0!" +M)!0``JX,``2N50$`"!```Z[@_[TG%`"QKQ@`OZ\0`+"O.`"0C```!#P``(0D +M)0``$B&(H``@``6.```$/"4`H!```(0DP!@1`"$890`$`&*0```$/`(`0C0$ +M`&*@&``'C@P``HX0``.."``(C@$`YR3__T(D__]C)"M`!P$``(0D(2C@`"$P +MX``,``*N$``#KA0``!48``>N```$/```!3P``(0D````#"0`I20A$```&`"_ +MCQ0`L8\0`+"/"`#@`R``O2<````,`````(@!``@@``6.````#`````"+`0`( +M(``%C@````P`````I@$`"/O_`B1X_[TG>`"VKX0`OZ^``+ZO?`"WKW0`M:]P +M`+2O;`"SKV@`LJ]D`+&O8`"PKQP`@XP,`)",@+`#`````SP4`&(D(1#"`@`` +M0XP6`&`0I``1CA``8HP```0\`0!")```!3P0`&*L``"$)`````P4`*4DA`"_ +MCX``OH]\`+>/>`"VCW0`M8]P`+2/;`"SCV@`LH]D`+&/8`"PCR$0```(`.`# +MB`"])]$`(!(```0\```"/```7B0,`,2/````#-"`!33K_T`0(9A``"$@0``A +M*```````##P`!B0!`!(D```&/```!3P``,8D``"E)```<*X4`&0F````#!`` +M/ +M@`"VCWP`M8]X`+2/=`"SCW``LH]L`+&/:`"PCP@`X`.0`+TG@/^])W@`OJ]T +M`+>O:`"TKUP`L:]8`+"O?`"_KW``MJ]L`+6O9`"SKV``LJ\``).,(?"@`Z0` +M8HXAH(``/`#"KQ``:(X\`,2/5`!'C%``@XP.``(EPA`"`",XXP`!`!`DP!`" +M``0X\`!"0@@`0`#=KQ@`Q"`"^CW0`MX]P`+:/;`"UCV@`M(]D`+./8`"RCUP`L8]8 +M`+"/(1````@`X`.``+TG```2/%``@XQ$`,2/(8@``"$0E0`$$&(`&00`""&` +M0``,`$*.`0!")`4`0R@?`&`0#`!"KCP`PH]0`$.,(`""C@08=0`A$$,`&`## +M)S``PJ\0`*.O1`!BCB$@8`(A,``""?A``"$X(`(```0\#P!`$```A"0````, +M``````P`@XX(`(*.```$/.7_8A0``(0D````#``````,`$*.`0!")`4`0RCC +M_V`4#`!"K@P`0*Y,`,./.`#$C___8C`!`(0D`0!"))__@A0X`,2O_`,`"$`` +MW8\\`,2/4`"#C$0`Q(\AB```(1"D`@008@!,!``((8!``!``PHX!`$(D!0!# +M*!L`8!`0`,*N2`#"CQ@`PR,4`!CC`$`$"0C..,`N`#=KPX`0B0@``B-PA`"``0X\`#`$`(`___G +M,"&P@``CZ*(#&`#$)R$H```@``8DL`#(KP````RL`,>O&`#0KQ``XXXH``(D +M+`#$CB0`PJ]8`,(G'`##KS0`PJ\"``,D&`"B)RP`PZ\0`(`4O`#"K[@`W8\A +MZ,`#Y`"_C^``OH_<`+>/V`"VC]0`M8_0`+2/S`"SC\@`LH_$`+&/P`"PCR$0 +M```(`.`#Z`"])ZH#``PA(,`""`#4CL`8%``A(.`"(2B``L4"``RH`,.O(8!` +M`+``Q(^H`,*/(2B"````HHPA(,`"`0!")```HJPX`,..;P``#```98R*```& +M`0`1)```TXXX`,>.I`!RCE``0XY4`$*..`#$)R,00P`$$%$`(2@``"``!B0@ +M`/",````#/__53`X`-&O$`!CCH``Q"<\`,.O*``")`(``R1,`,.O5`#$K_\` +M!20H``8D````#$0`PJ\$`,..J`#$CX0`PZ\A@)``@`##KP```HXB`*`:B`#" +MKP(%``@A@```'@"P$@````!0`$..(`#"C@08<``A$$,`5`!&CE``PJ\X`,(G +M$`"BKP0PU`!(`&*.(3##`"$X```)^$``(2!@`N__0!`!`!`F```$/````CP` +M`(0D(2B``@@`0*P````,`````"$H@`(1`P`,(2#``B&@0`#+!``("`#"K@`` +M``P`````&P!`$*P`PX\9`&`8`A"#OR`"VK\0`M:_``+2OO`"SK[@`LJ^T`+&O'`"#C````CP4`$(D@!@# +M`"$88@```&.,`0`0)*0`HZ\``&*,'`"D)Y0`HJ^D`$.,F`"CKQ``1XQ4`&*, +M4`!CC$(Z!P`C$$,`!!!0`/__YS#<`*6OX`"FKR$H```@``8D__]",*``IZ\` +M```,G`"BKY0`I(\<`+"O$`""C*0`I8\@`**O%`"P)#``HXPA(``"````##0` +MHZ\````,I`"DCP````PA(``"W`"BCZ``HX^D`*2/&P!#`/0!8`"<`*./&`"F +M)Q(0```;`$,`]`%@`*@`HJ\2$```K`"BKQH```RL`*6/IP!`!.``I(^H`**/ +MG`"DCZ0`I8\;`$0`]`&``#0`I(P8`**/G`"ECQ`8```",*)P(8##`*\`!!*8 +M`**/'`"C)Y0`I(]0`$:,$`"CKT0`@HP$,-``"?A``"$X``"C`$`0```$/``` +M!3QH`*4D````#```A"2D`*6/```#/```8*P``+.,`0`&)*0`=XXX`*6,4`#C +MCE0`XHX,`&2.(Q!#``001@#__T(P(`"EC)``HJ\8`**/C`"EKP````R(`**O +M/`"D)R$H```@``8D(;!```````Q4`/".`0`#)#P`HZ\0`&*.`@`#))``I(]` +M`**O4`"CKR@``B1<`*,G2`"BKRH`@!A8`*.OB`"ECR&@```$J`4"!0`>)"&` +MH`(AB```(9```%``XHX\`*8G!!!4`"$0P@(0`*:O5`"BKT0`8HXA(&`"(3`` +M`@GX0``A."`"#`!`$``````!`%(F\?]>%@``!#P````,``"$))``HX\!`)0F +M#0!T$!``8HY:!@`((:BB`OK_0!*0`*./```$/```A"0````,(2A``I``HX\! +M`)0F]?]T%!``8HZ(`*6/$0,`#*0`I(\AD$``(2!@`L4"``PA*$`"C`"DC\`8 +M$@`A&(,`(8!`````8HRD`*2/`0!")```8JRD`*6/.`"FC&\```P``,6,.0`` +M!I``HH\>`$`85`#FC@2`T@"=!@`((8@``)``I(\8`)$0$`!BCB&``@)0`.*. +M/`"C)P0040`A$,("$`"CKU0`HJ]$`&*.(3```B$X```)^$``(2!@`O#_0!`! +M`#$F```$/```A"0````,(2A``J0`I(\1`P`,(2A``H,&``@AD$``````#"$@ +MP`*D`*2/K`"ECQH```P8`*8G7?]!!*@`HH_@`*2/_P`%)`````P``@8DU`"_ +MC]``OH_,`+>/R`"VC\0`M8_``+2/O`"SC[@`LH^T`+&/L`"PCR$0```(`.`# +MV`"])P``!#RL!@`(``"$)*0`I8\T`+"LW`"BCZ``HX^D`*2/&P!#`/0!8``P +M`(*,X`"DCP`"!B00*```0"H%``````PA**(`U`"_C]``OH_,`+>/R`"VC\0` +MM8_``+2/O`"SC[@`LH^T`+&/L`"PCR$0```(`.`#V`"])\C_O2/(2`@`KD```PA*$`"%`"FCR$@(`)$`0`, +M(2A``B0`(XX!``0D(1AS````9*`H`"*.@!@3`"$0H@(A$$,```!$H%``A(X@ +M`"..0!(5``0@DP`A(((`(2C``B$@@P`````,``(&)#0`OX\P`+:/+`"UCR@` +MM(\D`+./(`"RCQP`L8\8`+"/(1````@`X`,X`+TG!``BCN'_0A(4`#`F```` +M#"$@``(````,(2`@`@````PA(``"(2`@`AH!``PA*$`"(2`@`@````P4`*4G +MRO]`$```!#P````,``"$)!X'``@4`*:/%``P)@````PA(``"````#"$@(`(` +M```,(2```B$@(`(````,%`"E)P4`0!0`````%`"FCR$@(`(@!P`((3C````` +M!#P````,``"$)&4'``@4`*:/````````````````R`,``!\```````````(` +M``````!`%P``J!L``(@"``"P%0``W`8``"06``!L`P``8`(````````````` +M``````````````````````````#\`__P```````````````````````````` +M```````````````````````````````=````'P```&@````````````````` +M`````````````!T````?````H```````````````````````````````'0`` +M`!\```"T```````'@/S___\``````````"`````=````'P```+P!``````^` +M^/___P``````````*````!T````?```````````````````````````````` +M````'0```!\```!@`@`````!@/S___\``````````!@````=````'P```(@" +M``````.`^/___P``````````(````!T````?````Y`(`````!X#\____```` +M```````@````'0```!\```!L`P`````/@/C___\``````````"@````=```` +M'P```&@$``````"`^/___P``````````&````!T````?````$`4`````!X#\ +M____```````````@````'0```!\```#X!0`````#@/C___\``````````"`` +M```=````'P```-P&`````/_`_/___P``````````B````!T````?````%`L` +M````#X#X____``````````!X````'0```!\```!$#``````/@/C___\````` +M`````"@````=````'P```$`-`````````````````````````````!T````? +M````````````````````````````````````'0```!\```!4#0````#_P/S_ +M__\``````````)`````>````'P```*@.`````/_`_/___P``````````@``` +M`!X````?````````````_\#\____``````````#H````'@```!\```"P%0`` +M```#@/C___\``````````"`````=````'P```"06``````^`^/___P`````` +M````*````!T````?````0!<`````_\#\____``````````#8````'0```!\` +M``"H&P````!_@/S___\``````````#@````=````'P``````!#P````(``"$ +M)$5RF]N95]P='(@:7,@;G5L;`H```!Z +M;VYE7W!T0H```!W"`*`````$)U9SH@8V%N +M)W0@9FEN9%]F0!D;U]C86-H961?'0`+G)E;"YD871A`"YB``"@```````````` +M```0`````````#0````&``!P`@````````!0'@``&```````````````!``` +M`!@```!!`````0``````````````:!X``"`#``````````````0````````` +M/0````D``````````````(@_``#(````%P````<````$````"````$8````! +M``````````````"((0```````````````````0````````!8`````0````8` +M````````B"$```P```````````````0`````````5`````D````````````` +M`%!````8````%P````H````$````"````&,````!````,@````````"4(0`` +MU`,`````````````!`````$```!V`````0````8`````````:"4```P````` +M``````````0`````````<@````D``````````````&A````8````%P````T` +M```$````"````(4````!`````P````````!T)0``!```````````````!``` +M``````"!````"0``````````````@$````@````7````#P````0````(```` +MF`````$````#`````````'@E```$```````````````$`````````)0````) +M``````````````"(0```"````!<````1````!`````@```"H`````0````(` +M````````@"4``(```````````````!``````````L`````@````#```0```` +M```F```````````````````$`````````+8````!````````````````)@`` +M$@```````````````0`````````1`````P``````````````$B8``+\````` +M``````````$``````````0````(``````````````+PJ``"P!@``&````%$` +M```$````$`````D````#``````````````!L,0```P4``````````````0`` +M`````````````````````````````0``````````````!`#Q_P`````````` +M``````,``0`````````````````#``,``````````````````P`%```````` +M``````````,`"0`/`````````&@````"``$`*````&@````X`````@`!`$,` +M``"@````%`````(``0!1````M`````@!```"``$`90```+P!``"D`````@`! +M``````````````````,`"@!W``````````P````"``H`A0````````!,```` +M`0`#`)$```!@`@``*`````(``0"E````B`(``%P````"``$`M0```.0"``"( +M`````@`!`-````!L`P``_`````(``0`````````````````#``P`X0```&@$ +M``"H`````@`!``,!```0!0``Z`````(``0`C`0``2````"`````!`!,`,@$` +M`/@%``#D`````@`!`%0!```D````(@````$`$P!C`0``W`8``#@$```"``$` +M<0$``!0```"``````0`%`'D!```4````#@````$`$P"(`0`````````````! +M`!0`E`$``!0+```P`0```@`!`*`!``!`#0``%`````(``0"O`0``1`P``/P` +M```"``$``````````````````P`-`,\!````````#`````(`#0#@`0``5`T` +M`%0!```"``$`]0$``*@.``!T`P```@`!``\"```0````!`````$`!0`;`@`` +M#`````0````!``4`)P(```@````$`````0`%`#("```$````!`````$`!0`] +M`@``L!4``'0````"``$`3`(``"06```<`0```@`!`%T"````````$0````$` +M$P!L`@``0!<``&@$```"``$`?@(``&@````/`````0`3`(T"````````!``` +M``$`!0"8`@``J!L```P"```"``$``````````````````P`/`*L"```````` +M!`````$`#P`````````````````#`!$`QP(````````$`````0`1```````` +M``````````,`$P`````````````````#`!0`X0(````````````````,`.8" +M```L````````````#`#K`@``1`````````````P`\`(``%@````````````, +M`/4"``!X````````````#`#Z`@``M`````````````P`_P(``,@````````` +M```,``0#``#X````````````#``)`P``X`````````````P`#@,``!`!```` +M```````,`!,#```\`0``````````#``9`P``A`$```````````P`'P,``,@! +M```````````,`"4#``#@`0``````````#``K`P``^`$```````````P`,0,` +M`!@"```````````,`#<#```P`@``````````#``]`P``9`(```````````P` +M0P,``*0"```````````,`$D#``!X`@``````````#`!/`P``V`(````````` +M``P`50,``/`"```````````,`%L#```,`P``````````#`!A`P``.`,````` +M``````P`9P,``'P#```````````,`&T#``"H`P``````````#``````````` +M```````#``8``````````````````P`'``````````````````,`%0!S`P`` +M```````````0````B0,`````````````$````)X#`````````````!````"D +M`P`````````````0````JP,`````````````$````+@#`````````````!`` +M``#)`P`````````````0````WP,`````````````$````/0#```````````` +M`!````#[`P`````````````0````"`0`````````````$````!`$```````` +M`````!`````:!``````````````0````,@0`````````````$````$@$```` +M`````````!````!BYC`&UT9&)L;V-K7V9I;F1?9G)E95]B;&]C +M:P!M=&1B;&]C:U]A9&1R97-S7W1R86YS;&%T90!M=&1B;&]C:U]S=V%P`&UT +M9&)L;V-K7VUA>&AE87!I9GD`;71D8FQO8VM?:&5A<'-O0!M=&1B +M;&]C:U]B;&]C:U]L;V]K=7!?;6%P7V5N=')Y`%]?9G5N8U]?+C$U,S$Q`&UT +M9&)L;V-K7V)L;V-K7VEN9F]?;6%P7V)A9%]B;&]C:P!?7V9U;F-?7RXQ-3(X +M.`!M=&1B;&]C:U]O<&5N`&UT9&)L:W,`7U]F=6YC7U\N,38P-#@`7U]K97DN +M,34Y,C<`97)A&ET8V%L;%]C;&5A;G5P7VUT9&)L;V-K`%]? +M:6YI=&-A;&Q?:6YI=%]M=&1B;&]C:S8`)$Q#,``D3$,Q`"1,0S(`)$Q#,P`D +M3$,T`"1,0S4`)$Q#-@`D3$,X`"1,0S<`)$Q#.0`D3$,Q,``D3$,Q,0`D3$,Q +M,@`D3$,Q,P`D3$,Q-``D3$,Q-0`D3$,Q-@`D3$,Q-P`D3$,Q.0`D3$,Q.``D +M3$,R,``D3$,R,0`D3$,R,@`D3$,R,P`D3$,R-``D3$,R-0!R96=IE]B861B;&]C +M:U]T86)L90!A9&1?;71D7V)L:W1R86YS7V1E=@!P%]I +M;FET`'9M86QL;V,`7U]K;6%L;&]C`&=E=%]M=&1B;&]C:U]O;V)?8V]P:65S +M`&1E9F%U;'1?=V%K95]F=6YC=&EO;@!I;FET7W=A:71Q=65U95]H96%D`&%D +M9%]W86ET7W%U975E`')E;6]V95]W86ET7W%U975E`'-C:&5D=6QE`%]?=V%K +M95]U<`!D97)E9VES=&5R7VUT9%]B;&MT5]E;F%B;&4` +M;75T97A?;&]C:P!M=71E>%]U;FQO8VL`=F9R964``'P!```$`@``G`$```0" +M``#X`0``!`(``"0"```$`@``-`(```0"``!L`@``!%(``(`"```$4P``J`(` +M``14``!``P``!%0``&0#```$5```A`,```55``",`P``!E4``)0#```$5@`` +MM`,```14``#$`P``!%<``"`$```$6```1`0```18``!\!```!30``(@$```& +M-`````4```19```(!0``!`(``"P%```%-0``-`4```8U```P!0``!3(``#@% +M```&,@``<`4```19``!X!0``!`(``/`%```$`@``#`8```4V```0!@``!C8` +M`"`&```%-P``*`8```8W```X!@``!3@``&0&```&.```@`8```4Y``"(!@`` +M!CD``(P&```$60``A`8```4R``"0!@``!C(``*P&```$60``M`8```0"``"\ +M!@``!%D``,0&```$`@``S`8```19``#4!@``!`(``!0'```%!```&`<```8$ +M```P!P``!3H``$`'```&.@``1`<```19```X!P``!3(``$@'```&,@``B`<` +M``55``",!P``!E4``)0'```$5@``K`<```14``"X!P``!3,``,`'```&,P`` +MO`<```4[``#$!P``!CL``-`'```$6@``\`<```1;```,"```!%P``!P(```$ +M7```,`@```1<``"8"```!%0``*@(```$5```P`@```14``#H"```!%8````) +M```$5```"`D```17``!("0``!%P``%P)```$7```=`D```1<``"H"0``!%0` +M`/`)```$70``;`H```0"``"("@``!`(``)`*```%!```E`H```8$``"<"@`` +M!`(``*@*```$`@``L`H```0"``#`"@``!`(``,@*```$60``A`<```4\``#, +M"@``!CP``-`*```$`@``W`H```19``#8"@``!3T``.`*```&/0``\`H```19 +M``#L"@``!3X``/0*```&/@``_`H```19``#X"@``!3\````+```&/P``#`L` +M``0"``!$"P``!5X``$P+```&7@``9`L```1?``!L"P``!0(``'`+```&`@`` +MJ`L```1@``#`"P``!4```,@+```&0```U`L```19``#H"P``!&$``!`,```$ +M8@``'`P```1A``!L#```!`(``'@,```$`@``A`P```0"``",#```!4$``)0, +M```&00``T`P```0"``!P'```!4(``-@,```%0@``X`P```9"``#D#```!%D` +M`/0,```$`@``*`T```0"```P#0``!%D``#@-```$`@``3`T```1C``"\#0`` +M!%0``.0-```$`@````X```14```0#@``!%0``#@.```$90``9`X```0"```L +M#P``!%0``*@/```$`@``0!````0"``!($```!@0``%@0```&!```D!````5# +M``"8$```!D,``)P0```$60``K!````5$``"T$```!D0``+@0```$60``P!`` +M``8$``#0$```!@0``"@0```%!```U!````8$``#T$```!`(``!01```$`@`` +M'!$```8$```L$0``!@0``%01```%10``7!$```9%``!@$0``!%D``'`1```% +M1```>!$```9$``!\$0``!%D``(01```&!```I`\```4$``"4$0``!@0``*01 +M```$`@``N`\```4$``"H$0``!@0``/P1```$90``!!(```0"```4$@``!`(` +M`)@1```%!```&!(```8$``"H$@``!%0``"`3```$`@``.!,```0"``!D$P`` +M!`(``*`3```$5```T!,```14``#X$P``!`(``$@4```%1@``4!0```9&``!, +M%```!00``%@4```&!```7!0```19``!H%```!`(``'04```$`@``?!0```1G +M``"8%```!`(``.`4```$`@``[!0```0"```$%0``!`(``$05```$5```5!4` +M``14``"8%0``!4<``*`5```&1P``J!4```0"``"<%0``!00``*P5```&!``` +MQ!4```4$``#(%0``!@0``-P5```$:```Y!4```1F``#L%0``!&D``$`6```% +M!```2!8```8$``!<%@``!&@``&06```$9@``;!8```1I``!X%@``!4@``(06 +M```&2```@!8```4R``"(%@``!C(``+`6```$4P``N!8```13``#`%@``!%,` +M`,@6```$4P``T!8```1J``#8%@``!%,``.`6```$4P``Z!8```13``#P%@`` +M!%,``!@7```$60``private_data; struct mtd_info *mtd = mfi->mtd; - size_mtd_t retlen=0; + size_t retlen=0; size_t total_retlen=0; int ret=0; int len; @@ -246,7 +248,7 @@ static ssize_t mtd_write(struct file *fi struct mtd_file_info *mfi = file->private_data; struct mtd_info *mtd = mfi->mtd; char *kbuf; - size_mtd_t retlen; + size_t retlen; size_t total_retlen=0; int ret=0; int len; @@ -689,9 +691,9 @@ static int mtd_ioctl(struct inode *inode case MEMGETBADBLOCK: { - loff_mtd_t offs; + loff_t offs; - if (copy_from_user(&offs, argp, sizeof(loff_mtd_t))) + if (copy_from_user(&offs, argp, sizeof(loff_t))) return -EFAULT; if (!mtd->block_isbad) ret = -EOPNOTSUPP; @@ -702,9 +704,9 @@ static int mtd_ioctl(struct inode *inode case MEMSETBADBLOCK: { - loff_mtd_t offs; + loff_t offs; - if (copy_from_user(&offs, argp, sizeof(loff_mtd_t))) + if (copy_from_user(&offs, argp, sizeof(loff_t))) return -EFAULT; if (!mtd->block_markbad) ret = -EOPNOTSUPP; diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/mtdcore.c linux-2.6.24.3-RV10/./drivers/mtd/mtdcore.c --- linux-2.6.24.3-p2010/./drivers/mtd/mtdcore.c 2010-07-05 06:41:51.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/mtdcore.c 2010-07-03 12:48:54.000000000 +0200 @@ -303,10 +303,10 @@ void put_mtd_device(struct mtd_info *mtd */ int default_mtd_writev(struct mtd_info *mtd, const struct kvec *vecs, - unsigned long count, loff_mtd_t to, size_mtd_t *retlen) + unsigned long count, loff_t to, size_t *retlen) { unsigned long i; - size_mtd_t totlen = 0, thislen; + size_t totlen = 0, thislen; int ret = 0; if(!mtd->write) { @@ -350,9 +350,8 @@ static inline int mtd_proc_info (char *b if (!this) return 0; - return sprintf(buf, "mtd%d: %09llx %8.8x %d %d \"%s\"\n", - i, this->size, this->erasesize, !!((this->flags)&MTD_NAND_CPU_MODE), - !!((this->flags)&MTD_MTDBLOCK_JZ_INVALID), this->name); + return sprintf(buf, "mtd%d: %8.8x %8.8x \"%s\"\n", i, this->size, + this->erasesize, this->name); } static int mtd_read_proc (char *page, char **start, off_t off, int count, @@ -363,7 +362,7 @@ static int mtd_read_proc (char *page, ch mutex_lock(&mtd_table_mutex); - len = sprintf(page, "dev: size erasesize cpu_mode jz_mtdblock_invalid name\n"); + len = sprintf(page, "dev: size erasesize name\n"); for (i=0; i< MAX_MTD_DEVICES; i++) { l = mtd_proc_info(page + len, i); diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/mtdpart.c linux-2.6.24.3-RV10/./drivers/mtd/mtdpart.c --- linux-2.6.24.3-p2010/./drivers/mtd/mtdpart.c 2010-07-05 06:41:51.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/mtdpart.c 2010-07-03 12:48:54.000000000 +0200 @@ -5,7 +5,7 @@ * * This code is GPL * - * $Id: mtdpart.c,v 1.1.1.1 2008-03-28 04:29:21 jlwei Exp $ + * $Id: mtdpart.c,v 1.1.1.1 2008/03/28 04:29:21 jlwei Exp $ * * 02-21-2002 Thomas Gleixner * added support for read_oob, write_oob @@ -28,7 +28,7 @@ static LIST_HEAD(mtd_partitions); struct mtd_part { struct mtd_info mtd; struct mtd_info *master; - u_int64_t offset; + u_int32_t offset; int index; struct list_head list; int registered; @@ -46,8 +46,8 @@ struct mtd_part { * to the _real_ device. */ -static int part_read (struct mtd_info *mtd, loff_mtd_t from, size_mtd_t len, - size_mtd_t *retlen, u_char *buf) +static int part_read (struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char *buf) { struct mtd_part *part = PART(mtd); int res; @@ -67,8 +67,8 @@ static int part_read (struct mtd_info *m return res; } -static int part_point (struct mtd_info *mtd, loff_mtd_t from, size_mtd_t len, - size_mtd_t *retlen, u_char **buf) +static int part_point (struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char **buf) { struct mtd_part *part = PART(mtd); if (from >= mtd->size) @@ -79,14 +79,14 @@ static int part_point (struct mtd_info * len, retlen, buf); } -static void part_unpoint (struct mtd_info *mtd, u_char *addr, loff_mtd_t from, size_mtd_t len) +static void part_unpoint (struct mtd_info *mtd, u_char *addr, loff_t from, size_t len) { struct mtd_part *part = PART(mtd); part->master->unpoint (part->master, addr, from + part->offset, len); } -static int part_read_oob(struct mtd_info *mtd, loff_mtd_t from, +static int part_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops) { struct mtd_part *part = PART(mtd); @@ -107,8 +107,8 @@ static int part_read_oob(struct mtd_info return res; } -static int part_read_user_prot_reg (struct mtd_info *mtd, loff_mtd_t from, size_mtd_t len, - size_mtd_t *retlen, u_char *buf) +static int part_read_user_prot_reg (struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char *buf) { struct mtd_part *part = PART(mtd); return part->master->read_user_prot_reg (part->master, from, @@ -116,14 +116,14 @@ static int part_read_user_prot_reg (stru } static int part_get_user_prot_info (struct mtd_info *mtd, - struct otp_info *buf, size_mtd_t len) + struct otp_info *buf, size_t len) { struct mtd_part *part = PART(mtd); return part->master->get_user_prot_info (part->master, buf, len); } -static int part_read_fact_prot_reg (struct mtd_info *mtd, loff_mtd_t from, size_mtd_t len, - size_mtd_t *retlen, u_char *buf) +static int part_read_fact_prot_reg (struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char *buf) { struct mtd_part *part = PART(mtd); return part->master->read_fact_prot_reg (part->master, from, @@ -131,14 +131,14 @@ static int part_read_fact_prot_reg (stru } static int part_get_fact_prot_info (struct mtd_info *mtd, - struct otp_info *buf, size_mtd_t len) + struct otp_info *buf, size_t len) { struct mtd_part *part = PART(mtd); return part->master->get_fact_prot_info (part->master, buf, len); } -static int part_write (struct mtd_info *mtd, loff_mtd_t to, size_mtd_t len, - size_mtd_t *retlen, const u_char *buf) +static int part_write (struct mtd_info *mtd, loff_t to, size_t len, + size_t *retlen, const u_char *buf) { struct mtd_part *part = PART(mtd); if (!(mtd->flags & MTD_WRITEABLE)) @@ -151,7 +151,7 @@ static int part_write (struct mtd_info * len, retlen, buf); } -static int part_write_oob(struct mtd_info *mtd, loff_mtd_t to, +static int part_write_oob(struct mtd_info *mtd, loff_t to, struct mtd_oob_ops *ops) { struct mtd_part *part = PART(mtd); @@ -166,22 +166,22 @@ static int part_write_oob(struct mtd_inf return part->master->write_oob(part->master, to + part->offset, ops); } -static int part_write_user_prot_reg (struct mtd_info *mtd, loff_mtd_t from, size_mtd_t len, - size_mtd_t *retlen, u_char *buf) +static int part_write_user_prot_reg (struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char *buf) { struct mtd_part *part = PART(mtd); return part->master->write_user_prot_reg (part->master, from, len, retlen, buf); } -static int part_lock_user_prot_reg (struct mtd_info *mtd, loff_mtd_t from, size_mtd_t len) +static int part_lock_user_prot_reg (struct mtd_info *mtd, loff_t from, size_t len) { struct mtd_part *part = PART(mtd); return part->master->lock_user_prot_reg (part->master, from, len); } static int part_writev (struct mtd_info *mtd, const struct kvec *vecs, - unsigned long count, loff_mtd_t to, size_mtd_t *retlen) + unsigned long count, loff_t to, size_t *retlen) { struct mtd_part *part = PART(mtd); if (!(mtd->flags & MTD_WRITEABLE)) @@ -222,7 +222,7 @@ void mtd_erase_callback(struct erase_inf } EXPORT_SYMBOL_GPL(mtd_erase_callback); -static int part_lock (struct mtd_info *mtd, loff_mtd_t ofs, size_mtd_t len) +static int part_lock (struct mtd_info *mtd, loff_t ofs, size_t len) { struct mtd_part *part = PART(mtd); if ((len + ofs) > mtd->size) @@ -230,7 +230,7 @@ static int part_lock (struct mtd_info *m return part->master->lock(part->master, ofs + part->offset, len); } -static int part_unlock (struct mtd_info *mtd, loff_mtd_t ofs, size_mtd_t len) +static int part_unlock (struct mtd_info *mtd, loff_t ofs, size_t len) { struct mtd_part *part = PART(mtd); if ((len + ofs) > mtd->size) @@ -256,7 +256,7 @@ static void part_resume(struct mtd_info part->master->resume(part->master); } -static int part_block_isbad (struct mtd_info *mtd, loff_mtd_t ofs) +static int part_block_isbad (struct mtd_info *mtd, loff_t ofs) { struct mtd_part *part = PART(mtd); if (ofs >= mtd->size) @@ -265,7 +265,7 @@ static int part_block_isbad (struct mtd_ return part->master->block_isbad(part->master, ofs); } -static int part_block_markbad (struct mtd_info *mtd, loff_mtd_t ofs) +static int part_block_markbad (struct mtd_info *mtd, loff_t ofs) { struct mtd_part *part = PART(mtd); int res; @@ -320,10 +320,10 @@ int add_mtd_partitions(struct mtd_info * int nbparts) { struct mtd_part *slave; - u_int64_t cur_offset = 0; + u_int32_t cur_offset = 0; int i; - //printk (KERN_NOTICE "Creating %d MTD partitions on \"%s\":\n", nbparts, master->name); + printk (KERN_NOTICE "Creating %d MTD partitions on \"%s\":\n", nbparts, master->name); for (i = 0; i < nbparts; i++) { @@ -340,11 +340,6 @@ int add_mtd_partitions(struct mtd_info * /* set up the MTD object for this partition */ slave->mtd.type = master->type; slave->mtd.flags = master->flags & ~parts[i].mask_flags; - if (parts[i].mtdblock_jz_invalid) - slave->mtd.flags |= MTD_MTDBLOCK_JZ_INVALID; - if (parts[i].cpu_mode) - slave->mtd.flags |= MTD_NAND_CPU_MODE; - slave->mtd.size = parts[i].size; slave->mtd.writesize = master->writesize; slave->mtd.oobsize = master->oobsize; @@ -404,12 +399,11 @@ int add_mtd_partitions(struct mtd_info * slave->offset = cur_offset; if (slave->offset == MTDPART_OFS_NXTBLK) { slave->offset = cur_offset; - if (((u32)cur_offset % master->erasesize) != 0) { + if ((cur_offset % master->erasesize) != 0) { /* Round up to next erasesize */ - //slave->offset = ((cur_offset / master->erasesize) + 1) * master->erasesize; - slave->offset = ((cur_offset >> (ffs(master->erasesize)-1)) + 1) * master->erasesize; + slave->offset = ((cur_offset / master->erasesize) + 1) * master->erasesize; printk(KERN_NOTICE "Moving partition %d: " - "0x%09llx -> 0x%09llx\n", i, + "0x%08x -> 0x%08x\n", i, cur_offset, slave->offset); } } @@ -417,10 +411,8 @@ int add_mtd_partitions(struct mtd_info * slave->mtd.size = master->size - slave->offset; cur_offset = slave->offset + slave->mtd.size; - printk (KERN_NOTICE "0x%09llx-0x%09llx : \"%s\" \"%s\" \"%s\"\n", slave->offset, - slave->offset + slave->mtd.size, slave->mtd.name, - ((slave->mtd.flags)&MTD_NAND_CPU_MODE)?"cpu_mode":"dma_mode", - ((slave->mtd.flags)&MTD_MTDBLOCK_JZ_INVALID)?"jz_mtdblock_invalid":"jz_mtdblock_valid"); + printk (KERN_NOTICE "0x%08x-0x%08x : \"%s\"\n", slave->offset, + slave->offset + slave->mtd.size, slave->mtd.name); /* let's do some sanity checks */ if (slave->offset >= master->size) { @@ -432,7 +424,7 @@ int add_mtd_partitions(struct mtd_info * } if (slave->offset + slave->mtd.size > master->size) { slave->mtd.size = master->size - slave->offset; - printk ("mtd: partition \"%s\" extends beyond the end of device \"%s\" -- size truncated to %#llx\n", + printk ("mtd: partition \"%s\" extends beyond the end of device \"%s\" -- size truncated to %#x\n", parts[i].name, master->name, slave->mtd.size); } if (master->numeraseregions>1) { @@ -455,7 +447,7 @@ int add_mtd_partitions(struct mtd_info * } if ((slave->mtd.flags & MTD_WRITEABLE) && - ((u32)slave->offset % slave->mtd.erasesize)) { + (slave->offset % slave->mtd.erasesize)) { /* Doesn't start on a boundary of major erase size */ /* FIXME: Let it be writable if it is on a boundary of _minor_ erase size though */ slave->mtd.flags &= ~MTD_WRITEABLE; @@ -463,7 +455,7 @@ int add_mtd_partitions(struct mtd_info * parts[i].name); } if ((slave->mtd.flags & MTD_WRITEABLE) && - ((u32)slave->mtd.size % slave->mtd.erasesize)) { + (slave->mtd.size % slave->mtd.erasesize)) { slave->mtd.flags &= ~MTD_WRITEABLE; printk ("mtd: partition \"%s\" doesn't end on an erase block -- force read-only\n", parts[i].name); @@ -471,7 +463,7 @@ int add_mtd_partitions(struct mtd_info * slave->mtd.ecclayout = master->ecclayout; if (master->block_isbad) { - uint64_t offs = 0; + uint32_t offs = 0; while(offs < slave->mtd.size) { if (master->block_isbad(master, diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/nand/jz4730_nand.c linux-2.6.24.3-RV10/./drivers/mtd/nand/jz4730_nand.c --- linux-2.6.24.3-p2010/./drivers/mtd/nand/jz4730_nand.c 2010-07-05 06:41:52.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/nand/jz4730_nand.c 2010-07-03 12:48:54.000000000 +0200 @@ -25,6 +25,7 @@ #include #define NAND_DATA_PORT 0xB4000000 /* read-write area */ +#define NAND_DATA_PORT_1 (0xB4000000 | 1 << 17 | 1 << 16) /* wjx add the second 2G nand flash read-write area */ #define __nand_ecc() (REG_EMC_NFECC & 0x00ffffff) #define __nand_ecc_enable() (REG_EMC_NFCSR |= EMC_NFCSR_ECCE | EMC_NFCSR_ERST) #define __nand_ecc_disable() (REG_EMC_NFCSR &= ~EMC_NFCSR_ECCE) @@ -33,6 +34,7 @@ * MTD structure for JzSOC board */ static struct mtd_info *jz_mtd = NULL; +static struct mtd_info *jz_mtd_1 = NULL; /* * Define partitions for flash devices @@ -67,7 +69,7 @@ static int partition_reserved_badblocks[ 2, /* reserved blocks of mtd1 */ 10, /* reserved blocks of mtd2 */ 10}; /* reserved blocks of mtd3 */ -#elif CONFIG_JZ4730_PMPV1 +#elif defined CONFIG_JZ4730_PMPV1 static struct mtd_partition partition_info[] = { { name: "NAND ROOTFS partition", offset: 3 * 0x100000, @@ -79,6 +81,38 @@ static struct mtd_partition partition_in static int partition_reserved_badblocks[]={ 10, 10}; +#elif defined CONFIG_JZ4730_MINIPC +#define CONFIG_MTD_NAND_2G +//wjx +static struct mtd_partition partition_info[] = { + { name: "bootloader partition", + offset: 0 * 0x100000, + size: (1) * 0x100000}, + { name: "kernel partition", + offset: 1 * 0x100000, + size: (3) * 0x100000}, + { name: "mac partition", + offset: 4 * 0x100000, + size: (1) * 0x100000}, + { name: "mini rootfs partition", + offset: 5 * 0x100000, + size: (5) * 0x100000}, + { name: "yaffs2 rootfs partition", + offset: 10 * 0x100000, + size: 502 * 0x100000}, +}; + +#ifdef CONFIG_MTD_NAND_2G +static struct mtd_partition partition_info_1[] = { + { name: "extend 1G flash", + offset: 0 * 0x100000, + size: (1024) * 0x100000}, +}; +static int partition_reserved_badblocks[] = {0,0,0,2,40,40}; //wjx +#else +static int partition_reserved_badblocks[] = {0,0,0,2,40}; +#endif + #else static struct mtd_partition partition_info[] = { { name: "NAND ROOTFS partition", @@ -159,6 +193,7 @@ static void jz_device_setup(void) { /* Set NFE bit */ REG_EMC_NFCSR |= EMC_NFCSR_NFE; + REG_EMC_SMCR3 = 0x04444400; // ard: copied from skytone kernel whatever it is } static void jzsoc_nand_enable_hwecc(struct mtd_info* mtd, int mode) @@ -283,6 +318,8 @@ int __init jznand_init(void) { struct nand_chip *this; int nr_partitions; + struct nand_chip *this_1; + int nr_partitions_1; /* Allocate memory for MTD device structure and private data */ jz_mtd = kmalloc (sizeof(struct mtd_info) + sizeof (struct nand_chip), @@ -302,6 +339,27 @@ int __init jznand_init(void) /* Link the private data with the MTD structure */ jz_mtd->priv = this; +#ifdef CONFIG_MTD_NAND_2G + jz_mtd_1 = kmalloc (sizeof(struct mtd_info) + sizeof (struct nand_chip), + GFP_KERNEL); + if(!jz_mtd_1) { + printk ("Unable to allocate JzSOC NAND MTD device structure.\n"); + return -ENOMEM; + } + this_1 = (struct nand_chip *) (&jz_mtd_1[1]); + + memset((char *) jz_mtd_1, 0, sizeof(struct mtd_info)); + memset((char *) this_1, 0, sizeof(struct nand_chip)); + + jz_mtd_1->priv = this_1; + + this_1->IO_ADDR_R = (void __iomem *) NAND_DATA_PORT_1; + this_1->IO_ADDR_W = (void __iomem *) NAND_DATA_PORT_1; + this_1->cmd_ctrl = jz_hwcontrol; + this_1->dev_ready = jz_device_ready; +#endif + + /* Set & initialize NAND Flash controller */ jz_device_setup(); @@ -319,11 +377,25 @@ int __init jznand_init(void) this->ecc.size = 256; this->ecc.bytes = 3; +#ifdef CONFIG_MTD_NAND_2G + this_1->ecc.calculate = jzsoc_nand_calculate_ecc; + this_1->ecc.correct = jzsoc_nand_correct_data; + this_1->ecc.hwctl = jzsoc_nand_enable_hwecc; + this_1->ecc.mode = NAND_ECC_HW; + this_1->ecc.size = 256; + this_1->ecc.bytes = 3; +#endif #endif #ifdef CONFIG_MTD_SW_HM_ECC - this->eccmode = NAND_ECC_SOFT; + this->ecc.mode = NAND_ECC_SOFT; +#ifdef CONFIG_MTD_NAND_2G + this_1->ecc.mode = NAND_ECC_SOFT; #endif +#endif + /* MINIPC workaround: */ + this->ecc.mode = NAND_ECC_NONE; + this_1->ecc.mode = NAND_ECC_NONE; /* 20 us command delay time */ this->chip_delay = 20; @@ -336,8 +408,29 @@ int __init jznand_init(void) /* Register the partitions */ nr_partitions = sizeof(partition_info) / sizeof(struct mtd_partition); - printk (KERN_NOTICE "Creating %d MTD partitions on \"%s\":\n", nr_partitions, jz_mtd->name); + partition_info[nr_partitions - 1].size = (1 << this->chip_shift) - partition_info[nr_partitions - 1].offset; //wjx add_mtd_partitions(jz_mtd, partition_info, nr_partitions); +#ifdef CONFIG_MTD_NAND_2G + this_1->chip_delay = 20; + /* Scan to find existance of the device */ + if (nand_scan(jz_mtd_1, 1)) { + kfree (jz_mtd_1); + return -ENXIO; + } + /* Allocate memory for internal data buffer */ + // 2.6 kernel should do that already: + /* + this_1->data_buf = kmalloc (sizeof(u_char) * (jz_mtd_1->oobblock + jz_mtd_1->oobsize), GFP_KERNEL); + if (!this_1->data_buf) { + printk ("Unable to allocate NAND data buffer for JzSOC.\n"); + kfree (jz_mtd_1); + return -ENOMEM; + } + */ + nr_partitions_1 = sizeof(partition_info_1) / sizeof(struct mtd_partition); + partition_info_1[nr_partitions_1 - 1].size = (1 << this_1->chip_shift) - partition_info_1[nr_partitions_1 - 1].offset; //wjx + add_mtd_partitions(jz_mtd_1, partition_info_1, 1); +#endif return 0; } diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/nand/jz4730_nand.c.orig linux-2.6.24.3-RV10/./drivers/mtd/nand/jz4730_nand.c.orig --- linux-2.6.24.3-p2010/./drivers/mtd/nand/jz4730_nand.c.orig 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./drivers/mtd/nand/jz4730_nand.c.orig 2010-07-04 08:53:16.000000000 +0200 @@ -0,0 +1,367 @@ +/* + * linux/drivers/mtd/nand/jz4730_nand.c + * + * Copyright (c) 2005 - 2007 Ingenic Semiconductor Inc. + * + * Ingenic JZ4730 NAND driver + * + * 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. + */ + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#define NAND_DATA_PORT 0xB4000000 /* read-write area */ +#define __nand_ecc() (REG_EMC_NFECC & 0x00ffffff) +#define __nand_ecc_enable() (REG_EMC_NFCSR |= EMC_NFCSR_ECCE | EMC_NFCSR_ERST) +#define __nand_ecc_disable() (REG_EMC_NFCSR &= ~EMC_NFCSR_ECCE) + +/* + * MTD structure for JzSOC board + */ +static struct mtd_info *jz_mtd = NULL; + +/* + * Define partitions for flash devices + */ +#ifdef CONFIG_JZ4730_PMP +static struct mtd_partition partition_info[] = { + { name: "NAND BOOT partition", + offset: 0 * 0x100000, + size: 4 * 0x100000 }, + { name: "NAND KERNEL partition", + offset: 4 * 0x100000, + size: 4 * 0x100000 }, + { name: "NAND ROOTFS partition", + offset: 8 * 0x100000, + size: 56 * 0x100000 }, + { name: "NAND SSFDC partition", + offset: 64 * 0x100000, + size: 64 * 0x100000 }, +}; + +/* Define max reserved bad blocks for each partition. + * This is used by the mtdblock-jz.c NAND FTL driver only. + * + * The NAND FTL driver reserves some good blocks which can't be + * seen by the upper layer. When the bad block number of a partition + * exceeds the max reserved blocks, then there is no more reserved + * good blocks to be used by the NAND FTL driver when another bad + * block generated. + */ +static int partition_reserved_badblocks[]= { + 2, /* reserved blocks of mtd0 */ + 2, /* reserved blocks of mtd1 */ + 10, /* reserved blocks of mtd2 */ + 10}; /* reserved blocks of mtd3 */ +#elif CONFIG_JZ4730_PMPV1 +static struct mtd_partition partition_info[] = { + { name: "NAND ROOTFS partition", + offset: 3 * 0x100000, + size: (32-3) * 0x100000 }, + { name: "NAND DATAFS partition", + offset: 32 * 0x100000, + size: 32 * 0x100000 }, +}; +static int partition_reserved_badblocks[]={ + 10, + 10}; +#else +static struct mtd_partition partition_info[] = { + { name: "NAND ROOTFS partition", + offset: 3 * 0x100000, + size: (128-3) * 0x100000 }, +}; +static int partition_reserved_badblocks[]={ + 20}; +#endif + +/*------------------------------------------------------------------------- + * Following three functions are exported and used by the mtdblock-jz.c + * NAND FTL driver only. + */ + +unsigned short get_mtdblock_write_verify_enable(void) +{ +#ifdef CONFIG_MTD_MTDBLOCK_WRITE_VERIFY_ENABLE + return 1; +#endif + return 0; +} +EXPORT_SYMBOL(get_mtdblock_write_verify_enable); + +unsigned short get_mtdblock_oob_copies(void) +{ + return CONFIG_MTD_OOB_COPIES; +} +EXPORT_SYMBOL(get_mtdblock_oob_copies); + +int *get_jz_badblock_table(void) +{ + return partition_reserved_badblocks; +} +EXPORT_SYMBOL(get_jz_badblock_table); + +/*-------------------------------------------------------------------------*/ + +static void jz_hwcontrol(struct mtd_info *mtd, int dat, + unsigned int ctrl) +{ + struct nand_chip *this = (struct nand_chip *)(mtd->priv); + unsigned int nandaddr = (unsigned int)this->IO_ADDR_W; + + if (ctrl & NAND_CTRL_CHANGE) { + if ( ctrl & NAND_ALE ) + nandaddr = (unsigned int)((unsigned long)(this->IO_ADDR_W) | 0x00080000); + else + nandaddr = (unsigned int)((unsigned long)(this->IO_ADDR_W) & ~0x00080000); + + if ( ctrl & NAND_CLE ) + nandaddr = nandaddr | 0x00040000; + else + nandaddr = nandaddr & ~0x00040000; + if ( ctrl & NAND_NCE ) + REG_EMC_NFCSR |= EMC_NFCSR_FCE; + else + REG_EMC_NFCSR &= ~EMC_NFCSR_FCE; + } + + this->IO_ADDR_W = (void __iomem *)nandaddr; + if (dat != NAND_CMD_NONE) + writeb(dat , this->IO_ADDR_W); + +} + +static int jz_device_ready(struct mtd_info *mtd) +{ + int ready; + ready = (REG_EMC_NFCSR & EMC_NFCSR_RB) ? 1 : 0; + return ready; +} + +/* + * EMC setup + */ +static void jz_device_setup(void) +{ + /* Set NFE bit */ + REG_EMC_NFCSR |= EMC_NFCSR_NFE; +} + +static void jzsoc_nand_enable_hwecc(struct mtd_info* mtd, int mode) +{ + __nand_ecc_enable(); +} + +static int jzsoc_nand_calculate_ecc(struct mtd_info* mtd, const u_char* dat, + u_char* ecc_code) +{ + unsigned int calc_ecc; + unsigned char *tmp; + + __nand_ecc_disable(); + + calc_ecc = ~(__nand_ecc()) | 0x00030000; + + tmp = (unsigned char *)&calc_ecc; + + ecc_code[0] = tmp[1]; + ecc_code[1] = tmp[0]; + ecc_code[2] = tmp[2]; + + return 0; +} + +/* ECC handling functions */ + +static int jzsoc_nand_correct_data(struct mtd_info *mtd, u_char *dat, + u_char *read_ecc, u_char *calc_ecc) +{ + u_char a, b, c, d1, d2, d3, add, bit, i; + + /* Do error detection */ + d1 = calc_ecc[0] ^ read_ecc[0]; + d2 = calc_ecc[1] ^ read_ecc[1]; + d3 = calc_ecc[2] ^ read_ecc[2]; + + if ((d1 | d2 | d3) == 0) { + /* No errors */ + return 0; + } + else { + a = (d1 ^ (d1 >> 1)) & 0x55; + b = (d2 ^ (d2 >> 1)) & 0x55; + c = (d3 ^ (d3 >> 1)) & 0x54; + + /* Found and will correct single bit error in the data */ + if ((a == 0x55) && (b == 0x55) && (c == 0x54)) { + c = 0x80; + add = 0; + a = 0x80; + for (i=0; i<4; i++) { + if (d1 & c) + add |= a; + c >>= 2; + a >>= 1; + } + c = 0x80; + for (i=0; i<4; i++) { + if (d2 & c) + add |= a; + c >>= 2; + a >>= 1; + } + bit = 0; + b = 0x04; + c = 0x80; + for (i=0; i<3; i++) { + if (d3 & c) + bit |= b; + c >>= 2; + b >>= 1; + } + b = 0x01; + a = dat[add]; + a ^= (b << bit); + dat[add] = a; + return 0; + } + else { + i = 0; + while (d1) { + if (d1 & 0x01) + ++i; + d1 >>= 1; + } + while (d2) { + if (d2 & 0x01) + ++i; + d2 >>= 1; + } + while (d3) { + if (d3 & 0x01) + ++i; + d3 >>= 1; + } + if (i == 1) { + /* ECC Code Error Correction */ + read_ecc[0] = calc_ecc[0]; + read_ecc[1] = calc_ecc[1]; + read_ecc[2] = calc_ecc[2]; + return 0; + } + else { + /* Uncorrectable Error */ + printk("uncorrectable ECC error\n"); + return -1; + } + } + } + + /* Should never happen */ + return -1; +} + + +/* + * Main initialization routine + */ +int __init jznand_init(void) +{ + struct nand_chip *this; + int nr_partitions; + + /* Allocate memory for MTD device structure and private data */ + jz_mtd = kmalloc (sizeof(struct mtd_info) + sizeof (struct nand_chip), + GFP_KERNEL); + if (!jz_mtd) { + printk ("Unable to allocate JzSOC NAND MTD device structure.\n"); + return -ENOMEM; + } + + /* Get pointer to private data */ + this = (struct nand_chip *) (&jz_mtd[1]); + + /* Initialize structures */ + memset((char *) jz_mtd, 0, sizeof(struct mtd_info)); + memset((char *) this, 0, sizeof(struct nand_chip)); + + /* Link the private data with the MTD structure */ + jz_mtd->priv = this; + + /* Set & initialize NAND Flash controller */ + jz_device_setup(); + + /* Set address of NAND IO lines */ + this->IO_ADDR_R = (void __iomem *) NAND_DATA_PORT; + this->IO_ADDR_W = (void __iomem *) NAND_DATA_PORT; + this->cmd_ctrl = jz_hwcontrol; + this->dev_ready = jz_device_ready; + +#ifdef CONFIG_MTD_HW_HM_ECC + this->ecc.calculate = jzsoc_nand_calculate_ecc; + this->ecc.correct = jzsoc_nand_correct_data; + this->ecc.hwctl = jzsoc_nand_enable_hwecc; + this->ecc.mode = NAND_ECC_HW; + this->ecc.size = 256; + this->ecc.bytes = 3; + +#endif + +#ifdef CONFIG_MTD_SW_HM_ECC + this->eccmode = NAND_ECC_SOFT; +#endif + + /* 20 us command delay time */ + this->chip_delay = 20; + + /* Scan to find existance of the device */ + if (nand_scan(jz_mtd, 1)) { + kfree (jz_mtd); + return -ENXIO; + } + + /* Register the partitions */ + nr_partitions = sizeof(partition_info) / sizeof(struct mtd_partition); + printk (KERN_NOTICE "Creating %d MTD partitions on \"%s\":\n", nr_partitions, jz_mtd->name); + add_mtd_partitions(jz_mtd, partition_info, nr_partitions); + + return 0; +} +module_init(jznand_init); + +/* + * Clean up routine + */ +#ifdef MODULE +static void __exit jznand_cleanup(void) +{ + struct nand_chip *this = (struct nand_chip *) &jz_mtd[1]; + + /* Unregister partitions */ + del_mtd_partitions(jz_mtd); + + /* Unregister the device */ + del_mtd_device (jz_mtd); + + /* Free internal data buffers */ + kfree (this->data_buf); + + /* Free the MTD device structure */ + kfree (jz_mtd); +} +module_exit(jznand_cleanup); +#endif diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/nand/jz4730_nand.c.rej linux-2.6.24.3-RV10/./drivers/mtd/nand/jz4730_nand.c.rej --- linux-2.6.24.3-p2010/./drivers/mtd/nand/jz4730_nand.c.rej 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./drivers/mtd/nand/jz4730_nand.c.rej 2010-07-04 08:54:28.000000000 +0200 @@ -0,0 +1,39 @@ +*************** int __init jznand_init(void) +*** 336,342 **** + + /* Register the partitions */ + nr_partitions = sizeof(partition_info) / sizeof(struct mtd_partition); + add_mtd_partitions(jz_mtd, partition_info, nr_partitions); + + return 0; + } +--- 408,436 ---- + + /* Register the partitions */ + nr_partitions = sizeof(partition_info) / sizeof(struct mtd_partition); ++ partition_info[nr_partitions - 1].size = (1 << this->chip_shift) - partition_info[nr_partitions - 1].offset; //wjx + add_mtd_partitions(jz_mtd, partition_info, nr_partitions); ++ #ifdef CONFIG_MTD_NAND_2G ++ this_1->chip_delay = 20; ++ /* Scan to find existance of the device */ ++ if (nand_scan(jz_mtd_1, 1)) { ++ kfree (jz_mtd_1); ++ return -ENXIO; ++ } ++ /* Allocate memory for internal data buffer */ ++ // 2.6 kernel should do that already: ++ /* ++ this_1->data_buf = kmalloc (sizeof(u_char) * (jz_mtd_1->oobblock + jz_mtd_1->oobsize), GFP_KERNEL); ++ if (!this_1->data_buf) { ++ printk ("Unable to allocate NAND data buffer for JzSOC.\n"); ++ kfree (jz_mtd_1); ++ return -ENOMEM; ++ } ++ */ ++ nr_partitions_1 = sizeof(partition_info_1) / sizeof(struct mtd_partition); ++ partition_info_1[nr_partitions_1 - 1].size = (1 << this_1->chip_shift) - partition_info_1[nr_partitions_1 - 1].offset; //wjx ++ add_mtd_partitions(jz_mtd_1, partition_info_1, 1); ++ #endif + + return 0; + } diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/nand/jz4740_nand.c linux-2.6.24.3-RV10/./drivers/mtd/nand/jz4740_nand.c --- linux-2.6.24.3-p2010/./drivers/mtd/nand/jz4740_nand.c 2010-07-05 06:41:52.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/nand/jz4740_nand.c 2010-07-03 12:48:54.000000000 +0200 @@ -15,7 +15,6 @@ #include #include #include -#include #include #include @@ -25,10 +24,7 @@ #include #include -#define NAND_DATA_PORT1 0xB8000000 /* read-write area in static bank 1 */ -#define NAND_DATA_PORT2 0xB4000000 /* read-write area in static bank 2 */ -#define NAND_DATA_PORT3 0xAC000000 /* read-write area in static bank 3 */ -#define NAND_DATA_PORT4 0xA8000000 /* read-write area in static bank 4 */ +#define NAND_DATA_PORT 0xB8000000 /* read-write area */ #define PAR_SIZE 9 @@ -52,37 +48,30 @@ * MTD structure for JzSOC board */ static struct mtd_info *jz_mtd = NULL; -extern struct mtd_info *jz_mtd1; -extern char all_use_planes; -extern int global_page; /* for two-plane operations */ - -int nr_partitions; /* Number of partitions */ /* * Define partitions for flash devices */ #ifdef CONFIG_JZ4740_PAVO -struct mtd_partition partition_info[] = { +static struct mtd_partition partition_info[] = { {name:"NAND BOOT partition", offset:0 * 0x100000, - size:4 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1}, + size: 4 * 0x100000 }, {name:"NAND KERNEL partition", offset:4 * 0x100000, - size:4 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1}, + size: 4 * 0x100000 }, {name:"NAND ROOTFS partition", offset:8 * 0x100000, - size:504 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1}, + size: 120 * 0x100000 }, + { name: "NAND DATA1 partition", + offset: 128 * 0x100000, + size: 128 * 0x100000 }, + { name: "NAND DATA2 partition", + offset: 256 * 0x100000, + size: 256 * 0x100000 }, {name:"NAND VFAT partition", offset:512 * 0x100000, - size:512 * 0x100000, - use_planes: 1, - mtdblock_jz_invalid: 0}, + size: 512 * 0x100000 }, }; @@ -105,27 +94,19 @@ static int partition_reserved_badblocks[ #endif /* CONFIG_JZ4740_PAVO */ #ifdef CONFIG_JZ4740_LEO -struct mtd_partition partition_info[] = { +static struct mtd_partition partition_info[] = { { name: "NAND BOOT partition", offset: 0 * 0x100000, - size: 4 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1 }, + size: 4 * 0x100000 }, { name: "NAND KERNEL partition", offset: 4 * 0x100000, - size: 4 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1 }, + size: 4 * 0x100000 }, { name: "NAND ROOTFS partition", offset: 8 * 0x100000, - size: 56 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1 }, + size: 56 * 0x100000 }, { name: "NAND VFAT partition", offset: 64 * 0x100000, - size: 64 * 0x100000, - use_planes: 1, - mtdblock_jz_invalid: 0 }, + size: 64 * 0x100000 }, }; static int partition_reserved_badblocks[] = { 2, /* reserved blocks of mtd0 */ @@ -135,37 +116,25 @@ static int partition_reserved_badblocks[ #endif /* CONFIG_JZ4740_LEO */ #ifdef CONFIG_JZ4740_LYRA -struct mtd_partition partition_info[] = { +static struct mtd_partition partition_info[] = { { name: "NAND BOOT partition", offset: 0 * 0x100000, - size: 4 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1 }, + size: 4 * 0x100000 }, { name: "NAND KERNEL partition", offset: 4 * 0x100000, - size: 4 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1 }, + size: 4 * 0x100000 }, { name: "NAND ROOTFS partition", offset: 8 * 0x100000, - size: 120 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1 }, + size: 120 * 0x100000 }, { name: "NAND DATA1 partition", offset: 128 * 0x100000, - size: 128 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1 }, + size: 128 * 0x100000 }, { name: "NAND DATA2 partition", offset: 256 * 0x100000, - size: 256 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1 }, + size: 256 * 0x100000 }, { name: "NAND VFAT partition", offset: 512 * 0x100000, - size: 512 * 0x100000, - use_planes: 1, - mtdblock_jz_invalid: 0 }, + size: 512 * 0x100000 }, }; /* Define max reserved bad blocks for each partition. @@ -187,27 +156,19 @@ static int partition_reserved_badblocks[ #endif /* CONFIG_JZ4740_LYRA */ #ifdef CONFIG_JZ4725_DIPPER -struct mtd_partition partition_info[] = { +static struct mtd_partition partition_info[] = { { name: "NAND BOOT partition", offset: 0 * 0x100000, - size: 4 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1 }, + size: 4 * 0x100000 }, { name: "NAND KERNEL partition", offset: 4 * 0x100000, - size: 4 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1 }, + size: 4 * 0x100000 }, { name: "NAND ROOTFS partition", offset: 8 * 0x100000, - size: 56 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1 }, + size: 56 * 0x100000 }, { name: "NAND VFAT partition", offset: 64 * 0x100000, - size: 64 * 0x100000, - use_planes: 1, - mtdblock_jz_invalid: 0 }, + size: 64 * 0x100000 }, }; /* Define max reserved bad blocks for each partition. @@ -227,37 +188,25 @@ static int partition_reserved_badblocks[ #endif /* CONFIG_JZ4740_DIPPER */ #ifdef CONFIG_JZ4720_VIRGO -struct mtd_partition partition_info[] = { +static struct mtd_partition partition_info[] = { { name: "NAND BOOT partition", offset: 0 * 0x100000, - size: 4 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1 }, + size: 4 * 0x100000 }, { name: "NAND KERNEL partition", offset: 4 * 0x100000, - size: 4 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1 }, + size: 4 * 0x100000 }, { name: "NAND ROOTFS partition", offset: 8 * 0x100000, - size: 120 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1 }, + size: 120 * 0x100000 }, { name: "NAND DATA1 partition", offset: 128 * 0x100000, - size: 128 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1 }, + size: 128 * 0x100000 }, { name: "NAND DATA2 partition", offset: 256 * 0x100000, - size: 256 * 0x100000, - use_planes: 0, - mtdblock_jz_invalid: 1 }, + size: 256 * 0x100000 }, { name: "NAND VFAT partition", offset: 512 * 0x100000, - size: 512 * 0x100000, - use_planes: 1, - mtdblock_jz_invalid: 0 }, + size: 512 * 0x100000 }, }; @@ -311,50 +260,8 @@ static void jz_hwcontrol(struct mtd_info { struct nand_chip *this = (struct nand_chip *)(mtd->priv); unsigned int nandaddr = (unsigned int)this->IO_ADDR_W; - extern u8 nand_nce; /* in nand_base.c, indicates which chip select is used for current nand chip */ if (ctrl & NAND_CTRL_CHANGE) { - if (ctrl & NAND_NCE) { - switch (nand_nce) { - case NAND_NCE1: - this->IO_ADDR_W = this->IO_ADDR_R = (void __iomem *)NAND_DATA_PORT1; - REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE2; - REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE3; - REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE4; - REG_EMC_NFCSR |= EMC_NFCSR_NFCE1; - break; - case NAND_NCE2: - this->IO_ADDR_W = this->IO_ADDR_R = (void __iomem *)NAND_DATA_PORT2; - REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE1; - REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE3; - REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE4; - REG_EMC_NFCSR |= EMC_NFCSR_NFCE2; - break; - case NAND_NCE3: - this->IO_ADDR_W = this->IO_ADDR_R = (void __iomem *)NAND_DATA_PORT3; - REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE1; - REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE2; - REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE4; - REG_EMC_NFCSR |= EMC_NFCSR_NFCE3; - break; - case NAND_NCE4: - this->IO_ADDR_W = this->IO_ADDR_R = (void __iomem *)NAND_DATA_PORT4; - REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE1; - REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE2; - REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE3; - REG_EMC_NFCSR |= EMC_NFCSR_NFCE4; - break; - default: - printk("error: no nand_nce 0x%x\n",nand_nce); - break; - } - } else { - REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE1; - REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE2; - REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE3; - REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE4; - } - if ( ctrl & NAND_ALE ) nandaddr = (unsigned int)((unsigned long)(this->IO_ADDR_W) | 0x00010000); else @@ -364,6 +271,10 @@ static void jz_hwcontrol(struct mtd_info nandaddr = nandaddr | 0x00008000; else nandaddr = nandaddr & ~0x00008000; + if ( ctrl & NAND_NCE ) + REG_EMC_NFCSR |= EMC_NFCSR_NFCE1; + else + REG_EMC_NFCSR &= ~EMC_NFCSR_NFCE1; } this->IO_ADDR_W = (void __iomem *)nandaddr; @@ -384,42 +295,12 @@ static int jz_device_ready(struct mtd_in */ static void jz_device_setup(void) { -// PORT 0: -// ... -// PORT 1: -// PIN/BIT N FUNC0 FUNC1 -// 25 CS1# - -// 26 CS2# - -// 27 CS3# - -// 28 CS4# - -#define GPIO_CS2_N (32+26) -#define GPIO_CS3_N (32+27) -#define GPIO_CS4_N (32+28) -#define SMCR_VAL 0x0d221200 - /* Set NFE bit */ REG_EMC_NFCSR |= EMC_NFCSR_NFE1; - /* Read/Write timings */ - REG_EMC_SMCR1 = SMCR_VAL; - -#if defined(CONFIG_MTD_NAND_CS2) - /* Set CS2# pin as function 0 */ - __gpio_as_func0(GPIO_CS2_N); - REG_EMC_NFCSR |= EMC_NFCSR_NFE2; - REG_EMC_SMCR2 = SMCR_VAL; -#endif -#if defined(CONFIG_MTD_NAND_CS3) - __gpio_as_func0(GPIO_CS3_N); - REG_EMC_NFCSR |= EMC_NFCSR_NFE3; - REG_EMC_SMCR3 = SMCR_VAL; -#endif - -#if defined(CONFIG_MTD_NAND_CS4) - __gpio_as_func0(GPIO_CS4_N); - REG_EMC_NFCSR |= EMC_NFCSR_NFE4; - REG_EMC_SMCR4 = SMCR_VAL; -#endif + /* Read/Write timings */ + REG_EMC_SMCR1 = 0x04444400; +// REG_EMC_SMCR1 = 0x0fff7700; } #ifdef CONFIG_MTD_HW_HM_ECC @@ -601,7 +482,8 @@ static int jzsoc_nand_rs_correct_data(st if (stat & EMC_NFINTS_UNCOR) { printk("NAND: Uncorrectable ECC error\n"); return -1; - } else { + } + else { u32 errcnt = (stat & EMC_NFINTS_ERRCNT_MASK) >> EMC_NFINTS_ERRCNT_BIT; switch (errcnt) { case 4: @@ -643,295 +525,13 @@ static int jzsoc_nand_calculate_rs_ecc(s #endif /* CONFIG_MTD_HW_RS_ECC */ -/* Nand optimized functions */ -static int dma_chan; -static unsigned int dma_src_phys_addr, dma_dst_phys_addr; -extern int jz_request_dma(int dev_id, const char *dev_str, - irqreturn_t (*irqhandler)(int, void *), - unsigned long irqflags, void *irq_dev_id); - -static void dma_setup(void) -{ - /* Request DMA channel and setup irq handler */ - dma_chan = jz_request_dma(DMA_ID_AUTO, "auto", NULL, IRQF_DISABLED, NULL); - if (dma_chan < 0) { - printk("Setup irq for nand failed!\n"); - return; - } else - printk("Nand DMA request channel %d.\n",dma_chan); -} - -static void jz4740_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len) -{ - int i; - struct nand_chip *chip = mtd->priv; - - if ((len <= 32) || (len & 0xf) || ((u32)buf >= (u32)high_memory)) - { - for (i = 0; i < len; i++) - buf[i] = readb(chip->IO_ADDR_R); - } else { - REG_DMAC_DRSR(dma_chan) = DMAC_DRSR_RS_AUTO; - dma_src_phys_addr = CPHYSADDR(chip->IO_ADDR_R); - dma_dst_phys_addr = CPHYSADDR(buf); - dma_cache_inv((u32)buf, len); - REG_DMAC_DSAR(dma_chan) = dma_src_phys_addr; - REG_DMAC_DTAR(dma_chan) = dma_dst_phys_addr; - REG_DMAC_DTCR(dma_chan) = len / 16; - REG_DMAC_DCMD(dma_chan) = DMAC_DCMD_DAI | DMAC_DCMD_SWDH_8 | DMAC_DCMD_DWDH_32 | DMAC_DCMD_DS_16BYTE; - REG_DMAC_DCCSR(dma_chan) = DMAC_DCCSR_NDES | DMAC_DCCSR_EN; - REG_DMAC_DMACR = DMAC_DMACR_DMAE; /* global DMA enable bit */ - - while(!(REG_DMAC_DCCSR(dma_chan) & DMAC_DCCSR_TT)); - REG_DMAC_DCCSR(dma_chan) &= ~DMAC_DCCSR_EN; /* disable DMA */ - __dmac_channel_clear_transmit_end(dma_chan); - } -} - -static void jz4740_nand_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len) -{ - int i; - struct nand_chip *chip = mtd->priv; - - if ((len <= 32) || (len & 0xf) || ((u32)buf >= (u32)high_memory)) - { - for (i = 0; i < len; i++) - writeb(buf[i], chip->IO_ADDR_W); - } else { - REG_DMAC_DRSR(dma_chan) = DMAC_DRSR_RS_AUTO; - dma_dst_phys_addr = CPHYSADDR(chip->IO_ADDR_R); - dma_src_phys_addr = CPHYSADDR(buf); - dma_cache_wback((unsigned long)buf, len); - REG_DMAC_DSAR(dma_chan) = dma_src_phys_addr; - REG_DMAC_DTAR(dma_chan) = dma_dst_phys_addr; - REG_DMAC_DTCR(dma_chan) = len / 16; - REG_DMAC_DCMD(dma_chan) = DMAC_DCMD_SAI | DMAC_DCMD_SWDH_32 | DMAC_DCMD_DWDH_8 | DMAC_DCMD_DS_16BYTE ; - REG_DMAC_DCCSR(dma_chan) = DMAC_DCCSR_NDES | DMAC_DCCSR_EN; - REG_DMAC_DMACR = DMAC_DMACR_DMAE; /* global DMA enable bit */ - - while(!(REG_DMAC_DCCSR(dma_chan) & DMAC_DCCSR_TT)); - REG_DMAC_DCCSR(dma_chan) &= ~DMAC_DCCSR_EN; /* disable DMA */ - __dmac_channel_clear_transmit_end(dma_chan); - } -} - -static int nand_read_page_hwecc_rs_planes(struct mtd_info *mtd, struct nand_chip *chip, - uint8_t *buf) -{ - int i, eccsize = chip->ecc.size; - int eccbytes = chip->ecc.bytes; - int eccsteps = chip->ecc.steps >> 1; - uint8_t *p; - uint8_t *ecc_calc = chip->buffers->ecccalc; - uint8_t *ecc_code = chip->buffers->ecccode; - uint32_t *eccpos = chip->ecc.layout->eccpos; - uint32_t page; - uint8_t flag = 0; - int oobsize = mtd->oobsize >> 1; - int ppb = mtd->erasesize / mtd->writesize; - int ecctotal = chip->ecc.total >> 1; - - page = (global_page / ppb) * ppb + global_page; /* = global_page%ppb + (global_page/ppb)*ppb*2 */ - - /* Read first page */ - chip->cmdfunc(mtd, NAND_CMD_READOOB, 0, page); - chip->read_buf(mtd, chip->oob_poi, oobsize); - for (i = 0; i < ecctotal; i++) { - ecc_code[i] = chip->oob_poi[eccpos[i]]; - if (ecc_code[i] != 0xff) flag = 1; - } - - p = buf; - chip->cmdfunc(mtd, NAND_CMD_RNDOUT, 0x00, -1); - for (i = 0 ; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { - int stat; - if (flag) { - chip->ecc.hwctl(mtd, NAND_ECC_READ); - chip->read_buf(mtd, p, eccsize); - stat = chip->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]); - if (stat < 0) - mtd->ecc_stats.failed++; - else - mtd->ecc_stats.corrected += stat; - } - else { - chip->ecc.hwctl(mtd, NAND_ECC_READ); - chip->read_buf(mtd, p, eccsize); - } - } - /* Read second page */ - page += ppb; - flag = 0; - chip->cmdfunc(mtd, NAND_CMD_READOOB, 0, page); - chip->read_buf(mtd, chip->oob_poi + oobsize, oobsize); - for (i = 0; i < ecctotal; i++) { - ecc_code[i] = chip->oob_poi[oobsize + eccpos[i]]; - if (ecc_code[i] != 0xff) flag = 1; - } - - chip->cmdfunc(mtd, NAND_CMD_RNDOUT, 0x00, -1); - eccsteps = chip->ecc.steps >> 1; - for (i = 0 ; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { - int stat; - if (flag) { - chip->ecc.hwctl(mtd, NAND_ECC_READ); - chip->read_buf(mtd, p, eccsize); - stat = chip->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]); - if (stat < 0) - mtd->ecc_stats.failed++; - else - mtd->ecc_stats.corrected += stat; - } - else { - chip->ecc.hwctl(mtd, NAND_ECC_READ); - chip->read_buf(mtd, p, eccsize); - } - } - - return 0; -} - -static int nand_read_oob_std_planes(struct mtd_info *mtd, struct nand_chip *chip, - int global_page, int sndcmd) -{ - int page; - int oobsize = mtd->oobsize >> 1; - int ppb = mtd->erasesize / mtd->writesize; - - page = (global_page / ppb) * ppb + global_page; /* = global_page%ppb + (global_page/ppb)*ppb*2 */ - - /* Read first page OOB */ - if (sndcmd) { - chip->cmdfunc(mtd, NAND_CMD_READOOB, 0, page); - } - chip->read_buf(mtd, chip->oob_poi, oobsize); - /* Read second page OOB */ - page += ppb; - if (sndcmd) { - chip->cmdfunc(mtd, NAND_CMD_READOOB, 0, page); - sndcmd = 0; - } - chip->read_buf(mtd, chip->oob_poi+oobsize, oobsize); - return 0; -} - -static int nand_write_oob_std_planes(struct mtd_info *mtd, struct nand_chip *chip, - int global_page) -{ - int status = 0,page; - int pagesize = mtd->writesize >> 1; - int oobsize = mtd->oobsize >> 1; - int ppb = mtd->erasesize / mtd->writesize; - const uint8_t *buf = chip->oob_poi; - - page = (global_page / ppb) * ppb + global_page; /* = global_page%ppb + (global_page/ppb)*ppb*2 */ - - /* send cmd 0x80, the MSB should be valid if realplane is 4 */ - if (chip->realplanenum == 2) - chip->cmdfunc(mtd, 0x80, pagesize, 0x00); - else - chip->cmdfunc(mtd, 0x80, pagesize, page & (1 << (chip->chip_shift - chip->page_shift))); - - chip->write_buf(mtd, buf, oobsize); - /* Send first command to program the OOB data */ - chip->cmdfunc(mtd, 0x11, -1, -1); - ndelay(100); - status = chip->waitfunc(mtd, chip); - - page += ppb; - buf += oobsize; - chip->cmdfunc(mtd, 0x81, pagesize, page); - chip->write_buf(mtd, buf, oobsize); - /* Send command to program the OOB data */ - chip->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1); - /* Wait long R/B */ - ndelay(100); - status = chip->waitfunc(mtd, chip); - - return status & NAND_STATUS_FAIL ? -EIO : 0; -} - -static void nand_write_page_hwecc_planes(struct mtd_info *mtd, struct nand_chip *chip, - const uint8_t *buf) -{ - int i, eccsize = chip->ecc.size; - int eccbytes = chip->ecc.bytes; - int eccsteps = chip->ecc.steps >> 1; - uint8_t *ecc_calc = chip->buffers->ecccalc; - uint8_t *p = (uint8_t *)buf; - uint32_t *eccpos = chip->ecc.layout->eccpos; - int oobsize = mtd->oobsize >> 1; - int ppb = mtd->erasesize / mtd->writesize; - int ecctotal = chip->ecc.total >> 1; - int page; - - page = (global_page / ppb) * ppb + global_page; /* = global_page%ppb + (global_page/ppb)*ppb*2 */ - - /* send cmd 0x80, the MSB should be valid if realplane is 4 */ - if (chip->realplanenum == 2) - chip->cmdfunc(mtd, 0x80, 0x00, 0x00); - else - chip->cmdfunc(mtd, 0x80, 0x00, page & (1 << (chip->chip_shift - chip->page_shift))); - - for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { - chip->ecc.hwctl(mtd, NAND_ECC_WRITE); - chip->write_buf(mtd, p, eccsize); - chip->ecc.calculate(mtd, p, &ecc_calc[i]); - } - for (i = 0; i < ecctotal; i++) - chip->oob_poi[eccpos[i]] = ecc_calc[i]; - - chip->write_buf(mtd, chip->oob_poi, oobsize); - - chip->cmdfunc(mtd, 0x11, -1, -1); /* send cmd 0x11 */ - ndelay(100); - while(!chip->dev_ready(mtd)); - - page += ppb; - chip->cmdfunc(mtd, 0x81, 0x00, page); /* send cmd 0x81 */ - eccsteps = chip->ecc.steps >> 1; - for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { - chip->ecc.hwctl(mtd, NAND_ECC_WRITE); - chip->write_buf(mtd, p, eccsize); - chip->ecc.calculate(mtd, p, &ecc_calc[i]); - } - - for (i = 0; i < ecctotal; i++) - chip->oob_poi[eccpos[i]] = ecc_calc[i]; - - chip->write_buf(mtd, chip->oob_poi, oobsize); -} - -static void single_erase_cmd_planes(struct mtd_info *mtd, int global_page) -{ - struct nand_chip *chip = mtd->priv; - - /* Send commands to erase a block */ - int page; - int ppb = mtd->erasesize / mtd->writesize; - - page = (global_page / ppb) * ppb + global_page; /* = global_page%ppb + (global_page/ppb)*ppb*2 */ - - /* send cmd 0x60, the MSB should be valid if realplane is 4 */ - if (chip->realplanenum == 2) - chip->cmdfunc(mtd, 0x60, -1, 0x00); - else - chip->cmdfunc(mtd, 0x60, -1, page & (1 << (chip->chip_shift - chip->page_shift))); - - page += ppb; - chip->cmdfunc(mtd, 0x60, -1, page & (~(ppb-1))); /* send cmd 0x60 */ - - chip->cmdfunc(mtd, NAND_CMD_ERASE2, -1, -1); /* send cmd 0xd0 */ - /* Do not need wait R/B or check status */ -} - /* * Main initialization routine */ int __init jznand_init(void) { struct nand_chip *this; - int ret, i; + int nr_partitions; /* Allocate memory for MTD device structure and private data */ jz_mtd = kmalloc (sizeof(struct mtd_info) + sizeof (struct nand_chip), @@ -941,14 +541,6 @@ int __init jznand_init(void) return -ENOMEM; } - jz_mtd1 = kmalloc (sizeof(struct mtd_info) + sizeof (struct nand_chip), - GFP_KERNEL); - if (!jz_mtd1) { - printk ("Unable to allocate JzSOC NAND MTD device structure 1.\n"); - kfree(jz_mtd); - return -ENOMEM; - } - /* Get pointer to private data */ this = (struct nand_chip *) (&jz_mtd[1]); @@ -963,8 +555,8 @@ int __init jznand_init(void) jz_device_setup(); /* Set address of NAND IO lines */ - this->IO_ADDR_R = (void __iomem *) NAND_DATA_PORT1; - this->IO_ADDR_W = (void __iomem *) NAND_DATA_PORT1; + this->IO_ADDR_R = (void __iomem *) NAND_DATA_PORT; + this->IO_ADDR_W = (void __iomem *) NAND_DATA_PORT; this->cmd_ctrl = jz_hwcontrol; this->dev_ready = jz_device_ready; @@ -993,59 +585,16 @@ int __init jznand_init(void) /* 20 us command delay time */ this->chip_delay = 20; -#ifdef CONFIG_MTD_NAND_DMA - dma_setup(); -#endif /* Scan to find existance of the device */ - ret = nand_scan_ident(jz_mtd, NAND_MAX_CHIPS); - if (!ret) { - if (this->planenum == 2) { - /* reset nand functions */ - this->erase_cmd = single_erase_cmd_planes; - this->ecc.read_page = nand_read_page_hwecc_rs_planes; //Muti planes read - this->ecc.write_page = nand_write_page_hwecc_planes; - this->ecc.read_oob = nand_read_oob_std_planes; - this->ecc.write_oob = nand_write_oob_std_planes; -#ifdef CONFIG_MTD_NAND_DMA - this->write_buf = jz4740_nand_write_buf; - this->read_buf = jz4740_nand_read_buf; -#endif - printk(KERN_INFO "Nand using two-plane mode, " - "and resized to writesize:%d oobsize:%d blocksize:0x%x \n", - jz_mtd->writesize, jz_mtd->oobsize, jz_mtd->erasesize); - } - } - - /* Determine whether all the partitions will use multiple planes if supported */ - nr_partitions = sizeof(partition_info) / sizeof(struct mtd_partition); - all_use_planes = 1; - for (i = 0; i < nr_partitions; i++) { - all_use_planes &= partition_info[i].use_planes; - } - - if (!ret) - ret = nand_scan_tail(jz_mtd); - - if (ret){ - kfree (jz_mtd1); + if (nand_scan(jz_mtd, 1)) { kfree (jz_mtd); return -ENXIO; } /* Register the partitions */ - printk (KERN_NOTICE "Creating %d MTD partitions on \"%s\":\n", nr_partitions, jz_mtd->name); - - if ((this->planenum == 2) && !all_use_planes) { - for (i = 0; i < nr_partitions; i++) { - if (partition_info[i].use_planes) - add_mtd_partitions(jz_mtd, &partition_info[i], 1); - else - add_mtd_partitions(jz_mtd1, &partition_info[i], 1); - } - } else { - kfree(jz_mtd1); + nr_partitions = sizeof(partition_info) / sizeof(struct mtd_partition); add_mtd_partitions(jz_mtd, partition_info, nr_partitions); - } + return 0; } module_init(jznand_init); @@ -1068,8 +617,6 @@ static void __exit jznand_cleanup(void) kfree (this->data_buf); /* Free the MTD device structure */ - if ((this->planenum == 2) && !all_use_planes) - kfree (jz_mtd1); kfree (jz_mtd); } module_exit(jznand_cleanup); diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/nand/Kconfig linux-2.6.24.3-RV10/./drivers/mtd/nand/Kconfig --- linux-2.6.24.3-p2010/./drivers/mtd/nand/Kconfig 2010-07-05 06:41:52.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/nand/Kconfig 2010-07-03 12:48:54.000000000 +0200 @@ -1,5 +1,5 @@ # drivers/mtd/nand/Kconfig -# $Id: Kconfig,v 1.3 2008-07-04 08:05:48 lhhuang Exp $ +# $Id: Kconfig,v 1.2 2008/05/27 04:39:22 jlwei Exp $ menuconfig MTD_NAND tristate "NAND Device Support" @@ -318,41 +318,12 @@ config MTD_NAND_JZ4740 help Support NAND Flash device on Jz4740 board -config MTD_NAND_JZ4750 - tristate "Support NAND Flash device on Jz4750 board" - depends on SOC_JZ4750 || SOC_JZ4750D || SOC_JZ4750L - help - Support NAND Flash device on Jz4750 board - -config MTD_NAND_CS2 - depends on MTD_NAND_JZ4740 || MTD_NAND_JZ4750 - bool 'Use NAND on CS2_N of JZSOC' - default n - -config MTD_NAND_CS3 - depends on MTD_NAND_JZ4740 || MTD_NAND_JZ4750 - bool 'Use NAND on CS3_N of JZSOC' - default n - -config MTD_NAND_CS4 - depends on MTD_NAND_JZ4740 || MTD_NAND_JZ4750 - bool 'Use NAND on CS4_N of JZSOC' - default n - -config MTD_NAND_MULTI_PLANE - depends on MTD_NAND_JZ4730 || MTD_NAND_JZ4740 || MTD_NAND_JZ4750 - bool 'Use multiple planes if the NAND supports' - default y - help - It is just supported on jz4740 now. - -if MTD_NAND_JZ4740 || MTD_NAND_JZ4730 || MTD_NAND_JZ4750 choice prompt "ECC type" + depends on MTD_NAND_JZ4740 || MTD_NAND_JZ4730 default CONFIG_MTD_SW_HM_ECC config MTD_HW_HM_ECC - depends on MTD_NAND_JZ4740 || MTD_NAND_JZ4730 bool 'Select hardware HM ECC' config MTD_SW_HM_ECC @@ -362,48 +333,8 @@ config MTD_HW_RS_ECC depends on MTD_NAND_JZ4740 bool 'Select hardware RS ECC' -config MTD_HW_BCH_ECC - depends on MTD_NAND_JZ4750 - bool 'Select hardware BCH ECC' endchoice -choice - prompt "4 bit or 8 bit BCH ecc" - depends on MTD_HW_BCH_ECC - default CONFIG_MTD_HW_BCH_4BIT - -config MTD_HW_BCH_4BIT - bool '4 bit' - -config MTD_HW_BCH_8BIT - bool '8 bit' - -endchoice - -config MTD_NAND_DMA - depends on MTD_HW_BCH_ECC || MTD_HW_RS_ECC - bool 'Use DMA mode' - help - This enables using DMA for reading and writing NAND flash, if not selected, - then CPU mode is used. DMA is only used for two planes for jz4740. - -config MTD_NAND_DMABUF - depends on MTD_NAND_DMA && MTD_HW_BCH_ECC - bool 'use DMA buffer in NAND driver' - help - It's better to say NO. If saying yes, DMA buffers will be allocated for - NAND reading and writing in NAND driver instead of upper layer. It's - slower. Just usable on CS1_N now. By saying NO, upper buffers will be - used as DMA buffer. It's faster, but kmalloc instead of vmalloc is required. -endif - -config ALLOCATE_MTDBLOCK_JZ_EARLY - bool "Allocate memory for mtdblock-jz early" - default n - help - Allocate memory (a nand block cache) for mtdblock-jz.c early in nand_base.c, - Especially for the vfat partition which will be used as USB disk by PC. - config MTD_MTDBLOCK_WRITE_VERIFY_ENABLE bool "MTDBLOCK write verify enable" default n diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/nand/Makefile linux-2.6.24.3-RV10/./drivers/mtd/nand/Makefile --- linux-2.6.24.3-p2010/./drivers/mtd/nand/Makefile 2010-07-05 06:41:52.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/nand/Makefile 2010-07-03 12:48:54.000000000 +0200 @@ -1,7 +1,7 @@ # # linux/drivers/nand/Makefile # -# $Id: Makefile,v 1.2 2008-07-04 08:07:45 lhhuang Exp $ +# $Id: Makefile,v 1.1.1.1 2008/03/28 04:29:21 jlwei Exp $ obj-$(CONFIG_MTD_NAND) += nand.o nand_ecc.o obj-$(CONFIG_MTD_NAND_IDS) += nand_ids.o @@ -31,6 +31,5 @@ obj-$(CONFIG_MTD_NAND_PLATFORM) += plat obj-$(CONFIG_MTD_ALAUDA) += alauda.o obj-$(CONFIG_MTD_NAND_JZ4730) += jz4730_nand.o obj-$(CONFIG_MTD_NAND_JZ4740) += jz4740_nand.o -obj-$(CONFIG_MTD_NAND_JZ4750) += jz4750_nand.o nand-objs := nand_base.o nand_bbt.o diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/nand/nand_base.c linux-2.6.24.3-RV10/./drivers/mtd/nand/nand_base.c --- linux-2.6.24.3-p2010/./drivers/mtd/nand/nand_base.c 2010-07-05 06:41:52.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/nand/nand_base.c 2010-07-03 12:48:54.000000000 +0200 @@ -52,23 +52,6 @@ #include #endif -#include - - -u8 nand_nce; /* indicates which chip select on JZSOC is used for current nand chip */ -int global_page; /* page index of large page used for nand with multiple planes */ -int global_mafid; /* ID of manufacture */ -struct mtd_info *jz_mtd1 = NULL; /* for 1 plane operation */ - -/* indicates whether multiple planes operation is used by all partitions - if multiple planes is supported by NAND */ -char all_use_planes = 1; - -/* The pointer to the address of block cache for partitions which work - over mtdblock-jz */ -extern struct mtd_partition partition_info[]; /* defined in jz47xx_nand.c */ -unsigned char **jz_mtdblock_cache = NULL; /* used by mtdblock-jz.c */ - /* Define default oob placement schemes for large and small page devices */ static struct nand_ecclayout nand_oob_8 = { .eccbytes = 3, @@ -89,30 +72,7 @@ static struct nand_ecclayout nand_oob_16 }; static struct nand_ecclayout nand_oob_64 = { -#if defined(CONFIG_MTD_HW_RS_ECC) -/* Reed-Solomon ECC */ - .eccbytes = 36, - .eccpos = { - 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63}, - .oobfree = { - {.offset = 2, - .length = 26}} -#elif defined(CONFIG_MTD_HW_BCH_ECC) -/* BCH ECC */ - .eccbytes = 28, - .eccpos = { - 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51}, - .oobfree = { - {.offset = 2, - .length = 22}} -#else +#ifndef CONFIG_MTD_HW_RS_ECC /* HW&SW Hamming ECC */ .eccbytes = 24, .eccpos = { @@ -122,87 +82,25 @@ static struct nand_ecclayout nand_oob_64 .oobfree = { {.offset = 2, .length = 38}} -#endif -}; - -static struct nand_ecclayout nand_oob_128 = { -#if defined(CONFIG_MTD_HW_RS_ECC) -/* Reed-Solomon ECC */ - .eccbytes = 72, - .eccpos = { - 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99}, - .oobfree = { - {.offset = 2, - .length = 26}, - {.offset = 100, - .length = 28}} -#elif defined(CONFIG_MTD_HW_BCH_ECC) -#if !defined(CONFIG_MTD_HW_BCH_8BIT) -/* 4-bit BCH ECC */ - .eccbytes = 56, - .eccpos = { - 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79}, - .oobfree = { - {.offset = 2, - .length = 22}, - {.offset = 80, - .length = 48}} #else -/* 8-bit BCH ECC */ - .eccbytes = 104, +/* Reed-Solomon ECC */ + .eccbytes = 36, .eccpos = { - 24, 25, 26, 27, 28, 29, 30, 31, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127}, - .oobfree = { - {.offset = 2, - .length = 22}} - -#endif -#else -/* HW&SW Hamming ECC */ - .eccbytes = 48, - .eccpos = { - 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127}, + 56, 57, 58, 59, 60, 61, 62, 63}, .oobfree = { {.offset = 2, - .length = 78}} + . length = 26}} #endif }; static int nand_get_device(struct nand_chip *chip, struct mtd_info *mtd, int new_state); -static int nand_do_write_oob(struct mtd_info *mtd, loff_mtd_t to, +static int nand_do_write_oob(struct mtd_info *mtd, loff_t to, struct mtd_oob_ops *ops); /* @@ -212,35 +110,6 @@ static int nand_do_write_oob(struct mtd_ DEFINE_LED_TRIGGER(nand_led_trigger); /** - * ffs_ll - find first bit set in a 64bit word. - * @word: The word to search - */ -static inline int ffs_ll(u64 word) -{ - u32 low = word & 0xffffffff; - u32 high = word >> 32; - int i; - - for(i = 0; i < 32; i++) { - if (low & 0x1) - break; - low >>= 1; - } - if (i == 32) { - for(i = 0; i < 32; i++) { - if (high & 0x1) - break; - high >>= 1; - } - i += 32; - } - if (i == 64) - return 0; - else - return (i+1); -} - -/** * nand_release_device - [GENERIC] release chip * @mtd: MTD device structure * @@ -260,22 +129,7 @@ static void nand_release_device(struct m wake_up(&chip->controller->wq); spin_unlock(&chip->controller->lock); } -#if 0 -static void dump_data(unsigned char * addr,int l) -{ - int i; - for (i = 0; i < l; i++) - { - if (i % 32 == 0) printk("\n"); - printk("%2x ",addr[i]); - } - printk("\n"); -} -#else -#define dump_data(addr,l) - -#endif /** * nand_read_byte - [DEFAULT] read one byte from the chip * @mtd: MTD device structure @@ -330,19 +184,6 @@ static void nand_select_chip(struct mtd_ chip->cmd_ctrl(mtd, NAND_CMD_NONE, 0 | NAND_CTRL_CHANGE); break; case 0: - nand_nce = NAND_NCE1; - chip->cmd_ctrl(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE); - break; - case 1: - nand_nce = NAND_NCE2; - chip->cmd_ctrl(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE); - break; - case 2: - nand_nce = NAND_NCE3; - chip->cmd_ctrl(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE); - break; - case 3: - nand_nce = NAND_NCE4; chip->cmd_ctrl(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE); break; @@ -473,18 +314,12 @@ static int nand_verify_buf16(struct mtd_ * * Check, if the block is bad. */ -static int nand_block_bad(struct mtd_info *mtd, loff_mtd_t ofs, int getchip) +static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip) { - int page, page1 = 0, chipnr, res = 0; + int page, chipnr, res = 0; struct nand_chip *chip = mtd->priv; u16 bad; - if (chip->planenum > 1) { - page = ((int)(ofs >> chip->page_shift) * chip->planenum + CONFIG_MTD_BADBLOCK_FLAG_PAGE); - page1 = page + mtd->erasesize / mtd->writesize; - page &= chip->pagemask; - page1 &= chip->pagemask; - } else page = ((int)(ofs >> chip->page_shift) + CONFIG_MTD_BADBLOCK_FLAG_PAGE) & chip->pagemask; if (getchip) { @@ -508,11 +343,6 @@ static int nand_block_bad(struct mtd_inf chip->cmdfunc(mtd, NAND_CMD_READOOB, chip->badblockpos, page); if (chip->read_byte(mtd) != 0xff) res = 1; - if (chip->planenum > 1) { - chip->cmdfunc(mtd, NAND_CMD_READOOB, chip->badblockpos, page1); - if (chip->read_byte(mtd) != 0xff) - res = 1; - } } if (getchip) @@ -529,7 +359,7 @@ static int nand_block_bad(struct mtd_inf * This is the default implementation, which can be overridden by * a hardware specific driver. */ -static int nand_default_block_markbad(struct mtd_info *mtd, loff_mtd_t ofs) +static int nand_default_block_markbad(struct mtd_info *mtd, loff_t ofs) { struct nand_chip *chip = mtd->priv; uint8_t buf[2] = { 0, 0 }; @@ -589,7 +419,7 @@ static int nand_check_wp(struct mtd_info * Check, if the block is bad. Either by reading the bad block table or * calling of the scan function. */ -static int nand_block_checkbad(struct mtd_info *mtd, loff_mtd_t ofs, int getchip, +static int nand_block_checkbad(struct mtd_info *mtd, loff_t ofs, int getchip, int allowbbt) { struct nand_chip *chip = mtd->priv; @@ -741,9 +571,6 @@ static void nand_command_lp(struct mtd_i /* Emulate NAND_CMD_READOOB */ if (command == NAND_CMD_READOOB) { - if (chip->planenum > 1) - column += (mtd->writesize / chip->planenum); - else column += mtd->writesize; command = NAND_CMD_READ0; } @@ -790,8 +617,6 @@ static void nand_command_lp(struct mtd_i case NAND_CMD_RNDIN: case NAND_CMD_STATUS: case NAND_CMD_DEPLETE1: - case 0x81: /* for two-plane page program */ - case 0x11: /* for two-plane page program */ return; /* @@ -867,6 +692,7 @@ nand_get_device(struct nand_chip *chip, spin_lock(lock); /* Hardware controller shared among independend devices */ + /* Hardware controller shared among independend devices */ if (!chip->controller->active) chip->controller->active = chip; @@ -1068,7 +894,7 @@ static int nand_read_page_hwecc_rs(struc eccsteps = chip->ecc.steps; p = buf; - chip->cmdfunc(mtd, NAND_CMD_RNDOUT, 0x00, -1); + chip->cmdfunc(mtd, NAND_CMD_READ0, 0x00, page); for (i = 0 ; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { int stat; if (flag) { @@ -1152,7 +978,7 @@ static int nand_read_page_syndrome(struc * @len: size of oob to transfer */ static uint8_t *nand_transfer_oob(struct nand_chip *chip, uint8_t *oob, - struct mtd_oob_ops *ops, size_mtd_t len) + struct mtd_oob_ops *ops, size_t len) { switch(ops->mode) { @@ -1164,7 +990,7 @@ static uint8_t *nand_transfer_oob(struct case MTD_OOB_AUTO: { struct nand_oobfree *free = chip->ecc.layout->oobfree; uint32_t boffs = 0, roffs = ops->ooboffs; - size_mtd_t bytes = 0; + size_t bytes = 0; for(; free->length && len; free++, len -= bytes) { /* Read request not from offset 0 ? */ @@ -1174,11 +1000,11 @@ static uint8_t *nand_transfer_oob(struct continue; } boffs = free->offset + roffs; - bytes = min_t(size_mtd_t, len, + bytes = min_t(size_t, len, (free->length - roffs)); roffs = 0; } else { - bytes = min_t(size_mtd_t, len, free->length); + bytes = min_t(size_t, len, free->length); boffs = free->offset; } memcpy(oob, chip->oob_poi + boffs, bytes); @@ -1201,7 +1027,7 @@ static uint8_t *nand_transfer_oob(struct * * Internal function. Called with chip held. */ -static int nand_do_read_ops(struct mtd_info *mtd, loff_mtd_t from, +static int nand_do_read_ops(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops) { int chipnr, page, realpage, col, bytes, aligned; @@ -1235,25 +1061,17 @@ static int nand_do_read_ops(struct mtd_i if (realpage != chip->pagebuf || oob) { bufpoi = aligned ? buf : chip->buffers->databuf; - global_page = page; -#if defined(CONFIG_MTD_HW_RS_ECC) - bufpoi[0] = (uint8_t)page; - bufpoi[1] = (uint8_t)(page >> 8); - bufpoi[2] = (uint8_t)(page >> 16); - bufpoi[3] = (uint8_t)(page >> 24); -#elif defined(CONFIG_SOC_JZ4730) - if (likely(sndcmd)) { - chip->cmdfunc(mtd, NAND_CMD_READ0, 0x00, page); - sndcmd = 0; - } -#else /* for jz4750 and later chip */ - if (mtd->flags & MTD_NAND_CPU_MODE) { +#ifndef CONFIG_MTD_HW_RS_ECC if (likely(sndcmd)) { chip->cmdfunc(mtd, NAND_CMD_READ0, 0x00, page); sndcmd = 0; } - } -#endif +#else + bufpoi[0] = (uint8_t)page; + bufpoi[1] = (uint8_t)(page >> 8); + bufpoi[2] = (uint8_t)(page >> 16); + bufpoi[3] = (uint8_t)(page >> 24); +#endif /* CONFIG_MTD_HW_RS_ECC */ /* Now read the page into the buffer */ if (unlikely(ops->mode == MTD_OOB_RAW)) @@ -1283,7 +1101,7 @@ static int nand_do_read_ops(struct mtd_i } } else buf = nand_transfer_oob(chip, - oob, ops, mtd->oobsize); + buf, ops, mtd->oobsize); } if (!(chip->options & NAND_NO_READRDY)) { @@ -1329,7 +1147,7 @@ static int nand_do_read_ops(struct mtd_i sndcmd = 1; } - ops->retlen = ops->len - (size_mtd_t) readlen; + ops->retlen = ops->len - (size_t) readlen; if (oob) ops->oobretlen = ops->ooblen - oobreadlen; @@ -1352,8 +1170,8 @@ static int nand_do_read_ops(struct mtd_i * * Get hold of the chip and call nand_do_read */ -static int nand_read(struct mtd_info *mtd, loff_mtd_t from, size_mtd_t len, - size_mtd_t *retlen, uint8_t *buf) +static int nand_read(struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, uint8_t *buf) { struct nand_chip *chip = mtd->priv; int ret; @@ -1526,7 +1344,7 @@ static int nand_write_oob_syndrome(struc * * NAND read out-of-band data from the spare area */ -static int nand_do_read_oob(struct mtd_info *mtd, loff_mtd_t from, +static int nand_do_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops) { int page, realpage, chipnr, sndcmd = 1; @@ -1619,7 +1437,7 @@ static int nand_do_read_oob(struct mtd_i * * NAND read data and/or out-of-band data */ -static int nand_read_oob(struct mtd_info *mtd, loff_mtd_t from, +static int nand_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops) { struct nand_chip *chip = mtd->priv; @@ -1782,17 +1600,12 @@ static int nand_write_page(struct mtd_in { int status; - global_page = page; - if (chip->planenum > 1) - chip->ecc.write_page(mtd, chip, buf); - else { chip->cmdfunc(mtd, NAND_CMD_SEQIN, 0x00, page); if (unlikely(raw)) chip->ecc.write_page_raw(mtd, chip, buf); else chip->ecc.write_page(mtd, chip, buf); - } /* * Cached progamming disabled for now, Not sure if its worth the @@ -1801,19 +1614,9 @@ static int nand_write_page(struct mtd_in cached = 0; if (!cached || !(chip->options & NAND_CACHEPRG)) { -/* -* __nand_cmd(CMD_PAGEPROG) and __nand_sync() have been done by DMA for jz4750 and -* later chip, status should still be read by "status = chip->waitfunc(mtd, chip)" -*/ -#if defined(CONFIG_SOC_JZ4730) || defined(CONFIG_SOC_JZ4740) - chip->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1); -#else - if (mtd->flags & MTD_NAND_CPU_MODE) { + chip->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1); - } -#endif status = chip->waitfunc(mtd, chip); - /* * See if operation failed and additional status checks are * available @@ -1848,7 +1651,7 @@ static int nand_write_page(struct mtd_in static uint8_t *nand_fill_oob(struct nand_chip *chip, uint8_t *oob, struct mtd_oob_ops *ops) { - size_mtd_t len = ops->ooblen; + size_t len = ops->ooblen; switch(ops->mode) { @@ -1860,7 +1663,7 @@ static uint8_t *nand_fill_oob(struct nan case MTD_OOB_AUTO: { struct nand_oobfree *free = chip->ecc.layout->oobfree; uint32_t boffs = 0, woffs = ops->ooboffs; - size_mtd_t bytes = 0; + size_t bytes = 0; for(; free->length && len; free++, len -= bytes) { /* Write request not from offset 0 ? */ @@ -1870,11 +1673,11 @@ static uint8_t *nand_fill_oob(struct nan continue; } boffs = free->offset + woffs; - bytes = min_t(size_mtd_t, len, + bytes = min_t(size_t, len, (free->length - woffs)); woffs = 0; } else { - bytes = min_t(size_mtd_t, len, free->length); + bytes = min_t(size_t, len, free->length); boffs = free->offset; } memcpy(chip->oob_poi + boffs, oob, bytes); @@ -1898,7 +1701,7 @@ static uint8_t *nand_fill_oob(struct nan * * NAND write with ECC */ -static int nand_do_write_ops(struct mtd_info *mtd, loff_mtd_t to, +static int nand_do_write_ops(struct mtd_info *mtd, loff_t to, struct mtd_oob_ops *ops) { int chipnr, realpage, page, blockmask, column; @@ -1942,7 +1745,7 @@ static int nand_do_write_ops(struct mtd_ chip->pagebuf = -1; /* If we're not given explicit OOB data, let it be 0xFF */ - //if (likely(!oob)) + if (likely(!oob)) memset(chip->oob_poi, 0xff, mtd->oobsize); while(1) { @@ -2001,8 +1804,8 @@ static int nand_do_write_ops(struct mtd_ * * NAND write with ECC */ -static int nand_write(struct mtd_info *mtd, loff_mtd_t to, size_mtd_t len, - size_mtd_t *retlen, const uint8_t *buf) +static int nand_write(struct mtd_info *mtd, loff_t to, size_t len, + size_t *retlen, const uint8_t *buf) { struct nand_chip *chip = mtd->priv; int ret; @@ -2036,7 +1839,7 @@ static int nand_write(struct mtd_info *m * * NAND write out-of-band */ -static int nand_do_write_oob(struct mtd_info *mtd, loff_mtd_t to, +static int nand_do_write_oob(struct mtd_info *mtd, loff_t to, struct mtd_oob_ops *ops) { int chipnr, page, status, len; @@ -2097,7 +1900,6 @@ static int nand_do_write_oob(struct mtd_ memset(chip->oob_poi, 0xff, mtd->oobsize); nand_fill_oob(chip, ops->oobbuf, ops); - status = chip->ecc.write_oob(mtd, chip, page & chip->pagemask); memset(chip->oob_poi, 0xff, mtd->oobsize); @@ -2115,7 +1917,7 @@ static int nand_do_write_oob(struct mtd_ * @to: offset to write to * @ops: oob operation description structure */ -static int nand_write_oob(struct mtd_info *mtd, loff_mtd_t to, +static int nand_write_oob(struct mtd_info *mtd, loff_t to, struct mtd_oob_ops *ops) { struct nand_chip *chip = mtd->priv; @@ -2279,7 +2081,7 @@ int nand_erase_nand(struct mtd_info *mtd /* * heck if we have a bad block, we do not erase bad blocks ! */ - if (nand_block_checkbad(mtd, ((loff_mtd_t) page) << + if (nand_block_checkbad(mtd, ((loff_t) page) << chip->page_shift, 0, allowbbt)) { printk(KERN_WARNING "nand_erase: attempt to erase a " "bad block at page 0x%08x\n", page); @@ -2401,7 +2203,7 @@ static void nand_sync(struct mtd_info *m * @mtd: MTD device structure * @offs: offset relative to mtd start */ -static int nand_block_isbad(struct mtd_info *mtd, loff_mtd_t offs) +static int nand_block_isbad(struct mtd_info *mtd, loff_t offs) { /* Check for invalid offset */ if (offs > mtd->size) @@ -2415,7 +2217,7 @@ static int nand_block_isbad(struct mtd_i * @mtd: MTD device structure * @ofs: offset relative to mtd start */ -static int nand_block_markbad(struct mtd_info *mtd, loff_mtd_t ofs) +static int nand_block_markbad(struct mtd_info *mtd, loff_t ofs) { struct nand_chip *chip = mtd->priv; int ret; @@ -2554,26 +2356,11 @@ static struct nand_flash_dev *nand_get_f extid >>= 2; /* Get buswidth information */ busw = (extid & 0x01) ? NAND_BUSWIDTH_16 : 0; - /* The 5th id byte */ -#if defined(CONFIG_MTD_NAND_MULTI_PLANE) - extid = chip->read_byte(mtd); - chip->realplanenum = 1 << ((extid & 0x0c) >> 2); -#else - chip->realplanenum = 1; -#endif - if (chip->realplanenum > 1) { /* use muti planes mode */ - chip->planenum = 2; - mtd->writesize *= 2; /* two pages as one page */ - mtd->oobsize *= 2; - mtd->erasesize *= 2; /* two blocks as one block */ - } else - chip->planenum = 1; } else { /* * Old devices have chip data hardcoded in the device id table */ - chip->planenum = chip->realplanenum = 1; mtd->erasesize = type->erasesize; mtd->writesize = type->pagesize; mtd->oobsize = mtd->writesize / 32; @@ -2607,7 +2394,7 @@ static struct nand_flash_dev *nand_get_f chip->bbt_erase_shift = chip->phys_erase_shift = ffs(mtd->erasesize) - 1; - chip->chip_shift = ffs_ll(chip->chipsize) - 1; + chip->chip_shift = ffs(chip->chipsize) - 1; /* Set the bad block position */ chip->badblockpos = mtd->writesize > 512 ? @@ -2639,8 +2426,8 @@ static struct nand_flash_dev *nand_get_f chip->cmdfunc = nand_command_lp; printk(KERN_INFO "NAND device: Manufacturer ID:" - " 0x%02x, Chip ID: 0x%02x (%s %s) planenum:%d\n", *maf_id, dev_id, - nand_manuf_ids[maf_idx].name, type->name, chip->realplanenum); + " 0x%02x, Chip ID: 0x%02x (%s %s)\n", *maf_id, dev_id, + nand_manuf_ids[maf_idx].name, type->name); return type; } @@ -2655,7 +2442,6 @@ static struct nand_flash_dev *nand_get_f * * The mtd->owner field must be set to the module of the caller. */ - int nand_scan_ident(struct mtd_info *mtd, int maxchips) { int i, busw, nand_maf_id; @@ -2670,8 +2456,6 @@ int nand_scan_ident(struct mtd_info *mtd /* Read the flash type */ type = nand_get_flash_type(mtd, chip, busw, &nand_maf_id); - global_mafid = nand_maf_id; - if (IS_ERR(type)) { printk(KERN_WARNING "No NAND device found!!!\n"); chip->select_chip(mtd, -1); @@ -2710,7 +2494,7 @@ int nand_scan_ident(struct mtd_info *mtd */ int nand_scan_tail(struct mtd_info *mtd) { - int i, res; + int i; struct nand_chip *chip = mtd->priv; if (!(chip->options & NAND_OWN_BUFFERS)) @@ -2735,16 +2519,6 @@ int nand_scan_tail(struct mtd_info *mtd) case 64: chip->ecc.layout = &nand_oob_64; break; - case 128: - if (chip->planenum > 1) - chip->ecc.layout = &nand_oob_64; - else - chip->ecc.layout = &nand_oob_128; - break; - case 256: - if (chip->planenum > 1) - chip->ecc.layout = &nand_oob_128; - break; default: printk(KERN_WARNING "No oob scheme defined for " "oobsize %d\n", mtd->oobsize); @@ -2767,13 +2541,12 @@ int nand_scan_tail(struct mtd_info *mtd) switch (chip->ecc.mode) { case NAND_ECC_HW: /* Use standard hwecc read page function ? */ - if (!chip->ecc.read_page) { + if (!chip->ecc.read_page) #ifndef CONFIG_MTD_HW_RS_ECC chip->ecc.read_page = nand_read_page_hwecc; #else chip->ecc.read_page = nand_read_page_hwecc_rs; #endif - } if (!chip->ecc.write_page) chip->ecc.write_page = nand_write_page_hwecc; if (!chip->ecc.read_oob) @@ -2906,80 +2679,8 @@ int nand_scan_tail(struct mtd_info *mtd) if (chip->options & NAND_SKIP_BBTSCAN) return 0; - /* Create jz_mtd1 for one plane operation if the NAND support multiple - planes operation, because some partitions will only use one plane. */ - if ((chip->planenum == 2) && !all_use_planes) { - int i, len, numblocks; - struct nand_chip *this = (struct nand_chip *) (&jz_mtd1[1]); - - memcpy(jz_mtd1, mtd, sizeof(*mtd)); - jz_mtd1->priv = this; - memcpy(this, chip, sizeof(*chip)); - - this->planenum = 1; - jz_mtd1->writesize >>= 1; - jz_mtd1->oobsize >>= 1; - jz_mtd1->erasesize >>= 1; - this->page_shift = chip->page_shift - 1; - this->pagemask = (this->chipsize >> this->page_shift) - 1; - this->bbt_erase_shift = this->phys_erase_shift = - chip->phys_erase_shift - 1; - this->ecc.steps >>= 1; - this->ecc.total = this->ecc.steps * this->ecc.bytes; - this->subpagesize = jz_mtd1->writesize; - - this->erase_cmd = single_erase_cmd; -#if defined(CONFIG_MTD_HW_RS_ECC) - this->ecc.read_page = nand_read_page_hwecc_rs; - this->ecc.write_page = nand_write_page_hwecc; -#endif - this->ecc.read_oob = nand_read_oob_std; - this->ecc.write_oob = nand_write_oob_std; - this->write_buf = nand_write_buf; - this->read_buf = nand_read_buf; - - /* Firstly, build bad block table as one plane */ - res = this->scan_bbt(jz_mtd1); - - /* Secondly, build bad block table as 2 plane based on bbt of jz_mtd1 */ - numblocks = chip->chipsize >> (chip->bbt_erase_shift - 1); /* = (real numblocks * 2) */ - len = mtd->size >> (chip->bbt_erase_shift + 2); - chip->bbt = kzalloc(len, GFP_KERNEL); - -#define isbad_2plane(block) (((this->bbt[(block) >> 3] >> ((block) & 0x06)) \ - | (this->bbt[((block)+2) >> 3] >> (((block)+2) & 0x06))) & 0x03) - - for (i = 0; i < numblocks; i += 2) { - if (isbad_2plane(2*i)) - chip->bbt[i >> 3] |= 0x03 << (i & 0x6); - } - } else { - res = chip->scan_bbt(mtd); - } - -#if defined(CONFIG_ALLOCATE_MTDBLOCK_JZ_EARLY) && !defined(CONFIG_SOC_JZ4730) - /* Allocate a block cache for every partition which works over mtdblock-jz */ - { - extern int nr_partitions; - - jz_mtdblock_cache = kzalloc(nr_partitions * sizeof(unsigned char *), GFP_KERNEL); - - for (i = 0; i < nr_partitions; i++) { - if (!(partition_info[i].mtdblock_jz_invalid) && !(partition_info[i].cpu_mode)) { - if (partition_info[i].use_planes) { - jz_mtdblock_cache[i] = kmalloc(mtd->erasesize, GFP_KERNEL); - printk("Allocate 0x%x bytes for jz_mtdblock%d at address:0x%p.\n", mtd->erasesize, i, jz_mtdblock_cache[i]); - } else { - jz_mtdblock_cache[i] = kmalloc(jz_mtd1->erasesize, GFP_KERNEL); - printk("Allocate 0x%x bytes for jz_mtdblock%d at address:0x%p.\n", jz_mtd1->erasesize, i, jz_mtdblock_cache[i]); - } - if (!jz_mtdblock_cache[i]) - printk("Cannot allocate memory for jz_mtdblock%d!\n", i); - } - } - } -#endif - return res; + /* Build bad block table */ + return chip->scan_bbt(mtd); } /* module_text_address() isn't exported, and it's mostly a pointless diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/nand/nand_bbt.c linux-2.6.24.3-RV10/./drivers/mtd/nand/nand_bbt.c --- linux-2.6.24.3-p2010/./drivers/mtd/nand/nand_bbt.c 2010-07-05 06:41:52.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/nand/nand_bbt.c 2010-07-03 12:48:54.000000000 +0200 @@ -6,7 +6,7 @@ * * Copyright (C) 2004 Thomas Gleixner (tglx@linutronix.de) * - * $Id: nand_bbt.c,v 1.1.1.1 2008-03-28 04:29:21 jlwei Exp $ + * $Id: nand_bbt.c,v 1.1.1.1 2008/03/28 04:29:21 jlwei Exp $ * * 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 @@ -147,15 +147,15 @@ static int read_bbt(struct mtd_info *mtd { int res, i, j, act = 0; struct nand_chip *this = mtd->priv; - size_mtd_t retlen, len, totlen; - loff_mtd_t from; + size_t retlen, len, totlen; + loff_t from; uint8_t msk = (uint8_t) ((1 << bits) - 1); totlen = (num * bits) >> 3; - from = ((loff_mtd_t) page) << this->page_shift; + from = ((loff_t) page) << this->page_shift; while (totlen) { - len = min(totlen, (size_mtd_t) (1 << this->bbt_erase_shift)); + len = min(totlen, (size_t) (1 << this->bbt_erase_shift)); res = mtd->read(mtd, from, len, &retlen, buf); if (res < 0) { if (retlen != len) { @@ -235,8 +235,8 @@ static int read_abs_bbt(struct mtd_info /* * Scan read raw data from flash */ -static int scan_read_raw(struct mtd_info *mtd, uint8_t *buf, loff_mtd_t offs, - size_mtd_t len) +static int scan_read_raw(struct mtd_info *mtd, uint8_t *buf, loff_t offs, + size_t len) { struct mtd_oob_ops ops; @@ -253,7 +253,7 @@ static int scan_read_raw(struct mtd_info /* * Scan write data with oob to flash */ -static int scan_write_bbt(struct mtd_info *mtd, loff_mtd_t offs, size_mtd_t len, +static int scan_write_bbt(struct mtd_info *mtd, loff_t offs, size_t len, uint8_t *buf, uint8_t *oob) { struct mtd_oob_ops ops; @@ -308,7 +308,7 @@ static int read_abs_bbts(struct mtd_info * Scan a given block full */ static int scan_block_full(struct mtd_info *mtd, struct nand_bbt_descr *bd, - loff_mtd_t offs, uint8_t *buf, size_mtd_t readlen, + loff_t offs, uint8_t *buf, size_t readlen, int scanlen, int len) { int ret, j; @@ -328,7 +328,7 @@ static int scan_block_full(struct mtd_in * Scan a given block partially */ static int scan_block_fast(struct mtd_info *mtd, struct nand_bbt_descr *bd, - loff_mtd_t offs, uint8_t *buf, int len) + loff_t offs, uint8_t *buf, int len) { struct mtd_oob_ops ops; int j, ret; @@ -374,8 +374,8 @@ static int create_bbt(struct mtd_info *m struct nand_chip *this = mtd->priv; int i, numblocks, len, scanlen; int startblock; - loff_mtd_t from; - size_mtd_t readlen; + loff_t from; + size_t readlen; printk(KERN_INFO "Scanning device for bad blocks\n"); @@ -430,8 +430,8 @@ static int create_bbt(struct mtd_info *m if (ret) { this->bbt[i >> 3] |= 0x03 << (i & 0x6); - printk(KERN_WARNING "Bad eraseblock %d at 0x%09llx\n", - i >> 1, (unsigned long long)from); + printk(KERN_WARNING "Bad eraseblock %d at 0x%08x\n", + i >> 1, (unsigned int)from); mtd->ecc_stats.badblocks++; } @@ -497,7 +497,7 @@ static int search_bbt(struct mtd_info *m for (block = 0; block < td->maxblocks; block++) { int actblock = startblock + dir * block; - loff_mtd_t offs = actblock << this->bbt_erase_shift; + loff_t offs = actblock << this->bbt_erase_shift; /* Read first page */ scan_read_raw(mtd, buf, offs, mtd->writesize); @@ -567,8 +567,8 @@ static int write_bbt(struct mtd_info *mt int nrchips, bbtoffs, pageoffs, ooboffs; uint8_t msk[4]; uint8_t rcode = td->reserved_block_code; - size_mtd_t retlen, len = 0; - loff_mtd_t to; + size_t retlen, len = 0; + loff_t to; struct mtd_oob_ops ops; ops.ooblen = mtd->oobsize; @@ -655,12 +655,12 @@ static int write_bbt(struct mtd_info *mt bbtoffs = chip * (numblocks >> 2); - to = ((loff_mtd_t) page) << this->page_shift; + to = ((loff_t) page) << this->page_shift; /* Must we save the block contents ? */ if (td->options & NAND_BBT_SAVECONTENT) { /* Make it block aligned */ - to &= ~((loff_mtd_t) ((1 << this->bbt_erase_shift) - 1)); + to &= ~((loff_t) ((1 << this->bbt_erase_shift) - 1)); len = 1 << this->bbt_erase_shift; res = mtd->read(mtd, to, len, &retlen, buf); if (res < 0) { @@ -685,12 +685,12 @@ static int write_bbt(struct mtd_info *mt pageoffs = page - (int)(to >> this->page_shift); offs = pageoffs << this->page_shift; /* Preset the bbt area with 0xff */ - memset(&buf[offs], 0xff, (size_mtd_t) (numblocks >> sft)); + memset(&buf[offs], 0xff, (size_t) (numblocks >> sft)); ooboffs = len + (pageoffs * mtd->oobsize); } else { /* Calc length */ - len = (size_mtd_t) (numblocks >> sft); + len = (size_t) (numblocks >> sft); /* Make it page aligned ! */ len = (len + (mtd->writesize - 1)) & ~(mtd->writesize - 1); @@ -1017,7 +1017,7 @@ int nand_scan_bbt(struct mtd_info *mtd, * * The function updates the bad block table(s) */ -int nand_update_bbt(struct mtd_info *mtd, loff_mtd_t offs) +int nand_update_bbt(struct mtd_info *mtd, loff_t offs) { struct nand_chip *this = mtd->priv; int len, res = 0, writeops = 0; @@ -1193,7 +1193,7 @@ int nand_default_bbt(struct mtd_info *mt * @allowbbt: allow access to bad block table region * */ -int nand_isbad_bbt(struct mtd_info *mtd, loff_mtd_t offs, int allowbbt) +int nand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt) { struct nand_chip *this = mtd->priv; int block; diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/nand/nand_ids.c linux-2.6.24.3-RV10/./drivers/mtd/nand/nand_ids.c --- linux-2.6.24.3-p2010/./drivers/mtd/nand/nand_ids.c 2010-07-05 06:41:52.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/nand/nand_ids.c 2010-07-03 12:48:54.000000000 +0200 @@ -111,9 +111,6 @@ struct nand_flash_dev nand_flash_ids[] = {"NAND 2GiB 1,8V 16-bit", 0xB5, 0, 2048, 0, LP_OPTIONS16}, {"NAND 2GiB 3,3V 16-bit", 0xC5, 0, 2048, 0, LP_OPTIONS16}, - /* 32 Gigabit */ - {"NAND 4GiB 3,3V 8-bit", 0xD7, 0, 4096, 0, LP_OPTIONS}, - /* * Renesas AND 1 Gigabit. Those chips do not support extended id and * have a strange page/block layout ! The chosen minimum erasesize is diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/ubi/build.c linux-2.6.24.3-RV10/./drivers/mtd/ubi/build.c --- linux-2.6.24.3-p2010/./drivers/mtd/ubi/build.c 2010-07-05 06:41:52.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/ubi/build.c 2010-07-03 12:48:54.000000000 +0200 @@ -586,11 +586,7 @@ static int attach_by_scanning(struct ubi out_wl: ubi_wl_close(ubi); out_vtbl: -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(ubi->vtbl); -#else vfree(ubi->vtbl); -#endif out_si: ubi_scan_destroy_si(si); return err; @@ -613,12 +609,6 @@ out_si: */ static int io_init(struct ubi_device *ubi) { -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - printk("kmalloc instead of vmalloc is used.\n"); -#else - printk("vmalloc is used.\n"); -#endif - if (ubi->mtd->numeraseregions != 0) { /* * Some flashes have several erase regions. Different regions @@ -642,9 +632,7 @@ static int io_init(struct ubi_device *ub */ ubi->peb_size = ubi->mtd->erasesize; -// ubi->peb_count = ubi->mtd->size / ubi->mtd->erasesize; - ubi->peb_count = ubi->mtd->size >> (ffs(ubi->mtd->erasesize) - 1); - + ubi->peb_count = ubi->mtd->size / ubi->mtd->erasesize; ubi->flash_size = ubi->mtd->size; if (ubi->mtd->block_isbad && ubi->mtd->block_markbad) @@ -888,35 +876,22 @@ int ubi_attach_mtd_dev(struct mtd_info * dbg_msg("attaching mtd%d to ubi%d: VID header offset %d", mtd->index, ubi_num, vid_hdr_offset); + err = io_init(ubi); if (err) goto out_free; -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - ubi->peb_buf1 = kmalloc(ubi->peb_size, GFP_KERNEL); -#else ubi->peb_buf1 = vmalloc(ubi->peb_size); -#endif - if (!ubi->peb_buf1) goto out_free; -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - ubi->peb_buf2 = kmalloc(ubi->peb_size, GFP_KERNEL); -#else ubi->peb_buf2 = vmalloc(ubi->peb_size); -#endif if (!ubi->peb_buf2) goto out_free; #ifdef CONFIG_MTD_UBI_DEBUG mutex_init(&ubi->dbg_buf_mutex); -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - ubi->dbg_peb_buf = kmalloc(ubi->peb_size, GFP_KERNEL); -#else ubi->dbg_peb_buf = vmalloc(ubi->peb_size); -#endif - if (!ubi->dbg_peb_buf) goto out_free; #endif @@ -979,26 +954,13 @@ out_uif: out_detach: ubi_eba_close(ubi); ubi_wl_close(ubi); -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(ubi->vtbl); -#else vfree(ubi->vtbl); -#endif out_free: -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(ubi->peb_buf1); - kfree(ubi->peb_buf2); -#else vfree(ubi->peb_buf1); vfree(ubi->peb_buf2); -#endif #ifdef CONFIG_MTD_UBI_DEBUG -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(ubi->dbg_peb_buf); -#else vfree(ubi->dbg_peb_buf); #endif -#endif kfree(ubi); return err; } @@ -1055,26 +1017,13 @@ int ubi_detach_mtd_dev(int ubi_num, int uif_close(ubi); ubi_eba_close(ubi); ubi_wl_close(ubi); -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(ubi->vtbl); -#else vfree(ubi->vtbl); -#endif put_mtd_device(ubi->mtd); -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(ubi->peb_buf1); - kfree(ubi->peb_buf2); -#else vfree(ubi->peb_buf1); vfree(ubi->peb_buf2); -#endif #ifdef CONFIG_MTD_UBI_DEBUG -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(ubi->dbg_peb_buf); -#else vfree(ubi->dbg_peb_buf); #endif -#endif ubi_msg("mtd%d is detached from ubi%d", ubi->mtd->index, ubi->ubi_num); kfree(ubi); return 0; diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/ubi/cdev.c linux-2.6.24.3-RV10/./drivers/mtd/ubi/cdev.c --- linux-2.6.24.3-p2010/./drivers/mtd/ubi/cdev.c 2010-07-05 06:41:52.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/ubi/cdev.c 2010-07-03 12:48:54.000000000 +0200 @@ -134,21 +134,13 @@ static int vol_cdev_release(struct inode vol->vol_id); ubi_assert(!vol->changing_leb); vol->updating = 0; -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(vol->upd_buf); -#else vfree(vol->upd_buf); -#endif } else if (vol->changing_leb) { dbg_msg("only %lld of %lld bytes received for atomic LEB change" " for volume %d:%d, cancel", vol->upd_received, vol->upd_bytes, vol->ubi->ubi_num, vol->vol_id); vol->changing_leb = 0; -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(vol->upd_buf); -#else vfree(vol->upd_buf); -#endif } ubi_close_volume(desc); @@ -227,11 +219,7 @@ static ssize_t vol_cdev_read(struct file tbuf_size = vol->usable_leb_size; if (count < tbuf_size) tbuf_size = ALIGN(count, ubi->min_io_size); -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - tbuf = kmalloc(tbuf_size, GFP_KERNEL); -#else tbuf = vmalloc(tbuf_size); -#endif if (!tbuf) return -ENOMEM; @@ -270,11 +258,7 @@ static ssize_t vol_cdev_read(struct file len = count > tbuf_size ? tbuf_size : count; } while (count); -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(tbuf); -#else vfree(tbuf); -#endif return err ? err : count_save - count; } @@ -323,12 +307,7 @@ static ssize_t vol_cdev_direct_write(str tbuf_size = vol->usable_leb_size; if (count < tbuf_size) tbuf_size = ALIGN(count, ubi->min_io_size); - -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - tbuf = kmalloc(tbuf_size, GFP_KERNEL); -#else tbuf = vmalloc(tbuf_size); -#endif if (!tbuf) return -ENOMEM; @@ -363,11 +342,7 @@ static ssize_t vol_cdev_direct_write(str len = count > tbuf_size ? tbuf_size : count; } -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(tbuf); -#else vfree(tbuf); -#endif return err ? err : count_save - count; } @@ -436,19 +411,19 @@ static int vol_cdev_ioctl(struct inode * void __user *argp = (void __user *)arg; switch (cmd) { - /* LEB read command */ - case UBI_IOCLEBREAD: + /* Volume dump command */ + case UBI_IOCLEBDP: { - struct ubi_leb leb; + struct ubi_leb_dump dp; int pnum; char *lebbuf; - if (copy_from_user(&leb, argp, sizeof(struct ubi_leb))){ + if (copy_from_user(&dp, argp, sizeof(struct ubi_leb_dump))){ err = -EFAULT; break; } - pnum = vol->eba_tbl[leb.lnum]; + pnum = vol->eba_tbl[dp.lnum]; if (pnum < 0) { //the LEB is clean, no need dump err = 1; @@ -461,13 +436,13 @@ static int vol_cdev_ioctl(struct inode * break; } - err= ubi_eba_read_leb(ubi, vol, leb.lnum, lebbuf, 0, vol->ubi->leb_size, 0); + err= ubi_eba_read_leb(ubi, vol, dp.lnum, lebbuf, 0, vol->ubi->leb_size, 0); if (err){ kfree(lebbuf); break; } - err = copy_to_user(leb.buf, lebbuf, vol->ubi->leb_size); + err = copy_to_user(dp.lebbuf, lebbuf, vol->ubi->leb_size); if (err) { kfree(lebbuf); err = -EFAULT; diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/ubi/gluebi.c linux-2.6.24.3-RV10/./drivers/mtd/ubi/gluebi.c --- linux-2.6.24.3-p2010/./drivers/mtd/ubi/gluebi.c 2010-07-05 06:41:52.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/ubi/gluebi.c 2010-07-03 12:48:54.000000000 +0200 @@ -103,15 +103,15 @@ static void gluebi_put_device(struct mtd * This function returns zero in case of success and a negative error code in * case of failure. */ -static int gluebi_read(struct mtd_info *mtd, loff_mtd_t from, size_mtd_t len, - size_mtd_t *retlen, unsigned char *buf) +static int gluebi_read(struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, unsigned char *buf) { int err = 0, lnum, offs, total_read; struct ubi_volume *vol; struct ubi_device *ubi; uint64_t tmp = from; - dbg_msg("read %lld bytes from offset %lld", len, from); + dbg_msg("read %zd bytes from offset %lld", len, from); if (len < 0 || from < 0 || from + len > mtd->size) return -EINVAL; @@ -154,15 +154,15 @@ static int gluebi_read(struct mtd_info * * This function returns zero in case of success and a negative error code in * case of failure. */ -static int gluebi_write(struct mtd_info *mtd, loff_mtd_t to, size_mtd_t len, - size_mtd_t *retlen, const u_char *buf) +static int gluebi_write(struct mtd_info *mtd, loff_t to, size_t len, + size_t *retlen, const u_char *buf) { int err = 0, lnum, offs, total_written; struct ubi_volume *vol; struct ubi_device *ubi; uint64_t tmp = to; - dbg_msg("write %lld bytes to offset %lld", len, to); + dbg_msg("write %zd bytes to offset %lld", len, to); if (len < 0 || to < 0 || len + to > mtd->size) return -EINVAL; @@ -176,7 +176,7 @@ static int gluebi_write(struct mtd_info offs = do_div(tmp, mtd->erasesize); lnum = tmp; - if ((u32)len % mtd->writesize || offs % mtd->writesize) + if (len % mtd->writesize || offs % mtd->writesize) return -EINVAL; total_written = len; @@ -215,7 +215,7 @@ static int gluebi_erase(struct mtd_info struct ubi_volume *vol; struct ubi_device *ubi; - dbg_msg("erase %llu bytes at offset %llu", instr->len, instr->addr); + dbg_msg("erase %u bytes at offset %u", instr->len, instr->addr); if (instr->addr < 0 || instr->addr > mtd->size - mtd->erasesize) return -EINVAL; @@ -223,11 +223,11 @@ static int gluebi_erase(struct mtd_info if (instr->len < 0 || instr->addr + instr->len > mtd->size) return -EINVAL; - if ((u32)instr->addr % mtd->writesize || (u32)instr->len % mtd->writesize) + if (instr->addr % mtd->writesize || instr->len % mtd->writesize) return -EINVAL; - lnum = instr->addr >> (ffs(mtd->erasesize)-1); - count = instr->len >> (ffs(mtd->erasesize)-1); + lnum = instr->addr / mtd->erasesize; + count = instr->len / mtd->erasesize; vol = container_of(mtd, struct ubi_volume, gluebi_mtd); ubi = vol->ubi; @@ -304,7 +304,7 @@ int ubi_create_gluebi(struct ubi_device return -ENFILE; } - dbg_msg("added mtd%d (\"%s\"), size %llu, EB size %u", + dbg_msg("added mtd%d (\"%s\"), size %u, EB size %u", mtd->index, mtd->name, mtd->size, mtd->erasesize); return 0; } diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/ubi/io.c linux-2.6.24.3-RV10/./drivers/mtd/ubi/io.c --- linux-2.6.24.3-p2010/./drivers/mtd/ubi/io.c 2010-07-05 06:41:52.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/ubi/io.c 2010-07-03 12:48:54.000000000 +0200 @@ -135,8 +135,8 @@ int ubi_io_read(const struct ubi_device int len) { int err, retries = 0; - size_mtd_t read; - loff_mtd_t addr; + size_t read; + loff_t addr; dbg_io("read %d bytes from PEB %d:%d", len, pnum, offset); @@ -148,7 +148,7 @@ int ubi_io_read(const struct ubi_device if (err) return err > 0 ? -EINVAL : err; - addr = (loff_mtd_t)pnum * ubi->peb_size + offset; + addr = (loff_t)pnum * ubi->peb_size + offset; retry: err = ubi->mtd->read(ubi->mtd, addr, len, &read, buf); if (err) { @@ -164,14 +164,14 @@ retry: if (read != len && retries++ < UBI_IO_RETRIES) { dbg_io("error %d while reading %d bytes from PEB %d:%d, " - "read only %lld bytes, retry", + "read only %zd bytes, retry", err, len, pnum, offset, read); yield(); goto retry; } ubi_err("error %d while reading %d bytes from PEB %d:%d, " - "read %lld bytes", err, len, pnum, offset, read); + "read %zd bytes", err, len, pnum, offset, read); ubi_dbg_dump_stack(); /* @@ -216,8 +216,8 @@ int ubi_io_write(struct ubi_device *ubi, int len) { int err; - size_mtd_t written; - loff_mtd_t addr; + size_t written; + loff_t addr; dbg_io("write %d bytes to PEB %d:%d", len, pnum, offset); @@ -262,11 +262,11 @@ int ubi_io_write(struct ubi_device *ubi, return -EIO; } - addr = (loff_mtd_t)pnum * ubi->peb_size + offset; + addr = (loff_t)pnum * ubi->peb_size + offset; err = ubi->mtd->write(ubi->mtd, addr, len, &written, buf); if (err) { ubi_err("error %d while writing %d bytes to PEB %d:%d, written" - " %lld bytes", err, len, pnum, offset, written); + " %zd bytes", err, len, pnum, offset, written); ubi_dbg_dump_stack(); } else ubi_assert(written == len); @@ -308,7 +308,7 @@ retry: memset(&ei, 0, sizeof(struct erase_info)); ei.mtd = ubi->mtd; - ei.addr = (loff_mtd_t)pnum * ubi->peb_size; + ei.addr = (loff_t)pnum * ubi->peb_size; ei.len = ubi->peb_size; ei.callback = erase_callback; ei.priv = (unsigned long)&wq; @@ -511,7 +511,7 @@ int ubi_io_is_bad(const struct ubi_devic if (ubi->bad_allowed) { int ret; - ret = mtd->block_isbad(mtd, (loff_mtd_t)pnum * ubi->peb_size); + ret = mtd->block_isbad(mtd, (loff_t)pnum * ubi->peb_size); if (ret < 0) ubi_err("error %d while checking if PEB %d is bad", ret, pnum); @@ -546,7 +546,7 @@ int ubi_io_mark_bad(const struct ubi_dev if (!ubi->bad_allowed) return 0; - err = mtd->block_markbad(mtd, (loff_mtd_t)pnum * ubi->peb_size); + err = mtd->block_markbad(mtd, (loff_t)pnum * ubi->peb_size); if (err) ubi_err("cannot mark PEB %d bad, error %d", pnum, err); return err; @@ -1232,15 +1232,15 @@ exit: static int paranoid_check_all_ff(struct ubi_device *ubi, int pnum, int offset, int len) { - size_mtd_t read; + size_t read; int err; - loff_mtd_t addr = (loff_mtd_t)pnum * ubi->peb_size + offset; + loff_t addr = (loff_t)pnum * ubi->peb_size + offset; mutex_lock(&ubi->dbg_buf_mutex); err = ubi->mtd->read(ubi->mtd, addr, len, &read, ubi->dbg_peb_buf); if (err && err != -EUCLEAN) { ubi_err("error %d while reading %d bytes from PEB %d:%d, " - "read %lld bytes", err, len, pnum, offset, read); + "read %zd bytes", err, len, pnum, offset, read); goto error; } diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/ubi/misc.c linux-2.6.24.3-RV10/./drivers/mtd/ubi/misc.c --- linux-2.6.24.3-p2010/./drivers/mtd/ubi/misc.c 2010-07-05 06:41:52.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/ubi/misc.c 2010-07-03 12:48:54.000000000 +0200 @@ -67,12 +67,7 @@ int ubi_check_volume(struct ubi_device * if (vol->vol_type != UBI_STATIC_VOLUME) return 0; -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - buf = kmalloc(vol->usable_leb_size, GFP_KERNEL); -#else buf = vmalloc(vol->usable_leb_size); -#endif - if (!buf) return -ENOMEM; @@ -92,11 +87,7 @@ int ubi_check_volume(struct ubi_device * } } -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(buf); -#else vfree(buf); -#endif return err; } diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/ubi/scan.c linux-2.6.24.3-RV10/./drivers/mtd/ubi/scan.c --- linux-2.6.24.3-p2010/./drivers/mtd/ubi/scan.c 2010-07-05 06:41:52.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/ubi/scan.c 2010-07-03 12:48:54.000000000 +0200 @@ -338,11 +338,7 @@ static int compare_lebs(struct ubi_devic /* Read the data of the copy and check the CRC */ len = be32_to_cpu(vid_hdr->data_size); -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - buf = kmalloc(len, GFP_KERNEL); -#else buf = vmalloc(len); -#endif if (!buf) { err = -ENOMEM; goto out_free_vidh; @@ -365,11 +361,7 @@ static int compare_lebs(struct ubi_devic bitflips = !!err; } -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(buf); -#else vfree(buf); -#endif ubi_free_vid_hdr(ubi, vh); if (second_is_newer) @@ -380,12 +372,7 @@ static int compare_lebs(struct ubi_devic return second_is_newer | (bitflips << 1) | (corrupted << 2); out_free_buf: -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(buf); -#else vfree(buf); -#endif - out_free_vidh: ubi_free_vid_hdr(ubi, vh); return err; diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/ubi/ubiblk.c linux-2.6.24.3-RV10/./drivers/mtd/ubi/ubiblk.c --- linux-2.6.24.3-p2010/./drivers/mtd/ubi/ubiblk.c 2010-07-05 06:41:52.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/ubi/ubiblk.c 2010-07-03 12:48:54.000000000 +0200 @@ -181,17 +181,10 @@ static int ubiblk_init_vol(int dev, stru ubiblk->uv = uv; mutex_init (&ubiblk->cache_mutex); -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - ubiblk->write_cache = kmalloc(ubiblk->uv->vol->usable_leb_size, GFP_KERNEL); - ubiblk->read_cache = kmalloc(ubiblk->uv->vol->usable_leb_size, GFP_KERNEL); - ubiblk->page_sts = kmalloc(ppb, GFP_KERNEL); - ubiblk->subpage_sts = kmalloc(ppb*spp, GFP_KERNEL); -#else ubiblk->write_cache = vmalloc(ubiblk->uv->vol->usable_leb_size); ubiblk->read_cache = vmalloc(ubiblk->uv->vol->usable_leb_size); ubiblk->page_sts = vmalloc(ppb); ubiblk->subpage_sts = vmalloc(ppb*spp); -#endif if(!ubiblk->write_cache || !ubiblk->read_cache || @@ -259,13 +252,8 @@ static int ubiblk_release(struct ubi_blk if (ubi->mtd->sync) ubi->mtd->sync(ubi->mtd); -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(ubiblk->write_cache); - kfree(ubiblk->read_cache); -#else vfree(ubiblk->write_cache); vfree(ubiblk->read_cache); -#endif kfree(ubiblk); ubi_close_volume(ubiblk->uv); diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/ubi/upd.c linux-2.6.24.3-RV10/./drivers/mtd/ubi/upd.c --- linux-2.6.24.3-p2010/./drivers/mtd/ubi/upd.c 2010-07-05 06:41:52.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/ubi/upd.c 2010-07-03 12:48:54.000000000 +0200 @@ -157,11 +157,7 @@ int ubi_start_update(struct ubi_device * vol->updating = 0; } -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - vol->upd_buf = kmalloc(ubi->leb_size, GFP_KERNEL); -#else vol->upd_buf = vmalloc(ubi->leb_size); -#endif if (!vol->upd_buf) return -ENOMEM; @@ -199,11 +195,7 @@ int ubi_start_leb_change(struct ubi_devi vol->ch_lnum = req->lnum; vol->ch_dtype = req->dtype; -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - vol->upd_buf = kmalloc(req->bytes, GFP_KERNEL); -#else vol->upd_buf = vmalloc(req->bytes); -#endif if (!vol->upd_buf) return -ENOMEM; @@ -355,10 +347,7 @@ int ubi_more_update_data(struct ubi_devi else len = count; - err= copy_from_user(&lnum, buf, sizeof(lnum)); - if (err) - return -EFAULT; - err = copy_from_user(vol->upd_buf, &(((char*)buf)[sizeof(unsigned int)]), len); + err = copy_from_user(vol->upd_buf, buf, len); if (err) return -EFAULT; @@ -372,7 +361,7 @@ int ubi_more_update_data(struct ubi_devi vol->upd_received += len; count -= len; -// lnum += 1; + lnum += 1; buf += len; } @@ -386,11 +375,7 @@ int ubi_more_update_data(struct ubi_devi if (err == 0) { vol->updating = 0; err = to_write; -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(vol->upd_buf); -#else vfree(vol->upd_buf); -#endif } } @@ -445,11 +430,7 @@ int ubi_more_leb_change_data(struct ubi_ if (vol->upd_received == vol->upd_bytes) { vol->changing_leb = 0; err = count; -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(vol->upd_buf); -#else vfree(vol->upd_buf); -#endif } return err; diff -pwurN linux-2.6.24.3-p2010/./drivers/mtd/ubi/vtbl.c linux-2.6.24.3-RV10/./drivers/mtd/ubi/vtbl.c --- linux-2.6.24.3-p2010/./drivers/mtd/ubi/vtbl.c 2010-07-05 06:41:52.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/mtd/ubi/vtbl.c 2010-07-03 12:48:54.000000000 +0200 @@ -374,11 +374,7 @@ static struct ubi_vtbl_record *process_l /* Read both LEB 0 and LEB 1 into memory */ ubi_rb_for_each_entry(rb, seb, &sv->root, u.rb) { -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - leb[seb->lnum] = kmalloc(ubi->vtbl_size, GFP_KERNEL); -#else leb[seb->lnum] = vmalloc(ubi->vtbl_size); -#endif if (!leb[seb->lnum]) { err = -ENOMEM; goto out_free; @@ -414,11 +410,7 @@ static struct ubi_vtbl_record *process_l } /* Both LEB 1 and LEB 2 are OK and consistent */ -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(leb[1]); -#else vfree(leb[1]); -#endif return leb[0]; } else { /* LEB 0 is corrupted or does not exist */ @@ -438,23 +430,14 @@ static struct ubi_vtbl_record *process_l if (err) goto out_free; ubi_msg("volume table was restored"); -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(leb[0]); -#else + vfree(leb[0]); -#endif return leb[1]; } out_free: -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(leb[0]); - kfree(leb[1]); -#else vfree(leb[0]); vfree(leb[1]); -#endif - return ERR_PTR(err); } @@ -472,11 +455,7 @@ static struct ubi_vtbl_record *create_em int i; struct ubi_vtbl_record *vtbl; -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - vtbl = kmalloc(ubi->vtbl_size, GFP_KERNEL); -#else vtbl = vmalloc(ubi->vtbl_size); -#endif if (!vtbl) return ERR_PTR(-ENOMEM); memset(vtbl, 0, ubi->vtbl_size); @@ -489,11 +468,7 @@ static struct ubi_vtbl_record *create_em err = create_vtbl(ubi, si, i, vtbl); if (err) { -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(vtbl); -#else vfree(vtbl); -#endif return ERR_PTR(err); } } @@ -821,11 +796,7 @@ int ubi_read_volume_table(struct ubi_dev return 0; out_free: -#if defined(CONFIG_MTD_NAND_DMA) && !defined(CONFIG_MTD_NAND_DMABUF) - kfree(ubi->vtbl); -#else vfree(ubi->vtbl); -#endif for (i = 0; i < ubi->vtbl_slots + UBI_INT_VOL_COUNT; i++) if (ubi->volumes[i]) { kfree(ubi->volumes[i]); diff -pwurN linux-2.6.24.3-p2010/./drivers/net/jz_eth.c linux-2.6.24.3-RV10/./drivers/net/jz_eth.c --- linux-2.6.24.3-p2010/./drivers/net/jz_eth.c 2010-07-05 06:41:52.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/net/jz_eth.c 2010-07-04 08:54:28.000000000 +0200 @@ -36,8 +36,10 @@ #define P1ADDR(a) (((unsigned long)(a) & 0x1fffffff) | 0x80000000) //#define DEBUG + #ifdef DEBUG # define DBPRINTK(fmt,args...) printk(KERN_DEBUG fmt,##args) + static void mii_db_out(struct net_device *dev); #else # define DBPRINTK(fmt,args...) do {} while(0) #endif @@ -62,8 +64,10 @@ static char * hwaddr = NULL; static int debug = -1; static struct mii_if_info mii_info; -MODULE_PARM_DESC(debug, "i"); -MODULE_PARM_DESC(hwaddr,"s"); +module_param(debug, int, 0); +MODULE_PARM_DESC(debug, "debug flag"); +module_param(hwaddr, charp, 0); +MODULE_PARM_DESC(hwaddr,"hardware MAC address"); /* * Local routines @@ -76,6 +80,7 @@ static int link_check_thread (void *data * Get MAC address */ +#if 0 #define I2C_DEVICE 0x57 #define MAC_OFFSET 64 @@ -83,6 +88,11 @@ extern void i2c_open(void); extern void i2c_close(void); extern int i2c_read(unsigned char device, unsigned char *buf, unsigned char address, int count); +#endif + +#if CONFIG_JZ4730_MINIPC +extern int get_ethernet_addr(char *ethernet_addr); +#endif static inline unsigned char str2hexnum(unsigned char c) { @@ -136,19 +146,27 @@ static int get_mac_address(struct net_de dev->dev_addr[0] = 0xff; if (hwaddr != NULL) { /* insmod jz-ethc.o hwaddr=00:ef:a3:c1:00:10 */ + printk(KERN_ERR "jz_eth: found '%s' in cmdline\n", hwaddr); str2eaddr(dev->dev_addr, hwaddr); } else if (ethaddr_cmd) { /* linux command line: ethaddr=00:ef:a3:c1:00:10 */ for (i=0; i<6; i++) dev->dev_addr[i] = ethaddr_hex[i]; - } else { + } #if 0 + else { /* mac address in eeprom: byte 0x40-0x45 */ i2c_open(); i2c_read(I2C_DEVICE, dev->dev_addr, MAC_OFFSET, 6); i2c_close(); + } #endif +#if CONFIG_JZ4730_MINIPC + else { + if (get_ethernet_addr(dev->dev_addr) != 0) + dev->dev_addr[0] = 0xff; } +#endif /* check whether valid MAC address */ for (i=0; i<6; i++) { @@ -156,13 +174,13 @@ static int get_mac_address(struct net_de flag1 &= dev->dev_addr[i]; } if ((dev->dev_addr[0] & 0xC0) || (flag0 == 0) || (flag1 == 0xff)) { - printk("WARNING: There is not MAC address, use default ..\n"); + printk(KERN_ERR "WARNING: There is not MAC address, use default ..\n"); dev->dev_addr[0] = 0x00; dev->dev_addr[1] = 0xef; dev->dev_addr[2] = 0xa3; dev->dev_addr[3] = 0xc1; dev->dev_addr[4] = 0x00; - dev->dev_addr[5] = 0x10; + // dev->dev_addr[5] = 0x10; dev->dev_addr[5] = 0x03; } return 0; @@ -363,7 +381,6 @@ static void mdio_write(struct net_device mii_wait(); } - /* * Search MII phy */ @@ -388,6 +405,7 @@ static int jz_search_mii_phy(struct net_ ADVERTISED_10baseT_Full | ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full); + DBPRINTK("found PHY idx %d at %d\n", phy_idx, phy); phy_idx++; } } @@ -448,6 +466,9 @@ static void jz_set_multicast_list(struct { int i, hash_index; u32 mcr, hash_h, hash_l, hash_bit; +#ifdef DEBUG + int j; +#endif mcr = readl(MAC_MCR); mcr &= ~(MCR_PR | MCR_PM | MCR_HP); @@ -484,9 +505,8 @@ static void jz_set_multicast_list(struct hash_l |= hash_bit; DBPRINTK("----------------------------\n"); #ifdef DEBUG - int j; for (j=0;jdmi_addrlen;j++) - printk("%2.2x:",mclist->dmi_addr[j]); + printk(KERN_DEBUG "%2.2x:",mclist->dmi_addr[j]); printk("\n"); #endif DBPRINTK("dmi.addrlen => %d\n",mclist->dmi_addrlen); @@ -549,6 +569,11 @@ static void mii_db_out(struct net_device mii_test = mdio_read(dev,np->valid_phy,17); DBPRINTK("REG17 ====> 0x%4.4x \n",mii_test); + + mii_test = mdio_read(dev,np->valid_phy, 2); + DBPRINTK("ID2 ====> 0x%4.4x \n",mii_test); + mii_test = mdio_read(dev,np->valid_phy, 3); + DBPRINTK("ID3 ====> 0x%4.4x \n",mii_test); } #endif @@ -622,6 +647,7 @@ static int jz_init_hw(struct net_device jz_eth_reset(); STOP_ETH; +/* XXX testwise enabled */ #if 0 /* mii operation */ if (jz_phy_reset(dev)) { @@ -640,6 +666,9 @@ static int jz_init_hw(struct net_device np->mii_phy_cnt = jz_search_mii_phy(dev); printk("%s: Found %d PHY on JZ MAC\n", dev->name, np->mii_phy_cnt); +#ifdef DEBUG + mii_db_out(dev); +#endif mii_info.phy_id = np->valid_phy; mii_info.dev = dev; @@ -653,7 +682,7 @@ static int jz_init_hw(struct net_device ecmd.phy_address = np->valid_phy; ecmd.autoneg = AUTONEG_ENABLE; - mii_ethtool_sset(&mii_info,&ecmd); + //mii_ethtool_sset(&mii_info, &ecmd); if (jz_autonet_complete(dev)) errprintk("%s: Ethernet Module AutoNegotiation failed\n",dev->name); mii_ethtool_gset(&mii_info,&ecmd); diff -pwurN linux-2.6.24.3-p2010/./drivers/video/backlight/jz4730_minipc.c linux-2.6.24.3-RV10/./drivers/video/backlight/jz4730_minipc.c --- linux-2.6.24.3-p2010/./drivers/video/backlight/jz4730_minipc.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./drivers/video/backlight/jz4730_minipc.c 2010-07-04 08:54:28.000000000 +0200 @@ -0,0 +1,172 @@ +/* + * Backlight Driver for Ingenic JZ4730 based MiniPC + * + * Copyright (c) 2008 Nils Faerber + * + * Based on Richard Purdie's Corgi Backlight Driver + * + * 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 +#include +#include +#include +#include +#include +#include + + +static int minipc_bl_intensity; +static struct backlight_properties minipc_bl_data; +static struct backlight_device *minipc_backlight_device; +static struct generic_bl_info *bl_machinfo; + +static unsigned long minipc_bl_flags; +#define MINIPC_BL_SUSPENDED 0x01 +#define MINIPC_BL_BATTLOW 0x02 + +static int minipc_bl_send_intensity(struct backlight_device *bd) +{ + int intensity = bd->props.brightness; + + if (bd->props.power != FB_BLANK_UNBLANK) + intensity = 0; + if (bd->props.fb_blank != FB_BLANK_UNBLANK) + intensity = 0; + if (minipc_bl_flags & MINIPC_BL_SUSPENDED) + intensity = 0; + if (minipc_bl_flags & MINIPC_BL_BATTLOW) + intensity &= bl_machinfo->limit_mask; + + bl_machinfo->set_bl_intensity(intensity); + + minipc_bl_intensity = intensity; + + return 0; +} + +#ifdef CONFIG_PM +static int minipc_bl_suspend(struct platform_device *pdev, pm_message_t state) +{ + struct backlight_device *bd = platform_get_drvdata(pdev); + + minipc_bl_flags |= MINIPC_BL_SUSPENDED; + backlight_update_status(bd); + + return 0; +} + +static int minipc_bl_resume(struct platform_device *pdev) +{ + struct backlight_device *bd = platform_get_drvdata(pdev); + + minipc_bl_flags &= ~MINIPC_BL_SUSPENDED; + backlight_update_status(bd); + + return 0; +} +#else + +#define minipc_bl_suspend NULL +#define minipc_bl_resume NULL + +#endif + +static int minipc_bl_get_intensity(struct backlight_device *bd) +{ + return minipc_bl_intensity; +} + +/* + * Called when the battery is low to limit the backlight intensity. + * If limit==0 clear any limit, otherwise limit the intensity + */ +void minipc_bl_limit_intensity(int limit) +{ + if (limit) + minipc_bl_flags |= MINIPC_BL_BATTLOW; + else + minipc_bl_flags &= ~MINIPC_BL_BATTLOW; + + backlight_update_status(minipc_backlight_device); +} +EXPORT_SYMBOL(minipc_bl_limit_intensity); + +static struct backlight_ops minipc_bl_ops = { + .get_brightness = minipc_bl_get_intensity, + .update_status = minipc_bl_send_intensity, +}; + + +static int minipc_bl_probe(struct platform_device *pdev) +{ + struct generic_bl_info *machinfo = pdev->dev.platform_data; + const char *name = "generic-bl"; + + bl_machinfo = machinfo; + if (!machinfo->limit_mask) + machinfo->limit_mask = -1; + + if (machinfo->name) + name = machinfo->name; + + minipc_backlight_device = backlight_device_register (name, &pdev->dev, NULL, &minipc_bl_ops); + if (IS_ERR (minipc_backlight_device)) + return PTR_ERR (minipc_backlight_device); + + platform_set_drvdata(pdev, minipc_backlight_device); + + minipc_backlight_device->props.max_brightness = machinfo->max_intensity; + minipc_backlight_device->props.power = FB_BLANK_UNBLANK; + minipc_backlight_device->props.brightness = machinfo->default_intensity; + backlight_update_status(minipc_backlight_device); + + printk("MiniPC Backlight Driver Initialized.\n"); + return 0; +} + +static int minipc_bl_remove(struct platform_device *pdev) +{ + struct backlight_device *bd = platform_get_drvdata(pdev); + + minipc_bl_data.power = 0; + minipc_bl_data.brightness = 0; + backlight_update_status(bd); + + backlight_device_unregister(bd); + + printk("MiniPC Backlight Driver Unloaded\n"); + + return 0; +} + +static struct platform_driver minipc_bl_driver = { + .probe = minipc_bl_probe, + .remove = minipc_bl_remove, + .suspend = minipc_bl_suspend, + .resume = minipc_bl_resume, + .driver = { + .name = "generic-bl", + }, +}; + +static int __init minipc_bl_init(void) +{ + return platform_driver_register(&minipc_bl_driver); +} + +static void __exit minipc_bl_exit(void) +{ + platform_driver_unregister(&minipc_bl_driver); +} + +module_init(minipc_bl_init); +module_exit(minipc_bl_exit); + +MODULE_AUTHOR("Nils Faerber 1*/ +#if 1 //wjx 0->1 + __lcd_clr_ena(); + __lcd_set_ena(); +#endif + } if (state & LCD_STATE_OFU) { /* Out fifo underrun */ REG_LCD_STATE = state & ~LCD_STATE_OFU; dprintk("Out FiFo underrun.\n"); +#if 1 //wjx 0->1 + __lcd_clr_ena(); + __lcd_set_ena(); +#endif } return IRQ_HANDLED; } diff -pwurN linux-2.6.24.3-p2010/./drivers/video/jzlcd.h linux-2.6.24.3-RV10/./drivers/video/jzlcd.h --- linux-2.6.24.3-p2010/./drivers/video/jzlcd.h 2010-07-05 06:41:53.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/video/jzlcd.h 2010-07-04 14:26:16.000000000 +0200 @@ -88,7 +88,7 @@ struct jz_lcd_buffer_addrs_t { */ #if defined(CONFIG_JZLCD_TRULY_TFTG320240DTSW) -#if defined(CONFIG_JZ4730_PMP) +#if defined(CONFIG_JZ4730_MINIPC) #define LCD_RESET_PIN 63 #endif @@ -369,7 +369,7 @@ do { \ #define MODE 0xc9 /* 8bit serial RGB */ #endif -#if defined(CONFIG_JZ4730_PMP) +#if defined(CONFIG_JZ4730_MINIPC) #define SPEN 60 //LCD_SPL #define SPCK 61 //LCD_CLS #define SPDA 62 //LCD_PS @@ -620,7 +620,7 @@ do { \ #endif /* CONFIG_JZ4730_LIBRA */ -#if defined(CONFIG_JZ4730_PMP) +#if defined(CONFIG_JZ4730_MINIPC) #define __lcd_set_backlight_level(n) \ do { \ diff -pwurN linux-2.6.24.3-p2010/./drivers/video/Kconfig linux-2.6.24.3-RV10/./drivers/video/Kconfig --- linux-2.6.24.3-p2010/./drivers/video/Kconfig 2010-07-05 06:41:53.000000000 +0200 +++ linux-2.6.24.3-RV10/./drivers/video/Kconfig 2010-07-04 08:54:28.000000000 +0200 @@ -346,6 +346,9 @@ config JZLCD_MSTN_INVERSE bool "Use an inverse color display." depends on (JZLCD_MSTN_480x320 || JZLCD_MSTN_240x128) +config JZLCD_CHUNGHWA_CLAA070VC01 + bool "CHUNGHWA CLAA070VC01 TFT panel (800x480)" + endchoice config FB_JZ4750_LCD diff -pwurN linux-2.6.24.3-p2010/./drivers/video/Kconfig.orig linux-2.6.24.3-RV10/./drivers/video/Kconfig.orig --- linux-2.6.24.3-p2010/./drivers/video/Kconfig.orig 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.24.3-RV10/./drivers/video/Kconfig.orig 2010-07-04 08:53:17.000000000 +0200 @@ -0,0 +1,2139 @@ +# +# Video configuration +# + +menu "Graphics support" + depends on HAS_IOMEM + +source "drivers/char/agp/Kconfig" + +source "drivers/char/drm/Kconfig" + +config VGASTATE + tristate + default n + +config VIDEO_OUTPUT_CONTROL + tristate "Lowlevel video output switch controls" + help + This framework adds support for low-level control of the video + output switch. + +menuconfig FB + tristate "Support for frame buffer devices" + ---help--- + The frame buffer device provides an abstraction for the graphics + hardware. It represents the frame buffer of some video hardware and + allows application software to access the graphics hardware through + a well-defined interface, so the software doesn't need to know + anything about the low-level (hardware register) stuff. + + Frame buffer devices work identically across the different + architectures supported by Linux and make the implementation of + application programs easier and more portable; at this point, an X + server exists which uses the frame buffer device exclusively. + On several non-X86 architectures, the frame buffer device is the + only way to use the graphics hardware. + + The device is accessed through special device nodes, usually located + in the /dev directory, i.e. /dev/fb*. + + You need an utility program called fbset to make full use of frame + buffer devices. Please read + and the Framebuffer-HOWTO at + for more + information. + + Say Y here and to the driver for your graphics board below if you + are compiling a kernel for a non-x86 architecture. + + If you are compiling for the x86 architecture, you can say Y if you + want to play with it, but it is not essential. Please note that + running graphical applications that directly touch the hardware + (e.g. an accelerated X server) and that are not frame buffer + device-aware may cause unexpected results. If unsure, say N. + +config FIRMWARE_EDID + bool "Enable firmware EDID" + depends on FB + default n + ---help--- + This enables access to the EDID transferred from the firmware. + On the i386, this is from the Video BIOS. Enable this if DDC/I2C + transfers do not work for your driver and if you are using + nvidiafb, i810fb or savagefb. + + In general, choosing Y for this option is safe. If you + experience extremely long delays while booting before you get + something on your display, try setting this to N. Matrox cards in + combination with certain motherboards and monitors are known to + suffer from this problem. + +config FB_DDC + tristate + depends on FB + select I2C_ALGOBIT + select I2C + default n + +config FB_CFB_FILLRECT + tristate + depends on FB + default n + ---help--- + Include the cfb_fillrect function for generic software rectangle + filling. This is used by drivers that don't provide their own + (accelerated) version. + +config FB_CFB_COPYAREA + tristate + depends on FB + default n + ---help--- + Include the cfb_copyarea function for generic software area copying. + This is used by drivers that don't provide their own (accelerated) + version. + +config FB_CFB_IMAGEBLIT + tristate + depends on FB + default n + ---help--- + Include the cfb_imageblit function for generic software image + blitting. This is used by drivers that don't provide their own + (accelerated) version. + +config FB_CFB_REV_PIXELS_IN_BYTE + bool + depends on FB + default n + ---help--- + Allow generic frame-buffer functions to work on displays with 1, 2 + and 4 bits per pixel depths which has opposite order of pixels in + byte order to bytes in long order. + +config FB_SYS_FILLRECT + tristate + depends on FB + default n + ---help--- + Include the sys_fillrect function for generic software rectangle + filling. This is used by drivers that don't provide their own + (accelerated) version and the framebuffer is in system RAM. + +config FB_SYS_COPYAREA + tristate + depends on FB + default n + ---help--- + Include the sys_copyarea function for generic software area copying. + This is used by drivers that don't provide their own (accelerated) + version and the framebuffer is in system RAM. + +config FB_SYS_IMAGEBLIT + tristate + depends on FB + default n + ---help--- + Include the sys_imageblit function for generic software image + blitting. This is used by drivers that don't provide their own + (accelerated) version and the framebuffer is in system RAM. + +config FB_SYS_FOPS + tristate + depends on FB + default n + +config FB_DEFERRED_IO + bool + depends on FB + default y + +config FB_SVGALIB + tristate + depends on FB + default n + ---help--- + Common utility functions useful to fbdev drivers of VGA-based + cards. + +config FB_MACMODES + tristate + depends on FB + default n + +config FB_BACKLIGHT + bool + depends on FB + select BACKLIGHT_LCD_SUPPORT + select BACKLIGHT_CLASS_DEVICE + default n + +config FB_MODE_HELPERS + bool "Enable Video Mode Handling Helpers" + depends on FB + default n + ---help--- + This enables functions for handling video modes using the + Generalized Timing Formula and the EDID parser. A few drivers rely + on this feature such as the radeonfb, rivafb, and the i810fb. If + your driver does not take advantage of this feature, choosing Y will + just increase the kernel size by about 5K. + +config FB_TILEBLITTING + bool "Enable Tile Blitting Support" + depends on FB + default n + ---help--- + This enables tile blitting. Tile blitting is a drawing technique + where the screen is divided into rectangular sections (tiles), whereas + the standard blitting divides the screen into pixels. Because the + default drawing element is a tile, drawing functions will be passed + parameters in terms of number of tiles instead of number of pixels. + For example, to draw a single character, instead of using bitmaps, + an index to an array of bitmaps will be used. To clear or move a + rectangular section of a screen, the rectangle will be described in + terms of number of tiles in the x- and y-axis. + + This is particularly important to one driver, matroxfb. If + unsure, say N. + +comment "Frame buffer hardware drivers" + depends on FB + +config FB_JZSOC + tristate "JZSOC LCD controller support" + depends on FB && JZSOC + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + JZSOC LCD Controller and Smart LCD Controller driver support. + +config FB_JZ4740_SLCD + tristate "JZ4740 Smart LCD controller support" + depends on FB_JZSOC && SOC_JZ4740 + default n + ---help--- + This is the frame buffer device driver for the JZ4740 Smart LCD controller. + If select this, please set to . + +choice + depends on FB_JZ4740_SLCD + prompt "SLCD Panel" + default JZ_SLCD_LGDP4551_8BUS + +config JZ_SLCD_LGDP4551 + bool "LG LGDP4551 Smart LCD panel" + ---help--- + Driver for Smart LCD LGDP4551, 8-bit sytem interface, 16BPP. + +config JZ_SLCD_SPFD5420A + bool "SPFD5420A Smart LCD panel" + ---help--- + Driver for Smart LCD SPFD5420A 18-bit sytem interface, 18BPP. + +config JZ_SLCD_TRULY + bool "TRULY Smart LCD panel (MAX Pixels 400x240)" + ---help--- + +endchoice + +config FB_JZLCD_4730_4740 + tristate "JZ4730 JZ4740 LCD controller support" + depends on FB_JZSOC && (SOC_JZ4730 || SOC_JZ4740) + help + This is the frame buffer device driver for the JZ4730 and JZ4740 LCD controller. +config JZLCD_FRAMEBUFFER_MAX + int "Default FrameBuffer num" + depends on FB_JZLCD_4730_4740 + default "1" + ---help--- + JZ LCD driver support multi-framebuffers for video applications. +config JZLCD_FRAMEBUFFER_ROTATE_SUPPORT + bool "JZLCD FrameBuffer Rotate Support(For TEST)" + depends on FB_JZLCD_4730_4740 + default n + ---help--- + JZ LCD driver framebuffer rotate support. Rotate angle can be 0,90,180,270. + Note, this fearture is implemented by software, and will cost a lot of cpu capcity. + That is to say, if you select this function, you system will become slowly. + Rotate cost cpu about: + ratate angle 0'C: 0% cpu + ratate angle 90'C: 40% cpu + ratate angle 180'C: 20% cpu + ratate angle 270'C: 40% cpu + +config JZLCD_FRAMEBUFFER_DEFAULT_ROTATE_ANGLE + int "FrameBuffer default rotate angle" + depends on JZLCD_FRAMEBUFFER_ROTATE_SUPPORT + default 0 + ---help--- + JZ LCD driver framebuffer angle value can be: + 0: 0'C + 1: 90'C + 2: 180'C + 3: 270'C +config JZLCD_FRAMEBUFFER_BPP + int "FrameBuffer bit per pixel" + depends on JZLCD_FRAMEBUFFER_ROTATE_SUPPORT + default 32 + ---help--- + JZ LCD driver framebuffer support 8bpp, 16bpp, 32bpp +choice + depends on FB_JZLCD_4730_4740 + prompt "LCD Panel" + default JZLCD_SAMSUNG_LTP400WQF01 + +config JZLCD_SHARP_LQ035Q7 + bool "SHARP LQ035Q7 TFT panel (240x320)" + +config JZLCD_SAMSUNG_LTS350Q1 + bool "SAMSUNG LTS350Q1 TFT panel (240x320)" + +config JZLCD_SAMSUNG_LTV350QVF04 + bool "SAMSUNG LTV350QV_F04 TFT panel (320x240)" + +config JZLCD_SAMSUNG_LTP400WQF01 + bool "SAMSUNG LTP400WQF01 TFT panel (480x272)(16bits)" + +config JZLCD_SAMSUNG_LTP400WQF02 + bool "SAMSUNG LTP400WQF02 TFT panel (480x272)(18bits)" + +config JZLCD_AUO_A030FL01_V1 + bool "AUO A030FL01_V1 TFT panel (480x272)" + +config JZLCD_TRULY_TFTG320240DTSW + bool "TRULY TFTG320240DTSW TFT panel (320x240)" + +config JZLCD_TRULY_TFTG320240DTSW_SERIAL + bool "TRULY TFTG320240DTSW TFT panel (320x240)(8bit-serial mode)" + +config JZLCD_TRULY_TFTG240320UTSW_63W_E + bool "TRULY TFTG240320UTSW-63W-E TFT panel (240x320,2.5in)" + +config JZLCD_FOXCONN_PT035TN01 + bool "FOXCONN PT035TN01 TFT panel (320x240)" + +config JZLCD_INNOLUX_PT035TN01_SERIAL + bool "INNOLUX PT035TN01 TFT panel (320x240,3.5in)(8bit-serial mode)" + +config JZLCD_TOSHIBA_LTM084P363 + bool "Toshiba LTM084P363 TFT panel (800x600)" + +config JZLCD_HYNIX_HT10X21 + bool "Hynix HT10X21_300 TFT panel (1024x768)" + +config JZLCD_INNOLUX_AT080TN42 + bool "INNOLUX AT080TN42 TFT panel (800x600)" + +config JZLCD_CSTN_800x600 + bool "800x600 colorDSTN panel" + +config JZLCD_CSTN_320x240 + bool "320x240 colorSTN panel" + +config JZLCD_MSTN_480x320 + bool "480x320 monoSTN panel" + +config JZLCD_MSTN_320x240 + bool "320x240 monoSTN panel" + +config JZLCD_MSTN_240x128 + bool "240x128 monoSTN panel" + +config JZLCD_MSTN_INVERSE + bool "Use an inverse color display." + depends on (JZLCD_MSTN_480x320 || JZLCD_MSTN_240x128) + +endchoice + +config FB_JZ4750_LCD + tristate "JZ4750 LCD Controller support" + depends on FB_JZSOC && (SOC_JZ4750 || SOC_JZ4750D || SOC_JZ4750L) + ---help--- + JZ4750 LCD Controller driver. + JZ4750 LCD Controller support OSD function(refer jz4750_lcdc_spec.pdf).JZ4750 LCD OSD implement 2 framebuffer layers: foreground0 and foreground1. JZ4750 LCD driver support only foreground0 default. + +config FB_JZ4750_LCD_USE_2LAYER_FRAMEBUFFER + bool "JZ4750 LCD driver 2 layers framebuffer support." + depends on FB_JZ4750_LCD + ---help--- + JZ4750 LCD driver support only foreground0 by default. + If you need both foreground0 and foreground1, please select this. + +config FB_JZ4750_TVE + tristate "Jz4750 TV Encode support" + depends on FB_JZSOC && FB_JZ4750_LCD + default n + +config IPU_JZ4750 + tristate "Jz4750 ipu support (Only for debug)" + depends on FB_JZSOC && FB_JZ4750_LCD + default n + ---help--- + Test JZ4750 IPU, if not sure, please set it to n. + +config FB_JZ4750_SLCD + bool + depends on FB_JZ4750_LCD + default n +choice + depends on FB_JZ4750_LCD + prompt "JZ4750 LCD Panels Support" + default JZ4750_LCD_SAMSUNG_LTP400WQF02 + ---help--- + Please select the lcd panel in you board + +config JZ4750_LCD_SAMSUNG_LTP400WQF01 + bool "SAMSUNG LTP400WQF01 TFT panel (480x272)(16bits)" + +config JZ4750_LCD_SAMSUNG_LTP400WQF02 + bool "SAMSUNG LTP400WQF02 TFT panel (480x272)(18bits)" + +config JZ4750_LCD_AUO_A043FL01V2 + bool "AUO A043FL01V2 TFT panel (480x272)(24bits)" + +config JZ4750_LCD_FOXCONN_PT035TN01 + bool "FOXCONN PT035TN01 TFT panel (320x240,3.5in)(18bit-parallel mode)" + +config JZ4750_LCD_INNOLUX_PT035TN01_SERIAL + bool "INNOLUX PT035TN01 TFT panel (320x240,3.5in)(8bit-serial mode)" + +config JZ4750_LCD_TOPPOLY_TD025THEA7_RGB_DELTA + bool "TOPPOLY_TD025THEA7 TFT panel(320x240)(serial RGB delta mode)" + +config JZ4750_LCD_TOPPOLY_TD043MGEB1 + bool "TOPPOLY_TD043MGEB1 TFT panel(800x480)(24bit mode)" + +config JZ4750_LCD_TRULY_TFTG320240DTSW_18BIT + bool "TRULY_TFTG320240DTSW TFT panel (320x240) (Parallel 18bit mode)" + +config JZ4750_LCD_TRULY_TFT_GG1P0319LTSW_W + bool "TRULY_TFT_GG1P0319LTSW_W (240x320) (Smart LCD 16bit)" + +config JZ4750_SLCD_KGM701A3_TFT_SPFD5420A + bool "KGM701A3_TFT_SPFD5420A (400x240) (Smart LCD 18bit)" + select FB_JZ4750_SLCD + +config JZ4750D_VGA_DISPLAY + depends on SOC_JZ4750D + bool "Jz4750D VGA Display" +endchoice + +config FB_CIRRUS + tristate "Cirrus Logic support" + depends on FB && (ZORRO || PCI) + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + This enables support for Cirrus Logic GD542x/543x based boards on + Amiga: SD64, Piccolo, Picasso II/II+, Picasso IV, or EGS Spectrum. + + If you have a PCI-based system, this enables support for these + chips: GD-543x, GD-544x, GD-5480. + + Please read the file . + + Say N unless you have such a graphics board or plan to get one + before you next recompile the kernel. + +config FB_PM2 + tristate "Permedia2 support" + depends on FB && ((AMIGA && BROKEN) || PCI) + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the Permedia2 AGP frame + buffer card from ASK, aka `Graphic Blaster Exxtreme'. There is a + product page at + . + +config FB_PM2_FIFO_DISCONNECT + bool "enable FIFO disconnect feature" + depends on FB_PM2 && PCI + help + Support the Permedia2 FIFO disconnect feature (see CONFIG_FB_PM2). + +config FB_ARMCLCD + tristate "ARM PrimeCell PL110 support" + depends on FB && ARM && ARM_AMBA + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This framebuffer device driver is for the ARM PrimeCell PL110 + Colour LCD controller. ARM PrimeCells provide the building + blocks for System on a Chip devices. + + If you want to compile this as a module (=code which can be + inserted into and removed from the running kernel), say M + here and read . The module + will be called amba-clcd. + +choice + + depends on FB_ARMCLCD && (ARCH_LH7A40X || ARCH_LH7952X) + prompt "LCD Panel" + default FB_ARMCLCD_SHARP_LQ035Q7DB02 + +config FB_ARMCLCD_SHARP_LQ035Q7DB02_HRTFT + bool "LogicPD LCD 3.5\" QVGA w/HRTFT IC" + help + This is an implementation of the Sharp LQ035Q7DB02, a 3.5" + color QVGA, HRTFT panel. The LogicPD device includes + an integrated HRTFT controller IC. + The native resolution is 240x320. + +config FB_ARMCLCD_SHARP_LQ057Q3DC02 + bool "LogicPD LCD 5.7\" QVGA" + help + This is an implementation of the Sharp LQ057Q3DC02, a 5.7" + color QVGA, TFT panel. The LogicPD device includes an + The native resolution is 320x240. + +config FB_ARMCLCD_SHARP_LQ64D343 + bool "LogicPD LCD 6.4\" VGA" + help + This is an implementation of the Sharp LQ64D343, a 6.4" + color VGA, TFT panel. The LogicPD device includes an + The native resolution is 640x480. + +config FB_ARMCLCD_SHARP_LQ10D368 + bool "LogicPD LCD 10.4\" VGA" + help + This is an implementation of the Sharp LQ10D368, a 10.4" + color VGA, TFT panel. The LogicPD device includes an + The native resolution is 640x480. + + +config FB_ARMCLCD_SHARP_LQ121S1DG41 + bool "LogicPD LCD 12.1\" SVGA" + help + This is an implementation of the Sharp LQ121S1DG41, a 12.1" + color SVGA, TFT panel. The LogicPD device includes an + The native resolution is 800x600. + + This panel requires a clock rate may be an integer fraction + of the base LCDCLK frequency. The driver will select the + highest frequency available that is lower than the maximum + allowed. The panel may flicker if the clock rate is + slower than the recommended minimum. + +config FB_ARMCLCD_AUO_A070VW01_WIDE + bool "AU Optronics A070VW01 LCD 7.0\" WIDE" + help + This is an implementation of the AU Optronics, a 7.0" + WIDE Color. The native resolution is 234x480. + +config FB_ARMCLCD_HITACHI + bool "Hitachi Wide Screen 800x480" + help + This is an implementation of the Hitachi 800x480. + +endchoice + + +config FB_ACORN + bool "Acorn VIDC support" + depends on (FB = y) && ARM && (ARCH_ACORN || ARCH_CLPS7500) + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the Acorn VIDC graphics + hardware found in Acorn RISC PCs and other ARM-based machines. If + unsure, say N. + +config FB_CLPS711X + bool "CLPS711X LCD support" + depends on (FB = y) && ARM && ARCH_CLPS711X + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + Say Y to enable the Framebuffer driver for the CLPS7111 and + EP7212 processors. + +config FB_SA1100 + bool "SA-1100 LCD support" + depends on (FB = y) && ARM && ARCH_SA1100 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is a framebuffer device for the SA-1100 LCD Controller. + See for information on framebuffer + devices. + + If you plan to use the LCD display with your SA-1100 system, say + Y here. + +config FB_IMX + tristate "Motorola i.MX LCD support" + depends on FB && ARM && ARCH_IMX + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + +config FB_CYBER2000 + tristate "CyberPro 2000/2010/5000 support" + depends on FB && PCI && (BROKEN || !SPARC64) + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This enables support for the Integraphics CyberPro 20x0 and 5000 + VGA chips used in the Rebel.com Netwinder and other machines. + Say Y if you have a NetWinder or a graphics card containing this + device, otherwise say N. + +config FB_APOLLO + bool + depends on (FB = y) && APOLLO + default y + select FB_CFB_FILLRECT + select FB_CFB_IMAGEBLIT + +config FB_Q40 + bool + depends on (FB = y) && Q40 + default y + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + +config FB_AMIGA + tristate "Amiga native chipset support" + depends on FB && AMIGA + help + This is the frame buffer device driver for the builtin graphics + chipset found in Amigas. + + To compile this driver as a module, choose M here: the + module will be called amifb. + +config FB_AMIGA_OCS + bool "Amiga OCS chipset support" + depends on FB_AMIGA + help + This enables support for the original Agnus and Denise video chips, + found in the Amiga 1000 and most A500's and A2000's. If you intend + to run Linux on any of these systems, say Y; otherwise say N. + +config FB_AMIGA_ECS + bool "Amiga ECS chipset support" + depends on FB_AMIGA + help + This enables support for the Enhanced Chip Set, found in later + A500's, later A2000's, the A600, the A3000, the A3000T and CDTV. If + you intend to run Linux on any of these systems, say Y; otherwise + say N. + +config FB_AMIGA_AGA + bool "Amiga AGA chipset support" + depends on FB_AMIGA + help + This enables support for the Advanced Graphics Architecture (also + known as the AGA or AA) Chip Set, found in the A1200, A4000, A4000T + and CD32. If you intend to run Linux on any of these systems, say Y; + otherwise say N. + +config FB_FM2 + bool "Amiga FrameMaster II/Rainbow II support" + depends on (FB = y) && ZORRO + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the Amiga FrameMaster + card from BSC (exhibited 1992 but not shipped as a CBM product). + +config FB_ARC + tristate "Arc Monochrome LCD board support" + depends on FB && X86 + select FB_SYS_FILLRECT + select FB_SYS_COPYAREA + select FB_SYS_IMAGEBLIT + select FB_SYS_FOPS + help + This enables support for the Arc Monochrome LCD board. The board + is based on the KS-108 lcd controller and is typically a matrix + of 2*n chips. This driver was tested with a 128x64 panel. This + driver supports it for use with x86 SBCs through a 16 bit GPIO + interface (8 bit data, 8 bit control). If you anticipate using + this driver, say Y or M; otherwise say N. You must specify the + GPIO IO address to be used for setting control and data. + +config FB_ATARI + bool "Atari native chipset support" + depends on (FB = y) && ATARI + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the builtin graphics + chipset found in Ataris. + +config FB_OF + bool "Open Firmware frame buffer device support" + depends on (FB = y) && (PPC64 || PPC_OF) && (!PPC_PSERIES || PCI) + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_MACMODES + help + Say Y if you want support with Open Firmware for your graphics + board. + +config FB_CONTROL + bool "Apple \"control\" display support" + depends on (FB = y) && PPC_PMAC && PPC32 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_MACMODES + help + This driver supports a frame buffer for the graphics adapter in the + Power Macintosh 7300 and others. + +config FB_PLATINUM + bool "Apple \"platinum\" display support" + depends on (FB = y) && PPC_PMAC && PPC32 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_MACMODES + help + This driver supports a frame buffer for the "platinum" graphics + adapter in some Power Macintoshes. + +config FB_VALKYRIE + bool "Apple \"valkyrie\" display support" + depends on (FB = y) && (MAC || (PPC_PMAC && PPC32)) + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_MACMODES + help + This driver supports a frame buffer for the "valkyrie" graphics + adapter in some Power Macintoshes. + +config FB_CT65550 + bool "Chips 65550 display support" + depends on (FB = y) && PPC32 && PCI + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the Chips & Technologies + 65550 graphics chip in PowerBooks. + +config FB_ASILIANT + bool "Asiliant (Chips) 69000 display support" + depends on (FB = y) && PCI + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the Asiliant 69030 chipset + +config FB_IMSTT + bool "IMS Twin Turbo display support" + depends on (FB = y) && PCI + select FB_CFB_IMAGEBLIT + select FB_MACMODES if PPC + help + The IMS Twin Turbo is a PCI-based frame buffer card bundled with + many Macintosh and compatible computers. + +config FB_VGA16 + tristate "VGA 16-color graphics support" + depends on FB && (X86 || PPC) + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select VGASTATE + select FONT_8x16 if FRAMEBUFFER_CONSOLE + help + This is the frame buffer device driver for VGA 16 color graphic + cards. Say Y if you have such a card. + + To compile this driver as a module, choose M here: the + module will be called vga16fb. + +config FB_BF54X_LQ043 + tristate "SHARP LQ043 TFT LCD (BF548 EZKIT)" + depends on FB && (BF54x) + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the framebuffer device driver for a SHARP LQ043T1DG01 TFT LCD + +config FB_STI + tristate "HP STI frame buffer device support" + depends on FB && PARISC + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + default y + ---help--- + STI refers to the HP "Standard Text Interface" which is a set of + BIOS routines contained in a ROM chip in HP PA-RISC based machines. + Enabling this option will implement the linux framebuffer device + using calls to the STI BIOS routines for initialisation. + + If you enable this option, you will get a planar framebuffer device + /dev/fb which will work on the most common HP graphic cards of the + NGLE family, including the artist chips (in the 7xx and Bxxx series), + HCRX, HCRX24, CRX, CRX24 and VisEG series. + + It is safe to enable this option, so you should probably say "Y". + +config FB_MAC + bool "Generic Macintosh display support" + depends on (FB = y) && MAC + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_MACMODES + +# bool ' Apple DAFB display support' CONFIG_FB_DAFB +config FB_HP300 + bool + depends on (FB = y) && HP300 + select FB_CFB_FILLRECT + select FB_CFB_IMAGEBLIT + default y + +config FB_TGA + tristate "TGA/SFB+ framebuffer support" + depends on FB && (ALPHA || TC) + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select BITREVERSE + ---help--- + This is the frame buffer device driver for generic TGA and SFB+ + graphic cards. These include DEC ZLXp-E1, -E2 and -E3 PCI cards, + also known as PBXGA-A, -B and -C, and DEC ZLX-E1, -E2 and -E3 + TURBOchannel cards, also known as PMAGD-A, -B and -C. + + Due to hardware limitations ZLX-E2 and E3 cards are not supported + for DECstation 5000/200 systems. Additionally due to firmware + limitations these cards may cause troubles with booting DECstation + 5000/240 and /260 systems, but are fully supported under Linux if + you manage to get it going. ;-) + + Say Y if you have one of those. + +config FB_UVESA + tristate "Userspace VESA VGA graphics support" + depends on FB && CONNECTOR + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_MODE_HELPERS + help + This is the frame buffer driver for generic VBE 2.0 compliant + graphic cards. It can also take advantage of VBE 3.0 features, + such as refresh rate adjustment. + + This driver generally provides more features than vesafb but + requires a userspace helper application called 'v86d'. See + for more information. + + If unsure, say N. + +config FB_VESA + bool "VESA VGA graphics support" + depends on (FB = y) && X86 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select VIDEO_SELECT + help + This is the frame buffer device driver for generic VESA 2.0 + compliant graphic cards. The older VESA 1.2 cards are not supported. + You will get a boot time penguin logo at no additional cost. Please + read . If unsure, say Y. + +config FB_EFI + bool "EFI-based Framebuffer Support" + depends on (FB = y) && X86 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the EFI frame buffer device driver. If the firmware on + your platform is UEFI2.0, select Y to add support for + Graphics Output Protocol for early console messages to appear. + +config FB_IMAC + bool "Intel-based Macintosh Framebuffer Support" + depends on (FB = y) && X86 && EFI + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the Intel-based Macintosh + +config FB_HECUBA + tristate "Hecuba board support" + depends on FB && X86 && MMU + select FB_SYS_FILLRECT + select FB_SYS_COPYAREA + select FB_SYS_IMAGEBLIT + select FB_SYS_FOPS + select FB_DEFERRED_IO + help + This enables support for the Hecuba board. This driver was tested + with an E-Ink 800x600 display and x86 SBCs through a 16 bit GPIO + interface (8 bit data, 4 bit control). If you anticipate using + this driver, say Y or M; otherwise say N. You must specify the + GPIO IO address to be used for setting control and data. + +config FB_HGA + tristate "Hercules mono graphics support" + depends on FB && X86 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + Say Y here if you have a Hercules mono graphics card. + + To compile this driver as a module, choose M here: the + module will be called hgafb. + + As this card technology is 15 years old, most people will answer N + here. + +config FB_HGA_ACCEL + bool "Hercules mono Acceleration functions (EXPERIMENTAL)" + depends on FB_HGA && EXPERIMENTAL + ---help--- + This will compile the Hercules mono graphics with + acceleration functions. + +config FB_SGIVW + tristate "SGI Visual Workstation framebuffer support" + depends on FB && X86_VISWS + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + SGI Visual Workstation support for framebuffer graphics. + +config FB_GBE + bool "SGI Graphics Backend frame buffer support" + depends on (FB = y) && (SGI_IP32 || X86_VISWS) + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for SGI Graphics Backend. + This chip is used in SGI O2 and Visual Workstation 320/540. + +config FB_GBE_MEM + int "Video memory size in MB" + depends on FB_GBE + default 4 + help + This is the amount of memory reserved for the framebuffer, + which can be any value between 1MB and 8MB. + +config FB_SBUS + bool "SBUS and UPA framebuffers" + depends on (FB = y) && SPARC + help + Say Y if you want support for SBUS or UPA based frame buffer device. + +config FB_BW2 + bool "BWtwo support" + depends on (FB = y) && (SPARC && FB_SBUS) + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the BWtwo frame buffer. + +config FB_CG3 + bool "CGthree support" + depends on (FB = y) && (SPARC && FB_SBUS) + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the CGthree frame buffer. + +config FB_CG6 + bool "CGsix (GX,TurboGX) support" + depends on (FB = y) && (SPARC && FB_SBUS) + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the CGsix (GX, TurboGX) + frame buffer. + +config FB_FFB + bool "Creator/Creator3D/Elite3D support" + depends on FB_SBUS && SPARC64 + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the Creator, Creator3D, + and Elite3D graphics boards. + +config FB_TCX + bool "TCX (SS4/SS5 only) support" + depends on FB_SBUS + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the TCX 24/8bit frame + buffer. + +config FB_CG14 + bool "CGfourteen (SX) support" + depends on FB_SBUS + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the CGfourteen frame + buffer on Desktop SPARCsystems with the SX graphics option. + +config FB_P9100 + bool "P9100 (Sparcbook 3 only) support" + depends on FB_SBUS + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the P9100 card + supported on Sparcbook 3 machines. + +config FB_LEO + bool "Leo (ZX) support" + depends on FB_SBUS + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the SBUS-based Sun ZX + (leo) frame buffer cards. + +config FB_IGA + bool "IGA 168x display support" + depends on (FB = y) && SPARC32 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the framebuffer device for the INTERGRAPHICS 1680 and + successor frame buffer cards. + +config FB_XVR500 + bool "Sun XVR-500 3DLABS Wildcat support" + depends on (FB = y) && PCI && SPARC64 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the framebuffer device for the Sun XVR-500 and similar + graphics cards based upon the 3DLABS Wildcat chipset. The driver + only works on sparc64 systems where the system firmware has + mostly initialized the card already. It is treated as a + completely dumb framebuffer device. + +config FB_XVR2500 + bool "Sun XVR-2500 3DLABS Wildcat support" + depends on (FB = y) && PCI && SPARC64 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the framebuffer device for the Sun XVR-2500 and similar + graphics cards based upon the 3DLABS Wildcat chipset. The driver + only works on sparc64 systems where the system firmware has + mostly initialized the card already. It is treated as a + completely dumb framebuffer device. + +config FB_PVR2 + tristate "NEC PowerVR 2 display support" + depends on FB && SH_DREAMCAST + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + Say Y here if you have a PowerVR 2 card in your box. If you plan to + run linux on your Dreamcast, you will have to say Y here. + This driver may or may not work on other PowerVR 2 cards, but is + totally untested. Use at your own risk. If unsure, say N. + + To compile this driver as a module, choose M here: the + module will be called pvr2fb. + + You can pass several parameters to the driver at boot time or at + module load time. The parameters look like "video=pvr2:XXX", where + the meaning of XXX can be found at the end of the main source file + (). Please see the file + . + +config FB_EPSON1355 + bool "Epson 1355 framebuffer support" + depends on (FB = y) && ARCH_CEIVA + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + Build in support for the SED1355 Epson Research Embedded RAMDAC + LCD/CRT Controller (since redesignated as the S1D13505) as a + framebuffer. Product specs at + . + +config FB_S1D13XXX + tristate "Epson S1D13XXX framebuffer support" + depends on FB + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + Support for S1D13XXX framebuffer device family (currently only + working with S1D13806). Product specs at + + +config FB_ATMEL + tristate "AT91/AT32 LCD Controller support" + depends on FB && (ARCH_AT91SAM9261 || ARCH_AT91SAM9263 || AVR32) + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This enables support for the AT91/AT32 LCD Controller. + +config FB_INTSRAM + bool "Frame Buffer in internal SRAM" + depends on FB_ATMEL && ARCH_AT91SAM9261 + help + Say Y if you want to map Frame Buffer in internal SRAM. Say N if you want + to let frame buffer in external SDRAM. + +config FB_ATMEL_STN + bool "Use a STN display with AT91/AT32 LCD Controller" + depends on FB_ATMEL && MACH_AT91SAM9261EK + default n + help + Say Y if you want to connect a STN LCD display to the AT91/AT32 LCD + Controller. Say N if you want to connect a TFT. + + If unsure, say N. + +config FB_NVIDIA + tristate "nVidia Framebuffer Support" + depends on FB && PCI + select FB_BACKLIGHT if FB_NVIDIA_BACKLIGHT + select FB_MODE_HELPERS + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select BITREVERSE + select VGASTATE + help + This driver supports graphics boards with the nVidia chips, TNT + and newer. For very old chipsets, such as the RIVA128, then use + the rivafb. + Say Y if you have such a graphics board. + + To compile this driver as a module, choose M here: the + module will be called nvidiafb. + +config FB_NVIDIA_I2C + bool "Enable DDC Support" + depends on FB_NVIDIA + select FB_DDC + help + This enables I2C support for nVidia Chipsets. This is used + only for getting EDID information from the attached display + allowing for robust video mode handling and switching. + + Because fbdev-2.6 requires that drivers must be able to + independently validate video mode parameters, you should say Y + here. + +config FB_NVIDIA_DEBUG + bool "Lots of debug output" + depends on FB_NVIDIA + default n + help + Say Y here if you want the nVidia driver to output all sorts + of debugging information to provide to the maintainer when + something goes wrong. + +config FB_NVIDIA_BACKLIGHT + bool "Support for backlight control" + depends on FB_NVIDIA + default y + help + Say Y here if you want to control the backlight of your display. + +config FB_RIVA + tristate "nVidia Riva support" + depends on FB && PCI + select FB_BACKLIGHT if FB_RIVA_BACKLIGHT + select FB_MODE_HELPERS + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select BITREVERSE + select VGASTATE + help + This driver supports graphics boards with the nVidia Riva/Geforce + chips. + Say Y if you have such a graphics board. + + To compile this driver as a module, choose M here: the + module will be called rivafb. + +config FB_RIVA_I2C + bool "Enable DDC Support" + depends on FB_RIVA + select FB_DDC + help + This enables I2C support for nVidia Chipsets. This is used + only for getting EDID information from the attached display + allowing for robust video mode handling and switching. + + Because fbdev-2.6 requires that drivers must be able to + independently validate video mode parameters, you should say Y + here. + +config FB_RIVA_DEBUG + bool "Lots of debug output" + depends on FB_RIVA + default n + help + Say Y here if you want the Riva driver to output all sorts + of debugging information to provide to the maintainer when + something goes wrong. + +config FB_RIVA_BACKLIGHT + bool "Support for backlight control" + depends on FB_RIVA + default y + help + Say Y here if you want to control the backlight of your display. + +config FB_I810 + tristate "Intel 810/815 support (EXPERIMENTAL)" + depends on FB && EXPERIMENTAL && PCI && X86_32 + select AGP + select AGP_INTEL + select FB_MODE_HELPERS + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select VGASTATE + help + This driver supports the on-board graphics built in to the Intel 810 + and 815 chipsets. Say Y if you have and plan to use such a board. + + To compile this driver as a module, choose M here: the + module will be called i810fb. + + For more information, please read + + +config FB_I810_GTF + bool "use VESA Generalized Timing Formula" + depends on FB_I810 + help + If you say Y, then the VESA standard, Generalized Timing Formula + or GTF, will be used to calculate the required video timing values + per video mode. Since the GTF allows nondiscrete timings + (nondiscrete being a range of values as opposed to discrete being a + set of values), you'll be able to use any combination of horizontal + and vertical resolutions, and vertical refresh rates without having + to specify your own timing parameters. This is especially useful + to maximize the performance of an aging display, or if you just + have a display with nonstandard dimensions. A VESA compliant + monitor is recommended, but can still work with non-compliant ones. + If you need or want this, then select this option. The timings may + not be compliant with Intel's recommended values. Use at your own + risk. + + If you say N, the driver will revert to discrete video timings + using a set recommended by Intel in their documentation. + + If unsure, say N. + +config FB_I810_I2C + bool "Enable DDC Support" + depends on FB_I810 && FB_I810_GTF + select FB_DDC + help + +config FB_LE80578 + tristate "Intel LE80578 (Vermilion) support" + depends on FB && PCI && X86 + select FB_MODE_HELPERS + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This driver supports the LE80578 (Vermilion Range) chipset + +config FB_CARILLO_RANCH + tristate "Intel Carillo Ranch support" + depends on FB_LE80578 && FB && PCI && X86 + help + This driver supports the LE80578 (Carillo Ranch) board + +config FB_INTEL + tristate "Intel 830M/845G/852GM/855GM/865G/915G/945G support (EXPERIMENTAL)" + depends on FB && EXPERIMENTAL && PCI && X86 + select AGP + select AGP_INTEL + select FB_MODE_HELPERS + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This driver supports the on-board graphics built in to the Intel + 830M/845G/852GM/855GM/865G/915G/915GM/945G/945GM chipsets. + Say Y if you have and plan to use such a board. + + If you say Y here and want DDC/I2C support you must first say Y to + "I2C support" and "I2C bit-banging support" in the character devices + section. + + If you say M here then "I2C support" and "I2C bit-banging support" + can be build either as modules or built-in. + + To compile this driver as a module, choose M here: the + module will be called intelfb. + + For more information, please read + +config FB_INTEL_DEBUG + bool "Intel driver Debug Messages" + depends on FB_INTEL + ---help--- + Say Y here if you want the Intel driver to output all sorts + of debugging information to provide to the maintainer when + something goes wrong. + +config FB_INTEL_I2C + bool "DDC/I2C for Intel framebuffer support" + depends on FB_INTEL + select FB_DDC + default y + help + Say Y here if you want DDC/I2C support for your on-board Intel graphics. + +config FB_MATROX + tristate "Matrox acceleration" + depends on FB && PCI + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_TILEBLITTING + select FB_MACMODES if PPC_PMAC + ---help--- + Say Y here if you have a Matrox Millennium, Matrox Millennium II, + Matrox Mystique, Matrox Mystique 220, Matrox Productiva G100, Matrox + Mystique G200, Matrox Millennium G200, Matrox Marvel G200 video, + Matrox G400, G450 or G550 card in your box. + + To compile this driver as a module, choose M here: the + module will be called matroxfb. + + You can pass several parameters to the driver at boot time or at + module load time. The parameters look like "video=matrox:XXX", and + are described in . + +config FB_MATROX_MILLENIUM + bool "Millennium I/II support" + depends on FB_MATROX + help + Say Y here if you have a Matrox Millennium or Matrox Millennium II + video card. If you select "Advanced lowlevel driver options" below, + you should check 4 bpp packed pixel, 8 bpp packed pixel, 16 bpp + packed pixel, 24 bpp packed pixel and 32 bpp packed pixel. You can + also use font widths different from 8. + +config FB_MATROX_MYSTIQUE + bool "Mystique support" + depends on FB_MATROX + help + Say Y here if you have a Matrox Mystique or Matrox Mystique 220 + video card. If you select "Advanced lowlevel driver options" below, + you should check 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp + packed pixel and 32 bpp packed pixel. You can also use font widths + different from 8. + +config FB_MATROX_G + bool "G100/G200/G400/G450/G550 support" + depends on FB_MATROX + ---help--- + Say Y here if you have a Matrox G100, G200, G400, G450 or G550 based + video card. If you select "Advanced lowlevel driver options", you + should check 8 bpp packed pixel, 16 bpp packed pixel, 24 bpp packed + pixel and 32 bpp packed pixel. You can also use font widths + different from 8. + + If you need support for G400 secondary head, you must first say Y to + "I2C support" in the character devices section, and then to + "Matrox I2C support" and "G400 second head support" here in the + framebuffer section. G450/G550 secondary head and digital output + are supported without additional modules. + + The driver starts in monitor mode. You must use the matroxset tool + (available at ) to + swap primary and secondary head outputs, or to change output mode. + Secondary head driver always start in 640x480 resolution and you + must use fbset to change it. + + Do not forget that second head supports only 16 and 32 bpp + packed pixels, so it is a good idea to compile them into the kernel + too. You can use only some font widths, as the driver uses generic + painting procedures (the secondary head does not use acceleration + engine). + + G450/G550 hardware can display TV picture only from secondary CRTC, + and it performs no scaling, so picture must have 525 or 625 lines. + +config FB_MATROX_I2C + tristate "Matrox I2C support" + depends on FB_MATROX + select FB_DDC + ---help--- + This drivers creates I2C buses which are needed for accessing the + DDC (I2C) bus present on all Matroxes, an I2C bus which + interconnects Matrox optional devices, like MGA-TVO on G200 and + G400, and the secondary head DDC bus, present on G400 only. + + You can say Y or M here if you want to experiment with monitor + detection code. You must say Y or M here if you want to use either + second head of G400 or MGA-TVO on G200 or G400. + + If you compile it as module, it will create a module named + i2c-matroxfb. + +config FB_MATROX_MAVEN + tristate "G400 second head support" + depends on FB_MATROX_G && FB_MATROX_I2C + ---help--- + WARNING !!! This support does not work with G450 !!! + + Say Y or M here if you want to use a secondary head (meaning two + monitors in parallel) on G400 or MGA-TVO add-on on G200. Secondary + head is not compatible with accelerated XFree 3.3.x SVGA servers - + secondary head output is blanked while you are in X. With XFree + 3.9.17 preview you can use both heads if you use SVGA over fbdev or + the fbdev driver on first head and the fbdev driver on second head. + + If you compile it as module, two modules are created, + matroxfb_crtc2 and matroxfb_maven. Matroxfb_maven is needed for + both G200 and G400, matroxfb_crtc2 is needed only by G400. You must + also load i2c-matroxfb to get it to run. + + The driver starts in monitor mode and you must use the matroxset + tool (available at + ) to switch it to + PAL or NTSC or to swap primary and secondary head outputs. + Secondary head driver also always start in 640x480 resolution, you + must use fbset to change it. + + Also do not forget that second head supports only 16 and 32 bpp + packed pixels, so it is a good idea to compile them into the kernel + too. You can use only some font widths, as the driver uses generic + painting procedures (the secondary head does not use acceleration + engine). + +config FB_MATROX_MULTIHEAD + bool "Multihead support" + depends on FB_MATROX + ---help--- + Say Y here if you have more than one (supported) Matrox device in + your computer and you want to use all of them for different monitors + ("multihead"). If you have only one device, you should say N because + the driver compiled with Y is larger and a bit slower, especially on + ia32 (ix86). + + If you said M to "Matrox unified accelerated driver" and N here, you + will still be able to use several Matrox devices simultaneously: + insert several instances of the module matroxfb into the kernel + with insmod, supplying the parameter "dev=N" where N is 0, 1, etc. + for the different Matrox devices. This method is slightly faster but + uses 40 KB of kernel memory per Matrox card. + + There is no need for enabling 'Matrox multihead support' if you have + only one Matrox card in the box. + +config FB_RADEON + tristate "ATI Radeon display support" + depends on FB && PCI + select FB_BACKLIGHT if FB_RADEON_BACKLIGHT + select FB_MODE_HELPERS + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_MACMODES if PPC_OF + help + Choose this option if you want to use an ATI Radeon graphics card as + a framebuffer device. There are both PCI and AGP versions. You + don't need to choose this to run the Radeon in plain VGA mode. + + If you say Y here and want DDC/I2C support you must first say Y to + "I2C support" and "I2C bit-banging support" in the character devices + section. + + If you say M here then "I2C support" and "I2C bit-banging support" + can be build either as modules or built-in. + + There is a product page at + http://apps.ati.com/ATIcompare/ + +config FB_RADEON_I2C + bool "DDC/I2C for ATI Radeon support" + depends on FB_RADEON + select FB_DDC + default y + help + Say Y here if you want DDC/I2C support for your Radeon board. + +config FB_RADEON_BACKLIGHT + bool "Support for backlight control" + depends on FB_RADEON + default y + help + Say Y here if you want to control the backlight of your display. + +config FB_RADEON_DEBUG + bool "Lots of debug output from Radeon driver" + depends on FB_RADEON + default n + help + Say Y here if you want the Radeon driver to output all sorts + of debugging information to provide to the maintainer when + something goes wrong. + +config FB_ATY128 + tristate "ATI Rage128 display support" + depends on FB && PCI + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_BACKLIGHT if FB_ATY128_BACKLIGHT + select FB_MACMODES if PPC_PMAC + help + This driver supports graphics boards with the ATI Rage128 chips. + Say Y if you have such a graphics board and read + . + + To compile this driver as a module, choose M here: the + module will be called aty128fb. + +config FB_ATY128_BACKLIGHT + bool "Support for backlight control" + depends on FB_ATY128 + default y + help + Say Y here if you want to control the backlight of your display. + +config FB_ATY + tristate "ATI Mach64 display support" if PCI || ATARI + depends on FB && !SPARC32 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_BACKLIGHT if FB_ATY_BACKLIGHT + select FB_MACMODES if PPC + help + This driver supports graphics boards with the ATI Mach64 chips. + Say Y if you have such a graphics board. + + To compile this driver as a module, choose M here: the + module will be called atyfb. + +config FB_ATY_CT + bool "Mach64 CT/VT/GT/LT (incl. 3D RAGE) support" + depends on PCI && FB_ATY + default y if SPARC64 && PCI + help + Say Y here to support use of ATI's 64-bit Rage boards (or other + boards based on the Mach64 CT, VT, GT, and LT chipsets) as a + framebuffer device. The ATI product support page for these boards + is at . + +config FB_ATY_GENERIC_LCD + bool "Mach64 generic LCD support (EXPERIMENTAL)" + depends on FB_ATY_CT + help + Say Y if you have a laptop with an ATI Rage LT PRO, Rage Mobility, + Rage XC, or Rage XL chipset. + +config FB_ATY_GX + bool "Mach64 GX support" if PCI + depends on FB_ATY + default y if ATARI + help + Say Y here to support use of the ATI Mach64 Graphics Expression + board (or other boards based on the Mach64 GX chipset) as a + framebuffer device. The ATI product support page for these boards + is at + . + +config FB_ATY_BACKLIGHT + bool "Support for backlight control" + depends on FB_ATY + default y + help + Say Y here if you want to control the backlight of your display. + +config FB_S3 + tristate "S3 Trio/Virge support" + depends on FB && PCI + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_TILEBLITTING + select FB_SVGALIB + select VGASTATE + select FONT_8x16 if FRAMEBUFFER_CONSOLE + ---help--- + Driver for graphics boards with S3 Trio / S3 Virge chip. + +config FB_SAVAGE + tristate "S3 Savage support" + depends on FB && PCI && EXPERIMENTAL + select FB_MODE_HELPERS + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select VGASTATE + help + This driver supports notebooks and computers with S3 Savage PCI/AGP + chips. + + Say Y if you have such a graphics card. + + To compile this driver as a module, choose M here; the module + will be called savagefb. + +config FB_SAVAGE_I2C + bool "Enable DDC2 Support" + depends on FB_SAVAGE + select FB_DDC + help + This enables I2C support for S3 Savage Chipsets. This is used + only for getting EDID information from the attached display + allowing for robust video mode handling and switching. + + Because fbdev-2.6 requires that drivers must be able to + independently validate video mode parameters, you should say Y + here. + +config FB_SAVAGE_ACCEL + bool "Enable Console Acceleration" + depends on FB_SAVAGE + default n + help + This option will compile in console acceleration support. If + the resulting framebuffer console has bothersome glitches, then + choose N here. + +config FB_SIS + tristate "SiS/XGI display support" + depends on FB && PCI + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the SiS 300, 315, 330 + and 340 series as well as XGI V3XT, V5, V8, Z7 graphics chipsets. + Specs available at and . + + To compile this driver as a module, choose M here; the module + will be called sisfb. + +config FB_SIS_300 + bool "SiS 300 series support" + depends on FB_SIS + help + Say Y here to support use of the SiS 300/305, 540, 630 and 730. + +config FB_SIS_315 + bool "SiS 315/330/340 series and XGI support" + depends on FB_SIS + help + Say Y here to support use of the SiS 315, 330 and 340 series + (315/H/PRO, 55x, 650, 651, 740, 330, 661, 741, 760, 761) as well + as XGI V3XT, V5, V8 and Z7. + +config FB_NEOMAGIC + tristate "NeoMagic display support" + depends on FB && PCI + select FB_MODE_HELPERS + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select VGASTATE + help + This driver supports notebooks with NeoMagic PCI chips. + Say Y if you have such a graphics card. + + To compile this driver as a module, choose M here: the + module will be called neofb. + +config FB_KYRO + tristate "IMG Kyro support" + depends on FB && PCI + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + Say Y here if you have a STG4000 / Kyro / PowerVR 3 based + graphics board. + + To compile this driver as a module, choose M here: the + module will be called kyrofb. + +config FB_3DFX + tristate "3Dfx Banshee/Voodoo3 display support" + depends on FB && PCI + select FB_CFB_IMAGEBLIT + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + help + This driver supports graphics boards with the 3Dfx Banshee/Voodoo3 + chips. Say Y if you have such a graphics board. + + To compile this driver as a module, choose M here: the + module will be called tdfxfb. + +config FB_3DFX_ACCEL + bool "3Dfx Banshee/Voodoo3 Acceleration functions (EXPERIMENTAL)" + depends on FB_3DFX && EXPERIMENTAL + ---help--- + This will compile the 3Dfx Banshee/Voodoo3 frame buffer device + with acceleration functions. + + +config FB_VOODOO1 + tristate "3Dfx Voodoo Graphics (sst1) support" + depends on FB && PCI + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + Say Y here if you have a 3Dfx Voodoo Graphics (Voodoo1/sst1) or + Voodoo2 (cvg) based graphics card. + + To compile this driver as a module, choose M here: the + module will be called sstfb. + + WARNING: Do not use any application that uses the 3D engine + (namely glide) while using this driver. + Please read the for supported + options and other important info support. + +config FB_VT8623 + tristate "VIA VT8623 support" + depends on FB && PCI + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_TILEBLITTING + select FB_SVGALIB + select VGASTATE + select FONT_8x16 if FRAMEBUFFER_CONSOLE + ---help--- + Driver for CastleRock integrated graphics core in the + VIA VT8623 [Apollo CLE266] chipset. + +config FB_CYBLA + tristate "Cyberblade/i1 support" + depends on FB && PCI && X86_32 && !64BIT + select FB_CFB_IMAGEBLIT + select VIDEO_SELECT + ---help--- + This driver is supposed to support the Trident Cyberblade/i1 + graphics core integrated in the VIA VT8601A North Bridge, + also known as VIA Apollo PLE133. + + Status: + - Developed, tested and working on EPIA 5000 and EPIA 800. + - Does work reliable on all systems with CRT/LCD connected to + normal VGA ports. + - Should work on systems that do use the internal LCD port, but + this is absolutely not tested. + + Character imageblit, copyarea and rectangle fill are hw accelerated, + ypan scrolling is used by default. + + Please do read . + + To compile this driver as a module, choose M here: the + module will be called cyblafb. + +config FB_TRIDENT + tristate "Trident support" + depends on FB && PCI + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + This driver is supposed to support graphics boards with the + Trident CyberXXXX/Image/CyberBlade chips mostly found in laptops + but also on some motherboards. For more information, read + + + Cyberblade/i1 support will be removed soon, use the cyblafb driver + instead. + + Say Y if you have such a graphics board. + + + To compile this driver as a module, choose M here: the + module will be called tridentfb. + +config FB_TRIDENT_ACCEL + bool "Trident Acceleration functions (EXPERIMENTAL)" + depends on FB_TRIDENT && EXPERIMENTAL + ---help--- + This will compile the Trident frame buffer device with + acceleration functions. + +config FB_ARK + tristate "ARK 2000PV support" + depends on FB && PCI + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_TILEBLITTING + select FB_SVGALIB + select VGASTATE + select FONT_8x16 if FRAMEBUFFER_CONSOLE + ---help--- + Driver for PCI graphics boards with ARK 2000PV chip + and ICS 5342 RAMDAC. + +config FB_PM3 + tristate "Permedia3 support (EXPERIMENTAL)" + depends on FB && PCI && EXPERIMENTAL + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the 3DLabs Permedia3 + chipset, used in Formac ProFormance III, 3DLabs Oxygen VX1 & + similar boards, 3DLabs Permedia3 Create!, Appian Jeronimo 2000 + and maybe other boards. + +config FB_AU1100 + bool "Au1100 LCD Driver" + depends on (FB = y) && MIPS && SOC_AU1100 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the framebuffer driver for the AMD Au1100 SOC. It can drive + various panels and CRTs by passing in kernel cmd line option + au1100fb:panel=. + +config FB_AU1200 + bool "Au1200 LCD Driver" + depends on (FB = y) && MIPS && SOC_AU1200 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the framebuffer driver for the AMD Au1200 SOC. It can drive + various panels and CRTs by passing in kernel cmd line option + au1200fb:panel=. + +source "drivers/video/geode/Kconfig" + +config FB_HIT + tristate "HD64461 Frame Buffer support" + depends on FB && HD64461 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + This is the frame buffer device driver for the Hitachi HD64461 LCD + frame buffer card. + +config FB_PMAG_AA + bool "PMAG-AA TURBOchannel framebuffer support" + depends on (FB = y) && TC + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + Support for the PMAG-AA TURBOchannel framebuffer card (1280x1024x1) + used mainly in the MIPS-based DECstation series. + +config FB_PMAG_BA + tristate "PMAG-BA TURBOchannel framebuffer support" + depends on FB && TC + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + Support for the PMAG-BA TURBOchannel framebuffer card (1024x864x8) + used mainly in the MIPS-based DECstation series. + +config FB_PMAGB_B + tristate "PMAGB-B TURBOchannel framebuffer support" + depends on FB && TC + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + Support for the PMAGB-B TURBOchannel framebuffer card used mainly + in the MIPS-based DECstation series. The card is currently only + supported in 1280x1024x8 mode. + +config FB_MAXINE + bool "Maxine (Personal DECstation) onboard framebuffer support" + depends on (FB = y) && MACH_DECSTATION + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + Support for the onboard framebuffer (1024x768x8) in the Personal + DECstation series (Personal DECstation 5000/20, /25, /33, /50, + Codename "Maxine"). + +config FB_G364 + bool "G364 frame buffer support" + depends on (FB = y) && (MIPS_MAGNUM_4000 || OLIVETTI_M700) + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + The G364 driver is the framebuffer used in MIPS Magnum 4000 and + Olivetti M700-10 systems. + +config FB_68328 + bool "Motorola 68328 native frame buffer support" + depends on (FB = y) && (M68328 || M68EZ328 || M68VZ328) + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + help + Say Y here if you want to support the built-in frame buffer of + the Motorola 68328 CPU family. + +config FB_PXA + tristate "PXA LCD framebuffer support" + depends on FB && ARCH_PXA + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + Frame buffer driver for the built-in LCD controller in the Intel + PXA2x0 processor. + + This driver is also available as a module ( = code which can be + inserted and removed from the running kernel whenever you want). The + module will be called pxafb. If you want to compile it as a module, + say M here and read . + + If unsure, say N. + +config FB_PXA_PARAMETERS + bool "PXA LCD command line parameters" + default n + depends on FB_PXA + ---help--- + Enable the use of kernel command line or module parameters + to configure the physical properties of the LCD panel when + using the PXA LCD driver. + + This option allows you to override the panel parameters + supplied by the platform in order to support multiple + different models of flatpanel. If you will only be using a + single model of flatpanel then you can safely leave this + option disabled. + + describes the available parameters. + +config FB_MBX + tristate "2700G LCD framebuffer support" + depends on FB && ARCH_PXA + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + Framebuffer driver for the Intel 2700G (Marathon) Graphics + Accelerator + +config FB_MBX_DEBUG + bool "Enable debugging info via debugfs" + depends on FB_MBX && DEBUG_FS + default n + ---help--- + Enable this if you want debugging information using the debug + filesystem (debugfs) + + If unsure, say N. + +config FB_W100 + tristate "W100 frame buffer support" + depends on FB && PXA_SHARPSL + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + Frame buffer driver for the w100 as found on the Sharp SL-Cxx series. + + This driver is also available as a module ( = code which can be + inserted and removed from the running kernel whenever you want). The + module will be called w100fb. If you want to compile it as a module, + say M here and read . + + If unsure, say N. + +config FB_S3C2410 + tristate "S3C2410 LCD framebuffer support" + depends on FB && ARCH_S3C2410 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + Frame buffer driver for the built-in LCD controller in the Samsung + S3C2410 processor. + + This driver is also available as a module ( = code which can be + inserted and removed from the running kernel whenever you want). The + module will be called s3c2410fb. If you want to compile it as a module, + say M here and read . + + If unsure, say N. +config FB_S3C2410_DEBUG + bool "S3C2410 lcd debug messages" + depends on FB_S3C2410 + help + Turn on debugging messages. Note that you can set/unset at run time + through sysfs + +config FB_SM501 + tristate "Silicon Motion SM501 framebuffer support" + depends on FB && MFD_SM501 + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + Frame buffer driver for the CRT and LCD controllers in the Silicon + Motion SM501. + + This driver is also available as a module ( = code which can be + inserted and removed from the running kernel whenever you want). The + module will be called sm501fb. If you want to compile it as a module, + say M here and read . + + If unsure, say N. + + +config FB_PNX4008_DUM + tristate "Display Update Module support on Philips PNX4008 board" + depends on FB && ARCH_PNX4008 + ---help--- + Say Y here to enable support for PNX4008 Display Update Module (DUM) + +config FB_PNX4008_DUM_RGB + tristate "RGB Framebuffer support on Philips PNX4008 board" + depends on FB_PNX4008_DUM + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + Say Y here to enable support for PNX4008 RGB Framebuffer + +config FB_IBM_GXT4500 + tristate "Framebuffer support for IBM GXT4500P adaptor" + depends on FB && PPC + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + Say Y here to enable support for the IBM GXT4500P display + adaptor, found on some IBM System P (pSeries) machines. + +config FB_PS3 + tristate "PS3 GPU framebuffer driver" + depends on FB && PS3_PS3AV + select FB_SYS_FILLRECT + select FB_SYS_COPYAREA + select FB_SYS_IMAGEBLIT + select FB_SYS_FOPS + select VT_HW_CONSOLE_BINDING if FRAMEBUFFER_CONSOLE + ---help--- + Include support for the virtual frame buffer in the PS3 platform. + +config FB_PS3_DEFAULT_SIZE_M + int "PS3 default frame buffer size (in MiB)" + depends on FB_PS3 + default 9 + ---help--- + This is the default size (in MiB) of the virtual frame buffer in + the PS3. + The default value can be overridden on the kernel command line + using the "ps3fb" option (e.g. "ps3fb=9M"); + +config FB_XILINX + tristate "Xilinx frame buffer support" + depends on FB && XILINX_VIRTEX + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + Include support for the Xilinx ML300/ML403 reference design + framebuffer. ML300 carries a 640*480 LCD display on the board, + ML403 uses a standard DB15 VGA connector. + +config FB_VIRTUAL + tristate "Virtual Frame Buffer support (ONLY FOR TESTING!)" + depends on FB + select FB_SYS_FILLRECT + select FB_SYS_COPYAREA + select FB_SYS_IMAGEBLIT + select FB_SYS_FOPS + ---help--- + This is a `virtual' frame buffer device. It operates on a chunk of + unswappable kernel memory instead of on the memory of a graphics + board. This means you cannot see any output sent to this frame + buffer device, while it does consume precious memory. The main use + of this frame buffer device is testing and debugging the frame + buffer subsystem. Do NOT enable it for normal systems! To protect + the innocent, it has to be enabled explicitly at boot time using the + kernel option `video=vfb:'. + + To compile this driver as a module, choose M here: the + module will be called vfb. In order to load it, you must use + the vfb_enable=1 option. + + If unsure, say N. + +source "drivers/video/omap/Kconfig" + +source "drivers/video/backlight/Kconfig" +source "drivers/video/display/Kconfig" + +if VT + source "drivers/video/console/Kconfig" +endif + +if FB || SGI_NEWPORT_CONSOLE + source "drivers/video/logo/Kconfig" +endif + +endmenu diff -pwurN linux-2.6.24.3-p2010/./fs/ecryptfs/crypto.c linux-2.6.24.3-RV10/./fs/ecryptfs/crypto.c --- linux-2.6.24.3-p2010/./fs/ecryptfs/crypto.c 2008-02-26 01:20:20.000000000 +0100 +++ linux-2.6.24.3-RV10/./fs/ecryptfs/crypto.c 2008-02-26 01:20:20.000000000 +0100 @@ -1,15 +1,13 @@ -/** - * eCryptfs: Linux filesystem encryption layer +¿«* +ø. eëvy|tgs~d_ëoux filesystem encrypôn layer * * Copyright (C) 1997-2004 Erez Zadok - * Copyright (C) 2001-2004 Stony Brook University - * Copyright (C) 2004-2007 International Business Machines Corp. - * Author(s): Michael A. Halcrow - * Michael C. Thompson + * Copyr{÷iõ (C) 2001-2004 Stony Broÿë Uûveûwy|}k1nd[ïwyright!({) 2004-2007õ~t÷~~a÷nù~4Bý}nÿw ßwhý~usýrþ~ ÿ~4 áthï~ +én1l4k9Mm{ëgel C. Uhompson * - * 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 + * This program is free software; you ca~·{ådistribute it and/or + * ýïdiþ iýfuntgslt{çgterms of8the GNU Genå~ulæ~ubïw License as + * published by the Free Software Fou÷iõion; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but @@ -20,26 +18,8 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "ecryptfs_kernel.h" - -static int -ecryptfs_decrypt_page_offset(struct ecryptfs_crypt_stat *crypt_stat, - struct page *dst_page, int dst_offset, - struct page *src_page, int src_offset, int size, - unsigned char *iv); + * 02111-13ô·~eÿwS~ïf;oow}n{ïgos<|oouxogso}~*g{owÿ}e* ++inclmoghÿwiþ~}wea~mnwy/gsystoo{>*/yoo~une |li÷yÿfilwoi~Z#kngoee }no~u~/ÿãkÿ{níwnooãmmprmks{ytskm~~wÿ~útewk{gmnnuo{z}o{dmkw{rtpeunosw~)wuwwwkv}ugs÷{ýxuw|e| zs{}qv{}i~- ooôï e}tÿou~cn{ï}piwe%{~u$wt_offsý~|ÿ_ÿ=~ÿ~v}sv,piouu~~g{uwm,"on})srcofvse},rmurwmgm{ÿ}½gdb(}omoomdiooew,*i~y static int ecryptfs_encrypt_page_offset(struct ecryptfs_crypt_stat *crypt_stat, struct page *dst_page, int dst_offset, @@ -53,27 +33,8 @@ ecryptfs_encrypt_page_offset(struct ecry * @src: Buffer to be converted to a hex string respresentation * @src_size: number of bytes to convert */ -void ecryptfs_to_hex(char *dst, char *src, size_t src_size) -{ - int x; - - for (x = 0; x < src_size; x++) - sprintf(&dst[x * 2], "%.2x", (unsigned char)src[x]); -} - -/** - * ecryptfs_from_hex - * @dst: Buffer to take the bytes from src hex; must be at least of - * size (src_size / 2) - * @src: Buffer to be converted from a hex string respresentation to raw value - * @dst_size: size of dst buffer, or number of hex characters pairs to convert - */ -void ecryptfs_from_hex(char *dst, char *src, int dst_size) -{ - int x; - char tmp[3] = { 0, }; - - for (x = 0; x < dst_size; x++) { +void ecryptfs_to_hex(char *dst, char *src, sýÿwÿusrïwmg}ëoovo|{*k{foin }o0{#ssw;|++mZo=s~zin~n)&nswxfkrs},wg%r|c|e(uniwneddwÿk÷isvo{x}mk}k^o*nor*tmgrýwn{~roÿ}}kuneçwu:uRugvezt|o tke,tlyvm#osooow~w;huxnmww~)bo ut$muesthofOroups cku}zu/(w~cÿmÿuho w;ouz;`wzg~ f}nge~ytÿåbm7koÿgs|ug5nwïweehwxasuzkownvwssewtation3}twmwcwolwukr~*Id{tsi~g:t{mzoefdms b}ofos.*or*oÿkïz v$iu} gzowqctessryq}÷¡vooonÿos|goOït oozywtvsfz}_}g|(wuvvwgw *{rs--i~}-~svs}{e+*nkovf{; + gxuvtm{{_"}ÿiõs}*{knowdx| }npt}>>lost_size; x++) { tmp[0] = src[x * 2]; tmp[1] = src[x * 2 + 1]; dst[x] = (unsigned char)simple_strtol(tmp, NULL, 16); @@ -90,25 +51,22 @@ void ecryptfs_from_hex(char *dst, char * * Uses the allocated crypto context that crypt_stat references to * generate the MD5 sum of the contents of src. */ -static int ecryptfs_calculate_md5(char *dst, - struct ecryptfs_crypt_stat *crypt_stat, +static int ecryptfs_calculate_md5(chaö¡*dóv, +ío9M5cs|vãw ecrypuf{_crypt_stat)wrypt_stat, char *src, int len) { - struct scatterlist sg; - struct hash_desc desc = { - .tfm = crypt_stat->hash_tfm, - .flags = CRYPTO_TFM_REQ_MAY_SLEEP + struct scatterlisô·{ç; + struct hash_desc desc´½ {ë .ýf}l=cs~}{÷_stat->ia{h_tfm, + .fnws = CRYPTO_TFM_REQ_MAY_SLEEP }; int rc = 0; - mutex_lock(&crypt_stat->cs_hash_tfm_mutex); - sg_init_one(&sg, (u8 *)src, len); - if (!desc.tfm) { - desc.tfm = crypto_alloc_hash(ECRYPTFS_DEFAULT_HASH, 0, - CRYPTO_ALG_ASYNC); - if (IS_ERR(desc.tfm)) { - rc = PTR_ERR(desc.tfm); - ecryptfs_printk(KERN_ERR, "Error attempting to " + mutex_locë¿oçrypt_stat->cs_hash_tfm_mõõex); + ÿgmku_oço&sg, (u88*)src, len);incs_hash_tfm_mutex); - return rc; + í÷}åx_unlock(&crypt_stat->csÿéasê_tfí}}ugym[Ëweturn sc; } -static int ecryptfs_crypto_api_algify_cipher_name(char **algified_name, - char *cipher_name, - char *chaining_modifier) +static t wvyxvsvyz_{}_algify_cipher_name(char **algified_nëÿm­ + char *cipher_naýå, +]ß ío1lwkq~d{ãoaining_mdifier) { - int cipher_name_len = strlen(cipher_name); - int chaining_modifier_len = strlen(chaining_modifier); - int algified_name_len; - int rc; - - algified_name_len = (chaining_modifier_len + cipher_name_len + 3); + }t th_nu_l~ }wtrunk}plv_o}eo ot kuining_modë÷iår_len = strlen(chaining_ýïdiwerí;M}ouleçofied_name_len; + int {? +Nulovio_nou_|~ } 0)) { - ecryptfs_printk(KERN_DEBUG, "root iv:\n"); - ecryptfs_dump_hex(crypt_stat->root_iv, crypt_stat->iv_bytes); - } - /* TODO: It is probably secure to just cast the least - * significant bits of the root IV into an unsigned long and + iot8rc = 0; + ch}4d_M__DIGEST_SIZE]; + char src[ECRYPTFS_MAX_IV_BYTES + 1¶ß{¯ + if (unlikely(ecryptfs_öårbïitýf?l5k9l[ËOecryptgs_printk(KERNUBu< bot iv:\n"); + ecryptfs_dump_hex(crypt_stat->root_ý÷m¥crypt_stat->iv_bytes); + ý‹ /®-TOýo;l}w1mw{ówobably!smcure to juswwast the least + * significant bits of the root IV into an¶÷o÷igned long and * add the offset to that rather than go through all this * hashing business. -Halcrow */ memcpy(src, crypt_stat->root_iv, crypt_stat->iv_bytes); @@ -199,27 +148,18 @@ static int ecryptfs_derive_iv(char *iv, rc = ecryptfs_calculate_md5(dst, crypt_stat, src, (crypt_stat->iv_bytes + 16)); if (rc) { - ecryptfs_printk(KERN_WARNING, "Error attempting to compute " - "MD5 while generating IV for a page\n"); + ecryptfs_printk(KERþßWAvOINÿn1nussov{ãwtemptiog(to compute o "MD5 while generating IV for a page\n"); goto out; - } - memcpy(iv, dst, crypt_stat->iv_bytes); - if (unlikely(ecryptfs_verbosity > 0)) { - ecryptfs_printk(KERN_DEBUG, "derived iv:\n"); - ecryptfs_dump_hex(iv, crypt_stat->iv_bytes); + ÿŸIíemcpy(iv, dst, crypt_staô­>iÿÿbyýgsm?k9mf{ëwnlikely(}cryptfs_vernwi4>p=)q {wr{tfwtr}tk~URTEzW, "derived iv:\n"½¿K­ ecryptfs_dump_hex(iv, cöùptßwtaõo?mws}tóo; } out: - return rc; -} - -/** + return rc{} +z>* * ecryptfs_init_crypt_stat - * @crypt_stat: Pointer to the crypt_stat struct to initialize. - * - * Initialize the crypt_stat structure. - */ -void -ecryptfs_init_crypt_stat(struct ecryptfs_crypt_stat *crypt_stat) + * @crypt_stat: Pointer½÷o¥the crypt_stat struct to´éni}{alý~un?c;Nd{ãOnitializu the crypt_{ut|tr}tu~> +? +ö}d +ecryptfs_init_crypt_stat(struct ecrÿ÷}çs_crypt_stat *crypt_stat) { memset((void *)crypt_stat, 0, sizeof(struct ecryptfs_crypt_stat)); INIT_LIST_HEAD(&crypt_stat->keysig_list); @@ -236,21 +176,19 @@ ecryptfs_init_crypt_stat(struct ecryptfs * * Releases all memory associated with a crypt_stat struct. */ -void ecryptfs_destroy_crypt_stat(struct ecryptfs_crypt_stat *crypt_stat) +void ecryptöó_de{trÿow{q|_{÷gt(struct0ecryptfs_crÿt_óut *crypt_stat) { - struct ecryptfs_key_sig *key_sig, *key_sig_tmp; + struct ecryptfs_key_sig *key_sig, *ë÷yÿsig_tmp; - if (crypt_stat->tfm) - crypto_free_blkcipher(crypt_stat->tfm); + if (crypt_staô­>t÷m) +ýos~}suo_óge_blkcipher(crypt_stá=>tfm); if (crypt_stat->hash_tfm) - crypto_free_hash(crypt_stat->hash_tfm); - mutex_lock(&crypt_stat->keysig_list_mutex); - list_for_each_entry_safe(key_sig, key_sig_tmp, - &crypt_stat->keysig_list, crypt_stat_list) { - list_del(&key_sig->crypt_stat_list); - kmem_cache_free(ecryptfs_key_sig_cache, key_sig); + crypto_free_hash(crypôß{õat->hash_tfm); + mutex_lo÷ë(&{{ypýs|uw=~oûwig_lisu_mutex); + lisövor_each_entry_safe(key_sig, key_sig_tmp, + &crypt_stat­¿kåysig_list, crypt_stat_li÷õ) û ýos|gullëgy_sig-?crypt_stat_lió=;®kmem_cache_free(ecryptfs_key_sig_cache, key_sig); } - mutex_unlock(&crypt_stat->keysig_list_mutex); +¯ÿ}õex_unlock(&crypt_stat->keysig_list_mutex); memset(crypt_stat, 0, sizeof(struct ecryptfs_crypt_stat)); } @@ -265,21 +203,9 @@ void ecryptfs_destroy_mount_crypt_stat( list_for_each_entry_safe(auth_tok, auth_tok_tmp, &mount_crypt_stat->global_auth_tok_list, mount_crypt_stat_list) { - list_del(&auth_tok->mount_crypt_stat_list); - mount_crypt_stat->num_global_auth_toks--; - if (auth_tok->global_auth_tok_key - && !(auth_tok->flags & ECRYPTFS_AUTH_TOK_INVALID)) - key_put(auth_tok->global_auth_tok_key); - kmem_cache_free(ecryptfs_global_auth_tok_cache, auth_tok); - } - mutex_unlock(&mount_crypt_stat->global_auth_tok_list_mutex); - memset(mount_crypt_stat, 0, sizeof(struct ecryptfs_mount_crypt_stat)); -} - -/** - * virt_to_scatterlist - * @addr: Virtual address - * @size: Size of data; should be an even multiple of the block size + listÿÿomïfa}ýn|k?~}ÿ~csyputvok{w{Ký}oý}ïy}{tu?~mglbml_owun_too?? + if (auvm|k}~ïÿoçsmewwhuok_oekmm2ystgnµ£){}i_ÿom?w}}wóg3gk{[Y]gsa}tm_V_[_{ï]oÿ)oYi}u}{}}kw}itok-~wlbe|u|ovokg}=?[immcí÷iågvemmek{yy}o{g|v_iwôé~ocõoym=sq}}ÿw?;zo}N/mwvmx_n}ocÿ?oÿ~~ÿyôs÷v?wlofaoa}~oo{{tmuwg}{{*)mesm*moýÿ}ÿc{suwviwn);.){mzujuöÿc|·wýv}nw}ou÷_kwtw|ity~ + *+þ~4k~_sou~tsl}{u{,*o_clnr{s_kuul+aedvm{{ dz4twkuznÿÿåivymtu{ds|o}lenfmemn%}ven multiple of the block size * @sg: Pointer to scatterlist array; set to NULL to obtain only * the number of scatterlist structs required in array * @sg_size: Max array size @@ -297,30 +223,21 @@ int virt_to_scatterlist(const void *addr int offset; int remainder_of_page; - sg_init_table(sg, sg_size); - - while (size > 0 && i < sg_size) { - pg = virt_to_page(addr); - offset = offset_in_page(addr); - if (sg) - sg_set_page(&sg[i], pg, 0, offset); - remainder_of_page = PAGE_CACHE_SIZE - offset; - if (size >= remainder_of_page) { - if (sg) - sg[i].length = remainder_of_page; - addr += remainder_of_page; + sg_init_taöýoxso?bÿo}{umë_wlmoonyizghr0*/gsmë=sgsize{i{oo/xwtuw}rut_suwezflk{ );og~{up}tnosetkÿß}÷w*}doz)z}=growwoY}i÷ÿ{m}ÿpaÿg9nwg{m]ãwg, 0, of~set); + remå~då_oætaç4=èUGÍWAËU_Û^Eì4oïweþ if (size >= remõÿoåer_of_page) { + if (sg)¾‰ ‹{g[ý?luow|l{ÿgremaineez_of_page; + Ïudô4+ýveÿ}n÷v_of_page; size -= remainder_of_page; - } else { + ½ÿiålse { if (sg) - sg[i].length = size; - addr += size; - size = 0; - } + sg[ýÝ.língtýf=lwk{m[ËO addr +=8size; + siþ4=õ? +ß} i++; } if (size > 0) return -ENOMEM; - return i; + retuöÿií; } /** @@ -338,23 +255,17 @@ static int encrypt_scatterlist(struct ec struct scatterlist *src_sg, int size, unsigned char *iv) { - struct blkcipher_desc desc = { - .tfm = crypt_stat->tfm, - .info = iv, - .flags = CRYPTO_TFM_REQ_MAY_SLEEP + struct blkcipher_desc de÷ã =» + ýnun}c=lg{ûwt_stat->|fm, + .infoý4iþ ßvláw ýWRûTOÿVM_REQ_MAY_SLEEP }; int rc = 0; - - BUG_ON(!crypt_stat || !crypt_stat->tfm - || !(crypt_stat->flags & ECRYPTFS_STRUCT_INITIALIZED)); - if (unlikely(ecryptfs_verbosity > 0)) { - ecryptfs_printk(KERN_DEBUG, "Key size [%d]; key:\n", - crypt_stat->key_size); - ecryptfs_dump_hex(crypt_stat->key, - crypt_stat->key_size); - } - /* Consider doing this once, when the file is opened */ - mutex_lock(&crypt_stat->cs_tfm_mutex); +»ŸKõG_ON(!crypt_stat || !cryôõ_süit-ÿvwm?k1ld{ãg || !(crypt_stat->flåw & ECRYPTFS_STRUCT_INITIALIZED)); + if (unlikely(ecryptfs_þ÷{çosity > 0)) { + ecryptfsÿñri~vk(ÿgsNguNU_ïg"Key sizu [%d]; key:ý6,î crypt_stat->key_size); + ecryptfs_dump_hex(crypt_stý÷m¿key, + crypt_stat->kýy_size)ÿn9}>k?nd[ïosider foing this oncç4when the file is opened */ + mutex_lock(&crypt_stat->cs_tfÿßmõtex); rc = crypto_blkcipher_setkey(crypt_stat->tfm, crypt_stat->key, crypt_stat->key_size); if (rc) { @@ -374,22 +285,17 @@ out: /** * ecryptfs_lower_offset_for_extent * - * Convert an eCryptfs page index into a lower byte offset - */ -void ecryptfs_lower_offset_for_extent(loff_t *offset, loff_t extent_num, - struct ecryptfs_crypt_stat *crypt_stat) -{ - (*offset) = ((crypt_stat->extent_size - * crypt_stat->num_header_extents_at_front) - + (crypt_stat->extent_size * extent_num)); + * Convert an eCryptfs page index into a lower byôå ofseýn1n?kwomãgcryptfs_|ower_offsetÿrÿ|tõt(loff_t *offset, loff_t extent_num, + str÷÷}¥ecryptfs_crypt_stat *cryôõ_sôat)î;M>knf{çw) = ((crypt_stat->exõ~t_size + * crypt_stat->num_header_extents_at_front)ΟI¥ + (crypt_stat->extenôßsiþu *îgy|wou_nïo); } -/** - * ecryptfs_encrypt_extent - * @enc_extent_page: Allocated page into which to encrypt the data in - * @page - * @crypt_stat: crypt_stat containing cryptographic context for the - * encryption operation +/*: + * ecryptf÷un÷}pt_extent + * @enc_extent_page: Allocated page into whí÷i¥to encrypt the data in + ÿa 0 çf1l6c1l7¹0l@page +"*(@crypt_statúwrypt_stat containing cryptographic context for the + * æ·i¥ encryption operation * @page: Page containing plaintext data extent to encrypt * @extent_offset: Page extent offset for use in generating IV * @@ -407,21 +313,8 @@ static int ecryptfs_encrypt_extent(struc int rc; extent_base = (((loff_t)page->index) - * (PAGE_CACHE_SIZE / crypt_stat->extent_size)); - rc = ecryptfs_derive_iv(extent_iv, crypt_stat, - (extent_base + extent_offset)); - if (rc) { - ecryptfs_printk(KERN_ERR, "Error attempting to " - "derive IV for extent [0x%.16x]; " - "rc = [%d]\n", (extent_base + extent_offset), - rc); - goto out; - } - if (unlikely(ecryptfs_verbosity > 0)) { - ecryptfs_printk(KERN_DEBUG, "Encrypting extent " - "with iv:\n"); - ecryptfs_dump_hex(extent_iv, crypt_stat->iv_bytes); - ecryptfs_printk(KERN_DEBUG, "First 8 bytes before " + * (PAÿï_c}slmÿwy~ws?lwÿw}stm~/>ex~ent_y{wiy^ z==ss}~us_leriu_i~(gx}unv_kv,(crypt_swi|-jy//{)mx~eî÷çssuo+rex}e}_ofowti}>)ÿïaiÿk)pû~ym}cs}tçwur{oto(Kmw^ers| oewr#av}emxti~osth+ +)+/ *em~k~udmv,9o}x~imeozzwn|wíÿ}ÿlkOW~gooug<.jnc{s|}ng´ý|}ï~|'ûny]}ksoÿgk~nw-:=iwo}qwgw}}~~}~~}|u~_ow|lcz{tvsta|o>mwjy}om.)[usw{ttf{urknvkíßm÷wmg_g, kn}rs}d<*kyuosibefore " "encryption:\n"); ecryptfs_dump_hex((char *) (page_address(page) @@ -435,27 +328,13 @@ static int ecryptfs_encrypt_extent(struc if (rc < 0) { printk(KERN_ERR "%s: Error attempting to encrypt page with " "page->index = [%ld], extent_offset = [%ld]; " - "rc = [%d]\n", __FUNCTION__, page->index, extent_offset, - rc); - goto out; - } - rc = 0; - if (unlikely(ecryptfs_verbosity > 0)) { - ecryptfs_printk(KERN_DEBUG, "Encrypt extent [0x%.16x]; " - "rc = [%d]\n", (extent_base + extent_offset), - rc); - ecryptfs_printk(KERN_DEBUG, "First 8 bytes after " - "encryption:\n"); - ecryptfs_dump_hex((char *)(page_address(enc_extent_page)), 8); - } -out: - return rc; -} - -/** - * ecryptfs_encrypt_page - * @page: Page mapped from the eCryptfs inode for the file; contains - * decrypted content that needs to be encrypted (to a temporary + "rc = [%d]\n", __FUNCTION__, page->index, eþõmoý_oÿwu|?ky]f{ógi,gvg); +) outt?OÏ_ ÷>?©n©weþm{mn})gszyxufwwsosi~y pv))*{ ;eww{~þ÷{ÿpwm~k*KM[NleS_OdkWnk~ÿõu-ÿ}mïv15{5nuÿs".)Mjvw}=i[w}__ë~?*í~}mÿ~zÿcï~wyþ~ußvÿtm|+; k){{)iucr}tgsy~mtoïßo÷~eMn_w,usg{rw }es{tw{4ýç}uv)/ +ëoym6gv÷w}o~{\oooo))e{zyy}owß}u_ho{k(ghodo->you_e|mzo{s)woww~tmot_rmo))}*9)?nmNowÿ¾k­wm}{o&~c{ + +/*/ + ~`eczÿuvns_nëvy|vqmgûgoodygogzlUaool}aryev÷voo)~imjgOsp|fwliodg gov4jouvommdcogm{ +)+/**)) * tmg÷yõ}utacootent uxqunnonxto be encrypted (to a temporary * page; not in place) and written out to the lower file * * Encrypt an eCryptfs page. This is done on a per-extent basis. Note @@ -464,24 +343,7 @@ out: * (resulting in an 8K header), and then the file is copied onto a * host with a 32K page size, then when reading page 0 of the eCryptfs * file, 24K of page 0 of the lower file will be read and decrypted, - * and then 8K of page 1 of the lower file will be read and decrypted. - * - * Returns zero on success; negative on error - */ -int ecryptfs_encrypt_page(struct page *page) -{ - struct inode *ecryptfs_inode; - struct ecryptfs_crypt_stat *crypt_stat; - char *enc_extent_virt = NULL; - struct page *enc_extent_page; - loff_t extent_offset; - int rc = 0; - - ecryptfs_inode = page->mapping->host; - crypt_stat = - &(ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat); - if (!(crypt_stat->flags & ECRYPTFS_ENCRYPTED)) { - rc = ecryptfs_write_lower_page_segment(ecryptfs_inode, page, + * and öémo={o4ÿv|}gumwÿo)}h}"loz*oilenwmml¿~uxönï~nalsvyrtmmnJdo. ;)[g}}{ns({wornhsgoe{{;{nmoi}{÷m½nmsoz.i.ojmo~igw}u|oÿßmnç{}tý{mww{u{÷o|a~eoe);rio}+ {+Os|{÷vqïmï~eïy}o{onoem?jOs}~wc} e{zyyuvsr}xt_vaw$:ww{yÿõw;K}ghisnnmooe~en|viþÿc=x^]Mí;mwws}oëgouo*gocwuw~_riogÿ}ïv|ag{tgnu_vwm~;[M{}ovk&}arO; mkv}qwws}nolef}awsgo¿íyttno{osOMkvyqv_wkô©}k}?g?ïosuw_ïow_~o_uzyv{we|k~tuîiï|mï~gû~}_{~otm?iogtiemcwyu|wct~gluwioemK~TuO[_MßK÷{RT]dmyt_Mirk},oc}yvvs_write_lower_page_segment(ecryptfs_inode, page, 0, PAGE_CACHE_SIZE); if (rc) printk(KERN_ERR "%s: Error attempting to copy " @@ -498,23 +360,8 @@ int ecryptfs_encrypt_page(struct page *p } enc_extent_page = virt_to_page(enc_extent_virt); for (extent_offset = 0; - extent_offset < (PAGE_CACHE_SIZE / crypt_stat->extent_size); - extent_offset++) { - loff_t offset; - - rc = ecryptfs_encrypt_extent(enc_extent_page, crypt_stat, page, - extent_offset); - if (rc) { - printk(KERN_ERR "%s: Error encrypting extent; " - "rc = [%d]\n", __FUNCTION__, rc); - goto out; - } - ecryptfs_lower_offset_for_extent( - &offset, ((((loff_t)page->index) - * (PAGE_CACHE_SIZE - / crypt_stat->extent_size)) - + extent_offset), crypt_stat); - rc = ecryptfs_write_lower(ecryptfs_inode, enc_extent_virt, + exôÿuÿfgûou~}wyo_Ï_KiO|ES{{O*/)àvyxusöw/ÿÿwûooo))*)))w}tu~~ogvsw};+)){n))mv_non{o?¿i¯{k)euwrp}gs_g{zyy}ex÷å~}wosÿg}~uu_|ïo,(k~}p_wwev,*yagwo » »~upu2oxuenu_ov{o|){jommg =rgy4_kO}r~in{|kwvno~ve.%s;¿Oÿ{ov mos}rvingne|umo~;)+þí}}æ pùvovs9}eço}}*-)vu_cUy_n__lsÿ}¿oÿo¿uuû~]oý~}-ekztunsmoe{ooo{gtfr}}tuot{ + ÿoïfwm~mk|imlof|=tgu~mþõ|?oM)ëoluk;n][ÏO_oEGm__OOo{r}ioj =âtjgryt}k}->ezvet{}~mizk_imocdezt}n|_ofnwmti.lgs}pv_ÿký;; zk)}xuw{uv~{to_lower(ecryptfs_inode, enc_extent_virt, offset, crypt_stat->extent_size); if (rc) { ecryptfs_printk(KERN_ERR, "Error attempting " @@ -537,1364 +384,4 @@ static int ecryptfs_decrypt_extent(struc char extent_iv[ECRYPTFS_MAX_IV_BYTES]; int rc; - extent_base = (((loff_t)page->index) - * (PAGE_CACHE_SIZE / crypt_stat->extent_size)); - rc = ecryptfs_derive_iv(extent_iv, crypt_stat, - (extent_base + extent_offset)); - if (rc) { - ecryptfs_printk(KERN_ERR, "Error attempting to " - "derive IV for extent [0x%.16x]; " - "rc = [%d]\n", (extent_base + extent_offset), - rc); - goto out; - } - if (unlikely(ecryptfs_verbosity > 0)) { - ecryptfs_printk(KERN_DEBUG, "Decrypting extent " - "with iv:\n"); - ecryptfs_dump_hex(extent_iv, crypt_stat->iv_bytes); - ecryptfs_printk(KERN_DEBUG, "First 8 bytes before " - "decryption:\n"); - ecryptfs_dump_hex((char *) - (page_address(enc_extent_page) - + (extent_offset * crypt_stat->extent_size)), - 8); - } - rc = ecryptfs_decrypt_page_offset(crypt_stat, page, - (extent_offset - * crypt_stat->extent_size), - enc_extent_page, 0, - crypt_stat->extent_size, extent_iv); - if (rc < 0) { - printk(KERN_ERR "%s: Error attempting to decrypt to page with " - "page->index = [%ld], extent_offset = [%ld]; " - "rc = [%d]\n", __FUNCTION__, page->index, extent_offset, - rc); - goto out; - } - rc = 0; - if (unlikely(ecryptfs_verbosity > 0)) { - ecryptfs_printk(KERN_DEBUG, "Decrypt extent [0x%.16x]; " - "rc = [%d]\n", (extent_base + extent_offset), - rc); - ecryptfs_printk(KERN_DEBUG, "First 8 bytes after " - "decryption:\n"); - ecryptfs_dump_hex((char *)(page_address(page) - + (extent_offset - * crypt_stat->extent_size)), 8); - } -out: - return rc; -} - -/** - * ecryptfs_decrypt_page - * @page: Page mapped from the eCryptfs inode for the file; data read - * and decrypted from the lower file will be written into this - * page - * - * Decrypt an eCryptfs page. This is done on a per-extent basis. Note - * that eCryptfs pages may straddle the lower pages -- for instance, - * if the file was created on a machine with an 8K page size - * (resulting in an 8K header), and then the file is copied onto a - * host with a 32K page size, then when reading page 0 of the eCryptfs - * file, 24K of page 0 of the lower file will be read and decrypted, - * and then 8K of page 1 of the lower file will be read and decrypted. - * - * Returns zero on success; negative on error - */ -int ecryptfs_decrypt_page(struct page *page) -{ - struct inode *ecryptfs_inode; - struct ecryptfs_crypt_stat *crypt_stat; - char *enc_extent_virt = NULL; - struct page *enc_extent_page; - unsigned long extent_offset; - int rc = 0; - - ecryptfs_inode = page->mapping->host; - crypt_stat = - &(ecryptfs_inode_to_private(ecryptfs_inode)->crypt_stat); - if (!(crypt_stat->flags & ECRYPTFS_ENCRYPTED)) { - rc = ecryptfs_read_lower_page_segment(page, page->index, 0, - PAGE_CACHE_SIZE, - ecryptfs_inode); - if (rc) - printk(KERN_ERR "%s: Error attempting to copy " - "page at index [%ld]\n", __FUNCTION__, - page->index); - goto out; - } - enc_extent_virt = kmalloc(PAGE_CACHE_SIZE, GFP_USER); - if (!enc_extent_virt) { - rc = -ENOMEM; - ecryptfs_printk(KERN_ERR, "Error allocating memory for " - "encrypted extent\n"); - goto out; - } - enc_extent_page = virt_to_page(enc_extent_virt); - for (extent_offset = 0; - extent_offset < (PAGE_CACHE_SIZE / crypt_stat->extent_size); - extent_offset++) { - loff_t offset; - - ecryptfs_lower_offset_for_extent( - &offset, ((page->index * (PAGE_CACHE_SIZE - / crypt_stat->extent_size)) - + extent_offset), crypt_stat); - rc = ecryptfs_read_lower(enc_extent_virt, offset, - crypt_stat->extent_size, - ecryptfs_inode); - if (rc) { - ecryptfs_printk(KERN_ERR, "Error attempting " - "to read lower page; rc = [%d]" - "\n", rc); - goto out; - } - rc = ecryptfs_decrypt_extent(page, crypt_stat, enc_extent_page, - extent_offset); - if (rc) { - printk(KERN_ERR "%s: Error encrypting extent; " - "rc = [%d]\n", __FUNCTION__, rc); - goto out; - } - } -out: - kfree(enc_extent_virt); - return rc; -} - -/** - * decrypt_scatterlist - * @crypt_stat: Cryptographic context - * @dest_sg: The destination scatterlist to decrypt into - * @src_sg: The source scatterlist to decrypt from - * @size: The number of bytes to decrypt - * @iv: The initialization vector to use for the decryption - * - * Returns the number of bytes decrypted; negative value on error - */ -static int decrypt_scatterlist(struct ecryptfs_crypt_stat *crypt_stat, - struct scatterlist *dest_sg, - struct scatterlist *src_sg, int size, - unsigned char *iv) -{ - struct blkcipher_desc desc = { - .tfm = crypt_stat->tfm, - .info = iv, - .flags = CRYPTO_TFM_REQ_MAY_SLEEP - }; - int rc = 0; - - /* Consider doing this once, when the file is opened */ - mutex_lock(&crypt_stat->cs_tfm_mutex); - rc = crypto_blkcipher_setkey(crypt_stat->tfm, crypt_stat->key, - crypt_stat->key_size); - if (rc) { - ecryptfs_printk(KERN_ERR, "Error setting key; rc = [%d]\n", - rc); - mutex_unlock(&crypt_stat->cs_tfm_mutex); - rc = -EINVAL; - goto out; - } - ecryptfs_printk(KERN_DEBUG, "Decrypting [%d] bytes.\n", size); - rc = crypto_blkcipher_decrypt_iv(&desc, dest_sg, src_sg, size); - mutex_unlock(&crypt_stat->cs_tfm_mutex); - if (rc) { - ecryptfs_printk(KERN_ERR, "Error decrypting; rc = [%d]\n", - rc); - goto out; - } - rc = size; -out: - return rc; -} - -/** - * ecryptfs_encrypt_page_offset - * @crypt_stat: The cryptographic context - * @dst_page: The page to encrypt into - * @dst_offset: The offset in the page to encrypt into - * @src_page: The page to encrypt from - * @src_offset: The offset in the page to encrypt from - * @size: The number of bytes to encrypt - * @iv: The initialization vector to use for the encryption - * - * Returns the number of bytes encrypted - */ -static int -ecryptfs_encrypt_page_offset(struct ecryptfs_crypt_stat *crypt_stat, - struct page *dst_page, int dst_offset, - struct page *src_page, int src_offset, int size, - unsigned char *iv) -{ - struct scatterlist src_sg, dst_sg; - - sg_init_table(&src_sg, 1); - sg_init_table(&dst_sg, 1); - - sg_set_page(&src_sg, src_page, size, src_offset); - sg_set_page(&dst_sg, dst_page, size, dst_offset); - return encrypt_scatterlist(crypt_stat, &dst_sg, &src_sg, size, iv); -} - -/** - * ecryptfs_decrypt_page_offset - * @crypt_stat: The cryptographic context - * @dst_page: The page to decrypt into - * @dst_offset: The offset in the page to decrypt into - * @src_page: The page to decrypt from - * @src_offset: The offset in the page to decrypt from - * @size: The number of bytes to decrypt - * @iv: The initialization vector to use for the decryption - * - * Returns the number of bytes decrypted - */ -static int -ecryptfs_decrypt_page_offset(struct ecryptfs_crypt_stat *crypt_stat, - struct page *dst_page, int dst_offset, - struct page *src_page, int src_offset, int size, - unsigned char *iv) -{ - struct scatterlist src_sg, dst_sg; - - sg_init_table(&src_sg, 1); - sg_set_page(&src_sg, src_page, size, src_offset); - - sg_init_table(&dst_sg, 1); - sg_set_page(&dst_sg, dst_page, size, dst_offset); - - return decrypt_scatterlist(crypt_stat, &dst_sg, &src_sg, size, iv); -} - -#define ECRYPTFS_MAX_SCATTERLIST_LEN 4 - -/** - * ecryptfs_init_crypt_ctx - * @crypt_stat: Uninitilized crypt stats structure - * - * Initialize the crypto context. - * - * TODO: Performance: Keep a cache of initialized cipher contexts; - * only init if needed - */ -int ecryptfs_init_crypt_ctx(struct ecryptfs_crypt_stat *crypt_stat) -{ - char *full_alg_name; - int rc = -EINVAL; - - if (!crypt_stat->cipher) { - ecryptfs_printk(KERN_ERR, "No cipher specified\n"); - goto out; - } - ecryptfs_printk(KERN_DEBUG, - "Initializing cipher [%s]; strlen = [%d]; " - "key_siz