aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/m68knommu/Kconfig13
-rw-r--r--arch/m68knommu/Makefile3
-rw-r--r--arch/m68knommu/defconfig325
-rw-r--r--arch/m68knommu/kernel/setup.c27
-rw-r--r--arch/m68knommu/kernel/signal.c10
-rw-r--r--arch/m68knommu/kernel/time.c22
-rw-r--r--arch/m68knommu/platform/5206/config.c9
-rw-r--r--arch/m68knommu/platform/5206e/config.c10
-rw-r--r--arch/m68knommu/platform/520x/config.c8
-rw-r--r--arch/m68knommu/platform/523x/config.c8
-rw-r--r--arch/m68knommu/platform/5249/config.c10
-rw-r--r--arch/m68knommu/platform/5272/config.c10
-rw-r--r--arch/m68knommu/platform/527x/config.c8
-rw-r--r--arch/m68knommu/platform/528x/config.c8
-rw-r--r--arch/m68knommu/platform/5307/config.c10
-rw-r--r--arch/m68knommu/platform/5307/entry.S5
-rw-r--r--arch/m68knommu/platform/5307/pit.c15
-rw-r--r--arch/m68knommu/platform/5307/timers.c19
-rw-r--r--arch/m68knommu/platform/532x/config.c10
-rw-r--r--arch/m68knommu/platform/5407/config.c10
-rw-r--r--drivers/char/cyclades.c2
-rw-r--r--drivers/md/bitmap.c2
-rw-r--r--drivers/md/raid5.c17
-rw-r--r--drivers/net/fec.c24
-rw-r--r--drivers/serial/mcf.c653
-rw-r--r--include/asm-m68knommu/module.h12
-rw-r--r--include/asm-m68knommu/uaccess.h4
-rw-r--r--include/sound/version.h2
-rw-r--r--mm/mmap.c3
-rw-r--r--mm/mprotect.c2
-rw-r--r--sound/core/control.c5
-rw-r--r--sound/pci/bt87x.c4
-rw-r--r--sound/pci/hda/hda_codec.c9
-rw-r--r--sound/pci/hda/hda_local.h18
-rw-r--r--sound/pci/hda/patch_analog.c5
-rw-r--r--sound/pci/hda/patch_cmedia.c3
-rw-r--r--sound/pci/hda/patch_conexant.c35
-rw-r--r--sound/pci/hda/patch_realtek.c2
-rw-r--r--sound/pci/hda/patch_sigmatel.c6
-rw-r--r--sound/pci/hda/patch_via.c2
-rw-r--r--sound/sh/aica.c31
-rw-r--r--sound/sparc/cs4231.c59
-rw-r--r--sound/usb/usbquirks.h9
43 files changed, 965 insertions, 484 deletions
diff --git a/arch/m68knommu/Kconfig b/arch/m68knommu/Kconfig
index f52c627bdadd..f4b582cbb567 100644
--- a/arch/m68knommu/Kconfig
+++ b/arch/m68knommu/Kconfig
@@ -451,6 +451,12 @@ config MOD5272
451 help 451 help
452 Support for the Netburner MOD-5272 board. 452 Support for the Netburner MOD-5272 board.
453 453
454config SAVANTrosie1
455 bool "Savant Rosie1 board support"
456 depends on M523x
457 help
458 Support for the Savant Rosie1 board.
459
454config ROMFS_FROM_ROM 460config ROMFS_FROM_ROM
455 bool "ROMFS image not RAM resident" 461 bool "ROMFS image not RAM resident"
456 depends on (NETtel || SNAPGEAR) 462 depends on (NETtel || SNAPGEAR)
@@ -492,7 +498,12 @@ config SNEHA
492 bool 498 bool
493 default y 499 default y
494 depends on CPU16B 500 depends on CPU16B
495 501
502config SAVANT
503 bool
504 default y
505 depends on SAVANTrosie1
506
496config AVNET 507config AVNET
497 bool 508 bool
498 default y 509 default y
diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile
index 92227aaaa26e..30aa2553693d 100644
--- a/arch/m68knommu/Makefile
+++ b/arch/m68knommu/Makefile
@@ -48,6 +48,7 @@ board-$(CONFIG_SNEHA) := SNEHA
48board-$(CONFIG_M5208EVB) := M5208EVB 48board-$(CONFIG_M5208EVB) := M5208EVB
49board-$(CONFIG_MOD5272) := MOD5272 49board-$(CONFIG_MOD5272) := MOD5272
50board-$(CONFIG_AVNET) := AVNET 50board-$(CONFIG_AVNET) := AVNET
51board-$(CONFIG_SAVANT) := SAVANT
51BOARD := $(board-y) 52BOARD := $(board-y)
52 53
53model-$(CONFIG_RAMKERNEL) := ram 54model-$(CONFIG_RAMKERNEL) := ram
@@ -117,4 +118,4 @@ core-y += arch/m68knommu/kernel/ \
117libs-y += arch/m68knommu/lib/ 118libs-y += arch/m68knommu/lib/
118 119
119archclean: 120archclean:
120 $(Q)$(MAKE) $(clean)=arch/m68knommu/boot 121
diff --git a/arch/m68knommu/defconfig b/arch/m68knommu/defconfig
index 3891de09ac23..5a0ecaaee3b0 100644
--- a/arch/m68knommu/defconfig
+++ b/arch/m68knommu/defconfig
@@ -1,41 +1,48 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.17 3# Linux kernel version: 2.6.23
4# Tue Jun 27 12:57:06 2006 4# Thu Oct 18 13:17:38 2007
5# 5#
6CONFIG_M68K=y 6CONFIG_M68K=y
7# CONFIG_MMU is not set 7# CONFIG_MMU is not set
8# CONFIG_FPU is not set 8# CONFIG_FPU is not set
9CONFIG_ZONE_DMA=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y 10CONFIG_RWSEM_GENERIC_SPINLOCK=y
10# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set 11# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
12# CONFIG_ARCH_HAS_ILOG2_U32 is not set
13# CONFIG_ARCH_HAS_ILOG2_U64 is not set
11CONFIG_GENERIC_FIND_NEXT_BIT=y 14CONFIG_GENERIC_FIND_NEXT_BIT=y
12CONFIG_GENERIC_HWEIGHT=y 15CONFIG_GENERIC_HWEIGHT=y
16CONFIG_GENERIC_HARDIRQS=y
13CONFIG_GENERIC_CALIBRATE_DELAY=y 17CONFIG_GENERIC_CALIBRATE_DELAY=y
14CONFIG_TIME_LOW_RES=y 18CONFIG_TIME_LOW_RES=y
19CONFIG_NO_IOPORT=y
20CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
15 21
16# 22#
17# Code maturity level options 23# General setup
18# 24#
19CONFIG_EXPERIMENTAL=y 25CONFIG_EXPERIMENTAL=y
20CONFIG_BROKEN_ON_SMP=y 26CONFIG_BROKEN_ON_SMP=y
21CONFIG_INIT_ENV_ARG_LIMIT=32 27CONFIG_INIT_ENV_ARG_LIMIT=32
22
23#
24# General setup
25#
26CONFIG_LOCALVERSION="" 28CONFIG_LOCALVERSION=""
27CONFIG_LOCALVERSION_AUTO=y 29CONFIG_LOCALVERSION_AUTO=y
28# CONFIG_SYSVIPC is not set 30# CONFIG_SYSVIPC is not set
29# CONFIG_POSIX_MQUEUE is not set 31# CONFIG_POSIX_MQUEUE is not set
30# CONFIG_BSD_PROCESS_ACCT is not set 32# CONFIG_BSD_PROCESS_ACCT is not set
31# CONFIG_SYSCTL is not set 33# CONFIG_TASKSTATS is not set
34# CONFIG_USER_NS is not set
32# CONFIG_AUDIT is not set 35# CONFIG_AUDIT is not set
33# CONFIG_IKCONFIG is not set 36# CONFIG_IKCONFIG is not set
37CONFIG_LOG_BUF_SHIFT=14
38# CONFIG_SYSFS_DEPRECATED is not set
34# CONFIG_RELAY is not set 39# CONFIG_RELAY is not set
35CONFIG_INITRAMFS_SOURCE="" 40# CONFIG_BLK_DEV_INITRD is not set
36CONFIG_UID16=y
37# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 41# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
42CONFIG_SYSCTL=y
38CONFIG_EMBEDDED=y 43CONFIG_EMBEDDED=y
44CONFIG_UID16=y
45CONFIG_SYSCTL_SYSCALL=y
39# CONFIG_KALLSYMS is not set 46# CONFIG_KALLSYMS is not set
40# CONFIG_HOTPLUG is not set 47# CONFIG_HOTPLUG is not set
41CONFIG_PRINTK=y 48CONFIG_PRINTK=y
@@ -44,20 +51,25 @@ CONFIG_ELF_CORE=y
44CONFIG_BASE_FULL=y 51CONFIG_BASE_FULL=y
45# CONFIG_FUTEX is not set 52# CONFIG_FUTEX is not set
46# CONFIG_EPOLL is not set 53# CONFIG_EPOLL is not set
54# CONFIG_SIGNALFD is not set
55# CONFIG_EVENTFD is not set
56# CONFIG_VM_EVENT_COUNTERS is not set
47CONFIG_SLAB=y 57CONFIG_SLAB=y
58# CONFIG_SLUB is not set
59# CONFIG_SLOB is not set
48CONFIG_TINY_SHMEM=y 60CONFIG_TINY_SHMEM=y
49CONFIG_BASE_SMALL=0 61CONFIG_BASE_SMALL=0
50# CONFIG_SLOB is not set 62CONFIG_MODULES=y
51 63CONFIG_MODULE_UNLOAD=y
52# 64# CONFIG_MODULE_FORCE_UNLOAD is not set
53# Loadable module support 65# CONFIG_MODVERSIONS is not set
54# 66# CONFIG_MODULE_SRCVERSION_ALL is not set
55# CONFIG_MODULES is not set 67# CONFIG_KMOD is not set
56 68CONFIG_BLOCK=y
57# 69# CONFIG_LBD is not set
58# Block layer
59#
60# CONFIG_BLK_DEV_IO_TRACE is not set 70# CONFIG_BLK_DEV_IO_TRACE is not set
71# CONFIG_LSF is not set
72# CONFIG_BLK_DEV_BSG is not set
61 73
62# 74#
63# IO Schedulers 75# IO Schedulers
@@ -99,6 +111,7 @@ CONFIG_CLOCK_DIV=1
99# 111#
100# Platform 112# Platform
101# 113#
114# CONFIG_UC5272 is not set
102CONFIG_M5272C3=y 115CONFIG_M5272C3=y
103# CONFIG_COBRA5272 is not set 116# CONFIG_COBRA5272 is not set
104# CONFIG_CANCam is not set 117# CONFIG_CANCam is not set
@@ -107,7 +120,6 @@ CONFIG_M5272C3=y
107# CONFIG_CPU16B is not set 120# CONFIG_CPU16B is not set
108# CONFIG_MOD5272 is not set 121# CONFIG_MOD5272 is not set
109CONFIG_FREESCALE=y 122CONFIG_FREESCALE=y
110# CONFIG_LARGE_ALLOCS is not set
111CONFIG_4KSTACKS=y 123CONFIG_4KSTACKS=y
112 124
113# 125#
@@ -121,6 +133,11 @@ CONFIG_RAMAUTOBIT=y
121# CONFIG_RAM8BIT is not set 133# CONFIG_RAM8BIT is not set
122# CONFIG_RAM16BIT is not set 134# CONFIG_RAM16BIT is not set
123# CONFIG_RAM32BIT is not set 135# CONFIG_RAM32BIT is not set
136
137#
138# ROM configuration
139#
140# CONFIG_ROM is not set
124CONFIG_RAMKERNEL=y 141CONFIG_RAMKERNEL=y
125# CONFIG_ROMKERNEL is not set 142# CONFIG_ROMKERNEL is not set
126CONFIG_SELECT_MEMORY_MODEL=y 143CONFIG_SELECT_MEMORY_MODEL=y
@@ -131,20 +148,19 @@ CONFIG_FLATMEM=y
131CONFIG_FLAT_NODE_MEM_MAP=y 148CONFIG_FLAT_NODE_MEM_MAP=y
132# CONFIG_SPARSEMEM_STATIC is not set 149# CONFIG_SPARSEMEM_STATIC is not set
133CONFIG_SPLIT_PTLOCK_CPUS=4 150CONFIG_SPLIT_PTLOCK_CPUS=4
151# CONFIG_RESOURCES_64BIT is not set
152CONFIG_ZONE_DMA_FLAG=1
153CONFIG_VIRT_TO_BUS=y
134 154
135# 155#
136# Bus options (PCI, PCMCIA, EISA, MCA, ISA) 156# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
137# 157#
138# CONFIG_PCI is not set 158# CONFIG_PCI is not set
159# CONFIG_ARCH_SUPPORTS_MSI is not set
139 160
140# 161#
141# PCCARD (PCMCIA/CardBus) support 162# PCCARD (PCMCIA/CardBus) support
142# 163#
143# CONFIG_PCCARD is not set
144
145#
146# PCI Hotplug Support
147#
148 164
149# 165#
150# Executable file formats 166# Executable file formats
@@ -168,7 +184,6 @@ CONFIG_NET=y
168# 184#
169# Networking options 185# Networking options
170# 186#
171# CONFIG_NETDEBUG is not set
172CONFIG_PACKET=y 187CONFIG_PACKET=y
173# CONFIG_PACKET_MMAP is not set 188# CONFIG_PACKET_MMAP is not set
174CONFIG_UNIX=y 189CONFIG_UNIX=y
@@ -187,27 +202,21 @@ CONFIG_IP_FIB_HASH=y
187# CONFIG_INET_IPCOMP is not set 202# CONFIG_INET_IPCOMP is not set
188# CONFIG_INET_XFRM_TUNNEL is not set 203# CONFIG_INET_XFRM_TUNNEL is not set
189# CONFIG_INET_TUNNEL is not set 204# CONFIG_INET_TUNNEL is not set
205# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
206# CONFIG_INET_XFRM_MODE_TUNNEL is not set
207# CONFIG_INET_XFRM_MODE_BEET is not set
190# CONFIG_INET_DIAG is not set 208# CONFIG_INET_DIAG is not set
191# CONFIG_TCP_CONG_ADVANCED is not set 209# CONFIG_TCP_CONG_ADVANCED is not set
192CONFIG_TCP_CONG_BIC=y 210CONFIG_TCP_CONG_CUBIC=y
211CONFIG_DEFAULT_TCP_CONG="cubic"
212# CONFIG_TCP_MD5SIG is not set
193# CONFIG_IPV6 is not set 213# CONFIG_IPV6 is not set
194# CONFIG_INET6_XFRM_TUNNEL is not set 214# CONFIG_INET6_XFRM_TUNNEL is not set
195# CONFIG_INET6_TUNNEL is not set 215# CONFIG_INET6_TUNNEL is not set
216# CONFIG_NETWORK_SECMARK is not set
196# CONFIG_NETFILTER is not set 217# CONFIG_NETFILTER is not set
197
198#
199# DCCP Configuration (EXPERIMENTAL)
200#
201# CONFIG_IP_DCCP is not set 218# CONFIG_IP_DCCP is not set
202
203#
204# SCTP Configuration (EXPERIMENTAL)
205#
206# CONFIG_IP_SCTP is not set 219# CONFIG_IP_SCTP is not set
207
208#
209# TIPC Configuration (EXPERIMENTAL)
210#
211# CONFIG_TIPC is not set 220# CONFIG_TIPC is not set
212# CONFIG_ATM is not set 221# CONFIG_ATM is not set
213# CONFIG_BRIDGE is not set 222# CONFIG_BRIDGE is not set
@@ -218,7 +227,6 @@ CONFIG_TCP_CONG_BIC=y
218# CONFIG_ATALK is not set 227# CONFIG_ATALK is not set
219# CONFIG_X25 is not set 228# CONFIG_X25 is not set
220# CONFIG_LAPB is not set 229# CONFIG_LAPB is not set
221# CONFIG_NET_DIVERT is not set
222# CONFIG_ECONET is not set 230# CONFIG_ECONET is not set
223# CONFIG_WAN_ROUTER is not set 231# CONFIG_WAN_ROUTER is not set
224 232
@@ -234,7 +242,17 @@ CONFIG_TCP_CONG_BIC=y
234# CONFIG_HAMRADIO is not set 242# CONFIG_HAMRADIO is not set
235# CONFIG_IRDA is not set 243# CONFIG_IRDA is not set
236# CONFIG_BT is not set 244# CONFIG_BT is not set
245# CONFIG_AF_RXRPC is not set
246
247#
248# Wireless
249#
250# CONFIG_CFG80211 is not set
251# CONFIG_WIRELESS_EXT is not set
252# CONFIG_MAC80211 is not set
237# CONFIG_IEEE80211 is not set 253# CONFIG_IEEE80211 is not set
254# CONFIG_RFKILL is not set
255# CONFIG_NET_9P is not set
238 256
239# 257#
240# Device Drivers 258# Device Drivers
@@ -245,16 +263,8 @@ CONFIG_TCP_CONG_BIC=y
245# 263#
246CONFIG_STANDALONE=y 264CONFIG_STANDALONE=y
247CONFIG_PREVENT_FIRMWARE_BUILD=y 265CONFIG_PREVENT_FIRMWARE_BUILD=y
248# CONFIG_FW_LOADER is not set 266# CONFIG_SYS_HYPERVISOR is not set
249
250#
251# Connector - unified userspace <-> kernelspace linker
252#
253# CONFIG_CONNECTOR is not set 267# CONFIG_CONNECTOR is not set
254
255#
256# Memory Technology Devices (MTD)
257#
258CONFIG_MTD=y 268CONFIG_MTD=y
259# CONFIG_MTD_DEBUG is not set 269# CONFIG_MTD_DEBUG is not set
260# CONFIG_MTD_CONCAT is not set 270# CONFIG_MTD_CONCAT is not set
@@ -266,11 +276,13 @@ CONFIG_MTD_PARTITIONS=y
266# User Modules And Translation Layers 276# User Modules And Translation Layers
267# 277#
268CONFIG_MTD_CHAR=y 278CONFIG_MTD_CHAR=y
279CONFIG_MTD_BLKDEVS=y
269CONFIG_MTD_BLOCK=y 280CONFIG_MTD_BLOCK=y
270# CONFIG_FTL is not set 281# CONFIG_FTL is not set
271# CONFIG_NFTL is not set 282# CONFIG_NFTL is not set
272# CONFIG_INFTL is not set 283# CONFIG_INFTL is not set
273# CONFIG_RFD_FTL is not set 284# CONFIG_RFD_FTL is not set
285# CONFIG_SSFDC is not set
274 286
275# 287#
276# RAM/ROM/Flash chip drivers 288# RAM/ROM/Flash chip drivers
@@ -290,7 +302,6 @@ CONFIG_MTD_CFI_I2=y
290CONFIG_MTD_RAM=y 302CONFIG_MTD_RAM=y
291# CONFIG_MTD_ROM is not set 303# CONFIG_MTD_ROM is not set
292# CONFIG_MTD_ABSENT is not set 304# CONFIG_MTD_ABSENT is not set
293# CONFIG_MTD_OBSOLETE_CHIPS is not set
294 305
295# 306#
296# Mapping drivers for chip access 307# Mapping drivers for chip access
@@ -313,42 +324,25 @@ CONFIG_MTD_UCLINUX=y
313# CONFIG_MTD_DOC2000 is not set 324# CONFIG_MTD_DOC2000 is not set
314# CONFIG_MTD_DOC2001 is not set 325# CONFIG_MTD_DOC2001 is not set
315# CONFIG_MTD_DOC2001PLUS is not set 326# CONFIG_MTD_DOC2001PLUS is not set
316
317#
318# NAND Flash Device Drivers
319#
320# CONFIG_MTD_NAND is not set 327# CONFIG_MTD_NAND is not set
321
322#
323# OneNAND Flash Device Drivers
324#
325# CONFIG_MTD_ONENAND is not set 328# CONFIG_MTD_ONENAND is not set
326 329
327# 330#
328# Parallel port support 331# UBI - Unsorted block images
329# 332#
333# CONFIG_MTD_UBI is not set
330# CONFIG_PARPORT is not set 334# CONFIG_PARPORT is not set
331 335CONFIG_BLK_DEV=y
332#
333# Plug and Play support
334#
335
336#
337# Block devices
338#
339# CONFIG_BLK_DEV_COW_COMMON is not set 336# CONFIG_BLK_DEV_COW_COMMON is not set
340# CONFIG_BLK_DEV_LOOP is not set 337# CONFIG_BLK_DEV_LOOP is not set
341# CONFIG_BLK_DEV_NBD is not set 338# CONFIG_BLK_DEV_NBD is not set
342CONFIG_BLK_DEV_RAM=y 339CONFIG_BLK_DEV_RAM=y
343CONFIG_BLK_DEV_RAM_COUNT=16 340CONFIG_BLK_DEV_RAM_COUNT=16
344CONFIG_BLK_DEV_RAM_SIZE=4096 341CONFIG_BLK_DEV_RAM_SIZE=4096
345# CONFIG_BLK_DEV_INITRD is not set 342CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
346# CONFIG_CDROM_PKTCDVD is not set 343# CONFIG_CDROM_PKTCDVD is not set
347# CONFIG_ATA_OVER_ETH is not set 344# CONFIG_ATA_OVER_ETH is not set
348 345# CONFIG_MISC_DEVICES is not set
349#
350# ATA/ATAPI/MFM/RLL support
351#
352# CONFIG_IDE is not set 346# CONFIG_IDE is not set
353 347
354# 348#
@@ -356,67 +350,29 @@ CONFIG_BLK_DEV_RAM_SIZE=4096
356# 350#
357# CONFIG_RAID_ATTRS is not set 351# CONFIG_RAID_ATTRS is not set
358# CONFIG_SCSI is not set 352# CONFIG_SCSI is not set
359 353# CONFIG_SCSI_DMA is not set
360# 354# CONFIG_SCSI_NETLINK is not set
361# Multi-device support (RAID and LVM)
362#
363# CONFIG_MD is not set 355# CONFIG_MD is not set
364
365#
366# Fusion MPT device support
367#
368# CONFIG_FUSION is not set
369
370#
371# IEEE 1394 (FireWire) support
372#
373
374#
375# I2O device support
376#
377
378#
379# Network device support
380#
381CONFIG_NETDEVICES=y 356CONFIG_NETDEVICES=y
357# CONFIG_NETDEVICES_MULTIQUEUE is not set
382# CONFIG_DUMMY is not set 358# CONFIG_DUMMY is not set
383# CONFIG_BONDING is not set 359# CONFIG_BONDING is not set
360# CONFIG_MACVLAN is not set
384# CONFIG_EQUALIZER is not set 361# CONFIG_EQUALIZER is not set
385# CONFIG_TUN is not set 362# CONFIG_TUN is not set
386
387#
388# PHY device support
389#
390# CONFIG_PHYLIB is not set 363# CONFIG_PHYLIB is not set
391
392#
393# Ethernet (10 or 100Mbit)
394#
395CONFIG_NET_ETHERNET=y 364CONFIG_NET_ETHERNET=y
396# CONFIG_MII is not set 365# CONFIG_MII is not set
397CONFIG_FEC=y 366CONFIG_FEC=y
398# CONFIG_FEC2 is not set 367# CONFIG_FEC2 is not set
368# CONFIG_NETDEV_1000 is not set
369# CONFIG_NETDEV_10000 is not set
399 370
400# 371#
401# Ethernet (1000 Mbit) 372# Wireless LAN
402#
403
404#
405# Ethernet (10000 Mbit)
406#
407
408#
409# Token Ring devices
410#
411
412#
413# Wireless LAN (non-hamradio)
414#
415# CONFIG_NET_RADIO is not set
416
417#
418# Wan interfaces
419# 373#
374# CONFIG_WLAN_PRE80211 is not set
375# CONFIG_WLAN_80211 is not set
420# CONFIG_WAN is not set 376# CONFIG_WAN is not set
421CONFIG_PPP=y 377CONFIG_PPP=y
422# CONFIG_PPP_MULTILINK is not set 378# CONFIG_PPP_MULTILINK is not set
@@ -427,20 +383,14 @@ CONFIG_PPP=y
427# CONFIG_PPP_BSDCOMP is not set 383# CONFIG_PPP_BSDCOMP is not set
428# CONFIG_PPP_MPPE is not set 384# CONFIG_PPP_MPPE is not set
429# CONFIG_PPPOE is not set 385# CONFIG_PPPOE is not set
386# CONFIG_PPPOL2TP is not set
430# CONFIG_SLIP is not set 387# CONFIG_SLIP is not set
388CONFIG_SLHC=y
431# CONFIG_SHAPER is not set 389# CONFIG_SHAPER is not set
432# CONFIG_NETCONSOLE is not set 390# CONFIG_NETCONSOLE is not set
433# CONFIG_NETPOLL is not set 391# CONFIG_NETPOLL is not set
434# CONFIG_NET_POLL_CONTROLLER is not set 392# CONFIG_NET_POLL_CONTROLLER is not set
435
436#
437# ISDN subsystem
438#
439# CONFIG_ISDN is not set 393# CONFIG_ISDN is not set
440
441#
442# Telephony Support
443#
444# CONFIG_PHONE is not set 394# CONFIG_PHONE is not set
445 395
446# 396#
@@ -472,34 +422,13 @@ CONFIG_SERIAL_COLDFIRE=y
472# CONFIG_UNIX98_PTYS is not set 422# CONFIG_UNIX98_PTYS is not set
473CONFIG_LEGACY_PTYS=y 423CONFIG_LEGACY_PTYS=y
474CONFIG_LEGACY_PTY_COUNT=256 424CONFIG_LEGACY_PTY_COUNT=256
475
476#
477# IPMI
478#
479# CONFIG_IPMI_HANDLER is not set 425# CONFIG_IPMI_HANDLER is not set
480
481#
482# Watchdog Cards
483#
484# CONFIG_WATCHDOG is not set 426# CONFIG_WATCHDOG is not set
427# CONFIG_HW_RANDOM is not set
485# CONFIG_GEN_RTC is not set 428# CONFIG_GEN_RTC is not set
486# CONFIG_DTLK is not set
487# CONFIG_R3964 is not set 429# CONFIG_R3964 is not set
488
489#
490# Ftape, the floppy tape device driver
491#
492# CONFIG_RAW_DRIVER is not set 430# CONFIG_RAW_DRIVER is not set
493
494#
495# TPM devices
496#
497# CONFIG_TCG_TPM is not set 431# CONFIG_TCG_TPM is not set
498# CONFIG_TELCLOCK is not set
499
500#
501# I2C support
502#
503# CONFIG_I2C is not set 432# CONFIG_I2C is not set
504 433
505# 434#
@@ -507,101 +436,74 @@ CONFIG_LEGACY_PTY_COUNT=256
507# 436#
508# CONFIG_SPI is not set 437# CONFIG_SPI is not set
509# CONFIG_SPI_MASTER is not set 438# CONFIG_SPI_MASTER is not set
510
511#
512# Dallas's 1-wire bus
513#
514# CONFIG_W1 is not set 439# CONFIG_W1 is not set
515 440# CONFIG_POWER_SUPPLY is not set
516#
517# Hardware Monitoring support
518#
519# CONFIG_HWMON is not set 441# CONFIG_HWMON is not set
520# CONFIG_HWMON_VID is not set
521 442
522# 443#
523# Misc devices 444# Multifunction device drivers
524# 445#
446# CONFIG_MFD_SM501 is not set
525 447
526# 448#
527# Multimedia devices 449# Multimedia devices
528# 450#
529# CONFIG_VIDEO_DEV is not set 451# CONFIG_VIDEO_DEV is not set
530CONFIG_VIDEO_V4L2=y 452# CONFIG_DVB_CORE is not set
453CONFIG_DAB=y
531 454
532# 455#
533# Digital Video Broadcasting Devices 456# Graphics support
534# 457#
535# CONFIG_DVB is not set 458# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
536 459
537# 460#
538# Graphics support 461# Display device support
539# 462#
463# CONFIG_DISPLAY_SUPPORT is not set
464# CONFIG_VGASTATE is not set
465CONFIG_VIDEO_OUTPUT_CONTROL=y
540# CONFIG_FB is not set 466# CONFIG_FB is not set
541 467
542# 468#
543# Sound 469# Sound
544# 470#
545# CONFIG_SOUND is not set 471# CONFIG_SOUND is not set
546 472# CONFIG_USB_SUPPORT is not set
547#
548# USB support
549#
550# CONFIG_USB_ARCH_HAS_HCD is not set
551# CONFIG_USB_ARCH_HAS_OHCI is not set
552# CONFIG_USB_ARCH_HAS_EHCI is not set
553
554#
555# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
556#
557
558#
559# USB Gadget Support
560#
561# CONFIG_USB_GADGET is not set
562
563#
564# MMC/SD Card support
565#
566# CONFIG_MMC is not set 473# CONFIG_MMC is not set
567
568#
569# LED devices
570#
571# CONFIG_NEW_LEDS is not set 474# CONFIG_NEW_LEDS is not set
475# CONFIG_RTC_CLASS is not set
572 476
573# 477#
574# LED drivers 478# DMA Engine support
575# 479#
480# CONFIG_DMA_ENGINE is not set
576 481
577# 482#
578# LED Triggers 483# DMA Clients
579# 484#
580 485
581# 486#
582# InfiniBand support 487# DMA Devices
583# 488#
584 489
585# 490#
586# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) 491# Userspace I/O
587# 492#
588 493# CONFIG_UIO is not set
589#
590# Real Time Clock
591#
592# CONFIG_RTC_CLASS is not set
593 494
594# 495#
595# File systems 496# File systems
596# 497#
597CONFIG_EXT2_FS=y 498CONFIG_EXT2_FS=y
598# CONFIG_EXT2_FS_XATTR is not set 499# CONFIG_EXT2_FS_XATTR is not set
599# CONFIG_EXT2_FS_XIP is not set
600# CONFIG_EXT3_FS is not set 500# CONFIG_EXT3_FS is not set
501# CONFIG_EXT4DEV_FS is not set
601# CONFIG_REISERFS_FS is not set 502# CONFIG_REISERFS_FS is not set
602# CONFIG_JFS_FS is not set 503# CONFIG_JFS_FS is not set
603# CONFIG_FS_POSIX_ACL is not set 504# CONFIG_FS_POSIX_ACL is not set
604# CONFIG_XFS_FS is not set 505# CONFIG_XFS_FS is not set
506# CONFIG_GFS2_FS is not set
605# CONFIG_OCFS2_FS is not set 507# CONFIG_OCFS2_FS is not set
606# CONFIG_MINIX_FS is not set 508# CONFIG_MINIX_FS is not set
607CONFIG_ROMFS_FS=y 509CONFIG_ROMFS_FS=y
@@ -629,6 +531,7 @@ CONFIG_ROMFS_FS=y
629# Pseudo filesystems 531# Pseudo filesystems
630# 532#
631CONFIG_PROC_FS=y 533CONFIG_PROC_FS=y
534CONFIG_PROC_SYSCTL=y
632CONFIG_SYSFS=y 535CONFIG_SYSFS=y
633# CONFIG_TMPFS is not set 536# CONFIG_TMPFS is not set
634# CONFIG_HUGETLB_PAGE is not set 537# CONFIG_HUGETLB_PAGE is not set
@@ -645,7 +548,6 @@ CONFIG_RAMFS=y
645# CONFIG_BEFS_FS is not set 548# CONFIG_BEFS_FS is not set
646# CONFIG_BFS_FS is not set 549# CONFIG_BFS_FS is not set
647# CONFIG_EFS_FS is not set 550# CONFIG_EFS_FS is not set
648# CONFIG_JFFS_FS is not set
649# CONFIG_JFFS2_FS is not set 551# CONFIG_JFFS2_FS is not set
650# CONFIG_CRAMFS is not set 552# CONFIG_CRAMFS is not set
651# CONFIG_VXFS_FS is not set 553# CONFIG_VXFS_FS is not set
@@ -664,7 +566,6 @@ CONFIG_RAMFS=y
664# CONFIG_NCP_FS is not set 566# CONFIG_NCP_FS is not set
665# CONFIG_CODA_FS is not set 567# CONFIG_CODA_FS is not set
666# CONFIG_AFS_FS is not set 568# CONFIG_AFS_FS is not set
667# CONFIG_9P_FS is not set
668 569
669# 570#
670# Partition Types 571# Partition Types
@@ -678,15 +579,21 @@ CONFIG_MSDOS_PARTITION=y
678# CONFIG_NLS is not set 579# CONFIG_NLS is not set
679 580
680# 581#
582# Distributed Lock Manager
583#
584# CONFIG_DLM is not set
585
586#
681# Kernel hacking 587# Kernel hacking
682# 588#
683# CONFIG_PRINTK_TIME is not set 589# CONFIG_PRINTK_TIME is not set
590# CONFIG_ENABLE_MUST_CHECK is not set
684# CONFIG_MAGIC_SYSRQ is not set 591# CONFIG_MAGIC_SYSRQ is not set
592# CONFIG_UNUSED_SYMBOLS is not set
593# CONFIG_DEBUG_FS is not set
594# CONFIG_HEADERS_CHECK is not set
685# CONFIG_DEBUG_KERNEL is not set 595# CONFIG_DEBUG_KERNEL is not set
686CONFIG_LOG_BUF_SHIFT=14
687# CONFIG_DEBUG_BUGVERBOSE is not set 596# CONFIG_DEBUG_BUGVERBOSE is not set
688# CONFIG_DEBUG_FS is not set
689# CONFIG_UNWIND_INFO is not set
690# CONFIG_FULLDEBUG is not set 597# CONFIG_FULLDEBUG is not set
691# CONFIG_HIGHPROFILE is not set 598# CONFIG_HIGHPROFILE is not set
692# CONFIG_BOOTPARAM is not set 599# CONFIG_BOOTPARAM is not set
@@ -699,20 +606,16 @@ CONFIG_LOG_BUF_SHIFT=14
699# 606#
700# CONFIG_KEYS is not set 607# CONFIG_KEYS is not set
701# CONFIG_SECURITY is not set 608# CONFIG_SECURITY is not set
702
703#
704# Cryptographic options
705#
706# CONFIG_CRYPTO is not set 609# CONFIG_CRYPTO is not set
707 610
708# 611#
709# Hardware crypto devices
710#
711
712#
713# Library routines 612# Library routines
714# 613#
715# CONFIG_CRC_CCITT is not set 614# CONFIG_CRC_CCITT is not set
716# CONFIG_CRC16 is not set 615# CONFIG_CRC16 is not set
616# CONFIG_CRC_ITU_T is not set
717# CONFIG_CRC32 is not set 617# CONFIG_CRC32 is not set
618# CONFIG_CRC7 is not set
718# CONFIG_LIBCRC32C is not set 619# CONFIG_LIBCRC32C is not set
620CONFIG_HAS_IOMEM=y
621CONFIG_HAS_DMA=y
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index 3f86ade3a22a..74bf94948ec2 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -151,27 +151,15 @@ void setup_arch(char **cmdline_p)
151#ifdef CONFIG_ELITE 151#ifdef CONFIG_ELITE
152 printk(KERN_INFO "Modified for M5206eLITE by Rob Scott, rscott@mtrob.fdns.net\n"); 152 printk(KERN_INFO "Modified for M5206eLITE by Rob Scott, rscott@mtrob.fdns.net\n");
153#endif 153#endif
154#ifdef CONFIG_TELOS
155 printk(KERN_INFO "Modified for Omnia ToolVox by James D. Schettine, james@telos-systems.com\n");
156#endif
157#endif 154#endif
158 printk(KERN_INFO "Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne\n"); 155 printk(KERN_INFO "Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne\n");
159 156
160#if defined( CONFIG_PILOT ) && defined( CONFIG_M68328 ) 157#if defined( CONFIG_PILOT ) && defined( CONFIG_M68328 )
161 printk(KERN_INFO "TRG SuperPilot FLASH card support <info@trgnet.com>\n"); 158 printk(KERN_INFO "TRG SuperPilot FLASH card support <info@trgnet.com>\n");
162#endif 159#endif
163
164#if defined( CONFIG_PILOT ) && defined( CONFIG_M68EZ328 ) 160#if defined( CONFIG_PILOT ) && defined( CONFIG_M68EZ328 )
165 printk(KERN_INFO "PalmV support by Lineo Inc. <jeff@uclinux.com>\n"); 161 printk(KERN_INFO "PalmV support by Lineo Inc. <jeff@uclinux.com>\n");
166#endif 162#endif
167
168#ifdef CONFIG_M68EZ328ADS
169 printk(KERN_INFO "M68EZ328ADS board support (C) 1999 Vladimir Gurevich <vgurevic@cisco.com>\n");
170#endif
171
172#ifdef CONFIG_ALMA_ANS
173 printk(KERN_INFO "Alma Electronics board support (C) 1999 Vladimir Gurevich <vgurevic@cisco.com>\n");
174#endif
175#if defined (CONFIG_M68360) 163#if defined (CONFIG_M68360)
176 printk(KERN_INFO "QUICC port done by SED Systems <hamilton@sedsystems.ca>,\n"); 164 printk(KERN_INFO "QUICC port done by SED Systems <hamilton@sedsystems.ca>,\n");
177 printk(KERN_INFO "based on 2.0.38 port by Lineo Inc. <mleslie@lineo.com>.\n"); 165 printk(KERN_INFO "based on 2.0.38 port by Lineo Inc. <mleslie@lineo.com>.\n");
@@ -188,11 +176,9 @@ void setup_arch(char **cmdline_p)
188 "BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext, 176 "BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext,
189 (int) &_sdata, (int) &_edata, 177 (int) &_sdata, (int) &_edata,
190 (int) &_sbss, (int) &_ebss); 178 (int) &_sbss, (int) &_ebss);
191 printk(KERN_DEBUG "KERNEL -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x " 179 printk(KERN_DEBUG "MEMORY -> ROMFS=0x%06x-0x%06x MEM=0x%06x-0x%06x\n ",
192 "STACK=0x%06x-0x%06x\n",
193 (int) &_ebss, (int) memory_start, 180 (int) &_ebss, (int) memory_start,
194 (int) memory_start, (int) memory_end, 181 (int) memory_start, (int) memory_end);
195 (int) memory_end, (int) _ramend);
196#endif 182#endif
197 183
198 /* Keep a copy of command line */ 184 /* Keep a copy of command line */
@@ -287,12 +273,3 @@ struct seq_operations cpuinfo_op = {
287 .show = show_cpuinfo, 273 .show = show_cpuinfo,
288}; 274};
289 275
290void arch_gettod(int *year, int *mon, int *day, int *hour,
291 int *min, int *sec)
292{
293 if (mach_gettod)
294 mach_gettod(year, mon, day, hour, min, sec);
295 else
296 *year = *mon = *day = *hour = *min = *sec = 0;
297}
298
diff --git a/arch/m68knommu/kernel/signal.c b/arch/m68knommu/kernel/signal.c
index 437f8c6c14a0..70371378db86 100644
--- a/arch/m68knommu/kernel/signal.c
+++ b/arch/m68knommu/kernel/signal.c
@@ -781,15 +781,7 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs)
781 /* Did we come from a system call? */ 781 /* Did we come from a system call? */
782 if (regs->orig_d0 >= 0) { 782 if (regs->orig_d0 >= 0) {
783 /* Restart the system call - no handlers present */ 783 /* Restart the system call - no handlers present */
784 if (regs->d0 == -ERESTARTNOHAND 784 handle_restart(regs, NULL, 0);
785 || regs->d0 == -ERESTARTSYS
786 || regs->d0 == -ERESTARTNOINTR) {
787 regs->d0 = regs->orig_d0;
788 regs->pc -= 2;
789 } else if (regs->d0 == -ERESTART_RESTARTBLOCK) {
790 regs->d0 = __NR_restart_syscall;
791 regs->pc -= 2;
792 }
793 } 785 }
794 return 0; 786 return 0;
795} 787}
diff --git a/arch/m68knommu/kernel/time.c b/arch/m68knommu/kernel/time.c
index 467053da2d08..77e5375a2dd5 100644
--- a/arch/m68knommu/kernel/time.c
+++ b/arch/m68knommu/kernel/time.c
@@ -27,7 +27,6 @@
27 27
28#define TICK_SIZE (tick_nsec / 1000) 28#define TICK_SIZE (tick_nsec / 1000)
29 29
30
31static inline int set_rtc_mmss(unsigned long nowtime) 30static inline int set_rtc_mmss(unsigned long nowtime)
32{ 31{
33 if (mach_set_clock_mmss) 32 if (mach_set_clock_mmss)
@@ -39,15 +38,11 @@ static inline int set_rtc_mmss(unsigned long nowtime)
39 * timer_interrupt() needs to keep up the real-time clock, 38 * timer_interrupt() needs to keep up the real-time clock,
40 * as well as call the "do_timer()" routine every clocktick 39 * as well as call the "do_timer()" routine every clocktick
41 */ 40 */
42static irqreturn_t timer_interrupt(int irq, void *dummy) 41irqreturn_t arch_timer_interrupt(int irq, void *dummy)
43{ 42{
44 /* last time the cmos clock got updated */ 43 /* last time the cmos clock got updated */
45 static long last_rtc_update=0; 44 static long last_rtc_update=0;
46 45
47 /* may need to kick the hardware timer */
48 if (mach_tick)
49 mach_tick();
50
51 write_seqlock(&xtime_lock); 46 write_seqlock(&xtime_lock);
52 47
53 do_timer(1); 48 do_timer(1);
@@ -103,10 +98,10 @@ void time_init(void)
103{ 98{
104 unsigned int year, mon, day, hour, min, sec; 99 unsigned int year, mon, day, hour, min, sec;
105 100
106 extern void arch_gettod(int *year, int *mon, int *day, int *hour, 101 if (mach_gettod)
107 int *min, int *sec); 102 mach_gettod(&year, &mon, &day, &hour, &min, &sec);
108 103 else
109 arch_gettod(&year, &mon, &day, &hour, &min, &sec); 104 year = mon = day = hour = min = sec = 0;
110 105
111 if ((year += 1900) < 1970) 106 if ((year += 1900) < 1970)
112 year += 100; 107 year += 100;
@@ -114,7 +109,7 @@ void time_init(void)
114 xtime.tv_nsec = 0; 109 xtime.tv_nsec = 0;
115 wall_to_monotonic.tv_sec = -xtime.tv_sec; 110 wall_to_monotonic.tv_sec = -xtime.tv_sec;
116 111
117 mach_sched_init(timer_interrupt); 112 hw_timer_init();
118} 113}
119 114
120/* 115/*
@@ -128,7 +123,7 @@ void do_gettimeofday(struct timeval *tv)
128 123
129 do { 124 do {
130 seq = read_seqbegin_irqsave(&xtime_lock, flags); 125 seq = read_seqbegin_irqsave(&xtime_lock, flags);
131 usec = mach_gettimeoffset ? mach_gettimeoffset() : 0; 126 usec = hw_timer_offset();
132 sec = xtime.tv_sec; 127 sec = xtime.tv_sec;
133 usec += (xtime.tv_nsec / 1000); 128 usec += (xtime.tv_nsec / 1000);
134 } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); 129 } while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
@@ -160,8 +155,7 @@ int do_settimeofday(struct timespec *tv)
160 * Discover what correction gettimeofday 155 * Discover what correction gettimeofday
161 * would have done, and then undo it! 156 * would have done, and then undo it!
162 */ 157 */
163 if (mach_gettimeoffset) 158 nsec -= (hw_timer_offset() * 1000);
164 nsec -= (mach_gettimeoffset() * 1000);
165 159
166 wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); 160 wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
167 wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); 161 wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
diff --git a/arch/m68knommu/platform/5206/config.c b/arch/m68knommu/platform/5206/config.c
index d0f2dc5cb5a1..b3c4dd4cc135 100644
--- a/arch/m68knommu/platform/5206/config.c
+++ b/arch/m68knommu/platform/5206/config.c
@@ -10,13 +10,10 @@
10/***************************************************************************/ 10/***************************************************************************/
11 11
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/sched.h>
14#include <linux/param.h> 13#include <linux/param.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/interrupt.h> 15#include <linux/interrupt.h>
17#include <asm/irq.h>
18#include <asm/dma.h> 16#include <asm/dma.h>
19#include <asm/traps.h>
20#include <asm/machdep.h> 17#include <asm/machdep.h>
21#include <asm/coldfire.h> 18#include <asm/coldfire.h>
22#include <asm/mcftimer.h> 19#include <asm/mcftimer.h>
@@ -25,9 +22,6 @@
25 22
26/***************************************************************************/ 23/***************************************************************************/
27 24
28void coldfire_tick(void);
29void coldfire_timer_init(irq_handler_t handler);
30unsigned long coldfire_timer_offset(void);
31void coldfire_reset(void); 25void coldfire_reset(void);
32 26
33/***************************************************************************/ 27/***************************************************************************/
@@ -97,9 +91,6 @@ int mcf_timerirqpending(int timer)
97void config_BSP(char *commandp, int size) 91void config_BSP(char *commandp, int size)
98{ 92{
99 mcf_setimr(MCFSIM_IMR_MASKALL); 93 mcf_setimr(MCFSIM_IMR_MASKALL);
100 mach_sched_init = coldfire_timer_init;
101 mach_tick = coldfire_tick;
102 mach_gettimeoffset = coldfire_timer_offset;
103 mach_reset = coldfire_reset; 94 mach_reset = coldfire_reset;
104} 95}
105 96
diff --git a/arch/m68knommu/platform/5206e/config.c b/arch/m68knommu/platform/5206e/config.c
index 425703fb6cee..f84a4aea8cb6 100644
--- a/arch/m68knommu/platform/5206e/config.c
+++ b/arch/m68knommu/platform/5206e/config.c
@@ -9,23 +9,16 @@
9/***************************************************************************/ 9/***************************************************************************/
10 10
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/sched.h>
13#include <linux/param.h> 12#include <linux/param.h>
14#include <linux/interrupt.h> 13#include <linux/interrupt.h>
15#include <asm/irq.h>
16#include <asm/dma.h> 14#include <asm/dma.h>
17#include <asm/traps.h>
18#include <asm/machdep.h> 15#include <asm/machdep.h>
19#include <asm/coldfire.h> 16#include <asm/coldfire.h>
20#include <asm/mcftimer.h>
21#include <asm/mcfsim.h> 17#include <asm/mcfsim.h>
22#include <asm/mcfdma.h> 18#include <asm/mcfdma.h>
23 19
24/***************************************************************************/ 20/***************************************************************************/
25 21
26void coldfire_tick(void);
27void coldfire_timer_init(irq_handler_t handler);
28unsigned long coldfire_timer_offset(void);
29void coldfire_reset(void); 22void coldfire_reset(void);
30 23
31/***************************************************************************/ 24/***************************************************************************/
@@ -102,9 +95,6 @@ void config_BSP(char *commandp, int size)
102 commandp[size-1] = 0; 95 commandp[size-1] = 0;
103#endif /* CONFIG_NETtel */ 96#endif /* CONFIG_NETtel */
104 97
105 mach_sched_init = coldfire_timer_init;
106 mach_tick = coldfire_tick;
107 mach_gettimeoffset = coldfire_timer_offset;
108 mach_reset = coldfire_reset; 98 mach_reset = coldfire_reset;
109} 99}
110 100
diff --git a/arch/m68knommu/platform/520x/config.c b/arch/m68knommu/platform/520x/config.c
index a2c95bebd004..6edbd41261cc 100644
--- a/arch/m68knommu/platform/520x/config.c
+++ b/arch/m68knommu/platform/520x/config.c
@@ -27,9 +27,6 @@ unsigned int dma_device_address[MAX_M68K_DMA_CHANNELS];
27 27
28/***************************************************************************/ 28/***************************************************************************/
29 29
30void coldfire_pit_tick(void);
31void coldfire_pit_init(irq_handler_t handler);
32unsigned long coldfire_pit_offset(void);
33void coldfire_reset(void); 30void coldfire_reset(void);
34 31
35/***************************************************************************/ 32/***************************************************************************/
@@ -47,10 +44,7 @@ void mcf_autovector(unsigned int vec)
47 44
48void config_BSP(char *commandp, int size) 45void config_BSP(char *commandp, int size)
49{ 46{
50 mach_sched_init = coldfire_pit_init; 47 mach_reset = coldfire_reset;
51 mach_tick = coldfire_pit_tick;
52 mach_gettimeoffset = coldfire_pit_offset;
53 mach_reset = coldfire_reset;
54} 48}
55 49
56/***************************************************************************/ 50/***************************************************************************/
diff --git a/arch/m68knommu/platform/523x/config.c b/arch/m68knommu/platform/523x/config.c
index 0a3af05a434b..e7f80c8e8636 100644
--- a/arch/m68knommu/platform/523x/config.c
+++ b/arch/m68knommu/platform/523x/config.c
@@ -13,12 +13,10 @@
13/***************************************************************************/ 13/***************************************************************************/
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/sched.h>
17#include <linux/param.h> 16#include <linux/param.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/interrupt.h> 18#include <linux/interrupt.h>
20#include <asm/dma.h> 19#include <asm/dma.h>
21#include <asm/traps.h>
22#include <asm/machdep.h> 20#include <asm/machdep.h>
23#include <asm/coldfire.h> 21#include <asm/coldfire.h>
24#include <asm/mcfsim.h> 22#include <asm/mcfsim.h>
@@ -26,9 +24,6 @@
26 24
27/***************************************************************************/ 25/***************************************************************************/
28 26
29void coldfire_pit_tick(void);
30void coldfire_pit_init(irq_handler_t handler);
31unsigned long coldfire_pit_offset(void);
32void coldfire_reset(void); 27void coldfire_reset(void);
33 28
34/***************************************************************************/ 29/***************************************************************************/
@@ -62,9 +57,6 @@ void mcf_autovector(unsigned int vec)
62void config_BSP(char *commandp, int size) 57void config_BSP(char *commandp, int size)
63{ 58{
64 mcf_disableall(); 59 mcf_disableall();
65 mach_sched_init = coldfire_pit_init;
66 mach_tick = coldfire_pit_tick;
67 mach_gettimeoffset = coldfire_pit_offset;
68 mach_reset = coldfire_reset; 60 mach_reset = coldfire_reset;
69} 61}
70 62
diff --git a/arch/m68knommu/platform/5249/config.c b/arch/m68knommu/platform/5249/config.c
index dc2c362590c2..d4d39435cb15 100644
--- a/arch/m68knommu/platform/5249/config.c
+++ b/arch/m68knommu/platform/5249/config.c
@@ -9,24 +9,17 @@
9/***************************************************************************/ 9/***************************************************************************/
10 10
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/sched.h>
13#include <linux/param.h> 12#include <linux/param.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/interrupt.h> 14#include <linux/interrupt.h>
16#include <asm/irq.h>
17#include <asm/dma.h> 15#include <asm/dma.h>
18#include <asm/traps.h>
19#include <asm/machdep.h> 16#include <asm/machdep.h>
20#include <asm/coldfire.h> 17#include <asm/coldfire.h>
21#include <asm/mcftimer.h>
22#include <asm/mcfsim.h> 18#include <asm/mcfsim.h>
23#include <asm/mcfdma.h> 19#include <asm/mcfdma.h>
24 20
25/***************************************************************************/ 21/***************************************************************************/
26 22
27void coldfire_tick(void);
28void coldfire_timer_init(irq_handler_t handler);
29unsigned long coldfire_timer_offset(void);
30void coldfire_reset(void); 23void coldfire_reset(void);
31 24
32/***************************************************************************/ 25/***************************************************************************/
@@ -95,9 +88,6 @@ int mcf_timerirqpending(int timer)
95void config_BSP(char *commandp, int size) 88void config_BSP(char *commandp, int size)
96{ 89{
97 mcf_setimr(MCFSIM_IMR_MASKALL); 90 mcf_setimr(MCFSIM_IMR_MASKALL);
98 mach_sched_init = coldfire_timer_init;
99 mach_tick = coldfire_tick;
100 mach_gettimeoffset = coldfire_timer_offset;
101 mach_reset = coldfire_reset; 91 mach_reset = coldfire_reset;
102} 92}
103 93
diff --git a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c
index 1365a8300d5d..634a6375e4a5 100644
--- a/arch/m68knommu/platform/5272/config.c
+++ b/arch/m68knommu/platform/5272/config.c
@@ -10,24 +10,17 @@
10/***************************************************************************/ 10/***************************************************************************/
11 11
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/sched.h>
14#include <linux/param.h> 13#include <linux/param.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/interrupt.h> 15#include <linux/interrupt.h>
17#include <asm/irq.h>
18#include <asm/dma.h> 16#include <asm/dma.h>
19#include <asm/traps.h>
20#include <asm/machdep.h> 17#include <asm/machdep.h>
21#include <asm/coldfire.h> 18#include <asm/coldfire.h>
22#include <asm/mcftimer.h>
23#include <asm/mcfsim.h> 19#include <asm/mcfsim.h>
24#include <asm/mcfdma.h> 20#include <asm/mcfdma.h>
25 21
26/***************************************************************************/ 22/***************************************************************************/
27 23
28void coldfire_tick(void);
29void coldfire_timer_init(irq_handler_t handler);
30unsigned long coldfire_timer_offset(void);
31void coldfire_reset(void); 24void coldfire_reset(void);
32 25
33extern unsigned int mcf_timervector; 26extern unsigned int mcf_timervector;
@@ -128,9 +121,6 @@ void config_BSP(char *commandp, int size)
128 121
129 mcf_timervector = 69; 122 mcf_timervector = 69;
130 mcf_profilevector = 70; 123 mcf_profilevector = 70;
131 mach_sched_init = coldfire_timer_init;
132 mach_tick = coldfire_tick;
133 mach_gettimeoffset = coldfire_timer_offset;
134 mach_reset = coldfire_reset; 124 mach_reset = coldfire_reset;
135} 125}
136 126
diff --git a/arch/m68knommu/platform/527x/config.c b/arch/m68knommu/platform/527x/config.c
index 1b820441419a..9cbfbc68ae4f 100644
--- a/arch/m68knommu/platform/527x/config.c
+++ b/arch/m68knommu/platform/527x/config.c
@@ -13,12 +13,10 @@
13/***************************************************************************/ 13/***************************************************************************/
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/sched.h>
17#include <linux/param.h> 16#include <linux/param.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/interrupt.h> 18#include <linux/interrupt.h>
20#include <asm/dma.h> 19#include <asm/dma.h>
21#include <asm/traps.h>
22#include <asm/machdep.h> 20#include <asm/machdep.h>
23#include <asm/coldfire.h> 21#include <asm/coldfire.h>
24#include <asm/mcfsim.h> 22#include <asm/mcfsim.h>
@@ -26,9 +24,6 @@
26 24
27/***************************************************************************/ 25/***************************************************************************/
28 26
29void coldfire_pit_tick(void);
30void coldfire_pit_init(irq_handler_t handler);
31unsigned long coldfire_pit_offset(void);
32void coldfire_reset(void); 27void coldfire_reset(void);
33 28
34/***************************************************************************/ 29/***************************************************************************/
@@ -62,9 +57,6 @@ void mcf_autovector(unsigned int vec)
62void config_BSP(char *commandp, int size) 57void config_BSP(char *commandp, int size)
63{ 58{
64 mcf_disableall(); 59 mcf_disableall();
65 mach_sched_init = coldfire_pit_init;
66 mach_tick = coldfire_pit_tick;
67 mach_gettimeoffset = coldfire_pit_offset;
68 mach_reset = coldfire_reset; 60 mach_reset = coldfire_reset;
69} 61}
70 62
diff --git a/arch/m68knommu/platform/528x/config.c b/arch/m68knommu/platform/528x/config.c
index a089e9513699..acbd43486d97 100644
--- a/arch/m68knommu/platform/528x/config.c
+++ b/arch/m68knommu/platform/528x/config.c
@@ -13,12 +13,10 @@
13/***************************************************************************/ 13/***************************************************************************/
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/sched.h>
17#include <linux/param.h> 16#include <linux/param.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/interrupt.h> 18#include <linux/interrupt.h>
20#include <asm/dma.h> 19#include <asm/dma.h>
21#include <asm/traps.h>
22#include <asm/machdep.h> 20#include <asm/machdep.h>
23#include <asm/coldfire.h> 21#include <asm/coldfire.h>
24#include <asm/mcfsim.h> 22#include <asm/mcfsim.h>
@@ -26,9 +24,6 @@
26 24
27/***************************************************************************/ 25/***************************************************************************/
28 26
29void coldfire_pit_tick(void);
30void coldfire_pit_init(irq_handler_t handler);
31unsigned long coldfire_pit_offset(void);
32void coldfire_reset(void); 27void coldfire_reset(void);
33 28
34/***************************************************************************/ 29/***************************************************************************/
@@ -62,9 +57,6 @@ void mcf_autovector(unsigned int vec)
62void config_BSP(char *commandp, int size) 57void config_BSP(char *commandp, int size)
63{ 58{
64 mcf_disableall(); 59 mcf_disableall();
65 mach_sched_init = coldfire_pit_init;
66 mach_tick = coldfire_pit_tick;
67 mach_gettimeoffset = coldfire_pit_offset;
68 mach_reset = coldfire_reset; 60 mach_reset = coldfire_reset;
69} 61}
70 62
diff --git a/arch/m68knommu/platform/5307/config.c b/arch/m68knommu/platform/5307/config.c
index e3461619fd65..6040821e637d 100644
--- a/arch/m68knommu/platform/5307/config.c
+++ b/arch/m68knommu/platform/5307/config.c
@@ -10,25 +10,18 @@
10/***************************************************************************/ 10/***************************************************************************/
11 11
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/sched.h>
14#include <linux/param.h> 13#include <linux/param.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/interrupt.h> 15#include <linux/interrupt.h>
17#include <asm/irq.h>
18#include <asm/dma.h> 16#include <asm/dma.h>
19#include <asm/traps.h>
20#include <asm/machdep.h> 17#include <asm/machdep.h>
21#include <asm/coldfire.h> 18#include <asm/coldfire.h>
22#include <asm/mcftimer.h>
23#include <asm/mcfsim.h> 19#include <asm/mcfsim.h>
24#include <asm/mcfdma.h> 20#include <asm/mcfdma.h>
25#include <asm/mcfwdebug.h> 21#include <asm/mcfwdebug.h>
26 22
27/***************************************************************************/ 23/***************************************************************************/
28 24
29void coldfire_tick(void);
30void coldfire_timer_init(irq_handler_t handler);
31unsigned long coldfire_timer_offset(void);
32void coldfire_reset(void); 25void coldfire_reset(void);
33 26
34extern unsigned int mcf_timervector; 27extern unsigned int mcf_timervector;
@@ -122,9 +115,6 @@ void config_BSP(char *commandp, int size)
122 mcf_timerlevel = 6; 115 mcf_timerlevel = 6;
123#endif 116#endif
124 117
125 mach_sched_init = coldfire_timer_init;
126 mach_tick = coldfire_tick;
127 mach_gettimeoffset = coldfire_timer_offset;
128 mach_reset = coldfire_reset; 118 mach_reset = coldfire_reset;
129 119
130#ifdef MCF_BDM_DISABLE 120#ifdef MCF_BDM_DISABLE
diff --git a/arch/m68knommu/platform/5307/entry.S b/arch/m68knommu/platform/5307/entry.S
index a8cd867805ca..b333731b875a 100644
--- a/arch/m68knommu/platform/5307/entry.S
+++ b/arch/m68knommu/platform/5307/entry.S
@@ -74,7 +74,8 @@ ENTRY(system_call)
74 movel %sp,%d2 /* get thread_info pointer */ 74 movel %sp,%d2 /* get thread_info pointer */
75 andl #-THREAD_SIZE,%d2 /* at start of kernel stack */ 75 andl #-THREAD_SIZE,%d2 /* at start of kernel stack */
76 movel %d2,%a0 76 movel %d2,%a0
77 movel %sp,%a0@(THREAD_ESP0) /* save top of frame */ 77 movel %a0@,%a1 /* save top of frame */
78 movel %sp,%a1@(TASK_THREAD+THREAD_ESP0)
78 btst #(TIF_SYSCALL_TRACE%8),%a0@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8) 79 btst #(TIF_SYSCALL_TRACE%8),%a0@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8)
79 bnes 1f 80 bnes 1f
80 81
@@ -83,6 +84,8 @@ ENTRY(system_call)
83 movel %d0,%sp@(PT_D0) /* save the return value */ 84 movel %d0,%sp@(PT_D0) /* save the return value */
84 jra ret_from_exception 85 jra ret_from_exception
851: 861:
87 movel #-ENOSYS,%d2 /* strace needs -ENOSYS in PT_D0 */
88 movel %d2,PT_D0(%sp) /* on syscall entry */
86 subql #4,%sp 89 subql #4,%sp
87 SAVE_SWITCH_STACK 90 SAVE_SWITCH_STACK
88 jbsr syscall_trace 91 jbsr syscall_trace
diff --git a/arch/m68knommu/platform/5307/pit.c b/arch/m68knommu/platform/5307/pit.c
index f18352fa35a6..173b754d1cda 100644
--- a/arch/m68knommu/platform/5307/pit.c
+++ b/arch/m68knommu/platform/5307/pit.c
@@ -17,6 +17,7 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/irq.h> 19#include <linux/irq.h>
20#include <asm/machdep.h>
20#include <asm/io.h> 21#include <asm/io.h>
21#include <asm/coldfire.h> 22#include <asm/coldfire.h>
22#include <asm/mcfpit.h> 23#include <asm/mcfpit.h>
@@ -31,28 +32,30 @@
31 32
32/***************************************************************************/ 33/***************************************************************************/
33 34
34void coldfire_pit_tick(void) 35static irqreturn_t hw_tick(int irq, void *dummy)
35{ 36{
36 unsigned short pcsr; 37 unsigned short pcsr;
37 38
38 /* Reset the ColdFire timer */ 39 /* Reset the ColdFire timer */
39 pcsr = __raw_readw(TA(MCFPIT_PCSR)); 40 pcsr = __raw_readw(TA(MCFPIT_PCSR));
40 __raw_writew(pcsr | MCFPIT_PCSR_PIF, TA(MCFPIT_PCSR)); 41 __raw_writew(pcsr | MCFPIT_PCSR_PIF, TA(MCFPIT_PCSR));
42
43 return arch_timer_interrupt(irq, dummy);
41} 44}
42 45
43/***************************************************************************/ 46/***************************************************************************/
44 47
45static struct irqaction coldfire_pit_irq = { 48static struct irqaction coldfire_pit_irq = {
46 .name = "timer", 49 .name = "timer",
47 .flags = IRQF_DISABLED | IRQF_TIMER, 50 .flags = IRQF_DISABLED | IRQF_TIMER,
51 .handler = hw_tick,
48}; 52};
49 53
50void coldfire_pit_init(irq_handler_t handler) 54void hw_timer_init(void)
51{ 55{
52 volatile unsigned char *icrp; 56 volatile unsigned char *icrp;
53 volatile unsigned long *imrp; 57 volatile unsigned long *imrp;
54 58
55 coldfire_pit_irq.handler = handler;
56 setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &coldfire_pit_irq); 59 setup_irq(MCFINT_VECBASE + MCFINT_PIT1, &coldfire_pit_irq);
57 60
58 icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 + 61 icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 +
@@ -71,7 +74,7 @@ void coldfire_pit_init(irq_handler_t handler)
71 74
72/***************************************************************************/ 75/***************************************************************************/
73 76
74unsigned long coldfire_pit_offset(void) 77unsigned long hw_timer_offset(void)
75{ 78{
76 volatile unsigned long *ipr; 79 volatile unsigned long *ipr;
77 unsigned long pmr, pcntr, offset; 80 unsigned long pmr, pcntr, offset;
diff --git a/arch/m68knommu/platform/5307/timers.c b/arch/m68knommu/platform/5307/timers.c
index 64bd0ff9029e..489dec85c859 100644
--- a/arch/m68knommu/platform/5307/timers.c
+++ b/arch/m68knommu/platform/5307/timers.c
@@ -9,10 +9,9 @@
9/***************************************************************************/ 9/***************************************************************************/
10 10
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/init.h>
12#include <linux/sched.h> 13#include <linux/sched.h>
13#include <linux/param.h>
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/init.h>
16#include <linux/irq.h> 15#include <linux/irq.h>
17#include <asm/io.h> 16#include <asm/io.h>
18#include <asm/traps.h> 17#include <asm/traps.h>
@@ -54,24 +53,28 @@ extern int mcf_timerirqpending(int timer);
54 53
55/***************************************************************************/ 54/***************************************************************************/
56 55
57void coldfire_tick(void) 56static irqreturn_t hw_tick(int irq, void *dummy)
58{ 57{
59 /* Reset the ColdFire timer */ 58 /* Reset the ColdFire timer */
60 __raw_writeb(MCFTIMER_TER_CAP | MCFTIMER_TER_REF, TA(MCFTIMER_TER)); 59 __raw_writeb(MCFTIMER_TER_CAP | MCFTIMER_TER_REF, TA(MCFTIMER_TER));
60
61 return arch_timer_interrupt(irq, dummy);
61} 62}
62 63
63/***************************************************************************/ 64/***************************************************************************/
64 65
65static struct irqaction coldfire_timer_irq = { 66static struct irqaction coldfire_timer_irq = {
66 .name = "timer", 67 .name = "timer",
67 .flags = IRQF_DISABLED | IRQF_TIMER, 68 .flags = IRQF_DISABLED | IRQF_TIMER,
69 .handler = hw_tick,
68}; 70};
69 71
72/***************************************************************************/
73
70static int ticks_per_intr; 74static int ticks_per_intr;
71 75
72void coldfire_timer_init(irq_handler_t handler) 76void hw_timer_init(void)
73{ 77{
74 coldfire_timer_irq.handler = handler;
75 setup_irq(mcf_timervector, &coldfire_timer_irq); 78 setup_irq(mcf_timervector, &coldfire_timer_irq);
76 79
77 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); 80 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR));
@@ -89,7 +92,7 @@ void coldfire_timer_init(irq_handler_t handler)
89 92
90/***************************************************************************/ 93/***************************************************************************/
91 94
92unsigned long coldfire_timer_offset(void) 95unsigned long hw_timer_offset(void)
93{ 96{
94 unsigned long tcn, offset; 97 unsigned long tcn, offset;
95 98
diff --git a/arch/m68knommu/platform/532x/config.c b/arch/m68knommu/platform/532x/config.c
index b32c6425f821..f77328b7b6db 100644
--- a/arch/m68knommu/platform/532x/config.c
+++ b/arch/m68knommu/platform/532x/config.c
@@ -18,25 +18,18 @@
18/***************************************************************************/ 18/***************************************************************************/
19 19
20#include <linux/kernel.h> 20#include <linux/kernel.h>
21#include <linux/sched.h>
22#include <linux/param.h> 21#include <linux/param.h>
23#include <linux/init.h> 22#include <linux/init.h>
24#include <linux/interrupt.h> 23#include <linux/interrupt.h>
25#include <asm/irq.h>
26#include <asm/dma.h> 24#include <asm/dma.h>
27#include <asm/traps.h>
28#include <asm/machdep.h> 25#include <asm/machdep.h>
29#include <asm/coldfire.h> 26#include <asm/coldfire.h>
30#include <asm/mcftimer.h>
31#include <asm/mcfsim.h> 27#include <asm/mcfsim.h>
32#include <asm/mcfdma.h> 28#include <asm/mcfdma.h>
33#include <asm/mcfwdebug.h> 29#include <asm/mcfwdebug.h>
34 30
35/***************************************************************************/ 31/***************************************************************************/
36 32
37void coldfire_tick(void);
38void coldfire_timer_init(irq_handler_t handler);
39unsigned long coldfire_timer_offset(void);
40void coldfire_reset(void); 33void coldfire_reset(void);
41 34
42extern unsigned int mcf_timervector; 35extern unsigned int mcf_timervector;
@@ -104,9 +97,6 @@ void config_BSP(char *commandp, int size)
104 97
105 mcf_timervector = 64+32; 98 mcf_timervector = 64+32;
106 mcf_profilevector = 64+33; 99 mcf_profilevector = 64+33;
107 mach_sched_init = coldfire_timer_init;
108 mach_tick = coldfire_tick;
109 mach_gettimeoffset = coldfire_timer_offset;
110 mach_reset = coldfire_reset; 100 mach_reset = coldfire_reset;
111 101
112#ifdef MCF_BDM_DISABLE 102#ifdef MCF_BDM_DISABLE
diff --git a/arch/m68knommu/platform/5407/config.c b/arch/m68knommu/platform/5407/config.c
index e692536817d8..2d3b62eba7ca 100644
--- a/arch/m68knommu/platform/5407/config.c
+++ b/arch/m68knommu/platform/5407/config.c
@@ -10,24 +10,17 @@
10/***************************************************************************/ 10/***************************************************************************/
11 11
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/sched.h>
14#include <linux/param.h> 13#include <linux/param.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/interrupt.h> 15#include <linux/interrupt.h>
17#include <asm/irq.h>
18#include <asm/dma.h> 16#include <asm/dma.h>
19#include <asm/traps.h>
20#include <asm/machdep.h> 17#include <asm/machdep.h>
21#include <asm/coldfire.h> 18#include <asm/coldfire.h>
22#include <asm/mcftimer.h>
23#include <asm/mcfsim.h> 19#include <asm/mcfsim.h>
24#include <asm/mcfdma.h> 20#include <asm/mcfdma.h>
25 21
26/***************************************************************************/ 22/***************************************************************************/
27 23
28void coldfire_tick(void);
29void coldfire_timer_init(irq_handler_t handler);
30unsigned long coldfire_timer_offset(void);
31void coldfire_reset(void); 24void coldfire_reset(void);
32 25
33extern unsigned int mcf_timervector; 26extern unsigned int mcf_timervector;
@@ -108,9 +101,6 @@ void config_BSP(char *commandp, int size)
108 mcf_timerlevel = 6; 101 mcf_timerlevel = 6;
109#endif 102#endif
110 103
111 mach_sched_init = coldfire_timer_init;
112 mach_tick = coldfire_tick;
113 mach_gettimeoffset = coldfire_timer_offset;
114 mach_reset = coldfire_reset; 104 mach_reset = coldfire_reset;
115} 105}
116 106
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index d1bd0f08a331..e4f579c3e245 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -1602,8 +1602,8 @@ static void cyz_handle_tx(struct cyclades_port *info,
1602 info->icount.tx++; 1602 info->icount.tx++;
1603 } 1603 }
1604#endif 1604#endif
1605ztxdone:
1606 tty_wakeup(tty); 1605 tty_wakeup(tty);
1606ztxdone:
1607 /* Update tx_put */ 1607 /* Update tx_put */
1608 cy_writel(&buf_ctrl->tx_put, tx_put); 1608 cy_writel(&buf_ctrl->tx_put, tx_put);
1609 } 1609 }
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 927cb34c4805..7c426d07a555 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -274,7 +274,7 @@ static int write_sb_page(struct bitmap *bitmap, struct page *page, int wait)
274 if (bitmap->offset < 0) { 274 if (bitmap->offset < 0) {
275 /* DATA BITMAP METADATA */ 275 /* DATA BITMAP METADATA */
276 if (bitmap->offset 276 if (bitmap->offset
277 + page->index * (PAGE_SIZE/512) 277 + (long)(page->index * (PAGE_SIZE/512))
278 + size/512 > 0) 278 + size/512 > 0)
279 /* bitmap runs in to metadata */ 279 /* bitmap runs in to metadata */
280 return -EINVAL; 280 return -EINVAL;
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 8ee181a01f52..80a67d789b72 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -376,7 +376,12 @@ static unsigned long get_stripe_work(struct stripe_head *sh)
376 ack++; 376 ack++;
377 377
378 sh->ops.count -= ack; 378 sh->ops.count -= ack;
379 BUG_ON(sh->ops.count < 0); 379 if (unlikely(sh->ops.count < 0)) {
380 printk(KERN_ERR "pending: %#lx ops.pending: %#lx ops.ack: %#lx "
381 "ops.complete: %#lx\n", pending, sh->ops.pending,
382 sh->ops.ack, sh->ops.complete);
383 BUG();
384 }
380 385
381 return pending; 386 return pending;
382} 387}
@@ -550,8 +555,7 @@ static void ops_complete_biofill(void *stripe_head_ref)
550 } 555 }
551 } 556 }
552 } 557 }
553 clear_bit(STRIPE_OP_BIOFILL, &sh->ops.ack); 558 set_bit(STRIPE_OP_BIOFILL, &sh->ops.complete);
554 clear_bit(STRIPE_OP_BIOFILL, &sh->ops.pending);
555 559
556 return_io(return_bi); 560 return_io(return_bi);
557 561
@@ -2893,6 +2897,13 @@ static void handle_stripe6(struct stripe_head *sh, struct page *tmp_page)
2893 s.expanded = test_bit(STRIPE_EXPAND_READY, &sh->state); 2897 s.expanded = test_bit(STRIPE_EXPAND_READY, &sh->state);
2894 /* Now to look around and see what can be done */ 2898 /* Now to look around and see what can be done */
2895 2899
2900 /* clean-up completed biofill operations */
2901 if (test_bit(STRIPE_OP_BIOFILL, &sh->ops.complete)) {
2902 clear_bit(STRIPE_OP_BIOFILL, &sh->ops.pending);
2903 clear_bit(STRIPE_OP_BIOFILL, &sh->ops.ack);
2904 clear_bit(STRIPE_OP_BIOFILL, &sh->ops.complete);
2905 }
2906
2896 rcu_read_lock(); 2907 rcu_read_lock();
2897 for (i=disks; i--; ) { 2908 for (i=disks; i--; ) {
2898 mdk_rdev_t *rdev; 2909 mdk_rdev_t *rdev;
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index 2b5782056dda..0fbf1bbbaee9 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -751,13 +751,11 @@ mii_queue(struct net_device *dev, int regval, void (*func)(uint, struct net_devi
751 if (mii_head) { 751 if (mii_head) {
752 mii_tail->mii_next = mip; 752 mii_tail->mii_next = mip;
753 mii_tail = mip; 753 mii_tail = mip;
754 } 754 } else {
755 else {
756 mii_head = mii_tail = mip; 755 mii_head = mii_tail = mip;
757 fep->hwp->fec_mii_data = regval; 756 fep->hwp->fec_mii_data = regval;
758 } 757 }
759 } 758 } else {
760 else {
761 retval = 1; 759 retval = 1;
762 } 760 }
763 761
@@ -768,14 +766,11 @@ mii_queue(struct net_device *dev, int regval, void (*func)(uint, struct net_devi
768 766
769static void mii_do_cmd(struct net_device *dev, const phy_cmd_t *c) 767static void mii_do_cmd(struct net_device *dev, const phy_cmd_t *c)
770{ 768{
771 int k;
772
773 if(!c) 769 if(!c)
774 return; 770 return;
775 771
776 for(k = 0; (c+k)->mii_data != mk_mii_end; k++) { 772 for (; c->mii_data != mk_mii_end; c++)
777 mii_queue(dev, (c+k)->mii_data, (c+k)->funct); 773 mii_queue(dev, c->mii_data, c->funct);
778 }
779} 774}
780 775
781static void mii_parse_sr(uint mii_reg, struct net_device *dev) 776static void mii_parse_sr(uint mii_reg, struct net_device *dev)
@@ -792,7 +787,6 @@ static void mii_parse_sr(uint mii_reg, struct net_device *dev)
792 status |= PHY_STAT_FAULT; 787 status |= PHY_STAT_FAULT;
793 if (mii_reg & 0x0020) 788 if (mii_reg & 0x0020)
794 status |= PHY_STAT_ANC; 789 status |= PHY_STAT_ANC;
795
796 *s = status; 790 *s = status;
797} 791}
798 792
@@ -1239,7 +1233,6 @@ mii_link_interrupt(int irq, void * dev_id);
1239#endif 1233#endif
1240 1234
1241#if defined(CONFIG_M5272) 1235#if defined(CONFIG_M5272)
1242
1243/* 1236/*
1244 * Code specific to Coldfire 5272 setup. 1237 * Code specific to Coldfire 5272 setup.
1245 */ 1238 */
@@ -2020,8 +2013,7 @@ static void mii_relink(struct work_struct *work)
2020 & (PHY_STAT_100FDX | PHY_STAT_10FDX)) 2013 & (PHY_STAT_100FDX | PHY_STAT_10FDX))
2021 duplex = 1; 2014 duplex = 1;
2022 fec_restart(dev, duplex); 2015 fec_restart(dev, duplex);
2023 } 2016 } else
2024 else
2025 fec_stop(dev); 2017 fec_stop(dev);
2026 2018
2027#if 0 2019#if 0
@@ -2119,8 +2111,7 @@ mii_discover_phy(uint mii_reg, struct net_device *dev)
2119 fep->phy_id = phytype << 16; 2111 fep->phy_id = phytype << 16;
2120 mii_queue(dev, mk_mii_read(MII_REG_PHYIR2), 2112 mii_queue(dev, mk_mii_read(MII_REG_PHYIR2),
2121 mii_discover_phy3); 2113 mii_discover_phy3);
2122 } 2114 } else {
2123 else {
2124 fep->phy_addr++; 2115 fep->phy_addr++;
2125 mii_queue(dev, mk_mii_read(MII_REG_PHYIR1), 2116 mii_queue(dev, mk_mii_read(MII_REG_PHYIR1),
2126 mii_discover_phy); 2117 mii_discover_phy);
@@ -2574,8 +2565,7 @@ fec_restart(struct net_device *dev, int duplex)
2574 if (duplex) { 2565 if (duplex) {
2575 fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x04;/* MII enable */ 2566 fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x04;/* MII enable */
2576 fecp->fec_x_cntrl = 0x04; /* FD enable */ 2567 fecp->fec_x_cntrl = 0x04; /* FD enable */
2577 } 2568 } else {
2578 else {
2579 /* MII enable|No Rcv on Xmit */ 2569 /* MII enable|No Rcv on Xmit */
2580 fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x06; 2570 fecp->fec_r_cntrl = OPT_FRAME_SIZE | 0x06;
2581 fecp->fec_x_cntrl = 0x00; 2571 fecp->fec_x_cntrl = 0x00;
diff --git a/drivers/serial/mcf.c b/drivers/serial/mcf.c
new file mode 100644
index 000000000000..a7d4360ea7df
--- /dev/null
+++ b/drivers/serial/mcf.c
@@ -0,0 +1,653 @@
1/****************************************************************************/
2
3/*
4 * mcf.c -- Freescale ColdFire UART driver
5 *
6 * (C) Copyright 2003-2007, Greg Ungerer <gerg@snapgear.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 */
13
14/****************************************************************************/
15
16#include <linux/kernel.h>
17#include <linux/init.h>
18#include <linux/interrupt.h>
19#include <linux/module.h>
20#include <linux/console.h>
21#include <linux/tty.h>
22#include <linux/tty_flip.h>
23#include <linux/serial.h>
24#include <linux/serial_core.h>
25#include <linux/io.h>
26#include <asm/coldfire.h>
27#include <asm/mcfsim.h>
28#include <asm/mcfuart.h>
29#include <asm/nettel.h>
30
31/****************************************************************************/
32
33/*
34 * Some boards implement the DTR/DCD lines using GPIO lines, most
35 * don't. Dummy out the access macros for those that don't. Those
36 * that do should define these macros somewhere in there board
37 * specific inlude files.
38 */
39#if !defined(mcf_getppdcd)
40#define mcf_getppdcd(p) (1)
41#endif
42#if !defined(mcf_getppdtr)
43#define mcf_getppdtr(p) (1)
44#endif
45#if !defined(mcf_setppdtr)
46#define mcf_setppdtr(p, v) do { } while (0)
47#endif
48
49/****************************************************************************/
50
51/*
52 * Local per-uart structure.
53 */
54struct mcf_uart {
55 struct uart_port port;
56 unsigned int sigs; /* Local copy of line sigs */
57 unsigned char imr; /* Local IMR mirror */
58};
59
60/****************************************************************************/
61
62static unsigned int mcf_tx_empty(struct uart_port *port)
63{
64 return (readb(port->membase + MCFUART_USR) & MCFUART_USR_TXEMPTY) ?
65 TIOCSER_TEMT : 0;
66}
67
68/****************************************************************************/
69
70static unsigned int mcf_get_mctrl(struct uart_port *port)
71{
72 struct mcf_uart *pp = (struct mcf_uart *) port;
73 unsigned long flags;
74 unsigned int sigs;
75
76 spin_lock_irqsave(&port->lock, flags);
77 sigs = (readb(port->membase + MCFUART_UIPR) & MCFUART_UIPR_CTS) ?
78 0 : TIOCM_CTS;
79 sigs |= (pp->sigs & TIOCM_RTS);
80 sigs |= (mcf_getppdcd(port->line) ? TIOCM_CD : 0);
81 sigs |= (mcf_getppdtr(port->line) ? TIOCM_DTR : 0);
82 spin_unlock_irqrestore(&port->lock, flags);
83 return sigs;
84}
85
86/****************************************************************************/
87
88static void mcf_set_mctrl(struct uart_port *port, unsigned int sigs)
89{
90 struct mcf_uart *pp = (struct mcf_uart *) port;
91 unsigned long flags;
92
93 spin_lock_irqsave(&port->lock, flags);
94 pp->sigs = sigs;
95 mcf_setppdtr(port->line, (sigs & TIOCM_DTR));
96 if (sigs & TIOCM_RTS)
97 writeb(MCFUART_UOP_RTS, port->membase + MCFUART_UOP1);
98 else
99 writeb(MCFUART_UOP_RTS, port->membase + MCFUART_UOP0);
100 spin_unlock_irqrestore(&port->lock, flags);
101}
102
103/****************************************************************************/
104
105static void mcf_start_tx(struct uart_port *port)
106{
107 struct mcf_uart *pp = (struct mcf_uart *) port;
108 unsigned long flags;
109
110 spin_lock_irqsave(&port->lock, flags);
111 pp->imr |= MCFUART_UIR_TXREADY;
112 writeb(pp->imr, port->membase + MCFUART_UIMR);
113 spin_unlock_irqrestore(&port->lock, flags);
114}
115
116/****************************************************************************/
117
118static void mcf_stop_tx(struct uart_port *port)
119{
120 struct mcf_uart *pp = (struct mcf_uart *) port;
121 unsigned long flags;
122
123 spin_lock_irqsave(&port->lock, flags);
124 pp->imr &= ~MCFUART_UIR_TXREADY;
125 writeb(pp->imr, port->membase + MCFUART_UIMR);
126 spin_unlock_irqrestore(&port->lock, flags);
127}
128
129/****************************************************************************/
130
131static void mcf_stop_rx(struct uart_port *port)
132{
133 struct mcf_uart *pp = (struct mcf_uart *) port;
134 unsigned long flags;
135
136 spin_lock_irqsave(&port->lock, flags);
137 pp->imr &= ~MCFUART_UIR_RXREADY;
138 writeb(pp->imr, port->membase + MCFUART_UIMR);
139 spin_unlock_irqrestore(&port->lock, flags);
140}
141
142/****************************************************************************/
143
144static void mcf_break_ctl(struct uart_port *port, int break_state)
145{
146 unsigned long flags;
147
148 spin_lock_irqsave(&port->lock, flags);
149 if (break_state == -1)
150 writeb(MCFUART_UCR_CMDBREAKSTART, port->membase + MCFUART_UCR);
151 else
152 writeb(MCFUART_UCR_CMDBREAKSTOP, port->membase + MCFUART_UCR);
153 spin_unlock_irqrestore(&port->lock, flags);
154}
155
156/****************************************************************************/
157
158static void mcf_enable_ms(struct uart_port *port)
159{
160}
161
162/****************************************************************************/
163
164static int mcf_startup(struct uart_port *port)
165{
166 struct mcf_uart *pp = (struct mcf_uart *) port;
167 unsigned long flags;
168
169 spin_lock_irqsave(&port->lock, flags);
170
171 /* Reset UART, get it into known state... */
172 writeb(MCFUART_UCR_CMDRESETRX, port->membase + MCFUART_UCR);
173 writeb(MCFUART_UCR_CMDRESETTX, port->membase + MCFUART_UCR);
174
175 /* Enable the UART transmitter and receiver */
176 writeb(MCFUART_UCR_RXENABLE | MCFUART_UCR_TXENABLE,
177 port->membase + MCFUART_UCR);
178
179 /* Enable RX interrupts now */
180 pp->imr = MCFUART_UIR_RXREADY;
181 writeb(pp->imr, port->membase + MCFUART_UIMR);
182
183 spin_unlock_irqrestore(&port->lock, flags);
184
185 return 0;
186}
187
188/****************************************************************************/
189
190static void mcf_shutdown(struct uart_port *port)
191{
192 struct mcf_uart *pp = (struct mcf_uart *) port;
193 unsigned long flags;
194
195 spin_lock_irqsave(&port->lock, flags);
196
197 /* Disable all interrupts now */
198 pp->imr = 0;
199 writeb(pp->imr, port->membase + MCFUART_UIMR);
200
201 /* Disable UART transmitter and receiver */
202 writeb(MCFUART_UCR_CMDRESETRX, port->membase + MCFUART_UCR);
203 writeb(MCFUART_UCR_CMDRESETTX, port->membase + MCFUART_UCR);
204
205 spin_unlock_irqrestore(&port->lock, flags);
206}
207
208/****************************************************************************/
209
210static void mcf_set_termios(struct uart_port *port, struct ktermios *termios,
211 struct ktermios *old)
212{
213 unsigned long flags;
214 unsigned int baud, baudclk;
215 unsigned char mr1, mr2;
216
217 baud = uart_get_baud_rate(port, termios, old, 0, 230400);
218 baudclk = ((MCF_BUSCLK / baud) + 16) / 32;
219
220 mr1 = MCFUART_MR1_RXIRQRDY | MCFUART_MR1_RXERRCHAR;
221 mr2 = 0;
222
223 switch (termios->c_cflag & CSIZE) {
224 case CS5: mr1 |= MCFUART_MR1_CS5; break;
225 case CS6: mr1 |= MCFUART_MR1_CS6; break;
226 case CS7: mr1 |= MCFUART_MR1_CS7; break;
227 case CS8:
228 default: mr1 |= MCFUART_MR1_CS8; break;
229 }
230
231 if (termios->c_cflag & PARENB) {
232 if (termios->c_cflag & CMSPAR) {
233 if (termios->c_cflag & PARODD)
234 mr1 |= MCFUART_MR1_PARITYMARK;
235 else
236 mr1 |= MCFUART_MR1_PARITYSPACE;
237 } else {
238 if (termios->c_cflag & PARODD)
239 mr1 |= MCFUART_MR1_PARITYODD;
240 else
241 mr1 |= MCFUART_MR1_PARITYEVEN;
242 }
243 } else {
244 mr1 |= MCFUART_MR1_PARITYNONE;
245 }
246
247 if (termios->c_cflag & CSTOPB)
248 mr2 |= MCFUART_MR2_STOP2;
249 else
250 mr2 |= MCFUART_MR2_STOP1;
251
252 if (termios->c_cflag & CRTSCTS) {
253 mr1 |= MCFUART_MR1_RXRTS;
254 mr2 |= MCFUART_MR2_TXCTS;
255 }
256
257 spin_lock_irqsave(&port->lock, flags);
258 writeb(MCFUART_UCR_CMDRESETRX, port->membase + MCFUART_UCR);
259 writeb(MCFUART_UCR_CMDRESETTX, port->membase + MCFUART_UCR);
260 writeb(MCFUART_UCR_CMDRESETMRPTR, port->membase + MCFUART_UCR);
261 writeb(mr1, port->membase + MCFUART_UMR);
262 writeb(mr2, port->membase + MCFUART_UMR);
263 writeb((baudclk & 0xff00) >> 8, port->membase + MCFUART_UBG1);
264 writeb((baudclk & 0xff), port->membase + MCFUART_UBG2);
265 writeb(MCFUART_UCSR_RXCLKTIMER | MCFUART_UCSR_TXCLKTIMER,
266 port->membase + MCFUART_UCSR);
267 writeb(MCFUART_UCR_RXENABLE | MCFUART_UCR_TXENABLE,
268 port->membase + MCFUART_UCR);
269 spin_unlock_irqrestore(&port->lock, flags);
270}
271
272/****************************************************************************/
273
274static void mcf_rx_chars(struct mcf_uart *pp)
275{
276 struct uart_port *port = (struct uart_port *) pp;
277 unsigned char status, ch, flag;
278
279 while ((status = readb(port->membase + MCFUART_USR)) & MCFUART_USR_RXREADY) {
280 ch = readb(port->membase + MCFUART_URB);
281 flag = TTY_NORMAL;
282 port->icount.rx++;
283
284 if (status & MCFUART_USR_RXERR) {
285 writeb(MCFUART_UCR_CMDRESETERR,
286 port->membase + MCFUART_UCR);
287
288 if (status & MCFUART_USR_RXBREAK) {
289 port->icount.brk++;
290 if (uart_handle_break(port))
291 continue;
292 } else if (status & MCFUART_USR_RXPARITY) {
293 port->icount.parity++;
294 } else if (status & MCFUART_USR_RXOVERRUN) {
295 port->icount.overrun++;
296 } else if (status & MCFUART_USR_RXFRAMING) {
297 port->icount.frame++;
298 }
299
300 status &= port->read_status_mask;
301
302 if (status & MCFUART_USR_RXBREAK)
303 flag = TTY_BREAK;
304 else if (status & MCFUART_USR_RXPARITY)
305 flag = TTY_PARITY;
306 else if (status & MCFUART_USR_RXFRAMING)
307 flag = TTY_FRAME;
308 }
309
310 if (uart_handle_sysrq_char(port, ch))
311 continue;
312 uart_insert_char(port, status, MCFUART_USR_RXOVERRUN, ch, flag);
313 }
314
315 tty_flip_buffer_push(port->info->tty);
316}
317
318/****************************************************************************/
319
320static void mcf_tx_chars(struct mcf_uart *pp)
321{
322 struct uart_port *port = (struct uart_port *) pp;
323 struct circ_buf *xmit = &port->info->xmit;
324
325 if (port->x_char) {
326 /* Send special char - probably flow control */
327 writeb(port->x_char, port->membase + MCFUART_UTB);
328 port->x_char = 0;
329 port->icount.tx++;
330 return;
331 }
332
333 while (readb(port->membase + MCFUART_USR) & MCFUART_USR_TXREADY) {
334 if (xmit->head == xmit->tail)
335 break;
336 writeb(xmit->buf[xmit->tail], port->membase + MCFUART_UTB);
337 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE -1);
338 port->icount.tx++;
339 }
340
341 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
342 uart_write_wakeup(port);
343
344 if (xmit->head == xmit->tail) {
345 pp->imr &= ~MCFUART_UIR_TXREADY;
346 writeb(pp->imr, port->membase + MCFUART_UIMR);
347 }
348}
349
350/****************************************************************************/
351
352static irqreturn_t mcf_interrupt(int irq, void *data)
353{
354 struct uart_port *port = data;
355 struct mcf_uart *pp = (struct mcf_uart *) port;
356 unsigned int isr;
357
358 isr = readb(port->membase + MCFUART_UISR) & pp->imr;
359 if (isr & MCFUART_UIR_RXREADY)
360 mcf_rx_chars(pp);
361 if (isr & MCFUART_UIR_TXREADY)
362 mcf_tx_chars(pp);
363 return IRQ_HANDLED;
364}
365
366/****************************************************************************/
367
368static void mcf_config_port(struct uart_port *port, int flags)
369{
370 port->type = PORT_MCF;
371
372 /* Clear mask, so no surprise interrupts. */
373 writeb(0, port->membase + MCFUART_UIMR);
374
375 if (request_irq(port->irq, mcf_interrupt, IRQF_DISABLED, "UART", port))
376 printk(KERN_ERR "MCF: unable to attach ColdFire UART %d "
377 "interrupt vector=%d\n", port->line, port->irq);
378}
379
380/****************************************************************************/
381
382static const char *mcf_type(struct uart_port *port)
383{
384 return (port->type == PORT_MCF) ? "ColdFire UART" : NULL;
385}
386
387/****************************************************************************/
388
389static int mcf_request_port(struct uart_port *port)
390{
391 /* UARTs always present */
392 return 0;
393}
394
395/****************************************************************************/
396
397static void mcf_release_port(struct uart_port *port)
398{
399 /* Nothing to release... */
400}
401
402/****************************************************************************/
403
404static int mcf_verify_port(struct uart_port *port, struct serial_struct *ser)
405{
406 if ((ser->type != PORT_UNKNOWN) && (ser->type != PORT_MCF))
407 return -EINVAL;
408 return 0;
409}
410
411/****************************************************************************/
412
413/*
414 * Define the basic serial functions we support.
415 */
416static struct uart_ops mcf_uart_ops = {
417 .tx_empty = mcf_tx_empty,
418 .get_mctrl = mcf_get_mctrl,
419 .set_mctrl = mcf_set_mctrl,
420 .start_tx = mcf_start_tx,
421 .stop_tx = mcf_stop_tx,
422 .stop_rx = mcf_stop_rx,
423 .enable_ms = mcf_enable_ms,
424 .break_ctl = mcf_break_ctl,
425 .startup = mcf_startup,
426 .shutdown = mcf_shutdown,
427 .set_termios = mcf_set_termios,
428 .type = mcf_type,
429 .request_port = mcf_request_port,
430 .release_port = mcf_release_port,
431 .config_port = mcf_config_port,
432 .verify_port = mcf_verify_port,
433};
434
435static struct mcf_uart mcf_ports[3];
436
437#define MCF_MAXPORTS (sizeof(mcf_ports) / sizeof(struct mcf_uart))
438
439/****************************************************************************/
440#if defined(CONFIG_SERIAL_MCF_CONSOLE)
441/****************************************************************************/
442
443int __init early_mcf_setup(struct mcf_platform_uart *platp)
444{
445 struct uart_port *port;
446 int i;
447
448 for (i = 0; ((i < MCF_MAXPORTS) && (platp[i].mapbase)); i++) {
449 port = &mcf_ports[i].port;
450
451 port->line = i;
452 port->type = PORT_MCF;
453 port->mapbase = platp[i].mapbase;
454 port->membase = (platp[i].membase) ? platp[i].membase :
455 (unsigned char __iomem *) port->mapbase;
456 port->iotype = SERIAL_IO_MEM;
457 port->irq = platp[i].irq;
458 port->uartclk = MCF_BUSCLK;
459 port->flags = ASYNC_BOOT_AUTOCONF;
460 port->ops = &mcf_uart_ops;
461 }
462
463 return 0;
464}
465
466/****************************************************************************/
467
468static void mcf_console_putc(struct console *co, const char c)
469{
470 struct uart_port *port = &(mcf_ports + co->index)->port;
471 int i;
472
473 for (i = 0; (i < 0x10000); i++) {
474 if (readb(port->membase + MCFUART_USR) & MCFUART_USR_TXREADY)
475 break;
476 }
477 writeb(c, port->membase + MCFUART_UTB);
478 for (i = 0; (i < 0x10000); i++) {
479 if (readb(port->membase + MCFUART_USR) & MCFUART_USR_TXREADY)
480 break;
481 }
482}
483
484/****************************************************************************/
485
486static void mcf_console_write(struct console *co, const char *s, unsigned int count)
487{
488 for (; (count); count--, s++) {
489 mcf_console_putc(co, *s);
490 if (*s == '\n')
491 mcf_console_putc(co, '\r');
492 }
493}
494
495/****************************************************************************/
496
497static int __init mcf_console_setup(struct console *co, char *options)
498{
499 struct uart_port *port;
500 int baud = CONFIG_SERIAL_MCF_BAUDRATE;
501 int bits = 8;
502 int parity = 'n';
503 int flow = 'n';
504
505 if ((co->index >= 0) && (co->index <= MCF_MAXPORTS))
506 co->index = 0;
507 port = &mcf_ports[co->index].port;
508 if (port->membase == 0)
509 return -ENODEV;
510
511 if (options)
512 uart_parse_options(options, &baud, &parity, &bits, &flow);
513
514 return uart_set_options(port, co, baud, parity, bits, flow);
515}
516
517/****************************************************************************/
518
519static struct uart_driver mcf_driver;
520
521static struct console mcf_console = {
522 .name = "ttyS",
523 .write = mcf_console_write,
524 .device = uart_console_device,
525 .setup = mcf_console_setup,
526 .flags = CON_PRINTBUFFER,
527 .index = -1,
528 .data = &mcf_driver,
529};
530
531static int __init mcf_console_init(void)
532{
533 register_console(&mcf_console);
534 return 0;
535}
536
537console_initcall(mcf_console_init);
538
539#define MCF_CONSOLE &mcf_console
540
541/****************************************************************************/
542#else
543/****************************************************************************/
544
545#define MCF_CONSOLE NULL
546
547/****************************************************************************/
548#endif /* CONFIG_MCF_CONSOLE */
549/****************************************************************************/
550
551/*
552 * Define the mcf UART driver structure.
553 */
554static struct uart_driver mcf_driver = {
555 .owner = THIS_MODULE,
556 .driver_name = "mcf",
557 .dev_name = "ttyS",
558 .major = TTY_MAJOR,
559 .minor = 64,
560 .nr = MCF_MAXPORTS,
561 .cons = MCF_CONSOLE,
562};
563
564/****************************************************************************/
565
566static int __devinit mcf_probe(struct platform_device *pdev)
567{
568 struct mcf_platform_uart *platp = pdev->dev.platform_data;
569 struct uart_port *port;
570 int i;
571
572 for (i = 0; ((i < MCF_MAXPORTS) && (platp[i].mapbase)); i++) {
573 port = &mcf_ports[i].port;
574
575 port->line = i;
576 port->type = PORT_MCF;
577 port->mapbase = platp[i].mapbase;
578 port->membase = (platp[i].membase) ? platp[i].membase :
579 (unsigned char __iomem *) platp[i].mapbase;
580 port->iotype = SERIAL_IO_MEM;
581 port->irq = platp[i].irq;
582 port->uartclk = MCF_BUSCLK;
583 port->ops = &mcf_uart_ops;
584 port->flags = ASYNC_BOOT_AUTOCONF;
585
586 uart_add_one_port(&mcf_driver, port);
587 }
588
589 return 0;
590}
591
592/****************************************************************************/
593
594static int mcf_remove(struct platform_device *pdev)
595{
596 struct uart_port *port;
597 int i;
598
599 for (i = 0; (i < MCF_MAXPORTS); i++) {
600 port = &mcf_ports[i].port;
601 if (port)
602 uart_remove_one_port(&mcf_driver, port);
603 }
604
605 return 0;
606}
607
608/****************************************************************************/
609
610static struct platform_driver mcf_platform_driver = {
611 .probe = mcf_probe,
612 .remove = __devexit_p(mcf_remove),
613 .driver = {
614 .name = "mcfuart",
615 .owner = THIS_MODULE,
616 },
617};
618
619/****************************************************************************/
620
621static int __init mcf_init(void)
622{
623 int rc;
624
625 printk("ColdFire internal UART serial driver\n");
626
627 rc = uart_register_driver(&mcf_driver);
628 if (rc)
629 return rc;
630 rc = platform_driver_register(&mcf_platform_driver);
631 if (rc)
632 return rc;
633 return 0;
634}
635
636/****************************************************************************/
637
638static void __exit mcf_exit(void)
639{
640 platform_driver_unregister(&mcf_platform_driver);
641 uart_unregister_driver(&mcf_driver);
642}
643
644/****************************************************************************/
645
646module_init(mcf_init);
647module_exit(mcf_exit);
648
649MODULE_AUTHOR("Greg Ungerer <gerg@snapgear.com>");
650MODULE_DESCRIPTION("Freescale ColdFire UART driver");
651MODULE_LICENSE("GPL");
652
653/****************************************************************************/
diff --git a/include/asm-m68knommu/module.h b/include/asm-m68knommu/module.h
index 57e95cc01ad5..2e45ab50b232 100644
--- a/include/asm-m68knommu/module.h
+++ b/include/asm-m68knommu/module.h
@@ -1 +1,11 @@
1#include <asm-m68k/module.h> 1#ifndef ASM_M68KNOMMU_MODULE_H
2#define ASM_M68KNOMMU_MODULE_H
3
4struct mod_arch_specific {
5};
6
7#define Elf_Shdr Elf32_Shdr
8#define Elf_Sym Elf32_Sym
9#define Elf_Ehdr Elf32_Ehdr
10
11#endif /* ASM_M68KNOMMU_MODULE_H */
diff --git a/include/asm-m68knommu/uaccess.h b/include/asm-m68knommu/uaccess.h
index 9ed9169a8849..68bbe9b312f1 100644
--- a/include/asm-m68knommu/uaccess.h
+++ b/include/asm-m68knommu/uaccess.h
@@ -170,10 +170,12 @@ static inline long strnlen_user(const char *src, long n)
170 */ 170 */
171 171
172static inline unsigned long 172static inline unsigned long
173clear_user(void *to, unsigned long n) 173__clear_user(void *to, unsigned long n)
174{ 174{
175 memset(to, 0, n); 175 memset(to, 0, n);
176 return 0; 176 return 0;
177} 177}
178 178
179#define clear_user(to,n) __clear_user(to,n)
180
179#endif /* _M68KNOMMU_UACCESS_H */ 181#endif /* _M68KNOMMU_UACCESS_H */
diff --git a/include/sound/version.h b/include/sound/version.h
index 8d4a8dd89237..a2be8ad8894b 100644
--- a/include/sound/version.h
+++ b/include/sound/version.h
@@ -1,3 +1,3 @@
1/* include/version.h. Generated by alsa/ksync script. */ 1/* include/version.h. Generated by alsa/ksync script. */
2#define CONFIG_SND_VERSION "1.0.15" 2#define CONFIG_SND_VERSION "1.0.15"
3#define CONFIG_SND_DATE " (Tue Oct 16 14:57:44 2007 UTC)" 3#define CONFIG_SND_DATE " (Tue Oct 23 06:09:18 2007 UTC)"
diff --git a/mm/mmap.c b/mm/mmap.c
index 7a30c4988231..facc1a75bd4f 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1171,8 +1171,7 @@ munmap_back:
1171 vm_flags = vma->vm_flags; 1171 vm_flags = vma->vm_flags;
1172 1172
1173 if (vma_wants_writenotify(vma)) 1173 if (vma_wants_writenotify(vma))
1174 vma->vm_page_prot = 1174 vma->vm_page_prot = vm_get_page_prot(vm_flags & ~VM_SHARED);
1175 protection_map[vm_flags & (VM_READ|VM_WRITE|VM_EXEC)];
1176 1175
1177 if (!file || !vma_merge(mm, prev, addr, vma->vm_end, 1176 if (!file || !vma_merge(mm, prev, addr, vma->vm_end,
1178 vma->vm_flags, NULL, file, pgoff, vma_policy(vma))) { 1177 vma->vm_flags, NULL, file, pgoff, vma_policy(vma))) {
diff --git a/mm/mprotect.c b/mm/mprotect.c
index 55227845abbe..4de546899dc1 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -194,7 +194,7 @@ success:
194 vma->vm_flags = newflags; 194 vma->vm_flags = newflags;
195 vma->vm_page_prot = vm_get_page_prot(newflags); 195 vma->vm_page_prot = vm_get_page_prot(newflags);
196 if (vma_wants_writenotify(vma)) { 196 if (vma_wants_writenotify(vma)) {
197 vma->vm_page_prot = vm_get_page_prot(newflags); 197 vma->vm_page_prot = vm_get_page_prot(newflags & ~VM_SHARED);
198 dirty_accountable = 1; 198 dirty_accountable = 1;
199 } 199 }
200 200
diff --git a/sound/core/control.c b/sound/core/control.c
index 4c3aa8e10378..df0774c76f6f 100644
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -93,15 +93,16 @@ static int snd_ctl_open(struct inode *inode, struct file *file)
93 93
94static void snd_ctl_empty_read_queue(struct snd_ctl_file * ctl) 94static void snd_ctl_empty_read_queue(struct snd_ctl_file * ctl)
95{ 95{
96 unsigned long flags;
96 struct snd_kctl_event *cread; 97 struct snd_kctl_event *cread;
97 98
98 spin_lock(&ctl->read_lock); 99 spin_lock_irqsave(&ctl->read_lock, flags);
99 while (!list_empty(&ctl->events)) { 100 while (!list_empty(&ctl->events)) {
100 cread = snd_kctl_event(ctl->events.next); 101 cread = snd_kctl_event(ctl->events.next);
101 list_del(&cread->list); 102 list_del(&cread->list);
102 kfree(cread); 103 kfree(cread);
103 } 104 }
104 spin_unlock(&ctl->read_lock); 105 spin_unlock_irqrestore(&ctl->read_lock, flags);
105} 106}
106 107
107static int snd_ctl_release(struct inode *inode, struct file *file) 108static int snd_ctl_release(struct inode *inode, struct file *file)
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c
index 91f9e6a112ff..2dba752faf4e 100644
--- a/sound/pci/bt87x.c
+++ b/sound/pci/bt87x.c
@@ -165,7 +165,7 @@ struct snd_bt87x_board {
165 unsigned no_digital:1; /* No digital input */ 165 unsigned no_digital:1; /* No digital input */
166}; 166};
167 167
168static const __devinitdata struct snd_bt87x_board snd_bt87x_boards[] = { 168static __devinitdata struct snd_bt87x_board snd_bt87x_boards[] = {
169 [SND_BT87X_BOARD_UNKNOWN] = { 169 [SND_BT87X_BOARD_UNKNOWN] = {
170 .dig_rate = 32000, /* just a guess */ 170 .dig_rate = 32000, /* just a guess */
171 }, 171 },
@@ -848,7 +848,7 @@ static int __devinit snd_bt87x_detect_card(struct pci_dev *pci)
848 int i; 848 int i;
849 const struct pci_device_id *supported; 849 const struct pci_device_id *supported;
850 850
851 supported = pci_match_device(&driver, pci); 851 supported = pci_match_id(snd_bt87x_ids, pci);
852 if (supported && supported->driver_data > 0) 852 if (supported && supported->driver_data > 0)
853 return supported->driver_data; 853 return supported->driver_data;
854 854
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 187533e477c6..ad4cb38109fc 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -626,24 +626,19 @@ int __devinit snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr,
626 snd_hda_get_codec_name(codec, bus->card->mixername, 626 snd_hda_get_codec_name(codec, bus->card->mixername,
627 sizeof(bus->card->mixername)); 627 sizeof(bus->card->mixername));
628 628
629#ifdef CONFIG_SND_HDA_GENERIC
630 if (is_generic_config(codec)) { 629 if (is_generic_config(codec)) {
631 err = snd_hda_parse_generic_codec(codec); 630 err = snd_hda_parse_generic_codec(codec);
632 goto patched; 631 goto patched;
633 } 632 }
634#endif
635 if (codec->preset && codec->preset->patch) { 633 if (codec->preset && codec->preset->patch) {
636 err = codec->preset->patch(codec); 634 err = codec->preset->patch(codec);
637 goto patched; 635 goto patched;
638 } 636 }
639 637
640 /* call the default parser */ 638 /* call the default parser */
641#ifdef CONFIG_SND_HDA_GENERIC
642 err = snd_hda_parse_generic_codec(codec); 639 err = snd_hda_parse_generic_codec(codec);
643#else 640 if (err < 0)
644 printk(KERN_ERR "hda-codec: No codec parser is available\n"); 641 printk(KERN_ERR "hda-codec: No codec parser is available\n");
645 err = -ENODEV;
646#endif
647 642
648 patched: 643 patched:
649 if (err < 0) { 644 if (err < 0) {
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h
index a79d0ed5469c..20c5e6250374 100644
--- a/sound/pci/hda/hda_local.h
+++ b/sound/pci/hda/hda_local.h
@@ -245,7 +245,14 @@ int snd_hda_multi_out_analog_cleanup(struct hda_codec *codec,
245/* 245/*
246 * generic codec parser 246 * generic codec parser
247 */ 247 */
248#ifdef CONFIG_SND_HDA_GENERIC
248int snd_hda_parse_generic_codec(struct hda_codec *codec); 249int snd_hda_parse_generic_codec(struct hda_codec *codec);
250#else
251static inline int snd_hda_parse_generic_codec(struct hda_codec *codec)
252{
253 return -ENODEV;
254}
255#endif
249 256
250/* 257/*
251 * generic proc interface 258 * generic proc interface
@@ -303,16 +310,17 @@ enum {
303 310
304extern const char *auto_pin_cfg_labels[AUTO_PIN_LAST]; 311extern const char *auto_pin_cfg_labels[AUTO_PIN_LAST];
305 312
313#define AUTO_CFG_MAX_OUTS 5
314
306struct auto_pin_cfg { 315struct auto_pin_cfg {
307 int line_outs; 316 int line_outs;
308 hda_nid_t line_out_pins[5]; /* sorted in the order of 317 /* sorted in the order of Front/Surr/CLFE/Side */
309 * Front/Surr/CLFE/Side 318 hda_nid_t line_out_pins[AUTO_CFG_MAX_OUTS];
310 */
311 int speaker_outs; 319 int speaker_outs;
312 hda_nid_t speaker_pins[5]; 320 hda_nid_t speaker_pins[AUTO_CFG_MAX_OUTS];
313 int hp_outs; 321 int hp_outs;
314 int line_out_type; /* AUTO_PIN_XXX_OUT */ 322 int line_out_type; /* AUTO_PIN_XXX_OUT */
315 hda_nid_t hp_pins[5]; 323 hda_nid_t hp_pins[AUTO_CFG_MAX_OUTS];
316 hda_nid_t input_pins[AUTO_PIN_LAST]; 324 hda_nid_t input_pins[AUTO_PIN_LAST];
317 hda_nid_t dig_out_pin; 325 hda_nid_t dig_out_pin;
318 hda_nid_t dig_in_pin; 326 hda_nid_t dig_in_pin;
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 54cfd4526d20..0ee8ae4d4410 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -72,7 +72,7 @@ struct ad198x_spec {
72 unsigned int num_kctl_alloc, num_kctl_used; 72 unsigned int num_kctl_alloc, num_kctl_used;
73 struct snd_kcontrol_new *kctl_alloc; 73 struct snd_kcontrol_new *kctl_alloc;
74 struct hda_input_mux private_imux; 74 struct hda_input_mux private_imux;
75 hda_nid_t private_dac_nids[4]; 75 hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS];
76 76
77 unsigned int jack_present :1; 77 unsigned int jack_present :1;
78 78
@@ -612,7 +612,8 @@ static void ad1986a_hp_automute(struct hda_codec *codec)
612 unsigned int present; 612 unsigned int present;
613 613
614 present = snd_hda_codec_read(codec, 0x1a, 0, AC_VERB_GET_PIN_SENSE, 0); 614 present = snd_hda_codec_read(codec, 0x1a, 0, AC_VERB_GET_PIN_SENSE, 0);
615 spec->jack_present = (present & 0x80000000) != 0; 615 /* Lenovo N100 seems to report the reversed bit for HP jack-sensing */
616 spec->jack_present = !(present & 0x80000000);
616 ad1986a_update_hp(codec); 617 ad1986a_update_hp(codec);
617} 618}
618 619
diff --git a/sound/pci/hda/patch_cmedia.c b/sound/pci/hda/patch_cmedia.c
index 2468f3171222..6c54793bf424 100644
--- a/sound/pci/hda/patch_cmedia.c
+++ b/sound/pci/hda/patch_cmedia.c
@@ -50,7 +50,7 @@ struct cmi_spec {
50 50
51 /* playback */ 51 /* playback */
52 struct hda_multi_out multiout; 52 struct hda_multi_out multiout;
53 hda_nid_t dac_nids[4]; /* NID for each DAC */ 53 hda_nid_t dac_nids[AUTO_CFG_MAX_OUTS]; /* NID for each DAC */
54 int num_dacs; 54 int num_dacs;
55 55
56 /* capture */ 56 /* capture */
@@ -73,7 +73,6 @@ struct cmi_spec {
73 unsigned int pin_def_confs; 73 unsigned int pin_def_confs;
74 74
75 /* multichannel pins */ 75 /* multichannel pins */
76 hda_nid_t multich_pin[4]; /* max 8-channel */
77 struct hda_verb multi_init[9]; /* 2 verbs for each pin + terminator */ 76 struct hda_verb multi_init[9]; /* 2 verbs for each pin + terminator */
78}; 77};
79 78
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 080e3001d9c5..6aa073986747 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -85,7 +85,7 @@ struct conexant_spec {
85 unsigned int num_kctl_alloc, num_kctl_used; 85 unsigned int num_kctl_alloc, num_kctl_used;
86 struct snd_kcontrol_new *kctl_alloc; 86 struct snd_kcontrol_new *kctl_alloc;
87 struct hda_input_mux private_imux; 87 struct hda_input_mux private_imux;
88 hda_nid_t private_dac_nids[4]; 88 hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS];
89 89
90}; 90};
91 91
@@ -554,10 +554,16 @@ static struct snd_kcontrol_new cxt5045_mixers[] = {
554 .get = conexant_mux_enum_get, 554 .get = conexant_mux_enum_get,
555 .put = conexant_mux_enum_put 555 .put = conexant_mux_enum_put
556 }, 556 },
557 HDA_CODEC_VOLUME("Int Mic Volume", 0x1a, 0x01, HDA_INPUT), 557 HDA_CODEC_VOLUME("Int Mic Capture Volume", 0x1a, 0x01, HDA_INPUT),
558 HDA_CODEC_MUTE("Int Mic Switch", 0x1a, 0x01, HDA_INPUT), 558 HDA_CODEC_MUTE("Int Mic Capture Switch", 0x1a, 0x01, HDA_INPUT),
559 HDA_CODEC_VOLUME("Ext Mic Volume", 0x1a, 0x02, HDA_INPUT), 559 HDA_CODEC_VOLUME("Ext Mic Capture Volume", 0x1a, 0x02, HDA_INPUT),
560 HDA_CODEC_MUTE("Ext Mic Switch", 0x1a, 0x02, HDA_INPUT), 560 HDA_CODEC_MUTE("Ext Mic Capture Switch", 0x1a, 0x02, HDA_INPUT),
561 HDA_CODEC_VOLUME("PCM Playback Volume", 0x17, 0x0, HDA_INPUT),
562 HDA_CODEC_MUTE("PCM Playback Switch", 0x17, 0x0, HDA_INPUT),
563 HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x17, 0x1, HDA_INPUT),
564 HDA_CODEC_MUTE("Int Mic Playback Switch", 0x17, 0x1, HDA_INPUT),
565 HDA_CODEC_VOLUME("Ext Mic Playback Volume", 0x17, 0x2, HDA_INPUT),
566 HDA_CODEC_MUTE("Ext Mic Playback Switch", 0x17, 0x2, HDA_INPUT),
561 HDA_BIND_VOL("Master Playback Volume", &cxt5045_hp_bind_master_vol), 567 HDA_BIND_VOL("Master Playback Volume", &cxt5045_hp_bind_master_vol),
562 { 568 {
563 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 569 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -576,16 +582,15 @@ static struct hda_verb cxt5045_init_verbs[] = {
576 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN }, 582 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
577 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_80 }, 583 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN|AC_PINCTL_VREF_80 },
578 /* HP, Amp */ 584 /* HP, Amp */
579 {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP }, 585 {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
580 {0x17, AC_VERB_SET_CONNECT_SEL,0x01}, 586 {0x10, AC_VERB_SET_CONNECT_SEL, 0x1},
581 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, 587 {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
582 AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x01}, 588 {0x11, AC_VERB_SET_CONNECT_SEL, 0x1},
583 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, 589 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
584 AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x02}, 590 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
585 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, 591 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
586 AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x03}, 592 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
587 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, 593 {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
588 AC_AMP_SET_OUTPUT|AC_AMP_SET_RIGHT|AC_AMP_SET_LEFT|0x04},
589 /* Record selector: Int mic */ 594 /* Record selector: Int mic */
590 {0x1a, AC_VERB_SET_CONNECT_SEL,0x1}, 595 {0x1a, AC_VERB_SET_CONNECT_SEL,0x1},
591 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, 596 {0x1a, AC_VERB_SET_AMP_GAIN_MUTE,
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 53b0428abfc2..d9f78c809ee9 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -238,7 +238,7 @@ struct alc_spec {
238 unsigned int num_kctl_alloc, num_kctl_used; 238 unsigned int num_kctl_alloc, num_kctl_used;
239 struct snd_kcontrol_new *kctl_alloc; 239 struct snd_kcontrol_new *kctl_alloc;
240 struct hda_input_mux private_imux; 240 struct hda_input_mux private_imux;
241 hda_nid_t private_dac_nids[5]; 241 hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS];
242 242
243 /* hooks */ 243 /* hooks */
244 void (*init_hook)(struct hda_codec *codec); 244 void (*init_hook)(struct hda_codec *codec);
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index bf950195107c..f9b2c435a130 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -111,6 +111,7 @@ struct sigmatel_spec {
111 unsigned int alt_switch: 1; 111 unsigned int alt_switch: 1;
112 unsigned int hp_detect: 1; 112 unsigned int hp_detect: 1;
113 unsigned int gpio_mute: 1; 113 unsigned int gpio_mute: 1;
114 unsigned int no_vol_knob :1;
114 115
115 unsigned int gpio_mask, gpio_data; 116 unsigned int gpio_mask, gpio_data;
116 117
@@ -1930,7 +1931,8 @@ static int stac92xx_auto_create_hp_ctls(struct hda_codec *codec,
1930 } 1931 }
1931 if (spec->multiout.hp_nid) { 1932 if (spec->multiout.hp_nid) {
1932 const char *pfx; 1933 const char *pfx;
1933 if (old_num_dacs == spec->multiout.num_dacs) 1934 if (old_num_dacs == spec->multiout.num_dacs &&
1935 spec->no_vol_knob)
1934 pfx = "Master"; 1936 pfx = "Master";
1935 else 1937 else
1936 pfx = "Headphone"; 1938 pfx = "Headphone";
@@ -2487,6 +2489,7 @@ static int patch_stac9200(struct hda_codec *codec)
2487 codec->spec = spec; 2489 codec->spec = spec;
2488 spec->num_pins = ARRAY_SIZE(stac9200_pin_nids); 2490 spec->num_pins = ARRAY_SIZE(stac9200_pin_nids);
2489 spec->pin_nids = stac9200_pin_nids; 2491 spec->pin_nids = stac9200_pin_nids;
2492 spec->no_vol_knob = 1;
2490 spec->board_config = snd_hda_check_board_config(codec, STAC_9200_MODELS, 2493 spec->board_config = snd_hda_check_board_config(codec, STAC_9200_MODELS,
2491 stac9200_models, 2494 stac9200_models,
2492 stac9200_cfg_tbl); 2495 stac9200_cfg_tbl);
@@ -2541,6 +2544,7 @@ static int patch_stac925x(struct hda_codec *codec)
2541 codec->spec = spec; 2544 codec->spec = spec;
2542 spec->num_pins = ARRAY_SIZE(stac925x_pin_nids); 2545 spec->num_pins = ARRAY_SIZE(stac925x_pin_nids);
2543 spec->pin_nids = stac925x_pin_nids; 2546 spec->pin_nids = stac925x_pin_nids;
2547 spec->no_vol_knob = 1;
2544 spec->board_config = snd_hda_check_board_config(codec, STAC_925x_MODELS, 2548 spec->board_config = snd_hda_check_board_config(codec, STAC_925x_MODELS,
2545 stac925x_models, 2549 stac925x_models,
2546 stac925x_cfg_tbl); 2550 stac925x_cfg_tbl);
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index 33b5e1ffa817..4cdf3e6df4ba 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -114,7 +114,7 @@ struct via_spec {
114 unsigned int num_kctl_alloc, num_kctl_used; 114 unsigned int num_kctl_alloc, num_kctl_used;
115 struct snd_kcontrol_new *kctl_alloc; 115 struct snd_kcontrol_new *kctl_alloc;
116 struct hda_input_mux private_imux; 116 struct hda_input_mux private_imux;
117 hda_nid_t private_dac_nids[4]; 117 hda_nid_t private_dac_nids[AUTO_CFG_MAX_OUTS];
118 118
119#ifdef CONFIG_SND_HDA_POWER_SAVE 119#ifdef CONFIG_SND_HDA_POWER_SAVE
120 struct hda_loopback_check loopback; 120 struct hda_loopback_check loopback;
diff --git a/sound/sh/aica.c b/sound/sh/aica.c
index 131ec4812288..88dc840152ce 100644
--- a/sound/sh/aica.c
+++ b/sound/sh/aica.c
@@ -106,11 +106,14 @@ static void spu_write_wait(void)
106static void spu_memset(u32 toi, u32 what, int length) 106static void spu_memset(u32 toi, u32 what, int length)
107{ 107{
108 int i; 108 int i;
109 unsigned long flags;
109 snd_assert(length % 4 == 0, return); 110 snd_assert(length % 4 == 0, return);
110 for (i = 0; i < length; i++) { 111 for (i = 0; i < length; i++) {
111 if (!(i % 8)) 112 if (!(i % 8))
112 spu_write_wait(); 113 spu_write_wait();
114 local_irq_save(flags);
113 writel(what, toi + SPU_MEMORY_BASE); 115 writel(what, toi + SPU_MEMORY_BASE);
116 local_irq_restore(flags);
114 toi++; 117 toi++;
115 } 118 }
116} 119}
@@ -118,6 +121,7 @@ static void spu_memset(u32 toi, u32 what, int length)
118/* spu_memload - write to SPU address space */ 121/* spu_memload - write to SPU address space */
119static void spu_memload(u32 toi, void *from, int length) 122static void spu_memload(u32 toi, void *from, int length)
120{ 123{
124 unsigned long flags;
121 u32 *froml = from; 125 u32 *froml = from;
122 u32 __iomem *to = (u32 __iomem *) (SPU_MEMORY_BASE + toi); 126 u32 __iomem *to = (u32 __iomem *) (SPU_MEMORY_BASE + toi);
123 int i; 127 int i;
@@ -128,7 +132,9 @@ static void spu_memload(u32 toi, void *from, int length)
128 if (!(i % 8)) 132 if (!(i % 8))
129 spu_write_wait(); 133 spu_write_wait();
130 val = *froml; 134 val = *froml;
135 local_irq_save(flags);
131 writel(val, to); 136 writel(val, to);
137 local_irq_restore(flags);
132 froml++; 138 froml++;
133 to++; 139 to++;
134 } 140 }
@@ -138,28 +144,36 @@ static void spu_memload(u32 toi, void *from, int length)
138static void spu_disable(void) 144static void spu_disable(void)
139{ 145{
140 int i; 146 int i;
147 unsigned long flags;
141 u32 regval; 148 u32 regval;
142 spu_write_wait(); 149 spu_write_wait();
143 regval = readl(ARM_RESET_REGISTER); 150 regval = readl(ARM_RESET_REGISTER);
144 regval |= 1; 151 regval |= 1;
145 spu_write_wait(); 152 spu_write_wait();
153 local_irq_save(flags);
146 writel(regval, ARM_RESET_REGISTER); 154 writel(regval, ARM_RESET_REGISTER);
155 local_irq_restore(flags);
147 for (i = 0; i < 64; i++) { 156 for (i = 0; i < 64; i++) {
148 spu_write_wait(); 157 spu_write_wait();
149 regval = readl(SPU_REGISTER_BASE + (i * 0x80)); 158 regval = readl(SPU_REGISTER_BASE + (i * 0x80));
150 regval = (regval & ~0x4000) | 0x8000; 159 regval = (regval & ~0x4000) | 0x8000;
151 spu_write_wait(); 160 spu_write_wait();
161 local_irq_save(flags);
152 writel(regval, SPU_REGISTER_BASE + (i * 0x80)); 162 writel(regval, SPU_REGISTER_BASE + (i * 0x80));
163 local_irq_restore(flags);
153 } 164 }
154} 165}
155 166
156/* spu_enable - set spu registers to enable sound output */ 167/* spu_enable - set spu registers to enable sound output */
157static void spu_enable(void) 168static void spu_enable(void)
158{ 169{
170 unsigned long flags;
159 u32 regval = readl(ARM_RESET_REGISTER); 171 u32 regval = readl(ARM_RESET_REGISTER);
160 regval &= ~1; 172 regval &= ~1;
161 spu_write_wait(); 173 spu_write_wait();
174 local_irq_save(flags);
162 writel(regval, ARM_RESET_REGISTER); 175 writel(regval, ARM_RESET_REGISTER);
176 local_irq_restore(flags);
163} 177}
164 178
165/* 179/*
@@ -168,25 +182,34 @@ static void spu_enable(void)
168*/ 182*/
169static void spu_reset(void) 183static void spu_reset(void)
170{ 184{
185 unsigned long flags;
171 spu_disable(); 186 spu_disable();
172 spu_memset(0, 0, 0x200000 / 4); 187 spu_memset(0, 0, 0x200000 / 4);
173 /* Put ARM7 in endless loop */ 188 /* Put ARM7 in endless loop */
189 local_irq_save(flags);
174 ctrl_outl(0xea000002, SPU_MEMORY_BASE); 190 ctrl_outl(0xea000002, SPU_MEMORY_BASE);
191 local_irq_restore(flags);
175 spu_enable(); 192 spu_enable();
176} 193}
177 194
178/* aica_chn_start - write to spu to start playback */ 195/* aica_chn_start - write to spu to start playback */
179static void aica_chn_start(void) 196static void aica_chn_start(void)
180{ 197{
198 unsigned long flags;
181 spu_write_wait(); 199 spu_write_wait();
200 local_irq_save(flags);
182 writel(AICA_CMD_KICK | AICA_CMD_START, (u32 *) AICA_CONTROL_POINT); 201 writel(AICA_CMD_KICK | AICA_CMD_START, (u32 *) AICA_CONTROL_POINT);
202 local_irq_restore(flags);
183} 203}
184 204
185/* aica_chn_halt - write to spu to halt playback */ 205/* aica_chn_halt - write to spu to halt playback */
186static void aica_chn_halt(void) 206static void aica_chn_halt(void)
187{ 207{
208 unsigned long flags;
188 spu_write_wait(); 209 spu_write_wait();
210 local_irq_save(flags);
189 writel(AICA_CMD_KICK | AICA_CMD_STOP, (u32 *) AICA_CONTROL_POINT); 211 writel(AICA_CMD_KICK | AICA_CMD_STOP, (u32 *) AICA_CONTROL_POINT);
212 local_irq_restore(flags);
190} 213}
191 214
192/* ALSA code below */ 215/* ALSA code below */
@@ -213,12 +236,13 @@ static int aica_dma_transfer(int channels, int buffer_size,
213 int q, err, period_offset; 236 int q, err, period_offset;
214 struct snd_card_aica *dreamcastcard; 237 struct snd_card_aica *dreamcastcard;
215 struct snd_pcm_runtime *runtime; 238 struct snd_pcm_runtime *runtime;
216 err = 0; 239 unsigned long flags;
217 dreamcastcard = substream->pcm->private_data; 240 dreamcastcard = substream->pcm->private_data;
218 period_offset = dreamcastcard->clicks; 241 period_offset = dreamcastcard->clicks;
219 period_offset %= (AICA_PERIOD_NUMBER / channels); 242 period_offset %= (AICA_PERIOD_NUMBER / channels);
220 runtime = substream->runtime; 243 runtime = substream->runtime;
221 for (q = 0; q < channels; q++) { 244 for (q = 0; q < channels; q++) {
245 local_irq_save(flags);
222 err = dma_xfer(AICA_DMA_CHANNEL, 246 err = dma_xfer(AICA_DMA_CHANNEL,
223 (unsigned long) (runtime->dma_area + 247 (unsigned long) (runtime->dma_area +
224 (AICA_BUFFER_SIZE * q) / 248 (AICA_BUFFER_SIZE * q) /
@@ -228,9 +252,12 @@ static int aica_dma_transfer(int channels, int buffer_size,
228 AICA_CHANNEL0_OFFSET + q * CHANNEL_OFFSET + 252 AICA_CHANNEL0_OFFSET + q * CHANNEL_OFFSET +
229 AICA_PERIOD_SIZE * period_offset, 253 AICA_PERIOD_SIZE * period_offset,
230 buffer_size / channels, AICA_DMA_MODE); 254 buffer_size / channels, AICA_DMA_MODE);
231 if (unlikely(err < 0)) 255 if (unlikely(err < 0)) {
256 local_irq_restore(flags);
232 break; 257 break;
258 }
233 dma_wait_for_completion(AICA_DMA_CHANNEL); 259 dma_wait_for_completion(AICA_DMA_CHANNEL);
260 local_irq_restore(flags);
234 } 261 }
235 return err; 262 return err;
236} 263}
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
index 9785382a5f39..f8c7a120ccbb 100644
--- a/sound/sparc/cs4231.c
+++ b/sound/sparc/cs4231.c
@@ -400,65 +400,44 @@ static void snd_cs4231_mce_up(struct snd_cs4231 *chip)
400 400
401static void snd_cs4231_mce_down(struct snd_cs4231 *chip) 401static void snd_cs4231_mce_down(struct snd_cs4231 *chip)
402{ 402{
403 unsigned long flags; 403 unsigned long flags, timeout;
404 unsigned long end_time; 404 int reg;
405 int timeout;
406 405
407 spin_lock_irqsave(&chip->lock, flags);
408 snd_cs4231_busy_wait(chip); 406 snd_cs4231_busy_wait(chip);
407 spin_lock_irqsave(&chip->lock, flags);
409#ifdef CONFIG_SND_DEBUG 408#ifdef CONFIG_SND_DEBUG
410 if (__cs4231_readb(chip, CS4231U(chip, REGSEL)) & CS4231_INIT) 409 if (__cs4231_readb(chip, CS4231U(chip, REGSEL)) & CS4231_INIT)
411 snd_printdd("mce_down [%p] - auto calibration time out (0)\n", 410 snd_printdd("mce_down [%p] - auto calibration time out (0)\n",
412 CS4231U(chip, REGSEL)); 411 CS4231U(chip, REGSEL));
413#endif 412#endif
414 chip->mce_bit &= ~CS4231_MCE; 413 chip->mce_bit &= ~CS4231_MCE;
415 timeout = __cs4231_readb(chip, CS4231U(chip, REGSEL)); 414 reg = __cs4231_readb(chip, CS4231U(chip, REGSEL));
416 __cs4231_writeb(chip, chip->mce_bit | (timeout & 0x1f), 415 __cs4231_writeb(chip, chip->mce_bit | (reg & 0x1f),
417 CS4231U(chip, REGSEL)); 416 CS4231U(chip, REGSEL));
418 if (timeout == 0x80) 417 if (reg == 0x80)
419 snd_printdd("mce_down [%p]: serious init problem - " 418 snd_printdd("mce_down [%p]: serious init problem "
420 "codec still busy\n", 419 "- codec still busy\n", chip->port);
421 chip->port); 420 if ((reg & CS4231_MCE) == 0) {
422 if ((timeout & CS4231_MCE) == 0) {
423 spin_unlock_irqrestore(&chip->lock, flags); 421 spin_unlock_irqrestore(&chip->lock, flags);
424 return; 422 return;
425 } 423 }
426 424
427 /* 425 /*
428 * Wait for (possible -- during init auto-calibration may not be set) 426 * Wait for auto-calibration (AC) process to finish, i.e. ACI to go low.
429 * calibration process to start. Needs upto 5 sample periods on AD1848
430 * which at the slowest possible rate of 5.5125 kHz means 907 us.
431 */ 427 */
432 msleep(1); 428 timeout = jiffies + msecs_to_jiffies(250);
433 429 do {
434 /* check condition up to 250ms */
435 end_time = jiffies + msecs_to_jiffies(250);
436 while (snd_cs4231_in(chip, CS4231_TEST_INIT) &
437 CS4231_CALIB_IN_PROGRESS) {
438
439 spin_unlock_irqrestore(&chip->lock, flags); 430 spin_unlock_irqrestore(&chip->lock, flags);
440 if (time_after(jiffies, end_time)) {
441 snd_printk("mce_down - "
442 "auto calibration time out (2)\n");
443 return;
444 }
445 msleep(1);
446 spin_lock_irqsave(&chip->lock, flags);
447 }
448
449 /* check condition up to 100ms */
450 end_time = jiffies + msecs_to_jiffies(100);
451 while (__cs4231_readb(chip, CS4231U(chip, REGSEL)) & CS4231_INIT) {
452 spin_unlock_irqrestore(&chip->lock, flags);
453 if (time_after(jiffies, end_time)) {
454 snd_printk("mce_down - "
455 "auto calibration time out (3)\n");
456 return;
457 }
458 msleep(1); 431 msleep(1);
459 spin_lock_irqsave(&chip->lock, flags); 432 spin_lock_irqsave(&chip->lock, flags);
460 } 433 reg = snd_cs4231_in(chip, CS4231_TEST_INIT);
434 reg &= CS4231_CALIB_IN_PROGRESS;
435 } while (reg && time_before(jiffies, timeout));
461 spin_unlock_irqrestore(&chip->lock, flags); 436 spin_unlock_irqrestore(&chip->lock, flags);
437
438 if (reg)
439 snd_printk(KERN_ERR
440 "mce_down - auto calibration time out (2)\n");
462} 441}
463 442
464static void snd_cs4231_advance_dma(struct cs4231_dma_control *dma_cont, 443static void snd_cs4231_advance_dma(struct cs4231_dma_control *dma_cont,
diff --git a/sound/usb/usbquirks.h b/sound/usb/usbquirks.h
index 743568f89907..59410f437705 100644
--- a/sound/usb/usbquirks.h
+++ b/sound/usb/usbquirks.h
@@ -84,6 +84,15 @@
84 USB_DEVICE_ID_MATCH_INT_CLASS | 84 USB_DEVICE_ID_MATCH_INT_CLASS |
85 USB_DEVICE_ID_MATCH_INT_SUBCLASS, 85 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
86 .idVendor = 0x046d, 86 .idVendor = 0x046d,
87 .idProduct = 0x08f5,
88 .bInterfaceClass = USB_CLASS_AUDIO,
89 .bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL
90},
91{
92 .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
93 USB_DEVICE_ID_MATCH_INT_CLASS |
94 USB_DEVICE_ID_MATCH_INT_SUBCLASS,
95 .idVendor = 0x046d,
87 .idProduct = 0x08f6, 96 .idProduct = 0x08f6,
88 .bInterfaceClass = USB_CLASS_AUDIO, 97 .bInterfaceClass = USB_CLASS_AUDIO,
89 .bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL 98 .bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL