diff options
69 files changed, 1184 insertions, 746 deletions
diff --git a/arch/i386/kernel/cpu/intel_cacheinfo.c b/arch/i386/kernel/cpu/intel_cacheinfo.c index aeb5b4ef8c8b..a710dc4eb20e 100644 --- a/arch/i386/kernel/cpu/intel_cacheinfo.c +++ b/arch/i386/kernel/cpu/intel_cacheinfo.c | |||
@@ -118,7 +118,7 @@ struct _cpuid4_info { | |||
118 | }; | 118 | }; |
119 | 119 | ||
120 | #define MAX_CACHE_LEAVES 4 | 120 | #define MAX_CACHE_LEAVES 4 |
121 | static unsigned short __devinitdata num_cache_leaves; | 121 | static unsigned short num_cache_leaves; |
122 | 122 | ||
123 | static int __devinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_leaf) | 123 | static int __devinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_leaf) |
124 | { | 124 | { |
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 35bfe138cb1a..bc1bb6919e6a 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -1074,8 +1074,10 @@ static void __init smp_boot_cpus(unsigned int max_cpus) | |||
1074 | cpu_set(cpu, cpu_sibling_map[cpu]); | 1074 | cpu_set(cpu, cpu_sibling_map[cpu]); |
1075 | } | 1075 | } |
1076 | 1076 | ||
1077 | if (siblings != smp_num_siblings) | 1077 | if (siblings != smp_num_siblings) { |
1078 | printk(KERN_WARNING "WARNING: %d siblings found for CPU%d, should be %d\n", siblings, cpu, smp_num_siblings); | 1078 | printk(KERN_WARNING "WARNING: %d siblings found for CPU%d, should be %d\n", siblings, cpu, smp_num_siblings); |
1079 | smp_num_siblings = siblings; | ||
1080 | } | ||
1079 | 1081 | ||
1080 | if (c->x86_num_cores > 1) { | 1082 | if (c->x86_num_cores > 1) { |
1081 | for (i = 0; i < NR_CPUS; i++) { | 1083 | for (i = 0; i < NR_CPUS; i++) { |
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index 600f23d7fd33..6e6377a69d5b 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -1143,12 +1143,12 @@ config PCI_QSPAN | |||
1143 | 1143 | ||
1144 | config PCI_8260 | 1144 | config PCI_8260 |
1145 | bool | 1145 | bool |
1146 | depends on PCI && 8260 && !8272 | 1146 | depends on PCI && 8260 |
1147 | default y | 1147 | default y |
1148 | 1148 | ||
1149 | config 8260_PCI9 | 1149 | config 8260_PCI9 |
1150 | bool " Enable workaround for MPC826x erratum PCI 9" | 1150 | bool " Enable workaround for MPC826x erratum PCI 9" |
1151 | depends on PCI_8260 | 1151 | depends on PCI_8260 && !ADS8272 |
1152 | default y | 1152 | default y |
1153 | 1153 | ||
1154 | choice | 1154 | choice |
diff --git a/arch/ppc/boot/images/Makefile b/arch/ppc/boot/images/Makefile index f850fb0fb511..c9ac5f5fa9e4 100644 --- a/arch/ppc/boot/images/Makefile +++ b/arch/ppc/boot/images/Makefile | |||
@@ -22,7 +22,8 @@ targets += uImage | |||
22 | $(obj)/uImage: $(obj)/vmlinux.gz | 22 | $(obj)/uImage: $(obj)/vmlinux.gz |
23 | $(Q)rm -f $@ | 23 | $(Q)rm -f $@ |
24 | $(call if_changed,uimage) | 24 | $(call if_changed,uimage) |
25 | @echo ' Image: $@' $(if $(wildcard $@),'is ready','not made') | 25 | @echo -n ' Image: $@ ' |
26 | @if [ -f $@ ]; then echo 'is ready' ; else echo 'not made'; fi | ||
26 | 27 | ||
27 | # Files generated that shall be removed upon make clean | 28 | # Files generated that shall be removed upon make clean |
28 | clean-files := sImage vmapus vmlinux* miboot* zImage* uImage | 29 | clean-files := sImage vmapus vmlinux* miboot* zImage* uImage |
diff --git a/arch/ppc/configs/mpc8555_cds_defconfig b/arch/ppc/configs/mpc8555_cds_defconfig index 728bd9e1a8fa..15abebf46b96 100644 --- a/arch/ppc/configs/mpc8555_cds_defconfig +++ b/arch/ppc/configs/mpc8555_cds_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.11-rc1 | 3 | # Linux kernel version: 2.6.12-rc4 |
4 | # Thu Jan 20 01:25:35 2005 | 4 | # Tue May 17 11:56:01 2005 |
5 | # | 5 | # |
6 | CONFIG_MMU=y | 6 | CONFIG_MMU=y |
7 | CONFIG_GENERIC_HARDIRQS=y | 7 | CONFIG_GENERIC_HARDIRQS=y |
@@ -11,6 +11,7 @@ CONFIG_HAVE_DEC_LOCK=y | |||
11 | CONFIG_PPC=y | 11 | CONFIG_PPC=y |
12 | CONFIG_PPC32=y | 12 | CONFIG_PPC32=y |
13 | CONFIG_GENERIC_NVRAM=y | 13 | CONFIG_GENERIC_NVRAM=y |
14 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
14 | 15 | ||
15 | # | 16 | # |
16 | # Code maturity level options | 17 | # Code maturity level options |
@@ -18,6 +19,7 @@ CONFIG_GENERIC_NVRAM=y | |||
18 | CONFIG_EXPERIMENTAL=y | 19 | CONFIG_EXPERIMENTAL=y |
19 | CONFIG_CLEAN_COMPILE=y | 20 | CONFIG_CLEAN_COMPILE=y |
20 | CONFIG_BROKEN_ON_SMP=y | 21 | CONFIG_BROKEN_ON_SMP=y |
22 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
21 | 23 | ||
22 | # | 24 | # |
23 | # General setup | 25 | # General setup |
@@ -29,12 +31,14 @@ CONFIG_SYSVIPC=y | |||
29 | # CONFIG_BSD_PROCESS_ACCT is not set | 31 | # CONFIG_BSD_PROCESS_ACCT is not set |
30 | CONFIG_SYSCTL=y | 32 | CONFIG_SYSCTL=y |
31 | # CONFIG_AUDIT is not set | 33 | # CONFIG_AUDIT is not set |
32 | CONFIG_LOG_BUF_SHIFT=14 | ||
33 | # CONFIG_HOTPLUG is not set | 34 | # CONFIG_HOTPLUG is not set |
34 | CONFIG_KOBJECT_UEVENT=y | 35 | CONFIG_KOBJECT_UEVENT=y |
35 | # CONFIG_IKCONFIG is not set | 36 | # CONFIG_IKCONFIG is not set |
36 | CONFIG_EMBEDDED=y | 37 | CONFIG_EMBEDDED=y |
37 | # CONFIG_KALLSYMS is not set | 38 | # CONFIG_KALLSYMS is not set |
39 | CONFIG_PRINTK=y | ||
40 | CONFIG_BUG=y | ||
41 | CONFIG_BASE_FULL=y | ||
38 | CONFIG_FUTEX=y | 42 | CONFIG_FUTEX=y |
39 | # CONFIG_EPOLL is not set | 43 | # CONFIG_EPOLL is not set |
40 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 44 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
@@ -44,6 +48,7 @@ CONFIG_CC_ALIGN_LABELS=0 | |||
44 | CONFIG_CC_ALIGN_LOOPS=0 | 48 | CONFIG_CC_ALIGN_LOOPS=0 |
45 | CONFIG_CC_ALIGN_JUMPS=0 | 49 | CONFIG_CC_ALIGN_JUMPS=0 |
46 | # CONFIG_TINY_SHMEM is not set | 50 | # CONFIG_TINY_SHMEM is not set |
51 | CONFIG_BASE_SMALL=0 | ||
47 | 52 | ||
48 | # | 53 | # |
49 | # Loadable module support | 54 | # Loadable module support |
@@ -62,10 +67,12 @@ CONFIG_CC_ALIGN_JUMPS=0 | |||
62 | CONFIG_E500=y | 67 | CONFIG_E500=y |
63 | CONFIG_BOOKE=y | 68 | CONFIG_BOOKE=y |
64 | CONFIG_FSL_BOOKE=y | 69 | CONFIG_FSL_BOOKE=y |
70 | # CONFIG_PHYS_64BIT is not set | ||
65 | CONFIG_SPE=y | 71 | CONFIG_SPE=y |
66 | CONFIG_MATH_EMULATION=y | 72 | CONFIG_MATH_EMULATION=y |
67 | # CONFIG_CPU_FREQ is not set | 73 | # CONFIG_CPU_FREQ is not set |
68 | CONFIG_PPC_GEN550=y | 74 | CONFIG_PPC_GEN550=y |
75 | # CONFIG_PM is not set | ||
69 | CONFIG_85xx=y | 76 | CONFIG_85xx=y |
70 | CONFIG_PPC_INDIRECT_PCI_BE=y | 77 | CONFIG_PPC_INDIRECT_PCI_BE=y |
71 | 78 | ||
@@ -76,6 +83,7 @@ CONFIG_PPC_INDIRECT_PCI_BE=y | |||
76 | CONFIG_MPC8555_CDS=y | 83 | CONFIG_MPC8555_CDS=y |
77 | # CONFIG_MPC8560_ADS is not set | 84 | # CONFIG_MPC8560_ADS is not set |
78 | # CONFIG_SBC8560 is not set | 85 | # CONFIG_SBC8560 is not set |
86 | # CONFIG_STX_GP3 is not set | ||
79 | CONFIG_MPC8555=y | 87 | CONFIG_MPC8555=y |
80 | CONFIG_85xx_PCI2=y | 88 | CONFIG_85xx_PCI2=y |
81 | 89 | ||
@@ -90,6 +98,7 @@ CONFIG_CPM2=y | |||
90 | CONFIG_BINFMT_ELF=y | 98 | CONFIG_BINFMT_ELF=y |
91 | # CONFIG_BINFMT_MISC is not set | 99 | # CONFIG_BINFMT_MISC is not set |
92 | # CONFIG_CMDLINE_BOOL is not set | 100 | # CONFIG_CMDLINE_BOOL is not set |
101 | CONFIG_ISA_DMA_API=y | ||
93 | 102 | ||
94 | # | 103 | # |
95 | # Bus options | 104 | # Bus options |
@@ -105,10 +114,6 @@ CONFIG_PCI_NAMES=y | |||
105 | # CONFIG_PCCARD is not set | 114 | # CONFIG_PCCARD is not set |
106 | 115 | ||
107 | # | 116 | # |
108 | # PC-card bridges | ||
109 | # | ||
110 | |||
111 | # | ||
112 | # Advanced setup | 117 | # Advanced setup |
113 | # | 118 | # |
114 | # CONFIG_ADVANCED_OPTIONS is not set | 119 | # CONFIG_ADVANCED_OPTIONS is not set |
@@ -180,7 +185,59 @@ CONFIG_IOSCHED_CFQ=y | |||
180 | # | 185 | # |
181 | # ATA/ATAPI/MFM/RLL support | 186 | # ATA/ATAPI/MFM/RLL support |
182 | # | 187 | # |
183 | # CONFIG_IDE is not set | 188 | CONFIG_IDE=y |
189 | CONFIG_BLK_DEV_IDE=y | ||
190 | |||
191 | # | ||
192 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
193 | # | ||
194 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
195 | CONFIG_BLK_DEV_IDEDISK=y | ||
196 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
197 | # CONFIG_BLK_DEV_IDECD is not set | ||
198 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
199 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
200 | # CONFIG_IDE_TASK_IOCTL is not set | ||
201 | |||
202 | # | ||
203 | # IDE chipset support/bugfixes | ||
204 | # | ||
205 | CONFIG_IDE_GENERIC=y | ||
206 | CONFIG_BLK_DEV_IDEPCI=y | ||
207 | CONFIG_IDEPCI_SHARE_IRQ=y | ||
208 | # CONFIG_BLK_DEV_OFFBOARD is not set | ||
209 | CONFIG_BLK_DEV_GENERIC=y | ||
210 | # CONFIG_BLK_DEV_OPTI621 is not set | ||
211 | # CONFIG_BLK_DEV_SL82C105 is not set | ||
212 | CONFIG_BLK_DEV_IDEDMA_PCI=y | ||
213 | # CONFIG_BLK_DEV_IDEDMA_FORCED is not set | ||
214 | CONFIG_IDEDMA_PCI_AUTO=y | ||
215 | # CONFIG_IDEDMA_ONLYDISK is not set | ||
216 | # CONFIG_BLK_DEV_AEC62XX is not set | ||
217 | # CONFIG_BLK_DEV_ALI15X3 is not set | ||
218 | # CONFIG_BLK_DEV_AMD74XX is not set | ||
219 | # CONFIG_BLK_DEV_CMD64X is not set | ||
220 | # CONFIG_BLK_DEV_TRIFLEX is not set | ||
221 | # CONFIG_BLK_DEV_CY82C693 is not set | ||
222 | # CONFIG_BLK_DEV_CS5520 is not set | ||
223 | # CONFIG_BLK_DEV_CS5530 is not set | ||
224 | # CONFIG_BLK_DEV_HPT34X is not set | ||
225 | # CONFIG_BLK_DEV_HPT366 is not set | ||
226 | # CONFIG_BLK_DEV_SC1200 is not set | ||
227 | # CONFIG_BLK_DEV_PIIX is not set | ||
228 | # CONFIG_BLK_DEV_NS87415 is not set | ||
229 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | ||
230 | # CONFIG_BLK_DEV_PDC202XX_NEW is not set | ||
231 | # CONFIG_BLK_DEV_SVWKS is not set | ||
232 | # CONFIG_BLK_DEV_SIIMAGE is not set | ||
233 | # CONFIG_BLK_DEV_SLC90E66 is not set | ||
234 | # CONFIG_BLK_DEV_TRM290 is not set | ||
235 | CONFIG_BLK_DEV_VIA82CXXX=y | ||
236 | # CONFIG_IDE_ARM is not set | ||
237 | CONFIG_BLK_DEV_IDEDMA=y | ||
238 | # CONFIG_IDEDMA_IVB is not set | ||
239 | CONFIG_IDEDMA_AUTO=y | ||
240 | # CONFIG_BLK_DEV_HD is not set | ||
184 | 241 | ||
185 | # | 242 | # |
186 | # SCSI device support | 243 | # SCSI device support |
@@ -220,7 +277,6 @@ CONFIG_NET=y | |||
220 | # | 277 | # |
221 | CONFIG_PACKET=y | 278 | CONFIG_PACKET=y |
222 | # CONFIG_PACKET_MMAP is not set | 279 | # CONFIG_PACKET_MMAP is not set |
223 | # CONFIG_NETLINK_DEV is not set | ||
224 | CONFIG_UNIX=y | 280 | CONFIG_UNIX=y |
225 | # CONFIG_NET_KEY is not set | 281 | # CONFIG_NET_KEY is not set |
226 | CONFIG_INET=y | 282 | CONFIG_INET=y |
@@ -370,14 +426,6 @@ CONFIG_INPUT=y | |||
370 | # CONFIG_INPUT_EVBUG is not set | 426 | # CONFIG_INPUT_EVBUG is not set |
371 | 427 | ||
372 | # | 428 | # |
373 | # Input I/O drivers | ||
374 | # | ||
375 | # CONFIG_GAMEPORT is not set | ||
376 | CONFIG_SOUND_GAMEPORT=y | ||
377 | # CONFIG_SERIO is not set | ||
378 | # CONFIG_SERIO_I8042 is not set | ||
379 | |||
380 | # | ||
381 | # Input Device Drivers | 429 | # Input Device Drivers |
382 | # | 430 | # |
383 | # CONFIG_INPUT_KEYBOARD is not set | 431 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -387,6 +435,13 @@ CONFIG_SOUND_GAMEPORT=y | |||
387 | # CONFIG_INPUT_MISC is not set | 435 | # CONFIG_INPUT_MISC is not set |
388 | 436 | ||
389 | # | 437 | # |
438 | # Hardware I/O ports | ||
439 | # | ||
440 | # CONFIG_SERIO is not set | ||
441 | # CONFIG_GAMEPORT is not set | ||
442 | CONFIG_SOUND_GAMEPORT=y | ||
443 | |||
444 | # | ||
390 | # Character devices | 445 | # Character devices |
391 | # | 446 | # |
392 | # CONFIG_VT is not set | 447 | # CONFIG_VT is not set |
@@ -406,6 +461,7 @@ CONFIG_SERIAL_8250_NR_UARTS=4 | |||
406 | CONFIG_SERIAL_CORE=y | 461 | CONFIG_SERIAL_CORE=y |
407 | CONFIG_SERIAL_CORE_CONSOLE=y | 462 | CONFIG_SERIAL_CORE_CONSOLE=y |
408 | # CONFIG_SERIAL_CPM is not set | 463 | # CONFIG_SERIAL_CPM is not set |
464 | # CONFIG_SERIAL_JSM is not set | ||
409 | CONFIG_UNIX98_PTYS=y | 465 | CONFIG_UNIX98_PTYS=y |
410 | CONFIG_LEGACY_PTYS=y | 466 | CONFIG_LEGACY_PTYS=y |
411 | CONFIG_LEGACY_PTY_COUNT=256 | 467 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -434,6 +490,11 @@ CONFIG_GEN_RTC=y | |||
434 | # CONFIG_RAW_DRIVER is not set | 490 | # CONFIG_RAW_DRIVER is not set |
435 | 491 | ||
436 | # | 492 | # |
493 | # TPM devices | ||
494 | # | ||
495 | # CONFIG_TCG_TPM is not set | ||
496 | |||
497 | # | ||
437 | # I2C support | 498 | # I2C support |
438 | # | 499 | # |
439 | CONFIG_I2C=y | 500 | CONFIG_I2C=y |
@@ -456,11 +517,11 @@ CONFIG_I2C_CHARDEV=y | |||
456 | # CONFIG_I2C_AMD8111 is not set | 517 | # CONFIG_I2C_AMD8111 is not set |
457 | # CONFIG_I2C_I801 is not set | 518 | # CONFIG_I2C_I801 is not set |
458 | # CONFIG_I2C_I810 is not set | 519 | # CONFIG_I2C_I810 is not set |
520 | # CONFIG_I2C_PIIX4 is not set | ||
459 | # CONFIG_I2C_ISA is not set | 521 | # CONFIG_I2C_ISA is not set |
460 | CONFIG_I2C_MPC=y | 522 | CONFIG_I2C_MPC=y |
461 | # CONFIG_I2C_NFORCE2 is not set | 523 | # CONFIG_I2C_NFORCE2 is not set |
462 | # CONFIG_I2C_PARPORT_LIGHT is not set | 524 | # CONFIG_I2C_PARPORT_LIGHT is not set |
463 | # CONFIG_I2C_PIIX4 is not set | ||
464 | # CONFIG_I2C_PROSAVAGE is not set | 525 | # CONFIG_I2C_PROSAVAGE is not set |
465 | # CONFIG_I2C_SAVAGE4 is not set | 526 | # CONFIG_I2C_SAVAGE4 is not set |
466 | # CONFIG_SCx200_ACB is not set | 527 | # CONFIG_SCx200_ACB is not set |
@@ -483,7 +544,9 @@ CONFIG_I2C_MPC=y | |||
483 | # CONFIG_SENSORS_ASB100 is not set | 544 | # CONFIG_SENSORS_ASB100 is not set |
484 | # CONFIG_SENSORS_DS1621 is not set | 545 | # CONFIG_SENSORS_DS1621 is not set |
485 | # CONFIG_SENSORS_FSCHER is not set | 546 | # CONFIG_SENSORS_FSCHER is not set |
547 | # CONFIG_SENSORS_FSCPOS is not set | ||
486 | # CONFIG_SENSORS_GL518SM is not set | 548 | # CONFIG_SENSORS_GL518SM is not set |
549 | # CONFIG_SENSORS_GL520SM is not set | ||
487 | # CONFIG_SENSORS_IT87 is not set | 550 | # CONFIG_SENSORS_IT87 is not set |
488 | # CONFIG_SENSORS_LM63 is not set | 551 | # CONFIG_SENSORS_LM63 is not set |
489 | # CONFIG_SENSORS_LM75 is not set | 552 | # CONFIG_SENSORS_LM75 is not set |
@@ -494,9 +557,11 @@ CONFIG_I2C_MPC=y | |||
494 | # CONFIG_SENSORS_LM85 is not set | 557 | # CONFIG_SENSORS_LM85 is not set |
495 | # CONFIG_SENSORS_LM87 is not set | 558 | # CONFIG_SENSORS_LM87 is not set |
496 | # CONFIG_SENSORS_LM90 is not set | 559 | # CONFIG_SENSORS_LM90 is not set |
560 | # CONFIG_SENSORS_LM92 is not set | ||
497 | # CONFIG_SENSORS_MAX1619 is not set | 561 | # CONFIG_SENSORS_MAX1619 is not set |
498 | # CONFIG_SENSORS_PC87360 is not set | 562 | # CONFIG_SENSORS_PC87360 is not set |
499 | # CONFIG_SENSORS_SMSC47B397 is not set | 563 | # CONFIG_SENSORS_SMSC47B397 is not set |
564 | # CONFIG_SENSORS_SIS5595 is not set | ||
500 | # CONFIG_SENSORS_SMSC47M1 is not set | 565 | # CONFIG_SENSORS_SMSC47M1 is not set |
501 | # CONFIG_SENSORS_VIA686A is not set | 566 | # CONFIG_SENSORS_VIA686A is not set |
502 | # CONFIG_SENSORS_W83781D is not set | 567 | # CONFIG_SENSORS_W83781D is not set |
@@ -506,10 +571,12 @@ CONFIG_I2C_MPC=y | |||
506 | # | 571 | # |
507 | # Other I2C Chip support | 572 | # Other I2C Chip support |
508 | # | 573 | # |
574 | # CONFIG_SENSORS_DS1337 is not set | ||
509 | # CONFIG_SENSORS_EEPROM is not set | 575 | # CONFIG_SENSORS_EEPROM is not set |
510 | # CONFIG_SENSORS_PCF8574 is not set | 576 | # CONFIG_SENSORS_PCF8574 is not set |
511 | # CONFIG_SENSORS_PCF8591 is not set | 577 | # CONFIG_SENSORS_PCF8591 is not set |
512 | # CONFIG_SENSORS_RTC8564 is not set | 578 | # CONFIG_SENSORS_RTC8564 is not set |
579 | # CONFIG_SENSORS_M41T00 is not set | ||
513 | # CONFIG_I2C_DEBUG_CORE is not set | 580 | # CONFIG_I2C_DEBUG_CORE is not set |
514 | # CONFIG_I2C_DEBUG_ALGO is not set | 581 | # CONFIG_I2C_DEBUG_ALGO is not set |
515 | # CONFIG_I2C_DEBUG_BUS is not set | 582 | # CONFIG_I2C_DEBUG_BUS is not set |
@@ -538,7 +605,6 @@ CONFIG_I2C_MPC=y | |||
538 | # Graphics support | 605 | # Graphics support |
539 | # | 606 | # |
540 | # CONFIG_FB is not set | 607 | # CONFIG_FB is not set |
541 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
542 | 608 | ||
543 | # | 609 | # |
544 | # Sound | 610 | # Sound |
@@ -548,13 +614,9 @@ CONFIG_I2C_MPC=y | |||
548 | # | 614 | # |
549 | # USB support | 615 | # USB support |
550 | # | 616 | # |
551 | # CONFIG_USB is not set | ||
552 | CONFIG_USB_ARCH_HAS_HCD=y | 617 | CONFIG_USB_ARCH_HAS_HCD=y |
553 | CONFIG_USB_ARCH_HAS_OHCI=y | 618 | CONFIG_USB_ARCH_HAS_OHCI=y |
554 | 619 | # CONFIG_USB is not set | |
555 | # | ||
556 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
557 | # | ||
558 | 620 | ||
559 | # | 621 | # |
560 | # USB Gadget Support | 622 | # USB Gadget Support |
@@ -585,6 +647,10 @@ CONFIG_JBD=y | |||
585 | CONFIG_FS_MBCACHE=y | 647 | CONFIG_FS_MBCACHE=y |
586 | # CONFIG_REISERFS_FS is not set | 648 | # CONFIG_REISERFS_FS is not set |
587 | # CONFIG_JFS_FS is not set | 649 | # CONFIG_JFS_FS is not set |
650 | |||
651 | # | ||
652 | # XFS support | ||
653 | # | ||
588 | # CONFIG_XFS_FS is not set | 654 | # CONFIG_XFS_FS is not set |
589 | # CONFIG_MINIX_FS is not set | 655 | # CONFIG_MINIX_FS is not set |
590 | # CONFIG_ROMFS_FS is not set | 656 | # CONFIG_ROMFS_FS is not set |
@@ -646,7 +712,6 @@ CONFIG_NFS_FS=y | |||
646 | # CONFIG_NFSD is not set | 712 | # CONFIG_NFSD is not set |
647 | CONFIG_ROOT_NFS=y | 713 | CONFIG_ROOT_NFS=y |
648 | CONFIG_LOCKD=y | 714 | CONFIG_LOCKD=y |
649 | # CONFIG_EXPORTFS is not set | ||
650 | CONFIG_SUNRPC=y | 715 | CONFIG_SUNRPC=y |
651 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 716 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
652 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 717 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
@@ -698,7 +763,9 @@ CONFIG_CRC32=y | |||
698 | # | 763 | # |
699 | # Kernel hacking | 764 | # Kernel hacking |
700 | # | 765 | # |
766 | # CONFIG_PRINTK_TIME is not set | ||
701 | # CONFIG_DEBUG_KERNEL is not set | 767 | # CONFIG_DEBUG_KERNEL is not set |
768 | CONFIG_LOG_BUF_SHIFT=14 | ||
702 | # CONFIG_KGDB_CONSOLE is not set | 769 | # CONFIG_KGDB_CONSOLE is not set |
703 | # CONFIG_SERIAL_TEXT_DEBUG is not set | 770 | # CONFIG_SERIAL_TEXT_DEBUG is not set |
704 | 771 | ||
diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S index f22ddce36135..ce36e88ba627 100644 --- a/arch/ppc/kernel/head_fsl_booke.S +++ b/arch/ppc/kernel/head_fsl_booke.S | |||
@@ -232,7 +232,8 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
232 | tlbwe | 232 | tlbwe |
233 | 233 | ||
234 | /* 7. Jump to KERNELBASE mapping */ | 234 | /* 7. Jump to KERNELBASE mapping */ |
235 | li r7,0 | 235 | lis r7,MSR_KERNEL@h |
236 | ori r7,r7,MSR_KERNEL@l | ||
236 | bl 1f /* Find our address */ | 237 | bl 1f /* Find our address */ |
237 | 1: mflr r9 | 238 | 1: mflr r9 |
238 | rlwimi r6,r9,0,20,31 | 239 | rlwimi r6,r9,0,20,31 |
@@ -293,6 +294,18 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
293 | mtspr SPRN_HID0, r2 | 294 | mtspr SPRN_HID0, r2 |
294 | #endif | 295 | #endif |
295 | 296 | ||
297 | #if !defined(CONFIG_BDI_SWITCH) | ||
298 | /* | ||
299 | * The Abatron BDI JTAG debugger does not tolerate others | ||
300 | * mucking with the debug registers. | ||
301 | */ | ||
302 | lis r2,DBCR0_IDM@h | ||
303 | mtspr SPRN_DBCR0,r2 | ||
304 | /* clear any residual debug events */ | ||
305 | li r2,-1 | ||
306 | mtspr SPRN_DBSR,r2 | ||
307 | #endif | ||
308 | |||
296 | /* | 309 | /* |
297 | * This is where the main kernel code starts. | 310 | * This is where the main kernel code starts. |
298 | */ | 311 | */ |
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index f8e7e324a173..c65731e8bc65 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -408,12 +408,7 @@ static int emulate_string_inst(struct pt_regs *regs, u32 instword) | |||
408 | 408 | ||
409 | /* Early out if we are an invalid form of lswx */ | 409 | /* Early out if we are an invalid form of lswx */ |
410 | if ((instword & INST_STRING_MASK) == INST_LSWX) | 410 | if ((instword & INST_STRING_MASK) == INST_LSWX) |
411 | if ((rA >= rT) || (NB_RB >= rT) || (rT == rA) || (rT == NB_RB)) | 411 | if ((rT == rA) || (rT == NB_RB)) |
412 | return -EINVAL; | ||
413 | |||
414 | /* Early out if we are an invalid form of lswi */ | ||
415 | if ((instword & INST_STRING_MASK) == INST_LSWI) | ||
416 | if ((rA >= rT) || (rT == rA)) | ||
417 | return -EINVAL; | 412 | return -EINVAL; |
418 | 413 | ||
419 | EA = (rA == 0) ? 0 : regs->gpr[rA]; | 414 | EA = (rA == 0) ? 0 : regs->gpr[rA]; |
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c index b3b0f51979d2..e6348b5a1ddc 100644 --- a/arch/ppc/platforms/83xx/mpc834x_sys.c +++ b/arch/ppc/platforms/83xx/mpc834x_sys.c | |||
@@ -127,7 +127,6 @@ mpc834x_sys_map_io(void) | |||
127 | { | 127 | { |
128 | /* we steal the lowest ioremap addr for virt space */ | 128 | /* we steal the lowest ioremap addr for virt space */ |
129 | io_block_mapping(VIRT_IMMRBAR, immrbar, 1024*1024, _PAGE_IO); | 129 | io_block_mapping(VIRT_IMMRBAR, immrbar, 1024*1024, _PAGE_IO); |
130 | io_block_mapping(BCSR_VIRT_ADDR, BCSR_PHYS_ADDR, BCSR_SIZE, _PAGE_IO); | ||
131 | } | 130 | } |
132 | 131 | ||
133 | int | 132 | int |
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.h b/arch/ppc/platforms/83xx/mpc834x_sys.h index f4d055ae19c1..a2f6e49d7151 100644 --- a/arch/ppc/platforms/83xx/mpc834x_sys.h +++ b/arch/ppc/platforms/83xx/mpc834x_sys.h | |||
@@ -26,9 +26,14 @@ | |||
26 | #define VIRT_IMMRBAR ((uint)0xfe000000) | 26 | #define VIRT_IMMRBAR ((uint)0xfe000000) |
27 | 27 | ||
28 | #define BCSR_PHYS_ADDR ((uint)0xf8000000) | 28 | #define BCSR_PHYS_ADDR ((uint)0xf8000000) |
29 | #define BCSR_VIRT_ADDR ((uint)0xfe100000) | ||
30 | #define BCSR_SIZE ((uint)(32 * 1024)) | 29 | #define BCSR_SIZE ((uint)(32 * 1024)) |
31 | 30 | ||
31 | #define BCSR_MISC_REG2_OFF 0x07 | ||
32 | #define BCSR_MISC_REG2_PORESET 0x01 | ||
33 | |||
34 | #define BCSR_MISC_REG3_OFF 0x08 | ||
35 | #define BCSR_MISC_REG3_CNFLOCK 0x80 | ||
36 | |||
32 | #ifdef CONFIG_PCI | 37 | #ifdef CONFIG_PCI |
33 | /* PCI interrupt controller */ | 38 | /* PCI interrupt controller */ |
34 | #define PIRQA MPC83xx_IRQ_IRQ4 | 39 | #define PIRQA MPC83xx_IRQ_IRQ4 |
diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.c b/arch/ppc/platforms/85xx/mpc8540_ads.c index 4d857d6d633d..583838ab02d8 100644 --- a/arch/ppc/platforms/85xx/mpc8540_ads.c +++ b/arch/ppc/platforms/85xx/mpc8540_ads.c | |||
@@ -210,6 +210,9 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
210 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) | 210 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) |
211 | ppc_md.progress = gen550_progress; | 211 | ppc_md.progress = gen550_progress; |
212 | #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ | 212 | #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ |
213 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB) | ||
214 | ppc_md.early_serial_map = mpc85xx_early_serial_map; | ||
215 | #endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */ | ||
213 | 216 | ||
214 | if (ppc_md.progress) | 217 | if (ppc_md.progress) |
215 | ppc_md.progress("mpc8540ads_init(): exit", 0); | 218 | ppc_md.progress("mpc8540ads_init(): exit", 0); |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c index 6c020d67ad70..e7cfa498568c 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <asm/machdep.h> | 44 | #include <asm/machdep.h> |
45 | #include <asm/prom.h> | 45 | #include <asm/prom.h> |
46 | #include <asm/open_pic.h> | 46 | #include <asm/open_pic.h> |
47 | #include <asm/i8259.h> | ||
47 | #include <asm/bootinfo.h> | 48 | #include <asm/bootinfo.h> |
48 | #include <asm/pci-bridge.h> | 49 | #include <asm/pci-bridge.h> |
49 | #include <asm/mpc85xx.h> | 50 | #include <asm/mpc85xx.h> |
@@ -181,6 +182,7 @@ void __init | |||
181 | mpc85xx_cds_init_IRQ(void) | 182 | mpc85xx_cds_init_IRQ(void) |
182 | { | 183 | { |
183 | bd_t *binfo = (bd_t *) __res; | 184 | bd_t *binfo = (bd_t *) __res; |
185 | int i; | ||
184 | 186 | ||
185 | /* Determine the Physical Address of the OpenPIC regs */ | 187 | /* Determine the Physical Address of the OpenPIC regs */ |
186 | phys_addr_t OpenPIC_PAddr = binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET; | 188 | phys_addr_t OpenPIC_PAddr = binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET; |
@@ -198,6 +200,15 @@ mpc85xx_cds_init_IRQ(void) | |||
198 | */ | 200 | */ |
199 | openpic_init(MPC85xx_OPENPIC_IRQ_OFFSET); | 201 | openpic_init(MPC85xx_OPENPIC_IRQ_OFFSET); |
200 | 202 | ||
203 | #ifdef CONFIG_PCI | ||
204 | openpic_hookup_cascade(PIRQ0A, "82c59 cascade", i8259_irq); | ||
205 | |||
206 | for (i = 0; i < NUM_8259_INTERRUPTS; i++) | ||
207 | irq_desc[i].handler = &i8259_pic; | ||
208 | |||
209 | i8259_init(0); | ||
210 | #endif | ||
211 | |||
201 | #ifdef CONFIG_CPM2 | 212 | #ifdef CONFIG_CPM2 |
202 | /* Setup CPM2 PIC */ | 213 | /* Setup CPM2 PIC */ |
203 | cpm2_init_IRQ(); | 214 | cpm2_init_IRQ(); |
@@ -231,7 +242,7 @@ mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | |||
231 | * interrupt on slot */ | 242 | * interrupt on slot */ |
232 | { | 243 | { |
233 | { 0, 1, 2, 3 }, /* 16 - PMC */ | 244 | { 0, 1, 2, 3 }, /* 16 - PMC */ |
234 | { 3, 0, 0, 0 }, /* 17 P2P (Tsi320) */ | 245 | { 0, 1, 2, 3 }, /* 17 P2P (Tsi320) */ |
235 | { 0, 1, 2, 3 }, /* 18 - Slot 1 */ | 246 | { 0, 1, 2, 3 }, /* 18 - Slot 1 */ |
236 | { 1, 2, 3, 0 }, /* 19 - Slot 2 */ | 247 | { 1, 2, 3, 0 }, /* 19 - Slot 2 */ |
237 | { 2, 3, 0, 1 }, /* 20 - Slot 3 */ | 248 | { 2, 3, 0, 1 }, /* 20 - Slot 3 */ |
@@ -280,13 +291,135 @@ mpc85xx_exclude_device(u_char bus, u_char devfn) | |||
280 | return PCIBIOS_DEVICE_NOT_FOUND; | 291 | return PCIBIOS_DEVICE_NOT_FOUND; |
281 | #endif | 292 | #endif |
282 | /* We explicitly do not go past the Tundra 320 Bridge */ | 293 | /* We explicitly do not go past the Tundra 320 Bridge */ |
283 | if (bus == 1) | 294 | if ((bus == 1) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL)) |
284 | return PCIBIOS_DEVICE_NOT_FOUND; | 295 | return PCIBIOS_DEVICE_NOT_FOUND; |
285 | if ((bus == 0) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL)) | 296 | if ((bus == 0) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL)) |
286 | return PCIBIOS_DEVICE_NOT_FOUND; | 297 | return PCIBIOS_DEVICE_NOT_FOUND; |
287 | else | 298 | else |
288 | return PCIBIOS_SUCCESSFUL; | 299 | return PCIBIOS_SUCCESSFUL; |
289 | } | 300 | } |
301 | |||
302 | void __init | ||
303 | mpc85xx_cds_enable_via(struct pci_controller *hose) | ||
304 | { | ||
305 | u32 pci_class; | ||
306 | u16 vid, did; | ||
307 | |||
308 | early_read_config_dword(hose, 0, 0x88, PCI_CLASS_REVISION, &pci_class); | ||
309 | if ((pci_class >> 16) != PCI_CLASS_BRIDGE_PCI) | ||
310 | return; | ||
311 | |||
312 | /* Configure P2P so that we can reach bus 1 */ | ||
313 | early_write_config_byte(hose, 0, 0x88, PCI_PRIMARY_BUS, 0); | ||
314 | early_write_config_byte(hose, 0, 0x88, PCI_SECONDARY_BUS, 1); | ||
315 | early_write_config_byte(hose, 0, 0x88, PCI_SUBORDINATE_BUS, 0xff); | ||
316 | |||
317 | early_read_config_word(hose, 1, 0x10, PCI_VENDOR_ID, &vid); | ||
318 | early_read_config_word(hose, 1, 0x10, PCI_DEVICE_ID, &did); | ||
319 | |||
320 | if ((vid != PCI_VENDOR_ID_VIA) || | ||
321 | (did != PCI_DEVICE_ID_VIA_82C686)) | ||
322 | return; | ||
323 | |||
324 | /* Enable USB and IDE functions */ | ||
325 | early_write_config_byte(hose, 1, 0x10, 0x48, 0x08); | ||
326 | } | ||
327 | |||
328 | void __init | ||
329 | mpc85xx_cds_fixup_via(struct pci_controller *hose) | ||
330 | { | ||
331 | u32 pci_class; | ||
332 | u16 vid, did; | ||
333 | |||
334 | early_read_config_dword(hose, 0, 0x88, PCI_CLASS_REVISION, &pci_class); | ||
335 | if ((pci_class >> 16) != PCI_CLASS_BRIDGE_PCI) | ||
336 | return; | ||
337 | |||
338 | /* | ||
339 | * Force the backplane P2P bridge to have a window | ||
340 | * open from 0x00000000-0x00001fff in PCI I/O space. | ||
341 | * This allows legacy I/O (i8259, etc) on the VIA | ||
342 | * southbridge to be accessed. | ||
343 | */ | ||
344 | early_write_config_byte(hose, 0, 0x88, PCI_IO_BASE, 0x00); | ||
345 | early_write_config_word(hose, 0, 0x88, PCI_IO_BASE_UPPER16, 0x0000); | ||
346 | early_write_config_byte(hose, 0, 0x88, PCI_IO_LIMIT, 0x10); | ||
347 | early_write_config_word(hose, 0, 0x88, PCI_IO_LIMIT_UPPER16, 0x0000); | ||
348 | |||
349 | early_read_config_word(hose, 1, 0x10, PCI_VENDOR_ID, &vid); | ||
350 | early_read_config_word(hose, 1, 0x10, PCI_DEVICE_ID, &did); | ||
351 | if ((vid != PCI_VENDOR_ID_VIA) || | ||
352 | (did != PCI_DEVICE_ID_VIA_82C686)) | ||
353 | return; | ||
354 | |||
355 | /* | ||
356 | * Since the P2P window was forced to cover the fixed | ||
357 | * legacy I/O addresses, it is necessary to manually | ||
358 | * place the base addresses for the IDE and USB functions | ||
359 | * within this window. | ||
360 | */ | ||
361 | /* Function 1, IDE */ | ||
362 | early_write_config_dword(hose, 1, 0x11, PCI_BASE_ADDRESS_0, 0x1ff8); | ||
363 | early_write_config_dword(hose, 1, 0x11, PCI_BASE_ADDRESS_1, 0x1ff4); | ||
364 | early_write_config_dword(hose, 1, 0x11, PCI_BASE_ADDRESS_2, 0x1fe8); | ||
365 | early_write_config_dword(hose, 1, 0x11, PCI_BASE_ADDRESS_3, 0x1fe4); | ||
366 | early_write_config_dword(hose, 1, 0x11, PCI_BASE_ADDRESS_4, 0x1fd0); | ||
367 | |||
368 | /* Function 2, USB ports 0-1 */ | ||
369 | early_write_config_dword(hose, 1, 0x12, PCI_BASE_ADDRESS_4, 0x1fa0); | ||
370 | |||
371 | /* Function 3, USB ports 2-3 */ | ||
372 | early_write_config_dword(hose, 1, 0x13, PCI_BASE_ADDRESS_4, 0x1f80); | ||
373 | |||
374 | /* Function 5, Power Management */ | ||
375 | early_write_config_dword(hose, 1, 0x15, PCI_BASE_ADDRESS_0, 0x1e00); | ||
376 | early_write_config_dword(hose, 1, 0x15, PCI_BASE_ADDRESS_1, 0x1dfc); | ||
377 | early_write_config_dword(hose, 1, 0x15, PCI_BASE_ADDRESS_2, 0x1df8); | ||
378 | |||
379 | /* Function 6, AC97 Interface */ | ||
380 | early_write_config_dword(hose, 1, 0x16, PCI_BASE_ADDRESS_0, 0x1c00); | ||
381 | } | ||
382 | |||
383 | void __init | ||
384 | mpc85xx_cds_pcibios_fixup(void) | ||
385 | { | ||
386 | struct pci_dev *dev = NULL; | ||
387 | u_char c; | ||
388 | |||
389 | if ((dev = pci_find_device(PCI_VENDOR_ID_VIA, | ||
390 | PCI_DEVICE_ID_VIA_82C586_1, NULL))) { | ||
391 | /* | ||
392 | * U-Boot does not set the enable bits | ||
393 | * for the IDE device. Force them on here. | ||
394 | */ | ||
395 | pci_read_config_byte(dev, 0x40, &c); | ||
396 | c |= 0x03; /* IDE: Chip Enable Bits */ | ||
397 | pci_write_config_byte(dev, 0x40, c); | ||
398 | |||
399 | /* | ||
400 | * Since only primary interface works, force the | ||
401 | * IDE function to standard primary IDE interrupt | ||
402 | * w/ 8259 offset | ||
403 | */ | ||
404 | dev->irq = 14; | ||
405 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); | ||
406 | } | ||
407 | |||
408 | /* | ||
409 | * Force legacy USB interrupt routing | ||
410 | */ | ||
411 | if ((dev = pci_find_device(PCI_VENDOR_ID_VIA, | ||
412 | PCI_DEVICE_ID_VIA_82C586_2, NULL))) { | ||
413 | dev->irq = 10; | ||
414 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 10); | ||
415 | } | ||
416 | |||
417 | if ((dev = pci_find_device(PCI_VENDOR_ID_VIA, | ||
418 | PCI_DEVICE_ID_VIA_82C586_2, dev))) { | ||
419 | dev->irq = 11; | ||
420 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 11); | ||
421 | } | ||
422 | } | ||
290 | #endif /* CONFIG_PCI */ | 423 | #endif /* CONFIG_PCI */ |
291 | 424 | ||
292 | TODC_ALLOC(); | 425 | TODC_ALLOC(); |
@@ -328,6 +461,9 @@ mpc85xx_cds_setup_arch(void) | |||
328 | loops_per_jiffy = freq / HZ; | 461 | loops_per_jiffy = freq / HZ; |
329 | 462 | ||
330 | #ifdef CONFIG_PCI | 463 | #ifdef CONFIG_PCI |
464 | /* VIA IDE configuration */ | ||
465 | ppc_md.pcibios_fixup = mpc85xx_cds_pcibios_fixup; | ||
466 | |||
331 | /* setup PCI host bridges */ | 467 | /* setup PCI host bridges */ |
332 | mpc85xx_setup_hose(); | 468 | mpc85xx_setup_hose(); |
333 | #endif | 469 | #endif |
@@ -459,6 +595,9 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
459 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) | 595 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) |
460 | ppc_md.progress = gen550_progress; | 596 | ppc_md.progress = gen550_progress; |
461 | #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ | 597 | #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ |
598 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB) | ||
599 | ppc_md.early_serial_map = mpc85xx_early_serial_map; | ||
600 | #endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */ | ||
462 | 601 | ||
463 | if (ppc_md.progress) | 602 | if (ppc_md.progress) |
464 | ppc_md.progress("mpc85xx_cds_init(): exit", 0); | 603 | ppc_md.progress("mpc85xx_cds_init(): exit", 0); |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h index 7627d77504bd..12b292c6ae32 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h | |||
@@ -77,4 +77,7 @@ | |||
77 | 77 | ||
78 | #define MPC85XX_PCI2_IO_SIZE 0x01000000 | 78 | #define MPC85XX_PCI2_IO_SIZE 0x01000000 |
79 | 79 | ||
80 | #define NR_8259_INTS 16 | ||
81 | #define CPM_IRQ_OFFSET NR_8259_INTS | ||
82 | |||
80 | #endif /* __MACH_MPC85XX_CDS_H__ */ | 83 | #endif /* __MACH_MPC85XX_CDS_H__ */ |
diff --git a/arch/ppc/platforms/85xx/sbc8560.c b/arch/ppc/platforms/85xx/sbc8560.c index 9ab05e590c3e..7b9e1543e175 100644 --- a/arch/ppc/platforms/85xx/sbc8560.c +++ b/arch/ppc/platforms/85xx/sbc8560.c | |||
@@ -221,6 +221,9 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
221 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) | 221 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) |
222 | ppc_md.progress = gen550_progress; | 222 | ppc_md.progress = gen550_progress; |
223 | #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ | 223 | #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ |
224 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB) | ||
225 | ppc_md.early_serial_map = sbc8560_early_serial_map; | ||
226 | #endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */ | ||
224 | 227 | ||
225 | if (ppc_md.progress) | 228 | if (ppc_md.progress) |
226 | ppc_md.progress("sbc8560_init(): exit", 0); | 229 | ppc_md.progress("sbc8560_init(): exit", 0); |
diff --git a/arch/ppc/platforms/pmac_cpufreq.c b/arch/ppc/platforms/pmac_cpufreq.c index f7fb2786cd50..937f46df711e 100644 --- a/arch/ppc/platforms/pmac_cpufreq.c +++ b/arch/ppc/platforms/pmac_cpufreq.c | |||
@@ -85,14 +85,11 @@ static int no_schedule; | |||
85 | static int has_cpu_l2lve; | 85 | static int has_cpu_l2lve; |
86 | 86 | ||
87 | 87 | ||
88 | #define PMAC_CPU_LOW_SPEED 1 | ||
89 | #define PMAC_CPU_HIGH_SPEED 0 | ||
90 | |||
91 | /* There are only two frequency states for each processor. Values | 88 | /* There are only two frequency states for each processor. Values |
92 | * are in kHz for the time being. | 89 | * are in kHz for the time being. |
93 | */ | 90 | */ |
94 | #define CPUFREQ_HIGH PMAC_CPU_HIGH_SPEED | 91 | #define CPUFREQ_HIGH 0 |
95 | #define CPUFREQ_LOW PMAC_CPU_LOW_SPEED | 92 | #define CPUFREQ_LOW 1 |
96 | 93 | ||
97 | static struct cpufreq_frequency_table pmac_cpu_freqs[] = { | 94 | static struct cpufreq_frequency_table pmac_cpu_freqs[] = { |
98 | {CPUFREQ_HIGH, 0}, | 95 | {CPUFREQ_HIGH, 0}, |
@@ -100,6 +97,11 @@ static struct cpufreq_frequency_table pmac_cpu_freqs[] = { | |||
100 | {0, CPUFREQ_TABLE_END}, | 97 | {0, CPUFREQ_TABLE_END}, |
101 | }; | 98 | }; |
102 | 99 | ||
100 | static struct freq_attr* pmac_cpu_freqs_attr[] = { | ||
101 | &cpufreq_freq_attr_scaling_available_freqs, | ||
102 | NULL, | ||
103 | }; | ||
104 | |||
103 | static inline void local_delay(unsigned long ms) | 105 | static inline void local_delay(unsigned long ms) |
104 | { | 106 | { |
105 | if (no_schedule) | 107 | if (no_schedule) |
@@ -269,6 +271,8 @@ static int __pmac pmu_set_cpu_speed(int low_speed) | |||
269 | #ifdef DEBUG_FREQ | 271 | #ifdef DEBUG_FREQ |
270 | printk(KERN_DEBUG "HID1, before: %x\n", mfspr(SPRN_HID1)); | 272 | printk(KERN_DEBUG "HID1, before: %x\n", mfspr(SPRN_HID1)); |
271 | #endif | 273 | #endif |
274 | pmu_suspend(); | ||
275 | |||
272 | /* Disable all interrupt sources on openpic */ | 276 | /* Disable all interrupt sources on openpic */ |
273 | pic_prio = openpic_get_priority(); | 277 | pic_prio = openpic_get_priority(); |
274 | openpic_set_priority(0xf); | 278 | openpic_set_priority(0xf); |
@@ -343,6 +347,8 @@ static int __pmac pmu_set_cpu_speed(int low_speed) | |||
343 | debug_calc_bogomips(); | 347 | debug_calc_bogomips(); |
344 | #endif | 348 | #endif |
345 | 349 | ||
350 | pmu_resume(); | ||
351 | |||
346 | preempt_enable(); | 352 | preempt_enable(); |
347 | 353 | ||
348 | return 0; | 354 | return 0; |
@@ -355,7 +361,7 @@ static int __pmac do_set_cpu_speed(int speed_mode, int notify) | |||
355 | static unsigned long prev_l3cr; | 361 | static unsigned long prev_l3cr; |
356 | 362 | ||
357 | freqs.old = cur_freq; | 363 | freqs.old = cur_freq; |
358 | freqs.new = (speed_mode == PMAC_CPU_HIGH_SPEED) ? hi_freq : low_freq; | 364 | freqs.new = (speed_mode == CPUFREQ_HIGH) ? hi_freq : low_freq; |
359 | freqs.cpu = smp_processor_id(); | 365 | freqs.cpu = smp_processor_id(); |
360 | 366 | ||
361 | if (freqs.old == freqs.new) | 367 | if (freqs.old == freqs.new) |
@@ -363,7 +369,7 @@ static int __pmac do_set_cpu_speed(int speed_mode, int notify) | |||
363 | 369 | ||
364 | if (notify) | 370 | if (notify) |
365 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 371 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
366 | if (speed_mode == PMAC_CPU_LOW_SPEED && | 372 | if (speed_mode == CPUFREQ_LOW && |
367 | cpu_has_feature(CPU_FTR_L3CR)) { | 373 | cpu_has_feature(CPU_FTR_L3CR)) { |
368 | l3cr = _get_L3CR(); | 374 | l3cr = _get_L3CR(); |
369 | if (l3cr & L3CR_L3E) { | 375 | if (l3cr & L3CR_L3E) { |
@@ -371,8 +377,8 @@ static int __pmac do_set_cpu_speed(int speed_mode, int notify) | |||
371 | _set_L3CR(0); | 377 | _set_L3CR(0); |
372 | } | 378 | } |
373 | } | 379 | } |
374 | set_speed_proc(speed_mode == PMAC_CPU_LOW_SPEED); | 380 | set_speed_proc(speed_mode == CPUFREQ_LOW); |
375 | if (speed_mode == PMAC_CPU_HIGH_SPEED && | 381 | if (speed_mode == CPUFREQ_HIGH && |
376 | cpu_has_feature(CPU_FTR_L3CR)) { | 382 | cpu_has_feature(CPU_FTR_L3CR)) { |
377 | l3cr = _get_L3CR(); | 383 | l3cr = _get_L3CR(); |
378 | if ((prev_l3cr & L3CR_L3E) && l3cr != prev_l3cr) | 384 | if ((prev_l3cr & L3CR_L3E) && l3cr != prev_l3cr) |
@@ -380,7 +386,7 @@ static int __pmac do_set_cpu_speed(int speed_mode, int notify) | |||
380 | } | 386 | } |
381 | if (notify) | 387 | if (notify) |
382 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 388 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
383 | cur_freq = (speed_mode == PMAC_CPU_HIGH_SPEED) ? hi_freq : low_freq; | 389 | cur_freq = (speed_mode == CPUFREQ_HIGH) ? hi_freq : low_freq; |
384 | 390 | ||
385 | return 0; | 391 | return 0; |
386 | } | 392 | } |
@@ -423,7 +429,8 @@ static int __pmac pmac_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
423 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; | 429 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; |
424 | policy->cur = cur_freq; | 430 | policy->cur = cur_freq; |
425 | 431 | ||
426 | return cpufreq_frequency_table_cpuinfo(policy, &pmac_cpu_freqs[0]); | 432 | cpufreq_frequency_table_get_attr(pmac_cpu_freqs, policy->cpu); |
433 | return cpufreq_frequency_table_cpuinfo(policy, pmac_cpu_freqs); | ||
427 | } | 434 | } |
428 | 435 | ||
429 | static u32 __pmac read_gpio(struct device_node *np) | 436 | static u32 __pmac read_gpio(struct device_node *np) |
@@ -457,7 +464,7 @@ static int __pmac pmac_cpufreq_suspend(struct cpufreq_policy *policy, u32 state) | |||
457 | no_schedule = 1; | 464 | no_schedule = 1; |
458 | sleep_freq = cur_freq; | 465 | sleep_freq = cur_freq; |
459 | if (cur_freq == low_freq) | 466 | if (cur_freq == low_freq) |
460 | do_set_cpu_speed(PMAC_CPU_HIGH_SPEED, 0); | 467 | do_set_cpu_speed(CPUFREQ_HIGH, 0); |
461 | return 0; | 468 | return 0; |
462 | } | 469 | } |
463 | 470 | ||
@@ -473,8 +480,8 @@ static int __pmac pmac_cpufreq_resume(struct cpufreq_policy *policy) | |||
473 | * is that we force a switch to whatever it was, which is | 480 | * is that we force a switch to whatever it was, which is |
474 | * probably high speed due to our suspend() routine | 481 | * probably high speed due to our suspend() routine |
475 | */ | 482 | */ |
476 | do_set_cpu_speed(sleep_freq == low_freq ? PMAC_CPU_LOW_SPEED | 483 | do_set_cpu_speed(sleep_freq == low_freq ? |
477 | : PMAC_CPU_HIGH_SPEED, 0); | 484 | CPUFREQ_LOW : CPUFREQ_HIGH, 0); |
478 | 485 | ||
479 | no_schedule = 0; | 486 | no_schedule = 0; |
480 | return 0; | 487 | return 0; |
@@ -488,6 +495,7 @@ static struct cpufreq_driver pmac_cpufreq_driver = { | |||
488 | .suspend = pmac_cpufreq_suspend, | 495 | .suspend = pmac_cpufreq_suspend, |
489 | .resume = pmac_cpufreq_resume, | 496 | .resume = pmac_cpufreq_resume, |
490 | .flags = CPUFREQ_PM_NO_WARN, | 497 | .flags = CPUFREQ_PM_NO_WARN, |
498 | .attr = pmac_cpu_freqs_attr, | ||
491 | .name = "powermac", | 499 | .name = "powermac", |
492 | .owner = THIS_MODULE, | 500 | .owner = THIS_MODULE, |
493 | }; | 501 | }; |
diff --git a/arch/ppc/platforms/pq2ads.h b/arch/ppc/platforms/pq2ads.h index cf5e5dd06d63..067d9a5aebc1 100644 --- a/arch/ppc/platforms/pq2ads.h +++ b/arch/ppc/platforms/pq2ads.h | |||
@@ -49,10 +49,10 @@ | |||
49 | /* PCI interrupt controller */ | 49 | /* PCI interrupt controller */ |
50 | #define PCI_INT_STAT_REG 0xF8200000 | 50 | #define PCI_INT_STAT_REG 0xF8200000 |
51 | #define PCI_INT_MASK_REG 0xF8200004 | 51 | #define PCI_INT_MASK_REG 0xF8200004 |
52 | #define PIRQA (NR_SIU_INTS + 0) | 52 | #define PIRQA (NR_CPM_INTS + 0) |
53 | #define PIRQB (NR_SIU_INTS + 1) | 53 | #define PIRQB (NR_CPM_INTS + 1) |
54 | #define PIRQC (NR_SIU_INTS + 2) | 54 | #define PIRQC (NR_CPM_INTS + 2) |
55 | #define PIRQD (NR_SIU_INTS + 3) | 55 | #define PIRQD (NR_CPM_INTS + 3) |
56 | 56 | ||
57 | /* | 57 | /* |
58 | * PCI memory map definitions for MPC8266ADS-PCI. | 58 | * PCI memory map definitions for MPC8266ADS-PCI. |
@@ -68,28 +68,23 @@ | |||
68 | * 0x00000000-0x1FFFFFFF 0x00000000-0x1FFFFFFF MPC8266 local memory | 68 | * 0x00000000-0x1FFFFFFF 0x00000000-0x1FFFFFFF MPC8266 local memory |
69 | */ | 69 | */ |
70 | 70 | ||
71 | /* window for a PCI master to access MPC8266 memory */ | 71 | /* All the other PCI memory map definitions reside at syslib/m82xx_pci.h |
72 | #define PCI_SLV_MEM_LOCAL 0x00000000 /* Local base */ | 72 | Here we should redefine what is unique for this board */ |
73 | #define PCI_SLV_MEM_BUS 0x00000000 /* PCI base */ | 73 | #define M82xx_PCI_SLAVE_MEM_LOCAL 0x00000000 /* Local base */ |
74 | #define M82xx_PCI_SLAVE_MEM_BUS 0x00000000 /* PCI base */ | ||
75 | #define M82xx_PCI_SLAVE_MEM_SIZE 0x10000000 /* 256 Mb */ | ||
74 | 76 | ||
75 | /* window for the processor to access PCI memory with prefetching */ | 77 | #define M82xx_PCI_SLAVE_SEC_WND_SIZE ~(0x40000000 - 1U) /* 2 x 512Mb */ |
76 | #define PCI_MSTR_MEM_LOCAL 0x80000000 /* Local base */ | 78 | #define M82xx_PCI_SLAVE_SEC_WND_BASE 0x80000000 /* PCI Memory base */ |
77 | #define PCI_MSTR_MEM_BUS 0x80000000 /* PCI base */ | ||
78 | #define PCI_MSTR_MEM_SIZE 0x20000000 /* 512MB */ | ||
79 | 79 | ||
80 | /* window for the processor to access PCI memory without prefetching */ | 80 | #if defined(CONFIG_ADS8272) |
81 | #define PCI_MSTR_MEMIO_LOCAL 0xA0000000 /* Local base */ | 81 | #define PCI_INT_TO_SIU SIU_INT_IRQ2 |
82 | #define PCI_MSTR_MEMIO_BUS 0xA0000000 /* PCI base */ | 82 | #elif defined(CONFIG_PQ2FADS) |
83 | #define PCI_MSTR_MEMIO_SIZE 0x20000000 /* 512MB */ | 83 | #define PCI_INT_TO_SIU SIU_INT_IRQ6 |
84 | #else | ||
85 | #warning PCI Bridge will be without interrupts support | ||
86 | #endif | ||
84 | 87 | ||
85 | /* window for the processor to access PCI I/O */ | ||
86 | #define PCI_MSTR_IO_LOCAL 0xF4000000 /* Local base */ | ||
87 | #define PCI_MSTR_IO_BUS 0x00000000 /* PCI base */ | ||
88 | #define PCI_MSTR_IO_SIZE 0x04000000 /* 64MB */ | ||
89 | |||
90 | #define _IO_BASE PCI_MSTR_IO_LOCAL | ||
91 | #define _ISA_MEM_BASE PCI_MSTR_MEMIO_LOCAL | ||
92 | #define PCI_DRAM_OFFSET PCI_SLV_MEM_BUS | ||
93 | #endif /* CONFIG_PCI */ | 88 | #endif /* CONFIG_PCI */ |
94 | 89 | ||
95 | #endif /* __MACH_ADS8260_DEFS */ | 90 | #endif /* __MACH_ADS8260_DEFS */ |
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile index dd418ea3426c..96acf85800d4 100644 --- a/arch/ppc/syslib/Makefile +++ b/arch/ppc/syslib/Makefile | |||
@@ -81,7 +81,7 @@ obj-$(CONFIG_SBC82xx) += todc_time.o | |||
81 | obj-$(CONFIG_SPRUCE) += cpc700_pic.o indirect_pci.o pci_auto.o \ | 81 | obj-$(CONFIG_SPRUCE) += cpc700_pic.o indirect_pci.o pci_auto.o \ |
82 | todc_time.o | 82 | todc_time.o |
83 | obj-$(CONFIG_8260) += m8260_setup.o | 83 | obj-$(CONFIG_8260) += m8260_setup.o |
84 | obj-$(CONFIG_PCI_8260) += m8260_pci.o indirect_pci.o | 84 | obj-$(CONFIG_PCI_8260) += m82xx_pci.o indirect_pci.o pci_auto.o |
85 | obj-$(CONFIG_8260_PCI9) += m8260_pci_erratum9.o | 85 | obj-$(CONFIG_8260_PCI9) += m8260_pci_erratum9.o |
86 | obj-$(CONFIG_CPM2) += cpm2_common.o cpm2_pic.o | 86 | obj-$(CONFIG_CPM2) += cpm2_common.o cpm2_pic.o |
87 | ifeq ($(CONFIG_PPC_GEN550),y) | 87 | ifeq ($(CONFIG_PPC_GEN550),y) |
@@ -97,7 +97,7 @@ obj-$(CONFIG_MPC10X_OPENPIC) += open_pic.o | |||
97 | obj-$(CONFIG_40x) += dcr.o | 97 | obj-$(CONFIG_40x) += dcr.o |
98 | obj-$(CONFIG_BOOKE) += dcr.o | 98 | obj-$(CONFIG_BOOKE) += dcr.o |
99 | obj-$(CONFIG_85xx) += open_pic.o ppc85xx_common.o ppc85xx_setup.o \ | 99 | obj-$(CONFIG_85xx) += open_pic.o ppc85xx_common.o ppc85xx_setup.o \ |
100 | ppc_sys.o mpc85xx_sys.o \ | 100 | ppc_sys.o i8259.o mpc85xx_sys.o \ |
101 | mpc85xx_devices.o | 101 | mpc85xx_devices.o |
102 | ifeq ($(CONFIG_85xx),y) | 102 | ifeq ($(CONFIG_85xx),y) |
103 | obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o | 103 | obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o |
diff --git a/arch/ppc/syslib/m8260_pci.c b/arch/ppc/syslib/m8260_pci.c deleted file mode 100644 index 057cc3f8ff37..000000000000 --- a/arch/ppc/syslib/m8260_pci.c +++ /dev/null | |||
@@ -1,193 +0,0 @@ | |||
1 | /* | ||
2 | * (C) Copyright 2003 | ||
3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. | ||
4 | * | ||
5 | * (C) Copyright 2004 Red Hat, Inc. | ||
6 | * | ||
7 | * See file CREDITS for list of people who contributed to this | ||
8 | * project. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or | ||
11 | * modify it under the terms of the GNU General Public License as | ||
12 | * published by the Free Software Foundation; either version 2 of | ||
13 | * the License, or (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
23 | * MA 02111-1307 USA | ||
24 | */ | ||
25 | |||
26 | #include <linux/kernel.h> | ||
27 | #include <linux/init.h> | ||
28 | #include <linux/pci.h> | ||
29 | #include <linux/slab.h> | ||
30 | #include <linux/delay.h> | ||
31 | |||
32 | #include <asm/byteorder.h> | ||
33 | #include <asm/io.h> | ||
34 | #include <asm/irq.h> | ||
35 | #include <asm/uaccess.h> | ||
36 | #include <asm/machdep.h> | ||
37 | #include <asm/pci-bridge.h> | ||
38 | #include <asm/immap_cpm2.h> | ||
39 | #include <asm/mpc8260.h> | ||
40 | |||
41 | #include "m8260_pci.h" | ||
42 | |||
43 | |||
44 | /* PCI bus configuration registers. | ||
45 | */ | ||
46 | |||
47 | static void __init m8260_setup_pci(struct pci_controller *hose) | ||
48 | { | ||
49 | volatile cpm2_map_t *immap = cpm2_immr; | ||
50 | unsigned long pocmr; | ||
51 | u16 tempShort; | ||
52 | |||
53 | #ifndef CONFIG_ATC /* already done in U-Boot */ | ||
54 | /* | ||
55 | * Setting required to enable IRQ1-IRQ7 (SIUMCR [DPPC]), | ||
56 | * and local bus for PCI (SIUMCR [LBPC]). | ||
57 | */ | ||
58 | immap->im_siu_conf.siu_82xx.sc_siumcr = 0x00640000; | ||
59 | #endif | ||
60 | |||
61 | /* Make PCI lowest priority */ | ||
62 | /* Each 4 bits is a device bus request and the MS 4bits | ||
63 | is highest priority */ | ||
64 | /* Bus 4bit value | ||
65 | --- ---------- | ||
66 | CPM high 0b0000 | ||
67 | CPM middle 0b0001 | ||
68 | CPM low 0b0010 | ||
69 | PCI reguest 0b0011 | ||
70 | Reserved 0b0100 | ||
71 | Reserved 0b0101 | ||
72 | Internal Core 0b0110 | ||
73 | External Master 1 0b0111 | ||
74 | External Master 2 0b1000 | ||
75 | External Master 3 0b1001 | ||
76 | The rest are reserved */ | ||
77 | immap->im_siu_conf.siu_82xx.sc_ppc_alrh = 0x61207893; | ||
78 | |||
79 | /* Park bus on core while modifying PCI Bus accesses */ | ||
80 | immap->im_siu_conf.siu_82xx.sc_ppc_acr = 0x6; | ||
81 | |||
82 | /* | ||
83 | * Set up master window that allows the CPU to access PCI space. This | ||
84 | * window is set up using the first SIU PCIBR registers. | ||
85 | */ | ||
86 | immap->im_memctl.memc_pcimsk0 = MPC826x_PCI_MASK; | ||
87 | immap->im_memctl.memc_pcibr0 = MPC826x_PCI_BASE | PCIBR_ENABLE; | ||
88 | |||
89 | /* Disable machine check on no response or target abort */ | ||
90 | immap->im_pci.pci_emr = cpu_to_le32(0x1fe7); | ||
91 | /* Release PCI RST (by default the PCI RST signal is held low) */ | ||
92 | immap->im_pci.pci_gcr = cpu_to_le32(PCIGCR_PCI_BUS_EN); | ||
93 | |||
94 | /* give it some time */ | ||
95 | mdelay(1); | ||
96 | |||
97 | /* | ||
98 | * Set up master window that allows the CPU to access PCI Memory (prefetch) | ||
99 | * space. This window is set up using the first set of Outbound ATU registers. | ||
100 | */ | ||
101 | immap->im_pci.pci_potar0 = cpu_to_le32(MPC826x_PCI_LOWER_MEM >> 12); | ||
102 | immap->im_pci.pci_pobar0 = cpu_to_le32((MPC826x_PCI_LOWER_MEM - MPC826x_PCI_MEM_OFFSET) >> 12); | ||
103 | pocmr = ((MPC826x_PCI_UPPER_MEM - MPC826x_PCI_LOWER_MEM) >> 12) ^ 0xfffff; | ||
104 | immap->im_pci.pci_pocmr0 = cpu_to_le32(pocmr | POCMR_ENABLE | POCMR_PREFETCH_EN); | ||
105 | |||
106 | /* | ||
107 | * Set up master window that allows the CPU to access PCI Memory (non-prefetch) | ||
108 | * space. This window is set up using the second set of Outbound ATU registers. | ||
109 | */ | ||
110 | immap->im_pci.pci_potar1 = cpu_to_le32(MPC826x_PCI_LOWER_MMIO >> 12); | ||
111 | immap->im_pci.pci_pobar1 = cpu_to_le32((MPC826x_PCI_LOWER_MMIO - MPC826x_PCI_MMIO_OFFSET) >> 12); | ||
112 | pocmr = ((MPC826x_PCI_UPPER_MMIO - MPC826x_PCI_LOWER_MMIO) >> 12) ^ 0xfffff; | ||
113 | immap->im_pci.pci_pocmr1 = cpu_to_le32(pocmr | POCMR_ENABLE); | ||
114 | |||
115 | /* | ||
116 | * Set up master window that allows the CPU to access PCI IO space. This window | ||
117 | * is set up using the third set of Outbound ATU registers. | ||
118 | */ | ||
119 | immap->im_pci.pci_potar2 = cpu_to_le32(MPC826x_PCI_IO_BASE >> 12); | ||
120 | immap->im_pci.pci_pobar2 = cpu_to_le32(MPC826x_PCI_LOWER_IO >> 12); | ||
121 | pocmr = ((MPC826x_PCI_UPPER_IO - MPC826x_PCI_LOWER_IO) >> 12) ^ 0xfffff; | ||
122 | immap->im_pci.pci_pocmr2 = cpu_to_le32(pocmr | POCMR_ENABLE | POCMR_PCI_IO); | ||
123 | |||
124 | /* | ||
125 | * Set up slave window that allows PCI masters to access MPC826x local memory. | ||
126 | * This window is set up using the first set of Inbound ATU registers | ||
127 | */ | ||
128 | |||
129 | immap->im_pci.pci_pitar0 = cpu_to_le32(MPC826x_PCI_SLAVE_MEM_LOCAL >> 12); | ||
130 | immap->im_pci.pci_pibar0 = cpu_to_le32(MPC826x_PCI_SLAVE_MEM_BUS >> 12); | ||
131 | pocmr = ((MPC826x_PCI_SLAVE_MEM_SIZE-1) >> 12) ^ 0xfffff; | ||
132 | immap->im_pci.pci_picmr0 = cpu_to_le32(pocmr | PICMR_ENABLE | PICMR_PREFETCH_EN); | ||
133 | |||
134 | /* See above for description - puts PCI request as highest priority */ | ||
135 | immap->im_siu_conf.siu_82xx.sc_ppc_alrh = 0x03124567; | ||
136 | |||
137 | /* Park the bus on the PCI */ | ||
138 | immap->im_siu_conf.siu_82xx.sc_ppc_acr = PPC_ACR_BUS_PARK_PCI; | ||
139 | |||
140 | /* Host mode - specify the bridge as a host-PCI bridge */ | ||
141 | early_write_config_word(hose, 0, 0, PCI_CLASS_DEVICE, PCI_CLASS_BRIDGE_HOST); | ||
142 | |||
143 | /* Enable the host bridge to be a master on the PCI bus, and to act as a PCI memory target */ | ||
144 | early_read_config_word(hose, 0, 0, PCI_COMMAND, &tempShort); | ||
145 | early_write_config_word(hose, 0, 0, PCI_COMMAND, | ||
146 | tempShort | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); | ||
147 | } | ||
148 | |||
149 | void __init m8260_find_bridges(void) | ||
150 | { | ||
151 | extern int pci_assign_all_busses; | ||
152 | struct pci_controller * hose; | ||
153 | |||
154 | pci_assign_all_busses = 1; | ||
155 | |||
156 | hose = pcibios_alloc_controller(); | ||
157 | |||
158 | if (!hose) | ||
159 | return; | ||
160 | |||
161 | ppc_md.pci_swizzle = common_swizzle; | ||
162 | |||
163 | hose->first_busno = 0; | ||
164 | hose->bus_offset = 0; | ||
165 | hose->last_busno = 0xff; | ||
166 | |||
167 | setup_m8260_indirect_pci(hose, | ||
168 | (unsigned long)&cpm2_immr->im_pci.pci_cfg_addr, | ||
169 | (unsigned long)&cpm2_immr->im_pci.pci_cfg_data); | ||
170 | |||
171 | m8260_setup_pci(hose); | ||
172 | hose->pci_mem_offset = MPC826x_PCI_MEM_OFFSET; | ||
173 | |||
174 | hose->io_base_virt = ioremap(MPC826x_PCI_IO_BASE, | ||
175 | MPC826x_PCI_IO_SIZE); | ||
176 | isa_io_base = (unsigned long) hose->io_base_virt; | ||
177 | |||
178 | /* setup resources */ | ||
179 | pci_init_resource(&hose->mem_resources[0], | ||
180 | MPC826x_PCI_LOWER_MEM, | ||
181 | MPC826x_PCI_UPPER_MEM, | ||
182 | IORESOURCE_MEM|IORESOURCE_PREFETCH, "PCI prefetchable memory"); | ||
183 | |||
184 | pci_init_resource(&hose->mem_resources[1], | ||
185 | MPC826x_PCI_LOWER_MMIO, | ||
186 | MPC826x_PCI_UPPER_MMIO, | ||
187 | IORESOURCE_MEM, "PCI memory"); | ||
188 | |||
189 | pci_init_resource(&hose->io_resource, | ||
190 | MPC826x_PCI_LOWER_IO, | ||
191 | MPC826x_PCI_UPPER_IO, | ||
192 | IORESOURCE_IO, "PCI I/O"); | ||
193 | } | ||
diff --git a/arch/ppc/syslib/m8260_pci.h b/arch/ppc/syslib/m8260_pci.h deleted file mode 100644 index d1352120acd7..000000000000 --- a/arch/ppc/syslib/m8260_pci.h +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | |||
2 | #ifndef _PPC_KERNEL_M8260_PCI_H | ||
3 | #define _PPC_KERNEL_M8260_PCI_H | ||
4 | |||
5 | #include <asm/m8260_pci.h> | ||
6 | |||
7 | /* | ||
8 | * Local->PCI map (from CPU) controlled by | ||
9 | * MPC826x master window | ||
10 | * | ||
11 | * 0x80000000 - 0xBFFFFFFF Total CPU2PCI space PCIBR0 | ||
12 | * | ||
13 | * 0x80000000 - 0x9FFFFFFF PCI Mem with prefetch (Outbound ATU #1) | ||
14 | * 0xA0000000 - 0xAFFFFFFF PCI Mem w/o prefetch (Outbound ATU #2) | ||
15 | * 0xB0000000 - 0xB0FFFFFF 32-bit PCI IO (Outbound ATU #3) | ||
16 | * | ||
17 | * PCI->Local map (from PCI) | ||
18 | * MPC826x slave window controlled by | ||
19 | * | ||
20 | * 0x00000000 - 0x07FFFFFF MPC826x local memory (Inbound ATU #1) | ||
21 | */ | ||
22 | |||
23 | /* | ||
24 | * Slave window that allows PCI masters to access MPC826x local memory. | ||
25 | * This window is set up using the first set of Inbound ATU registers | ||
26 | */ | ||
27 | |||
28 | #ifndef MPC826x_PCI_SLAVE_MEM_LOCAL | ||
29 | #define MPC826x_PCI_SLAVE_MEM_LOCAL (((struct bd_info *)__res)->bi_memstart) | ||
30 | #define MPC826x_PCI_SLAVE_MEM_BUS (((struct bd_info *)__res)->bi_memstart) | ||
31 | #define MPC826x_PCI_SLAVE_MEM_SIZE (((struct bd_info *)__res)->bi_memsize) | ||
32 | #endif | ||
33 | |||
34 | /* | ||
35 | * This is the window that allows the CPU to access PCI address space. | ||
36 | * It will be setup with the SIU PCIBR0 register. All three PCI master | ||
37 | * windows, which allow the CPU to access PCI prefetch, non prefetch, | ||
38 | * and IO space (see below), must all fit within this window. | ||
39 | */ | ||
40 | #ifndef MPC826x_PCI_BASE | ||
41 | #define MPC826x_PCI_BASE 0x80000000 | ||
42 | #define MPC826x_PCI_MASK 0xc0000000 | ||
43 | #endif | ||
44 | |||
45 | #ifndef MPC826x_PCI_LOWER_MEM | ||
46 | #define MPC826x_PCI_LOWER_MEM 0x80000000 | ||
47 | #define MPC826x_PCI_UPPER_MEM 0x9fffffff | ||
48 | #define MPC826x_PCI_MEM_OFFSET 0x00000000 | ||
49 | #endif | ||
50 | |||
51 | #ifndef MPC826x_PCI_LOWER_MMIO | ||
52 | #define MPC826x_PCI_LOWER_MMIO 0xa0000000 | ||
53 | #define MPC826x_PCI_UPPER_MMIO 0xafffffff | ||
54 | #define MPC826x_PCI_MMIO_OFFSET 0x00000000 | ||
55 | #endif | ||
56 | |||
57 | #ifndef MPC826x_PCI_LOWER_IO | ||
58 | #define MPC826x_PCI_LOWER_IO 0x00000000 | ||
59 | #define MPC826x_PCI_UPPER_IO 0x00ffffff | ||
60 | #define MPC826x_PCI_IO_BASE 0xb0000000 | ||
61 | #define MPC826x_PCI_IO_SIZE 0x01000000 | ||
62 | #endif | ||
63 | |||
64 | #ifndef _IO_BASE | ||
65 | #define _IO_BASE isa_io_base | ||
66 | #endif | ||
67 | |||
68 | #ifdef CONFIG_8260_PCI9 | ||
69 | struct pci_controller; | ||
70 | extern void setup_m8260_indirect_pci(struct pci_controller* hose, | ||
71 | u32 cfg_addr, u32 cfg_data); | ||
72 | #else | ||
73 | #define setup_m8260_indirect_pci setup_indirect_pci | ||
74 | #endif | ||
75 | |||
76 | #endif /* _PPC_KERNEL_M8260_PCI_H */ | ||
diff --git a/arch/ppc/syslib/m8260_pci_erratum9.c b/arch/ppc/syslib/m8260_pci_erratum9.c index 9c0582d639e0..1dc7e4e1d491 100644 --- a/arch/ppc/syslib/m8260_pci_erratum9.c +++ b/arch/ppc/syslib/m8260_pci_erratum9.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <asm/immap_cpm2.h> | 31 | #include <asm/immap_cpm2.h> |
32 | #include <asm/cpm2.h> | 32 | #include <asm/cpm2.h> |
33 | 33 | ||
34 | #include "m8260_pci.h" | 34 | #include "m82xx_pci.h" |
35 | 35 | ||
36 | #ifdef CONFIG_8260_PCI9 | 36 | #ifdef CONFIG_8260_PCI9 |
37 | /*#include <asm/mpc8260_pci9.h>*/ /* included in asm/io.h */ | 37 | /*#include <asm/mpc8260_pci9.h>*/ /* included in asm/io.h */ |
@@ -248,11 +248,11 @@ EXPORT_SYMBOL(idma_pci9_read_le); | |||
248 | 248 | ||
249 | static inline int is_pci_mem(unsigned long addr) | 249 | static inline int is_pci_mem(unsigned long addr) |
250 | { | 250 | { |
251 | if (addr >= MPC826x_PCI_LOWER_MMIO && | 251 | if (addr >= M82xx_PCI_LOWER_MMIO && |
252 | addr <= MPC826x_PCI_UPPER_MMIO) | 252 | addr <= M82xx_PCI_UPPER_MMIO) |
253 | return 1; | 253 | return 1; |
254 | if (addr >= MPC826x_PCI_LOWER_MEM && | 254 | if (addr >= M82xx_PCI_LOWER_MEM && |
255 | addr <= MPC826x_PCI_UPPER_MEM) | 255 | addr <= M82xx_PCI_UPPER_MEM) |
256 | return 1; | 256 | return 1; |
257 | return 0; | 257 | return 0; |
258 | } | 258 | } |
diff --git a/arch/ppc/syslib/m8260_setup.c b/arch/ppc/syslib/m8260_setup.c index 23ea3f694de2..fda75d79050c 100644 --- a/arch/ppc/syslib/m8260_setup.c +++ b/arch/ppc/syslib/m8260_setup.c | |||
@@ -34,7 +34,8 @@ | |||
34 | unsigned char __res[sizeof(bd_t)]; | 34 | unsigned char __res[sizeof(bd_t)]; |
35 | 35 | ||
36 | extern void cpm2_reset(void); | 36 | extern void cpm2_reset(void); |
37 | extern void m8260_find_bridges(void); | 37 | extern void pq2_find_bridges(void); |
38 | extern void pq2pci_init_irq(void); | ||
38 | extern void idma_pci9_init(void); | 39 | extern void idma_pci9_init(void); |
39 | 40 | ||
40 | /* Place-holder for board-specific init */ | 41 | /* Place-holder for board-specific init */ |
@@ -56,7 +57,7 @@ m8260_setup_arch(void) | |||
56 | idma_pci9_init(); | 57 | idma_pci9_init(); |
57 | #endif | 58 | #endif |
58 | #ifdef CONFIG_PCI_8260 | 59 | #ifdef CONFIG_PCI_8260 |
59 | m8260_find_bridges(); | 60 | pq2_find_bridges(); |
60 | #endif | 61 | #endif |
61 | #ifdef CONFIG_BLK_DEV_INITRD | 62 | #ifdef CONFIG_BLK_DEV_INITRD |
62 | if (initrd_start) | 63 | if (initrd_start) |
@@ -173,6 +174,12 @@ m8260_init_IRQ(void) | |||
173 | * in case the boot rom changed something on us. | 174 | * in case the boot rom changed something on us. |
174 | */ | 175 | */ |
175 | cpm2_immr->im_intctl.ic_siprr = 0x05309770; | 176 | cpm2_immr->im_intctl.ic_siprr = 0x05309770; |
177 | |||
178 | #if defined(CONFIG_PCI) && (defined(CONFIG_ADS8272) || defined(CONFIG_PQ2FADS)) | ||
179 | /* Initialize stuff for the 82xx CPLD IC and install demux */ | ||
180 | pq2pci_init_irq(); | ||
181 | #endif | ||
182 | |||
176 | } | 183 | } |
177 | 184 | ||
178 | /* | 185 | /* |
diff --git a/arch/ppc/syslib/m82xx_pci.c b/arch/ppc/syslib/m82xx_pci.c new file mode 100644 index 000000000000..5e7a7edcea74 --- /dev/null +++ b/arch/ppc/syslib/m82xx_pci.c | |||
@@ -0,0 +1,383 @@ | |||
1 | /* | ||
2 | * | ||
3 | * (C) Copyright 2003 | ||
4 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. | ||
5 | * | ||
6 | * (C) Copyright 2004 Red Hat, Inc. | ||
7 | * | ||
8 | * 2005 (c) MontaVista Software, Inc. | ||
9 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
10 | * | ||
11 | * See file CREDITS for list of people who contributed to this | ||
12 | * project. | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or | ||
15 | * modify it under the terms of the GNU General Public License as | ||
16 | * published by the Free Software Foundation; either version 2 of | ||
17 | * the License, or (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, write to the Free Software | ||
26 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
27 | * MA 02111-1307 USA | ||
28 | */ | ||
29 | |||
30 | #include <linux/kernel.h> | ||
31 | #include <linux/init.h> | ||
32 | #include <linux/pci.h> | ||
33 | #include <linux/slab.h> | ||
34 | #include <linux/delay.h> | ||
35 | #include <linux/irq.h> | ||
36 | #include <linux/interrupt.h> | ||
37 | |||
38 | #include <asm/byteorder.h> | ||
39 | #include <asm/io.h> | ||
40 | #include <asm/irq.h> | ||
41 | #include <asm/uaccess.h> | ||
42 | #include <asm/machdep.h> | ||
43 | #include <asm/pci-bridge.h> | ||
44 | #include <asm/immap_cpm2.h> | ||
45 | #include <asm/mpc8260.h> | ||
46 | #include <asm/cpm2.h> | ||
47 | |||
48 | #include "m82xx_pci.h" | ||
49 | |||
50 | /* | ||
51 | * Interrupt routing | ||
52 | */ | ||
53 | |||
54 | static inline int | ||
55 | pq2pci_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | ||
56 | { | ||
57 | static char pci_irq_table[][4] = | ||
58 | /* | ||
59 | * PCI IDSEL/INTPIN->INTLINE | ||
60 | * A B C D | ||
61 | */ | ||
62 | { | ||
63 | { PIRQA, PIRQB, PIRQC, PIRQD }, /* IDSEL 22 - PCI slot 0 */ | ||
64 | { PIRQD, PIRQA, PIRQB, PIRQC }, /* IDSEL 23 - PCI slot 1 */ | ||
65 | { PIRQC, PIRQD, PIRQA, PIRQB }, /* IDSEL 24 - PCI slot 2 */ | ||
66 | }; | ||
67 | |||
68 | const long min_idsel = 22, max_idsel = 24, irqs_per_slot = 4; | ||
69 | return PCI_IRQ_TABLE_LOOKUP; | ||
70 | } | ||
71 | |||
72 | static void | ||
73 | pq2pci_mask_irq(unsigned int irq) | ||
74 | { | ||
75 | int bit = irq - NR_CPM_INTS; | ||
76 | |||
77 | *(volatile unsigned long *) PCI_INT_MASK_REG |= (1 << (31 - bit)); | ||
78 | return; | ||
79 | } | ||
80 | |||
81 | static void | ||
82 | pq2pci_unmask_irq(unsigned int irq) | ||
83 | { | ||
84 | int bit = irq - NR_CPM_INTS; | ||
85 | |||
86 | *(volatile unsigned long *) PCI_INT_MASK_REG &= ~(1 << (31 - bit)); | ||
87 | return; | ||
88 | } | ||
89 | |||
90 | static void | ||
91 | pq2pci_mask_and_ack(unsigned int irq) | ||
92 | { | ||
93 | int bit = irq - NR_CPM_INTS; | ||
94 | |||
95 | *(volatile unsigned long *) PCI_INT_MASK_REG |= (1 << (31 - bit)); | ||
96 | return; | ||
97 | } | ||
98 | |||
99 | static void | ||
100 | pq2pci_end_irq(unsigned int irq) | ||
101 | { | ||
102 | int bit = irq - NR_CPM_INTS; | ||
103 | |||
104 | *(volatile unsigned long *) PCI_INT_MASK_REG &= ~(1 << (31 - bit)); | ||
105 | return; | ||
106 | } | ||
107 | |||
108 | struct hw_interrupt_type pq2pci_ic = { | ||
109 | "PQ2 PCI", | ||
110 | NULL, | ||
111 | NULL, | ||
112 | pq2pci_unmask_irq, | ||
113 | pq2pci_mask_irq, | ||
114 | pq2pci_mask_and_ack, | ||
115 | pq2pci_end_irq, | ||
116 | 0 | ||
117 | }; | ||
118 | |||
119 | static irqreturn_t | ||
120 | pq2pci_irq_demux(int irq, void *dev_id, struct pt_regs *regs) | ||
121 | { | ||
122 | unsigned long stat, mask, pend; | ||
123 | int bit; | ||
124 | |||
125 | for(;;) { | ||
126 | stat = *(volatile unsigned long *) PCI_INT_STAT_REG; | ||
127 | mask = *(volatile unsigned long *) PCI_INT_MASK_REG; | ||
128 | pend = stat & ~mask & 0xf0000000; | ||
129 | if (!pend) | ||
130 | break; | ||
131 | for (bit = 0; pend != 0; ++bit, pend <<= 1) { | ||
132 | if (pend & 0x80000000) | ||
133 | __do_IRQ(NR_CPM_INTS + bit, regs); | ||
134 | } | ||
135 | } | ||
136 | |||
137 | return IRQ_HANDLED; | ||
138 | } | ||
139 | |||
140 | static struct irqaction pq2pci_irqaction = { | ||
141 | .handler = pq2pci_irq_demux, | ||
142 | .flags = SA_INTERRUPT, | ||
143 | .mask = CPU_MASK_NONE, | ||
144 | .name = "PQ2 PCI cascade", | ||
145 | }; | ||
146 | |||
147 | |||
148 | void | ||
149 | pq2pci_init_irq(void) | ||
150 | { | ||
151 | int irq; | ||
152 | volatile cpm2_map_t *immap = cpm2_immr; | ||
153 | #if defined CONFIG_ADS8272 | ||
154 | /* configure chip select for PCI interrupt controller */ | ||
155 | immap->im_memctl.memc_br3 = PCI_INT_STAT_REG | 0x00001801; | ||
156 | immap->im_memctl.memc_or3 = 0xffff8010; | ||
157 | #elif defined CONFIG_PQ2FADS | ||
158 | immap->im_memctl.memc_br8 = PCI_INT_STAT_REG | 0x00001801; | ||
159 | immap->im_memctl.memc_or8 = 0xffff8010; | ||
160 | #endif | ||
161 | for (irq = NR_CPM_INTS; irq < NR_CPM_INTS + 4; irq++) | ||
162 | irq_desc[irq].handler = &pq2pci_ic; | ||
163 | |||
164 | /* make PCI IRQ level sensitive */ | ||
165 | immap->im_intctl.ic_siexr &= | ||
166 | ~(1 << (14 - (PCI_INT_TO_SIU - SIU_INT_IRQ1))); | ||
167 | |||
168 | /* mask all PCI interrupts */ | ||
169 | *(volatile unsigned long *) PCI_INT_MASK_REG |= 0xfff00000; | ||
170 | |||
171 | /* install the demultiplexer for the PCI cascade interrupt */ | ||
172 | setup_irq(PCI_INT_TO_SIU, &pq2pci_irqaction); | ||
173 | return; | ||
174 | } | ||
175 | |||
176 | static int | ||
177 | pq2pci_exclude_device(u_char bus, u_char devfn) | ||
178 | { | ||
179 | return PCIBIOS_SUCCESSFUL; | ||
180 | } | ||
181 | |||
182 | /* PCI bus configuration registers. | ||
183 | */ | ||
184 | static void | ||
185 | pq2ads_setup_pci(struct pci_controller *hose) | ||
186 | { | ||
187 | __u32 val; | ||
188 | volatile cpm2_map_t *immap = cpm2_immr; | ||
189 | bd_t* binfo = (bd_t*) __res; | ||
190 | u32 sccr = immap->im_clkrst.car_sccr; | ||
191 | uint pci_div,freq,time; | ||
192 | /* PCI int lowest prio */ | ||
193 | /* Each 4 bits is a device bus request and the MS 4bits | ||
194 | is highest priority */ | ||
195 | /* Bus 4bit value | ||
196 | --- ---------- | ||
197 | CPM high 0b0000 | ||
198 | CPM middle 0b0001 | ||
199 | CPM low 0b0010 | ||
200 | PCI reguest 0b0011 | ||
201 | Reserved 0b0100 | ||
202 | Reserved 0b0101 | ||
203 | Internal Core 0b0110 | ||
204 | External Master 1 0b0111 | ||
205 | External Master 2 0b1000 | ||
206 | External Master 3 0b1001 | ||
207 | The rest are reserved | ||
208 | */ | ||
209 | immap->im_siu_conf.siu_82xx.sc_ppc_alrh = 0x61207893; | ||
210 | /* park bus on core */ | ||
211 | immap->im_siu_conf.siu_82xx.sc_ppc_acr = PPC_ACR_BUS_PARK_CORE; | ||
212 | /* | ||
213 | * Set up master windows that allow the CPU to access PCI space. These | ||
214 | * windows are set up using the two SIU PCIBR registers. | ||
215 | */ | ||
216 | |||
217 | immap->im_memctl.memc_pcimsk0 = M82xx_PCI_PRIM_WND_SIZE; | ||
218 | immap->im_memctl.memc_pcibr0 = M82xx_PCI_PRIM_WND_BASE | PCIBR_ENABLE; | ||
219 | |||
220 | #ifdef M82xx_PCI_SEC_WND_SIZE | ||
221 | immap->im_memctl.memc_pcimsk1 = M82xx_PCI_SEC_WND_SIZE; | ||
222 | immap->im_memctl.memc_pcibr1 = M82xx_PCI_SEC_WND_BASE | PCIBR_ENABLE; | ||
223 | #endif | ||
224 | |||
225 | #if defined CONFIG_ADS8272 | ||
226 | immap->im_siu_conf.siu_82xx.sc_siumcr = | ||
227 | (immap->im_siu_conf.siu_82xx.sc_siumcr & | ||
228 | ~(SIUMCR_BBD | SIUMCR_ESE | SIUMCR_PBSE | | ||
229 | SIUMCR_CDIS | SIUMCR_DPPC11 | SIUMCR_L2CPC11 | | ||
230 | SIUMCR_LBPC11 | SIUMCR_APPC11 | | ||
231 | SIUMCR_CS10PC11 | SIUMCR_BCTLC11 | SIUMCR_MMR11)) | | ||
232 | SIUMCR_DPPC11 | SIUMCR_L2CPC01 | SIUMCR_LBPC00 | | ||
233 | SIUMCR_APPC10 | SIUMCR_CS10PC00 | | ||
234 | SIUMCR_BCTLC00 | SIUMCR_MMR11 ; | ||
235 | |||
236 | #elif defined CONFIG_PQ2FADS | ||
237 | /* | ||
238 | * Setting required to enable IRQ1-IRQ7 (SIUMCR [DPPC]), | ||
239 | * and local bus for PCI (SIUMCR [LBPC]). | ||
240 | */ | ||
241 | immap->im_siu_conf.siu_82xx.sc_siumcr = (immap->im_siu_conf.sc_siumcr & | ||
242 | ~(SIUMCR_L2PC11 | SIUMCR_LBPC11 | SIUMCR_CS10PC11 | SIUMCR_APPC11) | | ||
243 | SIUMCR_BBD | SIUMCR_LBPC01 | SIUMCR_DPPC11 | SIUMCR_APPC10; | ||
244 | #endif | ||
245 | /* Enable PCI */ | ||
246 | immap->im_pci.pci_gcr = cpu_to_le32(PCIGCR_PCI_BUS_EN); | ||
247 | |||
248 | pci_div = ( (sccr & SCCR_PCI_MODCK) ? 2 : 1) * | ||
249 | ( ( (sccr & SCCR_PCIDF_MSK) >> SCCR_PCIDF_SHIFT) + 1); | ||
250 | freq = (uint)((2*binfo->bi_cpmfreq)/(pci_div)); | ||
251 | time = (int)666666/freq; | ||
252 | /* due to PCI Local Bus spec, some devices needs to wait such a long | ||
253 | time after RST deassertion. More specifically, 0.508s for 66MHz & twice more for 33 */ | ||
254 | printk("%s: The PCI bus is %d Mhz.\nWaiting %s after deasserting RST...\n",__FILE__,freq, | ||
255 | (time==1) ? "0.5 seconds":"1 second" ); | ||
256 | |||
257 | { | ||
258 | int i; | ||
259 | for(i=0;i<(500*time);i++) | ||
260 | udelay(1000); | ||
261 | } | ||
262 | |||
263 | /* setup ATU registers */ | ||
264 | immap->im_pci.pci_pocmr0 = cpu_to_le32(POCMR_ENABLE | POCMR_PCI_IO | | ||
265 | ((~(M82xx_PCI_IO_SIZE - 1U)) >> POTA_ADDR_SHIFT)); | ||
266 | immap->im_pci.pci_potar0 = cpu_to_le32(M82xx_PCI_LOWER_IO >> POTA_ADDR_SHIFT); | ||
267 | immap->im_pci.pci_pobar0 = cpu_to_le32(M82xx_PCI_IO_BASE >> POTA_ADDR_SHIFT); | ||
268 | |||
269 | /* Set-up non-prefetchable window */ | ||
270 | immap->im_pci.pci_pocmr1 = cpu_to_le32(POCMR_ENABLE | ((~(M82xx_PCI_MMIO_SIZE-1U)) >> POTA_ADDR_SHIFT)); | ||
271 | immap->im_pci.pci_potar1 = cpu_to_le32(M82xx_PCI_LOWER_MMIO >> POTA_ADDR_SHIFT); | ||
272 | immap->im_pci.pci_pobar1 = cpu_to_le32((M82xx_PCI_LOWER_MMIO - M82xx_PCI_MMIO_OFFSET) >> POTA_ADDR_SHIFT); | ||
273 | |||
274 | /* Set-up prefetchable window */ | ||
275 | immap->im_pci.pci_pocmr2 = cpu_to_le32(POCMR_ENABLE |POCMR_PREFETCH_EN | | ||
276 | (~(M82xx_PCI_MEM_SIZE-1U) >> POTA_ADDR_SHIFT)); | ||
277 | immap->im_pci.pci_potar2 = cpu_to_le32(M82xx_PCI_LOWER_MEM >> POTA_ADDR_SHIFT); | ||
278 | immap->im_pci.pci_pobar2 = cpu_to_le32((M82xx_PCI_LOWER_MEM - M82xx_PCI_MEM_OFFSET) >> POTA_ADDR_SHIFT); | ||
279 | |||
280 | /* Inbound transactions from PCI memory space */ | ||
281 | immap->im_pci.pci_picmr0 = cpu_to_le32(PICMR_ENABLE | PICMR_PREFETCH_EN | | ||
282 | ((~(M82xx_PCI_SLAVE_MEM_SIZE-1U)) >> PITA_ADDR_SHIFT)); | ||
283 | immap->im_pci.pci_pibar0 = cpu_to_le32(M82xx_PCI_SLAVE_MEM_BUS >> PITA_ADDR_SHIFT); | ||
284 | immap->im_pci.pci_pitar0 = cpu_to_le32(M82xx_PCI_SLAVE_MEM_LOCAL>> PITA_ADDR_SHIFT); | ||
285 | |||
286 | #if defined CONFIG_ADS8272 | ||
287 | /* PCI int highest prio */ | ||
288 | immap->im_siu_conf.siu_82xx.sc_ppc_alrh = 0x01236745; | ||
289 | #elif defined CONFIG_PQ2FADS | ||
290 | immap->im_siu_conf.siu_82xx.sc_ppc_alrh = 0x03124567; | ||
291 | #endif | ||
292 | /* park bus on PCI */ | ||
293 | immap->im_siu_conf.siu_82xx.sc_ppc_acr = PPC_ACR_BUS_PARK_PCI; | ||
294 | |||
295 | /* Enable bus mastering and inbound memory transactions */ | ||
296 | early_read_config_dword(hose, hose->first_busno, 0, PCI_COMMAND, &val); | ||
297 | val &= 0xffff0000; | ||
298 | val |= PCI_COMMAND_MEMORY|PCI_COMMAND_MASTER; | ||
299 | early_write_config_dword(hose, hose->first_busno, 0, PCI_COMMAND, val); | ||
300 | |||
301 | } | ||
302 | |||
303 | void __init pq2_find_bridges(void) | ||
304 | { | ||
305 | extern int pci_assign_all_busses; | ||
306 | struct pci_controller * hose; | ||
307 | int host_bridge; | ||
308 | |||
309 | pci_assign_all_busses = 1; | ||
310 | |||
311 | hose = pcibios_alloc_controller(); | ||
312 | |||
313 | if (!hose) | ||
314 | return; | ||
315 | |||
316 | ppc_md.pci_swizzle = common_swizzle; | ||
317 | |||
318 | hose->first_busno = 0; | ||
319 | hose->bus_offset = 0; | ||
320 | hose->last_busno = 0xff; | ||
321 | |||
322 | #ifdef CONFIG_ADS8272 | ||
323 | hose->set_cfg_type = 1; | ||
324 | #endif | ||
325 | |||
326 | setup_m8260_indirect_pci(hose, | ||
327 | (unsigned long)&cpm2_immr->im_pci.pci_cfg_addr, | ||
328 | (unsigned long)&cpm2_immr->im_pci.pci_cfg_data); | ||
329 | |||
330 | /* Make sure it is a supported bridge */ | ||
331 | early_read_config_dword(hose, | ||
332 | 0, | ||
333 | PCI_DEVFN(0,0), | ||
334 | PCI_VENDOR_ID, | ||
335 | &host_bridge); | ||
336 | switch (host_bridge) { | ||
337 | case PCI_DEVICE_ID_MPC8265: | ||
338 | break; | ||
339 | case PCI_DEVICE_ID_MPC8272: | ||
340 | break; | ||
341 | default: | ||
342 | printk("Attempting to use unrecognized host bridge ID" | ||
343 | " 0x%08x.\n", host_bridge); | ||
344 | break; | ||
345 | } | ||
346 | |||
347 | pq2ads_setup_pci(hose); | ||
348 | |||
349 | hose->io_space.start = M82xx_PCI_LOWER_IO; | ||
350 | hose->io_space.end = M82xx_PCI_UPPER_IO; | ||
351 | hose->mem_space.start = M82xx_PCI_LOWER_MEM; | ||
352 | hose->mem_space.end = M82xx_PCI_UPPER_MMIO; | ||
353 | hose->pci_mem_offset = M82xx_PCI_MEM_OFFSET; | ||
354 | |||
355 | isa_io_base = | ||
356 | (unsigned long) ioremap(M82xx_PCI_IO_BASE, | ||
357 | M82xx_PCI_IO_SIZE); | ||
358 | hose->io_base_virt = (void *) isa_io_base; | ||
359 | |||
360 | /* setup resources */ | ||
361 | pci_init_resource(&hose->mem_resources[0], | ||
362 | M82xx_PCI_LOWER_MEM, | ||
363 | M82xx_PCI_UPPER_MEM, | ||
364 | IORESOURCE_MEM|IORESOURCE_PREFETCH, "PCI prefetchable memory"); | ||
365 | |||
366 | pci_init_resource(&hose->mem_resources[1], | ||
367 | M82xx_PCI_LOWER_MMIO, | ||
368 | M82xx_PCI_UPPER_MMIO, | ||
369 | IORESOURCE_MEM, "PCI memory"); | ||
370 | |||
371 | pci_init_resource(&hose->io_resource, | ||
372 | M82xx_PCI_LOWER_IO, | ||
373 | M82xx_PCI_UPPER_IO, | ||
374 | IORESOURCE_IO | 1, "PCI I/O"); | ||
375 | |||
376 | ppc_md.pci_exclude_device = pq2pci_exclude_device; | ||
377 | hose->last_busno = pciauto_bus_scan(hose, hose->first_busno); | ||
378 | |||
379 | ppc_md.pci_map_irq = pq2pci_map_irq; | ||
380 | ppc_md.pcibios_fixup = NULL; | ||
381 | ppc_md.pcibios_fixup_bus = NULL; | ||
382 | |||
383 | } | ||
diff --git a/arch/ppc/syslib/m82xx_pci.h b/arch/ppc/syslib/m82xx_pci.h new file mode 100644 index 000000000000..924f73f8e595 --- /dev/null +++ b/arch/ppc/syslib/m82xx_pci.h | |||
@@ -0,0 +1,92 @@ | |||
1 | |||
2 | #ifndef _PPC_KERNEL_M82XX_PCI_H | ||
3 | #define _PPC_KERNEL_M82XX_PCI_H | ||
4 | |||
5 | #include <asm/m8260_pci.h> | ||
6 | /* | ||
7 | * Local->PCI map (from CPU) controlled by | ||
8 | * MPC826x master window | ||
9 | * | ||
10 | * 0xF6000000 - 0xF7FFFFFF IO space | ||
11 | * 0x80000000 - 0xBFFFFFFF CPU2PCI memory space PCIBR0 | ||
12 | * | ||
13 | * 0x80000000 - 0x9FFFFFFF PCI Mem with prefetch (Outbound ATU #1) | ||
14 | * 0xA0000000 - 0xBFFFFFFF PCI Mem w/o prefetch (Outbound ATU #2) | ||
15 | * 0xF6000000 - 0xF7FFFFFF 32-bit PCI IO (Outbound ATU #3) | ||
16 | * | ||
17 | * PCI->Local map (from PCI) | ||
18 | * MPC826x slave window controlled by | ||
19 | * | ||
20 | * 0x00000000 - 0x07FFFFFF MPC826x local memory (Inbound ATU #1) | ||
21 | */ | ||
22 | |||
23 | /* | ||
24 | * Slave window that allows PCI masters to access MPC826x local memory. | ||
25 | * This window is set up using the first set of Inbound ATU registers | ||
26 | */ | ||
27 | |||
28 | #ifndef M82xx_PCI_SLAVE_MEM_LOCAL | ||
29 | #define M82xx_PCI_SLAVE_MEM_LOCAL (((struct bd_info *)__res)->bi_memstart) | ||
30 | #define M82xx_PCI_SLAVE_MEM_BUS (((struct bd_info *)__res)->bi_memstart) | ||
31 | #define M82xx_PCI_SLAVE_MEM_SIZE (((struct bd_info *)__res)->bi_memsize) | ||
32 | #endif | ||
33 | |||
34 | /* | ||
35 | * This is the window that allows the CPU to access PCI address space. | ||
36 | * It will be setup with the SIU PCIBR0 register. All three PCI master | ||
37 | * windows, which allow the CPU to access PCI prefetch, non prefetch, | ||
38 | * and IO space (see below), must all fit within this window. | ||
39 | */ | ||
40 | |||
41 | #ifndef M82xx_PCI_LOWER_MEM | ||
42 | #define M82xx_PCI_LOWER_MEM 0x80000000 | ||
43 | #define M82xx_PCI_UPPER_MEM 0x9fffffff | ||
44 | #define M82xx_PCI_MEM_OFFSET 0x00000000 | ||
45 | #define M82xx_PCI_MEM_SIZE 0x20000000 | ||
46 | #endif | ||
47 | |||
48 | #ifndef M82xx_PCI_LOWER_MMIO | ||
49 | #define M82xx_PCI_LOWER_MMIO 0xa0000000 | ||
50 | #define M82xx_PCI_UPPER_MMIO 0xafffffff | ||
51 | #define M82xx_PCI_MMIO_OFFSET 0x00000000 | ||
52 | #define M82xx_PCI_MMIO_SIZE 0x20000000 | ||
53 | #endif | ||
54 | |||
55 | #ifndef M82xx_PCI_LOWER_IO | ||
56 | #define M82xx_PCI_LOWER_IO 0x00000000 | ||
57 | #define M82xx_PCI_UPPER_IO 0x01ffffff | ||
58 | #define M82xx_PCI_IO_BASE 0xf6000000 | ||
59 | #define M82xx_PCI_IO_SIZE 0x02000000 | ||
60 | #endif | ||
61 | |||
62 | #ifndef M82xx_PCI_PRIM_WND_SIZE | ||
63 | #define M82xx_PCI_PRIM_WND_SIZE ~(M82xx_PCI_IO_SIZE - 1U) | ||
64 | #define M82xx_PCI_PRIM_WND_BASE (M82xx_PCI_IO_BASE) | ||
65 | #endif | ||
66 | |||
67 | #ifndef M82xx_PCI_SEC_WND_SIZE | ||
68 | #define M82xx_PCI_SEC_WND_SIZE ~(M82xx_PCI_MEM_SIZE + M82xx_PCI_MMIO_SIZE - 1U) | ||
69 | #define M82xx_PCI_SEC_WND_BASE (M82xx_PCI_LOWER_MEM) | ||
70 | #endif | ||
71 | |||
72 | #ifndef POTA_ADDR_SHIFT | ||
73 | #define POTA_ADDR_SHIFT 12 | ||
74 | #endif | ||
75 | |||
76 | #ifndef PITA_ADDR_SHIFT | ||
77 | #define PITA_ADDR_SHIFT 12 | ||
78 | #endif | ||
79 | |||
80 | #ifndef _IO_BASE | ||
81 | #define _IO_BASE isa_io_base | ||
82 | #endif | ||
83 | |||
84 | #ifdef CONFIG_8260_PCI9 | ||
85 | struct pci_controller; | ||
86 | extern void setup_m8260_indirect_pci(struct pci_controller* hose, | ||
87 | u32 cfg_addr, u32 cfg_data); | ||
88 | #else | ||
89 | #define setup_m8260_indirect_pci setup_indirect_pci | ||
90 | #endif | ||
91 | |||
92 | #endif /* _PPC_KERNEL_M8260_PCI_H */ | ||
diff --git a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c index 9d4ed68b5804..000ba47c67cb 100644 --- a/arch/ppc/syslib/open_pic.c +++ b/arch/ppc/syslib/open_pic.c | |||
@@ -275,7 +275,7 @@ static void __init openpic_enable_sie(void) | |||
275 | } | 275 | } |
276 | #endif | 276 | #endif |
277 | 277 | ||
278 | #if defined(CONFIG_EPIC_SERIAL_MODE) || defined(CONFIG_PM) | 278 | #if defined(CONFIG_EPIC_SERIAL_MODE) |
279 | static void openpic_reset(void) | 279 | static void openpic_reset(void) |
280 | { | 280 | { |
281 | openpic_setfield(&OpenPIC->Global.Global_Configuration0, | 281 | openpic_setfield(&OpenPIC->Global.Global_Configuration0, |
@@ -993,8 +993,6 @@ int openpic_resume(struct sys_device *sysdev) | |||
993 | return 0; | 993 | return 0; |
994 | } | 994 | } |
995 | 995 | ||
996 | openpic_reset(); | ||
997 | |||
998 | /* OpenPIC sometimes seem to need some time to be fully back up... */ | 996 | /* OpenPIC sometimes seem to need some time to be fully back up... */ |
999 | do { | 997 | do { |
1000 | openpic_set_spurious(OPENPIC_VEC_SPURIOUS); | 998 | openpic_set_spurious(OPENPIC_VEC_SPURIOUS); |
diff --git a/arch/ppc/syslib/ppc83xx_setup.c b/arch/ppc/syslib/ppc83xx_setup.c index c28f9d679484..843cf8873e60 100644 --- a/arch/ppc/syslib/ppc83xx_setup.c +++ b/arch/ppc/syslib/ppc83xx_setup.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/mmu.h> | 29 | #include <asm/mmu.h> |
30 | #include <asm/ppc_sys.h> | 30 | #include <asm/ppc_sys.h> |
31 | #include <asm/kgdb.h> | 31 | #include <asm/kgdb.h> |
32 | #include <asm/delay.h> | ||
32 | 33 | ||
33 | #include <syslib/ppc83xx_setup.h> | 34 | #include <syslib/ppc83xx_setup.h> |
34 | 35 | ||
@@ -117,7 +118,34 @@ mpc83xx_early_serial_map(void) | |||
117 | void | 118 | void |
118 | mpc83xx_restart(char *cmd) | 119 | mpc83xx_restart(char *cmd) |
119 | { | 120 | { |
121 | volatile unsigned char __iomem *reg; | ||
122 | unsigned char tmp; | ||
123 | |||
124 | reg = ioremap(BCSR_PHYS_ADDR, BCSR_SIZE); | ||
125 | |||
120 | local_irq_disable(); | 126 | local_irq_disable(); |
127 | |||
128 | /* | ||
129 | * Unlock the BCSR bits so a PRST will update the contents. | ||
130 | * Otherwise the reset asserts but doesn't clear. | ||
131 | */ | ||
132 | tmp = in_8(reg + BCSR_MISC_REG3_OFF); | ||
133 | tmp |= BCSR_MISC_REG3_CNFLOCK; /* low true, high false */ | ||
134 | out_8(reg + BCSR_MISC_REG3_OFF, tmp); | ||
135 | |||
136 | /* | ||
137 | * Trigger a reset via a low->high transition of the | ||
138 | * PORESET bit. | ||
139 | */ | ||
140 | tmp = in_8(reg + BCSR_MISC_REG2_OFF); | ||
141 | tmp &= ~BCSR_MISC_REG2_PORESET; | ||
142 | out_8(reg + BCSR_MISC_REG2_OFF, tmp); | ||
143 | |||
144 | udelay(1); | ||
145 | |||
146 | tmp |= BCSR_MISC_REG2_PORESET; | ||
147 | out_8(reg + BCSR_MISC_REG2_OFF, tmp); | ||
148 | |||
121 | for(;;); | 149 | for(;;); |
122 | } | 150 | } |
123 | 151 | ||
diff --git a/arch/ppc/syslib/ppc85xx_setup.c b/arch/ppc/syslib/ppc85xx_setup.c index 152c3ef1312a..f3277f469e78 100644 --- a/arch/ppc/syslib/ppc85xx_setup.c +++ b/arch/ppc/syslib/ppc85xx_setup.c | |||
@@ -132,6 +132,12 @@ mpc85xx_halt(void) | |||
132 | } | 132 | } |
133 | 133 | ||
134 | #ifdef CONFIG_PCI | 134 | #ifdef CONFIG_PCI |
135 | |||
136 | #if defined(CONFIG_MPC8555_CDS) | ||
137 | extern void mpc85xx_cds_enable_via(struct pci_controller *hose); | ||
138 | extern void mpc85xx_cds_fixup_via(struct pci_controller *hose); | ||
139 | #endif | ||
140 | |||
135 | static void __init | 141 | static void __init |
136 | mpc85xx_setup_pci1(struct pci_controller *hose) | 142 | mpc85xx_setup_pci1(struct pci_controller *hose) |
137 | { | 143 | { |
@@ -302,8 +308,18 @@ mpc85xx_setup_hose(void) | |||
302 | 308 | ||
303 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; | 309 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; |
304 | 310 | ||
311 | #if defined(CONFIG_MPC8555_CDS) | ||
312 | /* Pre pciauto_bus_scan VIA init */ | ||
313 | mpc85xx_cds_enable_via(hose_a); | ||
314 | #endif | ||
315 | |||
305 | hose_a->last_busno = pciauto_bus_scan(hose_a, hose_a->first_busno); | 316 | hose_a->last_busno = pciauto_bus_scan(hose_a, hose_a->first_busno); |
306 | 317 | ||
318 | #if defined(CONFIG_MPC8555_CDS) | ||
319 | /* Post pciauto_bus_scan VIA fixup */ | ||
320 | mpc85xx_cds_fixup_via(hose_a); | ||
321 | #endif | ||
322 | |||
307 | #ifdef CONFIG_85xx_PCI2 | 323 | #ifdef CONFIG_85xx_PCI2 |
308 | hose_b = pcibios_alloc_controller(); | 324 | hose_b = pcibios_alloc_controller(); |
309 | 325 | ||
diff --git a/arch/um/Kconfig.debug b/arch/um/Kconfig.debug index b89989de364d..bd41e4286d0d 100644 --- a/arch/um/Kconfig.debug +++ b/arch/um/Kconfig.debug | |||
@@ -2,10 +2,6 @@ menu "Kernel hacking" | |||
2 | 2 | ||
3 | source "lib/Kconfig.debug" | 3 | source "lib/Kconfig.debug" |
4 | 4 | ||
5 | config FRAME_POINTER | ||
6 | bool | ||
7 | default y if DEBUG_INFO | ||
8 | |||
9 | config PT_PROXY | 5 | config PT_PROXY |
10 | bool "Enable ptrace proxy" | 6 | bool "Enable ptrace proxy" |
11 | depends on XTERM_CHAN && DEBUG_INFO && MODE_TT | 7 | depends on XTERM_CHAN && DEBUG_INFO && MODE_TT |
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c index d43e9fab05a7..f9e22198e011 100644 --- a/arch/um/drivers/random.c +++ b/arch/um/drivers/random.c | |||
@@ -1,5 +1,10 @@ | |||
1 | /* Much of this ripped from hw_random.c */ | 1 | /* Copyright (C) 2005 Jeff Dike <jdike@addtoit.com> */ |
2 | 2 | /* Much of this ripped from drivers/char/hw_random.c, see there for other | |
3 | * copyright. | ||
4 | * | ||
5 | * This software may be used and distributed according to the terms | ||
6 | * of the GNU General Public License, incorporated herein by reference. | ||
7 | */ | ||
3 | #include <linux/module.h> | 8 | #include <linux/module.h> |
4 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
5 | #include <linux/miscdevice.h> | 10 | #include <linux/miscdevice.h> |
@@ -12,8 +17,6 @@ | |||
12 | */ | 17 | */ |
13 | #define RNG_VERSION "1.0.0" | 18 | #define RNG_VERSION "1.0.0" |
14 | #define RNG_MODULE_NAME "random" | 19 | #define RNG_MODULE_NAME "random" |
15 | #define RNG_DRIVER_NAME RNG_MODULE_NAME " virtual driver " RNG_VERSION | ||
16 | #define PFX RNG_MODULE_NAME ": " | ||
17 | 20 | ||
18 | #define RNG_MISCDEV_MINOR 183 /* official */ | 21 | #define RNG_MISCDEV_MINOR 183 /* official */ |
19 | 22 | ||
@@ -98,7 +101,7 @@ static int __init rng_init (void) | |||
98 | 101 | ||
99 | err = misc_register (&rng_miscdev); | 102 | err = misc_register (&rng_miscdev); |
100 | if (err) { | 103 | if (err) { |
101 | printk (KERN_ERR PFX "misc device register failed\n"); | 104 | printk (KERN_ERR RNG_MODULE_NAME ": misc device register failed\n"); |
102 | goto err_out_cleanup_hw; | 105 | goto err_out_cleanup_hw; |
103 | } | 106 | } |
104 | 107 | ||
@@ -120,3 +123,6 @@ static void __exit rng_cleanup (void) | |||
120 | 123 | ||
121 | module_init (rng_init); | 124 | module_init (rng_init); |
122 | module_exit (rng_cleanup); | 125 | module_exit (rng_cleanup); |
126 | |||
127 | MODULE_DESCRIPTION("UML Host Random Number Generator (RNG) driver"); | ||
128 | MODULE_LICENSE("GPL"); | ||
diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c index a2bac429f3d4..b32a77010fbe 100644 --- a/arch/um/drivers/ssl.c +++ b/arch/um/drivers/ssl.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include "init.h" | 22 | #include "init.h" |
23 | #include "irq_user.h" | 23 | #include "irq_user.h" |
24 | #include "mconsole_kern.h" | 24 | #include "mconsole_kern.h" |
25 | #include "2_5compat.h" | ||
26 | 25 | ||
27 | static int ssl_version = 1; | 26 | static int ssl_version = 1; |
28 | 27 | ||
diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c index 361d0be342b3..afbe1e71ed83 100644 --- a/arch/um/drivers/stdio_console.c +++ b/arch/um/drivers/stdio_console.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include "irq_user.h" | 28 | #include "irq_user.h" |
29 | #include "mconsole_kern.h" | 29 | #include "mconsole_kern.h" |
30 | #include "init.h" | 30 | #include "init.h" |
31 | #include "2_5compat.h" | ||
32 | 31 | ||
33 | #define MAX_TTYS (16) | 32 | #define MAX_TTYS (16) |
34 | 33 | ||
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 88f956c34fed..2a7f6892c55c 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -49,7 +49,6 @@ | |||
49 | #include "irq_user.h" | 49 | #include "irq_user.h" |
50 | #include "irq_kern.h" | 50 | #include "irq_kern.h" |
51 | #include "ubd_user.h" | 51 | #include "ubd_user.h" |
52 | #include "2_5compat.h" | ||
53 | #include "os.h" | 52 | #include "os.h" |
54 | #include "mem.h" | 53 | #include "mem.h" |
55 | #include "mem_kern.h" | 54 | #include "mem_kern.h" |
@@ -440,9 +439,9 @@ static int udb_setup(char *str) | |||
440 | __setup("udb", udb_setup); | 439 | __setup("udb", udb_setup); |
441 | __uml_help(udb_setup, | 440 | __uml_help(udb_setup, |
442 | "udb\n" | 441 | "udb\n" |
443 | " This option is here solely to catch ubd -> udb typos, which can be\n\n" | 442 | " This option is here solely to catch ubd -> udb typos, which can be\n" |
444 | " to impossible to catch visually unless you specifically look for\n\n" | 443 | " to impossible to catch visually unless you specifically look for\n" |
445 | " them. The only result of any option starting with 'udb' is an error\n\n" | 444 | " them. The only result of any option starting with 'udb' is an error\n" |
446 | " in the boot output.\n\n" | 445 | " in the boot output.\n\n" |
447 | ); | 446 | ); |
448 | 447 | ||
diff --git a/arch/um/include/2_5compat.h b/arch/um/include/2_5compat.h deleted file mode 100644 index abdb015a4d71..000000000000 --- a/arch/um/include/2_5compat.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #ifndef __2_5_COMPAT_H__ | ||
7 | #define __2_5_COMPAT_H__ | ||
8 | |||
9 | #define INIT_HARDSECT(arr, maj, sizes) | ||
10 | |||
11 | #define SET_PRI(task) do ; while(0) | ||
12 | |||
13 | #endif | ||
14 | |||
15 | /* | ||
16 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
17 | * Emacs will notice this stuff at the end of the file and automatically | ||
18 | * adjust the settings for this buffer only. This must remain at the end | ||
19 | * of the file. | ||
20 | * --------------------------------------------------------------------------- | ||
21 | * Local variables: | ||
22 | * c-file-style: "linux" | ||
23 | * End: | ||
24 | */ | ||
diff --git a/arch/um/include/sysrq.h b/arch/um/include/sysrq.h index 2ce9423460b3..c8d332b56b98 100644 --- a/arch/um/include/sysrq.h +++ b/arch/um/include/sysrq.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __UM_SYSRQ_H | 1 | #ifndef __UM_SYSRQ_H |
2 | #define __UM_SYSRQ_H | 2 | #define __UM_SYSRQ_H |
3 | 3 | ||
4 | extern void show_trace(unsigned long *stack); | 4 | struct task_struct; |
5 | extern void show_trace(struct task_struct* task, unsigned long *stack); | ||
5 | 6 | ||
6 | #endif | 7 | #endif |
diff --git a/arch/um/kernel/exec_kern.c b/arch/um/kernel/exec_kern.c index 49ddabe69be7..efd222ffe20e 100644 --- a/arch/um/kernel/exec_kern.c +++ b/arch/um/kernel/exec_kern.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include "kern.h" | 16 | #include "kern.h" |
17 | #include "irq_user.h" | 17 | #include "irq_user.h" |
18 | #include "tlb.h" | 18 | #include "tlb.h" |
19 | #include "2_5compat.h" | ||
20 | #include "os.h" | 19 | #include "os.h" |
21 | #include "time_user.h" | 20 | #include "time_user.h" |
22 | #include "choose-mode.h" | 21 | #include "choose-mode.h" |
diff --git a/arch/um/kernel/initrd_kern.c b/arch/um/kernel/initrd_kern.c deleted file mode 100644 index fc568af468b9..000000000000 --- a/arch/um/kernel/initrd_kern.c +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include "linux/init.h" | ||
7 | #include "linux/bootmem.h" | ||
8 | #include "linux/initrd.h" | ||
9 | #include "asm/types.h" | ||
10 | #include "user_util.h" | ||
11 | #include "kern_util.h" | ||
12 | #include "initrd.h" | ||
13 | #include "init.h" | ||
14 | #include "os.h" | ||
15 | |||
16 | /* Changed by uml_initrd_setup, which is a setup */ | ||
17 | static char *initrd __initdata = NULL; | ||
18 | |||
19 | static int __init read_initrd(void) | ||
20 | { | ||
21 | void *area; | ||
22 | long long size; | ||
23 | int err; | ||
24 | |||
25 | if(initrd == NULL) return 0; | ||
26 | err = os_file_size(initrd, &size); | ||
27 | if(err) return 0; | ||
28 | area = alloc_bootmem(size); | ||
29 | if(area == NULL) return 0; | ||
30 | if(load_initrd(initrd, area, size) == -1) return 0; | ||
31 | initrd_start = (unsigned long) area; | ||
32 | initrd_end = initrd_start + size; | ||
33 | return 0; | ||
34 | } | ||
35 | |||
36 | __uml_postsetup(read_initrd); | ||
37 | |||
38 | static int __init uml_initrd_setup(char *line, int *add) | ||
39 | { | ||
40 | initrd = line; | ||
41 | return 0; | ||
42 | } | ||
43 | |||
44 | __uml_setup("initrd=", uml_initrd_setup, | ||
45 | "initrd=<initrd image>\n" | ||
46 | " This is used to boot UML from an initrd image. The argument is the\n" | ||
47 | " name of the file containing the image.\n\n" | ||
48 | ); | ||
49 | |||
50 | /* | ||
51 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
52 | * Emacs will notice this stuff at the end of the file and automatically | ||
53 | * adjust the settings for this buffer only. This must remain at the end | ||
54 | * of the file. | ||
55 | * --------------------------------------------------------------------------- | ||
56 | * Local variables: | ||
57 | * c-file-style: "linux" | ||
58 | * End: | ||
59 | */ | ||
diff --git a/arch/um/kernel/initrd_user.c b/arch/um/kernel/initrd_user.c deleted file mode 100644 index cb90681e151c..000000000000 --- a/arch/um/kernel/initrd_user.c +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include <unistd.h> | ||
7 | #include <sys/types.h> | ||
8 | #include <sys/stat.h> | ||
9 | #include <errno.h> | ||
10 | |||
11 | #include "user_util.h" | ||
12 | #include "kern_util.h" | ||
13 | #include "user.h" | ||
14 | #include "initrd.h" | ||
15 | #include "os.h" | ||
16 | |||
17 | int load_initrd(char *filename, void *buf, int size) | ||
18 | { | ||
19 | int fd, n; | ||
20 | |||
21 | fd = os_open_file(filename, of_read(OPENFLAGS()), 0); | ||
22 | if(fd < 0){ | ||
23 | printk("Opening '%s' failed - err = %d\n", filename, -fd); | ||
24 | return(-1); | ||
25 | } | ||
26 | n = os_read_file(fd, buf, size); | ||
27 | if(n != size){ | ||
28 | printk("Read of %d bytes from '%s' failed, err = %d\n", size, | ||
29 | filename, -n); | ||
30 | return(-1); | ||
31 | } | ||
32 | |||
33 | os_close_file(fd); | ||
34 | return(0); | ||
35 | } | ||
36 | |||
37 | /* | ||
38 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
39 | * Emacs will notice this stuff at the end of the file and automatically | ||
40 | * adjust the settings for this buffer only. This must remain at the end | ||
41 | * of the file. | ||
42 | * --------------------------------------------------------------------------- | ||
43 | * Local variables: | ||
44 | * c-file-style: "linux" | ||
45 | * End: | ||
46 | */ | ||
diff --git a/arch/um/kernel/main.c b/arch/um/kernel/main.c index a17c49703f9b..e42e6364ca13 100644 --- a/arch/um/kernel/main.c +++ b/arch/um/kernel/main.c | |||
@@ -71,7 +71,7 @@ static __init void do_uml_initcalls(void) | |||
71 | 71 | ||
72 | static void last_ditch_exit(int sig) | 72 | static void last_ditch_exit(int sig) |
73 | { | 73 | { |
74 | CHOOSE_MODE(kmalloc_ok = 0, (void) 0); | 74 | kmalloc_ok = 0; |
75 | signal(SIGINT, SIG_DFL); | 75 | signal(SIGINT, SIG_DFL); |
76 | signal(SIGTERM, SIG_DFL); | 76 | signal(SIGTERM, SIG_DFL); |
77 | signal(SIGHUP, SIG_DFL); | 77 | signal(SIGHUP, SIG_DFL); |
@@ -87,7 +87,7 @@ int main(int argc, char **argv, char **envp) | |||
87 | { | 87 | { |
88 | char **new_argv; | 88 | char **new_argv; |
89 | sigset_t mask; | 89 | sigset_t mask; |
90 | int ret, i; | 90 | int ret, i, err; |
91 | 91 | ||
92 | /* Enable all signals except SIGIO - in some environments, we can | 92 | /* Enable all signals except SIGIO - in some environments, we can |
93 | * enter with some signals blocked | 93 | * enter with some signals blocked |
@@ -160,27 +160,29 @@ int main(int argc, char **argv, char **envp) | |||
160 | */ | 160 | */ |
161 | change_sig(SIGPROF, 0); | 161 | change_sig(SIGPROF, 0); |
162 | 162 | ||
163 | /* Reboot */ | 163 | /* This signal stuff used to be in the reboot case. However, |
164 | if(ret){ | 164 | * sometimes a SIGVTALRM can come in when we're halting (reproducably |
165 | int err; | 165 | * when writing out gcov information, presumably because that takes |
166 | 166 | * some time) and cause a segfault. | |
167 | printf("\n"); | 167 | */ |
168 | 168 | ||
169 | /* stop timers and set SIG*ALRM to be ignored */ | 169 | /* stop timers and set SIG*ALRM to be ignored */ |
170 | disable_timer(); | 170 | disable_timer(); |
171 | 171 | ||
172 | /* disable SIGIO for the fds and set SIGIO to be ignored */ | 172 | /* disable SIGIO for the fds and set SIGIO to be ignored */ |
173 | err = deactivate_all_fds(); | 173 | err = deactivate_all_fds(); |
174 | if(err) | 174 | if(err) |
175 | printf("deactivate_all_fds failed, errno = %d\n", | 175 | printf("deactivate_all_fds failed, errno = %d\n", -err); |
176 | -err); | ||
177 | 176 | ||
178 | /* Let any pending signals fire now. This ensures | 177 | /* Let any pending signals fire now. This ensures |
179 | * that they won't be delivered after the exec, when | 178 | * that they won't be delivered after the exec, when |
180 | * they are definitely not expected. | 179 | * they are definitely not expected. |
181 | */ | 180 | */ |
182 | unblock_signals(); | 181 | unblock_signals(); |
183 | 182 | ||
183 | /* Reboot */ | ||
184 | if(ret){ | ||
185 | printf("\n"); | ||
184 | execvp(new_argv[0], new_argv); | 186 | execvp(new_argv[0], new_argv); |
185 | perror("Failed to exec kernel"); | 187 | perror("Failed to exec kernel"); |
186 | ret = 1; | 188 | ret = 1; |
diff --git a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c index c1adf7ba3fd1..804c6bbdf67c 100644 --- a/arch/um/kernel/process_kern.c +++ b/arch/um/kernel/process_kern.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #include "tlb.h" | 43 | #include "tlb.h" |
44 | #include "frame_kern.h" | 44 | #include "frame_kern.h" |
45 | #include "sigcontext.h" | 45 | #include "sigcontext.h" |
46 | #include "2_5compat.h" | ||
47 | #include "os.h" | 46 | #include "os.h" |
48 | #include "mode.h" | 47 | #include "mode.h" |
49 | #include "mode_kern.h" | 48 | #include "mode_kern.h" |
@@ -55,18 +54,6 @@ | |||
55 | */ | 54 | */ |
56 | struct cpu_task cpu_tasks[NR_CPUS] = { [0 ... NR_CPUS - 1] = { -1, NULL } }; | 55 | struct cpu_task cpu_tasks[NR_CPUS] = { [0 ... NR_CPUS - 1] = { -1, NULL } }; |
57 | 56 | ||
58 | struct task_struct *get_task(int pid, int require) | ||
59 | { | ||
60 | struct task_struct *ret; | ||
61 | |||
62 | read_lock(&tasklist_lock); | ||
63 | ret = find_task_by_pid(pid); | ||
64 | read_unlock(&tasklist_lock); | ||
65 | |||
66 | if(require && (ret == NULL)) panic("get_task couldn't find a task\n"); | ||
67 | return(ret); | ||
68 | } | ||
69 | |||
70 | int external_pid(void *t) | 57 | int external_pid(void *t) |
71 | { | 58 | { |
72 | struct task_struct *task = t ? t : current; | 59 | struct task_struct *task = t ? t : current; |
@@ -189,7 +176,6 @@ void default_idle(void) | |||
189 | 176 | ||
190 | while(1){ | 177 | while(1){ |
191 | /* endless idle loop with no priority at all */ | 178 | /* endless idle loop with no priority at all */ |
192 | SET_PRI(current); | ||
193 | 179 | ||
194 | /* | 180 | /* |
195 | * although we are an idle CPU, we do not want to | 181 | * although we are an idle CPU, we do not want to |
@@ -212,11 +198,6 @@ int page_size(void) | |||
212 | return(PAGE_SIZE); | 198 | return(PAGE_SIZE); |
213 | } | 199 | } |
214 | 200 | ||
215 | unsigned long page_mask(void) | ||
216 | { | ||
217 | return(PAGE_MASK); | ||
218 | } | ||
219 | |||
220 | void *um_virt_to_phys(struct task_struct *task, unsigned long addr, | 201 | void *um_virt_to_phys(struct task_struct *task, unsigned long addr, |
221 | pte_t *pte_out) | 202 | pte_t *pte_out) |
222 | { | 203 | { |
@@ -349,11 +330,6 @@ char *uml_strdup(char *string) | |||
349 | return(new); | 330 | return(new); |
350 | } | 331 | } |
351 | 332 | ||
352 | void *get_init_task(void) | ||
353 | { | ||
354 | return(&init_thread_union.thread_info.task); | ||
355 | } | ||
356 | |||
357 | int copy_to_user_proc(void __user *to, void *from, int size) | 333 | int copy_to_user_proc(void __user *to, void *from, int size) |
358 | { | 334 | { |
359 | return(copy_to_user(to, from, size)); | 335 | return(copy_to_user(to, from, size)); |
@@ -480,15 +456,3 @@ unsigned long arch_align_stack(unsigned long sp) | |||
480 | return sp & ~0xf; | 456 | return sp & ~0xf; |
481 | } | 457 | } |
482 | #endif | 458 | #endif |
483 | |||
484 | |||
485 | /* | ||
486 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
487 | * Emacs will notice this stuff at the end of the file and automatically | ||
488 | * adjust the settings for this buffer only. This must remain at the end | ||
489 | * of the file. | ||
490 | * --------------------------------------------------------------------------- | ||
491 | * Local variables: | ||
492 | * c-file-style: "linux" | ||
493 | * End: | ||
494 | */ | ||
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c index 2925e15324de..71af4d503899 100644 --- a/arch/um/kernel/ptrace.c +++ b/arch/um/kernel/ptrace.c | |||
@@ -322,11 +322,9 @@ void syscall_trace(union uml_pt_regs *regs, int entryexit) | |||
322 | UPT_SYSCALL_ARG2(regs), | 322 | UPT_SYSCALL_ARG2(regs), |
323 | UPT_SYSCALL_ARG3(regs), | 323 | UPT_SYSCALL_ARG3(regs), |
324 | UPT_SYSCALL_ARG4(regs)); | 324 | UPT_SYSCALL_ARG4(regs)); |
325 | else { | 325 | else audit_syscall_exit(current, |
326 | int res = UPT_SYSCALL_RET(regs); | 326 | AUDITSC_RESULT(UPT_SYSCALL_RET(regs)), |
327 | audit_syscall_exit(current, AUDITSC_RESULT(res), | 327 | UPT_SYSCALL_RET(regs)); |
328 | res); | ||
329 | } | ||
330 | } | 328 | } |
331 | 329 | ||
332 | /* Fake a debug trap */ | 330 | /* Fake a debug trap */ |
@@ -356,14 +354,3 @@ void syscall_trace(union uml_pt_regs *regs, int entryexit) | |||
356 | current->exit_code = 0; | 354 | current->exit_code = 0; |
357 | } | 355 | } |
358 | } | 356 | } |
359 | |||
360 | /* | ||
361 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
362 | * Emacs will notice this stuff at the end of the file and automatically | ||
363 | * adjust the settings for this buffer only. This must remain at the end | ||
364 | * of the file. | ||
365 | * --------------------------------------------------------------------------- | ||
366 | * Local variables: | ||
367 | * c-file-style: "linux" | ||
368 | * End: | ||
369 | */ | ||
diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c index e630438f9e73..f80850091e79 100644 --- a/arch/um/kernel/sysrq.c +++ b/arch/um/kernel/sysrq.c | |||
@@ -3,6 +3,7 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/config.h" | ||
6 | #include "linux/sched.h" | 7 | #include "linux/sched.h" |
7 | #include "linux/kernel.h" | 8 | #include "linux/kernel.h" |
8 | #include "linux/module.h" | 9 | #include "linux/module.h" |
@@ -12,14 +13,14 @@ | |||
12 | #include "sysrq.h" | 13 | #include "sysrq.h" |
13 | #include "user_util.h" | 14 | #include "user_util.h" |
14 | 15 | ||
15 | void show_trace(unsigned long * stack) | 16 | /* Catch non-i386 SUBARCH's. */ |
17 | #if !defined(CONFIG_UML_X86) || defined(CONFIG_64BIT) | ||
18 | void show_trace(struct task_struct *task, unsigned long * stack) | ||
16 | { | 19 | { |
17 | /* XXX: Copy the CONFIG_FRAME_POINTER stack-walking backtrace from | ||
18 | * arch/i386/kernel/traps.c, and then move this to sys-i386/sysrq.c.*/ | ||
19 | unsigned long addr; | 20 | unsigned long addr; |
20 | 21 | ||
21 | if (!stack) { | 22 | if (!stack) { |
22 | stack = (unsigned long*) &stack; | 23 | stack = (unsigned long*) &stack; |
23 | WARN_ON(1); | 24 | WARN_ON(1); |
24 | } | 25 | } |
25 | 26 | ||
@@ -35,6 +36,7 @@ void show_trace(unsigned long * stack) | |||
35 | } | 36 | } |
36 | printk("\n"); | 37 | printk("\n"); |
37 | } | 38 | } |
39 | #endif | ||
38 | 40 | ||
39 | /* | 41 | /* |
40 | * stack dumps generator - this is used by arch-independent code. | 42 | * stack dumps generator - this is used by arch-independent code. |
@@ -44,7 +46,7 @@ void dump_stack(void) | |||
44 | { | 46 | { |
45 | unsigned long stack; | 47 | unsigned long stack; |
46 | 48 | ||
47 | show_trace(&stack); | 49 | show_trace(current, &stack); |
48 | } | 50 | } |
49 | EXPORT_SYMBOL(dump_stack); | 51 | EXPORT_SYMBOL(dump_stack); |
50 | 52 | ||
@@ -59,7 +61,11 @@ void show_stack(struct task_struct *task, unsigned long *esp) | |||
59 | int i; | 61 | int i; |
60 | 62 | ||
61 | if (esp == NULL) { | 63 | if (esp == NULL) { |
62 | if (task != current) { | 64 | if (task != current && task != NULL) { |
65 | /* XXX: Isn't this bogus? I.e. isn't this the | ||
66 | * *userspace* stack of this task? If not so, use this | ||
67 | * even when task == current (as in i386). | ||
68 | */ | ||
63 | esp = (unsigned long *) KSTK_ESP(task); | 69 | esp = (unsigned long *) KSTK_ESP(task); |
64 | /* Which one? No actual difference - just coding style.*/ | 70 | /* Which one? No actual difference - just coding style.*/ |
65 | //esp = (unsigned long *) PT_REGS_IP(&task->thread.regs); | 71 | //esp = (unsigned long *) PT_REGS_IP(&task->thread.regs); |
@@ -77,5 +83,6 @@ void show_stack(struct task_struct *task, unsigned long *esp) | |||
77 | printk("%08lx ", *stack++); | 83 | printk("%08lx ", *stack++); |
78 | } | 84 | } |
79 | 85 | ||
80 | show_trace(esp); | 86 | printk("Call Trace: \n"); |
87 | show_trace(current, esp); | ||
81 | } | 88 | } |
diff --git a/arch/um/kernel/trap_kern.c b/arch/um/kernel/trap_kern.c index 1de22d8a313a..c20aef120598 100644 --- a/arch/um/kernel/trap_kern.c +++ b/arch/um/kernel/trap_kern.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include "kern.h" | 23 | #include "kern.h" |
24 | #include "chan_kern.h" | 24 | #include "chan_kern.h" |
25 | #include "mconsole_kern.h" | 25 | #include "mconsole_kern.h" |
26 | #include "2_5compat.h" | ||
27 | #include "mem.h" | 26 | #include "mem.h" |
28 | #include "mem_kern.h" | 27 | #include "mem_kern.h" |
29 | 28 | ||
diff --git a/arch/um/kernel/tt/process_kern.c b/arch/um/kernel/tt/process_kern.c index df810ca8fc12..776310fd5b8b 100644 --- a/arch/um/kernel/tt/process_kern.c +++ b/arch/um/kernel/tt/process_kern.c | |||
@@ -32,10 +32,6 @@ void *switch_to_tt(void *prev, void *next, void *last) | |||
32 | unsigned long flags; | 32 | unsigned long flags; |
33 | int err, vtalrm, alrm, prof, cpu; | 33 | int err, vtalrm, alrm, prof, cpu; |
34 | char c; | 34 | char c; |
35 | /* jailing and SMP are incompatible, so this doesn't need to be | ||
36 | * made per-cpu | ||
37 | */ | ||
38 | static int reading; | ||
39 | 35 | ||
40 | from = prev; | 36 | from = prev; |
41 | to = next; | 37 | to = next; |
@@ -59,13 +55,11 @@ void *switch_to_tt(void *prev, void *next, void *last) | |||
59 | c = 0; | 55 | c = 0; |
60 | set_current(to); | 56 | set_current(to); |
61 | 57 | ||
62 | reading = 0; | ||
63 | err = os_write_file(to->thread.mode.tt.switch_pipe[1], &c, sizeof(c)); | 58 | err = os_write_file(to->thread.mode.tt.switch_pipe[1], &c, sizeof(c)); |
64 | if(err != sizeof(c)) | 59 | if(err != sizeof(c)) |
65 | panic("write of switch_pipe failed, err = %d", -err); | 60 | panic("write of switch_pipe failed, err = %d", -err); |
66 | 61 | ||
67 | reading = 1; | 62 | if(from->thread.mode.tt.switch_pipe[0] == -1) |
68 | if(from->thread.mode.tt.switch_pipe[0] == -1) | ||
69 | os_kill_process(os_getpid(), 0); | 63 | os_kill_process(os_getpid(), 0); |
70 | 64 | ||
71 | err = os_read_file(from->thread.mode.tt.switch_pipe[0], &c, sizeof(c)); | 65 | err = os_read_file(from->thread.mode.tt.switch_pipe[0], &c, sizeof(c)); |
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 4d10ec372a67..418427107b29 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
@@ -111,12 +111,6 @@ struct seq_operations cpuinfo_op = { | |||
111 | .show = show_cpuinfo, | 111 | .show = show_cpuinfo, |
112 | }; | 112 | }; |
113 | 113 | ||
114 | pte_t * __bad_pagetable(void) | ||
115 | { | ||
116 | panic("Someone should implement __bad_pagetable"); | ||
117 | return(NULL); | ||
118 | } | ||
119 | |||
120 | /* Set in linux_main */ | 114 | /* Set in linux_main */ |
121 | unsigned long host_task_size; | 115 | unsigned long host_task_size; |
122 | unsigned long task_size; | 116 | unsigned long task_size; |
diff --git a/arch/um/sys-i386/sysrq.c b/arch/um/sys-i386/sysrq.c index 281fc7b8ca00..e3706d15c4f5 100644 --- a/arch/um/sys-i386/sysrq.c +++ b/arch/um/sys-i386/sysrq.c | |||
@@ -3,12 +3,15 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/config.h" | ||
6 | #include "linux/kernel.h" | 7 | #include "linux/kernel.h" |
7 | #include "linux/smp.h" | 8 | #include "linux/smp.h" |
8 | #include "linux/sched.h" | 9 | #include "linux/sched.h" |
10 | #include "linux/kallsyms.h" | ||
9 | #include "asm/ptrace.h" | 11 | #include "asm/ptrace.h" |
10 | #include "sysrq.h" | 12 | #include "sysrq.h" |
11 | 13 | ||
14 | /* This is declared by <linux/sched.h> */ | ||
12 | void show_regs(struct pt_regs *regs) | 15 | void show_regs(struct pt_regs *regs) |
13 | { | 16 | { |
14 | printk("\n"); | 17 | printk("\n"); |
@@ -31,5 +34,80 @@ void show_regs(struct pt_regs *regs) | |||
31 | 0xffff & PT_REGS_DS(regs), | 34 | 0xffff & PT_REGS_DS(regs), |
32 | 0xffff & PT_REGS_ES(regs)); | 35 | 0xffff & PT_REGS_ES(regs)); |
33 | 36 | ||
34 | show_trace((unsigned long *) ®s); | 37 | show_trace(NULL, (unsigned long *) ®s); |
35 | } | 38 | } |
39 | |||
40 | /* Copied from i386. */ | ||
41 | static inline int valid_stack_ptr(struct thread_info *tinfo, void *p) | ||
42 | { | ||
43 | return p > (void *)tinfo && | ||
44 | p < (void *)tinfo + THREAD_SIZE - 3; | ||
45 | } | ||
46 | |||
47 | /* Adapted from i386 (we also print the address we read from). */ | ||
48 | static inline unsigned long print_context_stack(struct thread_info *tinfo, | ||
49 | unsigned long *stack, unsigned long ebp) | ||
50 | { | ||
51 | unsigned long addr; | ||
52 | |||
53 | #ifdef CONFIG_FRAME_POINTER | ||
54 | while (valid_stack_ptr(tinfo, (void *)ebp)) { | ||
55 | addr = *(unsigned long *)(ebp + 4); | ||
56 | printk("%08lx: [<%08lx>]", ebp + 4, addr); | ||
57 | print_symbol(" %s", addr); | ||
58 | printk("\n"); | ||
59 | ebp = *(unsigned long *)ebp; | ||
60 | } | ||
61 | #else | ||
62 | while (valid_stack_ptr(tinfo, stack)) { | ||
63 | addr = *stack; | ||
64 | if (__kernel_text_address(addr)) { | ||
65 | printk("%08lx: [<%08lx>]", (unsigned long) stack, addr); | ||
66 | print_symbol(" %s", addr); | ||
67 | printk("\n"); | ||
68 | } | ||
69 | stack++; | ||
70 | } | ||
71 | #endif | ||
72 | return ebp; | ||
73 | } | ||
74 | |||
75 | void show_trace(struct task_struct* task, unsigned long * stack) | ||
76 | { | ||
77 | unsigned long ebp; | ||
78 | struct thread_info *context; | ||
79 | |||
80 | /* Turn this into BUG_ON if possible. */ | ||
81 | if (!stack) { | ||
82 | stack = (unsigned long*) &stack; | ||
83 | printk("show_trace: got NULL stack, implicit assumption task == current"); | ||
84 | WARN_ON(1); | ||
85 | } | ||
86 | |||
87 | if (!task) | ||
88 | task = current; | ||
89 | |||
90 | if (task != current) { | ||
91 | //ebp = (unsigned long) KSTK_EBP(task); | ||
92 | /* Which one? No actual difference - just coding style.*/ | ||
93 | ebp = (unsigned long) PT_REGS_EBP(&task->thread.regs); | ||
94 | } else { | ||
95 | asm ("movl %%ebp, %0" : "=r" (ebp) : ); | ||
96 | } | ||
97 | |||
98 | context = (struct thread_info *) | ||
99 | ((unsigned long)stack & (~(THREAD_SIZE - 1))); | ||
100 | print_context_stack(context, stack, ebp); | ||
101 | |||
102 | /*while (((long) stack & (THREAD_SIZE-1)) != 0) { | ||
103 | addr = *stack; | ||
104 | if (__kernel_text_address(addr)) { | ||
105 | printk("%08lx: [<%08lx>]", (unsigned long) stack, addr); | ||
106 | print_symbol(" %s", addr); | ||
107 | printk("\n"); | ||
108 | } | ||
109 | stack++; | ||
110 | }*/ | ||
111 | printk("\n"); | ||
112 | } | ||
113 | |||
diff --git a/arch/um/sys-ppc/sysrq.c b/arch/um/sys-ppc/sysrq.c index 82d6e9335bb6..2f816f1a0ff4 100644 --- a/arch/um/sys-ppc/sysrq.c +++ b/arch/um/sys-ppc/sysrq.c | |||
@@ -27,17 +27,5 @@ void show_regs(struct pt_regs_subarch *regs) | |||
27 | 0xffff & regs->xds, 0xffff & regs->xes); | 27 | 0xffff & regs->xds, 0xffff & regs->xes); |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | show_trace(®s->gpr[1]); | 30 | show_trace(current, ®s->gpr[1]); |
31 | } | 31 | } |
32 | |||
33 | |||
34 | /* | ||
35 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
36 | * Emacs will notice this stuff at the end of the file and automatically | ||
37 | * adjust the settings for this buffer only. This must remain at the end | ||
38 | * of the file. | ||
39 | * --------------------------------------------------------------------------- | ||
40 | * Local variables: | ||
41 | * c-file-style: "linux" | ||
42 | * End: | ||
43 | */ | ||
diff --git a/arch/um/sys-x86_64/syscalls.c b/arch/um/sys-x86_64/syscalls.c index d4a59657fb99..6f44f40204ed 100644 --- a/arch/um/sys-x86_64/syscalls.c +++ b/arch/um/sys-x86_64/syscalls.c | |||
@@ -133,23 +133,27 @@ static long arch_prctl_tt(int code, unsigned long addr) | |||
133 | 133 | ||
134 | #ifdef CONFIG_MODE_SKAS | 134 | #ifdef CONFIG_MODE_SKAS |
135 | 135 | ||
136 | /* XXX: Must also call arch_prctl in the host, beside saving the segment bases! */ | ||
136 | static long arch_prctl_skas(int code, unsigned long addr) | 137 | static long arch_prctl_skas(int code, unsigned long addr) |
137 | { | 138 | { |
138 | long ret = 0; | 139 | long ret = 0; |
139 | 140 | ||
140 | switch(code){ | 141 | switch(code){ |
141 | case ARCH_SET_GS: | ||
142 | current->thread.regs.regs.skas.regs[GS_BASE / sizeof(unsigned long)] = addr; | ||
143 | break; | ||
144 | case ARCH_SET_FS: | 142 | case ARCH_SET_FS: |
145 | current->thread.regs.regs.skas.regs[FS_BASE / sizeof(unsigned long)] = addr; | 143 | current->thread.regs.regs.skas.regs[FS_BASE / sizeof(unsigned long)] = addr; |
146 | break; | 144 | break; |
145 | case ARCH_SET_GS: | ||
146 | current->thread.regs.regs.skas.regs[GS_BASE / sizeof(unsigned long)] = addr; | ||
147 | break; | ||
147 | case ARCH_GET_FS: | 148 | case ARCH_GET_FS: |
148 | ret = put_user(current->thread.regs.regs.skas.regs[GS / sizeof(unsigned long)], &addr); | 149 | ret = put_user(current->thread.regs.regs.skas. |
150 | regs[FS_BASE / sizeof(unsigned long)], | ||
151 | (unsigned long __user *)addr); | ||
149 | break; | 152 | break; |
150 | case ARCH_GET_GS: | 153 | case ARCH_GET_GS: |
151 | ret = put_user(current->thread.regs.regs.skas.regs[FS / sizeof(unsigned \ | 154 | ret = put_user(current->thread.regs.regs.skas. |
152 | long)], &addr); | 155 | regs[GS_BASE / sizeof(unsigned long)], |
156 | (unsigned long __user *)addr); | ||
153 | break; | 157 | break; |
154 | default: | 158 | default: |
155 | ret = -EINVAL; | 159 | ret = -EINVAL; |
diff --git a/arch/um/sys-x86_64/sysrq.c b/arch/um/sys-x86_64/sysrq.c index ddf74691a610..d0a25af19a5b 100644 --- a/arch/um/sys-x86_64/sysrq.c +++ b/arch/um/sys-x86_64/sysrq.c | |||
@@ -36,14 +36,5 @@ void __show_regs(struct pt_regs * regs) | |||
36 | void show_regs(struct pt_regs *regs) | 36 | void show_regs(struct pt_regs *regs) |
37 | { | 37 | { |
38 | __show_regs(regs); | 38 | __show_regs(regs); |
39 | show_trace((unsigned long *) ®s); | 39 | show_trace(current, (unsigned long *) ®s); |
40 | } | 40 | } |
41 | |||
42 | /* Emacs will notice this stuff at the end of the file and automatically | ||
43 | * adjust the settings for this buffer only. This must remain at the end | ||
44 | * of the file. | ||
45 | * --------------------------------------------------------------------------- | ||
46 | * Local variables: | ||
47 | * c-file-style: "linux" | ||
48 | * End: | ||
49 | */ | ||
diff --git a/arch/x86_64/kernel/signal.c b/arch/x86_64/kernel/signal.c index 3fdcdba0fec5..429c0269dc4e 100644 --- a/arch/x86_64/kernel/signal.c +++ b/arch/x86_64/kernel/signal.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
29 | #include <asm/i387.h> | 29 | #include <asm/i387.h> |
30 | #include <asm/proto.h> | 30 | #include <asm/proto.h> |
31 | #include <asm/ia32_unistd.h> | ||
31 | 32 | ||
32 | /* #define DEBUG_SIG 1 */ | 33 | /* #define DEBUG_SIG 1 */ |
33 | 34 | ||
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index fcca26c89bbc..38dd9ffbe8bc 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c | |||
@@ -488,6 +488,20 @@ static int viocd_packet(struct cdrom_device_info *cdi, | |||
488 | & (CDC_DVD_RAM | CDC_RAM)) != 0; | 488 | & (CDC_DVD_RAM | CDC_RAM)) != 0; |
489 | } | 489 | } |
490 | break; | 490 | break; |
491 | case GPCMD_GET_CONFIGURATION: | ||
492 | if (cgc->cmd[3] == CDF_RWRT) { | ||
493 | struct rwrt_feature_desc *rfd = (struct rwrt_feature_desc *)(cgc->buffer + sizeof(struct feature_header)); | ||
494 | |||
495 | if ((buflen >= | ||
496 | (sizeof(struct feature_header) + sizeof(*rfd))) && | ||
497 | (cdi->ops->capability & ~cdi->mask | ||
498 | & (CDC_DVD_RAM | CDC_RAM))) { | ||
499 | rfd->feature_code = cpu_to_be16(CDF_RWRT); | ||
500 | rfd->curr = 1; | ||
501 | ret = 0; | ||
502 | } | ||
503 | } | ||
504 | break; | ||
491 | default: | 505 | default: |
492 | if (cgc->sense) { | 506 | if (cgc->sense) { |
493 | /* indicate Unknown code */ | 507 | /* indicate Unknown code */ |
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index 564974ce5793..96fb9870834a 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c | |||
@@ -101,6 +101,7 @@ struct mousedev_list { | |||
101 | unsigned char ready, buffer, bufsiz; | 101 | unsigned char ready, buffer, bufsiz; |
102 | unsigned char imexseq, impsseq; | 102 | unsigned char imexseq, impsseq; |
103 | enum mousedev_emul mode; | 103 | enum mousedev_emul mode; |
104 | unsigned long last_buttons; | ||
104 | }; | 105 | }; |
105 | 106 | ||
106 | #define MOUSEDEV_SEQ_LEN 6 | 107 | #define MOUSEDEV_SEQ_LEN 6 |
@@ -224,7 +225,7 @@ static void mousedev_notify_readers(struct mousedev *mousedev, struct mousedev_h | |||
224 | spin_lock_irqsave(&list->packet_lock, flags); | 225 | spin_lock_irqsave(&list->packet_lock, flags); |
225 | 226 | ||
226 | p = &list->packets[list->head]; | 227 | p = &list->packets[list->head]; |
227 | if (list->ready && p->buttons != packet->buttons) { | 228 | if (list->ready && p->buttons != mousedev->packet.buttons) { |
228 | unsigned int new_head = (list->head + 1) % PACKET_QUEUE_LEN; | 229 | unsigned int new_head = (list->head + 1) % PACKET_QUEUE_LEN; |
229 | if (new_head != list->tail) { | 230 | if (new_head != list->tail) { |
230 | p = &list->packets[list->head = new_head]; | 231 | p = &list->packets[list->head = new_head]; |
@@ -249,10 +250,13 @@ static void mousedev_notify_readers(struct mousedev *mousedev, struct mousedev_h | |||
249 | p->dz += packet->dz; | 250 | p->dz += packet->dz; |
250 | p->buttons = mousedev->packet.buttons; | 251 | p->buttons = mousedev->packet.buttons; |
251 | 252 | ||
252 | list->ready = 1; | 253 | if (p->dx || p->dy || p->dz || p->buttons != list->last_buttons) |
254 | list->ready = 1; | ||
253 | 255 | ||
254 | spin_unlock_irqrestore(&list->packet_lock, flags); | 256 | spin_unlock_irqrestore(&list->packet_lock, flags); |
255 | kill_fasync(&list->fasync, SIGIO, POLL_IN); | 257 | |
258 | if (list->ready) | ||
259 | kill_fasync(&list->fasync, SIGIO, POLL_IN); | ||
256 | } | 260 | } |
257 | 261 | ||
258 | wake_up_interruptible(&mousedev->wait); | 262 | wake_up_interruptible(&mousedev->wait); |
@@ -477,9 +481,10 @@ static void mousedev_packet(struct mousedev_list *list, signed char *ps2_data) | |||
477 | } | 481 | } |
478 | 482 | ||
479 | if (!p->dx && !p->dy && !p->dz) { | 483 | if (!p->dx && !p->dy && !p->dz) { |
480 | if (list->tail == list->head) | 484 | if (list->tail == list->head) { |
481 | list->ready = 0; | 485 | list->ready = 0; |
482 | else | 486 | list->last_buttons = p->buttons; |
487 | } else | ||
483 | list->tail = (list->tail + 1) % PACKET_QUEUE_LEN; | 488 | list->tail = (list->tail + 1) % PACKET_QUEUE_LEN; |
484 | } | 489 | } |
485 | 490 | ||
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index e654aa5eecd4..bb9f4044c74d 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -2421,7 +2421,7 @@ pmac_wakeup_devices(void) | |||
2421 | 2421 | ||
2422 | /* Re-enable local CPU interrupts */ | 2422 | /* Re-enable local CPU interrupts */ |
2423 | local_irq_enable(); | 2423 | local_irq_enable(); |
2424 | mdelay(100); | 2424 | mdelay(10); |
2425 | preempt_enable(); | 2425 | preempt_enable(); |
2426 | 2426 | ||
2427 | /* Re-enable clock spreading on some machines */ | 2427 | /* Re-enable clock spreading on some machines */ |
@@ -2549,7 +2549,9 @@ powerbook_sleep_Core99(void) | |||
2549 | return ret; | 2549 | return ret; |
2550 | } | 2550 | } |
2551 | 2551 | ||
2552 | printk(KERN_DEBUG "HID1, before: %x\n", mfspr(SPRN_HID1)); | 2552 | /* Stop environment and ADB interrupts */ |
2553 | pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, 0); | ||
2554 | pmu_wait_complete(&req); | ||
2553 | 2555 | ||
2554 | /* Tell PMU what events will wake us up */ | 2556 | /* Tell PMU what events will wake us up */ |
2555 | pmu_request(&req, NULL, 4, PMU_POWER_EVENTS, PMU_PWR_CLR_WAKEUP_EVENTS, | 2557 | pmu_request(&req, NULL, 4, PMU_POWER_EVENTS, PMU_PWR_CLR_WAKEUP_EVENTS, |
@@ -2611,8 +2613,6 @@ powerbook_sleep_Core99(void) | |||
2611 | pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, pmu_intr_mask); | 2613 | pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, pmu_intr_mask); |
2612 | pmu_wait_complete(&req); | 2614 | pmu_wait_complete(&req); |
2613 | 2615 | ||
2614 | printk(KERN_DEBUG "HID1, after: %x\n", mfspr(SPRN_HID1)); | ||
2615 | |||
2616 | pmac_wakeup_devices(); | 2616 | pmac_wakeup_devices(); |
2617 | 2617 | ||
2618 | return 0; | 2618 | return 0; |
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c index d047e349d706..1339912c308b 100644 --- a/drivers/media/dvb/bt8xx/dst.c +++ b/drivers/media/dvb/bt8xx/dst.c | |||
@@ -906,22 +906,12 @@ static int dst_tone_power_cmd(struct dst_state* state) | |||
906 | if (state->dst_type == DST_TYPE_IS_TERR) | 906 | if (state->dst_type == DST_TYPE_IS_TERR) |
907 | return 0; | 907 | return 0; |
908 | 908 | ||
909 | if (state->voltage == SEC_VOLTAGE_OFF) | 909 | paket[4] = state->tx_tuna[4]; |
910 | paket[4] = 0; | 910 | paket[2] = state->tx_tuna[2]; |
911 | else | 911 | paket[3] = state->tx_tuna[3]; |
912 | paket[4] = 1; | ||
913 | |||
914 | if (state->tone == SEC_TONE_ON) | ||
915 | paket[2] = 0x02; | ||
916 | else | ||
917 | paket[2] = 0; | ||
918 | if (state->minicmd == SEC_MINI_A) | ||
919 | paket[3] = 0x02; | ||
920 | else | ||
921 | paket[3] = 0; | ||
922 | |||
923 | paket[7] = dst_check_sum (paket, 7); | 912 | paket[7] = dst_check_sum (paket, 7); |
924 | dst_command(state, paket, 8); | 913 | dst_command(state, paket, 8); |
914 | |||
925 | return 0; | 915 | return 0; |
926 | } | 916 | } |
927 | 917 | ||
@@ -980,7 +970,7 @@ static int dst_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage); | |||
980 | 970 | ||
981 | static int dst_write_tuna(struct dvb_frontend* fe) | 971 | static int dst_write_tuna(struct dvb_frontend* fe) |
982 | { | 972 | { |
983 | struct dst_state* state = (struct dst_state*) fe->demodulator_priv; | 973 | struct dst_state* state = fe->demodulator_priv; |
984 | int retval; | 974 | int retval; |
985 | u8 reply; | 975 | u8 reply; |
986 | 976 | ||
@@ -1048,10 +1038,10 @@ static int dst_write_tuna(struct dvb_frontend* fe) | |||
1048 | 1038 | ||
1049 | static int dst_set_diseqc(struct dvb_frontend* fe, struct dvb_diseqc_master_cmd* cmd) | 1039 | static int dst_set_diseqc(struct dvb_frontend* fe, struct dvb_diseqc_master_cmd* cmd) |
1050 | { | 1040 | { |
1051 | struct dst_state* state = (struct dst_state*) fe->demodulator_priv; | 1041 | struct dst_state* state = fe->demodulator_priv; |
1052 | u8 paket[8] = { 0x00, 0x08, 0x04, 0xe0, 0x10, 0x38, 0xf0, 0xec }; | 1042 | u8 paket[8] = { 0x00, 0x08, 0x04, 0xe0, 0x10, 0x38, 0xf0, 0xec }; |
1053 | 1043 | ||
1054 | if (state->dst_type == DST_TYPE_IS_TERR) | 1044 | if (state->dst_type != DST_TYPE_IS_SAT) |
1055 | return 0; | 1045 | return 0; |
1056 | 1046 | ||
1057 | if (cmd->msg_len == 0 || cmd->msg_len > 4) | 1047 | if (cmd->msg_len == 0 || cmd->msg_len > 4) |
@@ -1064,39 +1054,32 @@ static int dst_set_diseqc(struct dvb_frontend* fe, struct dvb_diseqc_master_cmd* | |||
1064 | 1054 | ||
1065 | static int dst_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) | 1055 | static int dst_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) |
1066 | { | 1056 | { |
1067 | u8 *val; | ||
1068 | int need_cmd; | 1057 | int need_cmd; |
1069 | struct dst_state* state = (struct dst_state*) fe->demodulator_priv; | 1058 | struct dst_state* state = fe->demodulator_priv; |
1070 | 1059 | ||
1071 | state->voltage = voltage; | 1060 | state->voltage = voltage; |
1072 | 1061 | ||
1073 | if (state->dst_type == DST_TYPE_IS_TERR) | 1062 | if (state->dst_type != DST_TYPE_IS_SAT) |
1074 | return 0; | 1063 | return 0; |
1075 | 1064 | ||
1076 | need_cmd = 0; | 1065 | need_cmd = 0; |
1077 | val = &state->tx_tuna[0]; | ||
1078 | val[8] &= ~0x40; | ||
1079 | switch (voltage) { | 1066 | switch (voltage) { |
1080 | case SEC_VOLTAGE_13: | 1067 | case SEC_VOLTAGE_13: |
1081 | if ((state->diseq_flags & HAS_POWER) == 0) | 1068 | case SEC_VOLTAGE_18: |
1082 | need_cmd = 1; | 1069 | if ((state->diseq_flags & HAS_POWER) == 0) |
1083 | state->diseq_flags |= HAS_POWER; | 1070 | need_cmd = 1; |
1084 | break; | 1071 | state->diseq_flags |= HAS_POWER; |
1072 | state->tx_tuna[4] = 0x01; | ||
1073 | break; | ||
1085 | 1074 | ||
1086 | case SEC_VOLTAGE_18: | 1075 | case SEC_VOLTAGE_OFF: |
1087 | if ((state->diseq_flags & HAS_POWER) == 0) | ||
1088 | need_cmd = 1; | 1076 | need_cmd = 1; |
1089 | state->diseq_flags |= HAS_POWER; | 1077 | state->diseq_flags &= ~(HAS_POWER | HAS_LOCK | ATTEMPT_TUNE); |
1090 | val[8] |= 0x40; | 1078 | state->tx_tuna[4] = 0x00; |
1091 | break; | 1079 | break; |
1092 | |||
1093 | case SEC_VOLTAGE_OFF: | ||
1094 | need_cmd = 1; | ||
1095 | state->diseq_flags &= ~(HAS_POWER | HAS_LOCK | ATTEMPT_TUNE); | ||
1096 | break; | ||
1097 | 1080 | ||
1098 | default: | 1081 | default: |
1099 | return -EINVAL; | 1082 | return -EINVAL; |
1100 | } | 1083 | } |
1101 | if (need_cmd) | 1084 | if (need_cmd) |
1102 | dst_tone_power_cmd(state); | 1085 | dst_tone_power_cmd(state); |
@@ -1106,37 +1089,56 @@ static int dst_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage) | |||
1106 | 1089 | ||
1107 | static int dst_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t tone) | 1090 | static int dst_set_tone(struct dvb_frontend* fe, fe_sec_tone_mode_t tone) |
1108 | { | 1091 | { |
1109 | u8 *val; | 1092 | struct dst_state* state = fe->demodulator_priv; |
1110 | struct dst_state* state = (struct dst_state*) fe->demodulator_priv; | ||
1111 | 1093 | ||
1112 | state->tone = tone; | 1094 | state->tone = tone; |
1113 | 1095 | ||
1114 | if (state->dst_type == DST_TYPE_IS_TERR) | 1096 | if (state->dst_type != DST_TYPE_IS_SAT) |
1115 | return 0; | 1097 | return 0; |
1116 | 1098 | ||
1117 | val = &state->tx_tuna[0]; | 1099 | switch (tone) { |
1100 | case SEC_TONE_OFF: | ||
1101 | state->tx_tuna[2] = 0xff; | ||
1102 | break; | ||
1118 | 1103 | ||
1119 | val[8] &= ~0x1; | 1104 | case SEC_TONE_ON: |
1105 | state->tx_tuna[2] = 0x02; | ||
1106 | break; | ||
1120 | 1107 | ||
1121 | switch (tone) { | 1108 | default: |
1122 | case SEC_TONE_OFF: | 1109 | return -EINVAL; |
1123 | break; | 1110 | } |
1111 | dst_tone_power_cmd(state); | ||
1124 | 1112 | ||
1125 | case SEC_TONE_ON: | 1113 | return 0; |
1126 | val[8] |= 1; | 1114 | } |
1127 | break; | ||
1128 | 1115 | ||
1129 | default: | 1116 | static int dst_send_burst(struct dvb_frontend *fe, fe_sec_mini_cmd_t minicmd) |
1130 | return -EINVAL; | 1117 | { |
1118 | struct dst_state *state = fe->demodulator_priv; | ||
1119 | |||
1120 | if (state->dst_type != DST_TYPE_IS_SAT) | ||
1121 | return 0; | ||
1122 | |||
1123 | state->minicmd = minicmd; | ||
1124 | |||
1125 | switch (minicmd) { | ||
1126 | case SEC_MINI_A: | ||
1127 | state->tx_tuna[3] = 0x02; | ||
1128 | break; | ||
1129 | case SEC_MINI_B: | ||
1130 | state->tx_tuna[3] = 0xff; | ||
1131 | break; | ||
1131 | } | 1132 | } |
1132 | dst_tone_power_cmd(state); | 1133 | dst_tone_power_cmd(state); |
1133 | 1134 | ||
1134 | return 0; | 1135 | return 0; |
1135 | } | 1136 | } |
1136 | 1137 | ||
1138 | |||
1137 | static int dst_init(struct dvb_frontend* fe) | 1139 | static int dst_init(struct dvb_frontend* fe) |
1138 | { | 1140 | { |
1139 | struct dst_state* state = (struct dst_state*) fe->demodulator_priv; | 1141 | struct dst_state* state = fe->demodulator_priv; |
1140 | static u8 ini_satci_tuna[] = { 9, 0, 3, 0xb6, 1, 0, 0x73, 0x21, 0, 0 }; | 1142 | static u8 ini_satci_tuna[] = { 9, 0, 3, 0xb6, 1, 0, 0x73, 0x21, 0, 0 }; |
1141 | static u8 ini_satfta_tuna[] = { 0, 0, 3, 0xb6, 1, 0x55, 0xbd, 0x50, 0, 0 }; | 1143 | static u8 ini_satfta_tuna[] = { 0, 0, 3, 0xb6, 1, 0x55, 0xbd, 0x50, 0, 0 }; |
1142 | static u8 ini_tvfta_tuna[] = { 0, 0, 3, 0xb6, 1, 7, 0x0, 0x0, 0, 0 }; | 1144 | static u8 ini_tvfta_tuna[] = { 0, 0, 3, 0xb6, 1, 7, 0x0, 0x0, 0, 0 }; |
@@ -1168,7 +1170,7 @@ static int dst_init(struct dvb_frontend* fe) | |||
1168 | 1170 | ||
1169 | static int dst_read_status(struct dvb_frontend* fe, fe_status_t* status) | 1171 | static int dst_read_status(struct dvb_frontend* fe, fe_status_t* status) |
1170 | { | 1172 | { |
1171 | struct dst_state* state = (struct dst_state*) fe->demodulator_priv; | 1173 | struct dst_state* state = fe->demodulator_priv; |
1172 | 1174 | ||
1173 | *status = 0; | 1175 | *status = 0; |
1174 | if (state->diseq_flags & HAS_LOCK) { | 1176 | if (state->diseq_flags & HAS_LOCK) { |
@@ -1182,7 +1184,7 @@ static int dst_read_status(struct dvb_frontend* fe, fe_status_t* status) | |||
1182 | 1184 | ||
1183 | static int dst_read_signal_strength(struct dvb_frontend* fe, u16* strength) | 1185 | static int dst_read_signal_strength(struct dvb_frontend* fe, u16* strength) |
1184 | { | 1186 | { |
1185 | struct dst_state* state = (struct dst_state*) fe->demodulator_priv; | 1187 | struct dst_state* state = fe->demodulator_priv; |
1186 | 1188 | ||
1187 | dst_get_signal(state); | 1189 | dst_get_signal(state); |
1188 | *strength = state->decode_strength; | 1190 | *strength = state->decode_strength; |
@@ -1192,7 +1194,7 @@ static int dst_read_signal_strength(struct dvb_frontend* fe, u16* strength) | |||
1192 | 1194 | ||
1193 | static int dst_read_snr(struct dvb_frontend* fe, u16* snr) | 1195 | static int dst_read_snr(struct dvb_frontend* fe, u16* snr) |
1194 | { | 1196 | { |
1195 | struct dst_state* state = (struct dst_state*) fe->demodulator_priv; | 1197 | struct dst_state* state = fe->demodulator_priv; |
1196 | 1198 | ||
1197 | dst_get_signal(state); | 1199 | dst_get_signal(state); |
1198 | *snr = state->decode_snr; | 1200 | *snr = state->decode_snr; |
@@ -1202,7 +1204,7 @@ static int dst_read_snr(struct dvb_frontend* fe, u16* snr) | |||
1202 | 1204 | ||
1203 | static int dst_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) | 1205 | static int dst_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) |
1204 | { | 1206 | { |
1205 | struct dst_state* state = (struct dst_state*) fe->demodulator_priv; | 1207 | struct dst_state* state = fe->demodulator_priv; |
1206 | 1208 | ||
1207 | dst_set_freq(state, p->frequency); | 1209 | dst_set_freq(state, p->frequency); |
1208 | if (verbose > 4) | 1210 | if (verbose > 4) |
@@ -1228,7 +1230,7 @@ static int dst_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_paramet | |||
1228 | 1230 | ||
1229 | static int dst_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) | 1231 | static int dst_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) |
1230 | { | 1232 | { |
1231 | struct dst_state* state = (struct dst_state*) fe->demodulator_priv; | 1233 | struct dst_state* state = fe->demodulator_priv; |
1232 | 1234 | ||
1233 | p->frequency = state->decode_freq; | 1235 | p->frequency = state->decode_freq; |
1234 | p->inversion = state->inversion; | 1236 | p->inversion = state->inversion; |
@@ -1248,7 +1250,7 @@ static int dst_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_paramet | |||
1248 | 1250 | ||
1249 | static void dst_release(struct dvb_frontend* fe) | 1251 | static void dst_release(struct dvb_frontend* fe) |
1250 | { | 1252 | { |
1251 | struct dst_state* state = (struct dst_state*) fe->demodulator_priv; | 1253 | struct dst_state* state = fe->demodulator_priv; |
1252 | kfree(state); | 1254 | kfree(state); |
1253 | } | 1255 | } |
1254 | 1256 | ||
@@ -1346,7 +1348,7 @@ static struct dvb_frontend_ops dst_dvbs_ops = { | |||
1346 | .read_signal_strength = dst_read_signal_strength, | 1348 | .read_signal_strength = dst_read_signal_strength, |
1347 | .read_snr = dst_read_snr, | 1349 | .read_snr = dst_read_snr, |
1348 | 1350 | ||
1349 | .diseqc_send_burst = dst_set_tone, | 1351 | .diseqc_send_burst = dst_send_burst, |
1350 | .diseqc_send_master_cmd = dst_set_diseqc, | 1352 | .diseqc_send_master_cmd = dst_set_diseqc, |
1351 | .set_voltage = dst_set_voltage, | 1353 | .set_voltage = dst_set_voltage, |
1352 | .set_tone = dst_set_tone, | 1354 | .set_tone = dst_set_tone, |
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index 550c9921691a..7c02b7dc7098 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c | |||
@@ -2488,7 +2488,7 @@ ahd_linux_dv_thread(void *data) | |||
2488 | sprintf(current->comm, "ahd_dv_%d", ahd->unit); | 2488 | sprintf(current->comm, "ahd_dv_%d", ahd->unit); |
2489 | #else | 2489 | #else |
2490 | daemonize("ahd_dv_%d", ahd->unit); | 2490 | daemonize("ahd_dv_%d", ahd->unit); |
2491 | current->flags |= PF_FREEZE; | 2491 | current->flags |= PF_NOFREEZE; |
2492 | #endif | 2492 | #endif |
2493 | unlock_kernel(); | 2493 | unlock_kernel(); |
2494 | 2494 | ||
diff --git a/drivers/usb/media/pwc/pwc-ctrl.c b/drivers/usb/media/pwc/pwc-ctrl.c index 3e1e4fe20d85..53099190952c 100644 --- a/drivers/usb/media/pwc/pwc-ctrl.c +++ b/drivers/usb/media/pwc/pwc-ctrl.c | |||
@@ -48,8 +48,6 @@ | |||
48 | #include "pwc-uncompress.h" | 48 | #include "pwc-uncompress.h" |
49 | #include "pwc-kiara.h" | 49 | #include "pwc-kiara.h" |
50 | #include "pwc-timon.h" | 50 | #include "pwc-timon.h" |
51 | #include "pwc-dec1.h" | ||
52 | #include "pwc-dec23.h" | ||
53 | 51 | ||
54 | /* Request types: video */ | 52 | /* Request types: video */ |
55 | #define SET_LUM_CTL 0x01 | 53 | #define SET_LUM_CTL 0x01 |
diff --git a/drivers/usb/media/pwc/pwc-uncompress.c b/drivers/usb/media/pwc/pwc-uncompress.c index c596083f06ba..bc3b1635eab0 100644 --- a/drivers/usb/media/pwc/pwc-uncompress.c +++ b/drivers/usb/media/pwc/pwc-uncompress.c | |||
@@ -29,8 +29,6 @@ | |||
29 | 29 | ||
30 | #include "pwc.h" | 30 | #include "pwc.h" |
31 | #include "pwc-uncompress.h" | 31 | #include "pwc-uncompress.h" |
32 | #include "pwc-dec1.h" | ||
33 | #include "pwc-dec23.h" | ||
34 | 32 | ||
35 | int pwc_decompress(struct pwc_device *pdev) | 33 | int pwc_decompress(struct pwc_device *pdev) |
36 | { | 34 | { |
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c index 549e22939260..25f9a9a65c24 100644 --- a/drivers/video/intelfb/intelfbdrv.c +++ b/drivers/video/intelfb/intelfbdrv.c | |||
@@ -228,17 +228,17 @@ MODULE_DESCRIPTION( | |||
228 | MODULE_LICENSE("Dual BSD/GPL"); | 228 | MODULE_LICENSE("Dual BSD/GPL"); |
229 | MODULE_DEVICE_TABLE(pci, intelfb_pci_table); | 229 | MODULE_DEVICE_TABLE(pci, intelfb_pci_table); |
230 | 230 | ||
231 | static int accel __initdata = 1; | 231 | static int accel = 1; |
232 | static int vram __initdata = 4; | 232 | static int vram = 4; |
233 | static int hwcursor __initdata = 1; | 233 | static int hwcursor = 1; |
234 | static int mtrr __initdata = 1; | 234 | static int mtrr = 1; |
235 | static int fixed __initdata = 0; | 235 | static int fixed = 0; |
236 | static int noinit __initdata = 0; | 236 | static int noinit = 0; |
237 | static int noregister __initdata = 0; | 237 | static int noregister = 0; |
238 | static int probeonly __initdata = 0; | 238 | static int probeonly = 0; |
239 | static int idonly __initdata = 0; | 239 | static int idonly = 0; |
240 | static int bailearly __initdata = 0; | 240 | static int bailearly = 0; |
241 | static char *mode __initdata = NULL; | 241 | static char *mode = NULL; |
242 | 242 | ||
243 | module_param(accel, bool, S_IRUGO); | 243 | module_param(accel, bool, S_IRUGO); |
244 | MODULE_PARM_DESC(accel, "Enable console acceleration"); | 244 | MODULE_PARM_DESC(accel, "Enable console acceleration"); |
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 14a0d339d036..4bf43ea87c46 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include "kern_util.h" | 23 | #include "kern_util.h" |
24 | #include "kern.h" | 24 | #include "kern.h" |
25 | #include "user_util.h" | 25 | #include "user_util.h" |
26 | #include "2_5compat.h" | ||
27 | #include "init.h" | 26 | #include "init.h" |
28 | 27 | ||
29 | struct hostfs_inode_info { | 28 | struct hostfs_inode_info { |
diff --git a/include/asm-ppc/cpm2.h b/include/asm-ppc/cpm2.h index 42fd1068cf2a..c5883dbed63f 100644 --- a/include/asm-ppc/cpm2.h +++ b/include/asm-ppc/cpm2.h | |||
@@ -1039,6 +1039,52 @@ typedef struct im_idma { | |||
1039 | #define CMXSCR_TS4CS_CLK7 0x00000006 /* SCC4 Tx Clock Source is CLK7 */ | 1039 | #define CMXSCR_TS4CS_CLK7 0x00000006 /* SCC4 Tx Clock Source is CLK7 */ |
1040 | #define CMXSCR_TS4CS_CLK8 0x00000007 /* SCC4 Tx Clock Source is CLK8 */ | 1040 | #define CMXSCR_TS4CS_CLK8 0x00000007 /* SCC4 Tx Clock Source is CLK8 */ |
1041 | 1041 | ||
1042 | /*----------------------------------------------------------------------- | ||
1043 | * SIUMCR - SIU Module Configuration Register 4-31 | ||
1044 | */ | ||
1045 | #define SIUMCR_BBD 0x80000000 /* Bus Busy Disable */ | ||
1046 | #define SIUMCR_ESE 0x40000000 /* External Snoop Enable */ | ||
1047 | #define SIUMCR_PBSE 0x20000000 /* Parity Byte Select Enable */ | ||
1048 | #define SIUMCR_CDIS 0x10000000 /* Core Disable */ | ||
1049 | #define SIUMCR_DPPC00 0x00000000 /* Data Parity Pins Configuration*/ | ||
1050 | #define SIUMCR_DPPC01 0x04000000 /* - " - */ | ||
1051 | #define SIUMCR_DPPC10 0x08000000 /* - " - */ | ||
1052 | #define SIUMCR_DPPC11 0x0c000000 /* - " - */ | ||
1053 | #define SIUMCR_L2CPC00 0x00000000 /* L2 Cache Pins Configuration */ | ||
1054 | #define SIUMCR_L2CPC01 0x01000000 /* - " - */ | ||
1055 | #define SIUMCR_L2CPC10 0x02000000 /* - " - */ | ||
1056 | #define SIUMCR_L2CPC11 0x03000000 /* - " - */ | ||
1057 | #define SIUMCR_LBPC00 0x00000000 /* Local Bus Pins Configuration */ | ||
1058 | #define SIUMCR_LBPC01 0x00400000 /* - " - */ | ||
1059 | #define SIUMCR_LBPC10 0x00800000 /* - " - */ | ||
1060 | #define SIUMCR_LBPC11 0x00c00000 /* - " - */ | ||
1061 | #define SIUMCR_APPC00 0x00000000 /* Address Parity Pins Configuration*/ | ||
1062 | #define SIUMCR_APPC01 0x00100000 /* - " - */ | ||
1063 | #define SIUMCR_APPC10 0x00200000 /* - " - */ | ||
1064 | #define SIUMCR_APPC11 0x00300000 /* - " - */ | ||
1065 | #define SIUMCR_CS10PC00 0x00000000 /* CS10 Pin Configuration */ | ||
1066 | #define SIUMCR_CS10PC01 0x00040000 /* - " - */ | ||
1067 | #define SIUMCR_CS10PC10 0x00080000 /* - " - */ | ||
1068 | #define SIUMCR_CS10PC11 0x000c0000 /* - " - */ | ||
1069 | #define SIUMCR_BCTLC00 0x00000000 /* Buffer Control Configuration */ | ||
1070 | #define SIUMCR_BCTLC01 0x00010000 /* - " - */ | ||
1071 | #define SIUMCR_BCTLC10 0x00020000 /* - " - */ | ||
1072 | #define SIUMCR_BCTLC11 0x00030000 /* - " - */ | ||
1073 | #define SIUMCR_MMR00 0x00000000 /* Mask Masters Requests */ | ||
1074 | #define SIUMCR_MMR01 0x00004000 /* - " - */ | ||
1075 | #define SIUMCR_MMR10 0x00008000 /* - " - */ | ||
1076 | #define SIUMCR_MMR11 0x0000c000 /* - " - */ | ||
1077 | #define SIUMCR_LPBSE 0x00002000 /* LocalBus Parity Byte Select Enable*/ | ||
1078 | |||
1079 | /*----------------------------------------------------------------------- | ||
1080 | * SCCR - System Clock Control Register 9-8 | ||
1081 | */ | ||
1082 | #define SCCR_PCI_MODE 0x00000100 /* PCI Mode */ | ||
1083 | #define SCCR_PCI_MODCK 0x00000080 /* Value of PCI_MODCK pin */ | ||
1084 | #define SCCR_PCIDF_MSK 0x00000078 /* PCI division factor */ | ||
1085 | #define SCCR_PCIDF_SHIFT 3 | ||
1086 | |||
1087 | |||
1042 | #endif /* __CPM2__ */ | 1088 | #endif /* __CPM2__ */ |
1043 | #endif /* __KERNEL__ */ | 1089 | #endif /* __KERNEL__ */ |
1044 | 1090 | ||
diff --git a/include/asm-ppc/m8260_pci.h b/include/asm-ppc/m8260_pci.h index 163a6b91d5b2..bf9e05dd54b5 100644 --- a/include/asm-ppc/m8260_pci.h +++ b/include/asm-ppc/m8260_pci.h | |||
@@ -19,6 +19,7 @@ | |||
19 | * Define the vendor/device ID for the MPC8265. | 19 | * Define the vendor/device ID for the MPC8265. |
20 | */ | 20 | */ |
21 | #define PCI_DEVICE_ID_MPC8265 ((0x18C0 << 16) | PCI_VENDOR_ID_MOTOROLA) | 21 | #define PCI_DEVICE_ID_MPC8265 ((0x18C0 << 16) | PCI_VENDOR_ID_MOTOROLA) |
22 | #define PCI_DEVICE_ID_MPC8272 ((0x18C1 << 16) | PCI_VENDOR_ID_MOTOROLA) | ||
22 | 23 | ||
23 | #define M8265_PCIBR0 0x101ac | 24 | #define M8265_PCIBR0 0x101ac |
24 | #define M8265_PCIBR1 0x101b0 | 25 | #define M8265_PCIBR1 0x101b0 |
diff --git a/include/asm-ppc/mpc8260.h b/include/asm-ppc/mpc8260.h index d820894e5991..89eb8a2ac693 100644 --- a/include/asm-ppc/mpc8260.h +++ b/include/asm-ppc/mpc8260.h | |||
@@ -41,7 +41,7 @@ | |||
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #ifdef CONFIG_PCI_8260 | 43 | #ifdef CONFIG_PCI_8260 |
44 | #include <syslib/m8260_pci.h> | 44 | #include <syslib/m82xx_pci.h> |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | /* Make sure the memory translation stuff is there if PCI not used. | 47 | /* Make sure the memory translation stuff is there if PCI not used. |
diff --git a/include/asm-sh/thread_info.h b/include/asm-sh/thread_info.h index d82f883d8e6d..4bbbd9f3c37e 100644 --- a/include/asm-sh/thread_info.h +++ b/include/asm-sh/thread_info.h | |||
@@ -27,7 +27,7 @@ struct thread_info { | |||
27 | 27 | ||
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #define PREEMPT_ACTIVE 0x4000000 | 30 | #define PREEMPT_ACTIVE 0x10000000 |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * macros/functions for gaining access to the thread information structure | 33 | * macros/functions for gaining access to the thread information structure |
diff --git a/include/asm-sh64/thread_info.h b/include/asm-sh64/thread_info.h index e65f394da472..8a32d6bd0b79 100644 --- a/include/asm-sh64/thread_info.h +++ b/include/asm-sh64/thread_info.h | |||
@@ -73,7 +73,7 @@ static inline struct thread_info *current_thread_info(void) | |||
73 | 73 | ||
74 | #define THREAD_SIZE 8192 | 74 | #define THREAD_SIZE 8192 |
75 | 75 | ||
76 | #define PREEMPT_ACTIVE 0x4000000 | 76 | #define PREEMPT_ACTIVE 0x10000000 |
77 | 77 | ||
78 | /* thread information flags */ | 78 | /* thread information flags */ |
79 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 79 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
diff --git a/include/asm-um/page.h b/include/asm-um/page.h index 504ea8e486b0..5afee8a8cdf3 100644 --- a/include/asm-um/page.h +++ b/include/asm-um/page.h | |||
@@ -98,7 +98,13 @@ extern unsigned long uml_physmem; | |||
98 | 98 | ||
99 | extern unsigned long to_phys(void *virt); | 99 | extern unsigned long to_phys(void *virt); |
100 | extern void *to_virt(unsigned long phys); | 100 | extern void *to_virt(unsigned long phys); |
101 | #define __pa(virt) to_phys((void *) virt) | 101 | |
102 | /* Cast to unsigned long before casting to void * to avoid a warning from | ||
103 | * mmap_kmem about cutting a long long down to a void *. Not sure that | ||
104 | * casting is the right thing, but 32-bit UML can't have 64-bit virtual | ||
105 | * addresses | ||
106 | */ | ||
107 | #define __pa(virt) to_phys((void *) (unsigned long) virt) | ||
102 | #define __va(phys) to_virt((unsigned long) phys) | 108 | #define __va(phys) to_virt((unsigned long) phys) |
103 | 109 | ||
104 | #define page_to_pfn(page) ((page) - mem_map) | 110 | #define page_to_pfn(page) ((page) - mem_map) |
diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h index 510e513c7f88..a88040920311 100644 --- a/include/asm-um/pgtable.h +++ b/include/asm-um/pgtable.h | |||
@@ -114,17 +114,9 @@ extern unsigned long end_iomem; | |||
114 | extern unsigned long pg0[1024]; | 114 | extern unsigned long pg0[1024]; |
115 | 115 | ||
116 | /* | 116 | /* |
117 | * BAD_PAGETABLE is used when we need a bogus page-table, while | ||
118 | * BAD_PAGE is used for a bogus page. | ||
119 | * | ||
120 | * ZERO_PAGE is a global shared page that is always zero: used | 117 | * ZERO_PAGE is a global shared page that is always zero: used |
121 | * for zero-mapped memory areas etc.. | 118 | * for zero-mapped memory areas etc.. |
122 | */ | 119 | */ |
123 | extern pte_t __bad_page(void); | ||
124 | extern pte_t * __bad_pagetable(void); | ||
125 | |||
126 | #define BAD_PAGETABLE __bad_pagetable() | ||
127 | #define BAD_PAGE __bad_page() | ||
128 | 120 | ||
129 | #define ZERO_PAGE(vaddr) virt_to_page(empty_zero_page) | 121 | #define ZERO_PAGE(vaddr) virt_to_page(empty_zero_page) |
130 | 122 | ||
diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h index a10ea155907e..1feaaf148ef1 100644 --- a/include/asm-um/thread_info.h +++ b/include/asm-um/thread_info.h | |||
@@ -41,18 +41,17 @@ struct thread_info { | |||
41 | #define init_thread_info (init_thread_union.thread_info) | 41 | #define init_thread_info (init_thread_union.thread_info) |
42 | #define init_stack (init_thread_union.stack) | 42 | #define init_stack (init_thread_union.stack) |
43 | 43 | ||
44 | #define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE) | ||
44 | /* how to get the thread information struct from C */ | 45 | /* how to get the thread information struct from C */ |
45 | static inline struct thread_info *current_thread_info(void) | 46 | static inline struct thread_info *current_thread_info(void) |
46 | { | 47 | { |
47 | struct thread_info *ti; | 48 | struct thread_info *ti; |
48 | unsigned long mask = PAGE_SIZE * | 49 | unsigned long mask = THREAD_SIZE - 1; |
49 | (1 << CONFIG_KERNEL_STACK_ORDER) - 1; | 50 | ti = (struct thread_info *) (((unsigned long) &ti) & ~mask); |
50 | ti = (struct thread_info *) (((unsigned long) &ti) & ~mask); | ||
51 | return ti; | 51 | return ti; |
52 | } | 52 | } |
53 | 53 | ||
54 | /* thread information allocation */ | 54 | /* thread information allocation */ |
55 | #define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE) | ||
56 | #define alloc_thread_info(tsk) \ | 55 | #define alloc_thread_info(tsk) \ |
57 | ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL)) | 56 | ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL)) |
58 | #define free_thread_info(ti) kfree(ti) | 57 | #define free_thread_info(ti) kfree(ti) |
@@ -62,7 +61,7 @@ static inline struct thread_info *current_thread_info(void) | |||
62 | 61 | ||
63 | #endif | 62 | #endif |
64 | 63 | ||
65 | #define PREEMPT_ACTIVE 0x4000000 | 64 | #define PREEMPT_ACTIVE 0x10000000 |
66 | 65 | ||
67 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 66 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
68 | #define TIF_SIGPENDING 1 /* signal pending */ | 67 | #define TIF_SIGPENDING 1 /* signal pending */ |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index ebc712e91066..8336dba18971 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -43,13 +43,17 @@ | |||
43 | #define __IRQ_MASK(x) ((1UL << (x))-1) | 43 | #define __IRQ_MASK(x) ((1UL << (x))-1) |
44 | 44 | ||
45 | #define PREEMPT_MASK (__IRQ_MASK(PREEMPT_BITS) << PREEMPT_SHIFT) | 45 | #define PREEMPT_MASK (__IRQ_MASK(PREEMPT_BITS) << PREEMPT_SHIFT) |
46 | #define HARDIRQ_MASK (__IRQ_MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT) | ||
47 | #define SOFTIRQ_MASK (__IRQ_MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT) | 46 | #define SOFTIRQ_MASK (__IRQ_MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT) |
47 | #define HARDIRQ_MASK (__IRQ_MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT) | ||
48 | 48 | ||
49 | #define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT) | 49 | #define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT) |
50 | #define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT) | 50 | #define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT) |
51 | #define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT) | 51 | #define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT) |
52 | 52 | ||
53 | #if PREEMPT_ACTIVE < (1 << (HARDIRQ_SHIFT + HARDIRQ_BITS)) | ||
54 | #error PREEMPT_ACTIVE is too low! | ||
55 | #endif | ||
56 | |||
53 | #define hardirq_count() (preempt_count() & HARDIRQ_MASK) | 57 | #define hardirq_count() (preempt_count() & HARDIRQ_MASK) |
54 | #define softirq_count() (preempt_count() & SOFTIRQ_MASK) | 58 | #define softirq_count() (preempt_count() & SOFTIRQ_MASK) |
55 | #define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK)) | 59 | #define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK)) |
diff --git a/init/Kconfig b/init/Kconfig index d920baed109a..a7660ccc693f 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -442,7 +442,7 @@ config OBSOLETE_MODPARM | |||
442 | 442 | ||
443 | config MODVERSIONS | 443 | config MODVERSIONS |
444 | bool "Module versioning support (EXPERIMENTAL)" | 444 | bool "Module versioning support (EXPERIMENTAL)" |
445 | depends on MODULES && EXPERIMENTAL && !UML | 445 | depends on MODULES && EXPERIMENTAL |
446 | help | 446 | help |
447 | Usually, you have to use modules compiled with your kernel. | 447 | Usually, you have to use modules compiled with your kernel. |
448 | Saying Y here makes it sometimes possible to use modules | 448 | Saying Y here makes it sometimes possible to use modules |
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c index 06b5a6323998..436c7d93c00a 100644 --- a/kernel/irq/handle.c +++ b/kernel/irq/handle.c | |||
@@ -119,8 +119,6 @@ fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs) | |||
119 | */ | 119 | */ |
120 | desc->handler->ack(irq); | 120 | desc->handler->ack(irq); |
121 | action_ret = handle_IRQ_event(irq, regs, desc->action); | 121 | action_ret = handle_IRQ_event(irq, regs, desc->action); |
122 | if (!noirqdebug) | ||
123 | note_interrupt(irq, desc, action_ret); | ||
124 | desc->handler->end(irq); | 122 | desc->handler->end(irq); |
125 | return 1; | 123 | return 1; |
126 | } | 124 | } |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index ac23847ce0e3..0c421295e613 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -151,7 +151,8 @@ config DEBUG_FS | |||
151 | 151 | ||
152 | config FRAME_POINTER | 152 | config FRAME_POINTER |
153 | bool "Compile the kernel with frame pointers" | 153 | bool "Compile the kernel with frame pointers" |
154 | depends on DEBUG_KERNEL && ((X86 && !X86_64) || CRIS || M68K || M68KNOMMU || FRV) | 154 | depends on DEBUG_KERNEL && ((X86 && !X86_64) || CRIS || M68K || M68KNOMMU || FRV || UML) |
155 | default y if DEBUG_INFO && UML | ||
155 | help | 156 | help |
156 | If you say Y here the resulting kernel image will be slightly larger | 157 | If you say Y here the resulting kernel image will be slightly larger |
157 | and slower, but it will give very useful debugging information. | 158 | and slower, but it will give very useful debugging information. |
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index 32d94754acf8..080ef3928465 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c | |||
@@ -876,7 +876,7 @@ static void __init detect_byte_swap(pmac_t *chip) | |||
876 | */ | 876 | */ |
877 | static int __init snd_pmac_detect(pmac_t *chip) | 877 | static int __init snd_pmac_detect(pmac_t *chip) |
878 | { | 878 | { |
879 | struct device_node *sound; | 879 | struct device_node *sound = NULL; |
880 | unsigned int *prop, l; | 880 | unsigned int *prop, l; |
881 | struct macio_chip* macio; | 881 | struct macio_chip* macio; |
882 | 882 | ||
@@ -906,20 +906,22 @@ static int __init snd_pmac_detect(pmac_t *chip) | |||
906 | chip->is_pbook_G3 = 1; | 906 | chip->is_pbook_G3 = 1; |
907 | chip->node = find_devices("awacs"); | 907 | chip->node = find_devices("awacs"); |
908 | if (chip->node) | 908 | if (chip->node) |
909 | return 0; /* ok */ | 909 | sound = chip->node; |
910 | 910 | ||
911 | /* | 911 | /* |
912 | * powermac G3 models have a node called "davbus" | 912 | * powermac G3 models have a node called "davbus" |
913 | * with a child called "sound". | 913 | * with a child called "sound". |
914 | */ | 914 | */ |
915 | chip->node = find_devices("davbus"); | 915 | if (!chip->node) |
916 | chip->node = find_devices("davbus"); | ||
916 | /* | 917 | /* |
917 | * if we didn't find a davbus device, try 'i2s-a' since | 918 | * if we didn't find a davbus device, try 'i2s-a' since |
918 | * this seems to be what iBooks have | 919 | * this seems to be what iBooks have |
919 | */ | 920 | */ |
920 | if (! chip->node) { | 921 | if (! chip->node) { |
921 | chip->node = find_devices("i2s-a"); | 922 | chip->node = find_devices("i2s-a"); |
922 | if (chip->node && chip->node->parent && chip->node->parent->parent) { | 923 | if (chip->node && chip->node->parent && |
924 | chip->node->parent->parent) { | ||
923 | if (device_is_compatible(chip->node->parent->parent, | 925 | if (device_is_compatible(chip->node->parent->parent, |
924 | "K2-Keylargo")) | 926 | "K2-Keylargo")) |
925 | chip->is_k2 = 1; | 927 | chip->is_k2 = 1; |
@@ -928,9 +930,11 @@ static int __init snd_pmac_detect(pmac_t *chip) | |||
928 | if (! chip->node) | 930 | if (! chip->node) |
929 | return -ENODEV; | 931 | return -ENODEV; |
930 | 932 | ||
931 | sound = find_devices("sound"); | 933 | if (!sound) { |
932 | while (sound && sound->parent != chip->node) | 934 | sound = find_devices("sound"); |
933 | sound = sound->next; | 935 | while (sound && sound->parent != chip->node) |
936 | sound = sound->next; | ||
937 | } | ||
934 | if (! sound) | 938 | if (! sound) |
935 | return -ENODEV; | 939 | return -ENODEV; |
936 | prop = (unsigned int *) get_property(sound, "sub-frame", NULL); | 940 | prop = (unsigned int *) get_property(sound, "sub-frame", NULL); |
@@ -1019,7 +1023,8 @@ static int __init snd_pmac_detect(pmac_t *chip) | |||
1019 | } | 1023 | } |
1020 | } | 1024 | } |
1021 | if (chip->pdev == NULL) | 1025 | if (chip->pdev == NULL) |
1022 | printk(KERN_WARNING "snd-powermac: can't locate macio PCI device !\n"); | 1026 | printk(KERN_WARNING "snd-powermac: can't locate macio PCI" |
1027 | " device !\n"); | ||
1023 | 1028 | ||
1024 | detect_byte_swap(chip); | 1029 | detect_byte_swap(chip); |
1025 | 1030 | ||
@@ -1027,7 +1032,8 @@ static int __init snd_pmac_detect(pmac_t *chip) | |||
1027 | are available */ | 1032 | are available */ |
1028 | prop = (unsigned int *) get_property(sound, "sample-rates", &l); | 1033 | prop = (unsigned int *) get_property(sound, "sample-rates", &l); |
1029 | if (! prop) | 1034 | if (! prop) |
1030 | prop = (unsigned int *) get_property(sound, "output-frame-rates", &l); | 1035 | prop = (unsigned int *) get_property(sound, |
1036 | "output-frame-rates", &l); | ||
1031 | if (prop) { | 1037 | if (prop) { |
1032 | int i; | 1038 | int i; |
1033 | chip->freqs_ok = 0; | 1039 | chip->freqs_ok = 0; |
@@ -1054,7 +1060,8 @@ static int __init snd_pmac_detect(pmac_t *chip) | |||
1054 | /* | 1060 | /* |
1055 | * exported - boolean info callbacks for ease of programming | 1061 | * exported - boolean info callbacks for ease of programming |
1056 | */ | 1062 | */ |
1057 | int snd_pmac_boolean_stereo_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 1063 | int snd_pmac_boolean_stereo_info(snd_kcontrol_t *kcontrol, |
1064 | snd_ctl_elem_info_t *uinfo) | ||
1058 | { | 1065 | { |
1059 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | 1066 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; |
1060 | uinfo->count = 2; | 1067 | uinfo->count = 2; |
@@ -1063,7 +1070,8 @@ int snd_pmac_boolean_stereo_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t * | |||
1063 | return 0; | 1070 | return 0; |
1064 | } | 1071 | } |
1065 | 1072 | ||
1066 | int snd_pmac_boolean_mono_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo) | 1073 | int snd_pmac_boolean_mono_info(snd_kcontrol_t *kcontrol, |
1074 | snd_ctl_elem_info_t *uinfo) | ||
1067 | { | 1075 | { |
1068 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; | 1076 | uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; |
1069 | uinfo->count = 1; | 1077 | uinfo->count = 1; |