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

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