diff options
90 files changed, 1284 insertions, 656 deletions
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index ac1be25c1e25..e9a3cb1d6b06 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt | |||
| @@ -1645,8 +1645,9 @@ platforms are moved over to use the flattened-device-tree model. | |||
| 1645 | MAC addresses passed by the firmware when no information other | 1645 | MAC addresses passed by the firmware when no information other |
| 1646 | than indices is available to associate an address with a device. | 1646 | than indices is available to associate an address with a device. |
| 1647 | - phy-connection-type : a string naming the controller/PHY interface type, | 1647 | - phy-connection-type : a string naming the controller/PHY interface type, |
| 1648 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "tbi", | 1648 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal |
| 1649 | or "rtbi". | 1649 | Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only), |
| 1650 | "tbi", or "rtbi". | ||
| 1650 | 1651 | ||
| 1651 | Example: | 1652 | Example: |
| 1652 | ucc@2000 { | 1653 | ucc@2000 { |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 2f2ce0c28bc0..455bd1f560aa 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
| @@ -22,6 +22,7 @@ config MACH_ALCHEMY | |||
| 22 | config BASLER_EXCITE | 22 | config BASLER_EXCITE |
| 23 | bool "Basler eXcite smart camera" | 23 | bool "Basler eXcite smart camera" |
| 24 | select CEVT_R4K | 24 | select CEVT_R4K |
| 25 | select CSRC_R4K | ||
| 25 | select DMA_COHERENT | 26 | select DMA_COHERENT |
| 26 | select HW_HAS_PCI | 27 | select HW_HAS_PCI |
| 27 | select IRQ_CPU | 28 | select IRQ_CPU |
| @@ -49,6 +50,7 @@ config BASLER_EXCITE_PROTOTYPE | |||
| 49 | config BCM47XX | 50 | config BCM47XX |
| 50 | bool "BCM47XX based boards" | 51 | bool "BCM47XX based boards" |
| 51 | select CEVT_R4K | 52 | select CEVT_R4K |
| 53 | select CSRC_R4K | ||
| 52 | select DMA_NONCOHERENT | 54 | select DMA_NONCOHERENT |
| 53 | select HW_HAS_PCI | 55 | select HW_HAS_PCI |
| 54 | select IRQ_CPU | 56 | select IRQ_CPU |
| @@ -66,6 +68,7 @@ config BCM47XX | |||
| 66 | config MIPS_COBALT | 68 | config MIPS_COBALT |
| 67 | bool "Cobalt Server" | 69 | bool "Cobalt Server" |
| 68 | select CEVT_R4K | 70 | select CEVT_R4K |
| 71 | select CSRC_R4K | ||
| 69 | select CEVT_GT641XX | 72 | select CEVT_GT641XX |
| 70 | select DMA_NONCOHERENT | 73 | select DMA_NONCOHERENT |
| 71 | select HW_HAS_PCI | 74 | select HW_HAS_PCI |
| @@ -85,6 +88,7 @@ config MACH_DECSTATION | |||
| 85 | bool "DECstations" | 88 | bool "DECstations" |
| 86 | select BOOT_ELF32 | 89 | select BOOT_ELF32 |
| 87 | select CEVT_R4K | 90 | select CEVT_R4K |
| 91 | select CSRC_R4K | ||
| 88 | select DMA_NONCOHERENT | 92 | select DMA_NONCOHERENT |
| 89 | select NO_IOPORT | 93 | select NO_IOPORT |
| 90 | select IRQ_CPU | 94 | select IRQ_CPU |
| @@ -117,6 +121,7 @@ config MACH_JAZZ | |||
| 117 | select ARC32 | 121 | select ARC32 |
| 118 | select ARCH_MAY_HAVE_PC_FDC | 122 | select ARCH_MAY_HAVE_PC_FDC |
| 119 | select CEVT_R4K | 123 | select CEVT_R4K |
| 124 | select CSRC_R4K | ||
| 120 | select GENERIC_ISA_DMA | 125 | select GENERIC_ISA_DMA |
| 121 | select IRQ_CPU | 126 | select IRQ_CPU |
| 122 | select I8253 | 127 | select I8253 |
| @@ -137,6 +142,7 @@ config MACH_JAZZ | |||
| 137 | config LASAT | 142 | config LASAT |
| 138 | bool "LASAT Networks platforms" | 143 | bool "LASAT Networks platforms" |
| 139 | select CEVT_R4K | 144 | select CEVT_R4K |
| 145 | select CSRC_R4K | ||
| 140 | select DMA_NONCOHERENT | 146 | select DMA_NONCOHERENT |
| 141 | select SYS_HAS_EARLY_PRINTK | 147 | select SYS_HAS_EARLY_PRINTK |
| 142 | select HW_HAS_PCI | 148 | select HW_HAS_PCI |
| @@ -154,6 +160,7 @@ config LEMOTE_FULONG | |||
| 154 | bool "Lemote Fulong mini-PC" | 160 | bool "Lemote Fulong mini-PC" |
| 155 | select ARCH_SPARSEMEM_ENABLE | 161 | select ARCH_SPARSEMEM_ENABLE |
| 156 | select CEVT_R4K | 162 | select CEVT_R4K |
| 163 | select CSRC_R4K | ||
| 157 | select SYS_HAS_CPU_LOONGSON2 | 164 | select SYS_HAS_CPU_LOONGSON2 |
| 158 | select DMA_NONCOHERENT | 165 | select DMA_NONCOHERENT |
| 159 | select BOOT_ELF32 | 166 | select BOOT_ELF32 |
| @@ -179,6 +186,7 @@ config MIPS_ATLAS | |||
| 179 | bool "MIPS Atlas board" | 186 | bool "MIPS Atlas board" |
| 180 | select BOOT_ELF32 | 187 | select BOOT_ELF32 |
| 181 | select CEVT_R4K | 188 | select CEVT_R4K |
| 189 | select CSRC_R4K | ||
| 182 | select DMA_NONCOHERENT | 190 | select DMA_NONCOHERENT |
| 183 | select SYS_HAS_EARLY_PRINTK | 191 | select SYS_HAS_EARLY_PRINTK |
| 184 | select IRQ_CPU | 192 | select IRQ_CPU |
| @@ -210,6 +218,7 @@ config MIPS_MALTA | |||
| 210 | select ARCH_MAY_HAVE_PC_FDC | 218 | select ARCH_MAY_HAVE_PC_FDC |
| 211 | select BOOT_ELF32 | 219 | select BOOT_ELF32 |
| 212 | select CEVT_R4K | 220 | select CEVT_R4K |
| 221 | select CSRC_R4K | ||
| 213 | select DMA_NONCOHERENT | 222 | select DMA_NONCOHERENT |
| 214 | select GENERIC_ISA_DMA | 223 | select GENERIC_ISA_DMA |
| 215 | select IRQ_CPU | 224 | select IRQ_CPU |
| @@ -241,6 +250,7 @@ config MIPS_MALTA | |||
| 241 | config MIPS_SEAD | 250 | config MIPS_SEAD |
| 242 | bool "MIPS SEAD board" | 251 | bool "MIPS SEAD board" |
| 243 | select CEVT_R4K | 252 | select CEVT_R4K |
| 253 | select CSRC_R4K | ||
| 244 | select IRQ_CPU | 254 | select IRQ_CPU |
| 245 | select DMA_NONCOHERENT | 255 | select DMA_NONCOHERENT |
| 246 | select SYS_HAS_EARLY_PRINTK | 256 | select SYS_HAS_EARLY_PRINTK |
| @@ -260,6 +270,7 @@ config MIPS_SEAD | |||
| 260 | config MIPS_SIM | 270 | config MIPS_SIM |
| 261 | bool 'MIPS simulator (MIPSsim)' | 271 | bool 'MIPS simulator (MIPSsim)' |
| 262 | select CEVT_R4K | 272 | select CEVT_R4K |
| 273 | select CSRC_R4K | ||
| 263 | select DMA_NONCOHERENT | 274 | select DMA_NONCOHERENT |
| 264 | select SYS_HAS_EARLY_PRINTK | 275 | select SYS_HAS_EARLY_PRINTK |
| 265 | select IRQ_CPU | 276 | select IRQ_CPU |
| @@ -278,6 +289,7 @@ config MIPS_SIM | |||
| 278 | config MARKEINS | 289 | config MARKEINS |
| 279 | bool "NEC EMMA2RH Mark-eins" | 290 | bool "NEC EMMA2RH Mark-eins" |
| 280 | select CEVT_R4K | 291 | select CEVT_R4K |
| 292 | select CSRC_R4K | ||
| 281 | select DMA_NONCOHERENT | 293 | select DMA_NONCOHERENT |
| 282 | select HW_HAS_PCI | 294 | select HW_HAS_PCI |
| 283 | select IRQ_CPU | 295 | select IRQ_CPU |
| @@ -293,6 +305,7 @@ config MARKEINS | |||
| 293 | config MACH_VR41XX | 305 | config MACH_VR41XX |
| 294 | bool "NEC VR4100 series based machines" | 306 | bool "NEC VR4100 series based machines" |
| 295 | select CEVT_R4K | 307 | select CEVT_R4K |
| 308 | select CSRC_R4K | ||
| 296 | select SYS_HAS_CPU_VR41XX | 309 | select SYS_HAS_CPU_VR41XX |
| 297 | select GENERIC_HARDIRQS_NO__DO_IRQ | 310 | select GENERIC_HARDIRQS_NO__DO_IRQ |
| 298 | 311 | ||
| @@ -330,6 +343,7 @@ config PMC_MSP | |||
| 330 | config PMC_YOSEMITE | 343 | config PMC_YOSEMITE |
| 331 | bool "PMC-Sierra Yosemite eval board" | 344 | bool "PMC-Sierra Yosemite eval board" |
| 332 | select CEVT_R4K | 345 | select CEVT_R4K |
| 346 | select CSRC_R4K | ||
| 333 | select DMA_COHERENT | 347 | select DMA_COHERENT |
| 334 | select HW_HAS_PCI | 348 | select HW_HAS_PCI |
| 335 | select IRQ_CPU | 349 | select IRQ_CPU |
| @@ -351,6 +365,7 @@ config PMC_YOSEMITE | |||
| 351 | config QEMU | 365 | config QEMU |
| 352 | bool "Qemu" | 366 | bool "Qemu" |
| 353 | select CEVT_R4K | 367 | select CEVT_R4K |
| 368 | select CSRC_R4K | ||
| 354 | select DMA_COHERENT | 369 | select DMA_COHERENT |
| 355 | select GENERIC_ISA_DMA | 370 | select GENERIC_ISA_DMA |
| 356 | select HAVE_STD_PC_SERIAL_PORT | 371 | select HAVE_STD_PC_SERIAL_PORT |
| @@ -382,9 +397,11 @@ config SGI_IP22 | |||
| 382 | select ARC32 | 397 | select ARC32 |
| 383 | select BOOT_ELF32 | 398 | select BOOT_ELF32 |
| 384 | select CEVT_R4K | 399 | select CEVT_R4K |
| 400 | select CSRC_R4K | ||
| 385 | select DMA_NONCOHERENT | 401 | select DMA_NONCOHERENT |
| 386 | select HW_HAS_EISA | 402 | select HW_HAS_EISA |
| 387 | select I8253 | 403 | select I8253 |
| 404 | select I8259 | ||
| 388 | select IP22_CPU_SCACHE | 405 | select IP22_CPU_SCACHE |
| 389 | select IRQ_CPU | 406 | select IRQ_CPU |
| 390 | select GENERIC_ISA_DMA_SUPPORT_BROKEN | 407 | select GENERIC_ISA_DMA_SUPPORT_BROKEN |
| @@ -427,6 +444,7 @@ config SGI_IP32 | |||
| 427 | select ARC32 | 444 | select ARC32 |
| 428 | select BOOT_ELF32 | 445 | select BOOT_ELF32 |
| 429 | select CEVT_R4K | 446 | select CEVT_R4K |
| 447 | select CSRC_R4K | ||
| 430 | select DMA_NONCOHERENT | 448 | select DMA_NONCOHERENT |
| 431 | select HW_HAS_PCI | 449 | select HW_HAS_PCI |
| 432 | select IRQ_CPU | 450 | select IRQ_CPU |
| @@ -498,6 +516,7 @@ config SIBYTE_SWARM | |||
| 498 | select SYS_SUPPORTS_HIGHMEM | 516 | select SYS_SUPPORTS_HIGHMEM |
| 499 | select SYS_SUPPORTS_KGDB | 517 | select SYS_SUPPORTS_KGDB |
| 500 | select SYS_SUPPORTS_LITTLE_ENDIAN | 518 | select SYS_SUPPORTS_LITTLE_ENDIAN |
| 519 | select ZONE_DMA32 if 64BIT | ||
| 501 | 520 | ||
| 502 | config SIBYTE_LITTLESUR | 521 | config SIBYTE_LITTLESUR |
| 503 | bool "Sibyte BCM91250C2-LittleSur" | 522 | bool "Sibyte BCM91250C2-LittleSur" |
| @@ -548,6 +567,7 @@ config SIBYTE_BIGSUR | |||
| 548 | select SYS_SUPPORTS_BIG_ENDIAN | 567 | select SYS_SUPPORTS_BIG_ENDIAN |
| 549 | select SYS_SUPPORTS_HIGHMEM | 568 | select SYS_SUPPORTS_HIGHMEM |
| 550 | select SYS_SUPPORTS_LITTLE_ENDIAN | 569 | select SYS_SUPPORTS_LITTLE_ENDIAN |
| 570 | select ZONE_DMA32 if 64BIT | ||
| 551 | 571 | ||
| 552 | config SNI_RM | 572 | config SNI_RM |
| 553 | bool "SNI RM200/300/400" | 573 | bool "SNI RM200/300/400" |
| @@ -556,6 +576,7 @@ config SNI_RM | |||
| 556 | select ARCH_MAY_HAVE_PC_FDC | 576 | select ARCH_MAY_HAVE_PC_FDC |
| 557 | select BOOT_ELF32 | 577 | select BOOT_ELF32 |
| 558 | select CEVT_R4K | 578 | select CEVT_R4K |
| 579 | select CSRC_R4K | ||
| 559 | select DMA_NONCOHERENT | 580 | select DMA_NONCOHERENT |
| 560 | select GENERIC_ISA_DMA | 581 | select GENERIC_ISA_DMA |
| 561 | select HW_HAS_EISA | 582 | select HW_HAS_EISA |
| @@ -599,6 +620,7 @@ config TOSHIBA_JMR3927 | |||
| 599 | config TOSHIBA_RBTX4927 | 620 | config TOSHIBA_RBTX4927 |
| 600 | bool "Toshiba RBTX49[23]7 board" | 621 | bool "Toshiba RBTX49[23]7 board" |
| 601 | select CEVT_R4K | 622 | select CEVT_R4K |
| 623 | select CSRC_R4K | ||
| 602 | select CEVT_TXX9 | 624 | select CEVT_TXX9 |
| 603 | select DMA_NONCOHERENT | 625 | select DMA_NONCOHERENT |
| 604 | select HAS_TXX9_SERIAL | 626 | select HAS_TXX9_SERIAL |
| @@ -621,6 +643,7 @@ config TOSHIBA_RBTX4927 | |||
| 621 | config TOSHIBA_RBTX4938 | 643 | config TOSHIBA_RBTX4938 |
| 622 | bool "Toshiba RBTX4938 board" | 644 | bool "Toshiba RBTX4938 board" |
| 623 | select CEVT_R4K | 645 | select CEVT_R4K |
| 646 | select CSRC_R4K | ||
| 624 | select CEVT_TXX9 | 647 | select CEVT_TXX9 |
| 625 | select DMA_NONCOHERENT | 648 | select DMA_NONCOHERENT |
| 626 | select HAS_TXX9_SERIAL | 649 | select HAS_TXX9_SERIAL |
| @@ -642,6 +665,7 @@ config TOSHIBA_RBTX4938 | |||
| 642 | config WR_PPMC | 665 | config WR_PPMC |
| 643 | bool "Wind River PPMC board" | 666 | bool "Wind River PPMC board" |
| 644 | select CEVT_R4K | 667 | select CEVT_R4K |
| 668 | select CSRC_R4K | ||
| 645 | select IRQ_CPU | 669 | select IRQ_CPU |
| 646 | select BOOT_ELF32 | 670 | select BOOT_ELF32 |
| 647 | select DMA_NONCOHERENT | 671 | select DMA_NONCOHERENT |
| @@ -752,6 +776,9 @@ config CEVT_TXX9 | |||
| 752 | config CSRC_BCM1480 | 776 | config CSRC_BCM1480 |
| 753 | bool | 777 | bool |
| 754 | 778 | ||
| 779 | config CSRC_R4K | ||
| 780 | bool | ||
| 781 | |||
| 755 | config CSRC_SB1250 | 782 | config CSRC_SB1250 |
| 756 | bool | 783 | bool |
| 757 | 784 | ||
| @@ -1640,6 +1667,9 @@ config ARCH_DISCONTIGMEM_ENABLE | |||
| 1640 | or have huge holes in the physical address space for other reasons. | 1667 | or have huge holes in the physical address space for other reasons. |
| 1641 | See <file:Documentation/vm/numa> for more. | 1668 | See <file:Documentation/vm/numa> for more. |
| 1642 | 1669 | ||
| 1670 | config ARCH_POPULATES_NODE_MAP | ||
| 1671 | def_bool y | ||
| 1672 | |||
| 1643 | config ARCH_SPARSEMEM_ENABLE | 1673 | config ARCH_SPARSEMEM_ENABLE |
| 1644 | bool | 1674 | bool |
| 1645 | select SPARSEMEM_STATIC | 1675 | select SPARSEMEM_STATIC |
| @@ -1945,6 +1975,9 @@ config I8253 | |||
| 1945 | config PCSPEAKER | 1975 | config PCSPEAKER |
| 1946 | bool | 1976 | bool |
| 1947 | 1977 | ||
| 1978 | config ZONE_DMA32 | ||
| 1979 | bool | ||
| 1980 | |||
| 1948 | source "drivers/pcmcia/Kconfig" | 1981 | source "drivers/pcmcia/Kconfig" |
| 1949 | 1982 | ||
| 1950 | source "drivers/pci/hotplug/Kconfig" | 1983 | source "drivers/pci/hotplug/Kconfig" |
diff --git a/arch/mips/au1000/Kconfig b/arch/mips/au1000/Kconfig index b36cec58a9a8..05d1354aad3a 100644 --- a/arch/mips/au1000/Kconfig +++ b/arch/mips/au1000/Kconfig | |||
| @@ -138,6 +138,7 @@ config SOC_AU1X00 | |||
| 138 | bool | 138 | bool |
| 139 | select 64BIT_PHYS_ADDR | 139 | select 64BIT_PHYS_ADDR |
| 140 | select CEVT_R4K | 140 | select CEVT_R4K |
| 141 | select CSRC_R4K | ||
| 141 | select IRQ_CPU | 142 | select IRQ_CPU |
| 142 | select SYS_HAS_CPU_MIPS32_R1 | 143 | select SYS_HAS_CPU_MIPS32_R1 |
| 143 | select SYS_SUPPORTS_32BIT_KERNEL | 144 | select SYS_SUPPORTS_32BIT_KERNEL |
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index b551535b7e48..ffa08362de17 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile | |||
| @@ -14,6 +14,7 @@ obj-$(CONFIG_CEVT_GT641XX) += cevt-gt641xx.o | |||
| 14 | obj-$(CONFIG_CEVT_SB1250) += cevt-sb1250.o | 14 | obj-$(CONFIG_CEVT_SB1250) += cevt-sb1250.o |
| 15 | obj-$(CONFIG_CEVT_TXX9) += cevt-txx9.o | 15 | obj-$(CONFIG_CEVT_TXX9) += cevt-txx9.o |
| 16 | obj-$(CONFIG_CSRC_BCM1480) += csrc-bcm1480.o | 16 | obj-$(CONFIG_CSRC_BCM1480) += csrc-bcm1480.o |
| 17 | obj-$(CONFIG_CSRC_R4K) += csrc-r4k.o | ||
| 17 | obj-$(CONFIG_CSRC_SB1250) += csrc-sb1250.o | 18 | obj-$(CONFIG_CSRC_SB1250) += csrc-sb1250.o |
| 18 | 19 | ||
| 19 | binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \ | 20 | binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \ |
| @@ -43,6 +44,7 @@ obj-$(CONFIG_CPU_TX49XX) += r4k_fpu.o r4k_switch.o | |||
| 43 | obj-$(CONFIG_CPU_VR41XX) += r4k_fpu.o r4k_switch.o | 44 | obj-$(CONFIG_CPU_VR41XX) += r4k_fpu.o r4k_switch.o |
| 44 | 45 | ||
| 45 | obj-$(CONFIG_SMP) += smp.o | 46 | obj-$(CONFIG_SMP) += smp.o |
| 47 | obj-$(CONFIG_SMP_UP) += smp-up.o | ||
| 46 | 48 | ||
| 47 | obj-$(CONFIG_MIPS_MT) += mips-mt.o | 49 | obj-$(CONFIG_MIPS_MT) += mips-mt.o |
| 48 | obj-$(CONFIG_MIPS_MT_FPAFF) += mips-mt-fpaff.o | 50 | obj-$(CONFIG_MIPS_MT_FPAFF) += mips-mt-fpaff.o |
diff --git a/arch/mips/kernel/cevt-r4k.c b/arch/mips/kernel/cevt-r4k.c index bab935a3d74b..24a2d907aa0d 100644 --- a/arch/mips/kernel/cevt-r4k.c +++ b/arch/mips/kernel/cevt-r4k.c | |||
| @@ -219,7 +219,7 @@ static int c0_compare_int_usable(void) | |||
| 219 | return 1; | 219 | return 1; |
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | void __cpuinit mips_clockevent_init(void) | 222 | int __cpuinit mips_clockevent_init(void) |
| 223 | { | 223 | { |
| 224 | uint64_t mips_freq = mips_hpt_frequency; | 224 | uint64_t mips_freq = mips_hpt_frequency; |
| 225 | unsigned int cpu = smp_processor_id(); | 225 | unsigned int cpu = smp_processor_id(); |
| @@ -227,7 +227,7 @@ void __cpuinit mips_clockevent_init(void) | |||
| 227 | unsigned int irq; | 227 | unsigned int irq; |
| 228 | 228 | ||
| 229 | if (!cpu_has_counter || !mips_hpt_frequency) | 229 | if (!cpu_has_counter || !mips_hpt_frequency) |
| 230 | return; | 230 | return -ENXIO; |
| 231 | 231 | ||
| 232 | #ifdef CONFIG_MIPS_MT_SMTC | 232 | #ifdef CONFIG_MIPS_MT_SMTC |
| 233 | setup_smtc_dummy_clockevent_device(); | 233 | setup_smtc_dummy_clockevent_device(); |
| @@ -237,11 +237,11 @@ void __cpuinit mips_clockevent_init(void) | |||
| 237 | * device. | 237 | * device. |
| 238 | */ | 238 | */ |
| 239 | if (cpu) | 239 | if (cpu) |
| 240 | return; | 240 | return 0; |
| 241 | #endif | 241 | #endif |
| 242 | 242 | ||
| 243 | if (!c0_compare_int_usable()) | 243 | if (!c0_compare_int_usable()) |
| 244 | return; | 244 | return -ENXIO; |
| 245 | 245 | ||
| 246 | /* | 246 | /* |
| 247 | * With vectored interrupts things are getting platform specific. | 247 | * With vectored interrupts things are getting platform specific. |
| @@ -276,8 +276,8 @@ void __cpuinit mips_clockevent_init(void) | |||
| 276 | 276 | ||
| 277 | clockevents_register_device(cd); | 277 | clockevents_register_device(cd); |
| 278 | 278 | ||
| 279 | if (!cp0_timer_irq_installed) | 279 | if (cp0_timer_irq_installed) |
| 280 | return; | 280 | return 0; |
| 281 | 281 | ||
| 282 | cp0_timer_irq_installed = 1; | 282 | cp0_timer_irq_installed = 1; |
| 283 | 283 | ||
| @@ -287,4 +287,6 @@ void __cpuinit mips_clockevent_init(void) | |||
| 287 | #else | 287 | #else |
| 288 | setup_irq(irq, &c0_compare_irqaction); | 288 | setup_irq(irq, &c0_compare_irqaction); |
| 289 | #endif | 289 | #endif |
| 290 | |||
| 291 | return 0; | ||
| 290 | } | 292 | } |
diff --git a/arch/mips/kernel/csrc-r4k.c b/arch/mips/kernel/csrc-r4k.c new file mode 100644 index 000000000000..74c5c62365a8 --- /dev/null +++ b/arch/mips/kernel/csrc-r4k.c | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | /* | ||
| 2 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 3 | * License. See the file "COPYING" in the main directory of this archive | ||
| 4 | * for more details. | ||
| 5 | * | ||
| 6 | * Copyright (C) 2007 by Ralf Baechle | ||
| 7 | */ | ||
| 8 | |||
| 9 | static cycle_t c0_hpt_read(void) | ||
| 10 | { | ||
| 11 | return read_c0_count(); | ||
| 12 | } | ||
| 13 | |||
| 14 | static struct clocksource clocksource_mips = { | ||
| 15 | .name = "MIPS", | ||
| 16 | .read = c0_hpt_read, | ||
| 17 | .mask = CLOCKSOURCE_MASK(32), | ||
| 18 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
| 19 | }; | ||
| 20 | |||
| 21 | static void __init init_mips_clocksource(void) | ||
| 22 | { | ||
| 23 | /* Calclate a somewhat reasonable rating value */ | ||
| 24 | clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; | ||
| 25 | |||
| 26 | clocksource_set_clock(&clocksource_mips, mips_hpt_frequency); | ||
| 27 | |||
| 28 | clocksource_register(&clocksource_mips); | ||
| 29 | } | ||
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index a06a27d6cfcd..7f6ddcb5d485 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
| @@ -269,7 +269,7 @@ static void __init bootmem_init(void) | |||
| 269 | 269 | ||
| 270 | static void __init bootmem_init(void) | 270 | static void __init bootmem_init(void) |
| 271 | { | 271 | { |
| 272 | unsigned long reserved_end; | 272 | unsigned long init_begin, reserved_end; |
| 273 | unsigned long mapstart = ~0UL; | 273 | unsigned long mapstart = ~0UL; |
| 274 | unsigned long bootmap_size; | 274 | unsigned long bootmap_size; |
| 275 | int i; | 275 | int i; |
| @@ -342,6 +342,35 @@ static void __init bootmem_init(void) | |||
| 342 | */ | 342 | */ |
| 343 | bootmap_size = init_bootmem_node(NODE_DATA(0), mapstart, | 343 | bootmap_size = init_bootmem_node(NODE_DATA(0), mapstart, |
| 344 | min_low_pfn, max_low_pfn); | 344 | min_low_pfn, max_low_pfn); |
| 345 | |||
| 346 | |||
| 347 | init_begin = PFN_UP(__pa_symbol(&__init_begin)); | ||
| 348 | for (i = 0; i < boot_mem_map.nr_map; i++) { | ||
| 349 | unsigned long start, end; | ||
| 350 | |||
| 351 | start = PFN_UP(boot_mem_map.map[i].addr); | ||
| 352 | end = PFN_DOWN(boot_mem_map.map[i].addr | ||
| 353 | + boot_mem_map.map[i].size); | ||
| 354 | |||
| 355 | if (start <= init_begin) | ||
| 356 | start = init_begin; | ||
| 357 | if (start >= end) | ||
| 358 | continue; | ||
| 359 | |||
| 360 | #ifndef CONFIG_HIGHMEM | ||
| 361 | if (end > max_low_pfn) | ||
| 362 | end = max_low_pfn; | ||
| 363 | |||
| 364 | /* | ||
| 365 | * ... finally, is the area going away? | ||
| 366 | */ | ||
| 367 | if (end <= start) | ||
| 368 | continue; | ||
| 369 | #endif | ||
| 370 | |||
| 371 | add_active_range(0, start, end); | ||
| 372 | } | ||
| 373 | |||
| 345 | /* | 374 | /* |
| 346 | * Register fully available low RAM pages with the bootmem allocator. | 375 | * Register fully available low RAM pages with the bootmem allocator. |
| 347 | */ | 376 | */ |
diff --git a/arch/mips/kernel/smp-up.c b/arch/mips/kernel/smp-up.c new file mode 100644 index 000000000000..ead6c30eeb14 --- /dev/null +++ b/arch/mips/kernel/smp-up.c | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | /* | ||
| 2 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 3 | * License. See the file "COPYING" in the main directory of this archive | ||
| 4 | * for more details. | ||
| 5 | * | ||
| 6 | * Copyright (C) 2006, 07 by Ralf Baechle (ralf@linux-mips.org) | ||
| 7 | * | ||
| 8 | * Symmetric Uniprocessor (TM) Support | ||
| 9 | */ | ||
| 10 | #include <linux/kernel.h> | ||
| 11 | #include <linux/sched.h> | ||
| 12 | |||
| 13 | /* | ||
| 14 | * Send inter-processor interrupt | ||
| 15 | */ | ||
| 16 | void up_send_ipi_single(int cpu, unsigned int action) | ||
| 17 | { | ||
| 18 | panic(KERN_ERR "%s called", __func__); | ||
| 19 | } | ||
| 20 | |||
| 21 | static inline void up_send_ipi_mask(cpumask_t mask, unsigned int action) | ||
| 22 | { | ||
| 23 | panic(KERN_ERR "%s called", __func__); | ||
| 24 | } | ||
| 25 | |||
| 26 | /* | ||
| 27 | * After we've done initial boot, this function is called to allow the | ||
| 28 | * board code to clean up state, if needed | ||
| 29 | */ | ||
| 30 | void __cpuinit up_init_secondary(void) | ||
| 31 | { | ||
| 32 | } | ||
| 33 | |||
| 34 | void __cpuinit up_smp_finish(void) | ||
| 35 | { | ||
| 36 | } | ||
| 37 | |||
| 38 | /* Hook for after all CPUs are online */ | ||
| 39 | void up_cpus_done(void) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | /* | ||
| 44 | * Firmware CPU startup hook | ||
| 45 | */ | ||
| 46 | void __cpuinit up_boot_secondary(int cpu, struct task_struct *idle) | ||
| 47 | { | ||
| 48 | } | ||
| 49 | |||
| 50 | void __init up_smp_setup(void) | ||
| 51 | { | ||
| 52 | } | ||
| 53 | |||
| 54 | void __init up_prepare_cpus(unsigned int max_cpus) | ||
| 55 | { | ||
| 56 | } | ||
| 57 | |||
| 58 | struct plat_smp_ops up_smp_ops = { | ||
| 59 | .send_ipi_single = up_send_ipi_single, | ||
| 60 | .send_ipi_mask = up_send_ipi_mask, | ||
| 61 | .init_secondary = up_init_secondary, | ||
| 62 | .smp_finish = up_smp_finish, | ||
| 63 | .cpus_done = up_cpus_done, | ||
| 64 | .boot_secondary = up_boot_secondary, | ||
| 65 | .smp_setup = up_smp_setup, | ||
| 66 | .prepare_cpus = up_prepare_cpus, | ||
| 67 | }; | ||
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 3284b9b4ecac..52075426c373 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
| @@ -50,14 +50,6 @@ int update_persistent_clock(struct timespec now) | |||
| 50 | return rtc_mips_set_mmss(now.tv_sec); | 50 | return rtc_mips_set_mmss(now.tv_sec); |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | /* | ||
| 54 | * High precision timer functions for a R4k-compatible timer. | ||
| 55 | */ | ||
| 56 | static cycle_t c0_hpt_read(void) | ||
| 57 | { | ||
| 58 | return read_c0_count(); | ||
| 59 | } | ||
| 60 | |||
| 61 | int (*mips_timer_state)(void); | 53 | int (*mips_timer_state)(void); |
| 62 | 54 | ||
| 63 | int null_perf_irq(void) | 55 | int null_perf_irq(void) |
| @@ -84,55 +76,6 @@ EXPORT_SYMBOL(perf_irq); | |||
| 84 | 76 | ||
| 85 | unsigned int mips_hpt_frequency; | 77 | unsigned int mips_hpt_frequency; |
| 86 | 78 | ||
| 87 | static struct clocksource clocksource_mips = { | ||
| 88 | .name = "MIPS", | ||
| 89 | .read = c0_hpt_read, | ||
| 90 | .mask = CLOCKSOURCE_MASK(32), | ||
| 91 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
| 92 | }; | ||
| 93 | |||
| 94 | static unsigned int __init calibrate_hpt(void) | ||
| 95 | { | ||
| 96 | cycle_t frequency, hpt_start, hpt_end, hpt_count, hz; | ||
| 97 | |||
| 98 | const int loops = HZ / 10; | ||
| 99 | int log_2_loops = 0; | ||
| 100 | int i; | ||
| 101 | |||
| 102 | /* | ||
| 103 | * We want to calibrate for 0.1s, but to avoid a 64-bit | ||
| 104 | * division we round the number of loops up to the nearest | ||
| 105 | * power of 2. | ||
| 106 | */ | ||
| 107 | while (loops > 1 << log_2_loops) | ||
| 108 | log_2_loops++; | ||
| 109 | i = 1 << log_2_loops; | ||
| 110 | |||
| 111 | /* | ||
| 112 | * Wait for a rising edge of the timer interrupt. | ||
| 113 | */ | ||
| 114 | while (mips_timer_state()); | ||
| 115 | while (!mips_timer_state()); | ||
| 116 | |||
| 117 | /* | ||
| 118 | * Now see how many high precision timer ticks happen | ||
| 119 | * during the calculated number of periods between timer | ||
| 120 | * interrupts. | ||
| 121 | */ | ||
| 122 | hpt_start = clocksource_mips.read(); | ||
| 123 | do { | ||
| 124 | while (mips_timer_state()); | ||
| 125 | while (!mips_timer_state()); | ||
| 126 | } while (--i); | ||
| 127 | hpt_end = clocksource_mips.read(); | ||
| 128 | |||
| 129 | hpt_count = (hpt_end - hpt_start) & clocksource_mips.mask; | ||
| 130 | hz = HZ; | ||
| 131 | frequency = hpt_count * hz; | ||
| 132 | |||
| 133 | return frequency >> log_2_loops; | ||
| 134 | } | ||
| 135 | |||
| 136 | void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock) | 79 | void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock) |
| 137 | { | 80 | { |
| 138 | u64 temp; | 81 | u64 temp; |
| @@ -166,16 +109,6 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd, | |||
| 166 | cd->mult = (u32) temp; | 109 | cd->mult = (u32) temp; |
| 167 | } | 110 | } |
| 168 | 111 | ||
| 169 | static void __init init_mips_clocksource(void) | ||
| 170 | { | ||
| 171 | /* Calclate a somewhat reasonable rating value */ | ||
| 172 | clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; | ||
| 173 | |||
| 174 | clocksource_set_clock(&clocksource_mips, mips_hpt_frequency); | ||
| 175 | |||
| 176 | clocksource_register(&clocksource_mips); | ||
| 177 | } | ||
| 178 | |||
| 179 | void __init __weak plat_time_init(void) | 112 | void __init __weak plat_time_init(void) |
| 180 | { | 113 | { |
| 181 | } | 114 | } |
| @@ -194,21 +127,42 @@ void __init plat_timer_setup(void) | |||
| 194 | BUG(); | 127 | BUG(); |
| 195 | } | 128 | } |
| 196 | 129 | ||
| 130 | static __init int cpu_has_mfc0_count_bug(void) | ||
| 131 | { | ||
| 132 | switch (current_cpu_type()) { | ||
| 133 | case CPU_R4000PC: | ||
| 134 | case CPU_R4000SC: | ||
| 135 | case CPU_R4000MC: | ||
| 136 | /* | ||
| 137 | * V3.0 is documented as suffering from the mfc0 from count bug. | ||
| 138 | * Afaik this is the last version of the R4000. Later versions | ||
| 139 | * were marketed as R4400. | ||
| 140 | */ | ||
| 141 | return 1; | ||
| 142 | |||
| 143 | case CPU_R4400PC: | ||
| 144 | case CPU_R4400SC: | ||
| 145 | case CPU_R4400MC: | ||
| 146 | /* | ||
| 147 | * The published errata for the R4400 upto 3.0 say the CPU | ||
| 148 | * has the mfc0 from count bug. | ||
| 149 | */ | ||
| 150 | if ((current_cpu_data.processor_id & 0xff) <= 0x30) | ||
| 151 | return 1; | ||
| 152 | |||
| 153 | /* | ||
| 154 | * I don't have erratas for newer R4400 so be paranoid. | ||
| 155 | */ | ||
| 156 | return 1; | ||
| 157 | } | ||
| 158 | |||
| 159 | return 0; | ||
| 160 | } | ||
| 161 | |||
| 197 | void __init time_init(void) | 162 | void __init time_init(void) |
| 198 | { | 163 | { |
| 199 | plat_time_init(); | 164 | plat_time_init(); |
| 200 | 165 | ||
| 201 | if (cpu_has_counter && (mips_hpt_frequency || mips_timer_state)) { | 166 | if (mips_clockevent_init() || !cpu_has_mfc0_count_bug()) |
| 202 | /* We know counter frequency. Or we can get it. */ | ||
| 203 | if (!mips_hpt_frequency) | ||
| 204 | mips_hpt_frequency = calibrate_hpt(); | ||
| 205 | |||
| 206 | /* Report the high precision timer rate for a reference. */ | ||
| 207 | printk("Using %u.%03u MHz high precision timer.\n", | ||
| 208 | ((mips_hpt_frequency + 500) / 1000) / 1000, | ||
| 209 | ((mips_hpt_frequency + 500) / 1000) % 1000); | ||
| 210 | init_mips_clocksource(); | 167 | init_mips_clocksource(); |
| 211 | } | ||
| 212 | |||
| 213 | mips_clockevent_init(); | ||
| 214 | } | 168 | } |
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index 38bd33fa2a23..c06eb812a95e 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c | |||
| @@ -470,7 +470,7 @@ static int apply_r_mips_lo16(struct module *me, uint32_t *location, | |||
| 470 | */ | 470 | */ |
| 471 | if (v != l->value) { | 471 | if (v != l->value) { |
| 472 | printk(KERN_DEBUG "VPE loader: " | 472 | printk(KERN_DEBUG "VPE loader: " |
| 473 | "apply_r_mips_lo16/hi16: " | 473 | "apply_r_mips_lo16/hi16: \t" |
| 474 | "inconsistent value information\n"); | 474 | "inconsistent value information\n"); |
| 475 | return -ENOEXEC; | 475 | return -ENOEXEC; |
| 476 | } | 476 | } |
| @@ -629,7 +629,7 @@ static void simplify_symbols(Elf_Shdr * sechdrs, | |||
| 629 | break; | 629 | break; |
| 630 | 630 | ||
| 631 | case SHN_MIPS_SCOMMON: | 631 | case SHN_MIPS_SCOMMON: |
| 632 | printk(KERN_DEBUG "simplify_symbols: ignoring SHN_MIPS_SCOMMON" | 632 | printk(KERN_DEBUG "simplify_symbols: ignoring SHN_MIPS_SCOMMON " |
| 633 | "symbol <%s> st_shndx %d\n", strtab + sym[i].st_name, | 633 | "symbol <%s> st_shndx %d\n", strtab + sym[i].st_name, |
| 634 | sym[i].st_shndx); | 634 | sym[i].st_shndx); |
| 635 | // .sbss section | 635 | // .sbss section |
diff --git a/arch/mips/math-emu/ieee754.c b/arch/mips/math-emu/ieee754.c index 946aee331788..cb1b6822711a 100644 --- a/arch/mips/math-emu/ieee754.c +++ b/arch/mips/math-emu/ieee754.c | |||
| @@ -108,6 +108,7 @@ int ieee754si_xcpt(int r, const char *op, ...) | |||
| 108 | ax.rv.si = r; | 108 | ax.rv.si = r; |
| 109 | va_start(ax.ap, op); | 109 | va_start(ax.ap, op); |
| 110 | ieee754_xcpt(&ax); | 110 | ieee754_xcpt(&ax); |
| 111 | va_end(ax.ap); | ||
| 111 | return ax.rv.si; | 112 | return ax.rv.si; |
| 112 | } | 113 | } |
| 113 | 114 | ||
| @@ -122,5 +123,6 @@ s64 ieee754di_xcpt(s64 r, const char *op, ...) | |||
| 122 | ax.rv.di = r; | 123 | ax.rv.di = r; |
| 123 | va_start(ax.ap, op); | 124 | va_start(ax.ap, op); |
| 124 | ieee754_xcpt(&ax); | 125 | ieee754_xcpt(&ax); |
| 126 | va_end(ax.ap); | ||
| 125 | return ax.rv.di; | 127 | return ax.rv.di; |
| 126 | } | 128 | } |
diff --git a/arch/mips/math-emu/ieee754dp.c b/arch/mips/math-emu/ieee754dp.c index 3e214aac4b12..6d2d89f32472 100644 --- a/arch/mips/math-emu/ieee754dp.c +++ b/arch/mips/math-emu/ieee754dp.c | |||
| @@ -57,6 +57,7 @@ ieee754dp ieee754dp_xcpt(ieee754dp r, const char *op, ...) | |||
| 57 | ax.rv.dp = r; | 57 | ax.rv.dp = r; |
| 58 | va_start(ax.ap, op); | 58 | va_start(ax.ap, op); |
| 59 | ieee754_xcpt(&ax); | 59 | ieee754_xcpt(&ax); |
| 60 | va_end(ax.ap); | ||
| 60 | return ax.rv.dp; | 61 | return ax.rv.dp; |
| 61 | } | 62 | } |
| 62 | 63 | ||
| @@ -83,6 +84,7 @@ ieee754dp ieee754dp_nanxcpt(ieee754dp r, const char *op, ...) | |||
| 83 | ax.rv.dp = r; | 84 | ax.rv.dp = r; |
| 84 | va_start(ax.ap, op); | 85 | va_start(ax.ap, op); |
| 85 | ieee754_xcpt(&ax); | 86 | ieee754_xcpt(&ax); |
| 87 | va_end(ax.ap); | ||
| 86 | return ax.rv.dp; | 88 | return ax.rv.dp; |
| 87 | } | 89 | } |
| 88 | 90 | ||
diff --git a/arch/mips/math-emu/ieee754sp.c b/arch/mips/math-emu/ieee754sp.c index adda851cd04f..463534045ab6 100644 --- a/arch/mips/math-emu/ieee754sp.c +++ b/arch/mips/math-emu/ieee754sp.c | |||
| @@ -58,6 +58,7 @@ ieee754sp ieee754sp_xcpt(ieee754sp r, const char *op, ...) | |||
| 58 | ax.rv.sp = r; | 58 | ax.rv.sp = r; |
| 59 | va_start(ax.ap, op); | 59 | va_start(ax.ap, op); |
| 60 | ieee754_xcpt(&ax); | 60 | ieee754_xcpt(&ax); |
| 61 | va_end(ax.ap); | ||
| 61 | return ax.rv.sp; | 62 | return ax.rv.sp; |
| 62 | } | 63 | } |
| 63 | 64 | ||
| @@ -84,6 +85,7 @@ ieee754sp ieee754sp_nanxcpt(ieee754sp r, const char *op, ...) | |||
| 84 | ax.rv.sp = r; | 85 | ax.rv.sp = r; |
| 85 | va_start(ax.ap, op); | 86 | va_start(ax.ap, op); |
| 86 | ieee754_xcpt(&ax); | 87 | ieee754_xcpt(&ax); |
| 88 | va_end(ax.ap); | ||
| 87 | return ax.rv.sp; | 89 | return ax.rv.sp; |
| 88 | } | 90 | } |
| 89 | 91 | ||
diff --git a/arch/mips/mipssim/sim_time.c b/arch/mips/mipssim/sim_time.c index bfaafa38846f..e39bbe989da3 100644 --- a/arch/mips/mipssim/sim_time.c +++ b/arch/mips/mipssim/sim_time.c | |||
| @@ -101,9 +101,7 @@ unsigned __init get_c0_compare_int(void) | |||
| 101 | 101 | ||
| 102 | void __init plat_time_init(void) | 102 | void __init plat_time_init(void) |
| 103 | { | 103 | { |
| 104 | unsigned int est_freq, flags; | 104 | unsigned int est_freq; |
| 105 | |||
| 106 | local_irq_save(flags); | ||
| 107 | 105 | ||
| 108 | /* Set Data mode - binary. */ | 106 | /* Set Data mode - binary. */ |
| 109 | CMOS_WRITE(CMOS_READ(RTC_CONTROL) | RTC_DM_BINARY, RTC_CONTROL); | 107 | CMOS_WRITE(CMOS_READ(RTC_CONTROL) | RTC_DM_BINARY, RTC_CONTROL); |
| @@ -114,6 +112,4 @@ void __init plat_time_init(void) | |||
| 114 | (est_freq % 1000000) * 100 / 1000000); | 112 | (est_freq % 1000000) * 100 / 1000000); |
| 115 | 113 | ||
| 116 | cpu_khz = est_freq / 1000; | 114 | cpu_khz = est_freq / 1000; |
| 117 | |||
| 118 | local_irq_restore(flags); | ||
| 119 | } | 115 | } |
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index 33519ce49540..ae76795685cc 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c | |||
| @@ -40,16 +40,38 @@ static inline int cpu_is_noncoherent_r10000(struct device *dev) | |||
| 40 | current_cpu_type() == CPU_R12000); | 40 | current_cpu_type() == CPU_R12000); |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp) | ||
| 44 | { | ||
| 45 | /* ignore region specifiers */ | ||
| 46 | gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); | ||
| 47 | |||
| 48 | #ifdef CONFIG_ZONE_DMA32 | ||
| 49 | if (dev == NULL) | ||
| 50 | gfp |= __GFP_DMA; | ||
| 51 | else if (dev->coherent_dma_mask < DMA_BIT_MASK(24)) | ||
| 52 | gfp |= __GFP_DMA; | ||
| 53 | else | ||
| 54 | #endif | ||
| 55 | #ifdef CONFIG_ZONE_DMA32 | ||
| 56 | if (dev->coherent_dma_mask < DMA_BIT_MASK(32)) | ||
| 57 | gfp |= __GFP_DMA32; | ||
| 58 | else | ||
| 59 | #endif | ||
| 60 | ; | ||
| 61 | |||
| 62 | /* Don't invoke OOM killer */ | ||
| 63 | gfp |= __GFP_NORETRY; | ||
| 64 | |||
| 65 | return gfp; | ||
| 66 | } | ||
| 67 | |||
| 43 | void *dma_alloc_noncoherent(struct device *dev, size_t size, | 68 | void *dma_alloc_noncoherent(struct device *dev, size_t size, |
| 44 | dma_addr_t * dma_handle, gfp_t gfp) | 69 | dma_addr_t * dma_handle, gfp_t gfp) |
| 45 | { | 70 | { |
| 46 | void *ret; | 71 | void *ret; |
| 47 | 72 | ||
| 48 | /* ignore region specifiers */ | 73 | gfp = massage_gfp_flags(dev, gfp); |
| 49 | gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); | ||
| 50 | 74 | ||
| 51 | if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff)) | ||
| 52 | gfp |= GFP_DMA; | ||
| 53 | ret = (void *) __get_free_pages(gfp, get_order(size)); | 75 | ret = (void *) __get_free_pages(gfp, get_order(size)); |
| 54 | 76 | ||
| 55 | if (ret != NULL) { | 77 | if (ret != NULL) { |
| @@ -67,11 +89,8 @@ void *dma_alloc_coherent(struct device *dev, size_t size, | |||
| 67 | { | 89 | { |
| 68 | void *ret; | 90 | void *ret; |
| 69 | 91 | ||
| 70 | /* ignore region specifiers */ | 92 | gfp = massage_gfp_flags(dev, gfp); |
| 71 | gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); | ||
| 72 | 93 | ||
| 73 | if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff)) | ||
| 74 | gfp |= GFP_DMA; | ||
| 75 | ret = (void *) __get_free_pages(gfp, get_order(size)); | 94 | ret = (void *) __get_free_pages(gfp, get_order(size)); |
| 76 | 95 | ||
| 77 | if (ret) { | 96 | if (ret) { |
| @@ -343,7 +362,7 @@ int dma_supported(struct device *dev, u64 mask) | |||
| 343 | * so we can't guarantee allocations that must be | 362 | * so we can't guarantee allocations that must be |
| 344 | * within a tighter range than GFP_DMA.. | 363 | * within a tighter range than GFP_DMA.. |
| 345 | */ | 364 | */ |
| 346 | if (mask < 0x00ffffff) | 365 | if (mask < DMA_BIT_MASK(24)) |
| 347 | return 0; | 366 | return 0; |
| 348 | 367 | ||
| 349 | return 1; | 368 | return 1; |
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index ec3b9e9f30f4..480dec04f552 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
| @@ -347,11 +347,8 @@ static int __init page_is_ram(unsigned long pagenr) | |||
| 347 | 347 | ||
| 348 | void __init paging_init(void) | 348 | void __init paging_init(void) |
| 349 | { | 349 | { |
| 350 | unsigned long zones_size[MAX_NR_ZONES] = { 0, }; | 350 | unsigned long max_zone_pfns[MAX_NR_ZONES]; |
| 351 | #ifndef CONFIG_FLATMEM | 351 | unsigned long lastpfn; |
| 352 | unsigned long zholes_size[MAX_NR_ZONES] = { 0, }; | ||
| 353 | unsigned long i, j, pfn; | ||
| 354 | #endif | ||
| 355 | 352 | ||
| 356 | pagetable_init(); | 353 | pagetable_init(); |
| 357 | 354 | ||
| @@ -361,35 +358,27 @@ void __init paging_init(void) | |||
| 361 | kmap_coherent_init(); | 358 | kmap_coherent_init(); |
| 362 | 359 | ||
| 363 | #ifdef CONFIG_ZONE_DMA | 360 | #ifdef CONFIG_ZONE_DMA |
| 364 | if (min_low_pfn < MAX_DMA_PFN && MAX_DMA_PFN <= max_low_pfn) { | 361 | max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN; |
| 365 | zones_size[ZONE_DMA] = MAX_DMA_PFN - min_low_pfn; | ||
| 366 | zones_size[ZONE_NORMAL] = max_low_pfn - MAX_DMA_PFN; | ||
| 367 | } else if (max_low_pfn < MAX_DMA_PFN) | ||
| 368 | zones_size[ZONE_DMA] = max_low_pfn - min_low_pfn; | ||
| 369 | else | ||
| 370 | #endif | 362 | #endif |
| 371 | zones_size[ZONE_NORMAL] = max_low_pfn - min_low_pfn; | 363 | #ifdef CONFIG_ZONE_DMA32 |
| 372 | 364 | max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN; | |
| 365 | #endif | ||
| 366 | max_zone_pfns[ZONE_NORMAL] = max_low_pfn; | ||
| 367 | lastpfn = max_low_pfn; | ||
| 373 | #ifdef CONFIG_HIGHMEM | 368 | #ifdef CONFIG_HIGHMEM |
| 374 | zones_size[ZONE_HIGHMEM] = highend_pfn - highstart_pfn; | 369 | max_zone_pfns[ZONE_HIGHMEM] = highend_pfn; |
| 370 | lastpfn = highend_pfn; | ||
| 375 | 371 | ||
| 376 | if (cpu_has_dc_aliases && zones_size[ZONE_HIGHMEM]) { | 372 | if (cpu_has_dc_aliases && max_low_pfn != highend_pfn) { |
| 377 | printk(KERN_WARNING "This processor doesn't support highmem." | 373 | printk(KERN_WARNING "This processor doesn't support highmem." |
| 378 | " %ldk highmem ignored\n", zones_size[ZONE_HIGHMEM]); | 374 | " %ldk highmem ignored\n", |
| 379 | zones_size[ZONE_HIGHMEM] = 0; | 375 | (highend_pfn - max_low_pfn) << (PAGE_SHIFT - 10)); |
| 376 | max_zone_pfns[ZONE_HIGHMEM] = max_low_pfn; | ||
| 377 | lastpfn = max_low_pfn; | ||
| 380 | } | 378 | } |
| 381 | #endif | 379 | #endif |
| 382 | 380 | ||
| 383 | #ifdef CONFIG_FLATMEM | 381 | free_area_init_nodes(max_zone_pfns); |
| 384 | free_area_init(zones_size); | ||
| 385 | #else | ||
| 386 | pfn = min_low_pfn; | ||
| 387 | for (i = 0; i < MAX_NR_ZONES; i++) | ||
| 388 | for (j = 0; j < zones_size[i]; j++, pfn++) | ||
| 389 | if (!page_is_ram(pfn)) | ||
| 390 | zholes_size[i]++; | ||
| 391 | free_area_init_node(0, NODE_DATA(0), zones_size, 0, zholes_size); | ||
| 392 | #endif | ||
| 393 | } | 382 | } |
| 394 | 383 | ||
| 395 | static struct kcore_list kcore_mem, kcore_vmalloc; | 384 | static struct kcore_list kcore_mem, kcore_vmalloc; |
diff --git a/arch/mips/pmc-sierra/Kconfig b/arch/mips/pmc-sierra/Kconfig index 6b293ce0935f..90261b83db04 100644 --- a/arch/mips/pmc-sierra/Kconfig +++ b/arch/mips/pmc-sierra/Kconfig | |||
| @@ -5,12 +5,14 @@ choice | |||
| 5 | config PMC_MSP4200_EVAL | 5 | config PMC_MSP4200_EVAL |
| 6 | bool "PMC-Sierra MSP4200 Eval Board" | 6 | bool "PMC-Sierra MSP4200 Eval Board" |
| 7 | select CEVT_R4K | 7 | select CEVT_R4K |
| 8 | select CSRC_R4K | ||
| 8 | select IRQ_MSP_SLP | 9 | select IRQ_MSP_SLP |
| 9 | select HW_HAS_PCI | 10 | select HW_HAS_PCI |
| 10 | 11 | ||
| 11 | config PMC_MSP4200_GW | 12 | config PMC_MSP4200_GW |
| 12 | bool "PMC-Sierra MSP4200 VoIP Gateway" | 13 | bool "PMC-Sierra MSP4200 VoIP Gateway" |
| 13 | select CEVT_R4K | 14 | select CEVT_R4K |
| 15 | select CSRC_R4K | ||
| 14 | select IRQ_MSP_SLP | 16 | select IRQ_MSP_SLP |
| 15 | select HW_HAS_PCI | 17 | select HW_HAS_PCI |
| 16 | 18 | ||
diff --git a/arch/mips/sgi-ip22/ip22-eisa.c b/arch/mips/sgi-ip22/ip22-eisa.c index 26854fb11e7c..1617241d2737 100644 --- a/arch/mips/sgi-ip22/ip22-eisa.c +++ b/arch/mips/sgi-ip22/ip22-eisa.c | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <asm/sgi/ioc.h> | 36 | #include <asm/sgi/ioc.h> |
| 37 | #include <asm/sgi/mc.h> | 37 | #include <asm/sgi/mc.h> |
| 38 | #include <asm/sgi/ip22.h> | 38 | #include <asm/sgi/ip22.h> |
| 39 | #include <asm/i8259.h> | ||
| 39 | 40 | ||
| 40 | /* I2 has four EISA slots. */ | 41 | /* I2 has four EISA slots. */ |
| 41 | #define IP22_EISA_MAX_SLOTS 4 | 42 | #define IP22_EISA_MAX_SLOTS 4 |
| @@ -93,126 +94,11 @@ static irqreturn_t ip22_eisa_intr(int irq, void *dev_id) | |||
| 93 | return IRQ_NONE; | 94 | return IRQ_NONE; |
| 94 | } | 95 | } |
| 95 | 96 | ||
| 96 | static void enable_eisa1_irq(unsigned int irq) | ||
| 97 | { | ||
| 98 | u8 mask; | ||
| 99 | |||
| 100 | mask = inb(EISA_INT1_MASK); | ||
| 101 | mask &= ~((u8) (1 << irq)); | ||
| 102 | outb(mask, EISA_INT1_MASK); | ||
| 103 | } | ||
| 104 | |||
| 105 | static unsigned int startup_eisa1_irq(unsigned int irq) | ||
| 106 | { | ||
| 107 | u8 edge; | ||
| 108 | |||
| 109 | /* Only use edge interrupts for EISA */ | ||
| 110 | |||
| 111 | edge = inb(EISA_INT1_EDGE_LEVEL); | ||
| 112 | edge &= ~((u8) (1 << irq)); | ||
| 113 | outb(edge, EISA_INT1_EDGE_LEVEL); | ||
| 114 | |||
| 115 | enable_eisa1_irq(irq); | ||
| 116 | return 0; | ||
| 117 | } | ||
| 118 | |||
| 119 | static void disable_eisa1_irq(unsigned int irq) | ||
| 120 | { | ||
| 121 | u8 mask; | ||
| 122 | |||
| 123 | mask = inb(EISA_INT1_MASK); | ||
| 124 | mask |= ((u8) (1 << irq)); | ||
| 125 | outb(mask, EISA_INT1_MASK); | ||
| 126 | } | ||
| 127 | |||
| 128 | static void mask_and_ack_eisa1_irq(unsigned int irq) | ||
| 129 | { | ||
| 130 | disable_eisa1_irq(irq); | ||
| 131 | |||
| 132 | outb(0x20, EISA_INT1_CTRL); | ||
| 133 | } | ||
| 134 | |||
| 135 | static void end_eisa1_irq(unsigned int irq) | ||
| 136 | { | ||
| 137 | if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) | ||
| 138 | enable_eisa1_irq(irq); | ||
| 139 | } | ||
| 140 | |||
| 141 | static struct irq_chip ip22_eisa1_irq_type = { | ||
| 142 | .name = "IP22 EISA", | ||
| 143 | .startup = startup_eisa1_irq, | ||
| 144 | .ack = mask_and_ack_eisa1_irq, | ||
| 145 | .mask = disable_eisa1_irq, | ||
| 146 | .mask_ack = mask_and_ack_eisa1_irq, | ||
| 147 | .unmask = enable_eisa1_irq, | ||
| 148 | .end = end_eisa1_irq, | ||
| 149 | }; | ||
| 150 | |||
| 151 | static void enable_eisa2_irq(unsigned int irq) | ||
| 152 | { | ||
| 153 | u8 mask; | ||
| 154 | |||
| 155 | mask = inb(EISA_INT2_MASK); | ||
| 156 | mask &= ~((u8) (1 << (irq - 8))); | ||
| 157 | outb(mask, EISA_INT2_MASK); | ||
| 158 | } | ||
| 159 | |||
| 160 | static unsigned int startup_eisa2_irq(unsigned int irq) | ||
| 161 | { | ||
| 162 | u8 edge; | ||
| 163 | |||
| 164 | /* Only use edge interrupts for EISA */ | ||
| 165 | |||
| 166 | edge = inb(EISA_INT2_EDGE_LEVEL); | ||
| 167 | edge &= ~((u8) (1 << (irq - 8))); | ||
| 168 | outb(edge, EISA_INT2_EDGE_LEVEL); | ||
| 169 | |||
| 170 | enable_eisa2_irq(irq); | ||
| 171 | return 0; | ||
| 172 | } | ||
| 173 | |||
| 174 | static void disable_eisa2_irq(unsigned int irq) | ||
| 175 | { | ||
| 176 | u8 mask; | ||
| 177 | |||
| 178 | mask = inb(EISA_INT2_MASK); | ||
| 179 | mask |= ((u8) (1 << (irq - 8))); | ||
| 180 | outb(mask, EISA_INT2_MASK); | ||
| 181 | } | ||
| 182 | |||
| 183 | static void mask_and_ack_eisa2_irq(unsigned int irq) | ||
| 184 | { | ||
| 185 | disable_eisa2_irq(irq); | ||
| 186 | |||
| 187 | outb(0x20, EISA_INT2_CTRL); | ||
| 188 | } | ||
| 189 | |||
| 190 | static void end_eisa2_irq(unsigned int irq) | ||
| 191 | { | ||
| 192 | if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) | ||
| 193 | enable_eisa2_irq(irq); | ||
| 194 | } | ||
| 195 | |||
| 196 | static struct irq_chip ip22_eisa2_irq_type = { | ||
| 197 | .name = "IP22 EISA", | ||
| 198 | .startup = startup_eisa2_irq, | ||
| 199 | .ack = mask_and_ack_eisa2_irq, | ||
| 200 | .mask = disable_eisa2_irq, | ||
| 201 | .mask_ack = mask_and_ack_eisa2_irq, | ||
| 202 | .unmask = enable_eisa2_irq, | ||
| 203 | .end = end_eisa2_irq, | ||
| 204 | }; | ||
| 205 | |||
| 206 | static struct irqaction eisa_action = { | 97 | static struct irqaction eisa_action = { |
| 207 | .handler = ip22_eisa_intr, | 98 | .handler = ip22_eisa_intr, |
| 208 | .name = "EISA", | 99 | .name = "EISA", |
| 209 | }; | 100 | }; |
| 210 | 101 | ||
| 211 | static struct irqaction cascade_action = { | ||
| 212 | .handler = no_action, | ||
| 213 | .name = "EISA cascade", | ||
| 214 | }; | ||
| 215 | |||
| 216 | int __init ip22_eisa_init(void) | 102 | int __init ip22_eisa_init(void) |
| 217 | { | 103 | { |
| 218 | int i, c; | 104 | int i, c; |
| @@ -248,29 +134,13 @@ int __init ip22_eisa_init(void) | |||
| 248 | outb(1, EISA_EXT_NMI_RESET_CTRL); | 134 | outb(1, EISA_EXT_NMI_RESET_CTRL); |
| 249 | udelay(50); /* Wait long enough for the dust to settle */ | 135 | udelay(50); /* Wait long enough for the dust to settle */ |
| 250 | outb(0, EISA_EXT_NMI_RESET_CTRL); | 136 | outb(0, EISA_EXT_NMI_RESET_CTRL); |
| 251 | outb(0x11, EISA_INT1_CTRL); | ||
| 252 | outb(0x11, EISA_INT2_CTRL); | ||
| 253 | outb(0, EISA_INT1_MASK); | ||
| 254 | outb(8, EISA_INT2_MASK); | ||
| 255 | outb(4, EISA_INT1_MASK); | ||
| 256 | outb(2, EISA_INT2_MASK); | ||
| 257 | outb(1, EISA_INT1_MASK); | ||
| 258 | outb(1, EISA_INT2_MASK); | ||
| 259 | outb(0xfb, EISA_INT1_MASK); | ||
| 260 | outb(0xff, EISA_INT2_MASK); | ||
| 261 | outb(0, EISA_DMA2_WRITE_SINGLE); | 137 | outb(0, EISA_DMA2_WRITE_SINGLE); |
| 262 | 138 | ||
| 263 | for (i = SGINT_EISA; i < (SGINT_EISA + EISA_MAX_IRQ); i++) { | 139 | init_i8259_irqs(); |
| 264 | if (i < (SGINT_EISA + 8)) | ||
| 265 | set_irq_chip(i, &ip22_eisa1_irq_type); | ||
| 266 | else | ||
| 267 | set_irq_chip(i, &ip22_eisa2_irq_type); | ||
| 268 | } | ||
| 269 | 140 | ||
| 270 | /* Cannot use request_irq because of kmalloc not being ready at such | 141 | /* Cannot use request_irq because of kmalloc not being ready at such |
| 271 | * an early stage. Yes, I've been bitten... */ | 142 | * an early stage. Yes, I've been bitten... */ |
| 272 | setup_irq(SGI_EISA_IRQ, &eisa_action); | 143 | setup_irq(SGI_EISA_IRQ, &eisa_action); |
| 273 | setup_irq(SGINT_EISA + 2, &cascade_action); | ||
| 274 | 144 | ||
| 275 | EISA_bus = 1; | 145 | EISA_bus = 1; |
| 276 | return 0; | 146 | return 0; |
diff --git a/arch/mips/sgi-ip22/ip22-nvram.c b/arch/mips/sgi-ip22/ip22-nvram.c index e19d60d5fcc1..0177566475d4 100644 --- a/arch/mips/sgi-ip22/ip22-nvram.c +++ b/arch/mips/sgi-ip22/ip22-nvram.c | |||
| @@ -32,19 +32,19 @@ | |||
| 32 | for (x=0; x<100000; x++) __asm__ __volatile__(""); }) | 32 | for (x=0; x<100000; x++) __asm__ __volatile__(""); }) |
| 33 | 33 | ||
| 34 | #define eeprom_cs_on(ptr) ({ \ | 34 | #define eeprom_cs_on(ptr) ({ \ |
| 35 | *ptr &= ~EEPROM_DATO; \ | 35 | __raw_writel(__raw_readl(ptr) & ~EEPROM_DATO, ptr); \ |
| 36 | *ptr &= ~EEPROM_ECLK; \ | 36 | __raw_writel(__raw_readl(ptr) & ~EEPROM_ECLK, ptr); \ |
| 37 | *ptr &= ~EEPROM_EPROT; \ | 37 | __raw_writel(__raw_readl(ptr) & ~EEPROM_EPROT, ptr); \ |
| 38 | delay(); \ | 38 | delay(); \ |
| 39 | *ptr |= EEPROM_CSEL; \ | 39 | __raw_writel(__raw_readl(ptr) | EEPROM_CSEL, ptr); \ |
| 40 | *ptr |= EEPROM_ECLK; }) | 40 | __raw_writel(__raw_readl(ptr) | EEPROM_ECLK, ptr); }) |
| 41 | 41 | ||
| 42 | 42 | ||
| 43 | #define eeprom_cs_off(ptr) ({ \ | 43 | #define eeprom_cs_off(ptr) ({ \ |
| 44 | *ptr &= ~EEPROM_ECLK; \ | 44 | __raw_writel(__raw_readl(ptr) & ~EEPROM_ECLK, ptr); \ |
| 45 | *ptr &= ~EEPROM_CSEL; \ | 45 | __raw_writel(__raw_readl(ptr) & ~EEPROM_CSEL, ptr); \ |
| 46 | *ptr |= EEPROM_EPROT; \ | 46 | __raw_writel(__raw_readl(ptr) | EEPROM_EPROT, ptr); \ |
| 47 | *ptr |= EEPROM_ECLK; }) | 47 | __raw_writel(__raw_readl(ptr) | EEPROM_ECLK, ptr); }) |
| 48 | 48 | ||
| 49 | #define BITS_IN_COMMAND 11 | 49 | #define BITS_IN_COMMAND 11 |
| 50 | /* | 50 | /* |
| @@ -60,15 +60,17 @@ static inline void eeprom_cmd(unsigned int *ctrl, unsigned cmd, unsigned reg) | |||
| 60 | ser_cmd = cmd | (reg << (16 - BITS_IN_COMMAND)); | 60 | ser_cmd = cmd | (reg << (16 - BITS_IN_COMMAND)); |
| 61 | for (i = 0; i < BITS_IN_COMMAND; i++) { | 61 | for (i = 0; i < BITS_IN_COMMAND; i++) { |
| 62 | if (ser_cmd & (1<<15)) /* if high order bit set */ | 62 | if (ser_cmd & (1<<15)) /* if high order bit set */ |
| 63 | writel(readl(ctrl) | EEPROM_DATO, ctrl); | 63 | __raw_writel(__raw_readl(ctrl) | EEPROM_DATO, ctrl); |
| 64 | else | 64 | else |
| 65 | writel(readl(ctrl) & ~EEPROM_DATO, ctrl); | 65 | __raw_writel(__raw_readl(ctrl) & ~EEPROM_DATO, ctrl); |
| 66 | writel(readl(ctrl) & ~EEPROM_ECLK, ctrl); | 66 | __raw_writel(__raw_readl(ctrl) & ~EEPROM_ECLK, ctrl); |
| 67 | writel(readl(ctrl) | EEPROM_ECLK, ctrl); | 67 | delay(); |
| 68 | __raw_writel(__raw_readl(ctrl) | EEPROM_ECLK, ctrl); | ||
| 69 | delay(); | ||
| 68 | ser_cmd <<= 1; | 70 | ser_cmd <<= 1; |
| 69 | } | 71 | } |
| 70 | /* see data sheet timing diagram */ | 72 | /* see data sheet timing diagram */ |
| 71 | writel(readl(ctrl) & ~EEPROM_DATO, ctrl); | 73 | __raw_writel(__raw_readl(ctrl) & ~EEPROM_DATO, ctrl); |
| 72 | } | 74 | } |
| 73 | 75 | ||
| 74 | unsigned short ip22_eeprom_read(unsigned int *ctrl, int reg) | 76 | unsigned short ip22_eeprom_read(unsigned int *ctrl, int reg) |
| @@ -76,18 +78,18 @@ unsigned short ip22_eeprom_read(unsigned int *ctrl, int reg) | |||
| 76 | unsigned short res = 0; | 78 | unsigned short res = 0; |
| 77 | int i; | 79 | int i; |
| 78 | 80 | ||
| 79 | writel(readl(ctrl) & ~EEPROM_EPROT, ctrl); | 81 | __raw_writel(__raw_readl(ctrl) & ~EEPROM_EPROT, ctrl); |
| 80 | eeprom_cs_on(ctrl); | 82 | eeprom_cs_on(ctrl); |
| 81 | eeprom_cmd(ctrl, EEPROM_READ, reg); | 83 | eeprom_cmd(ctrl, EEPROM_READ, reg); |
| 82 | 84 | ||
| 83 | /* clock the data ouf of serial mem */ | 85 | /* clock the data ouf of serial mem */ |
| 84 | for (i = 0; i < 16; i++) { | 86 | for (i = 0; i < 16; i++) { |
| 85 | writel(readl(ctrl) & ~EEPROM_ECLK, ctrl); | 87 | __raw_writel(__raw_readl(ctrl) & ~EEPROM_ECLK, ctrl); |
| 86 | delay(); | 88 | delay(); |
| 87 | writel(readl(ctrl) | EEPROM_ECLK, ctrl); | 89 | __raw_writel(__raw_readl(ctrl) | EEPROM_ECLK, ctrl); |
| 88 | delay(); | 90 | delay(); |
| 89 | res <<= 1; | 91 | res <<= 1; |
| 90 | if (readl(ctrl) & EEPROM_DATI) | 92 | if (__raw_readl(ctrl) & EEPROM_DATI) |
| 91 | res |= 1; | 93 | res |= 1; |
| 92 | } | 94 | } |
| 93 | 95 | ||
diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c index aab17ddd2f30..cab7cc22ab67 100644 --- a/arch/mips/sgi-ip32/ip32-irq.c +++ b/arch/mips/sgi-ip32/ip32-irq.c | |||
| @@ -209,18 +209,18 @@ static unsigned long macepci_mask; | |||
| 209 | 209 | ||
| 210 | static void enable_macepci_irq(unsigned int irq) | 210 | static void enable_macepci_irq(unsigned int irq) |
| 211 | { | 211 | { |
| 212 | macepci_mask |= MACEPCI_CONTROL_INT(irq - 9); | 212 | macepci_mask |= MACEPCI_CONTROL_INT(irq - MACEPCI_SCSI0_IRQ); |
| 213 | mace->pci.control = macepci_mask; | 213 | mace->pci.control = macepci_mask; |
| 214 | crime_mask |= 1 << (irq - 1); | 214 | crime_mask |= 1 << (irq - CRIME_IRQ_BASE); |
| 215 | crime->imask = crime_mask; | 215 | crime->imask = crime_mask; |
| 216 | } | 216 | } |
| 217 | 217 | ||
| 218 | static void disable_macepci_irq(unsigned int irq) | 218 | static void disable_macepci_irq(unsigned int irq) |
| 219 | { | 219 | { |
| 220 | crime_mask &= ~(1 << (irq - 1)); | 220 | crime_mask &= ~(1 << (irq - CRIME_IRQ_BASE)); |
| 221 | crime->imask = crime_mask; | 221 | crime->imask = crime_mask; |
| 222 | flush_crime_bus(); | 222 | flush_crime_bus(); |
| 223 | macepci_mask &= ~MACEPCI_CONTROL_INT(irq - 9); | 223 | macepci_mask &= ~MACEPCI_CONTROL_INT(irq - MACEPCI_SCSI0_IRQ); |
| 224 | mace->pci.control = macepci_mask; | 224 | mace->pci.control = macepci_mask; |
| 225 | flush_mace_bus(); | 225 | flush_mace_bus(); |
| 226 | } | 226 | } |
| @@ -299,7 +299,7 @@ static void enable_maceisa_irq(unsigned int irq) | |||
| 299 | pr_debug("crime_int %08x enabled\n", crime_int); | 299 | pr_debug("crime_int %08x enabled\n", crime_int); |
| 300 | crime_mask |= crime_int; | 300 | crime_mask |= crime_int; |
| 301 | crime->imask = crime_mask; | 301 | crime->imask = crime_mask; |
| 302 | maceisa_mask |= 1 << (irq - 33); | 302 | maceisa_mask |= 1 << (irq - MACEISA_AUDIO_SW_IRQ); |
| 303 | mace->perif.ctrl.imask = maceisa_mask; | 303 | mace->perif.ctrl.imask = maceisa_mask; |
| 304 | } | 304 | } |
| 305 | 305 | ||
| @@ -307,7 +307,7 @@ static void disable_maceisa_irq(unsigned int irq) | |||
| 307 | { | 307 | { |
| 308 | unsigned int crime_int = 0; | 308 | unsigned int crime_int = 0; |
| 309 | 309 | ||
| 310 | maceisa_mask &= ~(1 << (irq - 33)); | 310 | maceisa_mask &= ~(1 << (irq - MACEISA_AUDIO_SW_IRQ)); |
| 311 | if (!(maceisa_mask & MACEISA_AUDIO_INT)) | 311 | if (!(maceisa_mask & MACEISA_AUDIO_INT)) |
| 312 | crime_int |= MACE_AUDIO_INT; | 312 | crime_int |= MACE_AUDIO_INT; |
| 313 | if (!(maceisa_mask & MACEISA_MISC_INT)) | 313 | if (!(maceisa_mask & MACEISA_MISC_INT)) |
| @@ -331,7 +331,7 @@ static void mask_and_ack_maceisa_irq(unsigned int irq) | |||
| 331 | case MACEISA_SERIAL2_TDMAPR_IRQ: | 331 | case MACEISA_SERIAL2_TDMAPR_IRQ: |
| 332 | /* edge triggered */ | 332 | /* edge triggered */ |
| 333 | mace_int = mace->perif.ctrl.istat; | 333 | mace_int = mace->perif.ctrl.istat; |
| 334 | mace_int &= ~(1 << (irq - 33)); | 334 | mace_int &= ~(1 << (irq - MACEISA_AUDIO_SW_IRQ)); |
| 335 | mace->perif.ctrl.istat = mace_int; | 335 | mace->perif.ctrl.istat = mace_int; |
| 336 | break; | 336 | break; |
| 337 | } | 337 | } |
| @@ -359,13 +359,17 @@ static struct irq_chip ip32_maceisa_interrupt = { | |||
| 359 | 359 | ||
| 360 | static void enable_mace_irq(unsigned int irq) | 360 | static void enable_mace_irq(unsigned int irq) |
| 361 | { | 361 | { |
| 362 | crime_mask |= 1 << (irq - 1); | 362 | unsigned int bit = irq - CRIME_IRQ_BASE; |
| 363 | |||
| 364 | crime_mask |= (1 << bit); | ||
| 363 | crime->imask = crime_mask; | 365 | crime->imask = crime_mask; |
| 364 | } | 366 | } |
| 365 | 367 | ||
| 366 | static void disable_mace_irq(unsigned int irq) | 368 | static void disable_mace_irq(unsigned int irq) |
| 367 | { | 369 | { |
| 368 | crime_mask &= ~(1 << (irq - 1)); | 370 | unsigned int bit = irq - CRIME_IRQ_BASE; |
| 371 | |||
| 372 | crime_mask &= ~(1 << bit); | ||
| 369 | crime->imask = crime_mask; | 373 | crime->imask = crime_mask; |
| 370 | flush_crime_bus(); | 374 | flush_crime_bus(); |
| 371 | } | 375 | } |
| @@ -489,7 +493,7 @@ void __init arch_init_irq(void) | |||
| 489 | mace->perif.ctrl.imask = 0; | 493 | mace->perif.ctrl.imask = 0; |
| 490 | 494 | ||
| 491 | mips_cpu_irq_init(); | 495 | mips_cpu_irq_init(); |
| 492 | for (irq = MIPS_CPU_IRQ_BASE + 8; irq <= IP32_IRQ_MAX; irq++) { | 496 | for (irq = CRIME_IRQ_BASE; irq <= IP32_IRQ_MAX; irq++) { |
| 493 | switch (irq) { | 497 | switch (irq) { |
| 494 | case MACE_VID_IN1_IRQ ... MACE_PCI_BRIDGE_IRQ: | 498 | case MACE_VID_IN1_IRQ ... MACE_PCI_BRIDGE_IRQ: |
| 495 | set_irq_chip(irq, &ip32_mace_interrupt); | 499 | set_irq_chip(irq, &ip32_mace_interrupt); |
diff --git a/arch/mips/vr41xx/Kconfig b/arch/mips/vr41xx/Kconfig index eeb089f20c0d..559acc09c819 100644 --- a/arch/mips/vr41xx/Kconfig +++ b/arch/mips/vr41xx/Kconfig | |||
| @@ -6,6 +6,7 @@ choice | |||
| 6 | config CASIO_E55 | 6 | config CASIO_E55 |
| 7 | bool "CASIO CASSIOPEIA E-10/15/55/65" | 7 | bool "CASIO CASSIOPEIA E-10/15/55/65" |
| 8 | select CEVT_R4K | 8 | select CEVT_R4K |
| 9 | select CSRC_R4K | ||
| 9 | select DMA_NONCOHERENT | 10 | select DMA_NONCOHERENT |
| 10 | select IRQ_CPU | 11 | select IRQ_CPU |
| 11 | select ISA | 12 | select ISA |
| @@ -15,6 +16,7 @@ config CASIO_E55 | |||
| 15 | config IBM_WORKPAD | 16 | config IBM_WORKPAD |
| 16 | bool "IBM WorkPad z50" | 17 | bool "IBM WorkPad z50" |
| 17 | select CEVT_R4K | 18 | select CEVT_R4K |
| 19 | select CSRC_R4K | ||
| 18 | select DMA_NONCOHERENT | 20 | select DMA_NONCOHERENT |
| 19 | select IRQ_CPU | 21 | select IRQ_CPU |
| 20 | select ISA | 22 | select ISA |
| @@ -24,6 +26,7 @@ config IBM_WORKPAD | |||
| 24 | config NEC_CMBVR4133 | 26 | config NEC_CMBVR4133 |
| 25 | bool "NEC CMB-VR4133" | 27 | bool "NEC CMB-VR4133" |
| 26 | select CEVT_R4K | 28 | select CEVT_R4K |
| 29 | select CSRC_R4K | ||
| 27 | select DMA_NONCOHERENT | 30 | select DMA_NONCOHERENT |
| 28 | select IRQ_CPU | 31 | select IRQ_CPU |
| 29 | select HW_HAS_PCI | 32 | select HW_HAS_PCI |
| @@ -33,6 +36,7 @@ config NEC_CMBVR4133 | |||
| 33 | config TANBAC_TB022X | 36 | config TANBAC_TB022X |
| 34 | bool "TANBAC VR4131 multichip module and TANBAC VR4131DIMM" | 37 | bool "TANBAC VR4131 multichip module and TANBAC VR4131DIMM" |
| 35 | select CEVT_R4K | 38 | select CEVT_R4K |
| 39 | select CSRC_R4K | ||
| 36 | select DMA_NONCOHERENT | 40 | select DMA_NONCOHERENT |
| 37 | select IRQ_CPU | 41 | select IRQ_CPU |
| 38 | select HW_HAS_PCI | 42 | select HW_HAS_PCI |
| @@ -48,6 +52,7 @@ config TANBAC_TB022X | |||
| 48 | config VICTOR_MPC30X | 52 | config VICTOR_MPC30X |
| 49 | bool "Victor MP-C303/304" | 53 | bool "Victor MP-C303/304" |
| 50 | select CEVT_R4K | 54 | select CEVT_R4K |
| 55 | select CSRC_R4K | ||
| 51 | select DMA_NONCOHERENT | 56 | select DMA_NONCOHERENT |
| 52 | select IRQ_CPU | 57 | select IRQ_CPU |
| 53 | select HW_HAS_PCI | 58 | select HW_HAS_PCI |
| @@ -58,6 +63,7 @@ config VICTOR_MPC30X | |||
| 58 | config ZAO_CAPCELLA | 63 | config ZAO_CAPCELLA |
| 59 | bool "ZAO Networks Capcella" | 64 | bool "ZAO Networks Capcella" |
| 60 | select CEVT_R4K | 65 | select CEVT_R4K |
| 66 | select CSRC_R4K | ||
| 61 | select DMA_NONCOHERENT | 67 | select DMA_NONCOHERENT |
| 62 | select IRQ_CPU | 68 | select IRQ_CPU |
| 63 | select HW_HAS_PCI | 69 | select HW_HAS_PCI |
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts index fcd333c391ec..c64f3037a13b 100644 --- a/arch/powerpc/boot/dts/mpc832x_mds.dts +++ b/arch/powerpc/boot/dts/mpc832x_mds.dts | |||
| @@ -57,12 +57,19 @@ | |||
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | i2c@3000 { | 59 | i2c@3000 { |
| 60 | #address-cells = <1>; | ||
| 61 | #size-cells = <0>; | ||
| 60 | device_type = "i2c"; | 62 | device_type = "i2c"; |
| 61 | compatible = "fsl-i2c"; | 63 | compatible = "fsl-i2c"; |
| 62 | reg = <3000 100>; | 64 | reg = <3000 100>; |
| 63 | interrupts = <e 8>; | 65 | interrupts = <e 8>; |
| 64 | interrupt-parent = < &ipic >; | 66 | interrupt-parent = < &ipic >; |
| 65 | dfsrr; | 67 | dfsrr; |
| 68 | |||
| 69 | rtc@68 { | ||
| 70 | compatible = "dallas,ds1374"; | ||
| 71 | reg = <68>; | ||
| 72 | }; | ||
| 66 | }; | 73 | }; |
| 67 | 74 | ||
| 68 | serial@4500 { | 75 | serial@4500 { |
| @@ -104,7 +111,7 @@ | |||
| 104 | reg = <700 100>; | 111 | reg = <700 100>; |
| 105 | device_type = "ipic"; | 112 | device_type = "ipic"; |
| 106 | }; | 113 | }; |
| 107 | 114 | ||
| 108 | par_io@1400 { | 115 | par_io@1400 { |
| 109 | reg = <1400 100>; | 116 | reg = <1400 100>; |
| 110 | device_type = "par_io"; | 117 | device_type = "par_io"; |
| @@ -117,7 +124,6 @@ | |||
| 117 | 3 5 1 0 2 0 /* MDC */ | 124 | 3 5 1 0 2 0 /* MDC */ |
| 118 | 0 d 2 0 1 0 /* RX_CLK (CLK9) */ | 125 | 0 d 2 0 1 0 /* RX_CLK (CLK9) */ |
| 119 | 3 18 2 0 1 0 /* TX_CLK (CLK10) */ | 126 | 3 18 2 0 1 0 /* TX_CLK (CLK10) */ |
| 120 | 1 1 1 0 1 0 /* TxD1 */ | ||
| 121 | 1 0 1 0 1 0 /* TxD0 */ | 127 | 1 0 1 0 1 0 /* TxD0 */ |
| 122 | 1 1 1 0 1 0 /* TxD1 */ | 128 | 1 1 1 0 1 0 /* TxD1 */ |
| 123 | 1 2 1 0 1 0 /* TxD2 */ | 129 | 1 2 1 0 1 0 /* TxD2 */ |
| @@ -165,11 +171,11 @@ | |||
| 165 | reg = <e0100000 480>; | 171 | reg = <e0100000 480>; |
| 166 | brg-frequency = <0>; | 172 | brg-frequency = <0>; |
| 167 | bus-frequency = <BCD3D80>; | 173 | bus-frequency = <BCD3D80>; |
| 168 | 174 | ||
| 169 | muram@10000 { | 175 | muram@10000 { |
| 170 | device_type = "muram"; | 176 | device_type = "muram"; |
| 171 | ranges = <0 00010000 00004000>; | 177 | ranges = <0 00010000 00004000>; |
| 172 | 178 | ||
| 173 | data-only@0 { | 179 | data-only@0 { |
| 174 | reg = <0 4000>; | 180 | reg = <0 4000>; |
| 175 | }; | 181 | }; |
| @@ -228,7 +234,7 @@ | |||
| 228 | compatible = "ucc_geth"; | 234 | compatible = "ucc_geth"; |
| 229 | model = "UCC"; | 235 | model = "UCC"; |
| 230 | device-id = <4>; | 236 | device-id = <4>; |
| 231 | reg = <3000 200>; | 237 | reg = <3200 200>; |
| 232 | interrupts = <23>; | 238 | interrupts = <23>; |
| 233 | interrupt-parent = < &qeic >; | 239 | interrupt-parent = < &qeic >; |
| 234 | /* | 240 | /* |
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts index e5a84ef9f4b0..49363f89cb71 100644 --- a/arch/powerpc/boot/dts/mpc834x_mds.dts +++ b/arch/powerpc/boot/dts/mpc834x_mds.dts | |||
| @@ -57,15 +57,24 @@ | |||
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | i2c@3000 { | 59 | i2c@3000 { |
| 60 | #address-cells = <1>; | ||
| 61 | #size-cells = <0>; | ||
| 60 | device_type = "i2c"; | 62 | device_type = "i2c"; |
| 61 | compatible = "fsl-i2c"; | 63 | compatible = "fsl-i2c"; |
| 62 | reg = <3000 100>; | 64 | reg = <3000 100>; |
| 63 | interrupts = <e 8>; | 65 | interrupts = <e 8>; |
| 64 | interrupt-parent = < &ipic >; | 66 | interrupt-parent = < &ipic >; |
| 65 | dfsrr; | 67 | dfsrr; |
| 68 | |||
| 69 | rtc@68 { | ||
| 70 | compatible = "dallas,ds1374"; | ||
| 71 | reg = <68>; | ||
| 72 | }; | ||
| 66 | }; | 73 | }; |
| 67 | 74 | ||
| 68 | i2c@3100 { | 75 | i2c@3100 { |
| 76 | #address-cells = <1>; | ||
| 77 | #size-cells = <0>; | ||
| 69 | device_type = "i2c"; | 78 | device_type = "i2c"; |
| 70 | compatible = "fsl-i2c"; | 79 | compatible = "fsl-i2c"; |
| 71 | reg = <3100 100>; | 80 | reg = <3100 100>; |
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts index fbd1573c348b..0b2d2b588daa 100644 --- a/arch/powerpc/boot/dts/mpc836x_mds.dts +++ b/arch/powerpc/boot/dts/mpc836x_mds.dts | |||
| @@ -62,15 +62,24 @@ | |||
| 62 | }; | 62 | }; |
| 63 | 63 | ||
| 64 | i2c@3000 { | 64 | i2c@3000 { |
| 65 | #address-cells = <1>; | ||
| 66 | #size-cells = <0>; | ||
| 65 | device_type = "i2c"; | 67 | device_type = "i2c"; |
| 66 | compatible = "fsl-i2c"; | 68 | compatible = "fsl-i2c"; |
| 67 | reg = <3000 100>; | 69 | reg = <3000 100>; |
| 68 | interrupts = <e 8>; | 70 | interrupts = <e 8>; |
| 69 | interrupt-parent = < &ipic >; | 71 | interrupt-parent = < &ipic >; |
| 70 | dfsrr; | 72 | dfsrr; |
| 73 | |||
| 74 | rtc@68 { | ||
| 75 | compatible = "dallas,ds1374"; | ||
| 76 | reg = <68>; | ||
| 77 | }; | ||
| 71 | }; | 78 | }; |
| 72 | 79 | ||
| 73 | i2c@3100 { | 80 | i2c@3100 { |
| 81 | #address-cells = <1>; | ||
| 82 | #size-cells = <0>; | ||
| 74 | device_type = "i2c"; | 83 | device_type = "i2c"; |
| 75 | compatible = "fsl-i2c"; | 84 | compatible = "fsl-i2c"; |
| 76 | reg = <3100 100>; | 85 | reg = <3100 100>; |
diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts index 3f9d15cf13e0..6c608de1fc1b 100644 --- a/arch/powerpc/boot/dts/mpc8544ds.dts +++ b/arch/powerpc/boot/dts/mpc8544ds.dts | |||
| @@ -272,24 +272,24 @@ | |||
| 272 | clock-frequency = <1fca055>; | 272 | clock-frequency = <1fca055>; |
| 273 | interrupt-parent = <&mpic>; | 273 | interrupt-parent = <&mpic>; |
| 274 | interrupts = <1b 2>; | 274 | interrupts = <1b 2>; |
| 275 | interrupt-map-mask = <fb00 0 0 0>; | 275 | interrupt-map-mask = <ff00 0 0 1>; |
| 276 | interrupt-map = < | 276 | interrupt-map = < |
| 277 | // IDSEL 0x1c USB | 277 | // IDSEL 0x1c USB |
| 278 | e000 0 0 0 &i8259 c 2 | 278 | e000 0 0 1 &i8259 c 2 |
| 279 | e100 0 0 0 &i8259 9 2 | 279 | e100 0 0 1 &i8259 9 2 |
| 280 | e200 0 0 0 &i8259 a 2 | 280 | e200 0 0 1 &i8259 a 2 |
| 281 | e300 0 0 0 &i8259 b 2 | 281 | e300 0 0 1 &i8259 b 2 |
| 282 | 282 | ||
| 283 | // IDSEL 0x1d Audio | 283 | // IDSEL 0x1d Audio |
| 284 | e800 0 0 0 &i8259 6 2 | 284 | e800 0 0 1 &i8259 6 2 |
| 285 | 285 | ||
| 286 | // IDSEL 0x1e Legacy | 286 | // IDSEL 0x1e Legacy |
| 287 | f000 0 0 0 &i8259 7 2 | 287 | f000 0 0 1 &i8259 7 2 |
| 288 | f100 0 0 0 &i8259 7 2 | 288 | f100 0 0 1 &i8259 7 2 |
| 289 | 289 | ||
| 290 | // IDSEL 0x1f IDE/SATA | 290 | // IDSEL 0x1f IDE/SATA |
| 291 | f800 0 0 0 &i8259 e 2 | 291 | f800 0 0 1 &i8259 e 2 |
| 292 | f900 0 0 0 &i8259 5 2 | 292 | f900 0 0 1 &i8259 5 2 |
| 293 | >; | 293 | >; |
| 294 | 294 | ||
| 295 | pcie@0 { | 295 | pcie@0 { |
diff --git a/arch/powerpc/boot/dts/mpc8572ds.dts b/arch/powerpc/boot/dts/mpc8572ds.dts index d638deec7652..0eb44fb9647d 100644 --- a/arch/powerpc/boot/dts/mpc8572ds.dts +++ b/arch/powerpc/boot/dts/mpc8572ds.dts | |||
| @@ -219,36 +219,120 @@ | |||
| 219 | clock-frequency = <1fca055>; | 219 | clock-frequency = <1fca055>; |
| 220 | interrupt-parent = <&mpic>; | 220 | interrupt-parent = <&mpic>; |
| 221 | interrupts = <18 2>; | 221 | interrupts = <18 2>; |
| 222 | interrupt-map-mask = <fb00 0 0 0>; | 222 | interrupt-map-mask = <ff00 0 0 7>; |
| 223 | interrupt-map = < | 223 | interrupt-map = < |
| 224 | /* IDSEL 0x11 - PCI slot 1 */ | 224 | /* IDSEL 0x11 func 0 - PCI slot 1 */ |
| 225 | 8800 0 0 1 &mpic 2 1 | 225 | 8800 0 0 1 &mpic 2 1 |
| 226 | 8800 0 0 2 &mpic 3 1 | 226 | 8800 0 0 2 &mpic 3 1 |
| 227 | 8800 0 0 3 &mpic 4 1 | 227 | 8800 0 0 3 &mpic 4 1 |
| 228 | 8800 0 0 4 &mpic 1 1 | 228 | 8800 0 0 4 &mpic 1 1 |
| 229 | 229 | ||
| 230 | /* IDSEL 0x12 - PCI slot 2 */ | 230 | /* IDSEL 0x11 func 1 - PCI slot 1 */ |
| 231 | 8900 0 0 1 &mpic 2 1 | ||
| 232 | 8900 0 0 2 &mpic 3 1 | ||
| 233 | 8900 0 0 3 &mpic 4 1 | ||
| 234 | 8900 0 0 4 &mpic 1 1 | ||
| 235 | |||
| 236 | /* IDSEL 0x11 func 2 - PCI slot 1 */ | ||
| 237 | 8a00 0 0 1 &mpic 2 1 | ||
| 238 | 8a00 0 0 2 &mpic 3 1 | ||
| 239 | 8a00 0 0 3 &mpic 4 1 | ||
| 240 | 8a00 0 0 4 &mpic 1 1 | ||
| 241 | |||
| 242 | /* IDSEL 0x11 func 3 - PCI slot 1 */ | ||
| 243 | 8b00 0 0 1 &mpic 2 1 | ||
| 244 | 8b00 0 0 2 &mpic 3 1 | ||
| 245 | 8b00 0 0 3 &mpic 4 1 | ||
| 246 | 8b00 0 0 4 &mpic 1 1 | ||
| 247 | |||
| 248 | /* IDSEL 0x11 func 4 - PCI slot 1 */ | ||
| 249 | 8c00 0 0 1 &mpic 2 1 | ||
| 250 | 8c00 0 0 2 &mpic 3 1 | ||
| 251 | 8c00 0 0 3 &mpic 4 1 | ||
| 252 | 8c00 0 0 4 &mpic 1 1 | ||
| 253 | |||
| 254 | /* IDSEL 0x11 func 5 - PCI slot 1 */ | ||
| 255 | 8d00 0 0 1 &mpic 2 1 | ||
| 256 | 8d00 0 0 2 &mpic 3 1 | ||
| 257 | 8d00 0 0 3 &mpic 4 1 | ||
| 258 | 8d00 0 0 4 &mpic 1 1 | ||
| 259 | |||
| 260 | /* IDSEL 0x11 func 6 - PCI slot 1 */ | ||
| 261 | 8e00 0 0 1 &mpic 2 1 | ||
| 262 | 8e00 0 0 2 &mpic 3 1 | ||
| 263 | 8e00 0 0 3 &mpic 4 1 | ||
| 264 | 8e00 0 0 4 &mpic 1 1 | ||
| 265 | |||
| 266 | /* IDSEL 0x11 func 7 - PCI slot 1 */ | ||
| 267 | 8f00 0 0 1 &mpic 2 1 | ||
| 268 | 8f00 0 0 2 &mpic 3 1 | ||
| 269 | 8f00 0 0 3 &mpic 4 1 | ||
| 270 | 8f00 0 0 4 &mpic 1 1 | ||
| 271 | |||
| 272 | /* IDSEL 0x12 func 0 - PCI slot 2 */ | ||
| 231 | 9000 0 0 1 &mpic 3 1 | 273 | 9000 0 0 1 &mpic 3 1 |
| 232 | 9000 0 0 2 &mpic 4 1 | 274 | 9000 0 0 2 &mpic 4 1 |
| 233 | 9000 0 0 3 &mpic 1 1 | 275 | 9000 0 0 3 &mpic 1 1 |
| 234 | 9000 0 0 4 &mpic 2 1 | 276 | 9000 0 0 4 &mpic 2 1 |
| 235 | 277 | ||
| 278 | /* IDSEL 0x12 func 1 - PCI slot 2 */ | ||
| 279 | 9100 0 0 1 &mpic 3 1 | ||
| 280 | 9100 0 0 2 &mpic 4 1 | ||
| 281 | 9100 0 0 3 &mpic 1 1 | ||
| 282 | 9100 0 0 4 &mpic 2 1 | ||
| 283 | |||
| 284 | /* IDSEL 0x12 func 2 - PCI slot 2 */ | ||
| 285 | 9200 0 0 1 &mpic 3 1 | ||
| 286 | 9200 0 0 2 &mpic 4 1 | ||
| 287 | 9200 0 0 3 &mpic 1 1 | ||
| 288 | 9200 0 0 4 &mpic 2 1 | ||
| 289 | |||
| 290 | /* IDSEL 0x12 func 3 - PCI slot 2 */ | ||
| 291 | 9300 0 0 1 &mpic 3 1 | ||
| 292 | 9300 0 0 2 &mpic 4 1 | ||
| 293 | 9300 0 0 3 &mpic 1 1 | ||
| 294 | 9300 0 0 4 &mpic 2 1 | ||
| 295 | |||
| 296 | /* IDSEL 0x12 func 4 - PCI slot 2 */ | ||
| 297 | 9400 0 0 1 &mpic 3 1 | ||
| 298 | 9400 0 0 2 &mpic 4 1 | ||
| 299 | 9400 0 0 3 &mpic 1 1 | ||
| 300 | 9400 0 0 4 &mpic 2 1 | ||
| 301 | |||
| 302 | /* IDSEL 0x12 func 5 - PCI slot 2 */ | ||
| 303 | 9500 0 0 1 &mpic 3 1 | ||
| 304 | 9500 0 0 2 &mpic 4 1 | ||
| 305 | 9500 0 0 3 &mpic 1 1 | ||
| 306 | 9500 0 0 4 &mpic 2 1 | ||
| 307 | |||
| 308 | /* IDSEL 0x12 func 6 - PCI slot 2 */ | ||
| 309 | 9600 0 0 1 &mpic 3 1 | ||
| 310 | 9600 0 0 2 &mpic 4 1 | ||
| 311 | 9600 0 0 3 &mpic 1 1 | ||
| 312 | 9600 0 0 4 &mpic 2 1 | ||
| 313 | |||
| 314 | /* IDSEL 0x12 func 7 - PCI slot 2 */ | ||
| 315 | 9700 0 0 1 &mpic 3 1 | ||
| 316 | 9700 0 0 2 &mpic 4 1 | ||
| 317 | 9700 0 0 3 &mpic 1 1 | ||
| 318 | 9700 0 0 4 &mpic 2 1 | ||
| 319 | |||
| 236 | // IDSEL 0x1c USB | 320 | // IDSEL 0x1c USB |
| 237 | e000 0 0 0 &i8259 c 2 | 321 | e000 0 0 1 &i8259 c 2 |
| 238 | e100 0 0 0 &i8259 9 2 | 322 | e100 0 0 1 &i8259 9 2 |
| 239 | e200 0 0 0 &i8259 a 2 | 323 | e200 0 0 1 &i8259 a 2 |
| 240 | e300 0 0 0 &i8259 b 2 | 324 | e300 0 0 1 &i8259 b 2 |
| 241 | 325 | ||
| 242 | // IDSEL 0x1d Audio | 326 | // IDSEL 0x1d Audio |
| 243 | e800 0 0 0 &i8259 6 2 | 327 | e800 0 0 1 &i8259 6 2 |
| 244 | 328 | ||
| 245 | // IDSEL 0x1e Legacy | 329 | // IDSEL 0x1e Legacy |
| 246 | f000 0 0 0 &i8259 7 2 | 330 | f000 0 0 1 &i8259 7 2 |
| 247 | f100 0 0 0 &i8259 7 2 | 331 | f100 0 0 1 &i8259 7 2 |
| 248 | 332 | ||
| 249 | // IDSEL 0x1f IDE/SATA | 333 | // IDSEL 0x1f IDE/SATA |
| 250 | f800 0 0 0 &i8259 e 2 | 334 | f800 0 0 1 &i8259 e 2 |
| 251 | f900 0 0 0 &i8259 5 2 | 335 | f900 0 0 1 &i8259 5 2 |
| 252 | 336 | ||
| 253 | >; | 337 | >; |
| 254 | 338 | ||
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts index 367765937a06..abb26dc42558 100644 --- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts +++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts | |||
| @@ -235,36 +235,120 @@ | |||
| 235 | clock-frequency = <1fca055>; | 235 | clock-frequency = <1fca055>; |
| 236 | interrupt-parent = <&mpic>; | 236 | interrupt-parent = <&mpic>; |
| 237 | interrupts = <18 2>; | 237 | interrupts = <18 2>; |
| 238 | interrupt-map-mask = <fb00 0 0 0>; | 238 | interrupt-map-mask = <ff00 0 0 7>; |
| 239 | interrupt-map = < | 239 | interrupt-map = < |
| 240 | /* IDSEL 0x11 */ | 240 | /* IDSEL 0x11 func 0 - PCI slot 1 */ |
| 241 | 8800 0 0 1 &i8259 9 2 | 241 | 8800 0 0 1 &mpic 2 1 |
| 242 | 8800 0 0 2 &i8259 a 2 | 242 | 8800 0 0 2 &mpic 3 1 |
| 243 | 8800 0 0 3 &i8259 b 2 | 243 | 8800 0 0 3 &mpic 4 1 |
| 244 | 8800 0 0 4 &i8259 c 2 | 244 | 8800 0 0 4 &mpic 1 1 |
| 245 | 245 | ||
| 246 | /* IDSEL 0x12 */ | 246 | /* IDSEL 0x11 func 1 - PCI slot 1 */ |
| 247 | 9000 0 0 1 &i8259 a 2 | 247 | 8900 0 0 1 &mpic 2 1 |
| 248 | 9000 0 0 2 &i8259 b 2 | 248 | 8900 0 0 2 &mpic 3 1 |
| 249 | 9000 0 0 3 &i8259 c 2 | 249 | 8900 0 0 3 &mpic 4 1 |
| 250 | 9000 0 0 4 &i8259 9 2 | 250 | 8900 0 0 4 &mpic 1 1 |
| 251 | |||
| 252 | /* IDSEL 0x11 func 2 - PCI slot 1 */ | ||
| 253 | 8a00 0 0 1 &mpic 2 1 | ||
| 254 | 8a00 0 0 2 &mpic 3 1 | ||
| 255 | 8a00 0 0 3 &mpic 4 1 | ||
| 256 | 8a00 0 0 4 &mpic 1 1 | ||
| 257 | |||
| 258 | /* IDSEL 0x11 func 3 - PCI slot 1 */ | ||
| 259 | 8b00 0 0 1 &mpic 2 1 | ||
| 260 | 8b00 0 0 2 &mpic 3 1 | ||
| 261 | 8b00 0 0 3 &mpic 4 1 | ||
| 262 | 8b00 0 0 4 &mpic 1 1 | ||
| 263 | |||
| 264 | /* IDSEL 0x11 func 4 - PCI slot 1 */ | ||
| 265 | 8c00 0 0 1 &mpic 2 1 | ||
| 266 | 8c00 0 0 2 &mpic 3 1 | ||
| 267 | 8c00 0 0 3 &mpic 4 1 | ||
| 268 | 8c00 0 0 4 &mpic 1 1 | ||
| 269 | |||
| 270 | /* IDSEL 0x11 func 5 - PCI slot 1 */ | ||
| 271 | 8d00 0 0 1 &mpic 2 1 | ||
| 272 | 8d00 0 0 2 &mpic 3 1 | ||
| 273 | 8d00 0 0 3 &mpic 4 1 | ||
| 274 | 8d00 0 0 4 &mpic 1 1 | ||
| 275 | |||
| 276 | /* IDSEL 0x11 func 6 - PCI slot 1 */ | ||
| 277 | 8e00 0 0 1 &mpic 2 1 | ||
| 278 | 8e00 0 0 2 &mpic 3 1 | ||
| 279 | 8e00 0 0 3 &mpic 4 1 | ||
| 280 | 8e00 0 0 4 &mpic 1 1 | ||
| 281 | |||
| 282 | /* IDSEL 0x11 func 7 - PCI slot 1 */ | ||
| 283 | 8f00 0 0 1 &mpic 2 1 | ||
| 284 | 8f00 0 0 2 &mpic 3 1 | ||
| 285 | 8f00 0 0 3 &mpic 4 1 | ||
| 286 | 8f00 0 0 4 &mpic 1 1 | ||
| 287 | |||
| 288 | /* IDSEL 0x12 func 0 - PCI slot 2 */ | ||
| 289 | 9000 0 0 1 &mpic 3 1 | ||
| 290 | 9000 0 0 2 &mpic 4 1 | ||
| 291 | 9000 0 0 3 &mpic 1 1 | ||
| 292 | 9000 0 0 4 &mpic 2 1 | ||
| 293 | |||
| 294 | /* IDSEL 0x12 func 1 - PCI slot 2 */ | ||
| 295 | 9100 0 0 1 &mpic 3 1 | ||
| 296 | 9100 0 0 2 &mpic 4 1 | ||
| 297 | 9100 0 0 3 &mpic 1 1 | ||
| 298 | 9100 0 0 4 &mpic 2 1 | ||
| 299 | |||
| 300 | /* IDSEL 0x12 func 2 - PCI slot 2 */ | ||
| 301 | 9200 0 0 1 &mpic 3 1 | ||
| 302 | 9200 0 0 2 &mpic 4 1 | ||
| 303 | 9200 0 0 3 &mpic 1 1 | ||
| 304 | 9200 0 0 4 &mpic 2 1 | ||
| 305 | |||
| 306 | /* IDSEL 0x12 func 3 - PCI slot 2 */ | ||
| 307 | 9300 0 0 1 &mpic 3 1 | ||
| 308 | 9300 0 0 2 &mpic 4 1 | ||
| 309 | 9300 0 0 3 &mpic 1 1 | ||
| 310 | 9300 0 0 4 &mpic 2 1 | ||
| 311 | |||
| 312 | /* IDSEL 0x12 func 4 - PCI slot 2 */ | ||
| 313 | 9400 0 0 1 &mpic 3 1 | ||
| 314 | 9400 0 0 2 &mpic 4 1 | ||
| 315 | 9400 0 0 3 &mpic 1 1 | ||
| 316 | 9400 0 0 4 &mpic 2 1 | ||
| 317 | |||
| 318 | /* IDSEL 0x12 func 5 - PCI slot 2 */ | ||
| 319 | 9500 0 0 1 &mpic 3 1 | ||
| 320 | 9500 0 0 2 &mpic 4 1 | ||
| 321 | 9500 0 0 3 &mpic 1 1 | ||
| 322 | 9500 0 0 4 &mpic 2 1 | ||
| 323 | |||
| 324 | /* IDSEL 0x12 func 6 - PCI slot 2 */ | ||
| 325 | 9600 0 0 1 &mpic 3 1 | ||
| 326 | 9600 0 0 2 &mpic 4 1 | ||
| 327 | 9600 0 0 3 &mpic 1 1 | ||
| 328 | 9600 0 0 4 &mpic 2 1 | ||
| 329 | |||
| 330 | /* IDSEL 0x12 func 7 - PCI slot 2 */ | ||
| 331 | 9700 0 0 1 &mpic 3 1 | ||
| 332 | 9700 0 0 2 &mpic 4 1 | ||
| 333 | 9700 0 0 3 &mpic 1 1 | ||
| 334 | 9700 0 0 4 &mpic 2 1 | ||
| 251 | 335 | ||
| 252 | // IDSEL 0x1c USB | 336 | // IDSEL 0x1c USB |
| 253 | e000 0 0 0 &i8259 c 2 | 337 | e000 0 0 1 &i8259 c 2 |
| 254 | e100 0 0 0 &i8259 9 2 | 338 | e100 0 0 1 &i8259 9 2 |
| 255 | e200 0 0 0 &i8259 a 2 | 339 | e200 0 0 1 &i8259 a 2 |
| 256 | e300 0 0 0 &i8259 b 2 | 340 | e300 0 0 1 &i8259 b 2 |
| 257 | 341 | ||
| 258 | // IDSEL 0x1d Audio | 342 | // IDSEL 0x1d Audio |
| 259 | e800 0 0 0 &i8259 6 2 | 343 | e800 0 0 1 &i8259 6 2 |
| 260 | 344 | ||
| 261 | // IDSEL 0x1e Legacy | 345 | // IDSEL 0x1e Legacy |
| 262 | f000 0 0 0 &i8259 7 2 | 346 | f000 0 0 1 &i8259 7 2 |
| 263 | f100 0 0 0 &i8259 7 2 | 347 | f100 0 0 1 &i8259 7 2 |
| 264 | 348 | ||
| 265 | // IDSEL 0x1f IDE/SATA | 349 | // IDSEL 0x1f IDE/SATA |
| 266 | f800 0 0 0 &i8259 e 2 | 350 | f800 0 0 1 &i8259 e 2 |
| 267 | f900 0 0 0 &i8259 5 2 | 351 | f900 0 0 1 &i8259 5 2 |
| 268 | >; | 352 | >; |
| 269 | 353 | ||
| 270 | pcie@0 { | 354 | pcie@0 { |
diff --git a/arch/powerpc/configs/mpc832x_mds_defconfig b/arch/powerpc/configs/mpc832x_mds_defconfig index dd68d1818d6b..e069018276ca 100644 --- a/arch/powerpc/configs/mpc832x_mds_defconfig +++ b/arch/powerpc/configs/mpc832x_mds_defconfig | |||
| @@ -774,7 +774,53 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
| 774 | # CONFIG_NEW_LEDS is not set | 774 | # CONFIG_NEW_LEDS is not set |
| 775 | # CONFIG_INFINIBAND is not set | 775 | # CONFIG_INFINIBAND is not set |
| 776 | # CONFIG_EDAC is not set | 776 | # CONFIG_EDAC is not set |
| 777 | # CONFIG_RTC_CLASS is not set | 777 | CONFIG_RTC_LIB=y |
| 778 | CONFIG_RTC_CLASS=y | ||
| 779 | CONFIG_RTC_HCTOSYS=y | ||
| 780 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
| 781 | # CONFIG_RTC_DEBUG is not set | ||
| 782 | |||
| 783 | # | ||
| 784 | # RTC interfaces | ||
| 785 | # | ||
| 786 | CONFIG_RTC_INTF_SYSFS=y | ||
| 787 | CONFIG_RTC_INTF_PROC=y | ||
| 788 | CONFIG_RTC_INTF_DEV=y | ||
| 789 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
| 790 | # CONFIG_RTC_DRV_TEST is not set | ||
| 791 | |||
| 792 | # | ||
| 793 | # I2C RTC drivers | ||
| 794 | # | ||
| 795 | # CONFIG_RTC_DRV_DS1307 is not set | ||
| 796 | CONFIG_RTC_DRV_DS1374=y | ||
| 797 | # CONFIG_RTC_DRV_DS1672 is not set | ||
| 798 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
| 799 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
| 800 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
| 801 | # CONFIG_RTC_DRV_X1205 is not set | ||
| 802 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
| 803 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
| 804 | # CONFIG_RTC_DRV_M41T80 is not set | ||
| 805 | |||
| 806 | # | ||
| 807 | # SPI RTC drivers | ||
| 808 | # | ||
| 809 | |||
| 810 | # | ||
| 811 | # Platform RTC drivers | ||
| 812 | # | ||
| 813 | # CONFIG_RTC_DRV_CMOS is not set | ||
| 814 | # CONFIG_RTC_DRV_DS1553 is not set | ||
| 815 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
| 816 | # CONFIG_RTC_DRV_DS1742 is not set | ||
| 817 | # CONFIG_RTC_DRV_M48T86 is not set | ||
| 818 | # CONFIG_RTC_DRV_M48T59 is not set | ||
| 819 | # CONFIG_RTC_DRV_V3020 is not set | ||
| 820 | |||
| 821 | # | ||
| 822 | # on-CPU RTC drivers | ||
| 823 | # | ||
| 778 | 824 | ||
| 779 | # | 825 | # |
| 780 | # DMA Engine support | 826 | # DMA Engine support |
diff --git a/arch/powerpc/configs/mpc832x_rdb_defconfig b/arch/powerpc/configs/mpc832x_rdb_defconfig index 4f391028c79c..7a5b13f4140f 100644 --- a/arch/powerpc/configs/mpc832x_rdb_defconfig +++ b/arch/powerpc/configs/mpc832x_rdb_defconfig | |||
| @@ -685,8 +685,21 @@ CONFIG_I2C_MPC=y | |||
| 685 | # | 685 | # |
| 686 | # SPI support | 686 | # SPI support |
| 687 | # | 687 | # |
| 688 | # CONFIG_SPI is not set | 688 | CONFIG_SPI=y |
| 689 | # CONFIG_SPI_MASTER is not set | 689 | CONFIG_SPI_MASTER=y |
| 690 | |||
| 691 | # | ||
| 692 | # SPI Master Controller Drivers | ||
| 693 | # | ||
| 694 | CONFIG_SPI_BITBANG=y | ||
| 695 | CONFIG_SPI_MPC83xx=y | ||
| 696 | |||
| 697 | # | ||
| 698 | # SPI Protocol Masters | ||
| 699 | # | ||
| 700 | # CONFIG_SPI_AT25 is not set | ||
| 701 | # CONFIG_SPI_SPIDEV is not set | ||
| 702 | # CONFIG_SPI_TLE62X0 is not set | ||
| 690 | # CONFIG_W1 is not set | 703 | # CONFIG_W1 is not set |
| 691 | # CONFIG_POWER_SUPPLY is not set | 704 | # CONFIG_POWER_SUPPLY is not set |
| 692 | CONFIG_HWMON=y | 705 | CONFIG_HWMON=y |
| @@ -710,6 +723,7 @@ CONFIG_HWMON=y | |||
| 710 | # CONFIG_SENSORS_GL520SM is not set | 723 | # CONFIG_SENSORS_GL520SM is not set |
| 711 | # CONFIG_SENSORS_IT87 is not set | 724 | # CONFIG_SENSORS_IT87 is not set |
| 712 | # CONFIG_SENSORS_LM63 is not set | 725 | # CONFIG_SENSORS_LM63 is not set |
| 726 | # CONFIG_SENSORS_LM70 is not set | ||
| 713 | # CONFIG_SENSORS_LM75 is not set | 727 | # CONFIG_SENSORS_LM75 is not set |
| 714 | # CONFIG_SENSORS_LM77 is not set | 728 | # CONFIG_SENSORS_LM77 is not set |
| 715 | # CONFIG_SENSORS_LM78 is not set | 729 | # CONFIG_SENSORS_LM78 is not set |
| @@ -896,7 +910,24 @@ CONFIG_USB_MON=y | |||
| 896 | # USB Gadget Support | 910 | # USB Gadget Support |
| 897 | # | 911 | # |
| 898 | # CONFIG_USB_GADGET is not set | 912 | # CONFIG_USB_GADGET is not set |
| 899 | # CONFIG_MMC is not set | 913 | CONFIG_MMC=y |
| 914 | # CONFIG_MMC_DEBUG is not set | ||
| 915 | # CONFIG_MMC_UNSAFE_RESUME is not set | ||
| 916 | |||
| 917 | # | ||
| 918 | # MMC/SD Card Drivers | ||
| 919 | # | ||
| 920 | CONFIG_MMC_BLOCK=y | ||
| 921 | CONFIG_MMC_BLOCK_BOUNCE=y | ||
| 922 | # CONFIG_SDIO_UART is not set | ||
| 923 | |||
| 924 | # | ||
| 925 | # MMC/SD Host Controller Drivers | ||
| 926 | # | ||
| 927 | # CONFIG_MMC_SDHCI is not set | ||
| 928 | # CONFIG_MMC_WBSD is not set | ||
| 929 | # CONFIG_MMC_TIFM_SD is not set | ||
| 930 | CONFIG_MMC_SPI=y | ||
| 900 | # CONFIG_NEW_LEDS is not set | 931 | # CONFIG_NEW_LEDS is not set |
| 901 | # CONFIG_INFINIBAND is not set | 932 | # CONFIG_INFINIBAND is not set |
| 902 | # CONFIG_EDAC is not set | 933 | # CONFIG_EDAC is not set |
| @@ -1101,9 +1132,9 @@ CONFIG_UCC=y | |||
| 1101 | CONFIG_BITREVERSE=y | 1132 | CONFIG_BITREVERSE=y |
| 1102 | # CONFIG_CRC_CCITT is not set | 1133 | # CONFIG_CRC_CCITT is not set |
| 1103 | # CONFIG_CRC16 is not set | 1134 | # CONFIG_CRC16 is not set |
| 1104 | # CONFIG_CRC_ITU_T is not set | 1135 | CONFIG_CRC_ITU_T=y |
| 1105 | CONFIG_CRC32=y | 1136 | CONFIG_CRC32=y |
| 1106 | # CONFIG_CRC7 is not set | 1137 | CONFIG_CRC7=y |
| 1107 | # CONFIG_LIBCRC32C is not set | 1138 | # CONFIG_LIBCRC32C is not set |
| 1108 | CONFIG_PLIST=y | 1139 | CONFIG_PLIST=y |
| 1109 | CONFIG_HAS_IOMEM=y | 1140 | CONFIG_HAS_IOMEM=y |
diff --git a/arch/powerpc/configs/mpc834x_itx_defconfig b/arch/powerpc/configs/mpc834x_itx_defconfig index eb28dd85cb2b..ba512d13f3a3 100644 --- a/arch/powerpc/configs/mpc834x_itx_defconfig +++ b/arch/powerpc/configs/mpc834x_itx_defconfig | |||
| @@ -867,7 +867,7 @@ CONFIG_USB_EHCI_ROOT_HUB_TT=y | |||
| 867 | CONFIG_USB_EHCI_FSL=y | 867 | CONFIG_USB_EHCI_FSL=y |
| 868 | # CONFIG_USB_ISP116X_HCD is not set | 868 | # CONFIG_USB_ISP116X_HCD is not set |
| 869 | # CONFIG_USB_OHCI_HCD is not set | 869 | # CONFIG_USB_OHCI_HCD is not set |
| 870 | # CONFIG_USB_UHCI_HCD is not set | 870 | CONFIG_USB_UHCI_HCD=y |
| 871 | # CONFIG_USB_SL811_HCD is not set | 871 | # CONFIG_USB_SL811_HCD is not set |
| 872 | # CONFIG_USB_R8A66597_HCD is not set | 872 | # CONFIG_USB_R8A66597_HCD is not set |
| 873 | 873 | ||
diff --git a/arch/powerpc/configs/mpc834x_itxgp_defconfig b/arch/powerpc/configs/mpc834x_itxgp_defconfig index 22b95462c913..9faa948c22ad 100644 --- a/arch/powerpc/configs/mpc834x_itxgp_defconfig +++ b/arch/powerpc/configs/mpc834x_itxgp_defconfig | |||
| @@ -760,15 +760,101 @@ CONFIG_USB_SUPPORT=y | |||
| 760 | CONFIG_USB_ARCH_HAS_HCD=y | 760 | CONFIG_USB_ARCH_HAS_HCD=y |
| 761 | CONFIG_USB_ARCH_HAS_OHCI=y | 761 | CONFIG_USB_ARCH_HAS_OHCI=y |
| 762 | CONFIG_USB_ARCH_HAS_EHCI=y | 762 | CONFIG_USB_ARCH_HAS_EHCI=y |
| 763 | # CONFIG_USB is not set | 763 | CONFIG_USB=y |
| 764 | # CONFIG_USB_DEBUG is not set | ||
| 765 | |||
| 766 | # | ||
| 767 | # Miscellaneous USB options | ||
| 768 | # | ||
| 769 | # CONFIG_USB_DEVICEFS is not set | ||
| 770 | CONFIG_USB_DEVICE_CLASS=y | ||
| 771 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
| 772 | # CONFIG_USB_OTG is not set | ||
| 773 | |||
| 774 | # | ||
| 775 | # USB Host Controller Drivers | ||
| 776 | # | ||
| 777 | CONFIG_USB_EHCI_HCD=y | ||
| 778 | # CONFIG_USB_EHCI_SPLIT_ISO is not set | ||
| 764 | CONFIG_USB_EHCI_ROOT_HUB_TT=y | 779 | CONFIG_USB_EHCI_ROOT_HUB_TT=y |
| 780 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | ||
| 765 | CONFIG_USB_EHCI_FSL=y | 781 | CONFIG_USB_EHCI_FSL=y |
| 782 | # CONFIG_USB_ISP116X_HCD is not set | ||
| 783 | # CONFIG_USB_OHCI_HCD is not set | ||
| 784 | CONFIG_USB_UHCI_HCD=y | ||
| 785 | # CONFIG_USB_SL811_HCD is not set | ||
| 786 | # CONFIG_USB_R8A66597_HCD is not set | ||
| 787 | |||
| 788 | # | ||
| 789 | # USB Device Class drivers | ||
| 790 | # | ||
| 791 | # CONFIG_USB_ACM is not set | ||
| 792 | # CONFIG_USB_PRINTER is not set | ||
| 766 | 793 | ||
| 767 | # | 794 | # |
| 768 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 795 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
| 769 | # | 796 | # |
| 770 | 797 | ||
| 771 | # | 798 | # |
| 799 | # may also be needed; see USB_STORAGE Help for more information | ||
| 800 | # | ||
| 801 | CONFIG_USB_STORAGE=y | ||
| 802 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
| 803 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
| 804 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
| 805 | # CONFIG_USB_STORAGE_DPCM is not set | ||
| 806 | # CONFIG_USB_STORAGE_USBAT is not set | ||
| 807 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
| 808 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
| 809 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
| 810 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
| 811 | # CONFIG_USB_STORAGE_KARMA is not set | ||
| 812 | # CONFIG_USB_LIBUSUAL is not set | ||
| 813 | |||
| 814 | # | ||
| 815 | # USB Imaging devices | ||
| 816 | # | ||
| 817 | # CONFIG_USB_MDC800 is not set | ||
| 818 | # CONFIG_USB_MICROTEK is not set | ||
| 819 | CONFIG_USB_MON=y | ||
| 820 | |||
| 821 | # | ||
| 822 | # USB port drivers | ||
| 823 | # | ||
| 824 | |||
| 825 | # | ||
| 826 | # USB Serial Converter support | ||
| 827 | # | ||
| 828 | # CONFIG_USB_SERIAL is not set | ||
| 829 | |||
| 830 | # | ||
| 831 | # USB Miscellaneous drivers | ||
| 832 | # | ||
| 833 | # CONFIG_USB_EMI62 is not set | ||
| 834 | # CONFIG_USB_EMI26 is not set | ||
| 835 | # CONFIG_USB_ADUTUX is not set | ||
| 836 | # CONFIG_USB_AUERSWALD is not set | ||
| 837 | # CONFIG_USB_RIO500 is not set | ||
| 838 | # CONFIG_USB_LEGOTOWER is not set | ||
| 839 | # CONFIG_USB_LCD is not set | ||
| 840 | # CONFIG_USB_BERRY_CHARGE is not set | ||
| 841 | # CONFIG_USB_LED is not set | ||
| 842 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
| 843 | # CONFIG_USB_CYTHERM is not set | ||
| 844 | # CONFIG_USB_PHIDGET is not set | ||
| 845 | # CONFIG_USB_IDMOUSE is not set | ||
| 846 | # CONFIG_USB_FTDI_ELAN is not set | ||
| 847 | # CONFIG_USB_APPLEDISPLAY is not set | ||
| 848 | # CONFIG_USB_SISUSBVGA is not set | ||
| 849 | # CONFIG_USB_LD is not set | ||
| 850 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
| 851 | # CONFIG_USB_IOWARRIOR is not set | ||
| 852 | |||
| 853 | # | ||
| 854 | # USB DSL modem support | ||
| 855 | # | ||
| 856 | |||
| 857 | # | ||
| 772 | # USB Gadget Support | 858 | # USB Gadget Support |
| 773 | # | 859 | # |
| 774 | # CONFIG_USB_GADGET is not set | 860 | # CONFIG_USB_GADGET is not set |
diff --git a/arch/powerpc/configs/mpc834x_mds_defconfig b/arch/powerpc/configs/mpc834x_mds_defconfig index e59a88e95486..356f736a5d3d 100644 --- a/arch/powerpc/configs/mpc834x_mds_defconfig +++ b/arch/powerpc/configs/mpc834x_mds_defconfig | |||
| @@ -721,7 +721,53 @@ CONFIG_USB_EHCI_FSL=y | |||
| 721 | # CONFIG_NEW_LEDS is not set | 721 | # CONFIG_NEW_LEDS is not set |
| 722 | # CONFIG_INFINIBAND is not set | 722 | # CONFIG_INFINIBAND is not set |
| 723 | # CONFIG_EDAC is not set | 723 | # CONFIG_EDAC is not set |
| 724 | # CONFIG_RTC_CLASS is not set | 724 | CONFIG_RTC_LIB=y |
| 725 | CONFIG_RTC_CLASS=y | ||
| 726 | CONFIG_RTC_HCTOSYS=y | ||
| 727 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
| 728 | # CONFIG_RTC_DEBUG is not set | ||
| 729 | |||
| 730 | # | ||
| 731 | # RTC interfaces | ||
| 732 | # | ||
| 733 | CONFIG_RTC_INTF_SYSFS=y | ||
| 734 | CONFIG_RTC_INTF_PROC=y | ||
| 735 | CONFIG_RTC_INTF_DEV=y | ||
| 736 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
| 737 | # CONFIG_RTC_DRV_TEST is not set | ||
| 738 | |||
| 739 | # | ||
| 740 | # I2C RTC drivers | ||
| 741 | # | ||
| 742 | # CONFIG_RTC_DRV_DS1307 is not set | ||
| 743 | CONFIG_RTC_DRV_DS1374=y | ||
| 744 | # CONFIG_RTC_DRV_DS1672 is not set | ||
| 745 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
| 746 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
| 747 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
| 748 | # CONFIG_RTC_DRV_X1205 is not set | ||
| 749 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
| 750 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
| 751 | # CONFIG_RTC_DRV_M41T80 is not set | ||
| 752 | |||
| 753 | # | ||
| 754 | # SPI RTC drivers | ||
| 755 | # | ||
| 756 | |||
| 757 | # | ||
| 758 | # Platform RTC drivers | ||
| 759 | # | ||
| 760 | # CONFIG_RTC_DRV_CMOS is not set | ||
| 761 | # CONFIG_RTC_DRV_DS1553 is not set | ||
| 762 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
| 763 | # CONFIG_RTC_DRV_DS1742 is not set | ||
| 764 | # CONFIG_RTC_DRV_M48T86 is not set | ||
| 765 | # CONFIG_RTC_DRV_M48T59 is not set | ||
| 766 | # CONFIG_RTC_DRV_V3020 is not set | ||
| 767 | |||
| 768 | # | ||
| 769 | # on-CPU RTC drivers | ||
| 770 | # | ||
| 725 | 771 | ||
| 726 | # | 772 | # |
| 727 | # DMA Engine support | 773 | # DMA Engine support |
diff --git a/arch/powerpc/configs/mpc836x_mds_defconfig b/arch/powerpc/configs/mpc836x_mds_defconfig index 75657528518e..1b4d37570eb1 100644 --- a/arch/powerpc/configs/mpc836x_mds_defconfig +++ b/arch/powerpc/configs/mpc836x_mds_defconfig | |||
| @@ -773,7 +773,53 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
| 773 | # CONFIG_NEW_LEDS is not set | 773 | # CONFIG_NEW_LEDS is not set |
| 774 | # CONFIG_INFINIBAND is not set | 774 | # CONFIG_INFINIBAND is not set |
| 775 | # CONFIG_EDAC is not set | 775 | # CONFIG_EDAC is not set |
| 776 | # CONFIG_RTC_CLASS is not set | 776 | CONFIG_RTC_LIB=y |
| 777 | CONFIG_RTC_CLASS=y | ||
| 778 | CONFIG_RTC_HCTOSYS=y | ||
| 779 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
| 780 | # CONFIG_RTC_DEBUG is not set | ||
| 781 | |||
| 782 | # | ||
| 783 | # RTC interfaces | ||
| 784 | # | ||
| 785 | CONFIG_RTC_INTF_SYSFS=y | ||
| 786 | CONFIG_RTC_INTF_PROC=y | ||
| 787 | CONFIG_RTC_INTF_DEV=y | ||
| 788 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
| 789 | # CONFIG_RTC_DRV_TEST is not set | ||
| 790 | |||
| 791 | # | ||
| 792 | # I2C RTC drivers | ||
| 793 | # | ||
| 794 | # CONFIG_RTC_DRV_DS1307 is not set | ||
| 795 | CONFIG_RTC_DRV_DS1374=y | ||
| 796 | # CONFIG_RTC_DRV_DS1672 is not set | ||
| 797 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
| 798 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
| 799 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
| 800 | # CONFIG_RTC_DRV_X1205 is not set | ||
| 801 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
| 802 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
| 803 | # CONFIG_RTC_DRV_M41T80 is not set | ||
| 804 | |||
| 805 | # | ||
| 806 | # SPI RTC drivers | ||
| 807 | # | ||
| 808 | |||
| 809 | # | ||
| 810 | # Platform RTC drivers | ||
| 811 | # | ||
| 812 | # CONFIG_RTC_DRV_CMOS is not set | ||
| 813 | # CONFIG_RTC_DRV_DS1553 is not set | ||
| 814 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
| 815 | # CONFIG_RTC_DRV_DS1742 is not set | ||
| 816 | # CONFIG_RTC_DRV_M48T86 is not set | ||
| 817 | # CONFIG_RTC_DRV_M48T59 is not set | ||
| 818 | # CONFIG_RTC_DRV_V3020 is not set | ||
| 819 | |||
| 820 | # | ||
| 821 | # on-CPU RTC drivers | ||
| 822 | # | ||
| 777 | 823 | ||
| 778 | # | 824 | # |
| 779 | # DMA Engine support | 825 | # DMA Engine support |
diff --git a/arch/powerpc/configs/mpc8568mds_defconfig b/arch/powerpc/configs/mpc8568mds_defconfig index 883d8af9debd..d665e7a797c0 100644 --- a/arch/powerpc/configs/mpc8568mds_defconfig +++ b/arch/powerpc/configs/mpc8568mds_defconfig | |||
| @@ -768,7 +768,53 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
| 768 | # CONFIG_NEW_LEDS is not set | 768 | # CONFIG_NEW_LEDS is not set |
| 769 | # CONFIG_INFINIBAND is not set | 769 | # CONFIG_INFINIBAND is not set |
| 770 | # CONFIG_EDAC is not set | 770 | # CONFIG_EDAC is not set |
| 771 | # CONFIG_RTC_CLASS is not set | 771 | CONFIG_RTC_LIB=y |
| 772 | CONFIG_RTC_CLASS=y | ||
| 773 | CONFIG_RTC_HCTOSYS=y | ||
| 774 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
| 775 | # CONFIG_RTC_DEBUG is not set | ||
| 776 | |||
| 777 | # | ||
| 778 | # RTC interfaces | ||
| 779 | # | ||
| 780 | CONFIG_RTC_INTF_SYSFS=y | ||
| 781 | CONFIG_RTC_INTF_PROC=y | ||
| 782 | CONFIG_RTC_INTF_DEV=y | ||
| 783 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
| 784 | # CONFIG_RTC_DRV_TEST is not set | ||
| 785 | |||
| 786 | # | ||
| 787 | # I2C RTC drivers | ||
| 788 | # | ||
| 789 | # CONFIG_RTC_DRV_DS1307 is not set | ||
| 790 | CONFIG_RTC_DRV_DS1374=y | ||
| 791 | # CONFIG_RTC_DRV_DS1672 is not set | ||
| 792 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
| 793 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
| 794 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
| 795 | # CONFIG_RTC_DRV_X1205 is not set | ||
| 796 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
| 797 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
| 798 | # CONFIG_RTC_DRV_M41T80 is not set | ||
| 799 | |||
| 800 | # | ||
| 801 | # SPI RTC drivers | ||
| 802 | # | ||
| 803 | |||
| 804 | # | ||
| 805 | # Platform RTC drivers | ||
| 806 | # | ||
| 807 | # CONFIG_RTC_DRV_CMOS is not set | ||
| 808 | # CONFIG_RTC_DRV_DS1553 is not set | ||
| 809 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
| 810 | # CONFIG_RTC_DRV_DS1742 is not set | ||
| 811 | # CONFIG_RTC_DRV_M48T86 is not set | ||
| 812 | # CONFIG_RTC_DRV_M48T59 is not set | ||
| 813 | # CONFIG_RTC_DRV_V3020 is not set | ||
| 814 | |||
| 815 | # | ||
| 816 | # on-CPU RTC drivers | ||
| 817 | # | ||
| 772 | 818 | ||
| 773 | # | 819 | # |
| 774 | # DMA Engine support | 820 | # DMA Engine support |
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 2c8e756d19a3..d67bcd84f329 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
| @@ -284,6 +284,10 @@ int main(void) | |||
| 284 | DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32)); | 284 | DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32)); |
| 285 | DEFINE(WTOM_CLOCK_SEC, offsetof(struct vdso_data, wtom_clock_sec)); | 285 | DEFINE(WTOM_CLOCK_SEC, offsetof(struct vdso_data, wtom_clock_sec)); |
| 286 | DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec)); | 286 | DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec)); |
| 287 | DEFINE(CFG_ICACHE_BLOCKSZ, offsetof(struct vdso_data, icache_block_size)); | ||
| 288 | DEFINE(CFG_DCACHE_BLOCKSZ, offsetof(struct vdso_data, dcache_block_size)); | ||
| 289 | DEFINE(CFG_ICACHE_LOGBLOCKSZ, offsetof(struct vdso_data, icache_log_block_size)); | ||
| 290 | DEFINE(CFG_DCACHE_LOGBLOCKSZ, offsetof(struct vdso_data, dcache_log_block_size)); | ||
| 287 | #ifdef CONFIG_PPC64 | 291 | #ifdef CONFIG_PPC64 |
| 288 | DEFINE(CFG_SYSCALL_MAP64, offsetof(struct vdso_data, syscall_map_64)); | 292 | DEFINE(CFG_SYSCALL_MAP64, offsetof(struct vdso_data, syscall_map_64)); |
| 289 | DEFINE(TVAL64_TV_SEC, offsetof(struct timeval, tv_sec)); | 293 | DEFINE(TVAL64_TV_SEC, offsetof(struct timeval, tv_sec)); |
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 214780798289..053cac19f714 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
| @@ -19,6 +19,9 @@ | |||
| 19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
| 20 | #include <linux/capability.h> | 20 | #include <linux/capability.h> |
| 21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
| 22 | #include <linux/smp.h> | ||
| 23 | #include <linux/completion.h> | ||
| 24 | #include <linux/cpumask.h> | ||
| 22 | 25 | ||
| 23 | #include <asm/prom.h> | 26 | #include <asm/prom.h> |
| 24 | #include <asm/rtas.h> | 27 | #include <asm/rtas.h> |
| @@ -34,6 +37,8 @@ | |||
| 34 | #include <asm/lmb.h> | 37 | #include <asm/lmb.h> |
| 35 | #include <asm/udbg.h> | 38 | #include <asm/udbg.h> |
| 36 | #include <asm/syscalls.h> | 39 | #include <asm/syscalls.h> |
| 40 | #include <asm/smp.h> | ||
| 41 | #include <asm/atomic.h> | ||
| 37 | 42 | ||
| 38 | struct rtas_t rtas = { | 43 | struct rtas_t rtas = { |
| 39 | .lock = SPIN_LOCK_UNLOCKED | 44 | .lock = SPIN_LOCK_UNLOCKED |
| @@ -41,8 +46,10 @@ struct rtas_t rtas = { | |||
| 41 | EXPORT_SYMBOL(rtas); | 46 | EXPORT_SYMBOL(rtas); |
| 42 | 47 | ||
| 43 | struct rtas_suspend_me_data { | 48 | struct rtas_suspend_me_data { |
| 44 | long waiting; | 49 | atomic_t working; /* number of cpus accessing this struct */ |
| 45 | struct rtas_args *args; | 50 | int token; /* ibm,suspend-me */ |
| 51 | int error; | ||
| 52 | struct completion *complete; /* wait on this until working == 0 */ | ||
| 46 | }; | 53 | }; |
| 47 | 54 | ||
| 48 | DEFINE_SPINLOCK(rtas_data_buf_lock); | 55 | DEFINE_SPINLOCK(rtas_data_buf_lock); |
| @@ -631,18 +638,18 @@ void rtas_halt(void) | |||
| 631 | /* Must be in the RMO region, so we place it here */ | 638 | /* Must be in the RMO region, so we place it here */ |
| 632 | static char rtas_os_term_buf[2048]; | 639 | static char rtas_os_term_buf[2048]; |
| 633 | 640 | ||
| 634 | void rtas_os_term(char *str) | 641 | void rtas_panic_msg(char *str) |
| 635 | { | 642 | { |
| 636 | int status; | 643 | snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str); |
| 644 | } | ||
| 637 | 645 | ||
| 638 | if (panic_timeout) | 646 | void rtas_os_term(void) |
| 639 | return; | 647 | { |
| 648 | int status; | ||
| 640 | 649 | ||
| 641 | if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term")) | 650 | if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term")) |
| 642 | return; | 651 | return; |
| 643 | 652 | ||
| 644 | snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str); | ||
| 645 | |||
| 646 | do { | 653 | do { |
| 647 | status = rtas_call(rtas_token("ibm,os-term"), 1, 1, NULL, | 654 | status = rtas_call(rtas_token("ibm,os-term"), 1, 1, NULL, |
| 648 | __pa(rtas_os_term_buf)); | 655 | __pa(rtas_os_term_buf)); |
| @@ -657,50 +664,62 @@ static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE; | |||
| 657 | #ifdef CONFIG_PPC_PSERIES | 664 | #ifdef CONFIG_PPC_PSERIES |
| 658 | static void rtas_percpu_suspend_me(void *info) | 665 | static void rtas_percpu_suspend_me(void *info) |
| 659 | { | 666 | { |
| 660 | int i; | ||
| 661 | long rc; | 667 | long rc; |
| 662 | long flags; | 668 | unsigned long msr_save; |
| 669 | int cpu; | ||
| 663 | struct rtas_suspend_me_data *data = | 670 | struct rtas_suspend_me_data *data = |
| 664 | (struct rtas_suspend_me_data *)info; | 671 | (struct rtas_suspend_me_data *)info; |
| 665 | 672 | ||
| 666 | /* | 673 | atomic_inc(&data->working); |
| 667 | * We use "waiting" to indicate our state. As long | 674 | |
| 668 | * as it is >0, we are still trying to all join up. | 675 | /* really need to ensure MSR.EE is off for H_JOIN */ |
| 669 | * If it goes to 0, we have successfully joined up and | 676 | msr_save = mfmsr(); |
| 670 | * one thread got H_CONTINUE. If any error happens, | 677 | mtmsr(msr_save & ~(MSR_EE)); |
| 671 | * we set it to <0. | 678 | |
| 672 | */ | 679 | rc = plpar_hcall_norets(H_JOIN); |
| 673 | local_irq_save(flags); | ||
| 674 | do { | ||
| 675 | rc = plpar_hcall_norets(H_JOIN); | ||
| 676 | smp_rmb(); | ||
| 677 | } while (rc == H_SUCCESS && data->waiting > 0); | ||
| 678 | if (rc == H_SUCCESS) | ||
| 679 | goto out; | ||
| 680 | 680 | ||
| 681 | if (rc == H_CONTINUE) { | 681 | mtmsr(msr_save); |
| 682 | data->waiting = 0; | 682 | |
| 683 | data->args->args[data->args->nargs] = | 683 | if (rc == H_SUCCESS) { |
| 684 | rtas_call(ibm_suspend_me_token, 0, 1, NULL); | 684 | /* This cpu was prodded and the suspend is complete. */ |
| 685 | for_each_possible_cpu(i) | 685 | goto out; |
| 686 | plpar_hcall_norets(H_PROD,i); | 686 | } else if (rc == H_CONTINUE) { |
| 687 | /* All other cpus are in H_JOIN, this cpu does | ||
| 688 | * the suspend. | ||
| 689 | */ | ||
| 690 | printk(KERN_DEBUG "calling ibm,suspend-me on cpu %i\n", | ||
| 691 | smp_processor_id()); | ||
| 692 | data->error = rtas_call(data->token, 0, 1, NULL); | ||
| 693 | |||
| 694 | if (data->error) | ||
| 695 | printk(KERN_DEBUG "ibm,suspend-me returned %d\n", | ||
| 696 | data->error); | ||
| 687 | } else { | 697 | } else { |
| 688 | data->waiting = -EBUSY; | 698 | printk(KERN_ERR "H_JOIN on cpu %i failed with rc = %ld\n", |
| 689 | printk(KERN_ERR "Error on H_JOIN hypervisor call\n"); | 699 | smp_processor_id(), rc); |
| 700 | data->error = rc; | ||
| 690 | } | 701 | } |
| 691 | 702 | /* This cpu did the suspend or got an error; in either case, | |
| 703 | * we need to prod all other other cpus out of join state. | ||
| 704 | * Extra prods are harmless. | ||
| 705 | */ | ||
| 706 | for_each_online_cpu(cpu) | ||
| 707 | plpar_hcall_norets(H_PROD, get_hard_smp_processor_id(cpu)); | ||
| 692 | out: | 708 | out: |
| 693 | local_irq_restore(flags); | 709 | if (atomic_dec_return(&data->working) == 0) |
| 694 | return; | 710 | complete(data->complete); |
| 695 | } | 711 | } |
| 696 | 712 | ||
| 697 | static int rtas_ibm_suspend_me(struct rtas_args *args) | 713 | static int rtas_ibm_suspend_me(struct rtas_args *args) |
| 698 | { | 714 | { |
| 699 | int i; | ||
| 700 | long state; | 715 | long state; |
| 701 | long rc; | 716 | long rc; |
| 702 | unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; | 717 | unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; |
| 703 | struct rtas_suspend_me_data data; | 718 | struct rtas_suspend_me_data data; |
| 719 | DECLARE_COMPLETION_ONSTACK(done); | ||
| 720 | |||
| 721 | if (!rtas_service_present("ibm,suspend-me")) | ||
| 722 | return -ENOSYS; | ||
| 704 | 723 | ||
| 705 | /* Make sure the state is valid */ | 724 | /* Make sure the state is valid */ |
| 706 | rc = plpar_hcall(H_VASI_STATE, retbuf, | 725 | rc = plpar_hcall(H_VASI_STATE, retbuf, |
| @@ -721,25 +740,23 @@ static int rtas_ibm_suspend_me(struct rtas_args *args) | |||
| 721 | return 0; | 740 | return 0; |
| 722 | } | 741 | } |
| 723 | 742 | ||
| 724 | data.waiting = 1; | 743 | atomic_set(&data.working, 0); |
| 725 | data.args = args; | 744 | data.token = rtas_token("ibm,suspend-me"); |
| 745 | data.error = 0; | ||
| 746 | data.complete = &done; | ||
| 726 | 747 | ||
| 727 | /* Call function on all CPUs. One of us will make the | 748 | /* Call function on all CPUs. One of us will make the |
| 728 | * rtas call | 749 | * rtas call |
| 729 | */ | 750 | */ |
| 730 | if (on_each_cpu(rtas_percpu_suspend_me, &data, 1, 0)) | 751 | if (on_each_cpu(rtas_percpu_suspend_me, &data, 1, 0)) |
| 731 | data.waiting = -EINVAL; | 752 | data.error = -EINVAL; |
| 732 | 753 | ||
| 733 | if (data.waiting != 0) | 754 | wait_for_completion(&done); |
| 734 | printk(KERN_ERR "Error doing global join\n"); | ||
| 735 | 755 | ||
| 736 | /* Prod each CPU. This won't hurt, and will wake | 756 | if (data.error != 0) |
| 737 | * anyone we successfully put to sleep with H_JOIN. | 757 | printk(KERN_ERR "Error doing global join\n"); |
| 738 | */ | ||
| 739 | for_each_possible_cpu(i) | ||
| 740 | plpar_hcall_norets(H_PROD, i); | ||
| 741 | 758 | ||
| 742 | return data.waiting; | 759 | return data.error; |
| 743 | } | 760 | } |
| 744 | #else /* CONFIG_PPC_PSERIES */ | 761 | #else /* CONFIG_PPC_PSERIES */ |
| 745 | static int rtas_ibm_suspend_me(struct rtas_args *args) | 762 | static int rtas_ibm_suspend_me(struct rtas_args *args) |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index c0d77723ba11..a925a8eae121 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
| @@ -241,8 +241,9 @@ void account_system_vtime(struct task_struct *tsk) | |||
| 241 | /* deltascaled includes both user and system time. | 241 | /* deltascaled includes both user and system time. |
| 242 | * Hence scale it based on the purr ratio to estimate | 242 | * Hence scale it based on the purr ratio to estimate |
| 243 | * the system time */ | 243 | * the system time */ |
| 244 | deltascaled = deltascaled * get_paca()->system_time / | 244 | if (get_paca()->user_time) |
| 245 | (get_paca()->system_time + get_paca()->user_time); | 245 | deltascaled = deltascaled * get_paca()->system_time / |
| 246 | (get_paca()->system_time + get_paca()->user_time); | ||
| 246 | delta += get_paca()->system_time; | 247 | delta += get_paca()->system_time; |
| 247 | get_paca()->system_time = 0; | 248 | get_paca()->system_time = 0; |
| 248 | } | 249 | } |
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index 2322ba5cce4c..3702df7dc567 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c | |||
| @@ -699,11 +699,22 @@ static int __init vdso_init(void) | |||
| 699 | vdso_data->icache_size = ppc64_caches.isize; | 699 | vdso_data->icache_size = ppc64_caches.isize; |
| 700 | vdso_data->icache_line_size = ppc64_caches.iline_size; | 700 | vdso_data->icache_line_size = ppc64_caches.iline_size; |
| 701 | 701 | ||
| 702 | /* XXXOJN: Blocks should be added to ppc64_caches and used instead */ | ||
| 703 | vdso_data->dcache_block_size = ppc64_caches.dline_size; | ||
| 704 | vdso_data->icache_block_size = ppc64_caches.iline_size; | ||
| 705 | vdso_data->dcache_log_block_size = ppc64_caches.log_dline_size; | ||
| 706 | vdso_data->icache_log_block_size = ppc64_caches.log_iline_size; | ||
| 707 | |||
| 702 | /* | 708 | /* |
| 703 | * Calculate the size of the 64 bits vDSO | 709 | * Calculate the size of the 64 bits vDSO |
| 704 | */ | 710 | */ |
| 705 | vdso64_pages = (&vdso64_end - &vdso64_start) >> PAGE_SHIFT; | 711 | vdso64_pages = (&vdso64_end - &vdso64_start) >> PAGE_SHIFT; |
| 706 | DBG("vdso64_kbase: %p, 0x%x pages\n", vdso64_kbase, vdso64_pages); | 712 | DBG("vdso64_kbase: %p, 0x%x pages\n", vdso64_kbase, vdso64_pages); |
| 713 | #else | ||
| 714 | vdso_data->dcache_block_size = L1_CACHE_BYTES; | ||
| 715 | vdso_data->dcache_log_block_size = L1_CACHE_SHIFT; | ||
| 716 | vdso_data->icache_block_size = L1_CACHE_BYTES; | ||
| 717 | vdso_data->icache_log_block_size = L1_CACHE_SHIFT; | ||
| 707 | #endif /* CONFIG_PPC64 */ | 718 | #endif /* CONFIG_PPC64 */ |
| 708 | 719 | ||
| 709 | 720 | ||
diff --git a/arch/powerpc/kernel/vdso32/cacheflush.S b/arch/powerpc/kernel/vdso32/cacheflush.S index 9cb319992c38..1ba6feb71b31 100644 --- a/arch/powerpc/kernel/vdso32/cacheflush.S +++ b/arch/powerpc/kernel/vdso32/cacheflush.S | |||
| @@ -23,29 +23,46 @@ | |||
| 23 | * | 23 | * |
| 24 | * Flushes the data cache & invalidate the instruction cache for the | 24 | * Flushes the data cache & invalidate the instruction cache for the |
| 25 | * provided range [start, end[ | 25 | * provided range [start, end[ |
| 26 | * | ||
| 27 | * Note: all CPUs supported by this kernel have a 128 bytes cache | ||
| 28 | * line size so we don't have to peek that info from the datapage | ||
| 29 | */ | 26 | */ |
| 30 | V_FUNCTION_BEGIN(__kernel_sync_dicache) | 27 | V_FUNCTION_BEGIN(__kernel_sync_dicache) |
| 31 | .cfi_startproc | 28 | .cfi_startproc |
| 32 | li r5,127 | 29 | mflr r12 |
| 33 | andc r6,r3,r5 /* round low to line bdy */ | 30 | .cfi_register lr,r12 |
| 31 | mr r11,r3 | ||
| 32 | bl __get_datapage@local | ||
| 33 | mtlr r12 | ||
| 34 | mr r10,r3 | ||
| 35 | |||
| 36 | lwz r7,CFG_DCACHE_BLOCKSZ(r10) | ||
| 37 | addi r5,r7,-1 | ||
| 38 | andc r6,r11,r5 /* round low to line bdy */ | ||
| 34 | subf r8,r6,r4 /* compute length */ | 39 | subf r8,r6,r4 /* compute length */ |
| 35 | add r8,r8,r5 /* ensure we get enough */ | 40 | add r8,r8,r5 /* ensure we get enough */ |
| 36 | srwi. r8,r8,7 /* compute line count */ | 41 | lwz r9,CFG_DCACHE_LOGBLOCKSZ(r10) |
| 42 | srw. r8,r8,r9 /* compute line count */ | ||
| 37 | crclr cr0*4+so | 43 | crclr cr0*4+so |
| 38 | beqlr /* nothing to do? */ | 44 | beqlr /* nothing to do? */ |
| 39 | mtctr r8 | 45 | mtctr r8 |
| 40 | mr r3,r6 | 46 | 1: dcbst 0,r6 |
| 41 | 1: dcbst 0,r3 | 47 | add r6,r6,r7 |
| 42 | addi r3,r3,128 | ||
| 43 | bdnz 1b | 48 | bdnz 1b |
| 44 | sync | 49 | sync |
| 50 | |||
| 51 | /* Now invalidate the instruction cache */ | ||
| 52 | |||
| 53 | lwz r7,CFG_ICACHE_BLOCKSZ(r10) | ||
| 54 | addi r5,r7,-1 | ||
| 55 | andc r6,r11,r5 /* round low to line bdy */ | ||
| 56 | subf r8,r6,r4 /* compute length */ | ||
| 57 | add r8,r8,r5 | ||
| 58 | lwz r9,CFG_ICACHE_LOGBLOCKSZ(r10) | ||
| 59 | srw. r8,r8,r9 /* compute line count */ | ||
| 60 | crclr cr0*4+so | ||
| 61 | beqlr /* nothing to do? */ | ||
| 45 | mtctr r8 | 62 | mtctr r8 |
| 46 | 1: icbi 0,r6 | 63 | 2: icbi 0,r6 |
| 47 | addi r6,r6,128 | 64 | add r6,r6,r7 |
| 48 | bdnz 1b | 65 | bdnz 2b |
| 49 | isync | 66 | isync |
| 50 | li r3,0 | 67 | li r3,0 |
| 51 | blr | 68 | blr |
diff --git a/arch/powerpc/kernel/vdso64/cacheflush.S b/arch/powerpc/kernel/vdso64/cacheflush.S index 66a36d3cc6ad..69c5af2b3c96 100644 --- a/arch/powerpc/kernel/vdso64/cacheflush.S +++ b/arch/powerpc/kernel/vdso64/cacheflush.S | |||
| @@ -23,29 +23,46 @@ | |||
| 23 | * | 23 | * |
| 24 | * Flushes the data cache & invalidate the instruction cache for the | 24 | * Flushes the data cache & invalidate the instruction cache for the |
| 25 | * provided range [start, end[ | 25 | * provided range [start, end[ |
| 26 | * | ||
| 27 | * Note: all CPUs supported by this kernel have a 128 bytes cache | ||
| 28 | * line size so we don't have to peek that info from the datapage | ||
| 29 | */ | 26 | */ |
| 30 | V_FUNCTION_BEGIN(__kernel_sync_dicache) | 27 | V_FUNCTION_BEGIN(__kernel_sync_dicache) |
| 31 | .cfi_startproc | 28 | .cfi_startproc |
| 32 | li r5,127 | 29 | mflr r12 |
| 33 | andc r6,r3,r5 /* round low to line bdy */ | 30 | .cfi_register lr,r12 |
| 31 | mr r11,r3 | ||
| 32 | bl V_LOCAL_FUNC(__get_datapage) | ||
| 33 | mtlr r12 | ||
| 34 | mr r10,r3 | ||
| 35 | |||
| 36 | lwz r7,CFG_DCACHE_BLOCKSZ(r10) | ||
| 37 | addi r5,r7,-1 | ||
| 38 | andc r6,r11,r5 /* round low to line bdy */ | ||
| 34 | subf r8,r6,r4 /* compute length */ | 39 | subf r8,r6,r4 /* compute length */ |
| 35 | add r8,r8,r5 /* ensure we get enough */ | 40 | add r8,r8,r5 /* ensure we get enough */ |
| 36 | srwi. r8,r8,7 /* compute line count */ | 41 | lwz r9,CFG_DCACHE_LOGBLOCKSZ(r10) |
| 42 | srw. r8,r8,r9 /* compute line count */ | ||
| 37 | crclr cr0*4+so | 43 | crclr cr0*4+so |
| 38 | beqlr /* nothing to do? */ | 44 | beqlr /* nothing to do? */ |
| 39 | mtctr r8 | 45 | mtctr r8 |
| 40 | mr r3,r6 | 46 | 1: dcbst 0,r6 |
| 41 | 1: dcbst 0,r3 | 47 | add r6,r6,r7 |
| 42 | addi r3,r3,128 | ||
| 43 | bdnz 1b | 48 | bdnz 1b |
| 44 | sync | 49 | sync |
| 50 | |||
| 51 | /* Now invalidate the instruction cache */ | ||
| 52 | |||
| 53 | lwz r7,CFG_ICACHE_BLOCKSZ(r10) | ||
| 54 | addi r5,r7,-1 | ||
| 55 | andc r6,r11,r5 /* round low to line bdy */ | ||
| 56 | subf r8,r6,r4 /* compute length */ | ||
| 57 | add r8,r8,r5 | ||
| 58 | lwz r9,CFG_ICACHE_LOGBLOCKSZ(r10) | ||
| 59 | srw. r8,r8,r9 /* compute line count */ | ||
| 60 | crclr cr0*4+so | ||
| 61 | beqlr /* nothing to do? */ | ||
| 45 | mtctr r8 | 62 | mtctr r8 |
| 46 | 1: icbi 0,r6 | 63 | 2: icbi 0,r6 |
| 47 | addi r6,r6,128 | 64 | add r6,r6,r7 |
| 48 | bdnz 1b | 65 | bdnz 2b |
| 49 | isync | 66 | isync |
| 50 | li r3,0 | 67 | li r3,0 |
| 51 | blr | 68 | blr |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 81eb96ec13b2..5402fb6b3aae 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
| @@ -464,7 +464,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, | |||
| 464 | * we invalidate the TLB here, thus avoiding dcbst | 464 | * we invalidate the TLB here, thus avoiding dcbst |
| 465 | * misbehaviour. | 465 | * misbehaviour. |
| 466 | */ | 466 | */ |
| 467 | _tlbie(address); | 467 | _tlbie(address, 0 /* 8xx doesn't care about PID */); |
| 468 | #endif | 468 | #endif |
| 469 | if (!PageReserved(page) | 469 | if (!PageReserved(page) |
| 470 | && !test_bit(PG_arch_1, &page->flags)) { | 470 | && !test_bit(PG_arch_1, &page->flags)) { |
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h index eb3a732e91db..ebfd13dc9d19 100644 --- a/arch/powerpc/mm/mmu_decl.h +++ b/arch/powerpc/mm/mmu_decl.h | |||
| @@ -56,7 +56,7 @@ extern unsigned long total_lowmem; | |||
| 56 | * architectures. -- Dan | 56 | * architectures. -- Dan |
| 57 | */ | 57 | */ |
| 58 | #if defined(CONFIG_8xx) | 58 | #if defined(CONFIG_8xx) |
| 59 | #define flush_HPTE(X, va, pg) _tlbie(va) | 59 | #define flush_HPTE(X, va, pg) _tlbie(va, 0 /* 8xx doesn't care about PID */) |
| 60 | #define MMU_init_hw() do { } while(0) | 60 | #define MMU_init_hw() do { } while(0) |
| 61 | #define mmu_mapin_ram() (0UL) | 61 | #define mmu_mapin_ram() (0UL) |
| 62 | 62 | ||
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c index 9e85bda76216..50448d5de9d2 100644 --- a/arch/powerpc/mm/stab.c +++ b/arch/powerpc/mm/stab.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <asm/lmb.h> | 20 | #include <asm/lmb.h> |
| 21 | #include <asm/abs_addr.h> | 21 | #include <asm/abs_addr.h> |
| 22 | #include <asm/firmware.h> | 22 | #include <asm/firmware.h> |
| 23 | #include <asm/iseries/hv_call.h> | ||
| 23 | 24 | ||
| 24 | struct stab_entry { | 25 | struct stab_entry { |
| 25 | unsigned long esid_data; | 26 | unsigned long esid_data; |
diff --git a/arch/powerpc/platforms/40x/walnut.c b/arch/powerpc/platforms/40x/walnut.c index eb0c136b1c44..ff6db2431798 100644 --- a/arch/powerpc/platforms/40x/walnut.c +++ b/arch/powerpc/platforms/40x/walnut.c | |||
| @@ -17,12 +17,13 @@ | |||
| 17 | */ | 17 | */ |
| 18 | 18 | ||
| 19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
| 20 | #include <linux/of_platform.h> | ||
| 21 | |||
| 20 | #include <asm/machdep.h> | 22 | #include <asm/machdep.h> |
| 21 | #include <asm/prom.h> | 23 | #include <asm/prom.h> |
| 22 | #include <asm/udbg.h> | 24 | #include <asm/udbg.h> |
| 23 | #include <asm/time.h> | 25 | #include <asm/time.h> |
| 24 | #include <asm/uic.h> | 26 | #include <asm/uic.h> |
| 25 | #include <asm/of_platform.h> | ||
| 26 | 27 | ||
| 27 | static struct of_device_id walnut_of_bus[] = { | 28 | static struct of_device_id walnut_of_bus[] = { |
| 28 | { .compatible = "ibm,plb3", }, | 29 | { .compatible = "ibm,plb3", }, |
diff --git a/arch/powerpc/platforms/44x/bamboo.c b/arch/powerpc/platforms/44x/bamboo.c index 470e1a3fd755..be23f112184f 100644 --- a/arch/powerpc/platforms/44x/bamboo.c +++ b/arch/powerpc/platforms/44x/bamboo.c | |||
| @@ -14,12 +14,13 @@ | |||
| 14 | * option) any later version. | 14 | * option) any later version. |
| 15 | */ | 15 | */ |
| 16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
| 17 | #include <linux/of_platform.h> | ||
| 18 | |||
| 17 | #include <asm/machdep.h> | 19 | #include <asm/machdep.h> |
| 18 | #include <asm/prom.h> | 20 | #include <asm/prom.h> |
| 19 | #include <asm/udbg.h> | 21 | #include <asm/udbg.h> |
| 20 | #include <asm/time.h> | 22 | #include <asm/time.h> |
| 21 | #include <asm/uic.h> | 23 | #include <asm/uic.h> |
| 22 | #include <asm/of_platform.h> | ||
| 23 | #include "44x.h" | 24 | #include "44x.h" |
| 24 | 25 | ||
| 25 | static struct of_device_id bamboo_of_bus[] = { | 26 | static struct of_device_id bamboo_of_bus[] = { |
diff --git a/arch/powerpc/platforms/44x/ebony.c b/arch/powerpc/platforms/44x/ebony.c index 40e18fcb666c..6cd3476767cc 100644 --- a/arch/powerpc/platforms/44x/ebony.c +++ b/arch/powerpc/platforms/44x/ebony.c | |||
| @@ -17,12 +17,13 @@ | |||
| 17 | */ | 17 | */ |
| 18 | 18 | ||
| 19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
| 20 | #include <linux/of_platform.h> | ||
| 21 | |||
| 20 | #include <asm/machdep.h> | 22 | #include <asm/machdep.h> |
| 21 | #include <asm/prom.h> | 23 | #include <asm/prom.h> |
| 22 | #include <asm/udbg.h> | 24 | #include <asm/udbg.h> |
| 23 | #include <asm/time.h> | 25 | #include <asm/time.h> |
| 24 | #include <asm/uic.h> | 26 | #include <asm/uic.h> |
| 25 | #include <asm/of_platform.h> | ||
| 26 | 27 | ||
| 27 | #include "44x.h" | 28 | #include "44x.h" |
| 28 | 29 | ||
diff --git a/arch/powerpc/platforms/44x/sequoia.c b/arch/powerpc/platforms/44x/sequoia.c index 30700b31d43b..21a9dd14f297 100644 --- a/arch/powerpc/platforms/44x/sequoia.c +++ b/arch/powerpc/platforms/44x/sequoia.c | |||
| @@ -14,12 +14,13 @@ | |||
| 14 | * option) any later version. | 14 | * option) any later version. |
| 15 | */ | 15 | */ |
| 16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
| 17 | #include <linux/of_platform.h> | ||
| 18 | |||
| 17 | #include <asm/machdep.h> | 19 | #include <asm/machdep.h> |
| 18 | #include <asm/prom.h> | 20 | #include <asm/prom.h> |
| 19 | #include <asm/udbg.h> | 21 | #include <asm/udbg.h> |
| 20 | #include <asm/time.h> | 22 | #include <asm/time.h> |
| 21 | #include <asm/uic.h> | 23 | #include <asm/uic.h> |
| 22 | #include <asm/of_platform.h> | ||
| 23 | #include "44x.h" | 24 | #include "44x.h" |
| 24 | 25 | ||
| 25 | static struct of_device_id sequoia_of_bus[] = { | 26 | static struct of_device_id sequoia_of_bus[] = { |
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c index 972fa8528a8c..39ee7a13b25a 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c | |||
| @@ -90,10 +90,11 @@ static void __init mpc832x_sys_setup_arch(void) | |||
| 90 | 90 | ||
| 91 | if ((np = of_find_compatible_node(NULL, "network", "ucc_geth")) | 91 | if ((np = of_find_compatible_node(NULL, "network", "ucc_geth")) |
| 92 | != NULL){ | 92 | != NULL){ |
| 93 | /* Reset the Ethernet PHY */ | 93 | /* Reset the Ethernet PHYs */ |
| 94 | bcsr_regs[9] &= ~0x20; | 94 | #define BCSR8_FETH_RST 0x50 |
| 95 | bcsr_regs[8] &= ~BCSR8_FETH_RST; | ||
| 95 | udelay(1000); | 96 | udelay(1000); |
| 96 | bcsr_regs[9] |= 0x20; | 97 | bcsr_regs[8] |= BCSR8_FETH_RST; |
| 97 | iounmap(bcsr_regs); | 98 | iounmap(bcsr_regs); |
| 98 | of_node_put(np); | 99 | of_node_put(np); |
| 99 | } | 100 | } |
| @@ -145,30 +146,6 @@ static void __init mpc832x_sys_init_IRQ(void) | |||
| 145 | #endif /* CONFIG_QUICC_ENGINE */ | 146 | #endif /* CONFIG_QUICC_ENGINE */ |
| 146 | } | 147 | } |
| 147 | 148 | ||
| 148 | #if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) | ||
| 149 | extern ulong ds1374_get_rtc_time(void); | ||
| 150 | extern int ds1374_set_rtc_time(ulong); | ||
| 151 | |||
| 152 | static int __init mpc832x_rtc_hookup(void) | ||
| 153 | { | ||
| 154 | struct timespec tv; | ||
| 155 | |||
| 156 | if (!machine_is(mpc832x_mds)) | ||
| 157 | return 0; | ||
| 158 | |||
| 159 | ppc_md.get_rtc_time = ds1374_get_rtc_time; | ||
| 160 | ppc_md.set_rtc_time = ds1374_set_rtc_time; | ||
| 161 | |||
| 162 | tv.tv_nsec = 0; | ||
| 163 | tv.tv_sec = (ppc_md.get_rtc_time) (); | ||
| 164 | do_settimeofday(&tv); | ||
| 165 | |||
| 166 | return 0; | ||
| 167 | } | ||
| 168 | |||
| 169 | late_initcall(mpc832x_rtc_hookup); | ||
| 170 | #endif | ||
| 171 | |||
| 172 | /* | 149 | /* |
| 173 | * Called very early, MMU is off, device-tree isn't unflattened | 150 | * Called very early, MMU is off, device-tree isn't unflattened |
| 174 | */ | 151 | */ |
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c index fbca336aa0ae..d4bd04001b99 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c | |||
| @@ -15,7 +15,10 @@ | |||
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
| 18 | #include <linux/interrupt.h> | ||
| 18 | #include <linux/spi/spi.h> | 19 | #include <linux/spi/spi.h> |
| 20 | #include <linux/spi/mmc_spi.h> | ||
| 21 | #include <linux/mmc/host.h> | ||
| 19 | 22 | ||
| 20 | #include <asm/of_platform.h> | 23 | #include <asm/of_platform.h> |
| 21 | #include <asm/time.h> | 24 | #include <asm/time.h> |
| @@ -46,15 +49,16 @@ static void mpc83xx_spi_deactivate_cs(u8 cs, u8 polarity) | |||
| 46 | par_io_data_set(3, 13, !polarity); | 49 | par_io_data_set(3, 13, !polarity); |
| 47 | } | 50 | } |
| 48 | 51 | ||
| 52 | static struct mmc_spi_platform_data mpc832x_mmc_pdata = { | ||
| 53 | .ocr_mask = MMC_VDD_33_34, | ||
| 54 | }; | ||
| 55 | |||
| 49 | static struct spi_board_info mpc832x_spi_boardinfo = { | 56 | static struct spi_board_info mpc832x_spi_boardinfo = { |
| 50 | .bus_num = 0x4c0, | 57 | .bus_num = 0x4c0, |
| 51 | .chip_select = 0, | 58 | .chip_select = 0, |
| 52 | .max_speed_hz = 50000000, | 59 | .max_speed_hz = 50000000, |
| 53 | /* | 60 | .modalias = "mmc_spi", |
| 54 | * XXX: This is spidev (spi in userspace) stub, should | 61 | .platform_data = &mpc832x_mmc_pdata, |
| 55 | * be replaced by "mmc_spi" when mmc_spi will hit mainline. | ||
| 56 | */ | ||
| 57 | .modalias = "spidev", | ||
| 58 | }; | 62 | }; |
| 59 | 63 | ||
| 60 | static int __init mpc832x_spi_init(void) | 64 | static int __init mpc832x_spi_init(void) |
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c index 00aed7c2269e..a81bb3ce6b94 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c | |||
| @@ -106,30 +106,6 @@ static void __init mpc834x_mds_init_IRQ(void) | |||
| 106 | ipic_set_default_priority(); | 106 | ipic_set_default_priority(); |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | #if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) | ||
| 110 | extern ulong ds1374_get_rtc_time(void); | ||
| 111 | extern int ds1374_set_rtc_time(ulong); | ||
| 112 | |||
| 113 | static int __init mpc834x_rtc_hookup(void) | ||
| 114 | { | ||
| 115 | struct timespec tv; | ||
| 116 | |||
| 117 | if (!machine_is(mpc834x_mds)) | ||
| 118 | return 0; | ||
| 119 | |||
| 120 | ppc_md.get_rtc_time = ds1374_get_rtc_time; | ||
| 121 | ppc_md.set_rtc_time = ds1374_set_rtc_time; | ||
| 122 | |||
| 123 | tv.tv_nsec = 0; | ||
| 124 | tv.tv_sec = (ppc_md.get_rtc_time) (); | ||
| 125 | do_settimeofday(&tv); | ||
| 126 | |||
| 127 | return 0; | ||
| 128 | } | ||
| 129 | |||
| 130 | late_initcall(mpc834x_rtc_hookup); | ||
| 131 | #endif | ||
| 132 | |||
| 133 | /* | 109 | /* |
| 134 | * Called very early, MMU is off, device-tree isn't unflattened | 110 | * Called very early, MMU is off, device-tree isn't unflattened |
| 135 | */ | 111 | */ |
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c index 0f3855c95ff5..e40012f8f488 100644 --- a/arch/powerpc/platforms/83xx/mpc836x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c | |||
| @@ -96,14 +96,39 @@ static void __init mpc836x_mds_setup_arch(void) | |||
| 96 | 96 | ||
| 97 | if ((np = of_find_compatible_node(NULL, "network", "ucc_geth")) | 97 | if ((np = of_find_compatible_node(NULL, "network", "ucc_geth")) |
| 98 | != NULL){ | 98 | != NULL){ |
| 99 | uint svid; | ||
| 100 | |||
| 99 | /* Reset the Ethernet PHY */ | 101 | /* Reset the Ethernet PHY */ |
| 100 | bcsr_regs[9] &= ~0x20; | 102 | #define BCSR9_GETHRST 0x20 |
| 103 | clrbits8(&bcsr_regs[9], BCSR9_GETHRST); | ||
| 101 | udelay(1000); | 104 | udelay(1000); |
| 102 | bcsr_regs[9] |= 0x20; | 105 | setbits8(&bcsr_regs[9], BCSR9_GETHRST); |
| 106 | |||
| 107 | /* handle mpc8360ea rev.2.1 erratum 2: RGMII Timing */ | ||
| 108 | svid = mfspr(SPRN_SVR); | ||
| 109 | if (svid == 0x80480021) { | ||
| 110 | void __iomem *immap; | ||
| 111 | |||
| 112 | immap = ioremap(get_immrbase() + 0x14a8, 8); | ||
| 113 | |||
| 114 | /* | ||
| 115 | * IMMR + 0x14A8[4:5] = 11 (clk delay for UCC 2) | ||
| 116 | * IMMR + 0x14A8[18:19] = 11 (clk delay for UCC 1) | ||
| 117 | */ | ||
| 118 | setbits32(immap, 0x0c003000); | ||
| 119 | |||
| 120 | /* | ||
| 121 | * IMMR + 0x14AC[20:27] = 10101010 | ||
| 122 | * (data delay for both UCC's) | ||
| 123 | */ | ||
| 124 | clrsetbits_be32(immap + 4, 0xff0, 0xaa0); | ||
| 125 | |||
| 126 | iounmap(immap); | ||
| 127 | } | ||
| 128 | |||
| 103 | iounmap(bcsr_regs); | 129 | iounmap(bcsr_regs); |
| 104 | of_node_put(np); | 130 | of_node_put(np); |
| 105 | } | 131 | } |
| 106 | |||
| 107 | #endif /* CONFIG_QUICC_ENGINE */ | 132 | #endif /* CONFIG_QUICC_ENGINE */ |
| 108 | } | 133 | } |
| 109 | 134 | ||
| @@ -152,30 +177,6 @@ static void __init mpc836x_mds_init_IRQ(void) | |||
| 152 | #endif /* CONFIG_QUICC_ENGINE */ | 177 | #endif /* CONFIG_QUICC_ENGINE */ |
| 153 | } | 178 | } |
| 154 | 179 | ||
| 155 | #if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) | ||
| 156 | extern ulong ds1374_get_rtc_time(void); | ||
| 157 | extern int ds1374_set_rtc_time(ulong); | ||
| 158 | |||
| 159 | static int __init mpc8360_rtc_hookup(void) | ||
| 160 | { | ||
| 161 | struct timespec tv; | ||
| 162 | |||
| 163 | if (!machine_is(mpc836x_mds)) | ||
| 164 | return 0; | ||
| 165 | |||
| 166 | ppc_md.get_rtc_time = ds1374_get_rtc_time; | ||
| 167 | ppc_md.set_rtc_time = ds1374_set_rtc_time; | ||
| 168 | |||
| 169 | tv.tv_nsec = 0; | ||
| 170 | tv.tv_sec = (ppc_md.get_rtc_time) (); | ||
| 171 | do_settimeofday(&tv); | ||
| 172 | |||
| 173 | return 0; | ||
| 174 | } | ||
| 175 | |||
| 176 | late_initcall(mpc8360_rtc_hookup); | ||
| 177 | #endif | ||
| 178 | |||
| 179 | /* | 180 | /* |
| 180 | * Called very early, MMU is off, device-tree isn't unflattened | 181 | * Called very early, MMU is off, device-tree isn't unflattened |
| 181 | */ | 182 | */ |
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c index eafe7605cdac..b45160f8d084 100644 --- a/arch/powerpc/platforms/83xx/usb.c +++ b/arch/powerpc/platforms/83xx/usb.c | |||
| @@ -130,7 +130,7 @@ int mpc831x_usb_cfg(void) | |||
| 130 | out_be32(immap + MPC83XX_SCCR_OFFS, temp); | 130 | out_be32(immap + MPC83XX_SCCR_OFFS, temp); |
| 131 | 131 | ||
| 132 | /* Configure pin mux for ULPI. There is no pin mux for UTMI */ | 132 | /* Configure pin mux for ULPI. There is no pin mux for UTMI */ |
| 133 | if (!strcmp(prop, "ulpi")) { | 133 | if (prop && !strcmp(prop, "ulpi")) { |
| 134 | temp = in_be32(immap + MPC83XX_SICRL_OFFS); | 134 | temp = in_be32(immap + MPC83XX_SICRL_OFFS); |
| 135 | temp &= ~MPC831X_SICRL_USB_MASK; | 135 | temp &= ~MPC831X_SICRL_USB_MASK; |
| 136 | temp |= MPC831X_SICRL_USB_ULPI; | 136 | temp |= MPC831X_SICRL_USB_ULPI; |
| @@ -153,13 +153,13 @@ int mpc831x_usb_cfg(void) | |||
| 153 | usb_regs = ioremap(res.start, res.end - res.start + 1); | 153 | usb_regs = ioremap(res.start, res.end - res.start + 1); |
| 154 | 154 | ||
| 155 | /* Using on-chip PHY */ | 155 | /* Using on-chip PHY */ |
| 156 | if (!strcmp(prop, "utmi_wide") || | 156 | if (prop && (!strcmp(prop, "utmi_wide") || |
| 157 | !strcmp(prop, "utmi")) { | 157 | !strcmp(prop, "utmi"))) { |
| 158 | /* Set UTMI_PHY_EN, REFSEL to 48MHZ */ | 158 | /* Set UTMI_PHY_EN, REFSEL to 48MHZ */ |
| 159 | out_be32(usb_regs + FSL_USB2_CONTROL_OFFS, | 159 | out_be32(usb_regs + FSL_USB2_CONTROL_OFFS, |
| 160 | CONTROL_UTMI_PHY_EN | CONTROL_REFSEL_48MHZ); | 160 | CONTROL_UTMI_PHY_EN | CONTROL_REFSEL_48MHZ); |
| 161 | /* Using external UPLI PHY */ | 161 | /* Using external UPLI PHY */ |
| 162 | } else if (!strcmp(prop, "ulpi")) { | 162 | } else if (prop && !strcmp(prop, "ulpi")) { |
| 163 | /* Set PHY_CLK_SEL to ULPI */ | 163 | /* Set PHY_CLK_SEL to ULPI */ |
| 164 | temp = CONTROL_PHY_CLK_SEL_ULPI; | 164 | temp = CONTROL_PHY_CLK_SEL_ULPI; |
| 165 | #ifdef CONFIG_USB_OTG | 165 | #ifdef CONFIG_USB_OTG |
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 0966d093db43..c0e968a4c211 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
| @@ -171,6 +171,7 @@ static int spufs_rmdir(struct inode *parent, struct dentry *dir) | |||
| 171 | { | 171 | { |
| 172 | /* remove all entries */ | 172 | /* remove all entries */ |
| 173 | spufs_prune_dir(dir); | 173 | spufs_prune_dir(dir); |
| 174 | d_drop(dir); | ||
| 174 | 175 | ||
| 175 | return simple_rmdir(parent, dir); | 176 | return simple_rmdir(parent, dir); |
| 176 | } | 177 | } |
diff --git a/arch/powerpc/platforms/embedded6xx/prpmc2800.c b/arch/powerpc/platforms/embedded6xx/prpmc2800.c index e484cac75095..653a5eb91c90 100644 --- a/arch/powerpc/platforms/embedded6xx/prpmc2800.c +++ b/arch/powerpc/platforms/embedded6xx/prpmc2800.c | |||
| @@ -144,6 +144,7 @@ static int __init prpmc2800_probe(void) | |||
| 144 | strncpy(prpmc2800_platform_name, m, | 144 | strncpy(prpmc2800_platform_name, m, |
| 145 | min((int)len, PLATFORM_NAME_MAX - 1)); | 145 | min((int)len, PLATFORM_NAME_MAX - 1)); |
| 146 | 146 | ||
| 147 | _set_L2CR(_get_L2CR() | L2CR_L2E); | ||
| 147 | return 1; | 148 | return 1; |
| 148 | } | 149 | } |
| 149 | 150 | ||
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c index 3a5d112af5e0..3d62060498b4 100644 --- a/arch/powerpc/platforms/pasemi/setup.c +++ b/arch/powerpc/platforms/pasemi/setup.c | |||
| @@ -214,7 +214,7 @@ static __init void pas_init_IRQ(void) | |||
| 214 | printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr); | 214 | printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr); |
| 215 | 215 | ||
| 216 | mpic = mpic_alloc(mpic_node, openpic_addr, | 216 | mpic = mpic_alloc(mpic_node, openpic_addr, |
| 217 | MPIC_PRIMARY|MPIC_LARGE_VECTORS|MPIC_WANTS_RESET, | 217 | MPIC_PRIMARY|MPIC_LARGE_VECTORS, |
| 218 | 0, 0, " PAS-OPIC "); | 218 | 0, 0, " PAS-OPIC "); |
| 219 | BUG_ON(!mpic); | 219 | BUG_ON(!mpic); |
| 220 | 220 | ||
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig index 16e4e401b820..306a9d07491d 100644 --- a/arch/powerpc/platforms/pseries/Kconfig +++ b/arch/powerpc/platforms/pseries/Kconfig | |||
| @@ -21,7 +21,7 @@ config PPC_SPLPAR | |||
| 21 | 21 | ||
| 22 | config EEH | 22 | config EEH |
| 23 | bool "PCI Extended Error Handling (EEH)" if EMBEDDED | 23 | bool "PCI Extended Error Handling (EEH)" if EMBEDDED |
| 24 | depends on PPC_PSERIES | 24 | depends on PPC_PSERIES && PCI |
| 25 | default y if !EMBEDDED | 25 | default y if !EMBEDDED |
| 26 | 26 | ||
| 27 | config SCANLOG | 27 | config SCANLOG |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index fdb9b1c8f977..fdeefe54ea91 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
| @@ -507,7 +507,8 @@ define_machine(pseries) { | |||
| 507 | .restart = rtas_restart, | 507 | .restart = rtas_restart, |
| 508 | .power_off = pSeries_power_off, | 508 | .power_off = pSeries_power_off, |
| 509 | .halt = rtas_halt, | 509 | .halt = rtas_halt, |
| 510 | .panic = rtas_os_term, | 510 | .panic = rtas_panic_msg, |
| 511 | .machine_shutdown = rtas_os_term, | ||
| 511 | .get_boot_time = rtas_get_boot_time, | 512 | .get_boot_time = rtas_get_boot_time, |
| 512 | .get_rtc_time = rtas_get_rtc_time, | 513 | .get_rtc_time = rtas_get_rtc_time, |
| 513 | .set_rtc_time = rtas_set_rtc_time, | 514 | .set_rtc_time = rtas_set_rtc_time, |
diff --git a/arch/powerpc/sysdev/uic.c b/arch/powerpc/sysdev/uic.c index 5149716c734d..847a5496b869 100644 --- a/arch/powerpc/sysdev/uic.c +++ b/arch/powerpc/sysdev/uic.c | |||
| @@ -97,6 +97,22 @@ static void uic_ack_irq(unsigned int virq) | |||
| 97 | spin_unlock_irqrestore(&uic->lock, flags); | 97 | spin_unlock_irqrestore(&uic->lock, flags); |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | static void uic_mask_ack_irq(unsigned int virq) | ||
| 101 | { | ||
| 102 | struct uic *uic = get_irq_chip_data(virq); | ||
| 103 | unsigned int src = uic_irq_to_hw(virq); | ||
| 104 | unsigned long flags; | ||
| 105 | u32 er, sr; | ||
| 106 | |||
| 107 | sr = 1 << (31-src); | ||
| 108 | spin_lock_irqsave(&uic->lock, flags); | ||
| 109 | er = mfdcr(uic->dcrbase + UIC_ER); | ||
| 110 | er &= ~sr; | ||
| 111 | mtdcr(uic->dcrbase + UIC_ER, er); | ||
| 112 | mtdcr(uic->dcrbase + UIC_SR, sr); | ||
| 113 | spin_unlock_irqrestore(&uic->lock, flags); | ||
| 114 | } | ||
| 115 | |||
| 100 | static int uic_set_irq_type(unsigned int virq, unsigned int flow_type) | 116 | static int uic_set_irq_type(unsigned int virq, unsigned int flow_type) |
| 101 | { | 117 | { |
| 102 | struct uic *uic = get_irq_chip_data(virq); | 118 | struct uic *uic = get_irq_chip_data(virq); |
| @@ -152,7 +168,7 @@ static struct irq_chip uic_irq_chip = { | |||
| 152 | .typename = " UIC ", | 168 | .typename = " UIC ", |
| 153 | .unmask = uic_unmask_irq, | 169 | .unmask = uic_unmask_irq, |
| 154 | .mask = uic_mask_irq, | 170 | .mask = uic_mask_irq, |
| 155 | /* .mask_ack = uic_mask_irq_and_ack, */ | 171 | .mask_ack = uic_mask_ack_irq, |
| 156 | .ack = uic_ack_irq, | 172 | .ack = uic_ack_irq, |
| 157 | .set_type = uic_set_irq_type, | 173 | .set_type = uic_set_irq_type, |
| 158 | }; | 174 | }; |
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c index aac88c2f3db9..5255bd80aa6b 100644 --- a/arch/ppc/kernel/setup.c +++ b/arch/ppc/kernel/setup.c | |||
| @@ -312,7 +312,14 @@ early_init(int r3, int r4, int r5) | |||
| 312 | * Identify the CPU type and fix up code sections | 312 | * Identify the CPU type and fix up code sections |
| 313 | * that depend on which cpu we have. | 313 | * that depend on which cpu we have. |
| 314 | */ | 314 | */ |
| 315 | #if defined(CONFIG_440EP) && defined(CONFIG_PPC_FPU) | ||
| 316 | /* We pass the virtual PVR here for 440EP as 440EP and 440GR have | ||
| 317 | * identical PVRs and there is no reliable way to check for the FPU | ||
| 318 | */ | ||
| 319 | spec = identify_cpu(offset, (mfspr(SPRN_PVR) | 0x8)); | ||
| 320 | #else | ||
| 315 | spec = identify_cpu(offset, mfspr(SPRN_PVR)); | 321 | spec = identify_cpu(offset, mfspr(SPRN_PVR)); |
| 322 | #endif | ||
| 316 | do_feature_fixups(spec->cpu_features, | 323 | do_feature_fixups(spec->cpu_features, |
| 317 | PTRRELOC(&__start___ftr_fixup), | 324 | PTRRELOC(&__start___ftr_fixup), |
| 318 | PTRRELOC(&__stop___ftr_fixup)); | 325 | PTRRELOC(&__stop___ftr_fixup)); |
diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c index 390dd1995c2a..dd898d32480e 100644 --- a/arch/ppc/mm/init.c +++ b/arch/ppc/mm/init.c | |||
| @@ -561,7 +561,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, | |||
| 561 | * That means the zeroed TLB has to be invalidated | 561 | * That means the zeroed TLB has to be invalidated |
| 562 | * whenever a page miss occurs. | 562 | * whenever a page miss occurs. |
| 563 | */ | 563 | */ |
| 564 | _tlbie(address); | 564 | _tlbie(address, 0 /* 8xx doesn't care about PID */); |
| 565 | #endif | 565 | #endif |
| 566 | if (!PageReserved(page) | 566 | if (!PageReserved(page) |
| 567 | && !test_bit(PG_arch_1, &page->flags)) { | 567 | && !test_bit(PG_arch_1, &page->flags)) { |
diff --git a/arch/ppc/mm/mmu_decl.h b/arch/ppc/mm/mmu_decl.h index f1d4f2109a99..b298b60c202f 100644 --- a/arch/ppc/mm/mmu_decl.h +++ b/arch/ppc/mm/mmu_decl.h | |||
| @@ -49,7 +49,7 @@ extern unsigned int num_tlbcam_entries; | |||
| 49 | * architectures. -- Dan | 49 | * architectures. -- Dan |
| 50 | */ | 50 | */ |
| 51 | #if defined(CONFIG_8xx) | 51 | #if defined(CONFIG_8xx) |
| 52 | #define flush_HPTE(X, va, pg) _tlbie(va) | 52 | #define flush_HPTE(X, va, pg) _tlbie(va, 0 /* 8xx doesn't care about PID */) |
| 53 | #define MMU_init_hw() do { } while(0) | 53 | #define MMU_init_hw() do { } while(0) |
| 54 | #define mmu_mapin_ram() (0UL) | 54 | #define mmu_mapin_ram() (0UL) |
| 55 | 55 | ||
diff --git a/arch/ppc/platforms/4xx/yucca.c b/arch/ppc/platforms/4xx/yucca.c index a83b0baea011..66a44ff0d926 100644 --- a/arch/ppc/platforms/4xx/yucca.c +++ b/arch/ppc/platforms/4xx/yucca.c | |||
| @@ -211,6 +211,7 @@ static void __init yucca_setup_pcie_fpga_rootpoint(int port) | |||
| 211 | break; | 211 | break; |
| 212 | 212 | ||
| 213 | default: | 213 | default: |
| 214 | iounmap(pcie_reg_fpga_base); | ||
| 214 | return; | 215 | return; |
| 215 | } | 216 | } |
| 216 | 217 | ||
diff --git a/arch/ppc/syslib/virtex_devices.c b/arch/ppc/syslib/virtex_devices.c index ace4ec08de51..f658ff3b3890 100644 --- a/arch/ppc/syslib/virtex_devices.c +++ b/arch/ppc/syslib/virtex_devices.c | |||
| @@ -87,6 +87,29 @@ | |||
| 87 | }, \ | 87 | }, \ |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | #define XPAR_AC97_CONTROLLER_REFERENCE(num) { \ | ||
| 91 | .name = "ml403_ac97cr", \ | ||
| 92 | .id = num, \ | ||
| 93 | .num_resources = 3, \ | ||
| 94 | .resource = (struct resource[]) { \ | ||
| 95 | { \ | ||
| 96 | .start = XPAR_OPB_AC97_CONTROLLER_REF_##num##_BASEADDR, \ | ||
| 97 | .end = XPAR_OPB_AC97_CONTROLLER_REF_##num##_HIGHADDR, \ | ||
| 98 | .flags = IORESOURCE_MEM, \ | ||
| 99 | }, \ | ||
| 100 | { \ | ||
| 101 | .start = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_PLAYBACK_INTERRUPT_INTR, \ | ||
| 102 | .end = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_PLAYBACK_INTERRUPT_INTR, \ | ||
| 103 | .flags = IORESOURCE_IRQ, \ | ||
| 104 | }, \ | ||
| 105 | { \ | ||
| 106 | .start = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_RECORD_INTERRUPT_INTR, \ | ||
| 107 | .end = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_RECORD_INTERRUPT_INTR, \ | ||
| 108 | .flags = IORESOURCE_IRQ, \ | ||
| 109 | }, \ | ||
| 110 | }, \ | ||
| 111 | } | ||
| 112 | |||
| 90 | /* UART 8250 driver platform data table */ | 113 | /* UART 8250 driver platform data table */ |
| 91 | struct plat_serial8250_port virtex_serial_platform_data[] = { | 114 | struct plat_serial8250_port virtex_serial_platform_data[] = { |
| 92 | #if defined(XPAR_UARTNS550_0_BASEADDR) | 115 | #if defined(XPAR_UARTNS550_0_BASEADDR) |
| @@ -173,6 +196,14 @@ struct platform_device virtex_platform_devices[] = { | |||
| 173 | #if defined(XPAR_TFT_3_BASEADDR) | 196 | #if defined(XPAR_TFT_3_BASEADDR) |
| 174 | XPAR_TFT(3), | 197 | XPAR_TFT(3), |
| 175 | #endif | 198 | #endif |
| 199 | |||
| 200 | /* AC97 Controller Reference instances */ | ||
| 201 | #if defined(XPAR_OPB_AC97_CONTROLLER_REF_0_BASEADDR) | ||
| 202 | XPAR_AC97_CONTROLLER_REFERENCE(0), | ||
| 203 | #endif | ||
| 204 | #if defined(XPAR_OPB_AC97_CONTROLLER_REF_1_BASEADDR) | ||
| 205 | XPAR_AC97_CONTROLLER_REFERENCE(1), | ||
| 206 | #endif | ||
| 176 | }; | 207 | }; |
| 177 | 208 | ||
| 178 | /* Early serial support functions */ | 209 | /* Early serial support functions */ |
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 116b03a45636..7aa1dc6d67c8 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile | |||
| @@ -11,10 +11,9 @@ endif | |||
| 11 | $(srctree)/arch/x86/Makefile%: ; | 11 | $(srctree)/arch/x86/Makefile%: ; |
| 12 | 12 | ||
| 13 | ifeq ($(CONFIG_X86_32),y) | 13 | ifeq ($(CONFIG_X86_32),y) |
| 14 | UTS_MACHINE := i386 | ||
| 14 | include $(srctree)/arch/x86/Makefile_32 | 15 | include $(srctree)/arch/x86/Makefile_32 |
| 15 | else | 16 | else |
| 17 | UTS_MACHINE := x86_64 | ||
| 16 | include $(srctree)/arch/x86/Makefile_64 | 18 | include $(srctree)/arch/x86/Makefile_64 |
| 17 | endif | 19 | endif |
| 18 | |||
| 19 | |||
| 20 | |||
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c index b39d1f5b378e..ced83c202cac 100644 --- a/drivers/isdn/i4l/isdn_net.c +++ b/drivers/isdn/i4l/isdn_net.c | |||
| @@ -2104,7 +2104,7 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup) | |||
| 2104 | u_long flags; | 2104 | u_long flags; |
| 2105 | isdn_net_dev *p; | 2105 | isdn_net_dev *p; |
| 2106 | isdn_net_phone *n; | 2106 | isdn_net_phone *n; |
| 2107 | char nr[32]; | 2107 | char nr[ISDN_MSNLEN]; |
| 2108 | char *my_eaz; | 2108 | char *my_eaz; |
| 2109 | 2109 | ||
| 2110 | /* Search name in netdev-chain */ | 2110 | /* Search name in netdev-chain */ |
| @@ -2113,7 +2113,7 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup) | |||
| 2113 | nr[1] = '\0'; | 2113 | nr[1] = '\0'; |
| 2114 | printk(KERN_INFO "isdn_net: Incoming call without OAD, assuming '0'\n"); | 2114 | printk(KERN_INFO "isdn_net: Incoming call without OAD, assuming '0'\n"); |
| 2115 | } else | 2115 | } else |
| 2116 | strcpy(nr, setup->phone); | 2116 | strlcpy(nr, setup->phone, ISDN_MSNLEN); |
| 2117 | si1 = (int) setup->si1; | 2117 | si1 = (int) setup->si1; |
| 2118 | si2 = (int) setup->si2; | 2118 | si2 = (int) setup->si2; |
| 2119 | if (!setup->eazmsn[0]) { | 2119 | if (!setup->eazmsn[0]) { |
| @@ -2789,7 +2789,7 @@ isdn_net_setcfg(isdn_net_ioctl_cfg * cfg) | |||
| 2789 | chidx = -1; | 2789 | chidx = -1; |
| 2790 | } | 2790 | } |
| 2791 | } | 2791 | } |
| 2792 | strcpy(lp->msn, cfg->eaz); | 2792 | strlcpy(lp->msn, cfg->eaz, sizeof(lp->msn)); |
| 2793 | lp->pre_device = drvidx; | 2793 | lp->pre_device = drvidx; |
| 2794 | lp->pre_channel = chidx; | 2794 | lp->pre_channel = chidx; |
| 2795 | lp->onhtime = cfg->onhtime; | 2795 | lp->onhtime = cfg->onhtime; |
| @@ -2936,7 +2936,7 @@ isdn_net_addphone(isdn_net_ioctl_phone * phone) | |||
| 2936 | if (p) { | 2936 | if (p) { |
| 2937 | if (!(n = kmalloc(sizeof(isdn_net_phone), GFP_KERNEL))) | 2937 | if (!(n = kmalloc(sizeof(isdn_net_phone), GFP_KERNEL))) |
| 2938 | return -ENOMEM; | 2938 | return -ENOMEM; |
| 2939 | strcpy(n->num, phone->phone); | 2939 | strlcpy(n->num, phone->phone, sizeof(n->num)); |
| 2940 | n->next = p->local->phone[phone->outgoing & 1]; | 2940 | n->next = p->local->phone[phone->outgoing & 1]; |
| 2941 | p->local->phone[phone->outgoing & 1] = n; | 2941 | p->local->phone[phone->outgoing & 1] = n; |
| 2942 | return 0; | 2942 | return 0; |
diff --git a/include/asm-mips/8253pit.h b/include/asm-mips/8253pit.h deleted file mode 100644 index 285f78488ccb..000000000000 --- a/include/asm-mips/8253pit.h +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * 8253/8254 Programmable Interval Timer | ||
| 3 | */ | ||
| 4 | |||
| 5 | #ifndef _8253PIT_H | ||
| 6 | #define _8253PIT_H | ||
| 7 | |||
| 8 | #define PIT_TICK_RATE 1193182UL | ||
| 9 | |||
| 10 | #endif | ||
diff --git a/include/asm-mips/dma.h b/include/asm-mips/dma.h index 833437d31ef1..d6a6c21f16db 100644 --- a/include/asm-mips/dma.h +++ b/include/asm-mips/dma.h | |||
| @@ -92,6 +92,7 @@ | |||
| 92 | #define MAX_DMA_ADDRESS (PAGE_OFFSET + 0x01000000) | 92 | #define MAX_DMA_ADDRESS (PAGE_OFFSET + 0x01000000) |
| 93 | #endif | 93 | #endif |
| 94 | #define MAX_DMA_PFN PFN_DOWN(virt_to_phys((void *)MAX_DMA_ADDRESS)) | 94 | #define MAX_DMA_PFN PFN_DOWN(virt_to_phys((void *)MAX_DMA_ADDRESS)) |
| 95 | #define MAX_DMA32_PFN (1UL << (32 - PAGE_SHIFT)) | ||
| 95 | 96 | ||
| 96 | /* 8237 DMA controllers */ | 97 | /* 8237 DMA controllers */ |
| 97 | #define IO_DMA1_BASE 0x00 /* 8 bit slave DMA, channels 0..3 */ | 98 | #define IO_DMA1_BASE 0x00 /* 8 bit slave DMA, channels 0..3 */ |
diff --git a/include/asm-mips/futex.h b/include/asm-mips/futex.h index 3e7e30d4f418..17f082cfea85 100644 --- a/include/asm-mips/futex.h +++ b/include/asm-mips/futex.h | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | " .set mips0 \n" \ | 35 | " .set mips0 \n" \ |
| 36 | " .section .fixup,\"ax\" \n" \ | 36 | " .section .fixup,\"ax\" \n" \ |
| 37 | "4: li %0, %6 \n" \ | 37 | "4: li %0, %6 \n" \ |
| 38 | " j 2b \n" \ | 38 | " j 3b \n" \ |
| 39 | " .previous \n" \ | 39 | " .previous \n" \ |
| 40 | " .section __ex_table,\"a\" \n" \ | 40 | " .section __ex_table,\"a\" \n" \ |
| 41 | " "__UA_ADDR "\t1b, 4b \n" \ | 41 | " "__UA_ADDR "\t1b, 4b \n" \ |
| @@ -61,7 +61,7 @@ | |||
| 61 | " .set mips0 \n" \ | 61 | " .set mips0 \n" \ |
| 62 | " .section .fixup,\"ax\" \n" \ | 62 | " .section .fixup,\"ax\" \n" \ |
| 63 | "4: li %0, %6 \n" \ | 63 | "4: li %0, %6 \n" \ |
| 64 | " j 2b \n" \ | 64 | " j 3b \n" \ |
| 65 | " .previous \n" \ | 65 | " .previous \n" \ |
| 66 | " .section __ex_table,\"a\" \n" \ | 66 | " .section __ex_table,\"a\" \n" \ |
| 67 | " "__UA_ADDR "\t1b, 4b \n" \ | 67 | " "__UA_ADDR "\t1b, 4b \n" \ |
| @@ -200,4 +200,4 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | |||
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | #endif | 202 | #endif |
| 203 | #endif | 203 | #endif /* _ASM_FUTEX_H */ |
diff --git a/include/asm-mips/i8253.h b/include/asm-mips/i8253.h index 032ca73f181b..5dabc870b322 100644 --- a/include/asm-mips/i8253.h +++ b/include/asm-mips/i8253.h | |||
| @@ -12,6 +12,8 @@ | |||
| 12 | #define PIT_CH0 0x40 | 12 | #define PIT_CH0 0x40 |
| 13 | #define PIT_CH2 0x42 | 13 | #define PIT_CH2 0x42 |
| 14 | 14 | ||
| 15 | #define PIT_TICK_RATE 1193182UL | ||
| 16 | |||
| 15 | extern spinlock_t i8253_lock; | 17 | extern spinlock_t i8253_lock; |
| 16 | 18 | ||
| 17 | extern void setup_pit_timer(void); | 19 | extern void setup_pit_timer(void); |
diff --git a/include/asm-mips/ip32/ip32_ints.h b/include/asm-mips/ip32/ip32_ints.h index ab5612f90f6f..85bc5302bce0 100644 --- a/include/asm-mips/ip32/ip32_ints.h +++ b/include/asm-mips/ip32/ip32_ints.h | |||
| @@ -22,7 +22,7 @@ enum ip32_irq_no { | |||
| 22 | * CPU interrupts are 0 ... 7 | 22 | * CPU interrupts are 0 ... 7 |
| 23 | */ | 23 | */ |
| 24 | 24 | ||
| 25 | CRIME_IRQ_BASE = MIPS_CPU_IRQ_BASE, | 25 | CRIME_IRQ_BASE = MIPS_CPU_IRQ_BASE + 8, |
| 26 | 26 | ||
| 27 | /* | 27 | /* |
| 28 | * MACE | 28 | * MACE |
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index 90e4b403f531..1030562d6ea6 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h | |||
| @@ -68,11 +68,15 @@ do { \ | |||
| 68 | if (cpu_has_dsp) \ | 68 | if (cpu_has_dsp) \ |
| 69 | __save_dsp(prev); \ | 69 | __save_dsp(prev); \ |
| 70 | (last) = resume(prev, next, task_thread_info(next)); \ | 70 | (last) = resume(prev, next, task_thread_info(next)); \ |
| 71 | } while (0) | ||
| 72 | |||
| 73 | #define finish_arch_switch(prev) \ | ||
| 74 | do { \ | ||
| 71 | if (cpu_has_dsp) \ | 75 | if (cpu_has_dsp) \ |
| 72 | __restore_dsp(current); \ | 76 | __restore_dsp(current); \ |
| 73 | if (cpu_has_userlocal) \ | 77 | if (cpu_has_userlocal) \ |
| 74 | write_c0_userlocal(task_thread_info(current)->tp_value);\ | 78 | write_c0_userlocal(current_thread_info()->tp_value); \ |
| 75 | } while(0) | 79 | } while (0) |
| 76 | 80 | ||
| 77 | static inline unsigned long __xchg_u32(volatile int * m, unsigned int val) | 81 | static inline unsigned long __xchg_u32(volatile int * m, unsigned int val) |
| 78 | { | 82 | { |
diff --git a/include/asm-mips/time.h b/include/asm-mips/time.h index ee1663e64da1..7717934f94c3 100644 --- a/include/asm-mips/time.h +++ b/include/asm-mips/time.h | |||
| @@ -58,10 +58,22 @@ extern int (*perf_irq)(void); | |||
| 58 | * Initialize the calling CPU's compare interrupt as clockevent device | 58 | * Initialize the calling CPU's compare interrupt as clockevent device |
| 59 | */ | 59 | */ |
| 60 | #ifdef CONFIG_CEVT_R4K | 60 | #ifdef CONFIG_CEVT_R4K |
| 61 | extern void mips_clockevent_init(void); | 61 | extern int mips_clockevent_init(void); |
| 62 | extern unsigned int __weak get_c0_compare_int(void); | 62 | extern unsigned int __weak get_c0_compare_int(void); |
| 63 | #else | 63 | #else |
| 64 | static inline void mips_clockevent_init(void) | 64 | static inline int mips_clockevent_init(void) |
| 65 | { | ||
| 66 | return -ENXIO; | ||
| 67 | } | ||
| 68 | #endif | ||
| 69 | |||
| 70 | /* | ||
| 71 | * Initialize the count register as a clocksource | ||
| 72 | */ | ||
| 73 | #ifdef CONFIG_CEVT_R4K | ||
| 74 | extern void init_mips_clocksource(void); | ||
| 75 | #else | ||
| 76 | static inline void init_mips_clocksource(void) | ||
| 65 | { | 77 | { |
| 66 | } | 78 | } |
| 67 | #endif | 79 | #endif |
diff --git a/include/asm-powerpc/page_32.h b/include/asm-powerpc/page_32.h index 374d0db37e1c..17110aff26e7 100644 --- a/include/asm-powerpc/page_32.h +++ b/include/asm-powerpc/page_32.h | |||
| @@ -6,6 +6,10 @@ | |||
| 6 | 6 | ||
| 7 | #define PPC_MEMSTART 0 | 7 | #define PPC_MEMSTART 0 |
| 8 | 8 | ||
| 9 | #ifdef CONFIG_NOT_COHERENT_CACHE | ||
| 10 | #define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES | ||
| 11 | #endif | ||
| 12 | |||
| 9 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
| 10 | /* | 14 | /* |
| 11 | * The basic type of a PTE - 64 bits for those CPUs with > 32 bit | 15 | * The basic type of a PTE - 64 bits for those CPUs with > 32 bit |
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h index dc318458b5fe..d8bdc79db12e 100644 --- a/include/asm-powerpc/pci-bridge.h +++ b/include/asm-powerpc/pci-bridge.h | |||
| @@ -246,7 +246,6 @@ static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus) | |||
| 246 | return PCI_DN(busdn)->phb; | 246 | return PCI_DN(busdn)->phb; |
| 247 | } | 247 | } |
| 248 | 248 | ||
| 249 | extern void pcibios_free_controller(struct pci_controller *phb); | ||
| 250 | 249 | ||
| 251 | extern void isa_bridge_find_early(struct pci_controller *hose); | 250 | extern void isa_bridge_find_early(struct pci_controller *hose); |
| 252 | 251 | ||
| @@ -282,9 +281,11 @@ extern void | |||
| 282 | pci_process_bridge_OF_ranges(struct pci_controller *hose, | 281 | pci_process_bridge_OF_ranges(struct pci_controller *hose, |
| 283 | struct device_node *dev, int primary); | 282 | struct device_node *dev, int primary); |
| 284 | 283 | ||
| 285 | /* Allocate a new PCI host bridge structure */ | 284 | /* Allocate & free a PCI host bridge structure */ |
| 286 | extern struct pci_controller * | 285 | extern struct pci_controller * |
| 287 | pcibios_alloc_controller(struct device_node *dev); | 286 | pcibios_alloc_controller(struct device_node *dev); |
| 287 | extern void pcibios_free_controller(struct pci_controller *phb); | ||
| 288 | |||
| 288 | #ifdef CONFIG_PCI | 289 | #ifdef CONFIG_PCI |
| 289 | extern unsigned long pci_address_to_pio(phys_addr_t address); | 290 | extern unsigned long pci_address_to_pio(phys_addr_t address); |
| 290 | extern int pcibios_vaddr_is_ioport(void __iomem *address); | 291 | extern int pcibios_vaddr_is_ioport(void __iomem *address); |
diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h index 8eaa7b28d9d0..87db8728e82d 100644 --- a/include/asm-powerpc/rtas.h +++ b/include/asm-powerpc/rtas.h | |||
| @@ -164,7 +164,8 @@ extern int rtas_call(int token, int, int, int *, ...); | |||
| 164 | extern void rtas_restart(char *cmd); | 164 | extern void rtas_restart(char *cmd); |
| 165 | extern void rtas_power_off(void); | 165 | extern void rtas_power_off(void); |
| 166 | extern void rtas_halt(void); | 166 | extern void rtas_halt(void); |
| 167 | extern void rtas_os_term(char *str); | 167 | extern void rtas_panic_msg(char *str); |
| 168 | extern void rtas_os_term(void); | ||
| 168 | extern int rtas_get_sensor(int sensor, int index, int *state); | 169 | extern int rtas_get_sensor(int sensor, int index, int *state); |
| 169 | extern int rtas_get_power_level(int powerdomain, int *level); | 170 | extern int rtas_get_power_level(int powerdomain, int *level); |
| 170 | extern int rtas_set_power_level(int powerdomain, int level, int *setlevel); | 171 | extern int rtas_set_power_level(int powerdomain, int level, int *setlevel); |
diff --git a/include/asm-powerpc/vdso_datapage.h b/include/asm-powerpc/vdso_datapage.h index 8a94f0eba5e9..f01393224b52 100644 --- a/include/asm-powerpc/vdso_datapage.h +++ b/include/asm-powerpc/vdso_datapage.h | |||
| @@ -77,6 +77,10 @@ struct vdso_data { | |||
| 77 | /* those additional ones don't have to be located anywhere | 77 | /* those additional ones don't have to be located anywhere |
| 78 | * special as they were not part of the original systemcfg | 78 | * special as they were not part of the original systemcfg |
| 79 | */ | 79 | */ |
| 80 | __u32 dcache_block_size; /* L1 d-cache block size */ | ||
| 81 | __u32 icache_block_size; /* L1 i-cache block size */ | ||
| 82 | __u32 dcache_log_block_size; /* L1 d-cache log block size */ | ||
| 83 | __u32 icache_log_block_size; /* L1 i-cache log block size */ | ||
| 80 | __s32 wtom_clock_sec; /* Wall to monotonic clock */ | 84 | __s32 wtom_clock_sec; /* Wall to monotonic clock */ |
| 81 | __s32 wtom_clock_nsec; | 85 | __s32 wtom_clock_nsec; |
| 82 | __u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of syscalls */ | 86 | __u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of syscalls */ |
| @@ -99,6 +103,10 @@ struct vdso_data { | |||
| 99 | __s32 wtom_clock_sec; /* Wall to monotonic clock */ | 103 | __s32 wtom_clock_sec; /* Wall to monotonic clock */ |
| 100 | __s32 wtom_clock_nsec; | 104 | __s32 wtom_clock_nsec; |
| 101 | __u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */ | 105 | __u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */ |
| 106 | __u32 dcache_block_size; /* L1 d-cache block size */ | ||
| 107 | __u32 icache_block_size; /* L1 i-cache block size */ | ||
| 108 | __u32 dcache_log_block_size; /* L1 d-cache log block size */ | ||
| 109 | __u32 icache_log_block_size; /* L1 i-cache log block size */ | ||
| 102 | }; | 110 | }; |
| 103 | 111 | ||
| 104 | #endif /* CONFIG_PPC64 */ | 112 | #endif /* CONFIG_PPC64 */ |
diff --git a/include/sound/version.h b/include/sound/version.h index a2be8ad8894b..a9781eb0da09 100644 --- a/include/sound/version.h +++ b/include/sound/version.h | |||
| @@ -1,3 +1,3 @@ | |||
| 1 | /* include/version.h. Generated by alsa/ksync script. */ | 1 | /* include/version.h. Generated by alsa/ksync script. */ |
| 2 | #define CONFIG_SND_VERSION "1.0.15" | 2 | #define CONFIG_SND_VERSION "1.0.15" |
| 3 | #define CONFIG_SND_DATE " (Tue Oct 23 06:09:18 2007 UTC)" | 3 | #define CONFIG_SND_DATE " (Tue Nov 20 19:16:42 2007 UTC)" |
diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c index 3306ecd49243..b57f2d5a1c9d 100644 --- a/sound/drivers/mpu401/mpu401_uart.c +++ b/sound/drivers/mpu401/mpu401_uart.c | |||
| @@ -97,23 +97,27 @@ static void snd_mpu401_uart_clear_rx(struct snd_mpu401 *mpu) | |||
| 97 | 97 | ||
| 98 | static void uart_interrupt_tx(struct snd_mpu401 *mpu) | 98 | static void uart_interrupt_tx(struct snd_mpu401 *mpu) |
| 99 | { | 99 | { |
| 100 | unsigned long flags; | ||
| 101 | |||
| 100 | if (test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode) && | 102 | if (test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode) && |
| 101 | test_bit(MPU401_MODE_BIT_OUTPUT_TRIGGER, &mpu->mode)) { | 103 | test_bit(MPU401_MODE_BIT_OUTPUT_TRIGGER, &mpu->mode)) { |
| 102 | spin_lock(&mpu->output_lock); | 104 | spin_lock_irqsave(&mpu->output_lock, flags); |
| 103 | snd_mpu401_uart_output_write(mpu); | 105 | snd_mpu401_uart_output_write(mpu); |
| 104 | spin_unlock(&mpu->output_lock); | 106 | spin_unlock_irqrestore(&mpu->output_lock, flags); |
| 105 | } | 107 | } |
| 106 | } | 108 | } |
| 107 | 109 | ||
| 108 | static void _snd_mpu401_uart_interrupt(struct snd_mpu401 *mpu) | 110 | static void _snd_mpu401_uart_interrupt(struct snd_mpu401 *mpu) |
| 109 | { | 111 | { |
| 112 | unsigned long flags; | ||
| 113 | |||
| 110 | if (mpu->info_flags & MPU401_INFO_INPUT) { | 114 | if (mpu->info_flags & MPU401_INFO_INPUT) { |
| 111 | spin_lock(&mpu->input_lock); | 115 | spin_lock_irqsave(&mpu->input_lock, flags); |
| 112 | if (test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) | 116 | if (test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) |
| 113 | snd_mpu401_uart_input_read(mpu); | 117 | snd_mpu401_uart_input_read(mpu); |
| 114 | else | 118 | else |
| 115 | snd_mpu401_uart_clear_rx(mpu); | 119 | snd_mpu401_uart_clear_rx(mpu); |
| 116 | spin_unlock(&mpu->input_lock); | 120 | spin_unlock_irqrestore(&mpu->input_lock, flags); |
| 117 | } | 121 | } |
| 118 | if (! (mpu->info_flags & MPU401_INFO_TX_IRQ)) | 122 | if (! (mpu->info_flags & MPU401_INFO_TX_IRQ)) |
| 119 | /* ok. for better Tx performance try do some output | 123 | /* ok. for better Tx performance try do some output |
diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c index e065b2a6444a..1b832870cc84 100644 --- a/sound/drivers/portman2x4.c +++ b/sound/drivers/portman2x4.c | |||
| @@ -668,7 +668,7 @@ static int __devinit snd_portman_probe_port(struct parport *p) | |||
| 668 | parport_release(pardev); | 668 | parport_release(pardev); |
| 669 | parport_unregister_device(pardev); | 669 | parport_unregister_device(pardev); |
| 670 | 670 | ||
| 671 | return res; | 671 | return res ? -EIO : 0; |
| 672 | } | 672 | } |
| 673 | 673 | ||
| 674 | static void __devinit snd_portman_attach(struct parport *p) | 674 | static void __devinit snd_portman_attach(struct parport *p) |
diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c index be519a17dfa5..3f9b5c560036 100644 --- a/sound/pci/ca0106/ca0106_mixer.c +++ b/sound/pci/ca0106/ca0106_mixer.c | |||
| @@ -86,7 +86,7 @@ static int snd_ca0106_shared_spdif_get(struct snd_kcontrol *kcontrol, | |||
| 86 | { | 86 | { |
| 87 | struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); | 87 | struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); |
| 88 | 88 | ||
| 89 | ucontrol->value.enumerated.item[0] = emu->spdif_enable; | 89 | ucontrol->value.integer.value[0] = emu->spdif_enable; |
| 90 | return 0; | 90 | return 0; |
| 91 | } | 91 | } |
| 92 | 92 | ||
| @@ -98,11 +98,11 @@ static int snd_ca0106_shared_spdif_put(struct snd_kcontrol *kcontrol, | |||
| 98 | int change = 0; | 98 | int change = 0; |
| 99 | u32 mask; | 99 | u32 mask; |
| 100 | 100 | ||
| 101 | val = ucontrol->value.enumerated.item[0] ; | 101 | val = !!ucontrol->value.integer.value[0]; |
| 102 | change = (emu->spdif_enable != val); | 102 | change = (emu->spdif_enable != val); |
| 103 | if (change) { | 103 | if (change) { |
| 104 | emu->spdif_enable = val; | 104 | emu->spdif_enable = val; |
| 105 | if (val == 1) { | 105 | if (val) { |
| 106 | /* Digital */ | 106 | /* Digital */ |
| 107 | snd_ca0106_ptr_write(emu, SPDIF_SELECT1, 0, 0xf); | 107 | snd_ca0106_ptr_write(emu, SPDIF_SELECT1, 0, 0xf); |
| 108 | snd_ca0106_ptr_write(emu, SPDIF_SELECT2, 0, 0x0b000000); | 108 | snd_ca0106_ptr_write(emu, SPDIF_SELECT2, 0, 0x0b000000); |
| @@ -159,6 +159,8 @@ static int snd_ca0106_capture_source_put(struct snd_kcontrol *kcontrol, | |||
| 159 | u32 source; | 159 | u32 source; |
| 160 | 160 | ||
| 161 | val = ucontrol->value.enumerated.item[0] ; | 161 | val = ucontrol->value.enumerated.item[0] ; |
| 162 | if (val >= 6) | ||
| 163 | return -EINVAL; | ||
| 162 | change = (emu->capture_source != val); | 164 | change = (emu->capture_source != val); |
| 163 | if (change) { | 165 | if (change) { |
| 164 | emu->capture_source = val; | 166 | emu->capture_source = val; |
| @@ -207,6 +209,8 @@ static int snd_ca0106_i2c_capture_source_put(struct snd_kcontrol *kcontrol, | |||
| 207 | * for the particular source. | 209 | * for the particular source. |
| 208 | */ | 210 | */ |
| 209 | source_id = ucontrol->value.enumerated.item[0] ; | 211 | source_id = ucontrol->value.enumerated.item[0] ; |
| 212 | if (source_id >= 4) | ||
| 213 | return -EINVAL; | ||
| 210 | change = (emu->i2c_capture_source != source_id); | 214 | change = (emu->i2c_capture_source != source_id); |
| 211 | if (change) { | 215 | if (change) { |
| 212 | snd_ca0106_i2c_write(emu, ADC_MUX, 0); /* Mute input */ | 216 | snd_ca0106_i2c_write(emu, ADC_MUX, 0); /* Mute input */ |
| @@ -271,6 +275,8 @@ static int snd_ca0106_capture_mic_line_in_put(struct snd_kcontrol *kcontrol, | |||
| 271 | u32 tmp; | 275 | u32 tmp; |
| 272 | 276 | ||
| 273 | val = ucontrol->value.enumerated.item[0] ; | 277 | val = ucontrol->value.enumerated.item[0] ; |
| 278 | if (val > 1) | ||
| 279 | return -EINVAL; | ||
| 274 | change = (emu->capture_mic_line_in != val); | 280 | change = (emu->capture_mic_line_in != val); |
| 275 | if (change) { | 281 | if (change) { |
| 276 | emu->capture_mic_line_in = val; | 282 | emu->capture_mic_line_in = val; |
| @@ -443,7 +449,7 @@ static int snd_ca0106_i2c_volume_put(struct snd_kcontrol *kcontrol, | |||
| 443 | ogain = emu->i2c_capture_volume[source_id][0]; /* Left */ | 449 | ogain = emu->i2c_capture_volume[source_id][0]; /* Left */ |
| 444 | ngain = ucontrol->value.integer.value[0]; | 450 | ngain = ucontrol->value.integer.value[0]; |
| 445 | if (ngain > 0xff) | 451 | if (ngain > 0xff) |
| 446 | return 0; | 452 | return -EINVAL; |
| 447 | if (ogain != ngain) { | 453 | if (ogain != ngain) { |
| 448 | if (emu->i2c_capture_source == source_id) | 454 | if (emu->i2c_capture_source == source_id) |
| 449 | snd_ca0106_i2c_write(emu, ADC_ATTEN_ADCL, ((ngain) & 0xff) ); | 455 | snd_ca0106_i2c_write(emu, ADC_ATTEN_ADCL, ((ngain) & 0xff) ); |
| @@ -453,7 +459,7 @@ static int snd_ca0106_i2c_volume_put(struct snd_kcontrol *kcontrol, | |||
| 453 | ogain = emu->i2c_capture_volume[source_id][1]; /* Right */ | 459 | ogain = emu->i2c_capture_volume[source_id][1]; /* Right */ |
| 454 | ngain = ucontrol->value.integer.value[1]; | 460 | ngain = ucontrol->value.integer.value[1]; |
| 455 | if (ngain > 0xff) | 461 | if (ngain > 0xff) |
| 456 | return 0; | 462 | return -EINVAL; |
| 457 | if (ogain != ngain) { | 463 | if (ogain != ngain) { |
| 458 | if (emu->i2c_capture_source == source_id) | 464 | if (emu->i2c_capture_source == source_id) |
| 459 | snd_ca0106_i2c_write(emu, ADC_ATTEN_ADCR, ((ngain) & 0xff)); | 465 | snd_ca0106_i2c_write(emu, ADC_ATTEN_ADCR, ((ngain) & 0xff)); |
| @@ -497,7 +503,7 @@ static int spi_mute_put(struct snd_kcontrol *kcontrol, | |||
| 497 | } | 503 | } |
| 498 | 504 | ||
| 499 | ret = snd_ca0106_spi_write(emu, emu->spi_dac_reg[reg]); | 505 | ret = snd_ca0106_spi_write(emu, emu->spi_dac_reg[reg]); |
| 500 | return ret ? -1 : 1; | 506 | return ret ? -EINVAL : 1; |
| 501 | } | 507 | } |
| 502 | 508 | ||
| 503 | #define CA_VOLUME(xname,chid,reg) \ | 509 | #define CA_VOLUME(xname,chid,reg) \ |
diff --git a/sound/pci/ca0106/ca0106_proc.c b/sound/pci/ca0106/ca0106_proc.c index ae80f51d8c4f..61f2718ae359 100644 --- a/sound/pci/ca0106/ca0106_proc.c +++ b/sound/pci/ca0106/ca0106_proc.c | |||
| @@ -445,13 +445,11 @@ int __devinit snd_ca0106_proc_init(struct snd_ca0106 * emu) | |||
| 445 | snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read1); | 445 | snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read1); |
| 446 | entry->c.text.write = snd_ca0106_proc_reg_write; | 446 | entry->c.text.write = snd_ca0106_proc_reg_write; |
| 447 | entry->mode |= S_IWUSR; | 447 | entry->mode |= S_IWUSR; |
| 448 | // entry->private_data = emu; | ||
| 449 | } | 448 | } |
| 450 | if(! snd_card_proc_new(emu->card, "ca0106_i2c", &entry)) { | 449 | if(! snd_card_proc_new(emu->card, "ca0106_i2c", &entry)) { |
| 451 | snd_info_set_text_ops(entry, emu, snd_ca0106_proc_i2c_write); | ||
| 452 | entry->c.text.write = snd_ca0106_proc_i2c_write; | 450 | entry->c.text.write = snd_ca0106_proc_i2c_write; |
| 451 | entry->private_data = emu; | ||
| 453 | entry->mode |= S_IWUSR; | 452 | entry->mode |= S_IWUSR; |
| 454 | // entry->private_data = emu; | ||
| 455 | } | 453 | } |
| 456 | if(! snd_card_proc_new(emu->card, "ca0106_regs2", &entry)) | 454 | if(! snd_card_proc_new(emu->card, "ca0106_regs2", &entry)) |
| 457 | snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read2); | 455 | snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read2); |
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 6832649879ce..1fa5f004e858 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
| @@ -246,10 +246,9 @@ MODULE_PARM_DESC(joystick_port, "Joystick port address."); | |||
| 246 | #define CM_MMODE_MASK 0x00000E00 /* model DAA interface mode */ | 246 | #define CM_MMODE_MASK 0x00000E00 /* model DAA interface mode */ |
| 247 | #define CM_SPDIF_SELECT2 0x00000100 /* for model > 039 ? */ | 247 | #define CM_SPDIF_SELECT2 0x00000100 /* for model > 039 ? */ |
| 248 | #define CM_ENCENTER 0x00000080 | 248 | #define CM_ENCENTER 0x00000080 |
| 249 | #define CM_FLINKON 0x00000080 /* force modem link detection on, model 037 */ | 249 | #define CM_FLINKON 0x00000040 /* force modem link detection on, model 037 */ |
| 250 | #define CM_MUTECH1 0x00000040 /* mute PCI ch1 to DAC */ | 250 | #define CM_MUTECH1 0x00000040 /* mute PCI ch1 to DAC */ |
| 251 | #define CM_FLINKOFF 0x00000040 /* force modem link detection off, model 037 */ | 251 | #define CM_FLINKOFF 0x00000020 /* force modem link detection off, model 037 */ |
| 252 | #define CM_UNKNOWN_18_5 0x00000020 /* ? */ | ||
| 253 | #define CM_MIDSMP 0x00000010 /* 1/2 interpolation at front end DAC */ | 252 | #define CM_MIDSMP 0x00000010 /* 1/2 interpolation at front end DAC */ |
| 254 | #define CM_UPDDMA_MASK 0x0000000C /* TDMA position update notification */ | 253 | #define CM_UPDDMA_MASK 0x0000000C /* TDMA position update notification */ |
| 255 | #define CM_UPDDMA_2048 0x00000000 | 254 | #define CM_UPDDMA_2048 0x00000000 |
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c index 54a2034d8edd..ccacd7b890e8 100644 --- a/sound/pci/emu10k1/emumixer.c +++ b/sound/pci/emu10k1/emumixer.c | |||
| @@ -58,6 +58,9 @@ static int snd_emu10k1_spdif_get(struct snd_kcontrol *kcontrol, | |||
| 58 | unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); | 58 | unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); |
| 59 | unsigned long flags; | 59 | unsigned long flags; |
| 60 | 60 | ||
| 61 | /* Limit: emu->spdif_bits */ | ||
| 62 | if (idx >= 3) | ||
| 63 | return -EINVAL; | ||
| 61 | spin_lock_irqsave(&emu->reg_lock, flags); | 64 | spin_lock_irqsave(&emu->reg_lock, flags); |
| 62 | ucontrol->value.iec958.status[0] = (emu->spdif_bits[idx] >> 0) & 0xff; | 65 | ucontrol->value.iec958.status[0] = (emu->spdif_bits[idx] >> 0) & 0xff; |
| 63 | ucontrol->value.iec958.status[1] = (emu->spdif_bits[idx] >> 8) & 0xff; | 66 | ucontrol->value.iec958.status[1] = (emu->spdif_bits[idx] >> 8) & 0xff; |
| @@ -272,9 +275,12 @@ static int snd_emu1010_output_source_get(struct snd_kcontrol *kcontrol, | |||
| 272 | struct snd_ctl_elem_value *ucontrol) | 275 | struct snd_ctl_elem_value *ucontrol) |
| 273 | { | 276 | { |
| 274 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); | 277 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); |
| 275 | int channel; | 278 | unsigned int channel; |
| 276 | 279 | ||
| 277 | channel = (kcontrol->private_value) & 0xff; | 280 | channel = (kcontrol->private_value) & 0xff; |
| 281 | /* Limit: emu1010_output_dst, emu->emu1010.output_source */ | ||
| 282 | if (channel >= 24) | ||
| 283 | return -EINVAL; | ||
| 278 | ucontrol->value.enumerated.item[0] = emu->emu1010.output_source[channel]; | 284 | ucontrol->value.enumerated.item[0] = emu->emu1010.output_source[channel]; |
| 279 | return 0; | 285 | return 0; |
| 280 | } | 286 | } |
| @@ -285,11 +291,17 @@ static int snd_emu1010_output_source_put(struct snd_kcontrol *kcontrol, | |||
| 285 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); | 291 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); |
| 286 | int change = 0; | 292 | int change = 0; |
| 287 | unsigned int val; | 293 | unsigned int val; |
| 288 | int channel; | 294 | unsigned int channel; |
| 289 | 295 | ||
| 296 | val = ucontrol->value.enumerated.item[0]; | ||
| 297 | if (val >= 53) | ||
| 298 | return -EINVAL; | ||
| 290 | channel = (kcontrol->private_value) & 0xff; | 299 | channel = (kcontrol->private_value) & 0xff; |
| 291 | if (emu->emu1010.output_source[channel] != ucontrol->value.enumerated.item[0]) { | 300 | /* Limit: emu1010_output_dst, emu->emu1010.output_source */ |
| 292 | val = emu->emu1010.output_source[channel] = ucontrol->value.enumerated.item[0]; | 301 | if (channel >= 24) |
| 302 | return -EINVAL; | ||
| 303 | if (emu->emu1010.output_source[channel] != val) { | ||
| 304 | emu->emu1010.output_source[channel] = val; | ||
| 293 | change = 1; | 305 | change = 1; |
| 294 | snd_emu1010_fpga_link_dst_src_write(emu, | 306 | snd_emu1010_fpga_link_dst_src_write(emu, |
| 295 | emu1010_output_dst[channel], emu1010_src_regs[val]); | 307 | emu1010_output_dst[channel], emu1010_src_regs[val]); |
| @@ -301,9 +313,12 @@ static int snd_emu1010_input_source_get(struct snd_kcontrol *kcontrol, | |||
| 301 | struct snd_ctl_elem_value *ucontrol) | 313 | struct snd_ctl_elem_value *ucontrol) |
| 302 | { | 314 | { |
| 303 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); | 315 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); |
| 304 | int channel; | 316 | unsigned int channel; |
| 305 | 317 | ||
| 306 | channel = (kcontrol->private_value) & 0xff; | 318 | channel = (kcontrol->private_value) & 0xff; |
| 319 | /* Limit: emu1010_input_dst, emu->emu1010.input_source */ | ||
| 320 | if (channel >= 22) | ||
| 321 | return -EINVAL; | ||
| 307 | ucontrol->value.enumerated.item[0] = emu->emu1010.input_source[channel]; | 322 | ucontrol->value.enumerated.item[0] = emu->emu1010.input_source[channel]; |
| 308 | return 0; | 323 | return 0; |
| 309 | } | 324 | } |
| @@ -314,11 +329,17 @@ static int snd_emu1010_input_source_put(struct snd_kcontrol *kcontrol, | |||
| 314 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); | 329 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); |
| 315 | int change = 0; | 330 | int change = 0; |
| 316 | unsigned int val; | 331 | unsigned int val; |
| 317 | int channel; | 332 | unsigned int channel; |
| 318 | 333 | ||
| 334 | val = ucontrol->value.enumerated.item[0]; | ||
| 335 | if (val >= 53) | ||
| 336 | return -EINVAL; | ||
| 319 | channel = (kcontrol->private_value) & 0xff; | 337 | channel = (kcontrol->private_value) & 0xff; |
| 320 | if (emu->emu1010.input_source[channel] != ucontrol->value.enumerated.item[0]) { | 338 | /* Limit: emu1010_input_dst, emu->emu1010.input_source */ |
| 321 | val = emu->emu1010.input_source[channel] = ucontrol->value.enumerated.item[0]; | 339 | if (channel >= 22) |
| 340 | return -EINVAL; | ||
| 341 | if (emu->emu1010.input_source[channel] != val) { | ||
| 342 | emu->emu1010.input_source[channel] = val; | ||
| 322 | change = 1; | 343 | change = 1; |
| 323 | snd_emu1010_fpga_link_dst_src_write(emu, | 344 | snd_emu1010_fpga_link_dst_src_write(emu, |
| 324 | emu1010_input_dst[channel], emu1010_src_regs[val]); | 345 | emu1010_input_dst[channel], emu1010_src_regs[val]); |
| @@ -533,6 +554,9 @@ static int snd_emu1010_internal_clock_put(struct snd_kcontrol *kcontrol, | |||
| 533 | int change = 0; | 554 | int change = 0; |
| 534 | 555 | ||
| 535 | val = ucontrol->value.enumerated.item[0] ; | 556 | val = ucontrol->value.enumerated.item[0] ; |
| 557 | /* Limit: uinfo->value.enumerated.items = 4; */ | ||
| 558 | if (val >= 4) | ||
| 559 | return -EINVAL; | ||
| 536 | change = (emu->emu1010.internal_clock != val); | 560 | change = (emu->emu1010.internal_clock != val); |
| 537 | if (change) { | 561 | if (change) { |
| 538 | emu->emu1010.internal_clock = val; | 562 | emu->emu1010.internal_clock = val; |
| @@ -669,7 +693,11 @@ static int snd_audigy_i2c_capture_source_put(struct snd_kcontrol *kcontrol, | |||
| 669 | * update the capture volume from the cached value | 693 | * update the capture volume from the cached value |
| 670 | * for the particular source. | 694 | * for the particular source. |
| 671 | */ | 695 | */ |
| 672 | source_id = ucontrol->value.enumerated.item[0]; /* Use 2 and 3 */ | 696 | source_id = ucontrol->value.enumerated.item[0]; |
| 697 | /* Limit: uinfo->value.enumerated.items = 2; */ | ||
| 698 | /* emu->i2c_capture_volume */ | ||
| 699 | if (source_id >= 2) | ||
| 700 | return -EINVAL; | ||
| 673 | change = (emu->i2c_capture_source != source_id); | 701 | change = (emu->i2c_capture_source != source_id); |
| 674 | if (change) { | 702 | if (change) { |
| 675 | snd_emu10k1_i2c_write(emu, ADC_MUX, 0); /* Mute input */ | 703 | snd_emu10k1_i2c_write(emu, ADC_MUX, 0); /* Mute input */ |
| @@ -720,9 +748,13 @@ static int snd_audigy_i2c_volume_get(struct snd_kcontrol *kcontrol, | |||
| 720 | struct snd_ctl_elem_value *ucontrol) | 748 | struct snd_ctl_elem_value *ucontrol) |
| 721 | { | 749 | { |
| 722 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); | 750 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); |
| 723 | int source_id; | 751 | unsigned int source_id; |
| 724 | 752 | ||
| 725 | source_id = kcontrol->private_value; | 753 | source_id = kcontrol->private_value; |
| 754 | /* Limit: emu->i2c_capture_volume */ | ||
| 755 | /* capture_source: uinfo->value.enumerated.items = 2 */ | ||
| 756 | if (source_id >= 2) | ||
| 757 | return -EINVAL; | ||
| 726 | 758 | ||
| 727 | ucontrol->value.integer.value[0] = emu->i2c_capture_volume[source_id][0]; | 759 | ucontrol->value.integer.value[0] = emu->i2c_capture_volume[source_id][0]; |
| 728 | ucontrol->value.integer.value[1] = emu->i2c_capture_volume[source_id][1]; | 760 | ucontrol->value.integer.value[1] = emu->i2c_capture_volume[source_id][1]; |
| @@ -735,10 +767,14 @@ static int snd_audigy_i2c_volume_put(struct snd_kcontrol *kcontrol, | |||
| 735 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); | 767 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); |
| 736 | unsigned int ogain; | 768 | unsigned int ogain; |
| 737 | unsigned int ngain; | 769 | unsigned int ngain; |
| 738 | int source_id; | 770 | unsigned int source_id; |
| 739 | int change = 0; | 771 | int change = 0; |
| 740 | 772 | ||
| 741 | source_id = kcontrol->private_value; | 773 | source_id = kcontrol->private_value; |
| 774 | /* Limit: emu->i2c_capture_volume */ | ||
| 775 | /* capture_source: uinfo->value.enumerated.items = 2 */ | ||
| 776 | if (source_id >= 2) | ||
| 777 | return -EINVAL; | ||
| 742 | ogain = emu->i2c_capture_volume[source_id][0]; /* Left */ | 778 | ogain = emu->i2c_capture_volume[source_id][0]; /* Left */ |
| 743 | ngain = ucontrol->value.integer.value[0]; | 779 | ngain = ucontrol->value.integer.value[0]; |
| 744 | if (ngain > 0xff) | 780 | if (ngain > 0xff) |
| @@ -746,7 +782,7 @@ static int snd_audigy_i2c_volume_put(struct snd_kcontrol *kcontrol, | |||
| 746 | if (ogain != ngain) { | 782 | if (ogain != ngain) { |
| 747 | if (emu->i2c_capture_source == source_id) | 783 | if (emu->i2c_capture_source == source_id) |
| 748 | snd_emu10k1_i2c_write(emu, ADC_ATTEN_ADCL, ((ngain) & 0xff) ); | 784 | snd_emu10k1_i2c_write(emu, ADC_ATTEN_ADCL, ((ngain) & 0xff) ); |
| 749 | emu->i2c_capture_volume[source_id][0] = ucontrol->value.integer.value[0]; | 785 | emu->i2c_capture_volume[source_id][0] = ngain; |
| 750 | change = 1; | 786 | change = 1; |
| 751 | } | 787 | } |
| 752 | ogain = emu->i2c_capture_volume[source_id][1]; /* Right */ | 788 | ogain = emu->i2c_capture_volume[source_id][1]; /* Right */ |
| @@ -756,7 +792,7 @@ static int snd_audigy_i2c_volume_put(struct snd_kcontrol *kcontrol, | |||
| 756 | if (ogain != ngain) { | 792 | if (ogain != ngain) { |
| 757 | if (emu->i2c_capture_source == source_id) | 793 | if (emu->i2c_capture_source == source_id) |
| 758 | snd_emu10k1_i2c_write(emu, ADC_ATTEN_ADCR, ((ngain) & 0xff)); | 794 | snd_emu10k1_i2c_write(emu, ADC_ATTEN_ADCR, ((ngain) & 0xff)); |
| 759 | emu->i2c_capture_volume[source_id][1] = ucontrol->value.integer.value[1]; | 795 | emu->i2c_capture_volume[source_id][1] = ngain; |
| 760 | change = 1; | 796 | change = 1; |
| 761 | } | 797 | } |
| 762 | 798 | ||
| @@ -877,6 +913,9 @@ static int snd_emu10k1_spdif_put(struct snd_kcontrol *kcontrol, | |||
| 877 | unsigned int val; | 913 | unsigned int val; |
| 878 | unsigned long flags; | 914 | unsigned long flags; |
| 879 | 915 | ||
| 916 | /* Limit: emu->spdif_bits */ | ||
| 917 | if (idx >= 3) | ||
| 918 | return -EINVAL; | ||
| 880 | val = (ucontrol->value.iec958.status[0] << 0) | | 919 | val = (ucontrol->value.iec958.status[0] << 0) | |
| 881 | (ucontrol->value.iec958.status[1] << 8) | | 920 | (ucontrol->value.iec958.status[1] << 8) | |
| 882 | (ucontrol->value.iec958.status[2] << 16) | | 921 | (ucontrol->value.iec958.status[2] << 16) | |
diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c index d619a3842cdd..9fd3135f3118 100644 --- a/sound/pci/emu10k1/p16v.c +++ b/sound/pci/emu10k1/p16v.c | |||
| @@ -742,6 +742,8 @@ static int snd_p16v_capture_source_put(struct snd_kcontrol *kcontrol, | |||
| 742 | u32 source; | 742 | u32 source; |
| 743 | 743 | ||
| 744 | val = ucontrol->value.enumerated.item[0] ; | 744 | val = ucontrol->value.enumerated.item[0] ; |
| 745 | if (val > 7) | ||
| 746 | return -EINVAL; | ||
| 745 | change = (emu->p16v_capture_source != val); | 747 | change = (emu->p16v_capture_source != val); |
| 746 | if (change) { | 748 | if (change) { |
| 747 | emu->p16v_capture_source = val; | 749 | emu->p16v_capture_source = val; |
| @@ -784,6 +786,8 @@ static int snd_p16v_capture_channel_put(struct snd_kcontrol *kcontrol, | |||
| 784 | u32 tmp; | 786 | u32 tmp; |
| 785 | 787 | ||
| 786 | val = ucontrol->value.enumerated.item[0] ; | 788 | val = ucontrol->value.enumerated.item[0] ; |
| 789 | if (val > 3) | ||
| 790 | return -EINVAL; | ||
| 787 | change = (emu->p16v_capture_channel != val); | 791 | change = (emu->p16v_capture_channel != val); |
| 788 | if (change) { | 792 | if (change) { |
| 789 | emu->p16v_capture_channel = val; | 793 | emu->p16v_capture_channel = val; |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index ad4cb38109fc..8cbe3bf1e317 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
| @@ -1625,19 +1625,26 @@ static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg, | |||
| 1625 | 1625 | ||
| 1626 | nid = codec->start_nid; | 1626 | nid = codec->start_nid; |
| 1627 | for (i = 0; i < codec->num_nodes; i++, nid++) { | 1627 | for (i = 0; i < codec->num_nodes; i++, nid++) { |
| 1628 | if (get_wcaps(codec, nid) & AC_WCAP_POWER) { | 1628 | unsigned int wcaps = get_wcaps(codec, nid); |
| 1629 | unsigned int pincap; | 1629 | if (wcaps & AC_WCAP_POWER) { |
| 1630 | /* | 1630 | unsigned int wid_type = (wcaps & AC_WCAP_TYPE) >> |
| 1631 | * don't power down the widget if it controls eapd | 1631 | AC_WCAP_TYPE_SHIFT; |
| 1632 | * and EAPD_BTLENABLE is set. | 1632 | if (wid_type == AC_WID_PIN) { |
| 1633 | */ | 1633 | unsigned int pincap; |
| 1634 | pincap = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP); | 1634 | /* |
| 1635 | if (pincap & AC_PINCAP_EAPD) { | 1635 | * don't power down the widget if it controls |
| 1636 | int eapd = snd_hda_codec_read(codec, nid, | 1636 | * eapd and EAPD_BTLENABLE is set. |
| 1637 | 0, AC_VERB_GET_EAPD_BTLENABLE, 0); | 1637 | */ |
| 1638 | eapd &= 0x02; | 1638 | pincap = snd_hda_param_read(codec, nid, |
| 1639 | if (power_state == AC_PWRST_D3 && eapd) | 1639 | AC_PAR_PIN_CAP); |
| 1640 | continue; | 1640 | if (pincap & AC_PINCAP_EAPD) { |
| 1641 | int eapd = snd_hda_codec_read(codec, | ||
| 1642 | nid, 0, | ||
| 1643 | AC_VERB_GET_EAPD_BTLENABLE, 0); | ||
| 1644 | eapd &= 0x02; | ||
| 1645 | if (power_state == AC_PWRST_D3 && eapd) | ||
| 1646 | continue; | ||
| 1647 | } | ||
| 1641 | } | 1648 | } |
| 1642 | snd_hda_codec_write(codec, nid, 0, | 1649 | snd_hda_codec_write(codec, nid, 0, |
| 1643 | AC_VERB_SET_POWER_STATE, | 1650 | AC_VERB_SET_POWER_STATE, |
| @@ -2485,13 +2492,14 @@ int snd_hda_multi_out_analog_prepare(struct hda_codec *codec, | |||
| 2485 | /* front */ | 2492 | /* front */ |
| 2486 | snd_hda_codec_setup_stream(codec, nids[HDA_FRONT], stream_tag, | 2493 | snd_hda_codec_setup_stream(codec, nids[HDA_FRONT], stream_tag, |
| 2487 | 0, format); | 2494 | 0, format); |
| 2488 | if (mout->hp_nid && mout->hp_nid != nids[HDA_FRONT]) | 2495 | if (!mout->no_share_stream && |
| 2496 | mout->hp_nid && mout->hp_nid != nids[HDA_FRONT]) | ||
| 2489 | /* headphone out will just decode front left/right (stereo) */ | 2497 | /* headphone out will just decode front left/right (stereo) */ |
| 2490 | snd_hda_codec_setup_stream(codec, mout->hp_nid, stream_tag, | 2498 | snd_hda_codec_setup_stream(codec, mout->hp_nid, stream_tag, |
| 2491 | 0, format); | 2499 | 0, format); |
| 2492 | /* extra outputs copied from front */ | 2500 | /* extra outputs copied from front */ |
| 2493 | for (i = 0; i < ARRAY_SIZE(mout->extra_out_nid); i++) | 2501 | for (i = 0; i < ARRAY_SIZE(mout->extra_out_nid); i++) |
| 2494 | if (mout->extra_out_nid[i]) | 2502 | if (!mout->no_share_stream && mout->extra_out_nid[i]) |
| 2495 | snd_hda_codec_setup_stream(codec, | 2503 | snd_hda_codec_setup_stream(codec, |
| 2496 | mout->extra_out_nid[i], | 2504 | mout->extra_out_nid[i], |
| 2497 | stream_tag, 0, format); | 2505 | stream_tag, 0, format); |
| @@ -2501,7 +2509,7 @@ int snd_hda_multi_out_analog_prepare(struct hda_codec *codec, | |||
| 2501 | if (chs >= (i + 1) * 2) /* independent out */ | 2509 | if (chs >= (i + 1) * 2) /* independent out */ |
| 2502 | snd_hda_codec_setup_stream(codec, nids[i], stream_tag, | 2510 | snd_hda_codec_setup_stream(codec, nids[i], stream_tag, |
| 2503 | i * 2, format); | 2511 | i * 2, format); |
| 2504 | else /* copy front */ | 2512 | else if (!mout->no_share_stream) /* copy front */ |
| 2505 | snd_hda_codec_setup_stream(codec, nids[i], stream_tag, | 2513 | snd_hda_codec_setup_stream(codec, nids[i], stream_tag, |
| 2506 | 0, format); | 2514 | 0, format); |
| 2507 | } | 2515 | } |
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 20c5e6250374..8c56c9cb0d09 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h | |||
| @@ -220,6 +220,7 @@ struct hda_multi_out { | |||
| 220 | hda_nid_t dig_out_nid; /* digital out audio widget */ | 220 | hda_nid_t dig_out_nid; /* digital out audio widget */ |
| 221 | int max_channels; /* currently supported analog channels */ | 221 | int max_channels; /* currently supported analog channels */ |
| 222 | int dig_out_used; /* current usage of digital out (HDA_DIG_XXX) */ | 222 | int dig_out_used; /* current usage of digital out (HDA_DIG_XXX) */ |
| 223 | int no_share_stream; /* don't share a stream with multiple pins */ | ||
| 223 | }; | 224 | }; |
| 224 | 225 | ||
| 225 | int snd_hda_multi_out_dig_open(struct hda_codec *codec, | 226 | int snd_hda_multi_out_dig_open(struct hda_codec *codec, |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 0ee8ae4d4410..196ad3c9405d 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
| @@ -957,6 +957,14 @@ static int patch_ad1986a(struct hda_codec *codec) | |||
| 957 | break; | 957 | break; |
| 958 | } | 958 | } |
| 959 | 959 | ||
| 960 | /* AD1986A has a hardware problem that it can't share a stream | ||
| 961 | * with multiple output pins. The copy of front to surrounds | ||
| 962 | * causes noisy or silent outputs at a certain timing, e.g. | ||
| 963 | * changing the volume. | ||
| 964 | * So, let's disable the shared stream. | ||
| 965 | */ | ||
| 966 | spec->multiout.no_share_stream = 1; | ||
| 967 | |||
| 960 | return 0; | 968 | return 0; |
| 961 | } | 969 | } |
| 962 | 970 | ||
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index f9b2c435a130..04012237096c 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
| @@ -111,7 +111,6 @@ struct sigmatel_spec { | |||
| 111 | unsigned int alt_switch: 1; | 111 | unsigned int alt_switch: 1; |
| 112 | unsigned int hp_detect: 1; | 112 | unsigned int hp_detect: 1; |
| 113 | unsigned int gpio_mute: 1; | 113 | unsigned int gpio_mute: 1; |
| 114 | unsigned int no_vol_knob :1; | ||
| 115 | 114 | ||
| 116 | unsigned int gpio_mask, gpio_data; | 115 | unsigned int gpio_mask, gpio_data; |
| 117 | 116 | ||
| @@ -342,42 +341,6 @@ static int stac92xx_aloopback_put(struct snd_kcontrol *kcontrol, | |||
| 342 | return 1; | 341 | return 1; |
| 343 | } | 342 | } |
| 344 | 343 | ||
| 345 | static int stac92xx_volknob_info(struct snd_kcontrol *kcontrol, | ||
| 346 | struct snd_ctl_elem_info *uinfo) | ||
| 347 | { | ||
| 348 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | ||
| 349 | uinfo->count = 1; | ||
| 350 | uinfo->value.integer.min = 0; | ||
| 351 | uinfo->value.integer.max = 127; | ||
| 352 | return 0; | ||
| 353 | } | ||
| 354 | |||
| 355 | static int stac92xx_volknob_get(struct snd_kcontrol *kcontrol, | ||
| 356 | struct snd_ctl_elem_value *ucontrol) | ||
| 357 | { | ||
| 358 | ucontrol->value.integer.value[0] = kcontrol->private_value & 0xff; | ||
| 359 | return 0; | ||
| 360 | } | ||
| 361 | |||
| 362 | static int stac92xx_volknob_put(struct snd_kcontrol *kcontrol, | ||
| 363 | struct snd_ctl_elem_value *ucontrol) | ||
| 364 | { | ||
| 365 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | ||
| 366 | unsigned int val = kcontrol->private_value & 0xff; | ||
| 367 | |||
| 368 | if (val == ucontrol->value.integer.value[0]) | ||
| 369 | return 0; | ||
| 370 | |||
| 371 | val = ucontrol->value.integer.value[0]; | ||
| 372 | kcontrol->private_value &= ~0xff; | ||
| 373 | kcontrol->private_value |= val; | ||
| 374 | |||
| 375 | snd_hda_codec_write_cache(codec, kcontrol->private_value >> 16, 0, | ||
| 376 | AC_VERB_SET_VOLUME_KNOB_CONTROL, val | 0x80); | ||
| 377 | return 1; | ||
| 378 | } | ||
| 379 | |||
| 380 | |||
| 381 | static struct hda_verb stac9200_core_init[] = { | 344 | static struct hda_verb stac9200_core_init[] = { |
| 382 | /* set dac0mux for dac converter */ | 345 | /* set dac0mux for dac converter */ |
| 383 | { 0x07, AC_VERB_SET_CONNECT_SEL, 0x00}, | 346 | { 0x07, AC_VERB_SET_CONNECT_SEL, 0x00}, |
| @@ -446,18 +409,6 @@ static struct hda_verb stac9205_core_init[] = { | |||
| 446 | .private_value = verb_read | (verb_write << 16), \ | 409 | .private_value = verb_read | (verb_write << 16), \ |
| 447 | } | 410 | } |
| 448 | 411 | ||
| 449 | #define STAC_VOLKNOB(knob_nid) \ | ||
| 450 | { \ | ||
| 451 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | ||
| 452 | .name = "Master Playback Volume", \ | ||
| 453 | .count = 1, \ | ||
| 454 | .info = stac92xx_volknob_info, \ | ||
| 455 | .get = stac92xx_volknob_get, \ | ||
| 456 | .put = stac92xx_volknob_put, \ | ||
| 457 | .private_value = 127 | (knob_nid << 16), \ | ||
| 458 | } | ||
| 459 | |||
| 460 | |||
| 461 | static struct snd_kcontrol_new stac9200_mixer[] = { | 412 | static struct snd_kcontrol_new stac9200_mixer[] = { |
| 462 | HDA_CODEC_VOLUME("Master Playback Volume", 0xb, 0, HDA_OUTPUT), | 413 | HDA_CODEC_VOLUME("Master Playback Volume", 0xb, 0, HDA_OUTPUT), |
| 463 | HDA_CODEC_MUTE("Master Playback Switch", 0xb, 0, HDA_OUTPUT), | 414 | HDA_CODEC_MUTE("Master Playback Switch", 0xb, 0, HDA_OUTPUT), |
| @@ -487,7 +438,6 @@ static struct snd_kcontrol_new stac9205_mixer[] = { | |||
| 487 | }, | 438 | }, |
| 488 | STAC_INPUT_SOURCE(2), | 439 | STAC_INPUT_SOURCE(2), |
| 489 | STAC_ANALOG_LOOPBACK(0xFE0, 0x7E0), | 440 | STAC_ANALOG_LOOPBACK(0xFE0, 0x7E0), |
| 490 | STAC_VOLKNOB(0x24), | ||
| 491 | 441 | ||
| 492 | HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1b, 0x0, HDA_INPUT), | 442 | HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1b, 0x0, HDA_INPUT), |
| 493 | HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1d, 0x0, HDA_OUTPUT), | 443 | HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1d, 0x0, HDA_OUTPUT), |
| @@ -503,7 +453,6 @@ static struct snd_kcontrol_new stac9205_mixer[] = { | |||
| 503 | /* This needs to be generated dynamically based on sequence */ | 453 | /* This needs to be generated dynamically based on sequence */ |
| 504 | static struct snd_kcontrol_new stac922x_mixer[] = { | 454 | static struct snd_kcontrol_new stac922x_mixer[] = { |
| 505 | STAC_INPUT_SOURCE(2), | 455 | STAC_INPUT_SOURCE(2), |
| 506 | STAC_VOLKNOB(0x16), | ||
| 507 | HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x17, 0x0, HDA_INPUT), | 456 | HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x17, 0x0, HDA_INPUT), |
| 508 | HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x17, 0x0, HDA_INPUT), | 457 | HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x17, 0x0, HDA_INPUT), |
| 509 | HDA_CODEC_VOLUME_IDX("Mux Capture Volume", 0x0, 0x12, 0x0, HDA_OUTPUT), | 458 | HDA_CODEC_VOLUME_IDX("Mux Capture Volume", 0x0, 0x12, 0x0, HDA_OUTPUT), |
| @@ -517,7 +466,6 @@ static struct snd_kcontrol_new stac922x_mixer[] = { | |||
| 517 | 466 | ||
| 518 | static struct snd_kcontrol_new stac927x_mixer[] = { | 467 | static struct snd_kcontrol_new stac927x_mixer[] = { |
| 519 | STAC_INPUT_SOURCE(3), | 468 | STAC_INPUT_SOURCE(3), |
| 520 | STAC_VOLKNOB(0x24), | ||
| 521 | STAC_ANALOG_LOOPBACK(0xFEB, 0x7EB), | 469 | STAC_ANALOG_LOOPBACK(0xFEB, 0x7EB), |
| 522 | 470 | ||
| 523 | HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x18, 0x0, HDA_INPUT), | 471 | HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x18, 0x0, HDA_INPUT), |
| @@ -1931,8 +1879,7 @@ static int stac92xx_auto_create_hp_ctls(struct hda_codec *codec, | |||
| 1931 | } | 1879 | } |
| 1932 | if (spec->multiout.hp_nid) { | 1880 | if (spec->multiout.hp_nid) { |
| 1933 | const char *pfx; | 1881 | const char *pfx; |
| 1934 | if (old_num_dacs == spec->multiout.num_dacs && | 1882 | if (old_num_dacs == spec->multiout.num_dacs) |
| 1935 | spec->no_vol_knob) | ||
| 1936 | pfx = "Master"; | 1883 | pfx = "Master"; |
| 1937 | else | 1884 | else |
| 1938 | pfx = "Headphone"; | 1885 | pfx = "Headphone"; |
| @@ -2489,7 +2436,6 @@ static int patch_stac9200(struct hda_codec *codec) | |||
| 2489 | codec->spec = spec; | 2436 | codec->spec = spec; |
| 2490 | spec->num_pins = ARRAY_SIZE(stac9200_pin_nids); | 2437 | spec->num_pins = ARRAY_SIZE(stac9200_pin_nids); |
| 2491 | spec->pin_nids = stac9200_pin_nids; | 2438 | spec->pin_nids = stac9200_pin_nids; |
| 2492 | spec->no_vol_knob = 1; | ||
| 2493 | spec->board_config = snd_hda_check_board_config(codec, STAC_9200_MODELS, | 2439 | spec->board_config = snd_hda_check_board_config(codec, STAC_9200_MODELS, |
| 2494 | stac9200_models, | 2440 | stac9200_models, |
| 2495 | stac9200_cfg_tbl); | 2441 | stac9200_cfg_tbl); |
| @@ -2544,7 +2490,6 @@ static int patch_stac925x(struct hda_codec *codec) | |||
| 2544 | codec->spec = spec; | 2490 | codec->spec = spec; |
| 2545 | spec->num_pins = ARRAY_SIZE(stac925x_pin_nids); | 2491 | spec->num_pins = ARRAY_SIZE(stac925x_pin_nids); |
| 2546 | spec->pin_nids = stac925x_pin_nids; | 2492 | spec->pin_nids = stac925x_pin_nids; |
| 2547 | spec->no_vol_knob = 1; | ||
| 2548 | spec->board_config = snd_hda_check_board_config(codec, STAC_925x_MODELS, | 2493 | spec->board_config = snd_hda_check_board_config(codec, STAC_925x_MODELS, |
| 2549 | stac925x_models, | 2494 | stac925x_models, |
| 2550 | stac925x_cfg_tbl); | 2495 | stac925x_cfg_tbl); |
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index 5d601ad6da70..abac62866da8 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c | |||
| @@ -725,7 +725,8 @@ static int cs4270_probe(struct platform_device *pdev) | |||
| 725 | codec->owner = THIS_MODULE; | 725 | codec->owner = THIS_MODULE; |
| 726 | codec->dai = &cs4270_dai; | 726 | codec->dai = &cs4270_dai; |
| 727 | codec->num_dai = 1; | 727 | codec->num_dai = 1; |
| 728 | codec->private_data = codec + ALIGN(sizeof(struct snd_soc_codec), 4); | 728 | codec->private_data = (void *) codec + |
| 729 | ALIGN(sizeof(struct snd_soc_codec), 4); | ||
| 729 | 730 | ||
| 730 | socdev->codec = codec; | 731 | socdev->codec = codec; |
| 731 | 732 | ||
diff --git a/sound/soc/s3c24xx/s3c2443-ac97.c b/sound/soc/s3c24xx/s3c2443-ac97.c index 75acf7ef5528..758a2637e7ac 100644 --- a/sound/soc/s3c24xx/s3c2443-ac97.c +++ b/sound/soc/s3c24xx/s3c2443-ac97.c | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | 32 | ||
| 33 | #include <asm/hardware.h> | 33 | #include <asm/hardware.h> |
| 34 | #include <asm/io.h> | 34 | #include <asm/io.h> |
| 35 | #include <asm/arch/regs-ac97.h> | 35 | #include <asm/plat-s3c/regs-ac97.h> |
| 36 | #include <asm/arch/regs-gpio.h> | 36 | #include <asm/arch/regs-gpio.h> |
| 37 | #include <asm/arch/regs-clock.h> | 37 | #include <asm/arch/regs-clock.h> |
| 38 | #include <asm/arch/audio.h> | 38 | #include <asm/arch/audio.h> |
