diff options
132 files changed, 5313 insertions, 1665 deletions
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index b41397d6430a..88cdb592fdf9 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt | |||
@@ -265,6 +265,9 @@ struct boot_param_header { | |||
265 | booting on */ | 265 | booting on */ |
266 | /* version 3 fields below */ | 266 | /* version 3 fields below */ |
267 | u32 size_dt_strings; /* size of the strings block */ | 267 | u32 size_dt_strings; /* size of the strings block */ |
268 | |||
269 | /* version 17 fields below */ | ||
270 | u32 size_dt_struct; /* size of the DT structure block */ | ||
268 | }; | 271 | }; |
269 | 272 | ||
270 | Along with the constants: | 273 | Along with the constants: |
@@ -335,10 +338,13 @@ struct boot_param_header { | |||
335 | to reallocate it easily at boot and free up the unused flattened | 338 | to reallocate it easily at boot and free up the unused flattened |
336 | structure after expansion. Version 16 introduces a new more | 339 | structure after expansion. Version 16 introduces a new more |
337 | "compact" format for the tree itself that is however not backward | 340 | "compact" format for the tree itself that is however not backward |
338 | compatible. You should always generate a structure of the highest | 341 | compatible. Version 17 adds an additional field, size_dt_struct, |
339 | version defined at the time of your implementation. Currently | 342 | allowing it to be reallocated or moved more easily (this is |
340 | that is version 16, unless you explicitly aim at being backward | 343 | particularly useful for bootloaders which need to make |
341 | compatible. | 344 | adjustments to a device tree based on probed information). You |
345 | should always generate a structure of the highest version defined | ||
346 | at the time of your implementation. Currently that is version 17, | ||
347 | unless you explicitly aim at being backward compatible. | ||
342 | 348 | ||
343 | - last_comp_version | 349 | - last_comp_version |
344 | 350 | ||
@@ -347,7 +353,7 @@ struct boot_param_header { | |||
347 | is backward compatible with version 1 (that is, a kernel build | 353 | is backward compatible with version 1 (that is, a kernel build |
348 | for version 1 will be able to boot with a version 2 format). You | 354 | for version 1 will be able to boot with a version 2 format). You |
349 | should put a 1 in this field if you generate a device tree of | 355 | should put a 1 in this field if you generate a device tree of |
350 | version 1 to 3, or 0x10 if you generate a tree of version 0x10 | 356 | version 1 to 3, or 16 if you generate a tree of version 16 or 17 |
351 | using the new unit name format. | 357 | using the new unit name format. |
352 | 358 | ||
353 | - boot_cpuid_phys | 359 | - boot_cpuid_phys |
@@ -360,6 +366,17 @@ struct boot_param_header { | |||
360 | point (see further chapters for more informations on the required | 366 | point (see further chapters for more informations on the required |
361 | device-tree contents) | 367 | device-tree contents) |
362 | 368 | ||
369 | - size_dt_strings | ||
370 | |||
371 | This field only exists on version 3 and later headers. It | ||
372 | gives the size of the "strings" section of the device tree (which | ||
373 | starts at the offset given by off_dt_strings). | ||
374 | |||
375 | - size_dt_struct | ||
376 | |||
377 | This field only exists on version 17 and later headers. It gives | ||
378 | the size of the "structure" section of the device tree (which | ||
379 | starts at the offset given by off_dt_struct). | ||
363 | 380 | ||
364 | So the typical layout of a DT block (though the various parts don't | 381 | So the typical layout of a DT block (though the various parts don't |
365 | need to be in that order) looks like this (addresses go from top to | 382 | need to be in that order) looks like this (addresses go from top to |
@@ -417,7 +434,7 @@ root node who has no parent. | |||
417 | A node has 2 names. The actual node name is generally contained in a | 434 | A node has 2 names. The actual node name is generally contained in a |
418 | property of type "name" in the node property list whose value is a | 435 | property of type "name" in the node property list whose value is a |
419 | zero terminated string and is mandatory for version 1 to 3 of the | 436 | zero terminated string and is mandatory for version 1 to 3 of the |
420 | format definition (as it is in Open Firmware). Version 0x10 makes it | 437 | format definition (as it is in Open Firmware). Version 16 makes it |
421 | optional as it can generate it from the unit name defined below. | 438 | optional as it can generate it from the unit name defined below. |
422 | 439 | ||
423 | There is also a "unit name" that is used to differentiate nodes with | 440 | There is also a "unit name" that is used to differentiate nodes with |
@@ -832,8 +849,7 @@ address which can extend beyond that limit. | |||
832 | 849 | ||
833 | This node is a bit "special". Normally, that's where open firmware | 850 | This node is a bit "special". Normally, that's where open firmware |
834 | puts some variable environment information, like the arguments, or | 851 | puts some variable environment information, like the arguments, or |
835 | phandle pointers to nodes like the main interrupt controller, or the | 852 | the default input/output devices. |
836 | default input/output devices. | ||
837 | 853 | ||
838 | This specification makes a few of these mandatory, but also defines | 854 | This specification makes a few of these mandatory, but also defines |
839 | some linux-specific properties that would be normally constructed by | 855 | some linux-specific properties that would be normally constructed by |
@@ -853,14 +869,14 @@ address which can extend beyond that limit. | |||
853 | that the kernel tries to find out the default console and has | 869 | that the kernel tries to find out the default console and has |
854 | knowledge of various types like 8250 serial ports. You may want | 870 | knowledge of various types like 8250 serial ports. You may want |
855 | to extend this function to add your own. | 871 | to extend this function to add your own. |
856 | - interrupt-controller : This is one cell containing a phandle | ||
857 | value that matches the "linux,phandle" property of your main | ||
858 | interrupt controller node. May be used for interrupt routing. | ||
859 | |||
860 | 872 | ||
861 | Note that u-boot creates and fills in the chosen node for platforms | 873 | Note that u-boot creates and fills in the chosen node for platforms |
862 | that use it. | 874 | that use it. |
863 | 875 | ||
876 | (Note: a practice that is now obsolete was to include a property | ||
877 | under /chosen called interrupt-controller which had a phandle value | ||
878 | that pointed to the main interrupt controller) | ||
879 | |||
864 | f) the /soc<SOCname> node | 880 | f) the /soc<SOCname> node |
865 | 881 | ||
866 | This node is used to represent a system-on-a-chip (SOC) and must be | 882 | This node is used to represent a system-on-a-chip (SOC) and must be |
@@ -1109,42 +1125,7 @@ See appendix A for an example partial SOC node definition for the | |||
1109 | MPC8540. | 1125 | MPC8540. |
1110 | 1126 | ||
1111 | 1127 | ||
1112 | 2) Specifying interrupt information for SOC devices | 1128 | 2) Representing devices without a current OF specification |
1113 | --------------------------------------------------- | ||
1114 | |||
1115 | Each device that is part of an SOC and which generates interrupts | ||
1116 | should have the following properties: | ||
1117 | |||
1118 | - interrupt-parent : contains the phandle of the interrupt | ||
1119 | controller which handles interrupts for this device | ||
1120 | - interrupts : a list of tuples representing the interrupt | ||
1121 | number and the interrupt sense and level for each interrupt | ||
1122 | for this device. | ||
1123 | |||
1124 | This information is used by the kernel to build the interrupt table | ||
1125 | for the interrupt controllers in the system. | ||
1126 | |||
1127 | Sense and level information should be encoded as follows: | ||
1128 | |||
1129 | Devices connected to openPIC-compatible controllers should encode | ||
1130 | sense and polarity as follows: | ||
1131 | |||
1132 | 0 = low to high edge sensitive type enabled | ||
1133 | 1 = active low level sensitive type enabled | ||
1134 | 2 = active high level sensitive type enabled | ||
1135 | 3 = high to low edge sensitive type enabled | ||
1136 | |||
1137 | ISA PIC interrupt controllers should adhere to the ISA PIC | ||
1138 | encodings listed below: | ||
1139 | |||
1140 | 0 = active low level sensitive type enabled | ||
1141 | 1 = active high level sensitive type enabled | ||
1142 | 2 = high to low edge sensitive type enabled | ||
1143 | 3 = low to high edge sensitive type enabled | ||
1144 | |||
1145 | |||
1146 | |||
1147 | 3) Representing devices without a current OF specification | ||
1148 | ---------------------------------------------------------- | 1129 | ---------------------------------------------------------- |
1149 | 1130 | ||
1150 | Currently, there are many devices on SOCs that do not have a standard | 1131 | Currently, there are many devices on SOCs that do not have a standard |
@@ -1201,6 +1182,13 @@ platforms are moved over to use the flattened-device-tree model. | |||
1201 | - phy-handle : The phandle for the PHY connected to this ethernet | 1182 | - phy-handle : The phandle for the PHY connected to this ethernet |
1202 | controller. | 1183 | controller. |
1203 | 1184 | ||
1185 | Recommended properties: | ||
1186 | |||
1187 | - linux,network-index : This is the intended "index" of this | ||
1188 | network device. This is used by the bootwrapper to interpret | ||
1189 | MAC addresses passed by the firmware when no information other | ||
1190 | than indices is available to associate an address with a device. | ||
1191 | |||
1204 | Example: | 1192 | Example: |
1205 | 1193 | ||
1206 | ethernet@24000 { | 1194 | ethernet@24000 { |
@@ -1569,6 +1557,12 @@ platforms are moved over to use the flattened-device-tree model. | |||
1569 | - mac-address : list of bytes representing the ethernet address. | 1557 | - mac-address : list of bytes representing the ethernet address. |
1570 | - phy-handle : The phandle for the PHY connected to this controller. | 1558 | - phy-handle : The phandle for the PHY connected to this controller. |
1571 | 1559 | ||
1560 | Recommended properties: | ||
1561 | - linux,network-index : This is the intended "index" of this | ||
1562 | network device. This is used by the bootwrapper to interpret | ||
1563 | MAC addresses passed by the firmware when no information other | ||
1564 | than indices is available to associate an address with a device. | ||
1565 | |||
1572 | Example: | 1566 | Example: |
1573 | ucc@2000 { | 1567 | ucc@2000 { |
1574 | device_type = "network"; | 1568 | device_type = "network"; |
@@ -1733,6 +1727,92 @@ platforms are moved over to use the flattened-device-tree model. | |||
1733 | 1727 | ||
1734 | More devices will be defined as this spec matures. | 1728 | More devices will be defined as this spec matures. |
1735 | 1729 | ||
1730 | VII - Specifying interrupt information for devices | ||
1731 | =================================================== | ||
1732 | |||
1733 | The device tree represents the busses and devices of a hardware | ||
1734 | system in a form similar to the physical bus topology of the | ||
1735 | hardware. | ||
1736 | |||
1737 | In addition, a logical 'interrupt tree' exists which represents the | ||
1738 | hierarchy and routing of interrupts in the hardware. | ||
1739 | |||
1740 | The interrupt tree model is fully described in the | ||
1741 | document "Open Firmware Recommended Practice: Interrupt | ||
1742 | Mapping Version 0.9". The document is available at: | ||
1743 | <http://playground.sun.com/1275/practice>. | ||
1744 | |||
1745 | 1) interrupts property | ||
1746 | ---------------------- | ||
1747 | |||
1748 | Devices that generate interrupts to a single interrupt controller | ||
1749 | should use the conventional OF representation described in the | ||
1750 | OF interrupt mapping documentation. | ||
1751 | |||
1752 | Each device which generates interrupts must have an 'interrupt' | ||
1753 | property. The interrupt property value is an arbitrary number of | ||
1754 | of 'interrupt specifier' values which describe the interrupt or | ||
1755 | interrupts for the device. | ||
1756 | |||
1757 | The encoding of an interrupt specifier is determined by the | ||
1758 | interrupt domain in which the device is located in the | ||
1759 | interrupt tree. The root of an interrupt domain specifies in | ||
1760 | its #interrupt-cells property the number of 32-bit cells | ||
1761 | required to encode an interrupt specifier. See the OF interrupt | ||
1762 | mapping documentation for a detailed description of domains. | ||
1763 | |||
1764 | For example, the binding for the OpenPIC interrupt controller | ||
1765 | specifies an #interrupt-cells value of 2 to encode the interrupt | ||
1766 | number and level/sense information. All interrupt children in an | ||
1767 | OpenPIC interrupt domain use 2 cells per interrupt in their interrupts | ||
1768 | property. | ||
1769 | |||
1770 | The PCI bus binding specifies a #interrupt-cell value of 1 to encode | ||
1771 | which interrupt pin (INTA,INTB,INTC,INTD) is used. | ||
1772 | |||
1773 | 2) interrupt-parent property | ||
1774 | ---------------------------- | ||
1775 | |||
1776 | The interrupt-parent property is specified to define an explicit | ||
1777 | link between a device node and its interrupt parent in | ||
1778 | the interrupt tree. The value of interrupt-parent is the | ||
1779 | phandle of the parent node. | ||
1780 | |||
1781 | If the interrupt-parent property is not defined for a node, it's | ||
1782 | interrupt parent is assumed to be an ancestor in the node's | ||
1783 | _device tree_ hierarchy. | ||
1784 | |||
1785 | 3) OpenPIC Interrupt Controllers | ||
1786 | -------------------------------- | ||
1787 | |||
1788 | OpenPIC interrupt controllers require 2 cells to encode | ||
1789 | interrupt information. The first cell defines the interrupt | ||
1790 | number. The second cell defines the sense and level | ||
1791 | information. | ||
1792 | |||
1793 | Sense and level information should be encoded as follows: | ||
1794 | |||
1795 | 0 = low to high edge sensitive type enabled | ||
1796 | 1 = active low level sensitive type enabled | ||
1797 | 2 = active high level sensitive type enabled | ||
1798 | 3 = high to low edge sensitive type enabled | ||
1799 | |||
1800 | 4) ISA Interrupt Controllers | ||
1801 | ---------------------------- | ||
1802 | |||
1803 | ISA PIC interrupt controllers require 2 cells to encode | ||
1804 | interrupt information. The first cell defines the interrupt | ||
1805 | number. The second cell defines the sense and level | ||
1806 | information. | ||
1807 | |||
1808 | ISA PIC interrupt controllers should adhere to the ISA PIC | ||
1809 | encodings listed below: | ||
1810 | |||
1811 | 0 = active low level sensitive type enabled | ||
1812 | 1 = active high level sensitive type enabled | ||
1813 | 2 = high to low edge sensitive type enabled | ||
1814 | 3 = low to high edge sensitive type enabled | ||
1815 | |||
1736 | 1816 | ||
1737 | Appendix A - Sample SOC node for MPC8540 | 1817 | Appendix A - Sample SOC node for MPC8540 |
1738 | ======================================== | 1818 | ======================================== |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 6dfbd52694ab..740892a13c76 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -11,6 +11,11 @@ config PPC64 | |||
11 | This option selects whether a 32-bit or a 64-bit kernel | 11 | This option selects whether a 32-bit or a 64-bit kernel |
12 | will be built. | 12 | will be built. |
13 | 13 | ||
14 | config PPC_PM_NEEDS_RTC_LIB | ||
15 | bool | ||
16 | select RTC_LIB | ||
17 | default y if PM | ||
18 | |||
14 | config PPC32 | 19 | config PPC32 |
15 | bool | 20 | bool |
16 | default y if !PPC64 | 21 | default y if !PPC64 |
@@ -89,7 +94,7 @@ config SCHED_NO_NO_OMIT_FRAME_POINTER | |||
89 | 94 | ||
90 | config ARCH_MAY_HAVE_PC_FDC | 95 | config ARCH_MAY_HAVE_PC_FDC |
91 | bool | 96 | bool |
92 | default y | 97 | default !PPC_PSERIES || PCI |
93 | 98 | ||
94 | config PPC_OF | 99 | config PPC_OF |
95 | def_bool y | 100 | def_bool y |
@@ -168,6 +173,7 @@ config PPC_86xx | |||
168 | bool "Freescale 86xx" | 173 | bool "Freescale 86xx" |
169 | select 6xx | 174 | select 6xx |
170 | select FSL_SOC | 175 | select FSL_SOC |
176 | select FSL_PCIE | ||
171 | select PPC_FPU | 177 | select PPC_FPU |
172 | select ALTIVEC | 178 | select ALTIVEC |
173 | help | 179 | help |
@@ -367,383 +373,7 @@ endmenu | |||
367 | 373 | ||
368 | source "init/Kconfig" | 374 | source "init/Kconfig" |
369 | 375 | ||
370 | menu "Platform support" | 376 | source "arch/powerpc/platforms/Kconfig" |
371 | depends on PPC64 || CLASSIC32 | ||
372 | |||
373 | choice | ||
374 | prompt "Machine type" | ||
375 | default PPC_MULTIPLATFORM | ||
376 | |||
377 | config PPC_MULTIPLATFORM | ||
378 | bool "Generic desktop/server/laptop" | ||
379 | help | ||
380 | Select this option if configuring for an IBM pSeries or | ||
381 | RS/6000 machine, an Apple machine, or a PReP, CHRP, | ||
382 | Maple or Cell-based machine. | ||
383 | |||
384 | config EMBEDDED6xx | ||
385 | bool "Embedded 6xx/7xx/7xxx-based board" | ||
386 | depends on PPC32 && (BROKEN||BROKEN_ON_SMP) | ||
387 | |||
388 | config APUS | ||
389 | bool "Amiga-APUS" | ||
390 | depends on PPC32 && BROKEN | ||
391 | help | ||
392 | Select APUS if configuring for a PowerUP Amiga. | ||
393 | More information is available at: | ||
394 | <http://linux-apus.sourceforge.net/>. | ||
395 | endchoice | ||
396 | |||
397 | config QUICC_ENGINE | ||
398 | bool | ||
399 | depends on PPC_MPC836x || PPC_MPC832x | ||
400 | default y | ||
401 | help | ||
402 | The QUICC Engine (QE) is a new generation of communications | ||
403 | coprocessors on Freescale embedded CPUs (akin to CPM in older chips). | ||
404 | Selecting this option means that you wish to build a kernel | ||
405 | for a machine with a QE coprocessor. | ||
406 | |||
407 | config PPC_PSERIES | ||
408 | depends on PPC_MULTIPLATFORM && PPC64 | ||
409 | bool "IBM pSeries & new (POWER5-based) iSeries" | ||
410 | select MPIC | ||
411 | select PPC_I8259 | ||
412 | select PPC_RTAS | ||
413 | select RTAS_ERROR_LOGGING | ||
414 | select PPC_UDBG_16550 | ||
415 | select PPC_NATIVE | ||
416 | default y | ||
417 | |||
418 | config PPC_ISERIES | ||
419 | bool "IBM Legacy iSeries" | ||
420 | depends on PPC_MULTIPLATFORM && PPC64 | ||
421 | select PPC_INDIRECT_IO | ||
422 | |||
423 | config PPC_CHRP | ||
424 | bool "Common Hardware Reference Platform (CHRP) based machines" | ||
425 | depends on PPC_MULTIPLATFORM && PPC32 | ||
426 | select MPIC | ||
427 | select PPC_I8259 | ||
428 | select PPC_INDIRECT_PCI | ||
429 | select PPC_RTAS | ||
430 | select PPC_MPC106 | ||
431 | select PPC_UDBG_16550 | ||
432 | select PPC_NATIVE | ||
433 | default y | ||
434 | |||
435 | config PPC_MPC52xx | ||
436 | bool | ||
437 | default n | ||
438 | |||
439 | config PPC_MPC5200 | ||
440 | bool | ||
441 | select PPC_MPC52xx | ||
442 | default n | ||
443 | |||
444 | config PPC_MPC5200_BUGFIX | ||
445 | bool "MPC5200 (L25R) bugfix support" | ||
446 | depends on PPC_MPC5200 | ||
447 | default n | ||
448 | help | ||
449 | Enable workarounds for original MPC5200 errata. This is not required | ||
450 | for MPC5200B based boards. | ||
451 | |||
452 | It is safe to say 'Y' here | ||
453 | |||
454 | config PPC_EFIKA | ||
455 | bool "bPlan Efika 5k2. MPC5200B based computer" | ||
456 | depends on PPC_MULTIPLATFORM && PPC32 | ||
457 | select PPC_RTAS | ||
458 | select RTAS_PROC | ||
459 | select PPC_MPC52xx | ||
460 | select PPC_NATIVE | ||
461 | default n | ||
462 | |||
463 | config PPC_LITE5200 | ||
464 | bool "Freescale Lite5200 Eval Board" | ||
465 | depends on PPC_MULTIPLATFORM && PPC32 | ||
466 | select PPC_MPC5200 | ||
467 | default n | ||
468 | |||
469 | config PPC_PMAC | ||
470 | bool "Apple PowerMac based machines" | ||
471 | depends on PPC_MULTIPLATFORM | ||
472 | select MPIC | ||
473 | select PPC_INDIRECT_PCI if PPC32 | ||
474 | select PPC_MPC106 if PPC32 | ||
475 | select PPC_NATIVE | ||
476 | default y | ||
477 | |||
478 | config PPC_PMAC64 | ||
479 | bool | ||
480 | depends on PPC_PMAC && POWER4 | ||
481 | select MPIC | ||
482 | select U3_DART | ||
483 | select MPIC_BROKEN_U3 | ||
484 | select GENERIC_TBSYNC | ||
485 | select PPC_970_NAP | ||
486 | default y | ||
487 | |||
488 | config PPC_PREP | ||
489 | bool "PowerPC Reference Platform (PReP) based machines" | ||
490 | depends on PPC_MULTIPLATFORM && PPC32 && BROKEN | ||
491 | select MPIC | ||
492 | select PPC_I8259 | ||
493 | select PPC_INDIRECT_PCI | ||
494 | select PPC_UDBG_16550 | ||
495 | select PPC_NATIVE | ||
496 | default n | ||
497 | |||
498 | config PPC_MAPLE | ||
499 | depends on PPC_MULTIPLATFORM && PPC64 | ||
500 | bool "Maple 970FX Evaluation Board" | ||
501 | select MPIC | ||
502 | select U3_DART | ||
503 | select MPIC_BROKEN_U3 | ||
504 | select GENERIC_TBSYNC | ||
505 | select PPC_UDBG_16550 | ||
506 | select PPC_970_NAP | ||
507 | select PPC_NATIVE | ||
508 | select PPC_RTAS | ||
509 | select MMIO_NVRAM | ||
510 | select ATA_NONSTANDARD if ATA | ||
511 | default n | ||
512 | help | ||
513 | This option enables support for the Maple 970FX Evaluation Board. | ||
514 | For more information, refer to <http://www.970eval.com> | ||
515 | |||
516 | config PPC_PASEMI | ||
517 | depends on PPC_MULTIPLATFORM && PPC64 | ||
518 | bool "PA Semi SoC-based platforms" | ||
519 | default n | ||
520 | select MPIC | ||
521 | select PPC_UDBG_16550 | ||
522 | select GENERIC_TBSYNC | ||
523 | select PPC_NATIVE | ||
524 | help | ||
525 | This option enables support for PA Semi's PWRficient line | ||
526 | of SoC processors, including PA6T-1682M | ||
527 | |||
528 | config PPC_CELL | ||
529 | bool | ||
530 | default n | ||
531 | |||
532 | config PPC_CELL_NATIVE | ||
533 | bool | ||
534 | select PPC_CELL | ||
535 | select PPC_DCR_MMIO | ||
536 | select PPC_OF_PLATFORM_PCI | ||
537 | select PPC_INDIRECT_IO | ||
538 | select PPC_NATIVE | ||
539 | select MPIC | ||
540 | default n | ||
541 | |||
542 | config PPC_IBM_CELL_BLADE | ||
543 | bool "IBM Cell Blade" | ||
544 | depends on PPC_MULTIPLATFORM && PPC64 | ||
545 | select PPC_CELL_NATIVE | ||
546 | select PPC_RTAS | ||
547 | select MMIO_NVRAM | ||
548 | select PPC_UDBG_16550 | ||
549 | select UDBG_RTAS_CONSOLE | ||
550 | |||
551 | config PPC_PS3 | ||
552 | bool "Sony PS3 (incomplete)" | ||
553 | depends on PPC_MULTIPLATFORM && PPC64 | ||
554 | select PPC_CELL | ||
555 | select USB_ARCH_HAS_OHCI | ||
556 | select USB_OHCI_LITTLE_ENDIAN | ||
557 | select USB_OHCI_BIG_ENDIAN_MMIO | ||
558 | select USB_ARCH_HAS_EHCI | ||
559 | select USB_EHCI_BIG_ENDIAN_MMIO | ||
560 | help | ||
561 | This option enables support for the Sony PS3 game console | ||
562 | and other platforms using the PS3 hypervisor. | ||
563 | Support for this platform is not yet complete, so | ||
564 | enabling this will not result in a bootable kernel on a | ||
565 | PS3 system. | ||
566 | |||
567 | config PPC_CELLEB | ||
568 | bool "Toshiba's Cell Reference Set 'Celleb' Architecture" | ||
569 | depends on PPC_MULTIPLATFORM && PPC64 | ||
570 | select PPC_CELL | ||
571 | select PPC_OF_PLATFORM_PCI | ||
572 | select HAS_TXX9_SERIAL | ||
573 | select PPC_UDBG_BEAT | ||
574 | select USB_OHCI_BIG_ENDIAN_MMIO | ||
575 | select USB_EHCI_BIG_ENDIAN_MMIO | ||
576 | |||
577 | config PPC_NATIVE | ||
578 | bool | ||
579 | depends on PPC_MULTIPLATFORM | ||
580 | help | ||
581 | Support for running natively on the hardware, i.e. without | ||
582 | a hypervisor. This option is not user-selectable but should | ||
583 | be selected by all platforms that need it. | ||
584 | |||
585 | config UDBG_RTAS_CONSOLE | ||
586 | bool "RTAS based debug console" | ||
587 | depends on PPC_RTAS | ||
588 | default n | ||
589 | |||
590 | config PPC_UDBG_BEAT | ||
591 | bool "BEAT based debug console" | ||
592 | depends on PPC_CELLEB | ||
593 | default n | ||
594 | |||
595 | config XICS | ||
596 | depends on PPC_PSERIES | ||
597 | bool | ||
598 | default y | ||
599 | |||
600 | config U3_DART | ||
601 | bool | ||
602 | depends on PPC_MULTIPLATFORM && PPC64 | ||
603 | default n | ||
604 | |||
605 | config PPC_RTAS | ||
606 | bool | ||
607 | default n | ||
608 | |||
609 | config RTAS_ERROR_LOGGING | ||
610 | bool | ||
611 | depends on PPC_RTAS | ||
612 | default n | ||
613 | |||
614 | config RTAS_PROC | ||
615 | bool "Proc interface to RTAS" | ||
616 | depends on PPC_RTAS | ||
617 | default y | ||
618 | |||
619 | config RTAS_FLASH | ||
620 | tristate "Firmware flash interface" | ||
621 | depends on PPC64 && RTAS_PROC | ||
622 | |||
623 | config PPC_PMI | ||
624 | tristate "Support for PMI" | ||
625 | depends PPC_IBM_CELL_BLADE | ||
626 | help | ||
627 | PMI (Platform Management Interrupt) is a way to | ||
628 | communicate with the BMC (Baseboard Mangement Controller). | ||
629 | It is used in some IBM Cell blades. | ||
630 | default m | ||
631 | |||
632 | config MMIO_NVRAM | ||
633 | bool | ||
634 | default n | ||
635 | |||
636 | config MPIC_BROKEN_U3 | ||
637 | bool | ||
638 | depends on PPC_MAPLE | ||
639 | default y | ||
640 | |||
641 | config IBMVIO | ||
642 | depends on PPC_PSERIES || PPC_ISERIES | ||
643 | bool | ||
644 | default y | ||
645 | |||
646 | config IBMEBUS | ||
647 | depends on PPC_PSERIES | ||
648 | bool "Support for GX bus based adapters" | ||
649 | help | ||
650 | Bus device driver for GX bus based adapters. | ||
651 | |||
652 | config PPC_MPC106 | ||
653 | bool | ||
654 | default n | ||
655 | |||
656 | config PPC_970_NAP | ||
657 | bool | ||
658 | default n | ||
659 | |||
660 | config PPC_INDIRECT_IO | ||
661 | bool | ||
662 | select GENERIC_IOMAP | ||
663 | default n | ||
664 | |||
665 | config GENERIC_IOMAP | ||
666 | bool | ||
667 | default n | ||
668 | |||
669 | source "drivers/cpufreq/Kconfig" | ||
670 | |||
671 | config CPU_FREQ_PMAC | ||
672 | bool "Support for Apple PowerBooks" | ||
673 | depends on CPU_FREQ && ADB_PMU && PPC32 | ||
674 | select CPU_FREQ_TABLE | ||
675 | help | ||
676 | This adds support for frequency switching on Apple PowerBooks, | ||
677 | this currently includes some models of iBook & Titanium | ||
678 | PowerBook. | ||
679 | |||
680 | config CPU_FREQ_PMAC64 | ||
681 | bool "Support for some Apple G5s" | ||
682 | depends on CPU_FREQ && PPC64 | ||
683 | select CPU_FREQ_TABLE | ||
684 | help | ||
685 | This adds support for frequency switching on Apple iMac G5, | ||
686 | and some of the more recent desktop G5 machines as well. | ||
687 | |||
688 | config PPC601_SYNC_FIX | ||
689 | bool "Workarounds for PPC601 bugs" | ||
690 | depends on 6xx && (PPC_PREP || PPC_PMAC) | ||
691 | help | ||
692 | Some versions of the PPC601 (the first PowerPC chip) have bugs which | ||
693 | mean that extra synchronization instructions are required near | ||
694 | certain instructions, typically those that make major changes to the | ||
695 | CPU state. These extra instructions reduce performance slightly. | ||
696 | If you say N here, these extra instructions will not be included, | ||
697 | resulting in a kernel which will run faster but may not run at all | ||
698 | on some systems with the PPC601 chip. | ||
699 | |||
700 | If in doubt, say Y here. | ||
701 | |||
702 | config TAU | ||
703 | bool "On-chip CPU temperature sensor support" | ||
704 | depends on 6xx | ||
705 | help | ||
706 | G3 and G4 processors have an on-chip temperature sensor called the | ||
707 | 'Thermal Assist Unit (TAU)', which, in theory, can measure the on-die | ||
708 | temperature within 2-4 degrees Celsius. This option shows the current | ||
709 | on-die temperature in /proc/cpuinfo if the cpu supports it. | ||
710 | |||
711 | Unfortunately, on some chip revisions, this sensor is very inaccurate | ||
712 | and in many cases, does not work at all, so don't assume the cpu | ||
713 | temp is actually what /proc/cpuinfo says it is. | ||
714 | |||
715 | config TAU_INT | ||
716 | bool "Interrupt driven TAU driver (DANGEROUS)" | ||
717 | depends on TAU | ||
718 | ---help--- | ||
719 | The TAU supports an interrupt driven mode which causes an interrupt | ||
720 | whenever the temperature goes out of range. This is the fastest way | ||
721 | to get notified the temp has exceeded a range. With this option off, | ||
722 | a timer is used to re-check the temperature periodically. | ||
723 | |||
724 | However, on some cpus it appears that the TAU interrupt hardware | ||
725 | is buggy and can cause a situation which would lead unexplained hard | ||
726 | lockups. | ||
727 | |||
728 | Unless you are extending the TAU driver, or enjoy kernel/hardware | ||
729 | debugging, leave this option off. | ||
730 | |||
731 | config TAU_AVERAGE | ||
732 | bool "Average high and low temp" | ||
733 | depends on TAU | ||
734 | ---help--- | ||
735 | The TAU hardware can compare the temperature to an upper and lower | ||
736 | bound. The default behavior is to show both the upper and lower | ||
737 | bound in /proc/cpuinfo. If the range is large, the temperature is | ||
738 | either changing a lot, or the TAU hardware is broken (likely on some | ||
739 | G4's). If the range is small (around 4 degrees), the temperature is | ||
740 | relatively stable. If you say Y here, a single temperature value, | ||
741 | halfway between the upper and lower bounds, will be reported in | ||
742 | /proc/cpuinfo. | ||
743 | |||
744 | If in doubt, say N here. | ||
745 | |||
746 | endmenu | ||
747 | 377 | ||
748 | source arch/powerpc/platforms/embedded6xx/Kconfig | 378 | source arch/powerpc/platforms/embedded6xx/Kconfig |
749 | source arch/powerpc/platforms/4xx/Kconfig | 379 | source arch/powerpc/platforms/4xx/Kconfig |
@@ -752,9 +382,6 @@ source arch/powerpc/platforms/83xx/Kconfig | |||
752 | source arch/powerpc/platforms/85xx/Kconfig | 382 | source arch/powerpc/platforms/85xx/Kconfig |
753 | source arch/powerpc/platforms/86xx/Kconfig | 383 | source arch/powerpc/platforms/86xx/Kconfig |
754 | source arch/powerpc/platforms/8xx/Kconfig | 384 | source arch/powerpc/platforms/8xx/Kconfig |
755 | source arch/powerpc/platforms/cell/Kconfig | ||
756 | source arch/powerpc/platforms/ps3/Kconfig | ||
757 | source arch/powerpc/platforms/pasemi/Kconfig | ||
758 | 385 | ||
759 | menu "Kernel options" | 386 | menu "Kernel options" |
760 | 387 | ||
@@ -859,7 +486,6 @@ config IRQ_ALL_CPUS | |||
859 | CPU. Generally saying Y is safe, although some problems have been | 486 | CPU. Generally saying Y is safe, although some problems have been |
860 | reported with SMP Power Macintoshes with this option enabled. | 487 | reported with SMP Power Macintoshes with this option enabled. |
861 | 488 | ||
862 | source "arch/powerpc/platforms/pseries/Kconfig" | ||
863 | 489 | ||
864 | config NUMA | 490 | config NUMA |
865 | bool "NUMA support" | 491 | bool "NUMA support" |
@@ -931,8 +557,6 @@ config PROC_DEVICETREE | |||
931 | an image of the device tree that the kernel copies from Open | 557 | an image of the device tree that the kernel copies from Open |
932 | Firmware or other boot firmware. If unsure, say Y here. | 558 | Firmware or other boot firmware. If unsure, say Y here. |
933 | 559 | ||
934 | source "arch/powerpc/platforms/prep/Kconfig" | ||
935 | |||
936 | config CMDLINE_BOOL | 560 | config CMDLINE_BOOL |
937 | bool "Default bootloader kernel arguments" | 561 | bool "Default bootloader kernel arguments" |
938 | 562 | ||
@@ -1022,13 +646,18 @@ config SBUS | |||
1022 | config FSL_SOC | 646 | config FSL_SOC |
1023 | bool | 647 | bool |
1024 | 648 | ||
649 | config FSL_PCIE | ||
650 | bool | ||
651 | depends on PPC_86xx | ||
652 | |||
1025 | # Yes MCA RS/6000s exist but Linux-PPC does not currently support any | 653 | # Yes MCA RS/6000s exist but Linux-PPC does not currently support any |
1026 | config MCA | 654 | config MCA |
1027 | bool | 655 | bool |
1028 | 656 | ||
1029 | config PCI | 657 | config PCI |
1030 | bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \ | 658 | bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \ |
1031 | || PPC_MPC52xx || (EMBEDDED && PPC_ISERIES) || MPC7448HPC2 || PPC_PS3 | 659 | || PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \ |
660 | || MPC7448HPC2 || PPC_PS3 | ||
1032 | default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx \ | 661 | default y if !40x && !CPM2 && !8xx && !APUS && !PPC_83xx \ |
1033 | && !PPC_85xx && !PPC_86xx | 662 | && !PPC_85xx && !PPC_86xx |
1034 | default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS | 663 | default PCI_PERMEDIA if !4xx && !CPM2 && !8xx && APUS |
@@ -1228,7 +857,6 @@ source "fs/Kconfig" | |||
1228 | 857 | ||
1229 | source "arch/powerpc/sysdev/qe_lib/Kconfig" | 858 | source "arch/powerpc/sysdev/qe_lib/Kconfig" |
1230 | 859 | ||
1231 | source "arch/powerpc/platforms/iseries/Kconfig" | ||
1232 | 860 | ||
1233 | source "lib/Kconfig" | 861 | source "lib/Kconfig" |
1234 | 862 | ||
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug index d39d13327e6d..50f48f0c5630 100644 --- a/arch/powerpc/Kconfig.debug +++ b/arch/powerpc/Kconfig.debug | |||
@@ -132,8 +132,7 @@ config BOOTX_TEXT | |||
132 | 132 | ||
133 | config SERIAL_TEXT_DEBUG | 133 | config SERIAL_TEXT_DEBUG |
134 | bool "Support for early boot texts over serial port" | 134 | bool "Support for early boot texts over serial port" |
135 | depends on 4xx || LOPEC || MV64X60 || PPLUS || PRPMC800 || \ | 135 | depends on 4xx |
136 | PPC_GEN550 || PPC_MPC52xx | ||
137 | 136 | ||
138 | config PPC_EARLY_DEBUG | 137 | config PPC_EARLY_DEBUG |
139 | bool "Early debugging (dangerous)" | 138 | bool "Early debugging (dangerous)" |
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index dc779407de14..de80e47d1171 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -40,10 +40,11 @@ zliblinuxheader := zlib.h zconf.h zutil.h | |||
40 | $(addprefix $(obj)/,$(zlib) main.o): $(addprefix $(obj)/,$(zliblinuxheader)) \ | 40 | $(addprefix $(obj)/,$(zlib) main.o): $(addprefix $(obj)/,$(zliblinuxheader)) \ |
41 | $(addprefix $(obj)/,$(zlibheader)) | 41 | $(addprefix $(obj)/,$(zlibheader)) |
42 | 42 | ||
43 | src-wlib := string.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ | 43 | src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ |
44 | ns16550.c serial.c simple_alloc.c div64.S util.S $(zlib) | 44 | ns16550.c serial.c simple_alloc.c div64.S util.S \ |
45 | gunzip_util.c $(zlib) | ||
45 | src-plat := of.c | 46 | src-plat := of.c |
46 | src-boot := crt0.S $(src-wlib) $(src-plat) empty.c | 47 | src-boot := $(src-wlib) $(src-plat) empty.c |
47 | 48 | ||
48 | src-boot := $(addprefix $(obj)/, $(src-boot)) | 49 | src-boot := $(addprefix $(obj)/, $(src-boot)) |
49 | obj-boot := $(addsuffix .o, $(basename $(src-boot))) | 50 | obj-boot := $(addsuffix .o, $(basename $(src-boot))) |
@@ -75,7 +76,7 @@ $(obj)/zImage.lds $(obj)/zImage.coff.lds: $(obj)/%: $(srctree)/$(src)/%.S | |||
75 | @cp $< $@ | 76 | @cp $< $@ |
76 | 77 | ||
77 | clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \ | 78 | clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \ |
78 | empty.c zImage zImage.coff.lds zImage.lds zImage.sandpoint | 79 | empty.c zImage.coff.lds zImage.lds |
79 | 80 | ||
80 | quiet_cmd_bootcc = BOOTCC $@ | 81 | quiet_cmd_bootcc = BOOTCC $@ |
81 | cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $< | 82 | cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $< |
@@ -84,23 +85,25 @@ quiet_cmd_bootas = BOOTAS $@ | |||
84 | cmd_bootas = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $< | 85 | cmd_bootas = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $< |
85 | 86 | ||
86 | quiet_cmd_bootar = BOOTAR $@ | 87 | quiet_cmd_bootar = BOOTAR $@ |
87 | cmd_bootar = $(CROSS32AR) -cr $@.$$$$ $^; mv $@.$$$$ $@ | 88 | cmd_bootar = $(CROSS32AR) -cr $@.$$$$ $(filter-out FORCE,$^); mv $@.$$$$ $@ |
88 | 89 | ||
89 | $(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c | 90 | $(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c FORCE |
90 | $(call if_changed_dep,bootcc) | 91 | $(call if_changed_dep,bootcc) |
91 | $(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S | 92 | $(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S FORCE |
92 | $(call if_changed_dep,bootas) | 93 | $(call if_changed_dep,bootas) |
93 | 94 | ||
94 | $(obj)/wrapper.a: $(obj-wlib) | 95 | $(obj)/wrapper.a: $(obj-wlib) FORCE |
95 | $(call cmd,bootar) | 96 | $(call if_changed,bootar) |
96 | 97 | ||
97 | hostprogs-y := addnote addRamDisk hack-coff mktree | 98 | hostprogs-y := addnote addRamDisk hack-coff mktree |
98 | 99 | ||
99 | extra-y := $(obj)/crt0.o $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ | 100 | targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) |
101 | extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ | ||
100 | $(obj)/zImage.lds $(obj)/zImage.coff.lds | 102 | $(obj)/zImage.lds $(obj)/zImage.coff.lds |
101 | 103 | ||
102 | wrapper :=$(srctree)/$(src)/wrapper | 104 | wrapper :=$(srctree)/$(src)/wrapper |
103 | wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) | 105 | wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \ |
106 | $(wrapper) FORCE | ||
104 | 107 | ||
105 | ############# | 108 | ############# |
106 | # Bits for building various flavours of zImage | 109 | # Bits for building various flavours of zImage |
@@ -113,50 +116,10 @@ CROSSWRAP := -C "$(CROSS_COMPILE)" | |||
113 | endif | 116 | endif |
114 | endif | 117 | endif |
115 | 118 | ||
119 | # args (to if_changed): 1 = (this rule), 2 = platform, 3 = dts 4=dtb 5=initrd | ||
116 | quiet_cmd_wrap = WRAP $@ | 120 | quiet_cmd_wrap = WRAP $@ |
117 | cmd_wrap =$(CONFIG_SHELL) $(wrapper) -c -o $@ -p $2 $(CROSSWRAP) vmlinux | 121 | cmd_wrap =$(CONFIG_SHELL) $(wrapper) -c -o $@ -p $2 $(CROSSWRAP) \ |
118 | quiet_cmd_wrap_initrd = WRAP $@ | 122 | $(if $3, -s $3)$(if $4, -d $4)$(if $5, -i $5) vmlinux |
119 | cmd_wrap_initrd =$(CONFIG_SHELL) $(wrapper) -c -o $@ -p $2 $(CROSSWRAP) \ | ||
120 | -i $(obj)/ramdisk.image.gz vmlinux | ||
121 | |||
122 | $(obj)/zImage.chrp: vmlinux $(wrapperbits) | ||
123 | $(call cmd,wrap,chrp) | ||
124 | |||
125 | $(obj)/zImage.initrd.chrp: vmlinux $(wrapperbits) | ||
126 | $(call cmd,wrap_initrd,chrp) | ||
127 | |||
128 | $(obj)/zImage.pseries: vmlinux $(wrapperbits) | ||
129 | $(call cmd,wrap,pseries) | ||
130 | |||
131 | $(obj)/zImage.initrd.pseries: vmlinux $(wrapperbits) | ||
132 | $(call cmd,wrap_initrd,pseries) | ||
133 | |||
134 | $(obj)/zImage.pmac: vmlinux $(wrapperbits) | ||
135 | $(call cmd,wrap,pmac) | ||
136 | |||
137 | $(obj)/zImage.initrd.pmac: vmlinux $(wrapperbits) | ||
138 | $(call cmd,wrap_initrd,pmac) | ||
139 | |||
140 | $(obj)/zImage.coff: vmlinux $(wrapperbits) | ||
141 | $(call cmd,wrap,pmaccoff) | ||
142 | |||
143 | $(obj)/zImage.initrd.coff: vmlinux $(wrapperbits) | ||
144 | $(call cmd,wrap_initrd,pmaccoff) | ||
145 | |||
146 | $(obj)/zImage.miboot: vmlinux $(wrapperbits) | ||
147 | $(call cmd,wrap,miboot) | ||
148 | |||
149 | $(obj)/zImage.initrd.miboot: vmlinux $(wrapperbits) | ||
150 | $(call cmd,wrap_initrd,miboot) | ||
151 | |||
152 | $(obj)/zImage.ps3: vmlinux | ||
153 | $(STRIP) -s -R .comment $< -o $@ | ||
154 | |||
155 | $(obj)/zImage.initrd.ps3: vmlinux | ||
156 | @echo " WARNING zImage.initrd.ps3 not supported (yet)" | ||
157 | |||
158 | $(obj)/uImage: vmlinux $(wrapperbits) | ||
159 | $(call cmd,wrap,uboot) | ||
160 | 123 | ||
161 | image-$(CONFIG_PPC_PSERIES) += zImage.pseries | 124 | image-$(CONFIG_PPC_PSERIES) += zImage.pseries |
162 | image-$(CONFIG_PPC_MAPLE) += zImage.pseries | 125 | image-$(CONFIG_PPC_MAPLE) += zImage.pseries |
@@ -174,7 +137,30 @@ ifeq ($(CONFIG_PPC32),y) | |||
174 | image-$(CONFIG_PPC_PMAC) += zImage.coff zImage.miboot | 137 | image-$(CONFIG_PPC_PMAC) += zImage.coff zImage.miboot |
175 | endif | 138 | endif |
176 | 139 | ||
140 | initrd- := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-)) | ||
177 | initrd-y := $(patsubst zImage%, zImage.initrd%, $(image-y)) | 141 | initrd-y := $(patsubst zImage%, zImage.initrd%, $(image-y)) |
142 | initrd-y := $(filter-out $(image-y), $(initrd-y)) | ||
143 | targets += $(image-y) $(initrd-y) | ||
144 | |||
145 | $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz | ||
146 | |||
147 | # Don't put the ramdisk on the pattern rule; when its missing make will try | ||
148 | # the pattern rule with less dependencies that also matches (even with the | ||
149 | # hard dependency listed). | ||
150 | $(obj)/zImage.initrd.%: vmlinux $(wrapperbits) | ||
151 | $(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz) | ||
152 | |||
153 | $(obj)/zImage.%: vmlinux $(wrapperbits) | ||
154 | $(call if_changed,wrap,$*) | ||
155 | |||
156 | $(obj)/zImage.ps3: vmlinux | ||
157 | $(STRIP) -s -R .comment $< -o $@ | ||
158 | |||
159 | $(obj)/zImage.initrd.ps3: vmlinux | ||
160 | @echo " WARNING zImage.initrd.ps3 not supported (yet)" | ||
161 | |||
162 | $(obj)/uImage: vmlinux $(wrapperbits) | ||
163 | $(call if_changed,wrap,uboot) | ||
178 | 164 | ||
179 | $(obj)/zImage: $(addprefix $(obj)/, $(image-y)) | 165 | $(obj)/zImage: $(addprefix $(obj)/, $(image-y)) |
180 | @rm -f $@; ln $< $@ | 166 | @rm -f $@; ln $< $@ |
@@ -184,6 +170,5 @@ $(obj)/zImage.initrd: $(addprefix $(obj)/, $(initrd-y)) | |||
184 | install: $(CONFIGURE) $(image-y) | 170 | install: $(CONFIGURE) $(image-y) |
185 | sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $< | 171 | sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $< |
186 | 172 | ||
187 | clean-files += $(addprefix $(objtree)/, $(obj-boot) vmlinux.strip.gz) | 173 | clean-files += $(addprefix $(objtree)/, vmlinux.strip.gz vmlinux.bin.gz) |
188 | clean-files += $(addprefix $(objtree)/, $(obj-boot) vmlinux.bin.gz) | 174 | clean-files += $(image-) $(initrd-) zImage zImage.initrd |
189 | clean-files += $(image-) | ||
diff --git a/arch/powerpc/boot/crt0.S b/arch/powerpc/boot/crt0.S index 70e65b13e033..bd7770b60730 100644 --- a/arch/powerpc/boot/crt0.S +++ b/arch/powerpc/boot/crt0.S | |||
@@ -16,8 +16,11 @@ | |||
16 | _zimage_start_opd: | 16 | _zimage_start_opd: |
17 | .long _zimage_start, 0, 0, 0 | 17 | .long _zimage_start, 0, 0, 0 |
18 | 18 | ||
19 | .weak _zimage_start | ||
19 | .globl _zimage_start | 20 | .globl _zimage_start |
20 | _zimage_start: | 21 | _zimage_start: |
22 | .globl _zimage_start_lib | ||
23 | _zimage_start_lib: | ||
21 | /* Work out the offset between the address we were linked at | 24 | /* Work out the offset between the address we were linked at |
22 | and the address where we're running. */ | 25 | and the address where we're running. */ |
23 | bl 1f | 26 | bl 1f |
@@ -44,7 +47,7 @@ _zimage_start: | |||
44 | addi r9,r9,4 | 47 | addi r9,r9,4 |
45 | bdnz 2b | 48 | bdnz 2b |
46 | 49 | ||
47 | /* Do a cache flush for our text, in case OF didn't */ | 50 | /* Do a cache flush for our text, in case the loader didn't */ |
48 | 3: lis r9,_start@ha | 51 | 3: lis r9,_start@ha |
49 | addi r9,r9,_start@l | 52 | addi r9,r9,_start@l |
50 | add r9,r0,r9 | 53 | add r9,r0,r9 |
@@ -59,6 +62,30 @@ _zimage_start: | |||
59 | sync | 62 | sync |
60 | isync | 63 | isync |
61 | 64 | ||
62 | mr r6,r1 | 65 | /* Clear the BSS */ |
63 | b start | 66 | lis r9,__bss_start@ha |
67 | addi r9,r9,__bss_start@l | ||
68 | lis r8,_end@ha | ||
69 | addi r8,r8,_end@l | ||
70 | li r0,0 | ||
71 | 5: stw r0,0(r9) | ||
72 | addi r9,r9,4 | ||
73 | cmplw cr0,r9,r8 | ||
74 | blt 5b | ||
64 | 75 | ||
76 | /* Possibly set up a custom stack */ | ||
77 | .weak _platform_stack_top | ||
78 | lis r8,_platform_stack_top@ha | ||
79 | addi r8,r8,_platform_stack_top@l | ||
80 | cmpwi r8,0 | ||
81 | beq 6f | ||
82 | lwz r1,0(r8) | ||
83 | li r0,0 | ||
84 | stwu r0,-16(r1) /* establish a stack frame */ | ||
85 | 6: | ||
86 | |||
87 | /* Call platform_init() */ | ||
88 | bl platform_init | ||
89 | |||
90 | /* Call start */ | ||
91 | b start | ||
diff --git a/arch/powerpc/boot/dts/kuroboxHD.dts b/arch/powerpc/boot/dts/kuroboxHD.dts index b89791802e86..373110d77551 100644 --- a/arch/powerpc/boot/dts/kuroboxHD.dts +++ b/arch/powerpc/boot/dts/kuroboxHD.dts | |||
@@ -29,7 +29,6 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHD.dtb -V 16 kuroboxHD.dts" | |||
29 | 29 | ||
30 | cpus { | 30 | cpus { |
31 | linux,phandle = <2000>; | 31 | linux,phandle = <2000>; |
32 | #cpus = <1>; | ||
33 | #address-cells = <1>; | 32 | #address-cells = <1>; |
34 | #size-cells = <0>; | 33 | #size-cells = <0>; |
35 | 34 | ||
diff --git a/arch/powerpc/boot/dts/kuroboxHG.dts b/arch/powerpc/boot/dts/kuroboxHG.dts index 753102752d8b..f3542dc2c56e 100644 --- a/arch/powerpc/boot/dts/kuroboxHG.dts +++ b/arch/powerpc/boot/dts/kuroboxHG.dts | |||
@@ -29,7 +29,6 @@ build with: "dtc -f -I dts -O dtb -o kuroboxHG.dtb -V 16 kuroboxHG.dts" | |||
29 | 29 | ||
30 | cpus { | 30 | cpus { |
31 | linux,phandle = <2000>; | 31 | linux,phandle = <2000>; |
32 | #cpus = <1>; | ||
33 | #address-cells = <1>; | 32 | #address-cells = <1>; |
34 | #size-cells = <0>; | 33 | #size-cells = <0>; |
35 | 34 | ||
diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts index c03103c63285..ba54c6b40a09 100644 --- a/arch/powerpc/boot/dts/lite5200.dts +++ b/arch/powerpc/boot/dts/lite5200.dts | |||
@@ -24,7 +24,6 @@ | |||
24 | #size-cells = <1>; | 24 | #size-cells = <1>; |
25 | 25 | ||
26 | cpus { | 26 | cpus { |
27 | #cpus = <1>; | ||
28 | #address-cells = <1>; | 27 | #address-cells = <1>; |
29 | #size-cells = <0>; | 28 | #size-cells = <0>; |
30 | 29 | ||
diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts index 3875ca9a9a62..2e003081b0d3 100644 --- a/arch/powerpc/boot/dts/lite5200b.dts +++ b/arch/powerpc/boot/dts/lite5200b.dts | |||
@@ -24,7 +24,6 @@ | |||
24 | #size-cells = <1>; | 24 | #size-cells = <1>; |
25 | 25 | ||
26 | cpus { | 26 | cpus { |
27 | #cpus = <1>; | ||
28 | #address-cells = <1>; | 27 | #address-cells = <1>; |
29 | #size-cells = <0>; | 28 | #size-cells = <0>; |
30 | 29 | ||
diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts index 41d0720c5900..6fa3754f293a 100644 --- a/arch/powerpc/boot/dts/mpc7448hpc2.dts +++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts | |||
@@ -19,7 +19,6 @@ | |||
19 | linux,phandle = <100>; | 19 | linux,phandle = <100>; |
20 | 20 | ||
21 | cpus { | 21 | cpus { |
22 | #cpus = <1>; | ||
23 | #address-cells = <1>; | 22 | #address-cells = <1>; |
24 | #size-cells =<0>; | 23 | #size-cells =<0>; |
25 | linux,phandle = <200>; | 24 | linux,phandle = <200>; |
diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts index 260b2e447779..423eedcf634f 100644 --- a/arch/powerpc/boot/dts/mpc8272ads.dts +++ b/arch/powerpc/boot/dts/mpc8272ads.dts | |||
@@ -17,7 +17,6 @@ | |||
17 | linux,phandle = <100>; | 17 | linux,phandle = <100>; |
18 | 18 | ||
19 | cpus { | 19 | cpus { |
20 | #cpus = <1>; | ||
21 | #address-cells = <1>; | 20 | #address-cells = <1>; |
22 | #size-cells = <0>; | 21 | #size-cells = <0>; |
23 | linux,phandle = <200>; | 22 | linux,phandle = <200>; |
diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts index 6d721900d00e..a1533cc07d09 100644 --- a/arch/powerpc/boot/dts/mpc8313erdb.dts +++ b/arch/powerpc/boot/dts/mpc8313erdb.dts | |||
@@ -16,7 +16,6 @@ | |||
16 | #size-cells = <1>; | 16 | #size-cells = <1>; |
17 | 17 | ||
18 | cpus { | 18 | cpus { |
19 | #cpus = <1>; | ||
20 | #address-cells = <1>; | 19 | #address-cells = <1>; |
21 | #size-cells = <0>; | 20 | #size-cells = <0>; |
22 | 21 | ||
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts index 06b310698a02..c798491f4cd0 100644 --- a/arch/powerpc/boot/dts/mpc832x_mds.dts +++ b/arch/powerpc/boot/dts/mpc832x_mds.dts | |||
@@ -16,7 +16,6 @@ | |||
16 | #size-cells = <1>; | 16 | #size-cells = <1>; |
17 | 17 | ||
18 | cpus { | 18 | cpus { |
19 | #cpus = <1>; | ||
20 | #address-cells = <1>; | 19 | #address-cells = <1>; |
21 | #size-cells = <0>; | 20 | #size-cells = <0>; |
22 | 21 | ||
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts new file mode 100644 index 000000000000..b55bced1593d --- /dev/null +++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts | |||
@@ -0,0 +1,291 @@ | |||
1 | /* | ||
2 | * MPC832x RDB Device Tree Source | ||
3 | * | ||
4 | * Copyright 2007 Freescale Semiconductor Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | / { | ||
13 | model = "MPC8323ERDB"; | ||
14 | compatible = "MPC8323ERDB", "MPC832xRDB", "MPC83xxRDB"; | ||
15 | #address-cells = <1>; | ||
16 | #size-cells = <1>; | ||
17 | |||
18 | cpus { | ||
19 | #address-cells = <1>; | ||
20 | #size-cells = <0>; | ||
21 | |||
22 | PowerPC,8323@0 { | ||
23 | device_type = "cpu"; | ||
24 | reg = <0>; | ||
25 | d-cache-line-size = <20>; // 32 bytes | ||
26 | i-cache-line-size = <20>; // 32 bytes | ||
27 | d-cache-size = <4000>; // L1, 16K | ||
28 | i-cache-size = <4000>; // L1, 16K | ||
29 | timebase-frequency = <0>; | ||
30 | bus-frequency = <0>; | ||
31 | clock-frequency = <0>; | ||
32 | 32-bit; | ||
33 | }; | ||
34 | }; | ||
35 | |||
36 | memory { | ||
37 | device_type = "memory"; | ||
38 | reg = <00000000 04000000>; | ||
39 | }; | ||
40 | |||
41 | soc8323@e0000000 { | ||
42 | #address-cells = <1>; | ||
43 | #size-cells = <1>; | ||
44 | #interrupt-cells = <2>; | ||
45 | device_type = "soc"; | ||
46 | ranges = <0 e0000000 00100000>; | ||
47 | reg = <e0000000 00000200>; | ||
48 | bus-frequency = <0>; | ||
49 | |||
50 | wdt@200 { | ||
51 | device_type = "watchdog"; | ||
52 | compatible = "mpc83xx_wdt"; | ||
53 | reg = <200 100>; | ||
54 | }; | ||
55 | |||
56 | i2c@3000 { | ||
57 | device_type = "i2c"; | ||
58 | compatible = "fsl-i2c"; | ||
59 | reg = <3000 100>; | ||
60 | interrupts = <e 8>; | ||
61 | interrupt-parent = <&pic>; | ||
62 | dfsrr; | ||
63 | }; | ||
64 | |||
65 | serial@4500 { | ||
66 | device_type = "serial"; | ||
67 | compatible = "ns16550"; | ||
68 | reg = <4500 100>; | ||
69 | clock-frequency = <0>; | ||
70 | interrupts = <9 8>; | ||
71 | interrupt-parent = <&pic>; | ||
72 | }; | ||
73 | |||
74 | serial@4600 { | ||
75 | device_type = "serial"; | ||
76 | compatible = "ns16550"; | ||
77 | reg = <4600 100>; | ||
78 | clock-frequency = <0>; | ||
79 | interrupts = <a 8>; | ||
80 | interrupt-parent = <&pic>; | ||
81 | }; | ||
82 | |||
83 | crypto@30000 { | ||
84 | device_type = "crypto"; | ||
85 | model = "SEC2"; | ||
86 | compatible = "talitos"; | ||
87 | reg = <30000 7000>; | ||
88 | interrupts = <b 8>; | ||
89 | interrupt-parent = <&pic>; | ||
90 | /* Rev. 2.2 */ | ||
91 | num-channels = <1>; | ||
92 | channel-fifo-len = <18>; | ||
93 | exec-units-mask = <0000004c>; | ||
94 | descriptor-types-mask = <0122003f>; | ||
95 | }; | ||
96 | |||
97 | pci@8500 { | ||
98 | interrupt-map-mask = <f800 0 0 7>; | ||
99 | interrupt-map = < | ||
100 | /* IDSEL 0x10 AD16 (USB) */ | ||
101 | 8000 0 0 1 &pic 11 8 | ||
102 | |||
103 | /* IDSEL 0x11 AD17 (Mini1)*/ | ||
104 | 8800 0 0 1 &pic 12 8 | ||
105 | 8800 0 0 2 &pic 13 8 | ||
106 | 8800 0 0 3 &pic 14 8 | ||
107 | 8800 0 0 4 &pic 30 8 | ||
108 | |||
109 | /* IDSEL 0x12 AD18 (PCI/Mini2) */ | ||
110 | 9000 0 0 1 &pic 13 8 | ||
111 | 9000 0 0 2 &pic 14 8 | ||
112 | 9000 0 0 3 &pic 30 8 | ||
113 | 9000 0 0 4 &pic 11 8>; | ||
114 | |||
115 | interrupt-parent = <&pic>; | ||
116 | interrupts = <42 8>; | ||
117 | bus-range = <0 0>; | ||
118 | ranges = <42000000 0 80000000 80000000 0 10000000 | ||
119 | 02000000 0 90000000 90000000 0 10000000 | ||
120 | 01000000 0 d0000000 d0000000 0 04000000>; | ||
121 | clock-frequency = <0>; | ||
122 | #interrupt-cells = <1>; | ||
123 | #size-cells = <2>; | ||
124 | #address-cells = <3>; | ||
125 | reg = <8500 100>; | ||
126 | compatible = "83xx"; | ||
127 | device_type = "pci"; | ||
128 | }; | ||
129 | |||
130 | pic:pic@700 { | ||
131 | interrupt-controller; | ||
132 | #address-cells = <0>; | ||
133 | #interrupt-cells = <2>; | ||
134 | reg = <700 100>; | ||
135 | built-in; | ||
136 | device_type = "ipic"; | ||
137 | }; | ||
138 | |||
139 | par_io@1400 { | ||
140 | reg = <1400 100>; | ||
141 | device_type = "par_io"; | ||
142 | num-ports = <7>; | ||
143 | |||
144 | ucc2pio:ucc_pin@02 { | ||
145 | pio-map = < | ||
146 | /* port pin dir open_drain assignment has_irq */ | ||
147 | 3 4 3 0 2 0 /* MDIO */ | ||
148 | 3 5 1 0 2 0 /* MDC */ | ||
149 | 3 15 2 0 1 0 /* RX_CLK (CLK16) */ | ||
150 | 3 17 2 0 1 0 /* TX_CLK (CLK3) */ | ||
151 | 0 12 1 0 1 0 /* TxD0 */ | ||
152 | 0 13 1 0 1 0 /* TxD1 */ | ||
153 | 0 14 1 0 1 0 /* TxD2 */ | ||
154 | 0 15 1 0 1 0 /* TxD3 */ | ||
155 | 0 16 2 0 1 0 /* RxD0 */ | ||
156 | 0 17 2 0 1 0 /* RxD1 */ | ||
157 | 0 18 2 0 1 0 /* RxD2 */ | ||
158 | 0 19 2 0 1 0 /* RxD3 */ | ||
159 | 0 1a 2 0 1 0 /* RX_ER */ | ||
160 | 0 1b 1 0 1 0 /* TX_ER */ | ||
161 | 0 1c 2 0 1 0 /* RX_DV */ | ||
162 | 0 1d 2 0 1 0 /* COL */ | ||
163 | 0 1e 1 0 1 0 /* TX_EN */ | ||
164 | 0 1f 2 0 1 0>; /* CRS */ | ||
165 | }; | ||
166 | ucc3pio:ucc_pin@03 { | ||
167 | pio-map = < | ||
168 | /* port pin dir open_drain assignment has_irq */ | ||
169 | 0 d 2 0 1 0 /* RX_CLK (CLK9) */ | ||
170 | 3 18 2 0 1 0 /* TX_CLK (CLK10) */ | ||
171 | 1 0 1 0 1 0 /* TxD0 */ | ||
172 | 1 1 1 0 1 0 /* TxD1 */ | ||
173 | 1 2 1 0 1 0 /* TxD2 */ | ||
174 | 1 3 1 0 1 0 /* TxD3 */ | ||
175 | 1 4 2 0 1 0 /* RxD0 */ | ||
176 | 1 5 2 0 1 0 /* RxD1 */ | ||
177 | 1 6 2 0 1 0 /* RxD2 */ | ||
178 | 1 7 2 0 1 0 /* RxD3 */ | ||
179 | 1 8 2 0 1 0 /* RX_ER */ | ||
180 | 1 9 1 0 1 0 /* TX_ER */ | ||
181 | 1 a 2 0 1 0 /* RX_DV */ | ||
182 | 1 b 2 0 1 0 /* COL */ | ||
183 | 1 c 1 0 1 0 /* TX_EN */ | ||
184 | 1 d 2 0 1 0>; /* CRS */ | ||
185 | }; | ||
186 | }; | ||
187 | }; | ||
188 | |||
189 | qe@e0100000 { | ||
190 | #address-cells = <1>; | ||
191 | #size-cells = <1>; | ||
192 | device_type = "qe"; | ||
193 | model = "QE"; | ||
194 | ranges = <0 e0100000 00100000>; | ||
195 | reg = <e0100000 480>; | ||
196 | brg-frequency = <0>; | ||
197 | bus-frequency = <BCD3D80>; | ||
198 | |||
199 | muram@10000 { | ||
200 | device_type = "muram"; | ||
201 | ranges = <0 00010000 00004000>; | ||
202 | |||
203 | data-only@0 { | ||
204 | reg = <0 4000>; | ||
205 | }; | ||
206 | }; | ||
207 | |||
208 | spi@4c0 { | ||
209 | device_type = "spi"; | ||
210 | compatible = "fsl_spi"; | ||
211 | reg = <4c0 40>; | ||
212 | interrupts = <2>; | ||
213 | interrupt-parent = <&qeic>; | ||
214 | mode = "cpu"; | ||
215 | }; | ||
216 | |||
217 | spi@500 { | ||
218 | device_type = "spi"; | ||
219 | compatible = "fsl_spi"; | ||
220 | reg = <500 40>; | ||
221 | interrupts = <1>; | ||
222 | interrupt-parent = <&qeic>; | ||
223 | mode = "cpu"; | ||
224 | }; | ||
225 | |||
226 | ucc@3000 { | ||
227 | device_type = "network"; | ||
228 | compatible = "ucc_geth"; | ||
229 | model = "UCC"; | ||
230 | device-id = <2>; | ||
231 | reg = <3000 200>; | ||
232 | interrupts = <21>; | ||
233 | interrupt-parent = <&qeic>; | ||
234 | mac-address = [ 00 04 9f ef 03 02 ]; | ||
235 | rx-clock = <20>; | ||
236 | tx-clock = <13>; | ||
237 | phy-handle = <&phy00>; | ||
238 | pio-handle = <&ucc2pio>; | ||
239 | }; | ||
240 | |||
241 | ucc@2200 { | ||
242 | device_type = "network"; | ||
243 | compatible = "ucc_geth"; | ||
244 | model = "UCC"; | ||
245 | device-id = <3>; | ||
246 | reg = <2200 200>; | ||
247 | interrupts = <22>; | ||
248 | interrupt-parent = <&qeic>; | ||
249 | mac-address = [ 00 04 9f ef 03 01 ]; | ||
250 | rx-clock = <19>; | ||
251 | tx-clock = <1a>; | ||
252 | phy-handle = <&phy04>; | ||
253 | pio-handle = <&ucc3pio>; | ||
254 | }; | ||
255 | |||
256 | mdio@3120 { | ||
257 | #address-cells = <1>; | ||
258 | #size-cells = <0>; | ||
259 | reg = <3120 18>; | ||
260 | device_type = "mdio"; | ||
261 | compatible = "ucc_geth_phy"; | ||
262 | |||
263 | phy00:ethernet-phy@00 { | ||
264 | interrupt-parent = <&pic>; | ||
265 | interrupts = <0>; | ||
266 | reg = <0>; | ||
267 | device_type = "ethernet-phy"; | ||
268 | interface = <3>; //ENET_100_MII | ||
269 | }; | ||
270 | phy04:ethernet-phy@04 { | ||
271 | interrupt-parent = <&pic>; | ||
272 | interrupts = <0>; | ||
273 | reg = <4>; | ||
274 | device_type = "ethernet-phy"; | ||
275 | interface = <3>; | ||
276 | }; | ||
277 | }; | ||
278 | |||
279 | qeic:qeic@80 { | ||
280 | interrupt-controller; | ||
281 | device_type = "qeic"; | ||
282 | #address-cells = <0>; | ||
283 | #interrupt-cells = <1>; | ||
284 | reg = <80 80>; | ||
285 | built-in; | ||
286 | big-endian; | ||
287 | interrupts = <20 8 21 8>; //high:32 low:33 | ||
288 | interrupt-parent = <&pic>; | ||
289 | }; | ||
290 | }; | ||
291 | }; | ||
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts index 61b550bf1645..db0d00303275 100644 --- a/arch/powerpc/boot/dts/mpc8349emitx.dts +++ b/arch/powerpc/boot/dts/mpc8349emitx.dts | |||
@@ -15,7 +15,6 @@ | |||
15 | #size-cells = <1>; | 15 | #size-cells = <1>; |
16 | 16 | ||
17 | cpus { | 17 | cpus { |
18 | #cpus = <1>; | ||
19 | #address-cells = <1>; | 18 | #address-cells = <1>; |
20 | #size-cells = <0>; | 19 | #size-cells = <0>; |
21 | 20 | ||
diff --git a/arch/powerpc/boot/dts/mpc8349emitxgp.dts b/arch/powerpc/boot/dts/mpc8349emitxgp.dts index b2e1a5ec3779..f636528a3c72 100644 --- a/arch/powerpc/boot/dts/mpc8349emitxgp.dts +++ b/arch/powerpc/boot/dts/mpc8349emitxgp.dts | |||
@@ -15,7 +15,6 @@ | |||
15 | #size-cells = <1>; | 15 | #size-cells = <1>; |
16 | 16 | ||
17 | cpus { | 17 | cpus { |
18 | #cpus = <1>; | ||
19 | #address-cells = <1>; | 18 | #address-cells = <1>; |
20 | #size-cells = <0>; | 19 | #size-cells = <0>; |
21 | 20 | ||
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts index e4b43c24bc0b..07bcc5194d2b 100644 --- a/arch/powerpc/boot/dts/mpc834x_mds.dts +++ b/arch/powerpc/boot/dts/mpc834x_mds.dts | |||
@@ -16,7 +16,6 @@ | |||
16 | #size-cells = <1>; | 16 | #size-cells = <1>; |
17 | 17 | ||
18 | cpus { | 18 | cpus { |
19 | #cpus = <1>; | ||
20 | #address-cells = <1>; | 19 | #address-cells = <1>; |
21 | #size-cells = <0>; | 20 | #size-cells = <0>; |
22 | 21 | ||
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts index 4fe45c021848..7f578eb57082 100644 --- a/arch/powerpc/boot/dts/mpc836x_mds.dts +++ b/arch/powerpc/boot/dts/mpc836x_mds.dts | |||
@@ -21,7 +21,6 @@ | |||
21 | #size-cells = <1>; | 21 | #size-cells = <1>; |
22 | 22 | ||
23 | cpus { | 23 | cpus { |
24 | #cpus = <1>; | ||
25 | #address-cells = <1>; | 24 | #address-cells = <1>; |
26 | #size-cells = <0>; | 25 | #size-cells = <0>; |
27 | 26 | ||
diff --git a/arch/powerpc/boot/dts/mpc8540ads.dts b/arch/powerpc/boot/dts/mpc8540ads.dts index 3c0917fa791c..f261d647ac85 100644 --- a/arch/powerpc/boot/dts/mpc8540ads.dts +++ b/arch/powerpc/boot/dts/mpc8540ads.dts | |||
@@ -17,7 +17,6 @@ | |||
17 | #size-cells = <1>; | 17 | #size-cells = <1>; |
18 | 18 | ||
19 | cpus { | 19 | cpus { |
20 | #cpus = <1>; | ||
21 | #address-cells = <1>; | 20 | #address-cells = <1>; |
22 | #size-cells = <0>; | 21 | #size-cells = <0>; |
23 | 22 | ||
diff --git a/arch/powerpc/boot/dts/mpc8541cds.dts b/arch/powerpc/boot/dts/mpc8541cds.dts index 2a1ae760ab3a..5fdcb69554f2 100644 --- a/arch/powerpc/boot/dts/mpc8541cds.dts +++ b/arch/powerpc/boot/dts/mpc8541cds.dts | |||
@@ -17,7 +17,6 @@ | |||
17 | #size-cells = <1>; | 17 | #size-cells = <1>; |
18 | 18 | ||
19 | cpus { | 19 | cpus { |
20 | #cpus = <1>; | ||
21 | #address-cells = <1>; | 20 | #address-cells = <1>; |
22 | #size-cells = <0>; | 21 | #size-cells = <0>; |
23 | 22 | ||
diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts new file mode 100644 index 000000000000..6b084605bb4b --- /dev/null +++ b/arch/powerpc/boot/dts/mpc8544ds.dts | |||
@@ -0,0 +1,136 @@ | |||
1 | /* | ||
2 | * MPC8544 DS Device Tree Source | ||
3 | * | ||
4 | * Copyright 2007 Freescale Semiconductor Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | / { | ||
13 | model = "MPC8544DS"; | ||
14 | compatible = "MPC8544DS", "MPC85xxDS"; | ||
15 | #address-cells = <1>; | ||
16 | #size-cells = <1>; | ||
17 | |||
18 | cpus { | ||
19 | #cpus = <1>; | ||
20 | #address-cells = <1>; | ||
21 | #size-cells = <0>; | ||
22 | |||
23 | PowerPC,8544@0 { | ||
24 | device_type = "cpu"; | ||
25 | reg = <0>; | ||
26 | d-cache-line-size = <20>; // 32 bytes | ||
27 | i-cache-line-size = <20>; // 32 bytes | ||
28 | d-cache-size = <8000>; // L1, 32K | ||
29 | i-cache-size = <8000>; // L1, 32K | ||
30 | timebase-frequency = <0>; | ||
31 | bus-frequency = <0>; | ||
32 | clock-frequency = <0>; | ||
33 | 32-bit; | ||
34 | }; | ||
35 | }; | ||
36 | |||
37 | memory { | ||
38 | device_type = "memory"; | ||
39 | reg = <00000000 00000000>; // Filled by U-Boot | ||
40 | }; | ||
41 | |||
42 | soc8544@e0000000 { | ||
43 | #address-cells = <1>; | ||
44 | #size-cells = <1>; | ||
45 | #interrupt-cells = <2>; | ||
46 | device_type = "soc"; | ||
47 | ranges = <0 e0000000 00100000>; | ||
48 | reg = <e0000000 00100000>; // CCSRBAR 1M | ||
49 | bus-frequency = <0>; // Filled out by uboot. | ||
50 | |||
51 | i2c@3000 { | ||
52 | device_type = "i2c"; | ||
53 | compatible = "fsl-i2c"; | ||
54 | reg = <3000 100>; | ||
55 | interrupts = <1b 2>; | ||
56 | interrupt-parent = <&mpic>; | ||
57 | dfsrr; | ||
58 | }; | ||
59 | |||
60 | mdio@24520 { | ||
61 | #address-cells = <1>; | ||
62 | #size-cells = <0>; | ||
63 | device_type = "mdio"; | ||
64 | compatible = "gianfar"; | ||
65 | reg = <24520 20>; | ||
66 | phy0: ethernet-phy@0 { | ||
67 | interrupt-parent = <&mpic>; | ||
68 | interrupts = <3a 1>; | ||
69 | reg = <0>; | ||
70 | device_type = "ethernet-phy"; | ||
71 | }; | ||
72 | phy1: ethernet-phy@1 { | ||
73 | interrupt-parent = <&mpic>; | ||
74 | interrupts = <3a 1>; | ||
75 | reg = <1>; | ||
76 | device_type = "ethernet-phy"; | ||
77 | }; | ||
78 | }; | ||
79 | |||
80 | ethernet@24000 { | ||
81 | #address-cells = <1>; | ||
82 | #size-cells = <0>; | ||
83 | device_type = "network"; | ||
84 | model = "TSEC"; | ||
85 | compatible = "gianfar"; | ||
86 | reg = <24000 1000>; | ||
87 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
88 | interrupts = <d 2 e 2 12 2>; | ||
89 | interrupt-parent = <&mpic>; | ||
90 | phy-handle = <&phy0>; | ||
91 | }; | ||
92 | |||
93 | ethernet@26000 { | ||
94 | #address-cells = <1>; | ||
95 | #size-cells = <0>; | ||
96 | device_type = "network"; | ||
97 | model = "TSEC"; | ||
98 | compatible = "gianfar"; | ||
99 | reg = <26000 1000>; | ||
100 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
101 | interrupts = <f 2 10 2 11 2>; | ||
102 | interrupt-parent = <&mpic>; | ||
103 | phy-handle = <&phy1>; | ||
104 | }; | ||
105 | |||
106 | serial@4500 { | ||
107 | device_type = "serial"; | ||
108 | compatible = "ns16550"; | ||
109 | reg = <4500 100>; | ||
110 | clock-frequency = <0>; | ||
111 | interrupts = <1a 2>; | ||
112 | interrupt-parent = <&mpic>; | ||
113 | }; | ||
114 | |||
115 | serial@4600 { | ||
116 | device_type = "serial"; | ||
117 | compatible = "ns16550"; | ||
118 | reg = <4600 100>; | ||
119 | clock-frequency = <0>; | ||
120 | interrupts = <1a 2>; | ||
121 | interrupt-parent = <&mpic>; | ||
122 | }; | ||
123 | |||
124 | mpic: pic@40000 { | ||
125 | clock-frequency = <0>; | ||
126 | interrupt-controller; | ||
127 | #address-cells = <0>; | ||
128 | #interrupt-cells = <2>; | ||
129 | reg = <40000 40000>; | ||
130 | built-in; | ||
131 | compatible = "chrp,open-pic"; | ||
132 | device_type = "open-pic"; | ||
133 | big-endian; | ||
134 | }; | ||
135 | }; | ||
136 | }; | ||
diff --git a/arch/powerpc/boot/dts/mpc8548cds.dts b/arch/powerpc/boot/dts/mpc8548cds.dts index 7eb5d81d5eec..b2b2200d0425 100644 --- a/arch/powerpc/boot/dts/mpc8548cds.dts +++ b/arch/powerpc/boot/dts/mpc8548cds.dts | |||
@@ -17,7 +17,6 @@ | |||
17 | #size-cells = <1>; | 17 | #size-cells = <1>; |
18 | 18 | ||
19 | cpus { | 19 | cpus { |
20 | #cpus = <1>; | ||
21 | #address-cells = <1>; | 20 | #address-cells = <1>; |
22 | #size-cells = <0>; | 21 | #size-cells = <0>; |
23 | 22 | ||
diff --git a/arch/powerpc/boot/dts/mpc8555cds.dts b/arch/powerpc/boot/dts/mpc8555cds.dts index 5f9c102a0ab4..68a4795720dc 100644 --- a/arch/powerpc/boot/dts/mpc8555cds.dts +++ b/arch/powerpc/boot/dts/mpc8555cds.dts | |||
@@ -17,7 +17,6 @@ | |||
17 | #size-cells = <1>; | 17 | #size-cells = <1>; |
18 | 18 | ||
19 | cpus { | 19 | cpus { |
20 | #cpus = <1>; | ||
21 | #address-cells = <1>; | 20 | #address-cells = <1>; |
22 | #size-cells = <0>; | 21 | #size-cells = <0>; |
23 | 22 | ||
diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts index 10502638b0e9..1f2afe9291d2 100644 --- a/arch/powerpc/boot/dts/mpc8560ads.dts +++ b/arch/powerpc/boot/dts/mpc8560ads.dts | |||
@@ -17,7 +17,6 @@ | |||
17 | #size-cells = <1>; | 17 | #size-cells = <1>; |
18 | 18 | ||
19 | cpus { | 19 | cpus { |
20 | #cpus = <1>; | ||
21 | #address-cells = <1>; | 20 | #address-cells = <1>; |
22 | #size-cells = <0>; | 21 | #size-cells = <0>; |
23 | 22 | ||
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts index bf49d8c997b9..7361b36749cb 100644 --- a/arch/powerpc/boot/dts/mpc8568mds.dts +++ b/arch/powerpc/boot/dts/mpc8568mds.dts | |||
@@ -21,7 +21,6 @@ | |||
21 | #size-cells = <1>; | 21 | #size-cells = <1>; |
22 | 22 | ||
23 | cpus { | 23 | cpus { |
24 | #cpus = <1>; | ||
25 | #address-cells = <1>; | 24 | #address-cells = <1>; |
26 | #size-cells = <0>; | 25 | #size-cells = <0>; |
27 | 26 | ||
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts index 8a4995a85ba0..260b264c869e 100644 --- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts +++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts | |||
@@ -17,7 +17,6 @@ | |||
17 | #size-cells = <1>; | 17 | #size-cells = <1>; |
18 | 18 | ||
19 | cpus { | 19 | cpus { |
20 | #cpus = <2>; | ||
21 | #address-cells = <1>; | 20 | #address-cells = <1>; |
22 | #size-cells = <0>; | 21 | #size-cells = <0>; |
23 | 22 | ||
@@ -300,6 +299,30 @@ | |||
300 | }; | 299 | }; |
301 | 300 | ||
302 | }; | 301 | }; |
302 | |||
303 | pci@9000 { | ||
304 | compatible = "86xx"; | ||
305 | device_type = "pci"; | ||
306 | #interrupt-cells = <1>; | ||
307 | #size-cells = <2>; | ||
308 | #address-cells = <3>; | ||
309 | reg = <9000 1000>; | ||
310 | bus-range = <0 ff>; | ||
311 | ranges = <02000000 0 a0000000 a0000000 0 20000000 | ||
312 | 01000000 0 00000000 e3000000 0 00100000>; | ||
313 | clock-frequency = <1fca055>; | ||
314 | interrupt-parent = <&mpic>; | ||
315 | interrupts = <19 2>; | ||
316 | interrupt-map-mask = <f800 0 0 7>; | ||
317 | interrupt-map = < | ||
318 | /* IDSEL 0x0 */ | ||
319 | 0000 0 0 1 &mpic 44 1 | ||
320 | 0000 0 0 2 &mpic 45 1 | ||
321 | 0000 0 0 3 &mpic 46 1 | ||
322 | 0000 0 0 4 &mpic 47 1 | ||
323 | >; | ||
324 | }; | ||
325 | |||
303 | mpic: pic@40000 { | 326 | mpic: pic@40000 { |
304 | clock-frequency = <0>; | 327 | clock-frequency = <0>; |
305 | interrupt-controller; | 328 | interrupt-controller; |
diff --git a/arch/powerpc/boot/dts/mpc866ads.dts b/arch/powerpc/boot/dts/mpc866ads.dts index 2b56b5df451a..c0d06fd12927 100644 --- a/arch/powerpc/boot/dts/mpc866ads.dts +++ b/arch/powerpc/boot/dts/mpc866ads.dts | |||
@@ -18,7 +18,6 @@ | |||
18 | linux,phandle = <100>; | 18 | linux,phandle = <100>; |
19 | 19 | ||
20 | cpus { | 20 | cpus { |
21 | #cpus = <1>; | ||
22 | #address-cells = <1>; | 21 | #address-cells = <1>; |
23 | #size-cells = <0>; | 22 | #size-cells = <0>; |
24 | linux,phandle = <200>; | 23 | linux,phandle = <200>; |
diff --git a/arch/powerpc/boot/dts/mpc885ads.dts b/arch/powerpc/boot/dts/mpc885ads.dts index faecd08c54da..110bf6170603 100644 --- a/arch/powerpc/boot/dts/mpc885ads.dts +++ b/arch/powerpc/boot/dts/mpc885ads.dts | |||
@@ -18,7 +18,6 @@ | |||
18 | linux,phandle = <100>; | 18 | linux,phandle = <100>; |
19 | 19 | ||
20 | cpus { | 20 | cpus { |
21 | #cpus = <1>; | ||
22 | #address-cells = <1>; | 21 | #address-cells = <1>; |
23 | #size-cells = <0>; | 22 | #size-cells = <0>; |
24 | linux,phandle = <200>; | 23 | linux,phandle = <200>; |
diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c index c76c194715b2..d00fbd92a458 100644 --- a/arch/powerpc/boot/flatdevtree.c +++ b/arch/powerpc/boot/flatdevtree.c | |||
@@ -29,12 +29,20 @@ | |||
29 | 29 | ||
30 | #define _ALIGN(x, al) (((x) + (al) - 1) & ~((al) - 1)) | 30 | #define _ALIGN(x, al) (((x) + (al) - 1) & ~((al) - 1)) |
31 | 31 | ||
32 | static char *ft_root_node(struct ft_cxt *cxt) | ||
33 | { | ||
34 | return cxt->rgn[FT_STRUCT].start; | ||
35 | } | ||
36 | |||
32 | /* Routines for keeping node ptrs returned by ft_find_device current */ | 37 | /* Routines for keeping node ptrs returned by ft_find_device current */ |
33 | /* First entry not used b/c it would return 0 and be taken as NULL/error */ | 38 | /* First entry not used b/c it would return 0 and be taken as NULL/error */ |
34 | static void *ft_node_add(struct ft_cxt *cxt, char *node) | 39 | static void *ft_get_phandle(struct ft_cxt *cxt, char *node) |
35 | { | 40 | { |
36 | unsigned int i; | 41 | unsigned int i; |
37 | 42 | ||
43 | if (!node) | ||
44 | return NULL; | ||
45 | |||
38 | for (i = 1; i < cxt->nodes_used; i++) /* already there? */ | 46 | for (i = 1; i < cxt->nodes_used; i++) /* already there? */ |
39 | if (cxt->node_tbl[i] == node) | 47 | if (cxt->node_tbl[i] == node) |
40 | return (void *)i; | 48 | return (void *)i; |
@@ -238,7 +246,7 @@ static int ft_shuffle(struct ft_cxt *cxt, char **pp, enum ft_rgn_id rgn, | |||
238 | if (rgn == FT_STRUCT) | 246 | if (rgn == FT_STRUCT) |
239 | ft_node_update_before(cxt, p, -nextra); | 247 | ft_node_update_before(cxt, p, -nextra); |
240 | } | 248 | } |
241 | *p -= nextra; | 249 | *pp -= nextra; |
242 | cxt->rgn[rgn].start -= nextra; | 250 | cxt->rgn[rgn].start -= nextra; |
243 | cxt->rgn[rgn].size += nextra; | 251 | cxt->rgn[rgn].size += nextra; |
244 | return 1; | 252 | return 1; |
@@ -253,8 +261,14 @@ static int ft_make_space(struct ft_cxt *cxt, char **pp, enum ft_rgn_id rgn, | |||
253 | char *str, *next; | 261 | char *str, *next; |
254 | enum ft_rgn_id r; | 262 | enum ft_rgn_id r; |
255 | 263 | ||
256 | if (!cxt->isordered && !ft_reorder(cxt, nextra)) | 264 | if (!cxt->isordered) { |
257 | return 0; | 265 | unsigned long rgn_off = *pp - cxt->rgn[rgn].start; |
266 | |||
267 | if (!ft_reorder(cxt, nextra)) | ||
268 | return 0; | ||
269 | |||
270 | *pp = cxt->rgn[rgn].start + rgn_off; | ||
271 | } | ||
258 | if (ft_shuffle(cxt, pp, rgn, nextra)) | 272 | if (ft_shuffle(cxt, pp, rgn, nextra)) |
259 | return 1; | 273 | return 1; |
260 | 274 | ||
@@ -415,7 +429,7 @@ int ft_prop(struct ft_cxt *cxt, const char *name, const void *data, | |||
415 | { | 429 | { |
416 | int off, len; | 430 | int off, len; |
417 | 431 | ||
418 | off = lookup_string(cxt, name); | 432 | off = map_string(cxt, name); |
419 | if (off == NO_STRING) | 433 | if (off == NO_STRING) |
420 | return -1; | 434 | return -1; |
421 | 435 | ||
@@ -590,7 +604,7 @@ int ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size) | |||
590 | 604 | ||
591 | void ft_begin_tree(struct ft_cxt *cxt) | 605 | void ft_begin_tree(struct ft_cxt *cxt) |
592 | { | 606 | { |
593 | cxt->p = cxt->rgn[FT_STRUCT].start; | 607 | cxt->p = ft_root_node(cxt); |
594 | } | 608 | } |
595 | 609 | ||
596 | void ft_end_tree(struct ft_cxt *cxt) | 610 | void ft_end_tree(struct ft_cxt *cxt) |
@@ -636,8 +650,21 @@ void *ft_find_device(struct ft_cxt *cxt, const char *srch_path) | |||
636 | /* require absolute path */ | 650 | /* require absolute path */ |
637 | if (srch_path[0] != '/') | 651 | if (srch_path[0] != '/') |
638 | return NULL; | 652 | return NULL; |
639 | node = ft_find_descendent(cxt, cxt->rgn[FT_STRUCT].start, srch_path); | 653 | node = ft_find_descendent(cxt, ft_root_node(cxt), srch_path); |
640 | return ft_node_add(cxt, node); | 654 | return ft_get_phandle(cxt, node); |
655 | } | ||
656 | |||
657 | void *ft_find_device_rel(struct ft_cxt *cxt, const void *top, | ||
658 | const char *srch_path) | ||
659 | { | ||
660 | char *node; | ||
661 | |||
662 | node = ft_node_ph2node(cxt, top); | ||
663 | if (node == NULL) | ||
664 | return NULL; | ||
665 | |||
666 | node = ft_find_descendent(cxt, node, srch_path); | ||
667 | return ft_get_phandle(cxt, node); | ||
641 | } | 668 | } |
642 | 669 | ||
643 | void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path) | 670 | void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path) |
@@ -701,23 +728,18 @@ void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path) | |||
701 | return NULL; | 728 | return NULL; |
702 | } | 729 | } |
703 | 730 | ||
704 | void *ft_get_parent(struct ft_cxt *cxt, const void *phandle) | 731 | void *__ft_get_parent(struct ft_cxt *cxt, void *node) |
705 | { | 732 | { |
706 | void *node; | ||
707 | int d; | 733 | int d; |
708 | struct ft_atom atom; | 734 | struct ft_atom atom; |
709 | char *p; | 735 | char *p; |
710 | 736 | ||
711 | node = ft_node_ph2node(cxt, phandle); | ||
712 | if (node == NULL) | ||
713 | return NULL; | ||
714 | |||
715 | for (d = 0; cxt->genealogy[d] != NULL; ++d) | 737 | for (d = 0; cxt->genealogy[d] != NULL; ++d) |
716 | if (cxt->genealogy[d] == node) | 738 | if (cxt->genealogy[d] == node) |
717 | return cxt->genealogy[d > 0 ? d - 1 : 0]; | 739 | return d > 0 ? cxt->genealogy[d - 1] : NULL; |
718 | 740 | ||
719 | /* have to do it the hard way... */ | 741 | /* have to do it the hard way... */ |
720 | p = cxt->rgn[FT_STRUCT].start; | 742 | p = ft_root_node(cxt); |
721 | d = 0; | 743 | d = 0; |
722 | while ((p = ft_next(cxt, p, &atom)) != NULL) { | 744 | while ((p = ft_next(cxt, p, &atom)) != NULL) { |
723 | switch (atom.tag) { | 745 | switch (atom.tag) { |
@@ -726,7 +748,7 @@ void *ft_get_parent(struct ft_cxt *cxt, const void *phandle) | |||
726 | if (node == atom.data) { | 748 | if (node == atom.data) { |
727 | /* found it */ | 749 | /* found it */ |
728 | cxt->genealogy[d + 1] = NULL; | 750 | cxt->genealogy[d + 1] = NULL; |
729 | return d > 0 ? cxt->genealogy[d - 1] : node; | 751 | return d > 0 ? cxt->genealogy[d - 1] : NULL; |
730 | } | 752 | } |
731 | ++d; | 753 | ++d; |
732 | break; | 754 | break; |
@@ -738,41 +760,131 @@ void *ft_get_parent(struct ft_cxt *cxt, const void *phandle) | |||
738 | return NULL; | 760 | return NULL; |
739 | } | 761 | } |
740 | 762 | ||
741 | int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, | 763 | void *ft_get_parent(struct ft_cxt *cxt, const void *phandle) |
742 | void *buf, const unsigned int buflen) | ||
743 | { | 764 | { |
744 | struct ft_atom atom; | 765 | void *node = ft_node_ph2node(cxt, phandle); |
745 | void *node; | ||
746 | char *p; | ||
747 | int depth; | ||
748 | unsigned int size; | ||
749 | |||
750 | node = ft_node_ph2node(cxt, phandle); | ||
751 | if (node == NULL) | 766 | if (node == NULL) |
752 | return -1; | 767 | return NULL; |
753 | 768 | ||
754 | depth = 0; | 769 | node = __ft_get_parent(cxt, node); |
755 | p = (char *)node; | 770 | return ft_get_phandle(cxt, node); |
771 | } | ||
756 | 772 | ||
757 | while ((p = ft_next(cxt, p, &atom)) != NULL) { | 773 | static const void *__ft_get_prop(struct ft_cxt *cxt, void *node, |
774 | const char *propname, unsigned int *len) | ||
775 | { | ||
776 | struct ft_atom atom; | ||
777 | int depth = 0; | ||
778 | |||
779 | while ((node = ft_next(cxt, node, &atom)) != NULL) { | ||
758 | switch (atom.tag) { | 780 | switch (atom.tag) { |
759 | case OF_DT_BEGIN_NODE: | 781 | case OF_DT_BEGIN_NODE: |
760 | ++depth; | 782 | ++depth; |
761 | break; | 783 | break; |
784 | |||
762 | case OF_DT_PROP: | 785 | case OF_DT_PROP: |
763 | if ((depth != 1) || strcmp(atom.name, propname)) | 786 | if (depth != 1 || strcmp(atom.name, propname)) |
764 | break; | 787 | break; |
765 | size = min(atom.size, buflen); | 788 | |
766 | memcpy(buf, atom.data, size); | 789 | if (len) |
767 | return atom.size; | 790 | *len = atom.size; |
791 | |||
792 | return atom.data; | ||
793 | |||
768 | case OF_DT_END_NODE: | 794 | case OF_DT_END_NODE: |
769 | if (--depth <= 0) | 795 | if (--depth <= 0) |
770 | return -1; | 796 | return NULL; |
771 | } | 797 | } |
772 | } | 798 | } |
799 | |||
800 | return NULL; | ||
801 | } | ||
802 | |||
803 | int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, | ||
804 | void *buf, const unsigned int buflen) | ||
805 | { | ||
806 | const void *data; | ||
807 | unsigned int size; | ||
808 | |||
809 | void *node = ft_node_ph2node(cxt, phandle); | ||
810 | if (!node) | ||
811 | return -1; | ||
812 | |||
813 | data = __ft_get_prop(cxt, node, propname, &size); | ||
814 | if (data) { | ||
815 | unsigned int clipped_size = min(size, buflen); | ||
816 | memcpy(buf, data, clipped_size); | ||
817 | return size; | ||
818 | } | ||
819 | |||
773 | return -1; | 820 | return -1; |
774 | } | 821 | } |
775 | 822 | ||
823 | void *__ft_find_node_by_prop_value(struct ft_cxt *cxt, void *prev, | ||
824 | const char *propname, const char *propval, | ||
825 | unsigned int proplen) | ||
826 | { | ||
827 | struct ft_atom atom; | ||
828 | char *p = ft_root_node(cxt); | ||
829 | char *next; | ||
830 | int past_prev = prev ? 0 : 1; | ||
831 | int depth = -1; | ||
832 | |||
833 | while ((next = ft_next(cxt, p, &atom)) != NULL) { | ||
834 | const void *data; | ||
835 | unsigned int size; | ||
836 | |||
837 | switch (atom.tag) { | ||
838 | case OF_DT_BEGIN_NODE: | ||
839 | depth++; | ||
840 | |||
841 | if (prev == p) { | ||
842 | past_prev = 1; | ||
843 | break; | ||
844 | } | ||
845 | |||
846 | if (!past_prev || depth < 1) | ||
847 | break; | ||
848 | |||
849 | data = __ft_get_prop(cxt, p, propname, &size); | ||
850 | if (!data || size != proplen) | ||
851 | break; | ||
852 | if (memcmp(data, propval, size)) | ||
853 | break; | ||
854 | |||
855 | return p; | ||
856 | |||
857 | case OF_DT_END_NODE: | ||
858 | if (depth-- == 0) | ||
859 | return NULL; | ||
860 | |||
861 | break; | ||
862 | } | ||
863 | |||
864 | p = next; | ||
865 | } | ||
866 | |||
867 | return NULL; | ||
868 | } | ||
869 | |||
870 | void *ft_find_node_by_prop_value(struct ft_cxt *cxt, const void *prev, | ||
871 | const char *propname, const char *propval, | ||
872 | int proplen) | ||
873 | { | ||
874 | void *node = NULL; | ||
875 | |||
876 | if (prev) { | ||
877 | node = ft_node_ph2node(cxt, prev); | ||
878 | |||
879 | if (!node) | ||
880 | return NULL; | ||
881 | } | ||
882 | |||
883 | node = __ft_find_node_by_prop_value(cxt, node, propname, | ||
884 | propval, proplen); | ||
885 | return ft_get_phandle(cxt, node); | ||
886 | } | ||
887 | |||
776 | int ft_set_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, | 888 | int ft_set_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, |
777 | const void *buf, const unsigned int buflen) | 889 | const void *buf, const unsigned int buflen) |
778 | { | 890 | { |
@@ -849,19 +961,26 @@ int ft_del_prop(struct ft_cxt *cxt, const void *phandle, const char *propname) | |||
849 | return -1; | 961 | return -1; |
850 | } | 962 | } |
851 | 963 | ||
852 | void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *path) | 964 | void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *name) |
853 | { | 965 | { |
854 | struct ft_atom atom; | 966 | struct ft_atom atom; |
855 | char *p, *next; | 967 | char *p, *next; |
856 | int depth = 0; | 968 | int depth = 0; |
857 | 969 | ||
858 | p = cxt->rgn[FT_STRUCT].start; | 970 | if (parent) { |
971 | p = ft_node_ph2node(cxt, parent); | ||
972 | if (!p) | ||
973 | return NULL; | ||
974 | } else { | ||
975 | p = ft_root_node(cxt); | ||
976 | } | ||
977 | |||
859 | while ((next = ft_next(cxt, p, &atom)) != NULL) { | 978 | while ((next = ft_next(cxt, p, &atom)) != NULL) { |
860 | switch (atom.tag) { | 979 | switch (atom.tag) { |
861 | case OF_DT_BEGIN_NODE: | 980 | case OF_DT_BEGIN_NODE: |
862 | ++depth; | 981 | ++depth; |
863 | if (depth == 1 && strcmp(atom.name, path) == 0) | 982 | if (depth == 1 && strcmp(atom.name, name) == 0) |
864 | /* duplicate node path, return error */ | 983 | /* duplicate node name, return error */ |
865 | return NULL; | 984 | return NULL; |
866 | break; | 985 | break; |
867 | case OF_DT_END_NODE: | 986 | case OF_DT_END_NODE: |
@@ -870,7 +989,7 @@ void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *path) | |||
870 | break; | 989 | break; |
871 | /* end of node, insert here */ | 990 | /* end of node, insert here */ |
872 | cxt->p = p; | 991 | cxt->p = p; |
873 | ft_begin_node(cxt, path); | 992 | ft_begin_node(cxt, name); |
874 | ft_end_node(cxt); | 993 | ft_end_node(cxt); |
875 | return p; | 994 | return p; |
876 | } | 995 | } |
diff --git a/arch/powerpc/boot/flatdevtree.h b/arch/powerpc/boot/flatdevtree.h index b9cd9f61f351..cb26325d72db 100644 --- a/arch/powerpc/boot/flatdevtree.h +++ b/arch/powerpc/boot/flatdevtree.h | |||
@@ -97,10 +97,17 @@ int ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size); | |||
97 | void ft_dump_blob(const void *bphp); | 97 | void ft_dump_blob(const void *bphp); |
98 | void ft_merge_blob(struct ft_cxt *cxt, void *blob); | 98 | void ft_merge_blob(struct ft_cxt *cxt, void *blob); |
99 | void *ft_find_device(struct ft_cxt *cxt, const char *srch_path); | 99 | void *ft_find_device(struct ft_cxt *cxt, const char *srch_path); |
100 | void *ft_find_device_rel(struct ft_cxt *cxt, const void *top, | ||
101 | const char *srch_path); | ||
100 | void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path); | 102 | void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path); |
101 | int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, | 103 | int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, |
102 | void *buf, const unsigned int buflen); | 104 | void *buf, const unsigned int buflen); |
103 | int ft_set_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, | 105 | int ft_set_prop(struct ft_cxt *cxt, const void *phandle, const char *propname, |
104 | const void *buf, const unsigned int buflen); | 106 | const void *buf, const unsigned int buflen); |
107 | void *ft_get_parent(struct ft_cxt *cxt, const void *phandle); | ||
108 | void *ft_find_node_by_prop_value(struct ft_cxt *cxt, const void *prev, | ||
109 | const char *propname, const char *propval, | ||
110 | int proplen); | ||
111 | void *ft_create_node(struct ft_cxt *cxt, const void *parent, const char *name); | ||
105 | 112 | ||
106 | #endif /* FLATDEVTREE_H */ | 113 | #endif /* FLATDEVTREE_H */ |
diff --git a/arch/powerpc/boot/flatdevtree_misc.c b/arch/powerpc/boot/flatdevtree_misc.c index 04da38fa477f..4341e6558c1a 100644 --- a/arch/powerpc/boot/flatdevtree_misc.c +++ b/arch/powerpc/boot/flatdevtree_misc.c | |||
@@ -16,24 +16,43 @@ | |||
16 | 16 | ||
17 | static struct ft_cxt cxt; | 17 | static struct ft_cxt cxt; |
18 | 18 | ||
19 | static void *ft_finddevice(const char *name) | 19 | static void *fdtm_finddevice(const char *name) |
20 | { | 20 | { |
21 | return ft_find_device(&cxt, name); | 21 | return ft_find_device(&cxt, name); |
22 | } | 22 | } |
23 | 23 | ||
24 | static int ft_getprop(const void *phandle, const char *propname, void *buf, | 24 | static int fdtm_getprop(const void *phandle, const char *propname, |
25 | const int buflen) | 25 | void *buf, const int buflen) |
26 | { | 26 | { |
27 | return ft_get_prop(&cxt, phandle, propname, buf, buflen); | 27 | return ft_get_prop(&cxt, phandle, propname, buf, buflen); |
28 | } | 28 | } |
29 | 29 | ||
30 | static int ft_setprop(const void *phandle, const char *propname, | 30 | static int fdtm_setprop(const void *phandle, const char *propname, |
31 | const void *buf, const int buflen) | 31 | const void *buf, const int buflen) |
32 | { | 32 | { |
33 | return ft_set_prop(&cxt, phandle, propname, buf, buflen); | 33 | return ft_set_prop(&cxt, phandle, propname, buf, buflen); |
34 | } | 34 | } |
35 | 35 | ||
36 | static unsigned long ft_finalize(void) | 36 | static void *fdtm_get_parent(const void *phandle) |
37 | { | ||
38 | return ft_get_parent(&cxt, phandle); | ||
39 | } | ||
40 | |||
41 | static void *fdtm_create_node(const void *phandle, const char *name) | ||
42 | { | ||
43 | return ft_create_node(&cxt, phandle, name); | ||
44 | } | ||
45 | |||
46 | static void *fdtm_find_node_by_prop_value(const void *prev, | ||
47 | const char *propname, | ||
48 | const char *propval, | ||
49 | int proplen) | ||
50 | { | ||
51 | return ft_find_node_by_prop_value(&cxt, prev, propname, | ||
52 | propval, proplen); | ||
53 | } | ||
54 | |||
55 | static unsigned long fdtm_finalize(void) | ||
37 | { | 56 | { |
38 | ft_end_tree(&cxt); | 57 | ft_end_tree(&cxt); |
39 | return (unsigned long)cxt.bph; | 58 | return (unsigned long)cxt.bph; |
@@ -41,10 +60,13 @@ static unsigned long ft_finalize(void) | |||
41 | 60 | ||
42 | int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device) | 61 | int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device) |
43 | { | 62 | { |
44 | dt_ops.finddevice = ft_finddevice; | 63 | dt_ops.finddevice = fdtm_finddevice; |
45 | dt_ops.getprop = ft_getprop; | 64 | dt_ops.getprop = fdtm_getprop; |
46 | dt_ops.setprop = ft_setprop; | 65 | dt_ops.setprop = fdtm_setprop; |
47 | dt_ops.finalize = ft_finalize; | 66 | dt_ops.get_parent = fdtm_get_parent; |
67 | dt_ops.create_node = fdtm_create_node; | ||
68 | dt_ops.find_node_by_prop_value = fdtm_find_node_by_prop_value; | ||
69 | dt_ops.finalize = fdtm_finalize; | ||
48 | 70 | ||
49 | return ft_open(&cxt, dt_blob, max_size, max_find_device, | 71 | return ft_open(&cxt, dt_blob, max_size, max_find_device, |
50 | platform_ops.realloc); | 72 | platform_ops.realloc); |
diff --git a/arch/powerpc/boot/gunzip_util.c b/arch/powerpc/boot/gunzip_util.c new file mode 100644 index 000000000000..8a97adfac659 --- /dev/null +++ b/arch/powerpc/boot/gunzip_util.c | |||
@@ -0,0 +1,205 @@ | |||
1 | /* | ||
2 | * Copyright 2007 David Gibson, IBM Corporation. | ||
3 | * Based on earlier work, Copyright (C) Paul Mackerras 1997. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version | ||
8 | * 2 of the License, or (at your option) any later version. | ||
9 | */ | ||
10 | |||
11 | #include <stddef.h> | ||
12 | #include "string.h" | ||
13 | #include "stdio.h" | ||
14 | #include "ops.h" | ||
15 | #include "gunzip_util.h" | ||
16 | |||
17 | #define HEAD_CRC 2 | ||
18 | #define EXTRA_FIELD 4 | ||
19 | #define ORIG_NAME 8 | ||
20 | #define COMMENT 0x10 | ||
21 | #define RESERVED 0xe0 | ||
22 | |||
23 | /** | ||
24 | * gunzip_start - prepare to decompress gzip data | ||
25 | * @state: decompressor state structure to be initialized | ||
26 | * @src: buffer containing gzip compressed or uncompressed data | ||
27 | * @srclen: size in bytes of the buffer at src | ||
28 | * | ||
29 | * If the buffer at @src contains a gzip header, this function | ||
30 | * initializes zlib to decompress the data, storing the decompression | ||
31 | * state in @state. The other functions in this file can then be used | ||
32 | * to decompress data from the gzipped stream. | ||
33 | * | ||
34 | * If the buffer at @src does not contain a gzip header, it is assumed | ||
35 | * to contain uncompressed data. The buffer information is recorded | ||
36 | * in @state and the other functions in this file will simply copy | ||
37 | * data from the uncompressed data stream at @src. | ||
38 | * | ||
39 | * Any errors, such as bad compressed data, cause an error to be | ||
40 | * printed an the platform's exit() function to be called. | ||
41 | */ | ||
42 | void gunzip_start(struct gunzip_state *state, void *src, int srclen) | ||
43 | { | ||
44 | char *hdr = src; | ||
45 | int hdrlen = 0; | ||
46 | |||
47 | memset(state, 0, sizeof(*state)); | ||
48 | |||
49 | /* Check for gzip magic number */ | ||
50 | if ((hdr[0] == 0x1f) && (hdr[1] == 0x8b)) { | ||
51 | /* gzip data, initialize zlib parameters */ | ||
52 | int r, flags; | ||
53 | |||
54 | state->s.workspace = state->scratch; | ||
55 | if (zlib_inflate_workspacesize() > sizeof(state->scratch)) | ||
56 | fatal("insufficient scratch space for gunzip\n\r"); | ||
57 | |||
58 | /* skip header */ | ||
59 | hdrlen = 10; | ||
60 | flags = hdr[3]; | ||
61 | if (hdr[2] != Z_DEFLATED || (flags & RESERVED) != 0) | ||
62 | fatal("bad gzipped data\n\r"); | ||
63 | if ((flags & EXTRA_FIELD) != 0) | ||
64 | hdrlen = 12 + hdr[10] + (hdr[11] << 8); | ||
65 | if ((flags & ORIG_NAME) != 0) | ||
66 | while (hdr[hdrlen++] != 0) | ||
67 | ; | ||
68 | if ((flags & COMMENT) != 0) | ||
69 | while (hdr[hdrlen++] != 0) | ||
70 | ; | ||
71 | if ((flags & HEAD_CRC) != 0) | ||
72 | hdrlen += 2; | ||
73 | if (hdrlen >= srclen) | ||
74 | fatal("gunzip_start: ran out of data in header\n\r"); | ||
75 | |||
76 | r = zlib_inflateInit2(&state->s, -MAX_WBITS); | ||
77 | if (r != Z_OK) | ||
78 | fatal("inflateInit2 returned %d\n\r", r); | ||
79 | } | ||
80 | |||
81 | state->s.next_in = src + hdrlen; | ||
82 | state->s.avail_in = srclen - hdrlen; | ||
83 | } | ||
84 | |||
85 | /** | ||
86 | * gunzip_partial - extract bytes from a gzip data stream | ||
87 | * @state: gzip state structure previously initialized by gunzip_start() | ||
88 | * @dst: buffer to store extracted data | ||
89 | * @dstlen: maximum number of bytes to extract | ||
90 | * | ||
91 | * This function extracts at most @dstlen bytes from the data stream | ||
92 | * previously associated with @state by gunzip_start(), decompressing | ||
93 | * if necessary. Exactly @dstlen bytes are extracted unless the data | ||
94 | * stream doesn't contain enough bytes, in which case the entire | ||
95 | * remainder of the stream is decompressed. | ||
96 | * | ||
97 | * Returns the actual number of bytes extracted. If any errors occur, | ||
98 | * such as a corrupted compressed stream, an error is printed an the | ||
99 | * platform's exit() function is called. | ||
100 | */ | ||
101 | int gunzip_partial(struct gunzip_state *state, void *dst, int dstlen) | ||
102 | { | ||
103 | int len; | ||
104 | |||
105 | if (state->s.workspace) { | ||
106 | /* gunzipping */ | ||
107 | int r; | ||
108 | |||
109 | state->s.next_out = dst; | ||
110 | state->s.avail_out = dstlen; | ||
111 | r = zlib_inflate(&state->s, Z_FULL_FLUSH); | ||
112 | if (r != Z_OK && r != Z_STREAM_END) | ||
113 | fatal("inflate returned %d msg: %s\n\r", r, state->s.msg); | ||
114 | len = state->s.next_out - (unsigned char *)dst; | ||
115 | } else { | ||
116 | /* uncompressed image */ | ||
117 | len = min(state->s.avail_in, (unsigned)dstlen); | ||
118 | memcpy(dst, state->s.next_in, len); | ||
119 | state->s.next_in += len; | ||
120 | state->s.avail_in -= len; | ||
121 | } | ||
122 | return len; | ||
123 | } | ||
124 | |||
125 | /** | ||
126 | * gunzip_exactly - extract a fixed number of bytes from a gzip data stream | ||
127 | * @state: gzip state structure previously initialized by gunzip_start() | ||
128 | * @dst: buffer to store extracted data | ||
129 | * @dstlen: number of bytes to extract | ||
130 | * | ||
131 | * This function extracts exactly @dstlen bytes from the data stream | ||
132 | * previously associated with @state by gunzip_start(), decompressing | ||
133 | * if necessary. | ||
134 | * | ||
135 | * If there are less @dstlen bytes available in the data stream, or if | ||
136 | * any other errors occur, such as a corrupted compressed stream, an | ||
137 | * error is printed an the platform's exit() function is called. | ||
138 | */ | ||
139 | void gunzip_exactly(struct gunzip_state *state, void *dst, int dstlen) | ||
140 | { | ||
141 | int len; | ||
142 | |||
143 | len = gunzip_partial(state, dst, dstlen); | ||
144 | if (len < dstlen) | ||
145 | fatal("gunzip_block: ran out of data\n\r"); | ||
146 | } | ||
147 | |||
148 | /** | ||
149 | * gunzip_discard - discard bytes from a gzip data stream | ||
150 | * @state: gzip state structure previously initialized by gunzip_start() | ||
151 | * @len: number of bytes to discard | ||
152 | * | ||
153 | * This function extracts, then discards exactly @len bytes from the | ||
154 | * data stream previously associated with @state by gunzip_start(). | ||
155 | * Subsequent gunzip_partial(), gunzip_exactly() or gunzip_finish() | ||
156 | * calls will extract the data following the discarded bytes in the | ||
157 | * data stream. | ||
158 | * | ||
159 | * If there are less @len bytes available in the data stream, or if | ||
160 | * any other errors occur, such as a corrupted compressed stream, an | ||
161 | * error is printed an the platform's exit() function is called. | ||
162 | */ | ||
163 | void gunzip_discard(struct gunzip_state *state, int len) | ||
164 | { | ||
165 | static char discard_buf[128]; | ||
166 | |||
167 | while (len > sizeof(discard_buf)) { | ||
168 | gunzip_exactly(state, discard_buf, sizeof(discard_buf)); | ||
169 | len -= sizeof(discard_buf); | ||
170 | } | ||
171 | |||
172 | if (len > 0) | ||
173 | gunzip_exactly(state, discard_buf, len); | ||
174 | } | ||
175 | |||
176 | /** | ||
177 | * gunzip_finish - extract all remaining bytes from a gzip data stream | ||
178 | * @state: gzip state structure previously initialized by gunzip_start() | ||
179 | * @dst: buffer to store extracted data | ||
180 | * @dstlen: maximum number of bytes to extract | ||
181 | * | ||
182 | * This function extracts all remaining data, or at most @dstlen | ||
183 | * bytes, from the stream previously associated with @state by | ||
184 | * gunzip_start(). zlib is then shut down, so it is an error to use | ||
185 | * any of the functions in this file on @state until it is | ||
186 | * re-initialized with another call to gunzip_start(). | ||
187 | * | ||
188 | * If any errors occur, such as a corrupted compressed stream, an | ||
189 | * error is printed an the platform's exit() function is called. | ||
190 | */ | ||
191 | int gunzip_finish(struct gunzip_state *state, void *dst, int dstlen) | ||
192 | { | ||
193 | int len; | ||
194 | |||
195 | if (state->s.workspace) { | ||
196 | len = gunzip_partial(state, dst, dstlen); | ||
197 | zlib_inflateEnd(&state->s); | ||
198 | } else { | ||
199 | /* uncompressed image */ | ||
200 | len = min(state->s.avail_in, (unsigned)dstlen); | ||
201 | memcpy(dst, state->s.next_in, len); | ||
202 | } | ||
203 | |||
204 | return len; | ||
205 | } | ||
diff --git a/arch/powerpc/boot/gunzip_util.h b/arch/powerpc/boot/gunzip_util.h new file mode 100644 index 000000000000..b3dfa6e87b3a --- /dev/null +++ b/arch/powerpc/boot/gunzip_util.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * Decompression convenience functions | ||
3 | * | ||
4 | * Copyright 2007 David Gibson, IBM Corporation. | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | #ifndef _PPC_BOOT_GUNZIP_UTIL_H_ | ||
11 | #define _PPC_BOOT_GUNZIP_UTIL_H_ | ||
12 | |||
13 | #include "zlib.h" | ||
14 | |||
15 | /* | ||
16 | * These functions are designed to make life easy for decompressing | ||
17 | * kernel images, initrd images or any other gzip compressed image, | ||
18 | * particularly if its useful to decompress part of the image (e.g. to | ||
19 | * examine headers) before decompressing the remainder. | ||
20 | * | ||
21 | * To use: | ||
22 | * - declare a gunzip_state structure | ||
23 | * - use gunzip_start() to initialize the state, associating it | ||
24 | * with a stream of compressed data | ||
25 | * - use gunzip_partial(), gunzip_exactly() and gunzip_discard() | ||
26 | * in any combination to extract pieces of data from the stream | ||
27 | * - Finally use gunzip_finish() to extract the tail of the | ||
28 | * compressed stream and wind up zlib | ||
29 | */ | ||
30 | |||
31 | /* scratch space for gunzip; 46912 is from zlib_inflate_workspacesize() */ | ||
32 | #define GUNZIP_SCRATCH_SIZE 46912 | ||
33 | |||
34 | struct gunzip_state { | ||
35 | z_stream s; | ||
36 | char scratch[46912]; | ||
37 | }; | ||
38 | |||
39 | void gunzip_start(struct gunzip_state *state, void *src, int srclen); | ||
40 | int gunzip_partial(struct gunzip_state *state, void *dst, int dstlen); | ||
41 | void gunzip_exactly(struct gunzip_state *state, void *dst, int len); | ||
42 | void gunzip_discard(struct gunzip_state *state, int len); | ||
43 | int gunzip_finish(struct gunzip_state *state, void *dst, int len); | ||
44 | |||
45 | #endif /* _PPC_BOOT_GUNZIP_UTIL_H_ */ | ||
diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c index 6f6b50d238b6..e1df8feaf16d 100644 --- a/arch/powerpc/boot/main.c +++ b/arch/powerpc/boot/main.c | |||
@@ -14,11 +14,10 @@ | |||
14 | #include "page.h" | 14 | #include "page.h" |
15 | #include "string.h" | 15 | #include "string.h" |
16 | #include "stdio.h" | 16 | #include "stdio.h" |
17 | #include "zlib.h" | ||
18 | #include "ops.h" | 17 | #include "ops.h" |
18 | #include "gunzip_util.h" | ||
19 | #include "flatdevtree.h" | 19 | #include "flatdevtree.h" |
20 | 20 | #include "reg.h" | |
21 | extern void flush_cache(void *, unsigned long); | ||
22 | 21 | ||
23 | extern char _start[]; | 22 | extern char _start[]; |
24 | extern char __bss_start[]; | 23 | extern char __bss_start[]; |
@@ -30,84 +29,24 @@ extern char _initrd_end[]; | |||
30 | extern char _dtb_start[]; | 29 | extern char _dtb_start[]; |
31 | extern char _dtb_end[]; | 30 | extern char _dtb_end[]; |
32 | 31 | ||
32 | static struct gunzip_state gzstate; | ||
33 | |||
33 | struct addr_range { | 34 | struct addr_range { |
34 | unsigned long addr; | 35 | void *addr; |
35 | unsigned long size; | 36 | unsigned long size; |
36 | unsigned long memsize; | ||
37 | }; | 37 | }; |
38 | static struct addr_range vmlinux; | ||
39 | static struct addr_range vmlinuz; | ||
40 | static struct addr_range initrd; | ||
41 | 38 | ||
42 | static unsigned long elfoffset; | 39 | struct elf_info { |
43 | static int is_64bit; | 40 | unsigned long loadsize; |
44 | 41 | unsigned long memsize; | |
45 | /* scratch space for gunzip; 46912 is from zlib_inflate_workspacesize() */ | 42 | unsigned long elfoffset; |
46 | static char scratch[46912]; | 43 | }; |
47 | static char elfheader[256]; | ||
48 | 44 | ||
49 | typedef void (*kernel_entry_t)(unsigned long, unsigned long, void *); | 45 | typedef void (*kernel_entry_t)(unsigned long, unsigned long, void *); |
50 | 46 | ||
51 | #undef DEBUG | 47 | #undef DEBUG |
52 | 48 | ||
53 | #define HEAD_CRC 2 | 49 | static int parse_elf64(void *hdr, struct elf_info *info) |
54 | #define EXTRA_FIELD 4 | ||
55 | #define ORIG_NAME 8 | ||
56 | #define COMMENT 0x10 | ||
57 | #define RESERVED 0xe0 | ||
58 | |||
59 | static void gunzip(void *dst, int dstlen, unsigned char *src, int *lenp) | ||
60 | { | ||
61 | z_stream s; | ||
62 | int r, i, flags; | ||
63 | |||
64 | /* skip header */ | ||
65 | i = 10; | ||
66 | flags = src[3]; | ||
67 | if (src[2] != Z_DEFLATED || (flags & RESERVED) != 0) { | ||
68 | printf("bad gzipped data\n\r"); | ||
69 | exit(); | ||
70 | } | ||
71 | if ((flags & EXTRA_FIELD) != 0) | ||
72 | i = 12 + src[10] + (src[11] << 8); | ||
73 | if ((flags & ORIG_NAME) != 0) | ||
74 | while (src[i++] != 0) | ||
75 | ; | ||
76 | if ((flags & COMMENT) != 0) | ||
77 | while (src[i++] != 0) | ||
78 | ; | ||
79 | if ((flags & HEAD_CRC) != 0) | ||
80 | i += 2; | ||
81 | if (i >= *lenp) { | ||
82 | printf("gunzip: ran out of data in header\n\r"); | ||
83 | exit(); | ||
84 | } | ||
85 | |||
86 | if (zlib_inflate_workspacesize() > sizeof(scratch)) { | ||
87 | printf("gunzip needs more mem\n"); | ||
88 | exit(); | ||
89 | } | ||
90 | memset(&s, 0, sizeof(s)); | ||
91 | s.workspace = scratch; | ||
92 | r = zlib_inflateInit2(&s, -MAX_WBITS); | ||
93 | if (r != Z_OK) { | ||
94 | printf("inflateInit2 returned %d\n\r", r); | ||
95 | exit(); | ||
96 | } | ||
97 | s.next_in = src + i; | ||
98 | s.avail_in = *lenp - i; | ||
99 | s.next_out = dst; | ||
100 | s.avail_out = dstlen; | ||
101 | r = zlib_inflate(&s, Z_FULL_FLUSH); | ||
102 | if (r != Z_OK && r != Z_STREAM_END) { | ||
103 | printf("inflate returned %d msg: %s\n\r", r, s.msg); | ||
104 | exit(); | ||
105 | } | ||
106 | *lenp = s.next_out - (unsigned char *) dst; | ||
107 | zlib_inflateEnd(&s); | ||
108 | } | ||
109 | |||
110 | static int is_elf64(void *hdr) | ||
111 | { | 50 | { |
112 | Elf64_Ehdr *elf64 = hdr; | 51 | Elf64_Ehdr *elf64 = hdr; |
113 | Elf64_Phdr *elf64ph; | 52 | Elf64_Phdr *elf64ph; |
@@ -131,15 +70,14 @@ static int is_elf64(void *hdr) | |||
131 | if (i >= (unsigned int)elf64->e_phnum) | 70 | if (i >= (unsigned int)elf64->e_phnum) |
132 | return 0; | 71 | return 0; |
133 | 72 | ||
134 | elfoffset = (unsigned long)elf64ph->p_offset; | 73 | info->loadsize = (unsigned long)elf64ph->p_filesz; |
135 | vmlinux.size = (unsigned long)elf64ph->p_filesz + elfoffset; | 74 | info->memsize = (unsigned long)elf64ph->p_memsz; |
136 | vmlinux.memsize = (unsigned long)elf64ph->p_memsz + elfoffset; | 75 | info->elfoffset = (unsigned long)elf64ph->p_offset; |
137 | 76 | ||
138 | is_64bit = 1; | ||
139 | return 1; | 77 | return 1; |
140 | } | 78 | } |
141 | 79 | ||
142 | static int is_elf32(void *hdr) | 80 | static int parse_elf32(void *hdr, struct elf_info *info) |
143 | { | 81 | { |
144 | Elf32_Ehdr *elf32 = hdr; | 82 | Elf32_Ehdr *elf32 = hdr; |
145 | Elf32_Phdr *elf32ph; | 83 | Elf32_Phdr *elf32ph; |
@@ -155,7 +93,6 @@ static int is_elf32(void *hdr) | |||
155 | elf32->e_machine == EM_PPC)) | 93 | elf32->e_machine == EM_PPC)) |
156 | return 0; | 94 | return 0; |
157 | 95 | ||
158 | elf32 = (Elf32_Ehdr *)elfheader; | ||
159 | elf32ph = (Elf32_Phdr *) ((unsigned long)elf32 + elf32->e_phoff); | 96 | elf32ph = (Elf32_Phdr *) ((unsigned long)elf32 + elf32->e_phoff); |
160 | for (i = 0; i < elf32->e_phnum; i++, elf32ph++) | 97 | for (i = 0; i < elf32->e_phnum; i++, elf32ph++) |
161 | if (elf32ph->p_type == PT_LOAD) | 98 | if (elf32ph->p_type == PT_LOAD) |
@@ -163,100 +100,116 @@ static int is_elf32(void *hdr) | |||
163 | if (i >= elf32->e_phnum) | 100 | if (i >= elf32->e_phnum) |
164 | return 0; | 101 | return 0; |
165 | 102 | ||
166 | elfoffset = elf32ph->p_offset; | 103 | info->loadsize = elf32ph->p_filesz; |
167 | vmlinux.size = elf32ph->p_filesz + elf32ph->p_offset; | 104 | info->memsize = elf32ph->p_memsz; |
168 | vmlinux.memsize = elf32ph->p_memsz + elf32ph->p_offset; | 105 | info->elfoffset = elf32ph->p_offset; |
169 | return 1; | 106 | return 1; |
170 | } | 107 | } |
171 | 108 | ||
172 | static void prep_kernel(unsigned long a1, unsigned long a2) | 109 | static struct addr_range prep_kernel(void) |
173 | { | 110 | { |
111 | char elfheader[256]; | ||
112 | void *vmlinuz_addr = _vmlinux_start; | ||
113 | unsigned long vmlinuz_size = _vmlinux_end - _vmlinux_start; | ||
114 | void *addr = 0; | ||
115 | struct elf_info ei; | ||
174 | int len; | 116 | int len; |
175 | 117 | ||
176 | vmlinuz.addr = (unsigned long)_vmlinux_start; | ||
177 | vmlinuz.size = (unsigned long)(_vmlinux_end - _vmlinux_start); | ||
178 | |||
179 | /* gunzip the ELF header of the kernel */ | 118 | /* gunzip the ELF header of the kernel */ |
180 | if (*(unsigned short *)vmlinuz.addr == 0x1f8b) { | 119 | gunzip_start(&gzstate, vmlinuz_addr, vmlinuz_size); |
181 | len = vmlinuz.size; | 120 | gunzip_exactly(&gzstate, elfheader, sizeof(elfheader)); |
182 | gunzip(elfheader, sizeof(elfheader), | 121 | |
183 | (unsigned char *)vmlinuz.addr, &len); | 122 | if (!parse_elf64(elfheader, &ei) && !parse_elf32(elfheader, &ei)) |
184 | } else | 123 | fatal("Error: not a valid PPC32 or PPC64 ELF file!\n\r"); |
185 | memcpy(elfheader, (const void *)vmlinuz.addr, | 124 | |
186 | sizeof(elfheader)); | ||
187 | |||
188 | if (!is_elf64(elfheader) && !is_elf32(elfheader)) { | ||
189 | printf("Error: not a valid PPC32 or PPC64 ELF file!\n\r"); | ||
190 | exit(); | ||
191 | } | ||
192 | if (platform_ops.image_hdr) | 125 | if (platform_ops.image_hdr) |
193 | platform_ops.image_hdr(elfheader); | 126 | platform_ops.image_hdr(elfheader); |
194 | 127 | ||
195 | /* We need to alloc the memsize plus the file offset since gzip | 128 | /* We need to alloc the memsize: gzip will expand the kernel |
196 | * will expand the header (file offset), then the kernel, then | 129 | * text/data, then possible rubbish we don't care about. But |
197 | * possible rubbish we don't care about. But the kernel bss must | 130 | * the kernel bss must be claimed (it will be zero'd by the |
198 | * be claimed (it will be zero'd by the kernel itself) | 131 | * kernel itself) |
199 | */ | 132 | */ |
200 | printf("Allocating 0x%lx bytes for kernel ...\n\r", vmlinux.memsize); | 133 | printf("Allocating 0x%lx bytes for kernel ...\n\r", ei.memsize); |
201 | vmlinux.addr = (unsigned long)malloc(vmlinux.memsize); | 134 | |
202 | if (vmlinux.addr == 0) { | 135 | if (platform_ops.vmlinux_alloc) { |
203 | printf("Can't allocate memory for kernel image !\n\r"); | 136 | addr = platform_ops.vmlinux_alloc(ei.memsize); |
204 | exit(); | 137 | } else { |
138 | if ((unsigned long)_start < ei.memsize) | ||
139 | fatal("Insufficient memory for kernel at address 0!" | ||
140 | " (_start=%p)\n\r", _start); | ||
141 | } | ||
142 | |||
143 | /* Finally, gunzip the kernel */ | ||
144 | printf("gunzipping (0x%p <- 0x%p:0x%p)...", addr, | ||
145 | vmlinuz_addr, vmlinuz_addr+vmlinuz_size); | ||
146 | /* discard up to the actual load data */ | ||
147 | gunzip_discard(&gzstate, ei.elfoffset - sizeof(elfheader)); | ||
148 | len = gunzip_finish(&gzstate, addr, ei.memsize); | ||
149 | printf("done 0x%x bytes\n\r", len); | ||
150 | |||
151 | flush_cache(addr, ei.loadsize); | ||
152 | |||
153 | return (struct addr_range){addr, ei.memsize}; | ||
154 | } | ||
155 | |||
156 | static struct addr_range prep_initrd(struct addr_range vmlinux, | ||
157 | unsigned long initrd_addr, | ||
158 | unsigned long initrd_size) | ||
159 | { | ||
160 | void *devp; | ||
161 | u32 initrd_start, initrd_end; | ||
162 | |||
163 | /* If we have an image attached to us, it overrides anything | ||
164 | * supplied by the loader. */ | ||
165 | if (_initrd_end > _initrd_start) { | ||
166 | printf("Attached initrd image at 0x%p-0x%p\n\r", | ||
167 | _initrd_start, _initrd_end); | ||
168 | initrd_addr = (unsigned long)_initrd_start; | ||
169 | initrd_size = _initrd_end - _initrd_start; | ||
170 | } else if (initrd_size > 0) { | ||
171 | printf("Using loader supplied ramdisk at 0x%lx-0x%lx\n\r", | ||
172 | initrd_addr, initrd_addr + initrd_size); | ||
205 | } | 173 | } |
206 | 174 | ||
175 | /* If there's no initrd at all, we're done */ | ||
176 | if (! initrd_size) | ||
177 | return (struct addr_range){0, 0}; | ||
178 | |||
207 | /* | 179 | /* |
208 | * Now find the initrd | 180 | * If the initrd is too low it will be clobbered when the |
209 | * | 181 | * kernel relocates to its final location. In this case, |
210 | * First see if we have an image attached to us. If so | 182 | * allocate a safer place and move it. |
211 | * allocate memory for it and copy it there. | ||
212 | */ | 183 | */ |
213 | initrd.size = (unsigned long)(_initrd_end - _initrd_start); | 184 | if (initrd_addr < vmlinux.size) { |
214 | initrd.memsize = initrd.size; | 185 | void *old_addr = (void *)initrd_addr; |
215 | if (initrd.size > 0) { | 186 | |
216 | printf("Allocating 0x%lx bytes for initrd ...\n\r", | 187 | printf("Allocating 0x%lx bytes for initrd ...\n\r", |
217 | initrd.size); | 188 | initrd_size); |
218 | initrd.addr = (unsigned long)malloc((u32)initrd.size); | 189 | initrd_addr = (unsigned long)malloc(initrd_size); |
219 | if (initrd.addr == 0) { | 190 | if (! initrd_addr) |
220 | printf("Can't allocate memory for initial " | 191 | fatal("Can't allocate memory for initial " |
221 | "ramdisk !\n\r"); | 192 | "ramdisk !\n\r"); |
222 | exit(); | 193 | printf("Relocating initrd 0x%lx <- 0x%p (0x%lx bytes)\n\r", |
223 | } | 194 | initrd_addr, old_addr, initrd_size); |
224 | printf("initial ramdisk moving 0x%lx <- 0x%lx " | 195 | memmove((void *)initrd_addr, old_addr, initrd_size); |
225 | "(0x%lx bytes)\n\r", initrd.addr, | ||
226 | (unsigned long)_initrd_start, initrd.size); | ||
227 | memmove((void *)initrd.addr, (void *)_initrd_start, | ||
228 | initrd.size); | ||
229 | printf("initrd head: 0x%lx\n\r", | ||
230 | *((unsigned long *)initrd.addr)); | ||
231 | } else if (a2 != 0) { | ||
232 | /* Otherwise, see if yaboot or another loader gave us an initrd */ | ||
233 | initrd.addr = a1; | ||
234 | initrd.memsize = initrd.size = a2; | ||
235 | printf("Using loader supplied initrd at 0x%lx (0x%lx bytes)\n\r", | ||
236 | initrd.addr, initrd.size); | ||
237 | } | 196 | } |
238 | 197 | ||
239 | /* Eventually gunzip the kernel */ | 198 | printf("initrd head: 0x%lx\n\r", *((unsigned long *)initrd_addr)); |
240 | if (*(unsigned short *)vmlinuz.addr == 0x1f8b) { | 199 | |
241 | printf("gunzipping (0x%lx <- 0x%lx:0x%0lx)...", | 200 | /* Tell the kernel initrd address via device tree */ |
242 | vmlinux.addr, vmlinuz.addr, vmlinuz.addr+vmlinuz.size); | 201 | devp = finddevice("/chosen"); |
243 | len = vmlinuz.size; | 202 | if (! devp) |
244 | gunzip((void *)vmlinux.addr, vmlinux.memsize, | 203 | fatal("Device tree has no chosen node!\n\r"); |
245 | (unsigned char *)vmlinuz.addr, &len); | 204 | |
246 | printf("done 0x%lx bytes\n\r", len); | 205 | initrd_start = (u32)initrd_addr; |
247 | } else { | 206 | initrd_end = (u32)initrd_addr + initrd_size; |
248 | memmove((void *)vmlinux.addr,(void *)vmlinuz.addr, | ||
249 | vmlinuz.size); | ||
250 | } | ||
251 | 207 | ||
252 | /* Skip over the ELF header */ | 208 | setprop(devp, "linux,initrd-start", &initrd_start, |
253 | #ifdef DEBUG | 209 | sizeof(initrd_start)); |
254 | printf("... skipping 0x%lx bytes of ELF header\n\r", | 210 | setprop(devp, "linux,initrd-end", &initrd_end, sizeof(initrd_end)); |
255 | elfoffset); | ||
256 | #endif | ||
257 | vmlinux.addr += elfoffset; | ||
258 | 211 | ||
259 | flush_cache((void *)vmlinux.addr, vmlinux.size); | 212 | return (struct addr_range){(void *)initrd_addr, initrd_size}; |
260 | } | 213 | } |
261 | 214 | ||
262 | /* A buffer that may be edited by tools operating on a zImage binary so as to | 215 | /* A buffer that may be edited by tools operating on a zImage binary so as to |
@@ -293,29 +246,26 @@ static void set_cmdline(char *buf) | |||
293 | struct platform_ops platform_ops; | 246 | struct platform_ops platform_ops; |
294 | struct dt_ops dt_ops; | 247 | struct dt_ops dt_ops; |
295 | struct console_ops console_ops; | 248 | struct console_ops console_ops; |
249 | struct loader_info loader_info; | ||
296 | 250 | ||
297 | void start(unsigned long a1, unsigned long a2, void *promptr, void *sp) | 251 | void start(void) |
298 | { | 252 | { |
253 | struct addr_range vmlinux, initrd; | ||
299 | kernel_entry_t kentry; | 254 | kernel_entry_t kentry; |
300 | char cmdline[COMMAND_LINE_SIZE]; | 255 | char cmdline[COMMAND_LINE_SIZE]; |
301 | unsigned long ft_addr = 0; | 256 | unsigned long ft_addr = 0; |
302 | 257 | ||
303 | memset(__bss_start, 0, _end - __bss_start); | ||
304 | memset(&platform_ops, 0, sizeof(platform_ops)); | ||
305 | memset(&dt_ops, 0, sizeof(dt_ops)); | ||
306 | memset(&console_ops, 0, sizeof(console_ops)); | ||
307 | |||
308 | if (platform_init(promptr, _dtb_start, _dtb_end)) | ||
309 | exit(); | ||
310 | if (console_ops.open && (console_ops.open() < 0)) | 258 | if (console_ops.open && (console_ops.open() < 0)) |
311 | exit(); | 259 | exit(); |
312 | if (platform_ops.fixups) | 260 | if (platform_ops.fixups) |
313 | platform_ops.fixups(); | 261 | platform_ops.fixups(); |
314 | 262 | ||
315 | printf("\n\rzImage starting: loaded at 0x%p (sp: 0x%p)\n\r", | 263 | printf("\n\rzImage starting: loaded at 0x%p (sp: 0x%p)\n\r", |
316 | _start, sp); | 264 | _start, get_sp()); |
317 | 265 | ||
318 | prep_kernel(a1, a2); | 266 | vmlinux = prep_kernel(); |
267 | initrd = prep_initrd(vmlinux, loader_info.initrd_addr, | ||
268 | loader_info.initrd_size); | ||
319 | 269 | ||
320 | /* If cmdline came from zimage wrapper or if we can edit the one | 270 | /* If cmdline came from zimage wrapper or if we can edit the one |
321 | * in the dt, print it out and edit it, if possible. | 271 | * in the dt, print it out and edit it, if possible. |
@@ -335,7 +285,7 @@ void start(unsigned long a1, unsigned long a2, void *promptr, void *sp) | |||
335 | if (ft_addr) | 285 | if (ft_addr) |
336 | printf(" flat tree at 0x%lx\n\r", ft_addr); | 286 | printf(" flat tree at 0x%lx\n\r", ft_addr); |
337 | else | 287 | else |
338 | printf(" using OF tree (promptr=%p)\n\r", promptr); | 288 | printf(" using OF tree (promptr=%p)\n\r", loader_info.promptr); |
339 | 289 | ||
340 | if (console_ops.close) | 290 | if (console_ops.close) |
341 | console_ops.close(); | 291 | console_ops.close(); |
@@ -344,10 +294,9 @@ void start(unsigned long a1, unsigned long a2, void *promptr, void *sp) | |||
344 | if (ft_addr) | 294 | if (ft_addr) |
345 | kentry(ft_addr, 0, NULL); | 295 | kentry(ft_addr, 0, NULL); |
346 | else | 296 | else |
347 | /* XXX initrd addr/size should be passed in properties */ | 297 | kentry((unsigned long)initrd.addr, initrd.size, |
348 | kentry(initrd.addr, initrd.size, promptr); | 298 | loader_info.promptr); |
349 | 299 | ||
350 | /* console closed so printf below may not work */ | 300 | /* console closed so printf in fatal below may not work */ |
351 | printf("Error: Linux kernel returned to zImage boot wrapper!\n\r"); | 301 | fatal("Error: Linux kernel returned to zImage boot wrapper!\n\r"); |
352 | exit(); | ||
353 | } | 302 | } |
diff --git a/arch/powerpc/boot/of.c b/arch/powerpc/boot/of.c index 0182f384f3e6..2cec5c17fb60 100644 --- a/arch/powerpc/boot/of.c +++ b/arch/powerpc/boot/of.c | |||
@@ -208,6 +208,16 @@ static void of_image_hdr(const void *hdr) | |||
208 | } | 208 | } |
209 | } | 209 | } |
210 | 210 | ||
211 | static void *of_vmlinux_alloc(unsigned long size) | ||
212 | { | ||
213 | void *p = malloc(size); | ||
214 | |||
215 | if (!p) | ||
216 | fatal("Can't allocate memory for kernel image!\n\r"); | ||
217 | |||
218 | return p; | ||
219 | } | ||
220 | |||
211 | static void of_exit(void) | 221 | static void of_exit(void) |
212 | { | 222 | { |
213 | call_prom("exit", 0, 0); | 223 | call_prom("exit", 0, 0); |
@@ -256,11 +266,12 @@ static void of_console_write(char *buf, int len) | |||
256 | call_prom("write", 3, 1, of_stdout_handle, buf, len); | 266 | call_prom("write", 3, 1, of_stdout_handle, buf, len); |
257 | } | 267 | } |
258 | 268 | ||
259 | int platform_init(void *promptr, char *dt_blob_start, char *dt_blob_end) | 269 | void platform_init(unsigned long a1, unsigned long a2, void *promptr) |
260 | { | 270 | { |
261 | platform_ops.image_hdr = of_image_hdr; | 271 | platform_ops.image_hdr = of_image_hdr; |
262 | platform_ops.malloc = of_try_claim; | 272 | platform_ops.malloc = of_try_claim; |
263 | platform_ops.exit = of_exit; | 273 | platform_ops.exit = of_exit; |
274 | platform_ops.vmlinux_alloc = of_vmlinux_alloc; | ||
264 | 275 | ||
265 | dt_ops.finddevice = of_finddevice; | 276 | dt_ops.finddevice = of_finddevice; |
266 | dt_ops.getprop = of_getprop; | 277 | dt_ops.getprop = of_getprop; |
@@ -270,5 +281,7 @@ int platform_init(void *promptr, char *dt_blob_start, char *dt_blob_end) | |||
270 | console_ops.write = of_console_write; | 281 | console_ops.write = of_console_write; |
271 | 282 | ||
272 | prom = (int (*)(void *))promptr; | 283 | prom = (int (*)(void *))promptr; |
273 | return 0; | 284 | loader_info.promptr = promptr; |
285 | loader_info.initrd_addr = a1; | ||
286 | loader_info.initrd_size = a2; | ||
274 | } | 287 | } |
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h index 8abb6516bb7c..592dc6c20bdb 100644 --- a/arch/powerpc/boot/ops.h +++ b/arch/powerpc/boot/ops.h | |||
@@ -11,7 +11,9 @@ | |||
11 | #ifndef _PPC_BOOT_OPS_H_ | 11 | #ifndef _PPC_BOOT_OPS_H_ |
12 | #define _PPC_BOOT_OPS_H_ | 12 | #define _PPC_BOOT_OPS_H_ |
13 | 13 | ||
14 | #include <stddef.h> | ||
14 | #include "types.h" | 15 | #include "types.h" |
16 | #include "string.h" | ||
15 | 17 | ||
16 | #define COMMAND_LINE_SIZE 512 | 18 | #define COMMAND_LINE_SIZE 512 |
17 | #define MAX_PATH_LEN 256 | 19 | #define MAX_PATH_LEN 256 |
@@ -25,6 +27,7 @@ struct platform_ops { | |||
25 | void (*free)(void *ptr); | 27 | void (*free)(void *ptr); |
26 | void * (*realloc)(void *ptr, unsigned long size); | 28 | void * (*realloc)(void *ptr, unsigned long size); |
27 | void (*exit)(void); | 29 | void (*exit)(void); |
30 | void * (*vmlinux_alloc)(unsigned long size); | ||
28 | }; | 31 | }; |
29 | extern struct platform_ops platform_ops; | 32 | extern struct platform_ops platform_ops; |
30 | 33 | ||
@@ -35,6 +38,12 @@ struct dt_ops { | |||
35 | const int buflen); | 38 | const int buflen); |
36 | int (*setprop)(const void *phandle, const char *name, | 39 | int (*setprop)(const void *phandle, const char *name, |
37 | const void *buf, const int buflen); | 40 | const void *buf, const int buflen); |
41 | void *(*get_parent)(const void *phandle); | ||
42 | /* The node must not already exist. */ | ||
43 | void *(*create_node)(const void *parent, const char *name); | ||
44 | void *(*find_node_by_prop_value)(const void *prev, | ||
45 | const char *propname, | ||
46 | const char *propval, int proplen); | ||
38 | unsigned long (*finalize)(void); | 47 | unsigned long (*finalize)(void); |
39 | }; | 48 | }; |
40 | extern struct dt_ops dt_ops; | 49 | extern struct dt_ops dt_ops; |
@@ -58,13 +67,19 @@ struct serial_console_data { | |||
58 | void (*close)(void); | 67 | void (*close)(void); |
59 | }; | 68 | }; |
60 | 69 | ||
61 | int platform_init(void *promptr, char *dt_blob_start, char *dt_blob_end); | 70 | struct loader_info { |
71 | void *promptr; | ||
72 | unsigned long initrd_addr, initrd_size; | ||
73 | }; | ||
74 | extern struct loader_info loader_info; | ||
75 | |||
76 | void start(void); | ||
62 | int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device); | 77 | int ft_init(void *dt_blob, unsigned int max_size, unsigned int max_find_device); |
63 | int serial_console_init(void); | 78 | int serial_console_init(void); |
64 | int ns16550_console_init(void *devp, struct serial_console_data *scdp); | 79 | int ns16550_console_init(void *devp, struct serial_console_data *scdp); |
65 | void *simple_alloc_init(char *base, u32 heap_size, u32 granularity, | 80 | void *simple_alloc_init(char *base, u32 heap_size, u32 granularity, |
66 | u32 max_allocs); | 81 | u32 max_allocs); |
67 | 82 | extern void flush_cache(void *, unsigned long); | |
68 | 83 | ||
69 | static inline void *finddevice(const char *name) | 84 | static inline void *finddevice(const char *name) |
70 | { | 85 | { |
@@ -76,11 +91,56 @@ static inline int getprop(void *devp, const char *name, void *buf, int buflen) | |||
76 | return (dt_ops.getprop) ? dt_ops.getprop(devp, name, buf, buflen) : -1; | 91 | return (dt_ops.getprop) ? dt_ops.getprop(devp, name, buf, buflen) : -1; |
77 | } | 92 | } |
78 | 93 | ||
79 | static inline int setprop(void *devp, const char *name, void *buf, int buflen) | 94 | static inline int setprop(void *devp, const char *name, |
95 | const void *buf, int buflen) | ||
80 | { | 96 | { |
81 | return (dt_ops.setprop) ? dt_ops.setprop(devp, name, buf, buflen) : -1; | 97 | return (dt_ops.setprop) ? dt_ops.setprop(devp, name, buf, buflen) : -1; |
82 | } | 98 | } |
83 | 99 | ||
100 | static inline int setprop_str(void *devp, const char *name, const char *buf) | ||
101 | { | ||
102 | if (dt_ops.setprop) | ||
103 | return dt_ops.setprop(devp, name, buf, strlen(buf) + 1); | ||
104 | |||
105 | return -1; | ||
106 | } | ||
107 | |||
108 | static inline void *get_parent(const char *devp) | ||
109 | { | ||
110 | return dt_ops.get_parent ? dt_ops.get_parent(devp) : NULL; | ||
111 | } | ||
112 | |||
113 | static inline void *create_node(const void *parent, const char *name) | ||
114 | { | ||
115 | return dt_ops.create_node ? dt_ops.create_node(parent, name) : NULL; | ||
116 | } | ||
117 | |||
118 | |||
119 | static inline void *find_node_by_prop_value(const void *prev, | ||
120 | const char *propname, | ||
121 | const char *propval, int proplen) | ||
122 | { | ||
123 | if (dt_ops.find_node_by_prop_value) | ||
124 | return dt_ops.find_node_by_prop_value(prev, propname, | ||
125 | propval, proplen); | ||
126 | |||
127 | return NULL; | ||
128 | } | ||
129 | |||
130 | static inline void *find_node_by_prop_value_str(const void *prev, | ||
131 | const char *propname, | ||
132 | const char *propval) | ||
133 | { | ||
134 | return find_node_by_prop_value(prev, propname, propval, | ||
135 | strlen(propval) + 1); | ||
136 | } | ||
137 | |||
138 | static inline void *find_node_by_devtype(const void *prev, | ||
139 | const char *type) | ||
140 | { | ||
141 | return find_node_by_prop_value_str(prev, "device_type", type); | ||
142 | } | ||
143 | |||
84 | static inline void *malloc(u32 size) | 144 | static inline void *malloc(u32 size) |
85 | { | 145 | { |
86 | return (platform_ops.malloc) ? platform_ops.malloc(size) : NULL; | 146 | return (platform_ops.malloc) ? platform_ops.malloc(size) : NULL; |
@@ -98,5 +158,11 @@ static inline void exit(void) | |||
98 | platform_ops.exit(); | 158 | platform_ops.exit(); |
99 | for(;;); | 159 | for(;;); |
100 | } | 160 | } |
161 | #define fatal(args...) { printf(args); exit(); } | ||
162 | |||
163 | |||
164 | #define BSS_STACK(size) \ | ||
165 | static char _bss_stack[size]; \ | ||
166 | void *_platform_stack_top = _bss_stack + sizeof(_bss_stack); | ||
101 | 167 | ||
102 | #endif /* _PPC_BOOT_OPS_H_ */ | 168 | #endif /* _PPC_BOOT_OPS_H_ */ |
diff --git a/arch/powerpc/boot/reg.h b/arch/powerpc/boot/reg.h new file mode 100644 index 000000000000..d3cd9ee98afb --- /dev/null +++ b/arch/powerpc/boot/reg.h | |||
@@ -0,0 +1,22 @@ | |||
1 | #ifndef _PPC_BOOT_REG_H | ||
2 | #define _PPC_BOOT_REG_H | ||
3 | /* | ||
4 | * Copyright 2007 Davud Gibson, IBM Corporation. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | static inline u32 mfpvr(void) | ||
13 | { | ||
14 | u32 pvr; | ||
15 | asm volatile ("mfpvr %0" : "=r"(pvr)); | ||
16 | return pvr; | ||
17 | } | ||
18 | |||
19 | register void *__stack_pointer asm("r1"); | ||
20 | #define get_sp() (__stack_pointer) | ||
21 | |||
22 | #endif /* _PPC_BOOT_REG_H */ | ||
diff --git a/arch/powerpc/boot/stdio.h b/arch/powerpc/boot/stdio.h index 73b8a91bfb34..adffc58412d4 100644 --- a/arch/powerpc/boot/stdio.h +++ b/arch/powerpc/boot/stdio.h | |||
@@ -7,11 +7,12 @@ | |||
7 | #define EINVAL 22 /* Invalid argument */ | 7 | #define EINVAL 22 /* Invalid argument */ |
8 | #define ENOSPC 28 /* No space left on device */ | 8 | #define ENOSPC 28 /* No space left on device */ |
9 | 9 | ||
10 | extern int printf(const char *fmt, ...); | 10 | extern int printf(const char *fmt, ...) __attribute__((format(printf, 1, 2))); |
11 | 11 | ||
12 | #define fprintf(fmt, args...) printf(args) | 12 | #define fprintf(fmt, args...) printf(args) |
13 | 13 | ||
14 | extern int sprintf(char *buf, const char *fmt, ...); | 14 | extern int sprintf(char *buf, const char *fmt, ...) |
15 | __attribute__((format(printf, 2, 3))); | ||
15 | 16 | ||
16 | extern int vsprintf(char *buf, const char *fmt, va_list args); | 17 | extern int vsprintf(char *buf, const char *fmt, va_list args); |
17 | 18 | ||
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index 024e4d425c59..f9238f53c1f3 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper | |||
@@ -29,6 +29,7 @@ initrd= | |||
29 | dtb= | 29 | dtb= |
30 | dts= | 30 | dts= |
31 | cacheit= | 31 | cacheit= |
32 | gzip=.gz | ||
32 | 33 | ||
33 | # cross-compilation prefix | 34 | # cross-compilation prefix |
34 | CROSS= | 35 | CROSS= |
@@ -42,7 +43,7 @@ tmpdir=. | |||
42 | usage() { | 43 | usage() { |
43 | echo 'Usage: wrapper [-o output] [-p platform] [-i initrd]' >&2 | 44 | echo 'Usage: wrapper [-o output] [-p platform] [-i initrd]' >&2 |
44 | echo ' [-d devtree] [-s tree.dts] [-c] [-C cross-prefix]' >&2 | 45 | echo ' [-d devtree] [-s tree.dts] [-c] [-C cross-prefix]' >&2 |
45 | echo ' [-D datadir] [-W workingdir] [vmlinux]' >&2 | 46 | echo ' [-D datadir] [-W workingdir] [--no-gzip] [vmlinux]' >&2 |
46 | exit 1 | 47 | exit 1 |
47 | } | 48 | } |
48 | 49 | ||
@@ -91,6 +92,9 @@ while [ "$#" -gt 0 ]; do | |||
91 | [ "$#" -gt 0 ] || usage | 92 | [ "$#" -gt 0 ] || usage |
92 | tmpdir="$1" | 93 | tmpdir="$1" |
93 | ;; | 94 | ;; |
95 | --no-gzip) | ||
96 | gzip= | ||
97 | ;; | ||
94 | -?) | 98 | -?) |
95 | usage | 99 | usage |
96 | ;; | 100 | ;; |
@@ -142,14 +146,20 @@ esac | |||
142 | vmz="$tmpdir/`basename \"$kernel\"`.$ext" | 146 | vmz="$tmpdir/`basename \"$kernel\"`.$ext" |
143 | if [ -z "$cacheit" -o ! -f "$vmz.gz" -o "$vmz.gz" -ot "$kernel" ]; then | 147 | if [ -z "$cacheit" -o ! -f "$vmz.gz" -o "$vmz.gz" -ot "$kernel" ]; then |
144 | ${CROSS}objcopy $objflags "$kernel" "$vmz.$$" | 148 | ${CROSS}objcopy $objflags "$kernel" "$vmz.$$" |
145 | gzip -f -9 "$vmz.$$" | 149 | |
150 | if [ -n "$gzip" ]; then | ||
151 | gzip -f -9 "$vmz.$$" | ||
152 | fi | ||
153 | |||
146 | if [ -n "$cacheit" ]; then | 154 | if [ -n "$cacheit" ]; then |
147 | mv -f "$vmz.$$.gz" "$vmz.gz" | 155 | mv -f "$vmz.$$$gzip" "$vmz$gzip" |
148 | else | 156 | else |
149 | vmz="$vmz.$$" | 157 | vmz="$vmz.$$" |
150 | fi | 158 | fi |
151 | fi | 159 | fi |
152 | 160 | ||
161 | vmz="$vmz$gzip" | ||
162 | |||
153 | case "$platform" in | 163 | case "$platform" in |
154 | uboot) | 164 | uboot) |
155 | rm -f "$ofile" | 165 | rm -f "$ofile" |
@@ -159,9 +169,9 @@ uboot) | |||
159 | version="-n Linux-$version" | 169 | version="-n Linux-$version" |
160 | fi | 170 | fi |
161 | mkimage -A ppc -O linux -T kernel -C gzip -a 00000000 -e 00000000 \ | 171 | mkimage -A ppc -O linux -T kernel -C gzip -a 00000000 -e 00000000 \ |
162 | $version -d "$vmz.gz" "$ofile" | 172 | $version -d "$vmz" "$ofile" |
163 | if [ -z "$cacheit" ]; then | 173 | if [ -z "$cacheit" ]; then |
164 | rm -f $vmz.gz | 174 | rm -f "$vmz" |
165 | fi | 175 | fi |
166 | exit 0 | 176 | exit 0 |
167 | ;; | 177 | ;; |
@@ -173,9 +183,9 @@ addsec() { | |||
173 | --set-section-flags=$3=contents,alloc,load,readonly,data | 183 | --set-section-flags=$3=contents,alloc,load,readonly,data |
174 | } | 184 | } |
175 | 185 | ||
176 | addsec $tmp "$vmz.gz" $ksection $object/empty.o | 186 | addsec $tmp "$vmz" $ksection $object/empty.o |
177 | if [ -z "$cacheit" ]; then | 187 | if [ -z "$cacheit" ]; then |
178 | rm -f "$vmz.gz" | 188 | rm -f "$vmz" |
179 | fi | 189 | fi |
180 | 190 | ||
181 | if [ -n "$initrd" ]; then | 191 | if [ -n "$initrd" ]; then |
@@ -191,7 +201,7 @@ fi | |||
191 | 201 | ||
192 | if [ "$platform" != "miboot" ]; then | 202 | if [ "$platform" != "miboot" ]; then |
193 | ${CROSS}ld -m elf32ppc -T $lds -o "$ofile" \ | 203 | ${CROSS}ld -m elf32ppc -T $lds -o "$ofile" \ |
194 | $object/crt0.o $platformo $tmp $object/wrapper.a | 204 | $platformo $tmp $object/wrapper.a |
195 | rm $tmp | 205 | rm $tmp |
196 | fi | 206 | fi |
197 | 207 | ||
@@ -201,7 +211,9 @@ pseries|chrp) | |||
201 | $object/addnote "$ofile" | 211 | $object/addnote "$ofile" |
202 | ;; | 212 | ;; |
203 | pmaccoff) | 213 | pmaccoff) |
204 | ${CROSS}objcopy -O aixcoff-rs6000 --set-start 0x500000 "$ofile" | 214 | entry=`objdump -f "$ofile" | grep '^start address ' | \ |
215 | cut -d' ' -f3` | ||
216 | ${CROSS}objcopy -O aixcoff-rs6000 --set-start "$entry" "$ofile" | ||
205 | $object/hack-coff "$ofile" | 217 | $object/hack-coff "$ofile" |
206 | ;; | 218 | ;; |
207 | esac | 219 | esac |
diff --git a/arch/powerpc/boot/zImage.coff.lds.S b/arch/powerpc/boot/zImage.coff.lds.S index a360905e5428..fe87a90ce7f1 100644 --- a/arch/powerpc/boot/zImage.coff.lds.S +++ b/arch/powerpc/boot/zImage.coff.lds.S | |||
@@ -1,5 +1,6 @@ | |||
1 | OUTPUT_ARCH(powerpc:common) | 1 | OUTPUT_ARCH(powerpc:common) |
2 | ENTRY(_start) | 2 | ENTRY(_zimage_start_opd) |
3 | EXTERN(_zimage_start_opd) | ||
3 | SECTIONS | 4 | SECTIONS |
4 | { | 5 | { |
5 | . = (5*1024*1024); | 6 | . = (5*1024*1024); |
diff --git a/arch/powerpc/boot/zImage.lds.S b/arch/powerpc/boot/zImage.lds.S index 4be3c6414b04..f6e380fdb388 100644 --- a/arch/powerpc/boot/zImage.lds.S +++ b/arch/powerpc/boot/zImage.lds.S | |||
@@ -1,5 +1,6 @@ | |||
1 | OUTPUT_ARCH(powerpc:common) | 1 | OUTPUT_ARCH(powerpc:common) |
2 | ENTRY(_zimage_start) | 2 | ENTRY(_zimage_start) |
3 | EXTERN(_zimage_start) | ||
3 | SECTIONS | 4 | SECTIONS |
4 | { | 5 | { |
5 | . = (4*1024*1024); | 6 | . = (4*1024*1024); |
diff --git a/arch/powerpc/configs/mpc832x_rdb_defconfig b/arch/powerpc/configs/mpc832x_rdb_defconfig new file mode 100644 index 000000000000..56fc0a824458 --- /dev/null +++ b/arch/powerpc/configs/mpc832x_rdb_defconfig | |||
@@ -0,0 +1,1292 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.21-rc3 | ||
4 | # Mon Mar 12 17:32:19 2007 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | CONFIG_PPC32=y | ||
8 | CONFIG_PPC_MERGE=y | ||
9 | CONFIG_MMU=y | ||
10 | CONFIG_GENERIC_HARDIRQS=y | ||
11 | CONFIG_IRQ_PER_CPU=y | ||
12 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
13 | CONFIG_ARCH_HAS_ILOG2_U32=y | ||
14 | CONFIG_GENERIC_HWEIGHT=y | ||
15 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
16 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
17 | CONFIG_PPC=y | ||
18 | CONFIG_EARLY_PRINTK=y | ||
19 | CONFIG_GENERIC_NVRAM=y | ||
20 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
21 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
22 | CONFIG_PPC_OF=y | ||
23 | CONFIG_PPC_UDBG_16550=y | ||
24 | # CONFIG_GENERIC_TBSYNC is not set | ||
25 | CONFIG_AUDIT_ARCH=y | ||
26 | CONFIG_GENERIC_BUG=y | ||
27 | CONFIG_DEFAULT_UIMAGE=y | ||
28 | |||
29 | # | ||
30 | # Processor support | ||
31 | # | ||
32 | # CONFIG_CLASSIC32 is not set | ||
33 | # CONFIG_PPC_82xx is not set | ||
34 | CONFIG_PPC_83xx=y | ||
35 | # CONFIG_PPC_85xx is not set | ||
36 | # CONFIG_PPC_86xx is not set | ||
37 | # CONFIG_PPC_8xx is not set | ||
38 | # CONFIG_40x is not set | ||
39 | # CONFIG_44x is not set | ||
40 | # CONFIG_E200 is not set | ||
41 | CONFIG_6xx=y | ||
42 | CONFIG_83xx=y | ||
43 | CONFIG_PPC_FPU=y | ||
44 | # CONFIG_PPC_DCR_NATIVE is not set | ||
45 | # CONFIG_PPC_DCR_MMIO is not set | ||
46 | CONFIG_PPC_STD_MMU=y | ||
47 | CONFIG_PPC_STD_MMU_32=y | ||
48 | # CONFIG_SMP is not set | ||
49 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
50 | |||
51 | # | ||
52 | # Code maturity level options | ||
53 | # | ||
54 | CONFIG_EXPERIMENTAL=y | ||
55 | CONFIG_BROKEN_ON_SMP=y | ||
56 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
57 | |||
58 | # | ||
59 | # General setup | ||
60 | # | ||
61 | CONFIG_LOCALVERSION="" | ||
62 | CONFIG_LOCALVERSION_AUTO=y | ||
63 | CONFIG_SWAP=y | ||
64 | CONFIG_SYSVIPC=y | ||
65 | # CONFIG_IPC_NS is not set | ||
66 | CONFIG_SYSVIPC_SYSCTL=y | ||
67 | # CONFIG_POSIX_MQUEUE is not set | ||
68 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
69 | # CONFIG_TASKSTATS is not set | ||
70 | # CONFIG_UTS_NS is not set | ||
71 | # CONFIG_AUDIT is not set | ||
72 | # CONFIG_IKCONFIG is not set | ||
73 | CONFIG_SYSFS_DEPRECATED=y | ||
74 | # CONFIG_RELAY is not set | ||
75 | CONFIG_BLK_DEV_INITRD=y | ||
76 | CONFIG_INITRAMFS_SOURCE="" | ||
77 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
78 | CONFIG_SYSCTL=y | ||
79 | CONFIG_EMBEDDED=y | ||
80 | CONFIG_SYSCTL_SYSCALL=y | ||
81 | # CONFIG_KALLSYMS is not set | ||
82 | CONFIG_HOTPLUG=y | ||
83 | CONFIG_PRINTK=y | ||
84 | CONFIG_BUG=y | ||
85 | CONFIG_ELF_CORE=y | ||
86 | CONFIG_BASE_FULL=y | ||
87 | CONFIG_FUTEX=y | ||
88 | # CONFIG_EPOLL is not set | ||
89 | CONFIG_SHMEM=y | ||
90 | CONFIG_SLAB=y | ||
91 | CONFIG_VM_EVENT_COUNTERS=y | ||
92 | CONFIG_RT_MUTEXES=y | ||
93 | # CONFIG_TINY_SHMEM is not set | ||
94 | CONFIG_BASE_SMALL=0 | ||
95 | # CONFIG_SLOB is not set | ||
96 | |||
97 | # | ||
98 | # Loadable module support | ||
99 | # | ||
100 | CONFIG_MODULES=y | ||
101 | CONFIG_MODULE_UNLOAD=y | ||
102 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
103 | # CONFIG_MODVERSIONS is not set | ||
104 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
105 | # CONFIG_KMOD is not set | ||
106 | |||
107 | # | ||
108 | # Block layer | ||
109 | # | ||
110 | CONFIG_BLOCK=y | ||
111 | # CONFIG_LBD is not set | ||
112 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
113 | # CONFIG_LSF is not set | ||
114 | |||
115 | # | ||
116 | # IO Schedulers | ||
117 | # | ||
118 | CONFIG_IOSCHED_NOOP=y | ||
119 | CONFIG_IOSCHED_AS=y | ||
120 | CONFIG_IOSCHED_DEADLINE=y | ||
121 | CONFIG_IOSCHED_CFQ=y | ||
122 | CONFIG_DEFAULT_AS=y | ||
123 | # CONFIG_DEFAULT_DEADLINE is not set | ||
124 | # CONFIG_DEFAULT_CFQ is not set | ||
125 | # CONFIG_DEFAULT_NOOP is not set | ||
126 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
127 | CONFIG_QUICC_ENGINE=y | ||
128 | CONFIG_PPC_GEN550=y | ||
129 | # CONFIG_WANT_EARLY_SERIAL is not set | ||
130 | |||
131 | # | ||
132 | # Platform support | ||
133 | # | ||
134 | # CONFIG_MPC8313_RDB is not set | ||
135 | # CONFIG_MPC832x_MDS is not set | ||
136 | CONFIG_MPC832x_RDB=y | ||
137 | # CONFIG_MPC834x_MDS is not set | ||
138 | # CONFIG_MPC834x_ITX is not set | ||
139 | # CONFIG_MPC836x_MDS is not set | ||
140 | CONFIG_PPC_MPC832x=y | ||
141 | # CONFIG_MPIC is not set | ||
142 | |||
143 | # | ||
144 | # Kernel options | ||
145 | # | ||
146 | # CONFIG_HIGHMEM is not set | ||
147 | # CONFIG_HZ_100 is not set | ||
148 | CONFIG_HZ_250=y | ||
149 | # CONFIG_HZ_300 is not set | ||
150 | # CONFIG_HZ_1000 is not set | ||
151 | CONFIG_HZ=250 | ||
152 | CONFIG_PREEMPT_NONE=y | ||
153 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
154 | # CONFIG_PREEMPT is not set | ||
155 | CONFIG_BINFMT_ELF=y | ||
156 | # CONFIG_BINFMT_MISC is not set | ||
157 | CONFIG_MATH_EMULATION=y | ||
158 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
159 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
160 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
161 | CONFIG_SELECT_MEMORY_MODEL=y | ||
162 | CONFIG_FLATMEM_MANUAL=y | ||
163 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
164 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
165 | CONFIG_FLATMEM=y | ||
166 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
167 | # CONFIG_SPARSEMEM_STATIC is not set | ||
168 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
169 | # CONFIG_RESOURCES_64BIT is not set | ||
170 | CONFIG_ZONE_DMA_FLAG=1 | ||
171 | CONFIG_PROC_DEVICETREE=y | ||
172 | # CONFIG_CMDLINE_BOOL is not set | ||
173 | # CONFIG_PM is not set | ||
174 | CONFIG_SECCOMP=y | ||
175 | CONFIG_ISA_DMA_API=y | ||
176 | |||
177 | # | ||
178 | # Bus options | ||
179 | # | ||
180 | CONFIG_ZONE_DMA=y | ||
181 | CONFIG_GENERIC_ISA_DMA=y | ||
182 | # CONFIG_MPIC_WEIRD is not set | ||
183 | # CONFIG_PPC_I8259 is not set | ||
184 | CONFIG_PPC_INDIRECT_PCI=y | ||
185 | CONFIG_FSL_SOC=y | ||
186 | CONFIG_PCI=y | ||
187 | CONFIG_PCI_DOMAINS=y | ||
188 | # CONFIG_PCIEPORTBUS is not set | ||
189 | |||
190 | # | ||
191 | # PCCARD (PCMCIA/CardBus) support | ||
192 | # | ||
193 | # CONFIG_PCCARD is not set | ||
194 | |||
195 | # | ||
196 | # PCI Hotplug Support | ||
197 | # | ||
198 | # CONFIG_HOTPLUG_PCI is not set | ||
199 | |||
200 | # | ||
201 | # Advanced setup | ||
202 | # | ||
203 | # CONFIG_ADVANCED_OPTIONS is not set | ||
204 | |||
205 | # | ||
206 | # Default settings for advanced configuration options are used | ||
207 | # | ||
208 | CONFIG_HIGHMEM_START=0xfe000000 | ||
209 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
210 | CONFIG_KERNEL_START=0xc0000000 | ||
211 | CONFIG_TASK_SIZE=0x80000000 | ||
212 | CONFIG_BOOT_LOAD=0x00800000 | ||
213 | |||
214 | # | ||
215 | # Networking | ||
216 | # | ||
217 | CONFIG_NET=y | ||
218 | |||
219 | # | ||
220 | # Networking options | ||
221 | # | ||
222 | # CONFIG_NETDEBUG is not set | ||
223 | CONFIG_PACKET=y | ||
224 | # CONFIG_PACKET_MMAP is not set | ||
225 | CONFIG_UNIX=y | ||
226 | CONFIG_XFRM=y | ||
227 | # CONFIG_XFRM_USER is not set | ||
228 | # CONFIG_XFRM_SUB_POLICY is not set | ||
229 | # CONFIG_XFRM_MIGRATE is not set | ||
230 | # CONFIG_NET_KEY is not set | ||
231 | CONFIG_INET=y | ||
232 | CONFIG_IP_MULTICAST=y | ||
233 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
234 | CONFIG_IP_FIB_HASH=y | ||
235 | CONFIG_IP_PNP=y | ||
236 | CONFIG_IP_PNP_DHCP=y | ||
237 | CONFIG_IP_PNP_BOOTP=y | ||
238 | # CONFIG_IP_PNP_RARP is not set | ||
239 | # CONFIG_NET_IPIP is not set | ||
240 | # CONFIG_NET_IPGRE is not set | ||
241 | # CONFIG_IP_MROUTE is not set | ||
242 | # CONFIG_ARPD is not set | ||
243 | CONFIG_SYN_COOKIES=y | ||
244 | # CONFIG_INET_AH is not set | ||
245 | # CONFIG_INET_ESP is not set | ||
246 | # CONFIG_INET_IPCOMP is not set | ||
247 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
248 | # CONFIG_INET_TUNNEL is not set | ||
249 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
250 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
251 | CONFIG_INET_XFRM_MODE_BEET=y | ||
252 | CONFIG_INET_DIAG=y | ||
253 | CONFIG_INET_TCP_DIAG=y | ||
254 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
255 | CONFIG_TCP_CONG_CUBIC=y | ||
256 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
257 | # CONFIG_TCP_MD5SIG is not set | ||
258 | # CONFIG_IPV6 is not set | ||
259 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
260 | # CONFIG_INET6_TUNNEL is not set | ||
261 | # CONFIG_NETWORK_SECMARK is not set | ||
262 | # CONFIG_NETFILTER is not set | ||
263 | |||
264 | # | ||
265 | # DCCP Configuration (EXPERIMENTAL) | ||
266 | # | ||
267 | # CONFIG_IP_DCCP is not set | ||
268 | |||
269 | # | ||
270 | # SCTP Configuration (EXPERIMENTAL) | ||
271 | # | ||
272 | # CONFIG_IP_SCTP is not set | ||
273 | |||
274 | # | ||
275 | # TIPC Configuration (EXPERIMENTAL) | ||
276 | # | ||
277 | # CONFIG_TIPC is not set | ||
278 | # CONFIG_ATM is not set | ||
279 | # CONFIG_BRIDGE is not set | ||
280 | # CONFIG_VLAN_8021Q is not set | ||
281 | # CONFIG_DECNET is not set | ||
282 | # CONFIG_LLC2 is not set | ||
283 | # CONFIG_IPX is not set | ||
284 | # CONFIG_ATALK is not set | ||
285 | # CONFIG_X25 is not set | ||
286 | # CONFIG_LAPB is not set | ||
287 | # CONFIG_ECONET is not set | ||
288 | # CONFIG_WAN_ROUTER is not set | ||
289 | |||
290 | # | ||
291 | # QoS and/or fair queueing | ||
292 | # | ||
293 | # CONFIG_NET_SCHED is not set | ||
294 | |||
295 | # | ||
296 | # Network testing | ||
297 | # | ||
298 | # CONFIG_NET_PKTGEN is not set | ||
299 | # CONFIG_HAMRADIO is not set | ||
300 | # CONFIG_IRDA is not set | ||
301 | # CONFIG_BT is not set | ||
302 | # CONFIG_IEEE80211 is not set | ||
303 | |||
304 | # | ||
305 | # Device Drivers | ||
306 | # | ||
307 | |||
308 | # | ||
309 | # Generic Driver Options | ||
310 | # | ||
311 | CONFIG_STANDALONE=y | ||
312 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
313 | # CONFIG_FW_LOADER is not set | ||
314 | # CONFIG_SYS_HYPERVISOR is not set | ||
315 | |||
316 | # | ||
317 | # Connector - unified userspace <-> kernelspace linker | ||
318 | # | ||
319 | # CONFIG_CONNECTOR is not set | ||
320 | |||
321 | # | ||
322 | # Memory Technology Devices (MTD) | ||
323 | # | ||
324 | # CONFIG_MTD is not set | ||
325 | |||
326 | # | ||
327 | # Parallel port support | ||
328 | # | ||
329 | # CONFIG_PARPORT is not set | ||
330 | |||
331 | # | ||
332 | # Plug and Play support | ||
333 | # | ||
334 | # CONFIG_PNPACPI is not set | ||
335 | |||
336 | # | ||
337 | # Block devices | ||
338 | # | ||
339 | # CONFIG_BLK_DEV_FD is not set | ||
340 | # CONFIG_BLK_CPQ_DA is not set | ||
341 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
342 | # CONFIG_BLK_DEV_DAC960 is not set | ||
343 | # CONFIG_BLK_DEV_UMEM is not set | ||
344 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
345 | CONFIG_BLK_DEV_LOOP=y | ||
346 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
347 | # CONFIG_BLK_DEV_NBD is not set | ||
348 | # CONFIG_BLK_DEV_SX8 is not set | ||
349 | # CONFIG_BLK_DEV_UB is not set | ||
350 | CONFIG_BLK_DEV_RAM=y | ||
351 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
352 | CONFIG_BLK_DEV_RAM_SIZE=32768 | ||
353 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
354 | # CONFIG_CDROM_PKTCDVD is not set | ||
355 | # CONFIG_ATA_OVER_ETH is not set | ||
356 | |||
357 | # | ||
358 | # Misc devices | ||
359 | # | ||
360 | # CONFIG_SGI_IOC4 is not set | ||
361 | # CONFIG_TIFM_CORE is not set | ||
362 | |||
363 | # | ||
364 | # ATA/ATAPI/MFM/RLL support | ||
365 | # | ||
366 | # CONFIG_IDE is not set | ||
367 | |||
368 | # | ||
369 | # SCSI device support | ||
370 | # | ||
371 | # CONFIG_RAID_ATTRS is not set | ||
372 | CONFIG_SCSI=y | ||
373 | # CONFIG_SCSI_TGT is not set | ||
374 | # CONFIG_SCSI_NETLINK is not set | ||
375 | CONFIG_SCSI_PROC_FS=y | ||
376 | |||
377 | # | ||
378 | # SCSI support type (disk, tape, CD-ROM) | ||
379 | # | ||
380 | CONFIG_BLK_DEV_SD=y | ||
381 | # CONFIG_CHR_DEV_ST is not set | ||
382 | # CONFIG_CHR_DEV_OSST is not set | ||
383 | # CONFIG_BLK_DEV_SR is not set | ||
384 | # CONFIG_CHR_DEV_SG is not set | ||
385 | # CONFIG_CHR_DEV_SCH is not set | ||
386 | |||
387 | # | ||
388 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
389 | # | ||
390 | # CONFIG_SCSI_MULTI_LUN is not set | ||
391 | # CONFIG_SCSI_CONSTANTS is not set | ||
392 | # CONFIG_SCSI_LOGGING is not set | ||
393 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
394 | |||
395 | # | ||
396 | # SCSI Transports | ||
397 | # | ||
398 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
399 | # CONFIG_SCSI_FC_ATTRS is not set | ||
400 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
401 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
402 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
403 | |||
404 | # | ||
405 | # SCSI low-level drivers | ||
406 | # | ||
407 | # CONFIG_ISCSI_TCP is not set | ||
408 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
409 | # CONFIG_SCSI_3W_9XXX is not set | ||
410 | # CONFIG_SCSI_ACARD is not set | ||
411 | # CONFIG_SCSI_AACRAID is not set | ||
412 | # CONFIG_SCSI_AIC7XXX is not set | ||
413 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
414 | # CONFIG_SCSI_AIC79XX is not set | ||
415 | # CONFIG_SCSI_AIC94XX is not set | ||
416 | # CONFIG_SCSI_DPT_I2O is not set | ||
417 | # CONFIG_SCSI_ARCMSR is not set | ||
418 | # CONFIG_MEGARAID_NEWGEN is not set | ||
419 | # CONFIG_MEGARAID_LEGACY is not set | ||
420 | # CONFIG_MEGARAID_SAS is not set | ||
421 | # CONFIG_SCSI_HPTIOP is not set | ||
422 | # CONFIG_SCSI_BUSLOGIC is not set | ||
423 | # CONFIG_SCSI_DMX3191D is not set | ||
424 | # CONFIG_SCSI_EATA is not set | ||
425 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
426 | # CONFIG_SCSI_GDTH is not set | ||
427 | # CONFIG_SCSI_IPS is not set | ||
428 | # CONFIG_SCSI_INITIO is not set | ||
429 | # CONFIG_SCSI_INIA100 is not set | ||
430 | # CONFIG_SCSI_STEX is not set | ||
431 | # CONFIG_SCSI_SYM53C8XX_2 is not set | ||
432 | # CONFIG_SCSI_QLOGIC_1280 is not set | ||
433 | # CONFIG_SCSI_QLA_FC is not set | ||
434 | # CONFIG_SCSI_QLA_ISCSI is not set | ||
435 | # CONFIG_SCSI_LPFC is not set | ||
436 | # CONFIG_SCSI_DC395x is not set | ||
437 | # CONFIG_SCSI_DC390T is not set | ||
438 | # CONFIG_SCSI_NSP32 is not set | ||
439 | # CONFIG_SCSI_DEBUG is not set | ||
440 | # CONFIG_SCSI_SRP is not set | ||
441 | |||
442 | # | ||
443 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
444 | # | ||
445 | # CONFIG_ATA is not set | ||
446 | |||
447 | # | ||
448 | # Multi-device support (RAID and LVM) | ||
449 | # | ||
450 | # CONFIG_MD is not set | ||
451 | |||
452 | # | ||
453 | # Fusion MPT device support | ||
454 | # | ||
455 | # CONFIG_FUSION is not set | ||
456 | # CONFIG_FUSION_SPI is not set | ||
457 | # CONFIG_FUSION_FC is not set | ||
458 | # CONFIG_FUSION_SAS is not set | ||
459 | |||
460 | # | ||
461 | # IEEE 1394 (FireWire) support | ||
462 | # | ||
463 | # CONFIG_IEEE1394 is not set | ||
464 | |||
465 | # | ||
466 | # I2O device support | ||
467 | # | ||
468 | # CONFIG_I2O is not set | ||
469 | |||
470 | # | ||
471 | # Macintosh device drivers | ||
472 | # | ||
473 | # CONFIG_MAC_EMUMOUSEBTN is not set | ||
474 | # CONFIG_WINDFARM is not set | ||
475 | |||
476 | # | ||
477 | # Network device support | ||
478 | # | ||
479 | CONFIG_NETDEVICES=y | ||
480 | # CONFIG_DUMMY is not set | ||
481 | # CONFIG_BONDING is not set | ||
482 | # CONFIG_EQUALIZER is not set | ||
483 | # CONFIG_TUN is not set | ||
484 | |||
485 | # | ||
486 | # ARCnet devices | ||
487 | # | ||
488 | # CONFIG_ARCNET is not set | ||
489 | |||
490 | # | ||
491 | # PHY device support | ||
492 | # | ||
493 | # CONFIG_PHYLIB is not set | ||
494 | |||
495 | # | ||
496 | # Ethernet (10 or 100Mbit) | ||
497 | # | ||
498 | CONFIG_NET_ETHERNET=y | ||
499 | CONFIG_MII=y | ||
500 | # CONFIG_HAPPYMEAL is not set | ||
501 | # CONFIG_SUNGEM is not set | ||
502 | # CONFIG_CASSINI is not set | ||
503 | # CONFIG_NET_VENDOR_3COM is not set | ||
504 | |||
505 | # | ||
506 | # Tulip family network device support | ||
507 | # | ||
508 | # CONFIG_NET_TULIP is not set | ||
509 | # CONFIG_HP100 is not set | ||
510 | # CONFIG_NET_PCI is not set | ||
511 | |||
512 | # | ||
513 | # Ethernet (1000 Mbit) | ||
514 | # | ||
515 | # CONFIG_ACENIC is not set | ||
516 | # CONFIG_DL2K is not set | ||
517 | CONFIG_E1000=y | ||
518 | # CONFIG_E1000_NAPI is not set | ||
519 | # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set | ||
520 | # CONFIG_NS83820 is not set | ||
521 | # CONFIG_HAMACHI is not set | ||
522 | # CONFIG_YELLOWFIN is not set | ||
523 | # CONFIG_R8169 is not set | ||
524 | # CONFIG_SIS190 is not set | ||
525 | # CONFIG_SKGE is not set | ||
526 | # CONFIG_SKY2 is not set | ||
527 | # CONFIG_SK98LIN is not set | ||
528 | # CONFIG_TIGON3 is not set | ||
529 | # CONFIG_BNX2 is not set | ||
530 | # CONFIG_GIANFAR is not set | ||
531 | CONFIG_UCC_GETH=y | ||
532 | CONFIG_UGETH_NAPI=y | ||
533 | # CONFIG_UGETH_MAGIC_PACKET is not set | ||
534 | # CONFIG_UGETH_FILTERING is not set | ||
535 | # CONFIG_UGETH_TX_ON_DEMOND is not set | ||
536 | # CONFIG_QLA3XXX is not set | ||
537 | # CONFIG_ATL1 is not set | ||
538 | |||
539 | # | ||
540 | # Ethernet (10000 Mbit) | ||
541 | # | ||
542 | # CONFIG_CHELSIO_T1 is not set | ||
543 | # CONFIG_CHELSIO_T3 is not set | ||
544 | # CONFIG_IXGB is not set | ||
545 | # CONFIG_S2IO is not set | ||
546 | # CONFIG_MYRI10GE is not set | ||
547 | # CONFIG_NETXEN_NIC is not set | ||
548 | |||
549 | # | ||
550 | # Token Ring devices | ||
551 | # | ||
552 | # CONFIG_TR is not set | ||
553 | |||
554 | # | ||
555 | # Wireless LAN (non-hamradio) | ||
556 | # | ||
557 | # CONFIG_NET_RADIO is not set | ||
558 | |||
559 | # | ||
560 | # Wan interfaces | ||
561 | # | ||
562 | # CONFIG_WAN is not set | ||
563 | # CONFIG_FDDI is not set | ||
564 | # CONFIG_HIPPI is not set | ||
565 | # CONFIG_PPP is not set | ||
566 | # CONFIG_SLIP is not set | ||
567 | # CONFIG_NET_FC is not set | ||
568 | # CONFIG_SHAPER is not set | ||
569 | # CONFIG_NETCONSOLE is not set | ||
570 | # CONFIG_NETPOLL is not set | ||
571 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
572 | |||
573 | # | ||
574 | # ISDN subsystem | ||
575 | # | ||
576 | # CONFIG_ISDN is not set | ||
577 | |||
578 | # | ||
579 | # Telephony Support | ||
580 | # | ||
581 | # CONFIG_PHONE is not set | ||
582 | |||
583 | # | ||
584 | # Input device support | ||
585 | # | ||
586 | CONFIG_INPUT=y | ||
587 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
588 | |||
589 | # | ||
590 | # Userland interfaces | ||
591 | # | ||
592 | # CONFIG_INPUT_MOUSEDEV is not set | ||
593 | # CONFIG_INPUT_JOYDEV is not set | ||
594 | # CONFIG_INPUT_TSDEV is not set | ||
595 | # CONFIG_INPUT_EVDEV is not set | ||
596 | # CONFIG_INPUT_EVBUG is not set | ||
597 | |||
598 | # | ||
599 | # Input Device Drivers | ||
600 | # | ||
601 | # CONFIG_INPUT_KEYBOARD is not set | ||
602 | # CONFIG_INPUT_MOUSE is not set | ||
603 | # CONFIG_INPUT_JOYSTICK is not set | ||
604 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
605 | # CONFIG_INPUT_MISC is not set | ||
606 | |||
607 | # | ||
608 | # Hardware I/O ports | ||
609 | # | ||
610 | # CONFIG_SERIO is not set | ||
611 | # CONFIG_GAMEPORT is not set | ||
612 | |||
613 | # | ||
614 | # Character devices | ||
615 | # | ||
616 | # CONFIG_VT is not set | ||
617 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
618 | |||
619 | # | ||
620 | # Serial drivers | ||
621 | # | ||
622 | CONFIG_SERIAL_8250=y | ||
623 | CONFIG_SERIAL_8250_CONSOLE=y | ||
624 | CONFIG_SERIAL_8250_PCI=y | ||
625 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
626 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
627 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
628 | |||
629 | # | ||
630 | # Non-8250 serial port support | ||
631 | # | ||
632 | # CONFIG_SERIAL_UARTLITE is not set | ||
633 | CONFIG_SERIAL_CORE=y | ||
634 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
635 | # CONFIG_SERIAL_JSM is not set | ||
636 | # CONFIG_SERIAL_OF_PLATFORM is not set | ||
637 | CONFIG_UNIX98_PTYS=y | ||
638 | CONFIG_LEGACY_PTYS=y | ||
639 | CONFIG_LEGACY_PTY_COUNT=256 | ||
640 | |||
641 | # | ||
642 | # IPMI | ||
643 | # | ||
644 | # CONFIG_IPMI_HANDLER is not set | ||
645 | |||
646 | # | ||
647 | # Watchdog Cards | ||
648 | # | ||
649 | CONFIG_WATCHDOG=y | ||
650 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
651 | |||
652 | # | ||
653 | # Watchdog Device Drivers | ||
654 | # | ||
655 | # CONFIG_SOFT_WATCHDOG is not set | ||
656 | CONFIG_83xx_WDT=y | ||
657 | |||
658 | # | ||
659 | # PCI-based Watchdog Cards | ||
660 | # | ||
661 | # CONFIG_PCIPCWATCHDOG is not set | ||
662 | # CONFIG_WDTPCI is not set | ||
663 | |||
664 | # | ||
665 | # USB-based Watchdog Cards | ||
666 | # | ||
667 | # CONFIG_USBPCWATCHDOG is not set | ||
668 | CONFIG_HW_RANDOM=y | ||
669 | # CONFIG_NVRAM is not set | ||
670 | CONFIG_GEN_RTC=y | ||
671 | # CONFIG_GEN_RTC_X is not set | ||
672 | # CONFIG_DTLK is not set | ||
673 | # CONFIG_R3964 is not set | ||
674 | # CONFIG_APPLICOM is not set | ||
675 | # CONFIG_AGP is not set | ||
676 | # CONFIG_DRM is not set | ||
677 | # CONFIG_RAW_DRIVER is not set | ||
678 | |||
679 | # | ||
680 | # TPM devices | ||
681 | # | ||
682 | # CONFIG_TCG_TPM is not set | ||
683 | |||
684 | # | ||
685 | # I2C support | ||
686 | # | ||
687 | CONFIG_I2C=y | ||
688 | CONFIG_I2C_CHARDEV=y | ||
689 | |||
690 | # | ||
691 | # I2C Algorithms | ||
692 | # | ||
693 | # CONFIG_I2C_ALGOBIT is not set | ||
694 | # CONFIG_I2C_ALGOPCF is not set | ||
695 | # CONFIG_I2C_ALGOPCA is not set | ||
696 | |||
697 | # | ||
698 | # I2C Hardware Bus support | ||
699 | # | ||
700 | # CONFIG_I2C_ALI1535 is not set | ||
701 | # CONFIG_I2C_ALI1563 is not set | ||
702 | # CONFIG_I2C_ALI15X3 is not set | ||
703 | # CONFIG_I2C_AMD756 is not set | ||
704 | # CONFIG_I2C_AMD8111 is not set | ||
705 | # CONFIG_I2C_I801 is not set | ||
706 | # CONFIG_I2C_I810 is not set | ||
707 | # CONFIG_I2C_PIIX4 is not set | ||
708 | CONFIG_I2C_MPC=y | ||
709 | # CONFIG_I2C_NFORCE2 is not set | ||
710 | # CONFIG_I2C_OCORES is not set | ||
711 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
712 | # CONFIG_I2C_PASEMI is not set | ||
713 | # CONFIG_I2C_PROSAVAGE is not set | ||
714 | # CONFIG_I2C_SAVAGE4 is not set | ||
715 | # CONFIG_I2C_SIS5595 is not set | ||
716 | # CONFIG_I2C_SIS630 is not set | ||
717 | # CONFIG_I2C_SIS96X is not set | ||
718 | # CONFIG_I2C_STUB is not set | ||
719 | # CONFIG_I2C_VIA is not set | ||
720 | # CONFIG_I2C_VIAPRO is not set | ||
721 | # CONFIG_I2C_VOODOO3 is not set | ||
722 | # CONFIG_I2C_PCA_ISA is not set | ||
723 | |||
724 | # | ||
725 | # Miscellaneous I2C Chip support | ||
726 | # | ||
727 | # CONFIG_SENSORS_DS1337 is not set | ||
728 | # CONFIG_SENSORS_DS1374 is not set | ||
729 | # CONFIG_SENSORS_EEPROM is not set | ||
730 | # CONFIG_SENSORS_PCF8574 is not set | ||
731 | # CONFIG_SENSORS_PCA9539 is not set | ||
732 | # CONFIG_SENSORS_PCF8591 is not set | ||
733 | # CONFIG_SENSORS_M41T00 is not set | ||
734 | # CONFIG_SENSORS_MAX6875 is not set | ||
735 | # CONFIG_I2C_DEBUG_CORE is not set | ||
736 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
737 | # CONFIG_I2C_DEBUG_BUS is not set | ||
738 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
739 | |||
740 | # | ||
741 | # SPI support | ||
742 | # | ||
743 | # CONFIG_SPI is not set | ||
744 | # CONFIG_SPI_MASTER is not set | ||
745 | |||
746 | # | ||
747 | # Dallas's 1-wire bus | ||
748 | # | ||
749 | # CONFIG_W1 is not set | ||
750 | |||
751 | # | ||
752 | # Hardware Monitoring support | ||
753 | # | ||
754 | CONFIG_HWMON=y | ||
755 | # CONFIG_HWMON_VID is not set | ||
756 | # CONFIG_SENSORS_ABITUGURU is not set | ||
757 | # CONFIG_SENSORS_ADM1021 is not set | ||
758 | # CONFIG_SENSORS_ADM1025 is not set | ||
759 | # CONFIG_SENSORS_ADM1026 is not set | ||
760 | # CONFIG_SENSORS_ADM1029 is not set | ||
761 | # CONFIG_SENSORS_ADM1031 is not set | ||
762 | # CONFIG_SENSORS_ADM9240 is not set | ||
763 | # CONFIG_SENSORS_ASB100 is not set | ||
764 | # CONFIG_SENSORS_ATXP1 is not set | ||
765 | # CONFIG_SENSORS_DS1621 is not set | ||
766 | # CONFIG_SENSORS_F71805F is not set | ||
767 | # CONFIG_SENSORS_FSCHER is not set | ||
768 | # CONFIG_SENSORS_FSCPOS is not set | ||
769 | # CONFIG_SENSORS_GL518SM is not set | ||
770 | # CONFIG_SENSORS_GL520SM is not set | ||
771 | # CONFIG_SENSORS_IT87 is not set | ||
772 | # CONFIG_SENSORS_LM63 is not set | ||
773 | # CONFIG_SENSORS_LM75 is not set | ||
774 | # CONFIG_SENSORS_LM77 is not set | ||
775 | # CONFIG_SENSORS_LM78 is not set | ||
776 | # CONFIG_SENSORS_LM80 is not set | ||
777 | # CONFIG_SENSORS_LM83 is not set | ||
778 | # CONFIG_SENSORS_LM85 is not set | ||
779 | # CONFIG_SENSORS_LM87 is not set | ||
780 | # CONFIG_SENSORS_LM90 is not set | ||
781 | # CONFIG_SENSORS_LM92 is not set | ||
782 | # CONFIG_SENSORS_MAX1619 is not set | ||
783 | # CONFIG_SENSORS_PC87360 is not set | ||
784 | # CONFIG_SENSORS_PC87427 is not set | ||
785 | # CONFIG_SENSORS_SIS5595 is not set | ||
786 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
787 | # CONFIG_SENSORS_SMSC47M192 is not set | ||
788 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
789 | # CONFIG_SENSORS_VIA686A is not set | ||
790 | # CONFIG_SENSORS_VT1211 is not set | ||
791 | # CONFIG_SENSORS_VT8231 is not set | ||
792 | # CONFIG_SENSORS_W83781D is not set | ||
793 | # CONFIG_SENSORS_W83791D is not set | ||
794 | # CONFIG_SENSORS_W83792D is not set | ||
795 | # CONFIG_SENSORS_W83793 is not set | ||
796 | # CONFIG_SENSORS_W83L785TS is not set | ||
797 | # CONFIG_SENSORS_W83627HF is not set | ||
798 | # CONFIG_SENSORS_W83627EHF is not set | ||
799 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
800 | |||
801 | # | ||
802 | # Multifunction device drivers | ||
803 | # | ||
804 | # CONFIG_MFD_SM501 is not set | ||
805 | |||
806 | # | ||
807 | # Multimedia devices | ||
808 | # | ||
809 | # CONFIG_VIDEO_DEV is not set | ||
810 | |||
811 | # | ||
812 | # Digital Video Broadcasting Devices | ||
813 | # | ||
814 | # CONFIG_DVB is not set | ||
815 | # CONFIG_USB_DABUSB is not set | ||
816 | |||
817 | # | ||
818 | # Graphics support | ||
819 | # | ||
820 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
821 | # CONFIG_FB is not set | ||
822 | # CONFIG_FB_IBM_GXT4500 is not set | ||
823 | |||
824 | # | ||
825 | # Sound | ||
826 | # | ||
827 | # CONFIG_SOUND is not set | ||
828 | |||
829 | # | ||
830 | # HID Devices | ||
831 | # | ||
832 | CONFIG_HID=y | ||
833 | # CONFIG_HID_DEBUG is not set | ||
834 | |||
835 | # | ||
836 | # USB support | ||
837 | # | ||
838 | CONFIG_USB_ARCH_HAS_HCD=y | ||
839 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
840 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
841 | CONFIG_USB=y | ||
842 | # CONFIG_USB_DEBUG is not set | ||
843 | |||
844 | # | ||
845 | # Miscellaneous USB options | ||
846 | # | ||
847 | CONFIG_USB_DEVICEFS=y | ||
848 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
849 | # CONFIG_USB_OTG is not set | ||
850 | |||
851 | # | ||
852 | # USB Host Controller Drivers | ||
853 | # | ||
854 | CONFIG_USB_EHCI_HCD=y | ||
855 | # CONFIG_USB_EHCI_SPLIT_ISO is not set | ||
856 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | ||
857 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | ||
858 | # CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set | ||
859 | # CONFIG_USB_ISP116X_HCD is not set | ||
860 | CONFIG_USB_OHCI_HCD=y | ||
861 | CONFIG_USB_OHCI_HCD_PPC_OF=y | ||
862 | CONFIG_USB_OHCI_HCD_PPC_OF_BE=y | ||
863 | # CONFIG_USB_OHCI_HCD_PPC_OF_LE is not set | ||
864 | CONFIG_USB_OHCI_HCD_PCI=y | ||
865 | CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y | ||
866 | CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y | ||
867 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
868 | # CONFIG_USB_UHCI_HCD is not set | ||
869 | # CONFIG_USB_SL811_HCD is not set | ||
870 | |||
871 | # | ||
872 | # USB Device Class drivers | ||
873 | # | ||
874 | # CONFIG_USB_ACM is not set | ||
875 | # CONFIG_USB_PRINTER is not set | ||
876 | |||
877 | # | ||
878 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
879 | # | ||
880 | |||
881 | # | ||
882 | # may also be needed; see USB_STORAGE Help for more information | ||
883 | # | ||
884 | CONFIG_USB_STORAGE=y | ||
885 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
886 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
887 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
888 | # CONFIG_USB_STORAGE_DPCM is not set | ||
889 | # CONFIG_USB_STORAGE_USBAT is not set | ||
890 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
891 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
892 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
893 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
894 | # CONFIG_USB_STORAGE_KARMA is not set | ||
895 | # CONFIG_USB_LIBUSUAL is not set | ||
896 | |||
897 | # | ||
898 | # USB Input Devices | ||
899 | # | ||
900 | # CONFIG_USB_HID is not set | ||
901 | |||
902 | # | ||
903 | # USB HID Boot Protocol drivers | ||
904 | # | ||
905 | # CONFIG_USB_KBD is not set | ||
906 | # CONFIG_USB_MOUSE is not set | ||
907 | # CONFIG_USB_AIPTEK is not set | ||
908 | # CONFIG_USB_WACOM is not set | ||
909 | # CONFIG_USB_ACECAD is not set | ||
910 | # CONFIG_USB_KBTAB is not set | ||
911 | # CONFIG_USB_POWERMATE is not set | ||
912 | # CONFIG_USB_TOUCHSCREEN is not set | ||
913 | # CONFIG_USB_YEALINK is not set | ||
914 | # CONFIG_USB_XPAD is not set | ||
915 | # CONFIG_USB_ATI_REMOTE is not set | ||
916 | # CONFIG_USB_ATI_REMOTE2 is not set | ||
917 | # CONFIG_USB_KEYSPAN_REMOTE is not set | ||
918 | # CONFIG_USB_APPLETOUCH is not set | ||
919 | # CONFIG_USB_GTCO is not set | ||
920 | |||
921 | # | ||
922 | # USB Imaging devices | ||
923 | # | ||
924 | # CONFIG_USB_MDC800 is not set | ||
925 | # CONFIG_USB_MICROTEK is not set | ||
926 | |||
927 | # | ||
928 | # USB Network Adapters | ||
929 | # | ||
930 | # CONFIG_USB_CATC is not set | ||
931 | # CONFIG_USB_KAWETH is not set | ||
932 | # CONFIG_USB_PEGASUS is not set | ||
933 | # CONFIG_USB_RTL8150 is not set | ||
934 | # CONFIG_USB_USBNET_MII is not set | ||
935 | # CONFIG_USB_USBNET is not set | ||
936 | CONFIG_USB_MON=y | ||
937 | |||
938 | # | ||
939 | # USB port drivers | ||
940 | # | ||
941 | |||
942 | # | ||
943 | # USB Serial Converter support | ||
944 | # | ||
945 | # CONFIG_USB_SERIAL is not set | ||
946 | |||
947 | # | ||
948 | # USB Miscellaneous drivers | ||
949 | # | ||
950 | # CONFIG_USB_EMI62 is not set | ||
951 | # CONFIG_USB_EMI26 is not set | ||
952 | # CONFIG_USB_ADUTUX is not set | ||
953 | # CONFIG_USB_AUERSWALD is not set | ||
954 | # CONFIG_USB_RIO500 is not set | ||
955 | # CONFIG_USB_LEGOTOWER is not set | ||
956 | # CONFIG_USB_LCD is not set | ||
957 | # CONFIG_USB_BERRY_CHARGE is not set | ||
958 | # CONFIG_USB_LED is not set | ||
959 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
960 | # CONFIG_USB_CYTHERM is not set | ||
961 | # CONFIG_USB_PHIDGET is not set | ||
962 | # CONFIG_USB_IDMOUSE is not set | ||
963 | # CONFIG_USB_FTDI_ELAN is not set | ||
964 | # CONFIG_USB_APPLEDISPLAY is not set | ||
965 | # CONFIG_USB_SISUSBVGA is not set | ||
966 | # CONFIG_USB_LD is not set | ||
967 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
968 | # CONFIG_USB_IOWARRIOR is not set | ||
969 | # CONFIG_USB_TEST is not set | ||
970 | |||
971 | # | ||
972 | # USB DSL modem support | ||
973 | # | ||
974 | |||
975 | # | ||
976 | # USB Gadget Support | ||
977 | # | ||
978 | # CONFIG_USB_GADGET is not set | ||
979 | |||
980 | # | ||
981 | # MMC/SD Card support | ||
982 | # | ||
983 | # CONFIG_MMC is not set | ||
984 | |||
985 | # | ||
986 | # LED devices | ||
987 | # | ||
988 | # CONFIG_NEW_LEDS is not set | ||
989 | |||
990 | # | ||
991 | # LED drivers | ||
992 | # | ||
993 | |||
994 | # | ||
995 | # LED Triggers | ||
996 | # | ||
997 | |||
998 | # | ||
999 | # InfiniBand support | ||
1000 | # | ||
1001 | # CONFIG_INFINIBAND is not set | ||
1002 | |||
1003 | # | ||
1004 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
1005 | # | ||
1006 | |||
1007 | # | ||
1008 | # Real Time Clock | ||
1009 | # | ||
1010 | # CONFIG_RTC_CLASS is not set | ||
1011 | |||
1012 | # | ||
1013 | # DMA Engine support | ||
1014 | # | ||
1015 | # CONFIG_DMA_ENGINE is not set | ||
1016 | |||
1017 | # | ||
1018 | # DMA Clients | ||
1019 | # | ||
1020 | |||
1021 | # | ||
1022 | # DMA Devices | ||
1023 | # | ||
1024 | |||
1025 | # | ||
1026 | # Auxiliary Display support | ||
1027 | # | ||
1028 | |||
1029 | # | ||
1030 | # Virtualization | ||
1031 | # | ||
1032 | |||
1033 | # | ||
1034 | # File systems | ||
1035 | # | ||
1036 | CONFIG_EXT2_FS=y | ||
1037 | # CONFIG_EXT2_FS_XATTR is not set | ||
1038 | # CONFIG_EXT2_FS_XIP is not set | ||
1039 | CONFIG_EXT3_FS=y | ||
1040 | CONFIG_EXT3_FS_XATTR=y | ||
1041 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
1042 | # CONFIG_EXT3_FS_SECURITY is not set | ||
1043 | # CONFIG_EXT4DEV_FS is not set | ||
1044 | CONFIG_JBD=y | ||
1045 | # CONFIG_JBD_DEBUG is not set | ||
1046 | CONFIG_FS_MBCACHE=y | ||
1047 | # CONFIG_REISERFS_FS is not set | ||
1048 | # CONFIG_JFS_FS is not set | ||
1049 | # CONFIG_FS_POSIX_ACL is not set | ||
1050 | # CONFIG_XFS_FS is not set | ||
1051 | # CONFIG_GFS2_FS is not set | ||
1052 | # CONFIG_OCFS2_FS is not set | ||
1053 | # CONFIG_MINIX_FS is not set | ||
1054 | # CONFIG_ROMFS_FS is not set | ||
1055 | CONFIG_INOTIFY=y | ||
1056 | CONFIG_INOTIFY_USER=y | ||
1057 | # CONFIG_QUOTA is not set | ||
1058 | CONFIG_DNOTIFY=y | ||
1059 | # CONFIG_AUTOFS_FS is not set | ||
1060 | # CONFIG_AUTOFS4_FS is not set | ||
1061 | # CONFIG_FUSE_FS is not set | ||
1062 | |||
1063 | # | ||
1064 | # CD-ROM/DVD Filesystems | ||
1065 | # | ||
1066 | # CONFIG_ISO9660_FS is not set | ||
1067 | # CONFIG_UDF_FS is not set | ||
1068 | |||
1069 | # | ||
1070 | # DOS/FAT/NT Filesystems | ||
1071 | # | ||
1072 | CONFIG_FAT_FS=y | ||
1073 | CONFIG_MSDOS_FS=y | ||
1074 | CONFIG_VFAT_FS=y | ||
1075 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
1076 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
1077 | # CONFIG_NTFS_FS is not set | ||
1078 | |||
1079 | # | ||
1080 | # Pseudo filesystems | ||
1081 | # | ||
1082 | CONFIG_PROC_FS=y | ||
1083 | CONFIG_PROC_KCORE=y | ||
1084 | CONFIG_PROC_SYSCTL=y | ||
1085 | CONFIG_SYSFS=y | ||
1086 | CONFIG_TMPFS=y | ||
1087 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
1088 | # CONFIG_HUGETLB_PAGE is not set | ||
1089 | CONFIG_RAMFS=y | ||
1090 | # CONFIG_CONFIGFS_FS is not set | ||
1091 | |||
1092 | # | ||
1093 | # Miscellaneous filesystems | ||
1094 | # | ||
1095 | # CONFIG_ADFS_FS is not set | ||
1096 | # CONFIG_AFFS_FS is not set | ||
1097 | # CONFIG_HFS_FS is not set | ||
1098 | # CONFIG_HFSPLUS_FS is not set | ||
1099 | # CONFIG_BEFS_FS is not set | ||
1100 | # CONFIG_BFS_FS is not set | ||
1101 | # CONFIG_EFS_FS is not set | ||
1102 | # CONFIG_CRAMFS is not set | ||
1103 | # CONFIG_VXFS_FS is not set | ||
1104 | # CONFIG_HPFS_FS is not set | ||
1105 | # CONFIG_QNX4FS_FS is not set | ||
1106 | # CONFIG_SYSV_FS is not set | ||
1107 | # CONFIG_UFS_FS is not set | ||
1108 | |||
1109 | # | ||
1110 | # Network File Systems | ||
1111 | # | ||
1112 | CONFIG_NFS_FS=y | ||
1113 | CONFIG_NFS_V3=y | ||
1114 | # CONFIG_NFS_V3_ACL is not set | ||
1115 | CONFIG_NFS_V4=y | ||
1116 | # CONFIG_NFS_DIRECTIO is not set | ||
1117 | # CONFIG_NFSD is not set | ||
1118 | CONFIG_ROOT_NFS=y | ||
1119 | CONFIG_LOCKD=y | ||
1120 | CONFIG_LOCKD_V4=y | ||
1121 | CONFIG_NFS_COMMON=y | ||
1122 | CONFIG_SUNRPC=y | ||
1123 | CONFIG_SUNRPC_GSS=y | ||
1124 | CONFIG_RPCSEC_GSS_KRB5=y | ||
1125 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
1126 | # CONFIG_SMB_FS is not set | ||
1127 | # CONFIG_CIFS is not set | ||
1128 | # CONFIG_NCP_FS is not set | ||
1129 | # CONFIG_CODA_FS is not set | ||
1130 | # CONFIG_AFS_FS is not set | ||
1131 | # CONFIG_9P_FS is not set | ||
1132 | |||
1133 | # | ||
1134 | # Partition Types | ||
1135 | # | ||
1136 | CONFIG_PARTITION_ADVANCED=y | ||
1137 | # CONFIG_ACORN_PARTITION is not set | ||
1138 | # CONFIG_OSF_PARTITION is not set | ||
1139 | # CONFIG_AMIGA_PARTITION is not set | ||
1140 | # CONFIG_ATARI_PARTITION is not set | ||
1141 | # CONFIG_MAC_PARTITION is not set | ||
1142 | CONFIG_MSDOS_PARTITION=y | ||
1143 | # CONFIG_BSD_DISKLABEL is not set | ||
1144 | # CONFIG_MINIX_SUBPARTITION is not set | ||
1145 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
1146 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
1147 | CONFIG_LDM_PARTITION=y | ||
1148 | # CONFIG_LDM_DEBUG is not set | ||
1149 | # CONFIG_SGI_PARTITION is not set | ||
1150 | # CONFIG_ULTRIX_PARTITION is not set | ||
1151 | # CONFIG_SUN_PARTITION is not set | ||
1152 | # CONFIG_KARMA_PARTITION is not set | ||
1153 | # CONFIG_EFI_PARTITION is not set | ||
1154 | |||
1155 | # | ||
1156 | # Native Language Support | ||
1157 | # | ||
1158 | CONFIG_NLS=y | ||
1159 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1160 | CONFIG_NLS_CODEPAGE_437=y | ||
1161 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1162 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1163 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
1164 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1165 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1166 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1167 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1168 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1169 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1170 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1171 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1172 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1173 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1174 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1175 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1176 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1177 | CONFIG_NLS_CODEPAGE_932=y | ||
1178 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1179 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1180 | CONFIG_NLS_ISO8859_8=y | ||
1181 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1182 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1183 | # CONFIG_NLS_ASCII is not set | ||
1184 | CONFIG_NLS_ISO8859_1=y | ||
1185 | # CONFIG_NLS_ISO8859_2 is not set | ||
1186 | # CONFIG_NLS_ISO8859_3 is not set | ||
1187 | # CONFIG_NLS_ISO8859_4 is not set | ||
1188 | # CONFIG_NLS_ISO8859_5 is not set | ||
1189 | # CONFIG_NLS_ISO8859_6 is not set | ||
1190 | # CONFIG_NLS_ISO8859_7 is not set | ||
1191 | # CONFIG_NLS_ISO8859_9 is not set | ||
1192 | # CONFIG_NLS_ISO8859_13 is not set | ||
1193 | # CONFIG_NLS_ISO8859_14 is not set | ||
1194 | # CONFIG_NLS_ISO8859_15 is not set | ||
1195 | # CONFIG_NLS_KOI8_R is not set | ||
1196 | # CONFIG_NLS_KOI8_U is not set | ||
1197 | # CONFIG_NLS_UTF8 is not set | ||
1198 | |||
1199 | # | ||
1200 | # Distributed Lock Manager | ||
1201 | # | ||
1202 | # CONFIG_DLM is not set | ||
1203 | |||
1204 | # | ||
1205 | # QE Options | ||
1206 | # | ||
1207 | CONFIG_UCC_SLOW=y | ||
1208 | CONFIG_UCC_FAST=y | ||
1209 | CONFIG_UCC=y | ||
1210 | |||
1211 | # | ||
1212 | # Library routines | ||
1213 | # | ||
1214 | CONFIG_BITREVERSE=y | ||
1215 | # CONFIG_CRC_CCITT is not set | ||
1216 | # CONFIG_CRC16 is not set | ||
1217 | CONFIG_CRC32=y | ||
1218 | # CONFIG_LIBCRC32C is not set | ||
1219 | CONFIG_PLIST=y | ||
1220 | CONFIG_HAS_IOMEM=y | ||
1221 | CONFIG_HAS_IOPORT=y | ||
1222 | |||
1223 | # | ||
1224 | # Instrumentation Support | ||
1225 | # | ||
1226 | # CONFIG_PROFILING is not set | ||
1227 | |||
1228 | # | ||
1229 | # Kernel hacking | ||
1230 | # | ||
1231 | # CONFIG_PRINTK_TIME is not set | ||
1232 | CONFIG_ENABLE_MUST_CHECK=y | ||
1233 | # CONFIG_MAGIC_SYSRQ is not set | ||
1234 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1235 | # CONFIG_DEBUG_FS is not set | ||
1236 | # CONFIG_HEADERS_CHECK is not set | ||
1237 | # CONFIG_DEBUG_KERNEL is not set | ||
1238 | CONFIG_LOG_BUF_SHIFT=14 | ||
1239 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
1240 | # CONFIG_BOOTX_TEXT is not set | ||
1241 | # CONFIG_SERIAL_TEXT_DEBUG is not set | ||
1242 | # CONFIG_PPC_EARLY_DEBUG is not set | ||
1243 | |||
1244 | # | ||
1245 | # Security options | ||
1246 | # | ||
1247 | # CONFIG_KEYS is not set | ||
1248 | # CONFIG_SECURITY is not set | ||
1249 | |||
1250 | # | ||
1251 | # Cryptographic options | ||
1252 | # | ||
1253 | CONFIG_CRYPTO=y | ||
1254 | CONFIG_CRYPTO_ALGAPI=y | ||
1255 | CONFIG_CRYPTO_BLKCIPHER=y | ||
1256 | CONFIG_CRYPTO_MANAGER=y | ||
1257 | # CONFIG_CRYPTO_HMAC is not set | ||
1258 | # CONFIG_CRYPTO_XCBC is not set | ||
1259 | # CONFIG_CRYPTO_NULL is not set | ||
1260 | # CONFIG_CRYPTO_MD4 is not set | ||
1261 | CONFIG_CRYPTO_MD5=y | ||
1262 | # CONFIG_CRYPTO_SHA1 is not set | ||
1263 | # CONFIG_CRYPTO_SHA256 is not set | ||
1264 | # CONFIG_CRYPTO_SHA512 is not set | ||
1265 | # CONFIG_CRYPTO_WP512 is not set | ||
1266 | # CONFIG_CRYPTO_TGR192 is not set | ||
1267 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1268 | CONFIG_CRYPTO_ECB=m | ||
1269 | CONFIG_CRYPTO_CBC=y | ||
1270 | CONFIG_CRYPTO_PCBC=m | ||
1271 | # CONFIG_CRYPTO_LRW is not set | ||
1272 | CONFIG_CRYPTO_DES=y | ||
1273 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1274 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1275 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1276 | # CONFIG_CRYPTO_SERPENT is not set | ||
1277 | # CONFIG_CRYPTO_AES is not set | ||
1278 | # CONFIG_CRYPTO_CAST5 is not set | ||
1279 | # CONFIG_CRYPTO_CAST6 is not set | ||
1280 | # CONFIG_CRYPTO_TEA is not set | ||
1281 | # CONFIG_CRYPTO_ARC4 is not set | ||
1282 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1283 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1284 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1285 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1286 | # CONFIG_CRYPTO_CRC32C is not set | ||
1287 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1288 | # CONFIG_CRYPTO_TEST is not set | ||
1289 | |||
1290 | # | ||
1291 | # Hardware crypto devices | ||
1292 | # | ||
diff --git a/arch/powerpc/configs/mpc8544_ds_defconfig b/arch/powerpc/configs/mpc8544_ds_defconfig new file mode 100644 index 000000000000..b563513cc96c --- /dev/null +++ b/arch/powerpc/configs/mpc8544_ds_defconfig | |||
@@ -0,0 +1,1077 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.21-rc3 | ||
4 | # Mon Mar 19 17:18:49 2007 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | CONFIG_PPC32=y | ||
8 | CONFIG_PPC_MERGE=y | ||
9 | CONFIG_MMU=y | ||
10 | CONFIG_GENERIC_HARDIRQS=y | ||
11 | CONFIG_IRQ_PER_CPU=y | ||
12 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
13 | CONFIG_ARCH_HAS_ILOG2_U32=y | ||
14 | CONFIG_GENERIC_HWEIGHT=y | ||
15 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
16 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
17 | CONFIG_PPC=y | ||
18 | CONFIG_EARLY_PRINTK=y | ||
19 | CONFIG_GENERIC_NVRAM=y | ||
20 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
21 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
22 | CONFIG_PPC_OF=y | ||
23 | CONFIG_PPC_UDBG_16550=y | ||
24 | # CONFIG_GENERIC_TBSYNC is not set | ||
25 | CONFIG_AUDIT_ARCH=y | ||
26 | CONFIG_GENERIC_BUG=y | ||
27 | CONFIG_DEFAULT_UIMAGE=y | ||
28 | |||
29 | # | ||
30 | # Processor support | ||
31 | # | ||
32 | # CONFIG_CLASSIC32 is not set | ||
33 | # CONFIG_PPC_82xx is not set | ||
34 | # CONFIG_PPC_83xx is not set | ||
35 | CONFIG_PPC_85xx=y | ||
36 | # CONFIG_PPC_86xx is not set | ||
37 | # CONFIG_PPC_8xx is not set | ||
38 | # CONFIG_40x is not set | ||
39 | # CONFIG_44x is not set | ||
40 | # CONFIG_E200 is not set | ||
41 | CONFIG_85xx=y | ||
42 | CONFIG_E500=y | ||
43 | # CONFIG_PPC_DCR_NATIVE is not set | ||
44 | # CONFIG_PPC_DCR_MMIO is not set | ||
45 | CONFIG_BOOKE=y | ||
46 | CONFIG_FSL_BOOKE=y | ||
47 | # CONFIG_PHYS_64BIT is not set | ||
48 | # CONFIG_SPE is not set | ||
49 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
50 | |||
51 | # | ||
52 | # Code maturity level options | ||
53 | # | ||
54 | CONFIG_EXPERIMENTAL=y | ||
55 | CONFIG_BROKEN_ON_SMP=y | ||
56 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
57 | |||
58 | # | ||
59 | # General setup | ||
60 | # | ||
61 | CONFIG_LOCALVERSION="" | ||
62 | CONFIG_LOCALVERSION_AUTO=y | ||
63 | CONFIG_SWAP=y | ||
64 | CONFIG_SYSVIPC=y | ||
65 | CONFIG_IPC_NS=y | ||
66 | CONFIG_SYSVIPC_SYSCTL=y | ||
67 | CONFIG_POSIX_MQUEUE=y | ||
68 | CONFIG_BSD_PROCESS_ACCT=y | ||
69 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | ||
70 | # CONFIG_TASKSTATS is not set | ||
71 | # CONFIG_UTS_NS is not set | ||
72 | CONFIG_AUDIT=y | ||
73 | # CONFIG_AUDITSYSCALL is not set | ||
74 | CONFIG_IKCONFIG=y | ||
75 | CONFIG_IKCONFIG_PROC=y | ||
76 | CONFIG_SYSFS_DEPRECATED=y | ||
77 | # CONFIG_RELAY is not set | ||
78 | CONFIG_BLK_DEV_INITRD=y | ||
79 | CONFIG_INITRAMFS_SOURCE="" | ||
80 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
81 | CONFIG_SYSCTL=y | ||
82 | CONFIG_EMBEDDED=y | ||
83 | CONFIG_SYSCTL_SYSCALL=y | ||
84 | CONFIG_KALLSYMS=y | ||
85 | CONFIG_KALLSYMS_ALL=y | ||
86 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
87 | # CONFIG_HOTPLUG is not set | ||
88 | CONFIG_PRINTK=y | ||
89 | CONFIG_BUG=y | ||
90 | CONFIG_ELF_CORE=y | ||
91 | CONFIG_BASE_FULL=y | ||
92 | CONFIG_FUTEX=y | ||
93 | CONFIG_EPOLL=y | ||
94 | CONFIG_SHMEM=y | ||
95 | CONFIG_SLAB=y | ||
96 | CONFIG_VM_EVENT_COUNTERS=y | ||
97 | CONFIG_RT_MUTEXES=y | ||
98 | # CONFIG_TINY_SHMEM is not set | ||
99 | CONFIG_BASE_SMALL=0 | ||
100 | # CONFIG_SLOB is not set | ||
101 | |||
102 | # | ||
103 | # Loadable module support | ||
104 | # | ||
105 | CONFIG_MODULES=y | ||
106 | CONFIG_MODULE_UNLOAD=y | ||
107 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
108 | CONFIG_MODVERSIONS=y | ||
109 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
110 | CONFIG_KMOD=y | ||
111 | |||
112 | # | ||
113 | # Block layer | ||
114 | # | ||
115 | CONFIG_BLOCK=y | ||
116 | CONFIG_LBD=y | ||
117 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
118 | # CONFIG_LSF is not set | ||
119 | |||
120 | # | ||
121 | # IO Schedulers | ||
122 | # | ||
123 | CONFIG_IOSCHED_NOOP=y | ||
124 | CONFIG_IOSCHED_AS=y | ||
125 | CONFIG_IOSCHED_DEADLINE=y | ||
126 | CONFIG_IOSCHED_CFQ=y | ||
127 | # CONFIG_DEFAULT_AS is not set | ||
128 | # CONFIG_DEFAULT_DEADLINE is not set | ||
129 | CONFIG_DEFAULT_CFQ=y | ||
130 | # CONFIG_DEFAULT_NOOP is not set | ||
131 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
132 | # CONFIG_WANT_EARLY_SERIAL is not set | ||
133 | |||
134 | # | ||
135 | # Platform support | ||
136 | # | ||
137 | # CONFIG_MPC8540_ADS is not set | ||
138 | # CONFIG_MPC8560_ADS is not set | ||
139 | # CONFIG_MPC85xx_CDS is not set | ||
140 | # CONFIG_MPC85xx_MDS is not set | ||
141 | CONFIG_MPC8544_DS=y | ||
142 | CONFIG_MPC85xx=y | ||
143 | CONFIG_PPC_INDIRECT_PCI_BE=y | ||
144 | CONFIG_MPIC=y | ||
145 | |||
146 | # | ||
147 | # Kernel options | ||
148 | # | ||
149 | CONFIG_HIGHMEM=y | ||
150 | # CONFIG_HZ_100 is not set | ||
151 | CONFIG_HZ_250=y | ||
152 | # CONFIG_HZ_300 is not set | ||
153 | # CONFIG_HZ_1000 is not set | ||
154 | CONFIG_HZ=250 | ||
155 | CONFIG_PREEMPT_NONE=y | ||
156 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
157 | # CONFIG_PREEMPT is not set | ||
158 | CONFIG_BINFMT_ELF=y | ||
159 | CONFIG_BINFMT_MISC=m | ||
160 | CONFIG_MATH_EMULATION=y | ||
161 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
162 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
163 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
164 | CONFIG_SELECT_MEMORY_MODEL=y | ||
165 | CONFIG_FLATMEM_MANUAL=y | ||
166 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
167 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
168 | CONFIG_FLATMEM=y | ||
169 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
170 | # CONFIG_SPARSEMEM_STATIC is not set | ||
171 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
172 | # CONFIG_RESOURCES_64BIT is not set | ||
173 | CONFIG_ZONE_DMA_FLAG=1 | ||
174 | CONFIG_PROC_DEVICETREE=y | ||
175 | CONFIG_CMDLINE_BOOL=y | ||
176 | CONFIG_CMDLINE="root=/dev/sda3 rw console=ttyS0,115200" | ||
177 | # CONFIG_PM is not set | ||
178 | CONFIG_SECCOMP=y | ||
179 | CONFIG_ISA_DMA_API=y | ||
180 | |||
181 | # | ||
182 | # Bus options | ||
183 | # | ||
184 | CONFIG_ZONE_DMA=y | ||
185 | # CONFIG_MPIC_WEIRD is not set | ||
186 | # CONFIG_PPC_I8259 is not set | ||
187 | CONFIG_PPC_INDIRECT_PCI=y | ||
188 | CONFIG_FSL_SOC=y | ||
189 | # CONFIG_PCI is not set | ||
190 | # CONFIG_PCI_DOMAINS is not set | ||
191 | |||
192 | # | ||
193 | # PCCARD (PCMCIA/CardBus) support | ||
194 | # | ||
195 | |||
196 | # | ||
197 | # PCI Hotplug Support | ||
198 | # | ||
199 | |||
200 | # | ||
201 | # Advanced setup | ||
202 | # | ||
203 | # CONFIG_ADVANCED_OPTIONS is not set | ||
204 | |||
205 | # | ||
206 | # Default settings for advanced configuration options are used | ||
207 | # | ||
208 | CONFIG_HIGHMEM_START=0xfe000000 | ||
209 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
210 | CONFIG_KERNEL_START=0xc0000000 | ||
211 | CONFIG_TASK_SIZE=0x80000000 | ||
212 | CONFIG_BOOT_LOAD=0x00800000 | ||
213 | |||
214 | # | ||
215 | # Networking | ||
216 | # | ||
217 | CONFIG_NET=y | ||
218 | |||
219 | # | ||
220 | # Networking options | ||
221 | # | ||
222 | # CONFIG_NETDEBUG is not set | ||
223 | CONFIG_PACKET=y | ||
224 | # CONFIG_PACKET_MMAP is not set | ||
225 | CONFIG_UNIX=y | ||
226 | CONFIG_XFRM=y | ||
227 | CONFIG_XFRM_USER=m | ||
228 | # CONFIG_XFRM_SUB_POLICY is not set | ||
229 | # CONFIG_XFRM_MIGRATE is not set | ||
230 | CONFIG_NET_KEY=m | ||
231 | # CONFIG_NET_KEY_MIGRATE is not set | ||
232 | CONFIG_INET=y | ||
233 | CONFIG_IP_MULTICAST=y | ||
234 | CONFIG_IP_ADVANCED_ROUTER=y | ||
235 | CONFIG_ASK_IP_FIB_HASH=y | ||
236 | # CONFIG_IP_FIB_TRIE is not set | ||
237 | CONFIG_IP_FIB_HASH=y | ||
238 | CONFIG_IP_MULTIPLE_TABLES=y | ||
239 | CONFIG_IP_ROUTE_MULTIPATH=y | ||
240 | # CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set | ||
241 | CONFIG_IP_ROUTE_VERBOSE=y | ||
242 | CONFIG_IP_PNP=y | ||
243 | CONFIG_IP_PNP_DHCP=y | ||
244 | CONFIG_IP_PNP_BOOTP=y | ||
245 | CONFIG_IP_PNP_RARP=y | ||
246 | CONFIG_NET_IPIP=y | ||
247 | CONFIG_NET_IPGRE=y | ||
248 | CONFIG_NET_IPGRE_BROADCAST=y | ||
249 | CONFIG_IP_MROUTE=y | ||
250 | CONFIG_IP_PIMSM_V1=y | ||
251 | CONFIG_IP_PIMSM_V2=y | ||
252 | CONFIG_ARPD=y | ||
253 | # CONFIG_SYN_COOKIES is not set | ||
254 | # CONFIG_INET_AH is not set | ||
255 | # CONFIG_INET_ESP is not set | ||
256 | # CONFIG_INET_IPCOMP is not set | ||
257 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
258 | CONFIG_INET_TUNNEL=y | ||
259 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
260 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
261 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
262 | CONFIG_INET_DIAG=y | ||
263 | CONFIG_INET_TCP_DIAG=y | ||
264 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
265 | CONFIG_TCP_CONG_CUBIC=y | ||
266 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
267 | # CONFIG_TCP_MD5SIG is not set | ||
268 | # CONFIG_IPV6 is not set | ||
269 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
270 | # CONFIG_INET6_TUNNEL is not set | ||
271 | # CONFIG_NETWORK_SECMARK is not set | ||
272 | # CONFIG_NETFILTER is not set | ||
273 | |||
274 | # | ||
275 | # DCCP Configuration (EXPERIMENTAL) | ||
276 | # | ||
277 | # CONFIG_IP_DCCP is not set | ||
278 | |||
279 | # | ||
280 | # SCTP Configuration (EXPERIMENTAL) | ||
281 | # | ||
282 | CONFIG_IP_SCTP=m | ||
283 | # CONFIG_SCTP_DBG_MSG is not set | ||
284 | # CONFIG_SCTP_DBG_OBJCNT is not set | ||
285 | # CONFIG_SCTP_HMAC_NONE is not set | ||
286 | # CONFIG_SCTP_HMAC_SHA1 is not set | ||
287 | CONFIG_SCTP_HMAC_MD5=y | ||
288 | |||
289 | # | ||
290 | # TIPC Configuration (EXPERIMENTAL) | ||
291 | # | ||
292 | # CONFIG_TIPC is not set | ||
293 | # CONFIG_ATM is not set | ||
294 | # CONFIG_BRIDGE is not set | ||
295 | # CONFIG_VLAN_8021Q is not set | ||
296 | # CONFIG_DECNET is not set | ||
297 | # CONFIG_LLC2 is not set | ||
298 | # CONFIG_IPX is not set | ||
299 | # CONFIG_ATALK is not set | ||
300 | # CONFIG_X25 is not set | ||
301 | # CONFIG_LAPB is not set | ||
302 | # CONFIG_ECONET is not set | ||
303 | # CONFIG_WAN_ROUTER is not set | ||
304 | |||
305 | # | ||
306 | # QoS and/or fair queueing | ||
307 | # | ||
308 | # CONFIG_NET_SCHED is not set | ||
309 | |||
310 | # | ||
311 | # Network testing | ||
312 | # | ||
313 | # CONFIG_NET_PKTGEN is not set | ||
314 | # CONFIG_HAMRADIO is not set | ||
315 | # CONFIG_IRDA is not set | ||
316 | # CONFIG_BT is not set | ||
317 | # CONFIG_IEEE80211 is not set | ||
318 | CONFIG_FIB_RULES=y | ||
319 | |||
320 | # | ||
321 | # Device Drivers | ||
322 | # | ||
323 | |||
324 | # | ||
325 | # Generic Driver Options | ||
326 | # | ||
327 | CONFIG_STANDALONE=y | ||
328 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
329 | # CONFIG_DEBUG_DRIVER is not set | ||
330 | # CONFIG_DEBUG_DEVRES is not set | ||
331 | # CONFIG_SYS_HYPERVISOR is not set | ||
332 | |||
333 | # | ||
334 | # Connector - unified userspace <-> kernelspace linker | ||
335 | # | ||
336 | # CONFIG_CONNECTOR is not set | ||
337 | |||
338 | # | ||
339 | # Memory Technology Devices (MTD) | ||
340 | # | ||
341 | # CONFIG_MTD is not set | ||
342 | |||
343 | # | ||
344 | # Parallel port support | ||
345 | # | ||
346 | # CONFIG_PARPORT is not set | ||
347 | |||
348 | # | ||
349 | # Plug and Play support | ||
350 | # | ||
351 | # CONFIG_PNPACPI is not set | ||
352 | |||
353 | # | ||
354 | # Block devices | ||
355 | # | ||
356 | # CONFIG_BLK_DEV_FD is not set | ||
357 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
358 | CONFIG_BLK_DEV_LOOP=y | ||
359 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
360 | CONFIG_BLK_DEV_NBD=y | ||
361 | CONFIG_BLK_DEV_RAM=y | ||
362 | CONFIG_BLK_DEV_RAM_COUNT=2 | ||
363 | CONFIG_BLK_DEV_RAM_SIZE=16384 | ||
364 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
365 | # CONFIG_CDROM_PKTCDVD is not set | ||
366 | # CONFIG_ATA_OVER_ETH is not set | ||
367 | |||
368 | # | ||
369 | # Misc devices | ||
370 | # | ||
371 | |||
372 | # | ||
373 | # ATA/ATAPI/MFM/RLL support | ||
374 | # | ||
375 | # CONFIG_IDE is not set | ||
376 | |||
377 | # | ||
378 | # SCSI device support | ||
379 | # | ||
380 | # CONFIG_RAID_ATTRS is not set | ||
381 | CONFIG_SCSI=y | ||
382 | # CONFIG_SCSI_TGT is not set | ||
383 | # CONFIG_SCSI_NETLINK is not set | ||
384 | CONFIG_SCSI_PROC_FS=y | ||
385 | |||
386 | # | ||
387 | # SCSI support type (disk, tape, CD-ROM) | ||
388 | # | ||
389 | CONFIG_BLK_DEV_SD=y | ||
390 | CONFIG_CHR_DEV_ST=y | ||
391 | # CONFIG_CHR_DEV_OSST is not set | ||
392 | # CONFIG_BLK_DEV_SR is not set | ||
393 | CONFIG_CHR_DEV_SG=y | ||
394 | # CONFIG_CHR_DEV_SCH is not set | ||
395 | |||
396 | # | ||
397 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
398 | # | ||
399 | CONFIG_SCSI_MULTI_LUN=y | ||
400 | # CONFIG_SCSI_CONSTANTS is not set | ||
401 | CONFIG_SCSI_LOGGING=y | ||
402 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
403 | |||
404 | # | ||
405 | # SCSI Transports | ||
406 | # | ||
407 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
408 | # CONFIG_SCSI_FC_ATTRS is not set | ||
409 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
410 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
411 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
412 | |||
413 | # | ||
414 | # SCSI low-level drivers | ||
415 | # | ||
416 | # CONFIG_ISCSI_TCP is not set | ||
417 | # CONFIG_SCSI_DEBUG is not set | ||
418 | |||
419 | # | ||
420 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
421 | # | ||
422 | CONFIG_ATA=y | ||
423 | # CONFIG_ATA_NONSTANDARD is not set | ||
424 | # CONFIG_PATA_PLATFORM is not set | ||
425 | |||
426 | # | ||
427 | # Multi-device support (RAID and LVM) | ||
428 | # | ||
429 | # CONFIG_MD is not set | ||
430 | |||
431 | # | ||
432 | # Fusion MPT device support | ||
433 | # | ||
434 | # CONFIG_FUSION is not set | ||
435 | |||
436 | # | ||
437 | # IEEE 1394 (FireWire) support | ||
438 | # | ||
439 | |||
440 | # | ||
441 | # I2O device support | ||
442 | # | ||
443 | |||
444 | # | ||
445 | # Macintosh device drivers | ||
446 | # | ||
447 | # CONFIG_MAC_EMUMOUSEBTN is not set | ||
448 | # CONFIG_WINDFARM is not set | ||
449 | |||
450 | # | ||
451 | # Network device support | ||
452 | # | ||
453 | CONFIG_NETDEVICES=y | ||
454 | # CONFIG_DUMMY is not set | ||
455 | # CONFIG_BONDING is not set | ||
456 | # CONFIG_EQUALIZER is not set | ||
457 | # CONFIG_TUN is not set | ||
458 | |||
459 | # | ||
460 | # PHY device support | ||
461 | # | ||
462 | CONFIG_PHYLIB=y | ||
463 | |||
464 | # | ||
465 | # MII PHY device drivers | ||
466 | # | ||
467 | # CONFIG_MARVELL_PHY is not set | ||
468 | # CONFIG_DAVICOM_PHY is not set | ||
469 | # CONFIG_QSEMI_PHY is not set | ||
470 | # CONFIG_LXT_PHY is not set | ||
471 | # CONFIG_CICADA_PHY is not set | ||
472 | CONFIG_VITESSE_PHY=y | ||
473 | # CONFIG_SMSC_PHY is not set | ||
474 | # CONFIG_BROADCOM_PHY is not set | ||
475 | # CONFIG_FIXED_PHY is not set | ||
476 | |||
477 | # | ||
478 | # Ethernet (10 or 100Mbit) | ||
479 | # | ||
480 | CONFIG_NET_ETHERNET=y | ||
481 | CONFIG_MII=y | ||
482 | |||
483 | # | ||
484 | # Ethernet (1000 Mbit) | ||
485 | # | ||
486 | CONFIG_GIANFAR=y | ||
487 | CONFIG_GFAR_NAPI=y | ||
488 | |||
489 | # | ||
490 | # Ethernet (10000 Mbit) | ||
491 | # | ||
492 | |||
493 | # | ||
494 | # Token Ring devices | ||
495 | # | ||
496 | |||
497 | # | ||
498 | # Wireless LAN (non-hamradio) | ||
499 | # | ||
500 | # CONFIG_NET_RADIO is not set | ||
501 | |||
502 | # | ||
503 | # Wan interfaces | ||
504 | # | ||
505 | # CONFIG_WAN is not set | ||
506 | # CONFIG_PPP is not set | ||
507 | # CONFIG_SLIP is not set | ||
508 | # CONFIG_SHAPER is not set | ||
509 | # CONFIG_NETCONSOLE is not set | ||
510 | # CONFIG_NETPOLL is not set | ||
511 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
512 | |||
513 | # | ||
514 | # ISDN subsystem | ||
515 | # | ||
516 | # CONFIG_ISDN is not set | ||
517 | |||
518 | # | ||
519 | # Telephony Support | ||
520 | # | ||
521 | # CONFIG_PHONE is not set | ||
522 | |||
523 | # | ||
524 | # Input device support | ||
525 | # | ||
526 | CONFIG_INPUT=y | ||
527 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
528 | |||
529 | # | ||
530 | # Userland interfaces | ||
531 | # | ||
532 | # CONFIG_INPUT_MOUSEDEV is not set | ||
533 | # CONFIG_INPUT_JOYDEV is not set | ||
534 | # CONFIG_INPUT_TSDEV is not set | ||
535 | # CONFIG_INPUT_EVDEV is not set | ||
536 | # CONFIG_INPUT_EVBUG is not set | ||
537 | |||
538 | # | ||
539 | # Input Device Drivers | ||
540 | # | ||
541 | # CONFIG_INPUT_KEYBOARD is not set | ||
542 | # CONFIG_INPUT_MOUSE is not set | ||
543 | # CONFIG_INPUT_JOYSTICK is not set | ||
544 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
545 | # CONFIG_INPUT_MISC is not set | ||
546 | |||
547 | # | ||
548 | # Hardware I/O ports | ||
549 | # | ||
550 | CONFIG_SERIO=y | ||
551 | CONFIG_SERIO_I8042=y | ||
552 | CONFIG_SERIO_SERPORT=y | ||
553 | CONFIG_SERIO_LIBPS2=y | ||
554 | # CONFIG_SERIO_RAW is not set | ||
555 | # CONFIG_GAMEPORT is not set | ||
556 | |||
557 | # | ||
558 | # Character devices | ||
559 | # | ||
560 | CONFIG_VT=y | ||
561 | CONFIG_VT_CONSOLE=y | ||
562 | CONFIG_HW_CONSOLE=y | ||
563 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
564 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
565 | |||
566 | # | ||
567 | # Serial drivers | ||
568 | # | ||
569 | CONFIG_SERIAL_8250=y | ||
570 | CONFIG_SERIAL_8250_CONSOLE=y | ||
571 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
572 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
573 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
574 | |||
575 | # | ||
576 | # Non-8250 serial port support | ||
577 | # | ||
578 | # CONFIG_SERIAL_UARTLITE is not set | ||
579 | CONFIG_SERIAL_CORE=y | ||
580 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
581 | # CONFIG_SERIAL_OF_PLATFORM is not set | ||
582 | CONFIG_UNIX98_PTYS=y | ||
583 | CONFIG_LEGACY_PTYS=y | ||
584 | CONFIG_LEGACY_PTY_COUNT=256 | ||
585 | |||
586 | # | ||
587 | # IPMI | ||
588 | # | ||
589 | # CONFIG_IPMI_HANDLER is not set | ||
590 | |||
591 | # | ||
592 | # Watchdog Cards | ||
593 | # | ||
594 | # CONFIG_WATCHDOG is not set | ||
595 | # CONFIG_HW_RANDOM is not set | ||
596 | CONFIG_NVRAM=y | ||
597 | CONFIG_GEN_RTC=y | ||
598 | CONFIG_GEN_RTC_X=y | ||
599 | # CONFIG_DTLK is not set | ||
600 | # CONFIG_R3964 is not set | ||
601 | # CONFIG_RAW_DRIVER is not set | ||
602 | |||
603 | # | ||
604 | # TPM devices | ||
605 | # | ||
606 | # CONFIG_TCG_TPM is not set | ||
607 | |||
608 | # | ||
609 | # I2C support | ||
610 | # | ||
611 | # CONFIG_I2C is not set | ||
612 | |||
613 | # | ||
614 | # SPI support | ||
615 | # | ||
616 | # CONFIG_SPI is not set | ||
617 | # CONFIG_SPI_MASTER is not set | ||
618 | |||
619 | # | ||
620 | # Dallas's 1-wire bus | ||
621 | # | ||
622 | # CONFIG_W1 is not set | ||
623 | |||
624 | # | ||
625 | # Hardware Monitoring support | ||
626 | # | ||
627 | # CONFIG_HWMON is not set | ||
628 | # CONFIG_HWMON_VID is not set | ||
629 | |||
630 | # | ||
631 | # Multifunction device drivers | ||
632 | # | ||
633 | # CONFIG_MFD_SM501 is not set | ||
634 | |||
635 | # | ||
636 | # Multimedia devices | ||
637 | # | ||
638 | # CONFIG_VIDEO_DEV is not set | ||
639 | |||
640 | # | ||
641 | # Digital Video Broadcasting Devices | ||
642 | # | ||
643 | CONFIG_DVB=y | ||
644 | CONFIG_DVB_CORE=m | ||
645 | # CONFIG_DVB_CORE_ATTACH is not set | ||
646 | |||
647 | # | ||
648 | # Supported DVB Frontends | ||
649 | # | ||
650 | |||
651 | # | ||
652 | # Customise DVB Frontends | ||
653 | # | ||
654 | # CONFIG_DVB_FE_CUSTOMISE is not set | ||
655 | |||
656 | # | ||
657 | # DVB-S (satellite) frontends | ||
658 | # | ||
659 | |||
660 | # | ||
661 | # DVB-T (terrestrial) frontends | ||
662 | # | ||
663 | |||
664 | # | ||
665 | # DVB-C (cable) frontends | ||
666 | # | ||
667 | |||
668 | # | ||
669 | # ATSC (North American/Korean Terrestrial/Cable DTV) frontends | ||
670 | # | ||
671 | |||
672 | # | ||
673 | # Tuners/PLL support | ||
674 | # | ||
675 | |||
676 | # | ||
677 | # Miscellaneous devices | ||
678 | # | ||
679 | |||
680 | # | ||
681 | # Graphics support | ||
682 | # | ||
683 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
684 | # CONFIG_FB is not set | ||
685 | # CONFIG_FB_IBM_GXT4500 is not set | ||
686 | |||
687 | # | ||
688 | # Console display driver support | ||
689 | # | ||
690 | # CONFIG_VGA_CONSOLE is not set | ||
691 | CONFIG_DUMMY_CONSOLE=y | ||
692 | |||
693 | # | ||
694 | # Sound | ||
695 | # | ||
696 | # CONFIG_SOUND is not set | ||
697 | |||
698 | # | ||
699 | # HID Devices | ||
700 | # | ||
701 | CONFIG_HID=y | ||
702 | # CONFIG_HID_DEBUG is not set | ||
703 | |||
704 | # | ||
705 | # USB support | ||
706 | # | ||
707 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
708 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
709 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
710 | |||
711 | # | ||
712 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
713 | # | ||
714 | |||
715 | # | ||
716 | # USB Gadget Support | ||
717 | # | ||
718 | # CONFIG_USB_GADGET is not set | ||
719 | |||
720 | # | ||
721 | # MMC/SD Card support | ||
722 | # | ||
723 | # CONFIG_MMC is not set | ||
724 | |||
725 | # | ||
726 | # LED devices | ||
727 | # | ||
728 | # CONFIG_NEW_LEDS is not set | ||
729 | |||
730 | # | ||
731 | # LED drivers | ||
732 | # | ||
733 | |||
734 | # | ||
735 | # LED Triggers | ||
736 | # | ||
737 | |||
738 | # | ||
739 | # InfiniBand support | ||
740 | # | ||
741 | |||
742 | # | ||
743 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
744 | # | ||
745 | |||
746 | # | ||
747 | # Real Time Clock | ||
748 | # | ||
749 | CONFIG_RTC_LIB=y | ||
750 | CONFIG_RTC_CLASS=y | ||
751 | CONFIG_RTC_HCTOSYS=y | ||
752 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
753 | # CONFIG_RTC_DEBUG is not set | ||
754 | |||
755 | # | ||
756 | # RTC interfaces | ||
757 | # | ||
758 | CONFIG_RTC_INTF_SYSFS=y | ||
759 | CONFIG_RTC_INTF_PROC=y | ||
760 | CONFIG_RTC_INTF_DEV=y | ||
761 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
762 | |||
763 | # | ||
764 | # RTC drivers | ||
765 | # | ||
766 | # CONFIG_RTC_DRV_DS1553 is not set | ||
767 | # CONFIG_RTC_DRV_DS1742 is not set | ||
768 | # CONFIG_RTC_DRV_M48T86 is not set | ||
769 | # CONFIG_RTC_DRV_TEST is not set | ||
770 | # CONFIG_RTC_DRV_V3020 is not set | ||
771 | |||
772 | # | ||
773 | # DMA Engine support | ||
774 | # | ||
775 | # CONFIG_DMA_ENGINE is not set | ||
776 | |||
777 | # | ||
778 | # DMA Clients | ||
779 | # | ||
780 | |||
781 | # | ||
782 | # DMA Devices | ||
783 | # | ||
784 | |||
785 | # | ||
786 | # Auxiliary Display support | ||
787 | # | ||
788 | |||
789 | # | ||
790 | # Virtualization | ||
791 | # | ||
792 | |||
793 | # | ||
794 | # File systems | ||
795 | # | ||
796 | CONFIG_EXT2_FS=y | ||
797 | # CONFIG_EXT2_FS_XATTR is not set | ||
798 | # CONFIG_EXT2_FS_XIP is not set | ||
799 | CONFIG_EXT3_FS=y | ||
800 | CONFIG_EXT3_FS_XATTR=y | ||
801 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
802 | # CONFIG_EXT3_FS_SECURITY is not set | ||
803 | # CONFIG_EXT4DEV_FS is not set | ||
804 | CONFIG_JBD=y | ||
805 | # CONFIG_JBD_DEBUG is not set | ||
806 | CONFIG_FS_MBCACHE=y | ||
807 | # CONFIG_REISERFS_FS is not set | ||
808 | # CONFIG_JFS_FS is not set | ||
809 | # CONFIG_FS_POSIX_ACL is not set | ||
810 | # CONFIG_XFS_FS is not set | ||
811 | # CONFIG_GFS2_FS is not set | ||
812 | # CONFIG_OCFS2_FS is not set | ||
813 | # CONFIG_MINIX_FS is not set | ||
814 | # CONFIG_ROMFS_FS is not set | ||
815 | CONFIG_INOTIFY=y | ||
816 | CONFIG_INOTIFY_USER=y | ||
817 | # CONFIG_QUOTA is not set | ||
818 | CONFIG_DNOTIFY=y | ||
819 | # CONFIG_AUTOFS_FS is not set | ||
820 | # CONFIG_AUTOFS4_FS is not set | ||
821 | # CONFIG_FUSE_FS is not set | ||
822 | |||
823 | # | ||
824 | # CD-ROM/DVD Filesystems | ||
825 | # | ||
826 | CONFIG_ISO9660_FS=m | ||
827 | CONFIG_JOLIET=y | ||
828 | CONFIG_ZISOFS=y | ||
829 | CONFIG_UDF_FS=m | ||
830 | CONFIG_UDF_NLS=y | ||
831 | |||
832 | # | ||
833 | # DOS/FAT/NT Filesystems | ||
834 | # | ||
835 | CONFIG_FAT_FS=y | ||
836 | CONFIG_MSDOS_FS=m | ||
837 | CONFIG_VFAT_FS=y | ||
838 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
839 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
840 | CONFIG_NTFS_FS=y | ||
841 | # CONFIG_NTFS_DEBUG is not set | ||
842 | # CONFIG_NTFS_RW is not set | ||
843 | |||
844 | # | ||
845 | # Pseudo filesystems | ||
846 | # | ||
847 | CONFIG_PROC_FS=y | ||
848 | CONFIG_PROC_KCORE=y | ||
849 | CONFIG_PROC_SYSCTL=y | ||
850 | CONFIG_SYSFS=y | ||
851 | CONFIG_TMPFS=y | ||
852 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
853 | # CONFIG_HUGETLB_PAGE is not set | ||
854 | CONFIG_RAMFS=y | ||
855 | # CONFIG_CONFIGFS_FS is not set | ||
856 | |||
857 | # | ||
858 | # Miscellaneous filesystems | ||
859 | # | ||
860 | CONFIG_ADFS_FS=m | ||
861 | # CONFIG_ADFS_FS_RW is not set | ||
862 | CONFIG_AFFS_FS=m | ||
863 | CONFIG_HFS_FS=m | ||
864 | CONFIG_HFSPLUS_FS=m | ||
865 | CONFIG_BEFS_FS=m | ||
866 | # CONFIG_BEFS_DEBUG is not set | ||
867 | CONFIG_BFS_FS=m | ||
868 | CONFIG_EFS_FS=m | ||
869 | CONFIG_CRAMFS=y | ||
870 | CONFIG_VXFS_FS=m | ||
871 | CONFIG_HPFS_FS=m | ||
872 | CONFIG_QNX4FS_FS=m | ||
873 | CONFIG_SYSV_FS=m | ||
874 | CONFIG_UFS_FS=m | ||
875 | # CONFIG_UFS_FS_WRITE is not set | ||
876 | # CONFIG_UFS_DEBUG is not set | ||
877 | |||
878 | # | ||
879 | # Network File Systems | ||
880 | # | ||
881 | CONFIG_NFS_FS=y | ||
882 | CONFIG_NFS_V3=y | ||
883 | # CONFIG_NFS_V3_ACL is not set | ||
884 | CONFIG_NFS_V4=y | ||
885 | # CONFIG_NFS_DIRECTIO is not set | ||
886 | # CONFIG_NFSD is not set | ||
887 | CONFIG_ROOT_NFS=y | ||
888 | CONFIG_LOCKD=y | ||
889 | CONFIG_LOCKD_V4=y | ||
890 | CONFIG_NFS_COMMON=y | ||
891 | CONFIG_SUNRPC=y | ||
892 | CONFIG_SUNRPC_GSS=y | ||
893 | CONFIG_RPCSEC_GSS_KRB5=y | ||
894 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
895 | # CONFIG_SMB_FS is not set | ||
896 | # CONFIG_CIFS is not set | ||
897 | # CONFIG_NCP_FS is not set | ||
898 | # CONFIG_CODA_FS is not set | ||
899 | # CONFIG_AFS_FS is not set | ||
900 | # CONFIG_9P_FS is not set | ||
901 | |||
902 | # | ||
903 | # Partition Types | ||
904 | # | ||
905 | CONFIG_PARTITION_ADVANCED=y | ||
906 | # CONFIG_ACORN_PARTITION is not set | ||
907 | # CONFIG_OSF_PARTITION is not set | ||
908 | # CONFIG_AMIGA_PARTITION is not set | ||
909 | # CONFIG_ATARI_PARTITION is not set | ||
910 | # CONFIG_MAC_PARTITION is not set | ||
911 | CONFIG_MSDOS_PARTITION=y | ||
912 | # CONFIG_BSD_DISKLABEL is not set | ||
913 | # CONFIG_MINIX_SUBPARTITION is not set | ||
914 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
915 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
916 | # CONFIG_LDM_PARTITION is not set | ||
917 | # CONFIG_SGI_PARTITION is not set | ||
918 | # CONFIG_ULTRIX_PARTITION is not set | ||
919 | # CONFIG_SUN_PARTITION is not set | ||
920 | # CONFIG_KARMA_PARTITION is not set | ||
921 | # CONFIG_EFI_PARTITION is not set | ||
922 | |||
923 | # | ||
924 | # Native Language Support | ||
925 | # | ||
926 | CONFIG_NLS=y | ||
927 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
928 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
929 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
930 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
931 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
932 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
933 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
934 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
935 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
936 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
937 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
938 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
939 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
940 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
941 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
942 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
943 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
944 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
945 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
946 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
947 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
948 | # CONFIG_NLS_ISO8859_8 is not set | ||
949 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
950 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
951 | # CONFIG_NLS_ASCII is not set | ||
952 | # CONFIG_NLS_ISO8859_1 is not set | ||
953 | # CONFIG_NLS_ISO8859_2 is not set | ||
954 | # CONFIG_NLS_ISO8859_3 is not set | ||
955 | # CONFIG_NLS_ISO8859_4 is not set | ||
956 | # CONFIG_NLS_ISO8859_5 is not set | ||
957 | # CONFIG_NLS_ISO8859_6 is not set | ||
958 | # CONFIG_NLS_ISO8859_7 is not set | ||
959 | # CONFIG_NLS_ISO8859_9 is not set | ||
960 | # CONFIG_NLS_ISO8859_13 is not set | ||
961 | # CONFIG_NLS_ISO8859_14 is not set | ||
962 | # CONFIG_NLS_ISO8859_15 is not set | ||
963 | # CONFIG_NLS_KOI8_R is not set | ||
964 | # CONFIG_NLS_KOI8_U is not set | ||
965 | CONFIG_NLS_UTF8=m | ||
966 | |||
967 | # | ||
968 | # Distributed Lock Manager | ||
969 | # | ||
970 | # CONFIG_DLM is not set | ||
971 | |||
972 | # | ||
973 | # Library routines | ||
974 | # | ||
975 | CONFIG_BITREVERSE=y | ||
976 | # CONFIG_CRC_CCITT is not set | ||
977 | # CONFIG_CRC16 is not set | ||
978 | CONFIG_CRC32=y | ||
979 | CONFIG_LIBCRC32C=m | ||
980 | CONFIG_ZLIB_INFLATE=y | ||
981 | CONFIG_PLIST=y | ||
982 | CONFIG_HAS_IOMEM=y | ||
983 | CONFIG_HAS_IOPORT=y | ||
984 | |||
985 | # | ||
986 | # Instrumentation Support | ||
987 | # | ||
988 | # CONFIG_PROFILING is not set | ||
989 | |||
990 | # | ||
991 | # Kernel hacking | ||
992 | # | ||
993 | # CONFIG_PRINTK_TIME is not set | ||
994 | CONFIG_ENABLE_MUST_CHECK=y | ||
995 | # CONFIG_MAGIC_SYSRQ is not set | ||
996 | # CONFIG_UNUSED_SYMBOLS is not set | ||
997 | # CONFIG_DEBUG_FS is not set | ||
998 | # CONFIG_HEADERS_CHECK is not set | ||
999 | CONFIG_DEBUG_KERNEL=y | ||
1000 | # CONFIG_DEBUG_SHIRQ is not set | ||
1001 | CONFIG_LOG_BUF_SHIFT=14 | ||
1002 | CONFIG_DETECT_SOFTLOCKUP=y | ||
1003 | # CONFIG_SCHEDSTATS is not set | ||
1004 | # CONFIG_TIMER_STATS is not set | ||
1005 | # CONFIG_DEBUG_SLAB is not set | ||
1006 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
1007 | # CONFIG_RT_MUTEX_TESTER is not set | ||
1008 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1009 | # CONFIG_DEBUG_MUTEXES is not set | ||
1010 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
1011 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
1012 | # CONFIG_DEBUG_KOBJECT is not set | ||
1013 | # CONFIG_DEBUG_HIGHMEM is not set | ||
1014 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
1015 | CONFIG_DEBUG_INFO=y | ||
1016 | # CONFIG_DEBUG_VM is not set | ||
1017 | # CONFIG_DEBUG_LIST is not set | ||
1018 | CONFIG_FORCED_INLINING=y | ||
1019 | # CONFIG_RCU_TORTURE_TEST is not set | ||
1020 | # CONFIG_FAULT_INJECTION is not set | ||
1021 | # CONFIG_DEBUG_STACKOVERFLOW is not set | ||
1022 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
1023 | # CONFIG_DEBUGGER is not set | ||
1024 | # CONFIG_BDI_SWITCH is not set | ||
1025 | # CONFIG_BOOTX_TEXT is not set | ||
1026 | # CONFIG_PPC_EARLY_DEBUG is not set | ||
1027 | |||
1028 | # | ||
1029 | # Security options | ||
1030 | # | ||
1031 | # CONFIG_KEYS is not set | ||
1032 | # CONFIG_SECURITY is not set | ||
1033 | |||
1034 | # | ||
1035 | # Cryptographic options | ||
1036 | # | ||
1037 | CONFIG_CRYPTO=y | ||
1038 | CONFIG_CRYPTO_ALGAPI=y | ||
1039 | CONFIG_CRYPTO_BLKCIPHER=y | ||
1040 | CONFIG_CRYPTO_HASH=y | ||
1041 | CONFIG_CRYPTO_MANAGER=y | ||
1042 | CONFIG_CRYPTO_HMAC=y | ||
1043 | # CONFIG_CRYPTO_XCBC is not set | ||
1044 | # CONFIG_CRYPTO_NULL is not set | ||
1045 | # CONFIG_CRYPTO_MD4 is not set | ||
1046 | CONFIG_CRYPTO_MD5=y | ||
1047 | # CONFIG_CRYPTO_SHA1 is not set | ||
1048 | # CONFIG_CRYPTO_SHA256 is not set | ||
1049 | # CONFIG_CRYPTO_SHA512 is not set | ||
1050 | # CONFIG_CRYPTO_WP512 is not set | ||
1051 | # CONFIG_CRYPTO_TGR192 is not set | ||
1052 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1053 | # CONFIG_CRYPTO_ECB is not set | ||
1054 | CONFIG_CRYPTO_CBC=y | ||
1055 | CONFIG_CRYPTO_PCBC=m | ||
1056 | # CONFIG_CRYPTO_LRW is not set | ||
1057 | CONFIG_CRYPTO_DES=y | ||
1058 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1059 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1060 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1061 | # CONFIG_CRYPTO_SERPENT is not set | ||
1062 | # CONFIG_CRYPTO_AES is not set | ||
1063 | # CONFIG_CRYPTO_CAST5 is not set | ||
1064 | # CONFIG_CRYPTO_CAST6 is not set | ||
1065 | # CONFIG_CRYPTO_TEA is not set | ||
1066 | # CONFIG_CRYPTO_ARC4 is not set | ||
1067 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1068 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1069 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1070 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1071 | # CONFIG_CRYPTO_CRC32C is not set | ||
1072 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1073 | # CONFIG_CRYPTO_TEST is not set | ||
1074 | |||
1075 | # | ||
1076 | # Hardware crypto devices | ||
1077 | # | ||
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 8120d428ebfd..e0fa80eca366 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile | |||
@@ -25,8 +25,8 @@ obj-$(CONFIG_PPC_970_NAP) += idle_power4.o | |||
25 | obj-$(CONFIG_PPC_OF) += of_device.o of_platform.o prom_parse.o | 25 | obj-$(CONFIG_PPC_OF) += of_device.o of_platform.o prom_parse.o |
26 | procfs-$(CONFIG_PPC64) := proc_ppc64.o | 26 | procfs-$(CONFIG_PPC64) := proc_ppc64.o |
27 | obj-$(CONFIG_PROC_FS) += $(procfs-y) | 27 | obj-$(CONFIG_PROC_FS) += $(procfs-y) |
28 | rtaspci-$(CONFIG_PPC64) := rtas_pci.o | 28 | rtaspci-$(CONFIG_PPC64)-$(CONFIG_PCI) := rtas_pci.o |
29 | obj-$(CONFIG_PPC_RTAS) += rtas.o rtas-rtc.o $(rtaspci-y) | 29 | obj-$(CONFIG_PPC_RTAS) += rtas.o rtas-rtc.o $(rtaspci-y-y) |
30 | obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o | 30 | obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o |
31 | obj-$(CONFIG_RTAS_PROC) += rtas-proc.o | 31 | obj-$(CONFIG_RTAS_PROC) += rtas-proc.o |
32 | obj-$(CONFIG_LPARCFG) += lparcfg.o | 32 | obj-$(CONFIG_LPARCFG) += lparcfg.o |
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 030d300cd71c..9735e828b52d 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -77,7 +77,6 @@ int main(void) | |||
77 | DEFINE(KSP_VSID, offsetof(struct thread_struct, ksp_vsid)); | 77 | DEFINE(KSP_VSID, offsetof(struct thread_struct, ksp_vsid)); |
78 | #else /* CONFIG_PPC64 */ | 78 | #else /* CONFIG_PPC64 */ |
79 | DEFINE(PGDIR, offsetof(struct thread_struct, pgdir)); | 79 | DEFINE(PGDIR, offsetof(struct thread_struct, pgdir)); |
80 | DEFINE(LAST_SYSCALL, offsetof(struct thread_struct, last_syscall)); | ||
81 | #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) | 80 | #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) |
82 | DEFINE(THREAD_DBCR0, offsetof(struct thread_struct, dbcr0)); | 81 | DEFINE(THREAD_DBCR0, offsetof(struct thread_struct, dbcr0)); |
83 | DEFINE(PT_PTRACED, PT_PTRACED); | 82 | DEFINE(PT_PTRACED, PT_PTRACED); |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index e4006dc087ca..6b59e40214d2 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -558,6 +558,18 @@ static struct cpu_spec cpu_specs[] = { | |||
558 | .cpu_setup = __setup_cpu_750cx, | 558 | .cpu_setup = __setup_cpu_750cx, |
559 | .platform = "ppc750", | 559 | .platform = "ppc750", |
560 | }, | 560 | }, |
561 | { /* 750CL */ | ||
562 | .pvr_mask = 0xfffff0f0, | ||
563 | .pvr_value = 0x00087010, | ||
564 | .cpu_name = "750CL", | ||
565 | .cpu_features = CPU_FTRS_750, | ||
566 | .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE, | ||
567 | .icache_bsize = 32, | ||
568 | .dcache_bsize = 32, | ||
569 | .num_pmcs = 4, | ||
570 | .cpu_setup = __setup_cpu_750cx, | ||
571 | .platform = "ppc750", | ||
572 | }, | ||
561 | { /* 745/755 */ | 573 | { /* 745/755 */ |
562 | .pvr_mask = 0xfffff000, | 574 | .pvr_mask = 0xfffff000, |
563 | .pvr_value = 0x00083000, | 575 | .pvr_value = 0x00083000, |
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index c03e829fee3c..c29d1652a421 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -191,7 +191,6 @@ stack_ovf: | |||
191 | 0: | 191 | 0: |
192 | 192 | ||
193 | _GLOBAL(DoSyscall) | 193 | _GLOBAL(DoSyscall) |
194 | stw r0,THREAD+LAST_SYSCALL(r2) | ||
195 | stw r3,ORIG_GPR3(r1) | 194 | stw r3,ORIG_GPR3(r1) |
196 | li r12,0 | 195 | li r12,0 |
197 | stw r12,RESULT(r1) | 196 | stw r12,RESULT(r1) |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 97cedcd6c9b4..5a53cebd17e6 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -1555,7 +1555,6 @@ _GLOBAL(generic_secondary_smp_init) | |||
1555 | 1555 | ||
1556 | /* turn on 64-bit mode */ | 1556 | /* turn on 64-bit mode */ |
1557 | bl .enable_64b_mode | 1557 | bl .enable_64b_mode |
1558 | isync | ||
1559 | 1558 | ||
1560 | /* Set up a paca value for this processor. Since we have the | 1559 | /* Set up a paca value for this processor. Since we have the |
1561 | * physical cpu id in r24, we need to search the pacas to find | 1560 | * physical cpu id in r24, we need to search the pacas to find |
@@ -1851,7 +1850,6 @@ __secondary_start_pmac_0: | |||
1851 | _GLOBAL(pmac_secondary_start) | 1850 | _GLOBAL(pmac_secondary_start) |
1852 | /* turn on 64-bit mode */ | 1851 | /* turn on 64-bit mode */ |
1853 | bl .enable_64b_mode | 1852 | bl .enable_64b_mode |
1854 | isync | ||
1855 | 1853 | ||
1856 | /* Copy some CPU settings from CPU 0 */ | 1854 | /* Copy some CPU settings from CPU 0 */ |
1857 | bl .__restore_cpu_ppc970 | 1855 | bl .__restore_cpu_ppc970 |
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c index 82bd2f10770f..8ed1163c0bd4 100644 --- a/arch/powerpc/kernel/ibmebus.c +++ b/arch/powerpc/kernel/ibmebus.c | |||
@@ -2,36 +2,37 @@ | |||
2 | * IBM PowerPC IBM eBus Infrastructure Support. | 2 | * IBM PowerPC IBM eBus Infrastructure Support. |
3 | * | 3 | * |
4 | * Copyright (c) 2005 IBM Corporation | 4 | * Copyright (c) 2005 IBM Corporation |
5 | * Joachim Fenkes <fenkes@de.ibm.com> | ||
5 | * Heiko J Schick <schickhj@de.ibm.com> | 6 | * Heiko J Schick <schickhj@de.ibm.com> |
6 | * | 7 | * |
7 | * All rights reserved. | 8 | * All rights reserved. |
8 | * | 9 | * |
9 | * This source code is distributed under a dual license of GPL v2.0 and OpenIB | 10 | * This source code is distributed under a dual license of GPL v2.0 and OpenIB |
10 | * BSD. | 11 | * BSD. |
11 | * | 12 | * |
12 | * OpenIB BSD License | 13 | * OpenIB BSD License |
13 | * | 14 | * |
14 | * Redistribution and use in source and binary forms, with or without | 15 | * Redistribution and use in source and binary forms, with or without |
15 | * modification, are permitted provided that the following conditions are met: | 16 | * modification, are permitted provided that the following conditions are met: |
16 | * | 17 | * |
17 | * Redistributions of source code must retain the above copyright notice, this | 18 | * Redistributions of source code must retain the above copyright notice, this |
18 | * list of conditions and the following disclaimer. | 19 | * list of conditions and the following disclaimer. |
19 | * | 20 | * |
20 | * Redistributions in binary form must reproduce the above copyright notice, | 21 | * Redistributions in binary form must reproduce the above copyright notice, |
21 | * this list of conditions and the following disclaimer in the documentation | 22 | * this list of conditions and the following disclaimer in the documentation |
22 | * and/or other materials | 23 | * and/or other materials |
23 | * provided with the distribution. | 24 | * provided with the distribution. |
24 | * | 25 | * |
25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 27 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 30 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 31 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | 32 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
32 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | 33 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER |
33 | * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 34 | * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 35 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
35 | * POSSIBILITY OF SUCH DAMAGE. | 36 | * POSSIBILITY OF SUCH DAMAGE. |
36 | */ | 37 | */ |
37 | 38 | ||
@@ -43,19 +44,21 @@ | |||
43 | #include <asm/ibmebus.h> | 44 | #include <asm/ibmebus.h> |
44 | #include <asm/abs_addr.h> | 45 | #include <asm/abs_addr.h> |
45 | 46 | ||
46 | static struct ibmebus_dev ibmebus_bus_device = { /* fake "parent" device */ | 47 | #define MAX_LOC_CODE_LENGTH 80 |
47 | .name = ibmebus_bus_device.ofdev.dev.bus_id, | 48 | |
48 | .ofdev.dev.bus_id = "ibmebus", | 49 | static struct device ibmebus_bus_device = { /* fake "parent" device */ |
49 | .ofdev.dev.bus = &ibmebus_bus_type, | 50 | .bus_id = "ibmebus", |
50 | }; | 51 | }; |
51 | 52 | ||
53 | struct bus_type ibmebus_bus_type; | ||
54 | |||
52 | static void *ibmebus_alloc_coherent(struct device *dev, | 55 | static void *ibmebus_alloc_coherent(struct device *dev, |
53 | size_t size, | 56 | size_t size, |
54 | dma_addr_t *dma_handle, | 57 | dma_addr_t *dma_handle, |
55 | gfp_t flag) | 58 | gfp_t flag) |
56 | { | 59 | { |
57 | void *mem; | 60 | void *mem; |
58 | 61 | ||
59 | mem = kmalloc(size, flag); | 62 | mem = kmalloc(size, flag); |
60 | *dma_handle = (dma_addr_t)mem; | 63 | *dma_handle = (dma_addr_t)mem; |
61 | 64 | ||
@@ -63,7 +66,7 @@ static void *ibmebus_alloc_coherent(struct device *dev, | |||
63 | } | 66 | } |
64 | 67 | ||
65 | static void ibmebus_free_coherent(struct device *dev, | 68 | static void ibmebus_free_coherent(struct device *dev, |
66 | size_t size, void *vaddr, | 69 | size_t size, void *vaddr, |
67 | dma_addr_t dma_handle) | 70 | dma_addr_t dma_handle) |
68 | { | 71 | { |
69 | kfree(vaddr); | 72 | kfree(vaddr); |
@@ -79,7 +82,7 @@ static dma_addr_t ibmebus_map_single(struct device *dev, | |||
79 | 82 | ||
80 | static void ibmebus_unmap_single(struct device *dev, | 83 | static void ibmebus_unmap_single(struct device *dev, |
81 | dma_addr_t dma_addr, | 84 | dma_addr_t dma_addr, |
82 | size_t size, | 85 | size_t size, |
83 | enum dma_data_direction direction) | 86 | enum dma_data_direction direction) |
84 | { | 87 | { |
85 | return; | 88 | return; |
@@ -90,13 +93,13 @@ static int ibmebus_map_sg(struct device *dev, | |||
90 | int nents, enum dma_data_direction direction) | 93 | int nents, enum dma_data_direction direction) |
91 | { | 94 | { |
92 | int i; | 95 | int i; |
93 | 96 | ||
94 | for (i = 0; i < nents; i++) { | 97 | for (i = 0; i < nents; i++) { |
95 | sg[i].dma_address = (dma_addr_t)page_address(sg[i].page) | 98 | sg[i].dma_address = (dma_addr_t)page_address(sg[i].page) |
96 | + sg[i].offset; | 99 | + sg[i].offset; |
97 | sg[i].dma_length = sg[i].length; | 100 | sg[i].dma_length = sg[i].length; |
98 | } | 101 | } |
99 | 102 | ||
100 | return nents; | 103 | return nents; |
101 | } | 104 | } |
102 | 105 | ||
@@ -128,15 +131,15 @@ static int ibmebus_bus_probe(struct device *dev) | |||
128 | struct ibmebus_driver *ibmebusdrv = to_ibmebus_driver(dev->driver); | 131 | struct ibmebus_driver *ibmebusdrv = to_ibmebus_driver(dev->driver); |
129 | const struct of_device_id *id; | 132 | const struct of_device_id *id; |
130 | int error = -ENODEV; | 133 | int error = -ENODEV; |
131 | 134 | ||
132 | if (!ibmebusdrv->probe) | 135 | if (!ibmebusdrv->probe) |
133 | return error; | 136 | return error; |
134 | 137 | ||
135 | id = of_match_device(ibmebusdrv->id_table, &ibmebusdev->ofdev); | 138 | id = of_match_device(ibmebusdrv->id_table, &ibmebusdev->ofdev); |
136 | if (id) { | 139 | if (id) { |
137 | error = ibmebusdrv->probe(ibmebusdev, id); | 140 | error = ibmebusdrv->probe(ibmebusdev, id); |
138 | } | 141 | } |
139 | 142 | ||
140 | return error; | 143 | return error; |
141 | } | 144 | } |
142 | 145 | ||
@@ -144,11 +147,11 @@ static int ibmebus_bus_remove(struct device *dev) | |||
144 | { | 147 | { |
145 | struct ibmebus_dev *ibmebusdev = to_ibmebus_dev(dev); | 148 | struct ibmebus_dev *ibmebusdev = to_ibmebus_dev(dev); |
146 | struct ibmebus_driver *ibmebusdrv = to_ibmebus_driver(dev->driver); | 149 | struct ibmebus_driver *ibmebusdrv = to_ibmebus_driver(dev->driver); |
147 | 150 | ||
148 | if (ibmebusdrv->remove) { | 151 | if (ibmebusdrv->remove) { |
149 | return ibmebusdrv->remove(ibmebusdev); | 152 | return ibmebusdrv->remove(ibmebusdev); |
150 | } | 153 | } |
151 | 154 | ||
152 | return 0; | 155 | return 0; |
153 | } | 156 | } |
154 | 157 | ||
@@ -158,21 +161,12 @@ static void __devinit ibmebus_dev_release(struct device *dev) | |||
158 | kfree(to_ibmebus_dev(dev)); | 161 | kfree(to_ibmebus_dev(dev)); |
159 | } | 162 | } |
160 | 163 | ||
161 | static ssize_t ibmebusdev_show_name(struct device *dev, | 164 | static int __devinit ibmebus_register_device_common( |
162 | struct device_attribute *attr, char *buf) | ||
163 | { | ||
164 | return sprintf(buf, "%s\n", to_ibmebus_dev(dev)->name); | ||
165 | } | ||
166 | static DEVICE_ATTR(name, S_IRUSR | S_IRGRP | S_IROTH, ibmebusdev_show_name, | ||
167 | NULL); | ||
168 | |||
169 | static struct ibmebus_dev* __devinit ibmebus_register_device_common( | ||
170 | struct ibmebus_dev *dev, const char *name) | 165 | struct ibmebus_dev *dev, const char *name) |
171 | { | 166 | { |
172 | int err = 0; | 167 | int err = 0; |
173 | 168 | ||
174 | dev->name = name; | 169 | dev->ofdev.dev.parent = &ibmebus_bus_device; |
175 | dev->ofdev.dev.parent = &ibmebus_bus_device.ofdev.dev; | ||
176 | dev->ofdev.dev.bus = &ibmebus_bus_type; | 170 | dev->ofdev.dev.bus = &ibmebus_bus_type; |
177 | dev->ofdev.dev.release = ibmebus_dev_release; | 171 | dev->ofdev.dev.release = ibmebus_dev_release; |
178 | 172 | ||
@@ -181,17 +175,15 @@ static struct ibmebus_dev* __devinit ibmebus_register_device_common( | |||
181 | dev->ofdev.dev.archdata.numa_node = of_node_to_nid(dev->ofdev.node); | 175 | dev->ofdev.dev.archdata.numa_node = of_node_to_nid(dev->ofdev.node); |
182 | 176 | ||
183 | /* An ibmebusdev is based on a of_device. We have to change the | 177 | /* An ibmebusdev is based on a of_device. We have to change the |
184 | * bus type to use our own DMA mapping operations. | 178 | * bus type to use our own DMA mapping operations. |
185 | */ | 179 | */ |
186 | if ((err = of_device_register(&dev->ofdev)) != 0) { | 180 | if ((err = of_device_register(&dev->ofdev)) != 0) { |
187 | printk(KERN_ERR "%s: failed to register device (%d).\n", | 181 | printk(KERN_ERR "%s: failed to register device (%d).\n", |
188 | __FUNCTION__, err); | 182 | __FUNCTION__, err); |
189 | return NULL; | 183 | return -ENODEV; |
190 | } | 184 | } |
191 | 185 | ||
192 | device_create_file(&dev->ofdev.dev, &dev_attr_name); | 186 | return 0; |
193 | |||
194 | return dev; | ||
195 | } | 187 | } |
196 | 188 | ||
197 | static struct ibmebus_dev* __devinit ibmebus_register_device_node( | 189 | static struct ibmebus_dev* __devinit ibmebus_register_device_node( |
@@ -205,31 +197,31 @@ static struct ibmebus_dev* __devinit ibmebus_register_device_node( | |||
205 | if (!loc_code) { | 197 | if (!loc_code) { |
206 | printk(KERN_WARNING "%s: node %s missing 'ibm,loc-code'\n", | 198 | printk(KERN_WARNING "%s: node %s missing 'ibm,loc-code'\n", |
207 | __FUNCTION__, dn->name ? dn->name : "<unknown>"); | 199 | __FUNCTION__, dn->name ? dn->name : "<unknown>"); |
208 | return NULL; | 200 | return ERR_PTR(-EINVAL); |
209 | } | 201 | } |
210 | 202 | ||
211 | if (strlen(loc_code) == 0) { | 203 | if (strlen(loc_code) == 0) { |
212 | printk(KERN_WARNING "%s: 'ibm,loc-code' is invalid\n", | 204 | printk(KERN_WARNING "%s: 'ibm,loc-code' is invalid\n", |
213 | __FUNCTION__); | 205 | __FUNCTION__); |
214 | return NULL; | 206 | return ERR_PTR(-EINVAL); |
215 | } | 207 | } |
216 | 208 | ||
217 | dev = kzalloc(sizeof(struct ibmebus_dev), GFP_KERNEL); | 209 | dev = kzalloc(sizeof(struct ibmebus_dev), GFP_KERNEL); |
218 | if (!dev) { | 210 | if (!dev) { |
219 | return NULL; | 211 | return ERR_PTR(-ENOMEM); |
220 | } | 212 | } |
221 | 213 | ||
222 | dev->ofdev.node = of_node_get(dn); | 214 | dev->ofdev.node = of_node_get(dn); |
223 | 215 | ||
224 | length = strlen(loc_code); | 216 | length = strlen(loc_code); |
225 | memcpy(dev->ofdev.dev.bus_id, loc_code | 217 | memcpy(dev->ofdev.dev.bus_id, loc_code |
226 | + (length - min(length, BUS_ID_SIZE - 1)), | 218 | + (length - min(length, BUS_ID_SIZE - 1)), |
227 | min(length, BUS_ID_SIZE - 1)); | 219 | min(length, BUS_ID_SIZE - 1)); |
228 | 220 | ||
229 | /* Register with generic device framework. */ | 221 | /* Register with generic device framework. */ |
230 | if (ibmebus_register_device_common(dev, dn->name) == NULL) { | 222 | if (ibmebus_register_device_common(dev, dn->name) != 0) { |
231 | kfree(dev); | 223 | kfree(dev); |
232 | return NULL; | 224 | return ERR_PTR(-ENODEV); |
233 | } | 225 | } |
234 | 226 | ||
235 | return dev; | 227 | return dev; |
@@ -238,17 +230,16 @@ static struct ibmebus_dev* __devinit ibmebus_register_device_node( | |||
238 | static void ibmebus_probe_of_nodes(char* name) | 230 | static void ibmebus_probe_of_nodes(char* name) |
239 | { | 231 | { |
240 | struct device_node *dn = NULL; | 232 | struct device_node *dn = NULL; |
241 | 233 | ||
242 | while ((dn = of_find_node_by_name(dn, name))) { | 234 | while ((dn = of_find_node_by_name(dn, name))) { |
243 | if (ibmebus_register_device_node(dn) == NULL) { | 235 | if (IS_ERR(ibmebus_register_device_node(dn))) { |
244 | of_node_put(dn); | 236 | of_node_put(dn); |
245 | |||
246 | return; | 237 | return; |
247 | } | 238 | } |
248 | } | 239 | } |
249 | 240 | ||
250 | of_node_put(dn); | 241 | of_node_put(dn); |
251 | 242 | ||
252 | return; | 243 | return; |
253 | } | 244 | } |
254 | 245 | ||
@@ -262,17 +253,22 @@ static void ibmebus_add_devices_by_id(struct of_device_id *idt) | |||
262 | return; | 253 | return; |
263 | } | 254 | } |
264 | 255 | ||
265 | static int ibmebus_match_helper(struct device *dev, void *data) | 256 | static int ibmebus_match_helper_name(struct device *dev, void *data) |
266 | { | 257 | { |
267 | if (strcmp((char*)data, to_ibmebus_dev(dev)->name) == 0) | 258 | const struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev); |
259 | char *name; | ||
260 | |||
261 | name = (char*)get_property( | ||
262 | ebus_dev->ofdev.node, "name", NULL); | ||
263 | |||
264 | if (name && (strcmp((char*)data, name) == 0)) | ||
268 | return 1; | 265 | return 1; |
269 | 266 | ||
270 | return 0; | 267 | return 0; |
271 | } | 268 | } |
272 | 269 | ||
273 | static int ibmebus_unregister_device(struct device *dev) | 270 | static int ibmebus_unregister_device(struct device *dev) |
274 | { | 271 | { |
275 | device_remove_file(dev, &dev_attr_name); | ||
276 | of_device_unregister(to_of_device(dev)); | 272 | of_device_unregister(to_of_device(dev)); |
277 | 273 | ||
278 | return 0; | 274 | return 0; |
@@ -281,17 +277,16 @@ static int ibmebus_unregister_device(struct device *dev) | |||
281 | static void ibmebus_remove_devices_by_id(struct of_device_id *idt) | 277 | static void ibmebus_remove_devices_by_id(struct of_device_id *idt) |
282 | { | 278 | { |
283 | struct device *dev; | 279 | struct device *dev; |
284 | 280 | ||
285 | while (strlen(idt->name) > 0) { | 281 | while (strlen(idt->name) > 0) { |
286 | while ((dev = bus_find_device(&ibmebus_bus_type, NULL, | 282 | while ((dev = bus_find_device(&ibmebus_bus_type, NULL, |
287 | (void*)idt->name, | 283 | (void*)idt->name, |
288 | ibmebus_match_helper))) { | 284 | ibmebus_match_helper_name))) { |
289 | ibmebus_unregister_device(dev); | 285 | ibmebus_unregister_device(dev); |
290 | } | 286 | } |
291 | idt++; | 287 | idt++; |
292 | |||
293 | } | 288 | } |
294 | 289 | ||
295 | return; | 290 | return; |
296 | } | 291 | } |
297 | 292 | ||
@@ -307,30 +302,33 @@ int ibmebus_register_driver(struct ibmebus_driver *drv) | |||
307 | if ((err = driver_register(&drv->driver) != 0)) | 302 | if ((err = driver_register(&drv->driver) != 0)) |
308 | return err; | 303 | return err; |
309 | 304 | ||
305 | /* remove all supported devices first, in case someone | ||
306 | * probed them manually before registering the driver */ | ||
307 | ibmebus_remove_devices_by_id(drv->id_table); | ||
310 | ibmebus_add_devices_by_id(drv->id_table); | 308 | ibmebus_add_devices_by_id(drv->id_table); |
311 | 309 | ||
312 | return 0; | 310 | return 0; |
313 | } | 311 | } |
314 | EXPORT_SYMBOL(ibmebus_register_driver); | 312 | EXPORT_SYMBOL(ibmebus_register_driver); |
315 | 313 | ||
316 | void ibmebus_unregister_driver(struct ibmebus_driver *drv) | 314 | void ibmebus_unregister_driver(struct ibmebus_driver *drv) |
317 | { | 315 | { |
318 | driver_unregister(&drv->driver); | 316 | driver_unregister(&drv->driver); |
319 | ibmebus_remove_devices_by_id(drv->id_table); | 317 | ibmebus_remove_devices_by_id(drv->id_table); |
320 | } | 318 | } |
321 | EXPORT_SYMBOL(ibmebus_unregister_driver); | 319 | EXPORT_SYMBOL(ibmebus_unregister_driver); |
322 | 320 | ||
323 | int ibmebus_request_irq(struct ibmebus_dev *dev, | 321 | int ibmebus_request_irq(struct ibmebus_dev *dev, |
324 | u32 ist, | 322 | u32 ist, |
325 | irq_handler_t handler, | 323 | irq_handler_t handler, |
326 | unsigned long irq_flags, const char * devname, | 324 | unsigned long irq_flags, const char * devname, |
327 | void *dev_id) | 325 | void *dev_id) |
328 | { | 326 | { |
329 | unsigned int irq = irq_create_mapping(NULL, ist); | 327 | unsigned int irq = irq_create_mapping(NULL, ist); |
330 | 328 | ||
331 | if (irq == NO_IRQ) | 329 | if (irq == NO_IRQ) |
332 | return -EINVAL; | 330 | return -EINVAL; |
333 | 331 | ||
334 | return request_irq(irq, handler, | 332 | return request_irq(irq, handler, |
335 | irq_flags, devname, dev_id); | 333 | irq_flags, devname, dev_id); |
336 | } | 334 | } |
@@ -339,56 +337,157 @@ EXPORT_SYMBOL(ibmebus_request_irq); | |||
339 | void ibmebus_free_irq(struct ibmebus_dev *dev, u32 ist, void *dev_id) | 337 | void ibmebus_free_irq(struct ibmebus_dev *dev, u32 ist, void *dev_id) |
340 | { | 338 | { |
341 | unsigned int irq = irq_find_mapping(NULL, ist); | 339 | unsigned int irq = irq_find_mapping(NULL, ist); |
342 | 340 | ||
343 | free_irq(irq, dev_id); | 341 | free_irq(irq, dev_id); |
344 | } | 342 | } |
345 | EXPORT_SYMBOL(ibmebus_free_irq); | 343 | EXPORT_SYMBOL(ibmebus_free_irq); |
346 | 344 | ||
347 | static int ibmebus_bus_match(struct device *dev, struct device_driver *drv) | 345 | static int ibmebus_bus_match(struct device *dev, struct device_driver *drv) |
348 | { | 346 | { |
349 | const struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev); | 347 | const struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev); |
350 | struct ibmebus_driver *ebus_drv = to_ibmebus_driver(drv); | 348 | struct ibmebus_driver *ebus_drv = to_ibmebus_driver(drv); |
351 | const struct of_device_id *ids = ebus_drv->id_table; | 349 | const struct of_device_id *ids = ebus_drv->id_table; |
352 | const struct of_device_id *found_id; | 350 | const struct of_device_id *found_id; |
353 | 351 | ||
354 | if (!ids) | 352 | if (!ids) |
355 | return 0; | 353 | return 0; |
356 | 354 | ||
357 | found_id = of_match_device(ids, &ebus_dev->ofdev); | 355 | found_id = of_match_device(ids, &ebus_dev->ofdev); |
358 | if (found_id) | 356 | if (found_id) |
359 | return 1; | 357 | return 1; |
360 | 358 | ||
361 | return 0; | 359 | return 0; |
362 | } | 360 | } |
363 | 361 | ||
362 | static ssize_t name_show(struct device *dev, | ||
363 | struct device_attribute *attr, char *buf) | ||
364 | { | ||
365 | struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev); | ||
366 | char *name = (char*)get_property(ebus_dev->ofdev.node, "name", NULL); | ||
367 | return sprintf(buf, "%s\n", name); | ||
368 | } | ||
369 | |||
370 | static struct device_attribute ibmebus_dev_attrs[] = { | ||
371 | __ATTR_RO(name), | ||
372 | __ATTR_NULL | ||
373 | }; | ||
374 | |||
375 | static int ibmebus_match_helper_loc_code(struct device *dev, void *data) | ||
376 | { | ||
377 | const struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev); | ||
378 | char *loc_code; | ||
379 | |||
380 | loc_code = (char*)get_property( | ||
381 | ebus_dev->ofdev.node, "ibm,loc-code", NULL); | ||
382 | |||
383 | if (loc_code && (strcmp((char*)data, loc_code) == 0)) | ||
384 | return 1; | ||
385 | |||
386 | return 0; | ||
387 | } | ||
388 | |||
389 | static ssize_t ibmebus_store_probe(struct bus_type *bus, | ||
390 | const char *buf, size_t count) | ||
391 | { | ||
392 | struct device_node *dn = NULL; | ||
393 | struct ibmebus_dev *dev; | ||
394 | char *loc_code; | ||
395 | char parm[MAX_LOC_CODE_LENGTH]; | ||
396 | |||
397 | if (count >= MAX_LOC_CODE_LENGTH) | ||
398 | return -EINVAL; | ||
399 | memcpy(parm, buf, count); | ||
400 | parm[count] = '\0'; | ||
401 | if (parm[count-1] == '\n') | ||
402 | parm[count-1] = '\0'; | ||
403 | |||
404 | if (bus_find_device(&ibmebus_bus_type, NULL, parm, | ||
405 | ibmebus_match_helper_loc_code)) { | ||
406 | printk(KERN_WARNING "%s: loc_code %s has already been probed\n", | ||
407 | __FUNCTION__, parm); | ||
408 | return -EINVAL; | ||
409 | } | ||
410 | |||
411 | while ((dn = of_find_all_nodes(dn))) { | ||
412 | loc_code = (char *)get_property(dn, "ibm,loc-code", NULL); | ||
413 | if (loc_code && (strncmp(loc_code, parm, count) == 0)) { | ||
414 | dev = ibmebus_register_device_node(dn); | ||
415 | if (IS_ERR(dev)) { | ||
416 | of_node_put(dn); | ||
417 | return PTR_ERR(dev); | ||
418 | } else | ||
419 | return count; /* success */ | ||
420 | } | ||
421 | } | ||
422 | |||
423 | /* if we drop out of the loop, the loc code was invalid */ | ||
424 | printk(KERN_WARNING "%s: no device with loc_code %s found\n", | ||
425 | __FUNCTION__, parm); | ||
426 | return -ENODEV; | ||
427 | } | ||
428 | |||
429 | static ssize_t ibmebus_store_remove(struct bus_type *bus, | ||
430 | const char *buf, size_t count) | ||
431 | { | ||
432 | struct device *dev; | ||
433 | char parm[MAX_LOC_CODE_LENGTH]; | ||
434 | |||
435 | if (count >= MAX_LOC_CODE_LENGTH) | ||
436 | return -EINVAL; | ||
437 | memcpy(parm, buf, count); | ||
438 | parm[count] = '\0'; | ||
439 | if (parm[count-1] == '\n') | ||
440 | parm[count-1] = '\0'; | ||
441 | |||
442 | /* The location code is unique, so we will find one device at most */ | ||
443 | if ((dev = bus_find_device(&ibmebus_bus_type, NULL, parm, | ||
444 | ibmebus_match_helper_loc_code))) { | ||
445 | ibmebus_unregister_device(dev); | ||
446 | } else { | ||
447 | printk(KERN_WARNING "%s: loc_code %s not on the bus\n", | ||
448 | __FUNCTION__, parm); | ||
449 | return -ENODEV; | ||
450 | } | ||
451 | |||
452 | return count; | ||
453 | } | ||
454 | |||
455 | static struct bus_attribute ibmebus_bus_attrs[] = { | ||
456 | __ATTR(probe, S_IWUSR, NULL, ibmebus_store_probe), | ||
457 | __ATTR(remove, S_IWUSR, NULL, ibmebus_store_remove), | ||
458 | __ATTR_NULL | ||
459 | }; | ||
460 | |||
364 | struct bus_type ibmebus_bus_type = { | 461 | struct bus_type ibmebus_bus_type = { |
365 | .name = "ibmebus", | 462 | .name = "ibmebus", |
366 | .match = ibmebus_bus_match, | 463 | .match = ibmebus_bus_match, |
464 | .dev_attrs = ibmebus_dev_attrs, | ||
465 | .bus_attrs = ibmebus_bus_attrs | ||
367 | }; | 466 | }; |
368 | EXPORT_SYMBOL(ibmebus_bus_type); | 467 | EXPORT_SYMBOL(ibmebus_bus_type); |
369 | 468 | ||
370 | static int __init ibmebus_bus_init(void) | 469 | static int __init ibmebus_bus_init(void) |
371 | { | 470 | { |
372 | int err; | 471 | int err; |
373 | 472 | ||
374 | printk(KERN_INFO "IBM eBus Device Driver\n"); | 473 | printk(KERN_INFO "IBM eBus Device Driver\n"); |
375 | 474 | ||
376 | err = bus_register(&ibmebus_bus_type); | 475 | err = bus_register(&ibmebus_bus_type); |
377 | if (err) { | 476 | if (err) { |
378 | printk(KERN_ERR ":%s: failed to register IBM eBus.\n", | 477 | printk(KERN_ERR ":%s: failed to register IBM eBus.\n", |
379 | __FUNCTION__); | 478 | __FUNCTION__); |
380 | return err; | 479 | return err; |
381 | } | 480 | } |
382 | 481 | ||
383 | err = device_register(&ibmebus_bus_device.ofdev.dev); | 482 | err = device_register(&ibmebus_bus_device); |
384 | if (err) { | 483 | if (err) { |
385 | printk(KERN_WARNING "%s: device_register returned %i\n", | 484 | printk(KERN_WARNING "%s: device_register returned %i\n", |
386 | __FUNCTION__, err); | 485 | __FUNCTION__, err); |
387 | bus_unregister(&ibmebus_bus_type); | 486 | bus_unregister(&ibmebus_bus_type); |
388 | 487 | ||
389 | return err; | 488 | return err; |
390 | } | 489 | } |
391 | 490 | ||
392 | return 0; | 491 | return 0; |
393 | } | 492 | } |
394 | __initcall(ibmebus_bus_init); | 493 | __initcall(ibmebus_bus_init); |
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index 95edad4faf26..c50d7072f305 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
@@ -76,6 +76,7 @@ static unsigned long iommu_range_alloc(struct iommu_table *tbl, | |||
76 | unsigned int align_order) | 76 | unsigned int align_order) |
77 | { | 77 | { |
78 | unsigned long n, end, i, start; | 78 | unsigned long n, end, i, start; |
79 | unsigned long start_addr, end_addr; | ||
79 | unsigned long limit; | 80 | unsigned long limit; |
80 | int largealloc = npages > 15; | 81 | int largealloc = npages > 15; |
81 | int pass = 0; | 82 | int pass = 0; |
@@ -146,6 +147,15 @@ static unsigned long iommu_range_alloc(struct iommu_table *tbl, | |||
146 | } | 147 | } |
147 | } | 148 | } |
148 | 149 | ||
150 | /* DMA cannot cross 4 GB boundary */ | ||
151 | start_addr = (n + tbl->it_offset) << PAGE_SHIFT; | ||
152 | end_addr = (end + tbl->it_offset) << PAGE_SHIFT; | ||
153 | if ((start_addr >> 32) != (end_addr >> 32)) { | ||
154 | end_addr &= 0xffffffff00000000l; | ||
155 | start = (end_addr >> PAGE_SHIFT) - tbl->it_offset; | ||
156 | goto again; | ||
157 | } | ||
158 | |||
149 | for (i = n; i < end; i++) | 159 | for (i = n; i < end; i++) |
150 | if (test_bit(i, tbl->it_map)) { | 160 | if (test_bit(i, tbl->it_map)) { |
151 | start = i+1; | 161 | start = i+1; |
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 412bea3cf813..98decf8ebff4 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S | |||
@@ -734,10 +734,6 @@ _GLOBAL(abs) | |||
734 | sub r3,r3,r4 | 734 | sub r3,r3,r4 |
735 | blr | 735 | blr |
736 | 736 | ||
737 | _GLOBAL(_get_SP) | ||
738 | mr r3,r1 /* Close enough */ | ||
739 | blr | ||
740 | |||
741 | /* | 737 | /* |
742 | * Create a kernel thread | 738 | * Create a kernel thread |
743 | * kernel_thread(fn, arg, flags) | 739 | * kernel_thread(fn, arg, flags) |
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 7e97d71a5f8f..db1d40ef7d60 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -61,8 +61,7 @@ void iSeries_pcibios_init(void); | |||
61 | 61 | ||
62 | LIST_HEAD(hose_list); | 62 | LIST_HEAD(hose_list); |
63 | 63 | ||
64 | struct dma_mapping_ops *pci_dma_ops; | 64 | static struct dma_mapping_ops *pci_dma_ops; |
65 | EXPORT_SYMBOL(pci_dma_ops); | ||
66 | 65 | ||
67 | int global_phb_number; /* Global phb counter */ | 66 | int global_phb_number; /* Global phb counter */ |
68 | 67 | ||
@@ -70,6 +69,17 @@ int global_phb_number; /* Global phb counter */ | |||
70 | struct pci_dev *ppc64_isabridge_dev = NULL; | 69 | struct pci_dev *ppc64_isabridge_dev = NULL; |
71 | EXPORT_SYMBOL_GPL(ppc64_isabridge_dev); | 70 | EXPORT_SYMBOL_GPL(ppc64_isabridge_dev); |
72 | 71 | ||
72 | void set_pci_dma_ops(struct dma_mapping_ops *dma_ops) | ||
73 | { | ||
74 | pci_dma_ops = dma_ops; | ||
75 | } | ||
76 | |||
77 | struct dma_mapping_ops *get_pci_dma_ops(void) | ||
78 | { | ||
79 | return pci_dma_ops; | ||
80 | } | ||
81 | EXPORT_SYMBOL(get_pci_dma_ops); | ||
82 | |||
73 | static void fixup_broken_pcnet32(struct pci_dev* dev) | 83 | static void fixup_broken_pcnet32(struct pci_dev* dev) |
74 | { | 84 | { |
75 | if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) { | 85 | if ((dev->class>>8 == PCI_CLASS_NETWORK_ETHERNET)) { |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index e53b2988d1bf..949092dccf44 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -402,11 +402,11 @@ static void printbits(unsigned long val, struct regbit *bits) | |||
402 | } | 402 | } |
403 | 403 | ||
404 | #ifdef CONFIG_PPC64 | 404 | #ifdef CONFIG_PPC64 |
405 | #define REG "%016lX" | 405 | #define REG "%016lx" |
406 | #define REGS_PER_LINE 4 | 406 | #define REGS_PER_LINE 4 |
407 | #define LAST_VOLATILE 13 | 407 | #define LAST_VOLATILE 13 |
408 | #else | 408 | #else |
409 | #define REG "%08lX" | 409 | #define REG "%08lx" |
410 | #define REGS_PER_LINE 8 | 410 | #define REGS_PER_LINE 8 |
411 | #define LAST_VOLATILE 12 | 411 | #define LAST_VOLATILE 12 |
412 | #endif | 412 | #endif |
@@ -421,7 +421,7 @@ void show_regs(struct pt_regs * regs) | |||
421 | regs, regs->trap, print_tainted(), init_utsname()->release); | 421 | regs, regs->trap, print_tainted(), init_utsname()->release); |
422 | printk("MSR: "REG" ", regs->msr); | 422 | printk("MSR: "REG" ", regs->msr); |
423 | printbits(regs->msr, msr_bits); | 423 | printbits(regs->msr, msr_bits); |
424 | printk(" CR: %08lX XER: %08lX\n", regs->ccr, regs->xer); | 424 | printk(" CR: %08lx XER: %08lx\n", regs->ccr, regs->xer); |
425 | trap = TRAP(regs); | 425 | trap = TRAP(regs); |
426 | if (trap == 0x300 || trap == 0x600) | 426 | if (trap == 0x300 || trap == 0x600) |
427 | printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr); | 427 | printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr); |
@@ -572,7 +572,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
572 | kregs->nip = *((unsigned long *)ret_from_fork); | 572 | kregs->nip = *((unsigned long *)ret_from_fork); |
573 | #else | 573 | #else |
574 | kregs->nip = (unsigned long)ret_from_fork; | 574 | kregs->nip = (unsigned long)ret_from_fork; |
575 | p->thread.last_syscall = -1; | ||
576 | #endif | 575 | #endif |
577 | 576 | ||
578 | return 0; | 577 | return 0; |
@@ -823,6 +822,35 @@ out: | |||
823 | return error; | 822 | return error; |
824 | } | 823 | } |
825 | 824 | ||
825 | #ifdef CONFIG_IRQSTACKS | ||
826 | static inline int valid_irq_stack(unsigned long sp, struct task_struct *p, | ||
827 | unsigned long nbytes) | ||
828 | { | ||
829 | unsigned long stack_page; | ||
830 | unsigned long cpu = task_cpu(p); | ||
831 | |||
832 | /* | ||
833 | * Avoid crashing if the stack has overflowed and corrupted | ||
834 | * task_cpu(p), which is in the thread_info struct. | ||
835 | */ | ||
836 | if (cpu < NR_CPUS && cpu_possible(cpu)) { | ||
837 | stack_page = (unsigned long) hardirq_ctx[cpu]; | ||
838 | if (sp >= stack_page + sizeof(struct thread_struct) | ||
839 | && sp <= stack_page + THREAD_SIZE - nbytes) | ||
840 | return 1; | ||
841 | |||
842 | stack_page = (unsigned long) softirq_ctx[cpu]; | ||
843 | if (sp >= stack_page + sizeof(struct thread_struct) | ||
844 | && sp <= stack_page + THREAD_SIZE - nbytes) | ||
845 | return 1; | ||
846 | } | ||
847 | return 0; | ||
848 | } | ||
849 | |||
850 | #else | ||
851 | #define valid_irq_stack(sp, p, nb) 0 | ||
852 | #endif /* CONFIG_IRQSTACKS */ | ||
853 | |||
826 | int validate_sp(unsigned long sp, struct task_struct *p, | 854 | int validate_sp(unsigned long sp, struct task_struct *p, |
827 | unsigned long nbytes) | 855 | unsigned long nbytes) |
828 | { | 856 | { |
@@ -832,19 +860,7 @@ int validate_sp(unsigned long sp, struct task_struct *p, | |||
832 | && sp <= stack_page + THREAD_SIZE - nbytes) | 860 | && sp <= stack_page + THREAD_SIZE - nbytes) |
833 | return 1; | 861 | return 1; |
834 | 862 | ||
835 | #ifdef CONFIG_IRQSTACKS | 863 | return valid_irq_stack(sp, p, nbytes); |
836 | stack_page = (unsigned long) hardirq_ctx[task_cpu(p)]; | ||
837 | if (sp >= stack_page + sizeof(struct thread_struct) | ||
838 | && sp <= stack_page + THREAD_SIZE - nbytes) | ||
839 | return 1; | ||
840 | |||
841 | stack_page = (unsigned long) softirq_ctx[task_cpu(p)]; | ||
842 | if (sp >= stack_page + sizeof(struct thread_struct) | ||
843 | && sp <= stack_page + THREAD_SIZE - nbytes) | ||
844 | return 1; | ||
845 | #endif | ||
846 | |||
847 | return 0; | ||
848 | } | 864 | } |
849 | 865 | ||
850 | #ifdef CONFIG_PPC64 | 866 | #ifdef CONFIG_PPC64 |
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 8d52b23348bd..ef6bfb70b24a 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -719,6 +719,7 @@ static int __init early_init_dt_scan_chosen(unsigned long node, | |||
719 | const char *uname, int depth, void *data) | 719 | const char *uname, int depth, void *data) |
720 | { | 720 | { |
721 | unsigned long *lprop; | 721 | unsigned long *lprop; |
722 | u32 *prop; | ||
722 | unsigned long l; | 723 | unsigned long l; |
723 | char *p; | 724 | char *p; |
724 | 725 | ||
@@ -760,6 +761,22 @@ static int __init early_init_dt_scan_chosen(unsigned long node, | |||
760 | crashk_res.end = crashk_res.start + *lprop - 1; | 761 | crashk_res.end = crashk_res.start + *lprop - 1; |
761 | #endif | 762 | #endif |
762 | 763 | ||
764 | #ifdef CONFIG_BLK_DEV_INITRD | ||
765 | DBG("Looking for initrd properties... "); | ||
766 | prop = of_get_flat_dt_prop(node, "linux,initrd-start", &l); | ||
767 | if (prop) { | ||
768 | initrd_start = (unsigned long)__va(of_read_ulong(prop, l/4)); | ||
769 | prop = of_get_flat_dt_prop(node, "linux,initrd-end", &l); | ||
770 | if (prop) { | ||
771 | initrd_end = (unsigned long)__va(of_read_ulong(prop, l/4)); | ||
772 | initrd_below_start_ok = 1; | ||
773 | } else { | ||
774 | initrd_start = 0; | ||
775 | } | ||
776 | } | ||
777 | DBG("initrd_start=0x%lx initrd_end=0x%lx\n", initrd_start, initrd_end); | ||
778 | #endif /* CONFIG_BLK_DEV_INITRD */ | ||
779 | |||
763 | /* Retreive command line */ | 780 | /* Retreive command line */ |
764 | p = of_get_flat_dt_prop(node, "bootargs", &l); | 781 | p = of_get_flat_dt_prop(node, "bootargs", &l); |
765 | if (p != NULL && l > 0) | 782 | if (p != NULL && l > 0) |
@@ -926,6 +943,12 @@ static void __init early_reserve_mem(void) | |||
926 | self_size = initial_boot_params->totalsize; | 943 | self_size = initial_boot_params->totalsize; |
927 | lmb_reserve(self_base, self_size); | 944 | lmb_reserve(self_base, self_size); |
928 | 945 | ||
946 | #ifdef CONFIG_BLK_DEV_INITRD | ||
947 | /* then reserve the initrd, if any */ | ||
948 | if (initrd_start && (initrd_end > initrd_start)) | ||
949 | lmb_reserve(__pa(initrd_start), initrd_end - initrd_start); | ||
950 | #endif /* CONFIG_BLK_DEV_INITRD */ | ||
951 | |||
929 | #ifdef CONFIG_PPC32 | 952 | #ifdef CONFIG_PPC32 |
930 | /* | 953 | /* |
931 | * Handle the case where we might be booting from an old kexec | 954 | * Handle the case where we might be booting from an old kexec |
@@ -954,9 +977,6 @@ static void __init early_reserve_mem(void) | |||
954 | size = *(reserve_map++); | 977 | size = *(reserve_map++); |
955 | if (size == 0) | 978 | if (size == 0) |
956 | break; | 979 | break; |
957 | /* skip if the reservation is for the blob */ | ||
958 | if (base == self_base && size == self_size) | ||
959 | continue; | ||
960 | DBG("reserving: %llx -> %llx\n", base, size); | 980 | DBG("reserving: %llx -> %llx\n", base, size); |
961 | lmb_reserve(base, size); | 981 | lmb_reserve(base, size); |
962 | } | 982 | } |
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c index ace9f4c86e67..1616a44ac608 100644 --- a/arch/powerpc/kernel/rtas_pci.c +++ b/arch/powerpc/kernel/rtas_pci.c | |||
@@ -274,7 +274,7 @@ int __devinit rtas_setup_phb(struct pci_controller *phb) | |||
274 | return 0; | 274 | return 0; |
275 | } | 275 | } |
276 | 276 | ||
277 | unsigned long __init find_and_init_phbs(void) | 277 | void __init find_and_init_phbs(void) |
278 | { | 278 | { |
279 | struct device_node *node; | 279 | struct device_node *node; |
280 | struct pci_controller *phb; | 280 | struct pci_controller *phb; |
@@ -319,8 +319,6 @@ unsigned long __init find_and_init_phbs(void) | |||
319 | if (prop) | 319 | if (prop) |
320 | pci_assign_all_buses = *prop; | 320 | pci_assign_all_buses = *prop; |
321 | } | 321 | } |
322 | |||
323 | return 0; | ||
324 | } | 322 | } |
325 | 323 | ||
326 | /* RPA-specific bits for removing PHBs */ | 324 | /* RPA-specific bits for removing PHBs */ |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 89cfaf49d3de..d050d9a61bd4 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -304,26 +304,8 @@ struct seq_operations cpuinfo_op = { | |||
304 | void __init check_for_initrd(void) | 304 | void __init check_for_initrd(void) |
305 | { | 305 | { |
306 | #ifdef CONFIG_BLK_DEV_INITRD | 306 | #ifdef CONFIG_BLK_DEV_INITRD |
307 | const unsigned int *prop; | 307 | DBG(" -> check_for_initrd() initrd_start=0x%lx initrd_end=0x%lx\n", |
308 | int len; | 308 | initrd_start, initrd_end); |
309 | |||
310 | DBG(" -> check_for_initrd()\n"); | ||
311 | |||
312 | if (of_chosen) { | ||
313 | prop = get_property(of_chosen, "linux,initrd-start", &len); | ||
314 | if (prop != NULL) { | ||
315 | initrd_start = (unsigned long) | ||
316 | __va(of_read_ulong(prop, len / 4)); | ||
317 | prop = get_property(of_chosen, | ||
318 | "linux,initrd-end", &len); | ||
319 | if (prop != NULL) { | ||
320 | initrd_end = (unsigned long) | ||
321 | __va(of_read_ulong(prop, len / 4)); | ||
322 | initrd_below_start_ok = 1; | ||
323 | } else | ||
324 | initrd_start = 0; | ||
325 | } | ||
326 | } | ||
327 | 309 | ||
328 | /* If we were passed an initrd, set the ROOT_DEV properly if the values | 310 | /* If we were passed an initrd, set the ROOT_DEV properly if the values |
329 | * look sensible. If not, clear initrd reference. | 311 | * look sensible. If not, clear initrd reference. |
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c index 44a6a3c47feb..f688548f74cd 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c | |||
@@ -92,7 +92,8 @@ unsigned long __init early_init(unsigned long dt_ptr) | |||
92 | 92 | ||
93 | /* First zero the BSS -- use memset_io, some platforms don't have | 93 | /* First zero the BSS -- use memset_io, some platforms don't have |
94 | * caches on yet */ | 94 | * caches on yet */ |
95 | memset_io((void __iomem *)PTRRELOC(&__bss_start), 0, _end - __bss_start); | 95 | memset_io((void __iomem *)PTRRELOC(&__bss_start), 0, |
96 | __bss_stop - __bss_start); | ||
96 | 97 | ||
97 | /* | 98 | /* |
98 | * Identify the CPU type and fix up code sections | 99 | * Identify the CPU type and fix up code sections |
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 17724fb2067f..f7862224fe85 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -90,21 +90,11 @@ EXPORT_SYMBOL(unregister_die_notifier); | |||
90 | * Trap & Exception support | 90 | * Trap & Exception support |
91 | */ | 91 | */ |
92 | 92 | ||
93 | static DEFINE_SPINLOCK(die_lock); | ||
94 | |||
95 | int die(const char *str, struct pt_regs *regs, long err) | ||
96 | { | ||
97 | static int die_counter; | ||
98 | |||
99 | if (debugger(regs)) | ||
100 | return 1; | ||
101 | |||
102 | console_verbose(); | ||
103 | spin_lock_irq(&die_lock); | ||
104 | bust_spinlocks(1); | ||
105 | #ifdef CONFIG_PMAC_BACKLIGHT | 93 | #ifdef CONFIG_PMAC_BACKLIGHT |
94 | static void pmac_backlight_unblank(void) | ||
95 | { | ||
106 | mutex_lock(&pmac_backlight_mutex); | 96 | mutex_lock(&pmac_backlight_mutex); |
107 | if (machine_is(powermac) && pmac_backlight) { | 97 | if (pmac_backlight) { |
108 | struct backlight_properties *props; | 98 | struct backlight_properties *props; |
109 | 99 | ||
110 | props = &pmac_backlight->props; | 100 | props = &pmac_backlight->props; |
@@ -113,26 +103,67 @@ int die(const char *str, struct pt_regs *regs, long err) | |||
113 | backlight_update_status(pmac_backlight); | 103 | backlight_update_status(pmac_backlight); |
114 | } | 104 | } |
115 | mutex_unlock(&pmac_backlight_mutex); | 105 | mutex_unlock(&pmac_backlight_mutex); |
106 | } | ||
107 | #else | ||
108 | static inline void pmac_backlight_unblank(void) { } | ||
116 | #endif | 109 | #endif |
117 | printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter); | 110 | |
111 | int die(const char *str, struct pt_regs *regs, long err) | ||
112 | { | ||
113 | static struct { | ||
114 | spinlock_t lock; | ||
115 | u32 lock_owner; | ||
116 | int lock_owner_depth; | ||
117 | } die = { | ||
118 | .lock = __SPIN_LOCK_UNLOCKED(die.lock), | ||
119 | .lock_owner = -1, | ||
120 | .lock_owner_depth = 0 | ||
121 | }; | ||
122 | static int die_counter; | ||
123 | unsigned long flags; | ||
124 | |||
125 | if (debugger(regs)) | ||
126 | return 1; | ||
127 | |||
128 | oops_enter(); | ||
129 | |||
130 | if (die.lock_owner != raw_smp_processor_id()) { | ||
131 | console_verbose(); | ||
132 | spin_lock_irqsave(&die.lock, flags); | ||
133 | die.lock_owner = smp_processor_id(); | ||
134 | die.lock_owner_depth = 0; | ||
135 | bust_spinlocks(1); | ||
136 | if (machine_is(powermac)) | ||
137 | pmac_backlight_unblank(); | ||
138 | } else { | ||
139 | local_save_flags(flags); | ||
140 | } | ||
141 | |||
142 | if (++die.lock_owner_depth < 3) { | ||
143 | printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter); | ||
118 | #ifdef CONFIG_PREEMPT | 144 | #ifdef CONFIG_PREEMPT |
119 | printk("PREEMPT "); | 145 | printk("PREEMPT "); |
120 | #endif | 146 | #endif |
121 | #ifdef CONFIG_SMP | 147 | #ifdef CONFIG_SMP |
122 | printk("SMP NR_CPUS=%d ", NR_CPUS); | 148 | printk("SMP NR_CPUS=%d ", NR_CPUS); |
123 | #endif | 149 | #endif |
124 | #ifdef CONFIG_DEBUG_PAGEALLOC | 150 | #ifdef CONFIG_DEBUG_PAGEALLOC |
125 | printk("DEBUG_PAGEALLOC "); | 151 | printk("DEBUG_PAGEALLOC "); |
126 | #endif | 152 | #endif |
127 | #ifdef CONFIG_NUMA | 153 | #ifdef CONFIG_NUMA |
128 | printk("NUMA "); | 154 | printk("NUMA "); |
129 | #endif | 155 | #endif |
130 | printk("%s\n", ppc_md.name ? "" : ppc_md.name); | 156 | printk("%s\n", ppc_md.name ? ppc_md.name : ""); |
157 | |||
158 | print_modules(); | ||
159 | show_regs(regs); | ||
160 | } else { | ||
161 | printk("Recursive die() failure, output suppressed\n"); | ||
162 | } | ||
131 | 163 | ||
132 | print_modules(); | ||
133 | show_regs(regs); | ||
134 | bust_spinlocks(0); | 164 | bust_spinlocks(0); |
135 | spin_unlock_irq(&die_lock); | 165 | die.lock_owner = -1; |
166 | spin_unlock_irqrestore(&die.lock, flags); | ||
136 | 167 | ||
137 | if (kexec_should_crash(current) || | 168 | if (kexec_should_crash(current) || |
138 | kexec_sr_activated(smp_processor_id())) | 169 | kexec_sr_activated(smp_processor_id())) |
@@ -145,6 +176,7 @@ int die(const char *str, struct pt_regs *regs, long err) | |||
145 | if (panic_on_oops) | 176 | if (panic_on_oops) |
146 | panic("Fatal exception"); | 177 | panic("Fatal exception"); |
147 | 178 | ||
179 | oops_exit(); | ||
148 | do_exit(err); | 180 | do_exit(err); |
149 | 181 | ||
150 | return 0; | 182 | return 0; |
diff --git a/arch/powerpc/lib/locks.c b/arch/powerpc/lib/locks.c index 80b482ca30df..79d0fa3a470d 100644 --- a/arch/powerpc/lib/locks.c +++ b/arch/powerpc/lib/locks.c | |||
@@ -43,9 +43,11 @@ void __spin_yield(raw_spinlock_t *lock) | |||
43 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | 43 | if (firmware_has_feature(FW_FEATURE_ISERIES)) |
44 | HvCall2(HvCallBaseYieldProcessor, HvCall_YieldToProc, | 44 | HvCall2(HvCallBaseYieldProcessor, HvCall_YieldToProc, |
45 | ((u64)holder_cpu << 32) | yield_count); | 45 | ((u64)holder_cpu << 32) | yield_count); |
46 | #ifdef CONFIG_PPC_SPLPAR | ||
46 | else | 47 | else |
47 | plpar_hcall_norets(H_CONFER, | 48 | plpar_hcall_norets(H_CONFER, |
48 | get_hard_smp_processor_id(holder_cpu), yield_count); | 49 | get_hard_smp_processor_id(holder_cpu), yield_count); |
50 | #endif | ||
49 | } | 51 | } |
50 | 52 | ||
51 | /* | 53 | /* |
@@ -72,9 +74,11 @@ void __rw_yield(raw_rwlock_t *rw) | |||
72 | if (firmware_has_feature(FW_FEATURE_ISERIES)) | 74 | if (firmware_has_feature(FW_FEATURE_ISERIES)) |
73 | HvCall2(HvCallBaseYieldProcessor, HvCall_YieldToProc, | 75 | HvCall2(HvCallBaseYieldProcessor, HvCall_YieldToProc, |
74 | ((u64)holder_cpu << 32) | yield_count); | 76 | ((u64)holder_cpu << 32) | yield_count); |
77 | #ifdef CONFIG_PPC_SPLPAR | ||
75 | else | 78 | else |
76 | plpar_hcall_norets(H_CONFER, | 79 | plpar_hcall_norets(H_CONFER, |
77 | get_hard_smp_processor_id(holder_cpu), yield_count); | 80 | get_hard_smp_processor_id(holder_cpu), yield_count); |
81 | #endif | ||
78 | } | 82 | } |
79 | #endif | 83 | #endif |
80 | 84 | ||
diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c index 716a2906a24d..e3a1e8dc536a 100644 --- a/arch/powerpc/mm/lmb.c +++ b/arch/powerpc/mm/lmb.c | |||
@@ -146,6 +146,10 @@ static long __init lmb_add_region(struct lmb_region *rgn, unsigned long base, | |||
146 | unsigned long rgnbase = rgn->region[i].base; | 146 | unsigned long rgnbase = rgn->region[i].base; |
147 | unsigned long rgnsize = rgn->region[i].size; | 147 | unsigned long rgnsize = rgn->region[i].size; |
148 | 148 | ||
149 | if ((rgnbase == base) && (rgnsize == size)) | ||
150 | /* Already have this region, so we're done */ | ||
151 | return 0; | ||
152 | |||
149 | adjacent = lmb_addrs_adjacent(base,size,rgnbase,rgnsize); | 153 | adjacent = lmb_addrs_adjacent(base,size,rgnbase,rgnsize); |
150 | if ( adjacent > 0 ) { | 154 | if ( adjacent > 0 ) { |
151 | rgn->region[i].base -= size; | 155 | rgn->region[i].base -= size; |
diff --git a/arch/powerpc/platforms/52xx/Kconfig b/arch/powerpc/platforms/52xx/Kconfig new file mode 100644 index 000000000000..bc4aa4a80a12 --- /dev/null +++ b/arch/powerpc/platforms/52xx/Kconfig | |||
@@ -0,0 +1,35 @@ | |||
1 | config PPC_MPC52xx | ||
2 | bool | ||
3 | default n | ||
4 | |||
5 | config PPC_MPC5200 | ||
6 | bool | ||
7 | select PPC_MPC52xx | ||
8 | default n | ||
9 | |||
10 | config PPC_MPC5200_BUGFIX | ||
11 | bool "MPC5200 (L25R) bugfix support" | ||
12 | depends on PPC_MPC5200 | ||
13 | default n | ||
14 | help | ||
15 | Enable workarounds for original MPC5200 errata. This is not required | ||
16 | for MPC5200B based boards. | ||
17 | |||
18 | It is safe to say 'Y' here | ||
19 | |||
20 | config PPC_EFIKA | ||
21 | bool "bPlan Efika 5k2. MPC5200B based computer" | ||
22 | depends on PPC_MULTIPLATFORM && PPC32 | ||
23 | select PPC_RTAS | ||
24 | select RTAS_PROC | ||
25 | select PPC_MPC52xx | ||
26 | select PPC_NATIVE | ||
27 | default n | ||
28 | |||
29 | config PPC_LITE5200 | ||
30 | bool "Freescale Lite5200 Eval Board" | ||
31 | depends on PPC_MULTIPLATFORM && PPC32 | ||
32 | select PPC_MPC5200 | ||
33 | default n | ||
34 | |||
35 | |||
diff --git a/arch/powerpc/platforms/82xx/Kconfig b/arch/powerpc/platforms/82xx/Kconfig index 47d841ecf2e2..411071686f20 100644 --- a/arch/powerpc/platforms/82xx/Kconfig +++ b/arch/powerpc/platforms/82xx/Kconfig | |||
@@ -18,4 +18,39 @@ config MPC82xx_ADS | |||
18 | 18 | ||
19 | endchoice | 19 | endchoice |
20 | 20 | ||
21 | config PQ2ADS | ||
22 | bool | ||
23 | depends on ADS8272 | ||
24 | default y | ||
25 | |||
26 | config ADS8272 | ||
27 | bool | ||
28 | |||
29 | config 8260 | ||
30 | bool "CPM2 Support" if WILLOW | ||
31 | depends on 6xx | ||
32 | default y if PQ2FADS | ||
33 | help | ||
34 | The MPC8260 is a typical embedded CPU made by Motorola. Selecting | ||
35 | this option means that you wish to build a kernel for a machine with | ||
36 | an 8260 class CPU. | ||
37 | |||
38 | config 8272 | ||
39 | bool | ||
40 | depends on 6xx | ||
41 | default y if ADS8272 | ||
42 | select 8260 | ||
43 | help | ||
44 | The MPC8272 CPM has a different internal dpram setup than other CPM2 | ||
45 | devices | ||
46 | |||
47 | config CPM2 | ||
48 | bool | ||
49 | depends on 8260 || MPC8560 || MPC8555 | ||
50 | default y | ||
51 | help | ||
52 | The CPM2 (Communications Processor Module) is a coprocessor on | ||
53 | embedded CPUs made by Motorola. Selecting this option means that | ||
54 | you wish to build a kernel for a machine with a CPM2 coprocessor | ||
55 | on it (826x, 827x, 8560). | ||
21 | endmenu | 56 | endmenu |
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig index 713b31a16ce9..2a23392bb92e 100644 --- a/arch/powerpc/platforms/83xx/Kconfig +++ b/arch/powerpc/platforms/83xx/Kconfig | |||
@@ -18,6 +18,13 @@ config MPC832x_MDS | |||
18 | help | 18 | help |
19 | This option enables support for the MPC832x MDS evaluation board. | 19 | This option enables support for the MPC832x MDS evaluation board. |
20 | 20 | ||
21 | config MPC832x_RDB | ||
22 | bool "Freescale MPC832x RDB" | ||
23 | select DEFAULT_UIMAGE | ||
24 | select QUICC_ENGINE | ||
25 | help | ||
26 | This option enables support for the MPC8323 RDB board. | ||
27 | |||
21 | config MPC834x_MDS | 28 | config MPC834x_MDS |
22 | bool "Freescale MPC834x MDS" | 29 | bool "Freescale MPC834x MDS" |
23 | select DEFAULT_UIMAGE | 30 | select DEFAULT_UIMAGE |
@@ -57,7 +64,7 @@ config PPC_MPC832x | |||
57 | bool | 64 | bool |
58 | select PPC_UDBG_16550 | 65 | select PPC_UDBG_16550 |
59 | select PPC_INDIRECT_PCI | 66 | select PPC_INDIRECT_PCI |
60 | default y if MPC832x_MDS | 67 | default y if MPC832x_MDS || MPC832x_RDB |
61 | 68 | ||
62 | config MPC834x | 69 | config MPC834x |
63 | bool | 70 | bool |
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile index dfc970d0df10..31a91b53f528 100644 --- a/arch/powerpc/platforms/83xx/Makefile +++ b/arch/powerpc/platforms/83xx/Makefile | |||
@@ -4,6 +4,7 @@ | |||
4 | obj-y := misc.o | 4 | obj-y := misc.o |
5 | obj-$(CONFIG_PCI) += pci.o | 5 | obj-$(CONFIG_PCI) += pci.o |
6 | obj-$(CONFIG_MPC8313_RDB) += mpc8313_rdb.o | 6 | obj-$(CONFIG_MPC8313_RDB) += mpc8313_rdb.o |
7 | obj-$(CONFIG_MPC832x_RDB) += mpc832x_rdb.o | ||
7 | obj-$(CONFIG_MPC834x_MDS) += mpc834x_mds.o | 8 | obj-$(CONFIG_MPC834x_MDS) += mpc834x_mds.o |
8 | obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o | 9 | obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o |
9 | obj-$(CONFIG_MPC836x_MDS) += mpc836x_mds.o | 10 | obj-$(CONFIG_MPC836x_MDS) += mpc836x_mds.o |
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c index 17e3a3c6d8b4..fff09f5d6edf 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c | |||
@@ -41,7 +41,6 @@ | |||
41 | #include <asm/qe_ic.h> | 41 | #include <asm/qe_ic.h> |
42 | 42 | ||
43 | #include "mpc83xx.h" | 43 | #include "mpc83xx.h" |
44 | #include "mpc832x_mds.h" | ||
45 | 44 | ||
46 | #undef DEBUG | 45 | #undef DEBUG |
47 | #ifdef DEBUG | 46 | #ifdef DEBUG |
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.h b/arch/powerpc/platforms/83xx/mpc832x_mds.h deleted file mode 100644 index a49588904f8a..000000000000 --- a/arch/powerpc/platforms/83xx/mpc832x_mds.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved. | ||
3 | * | ||
4 | * Description: | ||
5 | * MPC832x MDS board specific header. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_MPC832x_MDS_H__ | ||
15 | #define __MACH_MPC832x_MDS_H__ | ||
16 | |||
17 | extern u8 *get_bcsr(void); | ||
18 | |||
19 | #endif /* __MACH_MPC832x_MDS_H__ */ | ||
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c new file mode 100644 index 000000000000..6b71e9ffb11a --- /dev/null +++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c | |||
@@ -0,0 +1,138 @@ | |||
1 | /* | ||
2 | * arch/powerpc/platforms/83xx/mpc832x_rdb.c | ||
3 | * | ||
4 | * Copyright (C) Freescale Semiconductor, Inc. 2007. All rights reserved. | ||
5 | * | ||
6 | * Description: | ||
7 | * MPC832x RDB board specific routines. | ||
8 | * This file is based on mpc832x_mds.c and mpc8313_rdb.c | ||
9 | * Author: Michael Barkowski <michael.barkowski@freescale.com> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | */ | ||
16 | |||
17 | #include <linux/pci.h> | ||
18 | |||
19 | #include <asm/of_platform.h> | ||
20 | #include <asm/time.h> | ||
21 | #include <asm/ipic.h> | ||
22 | #include <asm/udbg.h> | ||
23 | #include <asm/qe.h> | ||
24 | #include <asm/qe_ic.h> | ||
25 | |||
26 | #include "mpc83xx.h" | ||
27 | |||
28 | #undef DEBUG | ||
29 | #ifdef DEBUG | ||
30 | #define DBG(fmt...) udbg_printf(fmt) | ||
31 | #else | ||
32 | #define DBG(fmt...) | ||
33 | #endif | ||
34 | |||
35 | #ifndef CONFIG_PCI | ||
36 | unsigned long isa_io_base = 0; | ||
37 | unsigned long isa_mem_base = 0; | ||
38 | #endif | ||
39 | |||
40 | /* ************************************************************************ | ||
41 | * | ||
42 | * Setup the architecture | ||
43 | * | ||
44 | */ | ||
45 | static void __init mpc832x_rdb_setup_arch(void) | ||
46 | { | ||
47 | struct device_node *np; | ||
48 | |||
49 | if (ppc_md.progress) | ||
50 | ppc_md.progress("mpc832x_rdb_setup_arch()", 0); | ||
51 | |||
52 | #ifdef CONFIG_PCI | ||
53 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | ||
54 | add_bridge(np); | ||
55 | |||
56 | ppc_md.pci_exclude_device = mpc83xx_exclude_device; | ||
57 | #endif | ||
58 | |||
59 | #ifdef CONFIG_QUICC_ENGINE | ||
60 | qe_reset(); | ||
61 | |||
62 | if ((np = of_find_node_by_name(np, "par_io")) != NULL) { | ||
63 | par_io_init(np); | ||
64 | of_node_put(np); | ||
65 | |||
66 | for (np = NULL; (np = of_find_node_by_name(np, "ucc")) != NULL;) | ||
67 | par_io_of_config(np); | ||
68 | } | ||
69 | #endif /* CONFIG_QUICC_ENGINE */ | ||
70 | } | ||
71 | |||
72 | static struct of_device_id mpc832x_ids[] = { | ||
73 | { .type = "soc", }, | ||
74 | { .compatible = "soc", }, | ||
75 | { .type = "qe", }, | ||
76 | {}, | ||
77 | }; | ||
78 | |||
79 | static int __init mpc832x_declare_of_platform_devices(void) | ||
80 | { | ||
81 | if (!machine_is(mpc832x_rdb)) | ||
82 | return 0; | ||
83 | |||
84 | /* Publish the QE devices */ | ||
85 | of_platform_bus_probe(NULL, mpc832x_ids, NULL); | ||
86 | |||
87 | return 0; | ||
88 | } | ||
89 | device_initcall(mpc832x_declare_of_platform_devices); | ||
90 | |||
91 | void __init mpc832x_rdb_init_IRQ(void) | ||
92 | { | ||
93 | |||
94 | struct device_node *np; | ||
95 | |||
96 | np = of_find_node_by_type(NULL, "ipic"); | ||
97 | if (!np) | ||
98 | return; | ||
99 | |||
100 | ipic_init(np, 0); | ||
101 | |||
102 | /* Initialize the default interrupt mapping priorities, | ||
103 | * in case the boot rom changed something on us. | ||
104 | */ | ||
105 | ipic_set_default_priority(); | ||
106 | of_node_put(np); | ||
107 | |||
108 | #ifdef CONFIG_QUICC_ENGINE | ||
109 | np = of_find_node_by_type(NULL, "qeic"); | ||
110 | if (!np) | ||
111 | return; | ||
112 | |||
113 | qe_ic_init(np, 0); | ||
114 | of_node_put(np); | ||
115 | #endif /* CONFIG_QUICC_ENGINE */ | ||
116 | } | ||
117 | |||
118 | /* | ||
119 | * Called very early, MMU is off, device-tree isn't unflattened | ||
120 | */ | ||
121 | static int __init mpc832x_rdb_probe(void) | ||
122 | { | ||
123 | unsigned long root = of_get_flat_dt_root(); | ||
124 | |||
125 | return of_flat_dt_is_compatible(root, "MPC832xRDB"); | ||
126 | } | ||
127 | |||
128 | define_machine(mpc832x_rdb) { | ||
129 | .name = "MPC832x RDB", | ||
130 | .probe = mpc832x_rdb_probe, | ||
131 | .setup_arch = mpc832x_rdb_setup_arch, | ||
132 | .init_IRQ = mpc832x_rdb_init_IRQ, | ||
133 | .get_irq = ipic_get_irq, | ||
134 | .restart = mpc83xx_restart, | ||
135 | .time_init = mpc83xx_time_init, | ||
136 | .calibrate_decr = generic_calibrate_decr, | ||
137 | .progress = udbg_progress, | ||
138 | }; | ||
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.h b/arch/powerpc/platforms/83xx/mpc834x_itx.h deleted file mode 100644 index 174ca4ef55f3..000000000000 --- a/arch/powerpc/platforms/83xx/mpc834x_itx.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | /* | ||
2 | * arch/powerpc/platforms/83xx/mpc834x_itx.h | ||
3 | * | ||
4 | * MPC834X ITX common board definitions | ||
5 | * | ||
6 | * Maintainer: Kumar Gala <galak@kernel.crashing.org> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #ifndef __MACH_MPC83XX_ITX_H__ | ||
16 | #define __MACH_MPC83XX_ITX_H__ | ||
17 | |||
18 | #define PIRQA MPC83xx_IRQ_EXT4 | ||
19 | #define PIRQB MPC83xx_IRQ_EXT5 | ||
20 | #define PIRQC MPC83xx_IRQ_EXT6 | ||
21 | #define PIRQD MPC83xx_IRQ_EXT7 | ||
22 | |||
23 | #endif /* __MACH_MPC83XX_ITX_H__ */ | ||
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index e764c0aced88..329fcd48669a 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig | |||
@@ -30,6 +30,12 @@ config MPC85xx_MDS | |||
30 | help | 30 | help |
31 | This option enables support for the MPC85xx MDS board | 31 | This option enables support for the MPC85xx MDS board |
32 | 32 | ||
33 | config MPC8544_DS | ||
34 | bool "Freescale MPC8544 DS" | ||
35 | select DEFAULT_UIMAGE | ||
36 | help | ||
37 | This option enables support for the MPC8544 DS board | ||
38 | |||
33 | endchoice | 39 | endchoice |
34 | 40 | ||
35 | config MPC8540 | 41 | config MPC8540 |
@@ -48,7 +54,8 @@ config MPC85xx | |||
48 | select PPC_UDBG_16550 | 54 | select PPC_UDBG_16550 |
49 | select PPC_INDIRECT_PCI | 55 | select PPC_INDIRECT_PCI |
50 | select SERIAL_8250_SHARE_IRQ if SERIAL_8250 | 56 | select SERIAL_8250_SHARE_IRQ if SERIAL_8250 |
51 | default y if MPC8540_ADS || MPC85xx_CDS || MPC8560_ADS || MPC85xx_MDS | 57 | default y if MPC8540_ADS || MPC85xx_CDS || MPC8560_ADS \ |
58 | || MPC85xx_MDS || MPC8544_DS | ||
52 | 59 | ||
53 | config PPC_INDIRECT_PCI_BE | 60 | config PPC_INDIRECT_PCI_BE |
54 | bool | 61 | bool |
diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile index 4e63917ada9d..4e02cbb14cf7 100644 --- a/arch/powerpc/platforms/85xx/Makefile +++ b/arch/powerpc/platforms/85xx/Makefile | |||
@@ -5,4 +5,5 @@ obj-$(CONFIG_PPC_85xx) += misc.o pci.o | |||
5 | obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o | 5 | obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o |
6 | obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o | 6 | obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o |
7 | obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o | 7 | obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o |
8 | obj-$(CONFIG_MPC8544_DS) += mpc8544_ds.o | ||
8 | obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o | 9 | obj-$(CONFIG_MPC85xx_MDS) += mpc85xx_mds.o |
diff --git a/arch/powerpc/platforms/85xx/mpc8544_ds.c b/arch/powerpc/platforms/85xx/mpc8544_ds.c new file mode 100644 index 000000000000..2867f85e6325 --- /dev/null +++ b/arch/powerpc/platforms/85xx/mpc8544_ds.c | |||
@@ -0,0 +1,144 @@ | |||
1 | /* | ||
2 | * MPC8544 DS Board Setup | ||
3 | * | ||
4 | * Author Xianghua Xiao (x.xiao@freescale.com) | ||
5 | * Copyright 2007 Freescale Semiconductor Inc. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <linux/stddef.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/kdev_t.h> | ||
16 | #include <linux/delay.h> | ||
17 | #include <linux/seq_file.h> | ||
18 | |||
19 | #include <asm/system.h> | ||
20 | #include <asm/time.h> | ||
21 | #include <asm/machdep.h> | ||
22 | #include <asm/mpc85xx.h> | ||
23 | #include <mm/mmu_decl.h> | ||
24 | #include <asm/prom.h> | ||
25 | #include <asm/udbg.h> | ||
26 | #include <asm/mpic.h> | ||
27 | #include <asm/i8259.h> | ||
28 | |||
29 | #include <sysdev/fsl_soc.h> | ||
30 | #include "mpc85xx.h" | ||
31 | |||
32 | #undef DEBUG | ||
33 | |||
34 | #ifdef DEBUG | ||
35 | #define DBG(fmt, args...) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args) | ||
36 | #else | ||
37 | #define DBG(fmt, args...) | ||
38 | #endif | ||
39 | |||
40 | |||
41 | void __init mpc8544_ds_pic_init(void) | ||
42 | { | ||
43 | struct mpic *mpic; | ||
44 | struct resource r; | ||
45 | struct device_node *np = NULL; | ||
46 | #ifdef CONFIG_PPC_I8259 | ||
47 | struct device_node *cascade_node = NULL; | ||
48 | int cascade_irq; | ||
49 | #endif | ||
50 | |||
51 | np = of_find_node_by_type(np, "open-pic"); | ||
52 | |||
53 | if (np == NULL) { | ||
54 | printk(KERN_ERR "Could not find open-pic node\n"); | ||
55 | return; | ||
56 | } | ||
57 | |||
58 | if (of_address_to_resource(np, 0, &r)) { | ||
59 | printk(KERN_ERR "Failed to map mpic register space\n"); | ||
60 | of_node_put(np); | ||
61 | return; | ||
62 | } | ||
63 | |||
64 | /* Alloc mpic structure and per isu has 16 INT entries. */ | ||
65 | mpic = mpic_alloc(np, r.start, | ||
66 | MPIC_PRIMARY | MPIC_WANTS_RESET | MPIC_BIG_ENDIAN, | ||
67 | 16, 64, " OPENPIC "); | ||
68 | BUG_ON(mpic == NULL); | ||
69 | |||
70 | /* | ||
71 | * 48 Internal Interrupts | ||
72 | */ | ||
73 | mpic_assign_isu(mpic, 0, r.start + 0x10200); | ||
74 | mpic_assign_isu(mpic, 1, r.start + 0x10400); | ||
75 | mpic_assign_isu(mpic, 2, r.start + 0x10600); | ||
76 | |||
77 | /* | ||
78 | * 16 External interrupts | ||
79 | */ | ||
80 | mpic_assign_isu(mpic, 3, r.start + 0x10000); | ||
81 | |||
82 | mpic_init(mpic); | ||
83 | |||
84 | #ifdef CONFIG_PPC_I8259 | ||
85 | /* Initialize the i8259 controller */ | ||
86 | for_each_node_by_type(np, "interrupt-controller") | ||
87 | if (device_is_compatible(np, "chrp,iic")) { | ||
88 | cascade_node = np; | ||
89 | break; | ||
90 | } | ||
91 | |||
92 | if (cascade_node == NULL) { | ||
93 | printk(KERN_DEBUG "Could not find i8259 PIC\n"); | ||
94 | return; | ||
95 | } | ||
96 | |||
97 | cascade_irq = irq_of_parse_and_map(cascade_node, 0); | ||
98 | if (cascade_irq == NO_IRQ) { | ||
99 | printk(KERN_ERR "Failed to map cascade interrupt\n"); | ||
100 | return; | ||
101 | } | ||
102 | |||
103 | DBG("mpc8544ds: cascade mapped to irq %d\n", cascade_irq); | ||
104 | |||
105 | i8259_init(cascade_node, 0); | ||
106 | of_node_put(cascade_node); | ||
107 | |||
108 | set_irq_chained_handler(cascade_irq, mpc8544_8259_cascade); | ||
109 | #endif /* CONFIG_PPC_I8259 */ | ||
110 | } | ||
111 | |||
112 | |||
113 | /* | ||
114 | * Setup the architecture | ||
115 | */ | ||
116 | static void __init mpc8544_ds_setup_arch(void) | ||
117 | { | ||
118 | if (ppc_md.progress) | ||
119 | ppc_md.progress("mpc8544_ds_setup_arch()", 0); | ||
120 | |||
121 | printk("MPC8544 DS board from Freescale Semiconductor\n"); | ||
122 | } | ||
123 | |||
124 | |||
125 | /* | ||
126 | * Called very early, device-tree isn't unflattened | ||
127 | */ | ||
128 | static int __init mpc8544_ds_probe(void) | ||
129 | { | ||
130 | unsigned long root = of_get_flat_dt_root(); | ||
131 | |||
132 | return of_flat_dt_is_compatible(root, "MPC8544DS"); | ||
133 | } | ||
134 | |||
135 | define_machine(mpc8544_ds) { | ||
136 | .name = "MPC8544 DS", | ||
137 | .probe = mpc8544_ds_probe, | ||
138 | .setup_arch = mpc8544_ds_setup_arch, | ||
139 | .init_IRQ = mpc8544_ds_pic_init, | ||
140 | .get_irq = mpic_get_irq, | ||
141 | .restart = mpc85xx_restart, | ||
142 | .calibrate_decr = generic_calibrate_decr, | ||
143 | .progress = udbg_progress, | ||
144 | }; | ||
diff --git a/arch/powerpc/platforms/86xx/Makefile b/arch/powerpc/platforms/86xx/Makefile index 476a6eeee710..418fd8f4d268 100644 --- a/arch/powerpc/platforms/86xx/Makefile +++ b/arch/powerpc/platforms/86xx/Makefile | |||
@@ -4,4 +4,4 @@ | |||
4 | 4 | ||
5 | obj-$(CONFIG_SMP) += mpc86xx_smp.o | 5 | obj-$(CONFIG_SMP) += mpc86xx_smp.o |
6 | obj-$(CONFIG_MPC8641_HPCN) += mpc86xx_hpcn.o | 6 | obj-$(CONFIG_MPC8641_HPCN) += mpc86xx_hpcn.o |
7 | obj-$(CONFIG_PCI) += pci.o mpc86xx_pcie.o | 7 | obj-$(CONFIG_PCI) += pci.o |
diff --git a/arch/powerpc/platforms/86xx/pci.c b/arch/powerpc/platforms/86xx/pci.c index 481e18ed5be9..ba86c48f446b 100644 --- a/arch/powerpc/platforms/86xx/pci.c +++ b/arch/powerpc/platforms/86xx/pci.c | |||
@@ -22,9 +22,9 @@ | |||
22 | #include <asm/atomic.h> | 22 | #include <asm/atomic.h> |
23 | #include <asm/io.h> | 23 | #include <asm/io.h> |
24 | #include <asm/prom.h> | 24 | #include <asm/prom.h> |
25 | #include <asm/immap_86xx.h> | ||
26 | #include <asm/pci-bridge.h> | 25 | #include <asm/pci-bridge.h> |
27 | #include <sysdev/fsl_soc.h> | 26 | #include <sysdev/fsl_soc.h> |
27 | #include <sysdev/fsl_pcie.h> | ||
28 | 28 | ||
29 | #include "mpc86xx.h" | 29 | #include "mpc86xx.h" |
30 | 30 | ||
diff --git a/arch/powerpc/platforms/8xx/mpc86xads.h b/arch/powerpc/platforms/8xx/mpc86xads.h index b5d19dd0619c..59bad2f9ae51 100644 --- a/arch/powerpc/platforms/8xx/mpc86xads.h +++ b/arch/powerpc/platforms/8xx/mpc86xads.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #define CPM_MAP_ADDR (get_immrbase() + MPC8xx_CPM_OFFSET) | 37 | #define CPM_MAP_ADDR (get_immrbase() + MPC8xx_CPM_OFFSET) |
38 | #define CPM_IRQ_OFFSET 16 // for compability with cpm_uart driver | 38 | #define CPM_IRQ_OFFSET 16 // for compability with cpm_uart driver |
39 | 39 | ||
40 | #define PCMCIA_MEM_ADDR (uint)0xff020000) | 40 | #define PCMCIA_MEM_ADDR ((uint)0xff020000) |
41 | #define PCMCIA_MEM_SIZE ((uint)(64 * 1024)) | 41 | #define PCMCIA_MEM_SIZE ((uint)(64 * 1024)) |
42 | 42 | ||
43 | /* Bits of interest in the BCSRs. | 43 | /* Bits of interest in the BCSRs. |
diff --git a/arch/powerpc/platforms/8xx/mpc885ads.h b/arch/powerpc/platforms/8xx/mpc885ads.h index 30cbebfe84c5..7c31aec284c2 100644 --- a/arch/powerpc/platforms/8xx/mpc885ads.h +++ b/arch/powerpc/platforms/8xx/mpc885ads.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #define CPM_MAP_ADDR (get_immrbase() + MPC8xx_CPM_OFFSET) | 37 | #define CPM_MAP_ADDR (get_immrbase() + MPC8xx_CPM_OFFSET) |
38 | #define CPM_IRQ_OFFSET 16 // for compability with cpm_uart driver | 38 | #define CPM_IRQ_OFFSET 16 // for compability with cpm_uart driver |
39 | 39 | ||
40 | #define PCMCIA_MEM_ADDR (uint)0xff020000) | 40 | #define PCMCIA_MEM_ADDR ((uint)0xff020000) |
41 | #define PCMCIA_MEM_SIZE ((uint)(64 * 1024)) | 41 | #define PCMCIA_MEM_SIZE ((uint)(64 * 1024)) |
42 | 42 | ||
43 | /* Bits of interest in the BCSRs. | 43 | /* Bits of interest in the BCSRs. |
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig new file mode 100644 index 000000000000..161ab797ad4c --- /dev/null +++ b/arch/powerpc/platforms/Kconfig | |||
@@ -0,0 +1,217 @@ | |||
1 | menu "Platform support" | ||
2 | depends on PPC64 || CLASSIC32 | ||
3 | |||
4 | choice | ||
5 | prompt "Machine type" | ||
6 | default PPC_MULTIPLATFORM | ||
7 | |||
8 | config PPC_MULTIPLATFORM | ||
9 | bool "Generic desktop/server/laptop" | ||
10 | help | ||
11 | Select this option if configuring for an IBM pSeries or | ||
12 | RS/6000 machine, an Apple machine, or a PReP, CHRP, | ||
13 | Maple or Cell-based machine. | ||
14 | |||
15 | config EMBEDDED6xx | ||
16 | bool "Embedded 6xx/7xx/7xxx-based board" | ||
17 | depends on PPC32 && (BROKEN||BROKEN_ON_SMP) | ||
18 | |||
19 | config APUS | ||
20 | bool "Amiga-APUS" | ||
21 | depends on PPC32 && BROKEN | ||
22 | help | ||
23 | Select APUS if configuring for a PowerUP Amiga. | ||
24 | More information is available at: | ||
25 | <http://linux-apus.sourceforge.net/>. | ||
26 | endchoice | ||
27 | |||
28 | config QUICC_ENGINE | ||
29 | bool | ||
30 | help | ||
31 | The QUICC Engine (QE) is a new generation of communications | ||
32 | coprocessors on Freescale embedded CPUs (akin to CPM in older chips). | ||
33 | Selecting this option means that you wish to build a kernel | ||
34 | for a machine with a QE coprocessor. | ||
35 | |||
36 | source "arch/powerpc/platforms/pseries/Kconfig" | ||
37 | source "arch/powerpc/platforms/iseries/Kconfig" | ||
38 | source "arch/powerpc/platforms/chrp/Kconfig" | ||
39 | source "arch/powerpc/platforms/52xx/Kconfig" | ||
40 | source "arch/powerpc/platforms/powermac/Kconfig" | ||
41 | source "arch/powerpc/platforms/prep/Kconfig" | ||
42 | source "arch/powerpc/platforms/maple/Kconfig" | ||
43 | source "arch/powerpc/platforms/pasemi/Kconfig" | ||
44 | source arch/powerpc/platforms/celleb/Kconfig | ||
45 | source arch/powerpc/platforms/ps3/Kconfig | ||
46 | source arch/powerpc/platforms/cell/Kconfig | ||
47 | |||
48 | config PPC_NATIVE | ||
49 | bool | ||
50 | depends on PPC_MULTIPLATFORM | ||
51 | help | ||
52 | Support for running natively on the hardware, i.e. without | ||
53 | a hypervisor. This option is not user-selectable but should | ||
54 | be selected by all platforms that need it. | ||
55 | |||
56 | config UDBG_RTAS_CONSOLE | ||
57 | bool "RTAS based debug console" | ||
58 | depends on PPC_RTAS | ||
59 | default n | ||
60 | |||
61 | config PPC_UDBG_BEAT | ||
62 | bool "BEAT based debug console" | ||
63 | depends on PPC_CELLEB | ||
64 | default n | ||
65 | |||
66 | config XICS | ||
67 | depends on PPC_PSERIES | ||
68 | bool | ||
69 | default y | ||
70 | |||
71 | config U3_DART | ||
72 | bool | ||
73 | depends on PPC_MULTIPLATFORM && PPC64 | ||
74 | default n | ||
75 | |||
76 | config PPC_RTAS | ||
77 | bool | ||
78 | default n | ||
79 | |||
80 | config RTAS_ERROR_LOGGING | ||
81 | bool | ||
82 | depends on PPC_RTAS | ||
83 | default n | ||
84 | |||
85 | config RTAS_PROC | ||
86 | bool "Proc interface to RTAS" | ||
87 | depends on PPC_RTAS | ||
88 | default y | ||
89 | |||
90 | config RTAS_FLASH | ||
91 | tristate "Firmware flash interface" | ||
92 | depends on PPC64 && RTAS_PROC | ||
93 | |||
94 | config PPC_PMI | ||
95 | tristate "Support for PMI" | ||
96 | depends PPC_IBM_CELL_BLADE | ||
97 | help | ||
98 | PMI (Platform Management Interrupt) is a way to | ||
99 | communicate with the BMC (Baseboard Mangement Controller). | ||
100 | It is used in some IBM Cell blades. | ||
101 | default m | ||
102 | |||
103 | config MMIO_NVRAM | ||
104 | bool | ||
105 | default n | ||
106 | |||
107 | config MPIC_BROKEN_U3 | ||
108 | bool | ||
109 | depends on PPC_MAPLE | ||
110 | default y | ||
111 | |||
112 | config IBMVIO | ||
113 | depends on PPC_PSERIES || PPC_ISERIES | ||
114 | bool | ||
115 | default y | ||
116 | |||
117 | config IBMEBUS | ||
118 | depends on PPC_PSERIES | ||
119 | bool "Support for GX bus based adapters" | ||
120 | help | ||
121 | Bus device driver for GX bus based adapters. | ||
122 | |||
123 | config PPC_MPC106 | ||
124 | bool | ||
125 | default n | ||
126 | |||
127 | config PPC_970_NAP | ||
128 | bool | ||
129 | default n | ||
130 | |||
131 | config PPC_INDIRECT_IO | ||
132 | bool | ||
133 | select GENERIC_IOMAP | ||
134 | default n | ||
135 | |||
136 | config GENERIC_IOMAP | ||
137 | bool | ||
138 | default n | ||
139 | |||
140 | source "drivers/cpufreq/Kconfig" | ||
141 | |||
142 | config CPU_FREQ_PMAC | ||
143 | bool "Support for Apple PowerBooks" | ||
144 | depends on CPU_FREQ && ADB_PMU && PPC32 | ||
145 | select CPU_FREQ_TABLE | ||
146 | help | ||
147 | This adds support for frequency switching on Apple PowerBooks, | ||
148 | this currently includes some models of iBook & Titanium | ||
149 | PowerBook. | ||
150 | |||
151 | config CPU_FREQ_PMAC64 | ||
152 | bool "Support for some Apple G5s" | ||
153 | depends on CPU_FREQ && PPC64 | ||
154 | select CPU_FREQ_TABLE | ||
155 | help | ||
156 | This adds support for frequency switching on Apple iMac G5, | ||
157 | and some of the more recent desktop G5 machines as well. | ||
158 | |||
159 | config PPC601_SYNC_FIX | ||
160 | bool "Workarounds for PPC601 bugs" | ||
161 | depends on 6xx && (PPC_PREP || PPC_PMAC) | ||
162 | help | ||
163 | Some versions of the PPC601 (the first PowerPC chip) have bugs which | ||
164 | mean that extra synchronization instructions are required near | ||
165 | certain instructions, typically those that make major changes to the | ||
166 | CPU state. These extra instructions reduce performance slightly. | ||
167 | If you say N here, these extra instructions will not be included, | ||
168 | resulting in a kernel which will run faster but may not run at all | ||
169 | on some systems with the PPC601 chip. | ||
170 | |||
171 | If in doubt, say Y here. | ||
172 | |||
173 | config TAU | ||
174 | bool "On-chip CPU temperature sensor support" | ||
175 | depends on 6xx | ||
176 | help | ||
177 | G3 and G4 processors have an on-chip temperature sensor called the | ||
178 | 'Thermal Assist Unit (TAU)', which, in theory, can measure the on-die | ||
179 | temperature within 2-4 degrees Celsius. This option shows the current | ||
180 | on-die temperature in /proc/cpuinfo if the cpu supports it. | ||
181 | |||
182 | Unfortunately, on some chip revisions, this sensor is very inaccurate | ||
183 | and in many cases, does not work at all, so don't assume the cpu | ||
184 | temp is actually what /proc/cpuinfo says it is. | ||
185 | |||
186 | config TAU_INT | ||
187 | bool "Interrupt driven TAU driver (DANGEROUS)" | ||
188 | depends on TAU | ||
189 | ---help--- | ||
190 | The TAU supports an interrupt driven mode which causes an interrupt | ||
191 | whenever the temperature goes out of range. This is the fastest way | ||
192 | to get notified the temp has exceeded a range. With this option off, | ||
193 | a timer is used to re-check the temperature periodically. | ||
194 | |||
195 | However, on some cpus it appears that the TAU interrupt hardware | ||
196 | is buggy and can cause a situation which would lead unexplained hard | ||
197 | lockups. | ||
198 | |||
199 | Unless you are extending the TAU driver, or enjoy kernel/hardware | ||
200 | debugging, leave this option off. | ||
201 | |||
202 | config TAU_AVERAGE | ||
203 | bool "Average high and low temp" | ||
204 | depends on TAU | ||
205 | ---help--- | ||
206 | The TAU hardware can compare the temperature to an upper and lower | ||
207 | bound. The default behavior is to show both the upper and lower | ||
208 | bound in /proc/cpuinfo. If the range is large, the temperature is | ||
209 | either changing a lot, or the TAU hardware is broken (likely on some | ||
210 | G4's). If the range is small (around 4 degrees), the temperature is | ||
211 | relatively stable. If you say Y here, a single temperature value, | ||
212 | halfway between the upper and lower bounds, will be reported in | ||
213 | /proc/cpuinfo. | ||
214 | |||
215 | If in doubt, say N here. | ||
216 | |||
217 | endmenu | ||
diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig index 06a85b704331..53913a26ef42 100644 --- a/arch/powerpc/platforms/cell/Kconfig +++ b/arch/powerpc/platforms/cell/Kconfig | |||
@@ -1,3 +1,26 @@ | |||
1 | config PPC_CELL | ||
2 | bool | ||
3 | default n | ||
4 | |||
5 | config PPC_CELL_NATIVE | ||
6 | bool | ||
7 | select PPC_CELL | ||
8 | select PPC_DCR_MMIO | ||
9 | select PPC_OF_PLATFORM_PCI | ||
10 | select PPC_INDIRECT_IO | ||
11 | select PPC_NATIVE | ||
12 | select MPIC | ||
13 | default n | ||
14 | |||
15 | config PPC_IBM_CELL_BLADE | ||
16 | bool "IBM Cell Blade" | ||
17 | depends on PPC_MULTIPLATFORM && PPC64 | ||
18 | select PPC_CELL_NATIVE | ||
19 | select PPC_RTAS | ||
20 | select MMIO_NVRAM | ||
21 | select PPC_UDBG_16550 | ||
22 | select UDBG_RTAS_CONSOLE | ||
23 | |||
1 | menu "Cell Broadband Engine options" | 24 | menu "Cell Broadband Engine options" |
2 | depends on PPC_CELL | 25 | depends on PPC_CELL |
3 | 26 | ||
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c index 67d617b60a23..7c953cc022f6 100644 --- a/arch/powerpc/platforms/cell/iommu.c +++ b/arch/powerpc/platforms/cell/iommu.c | |||
@@ -496,7 +496,7 @@ static void cell_dma_dev_setup(struct device *dev) | |||
496 | struct dev_archdata *archdata = &dev->archdata; | 496 | struct dev_archdata *archdata = &dev->archdata; |
497 | 497 | ||
498 | /* If we run without iommu, no need to do anything */ | 498 | /* If we run without iommu, no need to do anything */ |
499 | if (pci_dma_ops == &dma_direct_ops) | 499 | if (get_pci_dma_ops() == &dma_direct_ops) |
500 | return; | 500 | return; |
501 | 501 | ||
502 | /* Current implementation uses the first window available in that | 502 | /* Current implementation uses the first window available in that |
@@ -530,7 +530,7 @@ static int cell_of_bus_notify(struct notifier_block *nb, unsigned long action, | |||
530 | return 0; | 530 | return 0; |
531 | 531 | ||
532 | /* We use the PCI DMA ops */ | 532 | /* We use the PCI DMA ops */ |
533 | dev->archdata.dma_ops = pci_dma_ops; | 533 | dev->archdata.dma_ops = get_pci_dma_ops(); |
534 | 534 | ||
535 | cell_dma_dev_setup(dev); | 535 | cell_dma_dev_setup(dev); |
536 | 536 | ||
@@ -646,7 +646,7 @@ static int __init cell_iommu_init_disabled(void) | |||
646 | unsigned long base = 0, size; | 646 | unsigned long base = 0, size; |
647 | 647 | ||
648 | /* When no iommu is present, we use direct DMA ops */ | 648 | /* When no iommu is present, we use direct DMA ops */ |
649 | pci_dma_ops = &dma_direct_ops; | 649 | set_pci_dma_ops(&dma_direct_ops); |
650 | 650 | ||
651 | /* First make sure all IOC translation is turned off */ | 651 | /* First make sure all IOC translation is turned off */ |
652 | cell_disable_iommus(); | 652 | cell_disable_iommus(); |
@@ -734,7 +734,7 @@ static int __init cell_iommu_init(void) | |||
734 | } | 734 | } |
735 | 735 | ||
736 | /* Setup default PCI iommu ops */ | 736 | /* Setup default PCI iommu ops */ |
737 | pci_dma_ops = &dma_iommu_ops; | 737 | set_pci_dma_ops(&dma_iommu_ops); |
738 | 738 | ||
739 | bail: | 739 | bail: |
740 | /* Register callbacks on OF platform device addition/removal | 740 | /* Register callbacks on OF platform device addition/removal |
diff --git a/arch/powerpc/platforms/celleb/Kconfig b/arch/powerpc/platforms/celleb/Kconfig new file mode 100644 index 000000000000..2db1e293433e --- /dev/null +++ b/arch/powerpc/platforms/celleb/Kconfig | |||
@@ -0,0 +1,9 @@ | |||
1 | config PPC_CELLEB | ||
2 | bool "Toshiba's Cell Reference Set 'Celleb' Architecture" | ||
3 | depends on PPC_MULTIPLATFORM && PPC64 | ||
4 | select PPC_CELL | ||
5 | select PPC_OF_PLATFORM_PCI | ||
6 | select HAS_TXX9_SERIAL | ||
7 | select PPC_UDBG_BEAT | ||
8 | select USB_OHCI_BIG_ENDIAN_MMIO | ||
9 | select USB_EHCI_BIG_ENDIAN_MMIO | ||
diff --git a/arch/powerpc/platforms/celleb/iommu.c b/arch/powerpc/platforms/celleb/iommu.c index f63b94c65353..e94de6a24622 100644 --- a/arch/powerpc/platforms/celleb/iommu.c +++ b/arch/powerpc/platforms/celleb/iommu.c | |||
@@ -80,7 +80,7 @@ static int celleb_of_bus_notify(struct notifier_block *nb, | |||
80 | if (action != BUS_NOTIFY_ADD_DEVICE) | 80 | if (action != BUS_NOTIFY_ADD_DEVICE) |
81 | return 0; | 81 | return 0; |
82 | 82 | ||
83 | dev->archdata.dma_ops = pci_dma_ops; | 83 | dev->archdata.dma_ops = get_pci_dma_ops(); |
84 | 84 | ||
85 | return 0; | 85 | return 0; |
86 | } | 86 | } |
@@ -95,7 +95,7 @@ static int __init celleb_init_iommu(void) | |||
95 | return -ENODEV; | 95 | return -ENODEV; |
96 | 96 | ||
97 | celleb_init_direct_mapping(); | 97 | celleb_init_direct_mapping(); |
98 | pci_dma_ops = &dma_direct_ops; | 98 | set_pci_dma_ops(&dma_direct_ops); |
99 | bus_register_notifier(&of_platform_bus_type, &celleb_of_bus_notifier); | 99 | bus_register_notifier(&of_platform_bus_type, &celleb_of_bus_notifier); |
100 | 100 | ||
101 | return 0; | 101 | return 0; |
diff --git a/arch/powerpc/platforms/chrp/Kconfig b/arch/powerpc/platforms/chrp/Kconfig new file mode 100644 index 000000000000..d2c690531963 --- /dev/null +++ b/arch/powerpc/platforms/chrp/Kconfig | |||
@@ -0,0 +1,11 @@ | |||
1 | config PPC_CHRP | ||
2 | bool "Common Hardware Reference Platform (CHRP) based machines" | ||
3 | depends on PPC_MULTIPLATFORM && PPC32 | ||
4 | select MPIC | ||
5 | select PPC_I8259 | ||
6 | select PPC_INDIRECT_PCI | ||
7 | select PPC_RTAS | ||
8 | select PPC_MPC106 | ||
9 | select PPC_UDBG_16550 | ||
10 | select PPC_NATIVE | ||
11 | default y | ||
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c index 117c9a0055bd..1edce720afce 100644 --- a/arch/powerpc/platforms/chrp/setup.c +++ b/arch/powerpc/platforms/chrp/setup.c | |||
@@ -427,7 +427,7 @@ static void __init chrp_find_openpic(void) | |||
427 | of_node_put(np); | 427 | of_node_put(np); |
428 | } | 428 | } |
429 | 429 | ||
430 | #if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(XMON) | 430 | #if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_XMON) |
431 | static struct irqaction xmon_irqaction = { | 431 | static struct irqaction xmon_irqaction = { |
432 | .handler = xmon_irq, | 432 | .handler = xmon_irq, |
433 | .mask = CPU_MASK_NONE, | 433 | .mask = CPU_MASK_NONE, |
@@ -493,7 +493,7 @@ static void __init chrp_find_8259(void) | |||
493 | 493 | ||
494 | void __init chrp_init_IRQ(void) | 494 | void __init chrp_init_IRQ(void) |
495 | { | 495 | { |
496 | #if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(XMON) | 496 | #if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_XMON) |
497 | struct device_node *kbd; | 497 | struct device_node *kbd; |
498 | #endif | 498 | #endif |
499 | chrp_find_openpic(); | 499 | chrp_find_openpic(); |
@@ -510,7 +510,7 @@ void __init chrp_init_IRQ(void) | |||
510 | if (_chrp_type == _CHRP_Pegasos) | 510 | if (_chrp_type == _CHRP_Pegasos) |
511 | ppc_md.get_irq = i8259_irq; | 511 | ppc_md.get_irq = i8259_irq; |
512 | 512 | ||
513 | #if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(XMON) | 513 | #if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_XMON) |
514 | /* see if there is a keyboard in the device tree | 514 | /* see if there is a keyboard in the device tree |
515 | with a parent of type "adb" */ | 515 | with a parent of type "adb" */ |
516 | for (kbd = find_devices("keyboard"); kbd; kbd = kbd->next) | 516 | for (kbd = find_devices("keyboard"); kbd; kbd = kbd->next) |
diff --git a/arch/powerpc/platforms/embedded6xx/Kconfig b/arch/powerpc/platforms/embedded6xx/Kconfig index 3410bcbc9dbe..9557908ef545 100644 --- a/arch/powerpc/platforms/embedded6xx/Kconfig +++ b/arch/powerpc/platforms/embedded6xx/Kconfig | |||
@@ -2,78 +2,6 @@ choice | |||
2 | prompt "Machine Type" | 2 | prompt "Machine Type" |
3 | depends on EMBEDDED6xx | 3 | depends on EMBEDDED6xx |
4 | 4 | ||
5 | config KATANA | ||
6 | bool "Artesyn-Katana" | ||
7 | help | ||
8 | Select KATANA if configuring an Artesyn KATANA 750i or 3750 | ||
9 | cPCI board. | ||
10 | |||
11 | config WILLOW | ||
12 | bool "Cogent-Willow" | ||
13 | |||
14 | config CPCI690 | ||
15 | bool "Force-CPCI690" | ||
16 | help | ||
17 | Select CPCI690 if configuring a Force CPCI690 cPCI board. | ||
18 | |||
19 | config POWERPMC250 | ||
20 | bool "Force-PowerPMC250" | ||
21 | |||
22 | config CHESTNUT | ||
23 | bool "IBM 750FX Eval board or 750GX Eval board" | ||
24 | help | ||
25 | Select CHESTNUT if configuring an IBM 750FX Eval Board or a | ||
26 | IBM 750GX Eval board. | ||
27 | |||
28 | config SPRUCE | ||
29 | bool "IBM-Spruce" | ||
30 | select PPC_INDIRECT_PCI | ||
31 | |||
32 | config HDPU | ||
33 | bool "Sky-HDPU" | ||
34 | help | ||
35 | Select HDPU if configuring a Sky Computers Compute Blade. | ||
36 | |||
37 | config HDPU_FEATURES | ||
38 | depends on HDPU | ||
39 | tristate "HDPU-Features" | ||
40 | help | ||
41 | Select to enable HDPU enhanced features. | ||
42 | |||
43 | config EV64260 | ||
44 | bool "Marvell-EV64260BP" | ||
45 | help | ||
46 | Select EV64260 if configuring a Marvell (formerly Galileo) | ||
47 | EV64260BP Evaluation platform. | ||
48 | |||
49 | config LOPEC | ||
50 | bool "Motorola-LoPEC" | ||
51 | select PPC_I8259 | ||
52 | |||
53 | config MVME5100 | ||
54 | bool "Motorola-MVME5100" | ||
55 | select PPC_INDIRECT_PCI | ||
56 | |||
57 | config PPLUS | ||
58 | bool "Motorola-PowerPlus" | ||
59 | select PPC_I8259 | ||
60 | select PPC_INDIRECT_PCI | ||
61 | |||
62 | config PRPMC750 | ||
63 | bool "Motorola-PrPMC750" | ||
64 | select PPC_INDIRECT_PCI | ||
65 | |||
66 | config PRPMC800 | ||
67 | bool "Motorola-PrPMC800" | ||
68 | select PPC_INDIRECT_PCI | ||
69 | |||
70 | config SANDPOINT | ||
71 | bool "Motorola-Sandpoint" | ||
72 | select PPC_I8259 | ||
73 | help | ||
74 | Select SANDPOINT if configuring for a Motorola Sandpoint X3 | ||
75 | (any flavor). | ||
76 | |||
77 | config LINKSTATION | 5 | config LINKSTATION |
78 | bool "Linkstation / Kurobox(HG) from Buffalo" | 6 | bool "Linkstation / Kurobox(HG) from Buffalo" |
79 | select MPIC | 7 | select MPIC |
@@ -97,212 +25,24 @@ config MPC7448HPC2 | |||
97 | help | 25 | help |
98 | Select MPC7448HPC2 if configuring for Freescale MPC7448HPC2 (Taiga) | 26 | Select MPC7448HPC2 if configuring for Freescale MPC7448HPC2 (Taiga) |
99 | platform | 27 | platform |
100 | |||
101 | config RADSTONE_PPC7D | ||
102 | bool "Radstone Technology PPC7D board" | ||
103 | select PPC_I8259 | ||
104 | |||
105 | config PAL4 | ||
106 | bool "SBS-Palomar4" | ||
107 | |||
108 | config EST8260 | ||
109 | bool "EST8260" | ||
110 | ---help--- | ||
111 | The EST8260 is a single-board computer manufactured by Wind River | ||
112 | Systems, Inc. (formerly Embedded Support Tools Corp.) and based on | ||
113 | the MPC8260. Wind River Systems has a website at | ||
114 | <http://www.windriver.com/>, but the EST8260 cannot be found on it | ||
115 | and has probably been discontinued or rebadged. | ||
116 | |||
117 | config SBC82xx | ||
118 | bool "SBC82xx" | ||
119 | ---help--- | ||
120 | SBC PowerQUICC II, single-board computer with MPC82xx CPU | ||
121 | Manufacturer: Wind River Systems, Inc. | ||
122 | Date of Release: May 2003 | ||
123 | End of Life: - | ||
124 | URL: <http://www.windriver.com/> | ||
125 | |||
126 | config SBS8260 | ||
127 | bool "SBS8260" | ||
128 | |||
129 | config RPX8260 | ||
130 | bool "RPXSUPER" | ||
131 | |||
132 | config TQM8260 | ||
133 | bool "TQM8260" | ||
134 | ---help--- | ||
135 | MPC8260 based module, little larger than credit card, | ||
136 | up to 128 MB global + 64 MB local RAM, 32 MB Flash, | ||
137 | 32 kB EEPROM, 256 kB L@ Cache, 10baseT + 100baseT Ethernet, | ||
138 | 2 x serial ports, ... | ||
139 | Manufacturer: TQ Components, www.tq-group.de | ||
140 | Date of Release: June 2001 | ||
141 | End of Life: not yet :-) | ||
142 | URL: <http://www.denx.de/PDF/TQM82xx_SPEC_Rev005.pdf> | ||
143 | |||
144 | config ADS8272 | ||
145 | bool "ADS8272" | ||
146 | |||
147 | config PQ2FADS | ||
148 | bool "Freescale-PQ2FADS" | ||
149 | help | ||
150 | Select PQ2FADS if you wish to configure for a Freescale | ||
151 | PQ2FADS board (-VR or -ZU). | ||
152 | |||
153 | config EV64360 | ||
154 | bool "Marvell-EV64360BP" | ||
155 | help | ||
156 | Select EV64360 if configuring a Marvell EV64360BP Evaluation | ||
157 | platform. | ||
158 | endchoice | 28 | endchoice |
159 | 29 | ||
160 | config PQ2ADS | ||
161 | bool | ||
162 | depends on ADS8272 | ||
163 | default y | ||
164 | |||
165 | config TQM8xxL | ||
166 | bool | ||
167 | depends on 8xx && (TQM823L || TQM850L || FPS850L || TQM855L || TQM860L) | ||
168 | default y | ||
169 | |||
170 | config 8260 | ||
171 | bool "CPM2 Support" if WILLOW | ||
172 | depends on 6xx | ||
173 | default y if TQM8260 || RPX8260 || EST8260 || SBS8260 || SBC82xx || PQ2FADS | ||
174 | help | ||
175 | The MPC8260 is a typical embedded CPU made by Motorola. Selecting | ||
176 | this option means that you wish to build a kernel for a machine with | ||
177 | an 8260 class CPU. | ||
178 | |||
179 | config 8272 | ||
180 | bool | ||
181 | depends on 6xx | ||
182 | default y if ADS8272 | ||
183 | select 8260 | ||
184 | help | ||
185 | The MPC8272 CPM has a different internal dpram setup than other CPM2 | ||
186 | devices | ||
187 | |||
188 | config CPM2 | ||
189 | bool | ||
190 | depends on 8260 || MPC8560 || MPC8555 | ||
191 | default y | ||
192 | help | ||
193 | The CPM2 (Communications Processor Module) is a coprocessor on | ||
194 | embedded CPUs made by Motorola. Selecting this option means that | ||
195 | you wish to build a kernel for a machine with a CPM2 coprocessor | ||
196 | on it (826x, 827x, 8560). | ||
197 | |||
198 | config PPC_GEN550 | ||
199 | bool | ||
200 | depends on SANDPOINT || SPRUCE || PPLUS || \ | ||
201 | PRPMC750 || PRPMC800 || LOPEC || \ | ||
202 | (EV64260 && !SERIAL_MPSC) || CHESTNUT || RADSTONE_PPC7D || \ | ||
203 | 83xx || LINKSTATION | ||
204 | default y | ||
205 | |||
206 | config FORCE | ||
207 | bool | ||
208 | depends on 6xx && POWERPMC250 | ||
209 | default y | ||
210 | |||
211 | config GT64260 | ||
212 | bool | ||
213 | depends on EV64260 || CPCI690 | ||
214 | default y | ||
215 | |||
216 | config MV64360 # Really MV64360 & MV64460 | ||
217 | bool | ||
218 | depends on CHESTNUT || KATANA || RADSTONE_PPC7D || HDPU || EV64360 | ||
219 | default y | ||
220 | |||
221 | config MV64X60 | ||
222 | bool | ||
223 | depends on (GT64260 || MV64360) | ||
224 | select PPC_INDIRECT_PCI | ||
225 | default y | ||
226 | |||
227 | config TSI108_BRIDGE | 30 | config TSI108_BRIDGE |
228 | bool | 31 | bool |
229 | depends on MPC7448HPC2 | 32 | depends on MPC7448HPC2 |
230 | default y | 33 | default y |
231 | 34 | ||
232 | menu "Set bridge options" | ||
233 | depends on MV64X60 | ||
234 | |||
235 | config NOT_COHERENT_CACHE | ||
236 | bool "Turn off Cache Coherency" | ||
237 | default n | ||
238 | help | ||
239 | Some 64x60 bridges lock up when trying to enforce cache coherency. | ||
240 | When this option is selected, cache coherency will be turned off. | ||
241 | Note that this can cause other problems (e.g., stale data being | ||
242 | speculatively loaded via a cached mapping). Use at your own risk. | ||
243 | |||
244 | config MV64X60_BASE | ||
245 | hex "Set bridge base used by firmware" | ||
246 | default "0xf1000000" | ||
247 | help | ||
248 | A firmware can leave the base address of the bridge's registers at | ||
249 | a non-standard location. If so, set this value to reflect the | ||
250 | address of that non-standard location. | ||
251 | |||
252 | config MV64X60_NEW_BASE | ||
253 | hex "Set bridge base used by kernel" | ||
254 | default "0xf1000000" | ||
255 | help | ||
256 | If the current base address of the bridge's registers is not where | ||
257 | you want it, set this value to the address that you want it moved to. | ||
258 | |||
259 | endmenu | ||
260 | |||
261 | config NONMONARCH_SUPPORT | ||
262 | bool "Enable Non-Monarch Support" | ||
263 | depends on PRPMC800 | ||
264 | |||
265 | config HARRIER | ||
266 | bool | ||
267 | depends on PRPMC800 | ||
268 | default y | ||
269 | |||
270 | config EPIC_SERIAL_MODE | ||
271 | bool | ||
272 | depends on 6xx && (LOPEC || SANDPOINT) | ||
273 | default y | ||
274 | |||
275 | config MPC10X_BRIDGE | 35 | config MPC10X_BRIDGE |
276 | bool | 36 | bool |
277 | depends on POWERPMC250 || LOPEC || SANDPOINT || LINKSTATION | 37 | depends on LINKSTATION |
278 | select PPC_INDIRECT_PCI | 38 | select PPC_INDIRECT_PCI |
279 | default y | 39 | default y |
280 | 40 | ||
281 | config MPC10X_OPENPIC | 41 | config MPC10X_OPENPIC |
282 | bool | 42 | bool |
283 | depends on POWERPMC250 || LOPEC || SANDPOINT || LINKSTATION | 43 | depends on LINKSTATION |
284 | default y | 44 | default y |
285 | 45 | ||
286 | config MPC10X_STORE_GATHERING | 46 | config MPC10X_STORE_GATHERING |
287 | bool "Enable MPC10x store gathering" | 47 | bool "Enable MPC10x store gathering" |
288 | depends on MPC10X_BRIDGE | 48 | depends on MPC10X_BRIDGE |
289 | |||
290 | config SANDPOINT_ENABLE_UART1 | ||
291 | bool "Enable DUART mode on Sandpoint" | ||
292 | depends on SANDPOINT | ||
293 | help | ||
294 | If this option is enabled then the MPC824x processor will run | ||
295 | in DUART mode instead of UART mode. | ||
296 | |||
297 | config HARRIER_STORE_GATHERING | ||
298 | bool "Enable Harrier store gathering" | ||
299 | depends on HARRIER | ||
300 | |||
301 | config MVME5100_IPMC761_PRESENT | ||
302 | bool "MVME5100 configured with an IPMC761" | ||
303 | depends on MVME5100 | ||
304 | select PPC_I8259 | ||
305 | |||
306 | config SPRUCE_BAUD_33M | ||
307 | bool "Spruce baud clock support" | ||
308 | depends on SPRUCE | ||
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c index 3fcc85f60fbf..992257488d29 100644 --- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c +++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | |||
@@ -91,16 +91,6 @@ static void __init mpc7448_hpc2_setup_arch(void) | |||
91 | } | 91 | } |
92 | tsi108_csr_vir_base = get_vir_csrbase(); | 92 | tsi108_csr_vir_base = get_vir_csrbase(); |
93 | 93 | ||
94 | #ifdef CONFIG_ROOT_NFS | ||
95 | ROOT_DEV = Root_NFS; | ||
96 | #else | ||
97 | ROOT_DEV = Root_HDA1; | ||
98 | #endif | ||
99 | |||
100 | #ifdef CONFIG_BLK_DEV_INITRD | ||
101 | ROOT_DEV = Root_RAM0; | ||
102 | #endif | ||
103 | |||
104 | /* setup PCI host bridge */ | 94 | /* setup PCI host bridge */ |
105 | #ifdef CONFIG_PCI | 95 | #ifdef CONFIG_PCI |
106 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 96 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) |
diff --git a/arch/powerpc/platforms/iseries/Kconfig b/arch/powerpc/platforms/iseries/Kconfig index 54e6b3b6f261..46c3a8e7c3a8 100644 --- a/arch/powerpc/platforms/iseries/Kconfig +++ b/arch/powerpc/platforms/iseries/Kconfig | |||
@@ -1,3 +1,7 @@ | |||
1 | config PPC_ISERIES | ||
2 | bool "IBM Legacy iSeries" | ||
3 | depends on PPC_MULTIPLATFORM && PPC64 | ||
4 | select PPC_INDIRECT_IO | ||
1 | 5 | ||
2 | menu "iSeries device drivers" | 6 | menu "iSeries device drivers" |
3 | depends on PPC_ISERIES | 7 | depends on PPC_ISERIES |
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index d7a756d5135c..7df2902271d0 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c | |||
@@ -194,5 +194,5 @@ void iommu_init_early_iSeries(void) | |||
194 | ppc_md.tce_build = tce_build_iSeries; | 194 | ppc_md.tce_build = tce_build_iSeries; |
195 | ppc_md.tce_free = tce_free_iSeries; | 195 | ppc_md.tce_free = tce_free_iSeries; |
196 | 196 | ||
197 | pci_dma_ops = &dma_iommu_ops; | 197 | set_pci_dma_ops(&dma_iommu_ops); |
198 | } | 198 | } |
diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c index 5225abfafd9b..9f9972bc69eb 100644 --- a/arch/powerpc/platforms/iseries/irq.c +++ b/arch/powerpc/platforms/iseries/irq.c | |||
@@ -337,6 +337,8 @@ unsigned int iSeries_get_irq(void) | |||
337 | return irq; | 337 | return irq; |
338 | } | 338 | } |
339 | 339 | ||
340 | #ifdef CONFIG_PCI | ||
341 | |||
340 | static int iseries_irq_host_map(struct irq_host *h, unsigned int virq, | 342 | static int iseries_irq_host_map(struct irq_host *h, unsigned int virq, |
341 | irq_hw_number_t hw) | 343 | irq_hw_number_t hw) |
342 | { | 344 | { |
@@ -384,3 +386,4 @@ void __init iSeries_init_IRQ(void) | |||
384 | "failed with rc 0x%x\n", ret); | 386 | "failed with rc 0x%x\n", ret); |
385 | } | 387 | } |
386 | 388 | ||
389 | #endif /* CONFIG_PCI */ | ||
diff --git a/arch/powerpc/platforms/maple/Kconfig b/arch/powerpc/platforms/maple/Kconfig new file mode 100644 index 000000000000..5f364b8e5c0f --- /dev/null +++ b/arch/powerpc/platforms/maple/Kconfig | |||
@@ -0,0 +1,17 @@ | |||
1 | config PPC_MAPLE | ||
2 | depends on PPC_MULTIPLATFORM && PPC64 | ||
3 | bool "Maple 970FX Evaluation Board" | ||
4 | select MPIC | ||
5 | select U3_DART | ||
6 | select MPIC_BROKEN_U3 | ||
7 | select GENERIC_TBSYNC | ||
8 | select PPC_UDBG_16550 | ||
9 | select PPC_970_NAP | ||
10 | select PPC_NATIVE | ||
11 | select PPC_RTAS | ||
12 | select MMIO_NVRAM | ||
13 | select ATA_NONSTANDARD if ATA | ||
14 | default n | ||
15 | help | ||
16 | This option enables support for the Maple 970FX Evaluation Board. | ||
17 | For more information, refer to <http://www.970eval.com> | ||
diff --git a/arch/powerpc/platforms/pasemi/Kconfig b/arch/powerpc/platforms/pasemi/Kconfig index 68dc529dfd2f..64e55250ef46 100644 --- a/arch/powerpc/platforms/pasemi/Kconfig +++ b/arch/powerpc/platforms/pasemi/Kconfig | |||
@@ -1,3 +1,15 @@ | |||
1 | config PPC_PASEMI | ||
2 | depends on PPC_MULTIPLATFORM && PPC64 | ||
3 | bool "PA Semi SoC-based platforms" | ||
4 | default n | ||
5 | select MPIC | ||
6 | select PPC_UDBG_16550 | ||
7 | select GENERIC_TBSYNC | ||
8 | select PPC_NATIVE | ||
9 | help | ||
10 | This option enables support for PA Semi's PWRficient line | ||
11 | of SoC processors, including PA6T-1682M | ||
12 | |||
1 | menu "PA Semi PWRficient options" | 13 | menu "PA Semi PWRficient options" |
2 | depends on PPC_PASEMI | 14 | depends on PPC_PASEMI |
3 | 15 | ||
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c index 71dbf1a56e13..07819cd3ac44 100644 --- a/arch/powerpc/platforms/pasemi/iommu.c +++ b/arch/powerpc/platforms/pasemi/iommu.c | |||
@@ -255,7 +255,7 @@ void iommu_init_early_pasemi(void) | |||
255 | /* Direct I/O, IOMMU off */ | 255 | /* Direct I/O, IOMMU off */ |
256 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_null; | 256 | ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_null; |
257 | ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_null; | 257 | ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_null; |
258 | pci_dma_ops = &dma_direct_ops; | 258 | set_pci_dma_ops(&dma_direct_ops); |
259 | 259 | ||
260 | return; | 260 | return; |
261 | } | 261 | } |
@@ -266,7 +266,7 @@ void iommu_init_early_pasemi(void) | |||
266 | ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_pasemi; | 266 | ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_pasemi; |
267 | ppc_md.tce_build = iobmap_build; | 267 | ppc_md.tce_build = iobmap_build; |
268 | ppc_md.tce_free = iobmap_free; | 268 | ppc_md.tce_free = iobmap_free; |
269 | pci_dma_ops = &dma_iommu_ops; | 269 | set_pci_dma_ops(&dma_iommu_ops); |
270 | } | 270 | } |
271 | 271 | ||
272 | void __init alloc_iobmap_l2(void) | 272 | void __init alloc_iobmap_l2(void) |
diff --git a/arch/powerpc/platforms/powermac/Kconfig b/arch/powerpc/platforms/powermac/Kconfig new file mode 100644 index 000000000000..02d9c7dba876 --- /dev/null +++ b/arch/powerpc/platforms/powermac/Kconfig | |||
@@ -0,0 +1,20 @@ | |||
1 | config PPC_PMAC | ||
2 | bool "Apple PowerMac based machines" | ||
3 | depends on PPC_MULTIPLATFORM | ||
4 | select MPIC | ||
5 | select PPC_INDIRECT_PCI if PPC32 | ||
6 | select PPC_MPC106 if PPC32 | ||
7 | select PPC_NATIVE | ||
8 | default y | ||
9 | |||
10 | config PPC_PMAC64 | ||
11 | bool | ||
12 | depends on PPC_PMAC && POWER4 | ||
13 | select MPIC | ||
14 | select U3_DART | ||
15 | select MPIC_BROKEN_U3 | ||
16 | select GENERIC_TBSYNC | ||
17 | select PPC_970_NAP | ||
18 | default y | ||
19 | |||
20 | |||
diff --git a/arch/powerpc/platforms/powermac/time.c b/arch/powerpc/platforms/powermac/time.c index a4173906e945..bf9da56942e8 100644 --- a/arch/powerpc/platforms/powermac/time.c +++ b/arch/powerpc/platforms/powermac/time.c | |||
@@ -297,49 +297,11 @@ int __init via_calibrate_decr(void) | |||
297 | } | 297 | } |
298 | #endif | 298 | #endif |
299 | 299 | ||
300 | #ifdef CONFIG_PM | ||
301 | /* | ||
302 | * Reset the time after a sleep. | ||
303 | */ | ||
304 | static int | ||
305 | time_sleep_notify(struct pmu_sleep_notifier *self, int when) | ||
306 | { | ||
307 | static unsigned long time_diff; | ||
308 | unsigned long flags; | ||
309 | unsigned long seq; | ||
310 | struct timespec tv; | ||
311 | |||
312 | switch (when) { | ||
313 | case PBOOK_SLEEP_NOW: | ||
314 | do { | ||
315 | seq = read_seqbegin_irqsave(&xtime_lock, flags); | ||
316 | time_diff = xtime.tv_sec - pmac_get_boot_time(); | ||
317 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); | ||
318 | break; | ||
319 | case PBOOK_WAKE: | ||
320 | tv.tv_sec = pmac_get_boot_time() + time_diff; | ||
321 | tv.tv_nsec = 0; | ||
322 | do_settimeofday(&tv); | ||
323 | break; | ||
324 | } | ||
325 | return PBOOK_SLEEP_OK; | ||
326 | } | ||
327 | |||
328 | static struct pmu_sleep_notifier time_sleep_notifier = { | ||
329 | time_sleep_notify, SLEEP_LEVEL_MISC, | ||
330 | }; | ||
331 | #endif /* CONFIG_PM */ | ||
332 | |||
333 | /* | 300 | /* |
334 | * Query the OF and get the decr frequency. | 301 | * Query the OF and get the decr frequency. |
335 | */ | 302 | */ |
336 | void __init pmac_calibrate_decr(void) | 303 | void __init pmac_calibrate_decr(void) |
337 | { | 304 | { |
338 | #if defined(CONFIG_PM) && defined(CONFIG_ADB_PMU) | ||
339 | /* XXX why here? */ | ||
340 | pmu_register_sleep_notifier(&time_sleep_notifier); | ||
341 | #endif | ||
342 | |||
343 | generic_calibrate_decr(); | 305 | generic_calibrate_decr(); |
344 | 306 | ||
345 | #ifdef CONFIG_PPC32 | 307 | #ifdef CONFIG_PPC32 |
diff --git a/arch/powerpc/platforms/prep/Kconfig b/arch/powerpc/platforms/prep/Kconfig index 673ac47a1626..29d411279b0c 100644 --- a/arch/powerpc/platforms/prep/Kconfig +++ b/arch/powerpc/platforms/prep/Kconfig | |||
@@ -1,3 +1,12 @@ | |||
1 | config PPC_PREP | ||
2 | bool "PowerPC Reference Platform (PReP) based machines" | ||
3 | depends on PPC_MULTIPLATFORM && PPC32 && BROKEN | ||
4 | select MPIC | ||
5 | select PPC_I8259 | ||
6 | select PPC_INDIRECT_PCI | ||
7 | select PPC_UDBG_16550 | ||
8 | select PPC_NATIVE | ||
9 | default n | ||
1 | 10 | ||
2 | config PREP_RESIDUAL | 11 | config PREP_RESIDUAL |
3 | bool "Support for PReP Residual Data" | 12 | bool "Support for PReP Residual Data" |
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig index 1a481a60a883..40f0008af4d1 100644 --- a/arch/powerpc/platforms/ps3/Kconfig +++ b/arch/powerpc/platforms/ps3/Kconfig | |||
@@ -1,3 +1,19 @@ | |||
1 | config PPC_PS3 | ||
2 | bool "Sony PS3 (incomplete)" | ||
3 | depends on PPC_MULTIPLATFORM && PPC64 | ||
4 | select PPC_CELL | ||
5 | select USB_ARCH_HAS_OHCI | ||
6 | select USB_OHCI_LITTLE_ENDIAN | ||
7 | select USB_OHCI_BIG_ENDIAN_MMIO | ||
8 | select USB_ARCH_HAS_EHCI | ||
9 | select USB_EHCI_BIG_ENDIAN_MMIO | ||
10 | help | ||
11 | This option enables support for the Sony PS3 game console | ||
12 | and other platforms using the PS3 hypervisor. | ||
13 | Support for this platform is not yet complete, so | ||
14 | enabling this will not result in a bootable kernel on a | ||
15 | PS3 system. | ||
16 | |||
1 | menu "PS3 Platform Options" | 17 | menu "PS3 Platform Options" |
2 | depends on PPC_PS3 | 18 | depends on PPC_PS3 |
3 | 19 | ||
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig index a57032cf6f1b..16e4e401b820 100644 --- a/arch/powerpc/platforms/pseries/Kconfig +++ b/arch/powerpc/platforms/pseries/Kconfig | |||
@@ -1,3 +1,13 @@ | |||
1 | config PPC_PSERIES | ||
2 | depends on PPC_MULTIPLATFORM && PPC64 | ||
3 | bool "IBM pSeries & new (POWER5-based) iSeries" | ||
4 | select MPIC | ||
5 | select PPC_I8259 | ||
6 | select PPC_RTAS | ||
7 | select RTAS_ERROR_LOGGING | ||
8 | select PPC_UDBG_16550 | ||
9 | select PPC_NATIVE | ||
10 | default y | ||
1 | 11 | ||
2 | config PPC_SPLPAR | 12 | config PPC_SPLPAR |
3 | depends on PPC_PSERIES | 13 | depends on PPC_PSERIES |
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile index 2dfd05095a25..90235d598751 100644 --- a/arch/powerpc/platforms/pseries/Makefile +++ b/arch/powerpc/platforms/pseries/Makefile | |||
@@ -2,14 +2,15 @@ ifeq ($(CONFIG_PPC64),y) | |||
2 | EXTRA_CFLAGS += -mno-minimal-toc | 2 | EXTRA_CFLAGS += -mno-minimal-toc |
3 | endif | 3 | endif |
4 | 4 | ||
5 | obj-y := pci.o lpar.o hvCall.o nvram.o reconfig.o \ | 5 | obj-y := lpar.o hvCall.o nvram.o reconfig.o \ |
6 | setup.o iommu.o ras.o rtasd.o pci_dlpar.o \ | 6 | setup.o iommu.o ras.o rtasd.o \ |
7 | firmware.o power.o | 7 | firmware.o power.o |
8 | obj-$(CONFIG_SMP) += smp.o | 8 | obj-$(CONFIG_SMP) += smp.o |
9 | obj-$(CONFIG_XICS) += xics.o | 9 | obj-$(CONFIG_XICS) += xics.o |
10 | obj-$(CONFIG_SCANLOG) += scanlog.o | 10 | obj-$(CONFIG_SCANLOG) += scanlog.o |
11 | obj-$(CONFIG_EEH) += eeh.o eeh_cache.o eeh_driver.o eeh_event.o | 11 | obj-$(CONFIG_EEH) += eeh.o eeh_cache.o eeh_driver.o eeh_event.o |
12 | obj-$(CONFIG_KEXEC) += kexec.o | 12 | obj-$(CONFIG_KEXEC) += kexec.o |
13 | obj-$(CONFIG_PCI) += pci.o pci_dlpar.o | ||
13 | 14 | ||
14 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o | 15 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o |
15 | 16 | ||
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 6cedbc002e0f..a56be71d1ede 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
@@ -74,7 +74,10 @@ | |||
74 | * is broken and panic. This sets the threshold for how many read | 74 | * is broken and panic. This sets the threshold for how many read |
75 | * attempts we allow before panicking. | 75 | * attempts we allow before panicking. |
76 | */ | 76 | */ |
77 | #define EEH_MAX_FAILS 100000 | 77 | #define EEH_MAX_FAILS 2100000 |
78 | |||
79 | /* Time to wait for a PCI slot to retport status, in milliseconds */ | ||
80 | #define PCI_BUS_RESET_WAIT_MSEC (60*1000) | ||
78 | 81 | ||
79 | /* RTAS tokens */ | 82 | /* RTAS tokens */ |
80 | static int ibm_set_eeh_option; | 83 | static int ibm_set_eeh_option; |
@@ -83,6 +86,7 @@ static int ibm_read_slot_reset_state; | |||
83 | static int ibm_read_slot_reset_state2; | 86 | static int ibm_read_slot_reset_state2; |
84 | static int ibm_slot_error_detail; | 87 | static int ibm_slot_error_detail; |
85 | static int ibm_get_config_addr_info; | 88 | static int ibm_get_config_addr_info; |
89 | static int ibm_get_config_addr_info2; | ||
86 | static int ibm_configure_bridge; | 90 | static int ibm_configure_bridge; |
87 | 91 | ||
88 | int eeh_subsystem_enabled; | 92 | int eeh_subsystem_enabled; |
@@ -168,6 +172,55 @@ static int read_slot_reset_state(struct pci_dn *pdn, int rets[]) | |||
168 | } | 172 | } |
169 | 173 | ||
170 | /** | 174 | /** |
175 | * eeh_wait_for_slot_status - returns error status of slot | ||
176 | * @pdn pci device node | ||
177 | * @max_wait_msecs maximum number to millisecs to wait | ||
178 | * | ||
179 | * Return negative value if a permanent error, else return | ||
180 | * Partition Endpoint (PE) status value. | ||
181 | * | ||
182 | * If @max_wait_msecs is positive, then this routine will | ||
183 | * sleep until a valid status can be obtained, or until | ||
184 | * the max allowed wait time is exceeded, in which case | ||
185 | * a -2 is returned. | ||
186 | */ | ||
187 | int | ||
188 | eeh_wait_for_slot_status(struct pci_dn *pdn, int max_wait_msecs) | ||
189 | { | ||
190 | int rc; | ||
191 | int rets[3]; | ||
192 | int mwait; | ||
193 | |||
194 | while (1) { | ||
195 | rc = read_slot_reset_state(pdn, rets); | ||
196 | if (rc) return rc; | ||
197 | if (rets[1] == 0) return -1; /* EEH is not supported */ | ||
198 | |||
199 | if (rets[0] != 5) return rets[0]; /* return actual status */ | ||
200 | |||
201 | if (rets[2] == 0) return -1; /* permanently unavailable */ | ||
202 | |||
203 | if (max_wait_msecs <= 0) return -1; | ||
204 | |||
205 | mwait = rets[2]; | ||
206 | if (mwait <= 0) { | ||
207 | printk (KERN_WARNING | ||
208 | "EEH: Firmware returned bad wait value=%d\n", mwait); | ||
209 | mwait = 1000; | ||
210 | } else if (mwait > 300*1000) { | ||
211 | printk (KERN_WARNING | ||
212 | "EEH: Firmware is taking too long, time=%d\n", mwait); | ||
213 | mwait = 300*1000; | ||
214 | } | ||
215 | max_wait_msecs -= mwait; | ||
216 | msleep (mwait); | ||
217 | } | ||
218 | |||
219 | printk(KERN_WARNING "EEH: Timed out waiting for slot status\n"); | ||
220 | return -2; | ||
221 | } | ||
222 | |||
223 | /** | ||
171 | * eeh_token_to_phys - convert EEH address token to phys address | 224 | * eeh_token_to_phys - convert EEH address token to phys address |
172 | * @token i/o token, should be address in the form 0xA.... | 225 | * @token i/o token, should be address in the form 0xA.... |
173 | */ | 226 | */ |
@@ -229,7 +282,7 @@ void eeh_mark_slot (struct device_node *dn, int mode_flag) | |||
229 | dn = find_device_pe (dn); | 282 | dn = find_device_pe (dn); |
230 | 283 | ||
231 | /* Back up one, since config addrs might be shared */ | 284 | /* Back up one, since config addrs might be shared */ |
232 | if (PCI_DN(dn) && PCI_DN(dn)->eeh_pe_config_addr) | 285 | if (!pcibios_find_pci_bus(dn) && PCI_DN(dn->parent)) |
233 | dn = dn->parent; | 286 | dn = dn->parent; |
234 | 287 | ||
235 | PCI_DN(dn)->eeh_mode |= mode_flag; | 288 | PCI_DN(dn)->eeh_mode |= mode_flag; |
@@ -263,7 +316,7 @@ void eeh_clear_slot (struct device_node *dn, int mode_flag) | |||
263 | dn = find_device_pe (dn); | 316 | dn = find_device_pe (dn); |
264 | 317 | ||
265 | /* Back up one, since config addrs might be shared */ | 318 | /* Back up one, since config addrs might be shared */ |
266 | if (PCI_DN(dn) && PCI_DN(dn)->eeh_pe_config_addr) | 319 | if (!pcibios_find_pci_bus(dn) && PCI_DN(dn->parent)) |
267 | dn = dn->parent; | 320 | dn = dn->parent; |
268 | 321 | ||
269 | PCI_DN(dn)->eeh_mode &= ~mode_flag; | 322 | PCI_DN(dn)->eeh_mode &= ~mode_flag; |
@@ -293,7 +346,6 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) | |||
293 | int rets[3]; | 346 | int rets[3]; |
294 | unsigned long flags; | 347 | unsigned long flags; |
295 | struct pci_dn *pdn; | 348 | struct pci_dn *pdn; |
296 | enum pci_channel_state state; | ||
297 | int rc = 0; | 349 | int rc = 0; |
298 | 350 | ||
299 | total_mmio_ffs++; | 351 | total_mmio_ffs++; |
@@ -367,25 +419,25 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) | |||
367 | goto dn_unlock; | 419 | goto dn_unlock; |
368 | } | 420 | } |
369 | 421 | ||
370 | /* If EEH is not supported on this device, punt. */ | 422 | /* Note that config-io to empty slots may fail; |
371 | if (rets[1] != 1) { | 423 | * they are empty when they don't have children. */ |
372 | printk(KERN_WARNING "EEH: event on unsupported device, rc=%d dn=%s\n", | 424 | if ((rets[0] == 5) && (dn->child == NULL)) { |
373 | ret, dn->full_name); | ||
374 | false_positives++; | 425 | false_positives++; |
375 | rc = 0; | 426 | rc = 0; |
376 | goto dn_unlock; | 427 | goto dn_unlock; |
377 | } | 428 | } |
378 | 429 | ||
379 | /* If not the kind of error we know about, punt. */ | 430 | /* If EEH is not supported on this device, punt. */ |
380 | if (rets[0] != 2 && rets[0] != 4 && rets[0] != 5) { | 431 | if (rets[1] != 1) { |
432 | printk(KERN_WARNING "EEH: event on unsupported device, rc=%d dn=%s\n", | ||
433 | ret, dn->full_name); | ||
381 | false_positives++; | 434 | false_positives++; |
382 | rc = 0; | 435 | rc = 0; |
383 | goto dn_unlock; | 436 | goto dn_unlock; |
384 | } | 437 | } |
385 | 438 | ||
386 | /* Note that config-io to empty slots may fail; | 439 | /* If not the kind of error we know about, punt. */ |
387 | * we recognize empty because they don't have children. */ | 440 | if (rets[0] != 1 && rets[0] != 2 && rets[0] != 4 && rets[0] != 5) { |
388 | if ((rets[0] == 5) && (dn->child == NULL)) { | ||
389 | false_positives++; | 441 | false_positives++; |
390 | rc = 0; | 442 | rc = 0; |
391 | goto dn_unlock; | 443 | goto dn_unlock; |
@@ -399,17 +451,12 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) | |||
399 | eeh_mark_slot (dn, EEH_MODE_ISOLATED); | 451 | eeh_mark_slot (dn, EEH_MODE_ISOLATED); |
400 | spin_unlock_irqrestore(&confirm_error_lock, flags); | 452 | spin_unlock_irqrestore(&confirm_error_lock, flags); |
401 | 453 | ||
402 | state = pci_channel_io_normal; | 454 | eeh_send_failure_event (dn, dev); |
403 | if ((rets[0] == 2) || (rets[0] == 4)) | ||
404 | state = pci_channel_io_frozen; | ||
405 | if (rets[0] == 5) | ||
406 | state = pci_channel_io_perm_failure; | ||
407 | eeh_send_failure_event (dn, dev, state, rets[2]); | ||
408 | 455 | ||
409 | /* Most EEH events are due to device driver bugs. Having | 456 | /* Most EEH events are due to device driver bugs. Having |
410 | * a stack trace will help the device-driver authors figure | 457 | * a stack trace will help the device-driver authors figure |
411 | * out what happened. So print that out. */ | 458 | * out what happened. So print that out. */ |
412 | if (rets[0] != 5) dump_stack(); | 459 | dump_stack(); |
413 | return 1; | 460 | return 1; |
414 | 461 | ||
415 | dn_unlock: | 462 | dn_unlock: |
@@ -458,38 +505,6 @@ EXPORT_SYMBOL(eeh_check_failure); | |||
458 | /* The code below deals with error recovery */ | 505 | /* The code below deals with error recovery */ |
459 | 506 | ||
460 | /** | 507 | /** |
461 | * eeh_slot_availability - returns error status of slot | ||
462 | * @pdn pci device node | ||
463 | * | ||
464 | * Return negative value if a permanent error, else return | ||
465 | * a number of milliseconds to wait until the PCI slot is | ||
466 | * ready to be used. | ||
467 | */ | ||
468 | static int | ||
469 | eeh_slot_availability(struct pci_dn *pdn) | ||
470 | { | ||
471 | int rc; | ||
472 | int rets[3]; | ||
473 | |||
474 | rc = read_slot_reset_state(pdn, rets); | ||
475 | |||
476 | if (rc) return rc; | ||
477 | |||
478 | if (rets[1] == 0) return -1; /* EEH is not supported */ | ||
479 | if (rets[0] == 0) return 0; /* Oll Korrect */ | ||
480 | if (rets[0] == 5) { | ||
481 | if (rets[2] == 0) return -1; /* permanently unavailable */ | ||
482 | return rets[2]; /* number of millisecs to wait */ | ||
483 | } | ||
484 | if (rets[0] == 1) | ||
485 | return 250; | ||
486 | |||
487 | printk (KERN_ERR "EEH: Slot unavailable: rc=%d, rets=%d %d %d\n", | ||
488 | rc, rets[0], rets[1], rets[2]); | ||
489 | return -2; | ||
490 | } | ||
491 | |||
492 | /** | ||
493 | * rtas_pci_enable - enable MMIO or DMA transfers for this slot | 508 | * rtas_pci_enable - enable MMIO or DMA transfers for this slot |
494 | * @pdn pci device node | 509 | * @pdn pci device node |
495 | */ | 510 | */ |
@@ -512,9 +527,13 @@ rtas_pci_enable(struct pci_dn *pdn, int function) | |||
512 | function); | 527 | function); |
513 | 528 | ||
514 | if (rc) | 529 | if (rc) |
515 | printk(KERN_WARNING "EEH: Cannot enable function %d, err=%d dn=%s\n", | 530 | printk(KERN_WARNING "EEH: Unexpected state change %d, err=%d dn=%s\n", |
516 | function, rc, pdn->node->full_name); | 531 | function, rc, pdn->node->full_name); |
517 | 532 | ||
533 | rc = eeh_wait_for_slot_status (pdn, PCI_BUS_RESET_WAIT_MSEC); | ||
534 | if ((rc == 4) && (function == EEH_THAW_MMIO)) | ||
535 | return 0; | ||
536 | |||
518 | return rc; | 537 | return rc; |
519 | } | 538 | } |
520 | 539 | ||
@@ -595,36 +614,24 @@ int rtas_set_slot_reset(struct pci_dn *pdn) | |||
595 | { | 614 | { |
596 | int i, rc; | 615 | int i, rc; |
597 | 616 | ||
598 | __rtas_set_slot_reset(pdn); | 617 | /* Take three shots at resetting the bus */ |
618 | for (i=0; i<3; i++) { | ||
619 | __rtas_set_slot_reset(pdn); | ||
599 | 620 | ||
600 | /* Now double check with the firmware to make sure the device is | 621 | rc = eeh_wait_for_slot_status(pdn, PCI_BUS_RESET_WAIT_MSEC); |
601 | * ready to be used; if not, wait for recovery. */ | ||
602 | for (i=0; i<10; i++) { | ||
603 | rc = eeh_slot_availability (pdn); | ||
604 | if (rc == 0) | 622 | if (rc == 0) |
605 | return 0; | 623 | return 0; |
606 | 624 | ||
607 | if (rc == -2) { | ||
608 | printk (KERN_ERR "EEH: failed (%d) to reset slot %s\n", | ||
609 | i, pdn->node->full_name); | ||
610 | __rtas_set_slot_reset(pdn); | ||
611 | continue; | ||
612 | } | ||
613 | |||
614 | if (rc < 0) { | 625 | if (rc < 0) { |
615 | printk (KERN_ERR "EEH: unrecoverable slot failure %s\n", | 626 | printk (KERN_ERR "EEH: unrecoverable slot failure %s\n", |
616 | pdn->node->full_name); | 627 | pdn->node->full_name); |
617 | return -1; | 628 | return -1; |
618 | } | 629 | } |
619 | 630 | printk (KERN_ERR "EEH: bus reset %d failed on slot %s\n", | |
620 | msleep (rc+100); | 631 | i+1, pdn->node->full_name); |
621 | } | 632 | } |
622 | 633 | ||
623 | rc = eeh_slot_availability (pdn); | 634 | return -1; |
624 | if (rc) | ||
625 | printk (KERN_ERR "EEH: timeout resetting slot %s\n", pdn->node->full_name); | ||
626 | |||
627 | return rc; | ||
628 | } | 635 | } |
629 | 636 | ||
630 | /* ------------------------------------------------------- */ | 637 | /* ------------------------------------------------------- */ |
@@ -744,6 +751,38 @@ struct eeh_early_enable_info { | |||
744 | unsigned int buid_lo; | 751 | unsigned int buid_lo; |
745 | }; | 752 | }; |
746 | 753 | ||
754 | static int get_pe_addr (int config_addr, | ||
755 | struct eeh_early_enable_info *info) | ||
756 | { | ||
757 | unsigned int rets[3]; | ||
758 | int ret; | ||
759 | |||
760 | /* Use latest config-addr token on power6 */ | ||
761 | if (ibm_get_config_addr_info2 != RTAS_UNKNOWN_SERVICE) { | ||
762 | /* Make sure we have a PE in hand */ | ||
763 | ret = rtas_call (ibm_get_config_addr_info2, 4, 2, rets, | ||
764 | config_addr, info->buid_hi, info->buid_lo, 1); | ||
765 | if (ret || (rets[0]==0)) | ||
766 | return 0; | ||
767 | |||
768 | ret = rtas_call (ibm_get_config_addr_info2, 4, 2, rets, | ||
769 | config_addr, info->buid_hi, info->buid_lo, 0); | ||
770 | if (ret) | ||
771 | return 0; | ||
772 | return rets[0]; | ||
773 | } | ||
774 | |||
775 | /* Use older config-addr token on power5 */ | ||
776 | if (ibm_get_config_addr_info != RTAS_UNKNOWN_SERVICE) { | ||
777 | ret = rtas_call (ibm_get_config_addr_info, 4, 2, rets, | ||
778 | config_addr, info->buid_hi, info->buid_lo, 0); | ||
779 | if (ret) | ||
780 | return 0; | ||
781 | return rets[0]; | ||
782 | } | ||
783 | return 0; | ||
784 | } | ||
785 | |||
747 | /* Enable eeh for the given device node. */ | 786 | /* Enable eeh for the given device node. */ |
748 | static void *early_enable_eeh(struct device_node *dn, void *data) | 787 | static void *early_enable_eeh(struct device_node *dn, void *data) |
749 | { | 788 | { |
@@ -810,15 +849,7 @@ static void *early_enable_eeh(struct device_node *dn, void *data) | |||
810 | 849 | ||
811 | /* If the newer, better, ibm,get-config-addr-info is supported, | 850 | /* If the newer, better, ibm,get-config-addr-info is supported, |
812 | * then use that instead. */ | 851 | * then use that instead. */ |
813 | pdn->eeh_pe_config_addr = 0; | 852 | pdn->eeh_pe_config_addr = get_pe_addr(pdn->eeh_config_addr, info); |
814 | if (ibm_get_config_addr_info != RTAS_UNKNOWN_SERVICE) { | ||
815 | ret = rtas_call (ibm_get_config_addr_info, 4, 2, rets, | ||
816 | pdn->eeh_config_addr, | ||
817 | info->buid_hi, info->buid_lo, | ||
818 | 0); | ||
819 | if (ret == 0) | ||
820 | pdn->eeh_pe_config_addr = rets[0]; | ||
821 | } | ||
822 | 853 | ||
823 | /* Some older systems (Power4) allow the | 854 | /* Some older systems (Power4) allow the |
824 | * ibm,set-eeh-option call to succeed even on nodes | 855 | * ibm,set-eeh-option call to succeed even on nodes |
@@ -889,6 +920,7 @@ void __init eeh_init(void) | |||
889 | ibm_read_slot_reset_state = rtas_token("ibm,read-slot-reset-state"); | 920 | ibm_read_slot_reset_state = rtas_token("ibm,read-slot-reset-state"); |
890 | ibm_slot_error_detail = rtas_token("ibm,slot-error-detail"); | 921 | ibm_slot_error_detail = rtas_token("ibm,slot-error-detail"); |
891 | ibm_get_config_addr_info = rtas_token("ibm,get-config-addr-info"); | 922 | ibm_get_config_addr_info = rtas_token("ibm,get-config-addr-info"); |
923 | ibm_get_config_addr_info2 = rtas_token("ibm,get-config-addr-info2"); | ||
892 | ibm_configure_bridge = rtas_token ("ibm,configure-bridge"); | 924 | ibm_configure_bridge = rtas_token ("ibm,configure-bridge"); |
893 | 925 | ||
894 | if (ibm_set_eeh_option == RTAS_UNKNOWN_SERVICE) | 926 | if (ibm_set_eeh_option == RTAS_UNKNOWN_SERVICE) |
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index a4c0bf84ef2e..8cc331eecc9d 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c | |||
@@ -158,7 +158,8 @@ static void eeh_report_reset(struct pci_dev *dev, void *userdata) | |||
158 | return; | 158 | return; |
159 | 159 | ||
160 | rc = driver->err_handler->slot_reset(dev); | 160 | rc = driver->err_handler->slot_reset(dev); |
161 | if (*res == PCI_ERS_RESULT_NONE) *res = rc; | 161 | if ((*res == PCI_ERS_RESULT_NONE) || |
162 | (*res == PCI_ERS_RESULT_RECOVERED)) *res = rc; | ||
162 | if (*res == PCI_ERS_RESULT_DISCONNECT && | 163 | if (*res == PCI_ERS_RESULT_DISCONNECT && |
163 | rc == PCI_ERS_RESULT_NEED_RESET) *res = rc; | 164 | rc == PCI_ERS_RESULT_NEED_RESET) *res = rc; |
164 | } | 165 | } |
@@ -248,6 +249,7 @@ static void eeh_report_failure(struct pci_dev *dev, void *userdata) | |||
248 | 249 | ||
249 | static int eeh_reset_device (struct pci_dn *pe_dn, struct pci_bus *bus) | 250 | static int eeh_reset_device (struct pci_dn *pe_dn, struct pci_bus *bus) |
250 | { | 251 | { |
252 | struct device_node *dn; | ||
251 | int cnt, rc; | 253 | int cnt, rc; |
252 | 254 | ||
253 | /* pcibios will clear the counter; save the value */ | 255 | /* pcibios will clear the counter; save the value */ |
@@ -263,23 +265,20 @@ static int eeh_reset_device (struct pci_dn *pe_dn, struct pci_bus *bus) | |||
263 | if (rc) | 265 | if (rc) |
264 | return rc; | 266 | return rc; |
265 | 267 | ||
266 | /* New-style config addrs might be shared across multiple devices, | 268 | /* Walk over all functions on this device. */ |
267 | * Walk over all functions on this device */ | 269 | dn = pe_dn->node; |
268 | if (pe_dn->eeh_pe_config_addr) { | 270 | if (!pcibios_find_pci_bus(dn) && PCI_DN(dn->parent)) |
269 | struct device_node *pe = pe_dn->node; | 271 | dn = dn->parent->child; |
270 | pe = pe->parent->child; | 272 | |
271 | while (pe) { | 273 | while (dn) { |
272 | struct pci_dn *ppe = PCI_DN(pe); | 274 | struct pci_dn *ppe = PCI_DN(dn); |
273 | if (pe_dn->eeh_pe_config_addr == ppe->eeh_pe_config_addr) { | 275 | /* On Power4, always true because eeh_pe_config_addr=0 */ |
274 | rtas_configure_bridge(ppe); | 276 | if (pe_dn->eeh_pe_config_addr == ppe->eeh_pe_config_addr) { |
275 | eeh_restore_bars(ppe); | 277 | rtas_configure_bridge(ppe); |
276 | } | 278 | eeh_restore_bars(ppe); |
277 | pe = pe->sibling; | ||
278 | } | 279 | } |
279 | } else { | 280 | dn = dn->sibling; |
280 | rtas_configure_bridge(pe_dn); | 281 | } |
281 | eeh_restore_bars(pe_dn); | ||
282 | } | ||
283 | 282 | ||
284 | /* Give the system 5 seconds to finish running the user-space | 283 | /* Give the system 5 seconds to finish running the user-space |
285 | * hotplug shutdown scripts, e.g. ifdown for ethernet. Yes, | 284 | * hotplug shutdown scripts, e.g. ifdown for ethernet. Yes, |
@@ -299,7 +298,7 @@ static int eeh_reset_device (struct pci_dn *pe_dn, struct pci_bus *bus) | |||
299 | /* The longest amount of time to wait for a pci device | 298 | /* The longest amount of time to wait for a pci device |
300 | * to come back on line, in seconds. | 299 | * to come back on line, in seconds. |
301 | */ | 300 | */ |
302 | #define MAX_WAIT_FOR_RECOVERY 15 | 301 | #define MAX_WAIT_FOR_RECOVERY 150 |
303 | 302 | ||
304 | struct pci_dn * handle_eeh_events (struct eeh_event *event) | 303 | struct pci_dn * handle_eeh_events (struct eeh_event *event) |
305 | { | 304 | { |
@@ -341,13 +340,6 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) | |||
341 | return NULL; | 340 | return NULL; |
342 | } | 341 | } |
343 | 342 | ||
344 | #if 0 | ||
345 | /* We may get "permanent failure" messages on empty slots. | ||
346 | * These are false alarms. Empty slots have no child dn. */ | ||
347 | if ((event->state == pci_channel_io_perm_failure) && (frozen_device == NULL)) | ||
348 | return; | ||
349 | #endif | ||
350 | |||
351 | frozen_pdn = PCI_DN(frozen_dn); | 343 | frozen_pdn = PCI_DN(frozen_dn); |
352 | frozen_pdn->eeh_freeze_count++; | 344 | frozen_pdn->eeh_freeze_count++; |
353 | 345 | ||
@@ -362,13 +354,12 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) | |||
362 | if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES) | 354 | if (frozen_pdn->eeh_freeze_count > EEH_MAX_ALLOWED_FREEZES) |
363 | goto excess_failures; | 355 | goto excess_failures; |
364 | 356 | ||
365 | /* If the reset state is a '5' and the time to reset is 0 (infinity) | 357 | /* Get the current PCI slot state. */ |
366 | * or is more then 15 seconds, then mark this as a permanent failure. | 358 | rc = eeh_wait_for_slot_status (frozen_pdn, MAX_WAIT_FOR_RECOVERY*1000); |
367 | */ | 359 | if (rc < 0) { |
368 | if ((event->state == pci_channel_io_perm_failure) && | 360 | printk(KERN_WARNING "EEH: Permanent failure\n"); |
369 | ((event->time_unavail <= 0) || | ||
370 | (event->time_unavail > MAX_WAIT_FOR_RECOVERY*1000))) | ||
371 | goto hard_fail; | 361 | goto hard_fail; |
362 | } | ||
372 | 363 | ||
373 | eeh_slot_error_detail(frozen_pdn, 1 /* Temporary Error */); | 364 | eeh_slot_error_detail(frozen_pdn, 1 /* Temporary Error */); |
374 | printk(KERN_WARNING | 365 | printk(KERN_WARNING |
@@ -390,14 +381,18 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) | |||
390 | */ | 381 | */ |
391 | if (result == PCI_ERS_RESULT_NONE) { | 382 | if (result == PCI_ERS_RESULT_NONE) { |
392 | rc = eeh_reset_device(frozen_pdn, frozen_bus); | 383 | rc = eeh_reset_device(frozen_pdn, frozen_bus); |
393 | if (rc) | 384 | if (rc) { |
385 | printk(KERN_WARNING "EEH: Unable to reset, rc=%d\n", rc); | ||
394 | goto hard_fail; | 386 | goto hard_fail; |
387 | } | ||
395 | } | 388 | } |
396 | 389 | ||
397 | /* If all devices reported they can proceed, then re-enable MMIO */ | 390 | /* If all devices reported they can proceed, then re-enable MMIO */ |
398 | if (result == PCI_ERS_RESULT_CAN_RECOVER) { | 391 | if (result == PCI_ERS_RESULT_CAN_RECOVER) { |
399 | rc = rtas_pci_enable(frozen_pdn, EEH_THAW_MMIO); | 392 | rc = rtas_pci_enable(frozen_pdn, EEH_THAW_MMIO); |
400 | 393 | ||
394 | if (rc < 0) | ||
395 | goto hard_fail; | ||
401 | if (rc) { | 396 | if (rc) { |
402 | result = PCI_ERS_RESULT_NEED_RESET; | 397 | result = PCI_ERS_RESULT_NEED_RESET; |
403 | } else { | 398 | } else { |
@@ -410,6 +405,8 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) | |||
410 | if (result == PCI_ERS_RESULT_CAN_RECOVER) { | 405 | if (result == PCI_ERS_RESULT_CAN_RECOVER) { |
411 | rc = rtas_pci_enable(frozen_pdn, EEH_THAW_DMA); | 406 | rc = rtas_pci_enable(frozen_pdn, EEH_THAW_DMA); |
412 | 407 | ||
408 | if (rc < 0) | ||
409 | goto hard_fail; | ||
413 | if (rc) | 410 | if (rc) |
414 | result = PCI_ERS_RESULT_NEED_RESET; | 411 | result = PCI_ERS_RESULT_NEED_RESET; |
415 | else | 412 | else |
@@ -417,21 +414,28 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) | |||
417 | } | 414 | } |
418 | 415 | ||
419 | /* If any device has a hard failure, then shut off everything. */ | 416 | /* If any device has a hard failure, then shut off everything. */ |
420 | if (result == PCI_ERS_RESULT_DISCONNECT) | 417 | if (result == PCI_ERS_RESULT_DISCONNECT) { |
418 | printk(KERN_WARNING "EEH: Device driver gave up\n"); | ||
421 | goto hard_fail; | 419 | goto hard_fail; |
420 | } | ||
422 | 421 | ||
423 | /* If any device called out for a reset, then reset the slot */ | 422 | /* If any device called out for a reset, then reset the slot */ |
424 | if (result == PCI_ERS_RESULT_NEED_RESET) { | 423 | if (result == PCI_ERS_RESULT_NEED_RESET) { |
425 | rc = eeh_reset_device(frozen_pdn, NULL); | 424 | rc = eeh_reset_device(frozen_pdn, NULL); |
426 | if (rc) | 425 | if (rc) { |
426 | printk(KERN_WARNING "EEH: Cannot reset, rc=%d\n", rc); | ||
427 | goto hard_fail; | 427 | goto hard_fail; |
428 | } | ||
428 | result = PCI_ERS_RESULT_NONE; | 429 | result = PCI_ERS_RESULT_NONE; |
429 | pci_walk_bus(frozen_bus, eeh_report_reset, &result); | 430 | pci_walk_bus(frozen_bus, eeh_report_reset, &result); |
430 | } | 431 | } |
431 | 432 | ||
432 | /* All devices should claim they have recovered by now. */ | 433 | /* All devices should claim they have recovered by now. */ |
433 | if (result != PCI_ERS_RESULT_RECOVERED) | 434 | if ((result != PCI_ERS_RESULT_RECOVERED) && |
435 | (result != PCI_ERS_RESULT_NONE)) { | ||
436 | printk(KERN_WARNING "EEH: Not recovered\n"); | ||
434 | goto hard_fail; | 437 | goto hard_fail; |
438 | } | ||
435 | 439 | ||
436 | /* Tell all device drivers that they can resume operations */ | 440 | /* Tell all device drivers that they can resume operations */ |
437 | pci_walk_bus(frozen_bus, eeh_report_resume, NULL); | 441 | pci_walk_bus(frozen_bus, eeh_report_resume, NULL); |
diff --git a/arch/powerpc/platforms/pseries/eeh_event.c b/arch/powerpc/platforms/pseries/eeh_event.c index 49037edf7d39..221dec8c16bd 100644 --- a/arch/powerpc/platforms/pseries/eeh_event.c +++ b/arch/powerpc/platforms/pseries/eeh_event.c | |||
@@ -118,9 +118,7 @@ static void eeh_thread_launcher(struct work_struct *dummy) | |||
118 | * (from a workqueue). | 118 | * (from a workqueue). |
119 | */ | 119 | */ |
120 | int eeh_send_failure_event (struct device_node *dn, | 120 | int eeh_send_failure_event (struct device_node *dn, |
121 | struct pci_dev *dev, | 121 | struct pci_dev *dev) |
122 | enum pci_channel_state state, | ||
123 | int time_unavail) | ||
124 | { | 122 | { |
125 | unsigned long flags; | 123 | unsigned long flags; |
126 | struct eeh_event *event; | 124 | struct eeh_event *event; |
@@ -144,8 +142,6 @@ int eeh_send_failure_event (struct device_node *dn, | |||
144 | 142 | ||
145 | event->dn = dn; | 143 | event->dn = dn; |
146 | event->dev = dev; | 144 | event->dev = dev; |
147 | event->state = state; | ||
148 | event->time_unavail = time_unavail; | ||
149 | 145 | ||
150 | /* We may or may not be called in an interrupt context */ | 146 | /* We may or may not be called in an interrupt context */ |
151 | spin_lock_irqsave(&eeh_eventlist_lock, flags); | 147 | spin_lock_irqsave(&eeh_eventlist_lock, flags); |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index e6653a868b91..f9510a5a3e21 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -242,6 +242,7 @@ static unsigned long tce_get_pSeriesLP(struct iommu_table *tbl, long tcenum) | |||
242 | return tce_ret; | 242 | return tce_ret; |
243 | } | 243 | } |
244 | 244 | ||
245 | #ifdef CONFIG_PCI | ||
245 | static void iommu_table_setparms(struct pci_controller *phb, | 246 | static void iommu_table_setparms(struct pci_controller *phb, |
246 | struct device_node *dn, | 247 | struct device_node *dn, |
247 | struct iommu_table *tbl) | 248 | struct iommu_table *tbl) |
@@ -478,29 +479,6 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev) | |||
478 | pci_name(dev)); | 479 | pci_name(dev)); |
479 | } | 480 | } |
480 | 481 | ||
481 | static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node) | ||
482 | { | ||
483 | int err = NOTIFY_OK; | ||
484 | struct device_node *np = node; | ||
485 | struct pci_dn *pci = PCI_DN(np); | ||
486 | |||
487 | switch (action) { | ||
488 | case PSERIES_RECONFIG_REMOVE: | ||
489 | if (pci && pci->iommu_table && | ||
490 | get_property(np, "ibm,dma-window", NULL)) | ||
491 | iommu_free_table(np); | ||
492 | break; | ||
493 | default: | ||
494 | err = NOTIFY_DONE; | ||
495 | break; | ||
496 | } | ||
497 | return err; | ||
498 | } | ||
499 | |||
500 | static struct notifier_block iommu_reconfig_nb = { | ||
501 | .notifier_call = iommu_reconfig_notifier, | ||
502 | }; | ||
503 | |||
504 | static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev) | 482 | static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev) |
505 | { | 483 | { |
506 | struct device_node *pdn, *dn; | 484 | struct device_node *pdn, *dn; |
@@ -554,6 +532,35 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev) | |||
554 | 532 | ||
555 | dev->dev.archdata.dma_data = pci->iommu_table; | 533 | dev->dev.archdata.dma_data = pci->iommu_table; |
556 | } | 534 | } |
535 | #else /* CONFIG_PCI */ | ||
536 | #define pci_dma_bus_setup_pSeries NULL | ||
537 | #define pci_dma_dev_setup_pSeries NULL | ||
538 | #define pci_dma_bus_setup_pSeriesLP NULL | ||
539 | #define pci_dma_dev_setup_pSeriesLP NULL | ||
540 | #endif /* !CONFIG_PCI */ | ||
541 | |||
542 | static int iommu_reconfig_notifier(struct notifier_block *nb, unsigned long action, void *node) | ||
543 | { | ||
544 | int err = NOTIFY_OK; | ||
545 | struct device_node *np = node; | ||
546 | struct pci_dn *pci = PCI_DN(np); | ||
547 | |||
548 | switch (action) { | ||
549 | case PSERIES_RECONFIG_REMOVE: | ||
550 | if (pci && pci->iommu_table && | ||
551 | get_property(np, "ibm,dma-window", NULL)) | ||
552 | iommu_free_table(np); | ||
553 | break; | ||
554 | default: | ||
555 | err = NOTIFY_DONE; | ||
556 | break; | ||
557 | } | ||
558 | return err; | ||
559 | } | ||
560 | |||
561 | static struct notifier_block iommu_reconfig_nb = { | ||
562 | .notifier_call = iommu_reconfig_notifier, | ||
563 | }; | ||
557 | 564 | ||
558 | /* These are called very early. */ | 565 | /* These are called very early. */ |
559 | void iommu_init_early_pSeries(void) | 566 | void iommu_init_early_pSeries(void) |
@@ -562,7 +569,7 @@ void iommu_init_early_pSeries(void) | |||
562 | /* Direct I/O, IOMMU off */ | 569 | /* Direct I/O, IOMMU off */ |
563 | ppc_md.pci_dma_dev_setup = NULL; | 570 | ppc_md.pci_dma_dev_setup = NULL; |
564 | ppc_md.pci_dma_bus_setup = NULL; | 571 | ppc_md.pci_dma_bus_setup = NULL; |
565 | pci_dma_ops = &dma_direct_ops; | 572 | set_pci_dma_ops(&dma_direct_ops); |
566 | return; | 573 | return; |
567 | } | 574 | } |
568 | 575 | ||
@@ -588,6 +595,6 @@ void iommu_init_early_pSeries(void) | |||
588 | 595 | ||
589 | pSeries_reconfig_notifier_register(&iommu_reconfig_nb); | 596 | pSeries_reconfig_notifier_register(&iommu_reconfig_nb); |
590 | 597 | ||
591 | pci_dma_ops = &dma_iommu_ops; | 598 | set_pci_dma_ops(&dma_iommu_ops); |
592 | } | 599 | } |
593 | 600 | ||
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 34aff47b1f55..ff87b1ad8ce9 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -65,6 +65,7 @@ | |||
65 | #include <asm/udbg.h> | 65 | #include <asm/udbg.h> |
66 | #include <asm/smp.h> | 66 | #include <asm/smp.h> |
67 | #include <asm/firmware.h> | 67 | #include <asm/firmware.h> |
68 | #include <asm/eeh.h> | ||
68 | 69 | ||
69 | #include "plpar_wrappers.h" | 70 | #include "plpar_wrappers.h" |
70 | #include "pseries.h" | 71 | #include "pseries.h" |
@@ -514,6 +515,10 @@ void pSeries_power_off(void) | |||
514 | for (;;); | 515 | for (;;); |
515 | } | 516 | } |
516 | 517 | ||
518 | #ifndef CONFIG_PCI | ||
519 | void pSeries_final_fixup(void) { } | ||
520 | #endif | ||
521 | |||
517 | define_machine(pseries) { | 522 | define_machine(pseries) { |
518 | .name = "pSeries", | 523 | .name = "pSeries", |
519 | .probe = pSeries_probe, | 524 | .probe = pSeries_probe, |
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile index 26ca3ffbc1de..83fbbfc779a1 100644 --- a/arch/powerpc/sysdev/Makefile +++ b/arch/powerpc/sysdev/Makefile | |||
@@ -11,9 +11,13 @@ obj-$(CONFIG_PPC_PMI) += pmi.o | |||
11 | obj-$(CONFIG_U3_DART) += dart_iommu.o | 11 | obj-$(CONFIG_U3_DART) += dart_iommu.o |
12 | obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o | 12 | obj-$(CONFIG_MMIO_NVRAM) += mmio_nvram.o |
13 | obj-$(CONFIG_FSL_SOC) += fsl_soc.o | 13 | obj-$(CONFIG_FSL_SOC) += fsl_soc.o |
14 | obj-$(CONFIG_FSL_PCIE) += fsl_pcie.o | ||
14 | obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o | 15 | obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o |
15 | obj-$(CONFIG_QUICC_ENGINE) += qe_lib/ | 16 | obj-$(CONFIG_QUICC_ENGINE) += qe_lib/ |
16 | 17 | ||
18 | # contains only the suspend handler for time | ||
19 | obj-$(CONFIG_PM) += timer.o | ||
20 | |||
17 | ifeq ($(CONFIG_PPC_MERGE),y) | 21 | ifeq ($(CONFIG_PPC_MERGE),y) |
18 | obj-$(CONFIG_PPC_I8259) += i8259.o | 22 | obj-$(CONFIG_PPC_I8259) += i8259.o |
19 | obj-$(CONFIG_PPC_83xx) += ipic.o | 23 | obj-$(CONFIG_PPC_83xx) += ipic.o |
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c index 1488535b0e13..336186dd7f10 100644 --- a/arch/powerpc/sysdev/dart_iommu.c +++ b/arch/powerpc/sysdev/dart_iommu.c | |||
@@ -333,7 +333,7 @@ void iommu_init_early_dart(void) | |||
333 | ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_dart; | 333 | ppc_md.pci_dma_bus_setup = pci_dma_bus_setup_dart; |
334 | 334 | ||
335 | /* Setup pci_dma ops */ | 335 | /* Setup pci_dma ops */ |
336 | pci_dma_ops = &dma_iommu_ops; | 336 | set_pci_dma_ops(&dma_iommu_ops); |
337 | return; | 337 | return; |
338 | } | 338 | } |
339 | 339 | ||
@@ -343,7 +343,7 @@ void iommu_init_early_dart(void) | |||
343 | ppc_md.pci_dma_bus_setup = NULL; | 343 | ppc_md.pci_dma_bus_setup = NULL; |
344 | 344 | ||
345 | /* Setup pci_dma ops */ | 345 | /* Setup pci_dma ops */ |
346 | pci_dma_ops = &dma_direct_ops; | 346 | set_pci_dma_ops(&dma_direct_ops); |
347 | } | 347 | } |
348 | 348 | ||
349 | 349 | ||
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_pcie.c b/arch/powerpc/sysdev/fsl_pcie.c index a2f4f730213e..041c07e8b665 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_pcie.c +++ b/arch/powerpc/sysdev/fsl_pcie.c | |||
@@ -24,8 +24,6 @@ | |||
24 | #include <asm/pci-bridge.h> | 24 | #include <asm/pci-bridge.h> |
25 | #include <asm/machdep.h> | 25 | #include <asm/machdep.h> |
26 | 26 | ||
27 | #include "mpc86xx.h" | ||
28 | |||
29 | #define PCI_CFG_OUT out_be32 | 27 | #define PCI_CFG_OUT out_be32 |
30 | 28 | ||
31 | /* ERRATA PCI-Ex 14 PCIE Controller timeout */ | 29 | /* ERRATA PCI-Ex 14 PCIE Controller timeout */ |
diff --git a/arch/powerpc/sysdev/fsl_pcie.h b/arch/powerpc/sysdev/fsl_pcie.h new file mode 100644 index 000000000000..8d9779c84bea --- /dev/null +++ b/arch/powerpc/sysdev/fsl_pcie.h | |||
@@ -0,0 +1,94 @@ | |||
1 | /* | ||
2 | * MPC85xx/86xx PCI Express structure define | ||
3 | * | ||
4 | * Copyright 2007 Freescale Semiconductor, Inc | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | #ifndef __POWERPC_FSL_PCIE_H | ||
15 | #define __POWERPC_FSL_PCIE_H | ||
16 | |||
17 | /* PCIE Express IO block registers in 85xx/86xx */ | ||
18 | |||
19 | struct ccsr_pex { | ||
20 | __be32 __iomem pex_config_addr; /* 0x.000 - PCI Express Configuration Address Register */ | ||
21 | __be32 __iomem pex_config_data; /* 0x.004 - PCI Express Configuration Data Register */ | ||
22 | u8 __iomem res1[4]; | ||
23 | __be32 __iomem pex_otb_cpl_tor; /* 0x.00c - PCI Express Outbound completion timeout register */ | ||
24 | __be32 __iomem pex_conf_tor; /* 0x.010 - PCI Express configuration timeout register */ | ||
25 | u8 __iomem res2[12]; | ||
26 | __be32 __iomem pex_pme_mes_dr; /* 0x.020 - PCI Express PME and message detect register */ | ||
27 | __be32 __iomem pex_pme_mes_disr; /* 0x.024 - PCI Express PME and message disable register */ | ||
28 | __be32 __iomem pex_pme_mes_ier; /* 0x.028 - PCI Express PME and message interrupt enable register */ | ||
29 | __be32 __iomem pex_pmcr; /* 0x.02c - PCI Express power management command register */ | ||
30 | u8 __iomem res3[3024]; | ||
31 | __be32 __iomem pexotar0; /* 0x.c00 - PCI Express outbound translation address register 0 */ | ||
32 | __be32 __iomem pexotear0; /* 0x.c04 - PCI Express outbound translation extended address register 0*/ | ||
33 | u8 __iomem res4[8]; | ||
34 | __be32 __iomem pexowar0; /* 0x.c10 - PCI Express outbound window attributes register 0*/ | ||
35 | u8 __iomem res5[12]; | ||
36 | __be32 __iomem pexotar1; /* 0x.c20 - PCI Express outbound translation address register 1 */ | ||
37 | __be32 __iomem pexotear1; /* 0x.c24 - PCI Express outbound translation extended address register 1*/ | ||
38 | __be32 __iomem pexowbar1; /* 0x.c28 - PCI Express outbound window base address register 1*/ | ||
39 | u8 __iomem res6[4]; | ||
40 | __be32 __iomem pexowar1; /* 0x.c30 - PCI Express outbound window attributes register 1*/ | ||
41 | u8 __iomem res7[12]; | ||
42 | __be32 __iomem pexotar2; /* 0x.c40 - PCI Express outbound translation address register 2 */ | ||
43 | __be32 __iomem pexotear2; /* 0x.c44 - PCI Express outbound translation extended address register 2*/ | ||
44 | __be32 __iomem pexowbar2; /* 0x.c48 - PCI Express outbound window base address register 2*/ | ||
45 | u8 __iomem res8[4]; | ||
46 | __be32 __iomem pexowar2; /* 0x.c50 - PCI Express outbound window attributes register 2*/ | ||
47 | u8 __iomem res9[12]; | ||
48 | __be32 __iomem pexotar3; /* 0x.c60 - PCI Express outbound translation address register 3 */ | ||
49 | __be32 __iomem pexotear3; /* 0x.c64 - PCI Express outbound translation extended address register 3*/ | ||
50 | __be32 __iomem pexowbar3; /* 0x.c68 - PCI Express outbound window base address register 3*/ | ||
51 | u8 __iomem res10[4]; | ||
52 | __be32 __iomem pexowar3; /* 0x.c70 - PCI Express outbound window attributes register 3*/ | ||
53 | u8 __iomem res11[12]; | ||
54 | __be32 __iomem pexotar4; /* 0x.c80 - PCI Express outbound translation address register 4 */ | ||
55 | __be32 __iomem pexotear4; /* 0x.c84 - PCI Express outbound translation extended address register 4*/ | ||
56 | __be32 __iomem pexowbar4; /* 0x.c88 - PCI Express outbound window base address register 4*/ | ||
57 | u8 __iomem res12[4]; | ||
58 | __be32 __iomem pexowar4; /* 0x.c90 - PCI Express outbound window attributes register 4*/ | ||
59 | u8 __iomem res13[12]; | ||
60 | u8 __iomem res14[256]; | ||
61 | __be32 __iomem pexitar3; /* 0x.da0 - PCI Express inbound translation address register 3 */ | ||
62 | u8 __iomem res15[4]; | ||
63 | __be32 __iomem pexiwbar3; /* 0x.da8 - PCI Express inbound window base address register 3 */ | ||
64 | __be32 __iomem pexiwbear3; /* 0x.dac - PCI Express inbound window base extended address register 3 */ | ||
65 | __be32 __iomem pexiwar3; /* 0x.db0 - PCI Express inbound window attributes register 3 */ | ||
66 | u8 __iomem res16[12]; | ||
67 | __be32 __iomem pexitar2; /* 0x.dc0 - PCI Express inbound translation address register 2 */ | ||
68 | u8 __iomem res17[4]; | ||
69 | __be32 __iomem pexiwbar2; /* 0x.dc8 - PCI Express inbound window base address register 2 */ | ||
70 | __be32 __iomem pexiwbear2; /* 0x.dcc - PCI Express inbound window base extended address register 2 */ | ||
71 | __be32 __iomem pexiwar2; /* 0x.dd0 - PCI Express inbound window attributes register 2 */ | ||
72 | u8 __iomem res18[12]; | ||
73 | __be32 __iomem pexitar1; /* 0x.de0 - PCI Express inbound translation address register 2 */ | ||
74 | u8 __iomem res19[4]; | ||
75 | __be32 __iomem pexiwbar1; /* 0x.de8 - PCI Express inbound window base address register 2 */ | ||
76 | __be32 __iomem pexiwbear1; /* 0x.dec - PCI Express inbound window base extended address register 2 */ | ||
77 | __be32 __iomem pexiwar1; /* 0x.df0 - PCI Express inbound window attributes register 2 */ | ||
78 | u8 __iomem res20[12]; | ||
79 | __be32 __iomem pex_err_dr; /* 0x.e00 - PCI Express error detect register */ | ||
80 | u8 __iomem res21[4]; | ||
81 | __be32 __iomem pex_err_en; /* 0x.e08 - PCI Express error interrupt enable register */ | ||
82 | u8 __iomem res22[4]; | ||
83 | __be32 __iomem pex_err_disr; /* 0x.e10 - PCI Express error disable register */ | ||
84 | u8 __iomem res23[12]; | ||
85 | __be32 __iomem pex_err_cap_stat; /* 0x.e20 - PCI Express error capture status register */ | ||
86 | u8 __iomem res24[4]; | ||
87 | __be32 __iomem pex_err_cap_r0; /* 0x.e28 - PCI Express error capture register 0 */ | ||
88 | __be32 __iomem pex_err_cap_r1; /* 0x.e2c - PCI Express error capture register 0 */ | ||
89 | __be32 __iomem pex_err_cap_r2; /* 0x.e30 - PCI Express error capture register 0 */ | ||
90 | __be32 __iomem pex_err_cap_r3; /* 0x.e34 - PCI Express error capture register 0 */ | ||
91 | }; | ||
92 | |||
93 | #endif /* __POWERPC_FSL_PCIE_H */ | ||
94 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/powerpc/sysdev/qe_lib/Kconfig b/arch/powerpc/sysdev/qe_lib/Kconfig index a725e80befa8..887739f3badc 100644 --- a/arch/powerpc/sysdev/qe_lib/Kconfig +++ b/arch/powerpc/sysdev/qe_lib/Kconfig | |||
@@ -2,11 +2,8 @@ | |||
2 | # QE Communication options | 2 | # QE Communication options |
3 | # | 3 | # |
4 | 4 | ||
5 | menu "QE Options" | ||
6 | depends on QUICC_ENGINE | ||
7 | |||
8 | config UCC_SLOW | 5 | config UCC_SLOW |
9 | bool "UCC Slow Protocols Support" | 6 | bool |
10 | default n | 7 | default n |
11 | select UCC | 8 | select UCC |
12 | help | 9 | help |
@@ -14,10 +11,9 @@ config UCC_SLOW | |||
14 | protocols: UART, BISYNC, QMC | 11 | protocols: UART, BISYNC, QMC |
15 | 12 | ||
16 | config UCC_FAST | 13 | config UCC_FAST |
17 | bool "UCC Fast Protocols Support" | 14 | bool |
18 | default n | 15 | default n |
19 | select UCC | 16 | select UCC |
20 | select UCC_SLOW | ||
21 | help | 17 | help |
22 | This option provides qe_lib support to UCC fast | 18 | This option provides qe_lib support to UCC fast |
23 | protocols: HDLC, Ethernet, ATM, transparent | 19 | protocols: HDLC, Ethernet, ATM, transparent |
@@ -26,5 +22,3 @@ config UCC | |||
26 | bool | 22 | bool |
27 | default y if UCC_FAST || UCC_SLOW | 23 | default y if UCC_FAST || UCC_SLOW |
28 | 24 | ||
29 | endmenu | ||
30 | |||
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_slow.c b/arch/powerpc/sysdev/qe_lib/ucc_slow.c index 817df73ecf56..b930d686a4d1 100644 --- a/arch/powerpc/sysdev/qe_lib/ucc_slow.c +++ b/arch/powerpc/sysdev/qe_lib/ucc_slow.c | |||
@@ -187,7 +187,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc | |||
187 | uccs->us_pram = qe_muram_addr(uccs->us_pram_offset); | 187 | uccs->us_pram = qe_muram_addr(uccs->us_pram_offset); |
188 | 188 | ||
189 | /* Init Guemr register */ | 189 | /* Init Guemr register */ |
190 | if ((ret = ucc_init_guemr((struct ucc_common *) (us_info->regs)))) { | 190 | if ((ret = ucc_init_guemr((struct ucc_common *) us_regs))) { |
191 | printk(KERN_ERR "%s: cannot init GUEMR", __FUNCTION__); | 191 | printk(KERN_ERR "%s: cannot init GUEMR", __FUNCTION__); |
192 | ucc_slow_free(uccs); | 192 | ucc_slow_free(uccs); |
193 | return ret; | 193 | return ret; |
@@ -195,7 +195,7 @@ int ucc_slow_init(struct ucc_slow_info * us_info, struct ucc_slow_private ** ucc | |||
195 | 195 | ||
196 | /* Set UCC to slow type */ | 196 | /* Set UCC to slow type */ |
197 | if ((ret = ucc_set_type(us_info->ucc_num, | 197 | if ((ret = ucc_set_type(us_info->ucc_num, |
198 | (struct ucc_common *) (us_info->regs), | 198 | (struct ucc_common *) us_regs, |
199 | UCC_SPEED_TYPE_SLOW))) { | 199 | UCC_SPEED_TYPE_SLOW))) { |
200 | printk(KERN_ERR "%s: cannot set UCC type", __FUNCTION__); | 200 | printk(KERN_ERR "%s: cannot set UCC type", __FUNCTION__); |
201 | ucc_slow_free(uccs); | 201 | ucc_slow_free(uccs); |
diff --git a/arch/powerpc/sysdev/timer.c b/arch/powerpc/sysdev/timer.c new file mode 100644 index 000000000000..bdbf8fe520e4 --- /dev/null +++ b/arch/powerpc/sysdev/timer.c | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | * Common code to keep time when machine suspends. | ||
3 | * | ||
4 | * Copyright 2007 Johannes Berg <johannes@sipsolutions.net> | ||
5 | * | ||
6 | * GPLv2 | ||
7 | */ | ||
8 | |||
9 | #include <linux/time.h> | ||
10 | #include <asm/rtc.h> | ||
11 | |||
12 | static unsigned long suspend_rtc_time; | ||
13 | |||
14 | /* | ||
15 | * Reset the time after a sleep. | ||
16 | */ | ||
17 | static int timer_resume(struct sys_device *dev) | ||
18 | { | ||
19 | struct timeval tv; | ||
20 | struct timespec ts; | ||
21 | struct rtc_time cur_rtc_tm; | ||
22 | unsigned long cur_rtc_time, diff; | ||
23 | |||
24 | /* get current RTC time and convert to seconds */ | ||
25 | get_rtc_time(&cur_rtc_tm); | ||
26 | rtc_tm_to_time(&cur_rtc_tm, &cur_rtc_time); | ||
27 | |||
28 | diff = cur_rtc_time - suspend_rtc_time; | ||
29 | |||
30 | /* adjust time of day by seconds that elapsed while | ||
31 | * we were suspended */ | ||
32 | do_gettimeofday(&tv); | ||
33 | ts.tv_sec = tv.tv_sec + diff; | ||
34 | ts.tv_nsec = tv.tv_usec * NSEC_PER_USEC; | ||
35 | do_settimeofday(&ts); | ||
36 | |||
37 | return 0; | ||
38 | } | ||
39 | |||
40 | static int timer_suspend(struct sys_device *dev, pm_message_t state) | ||
41 | { | ||
42 | struct rtc_time suspend_rtc_tm; | ||
43 | WARN_ON(!ppc_md.get_rtc_time); | ||
44 | |||
45 | get_rtc_time(&suspend_rtc_tm); | ||
46 | rtc_tm_to_time(&suspend_rtc_tm, &suspend_rtc_time); | ||
47 | |||
48 | return 0; | ||
49 | } | ||
50 | |||
51 | static struct sysdev_class timer_sysclass = { | ||
52 | .resume = timer_resume, | ||
53 | .suspend = timer_suspend, | ||
54 | set_kset_name("timer"), | ||
55 | }; | ||
56 | |||
57 | static struct sys_device device_timer = { | ||
58 | .id = 0, | ||
59 | .cls = &timer_sysclass, | ||
60 | }; | ||
61 | |||
62 | static int time_init_device(void) | ||
63 | { | ||
64 | int error = sysdev_class_register(&timer_sysclass); | ||
65 | if (!error) | ||
66 | error = sysdev_register(&device_timer); | ||
67 | return error; | ||
68 | } | ||
69 | |||
70 | device_initcall(time_init_device); | ||
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index bf299b66f3fc..f12687d0354d 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c | |||
@@ -1360,8 +1360,12 @@ static void print_bug_trap(struct pt_regs *regs) | |||
1360 | if (is_warning_bug(bug)) | 1360 | if (is_warning_bug(bug)) |
1361 | return; | 1361 | return; |
1362 | 1362 | ||
1363 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
1363 | printf("kernel BUG at %s:%u!\n", | 1364 | printf("kernel BUG at %s:%u!\n", |
1364 | bug->file, bug->line); | 1365 | bug->file, bug->line); |
1366 | #else | ||
1367 | printf("kernel BUG at %p!\n", (void *)bug->bug_addr); | ||
1368 | #endif | ||
1365 | } | 1369 | } |
1366 | 1370 | ||
1367 | void excprint(struct pt_regs *fp) | 1371 | void excprint(struct pt_regs *fp) |
diff --git a/arch/ppc/kernel/asm-offsets.c b/arch/ppc/kernel/asm-offsets.c index 1f91eca2f3d7..c5850a272650 100644 --- a/arch/ppc/kernel/asm-offsets.c +++ b/arch/ppc/kernel/asm-offsets.c | |||
@@ -40,7 +40,6 @@ main(void) | |||
40 | DEFINE(PTRACE, offsetof(struct task_struct, ptrace)); | 40 | DEFINE(PTRACE, offsetof(struct task_struct, ptrace)); |
41 | DEFINE(KSP, offsetof(struct thread_struct, ksp)); | 41 | DEFINE(KSP, offsetof(struct thread_struct, ksp)); |
42 | DEFINE(PGDIR, offsetof(struct thread_struct, pgdir)); | 42 | DEFINE(PGDIR, offsetof(struct thread_struct, pgdir)); |
43 | DEFINE(LAST_SYSCALL, offsetof(struct thread_struct, last_syscall)); | ||
44 | DEFINE(PT_REGS, offsetof(struct thread_struct, regs)); | 43 | DEFINE(PT_REGS, offsetof(struct thread_struct, regs)); |
45 | DEFINE(THREAD_FPEXC_MODE, offsetof(struct thread_struct, fpexc_mode)); | 44 | DEFINE(THREAD_FPEXC_MODE, offsetof(struct thread_struct, fpexc_mode)); |
46 | DEFINE(THREAD_FPR0, offsetof(struct thread_struct, fpr[0])); | 45 | DEFINE(THREAD_FPR0, offsetof(struct thread_struct, fpr[0])); |
diff --git a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S index a9d455369dc6..ab64256110bd 100644 --- a/arch/ppc/kernel/entry.S +++ b/arch/ppc/kernel/entry.S | |||
@@ -191,7 +191,6 @@ stack_ovf: | |||
191 | 0: | 191 | 0: |
192 | 192 | ||
193 | _GLOBAL(DoSyscall) | 193 | _GLOBAL(DoSyscall) |
194 | stw r0,THREAD+LAST_SYSCALL(r2) | ||
195 | stw r3,ORIG_GPR3(r1) | 194 | stw r3,ORIG_GPR3(r1) |
196 | li r12,0 | 195 | li r12,0 |
197 | stw r12,RESULT(r1) | 196 | stw r12,RESULT(r1) |
diff --git a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c index 84e999d9a7bb..c8017c9f1326 100644 --- a/arch/ppc/platforms/4xx/ocotea.c +++ b/arch/ppc/platforms/4xx/ocotea.c | |||
@@ -178,7 +178,7 @@ ocotea_setup_pcix(void) | |||
178 | /* Setup 2GB PCI->PLB inbound memory window at 0, enable MSIs */ | 178 | /* Setup 2GB PCI->PLB inbound memory window at 0, enable MSIs */ |
179 | PCIX_WRITEL(0x00000000, PCIX0_PIM0LAH); | 179 | PCIX_WRITEL(0x00000000, PCIX0_PIM0LAH); |
180 | PCIX_WRITEL(0x00000000, PCIX0_PIM0LAL); | 180 | PCIX_WRITEL(0x00000000, PCIX0_PIM0LAL); |
181 | PCIX_WRITEL(0xe0000007, PCIX0_PIM0SA); | 181 | PCIX_WRITEL(0x80000007, PCIX0_PIM0SA); |
182 | 182 | ||
183 | eieio(); | 183 | eieio(); |
184 | } | 184 | } |
diff --git a/arch/ppc/platforms/4xx/taishan.c b/arch/ppc/platforms/4xx/taishan.c index bb0253eef45a..5d9af8ddb155 100644 --- a/arch/ppc/platforms/4xx/taishan.c +++ b/arch/ppc/platforms/4xx/taishan.c | |||
@@ -235,7 +235,7 @@ taishan_setup_pcix(void) | |||
235 | /* Setup 2GB PCI->PLB inbound memory window at 0, enable MSIs */ | 235 | /* Setup 2GB PCI->PLB inbound memory window at 0, enable MSIs */ |
236 | PCIX_WRITEL(0x00000000, PCIX0_PIM0LAH); | 236 | PCIX_WRITEL(0x00000000, PCIX0_PIM0LAH); |
237 | PCIX_WRITEL(0x00000000, PCIX0_PIM0LAL); | 237 | PCIX_WRITEL(0x00000000, PCIX0_PIM0LAL); |
238 | PCIX_WRITEL(0xe0000007, PCIX0_PIM0SA); | 238 | PCIX_WRITEL(0x80000007, PCIX0_PIM0SA); |
239 | PCIX_WRITEL(0xffffffff, PCIX0_PIM0SAH); | 239 | PCIX_WRITEL(0xffffffff, PCIX0_PIM0SAH); |
240 | 240 | ||
241 | iounmap(pcix_reg_base); | 241 | iounmap(pcix_reg_base); |
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c index f729eebf771f..adfea3c7c62a 100644 --- a/drivers/macintosh/adb.c +++ b/drivers/macintosh/adb.c | |||
@@ -90,7 +90,7 @@ static int autopoll_devs; | |||
90 | int __adb_probe_sync; | 90 | int __adb_probe_sync; |
91 | 91 | ||
92 | #ifdef CONFIG_PM | 92 | #ifdef CONFIG_PM |
93 | static int adb_notify_sleep(struct pmu_sleep_notifier *self, int when); | 93 | static void adb_notify_sleep(struct pmu_sleep_notifier *self, int when); |
94 | static struct pmu_sleep_notifier adb_sleep_notifier = { | 94 | static struct pmu_sleep_notifier adb_sleep_notifier = { |
95 | adb_notify_sleep, | 95 | adb_notify_sleep, |
96 | SLEEP_LEVEL_ADB, | 96 | SLEEP_LEVEL_ADB, |
@@ -340,11 +340,9 @@ __initcall(adb_init); | |||
340 | /* | 340 | /* |
341 | * notify clients before sleep and reset bus afterwards | 341 | * notify clients before sleep and reset bus afterwards |
342 | */ | 342 | */ |
343 | int | 343 | void |
344 | adb_notify_sleep(struct pmu_sleep_notifier *self, int when) | 344 | adb_notify_sleep(struct pmu_sleep_notifier *self, int when) |
345 | { | 345 | { |
346 | int ret; | ||
347 | |||
348 | switch (when) { | 346 | switch (when) { |
349 | case PBOOK_SLEEP_REQUEST: | 347 | case PBOOK_SLEEP_REQUEST: |
350 | adb_got_sleep = 1; | 348 | adb_got_sleep = 1; |
@@ -353,22 +351,8 @@ adb_notify_sleep(struct pmu_sleep_notifier *self, int when) | |||
353 | /* Stop autopoll */ | 351 | /* Stop autopoll */ |
354 | if (adb_controller->autopoll) | 352 | if (adb_controller->autopoll) |
355 | adb_controller->autopoll(0); | 353 | adb_controller->autopoll(0); |
356 | ret = blocking_notifier_call_chain(&adb_client_list, | 354 | blocking_notifier_call_chain(&adb_client_list, |
357 | ADB_MSG_POWERDOWN, NULL); | 355 | ADB_MSG_POWERDOWN, NULL); |
358 | if (ret & NOTIFY_STOP_MASK) { | ||
359 | up(&adb_probe_mutex); | ||
360 | return PBOOK_SLEEP_REFUSE; | ||
361 | } | ||
362 | break; | ||
363 | case PBOOK_SLEEP_REJECT: | ||
364 | if (adb_got_sleep) { | ||
365 | adb_got_sleep = 0; | ||
366 | up(&adb_probe_mutex); | ||
367 | adb_reset_bus(); | ||
368 | } | ||
369 | break; | ||
370 | |||
371 | case PBOOK_SLEEP_NOW: | ||
372 | break; | 356 | break; |
373 | case PBOOK_WAKE: | 357 | case PBOOK_WAKE: |
374 | adb_got_sleep = 0; | 358 | adb_got_sleep = 0; |
@@ -376,14 +360,13 @@ adb_notify_sleep(struct pmu_sleep_notifier *self, int when) | |||
376 | adb_reset_bus(); | 360 | adb_reset_bus(); |
377 | break; | 361 | break; |
378 | } | 362 | } |
379 | return PBOOK_SLEEP_OK; | ||
380 | } | 363 | } |
381 | #endif /* CONFIG_PM */ | 364 | #endif /* CONFIG_PM */ |
382 | 365 | ||
383 | static int | 366 | static int |
384 | do_adb_reset_bus(void) | 367 | do_adb_reset_bus(void) |
385 | { | 368 | { |
386 | int ret, nret; | 369 | int ret; |
387 | 370 | ||
388 | if (adb_controller == NULL) | 371 | if (adb_controller == NULL) |
389 | return -ENXIO; | 372 | return -ENXIO; |
@@ -391,13 +374,8 @@ do_adb_reset_bus(void) | |||
391 | if (adb_controller->autopoll) | 374 | if (adb_controller->autopoll) |
392 | adb_controller->autopoll(0); | 375 | adb_controller->autopoll(0); |
393 | 376 | ||
394 | nret = blocking_notifier_call_chain(&adb_client_list, | 377 | blocking_notifier_call_chain(&adb_client_list, |
395 | ADB_MSG_PRE_RESET, NULL); | 378 | ADB_MSG_PRE_RESET, NULL); |
396 | if (nret & NOTIFY_STOP_MASK) { | ||
397 | if (adb_controller->autopoll) | ||
398 | adb_controller->autopoll(autopoll_devs); | ||
399 | return -EBUSY; | ||
400 | } | ||
401 | 379 | ||
402 | if (sleepy_trackpad) { | 380 | if (sleepy_trackpad) { |
403 | /* Let the trackpad settle down */ | 381 | /* Let the trackpad settle down */ |
@@ -427,10 +405,8 @@ do_adb_reset_bus(void) | |||
427 | } | 405 | } |
428 | up(&adb_handler_sem); | 406 | up(&adb_handler_sem); |
429 | 407 | ||
430 | nret = blocking_notifier_call_chain(&adb_client_list, | 408 | blocking_notifier_call_chain(&adb_client_list, |
431 | ADB_MSG_POST_RESET, NULL); | 409 | ADB_MSG_POST_RESET, NULL); |
432 | if (nret & NOTIFY_STOP_MASK) | ||
433 | return -EBUSY; | ||
434 | 410 | ||
435 | return ret; | 411 | return ret; |
436 | } | 412 | } |
diff --git a/drivers/macintosh/apm_emu.c b/drivers/macintosh/apm_emu.c index c5e4d43f97fc..cdb0bead9917 100644 --- a/drivers/macintosh/apm_emu.c +++ b/drivers/macintosh/apm_emu.c | |||
@@ -96,7 +96,7 @@ static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue); | |||
96 | static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue); | 96 | static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue); |
97 | static struct apm_user * user_list; | 97 | static struct apm_user * user_list; |
98 | 98 | ||
99 | static int apm_notify_sleep(struct pmu_sleep_notifier *self, int when); | 99 | static void apm_notify_sleep(struct pmu_sleep_notifier *self, int when); |
100 | static struct pmu_sleep_notifier apm_sleep_notifier = { | 100 | static struct pmu_sleep_notifier apm_sleep_notifier = { |
101 | apm_notify_sleep, | 101 | apm_notify_sleep, |
102 | SLEEP_LEVEL_USERLAND, | 102 | SLEEP_LEVEL_USERLAND, |
@@ -352,7 +352,7 @@ static int do_open(struct inode * inode, struct file * filp) | |||
352 | * doesn't provide a way to NAK, but this could be added | 352 | * doesn't provide a way to NAK, but this could be added |
353 | * here. | 353 | * here. |
354 | */ | 354 | */ |
355 | static int wait_all_suspend(void) | 355 | static void wait_all_suspend(void) |
356 | { | 356 | { |
357 | DECLARE_WAITQUEUE(wait, current); | 357 | DECLARE_WAITQUEUE(wait, current); |
358 | 358 | ||
@@ -366,24 +366,19 @@ static int wait_all_suspend(void) | |||
366 | remove_wait_queue(&apm_suspend_waitqueue, &wait); | 366 | remove_wait_queue(&apm_suspend_waitqueue, &wait); |
367 | 367 | ||
368 | DBG("apm_emu: wait_all_suspend() - complete !\n"); | 368 | DBG("apm_emu: wait_all_suspend() - complete !\n"); |
369 | |||
370 | return 1; | ||
371 | } | 369 | } |
372 | 370 | ||
373 | static int apm_notify_sleep(struct pmu_sleep_notifier *self, int when) | 371 | static void apm_notify_sleep(struct pmu_sleep_notifier *self, int when) |
374 | { | 372 | { |
375 | switch(when) { | 373 | switch(when) { |
376 | case PBOOK_SLEEP_REQUEST: | 374 | case PBOOK_SLEEP_REQUEST: |
377 | queue_event(APM_SYS_SUSPEND, NULL); | 375 | queue_event(APM_SYS_SUSPEND, NULL); |
378 | if (!wait_all_suspend()) | 376 | wait_all_suspend(); |
379 | return PBOOK_SLEEP_REFUSE; | ||
380 | break; | 377 | break; |
381 | case PBOOK_SLEEP_REJECT: | ||
382 | case PBOOK_WAKE: | 378 | case PBOOK_WAKE: |
383 | queue_event(APM_NORMAL_RESUME, NULL); | 379 | queue_event(APM_NORMAL_RESUME, NULL); |
384 | break; | 380 | break; |
385 | } | 381 | } |
386 | return PBOOK_SLEEP_OK; | ||
387 | } | 382 | } |
388 | 383 | ||
389 | #define APM_CRITICAL 10 | 384 | #define APM_CRITICAL 10 |
diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c index c1fd816e9f09..1599dc34f15f 100644 --- a/drivers/macintosh/mac_hid.c +++ b/drivers/macintosh/mac_hid.c | |||
@@ -102,8 +102,6 @@ int mac_hid_mouse_emulate_buttons(int caller, unsigned int keycode, int down) | |||
102 | return 0; | 102 | return 0; |
103 | } | 103 | } |
104 | 104 | ||
105 | EXPORT_SYMBOL(mac_hid_mouse_emulate_buttons); | ||
106 | |||
107 | static int emumousebtn_input_register(void) | 105 | static int emumousebtn_input_register(void) |
108 | { | 106 | { |
109 | int ret; | 107 | int ret; |
diff --git a/drivers/macintosh/via-pmu-led.c b/drivers/macintosh/via-pmu-led.c index 179af10105d9..ed8423f4605d 100644 --- a/drivers/macintosh/via-pmu-led.c +++ b/drivers/macintosh/via-pmu-led.c | |||
@@ -81,7 +81,7 @@ static struct led_classdev pmu_led = { | |||
81 | }; | 81 | }; |
82 | 82 | ||
83 | #ifdef CONFIG_PM | 83 | #ifdef CONFIG_PM |
84 | static int pmu_led_sleep_call(struct pmu_sleep_notifier *self, int when) | 84 | static void pmu_led_sleep_call(struct pmu_sleep_notifier *self, int when) |
85 | { | 85 | { |
86 | unsigned long flags; | 86 | unsigned long flags; |
87 | 87 | ||
@@ -99,8 +99,6 @@ static int pmu_led_sleep_call(struct pmu_sleep_notifier *self, int when) | |||
99 | break; | 99 | break; |
100 | } | 100 | } |
101 | spin_unlock_irqrestore(&pmu_blink_lock, flags); | 101 | spin_unlock_irqrestore(&pmu_blink_lock, flags); |
102 | |||
103 | return PBOOK_SLEEP_OK; | ||
104 | } | 102 | } |
105 | 103 | ||
106 | static struct pmu_sleep_notifier via_pmu_led_sleep_notif = { | 104 | static struct pmu_sleep_notifier via_pmu_led_sleep_notif = { |
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index b6073bdb50c3..ca3c4aba5a22 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -1769,35 +1769,21 @@ EXPORT_SYMBOL(pmu_unregister_sleep_notifier); | |||
1769 | #if defined(CONFIG_PM) && defined(CONFIG_PPC32) | 1769 | #if defined(CONFIG_PM) && defined(CONFIG_PPC32) |
1770 | 1770 | ||
1771 | /* Sleep is broadcast last-to-first */ | 1771 | /* Sleep is broadcast last-to-first */ |
1772 | static int | 1772 | static void broadcast_sleep(int when) |
1773 | broadcast_sleep(int when, int fallback) | ||
1774 | { | 1773 | { |
1775 | int ret = PBOOK_SLEEP_OK; | ||
1776 | struct list_head *list; | 1774 | struct list_head *list; |
1777 | struct pmu_sleep_notifier *notifier; | 1775 | struct pmu_sleep_notifier *notifier; |
1778 | 1776 | ||
1779 | for (list = sleep_notifiers.prev; list != &sleep_notifiers; | 1777 | for (list = sleep_notifiers.prev; list != &sleep_notifiers; |
1780 | list = list->prev) { | 1778 | list = list->prev) { |
1781 | notifier = list_entry(list, struct pmu_sleep_notifier, list); | 1779 | notifier = list_entry(list, struct pmu_sleep_notifier, list); |
1782 | ret = notifier->notifier_call(notifier, when); | 1780 | notifier->notifier_call(notifier, when); |
1783 | if (ret != PBOOK_SLEEP_OK) { | ||
1784 | printk(KERN_DEBUG "sleep %d rejected by %p (%p)\n", | ||
1785 | when, notifier, notifier->notifier_call); | ||
1786 | for (; list != &sleep_notifiers; list = list->next) { | ||
1787 | notifier = list_entry(list, struct pmu_sleep_notifier, list); | ||
1788 | notifier->notifier_call(notifier, fallback); | ||
1789 | } | ||
1790 | return ret; | ||
1791 | } | ||
1792 | } | 1781 | } |
1793 | return ret; | ||
1794 | } | 1782 | } |
1795 | 1783 | ||
1796 | /* Wake is broadcast first-to-last */ | 1784 | /* Wake is broadcast first-to-last */ |
1797 | static int | 1785 | static void broadcast_wake(void) |
1798 | broadcast_wake(void) | ||
1799 | { | 1786 | { |
1800 | int ret = PBOOK_SLEEP_OK; | ||
1801 | struct list_head *list; | 1787 | struct list_head *list; |
1802 | struct pmu_sleep_notifier *notifier; | 1788 | struct pmu_sleep_notifier *notifier; |
1803 | 1789 | ||
@@ -1806,7 +1792,6 @@ broadcast_wake(void) | |||
1806 | notifier = list_entry(list, struct pmu_sleep_notifier, list); | 1792 | notifier = list_entry(list, struct pmu_sleep_notifier, list); |
1807 | notifier->notifier_call(notifier, PBOOK_WAKE); | 1793 | notifier->notifier_call(notifier, PBOOK_WAKE); |
1808 | } | 1794 | } |
1809 | return ret; | ||
1810 | } | 1795 | } |
1811 | 1796 | ||
1812 | /* | 1797 | /* |
@@ -2013,12 +1998,8 @@ pmac_suspend_devices(void) | |||
2013 | 1998 | ||
2014 | pm_prepare_console(); | 1999 | pm_prepare_console(); |
2015 | 2000 | ||
2016 | /* Notify old-style device drivers & userland */ | 2001 | /* Notify old-style device drivers */ |
2017 | ret = broadcast_sleep(PBOOK_SLEEP_REQUEST, PBOOK_SLEEP_REJECT); | 2002 | broadcast_sleep(PBOOK_SLEEP_REQUEST); |
2018 | if (ret != PBOOK_SLEEP_OK) { | ||
2019 | printk(KERN_ERR "Sleep rejected by drivers\n"); | ||
2020 | return -EBUSY; | ||
2021 | } | ||
2022 | 2003 | ||
2023 | /* Sync the disks. */ | 2004 | /* Sync the disks. */ |
2024 | /* XXX It would be nice to have some way to ensure that | 2005 | /* XXX It would be nice to have some way to ensure that |
@@ -2028,12 +2009,7 @@ pmac_suspend_devices(void) | |||
2028 | */ | 2009 | */ |
2029 | sys_sync(); | 2010 | sys_sync(); |
2030 | 2011 | ||
2031 | /* Sleep can fail now. May not be very robust but useful for debugging */ | 2012 | broadcast_sleep(PBOOK_SLEEP_NOW); |
2032 | ret = broadcast_sleep(PBOOK_SLEEP_NOW, PBOOK_WAKE); | ||
2033 | if (ret != PBOOK_SLEEP_OK) { | ||
2034 | printk(KERN_ERR "Driver sleep failed\n"); | ||
2035 | return -EBUSY; | ||
2036 | } | ||
2037 | 2013 | ||
2038 | /* Send suspend call to devices, hold the device core's dpm_sem */ | 2014 | /* Send suspend call to devices, hold the device core's dpm_sem */ |
2039 | ret = device_suspend(PMSG_SUSPEND); | 2015 | ret = device_suspend(PMSG_SUSPEND); |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index c3f9f599f134..753695b624b3 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -2272,11 +2272,12 @@ config GFAR_NAPI | |||
2272 | depends on GIANFAR | 2272 | depends on GIANFAR |
2273 | 2273 | ||
2274 | config UCC_GETH | 2274 | config UCC_GETH |
2275 | tristate "Freescale QE UCC GETH" | 2275 | tristate "Freescale QE Gigabit Ethernet" |
2276 | depends on QUICC_ENGINE && UCC_FAST | 2276 | depends on QUICC_ENGINE |
2277 | select UCC_FAST | ||
2277 | help | 2278 | help |
2278 | This driver supports the Gigabit Ethernet mode of QE UCC. | 2279 | This driver supports the Gigabit Ethernet mode of the QUICC Engine, |
2279 | QE can be found on MPC836x CPUs. | 2280 | which is available on some Freescale SOCs. |
2280 | 2281 | ||
2281 | config UGETH_NAPI | 2282 | config UGETH_NAPI |
2282 | bool "NAPI Support" | 2283 | bool "NAPI Support" |
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index e4f0dd00ae85..5af684b40496 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -396,7 +396,7 @@ config FB_ATARI | |||
396 | 396 | ||
397 | config FB_OF | 397 | config FB_OF |
398 | bool "Open Firmware frame buffer device support" | 398 | bool "Open Firmware frame buffer device support" |
399 | depends on (FB = y) && (PPC64 || PPC_OF) | 399 | depends on (FB = y) && (PPC64 || PPC_OF) && (!PPC_PSERIES || PCI) |
400 | select FB_CFB_FILLRECT | 400 | select FB_CFB_FILLRECT |
401 | select FB_CFB_COPYAREA | 401 | select FB_CFB_COPYAREA |
402 | select FB_CFB_IMAGEBLIT | 402 | select FB_CFB_IMAGEBLIT |
diff --git a/include/asm-powerpc/current.h b/include/asm-powerpc/current.h index b8708aedf925..e2c7f06931e7 100644 --- a/include/asm-powerpc/current.h +++ b/include/asm-powerpc/current.h | |||
@@ -12,6 +12,7 @@ | |||
12 | struct task_struct; | 12 | struct task_struct; |
13 | 13 | ||
14 | #ifdef __powerpc64__ | 14 | #ifdef __powerpc64__ |
15 | #include <linux/stddef.h> | ||
15 | #include <asm/paca.h> | 16 | #include <asm/paca.h> |
16 | 17 | ||
17 | static inline struct task_struct *get_current(void) | 18 | static inline struct task_struct *get_current(void) |
diff --git a/include/asm-powerpc/edac.h b/include/asm-powerpc/edac.h new file mode 100644 index 000000000000..6ead88bbfbb8 --- /dev/null +++ b/include/asm-powerpc/edac.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * PPC EDAC common defs | ||
3 | * | ||
4 | * Author: Dave Jiang <djiang@mvista.com> | ||
5 | * | ||
6 | * 2007 (c) MontaVista Software, Inc. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | #ifndef ASM_EDAC_H | ||
12 | #define ASM_EDAC_H | ||
13 | /* | ||
14 | * ECC atomic, DMA, SMP and interrupt safe scrub function. | ||
15 | * Implements the per arch atomic_scrub() that EDAC use for software | ||
16 | * ECC scrubbing. It reads memory and then writes back the original | ||
17 | * value, allowing the hardware to detect and correct memory errors. | ||
18 | */ | ||
19 | static __inline__ void atomic_scrub(void *va, u32 size) | ||
20 | { | ||
21 | unsigned int *virt_addr = va; | ||
22 | unsigned int temp; | ||
23 | unsigned int i; | ||
24 | |||
25 | for (i = 0; i < size / sizeof(*virt_addr); i++, virt_addr++) { | ||
26 | /* Very carefully read and write to memory atomically | ||
27 | * so we are interrupt, DMA and SMP safe. | ||
28 | */ | ||
29 | __asm__ __volatile__ ("\n\ | ||
30 | 1: lwarx %0,0,%1\n\ | ||
31 | stwcx. %0,0,%1\n\ | ||
32 | bne- 1b\n\ | ||
33 | isync" | ||
34 | : "=&r"(temp) | ||
35 | : "r"(virt_addr) | ||
36 | : "cr0", "memory"); | ||
37 | } | ||
38 | } | ||
39 | |||
40 | #endif | ||
diff --git a/include/asm-powerpc/eeh_event.h b/include/asm-powerpc/eeh_event.h index dc6bf0ffb796..cc3cb04539ac 100644 --- a/include/asm-powerpc/eeh_event.h +++ b/include/asm-powerpc/eeh_event.h | |||
@@ -30,8 +30,6 @@ struct eeh_event { | |||
30 | struct list_head list; | 30 | struct list_head list; |
31 | struct device_node *dn; /* struct device node */ | 31 | struct device_node *dn; /* struct device node */ |
32 | struct pci_dev *dev; /* affected device */ | 32 | struct pci_dev *dev; /* affected device */ |
33 | enum pci_channel_state state; /* PCI bus state for the affected device */ | ||
34 | int time_unavail; /* milliseconds until device might be available */ | ||
35 | }; | 33 | }; |
36 | 34 | ||
37 | /** | 35 | /** |
@@ -46,9 +44,7 @@ struct eeh_event { | |||
46 | * (from a workqueue). | 44 | * (from a workqueue). |
47 | */ | 45 | */ |
48 | int eeh_send_failure_event (struct device_node *dn, | 46 | int eeh_send_failure_event (struct device_node *dn, |
49 | struct pci_dev *dev, | 47 | struct pci_dev *dev); |
50 | enum pci_channel_state state, | ||
51 | int time_unavail); | ||
52 | 48 | ||
53 | /* Main recovery function */ | 49 | /* Main recovery function */ |
54 | struct pci_dn * handle_eeh_events (struct eeh_event *); | 50 | struct pci_dn * handle_eeh_events (struct eeh_event *); |
diff --git a/include/asm-powerpc/ibmebus.h b/include/asm-powerpc/ibmebus.h index 66112114b8c5..87d396e28db2 100644 --- a/include/asm-powerpc/ibmebus.h +++ b/include/asm-powerpc/ibmebus.h | |||
@@ -2,36 +2,37 @@ | |||
2 | * IBM PowerPC eBus Infrastructure Support. | 2 | * IBM PowerPC eBus Infrastructure Support. |
3 | * | 3 | * |
4 | * Copyright (c) 2005 IBM Corporation | 4 | * Copyright (c) 2005 IBM Corporation |
5 | * Joachim Fenkes <fenkes@de.ibm.com> | ||
5 | * Heiko J Schick <schickhj@de.ibm.com> | 6 | * Heiko J Schick <schickhj@de.ibm.com> |
6 | * | 7 | * |
7 | * All rights reserved. | 8 | * All rights reserved. |
8 | * | 9 | * |
9 | * This source code is distributed under a dual license of GPL v2.0 and OpenIB | 10 | * This source code is distributed under a dual license of GPL v2.0 and OpenIB |
10 | * BSD. | 11 | * BSD. |
11 | * | 12 | * |
12 | * OpenIB BSD License | 13 | * OpenIB BSD License |
13 | * | 14 | * |
14 | * Redistribution and use in source and binary forms, with or without | 15 | * Redistribution and use in source and binary forms, with or without |
15 | * modification, are permitted provided that the following conditions are met: | 16 | * modification, are permitted provided that the following conditions are met: |
16 | * | 17 | * |
17 | * Redistributions of source code must retain the above copyright notice, this | 18 | * Redistributions of source code must retain the above copyright notice, this |
18 | * list of conditions and the following disclaimer. | 19 | * list of conditions and the following disclaimer. |
19 | * | 20 | * |
20 | * Redistributions in binary form must reproduce the above copyright notice, | 21 | * Redistributions in binary form must reproduce the above copyright notice, |
21 | * this list of conditions and the following disclaimer in the documentation | 22 | * this list of conditions and the following disclaimer in the documentation |
22 | * and/or other materials | 23 | * and/or other materials |
23 | * provided with the distribution. | 24 | * provided with the distribution. |
24 | * | 25 | * |
25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | 26 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 27 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
29 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 30 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
30 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 31 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | 32 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
32 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | 33 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER |
33 | * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 34 | * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 35 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
35 | * POSSIBILITY OF SUCH DAMAGE. | 36 | * POSSIBILITY OF SUCH DAMAGE. |
36 | */ | 37 | */ |
37 | 38 | ||
@@ -46,12 +47,11 @@ | |||
46 | 47 | ||
47 | extern struct bus_type ibmebus_bus_type; | 48 | extern struct bus_type ibmebus_bus_type; |
48 | 49 | ||
49 | struct ibmebus_dev { | 50 | struct ibmebus_dev { |
50 | const char *name; | ||
51 | struct of_device ofdev; | 51 | struct of_device ofdev; |
52 | }; | 52 | }; |
53 | 53 | ||
54 | struct ibmebus_driver { | 54 | struct ibmebus_driver { |
55 | char *name; | 55 | char *name; |
56 | struct of_device_id *id_table; | 56 | struct of_device_id *id_table; |
57 | int (*probe) (struct ibmebus_dev *dev, const struct of_device_id *id); | 57 | int (*probe) (struct ibmebus_dev *dev, const struct of_device_id *id); |
@@ -63,7 +63,7 @@ int ibmebus_register_driver(struct ibmebus_driver *drv); | |||
63 | void ibmebus_unregister_driver(struct ibmebus_driver *drv); | 63 | void ibmebus_unregister_driver(struct ibmebus_driver *drv); |
64 | 64 | ||
65 | int ibmebus_request_irq(struct ibmebus_dev *dev, | 65 | int ibmebus_request_irq(struct ibmebus_dev *dev, |
66 | u32 ist, | 66 | u32 ist, |
67 | irq_handler_t handler, | 67 | irq_handler_t handler, |
68 | unsigned long irq_flags, const char * devname, | 68 | unsigned long irq_flags, const char * devname, |
69 | void *dev_id); | 69 | void *dev_id); |
diff --git a/include/asm-powerpc/immap_86xx.h b/include/asm-powerpc/immap_86xx.h index d905b6622268..59b9e07b8e99 100644 --- a/include/asm-powerpc/immap_86xx.h +++ b/include/asm-powerpc/immap_86xx.h | |||
@@ -85,81 +85,6 @@ typedef struct ccsr_pci { | |||
85 | char res19[472]; | 85 | char res19[472]; |
86 | } ccsr_pci_t; | 86 | } ccsr_pci_t; |
87 | 87 | ||
88 | /* PCI Express Registers */ | ||
89 | typedef struct ccsr_pex { | ||
90 | uint pex_config_addr; /* 0x.000 - PCI Express Configuration Address Register */ | ||
91 | uint pex_config_data; /* 0x.004 - PCI Express Configuration Data Register */ | ||
92 | char res1[4]; | ||
93 | uint pex_otb_cpl_tor; /* 0x.00c - PCI Express Outbound completion timeout register */ | ||
94 | uint pex_conf_tor; /* 0x.010 - PCI Express configuration timeout register */ | ||
95 | char res2[12]; | ||
96 | uint pex_pme_mes_dr; /* 0x.020 - PCI Express PME and message detect register */ | ||
97 | uint pex_pme_mes_disr; /* 0x.024 - PCI Express PME and message disable register */ | ||
98 | uint pex_pme_mes_ier; /* 0x.028 - PCI Express PME and message interrupt enable register */ | ||
99 | uint pex_pmcr; /* 0x.02c - PCI Express power management command register */ | ||
100 | char res3[3024]; | ||
101 | uint pexotar0; /* 0x.c00 - PCI Express outbound translation address register 0 */ | ||
102 | uint pexotear0; /* 0x.c04 - PCI Express outbound translation extended address register 0*/ | ||
103 | char res4[8]; | ||
104 | uint pexowar0; /* 0x.c10 - PCI Express outbound window attributes register 0*/ | ||
105 | char res5[12]; | ||
106 | uint pexotar1; /* 0x.c20 - PCI Express outbound translation address register 1 */ | ||
107 | uint pexotear1; /* 0x.c24 - PCI Express outbound translation extended address register 1*/ | ||
108 | uint pexowbar1; /* 0x.c28 - PCI Express outbound window base address register 1*/ | ||
109 | char res6[4]; | ||
110 | uint pexowar1; /* 0x.c30 - PCI Express outbound window attributes register 1*/ | ||
111 | char res7[12]; | ||
112 | uint pexotar2; /* 0x.c40 - PCI Express outbound translation address register 2 */ | ||
113 | uint pexotear2; /* 0x.c44 - PCI Express outbound translation extended address register 2*/ | ||
114 | uint pexowbar2; /* 0x.c48 - PCI Express outbound window base address register 2*/ | ||
115 | char res8[4]; | ||
116 | uint pexowar2; /* 0x.c50 - PCI Express outbound window attributes register 2*/ | ||
117 | char res9[12]; | ||
118 | uint pexotar3; /* 0x.c60 - PCI Express outbound translation address register 3 */ | ||
119 | uint pexotear3; /* 0x.c64 - PCI Express outbound translation extended address register 3*/ | ||
120 | uint pexowbar3; /* 0x.c68 - PCI Express outbound window base address register 3*/ | ||
121 | char res10[4]; | ||
122 | uint pexowar3; /* 0x.c70 - PCI Express outbound window attributes register 3*/ | ||
123 | char res11[12]; | ||
124 | uint pexotar4; /* 0x.c80 - PCI Express outbound translation address register 4 */ | ||
125 | uint pexotear4; /* 0x.c84 - PCI Express outbound translation extended address register 4*/ | ||
126 | uint pexowbar4; /* 0x.c88 - PCI Express outbound window base address register 4*/ | ||
127 | char res12[4]; | ||
128 | uint pexowar4; /* 0x.c90 - PCI Express outbound window attributes register 4*/ | ||
129 | char res13[12]; | ||
130 | char res14[256]; | ||
131 | uint pexitar3; /* 0x.da0 - PCI Express inbound translation address register 3 */ | ||
132 | char res15[4]; | ||
133 | uint pexiwbar3; /* 0x.da8 - PCI Express inbound window base address register 3 */ | ||
134 | uint pexiwbear3; /* 0x.dac - PCI Express inbound window base extended address register 3 */ | ||
135 | uint pexiwar3; /* 0x.db0 - PCI Express inbound window attributes register 3 */ | ||
136 | char res16[12]; | ||
137 | uint pexitar2; /* 0x.dc0 - PCI Express inbound translation address register 2 */ | ||
138 | char res17[4]; | ||
139 | uint pexiwbar2; /* 0x.dc8 - PCI Express inbound window base address register 2 */ | ||
140 | uint pexiwbear2; /* 0x.dcc - PCI Express inbound window base extended address register 2 */ | ||
141 | uint pexiwar2; /* 0x.dd0 - PCI Express inbound window attributes register 2 */ | ||
142 | char res18[12]; | ||
143 | uint pexitar1; /* 0x.de0 - PCI Express inbound translation address register 2 */ | ||
144 | char res19[4]; | ||
145 | uint pexiwbar1; /* 0x.de8 - PCI Express inbound window base address register 2 */ | ||
146 | uint pexiwbear1; /* 0x.dec - PCI Express inbound window base extended address register 2 */ | ||
147 | uint pexiwar1; /* 0x.df0 - PCI Express inbound window attributes register 2 */ | ||
148 | char res20[12]; | ||
149 | uint pex_err_dr; /* 0x.e00 - PCI Express error detect register */ | ||
150 | char res21[4]; | ||
151 | uint pex_err_en; /* 0x.e08 - PCI Express error interrupt enable register */ | ||
152 | char res22[4]; | ||
153 | uint pex_err_disr; /* 0x.e10 - PCI Express error disable register */ | ||
154 | char res23[12]; | ||
155 | uint pex_err_cap_stat; /* 0x.e20 - PCI Express error capture status register */ | ||
156 | char res24[4]; | ||
157 | uint pex_err_cap_r0; /* 0x.e28 - PCI Express error capture register 0 */ | ||
158 | uint pex_err_cap_r1; /* 0x.e2c - PCI Express error capture register 0 */ | ||
159 | uint pex_err_cap_r2; /* 0x.e30 - PCI Express error capture register 0 */ | ||
160 | uint pex_err_cap_r3; /* 0x.e34 - PCI Express error capture register 0 */ | ||
161 | } ccsr_pex_t; | ||
162 | |||
163 | /* Global Utility Registers */ | 88 | /* Global Utility Registers */ |
164 | typedef struct ccsr_guts { | 89 | typedef struct ccsr_guts { |
165 | uint porpllsr; /* 0x.0000 - POR PLL Ratio Status Register */ | 90 | uint porpllsr; /* 0x.0000 - POR PLL Ratio Status Register */ |
diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h index 0d3adc09c847..4de851d91f96 100644 --- a/include/asm-powerpc/paca.h +++ b/include/asm-powerpc/paca.h | |||
@@ -70,6 +70,7 @@ struct paca_struct { | |||
70 | s16 hw_cpu_id; /* Physical processor number */ | 70 | s16 hw_cpu_id; /* Physical processor number */ |
71 | u8 cpu_start; /* At startup, processor spins until */ | 71 | u8 cpu_start; /* At startup, processor spins until */ |
72 | /* this becomes non-zero. */ | 72 | /* this becomes non-zero. */ |
73 | struct slb_shadow *slb_shadow_ptr; | ||
73 | 74 | ||
74 | /* | 75 | /* |
75 | * Now, starting in cacheline 2, the exception save areas | 76 | * Now, starting in cacheline 2, the exception save areas |
@@ -101,8 +102,6 @@ struct paca_struct { | |||
101 | u64 user_time; /* accumulated usermode TB ticks */ | 102 | u64 user_time; /* accumulated usermode TB ticks */ |
102 | u64 system_time; /* accumulated system TB ticks */ | 103 | u64 system_time; /* accumulated system TB ticks */ |
103 | u64 startpurr; /* PURR/TB value snapshot */ | 104 | u64 startpurr; /* PURR/TB value snapshot */ |
104 | |||
105 | struct slb_shadow *slb_shadow_ptr; | ||
106 | }; | 105 | }; |
107 | 106 | ||
108 | extern struct paca_struct paca[]; | 107 | extern struct paca_struct paca[]; |
diff --git a/include/asm-powerpc/pci.h b/include/asm-powerpc/pci.h index ac656ee6bb19..ce0f13e8eb14 100644 --- a/include/asm-powerpc/pci.h +++ b/include/asm-powerpc/pci.h | |||
@@ -70,19 +70,22 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | |||
70 | */ | 70 | */ |
71 | #define PCI_DISABLE_MWI | 71 | #define PCI_DISABLE_MWI |
72 | 72 | ||
73 | extern struct dma_mapping_ops *pci_dma_ops; | 73 | #ifdef CONFIG_PCI |
74 | extern void set_pci_dma_ops(struct dma_mapping_ops *dma_ops); | ||
75 | extern struct dma_mapping_ops *get_pci_dma_ops(void); | ||
74 | 76 | ||
75 | /* For DAC DMA, we currently don't support it by default, but | 77 | /* For DAC DMA, we currently don't support it by default, but |
76 | * we let 64-bit platforms override this. | 78 | * we let 64-bit platforms override this. |
77 | */ | 79 | */ |
78 | static inline int pci_dac_dma_supported(struct pci_dev *hwdev,u64 mask) | 80 | static inline int pci_dac_dma_supported(struct pci_dev *hwdev,u64 mask) |
79 | { | 81 | { |
80 | if (pci_dma_ops && pci_dma_ops->dac_dma_supported) | 82 | struct dma_mapping_ops *d = get_pci_dma_ops(); |
81 | return pci_dma_ops->dac_dma_supported(&hwdev->dev, mask); | 83 | |
84 | if (d && d->dac_dma_supported) | ||
85 | return d->dac_dma_supported(&hwdev->dev, mask); | ||
82 | return 0; | 86 | return 0; |
83 | } | 87 | } |
84 | 88 | ||
85 | #ifdef CONFIG_PCI | ||
86 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | 89 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
87 | enum pci_dma_burst_strategy *strat, | 90 | enum pci_dma_burst_strategy *strat, |
88 | unsigned long *strategy_parameter) | 91 | unsigned long *strategy_parameter) |
@@ -99,6 +102,9 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
99 | *strat = PCI_DMA_BURST_MULTIPLE; | 102 | *strat = PCI_DMA_BURST_MULTIPLE; |
100 | *strategy_parameter = cacheline_size; | 103 | *strategy_parameter = cacheline_size; |
101 | } | 104 | } |
105 | #else /* CONFIG_PCI */ | ||
106 | #define set_pci_dma_ops(d) | ||
107 | #define get_pci_dma_ops() NULL | ||
102 | #endif | 108 | #endif |
103 | 109 | ||
104 | extern int pci_domain_nr(struct pci_bus *bus); | 110 | extern int pci_domain_nr(struct pci_bus *bus); |
diff --git a/include/asm-powerpc/ppc-pci.h b/include/asm-powerpc/ppc-pci.h index ab6eddb518c7..d74b2965bb82 100644 --- a/include/asm-powerpc/ppc-pci.h +++ b/include/asm-powerpc/ppc-pci.h | |||
@@ -10,6 +10,8 @@ | |||
10 | #define _ASM_POWERPC_PPC_PCI_H | 10 | #define _ASM_POWERPC_PPC_PCI_H |
11 | #ifdef __KERNEL__ | 11 | #ifdef __KERNEL__ |
12 | 12 | ||
13 | #ifdef CONFIG_PCI | ||
14 | |||
13 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
14 | #include <asm/pci-bridge.h> | 16 | #include <asm/pci-bridge.h> |
15 | 17 | ||
@@ -22,7 +24,7 @@ extern void pci_setup_phb_io_dynamic(struct pci_controller *hose, int primary); | |||
22 | extern struct list_head hose_list; | 24 | extern struct list_head hose_list; |
23 | extern int global_phb_number; | 25 | extern int global_phb_number; |
24 | 26 | ||
25 | extern unsigned long find_and_init_phbs(void); | 27 | extern void find_and_init_phbs(void); |
26 | 28 | ||
27 | extern struct pci_dev *ppc64_isabridge_dev; /* may be NULL if no ISA bus */ | 29 | extern struct pci_dev *ppc64_isabridge_dev; /* may be NULL if no ISA bus */ |
28 | 30 | ||
@@ -68,7 +70,7 @@ struct pci_dev *pci_get_device_by_addr(unsigned long addr); | |||
68 | void eeh_slot_error_detail (struct pci_dn *pdn, int severity); | 70 | void eeh_slot_error_detail (struct pci_dn *pdn, int severity); |
69 | 71 | ||
70 | /** | 72 | /** |
71 | * rtas_pci_enableo - enable IO transfers for this slot | 73 | * rtas_pci_enable - enable IO transfers for this slot |
72 | * @pdn: pci device node | 74 | * @pdn: pci device node |
73 | * @function: either EEH_THAW_MMIO or EEH_THAW_DMA | 75 | * @function: either EEH_THAW_MMIO or EEH_THAW_DMA |
74 | * | 76 | * |
@@ -89,6 +91,7 @@ int rtas_pci_enable(struct pci_dn *pdn, int function); | |||
89 | * Returns a non-zero value if the reset failed. | 91 | * Returns a non-zero value if the reset failed. |
90 | */ | 92 | */ |
91 | int rtas_set_slot_reset (struct pci_dn *); | 93 | int rtas_set_slot_reset (struct pci_dn *); |
94 | int eeh_wait_for_slot_status(struct pci_dn *pdn, int max_wait_msecs); | ||
92 | 95 | ||
93 | /** | 96 | /** |
94 | * eeh_restore_bars - Restore device configuration info. | 97 | * eeh_restore_bars - Restore device configuration info. |
@@ -126,5 +129,10 @@ struct device_node * find_device_pe(struct device_node *dn); | |||
126 | 129 | ||
127 | #endif | 130 | #endif |
128 | 131 | ||
132 | #else /* CONFIG_PCI */ | ||
133 | static inline void find_and_init_phbs(void) { } | ||
134 | static inline void init_pci_config_tokens(void) { } | ||
135 | #endif /* !CONFIG_PCI */ | ||
136 | |||
129 | #endif /* __KERNEL__ */ | 137 | #endif /* __KERNEL__ */ |
130 | #endif /* _ASM_POWERPC_PPC_PCI_H */ | 138 | #endif /* _ASM_POWERPC_PPC_PCI_H */ |
diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h index a26c32ee5527..d947b1609491 100644 --- a/include/asm-powerpc/processor.h +++ b/include/asm-powerpc/processor.h | |||
@@ -133,7 +133,6 @@ struct thread_struct { | |||
133 | mm_segment_t fs; /* for get_fs() validation */ | 133 | mm_segment_t fs; /* for get_fs() validation */ |
134 | #ifdef CONFIG_PPC32 | 134 | #ifdef CONFIG_PPC32 |
135 | void *pgdir; /* root of page-table tree */ | 135 | void *pgdir; /* root of page-table tree */ |
136 | signed long last_syscall; | ||
137 | #endif | 136 | #endif |
138 | #if defined(CONFIG_4xx) || defined (CONFIG_BOOKE) | 137 | #if defined(CONFIG_4xx) || defined (CONFIG_BOOKE) |
139 | unsigned long dbcr0; /* debug control register values */ | 138 | unsigned long dbcr0; /* debug control register values */ |
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index 020ed015a94b..994de8ea3308 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <linux/proc_fs.h> | 19 | #include <linux/proc_fs.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <asm/irq.h> | ||
21 | #include <asm/atomic.h> | 22 | #include <asm/atomic.h> |
22 | 23 | ||
23 | /* Definitions used by the flattened device tree */ | 24 | /* Definitions used by the flattened device tree */ |
@@ -58,6 +59,8 @@ struct boot_param_header | |||
58 | u32 boot_cpuid_phys; /* Physical CPU id we're booting on */ | 59 | u32 boot_cpuid_phys; /* Physical CPU id we're booting on */ |
59 | /* version 3 fields below */ | 60 | /* version 3 fields below */ |
60 | u32 dt_strings_size; /* size of the DT strings block */ | 61 | u32 dt_strings_size; /* size of the DT strings block */ |
62 | /* version 17 fields below */ | ||
63 | u32 dt_struct_size; /* size of the DT structure block */ | ||
61 | }; | 64 | }; |
62 | 65 | ||
63 | 66 | ||
diff --git a/include/linux/pmu.h b/include/linux/pmu.h index 783177387ac6..b0952e532ed5 100644 --- a/include/linux/pmu.h +++ b/include/linux/pmu.h | |||
@@ -168,24 +168,16 @@ extern int pmu_get_model(void); | |||
168 | 168 | ||
169 | struct pmu_sleep_notifier | 169 | struct pmu_sleep_notifier |
170 | { | 170 | { |
171 | int (*notifier_call)(struct pmu_sleep_notifier *self, int when); | 171 | void (*notifier_call)(struct pmu_sleep_notifier *self, int when); |
172 | int priority; | 172 | int priority; |
173 | struct list_head list; | 173 | struct list_head list; |
174 | }; | 174 | }; |
175 | 175 | ||
176 | /* Code values for calling sleep/wakeup handlers | 176 | /* Code values for calling sleep/wakeup handlers |
177 | * | ||
178 | * Note: If a sleep request got cancelled, all drivers will get | ||
179 | * the PBOOK_SLEEP_REJECT, even those who didn't get the PBOOK_SLEEP_REQUEST. | ||
180 | */ | 177 | */ |
181 | #define PBOOK_SLEEP_REQUEST 1 | 178 | #define PBOOK_SLEEP_REQUEST 1 |
182 | #define PBOOK_SLEEP_NOW 2 | 179 | #define PBOOK_SLEEP_NOW 2 |
183 | #define PBOOK_SLEEP_REJECT 3 | 180 | #define PBOOK_WAKE 3 |
184 | #define PBOOK_WAKE 4 | ||
185 | |||
186 | /* Result codes returned by the notifiers */ | ||
187 | #define PBOOK_SLEEP_OK 0 | ||
188 | #define PBOOK_SLEEP_REFUSE -1 | ||
189 | 181 | ||
190 | /* priority levels in notifiers */ | 182 | /* priority levels in notifiers */ |
191 | #define SLEEP_LEVEL_VIDEO 100 /* Video driver (first wake) */ | 183 | #define SLEEP_LEVEL_VIDEO 100 /* Video driver (first wake) */ |
diff --git a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c index 37773b1deea5..f8a49bd17a13 100644 --- a/sound/oss/dmasound/dmasound_awacs.c +++ b/sound/oss/dmasound/dmasound_awacs.c | |||
@@ -257,7 +257,7 @@ static volatile struct dbdma_cmd *emergency_dbdma_cmd; | |||
257 | /* | 257 | /* |
258 | * Stuff for restoring after a sleep. | 258 | * Stuff for restoring after a sleep. |
259 | */ | 259 | */ |
260 | static int awacs_sleep_notify(struct pmu_sleep_notifier *self, int when); | 260 | static void awacs_sleep_notify(struct pmu_sleep_notifier *self, int when); |
261 | struct pmu_sleep_notifier awacs_sleep_notifier = { | 261 | struct pmu_sleep_notifier awacs_sleep_notifier = { |
262 | awacs_sleep_notify, SLEEP_LEVEL_SOUND, | 262 | awacs_sleep_notify, SLEEP_LEVEL_SOUND, |
263 | }; | 263 | }; |
@@ -1419,7 +1419,7 @@ load_awacs(void) | |||
1419 | * Save state when going to sleep, restore it afterwards. | 1419 | * Save state when going to sleep, restore it afterwards. |
1420 | */ | 1420 | */ |
1421 | /* FIXME: sort out disabling/re-enabling of read stuff as well */ | 1421 | /* FIXME: sort out disabling/re-enabling of read stuff as well */ |
1422 | static int awacs_sleep_notify(struct pmu_sleep_notifier *self, int when) | 1422 | static void awacs_sleep_notify(struct pmu_sleep_notifier *self, int when) |
1423 | { | 1423 | { |
1424 | unsigned long flags; | 1424 | unsigned long flags; |
1425 | 1425 | ||
@@ -1548,7 +1548,6 @@ static int awacs_sleep_notify(struct pmu_sleep_notifier *self, int when) | |||
1548 | spin_unlock_irqrestore(&dmasound.lock, flags); | 1548 | spin_unlock_irqrestore(&dmasound.lock, flags); |
1549 | UNLOCK(); | 1549 | UNLOCK(); |
1550 | } | 1550 | } |
1551 | return PBOOK_SLEEP_OK; | ||
1552 | } | 1551 | } |
1553 | #endif /* CONFIG_PM */ | 1552 | #endif /* CONFIG_PM */ |
1554 | 1553 | ||