From c5edd24b88dcf0338bd82de9fe67f1e8794130eb Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Tue, 23 Oct 2007 09:11:41 +0200 Subject: [PATCH] --- yaml --- r: 72180 b: refs/heads/master c: 9f2326be52f4fa83d20a75998cd3c87b300588c4 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/common/dmabounce.c | 1 + trunk/arch/m68knommu/Kconfig | 13 +- trunk/arch/m68knommu/Makefile | 3 +- trunk/arch/m68knommu/defconfig | 325 +++++---- trunk/arch/m68knommu/kernel/setup.c | 27 +- trunk/arch/m68knommu/kernel/signal.c | 10 +- trunk/arch/m68knommu/kernel/time.c | 22 +- trunk/arch/m68knommu/platform/5206/config.c | 9 + trunk/arch/m68knommu/platform/5206e/config.c | 10 + trunk/arch/m68knommu/platform/520x/config.c | 8 +- trunk/arch/m68knommu/platform/523x/config.c | 8 + trunk/arch/m68knommu/platform/5249/config.c | 10 + trunk/arch/m68knommu/platform/5272/config.c | 10 + trunk/arch/m68knommu/platform/527x/config.c | 8 + trunk/arch/m68knommu/platform/528x/config.c | 8 + trunk/arch/m68knommu/platform/5307/config.c | 10 + trunk/arch/m68knommu/platform/5307/entry.S | 5 +- trunk/arch/m68knommu/platform/5307/pit.c | 15 +- trunk/arch/m68knommu/platform/5307/timers.c | 19 +- trunk/arch/m68knommu/platform/532x/config.c | 10 + trunk/arch/m68knommu/platform/5407/config.c | 10 + trunk/drivers/char/cyclades.c | 2 +- trunk/drivers/md/bitmap.c | 2 +- trunk/drivers/md/raid5.c | 17 +- trunk/drivers/net/fec.c | 24 +- trunk/drivers/serial/mcf.c | 653 ------------------- trunk/include/asm-m68knommu/module.h | 12 +- trunk/include/asm-m68knommu/uaccess.h | 4 +- trunk/include/sound/version.h | 2 +- trunk/mm/mmap.c | 3 +- trunk/mm/mprotect.c | 2 +- trunk/sound/core/control.c | 5 +- trunk/sound/pci/bt87x.c | 4 +- trunk/sound/pci/hda/hda_codec.c | 9 +- trunk/sound/pci/hda/hda_local.h | 18 +- trunk/sound/pci/hda/patch_analog.c | 5 +- trunk/sound/pci/hda/patch_cmedia.c | 3 +- trunk/sound/pci/hda/patch_conexant.c | 35 +- trunk/sound/pci/hda/patch_realtek.c | 2 +- trunk/sound/pci/hda/patch_sigmatel.c | 6 +- trunk/sound/pci/hda/patch_via.c | 2 +- trunk/sound/sh/aica.c | 31 +- trunk/sound/sparc/cs4231.c | 59 +- trunk/sound/usb/usbquirks.h | 9 - 45 files changed, 486 insertions(+), 966 deletions(-) delete mode 100644 trunk/drivers/serial/mcf.c diff --git a/[refs] b/[refs] index 1315ccbfc443..f64d2a6f82c9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 101e4d91f5e8c78d64970c03323d942d6706320f +refs/heads/master: 9f2326be52f4fa83d20a75998cd3c87b300588c4 diff --git a/trunk/arch/arm/common/dmabounce.c b/trunk/arch/arm/common/dmabounce.c index 9d371e476552..52fc6a883281 100644 --- a/trunk/arch/arm/common/dmabounce.c +++ b/trunk/arch/arm/common/dmabounce.c @@ -29,6 +29,7 @@ #include #include #include +#include #include diff --git a/trunk/arch/m68knommu/Kconfig b/trunk/arch/m68knommu/Kconfig index f4b582cbb567..f52c627bdadd 100644 --- a/trunk/arch/m68knommu/Kconfig +++ b/trunk/arch/m68knommu/Kconfig @@ -451,12 +451,6 @@ config MOD5272 help Support for the Netburner MOD-5272 board. -config SAVANTrosie1 - bool "Savant Rosie1 board support" - depends on M523x - help - Support for the Savant Rosie1 board. - config ROMFS_FROM_ROM bool "ROMFS image not RAM resident" depends on (NETtel || SNAPGEAR) @@ -498,12 +492,7 @@ config SNEHA bool default y depends on CPU16B - -config SAVANT - bool - default y - depends on SAVANTrosie1 - + config AVNET bool default y diff --git a/trunk/arch/m68knommu/Makefile b/trunk/arch/m68knommu/Makefile index 30aa2553693d..92227aaaa26e 100644 --- a/trunk/arch/m68knommu/Makefile +++ b/trunk/arch/m68knommu/Makefile @@ -48,7 +48,6 @@ board-$(CONFIG_SNEHA) := SNEHA board-$(CONFIG_M5208EVB) := M5208EVB board-$(CONFIG_MOD5272) := MOD5272 board-$(CONFIG_AVNET) := AVNET -board-$(CONFIG_SAVANT) := SAVANT BOARD := $(board-y) model-$(CONFIG_RAMKERNEL) := ram @@ -118,4 +117,4 @@ core-y += arch/m68knommu/kernel/ \ libs-y += arch/m68knommu/lib/ archclean: - + $(Q)$(MAKE) $(clean)=arch/m68knommu/boot diff --git a/trunk/arch/m68knommu/defconfig b/trunk/arch/m68knommu/defconfig index 5a0ecaaee3b0..3891de09ac23 100644 --- a/trunk/arch/m68knommu/defconfig +++ b/trunk/arch/m68knommu/defconfig @@ -1,48 +1,41 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.23 -# Thu Oct 18 13:17:38 2007 +# Linux kernel version: 2.6.17 +# Tue Jun 27 12:57:06 2006 # CONFIG_M68K=y # CONFIG_MMU is not set # CONFIG_FPU is not set -CONFIG_ZONE_DMA=y CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set -# CONFIG_ARCH_HAS_ILOG2_U32 is not set -# CONFIG_ARCH_HAS_ILOG2_U64 is not set CONFIG_GENERIC_FIND_NEXT_BIT=y CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_TIME_LOW_RES=y -CONFIG_NO_IOPORT=y -CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # -# General setup +# Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 + +# +# General setup +# CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y # CONFIG_SYSVIPC is not set # CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set -# CONFIG_USER_NS is not set +# CONFIG_SYSCTL is not set # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set -# CONFIG_BLK_DEV_INITRD is not set +CONFIG_INITRAMFS_SOURCE="" +CONFIG_UID16=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set -CONFIG_SYSCTL=y CONFIG_EMBEDDED=y -CONFIG_UID16=y -CONFIG_SYSCTL_SYSCALL=y # CONFIG_KALLSYMS is not set # CONFIG_HOTPLUG is not set CONFIG_PRINTK=y @@ -51,25 +44,20 @@ CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y # CONFIG_FUTEX is not set # CONFIG_EPOLL is not set -# CONFIG_SIGNALFD is not set -# CONFIG_EVENTFD is not set -# CONFIG_VM_EVENT_COUNTERS is not set CONFIG_SLAB=y -# CONFIG_SLUB is not set -# CONFIG_SLOB is not set CONFIG_TINY_SHMEM=y CONFIG_BASE_SMALL=0 -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_KMOD is not set -CONFIG_BLOCK=y -# CONFIG_LBD is not set +# CONFIG_SLOB is not set + +# +# Loadable module support +# +# CONFIG_MODULES is not set + +# +# Block layer +# # CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set -# CONFIG_BLK_DEV_BSG is not set # # IO Schedulers @@ -111,7 +99,6 @@ CONFIG_CLOCK_DIV=1 # # Platform # -# CONFIG_UC5272 is not set CONFIG_M5272C3=y # CONFIG_COBRA5272 is not set # CONFIG_CANCam is not set @@ -120,6 +107,7 @@ CONFIG_M5272C3=y # CONFIG_CPU16B is not set # CONFIG_MOD5272 is not set CONFIG_FREESCALE=y +# CONFIG_LARGE_ALLOCS is not set CONFIG_4KSTACKS=y # @@ -133,11 +121,6 @@ CONFIG_RAMAUTOBIT=y # CONFIG_RAM8BIT is not set # CONFIG_RAM16BIT is not set # CONFIG_RAM32BIT is not set - -# -# ROM configuration -# -# CONFIG_ROM is not set CONFIG_RAMKERNEL=y # CONFIG_ROMKERNEL is not set CONFIG_SELECT_MEMORY_MODEL=y @@ -148,19 +131,20 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_RESOURCES_64BIT is not set -CONFIG_ZONE_DMA_FLAG=1 -CONFIG_VIRT_TO_BUS=y # # Bus options (PCI, PCMCIA, EISA, MCA, ISA) # # CONFIG_PCI is not set -# CONFIG_ARCH_SUPPORTS_MSI is not set # # PCCARD (PCMCIA/CardBus) support # +# CONFIG_PCCARD is not set + +# +# PCI Hotplug Support +# # # Executable file formats @@ -184,6 +168,7 @@ CONFIG_NET=y # # Networking options # +# CONFIG_NETDEBUG is not set CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set CONFIG_UNIX=y @@ -202,21 +187,27 @@ CONFIG_IP_FIB_HASH=y # 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_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_TCP_CONG_BIC=y # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set -# CONFIG_NETWORK_SECMARK is not set # CONFIG_NETFILTER is not set + +# +# DCCP Configuration (EXPERIMENTAL) +# # CONFIG_IP_DCCP is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# # CONFIG_IP_SCTP is not set + +# +# TIPC Configuration (EXPERIMENTAL) +# # CONFIG_TIPC is not set # CONFIG_ATM is not set # CONFIG_BRIDGE is not set @@ -227,6 +218,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set @@ -242,17 +234,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set -# CONFIG_AF_RXRPC is not set - -# -# Wireless -# -# CONFIG_CFG80211 is not set -# CONFIG_WIRELESS_EXT is not set -# CONFIG_MAC80211 is not set # CONFIG_IEEE80211 is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set # # Device Drivers @@ -263,8 +245,16 @@ CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_FW_LOADER is not set + +# +# Connector - unified userspace <-> kernelspace linker +# # CONFIG_CONNECTOR is not set + +# +# Memory Technology Devices (MTD) +# CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set # CONFIG_MTD_CONCAT is not set @@ -276,13 +266,11 @@ CONFIG_MTD_PARTITIONS=y # 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 is not set # # RAM/ROM/Flash chip drivers @@ -302,6 +290,7 @@ CONFIG_MTD_CFI_I2=y CONFIG_MTD_RAM=y # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_OBSOLETE_CHIPS is not set # # Mapping drivers for chip access @@ -324,25 +313,42 @@ CONFIG_MTD_UCLINUX=y # CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2001 is not set # CONFIG_MTD_DOC2001PLUS is not set + +# +# NAND Flash Device Drivers +# # CONFIG_MTD_NAND is not set + +# +# OneNAND Flash Device Drivers +# # CONFIG_MTD_ONENAND is not set # -# UBI - Unsorted block images +# Parallel port support # -# CONFIG_MTD_UBI is not set # CONFIG_PARPORT is not set -CONFIG_BLK_DEV=y + +# +# Plug and Play support +# + +# +# Block devices +# # CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 +# CONFIG_BLK_DEV_INITRD is not set # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set -# CONFIG_MISC_DEVICES is not set + +# +# ATA/ATAPI/MFM/RLL support +# # CONFIG_IDE is not set # @@ -350,29 +356,67 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 # # CONFIG_RAID_ATTRS is not set # CONFIG_SCSI is not set -# CONFIG_SCSI_DMA is not set -# CONFIG_SCSI_NETLINK is not set + +# +# Multi-device support (RAID and LVM) +# # CONFIG_MD is not set + +# +# Fusion MPT device support +# +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# + +# +# I2O device support +# + +# +# Network device support +# CONFIG_NETDEVICES=y -# CONFIG_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 + +# +# PHY device support +# # CONFIG_PHYLIB is not set + +# +# Ethernet (10 or 100Mbit) +# CONFIG_NET_ETHERNET=y # CONFIG_MII is not set CONFIG_FEC=y # CONFIG_FEC2 is not set -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set # -# Wireless LAN +# Ethernet (1000 Mbit) +# + +# +# Ethernet (10000 Mbit) +# + +# +# Token Ring devices +# + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Wan interfaces # -# CONFIG_WLAN_PRE80211 is not set -# CONFIG_WLAN_80211 is not set # CONFIG_WAN is not set CONFIG_PPP=y # CONFIG_PPP_MULTILINK is not set @@ -383,14 +427,20 @@ CONFIG_PPP=y # CONFIG_PPP_BSDCOMP is not set # CONFIG_PPP_MPPE is not set # CONFIG_PPPOE is not set -# CONFIG_PPPOL2TP is not set # CONFIG_SLIP is not set -CONFIG_SLHC=y # CONFIG_SHAPER is not set # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set + +# +# ISDN subsystem +# # CONFIG_ISDN is not set + +# +# Telephony Support +# # CONFIG_PHONE is not set # @@ -422,13 +472,34 @@ CONFIG_SERIAL_COLDFIRE=y # CONFIG_UNIX98_PTYS is not set CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 + +# +# IPMI +# # CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# # CONFIG_WATCHDOG is not set -# CONFIG_HW_RANDOM is not set # CONFIG_GEN_RTC is not set +# CONFIG_DTLK is not set # CONFIG_R3964 is not set + +# +# Ftape, the floppy tape device driver +# # CONFIG_RAW_DRIVER is not set + +# +# TPM devices +# # CONFIG_TCG_TPM is not set +# CONFIG_TELCLOCK is not set + +# +# I2C support +# # CONFIG_I2C is not set # @@ -436,74 +507,101 @@ CONFIG_LEGACY_PTY_COUNT=256 # # CONFIG_SPI is not set # CONFIG_SPI_MASTER is not set + +# +# Dallas's 1-wire bus +# # CONFIG_W1 is not set -# CONFIG_POWER_SUPPLY is not set + +# +# Hardware Monitoring support +# # CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set # -# Multifunction device drivers +# Misc devices # -# CONFIG_MFD_SM501 is not set # # Multimedia devices # # CONFIG_VIDEO_DEV is not set -# CONFIG_DVB_CORE is not set -CONFIG_DAB=y +CONFIG_VIDEO_V4L2=y # -# Graphics support +# Digital Video Broadcasting Devices # -# CONFIG_BACKLIGHT_LCD_SUPPORT is not set +# CONFIG_DVB is not set # -# Display device support +# Graphics support # -# CONFIG_DISPLAY_SUPPORT is not set -# CONFIG_VGASTATE is not set -CONFIG_VIDEO_OUTPUT_CONTROL=y # CONFIG_FB is not set # # Sound # # CONFIG_SOUND is not set -# CONFIG_USB_SUPPORT is not set + +# +# USB support +# +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB_ARCH_HAS_EHCI is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set + +# +# MMC/SD Card support +# # CONFIG_MMC is not set + +# +# LED devices +# # CONFIG_NEW_LEDS is not set -# CONFIG_RTC_CLASS is not set # -# DMA Engine support +# LED drivers # -# CONFIG_DMA_ENGINE is not set # -# DMA Clients +# LED Triggers # # -# DMA Devices +# InfiniBand support # # -# Userspace I/O +# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) # -# CONFIG_UIO is not set + +# +# Real Time Clock +# +# CONFIG_RTC_CLASS is not set # # File systems # CONFIG_EXT2_FS=y # CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set # CONFIG_EXT3_FS is not set -# CONFIG_EXT4DEV_FS is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set # CONFIG_FS_POSIX_ACL is not set # CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set # CONFIG_OCFS2_FS is not set # CONFIG_MINIX_FS is not set CONFIG_ROMFS_FS=y @@ -531,7 +629,6 @@ CONFIG_ROMFS_FS=y # Pseudo filesystems # CONFIG_PROC_FS=y -CONFIG_PROC_SYSCTL=y CONFIG_SYSFS=y # CONFIG_TMPFS is not set # CONFIG_HUGETLB_PAGE is not set @@ -548,6 +645,7 @@ CONFIG_RAMFS=y # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set # CONFIG_JFFS2_FS is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set @@ -566,6 +664,7 @@ CONFIG_RAMFS=y # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set +# CONFIG_9P_FS is not set # # Partition Types @@ -578,22 +677,16 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_NLS is not set -# -# Distributed Lock Manager -# -# CONFIG_DLM is not set - # # Kernel hacking # # CONFIG_PRINTK_TIME is not set -# CONFIG_ENABLE_MUST_CHECK is not set # CONFIG_MAGIC_SYSRQ is not set -# 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_LOG_BUF_SHIFT=14 # CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_UNWIND_INFO is not set # CONFIG_FULLDEBUG is not set # CONFIG_HIGHPROFILE is not set # CONFIG_BOOTPARAM is not set @@ -606,16 +699,20 @@ CONFIG_MSDOS_PARTITION=y # # CONFIG_KEYS is not set # CONFIG_SECURITY is not set + +# +# Cryptographic options +# # CONFIG_CRYPTO is not set +# +# Hardware crypto devices +# + # # Library routines # # CONFIG_CRC_CCITT is not set # CONFIG_CRC16 is not set -# CONFIG_CRC_ITU_T is not set # CONFIG_CRC32 is not set -# CONFIG_CRC7 is not set # CONFIG_LIBCRC32C is not set -CONFIG_HAS_IOMEM=y -CONFIG_HAS_DMA=y diff --git a/trunk/arch/m68knommu/kernel/setup.c b/trunk/arch/m68knommu/kernel/setup.c index 74bf94948ec2..3f86ade3a22a 100644 --- a/trunk/arch/m68knommu/kernel/setup.c +++ b/trunk/arch/m68knommu/kernel/setup.c @@ -151,15 +151,27 @@ void setup_arch(char **cmdline_p) #ifdef CONFIG_ELITE printk(KERN_INFO "Modified for M5206eLITE by Rob Scott, rscott@mtrob.fdns.net\n"); #endif +#ifdef CONFIG_TELOS + printk(KERN_INFO "Modified for Omnia ToolVox by James D. Schettine, james@telos-systems.com\n"); +#endif #endif printk(KERN_INFO "Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne\n"); #if defined( CONFIG_PILOT ) && defined( CONFIG_M68328 ) printk(KERN_INFO "TRG SuperPilot FLASH card support \n"); #endif + #if defined( CONFIG_PILOT ) && defined( CONFIG_M68EZ328 ) printk(KERN_INFO "PalmV support by Lineo Inc. \n"); #endif + +#ifdef CONFIG_M68EZ328ADS + printk(KERN_INFO "M68EZ328ADS board support (C) 1999 Vladimir Gurevich \n"); +#endif + +#ifdef CONFIG_ALMA_ANS + printk(KERN_INFO "Alma Electronics board support (C) 1999 Vladimir Gurevich \n"); +#endif #if defined (CONFIG_M68360) printk(KERN_INFO "QUICC port done by SED Systems ,\n"); printk(KERN_INFO "based on 2.0.38 port by Lineo Inc. .\n"); @@ -176,9 +188,11 @@ void setup_arch(char **cmdline_p) "BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext, (int) &_sdata, (int) &_edata, (int) &_sbss, (int) &_ebss); - printk(KERN_DEBUG "MEMORY -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x\n ", + printk(KERN_DEBUG "KERNEL -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x " + "STACK=0x%06x-0x%06x\n", (int) &_ebss, (int) memory_start, - (int) memory_start, (int) memory_end); + (int) memory_start, (int) memory_end, + (int) memory_end, (int) _ramend); #endif /* Keep a copy of command line */ @@ -273,3 +287,12 @@ struct seq_operations cpuinfo_op = { .show = show_cpuinfo, }; +void arch_gettod(int *year, int *mon, int *day, int *hour, + int *min, int *sec) +{ + if (mach_gettod) + mach_gettod(year, mon, day, hour, min, sec); + else + *year = *mon = *day = *hour = *min = *sec = 0; +} + diff --git a/trunk/arch/m68knommu/kernel/signal.c b/trunk/arch/m68knommu/kernel/signal.c index 70371378db86..437f8c6c14a0 100644 --- a/trunk/arch/m68knommu/kernel/signal.c +++ b/trunk/arch/m68knommu/kernel/signal.c @@ -781,7 +781,15 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs) /* Did we come from a system call? */ if (regs->orig_d0 >= 0) { /* Restart the system call - no handlers present */ - handle_restart(regs, NULL, 0); + if (regs->d0 == -ERESTARTNOHAND + || regs->d0 == -ERESTARTSYS + || regs->d0 == -ERESTARTNOINTR) { + regs->d0 = regs->orig_d0; + regs->pc -= 2; + } else if (regs->d0 == -ERESTART_RESTARTBLOCK) { + regs->d0 = __NR_restart_syscall; + regs->pc -= 2; + } } return 0; } diff --git a/trunk/arch/m68knommu/kernel/time.c b/trunk/arch/m68knommu/kernel/time.c index 77e5375a2dd5..467053da2d08 100644 --- a/trunk/arch/m68knommu/kernel/time.c +++ b/trunk/arch/m68knommu/kernel/time.c @@ -27,6 +27,7 @@ #define TICK_SIZE (tick_nsec / 1000) + static inline int set_rtc_mmss(unsigned long nowtime) { if (mach_set_clock_mmss) @@ -38,11 +39,15 @@ static inline int set_rtc_mmss(unsigned long nowtime) * timer_interrupt() needs to keep up the real-time clock, * as well as call the "do_timer()" routine every clocktick */ -irqreturn_t arch_timer_interrupt(int irq, void *dummy) +static irqreturn_t timer_interrupt(int irq, void *dummy) { /* last time the cmos clock got updated */ static long last_rtc_update=0; + /* may need to kick the hardware timer */ + if (mach_tick) + mach_tick(); + write_seqlock(&xtime_lock); do_timer(1); @@ -98,10 +103,10 @@ void time_init(void) { unsigned int year, mon, day, hour, min, sec; - if (mach_gettod) - mach_gettod(&year, &mon, &day, &hour, &min, &sec); - else - year = mon = day = hour = min = sec = 0; + extern void arch_gettod(int *year, int *mon, int *day, int *hour, + int *min, int *sec); + + arch_gettod(&year, &mon, &day, &hour, &min, &sec); if ((year += 1900) < 1970) year += 100; @@ -109,7 +114,7 @@ void time_init(void) xtime.tv_nsec = 0; wall_to_monotonic.tv_sec = -xtime.tv_sec; - hw_timer_init(); + mach_sched_init(timer_interrupt); } /* @@ -123,7 +128,7 @@ void do_gettimeofday(struct timeval *tv) do { seq = read_seqbegin_irqsave(&xtime_lock, flags); - usec = hw_timer_offset(); + usec = mach_gettimeoffset ? mach_gettimeoffset() : 0; sec = xtime.tv_sec; usec += (xtime.tv_nsec / 1000); } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); @@ -155,7 +160,8 @@ int do_settimeofday(struct timespec *tv) * Discover what correction gettimeofday * would have done, and then undo it! */ - nsec -= (hw_timer_offset() * 1000); + if (mach_gettimeoffset) + nsec -= (mach_gettimeoffset() * 1000); wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); diff --git a/trunk/arch/m68knommu/platform/5206/config.c b/trunk/arch/m68knommu/platform/5206/config.c index b3c4dd4cc135..d0f2dc5cb5a1 100644 --- a/trunk/arch/m68knommu/platform/5206/config.c +++ b/trunk/arch/m68knommu/platform/5206/config.c @@ -10,10 +10,13 @@ /***************************************************************************/ #include +#include #include #include #include +#include #include +#include #include #include #include @@ -22,6 +25,9 @@ /***************************************************************************/ +void coldfire_tick(void); +void coldfire_timer_init(irq_handler_t handler); +unsigned long coldfire_timer_offset(void); void coldfire_reset(void); /***************************************************************************/ @@ -91,6 +97,9 @@ int mcf_timerirqpending(int timer) void config_BSP(char *commandp, int size) { mcf_setimr(MCFSIM_IMR_MASKALL); + mach_sched_init = coldfire_timer_init; + mach_tick = coldfire_tick; + mach_gettimeoffset = coldfire_timer_offset; mach_reset = coldfire_reset; } diff --git a/trunk/arch/m68knommu/platform/5206e/config.c b/trunk/arch/m68knommu/platform/5206e/config.c index f84a4aea8cb6..425703fb6cee 100644 --- a/trunk/arch/m68knommu/platform/5206e/config.c +++ b/trunk/arch/m68knommu/platform/5206e/config.c @@ -9,16 +9,23 @@ /***************************************************************************/ #include +#include #include #include +#include #include +#include #include #include +#include #include #include /***************************************************************************/ +void coldfire_tick(void); +void coldfire_timer_init(irq_handler_t handler); +unsigned long coldfire_timer_offset(void); void coldfire_reset(void); /***************************************************************************/ @@ -95,6 +102,9 @@ void config_BSP(char *commandp, int size) commandp[size-1] = 0; #endif /* CONFIG_NETtel */ + mach_sched_init = coldfire_timer_init; + mach_tick = coldfire_tick; + mach_gettimeoffset = coldfire_timer_offset; mach_reset = coldfire_reset; } diff --git a/trunk/arch/m68knommu/platform/520x/config.c b/trunk/arch/m68knommu/platform/520x/config.c index 6edbd41261cc..a2c95bebd004 100644 --- a/trunk/arch/m68knommu/platform/520x/config.c +++ b/trunk/arch/m68knommu/platform/520x/config.c @@ -27,6 +27,9 @@ unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS]; /***************************************************************************/ +void coldfire_pit_tick(void); +void coldfire_pit_init(irq_handler_t handler); +unsigned long coldfire_pit_offset(void); void coldfire_reset(void); /***************************************************************************/ @@ -44,7 +47,10 @@ void mcf_autovector(unsigned int vec) void config_BSP(char *commandp, int size) { - mach_reset = coldfire_reset; + mach_sched_init = coldfire_pit_init; + mach_tick = coldfire_pit_tick; + mach_gettimeoffset = coldfire_pit_offset; + mach_reset = coldfire_reset; } /***************************************************************************/ diff --git a/trunk/arch/m68knommu/platform/523x/config.c b/trunk/arch/m68knommu/platform/523x/config.c index e7f80c8e8636..0a3af05a434b 100644 --- a/trunk/arch/m68knommu/platform/523x/config.c +++ b/trunk/arch/m68knommu/platform/523x/config.c @@ -13,10 +13,12 @@ /***************************************************************************/ #include +#include #include #include #include #include +#include #include #include #include @@ -24,6 +26,9 @@ /***************************************************************************/ +void coldfire_pit_tick(void); +void coldfire_pit_init(irq_handler_t handler); +unsigned long coldfire_pit_offset(void); void coldfire_reset(void); /***************************************************************************/ @@ -57,6 +62,9 @@ void mcf_autovector(unsigned int vec) void config_BSP(char *commandp, int size) { mcf_disableall(); + mach_sched_init = coldfire_pit_init; + mach_tick = coldfire_pit_tick; + mach_gettimeoffset = coldfire_pit_offset; mach_reset = coldfire_reset; } diff --git a/trunk/arch/m68knommu/platform/5249/config.c b/trunk/arch/m68knommu/platform/5249/config.c index d4d39435cb15..dc2c362590c2 100644 --- a/trunk/arch/m68knommu/platform/5249/config.c +++ b/trunk/arch/m68knommu/platform/5249/config.c @@ -9,17 +9,24 @@ /***************************************************************************/ #include +#include #include #include #include +#include #include +#include #include #include +#include #include #include /***************************************************************************/ +void coldfire_tick(void); +void coldfire_timer_init(irq_handler_t handler); +unsigned long coldfire_timer_offset(void); void coldfire_reset(void); /***************************************************************************/ @@ -88,6 +95,9 @@ int mcf_timerirqpending(int timer) void config_BSP(char *commandp, int size) { mcf_setimr(MCFSIM_IMR_MASKALL); + mach_sched_init = coldfire_timer_init; + mach_tick = coldfire_tick; + mach_gettimeoffset = coldfire_timer_offset; mach_reset = coldfire_reset; } diff --git a/trunk/arch/m68knommu/platform/5272/config.c b/trunk/arch/m68knommu/platform/5272/config.c index 634a6375e4a5..1365a8300d5d 100644 --- a/trunk/arch/m68knommu/platform/5272/config.c +++ b/trunk/arch/m68knommu/platform/5272/config.c @@ -10,17 +10,24 @@ /***************************************************************************/ #include +#include #include #include #include +#include #include +#include #include #include +#include #include #include /***************************************************************************/ +void coldfire_tick(void); +void coldfire_timer_init(irq_handler_t handler); +unsigned long coldfire_timer_offset(void); void coldfire_reset(void); extern unsigned int mcf_timervector; @@ -121,6 +128,9 @@ void config_BSP(char *commandp, int size) mcf_timervector = 69; mcf_profilevector = 70; + mach_sched_init = coldfire_timer_init; + mach_tick = coldfire_tick; + mach_gettimeoffset = coldfire_timer_offset; mach_reset = coldfire_reset; } diff --git a/trunk/arch/m68knommu/platform/527x/config.c b/trunk/arch/m68knommu/platform/527x/config.c index 9cbfbc68ae4f..1b820441419a 100644 --- a/trunk/arch/m68knommu/platform/527x/config.c +++ b/trunk/arch/m68knommu/platform/527x/config.c @@ -13,10 +13,12 @@ /***************************************************************************/ #include +#include #include #include #include #include +#include #include #include #include @@ -24,6 +26,9 @@ /***************************************************************************/ +void coldfire_pit_tick(void); +void coldfire_pit_init(irq_handler_t handler); +unsigned long coldfire_pit_offset(void); void coldfire_reset(void); /***************************************************************************/ @@ -57,6 +62,9 @@ void mcf_autovector(unsigned int vec) void config_BSP(char *commandp, int size) { mcf_disableall(); + mach_sched_init = coldfire_pit_init; + mach_tick = coldfire_pit_tick; + mach_gettimeoffset = coldfire_pit_offset; mach_reset = coldfire_reset; } diff --git a/trunk/arch/m68knommu/platform/528x/config.c b/trunk/arch/m68knommu/platform/528x/config.c index acbd43486d97..a089e9513699 100644 --- a/trunk/arch/m68knommu/platform/528x/config.c +++ b/trunk/arch/m68knommu/platform/528x/config.c @@ -13,10 +13,12 @@ /***************************************************************************/ #include +#include #include #include #include #include +#include #include #include #include @@ -24,6 +26,9 @@ /***************************************************************************/ +void coldfire_pit_tick(void); +void coldfire_pit_init(irq_handler_t handler); +unsigned long coldfire_pit_offset(void); void coldfire_reset(void); /***************************************************************************/ @@ -57,6 +62,9 @@ void mcf_autovector(unsigned int vec) void config_BSP(char *commandp, int size) { mcf_disableall(); + mach_sched_init = coldfire_pit_init; + mach_tick = coldfire_pit_tick; + mach_gettimeoffset = coldfire_pit_offset; mach_reset = coldfire_reset; } diff --git a/trunk/arch/m68knommu/platform/5307/config.c b/trunk/arch/m68knommu/platform/5307/config.c index 6040821e637d..e3461619fd65 100644 --- a/trunk/arch/m68knommu/platform/5307/config.c +++ b/trunk/arch/m68knommu/platform/5307/config.c @@ -10,18 +10,25 @@ /***************************************************************************/ #include +#include #include #include #include +#include #include +#include #include #include +#include #include #include #include /***************************************************************************/ +void coldfire_tick(void); +void coldfire_timer_init(irq_handler_t handler); +unsigned long coldfire_timer_offset(void); void coldfire_reset(void); extern unsigned int mcf_timervector; @@ -115,6 +122,9 @@ void config_BSP(char *commandp, int size) mcf_timerlevel = 6; #endif + mach_sched_init = coldfire_timer_init; + mach_tick = coldfire_tick; + mach_gettimeoffset = coldfire_timer_offset; mach_reset = coldfire_reset; #ifdef MCF_BDM_DISABLE diff --git a/trunk/arch/m68knommu/platform/5307/entry.S b/trunk/arch/m68knommu/platform/5307/entry.S index b333731b875a..a8cd867805ca 100644 --- a/trunk/arch/m68knommu/platform/5307/entry.S +++ b/trunk/arch/m68knommu/platform/5307/entry.S @@ -74,8 +74,7 @@ ENTRY(system_call) movel %sp,%d2 /* get thread_info pointer */ andl #-THREAD_SIZE,%d2 /* at start of kernel stack */ movel %d2,%a0 - movel %a0@,%a1 /* save top of frame */ - movel %sp,%a1@(TASK_THREAD+THREAD_ESP0) + movel %sp,%a0@(THREAD_ESP0) /* save top of frame */ btst #(TIF_SYSCALL_TRACE%8),%a0@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8) bnes 1f @@ -84,8 +83,6 @@ ENTRY(system_call) movel %d0,%sp@(PT_D0) /* save the return value */ jra ret_from_exception 1: - movel #-ENOSYS,%d2 /* strace needs -ENOSYS in PT_D0 */ - movel %d2,PT_D0(%sp) /* on syscall entry */ subql #4,%sp SAVE_SWITCH_STACK jbsr syscall_trace diff --git a/trunk/arch/m68knommu/platform/5307/pit.c b/trunk/arch/m68knommu/platform/5307/pit.c index 173b754d1cda..f18352fa35a6 100644 --- a/trunk/arch/m68knommu/platform/5307/pit.c +++ b/trunk/arch/m68knommu/platform/5307/pit.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -32,30 +31,28 @@ /***************************************************************************/ -static irqreturn_t hw_tick(int irq, void *dummy) +void coldfire_pit_tick(void) { unsigned short pcsr; /* Reset the ColdFire timer */ pcsr = __raw_readw(TA(MCFPIT_PCSR)); __raw_writew(pcsr | MCFPIT_PCSR_PIF, TA(MCFPIT_PCSR)); - - return arch_timer_interrupt(irq, dummy); } /***************************************************************************/ static struct irqaction coldfire_pit_irq = { - .name = "timer", - .flags = IRQF_DISABLED | IRQF_TIMER, - .handler = hw_tick, + .name = "timer", + .flags = IRQF_DISABLED | IRQF_TIMER, }; -void hw_timer_init(void) +void coldfire_pit_init(irq_handler_t handler) { volatile unsigned char *icrp; volatile unsigned long *imrp; + coldfire_pit_irq.handler = handler; setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &coldfire_pit_irq); icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 + @@ -74,7 +71,7 @@ void hw_timer_init(void) /***************************************************************************/ -unsigned long hw_timer_offset(void) +unsigned long coldfire_pit_offset(void) { volatile unsigned long *ipr; unsigned long pmr, pcntr, offset; diff --git a/trunk/arch/m68knommu/platform/5307/timers.c b/trunk/arch/m68knommu/platform/5307/timers.c index 489dec85c859..64bd0ff9029e 100644 --- a/trunk/arch/m68knommu/platform/5307/timers.c +++ b/trunk/arch/m68knommu/platform/5307/timers.c @@ -9,9 +9,10 @@ /***************************************************************************/ #include -#include #include +#include #include +#include #include #include #include @@ -53,28 +54,24 @@ extern int mcf_timerirqpending(int timer); /***************************************************************************/ -static irqreturn_t hw_tick(int irq, void *dummy) +void coldfire_tick(void) { /* Reset the ColdFire timer */ __raw_writeb(MCFTIMER_TER_CAP | MCFTIMER_TER_REF, TA(MCFTIMER_TER)); - - return arch_timer_interrupt(irq, dummy); } /***************************************************************************/ static struct irqaction coldfire_timer_irq = { - .name = "timer", - .flags = IRQF_DISABLED | IRQF_TIMER, - .handler = hw_tick, + .name = "timer", + .flags = IRQF_DISABLED | IRQF_TIMER, }; -/***************************************************************************/ - static int ticks_per_intr; -void hw_timer_init(void) +void coldfire_timer_init(irq_handler_t handler) { + coldfire_timer_irq.handler = handler; setup_irq(mcf_timervector, &coldfire_timer_irq); __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); @@ -92,7 +89,7 @@ void hw_timer_init(void) /***************************************************************************/ -unsigned long hw_timer_offset(void) +unsigned long coldfire_timer_offset(void) { unsigned long tcn, offset; diff --git a/trunk/arch/m68knommu/platform/532x/config.c b/trunk/arch/m68knommu/platform/532x/config.c index f77328b7b6db..b32c6425f821 100644 --- a/trunk/arch/m68knommu/platform/532x/config.c +++ b/trunk/arch/m68knommu/platform/532x/config.c @@ -18,18 +18,25 @@ /***************************************************************************/ #include +#include #include #include #include +#include #include +#include #include #include +#include #include #include #include /***************************************************************************/ +void coldfire_tick(void); +void coldfire_timer_init(irq_handler_t handler); +unsigned long coldfire_timer_offset(void); void coldfire_reset(void); extern unsigned int mcf_timervector; @@ -97,6 +104,9 @@ void config_BSP(char *commandp, int size) mcf_timervector = 64+32; mcf_profilevector = 64+33; + mach_sched_init = coldfire_timer_init; + mach_tick = coldfire_tick; + mach_gettimeoffset = coldfire_timer_offset; mach_reset = coldfire_reset; #ifdef MCF_BDM_DISABLE diff --git a/trunk/arch/m68knommu/platform/5407/config.c b/trunk/arch/m68knommu/platform/5407/config.c index 2d3b62eba7ca..e692536817d8 100644 --- a/trunk/arch/m68knommu/platform/5407/config.c +++ b/trunk/arch/m68knommu/platform/5407/config.c @@ -10,17 +10,24 @@ /***************************************************************************/ #include +#include #include #include #include +#include #include +#include #include #include +#include #include #include /***************************************************************************/ +void coldfire_tick(void); +void coldfire_timer_init(irq_handler_t handler); +unsigned long coldfire_timer_offset(void); void coldfire_reset(void); extern unsigned int mcf_timervector; @@ -101,6 +108,9 @@ void config_BSP(char *commandp, int size) mcf_timerlevel = 6; #endif + mach_sched_init = coldfire_timer_init; + mach_tick = coldfire_tick; + mach_gettimeoffset = coldfire_timer_offset; mach_reset = coldfire_reset; } diff --git a/trunk/drivers/char/cyclades.c b/trunk/drivers/char/cyclades.c index e4f579c3e245..d1bd0f08a331 100644 --- a/trunk/drivers/char/cyclades.c +++ b/trunk/drivers/char/cyclades.c @@ -1602,8 +1602,8 @@ static void cyz_handle_tx(struct cyclades_port *info, info->icount.tx++; } #endif - tty_wakeup(tty); ztxdone: + tty_wakeup(tty); /* Update tx_put */ cy_writel(&buf_ctrl->tx_put, tx_put); } diff --git a/trunk/drivers/md/bitmap.c b/trunk/drivers/md/bitmap.c index 7c426d07a555..927cb34c4805 100644 --- a/trunk/drivers/md/bitmap.c +++ b/trunk/drivers/md/bitmap.c @@ -274,7 +274,7 @@ static int write_sb_page(struct bitmap *bitmap, struct page *page, int wait) if (bitmap->offset < 0) { /* DATA BITMAP METADATA */ if (bitmap->offset - + (long)(page->index * (PAGE_SIZE/512)) + + page->index * (PAGE_SIZE/512) + size/512 > 0) /* bitmap runs in to metadata */ return -EINVAL; diff --git a/trunk/drivers/md/raid5.c b/trunk/drivers/md/raid5.c index 80a67d789b72..8ee181a01f52 100644 --- a/trunk/drivers/md/raid5.c +++ b/trunk/drivers/md/raid5.c @@ -376,12 +376,7 @@ static unsigned long get_stripe_work(struct stripe_head *sh) ack++; sh->ops.count -= ack; - if (unlikely(sh->ops.count < 0)) { - printk(KERN_ERR "pending: %#lx ops.pending: %#lx ops.ack: %#lx " - "ops.complete: %#lx\n", pending, sh->ops.pending, - sh->ops.ack, sh->ops.complete); - BUG(); - } + BUG_ON(sh->ops.count < 0); return pending; } @@ -555,7 +550,8 @@ static void ops_complete_biofill(void *stripe_head_ref) } } } - set_bit(STRIPE_OP_BIOFILL, &sh->ops.complete); + clear_bit(STRIPE_OP_BIOFILL, &sh->ops.ack); + clear_bit(STRIPE_OP_BIOFILL, &sh->ops.pending); return_io(return_bi); @@ -2897,13 +2893,6 @@ static void handle_stripe6(struct stripe_head *sh, struct page *tmp_page) s.expanded = test_bit(STRIPE_EXPAND_READY, &sh->state); /* Now to look around and see what can be done */ - /* clean-up completed biofill operations */ - if (test_bit(STRIPE_OP_BIOFILL, &sh->ops.complete)) { - clear_bit(STRIPE_OP_BIOFILL, &sh->ops.pending); - clear_bit(STRIPE_OP_BIOFILL, &sh->ops.ack); - clear_bit(STRIPE_OP_BIOFILL, &sh->ops.complete); - } - rcu_read_lock(); for (i=disks; i--; ) { mdk_rdev_t *rdev; diff --git a/trunk/drivers/net/fec.c b/trunk/drivers/net/fec.c index 0fbf1bbbaee9..2b5782056dda 100644 --- a/trunk/drivers/net/fec.c +++ b/trunk/drivers/net/fec.c @@ -751,11 +751,13 @@ mii_queue(struct net_device *dev, int regval, void (*func)(uint, struct net_devi if (mii_head) { mii_tail->mii_next = mip; mii_tail = mip; - } else { + } + else { mii_head = mii_tail = mip; fep->hwp->fec_mii_data = regval; } - } else { + } + else { retval = 1; } @@ -766,11 +768,14 @@ mii_queue(struct net_device *dev, int regval, void (*func)(uint, struct net_devi static void mii_do_cmd(struct net_device *dev, const phy_cmd_t *c) { + int k; + if(!c) return; - for (; c->mii_data != mk_mii_end; c++) - mii_queue(dev, c->mii_data, c->funct); + for(k = 0; (c+k)->mii_data != mk_mii_end; k++) { + mii_queue(dev, (c+k)->mii_data, (c+k)->funct); + } } static void mii_parse_sr(uint mii_reg, struct net_device *dev) @@ -787,6 +792,7 @@ static void mii_parse_sr(uint mii_reg, struct net_device *dev) status |= PHY_STAT_FAULT; if (mii_reg & 0x0020) status |= PHY_STAT_ANC; + *s = status; } @@ -1233,6 +1239,7 @@ mii_link_interrupt(int irq, void * dev_id); #endif #if defined(CONFIG_M5272) + /* * Code specific to Coldfire 5272 setup. */ @@ -2013,7 +2020,8 @@ static void mii_relink(struct work_struct *work) & (PHY_STAT_100FDX | PHY_STAT_10FDX)) duplex = 1; fec_restart(dev, duplex); - } else + } + else fec_stop(dev); #if 0 @@ -2111,7 +2119,8 @@ mii_discover_phy(uint mii_reg, struct net_device *dev) fep->phy_id = phytype << 16; mii_queue(dev, mk_mii_read(MII_REG_PHYIR2), mii_discover_phy3); - } else { + } + else { fep->phy_addr++; mii_queue(dev, mk_mii_read(MII_REG_PHYIR1), mii_discover_phy); @@ -2565,7 +2574,8 @@ fec_restart(struct net_device *dev, int duplex) if (duplex) { fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x04;/* MII enable */ fecp->fec_x_cntrl = 0x04; /* FD enable */ - } else { + } + else { /* MII enable|No Rcv on Xmit */ fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x06; fecp->fec_x_cntrl = 0x00; diff --git a/trunk/drivers/serial/mcf.c b/trunk/drivers/serial/mcf.c deleted file mode 100644 index a7d4360ea7df..000000000000 --- a/trunk/drivers/serial/mcf.c +++ /dev/null @@ -1,653 +0,0 @@ -/****************************************************************************/ - -/* - * mcf.c -- Freescale ColdFire UART driver - * - * (C) Copyright 2003-2007, Greg Ungerer - * - * 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 - -/****************************************************************************/ - -/* - * Some boards implement the DTR/DCD lines using GPIO lines, most - * don't. Dummy out the access macros for those that don't. Those - * that do should define these macros somewhere in there board - * specific inlude files. - */ -#if !defined(mcf_getppdcd) -#define mcf_getppdcd(p) (1) -#endif -#if !defined(mcf_getppdtr) -#define mcf_getppdtr(p) (1) -#endif -#if !defined(mcf_setppdtr) -#define mcf_setppdtr(p, v) do { } while (0) -#endif - -/****************************************************************************/ - -/* - * Local per-uart structure. - */ -struct mcf_uart { - struct uart_port port; - unsigned int sigs; /* Local copy of line sigs */ - unsigned char imr; /* Local IMR mirror */ -}; - -/****************************************************************************/ - -static unsigned int mcf_tx_empty(struct uart_port *port) -{ - return (readb(port->membase + MCFUART_USR) & MCFUART_USR_TXEMPTY) ? - TIOCSER_TEMT : 0; -} - -/****************************************************************************/ - -static unsigned int mcf_get_mctrl(struct uart_port *port) -{ - struct mcf_uart *pp = (struct mcf_uart *) port; - unsigned long flags; - unsigned int sigs; - - spin_lock_irqsave(&port->lock, flags); - sigs = (readb(port->membase + MCFUART_UIPR) & MCFUART_UIPR_CTS) ? - 0 : TIOCM_CTS; - sigs |= (pp->sigs & TIOCM_RTS); - sigs |= (mcf_getppdcd(port->line) ? TIOCM_CD : 0); - sigs |= (mcf_getppdtr(port->line) ? TIOCM_DTR : 0); - spin_unlock_irqrestore(&port->lock, flags); - return sigs; -} - -/****************************************************************************/ - -static void mcf_set_mctrl(struct uart_port *port, unsigned int sigs) -{ - struct mcf_uart *pp = (struct mcf_uart *) port; - unsigned long flags; - - spin_lock_irqsave(&port->lock, flags); - pp->sigs = sigs; - mcf_setppdtr(port->line, (sigs & TIOCM_DTR)); - if (sigs & TIOCM_RTS) - writeb(MCFUART_UOP_RTS, port->membase + MCFUART_UOP1); - else - writeb(MCFUART_UOP_RTS, port->membase + MCFUART_UOP0); - spin_unlock_irqrestore(&port->lock, flags); -} - -/****************************************************************************/ - -static void mcf_start_tx(struct uart_port *port) -{ - struct mcf_uart *pp = (struct mcf_uart *) port; - unsigned long flags; - - spin_lock_irqsave(&port->lock, flags); - pp->imr |= MCFUART_UIR_TXREADY; - writeb(pp->imr, port->membase + MCFUART_UIMR); - spin_unlock_irqrestore(&port->lock, flags); -} - -/****************************************************************************/ - -static void mcf_stop_tx(struct uart_port *port) -{ - struct mcf_uart *pp = (struct mcf_uart *) port; - unsigned long flags; - - spin_lock_irqsave(&port->lock, flags); - pp->imr &= ~MCFUART_UIR_TXREADY; - writeb(pp->imr, port->membase + MCFUART_UIMR); - spin_unlock_irqrestore(&port->lock, flags); -} - -/****************************************************************************/ - -static void mcf_stop_rx(struct uart_port *port) -{ - struct mcf_uart *pp = (struct mcf_uart *) port; - unsigned long flags; - - spin_lock_irqsave(&port->lock, flags); - pp->imr &= ~MCFUART_UIR_RXREADY; - writeb(pp->imr, port->membase + MCFUART_UIMR); - spin_unlock_irqrestore(&port->lock, flags); -} - -/****************************************************************************/ - -static void mcf_break_ctl(struct uart_port *port, int break_state) -{ - unsigned long flags; - - spin_lock_irqsave(&port->lock, flags); - if (break_state == -1) - writeb(MCFUART_UCR_CMDBREAKSTART, port->membase + MCFUART_UCR); - else - writeb(MCFUART_UCR_CMDBREAKSTOP, port->membase + MCFUART_UCR); - spin_unlock_irqrestore(&port->lock, flags); -} - -/****************************************************************************/ - -static void mcf_enable_ms(struct uart_port *port) -{ -} - -/****************************************************************************/ - -static int mcf_startup(struct uart_port *port) -{ - struct mcf_uart *pp = (struct mcf_uart *) port; - unsigned long flags; - - spin_lock_irqsave(&port->lock, flags); - - /* Reset UART, get it into known state... */ - writeb(MCFUART_UCR_CMDRESETRX, port->membase + MCFUART_UCR); - writeb(MCFUART_UCR_CMDRESETTX, port->membase + MCFUART_UCR); - - /* Enable the UART transmitter and receiver */ - writeb(MCFUART_UCR_RXENABLE | MCFUART_UCR_TXENABLE, - port->membase + MCFUART_UCR); - - /* Enable RX interrupts now */ - pp->imr = MCFUART_UIR_RXREADY; - writeb(pp->imr, port->membase + MCFUART_UIMR); - - spin_unlock_irqrestore(&port->lock, flags); - - return 0; -} - -/****************************************************************************/ - -static void mcf_shutdown(struct uart_port *port) -{ - struct mcf_uart *pp = (struct mcf_uart *) port; - unsigned long flags; - - spin_lock_irqsave(&port->lock, flags); - - /* Disable all interrupts now */ - pp->imr = 0; - writeb(pp->imr, port->membase + MCFUART_UIMR); - - /* Disable UART transmitter and receiver */ - writeb(MCFUART_UCR_CMDRESETRX, port->membase + MCFUART_UCR); - writeb(MCFUART_UCR_CMDRESETTX, port->membase + MCFUART_UCR); - - spin_unlock_irqrestore(&port->lock, flags); -} - -/****************************************************************************/ - -static void mcf_set_termios(struct uart_port *port, struct ktermios *termios, - struct ktermios *old) -{ - unsigned long flags; - unsigned int baud, baudclk; - unsigned char mr1, mr2; - - baud = uart_get_baud_rate(port, termios, old, 0, 230400); - baudclk = ((MCF_BUSCLK / baud) + 16) / 32; - - mr1 = MCFUART_MR1_RXIRQRDY | MCFUART_MR1_RXERRCHAR; - mr2 = 0; - - switch (termios->c_cflag & CSIZE) { - case CS5: mr1 |= MCFUART_MR1_CS5; break; - case CS6: mr1 |= MCFUART_MR1_CS6; break; - case CS7: mr1 |= MCFUART_MR1_CS7; break; - case CS8: - default: mr1 |= MCFUART_MR1_CS8; break; - } - - if (termios->c_cflag & PARENB) { - if (termios->c_cflag & CMSPAR) { - if (termios->c_cflag & PARODD) - mr1 |= MCFUART_MR1_PARITYMARK; - else - mr1 |= MCFUART_MR1_PARITYSPACE; - } else { - if (termios->c_cflag & PARODD) - mr1 |= MCFUART_MR1_PARITYODD; - else - mr1 |= MCFUART_MR1_PARITYEVEN; - } - } else { - mr1 |= MCFUART_MR1_PARITYNONE; - } - - if (termios->c_cflag & CSTOPB) - mr2 |= MCFUART_MR2_STOP2; - else - mr2 |= MCFUART_MR2_STOP1; - - if (termios->c_cflag & CRTSCTS) { - mr1 |= MCFUART_MR1_RXRTS; - mr2 |= MCFUART_MR2_TXCTS; - } - - spin_lock_irqsave(&port->lock, flags); - writeb(MCFUART_UCR_CMDRESETRX, port->membase + MCFUART_UCR); - writeb(MCFUART_UCR_CMDRESETTX, port->membase + MCFUART_UCR); - writeb(MCFUART_UCR_CMDRESETMRPTR, port->membase + MCFUART_UCR); - writeb(mr1, port->membase + MCFUART_UMR); - writeb(mr2, port->membase + MCFUART_UMR); - writeb((baudclk & 0xff00) >> 8, port->membase + MCFUART_UBG1); - writeb((baudclk & 0xff), port->membase + MCFUART_UBG2); - writeb(MCFUART_UCSR_RXCLKTIMER | MCFUART_UCSR_TXCLKTIMER, - port->membase + MCFUART_UCSR); - writeb(MCFUART_UCR_RXENABLE | MCFUART_UCR_TXENABLE, - port->membase + MCFUART_UCR); - spin_unlock_irqrestore(&port->lock, flags); -} - -/****************************************************************************/ - -static void mcf_rx_chars(struct mcf_uart *pp) -{ - struct uart_port *port = (struct uart_port *) pp; - unsigned char status, ch, flag; - - while ((status = readb(port->membase + MCFUART_USR)) & MCFUART_USR_RXREADY) { - ch = readb(port->membase + MCFUART_URB); - flag = TTY_NORMAL; - port->icount.rx++; - - if (status & MCFUART_USR_RXERR) { - writeb(MCFUART_UCR_CMDRESETERR, - port->membase + MCFUART_UCR); - - if (status & MCFUART_USR_RXBREAK) { - port->icount.brk++; - if (uart_handle_break(port)) - continue; - } else if (status & MCFUART_USR_RXPARITY) { - port->icount.parity++; - } else if (status & MCFUART_USR_RXOVERRUN) { - port->icount.overrun++; - } else if (status & MCFUART_USR_RXFRAMING) { - port->icount.frame++; - } - - status &= port->read_status_mask; - - if (status & MCFUART_USR_RXBREAK) - flag = TTY_BREAK; - else if (status & MCFUART_USR_RXPARITY) - flag = TTY_PARITY; - else if (status & MCFUART_USR_RXFRAMING) - flag = TTY_FRAME; - } - - if (uart_handle_sysrq_char(port, ch)) - continue; - uart_insert_char(port, status, MCFUART_USR_RXOVERRUN, ch, flag); - } - - tty_flip_buffer_push(port->info->tty); -} - -/****************************************************************************/ - -static void mcf_tx_chars(struct mcf_uart *pp) -{ - struct uart_port *port = (struct uart_port *) pp; - struct circ_buf *xmit = &port->info->xmit; - - if (port->x_char) { - /* Send special char - probably flow control */ - writeb(port->x_char, port->membase + MCFUART_UTB); - port->x_char = 0; - port->icount.tx++; - return; - } - - while (readb(port->membase + MCFUART_USR) & MCFUART_USR_TXREADY) { - if (xmit->head == xmit->tail) - break; - writeb(xmit->buf[xmit->tail], port->membase + MCFUART_UTB); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE -1); - port->icount.tx++; - } - - if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) - uart_write_wakeup(port); - - if (xmit->head == xmit->tail) { - pp->imr &= ~MCFUART_UIR_TXREADY; - writeb(pp->imr, port->membase + MCFUART_UIMR); - } -} - -/****************************************************************************/ - -static irqreturn_t mcf_interrupt(int irq, void *data) -{ - struct uart_port *port = data; - struct mcf_uart *pp = (struct mcf_uart *) port; - unsigned int isr; - - isr = readb(port->membase + MCFUART_UISR) & pp->imr; - if (isr & MCFUART_UIR_RXREADY) - mcf_rx_chars(pp); - if (isr & MCFUART_UIR_TXREADY) - mcf_tx_chars(pp); - return IRQ_HANDLED; -} - -/****************************************************************************/ - -static void mcf_config_port(struct uart_port *port, int flags) -{ - port->type = PORT_MCF; - - /* Clear mask, so no surprise interrupts. */ - writeb(0, port->membase + MCFUART_UIMR); - - if (request_irq(port->irq, mcf_interrupt, IRQF_DISABLED, "UART", port)) - printk(KERN_ERR "MCF: unable to attach ColdFire UART %d " - "interrupt vector=%d\n", port->line, port->irq); -} - -/****************************************************************************/ - -static const char *mcf_type(struct uart_port *port) -{ - return (port->type == PORT_MCF) ? "ColdFire UART" : NULL; -} - -/****************************************************************************/ - -static int mcf_request_port(struct uart_port *port) -{ - /* UARTs always present */ - return 0; -} - -/****************************************************************************/ - -static void mcf_release_port(struct uart_port *port) -{ - /* Nothing to release... */ -} - -/****************************************************************************/ - -static int mcf_verify_port(struct uart_port *port, struct serial_struct *ser) -{ - if ((ser->type != PORT_UNKNOWN) && (ser->type != PORT_MCF)) - return -EINVAL; - return 0; -} - -/****************************************************************************/ - -/* - * Define the basic serial functions we support. - */ -static struct uart_ops mcf_uart_ops = { - .tx_empty = mcf_tx_empty, - .get_mctrl = mcf_get_mctrl, - .set_mctrl = mcf_set_mctrl, - .start_tx = mcf_start_tx, - .stop_tx = mcf_stop_tx, - .stop_rx = mcf_stop_rx, - .enable_ms = mcf_enable_ms, - .break_ctl = mcf_break_ctl, - .startup = mcf_startup, - .shutdown = mcf_shutdown, - .set_termios = mcf_set_termios, - .type = mcf_type, - .request_port = mcf_request_port, - .release_port = mcf_release_port, - .config_port = mcf_config_port, - .verify_port = mcf_verify_port, -}; - -static struct mcf_uart mcf_ports[3]; - -#define MCF_MAXPORTS (sizeof(mcf_ports) / sizeof(struct mcf_uart)) - -/****************************************************************************/ -#if defined(CONFIG_SERIAL_MCF_CONSOLE) -/****************************************************************************/ - -int __init early_mcf_setup(struct mcf_platform_uart *platp) -{ - struct uart_port *port; - int i; - - for (i = 0; ((i < MCF_MAXPORTS) && (platp[i].mapbase)); i++) { - port = &mcf_ports[i].port; - - port->line = i; - port->type = PORT_MCF; - port->mapbase = platp[i].mapbase; - port->membase = (platp[i].membase) ? platp[i].membase : - (unsigned char __iomem *) port->mapbase; - port->iotype = SERIAL_IO_MEM; - port->irq = platp[i].irq; - port->uartclk = MCF_BUSCLK; - port->flags = ASYNC_BOOT_AUTOCONF; - port->ops = &mcf_uart_ops; - } - - return 0; -} - -/****************************************************************************/ - -static void mcf_console_putc(struct console *co, const char c) -{ - struct uart_port *port = &(mcf_ports + co->index)->port; - int i; - - for (i = 0; (i < 0x10000); i++) { - if (readb(port->membase + MCFUART_USR) & MCFUART_USR_TXREADY) - break; - } - writeb(c, port->membase + MCFUART_UTB); - for (i = 0; (i < 0x10000); i++) { - if (readb(port->membase + MCFUART_USR) & MCFUART_USR_TXREADY) - break; - } -} - -/****************************************************************************/ - -static void mcf_console_write(struct console *co, const char *s, unsigned int count) -{ - for (; (count); count--, s++) { - mcf_console_putc(co, *s); - if (*s == '\n') - mcf_console_putc(co, '\r'); - } -} - -/****************************************************************************/ - -static int __init mcf_console_setup(struct console *co, char *options) -{ - struct uart_port *port; - int baud = CONFIG_SERIAL_MCF_BAUDRATE; - int bits = 8; - int parity = 'n'; - int flow = 'n'; - - if ((co->index >= 0) && (co->index <= MCF_MAXPORTS)) - co->index = 0; - port = &mcf_ports[co->index].port; - if (port->membase == 0) - return -ENODEV; - - if (options) - uart_parse_options(options, &baud, &parity, &bits, &flow); - - return uart_set_options(port, co, baud, parity, bits, flow); -} - -/****************************************************************************/ - -static struct uart_driver mcf_driver; - -static struct console mcf_console = { - .name = "ttyS", - .write = mcf_console_write, - .device = uart_console_device, - .setup = mcf_console_setup, - .flags = CON_PRINTBUFFER, - .index = -1, - .data = &mcf_driver, -}; - -static int __init mcf_console_init(void) -{ - register_console(&mcf_console); - return 0; -} - -console_initcall(mcf_console_init); - -#define MCF_CONSOLE &mcf_console - -/****************************************************************************/ -#else -/****************************************************************************/ - -#define MCF_CONSOLE NULL - -/****************************************************************************/ -#endif /* CONFIG_MCF_CONSOLE */ -/****************************************************************************/ - -/* - * Define the mcf UART driver structure. - */ -static struct uart_driver mcf_driver = { - .owner = THIS_MODULE, - .driver_name = "mcf", - .dev_name = "ttyS", - .major = TTY_MAJOR, - .minor = 64, - .nr = MCF_MAXPORTS, - .cons = MCF_CONSOLE, -}; - -/****************************************************************************/ - -static int __devinit mcf_probe(struct platform_device *pdev) -{ - struct mcf_platform_uart *platp = pdev->dev.platform_data; - struct uart_port *port; - int i; - - for (i = 0; ((i < MCF_MAXPORTS) && (platp[i].mapbase)); i++) { - port = &mcf_ports[i].port; - - port->line = i; - port->type = PORT_MCF; - port->mapbase = platp[i].mapbase; - port->membase = (platp[i].membase) ? platp[i].membase : - (unsigned char __iomem *) platp[i].mapbase; - port->iotype = SERIAL_IO_MEM; - port->irq = platp[i].irq; - port->uartclk = MCF_BUSCLK; - port->ops = &mcf_uart_ops; - port->flags = ASYNC_BOOT_AUTOCONF; - - uart_add_one_port(&mcf_driver, port); - } - - return 0; -} - -/****************************************************************************/ - -static int mcf_remove(struct platform_device *pdev) -{ - struct uart_port *port; - int i; - - for (i = 0; (i < MCF_MAXPORTS); i++) { - port = &mcf_ports[i].port; - if (port) - uart_remove_one_port(&mcf_driver, port); - } - - return 0; -} - -/****************************************************************************/ - -static struct platform_driver mcf_platform_driver = { - .probe = mcf_probe, - .remove = __devexit_p(mcf_remove), - .driver = { - .name = "mcfuart", - .owner = THIS_MODULE, - }, -}; - -/****************************************************************************/ - -static int __init mcf_init(void) -{ - int rc; - - printk("ColdFire internal UART serial driver\n"); - - rc = uart_register_driver(&mcf_driver); - if (rc) - return rc; - rc = platform_driver_register(&mcf_platform_driver); - if (rc) - return rc; - return 0; -} - -/****************************************************************************/ - -static void __exit mcf_exit(void) -{ - platform_driver_unregister(&mcf_platform_driver); - uart_unregister_driver(&mcf_driver); -} - -/****************************************************************************/ - -module_init(mcf_init); -module_exit(mcf_exit); - -MODULE_AUTHOR("Greg Ungerer "); -MODULE_DESCRIPTION("Freescale ColdFire UART driver"); -MODULE_LICENSE("GPL"); - -/****************************************************************************/ diff --git a/trunk/include/asm-m68knommu/module.h b/trunk/include/asm-m68knommu/module.h index 2e45ab50b232..57e95cc01ad5 100644 --- a/trunk/include/asm-m68knommu/module.h +++ b/trunk/include/asm-m68knommu/module.h @@ -1,11 +1 @@ -#ifndef ASM_M68KNOMMU_MODULE_H -#define ASM_M68KNOMMU_MODULE_H - -struct mod_arch_specific { -}; - -#define Elf_Shdr Elf32_Shdr -#define Elf_Sym Elf32_Sym -#define Elf_Ehdr Elf32_Ehdr - -#endif /* ASM_M68KNOMMU_MODULE_H */ +#include diff --git a/trunk/include/asm-m68knommu/uaccess.h b/trunk/include/asm-m68knommu/uaccess.h index 68bbe9b312f1..9ed9169a8849 100644 --- a/trunk/include/asm-m68knommu/uaccess.h +++ b/trunk/include/asm-m68knommu/uaccess.h @@ -170,12 +170,10 @@ static inline long strnlen_user(const char *src, long n) */ static inline unsigned long -__clear_user(void *to, unsigned long n) +clear_user(void *to, unsigned long n) { memset(to, 0, n); return 0; } -#define clear_user(to,n) __clear_user(to,n) - #endif /* _M68KNOMMU_UACCESS_H */ diff --git a/trunk/include/sound/version.h b/trunk/include/sound/version.h index a2be8ad8894b..8d4a8dd89237 100644 --- a/trunk/include/sound/version.h +++ b/trunk/include/sound/version.h @@ -1,3 +1,3 @@ /* include/version.h. Generated by alsa/ksync script. */ #define CONFIG_SND_VERSION "1.0.15" -#define CONFIG_SND_DATE " (Tue Oct 23 06:09:18 2007 UTC)" +#define CONFIG_SND_DATE " (Tue Oct 16 14:57:44 2007 UTC)" diff --git a/trunk/mm/mmap.c b/trunk/mm/mmap.c index facc1a75bd4f..7a30c4988231 100644 --- a/trunk/mm/mmap.c +++ b/trunk/mm/mmap.c @@ -1171,7 +1171,8 @@ unsigned long mmap_region(struct file *file, unsigned long addr, vm_flags = vma->vm_flags; if (vma_wants_writenotify(vma)) - vma->vm_page_prot = vm_get_page_prot(vm_flags & ~VM_SHARED); + vma->vm_page_prot = + protection_map[vm_flags & (VM_READ|VM_WRITE|VM_EXEC)]; if (!file || !vma_merge(mm, prev, addr, vma->vm_end, vma->vm_flags, NULL, file, pgoff, vma_policy(vma))) { diff --git a/trunk/mm/mprotect.c b/trunk/mm/mprotect.c index 4de546899dc1..55227845abbe 100644 --- a/trunk/mm/mprotect.c +++ b/trunk/mm/mprotect.c @@ -194,7 +194,7 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev, vma->vm_flags = newflags; vma->vm_page_prot = vm_get_page_prot(newflags); if (vma_wants_writenotify(vma)) { - vma->vm_page_prot = vm_get_page_prot(newflags & ~VM_SHARED); + vma->vm_page_prot = vm_get_page_prot(newflags); dirty_accountable = 1; } diff --git a/trunk/sound/core/control.c b/trunk/sound/core/control.c index df0774c76f6f..4c3aa8e10378 100644 --- a/trunk/sound/core/control.c +++ b/trunk/sound/core/control.c @@ -93,16 +93,15 @@ static int snd_ctl_open(struct inode *inode, struct file *file) static void snd_ctl_empty_read_queue(struct snd_ctl_file * ctl) { - unsigned long flags; struct snd_kctl_event *cread; - spin_lock_irqsave(&ctl->read_lock, flags); + spin_lock(&ctl->read_lock); while (!list_empty(&ctl->events)) { cread = snd_kctl_event(ctl->events.next); list_del(&cread->list); kfree(cread); } - spin_unlock_irqrestore(&ctl->read_lock, flags); + spin_unlock(&ctl->read_lock); } static int snd_ctl_release(struct inode *inode, struct file *file) diff --git a/trunk/sound/pci/bt87x.c b/trunk/sound/pci/bt87x.c index 2dba752faf4e..91f9e6a112ff 100644 --- a/trunk/sound/pci/bt87x.c +++ b/trunk/sound/pci/bt87x.c @@ -165,7 +165,7 @@ struct snd_bt87x_board { unsigned no_digital:1; /* No digital input */ }; -static __devinitdata struct snd_bt87x_board snd_bt87x_boards[] = { +static const __devinitdata struct snd_bt87x_board snd_bt87x_boards[] = { [SND_BT87X_BOARD_UNKNOWN] = { .dig_rate = 32000, /* just a guess */ }, @@ -848,7 +848,7 @@ static int __devinit snd_bt87x_detect_card(struct pci_dev *pci) int i; const struct pci_device_id *supported; - supported = pci_match_id(snd_bt87x_ids, pci); + supported = pci_match_device(&driver, pci); if (supported && supported->driver_data > 0) return supported->driver_data; diff --git a/trunk/sound/pci/hda/hda_codec.c b/trunk/sound/pci/hda/hda_codec.c index ad4cb38109fc..187533e477c6 100644 --- a/trunk/sound/pci/hda/hda_codec.c +++ b/trunk/sound/pci/hda/hda_codec.c @@ -626,19 +626,24 @@ int __devinit snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr, snd_hda_get_codec_name(codec, bus->card->mixername, sizeof(bus->card->mixername)); +#ifdef CONFIG_SND_HDA_GENERIC if (is_generic_config(codec)) { err = snd_hda_parse_generic_codec(codec); goto patched; } +#endif if (codec->preset && codec->preset->patch) { err = codec->preset->patch(codec); goto patched; } /* call the default parser */ +#ifdef CONFIG_SND_HDA_GENERIC err = snd_hda_parse_generic_codec(codec); - if (err < 0) - printk(KERN_ERR "hda-codec: No codec parser is available\n"); +#else + printk(KERN_ERR "hda-codec: No codec parser is available\n"); + err = -ENODEV; +#endif patched: if (err < 0) { diff --git a/trunk/sound/pci/hda/hda_local.h b/trunk/sound/pci/hda/hda_local.h index 20c5e6250374..a79d0ed5469c 100644 --- a/trunk/sound/pci/hda/hda_local.h +++ b/trunk/sound/pci/hda/hda_local.h @@ -245,14 +245,7 @@ int snd_hda_multi_out_analog_cleanup(struct hda_codec *codec, /* * generic codec parser */ -#ifdef CONFIG_SND_HDA_GENERIC int snd_hda_parse_generic_codec(struct hda_codec *codec); -#else -static inline int snd_hda_parse_generic_codec(struct hda_codec *codec) -{ - return -ENODEV; -} -#endif /* * generic proc interface @@ -310,17 +303,16 @@ enum { extern const char *auto_pin_cfg_labels[AUTO_PIN_LAST]; -#define AUTO_CFG_MAX_OUTS 5 - struct auto_pin_cfg { int line_outs; - /* sorted in the order of Front/Surr/CLFE/Side */ - hda_nid_t line_out_pins[AUTO_CFG_MAX_OUTS]; + hda_nid_t line_out_pins[5]; /* sorted in the order of + * Front/Surr/CLFE/Side + */ int speaker_outs; - hda_nid_t speaker_pins[AUTO_CFG_MAX_OUTS]; + hda_nid_t speaker_pins[5]; int hp_outs; int line_out_type; /* AUTO_PIN_XXX_OUT */ - hda_nid_t hp_pins[AUTO_CFG_MAX_OUTS]; + hda_nid_t hp_pins[5]; hda_nid_t input_pins[AUTO_PIN_LAST]; hda_nid_t dig_out_pin; hda_nid_t dig_in_pin; diff --git a/trunk/sound/pci/hda/patch_analog.c b/trunk/sound/pci/hda/patch_analog.c index 0ee8ae4d4410..54cfd4526d20 100644 --- a/trunk/sound/pci/hda/patch_analog.c +++ b/trunk/sound/pci/hda/patch_analog.c @@ -72,7 +72,7 @@ struct ad198x_spec { unsigned int num_kctl_alloc, num_kctl_used; struct snd_kcontrol_new *kctl_alloc; struct hda_input_mux private_imux; - hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS]; + hda_nid_t private_dac_nids[4]; unsigned int jack_present :1; @@ -612,8 +612,7 @@ static void ad1986a_hp_automute(struct hda_codec *codec) unsigned int present; present = snd_hda_codec_read(codec, 0x1a, 0, AC_VERB_GET_PIN_SENSE, 0); - /* Lenovo N100 seems to report the reversed bit for HP jack-sensing */ - spec->jack_present = !(present & 0x80000000); + spec->jack_present = (present & 0x80000000) != 0; ad1986a_update_hp(codec); } diff --git a/trunk/sound/pci/hda/patch_cmedia.c b/trunk/sound/pci/hda/patch_cmedia.c index 6c54793bf424..2468f3171222 100644 --- a/trunk/sound/pci/hda/patch_cmedia.c +++ b/trunk/sound/pci/hda/patch_cmedia.c @@ -50,7 +50,7 @@ struct cmi_spec { /* playback */ struct hda_multi_out multiout; - hda_nid_t dac_nids[AUTO_CFG_MAX_OUTS]; /* NID for each DAC */ + hda_nid_t dac_nids[4]; /* NID for each DAC */ int num_dacs; /* capture */ @@ -73,6 +73,7 @@ struct cmi_spec { unsigned int pin_def_confs; /* multichannel pins */ + hda_nid_t multich_pin[4]; /* max 8-channel */ struct hda_verb multi_init[9]; /* 2 verbs for each pin + terminator */ }; diff --git a/trunk/sound/pci/hda/patch_conexant.c b/trunk/sound/pci/hda/patch_conexant.c index 6aa073986747..080e3001d9c5 100644 --- a/trunk/sound/pci/hda/patch_conexant.c +++ b/trunk/sound/pci/hda/patch_conexant.c @@ -85,7 +85,7 @@ struct conexant_spec { unsigned int num_kctl_alloc, num_kctl_used; struct snd_kcontrol_new *kctl_alloc; struct hda_input_mux private_imux; - hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS]; + hda_nid_t private_dac_nids[4]; }; @@ -554,16 +554,10 @@ static struct snd_kcontrol_new cxt5045_mixers[] = { .get = conexant_mux_enum_get, .put = conexant_mux_enum_put }, - HDA_CODEC_VOLUME("Int Mic Capture Volume", 0x1a, 0x01, HDA_INPUT), - HDA_CODEC_MUTE("Int Mic Capture Switch", 0x1a, 0x01, HDA_INPUT), - HDA_CODEC_VOLUME("Ext Mic Capture Volume", 0x1a, 0x02, HDA_INPUT), - HDA_CODEC_MUTE("Ext Mic Capture Switch", 0x1a, 0x02, HDA_INPUT), - HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT), - HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT), - HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x17, 0x1, HDA_INPUT), - HDA_CODEC_MUTE("Int Mic Playback Switch", 0x17, 0x1, HDA_INPUT), - HDA_CODEC_VOLUME("Ext Mic Playback Volume", 0x17, 0x2, HDA_INPUT), - HDA_CODEC_MUTE("Ext Mic Playback Switch", 0x17, 0x2, HDA_INPUT), + HDA_CODEC_VOLUME("Int Mic Volume", 0x1a, 0x01, HDA_INPUT), + HDA_CODEC_MUTE("Int Mic Switch", 0x1a, 0x01, HDA_INPUT), + HDA_CODEC_VOLUME("Ext Mic Volume", 0x1a, 0x02, HDA_INPUT), + HDA_CODEC_MUTE("Ext Mic Switch", 0x1a, 0x02, HDA_INPUT), HDA_BIND_VOL("Master Playback Volume", &cxt5045_hp_bind_master_vol), { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, @@ -582,15 +576,16 @@ static struct hda_verb cxt5045_init_verbs[] = { {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_80 }, /* HP, Amp */ - {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT}, - {0x10, AC_VERB_SET_CONNECT_SEL, 0x1}, - {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, - {0x11, AC_VERB_SET_CONNECT_SEL, 0x1}, - {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, - {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, - {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, - {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, - {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, + {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP }, + {0x17, AC_VERB_SET_CONNECT_SEL,0x01}, + {0x17, AC_VERB_SET_AMP_GAIN_MUTE, + AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x01}, + {0x17, AC_VERB_SET_AMP_GAIN_MUTE, + AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x02}, + {0x17, AC_VERB_SET_AMP_GAIN_MUTE, + AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x03}, + {0x17, AC_VERB_SET_AMP_GAIN_MUTE, + AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x04}, /* Record selector: Int mic */ {0x1a, AC_VERB_SET_CONNECT_SEL,0x1}, {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, diff --git a/trunk/sound/pci/hda/patch_realtek.c b/trunk/sound/pci/hda/patch_realtek.c index d9f78c809ee9..53b0428abfc2 100644 --- a/trunk/sound/pci/hda/patch_realtek.c +++ b/trunk/sound/pci/hda/patch_realtek.c @@ -238,7 +238,7 @@ struct alc_spec { unsigned int num_kctl_alloc, num_kctl_used; struct snd_kcontrol_new *kctl_alloc; struct hda_input_mux private_imux; - hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS]; + hda_nid_t private_dac_nids[5]; /* hooks */ void (*init_hook)(struct hda_codec *codec); diff --git a/trunk/sound/pci/hda/patch_sigmatel.c b/trunk/sound/pci/hda/patch_sigmatel.c index f9b2c435a130..bf950195107c 100644 --- a/trunk/sound/pci/hda/patch_sigmatel.c +++ b/trunk/sound/pci/hda/patch_sigmatel.c @@ -111,7 +111,6 @@ struct sigmatel_spec { unsigned int alt_switch: 1; unsigned int hp_detect: 1; unsigned int gpio_mute: 1; - unsigned int no_vol_knob :1; unsigned int gpio_mask, gpio_data; @@ -1931,8 +1930,7 @@ static int stac92xx_auto_create_hp_ctls(struct hda_codec *codec, } if (spec->multiout.hp_nid) { const char *pfx; - if (old_num_dacs == spec->multiout.num_dacs && - spec->no_vol_knob) + if (old_num_dacs == spec->multiout.num_dacs) pfx = "Master"; else pfx = "Headphone"; @@ -2489,7 +2487,6 @@ static int patch_stac9200(struct hda_codec *codec) codec->spec = spec; spec->num_pins = ARRAY_SIZE(stac9200_pin_nids); spec->pin_nids = stac9200_pin_nids; - spec->no_vol_knob = 1; spec->board_config = snd_hda_check_board_config(codec, STAC_9200_MODELS, stac9200_models, stac9200_cfg_tbl); @@ -2544,7 +2541,6 @@ static int patch_stac925x(struct hda_codec *codec) codec->spec = spec; spec->num_pins = ARRAY_SIZE(stac925x_pin_nids); spec->pin_nids = stac925x_pin_nids; - spec->no_vol_knob = 1; spec->board_config = snd_hda_check_board_config(codec, STAC_925x_MODELS, stac925x_models, stac925x_cfg_tbl); diff --git a/trunk/sound/pci/hda/patch_via.c b/trunk/sound/pci/hda/patch_via.c index 4cdf3e6df4ba..33b5e1ffa817 100644 --- a/trunk/sound/pci/hda/patch_via.c +++ b/trunk/sound/pci/hda/patch_via.c @@ -114,7 +114,7 @@ struct via_spec { unsigned int num_kctl_alloc, num_kctl_used; struct snd_kcontrol_new *kctl_alloc; struct hda_input_mux private_imux; - hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS]; + hda_nid_t private_dac_nids[4]; #ifdef CONFIG_SND_HDA_POWER_SAVE struct hda_loopback_check loopback; diff --git a/trunk/sound/sh/aica.c b/trunk/sound/sh/aica.c index 88dc840152ce..131ec4812288 100644 --- a/trunk/sound/sh/aica.c +++ b/trunk/sound/sh/aica.c @@ -106,14 +106,11 @@ static void spu_write_wait(void) static void spu_memset(u32 toi, u32 what, int length) { int i; - unsigned long flags; snd_assert(length % 4 == 0, return); for (i = 0; i < length; i++) { if (!(i % 8)) spu_write_wait(); - local_irq_save(flags); writel(what, toi + SPU_MEMORY_BASE); - local_irq_restore(flags); toi++; } } @@ -121,7 +118,6 @@ static void spu_memset(u32 toi, u32 what, int length) /* spu_memload - write to SPU address space */ static void spu_memload(u32 toi, void *from, int length) { - unsigned long flags; u32 *froml = from; u32 __iomem *to = (u32 __iomem *) (SPU_MEMORY_BASE + toi); int i; @@ -132,9 +128,7 @@ static void spu_memload(u32 toi, void *from, int length) if (!(i % 8)) spu_write_wait(); val = *froml; - local_irq_save(flags); writel(val, to); - local_irq_restore(flags); froml++; to++; } @@ -144,36 +138,28 @@ static void spu_memload(u32 toi, void *from, int length) static void spu_disable(void) { int i; - unsigned long flags; u32 regval; spu_write_wait(); regval = readl(ARM_RESET_REGISTER); regval |= 1; spu_write_wait(); - local_irq_save(flags); writel(regval, ARM_RESET_REGISTER); - local_irq_restore(flags); for (i = 0; i < 64; i++) { spu_write_wait(); regval = readl(SPU_REGISTER_BASE + (i * 0x80)); regval = (regval & ~0x4000) | 0x8000; spu_write_wait(); - local_irq_save(flags); writel(regval, SPU_REGISTER_BASE + (i * 0x80)); - local_irq_restore(flags); } } /* spu_enable - set spu registers to enable sound output */ static void spu_enable(void) { - unsigned long flags; u32 regval = readl(ARM_RESET_REGISTER); regval &= ~1; spu_write_wait(); - local_irq_save(flags); writel(regval, ARM_RESET_REGISTER); - local_irq_restore(flags); } /* @@ -182,34 +168,25 @@ static void spu_enable(void) */ static void spu_reset(void) { - unsigned long flags; spu_disable(); spu_memset(0, 0, 0x200000 / 4); /* Put ARM7 in endless loop */ - local_irq_save(flags); ctrl_outl(0xea000002, SPU_MEMORY_BASE); - local_irq_restore(flags); spu_enable(); } /* aica_chn_start - write to spu to start playback */ static void aica_chn_start(void) { - unsigned long flags; spu_write_wait(); - local_irq_save(flags); writel(AICA_CMD_KICK | AICA_CMD_START, (u32 *) AICA_CONTROL_POINT); - local_irq_restore(flags); } /* aica_chn_halt - write to spu to halt playback */ static void aica_chn_halt(void) { - unsigned long flags; spu_write_wait(); - local_irq_save(flags); writel(AICA_CMD_KICK | AICA_CMD_STOP, (u32 *) AICA_CONTROL_POINT); - local_irq_restore(flags); } /* ALSA code below */ @@ -236,13 +213,12 @@ static int aica_dma_transfer(int channels, int buffer_size, int q, err, period_offset; struct snd_card_aica *dreamcastcard; struct snd_pcm_runtime *runtime; - unsigned long flags; + err = 0; dreamcastcard = substream->pcm->private_data; period_offset = dreamcastcard->clicks; period_offset %= (AICA_PERIOD_NUMBER / channels); runtime = substream->runtime; for (q = 0; q < channels; q++) { - local_irq_save(flags); err = dma_xfer(AICA_DMA_CHANNEL, (unsigned long) (runtime->dma_area + (AICA_BUFFER_SIZE * q) / @@ -252,12 +228,9 @@ static int aica_dma_transfer(int channels, int buffer_size, AICA_CHANNEL0_OFFSET + q * CHANNEL_OFFSET + AICA_PERIOD_SIZE * period_offset, buffer_size / channels, AICA_DMA_MODE); - if (unlikely(err < 0)) { - local_irq_restore(flags); + if (unlikely(err < 0)) break; - } dma_wait_for_completion(AICA_DMA_CHANNEL); - local_irq_restore(flags); } return err; } diff --git a/trunk/sound/sparc/cs4231.c b/trunk/sound/sparc/cs4231.c index f8c7a120ccbb..9785382a5f39 100644 --- a/trunk/sound/sparc/cs4231.c +++ b/trunk/sound/sparc/cs4231.c @@ -400,44 +400,65 @@ static void snd_cs4231_mce_up(struct snd_cs4231 *chip) static void snd_cs4231_mce_down(struct snd_cs4231 *chip) { - unsigned long flags, timeout; - int reg; + unsigned long flags; + unsigned long end_time; + int timeout; - snd_cs4231_busy_wait(chip); spin_lock_irqsave(&chip->lock, flags); + snd_cs4231_busy_wait(chip); #ifdef CONFIG_SND_DEBUG if (__cs4231_readb(chip, CS4231U(chip, REGSEL)) & CS4231_INIT) snd_printdd("mce_down [%p] - auto calibration time out (0)\n", CS4231U(chip, REGSEL)); #endif chip->mce_bit &= ~CS4231_MCE; - reg = __cs4231_readb(chip, CS4231U(chip, REGSEL)); - __cs4231_writeb(chip, chip->mce_bit | (reg & 0x1f), + timeout = __cs4231_readb(chip, CS4231U(chip, REGSEL)); + __cs4231_writeb(chip, chip->mce_bit | (timeout & 0x1f), CS4231U(chip, REGSEL)); - if (reg == 0x80) - snd_printdd("mce_down [%p]: serious init problem " - "- codec still busy\n", chip->port); - if ((reg & CS4231_MCE) == 0) { + if (timeout == 0x80) + snd_printdd("mce_down [%p]: serious init problem - " + "codec still busy\n", + chip->port); + if ((timeout & CS4231_MCE) == 0) { spin_unlock_irqrestore(&chip->lock, flags); return; } /* - * Wait for auto-calibration (AC) process to finish, i.e. ACI to go low. + * Wait for (possible -- during init auto-calibration may not be set) + * calibration process to start. Needs upto 5 sample periods on AD1848 + * which at the slowest possible rate of 5.5125 kHz means 907 us. */ - timeout = jiffies + msecs_to_jiffies(250); - do { + msleep(1); + + /* check condition up to 250ms */ + end_time = jiffies + msecs_to_jiffies(250); + while (snd_cs4231_in(chip, CS4231_TEST_INIT) & + CS4231_CALIB_IN_PROGRESS) { + spin_unlock_irqrestore(&chip->lock, flags); + if (time_after(jiffies, end_time)) { + snd_printk("mce_down - " + "auto calibration time out (2)\n"); + return; + } msleep(1); spin_lock_irqsave(&chip->lock, flags); - reg = snd_cs4231_in(chip, CS4231_TEST_INIT); - reg &= CS4231_CALIB_IN_PROGRESS; - } while (reg && time_before(jiffies, timeout)); - spin_unlock_irqrestore(&chip->lock, flags); + } - if (reg) - snd_printk(KERN_ERR - "mce_down - auto calibration time out (2)\n"); + /* check condition up to 100ms */ + end_time = jiffies + msecs_to_jiffies(100); + while (__cs4231_readb(chip, CS4231U(chip, REGSEL)) & CS4231_INIT) { + spin_unlock_irqrestore(&chip->lock, flags); + if (time_after(jiffies, end_time)) { + snd_printk("mce_down - " + "auto calibration time out (3)\n"); + return; + } + msleep(1); + spin_lock_irqsave(&chip->lock, flags); + } + spin_unlock_irqrestore(&chip->lock, flags); } static void snd_cs4231_advance_dma(struct cs4231_dma_control *dma_cont, diff --git a/trunk/sound/usb/usbquirks.h b/trunk/sound/usb/usbquirks.h index 59410f437705..743568f89907 100644 --- a/trunk/sound/usb/usbquirks.h +++ b/trunk/sound/usb/usbquirks.h @@ -79,15 +79,6 @@ .bInterfaceClass = USB_CLASS_AUDIO, .bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL }, -{ - .match_flags = USB_DEVICE_ID_MATCH_DEVICE | - USB_DEVICE_ID_MATCH_INT_CLASS | - USB_DEVICE_ID_MATCH_INT_SUBCLASS, - .idVendor = 0x046d, - .idProduct = 0x08f5, - .bInterfaceClass = USB_CLASS_AUDIO, - .bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL -}, { .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_CLASS |