diff options
29 files changed, 856 insertions, 403 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 | ||
454 | config SAVANTrosie1 | ||
455 | bool "Savant Rosie1 board support" | ||
456 | depends on M523x | ||
457 | help | ||
458 | Support for the Savant Rosie1 board. | ||
459 | |||
454 | config ROMFS_FROM_ROM | 460 | config 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 | ||
502 | config SAVANT | ||
503 | bool | ||
504 | default y | ||
505 | depends on SAVANTrosie1 | ||
506 | |||
496 | config AVNET | 507 | config 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 | |||
48 | board-$(CONFIG_M5208EVB) := M5208EVB | 48 | board-$(CONFIG_M5208EVB) := M5208EVB |
49 | board-$(CONFIG_MOD5272) := MOD5272 | 49 | board-$(CONFIG_MOD5272) := MOD5272 |
50 | board-$(CONFIG_AVNET) := AVNET | 50 | board-$(CONFIG_AVNET) := AVNET |
51 | board-$(CONFIG_SAVANT) := SAVANT | ||
51 | BOARD := $(board-y) | 52 | BOARD := $(board-y) |
52 | 53 | ||
53 | model-$(CONFIG_RAMKERNEL) := ram | 54 | model-$(CONFIG_RAMKERNEL) := ram |
@@ -117,4 +118,4 @@ core-y += arch/m68knommu/kernel/ \ | |||
117 | libs-y += arch/m68knommu/lib/ | 118 | libs-y += arch/m68knommu/lib/ |
118 | 119 | ||
119 | archclean: | 120 | archclean: |
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 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_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 |
9 | CONFIG_ZONE_DMA=y | ||
9 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 10 | CONFIG_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 | ||
11 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 14 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
12 | CONFIG_GENERIC_HWEIGHT=y | 15 | CONFIG_GENERIC_HWEIGHT=y |
16 | CONFIG_GENERIC_HARDIRQS=y | ||
13 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 17 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
14 | CONFIG_TIME_LOW_RES=y | 18 | CONFIG_TIME_LOW_RES=y |
19 | CONFIG_NO_IOPORT=y | ||
20 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
15 | 21 | ||
16 | # | 22 | # |
17 | # Code maturity level options | 23 | # General setup |
18 | # | 24 | # |
19 | CONFIG_EXPERIMENTAL=y | 25 | CONFIG_EXPERIMENTAL=y |
20 | CONFIG_BROKEN_ON_SMP=y | 26 | CONFIG_BROKEN_ON_SMP=y |
21 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 27 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
22 | |||
23 | # | ||
24 | # General setup | ||
25 | # | ||
26 | CONFIG_LOCALVERSION="" | 28 | CONFIG_LOCALVERSION="" |
27 | CONFIG_LOCALVERSION_AUTO=y | 29 | CONFIG_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 |
37 | CONFIG_LOG_BUF_SHIFT=14 | ||
38 | # CONFIG_SYSFS_DEPRECATED is not set | ||
34 | # CONFIG_RELAY is not set | 39 | # CONFIG_RELAY is not set |
35 | CONFIG_INITRAMFS_SOURCE="" | 40 | # CONFIG_BLK_DEV_INITRD is not set |
36 | CONFIG_UID16=y | ||
37 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 41 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
42 | CONFIG_SYSCTL=y | ||
38 | CONFIG_EMBEDDED=y | 43 | CONFIG_EMBEDDED=y |
44 | CONFIG_UID16=y | ||
45 | CONFIG_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 |
41 | CONFIG_PRINTK=y | 48 | CONFIG_PRINTK=y |
@@ -44,20 +51,25 @@ CONFIG_ELF_CORE=y | |||
44 | CONFIG_BASE_FULL=y | 51 | CONFIG_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 | ||
47 | CONFIG_SLAB=y | 57 | CONFIG_SLAB=y |
58 | # CONFIG_SLUB is not set | ||
59 | # CONFIG_SLOB is not set | ||
48 | CONFIG_TINY_SHMEM=y | 60 | CONFIG_TINY_SHMEM=y |
49 | CONFIG_BASE_SMALL=0 | 61 | CONFIG_BASE_SMALL=0 |
50 | # CONFIG_SLOB is not set | 62 | CONFIG_MODULES=y |
51 | 63 | CONFIG_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 | 68 | CONFIG_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 | ||
102 | CONFIG_M5272C3=y | 115 | CONFIG_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 |
109 | CONFIG_FREESCALE=y | 122 | CONFIG_FREESCALE=y |
110 | # CONFIG_LARGE_ALLOCS is not set | ||
111 | CONFIG_4KSTACKS=y | 123 | CONFIG_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 | ||
124 | CONFIG_RAMKERNEL=y | 141 | CONFIG_RAMKERNEL=y |
125 | # CONFIG_ROMKERNEL is not set | 142 | # CONFIG_ROMKERNEL is not set |
126 | CONFIG_SELECT_MEMORY_MODEL=y | 143 | CONFIG_SELECT_MEMORY_MODEL=y |
@@ -131,20 +148,19 @@ CONFIG_FLATMEM=y | |||
131 | CONFIG_FLAT_NODE_MEM_MAP=y | 148 | CONFIG_FLAT_NODE_MEM_MAP=y |
132 | # CONFIG_SPARSEMEM_STATIC is not set | 149 | # CONFIG_SPARSEMEM_STATIC is not set |
133 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 150 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
151 | # CONFIG_RESOURCES_64BIT is not set | ||
152 | CONFIG_ZONE_DMA_FLAG=1 | ||
153 | CONFIG_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 | ||
172 | CONFIG_PACKET=y | 187 | CONFIG_PACKET=y |
173 | # CONFIG_PACKET_MMAP is not set | 188 | # CONFIG_PACKET_MMAP is not set |
174 | CONFIG_UNIX=y | 189 | CONFIG_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 |
192 | CONFIG_TCP_CONG_BIC=y | 210 | CONFIG_TCP_CONG_CUBIC=y |
211 | CONFIG_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 | # |
246 | CONFIG_STANDALONE=y | 264 | CONFIG_STANDALONE=y |
247 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 265 | CONFIG_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 | # | ||
258 | CONFIG_MTD=y | 268 | CONFIG_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 | # |
268 | CONFIG_MTD_CHAR=y | 278 | CONFIG_MTD_CHAR=y |
279 | CONFIG_MTD_BLKDEVS=y | ||
269 | CONFIG_MTD_BLOCK=y | 280 | CONFIG_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 | |||
290 | CONFIG_MTD_RAM=y | 302 | CONFIG_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 | 335 | CONFIG_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 |
342 | CONFIG_BLK_DEV_RAM=y | 339 | CONFIG_BLK_DEV_RAM=y |
343 | CONFIG_BLK_DEV_RAM_COUNT=16 | 340 | CONFIG_BLK_DEV_RAM_COUNT=16 |
344 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 341 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
345 | # CONFIG_BLK_DEV_INITRD is not set | 342 | CONFIG_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 | # | ||
381 | CONFIG_NETDEVICES=y | 356 | CONFIG_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 | # | ||
395 | CONFIG_NET_ETHERNET=y | 364 | CONFIG_NET_ETHERNET=y |
396 | # CONFIG_MII is not set | 365 | # CONFIG_MII is not set |
397 | CONFIG_FEC=y | 366 | CONFIG_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 |
421 | CONFIG_PPP=y | 377 | CONFIG_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 |
388 | CONFIG_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 |
473 | CONFIG_LEGACY_PTYS=y | 423 | CONFIG_LEGACY_PTYS=y |
474 | CONFIG_LEGACY_PTY_COUNT=256 | 424 | CONFIG_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 |
530 | CONFIG_VIDEO_V4L2=y | 452 | # CONFIG_DVB_CORE is not set |
453 | CONFIG_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 | ||
465 | CONFIG_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 | # |
597 | CONFIG_EXT2_FS=y | 498 | CONFIG_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 |
607 | CONFIG_ROMFS_FS=y | 509 | CONFIG_ROMFS_FS=y |
@@ -629,6 +531,7 @@ CONFIG_ROMFS_FS=y | |||
629 | # Pseudo filesystems | 531 | # Pseudo filesystems |
630 | # | 532 | # |
631 | CONFIG_PROC_FS=y | 533 | CONFIG_PROC_FS=y |
534 | CONFIG_PROC_SYSCTL=y | ||
632 | CONFIG_SYSFS=y | 535 | CONFIG_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 |
686 | CONFIG_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 |
620 | CONFIG_HAS_IOMEM=y | ||
621 | CONFIG_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 | ||
290 | void 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 | |||
31 | static inline int set_rtc_mmss(unsigned long nowtime) | 30 | static 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 | */ |
42 | static irqreturn_t timer_interrupt(int irq, void *dummy) | 41 | irqreturn_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 | ||
28 | void coldfire_tick(void); | ||
29 | void coldfire_timer_init(irq_handler_t handler); | ||
30 | unsigned long coldfire_timer_offset(void); | ||
31 | void coldfire_reset(void); | 25 | void coldfire_reset(void); |
32 | 26 | ||
33 | /***************************************************************************/ | 27 | /***************************************************************************/ |
@@ -97,9 +91,6 @@ int mcf_timerirqpending(int timer) | |||
97 | void config_BSP(char *commandp, int size) | 91 | void 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 | ||
26 | void coldfire_tick(void); | ||
27 | void coldfire_timer_init(irq_handler_t handler); | ||
28 | unsigned long coldfire_timer_offset(void); | ||
29 | void coldfire_reset(void); | 22 | void 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 | ||
30 | void coldfire_pit_tick(void); | ||
31 | void coldfire_pit_init(irq_handler_t handler); | ||
32 | unsigned long coldfire_pit_offset(void); | ||
33 | void coldfire_reset(void); | 30 | void coldfire_reset(void); |
34 | 31 | ||
35 | /***************************************************************************/ | 32 | /***************************************************************************/ |
@@ -47,10 +44,7 @@ void mcf_autovector(unsigned int vec) | |||
47 | 44 | ||
48 | void config_BSP(char *commandp, int size) | 45 | void 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 | ||
29 | void coldfire_pit_tick(void); | ||
30 | void coldfire_pit_init(irq_handler_t handler); | ||
31 | unsigned long coldfire_pit_offset(void); | ||
32 | void coldfire_reset(void); | 27 | void coldfire_reset(void); |
33 | 28 | ||
34 | /***************************************************************************/ | 29 | /***************************************************************************/ |
@@ -62,9 +57,6 @@ void mcf_autovector(unsigned int vec) | |||
62 | void config_BSP(char *commandp, int size) | 57 | void 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 | ||
27 | void coldfire_tick(void); | ||
28 | void coldfire_timer_init(irq_handler_t handler); | ||
29 | unsigned long coldfire_timer_offset(void); | ||
30 | void coldfire_reset(void); | 23 | void coldfire_reset(void); |
31 | 24 | ||
32 | /***************************************************************************/ | 25 | /***************************************************************************/ |
@@ -95,9 +88,6 @@ int mcf_timerirqpending(int timer) | |||
95 | void config_BSP(char *commandp, int size) | 88 | void 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 | ||
28 | void coldfire_tick(void); | ||
29 | void coldfire_timer_init(irq_handler_t handler); | ||
30 | unsigned long coldfire_timer_offset(void); | ||
31 | void coldfire_reset(void); | 24 | void coldfire_reset(void); |
32 | 25 | ||
33 | extern unsigned int mcf_timervector; | 26 | extern 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 | ||
29 | void coldfire_pit_tick(void); | ||
30 | void coldfire_pit_init(irq_handler_t handler); | ||
31 | unsigned long coldfire_pit_offset(void); | ||
32 | void coldfire_reset(void); | 27 | void coldfire_reset(void); |
33 | 28 | ||
34 | /***************************************************************************/ | 29 | /***************************************************************************/ |
@@ -62,9 +57,6 @@ void mcf_autovector(unsigned int vec) | |||
62 | void config_BSP(char *commandp, int size) | 57 | void 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 | ||
29 | void coldfire_pit_tick(void); | ||
30 | void coldfire_pit_init(irq_handler_t handler); | ||
31 | unsigned long coldfire_pit_offset(void); | ||
32 | void coldfire_reset(void); | 27 | void coldfire_reset(void); |
33 | 28 | ||
34 | /***************************************************************************/ | 29 | /***************************************************************************/ |
@@ -62,9 +57,6 @@ void mcf_autovector(unsigned int vec) | |||
62 | void config_BSP(char *commandp, int size) | 57 | void 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 | ||
29 | void coldfire_tick(void); | ||
30 | void coldfire_timer_init(irq_handler_t handler); | ||
31 | unsigned long coldfire_timer_offset(void); | ||
32 | void coldfire_reset(void); | 25 | void coldfire_reset(void); |
33 | 26 | ||
34 | extern unsigned int mcf_timervector; | 27 | extern 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 |
85 | 1: | 86 | 1: |
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 | ||
34 | void coldfire_pit_tick(void) | 35 | static 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 | ||
45 | static struct irqaction coldfire_pit_irq = { | 48 | static 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 | ||
50 | void coldfire_pit_init(irq_handler_t handler) | 54 | void 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 | ||
74 | unsigned long coldfire_pit_offset(void) | 77 | unsigned 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 | ||
57 | void coldfire_tick(void) | 56 | static 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 | ||
65 | static struct irqaction coldfire_timer_irq = { | 66 | static 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 | |||
70 | static int ticks_per_intr; | 74 | static int ticks_per_intr; |
71 | 75 | ||
72 | void coldfire_timer_init(irq_handler_t handler) | 76 | void 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 | ||
92 | unsigned long coldfire_timer_offset(void) | 95 | unsigned 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 | ||
37 | void coldfire_tick(void); | ||
38 | void coldfire_timer_init(irq_handler_t handler); | ||
39 | unsigned long coldfire_timer_offset(void); | ||
40 | void coldfire_reset(void); | 33 | void coldfire_reset(void); |
41 | 34 | ||
42 | extern unsigned int mcf_timervector; | 35 | extern 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 | ||
28 | void coldfire_tick(void); | ||
29 | void coldfire_timer_init(irq_handler_t handler); | ||
30 | unsigned long coldfire_timer_offset(void); | ||
31 | void coldfire_reset(void); | 24 | void coldfire_reset(void); |
32 | 25 | ||
33 | extern unsigned int mcf_timervector; | 26 | extern 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 |
1605 | ztxdone: | ||
1606 | tty_wakeup(tty); | 1605 | tty_wakeup(tty); |
1606 | ztxdone: | ||
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 | ||
769 | static void mii_do_cmd(struct net_device *dev, const phy_cmd_t *c) | 767 | static 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 | ||
781 | static void mii_parse_sr(uint mii_reg, struct net_device *dev) | 776 | static 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 | */ | ||
54 | struct 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 | |||
62 | static 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 | |||
70 | static 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 | |||
88 | static 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 | |||
105 | static 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 | |||
118 | static 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 | |||
131 | static 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 | |||
144 | static 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 | |||
158 | static void mcf_enable_ms(struct uart_port *port) | ||
159 | { | ||
160 | } | ||
161 | |||
162 | /****************************************************************************/ | ||
163 | |||
164 | static 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 | |||
190 | static 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 | |||
210 | static 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 | |||
274 | static 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 | |||
320 | static 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 | |||
352 | static 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 | |||
368 | static 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 | |||
382 | static const char *mcf_type(struct uart_port *port) | ||
383 | { | ||
384 | return (port->type == PORT_MCF) ? "ColdFire UART" : NULL; | ||
385 | } | ||
386 | |||
387 | /****************************************************************************/ | ||
388 | |||
389 | static int mcf_request_port(struct uart_port *port) | ||
390 | { | ||
391 | /* UARTs always present */ | ||
392 | return 0; | ||
393 | } | ||
394 | |||
395 | /****************************************************************************/ | ||
396 | |||
397 | static void mcf_release_port(struct uart_port *port) | ||
398 | { | ||
399 | /* Nothing to release... */ | ||
400 | } | ||
401 | |||
402 | /****************************************************************************/ | ||
403 | |||
404 | static 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 | */ | ||
416 | static 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 | |||
435 | static 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 | |||
443 | int __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 | |||
468 | static 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 | |||
486 | static 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 | |||
497 | static 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 | |||
519 | static struct uart_driver mcf_driver; | ||
520 | |||
521 | static 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 | |||
531 | static int __init mcf_console_init(void) | ||
532 | { | ||
533 | register_console(&mcf_console); | ||
534 | return 0; | ||
535 | } | ||
536 | |||
537 | console_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 | */ | ||
554 | static 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 | |||
566 | static 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 | |||
594 | static 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 | |||
610 | static 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 | |||
621 | static 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 | |||
638 | static void __exit mcf_exit(void) | ||
639 | { | ||
640 | platform_driver_unregister(&mcf_platform_driver); | ||
641 | uart_unregister_driver(&mcf_driver); | ||
642 | } | ||
643 | |||
644 | /****************************************************************************/ | ||
645 | |||
646 | module_init(mcf_init); | ||
647 | module_exit(mcf_exit); | ||
648 | |||
649 | MODULE_AUTHOR("Greg Ungerer <gerg@snapgear.com>"); | ||
650 | MODULE_DESCRIPTION("Freescale ColdFire UART driver"); | ||
651 | MODULE_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 | |||
4 | struct 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 | ||
172 | static inline unsigned long | 172 | static inline unsigned long |
173 | clear_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 */ |
@@ -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 | ||