diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-31 16:39:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-31 16:39:52 -0400 |
commit | 49b1e3ea19b1c95c2f012b8331ffb3b169e4c042 (patch) | |
tree | 4ccf519a20c9b5bb3701c8b4d38b01af8bef854e | |
parent | ce38cac48209d270d07fd6d1a8e94446b37abcd5 (diff) | |
parent | 8d950cb8896fc95a9444d190885779438bb9d01c (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
[POWERPC] Minor comment fix for misc_64.S
[POWERPC] Use H_CEDE on non-SMT
[POWERPC] force 64bit mode in fwnmi handlers to workaround firmware bugs
[POWERPC] PMAC_APM_EMU should depend on ADB_PMU
[POWERPC] Fix new interrupt code (MPIC detection)
[POWERPC] Fix new interrupt code (MPIC endianness)
[POWERPC] Add cpufreq support for Xserve G5
[POWERPC] Xserve G5 thermal control fixes
[POWERPC] Fix mem= handling when the memory limit is > RMO size
[POWERPC] More offb/bootx fixes
[POWERPC] Fix legacy_serial.c error handling on 32 bits
[POWERPC] Fix default clock for udbg_16550
[POWERPC] Fix non-MPIC CHRPs with CONFIG_SMP set
[POWERPC] Fix 32 bits warning in prom_init.c
[POWERPC] Workaround Pegasos incorrect ISA "ranges"
[POWERPC] fix up front-LED Kconfig
-rw-r--r-- | arch/powerpc/Kconfig | 2 | ||||
-rw-r--r-- | arch/powerpc/configs/pmac32_defconfig | 112 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 35 | ||||
-rw-r--r-- | arch/powerpc/kernel/legacy_serial.c | 13 | ||||
-rw-r--r-- | arch/powerpc/kernel/misc_64.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/prom_init.c | 36 | ||||
-rw-r--r-- | arch/powerpc/kernel/smp.c | 24 | ||||
-rw-r--r-- | arch/powerpc/kernel/udbg_16550.c | 6 | ||||
-rw-r--r-- | arch/powerpc/mm/lmb.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/chrp/setup.c | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/maple/setup.c | 17 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/bootx_init.c | 35 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/cpufreq_64.c | 78 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 6 | ||||
-rw-r--r-- | drivers/ide/Kconfig | 14 | ||||
-rw-r--r-- | drivers/macintosh/Kconfig | 11 | ||||
-rw-r--r-- | drivers/macintosh/therm_pm72.c | 218 | ||||
-rw-r--r-- | drivers/macintosh/therm_pm72.h | 33 | ||||
-rw-r--r-- | drivers/macintosh/via-pmu-led.c | 2 | ||||
-rw-r--r-- | drivers/video/offb.c | 307 |
20 files changed, 703 insertions, 263 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 2643dbc3f289..13e583f16ede 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -504,7 +504,7 @@ config CPU_FREQ_PMAC | |||
504 | 504 | ||
505 | config CPU_FREQ_PMAC64 | 505 | config CPU_FREQ_PMAC64 |
506 | bool "Support for some Apple G5s" | 506 | bool "Support for some Apple G5s" |
507 | depends on CPU_FREQ && PMAC_SMU && PPC64 | 507 | depends on CPU_FREQ && PPC64 |
508 | select CPU_FREQ_TABLE | 508 | select CPU_FREQ_TABLE |
509 | help | 509 | help |
510 | This adds support for frequency switching on Apple iMac G5, | 510 | This adds support for frequency switching on Apple iMac G5, |
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig index addc79381c3b..3545af9896af 100644 --- a/arch/powerpc/configs/pmac32_defconfig +++ b/arch/powerpc/configs/pmac32_defconfig | |||
@@ -1,16 +1,18 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.17-rc5 | 3 | # Linux kernel version: 2.6.17 |
4 | # Mon May 29 14:47:49 2006 | 4 | # Mon Jul 3 14:20:49 2006 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | CONFIG_PPC32=y | 7 | CONFIG_PPC32=y |
8 | CONFIG_PPC_MERGE=y | 8 | CONFIG_PPC_MERGE=y |
9 | CONFIG_MMU=y | 9 | CONFIG_MMU=y |
10 | CONFIG_GENERIC_HARDIRQS=y | 10 | CONFIG_GENERIC_HARDIRQS=y |
11 | CONFIG_IRQ_PER_CPU=y | ||
11 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 12 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
12 | CONFIG_GENERIC_HWEIGHT=y | 13 | CONFIG_GENERIC_HWEIGHT=y |
13 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 14 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
15 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
14 | CONFIG_PPC=y | 16 | CONFIG_PPC=y |
15 | CONFIG_EARLY_PRINTK=y | 17 | CONFIG_EARLY_PRINTK=y |
16 | CONFIG_GENERIC_NVRAM=y | 18 | CONFIG_GENERIC_NVRAM=y |
@@ -29,6 +31,7 @@ CONFIG_CLASSIC32=y | |||
29 | # CONFIG_PPC_82xx is not set | 31 | # CONFIG_PPC_82xx is not set |
30 | # CONFIG_PPC_83xx is not set | 32 | # CONFIG_PPC_83xx is not set |
31 | # CONFIG_PPC_85xx is not set | 33 | # CONFIG_PPC_85xx is not set |
34 | # CONFIG_PPC_86xx is not set | ||
32 | # CONFIG_40x is not set | 35 | # CONFIG_40x is not set |
33 | # CONFIG_44x is not set | 36 | # CONFIG_44x is not set |
34 | # CONFIG_8xx is not set | 37 | # CONFIG_8xx is not set |
@@ -39,6 +42,7 @@ CONFIG_ALTIVEC=y | |||
39 | CONFIG_PPC_STD_MMU=y | 42 | CONFIG_PPC_STD_MMU=y |
40 | CONFIG_PPC_STD_MMU_32=y | 43 | CONFIG_PPC_STD_MMU_32=y |
41 | # CONFIG_SMP is not set | 44 | # CONFIG_SMP is not set |
45 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
42 | 46 | ||
43 | # | 47 | # |
44 | # Code maturity level options | 48 | # Code maturity level options |
@@ -72,10 +76,12 @@ CONFIG_PRINTK=y | |||
72 | CONFIG_BUG=y | 76 | CONFIG_BUG=y |
73 | CONFIG_ELF_CORE=y | 77 | CONFIG_ELF_CORE=y |
74 | CONFIG_BASE_FULL=y | 78 | CONFIG_BASE_FULL=y |
79 | CONFIG_RT_MUTEXES=y | ||
75 | CONFIG_FUTEX=y | 80 | CONFIG_FUTEX=y |
76 | CONFIG_EPOLL=y | 81 | CONFIG_EPOLL=y |
77 | CONFIG_SHMEM=y | 82 | CONFIG_SHMEM=y |
78 | CONFIG_SLAB=y | 83 | CONFIG_SLAB=y |
84 | CONFIG_VM_EVENT_COUNTERS=y | ||
79 | # CONFIG_TINY_SHMEM is not set | 85 | # CONFIG_TINY_SHMEM is not set |
80 | CONFIG_BASE_SMALL=0 | 86 | CONFIG_BASE_SMALL=0 |
81 | # CONFIG_SLOB is not set | 87 | # CONFIG_SLOB is not set |
@@ -119,6 +125,9 @@ CONFIG_PPC_MULTIPLATFORM=y | |||
119 | # CONFIG_APUS is not set | 125 | # CONFIG_APUS is not set |
120 | # CONFIG_PPC_CHRP is not set | 126 | # CONFIG_PPC_CHRP is not set |
121 | CONFIG_PPC_PMAC=y | 127 | CONFIG_PPC_PMAC=y |
128 | # CONFIG_PPC_CELL is not set | ||
129 | # CONFIG_PPC_CELL_NATIVE is not set | ||
130 | # CONFIG_UDBG_RTAS_CONSOLE is not set | ||
122 | CONFIG_MPIC=y | 131 | CONFIG_MPIC=y |
123 | # CONFIG_PPC_RTAS is not set | 132 | # CONFIG_PPC_RTAS is not set |
124 | # CONFIG_MMIO_NVRAM is not set | 133 | # CONFIG_MMIO_NVRAM is not set |
@@ -154,6 +163,7 @@ CONFIG_PREEMPT_NONE=y | |||
154 | # CONFIG_PREEMPT is not set | 163 | # CONFIG_PREEMPT is not set |
155 | CONFIG_BINFMT_ELF=y | 164 | CONFIG_BINFMT_ELF=y |
156 | CONFIG_BINFMT_MISC=m | 165 | CONFIG_BINFMT_MISC=m |
166 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
157 | # CONFIG_KEXEC is not set | 167 | # CONFIG_KEXEC is not set |
158 | CONFIG_ARCH_FLATMEM_ENABLE=y | 168 | CONFIG_ARCH_FLATMEM_ENABLE=y |
159 | CONFIG_SELECT_MEMORY_MODEL=y | 169 | CONFIG_SELECT_MEMORY_MODEL=y |
@@ -164,6 +174,7 @@ CONFIG_FLATMEM=y | |||
164 | CONFIG_FLAT_NODE_MEM_MAP=y | 174 | CONFIG_FLAT_NODE_MEM_MAP=y |
165 | # CONFIG_SPARSEMEM_STATIC is not set | 175 | # CONFIG_SPARSEMEM_STATIC is not set |
166 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 176 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
177 | # CONFIG_RESOURCES_64BIT is not set | ||
167 | CONFIG_PROC_DEVICETREE=y | 178 | CONFIG_PROC_DEVICETREE=y |
168 | # CONFIG_CMDLINE_BOOL is not set | 179 | # CONFIG_CMDLINE_BOOL is not set |
169 | CONFIG_PM=y | 180 | CONFIG_PM=y |
@@ -182,6 +193,7 @@ CONFIG_GENERIC_ISA_DMA=y | |||
182 | CONFIG_PPC_INDIRECT_PCI=y | 193 | CONFIG_PPC_INDIRECT_PCI=y |
183 | CONFIG_PCI=y | 194 | CONFIG_PCI=y |
184 | CONFIG_PCI_DOMAINS=y | 195 | CONFIG_PCI_DOMAINS=y |
196 | # CONFIG_PCIEPORTBUS is not set | ||
185 | # CONFIG_PCI_DEBUG is not set | 197 | # CONFIG_PCI_DEBUG is not set |
186 | 198 | ||
187 | # | 199 | # |
@@ -256,6 +268,8 @@ CONFIG_INET_ESP=y | |||
256 | # CONFIG_INET_IPCOMP is not set | 268 | # CONFIG_INET_IPCOMP is not set |
257 | # CONFIG_INET_XFRM_TUNNEL is not set | 269 | # CONFIG_INET_XFRM_TUNNEL is not set |
258 | # CONFIG_INET_TUNNEL is not set | 270 | # CONFIG_INET_TUNNEL is not set |
271 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
272 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
259 | CONFIG_INET_DIAG=y | 273 | CONFIG_INET_DIAG=y |
260 | CONFIG_INET_TCP_DIAG=y | 274 | CONFIG_INET_TCP_DIAG=y |
261 | # CONFIG_TCP_CONG_ADVANCED is not set | 275 | # CONFIG_TCP_CONG_ADVANCED is not set |
@@ -268,6 +282,7 @@ CONFIG_TCP_CONG_BIC=y | |||
268 | # CONFIG_IPV6 is not set | 282 | # CONFIG_IPV6 is not set |
269 | # CONFIG_INET6_XFRM_TUNNEL is not set | 283 | # CONFIG_INET6_XFRM_TUNNEL is not set |
270 | # CONFIG_INET6_TUNNEL is not set | 284 | # CONFIG_INET6_TUNNEL is not set |
285 | # CONFIG_NETWORK_SECMARK is not set | ||
271 | CONFIG_NETFILTER=y | 286 | CONFIG_NETFILTER=y |
272 | # CONFIG_NETFILTER_DEBUG is not set | 287 | # CONFIG_NETFILTER_DEBUG is not set |
273 | 288 | ||
@@ -292,9 +307,11 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m | |||
292 | CONFIG_NETFILTER_XT_MATCH_POLICY=m | 307 | CONFIG_NETFILTER_XT_MATCH_POLICY=m |
293 | CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m | 308 | CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m |
294 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m | 309 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m |
310 | # CONFIG_NETFILTER_XT_MATCH_QUOTA is not set | ||
295 | CONFIG_NETFILTER_XT_MATCH_REALM=m | 311 | CONFIG_NETFILTER_XT_MATCH_REALM=m |
296 | CONFIG_NETFILTER_XT_MATCH_SCTP=m | 312 | CONFIG_NETFILTER_XT_MATCH_SCTP=m |
297 | CONFIG_NETFILTER_XT_MATCH_STATE=m | 313 | CONFIG_NETFILTER_XT_MATCH_STATE=m |
314 | # CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set | ||
298 | CONFIG_NETFILTER_XT_MATCH_STRING=m | 315 | CONFIG_NETFILTER_XT_MATCH_STRING=m |
299 | CONFIG_NETFILTER_XT_MATCH_TCPMSS=m | 316 | CONFIG_NETFILTER_XT_MATCH_TCPMSS=m |
300 | 317 | ||
@@ -313,6 +330,7 @@ CONFIG_IP_NF_TFTP=m | |||
313 | CONFIG_IP_NF_AMANDA=m | 330 | CONFIG_IP_NF_AMANDA=m |
314 | CONFIG_IP_NF_PPTP=m | 331 | CONFIG_IP_NF_PPTP=m |
315 | CONFIG_IP_NF_H323=m | 332 | CONFIG_IP_NF_H323=m |
333 | # CONFIG_IP_NF_SIP is not set | ||
316 | # CONFIG_IP_NF_QUEUE is not set | 334 | # CONFIG_IP_NF_QUEUE is not set |
317 | CONFIG_IP_NF_IPTABLES=m | 335 | CONFIG_IP_NF_IPTABLES=m |
318 | CONFIG_IP_NF_MATCH_IPRANGE=m | 336 | CONFIG_IP_NF_MATCH_IPRANGE=m |
@@ -457,6 +475,7 @@ CONFIG_IRTTY_SIR=m | |||
457 | # CONFIG_ALI_FIR is not set | 475 | # CONFIG_ALI_FIR is not set |
458 | # CONFIG_VLSI_FIR is not set | 476 | # CONFIG_VLSI_FIR is not set |
459 | # CONFIG_VIA_FIR is not set | 477 | # CONFIG_VIA_FIR is not set |
478 | # CONFIG_MCS_FIR is not set | ||
460 | CONFIG_BT=m | 479 | CONFIG_BT=m |
461 | CONFIG_BT_L2CAP=m | 480 | CONFIG_BT_L2CAP=m |
462 | CONFIG_BT_SCO=m | 481 | CONFIG_BT_SCO=m |
@@ -500,6 +519,7 @@ CONFIG_WIRELESS_EXT=y | |||
500 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 519 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
501 | CONFIG_FW_LOADER=y | 520 | CONFIG_FW_LOADER=y |
502 | # CONFIG_DEBUG_DRIVER is not set | 521 | # CONFIG_DEBUG_DRIVER is not set |
522 | # CONFIG_SYS_HYPERVISOR is not set | ||
503 | 523 | ||
504 | # | 524 | # |
505 | # Connector - unified userspace <-> kernelspace linker | 525 | # Connector - unified userspace <-> kernelspace linker |
@@ -600,7 +620,6 @@ CONFIG_BLK_DEV_PDC202XX_NEW=y | |||
600 | CONFIG_BLK_DEV_IDE_PMAC=y | 620 | CONFIG_BLK_DEV_IDE_PMAC=y |
601 | CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y | 621 | CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y |
602 | CONFIG_BLK_DEV_IDEDMA_PMAC=y | 622 | CONFIG_BLK_DEV_IDEDMA_PMAC=y |
603 | CONFIG_BLK_DEV_IDE_PMAC_BLINK=y | ||
604 | # CONFIG_IDE_ARM is not set | 623 | # CONFIG_IDE_ARM is not set |
605 | CONFIG_BLK_DEV_IDEDMA=y | 624 | CONFIG_BLK_DEV_IDEDMA=y |
606 | # CONFIG_IDEDMA_IVB is not set | 625 | # CONFIG_IDEDMA_IVB is not set |
@@ -661,6 +680,7 @@ CONFIG_SCSI_AIC7XXX_OLD=m | |||
661 | # CONFIG_MEGARAID_LEGACY is not set | 680 | # CONFIG_MEGARAID_LEGACY is not set |
662 | # CONFIG_MEGARAID_SAS is not set | 681 | # CONFIG_MEGARAID_SAS is not set |
663 | # CONFIG_SCSI_SATA is not set | 682 | # CONFIG_SCSI_SATA is not set |
683 | # CONFIG_SCSI_HPTIOP is not set | ||
664 | # CONFIG_SCSI_BUSLOGIC is not set | 684 | # CONFIG_SCSI_BUSLOGIC is not set |
665 | # CONFIG_SCSI_DMX3191D is not set | 685 | # CONFIG_SCSI_DMX3191D is not set |
666 | # CONFIG_SCSI_EATA is not set | 686 | # CONFIG_SCSI_EATA is not set |
@@ -705,9 +725,7 @@ CONFIG_MD_LINEAR=m | |||
705 | CONFIG_MD_RAID0=m | 725 | CONFIG_MD_RAID0=m |
706 | CONFIG_MD_RAID1=m | 726 | CONFIG_MD_RAID1=m |
707 | CONFIG_MD_RAID10=m | 727 | CONFIG_MD_RAID10=m |
708 | CONFIG_MD_RAID5=m | 728 | # CONFIG_MD_RAID456 is not set |
709 | CONFIG_MD_RAID5_RESHAPE=y | ||
710 | CONFIG_MD_RAID6=m | ||
711 | CONFIG_MD_MULTIPATH=m | 729 | CONFIG_MD_MULTIPATH=m |
712 | CONFIG_MD_FAULTY=m | 730 | CONFIG_MD_FAULTY=m |
713 | CONFIG_BLK_DEV_DM=m | 731 | CONFIG_BLK_DEV_DM=m |
@@ -750,7 +768,6 @@ CONFIG_IEEE1394_OHCI1394=m | |||
750 | # | 768 | # |
751 | CONFIG_IEEE1394_VIDEO1394=m | 769 | CONFIG_IEEE1394_VIDEO1394=m |
752 | CONFIG_IEEE1394_SBP2=m | 770 | CONFIG_IEEE1394_SBP2=m |
753 | # CONFIG_IEEE1394_SBP2_PHYS_DMA is not set | ||
754 | # CONFIG_IEEE1394_ETH1394 is not set | 771 | # CONFIG_IEEE1394_ETH1394 is not set |
755 | CONFIG_IEEE1394_DV1394=m | 772 | CONFIG_IEEE1394_DV1394=m |
756 | CONFIG_IEEE1394_RAWIO=m | 773 | CONFIG_IEEE1394_RAWIO=m |
@@ -766,9 +783,12 @@ CONFIG_IEEE1394_RAWIO=m | |||
766 | CONFIG_ADB=y | 783 | CONFIG_ADB=y |
767 | CONFIG_ADB_CUDA=y | 784 | CONFIG_ADB_CUDA=y |
768 | CONFIG_ADB_PMU=y | 785 | CONFIG_ADB_PMU=y |
786 | CONFIG_ADB_PMU_LED=y | ||
787 | CONFIG_ADB_PMU_LED_IDE=y | ||
769 | CONFIG_PMAC_APM_EMU=m | 788 | CONFIG_PMAC_APM_EMU=m |
770 | CONFIG_PMAC_MEDIABAY=y | 789 | CONFIG_PMAC_MEDIABAY=y |
771 | CONFIG_PMAC_BACKLIGHT=y | 790 | CONFIG_PMAC_BACKLIGHT=y |
791 | CONFIG_PMAC_BACKLIGHT_LEGACY=y | ||
772 | CONFIG_INPUT_ADBHID=y | 792 | CONFIG_INPUT_ADBHID=y |
773 | CONFIG_MAC_EMUMOUSEBTN=y | 793 | CONFIG_MAC_EMUMOUSEBTN=y |
774 | CONFIG_THERM_WINDTUNNEL=m | 794 | CONFIG_THERM_WINDTUNNEL=m |
@@ -858,6 +878,7 @@ CONFIG_PCNET32=y | |||
858 | # CONFIG_CHELSIO_T1 is not set | 878 | # CONFIG_CHELSIO_T1 is not set |
859 | # CONFIG_IXGB is not set | 879 | # CONFIG_IXGB is not set |
860 | # CONFIG_S2IO is not set | 880 | # CONFIG_S2IO is not set |
881 | # CONFIG_MYRI10GE is not set | ||
861 | 882 | ||
862 | # | 883 | # |
863 | # Token Ring devices | 884 | # Token Ring devices |
@@ -908,6 +929,7 @@ CONFIG_APPLE_AIRPORT=m | |||
908 | # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support | 929 | # Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support |
909 | # | 930 | # |
910 | CONFIG_PRISM54=m | 931 | CONFIG_PRISM54=m |
932 | # CONFIG_USB_ZD1201 is not set | ||
911 | # CONFIG_HOSTAP is not set | 933 | # CONFIG_HOSTAP is not set |
912 | CONFIG_NET_WIRELESS=y | 934 | CONFIG_NET_WIRELESS=y |
913 | 935 | ||
@@ -998,6 +1020,7 @@ CONFIG_SERIO=y | |||
998 | CONFIG_VT=y | 1020 | CONFIG_VT=y |
999 | CONFIG_VT_CONSOLE=y | 1021 | CONFIG_VT_CONSOLE=y |
1000 | CONFIG_HW_CONSOLE=y | 1022 | CONFIG_HW_CONSOLE=y |
1023 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
1001 | # CONFIG_SERIAL_NONSTANDARD is not set | 1024 | # CONFIG_SERIAL_NONSTANDARD is not set |
1002 | 1025 | ||
1003 | # | 1026 | # |
@@ -1029,6 +1052,7 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
1029 | # Watchdog Cards | 1052 | # Watchdog Cards |
1030 | # | 1053 | # |
1031 | # CONFIG_WATCHDOG is not set | 1054 | # CONFIG_WATCHDOG is not set |
1055 | # CONFIG_HW_RANDOM is not set | ||
1032 | CONFIG_NVRAM=y | 1056 | CONFIG_NVRAM=y |
1033 | CONFIG_GEN_RTC=y | 1057 | CONFIG_GEN_RTC=y |
1034 | # CONFIG_GEN_RTC_X is not set | 1058 | # CONFIG_GEN_RTC_X is not set |
@@ -1040,6 +1064,7 @@ CONFIG_GEN_RTC=y | |||
1040 | # Ftape, the floppy tape device driver | 1064 | # Ftape, the floppy tape device driver |
1041 | # | 1065 | # |
1042 | CONFIG_AGP=m | 1066 | CONFIG_AGP=m |
1067 | # CONFIG_AGP_SIS is not set | ||
1043 | # CONFIG_AGP_VIA is not set | 1068 | # CONFIG_AGP_VIA is not set |
1044 | CONFIG_AGP_UNINORTH=m | 1069 | CONFIG_AGP_UNINORTH=m |
1045 | CONFIG_DRM=m | 1070 | CONFIG_DRM=m |
@@ -1092,6 +1117,7 @@ CONFIG_I2C_ALGOBIT=y | |||
1092 | CONFIG_I2C_POWERMAC=y | 1117 | CONFIG_I2C_POWERMAC=y |
1093 | # CONFIG_I2C_MPC is not set | 1118 | # CONFIG_I2C_MPC is not set |
1094 | # CONFIG_I2C_NFORCE2 is not set | 1119 | # CONFIG_I2C_NFORCE2 is not set |
1120 | # CONFIG_I2C_OCORES is not set | ||
1095 | # CONFIG_I2C_PARPORT_LIGHT is not set | 1121 | # CONFIG_I2C_PARPORT_LIGHT is not set |
1096 | # CONFIG_I2C_PROSAVAGE is not set | 1122 | # CONFIG_I2C_PROSAVAGE is not set |
1097 | # CONFIG_I2C_SAVAGE4 is not set | 1123 | # CONFIG_I2C_SAVAGE4 is not set |
@@ -1156,12 +1182,13 @@ CONFIG_VIDEO_V4L2=y | |||
1156 | # | 1182 | # |
1157 | # Graphics support | 1183 | # Graphics support |
1158 | # | 1184 | # |
1185 | # CONFIG_FIRMWARE_EDID is not set | ||
1159 | CONFIG_FB=y | 1186 | CONFIG_FB=y |
1160 | CONFIG_FB_CFB_FILLRECT=y | 1187 | CONFIG_FB_CFB_FILLRECT=y |
1161 | CONFIG_FB_CFB_COPYAREA=y | 1188 | CONFIG_FB_CFB_COPYAREA=y |
1162 | CONFIG_FB_CFB_IMAGEBLIT=y | 1189 | CONFIG_FB_CFB_IMAGEBLIT=y |
1163 | CONFIG_FB_MACMODES=y | 1190 | CONFIG_FB_MACMODES=y |
1164 | CONFIG_FB_FIRMWARE_EDID=y | 1191 | CONFIG_FB_BACKLIGHT=y |
1165 | CONFIG_FB_MODE_HELPERS=y | 1192 | CONFIG_FB_MODE_HELPERS=y |
1166 | CONFIG_FB_TILEBLITTING=y | 1193 | CONFIG_FB_TILEBLITTING=y |
1167 | # CONFIG_FB_CIRRUS is not set | 1194 | # CONFIG_FB_CIRRUS is not set |
@@ -1178,6 +1205,7 @@ CONFIG_FB_IMSTT=y | |||
1178 | # CONFIG_FB_S1D13XXX is not set | 1205 | # CONFIG_FB_S1D13XXX is not set |
1179 | CONFIG_FB_NVIDIA=y | 1206 | CONFIG_FB_NVIDIA=y |
1180 | CONFIG_FB_NVIDIA_I2C=y | 1207 | CONFIG_FB_NVIDIA_I2C=y |
1208 | CONFIG_FB_NVIDIA_BACKLIGHT=y | ||
1181 | # CONFIG_FB_RIVA is not set | 1209 | # CONFIG_FB_RIVA is not set |
1182 | CONFIG_FB_MATROX=y | 1210 | CONFIG_FB_MATROX=y |
1183 | CONFIG_FB_MATROX_MILLENIUM=y | 1211 | CONFIG_FB_MATROX_MILLENIUM=y |
@@ -1187,12 +1215,15 @@ CONFIG_FB_MATROX_MYSTIQUE=y | |||
1187 | # CONFIG_FB_MATROX_MULTIHEAD is not set | 1215 | # CONFIG_FB_MATROX_MULTIHEAD is not set |
1188 | CONFIG_FB_RADEON=y | 1216 | CONFIG_FB_RADEON=y |
1189 | CONFIG_FB_RADEON_I2C=y | 1217 | CONFIG_FB_RADEON_I2C=y |
1218 | CONFIG_FB_RADEON_BACKLIGHT=y | ||
1190 | # CONFIG_FB_RADEON_DEBUG is not set | 1219 | # CONFIG_FB_RADEON_DEBUG is not set |
1191 | CONFIG_FB_ATY128=y | 1220 | CONFIG_FB_ATY128=y |
1221 | CONFIG_FB_ATY128_BACKLIGHT=y | ||
1192 | CONFIG_FB_ATY=y | 1222 | CONFIG_FB_ATY=y |
1193 | CONFIG_FB_ATY_CT=y | 1223 | CONFIG_FB_ATY_CT=y |
1194 | # CONFIG_FB_ATY_GENERIC_LCD is not set | 1224 | # CONFIG_FB_ATY_GENERIC_LCD is not set |
1195 | CONFIG_FB_ATY_GX=y | 1225 | CONFIG_FB_ATY_GX=y |
1226 | CONFIG_FB_ATY_BACKLIGHT=y | ||
1196 | # CONFIG_FB_SAVAGE is not set | 1227 | # CONFIG_FB_SAVAGE is not set |
1197 | # CONFIG_FB_SIS is not set | 1228 | # CONFIG_FB_SIS is not set |
1198 | # CONFIG_FB_NEOMAGIC is not set | 1229 | # CONFIG_FB_NEOMAGIC is not set |
@@ -1221,7 +1252,11 @@ CONFIG_LOGO=y | |||
1221 | CONFIG_LOGO_LINUX_MONO=y | 1252 | CONFIG_LOGO_LINUX_MONO=y |
1222 | CONFIG_LOGO_LINUX_VGA16=y | 1253 | CONFIG_LOGO_LINUX_VGA16=y |
1223 | CONFIG_LOGO_LINUX_CLUT224=y | 1254 | CONFIG_LOGO_LINUX_CLUT224=y |
1224 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | 1255 | CONFIG_BACKLIGHT_LCD_SUPPORT=y |
1256 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
1257 | CONFIG_BACKLIGHT_DEVICE=y | ||
1258 | CONFIG_LCD_CLASS_DEVICE=m | ||
1259 | CONFIG_LCD_DEVICE=y | ||
1225 | 1260 | ||
1226 | # | 1261 | # |
1227 | # Sound | 1262 | # Sound |
@@ -1278,6 +1313,18 @@ CONFIG_SND_DUMMY=m | |||
1278 | # CONFIG_SND_CMIPCI is not set | 1313 | # CONFIG_SND_CMIPCI is not set |
1279 | # CONFIG_SND_CS4281 is not set | 1314 | # CONFIG_SND_CS4281 is not set |
1280 | # CONFIG_SND_CS46XX is not set | 1315 | # CONFIG_SND_CS46XX is not set |
1316 | # CONFIG_SND_DARLA20 is not set | ||
1317 | # CONFIG_SND_GINA20 is not set | ||
1318 | # CONFIG_SND_LAYLA20 is not set | ||
1319 | # CONFIG_SND_DARLA24 is not set | ||
1320 | # CONFIG_SND_GINA24 is not set | ||
1321 | # CONFIG_SND_LAYLA24 is not set | ||
1322 | # CONFIG_SND_MONA is not set | ||
1323 | # CONFIG_SND_MIA is not set | ||
1324 | # CONFIG_SND_ECHO3G is not set | ||
1325 | # CONFIG_SND_INDIGO is not set | ||
1326 | # CONFIG_SND_INDIGOIO is not set | ||
1327 | # CONFIG_SND_INDIGODJ is not set | ||
1281 | # CONFIG_SND_EMU10K1 is not set | 1328 | # CONFIG_SND_EMU10K1 is not set |
1282 | # CONFIG_SND_EMU10K1X is not set | 1329 | # CONFIG_SND_EMU10K1X is not set |
1283 | # CONFIG_SND_ENS1370 is not set | 1330 | # CONFIG_SND_ENS1370 is not set |
@@ -1315,6 +1362,17 @@ CONFIG_SND_POWERMAC=m | |||
1315 | CONFIG_SND_POWERMAC_AUTO_DRC=y | 1362 | CONFIG_SND_POWERMAC_AUTO_DRC=y |
1316 | 1363 | ||
1317 | # | 1364 | # |
1365 | # Apple Onboard Audio driver | ||
1366 | # | ||
1367 | CONFIG_SND_AOA=m | ||
1368 | CONFIG_SND_AOA_FABRIC_LAYOUT=m | ||
1369 | CONFIG_SND_AOA_ONYX=m | ||
1370 | CONFIG_SND_AOA_TAS=m | ||
1371 | CONFIG_SND_AOA_TOONIE=m | ||
1372 | CONFIG_SND_AOA_SOUNDBUS=m | ||
1373 | CONFIG_SND_AOA_SOUNDBUS_I2S=m | ||
1374 | |||
1375 | # | ||
1318 | # USB devices | 1376 | # USB devices |
1319 | # | 1377 | # |
1320 | CONFIG_SND_USB_AUDIO=m | 1378 | CONFIG_SND_USB_AUDIO=m |
@@ -1355,6 +1413,7 @@ CONFIG_USB_DYNAMIC_MINORS=y | |||
1355 | CONFIG_USB_EHCI_HCD=m | 1413 | CONFIG_USB_EHCI_HCD=m |
1356 | CONFIG_USB_EHCI_SPLIT_ISO=y | 1414 | CONFIG_USB_EHCI_SPLIT_ISO=y |
1357 | CONFIG_USB_EHCI_ROOT_HUB_TT=y | 1415 | CONFIG_USB_EHCI_ROOT_HUB_TT=y |
1416 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | ||
1358 | # CONFIG_USB_ISP116X_HCD is not set | 1417 | # CONFIG_USB_ISP116X_HCD is not set |
1359 | CONFIG_USB_OHCI_HCD=y | 1418 | CONFIG_USB_OHCI_HCD=y |
1360 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set | 1419 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set |
@@ -1431,7 +1490,6 @@ CONFIG_USB_NET_NET1080=m | |||
1431 | # CONFIG_USB_NET_RNDIS_HOST is not set | 1490 | # CONFIG_USB_NET_RNDIS_HOST is not set |
1432 | # CONFIG_USB_NET_CDC_SUBSET is not set | 1491 | # CONFIG_USB_NET_CDC_SUBSET is not set |
1433 | CONFIG_USB_NET_ZAURUS=m | 1492 | CONFIG_USB_NET_ZAURUS=m |
1434 | # CONFIG_USB_ZD1201 is not set | ||
1435 | CONFIG_USB_MON=y | 1493 | CONFIG_USB_MON=y |
1436 | 1494 | ||
1437 | # | 1495 | # |
@@ -1499,10 +1557,12 @@ CONFIG_USB_EZUSB=y | |||
1499 | # CONFIG_USB_LEGOTOWER is not set | 1557 | # CONFIG_USB_LEGOTOWER is not set |
1500 | # CONFIG_USB_LCD is not set | 1558 | # CONFIG_USB_LCD is not set |
1501 | # CONFIG_USB_LED is not set | 1559 | # CONFIG_USB_LED is not set |
1560 | # CONFIG_USB_CY7C63 is not set | ||
1502 | # CONFIG_USB_CYTHERM is not set | 1561 | # CONFIG_USB_CYTHERM is not set |
1503 | # CONFIG_USB_PHIDGETKIT is not set | 1562 | # CONFIG_USB_PHIDGETKIT is not set |
1504 | # CONFIG_USB_PHIDGETSERVO is not set | 1563 | # CONFIG_USB_PHIDGETSERVO is not set |
1505 | # CONFIG_USB_IDMOUSE is not set | 1564 | # CONFIG_USB_IDMOUSE is not set |
1565 | CONFIG_USB_APPLEDISPLAY=m | ||
1506 | # CONFIG_USB_SISUSBVGA is not set | 1566 | # CONFIG_USB_SISUSBVGA is not set |
1507 | # CONFIG_USB_LD is not set | 1567 | # CONFIG_USB_LD is not set |
1508 | # CONFIG_USB_TEST is not set | 1568 | # CONFIG_USB_TEST is not set |
@@ -1524,7 +1584,8 @@ CONFIG_USB_EZUSB=y | |||
1524 | # | 1584 | # |
1525 | # LED devices | 1585 | # LED devices |
1526 | # | 1586 | # |
1527 | # CONFIG_NEW_LEDS is not set | 1587 | CONFIG_NEW_LEDS=y |
1588 | CONFIG_LEDS_CLASS=y | ||
1528 | 1589 | ||
1529 | # | 1590 | # |
1530 | # LED drivers | 1591 | # LED drivers |
@@ -1533,6 +1594,10 @@ CONFIG_USB_EZUSB=y | |||
1533 | # | 1594 | # |
1534 | # LED Triggers | 1595 | # LED Triggers |
1535 | # | 1596 | # |
1597 | CONFIG_LEDS_TRIGGERS=y | ||
1598 | # CONFIG_LEDS_TRIGGER_TIMER is not set | ||
1599 | CONFIG_LEDS_TRIGGER_IDE_DISK=y | ||
1600 | # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set | ||
1536 | 1601 | ||
1537 | # | 1602 | # |
1538 | # InfiniBand support | 1603 | # InfiniBand support |
@@ -1549,6 +1614,19 @@ CONFIG_USB_EZUSB=y | |||
1549 | # CONFIG_RTC_CLASS is not set | 1614 | # CONFIG_RTC_CLASS is not set |
1550 | 1615 | ||
1551 | # | 1616 | # |
1617 | # DMA Engine support | ||
1618 | # | ||
1619 | # CONFIG_DMA_ENGINE is not set | ||
1620 | |||
1621 | # | ||
1622 | # DMA Clients | ||
1623 | # | ||
1624 | |||
1625 | # | ||
1626 | # DMA Devices | ||
1627 | # | ||
1628 | |||
1629 | # | ||
1552 | # File systems | 1630 | # File systems |
1553 | # | 1631 | # |
1554 | CONFIG_EXT2_FS=y | 1632 | CONFIG_EXT2_FS=y |
@@ -1569,6 +1647,7 @@ CONFIG_FS_POSIX_ACL=y | |||
1569 | # CONFIG_MINIX_FS is not set | 1647 | # CONFIG_MINIX_FS is not set |
1570 | # CONFIG_ROMFS_FS is not set | 1648 | # CONFIG_ROMFS_FS is not set |
1571 | CONFIG_INOTIFY=y | 1649 | CONFIG_INOTIFY=y |
1650 | CONFIG_INOTIFY_USER=y | ||
1572 | # CONFIG_QUOTA is not set | 1651 | # CONFIG_QUOTA is not set |
1573 | CONFIG_DNOTIFY=y | 1652 | CONFIG_DNOTIFY=y |
1574 | # CONFIG_AUTOFS_FS is not set | 1653 | # CONFIG_AUTOFS_FS is not set |
@@ -1649,6 +1728,7 @@ CONFIG_RPCSEC_GSS_KRB5=y | |||
1649 | CONFIG_SMB_FS=m | 1728 | CONFIG_SMB_FS=m |
1650 | # CONFIG_SMB_NLS_DEFAULT is not set | 1729 | # CONFIG_SMB_NLS_DEFAULT is not set |
1651 | # CONFIG_CIFS is not set | 1730 | # CONFIG_CIFS is not set |
1731 | # CONFIG_CIFS_DEBUG2 is not set | ||
1652 | # CONFIG_NCP_FS is not set | 1732 | # CONFIG_NCP_FS is not set |
1653 | # CONFIG_CODA_FS is not set | 1733 | # CONFIG_CODA_FS is not set |
1654 | # CONFIG_AFS_FS is not set | 1734 | # CONFIG_AFS_FS is not set |
@@ -1732,6 +1812,7 @@ CONFIG_TEXTSEARCH=y | |||
1732 | CONFIG_TEXTSEARCH_KMP=m | 1812 | CONFIG_TEXTSEARCH_KMP=m |
1733 | CONFIG_TEXTSEARCH_BM=m | 1813 | CONFIG_TEXTSEARCH_BM=m |
1734 | CONFIG_TEXTSEARCH_FSM=m | 1814 | CONFIG_TEXTSEARCH_FSM=m |
1815 | CONFIG_PLIST=y | ||
1735 | 1816 | ||
1736 | # | 1817 | # |
1737 | # Instrumentation Support | 1818 | # Instrumentation Support |
@@ -1744,12 +1825,15 @@ CONFIG_OPROFILE=y | |||
1744 | # | 1825 | # |
1745 | # CONFIG_PRINTK_TIME is not set | 1826 | # CONFIG_PRINTK_TIME is not set |
1746 | # CONFIG_MAGIC_SYSRQ is not set | 1827 | # CONFIG_MAGIC_SYSRQ is not set |
1828 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1747 | CONFIG_DEBUG_KERNEL=y | 1829 | CONFIG_DEBUG_KERNEL=y |
1748 | CONFIG_LOG_BUF_SHIFT=14 | 1830 | CONFIG_LOG_BUF_SHIFT=14 |
1749 | CONFIG_DETECT_SOFTLOCKUP=y | 1831 | CONFIG_DETECT_SOFTLOCKUP=y |
1750 | # CONFIG_SCHEDSTATS is not set | 1832 | # CONFIG_SCHEDSTATS is not set |
1751 | # CONFIG_DEBUG_SLAB is not set | 1833 | # CONFIG_DEBUG_SLAB is not set |
1752 | # CONFIG_DEBUG_MUTEXES is not set | 1834 | # CONFIG_DEBUG_MUTEXES is not set |
1835 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
1836 | # CONFIG_RT_MUTEX_TESTER is not set | ||
1753 | # CONFIG_DEBUG_SPINLOCK is not set | 1837 | # CONFIG_DEBUG_SPINLOCK is not set |
1754 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1838 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1755 | # CONFIG_DEBUG_KOBJECT is not set | 1839 | # CONFIG_DEBUG_KOBJECT is not set |
@@ -1763,11 +1847,7 @@ CONFIG_XMON=y | |||
1763 | CONFIG_XMON_DEFAULT=y | 1847 | CONFIG_XMON_DEFAULT=y |
1764 | # CONFIG_BDI_SWITCH is not set | 1848 | # CONFIG_BDI_SWITCH is not set |
1765 | CONFIG_BOOTX_TEXT=y | 1849 | CONFIG_BOOTX_TEXT=y |
1766 | # CONFIG_PPC_EARLY_DEBUG_LPAR is not set | 1850 | # CONFIG_PPC_EARLY_DEBUG is not set |
1767 | # CONFIG_PPC_EARLY_DEBUG_G5 is not set | ||
1768 | # CONFIG_PPC_EARLY_DEBUG_RTAS is not set | ||
1769 | # CONFIG_PPC_EARLY_DEBUG_MAPLE is not set | ||
1770 | # CONFIG_PPC_EARLY_DEBUG_ISERIES is not set | ||
1771 | 1851 | ||
1772 | # | 1852 | # |
1773 | # Security options | 1853 | # Security options |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index e16eb2a33173..6ff3cf506088 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -191,6 +191,37 @@ exception_marker: | |||
191 | ori reg,reg,(label)@l; /* virt addr of handler ... */ | 191 | ori reg,reg,(label)@l; /* virt addr of handler ... */ |
192 | #endif | 192 | #endif |
193 | 193 | ||
194 | /* | ||
195 | * Equal to EXCEPTION_PROLOG_PSERIES, except that it forces 64bit mode. | ||
196 | * The firmware calls the registered system_reset_fwnmi and | ||
197 | * machine_check_fwnmi handlers in 32bit mode if the cpu happens to run | ||
198 | * a 32bit application at the time of the event. | ||
199 | * This firmware bug is present on POWER4 and JS20. | ||
200 | */ | ||
201 | #define EXCEPTION_PROLOG_PSERIES_FORCE_64BIT(area, label) \ | ||
202 | mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ | ||
203 | std r9,area+EX_R9(r13); /* save r9 - r12 */ \ | ||
204 | std r10,area+EX_R10(r13); \ | ||
205 | std r11,area+EX_R11(r13); \ | ||
206 | std r12,area+EX_R12(r13); \ | ||
207 | mfspr r9,SPRN_SPRG1; \ | ||
208 | std r9,area+EX_R13(r13); \ | ||
209 | mfcr r9; \ | ||
210 | clrrdi r12,r13,32; /* get high part of &label */ \ | ||
211 | mfmsr r10; \ | ||
212 | /* force 64bit mode */ \ | ||
213 | li r11,5; /* MSR_SF_LG|MSR_ISF_LG */ \ | ||
214 | rldimi r10,r11,61,0; /* insert into top 3 bits */ \ | ||
215 | /* done 64bit mode */ \ | ||
216 | mfspr r11,SPRN_SRR0; /* save SRR0 */ \ | ||
217 | LOAD_HANDLER(r12,label) \ | ||
218 | ori r10,r10,MSR_IR|MSR_DR|MSR_RI; \ | ||
219 | mtspr SPRN_SRR0,r12; \ | ||
220 | mfspr r12,SPRN_SRR1; /* and SRR1 */ \ | ||
221 | mtspr SPRN_SRR1,r10; \ | ||
222 | rfid; \ | ||
223 | b . /* prevent speculative execution */ | ||
224 | |||
194 | #define EXCEPTION_PROLOG_PSERIES(area, label) \ | 225 | #define EXCEPTION_PROLOG_PSERIES(area, label) \ |
195 | mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ | 226 | mfspr r13,SPRN_SPRG3; /* get paca address into r13 */ \ |
196 | std r9,area+EX_R9(r13); /* save r9 - r12 */ \ | 227 | std r9,area+EX_R9(r13); /* save r9 - r12 */ \ |
@@ -604,14 +635,14 @@ slb_miss_user_pseries: | |||
604 | system_reset_fwnmi: | 635 | system_reset_fwnmi: |
605 | HMT_MEDIUM | 636 | HMT_MEDIUM |
606 | mtspr SPRN_SPRG1,r13 /* save r13 */ | 637 | mtspr SPRN_SPRG1,r13 /* save r13 */ |
607 | EXCEPTION_PROLOG_PSERIES(PACA_EXGEN, system_reset_common) | 638 | EXCEPTION_PROLOG_PSERIES_FORCE_64BIT(PACA_EXGEN, system_reset_common) |
608 | 639 | ||
609 | .globl machine_check_fwnmi | 640 | .globl machine_check_fwnmi |
610 | .align 7 | 641 | .align 7 |
611 | machine_check_fwnmi: | 642 | machine_check_fwnmi: |
612 | HMT_MEDIUM | 643 | HMT_MEDIUM |
613 | mtspr SPRN_SPRG1,r13 /* save r13 */ | 644 | mtspr SPRN_SPRG1,r13 /* save r13 */ |
614 | EXCEPTION_PROLOG_PSERIES(PACA_EXMC, machine_check_common) | 645 | EXCEPTION_PROLOG_PSERIES_FORCE_64BIT(PACA_EXMC, machine_check_common) |
615 | 646 | ||
616 | #ifdef CONFIG_PPC_ISERIES | 647 | #ifdef CONFIG_PPC_ISERIES |
617 | /*** ISeries-LPAR interrupt handlers ***/ | 648 | /*** ISeries-LPAR interrupt handlers ***/ |
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index 7e98e778b52f..359ab89748e0 100644 --- a/arch/powerpc/kernel/legacy_serial.c +++ b/arch/powerpc/kernel/legacy_serial.c | |||
@@ -112,7 +112,7 @@ static int __init add_legacy_port(struct device_node *np, int want_index, | |||
112 | static int __init add_legacy_soc_port(struct device_node *np, | 112 | static int __init add_legacy_soc_port(struct device_node *np, |
113 | struct device_node *soc_dev) | 113 | struct device_node *soc_dev) |
114 | { | 114 | { |
115 | phys_addr_t addr; | 115 | u64 addr; |
116 | u32 *addrp; | 116 | u32 *addrp; |
117 | upf_t flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ; | 117 | upf_t flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ; |
118 | 118 | ||
@@ -143,7 +143,7 @@ static int __init add_legacy_isa_port(struct device_node *np, | |||
143 | u32 *reg; | 143 | u32 *reg; |
144 | char *typep; | 144 | char *typep; |
145 | int index = -1; | 145 | int index = -1; |
146 | phys_addr_t taddr; | 146 | u64 taddr; |
147 | 147 | ||
148 | DBG(" -> add_legacy_isa_port(%s)\n", np->full_name); | 148 | DBG(" -> add_legacy_isa_port(%s)\n", np->full_name); |
149 | 149 | ||
@@ -165,10 +165,13 @@ static int __init add_legacy_isa_port(struct device_node *np, | |||
165 | if (typep && *typep == 'S') | 165 | if (typep && *typep == 'S') |
166 | index = simple_strtol(typep+1, NULL, 0) - 1; | 166 | index = simple_strtol(typep+1, NULL, 0) - 1; |
167 | 167 | ||
168 | /* Translate ISA address */ | 168 | /* Translate ISA address. If it fails, we still register the port |
169 | * with no translated address so that it can be picked up as an IO | ||
170 | * port later by the serial driver | ||
171 | */ | ||
169 | taddr = of_translate_address(np, reg); | 172 | taddr = of_translate_address(np, reg); |
170 | if (taddr == OF_BAD_ADDR) | 173 | if (taddr == OF_BAD_ADDR) |
171 | return -1; | 174 | taddr = 0; |
172 | 175 | ||
173 | /* Add port, irq will be dealt with later */ | 176 | /* Add port, irq will be dealt with later */ |
174 | return add_legacy_port(np, index, UPIO_PORT, reg[1], taddr, | 177 | return add_legacy_port(np, index, UPIO_PORT, reg[1], taddr, |
@@ -180,7 +183,7 @@ static int __init add_legacy_isa_port(struct device_node *np, | |||
180 | static int __init add_legacy_pci_port(struct device_node *np, | 183 | static int __init add_legacy_pci_port(struct device_node *np, |
181 | struct device_node *pci_dev) | 184 | struct device_node *pci_dev) |
182 | { | 185 | { |
183 | phys_addr_t addr, base; | 186 | u64 addr, base; |
184 | u32 *addrp; | 187 | u32 *addrp; |
185 | unsigned int flags; | 188 | unsigned int flags; |
186 | int iotype, index = -1, lindex = 0; | 189 | int iotype, index = -1, lindex = 0; |
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index bfb407fc1aa1..e3ed21cd3d94 100644 --- a/arch/powerpc/kernel/misc_64.S +++ b/arch/powerpc/kernel/misc_64.S | |||
@@ -687,7 +687,7 @@ _GLOBAL(kexec_sequence) | |||
687 | /* clear out hardware hash page table and tlb */ | 687 | /* clear out hardware hash page table and tlb */ |
688 | ld r5,0(r27) /* deref function descriptor */ | 688 | ld r5,0(r27) /* deref function descriptor */ |
689 | mtctr r5 | 689 | mtctr r5 |
690 | bctrl /* ppc_md.hash_clear_all(void); */ | 690 | bctrl /* ppc_md.hpte_clear_all(void); */ |
691 | 691 | ||
692 | /* | 692 | /* |
693 | * kexec image calling is: | 693 | * kexec image calling is: |
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c index ebd501a59abd..462bced40c12 100644 --- a/arch/powerpc/kernel/prom_init.c +++ b/arch/powerpc/kernel/prom_init.c | |||
@@ -557,7 +557,9 @@ unsigned long prom_memparse(const char *ptr, const char **retptr) | |||
557 | static void __init early_cmdline_parse(void) | 557 | static void __init early_cmdline_parse(void) |
558 | { | 558 | { |
559 | struct prom_t *_prom = &RELOC(prom); | 559 | struct prom_t *_prom = &RELOC(prom); |
560 | #ifdef CONFIG_PPC64 | ||
560 | const char *opt; | 561 | const char *opt; |
562 | #endif | ||
561 | char *p; | 563 | char *p; |
562 | int l = 0; | 564 | int l = 0; |
563 | 565 | ||
@@ -2030,6 +2032,39 @@ static void __init fixup_device_tree_maple(void) | |||
2030 | #define fixup_device_tree_maple() | 2032 | #define fixup_device_tree_maple() |
2031 | #endif | 2033 | #endif |
2032 | 2034 | ||
2035 | #ifdef CONFIG_PPC_CHRP | ||
2036 | /* Pegasos lacks the "ranges" property in the isa node */ | ||
2037 | static void __init fixup_device_tree_chrp(void) | ||
2038 | { | ||
2039 | phandle isa; | ||
2040 | u32 isa_ranges[6]; | ||
2041 | char *name; | ||
2042 | int rc; | ||
2043 | |||
2044 | name = "/pci@80000000/isa@c"; | ||
2045 | isa = call_prom("finddevice", 1, 1, ADDR(name)); | ||
2046 | if (!PHANDLE_VALID(isa)) | ||
2047 | return; | ||
2048 | |||
2049 | rc = prom_getproplen(isa, "ranges"); | ||
2050 | if (rc != 0 && rc != PROM_ERROR) | ||
2051 | return; | ||
2052 | |||
2053 | prom_printf("Fixing up missing ISA range on Pegasos...\n"); | ||
2054 | |||
2055 | isa_ranges[0] = 0x1; | ||
2056 | isa_ranges[1] = 0x0; | ||
2057 | isa_ranges[2] = 0x01006000; | ||
2058 | isa_ranges[3] = 0x0; | ||
2059 | isa_ranges[4] = 0x0; | ||
2060 | isa_ranges[5] = 0x00010000; | ||
2061 | prom_setprop(isa, name, "ranges", | ||
2062 | isa_ranges, sizeof(isa_ranges)); | ||
2063 | } | ||
2064 | #else | ||
2065 | #define fixup_device_tree_chrp() | ||
2066 | #endif | ||
2067 | |||
2033 | #if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC) | 2068 | #if defined(CONFIG_PPC64) && defined(CONFIG_PPC_PMAC) |
2034 | static void __init fixup_device_tree_pmac(void) | 2069 | static void __init fixup_device_tree_pmac(void) |
2035 | { | 2070 | { |
@@ -2077,6 +2112,7 @@ static void __init fixup_device_tree_pmac(void) | |||
2077 | static void __init fixup_device_tree(void) | 2112 | static void __init fixup_device_tree(void) |
2078 | { | 2113 | { |
2079 | fixup_device_tree_maple(); | 2114 | fixup_device_tree_maple(); |
2115 | fixup_device_tree_chrp(); | ||
2080 | fixup_device_tree_pmac(); | 2116 | fixup_device_tree_pmac(); |
2081 | } | 2117 | } |
2082 | 2118 | ||
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 46c56cfd1b2f..6a9bc9ce54e0 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -144,13 +144,15 @@ void smp_message_recv(int msg, struct pt_regs *regs) | |||
144 | 144 | ||
145 | void smp_send_reschedule(int cpu) | 145 | void smp_send_reschedule(int cpu) |
146 | { | 146 | { |
147 | smp_ops->message_pass(cpu, PPC_MSG_RESCHEDULE); | 147 | if (likely(smp_ops)) |
148 | smp_ops->message_pass(cpu, PPC_MSG_RESCHEDULE); | ||
148 | } | 149 | } |
149 | 150 | ||
150 | #ifdef CONFIG_DEBUGGER | 151 | #ifdef CONFIG_DEBUGGER |
151 | void smp_send_debugger_break(int cpu) | 152 | void smp_send_debugger_break(int cpu) |
152 | { | 153 | { |
153 | smp_ops->message_pass(cpu, PPC_MSG_DEBUGGER_BREAK); | 154 | if (likely(smp_ops)) |
155 | smp_ops->message_pass(cpu, PPC_MSG_DEBUGGER_BREAK); | ||
154 | } | 156 | } |
155 | #endif | 157 | #endif |
156 | 158 | ||
@@ -158,7 +160,7 @@ void smp_send_debugger_break(int cpu) | |||
158 | void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *)) | 160 | void crash_send_ipi(void (*crash_ipi_callback)(struct pt_regs *)) |
159 | { | 161 | { |
160 | crash_ipi_function_ptr = crash_ipi_callback; | 162 | crash_ipi_function_ptr = crash_ipi_callback; |
161 | if (crash_ipi_callback) { | 163 | if (crash_ipi_callback && smp_ops) { |
162 | mb(); | 164 | mb(); |
163 | smp_ops->message_pass(MSG_ALL_BUT_SELF, PPC_MSG_DEBUGGER_BREAK); | 165 | smp_ops->message_pass(MSG_ALL_BUT_SELF, PPC_MSG_DEBUGGER_BREAK); |
164 | } | 166 | } |
@@ -220,6 +222,9 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic, | |||
220 | /* Can deadlock when called with interrupts disabled */ | 222 | /* Can deadlock when called with interrupts disabled */ |
221 | WARN_ON(irqs_disabled()); | 223 | WARN_ON(irqs_disabled()); |
222 | 224 | ||
225 | if (unlikely(smp_ops == NULL)) | ||
226 | return -1; | ||
227 | |||
223 | data.func = func; | 228 | data.func = func; |
224 | data.info = info; | 229 | data.info = info; |
225 | atomic_set(&data.started, 0); | 230 | atomic_set(&data.started, 0); |
@@ -357,7 +362,10 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
357 | smp_store_cpu_info(boot_cpuid); | 362 | smp_store_cpu_info(boot_cpuid); |
358 | cpu_callin_map[boot_cpuid] = 1; | 363 | cpu_callin_map[boot_cpuid] = 1; |
359 | 364 | ||
360 | max_cpus = smp_ops->probe(); | 365 | if (smp_ops) |
366 | max_cpus = smp_ops->probe(); | ||
367 | else | ||
368 | max_cpus = 1; | ||
361 | 369 | ||
362 | smp_space_timers(max_cpus); | 370 | smp_space_timers(max_cpus); |
363 | 371 | ||
@@ -453,7 +461,7 @@ void generic_mach_cpu_die(void) | |||
453 | 461 | ||
454 | static int __devinit cpu_enable(unsigned int cpu) | 462 | static int __devinit cpu_enable(unsigned int cpu) |
455 | { | 463 | { |
456 | if (smp_ops->cpu_enable) | 464 | if (smp_ops && smp_ops->cpu_enable) |
457 | return smp_ops->cpu_enable(cpu); | 465 | return smp_ops->cpu_enable(cpu); |
458 | 466 | ||
459 | return -ENOSYS; | 467 | return -ENOSYS; |
@@ -467,7 +475,8 @@ int __devinit __cpu_up(unsigned int cpu) | |||
467 | if (!cpu_enable(cpu)) | 475 | if (!cpu_enable(cpu)) |
468 | return 0; | 476 | return 0; |
469 | 477 | ||
470 | if (smp_ops->cpu_bootable && !smp_ops->cpu_bootable(cpu)) | 478 | if (smp_ops == NULL || |
479 | (smp_ops->cpu_bootable && !smp_ops->cpu_bootable(cpu))) | ||
471 | return -EINVAL; | 480 | return -EINVAL; |
472 | 481 | ||
473 | /* Make sure callin-map entry is 0 (can be leftover a CPU | 482 | /* Make sure callin-map entry is 0 (can be leftover a CPU |
@@ -568,7 +577,8 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
568 | old_mask = current->cpus_allowed; | 577 | old_mask = current->cpus_allowed; |
569 | set_cpus_allowed(current, cpumask_of_cpu(boot_cpuid)); | 578 | set_cpus_allowed(current, cpumask_of_cpu(boot_cpuid)); |
570 | 579 | ||
571 | smp_ops->setup_cpu(boot_cpuid); | 580 | if (smp_ops) |
581 | smp_ops->setup_cpu(boot_cpuid); | ||
572 | 582 | ||
573 | set_cpus_allowed(current, old_mask); | 583 | set_cpus_allowed(current, old_mask); |
574 | 584 | ||
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c index 0835b4841dea..2d17f2b8eda7 100644 --- a/arch/powerpc/kernel/udbg_16550.c +++ b/arch/powerpc/kernel/udbg_16550.c | |||
@@ -81,10 +81,14 @@ static int udbg_550_getc(void) | |||
81 | void udbg_init_uart(void __iomem *comport, unsigned int speed, | 81 | void udbg_init_uart(void __iomem *comport, unsigned int speed, |
82 | unsigned int clock) | 82 | unsigned int clock) |
83 | { | 83 | { |
84 | unsigned int dll, base_bauds = clock / 16; | 84 | unsigned int dll, base_bauds; |
85 | 85 | ||
86 | if (clock == 0) | ||
87 | clock = 1843200; | ||
86 | if (speed == 0) | 88 | if (speed == 0) |
87 | speed = 9600; | 89 | speed = 9600; |
90 | |||
91 | base_bauds = clock / 16; | ||
88 | dll = base_bauds / speed; | 92 | dll = base_bauds / speed; |
89 | 93 | ||
90 | if (comport) { | 94 | if (comport) { |
diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c index 4b17a7359924..716a2906a24d 100644 --- a/arch/powerpc/mm/lmb.c +++ b/arch/powerpc/mm/lmb.c | |||
@@ -320,7 +320,8 @@ void __init lmb_enforce_memory_limit(unsigned long memory_limit) | |||
320 | break; | 320 | break; |
321 | } | 321 | } |
322 | 322 | ||
323 | lmb.rmo_size = lmb.memory.region[0].size; | 323 | if (lmb.memory.region[0].size < lmb.rmo_size) |
324 | lmb.rmo_size = lmb.memory.region[0].size; | ||
324 | 325 | ||
325 | /* And truncate any reserves above the limit also. */ | 326 | /* And truncate any reserves above the limit also. */ |
326 | for (i = 0; i < lmb.reserved.cnt; i++) { | 327 | for (i = 0; i < lmb.reserved.cnt; i++) { |
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 538e337d63e2..9c08ff322290 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
@@ -291,10 +291,6 @@ void __init chrp_setup_arch(void) | |||
291 | 291 | ||
292 | pci_create_OF_bus_map(); | 292 | pci_create_OF_bus_map(); |
293 | 293 | ||
294 | #ifdef CONFIG_SMP | ||
295 | smp_ops = &chrp_smp_ops; | ||
296 | #endif /* CONFIG_SMP */ | ||
297 | |||
298 | /* | 294 | /* |
299 | * Print the banner, then scroll down so boot progress | 295 | * Print the banner, then scroll down so boot progress |
300 | * can be printed. -- Cort | 296 | * can be printed. -- Cort |
@@ -479,6 +475,14 @@ void __init chrp_init_IRQ(void) | |||
479 | chrp_find_openpic(); | 475 | chrp_find_openpic(); |
480 | chrp_find_8259(); | 476 | chrp_find_8259(); |
481 | 477 | ||
478 | #ifdef CONFIG_SMP | ||
479 | /* Pegasos has no MPIC, those ops would make it crash. It might be an | ||
480 | * option to move setting them to after we probe the PIC though | ||
481 | */ | ||
482 | if (chrp_mpic != NULL) | ||
483 | smp_ops = &chrp_smp_ops; | ||
484 | #endif /* CONFIG_SMP */ | ||
485 | |||
482 | if (_chrp_type == _CHRP_Pegasos) | 486 | if (_chrp_type == _CHRP_Pegasos) |
483 | ppc_md.get_irq = i8259_irq; | 487 | ppc_md.get_irq = i8259_irq; |
484 | 488 | ||
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c index cb528c9de4c3..57567dfb9819 100644 --- a/arch/powerpc/platforms/maple/setup.c +++ b/arch/powerpc/platforms/maple/setup.c | |||
@@ -221,10 +221,17 @@ static void __init maple_init_IRQ(void) | |||
221 | * in Maple device-tree where the type of the controller is | 221 | * in Maple device-tree where the type of the controller is |
222 | * open-pic and not interrupt-controller | 222 | * open-pic and not interrupt-controller |
223 | */ | 223 | */ |
224 | for_each_node_by_type(np, "open-pic") { | 224 | |
225 | mpic_node = np; | 225 | for_each_node_by_type(np, "interrupt-controller") |
226 | break; | 226 | if (device_is_compatible(np, "open-pic")) { |
227 | } | 227 | mpic_node = np; |
228 | break; | ||
229 | } | ||
230 | if (mpic_node == NULL) | ||
231 | for_each_node_by_type(np, "open-pic") { | ||
232 | mpic_node = np; | ||
233 | break; | ||
234 | } | ||
228 | if (mpic_node == NULL) { | 235 | if (mpic_node == NULL) { |
229 | printk(KERN_ERR | 236 | printk(KERN_ERR |
230 | "Failed to locate the MPIC interrupt controller\n"); | 237 | "Failed to locate the MPIC interrupt controller\n"); |
@@ -252,6 +259,8 @@ static void __init maple_init_IRQ(void) | |||
252 | 259 | ||
253 | /* XXX Maple specific bits */ | 260 | /* XXX Maple specific bits */ |
254 | flags |= MPIC_BROKEN_U3 | MPIC_WANTS_RESET; | 261 | flags |= MPIC_BROKEN_U3 | MPIC_WANTS_RESET; |
262 | /* All U3/U4 are big-endian, older SLOF firmware doesn't encode this */ | ||
263 | flags |= MPIC_BIG_ENDIAN; | ||
255 | 264 | ||
256 | /* Setup the openpic driver. More device-tree junks, we hard code no | 265 | /* Setup the openpic driver. More device-tree junks, we hard code no |
257 | * ISUs for now. I'll have to revisit some stuffs with the folks doing | 266 | * ISUs for now. I'll have to revisit some stuffs with the folks doing |
diff --git a/arch/powerpc/platforms/powermac/bootx_init.c b/arch/powerpc/platforms/powermac/bootx_init.c index 871b002c9f90..6a026c733f6a 100644 --- a/arch/powerpc/platforms/powermac/bootx_init.c +++ b/arch/powerpc/platforms/powermac/bootx_init.c | |||
@@ -181,13 +181,18 @@ static void __init bootx_add_chosen_props(unsigned long base, | |||
181 | } | 181 | } |
182 | 182 | ||
183 | static void __init bootx_add_display_props(unsigned long base, | 183 | static void __init bootx_add_display_props(unsigned long base, |
184 | unsigned long *mem_end) | 184 | unsigned long *mem_end, |
185 | int has_real_node) | ||
185 | { | 186 | { |
186 | boot_infos_t *bi = bootx_info; | 187 | boot_infos_t *bi = bootx_info; |
187 | u32 tmp; | 188 | u32 tmp; |
188 | 189 | ||
189 | bootx_dt_add_prop("linux,boot-display", NULL, 0, mem_end); | 190 | if (has_real_node) { |
190 | bootx_dt_add_prop("linux,opened", NULL, 0, mem_end); | 191 | bootx_dt_add_prop("linux,boot-display", NULL, 0, mem_end); |
192 | bootx_dt_add_prop("linux,opened", NULL, 0, mem_end); | ||
193 | } else | ||
194 | bootx_dt_add_prop("linux,bootx-noscreen", NULL, 0, mem_end); | ||
195 | |||
191 | tmp = bi->dispDeviceDepth; | 196 | tmp = bi->dispDeviceDepth; |
192 | bootx_dt_add_prop("linux,bootx-depth", &tmp, 4, mem_end); | 197 | bootx_dt_add_prop("linux,bootx-depth", &tmp, 4, mem_end); |
193 | tmp = bi->dispDeviceRect[2] - bi->dispDeviceRect[0]; | 198 | tmp = bi->dispDeviceRect[2] - bi->dispDeviceRect[0]; |
@@ -241,11 +246,6 @@ static void __init bootx_scan_dt_build_strings(unsigned long base, | |||
241 | DBG(" detected display ! adding properties names !\n"); | 246 | DBG(" detected display ! adding properties names !\n"); |
242 | bootx_dt_add_string("linux,boot-display", mem_end); | 247 | bootx_dt_add_string("linux,boot-display", mem_end); |
243 | bootx_dt_add_string("linux,opened", mem_end); | 248 | bootx_dt_add_string("linux,opened", mem_end); |
244 | bootx_dt_add_string("linux,bootx-depth", mem_end); | ||
245 | bootx_dt_add_string("linux,bootx-width", mem_end); | ||
246 | bootx_dt_add_string("linux,bootx-height", mem_end); | ||
247 | bootx_dt_add_string("linux,bootx-linebytes", mem_end); | ||
248 | bootx_dt_add_string("linux,bootx-addr", mem_end); | ||
249 | strncpy(bootx_disp_path, namep, 255); | 249 | strncpy(bootx_disp_path, namep, 255); |
250 | } | 250 | } |
251 | 251 | ||
@@ -329,10 +329,13 @@ static void __init bootx_scan_dt_build_struct(unsigned long base, | |||
329 | ppp = &pp->next; | 329 | ppp = &pp->next; |
330 | } | 330 | } |
331 | 331 | ||
332 | if (node == bootx_node_chosen) | 332 | if (node == bootx_node_chosen) { |
333 | bootx_add_chosen_props(base, mem_end); | 333 | bootx_add_chosen_props(base, mem_end); |
334 | if (node == bootx_info->dispDeviceRegEntryOffset) | 334 | if (bootx_info->dispDeviceRegEntryOffset == 0) |
335 | bootx_add_display_props(base, mem_end); | 335 | bootx_add_display_props(base, mem_end, 0); |
336 | } | ||
337 | else if (node == bootx_info->dispDeviceRegEntryOffset) | ||
338 | bootx_add_display_props(base, mem_end, 1); | ||
336 | 339 | ||
337 | /* do all our children */ | 340 | /* do all our children */ |
338 | cpp = &np->child; | 341 | cpp = &np->child; |
@@ -374,6 +377,14 @@ static unsigned long __init bootx_flatten_dt(unsigned long start) | |||
374 | mem_end += 4; | 377 | mem_end += 4; |
375 | bootx_dt_strend = mem_end; | 378 | bootx_dt_strend = mem_end; |
376 | bootx_scan_dt_build_strings(base, 4, &mem_end); | 379 | bootx_scan_dt_build_strings(base, 4, &mem_end); |
380 | /* Add some strings */ | ||
381 | bootx_dt_add_string("linux,bootx-noscreen", &mem_end); | ||
382 | bootx_dt_add_string("linux,bootx-depth", &mem_end); | ||
383 | bootx_dt_add_string("linux,bootx-width", &mem_end); | ||
384 | bootx_dt_add_string("linux,bootx-height", &mem_end); | ||
385 | bootx_dt_add_string("linux,bootx-linebytes", &mem_end); | ||
386 | bootx_dt_add_string("linux,bootx-addr", &mem_end); | ||
387 | /* Wrap up strings */ | ||
377 | hdr->off_dt_strings = bootx_dt_strbase - mem_start; | 388 | hdr->off_dt_strings = bootx_dt_strbase - mem_start; |
378 | hdr->dt_strings_size = bootx_dt_strend - bootx_dt_strbase; | 389 | hdr->dt_strings_size = bootx_dt_strend - bootx_dt_strbase; |
379 | 390 | ||
@@ -471,6 +482,7 @@ void __init bootx_init(unsigned long r3, unsigned long r4) | |||
471 | if (bi->dispDeviceDepth == 16) | 482 | if (bi->dispDeviceDepth == 16) |
472 | bi->dispDeviceDepth = 15; | 483 | bi->dispDeviceDepth = 15; |
473 | 484 | ||
485 | |||
474 | #ifdef CONFIG_BOOTX_TEXT | 486 | #ifdef CONFIG_BOOTX_TEXT |
475 | ptr = (unsigned long)bi->logicalDisplayBase; | 487 | ptr = (unsigned long)bi->logicalDisplayBase; |
476 | ptr += bi->dispDeviceRect[1] * bi->dispDeviceRowBytes; | 488 | ptr += bi->dispDeviceRect[1] * bi->dispDeviceRowBytes; |
@@ -508,6 +520,7 @@ void __init bootx_init(unsigned long r3, unsigned long r4) | |||
508 | #ifdef CONFIG_BOOTX_TEXT | 520 | #ifdef CONFIG_BOOTX_TEXT |
509 | btext_welcome(bi); | 521 | btext_welcome(bi); |
510 | #endif | 522 | #endif |
523 | |||
511 | /* New BootX enters kernel with MMU off, i/os are not allowed | 524 | /* New BootX enters kernel with MMU off, i/os are not allowed |
512 | * here. This hack will have been done by the boostrap anyway. | 525 | * here. This hack will have been done by the boostrap anyway. |
513 | */ | 526 | */ |
diff --git a/arch/powerpc/platforms/powermac/cpufreq_64.c b/arch/powerpc/platforms/powermac/cpufreq_64.c index f08a14516139..7b1156ea5341 100644 --- a/arch/powerpc/platforms/powermac/cpufreq_64.c +++ b/arch/powerpc/platforms/powermac/cpufreq_64.c | |||
@@ -10,6 +10,8 @@ | |||
10 | * that is iMac G5 and latest single CPU desktop. | 10 | * that is iMac G5 and latest single CPU desktop. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #undef DEBUG | ||
14 | |||
13 | #include <linux/module.h> | 15 | #include <linux/module.h> |
14 | #include <linux/types.h> | 16 | #include <linux/types.h> |
15 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
@@ -30,13 +32,7 @@ | |||
30 | #include <asm/smu.h> | 32 | #include <asm/smu.h> |
31 | #include <asm/pmac_pfunc.h> | 33 | #include <asm/pmac_pfunc.h> |
32 | 34 | ||
33 | #undef DEBUG | 35 | #define DBG(fmt...) pr_debug(fmt) |
34 | |||
35 | #ifdef DEBUG | ||
36 | #define DBG(fmt...) printk(fmt) | ||
37 | #else | ||
38 | #define DBG(fmt...) | ||
39 | #endif | ||
40 | 36 | ||
41 | /* see 970FX user manual */ | 37 | /* see 970FX user manual */ |
42 | 38 | ||
@@ -82,8 +78,6 @@ static struct freq_attr* g5_cpu_freqs_attr[] = { | |||
82 | /* Power mode data is an array of the 32 bits PCR values to use for | 78 | /* Power mode data is an array of the 32 bits PCR values to use for |
83 | * the various frequencies, retrieved from the device-tree | 79 | * the various frequencies, retrieved from the device-tree |
84 | */ | 80 | */ |
85 | static u32 *g5_pmode_data; | ||
86 | static int g5_pmode_max; | ||
87 | static int g5_pmode_cur; | 81 | static int g5_pmode_cur; |
88 | 82 | ||
89 | static void (*g5_switch_volt)(int speed_mode); | 83 | static void (*g5_switch_volt)(int speed_mode); |
@@ -93,6 +87,11 @@ static int (*g5_query_freq)(void); | |||
93 | static DEFINE_MUTEX(g5_switch_mutex); | 87 | static DEFINE_MUTEX(g5_switch_mutex); |
94 | 88 | ||
95 | 89 | ||
90 | #ifdef CONFIG_PMAC_SMU | ||
91 | |||
92 | static u32 *g5_pmode_data; | ||
93 | static int g5_pmode_max; | ||
94 | |||
96 | static struct smu_sdbp_fvt *g5_fvt_table; /* table of op. points */ | 95 | static struct smu_sdbp_fvt *g5_fvt_table; /* table of op. points */ |
97 | static int g5_fvt_count; /* number of op. points */ | 96 | static int g5_fvt_count; /* number of op. points */ |
98 | static int g5_fvt_cur; /* current op. point */ | 97 | static int g5_fvt_cur; /* current op. point */ |
@@ -210,6 +209,16 @@ static int g5_scom_query_freq(void) | |||
210 | } | 209 | } |
211 | 210 | ||
212 | /* | 211 | /* |
212 | * Fake voltage switching for platforms with missing support | ||
213 | */ | ||
214 | |||
215 | static void g5_dummy_switch_volt(int speed_mode) | ||
216 | { | ||
217 | } | ||
218 | |||
219 | #endif /* CONFIG_PMAC_SMU */ | ||
220 | |||
221 | /* | ||
213 | * Platform function based voltage switching for PowerMac7,2 & 7,3 | 222 | * Platform function based voltage switching for PowerMac7,2 & 7,3 |
214 | */ | 223 | */ |
215 | 224 | ||
@@ -248,6 +257,9 @@ static int g5_pfunc_switch_freq(int speed_mode) | |||
248 | struct pmf_args args; | 257 | struct pmf_args args; |
249 | u32 done = 0; | 258 | u32 done = 0; |
250 | unsigned long timeout; | 259 | unsigned long timeout; |
260 | int rc; | ||
261 | |||
262 | DBG("g5_pfunc_switch_freq(%d)\n", speed_mode); | ||
251 | 263 | ||
252 | /* If frequency is going up, first ramp up the voltage */ | 264 | /* If frequency is going up, first ramp up the voltage */ |
253 | if (speed_mode < g5_pmode_cur) | 265 | if (speed_mode < g5_pmode_cur) |
@@ -255,9 +267,12 @@ static int g5_pfunc_switch_freq(int speed_mode) | |||
255 | 267 | ||
256 | /* Do it */ | 268 | /* Do it */ |
257 | if (speed_mode == CPUFREQ_HIGH) | 269 | if (speed_mode == CPUFREQ_HIGH) |
258 | pmf_call_one(pfunc_cpu_setfreq_high, NULL); | 270 | rc = pmf_call_one(pfunc_cpu_setfreq_high, NULL); |
259 | else | 271 | else |
260 | pmf_call_one(pfunc_cpu_setfreq_low, NULL); | 272 | rc = pmf_call_one(pfunc_cpu_setfreq_low, NULL); |
273 | |||
274 | if (rc) | ||
275 | printk(KERN_WARNING "cpufreq: pfunc switch error %d\n", rc); | ||
261 | 276 | ||
262 | /* It's an irq GPIO so we should be able to just block here, | 277 | /* It's an irq GPIO so we should be able to just block here, |
263 | * I'll do that later after I've properly tested the IRQ code for | 278 | * I'll do that later after I've properly tested the IRQ code for |
@@ -296,13 +311,6 @@ static int g5_pfunc_query_freq(void) | |||
296 | return val ? CPUFREQ_HIGH : CPUFREQ_LOW; | 311 | return val ? CPUFREQ_HIGH : CPUFREQ_LOW; |
297 | } | 312 | } |
298 | 313 | ||
299 | /* | ||
300 | * Fake voltage switching for platforms with missing support | ||
301 | */ | ||
302 | |||
303 | static void g5_dummy_switch_volt(int speed_mode) | ||
304 | { | ||
305 | } | ||
306 | 314 | ||
307 | /* | 315 | /* |
308 | * Common interface to the cpufreq core | 316 | * Common interface to the cpufreq core |
@@ -375,6 +383,8 @@ static struct cpufreq_driver g5_cpufreq_driver = { | |||
375 | }; | 383 | }; |
376 | 384 | ||
377 | 385 | ||
386 | #ifdef CONFIG_PMAC_SMU | ||
387 | |||
378 | static int __init g5_neo2_cpufreq_init(struct device_node *cpus) | 388 | static int __init g5_neo2_cpufreq_init(struct device_node *cpus) |
379 | { | 389 | { |
380 | struct device_node *cpunode; | 390 | struct device_node *cpunode; |
@@ -525,6 +535,9 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus) | |||
525 | return rc; | 535 | return rc; |
526 | } | 536 | } |
527 | 537 | ||
538 | #endif /* CONFIG_PMAC_SMU */ | ||
539 | |||
540 | |||
528 | static int __init g5_pm72_cpufreq_init(struct device_node *cpus) | 541 | static int __init g5_pm72_cpufreq_init(struct device_node *cpus) |
529 | { | 542 | { |
530 | struct device_node *cpuid = NULL, *hwclock = NULL, *cpunode = NULL; | 543 | struct device_node *cpuid = NULL, *hwclock = NULL, *cpunode = NULL; |
@@ -533,6 +546,9 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpus) | |||
533 | u64 max_freq, min_freq, ih, il; | 546 | u64 max_freq, min_freq, ih, il; |
534 | int has_volt = 1, rc = 0; | 547 | int has_volt = 1, rc = 0; |
535 | 548 | ||
549 | DBG("cpufreq: Initializing for PowerMac7,2, PowerMac7,3 and" | ||
550 | " RackMac3,1...\n"); | ||
551 | |||
536 | /* Get first CPU node */ | 552 | /* Get first CPU node */ |
537 | for (cpunode = NULL; | 553 | for (cpunode = NULL; |
538 | (cpunode = of_get_next_child(cpus, cpunode)) != NULL;) { | 554 | (cpunode = of_get_next_child(cpus, cpunode)) != NULL;) { |
@@ -636,6 +652,15 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpus) | |||
636 | */ | 652 | */ |
637 | ih = *((u32 *)(eeprom + 0x10)); | 653 | ih = *((u32 *)(eeprom + 0x10)); |
638 | il = *((u32 *)(eeprom + 0x20)); | 654 | il = *((u32 *)(eeprom + 0x20)); |
655 | |||
656 | /* Check for machines with no useful settings */ | ||
657 | if (il == ih) { | ||
658 | printk(KERN_WARNING "cpufreq: No low frequency mode available" | ||
659 | " on this model !\n"); | ||
660 | rc = -ENODEV; | ||
661 | goto bail; | ||
662 | } | ||
663 | |||
639 | min_freq = 0; | 664 | min_freq = 0; |
640 | if (ih != 0 && il != 0) | 665 | if (ih != 0 && il != 0) |
641 | min_freq = (max_freq * il) / ih; | 666 | min_freq = (max_freq * il) / ih; |
@@ -643,7 +668,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpus) | |||
643 | /* Sanity check */ | 668 | /* Sanity check */ |
644 | if (min_freq >= max_freq || min_freq < 1000) { | 669 | if (min_freq >= max_freq || min_freq < 1000) { |
645 | printk(KERN_ERR "cpufreq: Can't calculate low frequency !\n"); | 670 | printk(KERN_ERR "cpufreq: Can't calculate low frequency !\n"); |
646 | rc = -ENODEV; | 671 | rc = -ENXIO; |
647 | goto bail; | 672 | goto bail; |
648 | } | 673 | } |
649 | g5_cpu_freqs[0].frequency = max_freq; | 674 | g5_cpu_freqs[0].frequency = max_freq; |
@@ -690,16 +715,10 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpus) | |||
690 | return rc; | 715 | return rc; |
691 | } | 716 | } |
692 | 717 | ||
693 | static int __init g5_rm31_cpufreq_init(struct device_node *cpus) | ||
694 | { | ||
695 | /* NYI */ | ||
696 | return 0; | ||
697 | } | ||
698 | |||
699 | static int __init g5_cpufreq_init(void) | 718 | static int __init g5_cpufreq_init(void) |
700 | { | 719 | { |
701 | struct device_node *cpus; | 720 | struct device_node *cpus; |
702 | int rc; | 721 | int rc = 0; |
703 | 722 | ||
704 | cpus = of_find_node_by_path("/cpus"); | 723 | cpus = of_find_node_by_path("/cpus"); |
705 | if (cpus == NULL) { | 724 | if (cpus == NULL) { |
@@ -708,12 +727,13 @@ static int __init g5_cpufreq_init(void) | |||
708 | } | 727 | } |
709 | 728 | ||
710 | if (machine_is_compatible("PowerMac7,2") || | 729 | if (machine_is_compatible("PowerMac7,2") || |
711 | machine_is_compatible("PowerMac7,3")) | 730 | machine_is_compatible("PowerMac7,3") || |
731 | machine_is_compatible("RackMac3,1")) | ||
712 | rc = g5_pm72_cpufreq_init(cpus); | 732 | rc = g5_pm72_cpufreq_init(cpus); |
713 | else if (machine_is_compatible("RackMac3,1")) | 733 | #ifdef CONFIG_PMAC_SMU |
714 | rc = g5_rm31_cpufreq_init(cpus); | ||
715 | else | 734 | else |
716 | rc = g5_neo2_cpufreq_init(cpus); | 735 | rc = g5_neo2_cpufreq_init(cpus); |
736 | #endif /* CONFIG_PMAC_SMU */ | ||
717 | 737 | ||
718 | of_node_put(cpus); | 738 | of_node_put(cpus); |
719 | return rc; | 739 | return rc; |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 54a52437265c..71c634e0b87c 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -501,7 +501,8 @@ static void pseries_dedicated_idle_sleep(void) | |||
501 | } | 501 | } |
502 | 502 | ||
503 | /* | 503 | /* |
504 | * Cede if the other thread is not idle, so that it can | 504 | * If not SMT, cede processor. If CPU is running SMT |
505 | * cede if the other thread is not idle, so that it can | ||
505 | * go single-threaded. If the other thread is idle, | 506 | * go single-threaded. If the other thread is idle, |
506 | * we ask the hypervisor if it has pending work it | 507 | * we ask the hypervisor if it has pending work it |
507 | * wants to do and cede if it does. Otherwise we keep | 508 | * wants to do and cede if it does. Otherwise we keep |
@@ -514,7 +515,8 @@ static void pseries_dedicated_idle_sleep(void) | |||
514 | * very low priority. The cede enables interrupts, which | 515 | * very low priority. The cede enables interrupts, which |
515 | * doesn't matter here. | 516 | * doesn't matter here. |
516 | */ | 517 | */ |
517 | if (!lppaca[cpu ^ 1].idle || poll_pending() == H_PENDING) | 518 | if (!cpu_has_feature(CPU_FTR_SMT) || !lppaca[cpu ^ 1].idle |
519 | || poll_pending() == H_PENDING) | ||
518 | cede_processor(); | 520 | cede_processor(); |
519 | 521 | ||
520 | out: | 522 | out: |
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 556958ebbf03..b6fb167e20f6 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig | |||
@@ -774,20 +774,6 @@ config BLK_DEV_IDEDMA_PMAC | |||
774 | to transfer data to and from memory. Saying Y is safe and improves | 774 | to transfer data to and from memory. Saying Y is safe and improves |
775 | performance. | 775 | performance. |
776 | 776 | ||
777 | config BLK_DEV_IDE_PMAC_BLINK | ||
778 | bool "Blink laptop LED on drive activity (DEPRECATED)" | ||
779 | depends on BLK_DEV_IDE_PMAC && ADB_PMU | ||
780 | select ADB_PMU_LED | ||
781 | select LEDS_TRIGGERS | ||
782 | select LEDS_TRIGGER_IDE_DISK | ||
783 | help | ||
784 | This option enables the use of the sleep LED as a hard drive | ||
785 | activity LED. | ||
786 | This option is deprecated, it only selects ADB_PMU_LED and | ||
787 | LEDS_TRIGGER_IDE_DISK and changes the code in the new led class | ||
788 | device to default to the ide-disk trigger (which should be set | ||
789 | from userspace via sysfs). | ||
790 | |||
791 | config BLK_DEV_IDE_SWARM | 777 | config BLK_DEV_IDE_SWARM |
792 | tristate "IDE for Sibyte evaluation boards" | 778 | tristate "IDE for Sibyte evaluation boards" |
793 | depends on SIBYTE_SB1xxx_SOC | 779 | depends on SIBYTE_SB1xxx_SOC |
diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig index d162307e309f..d5d649f5ccdb 100644 --- a/drivers/macintosh/Kconfig +++ b/drivers/macintosh/Kconfig | |||
@@ -90,6 +90,15 @@ config ADB_PMU_LED | |||
90 | and the ide-disk LED trigger and configure appropriately through | 90 | and the ide-disk LED trigger and configure appropriately through |
91 | sysfs. | 91 | sysfs. |
92 | 92 | ||
93 | config ADB_PMU_LED_IDE | ||
94 | bool "Use front LED as IDE LED by default" | ||
95 | depends on ADB_PMU_LED | ||
96 | select LEDS_TRIGGERS | ||
97 | select LEDS_TRIGGER_IDE_DISK | ||
98 | help | ||
99 | This option makes the front LED default to the IDE trigger | ||
100 | so that it blinks on IDE activity. | ||
101 | |||
93 | config PMAC_SMU | 102 | config PMAC_SMU |
94 | bool "Support for SMU based PowerMacs" | 103 | bool "Support for SMU based PowerMacs" |
95 | depends on PPC_PMAC64 | 104 | depends on PPC_PMAC64 |
@@ -100,7 +109,7 @@ config PMAC_SMU | |||
100 | 109 | ||
101 | config PMAC_APM_EMU | 110 | config PMAC_APM_EMU |
102 | tristate "APM emulation" | 111 | tristate "APM emulation" |
103 | depends on PPC_PMAC && PPC32 && PM | 112 | depends on PPC_PMAC && PPC32 && PM && ADB_PMU |
104 | 113 | ||
105 | config PMAC_MEDIABAY | 114 | config PMAC_MEDIABAY |
106 | bool "Support PowerBook hotswap media bay" | 115 | bool "Support PowerBook hotswap media bay" |
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index c1fe0b368f76..20bf67244e2c 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c | |||
@@ -95,6 +95,17 @@ | |||
95 | * - Use min/max macros here or there | 95 | * - Use min/max macros here or there |
96 | * - Latest darwin updated U3H min fan speed to 20% PWM | 96 | * - Latest darwin updated U3H min fan speed to 20% PWM |
97 | * | 97 | * |
98 | * July. 06, 2006 : 1.3 | ||
99 | * - Fix setting of RPM fans on Xserve G5 (they were going too fast) | ||
100 | * - Add missing slots fan control loop for Xserve G5 | ||
101 | * - Lower fixed slots fan speed from 50% to 40% on desktop G5s. We | ||
102 | * still can't properly implement the control loop for these, so let's | ||
103 | * reduce the noise a little bit, it appears that 40% still gives us | ||
104 | * a pretty good air flow | ||
105 | * - Add code to "tickle" the FCU regulary so it doesn't think that | ||
106 | * we are gone while in fact, the machine just didn't need any fan | ||
107 | * speed change lately | ||
108 | * | ||
98 | */ | 109 | */ |
99 | 110 | ||
100 | #include <linux/types.h> | 111 | #include <linux/types.h> |
@@ -121,7 +132,7 @@ | |||
121 | 132 | ||
122 | #include "therm_pm72.h" | 133 | #include "therm_pm72.h" |
123 | 134 | ||
124 | #define VERSION "1.2b2" | 135 | #define VERSION "1.3" |
125 | 136 | ||
126 | #undef DEBUG | 137 | #undef DEBUG |
127 | 138 | ||
@@ -146,6 +157,7 @@ static struct basckside_pid_params backside_params; | |||
146 | static struct backside_pid_state backside_state; | 157 | static struct backside_pid_state backside_state; |
147 | static struct drives_pid_state drives_state; | 158 | static struct drives_pid_state drives_state; |
148 | static struct dimm_pid_state dimms_state; | 159 | static struct dimm_pid_state dimms_state; |
160 | static struct slots_pid_state slots_state; | ||
149 | static int state; | 161 | static int state; |
150 | static int cpu_count; | 162 | static int cpu_count; |
151 | static int cpu_pid_type; | 163 | static int cpu_pid_type; |
@@ -154,7 +166,8 @@ static struct completion ctrl_complete; | |||
154 | static int critical_state; | 166 | static int critical_state; |
155 | static int rackmac; | 167 | static int rackmac; |
156 | static s32 dimm_output_clamp; | 168 | static s32 dimm_output_clamp; |
157 | 169 | static int fcu_rpm_shift; | |
170 | static int fcu_tickle_ticks; | ||
158 | static DECLARE_MUTEX(driver_lock); | 171 | static DECLARE_MUTEX(driver_lock); |
159 | 172 | ||
160 | /* | 173 | /* |
@@ -495,13 +508,20 @@ static int start_fcu(void) | |||
495 | rc = fan_write_reg(0x2e, &buf, 1); | 508 | rc = fan_write_reg(0x2e, &buf, 1); |
496 | if (rc < 0) | 509 | if (rc < 0) |
497 | return -EIO; | 510 | return -EIO; |
511 | rc = fan_read_reg(0, &buf, 1); | ||
512 | if (rc < 0) | ||
513 | return -EIO; | ||
514 | fcu_rpm_shift = (buf == 1) ? 2 : 3; | ||
515 | printk(KERN_DEBUG "FCU Initialized, RPM fan shift is %d\n", | ||
516 | fcu_rpm_shift); | ||
517 | |||
498 | return 0; | 518 | return 0; |
499 | } | 519 | } |
500 | 520 | ||
501 | static int set_rpm_fan(int fan_index, int rpm) | 521 | static int set_rpm_fan(int fan_index, int rpm) |
502 | { | 522 | { |
503 | unsigned char buf[2]; | 523 | unsigned char buf[2]; |
504 | int rc, id; | 524 | int rc, id, min, max; |
505 | 525 | ||
506 | if (fcu_fans[fan_index].type != FCU_FAN_RPM) | 526 | if (fcu_fans[fan_index].type != FCU_FAN_RPM) |
507 | return -EINVAL; | 527 | return -EINVAL; |
@@ -509,12 +529,15 @@ static int set_rpm_fan(int fan_index, int rpm) | |||
509 | if (id == FCU_FAN_ABSENT_ID) | 529 | if (id == FCU_FAN_ABSENT_ID) |
510 | return -EINVAL; | 530 | return -EINVAL; |
511 | 531 | ||
512 | if (rpm < 300) | 532 | min = 2400 >> fcu_rpm_shift; |
513 | rpm = 300; | 533 | max = 56000 >> fcu_rpm_shift; |
514 | else if (rpm > 8191) | 534 | |
515 | rpm = 8191; | 535 | if (rpm < min) |
516 | buf[0] = rpm >> 5; | 536 | rpm = min; |
517 | buf[1] = rpm << 3; | 537 | else if (rpm > max) |
538 | rpm = max; | ||
539 | buf[0] = rpm >> (8 - fcu_rpm_shift); | ||
540 | buf[1] = rpm << fcu_rpm_shift; | ||
518 | rc = fan_write_reg(0x10 + (id * 2), buf, 2); | 541 | rc = fan_write_reg(0x10 + (id * 2), buf, 2); |
519 | if (rc < 0) | 542 | if (rc < 0) |
520 | return -EIO; | 543 | return -EIO; |
@@ -551,7 +574,7 @@ static int get_rpm_fan(int fan_index, int programmed) | |||
551 | if (rc != 2) | 574 | if (rc != 2) |
552 | return -EIO; | 575 | return -EIO; |
553 | 576 | ||
554 | return (buf[0] << 5) | buf[1] >> 3; | 577 | return (buf[0] << (8 - fcu_rpm_shift)) | buf[1] >> fcu_rpm_shift; |
555 | } | 578 | } |
556 | 579 | ||
557 | static int set_pwm_fan(int fan_index, int pwm) | 580 | static int set_pwm_fan(int fan_index, int pwm) |
@@ -609,6 +632,26 @@ static int get_pwm_fan(int fan_index) | |||
609 | return (buf[0] * 1000) / 2559; | 632 | return (buf[0] * 1000) / 2559; |
610 | } | 633 | } |
611 | 634 | ||
635 | static void tickle_fcu(void) | ||
636 | { | ||
637 | int pwm; | ||
638 | |||
639 | pwm = get_pwm_fan(SLOTS_FAN_PWM_INDEX); | ||
640 | |||
641 | DBG("FCU Tickle, slots fan is: %d\n", pwm); | ||
642 | if (pwm < 0) | ||
643 | pwm = 100; | ||
644 | |||
645 | if (!rackmac) { | ||
646 | pwm = SLOTS_FAN_DEFAULT_PWM; | ||
647 | } else if (pwm < SLOTS_PID_OUTPUT_MIN) | ||
648 | pwm = SLOTS_PID_OUTPUT_MIN; | ||
649 | |||
650 | /* That is hopefully enough to make the FCU happy */ | ||
651 | set_pwm_fan(SLOTS_FAN_PWM_INDEX, pwm); | ||
652 | } | ||
653 | |||
654 | |||
612 | /* | 655 | /* |
613 | * Utility routine to read the CPU calibration EEPROM data | 656 | * Utility routine to read the CPU calibration EEPROM data |
614 | * from the device-tree | 657 | * from the device-tree |
@@ -715,6 +758,9 @@ BUILD_SHOW_FUNC_INT(backside_fan_pwm, backside_state.pwm) | |||
715 | BUILD_SHOW_FUNC_FIX(drives_temperature, drives_state.last_temp) | 758 | BUILD_SHOW_FUNC_FIX(drives_temperature, drives_state.last_temp) |
716 | BUILD_SHOW_FUNC_INT(drives_fan_rpm, drives_state.rpm) | 759 | BUILD_SHOW_FUNC_INT(drives_fan_rpm, drives_state.rpm) |
717 | 760 | ||
761 | BUILD_SHOW_FUNC_FIX(slots_temperature, slots_state.last_temp) | ||
762 | BUILD_SHOW_FUNC_INT(slots_fan_pwm, slots_state.pwm) | ||
763 | |||
718 | BUILD_SHOW_FUNC_FIX(dimms_temperature, dimms_state.last_temp) | 764 | BUILD_SHOW_FUNC_FIX(dimms_temperature, dimms_state.last_temp) |
719 | 765 | ||
720 | static DEVICE_ATTR(cpu0_temperature,S_IRUGO,show_cpu0_temperature,NULL); | 766 | static DEVICE_ATTR(cpu0_temperature,S_IRUGO,show_cpu0_temperature,NULL); |
@@ -735,6 +781,9 @@ static DEVICE_ATTR(backside_fan_pwm,S_IRUGO,show_backside_fan_pwm,NULL); | |||
735 | static DEVICE_ATTR(drives_temperature,S_IRUGO,show_drives_temperature,NULL); | 781 | static DEVICE_ATTR(drives_temperature,S_IRUGO,show_drives_temperature,NULL); |
736 | static DEVICE_ATTR(drives_fan_rpm,S_IRUGO,show_drives_fan_rpm,NULL); | 782 | static DEVICE_ATTR(drives_fan_rpm,S_IRUGO,show_drives_fan_rpm,NULL); |
737 | 783 | ||
784 | static DEVICE_ATTR(slots_temperature,S_IRUGO,show_slots_temperature,NULL); | ||
785 | static DEVICE_ATTR(slots_fan_pwm,S_IRUGO,show_slots_fan_pwm,NULL); | ||
786 | |||
738 | static DEVICE_ATTR(dimms_temperature,S_IRUGO,show_dimms_temperature,NULL); | 787 | static DEVICE_ATTR(dimms_temperature,S_IRUGO,show_dimms_temperature,NULL); |
739 | 788 | ||
740 | /* | 789 | /* |
@@ -1076,6 +1125,9 @@ static void do_monitor_cpu_rack(struct cpu_pid_state *state) | |||
1076 | fan_min = dimm_output_clamp; | 1125 | fan_min = dimm_output_clamp; |
1077 | fan_min = max(fan_min, (int)state->mpu.rminn_intake_fan); | 1126 | fan_min = max(fan_min, (int)state->mpu.rminn_intake_fan); |
1078 | 1127 | ||
1128 | DBG(" CPU min mpu = %d, min dimm = %d\n", | ||
1129 | state->mpu.rminn_intake_fan, dimm_output_clamp); | ||
1130 | |||
1079 | state->rpm = max(state->rpm, (int)fan_min); | 1131 | state->rpm = max(state->rpm, (int)fan_min); |
1080 | state->rpm = min(state->rpm, (int)state->mpu.rmaxn_intake_fan); | 1132 | state->rpm = min(state->rpm, (int)state->mpu.rmaxn_intake_fan); |
1081 | state->intake_rpm = state->rpm; | 1133 | state->intake_rpm = state->rpm; |
@@ -1374,7 +1426,8 @@ static void do_monitor_drives(struct drives_pid_state *state) | |||
1374 | DBG(" current rpm: %d\n", state->rpm); | 1426 | DBG(" current rpm: %d\n", state->rpm); |
1375 | 1427 | ||
1376 | /* Get some sensor readings */ | 1428 | /* Get some sensor readings */ |
1377 | temp = le16_to_cpu(i2c_smbus_read_word_data(state->monitor, DS1775_TEMP)) << 8; | 1429 | temp = le16_to_cpu(i2c_smbus_read_word_data(state->monitor, |
1430 | DS1775_TEMP)) << 8; | ||
1378 | state->last_temp = temp; | 1431 | state->last_temp = temp; |
1379 | DBG(" temp: %d.%03d, target: %d.%03d\n", FIX32TOPRINT(temp), | 1432 | DBG(" temp: %d.%03d, target: %d.%03d\n", FIX32TOPRINT(temp), |
1380 | FIX32TOPRINT(DRIVES_PID_INPUT_TARGET)); | 1433 | FIX32TOPRINT(DRIVES_PID_INPUT_TARGET)); |
@@ -1575,7 +1628,7 @@ static int init_dimms_state(struct dimm_pid_state *state) | |||
1575 | } | 1628 | } |
1576 | 1629 | ||
1577 | /* | 1630 | /* |
1578 | * Dispose of the state data for the drives control loop | 1631 | * Dispose of the state data for the DIMM control loop |
1579 | */ | 1632 | */ |
1580 | static void dispose_dimms_state(struct dimm_pid_state *state) | 1633 | static void dispose_dimms_state(struct dimm_pid_state *state) |
1581 | { | 1634 | { |
@@ -1588,6 +1641,127 @@ static void dispose_dimms_state(struct dimm_pid_state *state) | |||
1588 | state->monitor = NULL; | 1641 | state->monitor = NULL; |
1589 | } | 1642 | } |
1590 | 1643 | ||
1644 | /* | ||
1645 | * Slots fan control loop | ||
1646 | */ | ||
1647 | static void do_monitor_slots(struct slots_pid_state *state) | ||
1648 | { | ||
1649 | s32 temp, integral, derivative; | ||
1650 | s64 integ_p, deriv_p, prop_p, sum; | ||
1651 | int i, rc; | ||
1652 | |||
1653 | if (--state->ticks != 0) | ||
1654 | return; | ||
1655 | state->ticks = SLOTS_PID_INTERVAL; | ||
1656 | |||
1657 | DBG("slots:\n"); | ||
1658 | |||
1659 | /* Check fan status */ | ||
1660 | rc = get_pwm_fan(SLOTS_FAN_PWM_INDEX); | ||
1661 | if (rc < 0) { | ||
1662 | printk(KERN_WARNING "Error %d reading slots fan !\n", rc); | ||
1663 | /* XXX What do we do now ? */ | ||
1664 | } else | ||
1665 | state->pwm = rc; | ||
1666 | DBG(" current pwm: %d\n", state->pwm); | ||
1667 | |||
1668 | /* Get some sensor readings */ | ||
1669 | temp = le16_to_cpu(i2c_smbus_read_word_data(state->monitor, | ||
1670 | DS1775_TEMP)) << 8; | ||
1671 | state->last_temp = temp; | ||
1672 | DBG(" temp: %d.%03d, target: %d.%03d\n", FIX32TOPRINT(temp), | ||
1673 | FIX32TOPRINT(SLOTS_PID_INPUT_TARGET)); | ||
1674 | |||
1675 | /* Store temperature and error in history array */ | ||
1676 | state->cur_sample = (state->cur_sample + 1) % SLOTS_PID_HISTORY_SIZE; | ||
1677 | state->sample_history[state->cur_sample] = temp; | ||
1678 | state->error_history[state->cur_sample] = temp - SLOTS_PID_INPUT_TARGET; | ||
1679 | |||
1680 | /* If first loop, fill the history table */ | ||
1681 | if (state->first) { | ||
1682 | for (i = 0; i < (SLOTS_PID_HISTORY_SIZE - 1); i++) { | ||
1683 | state->cur_sample = (state->cur_sample + 1) % | ||
1684 | SLOTS_PID_HISTORY_SIZE; | ||
1685 | state->sample_history[state->cur_sample] = temp; | ||
1686 | state->error_history[state->cur_sample] = | ||
1687 | temp - SLOTS_PID_INPUT_TARGET; | ||
1688 | } | ||
1689 | state->first = 0; | ||
1690 | } | ||
1691 | |||
1692 | /* Calculate the integral term */ | ||
1693 | sum = 0; | ||
1694 | integral = 0; | ||
1695 | for (i = 0; i < SLOTS_PID_HISTORY_SIZE; i++) | ||
1696 | integral += state->error_history[i]; | ||
1697 | integral *= SLOTS_PID_INTERVAL; | ||
1698 | DBG(" integral: %08x\n", integral); | ||
1699 | integ_p = ((s64)SLOTS_PID_G_r) * (s64)integral; | ||
1700 | DBG(" integ_p: %d\n", (int)(integ_p >> 36)); | ||
1701 | sum += integ_p; | ||
1702 | |||
1703 | /* Calculate the derivative term */ | ||
1704 | derivative = state->error_history[state->cur_sample] - | ||
1705 | state->error_history[(state->cur_sample + SLOTS_PID_HISTORY_SIZE - 1) | ||
1706 | % SLOTS_PID_HISTORY_SIZE]; | ||
1707 | derivative /= SLOTS_PID_INTERVAL; | ||
1708 | deriv_p = ((s64)SLOTS_PID_G_d) * (s64)derivative; | ||
1709 | DBG(" deriv_p: %d\n", (int)(deriv_p >> 36)); | ||
1710 | sum += deriv_p; | ||
1711 | |||
1712 | /* Calculate the proportional term */ | ||
1713 | prop_p = ((s64)SLOTS_PID_G_p) * (s64)(state->error_history[state->cur_sample]); | ||
1714 | DBG(" prop_p: %d\n", (int)(prop_p >> 36)); | ||
1715 | sum += prop_p; | ||
1716 | |||
1717 | /* Scale sum */ | ||
1718 | sum >>= 36; | ||
1719 | |||
1720 | DBG(" sum: %d\n", (int)sum); | ||
1721 | state->pwm = (s32)sum; | ||
1722 | |||
1723 | state->pwm = max(state->pwm, SLOTS_PID_OUTPUT_MIN); | ||
1724 | state->pwm = min(state->pwm, SLOTS_PID_OUTPUT_MAX); | ||
1725 | |||
1726 | DBG("** DRIVES PWM: %d\n", (int)state->pwm); | ||
1727 | set_pwm_fan(SLOTS_FAN_PWM_INDEX, state->pwm); | ||
1728 | } | ||
1729 | |||
1730 | /* | ||
1731 | * Initialize the state structure for the slots bay fan control loop | ||
1732 | */ | ||
1733 | static int init_slots_state(struct slots_pid_state *state) | ||
1734 | { | ||
1735 | state->ticks = 1; | ||
1736 | state->first = 1; | ||
1737 | state->pwm = 50; | ||
1738 | |||
1739 | state->monitor = attach_i2c_chip(XSERVE_SLOTS_LM75, "slots_temp"); | ||
1740 | if (state->monitor == NULL) | ||
1741 | return -ENODEV; | ||
1742 | |||
1743 | device_create_file(&of_dev->dev, &dev_attr_slots_temperature); | ||
1744 | device_create_file(&of_dev->dev, &dev_attr_slots_fan_pwm); | ||
1745 | |||
1746 | return 0; | ||
1747 | } | ||
1748 | |||
1749 | /* | ||
1750 | * Dispose of the state data for the slots control loop | ||
1751 | */ | ||
1752 | static void dispose_slots_state(struct slots_pid_state *state) | ||
1753 | { | ||
1754 | if (state->monitor == NULL) | ||
1755 | return; | ||
1756 | |||
1757 | device_remove_file(&of_dev->dev, &dev_attr_slots_temperature); | ||
1758 | device_remove_file(&of_dev->dev, &dev_attr_slots_fan_pwm); | ||
1759 | |||
1760 | detach_i2c_chip(state->monitor); | ||
1761 | state->monitor = NULL; | ||
1762 | } | ||
1763 | |||
1764 | |||
1591 | static int call_critical_overtemp(void) | 1765 | static int call_critical_overtemp(void) |
1592 | { | 1766 | { |
1593 | char *argv[] = { critical_overtemp_path, NULL }; | 1767 | char *argv[] = { critical_overtemp_path, NULL }; |
@@ -1617,14 +1791,17 @@ static int main_control_loop(void *x) | |||
1617 | goto out; | 1791 | goto out; |
1618 | } | 1792 | } |
1619 | 1793 | ||
1620 | /* Set the PCI fan once for now */ | 1794 | /* Set the PCI fan once for now on non-RackMac */ |
1621 | set_pwm_fan(SLOTS_FAN_PWM_INDEX, SLOTS_FAN_DEFAULT_PWM); | 1795 | if (!rackmac) |
1796 | set_pwm_fan(SLOTS_FAN_PWM_INDEX, SLOTS_FAN_DEFAULT_PWM); | ||
1622 | 1797 | ||
1623 | /* Initialize ADCs */ | 1798 | /* Initialize ADCs */ |
1624 | initialize_adc(&cpu_state[0]); | 1799 | initialize_adc(&cpu_state[0]); |
1625 | if (cpu_state[1].monitor != NULL) | 1800 | if (cpu_state[1].monitor != NULL) |
1626 | initialize_adc(&cpu_state[1]); | 1801 | initialize_adc(&cpu_state[1]); |
1627 | 1802 | ||
1803 | fcu_tickle_ticks = FCU_TICKLE_TICKS; | ||
1804 | |||
1628 | up(&driver_lock); | 1805 | up(&driver_lock); |
1629 | 1806 | ||
1630 | while (state == state_attached) { | 1807 | while (state == state_attached) { |
@@ -1634,6 +1811,12 @@ static int main_control_loop(void *x) | |||
1634 | 1811 | ||
1635 | down(&driver_lock); | 1812 | down(&driver_lock); |
1636 | 1813 | ||
1814 | /* Tickle the FCU just in case */ | ||
1815 | if (--fcu_tickle_ticks < 0) { | ||
1816 | fcu_tickle_ticks = FCU_TICKLE_TICKS; | ||
1817 | tickle_fcu(); | ||
1818 | } | ||
1819 | |||
1637 | /* First, we always calculate the new DIMMs state on an Xserve */ | 1820 | /* First, we always calculate the new DIMMs state on an Xserve */ |
1638 | if (rackmac) | 1821 | if (rackmac) |
1639 | do_monitor_dimms(&dimms_state); | 1822 | do_monitor_dimms(&dimms_state); |
@@ -1654,7 +1837,9 @@ static int main_control_loop(void *x) | |||
1654 | } | 1837 | } |
1655 | /* Then, the rest */ | 1838 | /* Then, the rest */ |
1656 | do_monitor_backside(&backside_state); | 1839 | do_monitor_backside(&backside_state); |
1657 | if (!rackmac) | 1840 | if (rackmac) |
1841 | do_monitor_slots(&slots_state); | ||
1842 | else | ||
1658 | do_monitor_drives(&drives_state); | 1843 | do_monitor_drives(&drives_state); |
1659 | up(&driver_lock); | 1844 | up(&driver_lock); |
1660 | 1845 | ||
@@ -1696,6 +1881,7 @@ static void dispose_control_loops(void) | |||
1696 | dispose_cpu_state(&cpu_state[1]); | 1881 | dispose_cpu_state(&cpu_state[1]); |
1697 | dispose_backside_state(&backside_state); | 1882 | dispose_backside_state(&backside_state); |
1698 | dispose_drives_state(&drives_state); | 1883 | dispose_drives_state(&drives_state); |
1884 | dispose_slots_state(&slots_state); | ||
1699 | dispose_dimms_state(&dimms_state); | 1885 | dispose_dimms_state(&dimms_state); |
1700 | } | 1886 | } |
1701 | 1887 | ||
@@ -1745,6 +1931,8 @@ static int create_control_loops(void) | |||
1745 | goto fail; | 1931 | goto fail; |
1746 | if (rackmac && init_dimms_state(&dimms_state)) | 1932 | if (rackmac && init_dimms_state(&dimms_state)) |
1747 | goto fail; | 1933 | goto fail; |
1934 | if (rackmac && init_slots_state(&slots_state)) | ||
1935 | goto fail; | ||
1748 | if (!rackmac && init_drives_state(&drives_state)) | 1936 | if (!rackmac && init_drives_state(&drives_state)) |
1749 | goto fail; | 1937 | goto fail; |
1750 | 1938 | ||
diff --git a/drivers/macintosh/therm_pm72.h b/drivers/macintosh/therm_pm72.h index fc7e9b7ecaf2..393cc9df94e1 100644 --- a/drivers/macintosh/therm_pm72.h +++ b/drivers/macintosh/therm_pm72.h | |||
@@ -105,6 +105,7 @@ static char * critical_overtemp_path = "/sbin/critical_overtemp"; | |||
105 | #define DRIVES_DALLAS_ID 0x94 | 105 | #define DRIVES_DALLAS_ID 0x94 |
106 | #define BACKSIDE_MAX_ID 0x98 | 106 | #define BACKSIDE_MAX_ID 0x98 |
107 | #define XSERVE_DIMMS_LM87 0x25a | 107 | #define XSERVE_DIMMS_LM87 0x25a |
108 | #define XSERVE_SLOTS_LM75 0x290 | ||
108 | 109 | ||
109 | /* | 110 | /* |
110 | * Some MAX6690, DS1775, LM87 register definitions | 111 | * Some MAX6690, DS1775, LM87 register definitions |
@@ -198,7 +199,7 @@ struct drives_pid_state | |||
198 | 199 | ||
199 | #define SLOTS_FAN_PWM_DEFAULT_ID 2 | 200 | #define SLOTS_FAN_PWM_DEFAULT_ID 2 |
200 | #define SLOTS_FAN_PWM_INDEX 2 | 201 | #define SLOTS_FAN_PWM_INDEX 2 |
201 | #define SLOTS_FAN_DEFAULT_PWM 50 /* Do better here ! */ | 202 | #define SLOTS_FAN_DEFAULT_PWM 40 /* Do better here ! */ |
202 | 203 | ||
203 | 204 | ||
204 | /* | 205 | /* |
@@ -206,7 +207,7 @@ struct drives_pid_state | |||
206 | */ | 207 | */ |
207 | #define DIMM_PID_G_d 0 | 208 | #define DIMM_PID_G_d 0 |
208 | #define DIMM_PID_G_p 0 | 209 | #define DIMM_PID_G_p 0 |
209 | #define DIMM_PID_G_r 0x6553600 | 210 | #define DIMM_PID_G_r 0x06553600 |
210 | #define DIMM_PID_INPUT_TARGET 3276800 | 211 | #define DIMM_PID_INPUT_TARGET 3276800 |
211 | #define DIMM_PID_INTERVAL 1 | 212 | #define DIMM_PID_INTERVAL 1 |
212 | #define DIMM_PID_OUTPUT_MAX 14000 | 213 | #define DIMM_PID_OUTPUT_MAX 14000 |
@@ -226,6 +227,31 @@ struct dimm_pid_state | |||
226 | }; | 227 | }; |
227 | 228 | ||
228 | 229 | ||
230 | /* | ||
231 | * PID factors for the Xserve Slots control loop | ||
232 | */ | ||
233 | #define SLOTS_PID_G_d 0 | ||
234 | #define SLOTS_PID_G_p 0 | ||
235 | #define SLOTS_PID_G_r 0x00100000 | ||
236 | #define SLOTS_PID_INPUT_TARGET 3200000 | ||
237 | #define SLOTS_PID_INTERVAL 1 | ||
238 | #define SLOTS_PID_OUTPUT_MAX 100 | ||
239 | #define SLOTS_PID_OUTPUT_MIN 20 | ||
240 | #define SLOTS_PID_HISTORY_SIZE 20 | ||
241 | |||
242 | struct slots_pid_state | ||
243 | { | ||
244 | int ticks; | ||
245 | struct i2c_client * monitor; | ||
246 | s32 sample_history[SLOTS_PID_HISTORY_SIZE]; | ||
247 | s32 error_history[SLOTS_PID_HISTORY_SIZE]; | ||
248 | int cur_sample; | ||
249 | s32 last_temp; | ||
250 | int first; | ||
251 | int pwm; | ||
252 | }; | ||
253 | |||
254 | |||
229 | 255 | ||
230 | /* Desktops */ | 256 | /* Desktops */ |
231 | 257 | ||
@@ -283,6 +309,9 @@ struct cpu_pid_state | |||
283 | s32 pump_max; | 309 | s32 pump_max; |
284 | }; | 310 | }; |
285 | 311 | ||
312 | /* Tickle FCU every 10 seconds */ | ||
313 | #define FCU_TICKLE_TICKS 10 | ||
314 | |||
286 | /* | 315 | /* |
287 | * Driver state | 316 | * Driver state |
288 | */ | 317 | */ |
diff --git a/drivers/macintosh/via-pmu-led.c b/drivers/macintosh/via-pmu-led.c index af8375ed0f5e..5189d5454b1f 100644 --- a/drivers/macintosh/via-pmu-led.c +++ b/drivers/macintosh/via-pmu-led.c | |||
@@ -74,7 +74,7 @@ static void pmu_led_set(struct led_classdev *led_cdev, | |||
74 | 74 | ||
75 | static struct led_classdev pmu_led = { | 75 | static struct led_classdev pmu_led = { |
76 | .name = "pmu-front-led", | 76 | .name = "pmu-front-led", |
77 | #ifdef CONFIG_BLK_DEV_IDE_PMAC_BLINK | 77 | #ifdef CONFIG_ADB_PMU_LED_IDE |
78 | .default_trigger = "ide-disk", | 78 | .default_trigger = "ide-disk", |
79 | #endif | 79 | #endif |
80 | .brightness_set = pmu_led_set, | 80 | .brightness_set = pmu_led_set, |
diff --git a/drivers/video/offb.c b/drivers/video/offb.c index ce5f3031b99b..0013311e0564 100644 --- a/drivers/video/offb.c +++ b/drivers/video/offb.c | |||
@@ -62,8 +62,6 @@ struct offb_par default_par; | |||
62 | * Interface used by the world | 62 | * Interface used by the world |
63 | */ | 63 | */ |
64 | 64 | ||
65 | int offb_init(void); | ||
66 | |||
67 | static int offb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, | 65 | static int offb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, |
68 | u_int transp, struct fb_info *info); | 66 | u_int transp, struct fb_info *info); |
69 | static int offb_blank(int blank, struct fb_info *info); | 67 | static int offb_blank(int blank, struct fb_info *info); |
@@ -72,11 +70,6 @@ static int offb_blank(int blank, struct fb_info *info); | |||
72 | extern boot_infos_t *boot_infos; | 70 | extern boot_infos_t *boot_infos; |
73 | #endif | 71 | #endif |
74 | 72 | ||
75 | static void offb_init_nodriver(struct device_node *); | ||
76 | static void offb_init_fb(const char *name, const char *full_name, | ||
77 | int width, int height, int depth, int pitch, | ||
78 | unsigned long address, struct device_node *dp); | ||
79 | |||
80 | static struct fb_ops offb_ops = { | 73 | static struct fb_ops offb_ops = { |
81 | .owner = THIS_MODULE, | 74 | .owner = THIS_MODULE, |
82 | .fb_setcolreg = offb_setcolreg, | 75 | .fb_setcolreg = offb_setcolreg, |
@@ -229,123 +222,17 @@ static int offb_blank(int blank, struct fb_info *info) | |||
229 | return 0; | 222 | return 0; |
230 | } | 223 | } |
231 | 224 | ||
232 | /* | ||
233 | * Initialisation | ||
234 | */ | ||
235 | 225 | ||
236 | int __init offb_init(void) | 226 | static void __iomem *offb_map_reg(struct device_node *np, int index, |
227 | unsigned long offset, unsigned long size) | ||
237 | { | 228 | { |
238 | struct device_node *dp = NULL, *boot_disp = NULL; | 229 | struct resource r; |
239 | |||
240 | if (fb_get_options("offb", NULL)) | ||
241 | return -ENODEV; | ||
242 | 230 | ||
243 | for (dp = NULL; (dp = of_find_node_by_type(dp, "display"));) { | 231 | if (of_address_to_resource(np, index, &r)) |
244 | if (get_property(dp, "linux,opened", NULL) && | 232 | return 0; |
245 | get_property(dp, "linux,boot-display", NULL)) { | 233 | if ((r.start + offset + size) > r.end) |
246 | boot_disp = dp; | 234 | return 0; |
247 | offb_init_nodriver(dp); | 235 | return ioremap(r.start + offset, size); |
248 | } | ||
249 | } | ||
250 | for (dp = NULL; (dp = of_find_node_by_type(dp, "display"));) { | ||
251 | if (get_property(dp, "linux,opened", NULL) && | ||
252 | dp != boot_disp) | ||
253 | offb_init_nodriver(dp); | ||
254 | } | ||
255 | |||
256 | return 0; | ||
257 | } | ||
258 | |||
259 | |||
260 | static void __init offb_init_nodriver(struct device_node *dp) | ||
261 | { | ||
262 | unsigned int len; | ||
263 | int i, width = 640, height = 480, depth = 8, pitch = 640; | ||
264 | unsigned int flags, rsize, addr_prop = 0; | ||
265 | unsigned long max_size = 0; | ||
266 | u64 rstart, address = OF_BAD_ADDR; | ||
267 | u32 *pp, *addrp, *up; | ||
268 | u64 asize; | ||
269 | |||
270 | pp = (u32 *)get_property(dp, "linux,bootx-depth", &len); | ||
271 | if (pp == NULL) | ||
272 | pp = (u32 *)get_property(dp, "depth", &len); | ||
273 | if (pp && len == sizeof(u32)) | ||
274 | depth = *pp; | ||
275 | |||
276 | pp = (u32 *)get_property(dp, "linux,bootx-width", &len); | ||
277 | if (pp == NULL) | ||
278 | pp = (u32 *)get_property(dp, "width", &len); | ||
279 | if (pp && len == sizeof(u32)) | ||
280 | width = *pp; | ||
281 | |||
282 | pp = (u32 *)get_property(dp, "linux,bootx-height", &len); | ||
283 | if (pp == NULL) | ||
284 | pp = (u32 *)get_property(dp, "height", &len); | ||
285 | if (pp && len == sizeof(u32)) | ||
286 | height = *pp; | ||
287 | |||
288 | pp = (u32 *)get_property(dp, "linux,bootx-linebytes", &len); | ||
289 | if (pp == NULL) | ||
290 | pp = (u32 *)get_property(dp, "linebytes", &len); | ||
291 | if (pp && len == sizeof(u32)) | ||
292 | pitch = *pp; | ||
293 | else | ||
294 | pitch = width * ((depth + 7) / 8); | ||
295 | |||
296 | rsize = (unsigned long)pitch * (unsigned long)height; | ||
297 | |||
298 | /* Ok, now we try to figure out the address of the framebuffer. | ||
299 | * | ||
300 | * Unfortunately, Open Firmware doesn't provide a standard way to do | ||
301 | * so. All we can do is a dodgy heuristic that happens to work in | ||
302 | * practice. On most machines, the "address" property contains what | ||
303 | * we need, though not on Matrox cards found in IBM machines. What I've | ||
304 | * found that appears to give good results is to go through the PCI | ||
305 | * ranges and pick one that is both big enough and if possible encloses | ||
306 | * the "address" property. If none match, we pick the biggest | ||
307 | */ | ||
308 | up = (u32 *)get_property(dp, "linux,bootx-addr", &len); | ||
309 | if (up == NULL) | ||
310 | up = (u32 *)get_property(dp, "address", &len); | ||
311 | if (up && len == sizeof(u32)) | ||
312 | addr_prop = *up; | ||
313 | |||
314 | for (i = 0; (addrp = of_get_address(dp, i, &asize, &flags)) | ||
315 | != NULL; i++) { | ||
316 | int match_addrp = 0; | ||
317 | |||
318 | if (!(flags & IORESOURCE_MEM)) | ||
319 | continue; | ||
320 | if (asize < rsize) | ||
321 | continue; | ||
322 | rstart = of_translate_address(dp, addrp); | ||
323 | if (rstart == OF_BAD_ADDR) | ||
324 | continue; | ||
325 | if (addr_prop && (rstart <= addr_prop) && | ||
326 | ((rstart + asize) >= (addr_prop + rsize))) | ||
327 | match_addrp = 1; | ||
328 | if (match_addrp) { | ||
329 | address = addr_prop; | ||
330 | break; | ||
331 | } | ||
332 | if (rsize > max_size) { | ||
333 | max_size = rsize; | ||
334 | address = OF_BAD_ADDR; | ||
335 | } | ||
336 | |||
337 | if (address == OF_BAD_ADDR) | ||
338 | address = rstart; | ||
339 | } | ||
340 | if (address == OF_BAD_ADDR && addr_prop) | ||
341 | address = (u64)addr_prop; | ||
342 | if (address != OF_BAD_ADDR) { | ||
343 | /* kludge for valkyrie */ | ||
344 | if (strcmp(dp->name, "valkyrie") == 0) | ||
345 | address += 0x1000; | ||
346 | offb_init_fb(dp->name, dp->full_name, width, height, depth, | ||
347 | pitch, address, dp); | ||
348 | } | ||
349 | } | 236 | } |
350 | 237 | ||
351 | static void __init offb_init_fb(const char *name, const char *full_name, | 238 | static void __init offb_init_fb(const char *name, const char *full_name, |
@@ -402,45 +289,39 @@ static void __init offb_init_fb(const char *name, const char *full_name, | |||
402 | 289 | ||
403 | par->cmap_type = cmap_unknown; | 290 | par->cmap_type = cmap_unknown; |
404 | if (depth == 8) { | 291 | if (depth == 8) { |
405 | |||
406 | /* Palette hacks disabled for now */ | 292 | /* Palette hacks disabled for now */ |
407 | #if 0 | ||
408 | if (dp && !strncmp(name, "ATY,Rage128", 11)) { | 293 | if (dp && !strncmp(name, "ATY,Rage128", 11)) { |
409 | unsigned long regbase = dp->addrs[2].address; | 294 | par->cmap_adr = offb_map_reg(dp, 2, 0, 0x1fff); |
410 | par->cmap_adr = ioremap(regbase, 0x1FFF); | 295 | if (par->cmap_adr) |
411 | par->cmap_type = cmap_r128; | 296 | par->cmap_type = cmap_r128; |
412 | } else if (dp && (!strncmp(name, "ATY,RageM3pA", 12) | 297 | } else if (dp && (!strncmp(name, "ATY,RageM3pA", 12) |
413 | || !strncmp(name, "ATY,RageM3p12A", 14))) { | 298 | || !strncmp(name, "ATY,RageM3p12A", 14))) { |
414 | unsigned long regbase = | 299 | par->cmap_adr = offb_map_reg(dp, 2, 0, 0x1fff); |
415 | dp->parent->addrs[2].address; | 300 | if (par->cmap_adr) |
416 | par->cmap_adr = ioremap(regbase, 0x1FFF); | 301 | par->cmap_type = cmap_M3A; |
417 | par->cmap_type = cmap_M3A; | ||
418 | } else if (dp && !strncmp(name, "ATY,RageM3pB", 12)) { | 302 | } else if (dp && !strncmp(name, "ATY,RageM3pB", 12)) { |
419 | unsigned long regbase = | 303 | par->cmap_adr = offb_map_reg(dp, 2, 0, 0x1fff); |
420 | dp->parent->addrs[2].address; | 304 | if (par->cmap_adr) |
421 | par->cmap_adr = ioremap(regbase, 0x1FFF); | 305 | par->cmap_type = cmap_M3B; |
422 | par->cmap_type = cmap_M3B; | ||
423 | } else if (dp && !strncmp(name, "ATY,Rage6", 9)) { | 306 | } else if (dp && !strncmp(name, "ATY,Rage6", 9)) { |
424 | unsigned long regbase = dp->addrs[1].address; | 307 | par->cmap_adr = offb_map_reg(dp, 1, 0, 0x1fff); |
425 | par->cmap_adr = ioremap(regbase, 0x1FFF); | 308 | if (par->cmap_adr) |
426 | par->cmap_type = cmap_radeon; | 309 | par->cmap_type = cmap_radeon; |
427 | } else if (!strncmp(name, "ATY,", 4)) { | 310 | } else if (!strncmp(name, "ATY,", 4)) { |
428 | unsigned long base = address & 0xff000000UL; | 311 | unsigned long base = address & 0xff000000UL; |
429 | par->cmap_adr = | 312 | par->cmap_adr = |
430 | ioremap(base + 0x7ff000, 0x1000) + 0xcc0; | 313 | ioremap(base + 0x7ff000, 0x1000) + 0xcc0; |
431 | par->cmap_data = par->cmap_adr + 1; | 314 | par->cmap_data = par->cmap_adr + 1; |
432 | par->cmap_type = cmap_m64; | 315 | par->cmap_type = cmap_m64; |
433 | } else if (device_is_compatible(dp, "pci1014,b7")) { | 316 | } else if (dp && device_is_compatible(dp, "pci1014,b7")) { |
434 | unsigned long regbase = dp->addrs[0].address; | 317 | par->cmap_adr = offb_map_reg(dp, 0, 0x6000, 0x1000); |
435 | par->cmap_adr = ioremap(regbase + 0x6000, 0x1000); | 318 | if (par->cmap_adr) |
436 | par->cmap_type = cmap_gxt2000; | 319 | par->cmap_type = cmap_gxt2000; |
437 | } | 320 | } |
438 | #endif | 321 | fix->visual = (par->cmap_type != cmap_unknown) ? |
439 | fix->visual = par->cmap_adr ? FB_VISUAL_PSEUDOCOLOR | 322 | FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_STATIC_PSEUDOCOLOR; |
440 | : FB_VISUAL_STATIC_PSEUDOCOLOR; | ||
441 | } else | 323 | } else |
442 | fix->visual = /* par->cmap_adr ? FB_VISUAL_DIRECTCOLOR | 324 | fix->visual = FB_VISUAL_TRUECOLOR; |
443 | : */ FB_VISUAL_TRUECOLOR; | ||
444 | 325 | ||
445 | var->xoffset = var->yoffset = 0; | 326 | var->xoffset = var->yoffset = 0; |
446 | switch (depth) { | 327 | switch (depth) { |
@@ -520,5 +401,139 @@ static void __init offb_init_fb(const char *name, const char *full_name, | |||
520 | info->node, full_name); | 401 | info->node, full_name); |
521 | } | 402 | } |
522 | 403 | ||
404 | |||
405 | static void __init offb_init_nodriver(struct device_node *dp, int no_real_node) | ||
406 | { | ||
407 | unsigned int len; | ||
408 | int i, width = 640, height = 480, depth = 8, pitch = 640; | ||
409 | unsigned int flags, rsize, addr_prop = 0; | ||
410 | unsigned long max_size = 0; | ||
411 | u64 rstart, address = OF_BAD_ADDR; | ||
412 | u32 *pp, *addrp, *up; | ||
413 | u64 asize; | ||
414 | |||
415 | pp = (u32 *)get_property(dp, "linux,bootx-depth", &len); | ||
416 | if (pp == NULL) | ||
417 | pp = (u32 *)get_property(dp, "depth", &len); | ||
418 | if (pp && len == sizeof(u32)) | ||
419 | depth = *pp; | ||
420 | |||
421 | pp = (u32 *)get_property(dp, "linux,bootx-width", &len); | ||
422 | if (pp == NULL) | ||
423 | pp = (u32 *)get_property(dp, "width", &len); | ||
424 | if (pp && len == sizeof(u32)) | ||
425 | width = *pp; | ||
426 | |||
427 | pp = (u32 *)get_property(dp, "linux,bootx-height", &len); | ||
428 | if (pp == NULL) | ||
429 | pp = (u32 *)get_property(dp, "height", &len); | ||
430 | if (pp && len == sizeof(u32)) | ||
431 | height = *pp; | ||
432 | |||
433 | pp = (u32 *)get_property(dp, "linux,bootx-linebytes", &len); | ||
434 | if (pp == NULL) | ||
435 | pp = (u32 *)get_property(dp, "linebytes", &len); | ||
436 | if (pp && len == sizeof(u32)) | ||
437 | pitch = *pp; | ||
438 | else | ||
439 | pitch = width * ((depth + 7) / 8); | ||
440 | |||
441 | rsize = (unsigned long)pitch * (unsigned long)height; | ||
442 | |||
443 | /* Ok, now we try to figure out the address of the framebuffer. | ||
444 | * | ||
445 | * Unfortunately, Open Firmware doesn't provide a standard way to do | ||
446 | * so. All we can do is a dodgy heuristic that happens to work in | ||
447 | * practice. On most machines, the "address" property contains what | ||
448 | * we need, though not on Matrox cards found in IBM machines. What I've | ||
449 | * found that appears to give good results is to go through the PCI | ||
450 | * ranges and pick one that is both big enough and if possible encloses | ||
451 | * the "address" property. If none match, we pick the biggest | ||
452 | */ | ||
453 | up = (u32 *)get_property(dp, "linux,bootx-addr", &len); | ||
454 | if (up == NULL) | ||
455 | up = (u32 *)get_property(dp, "address", &len); | ||
456 | if (up && len == sizeof(u32)) | ||
457 | addr_prop = *up; | ||
458 | |||
459 | /* Hack for when BootX is passing us */ | ||
460 | if (no_real_node) | ||
461 | goto skip_addr; | ||
462 | |||
463 | for (i = 0; (addrp = of_get_address(dp, i, &asize, &flags)) | ||
464 | != NULL; i++) { | ||
465 | int match_addrp = 0; | ||
466 | |||
467 | if (!(flags & IORESOURCE_MEM)) | ||
468 | continue; | ||
469 | if (asize < rsize) | ||
470 | continue; | ||
471 | rstart = of_translate_address(dp, addrp); | ||
472 | if (rstart == OF_BAD_ADDR) | ||
473 | continue; | ||
474 | if (addr_prop && (rstart <= addr_prop) && | ||
475 | ((rstart + asize) >= (addr_prop + rsize))) | ||
476 | match_addrp = 1; | ||
477 | if (match_addrp) { | ||
478 | address = addr_prop; | ||
479 | break; | ||
480 | } | ||
481 | if (rsize > max_size) { | ||
482 | max_size = rsize; | ||
483 | address = OF_BAD_ADDR; | ||
484 | } | ||
485 | |||
486 | if (address == OF_BAD_ADDR) | ||
487 | address = rstart; | ||
488 | } | ||
489 | skip_addr: | ||
490 | if (address == OF_BAD_ADDR && addr_prop) | ||
491 | address = (u64)addr_prop; | ||
492 | if (address != OF_BAD_ADDR) { | ||
493 | /* kludge for valkyrie */ | ||
494 | if (strcmp(dp->name, "valkyrie") == 0) | ||
495 | address += 0x1000; | ||
496 | offb_init_fb(no_real_node ? "bootx" : dp->name, | ||
497 | no_real_node ? "display" : dp->full_name, | ||
498 | width, height, depth, pitch, address, | ||
499 | no_real_node ? dp : NULL); | ||
500 | } | ||
501 | } | ||
502 | |||
503 | static int __init offb_init(void) | ||
504 | { | ||
505 | struct device_node *dp = NULL, *boot_disp = NULL; | ||
506 | |||
507 | if (fb_get_options("offb", NULL)) | ||
508 | return -ENODEV; | ||
509 | |||
510 | /* Check if we have a MacOS display without a node spec */ | ||
511 | if (get_property(of_chosen, "linux,bootx-noscreen", NULL) != NULL) { | ||
512 | /* The old code tried to work out which node was the MacOS | ||
513 | * display based on the address. I'm dropping that since the | ||
514 | * lack of a node spec only happens with old BootX versions | ||
515 | * (users can update) and with this code, they'll still get | ||
516 | * a display (just not the palette hacks). | ||
517 | */ | ||
518 | offb_init_nodriver(of_chosen, 1); | ||
519 | } | ||
520 | |||
521 | for (dp = NULL; (dp = of_find_node_by_type(dp, "display"));) { | ||
522 | if (get_property(dp, "linux,opened", NULL) && | ||
523 | get_property(dp, "linux,boot-display", NULL)) { | ||
524 | boot_disp = dp; | ||
525 | offb_init_nodriver(dp, 0); | ||
526 | } | ||
527 | } | ||
528 | for (dp = NULL; (dp = of_find_node_by_type(dp, "display"));) { | ||
529 | if (get_property(dp, "linux,opened", NULL) && | ||
530 | dp != boot_disp) | ||
531 | offb_init_nodriver(dp, 0); | ||
532 | } | ||
533 | |||
534 | return 0; | ||
535 | } | ||
536 | |||
537 | |||
523 | module_init(offb_init); | 538 | module_init(offb_init); |
524 | MODULE_LICENSE("GPL"); | 539 | MODULE_LICENSE("GPL"); |